@tangle-network/agent-app 2.0.5 → 2.0.8
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-profiles/d1.js +3 -3
- package/dist/agent-profiles/index.js +3 -3
- package/dist/app-auth/index.js +2 -2
- package/dist/chat-routes/completed-sandbox-turn.d.ts +1 -1
- package/dist/chat-routes/index.js +15 -25
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/chat-routes/sandbox-turn-usage.d.ts +4 -0
- package/dist/chat-routes/turn-route-contracts.d.ts +3 -0
- package/dist/chat-store/core.d.ts +2 -0
- package/dist/chat-store/index.js +24 -28
- package/dist/chat-store/index.js.map +1 -1
- package/dist/chat-store/schema.d.ts +9 -0
- package/dist/{chunk-2ARZ4Y7D.js → chunk-3XVGMHCD.js} +2 -2
- package/dist/{chunk-RTJJYBVV.js → chunk-4EQWYI53.js} +2 -2
- package/dist/{chunk-JGPSBTUH.js → chunk-5DAEU3CP.js} +42 -31
- package/dist/chunk-5DAEU3CP.js.map +1 -0
- package/dist/{chunk-WQZCX4IJ.js → chunk-6GN2E5KT.js} +2 -2
- package/dist/{chunk-HFWKZHTZ.js → chunk-B2NN5BIJ.js} +5 -5
- package/dist/chunk-B2NN5BIJ.js.map +1 -0
- package/dist/{chunk-532GILWC.js → chunk-CVOEGD3Y.js} +2 -2
- package/dist/{chunk-LPW4UVAZ.js → chunk-D6UJEOZQ.js} +1 -1
- package/dist/chunk-D6UJEOZQ.js.map +1 -0
- package/dist/{chunk-N425HGJW.js → chunk-EI27JMS6.js} +1 -1
- package/dist/chunk-EI27JMS6.js.map +1 -0
- package/dist/{chunk-CU6PJO5R.js → chunk-JUQMVD4U.js} +2 -2
- package/dist/{chunk-IDRATMRZ.js → chunk-MVTLHM74.js} +5 -5
- package/dist/{chunk-IDRATMRZ.js.map → chunk-MVTLHM74.js.map} +1 -1
- package/dist/{chunk-C3JXGK3R.js → chunk-NHOQ5TMH.js} +2 -2
- package/dist/{chunk-7BRFM73D.js → chunk-PABZALSD.js} +2 -2
- package/dist/{chunk-CTQQGPHT.js → chunk-PO23GWVQ.js} +13 -17
- package/dist/chunk-PO23GWVQ.js.map +1 -0
- package/dist/{chunk-TJA5ERCP.js → chunk-STGV7DXB.js} +3 -3
- package/dist/{chunk-ORBPOLBM.js → chunk-X2NXWJ6P.js} +27 -7
- package/dist/chunk-X2NXWJ6P.js.map +1 -0
- package/dist/conformance/cli.js +2 -2
- package/dist/conformance/index.js +2 -2
- package/dist/operator/chat-adapter.d.ts +1 -0
- package/dist/operator/contract.d.ts +2 -0
- package/dist/operator/index.js +2 -1
- package/dist/operator/index.js.map +1 -1
- package/dist/platform/index.js +2 -2
- package/dist/preset-cloudflare/index.js +4 -4
- package/dist/public-consultation/index.js +9 -9
- package/dist/runtime/index.js +3 -3
- package/dist/runtime/model.d.ts +1 -1
- package/dist/runtime/router-turn.js +2 -2
- package/dist/sandbox/index.js +6 -6
- package/dist/sandbox/model.d.ts +11 -9
- package/dist/sandbox/prompt-profile.d.ts +7 -5
- package/dist/tools/index.js +4 -4
- package/dist/work-product/index.js +2 -2
- package/package.json +33 -33
- package/dist/chunk-CTQQGPHT.js.map +0 -1
- package/dist/chunk-HFWKZHTZ.js.map +0 -1
- package/dist/chunk-JGPSBTUH.js.map +0 -1
- package/dist/chunk-LPW4UVAZ.js.map +0 -1
- package/dist/chunk-N425HGJW.js.map +0 -1
- package/dist/chunk-ORBPOLBM.js.map +0 -1
- /package/dist/{chunk-2ARZ4Y7D.js.map → chunk-3XVGMHCD.js.map} +0 -0
- /package/dist/{chunk-RTJJYBVV.js.map → chunk-4EQWYI53.js.map} +0 -0
- /package/dist/{chunk-WQZCX4IJ.js.map → chunk-6GN2E5KT.js.map} +0 -0
- /package/dist/{chunk-532GILWC.js.map → chunk-CVOEGD3Y.js.map} +0 -0
- /package/dist/{chunk-CU6PJO5R.js.map → chunk-JUQMVD4U.js.map} +0 -0
- /package/dist/{chunk-C3JXGK3R.js.map → chunk-NHOQ5TMH.js.map} +0 -0
- /package/dist/{chunk-7BRFM73D.js.map → chunk-PABZALSD.js.map} +0 -0
- /package/dist/{chunk-TJA5ERCP.js.map → chunk-STGV7DXB.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
OPENUI_NODE_JSON_SCHEMA,
|
|
6
6
|
OPENUI_NODE_TYPES
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MVTLHM74.js";
|
|
8
8
|
|
|
9
9
|
// src/tools/openai.ts
|
|
10
10
|
var APP_TOOL_NAMES = ["submit_proposal", "schedule_followup", "render_ui", "add_citation"];
|
|
@@ -117,4 +117,4 @@ export {
|
|
|
117
117
|
customToolToOpenAI,
|
|
118
118
|
findCustomTool
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-NHOQ5TMH.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createOperatorClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EI27JMS6.js";
|
|
4
4
|
|
|
5
5
|
// src/conformance/session.ts
|
|
6
6
|
var Failure = class extends Error {
|
|
@@ -371,4 +371,4 @@ async function checkDeployedApp(options) {
|
|
|
371
371
|
export {
|
|
372
372
|
checkDeployedApp
|
|
373
373
|
};
|
|
374
|
-
//# sourceMappingURL=chunk-
|
|
374
|
+
//# sourceMappingURL=chunk-PABZALSD.js.map
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
sandboxRunFailureDetail,
|
|
28
28
|
streamSandboxPrompt,
|
|
29
29
|
turnStorageBindings
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-B2NN5BIJ.js";
|
|
31
31
|
import {
|
|
32
32
|
redactErrorMessage
|
|
33
33
|
} from "./chunk-MH74DY2I.js";
|
|
@@ -35,9 +35,10 @@ import {
|
|
|
35
35
|
addStepFinishUsage,
|
|
36
36
|
assistantRowIdForTurn,
|
|
37
37
|
createAssistantDraftWriter,
|
|
38
|
+
measuredUsage,
|
|
38
39
|
rowIdOf,
|
|
39
40
|
storeSupportsDraftPersistence
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-5DAEU3CP.js";
|
|
41
42
|
import {
|
|
42
43
|
normalizeClientTurnId,
|
|
43
44
|
resolveChatTurn
|
|
@@ -113,7 +114,7 @@ import {
|
|
|
113
114
|
import {
|
|
114
115
|
composeRouterTurnPromptSections,
|
|
115
116
|
runRouterTurn
|
|
116
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-3XVGMHCD.js";
|
|
117
118
|
import {
|
|
118
119
|
createIntelligenceTurnTraceSink,
|
|
119
120
|
createTurnTrace,
|
|
@@ -1473,8 +1474,8 @@ function extractReportedTurnUsage(data) {
|
|
|
1473
1474
|
if (cacheReadTokens !== null) reported.cacheReadTokens = cacheReadTokens;
|
|
1474
1475
|
const cacheWriteTokens = toFiniteNumber(tokenUsage.cacheCreationInputTokens);
|
|
1475
1476
|
if (cacheWriteTokens !== null) reported.cacheWriteTokens = cacheWriteTokens;
|
|
1476
|
-
const
|
|
1477
|
-
if (
|
|
1477
|
+
const harnessCostUsd = toFiniteNumber(data?.totalCostUsd) ?? toFiniteNumber(tokenUsage.cost);
|
|
1478
|
+
if (harnessCostUsd !== null) reported.harnessCostUsd = harnessCostUsd;
|
|
1478
1479
|
return reported;
|
|
1479
1480
|
}
|
|
1480
1481
|
function extractUsageSnapshot(value) {
|
|
@@ -1484,8 +1485,8 @@ function extractUsageSnapshot(value) {
|
|
|
1484
1485
|
const reported = { inputTokens, outputTokens };
|
|
1485
1486
|
const reasoningTokens = toFiniteNumber(value?.reasoningTokens);
|
|
1486
1487
|
if (reasoningTokens !== null && reasoningTokens >= 0) reported.reasoningTokens = reasoningTokens;
|
|
1487
|
-
const
|
|
1488
|
-
if (
|
|
1488
|
+
const harnessCostUsd = toFiniteNumber(value?.providerCostUsd);
|
|
1489
|
+
if (harnessCostUsd !== null && harnessCostUsd >= 0) reported.harnessCostUsd = harnessCostUsd;
|
|
1489
1490
|
return reported;
|
|
1490
1491
|
}
|
|
1491
1492
|
function applyTerminalUsage(reported, usage) {
|
|
@@ -1494,7 +1495,7 @@ function applyTerminalUsage(reported, usage) {
|
|
|
1494
1495
|
if (reported.reasoningTokens !== void 0) usage.reasoningTokens = reported.reasoningTokens;
|
|
1495
1496
|
if (reported.cacheReadTokens !== void 0) usage.cacheReadTokens = reported.cacheReadTokens;
|
|
1496
1497
|
if (reported.cacheWriteTokens !== void 0) usage.cacheWriteTokens = reported.cacheWriteTokens;
|
|
1497
|
-
if (reported.
|
|
1498
|
+
if (reported.harnessCostUsd !== void 0) usage.harnessCostUsd = reported.harnessCostUsd;
|
|
1498
1499
|
}
|
|
1499
1500
|
function sandboxStreamErrorMessage(data) {
|
|
1500
1501
|
const record = asRecord(data);
|
|
@@ -1824,7 +1825,7 @@ function createSandboxProjection(projectionState, pendingModelNotices) {
|
|
|
1824
1825
|
promptTokens,
|
|
1825
1826
|
completionTokens,
|
|
1826
1827
|
...usage.reasoningTokens !== void 0 ? { reasoningTokens: usage.reasoningTokens } : {},
|
|
1827
|
-
...usage.
|
|
1828
|
+
...usage.harnessCostUsd !== void 0 ? { providerCostUsd: usage.harnessCostUsd } : {}
|
|
1828
1829
|
}
|
|
1829
1830
|
};
|
|
1830
1831
|
}
|
|
@@ -1917,7 +1918,7 @@ async function* projectSandboxMessagePart(event, tracker, recordPersistedPart, r
|
|
|
1917
1918
|
promptTokens,
|
|
1918
1919
|
completionTokens,
|
|
1919
1920
|
...usage.reasoningTokens !== void 0 ? { reasoningTokens: usage.reasoningTokens } : {},
|
|
1920
|
-
...usage.
|
|
1921
|
+
...usage.harnessCostUsd !== void 0 ? { providerCostUsd: usage.harnessCostUsd } : {}
|
|
1921
1922
|
}
|
|
1922
1923
|
};
|
|
1923
1924
|
}
|
|
@@ -3382,12 +3383,7 @@ function createTurnEngine(identity, ctx, log, state, dispatched, produceArgs, tr
|
|
|
3382
3383
|
...parts && parts.length > 0 ? { parts } : {},
|
|
3383
3384
|
...state.producer?.model ? { model: state.producer.model } : {},
|
|
3384
3385
|
...modelAttributionFields(attribution),
|
|
3385
|
-
...usage
|
|
3386
|
-
...usage.outputTokens !== void 0 ? { outputTokens: usage.outputTokens } : {},
|
|
3387
|
-
...usage.reasoningTokens !== void 0 ? { reasoningTokens: usage.reasoningTokens } : {},
|
|
3388
|
-
...usage.cacheReadTokens !== void 0 ? { cacheReadTokens: usage.cacheReadTokens } : {},
|
|
3389
|
-
...usage.cacheWriteTokens !== void 0 ? { cacheWriteTokens: usage.cacheWriteTokens } : {},
|
|
3390
|
-
...usage.costUsd !== void 0 ? { costUsd: usage.costUsd } : {}
|
|
3386
|
+
...measuredUsage(usage)
|
|
3391
3387
|
};
|
|
3392
3388
|
if (state.draft) {
|
|
3393
3389
|
await state.draft.finalize(values);
|
|
@@ -4153,4 +4149,4 @@ export {
|
|
|
4153
4149
|
createChatTurnRoutes,
|
|
4154
4150
|
streamChatRouteAsSandboxEvents
|
|
4155
4151
|
};
|
|
4156
|
-
//# sourceMappingURL=chunk-
|
|
4152
|
+
//# sourceMappingURL=chunk-PO23GWVQ.js.map
|