@athenaintel/react 0.38.1 → 0.40.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.
Files changed (137) hide show
  1. package/README.md +23 -3
  2. package/dist/agent-runtime/src/errors.cjs +8 -0
  3. package/dist/agent-runtime/src/errors.cjs.map +1 -1
  4. package/dist/agent-runtime/src/errors.js +8 -0
  5. package/dist/agent-runtime/src/errors.js.map +1 -1
  6. package/dist/agent-runtime/src/messages.cjs +76 -16
  7. package/dist/agent-runtime/src/messages.cjs.map +1 -1
  8. package/dist/agent-runtime/src/messages.js +76 -16
  9. package/dist/agent-runtime/src/messages.js.map +1 -1
  10. package/dist/agent-runtime/src/tool-metadata.cjs +15 -0
  11. package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
  12. package/dist/agent-runtime/src/tool-metadata.js +15 -0
  13. package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
  14. package/dist/assets/use-asset-content.cjs +127 -0
  15. package/dist/assets/use-asset-content.cjs.map +1 -0
  16. package/dist/assets/use-asset-content.d.ts +60 -0
  17. package/dist/assets/use-asset-content.js +127 -0
  18. package/dist/assets/use-asset-content.js.map +1 -0
  19. package/dist/chat/super-grouping/CollapsibleGroup.cjs +16 -8
  20. package/dist/chat/super-grouping/CollapsibleGroup.cjs.map +1 -1
  21. package/dist/chat/super-grouping/CollapsibleGroup.d.ts +26 -1
  22. package/dist/chat/super-grouping/CollapsibleGroup.js +16 -8
  23. package/dist/chat/super-grouping/CollapsibleGroup.js.map +1 -1
  24. package/dist/chat/super-grouping/GroupedMessageParts.cjs +59 -0
  25. package/dist/chat/super-grouping/GroupedMessageParts.cjs.map +1 -0
  26. package/dist/chat/super-grouping/GroupedMessageParts.d.ts +25 -0
  27. package/dist/chat/super-grouping/GroupedMessageParts.js +59 -0
  28. package/dist/chat/super-grouping/GroupedMessageParts.js.map +1 -0
  29. package/dist/chat/super-grouping/SuperGroupingCard.cjs +9 -5
  30. package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
  31. package/dist/chat/super-grouping/SuperGroupingCard.d.ts +2 -1
  32. package/dist/chat/super-grouping/SuperGroupingCard.js +13 -9
  33. package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
  34. package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +10 -6
  35. package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -1
  36. package/dist/chat/super-grouping/SuperGroupingTranscript.js +14 -10
  37. package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -1
  38. package/dist/chat/super-grouping/grouped-part-keys.cjs +104 -0
  39. package/dist/chat/super-grouping/grouped-part-keys.cjs.map +1 -0
  40. package/dist/chat/super-grouping/grouped-part-keys.d.ts +37 -0
  41. package/dist/chat/super-grouping/grouped-part-keys.js +104 -0
  42. package/dist/chat/super-grouping/grouped-part-keys.js.map +1 -0
  43. package/dist/chat/super-grouping/index.cjs +2 -0
  44. package/dist/chat/super-grouping/index.cjs.map +1 -1
  45. package/dist/chat/super-grouping/index.d.ts +3 -1
  46. package/dist/chat/super-grouping/index.js +2 -0
  47. package/dist/chat/super-grouping/index.js.map +1 -1
  48. package/dist/chat-ui/composer/tiptap-composer.cjs +25 -19
  49. package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
  50. package/dist/chat-ui/composer/tiptap-composer.d.ts +5 -0
  51. package/dist/chat-ui/composer/tiptap-composer.js +26 -20
  52. package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
  53. package/dist/chat-ui/thread/statewire-history-edge.cjs +13 -0
  54. package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
  55. package/dist/chat-ui/thread/statewire-history-edge.js +13 -0
  56. package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
  57. package/dist/composer/clipboard.cjs +16 -0
  58. package/dist/composer/clipboard.cjs.map +1 -1
  59. package/dist/composer/clipboard.d.ts +9 -0
  60. package/dist/composer/clipboard.js +17 -1
  61. package/dist/composer/clipboard.js.map +1 -1
  62. package/dist/diagnostics/errors.cjs +11 -0
  63. package/dist/diagnostics/errors.cjs.map +1 -1
  64. package/dist/diagnostics/errors.d.ts +11 -0
  65. package/dist/diagnostics/errors.js +11 -0
  66. package/dist/diagnostics/errors.js.map +1 -1
  67. package/dist/index.cjs +37 -0
  68. package/dist/index.cjs.map +1 -1
  69. package/dist/index.d.ts +14 -1
  70. package/dist/index.js +37 -0
  71. package/dist/index.js.map +1 -1
  72. package/dist/provider/AthenaProvider.cjs +5 -2
  73. package/dist/provider/AthenaProvider.cjs.map +1 -1
  74. package/dist/provider/AthenaProvider.js +5 -2
  75. package/dist/provider/AthenaProvider.js.map +1 -1
  76. package/dist/provider/statewire-history-context.cjs +48 -0
  77. package/dist/provider/statewire-history-context.cjs.map +1 -0
  78. package/dist/provider/statewire-history-context.d.ts +36 -0
  79. package/dist/provider/statewire-history-context.js +48 -0
  80. package/dist/provider/statewire-history-context.js.map +1 -0
  81. package/dist/react/package.json.cjs +1 -1
  82. package/dist/react/package.json.js +1 -1
  83. package/dist/runtime/statewire-lifecycle.cjs +8 -0
  84. package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
  85. package/dist/runtime/statewire-lifecycle.js +9 -1
  86. package/dist/runtime/statewire-lifecycle.js.map +1 -1
  87. package/dist/styles.css +1 -1
  88. package/dist/tools/index.cjs +7 -0
  89. package/dist/tools/index.cjs.map +1 -1
  90. package/dist/tools/index.d.ts +2 -0
  91. package/dist/tools/index.js +7 -0
  92. package/dist/tools/index.js.map +1 -1
  93. package/dist/tools/inline-tools.cjs +10 -0
  94. package/dist/tools/inline-tools.cjs.map +1 -0
  95. package/dist/tools/inline-tools.d.ts +2 -0
  96. package/dist/tools/inline-tools.js +10 -0
  97. package/dist/tools/inline-tools.js.map +1 -0
  98. package/dist/tools/test-recording-report.cjs +175 -0
  99. package/dist/tools/test-recording-report.cjs.map +1 -0
  100. package/dist/tools/test-recording-report.d.ts +82 -0
  101. package/dist/tools/test-recording-report.js +175 -0
  102. package/dist/tools/test-recording-report.js.map +1 -0
  103. package/dist/tools/test-recording-tool-uis.cjs +498 -0
  104. package/dist/tools/test-recording-tool-uis.cjs.map +1 -0
  105. package/dist/tools/test-recording-tool-uis.d.ts +32 -0
  106. package/dist/tools/test-recording-tool-uis.js +498 -0
  107. package/dist/tools/test-recording-tool-uis.js.map +1 -0
  108. package/dist/tools/tool-summary.cjs +49 -1
  109. package/dist/tools/tool-summary.cjs.map +1 -1
  110. package/dist/tools/tool-summary.js +49 -1
  111. package/dist/tools/tool-summary.js.map +1 -1
  112. package/dist/tools/tool-uis.cjs +6 -1
  113. package/dist/tools/tool-uis.cjs.map +1 -1
  114. package/dist/tools/tool-uis.js +6 -1
  115. package/dist/tools/tool-uis.js.map +1 -1
  116. package/dist/workbench/ComputerLiveDesktop.cjs +287 -0
  117. package/dist/workbench/ComputerLiveDesktop.cjs.map +1 -0
  118. package/dist/workbench/ComputerLiveDesktop.d.ts +27 -0
  119. package/dist/workbench/ComputerLiveDesktop.js +287 -0
  120. package/dist/workbench/ComputerLiveDesktop.js.map +1 -0
  121. package/dist/workbench/SessionWorkbench.cjs +2 -2
  122. package/dist/workbench/SessionWorkbench.cjs.map +1 -1
  123. package/dist/workbench/SessionWorkbench.js +2 -2
  124. package/dist/workbench/SessionWorkbench.js.map +1 -1
  125. package/dist/workbench/live-desktop-api.cjs +139 -0
  126. package/dist/workbench/live-desktop-api.cjs.map +1 -0
  127. package/dist/workbench/live-desktop-api.d.ts +69 -0
  128. package/dist/workbench/live-desktop-api.js +139 -0
  129. package/dist/workbench/live-desktop-api.js.map +1 -0
  130. package/dist/workbench/session-workbench-context.cjs.map +1 -1
  131. package/dist/workbench/session-workbench-context.d.ts +7 -0
  132. package/dist/workbench/session-workbench-context.js.map +1 -1
  133. package/dist/workbench/session-workbench-panes.cjs +38 -2
  134. package/dist/workbench/session-workbench-panes.cjs.map +1 -1
  135. package/dist/workbench/session-workbench-panes.js +38 -2
  136. package/dist/workbench/session-workbench-panes.js.map +1 -1
  137. package/package.json +1 -1
