sliccy 5.73.3 → 5.74.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 (247) hide show
  1. package/README.md +1 -0
  2. package/dist/node-server/_shared/index.d.ts +2 -0
  3. package/dist/node-server/_shared/index.d.ts.map +1 -1
  4. package/dist/node-server/_shared/index.js +2 -0
  5. package/dist/node-server/_shared/index.js.map +1 -1
  6. package/dist/node-server/_shared/secrets-pipeline.d.ts +22 -0
  7. package/dist/node-server/_shared/secrets-pipeline.d.ts.map +1 -1
  8. package/dist/node-server/_shared/secrets-pipeline.js +50 -0
  9. package/dist/node-server/_shared/secrets-pipeline.js.map +1 -1
  10. package/dist/node-server/_shared/transcript-export.d.ts +161 -0
  11. package/dist/node-server/_shared/transcript-export.d.ts.map +1 -0
  12. package/dist/node-server/_shared/transcript-export.js +804 -0
  13. package/dist/node-server/_shared/transcript-export.js.map +1 -0
  14. package/dist/node-server/_shared/transcript-redaction.d.ts +25 -0
  15. package/dist/node-server/_shared/transcript-redaction.d.ts.map +1 -0
  16. package/dist/node-server/_shared/transcript-redaction.js +107 -0
  17. package/dist/node-server/_shared/transcript-redaction.js.map +1 -0
  18. package/dist/node-server/_shared/tray-sync-protocol.d.ts +56 -1
  19. package/dist/node-server/_shared/tray-sync-protocol.d.ts.map +1 -1
  20. package/dist/node-server/_shared/tray-sync-protocol.js +1 -1
  21. package/dist/node-server/_shared/tray-sync-protocol.js.map +1 -1
  22. package/dist/node-server/routes/secrets.js +52 -22
  23. package/dist/ui/assets/account-store-CJqBAm1f.js +43 -0
  24. package/dist/ui/assets/account-store-CxSwSaS8.js +101 -0
  25. package/dist/ui/assets/{adobe-lCsH7Lwq.js → adobe-j3AP8U12.js} +2 -2
  26. package/dist/ui/assets/{adobe-ufabHIuG.js → adobe-lvezht3s.js} +1 -1
  27. package/dist/ui/assets/anthropic-messages-BFic5zKY.js +39 -0
  28. package/dist/ui/assets/anthropic-messages-C8dDJE2X.js +39 -0
  29. package/dist/ui/assets/{apps-Cz0oexXD.js → apps-D8IGKFP6.js} +1 -1
  30. package/dist/ui/assets/{azure-openai-DjIwn0QF.js → azure-openai-BD60xdeq.js} +1 -1
  31. package/dist/ui/assets/{azure-openai-CMEdXGgc.js → azure-openai-DyqeeHYG.js} +1 -1
  32. package/dist/ui/assets/azure-openai-responses-B_twhN44.js +1 -0
  33. package/dist/ui/assets/azure-openai-responses-CzG7X9qb.js +1 -0
  34. package/dist/ui/assets/bedrock-camp-BO4bvAKs.js +1 -0
  35. package/dist/ui/assets/{bedrock-camp-PMQ4Iu6f.js → bedrock-camp-CVignIdH.js} +1 -1
  36. package/dist/ui/assets/{bridge-launch-params-jegYRGJ6.js → bridge-launch-params-QY3l_LbM.js} +1 -1
  37. package/dist/ui/assets/{cdp-7evcrxxP.js → cdp-D9eDDEuA.js} +1 -1
  38. package/dist/ui/assets/{cerebras-VrdMK4Tc.js → cerebras-B0L70LLb.js} +1 -1
  39. package/dist/ui/assets/{cerebras-BvFtCskg.js → cerebras-Di6jTcHx.js} +1 -1
  40. package/dist/ui/assets/{client-BliYDaDA.js → client-BxYB_ioq.js} +1 -1
  41. package/dist/ui/assets/compat-aVSWLlYQ.js +2 -0
  42. package/dist/ui/assets/{composer-speech-BSy_wbJC.js → composer-speech-FeteaFpi.js} +1 -1
  43. package/dist/ui/assets/{connect-surface-ETqeSANr.js → connect-surface-CAwJVqDK.js} +1 -1
  44. package/dist/ui/assets/constrained-sampling-DafcjXU6.js +1 -0
  45. package/dist/ui/assets/{context-compaction-CW5AQ9bv.js → context-compaction-_UkD06XB.js} +1 -1
  46. package/dist/ui/assets/{discovery-preference-CUhsI-AU.js → discovery-preference-C0L_79z7.js} +1 -1
  47. package/dist/ui/assets/{ensure-speech-assets-8cWrra0n.js → ensure-speech-assets-DGq5bX3t.js} +1 -1
  48. package/dist/ui/assets/export-provider-B6K_eHX_.js +1 -0
  49. package/dist/ui/assets/export-spool-DCxGPg43.js +1 -0
  50. package/dist/ui/assets/{follower-navigate-watcher-UN0jo7Ge.js → follower-navigate-watcher-DgusZOpY.js} +1 -1
  51. package/dist/ui/assets/{fs-CgX9Ebib.js → fs-BI3-y-dt.js} +2 -2
  52. package/dist/ui/assets/{fs-C5GhaBCZ.js → fs-DUi6CyVs.js} +1 -1
  53. package/dist/ui/assets/{github-DMFLbpJz.js → github-CsLyOpIY.js} +1 -1
  54. package/dist/ui/assets/{github-B85TuvhV.js → github-DdtaZi7X.js} +2 -2
  55. package/dist/ui/assets/{github-copilot-kOORCU_n.js → github-copilot-B3YCnypU.js} +1 -1
  56. package/dist/ui/assets/{github-copilot-CXnNPGCI.js → github-copilot-CLH7n3QY.js} +1 -1
  57. package/dist/ui/assets/google-generative-ai-4YtIu_sJ.js +1 -0
  58. package/dist/ui/assets/google-generative-ai-DzD1vsXe.js +1 -0
  59. package/dist/ui/assets/google-shared-BAKd3aSn.js +371 -0
  60. package/dist/ui/assets/google-shared-CCLlnqMF.js +11 -0
  61. package/dist/ui/assets/google-vertex-8lUayXF0.js +1 -0
  62. package/dist/ui/assets/google-vertex-oQOD3HKr.js +1 -0
  63. package/dist/ui/assets/{handoff-link-CfgH86mb.js → handoff-link-Dmaaww5x.js} +1 -1
  64. package/dist/ui/assets/{hear-B5lURJtR.js → hear-CRBq5mEX.js} +1 -1
  65. package/dist/ui/assets/{hear-DI5vlKdf.js → hear-v5qXSZw8.js} +1 -1
  66. package/dist/ui/assets/{kernel-worker-HuBcjkoV.js → kernel-worker-BL7ADt6y.js} +727 -599
  67. package/dist/ui/assets/{kokoro-engine-DX7VicqD.js → kokoro-engine-CogHLlSk.js} +1 -1
  68. package/dist/ui/assets/{legacy-api-aliases-CRTuRAqQ.js → legacy-api-aliases-IllWZ-uu.js} +1 -1
  69. package/dist/ui/assets/{legacy-api-aliases-CdGTJw-r.js → legacy-api-aliases-sqlB2uHc.js} +1 -1
  70. package/dist/ui/assets/{lick-manager-Ct3WOtut.js → lick-manager-wU1FKkH8.js} +1 -1
  71. package/dist/ui/assets/{lick-ws-bridge-D5zKuunw.js → lick-ws-bridge-CFKIh9aE.js} +1 -1
  72. package/dist/ui/assets/lick-ws-bridge-yMljNHwr.js +1 -0
  73. package/dist/ui/assets/{local-llm-DuNuGkgI.js → local-llm-BdGGSRtU.js} +2 -2
  74. package/dist/ui/assets/{local-llm-qHC_HYck.js → local-llm-Cys4QAHg.js} +1 -1
  75. package/dist/ui/assets/main-BZzNeGKC.js +22 -0
  76. package/dist/ui/assets/main-cherry-D_hgi0by.js +1 -0
  77. package/dist/ui/assets/mistral-conversations-C57IiFrP.js +8 -0
  78. package/dist/ui/assets/mistral-conversations-CzEm7KNl.js +7 -0
  79. package/dist/ui/assets/{mount-Dh0O4orp.js → mount-Dk-I5R7K.js} +1 -1
  80. package/dist/ui/assets/{mount-CpyDRxP6.js → mount-GBkZgZPI.js} +2 -2
  81. package/dist/ui/assets/{mount-bridge-client-DHGevTQu.js → mount-bridge-client-BWPRzAQ5.js} +1 -1
  82. package/dist/ui/assets/{mount-recovery-D687TLZv.js → mount-recovery-DO04oIYN.js} +1 -1
  83. package/dist/ui/assets/{navigation-watcher-BoJS9hdc.js → navigation-watcher-DkN9hU8i.js} +1 -1
  84. package/dist/ui/assets/new-session-DDu0IRGc.js +2 -0
  85. package/dist/ui/assets/oauth-bootstrap-DfSYlub_.js +2 -0
  86. package/dist/ui/assets/{oauth-service-foejPYvF.js → oauth-service-BuEH8BXq.js} +1 -1
  87. package/dist/ui/assets/{oauth-service-lE9AyywH.js → oauth-service-Dk3L2UWh.js} +1 -1
  88. package/dist/ui/assets/{openai-codex-jK5ybbFx.js → openai-codex-DuyyDpZA.js} +1 -1
  89. package/dist/ui/assets/openai-codex-responses-DRR6raXn.js +7 -0
  90. package/dist/ui/assets/openai-codex-responses-DU5CHdDQ.js +7 -0
  91. package/dist/ui/assets/openai-codex-rpYkFAL8.js +1 -0
  92. package/dist/ui/assets/openai-completions-B9S6450Q.js +5 -0
  93. package/dist/ui/assets/openai-completions-DhKgaAgM.js +5 -0
  94. package/dist/ui/assets/openai-responses-C4_jiYtu.js +1 -0
  95. package/dist/ui/assets/openai-responses-DmKhLxzV.js +1 -0
  96. package/dist/ui/assets/openai-responses-shared-CiIL52L-.js +10 -0
  97. package/dist/ui/assets/openai-responses-shared-IJFiSqdz.js +10 -0
  98. package/dist/ui/assets/{openrouter-C_pGnoz1.js → openrouter-BcPlZu_G.js} +1 -1
  99. package/dist/ui/assets/{openrouter-DVFBhELg.js → openrouter-DHTAGWtd.js} +1 -1
  100. package/dist/ui/assets/openrouter-images-6_MxZkJZ.js +1 -0
  101. package/dist/ui/assets/openrouter-images-BixC5B6a.js +1 -0
  102. package/dist/ui/assets/{openrouter-models-DM9v24kQ.js → openrouter-models-Bu1Cy5AD.js} +1 -1
  103. package/dist/ui/assets/{openrouter-models-B8MWxzTa.js → openrouter-models-CfnkMx5-.js} +1 -1
  104. package/dist/ui/assets/{openrouter-oauth-CukjxICV.js → openrouter-oauth-CTIG_xj5.js} +1 -1
  105. package/dist/ui/assets/{openrouter-oauth-DdKdfU0P.js → openrouter-oauth-iVwMGpbk.js} +1 -1
  106. package/dist/ui/assets/openrouter.models-DS1_VkCm.js +1 -0
  107. package/dist/ui/assets/openrouter.models-HnnH-abS.js +1 -0
  108. package/dist/ui/assets/page-follower-tray-M061L6UY.js +5 -0
  109. package/dist/ui/assets/{panel-rpc-handlers-UyWgyt3z.js → panel-rpc-handlers-CkC-CpDZ.js} +2 -2
  110. package/dist/ui/assets/{port-bridge-client-CoFZLSYm.js → port-bridge-client-DdolH4cw.js} +1 -1
  111. package/dist/ui/assets/{port-bridge-client-BC810skI.js → port-bridge-client-f_6YKEkm.js} +1 -1
  112. package/dist/ui/assets/{provider-B4WqwJf8.js → provider-Db5o_XYj.js} +2 -2
  113. package/dist/ui/assets/{provider-C-y-cI9Y.js → provider-DiWogq8f.js} +1 -1
  114. package/dist/ui/assets/provider-retry-C8PJzY_l.js +1 -0
  115. package/dist/ui/assets/{provider-settings-C5o54NBg.js → provider-settings-CSt8YEx4.js} +1 -1
  116. package/dist/ui/assets/provider-settings-DnRChWz9.js +2 -0
  117. package/dist/ui/assets/provider-store-access-Bo--BwLf.js +1 -0
  118. package/dist/ui/assets/{provider-store-access-B-0tnW1p.js → provider-store-access-DQypuwRG.js} +2 -2
  119. package/dist/ui/assets/{providers-BVNM94x0.js → providers-Bchg39l1.js} +1 -1
  120. package/dist/ui/assets/providers-DpzUvgPJ.js +2 -0
  121. package/dist/ui/assets/{proxied-fetch-D5h5REZy.js → proxied-fetch-CfcFb0B0.js} +1 -1
  122. package/dist/ui/assets/{proxied-fetch-ldIfAeIb.js → proxied-fetch-D8ebvbVd.js} +1 -1
  123. package/dist/ui/assets/quick-llm-CuKruUki.js +1 -0
  124. package/dist/ui/assets/{remote-cdp-transport-DOoXIxy3.js → remote-cdp-transport-Dmg2NdTA.js} +1 -1
  125. package/dist/ui/assets/{runtime-mode-BVHOImD_.js → runtime-mode-B8Tqab3Z.js} +1 -1
  126. package/dist/ui/assets/runtime-mode-BweZnYql.js +1 -0
  127. package/dist/ui/assets/{secret-env-dQA8rL_1.js → secret-env-Cn-GSA1R.js} +1 -1
  128. package/dist/ui/assets/{secret-topology-CptRwAX3.js → secret-topology-Baeul5rD.js} +1 -1
  129. package/dist/ui/assets/{secrets-bridge-client-D6nwnBvr.js → secrets-bridge-client-CLRo0NLf.js} +1 -1
  130. package/dist/ui/assets/session-freezer-DGs88nTW.js +21 -0
  131. package/dist/ui/assets/session-store-DQztDoVa.js +1 -0
  132. package/dist/ui/assets/setup-standalone-prelude-DJUR-Jx-.js +2 -0
  133. package/dist/ui/assets/setup-sudo-Cc-d6eO1.js +2 -0
  134. package/dist/ui/assets/sha256-DmK25X5D.js +1 -0
  135. package/dist/ui/assets/{silent-renew-backoff-DyzFsWYC.js → silent-renew-backoff-Chq7fPuc.js} +1 -1
  136. package/dist/ui/assets/{silent-renew-backoff-Dzkpjjro.js → silent-renew-backoff-CqD4WRin.js} +1 -1
  137. package/dist/ui/assets/{skills-XOQZdId1.js → skills-gGjRrQeq.js} +1 -1
  138. package/dist/ui/assets/{speak-aEIq7SEP.js → speak-DZhfxcQp.js} +1 -1
  139. package/dist/ui/assets/{speak-B4wyr-p6.js → speak-wEvzUJ_4.js} +1 -1
  140. package/dist/ui/assets/{sprinkle-manager-354rS3Fe.js → sprinkle-manager-BYlc7AHg.js} +1 -1
  141. package/dist/ui/assets/src-BcePBv4G.js +1 -0
  142. package/dist/ui/assets/src-C9oNvq2b2.js +2 -0
  143. package/dist/ui/assets/src-DoFhVmQT.js +1 -0
  144. package/dist/ui/assets/{store-BifrdU3S.js → store-ByY8CO32.js} +1 -1
  145. package/dist/ui/assets/{sudo-CdCTvp3_.js → sudo-DsN_KTcg.js} +1 -1
  146. package/dist/ui/assets/{telemetry-C8rZr13D.js → telemetry-Dxrv_mDE.js} +1 -1
  147. package/dist/ui/assets/{transformers-env-DZtq7i0I.js → transformers-env-Cr03eE3X.js} +1 -1
  148. package/dist/ui/assets/{transformers-env-CeJN6XlP.js → transformers-env-DKadceXA.js} +1 -1
  149. package/dist/ui/assets/{tray-leader-DicSB8Dn.js → tray-leader-BDMuV-1a.js} +1 -1
  150. package/dist/ui/assets/{tray-leave-runtime-BI5IM82V.js → tray-leave-runtime-DuZ41JQ-.js} +1 -1
  151. package/dist/ui/assets/{tray-runtime-config-DquE2Rx9.js → tray-runtime-config-9kTxza5l.js} +1 -1
  152. package/dist/ui/assets/{tray-runtime-config-8-BCHO27.js → tray-runtime-config-GgP0BHji.js} +1 -1
  153. package/dist/ui/assets/{tray-sync-protocol-CVdiCvfU.js → tray-sync-protocol-CxWJ329c.js} +1 -1
  154. package/dist/ui/assets/{upgrade-detection-B3uBpES8.js → upgrade-detection-BjD6M6tx.js} +1 -1
  155. package/dist/ui/assets/{voice-reply-6cMxpz9H.js → voice-reply-CkYr1oSF.js} +1 -1
  156. package/dist/ui/assets/{wc-attach-DU0svqb7.js → wc-attach-CYMk5mBA.js} +1 -1
  157. package/dist/ui/assets/wc-extension-WOxllVQv.js +2 -0
  158. package/dist/ui/assets/{wc-float-label-2tniyRvt.js → wc-float-label-yV3hzRXJ.js} +1 -1
  159. package/dist/ui/assets/wc-follower-CqNUhals.js +17 -0
  160. package/dist/ui/assets/wc-live-DN4iNS1F.js +8 -0
  161. package/dist/ui/assets/wc-nav-DdL1jc0a.js +2 -0
  162. package/dist/ui/assets/{wc-onboarding-DMsV9vuN.js → wc-onboarding-Bzxu5Ii4.js} +2 -2
  163. package/dist/ui/assets/{wc-placeholder-CNOsszW8.js → wc-placeholder-5zeCfEVA.js} +2 -2
  164. package/dist/ui/assets/{wc-settings-QlugO7SB.js → wc-settings-CrG7sAlG.js} +3 -3
  165. package/dist/ui/assets/{wc-shell-DZD-3K-u.js → wc-shell-DL44I68b.js} +3 -3
  166. package/dist/ui/assets/{wc-sprinkles-D38PuO87.js → wc-sprinkles-D52GEpi0.js} +2 -2
  167. package/dist/ui/assets/wc-transcript-export-5Pmfejur.js +2 -0
  168. package/dist/ui/assets/wc-tray-jp0YtxQG.js +2 -0
  169. package/dist/ui/assets/{whisper-engine-G1YfvaDM.js → whisper-engine-CHKYCaAu.js} +1 -1
  170. package/dist/ui/assets/{whisper-session-Ds5v74N9.js → whisper-session-W-6_Qa-h.js} +2 -2
  171. package/dist/ui/assets/{xai-grok-BujeRcN4.js → xai-grok-BuiKJ83J.js} +1 -1
  172. package/dist/ui/assets/xai-grok-BxZVhpe_.js +1 -0
  173. package/dist/ui/index.html +20 -18
  174. package/dist/ui/llm-proxy-sw.js +1 -1
  175. package/dist/ui/packages/webapp/index.html +20 -18
  176. package/package.json +1 -1
  177. package/dist/ui/assets/account-store-Dz-pna2J.js +0 -38
  178. package/dist/ui/assets/account-store-yyyfGfoQ.js +0 -94
  179. package/dist/ui/assets/amazon-bedrock-Cg62P8pR.json +0 -1
  180. package/dist/ui/assets/anthropic-4_qTN2Mu.json +0 -1
  181. package/dist/ui/assets/anthropic-messages-6XWFkWWy.js +0 -39
  182. package/dist/ui/assets/anthropic-messages-D42B1WVl.js +0 -39
  183. package/dist/ui/assets/azure-openai-responses-BvEv9lZE.js +0 -1
  184. package/dist/ui/assets/azure-openai-responses-DE9sINqp.json +0 -1
  185. package/dist/ui/assets/azure-openai-responses-DRSA640t.js +0 -1
  186. package/dist/ui/assets/bedrock-camp-D_7EbOFH.js +0 -1
  187. package/dist/ui/assets/cloudflare-ai-gateway-DDb7hKDm.json +0 -1
  188. package/dist/ui/assets/cloudflare-workers-ai-hYVOS3es.json +0 -1
  189. package/dist/ui/assets/compat-Spvv5tCW.js +0 -2
  190. package/dist/ui/assets/fireworks-B7kEGNCU.json +0 -1
  191. package/dist/ui/assets/github-copilot-K9C_HNHm.json +0 -1
  192. package/dist/ui/assets/google-F4XgvJ1y.json +0 -1
  193. package/dist/ui/assets/google-generative-ai-BqEHWDKc.js +0 -1
  194. package/dist/ui/assets/google-generative-ai-DOAY2Bef.js +0 -1
  195. package/dist/ui/assets/google-shared-2WQG4pNx.js +0 -11
  196. package/dist/ui/assets/google-shared-CGD-JGZx.js +0 -371
  197. package/dist/ui/assets/google-vertex-C-dQj0iH.js +0 -1
  198. package/dist/ui/assets/google-vertex-CiTExP0E.js +0 -1
  199. package/dist/ui/assets/huggingface-BjNadu0v.json +0 -1
  200. package/dist/ui/assets/lick-ws-bridge-BX-cBxCM.js +0 -1
  201. package/dist/ui/assets/main-BwSf9XOe.js +0 -22
  202. package/dist/ui/assets/main-cherry-9qp2ecC4.js +0 -1
  203. package/dist/ui/assets/mistral-CLEcIOtP.json +0 -1
  204. package/dist/ui/assets/mistral-conversations-BIHTMTfL.js +0 -7
  205. package/dist/ui/assets/mistral-conversations-CFKNSaPt.js +0 -8
  206. package/dist/ui/assets/moonshotai-8QShYhhE.json +0 -1
  207. package/dist/ui/assets/moonshotai-cn-7hHZff5z.json +0 -1
  208. package/dist/ui/assets/new-session-EfIhjpHZ.js +0 -2
  209. package/dist/ui/assets/nvidia-dA6GzUPm.json +0 -1
  210. package/dist/ui/assets/oauth-bootstrap-DFYztLmR.js +0 -2
  211. package/dist/ui/assets/openai-BehvdaXx.json +0 -1
  212. package/dist/ui/assets/openai-codex-XS4icMCX.js +0 -1
  213. package/dist/ui/assets/openai-codex-responses-B7cFMjWk.js +0 -7
  214. package/dist/ui/assets/openai-codex-responses-DqxoDEwc.js +0 -7
  215. package/dist/ui/assets/openai-completions-Z1aRkqWe.js +0 -5
  216. package/dist/ui/assets/openai-completions-o78dOizF.js +0 -5
  217. package/dist/ui/assets/openai-responses-SPfzkTJm.js +0 -1
  218. package/dist/ui/assets/openai-responses-shared-BHsJFKuB.js +0 -10
  219. package/dist/ui/assets/openai-responses-shared-Dg5Ojqlw.js +0 -10
  220. package/dist/ui/assets/openai-responses-xSdsW9lw.js +0 -1
  221. package/dist/ui/assets/opencode-4chvZrBR.json +0 -1
  222. package/dist/ui/assets/opencode-go-Chp1OOUx.json +0 -1
  223. package/dist/ui/assets/openrouter-ZLTwKIjA.json +0 -1
  224. package/dist/ui/assets/openrouter-images-BrQDTa3_.js +0 -1
  225. package/dist/ui/assets/openrouter-images-DtvjLeGK.js +0 -1
  226. package/dist/ui/assets/openrouter.models-Bi9GV7Zn.js +0 -1
  227. package/dist/ui/assets/openrouter.models-D41M1z_D.js +0 -1
  228. package/dist/ui/assets/page-follower-tray-Cm9cuA-m.js +0 -5
  229. package/dist/ui/assets/provider-settings-Bf4riFFt.js +0 -2
  230. package/dist/ui/assets/provider-store-access-DQ3Xz22u.js +0 -1
  231. package/dist/ui/assets/providers-BZHUuJkX.js +0 -2
  232. package/dist/ui/assets/quick-llm-CTddYx3-.js +0 -1
  233. package/dist/ui/assets/qwen-token-plan-BpxmzamU.json +0 -1
  234. package/dist/ui/assets/qwen-token-plan-cn-CPhDR0u_.json +0 -1
  235. package/dist/ui/assets/session-freezer-CVXiE5lj.js +0 -21
  236. package/dist/ui/assets/session-store-DAM8GRJ0.js +0 -1
  237. package/dist/ui/assets/setup-sudo-C8hl5UHa.js +0 -2
  238. package/dist/ui/assets/src-CS5gSDhT.js +0 -1
  239. package/dist/ui/assets/src-Dk1QVJRd.js +0 -1
  240. package/dist/ui/assets/together-CYZ-lBBF.json +0 -1
  241. package/dist/ui/assets/vercel-ai-gateway-ZtkcQH_C.json +0 -1
  242. package/dist/ui/assets/wc-extension-Dnbc6pqX.js +0 -2
  243. package/dist/ui/assets/wc-follower-DgOR4hQ4.js +0 -17
  244. package/dist/ui/assets/wc-live-DZ6Z4ggE.js +0 -8
  245. package/dist/ui/assets/wc-nav-CpXNlZRT.js +0 -2
  246. package/dist/ui/assets/wc-tray-MAH8ntv2.js +0 -2
  247. package/dist/ui/assets/xai-grok-CgCHECRn.js +0 -1
