@skrr-ai/cli 0.1.42 → 0.1.44
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 +2 -0
- package/dist/base-command.js +1 -0
- package/dist/commands/balance/index.js +1 -1
- package/dist/commands/balance/overage.js +4 -3
- package/dist/commands/balance/plan.js +10 -6
- package/dist/commands/balance/show.d.ts +32 -0
- package/dist/commands/balance/show.js +74 -3
- package/dist/commands/balance/usage/events.js +3 -2
- package/dist/commands/balance/usage.js +2 -1
- package/dist/commands/browser/install.js +3 -2
- package/dist/commands/browser/uninstall.js +3 -2
- package/dist/commands/code/handover.d.ts +1 -0
- package/dist/commands/code/handover.js +4 -0
- package/dist/commands/code/install.js +3 -2
- package/dist/commands/code/jobs/run.d.ts +1 -0
- package/dist/commands/code/jobs/run.js +4 -0
- package/dist/commands/daemon/install.js +7 -0
- package/dist/commands/harnesses/install.d.ts +11 -0
- package/dist/commands/harnesses/install.js +33 -14
- package/dist/commands/harnesses/installers.d.ts +10 -0
- package/dist/commands/harnesses/installers.js +31 -0
- package/dist/commands/harnesses/leases/show.js +14 -0
- package/dist/commands/harnesses/list.js +3 -2
- package/dist/commands/instructions/install.d.ts +22 -0
- package/dist/commands/instructions/install.js +83 -7
- package/dist/commands/instructions/list.js +5 -0
- package/dist/commands/instructions/show.d.ts +6 -0
- package/dist/commands/instructions/show.js +34 -1
- package/dist/commands/instructions/status.js +17 -1
- package/dist/commands/payments/wallet.js +2 -2
- package/dist/commands/tasks/attachments/set-role.d.ts +24 -0
- package/dist/commands/tasks/attachments/set-role.js +60 -0
- package/dist/commands/tasks/attachments/upload.d.ts +1 -0
- package/dist/commands/tasks/attachments/upload.js +18 -52
- package/dist/commands/tasks/comments/add.d.ts +1 -0
- package/dist/commands/tasks/comments/add.js +67 -2
- package/dist/commands/tasks/complete.d.ts +1 -0
- package/dist/commands/tasks/complete.js +56 -1
- package/dist/commands/tasks/create.d.ts +6 -0
- package/dist/commands/tasks/create.js +26 -3
- package/dist/commands/tasks/labels/attach.js +4 -0
- package/dist/commands/tasks/list.d.ts +1 -0
- package/dist/commands/tasks/list.js +9 -0
- package/dist/commands/tasks/result/submit.d.ts +3 -0
- package/dist/commands/tasks/result/submit.js +76 -8
- package/dist/commands/tasks/show.d.ts +23 -0
- package/dist/commands/tasks/show.js +61 -1
- package/dist/commands/tasks/update.js +16 -2
- package/dist/commands/tasks/updates/add.d.ts +1 -0
- package/dist/commands/tasks/updates/add.js +63 -0
- package/dist/commands/views/create.js +12 -2
- package/dist/commands/views/list.js +3 -2
- package/dist/commands/views/show.js +2 -0
- package/dist/lib/agentic-stream.d.ts +10 -4
- package/dist/lib/agentic-stream.js +25 -11
- package/dist/lib/api-fetch.js +7 -2
- package/dist/lib/cli-installers.d.ts +23 -4
- package/dist/lib/cli-installers.js +56 -8
- package/dist/lib/daemon-setup.d.ts +18 -1
- package/dist/lib/daemon-setup.js +33 -1
- package/dist/lib/dedicated-machines.js +4 -2
- package/dist/lib/file-mime.js +1 -1
- package/dist/lib/first-party-harness-agent.d.ts +16 -1
- package/dist/lib/first-party-harness-agent.js +47 -17
- package/dist/lib/first-party-harness-doctor.js +49 -48
- package/dist/lib/first-party-harness-managed.d.ts +9 -4
- package/dist/lib/first-party-harness-managed.js +13 -10
- package/dist/lib/first-party-harness.d.ts +32 -21
- package/dist/lib/first-party-harness.js +49 -31
- package/dist/lib/harness-provider-input.d.ts +18 -12
- package/dist/lib/harness-provider-input.js +18 -12
- package/dist/lib/harness-tiers.d.ts +4 -3
- package/dist/lib/harness-tiers.js +4 -3
- package/dist/lib/harnesses.d.ts +6 -0
- package/dist/lib/html-text.js +25 -0
- package/dist/lib/instruction-input.d.ts +21 -0
- package/dist/lib/instruction-input.js +30 -0
- package/dist/lib/instruction-provenance.d.ts +54 -0
- package/dist/lib/instruction-provenance.js +84 -0
- package/dist/lib/session-task-endpoints.d.ts +1 -1
- package/dist/lib/session-task-endpoints.js +3 -0
- package/dist/lib/task-asset-upload.d.ts +84 -0
- package/dist/lib/task-asset-upload.js +374 -0
- package/dist/lib/task-closure.d.ts +15 -0
- package/dist/lib/task-closure.js +20 -0
- package/dist/lib/task-view-render.d.ts +14 -0
- package/dist/lib/task-view-render.js +55 -0
- package/dist/lib/tasks.d.ts +26 -0
- package/dist/lib/tasks.js +38 -1
- package/dist/lib/views/vocabulary.d.ts +1 -1
- package/dist/lib/views/vocabulary.js +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.d.ts +183 -58
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.js +286 -100
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessChannels.d.ts +21 -33
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessChannels.js +24 -50
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessHome.d.ts +19 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessHome.js +26 -10
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessTrust.d.ts +9 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessTrust.js +9 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +1 -13
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/legacyStatePreflight.d.ts +21 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/legacyStatePreflight.js +75 -19
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.d.ts +183 -58
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.js +279 -99
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessChannels.d.ts +21 -33
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessChannels.js +24 -49
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessHome.d.ts +19 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessHome.js +27 -11
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessTrust.d.ts +9 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessTrust.js +9 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +1 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/legacyStatePreflight.d.ts +21 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/legacyStatePreflight.js +74 -19
- package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +4588 -4509
- package/dist/node_modules/@skrr-ai/data-provider/package.json +1 -1
- package/oclif.manifest.json +33980 -33832
- package/package.json +3 -3
|
@@ -24,25 +24,40 @@
|
|
|
24
24
|
* phase, once every peer accepts the new one;
|
|
25
25
|
* 4. regenerate `first-party-harness.json`
|
|
26
26
|
* (`node --import tsx scripts/emit-first-party-harness-json.mjs`);
|
|
27
|
-
* 5. ship the data migration, which is generic over `aliases
|
|
27
|
+
* 5. ship the data migration, which is generic over `aliases` and
|
|
28
|
+
* `formerSpellings`;
|
|
29
|
+
* 6. at that rename's contract, move the spelling from `aliases` to the front
|
|
30
|
+
* of `formerSpellings`.
|
|
28
31
|
*
|
|
29
32
|
* No identifier, file, env var name or workflow input moves.
|
|
30
33
|
*
|
|
31
|
-
* ──
|
|
34
|
+
* ── Four fields, kept apart on purpose ────────────────────────────────────
|
|
32
35
|
*
|
|
33
|
-
* `provider`
|
|
34
|
-
* `aliases`
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
36
|
+
* `provider` CANONICAL. What the platform stores, returns and renders.
|
|
37
|
+
* `aliases` ACCEPTED on every ingress during a rename's window, and
|
|
38
|
+
* normalised to canonical at the edge. Nothing new is ever
|
|
39
|
+
* written with one. Empty between renames.
|
|
40
|
+
* `formerSpellings` RETIRED. Accepted on NO ingress: no HTTP body, enum, Mongo
|
|
41
|
+
* filter, capability, wire event, CLI flag or trust table
|
|
42
|
+
* admits one. Recognised only where an ARTIFACT that predates
|
|
43
|
+
* the rename is read — a binary already installed, a checkout
|
|
44
|
+
* directory already on disk, a release already published
|
|
45
|
+
* under its prefix, a row or config key already written.
|
|
46
|
+
* Those exist whatever the platform accepts, and dropping a
|
|
47
|
+
* spelling from this list does not make them go away. Read it
|
|
48
|
+
* through `firstPartyHarnessArtifactSpellings`, never as an
|
|
49
|
+
* ingress check.
|
|
50
|
+
* `wireProvider` What the server and a daemon say to EACH OTHER — the
|
|
51
|
+
* capability a daemon advertises,
|
|
52
|
+
* `daemon:<p>:request|response`, the `provider` of a session
|
|
53
|
+
* RPC. It moves after the flip and BEFORE contract, because a
|
|
54
|
+
* daemon on a user's machine may be any version and the
|
|
55
|
+
* server cannot tell which one sent a request: only a
|
|
56
|
+
* released daemon that already advertises the canonical
|
|
57
|
+
* capability lets the old one age out of the fleet.
|
|
43
58
|
*
|
|
44
|
-
* The old code treated
|
|
45
|
-
*
|
|
59
|
+
* The old code treated these as one string, which is why no single change could
|
|
60
|
+
* rename it safely. See
|
|
46
61
|
* `docs/architecture/skrr-code-identifier-rename-2026-09-13.md`.
|
|
47
62
|
*
|
|
48
63
|
* ── Constraints on this file ──────────────────────────────────────────────
|
|
@@ -56,38 +71,43 @@
|
|
|
56
71
|
const SLUG = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
57
72
|
function defineIdentity(identity) {
|
|
58
73
|
const spellings = [identity.provider, ...identity.aliases];
|
|
59
|
-
|
|
74
|
+
const every = [...spellings, ...identity.formerSpellings];
|
|
75
|
+
for (const spelling of every) {
|
|
60
76
|
if (!SLUG.test(spelling)) {
|
|
61
77
|
throw new Error(`first-party harness spelling ${JSON.stringify(spelling)} is not a slug; it becomes a ` +
|
|
62
78
|
`directory name, a capability prefix and a wire event segment`);
|
|
63
79
|
}
|
|
64
80
|
}
|
|
65
|
-
if (new Set(
|
|
66
|
-
throw new Error('first-party harness provider and
|
|
81
|
+
if (new Set(every).size !== every.length) {
|
|
82
|
+
throw new Error('first-party harness provider, aliases and formerSpellings must be distinct — a spelling ' +
|
|
83
|
+
'is accepted or retired, never both');
|
|
67
84
|
}
|
|
68
85
|
if (!spellings.includes(identity.wireProvider)) {
|
|
69
86
|
throw new Error(`first-party harness wireProvider ${JSON.stringify(identity.wireProvider)} must be the ` +
|
|
70
87
|
'provider or one of its aliases — a peer can only accept a spelling it knows');
|
|
71
88
|
}
|
|
72
|
-
return Object.freeze({
|
|
89
|
+
return Object.freeze({
|
|
90
|
+
...identity,
|
|
91
|
+
aliases: Object.freeze([...identity.aliases]),
|
|
92
|
+
formerSpellings: Object.freeze([...identity.formerSpellings]),
|
|
93
|
+
});
|
|
73
94
|
}
|
|
74
95
|
/** The canonical slug. Written once, and read by every field that names the current spelling. */
|
|
75
96
|
const PROVIDER = 'skrr-code';
|
|
76
97
|
/**
|
|
77
98
|
* THE identity — the only literal product name in the codebase.
|
|
78
99
|
*
|
|
79
|
-
* Phase:
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* that speaks `skrr-code`, and the reverse. Contract (OSK-8663) empties
|
|
84
|
-
* `aliases` once no connected daemon still advertises the old capability.
|
|
100
|
+
* Phase: CONTRACTED (OSK-8663). `skrr-code` is the only spelling any ingress
|
|
101
|
+
* accepts and the only one on the wire. `sky-code` is retired: nothing admits
|
|
102
|
+
* it, and it is still recognised where a binary, a checkout, a published
|
|
103
|
+
* release or a stored value written before the rename is looked for.
|
|
85
104
|
*/
|
|
86
105
|
const IDENTITY = {
|
|
87
106
|
displayName: 'skrr Code',
|
|
88
107
|
command: 'skrr code',
|
|
89
108
|
provider: PROVIDER,
|
|
90
|
-
aliases: [
|
|
109
|
+
aliases: [],
|
|
110
|
+
formerSpellings: ['sky-code'],
|
|
91
111
|
wireProvider: PROVIDER,
|
|
92
112
|
};
|
|
93
113
|
export const FIRST_PARTY_HARNESS = defineIdentity(IDENTITY);
|
|
@@ -98,6 +118,11 @@ const SPELLINGS = Object.freeze([
|
|
|
98
118
|
...FIRST_PARTY_HARNESS.aliases,
|
|
99
119
|
]);
|
|
100
120
|
const SPELLING_SET = new Set(SPELLINGS);
|
|
121
|
+
const ARTIFACT_SPELLINGS = Object.freeze([
|
|
122
|
+
...SPELLINGS,
|
|
123
|
+
...FIRST_PARTY_HARNESS.formerSpellings,
|
|
124
|
+
]);
|
|
125
|
+
const ARTIFACT_SPELLING_SET = new Set(ARTIFACT_SPELLINGS);
|
|
101
126
|
const SESSION_SUFFIX = '_session';
|
|
102
127
|
const ENVIRONMENT_PREFIX = 'local-';
|
|
103
128
|
function asSlug(value) {
|
|
@@ -106,10 +131,30 @@ function asSlug(value) {
|
|
|
106
131
|
const slug = value.trim().toLowerCase();
|
|
107
132
|
return slug ? slug : null;
|
|
108
133
|
}
|
|
109
|
-
/**
|
|
134
|
+
/**
|
|
135
|
+
* Every ACCEPTED spelling, canonical first — what an ingress admits. The order
|
|
136
|
+
* is the resolution order.
|
|
137
|
+
*/
|
|
110
138
|
export function firstPartyHarnessSpellings() {
|
|
111
139
|
return SPELLINGS;
|
|
112
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Every spelling an ARTIFACT that already exists may carry, canonical first:
|
|
143
|
+
* the accepted spellings, then every former one.
|
|
144
|
+
*
|
|
145
|
+
* For code that LOOKS FOR what an earlier release left behind — an installed
|
|
146
|
+
* binary, a checkout directory, an immutable published release, a stored value
|
|
147
|
+
* or config key — and for the tooling that must keep recognising those
|
|
148
|
+
* (ignore lists, the identity ratchet). A machine that never ran a post-rename
|
|
149
|
+
* client still has its engine under the old name, and it must still be found.
|
|
150
|
+
*
|
|
151
|
+
* Never an ingress check: a former spelling is not accepted anywhere, and a
|
|
152
|
+
* reader that admitted one here would silently reopen what contract closed. Use
|
|
153
|
+
* `firstPartyHarnessSpellings` / `isFirstPartyHarnessProvider` for that.
|
|
154
|
+
*/
|
|
155
|
+
export function firstPartyHarnessArtifactSpellings() {
|
|
156
|
+
return ARTIFACT_SPELLINGS;
|
|
157
|
+
}
|
|
113
158
|
/** True for the canonical provider or any alias (case- and whitespace-insensitive). */
|
|
114
159
|
export function isFirstPartyHarnessProvider(value) {
|
|
115
160
|
const slug = asSlug(value);
|
|
@@ -123,6 +168,27 @@ export function isFirstPartyHarnessProvider(value) {
|
|
|
123
168
|
export function canonicalHarnessProvider(value) {
|
|
124
169
|
return isFirstPartyHarnessProvider(value) ? FIRST_PARTY_HARNESS.provider : value;
|
|
125
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* The canonical provider for a value read back from an ARTIFACT that may predate
|
|
173
|
+
* a rename — any artifact spelling (canonical, alias or FORMER) becomes the
|
|
174
|
+
* provider; every other value is returned unchanged.
|
|
175
|
+
*
|
|
176
|
+
* For values nobody migrates and nobody can refuse: a harness row's stored
|
|
177
|
+
* display NAME (the operator migration rewrites `provider`, never `name`), a
|
|
178
|
+
* daemon's config file, a harness session binding on a user's machine. Read raw
|
|
179
|
+
* after contract, each would name an unknown provider — a label that renders the
|
|
180
|
+
* retired name again, a local session silently running another backend, a live
|
|
181
|
+
* resume context reset as new — with no error anywhere.
|
|
182
|
+
*
|
|
183
|
+
* NEVER for anything a peer, a client or an operator SENDS, and never for a
|
|
184
|
+
* trust, dispatch or admission decision: a former spelling is accepted on no
|
|
185
|
+
* ingress, and canonicalising one here would reopen what contract closed. Use
|
|
186
|
+
* `canonicalHarnessProvider` for those.
|
|
187
|
+
*/
|
|
188
|
+
export function canonicalArtifactHarnessProvider(value) {
|
|
189
|
+
const slug = asSlug(value);
|
|
190
|
+
return slug !== null && ARTIFACT_SPELLING_SET.has(slug) ? FIRST_PARTY_HARNESS.provider : value;
|
|
191
|
+
}
|
|
126
192
|
/**
|
|
127
193
|
* Every spelling a stored row for this provider may carry, canonical first —
|
|
128
194
|
* for a Mongo `$in` filter while rows written before a flip still exist. Any
|
|
@@ -202,9 +268,18 @@ export function canonicalExecutionEnvironment(value) {
|
|
|
202
268
|
export function firstPartyHarnessBinaryName(provider = FIRST_PARTY_HARNESS.provider, platform) {
|
|
203
269
|
return platform === 'win32' ? `${provider}.exe` : provider;
|
|
204
270
|
}
|
|
205
|
-
/**
|
|
271
|
+
/**
|
|
272
|
+
* Every binary file name an install may carry, canonical first — the lookup
|
|
273
|
+
* order, and the names an install links to the canonical binary.
|
|
274
|
+
*
|
|
275
|
+
* Built from the ARTIFACT spellings, former ones included: binaries are
|
|
276
|
+
* artifacts. An engine installed before a rename is still on disk under its old
|
|
277
|
+
* name, and a platform CLI or daemon built before it still looks for that name,
|
|
278
|
+
* so resolvers try it and installers leave a link at it. Neither makes the
|
|
279
|
+
* spelling acceptable on any ingress.
|
|
280
|
+
*/
|
|
206
281
|
export function firstPartyHarnessBinaryNames(platform) {
|
|
207
|
-
return
|
|
282
|
+
return ARTIFACT_SPELLINGS.map((spelling) => firstPartyHarnessBinaryName(spelling, platform));
|
|
208
283
|
}
|
|
209
284
|
/**
|
|
210
285
|
* The engine home directory name under the skrr config root.
|
|
@@ -215,7 +290,8 @@ export function firstPartyHarnessBinaryNames(platform) {
|
|
|
215
290
|
* the managed `AGENTS.md` from `<home>`. Deriving it from the provider would, on
|
|
216
291
|
* a fresh install after a provider rename, create a second directory the engine
|
|
217
292
|
* never reads — managed instructions would stop applying with no error. It moves
|
|
218
|
-
* when the engine's namespace moves, and not before
|
|
293
|
+
* when the engine's namespace moves, and not before; it did in OSK-8674, and
|
|
294
|
+
* `migrateFirstPartyHarnessHome` moves a home under a legacy name onto it.
|
|
219
295
|
*/
|
|
220
296
|
export function firstPartyHarnessHomeDirname() {
|
|
221
297
|
return FIRST_PARTY_HARNESS_ENGINE.appName;
|
|
@@ -233,7 +309,13 @@ export const FIRST_PARTY_HARNESS_FEED_ORIGIN = 'https://updates.oversky.ai';
|
|
|
233
309
|
export function firstPartyHarnessFeedPrefix(provider = FIRST_PARTY_HARNESS.provider) {
|
|
234
310
|
return `${provider}/`;
|
|
235
311
|
}
|
|
236
|
-
/**
|
|
312
|
+
/**
|
|
313
|
+
* Every feed prefix a publish WRITES, canonical first: the accepted spellings.
|
|
314
|
+
*
|
|
315
|
+
* A former spelling's prefix still holds every release published under it, and
|
|
316
|
+
* those stay served — their artifact URLs are inside signed manifests — but
|
|
317
|
+
* nothing new is written there, so its channel pointers stop moving at contract.
|
|
318
|
+
*/
|
|
237
319
|
export function firstPartyHarnessFeedPrefixes() {
|
|
238
320
|
return SPELLINGS.map((spelling) => firstPartyHarnessFeedPrefix(spelling));
|
|
239
321
|
}
|
|
@@ -245,97 +327,195 @@ export function firstPartyHarnessStagingPrefix(provider = FIRST_PARTY_HARNESS.pr
|
|
|
245
327
|
export function firstPartyHarnessDefaultFeedBase(provider = FIRST_PARTY_HARNESS.provider) {
|
|
246
328
|
return `${FIRST_PARTY_HARNESS_FEED_ORIGIN}/${provider}`;
|
|
247
329
|
}
|
|
248
|
-
function envName(name
|
|
249
|
-
return Object.freeze({ name
|
|
330
|
+
function envName(name) {
|
|
331
|
+
return Object.freeze({ name });
|
|
250
332
|
}
|
|
251
333
|
/**
|
|
252
|
-
* Every environment variable the
|
|
253
|
-
*
|
|
254
|
-
* one
|
|
255
|
-
*
|
|
334
|
+
* Every environment variable the PLATFORM reads for the first-party harness, by
|
|
335
|
+
* purpose, under one brand-neutral name each — so a product rename never renames
|
|
336
|
+
* one.
|
|
337
|
+
*
|
|
338
|
+
* The product-named variables these replaced were read second until contract
|
|
339
|
+
* (OSK-8663) and are not read at all now. The ENGINE's own variables are a
|
|
340
|
+
* different namespace (`FIRST_PARTY_HARNESS_ENGINE.env`): the fork reads them,
|
|
341
|
+
* so a platform reader that must agree with the engine consults the engine's
|
|
342
|
+
* names explicitly (`readFirstPartyHarnessEngineEnv`) — the engine home is the
|
|
343
|
+
* one case (`home` below).
|
|
256
344
|
*/
|
|
257
345
|
export const FIRST_PARTY_HARNESS_ENV = Object.freeze({
|
|
258
346
|
/** Absolute path to an engine binary, overriding resolution. */
|
|
259
|
-
path: envName('SKRR_FIRST_PARTY_HARNESS_PATH'
|
|
347
|
+
path: envName('SKRR_FIRST_PARTY_HARNESS_PATH'),
|
|
260
348
|
/** Forces the CLI's managed-inference mode. */
|
|
261
|
-
managed: envName('SKRR_FIRST_PARTY_HARNESS_MANAGED'
|
|
349
|
+
managed: envName('SKRR_FIRST_PARTY_HARNESS_MANAGED'),
|
|
262
350
|
/** Update channel. */
|
|
263
|
-
channel: envName('SKRR_FIRST_PARTY_HARNESS_CHANNEL'
|
|
351
|
+
channel: envName('SKRR_FIRST_PARTY_HARNESS_CHANNEL'),
|
|
264
352
|
/** Update-feed base URL override. */
|
|
265
|
-
updateFeedBase: envName('SKRR_FIRST_PARTY_HARNESS_UPDATE_FEED_BASE',
|
|
266
|
-
'OVERSKY_SKY_CODE_UPDATE_FEED_BASE',
|
|
267
|
-
]),
|
|
353
|
+
updateFeedBase: envName('SKRR_FIRST_PARTY_HARNESS_UPDATE_FEED_BASE'),
|
|
268
354
|
/** Path to a file of development release keys. */
|
|
269
|
-
devKeys: envName('SKRR_FIRST_PARTY_HARNESS_DEV_KEYS'
|
|
355
|
+
devKeys: envName('SKRR_FIRST_PARTY_HARNESS_DEV_KEYS'),
|
|
270
356
|
/** Engine version the desktop build bundles. */
|
|
271
|
-
bundleVersion: envName('SKRR_FIRST_PARTY_HARNESS_BUNDLE_VERSION'
|
|
272
|
-
/**
|
|
273
|
-
|
|
357
|
+
bundleVersion: envName('SKRR_FIRST_PARTY_HARNESS_BUNDLE_VERSION'),
|
|
358
|
+
/**
|
|
359
|
+
* Engine home override. The engine reads only its own variable, under every
|
|
360
|
+
* name it has had (`readFirstPartyHarnessEngineEnv(env, 'home')`), so a reader
|
|
361
|
+
* that resolves the home the engine will use reads those second, and a
|
|
362
|
+
* launcher hands the engine the resolved path under every one of them
|
|
363
|
+
* (`firstPartyHarnessEngineEnvEntries`).
|
|
364
|
+
*/
|
|
365
|
+
home: envName('SKRR_FIRST_PARTY_HARNESS_HOME'),
|
|
274
366
|
/** Engine version baked into the cloud-coding image. */
|
|
275
|
-
cloudCodingVersion: envName('CLOUD_CODING_FIRST_PARTY_HARNESS_VERSION',
|
|
276
|
-
'CLOUD_CODING_SKY_CODE_VERSION',
|
|
277
|
-
]),
|
|
367
|
+
cloudCodingVersion: envName('CLOUD_CODING_FIRST_PARTY_HARNESS_VERSION'),
|
|
278
368
|
/** Engine version baked into the Dedicated Runtime AMI. */
|
|
279
|
-
dedicatedRuntimeVersion: envName('SKRR_DEDICATED_RUNTIME_FIRST_PARTY_HARNESS_VERSION',
|
|
280
|
-
'SKRR_DEDICATED_RUNTIME_SKY_CODE_VERSION',
|
|
281
|
-
]),
|
|
369
|
+
dedicatedRuntimeVersion: envName('SKRR_DEDICATED_RUNTIME_FIRST_PARTY_HARNESS_VERSION'),
|
|
282
370
|
/** Engine version the desktop release workflow bundles. */
|
|
283
|
-
desktopBundledVersion: envName('DESKTOP_BUNDLED_FIRST_PARTY_HARNESS_VERSION',
|
|
284
|
-
'DESKTOP_BUNDLED_SKY_CODE_VERSION',
|
|
285
|
-
]),
|
|
371
|
+
desktopBundledVersion: envName('DESKTOP_BUNDLED_FIRST_PARTY_HARNESS_VERSION'),
|
|
286
372
|
/** Update-feed bucket used by publish and promote. */
|
|
287
|
-
updatesBucket: envName('FIRST_PARTY_HARNESS_UPDATES_BUCKET'
|
|
373
|
+
updatesBucket: envName('FIRST_PARTY_HARNESS_UPDATES_BUCKET'),
|
|
288
374
|
/** Release signing key (CI secret). */
|
|
289
|
-
signingKey: envName('FIRST_PARTY_HARNESS_SIGNING_KEY'
|
|
375
|
+
signingKey: envName('FIRST_PARTY_HARNESS_SIGNING_KEY'),
|
|
290
376
|
/** Release signing key id (CI secret). */
|
|
291
|
-
signingKeyId: envName('FIRST_PARTY_HARNESS_SIGNING_KEY_ID'
|
|
377
|
+
signingKeyId: envName('FIRST_PARTY_HARNESS_SIGNING_KEY_ID'),
|
|
292
378
|
});
|
|
293
|
-
/**
|
|
294
|
-
export function firstPartyHarnessEnvNames(key) {
|
|
295
|
-
const entry = FIRST_PARTY_HARNESS_ENV[key];
|
|
296
|
-
return [entry.name, ...entry.legacy];
|
|
297
|
-
}
|
|
298
|
-
/** Read one purpose's variable: neutral name first, legacy names after. */
|
|
379
|
+
/** Read one purpose's variable. A blank value counts as unset. */
|
|
299
380
|
export function readFirstPartyHarnessEnv(env, key) {
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
return { value: raw.trim(), name, legacy: name !== entry.name };
|
|
305
|
-
}
|
|
381
|
+
const { name } = FIRST_PARTY_HARNESS_ENV[key];
|
|
382
|
+
const raw = env[name];
|
|
383
|
+
if (typeof raw === 'string' && raw.trim() !== '') {
|
|
384
|
+
return { value: raw.trim(), name };
|
|
306
385
|
}
|
|
307
|
-
return { value: undefined, name: undefined
|
|
386
|
+
return { value: undefined, name: undefined };
|
|
308
387
|
}
|
|
309
388
|
/* ── The ENGINE's own namespace (defined inside the fork) ───────────────── */
|
|
389
|
+
/**
|
|
390
|
+
* The engine's state namespace today. Moved from `sky-code` by OSK-8674: XDG
|
|
391
|
+
* dirs, project directory, config basename, the engine home under the skrr
|
|
392
|
+
* root, and every variable the engine reads all derive from it.
|
|
393
|
+
*/
|
|
394
|
+
const ENGINE_APP_NAME = 'skrr-code';
|
|
395
|
+
/**
|
|
396
|
+
* Earlier engine namespaces, newest first. Still READ on both sides of the
|
|
397
|
+
* daemon↔engine boundary: an engine binary, a daemon, a CLI and a desktop app
|
|
398
|
+
* each ship on their own schedule, and a machine holds state written under
|
|
399
|
+
* every name it has run.
|
|
400
|
+
*/
|
|
401
|
+
const ENGINE_LEGACY_APP_NAMES = ['sky-code'];
|
|
402
|
+
/**
|
|
403
|
+
* Every variable the engine reads, by purpose, as the suffix after the app
|
|
404
|
+
* name's prefix (`skrr-code` → `SKRR_CODE_<suffix>`). The fork names all of its
|
|
405
|
+
* own variables this way, so the names follow the namespace rather than being
|
|
406
|
+
* written out once per spelling.
|
|
407
|
+
*/
|
|
408
|
+
const ENGINE_ENV_SUFFIXES = Object.freeze({
|
|
409
|
+
serverPassword: 'SERVER_PASSWORD',
|
|
410
|
+
serverUsername: 'SERVER_USERNAME',
|
|
411
|
+
home: 'HOME',
|
|
412
|
+
config: 'CONFIG',
|
|
413
|
+
appName: 'APP_NAME',
|
|
414
|
+
scriptName: 'SCRIPT_NAME',
|
|
415
|
+
allowUpstreamEgress: 'ALLOW_UPSTREAM_EGRESS',
|
|
416
|
+
compatOpencode: 'COMPAT_OPENCODE',
|
|
417
|
+
noCompatPrompts: 'NO_COMPAT_PROMPTS',
|
|
418
|
+
});
|
|
419
|
+
function engineEnvName(appName, key) {
|
|
420
|
+
return `${appName.toUpperCase().replace(/-/g, '_')}_${ENGINE_ENV_SUFFIXES[key]}`;
|
|
421
|
+
}
|
|
422
|
+
function engineEnvTable(appName) {
|
|
423
|
+
return Object.freeze(Object.fromEntries(Object.keys(ENGINE_ENV_SUFFIXES).map((key) => [
|
|
424
|
+
key,
|
|
425
|
+
engineEnvName(appName, key),
|
|
426
|
+
])));
|
|
427
|
+
}
|
|
428
|
+
function defineEngineNamespace(appName, legacyAppNames) {
|
|
429
|
+
const every = [appName, ...legacyAppNames];
|
|
430
|
+
for (const name of every) {
|
|
431
|
+
if (!SLUG.test(name)) {
|
|
432
|
+
throw new Error(`first-party harness engine app name ${JSON.stringify(name)} is not a slug; it becomes a ` +
|
|
433
|
+
'directory name and a variable prefix');
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
if (new Set(every).size !== every.length) {
|
|
437
|
+
throw new Error('first-party harness engine appName and legacyAppNames must be distinct');
|
|
438
|
+
}
|
|
439
|
+
return Object.freeze({
|
|
440
|
+
/**
|
|
441
|
+
* The engine's state namespace: XDG dirs, project marker, config basename, and
|
|
442
|
+
* the engine home under the skrr root (`firstPartyHarnessHomeDirname`).
|
|
443
|
+
*/
|
|
444
|
+
appName,
|
|
445
|
+
/**
|
|
446
|
+
* Earlier `appName`s, newest first. `migrateFirstPartyHarnessHome` moves a home
|
|
447
|
+
* under one of them onto the current name and leaves a symlink; readers of
|
|
448
|
+
* engine state look under them after the current name.
|
|
449
|
+
*/
|
|
450
|
+
legacyAppNames: Object.freeze([...legacyAppNames]),
|
|
451
|
+
/** Project-local configuration directory inside a user's repository. */
|
|
452
|
+
projectDirectory: `.${appName}`,
|
|
453
|
+
/**
|
|
454
|
+
* Earlier project directories, newest first. The engine still reads them and
|
|
455
|
+
* the platform never rewrites a user's repository to move one, so a reader
|
|
456
|
+
* looks here after `projectDirectory`, and a writer adopts an existing file
|
|
457
|
+
* here rather than creating a second one beside it.
|
|
458
|
+
*/
|
|
459
|
+
legacyProjectDirectories: Object.freeze(legacyAppNames.map((name) => `.${name}`)),
|
|
460
|
+
/**
|
|
461
|
+
* Environment variables the engine reads, under the CURRENT namespace. The
|
|
462
|
+
* engine also reads each one under every legacy namespace, second — use
|
|
463
|
+
* `readFirstPartyHarnessEngineEnv` to read one the way the engine does and
|
|
464
|
+
* `firstPartyHarnessEngineEnvEntries` to set one every engine build honours.
|
|
465
|
+
*/
|
|
466
|
+
env: engineEnvTable(appName),
|
|
467
|
+
});
|
|
468
|
+
}
|
|
310
469
|
/**
|
|
311
470
|
* Names the ENGINE itself defines and reads. The platform sets or reads them
|
|
312
471
|
* across the daemon↔engine boundary, so they are recorded here as values rather
|
|
313
|
-
* than scattered as literals
|
|
314
|
-
*
|
|
472
|
+
* than scattered as literals. They are the fork's names, and moving one is a
|
|
473
|
+
* two-sided change: the engine reads the new name first and every legacy name
|
|
474
|
+
* second, and while engine and platform releases can arrive in either order the
|
|
475
|
+
* platform SETS every name and READS new-then-legacy (contract §6, OSK-8674).
|
|
315
476
|
*/
|
|
316
|
-
export const FIRST_PARTY_HARNESS_ENGINE =
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
477
|
+
export const FIRST_PARTY_HARNESS_ENGINE = defineEngineNamespace(ENGINE_APP_NAME, ENGINE_LEGACY_APP_NAMES);
|
|
478
|
+
/**
|
|
479
|
+
* Every name the engine reads for one purpose, current namespace first — the
|
|
480
|
+
* engine's own lookup order.
|
|
481
|
+
*/
|
|
482
|
+
export function firstPartyHarnessEngineEnvNames(key) {
|
|
483
|
+
return [FIRST_PARTY_HARNESS_ENGINE.appName, ...FIRST_PARTY_HARNESS_ENGINE.legacyAppNames].map((appName) => engineEnvName(appName, key));
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Read one engine variable the way the engine reads it: the current name, then
|
|
487
|
+
* every legacy name. A blank value counts as unset.
|
|
488
|
+
*/
|
|
489
|
+
export function readFirstPartyHarnessEngineEnv(env, key) {
|
|
490
|
+
for (const name of firstPartyHarnessEngineEnvNames(key)) {
|
|
491
|
+
const raw = env[name];
|
|
492
|
+
if (typeof raw === 'string' && raw.trim() !== '') {
|
|
493
|
+
return { value: raw.trim(), name };
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return { value: undefined, name: undefined };
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* One engine variable set under EVERY name the engine has read, for a process
|
|
500
|
+
* that spawns the engine. An engine binary is installed on its own schedule, so
|
|
501
|
+
* a launcher cannot know whether the one it starts reads the current name or a
|
|
502
|
+
* legacy one; setting both means either build receives the value.
|
|
503
|
+
*/
|
|
504
|
+
export function firstPartyHarnessEngineEnvEntries(key, value) {
|
|
505
|
+
return Object.fromEntries(firstPartyHarnessEngineEnvNames(key).map((name) => [name, value]));
|
|
506
|
+
}
|
|
507
|
+
/** Every engine project directory, current first — the engine's read order. */
|
|
508
|
+
export function firstPartyHarnessEngineProjectDirectories() {
|
|
509
|
+
return [
|
|
510
|
+
FIRST_PARTY_HARNESS_ENGINE.projectDirectory,
|
|
511
|
+
...FIRST_PARTY_HARNESS_ENGINE.legacyProjectDirectories,
|
|
512
|
+
];
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Every engine home directory name under a config root, current first: where an
|
|
516
|
+
* engine home may exist on disk. `firstPartyHarnessHomeDirname` is the one the
|
|
517
|
+
* platform writes.
|
|
518
|
+
*/
|
|
519
|
+
export function firstPartyHarnessEngineHomeDirnames() {
|
|
520
|
+
return [FIRST_PARTY_HARNESS_ENGINE.appName, ...FIRST_PARTY_HARNESS_ENGINE.legacyAppNames];
|
|
521
|
+
}
|
|
@@ -108,40 +108,28 @@ export interface FirstPartyHarnessFeedCandidate {
|
|
|
108
108
|
* Every place a manifest may be published, in the order an installer should
|
|
109
109
|
* try them: the canonical spelling first, then each alias.
|
|
110
110
|
*
|
|
111
|
-
* Why a list: publishing writes every spelling, but an installer can
|
|
112
|
-
* the first release that does, and a machine can point at a feed
|
|
113
|
-
* an older pipeline. An installer that asked only for the canonical
|
|
114
|
-
* then find NOTHING and report "no release" on a feed that has one.
|
|
115
|
-
* aliases on not-found closes that window in both directions without
|
|
116
|
-
* having to deploy in a particular order.
|
|
111
|
+
* Why a list: publishing writes every accepted spelling, but an installer can
|
|
112
|
+
* ship before the first release that does, and a machine can point at a feed
|
|
113
|
+
* published by an older pipeline. An installer that asked only for the canonical
|
|
114
|
+
* path would then find NOTHING and report "no release" on a feed that has one.
|
|
115
|
+
* Trying the aliases on not-found closes that window in both directions without
|
|
116
|
+
* anyone having to deploy in a particular order.
|
|
117
|
+
*
|
|
118
|
+
* WHICH spellings depends on what is being read, and the difference is the
|
|
119
|
+
* point:
|
|
120
|
+
*
|
|
121
|
+
* - a CHANNEL pointer (`pinnedRelease` false) is current state. Only the
|
|
122
|
+
* accepted spellings are tried: a former spelling's pointer stopped moving
|
|
123
|
+
* when publishing stopped writing it, so falling back to one would install
|
|
124
|
+
* whatever that channel named on the day of contract — a silent downgrade.
|
|
125
|
+
* - a PINNED release (`pinnedRelease` true) is an immutable artifact. Former
|
|
126
|
+
* spellings are tried too: a release published before the canonical prefix
|
|
127
|
+
* existed lives only under the old one, and its signed bytes — artifact URLs
|
|
128
|
+
* included — are the same wherever they are found.
|
|
117
129
|
*
|
|
118
130
|
* An operator override keeps its base and still tries each manifest filename,
|
|
119
131
|
* since a dev feed staged by an older script names the file the old way.
|
|
120
132
|
*/
|
|
121
|
-
export declare function firstPartyHarnessFeedCandidates(env?: NodeJS.ProcessEnv
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
/** @deprecated Use `FirstPartyHarnessChannel`. */
|
|
125
|
-
export type SkyCodeChannel = FirstPartyHarnessChannel;
|
|
126
|
-
/** @deprecated Use `DEFAULT_FIRST_PARTY_HARNESS_CHANNEL`. */
|
|
127
|
-
export declare const DEFAULT_SKY_CODE_CHANNEL: "stable";
|
|
128
|
-
/** @deprecated Read the channel with `resolveFirstPartyHarnessChannel`; the variable has a neutral name now. */
|
|
129
|
-
export declare const SKY_CODE_CHANNEL_ENV: string;
|
|
130
|
-
/** @deprecated Use `firstPartyHarnessManifestFile()`. Names the legacy file. */
|
|
131
|
-
export declare const SKY_CODE_MANIFEST_FILE: string;
|
|
132
|
-
/** @deprecated Use `isFirstPartyHarnessChannel`. */
|
|
133
|
-
export declare const isSkyCodeChannel: typeof isFirstPartyHarnessChannel;
|
|
134
|
-
/** @deprecated Use `resolveFirstPartyHarnessChannel`. */
|
|
135
|
-
export declare const resolveSkyCodeChannel: typeof resolveFirstPartyHarnessChannel;
|
|
136
|
-
/** @deprecated Use `firstPartyHarnessChannelPrefix`. */
|
|
137
|
-
export declare const skyCodeChannelPrefix: typeof firstPartyHarnessChannelPrefix;
|
|
138
|
-
/** @deprecated Use `firstPartyHarnessDefaultFeedBase()`. Names the legacy feed. */
|
|
139
|
-
export declare const DEFAULT_SKY_CODE_FEED_BASE: string;
|
|
140
|
-
/** @deprecated Read the feed with `firstPartyHarnessFeedBase`; the variable has a neutral name now. */
|
|
141
|
-
export declare const SKY_CODE_FEED_BASE_ENV: string;
|
|
142
|
-
/**
|
|
143
|
-
* @deprecated Use `firstPartyHarnessFeedCandidates`. Keeps the LEGACY feed as its
|
|
144
|
-
* default, because that is the only feed a caller compiled against this name knows
|
|
145
|
-
* how to read.
|
|
146
|
-
*/
|
|
147
|
-
export declare function skyCodeFeedBase(env?: NodeJS.ProcessEnv): string;
|
|
133
|
+
export declare function firstPartyHarnessFeedCandidates(env?: NodeJS.ProcessEnv, options?: {
|
|
134
|
+
pinnedRelease?: boolean;
|
|
135
|
+
}): readonly FirstPartyHarnessFeedCandidate[];
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* Every product-named value comes from `firstPartyHarness.ts`; nothing in this
|
|
27
27
|
* file spells the product.
|
|
28
28
|
*/
|
|
29
|
-
import {
|
|
29
|
+
import { firstPartyHarnessArtifactSpellings, firstPartyHarnessDefaultFeedBase, firstPartyHarnessManifestFile, firstPartyHarnessSpellings, readFirstPartyHarnessEnv, } from './firstPartyHarness.js';
|
|
30
30
|
/** Channels in promotion order. Index order IS the promotion order. */
|
|
31
31
|
export const FIRST_PARTY_HARNESS_CHANNELS = ['internal', 'canary', 'beta', 'stable'];
|
|
32
32
|
/**
|
|
@@ -116,61 +116,36 @@ export function firstPartyHarnessFeedBase(env = process.env) {
|
|
|
116
116
|
* Every place a manifest may be published, in the order an installer should
|
|
117
117
|
* try them: the canonical spelling first, then each alias.
|
|
118
118
|
*
|
|
119
|
-
* Why a list: publishing writes every spelling, but an installer can
|
|
120
|
-
* the first release that does, and a machine can point at a feed
|
|
121
|
-
* an older pipeline. An installer that asked only for the canonical
|
|
122
|
-
* then find NOTHING and report "no release" on a feed that has one.
|
|
123
|
-
* aliases on not-found closes that window in both directions without
|
|
124
|
-
* having to deploy in a particular order.
|
|
119
|
+
* Why a list: publishing writes every accepted spelling, but an installer can
|
|
120
|
+
* ship before the first release that does, and a machine can point at a feed
|
|
121
|
+
* published by an older pipeline. An installer that asked only for the canonical
|
|
122
|
+
* path would then find NOTHING and report "no release" on a feed that has one.
|
|
123
|
+
* Trying the aliases on not-found closes that window in both directions without
|
|
124
|
+
* anyone having to deploy in a particular order.
|
|
125
|
+
*
|
|
126
|
+
* WHICH spellings depends on what is being read, and the difference is the
|
|
127
|
+
* point:
|
|
128
|
+
*
|
|
129
|
+
* - a CHANNEL pointer (`pinnedRelease` false) is current state. Only the
|
|
130
|
+
* accepted spellings are tried: a former spelling's pointer stopped moving
|
|
131
|
+
* when publishing stopped writing it, so falling back to one would install
|
|
132
|
+
* whatever that channel named on the day of contract — a silent downgrade.
|
|
133
|
+
* - a PINNED release (`pinnedRelease` true) is an immutable artifact. Former
|
|
134
|
+
* spellings are tried too: a release published before the canonical prefix
|
|
135
|
+
* existed lives only under the old one, and its signed bytes — artifact URLs
|
|
136
|
+
* included — are the same wherever they are found.
|
|
125
137
|
*
|
|
126
138
|
* An operator override keeps its base and still tries each manifest filename,
|
|
127
139
|
* since a dev feed staged by an older script names the file the old way.
|
|
128
140
|
*/
|
|
129
|
-
export function firstPartyHarnessFeedCandidates(env = process.env) {
|
|
141
|
+
export function firstPartyHarnessFeedCandidates(env = process.env, options = {}) {
|
|
130
142
|
const override = readFirstPartyHarnessEnv(env, 'updateFeedBase').value?.replace(/\/+$/, '');
|
|
131
|
-
|
|
143
|
+
const spellings = options.pinnedRelease
|
|
144
|
+
? firstPartyHarnessArtifactSpellings()
|
|
145
|
+
: firstPartyHarnessSpellings();
|
|
146
|
+
return spellings.map((provider) => ({
|
|
132
147
|
base: override || firstPartyHarnessDefaultFeedBase(provider),
|
|
133
148
|
manifestFilename: firstPartyHarnessManifestFile(provider),
|
|
134
149
|
provider,
|
|
135
150
|
}));
|
|
136
151
|
}
|
|
137
|
-
/* ── Deprecated names ───────────────────────────────────────────────────────
|
|
138
|
-
*
|
|
139
|
-
* `@skrr-ai/auth-core` is PUBLISHED, and the released CLI resolves it with a
|
|
140
|
-
* caret range. An installed CLI that picks up this version must still find the
|
|
141
|
-
* names it was compiled against, or it crashes at import. These aliases leave in
|
|
142
|
-
* the contract phase (OSK-8663), with a minor-version bump — never a patch.
|
|
143
|
-
*
|
|
144
|
-
* The ones that name a feed name the LEGACY one, the spelling a caller compiled
|
|
145
|
-
* against them was built for — the retired alias, not `wireProvider`, which has
|
|
146
|
-
* moved to canonical.
|
|
147
|
-
*/
|
|
148
|
-
/** The spelling the deprecated names were written for. */
|
|
149
|
-
const LEGACY_SPELLING = FIRST_PARTY_HARNESS.aliases[0] ?? FIRST_PARTY_HARNESS.provider;
|
|
150
|
-
/** @deprecated Use `FIRST_PARTY_HARNESS_CHANNELS`. */
|
|
151
|
-
export const SKY_CODE_CHANNELS = FIRST_PARTY_HARNESS_CHANNELS;
|
|
152
|
-
/** @deprecated Use `DEFAULT_FIRST_PARTY_HARNESS_CHANNEL`. */
|
|
153
|
-
export const DEFAULT_SKY_CODE_CHANNEL = DEFAULT_FIRST_PARTY_HARNESS_CHANNEL;
|
|
154
|
-
/** @deprecated Read the channel with `resolveFirstPartyHarnessChannel`; the variable has a neutral name now. */
|
|
155
|
-
export const SKY_CODE_CHANNEL_ENV = FIRST_PARTY_HARNESS_ENV.channel.legacy[0];
|
|
156
|
-
/** @deprecated Use `firstPartyHarnessManifestFile()`. Names the legacy file. */
|
|
157
|
-
export const SKY_CODE_MANIFEST_FILE = firstPartyHarnessManifestFile(LEGACY_SPELLING);
|
|
158
|
-
/** @deprecated Use `isFirstPartyHarnessChannel`. */
|
|
159
|
-
export const isSkyCodeChannel = isFirstPartyHarnessChannel;
|
|
160
|
-
/** @deprecated Use `resolveFirstPartyHarnessChannel`. */
|
|
161
|
-
export const resolveSkyCodeChannel = resolveFirstPartyHarnessChannel;
|
|
162
|
-
/** @deprecated Use `firstPartyHarnessChannelPrefix`. */
|
|
163
|
-
export const skyCodeChannelPrefix = firstPartyHarnessChannelPrefix;
|
|
164
|
-
/** @deprecated Use `firstPartyHarnessDefaultFeedBase()`. Names the legacy feed. */
|
|
165
|
-
export const DEFAULT_SKY_CODE_FEED_BASE = firstPartyHarnessDefaultFeedBase(LEGACY_SPELLING);
|
|
166
|
-
/** @deprecated Read the feed with `firstPartyHarnessFeedBase`; the variable has a neutral name now. */
|
|
167
|
-
export const SKY_CODE_FEED_BASE_ENV = FIRST_PARTY_HARNESS_ENV.updateFeedBase.legacy[0];
|
|
168
|
-
/**
|
|
169
|
-
* @deprecated Use `firstPartyHarnessFeedCandidates`. Keeps the LEGACY feed as its
|
|
170
|
-
* default, because that is the only feed a caller compiled against this name knows
|
|
171
|
-
* how to read.
|
|
172
|
-
*/
|
|
173
|
-
export function skyCodeFeedBase(env = process.env) {
|
|
174
|
-
const override = readFirstPartyHarnessEnv(env, 'updateFeedBase').value;
|
|
175
|
-
return (override || firstPartyHarnessDefaultFeedBase(LEGACY_SPELLING)).replace(/\/+$/, '');
|
|
176
|
-
}
|