@sjawhar/claude-envoy 1.26.1 → 1.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.omp-plugin/plugin.json +1 -1
- package/dist/dispatch.js +1 -0
- package/dist/envoy-channel.js +161 -144
- package/dist/session-hook.js +1 -0
- package/legion/skills/legion-architect/references/wake-routing.md +1 -1
- package/legion/skills/legion-controller/SKILL.md +2 -1
- package/legion/skills/legion-controller/references/wakes.md +30 -0
- package/legion/skills/legion-worker/references/pr-body.md +2 -1
- package/package.json +2 -2
package/.omp-plugin/plugin.json
CHANGED
package/dist/dispatch.js
CHANGED
|
@@ -16830,6 +16830,7 @@ var EnvelopeSchema = object({
|
|
|
16830
16830
|
issued_at: number2().int(),
|
|
16831
16831
|
expires_at: number2().int().optional(),
|
|
16832
16832
|
kept_at: number2().int().optional(),
|
|
16833
|
+
mention_dedupe_keys: record(string2(), string2()).optional(),
|
|
16833
16834
|
payload_summary: string2().min(1),
|
|
16834
16835
|
payload: string2().optional(),
|
|
16835
16836
|
payload_ref: string2().optional(),
|
package/dist/envoy-channel.js
CHANGED
|
@@ -38479,6 +38479,7 @@ var EnvelopeSchema = object({
|
|
|
38479
38479
|
issued_at: number2().int(),
|
|
38480
38480
|
expires_at: number2().int().optional(),
|
|
38481
38481
|
kept_at: number2().int().optional(),
|
|
38482
|
+
mention_dedupe_keys: record(string2(), string2()).optional(),
|
|
38482
38483
|
payload_summary: string2().min(1),
|
|
38483
38484
|
payload: string2().optional(),
|
|
38484
38485
|
payload_ref: string2().optional(),
|
|
@@ -52093,8 +52094,23 @@ function sessionsOnMachine(sessions, machine) {
|
|
|
52093
52094
|
}
|
|
52094
52095
|
var envoyToolSchemas = new Map;
|
|
52095
52096
|
|
|
52096
|
-
// ../contracts/src/legion-
|
|
52097
|
+
// ../contracts/src/legion-claim-recovery.ts
|
|
52097
52098
|
var nonEmptyString = string2().min(1);
|
|
52099
|
+
var LegionClaimRequest = strictObject({
|
|
52100
|
+
grantId: nonEmptyString,
|
|
52101
|
+
issue: nonEmptyString,
|
|
52102
|
+
role: _enum2(LEGION_ROLES)
|
|
52103
|
+
});
|
|
52104
|
+
var LegionFreshSessionResponse = object({
|
|
52105
|
+
phaseNotRestarted: nonEmptyString.optional()
|
|
52106
|
+
});
|
|
52107
|
+
var LegionCompactResponse = object({
|
|
52108
|
+
compacted: boolean2(),
|
|
52109
|
+
reason: string2().optional()
|
|
52110
|
+
});
|
|
52111
|
+
|
|
52112
|
+
// ../contracts/src/legion-api.ts
|
|
52113
|
+
var nonEmptyString2 = string2().min(1);
|
|
52098
52114
|
var issueKey = string2().regex(DISPATCH_KEY_PATTERN);
|
|
52099
52115
|
var timestamp = exports_iso.datetime({ offset: true });
|
|
52100
52116
|
var LegionInstant = timestamp.regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/, { error: "an RFC 3339 time with seconds, as 2026-11-02T09:00:00Z is" });
|
|
@@ -52143,19 +52159,19 @@ var LEGION_CLAIM_STATES = [
|
|
|
52143
52159
|
var legionLocator = discriminatedUnion("runtime", [
|
|
52144
52160
|
object({
|
|
52145
52161
|
runtime: literal("tmux"),
|
|
52146
|
-
claim:
|
|
52147
|
-
incarnation:
|
|
52148
|
-
tmux: object({ window:
|
|
52162
|
+
claim: nonEmptyString2,
|
|
52163
|
+
incarnation: nonEmptyString2,
|
|
52164
|
+
tmux: object({ window: nonEmptyString2, pane: nonEmptyString2 })
|
|
52149
52165
|
}),
|
|
52150
52166
|
object({
|
|
52151
52167
|
runtime: literal("sandbox"),
|
|
52152
|
-
claim:
|
|
52153
|
-
incarnation:
|
|
52168
|
+
claim: nonEmptyString2,
|
|
52169
|
+
incarnation: nonEmptyString2,
|
|
52154
52170
|
sandbox: object({
|
|
52155
|
-
namespace:
|
|
52156
|
-
name:
|
|
52157
|
-
podUid:
|
|
52158
|
-
container:
|
|
52171
|
+
namespace: nonEmptyString2,
|
|
52172
|
+
name: nonEmptyString2,
|
|
52173
|
+
podUid: nonEmptyString2,
|
|
52174
|
+
container: nonEmptyString2,
|
|
52159
52175
|
generation: number2().int().positive()
|
|
52160
52176
|
})
|
|
52161
52177
|
})
|
|
@@ -52163,16 +52179,16 @@ var legionLocator = discriminatedUnion("runtime", [
|
|
|
52163
52179
|
var legionCapabilityReportView = object({
|
|
52164
52180
|
measuredAt: timestamp,
|
|
52165
52181
|
incarnation: string2(),
|
|
52166
|
-
ok: array(
|
|
52167
|
-
open: array(object({ name:
|
|
52182
|
+
ok: array(nonEmptyString2),
|
|
52183
|
+
open: array(object({ name: nonEmptyString2, detail: nonEmptyString2 }))
|
|
52168
52184
|
});
|
|
52169
52185
|
var legionStepView = object({
|
|
52170
52186
|
at: timestamp.optional(),
|
|
52171
52187
|
turnStartedAt: timestamp.optional(),
|
|
52172
|
-
tool:
|
|
52173
|
-
callId:
|
|
52188
|
+
tool: nonEmptyString2.optional(),
|
|
52189
|
+
callId: nonEmptyString2.optional(),
|
|
52174
52190
|
argsBytes: number2().int().positive().optional(),
|
|
52175
|
-
argsHash:
|
|
52191
|
+
argsHash: nonEmptyString2.optional(),
|
|
52176
52192
|
startedAt: timestamp.optional(),
|
|
52177
52193
|
endedAt: timestamp.optional()
|
|
52178
52194
|
});
|
|
@@ -52182,42 +52198,41 @@ var legionClaimView = object({
|
|
|
52182
52198
|
locator: legionLocator.optional(),
|
|
52183
52199
|
capabilities: legionCapabilityReportView.optional(),
|
|
52184
52200
|
pluginContract: number2().int().nonnegative(),
|
|
52185
|
-
updateRound:
|
|
52186
|
-
updateHead:
|
|
52201
|
+
updateRound: nonEmptyString2.optional(),
|
|
52202
|
+
updateHead: nonEmptyString2.optional(),
|
|
52187
52203
|
step: legionStepView.optional()
|
|
52188
52204
|
});
|
|
52189
52205
|
var legionHandoffRecordView = object({
|
|
52190
|
-
id:
|
|
52206
|
+
id: nonEmptyString2,
|
|
52191
52207
|
version: number2().int().positive()
|
|
52192
52208
|
});
|
|
52193
52209
|
var legionPhaseView = object({
|
|
52194
52210
|
claim: legionClaimView,
|
|
52195
|
-
handoffCommit:
|
|
52211
|
+
handoffCommit: nonEmptyString2.optional(),
|
|
52196
52212
|
handoffRecord: legionHandoffRecordView.optional(),
|
|
52197
52213
|
rounds: number2().int().nonnegative()
|
|
52198
52214
|
});
|
|
52199
52215
|
var legionPullRequestView = object({
|
|
52200
|
-
repo:
|
|
52216
|
+
repo: nonEmptyString2,
|
|
52201
52217
|
number: number2().int().positive(),
|
|
52202
|
-
head:
|
|
52218
|
+
head: nonEmptyString2,
|
|
52203
52219
|
state: _enum2(["open", "merged", "closed"]),
|
|
52204
|
-
checksVerdict:
|
|
52205
|
-
reviewDecision:
|
|
52206
|
-
fixAttempts: number2().int().nonnegative()
|
|
52220
|
+
checksVerdict: nonEmptyString2.optional(),
|
|
52221
|
+
reviewDecision: nonEmptyString2.optional()
|
|
52207
52222
|
});
|
|
52208
52223
|
var legionGateView = object({
|
|
52209
|
-
artifactId:
|
|
52224
|
+
artifactId: nonEmptyString2,
|
|
52210
52225
|
currentVersion: number2().int().positive(),
|
|
52211
52226
|
approvedVersion: number2().int().positive().nullable()
|
|
52212
52227
|
});
|
|
52213
52228
|
var legionDesignStep = _enum2(GATED_STEPS);
|
|
52214
52229
|
var legionGatedStepView = object({
|
|
52215
52230
|
step: legionDesignStep,
|
|
52216
|
-
artifactId:
|
|
52231
|
+
artifactId: nonEmptyString2.optional(),
|
|
52217
52232
|
currentVersion: number2().int().positive().optional(),
|
|
52218
52233
|
approvedVersion: number2().int().positive().nullable(),
|
|
52219
52234
|
status: _enum2(["unregistered", "waiting", "approved", "changes_requested"]),
|
|
52220
|
-
changesReason:
|
|
52235
|
+
changesReason: nonEmptyString2.optional()
|
|
52221
52236
|
});
|
|
52222
52237
|
var legionSlotView = object({
|
|
52223
52238
|
index: number2().int().nonnegative(),
|
|
@@ -52229,16 +52244,16 @@ var legionWaitingLineView = object({
|
|
|
52229
52244
|
length: number2().int().positive()
|
|
52230
52245
|
});
|
|
52231
52246
|
var legionCheckWakeView = object({
|
|
52232
|
-
kind:
|
|
52247
|
+
kind: nonEmptyString2,
|
|
52233
52248
|
detail: string2(),
|
|
52234
52249
|
at: timestamp
|
|
52235
52250
|
});
|
|
52236
52251
|
var legionCheckView = object({
|
|
52237
|
-
repo:
|
|
52252
|
+
repo: nonEmptyString2,
|
|
52238
52253
|
pullRequest: number2().int().positive(),
|
|
52239
52254
|
mergeCommit: string2(),
|
|
52240
52255
|
openedAt: timestamp,
|
|
52241
|
-
role:
|
|
52256
|
+
role: nonEmptyString2,
|
|
52242
52257
|
looks: number2().int().nonnegative(),
|
|
52243
52258
|
lookOpen: boolean2(),
|
|
52244
52259
|
lastWake: legionCheckWakeView.optional(),
|
|
@@ -52261,18 +52276,18 @@ var legionWaitTimes = {
|
|
|
52261
52276
|
answeredBy: _enum2(LEGION_WAIT_ANSWERS).optional()
|
|
52262
52277
|
};
|
|
52263
52278
|
var legionWaitingOn = discriminatedUnion("kind", [
|
|
52264
|
-
object({ kind: literal("ask"), ask:
|
|
52279
|
+
object({ kind: literal("ask"), ask: nonEmptyString2, ...legionWaitTimes }),
|
|
52265
52280
|
object({
|
|
52266
52281
|
kind: literal("gate"),
|
|
52267
52282
|
gateVersion: number2().int().positive(),
|
|
52268
|
-
artifactId:
|
|
52283
|
+
artifactId: nonEmptyString2,
|
|
52269
52284
|
...legionWaitTimes
|
|
52270
52285
|
})
|
|
52271
52286
|
]).refine((wait) => wait.answeredAt === undefined === (wait.answeredBy === undefined), {
|
|
52272
52287
|
message: "answeredAt and answeredBy appear together"
|
|
52273
52288
|
});
|
|
52274
52289
|
var legionPendingStatusWrite = object({
|
|
52275
|
-
issue:
|
|
52290
|
+
issue: nonEmptyString2,
|
|
52276
52291
|
payload: record(string2(), unknown()),
|
|
52277
52292
|
attempts: number2().int().nonnegative(),
|
|
52278
52293
|
nextAt: timestamp,
|
|
@@ -52285,26 +52300,26 @@ var legionStrandedClaim = object({
|
|
|
52285
52300
|
});
|
|
52286
52301
|
var legionHeldOutboxRow = object({
|
|
52287
52302
|
id: number2().int().positive(),
|
|
52288
|
-
kind:
|
|
52289
|
-
issue:
|
|
52303
|
+
kind: nonEmptyString2,
|
|
52304
|
+
issue: nonEmptyString2,
|
|
52290
52305
|
waitedSeconds: number2().int().nonnegative(),
|
|
52291
52306
|
waitsOn: number2().int().positive()
|
|
52292
52307
|
});
|
|
52293
52308
|
var legionWakeWaiting = object({
|
|
52294
|
-
claim:
|
|
52309
|
+
claim: nonEmptyString2,
|
|
52295
52310
|
issue: issueKey,
|
|
52296
52311
|
role: _enum2(LEGION_ROLES),
|
|
52297
|
-
kind:
|
|
52312
|
+
kind: nonEmptyString2,
|
|
52298
52313
|
dueAt: timestamp
|
|
52299
52314
|
});
|
|
52300
52315
|
var legionIssue = object({
|
|
52301
|
-
key:
|
|
52316
|
+
key: nonEmptyString2,
|
|
52302
52317
|
generation: number2().int().nonnegative(),
|
|
52303
52318
|
phase: _enum2(LEGION_PHASES),
|
|
52304
|
-
status:
|
|
52319
|
+
status: nonEmptyString2,
|
|
52305
52320
|
tree: issueKey.optional(),
|
|
52306
|
-
repo:
|
|
52307
|
-
defaultBranch:
|
|
52321
|
+
repo: nonEmptyString2.optional(),
|
|
52322
|
+
defaultBranch: nonEmptyString2.optional(),
|
|
52308
52323
|
holdReason: literal("escalated").optional(),
|
|
52309
52324
|
architect: legionClaimView.optional(),
|
|
52310
52325
|
workers: partialRecord(string2(), legionPhaseView),
|
|
@@ -52320,7 +52335,7 @@ var legionIssue = object({
|
|
|
52320
52335
|
memoryDrawnAt: timestamp.optional()
|
|
52321
52336
|
});
|
|
52322
52337
|
var daemonInfo = object({
|
|
52323
|
-
project:
|
|
52338
|
+
project: nonEmptyString2,
|
|
52324
52339
|
schemaVersion: number2().int().nonnegative(),
|
|
52325
52340
|
boots: number2().int().nonnegative(),
|
|
52326
52341
|
firstBootAt: timestamp,
|
|
@@ -52332,8 +52347,8 @@ var legionBlockedIssue = object({
|
|
|
52332
52347
|
});
|
|
52333
52348
|
var legionAdmission = object({
|
|
52334
52349
|
cap: number2().int().nonnegative(),
|
|
52335
|
-
active: array(
|
|
52336
|
-
waiting: array(
|
|
52350
|
+
active: array(nonEmptyString2),
|
|
52351
|
+
waiting: array(nonEmptyString2),
|
|
52337
52352
|
trees: array(issueKey).optional(),
|
|
52338
52353
|
blocked: array(legionBlockedIssue),
|
|
52339
52354
|
free: number2().int().nonnegative().optional()
|
|
@@ -52341,7 +52356,7 @@ var legionAdmission = object({
|
|
|
52341
52356
|
var legionControllerLocator = object({
|
|
52342
52357
|
runtime: _enum2(["tmux", "kubernetes"]),
|
|
52343
52358
|
external: literal(true),
|
|
52344
|
-
sessionId:
|
|
52359
|
+
sessionId: nonEmptyString2,
|
|
52345
52360
|
registeredAt: timestamp,
|
|
52346
52361
|
pluginContract: number2().int().nonnegative()
|
|
52347
52362
|
});
|
|
@@ -52349,49 +52364,48 @@ var legionAgentSecretsLoginView = object({
|
|
|
52349
52364
|
state: string2()
|
|
52350
52365
|
});
|
|
52351
52366
|
var legionCapabilityState = object({
|
|
52352
|
-
name:
|
|
52367
|
+
name: nonEmptyString2,
|
|
52353
52368
|
status: _enum2(["present", "unchecked", "withheld", "decided", "open"]),
|
|
52354
|
-
detail:
|
|
52355
|
-
decision:
|
|
52356
|
-
configLine:
|
|
52369
|
+
detail: nonEmptyString2,
|
|
52370
|
+
decision: nonEmptyString2.optional(),
|
|
52371
|
+
configLine: nonEmptyString2.optional(),
|
|
52357
52372
|
source: _enum2(["configuration", "boot"]).optional()
|
|
52358
52373
|
});
|
|
52359
52374
|
var legionSettings = looseObject({
|
|
52360
|
-
max_fix_attempts: number2().int().positive(),
|
|
52361
52375
|
worker_boot_timeout_seconds: number2().int().positive()
|
|
52362
52376
|
});
|
|
52363
52377
|
var legionCacheView = object({
|
|
52364
|
-
repo:
|
|
52365
|
-
sandbox:
|
|
52378
|
+
repo: nonEmptyString2,
|
|
52379
|
+
sandbox: nonEmptyString2,
|
|
52366
52380
|
state: _enum2(["starting", "cloning", "ready", "failing", "refused"]),
|
|
52367
|
-
reason:
|
|
52381
|
+
reason: nonEmptyString2.optional(),
|
|
52368
52382
|
ready: boolean2(),
|
|
52369
|
-
address:
|
|
52370
|
-
head:
|
|
52383
|
+
address: nonEmptyString2.optional(),
|
|
52384
|
+
head: nonEmptyString2.optional(),
|
|
52371
52385
|
lastFetchAt: timestamp.optional(),
|
|
52372
52386
|
bytes: number2().int().positive().optional(),
|
|
52373
|
-
healthError:
|
|
52387
|
+
healthError: nonEmptyString2.optional(),
|
|
52374
52388
|
retainedUntil: timestamp.optional()
|
|
52375
52389
|
});
|
|
52376
52390
|
var legionRepositories = object({
|
|
52377
|
-
owners: array(
|
|
52391
|
+
owners: array(nonEmptyString2),
|
|
52378
52392
|
mapped: array(object({
|
|
52379
|
-
repo:
|
|
52393
|
+
repo: nonEmptyString2,
|
|
52380
52394
|
default: boolean2(),
|
|
52381
52395
|
cache: legionCacheView.optional()
|
|
52382
52396
|
})),
|
|
52383
|
-
refused: array(object({ repo:
|
|
52384
|
-
withoutWebhookApp: array(object({ repo:
|
|
52397
|
+
refused: array(object({ repo: nonEmptyString2, reason: nonEmptyString2 })),
|
|
52398
|
+
withoutWebhookApp: array(object({ repo: nonEmptyString2, reason: nonEmptyString2 })),
|
|
52385
52399
|
caches: array(legionCacheView)
|
|
52386
52400
|
});
|
|
52387
52401
|
var legionConsumerLag = object({
|
|
52388
|
-
name:
|
|
52402
|
+
name: nonEmptyString2,
|
|
52389
52403
|
waiting: number2().int().nonnegative(),
|
|
52390
52404
|
oldestAt: timestamp.nullable(),
|
|
52391
52405
|
oldestAgeSeconds: number2().int().nullable(),
|
|
52392
52406
|
lastHandledAt: timestamp.nullable(),
|
|
52393
52407
|
stalled: boolean2(),
|
|
52394
|
-
unavailable:
|
|
52408
|
+
unavailable: nonEmptyString2.optional()
|
|
52395
52409
|
});
|
|
52396
52410
|
var LegionStateResponse = object({
|
|
52397
52411
|
daemon: daemonInfo,
|
|
@@ -52409,50 +52423,50 @@ var LegionStateResponse = object({
|
|
|
52409
52423
|
consumers: array(legionConsumerLag)
|
|
52410
52424
|
});
|
|
52411
52425
|
var LegionRegisterResponse = object({
|
|
52412
|
-
claimToken:
|
|
52413
|
-
tree:
|
|
52414
|
-
issue:
|
|
52426
|
+
claimToken: nonEmptyString2,
|
|
52427
|
+
tree: nonEmptyString2,
|
|
52428
|
+
issue: nonEmptyString2,
|
|
52415
52429
|
role: _enum2(LEGION_ROLES),
|
|
52416
52430
|
generation: number2().int().positive(),
|
|
52417
|
-
secret:
|
|
52418
|
-
promptAgents: array(
|
|
52431
|
+
secret: nonEmptyString2,
|
|
52432
|
+
promptAgents: array(nonEmptyString2)
|
|
52419
52433
|
});
|
|
52420
52434
|
var LegionCapabilityReport = strictObject({
|
|
52421
52435
|
measuredAt: timestamp,
|
|
52422
52436
|
elapsedMs: number2().int().nonnegative(),
|
|
52423
|
-
rows: array(strictObject({ name:
|
|
52437
|
+
rows: array(strictObject({ name: nonEmptyString2, ok: boolean2(), detail: string2() }))
|
|
52424
52438
|
});
|
|
52425
52439
|
var LegionReadyRequest = strictObject({
|
|
52426
|
-
claimToken:
|
|
52427
|
-
sessionId:
|
|
52428
|
-
secret:
|
|
52440
|
+
claimToken: nonEmptyString2,
|
|
52441
|
+
sessionId: nonEmptyString2,
|
|
52442
|
+
secret: nonEmptyString2,
|
|
52429
52443
|
generation: number2().int().positive(),
|
|
52430
52444
|
capabilities: LegionCapabilityReport.optional()
|
|
52431
52445
|
});
|
|
52432
52446
|
var LegionReadyForUpdateRequest = strictObject({
|
|
52433
|
-
claimToken:
|
|
52434
|
-
sessionId:
|
|
52435
|
-
secret:
|
|
52447
|
+
claimToken: nonEmptyString2,
|
|
52448
|
+
sessionId: nonEmptyString2,
|
|
52449
|
+
secret: nonEmptyString2,
|
|
52436
52450
|
generation: number2().int().positive(),
|
|
52437
|
-
round:
|
|
52451
|
+
round: nonEmptyString2,
|
|
52438
52452
|
head: string2().optional()
|
|
52439
52453
|
});
|
|
52440
52454
|
var LegionSessionActivity = strictObject({
|
|
52441
52455
|
at: timestamp,
|
|
52442
|
-
backgroundWork: strictObject({ running: boolean2(), kinds: array(
|
|
52456
|
+
backgroundWork: strictObject({ running: boolean2(), kinds: array(nonEmptyString2) }),
|
|
52443
52457
|
phase: strictObject({ nextReminderAt: timestamp.nullable() })
|
|
52444
52458
|
});
|
|
52445
52459
|
var LegionActivityRequest = strictObject({
|
|
52446
|
-
claimToken:
|
|
52447
|
-
sessionId:
|
|
52448
|
-
secret:
|
|
52460
|
+
claimToken: nonEmptyString2,
|
|
52461
|
+
sessionId: nonEmptyString2,
|
|
52462
|
+
secret: nonEmptyString2,
|
|
52449
52463
|
activity: LegionSessionActivity
|
|
52450
52464
|
});
|
|
52451
52465
|
var legionReleaseRecord = object({
|
|
52452
52466
|
id: number2().int().positive(),
|
|
52453
52467
|
issue: issueKey,
|
|
52454
52468
|
generation: number2().int().nonnegative(),
|
|
52455
|
-
roles: array(
|
|
52469
|
+
roles: array(nonEmptyString2),
|
|
52456
52470
|
at: timestamp,
|
|
52457
52471
|
bundleBytes: number2().int().nonnegative()
|
|
52458
52472
|
});
|
|
@@ -52460,8 +52474,8 @@ var legionResumeRecord = object({
|
|
|
52460
52474
|
id: number2().int().positive(),
|
|
52461
52475
|
release: number2().int().nonnegative(),
|
|
52462
52476
|
issue: issueKey,
|
|
52463
|
-
role:
|
|
52464
|
-
kind:
|
|
52477
|
+
role: nonEmptyString2,
|
|
52478
|
+
kind: nonEmptyString2,
|
|
52465
52479
|
at: timestamp,
|
|
52466
52480
|
podReadyAt: timestamp.optional(),
|
|
52467
52481
|
firstTurnAt: timestamp.optional(),
|
|
@@ -52470,15 +52484,15 @@ var legionResumeRecord = object({
|
|
|
52470
52484
|
var legionHoldRecord = object({
|
|
52471
52485
|
id: number2().int().positive(),
|
|
52472
52486
|
issue: issueKey,
|
|
52473
|
-
reason:
|
|
52474
|
-
detail:
|
|
52487
|
+
reason: nonEmptyString2,
|
|
52488
|
+
detail: nonEmptyString2.optional(),
|
|
52475
52489
|
firstAt: timestamp,
|
|
52476
52490
|
at: timestamp,
|
|
52477
52491
|
passes: number2().int().positive()
|
|
52478
52492
|
});
|
|
52479
52493
|
var LegionReleaseRecordsRequest = strictObject({
|
|
52480
|
-
claimToken:
|
|
52481
|
-
secret:
|
|
52494
|
+
claimToken: nonEmptyString2,
|
|
52495
|
+
secret: nonEmptyString2,
|
|
52482
52496
|
since: LegionInstant
|
|
52483
52497
|
});
|
|
52484
52498
|
var LegionReleaseRecordsResponse = object({
|
|
@@ -52487,31 +52501,31 @@ var LegionReleaseRecordsResponse = object({
|
|
|
52487
52501
|
holds: array(legionHoldRecord)
|
|
52488
52502
|
});
|
|
52489
52503
|
var LegionControllerRegisterResponse = object({
|
|
52490
|
-
claimToken:
|
|
52504
|
+
claimToken: nonEmptyString2,
|
|
52491
52505
|
role: literal("controller"),
|
|
52492
52506
|
generation: number2().int().positive(),
|
|
52493
|
-
secret:
|
|
52507
|
+
secret: nonEmptyString2
|
|
52494
52508
|
});
|
|
52495
52509
|
var LegionControllerSecretResponse = object({
|
|
52496
|
-
secret:
|
|
52510
|
+
secret: nonEmptyString2,
|
|
52497
52511
|
designGateSteps: array(legionDesignStep)
|
|
52498
52512
|
});
|
|
52499
52513
|
var LegionControllerCredentialResponse = object({
|
|
52500
|
-
owners: record(
|
|
52501
|
-
hosts:
|
|
52502
|
-
config:
|
|
52514
|
+
owners: record(nonEmptyString2, object({
|
|
52515
|
+
hosts: nonEmptyString2,
|
|
52516
|
+
config: nonEmptyString2
|
|
52503
52517
|
})),
|
|
52504
|
-
default:
|
|
52518
|
+
default: nonEmptyString2,
|
|
52505
52519
|
app: _enum2(["implement", "review"]),
|
|
52506
52520
|
expiresAt: timestamp
|
|
52507
52521
|
});
|
|
52508
52522
|
var LegionErrorResponse = object({
|
|
52509
|
-
error:
|
|
52510
|
-
code:
|
|
52523
|
+
error: nonEmptyString2,
|
|
52524
|
+
code: nonEmptyString2.optional()
|
|
52511
52525
|
});
|
|
52512
52526
|
var legionDeliveryView = object({
|
|
52513
|
-
id:
|
|
52514
|
-
task:
|
|
52527
|
+
id: nonEmptyString2,
|
|
52528
|
+
task: nonEmptyString2,
|
|
52515
52529
|
phase: _enum2(LEGION_WORKFLOW_PHASES).optional(),
|
|
52516
52530
|
queuedAt: timestamp,
|
|
52517
52531
|
deliveredAt: timestamp.optional(),
|
|
@@ -52519,19 +52533,20 @@ var legionDeliveryView = object({
|
|
|
52519
52533
|
interrupted: literal(true).optional(),
|
|
52520
52534
|
sendFailures: number2().int().nonnegative().optional(),
|
|
52521
52535
|
lastSendFailureAt: timestamp.optional(),
|
|
52522
|
-
lastSendError:
|
|
52536
|
+
lastSendError: nonEmptyString2.optional()
|
|
52523
52537
|
});
|
|
52524
52538
|
var LegionOperatorClaimResponse = object({
|
|
52525
|
-
token:
|
|
52526
|
-
tree:
|
|
52527
|
-
issue:
|
|
52539
|
+
token: nonEmptyString2,
|
|
52540
|
+
tree: nonEmptyString2,
|
|
52541
|
+
issue: nonEmptyString2,
|
|
52528
52542
|
role: _enum2(LEGION_ROLES),
|
|
52529
52543
|
generation: number2().int().nonnegative(),
|
|
52530
52544
|
state: _enum2(LEGION_CLAIM_STATES),
|
|
52531
52545
|
session: string2(),
|
|
52532
52546
|
sessionFile: string2(),
|
|
52533
|
-
forgottenSession:
|
|
52534
|
-
forgottenSessionFile:
|
|
52547
|
+
forgottenSession: nonEmptyString2.optional(),
|
|
52548
|
+
forgottenSessionFile: nonEmptyString2.optional(),
|
|
52549
|
+
phaseNotRestarted: nonEmptyString2.optional(),
|
|
52535
52550
|
locator: legionLocator.optional(),
|
|
52536
52551
|
budgets: object({
|
|
52537
52552
|
launchFailures: number2().int().nonnegative(),
|
|
@@ -52544,99 +52559,99 @@ var LegionOperatorClaimResponse = object({
|
|
|
52544
52559
|
suspendedBy: _enum2(["unknown", "operator", "daemon", "exit", "released"]).optional(),
|
|
52545
52560
|
suspensionHeld: literal(true).optional(),
|
|
52546
52561
|
pluginContract: number2().int().nonnegative(),
|
|
52547
|
-
updateRound:
|
|
52548
|
-
updateHead:
|
|
52562
|
+
updateRound: nonEmptyString2.optional(),
|
|
52563
|
+
updateHead: nonEmptyString2.optional(),
|
|
52549
52564
|
step: legionStepView.optional()
|
|
52550
52565
|
});
|
|
52551
52566
|
var legionPodUpdateRounds = object({
|
|
52552
52567
|
swept: boolean2(),
|
|
52553
52568
|
max_open_rounds: number2().int().nullable(),
|
|
52554
52569
|
rounds_per_minute: number2().int().nullable(),
|
|
52555
|
-
in_round: array(
|
|
52556
|
-
waiting_on_max_open_rounds: array(
|
|
52557
|
-
waiting_on_rounds_per_minute: array(
|
|
52570
|
+
in_round: array(nonEmptyString2),
|
|
52571
|
+
waiting_on_max_open_rounds: array(nonEmptyString2),
|
|
52572
|
+
waiting_on_rounds_per_minute: array(nonEmptyString2)
|
|
52558
52573
|
});
|
|
52559
52574
|
var LegionOperatorClaimsResponse = object({
|
|
52560
52575
|
claims: array(LegionOperatorClaimResponse),
|
|
52561
52576
|
pod_update_rounds: legionPodUpdateRounds
|
|
52562
52577
|
});
|
|
52563
52578
|
var LegionGrantResponse = object({
|
|
52564
|
-
grantId:
|
|
52579
|
+
grantId: nonEmptyString2,
|
|
52565
52580
|
expiresAt: timestamp
|
|
52566
52581
|
});
|
|
52567
52582
|
var LegionEmptyResponse = object({});
|
|
52568
52583
|
var LegionHandoffCompleteResponse = object({
|
|
52569
|
-
note:
|
|
52584
|
+
note: nonEmptyString2.optional()
|
|
52570
52585
|
});
|
|
52571
52586
|
var LegionWaveReleaseResponse = object({
|
|
52572
|
-
released: array(
|
|
52587
|
+
released: array(nonEmptyString2),
|
|
52573
52588
|
started: array(issueKey),
|
|
52574
52589
|
held: array(legionBlockedIssue)
|
|
52575
52590
|
});
|
|
52576
52591
|
var LegionGrantRequest = strictObject({
|
|
52577
|
-
sessionId:
|
|
52578
|
-
secret:
|
|
52579
|
-
tree:
|
|
52580
|
-
issue:
|
|
52592
|
+
sessionId: nonEmptyString2,
|
|
52593
|
+
secret: nonEmptyString2,
|
|
52594
|
+
tree: nonEmptyString2,
|
|
52595
|
+
issue: nonEmptyString2
|
|
52581
52596
|
});
|
|
52582
52597
|
var LegionControllerGrantRequest = strictObject({
|
|
52583
|
-
sessionId:
|
|
52584
|
-
secret:
|
|
52598
|
+
sessionId: nonEmptyString2,
|
|
52599
|
+
secret: nonEmptyString2
|
|
52585
52600
|
});
|
|
52586
52601
|
var LegionHandoffCompleteRequest = strictObject({
|
|
52587
|
-
grantId:
|
|
52588
|
-
summary:
|
|
52602
|
+
grantId: nonEmptyString2,
|
|
52603
|
+
summary: nonEmptyString2,
|
|
52589
52604
|
verdict: string2(),
|
|
52590
52605
|
ready: boolean2(),
|
|
52591
|
-
commit:
|
|
52592
|
-
handoffId:
|
|
52606
|
+
commit: nonEmptyString2.optional(),
|
|
52607
|
+
handoffId: nonEmptyString2.optional(),
|
|
52593
52608
|
handoffVersion: number2().int().positive().optional(),
|
|
52594
52609
|
wakeAt: LegionInstant.optional()
|
|
52595
52610
|
});
|
|
52596
52611
|
var LegionIssueStatusRequest = strictObject({
|
|
52597
|
-
grantId:
|
|
52598
|
-
issue:
|
|
52612
|
+
grantId: nonEmptyString2,
|
|
52613
|
+
issue: nonEmptyString2,
|
|
52599
52614
|
status: _enum2(["todo", "backlog", "icebox"])
|
|
52600
52615
|
});
|
|
52601
52616
|
var LegionGateRegisterRequest = strictObject({
|
|
52602
|
-
grantId:
|
|
52603
|
-
issue:
|
|
52617
|
+
grantId: nonEmptyString2,
|
|
52618
|
+
issue: nonEmptyString2,
|
|
52604
52619
|
artifactId: uuid2(),
|
|
52605
52620
|
version: number2().int().positive(),
|
|
52606
52621
|
step: legionDesignStep.optional()
|
|
52607
52622
|
});
|
|
52608
52623
|
var LegionWaveReleaseRequest = strictObject({
|
|
52609
|
-
grantId:
|
|
52610
|
-
issues: array(
|
|
52624
|
+
grantId: nonEmptyString2,
|
|
52625
|
+
issues: array(nonEmptyString2)
|
|
52611
52626
|
});
|
|
52612
52627
|
var LegionPhaseBackwardRequest = strictObject({
|
|
52613
|
-
grantId:
|
|
52628
|
+
grantId: nonEmptyString2,
|
|
52614
52629
|
to: _enum2(LEGION_PHASE_BACKWARD_TARGETS),
|
|
52615
|
-
reason:
|
|
52616
|
-
issue:
|
|
52630
|
+
reason: nonEmptyString2,
|
|
52631
|
+
issue: nonEmptyString2.optional()
|
|
52617
52632
|
});
|
|
52618
52633
|
var LegionPhaseRetryRequest = strictObject({
|
|
52619
|
-
grantId:
|
|
52620
|
-
issue:
|
|
52634
|
+
grantId: nonEmptyString2,
|
|
52635
|
+
issue: nonEmptyString2,
|
|
52621
52636
|
decision: _enum2(["retry", "escalate"])
|
|
52622
52637
|
});
|
|
52623
52638
|
var LegionEscalateRequest = strictObject({
|
|
52624
|
-
grantId:
|
|
52625
|
-
issue:
|
|
52626
|
-
reason:
|
|
52639
|
+
grantId: nonEmptyString2,
|
|
52640
|
+
issue: nonEmptyString2,
|
|
52641
|
+
reason: nonEmptyString2
|
|
52627
52642
|
});
|
|
52628
52643
|
var LegionSignOffRequest = strictObject({
|
|
52629
|
-
grantId:
|
|
52630
|
-
issue:
|
|
52644
|
+
grantId: nonEmptyString2,
|
|
52645
|
+
issue: nonEmptyString2
|
|
52631
52646
|
});
|
|
52632
52647
|
var LegionRootCloseRequest = strictObject({
|
|
52633
|
-
grantId:
|
|
52634
|
-
issue:
|
|
52635
|
-
reason:
|
|
52648
|
+
grantId: nonEmptyString2,
|
|
52649
|
+
issue: nonEmptyString2,
|
|
52650
|
+
reason: nonEmptyString2
|
|
52636
52651
|
});
|
|
52637
52652
|
var LegionChildRequest = strictObject({
|
|
52638
|
-
grantId:
|
|
52639
|
-
issue:
|
|
52653
|
+
grantId: nonEmptyString2,
|
|
52654
|
+
issue: nonEmptyString2
|
|
52640
52655
|
});
|
|
52641
52656
|
|
|
52642
52657
|
// ../pi-shared/src/daemon-client.ts
|
|
@@ -52826,6 +52841,8 @@ function createLegionDaemonClient(baseUrl, fetchFn = fetch) {
|
|
|
52826
52841
|
controllerGrant: (input) => post("/legion/v1/grants", LegionControllerGrantRequest, LegionGrantResponse, input),
|
|
52827
52842
|
handoffComplete: (input) => post("/legion/v1/handoff/complete", LegionHandoffCompleteRequest, LegionHandoffCompleteResponse, input),
|
|
52828
52843
|
issueStatus: (input) => post("/legion/v1/issues/status", LegionIssueStatusRequest, LegionEmptyResponse, input),
|
|
52844
|
+
freshSession: (input) => post("/legion/v1/claims/fresh-session", LegionClaimRequest, LegionFreshSessionResponse, input),
|
|
52845
|
+
compact: (input) => post("/legion/v1/claims/compact", LegionClaimRequest, LegionCompactResponse, input),
|
|
52829
52846
|
gateRegister: (input) => post("/legion/v1/gates/register", LegionGateRegisterRequest, LegionEmptyResponse, input),
|
|
52830
52847
|
waveRelease: (input) => post("/legion/v1/waves/release", LegionWaveReleaseRequest, LegionWaveReleaseResponse, input),
|
|
52831
52848
|
phaseBackward: (input) => post("/legion/v1/phase/backward", LegionPhaseBackwardRequest, LegionEmptyResponse, input),
|
|
@@ -55331,9 +55348,9 @@ var import_nats2 = __toESM(require_mod4(), 1);
|
|
|
55331
55348
|
|
|
55332
55349
|
// package.json
|
|
55333
55350
|
var name = "@sjawhar/claude-envoy";
|
|
55334
|
-
var version2 = "1.26.
|
|
55351
|
+
var version2 = "1.26.3";
|
|
55335
55352
|
var legion = {
|
|
55336
|
-
daemonApiVersion:
|
|
55353
|
+
daemonApiVersion: 59
|
|
55337
55354
|
};
|
|
55338
55355
|
|
|
55339
55356
|
// ../pi-shared/src/agent-stream.ts
|
package/dist/session-hook.js
CHANGED
|
@@ -15829,6 +15829,7 @@ var EnvelopeSchema = object({
|
|
|
15829
15829
|
issued_at: number2().int(),
|
|
15830
15830
|
expires_at: number2().int().optional(),
|
|
15831
15831
|
kept_at: number2().int().optional(),
|
|
15832
|
+
mention_dedupe_keys: record(string2(), string2()).optional(),
|
|
15832
15833
|
payload_summary: string2().min(1),
|
|
15833
15834
|
payload: string2().optional(),
|
|
15834
15835
|
payload_ref: string2().optional(),
|
|
@@ -27,7 +27,7 @@ and 7 (a conflict, the hand-over, the close) is in
|
|
|
27
27
|
| `design-approved` | Its `version` is the approved one, and it names no step: under more than one gated step, read `gatedSteps` in your own record (the `legion` tool's `read_record`) to see which step that version opened and whether another still holds the tree. A human approved the document of one gated step at its current version; that step is open. Proceed to section 2 once every gated step is `approved` — except on a root whose catch-up said `handed_over`: its workers already run their phases, so start nothing; the approval releases any READY the gate refused. One whose `version` is the version a human's own answer to a decision block wrote, after an earlier approval (Dispatch carried that approval to it, "After approval" in `skill://legion-architect/references/design-gate.md`), opens nothing new: carry on, and release no child because of it. A root that was waiting on a question in `awaiting_person` gets no such notice: the task that resumes it says "Your spec is approved at version N and the design gate is open: this resume is your design-approved wake", and that resume is this wake — proceed to section 2 on it. |
|
|
28
28
|
| `design-changes-requested` | Its `version` and `reason`, and no step: under more than one gated step, read `gatedSteps` in your own record (the `legion` tool's `read_record`) and take the step whose `status` is `changes_requested`. A human asked for changes to that step's document at `version`, for `reason`. Revise that document as the reason asks and request approval again as "The armed gate" in `skill://legion-architect/references/design-gate.md` says; end your turn; that step is closed. On a root that was waiting on a question in `awaiting_person`, a review the human gave after the wait began comes in the resume task, not in this notice, whether it answered the wait or came after something else did: the task names the review with its version and reason, unless a later approval superseded it. A `version` below the latest, or a second request for one version, is a request that reached the daemon late: read it as the same section's last paragraph says. Each request arrives once. |
|
|
29
29
|
| `phase-finished` | The daemon has already moved the issue to its next phase by its fixed table and started that phase's role; you start nothing. Read the finishing phase's handoff on the Dispatch issue (`dispatch handoff-read --issue <issue> --phase <word>`); if it shows unresolved gaps, tell the role now working the issue (`envoy_publish` to its role topic). A `planner` notice that names a departure from the spec's design defers to the full condition in "After approval" of `skill://legion-architect/references/design-gate.md`: when the approved Summary, the requirements, the checks, the scope and the settled decisions still hold, the plan is the record; otherwise change the root spec and request approval again as that section says. A `reviewer` notice whose GitHub review is `CHANGES_REQUESTED` needs nothing from you: the daemon has returned the issue to `implementing` (Dispatch `in_progress`) and started the **implementer**, whose correction goes through the tester and the reviewer again, never straight to retro. A `reviewer` notice with an `APPROVED` review means the issue is in `accepting` and the acceptance is yours (section 6): read the evidence, then `sign_off` (a parent only after its last round, "The last round" in `skill://legion-architect/references/acceptance.md`) or send it back with `request_backward_move`. A `tester` notice with `verdict: "fail"` — its handoff carries `implementerProof.verdict: "rejected"`, or a failure naming a check with no current passing result — has gone back to the **implementer** by the daemon's table; never record that check's result from another role. A worker that reports no surface reaches the changed path sends that report instead of completing its phase, so the daemon starts nothing more on that issue and the worker stays idle in its session, not suspended: build the surface in this tree: a child issue (infrastructure, tooling, or a skill) after the red-team check in `skill://legion-architect/references/decomposition.md`, or, when the red team folds it, tell the waiting worker to move the issue back to `implementing` with `request_backward_move`, naming the surface. When it is a child, tell the waiting worker to continue with `envoy_publish` to its role topic once that child's `child-closed` arrives. That report is never a reason to advance the phase. |
|
|
30
|
-
| `pr-blocked` | Its `reason`
|
|
30
|
+
| `pr-blocked` | Its `reason` reads `Issue reached review_round_cap=<N>: <n> rounds counted, <m> conflict rounds not counted.`, the implementer's round count: every move back to an earlier phase counts one, and a move made while the head conflicts with its base counts as a conflict round the cap leaves out; the notice comes again with each round past the cap. It moves nothing, since the round that reached the cap has already started its worker. CI red is never its reason: a red always sends the work back to the implementer, however many came before it, and arrives as a `checks-red` (dispatch://INFRA-956 R4). Tell the rounds apart by what announced each: a tester's fail by its `phase-finished` with `verdict: "fail"`; a request for changes by the reviewer's `phase-finished` over a `CHANGES_REQUESTED` review; the daemon's own move by a `checks-red` notice, whose reason names a conflict (`the head conflicts with <base>`), the required checks that failed (`CI is red at <head>`), or the merge queue's failed merge and its failing run (`the merge queue took pull request #<n> out at READY's head …`); a worker's `request_backward_move` by a `phase-finished` from the role that asked, whose reason reaches only the task of the worker the move started, so ask that worker; your own send-back from `accepting` by the reason you gave. The message's `<n> rounds counted` has already left the conflict rounds out, so judge the cap by it. Conflict returns need nothing from you beyond the next round. Tester fails, requests for changes and CI-red returns (a `checks-red` notice is raised for CI only when a required check fails on code the branch pushed, or when the merge queue fails the merge) are the rounds the cap is for. Each `review_round_cap` notice is a decision you make in the turn it wakes, never one left for the next round to make: read what every counted round found, choose one of the three below, act on it in the same turn, and post it as a `dispatch comment` on the issue naming the rounds you read and the choice. **Narrow**: the change itself is sound but each round finds more around it; tell the implementer and the reviewer (`envoy_publish` to each one's role topic) which checks the next round answers, dropping no requirement; a correctness finding is still fixed in this pull request, and so is a wording nit or any clear fix in a file it touches, so the `Fast-follow:` line carries only cleanup in files it does not touch. **Split**: part of the work cannot settle in this pull request. It is a child only when it needs a repository or a deploy order of its own (`skill://legion-architect`, section 1), and then it goes through the red-team check in `skill://legion-architect/references/decomposition.md` and is filed as a child of this issue's parent, never of this one, since this issue closes at its own merge. A requirement moves only to that released child. Work in a repository this tree already has a pull request in is no child and is not parked in `backlog`: write it into the spec of the issue whose pull request carries it, the parent's, or a sibling's when the parent's pull request is in another repository. On the root, open a `dispatch ask` for the part that cannot settle here (`skill://legion-worker/references/findings.md`): it stays this issue's requirement, and this pull request carries it, until the person who answers that ask records that the issue will not deliver it. **Accept the rounds**: each round found less than the one before it, and the last found no defect in the change itself (a stale line, a comment that states an old default); let the loop run and say why in the comment. A later notice is a new decision: accept again only when its round found less than the round you last accepted, and otherwise narrow or split. A finding that changes what the spec requires or what a check proves is a decision block in the root spec ("After approval" in `skill://legion-architect/references/design-gate.md`), and `dispatch ask` is only for a decision that needs a human's authority; neither replaces the choice. Judge a worker's backward move by the reason that worker gives. A move you ordered for a conflict found before `awaiting_merge` ("A conflicting head" in `skill://legion-architect/references/acceptance.md`) is a conflict return. The merger's move back to `reviewing` for a READY refusal (`READY_UNREVIEWED_CHANGE`, or `READY_NOT_APPROVED` when its task names no approved head), and the reviewer's no-fix request for changes that follows it so the tester runs the head, are not the work going in circles either. A move that sends back code found wrong counts with the tester fails. |
|
|
31
31
|
| `pr-merged` | The pull request merged and the issue did not close; its `reason` says why. Merged before the issue reached `awaiting_merge`: the workflow runs on, and the merge closes the issue the moment it gets there, your acceptance and retro first. Merged while the rest of the tree still runs: the reason names the pull request and every issue the close waits for, and the root waits in `awaiting_merge`, its workers kept and live and no admission slot held, until the last of them is done or parked ("The close" in `skill://legion-architect/references/acceptance.md`). Either way you start nothing and no further notice follows. |
|
|
32
32
|
| `pr-closed-unmerged` | Decide from current scope whether the work is reopened, started over (`park_child` then `rerun_child`, for a child), or ended with a reason. Delegate the repository action to the responsible phase worker and keep ownership. |
|
|
33
33
|
| `pull-request-missing` | Its `reason` names the issue, the repository, the branch and the handoff commit: the issue's implementer completed at that commit and GitHub lists no open pull request on the branch, so the issue stays in `implementing`. Tell the implementer (`envoy_publish` to its role topic) to open the pull request from that branch; the daemon records it and moves the issue to `testing` once it is open. When the work should not go on, decide as the `pr-closed-unmerged` row says. It comes once per handoff commit. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: legion-controller
|
|
3
|
-
description: Use when you are a Legion project's controller session, on any controller wake (triage, slot-free, todo, tick, unslotted, awaiting-person, parked-decision, held, worker-died, worker-stalled, update-stalled), weekly-plan ranking, backlog stewardship, a clear defect or finding ask a role sends, an issue a person asks you to file, the daily report, an architect's escalation, or a person's message or mention.
|
|
3
|
+
description: Use when you are a Legion project's controller session, on any controller wake (triage, slot-free, todo, tick, unslotted, awaiting-person, parked-decision, held, worker-died, worker-stalled, update-stalled, provider-errors), weekly-plan ranking, backlog stewardship, a clear defect or finding ask a role sends, an issue a person asks you to file, the daily report, an architect's escalation, or a person's message or mention.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Legion Controller
|
|
@@ -75,6 +75,7 @@ Wake details: `skill://legion-controller/references/wakes.md`.
|
|
|
75
75
|
| `worker-died on <KEY>` (`role: "architect"`) | Re-admit once its cause is gone, else park it |
|
|
76
76
|
| `worker-stalled on <KEY>` (`role: "architect"`) | Nothing, unless the notice says the claim failed: its turn was ended, its task is still owed, and the notice says what became of its process |
|
|
77
77
|
| `update-stalled on <KEY>` | `skill://legion-controller/references/escalation.md#an-update-round-that-is-not-finishing-update-stalled` |
|
|
78
|
+
| `provider-errors on <KEY>` | Name the run and its model in the day's report; send it to the issue's architect; for one claim that stays stuck, `compact` first, and `fresh_session` only when it is still refused after that |
|
|
78
79
|
| An architect's escalation | `skill://legion-controller/references/escalation.md` |
|
|
79
80
|
| A finding ask's reference, or its answer | `skill://legion-controller/references/finding-asks.md` |
|
|
80
81
|
| A clear defect a role sends | `skill://legion-controller/references/finding-asks.md#hand-over-a-clear-defect` |
|
|
@@ -170,6 +170,36 @@ An update round over the issue's pod, or over one claim's own process, is not fi
|
|
|
170
170
|
it as `skill://legion-controller/references/escalation.md#an-update-round-that-is-not-finishing-update-stalled`
|
|
171
171
|
says.
|
|
172
172
|
|
|
173
|
+
## `provider-errors on <KEY>` (`{kind: "provider-errors", role, reason}`)
|
|
174
|
+
|
|
175
|
+
Six turns of `<KEY>`'s `role` in a row ended in an error the model's provider returned: a content
|
|
176
|
+
filter, a rate limit, an overload, or any other failure of the provider. `reason` names the model
|
|
177
|
+
and the HTTP status the provider answered, when it answered one, and carries no text the provider
|
|
178
|
+
wrote. Nothing is held and nothing is stopped: the daemon keeps the task, prompts the same session
|
|
179
|
+
with it again, and waits at most ten minutes between prompts for as long as the errors last. You
|
|
180
|
+
are told once, and again only once the run has gone back to zero, which it does three ways: at a
|
|
181
|
+
turn of that role that ends with no provider error, at a compaction of its session that ran (one
|
|
182
|
+
Oh My Pi refused or skipped resets nothing, since the session is as it was), and when the claim's
|
|
183
|
+
recorded session is forgotten, by `fresh_session` or an operator's `legion claims forget-session`.
|
|
184
|
+
A second notice after you compacted that claim is how you see that it is still refused.
|
|
185
|
+
|
|
186
|
+
Read the role's claim in `read_state`. Name the run and its model in the day's report. When the
|
|
187
|
+
reason names no status, the turns ended on nothing but a message, which is what a content filter
|
|
188
|
+
leaves: the session has already stepped down its model chain, so a run that long says the whole
|
|
189
|
+
chain refuses the same work. Either way, `envoy_publish` the key, the role and the reason to the
|
|
190
|
+
issue's architect, which is who can narrow the work. Re-admit nothing and park nothing, because
|
|
191
|
+
the task is not lost and the session still runs.
|
|
192
|
+
|
|
193
|
+
One claim that stays stuck after that is yours to act on, and `compact` is the first thing you
|
|
194
|
+
reach for: it has the daemon shorten that claim's Oh My Pi session to a text summary and send it
|
|
195
|
+
whatever task it owed again, and the claim keeps its session, its workspace and everything it
|
|
196
|
+
knows of its issue. The answer says whether the session was compacted and, when it was not, why;
|
|
197
|
+
the claim is back either way, and whatever task it owed has gone again. Use `fresh_session` only
|
|
198
|
+
when the claim is still refused after a compaction, because a new session loses everything the old
|
|
199
|
+
one held — what the worker learned of its issue, and what it had not yet pushed or written down —
|
|
200
|
+
and cures nothing in a provider outage, where the next session's turns are refused as the last
|
|
201
|
+
one's were.
|
|
202
|
+
|
|
173
203
|
## GitHub mentions
|
|
174
204
|
|
|
175
205
|
Read the mention and its artifact. Answer a mention that asks you for triage or for information
|
|
@@ -53,7 +53,8 @@ allows, and they read no check; `skill://legion-worker`, *Every role pushes its
|
|
|
53
53
|
gives them).
|
|
54
54
|
Under the Go daemon a check or workflow the base branch requires that settles red on the head,
|
|
55
55
|
before the completion or after it, sends the work back to `implementing` with the failing checks
|
|
56
|
-
named,
|
|
56
|
+
named, however many reds came before it.
|
|
57
|
+
The one CI result an implementer waits for is a re-run: when its task names a red that
|
|
57
58
|
failed on its own in a `pull_request` run, it re-runs the failed jobs once (`gh run rerun <run-id> --failed`) and completes once
|
|
58
59
|
the re-run settles green, woken by the pull request's checks event (`skill://envoy`, *Wait for
|
|
59
60
|
CI or a merge*: subscribe, then end the turn), never by a sleep loop.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjawhar/claude-envoy",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Claude Code plugin for Legion's Envoy bus",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"AGENTS.md"
|
|
20
20
|
],
|
|
21
21
|
"legion": {
|
|
22
|
-
"daemonApiVersion":
|
|
22
|
+
"daemonApiVersion": 59
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|