@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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DesignCanvasEditor
3
- } from "./chunk-QFIVY6WA.js";
3
+ } from "./chunk-NJW4JCSF.js";
4
4
  import "./chunk-I4CFBLSJ.js";
5
5
  import "./chunk-P4RRC4AO.js";
6
6
  import "./chunk-SJ73F7HD.js";
@@ -13,8 +13,8 @@ import "./chunk-ALIWB2P3.js";
13
13
  import "./chunk-5VE4IDSU.js";
14
14
  import "./chunk-V42C72V5.js";
15
15
  import "./chunk-TXD5HXLE.js";
16
- import "./chunk-UTF7H6BK.js";
16
+ import "./chunk-EUQ46YWK.js";
17
17
  export {
18
18
  DesignCanvasEditor
19
19
  };
20
- //# sourceMappingURL=DesignCanvasEditor-YWDEFWYQ.js.map
20
+ //# sourceMappingURL=DesignCanvasEditor-6XNHSREG.js.map
@@ -2,11 +2,11 @@ import {
2
2
  ProfileConflictError,
3
3
  parseProfileRevisionDiff,
4
4
  serializeProfileRevisionDiff
5
- } from "../chunk-5C3RXQQ7.js";
5
+ } from "../chunk-H3DAXUKV.js";
6
6
  import "../chunk-3CI35I4X.js";
7
- import "../chunk-SRA7VAVK.js";
7
+ import "../chunk-HJYEK4SU.js";
8
8
  import "../chunk-UGWQLQDS.js";
9
- import "../chunk-DCGATWZ5.js";
9
+ import "../chunk-XPB2UYHU.js";
10
10
  import "../chunk-F4XBNR5L.js";
11
11
 
12
12
  // src/agent-profiles/d1.ts
@@ -21,14 +21,14 @@ import {
21
21
  readProfileAdmission,
22
22
  serializeProfileRevisionDiff,
23
23
  switchProfile
24
- } from "../chunk-5C3RXQQ7.js";
24
+ } from "../chunk-H3DAXUKV.js";
25
25
  import {
26
26
  normalizeProfileName,
27
27
  parseProfileSwitch
28
28
  } from "../chunk-3CI35I4X.js";
29
- import "../chunk-SRA7VAVK.js";
29
+ import "../chunk-HJYEK4SU.js";
30
30
  import "../chunk-UGWQLQDS.js";
31
- import "../chunk-DCGATWZ5.js";
31
+ import "../chunk-XPB2UYHU.js";
32
32
  import "../chunk-F4XBNR5L.js";
33
33
  export {
34
34
  PERMITTED_SELF_MOUNT_DIMENSIONS,
@@ -2,7 +2,7 @@ import {
2
2
  ReasoningRow,
3
3
  chatToolCallPart,
4
4
  resolveToolPresentation
5
- } from "../chunk-F2N55QQX.js";
5
+ } from "../chunk-73AVOSH6.js";
6
6
  import "../chunk-UHSUY6H6.js";
7
7
  import "../chunk-3HUFJ5LO.js";
8
8
  import "../chunk-7PULOECS.js";
@@ -12,7 +12,7 @@ import "../chunk-Y6PRDUFJ.js";
12
12
  import "../chunk-GEYACSFW.js";
13
13
  import {
14
14
  ChatComposer
15
- } from "../chunk-DPZXCVVS.js";
15
+ } from "../chunk-AHBVQRJA.js";
16
16
  import "../chunk-L7MB2LLM.js";
17
17
  import "../chunk-ARCXYOMS.js";
18
18
  import "../chunk-2VG6Q4TS.js";
@@ -31,14 +31,14 @@ import {
31
31
  } from "../chunk-AVP5SNIG.js";
32
32
  import "../chunk-RASGKEAL.js";
33
33
  import "../chunk-FQYAJYPW.js";
34
- import "../chunk-75I4RXIE.js";
34
+ import "../chunk-IAK227OO.js";
35
35
  import "../chunk-B7CL7ENS.js";
36
36
  import "../chunk-XBBXPZJI.js";
