@inventarch/runtime 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -14
- package/SPEC.md +26 -26
- package/dist/door.d.ts +1 -2
- package/dist/door.d.ts.map +1 -1
- package/dist/door.js +1 -1
- package/dist/door.js.map +1 -1
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/index.js +1 -2
- package/dist/editor/index.js.map +1 -1
- package/dist/errors.d.ts +3 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/locator.d.ts +5 -6
- package/dist/locator.d.ts.map +1 -1
- package/dist/locator.js +5 -6
- package/dist/locator.js.map +1 -1
- package/dist/mandate-guard.d.ts +18 -19
- package/dist/mandate-guard.d.ts.map +1 -1
- package/dist/mandate-guard.js +14 -10
- package/dist/mandate-guard.js.map +1 -1
- package/dist/mandate-modes.d.ts +46 -46
- package/dist/mandate-modes.d.ts.map +1 -1
- package/dist/mandate-modes.js +44 -43
- package/dist/mandate-modes.js.map +1 -1
- package/dist/next.d.ts +9 -9
- package/dist/next.d.ts.map +1 -1
- package/dist/next.js +6 -6
- package/dist/next.js.map +1 -1
- package/dist/packet-host.d.ts +26 -28
- package/dist/packet-host.d.ts.map +1 -1
- package/dist/packet-host.js +9 -10
- package/dist/packet-host.js.map +1 -1
- package/dist/packet.d.ts +20 -20
- package/dist/packet.d.ts.map +1 -1
- package/dist/packet.js +10 -10
- package/dist/packet.js.map +1 -1
- package/dist/position.d.ts +19 -21
- package/dist/position.d.ts.map +1 -1
- package/dist/position.js +15 -15
- package/dist/position.js.map +1 -1
- package/dist/render.d.ts +1 -1
- package/dist/render.js +1 -1
- package/dist/scope-key.d.ts +4 -4
- package/dist/scope-key.d.ts.map +1 -1
- package/dist/scope-key.js +8 -8
- package/dist/scope-key.js.map +1 -1
- package/dist/steward.d.ts +4 -5
- package/dist/steward.d.ts.map +1 -1
- package/dist/steward.js +4 -5
- package/dist/steward.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,28 +1,77 @@
|
|
|
1
1
|
# @inventarch/runtime
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@inventarch/runtime) [](https://github.com/inventarch/ia/actions/workflows/platform-quality.yml) [](LICENSE) [](package.json)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> `@inventarch/runtime` turns scoped [`@inventarch/db`](../db/README.md) reads into what agents and hosts consume: position bodies, plan delivery views, record bodies, the position packet for Claude Code and Codex, mandate resolution and the Door machine protocol. `ia position`, `ia next` and `ia read`, the MCP server and the VS Code extension are built on it.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## ⚡ Quick start
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```sh
|
|
10
|
+
npm install @inventarch/db @inventarch/runtime
|
|
11
|
+
```
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Read a position and a plan's delivery view from the workspace in the [root README quick start](../../README.md#-quick-start). These reads do not execute the task:
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
```js
|
|
16
|
+
import { open } from '@inventarch/db';
|
|
17
|
+
import { deliveryView, position } from '@inventarch/runtime';
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
const workspace = open('path/to/your-project', { cache: false, checks: 'structural' });
|
|
20
|
+
try {
|
|
21
|
+
const { token } = workspace.resolveScope();
|
|
22
|
+
const { body } = position(workspace, token, {
|
|
23
|
+
seat: 'work-system/definition/task/write-schema',
|
|
24
|
+
shape: 'sequence',
|
|
25
|
+
});
|
|
26
|
+
console.log(body.key.phase, body.loaded.map(({ identity }) => identity));
|
|
27
|
+
const delivery = deliveryView(workspace, token, 'work-system/definition/plan/public-api');
|
|
28
|
+
if (delivery.ok) console.log(delivery.view.next);
|
|
29
|
+
} finally {
|
|
30
|
+
workspace.close();
|
|
31
|
+
}
|
|
32
|
+
```
|
|
16
33
|
|
|
17
|
-
|
|
34
|
+
```text
|
|
35
|
+
plan [
|
|
36
|
+
'work-system/definition/task/write-schema',
|
|
37
|
+
'work-system/definition/task/review-schema'
|
|
38
|
+
]
|
|
39
|
+
ia position --seat work-system/definition/task/write-schema --shape sequence
|
|
40
|
+
```
|
|
18
41
|
|
|
19
|
-
`
|
|
42
|
+
`position` completes a partial scope key (the `sequence` shape implies the `plan` phase, with depth 1 and budget 16 by default) and returns `{body, digest, hostNote}`. The body and its digest are a pure function of the key and the admitted records; the host note carries the revisions and capture freshness outside the digest. `deliveryView` returns `{ok: true, view}`, or a refusal that names the one command to run next.
|
|
20
43
|
|
|
21
|
-
|
|
22
|
-
# Editor and authoring consumers
|
|
44
|
+
## 🧭 What it does
|
|
23
45
|
|
|
24
|
-
|
|
46
|
+
| Export | Use it for |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| `position`, `positionBody`, `normalizeScopeKey`, `resolveScopeKey`, `K0`, `SCOPE_KEY_CAPS` | The body `ia position` prints for a scope key of seat, shape, phase, depth, budget and word. |
|
|
49
|
+
| `deliveryView`, `NEXT_CODES` | The plan view `ia next` prints: tasks in prerequisite order, each with a verdict from recorded exit evidence, and the next `ia position` command. |
|
|
50
|
+
| `readBody`, `parseLocator` | The body behind an identity, cell, requirement or source locator, with its SHA-256, as `ia read` prints it. |
|
|
51
|
+
| `Door`, `MACHINE_PROTOCOL` | The structured read protocol behind the CLI's machine commands and the MCP server: nine version 1 operations, plus `read`, `next` and `position` since version 2. |
|
|
52
|
+
| `context`, `select`, `prepareCoordinate`, `classify` | Coordinate-based context packets that reserve blocking governance first, and selection among explicit candidates. |
|
|
53
|
+
| `renderPacket`, `renderHost`, `PACKET_MARKER` | Build the host-neutral position packet and render it for `claude` or `codex` as files and a receipt. |
|
|
54
|
+
| `governingMandates`, `defaultActor`, `profileRefusal`, `evaluateMandateGuard`, `MOVES`, `MODE_MOVES` | Resolve the `@mandate` records that govern an actor, and judge a command mode or a guarded edit against them. |
|
|
55
|
+
| `preparePublication`, `inspectPublication`, `validateCandidate` | Publish generated drafts create-only, and validate candidate files against the sources a host disclosed. |
|
|
56
|
+
| `@inventarch/runtime/editor` | `EditorWorkspace` for editors (overlays, diagnostics, completion and source actions), with language's single-record edit helpers. |
|
|
57
|
+
| `@inventarch/runtime/authoring` | Version 1 remote authoring request, proposal, receipt, event and chat contracts, and a bounded HTTPS client. |
|
|
58
|
+
| `@inventarch/runtime/authoring-execution` | Guarded dispatch of authoring operations from a fixed catalog the host supplies. |
|
|
59
|
+
| `@inventarch/runtime/entry` | `isEntry`, which a package binary calls to tell whether it is the process entry. |
|
|
25
60
|
|
|
26
|
-
|
|
61
|
+
The `./internal/*` subpaths serve specific toolchain consumers and are not a stable contract.
|
|
27
62
|
|
|
28
|
-
|
|
63
|
+
## ⚖️ What it does not do
|
|
64
|
+
|
|
65
|
+
- **It writes no source.** `position`, `deliveryView`, `readBody`, `renderPacket` and `renderHost` write nothing; the CLI writes projection files. Publication is the one writer: create-only files under a host-selected `.ia/work/generated/<id>` directory, never `.ia/src`.
|
|
66
|
+
- **It runs nothing.** The Door makes no source writes, model calls, sessions or capability dispatch. A delivery view reads verdicts from recorded evidence and never executes a task, and what a scope does not read never counts as met.
|
|
67
|
+
- **A position takes no free text.** Request text is refused as a scope key part, so nothing text-driven decides what a position loads.
|
|
68
|
+
- **Mandates are cooperative restrictions.** Mandate resolution reads authored declarations; it authenticates no one and grants no host permission. A `@mandate` that fails admission fails every mandate-gated decision closed.
|
|
69
|
+
- **Remote authoring needs a separate service.** `./authoring` validates and transports messages; the service owns authentication, authorization, persisted runs and model execution, and the application owns credentials and effects.
|
|
70
|
+
- **Publication locks coordinate cooperating processes.** They are not a sandbox against malicious changes by the same user.
|
|
71
|
+
|
|
72
|
+
## 📚 Learn more
|
|
73
|
+
|
|
74
|
+
- [SPEC.md](SPEC.md): the runtime contract, including scope keys, position bodies, delivery views, the Door protocol and host packets.
|
|
75
|
+
- [LANGUAGE.md](LANGUAGE.md): the public vocabulary this release carries.
|
|
76
|
+
- The [root README](../../README.md) and the [architecture reference](../../docs/reference/architecture/README.md).
|
|
77
|
+
- Related packages and apps: [`@inventarch/db`](../db/README.md), [`@inventarch/workspace-runtime`](../workspace-runtime/README.md), the [CLI guide](../../apps/cli/README.md) and the [MCP server](../../apps/mcp-door/README.md).
|