@tangle-network/agent-app 0.63.60 → 0.63.62

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 (105) hide show
  1. package/dist/{DesignCanvas-Q65UV4D5.js → DesignCanvas-566V5KVC.js} +3 -2
  2. package/dist/{DesignCanvasEditor-THEFESEX.js → DesignCanvasEditor-6XNHSREG.js} +5 -4
  3. package/dist/agent-profiles/d1.js +3 -3
  4. package/dist/agent-profiles/index.js +3 -3
  5. package/dist/app-auth/index.js +2 -1
  6. package/dist/app-auth/index.js.map +1 -1
  7. package/dist/assistant/index.js +6 -5
  8. package/dist/assistant/index.js.map +1 -1
  9. package/dist/chat-react/index.js +3 -3
  10. package/dist/chat-routes/agent-producers.d.ts +39 -0
  11. package/dist/chat-routes/dispatch-parts.d.ts +24 -2
  12. package/dist/chat-routes/hybrid-producer.d.ts +6 -2
  13. package/dist/chat-routes/index.d.ts +1 -0
  14. package/dist/chat-routes/index.js +31 -12
  15. package/dist/chat-routes/index.js.map +1 -1
  16. package/dist/chat-routes/turn-admission.d.ts +3 -3
  17. package/dist/chat-routes/turn-route-contracts.d.ts +39 -1
  18. package/dist/chat-routes/wire.d.ts +35 -4
  19. package/dist/chat-store/index.js +4 -2
  20. package/dist/chat-store/index.js.map +1 -1
  21. package/dist/chat-store/parts.d.ts +19 -3
  22. package/dist/{chunk-6XSQCP6W.js → chunk-43CV4JIT.js} +2 -2
  23. package/dist/{chunk-SFZELD6V.js → chunk-4JTEPK2G.js} +2 -2
  24. package/dist/{chunk-RILVJYXJ.js → chunk-5ERXADSW.js} +2 -2
  25. package/dist/{chunk-LAZCUQFZ.js → chunk-73AVOSH6.js} +179 -86
  26. package/dist/chunk-73AVOSH6.js.map +1 -0
  27. package/dist/{chunk-HHPQMFKP.js → chunk-7O62NYGT.js} +2 -2
  28. package/dist/{chunk-GGJYAV7R.js → chunk-AHBVQRJA.js} +2 -2
  29. package/dist/{chunk-GGJYAV7R.js.map → chunk-AHBVQRJA.js.map} +1 -1
  30. package/dist/{chunk-UTF7H6BK.js → chunk-EUQ46YWK.js} +15 -15
  31. package/dist/chunk-EUQ46YWK.js.map +1 -0
  32. package/dist/{chunk-PIGW5LRM.js → chunk-FJRQCF43.js} +3 -3
  33. package/dist/{chunk-AICYKYYF.js → chunk-GAYWV565.js} +17 -4
  34. package/dist/chunk-GAYWV565.js.map +1 -0
  35. package/dist/{chunk-5C3RXQQ7.js → chunk-H3DAXUKV.js} +2 -2
  36. package/dist/{chunk-SRA7VAVK.js → chunk-HJYEK4SU.js} +2 -2
  37. package/dist/{chunk-P7UB7ZVP.js → chunk-IAK227OO.js} +2 -2
  38. package/dist/{chunk-QGJOT6R6.js → chunk-K2JPSXKI.js} +54 -9
  39. package/dist/{chunk-QGJOT6R6.js.map → chunk-K2JPSXKI.js.map} +1 -1
  40. package/dist/{chunk-QFIVY6WA.js → chunk-NJW4JCSF.js} +2 -2
  41. package/dist/{chunk-IDQ7N36R.js → chunk-Q55WW6DO.js} +15 -15
  42. package/dist/{chunk-H6BRJU5M.js → chunk-RKNNMC6T.js} +1 -1
  43. package/dist/{chunk-KFO5R4SN.js → chunk-RYKANV3P.js} +945 -801
  44. package/dist/chunk-RYKANV3P.js.map +1 -0
  45. package/dist/{chunk-4E2MUVGL.js → chunk-VQIH5NAB.js} +3 -3
  46. package/dist/chunk-XBBXPZJI.js +47 -0
  47. package/dist/chunk-XBBXPZJI.js.map +1 -0
  48. package/dist/{chunk-DCGATWZ5.js → chunk-XPB2UYHU.js} +5 -5
  49. package/dist/{chunk-DCGATWZ5.js.map → chunk-XPB2UYHU.js.map} +1 -1
  50. package/dist/design-canvas/index.js +2 -1
  51. package/dist/design-canvas/index.js.map +1 -1
  52. package/dist/design-canvas-react/engine.js +2 -1
  53. package/dist/design-canvas-react/index.js +5 -4
  54. package/dist/design-canvas-react/index.js.map +1 -1
  55. package/dist/design-canvas-react/lazy.js +1 -1
  56. package/dist/operator/index.js +2 -2
  57. package/dist/platform/index.js +2 -1
  58. package/dist/platform/index.js.map +1 -1
  59. package/dist/preset-cloudflare/index.js +6 -6
  60. package/dist/public-consultation/index.d.ts +2 -2
  61. package/dist/public-consultation/index.js +11 -10
  62. package/dist/public-consultation/index.js.map +1 -1
  63. package/dist/sandbox/index.js +6 -6
  64. package/dist/sequences/index.js +2 -1
  65. package/dist/sequences/index.js.map +1 -1
  66. package/dist/stories/chat/fixtures.d.ts +4 -0
  67. package/dist/theme/brand.generated.d.ts +15 -15
  68. package/dist/theme/dom.js +2 -2
  69. package/dist/theme/index.js +1 -1
  70. package/dist/theme/tokens.css +210 -356
  71. package/dist/tools/index.js +4 -4
  72. package/dist/web/index.d.ts +1 -0
  73. package/dist/web/index.js +7 -1
  74. package/dist/web/speakers.d.ts +30 -0
  75. package/dist/web-react/chat-messages.d.ts +1 -1
  76. package/dist/web-react/chat-stream.d.ts +7 -0
  77. package/dist/web-react/document.js +2 -2
  78. package/dist/web-react/entry-composer.d.ts +2 -2
  79. package/dist/web-react/index.d.ts +3 -0
  80. package/dist/web-react/index.js +18 -5
  81. package/dist/web-react/message-projection.d.ts +19 -0
  82. package/dist/web-react/use-file-mentions.d.ts +23 -4
  83. package/dist/work-product/index.js +2 -2
  84. package/dist/workspace-react/index.d.ts +29 -1
  85. package/dist/workspace-react/index.js +34 -0
  86. package/dist/workspace-react/index.js.map +1 -1
  87. package/package.json +4 -4
  88. package/dist/chunk-AICYKYYF.js.map +0 -1
  89. package/dist/chunk-KFO5R4SN.js.map +0 -1
  90. package/dist/chunk-LAZCUQFZ.js.map +0 -1
  91. package/dist/chunk-UTF7H6BK.js.map +0 -1
  92. /package/dist/{DesignCanvas-Q65UV4D5.js.map → DesignCanvas-566V5KVC.js.map} +0 -0
  93. /package/dist/{DesignCanvasEditor-THEFESEX.js.map → DesignCanvasEditor-6XNHSREG.js.map} +0 -0
  94. /package/dist/{chunk-6XSQCP6W.js.map → chunk-43CV4JIT.js.map} +0 -0
  95. /package/dist/{chunk-SFZELD6V.js.map → chunk-4JTEPK2G.js.map} +0 -0
  96. /package/dist/{chunk-RILVJYXJ.js.map → chunk-5ERXADSW.js.map} +0 -0
  97. /package/dist/{chunk-HHPQMFKP.js.map → chunk-7O62NYGT.js.map} +0 -0
  98. /package/dist/{chunk-PIGW5LRM.js.map → chunk-FJRQCF43.js.map} +0 -0
  99. /package/dist/{chunk-5C3RXQQ7.js.map → chunk-H3DAXUKV.js.map} +0 -0
  100. /package/dist/{chunk-SRA7VAVK.js.map → chunk-HJYEK4SU.js.map} +0 -0
  101. /package/dist/{chunk-P7UB7ZVP.js.map → chunk-IAK227OO.js.map} +0 -0
  102. /package/dist/{chunk-QFIVY6WA.js.map → chunk-NJW4JCSF.js.map} +0 -0
  103. /package/dist/{chunk-IDQ7N36R.js.map → chunk-Q55WW6DO.js.map} +0 -0
  104. /package/dist/{chunk-H6BRJU5M.js.map → chunk-RKNNMC6T.js.map} +0 -0
  105. /package/dist/{chunk-4E2MUVGL.js.map → chunk-VQIH5NAB.js.map} +0 -0
