@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
|
@@ -1,17 +1,59 @@
|
|
|
1
|
-
import type { HostFile, HostOutput, PacketReceipt } from '@inventarch/runtime';
|
|
2
|
-
import type {
|
|
1
|
+
import type { HostFile, HostOutput, PacketReceipt, RemovedHookRow, UnsupportedRow } from '@inventarch/runtime';
|
|
2
|
+
import type { PluginFile } from '@inventarch/workspace-runtime/internal/generate';
|
|
3
|
+
import type { GuardPlan, HookPlan } from '@inventarch/distribution/guard-registration';
|
|
4
|
+
import type { HostCacheTarget } from '@inventarch/distribution/host';
|
|
3
5
|
import type { WorkspaceHost } from '@inventarch/distribution/hosts';
|
|
4
6
|
import type { ProjectionPlan } from '@inventarch/distribution/projection';
|
|
7
|
+
import type { SessionGate } from './profile.js';
|
|
5
8
|
export type HostName = WorkspaceHost;
|
|
6
9
|
export type Artifact = HostFile;
|
|
7
|
-
/**
|
|
8
|
-
export declare function
|
|
10
|
+
/** The plugin product of a lowered workspace, rendered through the same admitted session as the projection. */
|
|
11
|
+
export declare function renderPluginFor(root: string): readonly PluginFile[];
|
|
9
12
|
/**
|
|
10
13
|
* §6.1: the packet over the whole workspace, through the session's own scope, rendered by `host`'s adapter for the
|
|
11
|
-
* consumer target
|
|
12
|
-
*
|
|
14
|
+
* consumer target, and the host set generated from the workspace's authored records through the same scope: the
|
|
15
|
+
* packet's files, then the generated agent and skill files, each carrying `PACKET_MARKER`; the `@hook` declarations
|
|
16
|
+
* (`hooks`, claude only); and the receipt the render fills (B12), whose `files` list every file with its SHA-256,
|
|
17
|
+
* `generated` the generated ones with their records, `definitions` the operation and harness definitions and
|
|
18
|
+
* `unsupported` each authored record the host does not take. Its `hooks` rows are the applying caller's. `gate`, when given,
|
|
19
|
+
* judges the session before anything is read from it (review C2-N3).
|
|
13
20
|
*/
|
|
14
|
-
export declare function renderProjectionFor(root: string, host: HostName): HostOutput;
|
|
21
|
+
export declare function renderProjectionFor(root: string, host: HostName, gate?: SessionGate): HostOutput;
|
|
22
|
+
/**
|
|
23
|
+
* Where hook groups run from (plan amendment C9): the payload `ia host` materialized and verified (`verified`), the one
|
|
24
|
+
* it is about to (`expected`, for a plan), or none (null), when the caller registers no host: `ia project`, the install
|
|
25
|
+
* refresh and a migration then keep the groups an earlier `ia host` registration owns in step with the records, against
|
|
26
|
+
* the payload that registration recorded, and register none themselves.
|
|
27
|
+
*/
|
|
28
|
+
export type HookCache = {
|
|
29
|
+
readonly verified: string;
|
|
30
|
+
} | {
|
|
31
|
+
readonly expected: HostCacheTarget;
|
|
32
|
+
} | null;
|
|
33
|
+
/** The step's plan, or null when there is nothing to register or remove, and the hooks it cannot register. */
|
|
34
|
+
export interface HookStep {
|
|
35
|
+
readonly plan: HookPlan | null;
|
|
36
|
+
readonly unregistered: readonly UnsupportedRow[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Why an obsolete owned group is still in the settings (review finding F1): with hooks disabled, the groups kept beside it
|
|
40
|
+
* are re-planned against the payload they were registered against, and that payload is gone.
|
|
41
|
+
*/
|
|
42
|
+
export declare const HOOK_KEPT = "Kept: no registrable hook claims this group any more, but it stays until hooks are back on or the payload it was registered against is materialized again";
|
|
43
|
+
/**
|
|
44
|
+
* The records a host does not take, one row per identity (review finding N3): generation's rows, then the hook step's;
|
|
45
|
+
* where both report an identity (an unsupported authored hook whose group is kept), one row carries both reasons.
|
|
46
|
+
*/
|
|
47
|
+
export declare function notTaken(generated: readonly UnsupportedRow[], step: readonly UnsupportedRow[]): readonly UnsupportedRow[];
|
|
48
|
+
/** Why a declared hook is not registered when no host payload is known: `ia host` materializes one. */
|
|
49
|
+
export declare const HOOKS_NEED_HOST = "Not registered: a hook group runs the guard in the host payload \"ia host claude --apply\" materializes; run it to register this hook";
|
|
50
|
+
/**
|
|
51
|
+
* The hook groups `rendered` declares, planned for `host` (claude only; Codex hooks are unsupported, C12): with no
|
|
52
|
+
* declared hook, the removal of every owned group; else their registration against `cache`, or against the payload the
|
|
53
|
+
* owned registration recorded; with neither, none, and each declared hook comes back unregistered. A removal
|
|
54
|
+
* (`rendered` null) removes every owned group. Reads only.
|
|
55
|
+
*/
|
|
56
|
+
export declare function planHooks(root: string, host: HostName, rendered: HostOutput | null, cache: HookCache): HookStep;
|
|
15
57
|
/**
|
|
16
58
|
* B11: whether this workspace holds a steward-guard registration an earlier release made, which the projection apply
|
|
17
59
|
* retires. Only Claude ever registered one; its ownership state is the registration, as `ia host` and `ia doctor`
|
|
@@ -37,12 +79,14 @@ interface PendingReceipt {
|
|
|
37
79
|
readonly path: string;
|
|
38
80
|
readonly sha256: string;
|
|
39
81
|
}[];
|
|
82
|
+
/** The hook groups this apply removes, by `@hook` and last group digest; present only when there are any (H-R5). */
|
|
83
|
+
readonly removedHooks?: readonly RemovedHookRow[];
|
|
40
84
|
}
|
|
41
85
|
/** Verified deletion provenance shared by projection apply and a migration's durable effect plan. */
|
|
42
86
|
export declare function projectionEvidence(root: string, host: HostName, actions: readonly {
|
|
43
87
|
readonly action: string;
|
|
44
88
|
readonly path: string;
|
|
45
|
-
}[], retirement: boolean, previous?: PacketReceipt): PendingReceipt;
|
|
89
|
+
}[], retirement: boolean, previous?: PacketReceipt, hookRemovals?: readonly RemovedHookRow[]): PendingReceipt;
|
|
46
90
|
/** What `applyHostProjection` did. */
|
|
47
91
|
export interface HostProjectionApplied {
|
|
48
92
|
/** `projected` after a render; after a removal `projection-removed`, or `absent` when it removed no file. */
|
|
@@ -67,7 +111,24 @@ export interface HostProjectionApplied {
|
|
|
67
111
|
* interruption test cuts. A migration may supply its verified previous receipt to refresh host notes while retaining
|
|
68
112
|
* that operation's retirement and deletion evidence; ordinary applies omit it and keep last-apply semantics.
|
|
69
113
|
*/
|
|
70
|
-
export declare function applyHostProjection(root: string, host: HostName, rendered: HostOutput | null, checkpoint?: (stage: string) => void, previous?: PacketReceipt): HostProjectionApplied;
|
|
114
|
+
export declare function applyHostProjection(root: string, host: HostName, rendered: HostOutput | null, checkpoint?: (stage: string) => void, previous?: PacketReceipt, cache?: HookCache): HostProjectionApplied;
|
|
115
|
+
/** `planHooks`, a refusal it does not locate at a file located at the settings the hook groups live in. */
|
|
116
|
+
export declare function planHookStep(root: string, host: HostName, rendered: HostOutput | null, cache: HookCache): HookStep;
|
|
117
|
+
/**
|
|
118
|
+
* What the hook step of a later apply would refuse, found before anything is written (review finding H-R3): an install,
|
|
119
|
+
* update or remove checks it before its first install write, and a migration before it plans. With a hook registration
|
|
120
|
+
* owned, the step is planned against the workspace's current records when they render: a group deleted, changed or
|
|
121
|
+
* duplicated by hand refuses with the recovery doctor names, and so does a recorded payload a change of hooks would need.
|
|
122
|
+
* When the records do not render, only a changed or duplicated group is refused, since a removal refuses it too.
|
|
123
|
+
*/
|
|
124
|
+
export declare function preflightHooks(root: string, host: HostName, given?: HostOutput | null): void;
|
|
125
|
+
/**
|
|
126
|
+
* What a refresh's file plan would refuse, and its hook step, found before an install, update or remove writes anything
|
|
127
|
+
* (review finding F4, the H-R3 class): the files are planned against the current records, rendered once, so a generated
|
|
128
|
+
* skill refused at a populated folder of the user's refuses here (any other file refusal is left to the refresh, as
|
|
129
|
+
* before); then `preflightHooks` runs on the same render.
|
|
130
|
+
*/
|
|
131
|
+
export declare function preflightProjection(root: string, host: HostName): void;
|
|
71
132
|
/**
|
|
72
133
|
* B12: the receipt `applyHostProjection` wrote for `host`, or null when there is none — a 1.x registration, or one
|
|
73
134
|
* whose receipt was deleted. A receipt that cannot be read, or that lacks the fields `ia doctor` checks, refuses at
|
|
@@ -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":"AAkCA,OAAO,KAAK,EAEV,QAAQ,EAER,UAAU,EAEV,aAAa,EACb,cAAc,EACd,cAAc,EACf,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAElF,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AAcvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAOrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAc1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIhD,MAAM,MAAM,QAAQ,GAAG,aAAa,CAAC;AACrC,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAqChC,+GAA+G;AAC/G,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,UAAU,EAAE,CAUnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,UAAU,CAkChG;AAED;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAA;CA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