@skrr-ai/cli 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/dist/base-command.d.ts +27 -0
  2. package/dist/base-command.js +83 -11
  3. package/dist/commands/agent/message/send.js +1 -1
  4. package/dist/commands/agents/chat.d.ts +1 -1
  5. package/dist/commands/agents/chat.js +1 -1
  6. package/dist/commands/browser/install.d.ts +1 -1
  7. package/dist/commands/browser/install.js +10 -2
  8. package/dist/commands/browser/mcp-config.js +3 -1
  9. package/dist/commands/browser/skill/show.js +1 -1
  10. package/dist/commands/browser/status.js +4 -1
  11. package/dist/commands/browser/uninstall.d.ts +1 -1
  12. package/dist/commands/browser/uninstall.js +10 -2
  13. package/dist/commands/browser.d.ts +1 -1
  14. package/dist/commands/browser.js +3 -3
  15. package/dist/commands/code/index.js +6 -3
  16. package/dist/commands/code/install.d.ts +61 -0
  17. package/dist/commands/code/install.js +247 -0
  18. package/dist/commands/code/oversky-agent.d.ts +2 -1
  19. package/dist/commands/code/oversky-agent.js +12 -8
  20. package/dist/commands/commands.js +1 -1
  21. package/dist/commands/context.js +1 -1
  22. package/dist/commands/create-token.js +1 -1
  23. package/dist/commands/daemon/byok.d.ts +1 -0
  24. package/dist/commands/daemon/byok.js +14 -1
  25. package/dist/commands/daemon/index.js +18 -7
  26. package/dist/commands/daemon/install.d.ts +1 -0
  27. package/dist/commands/daemon/install.js +22 -3
  28. package/dist/commands/daemon/logs.d.ts +1 -0
  29. package/dist/commands/daemon/logs.js +4 -0
  30. package/dist/commands/daemon/start.d.ts +1 -0
  31. package/dist/commands/daemon/start.js +15 -2
  32. package/dist/commands/daemon/status.d.ts +1 -0
  33. package/dist/commands/daemon/status.js +14 -1
  34. package/dist/commands/daemon/stop.d.ts +1 -0
  35. package/dist/commands/daemon/stop.js +14 -1
  36. package/dist/commands/daemon/uninstall.d.ts +1 -0
  37. package/dist/commands/daemon/uninstall.js +15 -2
  38. package/dist/commands/daemon/usage.d.ts +1 -0
  39. package/dist/commands/daemon/usage.js +5 -1
  40. package/dist/commands/doctor.js +2 -2
  41. package/dist/commands/github/allow-tools.d.ts +1 -0
  42. package/dist/commands/github/app/install.d.ts +1 -0
  43. package/dist/commands/github/app/status.d.ts +1 -0
  44. package/dist/commands/github/connect.d.ts +1 -0
  45. package/dist/commands/github/connections.d.ts +1 -0
  46. package/dist/commands/github/disconnect.d.ts +1 -0
  47. package/dist/commands/github/finalize.d.ts +1 -0
  48. package/dist/commands/github/reconnect.d.ts +1 -0
  49. package/dist/commands/github/run.d.ts +1 -0
  50. package/dist/commands/github/tools.d.ts +1 -0
  51. package/dist/commands/goals/create.js +2 -2
  52. package/dist/commands/goals/show.js +5 -0
  53. package/dist/commands/harnesses/list.js +14 -3
  54. package/dist/commands/harnesses/show.js +14 -0
  55. package/dist/commands/instructions/activate.js +1 -1
  56. package/dist/commands/instructions/archive-version.js +1 -1
  57. package/dist/commands/instructions/delete.js +1 -1
  58. package/dist/commands/instructions/diff.js +1 -1
  59. package/dist/commands/instructions/install.js +7 -1
  60. package/dist/commands/instructions/restore.js +1 -1
  61. package/dist/commands/instructions/show.js +17 -1
  62. package/dist/commands/instructions/update.js +1 -1
  63. package/dist/commands/integrations/connections/connect.d.ts +1 -0
  64. package/dist/commands/integrations/connections/disconnect.d.ts +1 -0
  65. package/dist/commands/integrations/connections/finalize.d.ts +1 -0
  66. package/dist/commands/integrations/connections/list.d.ts +1 -0
  67. package/dist/commands/integrations/connections/reconnect.d.ts +1 -0
  68. package/dist/commands/integrations/execute.d.ts +1 -0
  69. package/dist/commands/integrations/search.d.ts +1 -0
  70. package/dist/commands/integrations/toolkits.d.ts +1 -0
  71. package/dist/commands/integrations/tools/allow.d.ts +1 -0
  72. package/dist/commands/integrations/tools/list.d.ts +1 -0
  73. package/dist/commands/list-daemons.d.ts +2 -7
  74. package/dist/commands/list-daemons.js +13 -13
  75. package/dist/commands/login.js +78 -33
  76. package/dist/commands/logout.js +52 -1
  77. package/dist/commands/machines/hosted/start.js +1 -1
  78. package/dist/commands/pair.js +2 -2
  79. package/dist/commands/projects/create.js +6 -1
  80. package/dist/commands/projects/tasks.js +6 -1
  81. package/dist/commands/revoke-daemon.js +6 -2
  82. package/dist/commands/set-capabilities.js +6 -2
  83. package/dist/commands/skills/install.js +1 -1
  84. package/dist/commands/skills/library.js +2 -2
  85. package/dist/commands/spaces/create.js +6 -2
  86. package/dist/commands/tasks/complete.d.ts +1 -1
  87. package/dist/commands/tasks/complete.js +21 -8
  88. package/dist/commands/tasks/create.js +4 -1
  89. package/dist/commands/tasks/current.js +1 -1
  90. package/dist/commands/tasks/delete.d.ts +1 -0
  91. package/dist/commands/tasks/delete.js +9 -0
  92. package/dist/commands/tasks/export.js +5 -1
  93. package/dist/commands/tasks/follow-up.js +2 -1
  94. package/dist/commands/tasks/list.js +5 -1
  95. package/dist/commands/tasks/pr.js +1 -1
  96. package/dist/commands/tasks/show.js +10 -1
  97. package/dist/commands/tasks/triage.js +2 -1
  98. package/dist/commands/tasks/update.js +4 -1
  99. package/dist/commands/tasks/upsert.js +4 -1
  100. package/dist/commands/usage.js +1 -1
  101. package/dist/commands/whoami.js +4 -1
  102. package/dist/lib/agentic-stream.js +21 -1
  103. package/dist/lib/api-fetch.d.ts +1 -1
  104. package/dist/lib/api-fetch.js +1 -1
  105. package/dist/lib/auth-core-init.js +23 -3
  106. package/dist/lib/auth-storage.d.ts +0 -12
  107. package/dist/lib/auth-storage.js +37 -2
  108. package/dist/lib/config.d.ts +43 -3
  109. package/dist/lib/config.js +391 -31
  110. package/dist/lib/created-line.d.ts +22 -0
  111. package/dist/lib/created-line.js +25 -0
  112. package/dist/lib/daemon-binding.d.ts +29 -0
  113. package/dist/lib/daemon-binding.js +63 -0
  114. package/dist/lib/daemon-ref.d.ts +31 -0
  115. package/dist/lib/daemon-ref.js +47 -0
  116. package/dist/lib/daemonBroker.js +1 -1
  117. package/dist/lib/delegated-cli.js +3 -3
  118. package/dist/lib/exec-oversky.d.ts +18 -1
  119. package/dist/lib/exec-oversky.js +21 -4
  120. package/dist/lib/html-text.d.ts +15 -0
  121. package/dist/lib/html-text.js +40 -0
  122. package/dist/lib/keychain.d.ts +43 -0
  123. package/dist/lib/keychain.js +145 -4
  124. package/dist/lib/login.js +3 -3
  125. package/dist/lib/node-adapter.js +1 -1
  126. package/dist/lib/oauthLogin.js +17 -6
  127. package/dist/lib/sky-code-agent.d.ts +1 -1
  128. package/dist/lib/sky-code-agent.js +8 -8
  129. package/dist/lib/sky-code-broker.js +18 -2
  130. package/dist/lib/sky-code-doctor.js +120 -4
  131. package/dist/lib/sky-code-managed.d.ts +12 -0
  132. package/dist/lib/sky-code-managed.js +21 -7
  133. package/dist/lib/sky-code.d.ts +16 -1
  134. package/dist/lib/sky-code.js +110 -7
  135. package/dist/lib/task-execution.js +4 -11
  136. package/dist/lib/tasks.d.ts +1 -0
  137. package/dist/lib/tasks.js +9 -6
  138. package/dist/lib/update-check.js +1 -1
  139. package/dist/lib/usage-discovery.js +1 -1
  140. package/dist/lib/web-url.js +12 -1
  141. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialResolver.d.ts +1 -1
  142. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialResolver.js +2 -2
  143. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -0
  144. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +13 -1
  145. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/kek/linux.js +16 -3
  146. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/legacyStatePreflight.d.ts +0 -9
  147. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/legacyStatePreflight.js +18 -1
  148. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/loginLocalhost.js +3 -3
  149. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/messages.js +3 -3
  150. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/runtime.d.ts +7 -3
  151. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/skyCodeChannels.d.ts +96 -0
  152. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/skyCodeChannels.js +115 -0
  153. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialResolver.d.ts +1 -1
  154. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialResolver.js +2 -2
  155. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -0
  156. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +1 -0
  157. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/kek/linux.js +16 -3
  158. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/legacyStatePreflight.d.ts +0 -9
  159. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/legacyStatePreflight.js +18 -1
  160. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/loginLocalhost.js +3 -3
  161. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/messages.js +3 -3
  162. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/runtime.d.ts +7 -3
  163. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/skyCodeChannels.d.ts +96 -0
  164. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/skyCodeChannels.js +107 -0
  165. package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
  166. package/dist/node_modules/@skrr-ai/data-provider/index.js +4206 -4191
  167. package/dist/node_modules/@skrr-ai/inference-broker/dist/cjs/managed-inference-broker.js +2 -2
  168. package/dist/node_modules/@skrr-ai/inference-broker/dist/esm/managed-inference-broker.js +2 -2
  169. package/oclif.manifest.json +7969 -1397
  170. package/package.json +22 -19
