@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.
Files changed (120) hide show
  1. package/dist/base-command.d.ts +2 -0
  2. package/dist/base-command.js +1 -0
  3. package/dist/commands/balance/index.js +1 -1
  4. package/dist/commands/balance/overage.js +4 -3
  5. package/dist/commands/balance/plan.js +10 -6
  6. package/dist/commands/balance/show.d.ts +32 -0
  7. package/dist/commands/balance/show.js +74 -3
  8. package/dist/commands/balance/usage/events.js +3 -2
  9. package/dist/commands/balance/usage.js +2 -1
  10. package/dist/commands/browser/install.js +3 -2
  11. package/dist/commands/browser/uninstall.js +3 -2
  12. package/dist/commands/code/handover.d.ts +1 -0
  13. package/dist/commands/code/handover.js +4 -0
  14. package/dist/commands/code/install.js +3 -2
  15. package/dist/commands/code/jobs/run.d.ts +1 -0
  16. package/dist/commands/code/jobs/run.js +4 -0
  17. package/dist/commands/daemon/install.js +7 -0
  18. package/dist/commands/harnesses/install.d.ts +11 -0
  19. package/dist/commands/harnesses/install.js +33 -14
  20. package/dist/commands/harnesses/installers.d.ts +10 -0
  21. package/dist/commands/harnesses/installers.js +31 -0
  22. package/dist/commands/harnesses/leases/show.js +14 -0
  23. package/dist/commands/harnesses/list.js +3 -2
  24. package/dist/commands/instructions/install.d.ts +22 -0
  25. package/dist/commands/instructions/install.js +83 -7
  26. package/dist/commands/instructions/list.js +5 -0
  27. package/dist/commands/instructions/show.d.ts +6 -0
  28. package/dist/commands/instructions/show.js +34 -1
  29. package/dist/commands/instructions/status.js +17 -1
  30. package/dist/commands/payments/wallet.js +2 -2
  31. package/dist/commands/tasks/attachments/set-role.d.ts +24 -0
  32. package/dist/commands/tasks/attachments/set-role.js +60 -0
  33. package/dist/commands/tasks/attachments/upload.d.ts +1 -0
  34. package/dist/commands/tasks/attachments/upload.js +18 -52
  35. package/dist/commands/tasks/comments/add.d.ts +1 -0
  36. package/dist/commands/tasks/comments/add.js +67 -2
  37. package/dist/commands/tasks/complete.d.ts +1 -0
  38. package/dist/commands/tasks/complete.js +56 -1
  39. package/dist/commands/tasks/create.d.ts +6 -0
  40. package/dist/commands/tasks/create.js +26 -3
  41. package/dist/commands/tasks/labels/attach.js +4 -0
  42. package/dist/commands/tasks/list.d.ts +1 -0
  43. package/dist/commands/tasks/list.js +9 -0
  44. package/dist/commands/tasks/result/submit.d.ts +3 -0
  45. package/dist/commands/tasks/result/submit.js +76 -8
  46. package/dist/commands/tasks/show.d.ts +23 -0
  47. package/dist/commands/tasks/show.js +61 -1
  48. package/dist/commands/tasks/update.js +16 -2
  49. package/dist/commands/tasks/updates/add.d.ts +1 -0
  50. package/dist/commands/tasks/updates/add.js +63 -0
  51. package/dist/commands/views/create.js +12 -2
  52. package/dist/commands/views/list.js +3 -2
  53. package/dist/commands/views/show.js +2 -0
  54. package/dist/lib/agentic-stream.d.ts +10 -4
  55. package/dist/lib/agentic-stream.js +25 -11
  56. package/dist/lib/api-fetch.js +7 -2
  57. package/dist/lib/cli-installers.d.ts +23 -4
  58. package/dist/lib/cli-installers.js +56 -8
  59. package/dist/lib/daemon-setup.d.ts +18 -1
  60. package/dist/lib/daemon-setup.js +33 -1
  61. package/dist/lib/dedicated-machines.js +4 -2
  62. package/dist/lib/file-mime.js +1 -1
  63. package/dist/lib/first-party-harness-agent.d.ts +16 -1
  64. package/dist/lib/first-party-harness-agent.js +47 -17
  65. package/dist/lib/first-party-harness-doctor.js +49 -48
  66. package/dist/lib/first-party-harness-managed.d.ts +9 -4
  67. package/dist/lib/first-party-harness-managed.js +13 -10
  68. package/dist/lib/first-party-harness.d.ts +32 -21
  69. package/dist/lib/first-party-harness.js +49 -31
  70. package/dist/lib/harness-provider-input.d.ts +18 -12
  71. package/dist/lib/harness-provider-input.js +18 -12
  72. package/dist/lib/harness-tiers.d.ts +4 -3
  73. package/dist/lib/harness-tiers.js +4 -3
  74. package/dist/lib/harnesses.d.ts +6 -0
  75. package/dist/lib/html-text.js +25 -0
  76. package/dist/lib/instruction-input.d.ts +21 -0
  77. package/dist/lib/instruction-input.js +30 -0
  78. package/dist/lib/instruction-provenance.d.ts +54 -0
  79. package/dist/lib/instruction-provenance.js +84 -0
  80. package/dist/lib/session-task-endpoints.d.ts +1 -1
  81. package/dist/lib/session-task-endpoints.js +3 -0
  82. package/dist/lib/task-asset-upload.d.ts +84 -0
  83. package/dist/lib/task-asset-upload.js +374 -0
  84. package/dist/lib/task-closure.d.ts +15 -0
  85. package/dist/lib/task-closure.js +20 -0
  86. package/dist/lib/task-view-render.d.ts +14 -0
  87. package/dist/lib/task-view-render.js +55 -0
  88. package/dist/lib/tasks.d.ts +26 -0
  89. package/dist/lib/tasks.js +38 -1
  90. package/dist/lib/views/vocabulary.d.ts +1 -1
  91. package/dist/lib/views/vocabulary.js +3 -1
  92. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.d.ts +183 -58
  93. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.js +286 -100
  94. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessChannels.d.ts +21 -33
  95. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessChannels.js +24 -50
  96. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessHome.d.ts +19 -7
  97. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarnessHome.js +26 -10
  98. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessTrust.d.ts +9 -5
  99. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/harnessTrust.js +9 -5
  100. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -1
  101. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +1 -13
  102. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/legacyStatePreflight.d.ts +21 -1
  103. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/legacyStatePreflight.js +75 -19
  104. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.d.ts +183 -58
  105. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.js +279 -99
  106. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessChannels.d.ts +21 -33
  107. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessChannels.js +24 -49
  108. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessHome.d.ts +19 -7
  109. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarnessHome.js +27 -11
  110. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessTrust.d.ts +9 -5
  111. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/harnessTrust.js +9 -5
  112. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -1
  113. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +1 -4
  114. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/legacyStatePreflight.d.ts +21 -1
  115. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/legacyStatePreflight.js +74 -19
  116. package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
  117. package/dist/node_modules/@skrr-ai/data-provider/index.js +4588 -4509
  118. package/dist/node_modules/@skrr-ai/data-provider/package.json +1 -1
  119. package/oclif.manifest.json +33980 -33832
  120. 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