37
- import "../chunk-MIQL36JS.js";
37
+ import "../chunk-GAYWV565.js";
38
38
  import "../chunk-ZVEEWGDK.js";
39
39
  import "../chunk-U4F6NHAA.js";
40
40
  import "../chunk-TB6KNPFI.js";
41
- import "../chunk-F6UC2T6U.js";
41
+ import "../chunk-K2JPSXKI.js";
42
42
  import "../chunk-AMUXRAUO.js";
43
43
  import "../chunk-PV33JZKV.js";
44
44
  import "../chunk-RCSAAWOH.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ComposerModeControls,
3
3
  EntryComposer
4
- } from "../chunk-DPZXCVVS.js";
4
+ } from "../chunk-AHBVQRJA.js";
5
5
  import "../chunk-L7MB2LLM.js";
6
6
  import "../chunk-ARCXYOMS.js";
7
7
  import "../chunk-2HQP2CTA.js";
@@ -10,8 +10,8 @@ import "../chunk-RO25WIVS.js";
10
10
  import "../chunk-ZAMHLXNS.js";
11
11
  import "../chunk-SJWIZT7B.js";
12
12
  import "../chunk-RASGKEAL.js";
13
- import "../chunk-75I4RXIE.js";
14
- import "../chunk-F6UC2T6U.js";
13
+ import "../chunk-IAK227OO.js";
14
+ import "../chunk-K2JPSXKI.js";
15
15
  import "../chunk-AMUXRAUO.js";
16
16
  import "../chunk-RCSAAWOH.js";
17
17
  import "../chunk-TXD5HXLE.js";
@@ -1,15 +1,16 @@
1
1
  /**
2
- * A turn addressed to several agents runs them one after another, in mention
3
- * order, as one producer: the route sees one stream, persists one assistant
4
- * row, and the row's parts carry a `speaker` part before each responder's
5
- * parts so a transcript can draw each answer under its author. The live
6
- * stream carries the same boundary as a `speaker` event, so a viewer can
7
- * open a new block as each agent starts.
2
+ * A turn addressed to several agents runs them at the same time, each as its
3
+ * own producer with the same thread history, and presents them one after
4
+ * another in the order the mentions were typed: the route sees one stream,
5
+ * persists one assistant row, and the row's parts carry a `speaker` part
6
+ * before each responder's parts so a transcript can draw each answer under
7
+ * its author. The live stream carries the same boundary as a `speaker`
8
+ * event, so a viewer opens a new block as each agent's answer arrives.
8
9
  *
9
- * Sequential on purpose: one live block at a time is what a reader can follow,
10
- * the order is the order typed, and the box runs one session at a time per
11
- * turn. Running responders concurrently is an internal change here, not a
12
- * change to what is stored.
10
+ * Parallel on purpose: the agents are addressed, not chained, so each answers
11
+ * independently and none waits on another. Ordered presentation on purpose:
12
+ * one live block at a time is what a reader can follow, and the stored order
13
+ * is the order typed, so the transcript rereads the same way every time.
13
14
  */
14
15
  import type { ChatTurnIdentity } from '@tangle-network/agent-runtime/durable';
15
16
  import type { TurnTrace } from '../turn-trace/recorder';
@@ -61,8 +61,30 @@ export interface DispatchHistoryMessage {
61
61
  content: string;
62
62
  parts?: ReadonlyArray<Record<string, unknown>> | null;
63
63
  }
