@skrr-ai/cli 0.1.204 → 0.1.207
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/bin/dev-fallback.js +47 -29
- package/bin/dev.cjs +6 -0
- package/dist/commands/agent/message/send.d.ts +7 -1
- package/dist/commands/agent/message/send.js +13 -0
- package/dist/commands/agents/models.d.ts +11 -0
- package/dist/commands/agents/models.js +51 -0
- package/dist/commands/balance/route-premiums.d.ts +9 -0
- package/dist/commands/balance/route-premiums.js +33 -0
- package/dist/commands/convos/transcript.d.ts +47 -0
- package/dist/commands/convos/transcript.js +460 -0
- package/dist/commands/goals/create.d.ts +1 -0
- package/dist/commands/goals/create.js +8 -0
- package/dist/commands/goals/creation-receipt.d.ts +10 -0
- package/dist/commands/goals/creation-receipt.js +43 -0
- package/dist/commands/goals/key-results/create.d.ts +2 -0
- package/dist/commands/goals/key-results/create.js +14 -0
- package/dist/commands/goals/key-results/creation-receipt.d.ts +13 -0
- package/dist/commands/goals/key-results/creation-receipt.js +51 -0
- package/dist/commands/harnesses/forget.d.ts +2 -0
- package/dist/commands/harnesses/forget.js +31 -0
- package/dist/commands/harnesses/removal-receipt.d.ts +11 -0
- package/dist/commands/harnesses/removal-receipt.js +32 -0
- package/dist/commands/harnesses/removal-review.d.ts +11 -0
- package/dist/commands/harnesses/removal-review.js +28 -0
- package/dist/commands/spaces/loops/release-receipt.d.ts +14 -0
- package/dist/commands/spaces/loops/release-receipt.js +48 -0
- package/dist/commands/spaces/loops/release.js +1 -1
- package/dist/commands/spaces/workflow-templates/archive.d.ts +1 -0
- package/dist/commands/spaces/workflow-templates/archive.js +9 -1
- package/dist/commands/spaces/workflow-templates/show.js +2 -0
- package/dist/commands/spaces/workflow-templates/update.d.ts +1 -0
- package/dist/commands/spaces/workflow-templates/update.js +12 -1
- package/dist/commands/spaces/workflows/publish.d.ts +1 -0
- package/dist/commands/spaces/workflows/publish.js +41 -2
- package/dist/commands/tasks/create.d.ts +2 -0
- package/dist/commands/tasks/create.js +19 -6
- package/dist/commands/tasks/creation-receipt.d.ts +12 -0
- package/dist/commands/tasks/creation-receipt.js +53 -0
- package/dist/commands/tasks/delete.d.ts +1 -0
- package/dist/commands/tasks/delete.js +22 -4
- package/dist/commands/tasks/deletion-receipt.d.ts +12 -0
- package/dist/commands/tasks/deletion-receipt.js +37 -0
- package/dist/lib/execution-target.d.ts +1 -1
- package/dist/lib/execution-target.js +4 -0
- package/dist/lib/harnesses.d.ts +25 -0
- package/dist/lib/harnesses.js +15 -0
- package/dist/lib/request-uuid.d.ts +2 -0
- package/dist/lib/request-uuid.js +10 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.d.ts +16 -15
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/firstPartyHarness.js +0 -22
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.d.ts +16 -15
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/firstPartyHarness.js +0 -22
- package/dist/node_modules/@skrr-ai/data-provider/index.js +11498 -11396
- package/oclif.manifest.json +915 -2
- package/package.json +6 -3
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
|
+
const base_command_1 = require("../../base-command");
|
|
6
|
+
const request_uuid_1 = require("../../lib/request-uuid");
|
|
7
|
+
class TasksDeletionReceipt extends base_command_1.BaseCommand {
|
|
8
|
+
static description = 'Check the durable receipt for one Task deletion';
|
|
9
|
+
static args = {
|
|
10
|
+
canonicalTaskId: core_1.Args.string({
|
|
11
|
+
description: 'Original canonical Task ID from `tasks delete`', required: true, ignoreStdin: true,
|
|
12
|
+
parse: request_uuid_1.parseRequestUuid,
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
15
|
+
static flags = {
|
|
16
|
+
'deletion-command-id': core_1.Flags.string({
|
|
17
|
+
description: 'Original deletion UUID', required: true, parse: request_uuid_1.parseRequestUuid,
|
|
18
|
+
}),
|
|
19
|
+
json: core_1.Flags.boolean({ description: 'Output the receipt as JSON' }),
|
|
20
|
+
};
|
|
21
|
+
async run() {
|
|
22
|
+
this.requireAuth();
|
|
23
|
+
const { args, flags } = await this.parse(TasksDeletionReceipt);
|
|
24
|
+
try {
|
|
25
|
+
const receipt = await data_provider_1.dataService.getTaskDeletionReceipt(args.canonicalTaskId, flags['deletion-command-id']);
|
|
26
|
+
if (flags.json)
|
|
27
|
+
return this.printJsonResult(receipt);
|
|
28
|
+
this.log(receipt.state === 'deleted'
|
|
29
|
+
? `Deletion is recorded for Task ${args.canonicalTaskId}.`
|
|
30
|
+
: `The server could not confirm deletion of Task ${args.canonicalTaskId}.`);
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
this.handleApiError(error, { subject: `Task ${args.canonicalTaskId} deletion receipt` });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.default = TasksDeletionReceipt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const EXECUTION_TARGET_ADVANCE_REASONS: readonly ["offline", "unavailable", "entitlement", "capacity", "unsupported", "error"];
|
|
1
|
+
export declare const EXECUTION_TARGET_ADVANCE_REASONS: readonly ["offline", "unavailable", "quota", "entitlement", "capacity", "unsupported", "error"];
|
|
2
2
|
export type ExecutionTargetAdvanceReason = (typeof EXECUTION_TARGET_ADVANCE_REASONS)[number];
|
|
3
3
|
export interface AgentExecutionTarget {
|
|
4
4
|
kind: 'harness' | 'hosted-machine' | 'agent-worker';
|
|
@@ -5,9 +5,13 @@ exports.normalizeExecutionTargetSelector = normalizeExecutionTargetSelector;
|
|
|
5
5
|
exports.normalizeAdvanceReasons = normalizeAdvanceReasons;
|
|
6
6
|
exports.executionTargetForSelector = executionTargetForSelector;
|
|
7
7
|
exports.buildExecutionOrderPatch = buildExecutionOrderPatch;
|
|
8
|
+
// The server's `EXECUTION_FAILURE_CATEGORIES` (`api/server/services/Harness/executionPolicyRefs.js`)
|
|
9
|
+
// that an owner may name, in the web picker's order. `quota` was missing, so an exhausted
|
|
10
|
+
// subscription could not hand a turn to the next target from the CLI (OSK-33137).
|
|
8
11
|
exports.EXECUTION_TARGET_ADVANCE_REASONS = [
|
|
9
12
|
'offline',
|
|
10
13
|
'unavailable',
|
|
14
|
+
'quota',
|
|
11
15
|
'entitlement',
|
|
12
16
|
'capacity',
|
|
13
17
|
'unsupported',
|
package/dist/lib/harnesses.d.ts
CHANGED
|
@@ -208,6 +208,30 @@ export interface HarnessRemovalReferences {
|
|
|
208
208
|
ownInferencePolicyReferencesMachine: boolean | null;
|
|
209
209
|
}
|
|
210
210
|
export declare function getHarnessRemovalReferences(id: string): Promise<HarnessRemovalReferences>;
|
|
211
|
+
export type HarnessRemovalReview = {
|
|
212
|
+
version: 1;
|
|
213
|
+
coverage: 'personal-offline';
|
|
214
|
+
removable: true;
|
|
215
|
+
harnessId: string;
|
|
216
|
+
expiresAt: string;
|
|
217
|
+
reviewRef: string;
|
|
218
|
+
};
|
|
219
|
+
export type HarnessRemovalReceipt = {
|
|
220
|
+
version: 1;
|
|
221
|
+
outcome: 'removed';
|
|
222
|
+
scope: 'personal-harness-registration';
|
|
223
|
+
operationId: string;
|
|
224
|
+
harnessId: string;
|
|
225
|
+
requestDigest: string;
|
|
226
|
+
removedAt: string;
|
|
227
|
+
};
|
|
228
|
+
export declare function getHarnessRemovalReview(id: string): Promise<HarnessRemovalReview>;
|
|
229
|
+
export declare function getHarnessRemovalOperation(operationId: string): Promise<{
|
|
230
|
+
state: "unknown";
|
|
231
|
+
} | {
|
|
232
|
+
state: "committed";
|
|
233
|
+
receipt: HarnessRemovalReceipt;
|
|
234
|
+
}>;
|
|
211
235
|
export declare function listHarnessProducts(): Promise<unknown>;
|
|
212
236
|
export declare function getHarnessUsage(id: string): Promise<unknown>;
|
|
213
237
|
/** The rollup across every harness. The web calls this key `fleetUsage`. */
|
|
@@ -298,6 +322,7 @@ export declare function updateHarness(id: string, patch: Record<string, unknown>
|
|
|
298
322
|
harness?: Harness;
|
|
299
323
|
}>;
|
|
300
324
|
export declare function forgetHarness(id: string): Promise<unknown>;
|
|
325
|
+
export declare function forgetReviewedHarness(id: string, reviewRef: string, operationId: string): Promise<HarnessRemovalReceipt>;
|
|
301
326
|
/**
|
|
302
327
|
* Why a superseded-looking row is KEPT by `harnesses prune`. Declared by the
|
|
303
328
|
* server (`pruneSupersededHarnesses.js`, `REASONS`) and worded once, in
|
package/dist/lib/harnesses.js
CHANGED
|
@@ -6,6 +6,8 @@ exports.listHarnesses = listHarnesses;
|
|
|
6
6
|
exports.getHarness = getHarness;
|
|
7
7
|
exports.getHarnessModels = getHarnessModels;
|
|
8
8
|
exports.getHarnessRemovalReferences = getHarnessRemovalReferences;
|
|
9
|
+
exports.getHarnessRemovalReview = getHarnessRemovalReview;
|
|
10
|
+
exports.getHarnessRemovalOperation = getHarnessRemovalOperation;
|
|
9
11
|
exports.listHarnessProducts = listHarnessProducts;
|
|
10
12
|
exports.getHarnessUsage = getHarnessUsage;
|
|
11
13
|
exports.getAllHarnessUsage = getAllHarnessUsage;
|
|
@@ -15,6 +17,7 @@ exports.getCurrentQuota = getCurrentQuota;
|
|
|
15
17
|
exports.getQuotaHistory = getQuotaHistory;
|
|
16
18
|
exports.updateHarness = updateHarness;
|
|
17
19
|
exports.forgetHarness = forgetHarness;
|
|
20
|
+
exports.forgetReviewedHarness = forgetReviewedHarness;
|
|
18
21
|
exports.pruneHarnesses = pruneHarnesses;
|
|
19
22
|
exports.parseHarnessPruneAge = parseHarnessPruneAge;
|
|
20
23
|
exports.harnessPruneReasonSentence = harnessPruneReasonSentence;
|
|
@@ -101,6 +104,12 @@ async function getHarnessModels(id) {
|
|
|
101
104
|
async function getHarnessRemovalReferences(id) {
|
|
102
105
|
return (0, api_fetch_1.apiFetch)(`/api/harnesses/${encodeURIComponent(id)}/removal-references`);
|
|
103
106
|
}
|
|
107
|
+
async function getHarnessRemovalReview(id) {
|
|
108
|
+
return (0, api_fetch_1.apiFetch)(`/api/harnesses/${encodeURIComponent(id)}/removal-review`);
|
|
109
|
+
}
|
|
110
|
+
async function getHarnessRemovalOperation(operationId) {
|
|
111
|
+
return (0, api_fetch_1.apiFetch)(`/api/harnesses/removal-operations/${encodeURIComponent(operationId)}`);
|
|
112
|
+
}
|
|
104
113
|
async function listHarnessProducts() {
|
|
105
114
|
return (0, api_fetch_1.apiFetch)('/api/machines/products');
|
|
106
115
|
}
|
|
@@ -190,6 +199,12 @@ async function updateHarness(id, patch) {
|
|
|
190
199
|
async function forgetHarness(id) {
|
|
191
200
|
return (0, api_fetch_1.apiFetch)(`/api/harnesses/${encodeURIComponent(id)}`, { method: 'DELETE' });
|
|
192
201
|
}
|
|
202
|
+
async function forgetReviewedHarness(id, reviewRef, operationId) {
|
|
203
|
+
return (0, api_fetch_1.apiFetch)(`/api/harnesses/${encodeURIComponent(id)}/remove-if-unreferenced`, {
|
|
204
|
+
method: 'POST',
|
|
205
|
+
body: { reviewRef, operationId },
|
|
206
|
+
});
|
|
207
|
+
}
|
|
193
208
|
/**
|
|
194
209
|
* Remove the caller's superseded harness rows - or, by default, say which would go.
|
|
195
210
|
*
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseRequestUuid = parseRequestUuid;
|
|
4
|
+
/** Request and command IDs accepted by the server's receipt schemas. */
|
|
5
|
+
async function parseRequestUuid(value) {
|
|
6
|
+
if (!/^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i.test(value)) {
|
|
7
|
+
throw new Error('Expected the UUID used for the original request.');
|
|
8
|
+
}
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
@@ -329,43 +329,44 @@ declare const ENGINE_ENV_SUFFIXES: Readonly<{
|
|
|
329
329
|
sessionId: "SESSION_ID";
|
|
330
330
|
}>;
|
|
331
331
|
export type FirstPartyHarnessEngineEnvKey = keyof typeof ENGINE_ENV_SUFFIXES;
|
|
332
|
-
|
|
333
|
-
* Names the ENGINE itself defines and reads. The platform sets or reads them
|
|
334
|
-
* across the daemon↔engine boundary, so they are recorded here as values rather
|
|
335
|
-
* than scattered as literals. They are the fork's names, and moving one is a
|
|
336
|
-
* two-sided change: the engine reads the new name first and every legacy name
|
|
337
|
-
* second, and while engine and platform releases can arrive in either order the
|
|
338
|
-
* platform SETS every name and READS new-then-legacy (contract §6, OSK-8674).
|
|
339
|
-
*/
|
|
340
|
-
export declare const FIRST_PARTY_HARNESS_ENGINE: Readonly<{
|
|
332
|
+
interface FirstPartyHarnessEngineNamespace {
|
|
341
333
|
/**
|
|
342
334
|
* The engine's state namespace: XDG dirs, project marker, config basename, and
|
|
343
335
|
* the engine home under the skrr root (`firstPartyHarnessHomeDirname`).
|
|
344
336
|
*/
|
|
345
|
-
appName: string;
|
|
337
|
+
readonly appName: string;
|
|
346
338
|
/**
|
|
347
339
|
* Earlier `appName`s, newest first. `migrateFirstPartyHarnessHome` moves a home
|
|
348
340
|
* under one of them onto the current name and leaves a symlink; readers of
|
|
349
341
|
* engine state look under them after the current name.
|
|
350
342
|
*/
|
|
351
|
-
legacyAppNames: readonly string[];
|
|
343
|
+
readonly legacyAppNames: readonly string[];
|
|
352
344
|
/** Project-local configuration directory inside a user's repository. */
|
|
353
|
-
projectDirectory: `.${string}`;
|
|
345
|
+
readonly projectDirectory: `.${string}`;
|
|
354
346
|
/**
|
|
355
347
|
* Earlier project directories, newest first. The engine still reads them and
|
|
356
348
|
* the platform never rewrites a user's repository to move one, so a reader
|
|
357
349
|
* looks here after `projectDirectory`, and a writer adopts an existing file
|
|
358
350
|
* here rather than creating a second one beside it.
|
|
359
351
|
*/
|
|
360
|
-
legacyProjectDirectories: readonly string[];
|
|
352
|
+
readonly legacyProjectDirectories: readonly string[];
|
|
361
353
|
/**
|
|
362
354
|
* Environment variables the engine reads, under the CURRENT namespace. The
|
|
363
355
|
* engine also reads each one under every legacy namespace, second — use
|
|
364
356
|
* `readFirstPartyHarnessEngineEnv` to read one the way the engine does and
|
|
365
357
|
* `firstPartyHarnessEngineEnvEntries` to set one every engine build honours.
|
|
366
358
|
*/
|
|
367
|
-
env: Readonly<Record<
|
|
368
|
-
}
|
|
359
|
+
readonly env: Readonly<Record<FirstPartyHarnessEngineEnvKey, string>>;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Names the ENGINE itself defines and reads. The platform sets or reads them
|
|
363
|
+
* across the daemon↔engine boundary, so they are recorded here as values rather
|
|
364
|
+
* than scattered as literals. They are the fork's names, and moving one is a
|
|
365
|
+
* two-sided change: the engine reads the new name first and every legacy name
|
|
366
|
+
* second, and while engine and platform releases can arrive in either order the
|
|
367
|
+
* platform SETS every name and READS new-then-legacy (contract §6, OSK-8674).
|
|
368
|
+
*/
|
|
369
|
+
export declare const FIRST_PARTY_HARNESS_ENGINE: FirstPartyHarnessEngineNamespace;
|
|
369
370
|
/**
|
|
370
371
|
* Every name the engine reads for one purpose, current namespace first — the
|
|
371
372
|
* engine's own lookup order.
|
|
@@ -297,32 +297,10 @@ function defineEngineNamespace(appName, legacyAppNames) {
|
|
|
297
297
|
throw new Error("first-party harness engine appName and legacyAppNames must be distinct");
|
|
298
298
|
}
|
|
299
299
|
return Object.freeze({
|
|
300
|
-
/**
|
|
301
|
-
* The engine's state namespace: XDG dirs, project marker, config basename, and
|
|
302
|
-
* the engine home under the skrr root (`firstPartyHarnessHomeDirname`).
|
|
303
|
-
*/
|
|
304
300
|
appName,
|
|
305
|
-
/**
|
|
306
|
-
* Earlier `appName`s, newest first. `migrateFirstPartyHarnessHome` moves a home
|
|
307
|
-
* under one of them onto the current name and leaves a symlink; readers of
|
|
308
|
-
* engine state look under them after the current name.
|
|
309
|
-
*/
|
|
310
301
|
legacyAppNames: Object.freeze([...legacyAppNames]),
|
|
311
|
-
/** Project-local configuration directory inside a user's repository. */
|
|
312
302
|
projectDirectory: `.${appName}`,
|
|
313
|
-
/**
|
|
314
|
-
* Earlier project directories, newest first. The engine still reads them and
|
|
315
|
-
* the platform never rewrites a user's repository to move one, so a reader
|
|
316
|
-
* looks here after `projectDirectory`, and a writer adopts an existing file
|
|
317
|
-
* here rather than creating a second one beside it.
|
|
318
|
-
*/
|
|
319
303
|
legacyProjectDirectories: Object.freeze(legacyAppNames.map((name) => `.${name}`)),
|
|
320
|
-
/**
|
|
321
|
-
* Environment variables the engine reads, under the CURRENT namespace. The
|
|
322
|
-
* engine also reads each one under every legacy namespace, second — use
|
|
323
|
-
* `readFirstPartyHarnessEngineEnv` to read one the way the engine does and
|
|
324
|
-
* `firstPartyHarnessEngineEnvEntries` to set one every engine build honours.
|
|
325
|
-
*/
|
|
326
304
|
env: engineEnvTable(appName)
|
|
327
305
|
});
|
|
328
306
|
}
|
|
@@ -329,43 +329,44 @@ declare const ENGINE_ENV_SUFFIXES: Readonly<{
|
|
|
329
329
|
sessionId: "SESSION_ID";
|
|
330
330
|
}>;
|
|
331
331
|
export type FirstPartyHarnessEngineEnvKey = keyof typeof ENGINE_ENV_SUFFIXES;
|
|
332
|
-
|
|
333
|
-
* Names the ENGINE itself defines and reads. The platform sets or reads them
|
|
334
|
-
* across the daemon↔engine boundary, so they are recorded here as values rather
|
|
335
|
-
* than scattered as literals. They are the fork's names, and moving one is a
|
|
336
|
-
* two-sided change: the engine reads the new name first and every legacy name
|
|
337
|
-
* second, and while engine and platform releases can arrive in either order the
|
|
338
|
-
* platform SETS every name and READS new-then-legacy (contract §6, OSK-8674).
|
|
339
|
-
*/
|
|
340
|
-
export declare const FIRST_PARTY_HARNESS_ENGINE: Readonly<{
|
|
332
|
+
interface FirstPartyHarnessEngineNamespace {
|
|
341
333
|
/**
|
|
342
334
|
* The engine's state namespace: XDG dirs, project marker, config basename, and
|
|
343
335
|
* the engine home under the skrr root (`firstPartyHarnessHomeDirname`).
|
|
344
336
|
*/
|
|
345
|
-
appName: string;
|
|
337
|
+
readonly appName: string;
|
|
346
338
|
/**
|
|
347
339
|
* Earlier `appName`s, newest first. `migrateFirstPartyHarnessHome` moves a home
|
|
348
340
|
* under one of them onto the current name and leaves a symlink; readers of
|
|
349
341
|
* engine state look under them after the current name.
|
|
350
342
|
*/
|
|
351
|
-
legacyAppNames: readonly string[];
|
|
343
|
+
readonly legacyAppNames: readonly string[];
|
|
352
344
|
/** Project-local configuration directory inside a user's repository. */
|
|
353
|
-
projectDirectory: `.${string}`;
|
|
345
|
+
readonly projectDirectory: `.${string}`;
|
|
354
346
|
/**
|
|
355
347
|
* Earlier project directories, newest first. The engine still reads them and
|
|
356
348
|
* the platform never rewrites a user's repository to move one, so a reader
|
|
357
349
|
* looks here after `projectDirectory`, and a writer adopts an existing file
|
|
358
350
|
* here rather than creating a second one beside it.
|
|
359
351
|
*/
|
|
360
|
-
legacyProjectDirectories: readonly string[];
|
|
352
|
+
readonly legacyProjectDirectories: readonly string[];
|
|
361
353
|
/**
|
|
362
354
|
* Environment variables the engine reads, under the CURRENT namespace. The
|
|
363
355
|
* engine also reads each one under every legacy namespace, second — use
|
|
364
356
|
* `readFirstPartyHarnessEngineEnv` to read one the way the engine does and
|
|
365
357
|
* `firstPartyHarnessEngineEnvEntries` to set one every engine build honours.
|
|
366
358
|
*/
|
|
367
|
-
env: Readonly<Record<
|
|
368
|
-
}
|
|
359
|
+
readonly env: Readonly<Record<FirstPartyHarnessEngineEnvKey, string>>;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Names the ENGINE itself defines and reads. The platform sets or reads them
|
|
363
|
+
* across the daemon↔engine boundary, so they are recorded here as values rather
|
|
364
|
+
* than scattered as literals. They are the fork's names, and moving one is a
|
|
365
|
+
* two-sided change: the engine reads the new name first and every legacy name
|
|
366
|
+
* second, and while engine and platform releases can arrive in either order the
|
|
367
|
+
* platform SETS every name and READS new-then-legacy (contract §6, OSK-8674).
|
|
368
|
+
*/
|
|
369
|
+
export declare const FIRST_PARTY_HARNESS_ENGINE: FirstPartyHarnessEngineNamespace;
|
|
369
370
|
/**
|
|
370
371
|
* Every name the engine reads for one purpose, current namespace first — the
|
|
371
372
|
* engine's own lookup order.
|
|
@@ -457,32 +457,10 @@ function defineEngineNamespace(appName, legacyAppNames) {
|
|
|
457
457
|
throw new Error('first-party harness engine appName and legacyAppNames must be distinct');
|
|
458
458
|
}
|
|
459
459
|
return Object.freeze({
|
|
460
|
-
/**
|
|
461
|
-
* The engine's state namespace: XDG dirs, project marker, config basename, and
|
|
462
|
-
* the engine home under the skrr root (`firstPartyHarnessHomeDirname`).
|
|
463
|
-
*/
|
|
464
460
|
appName,
|
|
465
|
-
/**
|
|
466
|
-
* Earlier `appName`s, newest first. `migrateFirstPartyHarnessHome` moves a home
|
|
467
|
-
* under one of them onto the current name and leaves a symlink; readers of
|
|
468
|
-
* engine state look under them after the current name.
|
|
469
|
-
*/
|
|
470
461
|
legacyAppNames: Object.freeze([...legacyAppNames]),
|
|
471
|
-
/** Project-local configuration directory inside a user's repository. */
|
|
472
462
|
projectDirectory: `.${appName}`,
|
|
473
|
-
/**
|
|
474
|
-
* Earlier project directories, newest first. The engine still reads them and
|
|
475
|
-
* the platform never rewrites a user's repository to move one, so a reader
|
|
476
|
-
* looks here after `projectDirectory`, and a writer adopts an existing file
|
|
477
|
-
* here rather than creating a second one beside it.
|
|
478
|
-
*/
|
|
479
463
|
legacyProjectDirectories: Object.freeze(legacyAppNames.map((name) => `.${name}`)),
|
|
480
|
-
/**
|
|
481
|
-
* Environment variables the engine reads, under the CURRENT namespace. The
|
|
482
|
-
* engine also reads each one under every legacy namespace, second — use
|
|
483
|
-
* `readFirstPartyHarnessEngineEnv` to read one the way the engine does and
|
|
484
|
-
* `firstPartyHarnessEngineEnvEntries` to set one every engine build honours.
|
|
485
|
-
*/
|
|
486
464
|
env: engineEnvTable(appName),
|
|
487
465
|
});
|
|
488
466
|
}
|