runpane 2.3.6 → 2.3.8

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.
@@ -116,6 +116,16 @@ exports.RUNPANE_CONTRACT = {
116
116
  "runpane doctor"
117
117
  ]
118
118
  },
119
+ {
120
+ "name": "agents doctor",
121
+ "summary": "Diagnose whether a built-in agent command is available in a Pane repository environment.",
122
+ "usage": [
123
+ "runpane agents doctor --agent <codex|claude> [--repo <selector>] [--json]"
124
+ ],
125
+ "jsonSchemas": [
126
+ "agentDoctorResult"
127
+ ]
128
+ },
119
129
  {
120
130
  "name": "agent-context",
121
131
  "summary": "Print token-efficient Pane command context for coding agents.",
@@ -193,6 +203,16 @@ exports.RUNPANE_CONTRACT = {
193
203
  "panelOutputResult"
194
204
  ]
195
205
  },
206
+ {
207
+ "name": "panels screen",
208
+ "summary": "Read a compact current-screen view from a terminal panel.",
209
+ "usage": [
210
+ "runpane panels screen --panel <panel-id> [--limit <count>] [--json]"
211
+ ],
212
+ "jsonSchemas": [
213
+ "panelScreenResult"
214
+ ]
215
+ },
196
216
  {
197
217
  "name": "panels input",
198
218
  "summary": "Send input bytes to a terminal panel.",
@@ -204,6 +224,28 @@ exports.RUNPANE_CONTRACT = {
204
224
  "panelInputRequest",
205
225
  "panelInputResult"
206
226
  ]
227
+ },
228
+ {
229
+ "name": "panels submit",
230
+ "summary": "Send text to a terminal panel and append a terminal Enter byte.",
231
+ "usage": [
232
+ "runpane panels submit --panel <panel-id> (--text <text>|--input-file <path|->) --yes [--json]"
233
+ ],
234
+ "mutates": true,
235
+ "jsonSchemas": [
236
+ "panelSubmitRequest",
237
+ "panelSubmitResult"
238
+ ]
239
+ },
240
+ {
241
+ "name": "panels wait",
242
+ "summary": "Wait for a terminal panel to initialize, become ready/idle, or contain text.",
243
+ "usage": [
244
+ "runpane panels wait --panel <panel-id> [--for initialized|ready|idle|text] [--contains <text>] [--timeout-ms <ms>] [--interval-ms <ms>] [--json]"
245
+ ],
246
+ "jsonSchemas": [
247
+ "panelWaitResult"
248
+ ]
207
249
  }
208
250
  ],
