@tangle-network/agent-app 0.54.0 → 0.54.1

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 (52) hide show
  1. package/dist/app-auth/index.js +2 -2
  2. package/dist/assistant/index.js +7 -7
  3. package/dist/chat-react/index.js +3 -3
  4. package/dist/chat-routes/index.js +22 -11
  5. package/dist/chat-routes/index.js.map +1 -1
  6. package/dist/chat-routes/sandbox-producer.d.ts +7 -0
  7. package/dist/chat-routes/wire.d.ts +1 -1
  8. package/dist/chat-store/index.js +4 -4
  9. package/dist/{chunk-UII6SBT4.js → chunk-4XBRPVL3.js} +4 -4
  10. package/dist/{chunk-TSZIYQAZ.js → chunk-6VRVRWYN.js} +2 -2
  11. package/dist/{chunk-CP36C5LZ.js → chunk-D6UJEOZQ.js} +1 -1
  12. package/dist/chunk-D6UJEOZQ.js.map +1 -0
  13. package/dist/{chunk-W3RSC6XB.js → chunk-DVOJNI6T.js} +3 -3
  14. package/dist/{chunk-M3K2HVQD.js → chunk-FCON65I2.js} +1 -1
  15. package/dist/{chunk-M3K2HVQD.js.map → chunk-FCON65I2.js.map} +1 -1
  16. package/dist/{chunk-UJHENCPR.js → chunk-GYDFGEJ2.js} +1 -1
  17. package/dist/chunk-GYDFGEJ2.js.map +1 -0
  18. package/dist/{chunk-YB6BZKXY.js → chunk-IJDPERPL.js} +31 -5
  19. package/dist/chunk-IJDPERPL.js.map +1 -0
  20. package/dist/{chunk-2S7QRQUS.js → chunk-NJA6X7JI.js} +2 -2
  21. package/dist/{chunk-JZ64GXYP.js → chunk-OMHGFN5I.js} +2 -2
  22. package/dist/{chunk-4KFM7VTH.js → chunk-OXDA7G4E.js} +9 -8
  23. package/dist/chunk-OXDA7G4E.js.map +1 -0
  24. package/dist/{chunk-ZMMIQOFI.js → chunk-UII4YDYS.js} +2 -2
  25. package/dist/{chunk-L57CYCXN.js → chunk-WN3UK23P.js} +2 -2
  26. package/dist/interactions/contract.d.ts +4 -3
  27. package/dist/interactions/index.js +2 -2
  28. package/dist/platform/index.js +2 -2
  29. package/dist/public-consultation/index.js +6 -6
  30. package/dist/runtime/index.js +1 -1
  31. package/dist/runtime/model.d.ts +1 -1
  32. package/dist/sandbox/index.d.ts +0 -4
  33. package/dist/sandbox/index.js +2 -2
  34. package/dist/sandbox/model.d.ts +9 -12
  35. package/dist/stream/index.js +2 -2
  36. package/dist/web-react/chat-stream.d.ts +1 -1
  37. package/dist/web-react/index.d.ts +10 -0
  38. package/dist/web-react/index.js +7 -7
  39. package/dist/workspace-react/index.js +51 -5
  40. package/dist/workspace-react/index.js.map +1 -1
  41. package/package.json +3 -3
  42. package/dist/chunk-4KFM7VTH.js.map +0 -1
  43. package/dist/chunk-CP36C5LZ.js.map +0 -1
  44. package/dist/chunk-UJHENCPR.js.map +0 -1
  45. package/dist/chunk-YB6BZKXY.js.map +0 -1
  46. /package/dist/{chunk-UII6SBT4.js.map → chunk-4XBRPVL3.js.map} +0 -0
  47. /package/dist/{chunk-TSZIYQAZ.js.map → chunk-6VRVRWYN.js.map} +0 -0
  48. /package/dist/{chunk-W3RSC6XB.js.map → chunk-DVOJNI6T.js.map} +0 -0
  49. /package/dist/{chunk-2S7QRQUS.js.map → chunk-NJA6X7JI.js.map} +0 -0
  50. /package/dist/{chunk-JZ64GXYP.js.map → chunk-OMHGFN5I.js.map} +0 -0
  51. /package/dist/{chunk-ZMMIQOFI.js.map → chunk-UII4YDYS.js.map} +0 -0
  52. /package/dist/{chunk-L57CYCXN.js.map → chunk-WN3UK23P.js.map} +0 -0
