You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2436aec
Browse filesBrowse the repository at this point in the historyBrowse files
authored and
Peli
committed
Use literal printf pipelines for SDK-compatible Rig launches
The [shared Rig template](.github/workflows/shared/rig.md) provisions Node.js 24
63
-
and allows `node`. In this repository, import
63
+
and allows `printf` and `node`. In this repository, import
64
64
`shared/rig.md`instead. Without the template, configure these prerequisites
65
65
explicitly; see the [runtime reference](skills/rig/runtime.md#github-agentic-workflows).
66
66
Grant `copilot-requests: write` and provision the skill's dependencies in the host.
67
-
Use heredocs or redirections rather than `cat`/`echo` pipelines. Grant additional
67
+
For Copilot SDK workflows, use `printf '%s\n' ... | node` rather than heredocs,
68
+
which gh-aw v0.91.1's SDK permission parser rejects. Single-quote each source
69
+
line and escape literal apostrophes as `'"'"'`. Grant additional
68
70
commands only for the program's own tool calls. This is a smaller tool
69
71
allowlist, not a security boundary: Node can still start subprocesses.
70
72
@@ -122,19 +124,18 @@ Its [integration guide](skills/rig/runtime.md#choosing-an-integration)
122
124
compares engine capabilities, model selection, tool ownership, and output
123
125
enforcement.
124
126
125
-
For every heredoc below, replace `<delimiter>` with a fresh 7-character
126
-
pseudo-random alphanumeric string; no tool call is needed to generate it.
127
-
Check it is not an entire line of the contents, single-quote the opener, and
128
-
repeat the exact unquoted delimiter alone on the closing line. See the
129
-
[inline-program guide](skills/rig/runtime.md#inline-programs) for the
130
-
delimiter rules; do not reuse fixed delimiters or shell variables.
127
+
Use the fixed `printf '%s\n'` format with one single-quoted argument per source
128
+
line. Escape literal apostrophes as `'"'"'`; do not use source as the format
129
+
string or double-quote it. See the
130
+
[inline-program guide](skills/rig/runtime.md#inline-programs) for quoting rules
131
+
and heredoc alternatives outside the Copilot SDK workflow driver.
131
132
132
133
**Design on the fly** — just describe what you want as a string and let the model figure out the rest:
133
134
134
135
```bash
135
-
node skills/rig/run.ts <<'<delimiter>'
136
-
export default "Run npm test, diagnose any failures, apply the smallest safe fix, and repeat up to 3 times.";
137
-
<delimiter>
136
+
printf'%s\n' \
137
+
'export default "Run npm test, diagnose any failures, apply the smallest safe fix, and repeat up to 3 times.";' \
138
+
| node skills/rig/run.ts
138
139
```
139
140
140
141
Or ask Copilot (with the skill) to generate a full program for you. Describe your goal in natural language and Copilot returns a runnable `rig` markdown fence like this:
@@ -166,20 +167,18 @@ export default ralfLoop;
166
167
```
167
168
````
168
169
169
-
Pass the fence contents directly to the launcher with a heredoc:
170
+
Pass the fence contents directly to the launcher with a literal pipeline:
170
171
171
172
```bash
172
-
node skills/rig/run.ts <<'<delimiter>'
173
-
// Paste the rig fence contents here.
174
-
<delimiter>
173
+
printf'%s\n' \
174
+
'<one single-quoted argument per source line of the rig fence>' \
Import `configureAgent` and `copilotEngine`in the fenced program and call `configureAgent(copilotEngine())` before defining agents. Launch with the installed skill's `run.ts` and host-provisioned dependencies. Grant `copilot-requests: write`, and enable only the additional tools and network access the program uses.
0 commit comments