@skrr-ai/cli 0.1.214 → 0.1.216

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.
Files changed (51) hide show
  1. package/dist/commands/agent/message/no-reply.d.ts +4 -0
  2. package/dist/commands/agent/message/no-reply.js +5 -1
  3. package/dist/commands/agents/always-on/recovery-review.d.ts +12 -0
  4. package/dist/commands/agents/always-on/recovery-review.js +52 -2
  5. package/dist/commands/agents/permissions/list.d.ts +12 -0
  6. package/dist/commands/agents/permissions/list.js +42 -0
  7. package/dist/commands/agents/permissions/remove.d.ts +15 -0
  8. package/dist/commands/agents/permissions/remove.js +68 -0
  9. package/dist/commands/dm/work.js +2 -0
  10. package/dist/commands/duties/action-proposal.js +7 -1
  11. package/dist/commands/duties/action-proposals.d.ts +9 -0
  12. package/dist/commands/duties/action-proposals.js +30 -12
  13. package/dist/commands/duties/pause.js +20 -2
  14. package/dist/commands/duties/trigger-status.js +6 -1
  15. package/dist/commands/duties/update.js +22 -7
  16. package/dist/commands/tasks/ask.d.ts +3 -2
  17. package/dist/commands/tasks/ask.js +4 -3
  18. package/dist/commands/tasks/chat/exchange.d.ts +3 -2
  19. package/dist/commands/tasks/chat/exchange.js +18 -6
  20. package/dist/commands/tasks/chat/index.d.ts +11 -0
  21. package/dist/commands/tasks/chat/index.js +27 -0
  22. package/dist/commands/tasks/chat/rotate.js +5 -2
  23. package/dist/commands/tasks/input/answer.d.ts +12 -0
  24. package/dist/commands/tasks/input/answer.js +59 -5
  25. package/dist/commands/tasks/operations/show.js +5 -6
  26. package/dist/commands/tasks/result/show.js +2 -4
  27. package/dist/commands/tasks/retry-receipt.js +1 -3
  28. package/dist/commands/tasks/show.d.ts +6 -1
  29. package/dist/commands/tasks/show.js +19 -5
  30. package/dist/generated/agent-guides.json +41 -41
  31. package/dist/lib/compasses.d.ts +5 -0
  32. package/dist/lib/compasses.js +6 -1
  33. package/dist/lib/duties.d.ts +27 -0
  34. package/dist/lib/duties.js +81 -14
  35. package/dist/lib/permission-rules.d.ts +18 -0
  36. package/dist/lib/permission-rules.js +62 -0
  37. package/dist/lib/task-asset-upload.d.ts +7 -0
  38. package/dist/lib/task-asset-upload.js +114 -44
  39. package/dist/lib/task-extras.d.ts +19 -0
  40. package/dist/lib/task-extras.js +13 -0
  41. package/dist/lib/task-operations.d.ts +16 -0
  42. package/dist/lib/task-operations.js +39 -0
  43. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.d.ts +16 -2
  44. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.js +110 -15
  45. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/runtime.d.ts +7 -2
  46. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.d.ts +16 -2
  47. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.js +179 -17
  48. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/runtime.d.ts +7 -2
  49. package/dist/node_modules/@skrr-ai/data-provider/index.js +12697 -12082
  50. package/oclif.manifest.json +224 -9
  51. package/package.json +5 -2
@@ -12,7 +12,7 @@
12
12
  "aliases": [
13
13
  "task-management"
14
14
  ],
15
- "tokens": 1441,
15
+ "tokens": 1479,
16
16
  "sections": [
17
17
  {
18
18
  "id": "records",
@@ -44,7 +44,7 @@
44
44
  "id": "dependencies",
45
45
  "title": "Dependencies",
46
46
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
47
- "tokens": 644,
47
+ "tokens": 731,
48
48
  "aliases": [],
49
49
  "explains": [
50
50
  "CYCLE",
@@ -157,7 +157,7 @@
157
157
  "id": "result-review",
158
158
  "title": "Result and Review",
159
159
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
160
- "tokens": 619,
160
+ "tokens": 672,
161
161
  "aliases": [],
162
162
  "explains": [
163
163
  "TASK_REOPEN_REQUIRED",
@@ -786,7 +786,7 @@
786
786
  ]
787
787
  }
788
788
  ],
789
- "hash": "27dc779ef617201872f61130d88641a5743d18a6f25fdb271a8f1f40f73449c4",
789
+ "hash": "83aa347e7115521e054a1b39a716753c8d70e58997844332095a87cfca1f61c4",
790
790
  "tokens": 574
791
791
  },
