@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,96 @@
1
+ /**
2
+ * skrr Code update channels — the vocabulary, in the ONE place both readers resolve.
3
+ *
4
+ * It lived in `daemon/src/sky-code/channels.ts`, whose only importer was the
5
+ * daemon's own installer. That was fine while the daemon was the only thing that
6
+ * needed it, and it stopped being fine the moment a user could be told to go
7
+ * looking: `skrr code`'s not-installed message promised that `skrr code doctor`
8
+ * would name "which channel this machine follows and whether that channel has a
9
+ * published release", and the CLI had no access to any of it — so the sentence
10
+ * described a diagnosis nobody had written (dogfood OSK-274).
11
+ *
12
+ * A MIRROR in the CLI was the obvious alternative and is the wrong answer here,
13
+ * with precedent: OSK-3894 shipped exactly that for the harness trust tiers and
14
+ * OSK-3897 removed it, because a mirror proves two copies agree rather than
15
+ * proving there is one copy. `harnessTrust.ts` moved into this package for that
16
+ * reason, the daemon re-exports it, and a static check keeps the daemon from
17
+ * quietly redeclaring. This follows that road rather than reopening the one it
18
+ * replaced.
19
+ *
20
+ * Only the VOCABULARY moves — channel names, the env var, the default, and the
21
+ * URL shape. The installer, the signature verification and the promotion
22
+ * machinery stay in the daemon, which is the only process that performs them.
23
+ */
24
+ /** Channels in promotion order. Index order IS the promotion order. */
25
+ export declare const SKY_CODE_CHANNELS: readonly ["internal", "canary", "beta", "stable"];
26
+ export type SkyCodeChannel = (typeof SKY_CODE_CHANNELS)[number];
27
+ /**
28
+ * The channel a build without an explicit setting follows.
29
+ *
30
+ * `stable`, and never inferred from anything else. A default that drifted with
31
+ * the build (say, dev builds silently on `canary`) would mean a user's update
32
+ * path depended on how their binary happened to be produced.
33
+ */
34
+ export declare const DEFAULT_SKY_CODE_CHANNEL: SkyCodeChannel;
35
+ /** Env var selecting the channel. Explicit opt-in; never set implicitly. */
36
+ export declare const SKY_CODE_CHANNEL_ENV = "OVERSKY_SKY_CODE_CHANNEL";
37
+ /** Manifest filename, under a channel prefix or an immutable release prefix. */
38
+ export declare const SKY_CODE_MANIFEST_FILE = "sky-code-version.json";
39
+ export declare function isSkyCodeChannel(value: unknown): value is SkyCodeChannel;
40
+ /**
41
+ * The channel this process should follow.
42
+ *
43
+ * An unrecognised value falls back to the default rather than throwing. A
44
+ * typo'd channel must not brick updates altogether — that turns a harmless
45
+ * mistake into an un-updatable machine, which is the failure the updater exists
46
+ * to prevent. The caller is handed `invalid` so it can say so out loud.
47
+ */
48
+ export declare function resolveSkyCodeChannel(env?: NodeJS.ProcessEnv): {
49
+ channel: SkyCodeChannel;
50
+ invalid?: string;
51
+ };
52
+ /**
53
+ * Where a channel's signed manifest lives.
54
+ *
55
+ * `stable` is NOT special-cased to `latest/`. Two paths that must always agree
56
+ * is a pair that eventually will not, and the one that disagrees silently is
57
+ * the one serving production. `latest/` remains for the daemon feed and for
58
+ * anything already pointing at it; skrr Code channel clients read
59
+ * `channels/<name>/` uniformly.
60
+ */
61
+ export declare function skyCodeChannelPrefix(channel: SkyCodeChannel): string;
62
+ /**
63
+ * Manifest URL for a channel, or for a pinned version.
64
+ *
65
+ * A pinned version wins over the channel and reads its immutable per-release
66
+ * copy: pinning means "this exact build", and a channel pointer that moved
67
+ * underneath would make the pin a suggestion.
68
+ *
69
+ * Builds only MANIFEST urls, never artifact ones. `buildManifestMessage` signs
70
+ * version, minimum, forceUpdate and the per-platform sha256s; `buildArtifactMessage`
71
+ * signs the artifact URL. Neither signs a channel — so artifact URLs stay
72
+ * channel-independent and promotion is a COPY OF AN ALREADY-SIGNED OBJECT that
73
+ * never needs the release key. Put the channel in the artifact URL instead and
74
+ * every promotion becomes a re-signing ceremony, which decides whether the
75
+ * ed25519 key has to be reachable from routine automation. A helper here that
76
+ * adjusted artifact urls would silently reintroduce exactly that coupling.
77
+ */
78
+ export declare function resolveChannelManifestUrl(input: {
79
+ base: string;
80
+ manifestFilename: string;
81
+ channel: SkyCodeChannel;
82
+ pinnedVersion?: string | null;
83
+ }): string;
84
+ /** Default public feed. Mirrors the daemon's `updates.oversky.ai/daemon` prefix. */
85
+ export declare const DEFAULT_SKY_CODE_FEED_BASE = "https://updates.oversky.ai/sky-code";
86
+ /**
87
+ * Feed override, read at call time rather than module load so a test or an
88
+ * operator can repoint it without re-importing.
89
+ *
90
+ * Explicit-only: a production user must never be silently enrolled onto a
91
+ * different feed. Selecting a feed changes WHICH signed manifest is read, never
92
+ * WHETHER the signature is checked — every artifact is verified against the
93
+ * pinned keys regardless of where it came from.
94
+ */
95
+ export declare const SKY_CODE_FEED_BASE_ENV = "OVERSKY_SKY_CODE_UPDATE_FEED_BASE";
96
+ export declare function skyCodeFeedBase(env?: NodeJS.ProcessEnv): string;
@@ -0,0 +1,107 @@
1
+ /**
2
+ * skrr Code update channels — the vocabulary, in the ONE place both readers resolve.
3
+ *
4
+ * It lived in `daemon/src/sky-code/channels.ts`, whose only importer was the
5
+ * daemon's own installer. That was fine while the daemon was the only thing that
6
+ * needed it, and it stopped being fine the moment a user could be told to go
7
+ * looking: `skrr code`'s not-installed message promised that `skrr code doctor`
8
+ * would name "which channel this machine follows and whether that channel has a
9
+ * published release", and the CLI had no access to any of it — so the sentence
10
+ * described a diagnosis nobody had written (dogfood OSK-274).
11
+ *
12
+ * A MIRROR in the CLI was the obvious alternative and is the wrong answer here,
13
+ * with precedent: OSK-3894 shipped exactly that for the harness trust tiers and
14
+ * OSK-3897 removed it, because a mirror proves two copies agree rather than
15
+ * proving there is one copy. `harnessTrust.ts` moved into this package for that
16
+ * reason, the daemon re-exports it, and a static check keeps the daemon from
17
+ * quietly redeclaring. This follows that road rather than reopening the one it
18
+ * replaced.
19
+ *
20
+ * Only the VOCABULARY moves — channel names, the env var, the default, and the
21
+ * URL shape. The installer, the signature verification and the promotion
22
+ * machinery stay in the daemon, which is the only process that performs them.
23
+ */
24
+ /** Channels in promotion order. Index order IS the promotion order. */
25
+ export const SKY_CODE_CHANNELS = ['internal', 'canary', 'beta', 'stable'];
26
+ /**
27
+ * The channel a build without an explicit setting follows.
28
+ *
29
+ * `stable`, and never inferred from anything else. A default that drifted with
30
+ * the build (say, dev builds silently on `canary`) would mean a user's update
31
+ * path depended on how their binary happened to be produced.
32
+ */
33
+ export const DEFAULT_SKY_CODE_CHANNEL = 'stable';
34
+ /** Env var selecting the channel. Explicit opt-in; never set implicitly. */
35
+ export const SKY_CODE_CHANNEL_ENV = 'OVERSKY_SKY_CODE_CHANNEL';
36
+ /** Manifest filename, under a channel prefix or an immutable release prefix. */
37
+ export const SKY_CODE_MANIFEST_FILE = 'sky-code-version.json';
38
+ export function isSkyCodeChannel(value) {
39
+ return typeof value === 'string' && SKY_CODE_CHANNELS.includes(value);
40
+ }
41
+ /**
42
+ * The channel this process should follow.
43
+ *
44
+ * An unrecognised value falls back to the default rather than throwing. A
45
+ * typo'd channel must not brick updates altogether — that turns a harmless
46
+ * mistake into an un-updatable machine, which is the failure the updater exists
47
+ * to prevent. The caller is handed `invalid` so it can say so out loud.
48
+ */
49
+ export function resolveSkyCodeChannel(env = process.env) {
50
+ const raw = env[SKY_CODE_CHANNEL_ENV]?.trim();
51
+ if (!raw)
52
+ return { channel: DEFAULT_SKY_CODE_CHANNEL };
53
+ if (isSkyCodeChannel(raw))
54
+ return { channel: raw };
55
+ return { channel: DEFAULT_SKY_CODE_CHANNEL, invalid: raw };
56
+ }
57
+ /**
58
+ * Where a channel's signed manifest lives.
59
+ *
60
+ * `stable` is NOT special-cased to `latest/`. Two paths that must always agree
61
+ * is a pair that eventually will not, and the one that disagrees silently is
62
+ * the one serving production. `latest/` remains for the daemon feed and for
63
+ * anything already pointing at it; skrr Code channel clients read
64
+ * `channels/<name>/` uniformly.
65
+ */
66
+ export function skyCodeChannelPrefix(channel) {
67
+ return `channels/${channel}/`;
68
+ }
69
+ /**
70
+ * Manifest URL for a channel, or for a pinned version.
71
+ *
72
+ * A pinned version wins over the channel and reads its immutable per-release
73
+ * copy: pinning means "this exact build", and a channel pointer that moved
74
+ * underneath would make the pin a suggestion.
75
+ *
76
+ * Builds only MANIFEST urls, never artifact ones. `buildManifestMessage` signs
77
+ * version, minimum, forceUpdate and the per-platform sha256s; `buildArtifactMessage`
78
+ * signs the artifact URL. Neither signs a channel — so artifact URLs stay
79
+ * channel-independent and promotion is a COPY OF AN ALREADY-SIGNED OBJECT that
80
+ * never needs the release key. Put the channel in the artifact URL instead and
81
+ * every promotion becomes a re-signing ceremony, which decides whether the
82
+ * ed25519 key has to be reachable from routine automation. A helper here that
83
+ * adjusted artifact urls would silently reintroduce exactly that coupling.
84
+ */
85
+ export function resolveChannelManifestUrl(input) {
86
+ const base = input.base.replace(/\/+$/, '');
87
+ if (input.pinnedVersion) {
88
+ return `${base}/releases/${input.pinnedVersion}/${input.manifestFilename}`;
89
+ }
90
+ return `${base}/${skyCodeChannelPrefix(input.channel)}${input.manifestFilename}`;
91
+ }
92
+ /** Default public feed. Mirrors the daemon's `updates.oversky.ai/daemon` prefix. */
93
+ export const DEFAULT_SKY_CODE_FEED_BASE = 'https://updates.oversky.ai/sky-code';
94
+ /**
95
+ * Feed override, read at call time rather than module load so a test or an
96
+ * operator can repoint it without re-importing.
97
+ *
98
+ * Explicit-only: a production user must never be silently enrolled onto a
99
+ * different feed. Selecting a feed changes WHICH signed manifest is read, never
100
+ * WHETHER the signature is checked — every artifact is verified against the
101
+ * pinned keys regardless of where it came from.
102
+ */
103
+ export const SKY_CODE_FEED_BASE_ENV = 'OVERSKY_SKY_CODE_UPDATE_FEED_BASE';
104
+ export function skyCodeFeedBase(env = process.env) {
105
+ const override = (env[SKY_CODE_FEED_BASE_ENV] || '').trim();
106
+ return (override || DEFAULT_SKY_CODE_FEED_BASE).replace(/\/+$/, '');
107
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skrr-ai/auth-core",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "main": "dist/cjs/index.js",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "exports": {