opencode-swarm 6.74.0 → 6.75.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.
@@ -526,6 +526,12 @@ export declare const CouncilConfigSchema: z.ZodObject<{
526
526
  escalateOnMaxRounds: z.ZodOptional<z.ZodString>;
527
527
  }, z.core.$strict>;
528
528
  export type CouncilConfig = z.infer<typeof CouncilConfigSchema>;
529
+ export declare const ParallelizationConfigSchema: z.ZodObject<{
530
+ enabled: z.ZodDefault<z.ZodBoolean>;
531
+ maxConcurrentTasks: z.ZodDefault<z.ZodNumber>;
532
+ evidenceLockTimeoutMs: z.ZodDefault<z.ZodNumber>;
533
+ }, z.core.$strip>;
534
+ export type ParallelizationConfig = z.infer<typeof ParallelizationConfigSchema>;
529
535
  export declare const PluginConfigSchema: z.ZodObject<{
530
536
  agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
531
537
  model: z.ZodOptional<z.ZodString>;
@@ -883,6 +889,11 @@ export declare const PluginConfigSchema: z.ZodObject<{
883
889
  requireAllMembers: z.ZodDefault<z.ZodBoolean>;
884
890
  escalateOnMaxRounds: z.ZodOptional<z.ZodString>;
885
891
  }, z.core.$strict>>;
892
+ parallelization: z.ZodOptional<z.ZodObject<{
893
+ enabled: z.ZodDefault<z.ZodBoolean>;
894
+ maxConcurrentTasks: z.ZodDefault<z.ZodNumber>;
895
+ evidenceLockTimeoutMs: z.ZodDefault<z.ZodNumber>;
896
+ }, z.core.$strip>>;
886
897
  turbo_mode: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
887
898
  full_auto: z.ZodDefault<z.ZodOptional<z.ZodObject<{
888
899
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Evidence write-lock helper (PR 1 — dark foundation).
3
+ *
4
+ * Wraps every evidence read-modify-write path with a proper-lockfile-backed
5
+ * exclusive lock so that concurrent writers cannot interleave their
6
+ * read-compute-write cycles. The underlying temp-file-plus-rename atomic
7
+ * write is preserved; this lock adds a coordinating layer on top.
8
+ *
9
+ * Telemetry events emitted:
10
+ * evidence_lock_acquired — lock obtained, fn executing
11
+ * evidence_lock_contended — lock busy, backing off before retry
12
+ * evidence_lock_stale_recovered — stale lock detected and recovered by proper-lockfile
13
+ * (timeout path emits nothing extra; EvidenceLockTimeoutError is thrown instead)
14
+ */
15
+ export declare class EvidenceLockTimeoutError extends Error {
16
+ readonly directory: string;
17
+ readonly evidencePath: string;
18
+ readonly agent: string;
19
+ readonly taskId: string;
20
+ constructor(directory: string, evidencePath: string, agent: string, taskId: string, timeoutMs: number);
21
+ }
22
+ /**
23
+ * Acquire an exclusive evidence lock, execute `fn`, then release the lock.
24
+ *
25
+ * Retries with exponential backoff until `evidenceLockTimeoutMs` elapses,
26
+ * then throws `EvidenceLockTimeoutError`. Always releases the lock in a
27
+ * `finally` block even if `fn` throws.
28
+ *
29
+ * @param directory Project root directory
30
+ * @param evidencePath Relative path of the evidence file to lock
31
+ * @param agent Acquiring agent name (for diagnostics)
32
+ * @param taskId Task identifier (for diagnostics)
33
+ * @param fn Callback that performs the read-modify-write
34
+ * @param timeoutMs Maximum wait time before EvidenceLockTimeoutError (default 60 000)
35
+ */
36
+ export declare function withEvidenceLock<T>(directory: string, evidencePath: string, agent: string, taskId: string, fn: () => Promise<T>, timeoutMs?: number): Promise<T>;