@tangle-network/agent-app 0.60.287 → 0.61.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/app-auth/index.js +2 -2
- package/dist/assistant/index.js +5 -6
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-react/index.js +1 -1
- package/dist/chat-routes/index.js +18 -18
- package/dist/{chunk-BI5AZAOO.js → chunk-4P5NFBWX.js} +4 -4
- package/dist/{chunk-GDUT72VK.js → chunk-6OSJNJA2.js} +9 -4
- package/dist/chunk-6OSJNJA2.js.map +1 -0
- package/dist/{chunk-U77HPL3I.js → chunk-LO6VQ35O.js} +2 -2
- package/dist/{chunk-XTMRAE6I.js → chunk-UCCSJX64.js} +3 -5
- package/dist/chunk-UCCSJX64.js.map +1 -0
- package/dist/{chunk-7D5MHMCP.js → chunk-VJBFCNAU.js} +4 -4
- package/dist/design-canvas/index.js +3 -3
- package/dist/design-canvas-react/index.js +4 -4
- package/dist/launch-invariants/index.js +8 -8
- package/dist/openui/index.js +3 -3
- package/dist/platform/index.js +12 -12
- package/dist/profile/index.js +1 -1
- package/dist/runtime/index.js +3 -3
- package/dist/runtime/router-turn.js +2 -2
- package/dist/sequences/index.js +5 -5
- package/dist/settings-react/index.js +1 -1
- package/dist/skills/index.js +3 -3
- package/dist/skills-placement/box.js +1 -1
- package/dist/skills-placement/index.js +1 -1
- package/dist/stories/chat-controls/fixtures.d.ts +0 -3
- package/dist/theme/tokens.css +10 -6
- package/dist/trace/index.d.ts +2 -2
- package/dist/trace/index.js +4 -2
- package/dist/trace/index.js.map +1 -1
- package/dist/trace/mission-flow.d.ts +1 -1
- package/dist/turn-stream/index.js +3 -3
- package/dist/web-react/index.js +10 -16
- package/dist/web-react/mission-activity.d.ts +1 -3
- package/dist/work-product/index.js +10 -10
- package/package.json +2 -7
- package/dist/chunk-BLCYKYFV.js +0 -346
- package/dist/chunk-BLCYKYFV.js.map +0 -1
- package/dist/chunk-GDUT72VK.js.map +0 -1
- package/dist/chunk-XTMRAE6I.js.map +0 -1
- package/dist/stories/chat-controls/discovery-waterfall-fixture.d.ts +0 -3
- package/dist/trace/flow-types.d.ts +0 -32
- package/dist/web-react/flow-waterfall-model.d.ts +0 -22
- package/dist/web-react/flow-waterfall.css +0 -72
- package/dist/web-react/flow-waterfall.d.ts +0 -14
- package/dist/web-react/flow-waterfall.js +0 -7
- package/dist/web-react/flow-waterfall.js.map +0 -1
- /package/dist/{chunk-BI5AZAOO.js.map → chunk-4P5NFBWX.js.map} +0 -0
- /package/dist/{chunk-U77HPL3I.js.map → chunk-LO6VQ35O.js.map} +0 -0
- /package/dist/{chunk-7D5MHMCP.js.map → chunk-VJBFCNAU.js.map} +0 -0
package/dist/chat-react/index.js
CHANGED
|
@@ -10,8 +10,8 @@ import "../chunk-R4X5474U.js";
|
|
|
10
10
|
import "../chunk-SJWIZT7B.js";
|
|
11
11
|
import "../chunk-RASGKEAL.js";
|
|
12
12
|
import "../chunk-IUVDR3KJ.js";
|
|
13
|
-
import "../chunk-G7M2C72Q.js";
|
|
14
13
|
import "../chunk-AMUXRAUO.js";
|
|
14
|
+
import "../chunk-G7M2C72Q.js";
|
|
15
15
|
import "../chunk-FPNZMIAW.js";
|
|
16
16
|
import "../chunk-TXD5HXLE.js";
|
|
17
17
|
export {
|
|
@@ -52,6 +52,24 @@ import {
|
|
|
52
52
|
} from "../chunk-DJIN3YUJ.js";
|
|
53
53
|
import "../chunk-F4TUZYMX.js";
|
|
54
54
|
import "../chunk-4LBCTFBP.js";
|
|
55
|
+
import "../chunk-DSMGS4IV.js";
|
|
56
|
+
import "../chunk-5BJHKQ33.js";
|
|
57
|
+
import "../chunk-6A7MYOUI.js";
|
|
58
|
+
import "../chunk-O7UX55EU.js";
|
|
59
|
+
import "../chunk-XEAZWJ3W.js";
|
|
60
|
+
import "../chunk-S5SRJJQG.js";
|
|
61
|
+
import "../chunk-7TZA2TAM.js";
|
|
62
|
+
import "../chunk-UGWQLQDS.js";
|
|
63
|
+
import "../chunk-WSQFNMIA.js";
|
|
64
|
+
import {
|
|
65
|
+
runProtectedRouterTurn
|
|
66
|
+
} from "../chunk-LO6VQ35O.js";
|
|
67
|
+
import {
|
|
68
|
+
runRouterTurn
|
|
69
|
+
} from "../chunk-VJBFCNAU.js";
|
|
70
|
+
import "../chunk-UFQM46NV.js";
|
|
71
|
+
import "../chunk-D6UJEOZQ.js";
|
|
72
|
+
import "../chunk-AMUXRAUO.js";
|
|
55
73
|
import {
|
|
56
74
|
INTENT_LINE_HISTORY_MESSAGES,
|
|
57
75
|
INTENT_LINE_MAX_CHARS,
|
|
@@ -142,25 +160,7 @@ import {
|
|
|
142
160
|
} from "../chunk-ISP6ZH3G.js";
|
|
143
161
|
import "../chunk-MM6RLOXF.js";
|
|
144
162
|
import "../chunk-XELWWXJJ.js";
|
|
145
|
-
import "../chunk-DSMGS4IV.js";
|
|
146
|
-
import "../chunk-5BJHKQ33.js";
|
|
147
|
-
import "../chunk-6A7MYOUI.js";
|
|
148
|
-
import "../chunk-O7UX55EU.js";
|
|
149
|
-
import "../chunk-XEAZWJ3W.js";
|
|
150
|
-
import "../chunk-S5SRJJQG.js";
|
|
151
|
-
import "../chunk-7TZA2TAM.js";
|
|
152
|
-
import "../chunk-UGWQLQDS.js";
|
|
153
|
-
import "../chunk-WSQFNMIA.js";
|
|
154
|
-
import {
|
|
155
|
-
runProtectedRouterTurn
|
|
156
|
-
} from "../chunk-U77HPL3I.js";
|
|
157
|
-
import {
|
|
158
|
-
runRouterTurn
|
|
159
|
-
} from "../chunk-7D5MHMCP.js";
|
|
160
|
-
import "../chunk-UFQM46NV.js";
|
|
161
|
-
import "../chunk-D6UJEOZQ.js";
|
|
162
163
|
import "../chunk-ORQD4AUO.js";
|
|
163
|
-
import "../chunk-AMUXRAUO.js";
|
|
164
164
|
import {
|
|
165
165
|
readSandboxBinaryBytes,
|
|
166
166
|
statSandboxFileSize
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isTangleBillingEnforcementDisabled
|
|
3
|
+
} from "./chunk-D6UJEOZQ.js";
|
|
1
4
|
import {
|
|
2
5
|
clearCookieHeader,
|
|
3
6
|
readCookieValue,
|
|
4
7
|
serializeCookie
|
|
5
8
|
} from "./chunk-WP2GYFZ4.js";
|
|
6
|
-
import {
|
|
7
|
-
isTangleBillingEnforcementDisabled
|
|
8
|
-
} from "./chunk-D6UJEOZQ.js";
|
|
9
9
|
|
|
10
10
|
// src/platform/sso.ts
|
|
11
11
|
var DEFAULT_STATE_TTL_SECONDS = 600;
|
|
@@ -516,4 +516,4 @@ export {
|
|
|
516
516
|
createAdminGuard,
|
|
517
517
|
assertBillableBalance
|
|
518
518
|
};
|
|
519
|
-
//# sourceMappingURL=chunk-
|
|
519
|
+
//# sourceMappingURL=chunk-4P5NFBWX.js.map
|
|
@@ -4,17 +4,22 @@ var str = (v) => typeof v === "string" && v.length > 0 ? v : void 0;
|
|
|
4
4
|
var rec = (v) => v && typeof v === "object" ? v : {};
|
|
5
5
|
var LIVE_DELEGATION_STATUSES = /* @__PURE__ */ new Set(["pending", "running"]);
|
|
6
6
|
var ERROR_STATUSES = /* @__PURE__ */ new Set(["failed", "error", "cancelled", "aborted", "down"]);
|
|
7
|
+
function flowStatus(status) {
|
|
8
|
+
const normalized = String(status ?? "").toLowerCase();
|
|
9
|
+
return ERROR_STATUSES.has(normalized) ? "failed" : LIVE_DELEGATION_STATUSES.has(normalized) ? "running" : "done";
|
|
10
|
+
}
|
|
7
11
|
function delegationActivityToFlowSpans(activity, turnStartMs, opts) {
|
|
8
12
|
const spans = [];
|
|
9
13
|
for (const run of activity) {
|
|
10
14
|
const startedAt = Date.parse(run.startedAt);
|
|
11
15
|
if (!Number.isFinite(startedAt)) continue;
|
|
12
16
|
const startMs = startedAt - turnStartMs;
|
|
13
|
-
const
|
|
17
|
+
const status = flowStatus(run.status);
|
|
18
|
+
const live = status === "running";
|
|
14
19
|
const endMs = run.durationMs !== void 0 ? startMs + run.durationMs : live && opts?.nowMs !== void 0 ? opts.nowMs - turnStartMs : startMs;
|
|
15
20
|
spans.push({
|
|
16
21
|
id: run.taskId,
|
|
17
|
-
status
|
|
22
|
+
status,
|
|
18
23
|
kind: "tool",
|
|
19
24
|
name: `${run.tool} \u2014 ${run.detail}`,
|
|
20
25
|
startMs,
|
|
@@ -212,7 +217,7 @@ function composeMissionFlowTrace(input) {
|
|
|
212
217
|
spans.push({
|
|
213
218
|
kind: "pipeline",
|
|
214
219
|
id: `step-${step.id}`,
|
|
215
|
-
|
|
220
|
+
status: flowStatus(step.status),
|
|
216
221
|
name: step.intent,
|
|
217
222
|
startMs,
|
|
218
223
|
endMs,
|
|
@@ -243,4 +248,4 @@ export {
|
|
|
243
248
|
stepActivityFlowTrace,
|
|
244
249
|
composeMissionFlowTrace
|
|
245
250
|
};
|
|
246
|
-
//# sourceMappingURL=chunk-
|
|
251
|
+
//# sourceMappingURL=chunk-6OSJNJA2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/trace/mission-flow.ts"],"sourcesContent":["/**\n * Delegation → FlowSpan converters — render what a mission's delegated agent\n * runs actually did as ONE FlowTrace, drawable by the existing\n * `renderWaterfall` (or any viewer that consumes FlowSpans).\n *\n * Two fidelities, one tree:\n * - COARSE: `delegationActivityToFlowSpans` draws one 'tool' span per\n * delegation from the StepAgentActivity snapshot (startedAt/durationMs) —\n * available live, from the step's journaled lane.\n * - FINE: `loopTraceEventsToFlowSpans` reconstructs agent-runtime's\n * loop → round → iteration hierarchy from the LoopTraceEvent journal a\n * delegation persists. Stable ids carry the hierarchy; descriptive names\n * retain context in the ASCII waterfall as well.\n *\n * `composeMissionFlowTrace` lays a whole mission out: one 'pipeline' span per\n * step, each step's delegations beneath it. Pure data transforms — the\n * structural `LoopTraceEventLike` keeps this module free of the optional\n * agent-runtime peer.\n */\n\nimport type { StepAgentActivity } from '../missions/agent-activity'\nimport type { FlowSpan, FlowTrace } from '@tangle-network/charts'\n\n/** Structural mirror of agent-runtime's `LoopTraceEvent` — same fields, no\n * import, so journals parsed from JSON feed straight in. */\nexport interface LoopTraceEventLike {\n kind: string\n runId: string\n /** Epoch ms. */\n timestamp: number\n payload: object\n}\n\nconst num = (v: unknown): number | undefined =>\n typeof v === 'number' && Number.isFinite(v) ? v : undefined\nconst str = (v: unknown): string | undefined =>\n typeof v === 'string' && v.length > 0 ? v : undefined\nconst rec = (v: unknown): Record<string, unknown> =>\n v && typeof v === 'object' ? (v as Record<string, unknown>) : {}\n\n/** Statuses that mean the delegation is still producing wall time. */\nconst LIVE_DELEGATION_STATUSES = new Set(['pending', 'running'])\nconst ERROR_STATUSES = new Set(['failed', 'error', 'cancelled', 'aborted', 'down'])\n\n/** Interpret domain wire status at the producer boundary, never in the chart. */\nfunction flowStatus(status?: string): NonNullable<FlowSpan['status']> {\n const normalized = String(status ?? '').toLowerCase()\n return ERROR_STATUSES.has(normalized) ? 'failed'\n : LIVE_DELEGATION_STATUSES.has(normalized) ? 'running' : 'done'\n}\n\n/**\n * One 'tool' FlowSpan per delegation, positioned relative to `turnStartMs`\n * (the epoch-ms origin of the trace — usually the step or mission start).\n * A row whose `startedAt` does not parse cannot be placed on a timeline and\n * is omitted from the WATERFALL (it stays in the lane itself). A run without\n * `durationMs` is still in flight: its span extends to `opts.nowMs` when\n * given, else renders as a point — `approx` flags both.\n */\nexport function delegationActivityToFlowSpans(\n activity: StepAgentActivity[],\n turnStartMs: number,\n opts?: { nowMs?: number },\n): FlowSpan[] {\n const spans: FlowSpan[] = []\n for (const run of activity) {\n const startedAt = Date.parse(run.startedAt)\n if (!Number.isFinite(startedAt)) continue\n const startMs = startedAt - turnStartMs\n const status = flowStatus(run.status)\n const live = status === 'running'\n const endMs =\n run.durationMs !== undefined\n ? startMs + run.durationMs\n : live && opts?.nowMs !== undefined\n ? opts.nowMs - turnStartMs\n : startMs\n spans.push({\n id: run.taskId,\n status,\n kind: 'tool',\n name: `${run.tool} — ${run.detail}`,\n startMs,\n endMs: Math.max(endMs, startMs),\n ...(run.durationMs === undefined ? { approx: true } : {}),\n meta: {\n taskId: run.taskId,\n status: run.status,\n ...(run.costUsd !== undefined ? { costUsd: run.costUsd } : {}),\n ...(run.iteration !== undefined ? { iteration: run.iteration } : {}),\n ...(run.phase !== undefined ? { phase: run.phase } : {}),\n ...(run.traceId !== undefined ? { traceId: run.traceId } : {}),\n ...(run.spanId !== undefined ? { spanId: run.spanId } : {}),\n },\n })\n }\n return spans\n}\n\n/**\n * Reconstruct one delegation's loop → round → iteration tree from its\n * journaled LoopTraceEvents, as FlowSpans relative to `loop.started` (or the\n * first event). Mirrors agent-runtime's `buildLoopOtelSpans` topology:\n * rounds open on `loop.plan` and flush on the next plan / `loop.decision` /\n * `loop.ended`; iterations span `loop.iteration.started` → `.ended`.\n */\nexport function loopTraceEventsToFlowSpans(events: LoopTraceEventLike[]): FlowSpan[] {\n if (events.length === 0) return []\n const ordered = [...events].sort((a, b) => a.timestamp - b.timestamp)\n const started = ordered.find((e) => e.kind === 'loop.started')\n const ended = ordered.find((e) => e.kind === 'loop.ended')\n const origin = started?.timestamp ?? ordered[0]!.timestamp\n const rootEnd = ended?.timestamp ?? ordered[ordered.length - 1]!.timestamp\n const t = (epochMs: number) => epochMs - origin\n const rootId = `loop:${ordered[0]!.runId}`\n\n const spans: FlowSpan[] = []\n const sp = rec(started?.payload)\n const ep = rec(ended?.payload)\n spans.push({\n kind: 'pipeline',\n id: rootId,\n status: ended ? 'done' : 'running',\n name: 'loop',\n startMs: 0,\n endMs: t(rootEnd),\n meta: {\n runId: ordered[0]!.runId,\n ...(str(sp.driver) !== undefined ? { driver: str(sp.driver) } : {}),\n ...(num(ep.totalCostUsd) !== undefined ? { costUsd: num(ep.totalCostUsd) } : {}),\n ...(num(ep.winnerIterationIndex) !== undefined\n ? { winnerIterationIndex: num(ep.winnerIterationIndex) }\n : {}),\n ...(num(ep.iterations) !== undefined ? { iterations: num(ep.iterations) } : {}),\n },\n })\n\n const iterStart = new Map<number, { timestamp: number; parentId: string }>()\n let round: { index: number; startMs: number; meta: Record<string, unknown>; moveKind: string } | undefined\n const flushRound = (endEpochMs: number, running = false) => {\n if (!round) return\n spans.push({\n kind: 'pipeline',\n id: `${rootId}:round-${round.index}`,\n parentId: rootId,\n status: running ? 'running' : 'done',\n name: `loop ▸ round ${round.index} (${round.moveKind})`,\n startMs: round.startMs,\n endMs: t(endEpochMs),\n meta: round.meta,\n })\n round = undefined\n }\n\n for (const e of ordered) {\n const p = rec(e.payload)\n switch (e.kind) {\n case 'loop.plan': {\n flushRound(e.timestamp)\n const index = num(p.roundIndex) ?? 0\n round = {\n index,\n startMs: t(e.timestamp),\n moveKind: str(p.moveKind) ?? 'unknown',\n meta: {\n roundIndex: index,\n moveKind: str(p.moveKind) ?? 'unknown',\n width: num(p.plannedCount) ?? 0,\n ...(str(p.rationale) !== undefined ? { rationale: str(p.rationale) } : {}),\n ...(num(p.parentIndex) !== undefined ? { parentIndex: num(p.parentIndex) } : {}),\n },\n }\n break\n }\n case 'loop.iteration.started': {\n const idx = num(p.iterationIndex)\n if (idx !== undefined) iterStart.set(idx, { timestamp: e.timestamp, parentId: round ? `${rootId}:round-${round.index}` : rootId })\n break\n }\n case 'loop.iteration.ended': {\n const idx = num(p.iterationIndex) ?? 0\n const open = iterStart.get(idx)\n const startEpoch = open?.timestamp ?? e.timestamp\n iterStart.delete(idx)\n const error = str(p.error)\n const verdict = rec(p.verdict)\n const tokens = rec(p.tokenUsage)\n const roundLabel = round ? `round ${round.index} ▸ ` : ''\n spans.push({\n kind: 'model',\n id: `${rootId}:iteration-${idx}`,\n parentId: open?.parentId ?? rootId,\n status: error ? 'failed' : 'done',\n name: `loop ▸ ${roundLabel}iter ${idx} (${str(p.agentRunName) ?? 'agent'})`,\n startMs: t(startEpoch),\n endMs: t(e.timestamp),\n meta: {\n iterationIndex: idx,\n ok: error === undefined,\n ...(error !== undefined ? { error } : {}),\n ...(num(p.costUsd) !== undefined ? { costUsd: num(p.costUsd) } : {}),\n ...(typeof verdict.valid === 'boolean' ? { verdictValid: verdict.valid } : {}),\n ...(num(verdict.score) !== undefined ? { verdictScore: num(verdict.score) } : {}),\n ...(num(tokens.input) !== undefined ? { inputTokens: num(tokens.input) } : {}),\n ...(num(tokens.output) !== undefined ? { outputTokens: num(tokens.output) } : {}),\n },\n })\n break\n }\n case 'loop.decision': {\n if (round) {\n const decision = str(p.decision)\n if (decision !== undefined) round.meta.decision = decision\n flushRound(e.timestamp)\n }\n break\n }\n }\n }\n flushRound(rootEnd, !ended)\n for (const [idx, open] of iterStart) {\n spans.push({ kind: 'model', id: `${rootId}:iteration-${idx}`, parentId: open.parentId,\n name: `loop ▸ iter ${idx}`, startMs: t(open.timestamp), endMs: t(rootEnd),\n status: ended ? 'failed' : 'running', approx: true })\n }\n return spans\n}\n\n/**\n * A single step's activity lane as its own FlowTrace — what a per-step\n * drill-in renders. Origin defaults to the earliest delegation start so the\n * waterfall begins at the lane's first run.\n */\nexport function stepActivityFlowTrace(\n activity: StepAgentActivity[],\n opts?: { startedAt?: number; nowMs?: number },\n): FlowTrace {\n let origin = opts?.startedAt\n if (origin === undefined) {\n for (const run of activity) {\n const parsed = Date.parse(run.startedAt)\n if (Number.isFinite(parsed) && (origin === undefined || parsed < origin)) origin = parsed\n }\n }\n const spans = delegationActivityToFlowSpans(\n activity,\n origin ?? 0,\n opts?.nowMs !== undefined ? { nowMs: opts.nowMs } : undefined,\n )\n let costUsd: number | undefined\n for (const span of spans) {\n const c = num(rec(span.meta).costUsd)\n if (c !== undefined) costUsd = (costUsd ?? 0) + c\n }\n return {\n spans,\n totalMs: spans.reduce((max, s) => Math.max(max, s.endMs), 0),\n promptTokens: 0,\n completionTokens: 0,\n ...(costUsd !== undefined ? { costUsd } : {}),\n toolCalls: spans.length,\n }\n}\n\n/** Define a step in a mission flow with id, intent, optional status, start time, and duration */\nexport interface MissionFlowStep {\n id: string\n intent: string\n status?: string\n /** Epoch ms the step attempt started. Absent → laid out sequentially after\n * the previous step (missions run steps in order), `approx` flagged. */\n startedAt?: number\n durationMs?: number\n}\n\n/**\n * Compose a mission-wide FlowTrace: one 'pipeline' span per step, the step's\n * delegated runs ('tool' spans, from `activity[stepId]`) beneath it. A step\n * span always covers its delegations' extent. Cost is the sum of delegation\n * `costUsd`; token counts are not knowable from the activity lane and stay 0.\n */\nexport function composeMissionFlowTrace(input: {\n steps: MissionFlowStep[]\n /** Delegated-run snapshots keyed by step id (the step's `agentActivity`). */\n activity?: Record<string, StepAgentActivity[]>\n /** Epoch-ms origin. Default: the earliest known step/delegation start. */\n startedAt?: number\n}): FlowTrace {\n const activity = input.activity ?? {}\n\n const startCandidates: number[] = []\n if (input.startedAt !== undefined) startCandidates.push(input.startedAt)\n else {\n for (const step of input.steps) {\n if (step.startedAt !== undefined) startCandidates.push(step.startedAt)\n }\n for (const runs of Object.values(activity)) {\n for (const run of runs) {\n const parsed = Date.parse(run.startedAt)\n if (Number.isFinite(parsed)) startCandidates.push(parsed)\n }\n }\n }\n const origin = startCandidates.length > 0 ? Math.min(...startCandidates) : 0\n\n const spans: FlowSpan[] = []\n let costUsd: number | undefined\n let toolCalls = 0\n let cursorMs = 0\n\n for (const step of input.steps) {\n const inferred = step.startedAt === undefined\n const startMs = inferred ? cursorMs : step.startedAt! - origin\n const runSpans = delegationActivityToFlowSpans(activity[step.id] ?? [], origin)\n const runExtent = runSpans.reduce((max, s) => Math.max(max, s.endMs), startMs)\n const endMs = Math.max(step.durationMs !== undefined ? startMs + step.durationMs : startMs, runExtent)\n\n spans.push({\n kind: 'pipeline',\n id: `step-${step.id}`,\n status: flowStatus(step.status),\n name: step.intent,\n startMs,\n endMs,\n ...(inferred || step.durationMs === undefined ? { approx: true } : {}),\n meta: { stepId: step.id, ...(step.status !== undefined ? { status: step.status } : {}) },\n })\n for (const span of runSpans) {\n spans.push({ ...span, id: `step-${step.id}:${span.id}`, parentId: `step-${step.id}`, name: `${step.intent} ▸ ${span.name}` })\n toolCalls++\n const c = num(rec(span.meta).costUsd)\n if (c !== undefined) costUsd = (costUsd ?? 0) + c\n }\n cursorMs = endMs\n }\n\n return {\n spans,\n totalMs: spans.reduce((max, s) => Math.max(max, s.endMs), 0),\n promptTokens: 0,\n completionTokens: 0,\n ...(costUsd !== undefined ? { costUsd } : {}),\n toolCalls,\n }\n}\n"],"mappings":";AAiCA,IAAM,MAAM,CAAC,MACX,OAAO,MAAM,YAAY,OAAO,SAAS,CAAC,IAAI,IAAI;AACpD,IAAM,MAAM,CAAC,MACX,OAAO,MAAM,YAAY,EAAE,SAAS,IAAI,IAAI;AAC9C,IAAM,MAAM,CAAC,MACX,KAAK,OAAO,MAAM,WAAY,IAAgC,CAAC;AAGjE,IAAM,2BAA2B,oBAAI,IAAI,CAAC,WAAW,SAAS,CAAC;AAC/D,IAAM,iBAAiB,oBAAI,IAAI,CAAC,UAAU,SAAS,aAAa,WAAW,MAAM,CAAC;AAGlF,SAAS,WAAW,QAAkD;AACpE,QAAM,aAAa,OAAO,UAAU,EAAE,EAAE,YAAY;AACpD,SAAO,eAAe,IAAI,UAAU,IAAI,WACpC,yBAAyB,IAAI,UAAU,IAAI,YAAY;AAC7D;AAUO,SAAS,8BACd,UACA,aACA,MACY;AACZ,QAAM,QAAoB,CAAC;AAC3B,aAAW,OAAO,UAAU;AAC1B,UAAM,YAAY,KAAK,MAAM,IAAI,SAAS;AAC1C,QAAI,CAAC,OAAO,SAAS,SAAS,EAAG;AACjC,UAAM,UAAU,YAAY;AAC5B,UAAM,SAAS,WAAW,IAAI,MAAM;AACpC,UAAM,OAAO,WAAW;AACxB,UAAM,QACJ,IAAI,eAAe,SACf,UAAU,IAAI,aACd,QAAQ,MAAM,UAAU,SACtB,KAAK,QAAQ,cACb;AACR,UAAM,KAAK;AAAA,MACT,IAAI,IAAI;AAAA,MACR;AAAA,MACA,MAAM;AAAA,MACN,MAAM,GAAG,IAAI,IAAI,WAAM,IAAI,MAAM;AAAA,MACjC;AAAA,MACA,OAA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AAAA,IACd,kBAAkB;AAAA,IAClB,GAAI,YAAY,SAAY,EAAE,QAAQ,IAAI,CAAC;AAAA,IAC3C;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRouterTurn
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VJBFCNAU.js";
|
|
4
4
|
|
|
5
5
|
// src/runtime/protected-model.ts
|
|
6
6
|
import {
|
|
@@ -219,4 +219,4 @@ export {
|
|
|
219
219
|
createRouterProtectedModelPort,
|
|
220
220
|
runProtectedRouterTurn
|
|
221
221
|
};
|
|
222
|
-
//# sourceMappingURL=chunk-
|
|
222
|
+
//# sourceMappingURL=chunk-LO6VQ35O.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-3HUFJ5LO.js";
|
|
10
10
|
import {
|
|
11
11
|
stepActivityFlowTrace
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6OSJNJA2.js";
|
|
13
13
|
import {
|
|
14
14
|
WorkProductCard,
|
|
15
15
|
workProductPartsFromMessageParts
|
|
@@ -69,9 +69,6 @@ import {
|
|
|
69
69
|
parsePlanSubmittedEvent,
|
|
70
70
|
persistedPartToPlan
|
|
71
71
|
} from "./chunk-WL7PZK7Q.js";
|
|
72
|
-
import {
|
|
73
|
-
FlowWaterfall
|
|
74
|
-
} from "./chunk-BLCYKYFV.js";
|
|
75
72
|
|
|
76
73
|
// src/web-react/chat-stream.ts
|
|
77
74
|
function mintThreadId() {
|
|
@@ -2586,6 +2583,7 @@ function useSmoothText(target, enabled, opts) {
|
|
|
2586
2583
|
|
|
2587
2584
|
// src/web-react/mission-activity.tsx
|
|
2588
2585
|
import { useCallback as useCallback6, useEffect as useEffect8, useState as useState14 } from "react";
|
|
2586
|
+
import { FlowWaterfall } from "@tangle-network/charts/react";
|
|
2589
2587
|
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2590
2588
|
var LIVE_STATUSES = /* @__PURE__ */ new Set(["pending", "running"]);
|
|
2591
2589
|
var OK_STATUSES = /* @__PURE__ */ new Set(["completed", "done", "succeeded"]);
|
|
@@ -7948,4 +7946,4 @@ export {
|
|
|
7948
7946
|
AgentProfileChoices,
|
|
7949
7947
|
ComposerProfilePill
|
|
7950
7948
|
};
|
|
7951
|
-
//# sourceMappingURL=chunk-
|
|
7949
|
+
//# sourceMappingURL=chunk-UCCSJX64.js.map
|