@@ -2,8 +2,8 @@ import {
2
2
  createAuthGuard,
3
3
  createBetterAuthSessionCookieMinter,
4
4
  createTangleSsoHandlers
5
- } from "../chunk-L57CYCXN.js";
6
- import "../chunk-CP36C5LZ.js";
5
+ } from "../chunk-WN3UK23P.js";
6
+ import "../chunk-D6UJEOZQ.js";
7
7
  import "../chunk-YNSPVKMS.js";
8
8
  import "../chunk-3NCPXNBZ.js";
9
9
  import "../chunk-TXD5HXLE.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  chatToolCallPart
3
- } from "../chunk-YB6BZKXY.js";
3
+ } from "../chunk-IJDPERPL.js";
4
4
  import "../chunk-WZ2FER6A.js";
5
5
  import "../chunk-3HUFJ5LO.js";
6
6
  import "../chunk-E4AY62T2.js";
@@ -9,7 +9,7 @@ import "../chunk-CUXCWQMW.js";
9
9
  import "../chunk-GEYACSFW.js";
10
10
  import {
11
11
  ChatComposer
12
- } from "../chunk-JZ64GXYP.js";
12
+ } from "../chunk-OMHGFN5I.js";
13
13
  import "../chunk-L7MB2LLM.js";
14
14
  import "../chunk-QMTZUDDN.js";
15
15
  import "../chunk-2WELYICW.js";
@@ -23,15 +23,15 @@ import {
23
23
  AsyncView
24
24
  } from "../chunk-Q3ZHNN5X.js";
25
25
  import "../chunk-FQYAJYPW.js";
26
- import "../chunk-2S7QRQUS.js";
26
+ import "../chunk-NJA6X7JI.js";
27
27
  import "../chunk-MCYJON3F.js";
28
28
  import "../chunk-7YA4QNTU.js";
29
- import "../chunk-W3RSC6XB.js";
29
+ import "../chunk-DVOJNI6T.js";
30
30
  import "../chunk-ZVEEWGDK.js";
31
- import "../chunk-UJHENCPR.js";
31
+ import "../chunk-GYDFGEJ2.js";
32
32
  import "../chunk-TXD5HXLE.js";
33
- import "../chunk-ZMMIQOFI.js";
34
- import "../chunk-M3K2HVQD.js";
33
+ import "../chunk-UII4YDYS.js";
34
+ import "../chunk-FCON65I2.js";
35
35
  import "../chunk-YJMCRXQQ.js";
36
36
 
37
37
  // src/assistant/sse.ts
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  ComposerModeControls,
3
3
  EntryComposer
4
- } from "../chunk-JZ64GXYP.js";
4
+ } from "../chunk-OMHGFN5I.js";
5
5
  import "../chunk-L7MB2LLM.js";
6
6
  import "../chunk-AUA75YFF.js";
7
7
  import "../chunk-LVSKKDX2.js";
8
8
  import "../chunk-SJWIZT7B.js";
9
9
  import "../chunk-MLG6XKPV.js";
10
- import "../chunk-2S7QRQUS.js";
10
+ import "../chunk-NJA6X7JI.js";
11
11
  import "../chunk-MCYJON3F.js";
12
12
  import "../chunk-7YA4QNTU.js";
13
- import "../chunk-UJHENCPR.js";
13
+ import "../chunk-GYDFGEJ2.js";
14
14
  import "../chunk-TXD5HXLE.js";
15
15
  export {
16
16
  ComposerModeControls,
@@ -24,7 +24,7 @@ import {
24
24
  checkAttachmentType,
25
25
  sanitizeAttachmentFileName,
26
26
  sniffBinary
27
- } from "../chunk-2S7QRQUS.js";
27
+ } from "../chunk-NJA6X7JI.js";
28
28
  import {
29
29
  DEFAULT_STALE_TURN_LOCK_GRACE_MS,
30
30
  DEFAULT_TERMINAL_TURN_LOCK_GRACE_MS,
@@ -42,7 +42,7 @@ import {
42
42
  flattenHistory,
43
43
  readSandboxBinaryBytes,
44
44
  statSandboxFileSize
45
- } from "../chunk-4KFM7VTH.js";
45
+ } from "../chunk-OXDA7G4E.js";
46
46
  import "../chunk-MCYJON3F.js";
47
47
  import "../chunk-LWSJK546.js";
48
48
  import "../chunk-2TARCQA2.js";
