opencode-swarm-plugin 0.59.1 → 0.60.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 +14 -1
- package/bin/commands/doctor.test.ts +622 -0
- package/bin/commands/doctor.ts +658 -0
- package/bin/commands/status.test.ts +506 -0
- package/bin/commands/status.ts +520 -0
- package/bin/commands/tree.ts +39 -3
- package/bin/swarm.ts +19 -3
- package/claude-plugin/.claude-plugin/plugin.json +1 -1
- package/claude-plugin/commands/swarm.md +125 -2
- package/claude-plugin/dist/index.js +669 -308
- package/claude-plugin/dist/schemas/cell.d.ts +2 -0
- package/claude-plugin/dist/schemas/cell.d.ts.map +1 -1
- package/claude-plugin/dist/utils/adapter-cache.d.ts +36 -0
- package/claude-plugin/dist/utils/adapter-cache.d.ts.map +1 -0
- package/claude-plugin/dist/utils/event-utils.d.ts +31 -0
- package/claude-plugin/dist/utils/event-utils.d.ts.map +1 -0
- package/claude-plugin/dist/utils/git-commit-info.d.ts +10 -0
- package/claude-plugin/dist/utils/git-commit-info.d.ts.map +1 -0
- package/claude-plugin/dist/utils/tree-renderer.d.ts +69 -13
- package/claude-plugin/dist/utils/tree-renderer.d.ts.map +1 -1
- package/dist/bin/swarm.js +2664 -980
- package/dist/cass-tools.d.ts.map +1 -1
- package/dist/dashboard.d.ts.map +1 -1
- package/dist/hive.d.ts +8 -0
- package/dist/hive.d.ts.map +1 -1
- package/dist/hive.js +81 -101
- package/dist/hivemind-tools.d.ts.map +1 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +458 -311
- package/dist/marketplace/index.js +669 -308
- package/dist/memory-tools.d.ts.map +1 -1
- package/dist/memory.d.ts.map +1 -1
- package/dist/plugin.js +456 -308
- package/dist/replay-tools.d.ts +5 -1
- package/dist/replay-tools.d.ts.map +1 -1
- package/dist/schemas/cell.d.ts +2 -0
- package/dist/schemas/cell.d.ts.map +1 -1
- package/dist/skills.d.ts +4 -0
- package/dist/skills.d.ts.map +1 -1
- package/dist/storage.d.ts +7 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/swarm-mail.d.ts +2 -2
- package/dist/swarm-mail.d.ts.map +1 -1
- package/dist/swarm-orchestrate.d.ts +12 -0
- 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 +408 -274
- package/dist/swarm-verify.d.ts +100 -0
- package/dist/swarm-verify.d.ts.map +1 -0
- package/dist/swarm.d.ts +19 -1
- package/dist/swarm.d.ts.map +1 -1
- package/dist/test-utils/msw-server.d.ts +21 -0
- package/dist/test-utils/msw-server.d.ts.map +1 -0
- package/dist/utils/adapter-cache.d.ts +36 -0
- package/dist/utils/adapter-cache.d.ts.map +1 -0
- package/dist/utils/event-utils.d.ts +31 -0
- package/dist/utils/event-utils.d.ts.map +1 -0
- package/dist/utils/git-commit-info.d.ts +10 -0
- package/dist/utils/git-commit-info.d.ts.map +1 -0
- package/dist/utils/tree-renderer.d.ts +69 -13
- package/dist/utils/tree-renderer.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -112,6 +112,7 @@ export type CellUpdateArgs = z.infer<typeof CellUpdateArgsSchema>;
|
|
|
112
112
|
export declare const CellCloseArgsSchema: z.ZodObject<{
|
|
113
113
|
id: z.ZodString;
|
|
114
114
|
reason: z.ZodString;
|
|
115
|
+
result: z.ZodOptional<z.ZodString>;
|
|
115
116
|
}, z.core.$strip>;
|
|
116
117
|
export type CellCloseArgs = z.infer<typeof CellCloseArgsSchema>;
|
|
117
118
|
/** Arguments for querying cells */
|
|
@@ -364,6 +365,7 @@ export type BeadUpdateArgs = CellUpdateArgs;
|
|
|
364
365
|
export declare const BeadCloseArgsSchema: z.ZodObject<{
|
|
365
366
|
id: z.ZodString;
|
|
366
367
|
reason: z.ZodString;
|
|
368
|
+
result: z.ZodOptional<z.ZodString>;
|
|
367
369
|
}, z.core.$strip>;
|
|
368
370
|
/** @deprecated Use CellCloseArgs instead */
|
|
369
371
|
export type BeadCloseArgs = CellCloseArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../src/schemas/cell.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,0BAA0B;AAC1B,eAAO,MAAM,gBAAgB;;;;;EAK3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,uBAAuB;AACvB,eAAO,MAAM,cAAc;;;;;;EAMzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,4CAA4C;AAC5C,eAAO,MAAM,oBAAoB;;;;;;;;iBAG/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCrB,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C,oCAAoC;AACpC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;iBAY/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,oCAAoC;AACpC,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAK/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,mCAAmC;AACnC,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"cell.d.ts","sourceRo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AAExB,mDAAmD;AACnD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;iBAAuB,CAAC;AACzD,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC;AAE5C,mDAAmD;AACnD,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAAuB,CAAC;AACzD,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC;AAE5C,kDAAkD;AAClD,eAAO,MAAM,mBAAmB;;;;iBAAsB,CAAC;AACvD,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;AAE1C,kDAAkD;AAClD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;iBAAsB,CAAC;AACvD,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;AAE1C,6CAA6C;AAC7C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;iBAAiB,CAAC;AAC7C,uCAAuC;AACvC,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic adapter cache for project-scoped singletons
|
|
3
|
+
*
|
|
4
|
+
* Caches expensive adapters (database connections, indexers, etc.)
|
|
5
|
+
* keyed by project path. Ensures one instance per project.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const memoryCache = new AdapterCache<MemoryAdapter>();
|
|
10
|
+
* const adapter = await memoryCache.get(projectPath, async (path) => {
|
|
11
|
+
* const db = await getDatabase(path);
|
|
12
|
+
* return createMemoryAdapter(db);
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare class AdapterCache<T> {
|
|
17
|
+
private cached;
|
|
18
|
+
private cachedPath;
|
|
19
|
+
/**
|
|
20
|
+
* Get cached adapter or create new one
|
|
21
|
+
*
|
|
22
|
+
* @param projectPath - Project path to scope the adapter to
|
|
23
|
+
* @param factory - Async factory function to create the adapter
|
|
24
|
+
* @returns Cached or newly created adapter instance
|
|
25
|
+
*/
|
|
26
|
+
get(projectPath: string, factory: (path: string) => Promise<T>): Promise<T>;
|
|
27
|
+
/**
|
|
28
|
+
* Clear the cache (useful for testing)
|
|
29
|
+
*/
|
|
30
|
+
clear(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Get the currently cached project path
|
|
33
|
+
*/
|
|
34
|
+
getCachedPath(): string | null;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=adapter-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter-cache.d.ts","sourceRoot":"","sources":["../../src/utils/adapter-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,qBAAa,YAAY,CAAC,CAAC;IAC1B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,UAAU,CAAuB;IAEzC;;;;;;OAMG;IACG,GAAG,CACR,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GACnC,OAAO,CAAC,CAAC,CAAC;IAUb;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;OAEG;IACH,aAAa,IAAI,MAAM,GAAG,IAAI;CAG9B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event Utilities - Safe event emission for swarm-mail
|
|
3
|
+
*
|
|
4
|
+
* Provides a standardized way to emit events with error handling across all tools.
|
|
5
|
+
* Events are emitted to the swarm-mail event store for observability and learning.
|
|
6
|
+
*
|
|
7
|
+
* Pattern extracted from 21+ identical try-catch blocks across tool files.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Safely emit an event to the swarm-mail event store.
|
|
11
|
+
*
|
|
12
|
+
* Wraps event creation and emission in a try-catch to prevent tool failures
|
|
13
|
+
* from event system issues. Logs warnings on failure but continues execution.
|
|
14
|
+
*
|
|
15
|
+
* @param eventType - The type of event to emit (e.g., "cell_created", "memory_stored")
|
|
16
|
+
* @param data - Event data (project_key is added automatically if not present)
|
|
17
|
+
* @param toolName - Name of the calling tool for logging (e.g., "hive_create", "hivemind_store")
|
|
18
|
+
* @param projectPath - Project path for event storage (defaults to process.cwd())
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* await safeEmitEvent(
|
|
23
|
+
* "cell_created",
|
|
24
|
+
* { cell_id: cell.id, title: "Fix bug" },
|
|
25
|
+
* "hive_create",
|
|
26
|
+
* "/path/to/project"
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function safeEmitEvent(eventType: string, data: Record<string, unknown>, toolName: string, projectPath?: string): Promise<void>;
|
|
31
|
+
//# sourceMappingURL=event-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-utils.d.ts","sourceRoot":"","sources":["../../src/utils/event-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,aAAa,CAClC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAcf"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface GitCommitInfo {
|
|
2
|
+
sha: string;
|
|
3
|
+
message: string;
|
|
4
|
+
branch: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Get current git commit info. Returns null if not in a git repo or on error.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getGitCommitInfo(cwd?: string): GitCommitInfo | null;
|
|
10
|
+
//# sourceMappingURL=git-commit-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-commit-info.d.ts","sourceRoot":"","sources":["../../src/utils/git-commit-info.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAUnE"}
|
|
@@ -4,15 +4,25 @@
|
|
|
4
4
|
* Inspired by Chainlink's tree command.
|
|
5
5
|
* Credit: https://github.com/dollspace-gay/chainlink
|
|
6
6
|
*
|
|
7
|
-
* Renders cell/epic hierarchies with
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
*
|
|
13
|
-
* Priority indicators: P0 (critical), P1 (high), P2 (medium), P3 (low)
|
|
7
|
+
* Renders cell/epic hierarchies with box-drawing characters and rich indicators:
|
|
8
|
+
* - [x] closed, [ ] open, [~] in_progress, [!] blocked
|
|
9
|
+
* - Priority coloring: P0/P1 = red, P2 = yellow, P3+ = default
|
|
10
|
+
* - Blocker IDs: [B: abc12, def34] for blocked cells
|
|
11
|
+
* - Epic completion: (3/5 done)
|
|
12
|
+
* - Proper tree connectors: ├──, └──, │
|
|
14
13
|
*/
|
|
15
14
|
import type { Cell } from "swarm-mail";
|
|
15
|
+
export declare const ansi: {
|
|
16
|
+
red: (s: string) => string;
|
|
17
|
+
yellow: (s: string) => string;
|
|
18
|
+
green: (s: string) => string;
|
|
19
|
+
dim: (s: string) => string;
|
|
20
|
+
bold: (s: string) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Strip ANSI escape codes for length calculation
|
|
23
|
+
*/
|
|
24
|
+
strip: (s: string) => string;
|
|
25
|
+
};
|
|
16
26
|
export interface TreeNode {
|
|
17
27
|
cell: Cell;
|
|
18
28
|
children: TreeNode[];
|
|
@@ -25,7 +35,24 @@ export interface CellDisplay {
|
|
|
25
35
|
blocked: boolean;
|
|
26
36
|
}
|
|
27
37
|
/**
|
|
28
|
-
*
|
|
38
|
+
* Blocker info map: cell_id -> array of blocker cell IDs
|
|
39
|
+
*/
|
|
40
|
+
export type BlockerMap = Map<string, string[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Options for rendering the tree
|
|
43
|
+
*/
|
|
44
|
+
export interface TreeRenderOptions {
|
|
45
|
+
/** Map of cell_id -> blocker IDs */
|
|
46
|
+
blockers?: BlockerMap;
|
|
47
|
+
/** Terminal width for truncation (default: process.stdout.columns || 80) */
|
|
48
|
+
terminalWidth?: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get status marker in checkbox style
|
|
52
|
+
*/
|
|
53
|
+
export declare function getStatusMarker(status: string): string;
|
|
54
|
+
/**
|
|
55
|
+
* Get status indicator character (legacy, kept for compatibility)
|
|
29
56
|
*/
|
|
30
57
|
export declare function getStatusIndicator(status: string): string;
|
|
31
58
|
/**
|
|
@@ -33,9 +60,37 @@ export declare function getStatusIndicator(status: string): string;
|
|
|
33
60
|
*/
|
|
34
61
|
export declare function getPriorityLabel(priority: number): string;
|
|
35
62
|
/**
|
|
36
|
-
*
|
|
63
|
+
* Apply priority coloring to a string
|
|
64
|
+
* P0/P1 = red, P2 = yellow, P3+ = default
|
|
65
|
+
*/
|
|
66
|
+
export declare function colorByPriority(text: string, priority: number): string;
|
|
67
|
+
/**
|
|
68
|
+
* Count closed children for epic completion display
|
|
69
|
+
*/
|
|
70
|
+
export declare function getEpicCompletion(node: TreeNode): {
|
|
71
|
+
done: number;
|
|
72
|
+
total: number;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Format epic completion string: (3/5 done)
|
|
76
|
+
*/
|
|
77
|
+
export declare function formatEpicCompletion(node: TreeNode): string;
|
|
78
|
+
/**
|
|
79
|
+
* Shorten a cell ID to last 5 characters for display
|
|
80
|
+
*/
|
|
81
|
+
export declare function shortId(id: string): string;
|
|
82
|
+
/**
|
|
83
|
+
* Format blocker suffix: [B: abc12, def34]
|
|
84
|
+
*/
|
|
85
|
+
export declare function formatBlockers(blockerIds: string[]): string;
|
|
86
|
+
/**
|
|
87
|
+
* Format a single cell line with status marker, ID, title, priority, epic completion, and blockers
|
|
88
|
+
*/
|
|
89
|
+
export declare function formatCellLine(node: TreeNode, options?: TreeRenderOptions): string;
|
|
90
|
+
/**
|
|
91
|
+
* Truncate a line to fit terminal width, accounting for ANSI codes
|
|
37
92
|
*/
|
|
38
|
-
export declare function
|
|
93
|
+
export declare function truncateLine(line: string, maxWidth: number): string;
|
|
39
94
|
/**
|
|
40
95
|
* Build tree structure from flat cell list
|
|
41
96
|
*
|
|
@@ -49,13 +104,14 @@ export declare function buildTreeStructure(cells: Cell[]): TreeNode[];
|
|
|
49
104
|
* Render a tree node with box-drawing characters
|
|
50
105
|
*
|
|
51
106
|
* @param node - The node to render
|
|
52
|
-
* @param prefix - Prefix string for indentation
|
|
107
|
+
* @param prefix - Prefix string for indentation (tree connectors for parent levels)
|
|
53
108
|
* @param isLast - Whether this is the last child of its parent
|
|
109
|
+
* @param options - Rendering options (blockers, terminal width)
|
|
54
110
|
* @returns Array of output lines
|
|
55
111
|
*/
|
|
56
|
-
export declare function renderTreeNode(node: TreeNode, prefix: string, isLast: boolean): string[];
|
|
112
|
+
export declare function renderTreeNode(node: TreeNode, prefix: string, isLast: boolean, options?: TreeRenderOptions): string[];
|
|
57
113
|
/**
|
|
58
114
|
* Render full tree from multiple root nodes
|
|
59
115
|
*/
|
|
60
|
-
export declare function renderTree(roots: TreeNode[]): string;
|
|
116
|
+
export declare function renderTree(roots: TreeNode[], options?: TreeRenderOptions): string;
|
|
61
117
|
//# sourceMappingURL=tree-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-renderer.d.ts","sourceRoot":"","sources":["../../src/utils/tree-renderer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
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