@@ -1,14 +1,14 @@
1
1
  // src/design-canvas-react/lazy.tsx
2
2
  import { lazy } from "react";
3
3
  var DesignCanvasLazy = lazy(
4
- () => import("./DesignCanvasEditor-THEFESEX.js").then((m) => ({ default: m.DesignCanvasEditor }))
4
+ () => import("./DesignCanvasEditor-6XNHSREG.js").then((m) => ({ default: m.DesignCanvasEditor }))
5
5
  );
6
6
  var DesignCanvasChromeLazy = lazy(
7
- () => import("./DesignCanvas-Q65UV4D5.js").then((m) => ({ default: m.DesignCanvas }))
7
+ () => import("./DesignCanvas-566V5KVC.js").then((m) => ({ default: m.DesignCanvas }))
8
8
  );
9
9
 
10
10
  export {
11
11
  DesignCanvasLazy,
12
12
  DesignCanvasChromeLazy
13
13
  };
14
- //# sourceMappingURL=chunk-4E2MUVGL.js.map
14
+ //# sourceMappingURL=chunk-VQIH5NAB.js.map
@@ -0,0 +1,47 @@
1
+ // src/web/speakers.ts
2
+ var isSpeaker = (value) => {
3
+ const part = value;
4
+ return !!part && typeof part === "object" && part.type === "speaker" && typeof part.id === "string" && typeof part.name === "string";
5
+ };
6
+ var asRecord = (value) => value;
7
+ var SPEAKER_ROLE_LABEL = "Agent";
8
+ function expandSpeakerRows(rows) {
9
+ const out = [];
10
+ for (const row of rows) {
11
+ const parts = (row.role === "assistant" ? row.parts ?? [] : []).map(asRecord);
12
+ if (!parts.some(isSpeaker)) {
13
+ out.push(row);
14
+ continue;
15
+ }
16
+ let current = null;
17
+ const groups = [];
18
+ for (const part of parts) {
19
+ if (isSpeaker(part)) {
20
+ current = { speaker: { id: part.id, name: part.name, ...typeof part.handle === "string" ? { handle: part.handle } : {} }, parts: [] };
21
+ groups.push(current);
22
+ } else if (current) {
23
+ current.parts.push(part);
24
+ }
25
+ }
26
+ groups.forEach((group, index) => {
27
+ const content = group.parts.filter((part) => part.type === "text" && typeof part.text === "string").map((part) => part.text).join("");
28
+ out.push({
29
+ ...row,
30
+ id: `${row.id}#${index}:${group.speaker.id}`,
31
+ author: { id: group.speaker.id, name: group.speaker.name, role: SPEAKER_ROLE_LABEL },
32
+ content,
33
+ parts: group.parts,
34
+ // Client-built views of the whole row do not apply to one speaker's slice.
35
+ segments: void 0,
36
+ toolCalls: void 0
37
+ });
38
+ });
39
+ }
40
+ return out;
41
+ }
42
+
43
+ export {
44
+ SPEAKER_ROLE_LABEL,
45
+ expandSpeakerRows
46
+ };
47
+ //# sourceMappingURL=chunk-XBBXPZJI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/web/speakers.ts"],"sourcesContent":["/**\n * A turn addressed to several agents is persisted as ONE assistant row whose\n * parts carry a `speaker` part before each responder's parts. A transcript\n * draws each answer under its author, so this splits such a row into one row\n * per speaker in stored order. Rows without a speaker part pass through\n * untouched, byte for byte. Pure and renderer-neutral: no React, no DOM.\n */\nexport interface SpeakerRow {\n id: string | number\n role?: string\n content: string\n /** Stored parts; the typed store union and raw records are both read. */\n parts?: ReadonlyArray<unknown>\n author?: { id: string; name: string; role?: string; avatarUrl?: string }\n segments?: unknown\n toolCalls?: unknown\n}\n\nexport interface Speaker {\n id: string\n name: string\n handle?: string\n}\n\nconst isSpeaker = (value: unknown): value is Record<string, unknown> & Speaker & { type: 'speaker' } => {\n const part = value as Record<string, unknown> | null\n return !!part && typeof part === 'object' && part.type === 'speaker' && typeof part.id === 'string' && typeof part.name === 'string'\n}\nconst asRecord = (value: unknown): Record<string, unknown> => value as Record<string, unknown>\n\n/** The role label a split row shows beside the agent's name. */\nexport const SPEAKER_ROLE_LABEL = 'Agent'\n\nexport function expandSpeakerRows<T extends SpeakerRow>(rows: readonly T[]): Array<T & Pick<SpeakerRow, 'author'>> {\n const out: Array<T & Pick<SpeakerRow, 'author'>> = []\n for (const row of rows) {\n const parts = (row.role === 'assistant' ? row.parts ?? [] : []).map(asRecord)\n if (!parts.some(isSpeaker)) { out.push(row); continue }\n let current: { speaker: Speaker; parts: Record<string, unknown>[] } | null = null\n const groups: Array<{ speaker: Speaker; parts: Record<string, unknown>[] }> = []\n for (const part of parts) {\n if (isSpeaker(part)) {\n current = { speaker: { id: part.id, name: part.name, ...(typeof part.handle === 'string' ? { handle: part.handle } : {}) }, parts: [] }\n groups.push(current)\n } else if (current) {\n current.parts.push(part)\n }\n // Parts before the first speaker belong to no one and are dropped; the\n // route writes a speaker part first.\n }\n groups.forEach((group, index) => {\n const content = group.parts\n .filter((part) => part.type === 'text' && typeof part.text === 'string')\n .map((part) => part.text as string)\n .join('')\n out.push({\n ...row,\n id: `${row.id}#${index}:${group.speaker.id}`,\n author: { id: group.speaker.id, name: group.speaker.name, role: SPEAKER_ROLE_LABEL },\n content,\n parts: group.parts,\n // Client-built views of the whole row do not apply to one speaker's slice.\n segments: undefined,\n toolCalls: undefined,\n })\n })\n }\n return out\n}\n"],"mappings":";AAwBA,IAAM,YAAY,CAAC,UAAqF;AACtG,QAAM,OAAO;AACb,SAAO,CAAC,CAAC,QAAQ,OAAO,SAAS,YAAY,KAAK,SAA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ACA,SAAO;AACT;","names":[]}
@@ -1,4 +1,4 @@
1
- // node_modules/.pnpm/@tangle-network+ui@11.44.1_@hocuspocus+provider@4.7.1_y-protocols@1.0.7_yjs@13.6.33__yj_b859514eceb0ccec43ffbbe470ac348b/node_modules/@tangle-network/ui/dist/openui/schema-data.js
1
+ // node_modules/.pnpm/@tangle-network+ui@11.44.1_@hocuspocus+provider@4.7.1_y-protocols@1.0.7_yjs@13.6.33__yj_1ca981d1205521055d238f0f750f5b6e/node_modules/@tangle-network/ui/dist/openui/schema-data.js
2
2
  var OPENUI_NODE_TYPES = [
3
3
  "heading",
4
4
  "text",
@@ -197,7 +197,7 @@ var OPENUI_NODE_JSON_SCHEMA = {
197
197
  }
198
198
  };
