runpane 2.3.7 → 2.3.9

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.
@@ -111,9 +111,22 @@ exports.RUNPANE_CONTRACT = {
111
111
  },
112
112
  {
113
113
  "name": "doctor",
114
- "summary": "Run platform, release, installed Pane, and remote setup diagnostics.",
114
+ "summary": "Run platform, release, installed Pane, daemon reachability, and remote setup diagnostics.",
115
115
  "usage": [
116
- "runpane doctor"
116
+ "runpane doctor [--json] [--pane-dir <path>] [--pane-path <path>] [--format <format>] [--verbose]"
117
+ ],
118
+ "jsonSchemas": [
119
+ "doctorResult"
120
+ ]
121
+ },
122
+ {
123
+ "name": "agents doctor",
124
+ "summary": "Diagnose whether a built-in agent command is available in a Pane repository environment.",
125
+ "usage": [
126
+ "runpane agents doctor --agent <codex|claude> [--repo <selector>] [--json]"
127
+ ],
128
+ "jsonSchemas": [
129
+ "agentDoctorResult"
117
130
  ]
118
131
  },
119
132
  {
@@ -193,6 +206,16 @@ exports.RUNPANE_CONTRACT = {
193
206
  "panelOutputResult"
194
207
  ]
195
208
  },
209
+ {
210
+ "name": "panels screen",
211
+ "summary": "Read a compact current-screen view from a terminal panel.",
212
+ "usage": [
213
+ "runpane panels screen --panel <panel-id> [--limit <count>] [--json]"
214
+ ],
215
+ "jsonSchemas": [
216
+ "panelScreenResult"
217
+ ]
218
+ },
196
219
  {
197
220
  "name": "panels input",
198
221
  "summary": "Send input bytes to a terminal panel.",
@@ -204,6 +227,28 @@ exports.RUNPANE_CONTRACT = {
204
227
  "panelInputRequest",
205
228
  "panelInputResult"
206
229
  ]
230
+ },
231
+ {
232
+ "name": "panels submit",
233
+ "summary": "Send text to a terminal panel and append a terminal Enter byte.",
234
+ "usage": [
235
+ "runpane panels submit --panel <panel-id> (--text <text>|--input-file <path|->) --yes [--json]"
236
+ ],
237
+ "mutates": true,
238
+ "jsonSchemas": [
239
+ "panelSubmitRequest",
240
+ "panelSubmitResult"
241
+ ]
242
+ },
243
+ {
244
+ "name": "panels wait",
245
+ "summary": "Wait for a terminal panel to initialize, become ready/idle, or contain text.",
246
+ "usage": [
247
+ "runpane panels wait --panel <panel-id> [--for initialized|ready|idle|text] [--contains <text>] [--timeout-ms <ms>] [--interval-ms <ms>] [--json]"
248
+ ],
249
+ "jsonSchemas": [
250
+ "panelWaitResult"
251
+ ]
207
252
  }
208
253
  ],
