@inventarch/cli 1.0.0 → 1.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/LANGUAGE.md +56 -0
- package/README.md +6 -4
- package/SPEC.md +14 -12
- package/assets/base/78bff5eb3188b628c06d2f1cf1477fb1bfcea874ec3863ae112b4972b8e81517.ia.tgz +0 -0
- package/assets/base.json +3 -3
- package/assets/host/ba7fbad5c6b0dfb697a3408894b499f0970afb92f1677f2db126dac06f23b0b9.tgz +0 -0
- package/assets/host.json +4 -4
- package/assets/vocabulary.json +97 -1
- package/dist/channel.d.ts.map +1 -1
- package/dist/channel.js +9 -1
- package/dist/channel.js.map +1 -1
- package/dist/claude-cli.d.ts +3 -0
- package/dist/claude-cli.d.ts.map +1 -1
- package/dist/claude-cli.js +30 -10
- package/dist/claude-cli.js.map +1 -1
- package/dist/doctor.d.ts +3 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +2 -2
- package/dist/doctor.js.map +1 -1
- package/dist/init.d.ts +2 -0
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +9 -3
- package/dist/init.js.map +1 -1
- package/dist/program.d.ts +64 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +125 -0
- package/dist/program.js.map +1 -0
- package/dist/user-host.d.ts +5 -1
- package/dist/user-host.d.ts.map +1 -1
- package/dist/user-host.js +9 -1
- package/dist/user-host.js.map +1 -1
- package/package.json +15 -10
- package/assets/base/71f0665cb1ffc3f3964fc7710528451f635d664bdf4b8c95005ee97c21db5928.ia.tgz +0 -0
- package/assets/host/43a1f8c471141b1f2f46cef4411a9a61c00da1c1aa19d277189ae2423282bfd6.tgz +0 -0
package/LANGUAGE.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Public IA language
|
|
2
|
+
|
|
3
|
+
IA records declare typed identities, fields and relationships. Owning canonical schemas define the structural contract; language syntax and reference resolution preserve those declarations.
|
|
4
|
+
|
|
5
|
+
The selected vocabulary below is shared by this release. Use `ia vocabulary --json` for its attributed catalogue and `ia vocabulary --schema` for canonical field schemas. `ia validate` reports structural and evaluated evidence separately. An admitted declaration does not establish semantic quality or grant execution authority.
|
|
6
|
+
|
|
7
|
+
Spec source locators do not load documents. Resource capture and disclosure require explicit selection, matching pins and a host-owned disclosure boundary. Model, operation, evaluator and authority callbacks belong to the application host.
|
|
8
|
+
|
|
9
|
+
| Word | Owner | Meaning |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| @agent | agent-system | Names a participant and the vocabulary to which its governance applies. It does not grant host permissions. |
|
|
12
|
+
| @agent-profile | agent-composition-system | Composes an agent, capabilities, optional mandate/voice/delegates and installed execution contracts. |
|
|
13
|
+
| @artifact-set | taxonomy | Defines a closed grouping of artifact genres. |
|
|
14
|
+
| @authoring-guide | authoring-system | Associates a vocabulary owner and schema with an authoring reference and usage guidance. |
|
|
15
|
+
| @axis | taxonomy | Defines a closed coordinate axis for selection. |
|
|
16
|
+
| @capability | agent-composition-system | Groups operations, procedures, templates, checks and included capabilities with declared execution bounds. |
|
|
17
|
+
| @cardinality | taxonomy | Defines relationship multiplicity constraints. |
|
|
18
|
+
| @case | compliance-system | Declares scenario inputs, expected behavior and evaluator attribution. A declaration is not an observed test result. |
|
|
19
|
+
| @category | taxonomy | Defines a closed concept classification used by record shapes and contextual selection. |
|
|
20
|
+
| @check | compliance-system | Names a check implementation and scope. Declaring an implementation name does not install or execute it. |
|
|
21
|
+
| @contract | compliance-system | Names versioned requirements that may be adopted by other records. Requirements need explicit evaluation evidence. |
|
|
22
|
+
| @convention | governance-system | Declares a convention in the shared governance shape. |
|
|
23
|
+
| @decision | work-system | Represents a choice that is needed or has been made: the question, options and decider, and once made, the choice and rationale. |
|
|
24
|
+
| @dimension | taxonomy | Defines a supported record dimension used by conditions and lookup. |
|
|
25
|
+
| @distribution | workspace-system | Declares root records from which a distributable closure is selected. |
|
|
26
|
+
| @execution-binding | agent-composition-system | Connects a native target to a host-installed entry or operation descriptor. |
|
|
27
|
+
| @harness | agent-composition-system | Composes profiles and execution bindings in a workspace under a host contract. |
|
|
28
|
+
| @hook | hook-authoring-system | Represents a host event, tool/path selection and guard message. Registration and executing a guard require a host adapter. |
|
|
29
|
+
| @improvement | learning-system | Represents a proposed change, review metadata and publication metadata. It does not authorize or apply the proposal. |
|
|
30
|
+
| @intent-shape | taxonomy | Defines a request framing and its retrieval defaults. |
|
|
31
|
+
| @kind | taxonomy | Defines a closed semantic role for records; lowering determines the role of each registered word. |
|
|
32
|
+
| @lane | taxonomy | Defines a retrieval lane associated with record kinds. |
|
|
33
|
+
| @law | governance-system | Declares a rule with severity. Structural admission cannot establish the truth or suitability of its prose. |
|
|
34
|
+
| @mandate | agent-system | States bounded authority and conditions for a participant. Host authorization remains independent. |
|
|
35
|
+
| @milestone | work-system | Represents an outcome with an exit criterion inside exactly one plan; it names a condition, not the work toward it. |
|
|
36
|
+
| @move | taxonomy | Defines the closed classification of an agent action or activity. |
|
|
37
|
+
| @observation | learning-system | Represents an attributed evidence account with interpretation and retention metadata. Evidence claims are not verified by field typing. |
|
|
38
|
+
| @operation | authoring-system | Binds a declared operation to an implementation/input/output/effect contract; the host installs implementations. |
|
|
39
|
+
| @phase | taxonomy | Defines a cognitive phase coordinate: orient, plan, act or learn. |
|
|
40
|
+
| @placement | taxonomy | Defines source authority and reach metadata. |
|
|
41
|
+
| @plan | work-system | Represents an arrangement of milestones toward an intent; it heads the work hierarchy and has no parent. Plans do not nest. |
|
|
42
|
+
| @playbook | governance-system | Represents a procedure as phase/primitive cells. Cell delivery is generic; the authored method belongs to its author. |
|
|
43
|
+
| @predicate | taxonomy | Defines a directed relationship and its inverse spelling. |
|
|
44
|
+
| @primitive | taxonomy | Defines a cognitive primitive coordinate; a cell is selected using its phase and primitive. |
|
|
45
|
+
| @principle | governance-system | Declares a governing rationale in the shared governance shape. |
|
|
46
|
+
| @run | session-system | Represents a governed run identity, declared phase, status and owner. Declaration does not start execution. |
|
|
47
|
+
| @schema | floor | Declares the structural contract for exactly one registered discriminator. |
|
|
48
|
+
| @spec | work-system | Represents a maintained specification with explicit status and at most one same-word supersession. Contents and document membership belong to its author; a source locator does not load a body or prove semantic quality. |
|
|
49
|
+
| @system | floor | Registers vocabulary, direct system dependencies, a local steward and consent for relationships. |
|
|
50
|
+
| @task | work-system | Represents one owner's action toward exactly one milestone. Whether it is ready to start is computed by a work evaluator, never stored on the record. |
|
|
51
|
+
| @template | template-system | Represents bounded rendering inputs and output structure. Rendering does not publish or install output. |
|
|
52
|
+
| @value-type | taxonomy | Defines the field types that schemas may require. |
|
|
53
|
+
| @voice | agent-composition-system | Declares communication attributes separate from authority and procedure. |
|
|
54
|
+
| @workspace | workspace-system | Groups systems into an explicit work boundary; relationships can describe dependencies between boundaries. |
|
|
55
|
+
|
|
56
|
+
This guide describes the selected structural vocabulary. Private expert procedures, live provider behavior and unobserved platform qualification are separate from the installed public contract.
|
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# @inventarch/cli
|
|
2
2
|
|
|
3
|
-
The IA 1.
|
|
3
|
+
The IA 1.1.0 command-line interface creates workspaces, validates and inspects native records, compiles artifacts, and manages native distributions and host registrations. It requires Node.js 22.22.0 or later within Node 22.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Install the [published package](https://www.npmjs.com/package/@inventarch/cli) globally with `npm install --global @inventarch/cli@1.1.0` to use `ia` across projects. For a project-local installation, run `npm install --save-dev --save-exact @inventarch/cli@1.1.0` in your JavaScript or TypeScript repository and use `npx ia` in place of `ia`. Either way, each initialized project keeps its own records in `.ia/`.
|
|
6
|
+
|
|
7
|
+
The [main quick start](https://github.com/inventarch/ia#-quick-start) walks through initialization, a first record, validation and VS Code setup. To run from a source checkout, run `pnpm install --frozen-lockfile` and `pnpm build`, then use `node /path/to/ia/apps/cli/dist/main.js` in place of `ia`.
|
|
6
8
|
|
|
7
9
|
```sh
|
|
8
10
|
ia --version
|
|
@@ -13,8 +15,8 @@ ia inspect --root demo
|
|
|
13
15
|
ia vocabulary plan --schema
|
|
14
16
|
```
|
|
15
17
|
|
|
16
|
-
`init` previews changes unless `--apply` is supplied. Its language base is bundled with the CLI, so creating a workspace needs no registry connection. Place authored `.ia` files in the generated `.ia/src/systems/demo/` directory. The starter already requires the agent, work and workspace vocabularies.
|
|
18
|
+
`init` previews changes unless `--apply` is supplied. Its language base, `inventarch/language` 1.1.0, is bundled with the CLI, so creating a workspace needs no registry connection. Place authored `.ia` files in the generated `.ia/src/systems/demo/` directory. The starter system already requires the agent, work and workspace vocabularies, and its `@workspace` record composes the eleven public systems.
|
|
17
19
|
|
|
18
20
|
Use `ia --help` or `ia <command> --help` for the complete command syntax. `--json` returns structured output; applying a plan noninteractively requires `--yes`. `ia doctor` reports observed state and suggested repairs. Host registration is explicit through `ia host claude`, `ia host codex` or `ia host cursor` and their `--apply` option.
|
|
19
21
|
|
|
20
|
-
See [the package contract](SPEC.md) for command behavior and the [language guide](https://github.com/inventarch/ia/blob/main/docs/reference/language/README.md) for native syntax and evaluation limits.
|
|
22
|
+
See [the package contract](SPEC.md) for command behavior, [the packaged language summary](LANGUAGE.md) for the words this release ships, and the [language guide](https://github.com/inventarch/ia/blob/main/docs/reference/language/README.md) for native syntax and evaluation limits.
|
package/SPEC.md
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
# @inventarch/cli
|
|
2
2
|
|
|
3
|
-
The `ia` binary exposes consumer commands and the structured agent query protocol. The [language reference](https://github.com/inventarch/ia/blob/main/docs/reference/language/README.md) defines vocabulary and evaluation limits. This package bundles the language archive, vocabulary catalogue and host payload needed by its commands.
|
|
3
|
+
The `ia` binary exposes consumer commands and the structured agent query protocol. The [language reference](https://github.com/inventarch/ia/blob/main/docs/reference/language/README.md) defines vocabulary and evaluation limits, and the packaged [language summary](LANGUAGE.md) lists the words this release ships. This package bundles the language archive, vocabulary catalogue and host payload needed by its commands.
|
|
4
4
|
|
|
5
5
|
## Workspace commands
|
|
6
6
|
|
|
7
7
|
| Command | Behavior |
|
|
8
8
|
| --- | --- |
|
|
9
|
-
| `init [directory]` | Preview a workspace, or create it with `--apply`; `--host none` omits host registration. The target is positional, so `--root` is refused. |
|
|
10
|
-
| `validate [path...]` | Check the selected workspace records against language and declared contracts; report attributable diagnostics. |
|
|
11
|
-
| `compile` | Write a deterministic artifact under `.ia/work/`, or emit it with `--stdout`;
|
|
9
|
+
| `init [directory]` | Preview a workspace, or create it with `--apply`; `--host none` omits host registration and `--id <provider/name>` sets the package id (default `local/<directory name>`). `--decline today` or `--decline forever` records that a repository should not be initialized, and `--forget-decline` removes that record. The target is positional, so `--root` is refused. |
|
|
10
|
+
| `validate [path...]` | Check the selected workspace records against language and declared contracts; report attributable diagnostics. `--severity` sets the lowest severity reported and `--max-findings` the number rendered (default 50). |
|
|
11
|
+
| `compile` | Write a deterministic artifact under `.ia/work/`, or emit it with `--stdout`; `--out <file>` names the artifact and overwriting requires `--force`. |
|
|
12
12
|
| `format [path...]` | Check formatting by default; rewrite with `--write`. |
|
|
13
|
-
| `inspect [identity]` | Show a workspace overview, or a record named by its full `system/kind/facet/name` identity and its relationships. |
|
|
14
|
-
| `vocabulary [word]` | Read the
|
|
13
|
+
| `inspect [identity]` | Show a workspace overview, or a record named by its full `system/kind/facet/name` identity or by `--path <file>`, and its relationships. `--edges` (`in`, `out` or `both`; default `out`) and `--depth` (0 to 3; default 1) bound the traversal. |
|
|
14
|
+
| `vocabulary [word]` | Read the catalogue shipped with the package, including schemas (`--schema`) and worked examples (`--example`); `--domain`, `--kind` and `--search` filter it. No workspace is opened, so `--root` is refused. |
|
|
15
15
|
|
|
16
|
-
Workspace discovery uses the nearest ancestor containing `.ia/src`, with `--root` selecting an explicit root where supported. Native syntax is `#! ia 1.0`. Initialization writes a consumer-local system, starter records and release descriptor, and installs the pinned bundled language base. A new consumer distribution starts at its own 0.1.0 version, independently of the CLI version.
|
|
16
|
+
Workspace discovery uses the nearest ancestor containing `.ia/src`, with `--root` selecting an explicit root where supported. Native syntax is `#! ia 1.0`. Initialization writes a consumer-local system, starter records and release descriptor, and installs the pinned bundled language base, `inventarch/language` 1.1.0, which supplies the eleven public systems. A new consumer distribution starts at its own 0.1.0 version, independently of the CLI version.
|
|
17
17
|
|
|
18
18
|
## Distribution commands
|
|
19
19
|
|
|
20
|
-
`pack --descriptor <file>` writes a digest-named archive
|
|
20
|
+
`pack --descriptor <file>` writes a digest-named archive, by default under `.ia/work/dist`. `install`, `update` and `remove` preview a plan and apply it only with `--apply`; `--plan-out <file>` keeps the plan under `.ia/work/`. `restore --apply` reinstalls the locked generation from pinned archives; it has no preview, and `--allow-withdrawn` accepts a withdrawn release. Catalog, offline-cache and configured registry sources are explicit options. The native package IDs and versions in these commands are separate from npm package names and the CLI version.
|
|
21
21
|
|
|
22
|
-
`host <claude|codex|cursor>` previews a workspace registration and requires `--apply` to write it. Claude
|
|
22
|
+
`host <claude|codex|cursor>` previews a workspace registration and requires `--apply` to write it; `--remove` plans removal of the host set it owns. For Claude, `--context <identity>` selects the lifecycle context element of a workspace registration, and `host claude --user` registers a user-level plugin that needs no workspace. `doctor` observes runtime, workspace, install and host state without repairing it or treating a written registration as an answering server; `--host` adds that host's session briefing and next actions. Unknown update or host observations stay unknown.
|
|
23
23
|
|
|
24
24
|
## Automation and limits
|
|
25
25
|
|
|
26
|
-
`--help` and per-command help describe the accepted argument grammar. Consumer `--json` output is a single structured value without interactive prompts; applying without a terminal or with `--json` requires `--yes`. Validation
|
|
26
|
+
`--help` and per-command help describe the accepted argument grammar. Consumer `--json` output is a single structured value without interactive prompts; applying without a terminal or with `--json` requires `--yes`. `--no-color` (or `NO_COLOR`), `--color`, `--ascii` and `--quiet` adjust human-readable output. Validation errors exit 1 (warnings alone exit 0), usage failures exit 2, unavailable inputs and local operational refusals exit 3, and interruption exits 130. Automation should inspect the structured diagnostic code and exit value together.
|
|
27
27
|
|
|
28
|
-
The
|
|
28
|
+
The machine protocol, version 1, serves `scope`, `context`, `select`, `get`, `records`, `resolve`, `search`, `traverse` and `report`. Each takes its JSON parameters through `--params <JSON>`, or `--params -` for stdin, and prints one JSON line without color. `ia <operation> --help` lists an operation's parameters, refusals with their exit values, and an example; `ia <operation> --schema` prints its parameter schema. Scope tokens last for one invocation. These read operations do not invoke a model or grant host permissions. Only the CLI serves `report`; the MCP door does not. Generic structural validation does not attest evidence or execute a declared check.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Commands that start another program (`git` for `init` and `doctor`, `claude` for `host claude --user`) look it up only on fully qualified `PATH` entries and run it by absolute path from the user's home directory. An empty or relative entry, which would name the working directory, is never searched.
|
|
31
|
+
|
|
32
|
+
Package tests cover parsing, JSON output, initialization and recovery, workspace inspection and formatting, distribution planning/application, host registration, installation and recovery, and the program lookup above. Repository qualification separately exercises built and installed artifacts. External registry publication and each host's own runtime behavior require separate evidence.
|
|
Binary file
|
package/assets/base.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "inventarch/language",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"archive": "
|
|
5
|
-
"manifest": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"archive": "78bff5eb3188b628c06d2f1cf1477fb1bfcea874ec3863ae112b4972b8e81517",
|
|
5
|
+
"manifest": "5bde7bbbfef3582d08551859b2d978e5638a8c5cc19bf5ce5fca69eac62a0af7"
|
|
6
6
|
}
|
|
Binary file
|
package/assets/host.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release": "
|
|
3
|
-
"archive": "
|
|
4
|
-
"files":
|
|
5
|
-
"bytes":
|
|
2
|
+
"release": "1849914f3b9f974e7f180d7b8865de62a52d46e78f785ba8e3399c8ed7e94bb6",
|
|
3
|
+
"archive": "ba7fbad5c6b0dfb697a3408894b499f0970afb92f1677f2db126dac06f23b0b9",
|
|
4
|
+
"files": 1220,
|
|
5
|
+
"bytes": 6278283
|
|
6
6
|
}
|
package/assets/vocabulary.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": 1,
|
|
3
3
|
"language": "ia 1.0",
|
|
4
4
|
"status": "public IA 1.0 language contract",
|
|
5
|
-
"sourceDigest": "
|
|
5
|
+
"sourceDigest": "991105cd85bd193d7bfe94cda8c2725124d1122e794b9153fd307875542c0e56",
|
|
6
6
|
"words": [
|
|
7
7
|
{
|
|
8
8
|
"word": "agent",
|
|
@@ -2835,6 +2835,102 @@
|
|
|
2835
2835
|
"kernelMembers": [],
|
|
2836
2836
|
"consumer": "language/schema admission; graph resolution; explicitly selected domain consumer for stronger semantics"
|
|
2837
2837
|
},
|
|
2838
|
+
{
|
|
2839
|
+
"word": "spec",
|
|
2840
|
+
"owner": "work-system",
|
|
2841
|
+
"kind": "contract",
|
|
2842
|
+
"category": "rule",
|
|
2843
|
+
"facets": [
|
|
2844
|
+
"spec"
|
|
2845
|
+
],
|
|
2846
|
+
"identity": "work-system/contract/<facet>/<name>",
|
|
2847
|
+
"description": "Represents a maintained specification with explicit status and at most one same-word supersession. Contents and document membership belong to its author; a source locator does not load a body or prove semantic quality.",
|
|
2848
|
+
"schema": {
|
|
2849
|
+
"name": "spec",
|
|
2850
|
+
"path": ".ia/src/systems/work-system/schemas/spec.schema.ia",
|
|
2851
|
+
"closed": true,
|
|
2852
|
+
"sections": [
|
|
2853
|
+
{
|
|
2854
|
+
"name": "meaning",
|
|
2855
|
+
"required": true
|
|
2856
|
+
},
|
|
2857
|
+
{
|
|
2858
|
+
"name": "work",
|
|
2859
|
+
"required": true
|
|
2860
|
+
},
|
|
2861
|
+
{
|
|
2862
|
+
"name": "relationships",
|
|
2863
|
+
"required": false
|
|
2864
|
+
}
|
|
2865
|
+
],
|
|
2866
|
+
"fields": [
|
|
2867
|
+
{
|
|
2868
|
+
"path": "meaning.says",
|
|
2869
|
+
"type": "text",
|
|
2870
|
+
"required": true
|
|
2871
|
+
},
|
|
2872
|
+
{
|
|
2873
|
+
"path": "meaning.answers",
|
|
2874
|
+
"type": "text",
|
|
2875
|
+
"required": false
|
|
2876
|
+
},
|
|
2877
|
+
{
|
|
2878
|
+
"path": "work.title",
|
|
2879
|
+
"type": "text",
|
|
2880
|
+
"required": true
|
|
2881
|
+
},
|
|
2882
|
+
{
|
|
2883
|
+
"path": "work.status",
|
|
2884
|
+
"type": "id",
|
|
2885
|
+
"required": true,
|
|
2886
|
+
"values": [
|
|
2887
|
+
"draft",
|
|
2888
|
+
"accepted",
|
|
2889
|
+
"superseded",
|
|
2890
|
+
"withdrawn"
|
|
2891
|
+
]
|
|
2892
|
+
},
|
|
2893
|
+
{
|
|
2894
|
+
"path": "work.owner",
|
|
2895
|
+
"type": "text",
|
|
2896
|
+
"required": false
|
|
2897
|
+
},
|
|
2898
|
+
{
|
|
2899
|
+
"path": "work.start",
|
|
2900
|
+
"type": "text",
|
|
2901
|
+
"required": false,
|
|
2902
|
+
"form": "iso-date"
|
|
2903
|
+
},
|
|
2904
|
+
{
|
|
2905
|
+
"path": "work.due",
|
|
2906
|
+
"type": "text",
|
|
2907
|
+
"required": false,
|
|
2908
|
+
"form": "iso-date"
|
|
2909
|
+
},
|
|
2910
|
+
{
|
|
2911
|
+
"path": "work.ended",
|
|
2912
|
+
"type": "text",
|
|
2913
|
+
"required": false,
|
|
2914
|
+
"form": "iso-date"
|
|
2915
|
+
},
|
|
2916
|
+
{
|
|
2917
|
+
"path": "work.source",
|
|
2918
|
+
"type": "text",
|
|
2919
|
+
"required": false
|
|
2920
|
+
}
|
|
2921
|
+
],
|
|
2922
|
+
"edges": [
|
|
2923
|
+
{
|
|
2924
|
+
"predicate": "supersede",
|
|
2925
|
+
"target": "spec",
|
|
2926
|
+
"cardinality": "one",
|
|
2927
|
+
"required": false
|
|
2928
|
+
}
|
|
2929
|
+
]
|
|
2930
|
+
},
|
|
2931
|
+
"kernelMembers": [],
|
|
2932
|
+
"consumer": "language/schema admission; graph resolution; explicitly selected domain consumer for stronger semantics"
|
|
2933
|
+
},
|
|
2838
2934
|
{
|
|
2839
2935
|
"word": "system",
|
|
2840
2936
|
"owner": "floor",
|
package/dist/channel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,OAAO,GACf;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACzE;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AACzD,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,KAAK,MAAM,GAAG,IAAI,CAAC;AAC1E,eAAO,MAAM,MAAM,EAAE,GAgBpB,CAAC;AASF,kHAAkH;AAClH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,GAAE,GAAY,GAAG,OAAO,CA8B7E;AACD,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAK1D;AACD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAKxD"}
|
package/dist/channel.js
CHANGED
|
@@ -6,11 +6,19 @@ import { spawnSync } from 'node:child_process';
|
|
|
6
6
|
import { existsSync, readFileSync, realpathSync } from 'node:fs';
|
|
7
7
|
import { dirname, resolve, sep } from 'node:path';
|
|
8
8
|
import { sameFile } from '@inventarch/db';
|
|
9
|
+
import { findProgram, programEnv, programHome } from './program.js';
|
|
9
10
|
export const runGit = (cwd, args) => {
|
|
11
|
+
// A hand-run doctor may start in a directory the repository controls, so git is found on qualified PATH entries
|
|
12
|
+
// only and runs by absolute path from the home directory; `-C` names the checkout (src/program.ts).
|
|
13
|
+
const git = findProgram('git', process.env);
|
|
14
|
+
if (git === null)
|
|
15
|
+
return null;
|
|
10
16
|
// --no-optional-locks: doctor calls this on every session start, and it must never contend with a concurrent
|
|
11
17
|
// git process for the index lock. 700ms each: three sequential calls (rev-parse, status, config) must leave
|
|
12
18
|
// headroom inside the hook's 5s doctor budget for workspace validation.
|
|
13
|
-
const result = spawnSync(
|
|
19
|
+
const result = spawnSync(git, ['--no-optional-locks', '-C', cwd, ...args], {
|
|
20
|
+
cwd: programHome(),
|
|
21
|
+
env: programEnv(process.env),
|
|
14
22
|
encoding: 'utf8',
|
|
15
23
|
timeout: 700,
|
|
16
24
|
windowsHide: true,
|
package/dist/channel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAA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,CAAC;IACjQ,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,eAAe,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IACpF,OAAO,iCAAiC,OAAO,CAAC,KAAK,EAAE,CAAC;AAC1D,CAAC"}
|
package/dist/claude-cli.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SpawnSyncReturns } from 'node:child_process';
|
|
2
|
+
import type { LookupFs } from './program.js';
|
|
2
3
|
type Env = Readonly<Record<string, string | undefined>>;
|
|
3
4
|
export declare const PLUGIN_ID = "ia@inventarch";
|
|
4
5
|
/** null: not known, because claude is unavailable or its list did not parse. */
|
|
@@ -29,6 +30,8 @@ export type Spawn = (command: string, args: readonly string[], options: Readonly
|
|
|
29
30
|
export interface RunnerDependencies {
|
|
30
31
|
readonly platform: NodeJS.Platform;
|
|
31
32
|
readonly spawn: Spawn;
|
|
33
|
+
/** The file system the lookup of `claude` reads; the real one unless a test runs the Windows rules elsewhere. */
|
|
34
|
+
readonly fs?: LookupFs;
|
|
32
35
|
}
|
|
33
36
|
export declare function claudeRunner(env: Env, dependencies?: RunnerDependencies): ClaudeRunner;
|
|
34
37
|
export {};
|
package/dist/claude-cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-cli.d.ts","sourceRoot":"","sources":["../src/claude-cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"claude-cli.d.ts","sourceRoot":"","sources":["../src/claude-cli.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C,KAAK,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;AACxD,eAAO,MAAM,SAAS,kBAA2C,CAAC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Y,CAwChG"}
|
package/dist/claude-cli.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Host plugin distribution spec §6.3 (amended, item 5) and §2.3: Claude's own CLI does the registering and reports its
|
|
3
3
|
* own state through its `--json` lists; Claude's files are never read or written here. `IA_CLAUDE` names a Node
|
|
4
|
-
* script to run instead of `claude`; it exists for tests and is not a user-facing setting.
|
|
4
|
+
* script to run instead of `claude`; it exists for tests and is not a user-facing setting. `claude` itself is found on
|
|
5
|
+
* qualified PATH entries and run by absolute path from the home directory (src/program.ts).
|
|
5
6
|
*/
|
|
6
7
|
import { spawnSync } from 'node:child_process';
|
|
7
8
|
import { existsSync } from 'node:fs';
|
|
8
9
|
import { CLAUDE_MARKETPLACE, CLAUDE_PLUGIN } from '@inventarch/compliance';
|
|
9
10
|
import { Refusal } from './consumer.js';
|
|
11
|
+
import { findProgram, programEnv, programHome, SYSTEM, windowsShell, windowsShellArgs } from './program.js';
|
|
10
12
|
export const PLUGIN_ID = `${CLAUDE_PLUGIN}@${CLAUDE_MARKETPLACE}`;
|
|
11
13
|
/** Whether one of Claude's `--json` lists has a matching row; null when the command failed or printed no array. */
|
|
12
14
|
function listed(runner, args, match) {
|
|
@@ -55,8 +57,18 @@ const DEFAULTS = {
|
|
|
55
57
|
platform: process.platform,
|
|
56
58
|
spawn: (command, args, options) => spawnSync(command, [...args], { ...options, encoding: 'utf8' }),
|
|
57
59
|
};
|
|
60
|
+
/** What a spawn of a missing program returns, for a `claude` the lookup did not find: nothing is started. */
|
|
61
|
+
const missing = () => ({
|
|
62
|
+
pid: 0,
|
|
63
|
+
output: [],
|
|
64
|
+
stdout: '',
|
|
65
|
+
stderr: '',
|
|
66
|
+
status: null,
|
|
67
|
+
signal: null,
|
|
68
|
+
error: Object.assign(new Error('claude was not found on a qualified PATH entry'), { code: 'ENOENT' }),
|
|
69
|
+
});
|
|
58
70
|
/**
|
|
59
|
-
* One argument on the cmd.exe line
|
|
71
|
+
* One argument on the cmd.exe line that runs a `claude.cmd`. cmd.exe expands `%NAME%` even inside quotes and a `"`
|
|
60
72
|
* ends the quoting, so neither can be passed safely; such an argument refuses rather than being quoted.
|
|
61
73
|
*/
|
|
62
74
|
function cmdArgument(value) {
|
|
@@ -66,16 +78,24 @@ function cmdArgument(value) {
|
|
|
66
78
|
}
|
|
67
79
|
export function claudeRunner(env, dependencies = DEFAULTS) {
|
|
68
80
|
const { platform, spawn } = dependencies;
|
|
81
|
+
const system = { platform, fs: dependencies.fs ?? SYSTEM.fs };
|
|
69
82
|
const fake = env['IA_CLAUDE'];
|
|
83
|
+
// Found once, on qualified PATH entries only. A claude.exe anywhere there runs with no shell, so no argument is
|
|
84
|
+
// reinterpreted; only without one does the claude.cmd an npm install leaves run, through cmd.exe named by its path.
|
|
85
|
+
const program = fake === undefined ? findProgram('claude', env, 'program', system) : null;
|
|
86
|
+
const script = fake === undefined && program === null ? findProgram('claude', env, 'script', system) : null;
|
|
87
|
+
const options = { cwd: programHome(), env: programEnv(env, platform) };
|
|
70
88
|
const real = (args, timeout) => {
|
|
71
|
-
if (
|
|
72
|
-
return spawn(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
if (program !== null)
|
|
90
|
+
return spawn(program, args, { ...options, timeout, windowsHide: true });
|
|
91
|
+
if (script === null)
|
|
92
|
+
return missing();
|
|
93
|
+
return spawn(windowsShell(env), windowsShellArgs(script, args.map(cmdArgument)), {
|
|
94
|
+
...options,
|
|
95
|
+
timeout,
|
|
96
|
+
windowsHide: true,
|
|
97
|
+
windowsVerbatimArguments: true,
|
|
98
|
+
});
|
|
79
99
|
};
|
|
80
100
|
const fakeEnv = () => ({
|
|
81
101
|
...Object.fromEntries(Object.entries(process.env).filter(([name]) => !FAKE_VARIABLE.test(name))),
|
package/dist/claude-cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-cli.js","sourceRoot":"","sources":["../src/claude-cli.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"claude-cli.js","sourceRoot":"","sources":["../src/claude-cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG5G,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,aAAa,IAAI,kBAAkB,EAAE,CAAC;AAgBlE,mHAAmH;AACnH,SAAS,MAAM,CAAC,MAAoB,EAAE,IAAuB,EAAE,KAA4B;IACzF,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAY,CAAC;QAClD,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;YACxB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,GAAU,CAAC,CAAC;YAClF,CAAC,CAAC,IAAI,CAAC;IACX,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AACD;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,MAAoB;IAChD,IAAI,CAAC,MAAM,CAA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doctor.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { brief } from './briefing.js';
|
|
2
2
|
import type { Channel } from './channel.js';
|
|
3
3
|
import type { Context, Result } from './consumer.js';
|
|
4
|
+
import { discoverRoot } from './consumer.js';
|
|
4
5
|
import type { Capabilities } from './render.js';
|
|
5
6
|
export type CheckStatus = 'ok' | 'warn' | 'fail' | 'unknown' | 'info';
|
|
6
7
|
export type Section = 'Environment' | 'Workspace' | 'Installation';
|
|
@@ -40,6 +41,8 @@ export interface DoctorRequest {
|
|
|
40
41
|
readonly now?: Date;
|
|
41
42
|
/** The install channel as observed (§5); detected from `packageRoot` when absent. The contract's examples supply it. */
|
|
42
43
|
readonly channel?: Channel | undefined;
|
|
44
|
+
/** Root-discovery observation; defaults to the real filesystem walk. Documentation fixtures supply an absent workspace. */
|
|
45
|
+
readonly discover?: typeof discoverRoot;
|
|
43
46
|
}
|
|
44
47
|
/** decisions.md:13. Linux and Windows on x64 and macOS on arm64, on Node 22 with 22.22.0 the initial minimum; pnpm is contributor-only. */
|
|
45
48
|
export declare const SUPPORTED_TARGETS: readonly {
|
package/dist/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAwDA,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;
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAwDA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAA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title: 'Package manager',
|
|
151
151
|
status: 'info',
|
|
152
152
|
detail: pnpm === undefined
|
|
153
|
-
? 'Not reported by this invocation; pnpm
|
|
153
|
+
? 'Not reported by this invocation; pnpm is a contributor requirement, not a consumer one'
|
|
154
154
|
: `pnpm ${pnpm} invoked this command`,
|
|
155
155
|
remedy: null,
|
|
156
156
|
});
|
|
@@ -465,7 +465,7 @@ export function collectDoctor(request) {
|
|
|
465
465
|
? resolve(request.root)
|
|
466
466
|
: resolve(request.cwd, request.root);
|
|
467
467
|
// A supplied or discovered root opens at its real path, as the workspace verbs open it (`requireRoot`).
|
|
468
|
-
const found = supplied ?? discoverRoot(request.cwd, iaHomeOf(request.env, request.home));
|
|
468
|
+
const found = supplied ?? (request.discover ?? discoverRoot)(request.cwd, iaHomeOf(request.env, request.home));
|
|
469
469
|
const root = found !== undefined && directory(found) ? realpathSync(found) : found;
|
|
470
470
|
const usable = root !== undefined && directory(root);
|
|
471
471
|
checks.push({
|