@tangle-network/agent-app 0.63.61 → 0.63.63

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.
Files changed (82) hide show
  1. package/dist/{DesignCanvasEditor-YWDEFWYQ.js → DesignCanvasEditor-6XNHSREG.js} +3 -3
  2. package/dist/agent-profiles/d1.js +3 -3
  3. package/dist/agent-profiles/index.js +3 -3
  4. package/dist/assistant/index.js +5 -5
  5. package/dist/chat-react/index.js +3 -3
  6. package/dist/chat-routes/agent-producers.d.ts +11 -10
  7. package/dist/chat-routes/dispatch-parts.d.ts +24 -2
  8. package/dist/chat-routes/hybrid-producer.d.ts +6 -2
  9. package/dist/chat-routes/index.js +16 -14
  10. package/dist/chat-routes/index.js.map +1 -1
  11. package/dist/chat-routes/turn-route-contracts.d.ts +4 -3
  12. package/dist/chat-routes/wire.d.ts +6 -0
  13. package/dist/chat-store/index.js +2 -2
  14. package/dist/{chunk-RVC7EHJI.js → chunk-3F5LGESB.js} +2058 -1985
  15. package/dist/chunk-3F5LGESB.js.map +1 -0
  16. package/dist/{chunk-6XSQCP6W.js → chunk-43CV4JIT.js} +2 -2
  17. package/dist/{chunk-SFZELD6V.js → chunk-4JTEPK2G.js} +2 -2
  18. package/dist/{chunk-N5KBDRSX.js → chunk-5ERXADSW.js} +2 -2
  19. package/dist/{chunk-F2N55QQX.js → chunk-73AVOSH6.js} +136 -80
  20. package/dist/chunk-73AVOSH6.js.map +1 -0
  21. package/dist/{chunk-RNFVAAJJ.js → chunk-7O62NYGT.js} +2 -2
  22. package/dist/{chunk-DPZXCVVS.js → chunk-AHBVQRJA.js} +2 -2
  23. package/dist/{chunk-O2TYB3DH.js → chunk-EJIDXO6S.js} +16 -16
  24. package/dist/{chunk-UTF7H6BK.js → chunk-EUQ46YWK.js} +15 -15
  25. package/dist/chunk-EUQ46YWK.js.map +1 -0
  26. package/dist/{chunk-PIGW5LRM.js → chunk-FJRQCF43.js} +3 -3
  27. package/dist/{chunk-MIQL36JS.js → chunk-GAYWV565.js} +2 -2
  28. package/dist/{chunk-YRWUJKW5.js → chunk-GIQXJLR3.js} +2 -2
  29. package/dist/{chunk-5C3RXQQ7.js → chunk-H3DAXUKV.js} +2 -2
  30. package/dist/{chunk-6XEW5YXP.js → chunk-HHAAM7RF.js} +2 -2
  31. package/dist/{chunk-SRA7VAVK.js → chunk-HJYEK4SU.js} +2 -2
  32. package/dist/{chunk-75I4RXIE.js → chunk-IAK227OO.js} +2 -2
  33. package/dist/{chunk-W6G2HF6M.js → chunk-J4SI766J.js} +16 -38
  34. package/dist/chunk-J4SI766J.js.map +1 -0
  35. package/dist/{chunk-F6UC2T6U.js → chunk-K2JPSXKI.js} +6 -1
  36. package/dist/{chunk-F6UC2T6U.js.map → chunk-K2JPSXKI.js.map} +1 -1
  37. package/dist/{chunk-QFIVY6WA.js → chunk-NJW4JCSF.js} +2 -2
  38. package/dist/{chunk-TFV4QOCG.js → chunk-VQIH5NAB.js} +2 -2
  39. package/dist/{chunk-DCGATWZ5.js → chunk-XPB2UYHU.js} +5 -5
  40. package/dist/{chunk-DCGATWZ5.js.map → chunk-XPB2UYHU.js.map} +1 -1
  41. package/dist/design-canvas-react/index.js +3 -3
  42. package/dist/design-canvas-react/lazy.js +1 -1
  43. package/dist/operator/index.js +2 -2
  44. package/dist/preset-cloudflare/index.js +7 -7
  45. package/dist/public-consultation/index.d.ts +1 -1
  46. package/dist/public-consultation/index.js +11 -11
  47. package/dist/runtime/index.js +3 -3
  48. package/dist/runtime/router-turn.js +2 -2
  49. package/dist/sandbox/index.js +7 -7
  50. package/dist/theme/brand.generated.d.ts +15 -15
  51. package/dist/theme/dom.js +2 -2
  52. package/dist/theme/index.js +1 -1
  53. package/dist/theme/tokens.css +210 -356
  54. package/dist/tools/index.js +4 -4
  55. package/dist/turn-trace/index.js +1 -1
  56. package/dist/turn-trace/otel.d.ts +4 -25
  57. package/dist/web-react/document.js +2 -2
  58. package/dist/web-react/index.d.ts +3 -0
  59. package/dist/web-react/index.js +15 -5
  60. package/dist/web-react/message-projection.d.ts +19 -0
  61. package/dist/work-product/index.js +2 -2
  62. package/package.json +5 -4
  63. package/dist/chunk-F2N55QQX.js.map +0 -1
  64. package/dist/chunk-RVC7EHJI.js.map +0 -1
  65. package/dist/chunk-UTF7H6BK.js.map +0 -1
  66. package/dist/chunk-W6G2HF6M.js.map +0 -1
  67. /package/dist/{DesignCanvasEditor-YWDEFWYQ.js.map → DesignCanvasEditor-6XNHSREG.js.map} +0 -0
  68. /package/dist/{chunk-6XSQCP6W.js.map → chunk-43CV4JIT.js.map} +0 -0
  69. /package/dist/{chunk-SFZELD6V.js.map → chunk-4JTEPK2G.js.map} +0 -0
  70. /package/dist/{chunk-N5KBDRSX.js.map → chunk-5ERXADSW.js.map} +0 -0
  71. /package/dist/{chunk-RNFVAAJJ.js.map → chunk-7O62NYGT.js.map} +0 -0
  72. /package/dist/{chunk-DPZXCVVS.js.map → chunk-AHBVQRJA.js.map} +0 -0
  73. /package/dist/{chunk-O2TYB3DH.js.map → chunk-EJIDXO6S.js.map} +0 -0
  74. /package/dist/{chunk-PIGW5LRM.js.map → chunk-FJRQCF43.js.map} +0 -0
  75. /package/dist/{chunk-MIQL36JS.js.map → chunk-GAYWV565.js.map} +0 -0
  76. /package/dist/{chunk-YRWUJKW5.js.map → chunk-GIQXJLR3.js.map} +0 -0
  77. /package/dist/{chunk-5C3RXQQ7.js.map → chunk-H3DAXUKV.js.map} +0 -0
  78. /package/dist/{chunk-6XEW5YXP.js.map → chunk-HHAAM7RF.js.map} +0 -0
  79. /package/dist/{chunk-SRA7VAVK.js.map → chunk-HJYEK4SU.js.map} +0 -0
  80. /package/dist/{chunk-75I4RXIE.js.map → chunk-IAK227OO.js.map} +0 -0
  81. /package/dist/{chunk-QFIVY6WA.js.map → chunk-NJW4JCSF.js.map} +0 -0
  82. /package/dist/{chunk-TFV4QOCG.js.map → chunk-VQIH5NAB.js.map} +0 -0
