runpane 2.4.235 → 2.4.237

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.
@@ -2137,7 +2137,7 @@ exports.RUNPANE_CONTRACT = {
2137
2137
  "name": "report",
2138
2138
  "summary": "Hand back a worker's structured report: state, PR, head commit, summary, and the question when blocked.",
2139
2139
  "usage": [
2140
- "runpane report --state <ready|blocked|failed|done> [--pr <number>] [--head <sha>] [--summary <text>|--summary-file <path|->] [--question <text>] [--pane <pane-id> --panel <panel-id>] [--json] [--pane-dir <path>]"
2140
+ "runpane report --state <ready|blocked|failed|done> [--pr <number>] [--head <sha>] [--summary <text>|--summary-file <path|->] [--question <text> [--choices <json>|--questions <json>]] [--pane <pane-id> --panel <panel-id>] [--json] [--pane-dir <path>]"
2141
2141
  ],
2142
2142
  "mutates": true,
2143
2143
  "additive": true,
@@ -2156,7 +2156,7 @@ exports.RUNPANE_CONTRACT = {
2156
2156
  "usage": [
2157
2157
  "runpane notify --ui <options|approve|ask|info> --title <text> [--context <text>] [--choices <json>] [--questions <json>] [--detail <text>] [--detail-label <text>] [--suggestions <json>] [--action <json>] [--links <json>] [--relays <item>] [--about-session <id|name>] [--json] [--pane-dir <path>]",
2158
2158
  "runpane notify --took <id|Q-n> <answer|question> [--status <text>] [--json] [--pane-dir <path>]",
2159
- "runpane notify --update <id|Q-n> --asked <text> --what-changed <text> [--title <text>] [--context <text>] [--choices <json>] [--questions <json>] [--links <json>] [--json] [--pane-dir <path>]",
2159
+ "runpane notify --update <id|Q-n> [--asked <text>] --what-changed <text> [--title <text>] [--context <text>] [--choices <json>] [--questions <json>] [--links <json>] [--json] [--pane-dir <path>]",
2160
2160
  "runpane notify --resume <id> [--json] [--pane-dir <path>]"
2161
2161
  ],
2162
2162
  "mutates": true,
@@ -3266,7 +3266,7 @@ exports.RUNPANE_CONTRACT = {
3266
3266
  {
3267
3267
  "name": "--choices",
3268
3268
  "value": "<json>",
3269
- "description": "notify --ui options: 1 to 9 choices as a JSON array of {label, detail?, recommended?}; with --update a reworded choice adds \"was\", its old label."
3269
+ "description": "notify --ui options: 1 to 9 choices as a JSON array of {label, detail?, recommended?}; with --update a reworded choice adds \"was\", its old label. report --state blocked takes the same, as its card's buttons."
3270
3270
  },
3271
3271
  {
3272
3272
  "name": "--detail",
@@ -3326,7 +3326,7 @@ exports.RUNPANE_CONTRACT = {
3326
3326
  {
3327
3327
  "name": "--questions",
3328
3328
  "value": "<json>",
3329
- "description": "notify --ui options, instead of --choices: 2 to 4 questions as a JSON array of {title, choices}, each with 1 to 9 choices and one pick."
3329
+ "description": "notify --ui options, instead of --choices: 2 to 4 questions as a JSON array of {title, choices}, each with 1 to 9 choices and one pick. report --state blocked takes the same."
3330
3330
  },
3331
3331
  {
3332
3332
  "name": "--took",
@@ -3351,7 +3351,7 @@ exports.RUNPANE_CONTRACT = {
3351
3351
  {
3352
3352
  "name": "--asked",
3353
3353
  "value": "<text>",
3354
- "description": "notify --update: the person's question, as they typed it."
3354
+ "description": "notify --update: the person's question, as they typed it. Needed when the update answers their typed question; leave it out for your own update, such as a loop's next run."
3355
3355
  },
3356
3356
  {
3357
3357
  "name": "--what-changed",
@@ -3676,7 +3676,7 @@ exports.RUNPANE_CONTRACT = {
3676
3676
  " runpane agents start (--pane <pane-id> | --repo <selector> --name <name> [--base-branch <branch>]) (--agent <codex|claude|cursor|opencode|pi>|--tool-command <command>) --prompt <task> --yes [--json] [--pane-dir <path>]",
3677
3677
  " runpane agents status (--pane <pane-id>|--panel <panel-id>) [--limit <count>] [--json] [--pane-dir <path>]",
3678
3678
  " runpane agents send (--pane <pane-id>|--panel <panel-id>) --text <message> --yes [--json] [--pane-dir <path>]",
3679
- " runpane report --state <ready|blocked|failed|done> [--pr <number>] [--head <sha>] [--summary-file <path|->] [--question <text>] [--json]",
3679
+ " runpane report --state <ready|blocked|failed|done> [--pr <number>] [--head <sha>] [--summary-file <path|->] [--question <text> [--choices <json>]] [--json]",
3680
3680
  " runpane notify --ui <options|approve|ask|info> --title <text> [--choices <json>] [--relays <item>] [--resume <id>] [--took <id|Q-n> <answer|question>] [--update <id|Q-n> ...] [--json]",
3681
3681
  " runpane inbox [--session <id|name>] [--json]",
3682
3682
  " runpane inbox ack <item-id>... [--decision <D-n>] [--session <id|name>] [--json]",
@@ -4936,7 +4936,7 @@ exports.RUNPANE_CONTRACT = {
4936
4936
  ],
4937
4937
  "report": [
4938
4938
  "Usage:",
4939
- " runpane report --state <ready|blocked|failed|done> [--pr <number>] [--head <sha>] [--summary <text>|--summary-file <path|->] [--question <text>] [--pane <pane-id> --panel <panel-id>] [--json] [--pane-dir <path>]",
4939
+ " runpane report --state <ready|blocked|failed|done> [--pr <number>] [--head <sha>] [--summary <text>|--summary-file <path|->] [--question <text> [--choices <json>|--questions <json>]] [--pane <pane-id> --panel <panel-id>] [--json] [--pane-dir <path>]",
4940
4940
  "",
4941
4941
  "Hands back a worker's structured report for its panel: the orchestrator receives it as an",
4942
4942
  "agent.report watch event and reads it in `agents status` and `sessions overview`.",
@@ -4944,6 +4944,11 @@ exports.RUNPANE_CONTRACT = {
4944
4944
  "It prints how many watches were waiting and received it (\"Delivered to 1 waiting watcher.\"). With no Session and",
4945
4945
  "nobody waiting, the report is still stored: a named-cursor watch receives it when it next waits.",
4946
4946
  "",
4947
+ "With --state blocked the person sees the question as a card. Its buttons come from --choices or",
4948
+ "--questions, else from needs_you in the status file passed as --summary-file. A --question that",
4949
+ "ends with options in brackets, such as \"(A (recommended) / B)\", and has neither is refused:",
4950
+ "nothing is shown. A question with no options is an open question, answered in words.",
4951
+ "",
4947
4952
  "Options:",
4948
4953
  " --state <state> ready, blocked, failed, or done",
4949
4954
  " --pr <number> Pull request number",
@@ -4951,27 +4956,31 @@ exports.RUNPANE_CONTRACT = {
4951
4956
  " --summary <text> Summary text; up to 16,000 characters are kept",
4952
4957
  " --summary-file <path|-> Read the summary from a file or stdin",
4953
4958
  " --question <text> What you need answered; required with --state blocked",
4959
+ " --choices <json> blocked: the question's buttons, as notify takes them: 1 to 9 of",
4960
+ " [{\"label\":\"...\",\"detail\":\"...\",\"recommended\":true}]",
4961
+ " --questions <json> blocked, instead of --choices: 2 to 4 of [{\"title\":\"...\",\"choices\":[...]}]",
4954
4962
  " --pane <pane-id> Pane id when not running inside a Pane terminal",
4955
4963
  " --panel <panel-id> Panel id when not running inside a Pane terminal",
4956
4964
  " --pane-dir <path> Connect to a specific Pane data directory",
4957
4965
  " --json Print machine-readable output",
4958
4966
  "",
4959
- "Example:",
4960
- " runpane report --state ready --pr 747 --head fc5dce9 --summary-file /tmp/report.md"
4967
+ "Examples:",
4968
+ " runpane report --state ready --pr 747 --head fc5dce9 --summary-file /tmp/report.md",
4969
+ " runpane report --state blocked --question 'Q-3: Use the invoice id in the PDF filename?' --choices '[{\"label\":\"Invoice id\",\"recommended\":true},{\"label\":\"Invoice number\"}]'"
4961
4970
  ],
4962
4971
  "notify": [
4963
4972
  "Usage:",
4964
4973
  " runpane notify --ui <options|approve|ask|info> --title <text> [--context <text>] [--choices <json>] [--questions <json>] [--detail <text>] [--detail-label <text>] [--suggestions <json>] [--action <json>] [--links <json>] [--relays <item>] [--about-session <id|name>] [--json] [--pane-dir <path>]",
4965
4974
  " runpane notify --took <id|Q-n> <answer|question> [--status <text>] [--json] [--pane-dir <path>]",
4966
- " runpane notify --update <id|Q-n> --asked <text> --what-changed <text> [--title <text>] [--context <text>] [--choices <json>] [--questions <json>] [--links <json>] [--json] [--pane-dir <path>]",
4975
+ " runpane notify --update <id|Q-n> [--asked <text>] --what-changed <text> [--title <text>] [--context <text>] [--choices <json>] [--questions <json>] [--links <json>] [--json] [--pane-dir <path>]",
4967
4976
  " runpane notify --resume <id> [--json] [--pane-dir <path>]",
4968
4977
  "",
4969
4978
  "Asks the person a question, or tells them something, on screen wherever they are, and",
4970
4979
  "prints their answer. The call waits until they answer; --ui info returns at once.",
4971
4980
  "Inside a Pane terminal the question names its Pane from PANE_SESSION_ID and PANE_PANEL_ID.",
4972
4981
  "When Pane is not running it prints an unavailable result: ask in the terminal instead.",
4973
- "A typed reply comes back as a reply result (or a `reply:` line in your tab): it may answer",
4974
- "the question or ask one. Say which with --took; for a question, find out, then --update.",
4982
+ "A typed reply comes back as a reply result (or a `reply:` line in your tab), recorded as the",
4983
+ "answer. If it asks something instead, run --took question, find out, then --update.",
4975
4984
  "",
4976
4985
  "Options:",
4977
4986
  " --ui <ui> options, approve, ask, or info",
@@ -4989,12 +4998,13 @@ exports.RUNPANE_CONTRACT = {
4989
4998
  " instead of posting a second one; the call waits on it, and the answer goes to the worker's tab",
4990
4999
  " --about-session <id|name> Autopilot's own item: the Session it is about",
4991
5000
  " --took <id|Q-n> <answer|question>",
4992
- " Say how you took the person's reply: answer records it as the answer;",
4993
- " question shows that you are getting more context",
5001
+ " The person's reply was a question: question reopens the approval and shows",
5002
+ " you are getting more context. answer only confirms the recorded answer",
4994
5003
  " --status <text> With --took question: what you are doing (default Getting more context…)",
4995
5004
  " --update <id|Q-n> Save a new version of the approval after the person's question, and wait on it;",
4996
5005
  " pass only what changed, and mark a reworded choice with \"was\" (its old label)",
4997
- " --asked <text> With --update: the person's question, as they typed it",
5006
+ " --asked <text> With --update: the person's question, as they typed it; leave out",
5007
+ " for your own update, such as a loop's next run",
4998
5008
  " --what-changed <text> With --update: one line per change",
4999
5009
  " --resume <id> Keep waiting on a question an earlier call returned waiting for",
5000
5010
  " --pane-dir <path> Connect to a specific Pane data directory",
@@ -5002,7 +5012,7 @@ exports.RUNPANE_CONTRACT = {
5002
5012
  "",
5003
5013
  "Examples:",
5004
5014
  " runpane notify --ui options --title \"Which database?\" --choices '[{\"label\":\"Redis\",\"recommended\":true},{\"label\":\"SQLite\"}]'",
5005
- " runpane notify --took Q-20 answer",
5015
+ " runpane notify --took Q-20 question",
5006
5016
  " runpane notify --update Q-20 --asked \"Can it be undone?\" --what-changed \"Added: it can be undone from Settings\" --context \"...\""
5007
5017
  ],
5008
5018
  "panels resume": [
@@ -5167,6 +5177,33 @@ exports.RUNPANE_CONTRACT = {
5167
5177
  "With --repo, each run is a new Pane in a fresh worktree from the repo's default base branch.",
5168
5178
  "A Session loop sends its prompt to that Session's agent each run instead of creating a new Pane.",
5169
5179
  "",
5180
+ "Writing a good loop (the person is away while it runs):",
5181
+ " 1. Reach the person only through cards and artifacts; they never open the loop's Pane,",
5182
+ " Session or terminal. Each finding, question or error (a source unreachable, a sign-in",
5183
+ " expired) is a `runpane notify` card that stands on its own: what was tried, the one thing",
5184
+ " they can do, and every artifact in --links. Act on their answers on the card.",
5185
+ " 2. Remember across runs. Keep a ledger file of the items found, what each run covered, what",
5186
+ " was surfaced and the id of each card posted. Start each run by reading it, the last one or",
5187
+ " two outputs, and the card answers since the last run. Scan only what is new, and re-check",
5188
+ " open items.",
5189
+ " 3. Never repeat. Surface an item only when it is new, newly urgent or overdue, matched by",
5190
+ " meaning, not wording, and record when it was last surfaced. While a card is unanswered,",
5191
+ " update it instead of posting another: `runpane notify --update <id> --what-changed <line>`,",
5192
+ " with the id from the ledger. Any later run of the same loop may update it.",
5193
+ " 4. Post one card per run, or none when nothing qualifies.",
5194
+ " 5. Publish each run's output to one place: the person's document destination, one folder",
5195
+ " per loop, named by date and slot, linking the previous output. Keep a copy by the ledger.",
5196
+ " 6. Ask before acting outward. Propose anything that messages or changes something for",
5197
+ " someone else on an approve card, act only on approval, and limit how often one reminder",
5198
+ " is proposed.",
5199
+ " 7. Start with a small window. Set the default look-ahead or look-back, widen it when the",
5200
+ " evidence calls for it, and record the window each run used.",
5201
+ " 8. Keep the prompt in a file. After each edit, run `loops update --prompt-file` and read the",
5202
+ " saved loop back with `loops list`.",
5203
+ " 9. Use cards that wait: --ui options or approve (such as \"Got it\" / \"Not interested\").",
5204
+ " An --ui info card disappears before the person is back.",
5205
+ "`runpane docs read --doc docs/LOOPS.md` has a worked prompt.",
5206
+ "",
5170
5207
  "Options:",
5171
5208
  " --repo <selector> Repository: active, id, exact path, or saved name.",
5172
5209
  " --session <id|name|new> Session whose agent gets the prompt each run, instead of",
@@ -5199,6 +5236,33 @@ exports.RUNPANE_CONTRACT = {
5199
5236
  "With --repo, each run is a new Pane in a fresh worktree from the repo's default base branch.",
5200
5237
  "A Session loop sends its prompt to that Session's agent each run instead of creating a new Pane.",
5201
5238
  "",
5239
+ "Writing a good loop (the person is away while it runs):",
5240
+ " 1. Reach the person only through cards and artifacts; they never open the loop's Pane,",
5241
+ " Session or terminal. Each finding, question or error (a source unreachable, a sign-in",
5242
+ " expired) is a `runpane notify` card that stands on its own: what was tried, the one thing",
5243
+ " they can do, and every artifact in --links. Act on their answers on the card.",
5244
+ " 2. Remember across runs. Keep a ledger file of the items found, what each run covered, what",
5245
+ " was surfaced and the id of each card posted. Start each run by reading it, the last one or",
5246
+ " two outputs, and the card answers since the last run. Scan only what is new, and re-check",
5247
+ " open items.",
5248
+ " 3. Never repeat. Surface an item only when it is new, newly urgent or overdue, matched by",
5249
+ " meaning, not wording, and record when it was last surfaced. While a card is unanswered,",
5250
+ " update it instead of posting another: `runpane notify --update <id> --what-changed <line>`,",
5251
+ " with the id from the ledger. Any later run of the same loop may update it.",
5252
+ " 4. Post one card per run, or none when nothing qualifies.",
5253
+ " 5. Publish each run's output to one place: the person's document destination, one folder",
5254
+ " per loop, named by date and slot, linking the previous output. Keep a copy by the ledger.",
5255
+ " 6. Ask before acting outward. Propose anything that messages or changes something for",
5256
+ " someone else on an approve card, act only on approval, and limit how often one reminder",
5257
+ " is proposed.",
5258
+ " 7. Start with a small window. Set the default look-ahead or look-back, widen it when the",
5259
+ " evidence calls for it, and record the window each run used.",
5260
+ " 8. Keep the prompt in a file. After each edit, run `loops update --prompt-file` and read the",
5261
+ " saved loop back with `loops list`.",
5262
+ " 9. Use cards that wait: --ui options or approve (such as \"Got it\" / \"Not interested\").",
5263
+ " An --ui info card disappears before the person is back.",
5264
+ "`runpane docs read --doc docs/LOOPS.md` has a worked prompt.",
5265
+ "",
5202
5266
  "Options:",
5203
5267
  " --loop <id> Loop to change; other flags replace its values.",
5204
5268
  " --repo <selector> Repository: active, id, exact path, or saved name.",
@@ -5868,7 +5932,7 @@ exports.RUNPANE_CONTRACT = {
5868
5932
  " runpane agents start (--pane <pane-id> | --repo <selector> --name <name> [--base-branch <branch>]) (--agent <codex|claude|cursor|opencode|pi>|--tool-command <command>) --prompt <task> --yes [--json] [--pane-dir <path>]",
5869
5933
  " runpane agents status (--pane <pane-id>|--panel <panel-id>) [--limit <count>] [--json] [--pane-dir <path>]",
5870
5934
  " runpane agents send (--pane <pane-id>|--panel <panel-id>) --text <message> --yes [--json] [--pane-dir <path>]",
5871
- " runpane report --state <ready|blocked|failed|done> [--pr <number>] [--head <sha>] [--summary-file <path|->] [--question <text>] [--json]",
5935
+ " runpane report --state <ready|blocked|failed|done> [--pr <number>] [--head <sha>] [--summary-file <path|->] [--question <text> [--choices <json>]] [--json]",
5872
5936
  " runpane notify --ui <options|approve|ask|info> --title <text> [--choices <json>] [--relays <item>] [--resume <id>] [--took <id|Q-n> <answer|question>] [--update <id|Q-n> ...] [--json]",
5873
5937
  " runpane inbox [--session <id|name>] [--json]",
5874
5938
  " runpane inbox ack <item-id>... [--decision <D-n>] [--session <id|name>] [--json]",
@@ -7077,7 +7141,7 @@ exports.RUNPANE_CONTRACT = {
7077
7141
  ],
7078
7142
  "report": [
7079
7143
  "Usage:",
7080
- " runpane report --state <ready|blocked|failed|done> [--pr <number>] [--head <sha>] [--summary <text>|--summary-file <path|->] [--question <text>] [--pane <pane-id> --panel <panel-id>] [--json] [--pane-dir <path>]",
7144
+ " runpane report --state <ready|blocked|failed|done> [--pr <number>] [--head <sha>] [--summary <text>|--summary-file <path|->] [--question <text> [--choices <json>|--questions <json>]] [--pane <pane-id> --panel <panel-id>] [--json] [--pane-dir <path>]",
7081
7145
  "",
7082
7146
  "Hands back a worker's structured report for its panel: the orchestrator receives it as an",
7083
7147
  "agent.report watch event and reads it in `agents status` and `sessions overview`.",
@@ -7085,6 +7149,11 @@ exports.RUNPANE_CONTRACT = {
7085
7149
  "It prints how many watches were waiting and received it (\"Delivered to 1 waiting watcher.\"). With no Session and",
7086
7150
  "nobody waiting, the report is still stored: a named-cursor watch receives it when it next waits.",
7087
7151
  "",
7152
+ "With --state blocked the person sees the question as a card. Its buttons come from --choices or",
7153
+ "--questions, else from needs_you in the status file passed as --summary-file. A --question that",
7154
+ "ends with options in brackets, such as \"(A (recommended) / B)\", and has neither is refused:",
7155
+ "nothing is shown. A question with no options is an open question, answered in words.",
7156
+ "",
7088
7157
  "Options:",
7089
7158
  " --state <state> ready, blocked, failed, or done",
7090
7159
  " --pr <number> Pull request number",
@@ -7092,27 +7161,31 @@ exports.RUNPANE_CONTRACT = {
7092
7161
  " --summary <text> Summary text; up to 16,000 characters are kept",
7093
7162
  " --summary-file <path|-> Read the summary from a file or stdin",
7094
7163
  " --question <text> What you need answered; required with --state blocked",
7164
+ " --choices <json> blocked: the question's buttons, as notify takes them: 1 to 9 of",
7165
+ " [{\"label\":\"...\",\"detail\":\"...\",\"recommended\":true}]",
7166
+ " --questions <json> blocked, instead of --choices: 2 to 4 of [{\"title\":\"...\",\"choices\":[...]}]",
7095
7167
  " --pane <pane-id> Pane id when not running inside a Pane terminal",
7096
7168
  " --panel <panel-id> Panel id when not running inside a Pane terminal",
7097
7169
  " --pane-dir <path> Connect to a specific Pane data directory",
7098
7170
  " --json Print machine-readable output",
7099
7171
  "",
7100
- "Example:",
7101
- " runpane report --state ready --pr 747 --head fc5dce9 --summary-file /tmp/report.md"
7172
+ "Examples:",
7173
+ " runpane report --state ready --pr 747 --head fc5dce9 --summary-file /tmp/report.md",
7174
+ " runpane report --state blocked --question 'Q-3: Use the invoice id in the PDF filename?' --choices '[{\"label\":\"Invoice id\",\"recommended\":true},{\"label\":\"Invoice number\"}]'"
7102
7175
  ],
7103
7176
  "notify": [
7104
7177
  "Usage:",
7105
7178
  " runpane notify --ui <options|approve|ask|info> --title <text> [--context <text>] [--choices <json>] [--questions <json>] [--detail <text>] [--detail-label <text>] [--suggestions <json>] [--action <json>] [--links <json>] [--relays <item>] [--about-session <id|name>] [--json] [--pane-dir <path>]",
7106
7179
  " runpane notify --took <id|Q-n> <answer|question> [--status <text>] [--json] [--pane-dir <path>]",
7107
- " runpane notify --update <id|Q-n> --asked <text> --what-changed <text> [--title <text>] [--context <text>] [--choices <json>] [--questions <json>] [--links <json>] [--json] [--pane-dir <path>]",
7180
+ " runpane notify --update <id|Q-n> [--asked <text>] --what-changed <text> [--title <text>] [--context <text>] [--choices <json>] [--questions <json>] [--links <json>] [--json] [--pane-dir <path>]",
7108
7181
  " runpane notify --resume <id> [--json] [--pane-dir <path>]",
7109
7182
  "",
7110
7183
  "Asks the person a question, or tells them something, on screen wherever they are, and",
7111
7184
  "prints their answer. The call waits until they answer; --ui info returns at once.",
7112
7185
  "Inside a Pane terminal the question names its Pane from PANE_SESSION_ID and PANE_PANEL_ID.",
7113
7186
  "When Pane is not running it prints an unavailable result: ask in the terminal instead.",
7114
- "A typed reply comes back as a reply result (or a `reply:` line in your tab): it may answer",
7115
- "the question or ask one. Say which with --took; for a question, find out, then --update.",
7187
+ "A typed reply comes back as a reply result (or a `reply:` line in your tab), recorded as the",
7188
+ "answer. If it asks something instead, run --took question, find out, then --update.",
7116
7189
  "",
7117
7190
  "Options:",
7118
7191
  " --ui <ui> options, approve, ask, or info",
@@ -7130,12 +7203,13 @@ exports.RUNPANE_CONTRACT = {
7130
7203
  " instead of posting a second one; the call waits on it, and the answer goes to the worker's tab",
7131
7204
  " --about-session <id|name> Autopilot's own item: the Session it is about",
7132
7205
  " --took <id|Q-n> <answer|question>",
7133
- " Say how you took the person's reply: answer records it as the answer;",
7134
- " question shows that you are getting more context",
7206
+ " The person's reply was a question: question reopens the approval and shows",
7207
+ " you are getting more context. answer only confirms the recorded answer",
7135
7208
  " --status <text> With --took question: what you are doing (default Getting more context…)",
7136
7209
  " --update <id|Q-n> Save a new version of the approval after the person's question, and wait on it;",
7137
7210
  " pass only what changed, and mark a reworded choice with \"was\" (its old label)",
7138
- " --asked <text> With --update: the person's question, as they typed it",
7211
+ " --asked <text> With --update: the person's question, as they typed it; leave out",
7212
+ " for your own update, such as a loop's next run",
7139
7213
  " --what-changed <text> With --update: one line per change",
7140
7214
  " --resume <id> Keep waiting on a question an earlier call returned waiting for",
7141
7215
  " --pane-dir <path> Connect to a specific Pane data directory",
@@ -7143,7 +7217,7 @@ exports.RUNPANE_CONTRACT = {
7143
7217
  "",
7144
7218
  "Examples:",
7145
7219
  " runpane notify --ui options --title \"Which database?\" --choices '[{\"label\":\"Redis\",\"recommended\":true},{\"label\":\"SQLite\"}]'",
7146
- " runpane notify --took Q-20 answer",
7220
+ " runpane notify --took Q-20 question",
7147
7221
  " runpane notify --update Q-20 --asked \"Can it be undone?\" --what-changed \"Added: it can be undone from Settings\" --context \"...\""
7148
7222
  ],
7149
7223
  "panels resume": [
@@ -7308,6 +7382,33 @@ exports.RUNPANE_CONTRACT = {
7308
7382
  "With --repo, each run is a new Pane in a fresh worktree from the repo's default base branch.",
7309
7383
  "A Session loop sends its prompt to that Session's agent each run instead of creating a new Pane.",
7310
7384
  "",
7385
+ "Writing a good loop (the person is away while it runs):",
7386
+ " 1. Reach the person only through cards and artifacts; they never open the loop's Pane,",
7387
+ " Session or terminal. Each finding, question or error (a source unreachable, a sign-in",
7388
+ " expired) is a `runpane notify` card that stands on its own: what was tried, the one thing",
7389
+ " they can do, and every artifact in --links. Act on their answers on the card.",
7390
+ " 2. Remember across runs. Keep a ledger file of the items found, what each run covered, what",
7391
+ " was surfaced and the id of each card posted. Start each run by reading it, the last one or",
7392
+ " two outputs, and the card answers since the last run. Scan only what is new, and re-check",
7393
+ " open items.",
7394
+ " 3. Never repeat. Surface an item only when it is new, newly urgent or overdue, matched by",
7395
+ " meaning, not wording, and record when it was last surfaced. While a card is unanswered,",
7396
+ " update it instead of posting another: `runpane notify --update <id> --what-changed <line>`,",
7397
+ " with the id from the ledger. Any later run of the same loop may update it.",
7398
+ " 4. Post one card per run, or none when nothing qualifies.",
7399
+ " 5. Publish each run's output to one place: the person's document destination, one folder",
7400
+ " per loop, named by date and slot, linking the previous output. Keep a copy by the ledger.",
7401
+ " 6. Ask before acting outward. Propose anything that messages or changes something for",
7402
+ " someone else on an approve card, act only on approval, and limit how often one reminder",
7403
+ " is proposed.",
7404
+ " 7. Start with a small window. Set the default look-ahead or look-back, widen it when the",
7405
+ " evidence calls for it, and record the window each run used.",
7406
+ " 8. Keep the prompt in a file. After each edit, run `loops update --prompt-file` and read the",
7407
+ " saved loop back with `loops list`.",
7408
+ " 9. Use cards that wait: --ui options or approve (such as \"Got it\" / \"Not interested\").",
7409
+ " An --ui info card disappears before the person is back.",
7410
+ "`runpane docs read --doc docs/LOOPS.md` has a worked prompt.",
7411
+ "",
7311
7412
  "Options:",
7312
7413
  " --repo <selector> Repository: active, id, exact path, or saved name.",
7313
7414
  " --session <id|name|new> Session whose agent gets the prompt each run, instead of",
@@ -7340,6 +7441,33 @@ exports.RUNPANE_CONTRACT = {
7340
7441
  "With --repo, each run is a new Pane in a fresh worktree from the repo's default base branch.",
7341
7442
  "A Session loop sends its prompt to that Session's agent each run instead of creating a new Pane.",
7342
7443
  "",
7444
+ "Writing a good loop (the person is away while it runs):",
7445
+ " 1. Reach the person only through cards and artifacts; they never open the loop's Pane,",
7446
+ " Session or terminal. Each finding, question or error (a source unreachable, a sign-in",
7447
+ " expired) is a `runpane notify` card that stands on its own: what was tried, the one thing",
7448
+ " they can do, and every artifact in --links. Act on their answers on the card.",
7449
+ " 2. Remember across runs. Keep a ledger file of the items found, what each run covered, what",
7450
+ " was surfaced and the id of each card posted. Start each run by reading it, the last one or",
7451
+ " two outputs, and the card answers since the last run. Scan only what is new, and re-check",
7452
+ " open items.",
7453
+ " 3. Never repeat. Surface an item only when it is new, newly urgent or overdue, matched by",
7454
+ " meaning, not wording, and record when it was last surfaced. While a card is unanswered,",
7455
+ " update it instead of posting another: `runpane notify --update <id> --what-changed <line>`,",
7456
+ " with the id from the ledger. Any later run of the same loop may update it.",
7457
+ " 4. Post one card per run, or none when nothing qualifies.",
7458
+ " 5. Publish each run's output to one place: the person's document destination, one folder",
7459
+ " per loop, named by date and slot, linking the previous output. Keep a copy by the ledger.",
7460
+ " 6. Ask before acting outward. Propose anything that messages or changes something for",
7461
+ " someone else on an approve card, act only on approval, and limit how often one reminder",
7462
+ " is proposed.",
7463
+ " 7. Start with a small window. Set the default look-ahead or look-back, widen it when the",
7464
+ " evidence calls for it, and record the window each run used.",
7465
+ " 8. Keep the prompt in a file. After each edit, run `loops update --prompt-file` and read the",
7466
+ " saved loop back with `loops list`.",
7467
+ " 9. Use cards that wait: --ui options or approve (such as \"Got it\" / \"Not interested\").",
7468
+ " An --ui info card disappears before the person is back.",
7469
+ "`runpane docs read --doc docs/LOOPS.md` has a worked prompt.",
7470
+ "",
7343
7471
  "Options:",
7344
7472
  " --loop <id> Loop to change; other flags replace its values.",
7345
7473
  " --repo <selector> Repository: active, id, exact path, or saved name.",
@@ -8030,8 +8158,8 @@ exports.RUNPANE_CONTRACT = {
8030
8158
  "`runpane machine health` shows this machine's disk and memory levels, the Panes using the most memory, leak warnings, and the disk space Pane can free by tier. `runpane machine cleanup --kind <kind>` lists one kind of tier 1 or 2 item (a dry run) and deletes them with `--yes`; tier 3 items are not Pane's, so it refuses them and says how to free them. Agents free disk only through this command, never with rm.",
8031
8159
  "`runpane loops list|create|update|run|pause|resume|delete` manage loops (scheduled tasks): a cron schedule that starts a new Pane in a fresh worktree for each run, or sends a prompt to a Session's agent. Loops are for large recurring jobs and run at most once an hour; for short waits, agents use their harness's own sleep and wake. See [LOOPS.md](LOOPS.md).",
8032
8160
  "`runpane agents start|status|send` finish the three common agent jobs in one call each: start an agent on a task (a new tab in the work's Pane with `--pane <id>`, or a new Pane for new work), check on it, and send it a follow-up.",
8033
- "`runpane report --state ready|blocked|failed|done` is how a worker hands back its result. It stores the latest report on the worker's panel (state, `--pr`, `--head`, up to 16,000 characters of `--summary` or `--summary-file`, and the `--question` a blocked worker needs answered), journals an opt-in `agent.report` watch event (`REPORT <pane-name> pane <pane-id> panel <panel-id> ready pr#747 fc5dce9`; it skips the `--min-interval` batch), records it as Session activity, and shows it in `agents status`, `panels list`, and `sessions overview` (each panel's own report as `panes[].panels[].report`, with a JSON object summary as `data`, and the Pane's newest as `panes[].report`). Inside a Pane terminal the panel comes from `PANE_SESSION_ID` and `PANE_PANEL_ID`; elsewhere pass `--pane` and `--panel`. It prints how many watches were waiting for the report and received it (`Delivered to 1 waiting watcher.`, `liveWatchers` in JSON). Zero means nobody was waiting right now, not that the report is lost: it stays on the panel, and a named-cursor watch receives it when it next waits.",
8034
- "`runpane notify` asks the person a question, or tells them something, on screen wherever they are, and prints their answer: `--ui options` with 1 to 9 `--choices` returns `{answer, note?}` (the chosen label), or with 2 to 4 `--questions` (`[{title, choices}]`) one pick each, as `{answer, answers}`, `--ui approve` returns `{approved, note?}`, `--ui ask` returns `{answer}`, and `--ui info` returns `{delivered: \"screen\"|\"inbox\"}` at once. Any ui takes up to 6 `--links` (`{label, path}`, `{label, url}` or `{label, approval}` for another approval), shown as chips on the card. When the person types a reply it returns `{reply, picks?, id, next}` (or, with no open call, types a `reply:` line into the asking tab): the reply may answer the question or ask one. `runpane notify --took <id|Q-n> answer` records it as the answer; `--took <id|Q-n> question [--status <text>]` shows that the agent is getting more context, and `runpane notify --update <id|Q-n> --asked <text> --what-changed <text>` with any changed `--title`, `--context`, `--choices`, `--questions` or `--links` saves a new version and waits on it. `--took` prints `{took, id, next?}`. Only the reply's reader (the asker, the orchestrator that relayed it, or Autopilot) may run them. The call waits with no time limit. A `{waiting: true, id, next}` result means the wait should continue with `runpane notify --resume <id>`; `runpane mcp` asks for it only for clients whose tool calls time out. When Pane is not running or Notify is off it prints `{unavailable, next}` and exits 0, so the agent asks in its terminal. Invalid input fails before anything is shown, with a message naming the field. A Session orchestrator adds `--relays <item>` (an id from `runpane inbox`) to relay a worker's question: the same card gains the choices, context and links, the call waits on it as usual, and the answer also goes straight to the worker's tab. Autopilot's own item takes `--about-session <id|name>`, the Session it is about. It needs no `--yes`: asking the person is the point.",
8161
+ "`runpane report --state ready|blocked|failed|done` is how a worker hands back its result. It stores the latest report on the worker's panel (state, `--pr`, `--head`, up to 16,000 characters of `--summary` or `--summary-file`, and the `--question` a blocked worker needs answered, with its buttons as `--choices` or `--questions` in notify's JSON), journals an opt-in `agent.report` watch event (`REPORT <pane-name> pane <pane-id> panel <panel-id> ready pr#747 fc5dce9`; it skips the `--min-interval` batch), records it as Session activity, and shows it in `agents status`, `panels list`, and `sessions overview` (each panel's own report as `panes[].panels[].report`, with a JSON object summary as `data`, and the Pane's newest as `panes[].report`). Inside a Pane terminal the panel comes from `PANE_SESSION_ID` and `PANE_PANEL_ID`; elsewhere pass `--pane` and `--panel`. It prints how many watches were waiting for the report and received it (`Delivered to 1 waiting watcher.`, `liveWatchers` in JSON). Zero means nobody was waiting right now, not that the report is lost: it stays on the panel, and a named-cursor watch receives it when it next waits.",
8162
+ "`runpane notify` asks the person a question, or tells them something, on screen wherever they are, and prints their answer: `--ui options` with 1 to 9 `--choices` returns `{answer, note?}` (the chosen label), or with 2 to 4 `--questions` (`[{title, choices}]`) one pick each, as `{answer, answers}`, `--ui approve` returns `{approved, note?}`, `--ui ask` returns `{answer}`, and `--ui info` returns `{delivered: \"screen\"|\"inbox\"}` at once. Any ui takes up to 6 `--links` (`{label, path}`, `{label, url}` or `{label, approval}` for another approval), shown as chips on the card. When the person types a reply it returns `{reply, picks?, id, next}` (or, with no open call, types a `reply:` line into the asking tab), and Pane records the reply as the answer once it is delivered. If the reply asks something instead, `--took <id|Q-n> question [--status <text>]` reopens the approval and shows that the agent is getting more context (`--took <id|Q-n> answer` confirms it, and changes nothing), and `runpane notify --update <id|Q-n> [--asked <text>] --what-changed <text>` with any changed `--title`, `--context`, `--choices`, `--questions` or `--links` saves a new version and waits on it. `--took` prints `{took, id, next?}`. Only the reply's reader (the asker, the orchestrator that relayed it, or Autopilot) may run them. The call waits with no time limit. A `{waiting: true, id, next}` result means the wait should continue with `runpane notify --resume <id>`; `runpane mcp` asks for it only for clients whose tool calls time out. When Pane is not running or Notify is off it prints `{unavailable, next}` and exits 0, so the agent asks in its terminal. Invalid input fails before anything is shown, with a message naming the field. A Session orchestrator adds `--relays <item>` (an id from `runpane inbox`) to relay a worker's question: the same card gains the choices, context and links, the call waits on it as usual, and the answer also goes straight to the worker's tab. Autopilot's own item takes `--about-session <id|name>`, the Session it is about. It needs no `--yes`: asking the person is the point.",
8035
8163
  "Work sent to an agent through `runpane panels create`, `panes create` (with a prompt), or `panels submit` records that the sender waits for a `runpane report`, unless the request says `--source user` (Pane's own UI does) or `--no-expect-report`; `--expect-report` asks for one anyway. Typing into a tab never does. If the agent then goes ready or its panel exits without a report, Pane journals one opt-in `agent.report.missing` entry (`MISSING REPORT <pane-name> pane <pane-id> panel <panel-id> ready|exited`) whose `lastOutput` is the agent's last transcript reply or last screen lines; it skips the `--min-interval` batch and reaches only watchers that list it in `--kinds`. While the agent's screen shows background work (Claude's `· 1 shell` footer or a running background subagent row, Codex's `background terminal running` line), Pane waits and looks again every 10 seconds instead. `agent.blocked` entries carry `screenLines`, the prompt the agent waits on, and are journalled once a panel has stayed blocked for 2 seconds.",
8036
8164
  "The orchestrator guide prescribes submit without `--wait`, followed by its named watch; use one completion consumer. As an optional CLI route, `--wait` on `runpane panels submit`, `panels create`, and `panes create` turns the expected report on and blocks on that panel until the first `agent.report`, `agent.report.missing`, `agent.blocked`, `panel.exited`, or `pane.gone`, then prints one line of JSON (`dispatchWaitResult`): the outcome, ids, the report's state, summary, `summaryPath`, PR and head, `screenLines` for a prompt, or `lastOutput` for a missing report, never the transcript. It exits 0 for a report, 3 missing, 4 blocked, 5 exited or gone, and 124 when `--timeout <duration>` passes. It follows the journal from the position the daemon took before delivering the work, so nothing that happens right after delivery is missed. It reuses watch --until-event and returns indeterminate (exit 6) if the journal epoch changes or retained history is lost; inspect the panel and inbox before retrying. Report-expected dispatches are serialized per panel and refused before writing while a result or missing-output collection is outstanding. A send with --no-expect-report is a reply (an answer, or an addition to the current work): it is delivered while a report is outstanding and leaves that expectation in place. Then watch for the original result.",
8037
8165
  "`runpane inbox [--session <id|name>] [--json]` lists what a Session's orchestrator has not acknowledged: reports, missing reports, and on-screen questions (a question clears itself once its panel moves on), plus `answers`, what its workers were told, kept 7 days; an answer with no `decision` still needs its D-n. `runpane inbox ack <item-id>...` or `--all --session <id|name>` clears items, and `runpane inbox ack <item-id>... --decision <D-n>` records the D-n, even on an item already cleared. An orchestrator runs it when it starts or resumes, to catch anything that finished while it was down; Pane never injects the inbox into its turns.",
@@ -12438,6 +12566,69 @@ exports.RUNPANE_CONTRACT = {
12438
12566
  },
12439
12567
  "reportedAt": {
12440
12568
  "type": "string"
12569
+ },
12570
+ "choices": {
12571
+ "type": "array",
12572
+ "items": {
12573
+ "type": "object",
12574
+ "required": [
12575
+ "label"
12576
+ ],
12577
+ "properties": {
12578
+ "label": {
12579
+ "type": "string"
12580
+ },
12581
+ "detail": {
12582
+ "type": "string"
12583
+ },
12584
+ "recommended": {
12585
+ "type": "boolean"
12586
+ }
12587
+ },
12588
+ "additionalProperties": false
12589
+ },
12590
+ "description": "A blocked report's buttons (--choices)."
12591
+ },
12592
+ "questions": {
12593
+ "type": "array",
12594
+ "items": {
12595
+ "type": "object",
12596
+ "required": [
12597
+ "title",
12598
+ "choices"
12599
+ ],
12600
+ "properties": {
12601
+ "title": {
12602
+ "type": "string"
12603
+ },
12604
+ "why": {
12605
+ "type": "string"
12606
+ },
12607
+ "choices": {
12608
+ "type": "array",
12609
+ "items": {
12610
+ "type": "object",
12611
+ "required": [
12612
+ "label"
12613
+ ],
12614
+ "properties": {
12615
+ "label": {
12616
+ "type": "string"
12617
+ },
12618
+ "detail": {
12619
+ "type": "string"
12620
+ },
12621
+ "recommended": {
12622
+ "type": "boolean"
12623
+ }
12624
+ },
12625
+ "additionalProperties": false
12626
+ }
12627
+ }
12628
+ },
12629
+ "additionalProperties": false
12630
+ },
12631
+ "description": "A blocked report's several questions (--questions), each with its own buttons."
12441
12632
  }
12442
12633
  },
12443
12634
  "additionalProperties": false
@@ -16905,7 +17096,7 @@ exports.RUNPANE_CONTRACT = {
16905
17096
  "additionalProperties": false
16906
17097
  },
16907
17098
  "notifyRequest": {
16908
- "description": "What `runpane notify` and `runpane secrets request` send on the runpane:notify daemon channel: the question fields, with relays or aboutSession when they apply; resume alone; took with tookAs (and status); or update with asked, whatChanged and the changed fields. Only `secrets request` sends ui secret.",
17099
+ "description": "What `runpane notify` and `runpane secrets request` send on the runpane:notify daemon channel: the question fields, with relays or aboutSession when they apply; resume alone; took with tookAs (and status); or update with whatChanged, asked when it answers the person's typed question, and the changed fields. Only `secrets request` sends ui secret.",
16909
17100
  "type": "object",
16910
17101
  "required": [
16911
17102
  "caller"
@@ -17001,7 +17192,7 @@ exports.RUNPANE_CONTRACT = {
17001
17192
  "answer",
17002
17193
  "question"
17003
17194
  ],
17004
- "description": "answer records the reply as the answer; question shows the reader is getting more context."
17195
+ "description": "question reopens the approval and shows the reader is getting more context; answer confirms the reply, already recorded as the answer."
17005
17196
  },
17006
17197
  "status": {
17007
17198
  "type": "string",
@@ -17086,7 +17277,7 @@ exports.RUNPANE_CONTRACT = {
17086
17277
  },
17087
17278
  {
17088
17279
  "type": "object",
17089
- "description": "The person typed a reply: it may answer the question or ask one. The approval keeps waiting; say which with `runpane notify --took <replyId> answer|question` (see next).",
17280
+ "description": "The person typed a reply, and Pane recorded it as the answer. If it asks something instead, run `runpane notify --took <replyId> question` (see next).",
17090
17281
  "required": [
17091
17282
  "reply",
17092
17283
  "id",
@@ -24285,7 +24476,19 @@ exports.RUNPANE_CONTRACT = {
24285
24476
  "name": "--question",
24286
24477
  "value": "<text>",
24287
24478
  "required": false,
24288
- "description": "What you need answered; required with --state blocked."
24479
+ "description": "What you need answered; required with --state blocked. It is the card's title: put options in --choices or --questions, not in brackets at its end."
24480
+ },
24481
+ {
24482
+ "name": "--choices",
24483
+ "value": "<json>",
24484
+ "required": false,
24485
+ "description": "With --state blocked: the question's buttons, exactly as `runpane notify --choices` takes them (1 to 9 of {label, detail?, recommended?}) and checked the same way."
24486
+ },
24487
+ {
24488
+ "name": "--questions",
24489
+ "value": "<json>",
24490
+ "required": false,
24491
+ "description": "With --state blocked, instead of --choices: 2 to 4 questions as `runpane notify --questions` takes them ({title, choices, why?}), each with its own buttons."
24289
24492
  },
24290
24493
  {
24291
24494
  "name": "--pane",
@@ -24313,7 +24516,8 @@ exports.RUNPANE_CONTRACT = {
24313
24516
  ],
24314
24517
  "examples": [
24315
24518
  "runpane report --state ready --pr 747 --head fc5dce9 --summary-file /tmp/report.md --json",
24316
- "runpane report --state blocked --question \"Should the migration drop the old column?\""
24519
+ "runpane report --state blocked --question \"Should the migration drop the old column?\"",
24520
+ "runpane report --state blocked --question 'Q-3: Use the invoice id in the PDF filename?' --choices '[{\"label\":\"Invoice id\",\"detail\":\"Ids are stable\",\"recommended\":true},{\"label\":\"Invoice number\"}]' --summary 'Invoice PDFs'"
24317
24521
  ],
24318
24522
  "jsonSchemas": [
24319
24523
  "reportResult"
@@ -24323,7 +24527,8 @@ exports.RUNPANE_CONTRACT = {
24323
24527
  "Each report replaces the panel's previous one and survives a Pane restart.",
24324
24528
  "agent.report is in the default kinds of `runpane watch --follow` and `--until-event`, and arrives from any panel, a shell tab included. REPORT lines skip the --min-interval batch.",
24325
24529
  "The output says who received it: \"Delivered to N waiting watcher(s).\" counts watches waiting at that moment (liveWatchers in JSON). With no Session and nobody waiting it adds that the report is stored on the panel (runpane agents status --panel <id>) and that a named-cursor watch (runpane watch --as <name> --kinds agent.report) still receives it when it next waits. Zero is not a failure; the exit code is 0 either way.",
24326
- "With --state blocked and --question, the person sees an answerable card at once; it rings once the orchestrator relays it or after 10 minutes. The answer reaches this tab as `answer: Q-n → <answer> (by you)`. `closed: Q-n (by you)` and `correction: Q-n → <answer> (by you)` lines are the person's word too."
24530
+ "With --state blocked and --question, the person sees an answerable card at once; it rings once the orchestrator relays it or after 10 minutes. The answer reaches this tab as `answer: Q-n → <answer> (by you)`. `closed: Q-n (by you)` and `correction: Q-n → <answer> (by you)` lines are the person's word too.",
24531
+ "A blocked report's buttons come from --choices or --questions first, then from the `needs_you` block of the status file passed as --summary-file. Invalid --choices or --questions JSON fails with ERR_NOTIFY_INVALID, as notify does. A --question that ends with an option list in brackets (\"(A / B)\" or \"(A (recommended) / B)\") and has no options from either source is refused with ERR_REPORT_PACKED_OPTIONS and nothing is shown; a question with no option list is accepted as an open question."
24327
24532
  ]
24328
24533
  },
24329
24534
  "sessions list": {
@@ -25567,7 +25772,14 @@ exports.RUNPANE_CONTRACT = {
25567
25772
  "loopDryRunResult"
25568
25773
  ],
25569
25774
  "notes": [
25570
- "Saving rejects a cron whose runs fall less than 60 minutes apart. Check one first with --dry-run."
25775
+ "Saving rejects a cron whose runs fall less than 60 minutes apart. Check one first with --dry-run.",
25776
+ "Writing a good loop: a loop runs while the person is away. Reach them only through `runpane notify` cards that wait (`--ui options` or `approve`, never `info`), each standing on its own with what was tried, the one thing they can do and every artifact in `--links`; act on their answers on the card.",
25777
+ "Keep a ledger file of items found, what each run covered, what was surfaced and the id of each card posted. Start each run by reading it, the last one or two outputs and the card answers since the last run; scan only what is new and re-check open items.",
25778
+ "Surface an item only when it is new, newly urgent or overdue, matched by meaning, not wording. Post one card per run, or none; while a card is unanswered, update it with `runpane notify --update <id> --what-changed <line>` (the id from the ledger) instead of posting another. Any later run of the same loop may update it.",
25779
+ "Publish each run's output to the person's document destination, one folder per loop, named by date and slot and linking the previous output; keep a local copy by the ledger.",
25780
+ "Propose anything that messages or changes something for someone else on an approve card and act only on approval; limit how often one reminder is proposed.",
25781
+ "Start with a small look-ahead or look-back window, widen it when the evidence calls for it, and record the window each run used.",
25782
+ "Keep the prompt in a file: after each edit run `runpane loops update --loop <id> --prompt-file <path> --yes` and read the saved loop back with `runpane loops list --json`. `runpane docs read --doc docs/LOOPS.md` has a worked prompt."
25571
25783
  ]
25572
25784
  },
25573
25785
  "loops update": {
@@ -25667,7 +25879,15 @@ exports.RUNPANE_CONTRACT = {
25667
25879
  "loopResult",
25668
25880
  "loopDryRunResult"
25669
25881
  ],
25670
- "notes": []
25882
+ "notes": [
25883
+ "Writing a good loop: a loop runs while the person is away. Reach them only through `runpane notify` cards that wait (`--ui options` or `approve`, never `info`), each standing on its own with what was tried, the one thing they can do and every artifact in `--links`; act on their answers on the card.",
25884
+ "Keep a ledger file of items found, what each run covered, what was surfaced and the id of each card posted. Start each run by reading it, the last one or two outputs and the card answers since the last run; scan only what is new and re-check open items.",
25885
+ "Surface an item only when it is new, newly urgent or overdue, matched by meaning, not wording. Post one card per run, or none; while a card is unanswered, update it with `runpane notify --update <id> --what-changed <line>` (the id from the ledger) instead of posting another. Any later run of the same loop may update it.",
25886
+ "Publish each run's output to the person's document destination, one folder per loop, named by date and slot and linking the previous output; keep a local copy by the ledger.",
25887
+ "Propose anything that messages or changes something for someone else on an approve card and act only on approval; limit how often one reminder is proposed.",
25888
+ "Start with a small look-ahead or look-back window, widen it when the evidence calls for it, and record the window each run used.",
25889
+ "Keep the prompt in a file: after each edit run `runpane loops update --loop <id> --prompt-file <path> --yes` and read the saved loop back with `runpane loops list --json`. `runpane docs read --doc docs/LOOPS.md` has a worked prompt."
25890
+ ]
25671
25891
  },
25672
25892
  "loops run": {
25673
25893
  "name": "loops run",
@@ -25953,13 +26173,13 @@ exports.RUNPANE_CONTRACT = {
25953
26173
  "name": "--took",
25954
26174
  "value": "<id|Q-n>",
25955
26175
  "required": false,
25956
- "description": "After a reply result or a `reply:` line: the approval's id or Q-n, with tookAs answer (record the reply as the answer) or question (it asked something; find out, then call update). Pass no question fields."
26176
+ "description": "After a reply result or a `reply:` line: the approval's id or Q-n, with tookAs question when the reply asked something (it reopens the approval; find out, then call update). The reply is already recorded as the answer, so tookAs answer changes nothing. Pass no question fields."
25957
26177
  },
25958
26178
  {
25959
26179
  "name": "--took-as",
25960
26180
  "value": "<answer|question>",
25961
26181
  "required": false,
25962
- "description": "With took: answer or question. On the command line it can follow the id instead (`--took Q-20 answer`).",
26182
+ "description": "With took: answer or question. On the command line it can follow the id instead (`--took Q-20 question`).",
25963
26183
  "schema": {
25964
26184
  "type": "string",
25965
26185
  "enum": [
@@ -25978,13 +26198,13 @@ exports.RUNPANE_CONTRACT = {
25978
26198
  "name": "--update",
25979
26199
  "value": "<id|Q-n>",
25980
26200
  "required": false,
25981
- "description": "After you took a reply as a question and found out: the approval's id or Q-n. Saves a new version with any of title, context, choices, questions and links you pass (the rest stay), shows it as updated, and waits on it like any notify call. Needs asked and whatChanged; takes no ui."
26201
+ "description": "After you took a reply as a question and found out: the approval's id or Q-n. Saves a new version with any of title, context, choices, questions and links you pass (the rest stay), shows it as updated, and waits on it like any notify call. Needs whatChanged, and asked when it answers the person's typed question; takes no ui."
25982
26202
  },
25983
26203
  {
25984
26204
  "name": "--asked",
25985
26205
  "value": "<text>",
25986
26206
  "required": false,
25987
- "description": "With update: the person's question, as they typed it."
26207
+ "description": "With update: the person's question, as they typed it. Required when the update answers their typed question; leave it out for your own update, such as a loop's next run."
25988
26208
  },
25989
26209
  {
25990
26210
  "name": "--what-changed",
@@ -26018,7 +26238,6 @@ exports.RUNPANE_CONTRACT = {
26018
26238
  "runpane notify --ui approve --title \"Ship the release notes?\" --links '[{\"label\":\"Notes\",\"path\":\"docs/RELEASE.md\"},{\"label\":\"PR #812\",\"url\":\"https://github.com/org/repo/pull/812\"}]' --json",
26019
26239
  "runpane notify --relays in-1a2b3c4d --ui options --title \"Q-39: Run the script?\" --choices '[{\"label\":\"Run it\",\"recommended\":true},{\"label\":\"Hold\"}]' --json",
26020
26240
  "runpane notify --ui options --title \"Ship 2.5 today: which parts go out?\" --questions '[{\"title\":\"Release notes\",\"choices\":[{\"label\":\"Ship as written\",\"recommended\":true},{\"label\":\"Hold\"}]},{\"title\":\"Intel Mac build\",\"choices\":[{\"label\":\"Include it\"},{\"label\":\"Skip it\"}]}]' --json",
26021
- "runpane notify --took Q-20 answer --json",
26022
26241
  "runpane notify --took Q-20 question --status \"Checking whether it can be undone\" --json",
26023
26242
  "runpane notify --update Q-20 --asked \"Can it be undone?\" --what-changed \"Added: Settings > Search turns it off again\" --context \"Search takes 4 s; the index brings it under 100 ms. It can be undone from Settings.\" --json",
26024
26243
  "runpane notify --resume n-4f2a --json"
@@ -26032,13 +26251,13 @@ exports.RUNPANE_CONTRACT = {
26032
26251
  "Write the card as its Summary: a title of about 80 to 100 characters on one line; context as a subtitle of one or two sentences saying why it matters; 2 to 4 choices, each saying what it does, with exactly one recommended; links to every file, page or approval it mentions. Pane refuses a title over 160 characters or with a line break, and two recommended choices.",
26033
26252
  "The person is juggling many tasks and has lost the thread. In plain words, say what the work is for (the outcome, not the file), what just happened, and what you need. For a decision, give the options and what each one means. Pane already shows which Pane and agent sent it.",
26034
26253
  "Results: options returns {answer: <chosen label>, note?}, with questions also answers (one label per question); approve returns {approved: true|false, note?}; ask returns {answer}; info returns {delivered: \"screen\"|\"inbox\"}.",
26035
- "A result of {reply, picks?, id, replyId, next} means the person typed a reply instead of only picking: it may answer the question or ask one. Read it, then call `runpane notify --took <replyId> answer` to record it as the answer, or `runpane notify --took <replyId> question` and find out, then `runpane notify --update <replyId> --asked \"<their question>\" --what-changed \"<one line per change>\"` with whatever changed, instead of asking again. With no open call the reply reaches your tab as a `reply:` line; `correction:` lines fix how it was taken. --took returns {took, id, next?}. Use its replyId rather than the Q-n: only this call was given it, so it works from outside a Pane tab too.",
26254
+ "A result of {reply, picks?, id, replyId, next} means the person typed a reply instead of only picking: Pane records it as the answer, so the approval is done. If it asks something instead, call `runpane notify --took <replyId> question` and find out, then `runpane notify --update <replyId> --asked \"<their question>\" --what-changed \"<one line per change>\"` with whatever changed, instead of asking again. With no open call the reply reaches your tab as a `reply:` line, recorded the same way; `correction:` lines fix how it was taken. --took returns {took, id, next?}. Use its replyId rather than the Q-n: only this call was given it, so it works from outside a Pane tab too.",
26036
26255
  "Only the reply's reader may run took and update: the asker, the orchestrator that relayed it, or Autopilot. Anyone else gets ERR_NOTIFY_NOT_READER.",
26037
26256
  "A result of {waiting: true, id} means the question is still on screen and your client would otherwise time out: call `runpane notify --resume <id>` right away to keep waiting. After 15 minutes on this loop Pane gives up and returns unavailable.",
26038
26257
  "A result of {unavailable, next} means nobody can answer through Pane right now (Pane is not running, Notify is off, or the wait ended): ask in the terminal instead. It is a result, not an error.",
26039
26258
  "Inside a Pane terminal the question names its Pane and panel (PANE_SESSION_ID and PANE_PANEL_ID); elsewhere it names the working directory.",
26040
26259
  "An older Pane ignores links and shows the card without them.",
26041
- "With relays the call waits on the worker's card as on any notify, and the answer also goes straight to the worker's tab as `answer: Q-n → <answer> (by you)`. Then record it: `runpane inbox ack <item> --decision <D-n>`.",
26260
+ "With relays the call waits on the worker's card as on any notify, and the answer also goes straight to the worker's tab as `answer: Q-n → <answer> (by you)`. Then record it: `runpane inbox ack <item> --decision <D-n>`. If the worker takes a typed reply as a question, you get `reopened: Q-n → … (by <worker>)` instead, and the answer to the new version comes as `correction: Q-n → <answer> (by you)`.",
26042
26261
  "Invalid input, such as choices with ui ask, 10 choices, or ui with took or update, fails with a message naming the field, and nothing is shown.",
26043
26262
  "Examples of a good title and context. Needs a decision (ui approve): \"Speed up slow search: run the database change?\" with \"Search takes 4 s and an index brings it under 100 ms. It changes the live database and can't easily be undone.\", not \"Approve the migration?\" Blocked (ui options): \"The 2.5 release is stuck on a GitHub hiccup\" with \"The fixes pass everywhere except one Mac build machine, which errored. That's GitHub's machine, not our code.\", not \"Blocked\". Just so you know (ui info): \"Questions from agents now wait until you answer\", not \"Done\"."
26044
26263
  ],
@@ -26932,6 +27151,8 @@ exports.RUNPANE_CONTRACT = {
26932
27151
  "",
26933
27152
  "To free disk or memory, run `runpane machine health` and delete only with `runpane machine cleanup` (a dry run until `--yes`), never `rm`. Put QA roots and test instances in the Pane's scratch folder (`$PANE_SCRATCH_DIR`).",
26934
27153
  "",
27154
+ "Loops: before `runpane loops create` or `loops update`, read its `--help`. A loop runs while the person is away, so it reaches them only through cards that wait, keeps a ledger so it never repeats itself, and keeps its prompt in a file.",
27155
+ "",
26935
27156
  "CLI: `npm i -g runpane` (or `npx --yes runpane@latest`), then `runpane doctor --json`. Full command reference: `runpane agent-context --json`.",
26936
27157
  "",
26937
27158
  "Devices: the `device_*` MCP tools (or `runpane devices`) open an iOS simulator or Android emulator as a tab in the calling Pane, then drive it. `runpane docs read --doc docs/DEVICES.md` has the rest.",
@@ -26941,7 +27162,7 @@ exports.RUNPANE_CONTRACT = {
26941
27162
  "notifyGuidance": {
26942
27163
  "rules": [
26943
27164
  "Claude's own card (AskUserQuestion) only for a quick question about the person's latest message, in the chat they are typing in, that steers only this turn. Anything else (it waits, blocks other work, is recorded as a decision or approves an ask-first action) is an approval card (`notify`). Unsure? Use an approval card. Codex and other agents always do.",
26944
- "In a Session, only its orchestrator asks the person. A worker (`PANE_SESSION_DIR` is set and `PANE_ORCHESTRATION_SESSION_ID` isn't, or your brief names an orchestrator or a parent status file) doesn't call `notify`: it reports blocked with `runpane report --state blocked --question \"<question>\"`. `answer:`, `closed:` and `correction:` lines ending `(by you)` in its tab are the person's word.",
27165
+ "In a Session, only its orchestrator asks the person. A worker (`PANE_SESSION_DIR` is set and `PANE_ORCHESTRATION_SESSION_ID` isn't, or your brief names an orchestrator or a parent status file) doesn't call `notify`: it reports blocked with `runpane report --state blocked --question \"<question>\"` (its buttons in `--choices` or `--questions`, as notify takes them). `answer:`, `closed:` and `correction:` lines ending `(by you)` in its tab are the person's word.",
26945
27166
  "For an API key, token or password, call `secrets_request` (or `runpane secrets request`), never `ask`."
26946
27167
  ]
26947
27168
  }