209
254
  "flags": {
@@ -374,11 +419,36 @@ exports.RUNPANE_CONTRACT = {
374
419
  "value": "<milliseconds>",
375
420
  "description": "Maximum time to wait for each pane creation job."
376
421
  },
422
+ {
423
+ "name": "--ready-timeout-ms",
424
+ "value": "<milliseconds>",
425
+ "description": "Readiness wait timeout for panes create --wait-ready."
426
+ },
427
+ {
428
+ "name": "--concurrency",
429
+ "value": "<count>",
430
+ "description": "Accepted for forward compatibility. Pane currently serializes multi-pane session creation so queued jobs do not time out before starting."
431
+ },
377
432
  {
378
433
  "name": "--limit",
379
434
  "value": "<count>",
380
435
  "description": "Maximum recent output lines or records to read."
381
436
  },
437
+ {
438
+ "name": "--for",
439
+ "value": "<initialized|ready|idle|text>",
440
+ "description": "Panel wait condition."
441
+ },
442
+ {
443
+ "name": "--contains",
444
+ "value": "<text>",
445
+ "description": "Text to wait for with panels wait --for text."
446
+ },
447
+ {
448
+ "name": "--interval-ms",
449
+ "value": "<milliseconds>",
450
+ "description": "Polling interval for panels wait."
451
+ },
382
452
  {
383
453
  "name": "--text",
384
454
  "value": "<text>",
@@ -394,6 +464,10 @@ exports.RUNPANE_CONTRACT = {
394
464
  {
395
465
  "name": "--json",
396
466
  "description": "Print machine-readable JSON output."
467
+ },
468
+ {
469
+ "name": "--wait-ready",
470
+ "description": "Wait for created terminal panels to be ready before returning."
397
471
  }
398
472
  ]
399
473
  },
@@ -408,13 +482,17 @@ exports.RUNPANE_CONTRACT = {
408
482
  " runpane version",
409
483
  " runpane doctor",
410
484
  " runpane agent-context [--json]",
485
+ " runpane agents doctor --agent <codex|claude> [--repo <selector>] [--json]",
411
486
  " runpane repos list [--json]",
412
487
  " runpane repos add --path <path> [--name <name>]",
413
488
  " runpane panes list [--repo <selector>] [--json]",
414
- " runpane panes create --repo <selector> --name <name> --agent <codex|claude>",
489
+ " runpane panes create --repo <selector> --name <name> --agent <codex|claude> [--wait-ready]",
415
490
  " runpane panels list --pane <pane-id> [--json]",
416
491
  " runpane panels output --panel <panel-id> [--limit <count>] [--json]",
492
+ " runpane panels screen --panel <panel-id> [--limit <count>] [--json]",
417
493
  " runpane panels input --panel <panel-id> --input-file <path|-> --yes",
494
+ " runpane panels submit --panel <panel-id> --text <text> --yes",
495
+ " runpane panels wait --panel <panel-id> [--for ready|idle|text] [--json]",
418
496
  " runpane help [command]",
419
497
  "",
420
498
  "Quick start:",
@@ -425,9 +503,18 @@ exports.RUNPANE_CONTRACT = {
425
503
  " npx --yes runpane@latest install client",
426
504
  " npx --yes runpane@latest install daemon --label \"My Server\"",
427
505
  " pnpm dlx runpane@latest",
428
- " pipx run runpane",
429
506
  "",
430
- "Run \"runpane agent-context\" when an agent needs Pane command context.",
507
+ "Common commands:",
508
+ " runpane help",
509
+ " runpane setup",
510
+ " runpane install",
511
+ " runpane doctor",
512
+ "",
513
+ "Agent discovery:",
514
+ " runpane doctor --json",
515
+ " runpane agent-context --json",
516
+ " runpane agent-context --command \"<command>\" --json",
517
+ "",
431
518
  "Run \"runpane help panes create\" for pane orchestration options."
432
519
  ],
433
520
  "install": [
@@ -494,7 +581,20 @@ exports.RUNPANE_CONTRACT = {
494
581
  ],
495
582
  "doctor": [
496
583
  "Usage:",
497
- " runpane doctor [--pane-path <path>] [--format <format>] [--verbose]"
584
+ " runpane doctor [--json] [--pane-dir <path>] [--pane-path <path>] [--format <format>] [--verbose]",
585
+ "",
586
+ "Checks wrapper/runtime details, release metadata, installed Pane detection, and Pane daemon reachability.",
587
+ "",
588
+ "Options:",
589
+ " --json Print a machine-readable environment report",
590
+ " --pane-dir <path> Connect to a specific Pane data directory",
591
+ " --pane-path <path> Inspect a specific Pane executable",
592
+ " --format <format> Release artifact format to inspect",
593
+ " --verbose Print extra diagnostics",
594
+ "",
595
+ "Agent discovery:",
596
+ " runpane doctor --json",
597
+ " runpane agent-context --json"
498
598
  ],
499
599
  "repos list": [
500
600
  "Usage:",
@@ -551,6 +651,9 @@ exports.RUNPANE_CONTRACT = {
551
651
  " --initial-input-file <path|-> Read initial input from a file or stdin",
552
652
  " --from-json <path|-> Read a full request payload",
553
653
  " --timeout-ms <milliseconds> Pane creation timeout",
654
+ " --wait-ready Wait for terminal readiness before returning",
655
+ " --ready-timeout-ms <ms> Readiness wait timeout; defaults to 30000",
656
+ " --concurrency <count> Accepted; creation is currently serialized",
554
657
  " --pane-dir <path> Connect to a specific Pane data directory",
555
658
  " --json Print machine-readable output",
556
659
  " --dry-run Validate and preview without creating panes",
@@ -609,6 +712,59 @@ exports.RUNPANE_CONTRACT = {
609
712
  " runpane agent-context --json",
610
713
  " runpane agent-context --command \"panes create\"",
611
714
  " runpane agent-context --command \"panes create\" --json"
715
+ ],
716
+ "agents doctor": [
717
+ "Usage:",
718
+ " runpane agents doctor --agent <codex|claude> [--repo <selector>] [--json]",
719
+ "",
720
+ "Diagnoses whether Codex or Claude is available in the same repository environment Pane will use.",
721
+ "",
722
+ "Options:",
723
+ " --agent <codex|claude> Built-in agent command to diagnose",
724
+ " --repo <selector> active, id, exact path, or saved repository name; defaults to active",
725
+ " --pane-dir <path> Connect to a specific Pane data directory",
726
+ " --json Print machine-readable output"
727
+ ],
728
+ "panels screen": [
729
+ "Usage:",
730
+ " runpane panels screen --panel <panel-id> [--limit <count>] [--json]",
731
+ "",
732
+ "Reads a compact current-screen view from a terminal panel. Prefers alternate-screen/TUI output and falls back to recent scrollback.",
733
+ "",
734
+ "Options:",
735
+ " --panel <panel-id> Terminal panel id",
736
+ " --limit <count> Maximum lines to return; defaults to 80",
737
+ " --pane-dir <path> Connect to a specific Pane data directory",
738
+ " --json Print machine-readable output"
739
+ ],
740
+ "panels submit": [
741
+ "Usage:",
742
+ " runpane panels submit --panel <panel-id> (--text <text>|--input-file <path|->) --yes [--json]",
743
+ "",
744
+ "Sends text to a terminal panel and normalizes the final terminal Enter to CR. Use this for ordinary prompt answers and shell commands.",
745
+ "",
746
+ "Options:",
747
+ " --panel <panel-id> Terminal panel id",
748
+ " --text <text> Text to submit before Enter",
749
+ " --input-file <path|-> Read text from a file or stdin before Enter",
750
+ " --pane-dir <path> Connect to a specific Pane data directory",
751
+ " --json Print machine-readable output",
752
+ " --yes Skip confirmation for this mutating command"
753
+ ],
754
+ "panels wait": [
755
+ "Usage:",
756
+ " runpane panels wait --panel <panel-id> [--for initialized|ready|idle|text] [--contains <text>] [--timeout-ms <ms>] [--interval-ms <ms>] [--json]",
757
+ "",
758
+ "Polls a terminal panel until it is initialized, ready, idle, or contains text. Output is intentionally small and includes next-step guidance.",
759
+ "",
760
+ "Options:",
761
+ " --panel <panel-id> Terminal panel id",
762
+ " --for <condition> initialized, ready, idle, or text; defaults to ready for CLI panels and idle otherwise",
763
+ " --contains <text> Text required for --for text; implies --for text when omitted",
764
+ " --timeout-ms <milliseconds> Wait timeout; defaults to 30000",
765
+ " --interval-ms <milliseconds> Poll interval; defaults to 500",
766
+ " --pane-dir <path> Connect to a specific Pane data directory",
767
+ " --json Print machine-readable output"
612
768
  ]
613
769
  },
614
770
  "pip": {
@@ -621,13 +777,17 @@ exports.RUNPANE_CONTRACT = {
621
777
  " runpane version",
622
778
  " runpane doctor",
623
779
  " runpane agent-context [--json]",
780
+ " runpane agents doctor --agent <codex|claude> [--repo <selector>] [--json]",
624
781
  " runpane repos list [--json]",
625
782
  " runpane repos add --path <path> [--name <name>]",
626
783
  " runpane panes list [--repo <selector>] [--json]",
627
- " runpane panes create --repo <selector> --name <name> --agent <codex|claude>",
784
+ " runpane panes create --repo <selector> --name <name> --agent <codex|claude> [--wait-ready]",
628
785
  " runpane panels list --pane <pane-id> [--json]",
629
786
  " runpane panels output --panel <panel-id> [--limit <count>] [--json]",
787
+ " runpane panels screen --panel <panel-id> [--limit <count>] [--json]",
630
788
  " runpane panels input --panel <panel-id> --input-file <path|-> --yes",
789
+ " runpane panels submit --panel <panel-id> --text <text> --yes",
790
+ " runpane panels wait --panel <panel-id> [--for ready|idle|text] [--json]",
631
791
  " runpane help [command]",
632
792
  "",
633
793
  "Quick start:",
@@ -639,7 +799,17 @@ exports.RUNPANE_CONTRACT = {
639
799
  " pipx run runpane install daemon --label \"My Server\"",
640
800
  " uvx runpane@latest",
641
801
  "",
642
- "Run \"runpane agent-context\" when an agent needs Pane command context.",
802
+ "Common commands:",
803
+ " runpane help",
804
+ " runpane setup",
805
+ " runpane install",
806
+ " runpane doctor",
807
+ "",
808
+ "Agent discovery:",
809
+ " runpane doctor --json",
810
+ " runpane agent-context --json",
811
+ " runpane agent-context --command \"<command>\" --json",
812
+ "",
643
813
  "Run \"runpane help panes create\" for pane orchestration options."
644
814
  ],
645
815
  "install": [
@@ -695,7 +865,20 @@ exports.RUNPANE_CONTRACT = {
695
865
  ],
696
866
  "doctor": [
697
867
  "Usage:",
698
- " runpane doctor [--pane-path <path>] [--format <format>] [--verbose]"
868
+ " runpane doctor [--json] [--pane-dir <path>] [--pane-path <path>] [--format <format>] [--verbose]",
869
+ "",
870
+ "Checks wrapper/runtime details, release metadata, installed Pane detection, and Pane daemon reachability.",
871
+ "",
872
+ "Options:",
873
+ " --json",
874
+ " --pane-dir <path>",
875
+ " --pane-path <path>",
876
+ " --format <format>",
877
+ " --verbose",
878
+ "",
879
+ "Agent discovery:",
880
+ " runpane doctor --json",
881
+ " runpane agent-context --json"
699
882
  ],
700
883
  "repos list": [
701
884
  "Usage:",
@@ -740,22 +923,25 @@ exports.RUNPANE_CONTRACT = {
740
923
  "Creates Pane sessions in a saved repository and opens a terminal-backed tool tab.",
741
924
  "",
742
925
  "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"
926
+ " --repo <selector> active, id, exact path, or saved repository name",
927
+ " --name <name> Pane/session name",
928
+ " --worktree-name <name> Worktree name; defaults to --name",
929
+ " --base-branch <branch> Base branch for the worktree",
930
+ " --agent <codex|claude> Built-in terminal template",
931
+ " --tool-command <command> Custom terminal command",
932
+ " --title <title> Terminal tab title",
933
+ " --initial-input <text> Text sent after the command is ready",
934
+ " --prompt <text> Alias for --initial-input",
935
+ " --initial-input-file <path|-> Read initial input from a file or stdin",
936
+ " --from-json <path|-> Read a full request payload",
937
+ " --timeout-ms <milliseconds> Pane creation timeout",
938
+ " --wait-ready Wait for terminal readiness before returning",
939
+ " --ready-timeout-ms <ms> Readiness wait timeout; defaults to 30000",
940
+ " --concurrency <count> Accepted; creation is currently serialized",
941
+ " --pane-dir <path> Connect to a specific Pane data directory",
942
+ " --json Print machine-readable output",
943
+ " --dry-run Validate and preview without creating panes",
944
+ " --yes Skip confirmation for mutating commands"
759
945
  ],
760
946
  "panels list": [
761
947
  "Usage:",
@@ -810,6 +996,59 @@ exports.RUNPANE_CONTRACT = {
810
996
  " runpane agent-context --json",
811
997
  " runpane agent-context --command \"panes create\"",
812
998
  " runpane agent-context --command \"panes create\" --json"
999
+ ],
1000
+ "agents doctor": [
1001
+ "Usage:",
1002
+ " runpane agents doctor --agent <codex|claude> [--repo <selector>] [--json]",
1003
+ "",
1004
+ "Diagnoses whether Codex or Claude is available in the same repository environment Pane will use.",
1005
+ "",
1006
+ "Options:",
1007
+ " --agent <codex|claude> Built-in agent command to diagnose",
1008
+ " --repo <selector> active, id, exact path, or saved repository name; defaults to active",
1009
+ " --pane-dir <path> Connect to a specific Pane data directory",
1010
+ " --json Print machine-readable output"
1011
+ ],
1012
+ "panels screen": [
1013
+ "Usage:",
1014
+ " runpane panels screen --panel <panel-id> [--limit <count>] [--json]",
1015
+ "",
1016
+ "Reads a compact current-screen view from a terminal panel. Prefers alternate-screen/TUI output and falls back to recent scrollback.",
1017
+ "",
1018
+ "Options:",
1019
+ " --panel <panel-id> Terminal panel id",
1020
+ " --limit <count> Maximum lines to return; defaults to 80",
1021
+ " --pane-dir <path> Connect to a specific Pane data directory",
1022
+ " --json Print machine-readable output"
1023
+ ],
1024
+ "panels submit": [
1025
+ "Usage:",
1026
+ " runpane panels submit --panel <panel-id> (--text <text>|--input-file <path|->) --yes [--json]",
1027
+ "",
1028
+ "Sends text to a terminal panel and normalizes the final terminal Enter to CR. Use this for ordinary prompt answers and shell commands.",
1029
+ "",
1030
+ "Options:",
1031
+ " --panel <panel-id> Terminal panel id",
1032
+ " --text <text> Text to submit before Enter",
1033
+ " --input-file <path|-> Read text from a file or stdin before Enter",
1034
+ " --pane-dir <path> Connect to a specific Pane data directory",
1035
+ " --json Print machine-readable output",
1036
+ " --yes Skip confirmation for this mutating command"
1037
+ ],
1038
+ "panels wait": [
1039
+ "Usage:",
1040
+ " runpane panels wait --panel <panel-id> [--for initialized|ready|idle|text] [--contains <text>] [--timeout-ms <ms>] [--interval-ms <ms>] [--json]",
1041
+ "",
1042
+ "Polls a terminal panel until it is initialized, ready, idle, or contains text. Output is intentionally small and includes next-step guidance.",
1043
+ "",
1044
+ "Options:",
1045
+ " --panel <panel-id> Terminal panel id",
1046
+ " --for <condition> initialized, ready, idle, or text; defaults to ready for CLI panels and idle otherwise",
1047
+ " --contains <text> Text required for --for text; implies --for text when omitted",
1048
+ " --timeout-ms <milliseconds> Wait timeout; defaults to 30000",
1049
+ " --interval-ms <milliseconds> Poll interval; defaults to 500",
1050
+ " --pane-dir <path> Connect to a specific Pane data directory",
1051
+ " --json Print machine-readable output"
813
1052
  ]
814
1053
  }
815
1054
  },
@@ -875,6 +1114,7 @@ exports.RUNPANE_CONTRACT = {
875
1114
  "runpane update",
876
1115
  "runpane version",
877
1116
  "runpane doctor",
1117
+ "runpane doctor --json",
878
1118
  "runpane agent-context",
879
1119
  "runpane agent-context --command \"panes create\" --json",
880
1120
  "runpane repos list --json",
@@ -889,14 +1129,14 @@ exports.RUNPANE_CONTRACT = {
889
1129
  "runpane <command> --help"
890
1130
  ],
891
1131
  "commandDescriptions": [
892
- "`runpane` with no arguments and `runpane setup` open an interactive wizard when stdin and stdout are TTYs. In non-interactive shells or CI, both forms must print help and exit successfully instead of waiting for input.",
1132
+ "`runpane` with no arguments and `runpane setup` open an interactive wizard when stdin and stdout are TTYs. In non-interactive shells or CI, both forms must print help, common commands, and agent discovery hints, then exit successfully instead of waiting for input.",
893
1133
  "`runpane install` is an alias for `runpane install client`.",
894
1134
  "`runpane install client` downloads the selected Pane desktop artifact and installs, opens, or launches it for the current platform.",
895
1135
  "`runpane install daemon` downloads or installs Pane, resolves a stable Pane executable path, and spawns `<pane executable> --remote-setup <forwarded remote setup args>`.",
896
1136
  "The wrapper must stream Pane stdout/stderr without reformatting because `pane --remote-setup` prints the one-time `pane-remote://...` connection code.",
897
1137
  "`runpane update` uses the same release resolution and installer path as `install client`.",
898
1138
  "`runpane version` prints the wrapper package version, the installed Pane version when detectable, and the latest GitHub release version when reachable.",
899
- "`runpane doctor` checks platform support, release metadata reachability, download URL selection, installed Pane detection, and remote-daemon hints.",
1139
+ "`runpane doctor` checks platform support, release metadata reachability, download URL selection, installed Pane detection, daemon reachability, and remote-daemon hints. Add `--json` for a machine-readable report that agents should run before mutating Pane state.",
900
1140
  "`runpane agent-context` prints a brief, token-efficient command schema for coding agents without connecting to the Pane daemon.",
901
1141
  "`runpane agent-context --command \"panes create\"` prints the detailed definition for one command. Add `--json` for machine-readable output.",
902
1142
  "`runpane repos list` connects to the running local Pane daemon and prints saved repository records.",
@@ -910,7 +1150,7 @@ exports.RUNPANE_CONTRACT = {
910
1150
  "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
1151
  ],
912
1152
  "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 and avoid UNC cwd issues.",
1153
+ "localControlFlagNote": "`runpane doctor --json`, `runpane repos list`, `runpane panes list`, `runpane panes create`, and `runpane panels ...` commands use or describe 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
1154
  "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
1155
  "downloadAttribution": [
916
1156
  "The npm package uses `source=npm` for all npm-registry consumers, including `npx`, `pnpm dlx`, `yarn dlx`, `bunx`, and global npm/pnpm installs.",
@@ -989,6 +1229,12 @@ exports.RUNPANE_CONTRACT = {
989
1229
  "zip",
990
1230
  "--verbose"
991
1231
  ],
1232
+ [
1233
+ "doctor",
1234
+ "--json",
1235
+ "--pane-dir",
1236
+ "/tmp/pane"
1237
+ ],
992
1238
  [
993
1239
  "agent-context"
994
1240
  ],
@@ -1076,6 +1322,62 @@ exports.RUNPANE_CONTRACT = {
1076
1322
  ],
1077
1323
  [
1078
1324
  "--version"
1325
+ ],
1326
+ [
1327
+ "agents",
1328
+ "doctor",
1329
+ "--agent",
1330
+ "codex",
1331
+ "--repo",
1332
+ "active",
1333
+ "--json"
1334
+ ],
1335
+ [
1336
+ "panes",
1337
+ "create",
1338
+ "--from-json",
1339
+ "-",
1340
+ "--wait-ready",
1341
+ "--ready-timeout-ms",
1342
+ "45000",
1343
+ "--concurrency",
1344
+ "2",
1345
+ "--yes",
1346
+ "--json"
1347
+ ],
1348
+ [
1349
+ "panels",
1350
+ "screen",
1351
+ "--panel",
1352
+ "panel-1",
1353
+ "--limit",
1354
+ "80",
1355
+ "--json"
1356
+ ],
1357
+ [
1358
+ "panels",
1359
+ "submit",
1360
+ "--panel",
1361
+ "panel-1",
1362
+ "--text",
1363
+ "2",
1364
+ "--yes",
1365
+ "--json"
1366
+ ],
1367
+ [
1368
+ "panels",
1369
+ "wait",
1370
+ "--panel",
1371
+ "panel-1",
1372
+ "--for",
1373
+ "text",
1374
+ "--contains",
1375
+ "ready",
1376
+ "--timeout-ms",
1377
+ "30000",
1378
+ "--interval-ms",
1379
+ "500",
1380
+ "--json"
1079
1381
  ]
1080
1382
  ],
1081
1383
  "topLevelHelpIncludes": [
@@ -1091,7 +1393,15 @@ exports.RUNPANE_CONTRACT = {
1091
1393
  "runpane panes create",
1092
1394
  "runpane panels list",
1093
1395
  "runpane panels output",
1094
- "runpane panels input"
1396
+ "runpane panels input",
1397
+ "runpane agents doctor",
1398
+ "runpane panels screen",
1399
+ "runpane panels submit",
1400
+ "runpane panels wait",
1401
+ "runpane doctor --json",
1402
+ "runpane agent-context --json",
1403
+ "Agent discovery:",
1404
+ "Common commands:"
1095
1405
  ],
1096
1406
  "npmHelpIncludes": [
1097
1407
  "pnpm dlx runpane@latest",
@@ -1140,48 +1450,210 @@ exports.RUNPANE_CONTRACT = {
1140
1450
  },
1141
1451
  "additionalProperties": false
1142
1452
  },
1143
- "repoListResult": {
1453
+ "doctorResult": {
1144
1454
  "type": "object",
1145
1455
  "required": [
1146
1456
  "ok",
1147
- "repos"
1457
+ "source",
1458
+ "wrapper",
1459
+ "release",
1460
+ "installedPane",
1461
+ "daemon",
1462
+ "nextCommands"
1148
1463
  ],
1149
1464
  "properties": {
1150
1465
  "ok": {
1151
- "const": true
1466
+ "type": "boolean"
1152
1467
  },
1153
- "repos": {
1154
- "type": "array",
1155
- "items": {
1156
- "type": "object",
1157
- "required": [
1158
- "id",
1159
- "name",
1160
- "path",
1161
- "active",
1162
- "sessionCount"
1163
- ],
1164
- "properties": {
1165
- "id": {
1166
- "type": "number"
1167
- },
1168
- "name": {
1169
- "type": "string"
1170
- },
1171
- "path": {
1172
- "type": "string"
1173
- },
1174
- "active": {
1175
- "type": "boolean"
1176
- },
1177
- "environment": {
1178
- "type": "string"
1468
+ "source": {
1469
+ "enum": [
1470
+ "npm",
1471
+ "pip"
1472
+ ]
1473
+ },
1474
+ "wrapper": {
1475
+ "type": "object",
1476
+ "required": [
1477
+ "runtime",
1478
+ "version",
1479
+ "paneDir",
1480
+ "endpoint"
1481
+ ],
1482
+ "properties": {
1483
+ "runtime": {
1484
+ "enum": [
1485
+ "node",
1486
+ "python"
1487
+ ]
1488
+ },
1489
+ "version": {
1490
+ "type": "string"
1491
+ },
1492
+ "paneDir": {
1493
+ "type": "string"
1494
+ },
1495
+ "endpoint": {
1496
+ "type": "object",
1497
+ "required": [
1498
+ "transport",
1499
+ "path"
1500
+ ],
1501
+ "properties": {
1502
+ "transport": {
1503
+ "enum": [
1504
+ "pipe",
1505
+ "unix"
1506
+ ]
1507
+ },
1508
+ "path": {
1509
+ "type": "string"
1510
+ }
1179
1511
  },
1180
- "sessionCount": {
1181
- "type": "number"
1182
- }
1512
+ "additionalProperties": false
1513
+ }
1514
+ },
1515
+ "additionalProperties": false
1516
+ },
1517
+ "platform": {
1518
+ "type": "object",
1519
+ "properties": {
1520
+ "os": {
1521
+ "type": "string"
1183
1522
  },
1184
- "additionalProperties": false
1523
+ "arch": {
1524
+ "type": "string"
1525
+ },
1526
+ "error": {
1527
+ "type": "string"
1528
+ }
1529
+ },
1530
+ "additionalProperties": true
1531
+ },
1532
+ "release": {
1533
+ "type": "object",
1534
+ "required": [
1535
+ "ok"
1536
+ ],
1537
+ "properties": {
1538
+ "ok": {
1539
+ "type": "boolean"
1540
+ },
1541
+ "error": {
1542
+ "type": "string"
1543
+ }
1544
+ },
1545
+ "additionalProperties": true
1546
+ },
1547
+ "installedPane": {
1548
+ "type": "object",
1549
+ "required": [
1550
+ "found"
1551
+ ],
1552
+ "properties": {
1553
+ "found": {
1554
+ "type": "boolean"
1555
+ },
1556
+ "path": {
1557
+ "type": "string"
1558
+ },
1559
+ "version": {
1560
+ "type": "string"
1561
+ }
1562
+ },
1563
+ "additionalProperties": false
1564
+ },
1565
+ "daemon": {
1566
+ "type": "object",
1567
+ "required": [
1568
+ "reachable",
1569
+ "endpoint"
1570
+ ],
1571
+ "properties": {
1572
+ "reachable": {
1573
+ "type": "boolean"
1574
+ },
1575
+ "endpoint": {
1576
+ "type": "object",
1577
+ "required": [
1578
+ "transport",
1579
+ "path"
1580
+ ],
1581
+ "properties": {
1582
+ "transport": {
1583
+ "enum": [
1584
+ "pipe",
1585
+ "unix"
1586
+ ]
1587
+ },
1588
+ "path": {
1589
+ "type": "string"
1590
+ }
1591
+ },
1592
+ "additionalProperties": false
1593
+ },
1594
+ "result": {
1595
+ "type": "object"
1596
+ },
1597
+ "error": {
1598
+ "type": "string"
1599
+ },
1600
+ "nextCommand": {
1601
+ "type": "string"
1602
+ }
1603
+ },
1604
+ "additionalProperties": false
1605
+ },
1606
+ "nextCommands": {
1607
+ "type": "array",
1608
+ "items": {
1609
+ "type": "string"
1610
+ }
1611
+ }
1612
+ },
1613
+ "additionalProperties": false
1614
+ },
1615
+ "repoListResult": {
1616
+ "type": "object",
1617
+ "required": [
1618
+ "ok",
1619
+ "repos"
1620
+ ],
1621
+ "properties": {
1622
+ "ok": {
1623
+ "const": true
1624
+ },
1625
+ "repos": {
1626
+ "type": "array",
1627
+ "items": {
1628
+ "type": "object",
1629
+ "required": [
1630
+ "id",
1631
+ "name",
1632
+ "path",
1633
+ "active",
1634
+ "sessionCount"
1635
+ ],
1636
+ "properties": {
1637
+ "id": {
1638
+ "type": "number"
1639
+ },
1640
+ "name": {
1641
+ "type": "string"
1642
+ },
1643
+ "path": {
1644
+ "type": "string"
1645
+ },
1646
+ "active": {
1647
+ "type": "boolean"
1648
+ },
1649
+ "environment": {
1650
+ "type": "string"
1651
+ },
1652
+ "sessionCount": {
1653
+ "type": "number"
1654
+ }
1655
+ },
1656
+ "additionalProperties": false
1185
1657
  }
1186
1658
  }
1187
1659
  },
@@ -1360,6 +1832,15 @@ exports.RUNPANE_CONTRACT = {
1360
1832
  },
1361
1833
  "timeoutMs": {
1362
1834
  "type": "number"
1835
+ },
1836
+ "waitReady": {
1837
+ "type": "boolean"
1838
+ },
1839
+ "readyTimeoutMs": {
1840
+ "type": "number"
1841
+ },
1842
+ "concurrency": {
1843
+ "type": "number"
1363
1844
  }
1364
1845
  },
1365
1846
  "additionalProperties": false
@@ -1435,6 +1916,102 @@ exports.RUNPANE_CONTRACT = {
1435
1916
  }
1436
1917
  },
1437
1918
  "additionalProperties": false
1919
+ },
1920
+ "readiness": {
1921
+ "type": "object",
1922
+ "required": [
1923
+ "ok",
1924
+ "condition",
1925
+ "matched",
1926
+ "timedOut",
1927
+ "elapsedMs",
1928
+ "state"
1929
+ ],
1930
+ "properties": {
1931
+ "ok": {
1932
+ "type": "boolean"
1933
+ },
1934
+ "condition": {
1935
+ "enum": [
1936
+ "initialized",
1937
+ "ready",
1938
+ "idle",
1939
+ "text"
1940
+ ]
1941
+ },
1942
+ "matched": {
1943
+ "type": "boolean"
1944
+ },
1945
+ "timedOut": {
1946
+ "type": "boolean"
1947
+ },
1948
+ "elapsedMs": {
1949
+ "type": "number"
1950
+ },
1951
+ "state": {
1952
+ "type": "object",
1953
+ "required": [
1954
+ "initialized"
1955
+ ],
1956
+ "properties": {
1957
+ "initialized": {
1958
+ "type": "boolean"
1959
+ },
1960
+ "isAlternateScreen": {
1961
+ "type": "boolean"
1962
+ },
1963
+ "activityStatus": {
1964
+ "enum": [
1965
+ "active",
1966
+ "idle"
1967
+ ]
1968
+ },
1969
+ "isCliReady": {
1970
+ "type": "boolean"
1971
+ },
1972
+ "isCliPanel": {
1973
+ "type": "boolean"
1974
+ },
1975
+ "agentType": {
1976
+ "enum": [
1977
+ "codex",
1978
+ "claude"
1979
+ ]
1980
+ },
1981
+ "lastActivity": {
1982
+ "type": "string"
1983
+ }
1984
+ },
1985
+ "additionalProperties": false
1986
+ },
1987
+ "blocked": {
1988
+ "type": "object",
1989
+ "required": [
1990
+ "kind",
1991
+ "message"
1992
+ ],
1993
+ "properties": {
1994
+ "kind": {
1995
+ "enum": [
1996
+ "codex-update",
1997
+ "agent-prompt",
1998
+ "unknown"
1999
+ ]
2000
+ },
2001
+ "message": {
2002
+ "type": "string"
2003
+ },
2004
+ "suggestedCommand": {
2005
+ "type": "string"
2006
+ }
2007
+ },
2008
+ "additionalProperties": false
2009
+ },
2010
+ "nextCommand": {
2011
+ "type": "string"
2012
+ }
2013
+ },
2014
+ "additionalProperties": false
1438
2015
  }
1439
2016
  },
1440
2017
  "additionalProperties": false
@@ -1854,108 +2431,503 @@ exports.RUNPANE_CONTRACT = {
1854
2431
  }
1855
2432
  },
1856
2433
  "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 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'`.",
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
- "Prefer `--input-file` for terminal input that includes Enter, Ctrl-C, quotes, or multiple lines.",
1871
- "Use `runpane agent-context --command <command>` for detailed command definitions only when needed."
2434
+ },
2435
+ "panelScreenResult": {
2436
+ "type": "object",
2437
+ "required": [
2438
+ "ok",
2439
+ "panelId",
2440
+ "source",
2441
+ "limit",
2442
+ "returnedLineCount",
2443
+ "hasMore",
2444
+ "text",
2445
+ "state"
1872
2446
  ],
1873
- "detailCommand": "runpane agent-context --command <command> [--json]",
1874
- "tools": [
1875
- {
1876
- "name": "agent-context",
1877
- "summary": "Print token-efficient Pane command context for coding agents.",
1878
- "arguments": [
1879
- "--command <command>",
1880
- "--json"
1881
- ]
2447
+ "properties": {
2448
+ "ok": {
2449
+ "const": true
1882
2450
  },
1883
- {
1884
- "name": "repos list",
1885
- "summary": "List repositories saved in the running Pane app.",
1886
- "arguments": [
1887
- "--json",
1888
- "--pane-dir <path>"
1889
- ]
2451
+ "panelId": {
2452
+ "type": "string"
1890
2453
  },
1891
- {
1892
- "name": "repos add",
1893
- "summary": "Register an existing git repository with the running Pane app.",
1894
- "arguments": [
1895
- "--path <path>",
1896
- "--name <name>",
1897
- "--yes",
1898
- "--json",
1899
- "--dry-run",
1900
- "--pane-dir <path>"
1901
- ]
2454
+ "paneId": {
2455
+ "type": "string"
1902
2456
  },
1903
- {
1904
- "name": "panes list",
1905
- "summary": "List Pane sessions, optionally scoped to a saved repository.",
1906
- "arguments": [
1907
- "--repo <selector>",
1908
- "--json",
1909
- "--pane-dir <path>"
2457
+ "source": {
2458
+ "enum": [
2459
+ "alternateScreen",
2460
+ "scrollback",
2461
+ "persistedOutput",
2462
+ "empty"
1910
2463
  ]
1911
2464
  },
1912
- {
1913
- "name": "panes create",
1914
- "summary": "Create one or more Pane sessions in a saved repository and open a terminal-backed tool tab.",
1915
- "arguments": [
1916
- "--repo <selector>",
1917
- "--name <name>",
1918
- "--agent <codex|claude>",
1919
- "--tool-command <command>",
1920
- "--prompt <text>",
1921
- "--initial-input-file <path|->",
1922
- "--from-json <path|->",
1923
- "--yes",
1924
- "--json"
1925
- ]
2465
+ "limit": {
2466
+ "type": "number"
1926
2467
  },
1927
- {
1928
- "name": "panels list",
1929
- "summary": "List tool panels inside a Pane session.",
1930
- "arguments": [
1931
- "--pane <pane-id>",
1932
- "--json",
1933
- "--pane-dir <path>"
1934
- ]
2468
+ "returnedLineCount": {
2469
+ "type": "number"
1935
2470
  },
1936
- {
1937
- "name": "panels output",
1938
- "summary": "Read recent terminal output from a panel.",
1939
- "arguments": [
1940
- "--panel <panel-id>",
1941
- "--limit <count>",
1942
- "--json",
1943
- "--pane-dir <path>"
1944
- ]
2471
+ "hasMore": {
2472
+ "type": "boolean"
1945
2473
  },
1946
- {
1947
- "name": "panels input",
1948
- "summary": "Send input bytes to a terminal panel.",
1949
- "arguments": [
1950
- "--panel <panel-id>",
1951
- "--text <text>",
1952
- "--input-file <path|->",
1953
- "--yes",
1954
- "--json",
1955
- "--pane-dir <path>"
1956
- ]
2474
+ "text": {
2475
+ "type": "string"
2476
+ },
2477
+ "state": {
2478
+ "type": "object",
2479
+ "required": [
2480
+ "initialized"
2481
+ ],
2482
+ "properties": {
2483
+ "initialized": {
2484
+ "type": "boolean"
2485
+ },
2486
+ "isAlternateScreen": {
2487
+ "type": "boolean"
2488
+ },
2489
+ "activityStatus": {
2490
+ "enum": [
2491
+ "active",
2492
+ "idle"
2493
+ ]
2494
+ },
2495
+ "isCliReady": {
2496
+ "type": "boolean"
2497
+ },
2498
+ "isCliPanel": {
2499
+ "type": "boolean"
2500
+ },
2501
+ "agentType": {
2502
+ "enum": [
2503
+ "codex",
2504
+ "claude"
2505
+ ]
2506
+ },
2507
+ "lastActivity": {
2508
+ "type": "string"
2509
+ }
2510
+ },
2511
+ "additionalProperties": false
2512
+ },
2513
+ "nextCommand": {
2514
+ "type": "string"
1957
2515
  }
1958
- ]
2516
+ },
2517
+ "additionalProperties": false
2518
+ },
2519
+ "panelSubmitRequest": {
2520
+ "type": "object",
2521
+ "required": [
2522
+ "panelId",
2523
+ "input"
2524
+ ],
2525
+ "properties": {
2526
+ "panelId": {
2527
+ "type": "string"
2528
+ },
2529
+ "input": {
2530
+ "type": "string"
2531
+ }
2532
+ },
2533
+ "additionalProperties": false
2534
+ },
2535
+ "panelSubmitResult": {
2536
+ "type": "object",
2537
+ "required": [
2538
+ "ok",
2539
+ "panelId",
2540
+ "inputBytes",
2541
+ "enter",
2542
+ "sentAt"
2543
+ ],
2544
+ "properties": {
2545
+ "ok": {
2546
+ "const": true
2547
+ },
2548
+ "panelId": {
2549
+ "type": "string"
2550
+ },
2551
+ "paneId": {
2552
+ "type": "string"
2553
+ },
2554
+ "inputBytes": {
2555
+ "type": "number"
2556
+ },
2557
+ "enter": {
2558
+ "const": "cr"
2559
+ },
2560
+ "sentAt": {
2561
+ "type": "string"
2562
+ },
2563
+ "nextCommand": {
2564
+ "type": "string"
2565
+ }
2566
+ },
2567
+ "additionalProperties": false
2568
+ },
2569
+ "panelWaitResult": {
2570
+ "type": "object",
2571
+ "required": [
2572
+ "ok",
2573
+ "panelId",
2574
+ "condition",
2575
+ "matched",
2576
+ "timedOut",
2577
+ "elapsedMs",
2578
+ "state",
2579
+ "screen"
2580
+ ],
2581
+ "properties": {
2582
+ "ok": {
2583
+ "type": "boolean"
2584
+ },
2585
+ "panelId": {
2586
+ "type": "string"
2587
+ },
2588
+ "paneId": {
2589
+ "type": "string"
2590
+ },
2591
+ "condition": {
2592
+ "enum": [
2593
+ "initialized",
2594
+ "ready",
2595
+ "idle",
2596
+ "text"
2597
+ ]
2598
+ },
2599
+ "matched": {
2600
+ "type": "boolean"
2601
+ },
2602
+ "timedOut": {
2603
+ "type": "boolean"
2604
+ },
2605
+ "elapsedMs": {
2606
+ "type": "number"
2607
+ },
2608
+ "state": {
2609
+ "type": "object",
2610
+ "required": [
2611
+ "initialized"
2612
+ ],
2613
+ "properties": {
2614
+ "initialized": {
2615
+ "type": "boolean"
2616
+ },
2617
+ "isAlternateScreen": {
2618
+ "type": "boolean"
2619
+ },
2620
+ "activityStatus": {
2621
+ "enum": [
2622
+ "active",
2623
+ "idle"
2624
+ ]
2625
+ },
2626
+ "isCliReady": {
2627
+ "type": "boolean"
2628
+ },
2629
+ "isCliPanel": {
2630
+ "type": "boolean"
2631
+ },
2632
+ "agentType": {
2633
+ "enum": [
2634
+ "codex",
2635
+ "claude"
2636
+ ]
2637
+ },
2638
+ "lastActivity": {
2639
+ "type": "string"
2640
+ }
2641
+ },
2642
+ "additionalProperties": false
2643
+ },
2644
+ "blocked": {
2645
+ "type": "object",
2646
+ "required": [
2647
+ "kind",
2648
+ "message"
2649
+ ],
2650
+ "properties": {
2651
+ "kind": {
2652
+ "enum": [
2653
+ "codex-update",
2654
+ "agent-prompt",
2655
+ "unknown"
2656
+ ]
2657
+ },
2658
+ "message": {
2659
+ "type": "string"
2660
+ },
2661
+ "suggestedCommand": {
2662
+ "type": "string"
2663
+ }
2664
+ },
2665
+ "additionalProperties": false
2666
+ },
2667
+ "screen": {
2668
+ "type": "object",
2669
+ "required": [
2670
+ "source",
2671
+ "text",
2672
+ "hasMore"
2673
+ ],
2674
+ "properties": {
2675
+ "source": {
2676
+ "enum": [
2677
+ "alternateScreen",
2678
+ "scrollback",
2679
+ "persistedOutput",
2680
+ "empty"
2681
+ ]
2682
+ },
2683
+ "text": {
2684
+ "type": "string"
2685
+ },
2686
+ "hasMore": {
2687
+ "type": "boolean"
2688
+ }
2689
+ },
2690
+ "additionalProperties": false
2691
+ },
2692
+ "nextCommand": {
2693
+ "type": "string"
2694
+ }
2695
+ },
2696
+ "additionalProperties": false
2697
+ },
2698
+ "agentDoctorResult": {
2699
+ "type": "object",
2700
+ "required": [
2701
+ "ok",
2702
+ "agent",
2703
+ "command",
2704
+ "available",
2705
+ "checks"
2706
+ ],
2707
+ "properties": {
2708
+ "ok": {
2709
+ "type": "boolean"
2710
+ },
2711
+ "agent": {
2712
+ "enum": [
2713
+ "codex",
2714
+ "claude"
2715
+ ]
2716
+ },
2717
+ "command": {
2718
+ "type": "string"
2719
+ },
2720
+ "repo": {
2721
+ "$ref": "#/jsonSchemas/repoListResult/properties/repos/items"
2722
+ },
2723
+ "environment": {
2724
+ "enum": [
2725
+ "wsl",
2726
+ "windows",
2727
+ "linux",
2728
+ "macos"
2729
+ ]
2730
+ },
2731
+ "available": {
2732
+ "type": "boolean"
2733
+ },
2734
+ "executablePath": {
2735
+ "type": "string"
2736
+ },
2737
+ "version": {
2738
+ "type": "string"
2739
+ },
2740
+ "checks": {
2741
+ "type": "array",
2742
+ "items": {
2743
+ "type": "object",
2744
+ "required": [
2745
+ "name",
2746
+ "ok",
2747
+ "message"
2748
+ ],
2749
+ "properties": {
2750
+ "name": {
2751
+ "type": "string"
2752
+ },
2753
+ "ok": {
2754
+ "type": "boolean"
2755
+ },
2756
+ "message": {
2757
+ "type": "string"
2758
+ }
2759
+ },
2760
+ "additionalProperties": false
2761
+ }
2762
+ },
2763
+ "warnings": {
2764
+ "type": "array",
2765
+ "items": {
2766
+ "type": "string"
2767
+ }
2768
+ }
2769
+ },
2770
+ "additionalProperties": false
2771
+ }
2772
+ },
2773
+ "agentContext": {
2774
+ "brief": {
2775
+ "title": "Pane agent context",
2776
+ "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.",
2777
+ "rules": [
2778
+ "Start with `runpane doctor --json` to understand wrapper, platform, daemon reachability, and the next safe commands before mutating Pane state.",
2779
+ "Use `runpane agent-context --json` for the full agent-facing CLI context, or `runpane agent-context --command <command> --json` for one detailed command definition.",
2780
+ "Use `runpane repos list --json` to find the saved repository when unsure after doctor shows the daemon is reachable.",
2781
+ "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 doctor --json'`.",
2782
+ "If the repository exists on disk but is not saved in Pane, use `runpane repos add --path <repo> --yes --json` before creating panes.",
2783
+ "Use `runpane agents doctor --agent <codex|claude> --repo <selector> --json` when agent availability differs across host, Windows, WSL, or repo environments.",
2784
+ "Use `runpane panes create --wait-ready` to create panes and validate initial terminal readiness in one call.",
2785
+ "Use `runpane panels screen` for compact current state, `panels wait` for readiness/text checks, and `panels submit` for ordinary Enter-submitted input.",
2786
+ "Use `runpane panels input` only when exact bytes are required, such as Ctrl-C or handcrafted terminal input.",
2787
+ "After creating panes or sending terminal input, validate with `panels wait` or bounded `panels screen` before reporting success."
2788
+ ],
2789
+ "detailCommand": "runpane agent-context --command <command> [--json]",
2790
+ "tools": [
2791
+ {
2792
+ "name": "doctor",
2793
+ "summary": "Report wrapper, platform, installed Pane, and daemon reachability before an agent mutates Pane state.",
2794
+ "arguments": [
2795
+ "--json",
2796
+ "--pane-dir <path>",
2797
+ "--pane-path <path>"
2798
+ ]
2799
+ },
2800
+ {
2801
+ "name": "agent-context",
2802
+ "summary": "Print token-efficient Pane command context for coding agents.",
2803
+ "arguments": [
2804
+ "--command <command>",
2805
+ "--json"
2806
+ ]
2807
+ },
2808
+ {
2809
+ "name": "agents doctor",
2810
+ "summary": "Check whether Codex or Claude is available in the repo environment Pane will use.",
2811
+ "arguments": [
2812
+ "--agent <codex|claude>",
2813
+ "--repo <selector>",
2814
+ "--json"
2815
+ ]
2816
+ },
2817
+ {
2818
+ "name": "repos list",
2819
+ "summary": "List repositories saved in the running Pane app.",
2820
+ "arguments": [
2821
+ "--json",
2822
+ "--pane-dir <path>"
2823
+ ]
2824
+ },
2825
+ {
2826
+ "name": "repos add",
2827
+ "summary": "Register an existing git repository with the running Pane app.",
2828
+ "arguments": [
2829
+ "--path <path>",
2830
+ "--name <name>",
2831
+ "--yes",
2832
+ "--json",
2833
+ "--dry-run",
2834
+ "--pane-dir <path>"
2835
+ ]
2836
+ },
2837
+ {
2838
+ "name": "panes list",
2839
+ "summary": "List Pane sessions, optionally scoped to a saved repository.",
2840
+ "arguments": [
2841
+ "--repo <selector>",
2842
+ "--json",
2843
+ "--pane-dir <path>"
2844
+ ]
2845
+ },
2846
+ {
2847
+ "name": "panes create",
2848
+ "summary": "Create one or more Pane sessions in a saved repository and open a terminal-backed tool tab.",
2849
+ "arguments": [
2850
+ "--repo <selector>",
2851
+ "--name <name>",
2852
+ "--agent <codex|claude>",
2853
+ "--tool-command <command>",
2854
+ "--prompt <text>",
2855
+ "--initial-input-file <path|->",
2856
+ "--from-json <path|->",
2857
+ "--wait-ready",
2858
+ "--ready-timeout-ms <ms>",
2859
+ "--concurrency <count>",
2860
+ "--yes",
2861
+ "--json"
2862
+ ]
2863
+ },
2864
+ {
2865
+ "name": "panels list",
2866
+ "summary": "List tool panels inside a Pane session.",
2867
+ "arguments": [
2868
+ "--pane <pane-id>",
2869
+ "--json",
2870
+ "--pane-dir <path>"
2871
+ ]
2872
+ },
2873
+ {
2874
+ "name": "panels output",
2875
+ "summary": "Read recent terminal output from a panel.",
2876
+ "arguments": [
2877
+ "--panel <panel-id>",
2878
+ "--limit <count>",
2879
+ "--json",
2880
+ "--pane-dir <path>"
2881
+ ]
2882
+ },
2883
+ {
2884
+ "name": "panels screen",
2885
+ "summary": "Read a compact current-screen view from a terminal panel.",
2886
+ "arguments": [
2887
+ "--panel <panel-id>",
2888
+ "--limit <count>",
2889
+ "--json",
2890
+ "--pane-dir <path>"
2891
+ ]
2892
+ },
2893
+ {
2894
+ "name": "panels input",
2895
+ "summary": "Send input bytes to a terminal panel.",
2896
+ "arguments": [
2897
+ "--panel <panel-id>",
2898
+ "--text <text>",
2899
+ "--input-file <path|->",
2900
+ "--yes",
2901
+ "--json",
2902
+ "--pane-dir <path>"
2903
+ ]
2904
+ },
2905
+ {
2906
+ "name": "panels submit",
2907
+ "summary": "Send text plus terminal Enter to a terminal panel.",
2908
+ "arguments": [
2909
+ "--panel <panel-id>",
2910
+ "--text <text>",
2911
+ "--input-file <path|->",
2912
+ "--yes",
2913
+ "--json",
2914
+ "--pane-dir <path>"
2915
+ ]
2916
+ },
2917
+ {
2918
+ "name": "panels wait",
2919
+ "summary": "Wait for terminal initialized, ready, idle, or text state with compact output.",
2920
+ "arguments": [
2921
+ "--panel <panel-id>",
2922
+ "--for <condition>",
2923
+ "--contains <text>",
2924
+ "--timeout-ms <ms>",
2925
+ "--interval-ms <ms>",
2926
+ "--json",
2927
+ "--pane-dir <path>"
2928
+ ]
2929
+ }
2930
+ ]
1959
2931
  },
1960
2932
  "commands": {
1961
2933
  "help": {
@@ -2088,16 +3060,33 @@ exports.RUNPANE_CONTRACT = {
2088
3060
  },
2089
3061
  "doctor": {
2090
3062
  "name": "doctor",
2091
- "summary": "Run platform, release, installed Pane, and remote setup diagnostics.",
2092
- "details": "Use this when runpane install/update behavior needs environment diagnostics.",
3063
+ "summary": "Run platform, release, installed Pane, daemon reachability, and remote setup diagnostics.",
3064
+ "details": "Use this first when an agent needs to understand whether Pane is installed, which wrapper/runtime is running, what daemon endpoint is expected, and whether the running Pane app is reachable. JSON mode should return a report even when the daemon is unreachable.",
2093
3065
  "requiresPaneDaemon": false,
2094
3066
  "mutates": false,
2095
3067
  "arguments": [
3068
+ {
3069
+ "name": "--json",
3070
+ "required": false,
3071
+ "description": "Print a machine-readable environment report."
3072
+ },
3073
+ {
3074
+ "name": "--pane-dir",
3075
+ "value": "<path>",
3076
+ "required": false,
3077
+ "description": "Connect to a specific Pane data directory."
3078
+ },
2096
3079
  {
2097
3080
  "name": "--pane-path",
2098
3081
  "value": "<path>",
2099
3082
  "required": false,
2100
- "description": "Use an existing Pane executable for diagnostics."
3083
+ "description": "Inspect a specific Pane executable."
3084
+ },
3085
+ {
3086
+ "name": "--format",
3087
+ "value": "<format>",
3088
+ "required": false,
3089
+ "description": "Release artifact format to inspect."
2101
3090
  },
2102
3091
  {
2103
3092
  "name": "--verbose",
@@ -2106,10 +3095,17 @@ exports.RUNPANE_CONTRACT = {
2106
3095
  }
2107
3096
  ],
2108
3097
  "examples": [
2109
- "runpane doctor",
2110
- "runpane doctor --verbose"
3098
+ "runpane doctor --json",
3099
+ "runpane doctor"
2111
3100
  ],
2112
- "notes": []
3101
+ "jsonSchemas": [
3102
+ "doctorResult"
3103
+ ],
3104
+ "notes": [
3105
+ "Agents should run `runpane doctor --json` before mutating Pane state.",
3106
+ "The JSON report includes daemon reachability as data; an unreachable daemon is not a reason to skip the rest of the report.",
3107
+ "Use `runpane agent-context --json` after doctor when full CLI context is needed."
3108
+ ]
2113
3109
  },
2114
3110
  "agent-context": {
2115
3111
  "name": "agent-context",
@@ -2319,11 +3315,29 @@ exports.RUNPANE_CONTRACT = {
2319
3315
  "name": "--json",
2320
3316
  "required": false,
2321
3317
  "description": "Print machine-readable output."
3318
+ },
3319
+ {
3320
+ "name": "--wait-ready",
3321
+ "required": false,
3322
+ "description": "Wait for each created terminal panel to be ready before returning."
3323
+ },
3324
+ {
3325
+ "name": "--ready-timeout-ms",
3326
+ "value": "<ms>",
3327
+ "required": false,
3328
+ "description": "Readiness timeout per pane; defaults to 30000."
3329
+ },
3330
+ {
3331
+ "name": "--concurrency",
3332
+ "value": "<count>",
3333
+ "required": false,
3334
+ "description": "Accepted for compatibility. Pane currently serializes multi-pane session creation so queued jobs do not time out before starting."
2322
3335
  }
2323
3336
  ],
2324
3337
  "examples": [
2325
3338
  "runpane panes create --repo active --name issue-257 --agent codex --prompt \"Plan this issue\" --yes",
2326
- "runpane panes create --from-json panes.json --yes --json"
3339
+ "runpane panes create --from-json panes.json --yes --json",
3340
+ "runpane panes create --repo active --name issue-123 --agent codex --prompt \"Plan this issue\" --wait-ready --yes --json"
2327
3341
  ],
2328
3342
  "jsonSchemas": [
2329
3343
  "paneCreateRequest",
@@ -2334,9 +3348,12 @@ exports.RUNPANE_CONTRACT = {
2334
3348
  "The built-in agent templates come from the runpane contract; custom terminal commands can pass agent-specific flags when requested by the user.",
2335
3349
  "Use --initial-input-file for multi-line prompts or shell-sensitive initial input.",
2336
3350
  "When the JSON result includes nextCommand, run it to validate that the terminal produced output before reporting success.",
3351
+ "Multi-pane requests are created sequentially today. The --concurrency flag is accepted for compatibility, but agents should not rely on parallel creation.",
2337
3352
  "For POSIX or WSL command chaining, use a custom terminal command like `bash -lc 'cmd1 && cmd2 && cmd3'`.",
2338
3353
  "For Windows PowerShell command chaining, use a custom terminal command like `powershell -NoProfile -Command \"cmd1; if ($LASTEXITCODE) { exit $LASTEXITCODE }; cmd2\"`.",
2339
- "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'`."
3354
+ "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'`.",
3355
+ "Use --wait-ready when an agent needs to verify that an agent terminal started instead of only creating a pane.",
3356
+ "If readiness returns blocked, inspect blocked.suggestedCommand rather than guessing which prompt to answer."
2340
3357
  ]
2341
3358
  },
2342
3359
  "panels list": {
@@ -2414,7 +3431,8 @@ exports.RUNPANE_CONTRACT = {
2414
3431
  "notes": [
2415
3432
  "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.",
2416
3433
  "Use --json when an agent needs timestamps, record types, returnedCount, or hasMore.",
2417
- "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."
3434
+ "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.",
3435
+ "Prefer `panels screen` for a smaller current-state read before increasing output limits."
2418
3436
  ]
2419
3437
  },
2420
3438
  "panels input": {
@@ -2473,28 +3491,236 @@ exports.RUNPANE_CONTRACT = {
2473
3491
  "Use `--input-file -` or a temp file for multi-line input, quotes, Ctrl-C, or shell-sensitive text.",
2474
3492
  "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.",
2475
3493
  "After sending input, validate with `runpane panels output --panel <panel-id> --json` before reporting success.",
2476
- "Runpane records action metadata and errors for observability, but should not log full input text by default."
3494
+ "Runpane records action metadata and errors for observability, but should not log full input text by default.",
3495
+ "For ordinary text plus Enter, prefer `panels submit` so the terminal receives a CR Enter byte."
3496
+ ]
3497
+ },
3498
+ "agents doctor": {
3499
+ "name": "agents doctor",
3500
+ "summary": "Diagnose whether a built-in agent command is available in a Pane repository environment.",
3501
+ "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.",
3502
+ "requiresPaneDaemon": true,
3503
+ "mutates": false,
3504
+ "arguments": [
3505
+ {
3506
+ "name": "--agent",
3507
+ "value": "<codex|claude>",
3508
+ "required": true,
3509
+ "description": "Built-in agent command to diagnose."
3510
+ },
3511
+ {
3512
+ "name": "--repo",
3513
+ "value": "<selector>",
3514
+ "required": false,
3515
+ "description": "Repository selector; defaults to the active Pane repo."
3516
+ },
3517
+ {
3518
+ "name": "--json",
3519
+ "required": false,
3520
+ "description": "Print machine-readable output."
3521
+ },
3522
+ {
3523
+ "name": "--pane-dir",
3524
+ "value": "<path>",
3525
+ "required": false,
3526
+ "description": "Connect to a specific Pane data directory."
3527
+ }
3528
+ ],
3529
+ "examples": [
3530
+ "runpane agents doctor --agent codex --repo active --json"
3531
+ ],
3532
+ "jsonSchemas": [
3533
+ "agentDoctorResult"
3534
+ ],
3535
+ "notes": [
3536
+ "For WSL repos, install the agent inside the WSL distro Pane uses, not only on Windows.",
3537
+ "This diagnoses built-in Codex/Claude templates only; custom commands should be validated by creating a pane and reading its screen."
3538
+ ]
3539
+ },
3540
+ "panels screen": {
3541
+ "name": "panels screen",
3542
+ "summary": "Read a compact current-screen view from a terminal panel.",
3543
+ "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.",
3544
+ "requiresPaneDaemon": true,
3545
+ "mutates": false,
3546
+ "arguments": [
3547
+ {
3548
+ "name": "--panel",
3549
+ "value": "<panel-id>",
3550
+ "required": true,
3551
+ "description": "Terminal panel id."
3552
+ },
3553
+ {
3554
+ "name": "--limit",
3555
+ "value": "<count>",
3556
+ "required": false,
3557
+ "description": "Maximum lines to return; defaults to 80."
3558
+ },
3559
+ {
3560
+ "name": "--json",
3561
+ "required": false,
3562
+ "description": "Print machine-readable output."
3563
+ },
3564
+ {
3565
+ "name": "--pane-dir",
3566
+ "value": "<path>",
3567
+ "required": false,
3568
+ "description": "Connect to a specific Pane data directory."
3569
+ }
3570
+ ],
3571
+ "examples": [
3572
+ "runpane panels screen --panel <panel-id> --limit 80 --json"
3573
+ ],
3574
+ "jsonSchemas": [
3575
+ "panelScreenResult"
3576
+ ],
3577
+ "notes": [
3578
+ "Use this before `panels output` when an agent only needs the latest visible/current state.",
3579
+ "If hasMore is true and context is missing, rerun with a larger --limit or use `panels output`."
3580
+ ]
3581
+ },
3582
+ "panels submit": {
3583
+ "name": "panels submit",
3584
+ "summary": "Send text to a terminal panel and append a terminal Enter byte.",
3585
+ "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`.",
3586
+ "requiresPaneDaemon": true,
3587
+ "mutates": true,
3588
+ "arguments": [
3589
+ {
3590
+ "name": "--panel",
3591
+ "value": "<panel-id>",
3592
+ "required": true,
3593
+ "description": "Terminal panel id."
3594
+ },
3595
+ {
3596
+ "name": "--text",
3597
+ "value": "<text>",
3598
+ "required": false,
3599
+ "description": "Text to submit before Enter."
3600
+ },
3601
+ {
3602
+ "name": "--input-file",
3603
+ "value": "<path|->",
3604
+ "required": false,
3605
+ "description": "Read text from a file or stdin before Enter."
3606
+ },
3607
+ {
3608
+ "name": "--yes",
3609
+ "required": false,
3610
+ "description": "Skip confirmation for this mutating command."
3611
+ },
3612
+ {
3613
+ "name": "--json",
3614
+ "required": false,
3615
+ "description": "Print machine-readable output."
3616
+ },
3617
+ {
3618
+ "name": "--pane-dir",
3619
+ "value": "<path>",
3620
+ "required": false,
3621
+ "description": "Connect to a specific Pane data directory."
3622
+ }
3623
+ ],
3624
+ "examples": [
3625
+ "runpane panels submit --panel <panel-id> --text \"2\" --yes --json",
3626
+ "printf \"echo hello\" | runpane panels submit --panel <panel-id> --input-file - --yes --json"
3627
+ ],
3628
+ "jsonSchemas": [
3629
+ "panelSubmitRequest",
3630
+ "panelSubmitResult"
3631
+ ],
3632
+ "notes": [
3633
+ "The response includes nextCommand for validation. Run it before reporting that the input worked.",
3634
+ "Use `panels input` for Ctrl-C, escape sequences, or any workflow requiring exact bytes."
3635
+ ]
3636
+ },
3637
+ "panels wait": {
3638
+ "name": "panels wait",
3639
+ "summary": "Wait for a terminal panel to initialize, become ready/idle, or contain text.",
3640
+ "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.",
3641
+ "requiresPaneDaemon": true,
3642
+ "mutates": false,
3643
+ "arguments": [
3644
+ {
3645
+ "name": "--panel",
3646
+ "value": "<panel-id>",
3647
+ "required": true,
3648
+ "description": "Terminal panel id."
3649
+ },
3650
+ {
3651
+ "name": "--for",
3652
+ "value": "<initialized|ready|idle|text>",
3653
+ "required": false,
3654
+ "description": "Condition to wait for. Defaults to ready for CLI panels and idle otherwise."
3655
+ },
3656
+ {
3657
+ "name": "--contains",
3658
+ "value": "<text>",
3659
+ "required": false,
3660
+ "description": "Text required for --for text; implies --for text when --for is omitted."
3661
+ },
3662
+ {
3663
+ "name": "--timeout-ms",
3664
+ "value": "<ms>",
3665
+ "required": false,
3666
+ "description": "Wait timeout; defaults to 30000."
3667
+ },
3668
+ {
3669
+ "name": "--interval-ms",
3670
+ "value": "<ms>",
3671
+ "required": false,
3672
+ "description": "Polling interval; defaults to 500."
3673
+ },
3674
+ {
3675
+ "name": "--json",
3676
+ "required": false,
3677
+ "description": "Print machine-readable output."
3678
+ },
3679
+ {
3680
+ "name": "--pane-dir",
3681
+ "value": "<path>",
3682
+ "required": false,
3683
+ "description": "Connect to a specific Pane data directory."
3684
+ }
3685
+ ],
3686
+ "examples": [
3687
+ "runpane panels wait --panel <panel-id> --for ready --timeout-ms 30000 --json",
3688
+ "runpane panels wait --panel <panel-id> --contains \"Ready\" --json"
3689
+ ],
3690
+ "jsonSchemas": [
3691
+ "panelWaitResult"
3692
+ ],
3693
+ "notes": [
3694
+ "If blocked is present, do not assume success. Use blocked.suggestedCommand or inspect `panels screen`.",
3695
+ "The default timeout and screen are intentionally small for agent context safety."
2477
3696
  ]
2478
3697
  }
2479
3698
  },
2480
3699
  "managedBlock": [
2481
3700
  "## Pane",
2482
3701
  "",
2483
- "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.",
3702
+ "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.",
3703
+ "",
3704
+ "Start with `runpane doctor --json` before taking Pane actions. Use it to understand wrapper/runtime details, daemon reachability, and the next safe commands.",
2484
3705
  "",
2485
- "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.",
3706
+ "Use `runpane agent-context --json` for full Pane CLI context. Use `runpane agent-context --command \"panels wait\" --json` or another command name for detailed schema only when needed.",
2486
3707
  "",
2487
- "After creating panes or sending terminal input, validate with bounded panel output before reporting success. Prefer `--input-file` for exact terminal bytes, newlines, Ctrl-C, quotes, or multi-line input.",
3708
+ "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.",
2488
3709
  "",
2489
3710
  "Common commands:",
3711
+ "- `runpane doctor --json`",
3712
+ "- `runpane agent-context --json`",
2490
3713
  "- `runpane repos list --json`",
2491
3714
  "- `runpane repos add --path <repo> --yes --json`",
2492
- "- `runpane panes create --repo active --name <name> --agent codex --prompt \"<task>\" --yes`",
3715
+ "- `runpane agents doctor --agent codex --repo active --json`",
3716
+ "- `runpane panes create --repo active --name <name> --agent codex --prompt \"<task>\" --wait-ready --yes --json`",
2493
3717
  "- `runpane panels list --pane <pane-id> --json`",
2494
- "- `runpane panels output --panel <panel-id> --limit 200 --json`",
2495
- "- `runpane panels input --panel <panel-id> --input-file <path|-> --yes`",
3718
+ "- `runpane panels screen --panel <panel-id> --limit 80 --json`",
3719
+ "- `runpane panels wait --panel <panel-id> --for ready --timeout-ms 30000 --json`",
3720
+ "- `runpane panels submit --panel <panel-id> --text \"<answer>\" --yes --json`",
3721
+ "- `runpane panels input --panel <panel-id> --input-file <path|-> --yes --json`",
2496
3722
  "",
2497
- "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."
3723
+ "WSL note: if `runpane doctor --json` 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 doctor --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."
2498
3724
  ]
2499
3725
  }
2500
3726
  };