@bradygaster/squad-sdk 0.8.20 → 0.8.21
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 +296 -296
- package/dist/adapter/client.js +1 -1
- package/dist/adapter/client.js.map +1 -1
- package/dist/agents/charter-compiler.d.ts +4 -0
- package/dist/agents/charter-compiler.d.ts.map +1 -1
- package/dist/agents/charter-compiler.js +8 -0
- package/dist/agents/charter-compiler.js.map +1 -1
- package/dist/agents/history-shadow.js +30 -30
- package/dist/agents/index.js +1 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/lifecycle.js +1 -1
- package/dist/agents/lifecycle.js.map +1 -1
- package/dist/build/github-dist.js +42 -42
- package/dist/builders/index.d.ts +156 -0
- package/dist/builders/index.d.ts.map +1 -0
- package/dist/builders/index.js +404 -0
- package/dist/builders/index.js.map +1 -0
- package/dist/builders/types.d.ts +187 -0
- package/dist/builders/types.d.ts.map +1 -0
- package/dist/builders/types.js +12 -0
- package/dist/builders/types.js.map +1 -0
- package/dist/config/init.d.ts +5 -21
- package/dist/config/init.d.ts.map +1 -1
- package/dist/config/init.js +270 -182
- package/dist/config/init.js.map +1 -1
- package/dist/coordinator/coordinator.js +1 -1
- package/dist/coordinator/coordinator.js.map +1 -1
- package/dist/coordinator/index.js +1 -1
- package/dist/coordinator/index.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/runtime/otel-api.d.ts +38 -0
- package/dist/runtime/otel-api.d.ts.map +1 -0
- package/dist/runtime/otel-api.js +94 -0
- package/dist/runtime/otel-api.js.map +1 -0
- package/dist/runtime/otel-bridge.js +1 -1
- package/dist/runtime/otel-bridge.js.map +1 -1
- package/dist/runtime/otel.d.ts +1 -1
- package/dist/runtime/otel.d.ts.map +1 -1
- package/dist/runtime/otel.js +28 -12
- package/dist/runtime/otel.js.map +1 -1
- package/dist/runtime/squad-observer.js +1 -1
- package/dist/runtime/squad-observer.js.map +1 -1
- package/dist/sharing/consult.js +78 -78
- package/dist/streams/filter.d.ts +33 -0
- package/dist/streams/filter.d.ts.map +1 -0
- package/dist/streams/filter.js +29 -0
- package/dist/streams/filter.js.map +1 -0
- package/dist/streams/index.d.ts +9 -0
- package/dist/streams/index.d.ts.map +1 -0
- package/dist/streams/index.js +9 -0
- package/dist/streams/index.js.map +1 -0
- package/dist/streams/resolver.d.ts +40 -0
- package/dist/streams/resolver.d.ts.map +1 -0
- package/dist/streams/resolver.js +162 -0
- package/dist/streams/resolver.js.map +1 -0
- package/dist/streams/types.d.ts +44 -0
- package/dist/streams/types.d.ts.map +1 -0
- package/dist/streams/types.js +10 -0
- package/dist/streams/types.js.map +1 -0
- package/dist/tools/index.js +1 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/types.d.ts +20 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -11
- package/templates/casting-history.json +4 -4
- package/templates/casting-policy.json +35 -35
- package/templates/casting-registry.json +3 -3
- package/templates/ceremonies.md +41 -41
- package/templates/charter.md +53 -53
- package/templates/constraint-tracking.md +38 -38
- package/templates/copilot-instructions.md +46 -46
- package/templates/history.md +10 -10
- package/templates/identity/now.md +9 -9
- package/templates/identity/wisdom.md +15 -15
- package/templates/mcp-config.md +98 -98
- package/templates/multi-agent-format.md +28 -28
- package/templates/orchestration-log.md +27 -27
- package/templates/plugin-marketplace.md +49 -49
- package/templates/raw-agent-output.md +37 -37
- package/templates/roster.md +60 -60
- package/templates/routing.md +54 -54
- package/templates/run-output.md +50 -50
- package/templates/scribe-charter.md +119 -119
- package/templates/skill.md +24 -24
- package/templates/skills/project-conventions/SKILL.md +56 -56
- package/templates/squad.agent.md +1146 -1146
- package/templates/workflows/squad-ci.yml +24 -24
- package/templates/workflows/squad-docs.yml +50 -50
- package/templates/workflows/squad-heartbeat.yml +316 -316
- package/templates/workflows/squad-insider-release.yml +61 -61
- package/templates/workflows/squad-issue-assign.yml +161 -161
- package/templates/workflows/squad-label-enforce.yml +181 -181
- package/templates/workflows/squad-preview.yml +55 -55
- package/templates/workflows/squad-promote.yml +120 -120
- package/templates/workflows/squad-release.yml +77 -77
- package/templates/workflows/squad-triage.yml +260 -260
- package/templates/workflows/sync-squad-labels.yml +169 -169
- package/dist/runtime/event-bus-otel-bridge.d.ts +0 -19
- package/dist/runtime/event-bus-otel-bridge.d.ts.map +0 -1
- package/dist/runtime/event-bus-otel-bridge.js +0 -61
- package/dist/runtime/event-bus-otel-bridge.js.map +0 -1
- package/templates/workflows/squad-main-guard.yml +0 -129
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builder Functions — SDK-First Squad Mode
|
|
3
|
+
*
|
|
4
|
+
* Each builder accepts a strongly-typed config object, validates it at
|
|
5
|
+
* runtime (manual type-guards — no zod dependency), and returns the
|
|
6
|
+
* validated value with the same type. The pattern mirrors `defineConfig()`
|
|
7
|
+
* in config/schema.ts: identity-passthrough with runtime safety.
|
|
8
|
+
*
|
|
9
|
+
* @module builders
|
|
10
|
+
*/
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
// Validation helpers (private)
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
class BuilderValidationError extends Error {
|
|
15
|
+
constructor(builder, reason) {
|
|
16
|
+
super(`[${builder}] ${reason}`);
|
|
17
|
+
this.name = 'BuilderValidationError';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function assertNonEmptyString(value, field, builder) {
|
|
21
|
+
if (typeof value !== 'string' || value.length === 0) {
|
|
22
|
+
throw new BuilderValidationError(builder, `"${field}" must be a non-empty string`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function assertArray(value, field, builder) {
|
|
26
|
+
if (!Array.isArray(value)) {
|
|
27
|
+
throw new BuilderValidationError(builder, `"${field}" must be an array`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function assertObject(value, builder) {
|
|
31
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
32
|
+
throw new BuilderValidationError(builder, 'config must be a plain object');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function assertOptionalString(value, field, builder) {
|
|
36
|
+
if (value !== undefined && typeof value !== 'string') {
|
|
37
|
+
throw new BuilderValidationError(builder, `"${field}" must be a string when provided`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function assertOptionalBoolean(value, field, builder) {
|
|
41
|
+
if (value !== undefined && typeof value !== 'boolean') {
|
|
42
|
+
throw new BuilderValidationError(builder, `"${field}" must be a boolean when provided`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function assertOptionalNumber(value, field, builder) {
|
|
46
|
+
if (value !== undefined && typeof value !== 'number') {
|
|
47
|
+
throw new BuilderValidationError(builder, `"${field}" must be a number when provided`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function assertOptionalArray(value, field, builder) {
|
|
51
|
+
if (value !== undefined && !Array.isArray(value)) {
|
|
52
|
+
throw new BuilderValidationError(builder, `"${field}" must be an array when provided`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function assertStringUnion(value, allowed, field, builder) {
|
|
56
|
+
if (!allowed.includes(value)) {
|
|
57
|
+
throw new BuilderValidationError(builder, `"${field}" must be one of: ${allowed.join(', ')}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/** Validates a model field that accepts string or ModelPreference object. */
|
|
61
|
+
function assertModelPreference(value, field, builder) {
|
|
62
|
+
if (value === undefined)
|
|
63
|
+
return;
|
|
64
|
+
if (typeof value === 'string')
|
|
65
|
+
return;
|
|
66
|
+
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
|
67
|
+
const obj = value;
|
|
68
|
+
assertNonEmptyString(obj.preferred, `${field}.preferred`, builder);
|
|
69
|
+
assertOptionalString(obj.rationale, `${field}.rationale`, builder);
|
|
70
|
+
assertOptionalString(obj.fallback, `${field}.fallback`, builder);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
throw new BuilderValidationError(builder, `"${field}" must be a model string or { preferred, rationale?, fallback? }`);
|
|
74
|
+
}
|
|
75
|
+
// ---------------------------------------------------------------------------
|
|
76
|
+
// defineTeam
|
|
77
|
+
// ---------------------------------------------------------------------------
|
|
78
|
+
/**
|
|
79
|
+
* Define team metadata, project context, and member roster.
|
|
80
|
+
*
|
|
81
|
+
* ```ts
|
|
82
|
+
* const team = defineTeam({
|
|
83
|
+
* name: 'Core Squad',
|
|
84
|
+
* description: 'The main engineering team',
|
|
85
|
+
* members: ['@edie', '@fenster', '@hockney'],
|
|
86
|
+
* });
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export function defineTeam(config) {
|
|
90
|
+
assertObject(config, 'defineTeam');
|
|
91
|
+
assertNonEmptyString(config.name, 'name', 'defineTeam');
|
|
92
|
+
assertOptionalString(config.description, 'description', 'defineTeam');
|
|
93
|
+
assertOptionalString(config.projectContext, 'projectContext', 'defineTeam');
|
|
94
|
+
assertArray(config.members, 'members', 'defineTeam');
|
|
95
|
+
for (const member of config.members) {
|
|
96
|
+
assertNonEmptyString(member, 'members[]', 'defineTeam');
|
|
97
|
+
}
|
|
98
|
+
return config;
|
|
99
|
+
}
|
|
100
|
+
// ---------------------------------------------------------------------------
|
|
101
|
+
// defineAgent
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
const AGENT_STATUSES = ['active', 'inactive', 'retired'];
|
|
104
|
+
const CAPABILITY_LEVELS = ['expert', 'proficient', 'basic'];
|
|
105
|
+
/**
|
|
106
|
+
* Define a single agent with its role, charter, model preference,
|
|
107
|
+
* tools, and capability profile.
|
|
108
|
+
*
|
|
109
|
+
* ```ts
|
|
110
|
+
* const edie = defineAgent({
|
|
111
|
+
* name: 'edie',
|
|
112
|
+
* role: 'TypeScript Engineer',
|
|
113
|
+
* charter: '.squad/agents/edie/charter.md',
|
|
114
|
+
* model: 'claude-sonnet-4',
|
|
115
|
+
* tools: ['grep', 'edit', 'powershell'],
|
|
116
|
+
* capabilities: [{ name: 'type-system', level: 'expert' }],
|
|
117
|
+
* status: 'active',
|
|
118
|
+
* });
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
export function defineAgent(config) {
|
|
122
|
+
assertObject(config, 'defineAgent');
|
|
123
|
+
assertNonEmptyString(config.name, 'name', 'defineAgent');
|
|
124
|
+
assertNonEmptyString(config.role, 'role', 'defineAgent');
|
|
125
|
+
assertOptionalString(config.description, 'description', 'defineAgent');
|
|
126
|
+
assertOptionalString(config.charter, 'charter', 'defineAgent');
|
|
127
|
+
assertModelPreference(config.model, 'model', 'defineAgent');
|
|
128
|
+
assertOptionalArray(config.tools, 'tools', 'defineAgent');
|
|
129
|
+
assertOptionalArray(config.capabilities, 'capabilities', 'defineAgent');
|
|
130
|
+
if (config.status !== undefined) {
|
|
131
|
+
assertStringUnion(config.status, AGENT_STATUSES, 'status', 'defineAgent');
|
|
132
|
+
}
|
|
133
|
+
if (config.capabilities) {
|
|
134
|
+
for (const cap of config.capabilities) {
|
|
135
|
+
assertObject(cap, 'defineAgent');
|
|
136
|
+
assertNonEmptyString(cap.name, 'capabilities[].name', 'defineAgent');
|
|
137
|
+
assertStringUnion(cap.level, CAPABILITY_LEVELS, 'capabilities[].level', 'defineAgent');
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return config;
|
|
141
|
+
}
|
|
142
|
+
// ---------------------------------------------------------------------------
|
|
143
|
+
// defineRouting
|
|
144
|
+
// ---------------------------------------------------------------------------
|
|
145
|
+
const ROUTING_TIERS = ['direct', 'lightweight', 'standard', 'full'];
|
|
146
|
+
const FALLBACK_BEHAVIORS = ['ask', 'default-agent', 'coordinator'];
|
|
147
|
+
/**
|
|
148
|
+
* Define typed routing rules with pattern matching, priority, and tier.
|
|
149
|
+
*
|
|
150
|
+
* ```ts
|
|
151
|
+
* const routing = defineRouting({
|
|
152
|
+
* rules: [
|
|
153
|
+
* { pattern: 'feature-*', agents: ['@edie'], tier: 'standard', priority: 1 },
|
|
154
|
+
* { pattern: 'docs-*', agents: ['@mcmanus'], tier: 'lightweight' },
|
|
155
|
+
* ],
|
|
156
|
+
* defaultAgent: '@coordinator',
|
|
157
|
+
* fallback: 'coordinator',
|
|
158
|
+
* });
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
export function defineRouting(config) {
|
|
162
|
+
assertObject(config, 'defineRouting');
|
|
163
|
+
assertArray(config.rules, 'rules', 'defineRouting');
|
|
164
|
+
assertOptionalString(config.defaultAgent, 'defaultAgent', 'defineRouting');
|
|
165
|
+
if (config.fallback !== undefined) {
|
|
166
|
+
assertStringUnion(config.fallback, FALLBACK_BEHAVIORS, 'fallback', 'defineRouting');
|
|
167
|
+
}
|
|
168
|
+
for (const rule of config.rules) {
|
|
169
|
+
assertObject(rule, 'defineRouting');
|
|
170
|
+
assertNonEmptyString(rule.pattern, 'rules[].pattern', 'defineRouting');
|
|
171
|
+
assertArray(rule.agents, 'rules[].agents', 'defineRouting');
|
|
172
|
+
for (const agent of rule.agents) {
|
|
173
|
+
assertNonEmptyString(agent, 'rules[].agents[]', 'defineRouting');
|
|
174
|
+
}
|
|
175
|
+
if (rule.tier !== undefined) {
|
|
176
|
+
assertStringUnion(rule.tier, ROUTING_TIERS, 'rules[].tier', 'defineRouting');
|
|
177
|
+
}
|
|
178
|
+
assertOptionalNumber(rule.priority, 'rules[].priority', 'defineRouting');
|
|
179
|
+
assertOptionalString(rule.description, 'rules[].description', 'defineRouting');
|
|
180
|
+
}
|
|
181
|
+
return config;
|
|
182
|
+
}
|
|
183
|
+
// ---------------------------------------------------------------------------
|
|
184
|
+
// defineCeremony
|
|
185
|
+
// ---------------------------------------------------------------------------
|
|
186
|
+
/**
|
|
187
|
+
* Define a ceremony with schedule, participants, and agenda.
|
|
188
|
+
*
|
|
189
|
+
* ```ts
|
|
190
|
+
* const standup = defineCeremony({
|
|
191
|
+
* name: 'standup',
|
|
192
|
+
* trigger: 'schedule',
|
|
193
|
+
* schedule: '0 9 * * 1-5',
|
|
194
|
+
* participants: ['@edie', '@fenster', '@hockney'],
|
|
195
|
+
* agenda: 'Yesterday / Today / Blockers',
|
|
196
|
+
* });
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
export function defineCeremony(config) {
|
|
200
|
+
assertObject(config, 'defineCeremony');
|
|
201
|
+
assertNonEmptyString(config.name, 'name', 'defineCeremony');
|
|
202
|
+
assertOptionalString(config.trigger, 'trigger', 'defineCeremony');
|
|
203
|
+
assertOptionalString(config.schedule, 'schedule', 'defineCeremony');
|
|
204
|
+
assertOptionalArray(config.participants, 'participants', 'defineCeremony');
|
|
205
|
+
assertOptionalString(config.agenda, 'agenda', 'defineCeremony');
|
|
206
|
+
assertOptionalArray(config.hooks, 'hooks', 'defineCeremony');
|
|
207
|
+
return config;
|
|
208
|
+
}
|
|
209
|
+
// ---------------------------------------------------------------------------
|
|
210
|
+
// defineHooks
|
|
211
|
+
// ---------------------------------------------------------------------------
|
|
212
|
+
/**
|
|
213
|
+
* Define the governance hook pipeline.
|
|
214
|
+
*
|
|
215
|
+
* ```ts
|
|
216
|
+
* const hooks = defineHooks({
|
|
217
|
+
* allowedWritePaths: ['src/**', 'test/**', '.squad/**'],
|
|
218
|
+
* blockedCommands: ['rm -rf /', 'DROP TABLE'],
|
|
219
|
+
* maxAskUser: 3,
|
|
220
|
+
* scrubPii: true,
|
|
221
|
+
* reviewerLockout: true,
|
|
222
|
+
* });
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
export function defineHooks(config) {
|
|
226
|
+
assertObject(config, 'defineHooks');
|
|
227
|
+
assertOptionalArray(config.allowedWritePaths, 'allowedWritePaths', 'defineHooks');
|
|
228
|
+
assertOptionalArray(config.blockedCommands, 'blockedCommands', 'defineHooks');
|
|
229
|
+
assertOptionalNumber(config.maxAskUser, 'maxAskUser', 'defineHooks');
|
|
230
|
+
assertOptionalBoolean(config.scrubPii, 'scrubPii', 'defineHooks');
|
|
231
|
+
assertOptionalBoolean(config.reviewerLockout, 'reviewerLockout', 'defineHooks');
|
|
232
|
+
return config;
|
|
233
|
+
}
|
|
234
|
+
// ---------------------------------------------------------------------------
|
|
235
|
+
// defineCasting
|
|
236
|
+
// ---------------------------------------------------------------------------
|
|
237
|
+
const OVERFLOW_STRATEGIES = ['reject', 'generic', 'rotate'];
|
|
238
|
+
/**
|
|
239
|
+
* Define casting configuration — universe allowlists and overflow.
|
|
240
|
+
*
|
|
241
|
+
* ```ts
|
|
242
|
+
* const casting = defineCasting({
|
|
243
|
+
* allowlistUniverses: ['The Usual Suspects', 'Breaking Bad'],
|
|
244
|
+
* overflowStrategy: 'generic',
|
|
245
|
+
* capacity: { 'The Usual Suspects': 8 },
|
|
246
|
+
* });
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
export function defineCasting(config) {
|
|
250
|
+
assertObject(config, 'defineCasting');
|
|
251
|
+
assertOptionalArray(config.allowlistUniverses, 'allowlistUniverses', 'defineCasting');
|
|
252
|
+
if (config.overflowStrategy !== undefined) {
|
|
253
|
+
assertStringUnion(config.overflowStrategy, OVERFLOW_STRATEGIES, 'overflowStrategy', 'defineCasting');
|
|
254
|
+
}
|
|
255
|
+
if (config.capacity !== undefined) {
|
|
256
|
+
assertObject(config.capacity, 'defineCasting');
|
|
257
|
+
for (const [universe, count] of Object.entries(config.capacity)) {
|
|
258
|
+
if (typeof count !== 'number' || count < 0) {
|
|
259
|
+
throw new BuilderValidationError('defineCasting', `capacity["${universe}"] must be a non-negative number`);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return config;
|
|
264
|
+
}
|
|
265
|
+
// ---------------------------------------------------------------------------
|
|
266
|
+
// defineTelemetry
|
|
267
|
+
// ---------------------------------------------------------------------------
|
|
268
|
+
/**
|
|
269
|
+
* Define OpenTelemetry configuration.
|
|
270
|
+
*
|
|
271
|
+
* ```ts
|
|
272
|
+
* const telemetry = defineTelemetry({
|
|
273
|
+
* enabled: true,
|
|
274
|
+
* endpoint: 'http://localhost:4317',
|
|
275
|
+
* serviceName: 'squad',
|
|
276
|
+
* sampleRate: 1.0,
|
|
277
|
+
* aspireDefaults: true,
|
|
278
|
+
* });
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
281
|
+
export function defineTelemetry(config) {
|
|
282
|
+
assertObject(config, 'defineTelemetry');
|
|
283
|
+
assertOptionalBoolean(config.enabled, 'enabled', 'defineTelemetry');
|
|
284
|
+
assertOptionalString(config.endpoint, 'endpoint', 'defineTelemetry');
|
|
285
|
+
assertOptionalString(config.serviceName, 'serviceName', 'defineTelemetry');
|
|
286
|
+
assertOptionalNumber(config.sampleRate, 'sampleRate', 'defineTelemetry');
|
|
287
|
+
assertOptionalBoolean(config.aspireDefaults, 'aspireDefaults', 'defineTelemetry');
|
|
288
|
+
if (config.sampleRate !== undefined && (config.sampleRate < 0 || config.sampleRate > 1)) {
|
|
289
|
+
throw new BuilderValidationError('defineTelemetry', '"sampleRate" must be between 0.0 and 1.0');
|
|
290
|
+
}
|
|
291
|
+
return config;
|
|
292
|
+
}
|
|
293
|
+
// ---------------------------------------------------------------------------
|
|
294
|
+
// defineSkill
|
|
295
|
+
// ---------------------------------------------------------------------------
|
|
296
|
+
const CONFIDENCE_LEVELS = ['low', 'medium', 'high'];
|
|
297
|
+
const SKILL_SOURCES = ['manual', 'observed', 'earned', 'extracted'];
|
|
298
|
+
/**
|
|
299
|
+
* Define a reusable skill with patterns, context, and examples.
|
|
300
|
+
*
|
|
301
|
+
* ```ts
|
|
302
|
+
* const skill = defineSkill({
|
|
303
|
+
* name: 'init-mode',
|
|
304
|
+
* description: 'Team initialization flow (Phase 1 + Phase 2)',
|
|
305
|
+
* domain: 'orchestration',
|
|
306
|
+
* confidence: 'high',
|
|
307
|
+
* source: 'extracted',
|
|
308
|
+
* content: '## Context\n...\n## Patterns\n...',
|
|
309
|
+
* tools: [{ name: 'ask_user', description: 'Confirm team roster', when: 'Phase 1 proposal' }],
|
|
310
|
+
* });
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
export function defineSkill(config) {
|
|
314
|
+
assertObject(config, 'defineSkill');
|
|
315
|
+
assertNonEmptyString(config.name, 'name', 'defineSkill');
|
|
316
|
+
assertNonEmptyString(config.description, 'description', 'defineSkill');
|
|
317
|
+
assertNonEmptyString(config.domain, 'domain', 'defineSkill');
|
|
318
|
+
assertNonEmptyString(config.content, 'content', 'defineSkill');
|
|
319
|
+
if (config.confidence !== undefined) {
|
|
320
|
+
assertStringUnion(config.confidence, CONFIDENCE_LEVELS, 'confidence', 'defineSkill');
|
|
321
|
+
}
|
|
322
|
+
if (config.source !== undefined) {
|
|
323
|
+
assertStringUnion(config.source, SKILL_SOURCES, 'source', 'defineSkill');
|
|
324
|
+
}
|
|
325
|
+
assertOptionalArray(config.tools, 'tools', 'defineSkill');
|
|
326
|
+
if (config.tools) {
|
|
327
|
+
for (const tool of config.tools) {
|
|
328
|
+
assertObject(tool, 'defineSkill');
|
|
329
|
+
assertNonEmptyString(tool.name, 'tools[].name', 'defineSkill');
|
|
330
|
+
assertNonEmptyString(tool.description, 'tools[].description', 'defineSkill');
|
|
331
|
+
assertNonEmptyString(tool.when, 'tools[].when', 'defineSkill');
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return config;
|
|
335
|
+
}
|
|
336
|
+
// ---------------------------------------------------------------------------
|
|
337
|
+
// defineDefaults
|
|
338
|
+
// ---------------------------------------------------------------------------
|
|
339
|
+
/**
|
|
340
|
+
* Define squad-level defaults applied to all agents unless overridden.
|
|
341
|
+
*
|
|
342
|
+
* ```ts
|
|
343
|
+
* const defaults = defineDefaults({
|
|
344
|
+
* model: { preferred: 'claude-sonnet-4', rationale: 'Good balance of speed and quality', fallback: 'claude-haiku-4.5' },
|
|
345
|
+
* });
|
|
346
|
+
* ```
|
|
347
|
+
*/
|
|
348
|
+
export function defineDefaults(config) {
|
|
349
|
+
assertObject(config, 'defineDefaults');
|
|
350
|
+
assertModelPreference(config.model, 'model', 'defineDefaults');
|
|
351
|
+
return config;
|
|
352
|
+
}
|
|
353
|
+
// ---------------------------------------------------------------------------
|
|
354
|
+
// defineSquad — top-level composition
|
|
355
|
+
// ---------------------------------------------------------------------------
|
|
356
|
+
/**
|
|
357
|
+
* Compose all builder outputs into a single SDK config.
|
|
358
|
+
*
|
|
359
|
+
* ```ts
|
|
360
|
+
* export default defineSquad({
|
|
361
|
+
* version: '1.0.0',
|
|
362
|
+
* team: defineTeam({ name: 'Core', members: ['@edie'] }),
|
|
363
|
+
* agents: [defineAgent({ name: 'edie', role: 'TypeScript Engineer' })],
|
|
364
|
+
* routing: defineRouting({ rules: [...] }),
|
|
365
|
+
* defaults: defineDefaults({ model: 'claude-sonnet-4' }),
|
|
366
|
+
* });
|
|
367
|
+
* ```
|
|
368
|
+
*/
|
|
369
|
+
export function defineSquad(config) {
|
|
370
|
+
assertObject(config, 'defineSquad');
|
|
371
|
+
assertOptionalString(config.version, 'version', 'defineSquad');
|
|
372
|
+
// Validate nested sections via their respective builders
|
|
373
|
+
defineTeam(config.team);
|
|
374
|
+
assertArray(config.agents, 'agents', 'defineSquad');
|
|
375
|
+
for (const agent of config.agents) {
|
|
376
|
+
defineAgent(agent);
|
|
377
|
+
}
|
|
378
|
+
if (config.defaults !== undefined)
|
|
379
|
+
defineDefaults(config.defaults);
|
|
380
|
+
if (config.routing !== undefined)
|
|
381
|
+
defineRouting(config.routing);
|
|
382
|
+
if (config.ceremonies !== undefined) {
|
|
383
|
+
assertArray(config.ceremonies, 'ceremonies', 'defineSquad');
|
|
384
|
+
for (const ceremony of config.ceremonies) {
|
|
385
|
+
defineCeremony(ceremony);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
if (config.hooks !== undefined)
|
|
389
|
+
defineHooks(config.hooks);
|
|
390
|
+
if (config.casting !== undefined)
|
|
391
|
+
defineCasting(config.casting);
|
|
392
|
+
if (config.telemetry !== undefined)
|
|
393
|
+
defineTelemetry(config.telemetry);
|
|
394
|
+
if (config.skills !== undefined) {
|
|
395
|
+
assertArray(config.skills, 'skills', 'defineSquad');
|
|
396
|
+
for (const skill of config.skills) {
|
|
397
|
+
defineSkill(skill);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return config;
|
|
401
|
+
}
|
|
402
|
+
/** Exported for testing — not part of the public API contract. */
|
|
403
|
+
export { BuilderValidationError };
|
|
404
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/builders/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqCH,8EAA8E;AAC9E,+BAA+B;AAC/B,8EAA8E;AAE9E,MAAM,sBAAuB,SAAQ,KAAK;IACxC,YAAY,OAAe,EAAE,MAAc;QACzC,KAAK,CAAC,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAED,SAAS,oBAAoB,CAAC,KAAc,EAAE,KAAa,EAAE,OAAe;IAC1E,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpD,MAAM,IAAI,sBAAsB,CAAC,OAAO,EAAE,IAAI,KAAK,8BAA8B,CAAC,CAAC;IACrF,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,KAAc,EAAE,KAAa,EAAE,OAAe;IACjE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,sBAAsB,CAAC,OAAO,EAAE,IAAI,KAAK,oBAAoB,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,KAAc,EAAE,OAAe;IACnD,IAAI,OAAO,KAAK,K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,CAAC,CAAC;IAC1D,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS;QAAE,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChE,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS;QAAE,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACtE,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAChC,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;QACpD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClC,WAAW,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,kEAAkE;AAClE,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builder Types — SDK-First Squad Mode
|
|
3
|
+
*
|
|
4
|
+
* These types define the config surface for the builder functions
|
|
5
|
+
* (`defineTeam`, `defineAgent`, etc.). They are the SDK-mode complement
|
|
6
|
+
* to the existing SquadConfig / schema types. Treat these interfaces
|
|
7
|
+
* as the public contract for programmatic team definition.
|
|
8
|
+
*
|
|
9
|
+
* @module builders/types
|
|
10
|
+
*/
|
|
11
|
+
/** Reference to an agent by name (e.g. `"@edie"` or `"edie"`). */
|
|
12
|
+
export type AgentRef = string;
|
|
13
|
+
/** Cron-like schedule expression or human-readable trigger. */
|
|
14
|
+
export type ScheduleExpression = string;
|
|
15
|
+
/** Model identifier (same domain as runtime ModelId). */
|
|
16
|
+
export type BuilderModelId = string;
|
|
17
|
+
/**
|
|
18
|
+
* Structured model preference for an agent or squad-level default.
|
|
19
|
+
* Supports the 4-layer model selection hierarchy:
|
|
20
|
+
* 1. User override (runtime)
|
|
21
|
+
* 2. Charter / config preference (this type)
|
|
22
|
+
* 3. Task-aware auto-selection (runtime)
|
|
23
|
+
* 4. Default (haiku)
|
|
24
|
+
*/
|
|
25
|
+
export interface ModelPreference {
|
|
26
|
+
/** Preferred model identifier (e.g. `"claude-sonnet-4.5"`). */
|
|
27
|
+
readonly preferred: BuilderModelId;
|
|
28
|
+
/** Why this model was chosen — helps coordinators respect the preference. */
|
|
29
|
+
readonly rationale?: string;
|
|
30
|
+
/** Fallback model if the preferred model is unavailable. */
|
|
31
|
+
readonly fallback?: BuilderModelId;
|
|
32
|
+
}
|
|
33
|
+
/** Squad-level defaults applied to all agents unless overridden. */
|
|
34
|
+
export interface DefaultsDefinition {
|
|
35
|
+
/** Default model preference for agents that don't specify one. */
|
|
36
|
+
readonly model?: BuilderModelId | ModelPreference;
|
|
37
|
+
}
|
|
38
|
+
export interface TeamDefinition {
|
|
39
|
+
/** Human-readable team name. */
|
|
40
|
+
readonly name: string;
|
|
41
|
+
/** One-liner describing the team's purpose. */
|
|
42
|
+
readonly description?: string;
|
|
43
|
+
/** Freeform project context injected into agent system prompts. */
|
|
44
|
+
readonly projectContext?: string;
|
|
45
|
+
/** Ordered list of agent refs that belong to this team. */
|
|
46
|
+
readonly members: readonly AgentRef[];
|
|
47
|
+
}
|
|
48
|
+
/** Agent capability descriptor. */
|
|
49
|
+
export interface AgentCapability {
|
|
50
|
+
/** Capability name (e.g. `"code-review"`, `"testing"`). */
|
|
51
|
+
readonly name: string;
|
|
52
|
+
/** Proficiency level. */
|
|
53
|
+
readonly level: 'expert' | 'proficient' | 'basic';
|
|
54
|
+
}
|
|
55
|
+
export interface AgentDefinition {
|
|
56
|
+
/** Unique agent identifier (kebab-case, no `@` prefix). */
|
|
57
|
+
readonly name: string;
|
|
58
|
+
/** Human-readable role title. */
|
|
59
|
+
readonly role: string;
|
|
60
|
+
/** One-line tagline or description (rendered as blockquote in charter). */
|
|
61
|
+
readonly description?: string;
|
|
62
|
+
/** Path to charter markdown or inline charter text. */
|
|
63
|
+
readonly charter?: string;
|
|
64
|
+
/** Preferred model identifier or structured model preference. */
|
|
65
|
+
readonly model?: BuilderModelId | ModelPreference;
|
|
66
|
+
/** Tools this agent is allowed to use. */
|
|
67
|
+
readonly tools?: readonly string[];
|
|
68
|
+
/** Typed capability list. */
|
|
69
|
+
readonly capabilities?: readonly AgentCapability[];
|
|
70
|
+
/** Agent lifecycle status. */
|
|
71
|
+
readonly status?: 'active' | 'inactive' | 'retired';
|
|
72
|
+
}
|
|
73
|
+
export interface RoutingRule {
|
|
74
|
+
/** Glob or regex pattern to match against work type / issue labels. */
|
|
75
|
+
readonly pattern: string;
|
|
76
|
+
/** Agent(s) to route matching work to. */
|
|
77
|
+
readonly agents: readonly AgentRef[];
|
|
78
|
+
/** Routing tier controls how much ceremony surrounds execution. */
|
|
79
|
+
readonly tier?: 'direct' | 'lightweight' | 'standard' | 'full';
|
|
80
|
+
/** Numeric priority — lower wins. */
|
|
81
|
+
readonly priority?: number;
|
|
82
|
+
/** Human-readable description or examples for this rule. */
|
|
83
|
+
readonly description?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface RoutingDefinition {
|
|
86
|
+
/** Ordered list of routing rules (first match wins at equal priority). */
|
|
87
|
+
readonly rules: readonly RoutingRule[];
|
|
88
|
+
/** Fallback agent when no rule matches. */
|
|
89
|
+
readonly defaultAgent?: AgentRef;
|
|
90
|
+
/** Fallback behaviour when routing is ambiguous. */
|
|
91
|
+
readonly fallback?: 'ask' | 'default-agent' | 'coordinator';
|
|
92
|
+
}
|
|
93
|
+
export interface CeremonyDefinition {
|
|
94
|
+
/** Ceremony name (e.g. `"standup"`, `"retrospective"`). */
|
|
95
|
+
readonly name: string;
|
|
96
|
+
/** What triggers this ceremony (e.g. `"schedule"`, `"pr-merged"`). */
|
|
97
|
+
readonly trigger?: string;
|
|
98
|
+
/** Cron expression or human-readable schedule. */
|
|
99
|
+
readonly schedule?: ScheduleExpression;
|
|
100
|
+
/** Agents that participate. */
|
|
101
|
+
readonly participants?: readonly AgentRef[];
|
|
102
|
+
/** Freeform agenda / template. */
|
|
103
|
+
readonly agenda?: string;
|
|
104
|
+
/** Hook names that fire during this ceremony. */
|
|
105
|
+
readonly hooks?: readonly string[];
|
|
106
|
+
}
|
|
107
|
+
export interface HooksDefinition {
|
|
108
|
+
/** Glob patterns for paths agents are allowed to write. */
|
|
109
|
+
readonly allowedWritePaths?: readonly string[];
|
|
110
|
+
/** Shell commands that agents must never execute. */
|
|
111
|
+
readonly blockedCommands?: readonly string[];
|
|
112
|
+
/** Max number of ask-user prompts per session. */
|
|
113
|
+
readonly maxAskUser?: number;
|
|
114
|
+
/** Scrub PII from agent output before persisting. */
|
|
115
|
+
readonly scrubPii?: boolean;
|
|
116
|
+
/** Prevent the PR author from approving their own PR. */
|
|
117
|
+
readonly reviewerLockout?: boolean;
|
|
118
|
+
}
|
|
119
|
+
export interface CastingDefinition {
|
|
120
|
+
/** Fictional universes from which agent personas are drawn. */
|
|
121
|
+
readonly allowlistUniverses?: readonly string[];
|
|
122
|
+
/** Strategy when the universe is at capacity. */
|
|
123
|
+
readonly overflowStrategy?: 'reject' | 'generic' | 'rotate';
|
|
124
|
+
/** Max agents per universe (keyed by universe name). */
|
|
125
|
+
readonly capacity?: Readonly<Record<string, number>>;
|
|
126
|
+
}
|
|
127
|
+
export interface TelemetryDefinition {
|
|
128
|
+
/** Master on/off switch. */
|
|
129
|
+
readonly enabled?: boolean;
|
|
130
|
+
/** OTLP endpoint URL. */
|
|
131
|
+
readonly endpoint?: string;
|
|
132
|
+
/** OTel service name. */
|
|
133
|
+
readonly serviceName?: string;
|
|
134
|
+
/** Trace sample rate (0.0 – 1.0). */
|
|
135
|
+
readonly sampleRate?: number;
|
|
136
|
+
/** Apply Aspire-compatible defaults for dashboard integration. */
|
|
137
|
+
readonly aspireDefaults?: boolean;
|
|
138
|
+
}
|
|
139
|
+
/** MCP tool relevant to a skill. */
|
|
140
|
+
export interface SkillTool {
|
|
141
|
+
readonly name: string;
|
|
142
|
+
readonly description: string;
|
|
143
|
+
readonly when: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Skill definition for SDK-First mode.
|
|
147
|
+
* Skills are reusable capabilities that agents or the coordinator can load on demand.
|
|
148
|
+
*/
|
|
149
|
+
export interface SkillDefinition {
|
|
150
|
+
/** Unique skill name (kebab-case) */
|
|
151
|
+
readonly name: string;
|
|
152
|
+
/** Human-readable description */
|
|
153
|
+
readonly description: string;
|
|
154
|
+
/** Domain category (e.g., 'orchestration', 'testing', 'api-design') */
|
|
155
|
+
readonly domain: string;
|
|
156
|
+
/** Confidence level in this skill */
|
|
157
|
+
readonly confidence?: 'low' | 'medium' | 'high';
|
|
158
|
+
/** How the skill was learned */
|
|
159
|
+
readonly source?: 'manual' | 'observed' | 'earned' | 'extracted';
|
|
160
|
+
/** The skill content — patterns, context, examples, anti-patterns */
|
|
161
|
+
readonly content: string;
|
|
162
|
+
/** Optional MCP tools relevant to this skill */
|
|
163
|
+
readonly tools?: readonly SkillTool[];
|
|
164
|
+
}
|
|
165
|
+
export interface SquadSDKConfig {
|
|
166
|
+
/** Schema version for forward-compat. */
|
|
167
|
+
readonly version?: string;
|
|
168
|
+
/** Team metadata. */
|
|
169
|
+
readonly team: TeamDefinition;
|
|
170
|
+
/** Agent definitions. */
|
|
171
|
+
readonly agents: readonly AgentDefinition[];
|
|
172
|
+
/** Squad-level defaults applied to agents unless overridden. */
|
|
173
|
+
readonly defaults?: DefaultsDefinition;
|
|
174
|
+
/** Routing rules. */
|
|
175
|
+
readonly routing?: RoutingDefinition;
|
|
176
|
+
/** Ceremony definitions. */
|
|
177
|
+
readonly ceremonies?: readonly CeremonyDefinition[];
|
|
178
|
+
/** Hook / governance definitions. */
|
|
179
|
+
readonly hooks?: HooksDefinition;
|
|
180
|
+
/** Casting configuration. */
|
|
181
|
+
readonly casting?: CastingDefinition;
|
|
182
|
+
/** Telemetry / OTel configuration. */
|
|
183
|
+
readonly telemetry?: TelemetryDefinition;
|
|
184
|
+
/** Skill definitions. */
|
|
185
|
+
readonly skills?: readonly SkillDefinition[];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AAQ,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAEvC,qBAAqB;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAErC,4BAA4B;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAEpD,qCAAqC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;IAEjC,6BAA6B;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAErC,sCAAsC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAEzC,yBAAyB;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;CAC9C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builder Types — SDK-First Squad Mode
|
|
3
|
+
*
|
|
4
|
+
* These types define the config surface for the builder functions
|
|
5
|
+
* (`defineTeam`, `defineAgent`, etc.). They are the SDK-mode complement
|
|
6
|
+
* to the existing SquadConfig / schema types. Treat these interfaces
|
|
7
|
+
* as the public contract for programmatic team definition.
|
|
8
|
+
*
|
|
9
|
+
* @module builders/types
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/builders/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|