opencode-swarm 6.72.0 → 6.73.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/dist/__tests__/critic_hallucination_verifier-whitelist.test.d.ts +1 -0
- package/dist/agents/architect.d.ts +11 -0
- package/dist/agents/critic.d.ts +2 -1
- package/dist/cli/index.js +243 -224
- package/dist/config/constants.d.ts +2 -2
- package/dist/db/qa-gate-profile.d.ts +15 -7
- package/dist/index.js +856 -375
- package/dist/state.d.ts +27 -1
- package/dist/tools/convene-council.d.ts +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/tool-names.d.ts +1 -1
- package/dist/tools/write-hallucination-evidence.d.ts +30 -0
- package/package.json +1 -1
package/dist/state.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* and delegation chains.
|
|
8
8
|
*/
|
|
9
9
|
import type { OpencodeClient } from '@opencode-ai/sdk';
|
|
10
|
-
import type
|
|
10
|
+
import { type QaGates } from './db/qa-gate-profile.js';
|
|
11
11
|
import { type EnvironmentProfile } from './environment/profile.js';
|
|
12
12
|
/**
|
|
13
13
|
* Represents a single tool call entry for tracking purposes
|
|
@@ -101,6 +101,11 @@ export interface AgentSessionState {
|
|
|
101
101
|
qaSkipTaskIds: string[];
|
|
102
102
|
/** Per-task workflow state — taskId → current state */
|
|
103
103
|
taskWorkflowStates: Map<string, TaskWorkflowState>;
|
|
104
|
+
/** v6.71+ Council mode: per-task council verdict, recorded by delegation-gate when convene_council resolves. */
|
|
105
|
+
taskCouncilApproved?: Map<string, {
|
|
106
|
+
verdict: 'APPROVE' | 'REJECT' | 'CONCERNS';
|
|
107
|
+
roundNumber: number;
|
|
108
|
+
}>;
|
|
104
109
|
/** Last gate outcome for deliberation preamble injection */
|
|
105
110
|
lastGateOutcome: {
|
|
106
111
|
gate: string;
|
|
@@ -331,6 +336,27 @@ export declare function advanceTaskState(session: AgentSessionState, taskId: str
|
|
|
331
336
|
* @returns Current task workflow state
|
|
332
337
|
*/
|
|
333
338
|
export declare function getTaskState(session: AgentSessionState, taskId: string): TaskWorkflowState;
|
|
339
|
+
/**
|
|
340
|
+
* Returns true iff council is authoritative for the current plan.
|
|
341
|
+
*
|
|
342
|
+
* AND semantics: council is authoritative when BOTH `pluginConfig.council.enabled === true`
|
|
343
|
+
* AND `QaGates.council_mode === true` for the plan associated with this directory.
|
|
344
|
+
*
|
|
345
|
+
* If exactly one of the two flags is true, a one-time warning is logged per plan_id
|
|
346
|
+
* (so operators can see the deadlock case) and the function falls back to `false`,
|
|
347
|
+
* which keeps Stage B running as the default.
|
|
348
|
+
*
|
|
349
|
+
* Returns false when the plan or QA gate profile cannot be loaded — when the plan
|
|
350
|
+
* is missing the council cannot meaningfully be "authoritative".
|
|
351
|
+
*/
|
|
352
|
+
export declare function isCouncilGateActive(directory: string, council: {
|
|
353
|
+
enabled?: boolean;
|
|
354
|
+
} | undefined): Promise<boolean>;
|
|
355
|
+
/**
|
|
356
|
+
* Test-only helper: clear the warn-once memo so each test can observe a fresh
|
|
357
|
+
* disagreement warning. Not part of the public surface.
|
|
358
|
+
*/
|
|
359
|
+
export declare function _resetCouncilDisagreementWarnings(): void;
|
|
334
360
|
/**
|
|
335
361
|
* Rehydrates session workflow state from durable swarm files.
|
|
336
362
|
*
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -58,4 +58,5 @@ export { test_runner } from './test-runner';
|
|
|
58
58
|
export { todo_extract } from './todo-extract';
|
|
59
59
|
export { executeUpdateTaskStatus, type UpdateTaskStatusArgs, type UpdateTaskStatusResult, update_task_status, } from './update-task-status';
|
|
60
60
|
export { write_drift_evidence } from './write-drift-evidence';
|
|
61
|
+
export { write_hallucination_evidence } from './write-hallucination-evidence';
|
|
61
62
|
export { executeWriteRetro, write_retro } from './write-retro';
|
|
@@ -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' | 'convene_council' | 'declare_council_criteria' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'test_impact' | 'mutation_test' | 'detect_domains' | 'gitingest' | 'retrieve_summary' | 'extract_code_blocks' | 'phase_complete' | 'save_plan' | 'update_task_status' | 'lint_spec' | 'write_retro' | 'write_drift_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';
|
|
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' | 'convene_council' | 'declare_council_criteria' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'test_impact' | 'mutation_test' | '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' | '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';
|
|
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 */
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Write hallucination evidence tool for persisting hallucination verification results.
|
|
3
|
+
* Accepts phase, verdict, and summary from the Architect and writes
|
|
4
|
+
* a gate-contract formatted evidence file.
|
|
5
|
+
*
|
|
6
|
+
* Unlike write_drift_evidence, this tool does NOT lock the QA gate profile or
|
|
7
|
+
* write a plan snapshot — those side-effects belong to drift verification only.
|
|
8
|
+
*/
|
|
9
|
+
import { type ToolDefinition } from '@opencode-ai/plugin/tool';
|
|
10
|
+
/**
|
|
11
|
+
* Arguments for the write_hallucination_evidence tool
|
|
12
|
+
*/
|
|
13
|
+
export interface WriteHallucinationEvidenceArgs {
|
|
14
|
+
/** The phase number for the hallucination verification */
|
|
15
|
+
phase: number;
|
|
16
|
+
/** Verdict of the hallucination verification: 'APPROVED' or 'NEEDS_REVISION' */
|
|
17
|
+
verdict: 'APPROVED' | 'NEEDS_REVISION';
|
|
18
|
+
/** Human-readable summary of the hallucination verification */
|
|
19
|
+
summary: string;
|
|
20
|
+
/** Optional bullet list of FABRICATED/DRIFTED/UNSUPPORTED/BROKEN findings */
|
|
21
|
+
findings?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Execute the write_hallucination_evidence tool.
|
|
25
|
+
*/
|
|
26
|
+
export declare function executeWriteHallucinationEvidence(args: WriteHallucinationEvidenceArgs, directory: string): Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Tool definition for write_hallucination_evidence
|
|
29
|
+
*/
|
|
30
|
+
export declare const write_hallucination_evidence: ToolDefinition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.73.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",
|