@overdeck/contracts 0.82.2 → 0.84.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 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({
@@ -3356,6 +3357,197 @@ function compareEffort(a, b) {
3356
3357
  return EFFORT_LEVELS.indexOf(a) - EFFORT_LEVELS.indexOf(b);
3357
3358
  }
3358
3359
  //#endregion
3360
+ //#region src/explorer.ts
3361
+ /** "project:<key>", "issue:<id>" or "workspace:<id>". */
3362
+ const ExplorerRootId = effect.Schema.String;
3363
+ const ExplorerEntryKind = effect.Schema.Literals([
3364
+ "file",
3365
+ "dir",
3366
+ "symlink"
3367
+ ]);
3368
+ const ExplorerEntry = effect.Schema.Struct({
3369
+ name: effect.Schema.String,
3370
+ path: effect.Schema.String,
3371
+ kind: ExplorerEntryKind,
3372
+ size: effect.Schema.optional(effect.Schema.Number),
3373
+ mtimeMs: effect.Schema.Number,
3374
+ ignored: effect.Schema.Boolean
3375
+ });
3376
+ /** Result shared by create, rename and copy. */
3377
+ const ExplorerEntryResult = effect.Schema.Struct({ entry: ExplorerEntry });
3378
+ const ExplorerListDirInput = effect.Schema.Struct({
3379
+ rootId: ExplorerRootId,
3380
+ path: effect.Schema.String
3381
+ });
3382
+ const ExplorerListDirResult = effect.Schema.Struct({
3383
+ entries: effect.Schema.Array(ExplorerEntry),
3384
+ truncated: effect.Schema.Boolean,
3385
+ absPath: effect.Schema.String
3386
+ });
3387
+ const ExplorerReadFileInput = effect.Schema.Struct({
3388
+ rootId: ExplorerRootId,
3389
+ path: effect.Schema.String,
3390
+ ref: effect.Schema.optional(effect.Schema.Literals(["HEAD"]))
3391
+ });
3392
+ const ExplorerReadFileResult = effect.Schema.Struct({
3393
+ kind: effect.Schema.Literals([
3394
+ "text",
3395
+ "binary",
3396
+ "large-text"
3397
+ ]),
3398
+ text: effect.Schema.optional(effect.Schema.String),
3399
+ size: effect.Schema.Number,
3400
+ mtimeMs: effect.Schema.Number,
3401
+ signature: effect.Schema.String,
3402
+ lang: effect.Schema.String,
3403
+ writable: effect.Schema.Boolean
3404
+ });
3405
+ const ExplorerWriteFileInput = effect.Schema.Struct({
3406
+ rootId: ExplorerRootId,
3407
+ path: effect.Schema.String,
3408
+ text: effect.Schema.String,
3409
+ expectedSignature: effect.Schema.NullOr(effect.Schema.String),
3410
+ allowMissing: effect.Schema.Boolean
3411
+ });
3412
+ const ExplorerWriteFileResult = effect.Schema.Struct({
3413
+ signature: effect.Schema.String,
3414
+ mtimeMs: effect.Schema.Number
3415
+ });
3416
+ const ExplorerCreateInput = effect.Schema.Struct({
3417
+ rootId: ExplorerRootId,
3418
+ path: effect.Schema.String,
3419
+ kind: effect.Schema.Literals(["file", "dir"])
3420
+ });
3421
+ const ExplorerRenameInput = effect.Schema.Struct({
3422
+ rootId: ExplorerRootId,
3423
+ from: effect.Schema.String,
3424
+ to: effect.Schema.String
3425
+ });
3426
+ const ExplorerCopyInput = effect.Schema.Struct({
3427
+ rootId: ExplorerRootId,
3428
+ from: effect.Schema.String,
3429
+ to: effect.Schema.String
3430
+ });
3431
+ const ExplorerDeleteInput = effect.Schema.Struct({
3432
+ rootId: ExplorerRootId,
3433
+ paths: effect.Schema.Array(effect.Schema.String)
3434
+ });
3435
+ const ExplorerDeleteResult = effect.Schema.Struct({ trashIds: effect.Schema.Array(effect.Schema.String) });
3436
+ const ExplorerRestoreInput = effect.Schema.Struct({
3437
+ rootId: ExplorerRootId,
3438
+ trashId: effect.Schema.String
3439
+ });
3440
+ const ExplorerRestoreResult = effect.Schema.Struct({ path: effect.Schema.String });
3441
+ const ExplorerGitFileStatus = effect.Schema.Literals([
3442
+ "untracked",
3443
+ "added",
3444
+ "modified",
3445
+ "deleted",
3446
+ "renamed",
3447
+ "conflicted"
3448
+ ]);
3449
+ const ExplorerGitCommittedStatus = effect.Schema.Literals([
3450
+ "added",
3451
+ "modified",
3452
+ "deleted",
3453
+ "renamed"
3454
+ ]);
3455
+ const ExplorerGitStatusInput = effect.Schema.Struct({ rootId: ExplorerRootId });
3456
+ const ExplorerGitStatusEntry = effect.Schema.Struct({
3457
+ path: effect.Schema.String,
3458
+ status: ExplorerGitFileStatus,
3459
+ staged: effect.Schema.Boolean
3460
+ });
3461
+ const ExplorerGitCommittedEntry = effect.Schema.Struct({
3462
+ path: effect.Schema.String,
3463
+ status: ExplorerGitCommittedStatus
3464
+ });
3465
+ const ExplorerGitStatusResult = effect.Schema.Struct({
3466
+ entries: effect.Schema.Array(ExplorerGitStatusEntry),
3467
+ committed: effect.Schema.Array(ExplorerGitCommittedEntry),
3468
+ branch: effect.Schema.NullOr(effect.Schema.String),
3469
+ truncated: effect.Schema.Boolean
3470
+ });
3471
+ const ExplorerGitStageInput = effect.Schema.Struct({
3472
+ rootId: ExplorerRootId,
3473
+ paths: effect.Schema.Array(effect.Schema.String),
3474
+ action: effect.Schema.Literals([
3475
+ "stage",
3476
+ "unstage",
3477
+ "discard"
3478
+ ])
3479
+ });
3480
+ const ExplorerGitStageResult = effect.Schema.Struct({ trashIds: effect.Schema.Array(effect.Schema.String) });
3481
+ const ExplorerSearchFilesInput = effect.Schema.Struct({
3482
+ rootId: ExplorerRootId,
3483
+ query: effect.Schema.String,
3484
+ limit: effect.Schema.Number
3485
+ });
3486
+ const ExplorerSearchFilesResult = effect.Schema.Struct({ paths: effect.Schema.Array(effect.Schema.String) });
3487
+ const ExplorerSearchContentInput = effect.Schema.Struct({
3488
+ rootId: ExplorerRootId,
3489
+ query: effect.Schema.String,
3490
+ scopePath: effect.Schema.optional(effect.Schema.String),
3491
+ regex: effect.Schema.Boolean,
3492
+ caseSensitive: effect.Schema.Boolean,
3493
+ limit: effect.Schema.Number
3494
+ });
3495
+ const ExplorerSearchContentMatch = effect.Schema.Struct({
3496
+ path: effect.Schema.String,
3497
+ line: effect.Schema.Number,
3498
+ column: effect.Schema.Number,
3499
+ preview: effect.Schema.String
3500
+ });
3501
+ const ExplorerSearchContentResult = effect.Schema.Struct({
3502
+ matches: effect.Schema.Array(ExplorerSearchContentMatch),
3503
+ truncated: effect.Schema.Boolean
3504
+ });
3505
+ /** An `overflow` event has `path: ""`: the client re-lists everything it shows. */
3506
+ const ExplorerWatchEvent = effect.Schema.Struct({
3507
+ kind: effect.Schema.Literals([
3508
+ "create",
3509
+ "update",
3510
+ "delete",
3511
+ "rename",
3512
+ "overflow"
3513
+ ]),
3514
+ path: effect.Schema.String,
3515
+ oldPath: effect.Schema.optional(effect.Schema.String),
3516
+ isDirectory: effect.Schema.optional(effect.Schema.Boolean)
3517
+ });
3518
+ const ExplorerWatchInput = effect.Schema.Struct({ rootId: ExplorerRootId });
3519
+ /** One element of the pan.explorerWatch stream. */
3520
+ const ExplorerWatchBatch = effect.Schema.Struct({ events: effect.Schema.Array(ExplorerWatchEvent) });
3521
+ const ExplorerBeginEditInput = effect.Schema.Struct({
3522
+ projectKey: effect.Schema.String,
3523
+ forceNew: effect.Schema.Boolean
3524
+ });
3525
+ const ExplorerBeginEditResult = effect.Schema.Struct({
3526
+ rootId: ExplorerRootId,
3527
+ workspaceId: effect.Schema.String,
3528
+ name: effect.Schema.String,
3529
+ branch: effect.Schema.String,
3530
+ path: effect.Schema.String,
3531
+ created: effect.Schema.Boolean
3532
+ });
3533
+ /** Values of PanRpcError.code that explorer methods return. */
3534
+ const EXPLORER_ERROR_CODES = [
3535
+ "ROOT_NOT_FOUND",
3536
+ "PATH_OUTSIDE_ROOT",
3537
+ "PATH_IN_GIT_DIR",
3538
+ "NOT_FOUND",
3539
+ "ALREADY_EXISTS",
3540
+ "DISK_CONFLICT",
3541
+ "EDIT_WORKSPACE_REQUIRED",
3542
+ "FILE_TOO_LARGE",
3543
+ "NOT_A_GIT_REPO",
3544
+ "NOTHING_TO_COMMIT",
3545
+ "NOT_IMPLEMENTED",
3546
+ "INVALID_QUERY",
3547
+ "INVALID_TARGET",
3548
+ "EXPLORER_FAILED"
3549
+ ];
3550
+ //#endregion
3359
3551
  //#region src/rpc.ts
3360
3552
  const WS_METHODS = {
3361
3553
  scanConversations: "pan.scanConversations",
@@ -3381,6 +3573,20 @@ const WS_METHODS = {
3381
3573
  readFileAtPath: "pan.readFileAtPath",
3382
3574
  writeFileAtPath: "pan.writeFileAtPath",
3383
3575
  resolveFilePathExists: "pan.resolveFilePathExists",
3576
+ explorerListDir: "pan.explorerListDir",
3577
+ explorerReadFile: "pan.explorerReadFile",
3578
+ explorerWriteFile: "pan.explorerWriteFile",
3579
+ explorerCreate: "pan.explorerCreate",
3580
+ explorerRename: "pan.explorerRename",
3581
+ explorerCopy: "pan.explorerCopy",
3582
+ explorerDelete: "pan.explorerDelete",
3583
+ explorerRestore: "pan.explorerRestore",
3584
+ explorerGitStatus: "pan.explorerGitStatus",
3585
+ explorerGitStage: "pan.explorerGitStage",
3586
+ explorerSearchFiles: "pan.explorerSearchFiles",
3587
+ explorerSearchContent: "pan.explorerSearchContent",
3588
+ explorerWatch: "pan.explorerWatch",
3589
+ explorerBeginEdit: "pan.explorerBeginEdit",
3384
3590
  terminalOpen: "pan.terminalOpen",
3385
3591
  terminalWrite: "pan.terminalWrite",
3386
3592
  terminalResize: "pan.terminalResize",
@@ -3510,7 +3716,9 @@ const ConversationWindow = effect.Schema.Struct({
3510
3716
  cursor: effect.Schema.NullOr(effect.Schema.String),
3511
3717
  hasOlder: effect.Schema.Boolean,
3512
3718
  /** `"<dev>:<ino>"` of the transcript file the window was read from. */
3513
- transcript: effect.Schema.optional(effect.Schema.String)
3719
+ transcript: effect.Schema.optional(effect.Schema.String),
3720
+ /** PAN-5211: the server holds only this transcript's newest records; older pages load from disk. */
3721
+ bounded: effect.Schema.optional(effect.Schema.Boolean)
3514
3722
  });
3515
3723
  /** PAN-4558: what a resubscribing client already holds. */
3516
3724
  const ConversationResume = effect.Schema.Struct({
@@ -3730,6 +3938,77 @@ const WriteFileAtPathRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.writeFileAtPa
3730
3938
  success: WriteFileAtPathResult,
3731
3939
  error: PanRpcError
3732
3940
  });
3941
+ const ExplorerListDirRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerListDir, {
3942
+ payload: ExplorerListDirInput,
3943
+ success: ExplorerListDirResult,
3944
+ error: PanRpcError
3945
+ });
3946
+ const ExplorerReadFileRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerReadFile, {
3947
+ payload: ExplorerReadFileInput,
3948
+ success: ExplorerReadFileResult,
3949
+ error: PanRpcError
3950
+ });
3951
+ const ExplorerWriteFileRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerWriteFile, {
3952
+ payload: ExplorerWriteFileInput,
3953
+ success: ExplorerWriteFileResult,
3954
+ error: PanRpcError
3955
+ });
3956
+ const ExplorerCreateRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerCreate, {
3957
+ payload: ExplorerCreateInput,
3958
+ success: ExplorerEntryResult,
3959
+ error: PanRpcError
3960
+ });
3961
+ const ExplorerRenameRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerRename, {
3962
+ payload: ExplorerRenameInput,
3963
+ success: ExplorerEntryResult,
3964
+ error: PanRpcError
3965
+ });
3966
+ const ExplorerCopyRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerCopy, {
3967
+ payload: ExplorerCopyInput,
3968
+ success: ExplorerEntryResult,
3969
+ error: PanRpcError
3970
+ });
3971
+ const ExplorerDeleteRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerDelete, {
3972
+ payload: ExplorerDeleteInput,
3973
+ success: ExplorerDeleteResult,
3974
+ error: PanRpcError
3975
+ });
3976
+ const ExplorerRestoreRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerRestore, {
3977
+ payload: ExplorerRestoreInput,
3978
+ success: ExplorerRestoreResult,
3979
+ error: PanRpcError
3980
+ });
3981
+ const ExplorerGitStatusRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerGitStatus, {
3982
+ payload: ExplorerGitStatusInput,
3983
+ success: ExplorerGitStatusResult,
3984
+ error: PanRpcError
3985
+ });
3986
+ const ExplorerGitStageRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerGitStage, {
3987
+ payload: ExplorerGitStageInput,
3988
+ success: ExplorerGitStageResult,
3989
+ error: PanRpcError
3990
+ });
3991
+ const ExplorerSearchFilesRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerSearchFiles, {
3992
+ payload: ExplorerSearchFilesInput,
3993
+ success: ExplorerSearchFilesResult,
3994
+ error: PanRpcError
3995
+ });
3996
+ const ExplorerSearchContentRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerSearchContent, {
3997
+ payload: ExplorerSearchContentInput,
3998
+ success: ExplorerSearchContentResult,
3999
+ error: PanRpcError
4000
+ });
4001
+ const ExplorerWatchRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerWatch, {
4002
+ payload: ExplorerWatchInput,
4003
+ success: ExplorerWatchBatch,
4004
+ error: PanRpcError,
4005
+ stream: true
4006
+ });
4007
+ const ExplorerBeginEditRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.explorerBeginEdit, {
4008
+ payload: ExplorerBeginEditInput,
4009
+ success: ExplorerBeginEditResult,
4010
+ error: PanRpcError
4011
+ });
3733
4012
  /**
3734
4013
  * 10c. Resolve whether a file path candidate exists on disk (PAN-1457).
3735
4014
  *
@@ -4009,7 +4288,7 @@ const GetConversationStatsRpc = effect_unstable_rpc_Rpc.make(WS_METHODS.getConve
4009
4288
  error: PanRpcError
4010
4289
  });
4011
4290
  /** All Overdeck WebSocket RPC methods */