@@ -0,0 +1,247 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../base-command");
5
+ const api_fetch_1 = require("../../lib/api-fetch");
6
+ const daemon_ref_1 = require("../../lib/daemon-ref");
7
+ /**
8
+ * `skrr code install` — install the engine from the terminal.
9
+ *
10
+ * ── Why this command exists ────────────────────────────────────────────────
11
+ *
12
+ * `skrr code`'s not-installed message offered exactly two routes and neither
13
+ * worked without a browser: "In the web app: the runtime menu … → Install", or
14
+ * point `OVERSKY_SKY_CODE_PATH` at a build you already have — which is the thing
15
+ * you are trying to obtain, and the route that gives up provenance. So the
16
+ * ordinary case for a coding harness (a dev box over SSH, a CI runner, a cloud
17
+ * VM) had no way in (dogfood OSK-276).
18
+ *
19
+ * Nothing underneath was missing. The daemon has performed the verified install
20
+ * since 2026-08-08, and `POST /api/daemons/:id/cli-installers/:provider/install`
21
+ * has fronted it since June. The install was API-exposed and CLI-unreachable —
22
+ * the shape the root `CLAUDE.md` names under CLI ↔ API parity: "an endpoint the
23
+ * API exposes must be reachable from `skrr`."
24
+ *
25
+ * So this adds a SURFACE and no mechanism. Same route the web app posts, same
26
+ * daemon job, same signature verification. A second install path would be a
27
+ * second thing to keep in step with the first, and the first is the one that
28
+ * verifies the signed manifest.
29
+ */
30
+ class CodeInstall extends base_command_1.BaseCommand {
31
+ static description = 'Install the skrr Code engine on this machine, through the daemon';
32
+ static examples = [
33
+ '<%= config.bin %> code install',
34
+ '<%= config.bin %> code install --daemon d_6a323ae4...',
35
+ '<%= config.bin %> code install --json',
36
+ ];
37
+ static flags = {
38
+ daemon: core_1.Flags.string({
39
+ description: 'Which daemon installs it. Defaults to the only active one; required when you have several.',
40
+ }),
41
+ wait: core_1.Flags.boolean({
42
+ default: true,
43
+ allowNo: true,
44
+ description: 'Follow the install job until it finishes. --no-wait returns the job id.',
45
+ }),
46
+ json: core_1.Flags.boolean({ description: 'Emit the result as JSON' }),
47
+ };
48
+ async run() {
49
+ const { flags } = await this.parse(CodeInstall);
50
+ const daemonId = await this.resolveDaemon(flags.daemon);
51
+ let started;
52
+ try {
53
+ started = await (0, api_fetch_1.apiFetch)(`/api/daemons/${encodeURIComponent(daemonId)}/cli-installers/${PROVIDER}/install`, { method: 'POST', body: {}, credential: this.resolvedCredential });
54
+ }
55
+ catch (err) {
56
+ this.handleApiError(err);
57
+ }
58
+ const jobId = started.job?.id;
59
+ // A 202 carrying NO job is not a queued install. It is the daemon
60
+ // acknowledging the call and returning nothing, and the route builds its
61
+ // body as `{ daemonId, ...result }` — so an empty result and a real one look
62
+ // identical from here. Dogfooded (OSK-287): this printed "Install requested"
63
+ // and exited 0 against a daemon that answered an unrelated RPC in 83ms and
64
+ // then installed nothing for 130 seconds. Reporting success for an empty
65
+ // acknowledgement is what let that reach a user as silence.
66
+ if (!jobId) {
67
+ if (flags.json) {
68
+ this.log(JSON.stringify({ daemonId, ...started }, null, 2));
69
+ return;
70
+ }
71
+ // A no-op is not a failure. The daemon says WHY it started nothing, and
72
+ // the commonest reason is the happy one — the engine is already there.
73
+ //
74
+ // This branch used to treat every job-less response as "nothing has been
75
+ // shown to start", which was right while the control-RPC relay dropped
76
+ // every reply (OSK-287) and wrong the moment it was fixed: with real
77
+ // payloads flowing, running `code install` twice would have reported a
78
+ // problem for the ordinary case of already having the engine. That is the
79
+ // same defect this dogfood run kept finding in other people's error copy —
80
+ // a message asserting a cause it has not observed — so it does not get to
81
+ // survive in mine.
82
+ const reason = await this.installerNote(daemonId);
83
+ if (reason) {
84
+ this.log(`Nothing to do on ${(0, daemon_ref_1.formatDaemonRef)(daemonId)} — ${reason}`);
85
+ return;
86
+ }
87
+ this.failWithCliError({
88
+ message: `The daemon on ${(0, daemon_ref_1.formatDaemonRef)(daemonId)} accepted the request and returned no ` +
89
+ 'install job, and does not say why. Nothing has been shown to start. ' +
90
+ `Check what it offers with \`${this.config.bin} list-daemons\` for the machine, and ` +
91
+ `\`${this.config.bin} code doctor\` here once you expect it to have landed.`,
92
+ code: 'INSTALL_NOT_TRACKED',
93
+ exit: 1,
94
+ // Retryable: the daemon is reachable and the call was accepted, so the
95
+ // same command may well work once whatever swallowed it is understood.
96
+ retryable: true,
97
+ });
98
+ }
99
+ if (!flags.wait) {
100
+ if (flags.json) {
101
+ this.log(JSON.stringify({ daemonId, ...started }, null, 2));
102
+ return;
103
+ }
104
+ this.log(`Install started on ${(0, daemon_ref_1.formatDaemonRef)(daemonId)} — job ${jobId}.`);
105
+ return;
106
+ }
107
+ const job = await this.followJob(daemonId, jobId, flags.json === true);
108
+ if (flags.json) {
109
+ this.log(JSON.stringify({ daemonId, job }, null, 2));
110
+ }
111
+ if (job.status === 'failed') {
112
+ // The daemon's own message, verbatim. It carries the failure CODE
113
+ // (`runSignedInstall` puts it there deliberately) because "the feed is
114
+ // down" and "the signature did not verify" need very different responses.
115
+ this.failWithCliError({
116
+ message: job.error || 'The install failed and the daemon gave no reason.',
117
+ code: 'INSTALL_FAILED',
118
+ exit: 1,
119
+ retryable: false,
120
+ });
121
+ }
122
+ if (!flags.json) {
123
+ this.log(`skrr Code installed. Run \`${this.config.bin} code\` to start it.`);
124
+ }
125
+ }
126
+ /**
127
+ * Which daemon does the install.
128
+ *
129
+ * Refuses rather than guessing when several are active. Picking one would mean
130
+ * installing a hundred megabytes onto a machine the user was not thinking
131
+ * about, and the list this reads is the same one `skrr list-daemons` prints —
132
+ * so the error can name the exact values that work.
133
+ */
134
+ async resolveDaemon(explicit) {
135
+ if (explicit)
136
+ return (0, daemon_ref_1.normalizeDaemonRef)(explicit);
137
+ let res;
138
+ try {
139
+ res = await (0, api_fetch_1.apiFetch)('/api/daemon-resources?status=active&limit=50', { credential: this.resolvedCredential });
140
+ }
141
+ catch (err) {
142
+ this.handleApiError(err);
143
+ }
144
+ const daemons = (res.daemons ?? []).filter((d) => d.isActive !== false);
145
+ if (daemons.length === 1)
146
+ return daemons[0].id;
147
+ if (daemons.length === 0) {
148
+ this.failWithCliError({
149
+ message: 'No active daemon is registered for this account, so nothing can perform the install. ' +
150
+ `Start the local runtime with \`${this.config.bin} daemon start\`, then run this again.`,
151
+ code: 'NO_DAEMON',
152
+ exit: 1,
153
+ retryable: false,
154
+ });
155
+ }
156
+ const choices = daemons
157
+ .slice(0, 10)
158
+ .map((d) => ` ${(0, daemon_ref_1.formatDaemonRef)(d.id)} ${d.name || '—'}`)
159
+ .join('\n');
160
+ this.failWithCliError({
161
+ message: `${daemons.length} active daemons — say which machine should install the engine:\n${choices}\n` +
162
+ `Pass one with --daemon, or see them all with \`${this.config.bin} list-daemons\`.`,
163
+ code: 'AMBIGUOUS_DAEMON',
164
+ exit: 1,
165
+ retryable: false,
166
+ });
167
+ }
168
+ /**
169
+ * What the daemon says about this provider, when it started no job.
170
+ *
171
+ * Read from the SAME list route the web app uses, so the CLI reports the
172
+ * daemon's own words rather than inventing an explanation for silence. Best
173
+ * effort: a failure here means falling back to the honest "does not say why",
174
+ * never to a guess.
175
+ */
176
+ async installerNote(daemonId) {
177
+ try {
178
+ const res = await (0, api_fetch_1.apiFetch)(`/api/daemons/${encodeURIComponent(daemonId)}/cli-installers`, { credential: this.resolvedCredential });
179
+ const row = (res.providers ?? []).find((p) => p.provider === PROVIDER);
180
+ const reason = row?.installDisabledReason?.trim();
181
+ if (!reason)
182
+ return null;
183
+ // The version is what turns "Already installed." into something a reader
184
+ // can act on — it is the difference between reassurance and a shrug.
185
+ return row?.version ? `${reason} (${row.version})` : reason;
186
+ }
187
+ catch {
188
+ return null;
189
+ }
190
+ }
191
+ /**
192
+ * Poll the job until it settles, printing each new log line.
193
+ *
194
+ * The daemon already writes a progress log — "Fetching the signed skrr Code
195
+ * release manifest", "Verified and installed …" — and it is the only account
196
+ * of a hundred-megabyte download the user is waiting on. Printing only the
197
+ * lines not yet seen keeps a poll loop from repeating the whole log.
198
+ */
199
+ async followJob(daemonId, jobId, quiet) {
200
+ const deadline = Date.now() + MAX_WAIT_MS;
201
+ let printed = 0;
202
+ for (;;) {
203
+ let res;
204
+ try {
205
+ res = await (0, api_fetch_1.apiFetch)(`/api/daemons/${encodeURIComponent(daemonId)}/cli-installers/jobs/${encodeURIComponent(jobId)}`, { credential: this.resolvedCredential });
206
+ }
207
+ catch (err) {
208
+ this.handleApiError(err);
209
+ }
210
+ const job = res.job;
211
+ if (!job) {
212
+ this.failWithCliError({
213
+ message: `The daemon no longer has install job ${jobId}.`,
214
+ code: 'JOB_MISSING',
215
+ exit: 1,
216
+ retryable: false,
217
+ });
218
+ }
219
+ if (!quiet) {
220
+ for (const line of (job.log ?? []).slice(printed))
221
+ this.logToStderr(` ${line}`);
222
+ printed = (job.log ?? []).length;
223
+ }
224
+ if (job.status === 'succeeded' || job.status === 'failed')
225
+ return job;
226
+ if (Date.now() > deadline) {
227
+ // NOT a failure: the daemon is still working, and saying "install
228
+ // failed" because this process ran out of patience would be a lie that
229
+ // sends someone to debug a download that is going fine.
230
+ this.failWithCliError({
231
+ message: `Still installing after ${Math.round(MAX_WAIT_MS / 60000)} minutes — the daemon is ` +
232
+ `still working on job ${jobId}. Check \`${this.config.bin} code doctor\` in a while.`,
233
+ code: 'INSTALL_PENDING',
234
+ exit: 1,
235
+ retryable: true,
236
+ });
237
+ }
238
+ await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
239
+ }
240
+ }
241
+ }
242
+ exports.default = CodeInstall;
243
+ /** The daemon's id for skrr's own engine. One list, in `@skrr-ai/data-provider`. */
244
+ const PROVIDER = 'sky-code';
245
+ /** A 100 MB download over a hotel connection is the case this has to survive. */
246
+ const MAX_WAIT_MS = 10 * 60_000;
247
+ const POLL_INTERVAL_MS = 2_000;
@@ -1,6 +1,6 @@
1
1
  import { Command } from '@oclif/core';