199
199
 
200
- // node_modules/.pnpm/@tangle-network+ui@11.44.1_@hocuspocus+provider@4.7.1_y-protocols@1.0.7_yjs@13.6.33__yj_b859514eceb0ccec43ffbbe470ac348b/node_modules/@tangle-network/ui/dist/_virtual/_rolldown/runtime.js
200
+ // node_modules/.pnpm/@tangle-network+ui@11.44.1_@hocuspocus+provider@4.7.1_y-protocols@1.0.7_yjs@13.6.33__yj_1ca981d1205521055d238f0f750f5b6e/node_modules/@tangle-network/ui/dist/_virtual/_rolldown/runtime.js
201
201
  var __defProp = Object.defineProperty;
202
202
  var __exportAll = (all, no_symbols) => {
203
203
  let target = {};
@@ -209,7 +209,7 @@ var __exportAll = (all, no_symbols) => {
209
209
  return target;
210
210
  };
211
211
 
212
- // node_modules/.pnpm/@tangle-network+ui@11.44.1_@hocuspocus+provider@4.7.1_y-protocols@1.0.7_yjs@13.6.33__yj_b859514eceb0ccec43ffbbe470ac348b/node_modules/@tangle-network/ui/dist/openui/schema-compiled.js
212
+ // node_modules/.pnpm/@tangle-network+ui@11.44.1_@hocuspocus+provider@4.7.1_y-protocols@1.0.7_yjs@13.6.33__yj_1ca981d1205521055d238f0f750f5b6e/node_modules/@tangle-network/ui/dist/openui/schema-compiled.js
213
213
  var schema_compiled_exports = /* @__PURE__ */ __exportAll({
214
214
  actions: () => actions2,
215
215
  badge: () => badge,
@@ -9508,7 +9508,7 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
9508
9508
  return errors === 0;
9509
9509
  }
9510
9510
 
9511
- // node_modules/.pnpm/@tangle-network+ui@11.44.1_@hocuspocus+provider@4.7.1_y-protocols@1.0.7_yjs@13.6.33__yj_b859514eceb0ccec43ffbbe470ac348b/node_modules/@tangle-network/ui/dist/openui-schema.js
9511
+ // node_modules/.pnpm/@tangle-network+ui@11.44.1_@hocuspocus+provider@4.7.1_y-protocols@1.0.7_yjs@13.6.33__yj_1ca981d1205521055d238f0f750f5b6e/node_modules/@tangle-network/ui/dist/openui-schema.js
9512
9512
  var nodeTypes = new Set(OPENUI_NODE_TYPES);
9513
9513
  function findUnsupportedOpenUINode(value) {
9514
9514
  const seen = /* @__PURE__ */ new WeakSet();
@@ -9621,4 +9621,4 @@ export {
9621
9621
  OPENUI_NODE_JSON_SCHEMA,
9622
9622
  validateOpenUIJsonNode
9623
9623
  };
9624
- //# sourceMappingURL=chunk-DCGATWZ5.js.map
9624
+ //# sourceMappingURL=chunk-XPB2UYHU.js.map