cencori 1.16.0 → 1.16.2
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/agents/index.d.mts +5 -0
- package/dist/agents/index.d.ts +5 -0
- package/dist/agents/index.js +9 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/index.mjs +9 -2
- package/dist/agents/index.mjs.map +1 -1
- package/dist/ai/index.d.mts +15 -2
- package/dist/ai/index.d.ts +15 -2
- package/dist/ai/index.js +69 -2
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/index.mjs +69 -2
- package/dist/ai/index.mjs.map +1 -1
- package/dist/compute/index.d.mts +1 -1
- package/dist/compute/index.d.ts +1 -1
- package/dist/documents/index.d.mts +1 -1
- package/dist/documents/index.d.ts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +69 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +69 -2
- package/dist/index.mjs.map +1 -1
- package/dist/judgment/index.d.mts +1 -1
- package/dist/judgment/index.d.ts +1 -1
- package/dist/memory/index.d.mts +1 -1
- package/dist/memory/index.d.ts +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs.map +1 -1
- package/dist/storage/index.d.mts +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/telemetry/index.d.mts +1 -1
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/{types-D91o22Gb.d.mts → types-9nSEJEk2.d.mts} +90 -3
- package/dist/{types-D91o22Gb.d.ts → types-9nSEJEk2.d.ts} +90 -3
- package/dist/vision/index.d.mts +1 -1
- package/dist/vision/index.d.ts +1 -1
- package/dist/voice/index.d.mts +1 -1
- package/dist/voice/index.d.ts +1 -1
- package/dist/web/index.d.mts +1 -1
- package/dist/web/index.d.ts +1 -1
- package/dist/workflow/index.d.mts +1 -1
- package/dist/workflow/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/agents/index.mjs
CHANGED
|
@@ -1470,6 +1470,12 @@ async function* runLoop(startAgent, input, options) {
|
|
|
1470
1470
|
const handoffsByName = new Map(agent.handoffs.map((a) => [Agent.handoffToolName(a), a]));
|
|
1471
1471
|
const interruptions = [];
|
|
1472
1472
|
for (const action of pending.actions) {
|
|
1473
|
+
if (action.runs_on === "cencori") {
|
|
1474
|
+
if (!resumedState?.decision(action.action_id)) {
|
|
1475
|
+
interruptions.push({ type: "tool_approval", callId: action.action_id, toolName: action.tool, arguments: action.arguments, agentName: agent.name });
|
|
1476
|
+
}
|
|
1477
|
+
continue;
|
|
1478
|
+
}
|
|
1473
1479
|
const t = toolsByName.get(action.tool);
|
|
1474
1480
|
if (!t || resumedState?.decision(action.action_id)) continue;
|
|
1475
1481
|
let needs = action.needs_approval === true || t.needsApproval === true;
|
|
@@ -1504,13 +1510,14 @@ async function* runLoop(startAgent, input, options) {
|
|
|
1504
1510
|
if (decision && !decision.approved) {
|
|
1505
1511
|
return { action, output: `The user rejected this call${decision.message ? `: ${decision.message}` : "."} Don't retry it.` };
|
|
1506
1512
|
}
|
|
1513
|
+
if (action.runs_on === "cencori") return { action, output: "", ranOnCencori: true };
|
|
1507
1514
|
const t = toolsByName.get(action.tool);
|
|
1508
1515
|
if (!t) return { action, output: `Error: there is no tool named ${action.tool}.` };
|
|
1509
1516
|
return { action, output: await t.invoke(runContext, action.arguments, action.action_id) };
|
|
1510
1517
|
}));
|
|
1511
1518
|
for (const result of results) {
|
|
1512
1519
|
const { action } = result;
|
|
1513
|
-
if (handoffsByName.has(action.tool)) continue;
|
|
1520
|
+
if (handoffsByName.has(action.tool) || result.ranOnCencori) continue;
|
|
1514
1521
|
const shown = toolWidget(result.output);
|
|
1515
1522
|
if (shown) {
|
|
1516
1523
|
result.output = shown.modelOutput;
|
|
@@ -1543,7 +1550,7 @@ async function* runLoop(startAgent, input, options) {
|
|
|
1543
1550
|
response = await transport.resume(
|
|
1544
1551
|
sessionId,
|
|
1545
1552
|
pending.actionId,
|
|
1546
|
-
results.map(({ action, output }) => ({ action_id: action.action_id, output })),
|
|
1553
|
+
results.filter((r) => !r.ranOnCencori).map(({ action, output }) => ({ action_id: action.action_id, output })),
|
|
1547
1554
|
next
|
|
1548
1555
|
);
|
|
1549
1556
|
pending = void 0;
|