opencode-swarm 7.13.2 → 7.15.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/README.md +2 -1
- package/dist/cli/index.js +950 -269
- package/dist/commands/deep-dive.d.ts +5 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/registry.d.ts +14 -0
- package/dist/commands/turbo.d.ts +4 -4
- package/dist/config/constants.d.ts +12 -1
- package/dist/config/index.d.ts +2 -2
- package/dist/config/schema.d.ts +116 -0
- package/dist/index.js +4504 -1266
- package/dist/parallel/file-locks.d.ts +50 -2
- package/dist/services/status-service.d.ts +29 -0
- package/dist/state.d.ts +17 -0
- package/dist/tools/index.d.ts +6 -0
- package/dist/tools/lean-turbo-acquire-locks.d.ts +36 -0
- package/dist/tools/lean-turbo-plan-lanes.d.ts +35 -0
- package/dist/tools/lean-turbo-review.d.ts +34 -0
- package/dist/tools/lean-turbo-run-phase.d.ts +44 -0
- package/dist/tools/lean-turbo-runner-status.d.ts +36 -0
- package/dist/tools/lean-turbo-status.d.ts +44 -0
- package/dist/tools/tool-names.d.ts +1 -1
- package/dist/tools/update-task-status.d.ts +7 -4
- package/dist/turbo/lean/conflicts.d.ts +100 -0
- package/dist/turbo/lean/evidence.d.ts +91 -0
- package/dist/turbo/lean/index.d.ts +27 -0
- package/dist/turbo/lean/integration.d.ts +137 -0
- package/dist/turbo/lean/phase-ready.d.ts +105 -0
- package/dist/turbo/lean/planner.d.ts +115 -0
- package/dist/turbo/lean/reviewer.d.ts +124 -0
- package/dist/turbo/lean/risk.d.ts +47 -0
- package/dist/turbo/lean/runner.d.ts +322 -0
- package/dist/turbo/lean/state.d.ts +61 -0
- package/dist/turbo/lean/task-completion.d.ts +53 -0
- package/package.json +1 -1
package/dist/commands/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { handleConfigCommand } from './config';
|
|
|
14
14
|
export { handleCouncilCommand } from './council';
|
|
15
15
|
export { handleCurateCommand } from './curate';
|
|
16
16
|
export { handleDarkMatterCommand } from './dark-matter';
|
|
17
|
+
export { handleDeepDiveCommand } from './deep-dive';
|
|
17
18
|
export { handleDiagnoseCommand } from './diagnose';
|
|
18
19
|
export { handleDoctorCommand } from './doctor';
|
|
19
20
|
export { handleEvidenceCommand, handleEvidenceSummaryCommand, } from './evidence';
|
|
@@ -293,6 +293,20 @@ export declare const COMMAND_REGISTRY: {
|
|
|
293
293
|
readonly details: "Launches a structured PR review: reconstructs PR intent via obligation extraction cascade, runs 6 parallel explorer lanes (correctness, security, dependencies, docs-intent-vs-actual, tests, performance-architecture), validates findings through independent reviewer confirmation, applies critic challenge to HIGH/CRITICAL findings, synthesizes structured report. --council variant fires adversarial multi-model review. Supports full GitHub URL, owner/repo#N shorthand, or bare PR number (resolves against origin remote).";
|
|
294
294
|
readonly category: "agent";
|
|
295
295
|
};
|
|
296
|
+
readonly 'deep-dive': {
|
|
297
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
298
|
+
readonly description: "Launch deep codebase audit with parallel explorer waves, dual reviewers, and critic challenge [scope]";
|
|
299
|
+
readonly args: "<scope> [--profile standard|security|ux|architecture|full] [--max-explorers 1..8] [--json] [--skip-update] [--allow-dirty]";
|
|
300
|
+
readonly details: "Runs a read-only deep audit of the specified scope using parallel explorer waves (8-file cap per mission, ~3500 line guardrail), always 2 parallel reviewers for verification, and sequential critic challenge on HIGH/CRITICAL findings. Profiles select explorer lanes: standard (5 lanes), security, ux, architecture, full (all 8 lanes). Emits a structured findings report without mutating source code.";
|
|
301
|
+
readonly category: "agent";
|
|
302
|
+
};
|
|
303
|
+
readonly 'deep dive': {
|
|
304
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
305
|
+
readonly description: "Alias for /swarm deep-dive — launch deep codebase audit";
|
|
306
|
+
readonly args: "<scope> [--profile standard|security|ux|architecture|full] [--max-explorers 1..8] [--json] [--skip-update] [--allow-dirty]";
|
|
307
|
+
readonly category: "agent";
|
|
308
|
+
readonly aliasOf: "deep-dive";
|
|
309
|
+
};
|
|
296
310
|
readonly issue: {
|
|
297
311
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
298
312
|
readonly description: "Ingest a GitHub issue into the swarm workflow [url] [--plan] [--trace] [--no-repro]";
|
package/dist/commands/turbo.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Handles the /swarm turbo command.
|
|
3
|
-
*
|
|
3
|
+
* Supports standard turbo toggle, lean turbo mode, and status reporting.
|
|
4
4
|
*
|
|
5
|
-
* @param directory - Project directory (
|
|
6
|
-
* @param args - Optional
|
|
5
|
+
* @param directory - Project directory (used to persist Lean Turbo run state)
|
|
6
|
+
* @param args - Optional arguments: "lean" | "standard" | "on" | "off" | "status" | undefined
|
|
7
7
|
* @param sessionID - Session ID for accessing active session state
|
|
8
8
|
* @returns Feedback message about Turbo Mode state
|
|
9
9
|
*/
|
|
10
|
-
export declare function handleTurboCommand(
|
|
10
|
+
export declare function handleTurboCommand(directory: string, args: string[], sessionID: string): Promise<string>;
|
|
@@ -30,7 +30,7 @@ export declare const DEFAULT_AGENT_CONFIGS: Record<string, {
|
|
|
30
30
|
}>;
|
|
31
31
|
export declare function isQAAgent(name: string): name is QAAgentName;
|
|
32
32
|
export declare function isSubagent(name: string): boolean;
|
|
33
|
-
import type { ScoringConfig } from './schema';
|
|
33
|
+
import type { LeanTurboConfig, ScoringConfig } from './schema';
|
|
34
34
|
export declare const DEFAULT_SCORING_CONFIG: ScoringConfig;
|
|
35
35
|
/**
|
|
36
36
|
* Resolve scoring configuration by deep-merging user config with defaults.
|
|
@@ -75,3 +75,14 @@ export declare const COMPACTION_DEFAULTS: {
|
|
|
75
75
|
};
|
|
76
76
|
export declare const TURBO_MODE_BANNER = "## \uD83D\uDE80 TURBO MODE ACTIVE\n\n**Speed optimization enabled for this session.**\n\nWhile Turbo Mode is active:\n- **Stage A gates** (lint, imports, pre_check_batch) are still REQUIRED for ALL tasks\n- **Tier 3 tasks** (security-sensitive files matching: architect*.ts, delegation*.ts, guardrails*.ts, adversarial*.ts, sanitiz*.ts, auth*, permission*, crypto*, secret*, security) still require FULL review (Stage B)\n- **Tier 0-2 tasks** can skip Stage B (reviewer, test_engineer) to speed up execution\n- **Phase completion gates** (completion-verify and drift verification gate) are automatically bypassed \u2014 phase_complete will succeed without drift verification evidence when turbo is active. Note: turbo bypass is session-scoped; one session's turbo does not affect other sessions.\n\nClassification still determines the pipeline:\n- TIER 0 (metadata): lint + diff only \u2014 no change\n- TIER 1 (docs): Stage A + reviewer \u2014 no change\n- TIER 2 (standard code): Stage A + reviewer + test_engineer \u2014 CAN SKIP Stage B with turboMode\n- TIER 3 (critical): Stage A + 2x reviewer + 2x test_engineer \u2014 Stage B REQUIRED (no turbo bypass)\n\nDo NOT skip Stage A gates. Do NOT skip Stage B for TIER 3.\n";
|
|
77
77
|
export declare const FULL_AUTO_BANNER = "## \u26A1 FULL-AUTO MODE ACTIVE\n\nYou are operating without a human in the loop. All escalations route to the Autonomous Oversight Critic instead of a user.\n\nBehavioral changes:\n- TIER 3 escalations go to the critic, not a human. Frame your questions technically, not conversationally.\n- Phase completion approval comes from the critic. Ensure all evidence is written before requesting.\n- The critic defaults to REJECT. Do not attempt to pressure, negotiate, or shortcut. Complete the evidence trail.\n- If the critic returns ESCALATE_TO_HUMAN, the session will pause or terminate. Only the critic can trigger this.\n- Do NOT ask \"Ready for Phase N+1?\" \u2014 call phase_complete directly. The critic reviews automatically.\n";
|
|
78
|
+
/**
|
|
79
|
+
* Canonical default Lean Turbo configuration.
|
|
80
|
+
*
|
|
81
|
+
* This is the single source of truth for all 9 LeanTurboConfig fields.
|
|
82
|
+
* Consumers MUST reference this constant instead of hardcoding their own
|
|
83
|
+
* defaults — see v7.4.x config-drift fix (3 of 9 fields disagreed across
|
|
84
|
+
* runner.ts, lean-turbo-plan-lanes.ts, lean-turbo-status.ts, and the
|
|
85
|
+
* Zod schema in schema.ts).
|
|
86
|
+
*/
|
|
87
|
+
export declare const DEFAULT_LEAN_TURBO_CONFIG: LeanTurboConfig;
|
|
88
|
+
export declare const LEAN_TURBO_BANNER = "## \uD83D\uDEE4\uFE0F LEAN TURBO ACTIVE\n\nLane-based parallel execution is enabled for this phase.\n\nBehavioral changes:\n- Tasks are partitioned into parallel lanes based on file-scope conflicts. Tasks in the same lane run sequentially; tasks in different lanes run concurrently (up to max_parallel_coders).\n- **Lane dispatch overrides the one-agent-per-message rule**: for lean lane dispatch only, you may send multiple Task tool calls concurrently (one per lane).\n- **Lane tasks skip per-task Stage B** (reviewer + test_engineer). Quality is enforced at phase-end via phase reviewer and critic gates instead.\n- **Degraded tasks** (global files, protected paths, high-risk patterns) and **serialized tasks** (lock-conflicted) run through standard serial workflow with full Stage B gates.\n- **Phase reviewer and critic are REQUIRED** before phase_complete when lean turbo is active \u2014 they serve as the holistic quality gate for all lane work.\n- **Full-Auto composition**: if Full-Auto is also active, lane dispatch is subject to Full-Auto delegation policy and phase approval.\n- Use the lean_turbo_run_phase tool to execute a phase with parallel lanes\n\nDo NOT skip phase reviewer/critic when configured. Degraded and serialized tasks MUST still go through full Stage B.\n";
|
package/dist/config/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare const _internals: {
|
|
|
18
18
|
};
|
|
19
19
|
export type { MigrationStatus, Phase, PhaseStatus, Plan, Task, TaskSize, TaskStatus, } from './plan-schema';
|
|
20
20
|
export { MigrationStatusSchema, PhaseSchema, PhaseStatusSchema, PlanSchema, TaskSchema, TaskSizeSchema, TaskStatusSchema, } from './plan-schema';
|
|
21
|
-
export type { AgentOverrideConfig, AutomationCapabilities, AutomationConfig, AutomationMode, PhaseCompleteConfig, PipelineConfig, PluginConfig, SwarmConfig, } from './schema';
|
|
22
|
-
export { AgentOverrideConfigSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, AutomationModeSchema, PhaseCompleteConfigSchema, PipelineConfigSchema, PluginConfigSchema, SwarmConfigSchema, } from './schema';
|
|
21
|
+
export type { AgentOverrideConfig, AutomationCapabilities, AutomationConfig, AutomationMode, LeanTurboConfig, PhaseCompleteConfig, PipelineConfig, PluginConfig, SwarmConfig, TurboConfig, } from './schema';
|
|
22
|
+
export { AgentOverrideConfigSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, AutomationModeSchema, LeanTurboConfigSchema, PhaseCompleteConfigSchema, PipelineConfigSchema, PluginConfigSchema, SwarmConfigSchema, TurboConfigSchema, } from './schema';
|
|
23
23
|
export type { DeltaSpec, Obligation, SpecDelta, SpecRequirement, SpecScenario, SpecSection, SwarmSpec, } from './spec-schema';
|
|
24
24
|
export { DeltaSpecSchema, ObligationSchema, SpecDeltaSchema, SpecRequirementSchema, SpecScenarioSchema, SpecSectionSchema, SwarmSpecSchema, validateSpecContent, } from './spec-schema';
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -735,6 +735,89 @@ export declare const ParallelizationConfigSchema: z.ZodObject<{
|
|
|
735
735
|
max_reviewers: z.ZodDefault<z.ZodNumber>;
|
|
736
736
|
}, z.core.$strip>;
|
|
737
737
|
export type ParallelizationConfig = z.infer<typeof ParallelizationConfigSchema>;
|
|
738
|
+
export declare const LeanTurboConfigSchema: z.ZodObject<{
|
|
739
|
+
max_parallel_coders: z.ZodDefault<z.ZodNumber>;
|
|
740
|
+
require_declared_scope: z.ZodDefault<z.ZodBoolean>;
|
|
741
|
+
conflict_policy: z.ZodDefault<z.ZodEnum<{
|
|
742
|
+
serialize: "serialize";
|
|
743
|
+
degrade: "degrade";
|
|
744
|
+
}>>;
|
|
745
|
+
degrade_on_risk: z.ZodDefault<z.ZodBoolean>;
|
|
746
|
+
phase_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
747
|
+
phase_critic: z.ZodDefault<z.ZodBoolean>;
|
|
748
|
+
integrated_diff_required: z.ZodDefault<z.ZodBoolean>;
|
|
749
|
+
allow_docs_only_without_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
750
|
+
worktree_isolation: z.ZodDefault<z.ZodBoolean>;
|
|
751
|
+
}, z.core.$strip>;
|
|
752
|
+
export type LeanTurboConfig = z.infer<typeof LeanTurboConfigSchema>;
|
|
753
|
+
export declare const StandardTurboConfigSchema: z.ZodObject<{
|
|
754
|
+
strategy: z.ZodLiteral<"standard">;
|
|
755
|
+
lean: z.ZodOptional<z.ZodObject<{
|
|
756
|
+
max_parallel_coders: z.ZodDefault<z.ZodNumber>;
|
|
757
|
+
require_declared_scope: z.ZodDefault<z.ZodBoolean>;
|
|
758
|
+
conflict_policy: z.ZodDefault<z.ZodEnum<{
|
|
759
|
+
serialize: "serialize";
|
|
760
|
+
degrade: "degrade";
|
|
761
|
+
}>>;
|
|
762
|
+
degrade_on_risk: z.ZodDefault<z.ZodBoolean>;
|
|
763
|
+
phase_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
764
|
+
phase_critic: z.ZodDefault<z.ZodBoolean>;
|
|
765
|
+
integrated_diff_required: z.ZodDefault<z.ZodBoolean>;
|
|
766
|
+
allow_docs_only_without_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
767
|
+
worktree_isolation: z.ZodDefault<z.ZodBoolean>;
|
|
768
|
+
}, z.core.$strip>>;
|
|
769
|
+
}, z.core.$strip>;
|
|
770
|
+
export declare const LeanTurboStrategyConfigSchema: z.ZodObject<{
|
|
771
|
+
strategy: z.ZodLiteral<"lean">;
|
|
772
|
+
lean: z.ZodObject<{
|
|
773
|
+
max_parallel_coders: z.ZodDefault<z.ZodNumber>;
|
|
774
|
+
require_declared_scope: z.ZodDefault<z.ZodBoolean>;
|
|
775
|
+
conflict_policy: z.ZodDefault<z.ZodEnum<{
|
|
776
|
+
serialize: "serialize";
|
|
777
|
+
degrade: "degrade";
|
|
778
|
+
}>>;
|
|
779
|
+
degrade_on_risk: z.ZodDefault<z.ZodBoolean>;
|
|
780
|
+
phase_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
781
|
+
phase_critic: z.ZodDefault<z.ZodBoolean>;
|
|
782
|
+
integrated_diff_required: z.ZodDefault<z.ZodBoolean>;
|
|
783
|
+
allow_docs_only_without_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
784
|
+
worktree_isolation: z.ZodDefault<z.ZodBoolean>;
|
|
785
|
+
}, z.core.$strip>;
|
|
786
|
+
}, z.core.$strip>;
|
|
787
|
+
export declare const TurboConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
788
|
+
strategy: z.ZodLiteral<"standard">;
|
|
789
|
+
lean: z.ZodOptional<z.ZodObject<{
|
|
790
|
+
max_parallel_coders: z.ZodDefault<z.ZodNumber>;
|
|
791
|
+
require_declared_scope: z.ZodDefault<z.ZodBoolean>;
|
|
792
|
+
conflict_policy: z.ZodDefault<z.ZodEnum<{
|
|
793
|
+
serialize: "serialize";
|
|
794
|
+
degrade: "degrade";
|
|
795
|
+
}>>;
|
|
796
|
+
degrade_on_risk: z.ZodDefault<z.ZodBoolean>;
|
|
797
|
+
phase_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
798
|
+
phase_critic: z.ZodDefault<z.ZodBoolean>;
|
|
799
|
+
integrated_diff_required: z.ZodDefault<z.ZodBoolean>;
|
|
800
|
+
allow_docs_only_without_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
801
|
+
worktree_isolation: z.ZodDefault<z.ZodBoolean>;
|
|
802
|
+
}, z.core.$strip>>;
|
|
803
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
804
|
+
strategy: z.ZodLiteral<"lean">;
|
|
805
|
+
lean: z.ZodObject<{
|
|
806
|
+
max_parallel_coders: z.ZodDefault<z.ZodNumber>;
|
|
807
|
+
require_declared_scope: z.ZodDefault<z.ZodBoolean>;
|
|
808
|
+
conflict_policy: z.ZodDefault<z.ZodEnum<{
|
|
809
|
+
serialize: "serialize";
|
|
810
|
+
degrade: "degrade";
|
|
811
|
+
}>>;
|
|
812
|
+
degrade_on_risk: z.ZodDefault<z.ZodBoolean>;
|
|
813
|
+
phase_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
814
|
+
phase_critic: z.ZodDefault<z.ZodBoolean>;
|
|
815
|
+
integrated_diff_required: z.ZodDefault<z.ZodBoolean>;
|
|
816
|
+
allow_docs_only_without_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
817
|
+
worktree_isolation: z.ZodDefault<z.ZodBoolean>;
|
|
818
|
+
}, z.core.$strip>;
|
|
819
|
+
}, z.core.$strip>], "strategy">;
|
|
820
|
+
export type TurboConfig = z.infer<typeof TurboConfigSchema>;
|
|
738
821
|
export declare const PluginConfigSchema: z.ZodObject<{
|
|
739
822
|
agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
740
823
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -1206,6 +1289,39 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
1206
1289
|
max_coders: z.ZodDefault<z.ZodNumber>;
|
|
1207
1290
|
max_reviewers: z.ZodDefault<z.ZodNumber>;
|
|
1208
1291
|
}, z.core.$strip>>;
|
|
1292
|
+
turbo: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1293
|
+
strategy: z.ZodLiteral<"standard">;
|
|
1294
|
+
lean: z.ZodOptional<z.ZodObject<{
|
|
1295
|
+
max_parallel_coders: z.ZodDefault<z.ZodNumber>;
|
|
1296
|
+
require_declared_scope: z.ZodDefault<z.ZodBoolean>;
|
|
1297
|
+
conflict_policy: z.ZodDefault<z.ZodEnum<{
|
|
1298
|
+
serialize: "serialize";
|
|
1299
|
+
degrade: "degrade";
|
|
1300
|
+
}>>;
|
|
1301
|
+
degrade_on_risk: z.ZodDefault<z.ZodBoolean>;
|
|
1302
|
+
phase_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
1303
|
+
phase_critic: z.ZodDefault<z.ZodBoolean>;
|
|
1304
|
+
integrated_diff_required: z.ZodDefault<z.ZodBoolean>;
|
|
1305
|
+
allow_docs_only_without_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
1306
|
+
worktree_isolation: z.ZodDefault<z.ZodBoolean>;
|
|
1307
|
+
}, z.core.$strip>>;
|
|
1308
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1309
|
+
strategy: z.ZodLiteral<"lean">;
|
|
1310
|
+
lean: z.ZodObject<{
|
|
1311
|
+
max_parallel_coders: z.ZodDefault<z.ZodNumber>;
|
|
1312
|
+
require_declared_scope: z.ZodDefault<z.ZodBoolean>;
|
|
1313
|
+
conflict_policy: z.ZodDefault<z.ZodEnum<{
|
|
1314
|
+
serialize: "serialize";
|
|
1315
|
+
degrade: "degrade";
|
|
1316
|
+
}>>;
|
|
1317
|
+
degrade_on_risk: z.ZodDefault<z.ZodBoolean>;
|
|
1318
|
+
phase_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
1319
|
+
phase_critic: z.ZodDefault<z.ZodBoolean>;
|
|
1320
|
+
integrated_diff_required: z.ZodDefault<z.ZodBoolean>;
|
|
1321
|
+
allow_docs_only_without_reviewer: z.ZodDefault<z.ZodBoolean>;
|
|
1322
|
+
worktree_isolation: z.ZodDefault<z.ZodBoolean>;
|
|
1323
|
+
}, z.core.$strip>;
|
|
1324
|
+
}, z.core.$strip>], "strategy">>;
|
|
1209
1325
|
turbo_mode: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
1210
1326
|
quiet: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
1211
1327
|
version_check: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|