@skrr-ai/cli 0.1.21 → 0.1.23
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/README.md +83 -73
- package/bin/dev-fallback.js +221 -0
- package/bin/run.js +43 -0
- package/dist/base-command.d.ts +15 -0
- package/dist/base-command.js +71 -10
- package/dist/commands/agents/attach-harness.d.ts +37 -0
- package/dist/commands/agents/attach-harness.js +102 -3
- package/dist/commands/agents/chat.d.ts +69 -1
- package/dist/commands/agents/chat.js +202 -22
- package/dist/commands/agents/create.d.ts +38 -0
- package/dist/commands/agents/create.js +95 -2
- package/dist/commands/agents/schedule-trace.js +11 -0
- package/dist/commands/agents/show.js +29 -1
- package/dist/commands/api-keys/create.d.ts +24 -0
- package/dist/commands/api-keys/create.js +80 -0
- package/dist/commands/api-keys/list.d.ts +11 -0
- package/dist/commands/api-keys/list.js +42 -0
- package/dist/commands/api-keys/revoke.d.ts +14 -0
- package/dist/commands/api-keys/revoke.js +33 -0
- package/dist/commands/api-keys/rotate.d.ts +19 -0
- package/dist/commands/api-keys/rotate.js +42 -0
- package/dist/commands/balance/index.d.ts +18 -0
- package/dist/commands/balance/index.js +29 -0
- package/dist/commands/balance/show.d.ts +25 -0
- package/dist/commands/balance/show.js +60 -0
- package/dist/commands/balance/statement.d.ts +19 -0
- package/dist/commands/balance/statement.js +52 -0
- package/dist/commands/browser/doctor.d.ts +11 -0
- package/dist/commands/browser/doctor.js +11 -0
- package/dist/commands/code/jobs/approve.d.ts +25 -0
- package/dist/commands/code/jobs/approve.js +52 -0
- package/dist/commands/code/jobs/cancel.d.ts +12 -0
- package/dist/commands/code/jobs/cancel.js +39 -0
- package/dist/commands/code/jobs/index.d.ts +19 -0
- package/dist/commands/code/jobs/index.js +38 -0
- package/dist/commands/code/jobs/list.d.ts +12 -0
- package/dist/commands/code/jobs/list.js +87 -0
- package/dist/commands/code/jobs/run.d.ts +32 -0
- package/dist/commands/code/jobs/run.js +151 -0
- package/dist/commands/code/jobs/show.d.ts +12 -0
- package/dist/commands/code/jobs/show.js +86 -0
- package/dist/commands/commitments/create.d.ts +1 -0
- package/dist/commands/commitments/create.js +19 -5
- package/dist/commands/commitments/preflight.js +18 -4
- package/dist/commands/commitments/receipt-metrics.d.ts +39 -0
- package/dist/commands/commitments/receipt-metrics.js +78 -0
- package/dist/commands/convos/search.js +5 -5
- package/dist/commands/harnesses/leases/list.d.ts +3 -0
- package/dist/commands/harnesses/leases/list.js +59 -12
- package/dist/commands/harnesses/leases/show.js +36 -0
- package/dist/commands/harnesses/list.d.ts +18 -0
- package/dist/commands/harnesses/list.js +30 -0
- package/dist/commands/harnesses/products.js +48 -3
- package/dist/commands/harnesses/quota.d.ts +16 -0
- package/dist/commands/harnesses/quota.js +26 -1
- package/dist/commands/harnesses/usage.js +17 -0
- package/dist/commands/inbox/index.d.ts +2 -1
- package/dist/commands/inbox/index.js +27 -4
- package/dist/commands/login.js +4 -1
- package/dist/commands/machines/list.d.ts +1 -0
- package/dist/commands/machines/list.js +33 -5
- package/dist/commands/memory/approvals/issue.d.ts +18 -0
- package/dist/commands/memory/approvals/issue.js +63 -0
- package/dist/commands/memory/commit.js +5 -2
- package/dist/commands/memory/context.d.ts +3 -2
- package/dist/commands/memory/context.js +9 -11
- package/dist/commands/memory/delete.d.ts +1 -1
- package/dist/commands/memory/list.d.ts +1 -1
- package/dist/commands/memory/list.js +1 -1
- package/dist/commands/memory/mounts/resolve.d.ts +10 -0
- package/dist/commands/memory/mounts/resolve.js +27 -0
- package/dist/commands/memory/proposals/commit.d.ts +18 -0
- package/dist/commands/memory/proposals/commit.js +32 -0
- package/dist/commands/memory/proposals/create.d.ts +18 -0
- package/dist/commands/memory/proposals/create.js +56 -0
- package/dist/commands/memory/proposals/list.d.ts +13 -0
- package/dist/commands/memory/proposals/list.js +31 -0
- package/dist/commands/memory/proposals/promote.d.ts +22 -0
- package/dist/commands/memory/proposals/promote.js +33 -0
- package/dist/commands/memory/proposals/reject.d.ts +16 -0
- package/dist/commands/memory/proposals/reject.js +28 -0
- package/dist/commands/memory/rebuild-index.d.ts +20 -0
- package/dist/commands/memory/rebuild-index.js +25 -0
- package/dist/commands/memory/save.d.ts +1 -1
- package/dist/commands/memory/save.js +1 -1
- package/dist/commands/memory/search.d.ts +6 -3
- package/dist/commands/memory/search.js +27 -3
- package/dist/commands/memory/show.d.ts +1 -1
- package/dist/commands/memory/stores/archive.d.ts +14 -0
- package/dist/commands/memory/stores/archive.js +31 -0
- package/dist/commands/memory/stores/create.d.ts +12 -0
- package/dist/commands/memory/stores/create.js +30 -0
- package/dist/commands/memory/stores/delete.d.ts +15 -0
- package/dist/commands/memory/stores/delete.js +38 -0
- package/dist/commands/memory/stores/list.d.ts +10 -0
- package/dist/commands/memory/stores/list.js +29 -0
- package/dist/commands/memory/stores/show.d.ts +12 -0
- package/dist/commands/memory/stores/show.js +14 -0
- package/dist/commands/memory/stores/update.d.ts +15 -0
- package/dist/commands/memory/stores/update.js +39 -0
- package/dist/commands/memory/sync/delete.d.ts +13 -0
- package/dist/commands/memory/sync/delete.js +35 -0
- package/dist/commands/memory/sync/pull.d.ts +19 -0
- package/dist/commands/memory/sync/pull.js +52 -0
- package/dist/commands/memory/sync/push.d.ts +18 -0
- package/dist/commands/memory/sync/push.js +115 -0
- package/dist/commands/memory/sync/resolve.d.ts +23 -0
- package/dist/commands/memory/sync/resolve.js +27 -0
- package/dist/commands/memory/sync/status.d.ts +9 -0
- package/dist/commands/memory/sync/status.js +22 -0
- package/dist/commands/memory/topics/archive.d.ts +20 -0
- package/dist/commands/memory/topics/archive.js +29 -0
- package/dist/commands/memory/topics/create.d.ts +23 -0
- package/dist/commands/memory/topics/create.js +46 -0
- package/dist/commands/memory/topics/delete.d.ts +22 -0
- package/dist/commands/memory/topics/delete.js +30 -0
- package/dist/commands/memory/topics/forget.d.ts +22 -0
- package/dist/commands/memory/topics/forget.js +29 -0
- package/dist/commands/memory/topics/list.d.ts +13 -0
- package/dist/commands/memory/topics/list.js +22 -0
- package/dist/commands/memory/topics/move.d.ts +22 -0
- package/dist/commands/memory/topics/move.js +26 -0
- package/dist/commands/memory/topics/show.d.ts +17 -0
- package/dist/commands/memory/topics/show.js +21 -0
- package/dist/commands/memory/topics/update.d.ts +23 -0
- package/dist/commands/memory/topics/update.js +27 -0
- package/dist/commands/memory/tree.d.ts +5 -2
- package/dist/commands/memory/tree.js +20 -2
- package/dist/commands/memory/update.d.ts +1 -1
- package/dist/commands/memory/versions/list.d.ts +16 -0
- package/dist/commands/memory/versions/list.js +22 -0
- package/dist/commands/memory/versions/redact.d.ts +21 -0
- package/dist/commands/memory/versions/redact.js +22 -0
- package/dist/commands/memory/versions/restore.d.ts +20 -0
- package/dist/commands/memory/versions/restore.js +16 -0
- package/dist/commands/memory/versions/show.d.ts +15 -0
- package/dist/commands/memory/versions/show.js +17 -0
- package/dist/commands/messages/list.js +25 -8
- package/dist/commands/messages/show.js +10 -0
- package/dist/commands/store/install.js +5 -1
- package/dist/commands/store/releases.js +1 -1
- package/dist/commands/store/update.js +5 -1
- package/dist/commands/subscriptions/cancel.js +5 -1
- package/dist/commands/subscriptions/health.js +5 -1
- package/dist/commands/subscriptions/status.js +5 -1
- package/dist/commands/subscriptions/subscribe.js +5 -1
- package/dist/commands/tasks/activity.d.ts +2 -3
- package/dist/commands/tasks/activity.js +15 -5
- package/dist/commands/tasks/complete.d.ts +18 -150
- package/dist/commands/tasks/complete.js +161 -600
- package/dist/commands/tasks/create.d.ts +5 -0
- package/dist/commands/tasks/create.js +107 -4
- package/dist/commands/tasks/deliverable/add.d.ts +8 -0
- package/dist/commands/tasks/deliverable/add.js +41 -8
- package/dist/commands/tasks/deliverable/confirm.d.ts +5 -5
- package/dist/commands/tasks/deliverable/confirm.js +9 -18
- package/dist/commands/tasks/deliverable/list.d.ts +12 -0
- package/dist/commands/tasks/deliverable/list.js +37 -0
- package/dist/commands/tasks/events/append.d.ts +2 -0
- package/dist/commands/tasks/events/append.js +11 -4
- package/dist/commands/tasks/events/list.d.ts +1 -0
- package/dist/commands/tasks/events/list.js +1 -0
- package/dist/commands/tasks/events/tail.d.ts +1 -0
- package/dist/commands/tasks/events/tail.js +1 -0
- package/dist/commands/tasks/expectations/assess.d.ts +21 -0
- package/dist/commands/tasks/expectations/assess.js +77 -0
- package/dist/commands/tasks/expectations.js +14 -18
- package/dist/commands/tasks/judge.d.ts +1 -0
- package/dist/commands/tasks/judge.js +2 -1
- package/dist/commands/tasks/output.d.ts +2 -11
- package/dist/commands/tasks/output.js +64 -145
- package/dist/commands/tasks/report.d.ts +3 -3
- package/dist/commands/tasks/report.js +64 -41
- package/dist/commands/tasks/resource/add.d.ts +23 -0
- package/dist/commands/tasks/resource/add.js +76 -0
- package/dist/commands/tasks/resource/list.d.ts +13 -0
- package/dist/commands/tasks/resource/list.js +41 -0
- package/dist/commands/tasks/result/show.d.ts +13 -0
- package/dist/commands/tasks/result/show.js +46 -0
- package/dist/commands/tasks/result/submit.d.ts +26 -0
- package/dist/commands/tasks/result/submit.js +134 -0
- package/dist/commands/tasks/resume/save.d.ts +16 -0
- package/dist/commands/tasks/resume/save.js +59 -0
- package/dist/commands/tasks/resume/show.d.ts +13 -0
- package/dist/commands/tasks/resume/show.js +35 -0
- package/dist/commands/tasks/review.d.ts +17 -0
- package/dist/commands/tasks/review.js +54 -0
- package/dist/commands/tasks/runs.js +5 -0
- package/dist/commands/tasks/timeline.d.ts +2 -2
- package/dist/commands/tasks/timeline.js +10 -23
- package/dist/commands/tasks/updates/add.d.ts +22 -0
- package/dist/commands/tasks/updates/add.js +101 -0
- package/dist/commands/tasks/updates/list.d.ts +15 -0
- package/dist/commands/tasks/updates/list.js +57 -0
- package/dist/commands/tasks/waive.d.ts +1 -0
- package/dist/commands/tasks/waive.js +2 -1
- package/dist/lib/agentic-stream.d.ts +257 -0
- package/dist/lib/agentic-stream.js +490 -33
- package/dist/lib/balance.d.ts +8 -0
- package/dist/lib/commitment-product.d.ts +10 -1
- package/dist/lib/commitment-product.js +66 -2
- package/dist/lib/commitments.d.ts +4 -1
- package/dist/lib/commitments.js +32 -1
- package/dist/lib/conversation-search.d.ts +3 -0
- package/dist/lib/conversation-search.js +75 -0
- package/dist/lib/execution-target.d.ts +21 -0
- package/dist/lib/execution-target.js +22 -6
- package/dist/lib/harnesses.d.ts +82 -6
- package/dist/lib/harnesses.js +30 -2
- package/dist/lib/hosted-machines.js +9 -0
- package/dist/lib/inbox.d.ts +2 -1
- package/dist/lib/machines.d.ts +17 -0
- package/dist/lib/machines.js +29 -0
- package/dist/lib/managed-agent-keys.d.ts +104 -0
- package/dist/lib/managed-agent-keys.js +50 -0
- package/dist/lib/memory-scope.d.ts +4 -3
- package/dist/lib/memory-scope.js +9 -9
- package/dist/lib/memory-sync.d.ts +114 -0
- package/dist/lib/memory-sync.js +730 -0
- package/dist/lib/message-provenance.d.ts +42 -0
- package/dist/lib/message-provenance.js +89 -0
- package/dist/lib/scoped-memory-command.d.ts +68 -0
- package/dist/lib/scoped-memory-command.js +183 -0
- package/dist/lib/session-task-endpoints.d.ts +1 -1
- package/dist/lib/session-task-endpoints.js +7 -0
- package/dist/lib/sky-code-broker.d.ts +47 -0
- package/dist/lib/sky-code-broker.js +50 -0
- package/dist/lib/sky-code-doctor.js +10 -1
- package/dist/lib/task-artifact-flags.d.ts +2 -0
- package/dist/lib/task-artifact-flags.js +7 -0
- package/dist/lib/task-execution.d.ts +4 -5
- package/dist/lib/task-execution.js +4 -5
- package/dist/lib/task-extras.d.ts +1 -5
- package/dist/lib/task-extras.js +1 -5
- package/dist/lib/task-transcript.d.ts +5 -7
- package/dist/lib/task-transcript.js +8 -16
- package/dist/lib/tasks.d.ts +7 -21
- package/dist/lib/tasks.js +17 -20
- package/dist/lib/triggers.d.ts +39 -1
- package/dist/lib/triggers.js +70 -2
- package/dist/lib/usage-discovery.d.ts +17 -1
- package/dist/lib/usage-discovery.js +17 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +3733 -3618
- package/oclif.manifest.json +25726 -19886
- package/package.json +26 -5
package/README.md
CHANGED
|
@@ -12,50 +12,54 @@ observability), and shared links.
|
|
|
12
12
|
|
|
13
13
|
### Command Catalog
|
|
14
14
|
|
|
15
|
-
| Topic | Commands
|
|
16
|
-
| ------------------------------------- |
|
|
17
|
-
| **auth** | `login`, `logout`, `whoami`
|
|
18
|
-
| **convos** | `list` (`--agent`, `--search`, `--tag`, `--archived`, `--order`), `show`, `update`, `delete`, `archive`, `unarchive`, `fork`, `duplicate`, `import`
|
|
19
|
-
| **messages** | `list` (`--limit`, `--head`), `show`, `update`, `update-content`, `feedback`, `edit-artifact`
|
|
20
|
-
| **agent call** | `request`, `show`, `cancel` — autonomous Agent → owner app voice-call invites; the owner must accept before a LiveKit call starts
|
|
21
|
-
| **shares** (conversation share links) | `list`, `get`, `link-for`, `create`, `update`, `delete`
|
|
22
|
-
| **agents** | `list`, `show`, `overview`, `chat`, `create`, `update`, `attach-harness`, `delete`, `duplicate`, `revert`, `versions`, `visibility`, `schedule`, `upcoming`, `plan-day`, `reflect`, `schedule-overview`, `activity`
|
|
23
|
-
| **agents triggers** | `list`, `create`, `show`, `update`, `enable`, `disable`, `fire`, `delete`, `runs`, `replay`, `policy` (agent-scoped facade over the universal trigger engine)
|
|
24
|
-
| **agents todos** | `list`, `create`, `cancel` (the day-plan feed; Smart Schedule = `agents plan-day`)
|
|
25
|
-
| **agent-groups** | `list`, `show`, `create`, `update`, `delete`, `add`, `remove`
|
|
26
|
-
| **agent-shares** | `received`, `sent`, `with`, `list-for`, `create`, `accept`, `decline`, `revoke`, `leave`
|
|
27
|
-
| **triggers** | `list`, `show`, `create`, `update`, `delete`, `enable`, `disable`, `fire`, `fire-detail`, `replay`, `audit`, `capabilities`, `event-catalog`, `parse-intent`, `rotate-secret`
|
|
28
|
-
| **spaces** | `list`, `show`, `create`, `update`, `delete`, `archive`, `unarchive`, `tasks`, `conversations`, `snapshot`, `goals`, `revisions`, `subspaces`, `move`, `reorder`, `pin`, `summary`, `bootstrap`, `capacity`, `auto-executor update/preview/run`
|
|
29
|
-
| **spaces members** | `list`, `search`, `add`, `remove`
|
|
30
|
-
| **spaces briefs** | `list`, `get`, `set`, `delete`
|
|
31
|
-
| **spaces files** | `list`, `upload`, `rename`, `move`, `delete`, `folders list/create/update/delete`
|
|
32
|
-
| **spaces actions** | `list`, `add`, `update`, `delete`, `replace`
|
|
33
|
-
| **spaces views** | `list`, `create`, `update`, `delete`, `duplicate`, `reorder`
|
|
34
|
-
| **spaces live** | `scene`, `cards list/create/update/delete/reorder`
|
|
35
|
-
| **spaces preferences** | `show`, `tabs`
|
|
36
|
-
| **spaces heartbeats** | `list`, `create`, `update`, `delete`, `status`
|
|
37
|
-
| **spaces triggers** | `show`, `set`, `delete`
|
|
38
|
-
| **spaces widgets** | `list`, `add`, `remove`
|
|
39
|
-
| **spaces skills** | `list`, `add`, `remove`, `pin`
|
|
40
|
-
| **spaces labels** | `list`, `add`, `remove` (attach/detach; filter with `spaces list --label`)
|
|
41
|
-
| **labels** | `list`, `palette`, `create`, `update`, `archive`, `restore`, `delete`, `reorder` (unified labels across `user`, `space`, and `workspace` scopes)
|
|
42
|
-
| **chats triggers** | `show`, `set`
|
|
43
|
-
| **dm** | `list`, `show`, `messages`, `threads`, `thread show/messages/follow/mute/share`, `send` (agent 1:1 main chat and Slack-style Thread controls)
|
|
44
|
-
| **diagnostics** | `context`, `doctor`, `usage`, `commands` (agent-friendly runtime identity, readiness, progressive token-budgeted discovery, and complete machine-readable schemas)
|
|
45
|
-
| **goals** | `list`, `show`, `create`, `update`, `delete`, `descendants`, `tasks`, `archive`, `revisions`
|
|
46
|
-
| **commitments** | `list`, `show`, `create`, `plan`, `preflight`, `update`, `checks`, `check-now`, `action-proposals`, `autonomy`, `pause`, `resume`, `complete`, `subject`, `attach`, `detach`, `reports`, `export`, `import`, `fork` (durable agent commitment contracts)
|
|
47
|
-
| **goals briefing** | `enable`, `disable`, `preview`
|
|
48
|
-
| **tasks** | `list`, `show`, `create`, `upsert`, `create-tree`, `bulk-update`, `tree`, `update`, `delete`, `actionability`, `ready`, `start`, `active`, `monitor`, `watch`, `wait`, `continue-ready`, `move`, `complete`, `children`, `ancestors`, `descendants`, `activity`, `runs`, `execution-summary`, `execution-timeline`, `replay`, `checkout`, `release`, `start-all`, `cancel-cascade`, `cascade-status`, `dri-status`, `duplicate-pipeline`, `archive`, `today`, `prompt-log`, `revisions`, `transcript
|
|
49
|
-
| **tasks input** | `show`, `answer`, `dismiss` (durable Human-input handoff)
|
|
50
|
-
| **tasks comments** | `list`, `add`, `anchor`, `delete`, `resolve`, `reopen` (human collaboration threads)
|
|
51
|
-
| **tasks
|
|
52
|
-
| **tasks
|
|
53
|
-
| **tasks
|
|
54
|
-
| **tasks
|
|
55
|
-
| **
|
|
56
|
-
| **
|
|
57
|
-
| **
|
|
58
|
-
| **
|
|
15
|
+
| Topic | Commands |
|
|
16
|
+
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| **auth** | `login`, `logout`, `whoami` |
|
|
18
|
+
| **convos** | `list` (`--agent`, `--search`, `--tag`, `--archived`, `--order`), `show`, `update`, `delete`, `archive`, `unarchive`, `fork`, `duplicate`, `import` |
|
|
19
|
+
| **messages** | `list` (`--limit`, `--head`), `show`, `update`, `update-content`, `feedback`, `edit-artifact` |
|
|
20
|
+
| **agent call** | `request`, `show`, `cancel` — autonomous Agent → owner app voice-call invites; the owner must accept before a LiveKit call starts |
|
|
21
|
+
| **shares** (conversation share links) | `list`, `get`, `link-for`, `create`, `update`, `delete` |
|
|
22
|
+
| **agents** | `list`, `show`, `overview`, `chat`, `create`, `update`, `attach-harness`, `delete`, `duplicate`, `revert`, `versions`, `visibility`, `schedule`, `upcoming`, `plan-day`, `reflect`, `schedule-overview`, `activity` |
|
|
23
|
+
| **agents triggers** | `list`, `create`, `show`, `update`, `enable`, `disable`, `fire`, `delete`, `runs`, `replay`, `policy` (agent-scoped facade over the universal trigger engine) |
|
|
24
|
+
| **agents todos** | `list`, `create`, `cancel` (the day-plan feed; Smart Schedule = `agents plan-day`) |
|
|
25
|
+
| **agent-groups** | `list`, `show`, `create`, `update`, `delete`, `add`, `remove` |
|
|
26
|
+
| **agent-shares** | `received`, `sent`, `with`, `list-for`, `create`, `accept`, `decline`, `revoke`, `leave` |
|
|
27
|
+
| **triggers** | `list`, `show`, `create`, `update`, `delete`, `enable`, `disable`, `fire`, `fire-detail`, `replay`, `audit`, `capabilities`, `event-catalog`, `parse-intent`, `rotate-secret` |
|
|
28
|
+
| **spaces** | `list`, `show`, `create`, `update`, `delete`, `archive`, `unarchive`, `tasks`, `conversations`, `snapshot`, `goals`, `revisions`, `subspaces`, `move`, `reorder`, `pin`, `summary`, `bootstrap`, `capacity`, `auto-executor update/preview/run` |
|
|
29
|
+
| **spaces members** | `list`, `search`, `add`, `remove` |
|
|
30
|
+
| **spaces briefs** | `list`, `get`, `set`, `delete` |
|
|
31
|
+
| **spaces files** | `list`, `upload`, `rename`, `move`, `delete`, `folders list/create/update/delete` |
|
|
32
|
+
| **spaces actions** | `list`, `add`, `update`, `delete`, `replace` |
|
|
33
|
+
| **spaces views** | `list`, `create`, `update`, `delete`, `duplicate`, `reorder` |
|
|
34
|
+
| **spaces live** | `scene`, `cards list/create/update/delete/reorder` |
|
|
35
|
+
| **spaces preferences** | `show`, `tabs` |
|
|
36
|
+
| **spaces heartbeats** | `list`, `create`, `update`, `delete`, `status` |
|
|
37
|
+
| **spaces triggers** | `show`, `set`, `delete` |
|
|
38
|
+
| **spaces widgets** | `list`, `add`, `remove` |
|
|
39
|
+
| **spaces skills** | `list`, `add`, `remove`, `pin` |
|
|
40
|
+
| **spaces labels** | `list`, `add`, `remove` (attach/detach; filter with `spaces list --label`) |
|
|
41
|
+
| **labels** | `list`, `palette`, `create`, `update`, `archive`, `restore`, `delete`, `reorder` (unified labels across `user`, `space`, and `workspace` scopes) |
|
|
42
|
+
| **chats triggers** | `show`, `set` |
|
|
43
|
+
| **dm** | `list`, `show`, `messages`, `threads`, `thread show/messages/follow/mute/share`, `send` (agent 1:1 main chat and Slack-style Thread controls) |
|
|
44
|
+
| **diagnostics** | `context`, `doctor`, `usage`, `commands` (agent-friendly runtime identity, readiness, progressive token-budgeted discovery, and complete machine-readable schemas) |
|
|
45
|
+
| **goals** | `list`, `show`, `create`, `update`, `delete`, `descendants`, `tasks`, `archive`, `revisions` |
|
|
46
|
+
| **commitments** | `list`, `show`, `create`, `plan`, `preflight`, `update`, `checks`, `check-now`, `action-proposals`, `autonomy`, `pause`, `resume`, `complete`, `subject`, `attach`, `detach`, `reports`, `export`, `import`, `fork` (durable agent commitment contracts) |
|
|
47
|
+
| **goals briefing** | `enable`, `disable`, `preview` |
|
|
48
|
+
| **tasks** | `list`, `show`, `create`, `upsert`, `create-tree`, `bulk-update`, `tree`, `update`, `delete`, `actionability`, `ready`, `start`, `active`, `monitor`, `watch`, `wait`, `continue-ready`, `move`, `complete`, `children`, `ancestors`, `descendants`, `activity`, `runs`, `execution-summary`, `execution-timeline`, `replay`, `checkout`, `release`, `start-all`, `cancel-cascade`, `cascade-status`, `dri-status`, `duplicate-pipeline`, `archive`, `today`, `prompt-log`, `revisions`, `transcript` |
|
|
49
|
+
| **tasks input** | `show`, `answer`, `dismiss` (durable Human-input handoff) |
|
|
50
|
+
| **tasks comments** | `list`, `add`, `anchor`, `delete`, `resolve`, `reopen` (human collaboration threads) |
|
|
51
|
+
| **tasks updates** | `add`, `list` (meaningful, typed, append-only progress, findings, decisions, blockers, and verification) |
|
|
52
|
+
| **tasks resume** | `save`, `show` (Run- and Task-spec-bound recovery snapshots) |
|
|
53
|
+
| **tasks result** | `submit`, `show` (immutable Result versions and exact Review state) |
|
|
54
|
+
| **tasks resource** | `add`, `list` (versioned inputs, references, evidence, attachments, and Deliverables) |
|
|
55
|
+
| **tasks deliverable** | `add`, `list`, `confirm` (the user-facing produced-Resource workflow) |
|
|
56
|
+
| **tasks labels** | `list`, `create`, `delete` |
|
|
57
|
+
| **tasks approvals** | `list`, `create`, `delete`, `resolve` |
|
|
58
|
+
| **tasks attachments** | `list`, `delete`, `upload`, `download` |
|
|
59
|
+
| **integrations** | `toolkits`, `search`, `execute`, `tools list`, `tools allow`, `connections connect`, `connections list`, `connections finalize`, `connections disconnect`, `connections reconnect` |
|
|
60
|
+
| **runtimes** | `start`, `list`, `status`, `exec`, `pull`, `connect`, `pause`, `resume`, `destroy` (OverSky Hosted Machine workspaces backed by the server runtime engine) |
|
|
61
|
+
| **github** | `connect`, `finalize`, `connections`, `tools`, `run`, `allow-tools`, `reconnect`, `disconnect` |
|
|
62
|
+
| **slack** | `send-as-agent`, `list-channels`, `list-users`, `read-channel`, `read-thread`, `tools`, `run` |
|
|
59
63
|
|
|
60
64
|
### Reading history (conversations, tasks, agent output)
|
|
61
65
|
|
|
@@ -74,7 +78,7 @@ Tasks, and what the agent actually produced:
|
|
|
74
78
|
```bash
|
|
75
79
|
sky tasks list --assignee-agent <agent-id> # what this agent is working on
|
|
76
80
|
sky tasks show <task-id> # includes the Convo: pointer
|
|
77
|
-
sky tasks
|
|
81
|
+
sky tasks result show <task-id> # current Result + exact Review
|
|
78
82
|
sky tasks transcript <task-id> --assistant-only # full agent transcript, no prompt
|
|
79
83
|
sky tasks comments list <task-id> # raw comment thread
|
|
80
84
|
```
|
|
@@ -1004,7 +1008,7 @@ Create persistent, personalized Task Views that can select exact task IDs or
|
|
|
1004
1008
|
apply criteria across one or more Spaces. The create/show JSON response includes
|
|
1005
1009
|
a durable `url`; opening it displays the view in a focused modal.
|
|
1006
1010
|
|
|
1007
|
-
|
|
1011
|
+
````bash
|
|
1008
1012
|
sky views create --name "Launch scope" --task-id <task-id> --task-id <task-id>
|
|
1009
1013
|
sky views create --name "Cross-space blockers" \
|
|
1010
1014
|
--space <space-id> --space <space-id> --status blocked --group-by space
|
|
@@ -1023,7 +1027,7 @@ sky space-directory-views list --json
|
|
|
1023
1027
|
sky space-directory-views create --name "Active delivery" --config '{"schemaVersion":1,"layout":"list"}' --json
|
|
1024
1028
|
sky space-directory-views update <view-id> --version 3 --from-json ./space-view-patch.json
|
|
1025
1029
|
sky space-directory-views delete <view-id> --version 3 --yes
|
|
1026
|
-
|
|
1030
|
+
````
|
|
1027
1031
|
|
|
1028
1032
|
### `sky work-views ...`
|
|
1029
1033
|
|
|
@@ -1036,7 +1040,8 @@ sky work-views update <view-id> --version 2 --from-json ./work-view-patch.json
|
|
|
1036
1040
|
sky work-views result <view-id> --json
|
|
1037
1041
|
sky work-views delete <view-id> --version 2 --yes
|
|
1038
1042
|
```
|
|
1039
|
-
|
|
1043
|
+
|
|
1044
|
+
````
|
|
1040
1045
|
|
|
1041
1046
|
### `sky spaces live ...`
|
|
1042
1047
|
|
|
@@ -1050,7 +1055,7 @@ sky spaces live cards create <space-id> --kind tasks --title Tasks --slot top
|
|
|
1050
1055
|
sky spaces live cards update <space-id> <card-id> --enabled
|
|
1051
1056
|
sky spaces live cards reorder <space-id> --card <card-id> --card <other-card-id>
|
|
1052
1057
|
sky spaces live cards delete <space-id> <card-id> --yes
|
|
1053
|
-
|
|
1058
|
+
````
|
|
1054
1059
|
|
|
1055
1060
|
### `sky spaces preferences ...`
|
|
1056
1061
|
|
|
@@ -1296,8 +1301,8 @@ positional when the current task is obvious:
|
|
|
1296
1301
|
```bash
|
|
1297
1302
|
sky tasks show --json
|
|
1298
1303
|
sky tasks comments add --body "Done investigating." --json # human discussion comment
|
|
1299
|
-
sky tasks
|
|
1300
|
-
sky tasks complete --summary "Shipped the fix." --
|
|
1304
|
+
sky tasks updates add --type progress --summary "Done investigating." --data '{"completedSinceLast":["Root cause confirmed"],"nextActions":["Implement fix"]}' --json
|
|
1305
|
+
sky tasks complete --summary "Shipped and verified the fix." --json
|
|
1301
1306
|
sky tasks move --status in_progress --json
|
|
1302
1307
|
```
|
|
1303
1308
|
|
|
@@ -1508,19 +1513,21 @@ to transition between states like `todo`, `in_progress`, `blocked`, or
|
|
|
1508
1513
|
|
|
1509
1514
|
### `sky tasks complete [id]`
|
|
1510
1515
|
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
task
|
|
1516
|
+
Submit one versioned Result and advance the Task workflow. An Agent-submitted
|
|
1517
|
+
Result stops in review until an independent reviewer accepts that exact Result;
|
|
1518
|
+
a machine Comment is never used as the closeout record. In a task daemon
|
|
1519
|
+
session, omit the id to use the bound Task and Run.
|
|
1514
1520
|
|
|
1515
1521
|
```bash
|
|
1516
|
-
sky tasks complete --summary "Shipped the fix
|
|
1517
|
-
sky tasks complete <task-id> --summary "
|
|
1518
|
-
sky tasks complete --task <task-id> --status
|
|
1519
|
-
sky tasks complete --from-json task-
|
|
1522
|
+
sky tasks complete --summary "Shipped and verified the fix" --deliverable <resource-link-id> --json
|
|
1523
|
+
sky tasks complete <task-id> --summary "Do not ship" --conclusion-type release_recommendation --conclusion-json '{"posture":"no_ship"}'
|
|
1524
|
+
sky tasks complete --task <task-id> --status blocked --summary "Waiting for access" --remaining "A workspace owner must grant access"
|
|
1525
|
+
sky tasks complete --from-json task-result.json --json
|
|
1520
1526
|
```
|
|
1521
1527
|
|
|
1522
|
-
|
|
1523
|
-
`
|
|
1528
|
+
Use `sky tasks result submit` when the Result should be recorded without a
|
|
1529
|
+
workflow transition. Use `sky tasks review` to accept or request changes on an
|
|
1530
|
+
exact Result version.
|
|
1524
1531
|
|
|
1525
1532
|
### `sky tasks delete <id>`
|
|
1526
1533
|
|
|
@@ -1824,19 +1831,22 @@ sky tasks list --space <space-id> --json | jq '.data[] | select(.priority == "hi
|
|
|
1824
1831
|
|
|
1825
1832
|
The commands that move a task through its lifecycle, most to least common:
|
|
1826
1833
|
|
|
1827
|
-
| Action | Command
|
|
1828
|
-
| ------------------- |
|
|
1829
|
-
|
|
|
1830
|
-
|
|
|
1831
|
-
|
|
|
1832
|
-
|
|
|
1833
|
-
|
|
|
1834
|
-
|
|
|
1835
|
-
|
|
|
1836
|
-
|
|
|
1837
|
-
|
|
|
1838
|
-
|
|
|
1839
|
-
|
|
|
1834
|
+
| Action | Command |
|
|
1835
|
+
| ------------------- | --------------------------------------------------------------------------- |
|
|
1836
|
+
| Submit and advance | `sky tasks complete [id] --summary "..."` |
|
|
1837
|
+
| Record an update | `sky tasks updates add [id] --type progress --summary "..." --data '{...}'` |
|
|
1838
|
+
| Link a deliverable | `sky tasks deliverable add <id> <coordinate>` |
|
|
1839
|
+
| Review a Result | `sky tasks review [id] --result-id <id> --decision accepted` |
|
|
1840
|
+
| Change status | `sky tasks move [id] --status <new-status>` |
|
|
1841
|
+
| Start execution | `sky tasks start [id]` (optionally `--skill <id>`) |
|
|
1842
|
+
| Stop a running task | `sky tasks interrupt <id>` |
|
|
1843
|
+
| Run via DRI agent | `sky tasks dri-run <id>` / `sky tasks dri-plan <id>` |
|
|
1844
|
+
| Schedule a fire | `sky tasks schedule <id> --at <iso>` (`--cron …` for recurring) |
|
|
1845
|
+
| Pause / resume cron | `sky tasks pause-schedule <id>` / `sky tasks resume-schedule <id>` |
|
|
1846
|
+
| Forward to chats | `sky tasks forward <id> --to <group-chat-id>` |
|
|
1847
|
+
| Incremental tags | `sky tasks tags add/remove <id> --tag …` |
|
|
1848
|
+
| Pin/unpin skills | `sky tasks skills pin/unpin <id> <skill-id>` |
|
|
1849
|
+
| Delete | `sky tasks delete <id>` |
|
|
1840
1850
|
|
|
1841
1851
|
`tasks update` handles every other field (title, description, priority,
|
|
1842
1852
|
assignees, due date, goal) but explicitly does NOT touch status — use
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('node:fs');
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
const crypto = require('node:crypto');
|
|
6
|
+
|
|
7
|
+
const COMMAND_BUILD_MANIFEST = 'command-source-digests.json';
|
|
8
|
+
|
|
9
|
+
function sourceDigest(fileSystem, source) {
|
|
10
|
+
return crypto.createHash('sha256').update(fileSystem.readFileSync(source)).digest('hex');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function buildSourceFiles(fileSystem, sourceRoot) {
|
|
14
|
+
const files = [];
|
|
15
|
+
const pending = [sourceRoot];
|
|
16
|
+
while (pending.length) {
|
|
17
|
+
const directory = pending.shift();
|
|
18
|
+
let entries;
|
|
19
|
+
try {
|
|
20
|
+
entries = fileSystem.readdirSync(directory, { withFileTypes: true });
|
|
21
|
+
} catch {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
for (const entry of entries) {
|
|
25
|
+
if (entry.name === '__tests__') continue;
|
|
26
|
+
const candidate = path.join(directory, entry.name);
|
|
27
|
+
if (entry.isDirectory()) pending.push(candidate);
|
|
28
|
+
else if (
|
|
29
|
+
entry.isFile() &&
|
|
30
|
+
/\.(?:ts|tsx)$/.test(entry.name) &&
|
|
31
|
+
!/\.(?:spec|test)\.(?:ts|tsx)$/.test(entry.name)
|
|
32
|
+
) {
|
|
33
|
+
files.push(candidate);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return files.sort();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function sourceTreeDigest(fileSystem, sourceRoot) {
|
|
41
|
+
const hash = crypto.createHash('sha256');
|
|
42
|
+
for (const source of buildSourceFiles(fileSystem, sourceRoot)) {
|
|
43
|
+
hash.update(path.relative(sourceRoot, source).split(path.sep).join('/'));
|
|
44
|
+
hash.update('\0');
|
|
45
|
+
hash.update(fileSystem.readFileSync(source));
|
|
46
|
+
hash.update('\0');
|
|
47
|
+
}
|
|
48
|
+
return hash.digest('hex');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function findAlternateCli({
|
|
52
|
+
commandName,
|
|
53
|
+
currentEntry,
|
|
54
|
+
requiredCommand,
|
|
55
|
+
pathValue = process.env.PATH || '',
|
|
56
|
+
fileSystem = fs,
|
|
57
|
+
}) {
|
|
58
|
+
let currentRealPath;
|
|
59
|
+
try {
|
|
60
|
+
currentRealPath = fileSystem.realpathSync(currentEntry);
|
|
61
|
+
} catch {
|
|
62
|
+
currentRealPath = path.resolve(currentEntry);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
for (const directory of pathValue.split(path.delimiter).filter(Boolean)) {
|
|
66
|
+
const candidate = path.join(directory, commandName);
|
|
67
|
+
try {
|
|
68
|
+
if (!fileSystem.existsSync(candidate)) continue;
|
|
69
|
+
fileSystem.accessSync(candidate, fileSystem.constants?.X_OK ?? fs.constants.X_OK);
|
|
70
|
+
const candidateRealPath = fileSystem.realpathSync(candidate);
|
|
71
|
+
if (candidateRealPath === currentRealPath) continue;
|
|
72
|
+
const candidateCommands = path.resolve(path.dirname(candidateRealPath), '../dist/commands');
|
|
73
|
+
if (
|
|
74
|
+
path.basename(candidateRealPath) === 'run.js' &&
|
|
75
|
+
!fileSystem.existsSync(candidateCommands)
|
|
76
|
+
) {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
if (
|
|
80
|
+
requiredCommand &&
|
|
81
|
+
!fileSystem.existsSync(path.join(candidateCommands, requiredCommand))
|
|
82
|
+
) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (requiredCommand) {
|
|
86
|
+
const candidateRoot = path.resolve(path.dirname(candidateRealPath), '..');
|
|
87
|
+
const candidateSourceCommands = path.join(candidateRoot, 'src', 'commands');
|
|
88
|
+
const sourceStem = path.join(candidateSourceCommands, requiredCommand.replace(/\.js$/, ''));
|
|
89
|
+
const candidateSource = ['.ts', '.tsx']
|
|
90
|
+
.map((extension) => `${sourceStem}${extension}`)
|
|
91
|
+
.find((source) => fileSystem.existsSync(source));
|
|
92
|
+
// An alternate development checkout must prove that its requested
|
|
93
|
+
// command matches its own source too. Published CLIs omit `src`, so
|
|
94
|
+
// their packaged dist remains a valid fallback.
|
|
95
|
+
if (!candidateSource && fileSystem.existsSync(candidateSourceCommands)) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
if (candidateSource) {
|
|
99
|
+
let candidateManifest;
|
|
100
|
+
try {
|
|
101
|
+
candidateManifest = JSON.parse(
|
|
102
|
+
fileSystem.readFileSync(
|
|
103
|
+
path.join(candidateRoot, 'dist', COMMAND_BUILD_MANIFEST),
|
|
104
|
+
'utf8',
|
|
105
|
+
),
|
|
106
|
+
);
|
|
107
|
+
} catch {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (
|
|
111
|
+
candidateManifest?.sourceTreeDigest !==
|
|
112
|
+
sourceTreeDigest(fileSystem, path.join(candidateRoot, 'src'))
|
|
113
|
+
) {
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
const relative = path
|
|
117
|
+
.relative(path.join(candidateRoot, 'src', 'commands'), candidateSource)
|
|
118
|
+
.split(path.sep)
|
|
119
|
+
.join('/');
|
|
120
|
+
if (
|
|
121
|
+
candidateManifest?.commands?.[relative] !== sourceDigest(fileSystem, candidateSource)
|
|
122
|
+
) {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return candidate;
|
|
128
|
+
} catch {
|
|
129
|
+
// A stale PATH entry is not a startup failure; keep looking.
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function missingLocalCommandBuild({ cliRoot, argv, fileSystem = fs, verifySourceIdentity = true }) {
|
|
136
|
+
const commandsDirectory = path.join(cliRoot, 'dist', 'commands');
|
|
137
|
+
const sourceCommandsDirectory = path.join(cliRoot, 'src', 'commands');
|
|
138
|
+
let commandBuildManifest;
|
|
139
|
+
try {
|
|
140
|
+
commandBuildManifest = JSON.parse(
|
|
141
|
+
fileSystem.readFileSync(path.join(cliRoot, 'dist', COMMAND_BUILD_MANIFEST), 'utf8'),
|
|
142
|
+
);
|
|
143
|
+
} catch {
|
|
144
|
+
commandBuildManifest = null;
|
|
145
|
+
}
|
|
146
|
+
const currentSourceTreeDigest = commandBuildManifest
|
|
147
|
+
? sourceTreeDigest(fileSystem, path.join(cliRoot, 'src'))
|
|
148
|
+
: null;
|
|
149
|
+
const commandParts = [];
|
|
150
|
+
for (const value of argv) {
|
|
151
|
+
if (String(value).startsWith('-')) break;
|
|
152
|
+
commandParts.push(...String(value).split(':').filter(Boolean));
|
|
153
|
+
}
|
|
154
|
+
const compiledForSource = (source) => {
|
|
155
|
+
const relative = path.relative(sourceCommandsDirectory, source).replace(/\.(?:ts|tsx)$/, '.js');
|
|
156
|
+
return path.join(commandsDirectory, relative);
|
|
157
|
+
};
|
|
158
|
+
const missingOrStale = (source) => {
|
|
159
|
+
const compiled = compiledForSource(source);
|
|
160
|
+
if (!fileSystem.existsSync(compiled)) return compiled;
|
|
161
|
+
// CI creates dist from a clean checkout immediately before executing it.
|
|
162
|
+
// Source identity is a development-checkout guard; re-hashing the live
|
|
163
|
+
// source tree inside CLI integration tests adds no proof and can make test
|
|
164
|
+
// fixtures that intentionally exercise the launcher affect one another.
|
|
165
|
+
if (!verifySourceIdentity) return null;
|
|
166
|
+
try {
|
|
167
|
+
const relative = path.relative(sourceCommandsDirectory, source).split(path.sep).join('/');
|
|
168
|
+
const builtDigest = commandBuildManifest?.commands?.[relative];
|
|
169
|
+
// Git checkouts and partial builds can make old JS newer than its source.
|
|
170
|
+
// Content identity is authoritative; no digest means the development
|
|
171
|
+
// build is unproved and the installed CLI is safer.
|
|
172
|
+
return commandBuildManifest?.sourceTreeDigest === currentSourceTreeDigest &&
|
|
173
|
+
typeof builtDigest === 'string' &&
|
|
174
|
+
builtDigest === sourceDigest(fileSystem, source)
|
|
175
|
+
? null
|
|
176
|
+
: compiled;
|
|
177
|
+
} catch {
|
|
178
|
+
return compiled;
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
for (let length = commandParts.length; length > 0; length -= 1) {
|
|
182
|
+
const relative = path.join(...commandParts.slice(0, length));
|
|
183
|
+
const source = ['.ts', '.tsx']
|
|
184
|
+
.map((extension) => path.join(cliRoot, 'src', 'commands', `${relative}${extension}`))
|
|
185
|
+
.find((candidate) => fileSystem.existsSync(candidate));
|
|
186
|
+
if (!source) continue;
|
|
187
|
+
const incomplete = missingOrStale(source);
|
|
188
|
+
if (incomplete) return incomplete;
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
if (argv.some((value) => value === '--help' || value === '-h')) {
|
|
192
|
+
const sourceDirectory = path.join(sourceCommandsDirectory, ...commandParts);
|
|
193
|
+
const pending = [sourceDirectory];
|
|
194
|
+
while (pending.length) {
|
|
195
|
+
const current = pending.shift();
|
|
196
|
+
let entries;
|
|
197
|
+
try {
|
|
198
|
+
entries = fileSystem.readdirSync(current, { withFileTypes: true });
|
|
199
|
+
} catch {
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
for (const entry of entries) {
|
|
203
|
+
if (entry.name === '__tests__') continue;
|
|
204
|
+
const candidate = path.join(current, entry.name);
|
|
205
|
+
if (entry.isDirectory()) pending.push(candidate);
|
|
206
|
+
else if (entry.isFile() && /\.(?:ts|tsx)$/.test(entry.name)) {
|
|
207
|
+
const incomplete = missingOrStale(candidate);
|
|
208
|
+
if (incomplete) return incomplete;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return fileSystem.existsSync(commandsDirectory) ? null : commandsDirectory;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
module.exports = {
|
|
217
|
+
COMMAND_BUILD_MANIFEST,
|
|
218
|
+
findAlternateCli,
|
|
219
|
+
missingLocalCommandBuild,
|
|
220
|
+
sourceTreeDigest,
|
|
221
|
+
};
|
package/bin/run.js
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
const path = require('node:path');
|
|
4
|
+
const { spawnSync } = require('node:child_process');
|
|
5
|
+
const { findAlternateCli, missingLocalCommandBuild } = require('./dev-fallback');
|
|
6
|
+
|
|
7
|
+
const cliRoot = path.resolve(__dirname, '..');
|
|
8
|
+
const missingBuildPath = missingLocalCommandBuild({
|
|
9
|
+
cliRoot,
|
|
10
|
+
argv: process.argv.slice(2),
|
|
11
|
+
verifySourceIdentity: process.env.CI !== 'true',
|
|
12
|
+
});
|
|
13
|
+
if (missingBuildPath) {
|
|
14
|
+
const invokedName = path.basename(process.argv[1] || 'skrr');
|
|
15
|
+
const commandName = invokedName === 'run.js' ? 'skrr' : invokedName;
|
|
16
|
+
const fallback =
|
|
17
|
+
process.env.SKRR_DEV_FALLBACK_ACTIVE === '1'
|
|
18
|
+
? null
|
|
19
|
+
: findAlternateCli({
|
|
20
|
+
commandName,
|
|
21
|
+
currentEntry: __filename,
|
|
22
|
+
requiredCommand: path.relative(path.join(cliRoot, 'dist', 'commands'), missingBuildPath),
|
|
23
|
+
});
|
|
24
|
+
if (fallback) {
|
|
25
|
+
console.error(
|
|
26
|
+
`[skrr] Local development build is incomplete (${missingBuildPath}); using fallback CLI ${fallback}.`,
|
|
27
|
+
);
|
|
28
|
+
const delegated = spawnSync(fallback, process.argv.slice(2), {
|
|
29
|
+
stdio: 'inherit',
|
|
30
|
+
shell: process.platform === 'win32',
|
|
31
|
+
env: { ...process.env, SKRR_DEV_FALLBACK_ACTIVE: '1' },
|
|
32
|
+
});
|
|
33
|
+
if (delegated.error) {
|
|
34
|
+
console.error(`[skrr] Could not start installed CLI ${fallback}: ${delegated.error.message}`);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
process.exit(Number.isInteger(delegated.status) ? delegated.status : 1);
|
|
38
|
+
}
|
|
39
|
+
console.error(
|
|
40
|
+
`[skrr] CLI build output is missing or stale at ${missingBuildPath}. Run "npm --prefix cli run build" ` +
|
|
41
|
+
'or install @skrr-ai/cli so this development launcher has a stable fallback.',
|
|
42
|
+
);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
|
|
3
46
|
const oclif = require('@oclif/core');
|
|
4
47
|
|
|
5
48
|
// The workspace this machine works in (`sky workspaces use`) becomes
|
package/dist/base-command.d.ts
CHANGED
|
@@ -387,5 +387,20 @@ type IncompatibleCliCredentialScope = 'daemon' | 'daemon-install';
|
|
|
387
387
|
export declare function isDaemonScopedCredential(token?: string | null): boolean;
|
|
388
388
|
/** The one repair for a machine-only token passed to a human CLI command. */
|
|
389
389
|
export declare function describeDaemonScopedCredential(bin: string, scope?: IncompatibleCliCredentialScope, source?: ResolvedCredential['source']): string;
|
|
390
|
+
/**
|
|
391
|
+
* Did the server MEAN this 5xx, or did it fall over?
|
|
392
|
+
*
|
|
393
|
+
* An outage and a designed refusal arrive with the same status and want
|
|
394
|
+
* opposite reactions — wait for recovery, versus act on a condition. The
|
|
395
|
+
* discriminator is whether the server authored an answer: a typed `code` plus
|
|
396
|
+
* either an explanation it wrote (`cause` / `remedy`, both of which the 5xx
|
|
397
|
+
* redaction boundary deliberately lets through) or an explicit verdict that
|
|
398
|
+
* retrying will not help.
|
|
399
|
+
*
|
|
400
|
+
* Deliberately NOT folded into `isOutageFailure`: that predicate also gates the
|
|
401
|
+
* outbox queue decision and `noteControlPlaneOutage`, and those ask a different
|
|
402
|
+
* question. Merging the two is the mistake its own comment warns about.
|
|
403
|
+
*/
|
|
404
|
+
export declare function isTypedServerRefusal(body: Record<string, unknown> | null): boolean;
|
|
390
405
|
export declare function isRetryableFailure(status: number | undefined, body: Record<string, unknown> | null): boolean;
|
|
391
406
|
export { Flags };
|