opencode-swarm-plugin 0.57.0 → 0.57.1
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/claude-plugin/agents/coordinator.md +1 -0
- package/claude-plugin/bin/swarm-mcp-server.ts +12 -6
- package/claude-plugin/dist/bin/swarm.js +12 -8
- package/claude-plugin/dist/build/mcp-bundle.d.ts +16 -0
- package/claude-plugin/dist/build/mcp-bundle.d.ts.map +1 -0
- package/claude-plugin/dist/cache/claude-plugin-cache.d.ts +41 -0
- package/claude-plugin/dist/cache/claude-plugin-cache.d.ts.map +1 -0
- package/claude-plugin/dist/claude-plugin/claude-plugin-assets.d.ts.map +1 -1
- package/claude-plugin/dist/index.js +1 -0
- package/claude-plugin/dist/mcp/swarm-mcp-server.js +19675 -0
- package/claude-plugin/dist/plugin.js +1 -0
- package/claude-plugin/dist/skills.d.ts.map +1 -1
- package/claude-plugin/dist/swarm-prompts.d.ts +1 -1
- package/claude-plugin/dist/swarm-prompts.d.ts.map +1 -1
- package/claude-plugin/dist/swarm-prompts.js +9 -6
- package/claude-plugin/scripts/copyClaudePluginRuntimeAssets.ts +84 -0
- package/claude-plugin/skills/always-on-guidance/SKILL.md +1 -0
- package/claude-plugin/tests/mcp-runtime.test.ts +187 -0
- package/dist/bin/swarm.js +12 -8
- package/dist/build/mcp-bundle.d.ts +16 -0
- package/dist/build/mcp-bundle.d.ts.map +1 -0
- package/dist/cache/claude-plugin-cache.d.ts +41 -0
- package/dist/cache/claude-plugin-cache.d.ts.map +1 -0
- package/dist/claude-plugin/claude-plugin-assets.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/mcp/swarm-mcp-server.js +19675 -0
- package/dist/plugin.js +1 -0
- package/dist/skills.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 +9 -6
- package/package.json +3 -1
|
@@ -22,6 +22,7 @@ Orchestrates swarm work: decomposes tasks, spawns workers, monitors progress, an
|
|
|
22
22
|
- **Never reserve files** as the coordinator. Workers reserve their own files.
|
|
23
23
|
- **Decompose with intent** using `swarm_plan_prompt` + `swarm_validate_decomposition`.
|
|
24
24
|
- **Review every worker completion** via `swarm_review` + `swarm_review_feedback`.
|
|
25
|
+
- **After every `swarm_spawn_subtask`, immediately call `Task(subagent_type="swarm-worker", prompt="<prompt returned by swarm_spawn_subtask>")`.**
|
|
25
26
|
- **Record outcomes** with `swarm_complete` for learning signals.
|
|
26
27
|
|
|
27
28
|
## Tool Access
|
|
@@ -21,20 +21,26 @@ type ToolDefinition = {
|
|
|
21
21
|
/**
|
|
22
22
|
* Resolve the tool registry entrypoint for the MCP server.
|
|
23
23
|
*/
|
|
24
|
-
export function resolveToolRegistryPath(
|
|
25
|
-
|
|
24
|
+
export function resolveToolRegistryPath({
|
|
25
|
+
currentDir = dirname(fileURLToPath(import.meta.url)),
|
|
26
|
+
}: {
|
|
27
|
+
currentDir?: string;
|
|
28
|
+
} = {}): string {
|
|
26
29
|
const pluginDistPath = resolve(currentDir, "../dist/index.js");
|
|
27
|
-
const packageDistPath = resolve(currentDir, "../../dist/index.js");
|
|
28
30
|
|
|
29
31
|
if (existsSync(pluginDistPath)) {
|
|
30
32
|
return pluginDistPath;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
const sourcePath = resolve(currentDir, "../../src/index.ts");
|
|
36
|
+
if (existsSync(sourcePath)) {
|
|
37
|
+
return sourcePath;
|
|
35
38
|
}
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
throw new Error(
|
|
41
|
+
`[swarm-mcp] Missing Claude plugin runtime bundle. Expected ${pluginDistPath}. ` +
|
|
42
|
+
"Rebuild the package so claude-plugin/dist is populated.",
|
|
43
|
+
);
|
|
38
44
|
}
|
|
39
45
|
|
|
40
46
|
/**
|
|
@@ -53267,7 +53267,7 @@ ${prefix}}`;
|
|
|
53267
53267
|
return path22;
|
|
53268
53268
|
}
|
|
53269
53269
|
return sp2.join(cwd, path22);
|
|
53270
|
-
}, EMPTY_SET, STAT_METHOD_F = "stat", STAT_METHOD_L = "lstat", FSWatcher, chokidar_default, FileWatcher, NormalizedMessageSchema, OpenCodeSwarmEventSchema, SWARM_MAIL_VERSION = "
|
|
53270
|
+
}, EMPTY_SET, STAT_METHOD_F = "stat", STAT_METHOD_L = "lstat", FSWatcher, chokidar_default, FileWatcher, NormalizedMessageSchema, OpenCodeSwarmEventSchema, SWARM_MAIL_VERSION = "1.10.0";
|
|
53271
53271
|
var init_dist = __esm(() => {
|
|
53272
53272
|
__create2 = Object.create;
|
|
53273
53273
|
__getProtoOf2 = Object.getPrototypeOf;
|
|
@@ -169788,7 +169788,7 @@ ${prefix}}`;
|
|
|
169788
169788
|
return path24;
|
|
169789
169789
|
}
|
|
169790
169790
|
return sp22.join(cwd, path24);
|
|
169791
|
-
}, EMPTY_SET2, STAT_METHOD_F2 = "stat", STAT_METHOD_L2 = "lstat", FSWatcher2, chokidar_default2, FileWatcher2, NormalizedMessageSchema2, OpenCodeSwarmEventSchema2, SWARM_MAIL_VERSION2 = "
|
|
169791
|
+
}, EMPTY_SET2, STAT_METHOD_F2 = "stat", STAT_METHOD_L2 = "lstat", FSWatcher2, chokidar_default2, FileWatcher2, NormalizedMessageSchema2, OpenCodeSwarmEventSchema2, SWARM_MAIL_VERSION2 = "1.10.0";
|
|
169792
169792
|
var init_dist9 = __esm(() => {
|
|
169793
169793
|
__create4 = Object.create;
|
|
169794
169794
|
__getProtoOf4 = Object.getPrototypeOf;
|
|
@@ -278091,6 +278091,7 @@ var init_skills2 = __esm(() => {
|
|
|
278091
278091
|
coordinator: `### Coordinator Enforcement
|
|
278092
278092
|
- Coordinator role: orchestrate, decompose, spawn workers
|
|
278093
278093
|
- **Never** edit files or reserve locks directly
|
|
278094
|
+
- **After every \`swarm_spawn_subtask\`, immediately call \`Task(subagent_type="swarm-worker", prompt="<prompt returned by swarm_spawn_subtask>")\`**
|
|
278094
278095
|
- Coordinator override: use \`swarmmail_release_all\` only for stale/orphaned reservations (announce in Swarm Mail)
|
|
278095
278096
|
- Review work with \`swarm_review\` before accepting`,
|
|
278096
278097
|
worker: `### Worker Enforcement
|
|
@@ -324048,6 +324049,7 @@ var init_skills = __esm4(() => {
|
|
|
324048
324049
|
coordinator: `### Coordinator Enforcement
|
|
324049
324050
|
- Coordinator role: orchestrate, decompose, spawn workers
|
|
324050
324051
|
- **Never** edit files or reserve locks directly
|
|
324052
|
+
- **After every \`swarm_spawn_subtask\`, immediately call \`Task(subagent_type="swarm-worker", prompt="<prompt returned by swarm_spawn_subtask>")\`**
|
|
324051
324053
|
- Coordinator override: use \`swarmmail_release_all\` only for stale/orphaned reservations (announce in Swarm Mail)
|
|
324052
324054
|
- Review work with \`swarm_review\` before accepting`,
|
|
324053
324055
|
worker: `### Worker Enforcement
|
|
@@ -352003,7 +352005,7 @@ Your role is **ONLY** to:
|
|
|
352003
352005
|
║ - Clarify task scope (ask questions, understand requirements) ║
|
|
352004
352006
|
║ - Read package.json/tsconfig.json for structure (metadata only) ║
|
|
352005
352007
|
║ - Decompose into subtasks (swarm_plan_prompt, validate_decomposition) ║
|
|
352006
|
-
║ - Spawn workers (swarm_spawn_subtask
|
|
352008
|
+
║ - Spawn workers (swarm_spawn_subtask → Task(subagent_type="swarm-worker", prompt=<from swarm_spawn_subtask>)) ║
|
|
352007
352009
|
║ - Monitor progress (swarmmail_inbox, swarm_status) ║
|
|
352008
352010
|
║ - Review completed work (swarm_review, swarm_review_feedback) ║
|
|
352009
352011
|
║ - Verify final state (check all workers completed, hive_sync) ║
|
|
@@ -352047,7 +352049,7 @@ swarm_spawn_subtask(
|
|
|
352047
352049
|
files=["src/auth/login.ts", "src/auth/login.test.ts"],
|
|
352048
352050
|
shared_context="Bug: login fails when username is null"
|
|
352049
352051
|
)
|
|
352050
|
-
Task(subagent_type="swarm-worker", prompt="<
|
|
352052
|
+
Task(subagent_type="swarm-worker", prompt="<prompt returned by swarm_spawn_subtask>")
|
|
352051
352053
|
\`\`\`
|
|
352052
352054
|
|
|
352053
352055
|
### Coordinator Override: Release Stale Reservations
|
|
@@ -352204,24 +352206,26 @@ swarm_validate_decomposition(response="<CellTree JSON>")
|
|
|
352204
352206
|
> - Parallel tasks: Spawn ALL in a single message
|
|
352205
352207
|
> - Sequential tasks: Spawn one, wait for completion, spawn next
|
|
352206
352208
|
|
|
352209
|
+
**After every swarm_spawn_subtask, immediately call Task(subagent_type="swarm-worker", prompt="<prompt returned by swarm_spawn_subtask>")**
|
|
352210
|
+
|
|
352207
352211
|
**For parallel work:**
|
|
352208
352212
|
\`\`\`
|
|
352209
352213
|
// Single message with multiple Task calls
|
|
352210
352214
|
swarm_spawn_subtask(bead_id_1, epic_id, title_1, files_1, shared_context, project_path="{project_path}")
|
|
352211
|
-
Task(subagent_type="swarm-worker", prompt="<
|
|
352215
|
+
Task(subagent_type="swarm-worker", prompt="<prompt returned by swarm_spawn_subtask>")
|
|
352212
352216
|
swarm_spawn_subtask(bead_id_2, epic_id, title_2, files_2, shared_context, project_path="{project_path}")
|
|
352213
|
-
Task(subagent_type="swarm-worker", prompt="<
|
|
352217
|
+
Task(subagent_type="swarm-worker", prompt="<prompt returned by swarm_spawn_subtask>")
|
|
352214
352218
|
\`\`\`
|
|
352215
352219
|
|
|
352216
352220
|
**For sequential work:**
|
|
352217
352221
|
\`\`\`
|
|
352218
352222
|
// Spawn worker 1, wait for completion
|
|
352219
352223
|
swarm_spawn_subtask(bead_id_1, ...)
|
|
352220
|
-
const result1 = await Task(subagent_type="swarm-worker", prompt="<
|
|
352224
|
+
const result1 = await Task(subagent_type="swarm-worker", prompt="<prompt returned by swarm_spawn_subtask>")
|
|
352221
352225
|
|
|
352222
352226
|
// THEN spawn worker 2 with context from worker 1
|
|
352223
352227
|
swarm_spawn_subtask(bead_id_2, ..., shared_context="Worker 1 completed: " + result1)
|
|
352224
|
-
const result2 = await Task(subagent_type="swarm-worker", prompt="<
|
|
352228
|
+
const result2 = await Task(subagent_type="swarm-worker", prompt="<prompt returned by swarm_spawn_subtask>")
|
|
352225
352229
|
\`\`\`
|
|
352226
352230
|
|
|
352227
352231
|
**NEVER do the work yourself.** Even if it seems faster, spawn a worker.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const MCP_ENTRY_RELATIVE_PATH: string;
|
|
2
|
+
export declare const MCP_BUNDLE_RELATIVE_PATH: string;
|
|
3
|
+
export type McpBundlePaths = {
|
|
4
|
+
pluginRoot: string;
|
|
5
|
+
entryPath: string;
|
|
6
|
+
bundlePath: string;
|
|
7
|
+
bundleDir: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Resolve the entry + output paths for the bundled MCP server.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveMcpBundlePaths({ packageRoot, pluginRoot, }?: {
|
|
13
|
+
packageRoot?: string;
|
|
14
|
+
pluginRoot?: string;
|
|
15
|
+
}): McpBundlePaths;
|
|
16
|
+
//# sourceMappingURL=mcp-bundle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-bundle.d.ts","sourceRoot":"","sources":["../../src/build/mcp-bundle.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uBAAuB,QAAqC,CAAC;AAC1E,eAAO,MAAM,wBAAwB,QAIpC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,WAA2B,EAC3B,UAA+C,GAChD,GAAE;IACD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,cAAc,CAUtB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type McpServerConfig = {
|
|
2
|
+
command: string;
|
|
3
|
+
args: string[];
|
|
4
|
+
cwd?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
};
|
|
7
|
+
export type McpConfig = {
|
|
8
|
+
mcpServers: Record<string, McpServerConfig>;
|
|
9
|
+
};
|
|
10
|
+
export type ClaudePluginCachePaths = {
|
|
11
|
+
cacheRoot: string;
|
|
12
|
+
mcpServerPath: string;
|
|
13
|
+
mcpConfigPath: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const CLAUDE_PLUGIN_ROOT_TOKEN = "${CLAUDE_PLUGIN_ROOT}";
|
|
16
|
+
export declare const SWARM_MCP_SERVER_NAME = "swarm-tools";
|
|
17
|
+
/**
|
|
18
|
+
* Resolve where cached Claude plugin assets should live.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveClaudePluginCachePaths({ cacheRoot, }?: {
|
|
21
|
+
cacheRoot?: string;
|
|
22
|
+
}): ClaudePluginCachePaths;
|
|
23
|
+
/**
|
|
24
|
+
* Create the MCP config for a cached Claude plugin bundle.
|
|
25
|
+
*/
|
|
26
|
+
export declare function createClaudePluginCacheMcpConfig({ pluginRootToken, command, description, }?: {
|
|
27
|
+
pluginRootToken?: string;
|
|
28
|
+
command?: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
}): McpConfig;
|
|
31
|
+
/**
|
|
32
|
+
* Describe the cached Claude plugin entrypoints for bundling.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveClaudePluginCacheBundleSpec({ cacheRoot, pluginRoot, }?: {
|
|
35
|
+
cacheRoot?: string;
|
|
36
|
+
pluginRoot?: string;
|
|
37
|
+
}): {
|
|
38
|
+
entryPath: string;
|
|
39
|
+
bundlePath: string;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=claude-plugin-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-plugin-cache.d.ts","sourceRoot":"","sources":["../../src/cache/claude-plugin-cache.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,wBAAwB,0BAA0B,CAAC;AAChE,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AAEnD;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,SAAgD,GACjD,GAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,sBAAsB,CAS9B;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,EAC/C,eAA0C,EAC1C,OAAgB,EAChB,WAAoD,GACrD,GAAE;IACD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,SAAS,CAgBjB;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,EACjD,SAAgD,EAChD,UAAsB,GACvB,GAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAOjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-plugin-assets.d.ts","sourceRoot":"","sources":["../../src/claude-plugin/claude-plugin-assets.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,4BAA4B,GAAG;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,WAAW,EACX,QAAoC,EACpC,UAA+C,GAChD,EAAE,4BAA4B,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"claude-plugin-assets.d.ts","sourceRoot":"","sources":["../../src/claude-plugin/claude-plugin-assets.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,4BAA4B,GAAG;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,WAAW,EACX,QAAoC,EACpC,UAA+C,GAChD,EAAE,4BAA4B,GAAG,IAAI,CAqBrC"}
|
|
@@ -27412,6 +27412,7 @@ var init_skills = __esm(() => {
|
|
|
27412
27412
|
coordinator: `### Coordinator Enforcement
|
|
27413
27413
|
- Coordinator role: orchestrate, decompose, spawn workers
|
|
27414
27414
|
- **Never** edit files or reserve locks directly
|
|
27415
|
+
- **After every \`swarm_spawn_subtask\`, immediately call \`Task(subagent_type="swarm-worker", prompt="<prompt returned by swarm_spawn_subtask>")\`**
|
|
27415
27416
|
- Coordinator override: use \`swarmmail_release_all\` only for stale/orphaned reservations (announce in Swarm Mail)
|
|
27416
27417
|
- Review work with \`swarm_review\` before accepting`,
|
|
27417
27418
|
worker: `### Worker Enforcement
|