opencode-swarm-plugin 0.32.0 → 0.33.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/.turbo/turbo-build.log +9 -10
- package/.turbo/turbo-test.log +347 -341
- package/CHANGELOG.md +260 -0
- package/README.md +127 -182
- package/bin/swarm.test.ts +31 -0
- package/bin/swarm.ts +247 -12
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +530 -5
- package/dist/observability-tools.d.ts +116 -0
- package/dist/observability-tools.d.ts.map +1 -0
- package/dist/plugin.js +530 -5
- package/dist/skills.d.ts.map +1 -1
- package/dist/swarm-prompts.d.ts +59 -0
- package/dist/swarm-prompts.d.ts.map +1 -1
- package/dist/swarm.d.ts +17 -0
- package/dist/swarm.d.ts.map +1 -1
- package/examples/plugin-wrapper-template.ts +297 -8
- package/package.json +3 -2
- package/src/index.ts +25 -1
- package/src/observability-tools.test.ts +346 -0
- package/src/observability-tools.ts +594 -0
- package/src/skills.integration.test.ts +137 -1
- package/src/skills.test.ts +42 -1
- package/src/skills.ts +8 -4
- package/src/swarm-orchestrate.test.ts +123 -0
- package/src/swarm-orchestrate.ts +183 -0
- package/src/swarm-prompts.test.ts +389 -0
- package/src/swarm-prompts.ts +228 -0
- package/src/swarm-research.integration.test.ts +544 -0
- package/src/swarm-research.test.ts +698 -0
- package/src/swarm-research.ts +472 -0
- package/src/swarm.ts +6 -3
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Observability Tools - Agent-facing Analytics
|
|
3
|
+
*
|
|
4
|
+
* Exposes observability tools to agents via plugin tools.
|
|
5
|
+
* Agents get programmatic access to analytics, not just CLI.
|
|
6
|
+
*
|
|
7
|
+
* Tools:
|
|
8
|
+
* - swarm_analytics: Query pre-built analytics
|
|
9
|
+
* - swarm_query: Raw SQL for power users
|
|
10
|
+
* - swarm_diagnose: Auto-diagnosis for epic/task
|
|
11
|
+
* - swarm_insights: Generate learning insights
|
|
12
|
+
*/
|
|
13
|
+
export interface SwarmAnalyticsArgs {
|
|
14
|
+
query: "failed-decompositions" | "strategy-success-rates" | "lock-contention" | "agent-activity" | "message-latency" | "scope-violations" | "task-duration" | "checkpoint-frequency" | "recovery-success" | "human-feedback";
|
|
15
|
+
since?: string;
|
|
16
|
+
format?: "json" | "summary";
|
|
17
|
+
}
|
|
18
|
+
export interface SwarmQueryArgs {
|
|
19
|
+
sql: string;
|
|
20
|
+
format?: "json" | "table";
|
|
21
|
+
}
|
|
22
|
+
export interface SwarmDiagnoseArgs {
|
|
23
|
+
epic_id?: string;
|
|
24
|
+
bead_id?: string;
|
|
25
|
+
include?: Array<"blockers" | "conflicts" | "slow_tasks" | "errors" | "timeline">;
|
|
26
|
+
}
|
|
27
|
+
export interface SwarmInsightsArgs {
|
|
28
|
+
scope: "epic" | "project" | "recent";
|
|
29
|
+
epic_id?: string;
|
|
30
|
+
metrics: Array<"success_rate" | "avg_duration" | "conflict_rate" | "retry_rate">;
|
|
31
|
+
}
|
|
32
|
+
export declare const observabilityTools: {
|
|
33
|
+
swarm_analytics: {
|
|
34
|
+
description: string;
|
|
35
|
+
args: {
|
|
36
|
+
query: import("zod").ZodEnum<{
|
|
37
|
+
"failed-decompositions": "failed-decompositions";
|
|
38
|
+
"strategy-success-rates": "strategy-success-rates";
|
|
39
|
+
"lock-contention": "lock-contention";
|
|
40
|
+
"agent-activity": "agent-activity";
|
|
41
|
+
"message-latency": "message-latency";
|
|
42
|
+
"scope-violations": "scope-violations";
|
|
43
|
+
"task-duration": "task-duration";
|
|
44
|
+
"checkpoint-frequency": "checkpoint-frequency";
|
|
45
|
+
"recovery-success": "recovery-success";
|
|
46
|
+
"human-feedback": "human-feedback";
|
|
47
|
+
}>;
|
|
48
|
+
since: import("zod").ZodOptional<import("zod").ZodString>;
|
|
49
|
+
format: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
50
|
+
summary: "summary";
|
|
51
|
+
json: "json";
|
|
52
|
+
}>>;
|
|
53
|
+
};
|
|
54
|
+
execute(args: {
|
|
55
|
+
query: "failed-decompositions" | "strategy-success-rates" | "lock-contention" | "agent-activity" | "message-latency" | "scope-violations" | "task-duration" | "checkpoint-frequency" | "recovery-success" | "human-feedback";
|
|
56
|
+
since?: string | undefined;
|
|
57
|
+
format?: "summary" | "json" | undefined;
|
|
58
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
59
|
+
};
|
|
60
|
+
swarm_query: {
|
|
61
|
+
description: string;
|
|
62
|
+
args: {
|
|
63
|
+
sql: import("zod").ZodString;
|
|
64
|
+
format: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
65
|
+
json: "json";
|
|
66
|
+
table: "table";
|
|
67
|
+
}>>;
|
|
68
|
+
};
|
|
69
|
+
execute(args: {
|
|
70
|
+
sql: string;
|
|
71
|
+
format?: "json" | "table" | undefined;
|
|
72
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
73
|
+
};
|
|
74
|
+
swarm_diagnose: {
|
|
75
|
+
description: string;
|
|
76
|
+
args: {
|
|
77
|
+
epic_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
78
|
+
bead_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
79
|
+
include: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
|
|
80
|
+
errors: "errors";
|
|
81
|
+
blockers: "blockers";
|
|
82
|
+
conflicts: "conflicts";
|
|
83
|
+
slow_tasks: "slow_tasks";
|
|
84
|
+
timeline: "timeline";
|
|
85
|
+
}>>>;
|
|
86
|
+
};
|
|
87
|
+
execute(args: {
|
|
88
|
+
epic_id?: string | undefined;
|
|
89
|
+
bead_id?: string | undefined;
|
|
90
|
+
include?: ("errors" | "blockers" | "conflicts" | "slow_tasks" | "timeline")[] | undefined;
|
|
91
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
92
|
+
};
|
|
93
|
+
swarm_insights: {
|
|
94
|
+
description: string;
|
|
95
|
+
args: {
|
|
96
|
+
scope: import("zod").ZodEnum<{
|
|
97
|
+
project: "project";
|
|
98
|
+
epic: "epic";
|
|
99
|
+
recent: "recent";
|
|
100
|
+
}>;
|
|
101
|
+
epic_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
102
|
+
metrics: import("zod").ZodArray<import("zod").ZodEnum<{
|
|
103
|
+
success_rate: "success_rate";
|
|
104
|
+
avg_duration: "avg_duration";
|
|
105
|
+
conflict_rate: "conflict_rate";
|
|
106
|
+
retry_rate: "retry_rate";
|
|
107
|
+
}>>;
|
|
108
|
+
};
|
|
109
|
+
execute(args: {
|
|
110
|
+
scope: "project" | "epic" | "recent";
|
|
111
|
+
metrics: ("success_rate" | "avg_duration" | "conflict_rate" | "retry_rate")[];
|
|
112
|
+
epic_id?: string | undefined;
|
|
113
|
+
}, context: import("@opencode-ai/plugin").ToolContext): Promise<string>;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=observability-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observability-tools.d.ts","sourceRoot":"","sources":["../src/observability-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA2BH,MAAM,WAAW,kBAAkB;IAClC,KAAK,EACF,uBAAuB,GACvB,wBAAwB,GACxB,iBAAiB,GACjB,gBAAgB,GAChB,iBAAiB,GACjB,kBAAkB,GAClB,eAAe,GACf,sBAAsB,GACtB,kBAAkB,GAClB,gBAAgB,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,KAAK,CACd,UAAU,GAAG,WAAW,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,CAC/D,CAAC;CACF;AAED,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,cAAc,GAAG,cAAc,GAAG,eAAe,GAAG,YAAY,CAAC,CAAC;CACjF;AAqgBD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK9B,CAAC"}
|