limixbot 0.3.128 → 0.3.130
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/assets/{ActivityPanel-CHKvr2ME.js → ActivityPanel-CswemPGx.js} +1 -1
- package/dist/assets/{App-Qdd4Etr0.js → App-CeGk9O7P.js} +135 -134
- package/dist/assets/{AppEventEditor-Csl8OvHJ.js → AppEventEditor-lydjfKAA.js} +1 -1
- package/dist/assets/{BotSettingsDialog-Dn7V8EPs.js → BotSettingsDialog-BGO7s2Sa.js} +4 -4
- package/dist/assets/{BrowserPanel-DYrgjhY2.js → BrowserPanel-WFfhXRW4.js} +1 -1
- package/dist/assets/{BrowserProfilesManager-DwXg-QiX.js → BrowserProfilesManager-DAI3EyaZ.js} +1 -1
- package/dist/assets/{CloudAddDialog-BQjw6clv.js → CloudAddDialog-Lo18f6GE.js} +1 -1
- package/dist/assets/{ComputerFilesPane-BIzdtDkx.js → ComputerFilesPane-LtL8VMhS.js} +1 -1
- package/dist/assets/{ComputerPanel-CKZMmU5N.js → ComputerPanel-mEdoL4Dh.js} +2 -2
- package/dist/assets/{DataPanel-CJCYQhq6.js → DataPanel-HeNk8eOt.js} +1 -1
- package/dist/assets/{DesktopViewer-B9mw98xI.js → DesktopViewer-DCC-jq_j.js} +1 -1
- package/dist/assets/{GrokMoveDialog-CxxR6jXV.js → GrokMoveDialog-I9x5B1Kv.js} +1 -1
- package/dist/assets/{InspectorPanel-k_9WS8hD.js → InspectorPanel-C-ocpaf1.js} +1 -1
- package/dist/assets/{KeyboardShortcutsModal-9xKBwfgq.js → KeyboardShortcutsModal-D73O8To_.js} +1 -1
- package/dist/assets/{LimixResizeHandles-D4x0jvkS.js → LimixResizeHandles-kOyb_U62.js} +1 -1
- package/dist/assets/{LiveDesktop-p14AEwq0.js → LiveDesktop-DYg8H5rp.js} +1 -1
- package/dist/assets/{LocalVmWorkspace-CB6dGKzv.js → LocalVmWorkspace-BsGviUnb.js} +1 -1
- package/dist/assets/{MacLocalControl-BxHl2r5v.js → MacLocalControl-Db0f-6Gc.js} +1 -1
- package/dist/assets/{MarkdownFilePreview-CxQMvU7b.js → MarkdownFilePreview-Dj8Z6Mm0.js} +1 -1
- package/dist/assets/{MenuMotion-DG5tk0i3.js → MenuMotion-CgVWckHz.js} +1 -1
- package/dist/assets/{NewBotDialog-CUUNMAJe.js → NewBotDialog-Bp8-zb5M.js} +1 -1
- package/dist/assets/{PhoneAppDialog-DD2dlPAo.js → PhoneAppDialog-BWtFp9EN.js} +1 -1
- package/dist/assets/{PlacesRail-CAV7kW3Y.js → PlacesRail-CKR79j8d.js} +1 -1
- package/dist/assets/{PluginsPanel-8exPvXZV.js → PluginsPanel-BZe968J8.js} +2 -2
- package/dist/assets/{ProIntroduction-BkNqiByI.js → ProIntroduction-CZGUC6Ms.js} +1 -1
- package/dist/assets/{RemoteAgentSettingsPanel-CgZvA4c3.js → RemoteAgentSettingsPanel-CCOe2O1O.js} +1 -1
- package/dist/assets/{RoomPanel-DU0mkU7E.js → RoomPanel-jgyrxLn2.js} +1 -1
- package/dist/assets/{RoutinesPage-D13_xSg1.js → RoutinesPage-D5Z3pmtB.js} +2 -2
- package/dist/assets/{SettingsModal-CcZSHI1Q.js → SettingsModal-CeKynb83.js} +2 -2
- package/dist/assets/{ShareTeamDialog-B6YC_fNs.js → ShareTeamDialog-D7qwIwXJ.js} +1 -1
- package/dist/assets/{SignedInSites-DhGidV0n.js → SignedInSites-Dh9imU42.js} +1 -1
- package/dist/assets/{TeamLibraryPanel-BbEiwnZ3.js → TeamLibraryPanel-nz4rcGmz.js} +1 -1
- package/dist/assets/{TeamMapPage-KMzRj_VW.js → TeamMapPage-CLdRh0ZK.js} +1 -1
- package/dist/assets/{TriggersPage-HTxYYCjT.js → TriggersPage-BByyX4CZ.js} +1 -1
- package/dist/assets/VisibilitySection-BNhdo2-L.js +22 -0
- package/dist/assets/{WebhookTrigger-oZ3yokI_.js → WebhookTrigger-DxDhbnYz.js} +1 -1
- package/dist/assets/{WorksOnGrid-CTR6tAQZ.js → WorksOnGrid-CUh8CexO.js} +1 -1
- package/dist/assets/{abnfDiagram-YUKMZFIV-v0NjYm2N.js → abnfDiagram-YUKMZFIV-uSJsuKuD.js} +1 -1
- package/dist/assets/{activity-DONzM_Hr.js → activity-CmQeVvqw.js} +1 -1
- package/dist/assets/{architectureDiagram-47P4ROYG-C9p47RSg.js → architectureDiagram-47P4ROYG-Br4Cv9sO.js} +1 -1
- package/dist/assets/{blockDiagram-E7TT5TSB-BjCDCsDZ.js → blockDiagram-E7TT5TSB-CzcaYs_s.js} +1 -1
- package/dist/assets/{c4Diagram-CRA5TL53-BwcLeGrs.js → c4Diagram-CRA5TL53-CDGjKlxD.js} +1 -1
- package/dist/assets/{calendar-days-C0163EM9.js → calendar-days-DSUOH-dL.js} +1 -1
- package/dist/assets/channel-N74fzi1P.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-DkMrEZ1P.js → chunk-2Q5K7J3B-CvuZ4KJD.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-BvT5jzrf.js → chunk-5VM5RSS4-negAvO9N.js} +1 -1
- package/dist/assets/{chunk-7TKQ45FW-BPY6DMgY.js → chunk-7TKQ45FW-DA_OVnE1.js} +1 -1
- package/dist/assets/{chunk-AW2ZBBNX-CA02FkCe.js → chunk-AW2ZBBNX-Dbtemotq.js} +1 -1
- package/dist/assets/{chunk-FVRAUYC3-DR_HIm4k.js → chunk-FVRAUYC3-Cnt25BNn.js} +2 -2
- package/dist/assets/{chunk-HTAEGDNF--Q5YJ5qq.js → chunk-HTAEGDNF-CtrZ11_G.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-CdUxnp0z.js → chunk-JWPE2WC7-DKZW0s8n.js} +1 -1
- package/dist/assets/{chunk-KQW6MTUR-CZ_kOJX4.js → chunk-KQW6MTUR-DLg5U6as.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-Baw_LI4a.js → chunk-XXDRQBXY-pkGzgUQb.js} +1 -1
- package/dist/assets/{classDiagram-v2-K4WV4PDN-C3p6RSXv.js → classDiagram-v2-K4WV4PDN-BUBR3HPE.js} +1 -1
- package/dist/assets/{coins-CRTGCu3d.js → coins-Dbmac6SO.js} +1 -1
- package/dist/assets/{core-CC13tV5g.js → core-BA6DGyEo.js} +1 -1
- package/dist/assets/{cose-bilkent-JH36ORCC-DexASxvw.js → cose-bilkent-JH36ORCC-BukDY2ET.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-CnBYCH8E.js → cynefin-EF2NZ3EQ-B3XBpINL.js} +1 -1
- package/dist/assets/{cynefinDiagram-3GCD6N5R-BxlPVTxc.js → cynefinDiagram-3GCD6N5R-BV0SrhK6.js} +1 -1
- package/dist/assets/{dagre-W4DXFKR2-DwHsGS35.js → dagre-W4DXFKR2-DzXXYwns.js} +1 -1
- package/dist/assets/{diagram-2UJZ2QOL-BitCWJhQ.js → diagram-2UJZ2QOL-BmOG88-j.js} +1 -1
- package/dist/assets/{diagram-OVF4WLC6-DVq8AK9P.js → diagram-OVF4WLC6-C9zP_sNp.js} +1 -1
- package/dist/assets/{diagram-PFPMY2P6-B1CGGTYD.js → diagram-PFPMY2P6-UzTTpwh8.js} +1 -1
- package/dist/assets/{diagram-UMYRVEAY-BJOrT_fX.js → diagram-UMYRVEAY-Bo-9jQh-.js} +1 -1
- package/dist/assets/{diagram-YEKJPTXX-CqTidMyp.js → diagram-YEKJPTXX-eNeARjiU.js} +1 -1
- package/dist/assets/{diagram-ZIFT7M5P-BrETFWbJ.js → diagram-ZIFT7M5P-Bp8Apm58.js} +1 -1
- package/dist/assets/{ebnfDiagram-VR2GEFS7-odzlCiG_.js → ebnfDiagram-VR2GEFS7-CThvAW5-.js} +1 -1
- package/dist/assets/{elk-IJKZMXRS-DOqejjFU.js → elk-IJKZMXRS-CIAQeuC1.js} +1 -1
- package/dist/assets/{erDiagram-O2IAPWRE-pus74-u1.js → erDiagram-O2IAPWRE-DJc0-QG5.js} +1 -1
- package/dist/assets/{file-up-VlqNWssp.js → file-up-uBDzou4C.js} +1 -1
- package/dist/assets/{flowDiagram-OXPTDLAJ-BoR02YXy.js → flowDiagram-OXPTDLAJ-CX1UCZsi.js} +1 -1
- package/dist/assets/{ganttDiagram-R7TSEDQI-DEWJjq9w.js → ganttDiagram-R7TSEDQI-CFCWgBLl.js} +1 -1
- package/dist/assets/{gitGraphDiagram-XJZIOB7I-A0Ut1vzJ.js → gitGraphDiagram-XJZIOB7I-BY59AEfH.js} +1 -1
- package/dist/assets/{import-name-N3p-c6pH.js → import-name-gQROrWbj.js} +1 -1
- package/dist/assets/{index-DGGq7mDN.js → index-CkdvX5_R.js} +1 -1
- package/dist/assets/{index-98brgMNT.js → index-a4OBw5ZS.js} +3 -3
- package/dist/assets/{infoDiagram-5W2HQ5XZ-IrI9xNS5.js → infoDiagram-5W2HQ5XZ-CiWYCcE-.js} +1 -1
- package/dist/assets/{ishikawaDiagram-K3B6WC7H-CcZaBkPV.js → ishikawaDiagram-K3B6WC7H-DXZKShaj.js} +1 -1
- package/dist/assets/{journeyDiagram-COXZFDF6-Lhq1JIrG.js → journeyDiagram-COXZFDF6-qrPSJHoF.js} +1 -1
- package/dist/assets/{kanban-definition-P3RFRI5V-Dpnd1w1Z.js → kanban-definition-P3RFRI5V-Ch9e9C4r.js} +1 -1
- package/dist/assets/{mermaid.core-CwYv1-pN.js → mermaid.core-DQALiqHr.js} +4 -4
- package/dist/assets/{mindmap-definition-LZFPQGKD-BQu-1VuI.js → mindmap-definition-LZFPQGKD-BirJD4xj.js} +1 -1
- package/dist/assets/{minimize-BRtvUvR3.js → minimize-DlAHYBEI.js} +1 -1
- package/dist/assets/{monitor-Gc_xwWHG.js → monitor-B-DfxCLW.js} +1 -1
- package/dist/assets/{new-bot-DhIjBWvQ.js → new-bot-CAtQzQF1.js} +1 -1
- package/dist/assets/{org-library-CmwcxARS.js → org-library-PVNP5n7J.js} +1 -1
- package/dist/assets/{package-format-BWl-RWvM.js → package-format-xp0kEF1i.js} +1 -1
- package/dist/assets/{pegDiagram-BGZESJAR-C2kBJx8q.js → pegDiagram-BGZESJAR-UzkL237f.js} +1 -1
- package/dist/assets/{pieDiagram-CAPJLFHJ-3IGf8-rd.js → pieDiagram-CAPJLFHJ-CPI42dPn.js} +1 -1
- package/dist/assets/{quadrantDiagram-GDMTTRAM-Ds0i1JJu.js → quadrantDiagram-GDMTTRAM-BEcjaKog.js} +1 -1
- package/dist/assets/{rail-BxO9nJ7b.js → rail-DzsIoRRT.js} +1 -1
- package/dist/assets/{railroadDiagram-SM67HX2B-C5HMZeLZ.js → railroadDiagram-SM67HX2B-B0KHoW-7.js} +1 -1
- package/dist/assets/{remote-desktop-panel-CVj-6tJX.js → remote-desktop-panel-BtSv4c6E.js} +1 -1
- package/dist/assets/{requirementDiagram-X7JNWC4A-W7wEhXbS.js → requirementDiagram-X7JNWC4A-BdBqE5oc.js} +1 -1
- package/dist/assets/{sankeyDiagram-UM26HJRW-BIIvZEMK.js → sankeyDiagram-UM26HJRW-o-m5UnNV.js} +1 -1
- package/dist/assets/{sequenceDiagram-ZO4K6R2Y-B6ZAapb0.js → sequenceDiagram-ZO4K6R2Y-CS89JhnM.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-CijBtoJ-.js → sizeCapture-INFHLROL-u3jsM9rY.js} +1 -1
- package/dist/assets/{stateDiagram-v2-TBUQTH76-gVAJTp58.js → stateDiagram-v2-TBUQTH76-ZR8x5js6.js} +1 -1
- package/dist/assets/styles-_tGCSCNl.css +1 -0
- package/dist/assets/{swimlanes-N4OXWK64-1T5CmmoT.js → swimlanes-N4OXWK64-CxHXcQ4B.js} +1 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-DJxa56rP.js +8 -0
- package/dist/assets/{team-share-DZ71boDj.js → team-share-DNj2KZjX.js} +1 -1
- package/dist/assets/{timeline-definition-YOQAKGHF-b2WZ1F71.js → timeline-definition-YOQAKGHF-Bhgot_xM.js} +1 -1
- package/dist/assets/{usecaseDiagram-VIAY4XPW-DvPVm705.js → usecaseDiagram-VIAY4XPW-C4T3EUA4.js} +1 -1
- package/dist/assets/{vennDiagram-BLWOH2XV-BG-PWVxl.js → vennDiagram-BLWOH2XV-B1Z8NDj7.js} +1 -1
- package/dist/assets/{wardleyDiagram-YMQ3BMBF-5xjAr3nW.js → wardleyDiagram-YMQ3BMBF-D3gNVcd7.js} +1 -1
- package/dist/assets/{xychartDiagram-TAQBALBS-DgoVlD5n.js → xychartDiagram-TAQBALBS-CM-Am2Dc.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/rail.html +6 -6
- package/dist-server/bot-box/box-check.js +6 -6
- package/dist-server/drivers/agents-proxy.js +50 -48
- package/dist-server/hybrid-plugin-gateway.js +1489 -0
- package/dist-server/index.js +5689 -5583
- package/dist-server/limixbot.js +517 -508
- package/dist-server/mcp-gate.js +76 -61
- package/dist-server/mcp-remote-proxy.js +26 -23
- package/dist-server/mcp-server.js +28 -25
- package/dist-server/package.json +1 -1
- package/dist-server/pair-cli.js +517 -508
- package/dist-server/scripts/mcp-server.js +30 -27
- package/dist-server/server/agents-turn.js +1 -0
- package/dist-server/server/app-settings/registry-bots.js +3 -3
- package/dist-server/server/app-settings/registry-window.js +2 -2
- package/dist-server/server/auto-approve.js +2 -0
- package/dist-server/server/bot-box/env.js +2 -2
- package/dist-server/server/bot-channels/engine.js +2 -1
- package/dist-server/server/bot-channels/messenger.js +6 -6
- package/dist-server/server/cli-usage.js +2 -2
- package/dist-server/server/drivers/acp/native-process-sampler.js +84 -0
- package/dist-server/server/drivers/acp/quiet-status.js +12 -3
- package/dist-server/server/drivers/agents-call.js +4 -0
- package/dist-server/server/drivers/agents-catalog-profile.js +1 -0
- package/dist-server/server/drivers/agents-catalog.js +16 -1
- package/dist-server/server/drivers/agents-mcp-env.js +1 -1
- package/dist-server/server/drivers/claude-elicitation.js +21 -9
- package/dist-server/server/drivers/elicited-consent.js +24 -0
- package/dist-server/server/headless/client.js +10 -9
- package/dist-server/server/headless/main.js +1 -1
- package/dist-server/server/host/trust-answers.js +34 -1
- package/dist-server/server/hybrid-plugin-gateway.js +162 -0
- package/dist-server/server/hybrid-plugin-manifest.js +99 -0
- package/dist-server/server/index.js +120 -5
- package/dist-server/server/limix-native-path.js +8 -0
- package/dist-server/server/mcp-app-connections.js +58 -5
- package/dist-server/server/mcp-gate-tasks.js +75 -0
- package/dist-server/server/mcp-gate.js +81 -5
- package/dist-server/server/mcp-http.js +34 -6
- package/dist-server/server/mcp-native-response.js +112 -0
- package/dist-server/server/mcp-skills.js +263 -0
- package/dist-server/server/mcp-trim.js +15 -8
- package/dist-server/server/outbound-hold.js +13 -2
- package/dist-server/server/outbound-requests.js +71 -0
- package/dist-server/server/plugin-hub.js +259 -25
- package/dist-server/server/plugin-passages.js +16 -0
- package/dist-server/server/routes/app-settings.js +2 -2
- package/dist-server/server/routes/bot-messages.js +2 -2
- package/dist-server/server/routes/plugin-mcp.js +118 -0
- package/dist-server/server/routes/plugin-studio.js +50 -0
- package/dist-server/server/runtime/tree.js +1 -1
- package/dist-server/server/side-jobs.js +1 -1
- package/dist-server/shared/plugin-hub.js +6 -2
- package/dist-server/vps-container-mcp.js +6 -6
- package/package.json +1 -1
- package/skills/limix-bot-factory/SKILL.md +2 -0
- package/skills/limix-bot-factory/assets/schemas/bot-spec.schema.json +14 -0
- package/skills/limix-bot-factory/references/integration-blueprint.md +1 -1
- package/skills/limix-bot-factory/references/vi.md +4 -0
- package/skills/limix-bot-factory/scripts/factorylib/cli.py +2 -1
- package/skills/limix-bot-factory/scripts/factorylib/core.py +19 -1
- package/skills/limix-bot-factory/scripts/factorylib/engine.py +10 -1
- package/skills/limix-bot-factory/scripts/mcp_server.py +3 -3
- package/dist/assets/VisibilitySection-CZiqicF5.js +0 -22
- package/dist/assets/channel-BloV1v8U.js +0 -1
- package/dist/assets/mcp-servers-z68ouwLN.js +0 -1
- package/dist/assets/styles-DiAFRlxu.css +0 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-D0mOoyOD.js +0 -8
- /package/dist/assets/{styles-Be5qq6WR.js → styles-CE92r4H3.js} +0 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { createHash, createHmac, randomBytes } from "node:crypto";
|
|
2
|
+
import { linkSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { isDeepStrictEqual } from "node:util";
|
|
5
|
+
import { parseDocument } from "yaml";
|
|
6
|
+
import { canonicalJson } from "../shared/package-format.js";
|
|
7
|
+
import { DESCRIPTION_MAX, isSkillName, SKILL_FILE_MAX_BYTES } from "../shared/skill-md.js";
|
|
8
|
+
import { openSkillConnection } from "./mcp-app-connections.js";
|
|
9
|
+
const EXTENSION = "io.modelcontextprotocol/skills";
|
|
10
|
+
const MAX_ENTRIES = 1000;
|
|
11
|
+
const MAX_PAGES = 32;
|
|
12
|
+
const MAX_FILES = 1024;
|
|
13
|
+
const MAX_RESOURCE_BYTES = 2 * 1024 * 1024;
|
|
14
|
+
const MAX_CACHE_BYTES = 8 * 1024 * 1024;
|
|
15
|
+
const ephemeralKey = randomBytes(32);
|
|
16
|
+
const cache = new Map();
|
|
17
|
+
let cacheBytes = 0;
|
|
18
|
+
function object(value) {
|
|
19
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
20
|
+
}
|
|
21
|
+
function revisionKey(dataDir) {
|
|
22
|
+
if (!dataDir)
|
|
23
|
+
return ephemeralKey;
|
|
24
|
+
const path = join(dataDir, "mcp-skills-origin.key");
|
|
25
|
+
const read = () => {
|
|
26
|
+
const key = readFileSync(path);
|
|
27
|
+
if (key.length !== 32)
|
|
28
|
+
throw new Error("Invalid MCP skill origin key");
|
|
29
|
+
return key;
|
|
30
|
+
};
|
|
31
|
+
try {
|
|
32
|
+
return read();
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
if (err.code !== "ENOENT")
|
|
36
|
+
throw err;
|
|
37
|
+
}
|
|
38
|
+
const temp = path + "." + randomBytes(16).toString("hex");
|
|
39
|
+
writeFileSync(temp, randomBytes(32), { mode: 0o600, flag: "wx" });
|
|
40
|
+
try {
|
|
41
|
+
linkSync(temp, path);
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
if (err.code !== "EEXIST")
|
|
45
|
+
throw err;
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
unlinkSync(temp);
|
|
49
|
+
}
|
|
50
|
+
return read();
|
|
51
|
+
}
|
|
52
|
+
function capabilities(raw) {
|
|
53
|
+
const extensions = object(raw.extensions) ? raw.extensions : {};
|
|
54
|
+
const config = extensions[EXTENSION];
|
|
55
|
+
const resources = object(raw.resources);
|
|
56
|
+
const skills = resources && object(config);
|
|
57
|
+
return { resources, skills, directoryRead: skills && config.directoryRead === true,
|
|
58
|
+
tools: object(raw.tools), prompts: object(raw.prompts), tasks: object(extensions["io.modelcontextprotocol/tasks"]) || object(raw.tasks) };
|
|
59
|
+
}
|
|
60
|
+
function hasControl(text) {
|
|
61
|
+
for (const char of text) {
|
|
62
|
+
const code = char.charCodeAt(0);
|
|
63
|
+
if (code < 32 || code === 127)
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
function validUri(value) {
|
|
69
|
+
if (typeof value !== "string" || value.length > 4096 || !/^[a-z][a-z\d+.-]*:\/\//i.test(value))
|
|
70
|
+
return false;
|
|
71
|
+
try {
|
|
72
|
+
return !hasControl(value) && !/[?#\\\s]/.test(value) && value.slice(value.indexOf("://") + 3).split("/").every(part => {
|
|
73
|
+
const decoded = decodeURIComponent(part);
|
|
74
|
+
return decoded !== "." && decoded !== ".." && !hasControl(decoded) && !/[/\\]/.test(decoded);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function entryOf(value) {
|
|
82
|
+
if (!object(value) || !validUri(value.uri) || !object(value.frontmatter))
|
|
83
|
+
throw new Error("Invalid MCP skill entry");
|
|
84
|
+
const { uri, frontmatter } = value;
|
|
85
|
+
const { name, description } = frontmatter;
|
|
86
|
+
if (typeof name !== "string" || !isSkillName(name) || !uri.endsWith("/" + name + "/SKILL.md")
|
|
87
|
+
|| typeof description !== "string" || !description.trim() || description.length > DESCRIPTION_MAX)
|
|
88
|
+
throw new Error("Invalid MCP skill metadata");
|
|
89
|
+
const root = uri.slice(0, -"SKILL.md".length);
|
|
90
|
+
let files = null;
|
|
91
|
+
if (value.resources !== "dynamic") {
|
|
92
|
+
if (!Array.isArray(value.resources) || value.resources.length > MAX_FILES)
|
|
93
|
+
throw new Error("Invalid MCP skill manifest");
|
|
94
|
+
const seen = new Set();
|
|
95
|
+
files = value.resources.map((file) => {
|
|
96
|
+
if (!object(file) || !validUri(file.uri) || !file.uri.startsWith(root) || file.uri === root || seen.has(file.uri)
|
|
97
|
+
|| typeof file.digest !== "string" || !/^sha256:[a-f0-9]{64}$/.test(file.digest)
|
|
98
|
+
|| typeof file.size !== "number" || !Number.isSafeInteger(file.size) || file.size < 0)
|
|
99
|
+
throw new Error("Invalid MCP skill file");
|
|
100
|
+
seen.add(file.uri);
|
|
101
|
+
return { uri: file.uri, digest: file.digest, size: file.size };
|
|
102
|
+
});
|
|
103
|
+
if (!seen.has(uri))
|
|
104
|
+
throw new Error("MCP skill manifest is missing SKILL.md");
|
|
105
|
+
files.sort((a, b) => a.uri < b.uri ? -1 : a.uri > b.uri ? 1 : 0);
|
|
106
|
+
}
|
|
107
|
+
return { uri, name, description, frontmatter, files, root };
|
|
108
|
+
}
|
|
109
|
+
function summarize(entry, identity) {
|
|
110
|
+
const { uri, name, description, files } = entry;
|
|
111
|
+
const revision = files && createHash("sha256").update(canonicalJson([identity, uri, files])).digest("hex");
|
|
112
|
+
return { uri, name, description, revision, fileCount: files?.length ?? 0 };
|
|
113
|
+
}
|
|
114
|
+
async function connected(origin, server, as, run) {
|
|
115
|
+
const identity = createHmac("sha256", revisionKey(as.dataDir)).update(canonicalJson([origin, server])).digest("hex");
|
|
116
|
+
const connection = await openSkillConnection(server, AbortSignal.timeout(30_000), as);
|
|
117
|
+
try {
|
|
118
|
+
return await run(connection, identity);
|
|
119
|
+
}
|
|
120
|
+
finally {
|
|
121
|
+
await connection.close();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async function pages(c, method, field, params) {
|
|
125
|
+
const all = [];
|
|
126
|
+
const seen = new Set();
|
|
127
|
+
let cursor;
|
|
128
|
+
let bytes = 0;
|
|
129
|
+
for (let page = 0; page < MAX_PAGES; page++) {
|
|
130
|
+
const response = await c.request(method, cursor === undefined ? params : { ...params, cursor });
|
|
131
|
+
if (!object(response) || !Array.isArray(response[field]))
|
|
132
|
+
throw new Error("Invalid MCP listing");
|
|
133
|
+
if (all.length + response[field].length > MAX_ENTRIES)
|
|
134
|
+
throw new Error("MCP listing exceeds the item limit");
|
|
135
|
+
bytes += Buffer.byteLength(JSON.stringify(response[field]));
|
|
136
|
+
if (bytes > 8 * 1024 * 1024)
|
|
137
|
+
throw new Error("MCP listing exceeds the byte limit");
|
|
138
|
+
all.push(...response[field]);
|
|
139
|
+
const next = response.nextCursor;
|
|
140
|
+
if (next === undefined)
|
|
141
|
+
return all;
|
|
142
|
+
if (typeof next !== "string" || !next || next.length > 4096 || seen.has(next))
|
|
143
|
+
throw new Error("Invalid MCP pagination cursor");
|
|
144
|
+
cursor = next;
|
|
145
|
+
seen.add(next);
|
|
146
|
+
}
|
|
147
|
+
throw new Error("MCP listing exceeds the page limit");
|
|
148
|
+
}
|
|
149
|
+
export async function discoverMcpSkills(origin, server, as = {}) {
|
|
150
|
+
return connected(origin, server, as, async (client, identity) => {
|
|
151
|
+
const caps = capabilities(client.capabilities);
|
|
152
|
+
const skills = caps.skills ? (await pages(client, "skills/list", "skills", {})).map(value => summarize(entryOf(value), identity)) : [];
|
|
153
|
+
if (new Set(skills.map(skill => skill.uri)).size !== skills.length)
|
|
154
|
+
throw new Error("Duplicate MCP skill URI");
|
|
155
|
+
return { origin, capabilities: caps, skills };
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
export async function listMcpInventory(origin, server, kind, as = {}) {
|
|
159
|
+
return connected(origin, server, as, async (client) => {
|
|
160
|
+
if (!capabilities(client.capabilities)[kind])
|
|
161
|
+
throw new Error("Capability unavailable on this MCP server");
|
|
162
|
+
const listed = await pages(client, kind + "/list", kind, {});
|
|
163
|
+
const items = listed.map(value => {
|
|
164
|
+
if (!object(value) || typeof value.name !== "string" || !value.name || value.name.length > 1024)
|
|
165
|
+
throw new Error("Invalid MCP inventory entry");
|
|
166
|
+
if (kind === "resources" && (typeof value.uri !== "string" || !value.uri || value.uri.length > 4096))
|
|
167
|
+
throw new Error("Invalid MCP resource URI");
|
|
168
|
+
return {
|
|
169
|
+
name: value.name,
|
|
170
|
+
...(typeof value.description === "string" ? { description: value.description.slice(0, 4096) } : {}),
|
|
171
|
+
...(kind === "resources" && typeof value.uri === "string" ? { uri: value.uri } : {}),
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
return { origin, kind, items };
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
export class McpSkillChanged extends Error {
|
|
178
|
+
}
|
|
179
|
+
async function heldEntry(c, identity, uri, revision) {
|
|
180
|
+
if (!capabilities(c.capabilities).skills)
|
|
181
|
+
throw new Error("MCP server does not advertise Skills");
|
|
182
|
+
if (!validUri(uri) || !uri.endsWith("/SKILL.md") || !/^[a-f0-9]{64}$/.test(revision))
|
|
183
|
+
throw new Error("Invalid MCP skill selection");
|
|
184
|
+
const response = await c.request("skills/get", { uri });
|
|
185
|
+
const entry = entryOf(object(response) && response.skill);
|
|
186
|
+
if (entry.uri !== uri || !entry.files || summarize(entry, identity).revision !== revision)
|
|
187
|
+
throw new McpSkillChanged("MCP skill changed. Review its current manifest.");
|
|
188
|
+
return { ...entry, files: entry.files };
|
|
189
|
+
}
|
|
190
|
+
function discard(key) {
|
|
191
|
+
const file = cache.get(key);
|
|
192
|
+
if (file) {
|
|
193
|
+
cacheBytes -= file.bytes.length;
|
|
194
|
+
cache.delete(key);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
async function readFile(c, file, key, limit) {
|
|
198
|
+
if (file.size > limit)
|
|
199
|
+
throw new Error("MCP skill resource exceeds the size limit");
|
|
200
|
+
const cached = cache.get(key);
|
|
201
|
+
if (cached && cached.until > Date.now())
|
|
202
|
+
return cached.bytes;
|
|
203
|
+
discard(key);
|
|
204
|
+
const response = await c.request("resources/read", { uri: file.uri });
|
|
205
|
+
if (!object(response) || !Array.isArray(response.contents) || response.contents.length !== 1)
|
|
206
|
+
throw new Error("Invalid MCP resource result");
|
|
207
|
+
const part = response.contents[0];
|
|
208
|
+
if (!object(part) || part.uri !== file.uri || (typeof part.text === "string") === (typeof part.blob === "string"))
|
|
209
|
+
throw new Error("Invalid MCP resource content");
|
|
210
|
+
const bytes = typeof part.text === "string" ? Buffer.from(part.text) : Buffer.from(part.blob, "base64");
|
|
211
|
+
if ((typeof part.blob === "string" && bytes.toString("base64") !== part.blob) || bytes.length !== file.size
|
|
212
|
+
|| "sha256:" + createHash("sha256").update(bytes).digest("hex") !== file.digest)
|
|
213
|
+
throw new McpSkillChanged("MCP skill resource failed its integrity check");
|
|
214
|
+
if (typeof response.ttlMs === "number" && response.ttlMs > 0 && Number.isFinite(response.ttlMs)) {
|
|
215
|
+
discard(key);
|
|
216
|
+
while (cacheBytes + bytes.length > MAX_CACHE_BYTES || cache.size >= 256)
|
|
217
|
+
discard(cache.keys().next().value);
|
|
218
|
+
cache.set(key, { bytes, until: Date.now() + Math.min(response.ttlMs, 300_000) });
|
|
219
|
+
cacheBytes += bytes.length;
|
|
220
|
+
}
|
|
221
|
+
return bytes;
|
|
222
|
+
}
|
|
223
|
+
export async function previewMcpSkill(origin, server, uri, revision, as = {}) {
|
|
224
|
+
return connected(origin, server, as, async (c, identity) => {
|
|
225
|
+
const entry = await heldEntry(c, identity, uri, revision);
|
|
226
|
+
const file = entry.files.find(resource => resource.uri === uri);
|
|
227
|
+
const key = JSON.stringify([as.id, identity, revision, uri]);
|
|
228
|
+
const bytes = await readFile(c, file, key, SKILL_FILE_MAX_BYTES);
|
|
229
|
+
const text = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
230
|
+
const yaml = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(text);
|
|
231
|
+
const doc = yaml && parseDocument(yaml[1], { schema: "core", uniqueKeys: true });
|
|
232
|
+
if (!doc || doc.errors.length || doc.warnings.length || !isDeepStrictEqual(doc.toJS({ maxAliasCount: 0 }), entry.frontmatter)) {
|
|
233
|
+
discard(key);
|
|
234
|
+
throw new McpSkillChanged("MCP skill frontmatter differs from its manifest");
|
|
235
|
+
}
|
|
236
|
+
return { origin, uri, revision, text, name: entry.name, description: entry.description,
|
|
237
|
+
...(typeof entry.frontmatter.license === "string" ? { license: entry.frontmatter.license } : {}) };
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
export async function readMcpSkillResource(origin, server, uri, revision, resource, as = {}) {
|
|
241
|
+
return connected(origin, server, as, async (c, identity) => {
|
|
242
|
+
const entry = await heldEntry(c, identity, uri, revision);
|
|
243
|
+
const file = entry.files.find(f => f.uri === resource);
|
|
244
|
+
if (!file || resource.endsWith("/SKILL.md"))
|
|
245
|
+
throw new Error("Select the skill itself or a listed supporting file");
|
|
246
|
+
const key = JSON.stringify([as.id, identity, revision, resource]);
|
|
247
|
+
const bytes = await readFile(c, file, key, MAX_RESOURCE_BYTES);
|
|
248
|
+
return { origin, uri: resource, revision, blob: bytes.toString("base64") };
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
export async function listMcpSkillDirectory(origin, server, uri, revision, directory, as = {}) {
|
|
252
|
+
return connected(origin, server, as, async (client, identity) => {
|
|
253
|
+
if (!capabilities(client.capabilities).directoryRead)
|
|
254
|
+
throw new Error("MCP server does not advertise directory reads");
|
|
255
|
+
const entry = await heldEntry(client, identity, uri, revision);
|
|
256
|
+
const prefix = directory + "/";
|
|
257
|
+
if (!validUri(directory) || !prefix.startsWith(entry.root) || !entry.files.some(file => file.uri.startsWith(prefix)))
|
|
258
|
+
throw new Error("Directory outside the held MCP skill");
|
|
259
|
+
const listed = await pages(client, "resources/directory/read", "resources", { uri: directory });
|
|
260
|
+
const children = new Set(entry.files.filter(f => f.uri.startsWith(prefix)).map(f => prefix + f.uri.slice(prefix.length).split("/")[0]));
|
|
261
|
+
return { origin, uri: directory, revision, resources: listed.flatMap(r => object(r) && typeof r.uri === "string" && children.has(r.uri) ? [{ uri: r.uri }] : []) };
|
|
262
|
+
});
|
|
263
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const DEFAULT_RESULT_BUDGET = 8_000;
|
|
2
2
|
/** The gate's own read-only query over a held result (mcp-shape.ts); named here so the banner and the tool never drift apart. */
|
|
3
3
|
export const QUERY_TOOL_NAME = "query_result";
|
|
4
|
-
const
|
|
4
|
+
export const MIN_RESULT_BUDGET = 512;
|
|
5
5
|
const fmt = (n) => n.toLocaleString("en-US");
|
|
6
6
|
function serialize(value) {
|
|
7
7
|
try {
|
|
@@ -90,7 +90,7 @@ function wrap(body, banner, footer = banner) {
|
|
|
90
90
|
return `${banner}\n\n${body}\n\n${footer}`;
|
|
91
91
|
}
|
|
92
92
|
export function trimStructured(parsed, budget) {
|
|
93
|
-
const room = Math.max(
|
|
93
|
+
const room = Math.max(MIN_RESULT_BUDGET, budget);
|
|
94
94
|
const current = serialize(parsed);
|
|
95
95
|
if (current !== null && current.length <= room)
|
|
96
96
|
return null;
|
|
@@ -126,7 +126,7 @@ export function trimStructured(parsed, budget) {
|
|
|
126
126
|
}
|
|
127
127
|
export function trimResultText(input) {
|
|
128
128
|
const { text } = input;
|
|
129
|
-
const budget = Math.max(
|
|
129
|
+
const budget = Math.max(MIN_RESULT_BUDGET, input.budget ?? DEFAULT_RESULT_BUDGET);
|
|
130
130
|
if (text.length <= budget)
|
|
131
131
|
return { text, trimmed: false, originalChars: text.length };
|
|
132
132
|
let parsed;
|
|
@@ -136,16 +136,23 @@ export function trimResultText(input) {
|
|
|
136
136
|
catch {
|
|
137
137
|
parsed = undefined;
|
|
138
138
|
}
|
|
139
|
+
return formatTrimmedText(input, budget, text.length, parsed);
|
|
140
|
+
}
|
|
141
|
+
export function trimPlainResultPrefix(input, originalChars) {
|
|
142
|
+
const budget = Math.max(MIN_RESULT_BUDGET, input.budget ?? DEFAULT_RESULT_BUDGET);
|
|
143
|
+
return formatTrimmedText(input, budget, originalChars, undefined);
|
|
144
|
+
}
|
|
145
|
+
function formatTrimmedText(input, budget, originalChars, parsed) {
|
|
139
146
|
const fields = parsed === undefined ? [] : arrayFields(parsed);
|
|
140
147
|
// Banners sized at their widest, so the whole result lands under the budget; the short form when full ones would eat half.
|
|
141
148
|
const held = input.held;
|
|
142
|
-
const banner = (opts) => truncationBanner({ originalChars
|
|
149
|
+
const banner = (opts) => truncationBanner({ originalChars, spillPath: input.spillPath, spillHint: input.spillHint, held, ...opts });
|
|
143
150
|
const widestOf = (short) => {
|
|
144
151
|
const variants = [
|
|
145
152
|
{ dropped: fields.map((f) => ({ key: f.key, kept: Math.max(0, f.items.length - 1), total: f.items.length })), structural: true },
|
|
146
153
|
{ dropped: [], structural: false },
|
|
147
154
|
];
|
|
148
|
-
return Math.max(...variants.map((v) => banner({ ...v, short, keptChars:
|
|
155
|
+
return Math.max(...variants.map((v) => banner({ ...v, short, keptChars: originalChars }).length + banner({ ...v, short, keptChars: originalChars, footer: Boolean(held) }).length));
|
|
149
156
|
};
|
|
150
157
|
const fullRoom = budget - (widestOf(false) + 4);
|
|
151
158
|
const short = fullRoom < budget / 2;
|
|
@@ -177,16 +184,16 @@ export function trimResultText(input) {
|
|
|
177
184
|
return {
|
|
178
185
|
text: wrap(json, banner({ keptChars: json.length, dropped, structural: true, short }), banner({ keptChars: json.length, dropped, structural: true, short, footer: Boolean(held) })),
|
|
179
186
|
trimmed: true,
|
|
180
|
-
originalChars
|
|
187
|
+
originalChars,
|
|
181
188
|
value,
|
|
182
189
|
};
|
|
183
190
|
}
|
|
184
191
|
}
|
|
185
192
|
}
|
|
186
|
-
const cut = cutAt(text, room);
|
|
193
|
+
const cut = cutAt(input.text, room);
|
|
187
194
|
return {
|
|
188
195
|
text: wrap(cut, banner({ keptChars: cut.length, dropped: [], structural: false, short }), banner({ keptChars: cut.length, dropped: [], structural: false, short, footer: Boolean(held) })),
|
|
189
196
|
trimmed: true,
|
|
190
|
-
originalChars
|
|
197
|
+
originalChars,
|
|
191
198
|
};
|
|
192
199
|
}
|
|
@@ -19,12 +19,19 @@ export function createOutboundHold(deps) {
|
|
|
19
19
|
const DATA_DIR = deps.dataDir;
|
|
20
20
|
const { holdMs } = deps;
|
|
21
21
|
return {
|
|
22
|
-
async hold({ bot: currentSender, threadId, tool: outboundTool, calls: outboundCalls, opaque, fullAccess, active }) {
|
|
22
|
+
async hold({ bot: currentSender, threadId, tool: outboundTool, calls: outboundCalls, opaque, fullAccess, active, persist, discard }) {
|
|
23
23
|
const refuseOutbound = (text) => ({ ok: false, text });
|
|
24
24
|
if (!sendsWithoutAsking(currentSender.outbound, fullAccess, opaque)) {
|
|
25
25
|
const { app, calls, summary } = outboundCard(outboundCalls);
|
|
26
26
|
const owner = connectorThread(currentSender.id, threadId);
|
|
27
27
|
const held = outboundRequests.open({ botId: currentSender.id, threadId, tool: outboundTool, timeoutMs: holdMs });
|
|
28
|
+
try {
|
|
29
|
+
persist?.(held.requestId, Date.now() + 24 * 60 * 60_000);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
outboundRequests.forget(held.requestId);
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
28
35
|
const card = store.appendMessage(threadId, {
|
|
29
36
|
role: "bot",
|
|
30
37
|
kind: "options",
|
|
@@ -65,6 +72,10 @@ export function createOutboundHold(deps) {
|
|
|
65
72
|
}
|
|
66
73
|
}
|
|
67
74
|
if (answer !== "allow") {
|
|
75
|
+
if (answer === "timeout" && persist) {
|
|
76
|
+
return refuseOutbound("The send is still pending on its approval card for 24 hours. Do not start another send for this message.");
|
|
77
|
+
}
|
|
78
|
+
discard?.(held.requestId);
|
|
68
79
|
if (answer === "timeout") {
|
|
69
80
|
const stale = store.messagesFor(threadId).find((message) => message.id === card.id);
|
|
70
81
|
if (stale?.card && !stale.card.answered) {
|
|
@@ -75,7 +86,7 @@ export function createOutboundHold(deps) {
|
|
|
75
86
|
? "Limix Bot did not send this: nobody answered the approval in time. Ask the user before trying again."
|
|
76
87
|
: "Limix Bot did not send this: the user declined. Do not retry it; ask the user what they would like instead.");
|
|
77
88
|
}
|
|
78
|
-
return { ok: true, approved: true };
|
|
89
|
+
return { ok: true, approved: true, ...(persist ? { requestId: held.requestId } : {}) };
|
|
79
90
|
}
|
|
80
91
|
return { ok: true, approved: false };
|
|
81
92
|
},
|
|
@@ -1,5 +1,76 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { writeFileAtomic } from "./atomic.js";
|
|
1
5
|
import { randomUUID } from "node:crypto";
|
|
2
6
|
import { describeTool } from "./activity.js";
|
|
7
|
+
const savedSend = z.object({
|
|
8
|
+
botId: z.string(),
|
|
9
|
+
threadId: z.string(),
|
|
10
|
+
connection: z.string(),
|
|
11
|
+
expiresAt: z.number(),
|
|
12
|
+
args: z.object({
|
|
13
|
+
recipient_email: z.string().min(1),
|
|
14
|
+
subject: z.string(),
|
|
15
|
+
body: z.string(),
|
|
16
|
+
user_id: z.literal("me").optional(),
|
|
17
|
+
extra_recipients: z.array(z.string()).optional(),
|
|
18
|
+
cc: z.array(z.string()).optional(),
|
|
19
|
+
}).strict(),
|
|
20
|
+
});
|
|
21
|
+
export function exactGmailSend(args) {
|
|
22
|
+
const parsed = savedSend.shape.args.safeParse(args);
|
|
23
|
+
return parsed.success && JSON.stringify(parsed.data).length <= 400 ? parsed.data : undefined;
|
|
24
|
+
}
|
|
25
|
+
export class PendingOutboundSends {
|
|
26
|
+
dir;
|
|
27
|
+
constructor(dir) { this.dir = dir; }
|
|
28
|
+
path(requestId) {
|
|
29
|
+
if (!/^[0-9a-f-]{36}$/.test(requestId))
|
|
30
|
+
throw new Error("Invalid outbound request ID");
|
|
31
|
+
return join(this.dir, requestId + ".json");
|
|
32
|
+
}
|
|
33
|
+
save(requestId, send) {
|
|
34
|
+
mkdirSync(this.dir, { recursive: true, mode: 0o700 });
|
|
35
|
+
writeFileAtomic(this.path(requestId), JSON.stringify(send), { mode: 0o600 });
|
|
36
|
+
}
|
|
37
|
+
get(requestId, threadId) {
|
|
38
|
+
if (!/^[0-9a-f-]{36}$/.test(requestId))
|
|
39
|
+
return;
|
|
40
|
+
try {
|
|
41
|
+
const saved = savedSend.parse(JSON.parse(readFileSync(this.path(requestId), "utf8")));
|
|
42
|
+
if (saved.threadId === threadId && saved.expiresAt > Date.now())
|
|
43
|
+
return saved;
|
|
44
|
+
if (saved.expiresAt <= Date.now())
|
|
45
|
+
this.discard(requestId);
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
if (error.code !== "ENOENT")
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
discard(requestId) {
|
|
53
|
+
try {
|
|
54
|
+
unlinkSync(this.path(requestId));
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
if (error.code !== "ENOENT")
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
claim(requestId) {
|
|
62
|
+
const path = this.path(requestId);
|
|
63
|
+
// Consume the pending record before talking to Gmail. An ambiguous result must never be retried automatically.
|
|
64
|
+
renameSync(path, path + ".claimed");
|
|
65
|
+
writeFileAtomic(path + ".claimed", "", { mode: 0o600 });
|
|
66
|
+
}
|
|
67
|
+
dispatching(requestId) {
|
|
68
|
+
return /^[0-9a-f-]{36}$/.test(requestId) && existsSync(this.path(requestId) + ".claimed");
|
|
69
|
+
}
|
|
70
|
+
complete(requestId) {
|
|
71
|
+
unlinkSync(this.path(requestId) + ".claimed");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
3
74
|
export class OutboundRequestService {
|
|
4
75
|
held = new Map();
|
|
5
76
|
open(input) {
|