@@ -55,7 +55,7 @@ import "../chunk-CHYGAU4E.js";
55
55
  import {
56
56
  ProtectedModelSettlementError
57
57
  } from "../chunk-IMMCSVLV.js";
58
- import "../chunk-CP36C5LZ.js";
58
+ import "../chunk-D6UJEOZQ.js";
59
59
  import {
60
60
  assistantRowIdForTurn,
61
61
  createAssistantDraftWriter,
@@ -64,15 +64,15 @@ import {
64
64
  rowIdOf,
65
65
  storeSupportsDraftPersistence,
66
66
  streamChatRouteAsSandboxEvents
67
- } from "../chunk-UII6SBT4.js";
68
- import "../chunk-TSZIYQAZ.js";
67
+ } from "../chunk-4XBRPVL3.js";
68
+ import "../chunk-6VRVRWYN.js";
69
69
  import "../chunk-YNSPVKMS.js";
70
70
  import "../chunk-3NCPXNBZ.js";
71
71
  import {
72
72
  attachmentInputToPart,
73
73
  attachmentKindForMime,
74
74
  toChatMessageParts
75
- } from "../chunk-W3RSC6XB.js";
75
+ } from "../chunk-DVOJNI6T.js";
76
76
  import "../chunk-ZVEEWGDK.js";
77
77
  import {
78
78
  ChatTurnInputError,
@@ -94,7 +94,7 @@ import {
94
94
  parseFileMentions,
95
95
  promptPartsByteSize,
96
96
  validateSandboxMentionPath
97
- } from "../chunk-UJHENCPR.js";
97
+ } from "../chunk-GYDFGEJ2.js";
98
98
  import {
99
99
  isWorkspaceFileExportable
100
100
  } from "../chunk-TXD5HXLE.js";
@@ -111,7 +111,7 @@ import {
111
111
  normalizePersistedPart,
112
112
  normalizeToolEvent,
113
113
  terminalizeDanglingAssistantToolUpdates
114
- } from "../chunk-ZMMIQOFI.js";
114
+ } from "../chunk-UII4YDYS.js";
115
115
  import {
116
116
  cancelStatusFor,
117
117
  interactionPartKey,
@@ -121,7 +121,7 @@ import {
121
121
  noticePartKey,
122
122
  parseInteractionCancel,
123
123
  parseInteractionRequest
124
- } from "../chunk-M3K2HVQD.js";
124
+ } from "../chunk-FCON65I2.js";
125
125
  import {
126
126
  parsePlanSubmittedEvent,
127
127
  planToPersistedPart
@@ -811,6 +811,13 @@ function createSandboxChatProducer(options) {
811
811
  yield { type: "notice", id: notice.id, noticeKind: "warning", text: queued.text };
812
812
  }
813
813
  }
814
+ let errorNoticeCount = 0;
815
+ function* emitErrorNotice(text) {
816
+ errorNoticeCount += 1;
817
+ const notice = noticePart("error", `error-${errorNoticeCount}`, text);
818
+ recordPersistedPart(notice, void 0, noticePartKey(notice.id));
819
+ yield { type: "notice", id: notice.id, noticeKind: "error", text };
820
+ }
814
821
  async function* stream() {
815
822
  try {
816
823
  for await (const raw of source) {
@@ -1041,7 +1048,9 @@ function createSandboxChatProducer(options) {
1041
1048
  Error: ${message}` : `The sandbox agent returned an error before producing a visible answer.
1042
1049
 
1043
1050
  Error: ${message}`;
1044
- if (options.includeErrorText !== false) {
1051
+ if (options.errorNotice) {
1052
+ yield* emitErrorNotice(errorContent);
1053
+ } else if (options.includeErrorText !== false) {
1045
1054
  const errorDelta = fullText ? `
1046
1055
 
1047
1056
  ---
@@ -1063,7 +1072,9 @@ ${errorContent}` : errorContent;
1063
1072
  failureNote: diagnostic.failureNote,
1064
1073
  error: streamErr instanceof Error ? streamErr.message : String(streamErr)
1065
1074
  });
1066
- if (options.includeErrorText !== false) {
1075
+ if (options.errorNotice) {
1076
+ yield* emitErrorNotice(diagnostic.userMessage);
1077
+ } else if (options.includeErrorText !== false) {
1067
1078
  const errorDelta = fullText ? `
1068
1079
 
1069
1080
  ---