792
792
  "routedIndex": {
@@ -802,7 +802,7 @@
802
802
  "aliases": [
803
803
  "task-management"
804
804
  ],
805
- "tokens": 1441,
805
+ "tokens": 1479,
806
806
  "sections": [
807
807
  {
808
808
  "id": "records",
@@ -834,7 +834,7 @@
834
834
  "id": "dependencies",
835
835
  "title": "Dependencies",
836
836
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
837
- "tokens": 644,
837
+ "tokens": 731,
838
838
  "aliases": [],
839
839
  "explains": [
840
840
  "CYCLE",
@@ -947,7 +947,7 @@
947
947
  "id": "result-review",
948
948
  "title": "Result and Review",
949
949
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
950
- "tokens": 619,
950
+ "tokens": 672,
951
951
  "aliases": [],
952
952
  "explains": [
953
953
  "TASK_REOPEN_REQUIRED",
@@ -1448,7 +1448,7 @@
1448
1448
  ]
1449
1449
  }
1450
1450
  ],
1451
- "hash": "199124c8fc62d63a32aa2844904220cea32b08e5ce303a4fa0d1ca293aa04a87",
1451
+ "hash": "0edcfcbd11d7e56fb1bbe227646cf0335d7676ebfeb1aec6690f20a057ecd255",
1452
1452
  "tokens": 506
1453
1453
  },
1454
1454
  "cards": {
@@ -1463,9 +1463,9 @@
1463
1463
  "aliases": [
1464
1464
  "task-management"
1465
1465
  ],
1466
- "body": "## Concept model\n\n`skrr` is the durable record for work that must outlive this conversation.\n\n| Record | Question it answers |\n| --- | --- |\n| **Task** | What is owed, and where does it stand? |\n| **Expectation** | What must be true before the Task can close? |\n| **Update** | What meaningfully changed while the work ran? |\n| **Resume Point** | Where can an interrupted Run safely continue? |\n| **Result** | What did the work conclude or return? |\n| **Deliverable** | Which exact Resource version did the work produce? |\n| **Review** | Did another actor accept one exact Result? |\n| **Comment** | What does somebody need to answer? |\n| **Activity** | What happened, for the audit? A Run transcript is telemetry, not Activity. |\n\n## Decide\n\n- **Create a Task** without asking when work needs tracking across steps, sessions or a\n follow-up. Search first so you do not duplicate one, and create none for an action that\n finishes now.\n\nSearch with `skrr tasks list --q \"<query>\"`.\n\n- **Place it** in the Space the work clearly belongs to, or leave it unscoped. A new Space is a\n new boundary, never a home made for one Task.\n- **Update, Comment or Result**: an Update records a fact a later reader or Run needs; a Comment\n asks for a reply; the Result is the conclusion, submitted once. Never put a Result in a\n Comment, a transcript in Updates, or \"approved\" on a domain verdict such as NO-SHIP.\n- **Ask a person** one decision per question: the question in one line under 140 characters, the\n choices as options with the one you recommend marked, and the evidence and trade-off in the\n question's context, shown beneath it. Outside a Run there is no message beside the question, so\n the context is the only place the background goes. Mark it owner only when it concerns payment,\n sending outside, deletion, permissions, secrets, another person, or a choice redoing work cannot\n repair; otherwise the Agent that gave you the work may answer it.\n\nAsk with `skrr tasks ask <task> --question \"<one line>\" --option <a> --option <b> --recommended <n> --context \"<evidence>\"`.\n\n- **Keep its status true** while you work it: started when you begin, closed when the work is\n done, a `blocker` Update when it stops. Review is where a Review the Task's `reviewPolicy`\n requires is waited for, never a place to hand finished work over.\n\n## Workflow\n\n### Close out\n\n1. Record what exists: each Deliverable, bound to the Expectation it answers.\n2. Read what is still owed: `skrr tasks expectations <task>`.\n3. Assess each Expectation you verified, citing evidence; one you could not check is `unmet`, with the reason.\n4. Close it: `skrr tasks complete <task> --summary \"…\"` submits the Result and closes the Task in\n one step. When its `reviewPolicy` is `required`, submit with `skrr tasks result submit` and move\n it to review instead: a Review is owed, and your close as the owner would skip it.\n5. Read the Task back and report that state, not the one you intended.\n\nAn unmet Expectation or a `changes_requested` Review does not stop a close; it is recorded on it.\nSo if the work does not hold up, leave the Task open, say which Expectation failed, and record what\nblocks it as a `blocker` Update; its shape is in `updates`.\n\n## Authority\n\n| Actor | May do | Only a person may do |\n| --- | --- | --- |\n| Agent | Create and work Tasks; record Updates, Deliverables and Results; assess any Expectation that takes a judgement, citing evidence; review a Result another actor submitted | Waive an Expectation; confirm a Deliverable; make an attachment a Run input; close past a required Review |\n| Person | Everything in both columns | — |\n\nThe server cannot always tell an Agent from the person whose login it holds, so an accepted call\nis not permission: the right-hand column stays a person's even when the call would succeed. Never\nsupply or invent an Agent identity; the platform records who wrote each record.\nInside a Task's Run that is the Agent; in a session started with a person's login, it is that person.\n\nA required Review (`reviewPolicy` `required`) refuses a close only by a non-owner. The owner, and\nan Agent acting for the owner, can close without it, and that is the owner's decision. A non-owner\ncloses past it with `--force`, which records the override.\n\n## Live state\n\n- `skrr tasks show <task> --json` — status, Expectations, assignment and the Task URL.\n- `skrr tasks expectations <task>` — what is owed, with ids, and how far each one got.\n- `skrr tasks actionability <task>` — who can move the Task next, and why.\n- `skrr tasks review-queue --space <space-id>` — every judgement still outstanding in a Space.\n\n## Related guides\n\n- `spaces` — which Space, Project or Goal work belongs to, and who may work in a Space.\n- `agents` — which Agent you are, and where it runs.\n- `duties` — coming back to work later, and what an Agent keeps true over time.",
1467
- "hash": "dfc1d46b234dc40a536a46ad323c2a072fcae9bb6773a082737a86b482f0e468",
1468
- "tokens": 1441,
1466
+ "body": "## Concept model\n\n`skrr` is the durable record for work that must outlive this conversation.\n\n| Record | Question it answers |\n| --- | --- |\n| **Task** | What is owed, and where does it stand? |\n| **Expectation** | What must be true before the Task can close? |\n| **Update** | What meaningfully changed while the work ran? |\n| **Resume Point** | Where can an interrupted Run safely continue? |\n| **Result** | What did the work conclude or return? |\n| **Deliverable** | Which exact Resource version did the work produce? |\n| **Review** | Did another actor accept one exact Result? |\n| **Comment** | What does somebody need to answer? |\n| **Activity** | What happened, for the audit? A Run transcript is telemetry, not Activity. |\n\n## Decide\n\n- **Create a Task** without asking when work needs tracking across steps, sessions or a\n follow-up. Search first so you do not duplicate one, and create none for an action that\n finishes now.\n\nSearch with `skrr tasks list --q \"<query>\"`.\n\n- **Place it** in the Space the work clearly belongs to, or leave it unscoped. A new Space is a\n new boundary, never a home made for one Task.\n- **Update, Comment or Result**: an Update records a fact a later reader or Run needs; a Comment\n asks for a reply; the Result is the conclusion, submitted once. Never put a Result in a\n Comment, a transcript in Updates, or \"approved\" on a domain verdict such as NO-SHIP.\n- **Ask a person** one decision per question: the question in one line under 140 characters, the\n choices as options with the one you recommend marked, and the evidence and trade-off in the\n question's context, shown beneath it. Outside a Run there is no message beside the question, so\n the context is the only place the background goes. Mark it owner only when it concerns payment,\n sending outside, deletion, permissions, secrets, another person, or a choice redoing work cannot\n repair; otherwise the Agent that gave you the work may answer it.\n\nAsk with `skrr tasks ask <task> --question \"<one line>\" --option <a> --option <b> --recommended <n> --context \"<evidence>\"`.\n\n- **Keep its status true** while you work it: started when you begin, closed when the work is\n done, a `blocker` Update when it stops. Review is where a Review the Task's `reviewPolicy`\n requires is waited for, never a place to hand finished work over.\n\n## Workflow\n\n### Close out\n\n1. Record what exists: each Deliverable, bound to the Expectation it answers.\n2. Read what is still owed: `skrr tasks expectations <task>`.\n3. Assess each Expectation you verified, citing evidence; one you could not check is `unmet`, with the reason.\n4. Close it: `skrr tasks complete <task> --summary \"…\"` submits the Result and closes the Task in\n one step. When its `reviewPolicy` is `required`, submit with `skrr tasks result submit\n --request-completion` instead: a Review is owed, and your close as the owner would skip it. Set\n the flag only when the entire current Task scope has been delivered; the server then decides\n review or completion after the run ends, and without it the Task stays in progress.\n5. Read the Task back and report that state, not the one you intended.\n\nAn unmet Expectation or a `changes_requested` Review does not stop a close; it is recorded on it.\nSo if the work does not hold up, leave the Task open, say which Expectation failed, and record what\nblocks it as a `blocker` Update; its shape is in `updates`.\n\n## Authority\n\n| Actor | May do | Only a person may do |\n| --- | --- | --- |\n| Agent | Create and work Tasks; record Updates, Deliverables and Results; assess any Expectation that takes a judgement, citing evidence; review a Result another actor submitted | Waive an Expectation; confirm a Deliverable; make an attachment a Run input; close past a required Review |\n| Person | Everything in both columns | — |\n\nThe server cannot always tell an Agent from the person whose login it holds, so an accepted call\nis not permission: the right-hand column stays a person's even when the call would succeed. Never\nsupply or invent an Agent identity; the platform records who wrote each record.\nInside a Task's Run that is the Agent; in a session started with a person's login, it is that person.\n\nA required Review (`reviewPolicy` `required`) refuses a close only by a non-owner. The owner, and\nan Agent acting for the owner, can close without it, and that is the owner's decision. A non-owner\ncloses past it with `--force`, which records the override.\n\n## Live state\n\n- `skrr tasks show <task> --json` — status, Expectations, assignment and the Task URL.\n- `skrr tasks expectations <task>` — what is owed, with ids, and how far each one got.\n- `skrr tasks actionability <task>` — who can move the Task next, and why.\n- `skrr tasks review-queue --space <space-id>` — every judgement still outstanding in a Space.\n\n## Related guides\n\n- `spaces` — which Space, Project or Goal work belongs to, and who may work in a Space.\n- `agents` — which Agent you are, and where it runs.\n- `duties` — coming back to work later, and what an Agent keeps true over time.",
1467
+ "hash": "0fbbd8856383ab6cfd54ee5d1bea8c7e32c01fff188c143c9398806e31e6975a",
1468
+ "tokens": 1479,
1469
1469
  "sections": [
1470
1470
  {
1471
1471
  "id": "records",
@@ -1497,7 +1497,7 @@
1497
1497
  "id": "dependencies",
1498
1498
  "title": "Dependencies",
1499
1499
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
1500
- "tokens": 644,
1500
+ "tokens": 731,
1501
1501
  "aliases": [],
1502
1502
  "explains": [
1503
1503
  "CYCLE",
@@ -1610,7 +1610,7 @@
1610
1610
  "id": "result-review",
1611
1611
  "title": "Result and Review",
1612
1612
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
1613
- "tokens": 619,
1613
+ "tokens": 672,
1614
1614
  "aliases": [],
1615
1615
  "explains": [
1616
1616
  "TASK_REOPEN_REQUIRED",
@@ -2308,7 +2308,7 @@
2308
2308
  "id": "dependencies",
2309
2309
  "title": "Dependencies",
2310
2310
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
2311
- "tokens": 644,
2311
+ "tokens": 731,
2312
2312
  "aliases": [],
2313
2313
  "explains": [
2314
2314
  "CYCLE",
@@ -2421,7 +2421,7 @@
2421
2421
  "id": "result-review",
2422
2422
  "title": "Result and Review",
2423
2423
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
2424
- "tokens": 619,
2424
+ "tokens": 672,
2425
2425
  "aliases": [],
2426
2426
  "explains": [
2427
2427
  "TASK_REOPEN_REQUIRED",
@@ -2518,7 +2518,7 @@
2518
2518
  "id": "dependencies",
2519
2519
  "title": "Dependencies",
2520
2520
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
2521
- "tokens": 644,
2521
+ "tokens": 731,
2522
2522
  "aliases": [],
2523
2523
  "explains": [
2524
2524
  "CYCLE",
@@ -2631,7 +2631,7 @@
2631
2631
  "id": "result-review",
2632
2632
  "title": "Result and Review",
2633
2633
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
2634
- "tokens": 619,
2634
+ "tokens": 672,
2635
2635
  "aliases": [],
2636
2636
  "explains": [
2637
2637
  "TASK_REOPEN_REQUIRED",
@@ -2691,9 +2691,9 @@
2691
2691
  "TASK_TREE_DEPTH_LIMIT_EXCEEDED",
2692
2692
  "TASK_TREE_CHILD_LIMIT_EXCEEDED"
2693
2693
  ],
2694
- "body": "Read this when you split work into a tree of Tasks or make one Task wait for another.\n\n## Two relations\n\n- A **child** is part of its parent: child statuses roll up, and when every child is terminal the\n parent can close by itself, with unmet obligations recorded. A child has the same author,\n workspace, Space, Duty and Goal as its parent.\n- A **dependency** says what must finish first. \"A waits for B\" is written on A as \"A is blocked by\n B\"; the server keeps the reverse edge.\n\n## A tree in one call\n\n`skrr tasks create-tree --from-json tree.json` creates every node of a file like this, children\nunder their parent and `blockedByTempIds` as dependencies:\n\n```json\n{\n \"nodes\": [\n {\n \"tempId\": \"root\",\n \"title\": \"Move invoicing to the new payment provider\",\n \"children\": [\n { \"tempId\": \"map\", \"title\": \"Map every invoice field to the provider's schema\" },\n { \"tempId\": \"build\", \"title\": \"Build the invoice export\", \"blockedByTempIds\": [\"map\"] },\n { \"tempId\": \"verify\", \"title\": \"Reconcile one month of exported invoices\", \"blockedByTempIds\": [\"build\"] }\n ]\n }\n ]\n}\n```\n\nNodes are keyed by the file (or by `--external-key-prefix`), so running it again finds the same\nTasks. After an incomplete result, run the unchanged file again with `--resume`: it confirms the\nnodes that exist and creates only the missing ones. Changing the file can name new Tasks.\n`--readback` rereads what was declared, and `--verify` and `--verify-spec` only read.\n\nBetween existing Tasks, `skrr tasks update <task-A> --add-blocked-by <task-B>` makes A wait for B\nand `--remove-blocked-by` undoes it.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `CYCLE` | The edge would make a Task its own parent or blocker, directly or through others. | Remove that edge. |\n| `TASK_DEPENDENCY_TARGET_NOT_FOUND` | A dependency names a Task that does not exist. | Use an existing Task's id or identifier. |\n| `TASK_PARENT_NOT_FOUND` | The parent does not exist, or you cannot see it. | Create the parent first. |\n| `TASK_PARENT_SCOPE_MISMATCH` | The parent has another author, workspace, Space, Duty or Goal. | Choose a parent in the same scope. |\n| `TASK_TREE_DEPTH_LIMIT_EXCEEDED` | The new Task would sit deeper than a tree allows; the message names the limit. | Attach it higher up, or make it a dependency instead of a child. |\n| `TASK_TREE_CHILD_LIMIT_EXCEEDED` | The parent already has as many children as it allows; the message names the limit. | Group the work under a new intermediate child. |",
2695
- "hash": "c43814c447d7ce88116db4ad319ade8dfc293240d211d92ce08b6c5c99c3e69f",
2696
- "tokens": 644,
2694
+ "body": "Read this when you split work into a tree of Tasks or make one Task wait for another.\n\n## Two relations\n\n- A **child** is part of its parent: child statuses roll up, and when every child is terminal the\n parent can close by itself, with unmet obligations recorded. A child has the same author,\n workspace, Space, Duty and Goal as its parent.\n- A **dependency** says what must finish first. \"A waits for B\" is written on A as \"A is blocked by\n B\"; the server keeps the reverse edge.\n\n## A tree in one call\n\n`skrr tasks create-tree --from-json tree.json` creates every node of a file like this, children\nunder their parent and `blockedByTempIds` as dependencies:\n\n```json\n{\n \"nodes\": [\n {\n \"tempId\": \"root\",\n \"title\": \"Move invoicing to the new payment provider\",\n \"children\": [\n { \"tempId\": \"map\", \"title\": \"Map every invoice field to the provider's schema\" },\n { \"tempId\": \"build\", \"title\": \"Build the invoice export\", \"blockedByTempIds\": [\"map\"] },\n { \"tempId\": \"verify\", \"title\": \"Reconcile one month of exported invoices\", \"blockedByTempIds\": [\"build\"] }\n ]\n }\n ]\n}\n```\n\nNodes are keyed by the file (or by `--external-key-prefix`), so running it again finds the same\nTasks. After an incomplete result, run the unchanged file again with `--resume`: it confirms the\nnodes that exist and creates only the missing ones. Changing the file can name new Tasks.\n`--readback` rereads what was declared, and `--verify` and `--verify-spec` only read.\n\nBetween existing Tasks, `skrr tasks update <task-A> --add-blocked-by <task-B>` makes A wait for B\nand `--remove-blocked-by` undoes it.\n\n## Who wakes you when work you dispatched ends\n\n- Dispatched from your main chat: the Run's Result, failure or question comes back to that chat.\n- From a thread, a scheduled conversation or another Task: nothing wakes you.\n- A bounded `spawn_agent` child: call `wait_agent` before your turn ends.\n- Otherwise, or when unsure, follow it yourself: `skrr tasks watch <task>`.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `CYCLE` | The edge would make a Task its own parent or blocker, directly or through others. | Remove that edge. |\n| `TASK_DEPENDENCY_TARGET_NOT_FOUND` | A dependency names a Task that does not exist. | Use an existing Task's id or identifier. |\n| `TASK_PARENT_NOT_FOUND` | The parent does not exist, or you cannot see it. | Create the parent first. |\n| `TASK_PARENT_SCOPE_MISMATCH` | The parent has another author, workspace, Space, Duty or Goal. | Choose a parent in the same scope. |\n| `TASK_TREE_DEPTH_LIMIT_EXCEEDED` | The new Task would sit deeper than a tree allows; the message names the limit. | Attach it higher up, or make it a dependency instead of a child. |\n| `TASK_TREE_CHILD_LIMIT_EXCEEDED` | The parent already has as many children as it allows; the message names the limit. | Group the work under a new intermediate child. |",
2695
+ "hash": "21be777c9ee00cbc5fd7ce41a59e41c3761ce61bf80891667a4f9f8f5d407aad",
2696
+ "tokens": 731,
2697
2697
  "sections": [
2698
2698
  {
2699
2699
  "id": "records",
@@ -2725,7 +2725,7 @@
2725
2725
  "id": "dependencies",
2726
2726
  "title": "Dependencies",
2727
2727
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
2728
- "tokens": 644,
2728
+ "tokens": 731,
2729
2729
  "aliases": [],
2730
2730
  "explains": [
2731
2731
  "CYCLE",
@@ -2838,7 +2838,7 @@
2838
2838
  "id": "result-review",
2839
2839
  "title": "Result and Review",
2840
2840
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
2841
- "tokens": 619,
2841
+ "tokens": 672,
2842
2842
  "aliases": [],
2843
2843
  "explains": [
2844
2844
  "TASK_REOPEN_REQUIRED",
@@ -2944,7 +2944,7 @@
2944
2944
  "id": "dependencies",
2945
2945
  "title": "Dependencies",
2946
2946
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
2947
- "tokens": 644,
2947
+ "tokens": 731,
2948
2948
  "aliases": [],
2949
2949
  "explains": [
2950
2950
  "CYCLE",
@@ -3057,7 +3057,7 @@
3057
3057
  "id": "result-review",
3058
3058
  "title": "Result and Review",
3059
3059
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
3060
- "tokens": 619,
3060
+ "tokens": 672,
3061
3061
  "aliases": [],
3062
3062
  "explains": [
3063
3063
  "TASK_REOPEN_REQUIRED",
@@ -3151,7 +3151,7 @@
3151
3151
  "id": "dependencies",
3152
3152
  "title": "Dependencies",
3153
3153
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
3154
- "tokens": 644,
3154
+ "tokens": 731,
3155
3155
  "aliases": [],
3156
3156
  "explains": [
3157
3157
  "CYCLE",
@@ -3264,7 +3264,7 @@
3264
3264
  "id": "result-review",
3265
3265
  "title": "Result and Review",
3266
3266
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
3267
- "tokens": 619,
3267
+ "tokens": 672,
3268
3268
  "aliases": [],
3269
3269
  "explains": [
3270
3270
  "TASK_REOPEN_REQUIRED",
@@ -3361,7 +3361,7 @@
3361
3361
  "id": "dependencies",
3362
3362
  "title": "Dependencies",
3363
3363
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
3364
- "tokens": 644,
3364
+ "tokens": 731,
3365
3365
  "aliases": [],
3366
3366
  "explains": [
3367
3367
  "CYCLE",
@@ -3474,7 +3474,7 @@
3474
3474
  "id": "result-review",
3475
3475
  "title": "Result and Review",
3476
3476
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
3477
- "tokens": 619,
3477
+ "tokens": 672,
3478
3478
  "aliases": [],
3479
3479
  "explains": [
3480
3480
  "TASK_REOPEN_REQUIRED",
@@ -3571,7 +3571,7 @@
3571
3571
  "id": "dependencies",
3572
3572
  "title": "Dependencies",
3573
3573
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
3574
- "tokens": 644,
3574
+ "tokens": 731,
3575
3575
  "aliases": [],
3576
3576
  "explains": [
3577
3577
  "CYCLE",
@@ -3684,7 +3684,7 @@
3684
3684
  "id": "result-review",
3685
3685
  "title": "Result and Review",
3686
3686
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
3687
- "tokens": 619,
3687
+ "tokens": 672,
3688
3688
  "aliases": [],
3689
3689
  "explains": [
3690
3690
  "TASK_REOPEN_REQUIRED",
@@ -3783,7 +3783,7 @@
3783
3783
  "id": "dependencies",
3784
3784
  "title": "Dependencies",
3785
3785
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
3786
- "tokens": 644,
3786
+ "tokens": 731,
3787
3787
  "aliases": [],
3788
3788
  "explains": [
3789
3789
  "CYCLE",
@@ -3896,7 +3896,7 @@
3896
3896
  "id": "result-review",
3897
3897
  "title": "Result and Review",
3898
3898
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
3899
- "tokens": 619,
3899
+ "tokens": 672,
3900
3900
  "aliases": [],
3901
3901
  "explains": [
3902
3902
  "TASK_REOPEN_REQUIRED",
@@ -3959,9 +3959,9 @@
3959
3959
  "TASK_REVIEW_RATIONALE_REQUIRED",
3960
3960
  "TASK_EXPECTATIONS_NOT_MET"
3961
3961
  ],
3962
- "body": "Read this when you submit a Task's Result, or accept or question someone else's.\n\nThe Result is the finished answer, submitted once. A subject-matter conclusion (NO-SHIP, BUY,\nREJECT, a root cause, an experiment's verdict) goes in its `conclusion`, never in a Review. An\namendment is a new version that supersedes the previous one; there is one current Result, and\nolder versions stay in Activity.\n\nA Review is another actor's decision on one exact Result: `accepted` means the submitted work was\naccepted, `changes_requested` that it was not, with a rationale. Never review a Result you or\nyour own Agent submitted, even where the call would be accepted.\n\nSubmitting a Result does not close the Task. Say \"ready for review\" only when something you read\nsaid so.\n`result submit` reports where the Task stands after the write; read that. `skrr tasks complete`\nsubmits the Result and advances the workflow in one closeout; do not call `tasks report` before or\nafter it.\n\n## Example\n\n```bash\nskrr tasks result submit <task-id> \\\n --summary \"NO-SHIP until remediation Gates A-D pass\" \\\n --conclusion-type release_recommendation \\\n --conclusion-json '{\"posture\":\"no_ship\"}' \\\n --deliverable <task-resource-link-id>\n```\n\nAnother actor, never the submitter, reviews it:\n`skrr tasks review <task-id> --result-id <result-id> --decision accepted --rationale \"Evidence checked\"`.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `TASK_REOPEN_REQUIRED` | The Task is already completed, cancelled or hidden. | Reopen the Task first. |\n| `TASK_RESULT_IDEMPOTENCY_CONFLICT` | The key already names a different Result. | Give this Result its own key. |\n| `TASK_RESULT_AGENT_RUN_REQUIRED` | An Agent submitted with no Run of this Task to cite. | Submit from the Run executing the Task. |\n| `TASK_RESULT_ACTOR_MISMATCH` | The cited Run belongs to another Agent. | Cite your own Run. |\n| `TASK_RESULT_RESOURCE_LINK_MISMATCH` | A Deliverable link is not a Deliverable of this Task. | Use the link id its Deliverable was recorded with. |\n| `TASK_RESULT_SUPERSEDED` | The Review names a Result that is no longer current. | Review the current Result. |\n| `TASK_REVIEW_SELF_ACCEPTANCE` | The reviewer is the principal who submitted the Result. | Another principal reviews it. |\n| `TASK_REVIEW_RATIONALE_REQUIRED` | `changes_requested` came with no rationale. | Say what has to change. |\n| `TASK_EXPECTATIONS_NOT_MET` | An acceptance came while an Expectation was unassessed or unmet. | Assess each Expectation the refusal lists, then review again. |",
3963
- "hash": "05864b887642184579a1275221225df37b4c2bf14f87dcbcbda2814225b2f263",
3964
- "tokens": 619,
3962
+ "body": "Read this when you submit a Task's Result, or accept or question someone else's.\n\nThe Result is the finished answer, submitted once. A subject-matter conclusion (NO-SHIP, BUY,\nREJECT, a root cause, an experiment's verdict) goes in its `conclusion`, never in a Review. An\namendment is a new version that supersedes the previous one; there is one current Result, and\nolder versions stay in Activity.\n\nA Review is another actor's decision on one exact Result: `accepted` means the submitted work was\naccepted, `changes_requested` that it was not, with a rationale. Never review a Result you or\nyour own Agent submitted, even where the call would be accepted.\n\nSubmitting a Result does not close the Task. Say \"ready for review\" only when something you read\nsaid so.\n`result submit` reports where the Task stands after the write; read that. `skrr tasks complete`\nsubmits the Result and advances the workflow in one closeout; do not call `tasks report` before or\nafter it.\nAdd `--request-completion` to `result submit` when the entire current Task scope has been delivered;\nthe server then decides review or completion after the run ends. Without it the Task stays open, so\nleave it off for intermediate progress or remaining work.\n\n## Example\n\n```bash\nskrr tasks result submit <task-id> \\\n --summary \"NO-SHIP until remediation Gates A-D pass\" \\\n --conclusion-type release_recommendation \\\n --conclusion-json '{\"posture\":\"no_ship\"}' \\\n --deliverable <task-resource-link-id>\n```\n\nAnother actor, never the submitter, reviews it:\n`skrr tasks review <task-id> --result-id <result-id> --decision accepted --rationale \"Evidence checked\"`.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `TASK_REOPEN_REQUIRED` | The Task is already completed, cancelled or hidden. | Reopen the Task first. |\n| `TASK_RESULT_IDEMPOTENCY_CONFLICT` | The key already names a different Result. | Give this Result its own key. |\n| `TASK_RESULT_AGENT_RUN_REQUIRED` | An Agent submitted with no Run of this Task to cite. | Submit from the Run executing the Task. |\n| `TASK_RESULT_ACTOR_MISMATCH` | The cited Run belongs to another Agent. | Cite your own Run. |\n| `TASK_RESULT_RESOURCE_LINK_MISMATCH` | A Deliverable link is not a Deliverable of this Task. | Use the link id its Deliverable was recorded with. |\n| `TASK_RESULT_SUPERSEDED` | The Review names a Result that is no longer current. | Review the current Result. |\n| `TASK_REVIEW_SELF_ACCEPTANCE` | The reviewer is the principal who submitted the Result. | Another principal reviews it. |\n| `TASK_REVIEW_RATIONALE_REQUIRED` | `changes_requested` came with no rationale. | Say what has to change. |\n| `TASK_EXPECTATIONS_NOT_MET` | An acceptance came while an Expectation was unassessed or unmet. | Assess each Expectation the refusal lists, then review again. |",
3963
+ "hash": "049c293bbd44f0cc048d8ef554c98db49a75a22ce859bae257ccff44dad90202",
3964
+ "tokens": 672,
3965
3965
  "sections": [
3966
3966
  {
3967
3967
  "id": "records",
@@ -3993,7 +3993,7 @@
3993
3993
  "id": "dependencies",
3994
3994
  "title": "Dependencies",
3995
3995
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
3996
- "tokens": 644,
3996
+ "tokens": 731,
3997
3997
  "aliases": [],
3998
3998
  "explains": [
3999
3999
  "CYCLE",
@@ -4106,7 +4106,7 @@
4106
4106
  "id": "result-review",
4107
4107
  "title": "Result and Review",
4108
4108
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
4109
- "tokens": 619,
4109
+ "tokens": 672,
4110
4110
  "aliases": [],
4111
4111
  "explains": [
4112
4112
  "TASK_REOPEN_REQUIRED",
@@ -4201,7 +4201,7 @@
4201
4201
  "id": "dependencies",
4202
4202
  "title": "Dependencies",
4203
4203
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
4204
- "tokens": 644,
4204
+ "tokens": 731,
4205
4205
  "aliases": [],
4206
4206
  "explains": [
4207
4207
  "CYCLE",
@@ -4314,7 +4314,7 @@
4314
4314
  "id": "result-review",
4315
4315
  "title": "Result and Review",
4316
4316
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
4317
- "tokens": 619,
4317
+ "tokens": 672,
4318
4318
  "aliases": [],
4319
4319
  "explains": [
4320
4320
  "TASK_REOPEN_REQUIRED",
@@ -4404,7 +4404,7 @@
4404
4404
  "id": "dependencies",
4405
4405
  "title": "Dependencies",
4406
4406
  "readWhen": "you split work into a tree of Tasks or make one Task wait for another",
4407
- "tokens": 644,
4407
+ "tokens": 731,
4408
4408
  "aliases": [],
4409
4409
  "explains": [
4410
4410
  "CYCLE",
@@ -4517,7 +4517,7 @@
4517
4517
  "id": "result-review",
4518
4518
  "title": "Result and Review",
4519
4519
  "readWhen": "you submit a Task's Result, or accept or question someone else's",
4520
- "tokens": 619,
4520
+ "tokens": 672,
4521
4521
  "aliases": [],
4522
4522
  "explains": [
4523
4523
  "TASK_REOPEN_REQUIRED",
@@ -179,6 +179,11 @@ export declare function renderTacticResult(compass: Compass, log: (line: string)
179
179
  */
180
180
  export declare function renderEffectivePolicy(policy: Record<string, unknown>, log: (line: string) => void): void;
181
181
  export declare function renderRevisionList(rows: CompassRevision[], log: (line: string) => void): void;
182
+ /**
183
+ * A viewer who does not own a Duty reads its Checks', Runs' and boundary changes' prose as the
184
+ * withheld marker (OSK-33463); the EVENT column says `(owner only)` in its place. `--json` prints
185
+ * the marker as the server sent it.
186
+ */
182
187
  export declare function renderCompassTrace(trace: CompassTrace, log: (line: string) => void): void;
183
188
  /**
184
189
  * The ledger's name for a row. A revert is stored as `auto_revert`, which reads as something the
@@ -349,6 +349,11 @@ function renderRevisionList(rows, log) {
349
349
  { key: 'reason', header: 'REASON', maxWidth: 50 },
350
350
  ], log);
351
351
  }
352
+ /**
353
+ * A viewer who does not own a Duty reads its Checks', Runs' and boundary changes' prose as the
354
+ * withheld marker (OSK-33463); the EVENT column says `(owner only)` in its place. `--json` prints
355
+ * the marker as the server sent it.
356
+ */
352
357
  function renderCompassTrace(trace, log) {
353
358
  const title = trace.compass.title ?? trace.compass.id;
354
359
  log(`${title} — Compass trace (v${trace.compass.version}, ${trace.compass.status})`);
@@ -360,7 +365,7 @@ function renderCompassTrace(trace, log) {
360
365
  when: shortDate(event.occurredAt),
361
366
  type: event.type.replace(RENDER_COMPASS_TRACE_RE, ' '),
362
367
  status: event.status ?? '—',
363
- event: event.summary ?? '—',
368
+ event: (0, data_provider_1.isDutyReasonWithheld)(event.summary) ? '(owner only)' : (event.summary ?? '—'),
364
369
  duty: String(event.references?.dutyId ?? '—'),
365
370
  version: event.references?.compassVersion
366
371
  ? `v${String(event.references.compassVersion)}`
@@ -1072,6 +1072,25 @@ export declare function dutyWriteWarnings(response: unknown, fallback: {
1072
1072
  }): DutyAuthoringWarning[];
1073
1073
  /** One `Warning:` line per authoring warning, after the write's own output. */
1074
1074
  export declare function renderDutyWriteWarnings(warnings: DutyAuthoringWarning[], warn: (line: string) => void): void;
1075
+ /**
1076
+ * What became of a cadence change the server did not simply write (OSK-33445). An Agent's change
1077
+ * to a non-draft Duty's cadence is a request for the owner: `awaiting_approval` until they decide,
1078
+ * or `applied` when they allowed the Agent to tune within their limits.
1079
+ */
1080
+ export type DutyCadenceRequestReceipt = {
1081
+ status: 'awaiting_approval' | 'applied';
1082
+ requestId?: string;
1083
+ requestedIntervalMs?: number;
1084
+ currentIntervalMs?: number | null;
1085
+ intervalMs?: number;
1086
+ approvalReason?: string;
1087
+ unchanged?: boolean;
1088
+ replayed?: boolean;
1089
+ };
1090
+ /** Read the receipt off a PATCH answer, or `undefined` when the cadence was written as sent. */
1091
+ export declare function readDutyCadenceRequest(response: unknown): DutyCadenceRequestReceipt | undefined;
1092
+ /** The line `duties update` prints instead of "Updated duty" when the cadence became a request. */
1093
+ export declare function describeDutyCadenceRequest(receipt: DutyCadenceRequestReceipt, dutyId?: string): string;
1075
1094
  export declare function describeDutyRevision(revision: DutyRevisionReceipt | undefined): string;
1076
1095
  /**
1077
1096
  * A duty's priority, as one line: `high · weight 70 · from northstar`.
@@ -1126,6 +1145,8 @@ latestCheck?: {
1126
1145
  * same reason as `latestCheck`: only `show` reads them from the server.
1127
1146
  */
1128
1147
  scheduleIssues?: DutyScheduleIssue[] | null): void;
1148
+ /** What `show` prints where the latest finding would be, for a viewer who is not the Duty's owner. */
1149
+ export declare const DUTY_FINDING_WITHHELD_LINE = "Only the Duty's owner can read the latest finding.";
1129
1150
  /**
1130
1151
  * Whether a check woke the agent, in plain words (OSK-4884).
1131
1152
  *
@@ -1169,6 +1190,12 @@ export declare function isHeldCycleRun(run: DutyCycle['runs'][number]): boolean;
1169
1190
  * `running`, so its `failureCode` is null and this is the only place the code is said.
1170
1191
  */
1171
1192
  export declare function heldRunFailureCode(run: DutyCycle['runs'][number]): string | null;
1193
+ /**
1194
+ * Why a held run is held, as the server names it (OSK-33272): the hold's reason code, and its cause when the writer
1195
+ * recorded one that is not the failure code. A reason this CLI does not know is printed as written, marked. Null from
1196
+ * an older server, which named neither.
1197
+ */
1198
+ export declare function heldRunHoldReason(run: DutyCycle['runs'][number]): string | null;
1172
1199
  /** The review command for a held run, naming its Agent when the server did. */
1173
1200
  export declare function heldRunReviewCommand(run: DutyCycle['runs'][number]): string;
1174
1201
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BOUND_HYPOTHESES_NOTE = exports.BOUND_CASES_NOTE = exports.DUTY_CLI_EVALUATORS = exports.DUTY_CREATE_KEYS = exports.DUTY_REMEDIATION_ACTIONS = exports.DUTY_FEEDBACK_KINDS = exports.dutyApi = exports.dutyPackApi = exports.MAX_DUTY_INTERVAL_MS = exports.MIN_DUTY_INTERVAL_MS = exports.DUTY_EXECUTION_ISOLATION_MODES = exports.DUTY_AUTHORABLE_CADENCE_MODES = exports.DUTY_KIND_VALUES = exports.DUTY_STATUSES = exports.DUTY_CADENCE_MAX_TIMES = exports.DUTY_CADENCE_TIME_PATTERN = exports.DUTY_CADENCE_MODES = exports.DUTY_TEMPLATE_IDS = exports.DUTY_WATCHED_SOURCES = void 0;
3
+ exports.BOUND_HYPOTHESES_NOTE = exports.BOUND_CASES_NOTE = exports.DUTY_FINDING_WITHHELD_LINE = exports.DUTY_CLI_EVALUATORS = exports.DUTY_CREATE_KEYS = exports.DUTY_REMEDIATION_ACTIONS = exports.DUTY_FEEDBACK_KINDS = exports.dutyApi = exports.dutyPackApi = exports.MAX_DUTY_INTERVAL_MS = exports.MIN_DUTY_INTERVAL_MS = exports.DUTY_EXECUTION_ISOLATION_MODES = exports.DUTY_AUTHORABLE_CADENCE_MODES = exports.DUTY_KIND_VALUES = exports.DUTY_STATUSES = exports.DUTY_CADENCE_MAX_TIMES = exports.DUTY_CADENCE_TIME_PATTERN = exports.DUTY_CADENCE_MODES = exports.DUTY_TEMPLATE_IDS = exports.DUTY_WATCHED_SOURCES = void 0;
4
4
  exports.activationRefusalLines = activationRefusalLines;
5
5
  exports.gateRefusesActivation = gateRefusesActivation;
6
6
  exports.permissionLines = permissionLines;
@@ -35,6 +35,8 @@ exports.describeStoppedBy = describeStoppedBy;
35
35
  exports.withLiveAssessment = withLiveAssessment;
36
36
  exports.dutyWriteWarnings = dutyWriteWarnings;
37
37
  exports.renderDutyWriteWarnings = renderDutyWriteWarnings;
38
+ exports.readDutyCadenceRequest = readDutyCadenceRequest;
39
+ exports.describeDutyCadenceRequest = describeDutyCadenceRequest;
38
40
  exports.describeDutyRevision = describeDutyRevision;
39
41
  exports.describeDutyPriority = describeDutyPriority;
40
42
  exports.describeBoundCompass = describeBoundCompass;
@@ -49,6 +51,7 @@ exports.renderDutyTrace = renderDutyTrace;
49
51
  exports.renderProactivenessScorecard = renderProactivenessScorecard;
50
52
  exports.isHeldCycleRun = isHeldCycleRun;
51
53
  exports.heldRunFailureCode = heldRunFailureCode;
54
+ exports.heldRunHoldReason = heldRunHoldReason;
52
55
  exports.heldRunReviewCommand = heldRunReviewCommand;
53
56
  exports.formatDutyCycles = formatDutyCycles;
54
57
  exports.hypothesisRefusalLines = hypothesisRefusalLines;
@@ -1389,6 +1392,36 @@ function renderDutyWriteWarnings(warnings, warn) {
1389
1392
  for (const warning of warnings)
1390
1393
  warn(warning.message);
1391
1394
  }
1395
+ /** Read the receipt off a PATCH answer, or `undefined` when the cadence was written as sent. */
1396
+ function readDutyCadenceRequest(response) {
1397
+ const receipt = response && typeof response === 'object'
1398
+ ? response.cadenceRequest
1399
+ : undefined;
1400
+ if (!receipt || typeof receipt !== 'object')
1401
+ return undefined;
1402
+ const status = receipt.status;
1403
+ return status === 'awaiting_approval' || status === 'applied'
1404
+ ? receipt
1405
+ : undefined;
1406
+ }
1407
+ /** The line `duties update` prints instead of "Updated duty" when the cadence became a request. */
1408
+ function describeDutyCadenceRequest(receipt, dutyId) {
1409
+ if (receipt.status === 'applied') {
1410
+ return receipt.unchanged
1411
+ ? `No cadence change: it already checks every ${describeIntervalMs(receipt.intervalMs)}.`
1412
+ : `Cadence changed to every ${describeIntervalMs(receipt.intervalMs)}: the owner lets the Agent tune it within their limits.`;
1413
+ }
1414
+ const current = receipt.currentIntervalMs == null
1415
+ ? ''
1416
+ : ` It still checks every ${describeIntervalMs(receipt.currentIntervalMs)} until then.`;
1417
+ const step = receipt.approvalReason === 'cadence_change_exceeds_max_relative_change'
1418
+ ? ' The step is larger than the owner lets the Agent take alone.'
1419
+ : '';
1420
+ const decide = `skrr duties cadence-requests decide ${dutyId || '<duty-id>'} ${receipt.requestId || '<request-id>'} --approve`;
1421
+ return (`Cadence change waiting for the owner's approval: every ${describeIntervalMs(receipt.requestedIntervalMs)} ` +
1422
+ `(request ${receipt.requestId || 'unknown'}).${current}${step} The owner decides with ` +
1423
+ `\`${decide}\` or in the app.`);
1424
+ }
1392
1425
  function describeDutyRevision(revision) {
1393
1426
  if (!revision || typeof revision.changed !== 'boolean')
1394
1427
  return 'Updated duty:';
@@ -1597,7 +1630,15 @@ scheduleIssues) {
1597
1630
  log('This statement alone does not prove that the evidence was observed or the work succeeded.');
1598
1631
  }
1599
1632
  }
1633
+ else if ((0, data_provider_2.isDutyReasonWithheld)(latestCheck?.decision?.whyNow)) {
1634
+ // A viewer who is not the owner gets no `state.summary` (a copy of the latest `whyNow`) and the
1635
+ // marker in `whyNow` itself (OSK-33448). Say whose it is rather than print nothing.
1636
+ log('');
1637
+ log(exports.DUTY_FINDING_WITHHELD_LINE);
1638
+ }
1600
1639
  }
1640
+ /** What `show` prints where the latest finding would be, for a viewer who is not the Duty's owner. */
1641
+ exports.DUTY_FINDING_WITHHELD_LINE = "Only the Duty's owner can read the latest finding.";
1601
1642
  /**
1602
1643
  * Short humanization of a skipped invocation's reason CODE (OSK-4884). The
1603
1644
  * server records why it declined to wake the agent as a machine token; a reader
@@ -1678,20 +1719,24 @@ function renderCheckList(checks, log) {
1678
1719
  // list there is "not retained", never "none" (OSK-15148). Its retained
1679
1720
  // explanation stands in for the stripped `whyNow`.
1680
1721
  const retainedCount = (c, list) => c.historyDetail && !list?.length ? '-' : String(list?.length ?? 0);
1681
- (0, format_1.renderTable)(checks.map((c) => ({
1682
- started: c.startedAt ?? '-',
1683
- kind: c.checkKind ?? '-',
1684
- status: c.status ?? '-',
1685
- posture: c.decision?.posture ?? '-',
1686
- loops: retainedCount(c, c.openLoops),
1687
- actions: retainedCount(c, c.actionPlan),
1688
- woke: describeWakeDecision(c),
1689
- why: c.decision?.whyNow ??
1722
+ (0, format_1.renderTable)(checks.map((c) => {
1723
+ const why = c.decision?.whyNow ??
1690
1724
  c.decision?.summary ??
1691
1725
  c.reason ??
1692
- (c.historyDetail ? '(detail not retained)' : ''),
1693
- id: c.id ?? '-',
1694
- })), [
1726
+ (c.historyDetail ? '(detail not retained)' : '');
1727
+ return {
1728
+ started: c.startedAt ?? '-',
1729
+ kind: c.checkKind ?? '-',
1730
+ status: c.status ?? '-',
1731
+ posture: c.decision?.posture ?? '-',
1732
+ loops: retainedCount(c, c.openLoops),
1733
+ actions: retainedCount(c, c.actionPlan),
1734
+ woke: describeWakeDecision(c),
1735
+ // A viewer who is not the Duty's owner is sent a marker in place of the sentence (OSK-33448).
1736
+ why: (0, data_provider_2.isDutyReasonWithheld)(why) ? '(owner only)' : why,
1737
+ id: c.id ?? '-',
1738
+ };
1739
+ }), [
1695
1740
  { key: 'started', header: 'STARTED', maxWidth: 24 },
1696
1741
  { key: 'kind', header: 'KIND', maxWidth: 10 },
1697
1742
  { key: 'status', header: 'STATUS', maxWidth: 10 },
@@ -2203,6 +2248,23 @@ function heldRunFailureCode(run) {
2203
2248
  const code = run.heldForReview?.failureCode;
2204
2249
  return typeof code === 'string' && code ? code : null;
2205
2250
  }
2251
+ /**
2252
+ * Why a held run is held, as the server names it (OSK-33272): the hold's reason code, and its cause when the writer
2253
+ * recorded one that is not the failure code. A reason this CLI does not know is printed as written, marked. Null from
2254
+ * an older server, which named neither.
2255
+ */
2256
+ function heldRunHoldReason(run) {
2257
+ const held = run
2258
+ .heldForReview;
2259
+ const reason = typeof held?.holdReason === 'string' && held.holdReason ? held.holdReason : null;
2260
+ if (!reason)
2261
+ return null;
2262
+ const cause = typeof held?.holdCause === 'string' && held.holdCause ? held.holdCause : null;
2263
+ const named = (0, data_provider_2.isDutyResultHoldReason)(reason)
2264
+ ? reason
2265
+ : `${reason}, a reason this CLI does not know; \`skrr update\` for details`;
2266
+ return cause ? `${named}; cause: ${cause}` : named;
2267
+ }
2206
2268
  /** The review command for a held run, naming its Agent when the server did. */
2207
2269
  function heldRunReviewCommand(run) {
2208
2270
  const agentId = run.heldForReview?.agentId;
@@ -2318,7 +2380,12 @@ function formatDutyCycles(page) {
2318
2380
  lines.push(` ${line}`);
2319
2381
  if (isHeldCycleRun(run)) {
2320
2382
  const heldCode = heldRunFailureCode(run);
2321
- lines.push(` run ${run.id} held for review${heldCode ? ` (its turn failed: ${heldCode})` : ''} — review it with \`${heldRunReviewCommand(run)}\``);
2383
+ const heldWhy = heldRunHoldReason(run);
2384
+ const notes = [
2385
+ heldWhy ? `held because: ${heldWhy}` : '',
2386
+ heldCode ? `its turn failed: ${heldCode}` : '',
2387
+ ].filter(Boolean);
2388
+ lines.push(` run ${run.id} held for review${notes.length ? ` (${notes.join('; ')})` : ''} — review it with \`${heldRunReviewCommand(run)}\``);
2322
2389
  }
2323
2390
  if (!['machine', 'contract', 'work'].includes(run.failureClass))
2324
2391
  continue;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The words `skrr agents permissions` prints for one "Always allow" rule (OSK-33440 P2-3). The web
3
+ * settings card says the same things: what the rule covers, where it applies, where it was granted
4
+ * from, and how often it has run.
5
+ */
6
+ import type { AgentPermissionRuleView, PermissionRuleGrantOutcome } from '@skrr-ai/data-provider';
7
+ /** What a rule covers. "any command" is worded here, never read from a stored label. */
8
+ export declare function ruleCovers(rule: AgentPermissionRuleView): string;
9
+ export declare function ruleWhere(rule: AgentPermissionRuleView): string;
10
+ export declare function ruleGranted(rule: AgentPermissionRuleView): string;
11
+ export declare function ruleUse(rule: AgentPermissionRuleView): string;
12
+ /** One rule as a short block: what it covers, then its id and details. */
13
+ export declare function ruleLines(rule: AgentPermissionRuleView): string[];
14
+ /**
15
+ * What came of "Always allow …" chosen on a parked Task approval, as one line. The web card says
16
+ * the same through its toast.
17
+ */
18
+ export declare function ruleOutcomeLine(outcome: PermissionRuleGrantOutcome): string;