opencode-swarm 7.17.4 → 7.18.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/cli/index.js +9 -1
- package/dist/evidence/lock.d.ts +1 -1
- package/dist/gate-evidence.d.ts +2 -2
- package/dist/index.js +2050 -1686
- package/dist/parallel/runtime-config.d.ts +11 -0
- package/dist/state/agent-run-context.d.ts +4 -4
- package/dist/state.d.ts +8 -13
- package/dist/tools/update-task-status.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PluginConfig } from '../config';
|
|
2
|
+
export type StandardParallelizationRuntimeConfig = {
|
|
3
|
+
stageBParallelEnabled: boolean;
|
|
4
|
+
taskFanoutEnabled: boolean;
|
|
5
|
+
maxConcurrentTasks: number;
|
|
6
|
+
maxConcurrentCoders: number;
|
|
7
|
+
maxConcurrentStageBGroups: number;
|
|
8
|
+
evidenceLockTimeoutMs: number;
|
|
9
|
+
source: 'current-default' | 'global-config' | 'locked-profile';
|
|
10
|
+
};
|
|
11
|
+
export declare function resolveStandardParallelizationConfig(config: PluginConfig | undefined, directory: string): StandardParallelizationRuntimeConfig;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AgentRunContext — typed per-run state container.
|
|
3
3
|
*
|
|
4
|
-
* Holds the subset of swarmState
|
|
4
|
+
* Holds the subset of swarmState used by run-scoped orchestration:
|
|
5
5
|
* activeToolCalls, activeAgent, delegationChains, agentSessions,
|
|
6
6
|
* environmentProfiles, and a shared reference to process-global toolAggregates.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* The default context preserves existing single-run behavior. Distinct contexts
|
|
9
|
+
* remain available for dispatcher-slot isolation as the standard parallel path
|
|
10
|
+
* grows beyond current task and Stage B gate coordination.
|
|
11
11
|
*
|
|
12
12
|
* Generic type parameters let state.ts bind concrete internal types without
|
|
13
13
|
* creating a circular import.
|
package/dist/state.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export type DelegationReason = 'normal_delegation' | 'review_rejected' | 'critic
|
|
|
50
50
|
* Transitions must be forward-only: idle → coder_delegated → pre_check_passed → reviewer_run → tests_run → complete
|
|
51
51
|
*/
|
|
52
52
|
export type TaskWorkflowState = 'idle' | 'coder_delegated' | 'pre_check_passed' | 'reviewer_run' | 'tests_run' | 'complete';
|
|
53
|
+
export type StageBGate = 'reviewer' | 'test_engineer' | 'adversarial_test_engineer';
|
|
53
54
|
/**
|
|
54
55
|
* Represents per-session state for guardrail tracking.
|
|
55
56
|
* Budget fields (toolCallCount, consecutiveErrors, etc.) have moved to InvocationWindow.
|
|
@@ -111,7 +112,9 @@ export interface AgentSessionState {
|
|
|
111
112
|
* When both are present, the task may advance to tests_run regardless of order.
|
|
112
113
|
* Always populated — Stage B is unconditionally parallel.
|
|
113
114
|
*/
|
|
114
|
-
stageBCompletion?: Map<string, Set<
|
|
115
|
+
stageBCompletion?: Map<string, Set<StageBGate>>;
|
|
116
|
+
/** Per-task required Stage B gates. Optional gates are added when dispatched. */
|
|
117
|
+
requiredStageBGates?: Map<string, Set<StageBGate>>;
|
|
115
118
|
/** v6.71+ Council mode: per-task council verdict, recorded by delegation-gate when submit_council_verdicts resolves. */
|
|
116
119
|
taskCouncilApproved?: Map<string, {
|
|
117
120
|
verdict: 'APPROVE' | 'REJECT' | 'CONCERNS';
|
|
@@ -448,19 +451,11 @@ export declare function advanceTaskStateAndPersist(session: AgentSessionState, t
|
|
|
448
451
|
* @returns Current task workflow state
|
|
449
452
|
*/
|
|
450
453
|
export declare function getTaskState(session: AgentSessionState, taskId: string): TaskWorkflowState;
|
|
454
|
+
export declare function requireStageBGate(session: AgentSessionState, taskId: string, gate: StageBGate): void;
|
|
455
|
+
export declare function recordStageBCompletion(session: AgentSessionState, taskId: string, agent: StageBGate): void;
|
|
451
456
|
/**
|
|
452
|
-
* PR 2 Stage B barrier:
|
|
453
|
-
*
|
|
454
|
-
* Initializes the per-task set on first write.
|
|
455
|
-
*
|
|
456
|
-
* @param session - The agent session state
|
|
457
|
-
* @param taskId - The task identifier
|
|
458
|
-
* @param agent - Which Stage B agent completed ('reviewer' or 'test_engineer')
|
|
459
|
-
*/
|
|
460
|
-
export declare function recordStageBCompletion(session: AgentSessionState, taskId: string, agent: 'reviewer' | 'test_engineer'): void;
|
|
461
|
-
/**
|
|
462
|
-
* PR 2 Stage B barrier: returns true iff both 'reviewer' and 'test_engineer' have
|
|
463
|
-
* been recorded for the given task in this session.
|
|
457
|
+
* PR 2 Stage B barrier: returns true iff every required Stage B gate has been
|
|
458
|
+
* recorded for the given task in this session.
|
|
464
459
|
*
|
|
465
460
|
* @param session - The agent session state
|
|
466
461
|
* @param taskId - The task identifier
|
|
@@ -57,7 +57,7 @@ export declare function checkReviewerGate(taskId: string, workingDirectory?: str
|
|
|
57
57
|
/**
|
|
58
58
|
* Wrapper around checkReviewerGate that appends a diff-scope advisory warning.
|
|
59
59
|
* Keeps checkReviewerGate synchronous for backward compatibility.
|
|
60
|
-
* Stage B parallel is
|
|
60
|
+
* Stage B parallel is resolved from standard parallelization config.
|
|
61
61
|
* @param taskId - The task ID to check gate state for
|
|
62
62
|
* @param workingDirectory - Optional working directory for plan.json fallback
|
|
63
63
|
* @param sessionID - Optional session ID to scope Lean Turbo bypass to the current tool-execution context
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.18.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",
|