@inventarch/cli 3.1.0 → 3.2.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 +222 -23
- package/SPEC.md +26 -25
- package/assets/base/62ecd5092f364b40e335e9e509ef512ac8030eb5689e72a5d0ff1e073cb13cfb.ia.tgz +0 -0
- package/assets/base.json +3 -3
- package/assets/host/185ebc43ae4798ede53905a6d6ff35fb0cf65e9e1bafa6413fe58e3306cf8af7.tgz +0 -0
- package/assets/host.json +3 -3
- package/assets/vocabulary.json +14 -14
- package/dist/args.d.ts +1 -1
- package/dist/args.d.ts.map +1 -1
- package/dist/author.d.ts.map +1 -1
- package/dist/author.js +6 -7
- package/dist/author.js.map +1 -1
- package/dist/briefing.d.ts +10 -5
- package/dist/briefing.d.ts.map +1 -1
- package/dist/briefing.js +10 -3
- package/dist/briefing.js.map +1 -1
- package/dist/capture.d.ts +6 -4
- package/dist/capture.d.ts.map +1 -1
- package/dist/capture.js +13 -11
- package/dist/capture.js.map +1 -1
- package/dist/channel.d.ts +4 -1
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +4 -1
- package/dist/channel.js.map +1 -1
- package/dist/claude-cli.d.ts +3 -3
- package/dist/claude-cli.js +7 -7
- package/dist/commands.d.ts +9 -9
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +31 -33
- package/dist/commands.js.map +1 -1
- package/dist/compile.d.ts +1 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +1 -1
- package/dist/compile.js.map +1 -1
- package/dist/consumer.d.ts +49 -42
- package/dist/consumer.d.ts.map +1 -1
- package/dist/consumer.js +60 -56
- package/dist/consumer.js.map +1 -1
- package/dist/decline.js +4 -4
- package/dist/decline.js.map +1 -1
- package/dist/distribute.d.ts +31 -29
- package/dist/distribute.d.ts.map +1 -1
- package/dist/distribute.js +40 -37
- package/dist/distribute.js.map +1 -1
- package/dist/doctor-user.d.ts +3 -3
- package/dist/doctor-user.d.ts.map +1 -1
- package/dist/doctor-user.js +8 -8
- package/dist/doctor-user.js.map +1 -1
- package/dist/doctor.d.ts +3 -3
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +70 -64
- 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 +6 -6
- package/dist/format.js.map +1 -1
- package/dist/home-remedy.d.ts +2 -2
- package/dist/home-remedy.d.ts.map +1 -1
- package/dist/home-remedy.js +3 -3
- package/dist/home-remedy.js.map +1 -1
- package/dist/host-projection.d.ts +39 -39
- package/dist/host-projection.d.ts.map +1 -1
- package/dist/host-projection.js +73 -74
- package/dist/host-projection.js.map +1 -1
- package/dist/host.d.ts +52 -53
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +92 -95
- package/dist/host.js.map +1 -1
- package/dist/init.d.ts +65 -60
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +119 -118
- package/dist/init.js.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.js +8 -8
- package/dist/main.js.map +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/next.js +16 -16
- package/dist/next.js.map +1 -1
- package/dist/operation-help.d.ts +3 -3
- package/dist/operation-help.d.ts.map +1 -1
- package/dist/operation-help.js +9 -9
- package/dist/operation-help.js.map +1 -1
- package/dist/pack.d.ts +1 -1
- package/dist/pack.d.ts.map +1 -1
- package/dist/pack.js +12 -12
- package/dist/pack.js.map +1 -1
- package/dist/position.d.ts +1 -1
- package/dist/position.d.ts.map +1 -1
- package/dist/position.js +11 -12
- package/dist/position.js.map +1 -1
- package/dist/preview.d.ts +4 -4
- package/dist/preview.d.ts.map +1 -1
- package/dist/preview.js +28 -28
- package/dist/preview.js.map +1 -1
- package/dist/profile.d.ts +23 -23
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +50 -51
- package/dist/profile.js.map +1 -1
- package/dist/project.d.ts +10 -11
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +31 -33
- package/dist/project.js.map +1 -1
- package/dist/read.d.ts +2 -2
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +5 -5
- package/dist/read.js.map +1 -1
- package/dist/render.d.ts +31 -30
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +27 -26
- package/dist/render.js.map +1 -1
- package/dist/session.d.ts +9 -9
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +13 -13
- package/dist/session.js.map +1 -1
- package/dist/user-host.d.ts +1 -1
- package/dist/user-host.js +5 -5
- package/dist/user-host.js.map +1 -1
- package/dist/validate.d.ts +9 -9
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +35 -38
- package/dist/validate.js.map +1 -1
- package/dist/vocabulary.d.ts +1 -1
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +2 -2
- package/dist/vocabulary.js.map +1 -1
- package/package.json +6 -6
- package/assets/base/7db20e0dbbc2b88701ea24991886b4a8e08d419dda469cce5caff66911f81e4c.ia.tgz +0 -0
- package/assets/host/7e80bd7098018c1c13e3fae4cd363acfeffedccd5b6ec06c4952b62f449a4246.tgz +0 -0
package/dist/doctor-user.d.ts
CHANGED
|
@@ -13,12 +13,12 @@ export interface UserFacts {
|
|
|
13
13
|
readonly decision: Decision | null;
|
|
14
14
|
/** §8.2: the channel is a checkout and the workspace is that checkout. */
|
|
15
15
|
readonly frameworkSource: boolean;
|
|
16
|
-
/** §11
|
|
16
|
+
/** §11: what the cache says is newer, or null when checks are off or nothing usable is cached; `latest` is null unless newer. */
|
|
17
17
|
readonly updates: {
|
|
18
18
|
readonly latest: string | null;
|
|
19
19
|
readonly behind: number | null;
|
|
20
20
|
} | null;
|
|
21
|
-
/**
|
|
21
|
+
/** The refresh argument vector when one is due, else null. Doctor never runs it. */
|
|
22
22
|
readonly refresh: readonly string[] | null;
|
|
23
23
|
}
|
|
24
24
|
export declare function userRows(input: {
|
|
@@ -27,7 +27,7 @@ export declare function userRows(input: {
|
|
|
27
27
|
readonly home: string;
|
|
28
28
|
readonly packageRoot: string;
|
|
29
29
|
readonly version: string;
|
|
30
|
-
/** The directory a decision is keyed from (§
|
|
30
|
+
/** The directory a decision is keyed from (§7.2) when there is no workspace. */
|
|
31
31
|
readonly directory: string;
|
|
32
32
|
/** The `--root` doctor was given, so the decision's remedy names the same directory; undefined for the cwd. */
|
|
33
33
|
readonly supplied: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-user.d.ts","sourceRoot":"","sources":["../src/doctor-user.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAcnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAE,KAAK,EAAwB,MAAM,aAAa,CAAC;AAG/D,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3E,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,
|
|
1
|
+
{"version":3,"file":"doctor-user.d.ts","sourceRoot":"","sources":["../src/doctor-user.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAcnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAE,KAAK,EAAwB,MAAM,aAAa,CAAC;AAG/D,MA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S,CAAC;IACvC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;IACnB,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACxC,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CA4OnE"}
|
package/dist/doctor-user.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* §11's `updates` row reads only the cache in the IA home; it never asks npm or git, and never refreshes. When a refresh
|
|
8
8
|
* is due it returns the `ia-distribution refresh-updates` argument vector as a fact, and the session hook starts it
|
|
9
|
-
* detached
|
|
9
|
+
* detached, so doctor stays read-only. §7.3's `compatibility` row is local: the workspace's
|
|
10
10
|
* `.ia/release.json` language versions against the versions this ia's parser reads.
|
|
11
11
|
*/
|
|
12
12
|
import { existsSync, readFileSync } from 'node:fs';
|
|
@@ -50,7 +50,7 @@ const distributionBin = () => {
|
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
/** §
|
|
53
|
+
/** §7.3: the language versions `.ia/release.json` records, or why none could be read. */
|
|
54
54
|
const workspaceLanguages = (root) => {
|
|
55
55
|
let text;
|
|
56
56
|
try {
|
|
@@ -112,7 +112,7 @@ export function userRows(input) {
|
|
|
112
112
|
: row('plugin-claude', 'Environment', 'Claude plugin', 'warn', `${materialized.version} was rendered by ia ${materialized.cli}; this is ia ${input.version}`, USER_APPLY));
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
// §11
|
|
115
|
+
// §11: the cache only. A cache written for another channel or another ia version is not about this one, so it counts
|
|
116
116
|
// as none and a refresh is due. Newer means newer: a cached `latest` at or below this version is not an update.
|
|
117
117
|
const disabled = updateCheckDisabled(input.env, home === null ? null : readIaConfig(home));
|
|
118
118
|
const stored = home === null ? null : readUpdateCheck(home);
|
|
@@ -129,7 +129,7 @@ export function userRows(input) {
|
|
|
129
129
|
checks.push(updatesRow('warn', `ia ${newer} is available; this is ${input.version} (checked ${checkedOn})`, updateInstruction(channel)));
|
|
130
130
|
else if ((behind ?? 0) > 0)
|
|
131
131
|
checks.push(updatesRow('warn', `${behind} commits behind upstream as of the last fetch (checked ${checkedOn})`, updateInstruction(channel)));
|
|
132
|
-
// §
|
|
132
|
+
// §11: a check older than a week means the background refresh keeps failing to finish.
|
|
133
133
|
else if (!(input.now.getTime() - Date.parse(cached.checkedAt) < WEEK))
|
|
134
134
|
checks.push(updatesRow('warn', `Last checked ${checkedOn}; no background check has completed since`));
|
|
135
135
|
else if (cached.cli.checked)
|
|
@@ -138,7 +138,7 @@ export function userRows(input) {
|
|
|
138
138
|
checks.push(updatesRow('unknown', channel.kind === 'unknown'
|
|
139
139
|
? 'Not checked; an unknown install has no update source'
|
|
140
140
|
: `Not checked; the last check (${checkedOn}) could not reach its source`));
|
|
141
|
-
// §11
|
|
141
|
+
// §11: the private layer's notices, shown through the same section; read here, never fetched.
|
|
142
142
|
if (!disabled)
|
|
143
143
|
for (const notice of stored?.account?.notices ?? [])
|
|
144
144
|
checks.push(row('updates-account', 'Environment', 'Account', 'info', notice));
|
|
@@ -160,7 +160,7 @@ export function userRows(input) {
|
|
|
160
160
|
...(channel.kind === 'npm' ? ['--name', channel.name] : []),
|
|
161
161
|
...(channel.kind === 'checkout' ? ['--checkout', channel.root] : []),
|
|
162
162
|
];
|
|
163
|
-
// §
|
|
163
|
+
// §7.3: only for a workspace this report describes.
|
|
164
164
|
if (input.root !== undefined) {
|
|
165
165
|
const found = workspaceLanguages(input.root);
|
|
166
166
|
if ('why' in found)
|
|
@@ -170,7 +170,7 @@ export function userRows(input) {
|
|
|
170
170
|
checks.push(row('compatibility', 'Workspace', 'Compatibility', result.status, result.detail, result.status === 'fail' ? updateInstruction(channel) : null));
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
// §9
|
|
173
|
+
// §7.3 and §9: only where no workspace was found; an unreadable file reads as empty and is a warning naming it.
|
|
174
174
|
let decision = null;
|
|
175
175
|
if (input.root === undefined && input.enclosing === undefined && home !== null) {
|
|
176
176
|
const file = readDecisions(home), path = join(home, DECISIONS);
|
|
@@ -185,7 +185,7 @@ export function userRows(input) {
|
|
|
185
185
|
? null
|
|
186
186
|
: `ia init ${input.supplied === undefined ? '' : `${quote(input.supplied)} `}--forget-decline`));
|
|
187
187
|
}
|
|
188
|
-
// The same directory on disk, however either path is spelled
|
|
188
|
+
// The same directory on disk, however either path is spelled.
|
|
189
189
|
const frameworkSource = channel.kind === 'checkout' && input.root !== undefined && sameFile(input.root, channel.root);
|
|
190
190
|
const updates = disabled || cached === null ? null : { latest: newer, behind };
|
|
191
191
|
return { checks, facts: { channel, home, plugin, decision, frameworkSource, updates, refresh } };
|
package/dist/doctor-user.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-user.js","sourceRoot":"","sources":["../src/doctor-user.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAElG,OAAO,EACL,eAAe,EACf,aAAa,EACb,YAAY,EACZ,eAAe,EACf,UAAU,EACV,mBAAmB,GACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,SAAS,EA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AAG,kBAAkB,CACjG,CACN,CAAC;IACJ,CAAC;IACD,8DAA8D;IAC9D,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,KAAK,UAAU,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACtH,MAAM,OAAO,GAAG,QAAQ,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC/E,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC;AACnG,CAAC"}
|
package/dist/doctor.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface Runtime {
|
|
|
26
26
|
}
|
|
27
27
|
export interface DoctorRequest {
|
|
28
28
|
readonly cwd: string;
|
|
29
|
-
/** The supplied `--root`, or undefined to discover one. Absence is a check result, not a refusal (§2.
|
|
29
|
+
/** The supplied `--root`, or undefined to discover one. Absence is a check result, not a refusal (§2.12). */
|
|
30
30
|
readonly root?: string | undefined;
|
|
31
31
|
readonly packageRoot: string;
|
|
32
32
|
readonly runtime: Runtime;
|
|
@@ -37,14 +37,14 @@ export interface DoctorRequest {
|
|
|
37
37
|
readonly version?: string;
|
|
38
38
|
/** `--host`: adds the §8.2 session briefing and §7.3 next actions for this host. */
|
|
39
39
|
readonly host?: string | undefined;
|
|
40
|
-
/** The clock a `declined-today` decision is compared against (§
|
|
40
|
+
/** The clock a `declined-today` decision is compared against (§7.2); now by default. */
|
|
41
41
|
readonly now?: Date;
|
|
42
42
|
/** The install channel as observed (§5); detected from `packageRoot` when absent. The contract's examples supply it. */
|
|
43
43
|
readonly channel?: Channel | undefined;
|
|
44
44
|
/** Root-discovery observation; defaults to the real filesystem walk. Documentation fixtures supply an absent workspace. */
|
|
45
45
|
readonly discover?: typeof discoverRoot;
|
|
46
46
|
}
|
|
47
|
-
/**
|
|
47
|
+
/** The supported targets: Linux and Windows on x64 and macOS on arm64, on Node 22 with 22.22.0 the initial minimum; pnpm is contributor-only. */
|
|
48
48
|
export declare const SUPPORTED_TARGETS: readonly {
|
|
49
49
|
readonly platform: string;
|
|
50
50
|
readonly arch: string;
|
package/dist/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAqFA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,YAAY,EAAY,MAAM,eAAe,CAAC;AAyBvD,OAAO,KAAK,EAAE,YAAY,EAAqB,MAAM,aAAa,CAAC;AAGnE,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AACtE,MAAM,MAAM,OAAO,GAAG,aAAa,GAAG,WAAW,GAAG,cAAc,CAAC;AACnE,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AACD,MAAM,WAAW,UAAU;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S;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAI5F,CAAC;AASF,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,YAAY,YAAY,CAAC;AAi4BtC,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,UAAU,CAuNhE;AA0ED,oGAAoG;AACpG,eAAO,MAAM,UAAU,GAAI,MAAM,UAAU,KAAG,CAAC,GAAG,CAAqC,CAAC;AAExF,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAaxD;AAWD,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM,CAiBzE;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAgBlD"}
|
package/dist/doctor.js
CHANGED
|
@@ -6,41 +6,38 @@
|
|
|
6
6
|
* not be performed and is never reported as `ok` — which is why every installation row is `unknown` without a
|
|
7
7
|
* workspace rather than a cheerful pass.
|
|
8
8
|
*
|
|
9
|
-
* Host state is observed, never assumed (docs/specs/host-registration/README.md §7). `readInstalledState`
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* printed carries `--root` when doctor was given one.
|
|
9
|
+
* Host state is observed, never assumed (docs/specs/host-registration/README.md §7). `readInstalledState` with
|
|
10
|
+
* `hosts: true` compares each host's ownership state against the files it wrote and against this installation's payload
|
|
11
|
+
* pin: `registered` is `ok` and its detail says "written; not observed answering", because doctor never starts a server
|
|
12
|
+
* and a written registration is not a server that answered; `stale` is `fail`, so doctor exits 1, and its detail names
|
|
13
|
+
* each reason and the repair that works for it; no host state at all is `info`. Projection drift is read from the
|
|
14
|
+
* receipt the projection apply wrote: one row per listed file that is missing or changed, one when the records render
|
|
15
|
+
* another packet, one `ok` row when it found none of these, and one listing the legacy files it removed and the foreign
|
|
16
|
+
* ones it left. A projection `ia project` wrote without a host registration is read the same way, its remedies naming
|
|
17
|
+
* `ia project <host> --apply` as the install refresh's do (`projectionRerun`), and it leaves the host unregistered in
|
|
18
|
+
* the briefing. An installation that carries no host payload is a note, not a crash: the release comparison is skipped
|
|
19
|
+
* and the row says so. Observation is total — a malformed state file is a `fail` row, never an exception — and nothing
|
|
20
|
+
* here writes, the host home included. Repairs are worded by `ia host`'s own `stateRepair` and `modifiedRepair`, so the
|
|
21
|
+
* two verbs cannot disagree, and every `ia host` or `ia project` command printed carries `--root` when doctor was given
|
|
22
|
+
* one.
|
|
24
23
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
24
|
+
* Doctor also adds an `implementations` row for the installed-implementation catalog of the payload this installation
|
|
25
|
+
* pins, read through its release pins and checked against the handler bytes the payload ships, and a `join-<host>` row
|
|
26
|
+
* per join receipt `ia host` recorded, compared with the catalog of the payload that host's registration names. Both
|
|
27
|
+
* only read; no handler is imported or run.
|
|
29
28
|
*
|
|
30
29
|
* The support row compares an observed platform and version against the declaration at
|
|
31
30
|
* docs/specs/host-registration/README.md §7. It says "matches the declared target", never "qualified", because
|
|
32
31
|
* that declaration says the minimum must be validated before being advertised. A platform outside it is `warn`,
|
|
33
32
|
* never `fail`, and the word "unsupported" is not used about it.
|
|
34
33
|
*
|
|
35
|
-
* The environment is a parameter rather than a read of the process, so this verb is testable
|
|
36
|
-
* §7 examples can state which machine's Node version and platform they show.
|
|
34
|
+
* The environment is a parameter rather than a read of the process, so this verb is testable.
|
|
37
35
|
*
|
|
38
36
|
* docs/specs/host-plugin-distribution/README.md §7.3 adds rows that exist with or without a workspace
|
|
39
37
|
* (`doctor-user.ts`: install channel, IA home, Claude plugin, §11's cached update check and local language
|
|
40
38
|
* compatibility, initialization decision) and, per host, a warning when
|
|
41
39
|
* a registration pins its payload outside the current IA home (§3). `--host <id>` adds §8.2's `session` briefing and
|
|
42
|
-
* §7.3's `nextActions` to the JSON envelope (`briefing.ts`); neither adds a write, so doctor stays read-only
|
|
43
|
-
* (Amendment item 4).
|
|
40
|
+
* §7.3's `nextActions` to the JSON envelope (`briefing.ts`); neither adds a write, so doctor stays read-only.
|
|
44
41
|
*
|
|
45
42
|
* docs/specs/registry/README.md §4 ("Doctor") adds a `registry-<provider>` row for each provider the
|
|
46
43
|
* workspace's lock names in its requests and packages: the base §4's precedence chooses and the level that chose it.
|
|
@@ -51,7 +48,7 @@
|
|
|
51
48
|
import { existsSync, readdirSync, readFileSync, realpathSync, statSync } from 'node:fs';
|
|
52
49
|
import { homedir } from 'node:os';
|
|
53
50
|
import { isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
54
|
-
// `within` judges nesting on disk, so a home or cache spelled in another case or normalization is still where it is
|
|
51
|
+
// `within` judges nesting on disk, so a home or cache spelled in another case or normalization is still where it is.
|
|
55
52
|
import { pathKey, within } from '@inventarch/db';
|
|
56
53
|
import { decodeDistributionJson, INSTALL_PATHS } from '@inventarch/db/distribution';
|
|
57
54
|
import { hostPayloadPath, legacyHostHome } from '@inventarch/distribution/host-home';
|
|
@@ -72,7 +69,7 @@ import { HOOK_KEPT, planRetirement, readReceipt, renderProjectionFor } from './h
|
|
|
72
69
|
import { HOST_LOCK, HOSTS_AREA, JOURNALS, MCP_PATH, modifiedRepair, pinnedRelease, projectedHosts, projectionFailure, projectionRepair, projectionRerun, recoverCommand, rootedNext, SETTINGS, STATE, stateRepair, } from './host.js';
|
|
73
70
|
import { codeOf } from './session.js';
|
|
74
71
|
import { atom, document, entry, fieldRows, safeRootAdvice, sectionLabel, words } from './render.js';
|
|
75
|
-
/**
|
|
72
|
+
/** The supported targets: Linux and Windows on x64 and macOS on arm64, on Node 22 with 22.22.0 the initial minimum; pnpm is contributor-only. */
|
|
76
73
|
export const SUPPORTED_TARGETS = [
|
|
77
74
|
{ platform: 'linux', arch: 'x64' },
|
|
78
75
|
{ platform: 'win32', arch: 'x64' },
|
|
@@ -187,9 +184,9 @@ const commandsFor = (root) => {
|
|
|
187
184
|
return { prose, apply: (host, command = `ia host ${host} --apply`) => prose(host, `"${command}"`).slice(1, -1) };
|
|
188
185
|
};
|
|
189
186
|
/**
|
|
190
|
-
* §3
|
|
191
|
-
*
|
|
192
|
-
*
|
|
187
|
+
* Spec §3: the payload this installation pins, and whether the host home holds it. Cheap on purpose — one stat and one
|
|
188
|
+
* directory listing, no verification (each host row verifies the payload its registration uses). A `.stage-*` directory
|
|
189
|
+
* is an unfinished materialization, never a payload, so only 64-hex names are listed.
|
|
193
190
|
*/
|
|
194
191
|
function payloadRow(request, pinned) {
|
|
195
192
|
if (pinned.release === null)
|
|
@@ -217,7 +214,7 @@ function payloadRow(request, pinned) {
|
|
|
217
214
|
return installation('host-payload', 'Host payload', 'info', `Release ${short(pinned.release)}, ${state} in ${hosts}${listed}`, null);
|
|
218
215
|
}
|
|
219
216
|
/**
|
|
220
|
-
* Spec §
|
|
217
|
+
* Spec §7: the host lock and the three host journals, as the install lock and journal have their rows. A held lock is
|
|
221
218
|
* `warn`, because a live run holds it too; its recovery clears only a dead holder's. A journal is `fail`, because
|
|
222
219
|
* every `ia host` plan refuses until its own recovery runs (`assertHostRegistrationIdle`).
|
|
223
220
|
*/
|
|
@@ -243,7 +240,7 @@ function parses(root, path) {
|
|
|
243
240
|
/**
|
|
244
241
|
* `launcher-unverified` covers two different facts: a payload that fails verification, and one that verifies as another
|
|
245
242
|
* release than the state recorded. `verify` is the report's one shared verification (`hostVerifier`, a memo), so it
|
|
246
|
-
* answers exactly what observation saw without scanning the payload again
|
|
243
|
+
* answers exactly what observation saw without scanning the payload again: its failure, or the
|
|
247
244
|
* release it verified as, which observation found differs from the recorded one.
|
|
248
245
|
*/
|
|
249
246
|
function unverified(cache, recorded, verify) {
|
|
@@ -296,8 +293,8 @@ function repairOf(root, observed) {
|
|
|
296
293
|
...(observed.reasons.includes('mcp-modified') ? ['mcp'] : []),
|
|
297
294
|
...(observed.reasons.includes('guard-modified') ? ['hooks'] : []),
|
|
298
295
|
];
|
|
299
|
-
//
|
|
300
|
-
// an MCP entry changed by hand still needs the removal and a new registration.
|
|
296
|
+
// The remedy's apply retires the steward guard, so a guard group changed by hand alone is deleted first, as `ia host`
|
|
297
|
+
// names it; an MCP entry changed by hand still needs the removal and a new registration.
|
|
301
298
|
if (modified.length === 0)
|
|
302
299
|
return '';
|
|
303
300
|
return modified.includes('mcp') ? modifiedRepair(host, modified) : projectionRepair(host, SETTINGS, apply);
|
|
@@ -339,7 +336,7 @@ function hostRow(root, observed, pinned, commands, verify) {
|
|
|
339
336
|
const detail = commands.prose(host, staleDetail(root, observed, pinned, verify));
|
|
340
337
|
return installation(`host-${host}`, `Host ${host}`, 'fail', detail, commands.apply(host));
|
|
341
338
|
}
|
|
342
|
-
/** Generation's own reason beside a kept group's
|
|
339
|
+
/** Generation's own reason beside a kept group's, as a trailing clause, or nothing. */
|
|
343
340
|
const keptBeside = (reason) => {
|
|
344
341
|
const other = reason
|
|
345
342
|
.split('; ')
|
|
@@ -348,11 +345,11 @@ const keptBeside = (reason) => {
|
|
|
348
345
|
return other === '' ? '' : ` (${other})`;
|
|
349
346
|
};
|
|
350
347
|
/**
|
|
351
|
-
*
|
|
348
|
+
* Host registration spec §7: the projection rows for one host that owns a projection, read from the receipt
|
|
352
349
|
* `applyHostProjection` wrote. Each file it lists is compared with the disk: `missing` is what the next apply writes
|
|
353
350
|
* again, `changed` (a hand edit) makes apply refuse, so it fails and names the repair `ia host` does. The receipt's
|
|
354
351
|
* packet digest is compared with a fresh render: another packet is `outdated`, and a render that fails is `unknown`.
|
|
355
|
-
* With none of these, one `ok` row says the projection has no drift
|
|
352
|
+
* With none of these, one `ok` row says the projection has no drift. The legacy files it
|
|
356
353
|
* removed and the foreign files it left are listed in one info row and never checked. No receipt — a projection
|
|
357
354
|
* written by a 1.x release, or a receipt deleted — is `unknown`, and the remedy writes one. The ownership state and
|
|
358
355
|
* the files it lists are read as `ia host` reads them first, so a file apply would refuse to read is a fail row here
|
|
@@ -373,7 +370,7 @@ function projectionRows(root, host, commands) {
|
|
|
373
370
|
try {
|
|
374
371
|
planRetirement(root, host);
|
|
375
372
|
observedDrift = observeProjection({ root, host, artifacts: null, marker: PACKET_MARKER });
|
|
376
|
-
// The hook groups the workspace owns
|
|
373
|
+
// The hook groups the workspace owns: read-only, as the planner reads them.
|
|
377
374
|
hookDrift = host === 'claude' ? observeHookRegistration(root) : [];
|
|
378
375
|
}
|
|
379
376
|
catch (error) {
|
|
@@ -408,8 +405,8 @@ function projectionRows(root, host, commands) {
|
|
|
408
405
|
else if (digest !== file.sha256)
|
|
409
406
|
checks.push(installation(id, title, 'fail', `${file.path} changed since the projection apply wrote it; move or delete it, then run the remedy`, apply));
|
|
410
407
|
}
|
|
411
|
-
// A group deleted, changed or duplicated by hand is one apply refuses to put back on its own
|
|
412
|
-
//
|
|
408
|
+
// A group deleted, changed or duplicated by hand is one apply refuses to put back on its own: the remedy removes the
|
|
409
|
+
// registration, and the next apply registers the workspace's hooks again.
|
|
413
410
|
const reregister = commands.apply(host, `ia host ${host} --remove --apply`), again = `"ia host ${host} --apply" then registers the workspace's hooks again`;
|
|
414
411
|
for (const { hook, drift } of hookDrift)
|
|
415
412
|
checks.push(drift === 'foreign'
|
|
@@ -417,10 +414,10 @@ function projectionRows(root, host, commands) {
|
|
|
417
414
|
: installation(`projection-${host}-hook:${hook}`, title, 'fail', commands.prose(host, drift === 'missing'
|
|
418
415
|
? `the hook group for ${hook} was deleted from ${SETTINGS}, which apply does not put back on its own; the remedy removes the registration, and ${again}`
|
|
419
416
|
: `the hook group for ${hook} in ${SETTINGS} changed since it was registered, or appears twice; delete only that group, then run the remedy, which removes the registration, and ${again}`), reregister));
|
|
420
|
-
// An authored @hook the last apply could not register guards nothing
|
|
421
|
-
//
|
|
422
|
-
// A kept group is the other way round
|
|
423
|
-
//
|
|
417
|
+
// An authored @hook the last apply could not register guards nothing: `ia host` registers it, or, where
|
|
418
|
+
// disableAllHooks turned hooks off, nothing does until that setting changes.
|
|
419
|
+
// A kept group is the other way round: an obsolete group that still guards, until hooks are back on or the payload
|
|
420
|
+
// it was registered against is materialized again; no command is sure to remove it.
|
|
424
421
|
for (const row of receipt.unsupported ?? [])
|
|
425
422
|
if (row.word === 'hook')
|
|
426
423
|
checks.push(row.reason.includes(HOOK_KEPT)
|
|
@@ -478,9 +475,10 @@ function hostRows(root, observed, pinned, commands, verify) {
|
|
|
478
475
|
];
|
|
479
476
|
}
|
|
480
477
|
/**
|
|
481
|
-
* Host plugin distribution spec §3 and §7.3 `ia-home` warn: a registration made before the IA home moved still pins
|
|
482
|
-
*
|
|
483
|
-
* re-applying materializes the payload in the current home and re-pins it. No command moves or
|
|
478
|
+
* Host plugin distribution spec §3 and §7.3 `ia-home` warn: a registration made before the IA home moved still pins its
|
|
479
|
+
* payload where it was materialized, usually the per-OS data directory that was the legacy host home. It keeps working,
|
|
480
|
+
* so the row warns; re-applying materializes the payload in the current home and re-pins it. No command moves or
|
|
481
|
+
* deletes the old one.
|
|
484
482
|
*/
|
|
485
483
|
function movedRows(request, observed, commands) {
|
|
486
484
|
const user = request.home ?? homedir();
|
|
@@ -495,12 +493,12 @@ function movedRows(request, observed, commands) {
|
|
|
495
493
|
return observed.flatMap((host) => host.cache === null || inside(home, host.cache)
|
|
496
494
|
? []
|
|
497
495
|
: [
|
|
498
|
-
installation(`ia-home-moved-${host.host}`, 'IA home moved', 'warn', `Host ${host.host} pins its payload under ${host.cache}, outside the IA home ${home}${inside(legacy, host.cache) ? ' (the
|
|
496
|
+
installation(`ia-home-moved-${host.host}`, 'IA home moved', 'warn', `Host ${host.host} pins its payload under ${host.cache}, outside the IA home ${home}${inside(legacy, host.cache) ? ' (the per-OS location earlier releases used)' : ''}`, commands.apply(host.host)),
|
|
499
497
|
]);
|
|
500
498
|
}
|
|
501
499
|
/**
|
|
502
500
|
* Reads each payload's catalog once per report: the catalog row and a join row usually name the same payload, and the
|
|
503
|
-
* payload is verified through `verify`, the one verification the host rows share
|
|
501
|
+
* payload is verified through `verify`, the one verification the host rows share.
|
|
504
502
|
*/
|
|
505
503
|
function catalogReader(verify) {
|
|
506
504
|
const seen = new Map();
|
|
@@ -531,7 +529,7 @@ function operationFacts(catalog) {
|
|
|
531
529
|
.join('; ');
|
|
532
530
|
}
|
|
533
531
|
/**
|
|
534
|
-
*
|
|
532
|
+
* The installed-implementation catalog of the payload this installation pins, as the IA home holds it.
|
|
535
533
|
* Present is `ok`, or `warn` when it lists an operation unavailable or revoked; a payload that carries no catalog (one built
|
|
536
534
|
* before the catalog existed) is an `info` note, and so is one not materialized yet. A payload that fails host
|
|
537
535
|
* verification (a file its inventory does not list, a missing or changed one, a link), or a catalog whose pins disagree
|
|
@@ -565,8 +563,8 @@ function catalogRow(request, pinned, read, observed, commands) {
|
|
|
565
563
|
`${catalog.evaluators.entries.length} installed evaluators beside the built-ins; listed, nothing run`, null);
|
|
566
564
|
}
|
|
567
565
|
/**
|
|
568
|
-
* The trust `ia validate` binds a join through
|
|
569
|
-
*
|
|
566
|
+
* The trust `ia validate` binds a join through: the payload this installation pins, in the IA home the request
|
|
567
|
+
* resolves; null when it pins none or the home cannot be resolved.
|
|
570
568
|
*/
|
|
571
569
|
function doctorTrust(request, pinned) {
|
|
572
570
|
if (pinned.release === null)
|
|
@@ -579,14 +577,14 @@ function doctorTrust(request, pinned) {
|
|
|
579
577
|
}
|
|
580
578
|
}
|
|
581
579
|
/**
|
|
582
|
-
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
580
|
+
* One row per consumer join `.ia/distributions/hosts/joins.json` records, compared with the catalog of the payload this
|
|
581
|
+
* installation pins, as `ia validate` binds through it: a registration of another release or naming another directory,
|
|
582
|
+
* or another spelling of it, is `warn` with the apply that registers this installation's payload, and nothing it names
|
|
583
|
+
* is opened. `ok` (present) when the join names that catalog, digest and release; `warn` (drifted) when it names
|
|
584
|
+
* another, when that payload carries none, or when the consumer is not registered, each naming the apply that records
|
|
585
|
+
* or drops the join; `unknown` when the registration or its catalog cannot be read, which the host row reports. A
|
|
586
|
+
* registered host with no join is an `info` row (unavailable) naming the apply that records one. Receipts that cannot
|
|
587
|
+
* be read are `fail`, repaired by deleting them. Never throws, and only reads.
|
|
590
588
|
*/
|
|
591
589
|
function joinRows(root, observed, read, commands, trust) {
|
|
592
590
|
const trusted = trust === null ? null : trustedPayload(trust);
|
|
@@ -712,7 +710,7 @@ export function collectDoctor(request) {
|
|
|
712
710
|
checks.push(...sourceBindingRows(root));
|
|
713
711
|
const pending = usable && existsSync(resolve(root, INSTALL_PATHS.pending));
|
|
714
712
|
const pinned = pinnedRelease(request.packageRoot);
|
|
715
|
-
// One verification per payload directory for the whole report: host, catalog and join rows share it
|
|
713
|
+
// One verification per payload directory for the whole report: host, catalog and join rows share it.
|
|
716
714
|
const verify = hostVerifier();
|
|
717
715
|
// The observed hosts, or the code that kept the installed state from being read; undefined until it is read.
|
|
718
716
|
let observed;
|
|
@@ -842,7 +840,7 @@ export function collectDoctor(request) {
|
|
|
842
840
|
checks.push(payloadRow(request, pinned), catalogRow(request, pinned, read, observed, commandsFor(supplied)), ...hostTransactionRows(root), ...hostRows(root, observed, pinned, commandsFor(supplied), verify), ...joinRows(root, observed, read, commandsFor(supplied), doctorTrust(request, pinned)), ...movedRows(request, observed, commandsFor(supplied)));
|
|
843
841
|
}
|
|
844
842
|
// Host plugin distribution spec §7.3 and §8.2: rows that exist with or without a workspace, and the briefing. One
|
|
845
|
-
// report has one root. Without --root it was discovered upward from the cwd, which is how the §8.
|
|
843
|
+
// report has one root. Without --root it was discovered upward from the cwd, which is how the §8.2 hook runs doctor.
|
|
846
844
|
// A supplied --root is literal, as for every other verb: it is a workspace only when it holds .ia/src itself. When it
|
|
847
845
|
// does not but lies inside a workspace, that workspace is only named (`enclosing`), never described or offered init.
|
|
848
846
|
const workspaceRoot = supplied === undefined
|
|
@@ -886,9 +884,11 @@ export function collectDoctor(request) {
|
|
|
886
884
|
* §8.2's host state from the rows already collected. `unknown` when the host set was not observed — an interrupted
|
|
887
885
|
* installation, or installed state that could not be read — so the briefing never calls a host missing that doctor did
|
|
888
886
|
* not look at. Stale covers the host row itself, a payload pinned outside the IA home (§3 names re-applying as its
|
|
889
|
-
* remedy) and any failing projection row of a registered host, which `ia host <host> --apply` also repairs
|
|
887
|
+
* remedy) and any failing projection row of a registered host, which `ia host <host> --apply` also repairs, except a
|
|
888
|
+
* hook group deleted, changed or duplicated by hand: an apply refuses to put that back on its own, so `removeFirst`
|
|
889
|
+
* tells the briefing to name the removal first, as that row's remedy does. A
|
|
890
890
|
* projection `ia project` wrote without a registration is no registration to call stale: the host stays `absent`, and
|
|
891
|
-
* its failing rows name their own repair, `ia project <host> --apply
|
|
891
|
+
* its failing rows name their own repair, `ia project <host> --apply`.
|
|
892
892
|
*/
|
|
893
893
|
function hostState(host, checks) {
|
|
894
894
|
const pending = checks.find((check) => check.id === 'pending');
|
|
@@ -904,7 +904,12 @@ function hostState(host, checks) {
|
|
|
904
904
|
check.id === `ia-home-moved-${host}` ||
|
|
905
905
|
(hostCheck !== undefined && check.id.startsWith(`projection-${host}`) && check.status === 'fail'));
|
|
906
906
|
if (failing.length > 0)
|
|
907
|
-
return {
|
|
907
|
+
return {
|
|
908
|
+
status: 'stale',
|
|
909
|
+
detail: failing.map((check) => check.detail).join('; '),
|
|
910
|
+
recovery: null,
|
|
911
|
+
...(failing.some((check) => check.id.startsWith(`projection-${host}-hook:`)) ? { removeFirst: true } : {}),
|
|
912
|
+
};
|
|
908
913
|
return { status: hostCheck === undefined ? 'absent' : 'registered', detail: null, recovery: null };
|
|
909
914
|
}
|
|
910
915
|
/** §8.2's input from the rows already collected: nothing is observed twice. */
|
|
@@ -922,7 +927,8 @@ function briefingFor(host, checks, user, where, version) {
|
|
|
922
927
|
hostStatus: state.status,
|
|
923
928
|
hostDetail: state.detail,
|
|
924
929
|
recovery: state.recovery,
|
|
925
|
-
|
|
930
|
+
...(state.removeFirst === true ? { removeFirst: true } : {}),
|
|
931
|
+
// The cached update check and the refresh argv (host plugin distribution spec §11), both read without writing.
|
|
926
932
|
updates: user.facts.updates,
|
|
927
933
|
refresh: user.facts.refresh,
|
|
928
934
|
});
|