opencode-swarm-plugin 0.48.0 → 0.49.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 +10 -7
- package/bin/swarm-setup-consolidate.test.ts +84 -0
- package/bin/swarm.test.ts +170 -0
- package/bin/swarm.ts +300 -2
- package/bin/test-setup-manual.md +67 -0
- package/dist/bin/swarm.js +1055 -188
- package/dist/coordinator-guard.d.ts +79 -0
- package/dist/coordinator-guard.d.ts.map +1 -0
- package/dist/examples/plugin-wrapper-template.ts +13 -2
- package/dist/hive.d.ts.map +1 -1
- package/dist/hive.js +5 -4
- package/dist/index.d.ts +18 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +386 -18
- package/dist/memory.d.ts.map +1 -1
- package/dist/plugin.js +383 -18
- package/dist/query-tools.d.ts +5 -0
- package/dist/query-tools.d.ts.map +1 -1
- package/dist/schemas/cell.d.ts +12 -0
- package/dist/schemas/cell.d.ts.map +1 -1
- package/dist/swarm-insights.d.ts +158 -0
- package/dist/swarm-insights.d.ts.map +1 -1
- package/dist/swarm-orchestrate.d.ts +4 -4
- package/dist/swarm-orchestrate.d.ts.map +1 -1
- package/dist/swarm-prompts.d.ts +1 -1
- package/dist/swarm-prompts.d.ts.map +1 -1
- package/dist/swarm-prompts.js +345 -18
- package/dist/swarm-strategies.d.ts +1 -1
- package/dist/swarm.d.ts +2 -2
- package/examples/plugin-wrapper-template.ts +13 -2
- package/package.json +2 -2
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coordinator Guard - Runtime Violation Enforcement
|
|
3
|
+
*
|
|
4
|
+
* Detects and REJECTS coordinator protocol violations at runtime.
|
|
5
|
+
* Unlike planning-guardrails.ts (which only warns), this guard throws errors
|
|
6
|
+
* to prevent coordinators from performing work that should be delegated to workers.
|
|
7
|
+
*
|
|
8
|
+
* Coordinators MUST:
|
|
9
|
+
* - Spawn workers via swarm_spawn_subtask
|
|
10
|
+
* - Review worker output via swarm_review
|
|
11
|
+
* - Coordinate and monitor, not implement
|
|
12
|
+
*
|
|
13
|
+
* Coordinators MUST NOT:
|
|
14
|
+
* - Edit or write files (use workers)
|
|
15
|
+
* - Run tests (workers verify their own work)
|
|
16
|
+
* - Reserve files (workers reserve before editing)
|
|
17
|
+
*
|
|
18
|
+
* @module coordinator-guard
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Custom error for coordinator guard violations
|
|
22
|
+
*
|
|
23
|
+
* Thrown when a coordinator attempts to perform work that should be delegated to workers.
|
|
24
|
+
* Includes helpful suggestions for the correct approach.
|
|
25
|
+
*/
|
|
26
|
+
export declare class CoordinatorGuardError extends Error {
|
|
27
|
+
/** Type of violation that occurred */
|
|
28
|
+
violationType: "coordinator_edited_file" | "coordinator_ran_tests" | "coordinator_reserved_files";
|
|
29
|
+
/** Additional context about the violation */
|
|
30
|
+
payload: Record<string, unknown>;
|
|
31
|
+
/** Helpful suggestion for fixing the violation */
|
|
32
|
+
suggestion?: string;
|
|
33
|
+
constructor(message: string, violationType: "coordinator_edited_file" | "coordinator_ran_tests" | "coordinator_reserved_files", payload?: Record<string, unknown>, suggestion?: string);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Result of coordinator guard check
|
|
37
|
+
*/
|
|
38
|
+
export interface GuardCheckResult {
|
|
39
|
+
/** Whether the tool call is blocked */
|
|
40
|
+
blocked: boolean;
|
|
41
|
+
/** Error if blocked */
|
|
42
|
+
error?: CoordinatorGuardError;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if the current agent context is a coordinator
|
|
46
|
+
*
|
|
47
|
+
* @param agentContext - Agent context type
|
|
48
|
+
* @returns True if coordinator, false otherwise
|
|
49
|
+
*/
|
|
50
|
+
export declare function isCoordinator(agentContext: "coordinator" | "worker" | string): agentContext is "coordinator";
|
|
51
|
+
/**
|
|
52
|
+
* Check coordinator guard for potential violations
|
|
53
|
+
*
|
|
54
|
+
* This is the main entry point for the guard. It checks if the current tool call
|
|
55
|
+
* violates coordinator protocol and returns a result indicating whether to block
|
|
56
|
+
* the call and what error to throw.
|
|
57
|
+
*
|
|
58
|
+
* @param params - Guard check parameters
|
|
59
|
+
* @returns Guard check result with block status and optional error
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const result = checkCoordinatorGuard({
|
|
64
|
+
* agentContext: "coordinator",
|
|
65
|
+
* toolName: "edit",
|
|
66
|
+
* toolArgs: { filePath: "src/auth.ts" },
|
|
67
|
+
* });
|
|
68
|
+
*
|
|
69
|
+
* if (result.blocked) {
|
|
70
|
+
* throw result.error; // Prevents coordinator from editing files
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function checkCoordinatorGuard(params: {
|
|
75
|
+
agentContext: "coordinator" | "worker" | string;
|
|
76
|
+
toolName: string;
|
|
77
|
+
toolArgs: Record<string, unknown>;
|
|
78
|
+
}): GuardCheckResult;
|
|
79
|
+
//# sourceMappingURL=coordinator-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator-guard.d.ts","sourceRoot":"","sources":["../src/coordinator-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,sCAAsC;IAC/B,aAAa,EAChB,yBAAyB,GACzB,uBAAuB,GACvB,4BAA4B,CAAC;IAEjC,6CAA6C;IACtC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC,kDAAkD;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;gBAGzB,OAAO,EAAE,MAAM,EACf,aAAa,EACT,yBAAyB,GACzB,uBAAuB,GACvB,4BAA4B,EAChC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,EACrC,UAAU,CAAC,EAAE,MAAM;CAQtB;AAsCD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,OAAO,EAAE,OAAO,CAAC;IAEjB,uBAAuB;IACvB,KAAK,CAAC,EAAE,qBAAqB,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,YAAY,EAAE,aAAa,GAAG,QAAQ,GAAG,MAAM,GAC9C,YAAY,IAAI,aAAa,CAE/B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE;IAC5C,YAAY,EAAE,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,GAAG,gBAAgB,CA+FnB"}
|
|
@@ -2775,8 +2775,9 @@ const SwarmPlugin: Plugin = async (
|
|
|
2775
2775
|
has_projection: !!sessionScan.projection?.isSwarm,
|
|
2776
2776
|
});
|
|
2777
2777
|
|
|
2778
|
-
// Hoist snapshot outside try block so
|
|
2778
|
+
// Hoist snapshot and queryDuration outside try block so they're available in fallback path
|
|
2779
2779
|
let snapshot: SwarmStateSnapshot | undefined;
|
|
2780
|
+
let queryDuration = 0; // 0 if using projection, actual duration if using hive query
|
|
2780
2781
|
|
|
2781
2782
|
try {
|
|
2782
2783
|
// =======================================================================
|
|
@@ -2821,7 +2822,7 @@ const SwarmPlugin: Plugin = async (
|
|
|
2821
2822
|
// Fallback to hive query (may be stale)
|
|
2822
2823
|
const queryStart = Date.now();
|
|
2823
2824
|
snapshot = await querySwarmState(input.sessionID);
|
|
2824
|
-
|
|
2825
|
+
queryDuration = Date.now() - queryStart;
|
|
2825
2826
|
|
|
2826
2827
|
logCompaction("info", "fallback_to_hive_query", {
|
|
2827
2828
|
session_id: input.sessionID,
|
|
@@ -2967,6 +2968,16 @@ const SwarmPlugin: Plugin = async (
|
|
|
2967
2968
|
});
|
|
2968
2969
|
}
|
|
2969
2970
|
|
|
2971
|
+
// Guard: Don't double-inject if LLM prompt was already set
|
|
2972
|
+
// This can happen if the error occurred after setting output.prompt but before return
|
|
2973
|
+
if ("prompt" in output && output.prompt) {
|
|
2974
|
+
logCompaction("info", "skipping_static_fallback_prompt_already_set", {
|
|
2975
|
+
session_id: input.sessionID,
|
|
2976
|
+
prompt_length: output.prompt.length,
|
|
2977
|
+
});
|
|
2978
|
+
return;
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2970
2981
|
// Level 3: Fall back to static context WITH dynamic state from snapshot
|
|
2971
2982
|
const header = `[Swarm detected: ${detection.reasons.join(", ")}]\n\n`;
|
|
2972
2983
|
|
package/dist/hive.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hive.d.ts","sourceRoot":"","sources":["../src/hive.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAKL,KAAK,WAAW,EAKjB,MAAM,YAAY,CAAC;AAepB;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAE/D;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAGD,eAAO,MAAM,wBAAwB,gCAA0B,CAAC;AAChE,eAAO,MAAM,wBAAwB,gCAA0B,CAAC;AAuChE;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;aAGhB,OAAO,EAAE,MAAM;aACf,QAAQ,CAAC,EAAE,MAAM;aACjB,MAAM,CAAC,EAAE,MAAM;gBAH/B,OAAO,EAAE,MAAM,EACC,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,YAAA,EACjB,MAAM,CAAC,EAAE,MAAM,YAAA;CAKlC;AAGD,eAAO,MAAM,SAAS,kBAAY,CAAC;AAEnC;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,K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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUtB,CAAC"}
|
package/dist/hive.js
CHANGED
|
@@ -13358,7 +13358,8 @@ var CellTreeSchema = exports_external.object({
|
|
|
13358
13358
|
title: exports_external.string().min(1),
|
|
13359
13359
|
description: exports_external.string().optional().default("")
|
|
13360
13360
|
}),
|
|
13361
|
-
subtasks: exports_external.array(SubtaskSpecSchema).min(1)
|
|
13361
|
+
subtasks: exports_external.array(SubtaskSpecSchema).min(1),
|
|
13362
|
+
strategy: exports_external.enum(["file-based", "feature-based", "risk-based", "research-based"]).optional().describe("Decomposition strategy from swarm_select_strategy. If not provided, defaults to feature-based.")
|
|
13362
13363
|
});
|
|
13363
13364
|
var EpicCreateArgsSchema = exports_external.object({
|
|
13364
13365
|
epic_title: exports_external.string().min(1),
|
|
@@ -14093,13 +14094,13 @@ async function autoMigrateFromJSONL(adapter, projectKey) {
|
|
|
14093
14094
|
skipExisting: true
|
|
14094
14095
|
});
|
|
14095
14096
|
if (result.created > 0 || result.updated > 0) {
|
|
14096
|
-
console.
|
|
14097
|
+
console.error(`[hive] Auto-migrated ${result.created} cells from ${jsonlPath} (${result.skipped} skipped, ${result.errors.length} errors)`);
|
|
14097
14098
|
}
|
|
14098
14099
|
if (result.errors.length > 0) {
|
|
14099
|
-
console.
|
|
14100
|
+
console.error(`[hive] Migration errors:`, result.errors.slice(0, 5).map((e) => `${e.cellId}: ${e.error}`));
|
|
14100
14101
|
}
|
|
14101
14102
|
} catch (error45) {
|
|
14102
|
-
console.
|
|
14103
|
+
console.error(`[hive] Failed to auto-migrate from ${jsonlPath}:`, error45 instanceof Error ? error45.message : String(error45));
|
|
14103
14104
|
}
|
|
14104
14105
|
}
|
|
14105
14106
|
function formatCellForOutput(adapterCell) {
|
package/dist/index.d.ts
CHANGED
|
@@ -820,7 +820,7 @@ export declare const allTools: {
|
|
|
820
820
|
files_touched: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
821
821
|
skip_verification: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
822
822
|
planned_files: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
823
|
-
start_time: import("zod").
|
|
823
|
+
start_time: import("zod").ZodNumber;
|
|
824
824
|
error_count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
825
825
|
retry_count: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
826
826
|
skip_review: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
@@ -830,11 +830,11 @@ export declare const allTools: {
|
|
|
830
830
|
agent_name: string;
|
|
831
831
|
bead_id: string;
|
|
832
832
|
summary: string;
|
|
833
|
+
start_time: number;
|
|
833
834
|
evaluation?: string | undefined;
|
|
834
835
|
files_touched?: string[] | undefined;
|
|
835
836
|
skip_verification?: boolean | undefined;
|
|
836
837
|
planned_files?: string[] | undefined;
|
|
837
|
-
start_time?: number | undefined;
|
|
838
838
|
error_count?: number | undefined;
|
|
839
839
|
retry_count?: number | undefined;
|
|
840
840
|
skip_review?: boolean | undefined;
|
|
@@ -1932,6 +1932,22 @@ export { ValidationIssueSeverity, ValidationIssueCategory, ValidationIssueSchema
|
|
|
1932
1932
|
* - EpicState - Epic state
|
|
1933
1933
|
*/
|
|
1934
1934
|
export { projectSwarmState, hasSwarmSignature, isSwarmActive, getSwarmSummary, type SwarmProjection, type ToolCallEvent, type SubtaskState, type SubtaskStatus, type EpicState, } from "./swarm-signature";
|
|
1935
|
+
/**
|
|
1936
|
+
* Coordinator Guard - Runtime Violation Enforcement
|
|
1937
|
+
*
|
|
1938
|
+
* Detects and REJECTS coordinator protocol violations at runtime.
|
|
1939
|
+
* Unlike planning-guardrails (which only warns), the coordinator guard throws errors
|
|
1940
|
+
* to prevent coordinators from performing work that should be delegated to workers.
|
|
1941
|
+
*
|
|
1942
|
+
* Functions:
|
|
1943
|
+
* - checkCoordinatorGuard - Main entry point for guard checks
|
|
1944
|
+
* - isCoordinator - Type guard for coordinator context
|
|
1945
|
+
*
|
|
1946
|
+
* Types:
|
|
1947
|
+
* - CoordinatorGuardError - Custom error with violation details
|
|
1948
|
+
* - GuardCheckResult - Result of guard check
|
|
1949
|
+
*/
|
|
1950
|
+
export { checkCoordinatorGuard, isCoordinator, CoordinatorGuardError, type GuardCheckResult, } from "./coordinator-guard";
|
|
1935
1951
|
/**
|
|
1936
1952
|
* Re-export CASS tools module
|
|
1937
1953
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAsB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAsB,MAAM,qBAAqB,CAAC;AAkDtE;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,WAAW,EAAE,MA2alB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAe,WAAW,CAAC;AAM3B;;GAEG;AACH,cAAc,WAAW,CAAC;AAE1B;;;;;;;;;;;GAWG;AACH,cAAc,QAAQ,CAAC;AAEvB;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,cAAc,EACd,cAAc,EACd,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC5B,4BAA4B,EAC5B,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AAEtB;;;;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