@skrr-ai/cli 0.1.158 → 0.1.160
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 +6 -0
- package/dist/commands/activity/list.js +1 -1
- package/dist/commands/activity/scan-older.js +1 -0
- package/dist/commands/activity/show.js +3 -3
- package/dist/generated/agent-guides.json +11 -11
- package/dist/lib/apps-command.js +14 -0
- package/dist/lib/apps.d.ts +13 -0
- package/dist/lib/apps.js +35 -1
- package/dist/lib/usage-discovery.d.ts +3 -0
- package/dist/lib/usage-discovery.js +4 -0
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
package/dist/base-command.js
CHANGED
|
@@ -2690,6 +2690,12 @@ const TERMINAL_ERROR_CODES = new Set([
|
|
|
2690
2690
|
'TASK_RESULT_CHANGES_REQUESTED',
|
|
2691
2691
|
'TASK_RESULT_REVIEW_REQUIRED',
|
|
2692
2692
|
'TASK_DELIVERY_NOT_INTEGRATED',
|
|
2693
|
+
// The drafting target's runtime cannot draft privately: a configuration
|
|
2694
|
+
// state, so a retry of the same request cannot change the answer. (An
|
|
2695
|
+
// OFFLINE target is deliberately not here: it can come back.)
|
|
2696
|
+
'DUTY_PLANNER_RUNTIME_UNSUPPORTED',
|
|
2697
|
+
// Same for a target that needs the owner's permission first: waiting grants none.
|
|
2698
|
+
'DUTY_PLANNER_TARGET_CONSENT_REQUIRED',
|
|
2693
2699
|
]);
|
|
2694
2700
|
/**
|
|
2695
2701
|
* Whether an automated retry of the IDENTICAL request could plausibly succeed.
|
|
@@ -38,7 +38,7 @@ class ActivityList extends base_command_1.BaseCommand {
|
|
|
38
38
|
}, this.resolvedCredential);
|
|
39
39
|
// Standard list envelope (`data`, `has_more`, `next_cursor`); per-source `coverage` is kept.
|
|
40
40
|
if (flags.json)
|
|
41
|
-
this.
|
|
41
|
+
this.printJsonResult((0, list_output_1.listResult)(response, 'items'));
|
|
42
42
|
else
|
|
43
43
|
(0, agent_activity_1.renderAgentActivity)(response, (line) => this.log(line));
|
|
44
44
|
}
|
|
@@ -24,6 +24,7 @@ class ActivityScanOlder extends base_command_1.BaseCommand {
|
|
|
24
24
|
source: core_1.Args.string({
|
|
25
25
|
description: 'Which scan: chat (your own chat replies from your Agents) or group-chat (replies in Groups you can read)',
|
|
26
26
|
required: true,
|
|
27
|
+
ignoreStdin: true,
|
|
27
28
|
options: ['chat', 'group-chat'],
|
|
28
29
|
}),
|
|
29
30
|
};
|
|
@@ -167,7 +167,7 @@ class ActivityShow extends base_command_1.BaseCommand {
|
|
|
167
167
|
this.handleApiError(err);
|
|
168
168
|
}
|
|
169
169
|
if (flags.json) {
|
|
170
|
-
this.
|
|
170
|
+
this.printJsonResult(detail);
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
const parsed = (0, agent_activity_1.parseGroupChatActivityDetail)(detail);
|
|
@@ -205,14 +205,14 @@ class ActivityShow extends base_command_1.BaseCommand {
|
|
|
205
205
|
...(flags.cursor ? { cursor: flags.cursor } : {}),
|
|
206
206
|
});
|
|
207
207
|
if (flags.json)
|
|
208
|
-
this.
|
|
208
|
+
this.printJsonResult(trace);
|
|
209
209
|
else
|
|
210
210
|
(0, duties_1.renderDutyTrace)(trace, (line) => this.log(terminalText(line)));
|
|
211
211
|
return;
|
|
212
212
|
}
|
|
213
213
|
const detail = await triggers_1.triggerApi.fireDetail(flags.trigger, flags.fire);
|
|
214
214
|
if (flags.json)
|
|
215
|
-
this.
|
|
215
|
+
this.printJsonResult(detail);
|
|
216
216
|
else {
|
|
217
217
|
const row = detail;
|
|
218
218
|
for (const line of (0, fire_detail_1.describeFireAuditDetail)(row, flags.fire, flags.trigger))
|
|
@@ -686,7 +686,7 @@
|
|
|
686
686
|
"id": "parts",
|
|
687
687
|
"title": "Multi-part updates: --part",
|
|
688
688
|
"readWhen": "one update needs more than one message, or a send answered with a sequence halt",
|
|
689
|
-
"tokens":
|
|
689
|
+
"tokens": 540,
|
|
690
690
|
"aliases": [],
|
|
691
691
|
"explains": [
|
|
692
692
|
"INVALID_MESSAGE_SEQUENCE",
|
|
@@ -725,7 +725,7 @@
|
|
|
725
725
|
]
|
|
726
726
|
}
|
|
727
727
|
],
|
|
728
|
-
"hash": "
|
|
728
|
+
"hash": "d7f7f3c7c7d729f5aa1d4937487ca8261f605f12cc5997d16bef44e75744b6af",
|
|
729
729
|
"tokens": 557
|
|
730
730
|
},
|
|
731
731
|
"routedIndex": {
|
|
@@ -2075,7 +2075,7 @@
|
|
|
2075
2075
|
"routed": false,
|
|
2076
2076
|
"aliases": [],
|
|
2077
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>` — recent updates, read state and owner engagement, as observations for the decision above.\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.",
|
|
2078
|
-
"hash": "
|
|
2078
|
+
"hash": "40c0d007ce0780e3e7791824ad759063bbe24a8579ff97ff8535c86e3f57117f",
|
|
2079
2079
|
"tokens": 1359,
|
|
2080
2080
|
"sections": [
|
|
2081
2081
|
{
|
|
@@ -2100,7 +2100,7 @@
|
|
|
2100
2100
|
"id": "parts",
|
|
2101
2101
|
"title": "Multi-part updates: --part",
|
|
2102
2102
|
"readWhen": "one update needs more than one message, or a send answered with a sequence halt",
|
|
2103
|
-
"tokens":
|
|
2103
|
+
"tokens": 540,
|
|
2104
2104
|
"aliases": [],
|
|
2105
2105
|
"explains": [
|
|
2106
2106
|
"INVALID_MESSAGE_SEQUENCE",
|
|
@@ -8355,7 +8355,7 @@
|
|
|
8355
8355
|
"id": "parts",
|
|
8356
8356
|
"title": "Multi-part updates: --part",
|
|
8357
8357
|
"readWhen": "one update needs more than one message, or a send answered with a sequence halt",
|
|
8358
|
-
"tokens":
|
|
8358
|
+
"tokens": 540,
|
|
8359
8359
|
"aliases": [],
|
|
8360
8360
|
"explains": [
|
|
8361
8361
|
"INVALID_MESSAGE_SEQUENCE",
|
|
@@ -8406,9 +8406,9 @@
|
|
|
8406
8406
|
"INVALID_MESSAGE_SEQUENCE",
|
|
8407
8407
|
"sequence_invalid"
|
|
8408
8408
|
],
|
|
8409
|
-
"body": "Read this when one update needs more than one message, or a send answered with a sequence `halt`.\n\n`--part \"<next thought>\"` appends a following message; repeat it for each later\npart. Under the card's ordering rule, here is what the send builds and reports.\n\n- One sequence holds at most 20 parts — the first text plus each `--part`, in order.\n- The server records `{id, index, count}` on every part; `id` is the sequence’s shared key.\n- Part N’s idempotency key is the base key plus `:part:<N>`; a base key that would overflow the 240-character bound keeps a digest trailer instead.\n\n```bash\nskrr agent message send --agent <agent-id> --kind milestone \\\n --idempotency-key \"<task-id>:launch-recap\" \\\n --text \"...\" --part \"...\" --part \"...\"\n```\n\n`--json` reports the sequence as `{sequenceId, parts[], halt?}`; `halt` names\nwhere and why the tail stopped. `ok` is `true` only when every part was sent, so\na sequence whose first part was held answers `ok: false` with `halt` and still\nexits `0` while the platform owns the outcome — branch on `halt` and each part's\nstatus, not on `ok` alone. `ownerInterjected` means the owner replied\nmid-send — the part still delivered, and the tail stopped for the same ordering\nreason. `--no-message-lint` silences the advisory the command prints when one\nlong text may read better as parts.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `INVALID_MESSAGE_SEQUENCE` | `--part` without an explicit `--idempotency-key`, a sequence over the bound, or `--part` on `agent_email` | Give the key, shorten the sequence, or drop the flag |\n| `sequence_invalid` | The server could not parse the sequence `{id, index, count}` | Resend through the CLI; it owns that field |",
|
|
8410
|
-
"hash": "
|
|
8411
|
-
"tokens":
|
|
8409
|
+
"body": "Read this when one update needs more than one message, or a send answered with a sequence `halt`.\n\n`--part \"<next thought>\"` appends a following message; repeat it for each later\npart. Under the card's ordering rule, here is what the send builds and reports.\n\n- One sequence holds at most 20 parts — the first text plus each `--part`, in order.\n- The server records `{id, index, count}` on every part; `id` is the sequence’s shared key.\n- Part N’s idempotency key is the base key plus `:part:<N>`; a base key that would overflow the 240-character bound keeps a digest trailer instead.\n\n```bash\nskrr agent message send --agent <agent-id> --kind milestone \\\n --idempotency-key \"<task-id>:launch-recap\" \\\n --text \"...\" --part \"...\" --part \"...\"\n```\n\n`--json` reports the sequence as `{sequenceId, parts[], halt?}`; `halt` names\nwhere and why the tail stopped. `ok` is `true` only when every part was sent, so\na sequence whose first part was held answers `ok: false` with `halt` and still\nexits `0` while the platform owns the outcome — branch on `halt` and each part's\nstatus, not on `ok` alone. `ownerInterjected` means the owner replied\nmid-send — the part still delivered, and the tail stopped for the same ordering\nreason. `--no-message-lint` silences the advisory the command prints when one\nlong text may read better as parts.\n\n## Refusals\n\n| Code | Cause | Fix |\n| --- | --- | --- |\n| `INVALID_MESSAGE_SEQUENCE` | `--part` without an explicit `--idempotency-key`, a sequence over the bound, or `--part` on `agent_email` | Give the key, shorten the sequence, or drop the flag |\n| `sequence_invalid` | The server could not parse the sequence `{id, index, count}` | Resend through the CLI; it owns that field |\n| `owner_replied` | The owner replied before this part was delivered. It is refused (HTTP 409, `retryable: false`) and reported as an error with exit `1`, not as `halt`; `error.details.partialSequence` names the parts already delivered and how many were never attempted | Read their reply first. Do not resend the tail: it may no longer be the right thing to say |",
|
|
8410
|
+
"hash": "dde30f37c6d65668028054470464bff286a28bc78245c56e0be8ffdb21dad66c",
|
|
8411
|
+
"tokens": 540,
|
|
8412
8412
|
"sections": [
|
|
8413
8413
|
{
|
|
8414
8414
|
"id": "writing",
|
|
@@ -8432,7 +8432,7 @@
|
|
|
8432
8432
|
"id": "parts",
|
|
8433
8433
|
"title": "Multi-part updates: --part",
|
|
8434
8434
|
"readWhen": "one update needs more than one message, or a send answered with a sequence halt",
|
|
8435
|
-
"tokens":
|
|
8435
|
+
"tokens": 540,
|
|
8436
8436
|
"aliases": [],
|
|
8437
8437
|
"explains": [
|
|
8438
8438
|
"INVALID_MESSAGE_SEQUENCE",
|
|
@@ -8508,7 +8508,7 @@
|
|
|
8508
8508
|
"id": "parts",
|
|
8509
8509
|
"title": "Multi-part updates: --part",
|
|
8510
8510
|
"readWhen": "one update needs more than one message, or a send answered with a sequence halt",
|
|
8511
|
-
"tokens":
|
|
8511
|
+
"tokens": 540,
|
|
8512
8512
|
"aliases": [],
|
|
8513
8513
|
"explains": [
|
|
8514
8514
|
"INVALID_MESSAGE_SEQUENCE",
|
|
@@ -8593,7 +8593,7 @@
|
|
|
8593
8593
|
"id": "parts",
|
|
8594
8594
|
"title": "Multi-part updates: --part",
|
|
8595
8595
|
"readWhen": "one update needs more than one message, or a send answered with a sequence halt",
|
|
8596
|
-
"tokens":
|
|
8596
|
+
"tokens": 540,
|
|
8597
8597
|
"aliases": [],
|
|
8598
8598
|
"explains": [
|
|
8599
8599
|
"INVALID_MESSAGE_SEQUENCE",
|
package/dist/lib/apps-command.js
CHANGED
|
@@ -155,6 +155,20 @@ class AppsCommand extends base_command_1.BaseCommand {
|
|
|
155
155
|
details: refusal.retryAfterMs === undefined ? {} : { retryAfterMs: refusal.retryAfterMs },
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
+
if (refusal && (0, apps_1.isAssetQuotaRefusal)(refusal)) {
|
|
159
|
+
// the account holds as many uploaded images and fonts as it may: nothing turns it by itself, so not retryable now (the words say what frees space)
|
|
160
|
+
return this.failWithCliError({
|
|
161
|
+
message: (0, apps_1.describeAppsRefusal)(refusal, this.config.bin),
|
|
162
|
+
code: apps_1.APP_ASSET_QUOTA_CODE,
|
|
163
|
+
...(refusal.status === undefined ? {} : { status: refusal.status }),
|
|
164
|
+
exit: 1,
|
|
165
|
+
retryable: false,
|
|
166
|
+
details: {
|
|
167
|
+
...(refusal.heldBytes === undefined ? {} : { heldBytes: refusal.heldBytes }),
|
|
168
|
+
...(refusal.capBytes === undefined ? {} : { capBytes: refusal.capBytes }),
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
}
|
|
158
172
|
if (refusal && refusal.error && apps_1.APPS_REFUSAL_CODES[refusal.error]) {
|
|
159
173
|
return this.failWithCliError({
|
|
160
174
|
message: (0, apps_1.describeAppsRefusal)(refusal, this.config.bin),
|
package/dist/lib/apps.d.ts
CHANGED
|
@@ -23,6 +23,9 @@ export interface AppsRefusal {
|
|
|
23
23
|
reason?: string;
|
|
24
24
|
/** On a `rate`: how long until the allowance turns, in milliseconds (the upload door's daily allowance of new bytes). */
|
|
25
25
|
retryAfterMs?: number;
|
|
26
|
+
/** On a `limit` whose `reason` is `asset_quota`: what the account holds in uploaded images and fonts, and the most it may hold. */
|
|
27
|
+
heldBytes?: number;
|
|
28
|
+
capBytes?: number;
|
|
26
29
|
docCount?: number;
|
|
27
30
|
installationId?: string;
|
|
28
31
|
current?: {
|
|
@@ -49,6 +52,16 @@ export declare const APPS_REFUSAL_CODES: Record<string, string>;
|
|
|
49
52
|
export declare const APP_UPLOAD_BUDGET_REASON = "upload_budget";
|
|
50
53
|
export declare const APP_UPLOAD_BUDGET_CODE = "APP_UPLOAD_BUDGET";
|
|
51
54
|
export declare function isUploadBudgetRefusal(refusal: AppsRefusal): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* The account holds as many uploaded images and fonts as it may (`apps push`). The server says it as a `limit` refusal whose `reason`
|
|
57
|
+
* is this (the draft's own 2 MiB is a `limit` without it). Its own machine code because the answer is different from the daily
|
|
58
|
+
* allowance's: there is no wait that turns it, only freeing space, which the server does for files no draft or version of the
|
|
59
|
+
* account's names any more, after 24 hours, when the account is next at its cap. So it is not retryable now. The reason is the
|
|
60
|
+
* API's own literal (`Apps/AppAuthoring/assetHolds.js`); a spec in the API reads this file to hold the two together.
|
|
61
|
+
*/
|
|
62
|
+
export declare const APP_ASSET_QUOTA_REASON = "asset_quota";
|
|
63
|
+
export declare const APP_ASSET_QUOTA_CODE = "APP_ASSET_QUOTA";
|
|
64
|
+
export declare function isAssetQuotaRefusal(refusal: AppsRefusal): boolean;
|
|
52
65
|
/** The words for a refusal: what it was, the revision to retry from, each problem, what to do. */
|
|
53
66
|
export declare function describeAppsRefusal(refusal: AppsRefusal, bin: string): string;
|
|
54
67
|
/** A table row of the apps a person can edit. */
|
package/dist/lib/apps.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.APP_UPLOAD_BUDGET_CODE = exports.APP_UPLOAD_BUDGET_REASON = exports.APPS_REFUSAL_CODES = exports.AppRefError = void 0;
|
|
3
|
+
exports.APP_ASSET_QUOTA_CODE = exports.APP_ASSET_QUOTA_REASON = exports.APP_UPLOAD_BUDGET_CODE = exports.APP_UPLOAD_BUDGET_REASON = exports.APPS_REFUSAL_CODES = exports.AppRefError = void 0;
|
|
4
4
|
exports.resolveAppRef = resolveAppRef;
|
|
5
5
|
exports.readAppsRefusal = readAppsRefusal;
|
|
6
6
|
exports.isUploadBudgetRefusal = isUploadBudgetRefusal;
|
|
7
|
+
exports.isAssetQuotaRefusal = isAssetQuotaRefusal;
|
|
7
8
|
exports.describeAppsRefusal = describeAppsRefusal;
|
|
8
9
|
exports.formatAppRow = formatAppRow;
|
|
9
10
|
exports.formatEntryLine = formatEntryLine;
|
|
@@ -76,6 +77,12 @@ function readAppsRefusal(error) {
|
|
|
76
77
|
...(typeof body.retryAfterMs === 'number' && Number.isFinite(body.retryAfterMs)
|
|
77
78
|
? { retryAfterMs: body.retryAfterMs }
|
|
78
79
|
: {}),
|
|
80
|
+
...(typeof body.heldBytes === 'number' && Number.isFinite(body.heldBytes)
|
|
81
|
+
? { heldBytes: body.heldBytes }
|
|
82
|
+
: {}),
|
|
83
|
+
...(typeof body.capBytes === 'number' && Number.isFinite(body.capBytes)
|
|
84
|
+
? { capBytes: body.capBytes }
|
|
85
|
+
: {}),
|
|
79
86
|
...(typeof body.docCount === 'number' ? { docCount: body.docCount } : {}),
|
|
80
87
|
...(typeof body.installationId === 'string' ? { installationId: body.installationId } : {}),
|
|
81
88
|
...(body.current && typeof body.current === 'object'
|
|
@@ -117,6 +124,27 @@ exports.APP_UPLOAD_BUDGET_CODE = 'APP_UPLOAD_BUDGET';
|
|
|
117
124
|
function isUploadBudgetRefusal(refusal) {
|
|
118
125
|
return refusal.error === 'rate' && refusal.reason === exports.APP_UPLOAD_BUDGET_REASON;
|
|
119
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* The account holds as many uploaded images and fonts as it may (`apps push`). The server says it as a `limit` refusal whose `reason`
|
|
129
|
+
* is this (the draft's own 2 MiB is a `limit` without it). Its own machine code because the answer is different from the daily
|
|
130
|
+
* allowance's: there is no wait that turns it, only freeing space, which the server does for files no draft or version of the
|
|
131
|
+
* account's names any more, after 24 hours, when the account is next at its cap. So it is not retryable now. The reason is the
|
|
132
|
+
* API's own literal (`Apps/AppAuthoring/assetHolds.js`); a spec in the API reads this file to hold the two together.
|
|
133
|
+
*/
|
|
134
|
+
exports.APP_ASSET_QUOTA_REASON = 'asset_quota';
|
|
135
|
+
exports.APP_ASSET_QUOTA_CODE = 'APP_ASSET_QUOTA';
|
|
136
|
+
function isAssetQuotaRefusal(refusal) {
|
|
137
|
+
return refusal.error === 'limit' && refusal.reason === exports.APP_ASSET_QUOTA_REASON;
|
|
138
|
+
}
|
|
139
|
+
/** A size as a person says it: "256 MiB", "1.5 MiB", "12 KiB". Rounds a size under a MiB up, so it is never smaller than it is. */
|
|
140
|
+
function describeBytes(bytes) {
|
|
141
|
+
const mib = 1024 * 1024;
|
|
142
|
+
if (bytes >= mib) {
|
|
143
|
+
const value = bytes / mib;
|
|
144
|
+
return `${Number.isInteger(value) ? value : value.toFixed(1)} MiB`;
|
|
145
|
+
}
|
|
146
|
+
return `${Math.max(1, Math.ceil(bytes / 1024))} KiB`;
|
|
147
|
+
}
|
|
120
148
|
/** A wait as a person says it: "5 minutes", "7 hours". Rounds up, so it is never shorter than the wait. */
|
|
121
149
|
function describeWait(ms) {
|
|
122
150
|
const minutes = Math.max(1, Math.ceil(ms / 60_000));
|
|
@@ -141,6 +169,12 @@ function describeAppsRefusal(refusal, bin) {
|
|
|
141
169
|
if (isUploadBudgetRefusal(refusal)) {
|
|
142
170
|
lines.push(`→ ${refusal.retryAfterMs === undefined ? 'Try again later' : `Try again in about ${describeWait(refusal.retryAfterMs)}`}. Files already sent stay in the draft: read its revision again (\`${bin} apps file ls <app>\` shows \`rev\`) and run the push again, and it sends only what the draft does not hold.`);
|
|
143
171
|
}
|
|
172
|
+
if (isAssetQuotaRefusal(refusal)) {
|
|
173
|
+
const held = refusal.heldBytes !== undefined && refusal.capBytes !== undefined
|
|
174
|
+
? ` (${describeBytes(refusal.heldBytes)} of ${describeBytes(refusal.capBytes)})`
|
|
175
|
+
: '';
|
|
176
|
+
lines.push(`→ This is the account's total${held}, not a wait: nothing turns it by itself. A file is released when no draft or version of your apps names it (after 24 hours, the next time the account is at its cap), so remove the images and fonts you no longer use with \`${bin} apps file rm <app> <path>\` and push again. Files already sent stay in the draft: read its revision again (\`${bin} apps file ls <app>\` shows \`rev\`) and run the push again, and it sends only what the draft does not hold.`);
|
|
177
|
+
}
|
|
144
178
|
for (const problem of (refusal.problems ?? []).slice(0, 10)) {
|
|
145
179
|
lines.push(` - ${problem.path ? `${problem.path}: ` : ''}${problem.message}`);
|
|
146
180
|
}
|
|
@@ -37,6 +37,9 @@ export declare const USAGE_OVERVIEW_TOKEN_BUDGET = 240;
|
|
|
37
37
|
* `instructions` (version-pinned blocks for local CLAUDE.md / AGENTS.md), aimed at another target. The overview
|
|
38
38
|
* read 245 once `skrr guide` joined it, and `guide` stays a line of its own because it is where every operation
|
|
39
39
|
* guide is read.
|
|
40
|
+
* `activity` (what an agent, a duty or a chat did, linked to its source) is the read side of what the `worklog` domain
|
|
41
|
+
* writes, and is the topic that took the overview to 241. Folded there, `skrr usage activity` resolves to the
|
|
42
|
+
* `worklog` pages, which name it in `Includes:`; every `skrr activity ...` command keeps its id.
|
|
40
43
|
*/
|
|
41
44
|
export declare const USAGE_DOMAIN_FOLDS: Readonly<Record<string, string>>;
|
|
42
45
|
export declare const USAGE_DOMAIN_TOKEN_BUDGET = 500;
|
|
@@ -50,11 +50,15 @@ exports.USAGE_OVERVIEW_TOKEN_BUDGET = 240;
|
|
|
50
50
|
* `instructions` (version-pinned blocks for local CLAUDE.md / AGENTS.md), aimed at another target. The overview
|
|
51
51
|
* read 245 once `skrr guide` joined it, and `guide` stays a line of its own because it is where every operation
|
|
52
52
|
* guide is read.
|
|
53
|
+
* `activity` (what an agent, a duty or a chat did, linked to its source) is the read side of what the `worklog` domain
|
|
54
|
+
* writes, and is the topic that took the overview to 241. Folded there, `skrr usage activity` resolves to the
|
|
55
|
+
* `worklog` pages, which name it in `Includes:`; every `skrr activity ...` command keeps its id.
|
|
53
56
|
*/
|
|
54
57
|
exports.USAGE_DOMAIN_FOLDS = {
|
|
55
58
|
proposals: 'inbox',
|
|
56
59
|
apps: 'widgets',
|
|
57
60
|
'instruction-blocks': 'instructions',
|
|
61
|
+
activity: 'worklog',
|
|
58
62
|
};
|
|
59
63
|
exports.USAGE_DOMAIN_TOKEN_BUDGET = 500;
|
|
60
64
|
const GENERIC_FLAGS = new Set(['bare', 'help', 'json', 'token', 'workspace']);
|
package/oclif.manifest.json
CHANGED
|
@@ -147027,5 +147027,5 @@
|
|
|
147027
147027
|
]
|
|
147028
147028
|
}
|
|
147029
147029
|
},
|
|
147030
|
-
"version": "0.1.
|
|
147030
|
+
"version": "0.1.160"
|
|
147031
147031
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skrr-ai/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.160",
|
|
4
4
|
"description": "Command-line interface for skrr",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "skrr",
|
|
@@ -690,5 +690,5 @@
|
|
|
690
690
|
"engines": {
|
|
691
691
|
"node": ">=20.0.0"
|
|
692
692
|
},
|
|
693
|
-
"gitHead": "
|
|
693
|
+
"gitHead": "5f7e6ef570a35154d6001a82b2d10a729e1025bb"
|
|
694
694
|
}
|