@inventarch/cli 1.1.1 → 1.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.
Files changed (85) hide show
  1. package/LANGUAGE.md +2 -2
  2. package/README.md +10 -4
  3. package/SPEC.md +16 -4
  4. package/assets/base/0305ca741b1dfec97ff35fbeb36d4a66a0c9c0614b730fe14fcdac0f1565e28a.ia.tgz +0 -0
  5. package/assets/base.json +3 -3
  6. package/assets/host/c5fb2bfbba619cbd558ecc1e94dd2c16e37aa8599b4e423f1f59ed01f2074e03.tgz +0 -0
  7. package/assets/host.json +4 -4
  8. package/assets/vocabulary.json +436 -4
  9. package/dist/capture.d.ts +81 -0
  10. package/dist/capture.d.ts.map +1 -0
  11. package/dist/capture.js +271 -0
  12. package/dist/capture.js.map +1 -0
  13. package/dist/claude-cli.js +1 -1
  14. package/dist/claude-cli.js.map +1 -1
  15. package/dist/commands.d.ts +1 -1
  16. package/dist/commands.d.ts.map +1 -1
  17. package/dist/commands.js +32 -3
  18. package/dist/commands.js.map +1 -1
  19. package/dist/compile.d.ts +6 -0
  20. package/dist/compile.d.ts.map +1 -1
  21. package/dist/compile.js +57 -27
  22. package/dist/compile.js.map +1 -1
  23. package/dist/consumer.d.ts +48 -7
  24. package/dist/consumer.d.ts.map +1 -1
  25. package/dist/consumer.js +134 -28
  26. package/dist/consumer.js.map +1 -1
  27. package/dist/decline.d.ts.map +1 -1
  28. package/dist/decline.js +15 -7
  29. package/dist/decline.js.map +1 -1
  30. package/dist/distribute.d.ts +43 -11
  31. package/dist/distribute.d.ts.map +1 -1
  32. package/dist/distribute.js +173 -63
  33. package/dist/distribute.js.map +1 -1
  34. package/dist/format.d.ts +2 -2
  35. package/dist/format.d.ts.map +1 -1
  36. package/dist/format.js +17 -10
  37. package/dist/format.js.map +1 -1
  38. package/dist/home-remedy.d.ts +8 -4
  39. package/dist/home-remedy.d.ts.map +1 -1
  40. package/dist/home-remedy.js +8 -4
  41. package/dist/home-remedy.js.map +1 -1
  42. package/dist/host-projection.js +1 -1
  43. package/dist/host-projection.js.map +1 -1
  44. package/dist/host.d.ts +10 -4
  45. package/dist/host.d.ts.map +1 -1
  46. package/dist/host.js +43 -27
  47. package/dist/host.js.map +1 -1
  48. package/dist/init.d.ts +5 -2
  49. package/dist/init.d.ts.map +1 -1
  50. package/dist/init.js +41 -20
  51. package/dist/init.js.map +1 -1
  52. package/dist/inspect.d.ts +26 -2
  53. package/dist/inspect.d.ts.map +1 -1
  54. package/dist/inspect.js +117 -52
  55. package/dist/inspect.js.map +1 -1
  56. package/dist/pack.d.ts +3 -1
  57. package/dist/pack.d.ts.map +1 -1
  58. package/dist/pack.js +32 -9
  59. package/dist/pack.js.map +1 -1
  60. package/dist/read.d.ts +21 -0
  61. package/dist/read.d.ts.map +1 -0
  62. package/dist/read.js +141 -0
  63. package/dist/read.js.map +1 -0
  64. package/dist/render.d.ts +11 -0
  65. package/dist/render.d.ts.map +1 -1
  66. package/dist/render.js +28 -1
  67. package/dist/render.js.map +1 -1
  68. package/dist/session.d.ts +6 -1
  69. package/dist/session.d.ts.map +1 -1
  70. package/dist/session.js +52 -6
  71. package/dist/session.js.map +1 -1
  72. package/dist/user-host.d.ts.map +1 -1
  73. package/dist/user-host.js +7 -5
  74. package/dist/user-host.js.map +1 -1
  75. package/dist/validate.d.ts +1 -2
  76. package/dist/validate.d.ts.map +1 -1
  77. package/dist/validate.js +6 -27
  78. package/dist/validate.js.map +1 -1
  79. package/dist/vocabulary.d.ts +4 -0
  80. package/dist/vocabulary.d.ts.map +1 -1
  81. package/dist/vocabulary.js +12 -7
  82. package/dist/vocabulary.js.map +1 -1
  83. package/package.json +6 -6
  84. package/assets/base/78bff5eb3188b628c06d2f1cf1477fb1bfcea874ec3863ae112b4972b8e81517.ia.tgz +0 -0
  85. package/assets/host/b97e367bbf15db09f552d6bd6dd3701210efe77931d34b57ccb85240957aba61.tgz +0 -0
