@overdeck/contracts 0.83.0 → 0.85.0
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 +98 -17
- package/dist/index.d.ts +126 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +93 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -393,6 +393,7 @@ const AgentResolution = effect.Schema.Literals([
|
|
|
393
393
|
]);
|
|
394
394
|
const KNOWN_HARNESSES = new Set([
|
|
395
395
|
"claude-code",
|
|
396
|
+
"pi",
|
|
396
397
|
"ohmypi",
|
|
397
398
|
"codex",
|
|
398
399
|
"acp",
|
|
@@ -405,11 +406,9 @@ const KNOWN_HARNESSES = new Set([
|
|
|
405
406
|
/**
|
|
406
407
|
* Normalize a snapshot's runtime field to a known Harness value.
|
|
407
408
|
* Unknown or missing values fall back to 'claude-code' (the default harness).
|
|
408
|
-
* Legacy 'pi' values are normalized to 'ohmypi' on read (PAN-1989).
|
|
409
409
|
*/
|
|
410
410
|
function getHarness(snapshot) {
|
|
411
411
|
const raw = snapshot?.runtime;
|
|
412
|
-
if (raw === "pi") return "ohmypi";
|
|
413
412
|
if (raw && KNOWN_HARNESSES.has(raw)) return raw;
|
|
414
413
|
return "claude-code";
|
|
415
414
|
}
|
|
@@ -2006,7 +2005,9 @@ const AgentModelSetEvent = effect.Schema.Struct({
|
|
|
2006
2005
|
model: effect.Schema.String,
|
|
2007
2006
|
claudeSessionId: effect.Schema.optional(effect.Schema.NullOr(effect.Schema.String)),
|
|
2008
2007
|
sessionModel: effect.Schema.optional(effect.Schema.String),
|
|
2009
|
-
sessionHarness: effect.Schema.optional(effect.Schema.String)
|
|
2008
|
+
sessionHarness: effect.Schema.optional(effect.Schema.String),
|
|
2009
|
+
/** The sender already appended this session to sessions.json (the pi/omp extensions, PAN-5223); the server must not index it again. */
|
|
2010
|
+
sessionIndexed: effect.Schema.optional(effect.Schema.Boolean)
|
|
2010
2011
|
})
|
|
2011
2012
|
});
|
|
2012
2013
|
const AgentCurrentIssueSetEvent = effect.Schema.Struct({
|
|
@@ -3476,7 +3477,7 @@ const ExplorerGitStageInput = effect.Schema.Struct({
|
|
|
3476
3477
|
"discard"
|
|
3477
3478
|
])
|
|
3478
3479
|
});
|
|
3479
|
-
const ExplorerGitStageResult = effect.Schema.Struct({});
|
|
3480
|
+
const ExplorerGitStageResult = effect.Schema.Struct({ trashIds: effect.Schema.Array(effect.Schema.String) });
|
|
3480
3481
|
const ExplorerSearchFilesInput = effect.Schema.Struct({
|
|
3481
3482
|
rootId: ExplorerRootId,
|
|
3482
3483
|
query: effect.Schema.String,
|
|
@@ -6082,9 +6083,24 @@ const FlywheelNeedsYouItem = effect.Schema.Struct({
|
|
|
6082
6083
|
/** The first-raised tick message's id, when the harness records one. */
|
|
6083
6084
|
firstRaisedMessageId: effect.Schema.optional(effect.Schema.String)
|
|
6084
6085
|
});
|
|
6085
|
-
|
|
6086
|
+
const NEEDS_YOU_TARGET_RE = /^(.*?)\s*<(https?:\/\/[^\s<>]+)>\s*$/i;
|
|
6087
|
+
/**
|
|
6088
|
+
* An item's trailing `<https://…>` is its target (PAN-5239). Anything else in
|
|
6089
|
+
* angle brackets is plain text. The label is the item without its target.
|
|
6090
|
+
*/
|
|
6091
|
+
function parseNeedsYouTarget(text) {
|
|
6092
|
+
const trimmed = text.trim();
|
|
6093
|
+
const match = NEEDS_YOU_TARGET_RE.exec(trimmed);
|
|
6094
|
+
const label = match?.[1]?.trim() ?? "";
|
|
6095
|
+
if (!match || !label) return { label: trimmed };
|
|
6096
|
+
return {
|
|
6097
|
+
label,
|
|
6098
|
+
target: match[2]
|
|
6099
|
+
};
|
|
6100
|
+
}
|
|
6101
|
+
/** Two items are the same item when their keys match; the target is not part of it. */
|
|
6086
6102
|
function needsYouItemKey(text) {
|
|
6087
|
-
return text
|
|
6103
|
+
return parseNeedsYouTarget(text).label.toLowerCase();
|
|
6088
6104
|
}
|
|
6089
6105
|
/** Split a needs-you line on `;`: trimmed, empty pieces dropped, one per key. */
|
|
6090
6106
|
function splitNeedsYouItems(needsYou) {
|
|
@@ -6230,6 +6246,7 @@ const CONTEXT_LAYER_KINDS = [
|
|
|
6230
6246
|
];
|
|
6231
6247
|
const CONTEXT_PREVIEW_HARNESSES = [
|
|
6232
6248
|
"claude-code",
|
|
6249
|
+
"pi",
|
|
6233
6250
|
"ohmypi",
|
|
6234
6251
|
"codex",
|
|
6235
6252
|
"acp",
|
|
@@ -6342,6 +6359,7 @@ const ContextPreviewRequest = effect.Schema.Struct({
|
|
|
6342
6359
|
});
|
|
6343
6360
|
const ContextHarnessPreviews = effect.Schema.Struct({
|
|
6344
6361
|
"claude-code": effect.Schema.String,
|
|
6362
|
+
pi: effect.Schema.optional(effect.Schema.String),
|
|
6345
6363
|
ohmypi: effect.Schema.String,
|
|
6346
6364
|
codex: effect.Schema.String,
|
|
6347
6365
|
acp: effect.Schema.String,
|
|
@@ -6606,6 +6624,18 @@ const OHMYPI_CAPABILITIES = {
|
|
|
6606
6624
|
runsOnFlyMachine: false,
|
|
6607
6625
|
overdeckMcp: false
|
|
6608
6626
|
};
|
|
6627
|
+
/**
|
|
6628
|
+
* Pi Coding Agent (PAN-5212). Same launch channel and transcript handling as
|
|
6629
|
+
* omp; pi runs on Node, ships on npm, and has no `ask` tool, so a question is
|
|
6630
|
+
* plain assistant text answered by message (.pan/pi-vs-omp.md).
|
|
6631
|
+
*/
|
|
6632
|
+
const PI_CAPABILITIES = {
|
|
6633
|
+
...OHMYPI_CAPABILITIES,
|
|
6634
|
+
binaryLabel: "Pi",
|
|
6635
|
+
installHint: "npm install -g @earendil-works/pi-coding-agent",
|
|
6636
|
+
npmPackage: "@earendil-works/pi-coding-agent",
|
|
6637
|
+
askAnswerDelivery: "message"
|
|
6638
|
+
};
|
|
6609
6639
|
const CODEX_CAPABILITIES = {
|
|
6610
6640
|
contextChannel: "developer_instructions",
|
|
6611
6641
|
initialPromptMustLand: false,
|
|
@@ -6817,7 +6847,7 @@ const CLAUDE_CODE_BEHAVIOR = {
|
|
|
6817
6847
|
steerKind: "send-now-keys"
|
|
6818
6848
|
};
|
|
6819
6849
|
const OHMYPI_BEHAVIOR = {
|
|
6820
|
-
displayName: "Pi",
|
|
6850
|
+
displayName: "Oh My Pi",
|
|
6821
6851
|
capabilities: OHMYPI_CAPABILITIES,
|
|
6822
6852
|
nativeCommands: [],
|
|
6823
6853
|
executableName: "omp",
|
|
@@ -6846,6 +6876,22 @@ const OHMYPI_BEHAVIOR = {
|
|
|
6846
6876
|
"xhigh"
|
|
6847
6877
|
]
|
|
6848
6878
|
};
|
|
6879
|
+
/**
|
|
6880
|
+
* Pi Coding Agent (`pi`, PAN-5212). pi is omp's upstream: same `--mode rpc`
|
|
6881
|
+
* JSONL protocol, same ready.json extension handshake, same v3 session JSONL
|
|
6882
|
+
* and `<agentDir>/sessions` layout, so it shares omp's launch, delivery,
|
|
6883
|
+
* readiness and transcript kinds. The launch differences (binary, resume flag,
|
|
6884
|
+
* models.json, extension bundle) live in `src/lib/runtimes/pi-family.ts`.
|
|
6885
|
+
* See .pan/pi-vs-omp.md.
|
|
6886
|
+
*/
|
|
6887
|
+
const PI_BEHAVIOR = {
|
|
6888
|
+
...OHMYPI_BEHAVIOR,
|
|
6889
|
+
displayName: "Pi",
|
|
6890
|
+
capabilities: PI_CAPABILITIES,
|
|
6891
|
+
nativeCommands: [],
|
|
6892
|
+
executableName: "pi",
|
|
6893
|
+
processNames: ["pi"]
|
|
6894
|
+
};
|
|
6849
6895
|
const CODEX_BEHAVIOR = {
|
|
6850
6896
|
displayName: "Codex",
|
|
6851
6897
|
capabilities: CODEX_CAPABILITIES,
|
|
@@ -7001,6 +7047,7 @@ const PRIME_AGENT_BEHAVIOR = {
|
|
|
7001
7047
|
const BEHAVIORS = {
|
|
7002
7048
|
"opencode": OPENCODE_BEHAVIOR,
|
|
7003
7049
|
"claude-code": CLAUDE_CODE_BEHAVIOR,
|
|
7050
|
+
pi: PI_BEHAVIOR,
|
|
7004
7051
|
ohmypi: OHMYPI_BEHAVIOR,
|
|
7005
7052
|
codex: CODEX_BEHAVIOR,
|
|
7006
7053
|
acp: ACP_BEHAVIOR,
|
|
@@ -7009,14 +7056,8 @@ const BEHAVIORS = {
|
|
|
7009
7056
|
"prime-agent": PRIME_AGENT_BEHAVIOR,
|
|
7010
7057
|
grok: GROK_BEHAVIOR
|
|
7011
7058
|
};
|
|
7012
|
-
|
|
7013
|
-
/** True for the legacy stored harness alias `pi` (PAN-1989), which now means ohmypi. */
|
|
7014
|
-
function isLegacyPiHarnessName(raw) {
|
|
7015
|
-
return raw === LEGACY_PI_HARNESS;
|
|
7016
|
-
}
|
|
7017
|
-
/** Map a stored or requested harness string to a RuntimeName; legacy `pi` → `ohmypi`; anything else → null. */
|
|
7059
|
+
/** Map a stored or requested harness string to a RuntimeName; anything unknown → null. */
|
|
7018
7060
|
function normalizeHarnessName(raw) {
|
|
7019
|
-
if (isLegacyPiHarnessName(raw)) return "ohmypi";
|
|
7020
7061
|
return typeof raw === "string" && KNOWN_HARNESSES.has(raw) ? raw : null;
|
|
7021
7062
|
}
|
|
7022
7063
|
function getHarnessBehavior(harness) {
|
|
@@ -7213,6 +7254,7 @@ const TELEMETRY_CLI_VERBS = [
|
|
|
7213
7254
|
];
|
|
7214
7255
|
const TELEMETRY_HARNESSES = [
|
|
7215
7256
|
"claude-code",
|
|
7257
|
+
"pi",
|
|
7216
7258
|
"ohmypi",
|
|
7217
7259
|
"codex",
|
|
7218
7260
|
"acp",
|
|
@@ -7348,6 +7390,7 @@ const TELEMETRY_CLIENT_ROUTES = [
|
|
|
7348
7390
|
"/api/conversations/:name/kickoff",
|
|
7349
7391
|
"/api/conversations/:name/message",
|
|
7350
7392
|
"/api/conversations/:name/message-locator",
|
|
7393
|
+
"/api/conversations/:name/message/cancel",
|
|
7351
7394
|
"/api/conversations/:name/messages",
|
|
7352
7395
|
"/api/conversations/:name/plan-action",
|
|
7353
7396
|
"/api/conversations/:name/preview-ports",
|
|
@@ -7372,6 +7415,10 @@ const TELEMETRY_CLIENT_ROUTES = [
|
|
|
7372
7415
|
"/api/costs/summary",
|
|
7373
7416
|
"/api/disk-alert",
|
|
7374
7417
|
"/api/explorer/download",
|
|
7418
|
+
"/api/explorer/edit-workspaces/:workspaceId",
|
|
7419
|
+
"/api/explorer/edit-workspaces/:workspaceId/discard",
|
|
7420
|
+
"/api/explorer/edit-workspaces/:workspaceId/merge",
|
|
7421
|
+
"/api/explorer/edit-workspaces/:workspaceId/pr",
|
|
7375
7422
|
"/api/explorer/upload",
|
|
7376
7423
|
"/api/fleet/conversations",
|
|
7377
7424
|
"/api/fleet/issues/:id/activity",
|
|
@@ -7387,6 +7434,8 @@ const TELEMETRY_CLIENT_ROUTES = [
|
|
|
7387
7434
|
"/api/harness-auto-update",
|
|
7388
7435
|
"/api/issues",
|
|
7389
7436
|
"/api/issues/:id",
|
|
7437
|
+
"/api/issues/:id/check-runs",
|
|
7438
|
+
"/api/issues/:id/costs",
|
|
7390
7439
|
"/api/issues/resource-allocated",
|
|
7391
7440
|
"/api/lanes",
|
|
7392
7441
|
"/api/lanes/:name",
|
|
@@ -10177,7 +10226,7 @@ const COMPOSER_COMMAND_MANIFEST = [
|
|
|
10177
10226
|
},
|
|
10178
10227
|
{
|
|
10179
10228
|
"flags": "--harness <harness>",
|
|
10180
|
-
"description": "Coding-agent harness: claude-code | pi | codex | acp | kimi-code | opencode | muse | prime-agent | grok (defaults to role/provider settings)",
|
|
10229
|
+
"description": "Coding-agent harness: claude-code | pi | ohmypi | codex | acp | kimi-code | opencode | muse | prime-agent | grok (defaults to role/provider settings)",
|
|
10181
10230
|
"required": true,
|
|
10182
10231
|
"valueHint": "harness"
|
|
10183
10232
|
},
|
|
@@ -11101,7 +11150,7 @@ const COMPOSER_COMMAND_MANIFEST = [
|
|
|
11101
11150
|
},
|
|
11102
11151
|
{
|
|
11103
11152
|
"flags": "--harness <harness>",
|
|
11104
|
-
"description": "Coding-agent harness: claude-code | pi | codex | acp | kimi-code | opencode | muse | prime-agent | grok (defaults to role/provider settings)",
|
|
11153
|
+
"description": "Coding-agent harness: claude-code | pi | ohmypi | codex | acp | kimi-code | opencode | muse | prime-agent | grok (defaults to role/provider settings)",
|
|
11105
11154
|
"required": true,
|
|
11106
11155
|
"valueHint": "harness"
|
|
11107
11156
|
},
|
|
@@ -11854,6 +11903,12 @@ const COMPOSER_COMMAND_MANIFEST = [
|
|
|
11854
11903
|
"required": true,
|
|
11855
11904
|
"valueHint": "dir"
|
|
11856
11905
|
},
|
|
11906
|
+
{
|
|
11907
|
+
"flags": "--origin <origin>",
|
|
11908
|
+
"description": "Who the workspace is for: operator (listed in the sidebar) or agent (hidden). Default: agent inside an Overdeck agent or conversation, else operator. Pass --origin operator when the operator asked for the workspace.",
|
|
11909
|
+
"required": true,
|
|
11910
|
+
"valueHint": "origin"
|
|
11911
|
+
},
|
|
11857
11912
|
{
|
|
11858
11913
|
"flags": "--dry-run",
|
|
11859
11914
|
"description": "Print the resolved intent as JSON and create nothing",
|
|
@@ -19856,6 +19911,27 @@ function notificationAllowed(prefs, category, nowMs) {
|
|
|
19856
19911
|
if (category === "summary") return true;
|
|
19857
19912
|
return !prefs.muted.includes(category);
|
|
19858
19913
|
}
|
|
19914
|
+
const PHONE_ISSUE_EVENT_LABELS = {
|
|
19915
|
+
stopped: "Agent stopped responding",
|
|
19916
|
+
"verification.started": "Work finished; verification started",
|
|
19917
|
+
"merge.completed": "Merged",
|
|
19918
|
+
"merge.failed": "Merge failed",
|
|
19919
|
+
"review.stall-escalated": "Review stalled and needs you",
|
|
19920
|
+
"conflict.repair-escalated": "Conflict repair needs you"
|
|
19921
|
+
};
|
|
19922
|
+
/** The kind when `value` is a known event, else null; never throws. */
|
|
19923
|
+
function parsePhoneIssueEvent(value) {
|
|
19924
|
+
return typeof value === "string" && Object.prototype.hasOwnProperty.call(PHONE_ISSUE_EVENT_LABELS, value) ? value : null;
|
|
19925
|
+
}
|
|
19926
|
+
/** `/m/pipeline?issue=<id>[&event=<kind>&at=<iso>]`: the phone issue sheet (PAN-5219 D-1). */
|
|
19927
|
+
function phoneIssueSheetPath(issueId, event) {
|
|
19928
|
+
const params = new URLSearchParams({ issue: issueId });
|
|
19929
|
+
if (event) {
|
|
19930
|
+
params.set("event", event.kind);
|
|
19931
|
+
params.set("at", event.at);
|
|
19932
|
+
}
|
|
19933
|
+
return `/m/pipeline?${params.toString()}`;
|
|
19934
|
+
}
|
|
19859
19935
|
//#endregion
|
|
19860
19936
|
//#region src/connector-pairing.ts
|
|
19861
19937
|
const CONNECTOR_PAIR_SCHEME = "overdeck-connector";
|
|
@@ -20982,6 +21058,7 @@ exports.OrderBookPosture = OrderBookPosture;
|
|
|
20982
21058
|
exports.OrderBookSettings = OrderBookSettings;
|
|
20983
21059
|
exports.OrderBookStatus = OrderBookStatus;
|
|
20984
21060
|
exports.PHONE_APP_SCHEME = PHONE_APP_SCHEME;
|
|
21061
|
+
exports.PHONE_ISSUE_EVENT_LABELS = PHONE_ISSUE_EVENT_LABELS;
|
|
20985
21062
|
exports.PHONE_NOTIFICATION_CATEGORIES = PHONE_NOTIFICATION_CATEGORIES;
|
|
20986
21063
|
exports.PHONE_PAIR_CODE_RE = PHONE_PAIR_CODE_RE;
|
|
20987
21064
|
exports.PHONE_PAIR_ENVIRONMENT_ID_RE = PHONE_PAIR_ENVIRONMENT_ID_RE;
|
|
@@ -20989,6 +21066,8 @@ exports.PHONE_PAIR_LINK_PREFIX = PHONE_PAIR_LINK_PREFIX;
|
|
|
20989
21066
|
exports.PHONE_PAIR_LINK_VERSION = PHONE_PAIR_LINK_VERSION;
|
|
20990
21067
|
exports.PHONE_PAIR_MACHINE_KEY_RE = PHONE_PAIR_MACHINE_KEY_RE;
|
|
20991
21068
|
exports.PIPELINE_MEMBERSHIP_LOADING_CODE = PIPELINE_MEMBERSHIP_LOADING_CODE;
|
|
21069
|
+
exports.PI_BEHAVIOR = PI_BEHAVIOR;
|
|
21070
|
+
exports.PI_CAPABILITIES = PI_CAPABILITIES;
|
|
20992
21071
|
exports.PRIME_AGENT_BEHAVIOR = PRIME_AGENT_BEHAVIOR;
|
|
20993
21072
|
exports.PRIME_AGENT_CAPABILITIES = PRIME_AGENT_CAPABILITIES;
|
|
20994
21073
|
exports.PUSH_PLAINTEXT_MAX_BYTES = PUSH_PLAINTEXT_MAX_BYTES;
|
|
@@ -21226,7 +21305,6 @@ exports.isConfiguredPullRequestRepo = isConfiguredPullRequestRepo;
|
|
|
21226
21305
|
exports.isEffortLevel = isEffortLevel;
|
|
21227
21306
|
exports.isIssueAttention = isIssueAttention;
|
|
21228
21307
|
exports.isIssueState = isIssueState;
|
|
21229
|
-
exports.isLegacyPiHarnessName = isLegacyPiHarnessName;
|
|
21230
21308
|
exports.isProtocolCompatible = isProtocolCompatible;
|
|
21231
21309
|
exports.isSingletonConversation = isSingletonConversation;
|
|
21232
21310
|
exports.isTerminalBackendName = isTerminalBackendName;
|
|
@@ -21244,10 +21322,13 @@ exports.overdeckInstallCommand = overdeckInstallCommand;
|
|
|
21244
21322
|
exports.paneAgentKey = paneAgentKey;
|
|
21245
21323
|
exports.parseConnectorPairLink = parseConnectorPairLink;
|
|
21246
21324
|
exports.parseLinkedConversationName = parseLinkedConversationName;
|
|
21325
|
+
exports.parseNeedsYouTarget = parseNeedsYouTarget;
|
|
21326
|
+
exports.parsePhoneIssueEvent = parsePhoneIssueEvent;
|
|
21247
21327
|
exports.parsePhoneNotificationPreferences = parsePhoneNotificationPreferences;
|
|
21248
21328
|
exports.parsePhonePairLink = parsePhonePairLink;
|
|
21249
21329
|
exports.parsePullRequestRef = parsePullRequestRef;
|
|
21250
21330
|
exports.parseTrackerIssueUrl = parseTrackerIssueUrl;
|
|
21331
|
+
exports.phoneIssueSheetPath = phoneIssueSheetPath;
|
|
21251
21332
|
exports.presenceForPaneState = presenceForPaneState;
|
|
21252
21333
|
exports.presetToCron = presetToCron;
|
|
21253
21334
|
exports.projectLegacySystemHealthSummary = projectLegacySystemHealthSummary;
|