@sentropic/cluster-mesh 0.23.5 → 0.25.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 +5 -0
- package/assets/storage/engram-memory/C6-FREEZE.md +63 -0
- package/assets/storage/engram-memory/contract-manifest.json +6 -4
- package/assets/storage/engram-memory/equivalence.json +1 -1
- package/assets/storage/engram-memory/neutral-asset-inventory.json +53 -0
- package/assets/storage/engram-memory/neutral-equivalence.json +44 -0
- package/assets/storage/postgres/007-consumed-counters.sql +17 -0
- package/assets/storage/postgres/008-instance-ownership.sql +35 -0
- package/assets/storage/postgres/engram-memory/001-projections.sql +14 -0
- package/assets/storage/postgres/engram-memory/002-host-ledger.sql +14 -0
- package/assets/storage/postgres/engram-memory/manifest.json +29 -0
- package/assets/storage/postgres/manifest.json +26 -0
- package/contracts/engram-memory-neutral-contract-v1.d.ts +367 -0
- package/dist/comments/postgres.d.ts +1 -0
- package/dist/comments/postgres.d.ts.map +1 -1
- package/dist/engram-memory/binding.d.ts +115 -0
- package/dist/engram-memory/binding.d.ts.map +1 -0
- package/dist/engram-memory/binding.js +239 -0
- package/dist/engram-memory/binding.js.map +1 -0
- package/dist/engram-memory/commit-result-recovery.d.ts +12 -0
- package/dist/engram-memory/commit-result-recovery.d.ts.map +1 -0
- package/dist/engram-memory/commit-result-recovery.js +14 -0
- package/dist/engram-memory/commit-result-recovery.js.map +1 -0
- package/dist/engram-memory/contract.d.ts +7 -1
- package/dist/engram-memory/contract.d.ts.map +1 -1
- package/dist/engram-memory/contract.js +7 -1
- package/dist/engram-memory/contract.js.map +1 -1
- package/dist/engram-memory/host-maintenance.d.ts +40 -0
- package/dist/engram-memory/host-maintenance.d.ts.map +1 -0
- package/dist/engram-memory/host-maintenance.js +44 -0
- package/dist/engram-memory/host-maintenance.js.map +1 -0
- package/dist/engram-memory/ledger.d.ts +75 -0
- package/dist/engram-memory/ledger.d.ts.map +1 -0
- package/dist/engram-memory/ledger.js +286 -0
- package/dist/engram-memory/ledger.js.map +1 -0
- package/dist/engram-memory/manifest.d.ts +1 -1
- package/dist/engram-memory/manifest.d.ts.map +1 -1
- package/dist/engram-memory/manifest.js +2 -1
- package/dist/engram-memory/manifest.js.map +1 -1
- package/dist/engram-memory/neutral-contract.d.ts +368 -0
- package/dist/engram-memory/neutral-contract.d.ts.map +1 -0
- package/dist/engram-memory/neutral-contract.js +39 -0
- package/dist/engram-memory/neutral-contract.js.map +1 -0
- package/dist/engram-memory/neutral-handle.d.ts +62 -0
- package/dist/engram-memory/neutral-handle.d.ts.map +1 -0
- package/dist/engram-memory/neutral-handle.js +131 -0
- package/dist/engram-memory/neutral-handle.js.map +1 -0
- package/dist/engram-memory/postgres-queries.d.ts +1 -1
- package/dist/engram-memory/postgres-queries.d.ts.map +1 -1
- package/dist/engram-memory/postgres-queries.js +111 -21
- package/dist/engram-memory/postgres-queries.js.map +1 -1
- package/dist/engram-memory/postgres.d.ts +51 -10
- package/dist/engram-memory/postgres.d.ts.map +1 -1
- package/dist/engram-memory/postgres.js +118 -17
- package/dist/engram-memory/postgres.js.map +1 -1
- package/dist/engram-memory/projection.d.ts +12 -0
- package/dist/engram-memory/projection.d.ts.map +1 -0
- package/dist/engram-memory/projection.js +123 -0
- package/dist/engram-memory/projection.js.map +1 -0
- package/dist/engram-memory/wire-adaptation.d.ts +61 -0
- package/dist/engram-memory/wire-adaptation.d.ts.map +1 -0
- package/dist/engram-memory/wire-adaptation.js +239 -0
- package/dist/engram-memory/wire-adaptation.js.map +1 -0
- package/dist/identity-contracts/access.d.ts +54 -0
- package/dist/identity-contracts/access.d.ts.map +1 -0
- package/dist/identity-contracts/access.js +168 -0
- package/dist/identity-contracts/access.js.map +1 -0
- package/dist/identity-contracts/accounts.d.ts +44 -0
- package/dist/identity-contracts/accounts.d.ts.map +1 -0
- package/dist/identity-contracts/accounts.js +149 -0
- package/dist/identity-contracts/accounts.js.map +1 -0
- package/dist/identity-contracts/descriptors.d.ts +12 -0
- package/dist/identity-contracts/descriptors.d.ts.map +1 -0
- package/dist/identity-contracts/descriptors.js +57 -0
- package/dist/identity-contracts/descriptors.js.map +1 -0
- package/dist/identity-contracts/doubles.d.ts +115 -0
- package/dist/identity-contracts/doubles.d.ts.map +1 -0
- package/dist/identity-contracts/doubles.js +340 -0
- package/dist/identity-contracts/doubles.js.map +1 -0
- package/dist/identity-contracts/enforcement.d.ts +27 -0
- package/dist/identity-contracts/enforcement.d.ts.map +1 -0
- package/dist/identity-contracts/enforcement.js +155 -0
- package/dist/identity-contracts/enforcement.js.map +1 -0
- package/dist/identity-contracts/errors.d.ts +71 -0
- package/dist/identity-contracts/errors.d.ts.map +1 -0
- package/dist/identity-contracts/errors.js +129 -0
- package/dist/identity-contracts/errors.js.map +1 -0
- package/dist/identity-contracts/index.d.ts +12 -0
- package/dist/identity-contracts/index.d.ts.map +1 -0
- package/dist/identity-contracts/index.js +13 -0
- package/dist/identity-contracts/index.js.map +1 -0
- package/dist/identity-contracts/ports.d.ts +116 -0
- package/dist/identity-contracts/ports.d.ts.map +1 -0
- package/dist/identity-contracts/ports.js +7 -0
- package/dist/identity-contracts/ports.js.map +1 -0
- package/dist/identity-contracts/resolution.d.ts +56 -0
- package/dist/identity-contracts/resolution.d.ts.map +1 -0
- package/dist/identity-contracts/resolution.js +87 -0
- package/dist/identity-contracts/resolution.js.map +1 -0
- package/dist/identity-contracts/tenancy.d.ts +52 -0
- package/dist/identity-contracts/tenancy.d.ts.map +1 -0
- package/dist/identity-contracts/tenancy.js +171 -0
- package/dist/identity-contracts/tenancy.js.map +1 -0
- package/dist/identity-contracts/types.d.ts +253 -0
- package/dist/identity-contracts/types.d.ts.map +1 -0
- package/dist/identity-contracts/types.js +7 -0
- package/dist/identity-contracts/types.js.map +1 -0
- package/dist/identity-contracts/workspaces.d.ts +37 -0
- package/dist/identity-contracts/workspaces.d.ts.map +1 -0
- package/dist/identity-contracts/workspaces.js +118 -0
- package/dist/identity-contracts/workspaces.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/mcp/memory-compose.d.ts +11 -0
- package/dist/integrations/mcp/memory-compose.d.ts.map +1 -0
- package/dist/integrations/mcp/memory-compose.js +79 -0
- package/dist/integrations/mcp/memory-compose.js.map +1 -0
- package/dist/integrations/mcp/memory-definition.d.ts +28 -0
- package/dist/integrations/mcp/memory-definition.d.ts.map +1 -0
- package/dist/integrations/mcp/memory-definition.js +2 -0
- package/dist/integrations/mcp/memory-definition.js.map +1 -0
- package/dist/integrations/mcp/memory-manifest.d.ts +4 -0
- package/dist/integrations/mcp/memory-manifest.d.ts.map +1 -0
- package/dist/integrations/mcp/memory-manifest.js +9 -0
- package/dist/integrations/mcp/memory-manifest.js.map +1 -0
- package/dist/integrations/mcp/memory-transport.d.ts +21 -0
- package/dist/integrations/mcp/memory-transport.d.ts.map +1 -0
- package/dist/integrations/mcp/memory-transport.js +47 -0
- package/dist/integrations/mcp/memory-transport.js.map +1 -0
- package/dist/integrations/mcp/memory.d.ts +19 -0
- package/dist/integrations/mcp/memory.d.ts.map +1 -0
- package/dist/integrations/mcp/memory.js +40 -0
- package/dist/integrations/mcp/memory.js.map +1 -0
- package/dist/loaders/mcp/index.d.ts +1 -0
- package/dist/loaders/mcp/index.d.ts.map +1 -1
- package/dist/loaders/mcp/index.js +1 -0
- package/dist/loaders/mcp/index.js.map +1 -1
- package/dist/loaders/mcp/memory.d.ts +6 -0
- package/dist/loaders/mcp/memory.d.ts.map +1 -0
- package/dist/loaders/mcp/memory.js +9 -0
- package/dist/loaders/mcp/memory.js.map +1 -0
- package/dist/modules/catalog.d.ts +2 -0
- package/dist/modules/catalog.d.ts.map +1 -1
- package/dist/modules/catalog.js +15 -1
- package/dist/modules/catalog.js.map +1 -1
- package/dist/modules/contracts.d.ts +1 -1
- package/dist/modules/contracts.d.ts.map +1 -1
- package/dist/modules/contracts.js +2 -0
- package/dist/modules/contracts.js.map +1 -1
- package/dist/storage/atomic.d.ts +66 -1
- package/dist/storage/atomic.d.ts.map +1 -1
- package/dist/storage/atomic.js +173 -1
- package/dist/storage/atomic.js.map +1 -1
- package/dist/storage/backend.d.ts +3 -0
- package/dist/storage/backend.d.ts.map +1 -1
- package/dist/storage/backend.js +8 -0
- package/dist/storage/backend.js.map +1 -1
- package/dist/storage/contracts.d.ts +13 -0
- package/dist/storage/contracts.d.ts.map +1 -1
- package/dist/storage/contracts.js +12 -0
- package/dist/storage/contracts.js.map +1 -1
- package/dist/storage/instance-ownership.d.ts.map +1 -1
- package/dist/storage/instance-ownership.js +25 -7
- package/dist/storage/instance-ownership.js.map +1 -1
- package/dist/storage/postgres/codec.d.ts +1 -0
- package/dist/storage/postgres/codec.d.ts.map +1 -1
- package/dist/storage/postgres/codec.js +19 -0
- package/dist/storage/postgres/codec.js.map +1 -1
- package/dist/storage/postgres/commit-results.d.ts +6 -0
- package/dist/storage/postgres/commit-results.d.ts.map +1 -0
- package/dist/storage/postgres/commit-results.js +28 -0
- package/dist/storage/postgres/commit-results.js.map +1 -0
- package/dist/storage/postgres/core.d.ts +3 -1
- package/dist/storage/postgres/core.d.ts.map +1 -1
- package/dist/storage/postgres/core.js +99 -36
- package/dist/storage/postgres/core.js.map +1 -1
- package/dist/storage/postgres/effects.d.ts +1 -1
- package/dist/storage/postgres/effects.d.ts.map +1 -1
- package/dist/storage/postgres/effects.js +31 -6
- package/dist/storage/postgres/effects.js.map +1 -1
- package/dist/storage/postgres/errors.d.ts.map +1 -1
- package/dist/storage/postgres/errors.js +13 -0
- package/dist/storage/postgres/errors.js.map +1 -1
- package/dist/storage/postgres/index.d.ts +1 -0
- package/dist/storage/postgres/index.d.ts.map +1 -1
- package/dist/storage/postgres/index.js +1 -0
- package/dist/storage/postgres/index.js.map +1 -1
- package/dist/storage/postgres/instance-guard.d.ts +48 -0
- package/dist/storage/postgres/instance-guard.d.ts.map +1 -0
- package/dist/storage/postgres/instance-guard.js +147 -0
- package/dist/storage/postgres/instance-guard.js.map +1 -0
- package/dist/storage/postgres/instance-ownership.d.ts +22 -0
- package/dist/storage/postgres/instance-ownership.d.ts.map +1 -0
- package/dist/storage/postgres/instance-ownership.js +165 -0
- package/dist/storage/postgres/instance-ownership.js.map +1 -0
- package/dist/storage/postgres/journal.d.ts +24 -8
- package/dist/storage/postgres/journal.d.ts.map +1 -1
- package/dist/storage/postgres/journal.js +43 -32
- package/dist/storage/postgres/journal.js.map +1 -1
- package/dist/storage/postgres/migrations.d.ts +2 -1
- package/dist/storage/postgres/migrations.d.ts.map +1 -1
- package/dist/storage/postgres/migrations.js +14 -4
- package/dist/storage/postgres/migrations.js.map +1 -1
- package/dist/storage/postgres/ordinary-transactions.d.ts.map +1 -1
- package/dist/storage/postgres/ordinary-transactions.js +3 -2
- package/dist/storage/postgres/ordinary-transactions.js.map +1 -1
- package/dist/storage/postgres/profiles.d.ts +15 -8
- package/dist/storage/postgres/profiles.d.ts.map +1 -1
- package/dist/storage/postgres/protocol.d.ts +14 -0
- package/dist/storage/postgres/protocol.d.ts.map +1 -1
- package/dist/storage/postgres/protocol.js.map +1 -1
- package/dist/storage/postgres/queries.js +5 -5
- package/dist/storage/postgres/queries.js.map +1 -1
- package/dist/storage/postgres/readers.js +2 -2
- package/dist/storage/postgres/readers.js.map +1 -1
- package/dist/storage/postgres/roots.d.ts.map +1 -1
- package/dist/storage/postgres/roots.js +10 -6
- package/dist/storage/postgres/roots.js.map +1 -1
- package/dist/storage/postgres/scope.d.ts +17 -8
- package/dist/storage/postgres/scope.d.ts.map +1 -1
- package/dist/storage/postgres/scope.js +4 -0
- package/dist/storage/postgres/scope.js.map +1 -1
- package/dist/storage/postgres/snapshots.d.ts +2 -2
- package/dist/storage/postgres/snapshots.d.ts.map +1 -1
- package/dist/storage/postgres/snapshots.js +7 -4
- package/dist/storage/postgres/snapshots.js.map +1 -1
- package/dist/storage/postgres/transactions.d.ts +11 -0
- package/dist/storage/postgres/transactions.d.ts.map +1 -1
- package/dist/storage/postgres/transactions.js +21 -0
- package/dist/storage/postgres/transactions.js.map +1 -1
- package/dist/storage/u64.d.ts +18 -0
- package/dist/storage/u64.d.ts.map +1 -0
- package/dist/storage/u64.js +54 -0
- package/dist/storage/u64.js.map +1 -0
- package/docs/memory-mcp-candidate.md +46 -0
- package/docs/memory-mcp.md +98 -0
- package/examples/memory-mcp-stdio.mjs +42 -0
- package/package.json +12 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Memory MCP builtin
|
|
2
|
+
|
|
3
|
+
`@sentropic/cluster-mesh/mcp/memory` exports `createEngramMemoryBuiltin`
|
|
4
|
+
and `registerEngramMemoryTools`. The builtin follows the artifacts registry
|
|
5
|
+
path: static catalog, explicit selection, qualified optional peer acquisition,
|
|
6
|
+
then an in-process producer. Cataloging never opens a store. A missing,
|
|
7
|
+
partial or incompatible engram peer refuses compilation before storage opens.
|
|
8
|
+
|
|
9
|
+
This draft qualifies the published `@sentropic/engram` 0.22.0 (npm integrity
|
|
10
|
+
`sha512-888akd0XH+ODAEU65QMLvAZLDfdgwiLlx4EiiFFy3Go+cWhLm22z48HKq2NardQ32rJm5bOIhqlwKLTnjcO+1w==`).
|
|
11
|
+
The published peer shares the private provenance instance across its public entries;
|
|
12
|
+
see [published peer qualification](memory-mcp-candidate.md). A peer that splits
|
|
13
|
+
that instance is refused before storage opens.
|
|
14
|
+
|
|
15
|
+
The host supplies an `EngramMemoryDefinitionOptions` through `definition`.
|
|
16
|
+
It contains persisted host/tenant opt-ins, an opened PostgreSQL kernel,
|
|
17
|
+
its host binding and driver, the scope resolver/store identity, deadline,
|
|
18
|
+
clock, engine dependencies, provider ports, and configuration provenance.
|
|
19
|
+
This builtin is PostgreSQL-only for memory milestone 1; SQLite is milestone 2.
|
|
20
|
+
The builtin opens the canonical adapter through
|
|
21
|
+
`createMemoryNeutralHandle`, then gives the engine and read facets the same
|
|
22
|
+
dependency set and store. No unfenced exemption is accepted.
|
|
23
|
+
|
|
24
|
+
The nine bindings map directly to the producer contract:
|
|
25
|
+
|
|
26
|
+
| Binding | Definition source |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| invocation | `hostBindings.invocation`; transport `resolveContext` |
|
|
29
|
+
| authorization | `dependencies.authorization`; provider read/write authentication and authorization |
|
|
30
|
+
| domainPolicy | `dependencies.admission_policy`; `provider.writeHost.policy` |
|
|
31
|
+
| engine | composed engine/read facets over the canonical store and acquired fence |
|
|
32
|
+
| mutationRecovery | `provider.writeHost.reservation` |
|
|
33
|
+
| confirmation | `provider.writeHost.confirm`; enrolled `sent-tech.ca` host attestation |
|
|
34
|
+
| audit | `provider.writeHost.audit` |
|
|
35
|
+
| pagination | `provider.readHost.pages` and continuation authorization |
|
|
36
|
+
| lifecycle | clock/deadline, key custody and coverage ports |
|
|
37
|
+
|
|
38
|
+
The host owns migrations, grant registration and pool lifecycle. Grants must
|
|
39
|
+
be registered before selected compilation. All fields in the verified A03
|
|
40
|
+
invocation binding come from the host attachment, including the authoritative
|
|
41
|
+
tenant, workspace, client, logical session, purpose and envelope references.
|
|
42
|
+
Tool arguments cannot select a tenant or authorize confirmation. The host
|
|
43
|
+
supplies the immutable plan consumed by the producer's compiled dispatch.
|
|
44
|
+
|
|
45
|
+
`builtin.runtime()?.close()` belongs to the host-pool teardown, never to
|
|
46
|
+
per-attachment teardown: the host calls it while closing its own pool. Close
|
|
47
|
+
shuts the canonical store and releases kernel ownership; the host stops serving
|
|
48
|
+
the runtime MCP server around the same teardown. Attachments never close the
|
|
49
|
+
runtime.
|
|
50
|
+
|
|
51
|
+
Register native wire tools only after successful registry compilation.
|
|
52
|
+
`registerEngramMemoryTools` checks the compiled tool identities and input
|
|
53
|
+
schemas, uses qualified platform bridge/schema loaders, and preserves the
|
|
54
|
+
producer's schemas, annotations, metadata, text and structured receipts.
|
|
55
|
+
The builtin manifest advertises SDK-compatible object roots for input and
|
|
56
|
+
output schemas, retaining every producer constraint (including `oneOf`).
|
|
57
|
+
The adapter keeps the original producer manifest and validation. Hosts
|
|
58
|
+
compute their reviewed compatibility digest with
|
|
59
|
+
`computeManifestDigest(createEngramMemoryWireManifest(MEMORY_PROVIDER_MANIFEST))`;
|
|
60
|
+
`createEngramMemoryWireManifest` is a pure export of the memory entry point
|
|
61
|
+
and does not load Engram or open storage. Generic registry consumers can
|
|
62
|
+
serve the builtin manifest directly without replacing its schemas.
|
|
63
|
+
Attach the resulting SDK server to the host's stdio or HTTP transport.
|
|
64
|
+
The host resolver must verify HTTP authentication or establish stdio identity
|
|
65
|
+
out of band. An h2a host must merge the runtime's descriptors and adapter
|
|
66
|
+
dispatch into its single tool registry before its SDK handler registration.
|
|
67
|
+
The stdio example owns a fresh server. This library does not alter an agent's
|
|
68
|
+
h2a installation or opt-ins.
|
|
69
|
+
|
|
70
|
+
The shipped stdio example loads a trusted host module exporting
|
|
71
|
+
`async createHost({modules})`. It returns `{definition, transport,
|
|
72
|
+
compatibility, close}`. `transport` is an `EngramMemoryTransportDefinition`;
|
|
73
|
+
`compatibility` contains the reviewed wire manifest digest keyed by
|
|
74
|
+
`sentropic.engram.memory`. `close` closes host-owned resources after the
|
|
75
|
+
builtin store and MCP server have closed.
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
node node_modules/@sentropic/cluster-mesh/examples/memory-mcp-stdio.mjs --definition /absolute/path/to/host-definition.mjs
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Configure that command as the agent's MCP server command. The host module is
|
|
82
|
+
required: this draft ships no permissive identity, retention, confirmation,
|
|
83
|
+
custody or database defaults. Pending capture is not admission. Read
|
|
84
|
+
`outcome.status` after admission; tombstoning is not physical purge.
|
|
85
|
+
|
|
86
|
+
Qualification: `make memory-mcp-qualify ENV=test-memory-mcp` provisions real
|
|
87
|
+
PostgreSQL under the shared Docker flock, runs the six positive transport
|
|
88
|
+
and lifecycle cases plus six static/refusal cases, and starts the shipped
|
|
89
|
+
launcher in a separate process. The MCP SDK client discovers all six tools,
|
|
90
|
+
captures pending material, verifies it is absent from search, admits and
|
|
91
|
+
reads it, forgets it, verifies it is absent again, and withdraws a second
|
|
92
|
+
pending candidate. The command and structured tool receipts are retained in
|
|
93
|
+
`tmp/memory-mcp-receipts/tools.log`. The target shuts down the isolated stack.
|
|
94
|
+
|
|
95
|
+
The launcher qualification compiles the explicit test host in
|
|
96
|
+
`tests/engram-memory/mcp-launcher-host.ts` beside the same emitted library
|
|
97
|
+
modules. Its fixture identity, clock, policy and custody are test authorities;
|
|
98
|
+
they are outside the published file set and are not production host defaults.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// The host module supplies verified identity, policies, custody and PostgreSQL.
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { pathToFileURL } from 'node:url';
|
|
4
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
5
|
+
import { createClusterMeshModules } from '@sentropic/cluster-mesh';
|
|
6
|
+
import { createMcpRegistry } from '@sentropic/cluster-mesh/mcp/registry';
|
|
7
|
+
import { createEngramMemoryBuiltin, registerEngramMemoryTools } from '@sentropic/cluster-mesh/mcp/memory';
|
|
8
|
+
import { loadMcpPlatformStdio } from '@sentropic/cluster-mesh/loaders/mcp';
|
|
9
|
+
|
|
10
|
+
const args = process.argv.slice(2);
|
|
11
|
+
if (args.length !== 2 || args[0] !== '--definition') {
|
|
12
|
+
throw new Error('Usage: node memory-mcp-stdio.mjs --definition /absolute/host-definition.mjs');
|
|
13
|
+
}
|
|
14
|
+
let host, builtin, server;
|
|
15
|
+
let closing;
|
|
16
|
+
const close = () => closing ??= (async () => {
|
|
17
|
+
try { await server?.close(); }
|
|
18
|
+
finally { try { await builtin?.runtime()?.close(); } finally { await host?.close(); } }
|
|
19
|
+
})();
|
|
20
|
+
try {
|
|
21
|
+
const modules = createClusterMeshModules();
|
|
22
|
+
host = await (await import(pathToFileURL(resolve(args[1])).href)).createHost({ modules });
|
|
23
|
+
builtin = createEngramMemoryBuiltin({ modules, definition: host.definition });
|
|
24
|
+
const registry = createMcpRegistry({ modules, builtins: [builtin] });
|
|
25
|
+
registry.select(['sentropic.engram.memory']);
|
|
26
|
+
registry.configure('sentropic.engram.memory', {
|
|
27
|
+
mode: 'embedded-local', hostBindingRef: host.definition.hostBindings.hostBindingRef,
|
|
28
|
+
});
|
|
29
|
+
const compiled = await registry.compile({ bindings: {}, compatibility: host.compatibility });
|
|
30
|
+
if (!compiled.ok) throw new Error('Memory MCP compilation refused');
|
|
31
|
+
server = new Server({ name: 'sentropic-memory-host', version: '1.0.0' }, { capabilities: { tools: {} } });
|
|
32
|
+
await registerEngramMemoryTools(server, { modules, registry: compiled.registry, builtin, definition: host.transport });
|
|
33
|
+
const stdio = await loadMcpPlatformStdio(modules);
|
|
34
|
+
process.once('SIGINT', () => { void close(); });
|
|
35
|
+
process.once('SIGTERM', () => { void close(); });
|
|
36
|
+
process.stdin.once('end', () => { void close(); });
|
|
37
|
+
await server.connect(stdio.createStdioTransport());
|
|
38
|
+
} catch {
|
|
39
|
+
await close();
|
|
40
|
+
process.stderr.write('Memory MCP host startup failed\n');
|
|
41
|
+
process.exitCode = 1;
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentropic/cluster-mesh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Injectable Cluster Mesh control-plane contracts, namespace modules, and single-instance runtime.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -172,6 +172,10 @@
|
|
|
172
172
|
"types": "./dist/integrations/mcp/artifacts.d.ts",
|
|
173
173
|
"import": "./dist/integrations/mcp/artifacts.js"
|
|
174
174
|
},
|
|
175
|
+
"./mcp/memory": {
|
|
176
|
+
"types": "./dist/integrations/mcp/memory.d.ts",
|
|
177
|
+
"import": "./dist/integrations/mcp/memory.js"
|
|
178
|
+
},
|
|
175
179
|
"./loaders/mcp": {
|
|
176
180
|
"types": "./dist/loaders/mcp/index.d.ts",
|
|
177
181
|
"import": "./dist/loaders/mcp/index.js"
|
|
@@ -179,6 +183,10 @@
|
|
|
179
183
|
},
|
|
180
184
|
"files": [
|
|
181
185
|
"dist",
|
|
186
|
+
"examples/memory-mcp-stdio.mjs",
|
|
187
|
+
"docs/memory-mcp.md",
|
|
188
|
+
"docs/memory-mcp-candidate.md",
|
|
189
|
+
"contracts",
|
|
182
190
|
"assets/storage",
|
|
183
191
|
"README.md",
|
|
184
192
|
"LICENSE"
|
|
@@ -209,6 +217,7 @@
|
|
|
209
217
|
"hono": "^4.10.7"
|
|
210
218
|
},
|
|
211
219
|
"peerDependencies": {
|
|
220
|
+
"@sentropic/engram": ">=0.22.0 <0.23.0",
|
|
212
221
|
"@sentropic/comments": "^0.3.0",
|
|
213
222
|
"@sentropic/llm-mesh": "0.19.2 || >=0.22.0 <0.33.0",
|
|
214
223
|
"@sentropic/llm-gateway": ">=0.19.0 <0.23.0",
|
|
@@ -219,6 +228,7 @@
|
|
|
219
228
|
"jose": "^5.10.0"
|
|
220
229
|
},
|
|
221
230
|
"peerDependenciesMeta": {
|
|
231
|
+
"@sentropic/engram": { "optional": true },
|
|
222
232
|
"@sentropic/comments": { "optional": true },
|
|
223
233
|
"@sentropic/llm-mesh": { "optional": true },
|
|
224
234
|
"@sentropic/llm-gateway": { "optional": true },
|
|
@@ -229,7 +239,7 @@
|
|
|
229
239
|
"jose": { "optional": true }
|
|
230
240
|
},
|
|
231
241
|
"devDependencies": {
|
|
232
|
-
"@sentropic/engram": "0.
|
|
242
|
+
"@sentropic/engram": "0.22.0",
|
|
233
243
|
"@types/node": "^22.10.10",
|
|
234
244
|
"typescript": "5.4.5"
|
|
235
245
|
}
|