opencode-swarm 7.47.0 → 7.48.1

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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Gate 5b – Architecture Supervision (issue #893).
3
+ * Opt-in, gate mode only. Reads the raw supervisor sidecar and blocks on a
4
+ * missing/invalid/stale/REJECT verdict. Unlike Gates 1–5 this gate is NOT
5
+ * turbo-bypassed — enabling mode:'gate' is an explicit opt-in to a hard
6
+ * cross-task coherence check.
7
+ */
8
+ import type { GateContext, GateResult } from './types';
9
+ export declare function runArchitectureSupervisorGate(ctx: GateContext): Promise<GateResult>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Gate 1 – Completion Verify (deterministic, in-process).
3
+ * Blocks when executeCompletionVerify returns status === 'blocked'.
4
+ */
5
+ import type { GateContext, GateResult } from './types';
6
+ export declare function runCompletionVerifyGate(ctx: GateContext): Promise<GateResult>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Gate 2 – Drift Verifier.
3
+ * Conditional on drift_check QA gate. Blocks when drift evidence is missing
4
+ * (when spec.md exists) or when the verdict is rejected.
5
+ */
6
+ import type { GateContext, GateResult } from './types';
7
+ export declare function runDriftGate(ctx: GateContext): Promise<GateResult>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Gate 6 – Final Council.
3
+ * Conditional on final_council QA gate flag. Only fires after the LAST
4
+ * phase completes — not after intermediate phases.
5
+ */
6
+ import type { GateContext, GateResult } from './types';
7
+ export declare function runFinalCouncilGate(ctx: GateContext): Promise<GateResult>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Gate 3 – Hallucination Guard.
3
+ * Conditional on hallucination_guard QA gate flag.
4
+ */
5
+ import type { GateContext, GateResult } from './types';
6
+ export declare function runHallucinationGate(ctx: GateContext): Promise<GateResult>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Gate modules for phase_complete — each gate is a pure function that
3
+ * receives a GateContext and returns a GateResult.
4
+ */
5
+ export { runArchitectureSupervisorGate } from './architecture-supervisor-gate.js';
6
+ export { runCompletionVerifyGate } from './completion-verify-gate.js';
7
+ export { runDriftGate } from './drift-gate.js';
8
+ export { runFinalCouncilGate } from './final-council-gate.js';
9
+ export { runHallucinationGate } from './hallucination-gate.js';
10
+ export { runMutationGate } from './mutation-gate.js';
11
+ export { runPhaseCouncilGate } from './phase-council-gate.js';
12
+ export type { GateContext, GateResult } from './types.js';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Gate 4 – Mutation Gate.
3
+ * Conditional on mutation_test QA gate flag.
4
+ */
5
+ import type { GateContext, GateResult } from './types';
6
+ export declare function runMutationGate(ctx: GateContext): Promise<GateResult>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Gate 5 – Phase Council.
3
+ * Conditional on council_mode QA gate flag.
4
+ */
5
+ import type { GateContext, GateResult } from './types';
6
+ export declare function runPhaseCouncilGate(ctx: GateContext): Promise<GateResult>;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Shared types for phase-complete gate modules.
3
+ */
4
+ /**
5
+ * Result returned by every gate function.
6
+ * - blocked === true → phase_complete must return an error result immediately.
7
+ * - blocked === false → gate passed; warnings may be accumulated in the gate's
8
+ * local warnings list (the orchestrator appends them to the
9
+ * shared warnings array after the call).
10
+ */
11
+ export interface GateResult {
12
+ blocked: boolean;
13
+ reason?: string;
14
+ message?: string;
15
+ agentsDispatched: string[];
16
+ agentsMissing: string[];
17
+ warnings: string[];
18
+ /** Optional extra fields that some gates add to the return value */
19
+ [key: string]: unknown;
20
+ }
21
+ /**
22
+ * Context passed to every gate function. These are the values that are already
23
+ * available at the call site in executePhaseComplete and do not need to be
24
+ * re-computed inside each gate.
25
+ */
26
+ export interface GateContext {
27
+ /** Phase number being completed */
28
+ phase: number;
29
+ /** Resolved project root (the `.swarm/` parent directory) */
30
+ dir: string;
31
+ /** Caller session ID (may be undefined in edge cases) */
32
+ sessionID: string | undefined;
33
+ /** Already-loaded plugin config */
34
+ pluginConfig: import('../../../config/schema').PluginConfig;
35
+ /** Agents already dispatched (cross-session aggregated) */
36
+ agentsDispatched: string[];
37
+ /** Non-blocking warning helper */
38
+ safeWarn: (message: string, error: unknown) => void;
39
+ }
@@ -14,11 +14,25 @@ export interface PhaseCompleteArgs {
14
14
  /** Session ID to track state (optional, defaults to current session context) */
15
15
  sessionID?: string;
16
16
  }
17
+ export declare const MAX_OUTPUT_BYTES = 512000;
17
18
  /**
18
19
  * Execute the phase_complete tool
19
20
  * Gathers data, enforces policy, writes event, resets state
20
21
  */
21
22
  export declare function executePhaseComplete(args: PhaseCompleteArgs, workingDirectory?: string, directory?: string): Promise<string>;
23
+ /** @internal exported for testing only */
24
+ export declare function _buildOutputJson(outputData: {
25
+ phase: number;
26
+ success: boolean;
27
+ status: string;
28
+ message?: string;
29
+ agentsDispatched?: string[];
30
+ agentsMissing?: string[];
31
+ warnings?: string[];
32
+ timestamp: string;
33
+ duration_ms: number;
34
+ [key: string]: unknown;
35
+ }): string;
22
36
  /**
23
37
  * Tool definition for phase_complete
24
38
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.47.0",
3
+ "version": "7.48.1",
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",