opencode-swarm 7.78.7 → 7.79.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/.opencode/skills/swarm-pr-feedback/SKILL.md +111 -0
- package/README.md +1 -1
- package/dist/agents/architect.d.ts +1 -1
- package/dist/cli/index.js +64 -36
- package/dist/commands/registry.d.ts +1 -1
- package/dist/config/constants.d.ts +6 -0
- package/dist/index.js +108 -142
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/knowledge-receipt.d.ts +1 -1
- package/dist/tools/manifest.d.ts +0 -1
- package/dist/tools/tool-metadata.d.ts +13 -17
- package/package.json +1 -1
|
@@ -142,6 +142,42 @@ Build a complete feedback ledger before editing. Include every available source:
|
|
|
142
142
|
If a source is unavailable, record that limitation. Do not treat missing access as
|
|
143
143
|
evidence that no feedback exists.
|
|
144
144
|
|
|
145
|
+
### CI matrix cascade check (do this before fixing)
|
|
146
|
+
|
|
147
|
+
When the PR's `unit` job is a matrix across multiple OSes and downstream jobs
|
|
148
|
+
(`integration`, `smoke`) have `needs: unit`, an OS leg failure blocks the
|
|
149
|
+
entire pipeline. Before triaging, check:
|
|
150
|
+
|
|
151
|
+
1. Are `integration` or `smoke` jobs in `skipped` or `cancelled` state rather
|
|
152
|
+
than `failed`? That signals a unit matrix cascade — the unit job failed
|
|
153
|
+
on one OS leg, blocking the downstream jobs from running on the current
|
|
154
|
+
HEAD.
|
|
155
|
+
2. If a unit OS leg is the blocker, classify the failure:
|
|
156
|
+
- **Code issue** — the test itself fails. Reproduce locally; if the
|
|
157
|
+
test passes locally, the runner is the problem.
|
|
158
|
+
- **Runner performance** — the test step exceeds the configured timeout.
|
|
159
|
+
Run all files in the step locally with per-file timing; if cumulative
|
|
160
|
+
local runtime is <10 min and the runner can't complete in 60+ min, the
|
|
161
|
+
issue is runner performance. Bump the CI timeout as a stopgap and file
|
|
162
|
+
a follow-up issue for parallelization. Do not loop bumping the timeout
|
|
163
|
+
past 90 min without filing the follow-up.
|
|
164
|
+
3. Surface cascade failures to the user explicitly. The downstream jobs'
|
|
165
|
+
results don't exist; the code's coverage of the current HEAD cannot be
|
|
166
|
+
confirmed by CI alone.
|
|
167
|
+
|
|
168
|
+
### PR body claim verification
|
|
169
|
+
|
|
170
|
+
PR body text like "PHASE 2 council APPROVED (5/5, round 2)" or "Final council
|
|
171
|
+
APPROVED" must be backed by an evidence file in `.swarm/evidence/`
|
|
172
|
+
(typically `phase-council.json` or `final-council.json`). Bot-generated PR
|
|
173
|
+
bodies commonly auto-fill these claims without real review. Before accepting
|
|
174
|
+
such a claim as part of triage:
|
|
175
|
+
|
|
176
|
+
1. Check whether the corresponding evidence file exists with `verdict:APPROVED`.
|
|
177
|
+
2. If the claim is unsupported, mark the closure ledger item as
|
|
178
|
+
`NEEDS_MORE_EVIDENCE` rather than `CONFIRMED`. Do not silently drop the
|
|
179
|
+
claim — it indicates the PR body was generated without a real review.
|
|
180
|
+
|
|
145
181
|
## Feedback Ledger
|
|
146
182
|
|
|
147
183
|
Normalize each item before triage:
|
|
@@ -163,6 +199,59 @@ Rules:
|
|
|
163
199
|
`CONFLICT-001` for merge/base drift and `CI-001` for check failures, so PR
|
|
164
200
|
bodies can show exactly how operational blockers were closed.
|
|
165
201
|
|
|
202
|
+
### Mandatory: integrate all PR comments with feedback or findings before validation
|
|
203
|
+
|
|
204
|
+
**Before the Verification step begins, every PR comment that contains feedback
|
|
205
|
+
or findings MUST be integrated into the total feedback ledger as a
|
|
206
|
+
`FB-###` item.** This is a hard requirement, not a best-effort step.
|
|
207
|
+
|
|
208
|
+
What counts as "feedback or findings":
|
|
209
|
+
- A reviewer request for a code change ("please rename this", "add a test for
|
|
210
|
+
X", "this should call `_internals.foo`")
|
|
211
|
+
- A reviewer claim about correctness, security, or style ("this is
|
|
212
|
+
incorrect", "X will leak")
|
|
213
|
+
- A bot reviewer's findings table entries
|
|
214
|
+
- A CI failure with a specific file:line root cause
|
|
215
|
+
- A reviewer question that implies a code change is needed ("why is this
|
|
216
|
+
static?")
|
|
217
|
+
- PR review summaries or aggregate comments
|
|
218
|
+
|
|
219
|
+
What does NOT count (and is therefore not required to be a ledger item):
|
|
220
|
+
- Pure acknowledgements ("LGTM", "looks good")
|
|
221
|
+
- PR-level metadata changes (title, label, milestone)
|
|
222
|
+
- Force-push acknowledgements
|
|
223
|
+
|
|
224
|
+
Rules:
|
|
225
|
+
- **No finding may be addressed outside the ledger.** If you fix something a
|
|
226
|
+
reviewer mentioned, the corresponding `FB-###` item MUST be in the ledger
|
|
227
|
+
before the fix. If you skip the fix, the `FB-###` item MUST be in the
|
|
228
|
+
ledger with a `DISPROVED`, `PRE_EXISTING`, `NEEDS_MORE_EVIDENCE`, or
|
|
229
|
+
`NEEDS_USER_DECISION` status before validation can begin.
|
|
230
|
+
- **Status semantics for unaddressed items:**
|
|
231
|
+
- `CONFIRMED` and `PARTIAL` items must be addressed (fixed or
|
|
232
|
+
disproved) before validation can begin. A `CONFIRMED` item that is
|
|
233
|
+
left unaddressed is a regression against the review.
|
|
234
|
+
- `DISPROVED`, `PRE_EXISTING`, `NEEDS_MORE_EVIDENCE`, and
|
|
235
|
+
`NEEDS_USER_DECISION` items may remain open at validation time, but
|
|
236
|
+
each must be explicitly justified in the closure ledger.
|
|
237
|
+
- **The closure ledger at the end of the run must account for every `FB-###`
|
|
238
|
+
item** with a final status (fixed / disproved / pre-existing / needs user
|
|
239
|
+
decision / needs more evidence).
|
|
240
|
+
- **Comments from the latest bot round take precedence over earlier rounds**
|
|
241
|
+
for the same finding; the earlier-round `FB-###` item is updated with the
|
|
242
|
+
new evidence rather than a new item being created.
|
|
243
|
+
- **Multi-round pattern continues to apply** (see "Multi-Round Bot Reviews"
|
|
244
|
+
section). A new bot round adds new `FB-###` items for findings that
|
|
245
|
+
weren't in the prior round; the prior round's items are carried forward
|
|
246
|
+
and updated with the new evidence.
|
|
247
|
+
|
|
248
|
+
Rationale: silently addressing a review comment without a corresponding
|
|
249
|
+
ledger item means the closure summary at the end of the run cannot
|
|
250
|
+
demonstrate that every review comment was considered. The closure summary
|
|
251
|
+
is the only artifact the user/maintainer reads to confirm the PR is ready
|
|
252
|
+
to merge. Missing items in the ledger = missing items in the closure = a
|
|
253
|
+
PR that ships with unreviewed feedback.
|
|
254
|
+
|
|
166
255
|
## Verification
|
|
167
256
|
|
|
168
257
|
Classify every ledger item before fixing:
|
|
@@ -173,6 +262,7 @@ Classify every ledger item before fixing:
|
|
|
173
262
|
| `PARTIAL` | The comment points at a real concern, but the framing, severity, or requested fix is incomplete. |
|
|
174
263
|
| `DISPROVED` | Source, tests, or execution context prove the claim is false, unreachable, or already mitigated. |
|
|
175
264
|
| `PRE_EXISTING` | The issue exists on the base branch and is not materially worsened by the PR. |
|
|
265
|
+
| `NEEDS_MORE_EVIDENCE` | The claim (e.g., "council APPROVED") is unsupported by stored evidence (e.g., a missing or failed `.swarm/evidence/` artifact); more information is required before triage. |
|
|
176
266
|
| `NEEDS_USER_DECISION` | The item requires a product, UX, compatibility, or scope choice that cannot be inferred. |
|
|
177
267
|
|
|
178
268
|
Verification checklist:
|
|
@@ -184,6 +274,26 @@ Verification checklist:
|
|
|
184
274
|
- Check related tests and whether a failing/proposed test would prove the item.
|
|
185
275
|
- Check whether multiple feedback items share one root cause.
|
|
186
276
|
|
|
277
|
+
### DI seam migration validation
|
|
278
|
+
|
|
279
|
+
When a test file mutates a DI seam object (e.g., `_internals.foo = mock`),
|
|
280
|
+
verify that the production source reads from the seam at call time. A common
|
|
281
|
+
anti-pattern: the test mutates the seam object, but the production code
|
|
282
|
+
imports the named function (`import { foo } from './module'`) which is bound
|
|
283
|
+
at module load. The seam mutation has no effect on the named reference,
|
|
284
|
+
so the test fails even though the seam object's `foo === mock`.
|
|
285
|
+
|
|
286
|
+
Verification: open the source file and grep for call sites. If you see
|
|
287
|
+
`import { foo } from '...'` followed by `foo(...)` in the production code,
|
|
288
|
+
and the test does `_internals.foo = mock`, the test will fail. The fix is
|
|
289
|
+
to change the production code to call `_internals.foo(...)` (or equivalent
|
|
290
|
+
active-seam pattern) so the seam mutation is read at call time.
|
|
291
|
+
|
|
292
|
+
If only a few call sites exist, fix them in the source. If many call sites
|
|
293
|
+
exist, consider whether the migration should use `mock.module()` instead,
|
|
294
|
+
which replaces the entire module object (including the named export
|
|
295
|
+
reference).
|
|
296
|
+
|
|
187
297
|
## Fix Planning
|
|
188
298
|
|
|
189
299
|
Cluster ledger items by root cause before coding. Fix in this order unless a user
|
|
@@ -251,6 +361,7 @@ FB-001 | fixed | commit/test evidence
|
|
|
251
361
|
FB-002 | disproved | code evidence
|
|
252
362
|
FB-003 | pre-existing | base-branch evidence
|
|
253
363
|
FB-004 | needs user decision | decision required
|
|
364
|
+
FB-005 | needs more evidence | .swarm/evidence/phase-council.json missing
|
|
254
365
|
CONFLICT-001 | fixed | remote mergeability is MERGEABLE/CLEAN
|
|
255
366
|
CI-001 | fixed | current-head check/run evidence
|
|
256
367
|
```
|
package/README.md
CHANGED
|
@@ -1107,7 +1107,7 @@ Control how tool outputs are summarized for LLM context.
|
|
|
1107
1107
|
| `/swarm deep-dive <scope> [--profile <name>] [--max-explorers <n>]` | Read-only codebase audit with parallel explorers, dual reviewers, and critic challenge |
|
|
1108
1108
|
| `/swarm design-docs <description> [--out <dir>] [--lang <name>] [--update]` | Generate or sync language-agnostic design docs (requires `design_docs.enabled`) |
|
|
1109
1109
|
| `/swarm dark-matter` | Detect hidden file couplings from co-change history |
|
|
1110
|
-
| `/swarm finalize [--prune-branches] [--skill-review]` | Idempotent session close-out: retrospectives, lesson curation, evidence archive,
|
|
1110
|
+
| `/swarm finalize [--prune-branches] [--skill-review]` | Idempotent session close-out: retrospectives, lesson curation, evidence archive, git reset --hard + clean to align with remote branch (discards uncommitted changes), optional branch pruning, optional skill-improver proposal |
|
|
1111
1111
|
| `/swarm close [--prune-branches] [--skill-review]` | Deprecated alias for `/swarm finalize [--prune-branches] [--skill-review]` |
|
|
1112
1112
|
| `/swarm write-retro` | Write a phase retrospective manually |
|
|
1113
1113
|
| `/swarm handoff` | Generate a handoff summary for context-budget-critical sessions |
|
|
@@ -70,4 +70,4 @@ export declare function buildCouncilWorkflow(council?: CouncilWorkflowConfig): s
|
|
|
70
70
|
* BRAINSTORM, and PLAN inline paths stay in lockstep.
|
|
71
71
|
*/
|
|
72
72
|
export declare function buildQaGateSelectionDialogue(modeLabel: 'BRAINSTORM' | 'SPECIFY' | 'PLAN'): string;
|
|
73
|
-
export declare function createArchitectAgent(model: string, customPrompt?: string, customAppendPrompt?: string, adversarialTesting?: AdversarialTestingConfig, council?: CouncilWorkflowConfig, uiReview?: UIReviewConfig, memoryEnabled?: boolean, architecturalSupervision?: ArchitectureSupervisionWorkflowConfig, designDocsEnabled?: boolean, externalSkillsEnabled?: boolean): AgentDefinition;
|
|
73
|
+
export declare function createArchitectAgent(model: string, customPrompt?: string, customAppendPrompt?: string, adversarialTesting?: AdversarialTestingConfig, council?: CouncilWorkflowConfig, uiReview?: UIReviewConfig, memoryEnabled?: boolean, architecturalSupervision?: ArchitectureSupervisionWorkflowConfig, designDocsEnabled?: boolean, externalSkillsEnabled?: boolean, turboEnabled?: boolean): AgentDefinition;
|
package/dist/cli/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var package_default;
|
|
|
52
52
|
var init_package = __esm(() => {
|
|
53
53
|
package_default = {
|
|
54
54
|
name: "opencode-swarm",
|
|
55
|
-
version: "7.
|
|
55
|
+
version: "7.79.0",
|
|
56
56
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
57
57
|
main: "dist/index.js",
|
|
58
58
|
types: "dist/index.d.ts",
|
|
@@ -17406,15 +17406,15 @@ var init_tool_metadata = __esm(() => {
|
|
|
17406
17406
|
},
|
|
17407
17407
|
submit_council_verdicts: {
|
|
17408
17408
|
description: "submit pre-collected council member verdicts for synthesis (architect MUST dispatch critic/reviewer/sme/test_engineer/explorer as Agent tasks first; this tool synthesizes only, it does not contact members)",
|
|
17409
|
-
agents: [
|
|
17409
|
+
agents: []
|
|
17410
17410
|
},
|
|
17411
17411
|
submit_phase_council_verdicts: {
|
|
17412
17412
|
description: "submit pre-collected phase-level council member verdicts for holistic phase synthesis (architect MUST dispatch all 5 council members with phase-scoped context first; this tool synthesizes only, it does not contact members)",
|
|
17413
|
-
agents: [
|
|
17413
|
+
agents: []
|
|
17414
17414
|
},
|
|
17415
17415
|
declare_council_criteria: {
|
|
17416
17416
|
description: "pre-declare acceptance criteria for a task before the coder starts work; criteria are read back during council evaluation",
|
|
17417
|
-
agents: [
|
|
17417
|
+
agents: []
|
|
17418
17418
|
},
|
|
17419
17419
|
sbom_generate: {
|
|
17420
17420
|
description: "SBOM generation for dependency inventory",
|
|
@@ -17676,19 +17676,19 @@ var init_tool_metadata = __esm(() => {
|
|
|
17676
17676
|
},
|
|
17677
17677
|
web_search: {
|
|
17678
17678
|
description: "External web search (Tavily or Brave) for architect-driven council research, SME domain research, researcher auto-research, and skill-improver research. Returns titled results with snippets, URLs, normalized query metadata, temporal intent, freshness, and removed stale years. Config-gated on council.general.enabled in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides. Requires a search API key. Used by the architect in MODE: COUNCIL to gather a RESEARCH CONTEXT before dispatching council agents, by SME for opt-in external skill/source evaluation, and by the researcher agent for multi-source auto-research.",
|
|
17679
|
-
agents: ["
|
|
17679
|
+
agents: ["sme", "researcher", "skill_improver"]
|
|
17680
17680
|
},
|
|
17681
17681
|
web_fetch: {
|
|
17682
17682
|
description: "Fetch the readable text of a single http(s) URL (architect-only). Returns decoded page text, document title, final URL after redirects, and an evidence reference. Reads primary sources that web_search only surfaces as snippets. Config-gated on council.general.enabled. Blocks private/loopback/link-local/metadata addresses (re-validated and re-pinned across redirects); enforces timeout and body size cap.",
|
|
17683
|
-
agents: [
|
|
17683
|
+
agents: []
|
|
17684
17684
|
},
|
|
17685
17685
|
convene_general_council: {
|
|
17686
17686
|
description: "Synthesize responses from a multi-model General Council. Accepts parallel member responses (Round 1, optionally Round 2), detects disagreements, and returns consensus points, persisting disagreements, and a structured synthesis. Architect-only. Config-gated on council.general.enabled in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides.",
|
|
17687
|
-
agents: [
|
|
17687
|
+
agents: []
|
|
17688
17688
|
},
|
|
17689
17689
|
write_final_council_evidence: {
|
|
17690
17690
|
description: "Persist project-scoped final council evidence to .swarm/evidence/final-council.json. PREREQUISITE: dispatch critic, reviewer, sme, test_engineer, and explorer as project-scoped Agent tasks and collect their CouncilMemberVerdict JSON \u2014 this tool synthesizes only. Rejects on insufficient quorum or CONCERNS with unresolved requiredFixes; normalizes verdicts to approved/concerns/rejected. Architect-only.",
|
|
17691
|
-
agents: [
|
|
17691
|
+
agents: []
|
|
17692
17692
|
},
|
|
17693
17693
|
skill_generate: {
|
|
17694
17694
|
description: "compile knowledge entries into a structured SKILL.md draft",
|
|
@@ -17722,10 +17722,6 @@ var init_tool_metadata = __esm(() => {
|
|
|
17722
17722
|
description: "author or update .swarm/spec.md for the current project",
|
|
17723
17723
|
agents: ["spec_writer"]
|
|
17724
17724
|
},
|
|
17725
|
-
knowledge_ack: {
|
|
17726
|
-
description: "record an explicit KNOWLEDGE_APPLIED/IGNORED/VIOLATED acknowledgment",
|
|
17727
|
-
agents: ["architect"]
|
|
17728
|
-
},
|
|
17729
17725
|
knowledge_receipt: {
|
|
17730
17726
|
description: "file a receipt for retrieved knowledge (applied/ignored/contradicted + new lessons), recorded as immutable knowledge events",
|
|
17731
17727
|
agents: ["architect", "coder"]
|
|
@@ -17782,27 +17778,27 @@ var init_tool_metadata = __esm(() => {
|
|
|
17782
17778
|
},
|
|
17783
17779
|
lean_turbo_plan_lanes: {
|
|
17784
17780
|
description: "partition phase tasks into parallel lanes based on file-scope conflicts for Lean Turbo execution",
|
|
17785
|
-
agents: [
|
|
17781
|
+
agents: []
|
|
17786
17782
|
},
|
|
17787
17783
|
lean_turbo_acquire_locks: {
|
|
17788
17784
|
description: "acquire file locks for all files in a lane (all-or-nothing) before lane execution",
|
|
17789
|
-
agents: [
|
|
17785
|
+
agents: []
|
|
17790
17786
|
},
|
|
17791
17787
|
lean_turbo_runner_status: {
|
|
17792
17788
|
description: "read Lean Turbo run state from .swarm/turbo-state.json",
|
|
17793
|
-
agents: [
|
|
17789
|
+
agents: []
|
|
17794
17790
|
},
|
|
17795
17791
|
lean_turbo_review: {
|
|
17796
17792
|
description: "dispatch a read-only reviewer agent to evaluate a completed Lean Turbo phase",
|
|
17797
|
-
agents: [
|
|
17793
|
+
agents: []
|
|
17798
17794
|
},
|
|
17799
17795
|
lean_turbo_run_phase: {
|
|
17800
17796
|
description: "Execute a phase using Lean Turbo parallel lane execution. Plans lanes, acquires file locks, and dispatches coder agents concurrently. Use when Lean Turbo is active and you want to execute all tasks in a phase in parallel lanes.",
|
|
17801
|
-
agents: [
|
|
17797
|
+
agents: []
|
|
17802
17798
|
},
|
|
17803
17799
|
lean_turbo_status: {
|
|
17804
17800
|
description: "returns Lean Turbo configuration and active status for the current session",
|
|
17805
|
-
agents: [
|
|
17801
|
+
agents: []
|
|
17806
17802
|
},
|
|
17807
17803
|
apply_patch: {
|
|
17808
17804
|
description: "Apply a unified diff patch to workspace files with exact context matching, atomic writes, and path validation",
|
|
@@ -17888,7 +17884,7 @@ function freezeSet(items) {
|
|
|
17888
17884
|
});
|
|
17889
17885
|
return proxy;
|
|
17890
17886
|
}
|
|
17891
|
-
var OPENCODE_NATIVE_AGENTS, CLAUDE_CODE_NATIVE_COMMANDS, EXTERNAL_SKILL_TOOL_NAMES, EXTERNAL_SKILL_AGENT_TOOL_MAP, DEFAULT_AGENT_CONFIGS;
|
|
17887
|
+
var OPENCODE_NATIVE_AGENTS, CLAUDE_CODE_NATIVE_COMMANDS, EXTERNAL_SKILL_TOOL_NAMES, EXTERNAL_SKILL_AGENT_TOOL_MAP, COUNCIL_TOOL_NAMES, COUNCIL_AGENT_TOOL_MAP, GENERAL_COUNCIL_TOOL_NAMES, GENERAL_COUNCIL_AGENT_TOOL_MAP, TURBO_TOOL_NAMES, TURBO_AGENT_TOOL_MAP, DEFAULT_AGENT_CONFIGS;
|
|
17892
17888
|
var init_constants = __esm(() => {
|
|
17893
17889
|
init_agent_names();
|
|
17894
17890
|
init_tool_metadata();
|
|
@@ -18021,6 +18017,34 @@ var init_constants = __esm(() => {
|
|
|
18021
18017
|
EXTERNAL_SKILL_AGENT_TOOL_MAP = {
|
|
18022
18018
|
architect: [...EXTERNAL_SKILL_TOOL_NAMES]
|
|
18023
18019
|
};
|
|
18020
|
+
COUNCIL_TOOL_NAMES = [
|
|
18021
|
+
"submit_council_verdicts",
|
|
18022
|
+
"submit_phase_council_verdicts",
|
|
18023
|
+
"declare_council_criteria",
|
|
18024
|
+
"write_final_council_evidence"
|
|
18025
|
+
];
|
|
18026
|
+
COUNCIL_AGENT_TOOL_MAP = {
|
|
18027
|
+
architect: [...COUNCIL_TOOL_NAMES]
|
|
18028
|
+
};
|
|
18029
|
+
GENERAL_COUNCIL_TOOL_NAMES = [
|
|
18030
|
+
"convene_general_council",
|
|
18031
|
+
"web_search",
|
|
18032
|
+
"web_fetch"
|
|
18033
|
+
];
|
|
18034
|
+
GENERAL_COUNCIL_AGENT_TOOL_MAP = {
|
|
18035
|
+
architect: [...GENERAL_COUNCIL_TOOL_NAMES]
|
|
18036
|
+
};
|
|
18037
|
+
TURBO_TOOL_NAMES = [
|
|
18038
|
+
"lean_turbo_plan_lanes",
|
|
18039
|
+
"lean_turbo_acquire_locks",
|
|
18040
|
+
"lean_turbo_runner_status",
|
|
18041
|
+
"lean_turbo_review",
|
|
18042
|
+
"lean_turbo_run_phase",
|
|
18043
|
+
"lean_turbo_status"
|
|
18044
|
+
];
|
|
18045
|
+
TURBO_AGENT_TOOL_MAP = {
|
|
18046
|
+
architect: [...TURBO_TOOL_NAMES]
|
|
18047
|
+
};
|
|
18024
18048
|
DEFAULT_AGENT_CONFIGS = {
|
|
18025
18049
|
coder: {
|
|
18026
18050
|
model: "opencode/minimax-m2.5-free",
|
|
@@ -18434,7 +18458,7 @@ var init_schema = __esm(() => {
|
|
|
18434
18458
|
});
|
|
18435
18459
|
SummaryConfigSchema = exports_external.object({
|
|
18436
18460
|
enabled: exports_external.boolean().default(true),
|
|
18437
|
-
threshold_bytes: exports_external.number().min(1024).max(1048576).default(
|
|
18461
|
+
threshold_bytes: exports_external.number().min(1024).max(1048576).default(16384),
|
|
18438
18462
|
max_summary_chars: exports_external.number().min(100).max(5000).default(1000),
|
|
18439
18463
|
max_stored_bytes: exports_external.number().min(10240).max(104857600).default(10485760),
|
|
18440
18464
|
retention_days: exports_external.number().min(1).max(365).default(7),
|
|
@@ -37020,15 +37044,19 @@ function writeCheckpointLog(log2, directory) {
|
|
|
37020
37044
|
fs9.writeFileSync(tempPath, JSON.stringify(log2, null, 2), "utf-8");
|
|
37021
37045
|
fs9.renameSync(tempPath, logPath);
|
|
37022
37046
|
}
|
|
37023
|
-
function gitExec(args) {
|
|
37047
|
+
function gitExec(args, cwd) {
|
|
37024
37048
|
const result = child_process.spawnSync("git", args, {
|
|
37049
|
+
cwd,
|
|
37025
37050
|
encoding: "utf-8",
|
|
37026
37051
|
timeout: GIT_TIMEOUT_MS,
|
|
37027
|
-
stdio: ["
|
|
37052
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
37053
|
+
windowsHide: true
|
|
37028
37054
|
});
|
|
37055
|
+
if (result.error) {
|
|
37056
|
+
throw new Error(`git failed to start: ${result.error.code ?? "unknown"} \u2014 ${result.error.message}`);
|
|
37057
|
+
}
|
|
37029
37058
|
if (result.status !== 0) {
|
|
37030
|
-
|
|
37031
|
-
throw err;
|
|
37059
|
+
throw new Error(result.stderr?.trim() || `git exited with code ${result.status}`);
|
|
37032
37060
|
}
|
|
37033
37061
|
return result.stdout;
|
|
37034
37062
|
}
|
|
@@ -37040,13 +37068,13 @@ function appendRetentionEvent(directory, event) {
|
|
|
37040
37068
|
fs9.appendFileSync(eventsPath, line);
|
|
37041
37069
|
} catch {}
|
|
37042
37070
|
}
|
|
37043
|
-
function getCurrentSha() {
|
|
37044
|
-
const output = gitExec(["rev-parse", "HEAD"]);
|
|
37071
|
+
function getCurrentSha(directory) {
|
|
37072
|
+
const output = gitExec(["rev-parse", "HEAD"], directory);
|
|
37045
37073
|
return output.trim();
|
|
37046
37074
|
}
|
|
37047
|
-
function isGitRepo() {
|
|
37075
|
+
function isGitRepo(directory) {
|
|
37048
37076
|
try {
|
|
37049
|
-
gitExec(["rev-parse", "--git-dir"]);
|
|
37077
|
+
gitExec(["rev-parse", "--git-dir"], directory);
|
|
37050
37078
|
return true;
|
|
37051
37079
|
} catch {
|
|
37052
37080
|
return false;
|
|
@@ -37071,21 +37099,21 @@ function handleSave(label, directory) {
|
|
|
37071
37099
|
}, null, 2);
|
|
37072
37100
|
}
|
|
37073
37101
|
const timestamp = new Date().toISOString();
|
|
37074
|
-
gitExec(["add", "--all", "--", ":!.swarm/"]);
|
|
37102
|
+
gitExec(["add", "--all", "--", ":!.swarm/"], directory);
|
|
37075
37103
|
const hasStagedChanges = (() => {
|
|
37076
37104
|
try {
|
|
37077
|
-
gitExec(["diff", "--cached", "--quiet"]);
|
|
37105
|
+
gitExec(["diff", "--cached", "--quiet"], directory);
|
|
37078
37106
|
return false;
|
|
37079
37107
|
} catch {
|
|
37080
37108
|
return true;
|
|
37081
37109
|
}
|
|
37082
37110
|
})();
|
|
37083
37111
|
if (hasStagedChanges) {
|
|
37084
|
-
gitExec(["commit", "-m", `checkpoint: ${label}`]);
|
|
37112
|
+
gitExec(["commit", "-m", `checkpoint: ${label}`], directory);
|
|
37085
37113
|
} else if (allowEmptyCommits) {
|
|
37086
|
-
gitExec(["commit", "--allow-empty", "-m", `checkpoint: ${label}`]);
|
|
37114
|
+
gitExec(["commit", "--allow-empty", "-m", `checkpoint: ${label}`], directory);
|
|
37087
37115
|
}
|
|
37088
|
-
const newSha = getCurrentSha();
|
|
37116
|
+
const newSha = getCurrentSha(directory);
|
|
37089
37117
|
log2.checkpoints.push({
|
|
37090
37118
|
label,
|
|
37091
37119
|
sha: newSha,
|
|
@@ -37130,7 +37158,7 @@ function handleRestore(label, directory) {
|
|
|
37130
37158
|
error: `checkpoint not found: "${label}"`
|
|
37131
37159
|
}, null, 2);
|
|
37132
37160
|
}
|
|
37133
|
-
gitExec(["reset", "--soft", checkpoint.sha]);
|
|
37161
|
+
gitExec(["reset", "--soft", checkpoint.sha], directory);
|
|
37134
37162
|
return JSON.stringify({
|
|
37135
37163
|
action: "restore",
|
|
37136
37164
|
success: true,
|
|
@@ -37201,7 +37229,7 @@ var init_checkpoint = __esm(() => {
|
|
|
37201
37229
|
label: exports_external.string().optional().describe("Checkpoint label (required for save, restore, delete)")
|
|
37202
37230
|
},
|
|
37203
37231
|
execute: async (args, directory) => {
|
|
37204
|
-
if (!isGitRepo()) {
|
|
37232
|
+
if (!isGitRepo(directory)) {
|
|
37205
37233
|
return JSON.stringify({
|
|
37206
37234
|
action: "unknown",
|
|
37207
37235
|
success: false,
|
|
@@ -67722,7 +67750,7 @@ var init_registry = __esm(() => {
|
|
|
67722
67750
|
sessionID: ctx.sessionID
|
|
67723
67751
|
}),
|
|
67724
67752
|
description: "Use /swarm finalize to finalize the swarm project and archive evidence",
|
|
67725
|
-
details: "Idempotent 4-stage terminal finalization: (1) finalize writes retrospectives for in-progress phases, (2) archive creates timestamped bundle of swarm artifacts and evidence, (3) clean removes active-state files for a clean slate, (4) align performs
|
|
67753
|
+
details: "Idempotent 4-stage terminal finalization: (1) finalize writes retrospectives for in-progress phases, (2) archive creates timestamped bundle of swarm artifacts and evidence, (3) clean removes active-state files for a clean slate, (4) align performs aggressive git reset --hard to the default remote branch, discarding uncommitted changes and untracked files; falls back to a cautious reset that preserves uncommitted changes when the aggressive path cannot proceed. WARNING: alignment discards local changes and untracked files. Resets agent sessions and delegation chains. Reads .swarm/close-lessons.md for explicit lessons and runs curation. Use --skill-review to run the quota-bounded skill_improver in proposal mode.",
|
|
67726
67754
|
args: "--prune-branches, --skill-review",
|
|
67727
67755
|
category: "core",
|
|
67728
67756
|
toolPolicy: "none"
|
|
@@ -312,7 +312,7 @@ export declare const COMMAND_REGISTRY: {
|
|
|
312
312
|
readonly finalize: {
|
|
313
313
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
314
314
|
readonly description: "Use /swarm finalize to finalize the swarm project and archive evidence";
|
|
315
|
-
readonly details: "Idempotent 4-stage terminal finalization: (1) finalize writes retrospectives for in-progress phases, (2) archive creates timestamped bundle of swarm artifacts and evidence, (3) clean removes active-state files for a clean slate, (4) align performs
|
|
315
|
+
readonly details: "Idempotent 4-stage terminal finalization: (1) finalize writes retrospectives for in-progress phases, (2) archive creates timestamped bundle of swarm artifacts and evidence, (3) clean removes active-state files for a clean slate, (4) align performs aggressive git reset --hard to the default remote branch, discarding uncommitted changes and untracked files; falls back to a cautious reset that preserves uncommitted changes when the aggressive path cannot proceed. WARNING: alignment discards local changes and untracked files. Resets agent sessions and delegation chains. Reads .swarm/close-lessons.md for explicit lessons and runs curation. Use --skill-review to run the quota-bounded skill_improver in proposal mode.";
|
|
316
316
|
readonly args: "--prune-branches, --skill-review";
|
|
317
317
|
readonly category: "core";
|
|
318
318
|
readonly toolPolicy: "none";
|
|
@@ -9,6 +9,12 @@ export declare const MEMORY_TOOL_NAMES: readonly ["swarm_memory_recall", "swarm_
|
|
|
9
9
|
export declare const MEMORY_AGENT_TOOL_MAP: Partial<Record<AgentName, ToolName[]>>;
|
|
10
10
|
export declare const EXTERNAL_SKILL_TOOL_NAMES: readonly ["external_skill_discover", "external_skill_list", "external_skill_inspect", "external_skill_promote", "external_skill_reject", "external_skill_delete", "external_skill_revoke"];
|
|
11
11
|
export declare const EXTERNAL_SKILL_AGENT_TOOL_MAP: Partial<Record<AgentName, ToolName[]>>;
|
|
12
|
+
export declare const COUNCIL_TOOL_NAMES: readonly ["submit_council_verdicts", "submit_phase_council_verdicts", "declare_council_criteria", "write_final_council_evidence"];
|
|
13
|
+
export declare const COUNCIL_AGENT_TOOL_MAP: Partial<Record<AgentName, ToolName[]>>;
|
|
14
|
+
export declare const GENERAL_COUNCIL_TOOL_NAMES: readonly ["convene_general_council", "web_search", "web_fetch"];
|
|
15
|
+
export declare const GENERAL_COUNCIL_AGENT_TOOL_MAP: Partial<Record<AgentName, ToolName[]>>;
|
|
16
|
+
export declare const TURBO_TOOL_NAMES: readonly ["lean_turbo_plan_lanes", "lean_turbo_acquire_locks", "lean_turbo_runner_status", "lean_turbo_review", "lean_turbo_run_phase", "lean_turbo_status"];
|
|
17
|
+
export declare const TURBO_AGENT_TOOL_MAP: Partial<Record<AgentName, ToolName[]>>;
|
|
12
18
|
/**
|
|
13
19
|
* Human-readable descriptions for tools shown in the architect Available Tools block.
|
|
14
20
|
* Used to generate the Available Tools section of the architect prompt at construction time.
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ var package_default;
|
|
|
69
69
|
var init_package = __esm(() => {
|
|
70
70
|
package_default = {
|
|
71
71
|
name: "opencode-swarm",
|
|
72
|
-
version: "7.
|
|
72
|
+
version: "7.79.0",
|
|
73
73
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
74
74
|
main: "dist/index.js",
|
|
75
75
|
types: "dist/index.d.ts",
|
|
@@ -330,15 +330,15 @@ var init_tool_metadata = __esm(() => {
|
|
|
330
330
|
},
|
|
331
331
|
submit_council_verdicts: {
|
|
332
332
|
description: "submit pre-collected council member verdicts for synthesis (architect MUST dispatch critic/reviewer/sme/test_engineer/explorer as Agent tasks first; this tool synthesizes only, it does not contact members)",
|
|
333
|
-
agents: [
|
|
333
|
+
agents: []
|
|
334
334
|
},
|
|
335
335
|
submit_phase_council_verdicts: {
|
|
336
336
|
description: "submit pre-collected phase-level council member verdicts for holistic phase synthesis (architect MUST dispatch all 5 council members with phase-scoped context first; this tool synthesizes only, it does not contact members)",
|
|
337
|
-
agents: [
|
|
337
|
+
agents: []
|
|
338
338
|
},
|
|
339
339
|
declare_council_criteria: {
|
|
340
340
|
description: "pre-declare acceptance criteria for a task before the coder starts work; criteria are read back during council evaluation",
|
|
341
|
-
agents: [
|
|
341
|
+
agents: []
|
|
342
342
|
},
|
|
343
343
|
sbom_generate: {
|
|
344
344
|
description: "SBOM generation for dependency inventory",
|
|
@@ -600,19 +600,19 @@ var init_tool_metadata = __esm(() => {
|
|
|
600
600
|
},
|
|
601
601
|
web_search: {
|
|
602
602
|
description: "External web search (Tavily or Brave) for architect-driven council research, SME domain research, researcher auto-research, and skill-improver research. Returns titled results with snippets, URLs, normalized query metadata, temporal intent, freshness, and removed stale years. Config-gated on council.general.enabled in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides. Requires a search API key. Used by the architect in MODE: COUNCIL to gather a RESEARCH CONTEXT before dispatching council agents, by SME for opt-in external skill/source evaluation, and by the researcher agent for multi-source auto-research.",
|
|
603
|
-
agents: ["
|
|
603
|
+
agents: ["sme", "researcher", "skill_improver"]
|
|
604
604
|
},
|
|
605
605
|
web_fetch: {
|
|
606
606
|
description: "Fetch the readable text of a single http(s) URL (architect-only). Returns decoded page text, document title, final URL after redirects, and an evidence reference. Reads primary sources that web_search only surfaces as snippets. Config-gated on council.general.enabled. Blocks private/loopback/link-local/metadata addresses (re-validated and re-pinned across redirects); enforces timeout and body size cap.",
|
|
607
|
-
agents: [
|
|
607
|
+
agents: []
|
|
608
608
|
},
|
|
609
609
|
convene_general_council: {
|
|
610
610
|
description: "Synthesize responses from a multi-model General Council. Accepts parallel member responses (Round 1, optionally Round 2), detects disagreements, and returns consensus points, persisting disagreements, and a structured synthesis. Architect-only. Config-gated on council.general.enabled in the resolved config: global ~/.config/opencode/opencode-swarm.json, then project .opencode/opencode-swarm.json overrides.",
|
|
611
|
-
agents: [
|
|
611
|
+
agents: []
|
|
612
612
|
},
|
|
613
613
|
write_final_council_evidence: {
|
|
614
614
|
description: "Persist project-scoped final council evidence to .swarm/evidence/final-council.json. PREREQUISITE: dispatch critic, reviewer, sme, test_engineer, and explorer as project-scoped Agent tasks and collect their CouncilMemberVerdict JSON — this tool synthesizes only. Rejects on insufficient quorum or CONCERNS with unresolved requiredFixes; normalizes verdicts to approved/concerns/rejected. Architect-only.",
|
|
615
|
-
agents: [
|
|
615
|
+
agents: []
|
|
616
616
|
},
|
|
617
617
|
skill_generate: {
|
|
618
618
|
description: "compile knowledge entries into a structured SKILL.md draft",
|
|
@@ -646,10 +646,6 @@ var init_tool_metadata = __esm(() => {
|
|
|
646
646
|
description: "author or update .swarm/spec.md for the current project",
|
|
647
647
|
agents: ["spec_writer"]
|
|
648
648
|
},
|
|
649
|
-
knowledge_ack: {
|
|
650
|
-
description: "record an explicit KNOWLEDGE_APPLIED/IGNORED/VIOLATED acknowledgment",
|
|
651
|
-
agents: ["architect"]
|
|
652
|
-
},
|
|
653
649
|
knowledge_receipt: {
|
|
654
650
|
description: "file a receipt for retrieved knowledge (applied/ignored/contradicted + new lessons), recorded as immutable knowledge events",
|
|
655
651
|
agents: ["architect", "coder"]
|
|
@@ -706,27 +702,27 @@ var init_tool_metadata = __esm(() => {
|
|
|
706
702
|
},
|
|
707
703
|
lean_turbo_plan_lanes: {
|
|
708
704
|
description: "partition phase tasks into parallel lanes based on file-scope conflicts for Lean Turbo execution",
|
|
709
|
-
agents: [
|
|
705
|
+
agents: []
|
|
710
706
|
},
|
|
711
707
|
lean_turbo_acquire_locks: {
|
|
712
708
|
description: "acquire file locks for all files in a lane (all-or-nothing) before lane execution",
|
|
713
|
-
agents: [
|
|
709
|
+
agents: []
|
|
714
710
|
},
|
|
715
711
|
lean_turbo_runner_status: {
|
|
716
712
|
description: "read Lean Turbo run state from .swarm/turbo-state.json",
|
|
717
|
-
agents: [
|
|
713
|
+
agents: []
|
|
718
714
|
},
|
|
719
715
|
lean_turbo_review: {
|
|
720
716
|
description: "dispatch a read-only reviewer agent to evaluate a completed Lean Turbo phase",
|
|
721
|
-
agents: [
|
|
717
|
+
agents: []
|
|
722
718
|
},
|
|
723
719
|
lean_turbo_run_phase: {
|
|
724
720
|
description: "Execute a phase using Lean Turbo parallel lane execution. Plans lanes, acquires file locks, and dispatches coder agents concurrently. Use when Lean Turbo is active and you want to execute all tasks in a phase in parallel lanes.",
|
|
725
|
-
agents: [
|
|
721
|
+
agents: []
|
|
726
722
|
},
|
|
727
723
|
lean_turbo_status: {
|
|
728
724
|
description: "returns Lean Turbo configuration and active status for the current session",
|
|
729
|
-
agents: [
|
|
725
|
+
agents: []
|
|
730
726
|
},
|
|
731
727
|
apply_patch: {
|
|
732
728
|
description: "Apply a unified diff patch to workspace files with exact context matching, atomic writes, and path validation",
|
|
@@ -848,7 +844,7 @@ function isLowCapabilityModel(modelId) {
|
|
|
848
844
|
const lower = (modelId || "").toLowerCase();
|
|
849
845
|
return LOW_CAPABILITY_MODELS.some((substr) => lower.includes(substr));
|
|
850
846
|
}
|
|
851
|
-
var OPENCODE_NATIVE_AGENTS, CLAUDE_CODE_NATIVE_COMMANDS, MEMORY_AGENT_TOOL_MAP, EXTERNAL_SKILL_TOOL_NAMES, EXTERNAL_SKILL_AGENT_TOOL_MAP, WRITE_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_SCORING_CONFIG, LOW_CAPABILITY_MODELS, TURBO_MODE_BANNER = `## \uD83D\uDE80 TURBO MODE ACTIVE
|
|
847
|
+
var OPENCODE_NATIVE_AGENTS, CLAUDE_CODE_NATIVE_COMMANDS, MEMORY_AGENT_TOOL_MAP, EXTERNAL_SKILL_TOOL_NAMES, EXTERNAL_SKILL_AGENT_TOOL_MAP, COUNCIL_TOOL_NAMES, COUNCIL_AGENT_TOOL_MAP, GENERAL_COUNCIL_TOOL_NAMES, GENERAL_COUNCIL_AGENT_TOOL_MAP, TURBO_TOOL_NAMES, TURBO_AGENT_TOOL_MAP, WRITE_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_SCORING_CONFIG, LOW_CAPABILITY_MODELS, TURBO_MODE_BANNER = `## \uD83D\uDE80 TURBO MODE ACTIVE
|
|
852
848
|
|
|
853
849
|
**Speed optimization enabled for this session.**
|
|
854
850
|
|
|
@@ -1054,6 +1050,34 @@ var init_constants = __esm(() => {
|
|
|
1054
1050
|
EXTERNAL_SKILL_AGENT_TOOL_MAP = {
|
|
1055
1051
|
architect: [...EXTERNAL_SKILL_TOOL_NAMES]
|
|
1056
1052
|
};
|
|
1053
|
+
COUNCIL_TOOL_NAMES = [
|
|
1054
|
+
"submit_council_verdicts",
|
|
1055
|
+
"submit_phase_council_verdicts",
|
|
1056
|
+
"declare_council_criteria",
|
|
1057
|
+
"write_final_council_evidence"
|
|
1058
|
+
];
|
|
1059
|
+
COUNCIL_AGENT_TOOL_MAP = {
|
|
1060
|
+
architect: [...COUNCIL_TOOL_NAMES]
|
|
1061
|
+
};
|
|
1062
|
+
GENERAL_COUNCIL_TOOL_NAMES = [
|
|
1063
|
+
"convene_general_council",
|
|
1064
|
+
"web_search",
|
|
1065
|
+
"web_fetch"
|
|
1066
|
+
];
|
|
1067
|
+
GENERAL_COUNCIL_AGENT_TOOL_MAP = {
|
|
1068
|
+
architect: [...GENERAL_COUNCIL_TOOL_NAMES]
|
|
1069
|
+
};
|
|
1070
|
+
TURBO_TOOL_NAMES = [
|
|
1071
|
+
"lean_turbo_plan_lanes",
|
|
1072
|
+
"lean_turbo_acquire_locks",
|
|
1073
|
+
"lean_turbo_runner_status",
|
|
1074
|
+
"lean_turbo_review",
|
|
1075
|
+
"lean_turbo_run_phase",
|
|
1076
|
+
"lean_turbo_status"
|
|
1077
|
+
];
|
|
1078
|
+
TURBO_AGENT_TOOL_MAP = {
|
|
1079
|
+
architect: [...TURBO_TOOL_NAMES]
|
|
1080
|
+
};
|
|
1057
1081
|
WRITE_TOOL_NAMES = [
|
|
1058
1082
|
"write",
|
|
1059
1083
|
"edit",
|
|
@@ -15615,7 +15639,7 @@ var init_schema = __esm(() => {
|
|
|
15615
15639
|
});
|
|
15616
15640
|
SummaryConfigSchema = exports_external.object({
|
|
15617
15641
|
enabled: exports_external.boolean().default(true),
|
|
15618
|
-
threshold_bytes: exports_external.number().min(1024).max(1048576).default(
|
|
15642
|
+
threshold_bytes: exports_external.number().min(1024).max(1048576).default(16384),
|
|
15619
15643
|
max_summary_chars: exports_external.number().min(100).max(5000).default(1000),
|
|
15620
15644
|
max_stored_bytes: exports_external.number().min(10240).max(104857600).default(10485760),
|
|
15621
15645
|
retention_days: exports_external.number().min(1).max(365).default(7),
|
|
@@ -58440,15 +58464,19 @@ function writeCheckpointLog(log2, directory) {
|
|
|
58440
58464
|
fs19.writeFileSync(tempPath, JSON.stringify(log2, null, 2), "utf-8");
|
|
58441
58465
|
fs19.renameSync(tempPath, logPath);
|
|
58442
58466
|
}
|
|
58443
|
-
function gitExec(args2) {
|
|
58467
|
+
function gitExec(args2, cwd) {
|
|
58444
58468
|
const result = child_process.spawnSync("git", args2, {
|
|
58469
|
+
cwd,
|
|
58445
58470
|
encoding: "utf-8",
|
|
58446
58471
|
timeout: GIT_TIMEOUT_MS,
|
|
58447
|
-
stdio: ["
|
|
58472
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
58473
|
+
windowsHide: true
|
|
58448
58474
|
});
|
|
58475
|
+
if (result.error) {
|
|
58476
|
+
throw new Error(`git failed to start: ${result.error.code ?? "unknown"} — ${result.error.message}`);
|
|
58477
|
+
}
|
|
58449
58478
|
if (result.status !== 0) {
|
|
58450
|
-
|
|
58451
|
-
throw err2;
|
|
58479
|
+
throw new Error(result.stderr?.trim() || `git exited with code ${result.status}`);
|
|
58452
58480
|
}
|
|
58453
58481
|
return result.stdout;
|
|
58454
58482
|
}
|
|
@@ -58460,13 +58488,13 @@ function appendRetentionEvent(directory, event) {
|
|
|
58460
58488
|
fs19.appendFileSync(eventsPath, line);
|
|
58461
58489
|
} catch {}
|
|
58462
58490
|
}
|
|
58463
|
-
function getCurrentSha() {
|
|
58464
|
-
const output = gitExec(["rev-parse", "HEAD"]);
|
|
58491
|
+
function getCurrentSha(directory) {
|
|
58492
|
+
const output = gitExec(["rev-parse", "HEAD"], directory);
|
|
58465
58493
|
return output.trim();
|
|
58466
58494
|
}
|
|
58467
|
-
function isGitRepo() {
|
|
58495
|
+
function isGitRepo(directory) {
|
|
58468
58496
|
try {
|
|
58469
|
-
gitExec(["rev-parse", "--git-dir"]);
|
|
58497
|
+
gitExec(["rev-parse", "--git-dir"], directory);
|
|
58470
58498
|
return true;
|
|
58471
58499
|
} catch {
|
|
58472
58500
|
return false;
|
|
@@ -58491,21 +58519,21 @@ function handleSave(label, directory) {
|
|
|
58491
58519
|
}, null, 2);
|
|
58492
58520
|
}
|
|
58493
58521
|
const timestamp = new Date().toISOString();
|
|
58494
|
-
gitExec(["add", "--all", "--", ":!.swarm/"]);
|
|
58522
|
+
gitExec(["add", "--all", "--", ":!.swarm/"], directory);
|
|
58495
58523
|
const hasStagedChanges = (() => {
|
|
58496
58524
|
try {
|
|
58497
|
-
gitExec(["diff", "--cached", "--quiet"]);
|
|
58525
|
+
gitExec(["diff", "--cached", "--quiet"], directory);
|
|
58498
58526
|
return false;
|
|
58499
58527
|
} catch {
|
|
58500
58528
|
return true;
|
|
58501
58529
|
}
|
|
58502
58530
|
})();
|
|
58503
58531
|
if (hasStagedChanges) {
|
|
58504
|
-
gitExec(["commit", "-m", `checkpoint: ${label}`]);
|
|
58532
|
+
gitExec(["commit", "-m", `checkpoint: ${label}`], directory);
|
|
58505
58533
|
} else if (allowEmptyCommits) {
|
|
58506
|
-
gitExec(["commit", "--allow-empty", "-m", `checkpoint: ${label}`]);
|
|
58534
|
+
gitExec(["commit", "--allow-empty", "-m", `checkpoint: ${label}`], directory);
|
|
58507
58535
|
}
|
|
58508
|
-
const newSha = getCurrentSha();
|
|
58536
|
+
const newSha = getCurrentSha(directory);
|
|
58509
58537
|
log2.checkpoints.push({
|
|
58510
58538
|
label,
|
|
58511
58539
|
sha: newSha,
|
|
@@ -58550,9 +58578,9 @@ function saveCheckpointRecord(label, directory) {
|
|
|
58550
58578
|
return { success: false, error: `duplicate label: "${label}"` };
|
|
58551
58579
|
}
|
|
58552
58580
|
let sha = "";
|
|
58553
|
-
if (isGitRepo()) {
|
|
58581
|
+
if (isGitRepo(directory)) {
|
|
58554
58582
|
try {
|
|
58555
|
-
sha = getCurrentSha();
|
|
58583
|
+
sha = getCurrentSha(directory);
|
|
58556
58584
|
} catch {
|
|
58557
58585
|
sha = "";
|
|
58558
58586
|
}
|
|
@@ -58582,7 +58610,7 @@ function handleRestore(label, directory) {
|
|
|
58582
58610
|
error: `checkpoint not found: "${label}"`
|
|
58583
58611
|
}, null, 2);
|
|
58584
58612
|
}
|
|
58585
|
-
gitExec(["reset", "--soft", checkpoint.sha]);
|
|
58613
|
+
gitExec(["reset", "--soft", checkpoint.sha], directory);
|
|
58586
58614
|
return JSON.stringify({
|
|
58587
58615
|
action: "restore",
|
|
58588
58616
|
success: true,
|
|
@@ -58653,7 +58681,7 @@ var init_checkpoint = __esm(() => {
|
|
|
58653
58681
|
label: exports_external.string().optional().describe("Checkpoint label (required for save, restore, delete)")
|
|
58654
58682
|
},
|
|
58655
58683
|
execute: async (args2, directory) => {
|
|
58656
|
-
if (!isGitRepo()) {
|
|
58684
|
+
if (!isGitRepo(directory)) {
|
|
58657
58685
|
return JSON.stringify({
|
|
58658
58686
|
action: "unknown",
|
|
58659
58687
|
success: false,
|
|
@@ -92941,7 +92969,7 @@ var init_registry = __esm(() => {
|
|
|
92941
92969
|
sessionID: ctx.sessionID
|
|
92942
92970
|
}),
|
|
92943
92971
|
description: "Use /swarm finalize to finalize the swarm project and archive evidence",
|
|
92944
|
-
details: "Idempotent 4-stage terminal finalization: (1) finalize writes retrospectives for in-progress phases, (2) archive creates timestamped bundle of swarm artifacts and evidence, (3) clean removes active-state files for a clean slate, (4) align performs
|
|
92972
|
+
details: "Idempotent 4-stage terminal finalization: (1) finalize writes retrospectives for in-progress phases, (2) archive creates timestamped bundle of swarm artifacts and evidence, (3) clean removes active-state files for a clean slate, (4) align performs aggressive git reset --hard to the default remote branch, discarding uncommitted changes and untracked files; falls back to a cautious reset that preserves uncommitted changes when the aggressive path cannot proceed. WARNING: alignment discards local changes and untracked files. Resets agent sessions and delegation chains. Reads .swarm/close-lessons.md for explicit lessons and runs curation. Use --skill-review to run the quota-bounded skill_improver in proposal mode.",
|
|
92945
92973
|
args: "--prune-branches, --skill-review",
|
|
92946
92974
|
category: "core",
|
|
92947
92975
|
toolPolicy: "none"
|
|
@@ -93640,25 +93668,19 @@ Members verify prior findings are resolved without re-reviewing unchanged code.
|
|
|
93640
93668
|
The architect resolves any \`unresolvedConflicts\` in \`unifiedFeedbackMd\` BEFORE
|
|
93641
93669
|
sending it to the coder — the coder never sees contradictory instructions.`;
|
|
93642
93670
|
}
|
|
93643
|
-
function buildYourToolsList(council, memoryEnabled = false, externalSkillsEnabled = false) {
|
|
93671
|
+
function buildYourToolsList(council, memoryEnabled = false, externalSkillsEnabled = false, turboEnabled = false) {
|
|
93672
|
+
const qaCouncilEnabled = council?.enabled === true;
|
|
93673
|
+
const generalCouncilEnabled = council?.general?.enabled === true;
|
|
93644
93674
|
const tools = [
|
|
93645
93675
|
...AGENT_TOOL_MAP.architect ?? [],
|
|
93646
93676
|
...memoryEnabled ? MEMORY_AGENT_TOOL_MAP.architect ?? [] : [],
|
|
93647
|
-
...externalSkillsEnabled ? EXTERNAL_SKILL_AGENT_TOOL_MAP.architect ?? [] : []
|
|
93677
|
+
...externalSkillsEnabled ? EXTERNAL_SKILL_AGENT_TOOL_MAP.architect ?? [] : [],
|
|
93678
|
+
...qaCouncilEnabled ? COUNCIL_AGENT_TOOL_MAP.architect ?? [] : [],
|
|
93679
|
+
...generalCouncilEnabled ? GENERAL_COUNCIL_AGENT_TOOL_MAP.architect ?? [] : [],
|
|
93680
|
+
...turboEnabled ? TURBO_AGENT_TOOL_MAP.architect ?? [] : []
|
|
93648
93681
|
];
|
|
93649
93682
|
const sorted = [...tools].sort();
|
|
93650
|
-
|
|
93651
|
-
const generalCouncilEnabled = council?.general?.enabled === true;
|
|
93652
|
-
const filtered = sorted.filter((t) => {
|
|
93653
|
-
if (!qaCouncilEnabled && (t === "submit_council_verdicts" || t === "declare_council_criteria" || t === "submit_phase_council_verdicts")) {
|
|
93654
|
-
return false;
|
|
93655
|
-
}
|
|
93656
|
-
if (!generalCouncilEnabled && t === "convene_general_council") {
|
|
93657
|
-
return false;
|
|
93658
|
-
}
|
|
93659
|
-
return true;
|
|
93660
|
-
});
|
|
93661
|
-
return `Task (delegation), ${filtered.join(", ")}.`;
|
|
93683
|
+
return `Task (delegation), ${sorted.join(", ")}.`;
|
|
93662
93684
|
}
|
|
93663
93685
|
function buildQaGateSelectionDialogue(modeLabel) {
|
|
93664
93686
|
const leadIn = modeLabel === "BRAINSTORM" ? "Now ask the user which QA gates to enable for this plan — do not select on their behalf." : modeLabel === "SPECIFY" ? "Ask the user which QA gates to enable for this plan before suggesting the next step." : "No pending gate selection found in `.swarm/context.md`. Ask the user inline now.";
|
|
@@ -93707,25 +93729,19 @@ If the user accepts the default (1), skip writing this section entirely — seri
|
|
|
93707
93729
|
\`\`\`
|
|
93708
93730
|
If the user keeps the default phase-level behavior, do not write this section.`;
|
|
93709
93731
|
}
|
|
93710
|
-
function buildAvailableToolsList(council, memoryEnabled = false, externalSkillsEnabled = false) {
|
|
93732
|
+
function buildAvailableToolsList(council, memoryEnabled = false, externalSkillsEnabled = false, turboEnabled = false) {
|
|
93733
|
+
const qaCouncilEnabled = council?.enabled === true;
|
|
93734
|
+
const generalCouncilEnabled = council?.general?.enabled === true;
|
|
93711
93735
|
const tools = [
|
|
93712
93736
|
...AGENT_TOOL_MAP.architect ?? [],
|
|
93713
93737
|
...memoryEnabled ? MEMORY_AGENT_TOOL_MAP.architect ?? [] : [],
|
|
93714
|
-
...externalSkillsEnabled ? EXTERNAL_SKILL_AGENT_TOOL_MAP.architect ?? [] : []
|
|
93738
|
+
...externalSkillsEnabled ? EXTERNAL_SKILL_AGENT_TOOL_MAP.architect ?? [] : [],
|
|
93739
|
+
...qaCouncilEnabled ? COUNCIL_AGENT_TOOL_MAP.architect ?? [] : [],
|
|
93740
|
+
...generalCouncilEnabled ? GENERAL_COUNCIL_AGENT_TOOL_MAP.architect ?? [] : [],
|
|
93741
|
+
...turboEnabled ? TURBO_AGENT_TOOL_MAP.architect ?? [] : []
|
|
93715
93742
|
];
|
|
93716
93743
|
const sorted = [...tools].sort();
|
|
93717
|
-
|
|
93718
|
-
const generalCouncilEnabled = council?.general?.enabled === true;
|
|
93719
|
-
const filtered = sorted.filter((t) => {
|
|
93720
|
-
if (!qaCouncilEnabled && (t === "submit_council_verdicts" || t === "declare_council_criteria" || t === "submit_phase_council_verdicts")) {
|
|
93721
|
-
return false;
|
|
93722
|
-
}
|
|
93723
|
-
if (!generalCouncilEnabled && t === "convene_general_council") {
|
|
93724
|
-
return false;
|
|
93725
|
-
}
|
|
93726
|
-
return true;
|
|
93727
|
-
});
|
|
93728
|
-
return filtered.map((t) => {
|
|
93744
|
+
return sorted.map((t) => {
|
|
93729
93745
|
const desc = TOOL_DESCRIPTIONS[t];
|
|
93730
93746
|
return desc ? `${t} (${desc})` : t;
|
|
93731
93747
|
}).join(", ");
|
|
@@ -93858,7 +93874,7 @@ function buildSlashCommandsList() {
|
|
|
93858
93874
|
return lines.join(`
|
|
93859
93875
|
`);
|
|
93860
93876
|
}
|
|
93861
|
-
function createArchitectAgent(model, customPrompt, customAppendPrompt, adversarialTesting, council, uiReview, memoryEnabled = false, architecturalSupervision, designDocsEnabled = false, externalSkillsEnabled = false) {
|
|
93877
|
+
function createArchitectAgent(model, customPrompt, customAppendPrompt, adversarialTesting, council, uiReview, memoryEnabled = false, architecturalSupervision, designDocsEnabled = false, externalSkillsEnabled = false, turboEnabled = false) {
|
|
93862
93878
|
let prompt = ARCHITECT_PROMPT;
|
|
93863
93879
|
if (customPrompt) {
|
|
93864
93880
|
prompt = customPrompt;
|
|
@@ -93867,7 +93883,7 @@ function createArchitectAgent(model, customPrompt, customAppendPrompt, adversari
|
|
|
93867
93883
|
|
|
93868
93884
|
${customAppendPrompt}`;
|
|
93869
93885
|
}
|
|
93870
|
-
prompt = prompt?.replace("{{YOUR_TOOLS}}", buildYourToolsList(council, memoryEnabled, externalSkillsEnabled))?.replace("{{AVAILABLE_TOOLS}}", buildAvailableToolsList(council, memoryEnabled, externalSkillsEnabled))?.replace("{{SLASH_COMMANDS}}", buildSlashCommandsList());
|
|
93886
|
+
prompt = prompt?.replace("{{YOUR_TOOLS}}", buildYourToolsList(council, memoryEnabled, externalSkillsEnabled, turboEnabled))?.replace("{{AVAILABLE_TOOLS}}", buildAvailableToolsList(council, memoryEnabled, externalSkillsEnabled, turboEnabled))?.replace("{{SLASH_COMMANDS}}", buildSlashCommandsList());
|
|
93871
93887
|
prompt = prompt?.replace(/\{\{QA_GATE_DIALOGUE_SPECIFY\}\}/g, buildQaGateSelectionDialogue("SPECIFY"))?.replace(/\{\{QA_GATE_DIALOGUE_BRAINSTORM\}\}/g, buildQaGateSelectionDialogue("BRAINSTORM"))?.replace(/\{\{QA_GATE_DIALOGUE_PLAN\}\}/g, buildQaGateSelectionDialogue("PLAN"));
|
|
93872
93888
|
const councilBlock = buildCouncilWorkflow(council);
|
|
93873
93889
|
const hasPlaceholder = prompt?.includes("{{COUNCIL_WORKFLOW}}") === true;
|
|
@@ -94168,6 +94184,7 @@ diff → syntax_check → placeholder_scan → imports → lint fix → build_ch
|
|
|
94168
94184
|
Stage A tools return pass/fail. Fix failures by returning to coder.
|
|
94169
94185
|
Stage A passing means: code compiles, parses, no secrets, no placeholders, no lint errors.
|
|
94170
94186
|
Stage A passing does NOT mean: code is correct, secure, tested, or reviewed.
|
|
94187
|
+
PREFERRED AGGREGATOR: pre_check_batch runs lint:check + secretscan + sast_scan + quality_budget in PARALLEL (up to 4 concurrent). Prefer calling pre_check_batch over running those four tools individually — it produces the same verdicts faster and is the recommended approach for post-implementation verification. NOTE: pre_check_batch does NOT expose capture_baseline, changed_files scoping, or per-tool severity_threshold parameters. When you need SAST baseline capture or file-scoped scanning, call sast_scan or secretscan directly.
|
|
94171
94188
|
|
|
94172
94189
|
VERIFICATION PROTOCOL: After the coder reports DONE, and before running Stage B gates:
|
|
94173
94190
|
1. Read at least ONE of the modified files yourself to confirm the change exists
|
|
@@ -94350,7 +94367,7 @@ For every applicable directive in the block:
|
|
|
94350
94367
|
- If runtime evidence shows a directive was violated (reviewer rejection, failing test, scope breach), record \`KNOWLEDGE_VIOLATED: <id> reason=<reason>\` and re-plan.
|
|
94351
94368
|
- NEVER silently ignore a \`priority: critical\` directive. The knowledge_application gate may run in 'enforce' mode; in that mode an omitted ack on a critical directive blocks the action.
|
|
94352
94369
|
|
|
94353
|
-
|
|
94370
|
+
Chat-text markers (KNOWLEDGE_APPLIED/IGNORED/VIOLATED) are the sole mechanism that satisfies the knowledge-application enforcement gate. The \`knowledge_receipt\` tool records knowledge-usage receipts for audit but does NOT satisfy the gate.
|
|
94354
94371
|
|
|
94355
94372
|
## SKILL IMPROVER (low-frequency, expensive-model adviser)
|
|
94356
94373
|
|
|
@@ -97473,7 +97490,7 @@ function createSwarmAgents(swarmId, swarmConfig, isDefault, pluginConfig, projec
|
|
|
97473
97490
|
const prefixName = (name2) => `${prefix}${name2}`;
|
|
97474
97491
|
if (!isAgentDisabled("architect", swarmAgents, swarmPrefix)) {
|
|
97475
97492
|
const architectPrompts = getPrompts("architect");
|
|
97476
|
-
const architect = createArchitectAgent(getModel("architect"), architectPrompts.prompt, architectPrompts.appendPrompt, pluginConfig?.adversarial_testing, pluginConfig?.council, pluginConfig?.ui_review, pluginConfig?.memory?.enabled === true, pluginConfig?.architectural_supervision, pluginConfig?.design_docs?.enabled === true, pluginConfig?.external_skills?.curation_enabled === true);
|
|
97493
|
+
const architect = createArchitectAgent(getModel("architect"), architectPrompts.prompt, architectPrompts.appendPrompt, pluginConfig?.adversarial_testing, pluginConfig?.council, pluginConfig?.ui_review, pluginConfig?.memory?.enabled === true, pluginConfig?.architectural_supervision, pluginConfig?.design_docs?.enabled === true, pluginConfig?.external_skills?.curation_enabled === true, pluginConfig?.turbo !== undefined);
|
|
97477
97494
|
architect.name = prefixName("architect");
|
|
97478
97495
|
const swarmName = swarmConfig.name || swarmId;
|
|
97479
97496
|
const swarmIdentity = isDefault ? "default" : swarmId;
|
|
@@ -97790,20 +97807,30 @@ function getAgentConfigs(config3, directory, sessionId, projectContext) {
|
|
|
97790
97807
|
allowedTools = Array.from(new Set([...allowedTools ?? [], ...externalSkillTools]));
|
|
97791
97808
|
}
|
|
97792
97809
|
}
|
|
97793
|
-
if (
|
|
97794
|
-
const
|
|
97795
|
-
|
|
97796
|
-
|
|
97797
|
-
|
|
97798
|
-
|
|
97799
|
-
|
|
97800
|
-
|
|
97810
|
+
if (config3?.council?.enabled === true) {
|
|
97811
|
+
const councilTools = COUNCIL_AGENT_TOOL_MAP[baseAgentName] ?? [];
|
|
97812
|
+
if (councilTools.length > 0) {
|
|
97813
|
+
allowedTools = Array.from(new Set([...allowedTools ?? [], ...councilTools]));
|
|
97814
|
+
}
|
|
97815
|
+
}
|
|
97816
|
+
if (config3?.council?.general?.enabled === true) {
|
|
97817
|
+
const generalCouncilTools = GENERAL_COUNCIL_AGENT_TOOL_MAP[baseAgentName] ?? [];
|
|
97818
|
+
if (generalCouncilTools.length > 0) {
|
|
97819
|
+
allowedTools = Array.from(new Set([...allowedTools ?? [], ...generalCouncilTools]));
|
|
97820
|
+
}
|
|
97821
|
+
}
|
|
97822
|
+
if (config3?.turbo !== undefined) {
|
|
97823
|
+
const turboTools = TURBO_AGENT_TOOL_MAP[baseAgentName] ?? [];
|
|
97824
|
+
if (turboTools.length > 0) {
|
|
97825
|
+
allowedTools = Array.from(new Set([...allowedTools ?? [], ...turboTools]));
|
|
97801
97826
|
}
|
|
97802
97827
|
}
|
|
97803
97828
|
if (baseAgentName === "architect" && config3?.council?.enabled !== true && override !== undefined) {
|
|
97804
97829
|
const councilTools = [
|
|
97805
97830
|
"declare_council_criteria",
|
|
97806
|
-
"submit_council_verdicts"
|
|
97831
|
+
"submit_council_verdicts",
|
|
97832
|
+
"submit_phase_council_verdicts",
|
|
97833
|
+
"write_final_council_evidence"
|
|
97807
97834
|
];
|
|
97808
97835
|
const present = councilTools.filter((t) => override.includes(t));
|
|
97809
97836
|
if (present.length > 0 && !quiet) {
|
|
@@ -128992,65 +129019,6 @@ var imports = createSwarmTool({
|
|
|
128992
129019
|
}
|
|
128993
129020
|
});
|
|
128994
129021
|
|
|
128995
|
-
// src/tools/knowledge-ack.ts
|
|
128996
|
-
init_zod();
|
|
128997
|
-
import { randomUUID as randomUUID13 } from "node:crypto";
|
|
128998
|
-
init_state();
|
|
128999
|
-
init_logger();
|
|
129000
|
-
init_create_tool();
|
|
129001
|
-
var knowledge_ack = createSwarmTool({
|
|
129002
|
-
description: "Record an acknowledgment outcome (applied/ignored/violated) for a previously-injected knowledge directive. Updates retrieval-outcome counters and appends a record to .swarm/knowledge-application.jsonl.",
|
|
129003
|
-
args: {
|
|
129004
|
-
id: exports_external.string().min(8).describe("Knowledge entry id from <swarm_knowledge_directives>."),
|
|
129005
|
-
result: exports_external.enum(["applied", "ignored", "violated"]),
|
|
129006
|
-
reason: exports_external.string().max(280).optional(),
|
|
129007
|
-
phase: exports_external.string().optional(),
|
|
129008
|
-
task_id: exports_external.string().optional(),
|
|
129009
|
-
action: exports_external.string().optional(),
|
|
129010
|
-
tool: exports_external.string().optional(),
|
|
129011
|
-
target_agent: exports_external.string().optional(),
|
|
129012
|
-
generated_skill_path: exports_external.string().optional()
|
|
129013
|
-
},
|
|
129014
|
-
execute: async (args2, directory, ctx) => {
|
|
129015
|
-
const a = args2 ?? {};
|
|
129016
|
-
if (!a.id || typeof a.id !== "string" || a.id.length < 8) {
|
|
129017
|
-
return JSON.stringify({ recorded: false, error: "invalid id" });
|
|
129018
|
-
}
|
|
129019
|
-
if (a.result !== "applied" && a.result !== "ignored" && a.result !== "violated") {
|
|
129020
|
-
return JSON.stringify({ recorded: false, error: "invalid result" });
|
|
129021
|
-
}
|
|
129022
|
-
const ack = {
|
|
129023
|
-
id: a.id,
|
|
129024
|
-
result: a.result,
|
|
129025
|
-
reason: a.reason
|
|
129026
|
-
};
|
|
129027
|
-
let sessionId = ctx?.sessionID;
|
|
129028
|
-
if (!sessionId) {
|
|
129029
|
-
warn("[knowledge-ack] No sessionID in tool context — dedup disabled for this acknowledgment");
|
|
129030
|
-
sessionId = randomUUID13();
|
|
129031
|
-
}
|
|
129032
|
-
const dedupKey = buildAckDedupKey(sessionId, a.id, a.result);
|
|
129033
|
-
if (swarmState.knowledgeAckDedup.has(dedupKey)) {
|
|
129034
|
-
return JSON.stringify({
|
|
129035
|
-
recorded: false,
|
|
129036
|
-
reason: "duplicate_ack",
|
|
129037
|
-
id: a.id,
|
|
129038
|
-
result: a.result
|
|
129039
|
-
}, null, 2);
|
|
129040
|
-
}
|
|
129041
|
-
addKnowledgeAckDedup(dedupKey);
|
|
129042
|
-
await recordAcknowledgment(directory, ack, {
|
|
129043
|
-
phase: a.phase,
|
|
129044
|
-
taskId: a.task_id,
|
|
129045
|
-
action: a.action,
|
|
129046
|
-
tool: a.tool,
|
|
129047
|
-
targetAgent: a.target_agent,
|
|
129048
|
-
sessionId
|
|
129049
|
-
});
|
|
129050
|
-
return JSON.stringify({ recorded: true, id: a.id, result: a.result }, null, 2);
|
|
129051
|
-
}
|
|
129052
|
-
});
|
|
129053
|
-
|
|
129054
129022
|
// src/tools/knowledge-add.ts
|
|
129055
129023
|
init_zod();
|
|
129056
129024
|
init_config();
|
|
@@ -129059,7 +129027,7 @@ init_knowledge_store();
|
|
|
129059
129027
|
init_knowledge_validator();
|
|
129060
129028
|
init_manager();
|
|
129061
129029
|
init_create_tool();
|
|
129062
|
-
import { randomUUID as
|
|
129030
|
+
import { randomUUID as randomUUID13 } from "node:crypto";
|
|
129063
129031
|
var VALID_CATEGORIES2 = [
|
|
129064
129032
|
"process",
|
|
129065
129033
|
"architecture",
|
|
@@ -129158,7 +129126,7 @@ var knowledge_add = createSwarmTool({
|
|
|
129158
129126
|
}
|
|
129159
129127
|
} catch {}
|
|
129160
129128
|
const entry = {
|
|
129161
|
-
id:
|
|
129129
|
+
id: randomUUID13(),
|
|
129162
129130
|
tier: "swarm",
|
|
129163
129131
|
lesson,
|
|
129164
129132
|
category,
|
|
@@ -146695,7 +146663,6 @@ var TOOL_MANIFEST = defineHandlers({
|
|
|
146695
146663
|
skill_retire: () => skill_retire,
|
|
146696
146664
|
skill_improve: () => skill_improve,
|
|
146697
146665
|
spec_write: () => spec_write,
|
|
146698
|
-
knowledge_ack: () => knowledge_ack,
|
|
146699
146666
|
knowledge_receipt: () => knowledge_receipt,
|
|
146700
146667
|
knowledge_archive: () => knowledge_archive,
|
|
146701
146668
|
swarm_memory_recall: () => swarm_memory_recall,
|
|
@@ -146729,7 +146696,6 @@ function buildPluginToolObject(agents, config3) {
|
|
|
146729
146696
|
"knowledge_recall",
|
|
146730
146697
|
"knowledge_remove",
|
|
146731
146698
|
"knowledge_query",
|
|
146732
|
-
"knowledge_ack",
|
|
146733
146699
|
"knowledge_receipt",
|
|
146734
146700
|
"knowledge_archive"
|
|
146735
146701
|
]);
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -32,7 +32,6 @@ export { get_qa_gate_profile } from './get-qa-gate-profile';
|
|
|
32
32
|
export { git_blame } from './git-blame';
|
|
33
33
|
export { fetchGitingest, type GitingestArgs, gitingest } from './gitingest';
|
|
34
34
|
export { imports } from './imports';
|
|
35
|
-
export { knowledge_ack } from './knowledge-ack';
|
|
36
35
|
export { knowledge_add } from './knowledge-add';
|
|
37
36
|
export { knowledge_archive } from './knowledge-archive';
|
|
38
37
|
export { knowledge_query } from './knowledge-query';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* knowledge_receipt — the
|
|
2
|
+
* knowledge_receipt — the knowledge acknowledgment tool (replaces the former knowledge_ack).
|
|
3
3
|
*
|
|
4
4
|
* An agent files a single receipt summarizing how it considered the knowledge
|
|
5
5
|
* surfaced by a retrieval (referenced by `trace_id`): which entries were
|
package/dist/tools/manifest.d.ts
CHANGED
|
@@ -94,7 +94,6 @@ export declare const TOOL_MANIFEST: {
|
|
|
94
94
|
skill_retire: () => ToolDefinition;
|
|
95
95
|
skill_improve: () => ToolDefinition;
|
|
96
96
|
spec_write: () => ToolDefinition;
|
|
97
|
-
knowledge_ack: () => ToolDefinition;
|
|
98
97
|
knowledge_receipt: () => ToolDefinition;
|
|
99
98
|
knowledge_archive: () => ToolDefinition;
|
|
100
99
|
swarm_memory_recall: () => ToolDefinition;
|
|
@@ -101,15 +101,15 @@ export declare const TOOL_METADATA: {
|
|
|
101
101
|
};
|
|
102
102
|
submit_council_verdicts: {
|
|
103
103
|
description: string;
|
|
104
|
-
agents:
|
|
104
|
+
agents: never[];
|
|
105
105
|
};
|
|
106
106
|
submit_phase_council_verdicts: {
|
|
107
107
|
description: string;
|
|
108
|
-
agents:
|
|
108
|
+
agents: never[];
|
|
109
109
|
};
|
|
110
110
|
declare_council_criteria: {
|
|
111
111
|
description: string;
|
|
112
|
-
agents:
|
|
112
|
+
agents: never[];
|
|
113
113
|
};
|
|
114
114
|
sbom_generate: {
|
|
115
115
|
description: string;
|
|
@@ -261,19 +261,19 @@ export declare const TOOL_METADATA: {
|
|
|
261
261
|
};
|
|
262
262
|
web_search: {
|
|
263
263
|
description: string;
|
|
264
|
-
agents: ("sme" | "
|
|
264
|
+
agents: ("sme" | "researcher" | "skill_improver")[];
|
|
265
265
|
};
|
|
266
266
|
web_fetch: {
|
|
267
267
|
description: string;
|
|
268
|
-
agents:
|
|
268
|
+
agents: never[];
|
|
269
269
|
};
|
|
270
270
|
convene_general_council: {
|
|
271
271
|
description: string;
|
|
272
|
-
agents:
|
|
272
|
+
agents: never[];
|
|
273
273
|
};
|
|
274
274
|
write_final_council_evidence: {
|
|
275
275
|
description: string;
|
|
276
|
-
agents:
|
|
276
|
+
agents: never[];
|
|
277
277
|
};
|
|
278
278
|
skill_generate: {
|
|
279
279
|
description: string;
|
|
@@ -307,10 +307,6 @@ export declare const TOOL_METADATA: {
|
|
|
307
307
|
description: string;
|
|
308
308
|
agents: "spec_writer"[];
|
|
309
309
|
};
|
|
310
|
-
knowledge_ack: {
|
|
311
|
-
description: string;
|
|
312
|
-
agents: "architect"[];
|
|
313
|
-
};
|
|
314
310
|
knowledge_receipt: {
|
|
315
311
|
description: string;
|
|
316
312
|
agents: ("coder" | "architect")[];
|
|
@@ -345,27 +341,27 @@ export declare const TOOL_METADATA: {
|
|
|
345
341
|
};
|
|
346
342
|
lean_turbo_plan_lanes: {
|
|
347
343
|
description: string;
|
|
348
|
-
agents:
|
|
344
|
+
agents: never[];
|
|
349
345
|
};
|
|
350
346
|
lean_turbo_acquire_locks: {
|
|
351
347
|
description: string;
|
|
352
|
-
agents:
|
|
348
|
+
agents: never[];
|
|
353
349
|
};
|
|
354
350
|
lean_turbo_runner_status: {
|
|
355
351
|
description: string;
|
|
356
|
-
agents:
|
|
352
|
+
agents: never[];
|
|
357
353
|
};
|
|
358
354
|
lean_turbo_review: {
|
|
359
355
|
description: string;
|
|
360
|
-
agents:
|
|
356
|
+
agents: never[];
|
|
361
357
|
};
|
|
362
358
|
lean_turbo_run_phase: {
|
|
363
359
|
description: string;
|
|
364
|
-
agents:
|
|
360
|
+
agents: never[];
|
|
365
361
|
};
|
|
366
362
|
lean_turbo_status: {
|
|
367
363
|
description: string;
|
|
368
|
-
agents:
|
|
364
|
+
agents: never[];
|
|
369
365
|
};
|
|
370
366
|
apply_patch: {
|
|
371
367
|
description: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.79.0",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|