@arbidocs/sdk 0.3.120 → 0.3.122
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/{browser-BUspHdyk.d.cts → browser-Bq64bPkc.d.cts} +112 -35
- package/dist/{browser-BUspHdyk.d.ts → browser-Bq64bPkc.d.ts} +112 -35
- package/dist/browser.cjs +10 -2
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +10 -2
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +20 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +20 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4195,6 +4195,15 @@ var LIFECYCLE_LABELS_FALLBACK = {
|
|
|
4195
4195
|
planning: "Planning",
|
|
4196
4196
|
tool_progress: "Working"
|
|
4197
4197
|
};
|
|
4198
|
+
function buildDocNameMap(docs) {
|
|
4199
|
+
const map = {};
|
|
4200
|
+
for (const doc of docs) {
|
|
4201
|
+
if (typeof doc.external_id === "string" && typeof doc.file_name === "string") {
|
|
4202
|
+
map[doc.external_id] = doc.file_name;
|
|
4203
|
+
}
|
|
4204
|
+
}
|
|
4205
|
+
return map;
|
|
4206
|
+
}
|
|
4198
4207
|
function resolveDocRefs(text, docNames) {
|
|
4199
4208
|
if (!docNames) return text;
|
|
4200
4209
|
return text.replace(/\{(doc-[^}]+)\}/g, (_match, id) => docNames[id] ?? id);
|
|
@@ -4380,6 +4389,14 @@ async function streamSSE(response, callbacks = {}) {
|
|
|
4380
4389
|
const data = JSON.parse(raw);
|
|
4381
4390
|
callbacks.onUserInputRequest?.(data);
|
|
4382
4391
|
},
|
|
4392
|
+
"arbi.probe_answer": (raw) => {
|
|
4393
|
+
const data = JSON.parse(raw);
|
|
4394
|
+
callbacks.onProbeAnswer?.(data);
|
|
4395
|
+
},
|
|
4396
|
+
"arbi.agent_control_state": (raw) => {
|
|
4397
|
+
const data = JSON.parse(raw);
|
|
4398
|
+
callbacks.onAgentControlState?.(data);
|
|
4399
|
+
},
|
|
4383
4400
|
"arbi.artifact": (raw) => {
|
|
4384
4401
|
const data = JSON.parse(raw);
|
|
4385
4402
|
artifacts.push(data);
|
|
@@ -5449,10 +5466,10 @@ async function queryAssistant(options) {
|
|
|
5449
5466
|
}
|
|
5450
5467
|
async function respondToAgent(arbi, assistantMessageExtId, answer) {
|
|
5451
5468
|
return requireData(
|
|
5452
|
-
await arbi.fetch.POST("/v1/assistant/
|
|
5469
|
+
await arbi.fetch.POST("/v1/assistant/interject", {
|
|
5453
5470
|
body: { assistant_message_ext_id: assistantMessageExtId, answer }
|
|
5454
5471
|
}),
|
|
5455
|
-
"Failed to
|
|
5472
|
+
"Failed to interject into agent"
|
|
5456
5473
|
);
|
|
5457
5474
|
}
|
|
5458
5475
|
async function listSkills(arbi, options) {
|
|
@@ -7775,6 +7792,7 @@ exports.agentconfig = agentconfig_exports;
|
|
|
7775
7792
|
exports.agents = agents_exports;
|
|
7776
7793
|
exports.assistant = assistant_exports;
|
|
7777
7794
|
exports.authenticatedFetch = authenticatedFetch;
|
|
7795
|
+
exports.buildDocNameMap = buildDocNameMap;
|
|
7778
7796
|
exports.buildRetrievalChunkTool = buildRetrievalChunkTool;
|
|
7779
7797
|
exports.buildRetrievalFullContextTool = buildRetrievalFullContextTool;
|
|
7780
7798
|
exports.buildRetrievalTocTool = buildRetrievalTocTool;
|