@skrr-ai/cli 0.1.201 → 0.1.204
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-command.js +1 -1
- package/dist/commands/agent/message/context.d.ts +3 -0
- package/dist/commands/agent/message/context.js +33 -1
- package/dist/commands/agent/message/no-reply.d.ts +17 -0
- package/dist/commands/agent/message/no-reply.js +54 -0
- package/dist/commands/agent/message/retract.d.ts +24 -0
- package/dist/commands/agent/message/retract.js +167 -0
- package/dist/commands/agent/message/send.d.ts +47 -3
- package/dist/commands/agent/message/send.js +135 -4
- package/dist/commands/agents/chat.d.ts +12 -0
- package/dist/commands/agents/chat.js +258 -25
- package/dist/commands/agents/manager/status.d.ts +9 -0
- package/dist/commands/agents/manager/status.js +84 -0
- package/dist/commands/agents/queue/clear.d.ts +13 -0
- package/dist/commands/agents/queue/clear.js +31 -0
- package/dist/commands/agents/queue/list.d.ts +10 -0
- package/dist/commands/agents/queue/list.js +34 -0
- package/dist/commands/agents/queue/move.d.ts +16 -0
- package/dist/commands/agents/queue/move.js +33 -0
- package/dist/commands/agents/queue/pause.d.ts +7 -0
- package/dist/commands/agents/queue/pause.js +24 -0
- package/dist/commands/agents/queue/resume.d.ts +7 -0
- package/dist/commands/agents/queue/resume.js +24 -0
- package/dist/commands/agents/queue/steer.d.ts +14 -0
- package/dist/commands/agents/queue/steer.js +38 -0
- package/dist/commands/agents/queue/withdraw.d.ts +10 -0
- package/dist/commands/agents/queue/withdraw.js +27 -0
- package/dist/commands/agents/supervision.d.ts +1 -0
- package/dist/commands/agents/supervision.js +28 -9
- package/dist/commands/duties/advance-next.d.ts +17 -0
- package/dist/commands/duties/advance-next.js +122 -0
- package/dist/commands/duties/create.js +22 -3
- package/dist/commands/duties/pack/plan.js +45 -0
- package/dist/commands/duties/preflight.d.ts +1 -0
- package/dist/commands/duties/preflight.js +18 -2
- package/dist/commands/spaces/auto-executor/preview.js +6 -2
- package/dist/commands/spaces/charter/revise.d.ts +16 -0
- package/dist/commands/spaces/charter/revise.js +84 -0
- package/dist/commands/spaces/skills/propose.d.ts +1 -0
- package/dist/commands/spaces/skills/propose.js +5 -0
- package/dist/commands/tasks/create.js +16 -1
- package/dist/commands/tasks/result/show.d.ts +1 -0
- package/dist/commands/tasks/result/show.js +22 -1
- package/dist/commands/tasks/start.d.ts +3 -0
- package/dist/commands/tasks/start.js +12 -1
- package/dist/commands/triggers/capabilities.js +24 -5
- package/dist/commands/triggers/create.d.ts +1 -1
- package/dist/commands/triggers/create.js +15 -6
- package/dist/generated/agent-guides.json +258 -24
- package/dist/lib/agent-chat-queue-command.d.ts +29 -0
- package/dist/lib/agent-chat-queue-command.js +75 -0
- package/dist/lib/agent-chat-queue.d.ts +77 -0
- package/dist/lib/agent-chat-queue.js +245 -0
- package/dist/lib/agent-chat-start.d.ts +101 -0
- package/dist/lib/agent-chat-start.js +151 -6
- package/dist/lib/duties.d.ts +5 -1
- package/dist/lib/duties.js +16 -5
- package/dist/lib/duty-product.js +6 -0
- package/dist/lib/input-queue.d.ts +18 -0
- package/dist/lib/input-queue.js +59 -0
- package/dist/lib/message-intent.d.ts +26 -3
- package/dist/lib/message-intent.js +7 -1
- package/dist/lib/task-runtime-headers.d.ts +7 -0
- package/dist/lib/task-runtime-headers.js +46 -9
- package/dist/node_modules/@skrr-ai/data-provider/index.js +10464 -10221
- package/oclif.manifest.json +1288 -87
- package/package.json +6 -3
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
"id": "authoring",
|
|
419
419
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
420
420
|
"readWhen": "you draft or change a Duty",
|
|
421
|
-
"tokens":
|
|
421
|
+
"tokens": 1170,
|
|
422
422
|
"aliases": [],
|
|
423
423
|
"explains": [
|
|
424
424
|
"DUTY_MODE_RETIRED",
|
|
@@ -662,7 +662,7 @@
|
|
|
662
662
|
"version": 1,
|
|
663
663
|
"routed": false,
|
|
664
664
|
"aliases": [],
|
|
665
|
-
"tokens":
|
|
665
|
+
"tokens": 1477,
|
|
666
666
|
"sections": [
|
|
667
667
|
{
|
|
668
668
|
"id": "writing",
|
|
@@ -703,6 +703,27 @@
|
|
|
703
703
|
"idempotency_conflict"
|
|
704
704
|
]
|
|
705
705
|
},
|
|
706
|
+
{
|
|
707
|
+
"id": "correcting",
|
|
708
|
+
"title": "Correcting, updating or withdrawing a sent message",
|
|
709
|
+
"readWhen": "something you told the owner turned out wrong, a status moved on, or a message should not have been sent",
|
|
710
|
+
"tokens": 722,
|
|
711
|
+
"aliases": [],
|
|
712
|
+
"explains": [
|
|
713
|
+
"target_not_found",
|
|
714
|
+
"target_not_agent_message",
|
|
715
|
+
"target_other_agent",
|
|
716
|
+
"target_unprovable",
|
|
717
|
+
"target_superseded",
|
|
718
|
+
"target_retracted",
|
|
719
|
+
"operation_invalid",
|
|
720
|
+
"operation_destination_unsupported",
|
|
721
|
+
"INVALID_MESSAGE_OPERATION",
|
|
722
|
+
"MESSAGE_OPERATION_REQUIRES_SESSION",
|
|
723
|
+
"MESSAGE_OPERATION_SEQUENCE_UNSUPPORTED",
|
|
724
|
+
"MESSAGE_OPERATION_UNAVAILABLE"
|
|
725
|
+
]
|
|
726
|
+
},
|
|
706
727
|
{
|
|
707
728
|
"id": "delivery-statuses",
|
|
708
729
|
"title": "Delivery statuses",
|
|
@@ -725,8 +746,8 @@
|
|
|
725
746
|
]
|
|
726
747
|
}
|
|
727
748
|
],
|
|
728
|
-
"hash": "
|
|
729
|
-
"tokens":
|
|
749
|
+
"hash": "abbba0b5fc95380d3fd203d95bbc9ecf7b8a18cdac7f1d3592cf33b4c356441c",
|
|
750
|
+
"tokens": 561
|
|
730
751
|
},
|
|
731
752
|
"routedIndex": {
|
|
732
753
|
"level": "index",
|
|
@@ -1147,7 +1168,7 @@
|
|
|
1147
1168
|
"id": "authoring",
|
|
1148
1169
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
1149
1170
|
"readWhen": "you draft or change a Duty",
|
|
1150
|
-
"tokens":
|
|
1171
|
+
"tokens": 1170,
|
|
1151
1172
|
"aliases": [],
|
|
1152
1173
|
"explains": [
|
|
1153
1174
|
"DUTY_MODE_RETIRED",
|
|
@@ -1385,7 +1406,7 @@
|
|
|
1385
1406
|
]
|
|
1386
1407
|
}
|
|
1387
1408
|
],
|
|
1388
|
-
"hash": "
|
|
1409
|
+
"hash": "92105e380d1818701a895346b6a4765c5fac321acc4f0076c3904fbec8d1afab",
|
|
1389
1410
|
"tokens": 506
|
|
1390
1411
|
},
|
|
1391
1412
|
"cards": {
|
|
@@ -1787,7 +1808,7 @@
|
|
|
1787
1808
|
"routed": true,
|
|
1788
1809
|
"aliases": [],
|
|
1789
1810
|
"body": "## Concept model\n\n| Noun | Question it answers |\n| --- | --- |\n| **Compass** | What does good look like for this Agent, and what may it never trade away? |\n| **Northstar** | Which Duties should exist, at what priority and on what budget? |\n| **Duty** | Which outcome does this Agent keep true, and how does it keep checking? |\n| **Check** | What did one wake of a Duty see, decide and do? |\n\nA Duty is not a unit of work. A **Task** is one unit of work and a **Goal** is a dated\noutcome with key results; a Duty watches both and may create Tasks, and is neither.\n\n## Decide\n\nFive mechanisms make something happen later, and the noun alone does not pick one:\n\n| Mechanism | What it is for | The signal that picks it |\n| --- | --- | --- |\n| **Follow-up** | Coming back to one thing, once or a bounded few times: a reminder, a watch, a check-in, an agreed action | The ask ends: \"look tomorrow\", \"tell me when CI is green\" |\n| **Trigger** | Running the Agent with a set prompt on a schedule, an event, once, or on demand | The person names when, and every run does the same work |\n| **Heartbeat** | Checking in on a conversation, group chat or Space at a frequency that backs off while unread | The person wants regular contact, not an outcome held |\n| **Duty** | Keeping an outcome true: watched sources, a cadence and a loop that decides when to act | \"Keep X true\", \"watch this metric\": no end, and stale evidence matters |\n| **Workflow** | Running a durable graph of Tasks in order | Repeatable work whose steps depend on each other |\n\nA one-off \"look at it tomorrow\" is a follow-up, never a Duty. Standing observation is a\nDuty with a freshness contract, not a recurring trigger or a task board left running.\n\n## Workflow\n\n### Start a Duty\n\n1. Read the Agent's Duties first, and change one rather than add a near-duplicate.\n2. Create it and turn it on in one call: the outcome, what it watches, how often it checks, where\n its work goes. Turning it on runs Preflight; a refusal keeps the draft and reports the code,\n reason and fix.\n3. Leave it a draft only when the person asked to see it first.\n4. Read it back, and tell the person what it watches, how often, and whether it is on.\n\n## Authority\n\n| Actor | May do | Only a person may do |\n| --- | --- | --- |\n| Agent | Read the Duties of an Agent it can view; create one, change it and turn it on; request a check; pause one; decide whether a finding is worth telling the owner | Lift a stop a person made; set or clear a concurrency limit; choose the Task review policy; approve an action proposal or a cadence change; configure a Northstar's governance or decide its intents |\n| Person | Everything in both columns | — |\n\nA Duty grants no permission: its runs work under the Agent's own. A Check never writes an\nowner-facing message, and a Compass never creates, rewrites, pauses or archives a Duty. The\nserver cannot always tell an Agent from the person whose login it holds, so an accepted call is\nnot permission: the right-hand column stays a person's.\n\n## Live state\n\n- `skrr duties list --agent <agent-id>` — an Agent's Duties, with status and assessment.\n- `skrr duties show <duty-id>` — the contract, its next check and the last one.\n- `skrr duties roster --agent <agent-id>` — each loop: whether it is armed, its next wake, runs today.\n\n## Related guides\n\n- `tasks` — the Tasks a Duty creates or watches.\n- `spaces` — Goals, and Workflows: durable graphs of Tasks.\n- `agents` — the Agent a Duty belongs to, and where its runs execute.\n- `communication` — whether, what and how to tell the owner.",
|
|
1790
|
-
"hash": "
|
|
1811
|
+
"hash": "9283c3109d1b04a16701abfbb370094500429a9697ace0f4e44142fbc6c4e93b",
|
|
1791
1812
|
"tokens": 1134,
|
|
1792
1813
|
"sections": [
|
|
1793
1814
|
{
|
|
@@ -1820,7 +1841,7 @@
|
|
|
1820
1841
|
"id": "authoring",
|
|
1821
1842
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
1822
1843
|
"readWhen": "you draft or change a Duty",
|
|
1823
|
-
"tokens":
|
|
1844
|
+
"tokens": 1170,
|
|
1824
1845
|
"aliases": [],
|
|
1825
1846
|
"explains": [
|
|
1826
1847
|
"DUTY_MODE_RETIRED",
|
|
@@ -2074,9 +2095,9 @@
|
|
|
2074
2095
|
"version": 1,
|
|
2075
2096
|
"routed": false,
|
|
2076
2097
|
"aliases": [],
|
|
2077
|
-
"body": "## Concept model\n\nAn **Agent Update** is a deliberate owner-facing message. It is conversation, not\nrecord: what durably changed belongs to the work's own records, and the message\npoints at it.\n\n## Agent Updates\n\nProactively message the owner whenever it would improve their ability to steer the work, understand\na meaningful change, or stay confidently involved. Adapt to the task, uncertainty and stakes, the\nuser's engagement, what you have already communicated, and any per-agent style direction. Do not\nfollow a fixed schedule or manufacture status chatter.\n\n- Choose the semantic kind: `milestone` for a meaningful completed stage, `status` for a\n useful non-blocking checkpoint, `decision` for a concrete choice, `blocker` when user action is needed to\n continue, and one `result` for the terminal outcome (including failure).\n- Declare the attention intent with `--attention ambient|notify|interrupt`: `ambient` stays in\n the durable timeline by default, `notify` is worth seeing soon, and `interrupt` is reserved for\n work that is blocked or genuinely time-sensitive. The system and the user choose delivery channels and native\n presentation; attention never directly selects an Android channel, iOS interruption level, sound, or critical\n alert, and never bypasses notification preferences, quiet hours, Focus, or rate limits.\n- Say what is newly true and what it changes for the work. Include the next step, decision, or\n uncertainty when it would help the user; do not force every message into a fixed template.\n- Write like a capable teammate giving a busy owner a real, in-the-moment briefing — not like a\n system log, a customer-service script, or a task template. Open on the thing itself, never on a\n subject line (\"Status on the refactor:\", \"Quick update:\"). In the user's language, lead with the\n fresh fact, decision, or risk; then make clear why it matters and what happens next. Where the\n evidence is available, ground the update in one or two useful specifics: the affected thing, the\n evidence, the timing, or the trade-off.\n Use plain, varied sentences and only the confidence the evidence earns. Keep them short: where a\n dash would staple two clauses into one, use two sentences instead. Be warm and direct, but\n never manufacture familiarity, emotion, certainty, or colour that is not true. Avoid AI-shaped\n filler such as \"I am pleased to report\", \"completed / in progress / next step\" recaps,\n \"I will continue to monitor\", \"feel free to let me know\", ceremonial thanks, and vague claims\n such as \"the optimization is complete\". Say the thing instead: \"The migration is in; the\n slowest query fell from 2.8s to 420ms. I am running the full regression now and will flag any\n breakage before merge.\" Treat that as a standard of specificity, not a rigid script. Do not make\n a message longer merely to sound human.\n- Task context and card presentation are separate. A managed session's task context is derived\n server-side, but a message shows no Task Card unless you explicitly choose `--attach-task-card`\n (or `presentation.taskCard: true`). Use a card when it materially helps the user open or follow the\n live task; omit it for ordinary conversational updates.\n- In a hand-started session, use `skrr agent message context --agent <id>` when recent\n updates, read state, or a user's reply would help your judgment. It supplies observations, not a\n schedule or a command to send.\n- In a skrr-managed session, do not pass task, run, or session identity: skrr derives it.\n In a hand-started session, add `--task <task-id>` only when you know the correct task; it is\n declared context.\n- Prefer one message for one thought. For a conversational owner DM — such as a pitch, invitation,\n question, or progress update — when a draft exceeds roughly 320 characters or contains two independent thoughts,\n normally use a 2–4 message human-scale sequence with `--part \"<next thought>\"` and one explicit semantic\n `--idempotency-key`. Do not fragment a single thought merely to send more messages, and never split text\n mechanically: choose the semantic boundaries yourself. If one part does not reach the user, the remaining parts\n are deliberately not sent — the user would otherwise read your thoughts out of order.\n- An idempotency key names ONE update for this agent permanently, so make it specific to this run\n (for example `<task-id>:verify-complete`). Reuse it only to retry that same update: reused with\n the same text it is dropped as a duplicate, and with different text it is rejected.\n- A non-`delivered` status (`held`, `approval_required`, `duplicate`, `dropped`) is a policy\n outcome, not an error. It is never a reason to bypass this command with a direct DM or Slack\n call — this is the only sanctioned agent-to-user path.\n\n## Authority\n\n| Actor | May do | Only a person may do |\n| --- | --- | --- |\n| Agent | Decide to message; declare kind, attention intent, task context and a task card | Choose the delivery channel or native presentation; release a held or approval-gated intent |\n| Person | Everything an Agent may do | — |\n\n## Live state\n\n- `skrr agent message context --agent <id>` —
|
|
2078
|
-
"hash": "
|
|
2079
|
-
"tokens":
|
|
2098
|
+
"body": "## Concept model\n\nAn **Agent Update** is a deliberate owner-facing message. It is conversation, not\nrecord: what durably changed belongs to the work's own records, and the message\npoints at it.\n\n## Agent Updates\n\nProactively message the owner whenever it would improve their ability to steer the work, understand\na meaningful change, or stay confidently involved. Adapt to the task, uncertainty and stakes, the\nuser's engagement, what you have already communicated, and any per-agent style direction. Do not\nfollow a fixed schedule or manufacture status chatter.\n\n- Choose the semantic kind: `milestone` for a meaningful completed stage, `status` for a\n useful non-blocking checkpoint, `decision` for a concrete choice, `blocker` when user action is needed to\n continue, and one `result` for the terminal outcome (including failure).\n- Declare the attention intent with `--attention ambient|notify|interrupt`: `ambient` stays in\n the durable timeline by default, `notify` is worth seeing soon, and `interrupt` is reserved for\n work that is blocked or genuinely time-sensitive. The system and the user choose delivery channels and native\n presentation; attention never directly selects an Android channel, iOS interruption level, sound, or critical\n alert, and never bypasses notification preferences, quiet hours, Focus, or rate limits.\n- Say what is newly true and what it changes for the work. Include the next step, decision, or\n uncertainty when it would help the user; do not force every message into a fixed template.\n- Write like a capable teammate giving a busy owner a real, in-the-moment briefing — not like a\n system log, a customer-service script, or a task template. Open on the thing itself, never on a\n subject line (\"Status on the refactor:\", \"Quick update:\"). In the user's language, lead with the\n fresh fact, decision, or risk; then make clear why it matters and what happens next. Where the\n evidence is available, ground the update in one or two useful specifics: the affected thing, the\n evidence, the timing, or the trade-off.\n Use plain, varied sentences and only the confidence the evidence earns. Keep them short: where a\n dash would staple two clauses into one, use two sentences instead. Be warm and direct, but\n never manufacture familiarity, emotion, certainty, or colour that is not true. Avoid AI-shaped\n filler such as \"I am pleased to report\", \"completed / in progress / next step\" recaps,\n \"I will continue to monitor\", \"feel free to let me know\", ceremonial thanks, and vague claims\n such as \"the optimization is complete\". Say the thing instead: \"The migration is in; the\n slowest query fell from 2.8s to 420ms. I am running the full regression now and will flag any\n breakage before merge.\" Treat that as a standard of specificity, not a rigid script. Do not make\n a message longer merely to sound human.\n- Task context and card presentation are separate. A managed session's task context is derived\n server-side, but a message shows no Task Card unless you explicitly choose `--attach-task-card`\n (or `presentation.taskCard: true`). Use a card when it materially helps the user open or follow the\n live task; omit it for ordinary conversational updates.\n- In a hand-started session, use `skrr agent message context --agent <id>` when recent\n updates, read state, or a user's reply would help your judgment. It supplies observations, not a\n schedule or a command to send.\n- In a skrr-managed session, do not pass task, run, or session identity: skrr derives it.\n In a hand-started session, add `--task <task-id>` only when you know the correct task; it is\n declared context.\n- Prefer one message for one thought. For a conversational owner DM — such as a pitch, invitation,\n question, or progress update — when a draft exceeds roughly 320 characters or contains two independent thoughts,\n normally use a 2–4 message human-scale sequence with `--part \"<next thought>\"` and one explicit semantic\n `--idempotency-key`. Do not fragment a single thought merely to send more messages, and never split text\n mechanically: choose the semantic boundaries yourself. If one part does not reach the user, the remaining parts\n are deliberately not sent — the user would otherwise read your thoughts out of order.\n- An idempotency key names ONE update for this agent permanently, so make it specific to this run\n (for example `<task-id>:verify-complete`). Reuse it only to retry that same update: reused with\n the same text it is dropped as a duplicate, and with different text it is rejected.\n- A non-`delivered` status (`held`, `approval_required`, `duplicate`, `dropped`) is a policy\n outcome, not an error. It is never a reason to bypass this command with a direct DM or Slack\n call — this is the only sanctioned agent-to-user path.\n\n## Authority\n\n| Actor | May do | Only a person may do |\n| --- | --- | --- |\n| Agent | Decide to message; declare kind, attention intent, task context and a task card | Choose the delivery channel or native presentation; release a held or approval-gated intent |\n| Person | Everything an Agent may do | — |\n\n## Live state\n\n- `skrr agent message context --agent <id>` — what the owner saw in the conversation (your replies,\n your messages and the platform's, theirs), how far they have read and what they said since you\n last spoke, plus recent updates and engagement: observations for the decision above. Inside a\n session it reads the conversation your next message lands in, and what this turn has sent\n (`currentTurn`); outside one, `--conversation main|<id>` picks it. `--limit` and `--before` page\n back.\n\n## Related guides\n\n- `tasks` — the records an update points at, and the durable version of what changed.\n- `agents` — which Agent a session speaks as; its `identity` section owns the agent-context refusals.",
|
|
2099
|
+
"hash": "05866424c9e6cddda0ba4e4b8ccb6ccf9ef7bf40d0859f2464980daf80ba64f0",
|
|
2100
|
+
"tokens": 1477,
|
|
2080
2101
|
"sections": [
|
|
2081
2102
|
{
|
|
2082
2103
|
"id": "writing",
|
|
@@ -2117,6 +2138,27 @@
|
|
|
2117
2138
|
"idempotency_conflict"
|
|
2118
2139
|
]
|
|
2119
2140
|
},
|
|
2141
|
+
{
|
|
2142
|
+
"id": "correcting",
|
|
2143
|
+
"title": "Correcting, updating or withdrawing a sent message",
|
|
2144
|
+
"readWhen": "something you told the owner turned out wrong, a status moved on, or a message should not have been sent",
|
|
2145
|
+
"tokens": 722,
|
|
2146
|
+
"aliases": [],
|
|
2147
|
+
"explains": [
|
|
2148
|
+
"target_not_found",
|
|
2149
|
+
"target_not_agent_message",
|
|
2150
|
+
"target_other_agent",
|
|
2151
|
+
"target_unprovable",
|
|
2152
|
+
"target_superseded",
|
|
2153
|
+
"target_retracted",
|
|
2154
|
+
"operation_invalid",
|
|
2155
|
+
"operation_destination_unsupported",
|
|
2156
|
+
"INVALID_MESSAGE_OPERATION",
|
|
2157
|
+
"MESSAGE_OPERATION_REQUIRES_SESSION",
|
|
2158
|
+
"MESSAGE_OPERATION_SEQUENCE_UNSUPPORTED",
|
|
2159
|
+
"MESSAGE_OPERATION_UNAVAILABLE"
|
|
2160
|
+
]
|
|
2161
|
+
},
|
|
2120
2162
|
{
|
|
2121
2163
|
"id": "delivery-statuses",
|
|
2122
2164
|
"title": "Delivery statuses",
|
|
@@ -5974,7 +6016,7 @@
|
|
|
5974
6016
|
"id": "authoring",
|
|
5975
6017
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
5976
6018
|
"readWhen": "you draft or change a Duty",
|
|
5977
|
-
"tokens":
|
|
6019
|
+
"tokens": 1170,
|
|
5978
6020
|
"aliases": [],
|
|
5979
6021
|
"explains": [
|
|
5980
6022
|
"DUTY_MODE_RETIRED",
|
|
@@ -6090,7 +6132,7 @@
|
|
|
6090
6132
|
"id": "authoring",
|
|
6091
6133
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
6092
6134
|
"readWhen": "you draft or change a Duty",
|
|
6093
|
-
"tokens":
|
|
6135
|
+
"tokens": 1170,
|
|
6094
6136
|
"aliases": [],
|
|
6095
6137
|
"explains": [
|
|
6096
6138
|
"DUTY_MODE_RETIRED",
|
|
@@ -6208,7 +6250,7 @@
|
|
|
6208
6250
|
"id": "authoring",
|
|
6209
6251
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
6210
6252
|
"readWhen": "you draft or change a Duty",
|
|
6211
|
-
"tokens":
|
|
6253
|
+
"tokens": 1170,
|
|
6212
6254
|
"aliases": [],
|
|
6213
6255
|
"explains": [
|
|
6214
6256
|
"DUTY_MODE_RETIRED",
|
|
@@ -6296,9 +6338,9 @@
|
|
|
6296
6338
|
"DUTY_CONCURRENCY_REQUIRES_OWNER_DECISION",
|
|
6297
6339
|
"DUTY_TASK_REVIEW_POLICY_OWNER_REQUIRED"
|
|
6298
6340
|
],
|
|
6299
|
-
"body": "Read this when you draft or change a Duty.\n\nCreate and activate a Duty together unless the person asks to review the draft first.\nActivation runs Preflight. A refusal keeps the draft and returns the reason and fix.\n\n- **Outcome and criteria**: the state to hold true, and how you will know it holds.\n- **Watched sources**: name and scope sources the platform reads, such as Tasks or GitHub.\n Declare `agent_run` keys for readings the Agent takes itself. Declared keys move the loop\n under their `changeRule`: `any`, or `numeric_delta` with `minDelta`, `minRatio`, `direction` and `absoluteFloor`.\n- **Cadence**: `interval` (`1m` to `365d`), `daily` at `HH:MM` times in a timezone,\n `event_plus_interval`, or `manual`. Events can wake `event_plus_interval` early. Its interval\n rechecks current state without replaying missed events. The write names sources it cannot arm.\n- **Events (CLI)**: `--event-driven` sets `event_plus_interval`; `skrr triggers event-catalog --json`\n shows `dutyWake`. Task wakes need `--goal <goal-id>` or exactly one `config.taskId`, `config.goalId`,\n or `config.keyResultId` on a `tasks` source in `--from-json`; omit `--watch` with JSON sources.\n- **Delivery**: `report_only` records findings. In the notification instructions, name the\n changes worth a notification and the routine or repeated evidence to keep quiet.\n- **Budgets**: `policy.executionBudget` caps daily runs, sensing runs and cost. `0` blocks and\n `null` is unlimited. `allowedEventSources` restricts wake sources when the list has entries.\n- **Peer review**. The Duty owner authorizes same-Agent targets in\n `agent_run.config.peerDutyVerification`. Use an object for one target or an array for up to eight,\n each with a distinct `targetDutyId`, an `observationKey` declared by that target and a scalar\n `equals` value. The governor chooses one authorized target per Run. Add `wakeOnCompletion: true`\n on a target to wake the governor on qualifying evidence. `reviewOnMismatch: true
|
|
6300
|
-
"hash": "
|
|
6301
|
-
"tokens":
|
|
6341
|
+
"body": "Read this when you draft or change a Duty.\n\nCreate and activate a Duty together unless the person asks to review the draft first.\nActivation runs Preflight. A refusal keeps the draft and returns the reason and fix.\n\n- **Outcome and criteria**: the state to hold true, and how you will know it holds.\n- **Watched sources**: name and scope sources the platform reads, such as Tasks or GitHub.\n Declare `agent_run` keys for readings the Agent takes itself. Declared keys move the loop\n under their `changeRule`: `any`, or `numeric_delta` with `minDelta`, `minRatio`, `direction` and `absoluteFloor`.\n- **Cadence**: `interval` (`1m` to `365d`), `daily` at `HH:MM` times in a timezone,\n `event_plus_interval`, or `manual`. Events can wake `event_plus_interval` early. Its interval\n rechecks current state without replaying missed events. The write names sources it cannot arm.\n- **Events (CLI)**: `--event-driven` sets `event_plus_interval`; `skrr triggers event-catalog --json`\n shows `dutyWake`. Task wakes need `--goal <goal-id>` or exactly one `config.taskId`, `config.goalId`,\n or `config.keyResultId` on a `tasks` source in `--from-json`; omit `--watch` with JSON sources.\n- **Delivery**: `report_only` records findings. In the notification instructions, name the\n changes worth a notification and the routine or repeated evidence to keep quiet.\n- **Budgets**: `policy.executionBudget` caps daily runs, sensing runs and cost. `0` blocks and\n `null` is unlimited. `allowedEventSources` restricts wake sources when the list has entries.\n- **Peer review**. The Duty owner authorizes same-Agent targets in\n `agent_run.config.peerDutyVerification`. Use an object for one target or an array for up to eight,\n each with a distinct `targetDutyId`, an `observationKey` declared by that target and a scalar\n `equals` value. The governor chooses one authorized target per Run. Add `wakeOnCompletion: true`\n on a target to wake the governor on qualifying evidence. With `reviewOnMismatch: true`, the\n governor can also review an authorized reading whose value or JSON type differs from `equals`.\n A type mismatch cannot satisfy acceptance. To let the governor read native values, grant up to\n three distinct declared keys in `observationReadKeys`. Its invocation includes bounded readings\n from the exact baseline and revised Runs when their sources can be proved. With this grant, a\n revision requires a readable baseline and successful verification requires both Runs to have\n readable evidence. Receipts link the changed version, exact Run and observation.\n- **Interruptions**: `policy.maxUserNudgesPerDay` caps messages to the person: `0` mutes, `null` is\n no limit. `minUserNudgeIntervalMs` is the least gap between two.\n- **Quiet hours**: enabled `policy.quietHours` needs distinct `start` and `end` times (`HH:MM`).\n The window can cross midnight and excludes `end`. Use an IANA `timezone`. Default UTC.\n\n## Example\n\nA daily, report-only watch on a deploy failure rate:\n\nSave this as `duty.json`:\n\n```json\n{\n \"agentId\": \"<agent-id>\",\n \"title\": \"Deploys\",\n \"status\": \"draft\",\n \"target\": { \"outcome\": \"Report a rise in deploy failures\" },\n \"cadence\": { \"mode\": \"daily\", \"times\": [\"09:00\"], \"timezone\": \"America/New_York\" },\n \"delivery\": { \"mode\": \"report_only\" },\n \"watchedSources\": [{\n \"source\": \"agent_run\",\n \"config\": { \"keys\": [{\n \"key\": \"deploys.failure_rate_7d\",\n \"changeRule\": { \"mode\": \"numeric_delta\", \"minDelta\": 0.02, \"direction\": \"up\" }\n }] }\n }],\n \"policy\": { \"executionBudget\": { \"maxRunsPerDay\": 2, \"maxObservationRunsPerDay\": 2 } }\n}\n```\n\n```bash\nskrr duties create --from-json duty.json --activate --json\n```\n\nThe CLI warns about inert fields, including `agent_run` without keys. Omit `--activate` for\nreview. Use `skrr duties update` to edit and `skrr duties resume` to activate later.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `DUTY_MODE_RETIRED` | The body carries `mode`; Duty modes are retired. | Leave it out: runs work under the Agent's own permissions. |\n| `DUTY_POLICY_RETIRED` | The body carries a retired permission-tier policy field. | Remove the field the refusal names. |\n| `DUTY_DELIVERY_REQUIRED` | A coding Duty names no delivery. | Choose where its work goes. |\n| `DUTY_CONCURRENCY_REQUIRES_OWNER_DECISION` | An Agent set or cleared a finite concurrency limit. | Recommend the limit; the person sets it. |\n| `DUTY_TASK_REVIEW_POLICY_OWNER_REQUIRED` | Only the owner chooses the Task review policy. | Leave it out and ask the owner. |",
|
|
6342
|
+
"hash": "3e5fdb9a85dd6bbd8cff779ba705204711ea374077bac83114a3160e525d8012",
|
|
6343
|
+
"tokens": 1170,
|
|
6302
6344
|
"sections": [
|
|
6303
6345
|
{
|
|
6304
6346
|
"id": "model",
|
|
@@ -6330,7 +6372,7 @@
|
|
|
6330
6372
|
"id": "authoring",
|
|
6331
6373
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
6332
6374
|
"readWhen": "you draft or change a Duty",
|
|
6333
|
-
"tokens":
|
|
6375
|
+
"tokens": 1170,
|
|
6334
6376
|
"aliases": [],
|
|
6335
6377
|
"explains": [
|
|
6336
6378
|
"DUTY_MODE_RETIRED",
|
|
@@ -6446,7 +6488,7 @@
|
|
|
6446
6488
|
"id": "authoring",
|
|
6447
6489
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
6448
6490
|
"readWhen": "you draft or change a Duty",
|
|
6449
|
-
"tokens":
|
|
6491
|
+
"tokens": 1170,
|
|
6450
6492
|
"aliases": [],
|
|
6451
6493
|
"explains": [
|
|
6452
6494
|
"DUTY_MODE_RETIRED",
|
|
@@ -6562,7 +6604,7 @@
|
|
|
6562
6604
|
"id": "authoring",
|
|
6563
6605
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
6564
6606
|
"readWhen": "you draft or change a Duty",
|
|
6565
|
-
"tokens":
|
|
6607
|
+
"tokens": 1170,
|
|
6566
6608
|
"aliases": [],
|
|
6567
6609
|
"explains": [
|
|
6568
6610
|
"DUTY_MODE_RETIRED",
|
|
@@ -6684,7 +6726,7 @@
|
|
|
6684
6726
|
"id": "authoring",
|
|
6685
6727
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
6686
6728
|
"readWhen": "you draft or change a Duty",
|
|
6687
|
-
"tokens":
|
|
6729
|
+
"tokens": 1170,
|
|
6688
6730
|
"aliases": [],
|
|
6689
6731
|
"explains": [
|
|
6690
6732
|
"DUTY_MODE_RETIRED",
|
|
@@ -6800,7 +6842,7 @@
|
|
|
6800
6842
|
"id": "authoring",
|
|
6801
6843
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
6802
6844
|
"readWhen": "you draft or change a Duty",
|
|
6803
|
-
"tokens":
|
|
6845
|
+
"tokens": 1170,
|
|
6804
6846
|
"aliases": [],
|
|
6805
6847
|
"explains": [
|
|
6806
6848
|
"DUTY_MODE_RETIRED",
|
|
@@ -6920,7 +6962,7 @@
|
|
|
6920
6962
|
"id": "authoring",
|
|
6921
6963
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
6922
6964
|
"readWhen": "you draft or change a Duty",
|
|
6923
|
-
"tokens":
|
|
6965
|
+
"tokens": 1170,
|
|
6924
6966
|
"aliases": [],
|
|
6925
6967
|
"explains": [
|
|
6926
6968
|
"DUTY_MODE_RETIRED",
|
|
@@ -7038,7 +7080,7 @@
|
|
|
7038
7080
|
"id": "authoring",
|
|
7039
7081
|
"title": "Write a Duty: sources, keys, cadence and budgets",
|
|
7040
7082
|
"readWhen": "you draft or change a Duty",
|
|
7041
|
-
"tokens":
|
|
7083
|
+
"tokens": 1170,
|
|
7042
7084
|
"aliases": [],
|
|
7043
7085
|
"explains": [
|
|
7044
7086
|
"DUTY_MODE_RETIRED",
|
|
@@ -8372,6 +8414,27 @@
|
|
|
8372
8414
|
"idempotency_conflict"
|
|
8373
8415
|
]
|
|
8374
8416
|
},
|
|
8417
|
+
{
|
|
8418
|
+
"id": "correcting",
|
|
8419
|
+
"title": "Correcting, updating or withdrawing a sent message",
|
|
8420
|
+
"readWhen": "something you told the owner turned out wrong, a status moved on, or a message should not have been sent",
|
|
8421
|
+
"tokens": 722,
|
|
8422
|
+
"aliases": [],
|
|
8423
|
+
"explains": [
|
|
8424
|
+
"target_not_found",
|
|
8425
|
+
"target_not_agent_message",
|
|
8426
|
+
"target_other_agent",
|
|
8427
|
+
"target_unprovable",
|
|
8428
|
+
"target_superseded",
|
|
8429
|
+
"target_retracted",
|
|
8430
|
+
"operation_invalid",
|
|
8431
|
+
"operation_destination_unsupported",
|
|
8432
|
+
"INVALID_MESSAGE_OPERATION",
|
|
8433
|
+
"MESSAGE_OPERATION_REQUIRES_SESSION",
|
|
8434
|
+
"MESSAGE_OPERATION_SEQUENCE_UNSUPPORTED",
|
|
8435
|
+
"MESSAGE_OPERATION_UNAVAILABLE"
|
|
8436
|
+
]
|
|
8437
|
+
},
|
|
8375
8438
|
{
|
|
8376
8439
|
"id": "delivery-statuses",
|
|
8377
8440
|
"title": "Delivery statuses",
|
|
@@ -8449,6 +8512,27 @@
|
|
|
8449
8512
|
"idempotency_conflict"
|
|
8450
8513
|
]
|
|
8451
8514
|
},
|
|
8515
|
+
{
|
|
8516
|
+
"id": "correcting",
|
|
8517
|
+
"title": "Correcting, updating or withdrawing a sent message",
|
|
8518
|
+
"readWhen": "something you told the owner turned out wrong, a status moved on, or a message should not have been sent",
|
|
8519
|
+
"tokens": 722,
|
|
8520
|
+
"aliases": [],
|
|
8521
|
+
"explains": [
|
|
8522
|
+
"target_not_found",
|
|
8523
|
+
"target_not_agent_message",
|
|
8524
|
+
"target_other_agent",
|
|
8525
|
+
"target_unprovable",
|
|
8526
|
+
"target_superseded",
|
|
8527
|
+
"target_retracted",
|
|
8528
|
+
"operation_invalid",
|
|
8529
|
+
"operation_destination_unsupported",
|
|
8530
|
+
"INVALID_MESSAGE_OPERATION",
|
|
8531
|
+
"MESSAGE_OPERATION_REQUIRES_SESSION",
|
|
8532
|
+
"MESSAGE_OPERATION_SEQUENCE_UNSUPPORTED",
|
|
8533
|
+
"MESSAGE_OPERATION_UNAVAILABLE"
|
|
8534
|
+
]
|
|
8535
|
+
},
|
|
8452
8536
|
{
|
|
8453
8537
|
"id": "delivery-statuses",
|
|
8454
8538
|
"title": "Delivery statuses",
|
|
@@ -8525,6 +8609,135 @@
|
|
|
8525
8609
|
"idempotency_conflict"
|
|
8526
8610
|
]
|
|
8527
8611
|
},
|
|
8612
|
+
{
|
|
8613
|
+
"id": "correcting",
|
|
8614
|
+
"title": "Correcting, updating or withdrawing a sent message",
|
|
8615
|
+
"readWhen": "something you told the owner turned out wrong, a status moved on, or a message should not have been sent",
|
|
8616
|
+
"tokens": 722,
|
|
8617
|
+
"aliases": [],
|
|
8618
|
+
"explains": [
|
|
8619
|
+
"target_not_found",
|
|
8620
|
+
"target_not_agent_message",
|
|
8621
|
+
"target_other_agent",
|
|
8622
|
+
"target_unprovable",
|
|
8623
|
+
"target_superseded",
|
|
8624
|
+
"target_retracted",
|
|
8625
|
+
"operation_invalid",
|
|
8626
|
+
"operation_destination_unsupported",
|
|
8627
|
+
"INVALID_MESSAGE_OPERATION",
|
|
8628
|
+
"MESSAGE_OPERATION_REQUIRES_SESSION",
|
|
8629
|
+
"MESSAGE_OPERATION_SEQUENCE_UNSUPPORTED",
|
|
8630
|
+
"MESSAGE_OPERATION_UNAVAILABLE"
|
|
8631
|
+
]
|
|
8632
|
+
},
|
|
8633
|
+
{
|
|
8634
|
+
"id": "delivery-statuses",
|
|
8635
|
+
"title": "Delivery statuses",
|
|
8636
|
+
"readWhen": "a send answered and you need to know what its status means",
|
|
8637
|
+
"tokens": 841,
|
|
8638
|
+
"aliases": [],
|
|
8639
|
+
"explains": [
|
|
8640
|
+
"agent_not_authorized_for_session",
|
|
8641
|
+
"session_claim_required",
|
|
8642
|
+
"context_task_not_authorized_for_session",
|
|
8643
|
+
"task_context_forbidden",
|
|
8644
|
+
"main_chat_disabled",
|
|
8645
|
+
"destination_not_allowed",
|
|
8646
|
+
"delivery_mode_off",
|
|
8647
|
+
"delivery_mode_suggestions_only",
|
|
8648
|
+
"delivery_mode_ask_first",
|
|
8649
|
+
"delivery_policy_unavailable"
|
|
8650
|
+
]
|
|
8651
|
+
}
|
|
8652
|
+
]
|
|
8653
|
+
},
|
|
8654
|
+
"communication/correcting": {
|
|
8655
|
+
"level": "section",
|
|
8656
|
+
"surface": "cli",
|
|
8657
|
+
"id": "communication",
|
|
8658
|
+
"section": "correcting",
|
|
8659
|
+
"title": "Correcting, updating or withdrawing a sent message",
|
|
8660
|
+
"readWhen": "something you told the owner turned out wrong, a status moved on, or a message should not have been sent",
|
|
8661
|
+
"version": 1,
|
|
8662
|
+
"aliases": [],
|
|
8663
|
+
"explains": [
|
|
8664
|
+
"target_not_found",
|
|
8665
|
+
"target_not_agent_message",
|
|
8666
|
+
"target_other_agent",
|
|
8667
|
+
"target_unprovable",
|
|
8668
|
+
"target_superseded",
|
|
8669
|
+
"target_retracted",
|
|
8670
|
+
"operation_invalid",
|
|
8671
|
+
"operation_destination_unsupported",
|
|
8672
|
+
"INVALID_MESSAGE_OPERATION",
|
|
8673
|
+
"MESSAGE_OPERATION_REQUIRES_SESSION",
|
|
8674
|
+
"MESSAGE_OPERATION_SEQUENCE_UNSUPPORTED",
|
|
8675
|
+
"MESSAGE_OPERATION_UNAVAILABLE"
|
|
8676
|
+
],
|
|
8677
|
+
"body": "Read this when something you already told the owner turned out wrong, a status you sent has moved on, or a message should not have been sent.\n\nEvery owner-DM send prints `Message id: <id>`; `--json` carries it as\n`messageId`. Name that id to change the message later. Only inside the session\nof the Agent that sent it, only in the owner's chat (`app_owner_dm`), and only\nfor one message at a time (no `--part`).\n\n```bash\n# A correction: the earlier message is shown as replaced by this one.\nskrr agent message send --supersedes <message-id> --text \"Correction: the deploy is at 15:00, not 14:00.\"\n# A status you will update: each send with the same key replaces the previous one.\nskrr agent message send --status-key build --text \"Build 2 of 3 passed.\"\n# Withdraw a message that should not have been sent. Nothing new is sent.\nskrr agent message retract <message-id>\n```\n\nA replaced or withdrawn message stays in the conversation, marked, and in the\naudit; it is never deleted. The send's line says what happened: `It replaces\n<id>`, `It is the first \"build\" status`, or `It was sent, but <id> was not\nmarked as replaced (<reason>)`, in which case the new message went out and the\nold one still reads as current. Prefer a correction to a withdrawal: the owner\nthen reads what is true now. A session that sends through the daemon's offline\nqueue cannot do either; send a new message that says what changed.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `target_not_found` | No message with that id in the owner's conversations | Copy the id from the send's output or `agent message context` |\n| `target_not_agent_message` | The owner's own message, or a platform one such as a Duty report | Send a new message instead |\n| `target_other_agent` | Another Agent sent it | Send a new message instead |\n| `target_unprovable` | The record of who sent it is gone (kept 30 days) | Send a new message instead |\n| `target_superseded` | It was already replaced; `details.currentMessageId` is the newer one | Name the newer message |\n| `target_retracted` | It was already withdrawn | Nothing to do |\n| `operation_invalid` | An empty id, or a status key outside `a-z 0-9 . _ -` (64 at most) | Fix the id or the key |\n| `operation_destination_unsupported` | The operation was not for `app_owner_dm` | Only owner-DM messages can be changed |\n| `INVALID_MESSAGE_OPERATION` | Two of `--supersedes`, `--status-key` and a JSON `operation` at once | Give one |\n| `MESSAGE_OPERATION_REQUIRES_SESSION` | Run from your own terminal, where you send as yourself | Run it from the Agent's session |\n| `MESSAGE_OPERATION_SEQUENCE_UNSUPPORTED` | `--part` with `--supersedes` or `--status-key` | Send the correction on its own |\n| `MESSAGE_OPERATION_UNAVAILABLE` | This session sends through the daemon's offline queue | Send a new message that says what changed |",
|
|
8678
|
+
"hash": "194f1c8663eecc26e973121ad3c9d49050b78d16e407cb33a00793cb52d012ff",
|
|
8679
|
+
"tokens": 722,
|
|
8680
|
+
"sections": [
|
|
8681
|
+
{
|
|
8682
|
+
"id": "writing",
|
|
8683
|
+
"title": "Writing and sending an update",
|
|
8684
|
+
"readWhen": "you are about to send an update and need the invocation, a destination or a flag",
|
|
8685
|
+
"tokens": 858,
|
|
8686
|
+
"aliases": [],
|
|
8687
|
+
"explains": [
|
|
8688
|
+
"INVALID_MESSAGE_INTENT",
|
|
8689
|
+
"INVALID_JSON_INPUT",
|
|
8690
|
+
"invalid_request",
|
|
8691
|
+
"content_text_too_long",
|
|
8692
|
+
"slack_channel_id_invalid",
|
|
8693
|
+
"agent_email_plain_text_only",
|
|
8694
|
+
"thread_root_destination_unsupported",
|
|
8695
|
+
"native_notification_presentation_user_owned",
|
|
8696
|
+
"user_owned_notification_control"
|
|
8697
|
+
]
|
|
8698
|
+
},
|
|
8699
|
+
{
|
|
8700
|
+
"id": "parts",
|
|
8701
|
+
"title": "Multi-part updates: --part",
|
|
8702
|
+
"readWhen": "one update needs more than one message, or a send answered with a sequence halt",
|
|
8703
|
+
"tokens": 540,
|
|
8704
|
+
"aliases": [],
|
|
8705
|
+
"explains": [
|
|
8706
|
+
"INVALID_MESSAGE_SEQUENCE",
|
|
8707
|
+
"sequence_invalid"
|
|
8708
|
+
]
|
|
8709
|
+
},
|
|
8710
|
+
{
|
|
8711
|
+
"id": "idempotency-keys",
|
|
8712
|
+
"title": "Idempotency keys",
|
|
8713
|
+
"readWhen": "a send may be retried, or one answered `duplicate` or `idempotency_conflict`",
|
|
8714
|
+
"tokens": 306,
|
|
8715
|
+
"aliases": [],
|
|
8716
|
+
"explains": [
|
|
8717
|
+
"idempotency_conflict"
|
|
8718
|
+
]
|
|
8719
|
+
},
|
|
8720
|
+
{
|
|
8721
|
+
"id": "correcting",
|
|
8722
|
+
"title": "Correcting, updating or withdrawing a sent message",
|
|
8723
|
+
"readWhen": "something you told the owner turned out wrong, a status moved on, or a message should not have been sent",
|
|
8724
|
+
"tokens": 722,
|
|
8725
|
+
"aliases": [],
|
|
8726
|
+
"explains": [
|
|
8727
|
+
"target_not_found",
|
|
8728
|
+
"target_not_agent_message",
|
|
8729
|
+
"target_other_agent",
|
|
8730
|
+
"target_unprovable",
|
|
8731
|
+
"target_superseded",
|
|
8732
|
+
"target_retracted",
|
|
8733
|
+
"operation_invalid",
|
|
8734
|
+
"operation_destination_unsupported",
|
|
8735
|
+
"INVALID_MESSAGE_OPERATION",
|
|
8736
|
+
"MESSAGE_OPERATION_REQUIRES_SESSION",
|
|
8737
|
+
"MESSAGE_OPERATION_SEQUENCE_UNSUPPORTED",
|
|
8738
|
+
"MESSAGE_OPERATION_UNAVAILABLE"
|
|
8739
|
+
]
|
|
8740
|
+
},
|
|
8528
8741
|
{
|
|
8529
8742
|
"id": "delivery-statuses",
|
|
8530
8743
|
"title": "Delivery statuses",
|
|
@@ -8610,6 +8823,27 @@
|
|
|
8610
8823
|
"idempotency_conflict"
|
|
8611
8824
|
]
|
|
8612
8825
|
},
|
|
8826
|
+
{
|
|
8827
|
+
"id": "correcting",
|
|
8828
|
+
"title": "Correcting, updating or withdrawing a sent message",
|
|
8829
|
+
"readWhen": "something you told the owner turned out wrong, a status moved on, or a message should not have been sent",
|
|
8830
|
+
"tokens": 722,
|
|
8831
|
+
"aliases": [],
|
|
8832
|
+
"explains": [
|
|
8833
|
+
"target_not_found",
|
|
8834
|
+
"target_not_agent_message",
|
|
8835
|
+
"target_other_agent",
|
|
8836
|
+
"target_unprovable",
|
|
8837
|
+
"target_superseded",
|
|
8838
|
+
"target_retracted",
|
|
8839
|
+
"operation_invalid",
|
|
8840
|
+
"operation_destination_unsupported",
|
|
8841
|
+
"INVALID_MESSAGE_OPERATION",
|
|
8842
|
+
"MESSAGE_OPERATION_REQUIRES_SESSION",
|
|
8843
|
+
"MESSAGE_OPERATION_SEQUENCE_UNSUPPORTED",
|
|
8844
|
+
"MESSAGE_OPERATION_UNAVAILABLE"
|
|
8845
|
+
]
|
|
8846
|
+
},
|
|
8613
8847
|
{
|
|
8614
8848
|
"id": "delivery-statuses",
|
|
8615
8849
|
"title": "Delivery statuses",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { TConversationInputQueueCard, TConversationInputQueueRead } from '@skrr-ai/data-provider';
|
|
2
|
+
import { BaseCommand } from '../base-command';
|
|
3
|
+
/**
|
|
4
|
+
* What every `skrr agents queue *` command shares: the conversation flag, how a refusal from the
|
|
5
|
+
* queue is reported (in the CLI's own words, under the server's code), and how the queue is printed
|
|
6
|
+
* after a change.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class AgentChatQueueCommand extends BaseCommand {
|
|
9
|
+
static baseFlags: {
|
|
10
|
+
conversation: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
bare: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
raw: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
};
|
|
18
|
+
static readonly cardArg: {
|
|
19
|
+
card: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
20
|
+
};
|
|
21
|
+
/** Report a failure: a queue refusal in the CLI's words, anything else the usual way. */
|
|
22
|
+
protected failQueue(err: unknown, conversationId: string): never;
|
|
23
|
+
/** The card a person named, from the current queue, or a refusal naming what is there. */
|
|
24
|
+
protected findCard(conversationId: string, ref: string): Promise<{
|
|
25
|
+
card: TConversationInputQueueCard;
|
|
26
|
+
read: TConversationInputQueueRead;
|
|
27
|
+
}>;
|
|
28
|
+
protected printQueue(read: TConversationInputQueueRead, json: boolean | undefined, lead?: string): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentChatQueueCommand = void 0;
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const base_command_1 = require("../base-command");
|
|
6
|
+
const agent_chat_queue_1 = require("./agent-chat-queue");
|
|
7
|
+
/**
|
|
8
|
+
* What every `skrr agents queue *` command shares: the conversation flag, how a refusal from the
|
|
9
|
+
* queue is reported (in the CLI's own words, under the server's code), and how the queue is printed
|
|
10
|
+
* after a change.
|
|
11
|
+
*/
|
|
12
|
+
class AgentChatQueueCommand extends base_command_1.BaseCommand {
|
|
13
|
+
static baseFlags = {
|
|
14
|
+
...base_command_1.BaseCommand.baseFlags,
|
|
15
|
+
conversation: core_1.Flags.string({
|
|
16
|
+
description: 'Conversation whose queue to act on',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
20
|
+
};
|
|
21
|
+
static cardArg = {
|
|
22
|
+
card: core_1.Args.string({
|
|
23
|
+
description: 'Card id, a unique prefix of at least 6 characters, or #<position> (1 is next)',
|
|
24
|
+
required: true,
|
|
25
|
+
ignoreStdin: true,
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
/** Report a failure: a queue refusal in the CLI's words, anything else the usual way. */
|
|
29
|
+
failQueue(err, conversationId) {
|
|
30
|
+
const refusal = (0, agent_chat_queue_1.queueErrorOf)(err);
|
|
31
|
+
if (!refusal)
|
|
32
|
+
this.handleApiError(err);
|
|
33
|
+
return this.failWithCliError({
|
|
34
|
+
message: refusal.message,
|
|
35
|
+
code: refusal.code,
|
|
36
|
+
status: refusal.status,
|
|
37
|
+
exit: 1,
|
|
38
|
+
retryable: refusal.retryable,
|
|
39
|
+
details: { conversationId },
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** The card a person named, from the current queue, or a refusal naming what is there. */
|
|
43
|
+
async findCard(conversationId, ref) {
|
|
44
|
+
let read;
|
|
45
|
+
try {
|
|
46
|
+
read = await (0, agent_chat_queue_1.readQueue)(conversationId);
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
this.failQueue(err, conversationId);
|
|
50
|
+
}
|
|
51
|
+
const card = (0, agent_chat_queue_1.resolveCard)(read, ref);
|
|
52
|
+
if (!card) {
|
|
53
|
+
this.failWithCliError({
|
|
54
|
+
message: `No queued message matches ${ref}. List the queue with \`${this.config.bin} agents queue list --conversation ${conversationId}\`.`,
|
|
55
|
+
code: 'INPUT_QUEUE_CARD_NOT_FOUND',
|
|
56
|
+
status: 404,
|
|
57
|
+
exit: 1,
|
|
58
|
+
retryable: false,
|
|
59
|
+
details: { conversationId, card: ref },
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return { card, read };
|
|
63
|
+
}
|
|
64
|
+
printQueue(read, json, lead) {
|
|
65
|
+
if (json) {
|
|
66
|
+
this.printJsonResult(read);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (lead)
|
|
70
|
+
this.log(lead);
|
|
71
|
+
for (const line of (0, agent_chat_queue_1.renderQueue)(read))
|
|
72
|
+
this.log(line);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.AgentChatQueueCommand = AgentChatQueueCommand;
|