64
- /** Project persisted rows using the same role and attachment policy as dispatch. */
65
- export declare function projectDispatchHistory(messages: ReadonlyArray<DispatchHistoryMessage>): Array<{
64
+ /** Whose eyes the history is read through. */
65
+ export interface DispatchHistoryPov {
66
+ /** The agent being prompted (`args.agent?.id` on a mentioned turn). Its
67
+ * own answers stay `assistant`; every other agent's answer becomes a
68
+ * `user` message tagged `[Name] …`, the same tagging agent-runtime's
69
+ * `runConversation` uses, so three or more parties stay unambiguous. */
70
+ pov?: string;
71
+ /** The thread's own agent, so its untagged answers can be named when the
72
+ * history is read by someone else. Omit → untagged rows stay `assistant`. */
73
+ owner?: {
74
+ id: string;
75
+ name: string;
76
+ };
77
+ /** Append each row's attachment pointers to its text, as dispatch does.
78
+ * Default true; a Router turn with no box to read from passes false. */
79
+ attachments?: boolean;
80
+ }
81
+ /** Project persisted rows using the same role and attachment policy as dispatch.
82
+ * A row written by several agents (a `speaker` part before each answer)
83
+ * projects as one message per speaker, each tagged with its name; with a
84
+ * point of view, the reader's own answers are untagged `assistant` turns and
85
+ * everyone else's are tagged `user` turns. Reasoning and tool parts never
86
+ * project: they are the writer's trace, not anyone's context. */
87
+ export declare function projectDispatchHistory(messages: ReadonlyArray<DispatchHistoryMessage>, view?: DispatchHistoryPov): Array<{
66
88
  role: 'user' | 'assistant';
67
89
  content: string;
68
90
  }>;
@@ -41,6 +41,7 @@ import { type EscalationHint, type EscalationInput } from '../sandbox/escalation
41
41
  import { SandboxRunError, type SandboxRunToolOptions } from '../sandbox/sandbox-run-tool';
42
42
  import { type ComputerStepOptions } from '../sandbox/computer-step';
43
43
  import type { PersistedChatMessageForTurn } from '../stream/index';
44
+ import { type DispatchHistoryPov } from './dispatch-parts';
44
45
  import { type RouterTurnProducerOptions } from './router-producer';
45
46
  import type { ChatTurnRouteProducer } from './turn-routes';
46
47
  import type { ChatTurnPartInput, ChatTurnRequestPayload } from './wire';
@@ -99,8 +100,11 @@ export declare function turnPromptText(prompt: string | readonly ChatTurnPartInp
99
100
  /** Whether the turn carries files. Files live in the box, so a turn with them runs on the sandbox lane. */
100
101
  export declare function turnCarriesFiles(prompt: string | readonly ChatTurnPartInput[]): boolean;
101
102
  /** The conversation so far as the plain text history a Router turn replays: the last `limit` user and assistant
102
- * messages that have text. Tool parts are not replayed. */
103
- export declare function routerTurnHistory(priorMessages: ReadonlyArray<Pick<PersistedChatMessageForTurn, 'role' | 'content'>>, limit?: number): Array<{
103
+ * messages that have text, read through the responder's point of view when the turn was addressed to agents
104
+ * (a row several agents wrote becomes one tagged message per speaker). Tool and reasoning parts are not replayed. */
105
+ export declare function routerTurnHistory(priorMessages: ReadonlyArray<Pick<PersistedChatMessageForTurn, 'role' | 'content'> & {
106
+ parts?: ReadonlyArray<Record<string, unknown>> | null;
107
+ }>, limit?: number, view?: Pick<DispatchHistoryPov, 'pov' | 'owner'>): Array<{
104
108
  role: 'user' | 'assistant';
105
109
  content: string;
106
110
  }>;
@@ -27,7 +27,7 @@ import {
27
27
  sanitizeAttachmentFileName,
28
28
  sniffBinary,
29
29
  sniffedMimeImpliedByName
30
- } from "../chunk-75I4RXIE.js";
30
+ } from "../chunk-IAK227OO.js";
31
31
  import {
32
32
  assertSafeKeySegment
33
33
  } from "../chunk-6DOQ6T2O.js";
@@ -40,10 +40,10 @@ import {
40
40
  observeNativeCompletion,
41
41
  readCompletedSandboxTurn,
42
42
  recoverSandboxAssistantMessage
43
- } from "../chunk-N5KBDRSX.js";
43
+ } from "../chunk-5ERXADSW.js";
44
44
  import {
45
45
  runProtectedRouterTurn
46
- } from "../chunk-6XEW5YXP.js";
46
+ } from "../chunk-HHAAM7RF.js";
47
47
  import {
48
48
  DEFAULT_MODEL_FIRST_RESPONSE_TIMEOUT_MS,
49
49
  DEFAULT_MODEL_STREAM_OPEN_TIMEOUT_MS,
@@ -82,14 +82,14 @@ import {
82
82
  turnCarriesFiles,
83
83
  turnPromptText,
84
84
  withProducerStream
85
- } from "../chunk-RVC7EHJI.js";
85
+ } from "../chunk-3F5LGESB.js";
86
86
  import "../chunk-SBHFMDR7.js";