@@ -0,0 +1,804 @@
1
+ /**
2
+ * Public SLICC transcript export contract.
3
+ *
4
+ * Renderer-neutral, platform-agnostic types for the v1 transcript bundle.
5
+ * Consumed by every task that reads, writes, or validates a SLICC transcript.
6
+ */
7
+ // ---------------------------------------------------------------------------
8
+ // Constants
9
+ // ---------------------------------------------------------------------------
10
+ export const TRANSCRIPT_SCHEMA_VERSION = 1;
11
+ export const SLICC_TRANSCRIPT_FORMAT = 'slicc-transcript';
12
+ /** Canonical runtime list of all valid completeness reasons. */
13
+ export const VALID_COMPLETENESS_REASONS = [
14
+ 'canonical-agent-history-unavailable',
15
+ 'tool-data-may-be-truncated',
16
+ 'model-metadata-unavailable',
17
+ 'scoop-history-unavailable',
18
+ 'attachment-file-missing',
19
+ 'attachment-association-unavailable',
20
+ 'complete-snapshot-unavailable',
21
+ ];
22
+ /** Canonical set of all valid wire error codes — use for runtime validation. */
23
+ export const VALID_EXPORT_ERROR_CODES = new Set([
24
+ 'permission-denied',
25
+ 'redaction-unavailable',
26
+ 'session-not-found',
27
+ 'transfer-aborted',
28
+ 'transfer-corrupt',
29
+ 'schema-invalid',
30
+ 'attachment-unreadable',
31
+ ]);
32
+ // ---------------------------------------------------------------------------
33
+ // Error class
34
+ // ---------------------------------------------------------------------------
35
+ export class TranscriptExportError extends Error {
36
+ code;
37
+ constructor(code) {
38
+ super(code);
39
+ this.code = code;
40
+ this.name = 'TranscriptExportError';
41
+ }
42
+ }
43
+ // ---------------------------------------------------------------------------
44
+ // Private — scalar / regex constants
45
+ // ---------------------------------------------------------------------------
46
+ const VALID_COMPLETENESS_REASONS_SET = new Set(VALID_COMPLETENESS_REASONS);
47
+ const SHA256_HEX_RE = /^[0-9a-fA-F]{64}$/;
48
+ const ISO_DATETIME_RE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/;
49
+ // ---------------------------------------------------------------------------
50
+ // Validator primitives — never throw for untrusted input
51
+ // ---------------------------------------------------------------------------
52
+ function isObj(v) {
53
+ return typeof v === 'object' && v !== null && !Array.isArray(v);
54
+ }
55
+ function isSha256Hex(v) {
56
+ return typeof v === 'string' && SHA256_HEX_RE.test(v);
57
+ }
58
+ function isIsoDateTime(v) {
59
+ return ISO_DATETIME_RE.test(v) && Number.isFinite(Date.parse(v));
60
+ }
61
+ /** Build a human-readable "must be" enum error string. */
62
+ function enumError(label, allowed) {
63
+ const quoted = allowed.map((v) => `"${v}"`);
64
+ const last = quoted[quoted.length - 1];
65
+ if (quoted.length === 2)
66
+ return `${label} must be ${quoted[0]} or ${last}`;
67
+ return `${label} must be ${quoted.slice(0, -1).join(', ')}, or ${last}`;
68
+ }
69
+ /** Verify `value` is one of the allowed string literals. */
70
+ function validateEnum(value, allowed, label) {
71
+ if (typeof value !== 'string' || !allowed.includes(value)) {
72
+ return { ok: false, error: enumError(label, allowed) };
73
+ }
74
+ return { ok: true };
75
+ }
76
+ /** Validate every item in a pre-confirmed array. */
77
+ function validateArray(items, validator, basePath) {
78
+ for (let i = 0; i < items.length; i++) {
79
+ const result = validator(items[i], `${basePath}[${i}]`);
80
+ if (!result.ok)
81
+ return result;
82
+ }
83
+ return { ok: true };
84
+ }
85
+ // ---------------------------------------------------------------------------
86
+ // Content-block validators
87
+ // ---------------------------------------------------------------------------
88
+ function validateContentBlockFields(block, path) {
89
+ const type = block['type'];
90
+ if (type === 'text') {
91
+ if (typeof block['text'] !== 'string') {
92
+ return { ok: false, error: `${path}.text must be a string` };
93
+ }
94
+ }
95
+ else if (type === 'tool-call') {
96
+ if (typeof block['id'] !== 'string' || block['id'] === '') {
97
+ return { ok: false, error: `${path}.id must be a non-empty string` };
98
+ }
99
+ if (typeof block['name'] !== 'string' || block['name'] === '') {
100
+ return { ok: false, error: `${path}.name must be a non-empty string` };
101
+ }
102
+ if (!('input' in block)) {
103
+ return { ok: false, error: `${path}.input must be present` };
104
+ }
105
+ }
106
+ else {
107
+ // attachment-ref
108
+ if (typeof block['attachmentId'] !== 'string' || block['attachmentId'] === '') {
109
+ return { ok: false, error: `${path}.attachmentId must be a non-empty string` };
110
+ }
111
+ }
112
+ return { ok: true };
113
+ }
114
+ function validateContentBlock(block, path) {
115
+ if (!isObj(block))
116
+ return { ok: false, error: `${path} must be a non-null object` };
117
+ const typeResult = validateEnum(block['type'], ['text', 'tool-call', 'attachment-ref'], `${path}.type`);
118
+ if (!typeResult.ok)
119
+ return typeResult;
120
+ return validateContentBlockFields(block, path);
121
+ }
122
+ // ---------------------------------------------------------------------------
123
+ // Message validators — usage helpers, role-specific checks, structural gate
124
+ // ---------------------------------------------------------------------------
125
+ function validateTokenFields(usage, path) {
126
+ const fields = ['input', 'output', 'cacheRead', 'cacheWrite', 'totalTokens'];
127
+ for (const field of fields) {
128
+ const v = usage[field];
129
+ if (typeof v !== 'number') {
130
+ return { ok: false, error: `${path}.${field} must be a number` };
131
+ }
132
+ if (!Number.isInteger(v) || v < 0) {
133
+ return { ok: false, error: `${path}.${field} must be a non-negative integer` };
134
+ }
135
+ }
136
+ return { ok: true };
137
+ }
138
+ function validateCostFields(cost, path) {
139
+ const fields = ['input', 'output', 'cacheRead', 'cacheWrite', 'total'];
140
+ for (const field of fields) {
141
+ const v = cost[field];
142
+ if (typeof v !== 'number') {
143
+ return { ok: false, error: `${path}.${field} must be a number` };
144
+ }
145
+ if (!Number.isFinite(v) || v < 0) {
146
+ return { ok: false, error: `${path}.${field} must be a finite non-negative number` };
147
+ }
148
+ }
149
+ return { ok: true };
150
+ }
151
+ function validateUsage(usage, path) {
152
+ const tokenResult = validateTokenFields(usage, path);
153
+ if (!tokenResult.ok)
154
+ return tokenResult;
155
+ const cost = usage['cost'];
156
+ if (!isObj(cost)) {
157
+ return { ok: false, error: `${path}.cost must be a non-null object` };
158
+ }
159
+ return validateCostFields(cost, `${path}.cost`);
160
+ }
161
+ function validateMessageScalars(msg, path) {
162
+ if (typeof msg['id'] !== 'string')
163
+ return { ok: false, error: `${path}.id must be a string` };
164
+ if (typeof msg['sequence'] !== 'number') {
165
+ return { ok: false, error: `${path}.sequence must be a number` };
166
+ }
167
+ const seq = msg['sequence'];
168
+ if (!Number.isInteger(seq) || seq < 1) {
169
+ return { ok: false, error: `${path}.sequence must be a positive integer` };
170
+ }
171
+ if (typeof msg['timestamp'] !== 'string') {
172
+ return { ok: false, error: `${path}.timestamp must be a string` };
173
+ }
174
+ if (!isIsoDateTime(msg['timestamp'])) {
175
+ return { ok: false, error: `${path}.timestamp must be a valid ISO 8601 date-time string` };
176
+ }
177
+ return { ok: true };
178
+ }
179
+ function validateToolResultMessage(msg, path) {
180
+ const tcId = msg['toolCallId'];
181
+ if (typeof tcId !== 'string' || tcId === '') {
182
+ return {
183
+ ok: false,
184
+ error: `${path}.toolCallId must be a non-empty string for tool-result messages`,
185
+ };
186
+ }
187
+ return { ok: true };
188
+ }
189
+ function validateMessageOptionalUsage(msg, path) {
190
+ const usage = msg['usage'];
191
+ if (usage === undefined)
192
+ return { ok: true };
193
+ if (!isObj(usage))
194
+ return { ok: false, error: `${path}.usage must be a non-null object` };
195
+ return validateUsage(usage, `${path}.usage`);
196
+ }
197
+ function validateMessage(msg, path) {
198
+ if (!isObj(msg))
199
+ return { ok: false, error: `${path} must be a non-null object` };
200
+ const roleResult = validateEnum(msg['role'], ['user', 'assistant', 'tool-result'], `${path}.role`);
201
+ if (!roleResult.ok)
202
+ return roleResult;
203
+ if (msg['role'] === 'tool-result') {
204
+ const tcResult = validateToolResultMessage(msg, path);
205
+ if (!tcResult.ok)
206
+ return tcResult;
207
+ }
208
+ const scalarsResult = validateMessageScalars(msg, path);
209
+ if (!scalarsResult.ok)
210
+ return scalarsResult;
211
+ const content = msg['content'];
212
+ if (!Array.isArray(content))
213
+ return { ok: false, error: `${path}.content must be an array` };
214
+ const contentResult = validateArray(content, validateContentBlock, `${path}.content`);
215
+ if (!contentResult.ok)
216
+ return contentResult;
217
+ return validateMessageOptionalUsage(msg, path);
218
+ }
219
+ function validateConversation(conv, path) {
220
+ if (!isObj(conv))
221
+ return { ok: false, error: `${path} must be a non-null object` };
222
+ if (typeof conv['id'] !== 'string')
223
+ return { ok: false, error: `${path}.id must be a string` };
224
+ if (typeof conv['name'] !== 'string') {
225
+ return { ok: false, error: `${path}.name must be a string` };
226
+ }
227
+ const kindResult = validateEnum(conv['kind'], ['cone', 'scoop'], `${path}.kind`);
228
+ if (!kindResult.ok)
229
+ return kindResult;
230
+ const messages = conv['messages'];
231
+ if (!Array.isArray(messages)) {
232
+ return { ok: false, error: `${path}.messages must be an array` };
233
+ }
234
+ return validateArray(messages, validateMessage, `${path}.messages`);
235
+ }
236
+ // ---------------------------------------------------------------------------
237
+ // Attachment validators
238
+ // ---------------------------------------------------------------------------
239
+ function validateAttachmentStringFields(att, path) {
240
+ for (const field of [
241
+ 'id',
242
+ 'path',
243
+ 'originalName',
244
+ 'mimeType',
245
+ 'sha256',
246
+ 'sourceConversationId',
247
+ 'sourceMessageId',
248
+ ]) {
249
+ if (typeof att[field] !== 'string') {
250
+ return { ok: false, error: `${path}.${field} must be a string` };
251
+ }
252
+ }
253
+ return { ok: true };
254
+ }
255
+ function validatePresentAttachment(att, path) {
256
+ const attPath = att['path'];
257
+ const sha256 = att['sha256'];
258
+ const byteLength = att['byteLength'];
259
+ if (attPath === '')
260
+ return { ok: false, error: `${path}.path must be non-empty when present` };
261
+ if (!isSha256Hex(sha256)) {
262
+ return { ok: false, error: `${path}.sha256 must be a 64-char hex string when present` };
263
+ }
264
+ if (!Number.isInteger(byteLength) || byteLength < 0) {
265
+ return { ok: false, error: `${path}.byteLength must be a non-negative integer when present` };
266
+ }
267
+ if (att['missingReason'] !== undefined) {
268
+ return { ok: false, error: `${path}.missingReason must be absent when present is true` };
269
+ }
270
+ return { ok: true };
271
+ }
272
+ const VALID_MISSING_REASONS = [
273
+ 'attachment-file-missing',
274
+ 'attachment-association-unavailable',
275
+ ];
276
+ function validateAbsentAttachment(att, path) {
277
+ const attPath = att['path'];
278
+ const sha256 = att['sha256'];
279
+ const byteLength = att['byteLength'];
280
+ if (attPath !== '')
281
+ return { ok: false, error: `${path}.path must be empty when not present` };
282
+ if (sha256 !== '')
283
+ return { ok: false, error: `${path}.sha256 must be empty when not present` };
284
+ if (byteLength !== 0) {
285
+ return { ok: false, error: `${path}.byteLength must be zero when not present` };
286
+ }
287
+ return validateEnum(att['missingReason'], VALID_MISSING_REASONS, `${path}.missingReason`);
288
+ }
289
+ function validateAttachmentStateInvariants(att, path) {
290
+ return att['present']
291
+ ? validatePresentAttachment(att, path)
292
+ : validateAbsentAttachment(att, path);
293
+ }
294
+ function validateAttachment(att, path) {
295
+ if (!isObj(att))
296
+ return { ok: false, error: `${path} must be a non-null object` };
297
+ const strResult = validateAttachmentStringFields(att, path);
298
+ if (!strResult.ok)
299
+ return strResult;
300
+ if (typeof att['byteLength'] !== 'number') {
301
+ return { ok: false, error: `${path}.byteLength must be a number` };
302
+ }
303
+ if (typeof att['present'] !== 'boolean') {
304
+ return { ok: false, error: `${path}.present must be a boolean` };
305
+ }
306
+ const handlingResult = validateEnum(att['handling'], ['text-redacted', 'binary-unchanged'], `${path}.handling`);
307
+ if (!handlingResult.ok)
308
+ return handlingResult;
309
+ return validateAttachmentStateInvariants(att, path);
310
+ }
311
+ // ---------------------------------------------------------------------------
312
+ // Redaction validators
313
+ // ---------------------------------------------------------------------------
314
+ function validateRedactionTarget(target, path) {
315
+ const kindResult = validateEnum(target['kind'], ['json', 'attachment'], `${path}.kind`);
316
+ if (!kindResult.ok)
317
+ return kindResult;
318
+ if (target['kind'] === 'json') {
319
+ if (typeof target['pointer'] !== 'string') {
320
+ return { ok: false, error: `${path}.pointer must be a string` };
321
+ }
322
+ const ptr = target['pointer'];
323
+ if (ptr !== '' && !ptr.startsWith('/')) {
324
+ return { ok: false, error: `${path}.pointer must be a valid RFC 6901 JSON pointer` };
325
+ }
326
+ }
327
+ else {
328
+ // attachment kind
329
+ if (typeof target['attachmentId'] !== 'string' || target['attachmentId'] === '') {
330
+ return { ok: false, error: `${path}.attachmentId must be a non-empty string` };
331
+ }
332
+ }
333
+ return { ok: true };
334
+ }
335
+ function validateRedaction(red, path) {
336
+ if (!isObj(red))
337
+ return { ok: false, error: `${path} must be a non-null object` };
338
+ if (typeof red['id'] !== 'string')
339
+ return { ok: false, error: `${path}.id must be a string` };
340
+ if (typeof red['category'] !== 'string') {
341
+ return { ok: false, error: `${path}.category must be a string` };
342
+ }
343
+ const detectorResult = validateEnum(red['detector'], ['known-secret', 'credential-pattern', 'pre-obfuscated'], `${path}.detector`);
344
+ if (!detectorResult.ok)
345
+ return detectorResult;
346
+ const target = red['target'];
347
+ if (!isObj(target))
348
+ return { ok: false, error: `${path}.target must be a non-null object` };
349
+ return validateRedactionTarget(target, `${path}.target`);
350
+ }
351
+ // ---------------------------------------------------------------------------
352
+ // Delegation validator
353
+ // ---------------------------------------------------------------------------
354
+ function validateDelegation(del, path) {
355
+ if (!isObj(del))
356
+ return { ok: false, error: `${path} must be a non-null object` };
357
+ if (typeof del['sourceConversationId'] !== 'string') {
358
+ return { ok: false, error: `${path}.sourceConversationId must be a string` };
359
+ }
360
+ if (typeof del['targetConversationId'] !== 'string') {
361
+ return { ok: false, error: `${path}.targetConversationId must be a string` };
362
+ }
363
+ return { ok: true };
364
+ }
365
+ // ---------------------------------------------------------------------------
366
+ // Completeness reason validator
367
+ // ---------------------------------------------------------------------------
368
+ function validateCompletenessReason(item, path) {
369
+ if (typeof item !== 'string' || !VALID_COMPLETENESS_REASONS_SET.has(item)) {
370
+ return { ok: false, error: `${path} is not a valid completeness reason` };
371
+ }
372
+ return { ok: true };
373
+ }
374
+ // ---------------------------------------------------------------------------
375
+ // Top-level section validators
376
+ // ---------------------------------------------------------------------------
377
+ function validateExport(exp) {
378
+ if (!isObj(exp))
379
+ return { ok: false, error: 'export must be a non-null object' };
380
+ if (typeof exp['id'] !== 'string')
381
+ return { ok: false, error: 'export.id must be a string' };
382
+ if (typeof exp['generatedAt'] !== 'string') {
383
+ return { ok: false, error: 'export.generatedAt must be a string' };
384
+ }
385
+ if (exp['format'] !== SLICC_TRANSCRIPT_FORMAT) {
386
+ return { ok: false, error: 'export.format must equal "slicc-transcript"' };
387
+ }
388
+ const producer = exp['producer'];
389
+ if (!isObj(producer)) {
390
+ return { ok: false, error: 'export.producer must be a non-null object' };
391
+ }
392
+ if (producer['application'] !== 'slicc') {
393
+ return { ok: false, error: 'export.producer.application must equal "slicc"' };
394
+ }
395
+ if (typeof producer['version'] !== 'string') {
396
+ return { ok: false, error: 'export.producer.version must be a string' };
397
+ }
398
+ return { ok: true };
399
+ }
400
+ function validateCompleteness(completeness) {
401
+ if (!isObj(completeness)) {
402
+ return { ok: false, error: 'session.completeness must be a non-null object' };
403
+ }
404
+ const statusResult = validateEnum(completeness['status'], ['complete', 'partial'], 'session.completeness.status');
405
+ if (!statusResult.ok)
406
+ return statusResult;
407
+ if (!Array.isArray(completeness['missing'])) {
408
+ return { ok: false, error: 'session.completeness.missing must be an array' };
409
+ }
410
+ return validateArray(completeness['missing'], validateCompletenessReason, 'session.completeness.missing');
411
+ }
412
+ function validateSession(session) {
413
+ if (!isObj(session))
414
+ return { ok: false, error: 'session must be a non-null object' };
415
+ if (typeof session['id'] !== 'string') {
416
+ return { ok: false, error: 'session.id must be a string' };
417
+ }
418
+ if (typeof session['title'] !== 'string') {
419
+ return { ok: false, error: 'session.title must be a string' };
420
+ }
421
+ const stateResult = validateEnum(session['state'], ['active', 'frozen'], 'session.state');
422
+ if (!stateResult.ok)
423
+ return stateResult;
424
+ return validateCompleteness(session['completeness']);
425
+ }
426
+ function validatePrivacy(privacy) {
427
+ if (!isObj(privacy))
428
+ return { ok: false, error: 'privacy must be a non-null object' };
429
+ if (privacy['reasoningExcluded'] !== true) {
430
+ return { ok: false, error: 'privacy.reasoningExcluded must be true' };
431
+ }
432
+ const erBlocks = privacy['excludedReasoningBlocks'];
433
+ if (typeof erBlocks !== 'number') {
434
+ return { ok: false, error: 'privacy.excludedReasoningBlocks must be a number' };
435
+ }
436
+ if (!Number.isInteger(erBlocks) || erBlocks < 0) {
437
+ return { ok: false, error: 'privacy.excludedReasoningBlocks must be a non-negative integer' };
438
+ }
439
+ if (privacy['binaryAttachments'] !== 'included-unchanged') {
440
+ return { ok: false, error: 'privacy.binaryAttachments must equal "included-unchanged"' };
441
+ }
442
+ if (!isObj(privacy['redactionCounts'])) {
443
+ return { ok: false, error: 'privacy.redactionCounts must be a non-null object' };
444
+ }
445
+ const redactions = privacy['redactions'];
446
+ if (!Array.isArray(redactions)) {
447
+ return { ok: false, error: 'privacy.redactions must be an array' };
448
+ }
449
+ return validateArray(redactions, validateRedaction, 'privacy.redactions');
450
+ }
451
+ function validateTopLevelArrays(doc) {
452
+ const conversations = doc['conversations'];
453
+ if (!Array.isArray(conversations)) {
454
+ return { ok: false, error: 'conversations must be an array' };
455
+ }
456
+ const convsResult = validateArray(conversations, validateConversation, 'conversations');
457
+ if (!convsResult.ok)
458
+ return convsResult;
459
+ const delegations = doc['delegations'];
460
+ if (!Array.isArray(delegations)) {
461
+ return { ok: false, error: 'delegations must be an array' };
462
+ }
463
+ const delsResult = validateArray(delegations, validateDelegation, 'delegations');
464
+ if (!delsResult.ok)
465
+ return delsResult;
466
+ const attachments = doc['attachments'];
467
+ if (!Array.isArray(attachments)) {
468
+ return { ok: false, error: 'attachments must be an array' };
469
+ }
470
+ return validateArray(attachments, validateAttachment, 'attachments');
471
+ }
472
+ // ---------------------------------------------------------------------------
473
+ // Relational validation helpers — run only after structural checks pass
474
+ // ---------------------------------------------------------------------------
475
+ function checkUniqueConvAndMsgIds(conversations) {
476
+ const convIds = new Set();
477
+ const msgIds = new Set();
478
+ for (const conv of conversations) {
479
+ if (!isObj(conv) || typeof conv['id'] !== 'string')
480
+ continue;
481
+ if (convIds.has(conv['id'])) {
482
+ return { ok: false, error: `duplicate conversation id "${conv['id']}"` };
483
+ }
484
+ convIds.add(conv['id']);
485
+ const msgs = conv['messages'];
486
+ if (!Array.isArray(msgs))
487
+ continue;
488
+ for (const msg of msgs) {
489
+ if (!isObj(msg) || typeof msg['id'] !== 'string')
490
+ continue;
491
+ if (msgIds.has(msg['id'])) {
492
+ return { ok: false, error: `duplicate message id "${msg['id']}"` };
493
+ }
494
+ msgIds.add(msg['id']);
495
+ }
496
+ }
497
+ return { ok: true };
498
+ }
499
+ function checkSequences(conversations) {
500
+ for (const conv of conversations) {
501
+ if (!isObj(conv))
502
+ continue;
503
+ const msgs = conv['messages'];
504
+ if (!Array.isArray(msgs))
505
+ continue;
506
+ const convId = typeof conv['id'] === 'string' ? conv['id'] : '?';
507
+ let prev = 0;
508
+ for (const msg of msgs) {
509
+ if (!isObj(msg) || typeof msg['sequence'] !== 'number')
510
+ continue;
511
+ const seq = msg['sequence'];
512
+ if (seq <= prev) {
513
+ return {
514
+ ok: false,
515
+ error: `sequences in conversation "${convId}" must be strictly increasing`,
516
+ };
517
+ }
518
+ prev = seq;
519
+ }
520
+ }
521
+ return { ok: true };
522
+ }
523
+ /** Collect tool-call block ids from an array of raw messages. */
524
+ function getToolCallIdsFromMessages(msgs) {
525
+ const ids = [];
526
+ for (const msg of msgs) {
527
+ if (!isObj(msg))
528
+ continue;
529
+ const content = msg['content'];
530
+ if (!Array.isArray(content))
531
+ continue;
532
+ for (const block of content) {
533
+ if (isObj(block) && block['type'] === 'tool-call' && typeof block['id'] === 'string') {
534
+ ids.push(block['id']);
535
+ }
536
+ }
537
+ }
538
+ return ids;
539
+ }
540
+ function collectAllToolCallIds(conversations) {
541
+ const ids = new Set();
542
+ for (const conv of conversations) {
543
+ if (!isObj(conv))
544
+ continue;
545
+ const msgs = conv['messages'];
546
+ if (!Array.isArray(msgs))
547
+ continue;
548
+ for (const id of getToolCallIdsFromMessages(msgs))
549
+ ids.add(id);
550
+ }
551
+ return ids;
552
+ }
553
+ function checkToolResultRefIds(conversations, toolCallIds) {
554
+ for (const conv of conversations) {
555
+ if (!isObj(conv))
556
+ continue;
557
+ const msgs = conv['messages'];
558
+ if (!Array.isArray(msgs))
559
+ continue;
560
+ for (const msg of msgs) {
561
+ if (!isObj(msg) || msg['role'] !== 'tool-result')
562
+ continue;
563
+ const tcId = msg['toolCallId'];
564
+ if (typeof tcId !== 'string' || tcId === '')
565
+ continue;
566
+ if (!toolCallIds.has(tcId)) {
567
+ return { ok: false, error: `tool-result message references unknown toolCallId "${tcId}"` };
568
+ }
569
+ }
570
+ }
571
+ return { ok: true };
572
+ }
573
+ function checkToolResultRefs(conversations) {
574
+ return checkToolResultRefIds(conversations, collectAllToolCallIds(conversations));
575
+ }
576
+ function checkAttachmentRefsInContent(content, attIds) {
577
+ for (const block of content) {
578
+ if (!isObj(block) || block['type'] !== 'attachment-ref')
579
+ continue;
580
+ const attId = block['attachmentId'];
581
+ if (typeof attId !== 'string' || !attIds.has(attId)) {
582
+ return { ok: false, error: `attachment-ref references unknown attachmentId "${attId}"` };
583
+ }
584
+ }
585
+ return { ok: true };
586
+ }
587
+ function checkAttachmentRefsInConversations(conversations, attIds) {
588
+ for (const conv of conversations) {
589
+ if (!isObj(conv))
590
+ continue;
591
+ const msgs = conv['messages'];
592
+ if (!Array.isArray(msgs))
593
+ continue;
594
+ for (const msg of msgs) {
595
+ if (!isObj(msg))
596
+ continue;
597
+ const content = msg['content'];
598
+ if (!Array.isArray(content))
599
+ continue;
600
+ const r = checkAttachmentRefsInContent(content, attIds);
601
+ if (!r.ok)
602
+ return r;
603
+ }
604
+ }
605
+ return { ok: true };
606
+ }
607
+ function checkAttachmentRefResolution(conversations, attachments) {
608
+ const attIds = new Set();
609
+ for (const att of attachments) {
610
+ if (isObj(att) && typeof att['id'] === 'string')
611
+ attIds.add(att['id']);
612
+ }
613
+ return checkAttachmentRefsInConversations(conversations, attIds);
614
+ }
615
+ /** Build a map of conversationId → Set<messageId> from the conversations array. */
616
+ function buildConvMsgIndex(conversations) {
617
+ const idx = new Map();
618
+ for (const conv of conversations) {
619
+ if (!isObj(conv) || typeof conv['id'] !== 'string')
620
+ continue;
621
+ const msgIds = new Set();
622
+ const msgs = conv['messages'];
623
+ if (Array.isArray(msgs)) {
624
+ for (const msg of msgs) {
625
+ if (isObj(msg) && typeof msg['id'] === 'string')
626
+ msgIds.add(msg['id']);
627
+ }
628
+ }
629
+ idx.set(conv['id'], msgIds);
630
+ }
631
+ return idx;
632
+ }
633
+ function checkAttachmentSources(attachments, conversations) {
634
+ const convMsgIdx = buildConvMsgIndex(conversations);
635
+ for (let i = 0; i < attachments.length; i++) {
636
+ const att = attachments[i];
637
+ if (!isObj(att))
638
+ continue;
639
+ const convId = att['sourceConversationId'];
640
+ const msgId = att['sourceMessageId'];
641
+ if (typeof convId !== 'string' || typeof msgId !== 'string')
642
+ continue;
643
+ const msgIds = convMsgIdx.get(convId);
644
+ if (!msgIds) {
645
+ return {
646
+ ok: false,
647
+ error: `attachments[${i}].sourceConversationId "${convId}" does not exist`,
648
+ };
649
+ }
650
+ if (!msgIds.has(msgId)) {
651
+ return {
652
+ ok: false,
653
+ error: `attachments[${i}].sourceMessageId "${msgId}" does not exist in conversation "${convId}"`,
654
+ };
655
+ }
656
+ }
657
+ return { ok: true };
658
+ }
659
+ /** Build a map of conversationId → Set<toolCallId> from all tool-call blocks. */
660
+ function buildConvToolCallIndex(conversations) {
661
+ const idx = new Map();
662
+ for (const conv of conversations) {
663
+ if (!isObj(conv) || typeof conv['id'] !== 'string')
664
+ continue;
665
+ const msgs = Array.isArray(conv['messages']) ? conv['messages'] : [];
666
+ idx.set(conv['id'], new Set(getToolCallIdsFromMessages(msgs)));
667
+ }
668
+ return idx;
669
+ }
670
+ function checkEachDelegation(delegations, convIds, convToolCallIds) {
671
+ for (let i = 0; i < delegations.length; i++) {
672
+ const del = delegations[i];
673
+ if (!isObj(del))
674
+ continue;
675
+ const srcId = del['sourceConversationId'];
676
+ const tgtId = del['targetConversationId'];
677
+ if (typeof srcId !== 'string' || !convIds.has(srcId)) {
678
+ return {
679
+ ok: false,
680
+ error: `delegations[${i}].sourceConversationId "${srcId}" does not exist`,
681
+ };
682
+ }
683
+ if (typeof tgtId !== 'string' || !convIds.has(tgtId)) {
684
+ return {
685
+ ok: false,
686
+ error: `delegations[${i}].targetConversationId "${tgtId}" does not exist`,
687
+ };
688
+ }
689
+ const tcId = del['toolCallId'];
690
+ if (typeof tcId === 'string' && tcId !== '') {
691
+ const srcToolCalls = convToolCallIds.get(srcId);
692
+ if (!srcToolCalls?.has(tcId)) {
693
+ return {
694
+ ok: false,
695
+ error: `delegations[${i}].toolCallId "${tcId}" does not exist in source conversation "${srcId}"`,
696
+ };
697
+ }
698
+ }
699
+ }
700
+ return { ok: true };
701
+ }
702
+ function checkDelegationRefs(delegations, conversations) {
703
+ const convIds = new Set();
704
+ for (const conv of conversations) {
705
+ if (isObj(conv) && typeof conv['id'] === 'string')
706
+ convIds.add(conv['id']);
707
+ }
708
+ return checkEachDelegation(delegations, convIds, buildConvToolCallIndex(conversations));
709
+ }
710
+ function checkRedactionTargetRef(target, attIds, path) {
711
+ if (target['kind'] !== 'attachment')
712
+ return { ok: true };
713
+ const attId = target['attachmentId'];
714
+ if (typeof attId !== 'string' || !attIds.has(attId)) {
715
+ return {
716
+ ok: false,
717
+ error: `${path}.attachmentId "${attId}" does not reference a known attachment`,
718
+ };
719
+ }
720
+ return { ok: true };
721
+ }
722
+ function checkRedactionRefs(redactions, attachments) {
723
+ const attIds = new Set();
724
+ for (const att of attachments) {
725
+ if (isObj(att) && typeof att['id'] === 'string')
726
+ attIds.add(att['id']);
727
+ }
728
+ for (let i = 0; i < redactions.length; i++) {
729
+ const red = redactions[i];
730
+ if (!isObj(red))
731
+ continue;
732
+ const target = red['target'];
733
+ if (!isObj(target))
734
+ continue;
735
+ const r = checkRedactionTargetRef(target, attIds, `privacy.redactions[${i}].target`);
736
+ if (!r.ok)
737
+ return r;
738
+ }
739
+ return { ok: true };
740
+ }
741
+ function validateRelational(doc) {
742
+ const conversations = doc['conversations'];
743
+ const attachments = doc['attachments'];
744
+ const delegations = doc['delegations'];
745
+ const privacy = doc['privacy'];
746
+ const redactions = (Array.isArray(privacy?.['redactions']) ? privacy['redactions'] : []);
747
+ const r1 = checkUniqueConvAndMsgIds(conversations);
748
+ if (!r1.ok)
749
+ return r1;
750
+ const r2 = checkSequences(conversations);
751
+ if (!r2.ok)
752
+ return r2;
753
+ const r3 = checkToolResultRefs(conversations);
754
+ if (!r3.ok)
755
+ return r3;
756
+ const r4 = checkAttachmentRefResolution(conversations, attachments);
757
+ if (!r4.ok)
758
+ return r4;
759
+ const r5 = checkAttachmentSources(attachments, conversations);
760
+ if (!r5.ok)
761
+ return r5;
762
+ const r6 = checkDelegationRefs(delegations, conversations);
763
+ if (!r6.ok)
764
+ return r6;
765
+ return checkRedactionRefs(redactions, attachments);
766
+ }
767
+ function validateStructuredBody(doc) {
768
+ const r = validateTopLevelArrays(doc);
769
+ if (!r.ok)
770
+ return r;
771
+ return validateRelational(doc);
772
+ }
773
+ // ---------------------------------------------------------------------------
774
+ // Public validator
775
+ // ---------------------------------------------------------------------------
776
+ /**
777
+ * Runtime validator for `TranscriptDocumentV1`.
778
+ *
779
+ * Validates all required discriminators, type-specific content block fields,
780
+ * scalar constraints (sequence ≥ 1, ISO timestamps, SHA-256 hex, attachment
781
+ * state invariants), and relational cross-references. Returns early with the
782
+ * first structural error before performing any relational checks.
783
+ *
784
+ * Never throws for untrusted input.
785
+ */
786
+ export function validateTranscriptDocumentV1(value) {
787
+ if (!isObj(value)) {
788
+ return { ok: false, error: 'document must be a non-null object' };
789
+ }
790
+ if (value['schemaVersion'] !== 1) {
791
+ return { ok: false, error: 'schemaVersion must equal 1' };
792
+ }
793
+ const exportResult = validateExport(value['export']);
794
+ if (!exportResult.ok)
795
+ return exportResult;
796
+ const sessionResult = validateSession(value['session']);
797
+ if (!sessionResult.ok)
798
+ return sessionResult;
799
+ const privacyResult = validatePrivacy(value['privacy']);
800
+ if (!privacyResult.ok)
801
+ return privacyResult;
802
+ return validateStructuredBody(value);
803
+ }
804
+ //# sourceMappingURL=transcript-export.js.map