@@ -28,3 +28,12 @@ export interface PastedImage {
28
28
  export declare function extractPastedImages({ clipboardData, }: {
29
29
  clipboardData: DataTransfer;
30
30
  }): PastedImage[];
31
+ export declare function isImageFile(file: File): boolean;
32
+ /**
33
+ * The non-image files of a paste (a PDF or spreadsheet copied in Finder or
34
+ * Explorer), kept under their own names. Images come from
35
+ * {@link extractPastedImages}, which renames them.
36
+ */
37
+ export declare function extractPastedNonImageFiles({ clipboardData, }: {
38
+ clipboardData: DataTransfer;
39
+ }): File[];
@@ -55,8 +55,24 @@ function extractPastedImages({
55
55
  }
56
56
  return images;
57
57
  }
58
+ function isImageFile(file) {
59
+ return file.type.startsWith("image/");
60
+ }
61
+ function extractPastedNonImageFiles({
62
+ clipboardData
63
+ }) {
64
+ const files = [];
65
+ for (const item of Array.from(clipboardData.items ?? [])) {
66
+ if (item.kind !== "file" || item.type.startsWith("image/")) continue;
67
+ const file = item.getAsFile();
68
+ if (file) files.push(file);
69
+ }
70
+ return files;
71
+ }
58
72
  export {
59
73
  clipboardHasMeaningfulText,
60
- extractPastedImages
74
+ extractPastedImages,
75
+ extractPastedNonImageFiles,
76
+ isImageFile
61
77
  };
62
78
  //# sourceMappingURL=clipboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.js","sources":["../../src/composer/clipboard.ts"],"sourcesContent":["const IMAGE_EXTENSION_BY_MIME_TYPE: Record<string, string> = {\n 'image/avif': 'avif',\n 'image/bmp': 'bmp',\n 'image/gif': 'gif',\n 'image/heic': 'heic',\n 'image/jpeg': 'jpg',\n 'image/png': 'png',\n 'image/svg+xml': 'svg',\n 'image/tiff': 'tiff',\n 'image/webp': 'webp',\n};\n\n/** A lone image file name — what Finder and Explorer put in `text/plain` beside a copied image file. */\nconst IMAGE_FILE_NAME = /^[^\\s\\\\/]+\\.(?:png|jpe?g|gif|webp|svg|bmp|tiff?|heic|avif)$/i;\n\n/**\n * Whether a clipboard carries text the user meant to paste: non-blank\n * `text/plain`, or `text/html` with text content once tags are stripped. An\n * Excel, Sheets or Word copy puts the cells' text beside a bitmap of them —\n * the text is the payload and the image is incidental; a copied web image\n * carries only an `<img>` tag, which has no text content; a copied image\n * *file* carries its own name in `text/plain` (Finder, Explorer), which is\n * not content either — pass the pasted files' names so it is recognized.\n * Tolerates the partial `DataTransfer` shapes test environments hand out.\n */\nexport function clipboardHasMeaningfulText({\n clipboardData,\n pastedFileNames = [],\n}: {\n clipboardData: DataTransfer;\n pastedFileNames?: readonly string[];\n}): boolean {\n const types = Array.from(clipboardData.types ?? []);\n if (typeof clipboardData.getData !== 'function') return false;\n\n if (types.includes('text/plain')) {\n const plainText = clipboardData.getData('text/plain').trim();\n const isFileName =\n pastedFileNames.includes(plainText) || IMAGE_FILE_NAME.test(plainText);\n if (plainText.length > 0 && !isFileName) {\n return true;\n }\n }\n\n if (types.includes('text/html')) {\n const html = clipboardData.getData('text/html');\n const textContent = html.replace(/<[^>]*>/g, '').trim();\n if (textContent.length > 0) {\n return true;\n }\n }\n\n return false;\n}\n\nexport interface PastedImage {\n /** The file as the composer attaches it: renamed so the asset gets a useful, unique title. */\n file: File;\n /** The name the clipboard carried — a copied file's own name, or the browser's bitmap default. */\n originalName: string;\n}\n\n/**\n * The image files of a paste, from the clipboard's items. Each is renamed\n * `pasted-image-<stamp>.<ext>` (the second and later of one paste get a\n * `-2`, `-3`, … suffix) with the extension taken from the MIME type, so a\n * pasted bitmap becomes an asset titled by the paste rather than the\n * browser's `image.png` default.\n */\nexport function extractPastedImages({\n clipboardData,\n}: {\n clipboardData: DataTransfer;\n}): PastedImage[] {\n const stamp = Date.now();\n const images: PastedImage[] = [];\n for (const item of Array.from(clipboardData.items ?? [])) {\n if (!item.type.startsWith('image/')) continue;\n const blob = item.getAsFile();\n if (!blob) continue;\n const originalName = blob.name || '';\n const ordinal = images.length === 0 ? '' : `-${images.length + 1}`;\n const extension =\n IMAGE_EXTENSION_BY_MIME_TYPE[item.type] ??\n item.type.slice('image/'.length).replace(/[^a-z0-9]/gi, '');\n // Two parts on purpose: a File built from a single File part shares that\n // part's name handle in some runtimes (Bun 1.3), so the rename would\n // either be lost or applied to the clipboard's file as well.\n images.push({\n file: new File(\n [blob, new Blob([])],\n `pasted-image-${stamp}${ordinal}.${extension || 'png'}`,\n { type: item.type },\n ),\n originalName,\n });\n }\n return images;\n}\n"],"names":[],"mappings":"AAAA,MAAM,+BAAuD;AAAA,EAC3D,cAAc;AAAA,EACd,aAAa;AAAA,EACb,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,cAAc;AAChB;AAGA,MAAM,kBAAkB;AAYjB,SAAS,2BAA2B;AAAA,EACzC;AAAA,EACA,kBAAkB,CAAA;AACpB,GAGY;AACV,QAAM,QAAQ,MAAM,KAAK,cAAc,SAAS,CAAA,CAAE;AAClD,MAAI,OAAO,cAAc,YAAY,WAAY,QAAO;AAExD,MAAI,MAAM,SAAS,YAAY,GAAG;AAChC,UAAM,YAAY,cAAc,QAAQ,YAAY,EAAE,KAAA;AACtD,UAAM,aACJ,gBAAgB,SAAS,SAAS,KAAK,gBAAgB,KAAK,SAAS;AACvE,QAAI,UAAU,SAAS,KAAK,CAAC,YAAY;AACvC,aAAO;AAAA,IACT;AAAA,EACF;AAEA,MAAI,MAAM,SAAS,WAAW,GAAG;AAC/B,UAAM,OAAO,cAAc,QAAQ,WAAW;AAC9C,UAAM,cAAc,KAAK,QAAQ,YAAY,EAAE,EAAE,KAAA;AACjD,QAAI,YAAY,SAAS,GAAG;AAC1B,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;AAgBO,SAAS,oBAAoB;AAAA,EAClC;AACF,GAEkB;AAChB,QAAM,QAAQ,KAAK,IAAA;AACnB,QAAM,SAAwB,CAAA;AAC9B,aAAW,QAAQ,MAAM,KAAK,cAAc,SAAS,CAAA,CAAE,GAAG;AACxD,QAAI,CAAC,KAAK,KAAK,WAAW,QAAQ,EAAG;AACrC,UAAM,OAAO,KAAK,UAAA;AAClB,QAAI,CAAC,KAAM;AACX,UAAM,eAAe,KAAK,QAAQ;AAClC,UAAM,UAAU,OAAO,WAAW,IAAI,KAAK,IAAI,OAAO,SAAS,CAAC;AAChE,UAAM,YACJ,6BAA6B,KAAK,IAAI,KACtC,KAAK,KAAK,MAAM,SAAS,MAAM,EAAE,QAAQ,eAAe,EAAE;AAI5D,WAAO,KAAK;AAAA,MACV,MAAM,IAAI;AAAA,QACR,CAAC,MAAM,IAAI,KAAK,CAAA,CAAE,CAAC;AAAA,QACnB,gBAAgB,KAAK,GAAG,OAAO,IAAI,aAAa,KAAK;AAAA,QACrD,EAAE,MAAM,KAAK,KAAA;AAAA,MAAK;AAAA,MAEpB;AAAA,IAAA,CACD;AAAA,EACH;AACA,SAAO;AACT;"}
1
+ {"version":3,"file":"clipboard.js","sources":["../../src/composer/clipboard.ts"],"sourcesContent":["const IMAGE_EXTENSION_BY_MIME_TYPE: Record<string, string> = {\n 'image/avif': 'avif',\n 'image/bmp': 'bmp',\n 'image/gif': 'gif',\n 'image/heic': 'heic',\n 'image/jpeg': 'jpg',\n 'image/png': 'png',\n 'image/svg+xml': 'svg',\n 'image/tiff': 'tiff',\n 'image/webp': 'webp',\n};\n\n/** A lone image file name — what Finder and Explorer put in `text/plain` beside a copied image file. */\nconst IMAGE_FILE_NAME = /^[^\\s\\\\/]+\\.(?:png|jpe?g|gif|webp|svg|bmp|tiff?|heic|avif)$/i;\n\n/**\n * Whether a clipboard carries text the user meant to paste: non-blank\n * `text/plain`, or `text/html` with text content once tags are stripped. An\n * Excel, Sheets or Word copy puts the cells' text beside a bitmap of them —\n * the text is the payload and the image is incidental; a copied web image\n * carries only an `<img>` tag, which has no text content; a copied image\n * *file* carries its own name in `text/plain` (Finder, Explorer), which is\n * not content either — pass the pasted files' names so it is recognized.\n * Tolerates the partial `DataTransfer` shapes test environments hand out.\n */\nexport function clipboardHasMeaningfulText({\n clipboardData,\n pastedFileNames = [],\n}: {\n clipboardData: DataTransfer;\n pastedFileNames?: readonly string[];\n}): boolean {\n const types = Array.from(clipboardData.types ?? []);\n if (typeof clipboardData.getData !== 'function') return false;\n\n if (types.includes('text/plain')) {\n const plainText = clipboardData.getData('text/plain').trim();\n const isFileName =\n pastedFileNames.includes(plainText) || IMAGE_FILE_NAME.test(plainText);\n if (plainText.length > 0 && !isFileName) {\n return true;\n }\n }\n\n if (types.includes('text/html')) {\n const html = clipboardData.getData('text/html');\n const textContent = html.replace(/<[^>]*>/g, '').trim();\n if (textContent.length > 0) {\n return true;\n }\n }\n\n return false;\n}\n\nexport interface PastedImage {\n /** The file as the composer attaches it: renamed so the asset gets a useful, unique title. */\n file: File;\n /** The name the clipboard carried — a copied file's own name, or the browser's bitmap default. */\n originalName: string;\n}\n\n/**\n * The image files of a paste, from the clipboard's items. Each is renamed\n * `pasted-image-<stamp>.<ext>` (the second and later of one paste get a\n * `-2`, `-3`, … suffix) with the extension taken from the MIME type, so a\n * pasted bitmap becomes an asset titled by the paste rather than the\n * browser's `image.png` default.\n */\nexport function extractPastedImages({\n clipboardData,\n}: {\n clipboardData: DataTransfer;\n}): PastedImage[] {\n const stamp = Date.now();\n const images: PastedImage[] = [];\n for (const item of Array.from(clipboardData.items ?? [])) {\n if (!item.type.startsWith('image/')) continue;\n const blob = item.getAsFile();\n if (!blob) continue;\n const originalName = blob.name || '';\n const ordinal = images.length === 0 ? '' : `-${images.length + 1}`;\n const extension =\n IMAGE_EXTENSION_BY_MIME_TYPE[item.type] ??\n item.type.slice('image/'.length).replace(/[^a-z0-9]/gi, '');\n // Two parts on purpose: a File built from a single File part shares that\n // part's name handle in some runtimes (Bun 1.3), so the rename would\n // either be lost or applied to the clipboard's file as well.\n images.push({\n file: new File(\n [blob, new Blob([])],\n `pasted-image-${stamp}${ordinal}.${extension || 'png'}`,\n { type: item.type },\n ),\n originalName,\n });\n }\n return images;\n}\n\nexport function isImageFile(file: File): boolean {\n return file.type.startsWith('image/');\n}\n\n/**\n * The non-image files of a paste (a PDF or spreadsheet copied in Finder or\n * Explorer), kept under their own names. Images come from\n * {@link extractPastedImages}, which renames them.\n */\nexport function extractPastedNonImageFiles({\n clipboardData,\n}: {\n clipboardData: DataTransfer;\n}): File[] {\n const files: File[] = [];\n for (const item of Array.from(clipboardData.items ?? [])) {\n if (item.kind !== 'file' || item.type.startsWith('image/')) continue;\n const file = item.getAsFile();\n if (file) files.push(file);\n }\n return files;\n}\n"],"names":[],"mappings":"AAAA,MAAM,+BAAuD;AAAA,EAC3D,cAAc;AAAA,EACd,aAAa;AAAA,EACb,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,cAAc;AAChB;AAGA,MAAM,kBAAkB;AAYjB,SAAS,2BAA2B;AAAA,EACzC;AAAA,EACA,kBAAkB,CAAA;AACpB,GAGY;AACV,QAAM,QAAQ,MAAM,KAAK,cAAc,SAAS,CAAA,CAAE;AAClD,MAAI,OAAO,cAAc,YAAY,WAAY,QAAO;AAExD,MAAI,MAAM,SAAS,YAAY,GAAG;AAChC,UAAM,YAAY,cAAc,QAAQ,YAAY,EAAE,KAAA;AACtD,UAAM,aACJ,gBAAgB,SAAS,SAAS,KAAK,gBAAgB,KAAK,SAAS;AACvE,QAAI,UAAU,SAAS,KAAK,CAAC,YAAY;AACvC,aAAO;AAAA,IACT;AAAA,EACF;AAEA,MAAI,MAAM,SAAS,WAAW,GAAG;AAC/B,UAAM,OAAO,cAAc,QAAQ,WAAW;AAC9C,UAAM,cAAc,KAAK,QAAQ,YAAY,EAAE,EAAE,KAAA;AACjD,QAAI,YAAY,SAAS,GAAG;AAC1B,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;AAgBO,SAAS,oBAAoB;AAAA,EAClC;AACF,GAEkB;AAChB,QAAM,QAAQ,KAAK,IAAA;AACnB,QAAM,SAAwB,CAAA;AAC9B,aAAW,QAAQ,MAAM,KAAK,cAAc,SAAS,CAAA,CAAE,GAAG;AACxD,QAAI,CAAC,KAAK,KAAK,WAAW,QAAQ,EAAG;AACrC,UAAM,OAAO,KAAK,UAAA;AAClB,QAAI,CAAC,KAAM;AACX,UAAM,eAAe,KAAK,QAAQ;AAClC,UAAM,UAAU,OAAO,WAAW,IAAI,KAAK,IAAI,OAAO,SAAS,CAAC;AAChE,UAAM,YACJ,6BAA6B,KAAK,IAAI,KACtC,KAAK,KAAK,MAAM,SAAS,MAAM,EAAE,QAAQ,eAAe,EAAE;AAI5D,WAAO,KAAK;AAAA,MACV,MAAM,IAAI;AAAA,QACR,CAAC,MAAM,IAAI,KAAK,CAAA,CAAE,CAAC;AAAA,QACnB,gBAAgB,KAAK,GAAG,OAAO,IAAI,aAAa,KAAK;AAAA,QACrD,EAAE,MAAM,KAAK,KAAA;AAAA,MAAK;AAAA,MAEpB;AAAA,IAAA,CACD;AAAA,EACH;AACA,SAAO;AACT;AAEO,SAAS,YAAY,MAAqB;AAC/C,SAAO,KAAK,KAAK,WAAW,QAAQ;AACtC;AAOO,SAAS,2BAA2B;AAAA,EACzC;AACF,GAEW;AACT,QAAM,QAAgB,CAAA;AACtB,aAAW,QAAQ,MAAM,KAAK,cAAc,SAAS,CAAA,CAAE,GAAG;AACxD,QAAI,KAAK,SAAS,UAAU,KAAK,KAAK,WAAW,QAAQ,EAAG;AAC5D,UAAM,OAAO,KAAK,UAAA;AAClB,QAAI,KAAM,OAAM,KAAK,IAAI;AAAA,EAC3B;AACA,SAAO;AACT;"}
@@ -74,6 +74,17 @@ const ATHENA_SDK_ERROR_CODES = {
74
74
  * SSH target.
75
75
  */
76
76
  session_workspace_failed: "session_workspace_failed",
77
+ /**
78
+ * A computer's live desktop session
79
+ * (`/api/sandbox/computer/{id}/live-desktop/session`) was refused or failed.
80
+ */
81
+ live_desktop_failed: "live_desktop_failed",
82
+ /**
83
+ * Reading an asset's stored file (`GET /api/asset/content/{id}`, e.g. a
84
+ * test recording's video) failed for a reason other than a refused
85
+ * credential (those are `auth_rejected`).
86
+ */
87
+ asset_content_failed: "asset_content_failed",
77
88
  /** Anything else. */
78
89
  unknown: "unknown"
79
90
  };
@@ -1 +1 @@
1
- {"version":3,"file":"errors.cjs","sources":["../../src/diagnostics/errors.ts"],"sourcesContent":["/**\n * Typed SDK errors. Every failure the SDK surfaces to a consumer carries a\n * stable `code` (matchable in code), a human `message`, and a `hint` — the\n * one-line \"what to do about it\" that turns a silent failure into a debuggable\n * one. Backend rejections keep their structured `{ status, detail }` payload.\n */\n\nexport const ATHENA_SDK_ERROR_CODES = {\n /** No token and no API key resolved before a request had to be sent. */\n auth_missing: 'auth_missing',\n /** The server refused the credential (401 / statewire `unauthorized` fin). */\n auth_rejected: 'auth_rejected',\n /**\n * `/_athena/auth` did not answer within the timeout on the last attempt of\n * its bounded retry cycle. The bridge stopped retrying (see\n * `ParentBridgeState.error`).\n */\n auth_bridge_timeout: 'auth_bridge_timeout',\n /**\n * `/_athena/auth` refused the mint (a 4xx other than 404), answered a body\n * it cannot read, or kept failing (5xx, 408, 429, network) through its\n * bounded retry cycle. The bridge stopped retrying and hands out no token\n * (see `ParentBridgeState.error`).\n */\n auth_bridge_failed: 'auth_bridge_failed',\n /**\n * `AthenaSSOProvider`'s session read (`/api/sso/userinfo`) kept failing\n * (5xx, 408, 429, network, timeout) through its bounded retries, or\n * answered another status it does not retry, or a 2xx without a JSON body.\n * The provider shows `displayOnError` with reason `request_failed`.\n */\n auth_sso_failed: 'auth_sso_failed',\n /** The statewire sync URL could not be derived from the configuration. */\n config_invalid: 'config_invalid',\n /** The thread list request failed. */\n threads_list_failed: 'threads_list_failed',\n /** Loading a thread's history failed. */\n thread_load_failed: 'thread_load_failed',\n /**\n * Pinning / unpinning a thread failed. `status` 404 / 405 means the backend\n * predates `POST /api/conversations/threads/favorite` (see\n * `isThreadFavoriteUnavailableError`); the pin then stays read-only.\n */\n thread_favorite_failed: 'thread_favorite_failed',\n /**\n * Renaming a thread failed. `status` 404 / 405 means the backend predates\n * `POST /api/conversations/threads/rename` (see\n * `isThreadRenameUnavailableError`); the list then offers no rename.\n */\n thread_rename_failed: 'thread_rename_failed',\n /**\n * Archiving a thread failed. `status` 404 / 405 means the backend has no\n * archive route (see `isThreadArchiveUnavailableError`); the list then\n * offers no archive action.\n */\n thread_archive_failed: 'thread_archive_failed',\n /** The statewire host rejected a command (structured `{status, detail}`). */\n statewire_rejected: 'statewire_rejected',\n /** The statewire connection is gone and will not reconnect on its own. */\n statewire_gone: 'statewire_gone',\n /** The selected collab agent / channel was refused by the backend. */\n collab_agent_rejected: 'collab_agent_rejected',\n /** A React render error crashed the chat surface (caught by the SDK's error boundary). */\n chat_render_crash: 'chat_render_crash',\n /** A pasted or dropped file could not be uploaded as a composer attachment. */\n attachment_failed: 'attachment_failed',\n /** Mention suggestions for a scope failed after every retry. */\n mentions_fetch_failed: 'mentions_fetch_failed',\n /** A composer write queued before the chat was ready can no longer land (thread switched, identity changed, provider unmounted). */\n composer_write_dropped: 'composer_write_dropped',\n /** The repository code search request (`/api/search/repositories`) failed. */\n repo_search_failed: 'repo_search_failed',\n /**\n * A session workbench read failed: the session's workspace\n * (`/api/conversations/threads/{id}/workspace`) or a computer's status or\n * SSH target.\n */\n session_workspace_failed: 'session_workspace_failed',\n /** Anything else. */\n unknown: 'unknown',\n} as const;\n\nexport type AthenaSdkErrorCode =\n (typeof ATHENA_SDK_ERROR_CODES)[keyof typeof ATHENA_SDK_ERROR_CODES];\n\nexport interface AthenaSdkErrorOptions {\n code: AthenaSdkErrorCode;\n message: string;\n /** One line telling the integrator what to check or change. */\n hint?: string;\n /** HTTP-ish status when the failure came from a server. */\n status?: number;\n /** Structured server detail (e.g. `{ code, message }` from agora). */\n detail?: unknown;\n cause?: unknown;\n /** Extra structured context safe to log (never credentials). */\n context?: Record<string, unknown>;\n}\n\nexport class AthenaSdkError extends Error {\n readonly code: AthenaSdkErrorCode;\n readonly hint: string | undefined;\n readonly status: number | undefined;\n readonly detail: unknown;\n readonly context: Record<string, unknown>;\n\n constructor(options: AthenaSdkErrorOptions) {\n super(options.message, options.cause === undefined ? undefined : { cause: options.cause });\n this.name = 'AthenaSdkError';\n this.code = options.code;\n this.hint = options.hint;\n this.status = options.status;\n this.detail = options.detail;\n this.context = options.context ?? {};\n }\n\n /** A log/console-friendly one-liner: `[code] message — hint`. */\n describe(): string {\n return `[${this.code}] ${this.message}${this.hint ? ` — ${this.hint}` : ''}`;\n }\n\n toJSON(): Record<string, unknown> {\n return {\n name: this.name,\n code: this.code,\n message: this.message,\n hint: this.hint,\n status: this.status,\n detail: this.detail,\n context: this.context,\n };\n }\n}\n\nexport function isAthenaSdkError(value: unknown): value is AthenaSdkError {\n return value instanceof AthenaSdkError;\n}\n\n/** Wrap any thrown value as an `AthenaSdkError` (idempotent for SDK errors). */\nexport function toAthenaSdkError(\n value: unknown,\n fallback: Omit<AthenaSdkErrorOptions, 'cause'>,\n): AthenaSdkError {\n if (isAthenaSdkError(value)) return value;\n const message =\n value instanceof Error && value.message ? value.message : fallback.message;\n return new AthenaSdkError({ ...fallback, message, cause: value });\n}\n\n/** Structured `{ code, message }` detail from an agora rejection, if present. */\nexport function readRejectionDetail(\n detail: unknown,\n): { code: string | null; message: string | null } {\n if (typeof detail === 'string') return { code: null, message: detail || null };\n if (!detail || typeof detail !== 'object') return { code: null, message: null };\n const record = detail as { code?: unknown; message?: unknown };\n return {\n code: typeof record.code === 'string' ? record.code : null,\n message: typeof record.message === 'string' ? record.message : null,\n };\n}\n"],"names":[],"mappings":";;;;;AAOO,MAAM,yBAAyB;AAAA;AAAA,EAEpC,cAAc;AAAA;AAAA,EAEd,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMf,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOrB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOpB,iBAAiB;AAAA;AAAA,EAEjB,gBAAgB;AAAA;AAAA,EAEhB,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxB,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtB,uBAAuB;AAAA;AAAA,EAEvB,oBAAoB;AAAA;AAAA,EAEpB,gBAAgB;AAAA;AAAA,EAEhB,uBAAuB;AAAA;AAAA,EAEvB,mBAAmB;AAAA;AAAA,EAEnB,mBAAmB;AAAA;AAAA,EAEnB,uBAAuB;AAAA;AAAA,EAEvB,wBAAwB;AAAA;AAAA,EAExB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,0BAA0B;AAAA;AAAA,EAE1B,SAAS;AACX;AAmBO,MAAM,uBAAuB,MAAM;AAAA,EAOxC,YAAY,SAAgC;AAC1C,UAAM,QAAQ,SAAS,QAAQ,UAAU,SAAY,SAAY,EAAE,OAAO,QAAQ,MAAA,CAAO;AAPlF;AACA;AACA;AACA;AACA;AAIP,SAAK,OAAO;AACZ,SAAK,OAAO,QAAQ;AACpB,SAAK,OAAO,QAAQ;AACpB,SAAK,SAAS,QAAQ;AACtB,SAAK,SAAS,QAAQ;AACtB,SAAK,UAAU,QAAQ,WAAW,CAAA;AAAA,EACpC;AAAA;AAAA,EAGA,WAAmB;AACjB,WAAO,IAAI,KAAK,IAAI,KAAK,KAAK,OAAO,GAAG,KAAK,OAAO,MAAM,KAAK,IAAI,KAAK,EAAE;AAAA,EAC5E;AAAA,EAEA,SAAkC;AAChC,WAAO;AAAA,MACL,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,MACX,SAAS,KAAK;AAAA,MACd,MAAM,KAAK;AAAA,MACX,QAAQ,KAAK;AAAA,MACb,QAAQ,KAAK;AAAA,MACb,SAAS,KAAK;AAAA,IAAA;AAAA,EAElB;AACF;AAEO,SAAS,iBAAiB,OAAyC;AACxE,SAAO,iBAAiB;AAC1B;AAGO,SAAS,iBACd,OACA,UACgB;AAChB,MAAI,iBAAiB,KAAK,EAAG,QAAO;AACpC,QAAM,UACJ,iBAAiB,SAAS,MAAM,UAAU,MAAM,UAAU,SAAS;AACrE,SAAO,IAAI,eAAe,EAAE,GAAG,UAAU,SAAS,OAAO,OAAO;AAClE;AAGO,SAAS,oBACd,QACiD;AACjD,MAAI,OAAO,WAAW,SAAU,QAAO,EAAE,MAAM,MAAM,SAAS,UAAU,KAAA;AACxE,MAAI,CAAC,UAAU,OAAO,WAAW,iBAAiB,EAAE,MAAM,MAAM,SAAS,KAAA;AACzE,QAAM,SAAS;AACf,SAAO;AAAA,IACL,MAAM,OAAO,OAAO,SAAS,WAAW,OAAO,OAAO;AAAA,IACtD,SAAS,OAAO,OAAO,YAAY,WAAW,OAAO,UAAU;AAAA,EAAA;AAEnE;;;;;;"}
1
+ {"version":3,"file":"errors.cjs","sources":["../../src/diagnostics/errors.ts"],"sourcesContent":["/**\n * Typed SDK errors. Every failure the SDK surfaces to a consumer carries a\n * stable `code` (matchable in code), a human `message`, and a `hint` — the\n * one-line \"what to do about it\" that turns a silent failure into a debuggable\n * one. Backend rejections keep their structured `{ status, detail }` payload.\n */\n\nexport const ATHENA_SDK_ERROR_CODES = {\n /** No token and no API key resolved before a request had to be sent. */\n auth_missing: 'auth_missing',\n /** The server refused the credential (401 / statewire `unauthorized` fin). */\n auth_rejected: 'auth_rejected',\n /**\n * `/_athena/auth` did not answer within the timeout on the last attempt of\n * its bounded retry cycle. The bridge stopped retrying (see\n * `ParentBridgeState.error`).\n */\n auth_bridge_timeout: 'auth_bridge_timeout',\n /**\n * `/_athena/auth` refused the mint (a 4xx other than 404), answered a body\n * it cannot read, or kept failing (5xx, 408, 429, network) through its\n * bounded retry cycle. The bridge stopped retrying and hands out no token\n * (see `ParentBridgeState.error`).\n */\n auth_bridge_failed: 'auth_bridge_failed',\n /**\n * `AthenaSSOProvider`'s session read (`/api/sso/userinfo`) kept failing\n * (5xx, 408, 429, network, timeout) through its bounded retries, or\n * answered another status it does not retry, or a 2xx without a JSON body.\n * The provider shows `displayOnError` with reason `request_failed`.\n */\n auth_sso_failed: 'auth_sso_failed',\n /** The statewire sync URL could not be derived from the configuration. */\n config_invalid: 'config_invalid',\n /** The thread list request failed. */\n threads_list_failed: 'threads_list_failed',\n /** Loading a thread's history failed. */\n thread_load_failed: 'thread_load_failed',\n /**\n * Pinning / unpinning a thread failed. `status` 404 / 405 means the backend\n * predates `POST /api/conversations/threads/favorite` (see\n * `isThreadFavoriteUnavailableError`); the pin then stays read-only.\n */\n thread_favorite_failed: 'thread_favorite_failed',\n /**\n * Renaming a thread failed. `status` 404 / 405 means the backend predates\n * `POST /api/conversations/threads/rename` (see\n * `isThreadRenameUnavailableError`); the list then offers no rename.\n */\n thread_rename_failed: 'thread_rename_failed',\n /**\n * Archiving a thread failed. `status` 404 / 405 means the backend has no\n * archive route (see `isThreadArchiveUnavailableError`); the list then\n * offers no archive action.\n */\n thread_archive_failed: 'thread_archive_failed',\n /** The statewire host rejected a command (structured `{status, detail}`). */\n statewire_rejected: 'statewire_rejected',\n /** The statewire connection is gone and will not reconnect on its own. */\n statewire_gone: 'statewire_gone',\n /** The selected collab agent / channel was refused by the backend. */\n collab_agent_rejected: 'collab_agent_rejected',\n /** A React render error crashed the chat surface (caught by the SDK's error boundary). */\n chat_render_crash: 'chat_render_crash',\n /** A pasted or dropped file could not be uploaded as a composer attachment. */\n attachment_failed: 'attachment_failed',\n /** Mention suggestions for a scope failed after every retry. */\n mentions_fetch_failed: 'mentions_fetch_failed',\n /** A composer write queued before the chat was ready can no longer land (thread switched, identity changed, provider unmounted). */\n composer_write_dropped: 'composer_write_dropped',\n /** The repository code search request (`/api/search/repositories`) failed. */\n repo_search_failed: 'repo_search_failed',\n /**\n * A session workbench read failed: the session's workspace\n * (`/api/conversations/threads/{id}/workspace`) or a computer's status or\n * SSH target.\n */\n session_workspace_failed: 'session_workspace_failed',\n /**\n * A computer's live desktop session\n * (`/api/sandbox/computer/{id}/live-desktop/session`) was refused or failed.\n */\n live_desktop_failed: 'live_desktop_failed',\n /**\n * Reading an asset's stored file (`GET /api/asset/content/{id}`, e.g. a\n * test recording's video) failed for a reason other than a refused\n * credential (those are `auth_rejected`).\n */\n asset_content_failed: 'asset_content_failed',\n /** Anything else. */\n unknown: 'unknown',\n} as const;\n\nexport type AthenaSdkErrorCode =\n (typeof ATHENA_SDK_ERROR_CODES)[keyof typeof ATHENA_SDK_ERROR_CODES];\n\nexport interface AthenaSdkErrorOptions {\n code: AthenaSdkErrorCode;\n message: string;\n /** One line telling the integrator what to check or change. */\n hint?: string;\n /** HTTP-ish status when the failure came from a server. */\n status?: number;\n /** Structured server detail (e.g. `{ code, message }` from agora). */\n detail?: unknown;\n cause?: unknown;\n /** Extra structured context safe to log (never credentials). */\n context?: Record<string, unknown>;\n}\n\nexport class AthenaSdkError extends Error {\n readonly code: AthenaSdkErrorCode;\n readonly hint: string | undefined;\n readonly status: number | undefined;\n readonly detail: unknown;\n readonly context: Record<string, unknown>;\n\n constructor(options: AthenaSdkErrorOptions) {\n super(options.message, options.cause === undefined ? undefined : { cause: options.cause });\n this.name = 'AthenaSdkError';\n this.code = options.code;\n this.hint = options.hint;\n this.status = options.status;\n this.detail = options.detail;\n this.context = options.context ?? {};\n }\n\n /** A log/console-friendly one-liner: `[code] message — hint`. */\n describe(): string {\n return `[${this.code}] ${this.message}${this.hint ? ` — ${this.hint}` : ''}`;\n }\n\n toJSON(): Record<string, unknown> {\n return {\n name: this.name,\n code: this.code,\n message: this.message,\n hint: this.hint,\n status: this.status,\n detail: this.detail,\n context: this.context,\n };\n }\n}\n\nexport function isAthenaSdkError(value: unknown): value is AthenaSdkError {\n return value instanceof AthenaSdkError;\n}\n\n/** Wrap any thrown value as an `AthenaSdkError` (idempotent for SDK errors). */\nexport function toAthenaSdkError(\n value: unknown,\n fallback: Omit<AthenaSdkErrorOptions, 'cause'>,\n): AthenaSdkError {\n if (isAthenaSdkError(value)) return value;\n const message =\n value instanceof Error && value.message ? value.message : fallback.message;\n return new AthenaSdkError({ ...fallback, message, cause: value });\n}\n\n/** Structured `{ code, message }` detail from an agora rejection, if present. */\nexport function readRejectionDetail(\n detail: unknown,\n): { code: string | null; message: string | null } {\n if (typeof detail === 'string') return { code: null, message: detail || null };\n if (!detail || typeof detail !== 'object') return { code: null, message: null };\n const record = detail as { code?: unknown; message?: unknown };\n return {\n code: typeof record.code === 'string' ? record.code : null,\n message: typeof record.message === 'string' ? record.message : null,\n };\n}\n"],"names":[],"mappings":";;;;;AAOO,MAAM,yBAAyB;AAAA;AAAA,EAEpC,cAAc;AAAA;AAAA,EAEd,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMf,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOrB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOpB,iBAAiB;AAAA;AAAA,EAEjB,gBAAgB;AAAA;AAAA,EAEhB,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxB,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtB,uBAAuB;AAAA;AAAA,EAEvB,oBAAoB;AAAA;AAAA,EAEpB,gBAAgB;AAAA;AAAA,EAEhB,uBAAuB;AAAA;AAAA,EAEvB,mBAAmB;AAAA;AAAA,EAEnB,mBAAmB;AAAA;AAAA,EAEnB,uBAAuB;AAAA;AAAA,EAEvB,wBAAwB;AAAA;AAAA,EAExB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,0BAA0B;AAAA;AAAA;AAAA;AAAA;AAAA,EAK1B,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrB,sBAAsB;AAAA;AAAA,EAEtB,SAAS;AACX;AAmBO,MAAM,uBAAuB,MAAM;AAAA,EAOxC,YAAY,SAAgC;AAC1C,UAAM,QAAQ,SAAS,QAAQ,UAAU,SAAY,SAAY,EAAE,OAAO,QAAQ,MAAA,CAAO;AAPlF;AACA;AACA;AACA;AACA;AAIP,SAAK,OAAO;AACZ,SAAK,OAAO,QAAQ;AACpB,SAAK,OAAO,QAAQ;AACpB,SAAK,SAAS,QAAQ;AACtB,SAAK,SAAS,QAAQ;AACtB,SAAK,UAAU,QAAQ,WAAW,CAAA;AAAA,EACpC;AAAA;AAAA,EAGA,WAAmB;AACjB,WAAO,IAAI,KAAK,IAAI,KAAK,KAAK,OAAO,GAAG,KAAK,OAAO,MAAM,KAAK,IAAI,KAAK,EAAE;AAAA,EAC5E;AAAA,EAEA,SAAkC;AAChC,WAAO;AAAA,MACL,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,MACX,SAAS,KAAK;AAAA,MACd,MAAM,KAAK;AAAA,MACX,QAAQ,KAAK;AAAA,MACb,QAAQ,KAAK;AAAA,MACb,SAAS,KAAK;AAAA,IAAA;AAAA,EAElB;AACF;AAEO,SAAS,iBAAiB,OAAyC;AACxE,SAAO,iBAAiB;AAC1B;AAGO,SAAS,iBACd,OACA,UACgB;AAChB,MAAI,iBAAiB,KAAK,EAAG,QAAO;AACpC,QAAM,UACJ,iBAAiB,SAAS,MAAM,UAAU,MAAM,UAAU,SAAS;AACrE,SAAO,IAAI,eAAe,EAAE,GAAG,UAAU,SAAS,OAAO,OAAO;AAClE;AAGO,SAAS,oBACd,QACiD;AACjD,MAAI,OAAO,WAAW,SAAU,QAAO,EAAE,MAAM,MAAM,SAAS,UAAU,KAAA;AACxE,MAAI,CAAC,UAAU,OAAO,WAAW,iBAAiB,EAAE,MAAM,MAAM,SAAS,KAAA;AACzE,QAAM,SAAS;AACf,SAAO;AAAA,IACL,MAAM,OAAO,OAAO,SAAS,WAAW,OAAO,OAAO;AAAA,IACtD,SAAS,OAAO,OAAO,YAAY,WAAW,OAAO,UAAU;AAAA,EAAA;AAEnE;;;;;;"}
@@ -75,6 +75,17 @@ export declare const ATHENA_SDK_ERROR_CODES: {
75
75
  * SSH target.
76
76
  */
77
77
  readonly session_workspace_failed: 'session_workspace_failed';
78
+ /**
79
+ * A computer's live desktop session
80
+ * (`/api/sandbox/computer/{id}/live-desktop/session`) was refused or failed.
81
+ */
82
+ readonly live_desktop_failed: 'live_desktop_failed';
83
+ /**
84
+ * Reading an asset's stored file (`GET /api/asset/content/{id}`, e.g. a
85
+ * test recording's video) failed for a reason other than a refused
86
+ * credential (those are `auth_rejected`).
87
+ */
88
+ readonly asset_content_failed: 'asset_content_failed';
78
89
  /** Anything else. */
79
90
  readonly unknown: 'unknown';
80
91
  };
@@ -72,6 +72,17 @@ const ATHENA_SDK_ERROR_CODES = {
72
72
  * SSH target.
73
73
  */
74
74
  session_workspace_failed: "session_workspace_failed",
75
+ /**
76
+ * A computer's live desktop session
77
+ * (`/api/sandbox/computer/{id}/live-desktop/session`) was refused or failed.
78
+ */
79
+ live_desktop_failed: "live_desktop_failed",
80
+ /**
81
+ * Reading an asset's stored file (`GET /api/asset/content/{id}`, e.g. a
82
+ * test recording's video) failed for a reason other than a refused
83
+ * credential (those are `auth_rejected`).
84
+ */
85
+ asset_content_failed: "asset_content_failed",
75
86
  /** Anything else. */
76
87
  unknown: "unknown"
77
88
  };
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sources":["../../src/diagnostics/errors.ts"],"sourcesContent":["/**\n * Typed SDK errors. Every failure the SDK surfaces to a consumer carries a\n * stable `code` (matchable in code), a human `message`, and a `hint` — the\n * one-line \"what to do about it\" that turns a silent failure into a debuggable\n * one. Backend rejections keep their structured `{ status, detail }` payload.\n */\n\nexport const ATHENA_SDK_ERROR_CODES = {\n /** No token and no API key resolved before a request had to be sent. */\n auth_missing: 'auth_missing',\n /** The server refused the credential (401 / statewire `unauthorized` fin). */\n auth_rejected: 'auth_rejected',\n /**\n * `/_athena/auth` did not answer within the timeout on the last attempt of\n * its bounded retry cycle. The bridge stopped retrying (see\n * `ParentBridgeState.error`).\n */\n auth_bridge_timeout: 'auth_bridge_timeout',\n /**\n * `/_athena/auth` refused the mint (a 4xx other than 404), answered a body\n * it cannot read, or kept failing (5xx, 408, 429, network) through its\n * bounded retry cycle. The bridge stopped retrying and hands out no token\n * (see `ParentBridgeState.error`).\n */\n auth_bridge_failed: 'auth_bridge_failed',\n /**\n * `AthenaSSOProvider`'s session read (`/api/sso/userinfo`) kept failing\n * (5xx, 408, 429, network, timeout) through its bounded retries, or\n * answered another status it does not retry, or a 2xx without a JSON body.\n * The provider shows `displayOnError` with reason `request_failed`.\n */\n auth_sso_failed: 'auth_sso_failed',\n /** The statewire sync URL could not be derived from the configuration. */\n config_invalid: 'config_invalid',\n /** The thread list request failed. */\n threads_list_failed: 'threads_list_failed',\n /** Loading a thread's history failed. */\n thread_load_failed: 'thread_load_failed',\n /**\n * Pinning / unpinning a thread failed. `status` 404 / 405 means the backend\n * predates `POST /api/conversations/threads/favorite` (see\n * `isThreadFavoriteUnavailableError`); the pin then stays read-only.\n */\n thread_favorite_failed: 'thread_favorite_failed',\n /**\n * Renaming a thread failed. `status` 404 / 405 means the backend predates\n * `POST /api/conversations/threads/rename` (see\n * `isThreadRenameUnavailableError`); the list then offers no rename.\n */\n thread_rename_failed: 'thread_rename_failed',\n /**\n * Archiving a thread failed. `status` 404 / 405 means the backend has no\n * archive route (see `isThreadArchiveUnavailableError`); the list then\n * offers no archive action.\n */\n thread_archive_failed: 'thread_archive_failed',\n /** The statewire host rejected a command (structured `{status, detail}`). */\n statewire_rejected: 'statewire_rejected',\n /** The statewire connection is gone and will not reconnect on its own. */\n statewire_gone: 'statewire_gone',\n /** The selected collab agent / channel was refused by the backend. */\n collab_agent_rejected: 'collab_agent_rejected',\n /** A React render error crashed the chat surface (caught by the SDK's error boundary). */\n chat_render_crash: 'chat_render_crash',\n /** A pasted or dropped file could not be uploaded as a composer attachment. */\n attachment_failed: 'attachment_failed',\n /** Mention suggestions for a scope failed after every retry. */\n mentions_fetch_failed: 'mentions_fetch_failed',\n /** A composer write queued before the chat was ready can no longer land (thread switched, identity changed, provider unmounted). */\n composer_write_dropped: 'composer_write_dropped',\n /** The repository code search request (`/api/search/repositories`) failed. */\n repo_search_failed: 'repo_search_failed',\n /**\n * A session workbench read failed: the session's workspace\n * (`/api/conversations/threads/{id}/workspace`) or a computer's status or\n * SSH target.\n */\n session_workspace_failed: 'session_workspace_failed',\n /** Anything else. */\n unknown: 'unknown',\n} as const;\n\nexport type AthenaSdkErrorCode =\n (typeof ATHENA_SDK_ERROR_CODES)[keyof typeof ATHENA_SDK_ERROR_CODES];\n\nexport interface AthenaSdkErrorOptions {\n code: AthenaSdkErrorCode;\n message: string;\n /** One line telling the integrator what to check or change. */\n hint?: string;\n /** HTTP-ish status when the failure came from a server. */\n status?: number;\n /** Structured server detail (e.g. `{ code, message }` from agora). */\n detail?: unknown;\n cause?: unknown;\n /** Extra structured context safe to log (never credentials). */\n context?: Record<string, unknown>;\n}\n\nexport class AthenaSdkError extends Error {\n readonly code: AthenaSdkErrorCode;\n readonly hint: string | undefined;\n readonly status: number | undefined;\n readonly detail: unknown;\n readonly context: Record<string, unknown>;\n\n constructor(options: AthenaSdkErrorOptions) {\n super(options.message, options.cause === undefined ? undefined : { cause: options.cause });\n this.name = 'AthenaSdkError';\n this.code = options.code;\n this.hint = options.hint;\n this.status = options.status;\n this.detail = options.detail;\n this.context = options.context ?? {};\n }\n\n /** A log/console-friendly one-liner: `[code] message — hint`. */\n describe(): string {\n return `[${this.code}] ${this.message}${this.hint ? ` — ${this.hint}` : ''}`;\n }\n\n toJSON(): Record<string, unknown> {\n return {\n name: this.name,\n code: this.code,\n message: this.message,\n hint: this.hint,\n status: this.status,\n detail: this.detail,\n context: this.context,\n };\n }\n}\n\nexport function isAthenaSdkError(value: unknown): value is AthenaSdkError {\n return value instanceof AthenaSdkError;\n}\n\n/** Wrap any thrown value as an `AthenaSdkError` (idempotent for SDK errors). */\nexport function toAthenaSdkError(\n value: unknown,\n fallback: Omit<AthenaSdkErrorOptions, 'cause'>,\n): AthenaSdkError {\n if (isAthenaSdkError(value)) return value;\n const message =\n value instanceof Error && value.message ? value.message : fallback.message;\n return new AthenaSdkError({ ...fallback, message, cause: value });\n}\n\n/** Structured `{ code, message }` detail from an agora rejection, if present. */\nexport function readRejectionDetail(\n detail: unknown,\n): { code: string | null; message: string | null } {\n if (typeof detail === 'string') return { code: null, message: detail || null };\n if (!detail || typeof detail !== 'object') return { code: null, message: null };\n const record = detail as { code?: unknown; message?: unknown };\n return {\n code: typeof record.code === 'string' ? record.code : null,\n message: typeof record.message === 'string' ? record.message : null,\n };\n}\n"],"names":[],"mappings":";;;AAOO,MAAM,yBAAyB;AAAA;AAAA,EAEpC,cAAc;AAAA;AAAA,EAEd,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMf,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOrB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOpB,iBAAiB;AAAA;AAAA,EAEjB,gBAAgB;AAAA;AAAA,EAEhB,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxB,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtB,uBAAuB;AAAA;AAAA,EAEvB,oBAAoB;AAAA;AAAA,EAEpB,gBAAgB;AAAA;AAAA,EAEhB,uBAAuB;AAAA;AAAA,EAEvB,mBAAmB;AAAA;AAAA,EAEnB,mBAAmB;AAAA;AAAA,EAEnB,uBAAuB;AAAA;AAAA,EAEvB,wBAAwB;AAAA;AAAA,EAExB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,0BAA0B;AAAA;AAAA,EAE1B,SAAS;AACX;AAmBO,MAAM,uBAAuB,MAAM;AAAA,EAOxC,YAAY,SAAgC;AAC1C,UAAM,QAAQ,SAAS,QAAQ,UAAU,SAAY,SAAY,EAAE,OAAO,QAAQ,MAAA,CAAO;AAPlF;AACA;AACA;AACA;AACA;AAIP,SAAK,OAAO;AACZ,SAAK,OAAO,QAAQ;AACpB,SAAK,OAAO,QAAQ;AACpB,SAAK,SAAS,QAAQ;AACtB,SAAK,SAAS,QAAQ;AACtB,SAAK,UAAU,QAAQ,WAAW,CAAA;AAAA,EACpC;AAAA;AAAA,EAGA,WAAmB;AACjB,WAAO,IAAI,KAAK,IAAI,KAAK,KAAK,OAAO,GAAG,KAAK,OAAO,MAAM,KAAK,IAAI,KAAK,EAAE;AAAA,EAC5E;AAAA,EAEA,SAAkC;AAChC,WAAO;AAAA,MACL,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,MACX,SAAS,KAAK;AAAA,MACd,MAAM,KAAK;AAAA,MACX,QAAQ,KAAK;AAAA,MACb,QAAQ,KAAK;AAAA,MACb,SAAS,KAAK;AAAA,IAAA;AAAA,EAElB;AACF;AAEO,SAAS,iBAAiB,OAAyC;AACxE,SAAO,iBAAiB;AAC1B;AAGO,SAAS,iBACd,OACA,UACgB;AAChB,MAAI,iBAAiB,KAAK,EAAG,QAAO;AACpC,QAAM,UACJ,iBAAiB,SAAS,MAAM,UAAU,MAAM,UAAU,SAAS;AACrE,SAAO,IAAI,eAAe,EAAE,GAAG,UAAU,SAAS,OAAO,OAAO;AAClE;AAGO,SAAS,oBACd,QACiD;AACjD,MAAI,OAAO,WAAW,SAAU,QAAO,EAAE,MAAM,MAAM,SAAS,UAAU,KAAA;AACxE,MAAI,CAAC,UAAU,OAAO,WAAW,iBAAiB,EAAE,MAAM,MAAM,SAAS,KAAA;AACzE,QAAM,SAAS;AACf,SAAO;AAAA,IACL,MAAM,OAAO,OAAO,SAAS,WAAW,OAAO,OAAO;AAAA,IACtD,SAAS,OAAO,OAAO,YAAY,WAAW,OAAO,UAAU;AAAA,EAAA;AAEnE;"}
1
+ {"version":3,"file":"errors.js","sources":["../../src/diagnostics/errors.ts"],"sourcesContent":["/**\n * Typed SDK errors. Every failure the SDK surfaces to a consumer carries a\n * stable `code` (matchable in code), a human `message`, and a `hint` — the\n * one-line \"what to do about it\" that turns a silent failure into a debuggable\n * one. Backend rejections keep their structured `{ status, detail }` payload.\n */\n\nexport const ATHENA_SDK_ERROR_CODES = {\n /** No token and no API key resolved before a request had to be sent. */\n auth_missing: 'auth_missing',\n /** The server refused the credential (401 / statewire `unauthorized` fin). */\n auth_rejected: 'auth_rejected',\n /**\n * `/_athena/auth` did not answer within the timeout on the last attempt of\n * its bounded retry cycle. The bridge stopped retrying (see\n * `ParentBridgeState.error`).\n */\n auth_bridge_timeout: 'auth_bridge_timeout',\n /**\n * `/_athena/auth` refused the mint (a 4xx other than 404), answered a body\n * it cannot read, or kept failing (5xx, 408, 429, network) through its\n * bounded retry cycle. The bridge stopped retrying and hands out no token\n * (see `ParentBridgeState.error`).\n */\n auth_bridge_failed: 'auth_bridge_failed',\n /**\n * `AthenaSSOProvider`'s session read (`/api/sso/userinfo`) kept failing\n * (5xx, 408, 429, network, timeout) through its bounded retries, or\n * answered another status it does not retry, or a 2xx without a JSON body.\n * The provider shows `displayOnError` with reason `request_failed`.\n */\n auth_sso_failed: 'auth_sso_failed',\n /** The statewire sync URL could not be derived from the configuration. */\n config_invalid: 'config_invalid',\n /** The thread list request failed. */\n threads_list_failed: 'threads_list_failed',\n /** Loading a thread's history failed. */\n thread_load_failed: 'thread_load_failed',\n /**\n * Pinning / unpinning a thread failed. `status` 404 / 405 means the backend\n * predates `POST /api/conversations/threads/favorite` (see\n * `isThreadFavoriteUnavailableError`); the pin then stays read-only.\n */\n thread_favorite_failed: 'thread_favorite_failed',\n /**\n * Renaming a thread failed. `status` 404 / 405 means the backend predates\n * `POST /api/conversations/threads/rename` (see\n * `isThreadRenameUnavailableError`); the list then offers no rename.\n */\n thread_rename_failed: 'thread_rename_failed',\n /**\n * Archiving a thread failed. `status` 404 / 405 means the backend has no\n * archive route (see `isThreadArchiveUnavailableError`); the list then\n * offers no archive action.\n */\n thread_archive_failed: 'thread_archive_failed',\n /** The statewire host rejected a command (structured `{status, detail}`). */\n statewire_rejected: 'statewire_rejected',\n /** The statewire connection is gone and will not reconnect on its own. */\n statewire_gone: 'statewire_gone',\n /** The selected collab agent / channel was refused by the backend. */\n collab_agent_rejected: 'collab_agent_rejected',\n /** A React render error crashed the chat surface (caught by the SDK's error boundary). */\n chat_render_crash: 'chat_render_crash',\n /** A pasted or dropped file could not be uploaded as a composer attachment. */\n attachment_failed: 'attachment_failed',\n /** Mention suggestions for a scope failed after every retry. */\n mentions_fetch_failed: 'mentions_fetch_failed',\n /** A composer write queued before the chat was ready can no longer land (thread switched, identity changed, provider unmounted). */\n composer_write_dropped: 'composer_write_dropped',\n /** The repository code search request (`/api/search/repositories`) failed. */\n repo_search_failed: 'repo_search_failed',\n /**\n * A session workbench read failed: the session's workspace\n * (`/api/conversations/threads/{id}/workspace`) or a computer's status or\n * SSH target.\n */\n session_workspace_failed: 'session_workspace_failed',\n /**\n * A computer's live desktop session\n * (`/api/sandbox/computer/{id}/live-desktop/session`) was refused or failed.\n */\n live_desktop_failed: 'live_desktop_failed',\n /**\n * Reading an asset's stored file (`GET /api/asset/content/{id}`, e.g. a\n * test recording's video) failed for a reason other than a refused\n * credential (those are `auth_rejected`).\n */\n asset_content_failed: 'asset_content_failed',\n /** Anything else. */\n unknown: 'unknown',\n} as const;\n\nexport type AthenaSdkErrorCode =\n (typeof ATHENA_SDK_ERROR_CODES)[keyof typeof ATHENA_SDK_ERROR_CODES];\n\nexport interface AthenaSdkErrorOptions {\n code: AthenaSdkErrorCode;\n message: string;\n /** One line telling the integrator what to check or change. */\n hint?: string;\n /** HTTP-ish status when the failure came from a server. */\n status?: number;\n /** Structured server detail (e.g. `{ code, message }` from agora). */\n detail?: unknown;\n cause?: unknown;\n /** Extra structured context safe to log (never credentials). */\n context?: Record<string, unknown>;\n}\n\nexport class AthenaSdkError extends Error {\n readonly code: AthenaSdkErrorCode;\n readonly hint: string | undefined;\n readonly status: number | undefined;\n readonly detail: unknown;\n readonly context: Record<string, unknown>;\n\n constructor(options: AthenaSdkErrorOptions) {\n super(options.message, options.cause === undefined ? undefined : { cause: options.cause });\n this.name = 'AthenaSdkError';\n this.code = options.code;\n this.hint = options.hint;\n this.status = options.status;\n this.detail = options.detail;\n this.context = options.context ?? {};\n }\n\n /** A log/console-friendly one-liner: `[code] message — hint`. */\n describe(): string {\n return `[${this.code}] ${this.message}${this.hint ? ` — ${this.hint}` : ''}`;\n }\n\n toJSON(): Record<string, unknown> {\n return {\n name: this.name,\n code: this.code,\n message: this.message,\n hint: this.hint,\n status: this.status,\n detail: this.detail,\n context: this.context,\n };\n }\n}\n\nexport function isAthenaSdkError(value: unknown): value is AthenaSdkError {\n return value instanceof AthenaSdkError;\n}\n\n/** Wrap any thrown value as an `AthenaSdkError` (idempotent for SDK errors). */\nexport function toAthenaSdkError(\n value: unknown,\n fallback: Omit<AthenaSdkErrorOptions, 'cause'>,\n): AthenaSdkError {\n if (isAthenaSdkError(value)) return value;\n const message =\n value instanceof Error && value.message ? value.message : fallback.message;\n return new AthenaSdkError({ ...fallback, message, cause: value });\n}\n\n/** Structured `{ code, message }` detail from an agora rejection, if present. */\nexport function readRejectionDetail(\n detail: unknown,\n): { code: string | null; message: string | null } {\n if (typeof detail === 'string') return { code: null, message: detail || null };\n if (!detail || typeof detail !== 'object') return { code: null, message: null };\n const record = detail as { code?: unknown; message?: unknown };\n return {\n code: typeof record.code === 'string' ? record.code : null,\n message: typeof record.message === 'string' ? record.message : null,\n };\n}\n"],"names":[],"mappings":";;;AAOO,MAAM,yBAAyB;AAAA;AAAA,EAEpC,cAAc;AAAA;AAAA,EAEd,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMf,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOrB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOpB,iBAAiB;AAAA;AAAA,EAEjB,gBAAgB;AAAA;AAAA,EAEhB,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxB,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtB,uBAAuB;AAAA;AAAA,EAEvB,oBAAoB;AAAA;AAAA,EAEpB,gBAAgB;AAAA;AAAA,EAEhB,uBAAuB;AAAA;AAAA,EAEvB,mBAAmB;AAAA;AAAA,EAEnB,mBAAmB;AAAA;AAAA,EAEnB,uBAAuB;AAAA;AAAA,EAEvB,wBAAwB;AAAA;AAAA,EAExB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,0BAA0B;AAAA;AAAA;AAAA;AAAA;AAAA,EAK1B,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrB,sBAAsB;AAAA;AAAA,EAEtB,SAAS;AACX;AAmBO,MAAM,uBAAuB,MAAM;AAAA,EAOxC,YAAY,SAAgC;AAC1C,UAAM,QAAQ,SAAS,QAAQ,UAAU,SAAY,SAAY,EAAE,OAAO,QAAQ,MAAA,CAAO;AAPlF;AACA;AACA;AACA;AACA;AAIP,SAAK,OAAO;AACZ,SAAK,OAAO,QAAQ;AACpB,SAAK,OAAO,QAAQ;AACpB,SAAK,SAAS,QAAQ;AACtB,SAAK,SAAS,QAAQ;AACtB,SAAK,UAAU,QAAQ,WAAW,CAAA;AAAA,EACpC;AAAA;AAAA,EAGA,WAAmB;AACjB,WAAO,IAAI,KAAK,IAAI,KAAK,KAAK,OAAO,GAAG,KAAK,OAAO,MAAM,KAAK,IAAI,KAAK,EAAE;AAAA,EAC5E;AAAA,EAEA,SAAkC;AAChC,WAAO;AAAA,MACL,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,MACX,SAAS,KAAK;AAAA,MACd,MAAM,KAAK;AAAA,MACX,QAAQ,KAAK;AAAA,MACb,QAAQ,KAAK;AAAA,MACb,SAAS,KAAK;AAAA,IAAA;AAAA,EAElB;AACF;AAEO,SAAS,iBAAiB,OAAyC;AACxE,SAAO,iBAAiB;AAC1B;AAGO,SAAS,iBACd,OACA,UACgB;AAChB,MAAI,iBAAiB,KAAK,EAAG,QAAO;AACpC,QAAM,UACJ,iBAAiB,SAAS,MAAM,UAAU,MAAM,UAAU,SAAS;AACrE,SAAO,IAAI,eAAe,EAAE,GAAG,UAAU,SAAS,OAAO,OAAO;AAClE;AAGO,SAAS,oBACd,QACiD;AACjD,MAAI,OAAO,WAAW,SAAU,QAAO,EAAE,MAAM,MAAM,SAAS,UAAU,KAAA;AACxE,MAAI,CAAC,UAAU,OAAO,WAAW,iBAAiB,EAAE,MAAM,MAAM,SAAS,KAAA;AACzE,QAAM,SAAS;AACf,SAAO;AAAA,IACL,MAAM,OAAO,OAAO,SAAS,WAAW,OAAO,OAAO;AAAA,IACtD,SAAS,OAAO,OAAO,YAAY,WAAW,OAAO,UAAU;AAAA,EAAA;AAEnE;"}
package/dist/index.cjs CHANGED
@@ -14,6 +14,7 @@ const AthenaChat = require("./chat/AthenaChat.cjs");
14
14
  const AthenaChatErrorBoundary = require("./chat/AthenaChatErrorBoundary.cjs");
15
15
  const activityTimeline = require("./chat/super-grouping/activity-timeline.cjs");
16
16
  const CollapsibleGroup = require("./chat/super-grouping/CollapsibleGroup.cjs");
17
+ const GroupedMessageParts = require("./chat/super-grouping/GroupedMessageParts.cjs");
17
18
  const groupingFunction = require("./chat/super-grouping/grouping-function.cjs");
18
19
  const SuperGroupingCard = require("./chat/super-grouping/SuperGroupingCard.cjs");
19
20
  const SuperGroupingTranscript = require("./chat/super-grouping/SuperGroupingTranscript.cjs");
@@ -50,6 +51,9 @@ const fileToolUis = require("./tools/file-tool-uis.cjs");
50
51
  const toolSummary = require("./tools/tool-summary.cjs");
51
52
  const toolFallback = require("./tools/tool-fallback.cjs");
52
53
  const voiceUpdateToolUi = require("./tools/voice-update-tool-ui.cjs");
54
+ const testRecordingToolUis = require("./tools/test-recording-tool-uis.cjs");
55
+ const testRecordingReport = require("./tools/test-recording-report.cjs");
56
+ const inlineTools = require("./tools/inline-tools.cjs");
53
57
  const voiceDelegationCard = require("./chat-ui/messages/voice-delegation-card.cjs");
54
58
  const NestedPtcMessages = require("./tools/NestedPtcMessages.cjs");
55
59
  const readAssetToolUi = require("./tools/read-asset-tool-ui.cjs");
@@ -57,6 +61,7 @@ const autoOpenTools = require("./tools/auto-open-tools.cjs");
57
61
  const appendDocumentToolUi = require("./tools/append-document-tool-ui.cjs");
58
62
  const assetUtils = require("./tools/asset-utils.cjs");
59
63
  const AthenaAssetEmbed = require("./assets/AthenaAssetEmbed.cjs");
64
+ const useAssetContent = require("./assets/use-asset-content.cjs");
60
65
  const AssetPanel = require("./assets/AssetPanel.cjs");
61
66
  const AthenaLayout = require("./assets/AthenaLayout.cjs");
62
67
  const assetPanelStore = require("./assets/asset-panel-store.cjs");
@@ -66,6 +71,9 @@ const sessionWorkbenchPanes = require("./workbench/session-workbench-panes.cjs")
66
71
  const sessionWorkbenchModel = require("./workbench/session-workbench-model.cjs");
67
72
  const sessionWorkspaceApi = require("./workbench/session-workspace-api.cjs");
68
73
  const useSessionWorkspace = require("./workbench/use-session-workspace.cjs");
74
+ const ComputerLiveDesktop = require("./workbench/ComputerLiveDesktop.cjs");
75
+ const liveDesktopApi = require("./workbench/live-desktop-api.cjs");
76
+ const statewireHistoryContext = require("./provider/statewire-history-context.cjs");
69
77
  const useAssetEmbed = require("./assets/use-asset-embed.cjs");
70
78
  const AthenaContext = require("./provider/AthenaContext.cjs");
71
79
  const ThreadList = require("./threads/ThreadList.cjs");
@@ -174,6 +182,7 @@ exports.CollapsibleGroup = CollapsibleGroup.CollapsibleGroup;
174
182
  exports.DEFAULT_TOOLKIT_THEME = CollapsibleGroup.DEFAULT_TOOLKIT_THEME;
175
183
  exports.SuperGroupingProvider = CollapsibleGroup.SuperGroupingProvider;
176
184
  exports.TOOLKIT_THEMES = CollapsibleGroup.TOOLKIT_THEMES;
185
+ exports.GroupedMessageParts = GroupedMessageParts.GroupedMessageParts;
177
186
  exports.createToolBasedGroupingFunction = groupingFunction.createToolBasedGroupingFunction;
178
187
  exports.SuperGroupingCard = SuperGroupingCard.SuperGroupingCard;
179
188
  exports.SuperGroupingFinalText = SuperGroupingCard.SuperGroupingFinalText;
@@ -269,6 +278,19 @@ exports.ToolFallbackTrigger = toolFallback.ToolFallbackTrigger;
269
278
  exports.clearAutoOpenedAssets = toolFallback.clearAutoOpenedAssets;
270
279
  exports.VoiceUpdateCard = voiceUpdateToolUi.VoiceUpdateCard;
271
280
  exports.VoiceUpdateToolUI = voiceUpdateToolUi.VoiceUpdateToolUI;
281
+ exports.TestRecordingMarkToolUI = testRecordingToolUis.TestRecordingMarkToolUI;
282
+ exports.TestRecordingReportCard = testRecordingToolUis.TestRecordingReportCard;
283
+ exports.TestRecordingStartToolUI = testRecordingToolUis.TestRecordingStartToolUI;
284
+ exports.TestRecordingStopToolUI = testRecordingToolUis.TestRecordingStopToolUI;
285
+ exports.TEST_RECORDING_MARK_TOOL = testRecordingReport.TEST_RECORDING_MARK_TOOL;
286
+ exports.TEST_RECORDING_START_TOOL = testRecordingReport.TEST_RECORDING_START_TOOL;
287
+ exports.TEST_RECORDING_STOP_TOOL = testRecordingReport.TEST_RECORDING_STOP_TOOL;
288
+ exports.describeTestRecordingMark = testRecordingReport.describeTestRecordingMark;
289
+ exports.describeTestRecordingStart = testRecordingReport.describeTestRecordingStart;
290
+ exports.formatRecordingClock = testRecordingReport.formatRecordingClock;
291
+ exports.formatTestRecordingCounts = testRecordingReport.formatTestRecordingCounts;
292
+ exports.parseTestRecordingStopResult = testRecordingReport.parseTestRecordingStopResult;
293
+ exports.isSdkInlineTool = inlineTools.isSdkInlineTool;
272
294
  exports.VoiceDelegationCard = voiceDelegationCard.VoiceDelegationCard;
273
295
  exports.VoiceDelegationMessage = voiceDelegationCard.VoiceDelegationMessage;
274
296
  exports.NestedPtcComponentsProvider = NestedPtcMessages.NestedPtcComponentsProvider;
@@ -280,6 +302,10 @@ exports.AppendDocumentToolUI = appendDocumentToolUi.AppendDocumentToolUI;
280
302
  exports.getAssetInfo = assetUtils.getAssetInfo;
281
303
  exports.tryParseJson = assetUtils.tryParseJson;
282
304
  exports.AthenaAssetEmbed = AthenaAssetEmbed.AthenaAssetEmbed;
305
+ exports.athenaAssetContentPath = useAssetContent.athenaAssetContentPath;
306
+ exports.fetchAthenaAssetContent = useAssetContent.fetchAthenaAssetContent;
307
+ exports.useAthenaAssetContent = useAssetContent.useAthenaAssetContent;
308
+ exports.useObjectUrl = useAssetContent.useObjectUrl;
283
309
  exports.AssetPanel = AssetPanel.AssetPanel;
284
310
  exports.AthenaLayout = AthenaLayout.AthenaLayout;
285
311
  exports.useAssetPanelStore = assetPanelStore.useAssetPanelStore;
@@ -327,6 +353,17 @@ exports.sessionWorkspacePath = sessionWorkspaceApi.sessionWorkspacePath;
327
353
  exports.useAthenaComputerSshAccess = useSessionWorkspace.useAthenaComputerSshAccess;
328
354
  exports.useAthenaComputerStatus = useSessionWorkspace.useAthenaComputerStatus;
329
355
  exports.useAthenaSessionWorkspace = useSessionWorkspace.useAthenaSessionWorkspace;
356
+ exports.ComputerLiveDesktop = ComputerLiveDesktop.ComputerLiveDesktop;
357
+ exports.LIVE_DESKTOP_READY_TIMEOUT_MS = ComputerLiveDesktop.LIVE_DESKTOP_READY_TIMEOUT_MS;
358
+ exports.LIVE_DESKTOP_VIEWER_MESSAGE_SOURCE = liveDesktopApi.LIVE_DESKTOP_VIEWER_MESSAGE_SOURCE;
359
+ exports.LiveDesktopMode = liveDesktopApi.LiveDesktopMode;
360
+ exports.computerLiveDesktopSessionPath = liveDesktopApi.computerLiveDesktopSessionPath;
361
+ exports.createComputerLiveDesktopSession = liveDesktopApi.createComputerLiveDesktopSession;
362
+ exports.finalLiveDesktopCloseNotice = liveDesktopApi.finalLiveDesktopCloseNotice;
363
+ exports.liveDesktopViewerUrl = liveDesktopApi.liveDesktopViewerUrl;
364
+ exports.readLiveDesktopSession = liveDesktopApi.readLiveDesktopSession;
365
+ exports.readLiveDesktopViewerMessage = liveDesktopApi.readLiveDesktopViewerMessage;
366
+ exports.useStatewireHistory = statewireHistoryContext.useStatewireHistory;
330
367
  exports.appendCitationReferenceParams = useAssetEmbed.appendCitationReferenceParams;
331
368
  exports.useAssetEmbed = useAssetEmbed.useAssetEmbed;
332
369
  exports.useAthenaConfig = AthenaContext.useAthenaConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export { AthenaAssistantActionBar, AthenaAssistantMessage, AthenaChat, AthenaRea
20
20
  export type { AthenaAssistantActionBarProps, AthenaAssistantMessageProps, AthenaChatComponents, AthenaChatMessagePartComponents, AthenaChatProps, AthenaReasoningPartProps, AthenaUserMessageProps, } from './chat/AthenaChat';
21
21
  export type { WelcomeSuggestion } from './chat/athena-chat-welcome';
22
22
  export { AthenaChatErrorBoundary } from './chat/AthenaChatErrorBoundary';
23
- export { type ActivityItem, type ActivityPhase, type ActivityTimelineOptions, type ActivityToolState, buildActivityTimeline, CollapsibleGroup, type CollapsibleGroupProps, countActivityTools, createToolBasedGroupingFunction, DEFAULT_TOOLKIT_THEME, defaultGetToolGroupKey, excludeFinalTextFromGroups, excludePartsFromGroups, type FinalTextPart, type FinalTextSegment, formatWorkDuration, getActivityItemLabel, getActivitySummary, getActivityToolState, getFinalText, getFinalTextParts, getReasoningLabel, type GetToolGroupKey, type GroupablePart, type GroupingFunction, type MessagePartGroup, readTurnTiming, resetRememberedExpansionsForTests, resolveActivityPhase, splitTurnSegments, SuperGroupingCard, type SuperGroupingCardProps, SuperGroupingFinalText, SuperGroupingProvider, SuperGroupingTranscript, type SuperGroupingTranscriptProps, TOOLKIT_THEMES, type ToolGroupKeyOptions, type ToolkitTheme, type TurnSegment, type TurnTiming, useActivityExpansion, workedDurationMs, } from './chat/super-grouping';
23
+ export { type ActivityItem, type ActivityPhase, type ActivityTimelineOptions, type ActivityToolState, buildActivityTimeline, CollapsibleGroup, type CollapsibleGroupProps, countActivityTools, createToolBasedGroupingFunction, DEFAULT_TOOLKIT_THEME, defaultGetToolGroupKey, excludeFinalTextFromGroups, excludePartsFromGroups, type FinalTextPart, type FinalTextSegment, formatWorkDuration, getActivityItemLabel, getActivitySummary, getActivityToolState, getFinalText, getFinalTextParts, getReasoningLabel, type GetToolGroupKey, type GroupablePart, GroupedMessageParts, type GroupedMessagePartsProps, type GroupingFunction, type MessagePartGroup, readTurnTiming, resetRememberedExpansionsForTests, resolveActivityPhase, splitTurnSegments, SuperGroupingCard, type SuperGroupingCardProps, SuperGroupingFinalText, SuperGroupingProvider, SuperGroupingTranscript, type SuperGroupingTranscriptProps, TOOLKIT_THEMES, type ToolGroupKeyOptions, type ToolkitTheme, type TurnSegment, type TurnTiming, useActivityExpansion, workedDurationMs, } from './chat/super-grouping';
24
24
  export { StatewireApprovalCard } from './chat/StatewireApprovalCard';
25
25
  export type { StatewireApprovalCardProps, StatewireApprovalEditorContext, StatewireApprovalRequestContext, } from './chat/StatewireApprovalCard';
26
26
  export { useStatewireApprovalRequest } from './chat/use-statewire-approval-request';
@@ -76,6 +76,11 @@ export { ToolFallback, ToolFallbackAppearanceProvider, ToolFallbackRoot, ToolFal
76
76
  export type { ToolAppearance, ToolFallbackContext, ToolFallbackOptions, ToolFallbackProps, ToolFallbackRootProps, ToolFallbackTriggerProps, } from './tools/tool-fallback';
77
77
  export { VoiceUpdateCard, VoiceUpdateToolUI } from './tools/voice-update-tool-ui';
78
78
  export type { VoiceUpdateCardProps } from './tools/voice-update-tool-ui';
79
+ export { TestRecordingMarkToolUI, TestRecordingReportCard, TestRecordingStartToolUI, TestRecordingStopToolUI, } from './tools/test-recording-tool-uis';
80
+ export type { TestRecordingReportCardProps } from './tools/test-recording-tool-uis';
81
+ export { describeTestRecordingMark, describeTestRecordingStart, formatRecordingClock, formatTestRecordingCounts, parseTestRecordingStopResult, TEST_RECORDING_MARK_TOOL, TEST_RECORDING_START_TOOL, TEST_RECORDING_STOP_TOOL, } from './tools/test-recording-report';
82
+ export type { TestRecordingAssertion, TestRecordingMark, TestRecordingMarkKind, TestRecordingOutcome, TestRecordingReport, TestRecordingStart, TestRecordingStopResult, TestRecordingTest, } from './tools/test-recording-report';
83
+ export { isSdkInlineTool } from './tools/inline-tools';
79
84
  export { VoiceDelegationCard, VoiceDelegationMessage, } from './chat-ui/messages/voice-delegation-card';
80
85
  export type { VoiceDelegationCardProps } from './chat-ui/messages/voice-delegation-card';
81
86
  export { NestedPtcComponentsProvider, NestedPtcMessages, useNestedPtcComponents, } from './tools/NestedPtcMessages';
@@ -85,6 +90,8 @@ export { DEFAULT_AUTO_OPEN_TOOLS } from './tools/auto-open-tools';
85
90
  export { AppendDocumentToolUI } from './tools/append-document-tool-ui';
86
91
  export { getAssetInfo, tryParseJson } from './tools/asset-utils';
87
92
  export { AthenaAssetEmbed } from './assets/AthenaAssetEmbed';
93
+ export { athenaAssetContentPath, fetchAthenaAssetContent, useAthenaAssetContent, useObjectUrl, } from './assets/use-asset-content';
94
+ export type { UseAthenaAssetContentOptions } from './assets/use-asset-content';
88
95
  export type { AthenaAssetEmbedProps } from './assets/AthenaAssetEmbed';
89
96
  export type { AthenaAssetCitationAction, AthenaAssetCitationActionEvent, AthenaAssetCitationBehavior, AthenaAssetCitationClickEvent, AthenaAssetCitationReference, } from './assets/asset-embed-messages';
90
97
  export { AssetPanel } from './assets/AssetPanel';
@@ -104,6 +111,12 @@ export { computerSshAccessPath, computerStatusPath, fetchComputerRuntimeStatus,
104
111
  export type { ComputerRuntimeStatus, ComputerSshAccess, SessionWorkspace, SessionWorkspaceAsset, SessionWorkspaceRole, } from './workbench/session-workspace-api';
105
112
  export { useAthenaComputerSshAccess, useAthenaComputerStatus, useAthenaSessionWorkspace, } from './workbench/use-session-workspace';
106
113
  export type { UseAthenaSessionWorkspaceOptions } from './workbench/use-session-workspace';
114
+ export { ComputerLiveDesktop, LIVE_DESKTOP_READY_TIMEOUT_MS, } from './workbench/ComputerLiveDesktop';
115
+ export type { ComputerLiveDesktopProps } from './workbench/ComputerLiveDesktop';
116
+ export { computerLiveDesktopSessionPath, createComputerLiveDesktopSession, finalLiveDesktopCloseNotice, LIVE_DESKTOP_VIEWER_MESSAGE_SOURCE, LiveDesktopMode, liveDesktopViewerUrl, readLiveDesktopSession, readLiveDesktopViewerMessage, } from './workbench/live-desktop-api';
117
+ export type { LiveDesktopSession, LiveDesktopViewerMessage, } from './workbench/live-desktop-api';
118
+ export { useStatewireHistory } from './provider/statewire-history-context';
119
+ export type { StatewireHistoryState } from './provider/statewire-history-context';
107
120
  export { appendCitationReferenceParams, useAssetEmbed } from './assets/use-asset-embed';
108
121
  export type { UseAssetEmbedOptions, UseAssetEmbedResult } from './assets/use-asset-embed';
109
122
  export { useAthenaConfig } from './provider/AthenaContext';
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ import { AthenaAssistantActionBar, AthenaAssistantMessage, AthenaChat, AthenaRea
12
12
  import { AthenaChatErrorBoundary } from "./chat/AthenaChatErrorBoundary.js";
13
13
  import { buildActivityTimeline, countActivityTools, excludeFinalTextFromGroups, excludePartsFromGroups, getActivityItemLabel, getActivitySummary, getActivityToolState, getFinalText, getFinalTextParts, getReasoningLabel, resolveActivityPhase } from "./chat/super-grouping/activity-timeline.js";
14
14
  import { CollapsibleGroup, DEFAULT_TOOLKIT_THEME, SuperGroupingProvider, TOOLKIT_THEMES } from "./chat/super-grouping/CollapsibleGroup.js";
15
+ import { GroupedMessageParts } from "./chat/super-grouping/GroupedMessageParts.js";
15
16
  import { createToolBasedGroupingFunction } from "./chat/super-grouping/grouping-function.js";
16
17
  import { SuperGroupingCard, SuperGroupingFinalText, resetRememberedExpansionsForTests, useActivityExpansion } from "./chat/super-grouping/SuperGroupingCard.js";
17
18
  import { SuperGroupingTranscript } from "./chat/super-grouping/SuperGroupingTranscript.js";
@@ -48,6 +49,9 @@ import { EditFileToolUI, ListFilesToolUI, ReadFileToolUI, SearchFilesToolUI, Wri
48
49
  import { collectAssetTitles, friendlyWorkspacePath, humanizeToolName, summarizeToolCall } from "./tools/tool-summary.js";
49
50
  import { ToolFallback, ToolFallbackAppearanceProvider, ToolFallbackArgs, ToolFallbackContent, ToolFallbackError, ToolFallbackNotice, ToolFallbackResult, ToolFallbackRoot, ToolFallbackTrigger, clearAutoOpenedAssets } from "./tools/tool-fallback.js";
50
51
  import { VoiceUpdateCard, VoiceUpdateToolUI } from "./tools/voice-update-tool-ui.js";
52
+ import { TestRecordingMarkToolUI, TestRecordingReportCard, TestRecordingStartToolUI, TestRecordingStopToolUI } from "./tools/test-recording-tool-uis.js";
53
+ import { TEST_RECORDING_MARK_TOOL, TEST_RECORDING_START_TOOL, TEST_RECORDING_STOP_TOOL, describeTestRecordingMark, describeTestRecordingStart, formatRecordingClock, formatTestRecordingCounts, parseTestRecordingStopResult } from "./tools/test-recording-report.js";
54
+ import { isSdkInlineTool } from "./tools/inline-tools.js";
51
55
  import { VoiceDelegationCard, VoiceDelegationMessage } from "./chat-ui/messages/voice-delegation-card.js";
52
56
  import { NestedPtcComponentsProvider, NestedPtcMessages, useNestedPtcComponents } from "./tools/NestedPtcMessages.js";
53
57
  import { ReadAssetToolUI } from "./tools/read-asset-tool-ui.js";
@@ -55,6 +59,7 @@ import { DEFAULT_AUTO_OPEN_TOOLS } from "./tools/auto-open-tools.js";
55
59
  import { AppendDocumentToolUI } from "./tools/append-document-tool-ui.js";
56
60
  import { getAssetInfo, tryParseJson } from "./tools/asset-utils.js";
57
61
  import { AthenaAssetEmbed } from "./assets/AthenaAssetEmbed.js";
62
+ import { athenaAssetContentPath, fetchAthenaAssetContent, useAthenaAssetContent, useObjectUrl } from "./assets/use-asset-content.js";
58
63
  import { AssetPanel } from "./assets/AssetPanel.js";
59
64
  import { AthenaLayout } from "./assets/AthenaLayout.js";
60
65
  import { useAssetPanelStore } from "./assets/asset-panel-store.js";
@@ -64,6 +69,9 @@ import { DEFAULT_SESSION_WORKBENCH_OPEN_PANE_IDS, DEFAULT_SESSION_WORKBENCH_PANE
64
69
  import { SESSION_SANDBOX_LABEL, SHELL_OUTPUT_PREVIEW_CHARS, assetPanelTypeOf, assetTypeLabel, athenaLinkAppUrl, computerStateBadge, deriveShellRows, deriveTaskSteps, filterShellRows, filterWorkbenchPanes, reviewDecisionLabel, shellMachine, taskProgress, toolResultText, workspaceComputers } from "./workbench/session-workbench-model.js";
65
70
  import { computerSshAccessPath, computerStatusPath, fetchComputerRuntimeStatus, fetchComputerSshAccess, fetchSessionWorkspace, readComputerRuntimeStatus, readComputerSshAccess, readSessionWorkspace, sessionWorkspacePath } from "./workbench/session-workspace-api.js";
66
71
  import { useAthenaComputerSshAccess, useAthenaComputerStatus, useAthenaSessionWorkspace } from "./workbench/use-session-workspace.js";
72
+ import { ComputerLiveDesktop, LIVE_DESKTOP_READY_TIMEOUT_MS } from "./workbench/ComputerLiveDesktop.js";
73
+ import { LIVE_DESKTOP_VIEWER_MESSAGE_SOURCE, LiveDesktopMode, computerLiveDesktopSessionPath, createComputerLiveDesktopSession, finalLiveDesktopCloseNotice, liveDesktopViewerUrl, readLiveDesktopSession, readLiveDesktopViewerMessage } from "./workbench/live-desktop-api.js";
74
+ import { useStatewireHistory } from "./provider/statewire-history-context.js";
67
75
  import { appendCitationReferenceParams, useAssetEmbed } from "./assets/use-asset-embed.js";
68
76
  import { useAthenaConfig } from "./provider/AthenaContext.js";
69
77
  import { ThreadList } from "./threads/ThreadList.js";
@@ -156,6 +164,7 @@ export {
156
164
  CollapsibleTrigger,
157
165
  ComposerDropZone,
158
166
  ComposerQuotePreview,
167
+ ComputerLiveDesktop,
159
168
  CopyToolSpecButton,
160
169
  CreateDocumentToolUI,
161
170
  CreateEmailDraftToolUI,
@@ -180,6 +189,7 @@ export {
180
189
  ExpandableSection,
181
190
  FileUploadButton,
182
191
  GetDatabaseTableSchemaToolUI,
192
+ GroupedMessageParts,
183
193
  HITL_PENDING_RESUME_GRACE_MS,
184
194
  HiddenWriteTodosToolUI,
185
195
  INBOX_PAGE_SIZE,
@@ -188,8 +198,11 @@ export {
188
198
  Inbox,
189
199
  InboxButton,
190
200
  InstallPackageToolUI,
201
+ LIVE_DESKTOP_READY_TIMEOUT_MS,
202
+ LIVE_DESKTOP_VIEWER_MESSAGE_SOURCE,
191
203
  ListDatabaseTablesToolUI,
192
204
  ListFilesToolUI,
205
+ LiveDesktopMode,
193
206
  MODEL_PROVIDER_LABELS,
194
207
  NestedPtcComponentsProvider,
195
208
  NestedPtcMessages,
@@ -240,12 +253,19 @@ export {
240
253
  SuperGroupingFinalText,
241
254
  SuperGroupingProvider,
242
255
  SuperGroupingTranscript,
256
+ TEST_RECORDING_MARK_TOOL,
257
+ TEST_RECORDING_START_TOOL,
258
+ TEST_RECORDING_STOP_TOOL,
243
259
  THREAD_PREFETCH_HOVER_DELAY_MS,
244
260
  THREAD_PREFETCH_MAX_CONCURRENT,
245
261
  THREAD_TITLE_MAX_LENGTH,
246
262
  TOOLKIT_THEMES,
247
263
  TOOL_ICONS,
248
264
  TOOL_UI_REGISTRY,
265
+ TestRecordingMarkToolUI,
266
+ TestRecordingReportCard,
267
+ TestRecordingStartToolUI,
268
+ TestRecordingStopToolUI,
249
269
  ThreadList,
250
270
  ThreadLoadingOverlay,
251
271
  TiptapText,
@@ -286,6 +306,7 @@ export {
286
306
  asHitlApproval,
287
307
  assetPanelTypeOf,
288
308
  assetTypeLabel,
309
+ athenaAssetContentPath,
289
310
  athenaDiagnostics,
290
311
  athenaLinkAppUrl,
291
312
  athenaStatewireErrorNotice,
@@ -304,6 +325,7 @@ export {
304
325
  columnLettersToNumber,
305
326
  columnNumberToLetters,
306
327
  composeDictationDraft,
328
+ computerLiveDesktopSessionPath,
307
329
  computerSshAccessPath,
308
330
  computerStateBadge,
309
331
  computerStatusPath,
@@ -313,6 +335,7 @@ export {
313
335
  createAssetToolUI,
314
336
  createAthenaSpacesUrl,
315
337
  createAttachmentStore,
338
+ createComputerLiveDesktopSession,
316
339
  createQuoteStore,
317
340
  createRecordedDictationEngine,
318
341
  createThread,
@@ -327,18 +350,24 @@ export {
327
350
  deriveShellRows,
328
351
  deriveStatewireSyncUrl,
329
352
  deriveTaskSteps,
353
+ describeTestRecordingMark,
354
+ describeTestRecordingStart,
330
355
  describeToolArgs,
331
356
  dismissThreadFromInbox,
332
357
  excludeFinalTextFromGroups,
333
358
  excludePartsFromGroups,
359
+ fetchAthenaAssetContent,
334
360
  fetchComputerRuntimeStatus,
335
361
  fetchComputerSshAccess,
336
362
  fetchRepoSearch,
337
363
  fetchSessionWorkspace,
338
364
  filterShellRows,
339
365
  filterWorkbenchPanes,
366
+ finalLiveDesktopCloseNotice,
340
367
  formatA1Cell,
341
368
  formatA1Range,
369
+ formatRecordingClock,
370
+ formatTestRecordingCounts,
342
371
  formatToolName,
343
372
  formatWorkDuration,
344
373
  friendlyWorkspacePath,
@@ -367,11 +396,13 @@ export {
367
396
  isCriticalPosthogEvent,
368
397
  isGithubWakeMessage,
369
398
  isPendingInterrupt,
399
+ isSdkInlineTool,
370
400
  isThreadArchiveUnavailableError,
371
401
  isThreadFavoriteUnavailableError,
372
402
  isThreadRenameUnavailableError,
373
403
  isToolResultSuccess,
374
404
  listThreads,
405
+ liveDesktopViewerUrl,
375
406
  matchesSessionsQuery,
376
407
  mintThreadId,
377
408
  normalizeAgentCatalog,
@@ -382,6 +413,7 @@ export {
382
413
  parseA1Range,
383
414
  parseAthenaCitationLink,
384
415
  parseCollabAgentRef,
416
+ parseTestRecordingStopResult,
385
417
  parseTodoPlan,
386
418
  planSessionsQuery,
387
419
  pullRequestChip,
@@ -393,6 +425,8 @@ export {
393
425
  readComputerSshAccess,
394
426
  readGithubWakeEvent,
395
427
  readInterruptMessage,
428
+ readLiveDesktopSession,
429
+ readLiveDesktopViewerMessage,
396
430
  readRejectionDetail,
397
431
  readRunStartRefusal,
398
432
  readSessionWorkspace,
@@ -443,6 +477,7 @@ export {
443
477
  useAssetPanelStore,
444
478
  useAthenaAgentCatalog,
445
479
  useAthenaAgentModelOptions,
480
+ useAthenaAssetContent,
446
481
  useAthenaChatMode,
447
482
  useAthenaCitationLinkHandler,
448
483
  useAthenaComputerSshAccess,
@@ -474,6 +509,7 @@ export {
474
509
  useIsInPopoutDocument,
475
510
  useLatestTodoPlan,
476
511
  useNestedPtcComponents,
512
+ useObjectUrl,
477
513
  useOwnerDocument,
478
514
  useParentAuth,
479
515
  useParentBridge,
@@ -487,6 +523,7 @@ export {
487
523
  useSessionWorkbenchWorkspace,
488
524
  useStatewireApprovalRequest,
489
525
  useStatewireConversationHistory,
526
+ useStatewireHistory,
490
527
  useStatewireToolOutputs,
491
528
  useToolAppearance,
492
529
  withCaptureGateBypass,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -17,6 +17,7 @@ const statewireThreadConfigLane = require("../runtime/statewire-thread-config-la
17
17
  const mintThreadId = require("../threads/mint-thread-id.cjs");
18
18
  const statewireLifecycleContext = require("./statewire-lifecycle-context.cjs");
19
19
  const composerHandoff = require("../composer/composer-handoff.cjs");
20
+ const statewireHistoryContext = require("./statewire-history-context.cjs");
20
21
  const statewireWindowContext = require("./statewire-window-context.cjs");
21
22
  const StatewireClientToolBridge = require("../chat/StatewireClientToolBridge.cjs");
22
23
  const StatewireThreadConfigLaneSync = require("../runtime/StatewireThreadConfigLaneSync.cjs");
@@ -306,7 +307,7 @@ function AthenaStatewireStandalone({
306
307
  // eslint-disable-next-line react-hooks/exhaustive-deps
307
308
  [modeKey, modeScope, modePicks, sessionChannels, published, setModePick, setSessionChannel]
308
309
  );
309
- const scope = published && /* @__PURE__ */ jsxRuntime.jsx(react$1.AuiProvider, { value: published.client, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.jsx(threadIdContext.AthenaStatewireThreadIdContext.Provider, { value: published.threadId, children: /* @__PURE__ */ jsxRuntime.jsx(statewireLifecycleContext.AthenaStatewireLifecycleContext.Provider, { value: published.lifecycle, children: /* @__PURE__ */ jsxRuntime.jsx(threadStatus.DeepAgentConnectionContext.Provider, { value: published.lifecycle.connection, children: /* @__PURE__ */ jsxRuntime.jsx(statewireServerLaneContext.AthenaStatewireServerLaneContext.Provider, { value: published.serverLane, children: /* @__PURE__ */ jsxRuntime.jsx(statewireWindowContext.StatewireToolOutputsContext.Provider, { value: runtimeProps.toolOutputs, children: /* @__PURE__ */ jsxRuntime.jsxs(tooltip.TooltipProvider, { children: [
310
+ const scope = published && /* @__PURE__ */ jsxRuntime.jsx(react$1.AuiProvider, { value: published.client, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaContext.AthenaContext.Provider, { value: athenaConfig, children: /* @__PURE__ */ jsxRuntime.jsx(threadIdContext.AthenaStatewireThreadIdContext.Provider, { value: published.threadId, children: /* @__PURE__ */ jsxRuntime.jsx(statewireLifecycleContext.AthenaStatewireLifecycleContext.Provider, { value: published.lifecycle, children: /* @__PURE__ */ jsxRuntime.jsx(threadStatus.DeepAgentConnectionContext.Provider, { value: published.lifecycle.connection, children: /* @__PURE__ */ jsxRuntime.jsx(statewireServerLaneContext.AthenaStatewireServerLaneContext.Provider, { value: published.serverLane, children: /* @__PURE__ */ jsxRuntime.jsx(statewireWindowContext.StatewireToolOutputsContext.Provider, { value: runtimeProps.toolOutputs, children: /* @__PURE__ */ jsxRuntime.jsx(statewireHistoryContext.StatewireHistoryContext.Provider, { value: runtimeProps.historyStore, children: /* @__PURE__ */ jsxRuntime.jsxs(tooltip.TooltipProvider, { children: [
310
311
  /* @__PURE__ */ jsxRuntime.jsx(StatewireClientToolBridge.StatewireClientToolBridge, { tools: clientTools, threadId: published.threadId }),
311
312
  /* @__PURE__ */ jsxRuntime.jsx(
312
313
  StatewireThreadConfigLaneSync.StatewireThreadConfigLaneSync,
@@ -320,7 +321,7 @@ function AthenaStatewireStandalone({
320
321
  ),
321
322
  /* @__PURE__ */ jsxRuntime.jsx(ComposerHandoffDrain, {}),
322
323
  /* @__PURE__ */ jsxRuntime.jsx(chatModeContext.AthenaChatModeSelectionContext.Provider, { value: chatModeSelection, children })
323
- ] }) }) }) }) }) }) }) });
324
+ ] }) }) }) }) }) }) }) }) });
324
325
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
325
326
  /* @__PURE__ */ jsxRuntime.jsx(
326
327
  AthenaStatewireRuntimeMount,
@@ -527,6 +528,7 @@ function AthenaProvider({
527
528
  const [snapshotCache] = react.useState(() => threadSnapshotCache.createDeepAgentThreadSnapshotCache());
528
529
  const [composerHandoff$1] = react.useState(composerHandoff.createComposerHandoffStore);
529
530
  const [toolOutputs$1] = react.useState(() => toolOutputs.createDeepAgentToolOutputStore());
531
+ const [historyStore] = react.useState(statewireHistoryContext.createStatewireHistoryStore);
530
532
  const principal = ((_a = authContext == null ? void 0 : authContext.user) == null ? void 0 : _a.userId) ?? "";
531
533
  react.useEffect(() => {
532
534
  snapshotCache.clear();
@@ -595,6 +597,7 @@ function AthenaProvider({
595
597
  extraRunConfig: configuredExtraRunConfig,
596
598
  snapshotCache,
597
599
  toolOutputs: toolOutputs$1,
600
+ historyStore,
598
601
  linkClicks,
599
602
  citationLinks
600
603
  };