2
2
  /**
3
- * `skrr code oversky-agent` — read and write the agent a managed session runs as.
3
+ * `skrr code skrr-agent` — read and write the agent a managed session runs as.
4
4
  *
5
5
  * ── Why the name carries the `oversky-` prefix ─────────────────────────────
6
6
  *
@@ -28,6 +28,7 @@ import { Command } from '@oclif/core';
28
28
  * installs.
29
29
  */
30
30
  export default class CodeOverskyAgent extends Command {
31
+ static aliases: string[];
31
32
  static description: string;
32
33
  static examples: string[];
33
34
  static flags: {
@@ -6,7 +6,7 @@ const config_1 = require("../../lib/config");
6
6
  const sky_code_agent_1 = require("../../lib/sky-code-agent");
7
7
  const sky_code_managed_1 = require("../../lib/sky-code-managed");
8
8
  /**
9
- * `skrr code oversky-agent` — read and write the agent a managed session runs as.
9
+ * `skrr code skrr-agent` — read and write the agent a managed session runs as.
10
10
  *
11
11
  * ── Why the name carries the `oversky-` prefix ─────────────────────────────
12
12
  *
@@ -34,13 +34,17 @@ const sky_code_managed_1 = require("../../lib/sky-code-managed");
34
34
  * installs.
35
35
  */
36
36
  class CodeOverskyAgent extends core_1.Command {
37
+ // `skrr code skrr-agent` is the spelling to teach; the `oversky-` one is the
38
+ // path this file has and stays reachable, because it is in scripts and in
39
+ // muscle memory.
40
+ static aliases = ['code:skrr-agent'];
37
41
  static description = 'Show or set the skrr agent a managed skrr Code session is attributed to';
38
42
  static examples = [
39
- '<%= config.bin %> code oversky-agent',
40
- '<%= config.bin %> code oversky-agent --set Engineer',
41
- '<%= config.bin %> code oversky-agent --set agent_abc123',
42
- '<%= config.bin %> code oversky-agent --clear',
43
- '<%= config.bin %> code oversky-agent --json',
43
+ '<%= config.bin %> code skrr-agent',
44
+ '<%= config.bin %> code skrr-agent --set Engineer',
45
+ '<%= config.bin %> code skrr-agent --set agent_abc123',
46
+ '<%= config.bin %> code skrr-agent --clear',
47
+ '<%= config.bin %> code skrr-agent --json',
44
48
  ];
45
49
  static flags = {
46
50
  show: core_1.Flags.boolean({
@@ -160,7 +164,7 @@ class CodeOverskyAgent extends core_1.Command {
160
164
  // people to pin it would be noise on every run.
161
165
  if (agent.source === 'sole-agent' && !stored) {
162
166
  this.log(`\nThis changes if you create another agent. To pin it: ` +
163
- `skrr code oversky-agent --set ${agent.id}`);
167
+ `skrr code skrr-agent --set ${agent.id}`);
164
168
  }
165
169
  }
166
170
  /**
@@ -188,7 +192,7 @@ function describe(agent) {
188
192
  function explainSource(agent) {
189
193
  switch (agent.source) {
190
194
  case 'flag':
191
- return `${sky_code_managed_1.OVERSKY_AGENT_FLAG} on the command line`;
195
+ return `${sky_code_managed_1.SKRR_AGENT_FLAG} on the command line`;
192
196
  case 'config':
193
197
  return `"${sky_code_managed_1.AGENT_CONFIG_KEY}" in ${(0, config_1.getConfigPath)()}`;
194
198
  case 'sole-agent':
@@ -5,7 +5,7 @@ const base_command_1 = require("../base-command");
5
5
  const command_manifest_1 = require("../lib/command-manifest");
6
6
  const command_hygiene_1 = require("../lib/command-hygiene");
7
7
  class Commands extends base_command_1.BaseCommand {
8
- static description = 'List Sky commands or print a machine-readable command schema';
8
+ static description = 'List skrr commands or print a machine-readable command schema';
9
9
  static examples = [
10
10
  '<%= config.bin %> commands',
11
11
  '<%= config.bin %> commands --json',
@@ -8,7 +8,7 @@ const keychain_1 = require("../lib/keychain");
8
8
  const cli_runtime_1 = require("../lib/cli-runtime");
9
9
  const runtime_context_1 = require("../lib/runtime-context");
10
10
  class Context extends base_command_1.BaseCommand {
11
- static description = 'Print the current Sky CLI runtime context for agent automation';
11
+ static description = 'Print the current skrr CLI runtime context for agent automation';
12
12
  static examples = [
13
13
  '<%= config.bin %> context --json',
14
14
  '<%= config.bin %> context',
@@ -138,7 +138,7 @@ class CreateToken extends base_command_1.BaseCommand {
138
138
  // Following it against `skrr` produces a 401 whose remedy is "run `sky
139
139
  // login`" — the one thing CI cannot do (dogfood OSK-4693).
140
140
  process.stderr.write(' Use it to bring up a daemon on a headless or CI machine:\n');
141
- process.stderr.write(` OVERSKY_TOKEN=${result.token} oversky start\n`);
141
+ process.stderr.write(` OVERSKY_TOKEN=${result.token} skrrd start\n`);
142
142
  process.stderr.write('\n');
143
143
  process.stderr.write(` It is not a credential for ${this.config.bin} commands — those reject it with\n`);
144
144
  process.stderr.write(` 401 TOKEN_INVALID. For scripted ${this.config.bin} use, sign in on the machine\n`);
@@ -5,6 +5,7 @@ import { Command } from '@oclif/core';
5
5
  * raw provider key itself.
6
6
  */
7
7
  export default class DaemonByok extends Command {
8
+ static aliases: string[];
8
9
  static description: string;
9
10
  static strict: boolean;
10
11
  static examples: string[];
@@ -8,6 +8,10 @@ const exec_oversky_1 = require("../../lib/exec-oversky");
8
8
  * raw provider key itself.
9
9
  */
10
10
  class DaemonByok extends core_1.Command {
11
+ // `skrr daemons <sub>` — the plural is advertised as an alias for the
12
+ // whole topic, and without a per-command alias only the bare topic
13
+ // resolved: every subcommand under it failed.
14
+ static aliases = ['daemons:byok'];
11
15
  static description = 'Manage local BYOK provider credentials in the daemon profile Keychain';
12
16
  static strict = false;
13
17
  static examples = [
@@ -17,7 +21,16 @@ class DaemonByok extends core_1.Command {
17
21
  '<%= config.bin %> daemon byok remove openai --yes',
18
22
  ];
19
23
  async run() {
20
- const { argv } = await this.parse(DaemonByok);
24
+ // `this.argv`, NOT `this.parse()`. `strict = false` relaxes POSITIONAL
25
+ // arity and oclif still rejects any flag this command has not declared —
26
+ // so the comment above was false and every `skrrd` flag was unreachable
27
+ // through the wrapper that exists to reach it. `skrr daemon status
28
+ // --profile dev` died with "Nonexistent flag: --profile" (OSK-296).
29
+ //
30
+ // Identical to the defect fixed on `skrr code` earlier the same day, whose
31
+ // own comment records `skrr code run -m <model>` dying the same way. Same
32
+ // mistake, one directory over.
33
+ const argv = this.argv;
21
34
  try {
22
35
  this.exit(await (0, exec_oversky_1.execOversky)(['byok', ...argv]));
23
36
  }
@@ -28,13 +28,24 @@ class Daemon extends core_1.Command {
28
28
  }
29
29
  this.log(`runtime binary: ${bin}`);
30
30
  this.log('');
31
- this.log('Subcommands:');
32
- this.log(' skrr daemon startstart the daemon');
33
- this.log(' skrr daemon stop stop the daemon');
34
- this.log(' skrr daemon status show running state and config');
35
- this.log(' skrr daemon logs tail recent daemon logs');
36
- this.log(' skrr daemon usage — show local Claude Code and Codex usage limits');
37
- this.log(' skrr daemon byok manage local BYOK Keychain credentials');
31
+ this.log('Local runtime:');
32
+ this.log(' skrr daemon installinstall the runtime as a background service');
33
+ this.log(' skrr daemon uninstall remove that service (local state is left alone)');
34
+ this.log(' skrr daemon start start the daemon');
35
+ this.log(' skrr daemon stop stop the daemon');
36
+ this.log(' skrr daemon status — show running state and config');
37
+ this.log(' skrr daemon logs tail recent daemon logs');
38
+ this.log(' skrr daemon usage — show local Claude Code and Codex usage limits');
39
+ this.log(' skrr daemon byok — manage local BYOK Keychain credentials');
40
+ this.log('');
41
+ // These three are registered as aliases of top-level commands, which oclif
42
+ // does not list under the topic. They are the commands you reach for during
43
+ // an access review, so leaving them undiscoverable here sent people looking
44
+ // for a revoke that the topic appeared not to have.
45
+ this.log('This account (aliases of the top-level commands):');
46
+ this.log(' skrr daemon list — list daemons registered to this account');
47
+ this.log(' skrr daemon revoke — revoke one of them');
48
+ this.log(" skrr set-capabilities — scope a daemon's capability allow-list");
38
49
  }
39
50
  }
40
51
  exports.default = Daemon;
@@ -12,6 +12,7 @@ import { Command } from '@oclif/core';
12
12
  * on each platform.
13
13
  */
14
14
  export default class DaemonInstall extends Command {
15
+ static aliases: string[];
15
16
  static description: string;
16
17
  static strict: boolean;
17
18
  run(): Promise<void>;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const exec_oversky_1 = require("../../lib/exec-oversky");
5
+ const daemon_binding_1 = require("../../lib/daemon-binding");
5
6
  /**
6
7
  * `skrr daemon install` — install the local runtime's OS service.
7
8
  *
@@ -15,12 +16,30 @@ const exec_oversky_1 = require("../../lib/exec-oversky");
15
16
  * on each platform.
16
17
  */
17
18
  class DaemonInstall extends core_1.Command {
19
+ // `skrr daemons <sub>` — the plural is advertised as an alias for the
20
+ // whole topic, and without a per-command alias only the bare topic
21
+ // resolved: every subcommand under it failed.
22
+ static aliases = ['daemons:install'];
18
23
  static description = 'Install the local skrr runtime as a background service';
19
- static strict = false; // forward all args verbatim
24
+ static strict = false; // forward all args verbatim — see run()
20
25
  async run() {
21
- const { argv } = await this.parse(DaemonInstall);
26
+ // `this.argv`, NOT `this.parse()`. `strict = false` relaxes POSITIONAL
27
+ // arity and oclif still rejects any flag this command has not declared —
28
+ // so the comment above was false and every `skrrd` flag was unreachable
29
+ // through the wrapper that exists to reach it. `skrr daemon status
30
+ // --profile dev` died with "Nonexistent flag: --profile" (OSK-296).
31
+ //
32
+ // Identical to the defect fixed on `skrr code` earlier the same day, whose
33
+ // own comment records `skrr code run -m <model>` dying the same way. Same
34
+ // mistake, one directory over.
35
+ const argv = this.argv;
22
36
  try {
23
- const code = await (0, exec_oversky_1.execOversky)(['install', ...argv]);
37
+ // Bind the new daemon to the deployment and profile the CLI is on,
38
+ // for whichever of those the user did not state. Installing is the
39
+ // moment the binding is chosen, and leaving it to a separate command
40
+ // is how a CLI and its daemon end up on different deployments
41
+ // (OSK-279) without anyone doing anything wrong.
42
+ const code = await (0, exec_oversky_1.execOversky)(['install', ...(0, daemon_binding_1.bindToCliSession)(argv)]);
24
43
  this.exit(code);
25
44
  }
26
45
  catch (err) {
@@ -40,6 +40,7 @@ export declare function readDaemonLogTail(filePath: string, maxLines: number): s
40
40
  */
41
41
  export declare function buildOverskyLogsArgs(flags: DaemonLogsFlags): string[];
42
42
  export default class DaemonLogs extends Command {
43
+ static aliases: string[];
43
44
  static description: string;
44
45
  /**
45
46
  * Mirrors the four options `oversky logs` actually implements
@@ -76,6 +76,10 @@ function buildOverskyLogsArgs(flags) {
76
76
  ];
77
77
  }
78
78
  class DaemonLogs extends core_1.Command {
79
+ // `skrr daemons <sub>` — the plural is advertised as an alias for the
80
+ // whole topic, and without a per-command alias only the bare topic
81
+ // resolved: every subcommand under it failed.
82
+ static aliases = ['daemons:logs'];
79
83
  static description = 'Tail or print recent skrr daemon logs';
80
84
  /**
81
85
  * Mirrors the four options `oversky logs` actually implements
@@ -1,5 +1,6 @@
1
1
  import { Command } from '@oclif/core';
2
2
  export default class DaemonStart extends Command {
3
+ static aliases: string[];
3
4
  static description: string;
4
5
  static strict: boolean;
5
6
  run(): Promise<void>;
@@ -3,10 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const exec_oversky_1 = require("../../lib/exec-oversky");
5
5
  class DaemonStart extends core_1.Command {
6
+ // `skrr daemons <sub>` — the plural is advertised as an alias for the
7
+ // whole topic, and without a per-command alias only the bare topic
8
+ // resolved: every subcommand under it failed.
9
+ static aliases = ['daemons:start'];
6
10
  static description = 'Start the local skrr daemon';
7
- static strict = false; // forward all args verbatim
11
+ static strict = false; // forward all args verbatim — see run()
8
12
  async run() {
9
- const { argv } = await this.parse(DaemonStart);
13
+ // `this.argv`, NOT `this.parse()`. `strict = false` relaxes POSITIONAL
14
+ // arity and oclif still rejects any flag this command has not declared —
15
+ // so the comment above was false and every `skrrd` flag was unreachable
16
+ // through the wrapper that exists to reach it. `skrr daemon status
17
+ // --profile dev` died with "Nonexistent flag: --profile" (OSK-296).
18
+ //
19
+ // Identical to the defect fixed on `skrr code` earlier the same day, whose
20
+ // own comment records `skrr code run -m <model>` dying the same way. Same
21
+ // mistake, one directory over.
22
+ const argv = this.argv;
10
23
  try {
11
24
  const code = await (0, exec_oversky_1.execOversky)(['start', ...argv]);
12
25
  this.exit(code);
@@ -1,5 +1,6 @@
1
1
  import { Command } from '@oclif/core';
2
2
  export default class DaemonStatus extends Command {
3
+ static aliases: string[];
3
4
  static description: string;
4
5
  static strict: boolean;
5
6
  run(): Promise<void>;
@@ -3,10 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const exec_oversky_1 = require("../../lib/exec-oversky");
5
5
  class DaemonStatus extends core_1.Command {
6
+ // `skrr daemons <sub>` — the plural is advertised as an alias for the
7
+ // whole topic, and without a per-command alias only the bare topic
8
+ // resolved: every subcommand under it failed.
9
+ static aliases = ['daemons:status'];
6
10
  static description = 'Show skrr daemon status (config, connection, services)';
7
11
  static strict = false;
8
12
  async run() {
9
- const { argv } = await this.parse(DaemonStatus);
13
+ // `this.argv`, NOT `this.parse()`. `strict = false` relaxes POSITIONAL
14
+ // arity and oclif still rejects any flag this command has not declared —
15
+ // so the comment above was false and every `skrrd` flag was unreachable
16
+ // through the wrapper that exists to reach it. `skrr daemon status
17
+ // --profile dev` died with "Nonexistent flag: --profile" (OSK-296).
18
+ //
19
+ // Identical to the defect fixed on `skrr code` earlier the same day, whose
20
+ // own comment records `skrr code run -m <model>` dying the same way. Same
21
+ // mistake, one directory over.
22
+ const argv = this.argv;
10
23
  try {
11
24
  const code = await (0, exec_oversky_1.execOversky)(['status', ...argv]);
12
25
  this.exit(code);
@@ -1,5 +1,6 @@
1
1
  import { Command } from '@oclif/core';
2
2
  export default class DaemonStop extends Command {
3
+ static aliases: string[];
3
4
  static description: string;
4
5
  static strict: boolean;
5
6
  run(): Promise<void>;
@@ -3,10 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const exec_oversky_1 = require("../../lib/exec-oversky");
5
5
  class DaemonStop extends core_1.Command {
6
+ // `skrr daemons <sub>` — the plural is advertised as an alias for the
7
+ // whole topic, and without a per-command alias only the bare topic
8
+ // resolved: every subcommand under it failed.
9
+ static aliases = ['daemons:stop'];
6
10
  static description = 'Stop the local skrr daemon';
7
11
  static strict = false;
8
12
  async run() {
9
- const { argv } = await this.parse(DaemonStop);
13
+ // `this.argv`, NOT `this.parse()`. `strict = false` relaxes POSITIONAL
14
+ // arity and oclif still rejects any flag this command has not declared —
15
+ // so the comment above was false and every `skrrd` flag was unreachable
16
+ // through the wrapper that exists to reach it. `skrr daemon status
17
+ // --profile dev` died with "Nonexistent flag: --profile" (OSK-296).
18
+ //
19
+ // Identical to the defect fixed on `skrr code` earlier the same day, whose
20
+ // own comment records `skrr code run -m <model>` dying the same way. Same
21
+ // mistake, one directory over.
22
+ const argv = this.argv;
10
23
  try {
11
24
  const code = await (0, exec_oversky_1.execOversky)(['stop', ...argv]);
12
25
  this.exit(code);
@@ -12,6 +12,7 @@ import { Command } from '@oclif/core';
12
12
  * on each platform.
13
13
  */
14
14
  export default class DaemonUninstall extends Command {
15
+ static aliases: string[];
15
16
  static description: string;
16
17
  static strict: boolean;
17
18
  run(): Promise<void>;
@@ -15,10 +15,23 @@ const exec_oversky_1 = require("../../lib/exec-oversky");
15
15
  * on each platform.
16
16
  */
17
17
  class DaemonUninstall extends core_1.Command {
18
+ // `skrr daemons <sub>` — the plural is advertised as an alias for the
19
+ // whole topic, and without a per-command alias only the bare topic
20
+ // resolved: every subcommand under it failed.
21
+ static aliases = ['daemons:uninstall'];
18
22
  static description = "Remove the local skrr runtime's background service (local state is left alone)";
19
- static strict = false; // forward all args verbatim
23
+ static strict = false; // forward all args verbatim — see run()
20
24
  async run() {
21
- const { argv } = await this.parse(DaemonUninstall);
25
+ // `this.argv`, NOT `this.parse()`. `strict = false` relaxes POSITIONAL
26
+ // arity and oclif still rejects any flag this command has not declared —
27
+ // so the comment above was false and every `skrrd` flag was unreachable
28
+ // through the wrapper that exists to reach it. `skrr daemon status
29
+ // --profile dev` died with "Nonexistent flag: --profile" (OSK-296).
30
+ //
31
+ // Identical to the defect fixed on `skrr code` earlier the same day, whose
32
+ // own comment records `skrr code run -m <model>` dying the same way. Same
33
+ // mistake, one directory over.
34
+ const argv = this.argv;
22
35
  try {
23
36
  const code = await (0, exec_oversky_1.execOversky)(['uninstall', ...argv]);
24
37
  this.exit(code);
@@ -3,6 +3,7 @@ import Daemon from './index';
3
3
  export declare function supportsDaemonUsage(helpText: string): boolean;
4
4
  /** Read-only bridge to `oversky usage` for local Claude Code/Codex limits. */
5
5
  export default class DaemonUsage extends Daemon {
6
+ static aliases: string[];
6
7
  static description: string;
7
8
  static flags: {
8
9
  provider: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;