@overdeck/contracts 0.45.23 → 0.45.24
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 +107 -16
- package/dist/index.d.ts +180 -37
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +99 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -107,7 +107,8 @@ const VerificationStatusValue = effect.Schema.Literals([
|
|
|
107
107
|
const KNOWN_HARNESSES = new Set([
|
|
108
108
|
"claude-code",
|
|
109
109
|
"ohmypi",
|
|
110
|
-
"codex"
|
|
110
|
+
"codex",
|
|
111
|
+
"acp"
|
|
111
112
|
]);
|
|
112
113
|
/**
|
|
113
114
|
* Normalize a snapshot's runtime field to a known Harness value.
|
|
@@ -1426,7 +1427,7 @@ const AgentModelSetEvent = effect.Schema.Struct({
|
|
|
1426
1427
|
payload: effect.Schema.Struct({
|
|
1427
1428
|
agentId: AgentId,
|
|
1428
1429
|
model: effect.Schema.String,
|
|
1429
|
-
claudeSessionId: effect.Schema.optional(effect.Schema.String),
|
|
1430
|
+
claudeSessionId: effect.Schema.optional(effect.Schema.NullOr(effect.Schema.String)),
|
|
1430
1431
|
sessionModel: effect.Schema.optional(effect.Schema.String),
|
|
1431
1432
|
sessionHarness: effect.Schema.optional(effect.Schema.String)
|
|
1432
1433
|
})
|
|
@@ -2432,7 +2433,8 @@ const FlywheelHarness = effect.Schema.Literals([
|
|
|
2432
2433
|
"claude-code",
|
|
2433
2434
|
"pi",
|
|
2434
2435
|
"ohmypi",
|
|
2435
|
-
"codex"
|
|
2436
|
+
"codex",
|
|
2437
|
+
"acp"
|
|
2436
2438
|
]);
|
|
2437
2439
|
const FlywheelEffort = effect.Schema.Literals([
|
|
2438
2440
|
"low",
|
|
@@ -2568,6 +2570,15 @@ const FlywheelSystemStatus = effect.Schema.Struct({
|
|
|
2568
2570
|
agentsActive: effect.Schema.Number,
|
|
2569
2571
|
agentsCap: effect.Schema.Number
|
|
2570
2572
|
});
|
|
2573
|
+
const FlywheelOrders = effect.Schema.Struct({
|
|
2574
|
+
bookId: effect.Schema.String,
|
|
2575
|
+
bookName: effect.Schema.String,
|
|
2576
|
+
landed: effect.Schema.Number,
|
|
2577
|
+
total: effect.Schema.Number,
|
|
2578
|
+
laneAInFlight: effect.Schema.Array(effect.Schema.String),
|
|
2579
|
+
laneBInFlight: effect.Schema.optional(effect.Schema.String),
|
|
2580
|
+
drained: effect.Schema.Boolean
|
|
2581
|
+
});
|
|
2571
2582
|
const FlywheelStatus = effect.Schema.Struct({
|
|
2572
2583
|
runId: FlywheelRunId,
|
|
2573
2584
|
startedAt: effect.Schema.String,
|
|
@@ -2581,6 +2592,7 @@ const FlywheelStatus = effect.Schema.Struct({
|
|
|
2581
2592
|
suggestions: effect.Schema.Array(FlywheelSuggestion).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed([]))),
|
|
2582
2593
|
system: FlywheelSystemStatus,
|
|
2583
2594
|
openQuestions: effect.Schema.Array(effect.Schema.String),
|
|
2595
|
+
orders: effect.Schema.optional(FlywheelOrders),
|
|
2584
2596
|
ticks: effect.Schema.Number,
|
|
2585
2597
|
lastTickAt: effect.Schema.String
|
|
2586
2598
|
});
|
|
@@ -4057,28 +4069,26 @@ function applyEvent(state, event) {
|
|
|
4057
4069
|
case "agent.model_set": {
|
|
4058
4070
|
const { agentId, model, claudeSessionId, sessionModel, sessionHarness } = event.payload;
|
|
4059
4071
|
const prev = state.agentRuntimeById[agentId] ?? defaultRuntimeSnapshot(agentId, event.timestamp, event.sequence);
|
|
4072
|
+
const nextSessionId = claudeSessionId === null ? void 0 : claudeSessionId ?? prev.claudeSessionId;
|
|
4060
4073
|
const next = {
|
|
4061
4074
|
...prev,
|
|
4062
4075
|
model,
|
|
4063
|
-
claudeSessionId:
|
|
4076
|
+
claudeSessionId: nextSessionId,
|
|
4064
4077
|
sessionModel: sessionModel ?? prev.sessionModel,
|
|
4065
4078
|
sessionHarness: sessionHarness ?? prev.sessionHarness,
|
|
4066
4079
|
lastActivity: event.timestamp,
|
|
4067
4080
|
updatedAtSequence: event.sequence
|
|
4068
4081
|
};
|
|
4069
4082
|
let nextAgentIdBySessionId = state.agentIdBySessionId;
|
|
4070
|
-
if (claudeSessionId &&
|
|
4071
|
-
nextAgentIdBySessionId = {
|
|
4072
|
-
...state.agentIdBySessionId,
|
|
4073
|
-
[claudeSessionId]: agentId
|
|
4074
|
-
};
|
|
4083
|
+
if (claudeSessionId !== void 0 && nextSessionId !== prev.claudeSessionId) {
|
|
4075
4084
|
if (prev.claudeSessionId && state.agentIdBySessionId[prev.claudeSessionId] === agentId) {
|
|
4076
|
-
const { [prev.claudeSessionId]: _removed, ...rest } =
|
|
4077
|
-
nextAgentIdBySessionId =
|
|
4078
|
-
...rest,
|
|
4079
|
-
[claudeSessionId]: agentId
|
|
4080
|
-
};
|
|
4085
|
+
const { [prev.claudeSessionId]: _removed, ...rest } = nextAgentIdBySessionId;
|
|
4086
|
+
nextAgentIdBySessionId = rest;
|
|
4081
4087
|
}
|
|
4088
|
+
if (nextSessionId) nextAgentIdBySessionId = {
|
|
4089
|
+
...nextAgentIdBySessionId,
|
|
4090
|
+
[nextSessionId]: agentId
|
|
4091
|
+
};
|
|
4082
4092
|
}
|
|
4083
4093
|
return {
|
|
4084
4094
|
...state,
|
|
@@ -4475,6 +4485,52 @@ const FlywheelStats = effect.Schema.Struct({
|
|
|
4475
4485
|
const decodeFlywheelStats = effect.Schema.decodeUnknownSync(FlywheelStats);
|
|
4476
4486
|
const encodeFlywheelStats = effect.Schema.encodeSync(FlywheelStats);
|
|
4477
4487
|
//#endregion
|
|
4488
|
+
//#region src/orders.ts
|
|
4489
|
+
const OrderBookLane = effect.Schema.Literals(["A", "B"]);
|
|
4490
|
+
const OrderBookStatus = effect.Schema.Literals([
|
|
4491
|
+
"draft",
|
|
4492
|
+
"ready",
|
|
4493
|
+
"running",
|
|
4494
|
+
"drained",
|
|
4495
|
+
"complete"
|
|
4496
|
+
]);
|
|
4497
|
+
const OrderBookPosture = effect.Schema.Literals(["open", "drain"]);
|
|
4498
|
+
const OrderBookItem = effect.Schema.Struct({
|
|
4499
|
+
issue: effect.Schema.String,
|
|
4500
|
+
lane: OrderBookLane,
|
|
4501
|
+
order: effect.Schema.Number,
|
|
4502
|
+
prereqs: effect.Schema.Array(effect.Schema.String),
|
|
4503
|
+
reVerify: effect.Schema.Boolean,
|
|
4504
|
+
planAtPickup: effect.Schema.optional(effect.Schema.Boolean),
|
|
4505
|
+
addedAt: effect.Schema.String,
|
|
4506
|
+
addedBy: effect.Schema.String
|
|
4507
|
+
});
|
|
4508
|
+
const OrderBookSettings = effect.Schema.Struct({
|
|
4509
|
+
laneAConcurrency: effect.Schema.Number,
|
|
4510
|
+
briefOverlay: effect.Schema.optional(effect.Schema.String),
|
|
4511
|
+
posture: OrderBookPosture,
|
|
4512
|
+
postureSetAt: effect.Schema.optional(effect.Schema.String),
|
|
4513
|
+
postureSetBy: effect.Schema.optional(effect.Schema.String),
|
|
4514
|
+
postureReason: effect.Schema.optional(effect.Schema.String)
|
|
4515
|
+
});
|
|
4516
|
+
const OrderBook = effect.Schema.Struct({
|
|
4517
|
+
id: effect.Schema.String,
|
|
4518
|
+
name: effect.Schema.String,
|
|
4519
|
+
status: OrderBookStatus,
|
|
4520
|
+
settings: OrderBookSettings,
|
|
4521
|
+
items: effect.Schema.Array(OrderBookItem),
|
|
4522
|
+
runId: effect.Schema.optional(effect.Schema.String),
|
|
4523
|
+
createdAt: effect.Schema.String,
|
|
4524
|
+
updatedAt: effect.Schema.String
|
|
4525
|
+
});
|
|
4526
|
+
const OrderBookIndexEntry = effect.Schema.Struct({
|
|
4527
|
+
id: effect.Schema.String,
|
|
4528
|
+
name: effect.Schema.String,
|
|
4529
|
+
status: OrderBookStatus,
|
|
4530
|
+
runId: effect.Schema.optional(effect.Schema.String),
|
|
4531
|
+
updatedAt: effect.Schema.String
|
|
4532
|
+
});
|
|
4533
|
+
//#endregion
|
|
4478
4534
|
//#region src/context-layers.ts
|
|
4479
4535
|
const CONTEXT_LAYER_KINDS = [
|
|
4480
4536
|
"global",
|
|
@@ -4484,7 +4540,8 @@ const CONTEXT_LAYER_KINDS = [
|
|
|
4484
4540
|
const CONTEXT_PREVIEW_HARNESSES = [
|
|
4485
4541
|
"claude-code",
|
|
4486
4542
|
"ohmypi",
|
|
4487
|
-
"codex"
|
|
4543
|
+
"codex",
|
|
4544
|
+
"acp"
|
|
4488
4545
|
];
|
|
4489
4546
|
const ContextLayerKind = effect.Schema.Literals(CONTEXT_LAYER_KINDS);
|
|
4490
4547
|
const ContextPreviewHarness = effect.Schema.Literals(CONTEXT_PREVIEW_HARNESSES);
|
|
@@ -4591,6 +4648,7 @@ const ContextHarnessPreviews = effect.Schema.Struct({
|
|
|
4591
4648
|
"claude-code": effect.Schema.String,
|
|
4592
4649
|
ohmypi: effect.Schema.String,
|
|
4593
4650
|
codex: effect.Schema.String,
|
|
4651
|
+
acp: effect.Schema.String,
|
|
4594
4652
|
fullPrompt: effect.Schema.String
|
|
4595
4653
|
});
|
|
4596
4654
|
const ContextPreviewDiagnostic = effect.Schema.Struct({
|
|
@@ -4645,6 +4703,7 @@ const ArtifactAgentHarness = effect.Schema.Literals([
|
|
|
4645
4703
|
"pi",
|
|
4646
4704
|
"ohmypi",
|
|
4647
4705
|
"codex",
|
|
4706
|
+
"acp",
|
|
4648
4707
|
"user"
|
|
4649
4708
|
]);
|
|
4650
4709
|
const ArtifactLifecycleState = effect.Schema.Literals([
|
|
@@ -4832,14 +4891,37 @@ const CODEX_BEHAVIOR = {
|
|
|
4832
4891
|
workAgentMode: "codex-work-tui",
|
|
4833
4892
|
readyTimeoutSeconds: 30
|
|
4834
4893
|
};
|
|
4894
|
+
const ACP_BEHAVIOR = {
|
|
4895
|
+
displayName: "ACP",
|
|
4896
|
+
executableName: "acp-host",
|
|
4897
|
+
processNames: ["acp-host", "kimi"],
|
|
4898
|
+
launchCommandKind: "acp-host",
|
|
4899
|
+
deliveryKind: "acp-host-rpc",
|
|
4900
|
+
readinessKind: "acp-host-ready",
|
|
4901
|
+
transcriptKind: "acp-jsonl",
|
|
4902
|
+
sessionIdSource: "acp-session-id",
|
|
4903
|
+
contextLayerKind: "acp",
|
|
4904
|
+
feedKind: "acp",
|
|
4905
|
+
supportsPtySupervisor: false,
|
|
4906
|
+
supportsChannelsBridge: false,
|
|
4907
|
+
supportsConversationStreaming: true,
|
|
4908
|
+
supportsPatchProjection: false,
|
|
4909
|
+
usesRpcFifo: false,
|
|
4910
|
+
usesCodexHome: false,
|
|
4911
|
+
injectsPromptTimeMemory: false,
|
|
4912
|
+
workAgentMode: "acp-host",
|
|
4913
|
+
readyTimeoutSeconds: 30
|
|
4914
|
+
};
|
|
4835
4915
|
const BEHAVIORS = {
|
|
4836
4916
|
"claude-code": CLAUDE_CODE_BEHAVIOR,
|
|
4837
4917
|
ohmypi: OHMYPI_BEHAVIOR,
|
|
4838
|
-
codex: CODEX_BEHAVIOR
|
|
4918
|
+
codex: CODEX_BEHAVIOR,
|
|
4919
|
+
acp: ACP_BEHAVIOR
|
|
4839
4920
|
};
|
|
4840
4921
|
function getHarnessBehavior(harness) {
|
|
4841
4922
|
if (harness === "ohmypi" || harness === "pi") return OHMYPI_BEHAVIOR;
|
|
4842
4923
|
if (harness === "codex") return CODEX_BEHAVIOR;
|
|
4924
|
+
if (harness === "acp") return ACP_BEHAVIOR;
|
|
4843
4925
|
return CLAUDE_CODE_BEHAVIOR;
|
|
4844
4926
|
}
|
|
4845
4927
|
function getRuntimeBehavior(runtime) {
|
|
@@ -4938,6 +5020,7 @@ function compareIssueIds(a, b) {
|
|
|
4938
5020
|
return collator.compare(a, b);
|
|
4939
5021
|
}
|
|
4940
5022
|
//#endregion
|
|
5023
|
+
exports.ACP_BEHAVIOR = ACP_BEHAVIOR;
|
|
4941
5024
|
exports.Activity = Activity;
|
|
4942
5025
|
exports.ActivityDetailedEvent = ActivityDetailedEvent;
|
|
4943
5026
|
exports.ActivityEntryEvent = ActivityEntryEvent;
|
|
@@ -5065,6 +5148,7 @@ exports.FlywheelHarness = FlywheelHarness;
|
|
|
5065
5148
|
exports.FlywheelHeadline = FlywheelHeadline;
|
|
5066
5149
|
exports.FlywheelHttpUrl = FlywheelHttpUrl;
|
|
5067
5150
|
exports.FlywheelOrchestrator = FlywheelOrchestrator;
|
|
5151
|
+
exports.FlywheelOrders = FlywheelOrders;
|
|
5068
5152
|
exports.FlywheelParkedItem = FlywheelParkedItem;
|
|
5069
5153
|
exports.FlywheelPipelineItem = FlywheelPipelineItem;
|
|
5070
5154
|
exports.FlywheelPipelineStatus = FlywheelPipelineStatus;
|
|
@@ -5134,6 +5218,13 @@ exports.OVERDECK_AGENT_PROTOCOL_VERSION = OVERDECK_AGENT_PROTOCOL_VERSION;
|
|
|
5134
5218
|
exports.OVERDECK_DASHBOARD_PROTOCOL_VERSION = OVERDECK_DASHBOARD_PROTOCOL_VERSION;
|
|
5135
5219
|
exports.OpenInEditorInput = OpenInEditorInput;
|
|
5136
5220
|
exports.OperatorInterventionEvent = OperatorInterventionEvent;
|
|
5221
|
+
exports.OrderBook = OrderBook;
|
|
5222
|
+
exports.OrderBookIndexEntry = OrderBookIndexEntry;
|
|
5223
|
+
exports.OrderBookItem = OrderBookItem;
|
|
5224
|
+
exports.OrderBookLane = OrderBookLane;
|
|
5225
|
+
exports.OrderBookPosture = OrderBookPosture;
|
|
5226
|
+
exports.OrderBookSettings = OrderBookSettings;
|
|
5227
|
+
exports.OrderBookStatus = OrderBookStatus;
|
|
5137
5228
|
exports.PanRpcError = PanRpcError;
|
|
5138
5229
|
exports.PanRpcGroup = PanRpcGroup;
|
|
5139
5230
|
exports.PendingTurn = PendingTurn;
|