4012
- const PanRpcGroup = effect_unstable_rpc_RpcGroup.make(SubscribeDomainEventsRpc, SubscribeIssueEventsRpc, SubscribeTerminalRpc, SubscribeAgentOutputRpc, GetSnapshotRpc, ReplayEventsRpc, ReadWorkspaceFileRpc, ReadFileAtPathRpc, WriteFileAtPathRpc, ResolveFilePathExistsRpc, TerminalOpenRpc, TerminalWriteRpc, TerminalResizeRpc, TerminalCloseRpc, StartPlanningRpc, StartAgentRpc, DeepWipeRpc, SendTerminalInputRpc, ResizeTerminalRpc, SubscribeConversationMessagesRpc, SubscribeProjectSessionTreeRpc, ShellOpenInEditorRpc, GetAvailableEditorsRpc, ShellOpenInBrowserRpc, GetAvailableBrowsersRpc, ScanConversationsRpc, SearchConversationsRpc, ListDiscoveredSessionsRpc, ListSessionsFeedRpc, GetSessionsFeedFacetsRpc, GetDiscoveredSessionRpc, EnrichSessionsRpc, EmbedSessionsRpc, GetConversationCostRpc, GetConversationCostByWorkspaceRpc, GetConversationStatsRpc);
4291
+ const PanRpcGroup = effect_unstable_rpc_RpcGroup.make(SubscribeDomainEventsRpc, SubscribeIssueEventsRpc, SubscribeTerminalRpc, SubscribeAgentOutputRpc, GetSnapshotRpc, ReplayEventsRpc, ReadWorkspaceFileRpc, ReadFileAtPathRpc, WriteFileAtPathRpc, ResolveFilePathExistsRpc, ExplorerListDirRpc, ExplorerReadFileRpc, ExplorerWriteFileRpc, ExplorerCreateRpc, ExplorerRenameRpc, ExplorerCopyRpc, ExplorerDeleteRpc, ExplorerRestoreRpc, ExplorerGitStatusRpc, ExplorerGitStageRpc, ExplorerSearchFilesRpc, ExplorerSearchContentRpc, ExplorerWatchRpc, ExplorerBeginEditRpc, TerminalOpenRpc, TerminalWriteRpc, TerminalResizeRpc, TerminalCloseRpc, StartPlanningRpc, StartAgentRpc, DeepWipeRpc, SendTerminalInputRpc, ResizeTerminalRpc, SubscribeConversationMessagesRpc, SubscribeProjectSessionTreeRpc, ShellOpenInEditorRpc, GetAvailableEditorsRpc, ShellOpenInBrowserRpc, GetAvailableBrowsersRpc, ScanConversationsRpc, SearchConversationsRpc, ListDiscoveredSessionsRpc, ListSessionsFeedRpc, GetSessionsFeedFacetsRpc, GetDiscoveredSessionRpc, EnrichSessionsRpc, EmbedSessionsRpc, GetConversationCostRpc, GetConversationCostByWorkspaceRpc, GetConversationStatsRpc);
4013
4292
  //#endregion
