@tangle-network/agent-app 0.46.45 → 0.46.47
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/assistant/index.js +5 -5
- package/dist/catalog/index.js +1 -1
- package/dist/chat-react/index.js +3 -3
- package/dist/chat-routes/index.js +1 -1
- package/dist/{chunk-YLHEVJQG.js → chunk-67ISDCXH.js} +2 -2
- package/dist/{chunk-N55NM3W2.js → chunk-FS6YF4ZV.js} +68 -9
- package/dist/chunk-FS6YF4ZV.js.map +1 -0
- package/dist/{chunk-SGO7KEIW.js → chunk-NKTTJE26.js} +3 -3
- package/dist/{chunk-NRG2ZOSN.js → chunk-OS2FGYJQ.js} +25 -11
- package/dist/chunk-OS2FGYJQ.js.map +1 -0
- package/dist/{chunk-3JA7EVYZ.js → chunk-PI3IVWFC.js} +2 -2
- package/dist/{chunk-R7IK25XI.js → chunk-QUEKC2DS.js} +2 -2
- package/dist/{mention-editor-JRVJTQBW.js → mention-editor-ZQHH7FHK.js} +3 -3
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/model-catalog.d.ts +3 -4
- package/dist/sandbox/index.js +1 -1
- package/dist/stories/chat-controls/fixtures.d.ts +1 -1
- package/dist/studio-react/index.js +3 -3
- package/dist/web-react/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-N55NM3W2.js.map +0 -1
- package/dist/chunk-NRG2ZOSN.js.map +0 -1
- /package/dist/{chunk-YLHEVJQG.js.map → chunk-67ISDCXH.js.map} +0 -0
- /package/dist/{chunk-SGO7KEIW.js.map → chunk-NKTTJE26.js.map} +0 -0
- /package/dist/{chunk-3JA7EVYZ.js.map → chunk-PI3IVWFC.js.map} +0 -0
- /package/dist/{chunk-R7IK25XI.js.map → chunk-QUEKC2DS.js.map} +0 -0
- /package/dist/{mention-editor-JRVJTQBW.js.map → mention-editor-ZQHH7FHK.js.map} +0 -0
package/dist/assistant/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChatEmptyState,
|
|
3
3
|
ChatMessages
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-67ISDCXH.js";
|
|
5
|
+
import "../chunk-QUEKC2DS.js";
|
|
6
6
|
import "../chunk-3HUFJ5LO.js";
|
|
7
7
|
import "../chunk-FBVLEGEG.js";
|
|
8
8
|
import "../chunk-ENLRJYVW.js";
|
|
9
9
|
import "../chunk-GEYACSFW.js";
|
|
10
10
|
import {
|
|
11
11
|
ChatComposer
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-NKTTJE26.js";
|
|
13
13
|
import "../chunk-L7MB2LLM.js";
|
|
14
14
|
import {
|
|
15
15
|
ModelPicker
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-PI3IVWFC.js";
|
|
17
17
|
import "../chunk-BATKJP3P.js";
|
|
18
18
|
import {
|
|
19
19
|
AsyncView
|
|
@@ -28,7 +28,7 @@ import "../chunk-ZMMIQOFI.js";
|
|
|
28
28
|
import "../chunk-M3K2HVQD.js";
|
|
29
29
|
import "../chunk-YJMCRXQQ.js";
|
|
30
30
|
import "../chunk-MCYJON3F.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-OS2FGYJQ.js";
|
|
32
32
|
|
|
33
33
|
// src/assistant/sse.ts
|
|
34
34
|
var SSEChunkParser = class {
|
package/dist/catalog/index.js
CHANGED
package/dist/chat-react/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ComposerModeControls,
|
|
3
3
|
EntryComposer
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-NKTTJE26.js";
|
|
5
5
|
import "../chunk-L7MB2LLM.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-PI3IVWFC.js";
|
|
7
7
|
import "../chunk-SJWIZT7B.js";
|
|
8
8
|
import "../chunk-SUO2R2ET.js";
|
|
9
9
|
import "../chunk-DXHUQ5NO.js";
|
|
10
10
|
import "../chunk-MCYJON3F.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-OS2FGYJQ.js";
|
|
12
12
|
export {
|
|
13
13
|
ComposerModeControls,
|
|
14
14
|
EntryComposer
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
flattenHistory,
|
|
113
113
|
readSandboxBinaryBytes,
|
|
114
114
|
statSandboxFileSize
|
|
115
|
-
} from "../chunk-
|
|
115
|
+
} from "../chunk-FS6YF4ZV.js";
|
|
116
116
|
import "../chunk-MCYJON3F.js";
|
|
117
117
|
import "../chunk-LWSJK546.js";
|
|
118
118
|
import "../chunk-P5PIAQVS.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
PopoverSurface,
|
|
24
24
|
usePending,
|
|
25
25
|
usePopover
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PI3IVWFC.js";
|
|
27
27
|
import {
|
|
28
28
|
AsyncView
|
|
29
29
|
} from "./chunk-3UBAO3N5.js";
|
|
@@ -5959,4 +5959,4 @@ export {
|
|
|
5959
5959
|
useThinkingSeconds,
|
|
5960
5960
|
ChatMessages
|
|
5961
5961
|
};
|
|
5962
|
-
//# sourceMappingURL=chunk-
|
|
5962
|
+
//# sourceMappingURL=chunk-67ISDCXH.js.map
|
|
@@ -2288,6 +2288,65 @@ function applyPromptTokenLimits(profile, limits) {
|
|
|
2288
2288
|
}
|
|
2289
2289
|
};
|
|
2290
2290
|
}
|
|
2291
|
+
function cachedSandboxPromptEvents(cached, fallbackExecutionId) {
|
|
2292
|
+
const cachedResult = cached.result;
|
|
2293
|
+
const executionId = typeof cachedResult.executionId === "string" && cachedResult.executionId.trim() ? cachedResult.executionId : fallbackExecutionId;
|
|
2294
|
+
const finalText = typeof cachedResult.finalText === "string" ? cachedResult.finalText : typeof cachedResult.response === "string" ? cachedResult.response : typeof cachedResult.text === "string" ? cachedResult.text : void 0;
|
|
2295
|
+
return [
|
|
2296
|
+
{
|
|
2297
|
+
type: "result",
|
|
2298
|
+
data: {
|
|
2299
|
+
...cachedResult,
|
|
2300
|
+
...finalText !== void 0 && cachedResult.finalText === void 0 ? { finalText } : {},
|
|
2301
|
+
sessionId: cached.sessionId,
|
|
2302
|
+
executionId
|
|
2303
|
+
}
|
|
2304
|
+
},
|
|
2305
|
+
{
|
|
2306
|
+
type: "done",
|
|
2307
|
+
data: {
|
|
2308
|
+
sessionId: cached.sessionId,
|
|
2309
|
+
executionId,
|
|
2310
|
+
status: "completed",
|
|
2311
|
+
outcome: { type: "completed" }
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
];
|
|
2315
|
+
}
|
|
2316
|
+
async function* detachedSandboxPromptEvents(box, prompt, options, backend) {
|
|
2317
|
+
const sessionId = options.sessionId?.trim();
|
|
2318
|
+
const executionId = options.executionId?.trim();
|
|
2319
|
+
if (!sessionId || !executionId) {
|
|
2320
|
+
throw new Error("streamSandboxPrompt detach requires stable sessionId and executionId");
|
|
2321
|
+
}
|
|
2322
|
+
const lastEventId = options.lastEventId?.trim() || void 0;
|
|
2323
|
+
const turnId = options.turnId?.trim() || executionId;
|
|
2324
|
+
const admission = lastEventId ? null : await box.dispatchPrompt(prompt, {
|
|
2325
|
+
sessionId,
|
|
2326
|
+
executionId,
|
|
2327
|
+
turnId,
|
|
2328
|
+
backend,
|
|
2329
|
+
...options.requireVisibleAssistantOutput !== void 0 ? { requireVisibleAssistantOutput: options.requireVisibleAssistantOutput } : {},
|
|
2330
|
+
...options.timeoutMs !== void 0 ? { timeoutMs: options.timeoutMs } : {}
|
|
2331
|
+
});
|
|
2332
|
+
const admittedExecutionId = admission?.executionId ?? executionId;
|
|
2333
|
+
if (!admittedExecutionId) {
|
|
2334
|
+
throw new Error(`detached Sandbox dispatch for ${sessionId} returned no executionId`);
|
|
2335
|
+
}
|
|
2336
|
+
if (admission?.dispatched === false) {
|
|
2337
|
+
const cached = await box.findCompletedTurn(turnId, { sessionId });
|
|
2338
|
+
if (cached) {
|
|
2339
|
+
yield* cachedSandboxPromptEvents(cached, admittedExecutionId);
|
|
2340
|
+
return;
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
2343
|
+
yield* box.streamPrompt("", {
|
|
2344
|
+
sessionId: admission?.sessionId ?? sessionId,
|
|
2345
|
+
executionId: admittedExecutionId,
|
|
2346
|
+
lastEventId: lastEventId || "0",
|
|
2347
|
+
...options.signal ? { signal: options.signal } : {}
|
|
2348
|
+
});
|
|
2349
|
+
}
|
|
2291
2350
|
function optionalNonNegativeNumber(value, field) {
|
|
2292
2351
|
if (value === void 0) return void 0;
|
|
2293
2352
|
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
@@ -2422,7 +2481,13 @@ async function* streamSandboxPrompt(shell, box, message, options) {
|
|
|
2422
2481
|
await fingerprintAgentProfile(profileWithLimits, { model: model?.model, harness })
|
|
2423
2482
|
);
|
|
2424
2483
|
}
|
|
2425
|
-
const
|
|
2484
|
+
const backend = {
|
|
2485
|
+
type: harness,
|
|
2486
|
+
profile: profileWithLimits,
|
|
2487
|
+
...model ? { model } : {},
|
|
2488
|
+
...options?.interactions ? { interactions: options.interactions } : {}
|
|
2489
|
+
};
|
|
2490
|
+
const stream = options?.detach ? detachedSandboxPromptEvents(box, prompt, options, backend) : box.streamPrompt(prompt, {
|
|
2426
2491
|
sessionId: options?.sessionId,
|
|
2427
2492
|
executionId: options?.executionId,
|
|
2428
2493
|
turnId: options?.turnId,
|
|
@@ -2430,13 +2495,7 @@ async function* streamSandboxPrompt(shell, box, message, options) {
|
|
|
2430
2495
|
...options?.signal ? { signal: options.signal } : {},
|
|
2431
2496
|
...options?.timeoutMs !== void 0 ? { timeoutMs: options.timeoutMs } : {},
|
|
2432
2497
|
...options?.requireVisibleAssistantOutput !== void 0 ? { requireVisibleAssistantOutput: options.requireVisibleAssistantOutput } : {},
|
|
2433
|
-
|
|
2434
|
-
backend: {
|
|
2435
|
-
type: harness,
|
|
2436
|
-
profile: profileWithLimits,
|
|
2437
|
-
...model ? { model } : {},
|
|
2438
|
-
...options?.interactions ? { interactions: options.interactions } : {}
|
|
2439
|
-
}
|
|
2498
|
+
backend
|
|
2440
2499
|
});
|
|
2441
2500
|
emitSandboxActivity(options?.spend, box);
|
|
2442
2501
|
let severedFinishReason = null;
|
|
@@ -2770,4 +2829,4 @@ export {
|
|
|
2770
2829
|
isTerminalPromptEvent,
|
|
2771
2830
|
detectInteractiveQuestion
|
|
2772
2831
|
};
|
|
2773
|
-
//# sourceMappingURL=chunk-
|
|
2832
|
+
//# sourceMappingURL=chunk-FS6YF4ZV.js.map
|