- * ── Three spellings, kept apart on purpose ────────────────────────────────
32
- *
33
- * `provider` CANONICAL. What the platform stores, returns and renders.
34
- * `aliases` ACCEPTED on every ingress until contract, and normalised to
35
- * canonical at the edge. Nothing new is ever written with one.
36
- * `wireProvider` What the server and a daemon say to EACH OTHER — the
37
- * capability a daemon advertises, `daemon:<p>:request|response`,
38
- * the `provider` of a session RPC. It moves after the flip and
39
- * BEFORE contract, because a daemon on a user's machine may be
40
- * any version and the server cannot tell which one sent a
41
- * request: only a released daemon that already advertises the
42
- * canonical capability lets the old one age out of the fleet.
43
- *
44
- * The old code treated those three as one string, which is why no single
45
- * change could rename it safely. See
34
+ * ── Four fields, kept apart on purpose ────────────────────────────────────
35
+ *
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.
58
+ *
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 ──────────────────────────────────────────────
@@ -61,24 +76,28 @@ export interface FirstPartyHarnessIdentity {
61
76
  readonly provider: string;
62
77
  /** Older spellings still ACCEPTED on every ingress, newest first. */
63
78
  readonly aliases: readonly string[];
79
+ /**
80
+ * Retired spellings, newest first: accepted on NO ingress, recognised only in
81
+ * artifacts that predate their retirement (see the file header).
82
+ */
83
+ readonly formerSpellings: readonly string[];
64
84
  /** The spelling daemons and the server exchange on the wire. */
65
85
  readonly wireProvider: string;
66
86
  }
