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.
- package/dist/__tests__/evidence-lock.adversarial.test.d.ts +8 -0
- package/dist/__tests__/evidence-lock.test.d.ts +6 -0
- package/dist/__tests__/gate-evidence.adversarial.test.d.ts +7 -0
- package/dist/cli/index.js +1324 -1123
- package/dist/config/schema.d.ts +11 -0
- package/dist/evidence/lock.d.ts +36 -0
- package/dist/index.js +5145 -4985
- package/dist/parallel/dispatcher/index.d.ts +2 -0
- package/dist/parallel/dispatcher/noop-dispatcher.d.ts +18 -0
- package/dist/parallel/dispatcher/noop-dispatcher.test.d.ts +10 -0
- package/dist/parallel/dispatcher/types.d.ts +33 -0
- package/dist/parallel/index.d.ts +1 -0
- package/dist/plan/manager.cas-backoff.test.d.ts +10 -0
- package/dist/plan/manager.d.ts +17 -0
- package/dist/state/agent-run-context.d.ts +24 -0
- package/dist/state.agent-run-context.test.d.ts +10 -0
- package/dist/state.d.ts +16 -2
- package/dist/telemetry.d.ts +1 -1
- package/package.json +1 -1
package/dist/config/schema.d.ts
CHANGED
|
@@ -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>;
|