@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.
- package/dist/base-command.d.ts +27 -0
- package/dist/base-command.js +83 -11
- package/dist/commands/agent/message/send.js +1 -1
- package/dist/commands/agents/chat.d.ts +1 -1
- package/dist/commands/agents/chat.js +1 -1
- package/dist/commands/browser/install.d.ts +1 -1
- package/dist/commands/browser/install.js +10 -2
- package/dist/commands/browser/mcp-config.js +3 -1
- package/dist/commands/browser/skill/show.js +1 -1
- package/dist/commands/browser/status.js +4 -1
- package/dist/commands/browser/uninstall.d.ts +1 -1
- package/dist/commands/browser/uninstall.js +10 -2
- package/dist/commands/browser.d.ts +1 -1
- package/dist/commands/browser.js +3 -3
- package/dist/commands/code/index.js +6 -3
- package/dist/commands/code/install.d.ts +61 -0
- package/dist/commands/code/install.js +247 -0
- package/dist/commands/code/oversky-agent.d.ts +2 -1
- package/dist/commands/code/oversky-agent.js +12 -8
- package/dist/commands/commands.js +1 -1
- package/dist/commands/context.js +1 -1
- package/dist/commands/create-token.js +1 -1
- package/dist/commands/daemon/byok.d.ts +1 -0
- package/dist/commands/daemon/byok.js +14 -1
- package/dist/commands/daemon/index.js +18 -7
- package/dist/commands/daemon/install.d.ts +1 -0
- package/dist/commands/daemon/install.js +22 -3
- package/dist/commands/daemon/logs.d.ts +1 -0
- package/dist/commands/daemon/logs.js +4 -0
- package/dist/commands/daemon/start.d.ts +1 -0
- package/dist/commands/daemon/start.js +15 -2
- package/dist/commands/daemon/status.d.ts +1 -0
- package/dist/commands/daemon/status.js +14 -1
- package/dist/commands/daemon/stop.d.ts +1 -0
- package/dist/commands/daemon/stop.js +14 -1
- package/dist/commands/daemon/uninstall.d.ts +1 -0
- package/dist/commands/daemon/uninstall.js +15 -2
- package/dist/commands/daemon/usage.d.ts +1 -0
- package/dist/commands/daemon/usage.js +5 -1
- package/dist/commands/doctor.js +2 -2
- package/dist/commands/github/allow-tools.d.ts +1 -0
- package/dist/commands/github/app/install.d.ts +1 -0
- package/dist/commands/github/app/status.d.ts +1 -0
- package/dist/commands/github/connect.d.ts +1 -0
- package/dist/commands/github/connections.d.ts +1 -0
- package/dist/commands/github/disconnect.d.ts +1 -0
- package/dist/commands/github/finalize.d.ts +1 -0
- package/dist/commands/github/reconnect.d.ts +1 -0
- package/dist/commands/github/run.d.ts +1 -0
- package/dist/commands/github/tools.d.ts +1 -0
- package/dist/commands/goals/create.js +2 -2
- package/dist/commands/goals/show.js +5 -0
- package/dist/commands/harnesses/list.js +14 -3
- package/dist/commands/harnesses/show.js +14 -0
- package/dist/commands/instructions/activate.js +1 -1
- package/dist/commands/instructions/archive-version.js +1 -1
- package/dist/commands/instructions/delete.js +1 -1
- package/dist/commands/instructions/diff.js +1 -1
- package/dist/commands/instructions/install.js +7 -1
- package/dist/commands/instructions/restore.js +1 -1
- package/dist/commands/instructions/show.js +17 -1
- package/dist/commands/instructions/update.js +1 -1
- package/dist/commands/integrations/connections/connect.d.ts +1 -0
- package/dist/commands/integrations/connections/disconnect.d.ts +1 -0
- package/dist/commands/integrations/connections/finalize.d.ts +1 -0
- package/dist/commands/integrations/connections/list.d.ts +1 -0
- package/dist/commands/integrations/connections/reconnect.d.ts +1 -0
- package/dist/commands/integrations/execute.d.ts +1 -0
- package/dist/commands/integrations/search.d.ts +1 -0
- package/dist/commands/integrations/toolkits.d.ts +1 -0
- package/dist/commands/integrations/tools/allow.d.ts +1 -0
- package/dist/commands/integrations/tools/list.d.ts +1 -0
- package/dist/commands/list-daemons.d.ts +2 -7
- package/dist/commands/list-daemons.js +13 -13
- package/dist/commands/login.js +78 -33
- package/dist/commands/logout.js +52 -1
- package/dist/commands/machines/hosted/start.js +1 -1
- package/dist/commands/pair.js +2 -2
- package/dist/commands/projects/create.js +6 -1
- package/dist/commands/projects/tasks.js +6 -1
- package/dist/commands/revoke-daemon.js +6 -2
- package/dist/commands/set-capabilities.js +6 -2
- package/dist/commands/skills/install.js +1 -1
- package/dist/commands/skills/library.js +2 -2
- package/dist/commands/spaces/create.js +6 -2
- package/dist/commands/tasks/complete.d.ts +1 -1
- package/dist/commands/tasks/complete.js +21 -8
- package/dist/commands/tasks/create.js +4 -1
- package/dist/commands/tasks/current.js +1 -1
- package/dist/commands/tasks/delete.d.ts +1 -0
- package/dist/commands/tasks/delete.js +9 -0
- package/dist/commands/tasks/export.js +5 -1
- package/dist/commands/tasks/follow-up.js +2 -1
- package/dist/commands/tasks/list.js +5 -1
- package/dist/commands/tasks/pr.js +1 -1
- package/dist/commands/tasks/show.js +10 -1
- package/dist/commands/tasks/triage.js +2 -1
- package/dist/commands/tasks/update.js +4 -1
- package/dist/commands/tasks/upsert.js +4 -1
- package/dist/commands/usage.js +1 -1
- package/dist/commands/whoami.js +4 -1
- package/dist/lib/agentic-stream.js +21 -1
- package/dist/lib/api-fetch.d.ts +1 -1
- package/dist/lib/api-fetch.js +1 -1
- package/dist/lib/auth-core-init.js +23 -3
- package/dist/lib/auth-storage.d.ts +0 -12
- package/dist/lib/auth-storage.js +37 -2
- package/dist/lib/config.d.ts +43 -3
- package/dist/lib/config.js +391 -31
- package/dist/lib/created-line.d.ts +22 -0
- package/dist/lib/created-line.js +25 -0
- package/dist/lib/daemon-binding.d.ts +29 -0
- package/dist/lib/daemon-binding.js +63 -0
- package/dist/lib/daemon-ref.d.ts +31 -0
- package/dist/lib/daemon-ref.js +47 -0
- package/dist/lib/daemonBroker.js +1 -1
- package/dist/lib/delegated-cli.js +3 -3
- package/dist/lib/exec-oversky.d.ts +18 -1
- package/dist/lib/exec-oversky.js +21 -4
- package/dist/lib/html-text.d.ts +15 -0
- package/dist/lib/html-text.js +40 -0
- package/dist/lib/keychain.d.ts +43 -0
- package/dist/lib/keychain.js +145 -4
- package/dist/lib/login.js +3 -3
- package/dist/lib/node-adapter.js +1 -1
- package/dist/lib/oauthLogin.js +17 -6
- package/dist/lib/sky-code-agent.d.ts +1 -1
- package/dist/lib/sky-code-agent.js +8 -8
- package/dist/lib/sky-code-broker.js +18 -2
- package/dist/lib/sky-code-doctor.js +120 -4
- package/dist/lib/sky-code-managed.d.ts +12 -0
- package/dist/lib/sky-code-managed.js +21 -7
- package/dist/lib/sky-code.d.ts +16 -1
- package/dist/lib/sky-code.js +110 -7
- package/dist/lib/task-execution.js +4 -11
- package/dist/lib/tasks.d.ts +1 -0
- package/dist/lib/tasks.js +9 -6
- package/dist/lib/update-check.js +1 -1
- package/dist/lib/usage-discovery.js +1 -1
- package/dist/lib/web-url.js +12 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialResolver.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialResolver.js +2 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +13 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/kek/linux.js +16 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/legacyStatePreflight.d.ts +0 -9
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/legacyStatePreflight.js +18 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/loginLocalhost.js +3 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/messages.js +3 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/runtime.d.ts +7 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/skyCodeChannels.d.ts +96 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/skyCodeChannels.js +115 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialResolver.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialResolver.js +2 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +1 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/kek/linux.js +16 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/legacyStatePreflight.d.ts +0 -9
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/legacyStatePreflight.js +18 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/loginLocalhost.js +3 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/messages.js +3 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/runtime.d.ts +7 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/skyCodeChannels.d.ts +96 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/skyCodeChannels.js +107 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +4206 -4191
- package/dist/node_modules/@skrr-ai/inference-broker/dist/cjs/managed-inference-broker.js +2 -2
- package/dist/node_modules/@skrr-ai/inference-broker/dist/esm/managed-inference-broker.js +2 -2
- package/oclif.manifest.json +7969 -1397
- 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
|
+
}
|