@sentropic/cluster-mesh 0.10.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +163 -0
- package/dist/compose/disabled.d.ts +5 -0
- package/dist/compose/disabled.d.ts.map +1 -0
- package/dist/compose/disabled.js +12 -0
- package/dist/compose/disabled.js.map +1 -0
- package/dist/compose/gateway.d.ts +32 -0
- package/dist/compose/gateway.d.ts.map +1 -0
- package/dist/compose/gateway.js +29 -0
- package/dist/compose/gateway.js.map +1 -0
- package/dist/compose/llm-mesh.d.ts +23 -0
- package/dist/compose/llm-mesh.d.ts.map +1 -0
- package/dist/compose/llm-mesh.js +19 -0
- package/dist/compose/llm-mesh.js.map +1 -0
- package/dist/device.d.ts +2 -0
- package/dist/device.d.ts.map +1 -1
- package/dist/device.js +15 -0
- package/dist/device.js.map +1 -1
- package/dist/errors.d.ts +6 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +9 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/gateway/auth-hono.d.ts +3 -0
- package/dist/integrations/gateway/auth-hono.d.ts.map +1 -0
- package/dist/integrations/gateway/auth-hono.js +4 -0
- package/dist/integrations/gateway/auth-hono.js.map +1 -0
- package/dist/integrations/gateway/auth.d.ts +3 -0
- package/dist/integrations/gateway/auth.d.ts.map +1 -0
- package/dist/integrations/gateway/auth.js +4 -0
- package/dist/integrations/gateway/auth.js.map +1 -0
- package/dist/integrations/gateway/index.d.ts +3 -0
- package/dist/integrations/gateway/index.d.ts.map +1 -0
- package/dist/integrations/gateway/index.js +4 -0
- package/dist/integrations/gateway/index.js.map +1 -0
- package/dist/integrations/llm-mesh/enrollment.d.ts +3 -0
- package/dist/integrations/llm-mesh/enrollment.d.ts.map +1 -0
- package/dist/integrations/llm-mesh/enrollment.js +4 -0
- package/dist/integrations/llm-mesh/enrollment.js.map +1 -0
- package/dist/integrations/llm-mesh/facade.d.ts +3 -0
- package/dist/integrations/llm-mesh/facade.d.ts.map +1 -0
- package/dist/integrations/llm-mesh/facade.js +4 -0
- package/dist/integrations/llm-mesh/facade.js.map +1 -0
- package/dist/integrations/llm-mesh/index.d.ts +3 -0
- package/dist/integrations/llm-mesh/index.d.ts.map +1 -0
- package/dist/integrations/llm-mesh/index.js +4 -0
- package/dist/integrations/llm-mesh/index.js.map +1 -0
- package/dist/integrations/llm-mesh/node.d.ts +3 -0
- package/dist/integrations/llm-mesh/node.d.ts.map +1 -0
- package/dist/integrations/llm-mesh/node.js +4 -0
- package/dist/integrations/llm-mesh/node.js.map +1 -0
- package/dist/integrations/llm-mesh/transport/cloud-code.d.ts +3 -0
- package/dist/integrations/llm-mesh/transport/cloud-code.d.ts.map +1 -0
- package/dist/integrations/llm-mesh/transport/cloud-code.js +4 -0
- package/dist/integrations/llm-mesh/transport/cloud-code.js.map +1 -0
- package/dist/loaders/gateway/auth-hono.d.ts +8 -0
- package/dist/loaders/gateway/auth-hono.d.ts.map +1 -0
- package/dist/loaders/gateway/auth-hono.js +9 -0
- package/dist/loaders/gateway/auth-hono.js.map +1 -0
- package/dist/loaders/gateway/auth.d.ts +8 -0
- package/dist/loaders/gateway/auth.d.ts.map +1 -0
- package/dist/loaders/gateway/auth.js +9 -0
- package/dist/loaders/gateway/auth.js.map +1 -0
- package/dist/loaders/gateway/index.d.ts +8 -0
- package/dist/loaders/gateway/index.d.ts.map +1 -0
- package/dist/loaders/gateway/index.js +9 -0
- package/dist/loaders/gateway/index.js.map +1 -0
- package/dist/loaders/llm-mesh/enrollment.d.ts +8 -0
- package/dist/loaders/llm-mesh/enrollment.d.ts.map +1 -0
- package/dist/loaders/llm-mesh/enrollment.js +9 -0
- package/dist/loaders/llm-mesh/enrollment.js.map +1 -0
- package/dist/loaders/llm-mesh/facade.d.ts +8 -0
- package/dist/loaders/llm-mesh/facade.d.ts.map +1 -0
- package/dist/loaders/llm-mesh/facade.js +9 -0
- package/dist/loaders/llm-mesh/facade.js.map +1 -0
- package/dist/loaders/llm-mesh/index.d.ts +8 -0
- package/dist/loaders/llm-mesh/index.d.ts.map +1 -0
- package/dist/loaders/llm-mesh/index.js +9 -0
- package/dist/loaders/llm-mesh/index.js.map +1 -0
- package/dist/loaders/llm-mesh/node.d.ts +8 -0
- package/dist/loaders/llm-mesh/node.d.ts.map +1 -0
- package/dist/loaders/llm-mesh/node.js +9 -0
- package/dist/loaders/llm-mesh/node.js.map +1 -0
- package/dist/loaders/llm-mesh/transport/cloud-code.d.ts +8 -0
- package/dist/loaders/llm-mesh/transport/cloud-code.d.ts.map +1 -0
- package/dist/loaders/llm-mesh/transport/cloud-code.js +9 -0
- package/dist/loaders/llm-mesh/transport/cloud-code.js.map +1 -0
- package/dist/mesh.d.ts +11 -4
- package/dist/mesh.d.ts.map +1 -1
- package/dist/mesh.js +30 -9
- package/dist/mesh.js.map +1 -1
- package/dist/modules/catalog.d.ts +36 -0
- package/dist/modules/catalog.d.ts.map +1 -0
- package/dist/modules/catalog.js +85 -0
- package/dist/modules/catalog.js.map +1 -0
- package/dist/modules/contracts.d.ts +56 -0
- package/dist/modules/contracts.d.ts.map +1 -0
- package/dist/modules/contracts.js +35 -0
- package/dist/modules/contracts.js.map +1 -0
- package/dist/modules/errors.d.ts +29 -0
- package/dist/modules/errors.d.ts.map +1 -0
- package/dist/modules/errors.js +56 -0
- package/dist/modules/errors.js.map +1 -0
- package/dist/modules/registry.d.ts +13 -0
- package/dist/modules/registry.d.ts.map +1 -0
- package/dist/modules/registry.js +157 -0
- package/dist/modules/registry.js.map +1 -0
- package/dist/modules/resolution.d.ts +23 -0
- package/dist/modules/resolution.d.ts.map +1 -0
- package/dist/modules/resolution.js +139 -0
- package/dist/modules/resolution.js.map +1 -0
- package/dist/modules/semver.d.ts +7 -0
- package/dist/modules/semver.d.ts.map +1 -0
- package/dist/modules/semver.js +55 -0
- package/dist/modules/semver.js.map +1 -0
- package/dist/modules/topology-guard.d.ts +2 -0
- package/dist/modules/topology-guard.d.ts.map +1 -0
- package/dist/modules/topology-guard.js +6 -0
- package/dist/modules/topology-guard.js.map +1 -0
- package/dist/modules/topology.d.ts +61 -0
- package/dist/modules/topology.d.ts.map +1 -0
- package/dist/modules/topology.js +144 -0
- package/dist/modules/topology.js.map +1 -0
- package/dist/nhi.d.ts +2 -0
- package/dist/nhi.d.ts.map +1 -1
- package/dist/nhi.js +18 -3
- package/dist/nhi.js.map +1 -1
- package/dist/projection.d.ts +13 -0
- package/dist/projection.d.ts.map +1 -1
- package/dist/projection.js +35 -0
- package/dist/projection.js.map +1 -1
- package/package.json +94 -2
package/README.md
CHANGED
|
@@ -3,6 +3,99 @@
|
|
|
3
3
|
Injectable Cluster Mesh control-plane contracts and a functional single-instance
|
|
4
4
|
runtime.
|
|
5
5
|
|
|
6
|
+
## Compatibility and releases
|
|
7
|
+
|
|
8
|
+
Sentropic owns this package and its releases in `rhanka/sentropic`. Starting with
|
|
9
|
+
0.11.0, releases follow SemVer: patches fix defects without changing contracts,
|
|
10
|
+
minor releases add backward-compatible functionality, and incompatible changes
|
|
11
|
+
require a major release. This compatibility commitment also applies during 0.x;
|
|
12
|
+
the historical breaking 0.9/0.10 changes predate this policy.
|
|
13
|
+
|
|
14
|
+
The supported compatibility window is N and N-1: the current and immediately
|
|
15
|
+
preceding minor release lines within the current major (initially 0.11.x and
|
|
16
|
+
0.10.x). Existing N-1 consumer inputs, ports and signed references remain valid
|
|
17
|
+
on N; new optional features require capability detection. This is an API and
|
|
18
|
+
contract compatibility promise, not an automatic upgrade or indefinite security
|
|
19
|
+
maintenance promise. Consumers should pin exact versions and lock integrity;
|
|
20
|
+
an older peer need not understand new optional features.
|
|
21
|
+
|
|
22
|
+
Before any major bump or field removal, Sentropic and h2a must pass cross-consumer
|
|
23
|
+
conformance CI against both supported lines, document migration and deprecation,
|
|
24
|
+
and coordinate the release. The CI gate is a release requirement; this additive
|
|
25
|
+
release does not claim to install that cross-repository CI. Deprecated fields
|
|
26
|
+
remain throughout the supported window and cannot be removed in a minor release.
|
|
27
|
+
|
|
28
|
+
Reusable public-contract fixtures live in `tests/conformance/h2a-contract.json`,
|
|
29
|
+
with the executable runner `tests/conformance/h2a-contract.spec.ts`. They cover
|
|
30
|
+
the h2a-facing boundaries, capabilities, projections, devices, NHI mapping and
|
|
31
|
+
federal gates through public exports. For h2a EX-12, copy both files, redirect the
|
|
32
|
+
runner's package import to the pinned release, and run the `N/N-1 baseline` suite
|
|
33
|
+
on both supported lines; run `since 0.11` only on 0.11+. JSON fixtures have an
|
|
34
|
+
explicit format version and contain no private keys. This supplies Sentropic's
|
|
35
|
+
fixtures; cross-repository CI wiring remains a separate release gate.
|
|
36
|
+
|
|
37
|
+
## Upstream bindings in 0.11
|
|
38
|
+
|
|
39
|
+
`LocalDeviceAttachmentPort` and `LocalProjectionPort` accept optional readonly
|
|
40
|
+
`availability: 'available' | 'gated'`, including a getter for live binding state.
|
|
41
|
+
Omission retains the existing available behavior. `mesh.capabilities` reads the
|
|
42
|
+
current values; local operations reject gated bindings with `CapabilityGatedError`
|
|
43
|
+
before delegation. Federal capabilities remain gated. Hosts must report whether
|
|
44
|
+
their concrete bindings are usable; the mesh cannot probe opaque port internals.
|
|
45
|
+
|
|
46
|
+
Projection ports may provide `supportedKinds?: readonly ProjectionKind[]`; omission
|
|
47
|
+
supports all three kinds and an empty list supports none. Unsupported kinds fail
|
|
48
|
+
with `CapabilityGatedError('local_projection')` before creation or resolution.
|
|
49
|
+
`mesh.capabilities.localProjectionKinds` exposes the current effective kinds
|
|
50
|
+
(empty when the whole binding is gated). The field is optional in the public
|
|
51
|
+
capability type for older providers; this adapter always supplies it.
|
|
52
|
+
|
|
53
|
+
`createDegenerateClusterMesh` accepts `nhi?: NhiLifecyclePort`. It takes precedence
|
|
54
|
+
over `nhiRunner`; without injection, the runner retains its existing mapping.
|
|
55
|
+
At least one is required. Construction checks that an injected port's `attest`,
|
|
56
|
+
`offboard` and `exportBundle` methods are functions; malformed ports throw
|
|
57
|
+
`TypeError`, even when a runner is also supplied. An injected port is trusted by
|
|
58
|
+
design: the host owns its authorization, input validation and effects. Shape
|
|
59
|
+
validation does not establish behavioral equivalence to the command adapter.
|
|
60
|
+
`attest` accepts optional string `role` and `scope`,
|
|
61
|
+
forwarded as separate `--role` and `--scope` arguments before `--root`; h2a remains
|
|
62
|
+
the validation authority and its errors/results pass through unchanged.
|
|
63
|
+
The runner adapter rejects empty/whitespace-only or leading-hyphen `instance`,
|
|
64
|
+
`role` and `scope` values before building a command, with `InvalidNhiArgumentError`
|
|
65
|
+
(`code: 'invalid_nhi_argument'`, `argument` identifies the field).
|
|
66
|
+
|
|
67
|
+
Devices may implement `denyDeviceCode(userCode)`, returning `DeviceApprovalResult`.
|
|
68
|
+
The adapter delegates denial with the port as receiver. Hosts own the state
|
|
69
|
+
transition to `denied` and subsequent poll outcomes. Legacy ports remain valid;
|
|
70
|
+
calling denial without a binding throws `CapabilityGatedError('device_denial')`.
|
|
71
|
+
The method stays optional on the public domain interface for compatibility.
|
|
72
|
+
|
|
73
|
+
`SignedProjectionReference` accepts optional Unix-millisecond `expiresAt` and
|
|
74
|
+
`issuedAt`. Hosts must sign and verify `canonicalProjectionReferenceBytes(ref)`:
|
|
75
|
+
UTF-8 JSON in the fixed order `kind`, `reference`, `homeNodeId`, `issuer`, `keyId`,
|
|
76
|
+
`expiresAt`, `issuedAt`, omitting undefined timestamps and excluding `signature`.
|
|
77
|
+
Both project and resolve validate timestamps after verification and before delegation.
|
|
78
|
+
Legacy mode still accepts references without timestamps. `createLocalProjectionDomain`
|
|
79
|
+
accepts `requireExpiry: true` for strict mode, `maxTtlMs` to bound expiry minus
|
|
80
|
+
issued time (or current time when issued time is absent), and `clockSkewMs`
|
|
81
|
+
(default zero) to tolerate clock differences at expiry and issuance boundaries.
|
|
82
|
+
TTL must be positive; skew must be nonnegative; both are safe integer milliseconds.
|
|
83
|
+
`now?: () => number` defaults to `Date.now`; strict mode rejects non-finite clocks.
|
|
84
|
+
With zero skew, expiry equal to now is rejected; issuance after now is rejected.
|
|
85
|
+
|
|
86
|
+
Expiry is advisory unless strict mode AND an authenticating verifier are used.
|
|
87
|
+
It bounds the replay window (plus allowed clock skew), but does not prevent replay
|
|
88
|
+
inside it. Full G3 closure per D13 also requires a server challenge on the h2a side,
|
|
89
|
+
outside this package. Signing ownership (F5) remains unchanged.
|
|
90
|
+
|
|
91
|
+
`verifyCustodySignature` is exported from the package root for standalone Ed25519
|
|
92
|
+
verification; it returns false for malformed keys, signatures, or verification
|
|
93
|
+
failure. It does not enforce custody authorization, lifetime, or replay policy.
|
|
94
|
+
|
|
95
|
+
Package checks from the repository root:
|
|
96
|
+
`make typecheck-cluster-mesh ENV=<slug>` and
|
|
97
|
+
`make test-cluster-mesh ENV=<slug>` (use an isolated test environment).
|
|
98
|
+
|
|
6
99
|
Version 0.9 makes verified custody mandatory and adds action-aware authorization,
|
|
7
100
|
required instruction-resolution and target-liveness ports, and explicit actuation
|
|
8
101
|
outcomes to the existing central control-plane contracts. It retains the degenerate
|
|
@@ -10,6 +103,76 @@ topology introduced in 0.1: one Sentropic server, its attached local workstation
|
|
|
10
103
|
local signed projections, and the existing device-code lifecycle. It does not
|
|
11
104
|
implement server-to-server federation.
|
|
12
105
|
|
|
106
|
+
## Lazy integration surface in 0.12
|
|
107
|
+
|
|
108
|
+
Cluster Mesh is the single integration surface for llm-mesh and llm-gateway. Those
|
|
109
|
+
providers stay independent packages and never depend on cluster-mesh. They are
|
|
110
|
+
**optional peers**: a bare install pulls none of them, and the root entry
|
|
111
|
+
(`@sentropic/cluster-mesh`) has no static JS or declaration edge to any of them.
|
|
112
|
+
|
|
113
|
+
| Entry | Provider | Selected optional peers |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| `/llm-mesh`, `/llm-mesh/facade`, `/llm-mesh/enrollment`, `/llm-mesh/node`, `/llm-mesh/transport/cloud-code` | matching `@sentropic/llm-mesh` entry | `@sentropic/llm-mesh >=0.21.2 <0.22.0` |
|
|
116
|
+
| `/gateway` | `@sentropic/llm-gateway` root (neither auth mode) | llm-mesh + `@sentropic/llm-gateway >=0.18.0 <0.19.0` |
|
|
117
|
+
| `/gateway/auth` (service mode) | `@sentropic/llm-gateway/auth` | gateway + `@sentropic/mcp-auth >=0.2.1 <0.3.0`, `jose ^5.10.0` |
|
|
118
|
+
| `/gateway/auth-hono` (session mode) | `@sentropic/llm-gateway/auth-hono` | gateway + `@sentropic/auth-hono ^0.15.0` |
|
|
119
|
+
| `/loaders/<leaf>` | async typed loader (`loadLlmMesh`, `loadGateway`, `loadGatewayAuth`, ...) | as its leaf, resolved on call |
|
|
120
|
+
| `/compose/llm-mesh`, `/compose/gateway` | `createLlmMeshNamespaceModule`, `createGatewayNamespaceModule` | as the loaders they call |
|
|
121
|
+
|
|
122
|
+
Static leaves are `export *` re-exports of the provider namespace: same values,
|
|
123
|
+
types, overloads and class identity. Importing a leaf selects that provider; a
|
|
124
|
+
missing provider fails native ESM linking of the importing module. Loaders take a
|
|
125
|
+
registry from `createClusterMeshModules({ disabled? })` (one per composition root) and
|
|
126
|
+
reject with `ClusterMeshModuleUnavailableError` (`code: 'cluster_mesh_module_unavailable'`,
|
|
127
|
+
reasons `disabled | not_installed | incompatible_version | export_unavailable |
|
|
128
|
+
load_failed | source_unavailable`). Recognize it with `isClusterMeshModuleUnavailableError`
|
|
129
|
+
or by `code`, never by `instanceof` (duplicate copies have distinct constructors).
|
|
130
|
+
`modules.probe()` reports metadata-only availability without evaluating providers;
|
|
131
|
+
pass `modules` to `createDegenerateClusterMesh` to expose `capabilities.modules`.
|
|
132
|
+
MCP and other catalogued capabilities are listed as `source_unavailable` until a
|
|
133
|
+
later minor delivers them.
|
|
134
|
+
|
|
135
|
+
**Startup preflight (fail closed before bind).** llm-gateway imports its auth peers
|
|
136
|
+
only at verification time, so importing an auth leaf proves nothing. Await
|
|
137
|
+
`loadGatewayAuth(modules)` (service) or `loadGatewayAuthHono(modules)` (session)
|
|
138
|
+
before binding any listener; they resolve and evaluate the selected peer graph
|
|
139
|
+
**from the installed gateway's location**. `createGatewayNamespaceModule(modules,
|
|
140
|
+
{ enabled, authMode: 'service' | 'session' | 'host', createRouter })` does this for
|
|
141
|
+
you; `host` selects no gateway auth peer (host-injected `CallerAuthPort`).
|
|
142
|
+
|
|
143
|
+
**Topology guard.** Every leaf, loader and compose entry first runs the guard: more
|
|
144
|
+
than one evaluated cluster-mesh copy, or an llm-mesh resolved from cluster-mesh that
|
|
145
|
+
differs from the gateway's, makes the import throw `ClusterMeshTopologyError`
|
|
146
|
+
(`code: 'cluster_mesh_topology_invalid'`, message naming the conflicting paths).
|
|
147
|
+
Copies are keyed by module URL without `?query`/`#hash`: a copy loaded from another
|
|
148
|
+
path (nested install, `npm link`, a `--preserve-symlinks` link path) is a duplicate,
|
|
149
|
+
while re-evaluating the same file (Vite dev/HMR, `vi.resetModules`, cache-busting
|
|
150
|
+
query imports in test runners) replaces its entry and is not reported. Call
|
|
151
|
+
`verifyClusterMeshTopology({ require })` from the root at startup for an earlier,
|
|
152
|
+
explicit check that also enforces the accepted ranges. Guard state lives on
|
|
153
|
+
`globalThis`, so it is per thread (each `worker_threads` worker checks its own
|
|
154
|
+
copies); cross-process consistency stays with install/qualification gates. Limits:
|
|
155
|
+
under `--preserve-symlinks`, two llm-mesh instances sharing one realpath are not
|
|
156
|
+
detectable without importing both; and the automatic guard also refuses an
|
|
157
|
+
llm-mesh-only consumer when a stray gateway with a private llm-mesh copy is installed
|
|
158
|
+
next to it (remove that gateway copy or align its llm-mesh).
|
|
159
|
+
|
|
160
|
+
**Consumer rules.** Every manifest that declares cluster-mesh and imports a leaf
|
|
161
|
+
also declares that leaf's selected peers at the qualified versions; the installed
|
|
162
|
+
tree must hold exactly one cluster-mesh and one llm-mesh shared with the gateway.
|
|
163
|
+
0.12.0 is qualified with **npm only** (flat project installs, `npm ci` from a lockfile,
|
|
164
|
+
and a global consumer beside a separately installed runtime); other package managers
|
|
165
|
+
are not qualified. The tested bundler is esbuild with `@sentropic/cluster-mesh` **and**
|
|
166
|
+
`@sentropic/cluster-mesh/*` (and the peer packages) externalized, which keeps the
|
|
167
|
+
resolution anchor at the installed package; bundling the root inline (as the API
|
|
168
|
+
build does) embeds no provider code. TypeScript >= 5.7 is required with
|
|
169
|
+
`skipLibCheck: false` (hono's declarations); with `skipLibCheck: true`, a missing
|
|
170
|
+
peer surfaces as TS2305 on the named import. Frozen tuple (committed lockfile):
|
|
171
|
+
cluster-mesh 0.12.0, llm-mesh 0.21.2, llm-gateway 0.18.0, mcp-auth 0.2.1,
|
|
172
|
+
oauth-verify 0.1.0, jose 5.10.0, hono 4.10.7; session mode with auth-hono 0.15.0
|
|
173
|
+
(llm-gateway 0.18.0's published peer range `^0.15.0`); the latest versions inside
|
|
174
|
+
every declared range are re-qualified on each release run.
|
|
175
|
+
|
|
13
176
|
## Available in v1
|
|
14
177
|
|
|
15
178
|
- A directory containing the local server and its attached workstations.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import '../modules/topology-guard.js';
|
|
2
|
+
import type { ClusterMeshHonoNamespaceModule } from '../hono/plugin.js';
|
|
3
|
+
/** Unmounted namespace for intentionally disabled preparation (existing 404 behavior). */
|
|
4
|
+
export declare function disabledNamespaceModule(namespace: '/llm-mesh' | '/gw'): ClusterMeshHonoNamespaceModule;
|
|
5
|
+
//# sourceMappingURL=disabled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disabled.d.ts","sourceRoot":"","sources":["../../src/compose/disabled.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAExE,0FAA0F;AAC1F,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,WAAW,GAAG,KAAK,GAAG,8BAA8B,CAQtG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '../modules/topology-guard.js';
|
|
2
|
+
/** Unmounted namespace for intentionally disabled preparation (existing 404 behavior). */
|
|
3
|
+
export function disabledNamespaceModule(namespace) {
|
|
4
|
+
return {
|
|
5
|
+
namespace,
|
|
6
|
+
enabled: false,
|
|
7
|
+
createRouter() {
|
|
8
|
+
throw new Error(`Cluster Mesh namespace ${namespace} is disabled`);
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=disabled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disabled.js","sourceRoot":"","sources":["../../src/compose/disabled.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,0FAA0F;AAC1F,MAAM,UAAU,uBAAuB,CAAC,SAA8B;IACpE,OAAO;QACL,SAAS;QACT,OAAO,EAAE,KAAK;QACd,YAAY;YACV,MAAM,IAAI,KAAK,CAAC,0BAA0B,SAAS,cAAc,CAAC,CAAC;QACrE,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import '../modules/topology-guard.js';
|
|
2
|
+
import type { VerifiedInvocationContextPort } from '@sentropic/contracts';
|
|
3
|
+
import type { InvocationReceiptPort } from '@sentropic/events';
|
|
4
|
+
import type { Hono } from 'hono';
|
|
5
|
+
import type { ClusterMeshHonoNamespaceModule } from '../hono/plugin.js';
|
|
6
|
+
import type { ClusterMeshModules } from '../modules/contracts.js';
|
|
7
|
+
/**
|
|
8
|
+
* `service` selects `@sentropic/llm-gateway/auth` (mcp-auth + jose peers), `session`
|
|
9
|
+
* selects `@sentropic/llm-gateway/auth-hono` (auth-hono peer), and `host` means the
|
|
10
|
+
* host injects its own `CallerAuthPort` and selects no gateway auth peer.
|
|
11
|
+
*/
|
|
12
|
+
export type GatewayAuthMode = 'service' | 'session' | 'host';
|
|
13
|
+
export interface GatewayRouterInput {
|
|
14
|
+
readonly gateway: typeof import('@sentropic/llm-gateway');
|
|
15
|
+
readonly serviceAuth?: typeof import('@sentropic/llm-gateway/auth');
|
|
16
|
+
readonly sessionAuth?: typeof import('@sentropic/llm-gateway/auth-hono');
|
|
17
|
+
readonly context: VerifiedInvocationContextPort;
|
|
18
|
+
readonly receipts: InvocationReceiptPort;
|
|
19
|
+
}
|
|
20
|
+
export interface GatewayNamespaceOptions {
|
|
21
|
+
readonly enabled: boolean;
|
|
22
|
+
readonly authMode: GatewayAuthMode;
|
|
23
|
+
/** Host router wiring, typically around the gateway's own `createGatewayRouter`. */
|
|
24
|
+
readonly createRouter: (input: GatewayRouterInput) => Hono;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Prepare the `/gw` namespace at composition startup. A selected auth mode is
|
|
28
|
+
* preflighted (its gateway-relative peer graph evaluated) before this resolves, so
|
|
29
|
+
* a missing or incompatible peer fails startup before any listener binds.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createGatewayNamespaceModule(modules: ClusterMeshModules, options: GatewayNamespaceOptions): Promise<ClusterMeshHonoNamespaceModule>;
|
|
32
|
+
//# sourceMappingURL=gateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../src/compose/gateway.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAMlE;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAE7D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,cAAc,wBAAwB,CAAC,CAAC;IAC1D,QAAQ,CAAC,WAAW,CAAC,EAAE,cAAc,6BAA6B,CAAC,CAAC;IACpE,QAAQ,CAAC,WAAW,CAAC,EAAE,cAAc,kCAAkC,CAAC,CAAC;IACzE,QAAQ,CAAC,OAAO,EAAE,6BAA6B,CAAC;IAChD,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;CAC1C;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,oFAAoF;IACpF,QAAQ,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC5D;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,8BAA8B,CAAC,CAgBzC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import '../modules/topology-guard.js';
|
|
2
|
+
import { loadGateway } from '../loaders/gateway/index.js';
|
|
3
|
+
import { loadGatewayAuth } from '../loaders/gateway/auth.js';
|
|
4
|
+
import { loadGatewayAuthHono } from '../loaders/gateway/auth-hono.js';
|
|
5
|
+
import { disabledNamespaceModule } from './disabled.js';
|
|
6
|
+
/**
|
|
7
|
+
* Prepare the `/gw` namespace at composition startup. A selected auth mode is
|
|
8
|
+
* preflighted (its gateway-relative peer graph evaluated) before this resolves, so
|
|
9
|
+
* a missing or incompatible peer fails startup before any listener binds.
|
|
10
|
+
*/
|
|
11
|
+
export async function createGatewayNamespaceModule(modules, options) {
|
|
12
|
+
if (!options.enabled)
|
|
13
|
+
return disabledNamespaceModule('/gw');
|
|
14
|
+
const gateway = await loadGateway(modules);
|
|
15
|
+
const serviceAuth = options.authMode === 'service' ? await loadGatewayAuth(modules) : undefined;
|
|
16
|
+
const sessionAuth = options.authMode === 'session' ? await loadGatewayAuthHono(modules) : undefined;
|
|
17
|
+
return {
|
|
18
|
+
namespace: '/gw',
|
|
19
|
+
enabled: true,
|
|
20
|
+
createRouter: ({ context, receipts }) => options.createRouter({
|
|
21
|
+
gateway,
|
|
22
|
+
...(serviceAuth ? { serviceAuth } : {}),
|
|
23
|
+
...(sessionAuth ? { sessionAuth } : {}),
|
|
24
|
+
context,
|
|
25
|
+
receipts,
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=gateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateway.js","sourceRoot":"","sources":["../../src/compose/gateway.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAMtC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAwBxD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,OAA2B,EAC3B,OAAgC;IAEhC,IAAI,CAAC,OAAO,CAAC,OAAO;QAAE,OAAO,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAC5D,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAChG,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACpG,OAAO;QACL,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;YAC5D,OAAO;YACP,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvC,OAAO;YACP,QAAQ;SACT,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import '../modules/topology-guard.js';
|
|
2
|
+
import type { VerifiedInvocationContextPort } from '@sentropic/contracts';
|
|
3
|
+
import type { InvocationReceiptPort } from '@sentropic/events';
|
|
4
|
+
import type { Hono } from 'hono';
|
|
5
|
+
import type { ClusterMeshHonoNamespaceModule } from '../hono/plugin.js';
|
|
6
|
+
import type { ClusterMeshModules } from '../modules/contracts.js';
|
|
7
|
+
export interface LlmMeshRouterInput {
|
|
8
|
+
readonly llmMesh: typeof import('@sentropic/llm-mesh');
|
|
9
|
+
readonly context: VerifiedInvocationContextPort;
|
|
10
|
+
readonly receipts: InvocationReceiptPort;
|
|
11
|
+
}
|
|
12
|
+
export interface LlmMeshNamespaceOptions {
|
|
13
|
+
readonly enabled: boolean;
|
|
14
|
+
/** Host-injected router factory (llm-mesh exports no router); never imported from application source. */
|
|
15
|
+
readonly createRouter: (input: LlmMeshRouterInput) => Hono;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Prepare the `/llm-mesh` namespace at composition startup. Disabled preparation
|
|
19
|
+
* resolves nothing; an enabled namespace whose provider is unavailable rejects
|
|
20
|
+
* before any listener binds. Mount the result with `createClusterMeshPlugin`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function createLlmMeshNamespaceModule(modules: ClusterMeshModules, options: LlmMeshNamespaceOptions): Promise<ClusterMeshHonoNamespaceModule>;
|
|
23
|
+
//# sourceMappingURL=llm-mesh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-mesh.d.ts","sourceRoot":"","sources":["../../src/compose/llm-mesh.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAIlE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,cAAc,qBAAqB,CAAC,CAAC;IACvD,QAAQ,CAAC,OAAO,EAAE,6BAA6B,CAAC;IAChD,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;CAC1C;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,yGAAyG;IACzG,QAAQ,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC5D;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,8BAA8B,CAAC,CAQzC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import '../modules/topology-guard.js';
|
|
2
|
+
import { loadLlmMesh } from '../loaders/llm-mesh/index.js';
|
|
3
|
+
import { disabledNamespaceModule } from './disabled.js';
|
|
4
|
+
/**
|
|
5
|
+
* Prepare the `/llm-mesh` namespace at composition startup. Disabled preparation
|
|
6
|
+
* resolves nothing; an enabled namespace whose provider is unavailable rejects
|
|
7
|
+
* before any listener binds. Mount the result with `createClusterMeshPlugin`.
|
|
8
|
+
*/
|
|
9
|
+
export async function createLlmMeshNamespaceModule(modules, options) {
|
|
10
|
+
if (!options.enabled)
|
|
11
|
+
return disabledNamespaceModule('/llm-mesh');
|
|
12
|
+
const llmMesh = await loadLlmMesh(modules);
|
|
13
|
+
return {
|
|
14
|
+
namespace: '/llm-mesh',
|
|
15
|
+
enabled: true,
|
|
16
|
+
createRouter: ({ context, receipts }) => options.createRouter({ llmMesh, context, receipts }),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=llm-mesh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-mesh.js","sourceRoot":"","sources":["../../src/compose/llm-mesh.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAMtC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAcxD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,OAA2B,EAC3B,OAAgC;IAEhC,IAAI,CAAC,OAAO,CAAC,OAAO;QAAE,OAAO,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAClE,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO;QACL,SAAS,EAAE,WAAW;QACtB,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;KAC9F,CAAC;AACJ,CAAC"}
|
package/dist/device.d.ts
CHANGED
|
@@ -20,9 +20,11 @@ export type DevicePollOutcome = {
|
|
|
20
20
|
};
|
|
21
21
|
/** Existing API device-code lifecycle binding; cowork/auth clients remain transport consumers. */
|
|
22
22
|
export interface LocalDeviceAttachmentPort {
|
|
23
|
+
readonly availability?: 'available' | 'gated';
|
|
23
24
|
issueDeviceCode(deviceName?: string | null): IssuedDeviceCode;
|
|
24
25
|
pollDeviceCode(deviceCode: string): DevicePollOutcome;
|
|
25
26
|
approveDeviceCode(userCode: string, userId: string, role: string, deviceName?: string | null): DeviceApprovalResult;
|
|
27
|
+
denyDeviceCode?(userCode: string): DeviceApprovalResult;
|
|
26
28
|
}
|
|
27
29
|
export interface DeviceDomain extends LocalDeviceAttachmentPort {
|
|
28
30
|
}
|
package/dist/device.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CAC1B;AAED,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAA;CAAE,GACrB;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,kBAAkB,CAAA;CAAE,CAAC;AAE1F,MAAM,MAAM,iBAAiB,GACzB;IAAE,QAAQ,CAAC,MAAM,EAAE,uBAAuB,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;CAAE,GACjF;IACE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEN,kGAAkG;AAClG,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAC9C,eAAe,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB,CAAC;IAC9D,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,CAAC;IACtD,iBAAiB,CACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GACzB,oBAAoB,CAAC;IACxB,cAAc,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB,CAAC;CACzD;AAED,MAAM,WAAW,YAAa,SAAQ,yBAAyB;CAAG;AAElE,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,yBAAyB,GAAG,YAAY,CAwBrF"}
|
package/dist/device.js
CHANGED
|
@@ -1,14 +1,29 @@
|
|
|
1
|
+
import { CapabilityGatedError } from './errors.js';
|
|
1
2
|
export function createLocalDeviceDomain(port) {
|
|
3
|
+
function requireAvailable() {
|
|
4
|
+
if (port.availability === 'gated')
|
|
5
|
+
throw new CapabilityGatedError('local_devices');
|
|
6
|
+
}
|
|
2
7
|
return {
|
|
8
|
+
get availability() { return port.availability ?? 'available'; },
|
|
3
9
|
issueDeviceCode(deviceName) {
|
|
10
|
+
requireAvailable();
|
|
4
11
|
return port.issueDeviceCode(deviceName);
|
|
5
12
|
},
|
|
6
13
|
pollDeviceCode(deviceCode) {
|
|
14
|
+
requireAvailable();
|
|
7
15
|
return port.pollDeviceCode(deviceCode);
|
|
8
16
|
},
|
|
9
17
|
approveDeviceCode(userCode, userId, role, deviceName) {
|
|
18
|
+
requireAvailable();
|
|
10
19
|
return port.approveDeviceCode(userCode, userId, role, deviceName);
|
|
11
20
|
},
|
|
21
|
+
denyDeviceCode(userCode) {
|
|
22
|
+
requireAvailable();
|
|
23
|
+
if (!port.denyDeviceCode)
|
|
24
|
+
throw new CapabilityGatedError('device_denial');
|
|
25
|
+
return port.denyDeviceCode(userCode);
|
|
26
|
+
},
|
|
12
27
|
};
|
|
13
28
|
}
|
|
14
29
|
//# sourceMappingURL=device.js.map
|
package/dist/device.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.js","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"device.js","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAsCnD,MAAM,UAAU,uBAAuB,CAAC,IAA+B;IACrE,SAAS,gBAAgB;QACvB,IAAI,IAAI,CAAC,YAAY,KAAK,OAAO;YAAE,MAAM,IAAI,oBAAoB,CAAC,eAAe,CAAC,CAAC;IACrF,CAAC;IACD,OAAO;QACL,IAAI,YAAY,KAAK,OAAO,IAAI,CAAC,YAAY,IAAI,WAAW,CAAC,CAAC,CAAC;QAC/D,eAAe,CAAC,UAAU;YACxB,gBAAgB,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAC1C,CAAC;QACD,cAAc,CAAC,UAAU;YACvB,gBAAgB,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACzC,CAAC;QACD,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU;YAClD,gBAAgB,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QACpE,CAAC;QACD,cAAc,CAAC,QAAQ;YACrB,gBAAgB,EAAE,CAAC;YACnB,IAAI,CAAC,IAAI,CAAC,cAAc;gBAAE,MAAM,IAAI,oBAAoB,CAAC,eAAe,CAAC,CAAC;YAC1E,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type GatedCapability = 'inter_server_discovery' | 'inter_server_revocation' | 'rfc8693_token_exchange' | 'remote_projection' | 'memory_replication';
|
|
1
|
+
export type GatedCapability = 'local_devices' | 'local_projection' | 'device_denial' | 'inter_server_discovery' | 'inter_server_revocation' | 'rfc8693_token_exchange' | 'remote_projection' | 'memory_replication';
|
|
2
2
|
/** A federal API seam that is intentionally unavailable in the v1 degenerate runtime. */
|
|
3
3
|
export declare class CapabilityGatedError extends Error {
|
|
4
4
|
readonly capability: GatedCapability;
|
|
@@ -14,4 +14,9 @@ export declare class InvalidProjectionReferenceError extends Error {
|
|
|
14
14
|
readonly code = "invalid_projection_reference";
|
|
15
15
|
constructor();
|
|
16
16
|
}
|
|
17
|
+
export declare class InvalidNhiArgumentError extends Error {
|
|
18
|
+
readonly argument: 'instance' | 'role' | 'scope';
|
|
19
|
+
readonly code = "invalid_nhi_argument";
|
|
20
|
+
constructor(argument: 'instance' | 'role' | 'scope');
|
|
21
|
+
}
|
|
17
22
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,wBAAwB,GACxB,yBAAyB,GACzB,wBAAwB,GACxB,mBAAmB,GACnB,oBAAoB,CAAC;AAEzB,yFAAyF;AACzF,qBAAa,oBAAqB,SAAQ,KAAK;aAGjB,UAAU,EAAE,eAAe;IAFvD,QAAQ,CAAC,IAAI,sBAAsB;gBAEP,UAAU,EAAE,eAAe;CAIxD;AAED,6EAA6E;AAC7E,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,gCAAgC;;CAM9C;AAED,qBAAa,+BAAgC,SAAQ,KAAK;IACxD,QAAQ,CAAC,IAAI,kCAAkC;;CAMhD"}
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,wBAAwB,GACxB,yBAAyB,GACzB,wBAAwB,GACxB,mBAAmB,GACnB,oBAAoB,CAAC;AAEzB,yFAAyF;AACzF,qBAAa,oBAAqB,SAAQ,KAAK;aAGjB,UAAU,EAAE,eAAe;IAFvD,QAAQ,CAAC,IAAI,sBAAsB;gBAEP,UAAU,EAAE,eAAe;CAIxD;AAED,6EAA6E;AAC7E,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,gCAAgC;;CAM9C;AAED,qBAAa,+BAAgC,SAAQ,KAAK;IACxD,QAAQ,CAAC,IAAI,kCAAkC;;CAMhD;AAED,qBAAa,uBAAwB,SAAQ,KAAK;aAGpB,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO;IAFnE,QAAQ,CAAC,IAAI,0BAA0B;gBAEX,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO;CAIpE"}
|
package/dist/errors.js
CHANGED
|
@@ -23,4 +23,13 @@ export class InvalidProjectionReferenceError extends Error {
|
|
|
23
23
|
this.name = 'InvalidProjectionReferenceError';
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
export class InvalidNhiArgumentError extends Error {
|
|
27
|
+
argument;
|
|
28
|
+
code = 'invalid_nhi_argument';
|
|
29
|
+
constructor(argument) {
|
|
30
|
+
super(`NHI ${argument} must be nonempty and must not start with '-'`);
|
|
31
|
+
this.argument = argument;
|
|
32
|
+
this.name = 'InvalidNhiArgumentError';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
26
35
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAUA,yFAAyF;AACzF,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAGjB;IAFnB,IAAI,GAAG,kBAAkB,CAAC;IAEnC,YAA4B,UAA2B;QACrD,KAAK,CAAC,qCAAqC,UAAU,EAAE,CAAC,CAAC;QAD/B,eAAU,GAAV,UAAU,CAAiB;QAErD,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,6EAA6E;AAC7E,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IACnC,IAAI,GAAG,4BAA4B,CAAC;IAE7C;QACE,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED,MAAM,OAAO,+BAAgC,SAAQ,KAAK;IAC/C,IAAI,GAAG,8BAA8B,CAAC;IAE/C;QACE,KAAK,CAAC,4CAA4C,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC;IAChD,CAAC;CACF;AAED,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IAGpB;IAFnB,IAAI,GAAG,sBAAsB,CAAC;IAEvC,YAA4B,QAAuC;QACjE,KAAK,CAAC,OAAO,QAAQ,+CAA+C,CAAC,CAAC;QAD5C,aAAQ,GAAR,QAAQ,CAA+B;QAEjE,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACxC,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './persistence/ports.js';
|
|
|
18
18
|
export * from './runtime/admission.js';
|
|
19
19
|
export * from './runtime/bounded-local-custody-source.js';
|
|
20
20
|
export * from './runtime/custody-invocation-verifier.js';
|
|
21
|
+
export { verifyCustodySignature } from './runtime/custody-crypto.js';
|
|
21
22
|
export * from './runtime/custody-types.js';
|
|
22
23
|
export * from './runtime/custody-state.js';
|
|
23
24
|
export * from './runtime/custody-wire.js';
|
|
@@ -28,4 +29,8 @@ export * from './runtime/receipts.js';
|
|
|
28
29
|
export * from './runtime/registration.js';
|
|
29
30
|
export * from './runtime/session-cutover.js';
|
|
30
31
|
export * from './messaging/index.js';
|
|
32
|
+
export * from './modules/errors.js';
|
|
33
|
+
export * from './modules/contracts.js';
|
|
34
|
+
export { createClusterMeshModules } from './modules/registry.js';
|
|
35
|
+
export { CLUSTER_MESH_TOPOLOGY_INVALID, ClusterMeshTopologyError, isClusterMeshTopologyError, verifyClusterMeshTopology, type ClusterMeshTopologyReason, type ClusterMeshTopologyReport, type TopologyPackage, type VerifyClusterMeshTopologyOptions, } from './modules/topology.js';
|
|
31
36
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,gCAAgC,GACtC,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export * from './persistence/ports.js';
|
|
|
18
18
|
export * from './runtime/admission.js';
|
|
19
19
|
export * from './runtime/bounded-local-custody-source.js';
|
|
20
20
|
export * from './runtime/custody-invocation-verifier.js';
|
|
21
|
+
export { verifyCustodySignature } from './runtime/custody-crypto.js';
|
|
21
22
|
export * from './runtime/custody-types.js';
|
|
22
23
|
export * from './runtime/custody-state.js';
|
|
23
24
|
export * from './runtime/custody-wire.js';
|
|
@@ -28,4 +29,8 @@ export * from './runtime/receipts.js';
|
|
|
28
29
|
export * from './runtime/registration.js';
|
|
29
30
|
export * from './runtime/session-cutover.js';
|
|
30
31
|
export * from './messaging/index.js';
|
|
32
|
+
export * from './modules/errors.js';
|
|
33
|
+
export * from './modules/contracts.js';
|
|
34
|
+
export { createClusterMeshModules } from './modules/registry.js';
|
|
35
|
+
export { CLUSTER_MESH_TOPOLOGY_INVALID, ClusterMeshTopologyError, isClusterMeshTopologyError, verifyClusterMeshTopology, } from './modules/topology.js';
|
|
31
36
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,GAK1B,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-hono.d.ts","sourceRoot":"","sources":["../../../src/integrations/gateway/auth-hono.ts"],"names":[],"mappings":"AACA,OAAO,iCAAiC,CAAC;AACzC,cAAc,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-hono.js","sourceRoot":"","sources":["../../../src/integrations/gateway/auth-hono.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,iCAAiC,CAAC;AACzC,cAAc,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/integrations/gateway/auth.ts"],"names":[],"mappings":"AACA,OAAO,iCAAiC,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/integrations/gateway/auth.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,iCAAiC,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/gateway/index.ts"],"names":[],"mappings":"AACA,OAAO,iCAAiC,CAAC;AACzC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/gateway/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,iCAAiC,CAAC;AACzC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enrollment.d.ts","sourceRoot":"","sources":["../../../src/integrations/llm-mesh/enrollment.ts"],"names":[],"mappings":"AACA,OAAO,iCAAiC,CAAC;AACzC,cAAc,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enrollment.js","sourceRoot":"","sources":["../../../src/integrations/llm-mesh/enrollment.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,iCAAiC,CAAC;AACzC,cAAc,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["../../../src/integrations/llm-mesh/facade.ts"],"names":[],"mappings":"AACA,OAAO,iCAAiC,CAAC;AACzC,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facade.js","sourceRoot":"","sources":["../../../src/integrations/llm-mesh/facade.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,iCAAiC,CAAC;AACzC,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/llm-mesh/index.ts"],"names":[],"mappings":"AACA,OAAO,iCAAiC,CAAC;AACzC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/llm-mesh/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,iCAAiC,CAAC;AACzC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/integrations/llm-mesh/node.ts"],"names":[],"mappings":"AACA,OAAO,iCAAiC,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
|