@@ -5,7 +5,7 @@ import {
5
5
  outcomeStatus,
6
6
  resolveToolCapabilities,
7
7
  restrictTaxonomy
8
- } from "../chunk-PIGW5LRM.js";
8
+ } from "../chunk-FJRQCF43.js";
9
9
  import {
10
10
  DEFAULT_APP_TOOL_PATHS,
11
11
  DEFAULT_HEADER_NAMES,
@@ -24,7 +24,7 @@ import {
24
24
  verifyCapabilityToken,
25
25
  verifyExpiringCapabilityToken
26
26
  } from "../chunk-O7UX55EU.js";
27
- import "../chunk-6XSQCP6W.js";
27
+ import "../chunk-43CV4JIT.js";
28
28
  import "../chunk-S5SRJJQG.js";
29
29
  import {
30
30
  APP_TOOL_NAMES,
@@ -33,9 +33,9 @@ import {
33
33
  defineAppTool,
34
34
  findCustomTool,
35
35
  isAppToolName
36
- } from "../chunk-SRA7VAVK.js";
36
+ } from "../chunk-HJYEK4SU.js";
37
37
  import "../chunk-UGWQLQDS.js";
38
- import "../chunk-DCGATWZ5.js";
38
+ import "../chunk-XPB2UYHU.js";
39
39
  import {
40
40
  ToolInputError
41
41
  } from "../chunk-F4XBNR5L.js";
@@ -13,7 +13,7 @@ import {
13
13
  summarizeTurnSpans,
14
14
  tracedModelFetch,
15
15
  turnTraceId
16
- } from "../chunk-W6G2HF6M.js";
16
+ } from "../chunk-J4SI766J.js";
17
17
  export {
18
18
  TURN_SPAN_KINDS,
19
19
  buildTurnTraceOtelSpans,
@@ -13,33 +13,12 @@
13
13
  * and its exporter keeps a timer a Worker refuses at module scope. One OTLP
14
14
  * POST per finished turn needs neither.
15
15
  */
16
+ import { type OtlpSpan } from '@tangle-network/agent-trace-contract/otlp';
16
17
  import { type TurnSpanAttrs, type TurnTraceSink, type TurnTraceSnapshot } from './recorder';
17
- /** One OTLP/JSON span, as Intelligence's ingest reads it. */
18
- export interface OtlpSpan {
19
- traceId: string;
20
- spanId: string;
21
- parentSpanId?: string;
22
- name: string;
23
- kind: number;
24
- startTimeUnixNano: string;
25
- endTimeUnixNano: string;
26
- attributes: Array<{
27
- key: string;
28
- value: {
29
- stringValue?: string;
30
- intValue?: string;
31
- doubleValue?: number;
32
- boolValue?: boolean;
33
- };
34
- }>;
35
- status: {
36
- code: number;
37
- message?: string;
38
- };
39
- }
18
+ export type { OtlpSpan } from '@tangle-network/agent-trace-contract/otlp';
40
19
  /**
41
- * A Tangle trace id as the 32-hex OTLP trace id. The mapping is the Sandbox SDK's `otelTraceIdForTangleTrace`, so a
42
- * Sandbox trace export of the same turn lands in the same OTLP trace. An id that is already 32 hex, or a UUID, is used as it is.
20
+ * A Tangle trace id as the 32-hex OTLP trace id. The rule is agent-trace-contract's `toW3CTraceId`, the one the Sandbox
21
+ * SDK, agent-eval and agent-runtime use too, so every export of the same turn lands in the same OTLP trace.
43
22
  */
44
23
  export declare function otlpTraceId(traceId: string): string;
45
24
  /**
@@ -4,12 +4,12 @@ import {
4
4
  THEME_BOOTSTRAP_SCRIPT,
5
5
  applyThemeDom,
6
6
  shouldFollowSystemTheme
7
- } from "../chunk-SFZELD6V.js";
7
+ } from "../chunk-4JTEPK2G.js";
8
8
  import {
9
9
  darkTheme,
10
10
  lightTheme,
11
11
  themeColor
12
- } from "../chunk-UTF7H6BK.js";
12
+ } from "../chunk-EUQ46YWK.js";
13
13
 
14
14
  // src/web-react/document.tsx
15
15
  import { useEffect } from "react";
@@ -47,6 +47,9 @@ export * from './durable-interaction-submit';
47
47
  export * from './use-chat-interactions';
48
48
  export * from './use-file-mentions';
49
49
  export * from './chat-mentions';
50
+ export * from './message-projection';
51
+ export { agentHandle, AGENT_HANDLE_PATTERN } from '../chat-routes/wire';
52
+ export type { AgentMention, ChatMention } from '../chat-routes/wire';
50
53
  export * from './mention-pill';
51
54
  export * from './entry-composer';
52
55
  export * from './composer-mode-controls';
@@ -116,6 +116,7 @@ import {
116
116
  rollUpProvenanceStanding,
117
117
  sameRecordGridValue,
118
118
  segmentMentionContent,
119
+ segmentsFromParts,
119
120
  settleInteractionSubmit,
120
121
  sparklineGeometry,
121
122
  sparklineLabel,
@@ -125,6 +126,8 @@ import {
125
126
  streamChatTurn,
126
127
  sumRecordGridColumn,
127
128
  terminalizePendingChatInteractions,
129
+ toolCallFromPart,
130
+ toolCallsFromParts,
128
131
  trackChatReasoning,
129
132
  triggerAttachmentDownload,
130
133
  upsertChatInteraction,
@@ -148,7 +151,7 @@ import {
148
151
  withoutRecordGridCreated,
149
152
  withoutRecordGridRemoved,
150
153
  withoutRecordGridUpdate
151
- } from "../chunk-F2N55QQX.js";
154
+ } from "../chunk-73AVOSH6.js";
152
155
  import {
153
156
  useInfiniteScroll
154
157
  } from "../chunk-UHSUY6H6.js";
@@ -190,7 +193,7 @@ import {
190
193
  preloadWhenIdle,
191
194
  useComposerAttachments,
192
195
  useDictation
193
- } from "../chunk-DPZXCVVS.js";
196
+ } from "../chunk-AHBVQRJA.js";
194
197
  import "../chunk-L7MB2LLM.js";
195
198
  import {
196
199
  AgentSessionControls,
@@ -250,7 +253,7 @@ import {
250
253
  ALLOWED_ATTACHMENT_SNIFFED_MIMES,
251
254
  ATTACHMENT_ACCEPT,
252
255
  OOXML_SNIFFED_MIMES
253
- } from "../chunk-75I4RXIE.js";
256
+ } from "../chunk-IAK227OO.js";
254
257
  import "../chunk-B7CL7ENS.js";
255
258
  import "../chunk-XBBXPZJI.js";
256
259
  import {
@@ -260,7 +263,7 @@ import {
260
263
  isChatAttachmentPart,
261
264
  mentionInputToPart,
262
265
  mentionPartsFromMessageParts
263
- } from "../chunk-MIQL36JS.js";
266
+ } from "../chunk-GAYWV565.js";
264
267
  import "../chunk-ZVEEWGDK.js";
265
268
  import {
266
269
  attachmentPartKey
@@ -291,6 +294,7 @@ import {
291
294
  stampInteractionAnswers
292
295
  } from "../chunk-TB6KNPFI.js";
293
296
  import {
297
+ AGENT_HANDLE_PATTERN,
294
298
  DISPATCH_MAX_MEDIA_PARTS,
295
299
  DISPATCH_MAX_PARTS,
296
300
  DISPATCH_REQUEST_MAX_BYTES,
@@ -302,6 +306,7 @@ import {
302
306
  TURN_RESPONSE_EVENT,
303
307
  TURN_ROUTE_PHASE_MESSAGES,
304
308
  TURN_STREAM_LOST_CODE,
309
+ agentHandle,
305
310
  base64WireLen,
306
311
  buildMentionPromptBlock,
307
312
  buildTurnPhaseEvent,
@@ -312,13 +317,14 @@ import {
312
317
  mediaTypeForMentionPath,
313
318
  mentionKindForPath,
314
319
  settleTurnResponse
315
- } from "../chunk-F6UC2T6U.js";
320
+ } from "../chunk-K2JPSXKI.js";
316
321
  import "../chunk-AMUXRAUO.js";
317
322
  import "../chunk-PV33JZKV.js";
318
323
  import "../chunk-RCSAAWOH.js";
319
324
  import "../chunk-4PIN6QYQ.js";
320
325
  import "../chunk-TXD5HXLE.js";
321
326
  export {
327
+ AGENT_HANDLE_PATTERN,
322
328
  AGENT_PROFILE_EDITOR_SECTIONS,
323
329
  ALLOWED_ATTACHMENT_SNIFFED_MIMES,
324
330
  ATTACHMENT_ACCEPT,
@@ -417,6 +423,7 @@ export {
417
423
  __resetAttachmentFileCacheForTests,
418
424
  acceptRejectionReason,
419
425
  activityTone,
426
+ agentHandle,
420
427
  attachmentInputToPart,
421
428
  attachmentKindForMime,
422
429
  attachmentPartKey,
@@ -538,6 +545,7 @@ export {
538
545
  rollUpProvenanceStanding,
539
546
  sameRecordGridValue,
540
547
  segmentMentionContent,
548
+ segmentsFromParts,
541
549
  settleInteractionSubmit,
542
550
  settleTurnResponse,
543
551
  sparklineGeometry,
@@ -550,6 +558,8 @@ export {
550
558
  sumRecordGridColumn,
551
559
  tabTerminalConnectionId,
552
560
  terminalizePendingChatInteractions,
561
+ toolCallFromPart,
562
+ toolCallsFromParts,
553
563
  trackChatReasoning,
554
564
  triggerAttachmentDownload,
555
565
  upsertChatInteraction,
@@ -0,0 +1,19 @@
1
+ /**
2
+ * One projection from a message's stored parts to what the transcript draws:
3
+ * the ordered text and tool segments, the tool calls, and the reasoning. A
4
+ * product's history loader and a split speaker row (`expandSpeakerRows`)
5
+ * read the same parts the same way, so an agent's tool timeline renders
6
+ * under that agent whether the row was written by one responder or several.
7
+ * Pure: no React, no DOM.
8
+ */
9
+ import type { ChatMessageSegment, ChatToolCallInfo } from './chat-message-types';
10
+ /** A stored `tool` part as the card the transcript draws. */
11
+ export declare function toolCallFromPart(part: unknown): ChatToolCallInfo | null;
12
+ /** Every tool call on a message, in stored order. */
13
+ export declare function toolCallsFromParts(parts: ReadonlyArray<unknown> | null | undefined): ChatToolCallInfo[];
14
+ /** The ordered text, tool and notice runs of a message, as the transcript
15
+ * interleaves them. Adjacent text parts fold into one run; reasoning,
16
+ * speaker, mention and file parts are not segments (they have their own
17
+ * rows). Returns an empty list for a message with no tool or notice, so a
18
+ * caller can keep the plain body for the common case. */
19
+ export declare function segmentsFromParts(parts: ReadonlyArray<unknown> | null | undefined): ChatMessageSegment[];
@@ -26,9 +26,9 @@ import {
26
26
  } from "../chunk-ZVEEWGDK.js";
27
27
  import {
28
28
  defineAppTool
29
- } from "../chunk-SRA7VAVK.js";
29
+ } from "../chunk-HJYEK4SU.js";
30
30
  import "../chunk-UGWQLQDS.js";
