opencode-agent-orchestration-kit 1.0.42 → 1.0.44
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 +12 -5
- package/docker/open-design/data/app.sqlite +0 -0
- package/docker/open-design/data/app.sqlite-shm +0 -0
- package/docker/open-design/data/app.sqlite-wal +0 -0
- package/docker/open-design/opencode-auth/log/2026-05-02T105802.log +17 -0
- package/docker/open-design/opencode-auth/log/2026-05-04T102127.log +16 -0
- package/docker/open-design/opencode-auth/opencode.db +0 -0
- package/docker/open-design/opencode-auth/opencode.db-shm +0 -0
- package/docker/open-design/opencode-auth/opencode.db-wal +0 -0
- package/docs/compatibility.md +13 -1
- package/docs/installation.md +5 -0
- package/docs/models.md +1 -1
- package/docs/releases/v1.0.28.md +1 -2
- package/docs/releases/v1.0.29.md +1 -2
- package/docs/releases/v1.0.43.md +67 -0
- package/docs/releases/v1.0.44.md +67 -0
- package/docs/superpowers/specs/2026-07-20-safe-installation-lifecycle-design.md +9 -5
- package/opencode/agents/developer.md +8 -0
- package/opencode/agents/lead.md +51 -21
- package/opencode/agents/researcher.md +14 -0
- package/opencode/agents/review_coordinator.md +2 -2
- package/opencode/agents/reviewer.md +22 -0
- package/opencode/agents/specifier.md +8 -0
- package/opencode/commands/review-orchestrated.md +1 -1
- package/opencode/docs/ai/evolution/benchmarks/replay-fixtures-red.jsonl +2 -0
- package/opencode/docs/ai/evolution/benchmarks/router-scenarios-red.jsonl +2 -0
- package/opencode/docs/ai/harness/agents.md +53 -2
- package/opencode/docs/ai/harness/orchestrated-review.md +11 -3
- package/opencode/docs/ai/harness/playbooks/lead-ahe-flow.md +43 -0
- package/opencode/package-lock.json +30 -27
- package/opencode/scripts/check-harness.mjs +28 -4
- package/opencode/scripts/check-harness.test.mjs +74 -0
- package/opencode/scripts/collect-session-evidence.mjs +197 -9
- package/opencode/scripts/collect-session-evidence.test.mjs +151 -0
- package/opencode/scripts/replay-routing.test.mjs +58 -0
- package/opencode/scripts/review-orchestrated-prepare.mjs +1 -1
- package/opencode/scripts/review-orchestrated-prepare.test.mjs +9 -0
- package/opencode/scripts/update-skill-registry.mjs +3 -2
- package/package.json +1 -1
- package/scripts/benchmark-tool-paths.mjs +1 -1
- package/scripts/check-public-boundary.mjs +1 -0
- package/scripts/manage-installation.mjs +17 -5
- package/scripts/manage-installation.test.mjs +61 -0
- package/scripts/package-smoke.test.mjs +2 -2
- package/scripts/version.test.mjs +2 -2
- package/docs/synology.md +0 -30
|
@@ -83,6 +83,33 @@ generate or modify frontmatter.
|
|
|
83
83
|
- `evaluator`, `debugger`, and `evolver` are optional sidecars.
|
|
84
84
|
- `evolver` works only on the OpenCode harness.
|
|
85
85
|
|
|
86
|
+
### Small-gate closeout without review
|
|
87
|
+
|
|
88
|
+
This is the unique, computable definition of "small" that may skip final
|
|
89
|
+
review. `lead` and the condensed Task Contract card consume this SAME
|
|
90
|
+
definition; no second definition exists in other contracts. The gate holds
|
|
91
|
+
ONLY when every condition is true:
|
|
92
|
+
|
|
93
|
+
1. Scope declared `small` in the handoff or Task Contract.
|
|
94
|
+
2. `diff_files_changed <= 2` counted against the real diff base.
|
|
95
|
+
3. No file touches a protected path: auth/sessions, secrets/.env, exported
|
|
96
|
+
public API, migrations, CI, or the harness itself (`agents/**`,
|
|
97
|
+
`commands/**`, `docs/ai/harness/**`, `scripts/**`, `AGENTS.md`,
|
|
98
|
+
`docs/ai/evolution/benchmarks/**`, `skills/**`).
|
|
99
|
+
4. Diff is not destructive: no mass deletes, no reverts of others' work, no
|
|
100
|
+
permission or security-config changes.
|
|
101
|
+
5. The touched surface does not require new or mandatory tests.
|
|
102
|
+
|
|
103
|
+
Point-3 exclusions beat any size or prompt-length heuristic. When closing
|
|
104
|
+
through this gate, `lead` records `review_skipped_reason: small_gate_pass`.
|
|
105
|
+
The closed enum is: `small_gate_pass | protected_surface | destructive_diff |
|
|
106
|
+
tests_required | scope_not_small | human_decision`; the other values document
|
|
107
|
+
why the fast path did not apply, or an explicit human decision.
|
|
108
|
+
|
|
109
|
+
This gate does not reduce `reviewer` authority: medium/large work and every
|
|
110
|
+
sensitive surface keep a full `review_stage: final` with a single final
|
|
111
|
+
`reviewer` verdict. It does not apply retroactively to work already reviewed.
|
|
112
|
+
|
|
86
113
|
## Mission runtime projection
|
|
87
114
|
|
|
88
115
|
`mission-status` is a read-only view over the durable loop snapshot and
|
|
@@ -106,8 +133,9 @@ attestation is required for completed state.
|
|
|
106
133
|
|
|
107
134
|
`/review-preflight` is the daily path: deterministic artifacts with no AI
|
|
108
135
|
review. `/review-orchestrated --agents` adds at most one focused coordinator
|
|
109
|
-
review for `lite`; `--full-agents` is experimental,
|
|
110
|
-
four specialists.
|
|
136
|
+
review for `lite`; `--full-agents` is experimental, parallel, and limited to
|
|
137
|
+
four specialists. It is safe because the specialists share no writable state;
|
|
138
|
+
see `docs/ai/harness/orchestrated-review.md`.
|
|
111
139
|
|
|
112
140
|
The complete contract lives in `docs/ai/harness/orchestrated-review.md`.
|
|
113
141
|
|
|
@@ -130,6 +158,29 @@ when the change is not trivial. The minimum block is:
|
|
|
130
158
|
- `validation`: commands, tests, or evidence.
|
|
131
159
|
- `ask_abort_triggers`: conditions for asking, blocking, or returning work.
|
|
132
160
|
|
|
161
|
+
### Condensed card for small scope
|
|
162
|
+
|
|
163
|
+
When the change meets the small-gate in the section above ("Small-gate closeout
|
|
164
|
+
without review", same unique definition), `lead` may delegate and `developer`
|
|
165
|
+
may close with a condensed 6-field card instead of the full Task Contract,
|
|
166
|
+
`handoff_packet`, and separate Result Contract / Verification Envelope stack.
|
|
167
|
+
This is an activation exemption, not a new contract: for non-trivial work every
|
|
168
|
+
prior block remains mandatory. Canonical audited example, exactly 6 fields:
|
|
169
|
+
|
|
170
|
+
```text
|
|
171
|
+
small-card:
|
|
172
|
+
objective: rename the Save button to Save changes
|
|
173
|
+
success: visible label changed in the UI
|
|
174
|
+
validation: grep the literal + local render smoke
|
|
175
|
+
diff_base: working tree on HEAD (1 file)
|
|
176
|
+
constraints: do not touch other literals or tests
|
|
177
|
+
output: short summary with the applied diff
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
When closing this way, `lead` records `review_skipped_reason` from the gate
|
|
181
|
+
enum. Telemetry (turn ids, timestamps, diff size) ALWAYS stays out of the
|
|
182
|
+
card: it lives only in evidence-collector output.
|
|
183
|
+
|
|
133
184
|
For long, multi-agent, or resumable work, the responsible agent adds a compact
|
|
134
185
|
`handoff_packet` with current objective, decisions made, files read/touched,
|
|
135
186
|
validation state, blockers, and next action. Long logs are referenced by path
|
|
@@ -122,9 +122,17 @@ There is no remote control plane and no automatic provider failover. Model
|
|
|
122
122
|
profiles remain local and versionable without permanently mutating
|
|
123
123
|
`opencode.json` or adding external services.
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
`--full-agents` is experimental, parallel, and limited to four reviewers with a
|
|
126
|
+
per-reviewer timeout and partial-failure reporting. It is never activated
|
|
127
|
+
automatically.
|
|
128
|
+
|
|
129
|
+
The parallelism is safe by construction of the preparer, not by runtime
|
|
130
|
+
coordination: all four reviewers are `mode: subagent` with `edit: deny`, each
|
|
131
|
+
reads only the patches in its `manifest.reviewer_patch_sets[reviewer]` and
|
|
132
|
+
returns findings in its response. There is no concurrent writer, no shared file,
|
|
133
|
+
and nothing to synchronize when collecting. What does change is the meaning of
|
|
134
|
+
the budget: `reviewer_timeout_ms` stays per reviewer, but because they overlap
|
|
135
|
+
the total clock tends to the slowest reviewer instead of the sum of the four.
|
|
128
136
|
|
|
129
137
|
The temporary workspace is cleaned by default. `--retain` preserves it for
|
|
130
138
|
debugging and records that choice in `workspace_retention`.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Lead Playbook: AHE flow for harness evolution
|
|
2
|
+
|
|
3
|
+
On-demand block extracted from `agents/lead.md`. Consult it only when the task
|
|
4
|
+
changes agents, commands, skills, tools, or global rules of this harness
|
|
5
|
+
(`/evolve` or an approved harness evolution). Do not use it for normal app
|
|
6
|
+
features.
|
|
7
|
+
|
|
8
|
+
## Explicit AHE flow
|
|
9
|
+
|
|
10
|
+
1. `evaluator` runs or defines reproducible scenarios.
|
|
11
|
+
2. `debugger` produces `analysis/overview.md` and per-pattern detail.
|
|
12
|
+
3. `evolver` proposes changes with a manifest.
|
|
13
|
+
4. `developer` applies only approved, bounded changes.
|
|
14
|
+
5. `evaluator` re-runs the scenarios.
|
|
15
|
+
6. `debugger` attributes fixes and regressions.
|
|
16
|
+
7. `reviewer` reviews the diff against spec, manifest, and evaluation.
|
|
17
|
+
|
|
18
|
+
Each AHE change declares:
|
|
19
|
+
|
|
20
|
+
- evidence used
|
|
21
|
+
- root cause
|
|
22
|
+
- component touched: `agent`, `command`, `skill`, `tool`, `workflow`, or `memory`
|
|
23
|
+
- predicted fixes
|
|
24
|
+
- risk tasks
|
|
25
|
+
- keep / improve / rollback+pivot criterion
|
|
26
|
+
|
|
27
|
+
## Background rules
|
|
28
|
+
|
|
29
|
+
- Sidecars (`evaluator`, `debugger`, `evolver`) are never mandatory phases of
|
|
30
|
+
the normal flow; invoke them with concrete evidence.
|
|
31
|
+
- Before `evaluator` on `/evolve`, confirm staged `session_sources` artifacts
|
|
32
|
+
generated from `opencode.db` plus optional raw exports.
|
|
33
|
+
- If no git repository is available, say that automatic rollback is not
|
|
34
|
+
enabled. Do not simulate rollback.
|
|
35
|
+
- App-feature evidence may live in the app repository; harness evolution
|
|
36
|
+
manifests and decisions live in this kit.
|
|
37
|
+
|
|
38
|
+
## State management (medium/large work)
|
|
39
|
+
|
|
40
|
+
Keep or propose state in the repository convention: `docs/ai/status.md`,
|
|
41
|
+
`docs/ai/research/`, `docs/ai/design/`, `docs/ai/specs/`, `docs/ai/tasks/`,
|
|
42
|
+
`docs/ai/reviews/`, `docs/ai/evolution/`. If the repo already has another
|
|
43
|
+
convention, use that.
|
|
@@ -782,9 +782,9 @@
|
|
|
782
782
|
}
|
|
783
783
|
},
|
|
784
784
|
"node_modules/baseline-browser-mapping": {
|
|
785
|
-
"version": "2.
|
|
786
|
-
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.
|
|
787
|
-
"integrity": "sha512-
|
|
785
|
+
"version": "2.11.20",
|
|
786
|
+
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.20.tgz",
|
|
787
|
+
"integrity": "sha512-H0ulySigv6icDJ1F7SjtdCD6PrhTpdYCmP0CactWy1+ekh0AFd0o1Wn5T8b+hnTmdBx19u9yhL6wvCylXMY7zw==",
|
|
788
788
|
"license": "Apache-2.0",
|
|
789
789
|
"bin": {
|
|
790
790
|
"baseline-browser-mapping": "dist/cli.cjs"
|
|
@@ -806,9 +806,9 @@
|
|
|
806
806
|
}
|
|
807
807
|
},
|
|
808
808
|
"node_modules/browserslist": {
|
|
809
|
-
"version": "4.28.
|
|
810
|
-
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.
|
|
811
|
-
"integrity": "sha512-
|
|
809
|
+
"version": "4.28.8",
|
|
810
|
+
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.8.tgz",
|
|
811
|
+
"integrity": "sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==",
|
|
812
812
|
"funding": [
|
|
813
813
|
{
|
|
814
814
|
"type": "opencollective",
|
|
@@ -825,11 +825,11 @@
|
|
|
825
825
|
],
|
|
826
826
|
"license": "MIT",
|
|
827
827
|
"dependencies": {
|
|
828
|
-
"baseline-browser-mapping": "^2.
|
|
829
|
-
"caniuse-lite": "^1.0.
|
|
830
|
-
"electron-to-chromium": "^1.5.
|
|
831
|
-
"node-releases": "^2.0.
|
|
832
|
-
"update-browserslist-db": "^1.
|
|
828
|
+
"baseline-browser-mapping": "^2.11.12",
|
|
829
|
+
"caniuse-lite": "^1.0.30001809",
|
|
830
|
+
"electron-to-chromium": "^1.5.402",
|
|
831
|
+
"node-releases": "^2.0.53",
|
|
832
|
+
"update-browserslist-db": "^1.3.0"
|
|
833
833
|
},
|
|
834
834
|
"bin": {
|
|
835
835
|
"browserslist": "cli.js"
|
|
@@ -848,9 +848,9 @@
|
|
|
848
848
|
}
|
|
849
849
|
},
|
|
850
850
|
"node_modules/caniuse-lite": {
|
|
851
|
-
"version": "1.0.
|
|
852
|
-
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.
|
|
853
|
-
"integrity": "sha512-
|
|
851
|
+
"version": "1.0.30001810",
|
|
852
|
+
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz",
|
|
853
|
+
"integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==",
|
|
854
854
|
"funding": [
|
|
855
855
|
{
|
|
856
856
|
"type": "opencollective",
|
|
@@ -948,9 +948,9 @@
|
|
|
948
948
|
}
|
|
949
949
|
},
|
|
950
950
|
"node_modules/electron-to-chromium": {
|
|
951
|
-
"version": "1.5.
|
|
952
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
953
|
-
"integrity": "sha512-
|
|
951
|
+
"version": "1.5.420",
|
|
952
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.420.tgz",
|
|
953
|
+
"integrity": "sha512-2yD6XreGusOfNV+dUcvipJEXc3n/n7fgr7996aszTG+YY5E4mqM4tOq/3uhP129cazL9YHbVWSpc79ePotWtPA==",
|
|
954
954
|
"license": "ISC"
|
|
955
955
|
},
|
|
956
956
|
"node_modules/emoji-regex": {
|
|
@@ -1294,10 +1294,13 @@
|
|
|
1294
1294
|
}
|
|
1295
1295
|
},
|
|
1296
1296
|
"node_modules/node-releases": {
|
|
1297
|
-
"version": "2.0.
|
|
1298
|
-
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.
|
|
1299
|
-
"integrity": "sha512-
|
|
1300
|
-
"license": "MIT"
|
|
1297
|
+
"version": "2.0.54",
|
|
1298
|
+
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.54.tgz",
|
|
1299
|
+
"integrity": "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==",
|
|
1300
|
+
"license": "MIT",
|
|
1301
|
+
"engines": {
|
|
1302
|
+
"node": ">=18"
|
|
1303
|
+
}
|
|
1301
1304
|
},
|
|
1302
1305
|
"node_modules/p-limit": {
|
|
1303
1306
|
"version": "2.3.0",
|
|
@@ -1588,9 +1591,9 @@
|
|
|
1588
1591
|
}
|
|
1589
1592
|
},
|
|
1590
1593
|
"node_modules/toml": {
|
|
1591
|
-
"version": "4.
|
|
1592
|
-
"resolved": "https://registry.npmjs.org/toml/-/toml-4.
|
|
1593
|
-
"integrity": "sha512-
|
|
1594
|
+
"version": "4.3.0",
|
|
1595
|
+
"resolved": "https://registry.npmjs.org/toml/-/toml-4.3.0.tgz",
|
|
1596
|
+
"integrity": "sha512-lVb8X9BsPVuH0M4BKeS91tXAmJvCjQ5UIyAbQFaxkKGyUFK2RPkhwaFSQH8vbpl1d23eu/IBH+dwVMHWaq9A5A==",
|
|
1594
1597
|
"license": "MIT",
|
|
1595
1598
|
"engines": {
|
|
1596
1599
|
"node": ">=20"
|
|
@@ -1611,9 +1614,9 @@
|
|
|
1611
1614
|
}
|
|
1612
1615
|
},
|
|
1613
1616
|
"node_modules/update-browserslist-db": {
|
|
1614
|
-
"version": "1.2
|
|
1615
|
-
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.
|
|
1616
|
-
"integrity": "sha512-
|
|
1617
|
+
"version": "1.3.2",
|
|
1618
|
+
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz",
|
|
1619
|
+
"integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==",
|
|
1617
1620
|
"funding": [
|
|
1618
1621
|
{
|
|
1619
1622
|
"type": "opencollective",
|
|
@@ -17,6 +17,10 @@ function read(rel) {
|
|
|
17
17
|
return fs.readFileSync(path.join(root, rel), "utf8");
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
function readFrontmatterText(rel) {
|
|
21
|
+
return read(rel).replace(/\r\n/g, "\n");
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
function exists(rel) {
|
|
21
25
|
return fs.existsSync(path.join(root, rel));
|
|
22
26
|
}
|
|
@@ -711,7 +715,7 @@ function parsePortableAgentPermissions(rel) {
|
|
|
711
715
|
}
|
|
712
716
|
|
|
713
717
|
function parseFrontmatter(rel) {
|
|
714
|
-
const text =
|
|
718
|
+
const text = readFrontmatterText(rel);
|
|
715
719
|
if (!text.startsWith("---\n")) {
|
|
716
720
|
fail(`${rel}: missing frontmatter`);
|
|
717
721
|
return {};
|
|
@@ -739,7 +743,7 @@ function parseFrontmatter(rel) {
|
|
|
739
743
|
}
|
|
740
744
|
|
|
741
745
|
function frontmatterBlock(rel) {
|
|
742
|
-
const text =
|
|
746
|
+
const text = readFrontmatterText(rel);
|
|
743
747
|
if (!text.startsWith("---\n")) return "";
|
|
744
748
|
const end = text.indexOf("\n---", 4);
|
|
745
749
|
if (end === -1) return "";
|
|
@@ -1151,6 +1155,21 @@ function checkOrchestratedReviewContract() {
|
|
|
1151
1155
|
]) {
|
|
1152
1156
|
if (!coordinator.includes(token)) fail(`agents/review_coordinator.md: missing preparer permission/routing token ${token}`);
|
|
1153
1157
|
}
|
|
1158
|
+
if (!coordinator.includes("in parallel")) {
|
|
1159
|
+
fail("agents/review_coordinator.md: --full-agents must launch specialists in parallel");
|
|
1160
|
+
}
|
|
1161
|
+
if (/sequentially/i.test(coordinator)) {
|
|
1162
|
+
fail("agents/review_coordinator.md: sequential specialist execution was removed; the contract must not reintroduce it");
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
for (const [specRel, specToken, specWhy] of [
|
|
1167
|
+
["agents/researcher.md", "BEGIN_SPEC_INPUT", "researcher must delimit a forwardable spec_input block"],
|
|
1168
|
+
["agents/lead.md", "BEGIN_SPEC_INPUT", "lead must forward researcher's spec_input block"],
|
|
1169
|
+
["agents/lead.md", "Do not re-synthesize the research", "lead must not rewrite research findings before specifier"],
|
|
1170
|
+
["agents/specifier.md", "BEGIN_SPEC_INPUT", "specifier must know the block arrives verbatim"],
|
|
1171
|
+
]) {
|
|
1172
|
+
if (exists(specRel) && !read(specRel).includes(specToken)) fail(`${specRel}: missing ${specToken} (${specWhy})`);
|
|
1154
1173
|
}
|
|
1155
1174
|
|
|
1156
1175
|
if (exists(docRel)) {
|
|
@@ -1192,7 +1211,8 @@ function checkOrchestratedReviewContract() {
|
|
|
1192
1211
|
"full",
|
|
1193
1212
|
"no automatic provider failover",
|
|
1194
1213
|
"There is no remote control plane",
|
|
1195
|
-
"
|
|
1214
|
+
"`--full-agents` is experimental, parallel",
|
|
1215
|
+
"There is no concurrent writer",
|
|
1196
1216
|
"timed_out",
|
|
1197
1217
|
"workspace is cleaned by default",
|
|
1198
1218
|
"requires_human_verification",
|
|
@@ -2982,7 +3002,11 @@ function checkOpenDesignToolContract() {
|
|
|
2982
3002
|
if (/randomUUID|node:crypto/.test(source)) {
|
|
2983
3003
|
fail(`${rel}: Open Design tool must not depend on randomUUID or node:crypto`);
|
|
2984
3004
|
}
|
|
2985
|
-
|
|
3005
|
+
const privateHostMarker = ["juancan", "as"].join("");
|
|
3006
|
+
const nasVendorMarker = ["syn", "ology"].join("");
|
|
3007
|
+
const usersPath = ["/", "Users", "/"].join("");
|
|
3008
|
+
const homePath = ["/", "home", "/"].join("");
|
|
3009
|
+
if (new RegExp(`${privateHostMarker}|${nasVendorMarker}|${usersPath}|${homePath}`, "i").test(source)) {
|
|
2986
3010
|
fail(`${rel}: Open Design tool contains a private endpoint or local path`);
|
|
2987
3011
|
}
|
|
2988
3012
|
}
|
|
@@ -35,6 +35,55 @@ function write(rel, content, cwd) {
|
|
|
35
35
|
fs.writeFileSync(path.join(cwd, rel), content);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
test("harness accepts CRLF frontmatter for agents and commands", () => {
|
|
39
|
+
const cwd = makeFixture();
|
|
40
|
+
try {
|
|
41
|
+
for (const rel of ["agents/lead.md", "commands/feature.md"]) {
|
|
42
|
+
const content = fs.readFileSync(path.join(cwd, rel), "utf8");
|
|
43
|
+
write(rel, content.replace(/\r?\n/g, "\r\n"), cwd);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const result = runHarness(cwd);
|
|
47
|
+
assert.equal(result.status, 0, result.stderr);
|
|
48
|
+
} finally {
|
|
49
|
+
fs.rmSync(cwd, { recursive: true, force: true });
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test("frontmatter diagnostics remain for invalid blocks", async (t) => {
|
|
54
|
+
for (const [label, mutate, pattern] of [
|
|
55
|
+
[
|
|
56
|
+
"missing opener",
|
|
57
|
+
(source) => source.replace(/^---\n/, "description: missing opener\n"),
|
|
58
|
+
/agents\/lead\.md: missing frontmatter/,
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
"unclosed block",
|
|
62
|
+
(source) => source.replace(/\n---\n[\s\S]*$/, "\n"),
|
|
63
|
+
/agents\/lead\.md: unclosed frontmatter/,
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"malformed field",
|
|
67
|
+
(source) => source.replace(/^description:/m, "not valid\ndescription:"),
|
|
68
|
+
/agents\/lead\.md: malformed frontmatter line "not valid"/,
|
|
69
|
+
],
|
|
70
|
+
]) {
|
|
71
|
+
await t.test(label, () => {
|
|
72
|
+
const cwd = makeFixture();
|
|
73
|
+
try {
|
|
74
|
+
const rel = "agents/lead.md";
|
|
75
|
+
write(rel, mutate(fs.readFileSync(path.join(cwd, rel), "utf8")), cwd);
|
|
76
|
+
|
|
77
|
+
const result = runHarness(cwd);
|
|
78
|
+
assert.notEqual(result.status, 0, `checker accepted ${label}`);
|
|
79
|
+
assert.match(result.stderr, pattern);
|
|
80
|
+
} finally {
|
|
81
|
+
fs.rmSync(cwd, { recursive: true, force: true });
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
38
87
|
function canonicalRouterScenario(overrides = {}) {
|
|
39
88
|
return {
|
|
40
89
|
schema_version: 1,
|
|
@@ -1505,6 +1554,31 @@ test("generator produces deterministic public output", () => {
|
|
|
1505
1554
|
}
|
|
1506
1555
|
});
|
|
1507
1556
|
|
|
1557
|
+
test("generator resolves home without HOME when user skills are enabled", () => {
|
|
1558
|
+
const cwd = makeFixture();
|
|
1559
|
+
try {
|
|
1560
|
+
const env = { ...process.env };
|
|
1561
|
+
delete env.HOME;
|
|
1562
|
+
env.OPENCODE_INCLUDE_USER_SKILLS = "1";
|
|
1563
|
+
|
|
1564
|
+
const generation = spawnSync(process.execPath, ["scripts/update-skill-registry.mjs"], {
|
|
1565
|
+
cwd,
|
|
1566
|
+
encoding: "utf8",
|
|
1567
|
+
env,
|
|
1568
|
+
});
|
|
1569
|
+
assert.equal(generation.status, 0, generation.stderr);
|
|
1570
|
+
|
|
1571
|
+
const check = spawnSync(process.execPath, ["scripts/update-skill-registry.mjs", "--check"], {
|
|
1572
|
+
cwd,
|
|
1573
|
+
encoding: "utf8",
|
|
1574
|
+
env,
|
|
1575
|
+
});
|
|
1576
|
+
assert.equal(check.status, 0, check.stderr);
|
|
1577
|
+
} finally {
|
|
1578
|
+
fs.rmSync(cwd, { recursive: true, force: true });
|
|
1579
|
+
}
|
|
1580
|
+
});
|
|
1581
|
+
|
|
1508
1582
|
test("--check mode works when public registry is up to date", () => {
|
|
1509
1583
|
const cwd = makeFixture();
|
|
1510
1584
|
try {
|