opencode-swarm 6.62.0 → 6.63.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 +204 -87
- package/dist/evidence/manager.d.ts +2 -12
- package/dist/gate-evidence.d.ts +2 -9
- package/dist/index.js +275 -149
- package/dist/plan/ledger.d.ts +2 -2
- package/dist/plan/manager.d.ts +8 -0
- package/dist/validation/task-id.d.ts +43 -0
- package/package.json +1 -1
package/dist/plan/ledger.d.ts
CHANGED
|
@@ -108,7 +108,7 @@ export declare function readLedgerEvents(directory: string): Promise<LedgerEvent
|
|
|
108
108
|
* @param directory - The working directory
|
|
109
109
|
* @param planId - Unique identifier for the plan
|
|
110
110
|
*/
|
|
111
|
-
export declare function initLedger(directory: string, planId: string, initialPlanHash?: string): Promise<void>;
|
|
111
|
+
export declare function initLedger(directory: string, planId: string, initialPlanHash?: string, initialPlan?: Plan): Promise<void>;
|
|
112
112
|
/**
|
|
113
113
|
* Append a new event to the ledger.
|
|
114
114
|
* Uses atomic write: write to temp file then rename.
|
|
@@ -206,7 +206,7 @@ interface ReplayOptions {
|
|
|
206
206
|
* @param options - Optional replay options
|
|
207
207
|
* @returns Reconstructed Plan from ledger events, or null if plan.json doesn't exist or ledger is empty
|
|
208
208
|
*/
|
|
209
|
-
export declare function replayFromLedger(directory: string,
|
|
209
|
+
export declare function replayFromLedger(directory: string, _options?: ReplayOptions): Promise<Plan | null>;
|
|
210
210
|
/**
|
|
211
211
|
* Result type for readLedgerEventsWithIntegrity
|
|
212
212
|
*/
|
package/dist/plan/manager.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed error for concurrent plan modification (#444 item 3).
|
|
3
|
+
* Thrown when savePlan exhausts CAS retries due to concurrent writers.
|
|
4
|
+
* Callers can catch this specifically to refresh and retry at the outer level.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PlanConcurrentModificationError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
1
9
|
import { type Plan, type RuntimePlan, type TaskStatus } from '../config/plan-schema';
|
|
2
10
|
/** Reset the startup ledger check flag. For testing only. */
|
|
3
11
|
export declare function resetStartupLedgerCheck(): void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized task ID validation (#452 item 2).
|
|
3
|
+
*
|
|
4
|
+
* Two strictness levels exist by design:
|
|
5
|
+
*
|
|
6
|
+
* - **Strict** (`isStrictTaskId`): Only numeric N.M or N.M.P format.
|
|
7
|
+
* Use for gate-evidence operations where task IDs map to plan phases/tasks.
|
|
8
|
+
*
|
|
9
|
+
* - **Broad** (`isValidTaskId` / `sanitizeTaskId`): Accepts numeric, retrospective
|
|
10
|
+
* (retro-N), internal tool IDs (sast_scan, etc.), and general alphanumeric.
|
|
11
|
+
* Use for evidence storage, trajectory logging, and other paths that handle
|
|
12
|
+
* non-plan task IDs.
|
|
13
|
+
*
|
|
14
|
+
* Both levels reject path traversal, null bytes, control characters, and
|
|
15
|
+
* other unsafe patterns.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Strict validation: only numeric N.M or N.M.P format.
|
|
19
|
+
* Use for gate-evidence operations where task IDs correspond to plan phases/tasks.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isStrictTaskId(taskId: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Broad validation: accepts numeric, retrospective, internal tool, and
|
|
24
|
+
* general alphanumeric task IDs.
|
|
25
|
+
* Use for evidence storage, trajectory logging, and non-plan task ID paths.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isValidTaskId(taskId: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Throws if the task ID fails strict validation.
|
|
30
|
+
* Use as a guard at the top of functions that build file paths from task IDs.
|
|
31
|
+
*/
|
|
32
|
+
export declare function assertStrictTaskId(taskId: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Validates and returns the task ID (broad validation).
|
|
35
|
+
* Throws with a descriptive message if the ID is invalid.
|
|
36
|
+
* Replaces evidence/manager.ts sanitizeTaskId for new callers.
|
|
37
|
+
*/
|
|
38
|
+
export declare function sanitizeTaskId(taskId: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Validation for tool input: returns error message string if invalid, undefined if valid.
|
|
41
|
+
* Strict numeric format only (for update-task-status, declare-scope, etc.).
|
|
42
|
+
*/
|
|
43
|
+
export declare function validateTaskIdFormat(taskId: string): string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.63.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",
|