@sentropic/cluster-mesh 0.15.0 → 0.18.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 +53 -14
- package/dist/compose/mcp.d.ts +87 -0
- package/dist/compose/mcp.d.ts.map +1 -0
- package/dist/compose/mcp.js +186 -0
- package/dist/compose/mcp.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/mcp/artifacts.d.ts +19 -0
- package/dist/integrations/mcp/artifacts.d.ts.map +1 -0
- package/dist/integrations/mcp/artifacts.js +26 -0
- package/dist/integrations/mcp/artifacts.js.map +1 -0
- package/dist/loaders/mcp/artifacts.d.ts +9 -0
- package/dist/loaders/mcp/artifacts.d.ts.map +1 -0
- package/dist/loaders/mcp/artifacts.js +10 -0
- package/dist/loaders/mcp/artifacts.js.map +1 -0
- package/dist/loaders/mcp/bridge.d.ts +8 -0
- package/dist/loaders/mcp/bridge.d.ts.map +1 -0
- package/dist/loaders/mcp/bridge.js +9 -0
- package/dist/loaders/mcp/bridge.js.map +1 -0
- package/dist/loaders/mcp/entry.d.ts +8 -0
- package/dist/loaders/mcp/entry.d.ts.map +1 -0
- package/dist/loaders/mcp/entry.js +9 -0
- package/dist/loaders/mcp/entry.js.map +1 -0
- package/dist/loaders/mcp/hono.d.ts +8 -0
- package/dist/loaders/mcp/hono.d.ts.map +1 -0
- package/dist/loaders/mcp/hono.js +9 -0
- package/dist/loaders/mcp/hono.js.map +1 -0
- package/dist/loaders/mcp/index.d.ts +7 -0
- package/dist/loaders/mcp/index.d.ts.map +1 -0
- package/dist/loaders/mcp/index.js +7 -0
- package/dist/loaders/mcp/index.js.map +1 -0
- package/dist/loaders/mcp/registry.d.ts +8 -0
- package/dist/loaders/mcp/registry.d.ts.map +1 -0
- package/dist/loaders/mcp/registry.js +9 -0
- package/dist/loaders/mcp/registry.js.map +1 -0
- package/dist/loaders/mcp/stdio.d.ts +8 -0
- package/dist/loaders/mcp/stdio.d.ts.map +1 -0
- package/dist/loaders/mcp/stdio.js +9 -0
- package/dist/loaders/mcp/stdio.js.map +1 -0
- package/dist/mcp/registry.d.ts +38 -0
- package/dist/mcp/registry.d.ts.map +1 -0
- package/dist/mcp/registry.js +171 -0
- package/dist/mcp/registry.js.map +1 -0
- package/dist/mcp/stdio.d.ts +37 -0
- package/dist/mcp/stdio.d.ts.map +1 -0
- package/dist/mcp/stdio.js +47 -0
- package/dist/mcp/stdio.js.map +1 -0
- package/dist/mesh.d.ts +9 -1
- package/dist/mesh.d.ts.map +1 -1
- package/dist/mesh.js +4 -2
- package/dist/mesh.js.map +1 -1
- package/dist/modules/catalog.d.ts +11 -4
- package/dist/modules/catalog.d.ts.map +1 -1
- package/dist/modules/catalog.js +28 -4
- 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 +6 -0
- package/dist/modules/contracts.js.map +1 -1
- package/dist/modules/topology-guard-mcp.d.ts +2 -0
- package/dist/modules/topology-guard-mcp.d.ts.map +1 -0
- package/dist/modules/topology-guard-mcp.js +7 -0
- package/dist/modules/topology-guard-mcp.js.map +1 -0
- package/dist/token-exchange.d.ts +176 -0
- package/dist/token-exchange.d.ts.map +1 -0
- package/dist/token-exchange.js +377 -0
- package/dist/token-exchange.js.map +1 -0
- package/dist/trust/token-exchange-http.d.ts +93 -0
- package/dist/trust/token-exchange-http.d.ts.map +1 -0
- package/dist/trust/token-exchange-http.js +364 -0
- package/dist/trust/token-exchange-http.js.map +1 -0
- package/dist/trust.d.ts +2 -7
- package/dist/trust.d.ts.map +1 -1
- package/dist/trust.js.map +1 -1
- package/package.json +30 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../../modules/topology-guard-mcp.js';
|
|
2
|
+
/**
|
|
3
|
+
* Acquire the mcp-platform hono mount through the registry.
|
|
4
|
+
* Rejects with `ClusterMeshModuleUnavailableError` (recognize by `code`).
|
|
5
|
+
*/
|
|
6
|
+
export async function loadMcpPlatformHono(modules) {
|
|
7
|
+
return (await modules.load('mcp-platform/hono'));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=hono.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hono.js","sourceRoot":"","sources":["../../../src/loaders/mcp/hono.ts"],"names":[],"mappings":"AAAA,OAAO,qCAAqC,CAAC;AAG7C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,OAA2B;IAE3B,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAkD,CAAC;AACpG,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { loadMcpPlatformBridge } from './bridge.js';
|
|
2
|
+
export { loadMcpPlatformEntry } from './entry.js';
|
|
3
|
+
export { loadMcpPlatformHono } from './hono.js';
|
|
4
|
+
export { loadMcpPlatformRegistry } from './registry.js';
|
|
5
|
+
export { loadMcpPlatformStdio } from './stdio.js';
|
|
6
|
+
export { loadArtifactsMcp } from './artifacts.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/loaders/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { loadMcpPlatformBridge } from './bridge.js';
|
|
2
|
+
export { loadMcpPlatformEntry } from './entry.js';
|
|
3
|
+
export { loadMcpPlatformHono } from './hono.js';
|
|
4
|
+
export { loadMcpPlatformRegistry } from './registry.js';
|
|
5
|
+
export { loadMcpPlatformStdio } from './stdio.js';
|
|
6
|
+
export { loadArtifactsMcp } from './artifacts.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/loaders/mcp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import '../../modules/topology-guard-mcp.js';
|
|
2
|
+
import type { ClusterMeshModules } from '../../modules/contracts.js';
|
|
3
|
+
/**
|
|
4
|
+
* Acquire the mcp-platform registry kernel through the registry.
|
|
5
|
+
* Rejects with `ClusterMeshModuleUnavailableError` (recognize by `code`).
|
|
6
|
+
*/
|
|
7
|
+
export declare function loadMcpPlatformRegistry(modules: ClusterMeshModules): Promise<typeof import('@sentropic/mcp-platform/registry')>;
|
|
8
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/loaders/mcp/registry.ts"],"names":[],"mappings":"AAAA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,cAAc,kCAAkC,CAAC,CAAC,CAE5D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../../modules/topology-guard-mcp.js';
|
|
2
|
+
/**
|
|
3
|
+
* Acquire the mcp-platform registry kernel through the registry.
|
|
4
|
+
* Rejects with `ClusterMeshModuleUnavailableError` (recognize by `code`).
|
|
5
|
+
*/
|
|
6
|
+
export async function loadMcpPlatformRegistry(modules) {
|
|
7
|
+
return (await modules.load('mcp-platform/registry'));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/loaders/mcp/registry.ts"],"names":[],"mappings":"AAAA,OAAO,qCAAqC,CAAC;AAG7C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAA2B;IAE3B,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAsD,CAAC;AAC5G,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import '../../modules/topology-guard-mcp.js';
|
|
2
|
+
import type { ClusterMeshModules } from '../../modules/contracts.js';
|
|
3
|
+
/**
|
|
4
|
+
* Acquire the mcp-platform stdio transport leaf through the registry.
|
|
5
|
+
* Rejects with `ClusterMeshModuleUnavailableError` (recognize by `code`).
|
|
6
|
+
*/
|
|
7
|
+
export declare function loadMcpPlatformStdio(modules: ClusterMeshModules): Promise<typeof import('@sentropic/mcp-platform/transport/stdio')>;
|
|
8
|
+
//# sourceMappingURL=stdio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../../src/loaders/mcp/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,cAAc,yCAAyC,CAAC,CAAC,CAEnE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../../modules/topology-guard-mcp.js';
|
|
2
|
+
/**
|
|
3
|
+
* Acquire the mcp-platform stdio transport leaf through the registry.
|
|
4
|
+
* Rejects with `ClusterMeshModuleUnavailableError` (recognize by `code`).
|
|
5
|
+
*/
|
|
6
|
+
export async function loadMcpPlatformStdio(modules) {
|
|
7
|
+
return (await modules.load('mcp-platform/stdio'));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=stdio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../../src/loaders/mcp/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,qCAAqC,CAAC;AAG7C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAA2B;IAE3B,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAA6D,CAAC;AAChH,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lot 7 — mesh facade over the one platform kernel
|
|
3
|
+
* (`@sentropic/cluster-mesh/mcp/registry`, spec-v8 §3).
|
|
4
|
+
*
|
|
5
|
+
* Application entry point for registration, selection, parameterization and
|
|
6
|
+
* compilation. The facade owns its synchronous state (definitions, selection,
|
|
7
|
+
* configurations) and delegates to the platform kernel — acquired through
|
|
8
|
+
* the module registry, never an eager import — only at `compile` time.
|
|
9
|
+
* Mesh-supplied builtins are static descriptors plus loaders (e.g. the
|
|
10
|
+
* `sentropic.artifacts` builtin): unknown providers fail explicitly, never
|
|
11
|
+
* as silent stubs. Selected builtins materialize at compile; loader
|
|
12
|
+
* failures refuse atomically.
|
|
13
|
+
*/
|
|
14
|
+
import '../modules/topology-guard-mcp.js';
|
|
15
|
+
import type { ClusterMeshModules } from '../modules/contracts.js';
|
|
16
|
+
import type { CompiledMcpRegistry, CompileRegistryInput, CompileRegistryResult, ProviderCatalogEntry, ProviderParameterSchema, RegistryDefinition } from '@sentropic/mcp-platform/registry';
|
|
17
|
+
/** Static mesh-supplied builtin: metadata descriptor plus a loader (no dynamic code). */
|
|
18
|
+
export interface McpRegistryBuiltin {
|
|
19
|
+
readonly providerId: string;
|
|
20
|
+
readonly version: string;
|
|
21
|
+
readonly capabilities: readonly string[];
|
|
22
|
+
readonly parameterSchema: ProviderParameterSchema;
|
|
23
|
+
load(): Promise<RegistryDefinition>;
|
|
24
|
+
}
|
|
25
|
+
export interface McpRegistryInput {
|
|
26
|
+
readonly modules: ClusterMeshModules;
|
|
27
|
+
readonly builtins?: readonly McpRegistryBuiltin[];
|
|
28
|
+
}
|
|
29
|
+
export interface McpRegistryFacade {
|
|
30
|
+
register(definition: RegistryDefinition): void;
|
|
31
|
+
select(providerIds: string[]): void;
|
|
32
|
+
configure(providerId: string, values: Record<string, unknown>): void;
|
|
33
|
+
catalog(): ProviderCatalogEntry[];
|
|
34
|
+
compile(input: CompileRegistryInput): Promise<CompileRegistryResult>;
|
|
35
|
+
compiled(): CompiledMcpRegistry | undefined;
|
|
36
|
+
}
|
|
37
|
+
export declare function createMcpRegistry(options: McpRegistryInput): McpRegistryFacade;
|
|
38
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/mcp/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAG1C,yFAAyF;AACzF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,eAAe,EAAE,uBAAuB,CAAC;IAClD,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC/C,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACpC,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACrE,OAAO,IAAI,oBAAoB,EAAE,CAAC;IAClC,OAAO,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACrE,QAAQ,IAAI,mBAAmB,GAAG,SAAS,CAAC;CAC7C;AAaD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,GAAG,iBAAiB,CAqJ9E"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lot 7 — mesh facade over the one platform kernel
|
|
3
|
+
* (`@sentropic/cluster-mesh/mcp/registry`, spec-v8 §3).
|
|
4
|
+
*
|
|
5
|
+
* Application entry point for registration, selection, parameterization and
|
|
6
|
+
* compilation. The facade owns its synchronous state (definitions, selection,
|
|
7
|
+
* configurations) and delegates to the platform kernel — acquired through
|
|
8
|
+
* the module registry, never an eager import — only at `compile` time.
|
|
9
|
+
* Mesh-supplied builtins are static descriptors plus loaders (e.g. the
|
|
10
|
+
* `sentropic.artifacts` builtin): unknown providers fail explicitly, never
|
|
11
|
+
* as silent stubs. Selected builtins materialize at compile; loader
|
|
12
|
+
* failures refuse atomically.
|
|
13
|
+
*/
|
|
14
|
+
import '../modules/topology-guard-mcp.js';
|
|
15
|
+
import { loadMcpPlatformRegistry } from '../loaders/mcp/registry.js';
|
|
16
|
+
function isRecord(value) {
|
|
17
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
18
|
+
}
|
|
19
|
+
function fail(path, message) {
|
|
20
|
+
const diagnostics = [
|
|
21
|
+
{ code: 'facade_refusal', path, message },
|
|
22
|
+
];
|
|
23
|
+
return { ok: false, diagnostics };
|
|
24
|
+
}
|
|
25
|
+
export function createMcpRegistry(options) {
|
|
26
|
+
const registryModules = options.modules;
|
|
27
|
+
const builtins = new Map();
|
|
28
|
+
for (const builtin of options.builtins ?? []) {
|
|
29
|
+
if (builtins.has(builtin.providerId)) {
|
|
30
|
+
throw new Error(`duplicate builtin provider: ${builtin.providerId}`);
|
|
31
|
+
}
|
|
32
|
+
builtins.set(builtin.providerId, builtin);
|
|
33
|
+
}
|
|
34
|
+
const local = new Map();
|
|
35
|
+
let selection = [];
|
|
36
|
+
const configurations = new Map();
|
|
37
|
+
let current;
|
|
38
|
+
const knownIds = () => new Set([...builtins.keys(), ...local.keys()]);
|
|
39
|
+
const mutate = () => {
|
|
40
|
+
current = undefined;
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
register(definition) {
|
|
44
|
+
const providerId = isRecord(definition) && isRecord(definition.manifest)
|
|
45
|
+
? definition.manifest['providerId']
|
|
46
|
+
: undefined;
|
|
47
|
+
if (typeof providerId !== 'string' || providerId.length === 0) {
|
|
48
|
+
throw new Error('register requires a definition with a non-empty manifest providerId');
|
|
49
|
+
}
|
|
50
|
+
if (knownIds().has(providerId)) {
|
|
51
|
+
throw new Error(`duplicate provider registration: ${providerId}`);
|
|
52
|
+
}
|
|
53
|
+
local.set(providerId, definition);
|
|
54
|
+
mutate();
|
|
55
|
+
},
|
|
56
|
+
select(providerIds) {
|
|
57
|
+
const known = knownIds();
|
|
58
|
+
const seen = new Set();
|
|
59
|
+
for (const id of providerIds) {
|
|
60
|
+
if (!known.has(id))
|
|
61
|
+
throw new Error(`unknown provider selection: ${id}`);
|
|
62
|
+
if (seen.has(id))
|
|
63
|
+
throw new Error(`duplicate provider selection: ${id}`);
|
|
64
|
+
seen.add(id);
|
|
65
|
+
}
|
|
66
|
+
selection = [...providerIds];
|
|
67
|
+
mutate();
|
|
68
|
+
},
|
|
69
|
+
configure(providerId, values) {
|
|
70
|
+
if (!local.has(providerId) && !builtins.has(providerId)) {
|
|
71
|
+
throw new Error(`unknown provider configuration: ${providerId}`);
|
|
72
|
+
}
|
|
73
|
+
if (!selection.includes(providerId)) {
|
|
74
|
+
throw new Error(`unselected provider configuration: ${providerId}`);
|
|
75
|
+
}
|
|
76
|
+
if (!isRecord(values))
|
|
77
|
+
throw new Error('configure requires a values object');
|
|
78
|
+
configurations.set(providerId, values);
|
|
79
|
+
mutate();
|
|
80
|
+
},
|
|
81
|
+
catalog() {
|
|
82
|
+
const entries = [];
|
|
83
|
+
for (const builtin of builtins.values()) {
|
|
84
|
+
entries.push({
|
|
85
|
+
providerId: builtin.providerId,
|
|
86
|
+
version: builtin.version,
|
|
87
|
+
capabilities: [...builtin.capabilities],
|
|
88
|
+
parameterSchema: builtin.parameterSchema,
|
|
89
|
+
availability: !selection.includes(builtin.providerId)
|
|
90
|
+
? 'not-selected'
|
|
91
|
+
: configurations.has(builtin.providerId) || Object.keys(builtin.parameterSchema.properties).length === 0
|
|
92
|
+
? current?.providers.has(builtin.providerId) ? 'available' : 'not-configured'
|
|
93
|
+
: 'not-configured',
|
|
94
|
+
diagnostics: [],
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
for (const [providerId, definition] of local) {
|
|
98
|
+
const manifest = definition.manifest;
|
|
99
|
+
entries.push({
|
|
100
|
+
providerId,
|
|
101
|
+
version: manifest.version,
|
|
102
|
+
capabilities: manifest.tools.map((tool) => tool.name),
|
|
103
|
+
parameterSchema: definition.parameterSchema,
|
|
104
|
+
availability: !selection.includes(providerId)
|
|
105
|
+
? 'not-selected'
|
|
106
|
+
: current?.providers.has(providerId)
|
|
107
|
+
? 'available'
|
|
108
|
+
: 'not-configured',
|
|
109
|
+
diagnostics: [],
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return entries;
|
|
113
|
+
},
|
|
114
|
+
async compile(request) {
|
|
115
|
+
// The kernel is acquired here — never eagerly — on a fresh instance per
|
|
116
|
+
// compile, so a refusal publishes nothing and keeps `current` intact.
|
|
117
|
+
const kernelModule = await loadMcpPlatformRegistry(registryModules);
|
|
118
|
+
const kernel = kernelModule.createProviderRegistry();
|
|
119
|
+
for (const [providerId, definition] of local) {
|
|
120
|
+
try {
|
|
121
|
+
kernel.register(definition);
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
return fail(`providers["${providerId}"]`, error instanceof Error ? error.message : String(error));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
for (const providerId of selection) {
|
|
128
|
+
const builtin = builtins.get(providerId);
|
|
129
|
+
if (builtin === undefined || local.has(providerId))
|
|
130
|
+
continue;
|
|
131
|
+
let loaded;
|
|
132
|
+
try {
|
|
133
|
+
loaded = await builtin.load();
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
return fail(`providers["${providerId}"].loader`, `builtin loader failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
137
|
+
}
|
|
138
|
+
try {
|
|
139
|
+
kernel.register(loaded);
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
return fail(`providers["${providerId}"]`, error instanceof Error ? error.message : String(error));
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
kernel.select(selection);
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
return fail('selection', error instanceof Error ? error.message : String(error));
|
|
150
|
+
}
|
|
151
|
+
for (const [providerId, values] of configurations) {
|
|
152
|
+
if (!selection.includes(providerId))
|
|
153
|
+
continue;
|
|
154
|
+
try {
|
|
155
|
+
kernel.configure(providerId, values);
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
return fail(`configure["${providerId}"]`, error instanceof Error ? error.message : String(error));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const result = kernel.compile(request);
|
|
162
|
+
if (result.ok)
|
|
163
|
+
current = result.registry;
|
|
164
|
+
return result;
|
|
165
|
+
},
|
|
166
|
+
compiled() {
|
|
167
|
+
return current;
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/mcp/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,kCAAkC,CAAC;AAE1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAkCrE,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,IAAI,CAAC,IAAY,EAAE,OAAe;IACzC,MAAM,WAAW,GAAkC;QACjD,EAAE,IAAI,EAAE,gBAAyB,EAAE,IAAI,EAAE,OAAO,EAAE;KACnD,CAAC;IACF,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAyB;IACzD,MAAM,eAAe,GAAG,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,QAAQ,CAAC;YACzC,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,QAAQ;YACN,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/**
|
|
3
|
+
* Lot 7 — typed optional stdio leaf for the same compiled plan
|
|
4
|
+
* (`@sentropic/cluster-mesh/mcp/stdio`, spec-v8 §3).
|
|
5
|
+
*
|
|
6
|
+
* Same bridge, same kernel validation, same identity-chained guard as the
|
|
7
|
+
* composed `/mcp` namespace; only the transport differs (SDK stdio).
|
|
8
|
+
* stdio identity comes from the environment once at startup — there is no
|
|
9
|
+
* bearer on stdio and no separate business registry or authority.
|
|
10
|
+
*/
|
|
11
|
+
import '../modules/topology-guard-mcp.js';
|
|
12
|
+
import type { Readable, Writable } from 'node:stream';
|
|
13
|
+
import type { ClusterMeshModules } from '../modules/contracts.js';
|
|
14
|
+
import { type McpInvocationGuard } from '../compose/mcp.js';
|
|
15
|
+
import type { CompiledMcpRegistry } from '@sentropic/mcp-platform/registry';
|
|
16
|
+
import type { BridgeRunner, BridgeTool, RequestIdentity } from '@sentropic/mcp-platform/transport/bridge';
|
|
17
|
+
import type { McpPrincipal } from '@sentropic/mcp-platform/hono';
|
|
18
|
+
export interface McpStdioLeafOptions {
|
|
19
|
+
registry: CompiledMcpRegistry;
|
|
20
|
+
tools: readonly BridgeTool[];
|
|
21
|
+
runner: BridgeRunner;
|
|
22
|
+
contextResolver(identity: RequestIdentity | undefined): McpPrincipal | Promise<McpPrincipal>;
|
|
23
|
+
invocation: McpInvocationGuard;
|
|
24
|
+
env?: Record<string, string | undefined>;
|
|
25
|
+
stdin?: Readable;
|
|
26
|
+
stdout?: Writable;
|
|
27
|
+
}
|
|
28
|
+
export interface McpStdioLeaf {
|
|
29
|
+
start(): Promise<void>;
|
|
30
|
+
close(): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Prepare the stdio leaf. Missing/incompatible platform leaves and bridge
|
|
34
|
+
* tools outside the compiled plan fail startup before any I/O binds.
|
|
35
|
+
*/
|
|
36
|
+
export declare function createMcpStdioLeaf(modules: ClusterMeshModules, options: McpStdioLeafOptions): Promise<McpStdioLeaf>;
|
|
37
|
+
//# sourceMappingURL=stdio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/mcp/stdio.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AACH,OAAO,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAA6C,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EAChB,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,MAAM,EAAE,YAAY,CAAC;IACrB,eAAe,CACb,QAAQ,EAAE,eAAe,GAAG,SAAS,GACpC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACxC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,CAgCvB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lot 7 — typed optional stdio leaf for the same compiled plan
|
|
3
|
+
* (`@sentropic/cluster-mesh/mcp/stdio`, spec-v8 §3).
|
|
4
|
+
*
|
|
5
|
+
* Same bridge, same kernel validation, same identity-chained guard as the
|
|
6
|
+
* composed `/mcp` namespace; only the transport differs (SDK stdio).
|
|
7
|
+
* stdio identity comes from the environment once at startup — there is no
|
|
8
|
+
* bearer on stdio and no separate business registry or authority.
|
|
9
|
+
*/
|
|
10
|
+
import '../modules/topology-guard-mcp.js';
|
|
11
|
+
import { Server as SdkServer } from '@modelcontextprotocol/sdk/server/index.js';
|
|
12
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
13
|
+
import { createGuardedRunner, createRegistryPolicy } from '../compose/mcp.js';
|
|
14
|
+
import { loadMcpPlatformBridge } from '../loaders/mcp/bridge.js';
|
|
15
|
+
import { loadMcpPlatformStdio } from '../loaders/mcp/stdio.js';
|
|
16
|
+
/**
|
|
17
|
+
* Prepare the stdio leaf. Missing/incompatible platform leaves and bridge
|
|
18
|
+
* tools outside the compiled plan fail startup before any I/O binds.
|
|
19
|
+
*/
|
|
20
|
+
export async function createMcpStdioLeaf(modules, options) {
|
|
21
|
+
const [bridge, stdio] = await Promise.all([
|
|
22
|
+
loadMcpPlatformBridge(modules),
|
|
23
|
+
loadMcpPlatformStdio(modules),
|
|
24
|
+
]);
|
|
25
|
+
for (const tool of options.tools) {
|
|
26
|
+
if (options.registry.resolveTool(tool.name) === undefined) {
|
|
27
|
+
throw new Error(`Bridge tool '${tool.name}' is not in the compiled plan`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const identity = stdio.extractStdioRequestIdentity(options.env ?? process.env);
|
|
31
|
+
const guardedRunner = createGuardedRunner({ ...options, policy: createRegistryPolicy(options.registry) });
|
|
32
|
+
const server = new SdkServer({ name: '@sentropic/cluster-mesh/mcp', version: '0.18.0' }, { capabilities: { tools: {} } });
|
|
33
|
+
bridge.registerBridgeTools(server, options.tools, {
|
|
34
|
+
run: (tool, args) => guardedRunner.run(tool, args, identity),
|
|
35
|
+
});
|
|
36
|
+
const transport = new StdioServerTransport(options.stdin ?? process.stdin, options.stdout ?? process.stdout);
|
|
37
|
+
return {
|
|
38
|
+
start: async () => {
|
|
39
|
+
await server.connect(transport);
|
|
40
|
+
},
|
|
41
|
+
close: async () => {
|
|
42
|
+
await transport.close();
|
|
43
|
+
await server.close();
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=stdio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../src/mcp/stdio.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,kCAAkC,CAAC;AAE1C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAA2B,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AA2B/D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAA2B,EAC3B,OAA4B;IAE5B,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACxC,q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E,KAAK,IAAI,EAAE;YAChB,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;YACxB,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/mesh.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { type MemoryReplicationPort } from './memory.js';
|
|
|
4
4
|
import { type ClusterNodeDescriptor, type LocalWorkstationDirectoryPort, type MembershipDomain } from './membership.js';
|
|
5
5
|
import { type CommandRunnerPort, type NhiLifecyclePort } from './nhi.js';
|
|
6
6
|
import { type LocalProjectionPort, type ProjectionDomain, type ProjectionKind } from './projection.js';
|
|
7
|
+
import { type TokenExchangeClientInput } from './token-exchange.js';
|
|
7
8
|
import { type TrustDomain } from './trust.js';
|
|
8
9
|
import type { ClusterMeshModules, ModuleCapabilityMap } from './modules/contracts.js';
|
|
9
10
|
export interface WrapDomain {
|
|
@@ -24,7 +25,8 @@ export interface ClusterMesh {
|
|
|
24
25
|
/** Effective kinds; optional for compatibility with older capability providers. */
|
|
25
26
|
readonly localProjectionKinds?: readonly ProjectionKind[];
|
|
26
27
|
readonly interServerDirectory: 'gated';
|
|
27
|
-
|
|
28
|
+
/** 'available' when a token-exchange issuer binding is configured, 'gated' otherwise. */
|
|
29
|
+
readonly tokenExchange: 'available' | 'gated';
|
|
28
30
|
readonly memoryReplication: 'gated';
|
|
29
31
|
/** Package availability snapshot; present only when a module registry is injected. */
|
|
30
32
|
readonly modules?: ModuleCapabilityMap;
|
|
@@ -40,5 +42,11 @@ export declare function createDegenerateClusterMesh(input: {
|
|
|
40
42
|
readonly nhi?: NhiLifecyclePort;
|
|
41
43
|
readonly devices: LocalDeviceAttachmentPort;
|
|
42
44
|
readonly modules?: ClusterMeshModules;
|
|
45
|
+
/**
|
|
46
|
+
* RFC 8693 exchange binding plus policy. The client is built eagerly: an invalid
|
|
47
|
+
* policy throws here, so `available` always follows a successful local preflight.
|
|
48
|
+
* Absent: the seam stays gated. Issuer reachability remains a runtime condition.
|
|
49
|
+
*/
|
|
50
|
+
readonly tokenExchange?: TokenExchangeClientInput;
|
|
43
51
|
}): ClusterMesh;
|
|
44
52
|
//# sourceMappingURL=mesh.d.ts.map
|
package/dist/mesh.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh.d.ts","sourceRoot":"","sources":["../src/mesh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,cAAc,EAAE,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1G,OAAO,EAA2B,KAAK,YAAY,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACzG,OAAO,EAAgC,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAyB,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAChG,OAAO,EAA+B,KAAK,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACpI,OAAO,EAA0B,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAEtF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC;IACvC,QAAQ,CAAC,GAAG,EAAE,gBAAgB,CAAC;IAC/B,QAAQ,CAAC,iBAAiB,EAAE,qBAAqB,CAAC;CACnD;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,OA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AAQ,CAAC,OAAO,EAAE,yBAAyB,CAAC;IAC5C,QAAQ,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IACtC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,wBAAwB,CAAC;CACnD,GAAG,WAAW,CA4Cd"}
|
package/dist/mesh.js
CHANGED
|
@@ -4,6 +4,7 @@ import { createGatedMemoryReplication } from './memory.js';
|
|
|
4
4
|
import { createSingleNodeMembership, } from './membership.js';
|
|
5
5
|
import { createH2aNhiLifecycle } from './nhi.js';
|
|
6
6
|
import { createLocalProjectionDomain } from './projection.js';
|
|
7
|
+
import { createTokenExchangeClient } from './token-exchange.js';
|
|
7
8
|
import { createGatedTrustDomain } from './trust.js';
|
|
8
9
|
/** @deprecated Removal locator: delete after its remaining callers cut over in Lots 4–32. */
|
|
9
10
|
export function createDegenerateClusterMesh(input) {
|
|
@@ -17,6 +18,7 @@ export function createDegenerateClusterMesh(input) {
|
|
|
17
18
|
const nhi = input.nhi ?? (input.nhiRunner ? createH2aNhiLifecycle(input.nhiRunner) : undefined);
|
|
18
19
|
if (!nhi)
|
|
19
20
|
throw new TypeError('nhi or nhiRunner is required');
|
|
21
|
+
const tokenExchangeClient = input.tokenExchange ? createTokenExchangeClient(input.tokenExchange) : undefined;
|
|
20
22
|
const boundaries = createBoundaryDomain({
|
|
21
23
|
homeNodeId: input.self.nodeId,
|
|
22
24
|
memberships: input.memberships,
|
|
@@ -31,7 +33,7 @@ export function createDegenerateClusterMesh(input) {
|
|
|
31
33
|
return [...(input.projections.supportedKinds ?? ['human_identity', 'agent_identity', 'memory_snapshot'])];
|
|
32
34
|
},
|
|
33
35
|
interServerDirectory: 'gated',
|
|
34
|
-
tokenExchange: 'gated',
|
|
36
|
+
get tokenExchange() { return tokenExchangeClient ? 'available' : 'gated'; },
|
|
35
37
|
memoryReplication: 'gated',
|
|
36
38
|
};
|
|
37
39
|
const modules = input.modules;
|
|
@@ -41,7 +43,7 @@ export function createDegenerateClusterMesh(input) {
|
|
|
41
43
|
}
|
|
42
44
|
return {
|
|
43
45
|
membership: createSingleNodeMembership({ ...input, boundaries }),
|
|
44
|
-
trust: createGatedTrustDomain(),
|
|
46
|
+
trust: tokenExchangeClient ? { tokenExchange: tokenExchangeClient } : createGatedTrustDomain(),
|
|
45
47
|
wrap: {
|
|
46
48
|
projections: createLocalProjectionDomain({ homeNodeId: input.self.nodeId, local: input.projections }),
|
|
47
49
|
nhi,
|
package/dist/mesh.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mesh.js","sourceRoot":"","sources":["../src/mesh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAqD,MAAM,iBAAiB,CAAC;AAC1G,OAAO,EAAE,uBAAuB,EAAqD,MAAM,aAAa,CAAC;AACzG,OAAO,EAAE,4BAA4B,EAA8B,MAAM,aAAa,CAAC;AACvF,OAAO,EACL,0BAA0B,GAI3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAiD,MAAM,UAAU,CAAC;AAChG,OAAO,EAAE,2BAA2B,EAAwE,MAAM,iBAAiB,CAAC;AACpI,OAAO,EAAE,sBAAsB,EAAoB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"mesh.js","sourceRoot":"","sources":["../src/mesh.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAqD,MAAM,iBAAiB,CAAC;AAC1G,OAAO,EAAE,uBAAuB,EAAqD,MAAM,aAAa,CAAC;AACzG,OAAO,EAAE,4BAA4B,EAA8B,MAAM,aAAa,CAAC;AACvF,OAAO,EACL,0BAA0B,GAI3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAiD,MAAM,UAAU,CAAC;AAChG,OAAO,EAAE,2BAA2B,EAAwE,MAAM,iBAAiB,CAAC;AACpI,OAAO,EAAE,yBAAyB,EAAiC,MAAM,qBAAqB,CAAC;AAC/F,OAAO,E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MeshProviderModuleId } from './contracts.js';
|
|
3
3
|
export declare const LLM_MESH_PACKAGE = "@sentropic/llm-mesh";
|
|
4
4
|
export declare const LLM_GATEWAY_PACKAGE = "@sentropic/llm-gateway";
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
5
|
+
export declare const MCP_PLATFORM_PACKAGE = "@sentropic/mcp-platform";
|
|
6
|
+
/** Tight bound on the qualified platform candidate (single 0.3.0, no intermediate publication). */
|
|
7
|
+
export declare const MCP_PLATFORM_RANGE = ">=0.3.0 <0.4.0";
|
|
8
|
+
export declare const ARTIFACTS_PACKAGE = "@sentropic/artifacts";
|
|
9
|
+
/** Single 0.1.0 artifacts candidate covering L-5a–5e (no per-slice train). */
|
|
10
|
+
export declare const ARTIFACTS_RANGE = ">=0.1.0 <0.2.0";
|
|
11
|
+
export declare const LLM_MESH_RANGE = ">=0.22.0 <0.27.0";
|
|
12
|
+
export declare const LLM_GATEWAY_RANGE = ">=0.19.0 <0.21.0";
|
|
7
13
|
export declare const MCP_AUTH_RANGE = ">=0.2.1 <0.3.0";
|
|
8
14
|
export declare const JOSE_RANGE = "^5.10.0";
|
|
9
|
-
/** Follows llm-gateway 0.19.
|
|
10
|
-
|
|
15
|
+
/** Follows llm-gateway 0.19.6's declared optional peer range (parity with #674: admits auth-hono 0.16.0).
|
|
16
|
+
* Spelled as a bounded interval: the minimal release-range parser has no `||`. */
|
|
17
|
+
export declare const AUTH_HONO_RANGE = ">=0.15.0 <0.17.0";
|
|
11
18
|
export interface PeerRequirement {
|
|
12
19
|
readonly packageName: string;
|
|
13
20
|
readonly subpath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/modules/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EACjC,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CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,EAAE,2BAA2B,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IAC1C,uFAAuF;IACvF,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,2EAA2E;IAC3E,QAAQ,CAAC,SAAS,EAAE,SAAS,eAAe,EAAE,CAAC;CAChD;AAgCD,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAkB9F,CAAC;AAsBF,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,2BAA2B,CAEhF;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,wBAAwB,CAE1E;AAKD,eAAO,MAAM,mBAAmB,EAAE,SAAS,qBAAqB,EAiB9D,CAAC"}
|
package/dist/modules/catalog.js
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { CLUSTER_MESH_GATED_MODULE_IDS, } from './contracts.js';
|
|
2
2
|
export const LLM_MESH_PACKAGE = '@sentropic/llm-mesh';
|
|
3
3
|
export const LLM_GATEWAY_PACKAGE = '@sentropic/llm-gateway';
|
|
4
|
-
export const
|
|
5
|
-
|
|
4
|
+
export const MCP_PLATFORM_PACKAGE = '@sentropic/mcp-platform';
|
|
5
|
+
/** Tight bound on the qualified platform candidate (single 0.3.0, no intermediate publication). */
|
|
6
|
+
export const MCP_PLATFORM_RANGE = '>=0.3.0 <0.4.0';
|
|
7
|
+
export const ARTIFACTS_PACKAGE = '@sentropic/artifacts';
|
|
8
|
+
/** Single 0.1.0 artifacts candidate covering L-5a–5e (no per-slice train). */
|
|
9
|
+
export const ARTIFACTS_RANGE = '>=0.1.0 <0.2.0';
|
|
10
|
+
export const LLM_MESH_RANGE = '>=0.22.0 <0.27.0';
|
|
11
|
+
export const LLM_GATEWAY_RANGE = '>=0.19.0 <0.21.0';
|
|
6
12
|
export const MCP_AUTH_RANGE = '>=0.2.1 <0.3.0';
|
|
7
13
|
export const JOSE_RANGE = '^5.10.0';
|
|
8
|
-
/** Follows llm-gateway 0.19.
|
|
9
|
-
|
|
14
|
+
/** Follows llm-gateway 0.19.6's declared optional peer range (parity with #674: admits auth-hono 0.16.0).
|
|
15
|
+
* Spelled as a bounded interval: the minimal release-range parser has no `||`. */
|
|
16
|
+
export const AUTH_HONO_RANGE = '>=0.15.0 <0.17.0';
|
|
10
17
|
// No provider specifier is ever imported from the root graph: the registry imports the
|
|
11
18
|
// metadata-resolved physical file, so bundling the root never pulls a provider in.
|
|
12
19
|
const SERVICE_AUTH_PEERS = [
|
|
@@ -25,6 +32,14 @@ const gateway = (id, subpath, requiredMembers, authPeers, namespace) => ({
|
|
|
25
32
|
id, owner: 'llm-gateway', packageName: LLM_GATEWAY_PACKAGE, subpath, range: LLM_GATEWAY_RANGE, requiredMembers,
|
|
26
33
|
meshCoherence: true, authPeers, ...(namespace ? { namespace } : {}),
|
|
27
34
|
});
|
|
35
|
+
const mcpPlatform = (id, subpath, requiredMembers) => ({
|
|
36
|
+
id, owner: 'mcp-platform', packageName: MCP_PLATFORM_PACKAGE, subpath, range: MCP_PLATFORM_RANGE, requiredMembers,
|
|
37
|
+
meshCoherence: false, authPeers: [],
|
|
38
|
+
});
|
|
39
|
+
const artifacts = (id, subpath, requiredMembers) => ({
|
|
40
|
+
id, owner: 'artifacts', packageName: ARTIFACTS_PACKAGE, subpath, range: ARTIFACTS_RANGE, requiredMembers,
|
|
41
|
+
meshCoherence: false, authPeers: [],
|
|
42
|
+
});
|
|
28
43
|
export const PROVIDER_CATALOG = {
|
|
29
44
|
'llm-mesh': mesh('llm-mesh', '.', ['createLlmMesh', 'createProviderRegistry'], '/llm-mesh'),
|
|
30
45
|
'llm-mesh/facade': mesh('llm-mesh/facade', './facade', ['createLlmMeshFacade']),
|
|
@@ -34,6 +49,15 @@ export const PROVIDER_CATALOG = {
|
|
|
34
49
|
gateway: gateway('gateway', '.', ['createGatewayRouter'], [], '/gw'),
|
|
35
50
|
'gateway/auth': gateway('gateway/auth', './auth', ['ServiceAuthVerifyToken'], SERVICE_AUTH_PEERS),
|
|
36
51
|
'gateway/auth-hono': gateway('gateway/auth-hono', './auth-hono', ['AuthHonoVerifyToken'], SESSION_AUTH_PEERS),
|
|
52
|
+
'mcp-platform/registry': mcpPlatform('mcp-platform/registry', './registry', ['createProviderRegistry']),
|
|
53
|
+
'mcp-platform/entry': mcpPlatform('mcp-platform/entry', './registry/entry', ['buildRegistryEntry', 'resolveRegistryEntry']),
|
|
54
|
+
'mcp-platform/bridge': mcpPlatform('mcp-platform/bridge', './transport/bridge', ['registerBridgeTools', 'identityFromExtra']),
|
|
55
|
+
'mcp-platform/hono': mcpPlatform('mcp-platform/hono', './hono', ['createMcpPlatformHono']),
|
|
56
|
+
'mcp-platform/stdio': mcpPlatform('mcp-platform/stdio', './transport/stdio', ['createStdioTransport', 'extractStdioRequestIdentity']),
|
|
57
|
+
'mcp/artifacts': artifacts('mcp/artifacts', './mcp', [
|
|
58
|
+
'createArtifactsRegistryDefinition', 'createArtifactsToolExecutor',
|
|
59
|
+
'ARTIFACTS_PROVIDER_ID', 'ARTIFACTS_TOOL_NAMES',
|
|
60
|
+
]),
|
|
37
61
|
};
|
|
38
62
|
const GATED_OWNERS = {
|
|
39
63
|
'mcp/auth': { owner: 'mcp-auth', namespace: '/mcp' },
|