@inventarch/cli 1.1.1 → 2.0.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/LANGUAGE.md +2 -2
- package/README.md +17 -4
- package/SPEC.md +51 -7
- package/assets/base/0305ca741b1dfec97ff35fbeb36d4a66a0c9c0614b730fe14fcdac0f1565e28a.ia.tgz +0 -0
- package/assets/base.json +3 -3
- package/assets/host/3d2c8530db8d14755410b17be8228a230d88de96f9dc78f953979d3ca7c6ea62.tgz +0 -0
- package/assets/host.json +4 -4
- package/assets/vocabulary.json +436 -4
- package/dist/bundled-base.d.ts +18 -0
- package/dist/bundled-base.d.ts.map +1 -0
- package/dist/bundled-base.js +44 -0
- package/dist/bundled-base.js.map +1 -0
- package/dist/capture.d.ts +108 -0
- package/dist/capture.d.ts.map +1 -0
- package/dist/capture.js +346 -0
- package/dist/capture.js.map +1 -0
- package/dist/claude-cli.js +1 -1
- package/dist/claude-cli.js.map +1 -1
- package/dist/commands.d.ts +23 -1
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +201 -10
- package/dist/commands.js.map +1 -1
- package/dist/compile.d.ts +5 -0
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +40 -51
- package/dist/compile.js.map +1 -1
- package/dist/consumer.d.ts +48 -7
- package/dist/consumer.d.ts.map +1 -1
- package/dist/consumer.js +142 -29
- package/dist/consumer.js.map +1 -1
- package/dist/decline.d.ts.map +1 -1
- package/dist/decline.js +15 -7
- package/dist/decline.js.map +1 -1
- package/dist/distribute.d.ts +68 -16
- package/dist/distribute.d.ts.map +1 -1
- package/dist/distribute.js +243 -110
- package/dist/distribute.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +113 -60
- package/dist/doctor.js.map +1 -1
- package/dist/format.d.ts +2 -2
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +19 -11
- package/dist/format.js.map +1 -1
- package/dist/home-remedy.d.ts +8 -4
- package/dist/home-remedy.d.ts.map +1 -1
- package/dist/home-remedy.js +8 -4
- package/dist/home-remedy.js.map +1 -1
- package/dist/host-projection.d.ts +73 -6
- package/dist/host-projection.d.ts.map +1 -1
- package/dist/host-projection.js +296 -38
- package/dist/host-projection.js.map +1 -1
- package/dist/host.d.ts +106 -30
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +270 -139
- package/dist/host.js.map +1 -1
- package/dist/init.d.ts +285 -37
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +1270 -205
- package/dist/init.js.map +1 -1
- package/dist/inspect.d.ts +26 -2
- package/dist/inspect.d.ts.map +1 -1
- package/dist/inspect.js +117 -52
- package/dist/inspect.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +3 -1
- package/dist/main.js.map +1 -1
- package/dist/migration-journal.d.ts +35 -0
- package/dist/migration-journal.d.ts.map +1 -0
- package/dist/migration-journal.js +205 -0
- package/dist/migration-journal.js.map +1 -0
- package/dist/next.d.ts +21 -0
- package/dist/next.d.ts.map +1 -0
- package/dist/next.js +210 -0
- package/dist/next.js.map +1 -0
- package/dist/operation-help.d.ts.map +1 -1
- package/dist/operation-help.js +14 -3
- package/dist/operation-help.js.map +1 -1
- package/dist/pack.d.ts +3 -1
- package/dist/pack.d.ts.map +1 -1
- package/dist/pack.js +56 -11
- package/dist/pack.js.map +1 -1
- package/dist/position.d.ts +22 -0
- package/dist/position.d.ts.map +1 -0
- package/dist/position.js +242 -0
- package/dist/position.js.map +1 -0
- package/dist/project.d.ts +42 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +232 -0
- package/dist/project.js.map +1 -0
- package/dist/read.d.ts +31 -0
- package/dist/read.d.ts.map +1 -0
- package/dist/read.js +152 -0
- package/dist/read.js.map +1 -0
- package/dist/render.d.ts +19 -0
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +44 -1
- package/dist/render.js.map +1 -1
- package/dist/session.d.ts +12 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +68 -6
- package/dist/session.js.map +1 -1
- package/dist/user-host.d.ts.map +1 -1
- package/dist/user-host.js +7 -5
- package/dist/user-host.js.map +1 -1
- package/dist/validate.d.ts +1 -2
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +6 -27
- package/dist/validate.js.map +1 -1
- package/dist/vocabulary.d.ts +4 -0
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +12 -7
- package/dist/vocabulary.js.map +1 -1
- package/package.json +6 -6
- package/assets/base/78bff5eb3188b628c06d2f1cf1477fb1bfcea874ec3863ae112b4972b8e81517.ia.tgz +0 -0
- package/assets/host/b97e367bbf15db09f552d6bd6dd3701210efe77931d34b57ccb85240957aba61.tgz +0 -0
package/dist/format.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ export interface FormatView {
|
|
|
15
15
|
readonly changed: number;
|
|
16
16
|
}
|
|
17
17
|
/** §2.3: the default selection is `.ia/src`; a positional is a file or a directory relative to the root. */
|
|
18
|
-
export declare function selectSources(root: string, filters: readonly string[]): readonly string[];
|
|
19
|
-
export declare function collectFormat(root: string, filters: readonly string[], write: boolean): FormatView;
|
|
18
|
+
export declare function selectSources(root: string, filters: readonly string[], retry?: (supplied: string) => string): readonly string[];
|
|
19
|
+
export declare function collectFormat(root: string, filters: readonly string[], write: boolean, retry?: (supplied: string) => string): FormatView;
|
|
20
20
|
/** §2.3: 1 when a file differs under --check or the formatter refused a document; --write rewrote them, so 0. */
|
|
21
21
|
export declare const formatExit: (view: FormatView) => 0 | 1;
|
|
22
22
|
export declare function formatEnvelope(view: FormatView): unknown;
|
package/dist/format.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAA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SAAS,UAAU,EAAE,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAqCD,4GAA4G;AAC5G,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,KAAK,GAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAyB,GACrD,SAAS,MAAM,EAAE,CAMnB;AAQD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,KAAK,EAAE,OAAO,EACd,KAAK,GAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAyB,GACrD,UAAU,CA6CZ;AAGD,iHAAiH;AACjH,eAAO,MAAM,UAAU,GAAI,MAAM,UAAU,KAAG,CAAC,GAAG,CAC+B,CAAC;AAElF,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CASxD;AAcD,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM,CAoEzE;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAUlD"}
|
package/dist/format.js
CHANGED
|
@@ -10,14 +10,17 @@
|
|
|
10
10
|
import { readdirSync } from 'node:fs';
|
|
11
11
|
import { isAbsolute, resolve } from 'node:path';
|
|
12
12
|
import { formatSource, readWorkspaceFile, replace } from '@inventarch/distribution/services';
|
|
13
|
-
import { Refusal, requireRoot } from './consumer.js';
|
|
13
|
+
import { Refusal, requireRoot, respell } from './consumer.js';
|
|
14
14
|
import { codeOf, openSession } from './session.js';
|
|
15
|
-
import { atom, document, entry, headerLine, sectionLabel, truncateDigest, words } from './render.js';
|
|
16
|
-
/**
|
|
17
|
-
|
|
15
|
+
import { atom, document, entry, headerLine, quote, sectionLabel, truncateDigest, words } from './render.js';
|
|
16
|
+
/**
|
|
17
|
+
* §2.3 names IA-DIST-PATH-UNSAFE for a path resolving outside --root; a directory never reaches a service. `retry`
|
|
18
|
+
* spells the refused invocation with `<path>` in place of the path it refuses.
|
|
19
|
+
*/
|
|
20
|
+
const contain = (supplied, retry) => {
|
|
18
21
|
const path = supplied.replaceAll('\\', '/').replace(/^\.\//, '').replace(/\/+$/, '');
|
|
19
22
|
if (path === '' || isAbsolute(supplied) || path.split('/').includes('..'))
|
|
20
|
-
throw new Refusal('IA-DIST-PATH-UNSAFE', `Unsafe relative path: ${supplied}`, 3, { path: supplied },
|
|
23
|
+
throw new Refusal('IA-DIST-PATH-UNSAFE', `Unsafe relative path: ${supplied}`, 3, { path: supplied }, `Run "${retry(supplied)}" naming a path inside the workspace root, relative to it.`);
|
|
21
24
|
return path;
|
|
22
25
|
};
|
|
23
26
|
/** Directories are walked for `*.ia` files only; a link is never followed, matching the reader's own rule. */
|
|
@@ -36,17 +39,19 @@ function walk(root, path) {
|
|
|
36
39
|
return [];
|
|
37
40
|
}
|
|
38
41
|
}
|
|
42
|
+
/** The rerun an unsafe path names when the caller spells none: a check of the corrected path in this root. */
|
|
43
|
+
const checkAgain = (root) => () => `ia format <path> --root ${quote(root)}`;
|
|
39
44
|
/** §2.3: the default selection is `.ia/src`; a positional is a file or a directory relative to the root. */
|
|
40
|
-
export function selectSources(root, filters) {
|
|
45
|
+
export function selectSources(root, filters, retry = checkAgain(root)) {
|
|
41
46
|
const selected = (filters.length === 0 ? ['.ia/src'] : filters).flatMap((supplied) => {
|
|
42
|
-
const path = contain(supplied);
|
|
47
|
+
const path = contain(supplied, retry);
|
|
43
48
|
return path.endsWith('.ia') ? [path] : walk(root, path);
|
|
44
49
|
});
|
|
45
50
|
return [...new Set(selected)].sort();
|
|
46
51
|
}
|
|
47
52
|
const text = (root, path) => readWorkspaceFile({ root, path }).toString('utf8');
|
|
48
|
-
export function collectFormat(root, filters, write) {
|
|
49
|
-
const paths = selectSources(root, filters);
|
|
53
|
+
export function collectFormat(root, filters, write, retry = checkAgain(root)) {
|
|
54
|
+
const paths = selectSources(root, filters, retry);
|
|
50
55
|
let session;
|
|
51
56
|
try {
|
|
52
57
|
session = openSession(root);
|
|
@@ -55,7 +60,8 @@ export function collectFormat(root, filters, write) {
|
|
|
55
60
|
for (const path of paths) {
|
|
56
61
|
const current = text(root, path);
|
|
57
62
|
// The formatter's domain is narrower than `*.ia`: it declines a system declaration, a schema and anything
|
|
58
|
-
// outside an admitted authored system
|
|
63
|
+
// outside both an admitted authored system and an admitted `@workspace`'s authored root (the floor included),
|
|
64
|
+
// all with IA-DIST-PATH-UNSAFE (the authoring-system draft target). Traversal was already refused by
|
|
59
65
|
// contain() and the read above, so that code here means "outside the formatter's domain" and is reported
|
|
60
66
|
// per file rather than ending the run — a whole-tree check must not stop at the packaged floor.
|
|
61
67
|
let outcome;
|
|
@@ -159,7 +165,9 @@ export function renderFormat(view, caps) {
|
|
|
159
165
|
}
|
|
160
166
|
export function runFormat(context) {
|
|
161
167
|
const { args, caps, json } = context;
|
|
162
|
-
|
|
168
|
+
// Design row 27: the refused path's rerun keeps every other argument, the root and the mode included.
|
|
169
|
+
const retry = (supplied) => respell(context, { positionals: args.positionals.map((path) => (path === supplied ? '<path>' : path)) });
|
|
170
|
+
const view = collectFormat(requireRoot(context), args.positionals, args.flag('write'), retry);
|
|
163
171
|
const exitCode = formatExit(view);
|
|
164
172
|
return json
|
|
165
173
|
? { exitCode, stdout: JSON.stringify(formatEnvelope(view)) + '\n', stderr: '' }
|
package/dist/format.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAE7F,OAAO,EAAE,OA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C,4DAA4D,CACrE;KACF,EACD,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAC5B,IAAI,CACL,CACF,CAAC;IACF,OAAO,QAAQ,CAAC,MAAM,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAgB;IACxC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACrC,sGAAsG;IACtG,MAAM,KAAK,GAAG,CAAC,QAAgB,EAAU,EAAE,CACzC,OAAO,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;IAC3G,MAAM,IAAI,GAAG,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9F,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,IAAI;QACT,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE;QAC/E,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AACjE,CAAC"}
|
package/dist/home-remedy.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/** A service refusal kept verbatim (§4.1) and given the location and next action the CLI can supply. */
|
|
2
2
|
export declare function located<T>(where: string | null, next: string, run: () => T): T;
|
|
3
|
-
/**
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* §3. A relative IA_HOME is the service's refusal; the remedy is the CLI's, ending in `rerun`: the refused invocation
|
|
5
|
+
* again, or by default `ia doctor`, whose IA home row reports the home once it resolves.
|
|
6
|
+
*/
|
|
7
|
+
export declare const hostHome: (env: Readonly<Record<string, string | undefined>>, rerun?: string) => string;
|
|
5
8
|
/**
|
|
6
9
|
* §3: the remedy for an IA home that itself looks like a workspace. Callers run `assertIaHomeUsable` explicitly (not
|
|
7
|
-
* by pattern-matching a refusal's message), so this wording is never guessed at, and every verb words it the same
|
|
10
|
+
* by pattern-matching a refusal's message), so this wording is never guessed at, and every verb words it the same,
|
|
11
|
+
* ending in the one command that runs the refused invocation again (design row 27), or by default `ia doctor`.
|
|
8
12
|
*/
|
|
9
|
-
export declare const homeSrcRemedy: (home: string) => string;
|
|
13
|
+
export declare const homeSrcRemedy: (home: string, rerun?: string) => string;
|
|
10
14
|
//# sourceMappingURL=home-remedy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-remedy.d.ts","sourceRoot":"","sources":["../src/home-remedy.ts"],"names":[],"mappings":"AASA,wGAAwG;AACxG,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAa9E;AACD
|
|
1
|
+
{"version":3,"file":"home-remedy.d.ts","sourceRoot":"","sources":["../src/home-remedy.ts"],"names":[],"mappings":"AASA,wGAAwG;AACxG,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAa9E;AACD;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,EAAE,cAAmB,KAAG,MAK/F,CAAC;AACJ;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,EAAE,cAAmB,KAAG,MACkD,CAAC"}
|
package/dist/home-remedy.js
CHANGED
|
@@ -16,11 +16,15 @@ export function located(where, next, run) {
|
|
|
16
16
|
throw new Refusal(refusal.code, refusal.message, refusal.exit, where === null ? refusal.where : { path: where }, next);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* §3. A relative IA_HOME is the service's refusal; the remedy is the CLI's, ending in `rerun`: the refused invocation
|
|
21
|
+
* again, or by default `ia doctor`, whose IA home row reports the home once it resolves.
|
|
22
|
+
*/
|
|
23
|
+
export const hostHome = (env, rerun = 'ia doctor') => located(null, `Set IA_HOME to an absolute directory, or unset it to use ~/.ia; then run "${rerun}".`, () => resolveIaHome(env, homedir()).home);
|
|
21
24
|
/**
|
|
22
25
|
* §3: the remedy for an IA home that itself looks like a workspace. Callers run `assertIaHomeUsable` explicitly (not
|
|
23
|
-
* by pattern-matching a refusal's message), so this wording is never guessed at, and every verb words it the same
|
|
26
|
+
* by pattern-matching a refusal's message), so this wording is never guessed at, and every verb words it the same,
|
|
27
|
+
* ending in the one command that runs the refused invocation again (design row 27), or by default `ia doctor`.
|
|
24
28
|
*/
|
|
25
|
-
export const homeSrcRemedy = (home) => `Move ${join(home, 'src')} out of the IA home, or set IA_HOME to another absolute directory.`;
|
|
29
|
+
export const homeSrcRemedy = (home, rerun = 'ia doctor') => `Move ${join(home, 'src')} out of the IA home, or set IA_HOME to another absolute directory; then run "${rerun}".`;
|
|
26
30
|
//# sourceMappingURL=home-remedy.js.map
|
package/dist/home-remedy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-remedy.js","sourceRoot":"","sources":["../src/home-remedy.ts"],"names":[],"mappings":"AAAA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AAO,CAAC,IAAI,EACZ,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,IAAI,EACZ,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAChD,IAAI,CACL,CAAC;IACJ,CAAC;AACH,CAAC;AACD;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAiD,EAAE,KAAK,GAAG,WAAW,EAAU,EAAE,CACzG,OAAO,CACL,IAAI,EACJ,6EAA6E,KAAK,IAAI,EACtF,GAAG,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,CACzC,CAAC;AACJ;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,KAAK,GAAG,WAAW,EAAU,EAAE,CACzE,QAAQ,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,gFAAgF,KAAK,IAAI,CAAC"}
|
|
@@ -1,11 +1,78 @@
|
|
|
1
|
+
import type { HostFile, HostOutput, PacketReceipt } from '@inventarch/runtime';
|
|
2
|
+
import type { GuardPlan } from '@inventarch/distribution/guard-registration';
|
|
1
3
|
import type { WorkspaceHost } from '@inventarch/distribution/hosts';
|
|
4
|
+
import type { ProjectionPlan } from '@inventarch/distribution/projection';
|
|
2
5
|
export type HostName = WorkspaceHost;
|
|
3
|
-
export
|
|
4
|
-
readonly path: string;
|
|
5
|
-
readonly text: string;
|
|
6
|
-
}
|
|
6
|
+
export type Artifact = HostFile;
|
|
7
7
|
/** §4's admission gate alone, for a removal, which renders nothing. */
|
|
8
8
|
export declare function checkAdmitted(root: string): void;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* §6.1: the packet over the whole workspace, through the session's own scope, rendered by `host`'s adapter for the
|
|
11
|
+
* consumer target: its files, each carrying `PACKET_MARKER`, and the receipt the render fills (B12). No agent file is
|
|
12
|
+
* rendered for any host.
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderProjectionFor(root: string, host: HostName): HostOutput;
|
|
15
|
+
/**
|
|
16
|
+
* B11: whether this workspace holds a steward-guard registration an earlier release made, which the projection apply
|
|
17
|
+
* retires. Only Claude ever registered one; its ownership state is the registration, as `ia host` and `ia doctor`
|
|
18
|
+
* decide it.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ownsGuard: (root: string, host: HostName) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* B11: the removal of the steward-guard registration this workspace owns, or null when it owns none. A refusal the
|
|
23
|
+
* mechanism does not locate at a file concerns the guard group in the settings file — a group changed by hand, or
|
|
24
|
+
* settings that do not parse — except a pending host journal, which is the journal's.
|
|
25
|
+
*/
|
|
26
|
+
export declare function planRetirement(root: string, host: HostName): GuardPlan | null;
|
|
27
|
+
/** The file plan `applyHostProjection` applies for `rendered`, or the removal of the owned set for null. */
|
|
28
|
+
export declare const planFiles: (root: string, host: HostName, rendered: HostOutput | null) => ProjectionPlan;
|
|
29
|
+
/** Check every destination ancestor and the opened destination without changing bytes. */
|
|
30
|
+
export declare function preflightReceipt(root: string, host: HostName): void;
|
|
31
|
+
interface PendingReceipt {
|
|
32
|
+
readonly format: 'ia.packet-receipt-pending.v1';
|
|
33
|
+
readonly host: HostName;
|
|
34
|
+
readonly guard: boolean;
|
|
35
|
+
readonly receipt?: string;
|
|
36
|
+
readonly removed: readonly {
|
|
37
|
+
readonly path: string;
|
|
38
|
+
readonly sha256: string;
|
|
39
|
+
}[];
|
|
40
|
+
}
|
|
41
|
+
/** Verified deletion provenance shared by projection apply and a migration's durable effect plan. */
|
|
42
|
+
export declare function projectionEvidence(root: string, host: HostName, actions: readonly {
|
|
43
|
+
readonly action: string;
|
|
44
|
+
readonly path: string;
|
|
45
|
+
}[], retirement: boolean, previous?: PacketReceipt): PendingReceipt;
|
|
46
|
+
/** What `applyHostProjection` did. */
|
|
47
|
+
export interface HostProjectionApplied {
|
|
48
|
+
/** `projected` after a render; after a removal `projection-removed`, or `absent` when it removed no file. */
|
|
49
|
+
readonly status: 'projected' | 'projection-removed' | 'absent';
|
|
50
|
+
/** B11: `retired` when a steward-guard registration was removed before any projection file changed. */
|
|
51
|
+
readonly guard: 'retired' | 'none';
|
|
52
|
+
/** The receipt written (B12); null after a removal, which deletes it. */
|
|
53
|
+
readonly receipt: PacketReceipt | null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The one writer of projection files: B11, then the files, then B12. `rendered` is `renderProjectionFor`'s output,
|
|
57
|
+
* or null to remove the owned set. Both the guard retirement and the file plan are planned before anything is written,
|
|
58
|
+
* so a refusal either planner finds changes nothing; then the guard registration is removed (its group in
|
|
59
|
+
* `.claude/settings.local.json` and its ownership state), and only then are the files written and the owned 1.x
|
|
60
|
+
* steward files deleted. A failure past the retirement so leaves the guard retired and never the steward files
|
|
61
|
+
* deleted with the guard still registered; a rerun converges. The receipt (`<host>-receipt.json` beside the
|
|
62
|
+
* projection state) describes the files as an apply left them, so it is deleted, under the host lock, before any of
|
|
63
|
+
* them changes: an interrupted apply leaves none, which `ia doctor` reports as unknown, never as a hand edit. It is
|
|
64
|
+
* written last, under the host lock, with the legacy files deleted (`removed`), the foreign files left in place, the
|
|
65
|
+
* retirement, this CLI's id@version and the time; a removal leaves it deleted. `checkpoint` runs after the retirement
|
|
66
|
+
* (`guard`), at each of `applyProjection`'s own stages and after the receipt (`receipt`), which is where an
|
|
67
|
+
* interruption test cuts. A migration may supply its verified previous receipt to refresh host notes while retaining
|
|
68
|
+
* that operation's retirement and deletion evidence; ordinary applies omit it and keep last-apply semantics.
|
|
69
|
+
*/
|
|
70
|
+
export declare function applyHostProjection(root: string, host: HostName, rendered: HostOutput | null, checkpoint?: (stage: string) => void, previous?: PacketReceipt): HostProjectionApplied;
|
|
71
|
+
/**
|
|
72
|
+
* B12: the receipt `applyHostProjection` wrote for `host`, or null when there is none — a 1.x registration, or one
|
|
73
|
+
* whose receipt was deleted. A receipt that cannot be read, or that lacks the fields `ia doctor` checks, refuses at
|
|
74
|
+
* its own path.
|
|
75
|
+
*/
|
|
76
|
+
export declare function readReceipt(root: string, host: HostName): PacketReceipt | null;
|
|
77
|
+
export {};
|
|
11
78
|
//# sourceMappingURL=host-projection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-projection.d.ts","sourceRoot":"","sources":["../src/host-projection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"host-projection.d.ts","sourceRoot":"","sources":["../src/host-projection.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAW7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAgB1E,MAAM,MAAM,QAAQ,GAAG,aAAa,CAAC;AACrC,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAqBhC,uEAAuE;AACvE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAOhD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,UAAU,CAa5E;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,EAAE,MAAM,QAAQ,KAAG,OACI,CAAC;AAC9D;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI,CAgB7E;AACD,4GAA4G;AAC5G,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,EAAE,MAAM,QAAQ,EAAE,UAAU,UAAU,GAAG,IAAI,KAAG,cAGrF,CA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