opencode-swarm-plugin 0.56.1 → 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/README.md +21 -0
- package/claude-plugin/agents/background-worker.md +1 -0
- package/claude-plugin/agents/coordinator.md +2 -0
- package/claude-plugin/agents/worker.md +1 -0
- package/claude-plugin/bin/swarm-mcp-server.ts +53 -8
- package/claude-plugin/dist/agent-mail.d.ts +480 -0
- package/claude-plugin/dist/agent-mail.d.ts.map +1 -0
- package/claude-plugin/dist/anti-patterns.d.ts +257 -0
- package/claude-plugin/dist/anti-patterns.d.ts.map +1 -0
- package/claude-plugin/dist/bin/swarm.js +373132 -0
- 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/cass-tools.d.ts +74 -0
- package/claude-plugin/dist/cass-tools.d.ts.map +1 -0
- package/claude-plugin/dist/claude-plugin/claude-plugin-assets.d.ts +10 -0
- package/claude-plugin/dist/claude-plugin/claude-plugin-assets.d.ts.map +1 -0
- package/claude-plugin/dist/compaction-hook.d.ts +178 -0
- package/claude-plugin/dist/compaction-hook.d.ts.map +1 -0
- package/claude-plugin/dist/compaction-observability.d.ts +173 -0
- package/claude-plugin/dist/compaction-observability.d.ts.map +1 -0
- package/claude-plugin/dist/compaction-prompt-scoring.d.ts +125 -0
- package/claude-plugin/dist/compaction-prompt-scoring.d.ts.map +1 -0
- package/claude-plugin/dist/compaction-prompt-scoring.js +139 -0
- package/claude-plugin/dist/contributor-tools.d.ts +42 -0
- package/claude-plugin/dist/contributor-tools.d.ts.map +1 -0
- package/claude-plugin/dist/coordinator-guard.d.ts +79 -0
- package/claude-plugin/dist/coordinator-guard.d.ts.map +1 -0
- package/claude-plugin/dist/dashboard.d.ts +82 -0
- package/claude-plugin/dist/dashboard.d.ts.map +1 -0
- package/claude-plugin/dist/decision-trace-integration.d.ts +204 -0
- package/claude-plugin/dist/decision-trace-integration.d.ts.map +1 -0
- package/claude-plugin/dist/error-enrichment.d.ts +49 -0
- package/claude-plugin/dist/error-enrichment.d.ts.map +1 -0
- package/claude-plugin/dist/eval-capture.d.ts +494 -0
- package/claude-plugin/dist/eval-capture.d.ts.map +1 -0
- package/claude-plugin/dist/eval-capture.js +12844 -0
- package/claude-plugin/dist/eval-gates.d.ts +84 -0
- package/claude-plugin/dist/eval-gates.d.ts.map +1 -0
- package/claude-plugin/dist/eval-history.d.ts +117 -0
- package/claude-plugin/dist/eval-history.d.ts.map +1 -0
- package/claude-plugin/dist/eval-learning.d.ts +216 -0
- package/claude-plugin/dist/eval-learning.d.ts.map +1 -0
- package/claude-plugin/dist/eval-runner.d.ts +134 -0
- package/claude-plugin/dist/eval-runner.d.ts.map +1 -0
- package/claude-plugin/dist/examples/plugin-wrapper-template.ts +3341 -0
- package/claude-plugin/dist/export-tools.d.ts +76 -0
- package/claude-plugin/dist/export-tools.d.ts.map +1 -0
- package/claude-plugin/dist/hive.d.ts +949 -0
- package/claude-plugin/dist/hive.d.ts.map +1 -0
- package/claude-plugin/dist/hive.js +15009 -0
- package/claude-plugin/dist/hivemind-tools.d.ts +479 -0
- package/claude-plugin/dist/hivemind-tools.d.ts.map +1 -0
- package/claude-plugin/dist/hooks/atomic-write.d.ts +21 -0
- package/claude-plugin/dist/hooks/atomic-write.d.ts.map +1 -0
- package/claude-plugin/dist/hooks/constants.d.ts +28 -0
- package/claude-plugin/dist/hooks/constants.d.ts.map +1 -0
- package/claude-plugin/dist/hooks/index.d.ts +16 -0
- package/claude-plugin/dist/hooks/index.d.ts.map +1 -0
- package/claude-plugin/dist/hooks/session-start.d.ts +30 -0
- package/claude-plugin/dist/hooks/session-start.d.ts.map +1 -0
- package/claude-plugin/dist/hooks/tool-complete.d.ts +54 -0
- package/claude-plugin/dist/hooks/tool-complete.d.ts.map +1 -0
- package/claude-plugin/dist/index.d.ts +2017 -0
- package/claude-plugin/dist/index.d.ts.map +1 -0
- package/claude-plugin/dist/index.js +73454 -0
- package/claude-plugin/dist/learning.d.ts +700 -0
- package/claude-plugin/dist/learning.d.ts.map +1 -0
- package/claude-plugin/dist/logger.d.ts +38 -0
- package/claude-plugin/dist/logger.d.ts.map +1 -0
- package/claude-plugin/dist/mandate-promotion.d.ts +93 -0
- package/claude-plugin/dist/mandate-promotion.d.ts.map +1 -0
- package/claude-plugin/dist/mandate-storage.d.ts +209 -0
- package/claude-plugin/dist/mandate-storage.d.ts.map +1 -0
- package/claude-plugin/dist/mandates.d.ts +230 -0
- package/claude-plugin/dist/mandates.d.ts.map +1 -0
- package/claude-plugin/dist/mcp/swarm-mcp-server.js +19675 -0
- package/claude-plugin/dist/memory-tools.d.ts +281 -0
- package/claude-plugin/dist/memory-tools.d.ts.map +1 -0
- package/claude-plugin/dist/memory.d.ts +164 -0
- package/claude-plugin/dist/memory.d.ts.map +1 -0
- package/claude-plugin/dist/model-selection.d.ts +37 -0
- package/claude-plugin/dist/model-selection.d.ts.map +1 -0
- package/claude-plugin/dist/observability-health.d.ts +87 -0
- package/claude-plugin/dist/observability-health.d.ts.map +1 -0
- package/claude-plugin/dist/observability-tools.d.ts +184 -0
- package/claude-plugin/dist/observability-tools.d.ts.map +1 -0
- package/claude-plugin/dist/output-guardrails.d.ts +125 -0
- package/claude-plugin/dist/output-guardrails.d.ts.map +1 -0
- package/claude-plugin/dist/pattern-maturity.d.ts +246 -0
- package/claude-plugin/dist/pattern-maturity.d.ts.map +1 -0
- package/claude-plugin/dist/planning-guardrails.d.ts +183 -0
- package/claude-plugin/dist/planning-guardrails.d.ts.map +1 -0
- package/claude-plugin/dist/plugin.d.ts +22 -0
- package/claude-plugin/dist/plugin.d.ts.map +1 -0
- package/claude-plugin/dist/plugin.js +72296 -0
- package/claude-plugin/dist/post-compaction-tracker.d.ts +133 -0
- package/claude-plugin/dist/post-compaction-tracker.d.ts.map +1 -0
- package/claude-plugin/dist/query-tools.d.ts +90 -0
- package/claude-plugin/dist/query-tools.d.ts.map +1 -0
- package/claude-plugin/dist/rate-limiter.d.ts +218 -0
- package/claude-plugin/dist/rate-limiter.d.ts.map +1 -0
- package/claude-plugin/dist/regression-detection.d.ts +58 -0
- package/claude-plugin/dist/regression-detection.d.ts.map +1 -0
- package/claude-plugin/dist/replay-tools.d.ts +28 -0
- package/claude-plugin/dist/replay-tools.d.ts.map +1 -0
- package/claude-plugin/dist/repo-crawl.d.ts +146 -0
- package/claude-plugin/dist/repo-crawl.d.ts.map +1 -0
- package/claude-plugin/dist/schemas/cell-events.d.ts +1352 -0
- package/claude-plugin/dist/schemas/cell-events.d.ts.map +1 -0
- package/claude-plugin/dist/schemas/cell.d.ts +413 -0
- package/claude-plugin/dist/schemas/cell.d.ts.map +1 -0
- package/claude-plugin/dist/schemas/evaluation.d.ts +161 -0
- package/claude-plugin/dist/schemas/evaluation.d.ts.map +1 -0
- package/claude-plugin/dist/schemas/index.d.ts +46 -0
- package/claude-plugin/dist/schemas/index.d.ts.map +1 -0
- package/claude-plugin/dist/schemas/mandate.d.ts +336 -0
- package/claude-plugin/dist/schemas/mandate.d.ts.map +1 -0
- package/claude-plugin/dist/schemas/swarm-context.d.ts +131 -0
- package/claude-plugin/dist/schemas/swarm-context.d.ts.map +1 -0
- package/claude-plugin/dist/schemas/task.d.ts +189 -0
- package/claude-plugin/dist/schemas/task.d.ts.map +1 -0
- package/claude-plugin/dist/schemas/worker-handoff.d.ts +78 -0
- package/claude-plugin/dist/schemas/worker-handoff.d.ts.map +1 -0
- package/claude-plugin/dist/sessions/agent-discovery.d.ts +59 -0
- package/claude-plugin/dist/sessions/agent-discovery.d.ts.map +1 -0
- package/claude-plugin/dist/sessions/index.d.ts +10 -0
- package/claude-plugin/dist/sessions/index.d.ts.map +1 -0
- package/claude-plugin/dist/skills.d.ts +490 -0
- package/claude-plugin/dist/skills.d.ts.map +1 -0
- package/claude-plugin/dist/storage.d.ts +260 -0
- package/claude-plugin/dist/storage.d.ts.map +1 -0
- package/claude-plugin/dist/structured.d.ts +206 -0
- package/claude-plugin/dist/structured.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-adversarial-review.d.ts +104 -0
- package/claude-plugin/dist/swarm-adversarial-review.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-decompose.d.ts +297 -0
- package/claude-plugin/dist/swarm-decompose.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-insights.d.ts +390 -0
- package/claude-plugin/dist/swarm-insights.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-mail.d.ts +274 -0
- package/claude-plugin/dist/swarm-mail.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-orchestrate.d.ts +924 -0
- package/claude-plugin/dist/swarm-orchestrate.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-prompts.d.ts +467 -0
- package/claude-plugin/dist/swarm-prompts.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-prompts.js +45286 -0
- package/claude-plugin/dist/swarm-research.d.ts +125 -0
- package/claude-plugin/dist/swarm-research.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-review.d.ts +214 -0
- package/claude-plugin/dist/swarm-review.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-signature.d.ts +106 -0
- package/claude-plugin/dist/swarm-signature.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-strategies.d.ts +113 -0
- package/claude-plugin/dist/swarm-strategies.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-validation.d.ts +127 -0
- package/claude-plugin/dist/swarm-validation.d.ts.map +1 -0
- package/claude-plugin/dist/swarm-worktree.d.ts +185 -0
- package/claude-plugin/dist/swarm-worktree.d.ts.map +1 -0
- package/claude-plugin/dist/swarm.d.ts +590 -0
- package/claude-plugin/dist/swarm.d.ts.map +1 -0
- package/claude-plugin/dist/tool-availability.d.ts +91 -0
- package/claude-plugin/dist/tool-availability.d.ts.map +1 -0
- package/claude-plugin/dist/utils/tree-renderer.d.ts +61 -0
- package/claude-plugin/dist/utils/tree-renderer.d.ts.map +1 -0
- package/claude-plugin/dist/validators/index.d.ts +7 -0
- package/claude-plugin/dist/validators/index.d.ts.map +1 -0
- package/claude-plugin/dist/validators/schema-validator.d.ts +58 -0
- package/claude-plugin/dist/validators/schema-validator.d.ts.map +1 -0
- package/claude-plugin/scripts/copyClaudePluginRuntimeAssets.ts +84 -0
- package/claude-plugin/skills/always-on-guidance/SKILL.md +45 -0
- package/claude-plugin/tests/mcp-runtime.test.ts +187 -0
- package/dist/agent-mail.d.ts +4 -4
- package/dist/agent-mail.d.ts.map +1 -1
- package/dist/bin/swarm.js +479 -20
- 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 +10 -0
- package/dist/claude-plugin/claude-plugin-assets.d.ts.map +1 -0
- package/dist/compaction-hook.d.ts +1 -1
- package/dist/compaction-hook.d.ts.map +1 -1
- package/dist/index.js +371 -260
- package/dist/mcp/swarm-mcp-server.js +19675 -0
- package/dist/plugin.js +370 -259
- package/dist/skills.d.ts +15 -0
- package/dist/skills.d.ts.map +1 -1
- package/dist/swarm-mail.d.ts.map +1 -1
- package/dist/swarm-prompts.d.ts +3 -1
- package/dist/swarm-prompts.d.ts.map +1 -1
- package/dist/swarm-prompts.js +88 -8
- package/package.json +4 -1
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mandate schemas for voting system
|
|
3
|
+
*
|
|
4
|
+
* Agents file and vote on ideas, tips, lore, snippets, and feature requests.
|
|
5
|
+
* High-consensus items become "mandates" that influence future behavior.
|
|
6
|
+
*
|
|
7
|
+
* Vote decay and scoring patterns match learning.ts (90-day half-life).
|
|
8
|
+
*/
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
/**
|
|
11
|
+
* Content types for mandate entries
|
|
12
|
+
*/
|
|
13
|
+
export declare const MandateContentTypeSchema: z.ZodEnum<{
|
|
14
|
+
idea: "idea";
|
|
15
|
+
tip: "tip";
|
|
16
|
+
lore: "lore";
|
|
17
|
+
snippet: "snippet";
|
|
18
|
+
feature_request: "feature_request";
|
|
19
|
+
}>;
|
|
20
|
+
export type MandateContentType = z.infer<typeof MandateContentTypeSchema>;
|
|
21
|
+
/**
|
|
22
|
+
* Mandate status lifecycle
|
|
23
|
+
*
|
|
24
|
+
* - candidate: New entry, collecting votes
|
|
25
|
+
* - established: Has some consensus but not enough for mandate status
|
|
26
|
+
* - mandate: High consensus (net_votes >= 5 AND vote_ratio >= 0.7)
|
|
27
|
+
* - rejected: Strong negative consensus or explicitly rejected
|
|
28
|
+
*/
|
|
29
|
+
export declare const MandateStatusSchema: z.ZodEnum<{
|
|
30
|
+
candidate: "candidate";
|
|
31
|
+
established: "established";
|
|
32
|
+
mandate: "mandate";
|
|
33
|
+
rejected: "rejected";
|
|
34
|
+
}>;
|
|
35
|
+
export type MandateStatus = z.infer<typeof MandateStatusSchema>;
|
|
36
|
+
/**
|
|
37
|
+
* Vote type
|
|
38
|
+
*/
|
|
39
|
+
export declare const VoteTypeSchema: z.ZodEnum<{
|
|
40
|
+
upvote: "upvote";
|
|
41
|
+
downvote: "downvote";
|
|
42
|
+
}>;
|
|
43
|
+
export type VoteType = z.infer<typeof VoteTypeSchema>;
|
|
44
|
+
/**
|
|
45
|
+
* A mandate entry represents a proposal from an agent
|
|
46
|
+
*
|
|
47
|
+
* Entries can be ideas, tips, lore, code snippets, or feature requests.
|
|
48
|
+
* Other agents vote on entries to reach consensus.
|
|
49
|
+
*/
|
|
50
|
+
export declare const MandateEntrySchema: z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
content: z.ZodString;
|
|
53
|
+
content_type: z.ZodEnum<{
|
|
54
|
+
idea: "idea";
|
|
55
|
+
tip: "tip";
|
|
56
|
+
lore: "lore";
|
|
57
|
+
snippet: "snippet";
|
|
58
|
+
feature_request: "feature_request";
|
|
59
|
+
}>;
|
|
60
|
+
author_agent: z.ZodString;
|
|
61
|
+
created_at: z.ZodString;
|
|
62
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
63
|
+
candidate: "candidate";
|
|
64
|
+
established: "established";
|
|
65
|
+
mandate: "mandate";
|
|
66
|
+
rejected: "rejected";
|
|
67
|
+
}>>;
|
|
68
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
69
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export type MandateEntry = z.infer<typeof MandateEntrySchema>;
|
|
72
|
+
/**
|
|
73
|
+
* A vote on a mandate entry
|
|
74
|
+
*
|
|
75
|
+
* Each agent can vote once per entry (upvote or downvote).
|
|
76
|
+
* Votes decay with 90-day half-life matching learning.ts patterns.
|
|
77
|
+
*/
|
|
78
|
+
export declare const VoteSchema: z.ZodObject<{
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
mandate_id: z.ZodString;
|
|
81
|
+
agent_name: z.ZodString;
|
|
82
|
+
vote_type: z.ZodEnum<{
|
|
83
|
+
upvote: "upvote";
|
|
84
|
+
downvote: "downvote";
|
|
85
|
+
}>;
|
|
86
|
+
timestamp: z.ZodString;
|
|
87
|
+
weight: z.ZodDefault<z.ZodNumber>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
export type Vote = z.infer<typeof VoteSchema>;
|
|
90
|
+
/**
|
|
91
|
+
* Calculated score for a mandate entry
|
|
92
|
+
*
|
|
93
|
+
* Scores are recalculated periodically with decay applied.
|
|
94
|
+
* Uses same decay formula as learning.ts (90-day half-life).
|
|
95
|
+
*/
|
|
96
|
+
export declare const MandateScoreSchema: z.ZodObject<{
|
|
97
|
+
mandate_id: z.ZodString;
|
|
98
|
+
net_votes: z.ZodNumber;
|
|
99
|
+
vote_ratio: z.ZodNumber;
|
|
100
|
+
decayed_score: z.ZodNumber;
|
|
101
|
+
last_calculated: z.ZodString;
|
|
102
|
+
raw_upvotes: z.ZodNumber;
|
|
103
|
+
raw_downvotes: z.ZodNumber;
|
|
104
|
+
decayed_upvotes: z.ZodNumber;
|
|
105
|
+
decayed_downvotes: z.ZodNumber;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
export type MandateScore = z.infer<typeof MandateScoreSchema>;
|
|
108
|
+
/**
|
|
109
|
+
* Configuration for mandate decay calculation
|
|
110
|
+
*
|
|
111
|
+
* Matches learning.ts decay patterns.
|
|
112
|
+
*/
|
|
113
|
+
export interface MandateDecayConfig {
|
|
114
|
+
/** Half-life for vote decay in days */
|
|
115
|
+
halfLifeDays: number;
|
|
116
|
+
/** Net votes threshold for mandate status */
|
|
117
|
+
mandateNetVotesThreshold: number;
|
|
118
|
+
/** Vote ratio threshold for mandate status */
|
|
119
|
+
mandateVoteRatioThreshold: number;
|
|
120
|
+
/** Net votes threshold for established status */
|
|
121
|
+
establishedNetVotesThreshold: number;
|
|
122
|
+
/** Negative net votes threshold for rejected status */
|
|
123
|
+
rejectedNetVotesThreshold: number;
|
|
124
|
+
}
|
|
125
|
+
export declare const DEFAULT_MANDATE_DECAY_CONFIG: MandateDecayConfig;
|
|
126
|
+
/**
|
|
127
|
+
* Arguments for creating a mandate entry
|
|
128
|
+
*/
|
|
129
|
+
export declare const CreateMandateArgsSchema: z.ZodObject<{
|
|
130
|
+
content: z.ZodString;
|
|
131
|
+
content_type: z.ZodEnum<{
|
|
132
|
+
idea: "idea";
|
|
133
|
+
tip: "tip";
|
|
134
|
+
lore: "lore";
|
|
135
|
+
snippet: "snippet";
|
|
136
|
+
feature_request: "feature_request";
|
|
137
|
+
}>;
|
|
138
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
139
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
export type CreateMandateArgs = z.infer<typeof CreateMandateArgsSchema>;
|
|
142
|
+
/**
|
|
143
|
+
* Arguments for casting a vote
|
|
144
|
+
*/
|
|
145
|
+
export declare const CastVoteArgsSchema: z.ZodObject<{
|
|
146
|
+
mandate_id: z.ZodString;
|
|
147
|
+
vote_type: z.ZodEnum<{
|
|
148
|
+
upvote: "upvote";
|
|
149
|
+
downvote: "downvote";
|
|
150
|
+
}>;
|
|
151
|
+
weight: z.ZodDefault<z.ZodNumber>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
export type CastVoteArgs = z.infer<typeof CastVoteArgsSchema>;
|
|
154
|
+
/**
|
|
155
|
+
* Arguments for querying mandates
|
|
156
|
+
*/
|
|
157
|
+
export declare const QueryMandatesArgsSchema: z.ZodObject<{
|
|
158
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
159
|
+
candidate: "candidate";
|
|
160
|
+
established: "established";
|
|
161
|
+
mandate: "mandate";
|
|
162
|
+
rejected: "rejected";
|
|
163
|
+
}>>;
|
|
164
|
+
content_type: z.ZodOptional<z.ZodEnum<{
|
|
165
|
+
idea: "idea";
|
|
166
|
+
tip: "tip";
|
|
167
|
+
lore: "lore";
|
|
168
|
+
snippet: "snippet";
|
|
169
|
+
feature_request: "feature_request";
|
|
170
|
+
}>>;
|
|
171
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
172
|
+
author_agent: z.ZodOptional<z.ZodString>;
|
|
173
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
174
|
+
min_score: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
export type QueryMandatesArgs = z.infer<typeof QueryMandatesArgsSchema>;
|
|
177
|
+
/**
|
|
178
|
+
* Result of score calculation
|
|
179
|
+
*/
|
|
180
|
+
export declare const ScoreCalculationResultSchema: z.ZodObject<{
|
|
181
|
+
mandate_id: z.ZodString;
|
|
182
|
+
previous_status: z.ZodEnum<{
|
|
183
|
+
candidate: "candidate";
|
|
184
|
+
established: "established";
|
|
185
|
+
mandate: "mandate";
|
|
186
|
+
rejected: "rejected";
|
|
187
|
+
}>;
|
|
188
|
+
new_status: z.ZodEnum<{
|
|
189
|
+
candidate: "candidate";
|
|
190
|
+
established: "established";
|
|
191
|
+
mandate: "mandate";
|
|
192
|
+
rejected: "rejected";
|
|
193
|
+
}>;
|
|
194
|
+
score: z.ZodObject<{
|
|
195
|
+
mandate_id: z.ZodString;
|
|
196
|
+
net_votes: z.ZodNumber;
|
|
197
|
+
vote_ratio: z.ZodNumber;
|
|
198
|
+
decayed_score: z.ZodNumber;
|
|
199
|
+
last_calculated: z.ZodString;
|
|
200
|
+
raw_upvotes: z.ZodNumber;
|
|
201
|
+
raw_downvotes: z.ZodNumber;
|
|
202
|
+
decayed_upvotes: z.ZodNumber;
|
|
203
|
+
decayed_downvotes: z.ZodNumber;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
status_changed: z.ZodBoolean;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
export type ScoreCalculationResult = z.infer<typeof ScoreCalculationResultSchema>;
|
|
208
|
+
export declare const mandateSchemas: {
|
|
209
|
+
MandateContentTypeSchema: z.ZodEnum<{
|
|
210
|
+
idea: "idea";
|
|
211
|
+
tip: "tip";
|
|
212
|
+
lore: "lore";
|
|
213
|
+
snippet: "snippet";
|
|
214
|
+
feature_request: "feature_request";
|
|
215
|
+
}>;
|
|
216
|
+
MandateStatusSchema: z.ZodEnum<{
|
|
217
|
+
candidate: "candidate";
|
|
218
|
+
established: "established";
|
|
219
|
+
mandate: "mandate";
|
|
220
|
+
rejected: "rejected";
|
|
221
|
+
}>;
|
|
222
|
+
VoteTypeSchema: z.ZodEnum<{
|
|
223
|
+
upvote: "upvote";
|
|
224
|
+
downvote: "downvote";
|
|
225
|
+
}>;
|
|
226
|
+
MandateEntrySchema: z.ZodObject<{
|
|
227
|
+
id: z.ZodString;
|
|
228
|
+
content: z.ZodString;
|
|
229
|
+
content_type: z.ZodEnum<{
|
|
230
|
+
idea: "idea";
|
|
231
|
+
tip: "tip";
|
|
232
|
+
lore: "lore";
|
|
233
|
+
snippet: "snippet";
|
|
234
|
+
feature_request: "feature_request";
|
|
235
|
+
}>;
|
|
236
|
+
author_agent: z.ZodString;
|
|
237
|
+
created_at: z.ZodString;
|
|
238
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
239
|
+
candidate: "candidate";
|
|
240
|
+
established: "established";
|
|
241
|
+
mandate: "mandate";
|
|
242
|
+
rejected: "rejected";
|
|
243
|
+
}>>;
|
|
244
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
245
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
VoteSchema: z.ZodObject<{
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
mandate_id: z.ZodString;
|
|
250
|
+
agent_name: z.ZodString;
|
|
251
|
+
vote_type: z.ZodEnum<{
|
|
252
|
+
upvote: "upvote";
|
|
253
|
+
downvote: "downvote";
|
|
254
|
+
}>;
|
|
255
|
+
timestamp: z.ZodString;
|
|
256
|
+
weight: z.ZodDefault<z.ZodNumber>;
|
|
257
|
+
}, z.core.$strip>;
|
|
258
|
+
MandateScoreSchema: z.ZodObject<{
|
|
259
|
+
mandate_id: z.ZodString;
|
|
260
|
+
net_votes: z.ZodNumber;
|
|
261
|
+
vote_ratio: z.ZodNumber;
|
|
262
|
+
decayed_score: z.ZodNumber;
|
|
263
|
+
last_calculated: z.ZodString;
|
|
264
|
+
raw_upvotes: z.ZodNumber;
|
|
265
|
+
raw_downvotes: z.ZodNumber;
|
|
266
|
+
decayed_upvotes: z.ZodNumber;
|
|
267
|
+
decayed_downvotes: z.ZodNumber;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
CreateMandateArgsSchema: z.ZodObject<{
|
|
270
|
+
content: z.ZodString;
|
|
271
|
+
content_type: z.ZodEnum<{
|
|
272
|
+
idea: "idea";
|
|
273
|
+
tip: "tip";
|
|
274
|
+
lore: "lore";
|
|
275
|
+
snippet: "snippet";
|
|
276
|
+
feature_request: "feature_request";
|
|
277
|
+
}>;
|
|
278
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
279
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
280
|
+
}, z.core.$strip>;
|
|
281
|
+
CastVoteArgsSchema: z.ZodObject<{
|
|
282
|
+
mandate_id: z.ZodString;
|
|
283
|
+
vote_type: z.ZodEnum<{
|
|
284
|
+
upvote: "upvote";
|
|
285
|
+
downvote: "downvote";
|
|
286
|
+
}>;
|
|
287
|
+
weight: z.ZodDefault<z.ZodNumber>;
|
|
288
|
+
}, z.core.$strip>;
|
|
289
|
+
QueryMandatesArgsSchema: z.ZodObject<{
|
|
290
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
291
|
+
candidate: "candidate";
|
|
292
|
+
established: "established";
|
|
293
|
+
mandate: "mandate";
|
|
294
|
+
rejected: "rejected";
|
|
295
|
+
}>>;
|
|
296
|
+
content_type: z.ZodOptional<z.ZodEnum<{
|
|
297
|
+
idea: "idea";
|
|
298
|
+
tip: "tip";
|
|
299
|
+
lore: "lore";
|
|
300
|
+
snippet: "snippet";
|
|
301
|
+
feature_request: "feature_request";
|
|
302
|
+
}>>;
|
|
303
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
304
|
+
author_agent: z.ZodOptional<z.ZodString>;
|
|
305
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
306
|
+
min_score: z.ZodOptional<z.ZodNumber>;
|
|
307
|
+
}, z.core.$strip>;
|
|
308
|
+
ScoreCalculationResultSchema: z.ZodObject<{
|
|
309
|
+
mandate_id: z.ZodString;
|
|
310
|
+
previous_status: z.ZodEnum<{
|
|
311
|
+
candidate: "candidate";
|
|
312
|
+
established: "established";
|
|
313
|
+
mandate: "mandate";
|
|
314
|
+
rejected: "rejected";
|
|
315
|
+
}>;
|
|
316
|
+
new_status: z.ZodEnum<{
|
|
317
|
+
candidate: "candidate";
|
|
318
|
+
established: "established";
|
|
319
|
+
mandate: "mandate";
|
|
320
|
+
rejected: "rejected";
|
|
321
|
+
}>;
|
|
322
|
+
score: z.ZodObject<{
|
|
323
|
+
mandate_id: z.ZodString;
|
|
324
|
+
net_votes: z.ZodNumber;
|
|
325
|
+
vote_ratio: z.ZodNumber;
|
|
326
|
+
decayed_score: z.ZodNumber;
|
|
327
|
+
last_calculated: z.ZodString;
|
|
328
|
+
raw_upvotes: z.ZodNumber;
|
|
329
|
+
raw_downvotes: z.ZodNumber;
|
|
330
|
+
decayed_upvotes: z.ZodNumber;
|
|
331
|
+
decayed_downvotes: z.ZodNumber;
|
|
332
|
+
}, z.core.$strip>;
|
|
333
|
+
status_changed: z.ZodBoolean;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
};
|
|
336
|
+
//# sourceMappingURL=mandate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mandate.d.ts","sourceRoot":"","sources":["../../src/schemas/mandate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;EAMnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;;EAK9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,cAAc;;;EAAiC,CAAC;AAC7D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,O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B,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAMF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAW1B,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Swarm Context Schemas
|
|
3
|
+
*
|
|
4
|
+
* These schemas define the structure for storing and recovering swarm execution context.
|
|
5
|
+
* Used for checkpoint/recovery, continuation after crashes, and swarm state management.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
/**
|
|
9
|
+
* Decomposition strategy used for the swarm
|
|
10
|
+
*/
|
|
11
|
+
export declare const SwarmStrategySchema: z.ZodEnum<{
|
|
12
|
+
"file-based": "file-based";
|
|
13
|
+
"feature-based": "feature-based";
|
|
14
|
+
"risk-based": "risk-based";
|
|
15
|
+
}>;
|
|
16
|
+
export type SwarmStrategy = z.infer<typeof SwarmStrategySchema>;
|
|
17
|
+
/**
|
|
18
|
+
* Shared directives and context for all agents in a swarm
|
|
19
|
+
*/
|
|
20
|
+
export declare const SwarmDirectivesSchema: z.ZodObject<{
|
|
21
|
+
shared_context: z.ZodString;
|
|
22
|
+
skills_to_load: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
23
|
+
coordinator_notes: z.ZodDefault<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type SwarmDirectives = z.infer<typeof SwarmDirectivesSchema>;
|
|
26
|
+
/**
|
|
27
|
+
* Recovery state for checkpoint/resume
|
|
28
|
+
*/
|
|
29
|
+
export declare const SwarmRecoverySchema: z.ZodObject<{
|
|
30
|
+
last_checkpoint: z.ZodString;
|
|
31
|
+
files_modified: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
32
|
+
progress_percent: z.ZodDefault<z.ZodNumber>;
|
|
33
|
+
last_message: z.ZodDefault<z.ZodString>;
|
|
34
|
+
error_context: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type SwarmRecovery = z.infer<typeof SwarmRecoverySchema>;
|
|
37
|
+
/**
|
|
38
|
+
* Complete context for a single bead in a swarm
|
|
39
|
+
*
|
|
40
|
+
* Stored in swarm_contexts table for recovery, continuation, and state management.
|
|
41
|
+
*/
|
|
42
|
+
export declare const SwarmBeadContextSchema: z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
epic_id: z.ZodString;
|
|
45
|
+
bead_id: z.ZodString;
|
|
46
|
+
strategy: z.ZodEnum<{
|
|
47
|
+
"file-based": "file-based";
|
|
48
|
+
"feature-based": "feature-based";
|
|
49
|
+
"risk-based": "risk-based";
|
|
50
|
+
}>;
|
|
51
|
+
files: z.ZodArray<z.ZodString>;
|
|
52
|
+
dependencies: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
53
|
+
directives: z.ZodObject<{
|
|
54
|
+
shared_context: z.ZodString;
|
|
55
|
+
skills_to_load: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
56
|
+
coordinator_notes: z.ZodDefault<z.ZodString>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
recovery: z.ZodObject<{
|
|
59
|
+
last_checkpoint: z.ZodString;
|
|
60
|
+
files_modified: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
61
|
+
progress_percent: z.ZodDefault<z.ZodNumber>;
|
|
62
|
+
last_message: z.ZodDefault<z.ZodString>;
|
|
63
|
+
error_context: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
created_at: z.ZodNumber;
|
|
66
|
+
updated_at: z.ZodNumber;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export type SwarmBeadContext = z.infer<typeof SwarmBeadContextSchema>;
|
|
69
|
+
/**
|
|
70
|
+
* Args for creating a swarm context
|
|
71
|
+
*/
|
|
72
|
+
export declare const CreateSwarmContextArgsSchema: z.ZodObject<{
|
|
73
|
+
epic_id: z.ZodString;
|
|
74
|
+
bead_id: z.ZodString;
|
|
75
|
+
strategy: z.ZodEnum<{
|
|
76
|
+
"file-based": "file-based";
|
|
77
|
+
"feature-based": "feature-based";
|
|
78
|
+
"risk-based": "risk-based";
|
|
79
|
+
}>;
|
|
80
|
+
files: z.ZodArray<z.ZodString>;
|
|
81
|
+
dependencies: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
82
|
+
directives: z.ZodObject<{
|
|
83
|
+
shared_context: z.ZodString;
|
|
84
|
+
skills_to_load: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
85
|
+
coordinator_notes: z.ZodDefault<z.ZodString>;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
recovery: z.ZodObject<{
|
|
88
|
+
last_checkpoint: z.ZodString;
|
|
89
|
+
files_modified: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
90
|
+
progress_percent: z.ZodDefault<z.ZodNumber>;
|
|
91
|
+
last_message: z.ZodDefault<z.ZodString>;
|
|
92
|
+
error_context: z.ZodOptional<z.ZodString>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export type CreateSwarmContextArgs = z.infer<typeof CreateSwarmContextArgsSchema>;
|
|
96
|
+
/**
|
|
97
|
+
* Args for updating a swarm context
|
|
98
|
+
*/
|
|
99
|
+
export declare const UpdateSwarmContextArgsSchema: z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
recovery: z.ZodOptional<z.ZodObject<{
|
|
102
|
+
last_checkpoint: z.ZodOptional<z.ZodString>;
|
|
103
|
+
files_modified: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
104
|
+
progress_percent: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
105
|
+
last_message: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
106
|
+
error_context: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
110
|
+
directives: z.ZodOptional<z.ZodObject<{
|
|
111
|
+
shared_context: z.ZodOptional<z.ZodString>;
|
|
112
|
+
skills_to_load: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
113
|
+
coordinator_notes: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export type UpdateSwarmContextArgs = z.infer<typeof UpdateSwarmContextArgsSchema>;
|
|
117
|
+
/**
|
|
118
|
+
* Args for querying swarm contexts
|
|
119
|
+
*/
|
|
120
|
+
export declare const QuerySwarmContextsArgsSchema: z.ZodObject<{
|
|
121
|
+
epic_id: z.ZodOptional<z.ZodString>;
|
|
122
|
+
bead_id: z.ZodOptional<z.ZodString>;
|
|
123
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
124
|
+
"file-based": "file-based";
|
|
125
|
+
"feature-based": "feature-based";
|
|
126
|
+
"risk-based": "risk-based";
|
|
127
|
+
}>>;
|
|
128
|
+
has_errors: z.ZodOptional<z.ZodBoolean>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export type QuerySwarmContextsArgs = z.infer<typeof QuerySwarmContextsArgsSchema>;
|
|
131
|
+
//# sourceMappingURL=swarm-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swarm-context.d.ts","sourceRoot":"","sources":["../../src/schem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schemas define the structure for breaking down tasks
|
|
5
|
+
* into parallelizable subtasks for swarm execution.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
/**
|
|
9
|
+
* Effort estimation for subtasks.
|
|
10
|
+
*
|
|
11
|
+
* Time ranges:
|
|
12
|
+
* - `trivial`: < 5 minutes (simple rename, typo fix)
|
|
13
|
+
* - `small`: 5-30 minutes (single function, simple feature)
|
|
14
|
+
* - `medium`: 30 min - 2 hours (multi-file change, moderate complexity)
|
|
15
|
+
* - `large`: 2+ hours (significant feature, refactoring)
|
|
16
|
+
*/
|
|
17
|
+
export declare const EffortLevelSchema: z.ZodEnum<{
|
|
18
|
+
small: "small";
|
|
19
|
+
medium: "medium";
|
|
20
|
+
trivial: "trivial";
|
|
21
|
+
large: "large";
|
|
22
|
+
}>;
|
|
23
|
+
export type EffortLevel = z.infer<typeof EffortLevelSchema>;
|
|
24
|
+
/**
|
|
25
|
+
* Dependency type between subtasks
|
|
26
|
+
*/
|
|
27
|
+
export declare const DependencyTypeSchema: z.ZodEnum<{
|
|
28
|
+
blocks: "blocks";
|
|
29
|
+
related: "related";
|
|
30
|
+
requires: "requires";
|
|
31
|
+
}>;
|
|
32
|
+
export type DependencyType = z.infer<typeof DependencyTypeSchema>;
|
|
33
|
+
/**
|
|
34
|
+
* Subtask in a decomposition
|
|
35
|
+
*/
|
|
36
|
+
export declare const DecomposedSubtaskSchema: z.ZodObject<{
|
|
37
|
+
title: z.ZodString;
|
|
38
|
+
description: z.ZodString;
|
|
39
|
+
files: z.ZodArray<z.ZodString>;
|
|
40
|
+
estimated_effort: z.ZodEnum<{
|
|
41
|
+
small: "small";
|
|
42
|
+
medium: "medium";
|
|
43
|
+
trivial: "trivial";
|
|
44
|
+
large: "large";
|
|
45
|
+
}>;
|
|
46
|
+
risks: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
47
|
+
model: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type DecomposedSubtask = z.infer<typeof DecomposedSubtaskSchema>;
|
|
50
|
+
/**
|
|
51
|
+
* Dependency between subtasks
|
|
52
|
+
*/
|
|
53
|
+
export declare const SubtaskDependencySchema: z.ZodObject<{
|
|
54
|
+
from: z.ZodNumber;
|
|
55
|
+
to: z.ZodNumber;
|
|
56
|
+
type: z.ZodEnum<{
|
|
57
|
+
blocks: "blocks";
|
|
58
|
+
related: "related";
|
|
59
|
+
requires: "requires";
|
|
60
|
+
}>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type SubtaskDependency = z.infer<typeof SubtaskDependencySchema>;
|
|
63
|
+
/**
|
|
64
|
+
* Full task decomposition result
|
|
65
|
+
*
|
|
66
|
+
* Returned by the decomposition agent, validated before spawning.
|
|
67
|
+
*/
|
|
68
|
+
export declare const TaskDecompositionSchema: z.ZodObject<{
|
|
69
|
+
task: z.ZodString;
|
|
70
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
71
|
+
subtasks: z.ZodArray<z.ZodObject<{
|
|
72
|
+
title: z.ZodString;
|
|
73
|
+
description: z.ZodString;
|
|
74
|
+
files: z.ZodArray<z.ZodString>;
|
|
75
|
+
estimated_effort: z.ZodEnum<{
|
|
76
|
+
small: "small";
|
|
77
|
+
medium: "medium";
|
|
78
|
+
trivial: "trivial";
|
|
79
|
+
large: "large";
|
|
80
|
+
}>;
|
|
81
|
+
risks: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
82
|
+
model: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
dependencies: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
85
|
+
from: z.ZodNumber;
|
|
86
|
+
to: z.ZodNumber;
|
|
87
|
+
type: z.ZodEnum<{
|
|
88
|
+
blocks: "blocks";
|
|
89
|
+
related: "related";
|
|
90
|
+
requires: "requires";
|
|
91
|
+
}>;
|
|
92
|
+
}, z.core.$strip>>>>;
|
|
93
|
+
shared_context: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export type TaskDecomposition = z.infer<typeof TaskDecompositionSchema>;
|
|
96
|
+
/**
|
|
97
|
+
* Arguments for task decomposition
|
|
98
|
+
*/
|
|
99
|
+
export declare const DecomposeArgsSchema: z.ZodObject<{
|
|
100
|
+
task: z.ZodString;
|
|
101
|
+
context: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export type DecomposeArgs = z.infer<typeof DecomposeArgsSchema>;
|
|
104
|
+
/**
|
|
105
|
+
* Spawn result for a single agent
|
|
106
|
+
*/
|
|
107
|
+
export declare const SpawnedAgentSchema: z.ZodObject<{
|
|
108
|
+
bead_id: z.ZodString;
|
|
109
|
+
agent_name: z.ZodString;
|
|
110
|
+
task_id: z.ZodOptional<z.ZodString>;
|
|
111
|
+
status: z.ZodEnum<{
|
|
112
|
+
failed: "failed";
|
|
113
|
+
pending: "pending";
|
|
114
|
+
running: "running";
|
|
115
|
+
completed: "completed";
|
|
116
|
+
}>;
|
|
117
|
+
files: z.ZodArray<z.ZodString>;
|
|
118
|
+
reservation_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
export type SpawnedAgent = z.infer<typeof SpawnedAgentSchema>;
|
|
121
|
+
/**
|
|
122
|
+
* Result of spawning a swarm
|
|
123
|
+
*/
|
|
124
|
+
export declare const SwarmSpawnResultSchema: z.ZodObject<{
|
|
125
|
+
epic_id: z.ZodString;
|
|
126
|
+
coordinator_name: z.ZodString;
|
|
127
|
+
thread_id: z.ZodString;
|
|
128
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
129
|
+
bead_id: z.ZodString;
|
|
130
|
+
agent_name: z.ZodString;
|
|
131
|
+
task_id: z.ZodOptional<z.ZodString>;
|
|
132
|
+
status: z.ZodEnum<{
|
|
133
|
+
failed: "failed";
|
|
134
|
+
pending: "pending";
|
|
135
|
+
running: "running";
|
|
136
|
+
completed: "completed";
|
|
137
|
+
}>;
|
|
138
|
+
files: z.ZodArray<z.ZodString>;
|
|
139
|
+
reservation_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
started_at: z.ZodString;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export type SwarmSpawnResult = z.infer<typeof SwarmSpawnResultSchema>;
|
|
144
|
+
/**
|
|
145
|
+
* Progress update from an agent
|
|
146
|
+
*/
|
|
147
|
+
export declare const AgentProgressSchema: z.ZodObject<{
|
|
148
|
+
bead_id: z.ZodString;
|
|
149
|
+
agent_name: z.ZodString;
|
|
150
|
+
status: z.ZodEnum<{
|
|
151
|
+
in_progress: "in_progress";
|
|
152
|
+
blocked: "blocked";
|
|
153
|
+
failed: "failed";
|
|
154
|
+
completed: "completed";
|
|
155
|
+
}>;
|
|
156
|
+
progress_percent: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
message: z.ZodOptional<z.ZodString>;
|
|
158
|
+
files_touched: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
159
|
+
blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
160
|
+
timestamp: z.ZodString;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
export type AgentProgress = z.infer<typeof AgentProgressSchema>;
|
|
163
|
+
/**
|
|
164
|
+
* Swarm status summary
|
|
165
|
+
*/
|
|
166
|
+
export declare const SwarmStatusSchema: z.ZodObject<{
|
|
167
|
+
epic_id: z.ZodString;
|
|
168
|
+
total_agents: z.ZodNumber;
|
|
169
|
+
running: z.ZodNumber;
|
|
170
|
+
completed: z.ZodNumber;
|
|
171
|
+
failed: z.ZodNumber;
|
|
172
|
+
blocked: z.ZodNumber;
|
|
173
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
174
|
+
bead_id: z.ZodString;
|
|
175
|
+
agent_name: z.ZodString;
|
|
176
|
+
task_id: z.ZodOptional<z.ZodString>;
|
|
177
|
+
status: z.ZodEnum<{
|
|
178
|
+
failed: "failed";
|
|
179
|
+
pending: "pending";
|
|
180
|
+
running: "running";
|
|
181
|
+
completed: "completed";
|
|
182
|
+
}>;
|
|
183
|
+
files: z.ZodArray<z.ZodString>;
|
|
184
|
+
reservation_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
185
|
+
}, z.core.$strip>>;
|
|
186
|
+
last_update: z.ZodString;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
export type SwarmStatus = z.infer<typeof SwarmStatusSchema>;
|
|
189
|
+
//# sourceMappingURL=task.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/schemas/task.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB;;;;;EAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;EAI/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;iBAYlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;iBAMlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;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