209
251
  "flags": {
@@ -374,11 +416,36 @@ exports.RUNPANE_CONTRACT = {
374
416
  "value": "<milliseconds>",
375
417
  "description": "Maximum time to wait for each pane creation job."
376
418
  },
419
+ {
420
+ "name": "--ready-timeout-ms",
421
+ "value": "<milliseconds>",
422
+ "description": "Readiness wait timeout for panes create --wait-ready."
423
+ },
424
+ {
425
+ "name": "--concurrency",
426
+ "value": "<count>",
427
+ "description": "Accepted for forward compatibility. Pane currently serializes multi-pane session creation so queued jobs do not time out before starting."
428
+ },
377
429
  {
378
430
  "name": "--limit",
379
431
  "value": "<count>",
380
432
  "description": "Maximum recent output lines or records to read."
381
433
  },
434
+ {
435
+ "name": "--for",
436
+ "value": "<initialized|ready|idle|text>",
437
+ "description": "Panel wait condition."
438
+ },
439
+ {
440
+ "name": "--contains",
441
+ "value": "<text>",
442
+ "description": "Text to wait for with panels wait --for text."
443
+ },
444
+ {
445
+ "name": "--interval-ms",
446
+ "value": "<milliseconds>",
447
+ "description": "Polling interval for panels wait."
448
+ },
382
449
  {
383
450
  "name": "--text",
384
451
  "value": "<text>",
@@ -394,6 +461,10 @@ exports.RUNPANE_CONTRACT = {
394
461
  {
395
462
  "name": "--json",
396
463
  "description": "Print machine-readable JSON output."
464
+ },
465
+ {
466
+ "name": "--wait-ready",
467
+ "description": "Wait for created terminal panels to be ready before returning."
397
468
  }
398
469
  ]
399
470
  },
@@ -408,13 +479,17 @@ exports.RUNPANE_CONTRACT = {
408
479
  " runpane version",
409
480
  " runpane doctor",
410
481
  " runpane agent-context [--json]",
482
+ " runpane agents doctor --agent <codex|claude> [--repo <selector>] [--json]",
411
483
  " runpane repos list [--json]",
412
484
  " runpane repos add --path <path> [--name <name>]",
413
485
  " runpane panes list [--repo <selector>] [--json]",
414
- " runpane panes create --repo <selector> --name <name> --agent <codex|claude>",
486
+ " runpane panes create --repo <selector> --name <name> --agent <codex|claude> [--wait-ready]",
415
487
  " runpane panels list --pane <pane-id> [--json]",
416
488
  " runpane panels output --panel <panel-id> [--limit <count>] [--json]",
417
- " runpane panels input --panel <panel-id> --text <text> --yes",
489
+ " runpane panels screen --panel <panel-id> [--limit <count>] [--json]",
490
+ " runpane panels input --panel <panel-id> --input-file <path|-> --yes",
491
+ " runpane panels submit --panel <panel-id> --text <text> --yes",
492
+ " runpane panels wait --panel <panel-id> [--for ready|idle|text] [--json]",
418
493
  " runpane help [command]",
419
494
  "",
420
495
  "Quick start:",
@@ -425,7 +500,6 @@ exports.RUNPANE_CONTRACT = {
425
500
  " npx --yes runpane@latest install client",
426
501
  " npx --yes runpane@latest install daemon --label \"My Server\"",
427
502
  " pnpm dlx runpane@latest",
428
- " pipx run runpane",
429
503
  "",
430
504
  "Run \"runpane agent-context\" when an agent needs Pane command context.",
431
505
  "Run \"runpane help panes create\" for pane orchestration options."
@@ -551,6 +625,9 @@ exports.RUNPANE_CONTRACT = {
551
625
  " --initial-input-file <path|-> Read initial input from a file or stdin",
552
626
  " --from-json <path|-> Read a full request payload",
553
627
  " --timeout-ms <milliseconds> Pane creation timeout",
628
+ " --wait-ready Wait for terminal readiness before returning",
629
+ " --ready-timeout-ms <ms> Readiness wait timeout; defaults to 30000",
630
+ " --concurrency <count> Accepted; creation is currently serialized",
554
631
  " --pane-dir <path> Connect to a specific Pane data directory",
555
632
  " --json Print machine-readable output",
556
633
  " --dry-run Validate and preview without creating panes",
@@ -609,6 +686,59 @@ exports.RUNPANE_CONTRACT = {
609
686
  " runpane agent-context --json",
610
687
  " runpane agent-context --command \"panes create\"",
611
688
  " runpane agent-context --command \"panes create\" --json"
689
+ ],
690
+ "agents doctor": [
691
+ "Usage:",
692
+ " runpane agents doctor --agent <codex|claude> [--repo <selector>] [--json]",
693
+ "",
694
+ "Diagnoses whether Codex or Claude is available in the same repository environment Pane will use.",
695
+ "",
696
+ "Options:",
697
+ " --agent <codex|claude> Built-in agent command to diagnose",
698
+ " --repo <selector> active, id, exact path, or saved repository name; defaults to active",
699
+ " --pane-dir <path> Connect to a specific Pane data directory",
700
+ " --json Print machine-readable output"
701
+ ],
702
+ "panels screen": [
703
+ "Usage:",
704
+ " runpane panels screen --panel <panel-id> [--limit <count>] [--json]",
705
+ "",
706
+ "Reads a compact current-screen view from a terminal panel. Prefers alternate-screen/TUI output and falls back to recent scrollback.",
707
+ "",
708
+ "Options:",
709
+ " --panel <panel-id> Terminal panel id",
710
+ " --limit <count> Maximum lines to return; defaults to 80",
711
+ " --pane-dir <path> Connect to a specific Pane data directory",
712
+ " --json Print machine-readable output"
713
+ ],
714
+ "panels submit": [
715
+ "Usage:",
716
+ " runpane panels submit --panel <panel-id> (--text <text>|--input-file <path|->) --yes [--json]",
717
+ "",
718
+ "Sends text to a terminal panel and normalizes the final terminal Enter to CR. Use this for ordinary prompt answers and shell commands.",
719
+ "",
720
+ "Options:",
721
+ " --panel <panel-id> Terminal panel id",
722
+ " --text <text> Text to submit before Enter",
723
+ " --input-file <path|-> Read text from a file or stdin before Enter",
724
+ " --pane-dir <path> Connect to a specific Pane data directory",
725
+ " --json Print machine-readable output",
726
+ " --yes Skip confirmation for this mutating command"
727
+ ],
728
+ "panels wait": [
729
+ "Usage:",
730
+ " runpane panels wait --panel <panel-id> [--for initialized|ready|idle|text] [--contains <text>] [--timeout-ms <ms>] [--interval-ms <ms>] [--json]",
731
+ "",
732
+ "Polls a terminal panel until it is initialized, ready, idle, or contains text. Output is intentionally small and includes next-step guidance.",
733
+ "",
734
+ "Options:",
735
+ " --panel <panel-id> Terminal panel id",
736
+ " --for <condition> initialized, ready, idle, or text; defaults to ready for CLI panels and idle otherwise",
737
+ " --contains <text> Text required for --for text; implies --for text when omitted",
738
+ " --timeout-ms <milliseconds> Wait timeout; defaults to 30000",
739
+ " --interval-ms <milliseconds> Poll interval; defaults to 500",
740
+ " --pane-dir <path> Connect to a specific Pane data directory",
741
+ " --json Print machine-readable output"
612
742
  ]
613
743
  },
614
744
  "pip": {
@@ -621,13 +751,17 @@ exports.RUNPANE_CONTRACT = {
621
751
  " runpane version",
622
752
  " runpane doctor",
623
753
  " runpane agent-context [--json]",
754
+ " runpane agents doctor --agent <codex|claude> [--repo <selector>] [--json]",
624
755
  " runpane repos list [--json]",
625
756
  " runpane repos add --path <path> [--name <name>]",
626
757
  " runpane panes list [--repo <selector>] [--json]",
627
- " runpane panes create --repo <selector> --name <name> --agent <codex|claude>",
758
+ " runpane panes create --repo <selector> --name <name> --agent <codex|claude> [--wait-ready]",
628
759
  " runpane panels list --pane <pane-id> [--json]",
629
760
  " runpane panels output --panel <panel-id> [--limit <count>] [--json]",
630
- " runpane panels input --panel <panel-id> --text <text> --yes",
761
+ " runpane panels screen --panel <panel-id> [--limit <count>] [--json]",
762
+ " runpane panels input --panel <panel-id> --input-file <path|-> --yes",
763
+ " runpane panels submit --panel <panel-id> --text <text> --yes",
764
+ " runpane panels wait --panel <panel-id> [--for ready|idle|text] [--json]",
631
765
  " runpane help [command]",
632
766
  "",
633
767
  "Quick start:",
@@ -740,22 +874,25 @@ exports.RUNPANE_CONTRACT = {
740
874
  "Creates Pane sessions in a saved repository and opens a terminal-backed tool tab.",
741
875
  "",
742
876
  "Options:",
743
- " --repo <selector>",
744
- " --name <name>",
745
- " --worktree-name <name>",
746
- " --base-branch <branch>",
747
- " --agent <codex|claude>",
748
- " --tool-command <command>",
749
- " --title <title>",
750
- " --initial-input <text>",
751
- " --prompt <text>",
752
- " --initial-input-file <path|->",
753
- " --from-json <path|->",
754
- " --timeout-ms <milliseconds>",
755
- " --pane-dir <path>",
756
- " --json",
757
- " --dry-run",
758
- " --yes"
877
+ " --repo <selector> active, id, exact path, or saved repository name",
878
+ " --name <name> Pane/session name",
879
+ " --worktree-name <name> Worktree name; defaults to --name",
880
+ " --base-branch <branch> Base branch for the worktree",
881
+ " --agent <codex|claude> Built-in terminal template",
882
+ " --tool-command <command> Custom terminal command",
883
+ " --title <title> Terminal tab title",
884
+ " --initial-input <text> Text sent after the command is ready",
885
+ " --prompt <text> Alias for --initial-input",
886
+ " --initial-input-file <path|-> Read initial input from a file or stdin",
887
+ " --from-json <path|-> Read a full request payload",
888
+ " --timeout-ms <milliseconds> Pane creation timeout",
889
+ " --wait-ready Wait for terminal readiness before returning",
890
+ " --ready-timeout-ms <ms> Readiness wait timeout; defaults to 30000",
891
+ " --concurrency <count> Accepted; creation is currently serialized",
892
+ " --pane-dir <path> Connect to a specific Pane data directory",
893
+ " --json Print machine-readable output",
894
+ " --dry-run Validate and preview without creating panes",
895
+ " --yes Skip confirmation for mutating commands"
759
896
  ],
760
897
  "panels list": [
761
898
  "Usage:",
@@ -810,6 +947,59 @@ exports.RUNPANE_CONTRACT = {
810
947
  " runpane agent-context --json",
811
948
  " runpane agent-context --command \"panes create\"",
812
949
  " runpane agent-context --command \"panes create\" --json"
950
+ ],
951
+ "agents doctor": [
952
+ "Usage:",
953
+ " runpane agents doctor --agent <codex|claude> [--repo <selector>] [--json]",
954
+ "",
955
+ "Diagnoses whether Codex or Claude is available in the same repository environment Pane will use.",
956
+ "",
957
+ "Options:",
958
+ " --agent <codex|claude> Built-in agent command to diagnose",
959
+ " --repo <selector> active, id, exact path, or saved repository name; defaults to active",
960
+ " --pane-dir <path> Connect to a specific Pane data directory",
961
+ " --json Print machine-readable output"
962
+ ],
963
+ "panels screen": [
964
+ "Usage:",
965
+ " runpane panels screen --panel <panel-id> [--limit <count>] [--json]",
966
+ "",
967
+ "Reads a compact current-screen view from a terminal panel. Prefers alternate-screen/TUI output and falls back to recent scrollback.",
968
+ "",
969
+ "Options:",
970
+ " --panel <panel-id> Terminal panel id",
971
+ " --limit <count> Maximum lines to return; defaults to 80",
972
+ " --pane-dir <path> Connect to a specific Pane data directory",
973
+ " --json Print machine-readable output"
974
+ ],
975
+ "panels submit": [
976
+ "Usage:",
977
+ " runpane panels submit --panel <panel-id> (--text <text>|--input-file <path|->) --yes [--json]",
978
+ "",
979
+ "Sends text to a terminal panel and normalizes the final terminal Enter to CR. Use this for ordinary prompt answers and shell commands.",
980
+ "",
981
+ "Options:",
982
+ " --panel <panel-id> Terminal panel id",
983
+ " --text <text> Text to submit before Enter",
984
+ " --input-file <path|-> Read text from a file or stdin before Enter",
985
+ " --pane-dir <path> Connect to a specific Pane data directory",
986
+ " --json Print machine-readable output",
987
+ " --yes Skip confirmation for this mutating command"
988
+ ],
989
+ "panels wait": [
990
+ "Usage:",
991
+ " runpane panels wait --panel <panel-id> [--for initialized|ready|idle|text] [--contains <text>] [--timeout-ms <ms>] [--interval-ms <ms>] [--json]",
992
+ "",
993
+ "Polls a terminal panel until it is initialized, ready, idle, or contains text. Output is intentionally small and includes next-step guidance.",
994
+ "",
995
+ "Options:",
996
+ " --panel <panel-id> Terminal panel id",
997
+ " --for <condition> initialized, ready, idle, or text; defaults to ready for CLI panels and idle otherwise",
998
+ " --contains <text> Text required for --for text; implies --for text when omitted",
999
+ " --timeout-ms <milliseconds> Wait timeout; defaults to 30000",
1000
+ " --interval-ms <milliseconds> Poll interval; defaults to 500",
1001
+ " --pane-dir <path> Connect to a specific Pane data directory",
1002
+ " --json Print machine-readable output"
813
1003
  ]
814
1004
  }
815
1005
  },
@@ -884,7 +1074,7 @@ exports.RUNPANE_CONTRACT = {
884
1074
  "runpane panes create --from-json panes.json --yes --json",
885
1075
  "runpane panels list --pane <pane-id> --json",
886
1076
  "runpane panels output --panel <panel-id> --limit 200 --json",
887
- "runpane panels input --panel <panel-id> --text \"Continue\\n\" --yes --json",
1077
+ "printf 'Continue\\n' | runpane panels input --panel <panel-id> --input-file - --yes --json",
888
1078
  "runpane help",
889
1079
  "runpane <command> --help"
890
1080
  ],
@@ -904,13 +1094,13 @@ exports.RUNPANE_CONTRACT = {
904
1094
  "`runpane panes list` lists Pane sessions, optionally scoped to one saved repository.",
905
1095
  "`runpane panes create` connects to the running local Pane daemon, resolves the requested repository, creates Pane sessions, opens terminal-backed tool tabs, and optionally sends initial input to the started tool.",
906
1096
  "`runpane panels list` lists tool panels inside one Pane session.",
907
- "`runpane panels output` reads bounded recent terminal output from one panel.",
908
- "`runpane panels input` sends exact input bytes to one terminal panel. Include a newline in the input when the agent means Enter.",
1097
+ "`runpane panels output` reads bounded recent terminal output from one panel and strips common terminal control noise for agent use.",
1098
+ "`runpane panels input` sends exact input bytes to one terminal panel. Prefer `--input-file` for newlines, Ctrl-C, quotes, or shell-sensitive text.",
909
1099
  "`runpane panes create --prompt` is an alias for `--initial-input`; request JSON and daemon payloads should use the canonical `initialInput` field.",
910
- "When running from WSL while Pane is installed on Windows, the Linux wrapper may look for a missing `/tmp/pane-daemon.../daemon.sock`. In that case invoke the Windows wrapper through PowerShell, for example `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane repos list --json'`."
1100
+ "When running from WSL while Pane is installed on Windows, the Linux wrapper may look for a missing `/tmp/pane-daemon.../daemon.sock` or resolve to a Windows shim such as Volta. In that case invoke the Windows wrapper through PowerShell from a Windows cwd, for example `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane repos list --json'`."
911
1101
  ],
912
1102
  "wrapperFlagNote": "The top-level `runpane --version` form prints the wrapper version. The install subcommand form `runpane install --version vX.Y.Z` selects a Pane release.",
913
- "localControlFlagNote": "`runpane repos list`, `runpane panes list`, `runpane panes create`, and `runpane panels ...` commands use the local framed daemon socket/pipe for a running Pane app. `--pane-dir` points the wrapper at a non-default Pane data directory, such as `PANE_DIR=~/.pane_test` in development. `runpane agent-context` is local/offline and can be used before Pane is running. From WSL, if the user runs Windows Pane, call the Windows wrapper through `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane ...'` so the command can reach the Windows named-pipe daemon.",
1103
+ "localControlFlagNote": "`runpane repos list`, `runpane panes list`, `runpane panes create`, and `runpane panels ...` commands use the local framed daemon socket/pipe for a running Pane app. `--pane-dir` points the wrapper at a non-default Pane data directory, such as `PANE_DIR=~/.pane_test` in development. `runpane agent-context` is local/offline and can be used before Pane is running. From WSL, if the user runs Windows Pane, call the Windows wrapper through `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane ...'` so the command can reach the Windows named-pipe daemon and avoid UNC cwd issues.",
914
1104
  "daemonFlagNote": "Unknown daemon flags should be forwarded rather than dropped so newer Pane versions can extend `--remote-setup` without requiring an immediate wrapper release. Unknown flags for non-daemon commands should fail clearly.",
915
1105
  "downloadAttribution": [
916
1106
  "The npm package uses `source=npm` for all npm-registry consumers, including `npx`, `pnpm dlx`, `yarn dlx`, `bunx`, and global npm/pnpm installs.",
@@ -1076,6 +1266,62 @@ exports.RUNPANE_CONTRACT = {
1076
1266
  ],
1077
1267
  [
1078
1268
  "--version"
1269
+ ],
1270
+ [
1271
+ "agents",
1272
+ "doctor",
1273
+ "--agent",
1274
+ "codex",
1275
+ "--repo",
1276
+ "active",
1277
+ "--json"
1278
+ ],
1279
+ [
1280
+ "panes",
1281
+ "create",
1282
+ "--from-json",
1283
+ "-",
1284
+ "--wait-ready",
1285
+ "--ready-timeout-ms",
1286
+ "45000",
1287
+ "--concurrency",
1288
+ "2",
1289
+ "--yes",
1290
+ "--json"
1291
+ ],
1292
+ [
1293
+ "panels",
1294
+ "screen",
1295
+ "--panel",
1296
+ "panel-1",
1297
+ "--limit",
1298
+ "80",
1299
+ "--json"
1300
+ ],
1301
+ [
1302
+ "panels",
1303
+ "submit",
1304
+ "--panel",
1305
+ "panel-1",
1306
+ "--text",
1307
+ "2",
1308
+ "--yes",
1309
+ "--json"
1310
+ ],
1311
+ [
1312
+ "panels",
1313
+ "wait",
1314
+ "--panel",
1315
+ "panel-1",
1316
+ "--for",
1317
+ "text",
1318
+ "--contains",
1319
+ "ready",
1320
+ "--timeout-ms",
1321
+ "30000",
1322
+ "--interval-ms",
1323
+ "500",
1324
+ "--json"
1079
1325
  ]
1080
1326
  ],
1081
1327
  "topLevelHelpIncludes": [
@@ -1091,7 +1337,11 @@ exports.RUNPANE_CONTRACT = {
1091
1337
  "runpane panes create",
1092
1338
  "runpane panels list",
1093
1339
  "runpane panels output",
1094
- "runpane panels input"
1340
+ "runpane panels input",
1341
+ "runpane agents doctor",
1342
+ "runpane panels screen",
1343
+ "runpane panels submit",
1344
+ "runpane panels wait"
1095
1345
  ],
1096
1346
  "npmHelpIncludes": [
1097
1347
  "pnpm dlx runpane@latest",
@@ -1360,6 +1610,15 @@ exports.RUNPANE_CONTRACT = {
1360
1610
  },
1361
1611
  "timeoutMs": {
1362
1612
  "type": "number"
1613
+ },
1614
+ "waitReady": {
1615
+ "type": "boolean"
1616
+ },
1617
+ "readyTimeoutMs": {
1618
+ "type": "number"
1619
+ },
1620
+ "concurrency": {
1621
+ "type": "number"
1363
1622
  }
1364
1623
  },
1365
1624
  "additionalProperties": false
@@ -1435,6 +1694,102 @@ exports.RUNPANE_CONTRACT = {
1435
1694
  }
1436
1695
  },
1437
1696
  "additionalProperties": false
1697
+ },
1698
+ "readiness": {
1699
+ "type": "object",
1700
+ "required": [
1701
+ "ok",
1702
+ "condition",
1703
+ "matched",
1704
+ "timedOut",
1705
+ "elapsedMs",
1706
+ "state"
1707
+ ],
1708
+ "properties": {
1709
+ "ok": {
1710
+ "type": "boolean"
1711
+ },
1712
+ "condition": {
1713
+ "enum": [
1714
+ "initialized",
1715
+ "ready",
1716
+ "idle",
1717
+ "text"
1718
+ ]
1719
+ },
1720
+ "matched": {
1721
+ "type": "boolean"
1722
+ },
1723
+ "timedOut": {
1724
+ "type": "boolean"
1725
+ },
1726
+ "elapsedMs": {
1727
+ "type": "number"
1728
+ },
1729
+ "state": {
1730
+ "type": "object",
1731
+ "required": [
1732
+ "initialized"
1733
+ ],
1734
+ "properties": {
1735
+ "initialized": {
1736
+ "type": "boolean"
1737
+ },
1738
+ "isAlternateScreen": {
1739
+ "type": "boolean"
1740
+ },
1741
+ "activityStatus": {
1742
+ "enum": [
1743
+ "active",
1744
+ "idle"
1745
+ ]
1746
+ },
1747
+ "isCliReady": {
1748
+ "type": "boolean"
1749
+ },
1750
+ "isCliPanel": {
1751
+ "type": "boolean"
1752
+ },
1753
+ "agentType": {
1754
+ "enum": [
1755
+ "codex",
1756
+ "claude"
1757
+ ]
1758
+ },
1759
+ "lastActivity": {
1760
+ "type": "string"
1761
+ }
1762
+ },
1763
+ "additionalProperties": false
1764
+ },
1765
+ "blocked": {
1766
+ "type": "object",
1767
+ "required": [
1768
+ "kind",
1769
+ "message"
1770
+ ],
1771
+ "properties": {
1772
+ "kind": {
1773
+ "enum": [
1774
+ "codex-update",
1775
+ "agent-prompt",
1776
+ "unknown"
1777
+ ]
1778
+ },
1779
+ "message": {
1780
+ "type": "string"
1781
+ },
1782
+ "suggestedCommand": {
1783
+ "type": "string"
1784
+ }
1785
+ },
1786
+ "additionalProperties": false
1787
+ },
1788
+ "nextCommand": {
1789
+ "type": "string"
1790
+ }
1791
+ },
1792
+ "additionalProperties": false
1438
1793
  }
1439
1794
  },
1440
1795
  "additionalProperties": false
@@ -1854,70 +2209,422 @@ exports.RUNPANE_CONTRACT = {
1854
2209
  }
1855
2210
  },
1856
2211
  "additionalProperties": false
1857
- }
1858
- },
1859
- "agentContext": {
1860
- "brief": {
1861
- "title": "Pane agent context",
1862
- "summary": "Pane lets a developer manage repositories and user-visible panes. Agents can use runpane to list/add Pane repositories and create panes with terminal-backed tools.",
1863
- "rules": [
1864
- "Start with `runpane repos list --json` to find the saved repository when unsure.",
1865
- "If WSL cannot find `/tmp/pane-daemon.../daemon.sock`, the user may be running Windows Pane; try `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane repos list --json'`.",
1866
- "If the repository exists on disk but is not saved in Pane, use `runpane repos add --path <repo> --yes --json` before creating panes.",
1867
- "Use `runpane panes create` to create a Pane session and open a built-in agent or custom terminal command.",
1868
- "Use `runpane panels list`, `runpane panels output`, and `runpane panels input` when you need to inspect or drive an existing Pane terminal.",
1869
- "After creating panes or sending terminal input, validate with bounded panel output before reporting success.",
1870
- "Use `runpane agent-context --command <command>` for detailed command definitions only when needed."
2212
+ },
2213
+ "panelScreenResult": {
2214
+ "type": "object",
2215
+ "required": [
2216
+ "ok",
2217
+ "panelId",
2218
+ "source",
2219
+ "limit",
2220
+ "returnedLineCount",
2221
+ "hasMore",
2222
+ "text",
2223
+ "state"
1871
2224
  ],
1872
- "detailCommand": "runpane agent-context --command <command> [--json]",
1873
- "tools": [
1874
- {
1875
- "name": "agent-context",
1876
- "summary": "Print token-efficient Pane command context for coding agents.",
1877
- "arguments": [
1878
- "--command <command>",
1879
- "--json"
1880
- ]
2225
+ "properties": {
2226
+ "ok": {
2227
+ "const": true
1881
2228
  },
1882
- {
1883
- "name": "repos list",
1884
- "summary": "List repositories saved in the running Pane app.",
1885
- "arguments": [
1886
- "--json",
1887
- "--pane-dir <path>"
1888
- ]
2229
+ "panelId": {
2230
+ "type": "string"
1889
2231
  },
1890
- {
1891
- "name": "repos add",
1892
- "summary": "Register an existing git repository with the running Pane app.",
1893
- "arguments": [
1894
- "--path <path>",
1895
- "--name <name>",
1896
- "--yes",
1897
- "--json",
1898
- "--dry-run",
1899
- "--pane-dir <path>"
1900
- ]
2232
+ "paneId": {
2233
+ "type": "string"
1901
2234
  },
1902
- {
1903
- "name": "panes list",
1904
- "summary": "List Pane sessions, optionally scoped to a saved repository.",
1905
- "arguments": [
1906
- "--repo <selector>",
1907
- "--json",
1908
- "--pane-dir <path>"
2235
+ "source": {
2236
+ "enum": [
2237
+ "alternateScreen",
2238
+ "scrollback",
2239
+ "persistedOutput",
2240
+ "empty"
1909
2241
  ]
1910
2242
  },
1911
- {
1912
- "name": "panes create",
1913
- "summary": "Create one or more Pane sessions in a saved repository and open a terminal-backed tool tab.",
1914
- "arguments": [
1915
- "--repo <selector>",
1916
- "--name <name>",
1917
- "--agent <codex|claude>",
1918
- "--tool-command <command>",
1919
- "--prompt <text>",
1920
- "--from-json <path|->",
2243
+ "limit": {
2244
+ "type": "number"
2245
+ },
2246
+ "returnedLineCount": {
2247
+ "type": "number"
2248
+ },
2249
+ "hasMore": {
2250
+ "type": "boolean"
2251
+ },
2252
+ "text": {
2253
+ "type": "string"
2254
+ },
2255
+ "state": {
2256
+ "type": "object",
2257
+ "required": [
2258
+ "initialized"
2259
+ ],
2260
+ "properties": {
2261
+ "initialized": {
2262
+ "type": "boolean"
2263
+ },
2264
+ "isAlternateScreen": {
2265
+ "type": "boolean"
2266
+ },
2267
+ "activityStatus": {
2268
+ "enum": [
2269
+ "active",
2270
+ "idle"
2271
+ ]
2272
+ },
2273
+ "isCliReady": {
2274
+ "type": "boolean"
2275
+ },
2276
+ "isCliPanel": {
2277
+ "type": "boolean"
2278
+ },
2279
+ "agentType": {
2280
+ "enum": [
2281
+ "codex",
2282
+ "claude"
2283
+ ]
2284
+ },
2285
+ "lastActivity": {
2286
+ "type": "string"
2287
+ }
2288
+ },
2289
+ "additionalProperties": false
2290
+ },
2291
+ "nextCommand": {
2292
+ "type": "string"
2293
+ }
2294
+ },
2295
+ "additionalProperties": false
2296
+ },
2297
+ "panelSubmitRequest": {
2298
+ "type": "object",
2299
+ "required": [
2300
+ "panelId",
2301
+ "input"
2302
+ ],
2303
+ "properties": {
2304
+ "panelId": {
2305
+ "type": "string"
2306
+ },
2307
+ "input": {
2308
+ "type": "string"
2309
+ }
2310
+ },
2311
+ "additionalProperties": false
2312
+ },
2313
+ "panelSubmitResult": {
2314
+ "type": "object",
2315
+ "required": [
2316
+ "ok",
2317
+ "panelId",
2318
+ "inputBytes",
2319
+ "enter",
2320
+ "sentAt"
2321
+ ],
2322
+ "properties": {
2323
+ "ok": {
2324
+ "const": true
2325
+ },
2326
+ "panelId": {
2327
+ "type": "string"
2328
+ },
2329
+ "paneId": {
2330
+ "type": "string"
2331
+ },
2332
+ "inputBytes": {
2333
+ "type": "number"
2334
+ },
2335
+ "enter": {
2336
+ "const": "cr"
2337
+ },
2338
+ "sentAt": {
2339
+ "type": "string"
2340
+ },
2341
+ "nextCommand": {
2342
+ "type": "string"
2343
+ }
2344
+ },
2345
+ "additionalProperties": false
2346
+ },
2347
+ "panelWaitResult": {
2348
+ "type": "object",
2349
+ "required": [
2350
+ "ok",
2351
+ "panelId",
2352
+ "condition",
2353
+ "matched",
2354
+ "timedOut",
2355
+ "elapsedMs",
2356
+ "state",
2357
+ "screen"
2358
+ ],
2359
+ "properties": {
2360
+ "ok": {
2361
+ "type": "boolean"
2362
+ },
2363
+ "panelId": {
2364
+ "type": "string"
2365
+ },
2366
+ "paneId": {
2367
+ "type": "string"
2368
+ },
2369
+ "condition": {
2370
+ "enum": [
2371
+ "initialized",
2372
+ "ready",
2373
+ "idle",
2374
+ "text"
2375
+ ]
2376
+ },
2377
+ "matched": {
2378
+ "type": "boolean"
2379
+ },
2380
+ "timedOut": {
2381
+ "type": "boolean"
2382
+ },
2383
+ "elapsedMs": {
2384
+ "type": "number"
2385
+ },
2386
+ "state": {
2387
+ "type": "object",
2388
+ "required": [
2389
+ "initialized"
2390
+ ],
2391
+ "properties": {
2392
+ "initialized": {
2393
+ "type": "boolean"
2394
+ },
2395
+ "isAlternateScreen": {
2396
+ "type": "boolean"
2397
+ },
2398
+ "activityStatus": {
2399
+ "enum": [
2400
+ "active",
2401
+ "idle"
2402
+ ]
2403
+ },
2404
+ "isCliReady": {
2405
+ "type": "boolean"
2406
+ },
2407
+ "isCliPanel": {
2408
+ "type": "boolean"
2409
+ },
2410
+ "agentType": {
2411
+ "enum": [
2412
+ "codex",
2413
+ "claude"
2414
+ ]
2415
+ },
2416
+ "lastActivity": {
2417
+ "type": "string"
2418
+ }
2419
+ },
2420
+ "additionalProperties": false
2421
+ },
2422
+ "blocked": {
2423
+ "type": "object",
2424
+ "required": [
2425
+ "kind",
2426
+ "message"
2427
+ ],
2428
+ "properties": {
2429
+ "kind": {
2430
+ "enum": [
2431
+ "codex-update",
2432
+ "agent-prompt",
2433
+ "unknown"
2434
+ ]
2435
+ },
2436
+ "message": {
2437
+ "type": "string"
2438
+ },
2439
+ "suggestedCommand": {
2440
+ "type": "string"
2441
+ }
2442
+ },
2443
+ "additionalProperties": false
2444
+ },
2445
+ "screen": {
2446
+ "type": "object",
2447
+ "required": [
2448
+ "source",
2449
+ "text",
2450
+ "hasMore"
2451
+ ],
2452
+ "properties": {
2453
+ "source": {
2454
+ "enum": [
2455
+ "alternateScreen",
2456
+ "scrollback",
2457
+ "persistedOutput",
2458
+ "empty"
2459
+ ]
2460
+ },
2461
+ "text": {
2462
+ "type": "string"
2463
+ },
2464
+ "hasMore": {
2465
+ "type": "boolean"
2466
+ }
2467
+ },
2468
+ "additionalProperties": false
2469
+ },
2470
+ "nextCommand": {
2471
+ "type": "string"
2472
+ }
2473
+ },
2474
+ "additionalProperties": false
2475
+ },
2476
+ "agentDoctorResult": {
2477
+ "type": "object",
2478
+ "required": [
2479
+ "ok",
2480
+ "agent",
2481
+ "command",
2482
+ "available",
2483
+ "checks"
2484
+ ],
2485
+ "properties": {
2486
+ "ok": {
2487
+ "type": "boolean"
2488
+ },
2489
+ "agent": {
2490
+ "enum": [
2491
+ "codex",
2492
+ "claude"
2493
+ ]
2494
+ },
2495
+ "command": {
2496
+ "type": "string"
2497
+ },
2498
+ "repo": {
2499
+ "$ref": "#/jsonSchemas/repoListResult/properties/repos/items"
2500
+ },
2501
+ "environment": {
2502
+ "enum": [
2503
+ "wsl",
2504
+ "windows",
2505
+ "linux",
2506
+ "macos"
2507
+ ]
2508
+ },
2509
+ "available": {
2510
+ "type": "boolean"
2511
+ },
2512
+ "executablePath": {
2513
+ "type": "string"
2514
+ },
2515
+ "version": {
2516
+ "type": "string"
2517
+ },
2518
+ "checks": {
2519
+ "type": "array",
2520
+ "items": {
2521
+ "type": "object",
2522
+ "required": [
2523
+ "name",
2524
+ "ok",
2525
+ "message"
2526
+ ],
2527
+ "properties": {
2528
+ "name": {
2529
+ "type": "string"
2530
+ },
2531
+ "ok": {
2532
+ "type": "boolean"
2533
+ },
2534
+ "message": {
2535
+ "type": "string"
2536
+ }
2537
+ },
2538
+ "additionalProperties": false
2539
+ }
2540
+ },
2541
+ "warnings": {
2542
+ "type": "array",
2543
+ "items": {
2544
+ "type": "string"
2545
+ }
2546
+ }
2547
+ },
2548
+ "additionalProperties": false
2549
+ }
2550
+ },
2551
+ "agentContext": {
2552
+ "brief": {
2553
+ "title": "Pane agent context",
2554
+ "summary": "Pane lets a developer manage repositories and user-visible terminal panes. Agents can use runpane to create panes, inspect compact terminal state, wait for readiness, and submit interactive input.",
2555
+ "rules": [
2556
+ "Start with `runpane repos list --json` to find the saved repository when unsure.",
2557
+ "If WSL cannot reach Pane or `runpane` resolves to a broken Windows shim, the user may be running Windows Pane; try `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane repos list --json'`.",
2558
+ "If the repository exists on disk but is not saved in Pane, use `runpane repos add --path <repo> --yes --json` before creating panes.",
2559
+ "Use `runpane agents doctor --agent <codex|claude> --repo <selector> --json` when agent availability differs across host, Windows, WSL, or repo environments.",
2560
+ "Use `runpane panes create --wait-ready` to create panes and validate initial terminal readiness in one call.",
2561
+ "Use `runpane panels screen` for compact current state, `panels wait` for readiness/text checks, and `panels submit` for ordinary Enter-submitted input.",
2562
+ "Use `runpane panels input` only when exact bytes are required, such as Ctrl-C or handcrafted terminal input.",
2563
+ "After creating panes or sending terminal input, validate with `panels wait` or bounded `panels screen` before reporting success.",
2564
+ "Use `runpane agent-context --command <command>` for detailed command definitions only when needed."
2565
+ ],
2566
+ "detailCommand": "runpane agent-context --command <command> [--json]",
2567
+ "tools": [
2568
+ {
2569
+ "name": "agent-context",
2570
+ "summary": "Print token-efficient Pane command context for coding agents.",
2571
+ "arguments": [
2572
+ "--command <command>",
2573
+ "--json"
2574
+ ]
2575
+ },
2576
+ {
2577
+ "name": "agents doctor",
2578
+ "summary": "Check whether Codex or Claude is available in the repo environment Pane will use.",
2579
+ "arguments": [
2580
+ "--agent <codex|claude>",
2581
+ "--repo <selector>",
2582
+ "--json"
2583
+ ]
2584
+ },
2585
+ {
2586
+ "name": "repos list",
2587
+ "summary": "List repositories saved in the running Pane app.",
2588
+ "arguments": [
2589
+ "--json",
2590
+ "--pane-dir <path>"
2591
+ ]
2592
+ },
2593
+ {
2594
+ "name": "repos add",
2595
+ "summary": "Register an existing git repository with the running Pane app.",
2596
+ "arguments": [
2597
+ "--path <path>",
2598
+ "--name <name>",
2599
+ "--yes",
2600
+ "--json",
2601
+ "--dry-run",
2602
+ "--pane-dir <path>"
2603
+ ]
2604
+ },
2605
+ {
2606
+ "name": "panes list",
2607
+ "summary": "List Pane sessions, optionally scoped to a saved repository.",
2608
+ "arguments": [
2609
+ "--repo <selector>",
2610
+ "--json",
2611
+ "--pane-dir <path>"
2612
+ ]
2613
+ },
2614
+ {
2615
+ "name": "panes create",
2616
+ "summary": "Create one or more Pane sessions in a saved repository and open a terminal-backed tool tab.",
2617
+ "arguments": [
2618
+ "--repo <selector>",
2619
+ "--name <name>",
2620
+ "--agent <codex|claude>",
2621
+ "--tool-command <command>",
2622
+ "--prompt <text>",
2623
+ "--initial-input-file <path|->",
2624
+ "--from-json <path|->",
2625
+ "--wait-ready",
2626
+ "--ready-timeout-ms <ms>",
2627
+ "--concurrency <count>",
1921
2628
  "--yes",
1922
2629
  "--json"
1923
2630
  ]
@@ -1941,6 +2648,16 @@ exports.RUNPANE_CONTRACT = {
1941
2648
  "--pane-dir <path>"
1942
2649
  ]
1943
2650
  },
2651
+ {
2652
+ "name": "panels screen",
2653
+ "summary": "Read a compact current-screen view from a terminal panel.",
2654
+ "arguments": [
2655
+ "--panel <panel-id>",
2656
+ "--limit <count>",
2657
+ "--json",
2658
+ "--pane-dir <path>"
2659
+ ]
2660
+ },
1944
2661
  {
1945
2662
  "name": "panels input",
1946
2663
  "summary": "Send input bytes to a terminal panel.",
@@ -1952,6 +2669,31 @@ exports.RUNPANE_CONTRACT = {
1952
2669
  "--json",
1953
2670
  "--pane-dir <path>"
1954
2671
  ]
2672
+ },
2673
+ {
2674
+ "name": "panels submit",
2675
+ "summary": "Send text plus terminal Enter to a terminal panel.",
2676
+ "arguments": [
2677
+ "--panel <panel-id>",
2678
+ "--text <text>",
2679
+ "--input-file <path|->",
2680
+ "--yes",
2681
+ "--json",
2682
+ "--pane-dir <path>"
2683
+ ]
2684
+ },
2685
+ {
2686
+ "name": "panels wait",
2687
+ "summary": "Wait for terminal initialized, ready, idle, or text state with compact output.",
2688
+ "arguments": [
2689
+ "--panel <panel-id>",
2690
+ "--for <condition>",
2691
+ "--contains <text>",
2692
+ "--timeout-ms <ms>",
2693
+ "--interval-ms <ms>",
2694
+ "--json",
2695
+ "--pane-dir <path>"
2696
+ ]
1955
2697
  }
1956
2698
  ]
1957
2699
  },
@@ -2167,7 +2909,8 @@ exports.RUNPANE_CONTRACT = {
2167
2909
  ],
2168
2910
  "notes": [
2169
2911
  "Requires a running Pane app or daemon for the selected Pane data directory.",
2170
- "If this fails from WSL with a missing `/tmp/pane-daemon.../daemon.sock`, the user may be running Windows Pane. Retry via `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane repos list --json'`."
2912
+ "If this fails from WSL with a missing `/tmp/pane-daemon.../daemon.sock`, `volta: command not found`, or a Windows shim error, the user may be running Windows Pane. Retry via `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane repos list --json'`.",
2913
+ "When using PowerShell from WSL, set a Windows cwd such as `$env:TEMP` or `$env:USERPROFILE` before running runpane to avoid UNC cwd issues."
2171
2914
  ]
2172
2915
  },
2173
2916
  "repos add": {
@@ -2261,7 +3004,7 @@ exports.RUNPANE_CONTRACT = {
2261
3004
  "panes create": {
2262
3005
  "name": "panes create",
2263
3006
  "summary": "Create one or more Pane sessions in a saved repository and open a terminal-backed tool tab.",
2264
- "details": "Use this to set up user-visible panes for work. Select a saved repository, choose a built-in agent or custom terminal command, and optionally send initial input after the tool starts.",
3007
+ "details": "Use this to set up user-visible panes for work. Select a saved repository, choose a built-in agent or custom terminal command, and optionally send initial input after the tool starts. For multi-step shell setup, pass a shell command through --tool-command rather than adding a new runpane primitive.",
2265
3008
  "requiresPaneDaemon": true,
2266
3009
  "mutates": true,
2267
3010
  "arguments": [
@@ -2316,11 +3059,29 @@ exports.RUNPANE_CONTRACT = {
2316
3059
  "name": "--json",
2317
3060
  "required": false,
2318
3061
  "description": "Print machine-readable output."
3062
+ },
3063
+ {
3064
+ "name": "--wait-ready",
3065
+ "required": false,
3066
+ "description": "Wait for each created terminal panel to be ready before returning."
3067
+ },
3068
+ {
3069
+ "name": "--ready-timeout-ms",
3070
+ "value": "<ms>",
3071
+ "required": false,
3072
+ "description": "Readiness timeout per pane; defaults to 30000."
3073
+ },
3074
+ {
3075
+ "name": "--concurrency",
3076
+ "value": "<count>",
3077
+ "required": false,
3078
+ "description": "Accepted for compatibility. Pane currently serializes multi-pane session creation so queued jobs do not time out before starting."
2319
3079
  }
2320
3080
  ],
2321
3081
  "examples": [
2322
3082
  "runpane panes create --repo active --name issue-257 --agent codex --prompt \"Plan this issue\" --yes",
2323
- "runpane panes create --from-json panes.json --yes --json"
3083
+ "runpane panes create --from-json panes.json --yes --json",
3084
+ "runpane panes create --repo active --name issue-123 --agent codex --prompt \"Plan this issue\" --wait-ready --yes --json"
2324
3085
  ],
2325
3086
  "jsonSchemas": [
2326
3087
  "paneCreateRequest",
@@ -2329,8 +3090,14 @@ exports.RUNPANE_CONTRACT = {
2329
3090
  "notes": [
2330
3091
  "At least one of --agent or --tool-command is required unless --from-json is used.",
2331
3092
  "The built-in agent templates come from the runpane contract; custom terminal commands can pass agent-specific flags when requested by the user.",
3093
+ "Use --initial-input-file for multi-line prompts or shell-sensitive initial input.",
2332
3094
  "When the JSON result includes nextCommand, run it to validate that the terminal produced output before reporting success.",
2333
- "From WSL with Windows Pane, invoke through PowerShell and select the saved WSL repo by name or id, for example `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane panes create --repo \"WSL Pane\" --name issue-123 --agent codex --prompt \"Plan this issue\" --yes --json'`."
3095
+ "Multi-pane requests are created sequentially today. The --concurrency flag is accepted for compatibility, but agents should not rely on parallel creation.",
3096
+ "For POSIX or WSL command chaining, use a custom terminal command like `bash -lc 'cmd1 && cmd2 && cmd3'`.",
3097
+ "For Windows PowerShell command chaining, use a custom terminal command like `powershell -NoProfile -Command \"cmd1; if ($LASTEXITCODE) { exit $LASTEXITCODE }; cmd2\"`.",
3098
+ "From WSL with Windows Pane, invoke through PowerShell and select the saved WSL repo by name or id, for example `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane panes create --repo \"WSL Pane\" --name issue-123 --agent codex --prompt \"Plan this issue\" --yes --json'`.",
3099
+ "Use --wait-ready when an agent needs to verify that an agent terminal started instead of only creating a pane.",
3100
+ "If readiness returns blocked, inspect blocked.suggestedCommand rather than guessing which prompt to answer."
2334
3101
  ]
2335
3102
  },
2336
3103
  "panels list": {
@@ -2371,7 +3138,7 @@ exports.RUNPANE_CONTRACT = {
2371
3138
  "panels output": {
2372
3139
  "name": "panels output",
2373
3140
  "summary": "Read recent terminal output from a panel.",
2374
- "details": "Use this to inspect recent terminal output from a terminal-backed panel without loading the full history by default. Live terminal scrollback is returned as bounded recent lines; persisted output fallback is returned as bounded records.",
3141
+ "details": "Use this to inspect recent terminal output from a terminal-backed panel without loading the full history by default. Live terminal scrollback is returned as bounded recent lines; persisted output fallback is returned as bounded records. Terminal control noise is stripped before returning text.",
2375
3142
  "requiresPaneDaemon": true,
2376
3143
  "mutates": false,
2377
3144
  "arguments": [
@@ -2407,13 +3174,15 @@ exports.RUNPANE_CONTRACT = {
2407
3174
  ],
2408
3175
  "notes": [
2409
3176
  "Default output is bounded to the latest 200 lines or records. Use a larger --limit only when hasMore is true and more history is needed.",
2410
- "Use --json when an agent needs timestamps, record types, returnedCount, or hasMore."
3177
+ "Use --json when an agent needs timestamps, record types, returnedCount, or hasMore.",
3178
+ "The output is intended to be agent-readable, but terminal prompts and shell echoes may still appear; use the newest relevant lines before concluding success.",
3179
+ "Prefer `panels screen` for a smaller current-state read before increasing output limits."
2411
3180
  ]
2412
3181
  },
2413
3182
  "panels input": {
2414
3183
  "name": "panels input",
2415
3184
  "summary": "Send input bytes to a terminal panel.",
2416
- "details": "Use this to answer prompts or continue an agent inside an existing Pane terminal panel.",
3185
+ "details": "Use this to answer prompts or continue an agent inside an existing Pane terminal panel. Input is byte-oriented; choose --input-file for exact control over newlines and control characters.",
2417
3186
  "requiresPaneDaemon": true,
2418
3187
  "mutates": true,
2419
3188
  "arguments": [
@@ -2453,38 +3222,245 @@ exports.RUNPANE_CONTRACT = {
2453
3222
  }
2454
3223
  ],
2455
3224
  "examples": [
2456
- "runpane panels input --panel <panel-id> --text \"Continue\\n\" --yes --json",
2457
- "printf 'Continue\\n' | runpane panels input --panel <panel-id> --input-file - --yes"
3225
+ "printf 'Continue\\n' | runpane panels input --panel <panel-id> --input-file - --yes",
3226
+ "printf '\\003' | runpane panels input --panel <panel-id> --input-file - --yes",
3227
+ "runpane panels input --panel <panel-id> --text \"simple text\" --yes --json"
2458
3228
  ],
2459
3229
  "jsonSchemas": [
2460
3230
  "panelInputRequest",
2461
3231
  "panelInputResult"
2462
3232
  ],
2463
3233
  "notes": [
2464
- "Input is sent exactly as provided. Include `\\n` or `\\r` when the terminal should receive Enter.",
3234
+ "Input is sent exactly as provided. Include a real newline byte when the terminal should receive Enter; across shells, `--input-file` is safer than `--text \"...\\n\"`.",
3235
+ "Use `--input-file -` or a temp file for multi-line input, quotes, Ctrl-C, or shell-sensitive text.",
3236
+ "If interrupting a running process, send Ctrl-C first, validate/read output, then send the next command in a separate `panels input` call so bytes are not dropped.",
2465
3237
  "After sending input, validate with `runpane panels output --panel <panel-id> --json` before reporting success.",
2466
- "Runpane records action metadata and errors for observability, but should not log full input text by default."
3238
+ "Runpane records action metadata and errors for observability, but should not log full input text by default.",
3239
+ "For ordinary text plus Enter, prefer `panels submit` so the terminal receives a CR Enter byte."
3240
+ ]
3241
+ },
3242
+ "agents doctor": {
3243
+ "name": "agents doctor",
3244
+ "summary": "Diagnose whether a built-in agent command is available in a Pane repository environment.",
3245
+ "details": "Use this before creating Codex or Claude panes when PATH may differ between macOS/Linux/Windows/WSL or between the wrapper shell and Pane. The check runs through Pane project context, not the wrapper process.",
3246
+ "requiresPaneDaemon": true,
3247
+ "mutates": false,
3248
+ "arguments": [
3249
+ {
3250
+ "name": "--agent",
3251
+ "value": "<codex|claude>",
3252
+ "required": true,
3253
+ "description": "Built-in agent command to diagnose."
3254
+ },
3255
+ {
3256
+ "name": "--repo",
3257
+ "value": "<selector>",
3258
+ "required": false,
3259
+ "description": "Repository selector; defaults to the active Pane repo."
3260
+ },
3261
+ {
3262
+ "name": "--json",
3263
+ "required": false,
3264
+ "description": "Print machine-readable output."
3265
+ },
3266
+ {
3267
+ "name": "--pane-dir",
3268
+ "value": "<path>",
3269
+ "required": false,
3270
+ "description": "Connect to a specific Pane data directory."
3271
+ }
3272
+ ],
3273
+ "examples": [
3274
+ "runpane agents doctor --agent codex --repo active --json"
3275
+ ],
3276
+ "jsonSchemas": [
3277
+ "agentDoctorResult"
3278
+ ],
3279
+ "notes": [
3280
+ "For WSL repos, install the agent inside the WSL distro Pane uses, not only on Windows.",
3281
+ "This diagnoses built-in Codex/Claude templates only; custom commands should be validated by creating a pane and reading its screen."
3282
+ ]
3283
+ },
3284
+ "panels screen": {
3285
+ "name": "panels screen",
3286
+ "summary": "Read a compact current-screen view from a terminal panel.",
3287
+ "details": "Use this for token-safe current terminal state. It prefers active alternate-screen/TUI output, then live scrollback, then persisted output. Default output is bounded to 80 lines.",
3288
+ "requiresPaneDaemon": true,
3289
+ "mutates": false,
3290
+ "arguments": [
3291
+ {
3292
+ "name": "--panel",
3293
+ "value": "<panel-id>",
3294
+ "required": true,
3295
+ "description": "Terminal panel id."
3296
+ },
3297
+ {
3298
+ "name": "--limit",
3299
+ "value": "<count>",
3300
+ "required": false,
3301
+ "description": "Maximum lines to return; defaults to 80."
3302
+ },
3303
+ {
3304
+ "name": "--json",
3305
+ "required": false,
3306
+ "description": "Print machine-readable output."
3307
+ },
3308
+ {
3309
+ "name": "--pane-dir",
3310
+ "value": "<path>",
3311
+ "required": false,
3312
+ "description": "Connect to a specific Pane data directory."
3313
+ }
3314
+ ],
3315
+ "examples": [
3316
+ "runpane panels screen --panel <panel-id> --limit 80 --json"
3317
+ ],
3318
+ "jsonSchemas": [
3319
+ "panelScreenResult"
3320
+ ],
3321
+ "notes": [
3322
+ "Use this before `panels output` when an agent only needs the latest visible/current state.",
3323
+ "If hasMore is true and context is missing, rerun with a larger --limit or use `panels output`."
3324
+ ]
3325
+ },
3326
+ "panels submit": {
3327
+ "name": "panels submit",
3328
+ "summary": "Send text to a terminal panel and append a terminal Enter byte.",
3329
+ "details": "Use this for ordinary interactive submissions. The daemon normalizes a final LF or CRLF to CR, or appends CR if no newline is present. Exact byte workflows remain on `panels input`.",
3330
+ "requiresPaneDaemon": true,
3331
+ "mutates": true,
3332
+ "arguments": [
3333
+ {
3334
+ "name": "--panel",
3335
+ "value": "<panel-id>",
3336
+ "required": true,
3337
+ "description": "Terminal panel id."
3338
+ },
3339
+ {
3340
+ "name": "--text",
3341
+ "value": "<text>",
3342
+ "required": false,
3343
+ "description": "Text to submit before Enter."
3344
+ },
3345
+ {
3346
+ "name": "--input-file",
3347
+ "value": "<path|->",
3348
+ "required": false,
3349
+ "description": "Read text from a file or stdin before Enter."
3350
+ },
3351
+ {
3352
+ "name": "--yes",
3353
+ "required": false,
3354
+ "description": "Skip confirmation for this mutating command."
3355
+ },
3356
+ {
3357
+ "name": "--json",
3358
+ "required": false,
3359
+ "description": "Print machine-readable output."
3360
+ },
3361
+ {
3362
+ "name": "--pane-dir",
3363
+ "value": "<path>",
3364
+ "required": false,
3365
+ "description": "Connect to a specific Pane data directory."
3366
+ }
3367
+ ],
3368
+ "examples": [
3369
+ "runpane panels submit --panel <panel-id> --text \"2\" --yes --json",
3370
+ "printf \"echo hello\" | runpane panels submit --panel <panel-id> --input-file - --yes --json"
3371
+ ],
3372
+ "jsonSchemas": [
3373
+ "panelSubmitRequest",
3374
+ "panelSubmitResult"
3375
+ ],
3376
+ "notes": [
3377
+ "The response includes nextCommand for validation. Run it before reporting that the input worked.",
3378
+ "Use `panels input` for Ctrl-C, escape sequences, or any workflow requiring exact bytes."
3379
+ ]
3380
+ },
3381
+ "panels wait": {
3382
+ "name": "panels wait",
3383
+ "summary": "Wait for a terminal panel to initialize, become ready/idle, or contain text.",
3384
+ "details": "Use this to validate asynchronous terminal behavior without pulling large scrollback. It returns brief readiness state, blocker hints, a compact screen, and a next command.",
3385
+ "requiresPaneDaemon": true,
3386
+ "mutates": false,
3387
+ "arguments": [
3388
+ {
3389
+ "name": "--panel",
3390
+ "value": "<panel-id>",
3391
+ "required": true,
3392
+ "description": "Terminal panel id."
3393
+ },
3394
+ {
3395
+ "name": "--for",
3396
+ "value": "<initialized|ready|idle|text>",
3397
+ "required": false,
3398
+ "description": "Condition to wait for. Defaults to ready for CLI panels and idle otherwise."
3399
+ },
3400
+ {
3401
+ "name": "--contains",
3402
+ "value": "<text>",
3403
+ "required": false,
3404
+ "description": "Text required for --for text; implies --for text when --for is omitted."
3405
+ },
3406
+ {
3407
+ "name": "--timeout-ms",
3408
+ "value": "<ms>",
3409
+ "required": false,
3410
+ "description": "Wait timeout; defaults to 30000."
3411
+ },
3412
+ {
3413
+ "name": "--interval-ms",
3414
+ "value": "<ms>",
3415
+ "required": false,
3416
+ "description": "Polling interval; defaults to 500."
3417
+ },
3418
+ {
3419
+ "name": "--json",
3420
+ "required": false,
3421
+ "description": "Print machine-readable output."
3422
+ },
3423
+ {
3424
+ "name": "--pane-dir",
3425
+ "value": "<path>",
3426
+ "required": false,
3427
+ "description": "Connect to a specific Pane data directory."
3428
+ }
3429
+ ],
3430
+ "examples": [
3431
+ "runpane panels wait --panel <panel-id> --for ready --timeout-ms 30000 --json",
3432
+ "runpane panels wait --panel <panel-id> --contains \"Ready\" --json"
3433
+ ],
3434
+ "jsonSchemas": [
3435
+ "panelWaitResult"
3436
+ ],
3437
+ "notes": [
3438
+ "If blocked is present, do not assume success. Use blocked.suggestedCommand or inspect `panels screen`.",
3439
+ "The default timeout and screen are intentionally small for agent context safety."
2467
3440
  ]
2468
3441
  }
2469
3442
  },
2470
3443
  "managedBlock": [
2471
3444
  "## Pane",
2472
3445
  "",
2473
- "The developer is using Pane for this repository. Pane can manage saved repositories and create user-visible panes with terminal-backed tools for planning, discussion, and implementation work.",
3446
+ "The developer is using Pane for this repository. Pane can manage saved repositories and create user-visible panes with terminal-backed tools for planning, discussion, implementation, and review work.",
2474
3447
  "",
2475
- "Use `runpane agent-context` for a brief Pane command schema. Use `runpane agent-context --command \"panes create\"` or another command name for the detailed schema only when needed.",
3448
+ "Use `runpane agent-context` for a brief Pane command schema. Use `runpane agent-context --command \"panels wait\"` or another command name for detailed schema only when needed.",
2476
3449
  "",
2477
- "After creating panes or sending terminal input, validate with bounded panel output before reporting success.",
3450
+ "Default to context-safe validation: after creating panes or sending terminal input, run `runpane panels wait` or `runpane panels screen` before reporting success. Prefer `runpane panels submit` for normal text plus Enter; use `runpane panels input` only for exact bytes such as Ctrl-C or escape sequences.",
2478
3451
  "",
2479
3452
  "Common commands:",
2480
3453
  "- `runpane repos list --json`",
2481
3454
  "- `runpane repos add --path <repo> --yes --json`",
2482
- "- `runpane panes create --repo active --name <name> --agent codex --prompt \"<task>\" --yes`",
3455
+ "- `runpane agents doctor --agent codex --repo active --json`",
3456
+ "- `runpane panes create --repo active --name <name> --agent codex --prompt \"<task>\" --wait-ready --yes --json`",
2483
3457
  "- `runpane panels list --pane <pane-id> --json`",
2484
- "- `runpane panels output --panel <panel-id> --limit 200 --json`",
2485
- "- `runpane panels input --panel <panel-id> --text \"<input>\" --yes`",
3458
+ "- `runpane panels screen --panel <panel-id> --limit 80 --json`",
3459
+ "- `runpane panels wait --panel <panel-id> --for ready --timeout-ms 30000 --json`",
3460
+ "- `runpane panels submit --panel <panel-id> --text \"<answer>\" --yes --json`",
3461
+ "- `runpane panels input --panel <panel-id> --input-file <path|-> --yes --json`",
2486
3462
  "",
2487
- "WSL note: if `runpane repos list` cannot find `/tmp/pane-daemon.../daemon.sock`, Pane may be running on Windows. Try `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane repos list --json'`, then create panes through the same PowerShell form using the saved WSL repo name or id."
3463
+ "WSL note: if `runpane repos list` cannot find `/tmp/pane-daemon.../daemon.sock` or `runpane` resolves to a broken Windows shim, Pane may be running on Windows. Try `powershell.exe -NoProfile -Command 'Set-Location $env:TEMP; runpane repos list --json'`, then create panes through the same PowerShell form using the saved WSL repo name or id. Use `runpane agents doctor --agent codex --repo <selector> --json` to diagnose the repo environment Pane will actually use."
2488
3464
  ]
2489
3465
  }
2490
3466
  };