@tangle-network/agent-runtime 0.75.1 → 0.77.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/agent.js +2 -2
- package/dist/{chunk-SA5GCF2X.js → chunk-CEW5BMGN.js} +177 -24
- package/dist/chunk-CEW5BMGN.js.map +1 -0
- package/dist/{chunk-QKNBYHMK.js → chunk-KKHMDE5I.js} +3 -3
- package/dist/{chunk-MRWXCFV5.js → chunk-LFL7K5FM.js} +2 -2
- package/dist/{chunk-ZKMOIEOB.js → chunk-RQYPH2QE.js} +28 -24
- package/dist/chunk-RQYPH2QE.js.map +1 -0
- package/dist/{coordination-c_7Olmtq.d.ts → coordination-CZe4lTxy.d.ts} +1 -1
- package/dist/index.d.ts +87 -140
- package/dist/index.js +114 -145
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +1 -1
- package/dist/loop-runner-bin.js +3 -3
- package/dist/loops.d.ts +183 -6
- package/dist/loops.js +8 -2
- package/dist/mcp/bin.js +1 -1
- package/dist/mcp/index.d.ts +3 -3
- package/dist/mcp/index.js +3 -3
- package/dist/{router-client-C7kp_ECN.d.ts → router-client-CMAWGv1h.d.ts} +8 -0
- package/package.json +5 -4
- package/dist/chunk-SA5GCF2X.js.map +0 -1
- package/dist/chunk-ZKMOIEOB.js.map +0 -1
- /package/dist/{chunk-QKNBYHMK.js.map → chunk-KKHMDE5I.js.map} +0 -0
- /package/dist/{chunk-MRWXCFV5.js.map → chunk-LFL7K5FM.js.map} +0 -0
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
definePersona,
|
|
6
6
|
runPersonified,
|
|
7
7
|
worktreeFanout
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CEW5BMGN.js";
|
|
9
9
|
import {
|
|
10
10
|
createExecutorRegistry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RQYPH2QE.js";
|
|
12
12
|
import {
|
|
13
13
|
runAnalystLoop
|
|
14
14
|
} from "./chunk-IODKUOBA.js";
|
|
@@ -196,4 +196,4 @@ export {
|
|
|
196
196
|
runLoopRunnerCli,
|
|
197
197
|
parseLoopRunnerArgv
|
|
198
198
|
};
|
|
199
|
-
//# sourceMappingURL=chunk-
|
|
199
|
+
//# sourceMappingURL=chunk-KKHMDE5I.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
DELEGATION_STATUS_DESCRIPTION,
|
|
9
9
|
DELEGATION_STATUS_INPUT_SCHEMA,
|
|
10
10
|
DELEGATION_STATUS_TOOL_NAME
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RQYPH2QE.js";
|
|
12
12
|
|
|
13
13
|
// src/mcp/openai-tools.ts
|
|
14
14
|
function buildTool(name, description, parameters) {
|
|
@@ -45,4 +45,4 @@ export {
|
|
|
45
45
|
mcpToolsForRuntimeMcp,
|
|
46
46
|
mcpToolsForRuntimeMcpSubset
|
|
47
47
|
};
|
|
48
|
-
//# sourceMappingURL=chunk-
|
|
48
|
+
//# sourceMappingURL=chunk-LFL7K5FM.js.map
|
|
@@ -1737,19 +1737,19 @@ async function routerChatWithUsage(cfg, messages, opts) {
|
|
|
1737
1737
|
const url = `${cfg.routerBaseUrl.replace(/\/$/, "")}/chat/completions`;
|
|
1738
1738
|
const headers = { "content-type": "application/json", authorization: `Bearer ${cfg.routerKey}` };
|
|
1739
1739
|
let temperature = opts?.temperature ?? 0.2;
|
|
1740
|
+
const body = () => ({
|
|
1741
|
+
model: cfg.model,
|
|
1742
|
+
messages,
|
|
1743
|
+
temperature,
|
|
1744
|
+
max_tokens: opts?.maxTokens ?? 8192
|
|
1745
|
+
});
|
|
1746
|
+
if (cfg.complete) return parseChatResult(await cfg.complete(body()), cfg.model);
|
|
1740
1747
|
let lastErr = "";
|
|
1741
1748
|
for (let attempt = 0; attempt < 5; attempt += 1) {
|
|
1742
1749
|
const res = await fetch(url, {
|
|
1743
1750
|
method: "POST",
|
|
1744
1751
|
headers,
|
|
1745
|
-
|
|
1746
|
-
// reasoning_content first — a small router default yields EMPTY content.
|
|
1747
|
-
body: JSON.stringify({
|
|
1748
|
-
model: cfg.model,
|
|
1749
|
-
messages,
|
|
1750
|
-
temperature,
|
|
1751
|
-
max_tokens: opts?.maxTokens ?? 8192
|
|
1752
|
-
}),
|
|
1752
|
+
body: JSON.stringify(body()),
|
|
1753
1753
|
...opts?.signal ? { signal: opts.signal } : {}
|
|
1754
1754
|
});
|
|
1755
1755
|
if (res.ok) return parseChatResult(await res.json(), cfg.model);
|
|
@@ -1778,21 +1778,25 @@ function parseChatResult(json, model) {
|
|
|
1778
1778
|
};
|
|
1779
1779
|
}
|
|
1780
1780
|
async function routerChatWithTools(cfg, messages, tools, opts) {
|
|
1781
|
-
const
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1781
|
+
const body = {
|
|
1782
|
+
model: cfg.model,
|
|
1783
|
+
messages,
|
|
1784
|
+
tools,
|
|
1785
|
+
tool_choice: opts?.toolChoice ?? "auto",
|
|
1786
|
+
temperature: opts?.temperature ?? 0.3,
|
|
1787
|
+
...opts?.maxTokens ? { max_tokens: opts.maxTokens } : {}
|
|
1788
|
+
};
|
|
1789
|
+
const raw = cfg.complete ? await cfg.complete(body) : await (async () => {
|
|
1790
|
+
const res = await fetch(`${cfg.routerBaseUrl.replace(/\/$/, "")}/chat/completions`, {
|
|
1791
|
+
method: "POST",
|
|
1792
|
+
headers: { "content-type": "application/json", authorization: `Bearer ${cfg.routerKey}` },
|
|
1793
|
+
body: JSON.stringify(body),
|
|
1794
|
+
...opts?.signal ? { signal: opts.signal } : {}
|
|
1795
|
+
});
|
|
1796
|
+
if (!res.ok) throw new Error(`router ${res.status}: ${(await res.text()).slice(0, 200)}`);
|
|
1797
|
+
return res.json();
|
|
1798
|
+
})();
|
|
1799
|
+
const data = raw;
|
|
1796
1800
|
const msg = data.choices?.[0]?.message;
|
|
1797
1801
|
const toolCalls = (msg?.tool_calls ?? []).map((tc, i) => ({
|
|
1798
1802
|
id: tc.id ?? `call_${i}`,
|
|
@@ -6227,4 +6231,4 @@ export {
|
|
|
6227
6231
|
createInProcessTransport,
|
|
6228
6232
|
serveCoordinationMcp
|
|
6229
6233
|
};
|
|
6230
|
-
//# sourceMappingURL=chunk-
|
|
6234
|
+
//# sourceMappingURL=chunk-RQYPH2QE.js.map
|