agent-cli-runtime 0.1.0-alpha.0
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/CHANGELOG.md +51 -0
- package/CONTRIBUTING.md +60 -0
- package/LICENSE +202 -0
- package/README.md +573 -0
- package/README.zh-CN.md +571 -0
- package/SECURITY.md +35 -0
- package/dist/adapters/adapter-types.d.ts +138 -0
- package/dist/adapters/adapter-types.js +2 -0
- package/dist/adapters/adapter-types.js.map +1 -0
- package/dist/adapters/claude.d.ts +2 -0
- package/dist/adapters/claude.js +97 -0
- package/dist/adapters/claude.js.map +1 -0
- package/dist/adapters/codex.d.ts +3 -0
- package/dist/adapters/codex.js +120 -0
- package/dist/adapters/codex.js.map +1 -0
- package/dist/adapters/opencode.d.ts +4 -0
- package/dist/adapters/opencode.js +111 -0
- package/dist/adapters/opencode.js.map +1 -0
- package/dist/adapters/registry.d.ts +9 -0
- package/dist/adapters/registry.js +23 -0
- package/dist/adapters/registry.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +978 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/core/async-queue.d.ts +10 -0
- package/dist/core/async-queue.js +49 -0
- package/dist/core/async-queue.js.map +1 -0
- package/dist/core/diagnostics.d.ts +20 -0
- package/dist/core/diagnostics.js +4 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/event-contract.d.ts +32 -0
- package/dist/core/event-contract.js +128 -0
- package/dist/core/event-contract.js.map +1 -0
- package/dist/core/events.d.ts +147 -0
- package/dist/core/events.js +4 -0
- package/dist/core/events.js.map +1 -0
- package/dist/core/ids.d.ts +1 -0
- package/dist/core/ids.js +5 -0
- package/dist/core/ids.js.map +1 -0
- package/dist/core/redaction.d.ts +4 -0
- package/dist/core/redaction.js +51 -0
- package/dist/core/redaction.js.map +1 -0
- package/dist/core/runtime.d.ts +41 -0
- package/dist/core/runtime.js +83 -0
- package/dist/core/runtime.js.map +1 -0
- package/dist/core/schema-contract.d.ts +55 -0
- package/dist/core/schema-contract.js +143 -0
- package/dist/core/schema-contract.js.map +1 -0
- package/dist/detection/detect.d.ts +14 -0
- package/dist/detection/detect.js +293 -0
- package/dist/detection/detect.js.map +1 -0
- package/dist/detection/env.d.ts +2 -0
- package/dist/detection/env.js +15 -0
- package/dist/detection/env.js.map +1 -0
- package/dist/detection/executable-resolution.d.ts +12 -0
- package/dist/detection/executable-resolution.js +50 -0
- package/dist/detection/executable-resolution.js.map +1 -0
- package/dist/detection/invocation.d.ts +9 -0
- package/dist/detection/invocation.js +22 -0
- package/dist/detection/invocation.js.map +1 -0
- package/dist/goals/goal-scheduler.d.ts +31 -0
- package/dist/goals/goal-scheduler.js +518 -0
- package/dist/goals/goal-scheduler.js.map +1 -0
- package/dist/goals/goal-store.d.ts +37 -0
- package/dist/goals/goal-store.js +300 -0
- package/dist/goals/goal-store.js.map +1 -0
- package/dist/goals/goal-types.d.ts +103 -0
- package/dist/goals/goal-types.js +2 -0
- package/dist/goals/goal-types.js.map +1 -0
- package/dist/goals/planner-prompts.d.ts +3 -0
- package/dist/goals/planner-prompts.js +26 -0
- package/dist/goals/planner-prompts.js.map +1 -0
- package/dist/goals/task-graph.d.ts +9 -0
- package/dist/goals/task-graph.js +229 -0
- package/dist/goals/task-graph.js.map +1 -0
- package/dist/goals/validation-runner.d.ts +7 -0
- package/dist/goals/validation-runner.js +63 -0
- package/dist/goals/validation-runner.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/claude-stream-json.d.ts +11 -0
- package/dist/parsers/claude-stream-json.js +102 -0
- package/dist/parsers/claude-stream-json.js.map +1 -0
- package/dist/parsers/codex-json.d.ts +8 -0
- package/dist/parsers/codex-json.js +107 -0
- package/dist/parsers/codex-json.js.map +1 -0
- package/dist/parsers/line-buffer.d.ts +7 -0
- package/dist/parsers/line-buffer.js +28 -0
- package/dist/parsers/line-buffer.js.map +1 -0
- package/dist/parsers/opencode-json.d.ts +8 -0
- package/dist/parsers/opencode-json.js +72 -0
- package/dist/parsers/opencode-json.js.map +1 -0
- package/dist/parsers/plain-lines.d.ts +6 -0
- package/dist/parsers/plain-lines.js +9 -0
- package/dist/parsers/plain-lines.js.map +1 -0
- package/dist/public-types.d.ts +143 -0
- package/dist/public-types.js +2 -0
- package/dist/public-types.js.map +1 -0
- package/dist/runs/process-runner.d.ts +35 -0
- package/dist/runs/process-runner.js +97 -0
- package/dist/runs/process-runner.js.map +1 -0
- package/dist/runs/prompt-transport.d.ts +10 -0
- package/dist/runs/prompt-transport.js +43 -0
- package/dist/runs/prompt-transport.js.map +1 -0
- package/dist/runs/run-result.d.ts +9 -0
- package/dist/runs/run-result.js +22 -0
- package/dist/runs/run-result.js.map +1 -0
- package/dist/runs/run-scheduler.d.ts +25 -0
- package/dist/runs/run-scheduler.js +552 -0
- package/dist/runs/run-scheduler.js.map +1 -0
- package/dist/runs/run-store.d.ts +42 -0
- package/dist/runs/run-store.js +297 -0
- package/dist/runs/run-store.js.map +1 -0
- package/dist/runs/run-types.d.ts +59 -0
- package/dist/runs/run-types.js +2 -0
- package/dist/runs/run-types.js.map +1 -0
- package/dist/smoke/parser-samples.d.ts +17 -0
- package/dist/smoke/parser-samples.js +186 -0
- package/dist/smoke/parser-samples.js.map +1 -0
- package/dist/storage/file-storage.d.ts +35 -0
- package/dist/storage/file-storage.js +271 -0
- package/dist/storage/file-storage.js.map +1 -0
- package/dist/storage/jsonl-store.d.ts +9 -0
- package/dist/storage/jsonl-store.js +138 -0
- package/dist/storage/jsonl-store.js.map +1 -0
- package/dist/storage/manifest-validation.d.ts +11 -0
- package/dist/storage/manifest-validation.js +102 -0
- package/dist/storage/manifest-validation.js.map +1 -0
- package/dist/storage/storage-lease.d.ts +40 -0
- package/dist/storage/storage-lease.js +223 -0
- package/dist/storage/storage-lease.js.map +1 -0
- package/dist/storage/storage-types.d.ts +55 -0
- package/dist/storage/storage-types.js +2 -0
- package/dist/storage/storage-types.js.map +1 -0
- package/dist/storage/store-inspection.d.ts +28 -0
- package/dist/storage/store-inspection.js +941 -0
- package/dist/storage/store-inspection.js.map +1 -0
- package/docs/api-schema-contract.md +92 -0
- package/docs/compatibility.md +832 -0
- package/docs/daemon-ready-contract.md +283 -0
- package/docs/production-readiness.md +281 -0
- package/docs/release-checklist.md +257 -0
- package/docs/release-publish-runbook.md +201 -0
- package/docs/release-report.md +517 -0
- package/docs/ssot.md +1257 -0
- package/examples/cli-dogfood.md +113 -0
- package/examples/library-goal.js +94 -0
- package/examples/library-run.js +84 -0
- package/package.json +79 -0
- package/scripts/dogfood.mjs +243 -0
|
@@ -0,0 +1,832 @@
|
|
|
1
|
+
# Agent CLI Compatibility Matrix
|
|
2
|
+
|
|
3
|
+
Status: P3-7 API / CLI Schema Freeze
|
|
4
|
+
Last updated: 2026-06-22
|
|
5
|
+
|
|
6
|
+
This matrix records the CLI versions and behaviors that have been verified with the current runtime. Real agent CLIs change quickly; treat this file as dated compatibility evidence, not a permanent guarantee. P3-6 added a reviewable opt-in real smoke evidence path while keeping default release gates on detection/profile certification only. P3-7 freezes the API / CLI schema inventory and versioning policy in [docs/api-schema-contract.md](./api-schema-contract.md). It does not publish npm, configure trusted publishing, implement a daemon/API server, or add authenticated real agent runs to CI, dogfood, prepublish, or release-candidate gates. Raw CLI output, tokens, full prompts, auth env values, and private paths are not committed.
|
|
7
|
+
|
|
8
|
+
## Evidence policy
|
|
9
|
+
|
|
10
|
+
Current status is P3-6 pre-alpha real CLI opt-in smoke evidence, which is intended to be the default interpretation for this matrix.
|
|
11
|
+
|
|
12
|
+
- Current behavior is what is validated by `npm test` / typecheck / lint / build plus the current `npm pack`, package boundary, CLI JSON contract, and single-Node TypeScript consumer install-smoke checks.
|
|
13
|
+
- CI behavior is matrixed for Node.js 20/22/24 except dogfood, which runs once on Node.js 22 to avoid duplicating the slower install smoke.
|
|
14
|
+
- `npm test` uses Vitest's verbose reporter for contract coverage; slower installed-package gates and install smokes stay out of the Node.js matrix and run through single-Node release gates or explicit opt-in checks.
|
|
15
|
+
- `npm run prepublish:check` is the local guard that combines typecheck, lint, tests, build, `daemon:verify`, `runtime:safety`, dogfood, production audit, package boundary checks, and pack dry-run.
|
|
16
|
+
- `npm run release:candidate` creates local release-candidate artifacts including `gate-evidence.json`, and `npm run release:verify -- --dir <path>` validates local or downloaded artifacts with stable redacted JSON.
|
|
17
|
+
- `npm publish --dry-run --ignore-scripts --tag alpha` is a documented manual local dry-run check; it is not a remote CI gate.
|
|
18
|
+
- `docs/release-publish-runbook.md` documents the future human alpha publish path, dist-tag verification, rollback/deprecation/unpublish boundary, 2FA, trusted publishing, provenance, and token strategy; no real publish is performed in P2-13.
|
|
19
|
+
- `docs/daemon-ready-contract.md` documents embedding semantics for daemon/product shell callers without adding a hosted daemon surface.
|
|
20
|
+
- `npm run dogfood` installs the tarball into a temporary consumer project, runs `tsc --noEmit`, then executes fake-CLI library run/goal/replay/diagnostics smoke through the installed package.
|
|
21
|
+
- CI runs `daemon:verify`, `runtime:safety`, and dogfood once in a single Node.js 22 release-gates job; the Node.js 20/22/24 matrix does not repeat installed-package gates.
|
|
22
|
+
- Remote GitHub Actions release-candidate evidence is run `27932628093` on workflow head SHA `8d7bc2a19c626caa1ad5223acbcd35df34aff18e`; historical run `27869580048` only proves commit `2f8832119b4ebdb8393077052560589a398ebf56`.
|
|
23
|
+
- Evidence modes are intentionally separate:
|
|
24
|
+
- `fixtures`: offline parser contract fixtures; no real or fake CLI process is launched.
|
|
25
|
+
- `fake`: temporary local fake CLIs through the real adapter argv/stdin/parser path; no network or real account is used.
|
|
26
|
+
- `real local observed`: local executable/version/auth/model/profile certification by default; real runs only when `--allow-real-run` is explicit.
|
|
27
|
+
- `package install smoke`: npm tarball installation into a temporary project, with fake/local CLI checks and no real provider secrets.
|
|
28
|
+
- P1-6 and earlier notes in this file are historical references for parser fixtures, timeout/reconnect evidence, and compatibility context; they are not equivalent to current "latest expected" contract assumptions.
|
|
29
|
+
- When using this file as runtime contract input, prioritize the `Status` section, explicit "Runtime notes" in each adapter, and the most recent command evidence.
|
|
30
|
+
- For changed behavior, add a new evidence row at the top of the section rather than keeping the old row as authoritative.
|
|
31
|
+
|
|
32
|
+
## P3-6 Real CLI Opt-In Smoke Evidence
|
|
33
|
+
|
|
34
|
+
P3-6 changes the evidence path, not the adapter invocation profiles:
|
|
35
|
+
|
|
36
|
+
- `smoke --mode real --agent <id> --json` performs detection/profile certification and reports `runClassification: "real_run_skipped"` unless `--allow-real-run` is explicit.
|
|
37
|
+
- `smoke --mode real --agent <id> --allow-real-run --expect-text <safe_text> --json` is the recommended authenticated real-run evidence command.
|
|
38
|
+
- Real smoke uses isolated temp cwd by default, requests read-only behavior, checks cwd mutation, and requires expected text for success. A custom `--prompt` or `--prompt-file` without `--expect-text` cannot pass solely because the CLI exits `0`.
|
|
39
|
+
- Real smoke emits `schemaVersion: "agent-runtime.realSmoke.v1"` with `adapter`, `version`, `auth`, `modelsSource`, `runClassification`, `expectedTextMatched`, redacted/truncated `observedTextTail`, `cwdMutationChecked`, `cwdMutated`, `diagnosticsCount`, `skippedReason`, and `failureReason`.
|
|
40
|
+
- Real smoke summaries do not include prompt text, token values, private cwd, raw stdout/stderr, or the final run record.
|
|
41
|
+
- Explicit classifications include `auth_missing`, `unavailable_executable`, `unsupported_flag`, `unexpected_output`, `cwd_mutated`, `needs_verification`, and `real_run_skipped`.
|
|
42
|
+
- CI, dogfood, prepublish, and `release:candidate` still do not pass `--allow-real-run`.
|
|
43
|
+
|
|
44
|
+
Local P3-6 real-smoke evidence on 2026-06-22:
|
|
45
|
+
|
|
46
|
+
| Adapter | Command shape | runClassification | expectedTextMatched | cwdMutated | Notes |
|
|
47
|
+
| --- | --- | --- | --- | --- | --- |
|
|
48
|
+
| Codex CLI | `smoke --mode real --agent codex --allow-real-run --expect-text <safe_text> --timeout-ms 120000 --json` | `success` | `true` | `false` | Latest same-machine opt-in smoke matched the expected text and did not mutate the isolated cwd; a 30s default-timeout retry can still classify as `timeout`. |
|
|
49
|
+
| Claude Code | `smoke --mode real --agent claude --allow-real-run --expect-text <safe_text> --json` | `auth_missing` | `null` | `null` | Preflight skipped before launch because local Claude Code auth is missing. |
|
|
50
|
+
| OpenCode | `smoke --mode real --agent opencode --allow-real-run --expect-text <safe_text> --timeout-ms 120000 --json` | `success` | `true` | `false` | Latest same-machine opt-in smoke matched the expected text and did not mutate the isolated cwd; a 30s default-timeout retry can still classify as `timeout`; explicit read-only/workspace-write flags still remain unverified. |
|
|
51
|
+
|
|
52
|
+
## P2-12 Remote Release Candidate Evidence Closure
|
|
53
|
+
|
|
54
|
+
P2-12 remote audit evidence on 2026-06-20:
|
|
55
|
+
|
|
56
|
+
- Commit: `2f8832119b4ebdb8393077052560589a398ebf56`.
|
|
57
|
+
- Run id: `27869580048`.
|
|
58
|
+
- Run URL: `https://github.com/iiwish/agent-cli-runtime/actions/runs/27869580048`.
|
|
59
|
+
- Run event: `workflow_dispatch`.
|
|
60
|
+
- Run status/conclusion: `completed` / `success`.
|
|
61
|
+
- Run created/updated: `2026-06-20T11:19:33Z` / `2026-06-20T11:20:40Z`.
|
|
62
|
+
- Uploaded artifacts: `agent-cli-runtime-tarball`, `agent-cli-runtime-pack-metadata`, `agent-cli-runtime-package-files`, `agent-cli-runtime-release-verification`.
|
|
63
|
+
- Downloaded artifact re-verification: `npm run release:verify -- --dir /tmp/agent-runtime-p2-12-remote-5P5MSc/normalized`.
|
|
64
|
+
- Verification result: `schemaVersion: "agent-cli-runtime.releaseVerification.v1"`, `ok: true`, package file count `145`, tarball `agent-cli-runtime-0.1.0-alpha.0.tgz`, tarball size `187378` bytes, tarball sha256 `3701bd6355651bbc200d5c017a9b01c3dd7136140b64dee0781e6eb601a7a657`, empty diagnostics.
|
|
65
|
+
|
|
66
|
+
The GitHub download layout used one directory per artifact name; the downloaded files were copied into a temporary normalized review directory before local verification.
|
|
67
|
+
|
|
68
|
+
## P2-13 Alpha Publish Readiness Decision
|
|
69
|
+
|
|
70
|
+
P2-13 does not change adapter compatibility. It keeps the pre-alpha runtime behavior and adds only publish-readiness evidence:
|
|
71
|
+
|
|
72
|
+
- package metadata includes repository, homepage, bugs, keywords, Node engine, `publishConfig.tag: "alpha"`, package root `exports`, CLI `bin`, and the existing `files` boundary;
|
|
73
|
+
- the package root value export remains `createAgentRuntime` only;
|
|
74
|
+
- `docs/release-publish-runbook.md` records future real publish commands without executing them in this stage;
|
|
75
|
+
- `npm publish --dry-run --ignore-scripts --tag alpha` is the only publish simulation for P2-13;
|
|
76
|
+
- `.github/workflows/ci.yml` and `.github/workflows/release-candidate.yml` remain artifact/check workflows and do not publish npm or require registry credentials;
|
|
77
|
+
- trusted publishing and provenance are future choices, not configured evidence for P2-13.
|
|
78
|
+
|
|
79
|
+
## P3-5 Remote Release Evidence Closure
|
|
80
|
+
|
|
81
|
+
P3-5 does not change adapter invocation compatibility. It closes workflow-head release-candidate evidence:
|
|
82
|
+
|
|
83
|
+
- `.github/workflows/release-candidate.yml` run `27932628093` completed successfully on workflow head SHA `8d7bc2a19c626caa1ad5223acbcd35df34aff18e`.
|
|
84
|
+
- The run uploaded `agent-cli-runtime-tarball`, `agent-cli-runtime-pack-metadata`, `agent-cli-runtime-package-files`, `agent-cli-runtime-gate-evidence`, and `agent-cli-runtime-release-verification`.
|
|
85
|
+
- Downloaded artifacts were normalized into `/tmp/agent-runtime-p3-5-remote-7rkBqm/normalized` and passed `npm run release:verify -- --dir /tmp/agent-runtime-p3-5-remote-7rkBqm/normalized`.
|
|
86
|
+
- Verification result: `schemaVersion: "agent-cli-runtime.releaseVerification.v1"`, `ok: true`, package file count `147`, empty diagnostics, and gate evidence for `daemon:verify` plus `runtime:safety` with `packageSource: "installed-tarball"`.
|
|
87
|
+
- Local real conformance after the remote run still did not launch authenticated real agent runs: Codex and OpenCode reported `real_run_skipped`; Claude Code reported `auth_missing`.
|
|
88
|
+
|
|
89
|
+
## P3-4 CI / Release Gate Alignment
|
|
90
|
+
|
|
91
|
+
P3-4 does not change adapter invocation compatibility. It changes release evidence handling:
|
|
92
|
+
|
|
93
|
+
- `.github/workflows/ci.yml` keeps the Node.js 20/22/24 matrix for normal checks and moves `npm run daemon:verify`, `npm run runtime:safety`, and `npm run dogfood` into one Node.js 22 release-gates job.
|
|
94
|
+
- `.github/workflows/release-candidate.yml` remains `workflow_dispatch` only and uploads five artifacts for current P3-4 candidates: `agent-cli-runtime-tarball`, `agent-cli-runtime-pack-metadata`, `agent-cli-runtime-package-files`, `agent-cli-runtime-gate-evidence`, and `agent-cli-runtime-release-verification`.
|
|
95
|
+
- `gate-evidence.json` uses `schemaVersion: "agent-cli-runtime.releaseGateEvidence.v1"` and records `npm run daemon:verify` plus `npm run runtime:safety` with installed-package output schema versions.
|
|
96
|
+
- `npm run release:verify` rejects missing or incomplete gate evidence while keeping package boundary and secret/private-path checks.
|
|
97
|
+
- P3-4 remote evidence was closed by P3-5 run `27932628093` for the workflow head SHA.
|
|
98
|
+
- P3-4 does not run authenticated real agent runs, publish npm, configure npm tokens, configure trusted publishing, or add daemon/API server behavior.
|
|
99
|
+
|
|
100
|
+
## P3-1 Daemon-Ready Contract Freeze
|
|
101
|
+
|
|
102
|
+
P3-1 does not change adapter invocation compatibility. It freezes daemon-facing runtime contracts and adds versioned store-health / CLI-error schemas:
|
|
103
|
+
|
|
104
|
+
- daemon embedding contract: [docs/daemon-ready-contract.md](./daemon-ready-contract.md);
|
|
105
|
+
- store health JSON: `schemaVersion: "agent-runtime.storeHealth.v1"`;
|
|
106
|
+
- CLI JSON usage error: `schemaVersion: "agent-runtime.cliError.v1"`;
|
|
107
|
+
- package root value export remains limited to `createAgentRuntime`;
|
|
108
|
+
- no daemon/API server, database, WAL, remote worker, UI, telemetry, npm publish, publish workflow, npm token, or trusted publishing configuration is added.
|
|
109
|
+
|
|
110
|
+
Current local real-CLI detection/preflight evidence from `node ./dist/cli/main.js conformance --mode real --agent all --json` on 2026-06-22:
|
|
111
|
+
|
|
112
|
+
| Adapter | CLI version | Auth/model source | runClassification | skippedReason | Notes |
|
|
113
|
+
| --- | --- | --- | --- | --- | --- |
|
|
114
|
+
| Codex CLI | `codex-cli 0.142.0-alpha.6` | auth `unknown`; models `live` | `real_run_skipped` | `real_run_not_allowed` | Detection/profile passed; no real run launched because `--allow-real-run` was not supplied. Session and auth probe remain `needsVerification`. |
|
|
115
|
+
| Claude Code | `2.1.178 (Claude Code)` | auth `missing`; models `fallback` | `auth_missing` | `auth_missing` | Detection/profile passed; run skipped before launch because local auth is missing. `--session-id` and reasoning remain `needsVerification`. |
|
|
116
|
+
| OpenCode | `1.15.6` | auth `unknown`; models `live` | `real_run_skipped` | `real_run_not_allowed` | Detection/profile passed; no real run launched because `--allow-real-run` was not supplied. Extra dirs, session, and read-only/workspace-write flags remain `needsVerification`. |
|
|
117
|
+
|
|
118
|
+
## P2-11 Release Candidate Artifact Verification And Remote Evidence Intake
|
|
119
|
+
|
|
120
|
+
Release-candidate audit evidence:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npm run typecheck
|
|
124
|
+
npm run lint
|
|
125
|
+
npm test
|
|
126
|
+
npm run build
|
|
127
|
+
npm run package:check
|
|
128
|
+
npm run dogfood
|
|
129
|
+
npm run prepublish:check
|
|
130
|
+
npm run release:candidate -- --out-dir release-candidate
|
|
131
|
+
npm run release:verify -- --dir release-candidate
|
|
132
|
+
npm pack --dry-run
|
|
133
|
+
npm publish --dry-run --ignore-scripts --tag alpha
|
|
134
|
+
node ./dist/cli/main.js conformance --mode real --agent all --json
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
P2-11 release-candidate semantics:
|
|
138
|
+
|
|
139
|
+
- `.github/workflows/ci.yml` keeps the Node.js 20/22/24 matrix for typecheck, lint, tests, build, production dependency audit, package boundary checks, and pack dry-run.
|
|
140
|
+
- The CI dogfood gate runs `npm run dogfood` once on Node.js 22 and does not pass `--allow-real-run`.
|
|
141
|
+
- `.github/workflows/release-candidate.yml` remains `workflow_dispatch` only. It runs `npm ci`, `npm run ci`, and `npm run dogfood`, then creates `npm pack --json` output, runs `npm run release:verify`, and uploads the tarball, pack metadata, package file list, and release verification artifacts.
|
|
142
|
+
- No workflow step runs `npm publish`, sets `NODE_AUTH_TOKEN`, or requires real Codex/Claude/OpenCode installation.
|
|
143
|
+
- [docs/release-report.md](./release-report.md) is the release-candidate evidence entrypoint for local commands, local generation, downloaded artifact verification, remote workflow expectations, package boundary, real CLI evidence boundaries, known risks, and non-goals.
|
|
144
|
+
- Remote GitHub Actions evidence must be manually triggered and reviewed; it is not treated as passed merely because workflow files exist locally.
|
|
145
|
+
|
|
146
|
+
## P2-9 Release Candidate API And Consumer Compatibility Evidence
|
|
147
|
+
|
|
148
|
+
Release-candidate gates:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
npm run typecheck
|
|
152
|
+
npm run lint
|
|
153
|
+
npm test
|
|
154
|
+
npm run build
|
|
155
|
+
npm run ci
|
|
156
|
+
npm run dogfood
|
|
157
|
+
npm run prepublish:check
|
|
158
|
+
npm run package:check
|
|
159
|
+
node ./dist/cli/main.js conformance --mode real --agent all --json
|
|
160
|
+
npm pack --dry-run
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
P2-9 release-candidate semantics:
|
|
164
|
+
|
|
165
|
+
- Package root value exports remain limited to `createAgentRuntime`; root type exports come from documented public types and facade/adapter-authoring types, not storage/parser/store internals.
|
|
166
|
+
- The published tarball may include internal `dist/` implementation files, but only the package root API is documented as stable for consumers.
|
|
167
|
+
- The package install smoke uses `npm install <tarball> --no-save --ignore-scripts --no-audit --no-fund`.
|
|
168
|
+
- The consumer TypeScript smoke imports `createAgentRuntime`, `RunRequest`, `CreateGoalRequest`, and other public types from the package root, then runs `tsc --noEmit` from the temporary project.
|
|
169
|
+
- The installed-package fake library smoke executes run, goal, replay, diagnostics export, and store health through a consumer-supplied fake adapter; it does not require Codex, Claude, OpenCode, network, or real credentials.
|
|
170
|
+
- CLI JSON success contracts are covered for `agents --json`, `doctor --json`, `conformance --mode fixtures --json`, `conformance --mode fake --json`, `store-health --json`, and `store-repair --dry-run --json`.
|
|
171
|
+
- CLI JSON error contracts are covered for missing required parameters and mutually exclusive `store-repair --apply --dry-run`; errors return exit code `1`, a short parseable JSON object, and redacted messages.
|
|
172
|
+
- `.github/workflows/ci.yml` keeps the Node.js 20/22/24 matrix for typecheck, lint, tests, build, production dependency audit, package boundary checks, and pack dry-run.
|
|
173
|
+
- The official test script is `vitest run --reporter=verbose --no-file-parallelism --testTimeout 30000`, keeping full-suite progress visible while leaving slower installed-package gates to single-Node release checks.
|
|
174
|
+
- The CI dogfood gate runs `npm run dogfood` once on Node.js 22. It does not pass `--allow-real-run`, so real mode is limited to executable/version/auth/model/profile certification and runnable adapters report `real_run_skipped`.
|
|
175
|
+
- `.github/workflows/release-candidate.yml` is `workflow_dispatch` only. It runs `npm ci`, `npm run ci`, and `npm run dogfood`, then creates `npm pack --json` output and uploads the tarball, pack metadata, and package file list as artifacts.
|
|
176
|
+
- No workflow step runs `npm publish`, requests an npm token, or requires real Codex/Claude/OpenCode installation.
|
|
177
|
+
- `scripts/check-package-boundary.mjs` checks the pack dry-run file list and scans docs/examples/scripts for real token-like values, Bearer values, auth environment assignment values, and private user paths.
|
|
178
|
+
|
|
179
|
+
Historical local real-CLI detection/preflight evidence from `node ./dist/cli/main.js conformance --mode real --agent all --json` on 2026-06-20:
|
|
180
|
+
|
|
181
|
+
| Adapter | CLI version | Auth/model source | runClassification | skippedReason | Notes |
|
|
182
|
+
| --- | --- | --- | --- | --- | --- |
|
|
183
|
+
| Codex CLI | `codex-cli 0.142.0-alpha.1` | auth `unknown`; models `live` | `real_run_skipped` | `real_run_not_allowed` | Detection/profile passed; no real run launched because `--allow-real-run` was not supplied. Session and auth probe remain `needsVerification`. |
|
|
184
|
+
| Claude Code | `2.1.178 (Claude Code)` | auth `missing`; models `fallback` | `auth_missing` | `auth_missing` | Detection/profile passed; run skipped before launch because local auth is missing. `--session-id` and reasoning remain `needsVerification`. |
|
|
185
|
+
| OpenCode | `1.15.6` | auth `unknown`; models `live` | `real_run_skipped` | `real_run_not_allowed` | Detection/profile passed; no real run launched because `--allow-real-run` was not supplied. Extra dirs, session, and read-only/workspace-write flags remain `needsVerification`. |
|
|
186
|
+
|
|
187
|
+
## Summary
|
|
188
|
+
|
|
189
|
+
| Adapter | CLI path | CLI version tested | Detection | Run smoke | Goal smoke | Notes |
|
|
190
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
191
|
+
| Codex CLI | redacted local app path | `codex-cli 0.142.0-alpha.6` | Pass | Skipped in P3-1 default real conformance; prior opt-in Codex smoke evidence remains historical. | Not run in P3-1 | Uses `codex exec --json --skip-git-repo-check` with stdin prompt and `-C <cwd>`. Live model probe passed. P3-1 reports `real_run_skipped` without `--allow-real-run`; session and auth probe remain `needsVerification`. |
|
|
192
|
+
| Claude Code | redacted local app path | `2.1.178 (Claude Code)` | Pass with `auth_missing` diagnostic | Blocked by local auth | Not run in P2-9 | `claude auth status` returned auth missing in the local P2-9 certification. Conformance skips before launching Claude. |
|
|
193
|
+
| OpenCode | redacted local app path | `1.15.6` | Pass | Skipped in P3-1 default real conformance; prior opt-in OpenCode smoke evidence remains historical. | Not run in P3-1 | P3-1 reports `real_run_skipped` without `--allow-real-run` and live model source is available. Explicit read-only/workspace-write flags, extra dirs, and session remain unverified. |
|
|
194
|
+
|
|
195
|
+
## Verified Invocation Shapes
|
|
196
|
+
|
|
197
|
+
### Codex
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
codex exec --json --skip-git-repo-check -C <cwd>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Runtime notes:
|
|
204
|
+
|
|
205
|
+
- prompt transport: stdin text
|
|
206
|
+
- model flag: `--model <id>`
|
|
207
|
+
- workspace-write policy: `--sandbox workspace-write`
|
|
208
|
+
- extra dirs: repeated `--add-dir <path>`
|
|
209
|
+
- reasoning effort: `-c model_reasoning_effort="<effort>"`
|
|
210
|
+
- session/resume: not mapped; profile marks session support as `needsVerification`
|
|
211
|
+
- auth probe: no stable non-mutating auth probe is enabled; auth status is `unknown`
|
|
212
|
+
- model probe: `codex debug models`; parser keeps only model `slug`/`display_name` and ignores hidden models
|
|
213
|
+
- parser note: transient `Reconnecting... n/5` structured error frames are normalized to `status: reconnecting`; they are not fatal if the run later emits text/usage and exits `0`
|
|
214
|
+
- 2026-06-20 P2-9 local certification: executable/version/model preflight passed for `codex-cli 0.142.0-alpha.1`; no real run was launched because `--allow-real-run` was not supplied.
|
|
215
|
+
- Historical opt-in Codex real smoke evidence remains useful but is not the latest local status.
|
|
216
|
+
|
|
217
|
+
### Claude Code
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
claude -p --input-format stream-json --output-format stream-json --verbose
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Runtime notes:
|
|
224
|
+
|
|
225
|
+
- prompt transport: stdin JSONL
|
|
226
|
+
- model flag: `--model <id>`
|
|
227
|
+
- headless-auto policy: `--permission-mode bypassPermissions`
|
|
228
|
+
- auth probe: `claude auth status`
|
|
229
|
+
- capability probe: `claude -p --help`; current local output includes the tracked capability flags and produced no capability diagnostics
|
|
230
|
+
- model probe: no live model probe; fallback aliases are `default`, `sonnet`, `opus`, `haiku`
|
|
231
|
+
- `--resume` is the verified resume path in fixtures; `--session-id` is represented in the profile as `needsVerification` and is not emitted by `buildArgs()`
|
|
232
|
+
- 2026-06-20 P2-9 local certification: executable/version/auth preflight passed for `2.1.178 (Claude Code)`, but auth was `missing`; no real run was launched.
|
|
233
|
+
- DeepSeek or another Anthropic-compatible provider can be supplied through environment variables. Keep this as names and placeholders only; do not commit real token values, account-specific URLs, or private model aliases:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
export ANTHROPIC_BASE_URL=<anthropic-compatible-base-url>
|
|
237
|
+
export ANTHROPIC_MODEL=<model-name>
|
|
238
|
+
export ANTHROPIC_DEFAULT_OPUS_MODEL=<model-name>
|
|
239
|
+
export ANTHROPIC_DEFAULT_SONNET_MODEL=<model-name>
|
|
240
|
+
export ANTHROPIC_DEFAULT_HAIKU_MODEL=<model-name>
|
|
241
|
+
export CLAUDE_CODE_SUBAGENT_MODEL=<model-name>
|
|
242
|
+
export CLAUDE_CODE_EFFORT_LEVEL=<effort>
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Set the provider's documented Anthropic-compatible auth token environment variable outside committed docs and fixtures.
|
|
246
|
+
|
|
247
|
+
### OpenCode
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
opencode run --format json --dir <cwd>
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Runtime notes:
|
|
254
|
+
|
|
255
|
+
- prompt transport: stdin text
|
|
256
|
+
- binary candidates: `opencode-cli`, then `opencode`
|
|
257
|
+
- model flag: `-m <id>`
|
|
258
|
+
- headless-auto policy: `--dangerously-skip-permissions`
|
|
259
|
+
- model probe: `opencode models`
|
|
260
|
+
- read-only and workspace-write are left to OpenCode defaults until stable permission flags are verified
|
|
261
|
+
- extra dirs and session/resume are not mapped; profile marks them as `needsVerification`
|
|
262
|
+
- 2026-06-20 P2-9 local certification: executable/version/model preflight passed for `opencode` 1.15.6; no real run was launched because `--allow-real-run` was not supplied.
|
|
263
|
+
- Historical opt-in OpenCode real smoke evidence verifies stdin prompt support for local `opencode` 1.15.6. Keep prompt out of argv; do not switch to positional argv prompt. The runtime requested read-only behavior, but OpenCode explicit read-only/workspace-write flags remain unverified.
|
|
264
|
+
|
|
265
|
+
## Smoke Commands
|
|
266
|
+
|
|
267
|
+
Build the package first:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
npm ci
|
|
271
|
+
npm run build
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Detect installed agents:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
node ./dist/cli/main.js agents --json
|
|
278
|
+
node ./dist/cli/main.js doctor --json
|
|
279
|
+
node ./dist/cli/main.js smoke --mode detection --json
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Production conformance gates without launching real agent CLIs:
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
node ./dist/cli/main.js conformance --mode fixtures --json
|
|
286
|
+
node ./dist/cli/main.js conformance --mode fake --json
|
|
287
|
+
node ./dist/cli/main.js conformance --mode real --agent all --json
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Durable store query/replay smoke with fake or test-generated records:
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
node ./dist/cli/main.js runs --storage-dir .agent-runtime --json
|
|
294
|
+
node ./dist/cli/main.js run-status run_123 --storage-dir .agent-runtime --json
|
|
295
|
+
node ./dist/cli/main.js replay-run run_123 --storage-dir .agent-runtime --jsonl
|
|
296
|
+
node ./dist/cli/main.js goals --storage-dir .agent-runtime --json
|
|
297
|
+
node ./dist/cli/main.js goal-status goal_123 --storage-dir .agent-runtime --json
|
|
298
|
+
node ./dist/cli/main.js replay-goal goal_123 --storage-dir .agent-runtime --jsonl
|
|
299
|
+
node ./dist/cli/main.js store-health --storage-dir .agent-runtime --json
|
|
300
|
+
node ./dist/cli/main.js store-lock --storage-dir .agent-runtime --json
|
|
301
|
+
node ./dist/cli/main.js store-repair --storage-dir .agent-runtime --dry-run --json
|
|
302
|
+
node ./dist/cli/main.js store-repair --storage-dir .agent-runtime --apply --json
|
|
303
|
+
node ./dist/cli/main.js diagnostics run run_123 --storage-dir .agent-runtime --json
|
|
304
|
+
node ./dist/cli/main.js diagnostics goal goal_123 --storage-dir .agent-runtime --json --out diagnostics-goal_123.json
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
Optional real non-mutating run certification, only when the relevant local CLI auth is available. Real run execution is disabled unless `--allow-real-run` is present; without `--cwd`, it uses an isolated temp directory and runtime-requested `read-only` behavior:
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
node ./dist/cli/main.js conformance \
|
|
311
|
+
--mode real \
|
|
312
|
+
--agent codex \
|
|
313
|
+
--allow-real-run \
|
|
314
|
+
--expect-text "agent-runtime codex smoke ok" \
|
|
315
|
+
--json \
|
|
316
|
+
--timeout-ms 30000
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
`conformance --mode real` without `--allow-real-run` performs real local detection/profile certification and reports `runClassification: "real_run_skipped"` for runnable adapters. With `--allow-real-run`, it also executes the selected real CLI run and validates expected text plus cwd mutation evidence. It returns `schemaVersion: "agent-runtime.conformance.v1"` plus stable per-adapter fields: `adapter`, `version`, `resolvedExecutable`, `auth`, `modelsSource`, `capabilities`, `argvProfile`, `promptTransport`, `parserMode`, `runClassification`, `expectedTextMatched`, `observedTextTail`, `cwdMutationChecked`, `cwdMutated`, `diagnosticsCount`, `diagnostics`, `skippedReason`, and `failureReason`. `--agent all` keeps one adapter fail/skip isolated in the summary. Use `smoke --mode real --allow-real-run --expect-text <safe_text>` for focused opt-in real-run evidence.
|
|
320
|
+
|
|
321
|
+
P2-4 drift diagnostics:
|
|
322
|
+
|
|
323
|
+
- `unsupported_flag`: a tracked capability flag is missing from help output or a real run reports an unsupported flag/argument.
|
|
324
|
+
- `needs_verification`: version/help shape is outside the current profile; do not infer new flags from it.
|
|
325
|
+
- parser/stream failures: structured stream errors become run diagnostics and are counted in conformance.
|
|
326
|
+
|
|
327
|
+
All conformance and real-smoke output is redacted recursively. Do not commit real username paths, tokens, Bearer values, auth-token env assignments, full prompts, raw CLI output, final run records from real smoke, or unredacted observed tails.
|
|
328
|
+
|
|
329
|
+
Equivalent lower-level run command:
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
tmp="$(mktemp -d /tmp/agent-runtime-run-smoke.XXXXXX)"
|
|
333
|
+
node ./dist/cli/main.js run \
|
|
334
|
+
--agent codex \
|
|
335
|
+
--cwd "$tmp" \
|
|
336
|
+
--permission read-only \
|
|
337
|
+
--timeout-ms 30000 \
|
|
338
|
+
--stream jsonl \
|
|
339
|
+
--diagnostics \
|
|
340
|
+
--prompt "Reply exactly: agent-runtime codex smoke ok. Do not edit files."
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Preferred OpenCode real smoke:
|
|
344
|
+
|
|
345
|
+
```bash
|
|
346
|
+
node ./dist/cli/main.js smoke \
|
|
347
|
+
--mode real \
|
|
348
|
+
--agent opencode \
|
|
349
|
+
--allow-real-run \
|
|
350
|
+
--json \
|
|
351
|
+
--diagnostics \
|
|
352
|
+
--timeout-ms 30000
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Equivalent OpenCode smoke:
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
tmp="$(mktemp -d /tmp/agent-runtime-run-smoke.XXXXXX)"
|
|
359
|
+
node ./dist/cli/main.js run \
|
|
360
|
+
--agent opencode \
|
|
361
|
+
--cwd "$tmp" \
|
|
362
|
+
--permission read-only \
|
|
363
|
+
--timeout-ms 30000 \
|
|
364
|
+
--stream jsonl \
|
|
365
|
+
--diagnostics \
|
|
366
|
+
--prompt "Reply exactly: agent-runtime opencode smoke ok. Do not edit files."
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
Run smoke in an isolated temp directory:
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
tmp="$(mktemp -d /tmp/agent-runtime-smoke.XXXXXX)"
|
|
373
|
+
node ./dist/cli/main.js run \
|
|
374
|
+
--agent codex \
|
|
375
|
+
--cwd "$tmp" \
|
|
376
|
+
--permission workspace-write \
|
|
377
|
+
--stream jsonl \
|
|
378
|
+
--prompt "Create smoke.txt containing exactly: agent-runtime smoke ok"
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
Goal smoke:
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
tmp="$(mktemp -d /tmp/agent-runtime-goal.XXXXXX)"
|
|
385
|
+
node ./dist/cli/main.js goal \
|
|
386
|
+
--agent codex \
|
|
387
|
+
--cwd "$tmp" \
|
|
388
|
+
--permission workspace-write \
|
|
389
|
+
--stream jsonl \
|
|
390
|
+
--prompt "Create one file named goal-smoke.txt containing exactly: agent-runtime goal smoke ok"
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
## Known MVP Gaps
|
|
394
|
+
|
|
395
|
+
- Durable run/goal replay storage is opt-in via `storageDir`; default runtime behavior remains memory-only.
|
|
396
|
+
- Durable `storageDir` writer mode uses a local single-writer lease. It prevents accidental same-machine multi-writer corruption but is not a distributed lock, daemon, WAL, or transactional database.
|
|
397
|
+
- Read-only CLI inspection paths do not acquire the writer lease and are intended to work while another live owner is active.
|
|
398
|
+
- P1-6 verifies the real smoke harness against stronger fake CLI contract tests and local real Codex/OpenCode smoke runs with expected text matched and no cwd mutation. It does not prove that a specific real CLI can complete authenticated write tasks in the local environment, nor that OpenCode exposes a verified explicit read-only flag.
|
|
399
|
+
- JSONL append is still a simple append-only file and not segmented. Default durability is `relaxed`; callers can request `storage.durability: "fsync"` for best-effort fdatasync/fsync after manifest writes and event appends, but there is no WAL or group commit.
|
|
400
|
+
- There is still no long-lived daemon, database, WAL, segment compaction, automatic manifest reconciliation, or live process resume. `store-repair --apply` is explicit, local JSONL-only repair with backups and live-owner refusal.
|
|
401
|
+
- Package root is intentionally small for pre-alpha: runtime facade and public types are exported; built-in adapter values and parser/detection helpers remain internal implementation details.
|
|
402
|
+
- CLI event JSONL is versioned as `agent-runtime.event.v1` for both live stream and replay commands; library replay APIs continue to return legacy `ReplayEvent<T>` records.
|
|
403
|
+
- CLI remains a thin local smoke/scripting wrapper over the library API, not a daemon or long-lived service.
|
|
404
|
+
- Real CLI auth and model availability depend on the user's local installation.
|
|
405
|
+
- Runtime-side validation executes shell commands supplied by task graphs; callers should only use it with trusted objectives or trusted planners.
|
|
406
|
+
- Parser coverage is fixture-based plus prior local smoke captures; more real stream captures should be added before a stable release.
|
|
407
|
+
- Historical P0-4 Codex smoke showed reconnect/timeout behavior; parser fixtures and timeout diagnostics preserve that coverage.
|
|
408
|
+
- Historical P0-4 OpenCode smoke timed out with zero parsed events, but P1-5 local `opencode` 1.15.6 real smoke passed and verifies stdin prompt support for this version.
|
|
409
|
+
- Claude Code run/goal smoke is blocked by local auth until `claude auth status` reports a logged-in account or a supported Anthropic-compatible provider env is supplied.
|
|
410
|
+
|
|
411
|
+
## P2-4 Real CLI Compatibility Certification Evidence
|
|
412
|
+
|
|
413
|
+
Commands verified in this stage:
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
npm test
|
|
417
|
+
npm run typecheck
|
|
418
|
+
npm run lint
|
|
419
|
+
npm run build
|
|
420
|
+
npm run ci
|
|
421
|
+
node ./dist/cli/main.js conformance --mode fixtures --json
|
|
422
|
+
node ./dist/cli/main.js conformance --mode fake --json
|
|
423
|
+
node ./dist/cli/main.js conformance --mode real --agent all --json
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
Covered behavior:
|
|
427
|
+
|
|
428
|
+
- `fixtures`, `fake`, and `real local observed` conformance evidence are distinct and labeled by `mode`;
|
|
429
|
+
- current P3-1 local `real --agent all --json` observed: Codex `codex-cli 0.142.0-alpha.6` detected with live models and `real_run_skipped`; Claude `2.1.178` detected with `auth_missing`; OpenCode `1.15.6` detected with live models and `real_run_skipped`;
|
|
430
|
+
- historical opt-in `real --agent codex --allow-real-run --expect-text "agent-runtime codex smoke ok" --json` observed: `success`, expected text matched, cwd not mutated, diagnostics count 0; P3-1 did not rerun an authenticated real agent run;
|
|
431
|
+
- `real --agent all --json` performs detection/profile certification without launching real runs unless `--allow-real-run` is explicit;
|
|
432
|
+
- per-adapter summaries include resolved executable, auth state, models source, capabilities, argv profile, prompt transport, parser mode, run classification, diagnostics count, compact diagnostics, and skip/fail reason;
|
|
433
|
+
- one adapter being unavailable, auth-missing, unsupported, or failed does not prevent other adapter summaries from being reported;
|
|
434
|
+
- tracked flag drift reports `unsupported_flag`; unfamiliar version shape reports `needs_verification`; stream/parser errors become actionable diagnostics;
|
|
435
|
+
- `--expect-text` failures include only a redacted/truncated `observedTextTail`;
|
|
436
|
+
- conformance JSON redacts token-like values, Bearer values, auth env assignments, prompts, private absolute paths, and cwd mutation secret-looking filenames;
|
|
437
|
+
- `.reference/`, tests, fixtures, and secret-looking values remain excluded from npm pack.
|
|
438
|
+
|
|
439
|
+
## P2-5 Release Candidate Dogfood Evidence
|
|
440
|
+
|
|
441
|
+
Release-candidate gate:
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
npm run typecheck
|
|
445
|
+
npm run lint
|
|
446
|
+
npm test
|
|
447
|
+
npm run build
|
|
448
|
+
npm run ci
|
|
449
|
+
npm run dogfood
|
|
450
|
+
node ./dist/cli/main.js conformance --mode fixtures --json
|
|
451
|
+
node ./dist/cli/main.js conformance --mode fake --json
|
|
452
|
+
node ./dist/cli/main.js conformance --mode real --agent all --json
|
|
453
|
+
npm pack --dry-run
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
Dogfood coverage:
|
|
457
|
+
|
|
458
|
+
- `npm run dogfood` rebuilds before running CLI gates;
|
|
459
|
+
- fixtures conformance remains fully offline;
|
|
460
|
+
- fake conformance runs temporary fake CLIs through real adapter argv/stdin/parser paths;
|
|
461
|
+
- real conformance with `--agent all` performs detection/profile certification only because `--allow-real-run` is not supplied;
|
|
462
|
+
- `smoke --mode fixtures`, `agents --json`, and `doctor --json` remain runnable local checks;
|
|
463
|
+
- `examples/library-run.js` demonstrates `detect -> run -> replay/diagnostics/store health` using a fake Codex CLI;
|
|
464
|
+
- `examples/library-goal.js` demonstrates `createGoal -> task graph -> final result/replay/diagnostics` using a fake Codex CLI;
|
|
465
|
+
- package install smoke verifies `import('agent-cli-runtime')`, installed CLI fixtures conformance, installed fake conformance, and installed fixtures smoke from a packed tarball;
|
|
466
|
+
- package dry-run includes docs, examples, and `scripts/dogfood.mjs`, and excludes `.reference/`, `tests/`, test fixtures, raw real CLI output, private paths, and secrets.
|
|
467
|
+
|
|
468
|
+
Known compatibility/readiness risks:
|
|
469
|
+
|
|
470
|
+
- status-only real smoke exit `0` is intentionally classified as `unexpected_output` when no `text_delta` is observed;
|
|
471
|
+
- real conformance preflight can report unavailable/auth-missing on a specific machine because executable, auth, network, or proxy state is local;
|
|
472
|
+
- optional authenticated real runs must be performed manually with `--allow-real-run`;
|
|
473
|
+
- OpenCode explicit read-only/workspace-write flags, extra dirs, and session/resume remain unverified.
|
|
474
|
+
|
|
475
|
+
## P2-2 Local Supervisor Lease Evidence
|
|
476
|
+
|
|
477
|
+
Commands verified in this stage:
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
npm test
|
|
481
|
+
npm run typecheck
|
|
482
|
+
npm run lint
|
|
483
|
+
npm run build
|
|
484
|
+
npm run ci
|
|
485
|
+
node ./dist/cli/main.js conformance --mode fixtures --json
|
|
486
|
+
node ./dist/cli/main.js conformance --mode fake --json
|
|
487
|
+
node ./dist/cli/main.js store-health --storage-dir <temp-dir> --json
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
Covered behavior:
|
|
491
|
+
|
|
492
|
+
- two writer runtimes for the same `storageDir` conflict with a concise actionable error;
|
|
493
|
+
- stale lock takeover records a redacted storage diagnostic;
|
|
494
|
+
- read-only store inspection commands do not require the writer lock;
|
|
495
|
+
- live-owner active records are not interrupted by another writer attempt;
|
|
496
|
+
- stale-owner active runs/goals become interrupted, with pending/running goal tasks canceled;
|
|
497
|
+
- active run manifests receive heartbeat owner updates while the run is active;
|
|
498
|
+
- shutdown marks the lease closed;
|
|
499
|
+
- `store-health` reports lock/lease and active owner status;
|
|
500
|
+
- diagnostics `supervisorSummary` includes redacted owner/lease status;
|
|
501
|
+
- lock diagnostics and package dry-run remain secret/path safe.
|
|
502
|
+
|
|
503
|
+
## P2-3 Event Contract Evidence
|
|
504
|
+
|
|
505
|
+
Commands verified in this stage:
|
|
506
|
+
|
|
507
|
+
```bash
|
|
508
|
+
npm test
|
|
509
|
+
npm run typecheck
|
|
510
|
+
npm run lint
|
|
511
|
+
npm run build
|
|
512
|
+
npm run ci
|
|
513
|
+
node ./dist/cli/main.js conformance --mode fixtures --json
|
|
514
|
+
node ./dist/cli/main.js conformance --mode fake --json
|
|
515
|
+
node ./dist/cli/main.js smoke --mode fixtures --json
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
Covered behavior:
|
|
519
|
+
|
|
520
|
+
- `run --stream jsonl` and `replay-run --jsonl` emit `schemaVersion: "agent-runtime.event.v1"` envelopes with `scope.kind: "run"`;
|
|
521
|
+
- `goal --stream jsonl` and `replay-goal --jsonl` emit the same envelope shape with `scope.kind: "goal"`;
|
|
522
|
+
- terminal envelopes use stable `terminal.result` and `terminal.reason` values for success, timeout, canceled, interrupted, validation failure, execution failure, unavailable, auth missing, and task graph invalid cases;
|
|
523
|
+
- `runtime.replayRunEvents()` and `runtime.replayGoalEvents()` keep the old `ReplayEvent<T>` return shape;
|
|
524
|
+
- diagnostics bundles remain `agent-runtime.diagnostics.v1` and redact storage diagnostics, supervisor summaries, adapter summaries, and attempt evidence;
|
|
525
|
+
- conformance JSON includes `schemaVersion: "agent-runtime.conformance.v1"` and stable per-adapter summary fields;
|
|
526
|
+
- store health JSON includes `schemaVersion: "agent-runtime.storeHealth.v1"`, store repair remains `agent-runtime.storeRepair.v1`, and CLI JSON errors use `agent-runtime.cliError.v1`;
|
|
527
|
+
- package root value exports remain limited to `createAgentRuntime`;
|
|
528
|
+
- package dry-run excludes `.reference/`, tests, fixtures, and secret-looking values.
|
|
529
|
+
|
|
530
|
+
## P1-1 Durable Store Evidence
|
|
531
|
+
|
|
532
|
+
Commands verified in this stage:
|
|
533
|
+
|
|
534
|
+
```bash
|
|
535
|
+
npm test
|
|
536
|
+
npm run typecheck
|
|
537
|
+
npm run lint
|
|
538
|
+
npm run build
|
|
539
|
+
npm run ci
|
|
540
|
+
node ./dist/cli/main.js agents --json
|
|
541
|
+
node ./dist/cli/main.js doctor --json
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
Covered behavior:
|
|
545
|
+
|
|
546
|
+
- store directories are created automatically;
|
|
547
|
+
- terminal run and goal records are readable from a new runtime instance;
|
|
548
|
+
- `replayRunEvents()` / `replayGoalEvents()` return stable replay envelopes with `id`, `sequence`, `timestamp`, and `runId` / `goalId`;
|
|
549
|
+
- CLI `runs` / `goals` / `run-status` / `goal-status` / `replay-run --jsonl` / `replay-goal --jsonl` can read records from a previous process;
|
|
550
|
+
- corrupt manifests and JSONL records are isolated to the affected record and surfaced as diagnostics;
|
|
551
|
+
- stored diagnostics and validation evidence are redacted before writing to disk;
|
|
552
|
+
- `npm pack --dry-run` excludes `.reference/` and test fixtures.
|
|
553
|
+
|
|
554
|
+
## P1-2 Goal Scheduler Evidence
|
|
555
|
+
|
|
556
|
+
Commands verified in this stage:
|
|
557
|
+
|
|
558
|
+
```bash
|
|
559
|
+
npm test
|
|
560
|
+
npm run typecheck
|
|
561
|
+
npm run lint
|
|
562
|
+
npm run build
|
|
563
|
+
npm run ci
|
|
564
|
+
node ./dist/cli/main.js agents --json
|
|
565
|
+
node ./dist/cli/main.js doctor --json
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
Covered behavior:
|
|
569
|
+
|
|
570
|
+
- independent ready tasks start concurrently when `maxConcurrentTasks=2`;
|
|
571
|
+
- `maxConcurrentTasks=1` preserves stable serial order;
|
|
572
|
+
- dependent tasks do not start before dependencies finish successfully;
|
|
573
|
+
- failed upstream tasks block dependents;
|
|
574
|
+
- retryable failures produce multiple attempts and can eventually succeed;
|
|
575
|
+
- non-retryable failures do not retry;
|
|
576
|
+
- `cancelGoal()` cancels running task runs and queued ready tasks consistently;
|
|
577
|
+
- `shutdown()` leaves active goal/run lists empty and durable reload preserves terminal state;
|
|
578
|
+
- replay includes stable `task_attempt_started` / `task_attempt_finished` events with `id`, `sequence`, `timestamp`, and `goalId`;
|
|
579
|
+
- corrupt/partial JSONL logs replay the valid prefix and surface `AGENT_EVENT_LOG_CORRUPT`;
|
|
580
|
+
- package root value exports remain limited to `createAgentRuntime`;
|
|
581
|
+
- `npm pack --dry-run` excludes `.reference/` and test fixtures/secrets.
|
|
582
|
+
|
|
583
|
+
## P1-3 Planner And CLI Conformance Evidence
|
|
584
|
+
|
|
585
|
+
Commands verified in this stage:
|
|
586
|
+
|
|
587
|
+
```bash
|
|
588
|
+
npm test
|
|
589
|
+
npm run typecheck
|
|
590
|
+
npm run lint
|
|
591
|
+
npm run build
|
|
592
|
+
npm run ci
|
|
593
|
+
node ./dist/cli/main.js agents --json
|
|
594
|
+
node ./dist/cli/main.js doctor --json
|
|
595
|
+
node ./dist/cli/main.js smoke --mode detection --json
|
|
596
|
+
node ./dist/cli/main.js smoke --mode fixtures --json
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
Covered behavior:
|
|
600
|
+
|
|
601
|
+
- task graph validation rejects invalid `dependencies`, `allowedFiles`, `validationCommands`, `agentId`, and task-level `retryPolicy` field types with task id and field name in the error;
|
|
602
|
+
- planner Markdown fenced JSON and surrounding prose with one JSON object are accepted;
|
|
603
|
+
- multiple JSON objects and malformed JSON fail clearly without swallowing unrelated text or emitting oversized raw planner output;
|
|
604
|
+
- planner parse/validation failure emits `scheduler_error` with `AGENT_TASK_GRAPH_INVALID`, writes goal diagnostics, and finishes the goal as failed without task attempts;
|
|
605
|
+
- Codex / Claude / OpenCode parser conformance fixtures cover normal output, structured error, usage, tool/file event, partial line, and unknown event;
|
|
606
|
+
- Codex / Claude / OpenCode `buildArgs` tests confirm long prompts stay out of argv while cwd/model/permission/session/extra dir mappings remain explicit;
|
|
607
|
+
- `smoke --mode detection` and `smoke --mode fixtures` are offline-safe; P3-6 changed `smoke --mode real` so it performs detection/profile certification without `--allow-real-run` and launches real CLIs only when `--allow-real-run` is explicit;
|
|
608
|
+
- Claude auth missing remains an expected `doctor` diagnostic and does not fail the overall doctor result when the adapter itself is available;
|
|
609
|
+
- package root value exports remain limited to `createAgentRuntime`;
|
|
610
|
+
- `npm pack --dry-run` excludes `.reference/`, test fixtures/secrets, and real smoke output.
|
|
611
|
+
|
|
612
|
+
## P1-4 Store Health And Diagnostics Bundle Evidence
|
|
613
|
+
|
|
614
|
+
Commands verified in this stage:
|
|
615
|
+
|
|
616
|
+
```bash
|
|
617
|
+
npm test
|
|
618
|
+
npm run typecheck
|
|
619
|
+
npm run lint
|
|
620
|
+
npm run build
|
|
621
|
+
npm run ci
|
|
622
|
+
node ./dist/cli/main.js store-health --storage-dir <tmp> --json
|
|
623
|
+
node ./dist/cli/main.js smoke --mode fixtures --json
|
|
624
|
+
node ./dist/cli/main.js doctor --json
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
Covered behavior:
|
|
628
|
+
|
|
629
|
+
- empty store health returns `ok: true`;
|
|
630
|
+
- corrupt run and goal manifests do not crash runtime load and remain visible to health scan;
|
|
631
|
+
- corrupt/partial run JSONL keeps the replayable prefix and reports file, line, reason, and retained event count without storing the raw bad line;
|
|
632
|
+
- terminal manifest missing terminal event and terminal event with non-terminal manifest are reported as warnings, not auto-repaired;
|
|
633
|
+
- run diagnostics bundle contains redacted manifest, event summary, diagnostics, and environment-safe adapter summary;
|
|
634
|
+
- goal diagnostics bundle includes redacted task attempt evidence;
|
|
635
|
+
- `diagnostics ... --out <file>` writes a valid redacted bundle via atomic temp-file-and-rename;
|
|
636
|
+
- health and bundle output redact token-looking values, Bearer values, auth-token assignments, and absolute private paths;
|
|
637
|
+
- package root value exports remain limited to `createAgentRuntime`;
|
|
638
|
+
- `npm pack --dry-run` excludes `.reference/`, test fixtures/secrets, and real smoke output.
|
|
639
|
+
|
|
640
|
+
## P1-5 Real Smoke And Profile Evidence
|
|
641
|
+
|
|
642
|
+
Commands verified in this stage:
|
|
643
|
+
|
|
644
|
+
```bash
|
|
645
|
+
npm test -- tests/adapters-and-parsers.test.ts tests/run-scheduler.test.ts tests/contract.test.ts
|
|
646
|
+
npm run build
|
|
647
|
+
node ./dist/cli/main.js smoke --mode fixtures --json
|
|
648
|
+
node ./dist/cli/main.js smoke --mode detection --json
|
|
649
|
+
node ./dist/cli/main.js doctor --json
|
|
650
|
+
node ./dist/cli/main.js smoke --mode real --agent codex --allow-real-run --expect-text "agent-runtime codex smoke ok" --json --diagnostics --timeout-ms 30000
|
|
651
|
+
node ./dist/cli/main.js smoke --mode real --agent opencode --allow-real-run --expect-text "agent-runtime opencode smoke ok" --json --diagnostics --timeout-ms 30000
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
Observed local results on 2026-06-17:
|
|
655
|
+
|
|
656
|
+
- Codex: available, `codex-cli 0.140.0-alpha.19`, live model source, auth status `unknown`, read-only real smoke `runClassification: "success"` in isolated temp cwd.
|
|
657
|
+
- Claude Code: available, `2.1.178 (Claude Code)`, auth status `missing`; real run intentionally skipped by preflight until local auth is available.
|
|
658
|
+
- OpenCode: available through fallback binary `opencode`, version `1.15.6`, live model source, real smoke `runClassification: "success"` in isolated temp cwd with runtime-requested read-only behavior; explicit read-only flag remains unverified.
|
|
659
|
+
|
|
660
|
+
Covered behavior:
|
|
661
|
+
|
|
662
|
+
- adapter profiles expose structured executable candidates, prompt transport mode, stream mode, known flags, and `needsVerification` flags;
|
|
663
|
+
- `buildArgs()` keeps long prompts out of argv and no longer guesses unverified Claude `--session-id`;
|
|
664
|
+
- P3-6 supersedes the older refusal behavior: real smoke without `--allow-real-run` now emits a redacted preflight summary and does not launch a real run;
|
|
665
|
+
- real smoke supports `--prompt-file`, `--cwd`, `--timeout-ms`, `--storage-dir`, `--json`, `--stream jsonl`, and `--diagnostics`;
|
|
666
|
+
- auth missing and unavailable executable are classified before launch;
|
|
667
|
+
- unsupported flag, timeout, and no-output runs include sanitized argv/profile diagnostics with stdout/stderr tails and actionable hints;
|
|
668
|
+
- diagnostics bundle adapter summary exposes prompt transport, stream format, parsed event count, sanitized argv, and hints without raw output or private paths.
|
|
669
|
+
|
|
670
|
+
## P1-6 Real Smoke Evidence Hardening
|
|
671
|
+
|
|
672
|
+
Commands verified in this stage:
|
|
673
|
+
|
|
674
|
+
```bash
|
|
675
|
+
node ./dist/cli/main.js smoke --mode real --agent codex --allow-real-run --expect-text "agent-runtime codex smoke ok" --json --diagnostics --timeout-ms 30000
|
|
676
|
+
node ./dist/cli/main.js smoke --mode real --agent opencode --allow-real-run --expect-text "agent-runtime opencode smoke ok" --json --diagnostics --timeout-ms 30000
|
|
677
|
+
node ./dist/cli/main.js smoke --mode real --agent claude --allow-real-run --expect-text "agent-runtime claude smoke ok" --json --diagnostics --timeout-ms 30000
|
|
678
|
+
npm run typecheck
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
Covered behavior:
|
|
682
|
+
|
|
683
|
+
- default real smoke expects `agent-runtime <agent> smoke ok` in aggregated `text_delta`;
|
|
684
|
+
- status-only exit `0` and wrong text classify as `unexpected_output`;
|
|
685
|
+
- default isolated cwd mutation classifies as `cwd_mutated`;
|
|
686
|
+
- P3-6 requires expected text for success; `--prompt-file` without `--expect-text` still keeps prompt content out of argv but classifies the run as `unexpected_output`;
|
|
687
|
+
- `--prompt-file --expect-text ...` enforces the override;
|
|
688
|
+
- `observedTextTail`, expected text, cwd, diagnostics, and mutation samples are redacted and observed text is truncated.
|
|
689
|
+
- local Codex and OpenCode real smoke passed with `runClassification: "success"`, `expectedTextMatched: true`, `cwdMutationChecked: true`, and `cwdMutated: false`;
|
|
690
|
+
- local Claude real smoke preflight returned `runClassification: "auth_missing"` without launching a run.
|
|
691
|
+
|
|
692
|
+
## P1-7 Durable Store Hardening
|
|
693
|
+
|
|
694
|
+
Commands verified in this stage:
|
|
695
|
+
|
|
696
|
+
```bash
|
|
697
|
+
npm test
|
|
698
|
+
npm run typecheck
|
|
699
|
+
node ./dist/cli/main.js run --agent codex --permission read-only --timeout-ms 30000 --stream jsonl --diagnostics --json
|
|
700
|
+
node ./dist/cli/main.js run --agent opencode --permission read-only --timeout-ms 30000 --stream jsonl --diagnostics --json
|
|
701
|
+
npm run lint
|
|
702
|
+
npm run build
|
|
703
|
+
npm run ci
|
|
704
|
+
npm pack --dry-run
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
Store hardening and recovery verification:
|
|
708
|
+
|
|
709
|
+
```bash
|
|
710
|
+
node ./dist/cli/main.js runs --storage-dir .agent-runtime --json
|
|
711
|
+
node ./dist/cli/main.js run-status run_123 --storage-dir .agent-runtime --json
|
|
712
|
+
node ./dist/cli/main.js replay-run run_123 --storage-dir .agent-runtime --after 10 --jsonl
|
|
713
|
+
node ./dist/cli/main.js goals --storage-dir .agent-runtime --json
|
|
714
|
+
node ./dist/cli/main.js goal-status goal_123 --storage-dir .agent-runtime --json
|
|
715
|
+
node ./dist/cli/main.js replay-goal goal_123 --storage-dir .agent-runtime --after 10 --jsonl
|
|
716
|
+
node ./dist/cli/main.js store-health --storage-dir .agent-runtime --json
|
|
717
|
+
node ./dist/cli/main.js store-repair --storage-dir .agent-runtime --dry-run --json
|
|
718
|
+
node ./dist/cli/main.js store-repair --storage-dir .agent-runtime --apply --json
|
|
719
|
+
```
|
|
720
|
+
Covered behavior:
|
|
721
|
+
- `RuntimeOptions.storage.durability` keeps `storageDir` compatible and defaults to `relaxed`;
|
|
722
|
+
- `fsync` mode exercises fdatasync/fsync hooks for manifest atomic writes and JSONL appends, with persisted `AGENT_STORAGE_SYNC_FALLBACK` diagnostics visible through store health and diagnostics bundles when sync primitives fail;
|
|
723
|
+
- JSONL record boundary is one JSON replay envelope plus trailing newline;
|
|
724
|
+
- partial JSONL tails keep the valid prefix and report corrupt line count, partial tail detection, last good event id/sequence, redacted tail preview, and `truncate_partial_tail`;
|
|
725
|
+
- corrupt middle JSONL lines report health diagnostics while preserving later valid records for replay;
|
|
726
|
+
- `store-repair --dry-run --json` reports intended non-destructive actions and does not modify files;
|
|
727
|
+
- `store-repair --apply --json` holds the local store lease while writing, backs up original event logs through temp-file-and-rename, truncates partial tails or removes corrupt middle lines, preserves later valid replay events, refuses live owners, records redacted repair diagnostics, and is idempotent;
|
|
728
|
+
- interrupted running runs and interrupted planning/running goals reload as failed, update manifests, append diagnostic/terminal replay events, clear active lists, and appear in store health;
|
|
729
|
+
- health, repair dry-run, and diagnostics bundle output remain redacted;
|
|
730
|
+
- `npm pack --dry-run` remains covered by the public contract test and excludes `.reference/`, fixtures, and real smoke output.
|
|
731
|
+
|
|
732
|
+
## P2-1 Production Runtime Hardening
|
|
733
|
+
|
|
734
|
+
Commands verified in this stage:
|
|
735
|
+
|
|
736
|
+
```bash
|
|
737
|
+
npm test
|
|
738
|
+
npm run typecheck
|
|
739
|
+
npm run lint
|
|
740
|
+
npm run build
|
|
741
|
+
npm run ci
|
|
742
|
+
node ./dist/cli/main.js conformance --mode fixtures --json
|
|
743
|
+
node ./dist/cli/main.js conformance --mode fake --json
|
|
744
|
+
node ./dist/cli/main.js agents --json
|
|
745
|
+
node ./dist/cli/main.js doctor --json
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
Covered behavior:
|
|
749
|
+
|
|
750
|
+
- `conformance --mode fixtures` returns stable per-adapter summaries without launching CLIs;
|
|
751
|
+
- `conformance --mode fake` runs temporary fake CLIs through the real adapter argv/stdin/parser path;
|
|
752
|
+
- historical P2-3 `conformance --mode real` refused without `--allow-real-run`; P2-4 supersedes this with safe detection/profile certification and no real run launch unless `--allow-real-run` is explicit;
|
|
753
|
+
- `--agent all` preserves one adapter fail/skip alongside other adapter summaries;
|
|
754
|
+
- validation timeout evidence records classification, timeout, redacted env override, and replayable diagnostics export;
|
|
755
|
+
- diagnostics bundle includes `supervisorSummary` without raw env, prompt, token, or private path data;
|
|
756
|
+
- reload, cancel, and shutdown terminal events remain idempotent;
|
|
757
|
+
- parser fixtures cover warning/log/noise and corrupt lines without producing `text_delta`;
|
|
758
|
+
- package dry-run excludes `.reference/`, tests, private fixture paths, and secret-looking values;
|
|
759
|
+
- production scope and OpenDesign daemon-level gaps are documented in `docs/production-readiness.md`.
|
|
760
|
+
|
|
761
|
+
## P1-8 Release Candidate Hardening
|
|
762
|
+
|
|
763
|
+
Commands verified in this stage:
|
|
764
|
+
|
|
765
|
+
```bash
|
|
766
|
+
npm test
|
|
767
|
+
npm run typecheck
|
|
768
|
+
npm run lint
|
|
769
|
+
npm run build
|
|
770
|
+
npm run ci
|
|
771
|
+
npm pack --dry-run
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
Release-preflight workflow:
|
|
775
|
+
|
|
776
|
+
```bash
|
|
777
|
+
repo_root="${GITHUB_WORKSPACE:-$(pwd -P)}"
|
|
778
|
+
tmp_dir="$(mktemp -d /tmp/agent-runtime-release-XXXXXX)"
|
|
779
|
+
pushd "$tmp_dir"
|
|
780
|
+
pack_info="$(cd "$repo_root" && npm pack --json --ignore-scripts --pack-destination "$tmp_dir")"
|
|
781
|
+
package_file="$(printf '%s' "$pack_info" | node -e "const data = JSON.parse(require('node:fs').readFileSync(0, 'utf8')); process.stdout.write(data[0].filename);")"
|
|
782
|
+
npm init -y >/dev/null
|
|
783
|
+
npm install "$tmp_dir/$package_file" --no-save --ignore-scripts --no-audit --no-fund >/tmp/agent-runtime-release-smoke-install.log
|
|
784
|
+
node -e "(async()=>{ const m = await import('agent-cli-runtime'); if (typeof m.createAgentRuntime !== 'function') process.exit(1); console.log(typeof m.createAgentRuntime); })()"
|
|
785
|
+
node ./node_modules/.bin/agent-runtime agents --json > /tmp/agent-runtime-release-smoke-agents.json
|
|
786
|
+
node ./node_modules/.bin/agent-runtime doctor --json > /tmp/agent-runtime-release-smoke-doctor.json
|
|
787
|
+
node ./node_modules/.bin/agent-runtime smoke --mode fixtures --json > /tmp/agent-runtime-release-smoke-fixtures.json
|
|
788
|
+
popd
|
|
789
|
+
node -e "const fs = require('node:fs'); JSON.parse(fs.readFileSync('/tmp/agent-runtime-release-smoke-agents.json','utf8')); JSON.parse(fs.readFileSync('/tmp/agent-runtime-release-smoke-doctor.json','utf8')); JSON.parse(fs.readFileSync('/tmp/agent-runtime-release-smoke-fixtures.json','utf8'));"
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
Release-candidate notes:
|
|
793
|
+
|
|
794
|
+
- pre-alpha / developer preview scope:
|
|
795
|
+
- no stable API guarantee;
|
|
796
|
+
- no daemon;
|
|
797
|
+
- no WAL;
|
|
798
|
+
- no remote runtime.
|
|
799
|
+
- `CHANGELOG.md`, `SECURITY.md`, `CONTRIBUTING.md`, and `docs/release-checklist.md` are part of package boundary docs.
|
|
800
|
+
|
|
801
|
+
## P0-4 Detection Evidence
|
|
802
|
+
|
|
803
|
+
Commands run from this repository after `npm run build`:
|
|
804
|
+
|
|
805
|
+
```bash
|
|
806
|
+
node ./dist/cli/main.js agents --json
|
|
807
|
+
node ./dist/cli/main.js doctor --json
|
|
808
|
+
```
|
|
809
|
+
|
|
810
|
+
Observed results:
|
|
811
|
+
|
|
812
|
+
- Codex: available, live models source, auth status `unknown`, diagnostics empty.
|
|
813
|
+
- Claude Code: available, fallback models source, auth status `missing`, diagnostic code `auth_missing`.
|
|
814
|
+
- OpenCode: available via fallback binary `opencode`, live models source, auth status `unknown`, diagnostics empty.
|
|
815
|
+
|
|
816
|
+
Version, model, auth, and capability probe diagnostics are redacted before being returned by detection. Probe cwd is a neutral temp directory, not the caller project.
|
|
817
|
+
|
|
818
|
+
## P0-4 Run Smoke Evidence
|
|
819
|
+
|
|
820
|
+
Commands run from this repository after `npm run build`:
|
|
821
|
+
|
|
822
|
+
```bash
|
|
823
|
+
node ./dist/cli/main.js run --agent codex --permission read-only --timeout-ms 30000 --stream jsonl --diagnostics --cwd "$tmp" --prompt "Reply exactly: agent-runtime codex smoke ok. Do not edit files."
|
|
824
|
+
node ./dist/cli/main.js run --agent opencode --permission read-only --timeout-ms 30000 --stream jsonl --diagnostics --cwd "$tmp" --prompt "Reply exactly: agent-runtime opencode smoke ok. Do not edit files."
|
|
825
|
+
claude auth status
|
|
826
|
+
```
|
|
827
|
+
|
|
828
|
+
Observed results:
|
|
829
|
+
|
|
830
|
+
- Codex: latest run timed out after 30s with `parsedEventCount: 2` (`thread.started`, `turn.started`), sanitized argv `["exec","--json","--skip-git-repo-check","--sandbox","read-only","-C","<cwd>"]`, and startup diagnostics rather than a prompt transport mismatch. A preceding run emitted the expected final text and usage but was previously misclassified because transient reconnect frames were treated as fatal; this is fixed by the parser fixture.
|
|
831
|
+
- OpenCode: timed out after 30s with `parsedEventCount: 0`, sanitized argv `["run","--format","json","--dir","<cwd>"]`, exitCode `0` after timeout, and hints for interactive/model/auth wait or unsupported stdin profile.
|
|
832
|
+
- Claude Code: `claude auth status` returned `loggedIn:false`, `authMethod:none`, `apiProvider:firstParty`; run smoke remains auth-blocked.
|