opencode-swarm 7.59.0 → 7.60.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.
@@ -26,7 +26,7 @@ export declare const DEFAULT_AGENT_CONFIGS: Record<string, {
26
26
  }>;
27
27
  export declare function isQAAgent(name: string): name is QAAgentName;
28
28
  export declare function isSubagent(name: string): boolean;
29
- import type { LeanTurboConfig, ScoringConfig } from './schema';
29
+ import type { LeanTurboConfig, ScoringConfig, WorktreeIsolationConfig } from './schema';
30
30
  export declare const DEFAULT_SCORING_CONFIG: ScoringConfig;
31
31
  /**
32
32
  * Resolve scoring configuration by deep-merging user config with defaults.
@@ -81,4 +81,5 @@ export declare const FULL_AUTO_BANNER = "## \u26A1 FULL-AUTO MODE ACTIVE\n\nYou
81
81
  * Zod schema in schema.ts).
82
82
  */
83
83
  export declare const DEFAULT_LEAN_TURBO_CONFIG: LeanTurboConfig;
84
+ export declare const DEFAULT_WORKTREE_ISOLATION_CONFIG: WorktreeIsolationConfig;
84
85
  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";
@@ -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, LeanTurboConfig, MemoryConfig, PhaseCompleteConfig, PipelineConfig, PluginConfig, SkillPropagationConfig, SwarmConfig, TurboConfig, } from './schema';
22
- export { AgentOverrideConfigSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, AutomationModeSchema, LeanTurboConfigSchema, MemoryConfigSchema, PhaseCompleteConfigSchema, PipelineConfigSchema, PluginConfigSchema, SkillPropagationConfigSchema, SwarmConfigSchema, TurboConfigSchema, } from './schema';
21
+ export type { AgentOverrideConfig, AutomationCapabilities, AutomationConfig, AutomationMode, LeanTurboConfig, MemoryConfig, PhaseCompleteConfig, PipelineConfig, PluginConfig, SkillPropagationConfig, SwarmConfig, TurboConfig, WorktreeIsolationConfig, } from './schema';
22
+ export { AgentOverrideConfigSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, AutomationModeSchema, LeanTurboConfigSchema, MemoryConfigSchema, PhaseCompleteConfigSchema, PipelineConfigSchema, PluginConfigSchema, SkillPropagationConfigSchema, SwarmConfigSchema, TurboConfigSchema, WorktreeIsolationConfigSchema, } 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';
@@ -822,6 +822,25 @@ export declare const ParallelizationConfigSchema: z.ZodObject<{
822
822
  max_reviewers: z.ZodDefault<z.ZodNumber>;
823
823
  }, z.core.$strip>;
824
824
  export type ParallelizationConfig = z.infer<typeof ParallelizationConfigSchema>;
825
+ export declare const WorktreeIsolationConfigSchema: z.ZodObject<{
826
+ policy: z.ZodDefault<z.ZodEnum<{
827
+ disabled: "disabled";
828
+ auto: "auto";
829
+ required: "required";
830
+ }>>;
831
+ merge_strategy: z.ZodDefault<z.ZodEnum<{
832
+ merge: "merge";
833
+ rebase: "rebase";
834
+ "cherry-pick": "cherry-pick";
835
+ }>>;
836
+ worktree_dir: z.ZodOptional<z.ZodString>;
837
+ deps_strategy: z.ZodDefault<z.ZodEnum<{
838
+ link: "link";
839
+ skip: "skip";
840
+ copy: "copy";
841
+ }>>;
842
+ }, z.core.$strip>;
843
+ export type WorktreeIsolationConfig = z.infer<typeof WorktreeIsolationConfigSchema>;
825
844
  export declare const LeanTurboConfigSchema: z.ZodObject<{
826
845
  max_parallel_coders: z.ZodDefault<z.ZodNumber>;
827
846
  require_declared_scope: z.ZodDefault<z.ZodBoolean>;
@@ -1481,6 +1500,24 @@ export declare const PluginConfigSchema: z.ZodObject<{
1481
1500
  max_coders: z.ZodDefault<z.ZodNumber>;
1482
1501
  max_reviewers: z.ZodDefault<z.ZodNumber>;
1483
1502
  }, z.core.$strip>>;
1503
+ worktree: z.ZodOptional<z.ZodObject<{
1504
+ policy: z.ZodDefault<z.ZodEnum<{
1505
+ disabled: "disabled";
1506
+ auto: "auto";
1507
+ required: "required";
1508
+ }>>;
1509
+ merge_strategy: z.ZodDefault<z.ZodEnum<{
1510
+ merge: "merge";
1511
+ rebase: "rebase";
1512
+ "cherry-pick": "cherry-pick";
1513
+ }>>;
1514
+ worktree_dir: z.ZodOptional<z.ZodString>;
1515
+ deps_strategy: z.ZodDefault<z.ZodEnum<{
1516
+ link: "link";
1517
+ skip: "skip";
1518
+ copy: "copy";
1519
+ }>>;
1520
+ }, z.core.$strip>>;
1484
1521
  turbo: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1485
1522
  strategy: z.ZodLiteral<"standard">;
1486
1523
  lean: z.ZodOptional<z.ZodObject<{
@@ -5,8 +5,10 @@
5
5
  * Uses experimental.chat.messages.transform to provide non-blocking guidance.
6
6
  */
7
7
  import type { PluginConfig } from '../config';
8
+ import { loadPlanJsonOnly } from '../plan/manager';
8
9
  import type { AgentSessionState } from '../state';
9
10
  import type { DelegationEnvelope, EnvelopeValidationResult } from '../types/delegation.js';
11
+ import { attemptMergeBackFromDirty, postMergeCleanup, provisionWorktree, removeWorktree } from '../worktree';
10
12
  /**
11
13
  * v6.33.1 CRIT-1: Fallback map for declared coder scope by taskId.
12
14
  * When messagesTransform sets declaredCoderScope on the architect session,
@@ -78,6 +80,7 @@ interface MessageWithParts {
78
80
  info: MessageInfo;
79
81
  parts: MessagePart[];
80
82
  }
83
+ export declare function resetStandardWorktreeIsolationState(): void;
81
84
  declare function resolveDelegatedPlanTaskId(args: Record<string, unknown>, knownPlanTaskIds?: ReadonlySet<string>): string | null;
82
85
  declare function buildParallelExecutionGuidance(directory: string | undefined, sessionID: string, session: AgentSessionState): Promise<string | null>;
83
86
  /**
@@ -100,6 +103,12 @@ export declare const _internals: {
100
103
  resolveEvidenceTaskId: typeof resolveEvidenceTaskId;
101
104
  resolveDelegatedPlanTaskId: typeof resolveDelegatedPlanTaskId;
102
105
  buildParallelExecutionGuidance: typeof buildParallelExecutionGuidance;
106
+ loadPlanJsonOnly: typeof loadPlanJsonOnly;
107
+ provisionWorktree: typeof provisionWorktree;
108
+ removeWorktree: typeof removeWorktree;
109
+ attemptMergeBackFromDirty: typeof attemptMergeBackFromDirty;
110
+ postMergeCleanup: typeof postMergeCleanup;
111
+ resetStandardWorktreeIsolationState: typeof resetStandardWorktreeIsolationState;
103
112
  };
104
113
  /**
105
114
  * Creates the experimental.chat.messages.transform hook for delegation gating.