@zibby/core 2.0.13 → 2.0.14
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.js +115 -115
- package/dist/mcp/tool-broker-server.js +6 -3
- package/dist/package.json +5 -4
- package/dist/register-built-in-strategies.js +39 -39
- package/dist/strategies/codex-strategy.js +9 -9
- package/dist/strategies/gemini-strategy.js +10 -10
- package/dist/strategies/index.js +75 -75
- package/dist/strategies/tool-broker.js +1 -1
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mkdtempSync as
|
|
1
|
+
import{mkdtempSync as d,writeFileSync as w,mkdirSync as L,existsSync as O}from"fs";import{join as a,dirname as b}from"path";import{tmpdir as j}from"os";import{fileURLToPath as k}from"url";var m=Object.freeze({claude:"native",codex:"broker",gemini:"broker",cursor:"eager"});function l(r){return m[r]||"eager"}var P=new Set(Object.entries(m).filter(([,r])=>r==="native").map(([r])=>r)),h=Symbol("zibby.mcp.alwaysLoad");var y="toolbox";function x(){let r=b(k(import.meta.url));for(let e=r,c=0;c<4;c++,e=b(e)){let n=a(e,"mcp","tool-broker-server.js");if(O(n))return n}throw new Error(`[tool-broker] cannot find mcp/tool-broker-server.js from ${r} \u2014 the package layout changed, or the build did not emit it.`)}function S(){let r=String(process.env.MCP_TOOL_BROKER??"").trim().toLowerCase();return!(r==="0"||r==="false"||r==="off")}function A(r){if(r){let e=a(r,".mcp-broker");return L(e,{recursive:!0}),a(e,"spec.json")}return a(d(a(j(),"mcp-broker-")),"spec.json")}function C(r,e,{sessionPath:c,toolWorkingSet:n}={}){let o=e&&typeof e=="object"?e:{},i=Object.keys(o);if(!i.length||l(r)!=="broker"||!S()||i.length===1)return o;let s=i.filter(t=>o[t]&&o[t][h]===!0),u=A(c),f=Array.isArray(n?.warmTools)?n.warmTools.filter(t=>t&&typeof t.server=="string"&&typeof t.tool=="string").map(t=>({server:t.server,tool:t.tool,...Number.isFinite(Number(t.lastUsedAt))?{lastUsedAt:Number(t.lastUsedAt)}:{}})):[],p=typeof n?.usagePath=="string"&&n.usagePath.trim()?n.usagePath.trim():null;w(u,JSON.stringify({servers:o,pinned:s,...f.length?{warmTools:f}:{},...p?{usagePath:p}:{}},null,2),{mode:384}),console.error(`[tool-broker] ${r}: ${i.length} server(s) behind "${y}"${s.length?` (pinned: ${s.join(", ")})`:""} \u2014 spec ${u}`);let g={command:process.execPath,args:[x(),"--spec",u]};return{[y]:g}}export{y as BROKER_SERVER_NAME,x as brokerServerPath,C as brokerize};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zibby/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.14",
|
|
4
4
|
"description": "Core test automation engine with multi-agent and multi-MCP support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"test:watch": "vitest",
|
|
34
34
|
"test:state-schema": "vitest run test/state-schema.test.js",
|
|
35
35
|
"test:state-schema:e2e": "node test/state-schema.e2e.test.js",
|
|
36
|
+
"eval:tool-broker-working-set": "node test/tool-broker-working-set.eval.mjs",
|
|
36
37
|
"export:workflows": "node scripts/export-default-workflows.js",
|
|
37
38
|
"export:models": "node scripts/export-models-json.mjs",
|
|
38
39
|
"lint": "eslint src test scripts --cache --cache-location node_modules/.cache/eslint/",
|
|
@@ -69,9 +70,9 @@
|
|
|
69
70
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
70
71
|
"@openai/codex-sdk": "^0.144.6",
|
|
71
72
|
"@playwright/mcp": "^0.0.70",
|
|
72
|
-
"@zibby/agent-workflow": "2.0.
|
|
73
|
-
"@zibby/mcp-browser": "2.0.
|
|
74
|
-
"@zibby/skill-ids": "2.0.
|
|
73
|
+
"@zibby/agent-workflow": "2.0.14",
|
|
74
|
+
"@zibby/mcp-browser": "2.0.14",
|
|
75
|
+
"@zibby/skill-ids": "2.0.14",
|
|
75
76
|
"acorn": "^8.15.0",
|
|
76
77
|
"acorn-walk": "^8.3.5",
|
|
77
78
|
"axios": "^1.15.0",
|