@h-rig/contracts 0.0.6-alpha.136 → 0.0.6-alpha.137
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/dist/index.cjs +318 -267
- package/dist/index.mjs +318 -267
- package/dist/src/config.d.ts +34 -22
- package/dist/src/config.js +33 -12
- package/dist/src/help-catalog.js +1 -1
- package/dist/src/index.js +318 -267
- package/dist/src/kernel.d.ts +5 -22
- package/dist/src/kernel.js +1 -16
- package/dist/src/plugin-hooks.js +33 -12
- package/dist/src/plugin.d.ts +97 -3
- package/dist/src/plugin.js +36 -12
- package/dist/src/run-journal.d.ts +166 -0
- package/dist/src/run-journal.js +252 -122
- package/dist/src/run-session-journal.d.ts +4 -0
- package/dist/src/run-session-journal.js +260 -124
- package/dist/src/run-timeline.js +246 -124
- package/dist/src/stage.d.ts +3 -3
- package/dist/src/stage.js +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1375,12 +1375,120 @@ var WorktreeSummary = Schema6.Struct({
|
|
|
1375
1375
|
cleanedAt: Schema6.NullOr(IsoDateTime)
|
|
1376
1376
|
});
|
|
1377
1377
|
// packages/contracts/src/run-journal.ts
|
|
1378
|
+
import { Schema as Schema8 } from "effect";
|
|
1379
|
+
|
|
1380
|
+
// packages/contracts/src/stage.ts
|
|
1378
1381
|
import { Schema as Schema7 } from "effect";
|
|
1379
|
-
var
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
+
var StageKind = Schema7.Literals(["transform", "gate", "observe"]);
|
|
1383
|
+
var StageId = TrimmedNonEmptyString.pipe(Schema7.brand("StageId"));
|
|
1384
|
+
var StageContext = Schema7.Struct({
|
|
1385
|
+
runId: RunId,
|
|
1386
|
+
taskId: Schema7.optional(Schema7.NullOr(TaskId)),
|
|
1387
|
+
state: Schema7.Unknown,
|
|
1388
|
+
metadata: Schema7.optional(Schema7.Record(Schema7.String, Schema7.Unknown))
|
|
1389
|
+
});
|
|
1390
|
+
var StageDescriptor = Schema7.Struct({
|
|
1391
|
+
id: StageId,
|
|
1392
|
+
kind: StageKind,
|
|
1393
|
+
before: Schema7.optional(Schema7.Array(StageId)),
|
|
1394
|
+
after: Schema7.optional(Schema7.Array(StageId)),
|
|
1395
|
+
priority: Schema7.Number.pipe(Schema7.withDecodingDefault(() => 0)),
|
|
1396
|
+
protected: Schema7.Boolean.pipe(Schema7.withDecodingDefault(() => false))
|
|
1397
|
+
});
|
|
1398
|
+
var Stage = StageDescriptor;
|
|
1399
|
+
var StageContinueResult = Schema7.Struct({
|
|
1400
|
+
kind: Schema7.Literal("continue"),
|
|
1401
|
+
ctx: StageContext
|
|
1402
|
+
});
|
|
1403
|
+
var StageAllowResult = Schema7.Struct({
|
|
1404
|
+
kind: Schema7.Literal("allow")
|
|
1405
|
+
});
|
|
1406
|
+
var StageBlockResult = Schema7.Struct({
|
|
1407
|
+
kind: Schema7.Literal("block"),
|
|
1408
|
+
reason: TrimmedNonEmptyString
|
|
1409
|
+
});
|
|
1410
|
+
var StageResult = Schema7.Union([
|
|
1411
|
+
StageContinueResult,
|
|
1412
|
+
StageAllowResult,
|
|
1413
|
+
StageBlockResult
|
|
1414
|
+
]);
|
|
1415
|
+
var StageWrapperDescriptor = Schema7.Struct({
|
|
1416
|
+
id: TrimmedNonEmptyString,
|
|
1417
|
+
priority: Schema7.Number.pipe(Schema7.withDecodingDefault(() => 0))
|
|
1418
|
+
});
|
|
1419
|
+
var StageMutationOp = Schema7.Literals(["insert", "remove", "replace", "wrap", "reorder"]);
|
|
1420
|
+
var InsertStageMutation = Schema7.Struct({
|
|
1421
|
+
op: Schema7.Literal("insert"),
|
|
1422
|
+
stage: StageDescriptor,
|
|
1423
|
+
contributedBy: Schema7.optional(TrimmedNonEmptyString)
|
|
1424
|
+
});
|
|
1425
|
+
var RemoveStageMutation = Schema7.Struct({
|
|
1426
|
+
op: Schema7.Literal("remove"),
|
|
1427
|
+
id: StageId,
|
|
1428
|
+
contributedBy: Schema7.optional(TrimmedNonEmptyString)
|
|
1429
|
+
});
|
|
1430
|
+
var ReplaceStageMutation = Schema7.Struct({
|
|
1431
|
+
op: Schema7.Literal("replace"),
|
|
1432
|
+
id: StageId,
|
|
1433
|
+
stage: StageDescriptor,
|
|
1434
|
+
contributedBy: Schema7.optional(TrimmedNonEmptyString)
|
|
1435
|
+
});
|
|
1436
|
+
var WrapStageMutation = Schema7.Struct({
|
|
1437
|
+
op: Schema7.Literal("wrap"),
|
|
1438
|
+
id: StageId,
|
|
1439
|
+
around: StageWrapperDescriptor,
|
|
1440
|
+
contributedBy: Schema7.optional(TrimmedNonEmptyString)
|
|
1441
|
+
});
|
|
1442
|
+
var ReorderStageMutation = Schema7.Struct({
|
|
1443
|
+
op: Schema7.Literal("reorder"),
|
|
1444
|
+
id: StageId,
|
|
1445
|
+
before: Schema7.optional(Schema7.Array(StageId)),
|
|
1446
|
+
after: Schema7.optional(Schema7.Array(StageId)),
|
|
1447
|
+
contributedBy: Schema7.optional(TrimmedNonEmptyString)
|
|
1448
|
+
});
|
|
1449
|
+
var StageMutation = Schema7.Union([
|
|
1450
|
+
InsertStageMutation,
|
|
1451
|
+
RemoveStageMutation,
|
|
1452
|
+
ReplaceStageMutation,
|
|
1453
|
+
WrapStageMutation,
|
|
1454
|
+
ReorderStageMutation
|
|
1455
|
+
]);
|
|
1456
|
+
var ResolutionGrantUse = Schema7.Struct({
|
|
1457
|
+
kind: Schema7.Literal("kernel-replacement"),
|
|
1458
|
+
target: TrimmedNonEmptyString,
|
|
1459
|
+
pluginId: TrimmedNonEmptyString
|
|
1382
1460
|
});
|
|
1383
|
-
var
|
|
1461
|
+
var ResolutionRecordEntry = Schema7.Struct({
|
|
1462
|
+
stageId: StageId,
|
|
1463
|
+
contributedBy: TrimmedNonEmptyString,
|
|
1464
|
+
removedBy: Schema7.optional(TrimmedNonEmptyString),
|
|
1465
|
+
replacedBy: Schema7.optional(TrimmedNonEmptyString),
|
|
1466
|
+
wrappedBy: Schema7.optional(Schema7.Array(TrimmedNonEmptyString)),
|
|
1467
|
+
droppedAnchors: Schema7.optional(Schema7.Array(StageId)),
|
|
1468
|
+
isProtected: Schema7.Boolean
|
|
1469
|
+
});
|
|
1470
|
+
var ResolvedPipeline = Schema7.Struct({
|
|
1471
|
+
runId: Schema7.optional(RunId),
|
|
1472
|
+
order: Schema7.Array(StageId),
|
|
1473
|
+
record: Schema7.Array(ResolutionRecordEntry),
|
|
1474
|
+
cycles: Schema7.Array(Schema7.Array(StageId)),
|
|
1475
|
+
grantUses: Schema7.optional(Schema7.Array(ResolutionGrantUse)),
|
|
1476
|
+
resolvedAt: Schema7.optional(IsoDateTime)
|
|
1477
|
+
});
|
|
1478
|
+
var ResolutionRecord = ResolvedPipeline;
|
|
1479
|
+
var StageRunOutcome = Schema7.Struct({
|
|
1480
|
+
stageId: StageId,
|
|
1481
|
+
result: StageResult,
|
|
1482
|
+
startedAt: IsoDateTime,
|
|
1483
|
+
finishedAt: IsoDateTime
|
|
1484
|
+
});
|
|
1485
|
+
|
|
1486
|
+
// packages/contracts/src/run-journal.ts
|
|
1487
|
+
var RunActor = Schema8.Struct({
|
|
1488
|
+
kind: Schema8.Literals(["operator", "agent", "server", "system"]),
|
|
1489
|
+
id: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString))
|
|
1490
|
+
});
|
|
1491
|
+
var RunCloseoutPhase = Schema8.Literals([
|
|
1384
1492
|
"queued",
|
|
1385
1493
|
"commit",
|
|
1386
1494
|
"push",
|
|
@@ -1390,102 +1498,102 @@ var RunCloseoutPhase = Schema7.Literals([
|
|
|
1390
1498
|
"close-source",
|
|
1391
1499
|
"completed"
|
|
1392
1500
|
]);
|
|
1393
|
-
var RunCloseoutPhaseOutcome =
|
|
1394
|
-
var RunCloseoutStatus =
|
|
1501
|
+
var RunCloseoutPhaseOutcome = Schema8.Literals(["started", "completed", "failed"]);
|
|
1502
|
+
var RunCloseoutStatus = Schema8.Literals([
|
|
1395
1503
|
"pending",
|
|
1396
1504
|
"running",
|
|
1397
1505
|
"completed",
|
|
1398
1506
|
"needs-attention",
|
|
1399
1507
|
"failed"
|
|
1400
1508
|
]);
|
|
1401
|
-
var RunCloseoutState =
|
|
1509
|
+
var RunCloseoutState = Schema8.Struct({
|
|
1402
1510
|
phase: RunCloseoutPhase,
|
|
1403
1511
|
status: RunCloseoutStatus,
|
|
1404
1512
|
updatedAt: IsoDateTime,
|
|
1405
|
-
taskId:
|
|
1406
|
-
runtimeWorkspace:
|
|
1407
|
-
branch:
|
|
1408
|
-
prUrl:
|
|
1409
|
-
artifactRoot:
|
|
1410
|
-
iterations:
|
|
1411
|
-
feedback:
|
|
1412
|
-
error:
|
|
1413
|
-
reason:
|
|
1414
|
-
merged:
|
|
1415
|
-
resumedAt:
|
|
1416
|
-
completedAt:
|
|
1417
|
-
});
|
|
1418
|
-
var ApprovalDecision =
|
|
1513
|
+
taskId: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1514
|
+
runtimeWorkspace: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1515
|
+
branch: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1516
|
+
prUrl: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1517
|
+
artifactRoot: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1518
|
+
iterations: Schema8.optional(Schema8.NullOr(Schema8.Int)),
|
|
1519
|
+
feedback: Schema8.optional(Schema8.Array(Schema8.String)),
|
|
1520
|
+
error: Schema8.optional(Schema8.NullOr(Schema8.String)),
|
|
1521
|
+
reason: Schema8.optional(Schema8.NullOr(Schema8.String)),
|
|
1522
|
+
merged: Schema8.optional(Schema8.Boolean),
|
|
1523
|
+
resumedAt: Schema8.optional(Schema8.NullOr(IsoDateTime)),
|
|
1524
|
+
completedAt: Schema8.optional(Schema8.NullOr(IsoDateTime))
|
|
1525
|
+
});
|
|
1526
|
+
var ApprovalDecision = Schema8.Literals(["approve", "reject"]);
|
|
1419
1527
|
var runRecordFields = {
|
|
1420
1528
|
runId: TrimmedNonEmptyString,
|
|
1421
1529
|
workspaceId: TrimmedNonEmptyString,
|
|
1422
|
-
taskId:
|
|
1423
|
-
threadId:
|
|
1424
|
-
mode:
|
|
1425
|
-
runtimeAdapter:
|
|
1530
|
+
taskId: Schema8.NullOr(TrimmedNonEmptyString),
|
|
1531
|
+
threadId: Schema8.NullOr(TrimmedNonEmptyString),
|
|
1532
|
+
mode: Schema8.Literals(["local", "remote"]),
|
|
1533
|
+
runtimeAdapter: Schema8.Literal("pi"),
|
|
1426
1534
|
createdAt: IsoDateTime,
|
|
1427
|
-
startedAt:
|
|
1428
|
-
completedAt:
|
|
1429
|
-
endpointId:
|
|
1430
|
-
hostId:
|
|
1431
|
-
worktreePath:
|
|
1432
|
-
artifactRoot:
|
|
1433
|
-
logRoot:
|
|
1434
|
-
sessionPath:
|
|
1435
|
-
sessionLogPath:
|
|
1436
|
-
pid:
|
|
1437
|
-
piSession:
|
|
1438
|
-
piSessionPrivate:
|
|
1535
|
+
startedAt: Schema8.NullOr(IsoDateTime),
|
|
1536
|
+
completedAt: Schema8.NullOr(IsoDateTime),
|
|
1537
|
+
endpointId: Schema8.NullOr(TrimmedNonEmptyString),
|
|
1538
|
+
hostId: Schema8.NullOr(TrimmedNonEmptyString),
|
|
1539
|
+
worktreePath: Schema8.NullOr(TrimmedNonEmptyString),
|
|
1540
|
+
artifactRoot: Schema8.NullOr(TrimmedNonEmptyString),
|
|
1541
|
+
logRoot: Schema8.NullOr(TrimmedNonEmptyString),
|
|
1542
|
+
sessionPath: Schema8.NullOr(TrimmedNonEmptyString),
|
|
1543
|
+
sessionLogPath: Schema8.NullOr(TrimmedNonEmptyString),
|
|
1544
|
+
pid: Schema8.optional(Schema8.NullOr(Schema8.Int)),
|
|
1545
|
+
piSession: Schema8.optional(Schema8.Unknown),
|
|
1546
|
+
piSessionPrivate: Schema8.optional(Schema8.Unknown),
|
|
1439
1547
|
updatedAt: IsoDateTime,
|
|
1440
1548
|
title: TrimmedNonEmptyString,
|
|
1441
|
-
projectRoot:
|
|
1442
|
-
errorText:
|
|
1443
|
-
latestMessageId:
|
|
1444
|
-
prUrl:
|
|
1445
|
-
leaseId:
|
|
1446
|
-
serverCloseout:
|
|
1447
|
-
model:
|
|
1448
|
-
runtimeMode:
|
|
1449
|
-
interactionMode:
|
|
1450
|
-
runMode:
|
|
1451
|
-
initialPrompt:
|
|
1452
|
-
baselineMode:
|
|
1453
|
-
prMode:
|
|
1454
|
-
initiatedBy:
|
|
1455
|
-
sourceTask:
|
|
1456
|
-
serverPid:
|
|
1457
|
-
latestSteeringAt:
|
|
1458
|
-
latestSteeringDeliveredAt:
|
|
1459
|
-
statusDetail:
|
|
1460
|
-
planning:
|
|
1461
|
-
branch:
|
|
1549
|
+
projectRoot: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1550
|
+
errorText: Schema8.optional(Schema8.NullOr(Schema8.String)),
|
|
1551
|
+
latestMessageId: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1552
|
+
prUrl: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1553
|
+
leaseId: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1554
|
+
serverCloseout: Schema8.optional(Schema8.NullOr(RunCloseoutState)),
|
|
1555
|
+
model: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1556
|
+
runtimeMode: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1557
|
+
interactionMode: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1558
|
+
runMode: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1559
|
+
initialPrompt: Schema8.optional(Schema8.NullOr(Schema8.String)),
|
|
1560
|
+
baselineMode: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1561
|
+
prMode: Schema8.optional(Schema8.NullOr(Schema8.Literals(["auto", "ask", "off"]))),
|
|
1562
|
+
initiatedBy: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1563
|
+
sourceTask: Schema8.optional(Schema8.Unknown),
|
|
1564
|
+
serverPid: Schema8.optional(Schema8.NullOr(Schema8.Int)),
|
|
1565
|
+
latestSteeringAt: Schema8.optional(Schema8.NullOr(IsoDateTime)),
|
|
1566
|
+
latestSteeringDeliveredAt: Schema8.optional(Schema8.NullOr(IsoDateTime)),
|
|
1567
|
+
statusDetail: Schema8.optional(Schema8.NullOr(Schema8.String)),
|
|
1568
|
+
planning: Schema8.optional(Schema8.Unknown),
|
|
1569
|
+
branch: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString))
|
|
1462
1570
|
};
|
|
1463
|
-
var RunJournalRecord =
|
|
1571
|
+
var RunJournalRecord = Schema8.Struct({
|
|
1464
1572
|
...runRecordFields,
|
|
1465
1573
|
status: RunStatus
|
|
1466
1574
|
});
|
|
1467
|
-
var RunRecordPatch =
|
|
1468
|
-
runId:
|
|
1469
|
-
workspaceId:
|
|
1470
|
-
taskId:
|
|
1471
|
-
threadId:
|
|
1472
|
-
mode:
|
|
1473
|
-
runtimeAdapter:
|
|
1474
|
-
createdAt:
|
|
1475
|
-
startedAt:
|
|
1476
|
-
completedAt:
|
|
1477
|
-
endpointId:
|
|
1478
|
-
hostId:
|
|
1479
|
-
worktreePath:
|
|
1480
|
-
artifactRoot:
|
|
1481
|
-
logRoot:
|
|
1482
|
-
sessionPath:
|
|
1483
|
-
sessionLogPath:
|
|
1575
|
+
var RunRecordPatch = Schema8.Struct({
|
|
1576
|
+
runId: Schema8.optional(runRecordFields.runId),
|
|
1577
|
+
workspaceId: Schema8.optional(runRecordFields.workspaceId),
|
|
1578
|
+
taskId: Schema8.optional(runRecordFields.taskId),
|
|
1579
|
+
threadId: Schema8.optional(runRecordFields.threadId),
|
|
1580
|
+
mode: Schema8.optional(runRecordFields.mode),
|
|
1581
|
+
runtimeAdapter: Schema8.optional(runRecordFields.runtimeAdapter),
|
|
1582
|
+
createdAt: Schema8.optional(runRecordFields.createdAt),
|
|
1583
|
+
startedAt: Schema8.optional(runRecordFields.startedAt),
|
|
1584
|
+
completedAt: Schema8.optional(runRecordFields.completedAt),
|
|
1585
|
+
endpointId: Schema8.optional(runRecordFields.endpointId),
|
|
1586
|
+
hostId: Schema8.optional(runRecordFields.hostId),
|
|
1587
|
+
worktreePath: Schema8.optional(runRecordFields.worktreePath),
|
|
1588
|
+
artifactRoot: Schema8.optional(runRecordFields.artifactRoot),
|
|
1589
|
+
logRoot: Schema8.optional(runRecordFields.logRoot),
|
|
1590
|
+
sessionPath: Schema8.optional(runRecordFields.sessionPath),
|
|
1591
|
+
sessionLogPath: Schema8.optional(runRecordFields.sessionLogPath),
|
|
1484
1592
|
pid: runRecordFields.pid,
|
|
1485
1593
|
piSession: runRecordFields.piSession,
|
|
1486
1594
|
piSessionPrivate: runRecordFields.piSessionPrivate,
|
|
1487
|
-
updatedAt:
|
|
1488
|
-
title:
|
|
1595
|
+
updatedAt: Schema8.optional(runRecordFields.updatedAt),
|
|
1596
|
+
title: Schema8.optional(runRecordFields.title),
|
|
1489
1597
|
projectRoot: runRecordFields.projectRoot,
|
|
1490
1598
|
errorText: runRecordFields.errorText,
|
|
1491
1599
|
latestMessageId: runRecordFields.latestMessageId,
|
|
@@ -1509,88 +1617,98 @@ var RunRecordPatch = Schema7.Struct({
|
|
|
1509
1617
|
branch: runRecordFields.branch
|
|
1510
1618
|
});
|
|
1511
1619
|
var journalEnvelopeFields = {
|
|
1512
|
-
v:
|
|
1620
|
+
v: Schema8.Literal(1),
|
|
1513
1621
|
seq: PositiveInt,
|
|
1514
1622
|
at: IsoDateTime,
|
|
1515
1623
|
runId: RunId
|
|
1516
1624
|
};
|
|
1517
|
-
var RunStatusChangedEvent =
|
|
1625
|
+
var RunStatusChangedEvent = Schema8.Struct({
|
|
1518
1626
|
...journalEnvelopeFields,
|
|
1519
|
-
type:
|
|
1520
|
-
from:
|
|
1627
|
+
type: Schema8.Literal("status-changed"),
|
|
1628
|
+
from: Schema8.NullOr(RunStatus),
|
|
1521
1629
|
to: RunStatus,
|
|
1522
|
-
reason:
|
|
1523
|
-
actor:
|
|
1630
|
+
reason: Schema8.optional(Schema8.NullOr(Schema8.String)),
|
|
1631
|
+
actor: Schema8.optional(RunActor)
|
|
1524
1632
|
});
|
|
1525
|
-
var RunRecordPatchEvent =
|
|
1633
|
+
var RunRecordPatchEvent = Schema8.Struct({
|
|
1526
1634
|
...journalEnvelopeFields,
|
|
1527
|
-
type:
|
|
1635
|
+
type: Schema8.Literal("record-patch"),
|
|
1528
1636
|
patch: RunRecordPatch
|
|
1529
1637
|
});
|
|
1530
|
-
var RunTimelineEntryEvent =
|
|
1638
|
+
var RunTimelineEntryEvent = Schema8.Struct({
|
|
1531
1639
|
...journalEnvelopeFields,
|
|
1532
|
-
type:
|
|
1533
|
-
payload:
|
|
1640
|
+
type: Schema8.Literal("timeline-entry"),
|
|
1641
|
+
payload: Schema8.Unknown
|
|
1534
1642
|
});
|
|
1535
|
-
var RunLogEntryEvent =
|
|
1643
|
+
var RunLogEntryEvent = Schema8.Struct({
|
|
1536
1644
|
...journalEnvelopeFields,
|
|
1537
|
-
type:
|
|
1538
|
-
payload:
|
|
1645
|
+
type: Schema8.Literal("log-entry"),
|
|
1646
|
+
payload: Schema8.Unknown
|
|
1539
1647
|
});
|
|
1540
|
-
var RunApprovalRequestedEvent =
|
|
1648
|
+
var RunApprovalRequestedEvent = Schema8.Struct({
|
|
1541
1649
|
...journalEnvelopeFields,
|
|
1542
|
-
type:
|
|
1650
|
+
type: Schema8.Literal("approval-requested"),
|
|
1543
1651
|
requestId: TrimmedNonEmptyString,
|
|
1544
1652
|
requestKind: TrimmedNonEmptyString,
|
|
1545
|
-
actionId:
|
|
1546
|
-
payload:
|
|
1653
|
+
actionId: Schema8.optional(Schema8.NullOr(TrimmedNonEmptyString)),
|
|
1654
|
+
payload: Schema8.Unknown
|
|
1547
1655
|
});
|
|
1548
|
-
var RunApprovalResolvedEvent =
|
|
1656
|
+
var RunApprovalResolvedEvent = Schema8.Struct({
|
|
1549
1657
|
...journalEnvelopeFields,
|
|
1550
|
-
type:
|
|
1658
|
+
type: Schema8.Literal("approval-resolved"),
|
|
1551
1659
|
requestId: TrimmedNonEmptyString,
|
|
1552
1660
|
decision: ApprovalDecision,
|
|
1553
|
-
note:
|
|
1661
|
+
note: Schema8.optional(Schema8.NullOr(Schema8.String)),
|
|
1554
1662
|
actor: RunActor
|
|
1555
1663
|
});
|
|
1556
|
-
var RunInputRequestedEvent =
|
|
1664
|
+
var RunInputRequestedEvent = Schema8.Struct({
|
|
1557
1665
|
...journalEnvelopeFields,
|
|
1558
|
-
type:
|
|
1666
|
+
type: Schema8.Literal("input-requested"),
|
|
1559
1667
|
requestId: TrimmedNonEmptyString,
|
|
1560
|
-
payload:
|
|
1668
|
+
payload: Schema8.Unknown
|
|
1561
1669
|
});
|
|
1562
|
-
var RunInputResolvedEvent =
|
|
1670
|
+
var RunInputResolvedEvent = Schema8.Struct({
|
|
1563
1671
|
...journalEnvelopeFields,
|
|
1564
|
-
type:
|
|
1672
|
+
type: Schema8.Literal("input-resolved"),
|
|
1565
1673
|
requestId: TrimmedNonEmptyString,
|
|
1566
|
-
answers:
|
|
1674
|
+
answers: Schema8.Record(Schema8.String, Schema8.String),
|
|
1567
1675
|
actor: RunActor
|
|
1568
1676
|
});
|
|
1569
|
-
var RunSteeringEvent =
|
|
1677
|
+
var RunSteeringEvent = Schema8.Struct({
|
|
1570
1678
|
...journalEnvelopeFields,
|
|
1571
|
-
type:
|
|
1679
|
+
type: Schema8.Literal("steering"),
|
|
1572
1680
|
actor: RunActor,
|
|
1573
|
-
text:
|
|
1681
|
+
text: Schema8.String
|
|
1574
1682
|
});
|
|
1575
|
-
var RunAdoptedEvent =
|
|
1683
|
+
var RunAdoptedEvent = Schema8.Struct({
|
|
1576
1684
|
...journalEnvelopeFields,
|
|
1577
|
-
type:
|
|
1578
|
-
pid:
|
|
1579
|
-
serverPid:
|
|
1685
|
+
type: Schema8.Literal("adopted"),
|
|
1686
|
+
pid: Schema8.NullOr(Schema8.Int),
|
|
1687
|
+
serverPid: Schema8.Int
|
|
1580
1688
|
});
|
|
1581
|
-
var RunStallDetectedEvent =
|
|
1689
|
+
var RunStallDetectedEvent = Schema8.Struct({
|
|
1582
1690
|
...journalEnvelopeFields,
|
|
1583
|
-
type:
|
|
1584
|
-
detail:
|
|
1691
|
+
type: Schema8.Literal("stall-detected"),
|
|
1692
|
+
detail: Schema8.String
|
|
1585
1693
|
});
|
|
1586
|
-
var RunCloseoutPhaseEvent =
|
|
1694
|
+
var RunCloseoutPhaseEvent = Schema8.Struct({
|
|
1587
1695
|
...journalEnvelopeFields,
|
|
1588
|
-
type:
|
|
1696
|
+
type: Schema8.Literal("closeout-phase"),
|
|
1589
1697
|
phase: RunCloseoutPhase,
|
|
1590
1698
|
outcome: RunCloseoutPhaseOutcome,
|
|
1591
|
-
detail:
|
|
1699
|
+
detail: Schema8.optional(Schema8.NullOr(Schema8.String))
|
|
1700
|
+
});
|
|
1701
|
+
var RunPipelineResolvedEvent = Schema8.Struct({
|
|
1702
|
+
...journalEnvelopeFields,
|
|
1703
|
+
type: Schema8.Literal("pipeline-resolved"),
|
|
1704
|
+
pipeline: ResolvedPipeline
|
|
1592
1705
|
});
|
|
1593
|
-
var
|
|
1706
|
+
var RunStageOutcomeEvent = Schema8.Struct({
|
|
1707
|
+
...journalEnvelopeFields,
|
|
1708
|
+
type: Schema8.Literal("stage-outcome"),
|
|
1709
|
+
outcome: StageRunOutcome
|
|
1710
|
+
});
|
|
1711
|
+
var RunJournalEvent = Schema8.Union([
|
|
1594
1712
|
RunStatusChangedEvent,
|
|
1595
1713
|
RunRecordPatchEvent,
|
|
1596
1714
|
RunTimelineEntryEvent,
|
|
@@ -1602,9 +1720,11 @@ var RunJournalEvent = Schema7.Union([
|
|
|
1602
1720
|
RunSteeringEvent,
|
|
1603
1721
|
RunAdoptedEvent,
|
|
1604
1722
|
RunStallDetectedEvent,
|
|
1605
|
-
RunCloseoutPhaseEvent
|
|
1723
|
+
RunCloseoutPhaseEvent,
|
|
1724
|
+
RunPipelineResolvedEvent,
|
|
1725
|
+
RunStageOutcomeEvent
|
|
1606
1726
|
]);
|
|
1607
|
-
var decodeRunJournalEvent =
|
|
1727
|
+
var decodeRunJournalEvent = Schema8.decodeUnknownSync(RunJournalEvent);
|
|
1608
1728
|
var RUN_STATUS_TRANSITIONS = {
|
|
1609
1729
|
created: ["queued", "preparing", "running", "failed", "stopped"],
|
|
1610
1730
|
queued: ["preparing", "running", "failed", "stopped"],
|
|
@@ -1662,6 +1782,8 @@ function reduceRunJournal(events, runId = null) {
|
|
|
1662
1782
|
const pendingUserInputs = new Map;
|
|
1663
1783
|
const resolvedUserInputs = [];
|
|
1664
1784
|
const closeoutPhases = [];
|
|
1785
|
+
let resolvedPipeline = null;
|
|
1786
|
+
const stageOutcomes = [];
|
|
1665
1787
|
const anomalies = [];
|
|
1666
1788
|
let steeringCount = 0;
|
|
1667
1789
|
let stallCount = 0;
|
|
@@ -1795,6 +1917,14 @@ function reduceRunJournal(events, runId = null) {
|
|
|
1795
1917
|
});
|
|
1796
1918
|
break;
|
|
1797
1919
|
}
|
|
1920
|
+
case "pipeline-resolved": {
|
|
1921
|
+
resolvedPipeline = event.pipeline;
|
|
1922
|
+
break;
|
|
1923
|
+
}
|
|
1924
|
+
case "stage-outcome": {
|
|
1925
|
+
stageOutcomes.push({ seq: event.seq, at: event.at, outcome: event.outcome });
|
|
1926
|
+
break;
|
|
1927
|
+
}
|
|
1798
1928
|
case "timeline-entry":
|
|
1799
1929
|
case "log-entry":
|
|
1800
1930
|
break;
|
|
@@ -1812,6 +1942,8 @@ function reduceRunJournal(events, runId = null) {
|
|
|
1812
1942
|
steeringCount,
|
|
1813
1943
|
stallCount,
|
|
1814
1944
|
closeoutPhases,
|
|
1945
|
+
resolvedPipeline,
|
|
1946
|
+
stageOutcomes,
|
|
1815
1947
|
lastSeq,
|
|
1816
1948
|
lastEventAt,
|
|
1817
1949
|
anomalies
|
|
@@ -1830,6 +1962,8 @@ var RIG_RUN_STEERING = "rig.run.steering";
|
|
|
1830
1962
|
var RIG_RUN_ADOPTED = "rig.run.adopted";
|
|
1831
1963
|
var RIG_RUN_STALL_DETECTED = "rig.run.stall-detected";
|
|
1832
1964
|
var RIG_RUN_CLOSEOUT_PHASE = "rig.run.closeout-phase";
|
|
1965
|
+
var RIG_RUN_PIPELINE_RESOLVED = "rig.run.pipeline-resolved";
|
|
1966
|
+
var RIG_RUN_STAGE_OUTCOME = "rig.run.stage-outcome";
|
|
1833
1967
|
var RIG_STOP_SENTINEL = "<<RIG_STOP";
|
|
1834
1968
|
var RIG_STOP_SENTINEL_END = ">>";
|
|
1835
1969
|
function buildStopSentinel(runId, reason, requestedBy = "rig") {
|
|
@@ -1946,7 +2080,9 @@ var CUSTOM_TYPE_FOR = {
|
|
|
1946
2080
|
steering: RIG_RUN_STEERING,
|
|
1947
2081
|
adopted: RIG_RUN_ADOPTED,
|
|
1948
2082
|
"stall-detected": RIG_RUN_STALL_DETECTED,
|
|
1949
|
-
"closeout-phase": RIG_RUN_CLOSEOUT_PHASE
|
|
2083
|
+
"closeout-phase": RIG_RUN_CLOSEOUT_PHASE,
|
|
2084
|
+
"pipeline-resolved": RIG_RUN_PIPELINE_RESOLVED,
|
|
2085
|
+
"stage-outcome": RIG_RUN_STAGE_OUTCOME
|
|
1950
2086
|
};
|
|
1951
2087
|
var TYPE_FOR_CUSTOM = {
|
|
1952
2088
|
[RIG_RUN_STATUS_CHANGED]: "status-changed",
|
|
@@ -1960,7 +2096,9 @@ var TYPE_FOR_CUSTOM = {
|
|
|
1960
2096
|
[RIG_RUN_STEERING]: "steering",
|
|
1961
2097
|
[RIG_RUN_ADOPTED]: "adopted",
|
|
1962
2098
|
[RIG_RUN_STALL_DETECTED]: "stall-detected",
|
|
1963
|
-
[RIG_RUN_CLOSEOUT_PHASE]: "closeout-phase"
|
|
2099
|
+
[RIG_RUN_CLOSEOUT_PHASE]: "closeout-phase",
|
|
2100
|
+
[RIG_RUN_PIPELINE_RESOLVED]: "pipeline-resolved",
|
|
2101
|
+
[RIG_RUN_STAGE_OUTCOME]: "stage-outcome"
|
|
1964
2102
|
};
|
|
1965
2103
|
function isRunSessionCustomType(customType) {
|
|
1966
2104
|
return customType !== undefined && Object.hasOwn(TYPE_FOR_CUSTOM, customType);
|
|
@@ -2412,52 +2550,52 @@ function isOperatorActiveRunStatus(status) {
|
|
|
2412
2550
|
return !OPERATOR_INACTIVE_RUN_STATUSES.has(normalized);
|
|
2413
2551
|
}
|
|
2414
2552
|
// packages/contracts/src/conversation.ts
|
|
2415
|
-
import { Schema as
|
|
2416
|
-
var EngineMessageRole =
|
|
2417
|
-
var EngineMessageState =
|
|
2553
|
+
import { Schema as Schema9 } from "effect";
|
|
2554
|
+
var EngineMessageRole = Schema9.Literals(["user", "assistant", "system"]);
|
|
2555
|
+
var EngineMessageState = Schema9.Literals([
|
|
2418
2556
|
"streaming",
|
|
2419
2557
|
"completed",
|
|
2420
2558
|
"interrupted",
|
|
2421
2559
|
"errored"
|
|
2422
2560
|
]);
|
|
2423
|
-
var ConversationSummary =
|
|
2561
|
+
var ConversationSummary = Schema9.Struct({
|
|
2424
2562
|
id: ConversationId,
|
|
2425
2563
|
runId: RunId,
|
|
2426
2564
|
title: TrimmedNonEmptyString,
|
|
2427
2565
|
createdAt: IsoDateTime,
|
|
2428
2566
|
updatedAt: IsoDateTime
|
|
2429
2567
|
});
|
|
2430
|
-
var EngineMessage =
|
|
2568
|
+
var EngineMessage = Schema9.Struct({
|
|
2431
2569
|
id: MessageId,
|
|
2432
2570
|
conversationId: ConversationId,
|
|
2433
2571
|
role: EngineMessageRole,
|
|
2434
|
-
text:
|
|
2435
|
-
attachments:
|
|
2572
|
+
text: Schema9.String,
|
|
2573
|
+
attachments: Schema9.Array(Schema9.Unknown),
|
|
2436
2574
|
state: EngineMessageState,
|
|
2437
2575
|
createdAt: IsoDateTime,
|
|
2438
|
-
completedAt:
|
|
2576
|
+
completedAt: Schema9.NullOr(IsoDateTime)
|
|
2439
2577
|
});
|
|
2440
|
-
var EngineAction =
|
|
2578
|
+
var EngineAction = Schema9.Struct({
|
|
2441
2579
|
id: ActionId,
|
|
2442
2580
|
runId: RunId,
|
|
2443
|
-
messageId:
|
|
2581
|
+
messageId: Schema9.NullOr(MessageId),
|
|
2444
2582
|
actionType: TrimmedNonEmptyString,
|
|
2445
2583
|
title: TrimmedNonEmptyString,
|
|
2446
|
-
detail:
|
|
2584
|
+
detail: Schema9.NullOr(Schema9.String),
|
|
2447
2585
|
state: TrimmedNonEmptyString,
|
|
2448
|
-
payload:
|
|
2586
|
+
payload: Schema9.Unknown,
|
|
2449
2587
|
startedAt: IsoDateTime,
|
|
2450
|
-
completedAt:
|
|
2588
|
+
completedAt: Schema9.NullOr(IsoDateTime)
|
|
2451
2589
|
});
|
|
2452
|
-
var EngineLogTone =
|
|
2453
|
-
var EngineRunLog =
|
|
2590
|
+
var EngineLogTone = Schema9.Literals(["thinking", "tool", "info", "error"]);
|
|
2591
|
+
var EngineRunLog = Schema9.Struct({
|
|
2454
2592
|
id: TrimmedNonEmptyString,
|
|
2455
2593
|
runId: RunId,
|
|
2456
2594
|
title: TrimmedNonEmptyString,
|
|
2457
|
-
detail:
|
|
2595
|
+
detail: Schema9.NullOr(Schema9.String),
|
|
2458
2596
|
tone: EngineLogTone,
|
|
2459
|
-
status:
|
|
2460
|
-
payload:
|
|
2597
|
+
status: Schema9.NullOr(TrimmedNonEmptyString),
|
|
2598
|
+
payload: Schema9.Unknown,
|
|
2461
2599
|
createdAt: IsoDateTime
|
|
2462
2600
|
});
|
|
2463
2601
|
// packages/contracts/src/plugin.ts
|
|
@@ -2465,114 +2603,6 @@ import { Schema as Schema11 } from "effect";
|
|
|
2465
2603
|
|
|
2466
2604
|
// packages/contracts/src/kernel.ts
|
|
2467
2605
|
import { Schema as Schema10 } from "effect";
|
|
2468
|
-
|
|
2469
|
-
// packages/contracts/src/stage.ts
|
|
2470
|
-
import { Schema as Schema9 } from "effect";
|
|
2471
|
-
var StageKind = Schema9.Literals(["transform", "gate", "observe"]);
|
|
2472
|
-
var StageId = TrimmedNonEmptyString.pipe(Schema9.brand("StageId"));
|
|
2473
|
-
var StageContext = Schema9.Struct({
|
|
2474
|
-
runId: RunId,
|
|
2475
|
-
taskId: Schema9.optional(Schema9.NullOr(TaskId)),
|
|
2476
|
-
state: Schema9.Unknown,
|
|
2477
|
-
metadata: Schema9.optional(Schema9.Record(Schema9.String, Schema9.Unknown))
|
|
2478
|
-
});
|
|
2479
|
-
var StageDescriptor = Schema9.Struct({
|
|
2480
|
-
id: StageId,
|
|
2481
|
-
kind: StageKind,
|
|
2482
|
-
before: Schema9.optional(Schema9.Array(StageId)),
|
|
2483
|
-
after: Schema9.optional(Schema9.Array(StageId)),
|
|
2484
|
-
priority: Schema9.Number.pipe(Schema9.withDecodingDefault(() => 0)),
|
|
2485
|
-
protected: Schema9.Boolean.pipe(Schema9.withDecodingDefault(() => false))
|
|
2486
|
-
});
|
|
2487
|
-
var Stage = StageDescriptor;
|
|
2488
|
-
var StageContinueResult = Schema9.Struct({
|
|
2489
|
-
kind: Schema9.Literal("continue"),
|
|
2490
|
-
ctx: StageContext
|
|
2491
|
-
});
|
|
2492
|
-
var StageAllowResult = Schema9.Struct({
|
|
2493
|
-
kind: Schema9.Literal("allow")
|
|
2494
|
-
});
|
|
2495
|
-
var StageBlockResult = Schema9.Struct({
|
|
2496
|
-
kind: Schema9.Literal("block"),
|
|
2497
|
-
reason: TrimmedNonEmptyString
|
|
2498
|
-
});
|
|
2499
|
-
var StageResult = Schema9.Union([
|
|
2500
|
-
StageContinueResult,
|
|
2501
|
-
StageAllowResult,
|
|
2502
|
-
StageBlockResult
|
|
2503
|
-
]);
|
|
2504
|
-
var StageWrapperDescriptor = Schema9.Struct({
|
|
2505
|
-
id: TrimmedNonEmptyString,
|
|
2506
|
-
priority: Schema9.Number.pipe(Schema9.withDecodingDefault(() => 0))
|
|
2507
|
-
});
|
|
2508
|
-
var StageMutationOp = Schema9.Literals(["insert", "remove", "replace", "wrap", "reorder"]);
|
|
2509
|
-
var InsertStageMutation = Schema9.Struct({
|
|
2510
|
-
op: Schema9.Literal("insert"),
|
|
2511
|
-
stage: StageDescriptor,
|
|
2512
|
-
contributedBy: Schema9.optional(TrimmedNonEmptyString)
|
|
2513
|
-
});
|
|
2514
|
-
var RemoveStageMutation = Schema9.Struct({
|
|
2515
|
-
op: Schema9.Literal("remove"),
|
|
2516
|
-
id: StageId,
|
|
2517
|
-
contributedBy: Schema9.optional(TrimmedNonEmptyString)
|
|
2518
|
-
});
|
|
2519
|
-
var ReplaceStageMutation = Schema9.Struct({
|
|
2520
|
-
op: Schema9.Literal("replace"),
|
|
2521
|
-
id: StageId,
|
|
2522
|
-
stage: StageDescriptor,
|
|
2523
|
-
contributedBy: Schema9.optional(TrimmedNonEmptyString)
|
|
2524
|
-
});
|
|
2525
|
-
var WrapStageMutation = Schema9.Struct({
|
|
2526
|
-
op: Schema9.Literal("wrap"),
|
|
2527
|
-
id: StageId,
|
|
2528
|
-
around: StageWrapperDescriptor,
|
|
2529
|
-
contributedBy: Schema9.optional(TrimmedNonEmptyString)
|
|
2530
|
-
});
|
|
2531
|
-
var ReorderStageMutation = Schema9.Struct({
|
|
2532
|
-
op: Schema9.Literal("reorder"),
|
|
2533
|
-
id: StageId,
|
|
2534
|
-
before: Schema9.optional(Schema9.Array(StageId)),
|
|
2535
|
-
after: Schema9.optional(Schema9.Array(StageId)),
|
|
2536
|
-
contributedBy: Schema9.optional(TrimmedNonEmptyString)
|
|
2537
|
-
});
|
|
2538
|
-
var StageMutation = Schema9.Union([
|
|
2539
|
-
InsertStageMutation,
|
|
2540
|
-
RemoveStageMutation,
|
|
2541
|
-
ReplaceStageMutation,
|
|
2542
|
-
WrapStageMutation,
|
|
2543
|
-
ReorderStageMutation
|
|
2544
|
-
]);
|
|
2545
|
-
var ResolutionGrantUse = Schema9.Struct({
|
|
2546
|
-
kind: Schema9.Literals(["protected-stage", "kernel-replacement"]),
|
|
2547
|
-
target: TrimmedNonEmptyString,
|
|
2548
|
-
pluginId: TrimmedNonEmptyString
|
|
2549
|
-
});
|
|
2550
|
-
var ResolutionRecordEntry = Schema9.Struct({
|
|
2551
|
-
stageId: StageId,
|
|
2552
|
-
contributedBy: TrimmedNonEmptyString,
|
|
2553
|
-
removedBy: Schema9.optional(TrimmedNonEmptyString),
|
|
2554
|
-
replacedBy: Schema9.optional(TrimmedNonEmptyString),
|
|
2555
|
-
wrappedBy: Schema9.optional(Schema9.Array(TrimmedNonEmptyString)),
|
|
2556
|
-
droppedAnchors: Schema9.optional(Schema9.Array(StageId)),
|
|
2557
|
-
isProtected: Schema9.Boolean
|
|
2558
|
-
});
|
|
2559
|
-
var ResolvedPipeline = Schema9.Struct({
|
|
2560
|
-
runId: Schema9.optional(RunId),
|
|
2561
|
-
order: Schema9.Array(StageId),
|
|
2562
|
-
record: Schema9.Array(ResolutionRecordEntry),
|
|
2563
|
-
cycles: Schema9.Array(Schema9.Array(StageId)),
|
|
2564
|
-
grantUses: Schema9.optional(Schema9.Array(ResolutionGrantUse)),
|
|
2565
|
-
resolvedAt: Schema9.optional(IsoDateTime)
|
|
2566
|
-
});
|
|
2567
|
-
var ResolutionRecord = ResolvedPipeline;
|
|
2568
|
-
var StageRunOutcome = Schema9.Struct({
|
|
2569
|
-
stageId: StageId,
|
|
2570
|
-
result: StageResult,
|
|
2571
|
-
startedAt: IsoDateTime,
|
|
2572
|
-
finishedAt: IsoDateTime
|
|
2573
|
-
});
|
|
2574
|
-
|
|
2575
|
-
// packages/contracts/src/kernel.ts
|
|
2576
2606
|
var CapabilityTag = Schema10.Literals([
|
|
2577
2607
|
"kernel",
|
|
2578
2608
|
"journal",
|
|
@@ -2605,13 +2635,6 @@ var LoadedPluginDescriptor = Schema10.Struct({
|
|
|
2605
2635
|
contributes: Schema10.Unknown,
|
|
2606
2636
|
runtime: Schema10.Unknown
|
|
2607
2637
|
});
|
|
2608
|
-
var ProtectedStageGrant = Schema10.Struct({
|
|
2609
|
-
stageId: TrimmedNonEmptyString,
|
|
2610
|
-
pluginId: TrimmedNonEmptyString,
|
|
2611
|
-
operations: Schema10.Array(Schema10.Literals(["remove", "replace"])),
|
|
2612
|
-
grantedBy: Schema10.optional(TrimmedNonEmptyString),
|
|
2613
|
-
reason: Schema10.optional(Schema10.String)
|
|
2614
|
-
});
|
|
2615
2638
|
var KernelReplacementGrant = Schema10.Struct({
|
|
2616
2639
|
pluginId: TrimmedNonEmptyString,
|
|
2617
2640
|
grantedBy: Schema10.optional(TrimmedNonEmptyString),
|
|
@@ -2619,14 +2642,12 @@ var KernelReplacementGrant = Schema10.Struct({
|
|
|
2619
2642
|
});
|
|
2620
2643
|
var CapabilityGrants = Schema10.Struct({
|
|
2621
2644
|
capabilityPrecedence: Schema10.optional(Schema10.Record(Schema10.String, Schema10.Array(TrimmedNonEmptyString))),
|
|
2622
|
-
protectedStageGrants: Schema10.optional(Schema10.Array(ProtectedStageGrant)),
|
|
2623
2645
|
kernelReplacementGrants: Schema10.optional(Schema10.Array(KernelReplacementGrant))
|
|
2624
2646
|
});
|
|
2625
2647
|
var KernelBootErrorCode = Schema10.Literals([
|
|
2626
2648
|
"BootIncoherent",
|
|
2627
2649
|
"AmbiguousCapability",
|
|
2628
2650
|
"MissingCapability",
|
|
2629
|
-
"ProtectedStageViolation",
|
|
2630
2651
|
"KernelReplacementDenied",
|
|
2631
2652
|
"PipelineUnresolvable"
|
|
2632
2653
|
]);
|
|
@@ -2650,10 +2671,6 @@ class MissingCapability extends Error {
|
|
|
2650
2671
|
code = "MissingCapability";
|
|
2651
2672
|
}
|
|
2652
2673
|
|
|
2653
|
-
class ProtectedStageViolation extends Error {
|
|
2654
|
-
code = "ProtectedStageViolation";
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
2674
|
class KernelReplacementDenied extends Error {
|
|
2658
2675
|
code = "KernelReplacementDenied";
|
|
2659
2676
|
}
|
|
@@ -2755,9 +2772,34 @@ var TaskSourceRegistration = Schema11.Struct({
|
|
|
2755
2772
|
});
|
|
2756
2773
|
var CliCommandRegistration = Schema11.Struct({
|
|
2757
2774
|
id: Schema11.String,
|
|
2758
|
-
|
|
2775
|
+
family: Schema11.optional(Schema11.String),
|
|
2776
|
+
command: Schema11.optional(Schema11.String),
|
|
2777
|
+
description: Schema11.optional(Schema11.String),
|
|
2778
|
+
usage: Schema11.optional(Schema11.String),
|
|
2779
|
+
aliases: Schema11.optional(Schema11.Array(Schema11.String)),
|
|
2780
|
+
projectRequired: Schema11.optional(Schema11.Boolean)
|
|
2781
|
+
});
|
|
2782
|
+
var ProductCapabilityRegistration = Schema11.Struct({
|
|
2783
|
+
id: Schema11.String,
|
|
2784
|
+
title: Schema11.String,
|
|
2785
|
+
description: Schema11.optional(Schema11.String),
|
|
2786
|
+
commandId: Schema11.optional(Schema11.String),
|
|
2787
|
+
panelId: Schema11.optional(Schema11.String)
|
|
2788
|
+
});
|
|
2789
|
+
var PanelRegistration = Schema11.Struct({
|
|
2790
|
+
id: Schema11.String,
|
|
2791
|
+
slot: Schema11.String,
|
|
2792
|
+
title: Schema11.String,
|
|
2793
|
+
capabilityId: Schema11.optional(Schema11.String),
|
|
2794
|
+
badge: Schema11.optional(Schema11.String),
|
|
2795
|
+
disabled: Schema11.optional(Schema11.Boolean),
|
|
2759
2796
|
description: Schema11.optional(Schema11.String)
|
|
2760
2797
|
});
|
|
2798
|
+
var BlockerClassifierRegistration = Schema11.Struct({
|
|
2799
|
+
id: Schema11.String,
|
|
2800
|
+
description: Schema11.optional(Schema11.String),
|
|
2801
|
+
priority: Schema11.optional(Schema11.Number)
|
|
2802
|
+
});
|
|
2761
2803
|
var PluginContributes = Schema11.Struct({
|
|
2762
2804
|
validators: Schema11.optional(Schema11.Array(ValidatorRegistration)),
|
|
2763
2805
|
hooks: Schema11.optional(Schema11.Array(HookRegistration)),
|
|
@@ -2767,7 +2809,11 @@ var PluginContributes = Schema11.Struct({
|
|
|
2767
2809
|
taskFieldSchemas: Schema11.optional(Schema11.Array(TaskFieldExtension)),
|
|
2768
2810
|
taskSources: Schema11.optional(Schema11.Array(TaskSourceRegistration)),
|
|
2769
2811
|
cliCommands: Schema11.optional(Schema11.Array(CliCommandRegistration)),
|
|
2770
|
-
|
|
2812
|
+
stages: Schema11.optional(Schema11.Array(Stage)),
|
|
2813
|
+
stageMutations: Schema11.optional(Schema11.Array(StageMutation)),
|
|
2814
|
+
capabilities: Schema11.optional(Schema11.Array(ProductCapabilityRegistration)),
|
|
2815
|
+
panels: Schema11.optional(Schema11.Array(PanelRegistration)),
|
|
2816
|
+
blockerClassifiers: Schema11.optional(Schema11.Array(BlockerClassifierRegistration))
|
|
2771
2817
|
});
|
|
2772
2818
|
var RigPlugin = Schema11.Struct({
|
|
2773
2819
|
name: Schema11.String,
|
|
@@ -6289,7 +6335,7 @@ var PRIMARY_GROUPS = [
|
|
|
6289
6335
|
name: "pipeline",
|
|
6290
6336
|
summary: "Default lifecycle pipeline inspection.",
|
|
6291
6337
|
usage: ["rig pipeline show [--json]"],
|
|
6292
|
-
commands: [{ command: "show [--json]", description: "Show resolved default lifecycle stages,
|
|
6338
|
+
commands: [{ command: "show [--json]", description: "Show resolved default lifecycle stages, mutation annotations, dropped anchors, and cycles.", primary: true }],
|
|
6293
6339
|
examples: ["rig pipeline show", "rig pipeline show --json"]
|
|
6294
6340
|
},
|
|
6295
6341
|
{
|
|
@@ -6935,6 +6981,7 @@ export {
|
|
|
6935
6981
|
RunStatusChangedEvent,
|
|
6936
6982
|
RunStatus,
|
|
6937
6983
|
RunStallDetectedEvent,
|
|
6984
|
+
RunStageOutcomeEvent,
|
|
6938
6985
|
RunSetStatusCommand,
|
|
6939
6986
|
RunSetRuntimeModeCommand,
|
|
6940
6987
|
RunSetInteractionModeCommand,
|
|
@@ -6943,6 +6990,7 @@ export {
|
|
|
6943
6990
|
RunReleaseRemoteLeaseCommand,
|
|
6944
6991
|
RunRecordPatchEvent,
|
|
6945
6992
|
RunRecordPatch,
|
|
6993
|
+
RunPipelineResolvedEvent,
|
|
6946
6994
|
RunMode,
|
|
6947
6995
|
RunMarkFailedCommand,
|
|
6948
6996
|
RunMarkCompletedCommand,
|
|
@@ -7095,7 +7143,9 @@ export {
|
|
|
7095
7143
|
RIG_RUN_STEERING,
|
|
7096
7144
|
RIG_RUN_STATUS_CHANGED,
|
|
7097
7145
|
RIG_RUN_STALL_DETECTED,
|
|
7146
|
+
RIG_RUN_STAGE_OUTCOME,
|
|
7098
7147
|
RIG_RUN_RECORD_PATCH,
|
|
7148
|
+
RIG_RUN_PIPELINE_RESOLVED,
|
|
7099
7149
|
RIG_RUN_LOG_ENTRY,
|
|
7100
7150
|
RIG_RUN_INPUT_RESOLVED,
|
|
7101
7151
|
RIG_RUN_INPUT_REQUESTED,
|
|
@@ -7134,8 +7184,6 @@ export {
|
|
|
7134
7184
|
ProviderEvent,
|
|
7135
7185
|
ProviderApprovalPolicy,
|
|
7136
7186
|
ProviderApprovalDecision,
|
|
7137
|
-
ProtectedStageViolation,
|
|
7138
|
-
ProtectedStageGrant,
|
|
7139
7187
|
ProjectionPendingApprovalStatus,
|
|
7140
7188
|
ProjectionPendingApprovalDecision,
|
|
7141
7189
|
ProjectWriteFileResult,
|
|
@@ -7156,6 +7204,7 @@ export {
|
|
|
7156
7204
|
ProjectDeletedPayload,
|
|
7157
7205
|
ProjectCreatedPayload,
|
|
7158
7206
|
ProjectCreateCommand,
|
|
7207
|
+
ProductCapabilityRegistration,
|
|
7159
7208
|
PositiveInt,
|
|
7160
7209
|
PolicyMode,
|
|
7161
7210
|
PolicyDecisionSummary,
|
|
@@ -7168,6 +7217,7 @@ export {
|
|
|
7168
7217
|
PipelineUnresolvable,
|
|
7169
7218
|
PiRuntimeConfig,
|
|
7170
7219
|
PercentComplete,
|
|
7220
|
+
PanelRegistration,
|
|
7171
7221
|
PROVIDER_SEND_TURN_MAX_INPUT_CHARS,
|
|
7172
7222
|
PROVIDER_SEND_TURN_MAX_IMAGE_BYTES,
|
|
7173
7223
|
PROVIDER_SEND_TURN_MAX_ATTACHMENTS,
|
|
@@ -7341,6 +7391,7 @@ export {
|
|
|
7341
7391
|
CLI_OUTPUT_VERSION,
|
|
7342
7392
|
BootResultDescriptor,
|
|
7343
7393
|
BootIncoherent,
|
|
7394
|
+
BlockerClassifierRegistration,
|
|
7344
7395
|
BlockerClassification,
|
|
7345
7396
|
BlockerClass,
|
|
7346
7397
|
AutomationConfig,
|