67
87
  /**
68
88
  * THE identity — the only literal product name in the codebase.
69
89
  *
70
- * Phase: WIRE MOVED. `skrr-code` is canonical — stored, returned, rendered — and
71
- * it is now also what the server and a daemon say to each other. `sky-code` is
72
- * still accepted on every ingress, so a daemon released before this change
73
- * (which advertises and answers on `sky-code`) keeps working against a server
74
- * that speaks `skrr-code`, and the reverse. Contract (OSK-8663) empties
75
- * `aliases` once no connected daemon still advertises the old capability.
90
+ * Phase: CONTRACTED (OSK-8663). `skrr-code` is the only spelling any ingress
91
+ * accepts and the only one on the wire. `sky-code` is retired: nothing admits
92
+ * it, and it is still recognised where a binary, a checkout, a published
93
+ * release or a stored value written before the rename is looked for.
76
94
  */
77
95
  declare const IDENTITY: {
78
96
  readonly displayName: "skrr Code";
79
97
  readonly command: "skrr code";
80
98
  readonly provider: "skrr-code";
81
- readonly aliases: readonly ["sky-code"];
99
+ readonly aliases: readonly [];
100
+ readonly formerSpellings: readonly ["sky-code"];
82
101
  readonly wireProvider: "skrr-code";
83
102
  };
84
103
  /** The canonical slug, as a literal type. */