4014
4293
  //#region src/agent-runtime-merge.ts
4015
4294
  function defaultRuntimeSnapshot(agentId, timestamp, sequence) {
@@ -5791,6 +6070,52 @@ const FlywheelConversationSummary = effect.Schema.Struct({
5791
6070
  createdAt: effect.Schema.String,
5792
6071
  sessionAlive: effect.Schema.Boolean
5793
6072
  });
6073
+ /**
6074
+ * One `;`-separated item of the newest tick's needs-you line (PAN-5198), with
6075
+ * the oldest tick of the item's current unbroken run: the message that raised
6076
+ * it, which is where the loop explained it.
6077
+ */
6078
+ const FlywheelNeedsYouItem = effect.Schema.Struct({
6079
+ text: effect.Schema.String,
6080
+ firstRaisedTick: effect.Schema.Number,
6081
+ /** The first-raised tick message's `createdAt`. */
6082
+ firstRaisedAt: effect.Schema.String,
6083
+ /** The first-raised tick message's id, when the harness records one. */
6084
+ firstRaisedMessageId: effect.Schema.optional(effect.Schema.String)
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. */
6102
+ function needsYouItemKey(text) {
6103
+ return parseNeedsYouTarget(text).label.toLowerCase();
6104
+ }
6105
+ /** Split a needs-you line on `;`: trimmed, empty pieces dropped, one per key. */
6106
+ function splitNeedsYouItems(needsYou) {
6107
+ if (!needsYou) return [];
6108
+ const seen = /* @__PURE__ */ new Set();
6109
+ const items = [];
6110
+ for (const piece of needsYou.split(";")) {
6111
+ const text = piece.trim();
6112
+ const key = needsYouItemKey(text);
6113
+ if (!text || seen.has(key)) continue;
6114
+ seen.add(key);
6115
+ items.push(text);
6116
+ }
6117
+ return items;
6118
+ }
5794
6119
  const FlywheelLastTick = effect.Schema.Struct({
5795
6120
  tick: effect.Schema.Number,
5796
6121
  pick: effect.Schema.NullOr(effect.Schema.String),
@@ -5800,7 +6125,9 @@ const FlywheelLastTick = effect.Schema.Struct({
5800
6125
  /** The assistant message's `createdAt`. */
5801
6126
  at: effect.Schema.String,
5802
6127
  /** The assistant message's id, when the harness records one. */
5803
- messageId: effect.Schema.optional(effect.Schema.String)
6128
+ messageId: effect.Schema.optional(effect.Schema.String),
6129
+ /** The needs-you line split into items, each with its first-raised tick (PAN-5198). */
6130
+ needsYouItems: effect.Schema.optional(effect.Schema.Array(FlywheelNeedsYouItem))
5804
6131
  });
5805
6132
  const FlywheelPolicies = effect.Schema.Struct({
5806
6133
  auto_pickup_backlog: effect.Schema.Boolean,
@@ -5919,6 +6246,7 @@ const CONTEXT_LAYER_KINDS = [
5919
6246
  ];
5920
6247
  const CONTEXT_PREVIEW_HARNESSES = [
5921
6248
  "claude-code",
6249
+ "pi",
5922
6250
  "ohmypi",
5923
6251
  "codex",
5924
6252
  "acp",
@@ -6031,6 +6359,7 @@ const ContextPreviewRequest = effect.Schema.Struct({
6031
6359
  });
6032
6360
  const ContextHarnessPreviews = effect.Schema.Struct({
6033
6361
  "claude-code": effect.Schema.String,
6362
+ pi: effect.Schema.optional(effect.Schema.String),
6034
6363
  ohmypi: effect.Schema.String,
6035
6364
  codex: effect.Schema.String,
6036
6365
  acp: effect.Schema.String,
@@ -6295,6 +6624,18 @@ const OHMYPI_CAPABILITIES = {
6295
6624
  runsOnFlyMachine: false,
6296
6625
  overdeckMcp: false
6297
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
+ };
6298
6639
  const CODEX_CAPABILITIES = {
6299
6640
  contextChannel: "developer_instructions",
6300
6641
  initialPromptMustLand: false,
@@ -6506,7 +6847,7 @@ const CLAUDE_CODE_BEHAVIOR = {
6506
6847
  steerKind: "send-now-keys"
6507
6848
  };
6508
6849
  const OHMYPI_BEHAVIOR = {
6509
- displayName: "Pi",
6850
+ displayName: "Oh My Pi",
6510
6851
  capabilities: OHMYPI_CAPABILITIES,
6511
6852
  nativeCommands: [],
6512
6853
  executableName: "omp",
@@ -6535,6 +6876,22 @@ const OHMYPI_BEHAVIOR = {
6535
6876
  "xhigh"
6536
6877
  ]
6537
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
+ };
6538
6895
  const CODEX_BEHAVIOR = {
6539
6896
  displayName: "Codex",
6540
6897
  capabilities: CODEX_CAPABILITIES,
@@ -6690,6 +7047,7 @@ const PRIME_AGENT_BEHAVIOR = {
6690
7047
  const BEHAVIORS = {
6691
7048
  "opencode": OPENCODE_BEHAVIOR,
6692
7049
  "claude-code": CLAUDE_CODE_BEHAVIOR,
7050
+ pi: PI_BEHAVIOR,
6693
7051
  ohmypi: OHMYPI_BEHAVIOR,
6694
7052
  codex: CODEX_BEHAVIOR,
6695
7053
  acp: ACP_BEHAVIOR,
@@ -6698,14 +7056,8 @@ const BEHAVIORS = {
6698
7056
  "prime-agent": PRIME_AGENT_BEHAVIOR,
6699
7057
  grok: GROK_BEHAVIOR
6700
7058
  };
6701
- const LEGACY_PI_HARNESS = "pi";
6702
- /** True for the legacy stored harness alias `pi` (PAN-1989), which now means ohmypi. */
6703
- function isLegacyPiHarnessName(raw) {
6704
- return raw === LEGACY_PI_HARNESS;
6705
- }
6706
- /** 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. */
6707
7060
  function normalizeHarnessName(raw) {
6708
- if (isLegacyPiHarnessName(raw)) return "ohmypi";
6709
7061
  return typeof raw === "string" && KNOWN_HARNESSES.has(raw) ? raw : null;
6710
7062
  }
6711
7063
  function getHarnessBehavior(harness) {
@@ -6902,6 +7254,7 @@ const TELEMETRY_CLI_VERBS = [
6902
7254
  ];
6903
7255
  const TELEMETRY_HARNESSES = [
6904
7256
  "claude-code",
7257
+ "pi",
6905
7258
  "ohmypi",
6906
7259
  "codex",
6907
7260
  "acp",
@@ -7037,6 +7390,7 @@ const TELEMETRY_CLIENT_ROUTES = [
7037
7390
  "/api/conversations/:name/kickoff",
7038
7391
  "/api/conversations/:name/message",
7039
7392
  "/api/conversations/:name/message-locator",
7393
+ "/api/conversations/:name/message/cancel",
7040
7394
  "/api/conversations/:name/messages",
7041
7395
  "/api/conversations/:name/plan-action",
7042
7396
  "/api/conversations/:name/preview-ports",
@@ -7060,6 +7414,12 @@ const TELEMETRY_CLIENT_ROUTES = [
7060
7414
  "/api/costs/request-digest",
7061
7415
  "/api/costs/summary",
7062
7416
  "/api/disk-alert",
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",
7422
+ "/api/explorer/upload",
7063
7423
  "/api/fleet/conversations",
7064
7424
  "/api/fleet/issues/:id/activity",
7065
7425
  "/api/fleet/issues/:id/start",
@@ -7074,6 +7434,8 @@ const TELEMETRY_CLIENT_ROUTES = [
7074
7434
  "/api/harness-auto-update",
7075
7435
  "/api/issues",
7076
7436
  "/api/issues/:id",
7437
+ "/api/issues/:id/check-runs",
7438
+ "/api/issues/:id/costs",
7077
7439
  "/api/issues/resource-allocated",
7078
7440
  "/api/lanes",
7079
7441
  "/api/lanes/:name",
@@ -7183,6 +7545,7 @@ const TELEMETRY_CLIENT_ROUTE_AREAS = [
7183
7545
  "effort",
7184
7546
  "environment",
7185
7547
  "events",
7548
+ "explorer",
7186
7549
  "fleet",
7187
7550
  "flywheel",
7188
7551
  "fs",
@@ -9863,7 +10226,7 @@ const COMPOSER_COMMAND_MANIFEST = [
9863
10226
  },
9864
10227
  {
9865
10228
  "flags": "--harness <harness>",
9866
- "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)",
9867
10230
  "required": true,
9868
10231
  "valueHint": "harness"
9869
10232
  },
@@ -10787,7 +11150,7 @@ const COMPOSER_COMMAND_MANIFEST = [
10787
11150
  },
10788
11151
  {
10789
11152
  "flags": "--harness <harness>",
10790
- "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)",
10791
11154
  "required": true,
10792
11155
  "valueHint": "harness"
10793
11156
  },
@@ -19542,6 +19905,27 @@ function notificationAllowed(prefs, category, nowMs) {
19542
19905
  if (category === "summary") return true;
19543
19906
  return !prefs.muted.includes(category);
19544
19907
  }
19908
+ const PHONE_ISSUE_EVENT_LABELS = {
19909
+ stopped: "Agent stopped responding",
19910
+ "verification.started": "Work finished; verification started",
19911
+ "merge.completed": "Merged",
19912
+ "merge.failed": "Merge failed",
19913
+ "review.stall-escalated": "Review stalled and needs you",
19914
+ "conflict.repair-escalated": "Conflict repair needs you"
19915
+ };
19916
+ /** The kind when `value` is a known event, else null; never throws. */
19917
+ function parsePhoneIssueEvent(value) {
19918
+ return typeof value === "string" && Object.prototype.hasOwnProperty.call(PHONE_ISSUE_EVENT_LABELS, value) ? value : null;
19919
+ }
19920
+ /** `/m/pipeline?issue=<id>[&event=<kind>&at=<iso>]`: the phone issue sheet (PAN-5219 D-1). */
19921
+ function phoneIssueSheetPath(issueId, event) {
19922
+ const params = new URLSearchParams({ issue: issueId });
19923
+ if (event) {
19924
+ params.set("event", event.kind);
19925
+ params.set("at", event.at);
19926
+ }
19927
+ return `/m/pipeline?${params.toString()}`;
19928
+ }
19545
19929
  //#endregion
19546
19930
  //#region src/connector-pairing.ts
19547
19931
  const CONNECTOR_PAIR_SCHEME = "overdeck-connector";
@@ -20436,6 +20820,7 @@ exports.DomainEvent = DomainEvent;
20436
20820
  exports.EDITORS = EDITORS;
20437
20821
  exports.EFFORT_LEVELS = EFFORT_LEVELS;
20438
20822
  exports.ENVIRONMENT_PROTOCOL_VERSION = ENVIRONMENT_PROTOCOL_VERSION;
20823
+ exports.EXPLORER_ERROR_CODES = EXPLORER_ERROR_CODES;
20439
20824
  exports.EditorIdSchema = EditorIdSchema;
20440
20825
  exports.EffortLevelSchema = EffortLevelSchema;
20441
20826
  exports.EmbedProgressEvent = EmbedProgressEvent;
@@ -20449,6 +20834,55 @@ exports.EnrichStatsSnapshot = EnrichStatsSnapshot;
20449
20834
  exports.EnvironmentCapabilities = EnvironmentCapabilities;
20450
20835
  exports.EnvironmentDescriptor = EnvironmentDescriptor;
20451
20836
  exports.EnvironmentId = EnvironmentId;
20837
+ exports.ExplorerBeginEditInput = ExplorerBeginEditInput;
20838
+ exports.ExplorerBeginEditResult = ExplorerBeginEditResult;
20839
+ exports.ExplorerBeginEditRpc = ExplorerBeginEditRpc;
20840
+ exports.ExplorerCopyInput = ExplorerCopyInput;
20841
+ exports.ExplorerCopyRpc = ExplorerCopyRpc;
20842
+ exports.ExplorerCreateInput = ExplorerCreateInput;
20843
+ exports.ExplorerCreateRpc = ExplorerCreateRpc;
20844
+ exports.ExplorerDeleteInput = ExplorerDeleteInput;
20845
+ exports.ExplorerDeleteResult = ExplorerDeleteResult;
20846
+ exports.ExplorerDeleteRpc = ExplorerDeleteRpc;
20847
+ exports.ExplorerEntry = ExplorerEntry;
20848
+ exports.ExplorerEntryKind = ExplorerEntryKind;
20849
+ exports.ExplorerEntryResult = ExplorerEntryResult;
20850
+ exports.ExplorerGitCommittedEntry = ExplorerGitCommittedEntry;
20851
+ exports.ExplorerGitCommittedStatus = ExplorerGitCommittedStatus;
20852
+ exports.ExplorerGitFileStatus = ExplorerGitFileStatus;
20853
+ exports.ExplorerGitStageInput = ExplorerGitStageInput;
20854
+ exports.ExplorerGitStageResult = ExplorerGitStageResult;
20855
+ exports.ExplorerGitStageRpc = ExplorerGitStageRpc;
20856
+ exports.ExplorerGitStatusEntry = ExplorerGitStatusEntry;
20857
+ exports.ExplorerGitStatusInput = ExplorerGitStatusInput;
20858
+ exports.ExplorerGitStatusResult = ExplorerGitStatusResult;
20859
+ exports.ExplorerGitStatusRpc = ExplorerGitStatusRpc;
20860
+ exports.ExplorerListDirInput = ExplorerListDirInput;
20861
+ exports.ExplorerListDirResult = ExplorerListDirResult;
20862
+ exports.ExplorerListDirRpc = ExplorerListDirRpc;
20863
+ exports.ExplorerReadFileInput = ExplorerReadFileInput;
20864
+ exports.ExplorerReadFileResult = ExplorerReadFileResult;
20865
+ exports.ExplorerReadFileRpc = ExplorerReadFileRpc;
20866
+ exports.ExplorerRenameInput = ExplorerRenameInput;
20867
+ exports.ExplorerRenameRpc = ExplorerRenameRpc;
20868
+ exports.ExplorerRestoreInput = ExplorerRestoreInput;
20869
+ exports.ExplorerRestoreResult = ExplorerRestoreResult;
20870
+ exports.ExplorerRestoreRpc = ExplorerRestoreRpc;
20871
+ exports.ExplorerRootId = ExplorerRootId;
20872
+ exports.ExplorerSearchContentInput = ExplorerSearchContentInput;
20873
+ exports.ExplorerSearchContentMatch = ExplorerSearchContentMatch;
20874
+ exports.ExplorerSearchContentResult = ExplorerSearchContentResult;
20875
+ exports.ExplorerSearchContentRpc = ExplorerSearchContentRpc;
20876
+ exports.ExplorerSearchFilesInput = ExplorerSearchFilesInput;
20877
+ exports.ExplorerSearchFilesResult = ExplorerSearchFilesResult;
20878
+ exports.ExplorerSearchFilesRpc = ExplorerSearchFilesRpc;
20879
+ exports.ExplorerWatchBatch = ExplorerWatchBatch;
20880
+ exports.ExplorerWatchEvent = ExplorerWatchEvent;
20881
+ exports.ExplorerWatchInput = ExplorerWatchInput;
20882
+ exports.ExplorerWatchRpc = ExplorerWatchRpc;
20883
+ exports.ExplorerWriteFileInput = ExplorerWriteFileInput;
20884
+ exports.ExplorerWriteFileResult = ExplorerWriteFileResult;
20885
+ exports.ExplorerWriteFileRpc = ExplorerWriteFileRpc;
20452
20886
  exports.ExtractionProviderConfig = ExtractionProviderConfig;
20453
20887
  exports.ExtractionProviderTarget = ExtractionProviderTarget;
20454
20888
  exports.FLEET_BINARY_ORDER = FLEET_BINARY_ORDER;
@@ -20478,6 +20912,7 @@ exports.FlywheelHttpUrl = FlywheelHttpUrl;
20478
20912
  exports.FlywheelInFlightRow = FlywheelInFlightRow;
20479
20913
  exports.FlywheelJournalSummary = FlywheelJournalSummary;
20480
20914
  exports.FlywheelLastTick = FlywheelLastTick;
20915
+ exports.FlywheelNeedsYouItem = FlywheelNeedsYouItem;
20481
20916
  exports.FlywheelOrchestrator = FlywheelOrchestrator;
20482
20917
  exports.FlywheelOrderBookSummary = FlywheelOrderBookSummary;
20483
20918
  exports.FlywheelOrders = FlywheelOrders;
@@ -20617,6 +21052,7 @@ exports.OrderBookPosture = OrderBookPosture;
20617
21052
  exports.OrderBookSettings = OrderBookSettings;
20618
21053
  exports.OrderBookStatus = OrderBookStatus;
20619
21054
  exports.PHONE_APP_SCHEME = PHONE_APP_SCHEME;
21055
+ exports.PHONE_ISSUE_EVENT_LABELS = PHONE_ISSUE_EVENT_LABELS;
20620
21056
  exports.PHONE_NOTIFICATION_CATEGORIES = PHONE_NOTIFICATION_CATEGORIES;
20621
21057
  exports.PHONE_PAIR_CODE_RE = PHONE_PAIR_CODE_RE;
20622
21058
  exports.PHONE_PAIR_ENVIRONMENT_ID_RE = PHONE_PAIR_ENVIRONMENT_ID_RE;
@@ -20624,6 +21060,8 @@ exports.PHONE_PAIR_LINK_PREFIX = PHONE_PAIR_LINK_PREFIX;
20624
21060
  exports.PHONE_PAIR_LINK_VERSION = PHONE_PAIR_LINK_VERSION;
20625
21061
  exports.PHONE_PAIR_MACHINE_KEY_RE = PHONE_PAIR_MACHINE_KEY_RE;
20626
21062
  exports.PIPELINE_MEMBERSHIP_LOADING_CODE = PIPELINE_MEMBERSHIP_LOADING_CODE;
21063
+ exports.PI_BEHAVIOR = PI_BEHAVIOR;
21064
+ exports.PI_CAPABILITIES = PI_CAPABILITIES;
20627
21065
  exports.PRIME_AGENT_BEHAVIOR = PRIME_AGENT_BEHAVIOR;
20628
21066
  exports.PRIME_AGENT_CAPABILITIES = PRIME_AGENT_CAPABILITIES;
20629
21067
  exports.PUSH_PLAINTEXT_MAX_BYTES = PUSH_PLAINTEXT_MAX_BYTES;
@@ -20861,13 +21299,13 @@ exports.isConfiguredPullRequestRepo = isConfiguredPullRequestRepo;
20861
21299
  exports.isEffortLevel = isEffortLevel;
20862
21300
  exports.isIssueAttention = isIssueAttention;
20863
21301
  exports.isIssueState = isIssueState;
20864
- exports.isLegacyPiHarnessName = isLegacyPiHarnessName;
20865
21302
  exports.isProtocolCompatible = isProtocolCompatible;
20866
21303
  exports.isSingletonConversation = isSingletonConversation;
20867
21304
  exports.isTerminalBackendName = isTerminalBackendName;
20868
21305
  exports.isTerminalTurnDiffSummaryStatus = isTerminalTurnDiffSummaryStatus;
20869
21306
  exports.laneActivityOf = laneActivityOf;
20870
21307
  exports.linkedConversationName = linkedConversationName;
21308
+ exports.needsYouItemKey = needsYouItemKey;
20871
21309
  exports.negotiateHello = negotiateHello;
20872
21310
  exports.normalizeChannelReplyPayload = normalizeChannelReplyPayload;
20873
21311
  exports.normalizeColorTheme = normalizeColorTheme;
@@ -20878,10 +21316,13 @@ exports.overdeckInstallCommand = overdeckInstallCommand;
20878
21316
  exports.paneAgentKey = paneAgentKey;
20879
21317
  exports.parseConnectorPairLink = parseConnectorPairLink;
20880
21318
  exports.parseLinkedConversationName = parseLinkedConversationName;
21319
+ exports.parseNeedsYouTarget = parseNeedsYouTarget;
21320
+ exports.parsePhoneIssueEvent = parsePhoneIssueEvent;
20881
21321
  exports.parsePhoneNotificationPreferences = parsePhoneNotificationPreferences;
20882
21322
  exports.parsePhonePairLink = parsePhonePairLink;
20883
21323
  exports.parsePullRequestRef = parsePullRequestRef;
20884
21324
  exports.parseTrackerIssueUrl = parseTrackerIssueUrl;
21325
+ exports.phoneIssueSheetPath = phoneIssueSheetPath;
20885
21326
  exports.presenceForPaneState = presenceForPaneState;
20886
21327
  exports.presetToCron = presetToCron;
20887
21328
  exports.projectLegacySystemHealthSummary = projectLegacySystemHealthSummary;
@@ -20892,6 +21333,7 @@ exports.resolveEffectivePullRequest = resolveEffectivePullRequest;
20892
21333
  exports.resolveTrackerIssueId = resolveTrackerIssueId;
20893
21334
  exports.sharedPromptRefusal = sharedPromptRefusal;
20894
21335
  exports.slugifyThemeId = slugifyThemeId;
21336
+ exports.splitNeedsYouItems = splitNeedsYouItems;
20895
21337
  exports.syncSnapshot = syncSnapshot;
20896
21338
  exports.timelineKeyOfMessage = timelineKeyOfMessage;
20897
21339
  exports.timelineKeyOfWork = timelineKeyOfWork;