package/LANGUAGE.md CHANGED
@@ -31,7 +31,7 @@ Spec source locators do not load documents. Resource capture and disclosure requ
31
31
  | @kind | taxonomy | Defines a closed semantic role for records; lowering determines the role of each registered word. |
32
32
  | @lane | taxonomy | Defines a retrieval lane associated with record kinds. |
33
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. |
34
+ | @mandate | agent-system | States bounded authority and conditions for a participant. Host authorization remains independent. An authority section names the participant it binds, the closed moves it allows, the workspaces it scopes, the words it excludes and the paths it covers. |
35
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
36
  | @move | taxonomy | Defines the closed classification of an agent action or activity. |
37
37
  | @observation | learning-system | Represents an attributed evidence account with interpretation and retention metadata. Evidence claims are not verified by field typing. |
@@ -51,6 +51,6 @@ Spec source locators do not load documents. Resource capture and disclosure requ
51
51
  | @template | template-system | Represents bounded rendering inputs and output structure. Rendering does not publish or install output. |
52
52
  | @value-type | taxonomy | Defines the field types that schemas may require. |
53
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. |
54
+ | @workspace | workspace-system | Groups systems into an explicit work boundary; relationships can describe dependencies between boundaries. Its sources name the roots and placement bands its records are captured from, and its steward the agent that directs it by default. |
55
55
 
56
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,8 @@
1
1
  # @inventarch/cli
2
2
 
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.
3
+ The IA 1.2.0 command-line interface creates workspaces, validates, inspects, reads and captures 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
- 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/`.
5
+ Install the [published package](https://www.npmjs.com/package/@inventarch/cli) globally with `npm install --global @inventarch/cli@1.2.0` to use `ia` across projects. For a project-local installation, run `npm install --save-dev --save-exact @inventarch/cli@1.2.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
6
 
7
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`.
8
8
 
@@ -11,12 +11,18 @@ ia --version
11
11
  ia init demo --host none
12
12
  ia init demo --host none --apply --yes
13
13
  ia validate --root demo
14
+ ia capture --root demo
14
15
  ia inspect --root demo
16
+ ia read agent-system/binding/agent/public-agent-system-steward --root demo
15
17
  ia vocabulary plan --schema
16
18
  ```
