@andromarces/agent-loops 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/package.json +1 -1
- package/src/entrypoints/copilot.mjs +6 -1
package/README.md
CHANGED
|
@@ -245,7 +245,7 @@ happens only through explicit invocation.
|
|
|
245
245
|
`--dangerously-bypass-hook-trust` for normal use.
|
|
246
246
|
- The Copilot CLI entry point is `src/entrypoints/copilot.mjs`, exposed as
|
|
247
247
|
`agent-loop-copilot`. It mints a UUID, starts
|
|
248
|
-
`copilot --session-id <uuid> --interactive <prompt>`, and includes the
|
|
248
|
+
`copilot --session-id <uuid> --add-dir <docs dir> --interactive <prompt>`, and includes the
|
|
249
249
|
instruction file, task, and same id for `--parent-session` in the first
|
|
250
250
|
prompt. The current CLI documentation exposes no custom command-template
|
|
251
251
|
session-id placeholder, so the launcher is the native entry point.
|
|
@@ -449,6 +449,8 @@ npm stage view <stage-id>
|
|
|
449
449
|
npm stage approve <stage-id>
|
|
450
450
|
```
|
|
451
451
|
|
|
452
|
+
A manual dispatch must run on the release tag, for example `gh workflow run release.yml --ref v<version>`. A dispatch on a branch is rejected, because npm records provenance from the run ref, not the checked-out commit.
|
|
453
|
+
|
|
452
454
|
The version goes live only after approval. Staged publishing needs npm 11.15.0 or later and 2FA on the account.
|
|
453
455
|
|
|
454
456
|
## Manual smoke test
|
package/package.json
CHANGED
|
@@ -13,13 +13,18 @@ import { isEntryPoint } from "../lib/entrypoint.mjs";
|
|
|
13
13
|
const INSTRUCTIONS_DIR = fileURLToPath(new URL("../../docs", import.meta.url));
|
|
14
14
|
const INSTRUCTIONS_PATH = join(INSTRUCTIONS_DIR, "orchestrator-instructions.md");
|
|
15
15
|
|
|
16
|
+
// The prompt is one line. execa rejects CR or LF in an argument on Windows when
|
|
17
|
+
// it spawns a batch shim through cmd.exe, and npm installs the copilot CLI as a
|
|
18
|
+
// .cmd shim on Windows.
|
|
16
19
|
const INSTRUCTIONS = (sessionId, task) =>
|
|
17
20
|
[
|
|
18
21
|
`Read \`${INSTRUCTIONS_PATH}\` and follow it for this request.`,
|
|
19
22
|
"The task and role settings are:",
|
|
20
23
|
task,
|
|
21
24
|
`This Copilot CLI session id is \`${sessionId}\`. Pass it as \`--parent-session\` on the init dispatch call.`,
|
|
22
|
-
]
|
|
25
|
+
]
|
|
26
|
+
.join(" ")
|
|
27
|
+
.replace(/[\r\n]+/g, " ");
|
|
23
28
|
|
|
24
29
|
export function buildCopilotInvocation(task, sessionId) {
|
|
25
30
|
const normalizedTask = String(task ?? "").trim();
|