@@ -92,8 +111,26 @@ export type FirstPartyHarnessCapabilityName = `${FirstPartyHarnessProvider}_sess
92
111
  export declare const FIRST_PARTY_HARNESS: FirstPartyHarnessIdentity;
93
112
  /** The canonical slug with its literal type, for `as const` tuples and keyed tables. */
94
113
  export declare const FIRST_PARTY_HARNESS_PROVIDER: FirstPartyHarnessCanonicalProvider;
95
- /** Every spelling, canonical first. The order is the resolution order. */
114
+ /**
115
+ * Every ACCEPTED spelling, canonical first — what an ingress admits. The order
116
+ * is the resolution order.
117
+ */
96
118
  export declare function firstPartyHarnessSpellings(): readonly string[];
119
+ /**
120
+ * Every spelling an ARTIFACT that already exists may carry, canonical first:
121
+ * the accepted spellings, then every former one.
122
+ *
123
+ * For code that LOOKS FOR what an earlier release left behind — an installed
124
+ * binary, a checkout directory, an immutable published release, a stored value
125
+ * or config key — and for the tooling that must keep recognising those
126
+ * (ignore lists, the identity ratchet). A machine that never ran a post-rename
127
+ * client still has its engine under the old name, and it must still be found.
128
+ *
129
+ * Never an ingress check: a former spelling is not accepted anywhere, and a
130
+ * reader that admitted one here would silently reopen what contract closed. Use
131
+ * `firstPartyHarnessSpellings` / `isFirstPartyHarnessProvider` for that.
132
+ */
133
+ export declare function firstPartyHarnessArtifactSpellings(): readonly string[];
97
134
  /** True for the canonical provider or any alias (case- and whitespace-insensitive). */
98
135
  export declare function isFirstPartyHarnessProvider(value: unknown): boolean;
99
136
  /**
@@ -102,6 +139,24 @@ export declare function isFirstPartyHarnessProvider(value: unknown): boolean;
102
139
  * caller's own normalisation still owns case and shape for other providers).
103
140
  */
104
141
  export declare function canonicalHarnessProvider<T>(value: T): T | string;
142
+ /**
143
+ * The canonical provider for a value read back from an ARTIFACT that may predate
144
+ * a rename — any artifact spelling (canonical, alias or FORMER) becomes the
145
+ * provider; every other value is returned unchanged.
146
+ *
147
+ * For values nobody migrates and nobody can refuse: a harness row's stored
148
+ * display NAME (the operator migration rewrites `provider`, never `name`), a
149
+ * daemon's config file, a harness session binding on a user's machine. Read raw
150
+ * after contract, each would name an unknown provider — a label that renders the
151
+ * retired name again, a local session silently running another backend, a live
152
+ * resume context reset as new — with no error anywhere.
153
+ *
154
+ * NEVER for anything a peer, a client or an operator SENDS, and never for a
155
+ * trust, dispatch or admission decision: a former spelling is accepted on no
156
+ * ingress, and canonicalising one here would reopen what contract closed. Use
157
+ * `canonicalHarnessProvider` for those.
158
+ */
159
+ export declare function canonicalArtifactHarnessProvider<T>(value: T): T | string;
105
160
  /**
106
161
  * Every spelling a stored row for this provider may carry, canonical first —
107
162
  * for a Mongo `$in` filter while rows written before a flip still exist. Any
@@ -138,7 +193,16 @@ export declare function isFirstPartyHarnessEnvironment(value: unknown): boolean;
138
193
  export declare function canonicalExecutionEnvironment<T>(value: T): T | string;
139
194
  /** Binary file name. `platform` is a `process.platform` value; only `win32` differs. */
140
195
  export declare function firstPartyHarnessBinaryName(provider?: string, platform?: string): string;
141
- /** Every binary file name, canonical first — the lookup order. */
196
+ /**
197
+ * Every binary file name an install may carry, canonical first — the lookup
198
+ * order, and the names an install links to the canonical binary.
199
+ *
200
+ * Built from the ARTIFACT spellings, former ones included: binaries are
201
+ * artifacts. An engine installed before a rename is still on disk under its old
202
+ * name, and a platform CLI or daemon built before it still looks for that name,
203
+ * so resolvers try it and installers leave a link at it. Neither makes the
204
+ * spelling acceptable on any ingress.
205
+ */
142
206
  export declare function firstPartyHarnessBinaryNames(platform?: string): readonly string[];
143
207
  /**
144
208
  * The engine home directory name under the skrr config root.
@@ -149,7 +213,8 @@ export declare function firstPartyHarnessBinaryNames(platform?: string): readonl
149
213
  * the managed `AGENTS.md` from `<home>`. Deriving it from the provider would, on
150
214
  * a fresh install after a provider rename, create a second directory the engine
151
215
  * never reads — managed instructions would stop applying with no error. It moves
152
- * when the engine's namespace moves, and not before.
216
+ * when the engine's namespace moves, and not before; it did in OSK-8674, and
217
+ * `migrateFirstPartyHarnessHome` moves a home under a legacy name onto it.
153
218
  */
154
219
  export declare function firstPartyHarnessHomeDirname(): string;
155
220
  /** Signed release manifest file name. */
@@ -161,23 +226,33 @@ export declare function firstPartyHarnessManifestFile(provider?: string): string
161
226
  export declare const FIRST_PARTY_HARNESS_FEED_ORIGIN = "https://updates.oversky.ai";
162
227
  /** Object-key prefix for one spelling's feed, e.g. `skrr-code/`. */
163
228
  export declare function firstPartyHarnessFeedPrefix(provider?: string): string;
164
- /** Every feed prefix, canonical first. Publishing writes all of them. */
229
+ /**
230
+ * Every feed prefix a publish WRITES, canonical first: the accepted spellings.
231
+ *
232
+ * A former spelling's prefix still holds every release published under it, and
233
+ * those stay served — their artifact URLs are inside signed manifests — but
234
+ * nothing new is written there, so its channel pointers stop moving at contract.
235
+ */
165
236
  export declare function firstPartyHarnessFeedPrefixes(): readonly string[];
166
237
  /** Object-key prefix the fork stages unsigned builds under, e.g. `skrr-code-staging/`. */
167
238
  export declare function firstPartyHarnessStagingPrefix(provider?: string): string;
168
239
  /** Default feed base URL for one spelling. */
169
240
  export declare function firstPartyHarnessDefaultFeedBase(provider?: string): string;
170
241
  export interface FirstPartyHarnessEnvName {
171
- /** Brand-neutral name. Set this one. */
242
+ /** Brand-neutral name — the only one the platform reads. */
172
243
  readonly name: string;
173
- /** Older names still read, in precedence order, until contract. */
174
- readonly legacy: readonly string[];
175
244
  }
176
245
  /**
177
- * Every environment variable the platform reads for the first-party harness,
178
- * by purpose. The neutral name wins; a legacy name is read only when the neutral
179
- * one is unset or blank, because a variable set in an ECS task definition, a
180
- * user's shell or a LaunchAgent does not change when the code does.
246
+ * Every environment variable the PLATFORM reads for the first-party harness, by
247
+ * purpose, under one brand-neutral name each — so a product rename never renames
248
+ * one.
249
+ *
250
+ * The product-named variables these replaced were read second until contract
251
+ * (OSK-8663) and are not read at all now. The ENGINE's own variables are a
252
+ * different namespace (`FIRST_PARTY_HARNESS_ENGINE.env`): the fork reads them,
253
+ * so a platform reader that must agree with the engine consults the engine's
254
+ * names explicitly (`readFirstPartyHarnessEngineEnv`) — the engine home is the
255
+ * one case (`home` below).
181
256
  */
182
257
  export declare const FIRST_PARTY_HARNESS_ENV: Readonly<{
183
258
  /** Absolute path to an engine binary, overriding resolution. */
@@ -192,7 +267,13 @@ export declare const FIRST_PARTY_HARNESS_ENV: Readonly<{
192
267
  devKeys: FirstPartyHarnessEnvName;
193
268
  /** Engine version the desktop build bundles. */
194
269
  bundleVersion: FirstPartyHarnessEnvName;
195
- /** Engine home override (the engine reads its own name too — see ENGINE env below). */
270
+ /**
271
+ * Engine home override. The engine reads only its own variable, under every
272
+ * name it has had (`readFirstPartyHarnessEngineEnv(env, 'home')`), so a reader
273
+ * that resolves the home the engine will use reads those second, and a
274
+ * launcher hands the engine the resolved path under every one of them
275
+ * (`firstPartyHarnessEngineEnvEntries`).
276
+ */
196
277
  home: FirstPartyHarnessEnvName;
197
278
  /** Engine version baked into the cloud-coding image. */
198
279
  cloudCodingVersion: FirstPartyHarnessEnvName;
@@ -213,43 +294,87 @@ export interface FirstPartyHarnessEnvReading {
213
294
  readonly value: string | undefined;
214
295
  /** The variable that supplied `value`. */
215
296
  readonly name: string | undefined;
216
- /** True when the value came from a legacy name — worth telling the operator. */
217
- readonly legacy: boolean;
218
297
  }
219
- /** Every name for one purpose, neutral first — for spawn-env forwarding and sanitisers. */
220
- export declare function firstPartyHarnessEnvNames(key: FirstPartyHarnessEnvKey): readonly string[];
221
- /** Read one purpose's variable: neutral name first, legacy names after. */
298
+ /** Read one purpose's variable. A blank value counts as unset. */
222
299
  export declare function readFirstPartyHarnessEnv(env: Readonly<Record<string, string | undefined>>, key: FirstPartyHarnessEnvKey): FirstPartyHarnessEnvReading;
300
+ /**
301
+ * Every variable the engine reads, by purpose, as the suffix after the app
302
+ * name's prefix (`skrr-code` → `SKRR_CODE_<suffix>`). The fork names all of its
303
+ * own variables this way, so the names follow the namespace rather than being
304
+ * written out once per spelling.
305
+ */
306
+ declare const ENGINE_ENV_SUFFIXES: Readonly<{
307
+ serverPassword: "SERVER_PASSWORD";
308
+ serverUsername: "SERVER_USERNAME";
309
+ home: "HOME";
310
+ config: "CONFIG";
311
+ appName: "APP_NAME";
312
+ scriptName: "SCRIPT_NAME";
313
+ allowUpstreamEgress: "ALLOW_UPSTREAM_EGRESS";
314
+ compatOpencode: "COMPAT_OPENCODE";
315
+ noCompatPrompts: "NO_COMPAT_PROMPTS";
316
+ }>;
317
+ export type FirstPartyHarnessEngineEnvKey = keyof typeof ENGINE_ENV_SUFFIXES;
223
318
  /**
224
319
  * Names the ENGINE itself defines and reads. The platform sets or reads them
225
320
  * across the daemon↔engine boundary, so they are recorded here as values rather
226
- * than scattered as literals — but they are the fork's to change, and moving
227
- * one is a two-sided change (contract §6). Not part of this identity's rename.
321
+ * than scattered as literals. They are the fork's names, and moving one is a
322
+ * two-sided change: the engine reads the new name first and every legacy name
323
+ * second, and while engine and platform releases can arrive in either order the
324
+ * platform SETS every name and READS new-then-legacy (contract §6, OSK-8674).
228
325
  */
229
326
  export declare const FIRST_PARTY_HARNESS_ENGINE: Readonly<{
230
327
  /**
231
328
  * The engine's state namespace: XDG dirs, project marker, config basename, and
232
329
  * the engine home under the skrr root (`firstPartyHarnessHomeDirname`).
233
330
  */
234
- appName: "sky-code";
331
+ appName: string;
235
332
  /**
236
- * Earlier `appName`s whose home directory `migrateFirstPartyHarnessHome` moves
237
- * onto the current one. Empty until the engine's namespace is renamed.
333
+ * Earlier `appName`s, newest first. `migrateFirstPartyHarnessHome` moves a home
334
+ * under one of them onto the current name and leaves a symlink; readers of
335
+ * engine state look under them after the current name.
238
336
  */
239
337
  legacyAppNames: readonly string[];
240
338
  /** Project-local configuration directory inside a user's repository. */
241
- projectDirectory: ".sky-code";
242
- /** Environment variables the engine reads. */
243
- env: Readonly<{
244
- serverPassword: "SKY_CODE_SERVER_PASSWORD";
245
- serverUsername: "SKY_CODE_SERVER_USERNAME";
246
- home: "SKY_CODE_HOME";
247
- config: "SKY_CODE_CONFIG";
248
- appName: "SKY_CODE_APP_NAME";
249
- scriptName: "SKY_CODE_SCRIPT_NAME";
250
- allowUpstreamEgress: "SKY_CODE_ALLOW_UPSTREAM_EGRESS";
251
- compatOpencode: "SKY_CODE_COMPAT_OPENCODE";
252
- noCompatPrompts: "SKY_CODE_NO_COMPAT_PROMPTS";
253
- }>;
339
+ projectDirectory: `.${string}`;
340
+ /**
341
+ * Earlier project directories, newest first. The engine still reads them and
342
+ * the platform never rewrites a user's repository to move one, so a reader
343
+ * looks here after `projectDirectory`, and a writer adopts an existing file
344
+ * here rather than creating a second one beside it.
345
+ */
346
+ legacyProjectDirectories: readonly string[];
347
+ /**
348
+ * Environment variables the engine reads, under the CURRENT namespace. The
349
+ * engine also reads each one under every legacy namespace, second — use
350
+ * `readFirstPartyHarnessEngineEnv` to read one the way the engine does and
351
+ * `firstPartyHarnessEngineEnvEntries` to set one every engine build honours.
352
+ */
353
+ env: Readonly<Record<"appName" | "serverPassword" | "serverUsername" | "home" | "config" | "scriptName" | "allowUpstreamEgress" | "compatOpencode" | "noCompatPrompts", string>>;
254
354
  }>;
355
+ /**
356
+ * Every name the engine reads for one purpose, current namespace first — the
357
+ * engine's own lookup order.
358
+ */
359
+ export declare function firstPartyHarnessEngineEnvNames(key: FirstPartyHarnessEngineEnvKey): readonly string[];
360
+ /**
361
+ * Read one engine variable the way the engine reads it: the current name, then
362
+ * every legacy name. A blank value counts as unset.
363
+ */
364
+ export declare function readFirstPartyHarnessEngineEnv(env: Readonly<Record<string, string | undefined>>, key: FirstPartyHarnessEngineEnvKey): FirstPartyHarnessEnvReading;
365
+ /**
366
+ * One engine variable set under EVERY name the engine has read, for a process
367
+ * that spawns the engine. An engine binary is installed on its own schedule, so
368
+ * a launcher cannot know whether the one it starts reads the current name or a
369
+ * legacy one; setting both means either build receives the value.
370
+ */
371
+ export declare function firstPartyHarnessEngineEnvEntries(key: FirstPartyHarnessEngineEnvKey, value: string): Record<string, string>;
372
+ /** Every engine project directory, current first — the engine's read order. */
373
+ export declare function firstPartyHarnessEngineProjectDirectories(): readonly string[];
374
+ /**
375
+ * Every engine home directory name under a config root, current first: where an
376
+ * engine home may exist on disk. `firstPartyHarnessHomeDirname` is the one the
377
+ * platform writes.
378
+ */
379
+ export declare function firstPartyHarnessEngineHomeDirnames(): readonly string[];
255
380
  export {};