opencode-swarm 6.86.6 → 6.86.8
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 +28 -0
- package/dist/cli/index.js +182 -45
- package/dist/config/schema.d.ts +3 -0
- package/dist/council/types.d.ts +5 -1
- package/dist/db/global-db.d.ts +1 -1
- package/dist/db/project-db.d.ts +1 -1
- package/dist/db/qa-gate-profile.d.ts +1 -1
- package/dist/index.js +4520 -4276
- package/dist/services/version-check.d.ts +28 -0
- package/dist/state.d.ts +16 -3
- package/dist/tools/convene-council.d.ts +10 -5
- package/dist/tools/declare-council-criteria.d.ts +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/tool-names.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
interface VersionCheckCache {
|
|
2
|
+
checkedAt: number;
|
|
3
|
+
npmLatest: string | null;
|
|
4
|
+
}
|
|
5
|
+
export declare function readVersionCache(): VersionCheckCache | null;
|
|
6
|
+
/**
|
|
7
|
+
* Compare two semver-ish version strings. Returns 1 if `a > b`, -1 if `a < b`,
|
|
8
|
+
* 0 if equal. Treats prerelease tags as lower than the release. Pure function.
|
|
9
|
+
*/
|
|
10
|
+
export declare function compareVersions(a: string, b: string): number;
|
|
11
|
+
/**
|
|
12
|
+
* Schedule a one-shot, fully detached version check. Returns immediately.
|
|
13
|
+
* Emits a deferred warning via `emitWarning` when a newer version is found.
|
|
14
|
+
*
|
|
15
|
+
* @param runningVersion The version of the currently-loaded plugin.
|
|
16
|
+
* @param emitWarning Callback used to surface the staleness notice.
|
|
17
|
+
* @param now Time source — overridable for tests.
|
|
18
|
+
* @param fetchImpl Fetcher — overridable for tests.
|
|
19
|
+
*/
|
|
20
|
+
export declare function scheduleVersionCheck(runningVersion: string, emitWarning: (msg: string) => void, options?: {
|
|
21
|
+
now?: () => number;
|
|
22
|
+
fetchImpl?: (signal: AbortSignal) => Promise<string | null>;
|
|
23
|
+
}): void;
|
|
24
|
+
/**
|
|
25
|
+
* Test-only: reset the in-process latch so a subsequent schedule call runs.
|
|
26
|
+
*/
|
|
27
|
+
export declare function _resetVersionCheckLatchForTests(): void;
|
|
28
|
+
export {};
|
package/dist/state.d.ts
CHANGED
|
@@ -112,10 +112,17 @@ export interface AgentSessionState {
|
|
|
112
112
|
* Only populated when parallelization.stageB.parallel.enabled = true.
|
|
113
113
|
*/
|
|
114
114
|
stageBCompletion?: Map<string, Set<'reviewer' | 'test_engineer'>>;
|
|
115
|
-
/** v6.71+ Council mode: per-task council verdict, recorded by delegation-gate when
|
|
115
|
+
/** v6.71+ Council mode: per-task council verdict, recorded by delegation-gate when submit_council_verdicts resolves. */
|
|
116
116
|
taskCouncilApproved?: Map<string, {
|
|
117
117
|
verdict: 'APPROVE' | 'REJECT' | 'CONCERNS';
|
|
118
118
|
roundNumber: number;
|
|
119
|
+
/**
|
|
120
|
+
* Distinct council members that voted on this verdict.
|
|
121
|
+
* Validated by the council fast-path against `council.minimumMembers`
|
|
122
|
+
* (default 3). Old evidence files without this field rehydrate as
|
|
123
|
+
* quorumSize: 1 — conservative; forces a fresh council run.
|
|
124
|
+
*/
|
|
125
|
+
quorumSize: number;
|
|
119
126
|
}>;
|
|
120
127
|
/** Last gate outcome for deliberation preamble injection */
|
|
121
128
|
lastGateOutcome: {
|
|
@@ -359,7 +366,10 @@ export declare function recordPhaseAgentDispatch(sessionId: string, agentName: s
|
|
|
359
366
|
* @param taskId - The task identifier
|
|
360
367
|
* @param newState - The requested new state
|
|
361
368
|
*/
|
|
362
|
-
export declare function advanceTaskState(session: AgentSessionState, taskId: string, newState: TaskWorkflowState
|
|
369
|
+
export declare function advanceTaskState(session: AgentSessionState, taskId: string, newState: TaskWorkflowState, councilConfig?: {
|
|
370
|
+
minimumMembers?: number;
|
|
371
|
+
requireAllMembers?: boolean;
|
|
372
|
+
}): void;
|
|
363
373
|
/**
|
|
364
374
|
* Advance the per-task workflow state machine AND persist the corresponding
|
|
365
375
|
* plan.json status at meaningful workflow boundaries.
|
|
@@ -377,7 +387,10 @@ export declare function advanceTaskState(session: AgentSessionState, taskId: str
|
|
|
377
387
|
* not break the in-memory state machine — matches the existing defensive
|
|
378
388
|
* pattern around advanceTaskState call sites.
|
|
379
389
|
*/
|
|
380
|
-
export declare function advanceTaskStateAndPersist(session: AgentSessionState, taskId: string, newState: TaskWorkflowState, directory: string
|
|
390
|
+
export declare function advanceTaskStateAndPersist(session: AgentSessionState, taskId: string, newState: TaskWorkflowState, directory: string, councilConfig?: {
|
|
391
|
+
minimumMembers?: number;
|
|
392
|
+
requireAllMembers?: boolean;
|
|
393
|
+
}): Promise<void>;
|
|
381
394
|
/**
|
|
382
395
|
* Get the current workflow state for a task.
|
|
383
396
|
* Returns 'idle' if no entry exists.
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Submit Council Verdicts — architect-only tool.
|
|
3
3
|
*
|
|
4
|
-
* Accepts parallel verdicts from critic, reviewer, sme,
|
|
5
|
-
* then synthesizes them into a veto-aware
|
|
6
|
-
* and a single unified feedback document.
|
|
4
|
+
* Accepts pre-collected parallel verdicts from critic, reviewer, sme,
|
|
5
|
+
* test_engineer, and explorer, then synthesizes them into a veto-aware
|
|
6
|
+
* overall verdict with required fixes and a single unified feedback document.
|
|
7
|
+
*
|
|
8
|
+
* PREREQUISITE: The architect must dispatch each council member as a separate
|
|
9
|
+
* Agent task and collect the resulting CouncilMemberVerdict objects BEFORE
|
|
10
|
+
* calling this tool. This tool performs synthesis only — it does NOT dispatch,
|
|
11
|
+
* invoke, or contact council members.
|
|
7
12
|
*
|
|
8
13
|
* Config-gated (council.enabled must be true) and architect-only via
|
|
9
14
|
* AGENT_TOOL_MAP. Follows the check-gate-status.ts pattern.
|
|
@@ -45,4 +50,4 @@ export declare const ArgsSchema: z.ZodObject<{
|
|
|
45
50
|
}, z.core.$strip>>;
|
|
46
51
|
working_directory: z.ZodOptional<z.ZodString>;
|
|
47
52
|
}, z.core.$strip>;
|
|
48
|
-
export declare const
|
|
53
|
+
export declare const submit_council_verdicts: ReturnType<typeof tool>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Lets the architect declare acceptance criteria at plan time, before the
|
|
5
5
|
* coder starts work. Criteria are persisted to .swarm/council/{safeId}.json
|
|
6
|
-
* and later read back during council evaluation (
|
|
6
|
+
* and later read back during council evaluation (submit_council_verdicts) so that
|
|
7
7
|
* reviewers assess a stable, pre-committed contract rather than whatever
|
|
8
8
|
* criteria happen to be invented at review time.
|
|
9
9
|
*
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { checkpoint } from './checkpoint';
|
|
|
5
5
|
export { co_change_analyzer } from './co-change-analyzer';
|
|
6
6
|
export { completion_verify } from './completion-verify';
|
|
7
7
|
export { complexity_hotspots } from './complexity-hotspots';
|
|
8
|
-
export {
|
|
8
|
+
export { submit_council_verdicts } from './convene-council';
|
|
9
9
|
export { convene_general_council } from './convene-general-council';
|
|
10
10
|
export { curator_analyze } from './curator-analyze';
|
|
11
11
|
export { declare_council_criteria } from './declare-council-criteria';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Used for constants and agent setup references.
|
|
4
4
|
*/
|
|
5
5
|
/** Union type of all valid tool names */
|
|
6
|
-
export type ToolName = 'diff' | 'diff_summary' | 'syntax_check' | 'placeholder_scan' | 'imports' | 'lint' | 'secretscan' | 'sast_scan' | 'build_check' | 'pre_check_batch' | 'quality_budget' | 'symbols' | 'complexity_hotspots' | 'schema_drift' | 'todo_extract' | 'evidence_check' | 'check_gate_status' | 'completion_verify' | '
|
|
6
|
+
export type ToolName = 'diff' | 'diff_summary' | 'syntax_check' | 'placeholder_scan' | 'imports' | 'lint' | 'secretscan' | 'sast_scan' | 'build_check' | 'pre_check_batch' | 'quality_budget' | 'symbols' | 'complexity_hotspots' | 'schema_drift' | 'todo_extract' | 'evidence_check' | 'check_gate_status' | 'completion_verify' | 'submit_council_verdicts' | 'declare_council_criteria' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'test_impact' | 'mutation_test' | 'generate_mutants' | 'detect_domains' | 'gitingest' | 'retrieve_summary' | 'extract_code_blocks' | 'phase_complete' | 'save_plan' | 'update_task_status' | 'lint_spec' | 'write_retro' | 'write_drift_evidence' | 'write_hallucination_evidence' | 'write_mutation_evidence' | 'declare_scope' | 'knowledge_query' | 'doc_scan' | 'doc_extract' | 'curator_analyze' | 'knowledge_add' | 'knowledge_recall' | 'knowledge_remove' | 'co_change_analyzer' | 'search' | 'batch_symbols' | 'suggest_patch' | 'req_coverage' | 'get_approved_plan' | 'repo_map' | 'get_qa_gate_profile' | 'set_qa_gates' | 'web_search' | 'convene_general_council';
|
|
7
7
|
/** Readonly array of all tool names */
|
|
8
8
|
export declare const TOOL_NAMES: readonly ToolName[];
|
|
9
9
|
/** Set for O(1) tool name validation */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.86.
|
|
3
|
+
"version": "6.86.8",
|
|
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",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
40
|
"clean": "bun -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
41
|
-
"build": "bun run clean && bun run scripts/copy-grammars.ts && bun build src/index.ts --outdir dist --target
|
|
41
|
+
"build": "bun run clean && bun run scripts/copy-grammars.ts && bun build src/index.ts --outdir dist --target node --format esm && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm && bun run scripts/copy-grammars.ts --to-dist && tsc --emitDeclarationOnly",
|
|
42
42
|
"typecheck": "tsc --noEmit",
|
|
43
43
|
"test": "bun test",
|
|
44
44
|
"lint": "biome lint .",
|