87
87
  import "../chunk-RKNNMC6T.js";
88
88
  import "../chunk-XBBXPZJI.js";
89
89
  import "../chunk-4DBHC63F.js";
90
90
  import "../chunk-RN4WPTBH.js";
91
91
  import "../chunk-MM6RLOXF.js";
92
- import "../chunk-O2TYB3DH.js";
92
+ import "../chunk-EJIDXO6S.js";
93
93
  import "../chunk-F4TUZYMX.js";
94
94
  import {
95
95
  redactErrorMessage
@@ -100,14 +100,14 @@ import {
100
100
  isDraftContentEvent,
101
101
  rowIdOf,
102
102
  storeSupportsDraftPersistence
103
- } from "../chunk-RNFVAAJJ.js";
103
+ } from "../chunk-7O62NYGT.js";
104
104
  import "../chunk-2PCNHHN2.js";
105
105
  import "../chunk-YG66IHDU.js";
106
106
  import {
107
107
  attachmentInputToPart,
108
108
  attachmentKindForMime,
109
109
  toChatMessageParts
110
- } from "../chunk-MIQL36JS.js";
110
+ } from "../chunk-GAYWV565.js";
111
111
  import "../chunk-ZVEEWGDK.js";
112
112
  import {
113
113
  getPartKey,
@@ -141,6 +141,7 @@ import {
141
141
  TURN_RESPONSE_EVENT,
142
142
  TURN_ROUTE_PHASE_MESSAGES,
143
143
  TURN_STREAM_LOST_CODE,
144
+ agentHandle,
144
145
  agentMentionsOf,
145
146
  assertPromptPartsWithinCap,
146
147
  base64WireLen,
@@ -162,21 +163,21 @@ import {
162
163
  settleTurnResponse,
163
164
  turnResponseEventFor,
164
165
  validateSandboxMentionPath
165
- } from "../chunk-F6UC2T6U.js";
166
+ } from "../chunk-K2JPSXKI.js";
166
167
  import "../chunk-L3QR274L.js";
167
168
  import "../chunk-XELWWXJJ.js";
168
169
  import "../chunk-DSMGS4IV.js";
169
- import "../chunk-PIGW5LRM.js";
170
+ import "../chunk-FJRQCF43.js";
170
171
  import "../chunk-OY7A6M7S.js";
171
172
  import "../chunk-O7UX55EU.js";
172
- import "../chunk-6XSQCP6W.js";
173
+ import "../chunk-43CV4JIT.js";
173
174
  import "../chunk-S5SRJJQG.js";
174
- import "../chunk-SRA7VAVK.js";
175
+ import "../chunk-HJYEK4SU.js";
175
176
  import "../chunk-UGWQLQDS.js";
176
- import "../chunk-DCGATWZ5.js";
177
- import "../chunk-YRWUJKW5.js";
177
+ import "../chunk-XPB2UYHU.js";
178
+ import "../chunk-GIQXJLR3.js";
178
179
  import "../chunk-D6UJEOZQ.js";
179
- import "../chunk-W6G2HF6M.js";
180
+ import "../chunk-J4SI766J.js";
180
181
  import "../chunk-AMUXRAUO.js";
181
182
  import {
182
183
  sniffMimeFromName
@@ -1976,6 +1977,7 @@ export {
1976
1977
  TURN_STREAM_LOST_CODE,
1977
1978
  UPLOAD_INLINE_MAX_BYTES,
1978
1979
  UPLOAD_MAX_FILE_BYTES,
1980
+ agentHandle,
1979
1981
  agentMentionsOf,
1980
1982
  aggregateNativeCompletionReceipts,
1981
1983
  assertPromptPartsWithinCap,