@inventarch/cli 2.0.0 → 3.1.0
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/README.md +11 -3
- package/SPEC.md +76 -12
- package/assets/base/7db20e0dbbc2b88701ea24991886b4a8e08d419dda469cce5caff66911f81e4c.ia.tgz +0 -0
- package/assets/base.json +3 -3
- package/assets/host/7e80bd7098018c1c13e3fae4cd363acfeffedccd5b6ec06c4952b62f449a4246.tgz +0 -0
- package/assets/host.json +4 -4
- package/assets/vocabulary.json +162 -3
- package/dist/adopt.d.ts +8 -0
- package/dist/adopt.d.ts.map +1 -0
- package/dist/adopt.js +60 -0
- package/dist/adopt.js.map +1 -0
- package/dist/author.d.ts +32 -0
- package/dist/author.d.ts.map +1 -0
- package/dist/author.js +226 -0
- package/dist/author.js.map +1 -0
- package/dist/briefing.d.ts +2 -0
- package/dist/briefing.d.ts.map +1 -1
- package/dist/briefing.js +15 -3
- package/dist/briefing.js.map +1 -1
- package/dist/capture.d.ts +12 -4
- package/dist/capture.d.ts.map +1 -1
- package/dist/capture.js +33 -19
- package/dist/capture.js.map +1 -1
- package/dist/commands.d.ts +7 -7
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +170 -39
- package/dist/commands.js.map +1 -1
- package/dist/compile.d.ts +3 -3
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +9 -12
- package/dist/compile.js.map +1 -1
- package/dist/consumer.d.ts +15 -2
- package/dist/consumer.d.ts.map +1 -1
- package/dist/consumer.js +99 -18
- package/dist/consumer.js.map +1 -1
- package/dist/distribute.d.ts +6 -4
- package/dist/distribute.d.ts.map +1 -1
- package/dist/distribute.js +40 -11
- package/dist/distribute.js.map +1 -1
- package/dist/doctor-authority.d.ts +3 -0
- package/dist/doctor-authority.d.ts.map +1 -0
- package/dist/doctor-authority.js +65 -0
- package/dist/doctor-authority.js.map +1 -0
- package/dist/doctor-mounts.d.ts +4 -0
- package/dist/doctor-mounts.d.ts.map +1 -0
- package/dist/doctor-mounts.js +32 -0
- package/dist/doctor-mounts.js.map +1 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +218 -23
- package/dist/doctor.js.map +1 -1
- package/dist/host-projection.d.ts +70 -9
- package/dist/host-projection.d.ts.map +1 -1
- package/dist/host-projection.js +409 -32
- package/dist/host-projection.js.map +1 -1
- package/dist/host.d.ts +58 -6
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +181 -45
- package/dist/host.js.map +1 -1
- package/dist/init.d.ts +27 -7
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +143 -27
- package/dist/init.js.map +1 -1
- package/dist/main.d.ts +1 -6
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -6
- package/dist/main.js.map +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/next.d.ts.map +1 -1
- package/dist/next.js +14 -8
- package/dist/next.js.map +1 -1
- package/dist/operation-help.js +1 -1
- package/dist/plugin-product.d.ts +3 -0
- package/dist/plugin-product.d.ts.map +1 -0
- package/dist/plugin-product.js +154 -0
- package/dist/plugin-product.js.map +1 -0
- package/dist/plugin-sources.d.ts +16 -0
- package/dist/plugin-sources.d.ts.map +1 -0
- package/dist/plugin-sources.js +120 -0
- package/dist/plugin-sources.js.map +1 -0
- package/dist/position.d.ts +1 -1
- package/dist/position.d.ts.map +1 -1
- package/dist/position.js +10 -8
- package/dist/position.js.map +1 -1
- package/dist/preview.d.ts +145 -0
- package/dist/preview.d.ts.map +1 -0
- package/dist/preview.js +962 -0
- package/dist/preview.js.map +1 -0
- package/dist/profile.d.ts +118 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +362 -0
- package/dist/profile.js.map +1 -0
- package/dist/project.d.ts +8 -5
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +61 -17
- package/dist/project.js.map +1 -1
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +3 -0
- package/dist/read.js.map +1 -1
- package/dist/render.d.ts +16 -2
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +156 -5
- package/dist/render.js.map +1 -1
- package/dist/session.d.ts +31 -10
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +31 -3
- package/dist/session.js.map +1 -1
- package/dist/user-host.d.ts +3 -3
- package/dist/user-host.js +10 -10
- package/dist/user-host.js.map +1 -1
- package/dist/validate.d.ts +28 -16
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +245 -23
- package/dist/validate.js.map +1 -1
- package/package.json +6 -6
- package/assets/base/0305ca741b1dfec97ff35fbeb36d4a66a0c9c0614b730fe14fcdac0f1565e28a.ia.tgz +0 -0
- package/assets/host/3d2c8530db8d14755410b17be8228a230d88de96f9dc78f953979d3ca7c6ea62.tgz +0 -0
package/dist/init.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WorkspaceRelease } from '@inventarch/distribution/registry';
|
|
1
2
|
import type { Base, BasePin } from './bundled-base.js';
|
|
2
3
|
export { readBase, PIN_PATH, baseArchivePath, PACKAGE_ID } from './bundled-base.js';
|
|
3
4
|
export type { Base, BasePin } from './bundled-base.js';
|
|
@@ -6,7 +7,7 @@ import type { ProjectionAction } from '@inventarch/distribution/projection';
|
|
|
6
7
|
import type { Context, Result } from './consumer.js';
|
|
7
8
|
import type { HostApplied } from './host.js';
|
|
8
9
|
import type { HostName } from './host-projection.js';
|
|
9
|
-
import type { Capabilities } from './render.js';
|
|
10
|
+
import type { AdviceContext, Capabilities } from './render.js';
|
|
10
11
|
export type HostSelection = 'claude' | 'codex' | 'none';
|
|
11
12
|
/** M5.2 §4.1. `recovery-required` is never rendered as a plan: it refuses before anything reasons about the target. */
|
|
12
13
|
export type TargetState = 'fresh' | 'resumable' | 'recovery-required' | 'conflict';
|
|
@@ -61,7 +62,7 @@ export interface Descriptor {
|
|
|
61
62
|
readonly range: string;
|
|
62
63
|
readonly systems: readonly string[];
|
|
63
64
|
}[];
|
|
64
|
-
readonly assets:
|
|
65
|
+
readonly assets: Starter['assets'];
|
|
65
66
|
readonly license: string;
|
|
66
67
|
readonly description: string;
|
|
67
68
|
readonly source: Source;
|
|
@@ -79,12 +80,21 @@ export interface Starter {
|
|
|
79
80
|
}[];
|
|
80
81
|
/** The records those files hold, in file order: three, or six with `--system`. */
|
|
81
82
|
readonly records: readonly StarterRecord[];
|
|
83
|
+
/** The assets `--from` lowered; empty otherwise. */
|
|
84
|
+
readonly assets: readonly {
|
|
85
|
+
readonly path: string;
|
|
86
|
+
readonly role: 'asset' | 'documentation' | 'license';
|
|
87
|
+
}[];
|
|
82
88
|
readonly descriptor: Descriptor | null;
|
|
83
89
|
readonly base: BasePin;
|
|
84
90
|
readonly systems: readonly string[];
|
|
85
91
|
readonly provenance: Provenance;
|
|
86
92
|
}
|
|
87
93
|
export interface InitView {
|
|
94
|
+
readonly adoption?: {
|
|
95
|
+
readonly id: string;
|
|
96
|
+
readonly release: WorkspaceRelease;
|
|
97
|
+
};
|
|
88
98
|
readonly root: string;
|
|
89
99
|
readonly owns: readonly {
|
|
90
100
|
readonly path: string;
|
|
@@ -151,12 +161,16 @@ export declare const DESCRIPTOR_PATH = ".ia/release.json";
|
|
|
151
161
|
export declare const STARTER_VERSION = "0.1.0";
|
|
152
162
|
/** The installer's lock, `acquire()` at apps/distribution/src/install.ts:70; `INSTALL_PATHS` does not name it. */
|
|
153
163
|
export declare const INSTALL_LOCK = ".ia/distributions/install-lock.json";
|
|
164
|
+
/** Plan amendment C20: where `ia author system <name>` writes a local system, as `ia init --system` does. */
|
|
165
|
+
export declare const systemPath: (name: string) => string;
|
|
154
166
|
/** Position-and-projection §3: the one file the three starter records share, at the root of the authored source. */
|
|
155
167
|
export declare const WORKSPACE_PATH = ".ia/src/workspace.ia";
|
|
156
168
|
/** Create-only: the local working state each clone makes for itself, never the authored records or the lock. */
|
|
157
169
|
export declare const IGNORE_PATH = ".ia/.gitignore";
|
|
158
170
|
export declare const IGNORE_TEXT = "work/\ndistributions/\n";
|
|
159
171
|
export declare function migrationIgnoreText(root: string): string;
|
|
172
|
+
/** A local system name `ia init --system` and `ia author system` accept: the id rule and the system-name ceiling. */
|
|
173
|
+
export declare const isSystemName: (name: string) => boolean;
|
|
160
174
|
/** M5.2 §4.3: `createFile`'s temporary name, `<target>.<randomUUID()>.tmp` (apps/distribution/src/files.ts:76). */
|
|
161
175
|
export declare const LEFTOVER: RegExp;
|
|
162
176
|
/** The installation, not the target, is at fault; `ia doctor` names the channel a reinstall goes through. */
|
|
@@ -198,7 +212,7 @@ export declare function starterSystem(name: string): string;
|
|
|
198
212
|
* The participant `@agent` implies no host permission, and its `@mandate` grants it closed moves over that workspace;
|
|
199
213
|
* the mandate's one prose clause claims nothing. Every name is the workspace's (decision identity-namespace).
|
|
200
214
|
*/
|
|
201
|
-
export declare function starterRecords(name: string, systems: readonly string[]): string;
|
|
215
|
+
export declare function starterRecords(name: string, systems: readonly string[], sources?: readonly string[]): string;
|
|
202
216
|
/**
|
|
203
217
|
* `--system`'s release root (position-and-projection §2 case 3: a distribution's roots are system registrations). It
|
|
204
218
|
* sits in the system folder, so the closure from it stays inside folders the packer can release
|
|
@@ -210,7 +224,7 @@ export declare function starterDistribution(name: string): string;
|
|
|
210
224
|
* `--system` the `@workspace` composes the local system after `systems` (position-and-projection §2 case 2: a
|
|
211
225
|
* repository that owns vocabulary composes its own system), so the packet renders a pointer line for it.
|
|
212
226
|
*/
|
|
213
|
-
export declare function starterFiles(name: string, systems: readonly string[], system: boolean): Pick<Starter, 'files' | 'records'>;
|
|
227
|
+
export declare function starterFiles(name: string, systems: readonly string[], system: boolean, sources?: readonly string[]): Pick<Starter, 'files' | 'records'>;
|
|
214
228
|
export type Git = (args: readonly string[], input?: string) => {
|
|
215
229
|
readonly status: number | null;
|
|
216
230
|
readonly stdout: string;
|
|
@@ -234,17 +248,23 @@ export declare function readProvenance(git: Git): Provenance;
|
|
|
234
248
|
* M5.1 §2.3's table. With `--system`, `distribution` stays null until the compiled record is read (§3.1 step 6);
|
|
235
249
|
* without it, `undefined` leaves the key out, because a default starter authors no `@distribution` (plan amendment B7).
|
|
236
250
|
*/
|
|
237
|
-
export declare function starterDescriptor(id: string, name: string, base: Base, provenance: Provenance, distribution?: string | null): Descriptor;
|
|
251
|
+
export declare function starterDescriptor(id: string, name: string, base: Base, provenance: Provenance, distribution?: string | null, assets?: Starter['assets']): Descriptor;
|
|
238
252
|
/** Two-space JSON with a final newline; `decodeReleaseDescriptor` requires the dependency rows sorted, as they are. */
|
|
239
253
|
export declare const descriptorText: (descriptor: Descriptor) => string;
|
|
240
254
|
/** M5.2 §4.1: exactly the one request and the one package the pin describes. */
|
|
241
255
|
export declare const locksBase: (lock: DistributionLock | undefined, pin: BasePin) => boolean;
|
|
242
256
|
export interface InitRequest {
|
|
257
|
+
readonly adoption?: {
|
|
258
|
+
readonly id: string;
|
|
259
|
+
readonly release: WorkspaceRelease;
|
|
260
|
+
};
|
|
243
261
|
readonly root: string;
|
|
244
262
|
readonly host: HostSelection;
|
|
245
263
|
readonly id?: string | undefined;
|
|
246
264
|
/** `--system`: also author the local `@system`, its steward and the `@distribution` rooted at it. */
|
|
247
265
|
readonly system?: boolean | undefined;
|
|
266
|
+
/** `--from`: a plugin directory lowered into the new workspace as a kit. */
|
|
267
|
+
readonly from?: string | undefined;
|
|
248
268
|
readonly packageRoot: string;
|
|
249
269
|
readonly git: Git;
|
|
250
270
|
readonly invocation?: string;
|
|
@@ -287,7 +307,7 @@ export interface Projected {
|
|
|
287
307
|
*/
|
|
288
308
|
export declare function applyInit(view: InitView, options: ApplyOptions): Promise<Applied>;
|
|
289
309
|
export declare function initEnvelope(view: InitView, apply: boolean, applied?: Applied | null): unknown;
|
|
290
|
-
export declare function renderInit(view: InitView, caps: Capabilities): string;
|
|
310
|
+
export declare function renderInit(view: InitView, caps: Capabilities, supplied?: string, advice?: AdviceContext): string;
|
|
291
311
|
/** §2.8 rule 3's change summary for `init`: the plan's own blocks without the preview note or the footer. */
|
|
292
312
|
export declare const renderInitSummary: (view: InitView, caps: Capabilities) => string;
|
|
293
313
|
export declare function renderApplied(view: InitView, applied: Applied, caps: Capabilities): string;
|
|
@@ -451,7 +471,7 @@ export interface MigrationOptions {
|
|
|
451
471
|
*/
|
|
452
472
|
export declare function applyMigration(view: MigrationView, options: MigrationOptions): Promise<Migrated>;
|
|
453
473
|
export declare function migrationEnvelope(view: MigrationView, apply: boolean, applied?: Migrated | null): unknown;
|
|
454
|
-
export declare function renderMigration(view: MigrationView, caps: Capabilities): string;
|
|
474
|
+
export declare function renderMigration(view: MigrationView, caps: Capabilities, supplied?: string): string;
|
|
455
475
|
export declare function renderMigrated(view: MigrationView, applied: Migrated, caps: Capabilities): string;
|
|
456
476
|
/**
|
|
457
477
|
* A finished git run's answer, or null when git is not really there: it could not start, or it is the macOS stub
|
package/dist/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpF,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAiFvD,OAAO,KAAK,EAAE,gBAAgB,EAAqB,MAAM,6BAA6B,CAAC;AAMvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAa5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAe7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAMrD,OAAO,KAAK,EAAE,YAAY,EAAqB,MAAM,aAAa,CAAC;AAcnE,MAAM,MAAM,aAAa,GAAG,QAAQ,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A4BD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,GAAG,UAAU,CAAC,GAAG,CAAC,CAQlB"}
|
package/dist/init.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { registryWorkspace } from './adopt.js';
|
|
2
|
+
import { HostPluginError, lowerPlugin, readPlugin } from '@inventarch/workspace-runtime/internal/host-plugin';
|
|
3
|
+
import { adoptedBindings } from '@inventarch/db';
|
|
4
|
+
import { adoptionId, planAdoption, applyAdoption } from '@inventarch/distribution/registry';
|
|
1
5
|
import { readBase, PIN_PATH, PACKAGE_ID, DAMAGED } from './bundled-base.js';
|
|
6
|
+
import { canonical } from './plugin-sources.js';
|
|
2
7
|
export { readBase, PIN_PATH, baseArchivePath, PACKAGE_ID } from './bundled-base.js';
|
|
3
8
|
/**
|
|
4
9
|
* `ia init`: docs/specs/consumer-cli-contract/README.md §2.1, implementing
|
|
@@ -50,7 +55,8 @@ export { readBase, PIN_PATH, baseArchivePath, PACKAGE_ID } from './bundled-base.
|
|
|
50
55
|
import { readMigrationJournal, beginMigrationJournal, applyMigrationFiles, finishMigrationJournal, completeMigrationProjection, reopenMigrationProjection, } from './migration-journal.js';
|
|
51
56
|
import { spawnSync } from 'node:child_process';
|
|
52
57
|
import { accessSync, constants, existsSync, lstatSync, mkdirSync, readdirSync, readFileSync, realpathSync, statSync, unlinkSync, } from 'node:fs';
|
|
53
|
-
import { basename, dirname, isAbsolute, join, resolve } from 'node:path';
|
|
58
|
+
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
59
|
+
import { inertCommandRoot } from '@inventarch/runtime';
|
|
54
60
|
import { decodeReleaseDescriptor, deriveGenerationInputs, generationDigest, installationWorkspace, readExpandedBundle, DISTRIBUTION_ENGINE_VERSION, INSTALL_PATHS, sha256, } from '@inventarch/db/distribution';
|
|
55
61
|
import { verifyArchive } from '@inventarch/distribution/archive';
|
|
56
62
|
import { assertHostRegistrationIdle } from '@inventarch/distribution/host';
|
|
@@ -65,11 +71,11 @@ import { confirm, iaHomeOf, Interrupted, Refusal, refusalOf, respell } from './c
|
|
|
65
71
|
import { clearDecline, runDecline } from './decline.js';
|
|
66
72
|
import { CONFIRMATION, registeredProjections } from './distribute.js';
|
|
67
73
|
import { applyHostSet, collectHost, GUARD_RETIRED, hostNotes, JOURNALS, projectionRepair, recoverCommand, refusedPath, rootedNext, SETTINGS, STATE, THEN_RERUN, } from './host.js';
|
|
68
|
-
import { applyHostProjection, planFiles, planRetirement, readReceipt, renderProjectionFor } from './host-projection.js';
|
|
74
|
+
import { applyHostProjection, planFiles, planRetirement, preflightHooks, readReceipt, renderProjectionFor, } from './host-projection.js';
|
|
69
75
|
import { located } from './home-remedy.js';
|
|
70
76
|
import { findProgram, programEnv, programHome } from './program.js';
|
|
71
77
|
import { codeOf, openSession } from './session.js';
|
|
72
|
-
import { atom, blockSymbolWidth, document, entry, fieldRows, headerLine, quote, sectionLabel, truncateDigest, words, } from './render.js';
|
|
78
|
+
import { atom, blockSymbolWidth, document, entry, fieldRows, headerLine, quote, safeRootAdvice, sectionLabel, truncateDigest, words, } from './render.js';
|
|
73
79
|
/**
|
|
74
80
|
* Relative to the `@inventarch/cli` package root, as `assets/vocabulary.json` is (vocabulary.ts CATALOGUE_PATH). The base
|
|
75
81
|
* package's id is read from this pin and appears nowhere in this source: M5.1 §3.2 makes the pin the only authority.
|
|
@@ -80,7 +86,8 @@ export const STARTER_VERSION = '0.1.0';
|
|
|
80
86
|
export const INSTALL_LOCK = '.ia/distributions/install-lock.json';
|
|
81
87
|
const cachePath = (digest) => `.ia/distributions/cache/${digest}.ia.tgz`;
|
|
82
88
|
const systemFolder = (name) => `.ia/src/systems/${name}`;
|
|
83
|
-
|
|
89
|
+
/** Plan amendment C20: where `ia author system <name>` writes a local system, as `ia init --system` does. */
|
|
90
|
+
export const systemPath = (name) => `${systemFolder(name)}/system.ia`;
|
|
84
91
|
const distributionPath = (name) => `${systemFolder(name)}/records/distribution.ia`;
|
|
85
92
|
/** Position-and-projection §3: the one file the three starter records share, at the root of the authored source. */
|
|
86
93
|
export const WORKSPACE_PATH = '.ia/src/workspace.ia';
|
|
@@ -202,6 +209,8 @@ function migrationGitConflict(root, base, lock) {
|
|
|
202
209
|
/** `packages/db/src/distribution/codec.ts` packageId and identifier: the id rule and the system-name ceiling. */
|
|
203
210
|
const NAME = /^[a-z][a-z0-9-]*$/;
|
|
204
211
|
const NAME_LIMIT = 64;
|
|
212
|
+
/** A local system name `ia init --system` and `ia author system` accept: the id rule and the system-name ceiling. */
|
|
213
|
+
export const isSystemName = (name) => NAME.test(name) && name.length <= NAME_LIMIT;
|
|
205
214
|
/** M5.2 §4.3: `createFile`'s temporary name, `<target>.<randomUUID()>.tmp` (apps/distribution/src/files.ts:76). */
|
|
206
215
|
export const LEFTOVER = /^(system\.ia|workspace\.ia|distribution\.ia|release\.json|\.gitignore)\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.tmp$/;
|
|
207
216
|
/** The installation, not the target, is at fault; `ia doctor` names the channel a reinstall goes through. */
|
|
@@ -311,7 +320,7 @@ export function starterSystem(name) {
|
|
|
311
320
|
* The participant `@agent` implies no host permission, and its `@mandate` grants it closed moves over that workspace;
|
|
312
321
|
* the mandate's one prose clause claims nothing. Every name is the workspace's (decision identity-namespace).
|
|
313
322
|
*/
|
|
314
|
-
export function starterRecords(name, systems) {
|
|
323
|
+
export function starterRecords(name, systems, sources = []) {
|
|
315
324
|
return [
|
|
316
325
|
'#! ia 1.0',
|
|
317
326
|
'',
|
|
@@ -321,7 +330,7 @@ export function starterRecords(name, systems) {
|
|
|
321
330
|
' answers "Which systems does this workspace compose?"',
|
|
322
331
|
' composition',
|
|
323
332
|
` systems [${systems.map((system) => `@system ${system}`).join(', ')}]`,
|
|
324
|
-
|
|
333
|
+
` sources [${['.ia/src @authored', ...sources].map((source) => JSON.stringify(source)).join(', ')}]`,
|
|
325
334
|
` steward @agent ${name}`,
|
|
326
335
|
'',
|
|
327
336
|
`@agent ${name}`,
|
|
@@ -367,10 +376,10 @@ export function starterDistribution(name) {
|
|
|
367
376
|
* `--system` the `@workspace` composes the local system after `systems` (position-and-projection §2 case 2: a
|
|
368
377
|
* repository that owns vocabulary composes its own system), so the packet renders a pointer line for it.
|
|
369
378
|
*/
|
|
370
|
-
export function starterFiles(name, systems, system) {
|
|
379
|
+
export function starterFiles(name, systems, system, sources = []) {
|
|
371
380
|
return {
|
|
372
381
|
files: [
|
|
373
|
-
{ path: WORKSPACE_PATH, text: starterRecords(name, system ? [...systems, name] : systems) },
|
|
382
|
+
{ path: WORKSPACE_PATH, text: starterRecords(name, system ? [...systems, name] : systems, sources) },
|
|
374
383
|
...(system
|
|
375
384
|
? [
|
|
376
385
|
{ path: systemPath(name), text: starterSystem(name) },
|
|
@@ -475,7 +484,7 @@ const baseDependencies = (base) => [
|
|
|
475
484
|
* M5.1 §2.3's table. With `--system`, `distribution` stays null until the compiled record is read (§3.1 step 6);
|
|
476
485
|
* without it, `undefined` leaves the key out, because a default starter authors no `@distribution` (plan amendment B7).
|
|
477
486
|
*/
|
|
478
|
-
export function starterDescriptor(id, name, base, provenance, distribution) {
|
|
487
|
+
export function starterDescriptor(id, name, base, provenance, distribution, assets = []) {
|
|
479
488
|
return {
|
|
480
489
|
formatVersion: 1,
|
|
481
490
|
id,
|
|
@@ -484,7 +493,7 @@ export function starterDescriptor(id, name, base, provenance, distribution) {
|
|
|
484
493
|
engine: `^${DISTRIBUTION_ENGINE_VERSION}`,
|
|
485
494
|
language: ['1.0'],
|
|
486
495
|
dependencies: baseDependencies(base),
|
|
487
|
-
assets
|
|
496
|
+
assets,
|
|
488
497
|
license: 'UNLICENSED',
|
|
489
498
|
description: `The ${name} workspace.`,
|
|
490
499
|
source: provenance.source,
|
|
@@ -521,6 +530,38 @@ function filesBelow(root, path) {
|
|
|
521
530
|
walk(path);
|
|
522
531
|
return found;
|
|
523
532
|
}
|
|
533
|
+
/** Whether `path` is `base` or lies below it; an in-base name that only begins with `..`, such as `..x`, is below it. */
|
|
534
|
+
const within = (base, path) => {
|
|
535
|
+
const here = relative(base, path);
|
|
536
|
+
return here === '' || (here !== '..' && !here.startsWith(`..${sep}`) && !isAbsolute(here));
|
|
537
|
+
};
|
|
538
|
+
/**
|
|
539
|
+
* `--from`: lower the plugin; any unresolved construct refuses before anything is planned or written, with every entry
|
|
540
|
+
* in the refusal's details. A target that is the plugin directory or lies inside it is refused before the plugin is
|
|
541
|
+
* read, since lowering would write into its own source; a target that contains the plugin is legal.
|
|
542
|
+
*/
|
|
543
|
+
function lowerFrom(from, root, name, lower) {
|
|
544
|
+
const plugin = resolve(from);
|
|
545
|
+
let plan = null;
|
|
546
|
+
try {
|
|
547
|
+
// The plugin is always read, so an input error refuses at once; lowering needs a name and a target free of conflicts.
|
|
548
|
+
if (statSync(plugin, { throwIfNoEntry: false })?.isDirectory() !== true)
|
|
549
|
+
throw new HostPluginError('IA-PLUGIN-INPUT', `${from} is not a plugin directory`);
|
|
550
|
+
if (within(canonical(plugin), canonical(root)))
|
|
551
|
+
throw new Refusal('IA-PLUGIN-INPUT', `${root} is the plugin directory or lies inside it; lowering never writes into its own source`, 1, { path: plugin }, `Choose a target directory outside the plugin, then run "ia init <directory> --from ${quote(plugin)}".`);
|
|
552
|
+
const inventory = readPlugin(plugin);
|
|
553
|
+
if (lower && name !== null)
|
|
554
|
+
plan = lowerPlugin(inventory, name);
|
|
555
|
+
}
|
|
556
|
+
catch (error) {
|
|
557
|
+
if (error instanceof HostPluginError)
|
|
558
|
+
throw new Refusal(error.code, error.message, 1, { path: plugin }, 'Run "ia init --help" for what a plugin directory may hold.');
|
|
559
|
+
throw error;
|
|
560
|
+
}
|
|
561
|
+
if (plan !== null && plan.unresolved.length > 0)
|
|
562
|
+
throw new Refusal('IA-LOWER-UNRESOLVED', `${plan.unresolved.length} construct(s) cannot be lowered yet: ${plan.unresolved.slice(0, 20).join('; ')}${plan.unresolved.length > 20 ? '; ...' : ''}`, 1, { path: plugin }, 'Nothing was written; run "ia init --help" for what a plugin directory may hold.', null, undefined, plan.unresolved);
|
|
563
|
+
return plan;
|
|
564
|
+
}
|
|
524
565
|
/**
|
|
525
566
|
* M5.2 §4.1. The starter bytes compared are what this invocation would write for its resolved id: they depend only
|
|
526
567
|
* on the name, `--system` and the bundled manifest, so they are recomputed on every run instead of being journaled.
|
|
@@ -537,7 +578,35 @@ export function collectInit(request) {
|
|
|
537
578
|
conflicts.push(identity.conflict);
|
|
538
579
|
const { name, id } = identity;
|
|
539
580
|
const provenance = readProvenance(request.git);
|
|
540
|
-
const
|
|
581
|
+
const sources = present
|
|
582
|
+
? adoptedBindings(root).map((binding) => `${binding.tree}/.ia/src @${binding.placement ?? 'adopted'}`)
|
|
583
|
+
: [];
|
|
584
|
+
if (request.adoption) {
|
|
585
|
+
const source = `.ia/open/${adoptionId(request.adoption.id)}/${request.adoption.release.revision}/.ia/src @open`;
|
|
586
|
+
if (!sources.includes(source))
|
|
587
|
+
sources.push(source);
|
|
588
|
+
}
|
|
589
|
+
// An initialized target keeps init's own conflict report; only a target free of conflicts is lowered.
|
|
590
|
+
const lowered = request.from === undefined
|
|
591
|
+
? null
|
|
592
|
+
: lowerFrom(request.from, root, name, identity.conflict === null && !existsSync(resolve(root, DESCRIPTOR_PATH)));
|
|
593
|
+
const { files, records } = name === null
|
|
594
|
+
? { files: [], records: [] }
|
|
595
|
+
: lowered !== null
|
|
596
|
+
? {
|
|
597
|
+
files: [
|
|
598
|
+
{ path: WORKSPACE_PATH, text: starterRecords(name, [...base.systems, name], sources) },
|
|
599
|
+
...lowered.files.map((file) => ({ path: file.path, text: file.bytes.toString('utf8') })),
|
|
600
|
+
],
|
|
601
|
+
records: [
|
|
602
|
+
{ word: 'workspace', name, path: WORKSPACE_PATH },
|
|
603
|
+
{ word: 'agent', name, path: WORKSPACE_PATH },
|
|
604
|
+
{ word: 'mandate', name: `${name}-mandate`, path: WORKSPACE_PATH },
|
|
605
|
+
...lowered.records,
|
|
606
|
+
],
|
|
607
|
+
}
|
|
608
|
+
: starterFiles(name, base.systems, system, sources);
|
|
609
|
+
const assets = lowered?.assets ?? [];
|
|
541
610
|
// M5.2 §4.3: a temporary file `createFile` left beside one of this initialization's own targets.
|
|
542
611
|
const targets = new Set([...files.map((file) => file.path), IGNORE_PATH, DESCRIPTOR_PATH]);
|
|
543
612
|
// `.<uuid>.tmp` is 41 characters: the dot, a 36-character UUID and `.tmp`.
|
|
@@ -635,6 +704,7 @@ export function collectInit(request) {
|
|
|
635
704
|
...(host === 'none' ? [] : [{ id: 'project', status: 'pending', paths: [] }]),
|
|
636
705
|
];
|
|
637
706
|
return {
|
|
707
|
+
...(request.adoption ? { adoption: request.adoption } : {}),
|
|
638
708
|
root,
|
|
639
709
|
owns: ownedPaths(name, system),
|
|
640
710
|
state,
|
|
@@ -649,7 +719,10 @@ export function collectInit(request) {
|
|
|
649
719
|
system,
|
|
650
720
|
files,
|
|
651
721
|
records,
|
|
652
|
-
|
|
722
|
+
assets,
|
|
723
|
+
descriptor: id === null || name === null
|
|
724
|
+
? null
|
|
725
|
+
: starterDescriptor(id, name, base, provenance, system ? null : undefined, assets),
|
|
653
726
|
base: base.pin,
|
|
654
727
|
systems: base.systems,
|
|
655
728
|
provenance,
|
|
@@ -706,6 +779,8 @@ export async function applyInit(view, options) {
|
|
|
706
779
|
if (step('install').status === 'pending')
|
|
707
780
|
await installBase(root, base, 'install', { signal: options.signal, checkpoint }, resume);
|
|
708
781
|
boundary('install');
|
|
782
|
+
if (view.adoption)
|
|
783
|
+
applyAdoption(planAdoption(root, view.adoption.id, view.adoption.release, false));
|
|
709
784
|
// Step 4, author: create-only, so a starter file already present with these bytes is skipped and nothing is ever
|
|
710
785
|
// rewritten. The ignore file is written only where none exists; one the target already holds is its own.
|
|
711
786
|
for (const file of starter.files)
|
|
@@ -720,7 +795,7 @@ export async function applyInit(view, options) {
|
|
|
720
795
|
const authored = compiled.map((record) => record.identity), distribution = compiled.find((record) => record.discriminator === 'distribution')?.identity ?? null;
|
|
721
796
|
boundary('admission');
|
|
722
797
|
// Step 6, the completion point (§4.1). A default starter's descriptor names no distribution (plan amendment B7).
|
|
723
|
-
createFile(root, DESCRIPTOR_PATH, Buffer.from(descriptorText(starterDescriptor(id, name, base, starter.provenance, distribution ?? undefined))));
|
|
798
|
+
createFile(root, DESCRIPTOR_PATH, Buffer.from(descriptorText(starterDescriptor(id, name, base, starter.provenance, distribution ?? undefined, starter.assets))));
|
|
724
799
|
checkpoint('init:descriptor');
|
|
725
800
|
const installed = readInstalledState({ root });
|
|
726
801
|
// Step 7, the capture effect: `ia capture` on the workspace just initialized, written through db's writeCapture. A
|
|
@@ -798,7 +873,7 @@ const conflictMessage = (conflicts, blocked) => conflicts.length === 1
|
|
|
798
873
|
function initializedNext(view) {
|
|
799
874
|
if (!view.conflicts.some((row) => row.path === DESCRIPTOR_PATH && row.reason === 'The target is already initialized'))
|
|
800
875
|
return null;
|
|
801
|
-
return `${existsSync(resolve(view.root, WORKSPACE_PATH)) || existsSync(resolve(view.root, SYSTEMS)) ? '' : 'Restore the authored .ia/src/workspace.ia from source control first. '}Run "ia position --root ${quote(view.root)}" to inspect this initialized workspace
|
|
876
|
+
return safeRootAdvice(`${existsSync(resolve(view.root, WORKSPACE_PATH)) || existsSync(resolve(view.root, SYSTEMS)) ? '' : 'Restore the authored .ia/src/workspace.ia from source control first. '}Run "ia position --root ${quote(view.root)}" to inspect this initialized workspace.`, [view.root]);
|
|
802
877
|
}
|
|
803
878
|
function conflictRefusal(view) {
|
|
804
879
|
return new Refusal('IA-CLI-CONFLICT', conflictMessage(view.conflicts, 'initialization'), 3, { path: view.root }, initializedNext(view) ?? `Run "${view.invocation}" to review the plan and its conflicts.`);
|
|
@@ -811,6 +886,18 @@ export function initEnvelope(view, apply, applied = null) {
|
|
|
811
886
|
root: view.root,
|
|
812
887
|
apply,
|
|
813
888
|
plan: {
|
|
889
|
+
...(view.adoption
|
|
890
|
+
? {
|
|
891
|
+
adoption: {
|
|
892
|
+
id: view.adoption.id,
|
|
893
|
+
version: view.adoption.release.version,
|
|
894
|
+
revision: view.adoption.release.revision,
|
|
895
|
+
placement: 'open',
|
|
896
|
+
band: 50,
|
|
897
|
+
files: view.adoption.release.files.map((file) => file.path),
|
|
898
|
+
},
|
|
899
|
+
}
|
|
900
|
+
: {}),
|
|
814
901
|
state: view.state,
|
|
815
902
|
...(initializedNext(view) === null ? {} : { next: initializedNext(view) }),
|
|
816
903
|
owns: view.owns.map((row) => row.path),
|
|
@@ -961,14 +1048,29 @@ const planBlocks = (view, caps) => {
|
|
|
961
1048
|
],
|
|
962
1049
|
];
|
|
963
1050
|
};
|
|
964
|
-
export function renderInit(view, caps) {
|
|
965
|
-
const next = view.state === 'conflict'
|
|
1051
|
+
export function renderInit(view, caps, supplied, advice) {
|
|
1052
|
+
const next = safeRootAdvice(view.state === 'conflict'
|
|
966
1053
|
? (initializedNext(view) ?? `Resolve the conflicts above, then run "${view.invocation} --apply --yes".`)
|
|
967
|
-
: `Apply with "${view.invocation} --apply --yes".${view.state === 'resumable' ? ' Completed steps are skipped.' : ''}
|
|
1054
|
+
: `Apply with "${view.invocation} --apply --yes".${view.state === 'resumable' ? ' Completed steps are skipped.' : ''}`, [view.root, supplied], advice);
|
|
968
1055
|
return document([
|
|
969
1056
|
headerLine('Plan', 'init', [{ text: view.root, column: 50 }], caps),
|
|
970
1057
|
entry([words('This is a preview. Nothing has been written.')], { depth: 1 }, caps),
|
|
1058
|
+
...(view.adoption
|
|
1059
|
+
? [
|
|
1060
|
+
entry([
|
|
1061
|
+
words(`Adopt ${view.adoption.id}@${view.adoption.release.version}, pinned ${view.adoption.release.revision}, as source-only material at @open (band 50).`),
|
|
1062
|
+
], { depth: 1 }, caps),
|
|
1063
|
+
]
|
|
1064
|
+
: []),
|
|
971
1065
|
...planBlocks(view, caps),
|
|
1066
|
+
...(view.directory === 'absent' &&
|
|
1067
|
+
(!inertCommandRoot(view.root) || (supplied !== undefined && !inertCommandRoot(supplied)))
|
|
1068
|
+
? [
|
|
1069
|
+
entry([
|
|
1070
|
+
words('Create the target directory without pasting its path into a shell, then enter it before running the suggested command.'),
|
|
1071
|
+
], { depth: 0 }, caps),
|
|
1072
|
+
]
|
|
1073
|
+
: []),
|
|
972
1074
|
entry([words(next)], { depth: 0, symbol: 'step' }, caps),
|
|
973
1075
|
], { leadingBlank: true });
|
|
974
1076
|
}
|
|
@@ -1020,14 +1122,20 @@ export function renderApplied(view, applied, caps) {
|
|
|
1020
1122
|
closingEntry(applied.distribution, caps),
|
|
1021
1123
|
], { leadingBlank: true });
|
|
1022
1124
|
}
|
|
1023
|
-
const renderDeclined = (view, caps) => document([
|
|
1125
|
+
const renderDeclined = (view, caps, supplied, advice) => document([
|
|
1024
1126
|
entry([words('Nothing was applied.')], { depth: 0, symbol: 'info' }, caps),
|
|
1025
|
-
entry([words(`Apply with "${view.invocation} --apply --yes"
|
|
1127
|
+
entry([words(safeRootAdvice(`Apply with "${view.invocation} --apply --yes".`, [view.root, supplied], advice))], { depth: 0, symbol: 'step' }, caps),
|
|
1026
1128
|
], { leadingBlank: true });
|
|
1027
1129
|
function invocationOf(context) {
|
|
1028
1130
|
const { args } = context;
|
|
1029
1131
|
const parts = ['ia init', ...args.positionals.map(quote)];
|
|
1030
1132
|
const id = args.value('id'), host = args.value('host');
|
|
1133
|
+
// `--from` too, as typed: without it the apply, resume and conflict commands would initialize a plain starter.
|
|
1134
|
+
for (const option of ['adopt', 'registry', 'from']) {
|
|
1135
|
+
const value = args.value(option);
|
|
1136
|
+
if (value !== undefined)
|
|
1137
|
+
parts.push(`--${option}`, quote(value));
|
|
1138
|
+
}
|
|
1031
1139
|
if (id !== undefined)
|
|
1032
1140
|
parts.push('--id', quote(id));
|
|
1033
1141
|
if (args.flag('migrate'))
|
|
@@ -1041,6 +1149,8 @@ function invocationOf(context) {
|
|
|
1041
1149
|
export async function runInit(context) {
|
|
1042
1150
|
const { args, host } = context;
|
|
1043
1151
|
const id = args.value('id');
|
|
1152
|
+
if (args.value('registry') !== undefined && args.value('adopt') === undefined)
|
|
1153
|
+
throw new UsageError('ia init --registry requires --adopt');
|
|
1044
1154
|
// A malformed identity is usage (§3), decided before the target is read.
|
|
1045
1155
|
if (id !== undefined && (!PACKAGE_ID.test(id) || id.includes('..')))
|
|
1046
1156
|
throw new UsageError(`--id must be <provider/name>; got ${id}`);
|
|
@@ -1075,11 +1185,15 @@ async function initialize(context, root, id) {
|
|
|
1075
1185
|
const selected = (args.value('host') ?? 'none');
|
|
1076
1186
|
const apply = args.flag('apply');
|
|
1077
1187
|
const existing = statSync(root, { throwIfNoEntry: false }) === undefined ? dirname(root) : root;
|
|
1188
|
+
const adoption = args.value('adopt') === undefined ? undefined : await registryWorkspace(context, root, args.value('adopt'));
|
|
1078
1189
|
const view = collectInit({
|
|
1190
|
+
...(adoption ? { adoption } : {}),
|
|
1079
1191
|
root,
|
|
1080
1192
|
host: selected,
|
|
1081
1193
|
id,
|
|
1082
|
-
system: args.flag('system'),
|
|
1194
|
+
system: args.value('from') === undefined && args.flag('system'),
|
|
1195
|
+
// Read against the invocation's directory, as the target is, so `--from .` names the directory it was typed in.
|
|
1196
|
+
from: args.value('from') === undefined ? undefined : resolve(host.cwd, args.value('from')),
|
|
1083
1197
|
packageRoot: host.packageRoot,
|
|
1084
1198
|
git: gitIn(existing, host.env),
|
|
1085
1199
|
invocation: invocationOf(context),
|
|
@@ -1088,7 +1202,7 @@ async function initialize(context, root, id) {
|
|
|
1088
1202
|
? { exitCode: 0, stdout: JSON.stringify(initEnvelope(view, apply, applied)) + '\n', stderr: '' }
|
|
1089
1203
|
: {
|
|
1090
1204
|
exitCode: 0,
|
|
1091
|
-
stdout: applied === null ? renderInit(view, caps) : renderApplied(view, applied, caps),
|
|
1205
|
+
stdout: applied === null ? renderInit(view, caps, args.positionals[0], host) : renderApplied(view, applied, caps),
|
|
1092
1206
|
stderr: '',
|
|
1093
1207
|
};
|
|
1094
1208
|
// §2.1: conflicts are reported inside the plan and are not an error class, so a plan is always exit 0.
|
|
@@ -1098,7 +1212,7 @@ async function initialize(context, root, id) {
|
|
|
1098
1212
|
throw conflictRefusal(view);
|
|
1099
1213
|
// §2.8 rule 3, as `ia install` asks it: parsing already refused every `--apply` whose question cannot be answered.
|
|
1100
1214
|
if (!args.flag('yes') && !(await confirm(host.interaction, renderInitSummary(view, caps), CONFIRMATION)))
|
|
1101
|
-
return { exitCode: 0, stdout: renderDeclined(view, caps), stderr: '' };
|
|
1215
|
+
return { exitCode: 0, stdout: renderDeclined(view, caps, args.positionals[0], host), stderr: '' };
|
|
1102
1216
|
// The project effect, last (position-and-projection §3): the `ia host` path, whose apply writes the receipt.
|
|
1103
1217
|
const project = selected === 'none' ? undefined : (done) => registerHost(context, selected, root, done);
|
|
1104
1218
|
try {
|
|
@@ -1390,6 +1504,8 @@ export function collectMigration(request) {
|
|
|
1390
1504
|
for (const host of projected)
|
|
1391
1505
|
try {
|
|
1392
1506
|
const guard = planRetirement(root, host) === null ? 'none' : 'retire';
|
|
1507
|
+
// The hook step the projection effect runs (review finding H-R3), found before the migration plans its writes.
|
|
1508
|
+
preflightHooks(root, host);
|
|
1393
1509
|
hosts.push({ host, guard, files: migratedFiles(root, host) });
|
|
1394
1510
|
}
|
|
1395
1511
|
catch (error) {
|
|
@@ -1822,10 +1938,10 @@ const migrationBlocks = (view, caps) => {
|
|
|
1822
1938
|
];
|
|
1823
1939
|
};
|
|
1824
1940
|
const migrationHeader = (view, caps) => headerLine('Plan', `init --migrate from ${MIGRATES_FROM}`, [{ text: view.root, column: 50 }], caps);
|
|
1825
|
-
export function renderMigration(view, caps) {
|
|
1826
|
-
const next = view.conflicts.length > 0
|
|
1941
|
+
export function renderMigration(view, caps, supplied) {
|
|
1942
|
+
const next = safeRootAdvice(view.conflicts.length > 0
|
|
1827
1943
|
? `Resolve the conflicts above, then run "${view.invocation} --apply --yes".`
|
|
1828
|
-
: `Apply with "${view.invocation} --apply --yes"
|
|
1944
|
+
: `Apply with "${view.invocation} --apply --yes".`, [view.root, supplied]);
|
|
1829
1945
|
return document([
|
|
1830
1946
|
migrationHeader(view, caps),
|
|
1831
1947
|
entry([words('This is a preview. Nothing has been written.')], { depth: 1 }, caps),
|
|
@@ -1884,7 +2000,7 @@ async function migrate(context, root) {
|
|
|
1884
2000
|
? { exitCode: 0, stdout: JSON.stringify(migrationEnvelope(view, apply, applied)) + '\n', stderr: '' }
|
|
1885
2001
|
: {
|
|
1886
2002
|
exitCode: 0,
|
|
1887
|
-
stdout: applied === null ? renderMigration(view, caps) : renderMigrated(view, applied, caps),
|
|
2003
|
+
stdout: applied === null ? renderMigration(view, caps, args.positionals[0]) : renderMigrated(view, applied, caps),
|
|
1888
2004
|
stderr: '',
|
|
1889
2005
|
};
|
|
1890
2006
|
if (!apply)
|
|
@@ -1892,7 +2008,7 @@ async function migrate(context, root) {
|
|
|
1892
2008
|
if (view.conflicts.length > 0)
|
|
1893
2009
|
throw migrationRefusal(view);
|
|
1894
2010
|
if (!args.flag('yes') && !(await confirm(host.interaction, renderMigrationSummary(view, caps), CONFIRMATION)))
|
|
1895
|
-
return { exitCode: 0, stdout: renderDeclined(view, caps), stderr: '' };
|
|
2011
|
+
return { exitCode: 0, stdout: renderDeclined(view, caps, args.positionals[0]), stderr: '' };
|
|
1896
2012
|
return rendered(await applyMigration(view, { packageRoot: host.packageRoot, signal: host.signal }));
|
|
1897
2013
|
}
|
|
1898
2014
|
/**
|