17
19
 
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.
20
+ `init` previews changes unless `--apply` is supplied. Its language base, `inventarch/language` 1.2.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.
19
21
 
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.
22
+ `ia capture` writes the admitted snapshot, with each record's digest and capture membership, to `.ia/work/snapshot/current.json` and keeps the most recent capture at another revision as `previous.json`; it reports how many records changed since the prior capture. It refuses, writing nothing, a directory whose `.ia/src` declares no `@workspace` and a floor, installed or adopted source that fails to parse; any other finding is written into the snapshot. `ia compile` still writes the 1.x `ia.compiled.v1` artifact, unchanged, and is deprecated in favour of `ia capture`: it prints one deprecation line on stderr, and in 2.0 it becomes an alias of `ia capture`.
23
+
24
+ `ia read <locator>` prints the body behind a locator with its SHA-256 and the line `body not certified by this read`: the text of one cell (`<identity>#<phase>/<Primitive>`) or one requirement (`<identity>#<REQ-ID>`); else the document a record's source locator names (`work.source` on a `@spec`, `@plan`, `@milestone`, `@task` or `@decision`, `reference.document`, `template.resource`), only the section under its heading when the locator carries a markdown anchor, and for an adopted record from the directory `.ia/workspace.json` binds its mount to; else the record's own `meaning.says`. `<path>:<line>` reads the record whose source spans that line. It writes nothing, and `ia inspect` keeps the record's structure.
25
+
26
+ Use `ia --help` or `ia <command> --help` for the complete command syntax. `--json` returns structured output; applying a plan noninteractively requires `--yes`. Every consumer command refusal names the one command to run next, in `next` with `--json` and on the `→` line otherwise; the nine machine operations keep their one-line JSON. A recovery names `ia-distribution`, the binary of `@inventarch/distribution`, which a global install of `@inventarch/cli` does not put on `PATH`. `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.
21
27
 
22
28
  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
@@ -7,13 +7,15 @@ The `ia` binary exposes consumer commands and the structured agent query protoco
7
7
  | Command | Behavior |
8
8
  | --- | --- |
9
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`. |
10
+ | `validate [path...]` | Check the selected workspace records against language and declared contracts; report attributable diagnostics. A `composition.sources` entry that names no root, and a path selection that selects nothing, are each reported as an `IA-COMP-FIELD-VALUE` warning at the line that states it; admission does not change. These are the findings `ia-distribution validate` reports, from the same validation service. `--severity` sets the lowest severity reported and `--max-findings` the number rendered (default 50). |
11
+ | `capture` | Admit the workspace and write its snapshot to `.ia/work/snapshot/current.json` in the `ia-snapshot-1` format: one JSON document with sorted keys and one final newline holding `format` (`ia-snapshot-1`), `language`, `kernelDigest`, `revision` (the workspace revision), `records` (the admitted records sorted by identity, each with its per-record `digest`), `membership` (one `{identity, root, band, digest}` capture membership row per record, sorted by identity), `diagnostics` (the admission findings and the warnings for declarations that declare nothing, below, ordered by path, line, code and message) and `counts` (`records`, `errors`, `warnings`, `notEvaluated`). Identical sources on one language version capture to identical bytes. The database writes the pair (db SPEC D08a), and every database handle seeds its previous snapshot from it, whatever its cache setting. `.ia/work/snapshot/previous.json` holds the most recent capture whose revision differs from the current one: a capture at a new revision renames the prior `current.json` there, byte for byte, and a capture at an unchanged revision keeps `previous.json` as it is while it holds a capture at another revision. With no readable prior capture (the first one, or a `current.json` that is not an `ia-snapshot-1` capture, which the capture names and replaces), a `previous.json` at another revision is kept as the most recent capture there is; a `previous.json` at the new revision, or one that is no capture, is removed once `current.json` is written. The new bytes are staged in a temporary file in the same directory before either file is replaced, a failed step undoes the ones before it so the pair stays as it was, and a `current.json` that already holds the capture's bytes is not rewritten. The capture writes only under `.ia/work/snapshot/`, creating it when needed, and never touches `.ia/src`. The snapshot is local working state that each clone captures for itself; `ia init` writes no ignore rule for it, so a repository that keeps the snapshot out of version control lists `.ia/work/` in its own ignore file. Concurrent captures of one root are last-writer-wins. The effect is reported apart from validation: `records`, and how each record's digest compares with the prior capture's `current.json`, as `changed`, `unchanged`, `new` (no row in the prior capture) and `removed` (a row in the prior capture and none now), so `records` is `changed + unchanged + new` and two captures with no edit between them report 0 changed. The first capture has nothing to compare with, so every record is `new`. Admission findings in a source the workspace authors are written into the snapshot and counted, and never stop the write: a capture whose admission has errors still writes, marks its effect line with a warning symbol and exits 1, as `validate` does (warnings alone exit 0). Unresolved references, colliding identities, unconsented rows and every other registration or resolution finding (such as a keyword two adopted or installed systems both register) are such findings wherever they are. Two cases refuse before anything is written, so both files stay as they were (position-and-projection §5 and §11): a floor or seed input (a source under `.ia/src/floor/`, an installed package's or an adopted mount's) that fails to parse, which is a syntax error the language's scanner or parser reports (such as `IA-LANG-HEADER-MALFORMED`), refuses with that finding's own code, located at it, exit 3, and names `ia validate`; a root whose own `.ia/src` declares no `@workspace`, admitted or refused, is no workspace to capture and refuses as `IA-DB-ROOT-INVALID` (exit 3), naming `ia init <root>`, or `ia validate` when its own sources have errors. A `composition.sources` entry that names no root, and a path selection that selects nothing (an absolute, `./` or `..` selection, below), are each written as an `IA-COMP-FIELD-VALUE` warning at the line that states it, as `validate` reports them; admission does not change. With `--json` the result is `{version: 1, snapshot, format, revision, digest, records, changed, unchanged, new, removed, prior, ignored, previous, rotated, admission}`: `snapshot` is the absolute path of `current.json` and `digest` the SHA-256 of its bytes; `prior` is the revision of the prior capture the counts compare with, or null; `ignored` says why an existing `current.json` was not taken as one, or is null; `previous` is `{path, revision}` of the retained `previous.json`, or null; `rotated` says whether this capture moved the prior `current.json` there; and `admission` is `{status, errors, warnings, notEvaluated}`. A link or junction on the snapshot path, an entry at `.ia/work` or `.ia/work/snapshot` that is not a directory, or an entry at either snapshot path that is not a regular file, refuses as `IA-DB-PATH-UNSAFE` (exit 3) before anything is written, located at the entry that is not a directory or not a regular file (a link or junction is named in the message, the refusal located at the snapshot directory), and names the repair and then `ia capture` for that root. A write the system refuses for a permission, a busy or read-only entry, or an entry of the wrong kind is `IA-CLI-FAILED` (exit 3), located at what to make writable and naming that and then `ia capture`; any other system error, such as a full disk or an I/O error, is not the path's to repair and takes the generic next below. On Windows a rename of, or onto, a read-only or open snapshot file names that file; otherwise, and on every platform for creating the staged file or the snapshot directory, it names the directory whose entries the write creates, renames or removes. Design §5's `--preview`, which would report the capture without writing it, is not implemented in this release. |
12
+ | `compile` | Deprecated in favour of `capture`, and unchanged in 1.x: write a deterministic `ia.compiled.v1` artifact to `.ia/work/compiled.json`, to `--out <file>` under `.ia/work/` (a path outside it refuses with `IA-DIST-PATH-UNSAFE`, exit 3), or alone on stdout with `--stdout`; `--out` and `--stdout` together are a usage error (exit 2). An existing artifact refuses with `IA-DIST-LOCAL-MODIFICATION` (exit 3) unless `--force` overwrites it. With `--json` the result is `{version: 1, artifact, revision, digest, counts}`, `artifact` being the absolute path written; admission errors still write the artifact and exit 1. Whenever it runs to a result it also prints one line on stderr, in every output mode, `--json` and `--stdout` included, naming `ia capture`, so stdout is exactly what 1.x wrote there; a refusal prints only the refusal. It never writes the capture's snapshot, and `capture` never writes the artifact. In 2.0 `compile` becomes a deprecated alias of `capture`, removed in 3.0. |
12
13
  | `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 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
+ | `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 from the graph directed view: Edges, the rows a record declares in the spelling its author wrote; Derived inverses, its counterparts' declarations read from its side in the kernel's spelling and labeled `derived`; and Field references, the typed field references it holds or is named by, labeled `derived`. Each edge row shows its direction, depth and `declared by source` or `declared by target`, its fragment on the record it addresses (beside a declared row's counterpart, as `at #<fragment>` on a derived one) and its condition as `when` terms, and a row past depth 1 names the nearer record whose view holds it. `--edges` (`in`, `out` or `both`; default `out`) selects the direction of edges and field references, and `--depth` (0 to 3; default 1) bounds the traversal; field references are listed at depth 1 only, and at depth 0, where nothing is read, each section says none is listed at that depth. With `--json`, each record carries its per-record `digest`, `edges` lists the walk's relationships, `referencedBy` (with `--edges in` or `both`) the inbound field references, and `directed` the listed rows with their `identity`, `depth`, `kind`, `derived`, `declaredOn` and spelling or field; depth 1 of `directed` is the record's own view, so it also lists a self-relation, which the walk and therefore `edges` omit. An identity or `--path` no admitted record answers refuses as `IA-DB-SOURCE-UNAVAILABLE` (exit 1) and names `ia validate` when admission refused that identity or a record of that source, else, for an identity, the inspection of the nearest admitted identity when one is near, else the overview. |
15
+ | `read <locator>` | Print the body behind a locator (position-and-projection §5, design row 23): text and its digest, never a certification. A locator is a record's full `system/kind/facet/name` identity; that identity with `#<phase>/<Primitive>` for the text of the record's cells at that address (a playbook's step) or `#<REQ-ID>` for one requirement's text; or `<path>:<line>`, the last colon splitting the path from a positive line, for the innermost admitted record whose source span holds that line of a workspace source. A cell or requirement locator reads that text, never a document. Otherwise a record whose word carries a source locator, and which states it, reads the document it names: `work.source` on `@spec`, `@plan`, `@milestone`, `@task` and `@decision`, `reference.document` on `@authoring-guide` and `template.resource` on `@template`. The path is read relative to the tree holding the record's source: the workspace root for the workspace's own `.ia/src`, a package's or an installed store's directory, and for an adopted mount the directory `.ia/workspace.json` binds it to, whose documents its revision pin does not cover. It is read through the workspace file reader `capture` uses, which refuses a path through a link or junction, a missing, non-regular or hard-linked file, a name that is not portable and a file over 4 MiB. A source locator `<path>#<anchor>` on a markdown file (`.md` or `.markdown`, in any case) reads only the section from the ATX heading whose anchor is `<anchor>` to the next heading of the same or a higher level, headings in fenced code ignored. The anchor is GitHub's for a plain-text heading (a repeated heading takes `-1`, `-2` and so on in document order, and a leading byte order mark is not part of the first heading); underscore emphasis, entity and character references, inline HTML and reference links are not rendered first, so such a heading may have another anchor on GitHub, and setext headings and headings in list items or block quotes are not read. Any other record reads its own body: its `meaning.says` (a `@system`'s head `describes`; a `@schema`, which states neither, has an empty body). Sections, fields and relationships stay in `inspect`. The output names `record` or `document` with the document's path, the SHA-256 of the body's UTF-8 bytes and the line `body not certified by this read`, then prints the body as read; with `--json` it is `{version: 1, locator, identity, kind, path, digest, body, certified: false}`, where `locator` is the locator as given, `kind` is `record` or `document`, `path` is present for a document only and `digest` is the full SHA-256. A read opens the workspace without the db cache and writes nothing. A malformed locator refuses with `IA-CLI-USAGE` (exit 2) before anything is read and names `ia read --help`. The other refusals carry the runtime's codes: a locator no admitted record answers is `IA-RUNTIME-READ-UNADMITTED` (exit 1). For an identity a source holds whose record admission refused it reads `in this workspace's sources, but admission refused it` and names `ia validate`; for one no source holds it reads `not in this workspace's sources` and names the read of the nearest admitted identity when one is near, as `ia inspect` names the inspection, else `ia inspect` for the overview; for a line it names what the file holds: a source whose records admission refused names `ia validate`, a source whose admitted records span other lines names `ia inspect --path <file>`, and a file with no record of the workspace's sources names the overview. A cell or requirement the record lacks is `IA-RUNTIME-READ-FRAGMENT` (exit 1), naming `ia inspect <identity>`; a document path that names no file or is outside the workspace or the record's tree, a URL, which a read never fetches, a file the reader refuses or cannot find, bytes that are not UTF-8, an anchor on a file that is not markdown and an anchor no heading has are `IA-RUNTIME-READ-UNREACHABLE` (exit 3), naming `ia inspect <identity>`, which locates the record whose locator needs the repair (and the file to restore, when there is one); and a record at runtime placement (band 0) is `IA-RUNTIME-READ-PLACEMENT` (exit 3) unless `--include-runtime` is given, naming the same read with that flag. The workspace session this release opens admits no source at runtime placement, so through `ia read` the flag changes nothing yet. The `<path>` of `<path>:<line>` is relative to the workspace root, as every source path the toolchain names is; an absolute path inside the root is read as the root-relative path it names, and any other path names no admitted record. Design §11 names `ia scope --seat <qname> --shape context` after a read refusal; until the consumer position verb lands, these refusals name the `ia inspect` and `ia validate` commands above instead. |
14
16
  | `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
17
 
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.
18
+ 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.2.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
19
 
18
20
  ## Distribution commands
19
21
 
@@ -25,8 +27,18 @@ Workspace discovery uses the nearest ancestor containing `.ia/src`, with `--root
25
27
 
26
28
  `--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
29
 
30
+ Every consumer refusal names one next command. With `--json` a refusal is `{version: 1, ok: false, code, message, exit, where, next}` and `next` is always a non-empty string; human output prints the same text on the `→` line, where the command it quotes is never broken across lines and runs past the line width when it must. The text quotes exactly one command and spells no other command or option outside it. That command is `ia …`, except that a recovery or a directory registry repair names `ia-distribution …`, the binary of `@inventarch/distribution`; a global install of `@inventarch/cli` does not put that binary on `PATH`, so such a command runs only where `@inventarch/distribution` is installed as well. The command carries the values this invocation supplied that it needs, such as the root (`ia init`'s `<directory>` included), the host, the package ids, the registry or catalog source, the descriptor or `--force`, so it runs from the directory the refused command ran in. Except where an unknown or interrupted command keeps the invocation as typed (below), a command that reruns the refused one repeats no output flag such as `--json` or `--quiet`, and one that runs the refused `ia install` or `ia update` again names its plan, without `--apply`: the plan applies nothing, although acquiring may fill the archive cache and `--plan-out` writes the plan file. A rerun of `ia restore`, which has no preview, carries `--apply --yes`; the rerun after deleting a cached archive drops `--offline`, so the archive is fetched again. A placeholder such as `<directory>`, `<path>`, `<file>` or `<url|dir>` stands only for the value the user has to correct or supply. A manual step the CLI cannot take, such as deleting or moving a named file, replacing a link under `.ia/src`, mapping a provider in `.ia/registries.json` or setting `IA_HOME`, may come first, and an explanation may follow. An unknown command names the nearest one with the rest of the invocation as typed, keeping only `--root` and `--params` for a machine operation. A workspace whose sources cannot be read (a link or alias under `.ia/src`, a source that changed during the read) names that repair and then `ia validate` with that root, which confirms the workspace opens. A service refusal that carries no next action of its own names the refused command's `--help` for a usage error, `ia validate` for a record finding (`IA-COMP-*`, `IA-GRAPH-*`, `IA-LANG-*`) and `ia doctor` for any other code, each with the root the invocation gave: its `--root`, or `ia init`'s `<directory>`. An interrupted command (`IA-CLI-INTERRUPTED`, exit 130) carries `next` in its JSON object and on its one stderr line: the rerun that finishes work already written, or otherwise the same invocation as typed, with any `--apply`, `--yes` and `--json` it was given. A file the invocation named that is not there (a `--descriptor`, `--catalog` or `--requests` file) names the same command with that one value as `<file>`. The machine protocol below is unchanged; its failures are the door's own one-line JSON and carry no `next`, so "every refusal names one next command" holds for the consumer commands. `@inventarch/cli/internal/consumer` keeps its 1.x forms: the `Refusal` constructor's `where` and `next` default to null, `refusalOf(error)` without the refused invocation returns a null `next` as before, and `renderRefusal` gives a refusal without a next action the fallback above, so `--json` `next` is always a string; every construction site in this CLI names its next action, which its tests enforce. `PlanRequest.reruns` in `@inventarch/cli/internal/distribute` is optional, and without it a plan's remedies are spelled from the request.
31
+
28
32
  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
33
 
30
34
  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
35
 
36
+ ## Mandate authority
37
+
38
+ A `@mandate` may declare its authority as closed moves. Each mandate mode maps to one kernel move: read → Observation, validate → Verification, author → Synthesis, effect → Execution, re-seat → Delegation. The runtime publishes this table as `MODE_MOVES` beside `mandateRefusal`. The modes are not commands: this release assigns no command to a mode, and that assignment lands with the verbs that consult `mandateRefusal`. `mandateRefusal` refuses a mode whose move the mandate does not list (`IA-RUNTIME-MANDATE-MOVE`) or a word the mandate excludes (`IA-RUNTIME-MANDATE-WORD`) and names `ia inspect <mandate> --edges both` as the next command. A mandate without `authority.moves` restricts no move, a declared list names at least one move, excluded words are refused whatever the moves, and a mandate adds closed restrictions only; it never grants host permissions. Enforcement arrives with the authoring verbs; no command in this release consults a mandate.
39
+
40
+ ## Path selections
41
+
42
+ A path selection is the text a record states to claim locations: `covers` on a `@mandate` (`authority.covers`), a `@law` or `@convention` (`subject.covers`) and a `@spec` (`work.covers`), and `paths` on a `@hook`. A `@check`'s `scope` is required prose in its schema, not a path selection, so a check claims no location. These are the glob semantics every consumer of a location seat reads (position-and-projection row 17). A selection is a workspace-relative path whose segments are separated by `/`, and a `\` reads as `/` in both the selection and the path matched. `**` as a whole segment matches any number of segments, none included; `*` matches any run of characters within one segment; `?` matches exactly one character; every other character matches itself, case-sensitively. A trailing `/` selects the directory and everything below it, so `docs/` and `docs/**` select `docs` and `docs/guide.md`; a selection without wildcards selects exactly that path. Braces, character classes, escapes and negation are not part of the dialect, and a leading dot is not special. An empty or absolute selection, or one with an empty, `.` or `..` segment, selects nothing, and nothing selects a path that is absolute or escapes the workspace. The graph package implements the dialect (`selects`, graph SPEC G06c), and the database resolves a path to the seat it is declared at and its claimants with it (`resolveSeat`, db SPEC D02b). No command in this release resolves a path to its seat; `read`'s `<path>:<line>` names the record that spans a line of an admitted source, not a seat.
43
+
32
44
  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.
package/assets/base.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "inventarch/language",
3
- "version": "1.1.0",
4
- "archive": "78bff5eb3188b628c06d2f1cf1477fb1bfcea874ec3863ae112b4972b8e81517",
5
- "manifest": "5bde7bbbfef3582d08551859b2d978e5638a8c5cc19bf5ce5fca69eac62a0af7"
3
+ "version": "1.2.0",
4
+ "archive": "0305ca741b1dfec97ff35fbeb36d4a66a0c9c0614b730fe14fcdac0f1565e28a",
5
+ "manifest": "201945ba363e049fadc4171e016161d36b74eaaa1c76bb68b78cf99e592e804c"
6
6
  }
package/assets/host.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "release": "58ed0e0ef7300b5509f186186dee6a0539fb7e0f48ee4b9ea1c07ed3a33ff263",
3
- "archive": "b97e367bbf15db09f552d6bd6dd3701210efe77931d34b57ccb85240957aba61",
4
- "files": 1220,
5
- "bytes": 6278283
2
+ "release": "c2cd0d91def624f2f04c1335696138ec919c238a48c705c7320851c68ef702b3",
3
+ "archive": "c5fb2bfbba619cbd558ecc1e94dd2c16e37aa8599b4e423f1f59ed01f2074e03",
4
+ "files": 1212,
5
+ "bytes": 6444032
6
6
  }