31
- import "../chunk-DCGATWZ5.js";
31
+ import "../chunk-XPB2UYHU.js";
32
32
  import {
33
33
  ToolInputError
34
34
  } from "../chunk-F4XBNR5L.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-app",
3
- "version": "0.63.61",
3
+ "version": "0.63.63",
4
4
  "packageManager": "pnpm@11.28.8",
5
5
  "description": "Build agent applications with typed chat, tools, sandboxes, integrations, billing, and evaluation.",
6
6
  "keywords": [
@@ -803,10 +803,10 @@
803
803
  "@tangle-network/agent-knowledge": "22.0.18",
804
804
  "@tangle-network/agent-profile-materialize": "0.27.5",
805
805
  "@tangle-network/agent-runtime": "0.350.2",
806
- "@tangle-network/brand": "1.27.1",
806
+ "@tangle-network/brand": "1.28.0",
807
807
  "@tangle-network/browser-agent-driver": "0.37.0",
808
808
  "@tangle-network/hub-sdk": "0.33.4",
809
- "@tangle-network/sandbox": "0.69.11",
809
+ "@tangle-network/sandbox": "0.69.12",
810
810
  "@tangle-network/sandbox-ui": "0.139.1",
811
811
  "@tangle-network/tcloud": "0.8.5",
812
812
  "@tangle-network/ui": "11.44.1",
@@ -1008,7 +1008,8 @@
1008
1008
  }
1009
1009
  },
1010
1010
  "dependencies": {
1011
- "@tangle-network/charts": "0.21.13",
1011
+ "@tangle-network/agent-trace-contract": "2.2.0",
1012
+ "@tangle-network/charts": "0.21.15",
1012
1013
  "proper-lockfile": "4.1.2"
1013
1014
  }
1014
1015
  }