@alfe.ai/mcp-bundler 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +99 -172
- package/dist/index.d.cts +79 -58
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +79 -58
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +97 -172
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2,8 +2,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
let node_fs = require("node:fs");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
let node_os = require("node:os");
|
|
5
|
-
let node_child_process = require("node:child_process");
|
|
6
|
-
let node_util = require("node:util");
|
|
7
5
|
//#region src/tool-naming.ts
|
|
8
6
|
/**
|
|
9
7
|
* Tool name sanitization and collision handling.
|
|
@@ -717,60 +715,40 @@ function errMsg$1(err) {
|
|
|
717
715
|
}
|
|
718
716
|
//#endregion
|
|
719
717
|
//#region src/manager.ts
|
|
720
|
-
const execFileAsync = (0, node_util.promisify)(node_child_process.execFile);
|
|
721
|
-
const defaultOpenclawExecutor = {
|
|
722
|
-
async setBatch(batch) {
|
|
723
|
-
if (batch.length === 0) return;
|
|
724
|
-
await execFileAsync("openclaw", [
|
|
725
|
-
"config",
|
|
726
|
-
"set",
|
|
727
|
-
"--batch-json",
|
|
728
|
-
JSON.stringify(batch)
|
|
729
|
-
], { timeout: 1e4 });
|
|
730
|
-
},
|
|
731
|
-
async unset(path) {
|
|
732
|
-
await execFileAsync("openclaw", [
|
|
733
|
-
"config",
|
|
734
|
-
"unset",
|
|
735
|
-
path
|
|
736
|
-
], { timeout: 1e4 });
|
|
737
|
-
}
|
|
738
|
-
};
|
|
739
|
-
const DEFAULT_MIRROR_DEBOUNCE_MS = 250;
|
|
740
718
|
/**
|
|
741
|
-
* Bundler manager — owns the alfe store
|
|
742
|
-
*
|
|
743
|
-
* call into.
|
|
719
|
+
* Bundler manager — owns the `~/.alfe/mcp/servers.json` store and surfaces a
|
|
720
|
+
* small CRUD API the CLI and integration applier both call into.
|
|
744
721
|
*
|
|
745
|
-
*
|
|
746
|
-
*
|
|
722
|
+
* Single source of truth: every consumer (daemon-hosted bundler, CLI `alfe mcp
|
|
723
|
+
* list`, integration uninstall) reads from this store. Openclaw.json is no
|
|
724
|
+
* longer kept in sync — the daemon hosts the bundler children and the
|
|
725
|
+
* openclaw plugin reaches them via IPC, so the openclaw.json mirror became
|
|
726
|
+
* dead weight and an active source of duplicate spawning on claude-cli /
|
|
727
|
+
* codex-cli backends.
|
|
728
|
+
*
|
|
729
|
+
* Call `loadIntoBundler(bundler)` once at daemon startup to wire the store
|
|
730
|
+
* into a live `McpBundler` — subsequent store mutations (including those
|
|
731
|
+
* landed by other processes via the file watcher) re-reconcile automatically.
|
|
747
732
|
*/
|
|
748
733
|
var Manager = class {
|
|
749
734
|
store;
|
|
750
|
-
executor;
|
|
751
735
|
logger;
|
|
752
|
-
mirrorDebounceMs;
|
|
753
|
-
mirrorTimer;
|
|
754
|
-
mirrorPromise = Promise.resolve();
|
|
755
|
-
mirrorPending;
|
|
756
736
|
bundler;
|
|
757
737
|
changeListeners = /* @__PURE__ */ new Set();
|
|
758
738
|
storeUnsubscribe;
|
|
759
739
|
constructor(opts = {}) {
|
|
760
740
|
this.store = opts.store ?? new Store({ logger: opts.logger });
|
|
761
|
-
this.executor = opts.executor ?? defaultOpenclawExecutor;
|
|
762
741
|
this.logger = opts.logger;
|
|
763
|
-
this.mirrorDebounceMs = opts.mirrorDebounceMs ?? DEFAULT_MIRROR_DEBOUNCE_MS;
|
|
764
742
|
}
|
|
765
743
|
/** Direct accessor — handy for tests and the CLI's `alfe mcp list`. */
|
|
766
744
|
getStore() {
|
|
767
745
|
return this.store;
|
|
768
746
|
}
|
|
769
747
|
/**
|
|
770
|
-
* Register or overwrite a server entry.
|
|
771
|
-
*
|
|
772
|
-
* in the background
|
|
773
|
-
*
|
|
748
|
+
* Register or overwrite a server entry. Mutation lands in the store
|
|
749
|
+
* synchronously; if a bundler has been attached via `loadIntoBundler`,
|
|
750
|
+
* it gets re-reconciled in the background (errors logged, never
|
|
751
|
+
* thrown — the store is the source of truth, the bundler is derived).
|
|
774
752
|
*/
|
|
775
753
|
async addServer(config, opts) {
|
|
776
754
|
if (!opts.id) throw new Error("Manager.addServer: id is required");
|
|
@@ -791,7 +769,7 @@ var Manager = class {
|
|
|
791
769
|
}
|
|
792
770
|
};
|
|
793
771
|
});
|
|
794
|
-
this.
|
|
772
|
+
this.scheduleBundlerReconcile();
|
|
795
773
|
this.fireChange();
|
|
796
774
|
return Promise.resolve();
|
|
797
775
|
}
|
|
@@ -800,9 +778,6 @@ var Manager = class {
|
|
|
800
778
|
* Refuses to remove an entry whose owner doesn't match `expectedOwner`
|
|
801
779
|
* when supplied — the CLI uses this to guard `alfe mcp remove` from
|
|
802
780
|
* accidentally clobbering integration- or cli-owned entries.
|
|
803
|
-
*
|
|
804
|
-
* Resolves as soon as the store mutation is committed. Mirror runs
|
|
805
|
-
* async; call `flush()` to await it.
|
|
806
781
|
*/
|
|
807
782
|
removeServer(id, opts = {}) {
|
|
808
783
|
const existing = lookupEntry(this.store.read().servers, id);
|
|
@@ -812,7 +787,7 @@ var Manager = class {
|
|
|
812
787
|
...cur,
|
|
813
788
|
servers: Object.fromEntries(Object.entries(cur.servers).filter(([k]) => k !== id))
|
|
814
789
|
}));
|
|
815
|
-
this.
|
|
790
|
+
this.scheduleBundlerReconcile();
|
|
816
791
|
this.fireChange();
|
|
817
792
|
return Promise.resolve(true);
|
|
818
793
|
}
|
|
@@ -830,7 +805,7 @@ var Manager = class {
|
|
|
830
805
|
};
|
|
831
806
|
});
|
|
832
807
|
if (removed.length > 0) {
|
|
833
|
-
this.
|
|
808
|
+
this.scheduleBundlerReconcile();
|
|
834
809
|
this.fireChange();
|
|
835
810
|
}
|
|
836
811
|
return Promise.resolve(removed);
|
|
@@ -865,16 +840,11 @@ var Manager = class {
|
|
|
865
840
|
};
|
|
866
841
|
}
|
|
867
842
|
/**
|
|
868
|
-
*
|
|
869
|
-
*
|
|
843
|
+
* Detach from the bundler and stop watching the store. Safe to call
|
|
844
|
+
* multiple times. Does not dispose the underlying `Store` so the
|
|
845
|
+
* shared instance survives multi-manager environments (rare).
|
|
870
846
|
*/
|
|
871
847
|
async dispose() {
|
|
872
|
-
if (this.mirrorTimer) {
|
|
873
|
-
clearTimeout(this.mirrorTimer);
|
|
874
|
-
this.mirrorTimer = void 0;
|
|
875
|
-
await this.runMirror();
|
|
876
|
-
}
|
|
877
|
-
await this.mirrorPromise.catch(() => void 0);
|
|
878
848
|
if (this.storeUnsubscribe) {
|
|
879
849
|
this.storeUnsubscribe();
|
|
880
850
|
this.storeUnsubscribe = void 0;
|
|
@@ -882,80 +852,13 @@ var Manager = class {
|
|
|
882
852
|
this.store.dispose();
|
|
883
853
|
this.changeListeners.clear();
|
|
884
854
|
this.bundler = void 0;
|
|
855
|
+
return Promise.resolve();
|
|
885
856
|
}
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
*/
|
|
891
|
-
async flush() {
|
|
892
|
-
if (this.mirrorTimer) {
|
|
893
|
-
clearTimeout(this.mirrorTimer);
|
|
894
|
-
this.mirrorTimer = void 0;
|
|
895
|
-
await this.runMirror();
|
|
896
|
-
}
|
|
897
|
-
await this.mirrorPromise;
|
|
898
|
-
}
|
|
899
|
-
scheduleMirror() {
|
|
900
|
-
if (this.mirrorPending) return;
|
|
901
|
-
this.mirrorPromise = new Promise((resolve, reject) => {
|
|
902
|
-
this.mirrorPending = {
|
|
903
|
-
resolve,
|
|
904
|
-
reject
|
|
905
|
-
};
|
|
906
|
-
});
|
|
907
|
-
this.mirrorTimer = setTimeout(() => {
|
|
908
|
-
this.mirrorTimer = void 0;
|
|
909
|
-
this.runMirror();
|
|
910
|
-
}, this.mirrorDebounceMs);
|
|
911
|
-
this.mirrorTimer.unref();
|
|
912
|
-
}
|
|
913
|
-
async runMirror() {
|
|
914
|
-
const pending = this.mirrorPending;
|
|
915
|
-
this.mirrorPending = void 0;
|
|
916
|
-
try {
|
|
917
|
-
await this.applyMirror();
|
|
918
|
-
pending?.resolve();
|
|
919
|
-
} catch (err) {
|
|
920
|
-
pending?.reject(err);
|
|
921
|
-
this.logger?.error("[mcp-bundler/manager] mirror write failed", { err: errMsg(err) });
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
/**
|
|
925
|
-
* Compute the diff between this manager's owned set and what the store
|
|
926
|
-
* declares now, then apply the openclaw config delta. Foreign keys
|
|
927
|
-
* (entries in openclaw.json#mcp.servers.* not in our store) are
|
|
928
|
-
* preserved — we only touch the names we previously claimed.
|
|
929
|
-
*/
|
|
930
|
-
async applyMirror() {
|
|
931
|
-
let previousOwned = [];
|
|
932
|
-
let desiredOwned = [];
|
|
933
|
-
let batch = [];
|
|
934
|
-
this.store.update((cur) => {
|
|
935
|
-
previousOwned = cur._ownedOpenclawKeys.slice();
|
|
936
|
-
const entries = Object.entries(cur.servers);
|
|
937
|
-
desiredOwned = entries.map(([id]) => id).sort();
|
|
938
|
-
batch = entries.flatMap(([id, entry]) => renderEntryToBatch(id, entry));
|
|
939
|
-
return {
|
|
940
|
-
...cur,
|
|
941
|
-
_ownedOpenclawKeys: desiredOwned
|
|
942
|
-
};
|
|
857
|
+
scheduleBundlerReconcile() {
|
|
858
|
+
if (!this.bundler) return;
|
|
859
|
+
this.reconcileBundler().catch((err) => {
|
|
860
|
+
this.logger?.warn("[mcp-bundler/manager] bundler reconcile failed", { err: errMsg(err) });
|
|
943
861
|
});
|
|
944
|
-
await this.executor.setBatch(batch);
|
|
945
|
-
const toUnset = previousOwned.filter((k) => !desiredOwned.includes(k));
|
|
946
|
-
for (const id of toUnset) try {
|
|
947
|
-
await this.executor.unset(`mcp.servers.${id}`);
|
|
948
|
-
} catch (err) {
|
|
949
|
-
this.logger?.warn("[mcp-bundler/manager] mirror unset failed (continuing)", {
|
|
950
|
-
err: errMsg(err),
|
|
951
|
-
key: `mcp.servers.${id}`
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
if (this.bundler) try {
|
|
955
|
-
await this.reconcileBundler();
|
|
956
|
-
} catch (err) {
|
|
957
|
-
this.logger?.warn("[mcp-bundler/manager] post-mirror reconcile failed", { err: errMsg(err) });
|
|
958
|
-
}
|
|
959
862
|
}
|
|
960
863
|
async reconcileBundler() {
|
|
961
864
|
if (!this.bundler) return;
|
|
@@ -972,53 +875,6 @@ var Manager = class {
|
|
|
972
875
|
}
|
|
973
876
|
}
|
|
974
877
|
};
|
|
975
|
-
/**
|
|
976
|
-
* Render one store entry as the set of dotted-path batch entries that
|
|
977
|
-
* `openclaw config set --batch-json` expects.
|
|
978
|
-
*
|
|
979
|
-
* Mirrors the format the integrations applier already emits today so the
|
|
980
|
-
* runtime sees the same shape regardless of which writer produced it.
|
|
981
|
-
*/
|
|
982
|
-
function renderEntryToBatch(id, entry) {
|
|
983
|
-
const prefix = `mcp.servers.${id}`;
|
|
984
|
-
const out = [];
|
|
985
|
-
if (entry.transport === "stdio") {
|
|
986
|
-
out.push({
|
|
987
|
-
path: `${prefix}.command`,
|
|
988
|
-
value: entry.command
|
|
989
|
-
});
|
|
990
|
-
if (entry.args && entry.args.length > 0) out.push({
|
|
991
|
-
path: `${prefix}.args`,
|
|
992
|
-
value: entry.args
|
|
993
|
-
});
|
|
994
|
-
if (entry.env) for (const [k, v] of Object.entries(entry.env)) out.push({
|
|
995
|
-
path: `${prefix}.env.${k}`,
|
|
996
|
-
value: v
|
|
997
|
-
});
|
|
998
|
-
if (entry.cwd) out.push({
|
|
999
|
-
path: `${prefix}.cwd`,
|
|
1000
|
-
value: entry.cwd
|
|
1001
|
-
});
|
|
1002
|
-
return out;
|
|
1003
|
-
}
|
|
1004
|
-
out.push({
|
|
1005
|
-
path: `${prefix}.url`,
|
|
1006
|
-
value: entry.url
|
|
1007
|
-
});
|
|
1008
|
-
out.push({
|
|
1009
|
-
path: `${prefix}.transport`,
|
|
1010
|
-
value: entry.transport
|
|
1011
|
-
});
|
|
1012
|
-
if (entry.headers) for (const [k, v] of Object.entries(entry.headers)) out.push({
|
|
1013
|
-
path: `${prefix}.headers.${k}`,
|
|
1014
|
-
value: v
|
|
1015
|
-
});
|
|
1016
|
-
if (entry.connectionTimeoutMs !== void 0) out.push({
|
|
1017
|
-
path: `${prefix}.connectionTimeoutMs`,
|
|
1018
|
-
value: entry.connectionTimeoutMs
|
|
1019
|
-
});
|
|
1020
|
-
return out;
|
|
1021
|
-
}
|
|
1022
878
|
function errMsg(err) {
|
|
1023
879
|
return err instanceof Error ? err.message : String(err);
|
|
1024
880
|
}
|
|
@@ -1036,16 +892,87 @@ function lookupAddedAt(servers, id) {
|
|
|
1036
892
|
return entry ? entry.addedAt : void 0;
|
|
1037
893
|
}
|
|
1038
894
|
//#endregion
|
|
895
|
+
//#region src/pattern-a-validator.ts
|
|
896
|
+
/**
|
|
897
|
+
* Validate that every non-exempt tool's JSON Schema declares the selector
|
|
898
|
+
* property AND lists it in `required`. Returns the full set of violations
|
|
899
|
+
* so the caller can report them all in one pass — failing fast on the
|
|
900
|
+
* first one tends to hide cascading bugs in real plugins.
|
|
901
|
+
*
|
|
902
|
+
* The check is intentionally schema-shape-only — it does NOT execute the
|
|
903
|
+
* tool, call the LLM, or talk to the cloud. It's a fast structural pass
|
|
904
|
+
* suitable for build-time use.
|
|
905
|
+
*/
|
|
906
|
+
function checkPatternA(tools, options) {
|
|
907
|
+
const selectorNames = typeof options.selector === "string" ? [options.selector] : options.selector;
|
|
908
|
+
const exempt = new Set(options.exempt ?? []);
|
|
909
|
+
const violations = [];
|
|
910
|
+
for (const tool of tools) {
|
|
911
|
+
if (exempt.has(tool.name)) continue;
|
|
912
|
+
const schema = tool.parameters;
|
|
913
|
+
const properties = schema.properties ?? {};
|
|
914
|
+
const required = schema.required ?? [];
|
|
915
|
+
const matched = selectorNames.find((name) => name in properties);
|
|
916
|
+
if (!matched) {
|
|
917
|
+
violations.push({
|
|
918
|
+
tool: tool.name,
|
|
919
|
+
reason: "missing-selector-property",
|
|
920
|
+
detail: `expected one of [${selectorNames.join(", ")}] in inputSchema.properties`
|
|
921
|
+
});
|
|
922
|
+
continue;
|
|
923
|
+
}
|
|
924
|
+
if (!required.includes(matched)) {
|
|
925
|
+
violations.push({
|
|
926
|
+
tool: tool.name,
|
|
927
|
+
reason: "selector-not-required",
|
|
928
|
+
detail: `selector "${matched}" present in properties but missing from inputSchema.required`
|
|
929
|
+
});
|
|
930
|
+
continue;
|
|
931
|
+
}
|
|
932
|
+
const type = properties[matched].type;
|
|
933
|
+
if (type !== "string") violations.push({
|
|
934
|
+
tool: tool.name,
|
|
935
|
+
reason: "selector-property-not-string",
|
|
936
|
+
detail: `selector "${matched}" must be JSON Schema type=string (found ${JSON.stringify(type)})`
|
|
937
|
+
});
|
|
938
|
+
}
|
|
939
|
+
return violations;
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Thin wrapper that throws an Error listing every violation if any are
|
|
943
|
+
* present. Convenient for build scripts that want a single guard call.
|
|
944
|
+
*/
|
|
945
|
+
function assertPatternA(tools, options) {
|
|
946
|
+
const violations = checkPatternA(tools, options);
|
|
947
|
+
if (violations.length === 0) return;
|
|
948
|
+
const lines = violations.map((v) => ` - [${v.reason}] ${v.tool}: ${v.detail}`);
|
|
949
|
+
throw new Error(`Pattern A validation failed for ${String(violations.length)} tool(s):\n${lines.join("\n")}`);
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* Cast an {@link McpToolDescriptor} (proxy-plugin shape) to the leaner
|
|
953
|
+
* {@link ValidatableTool} the validator accepts. Useful for proxy
|
|
954
|
+
* plugins that already maintain a `cachedTools: McpToolDescriptor[]`
|
|
955
|
+
* collection.
|
|
956
|
+
*/
|
|
957
|
+
function fromMcpDescriptor(descriptor) {
|
|
958
|
+
return {
|
|
959
|
+
name: descriptor.prefixed,
|
|
960
|
+
parameters: descriptor.parameters
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
//#endregion
|
|
1039
964
|
exports.Connection = Connection;
|
|
1040
965
|
exports.Manager = Manager;
|
|
1041
966
|
exports.McpBundler = McpBundler;
|
|
1042
967
|
exports.STDIO_ENV_DENYLIST = STDIO_ENV_DENYLIST;
|
|
1043
968
|
exports.Store = Store;
|
|
969
|
+
exports.assertPatternA = assertPatternA;
|
|
1044
970
|
exports.buildNamespacedToolName = buildNamespacedToolName;
|
|
971
|
+
exports.checkPatternA = checkPatternA;
|
|
1045
972
|
exports.defaultConnect = defaultConnect;
|
|
1046
|
-
exports.defaultOpenclawExecutor = defaultOpenclawExecutor;
|
|
1047
973
|
exports.defaultStorePath = defaultStorePath;
|
|
1048
974
|
exports.disambiguateAgainst = disambiguateAgainst;
|
|
975
|
+
exports.fromMcpDescriptor = fromMcpDescriptor;
|
|
1049
976
|
exports.sanitizeNameSegment = sanitizeNameSegment;
|
|
1050
977
|
exports.sanitizeStdioEnv = sanitizeStdioEnv;
|
|
1051
978
|
exports.toServerConfig = toServerConfig;
|
package/dist/index.d.cts
CHANGED
|
@@ -350,36 +350,13 @@ declare function toStoredEntry(config: McpServerConfig, meta: {
|
|
|
350
350
|
}): StoredServerEntry;
|
|
351
351
|
//#endregion
|
|
352
352
|
//#region src/manager.d.ts
|
|
353
|
-
/**
|
|
354
|
-
* Shells out to `openclaw config set --batch-json` / `openclaw config unset`
|
|
355
|
-
* to keep `openclaw.json#mcp.servers.*` in sync with the bundler store.
|
|
356
|
-
* Default executor reuses the same machinery the integrations applier has
|
|
357
|
-
* used for ~6 months; tests inject a fake.
|
|
358
|
-
*/
|
|
359
|
-
interface OpenclawExecutor {
|
|
360
|
-
setBatch: (batch: {
|
|
361
|
-
path: string;
|
|
362
|
-
value: unknown;
|
|
363
|
-
}[]) => Promise<void>;
|
|
364
|
-
unset: (path: string) => Promise<void>;
|
|
365
|
-
}
|
|
366
|
-
declare const defaultOpenclawExecutor: OpenclawExecutor;
|
|
367
353
|
interface ManagerOptions {
|
|
368
354
|
/** Pre-constructed store. If omitted, one is built with default options. */
|
|
369
355
|
store?: Store;
|
|
370
|
-
/** Override for the openclaw mirror executor (tests inject a fake). */
|
|
371
|
-
executor?: OpenclawExecutor;
|
|
372
356
|
logger?: Logger;
|
|
373
|
-
/**
|
|
374
|
-
* Debounce window for the mirror-write. Mutations landing inside this
|
|
375
|
-
* window coalesce into a single openclaw config update, avoiding the
|
|
376
|
-
* auto-restart race where two back-to-back `addServer` calls hit an
|
|
377
|
-
* openclaw that's mid-shutdown from the first write's watcher.
|
|
378
|
-
*/
|
|
379
|
-
mirrorDebounceMs?: number;
|
|
380
357
|
}
|
|
381
358
|
interface AddServerOptions {
|
|
382
|
-
/** Required — flat-namespace key under
|
|
359
|
+
/** Required — flat-namespace key under the bundler store. */
|
|
383
360
|
id: string;
|
|
384
361
|
/** Marks ownership for bulk removal. Defaults to `manual`. */
|
|
385
362
|
owner?: ServerOwner;
|
|
@@ -389,21 +366,23 @@ interface AddServerOptions {
|
|
|
389
366
|
transport?: McpTransportKind;
|
|
390
367
|
}
|
|
391
368
|
/**
|
|
392
|
-
* Bundler manager — owns the alfe store
|
|
393
|
-
*
|
|
394
|
-
*
|
|
369
|
+
* Bundler manager — owns the `~/.alfe/mcp/servers.json` store and surfaces a
|
|
370
|
+
* small CRUD API the CLI and integration applier both call into.
|
|
371
|
+
*
|
|
372
|
+
* Single source of truth: every consumer (daemon-hosted bundler, CLI `alfe mcp
|
|
373
|
+
* list`, integration uninstall) reads from this store. Openclaw.json is no
|
|
374
|
+
* longer kept in sync — the daemon hosts the bundler children and the
|
|
375
|
+
* openclaw plugin reaches them via IPC, so the openclaw.json mirror became
|
|
376
|
+
* dead weight and an active source of duplicate spawning on claude-cli /
|
|
377
|
+
* codex-cli backends.
|
|
395
378
|
*
|
|
396
|
-
*
|
|
397
|
-
*
|
|
379
|
+
* Call `loadIntoBundler(bundler)` once at daemon startup to wire the store
|
|
380
|
+
* into a live `McpBundler` — subsequent store mutations (including those
|
|
381
|
+
* landed by other processes via the file watcher) re-reconcile automatically.
|
|
398
382
|
*/
|
|
399
383
|
declare class Manager {
|
|
400
384
|
private readonly store;
|
|
401
|
-
private readonly executor;
|
|
402
385
|
private readonly logger?;
|
|
403
|
-
private readonly mirrorDebounceMs;
|
|
404
|
-
private mirrorTimer?;
|
|
405
|
-
private mirrorPromise;
|
|
406
|
-
private mirrorPending?;
|
|
407
386
|
private bundler?;
|
|
408
387
|
private changeListeners;
|
|
409
388
|
private storeUnsubscribe?;
|
|
@@ -411,10 +390,10 @@ declare class Manager {
|
|
|
411
390
|
/** Direct accessor — handy for tests and the CLI's `alfe mcp list`. */
|
|
412
391
|
getStore(): Store;
|
|
413
392
|
/**
|
|
414
|
-
* Register or overwrite a server entry.
|
|
415
|
-
*
|
|
416
|
-
* in the background
|
|
417
|
-
*
|
|
393
|
+
* Register or overwrite a server entry. Mutation lands in the store
|
|
394
|
+
* synchronously; if a bundler has been attached via `loadIntoBundler`,
|
|
395
|
+
* it gets re-reconciled in the background (errors logged, never
|
|
396
|
+
* thrown — the store is the source of truth, the bundler is derived).
|
|
418
397
|
*/
|
|
419
398
|
addServer(config: McpServerConfig, opts: AddServerOptions): Promise<void>;
|
|
420
399
|
/**
|
|
@@ -422,9 +401,6 @@ declare class Manager {
|
|
|
422
401
|
* Refuses to remove an entry whose owner doesn't match `expectedOwner`
|
|
423
402
|
* when supplied — the CLI uses this to guard `alfe mcp remove` from
|
|
424
403
|
* accidentally clobbering integration- or cli-owned entries.
|
|
425
|
-
*
|
|
426
|
-
* Resolves as soon as the store mutation is committed. Mirror runs
|
|
427
|
-
* async; call `flush()` to await it.
|
|
428
404
|
*/
|
|
429
405
|
removeServer(id: string, opts?: {
|
|
430
406
|
expectedOwner?: ServerOwner;
|
|
@@ -445,30 +421,75 @@ declare class Manager {
|
|
|
445
421
|
/** Subscribe to store mutations. Returns an unsubscribe fn. */
|
|
446
422
|
onChange(cb: () => void): () => void;
|
|
447
423
|
/**
|
|
448
|
-
*
|
|
449
|
-
*
|
|
424
|
+
* Detach from the bundler and stop watching the store. Safe to call
|
|
425
|
+
* multiple times. Does not dispose the underlying `Store` so the
|
|
426
|
+
* shared instance survives multi-manager environments (rare).
|
|
450
427
|
*/
|
|
451
428
|
dispose(): Promise<void>;
|
|
429
|
+
private scheduleBundlerReconcile;
|
|
430
|
+
private reconcileBundler;
|
|
431
|
+
private fireChange;
|
|
432
|
+
}
|
|
433
|
+
//# sourceMappingURL=manager.d.ts.map
|
|
434
|
+
//#endregion
|
|
435
|
+
//#region src/pattern-a-validator.d.ts
|
|
436
|
+
/**
|
|
437
|
+
* A tool descriptor that the validator can inspect. Plugins can pass
|
|
438
|
+
* either {@link McpToolDescriptor} (for proxy plugins surfacing child
|
|
439
|
+
* tools) or a leaner local shape (for direct-MCP plugins). Both come
|
|
440
|
+
* down to a tool name and a JSON Schema parameter object.
|
|
441
|
+
*/
|
|
442
|
+
interface ValidatableTool {
|
|
443
|
+
/** Tool name as the LLM sees it (post-namespacing). */
|
|
444
|
+
name: string;
|
|
445
|
+
/** JSON Schema for tool parameters (the `inputSchema`). */
|
|
446
|
+
parameters: Record<string, unknown>;
|
|
447
|
+
}
|
|
448
|
+
interface PatternAOptions {
|
|
452
449
|
/**
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
450
|
+
* The required selector property name. Provider-specific (Google uses
|
|
451
|
+
* `email`; Notion will use `workspaceId`; Xero will use `xeroTenantId`;
|
|
452
|
+
* MYOB will use `myobBusinessId`). Plugins MAY support more than one
|
|
453
|
+
* acceptable name — pass an array.
|
|
456
454
|
*/
|
|
457
|
-
|
|
458
|
-
private scheduleMirror;
|
|
459
|
-
private runMirror;
|
|
455
|
+
selector: string | readonly string[];
|
|
460
456
|
/**
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
* preserved — we only touch the names we previously claimed.
|
|
457
|
+
* Tool names exempt from the selector requirement — typically the
|
|
458
|
+
* `list_accounts` discovery tool and any pure-utility tools that don't
|
|
459
|
+
* touch credentials. Match is exact (post-namespacing).
|
|
465
460
|
*/
|
|
466
|
-
|
|
467
|
-
private reconcileBundler;
|
|
468
|
-
private fireChange;
|
|
461
|
+
exempt?: readonly string[];
|
|
469
462
|
}
|
|
470
|
-
|
|
463
|
+
interface PatternAViolation {
|
|
464
|
+
tool: string;
|
|
465
|
+
reason: "missing-selector-property" | "selector-not-required" | "selector-property-not-string";
|
|
466
|
+
detail: string;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Validate that every non-exempt tool's JSON Schema declares the selector
|
|
470
|
+
* property AND lists it in `required`. Returns the full set of violations
|
|
471
|
+
* so the caller can report them all in one pass — failing fast on the
|
|
472
|
+
* first one tends to hide cascading bugs in real plugins.
|
|
473
|
+
*
|
|
474
|
+
* The check is intentionally schema-shape-only — it does NOT execute the
|
|
475
|
+
* tool, call the LLM, or talk to the cloud. It's a fast structural pass
|
|
476
|
+
* suitable for build-time use.
|
|
477
|
+
*/
|
|
478
|
+
declare function checkPatternA(tools: readonly ValidatableTool[], options: PatternAOptions): PatternAViolation[];
|
|
479
|
+
/**
|
|
480
|
+
* Thin wrapper that throws an Error listing every violation if any are
|
|
481
|
+
* present. Convenient for build scripts that want a single guard call.
|
|
482
|
+
*/
|
|
483
|
+
declare function assertPatternA(tools: readonly ValidatableTool[], options: PatternAOptions): void;
|
|
484
|
+
/**
|
|
485
|
+
* Cast an {@link McpToolDescriptor} (proxy-plugin shape) to the leaner
|
|
486
|
+
* {@link ValidatableTool} the validator accepts. Useful for proxy
|
|
487
|
+
* plugins that already maintain a `cachedTools: McpToolDescriptor[]`
|
|
488
|
+
* collection.
|
|
489
|
+
*/
|
|
490
|
+
declare function fromMcpDescriptor(descriptor: McpToolDescriptor): ValidatableTool;
|
|
491
|
+
//# sourceMappingURL=pattern-a-validator.d.ts.map
|
|
471
492
|
|
|
472
493
|
//#endregion
|
|
473
|
-
export { type AddServerOptions, type BundlerOptions, Connection, type ConnectionDeps, type Logger, Manager, type ManagerOptions, McpBundler, type McpClientHandle, type McpServerConfig, type McpToolCallResult, type McpToolDescriptor, type McpTransportKind, type
|
|
494
|
+
export { type AddServerOptions, type BundlerOptions, Connection, type ConnectionDeps, type Logger, Manager, type ManagerOptions, McpBundler, type McpClientHandle, type McpServerConfig, type McpToolCallResult, type McpToolDescriptor, type McpTransportKind, type PatternAOptions, type PatternAViolation, type ReconcileDiff, type RemoteServerConfig, STDIO_ENV_DENYLIST, type ServerOwner, type StdioServerConfig, Store, type StoreOptions, type StoreSchema, type StoredServerEntry, type ValidatableTool, assertPatternA, buildNamespacedToolName, checkPatternA, defaultConnect, defaultStorePath, disambiguateAgainst, fromMcpDescriptor, sanitizeNameSegment, sanitizeStdioEnv, toServerConfig, toStoredEntry };
|
|
474
495
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/connection.ts","../src/bundler.ts","../src/tool-naming.ts","../src/store.ts","../src/manager.ts"],"mappings":";;AAIA;;;AAAkD,KAAtC,eAAA,GAAkB,iBAAoB,GAAA,kBAAA;AAAkB,UAEnD,iBAAA,CAFmD;EAEnD,OAAA,EAAA,MAAA;EAOA,IAAA,CAAA,EAAA,MAAA,EAAA;EAOL,GAAA,CAAA,EAXJ,MAWI,CAAA,MAAgB,EAAA,MAAA,CAAA;EAKX,GAAA,CAAA,EAAA,MAAA;AAejB;AAOiB,UAlCA,kBAAA,CAkCM;EAAA,GAAA,EAAA,MAAA;WACO,CAAA,EAAA,KAAA,GAAA,iBAAA;SACD,CAAA,EAjCjB,MAiCiB,CAAA,MAAA,EAAA,MAAA,CAAA;qBACA,CAAA,EAAA,MAAA;;AACO,KA/BxB,gBAAA,GA+BwB,OAAA,GAAA,KAAA,GA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A,GAAA,GAAA,IAAA;SAAgE,CAAA,CAAA,EAAA,IAAA;EAAkB,QAAA,aAAA;EAEtE,QAAA,cAAW;;AACF,iBAgQV,gBAAA,CAAA,CAhQU,EAAA,MAAA;;AAAT,iBAqQD,cAAA,CArQC,KAAA,EAqQqB,iBArQrB,CAAA,EAqQyC,eArQzC;AAqBjB;AAgBa,iBAiPG,aAAA,CAjPE,MAAA,EAkPR,eAlPQ,EAAA,IAAA,EAAA;EAAA,KAAA,EAmPD,WAnPC;WAOE,CAAA,EA4OsB,gBA5OtB;SASV,CAAA,EAAA,MAAA;SAiCS,CAAA,EAAA,MAAA;IAmMhB,iBAnMgC
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/connection.ts","../src/bundler.ts","../src/tool-naming.ts","../src/store.ts","../src/manager.ts","../src/pattern-a-validator.ts"],"mappings":";;AAIA;;;AAAkD,KAAtC,eAAA,GAAkB,iBAAoB,GAAA,kBAAA;AAAkB,UAEnD,iBAAA,CAFmD;EAEnD,OAAA,EAAA,MAAA;EAOA,IAAA,CAAA,EAAA,MAAA,EAAA;EAOL,GAAA,CAAA,EAXJ,MAWI,CAAA,MAAgB,EAAA,MAAA,CAAA;EAKX,GAAA,CAAA,EAAA,MAAA;AAejB;AAOiB,UAlCA,kBAAA,CAkCM;EAAA,GAAA,EAAA,MAAA;WACO,CAAA,EAAA,KAAA,GAAA,iBAAA;SACD,CAAA,EAjCjB,MAiCiB,CAAA,MAAA,EAAA,MAAA,CAAA;qBACA,CAAA,EAAA,MAAA;;AACO,KA/BxB,gBAAA,GA+BwB,OAAA,GAAA,KAAA,GAAA,iBAAA;AAGpC;AAKA;;UAlCiB,iBAAA;;ECrBJ,QAAA,EAAA,MAAA;EAUG;EAAgB,MAAA,EAAA,MAAA;;UAA2C,EAAA,MAAA;EAAM;EAUhE,KAAA,EAAA,MAAA;EAAc;aAMX,EAAA,MAAA;;YAAoB,EDO1B,MCP0B,CAAA,MAAA,EAAA,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