@nomix-ai/nomix-harness 0.2.5 → 0.2.6

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 (1017) hide show
  1. package/README.md +2 -9
  2. package/dist/assets/web/assets/index-BnapMmQ_.css +1 -0
  3. package/dist/assets/web/assets/index-Dx7Ws_OC.js +96 -0
  4. package/dist/assets/web/assets/langs/{php-D-uCvoST.js → php-DDkx9sim.js} +2 -2
  5. package/dist/{kernel/web-frontend/dist/assets/langs/ruby-DEItuUFs.js → assets/web/assets/langs/ruby-DCxyoPen.js} +2 -2
  6. package/dist/assets/web/assets/{vendor-Cjbwl5VI.js → vendor-D22_Mp1f.js} +2 -2
  7. package/dist/assets/web/favicon.svg +8 -0
  8. package/dist/assets/web/index.html +5 -5
  9. package/dist/bundles/base/cordis.patch.yml +31 -6
  10. package/dist/bundles/web-app/cordis.patch.yml +27 -6
  11. package/dist/cli/bin.js +4 -5
  12. package/dist/cli/builtin-registry.js +34 -4
  13. package/dist/cli/{dump-config-d3ECray2.js → dump-config-BEj2GlJo.js} +1 -1
  14. package/dist/cli/{plugin-Bw9wgrmj.js → plugin-D_gLgCYL.js} +1 -1
  15. package/dist/cli/profile-boot-BSrYtiQI.js +2 -0
  16. package/dist/cli/{profile-boot-DFHdh9Xq.js → profile-boot-CByqUxLM.js} +0 -2
  17. package/dist/cli/runtime.js +0 -2
  18. package/dist/config/agent-presets/code/agent.cordis.yml +4 -3
  19. package/dist/config/agent-presets/cordis/agent.cordis.yml +4 -3
  20. package/dist/config/agent-presets/cordis/skills/editing-cordis-compositions/SKILL.md +13 -2
  21. package/dist/config/agent-presets/minimal/agent.cordis.yml +27 -1
  22. package/dist/config/agent-presets/standard/agent.cordis.yml +4 -3
  23. package/dist/kernel/acp/package.json +1 -1
  24. package/dist/kernel/agent/package.json +1 -1
  25. package/dist/kernel/agent-default-model/package.json +1 -1
  26. package/dist/kernel/agent-instructions/package.json +1 -1
  27. package/dist/kernel/agent-loop/lib/index.js +33 -10
  28. package/dist/kernel/agent-loop/lib/types/agent.js +26 -6
  29. package/dist/kernel/agent-loop/package.json +1 -1
  30. package/dist/kernel/agent-presets/package.json +1 -1
  31. package/dist/kernel/agent-tool-presentation/package.json +1 -1
  32. package/dist/kernel/anonymous-user-id/package.json +1 -1
  33. package/dist/kernel/api-gateway/lib/client.js +84 -55
  34. package/dist/kernel/api-gateway/lib/types/client/index.js +93 -61
  35. package/dist/kernel/api-gateway/package.json +1 -1
  36. package/dist/kernel/api-remotes/lib/client.js +166 -27
  37. package/dist/kernel/api-remotes/lib/index.js +1 -1
  38. package/dist/kernel/api-remotes/lib/types/client/index.d.ts +4 -0
  39. package/dist/kernel/api-remotes/lib/types/client/index.js +4 -1
  40. package/dist/kernel/api-remotes/lib/types/remote-events.d.ts +1 -1
  41. package/dist/kernel/api-remotes/lib/types/remote-events.js +1 -1
  42. package/dist/kernel/api-remotes/package.json +11 -7
  43. package/dist/kernel/app-boot/lib/index.js +19 -41
  44. package/dist/kernel/app-boot/lib/types/index.d.ts +0 -1
  45. package/dist/kernel/app-boot/lib/types/index.js +2 -3
  46. package/dist/kernel/app-boot/lib/types/profile.d.ts +15 -12
  47. package/dist/kernel/app-boot/lib/types/profile.js +15 -25
  48. package/dist/kernel/app-boot/package.json +1 -1
  49. package/dist/kernel/atomic-write/lib/index.js +36 -16
  50. package/dist/kernel/atomic-write/lib/types/index.d.ts +21 -5
  51. package/dist/kernel/atomic-write/lib/types/index.js +40 -16
  52. package/dist/kernel/atomic-write/package.json +1 -1
  53. package/dist/kernel/attachment/lib/index.js +62 -3
  54. package/dist/kernel/attachment/lib/types/admission.d.ts +15 -0
  55. package/dist/kernel/attachment/lib/types/admission.js +33 -0
  56. package/dist/kernel/attachment/lib/types/brand.d.ts +8 -0
  57. package/dist/kernel/attachment/lib/types/brand.js +8 -0
  58. package/dist/kernel/attachment/lib/types/error.d.ts +2 -2
  59. package/dist/kernel/attachment/lib/types/error.js +1 -0
  60. package/dist/kernel/attachment/lib/types/index.d.ts +23 -5
  61. package/dist/kernel/attachment/lib/types/index.js +24 -2
  62. package/dist/kernel/attachment/lib/types/types.d.ts +47 -2
  63. package/dist/kernel/attachment/package.json +3 -2
  64. package/dist/kernel/attachment-local/lib/index.js +640 -48
  65. package/dist/kernel/attachment-local/lib/types/compression-limiter.d.ts +18 -0
  66. package/dist/kernel/attachment-local/lib/types/compression-limiter.js +43 -0
  67. package/dist/kernel/attachment-local/lib/types/encoding.d.ts +23 -0
  68. package/dist/kernel/attachment-local/lib/types/encoding.js +33 -0
  69. package/dist/kernel/attachment-local/lib/types/image.d.ts +31 -2
  70. package/dist/kernel/attachment-local/lib/types/image.js +43 -4
  71. package/dist/kernel/attachment-local/lib/types/index.d.ts +45 -10
  72. package/dist/kernel/attachment-local/lib/types/index.js +140 -10
  73. package/dist/kernel/attachment-local/lib/types/normalization.d.ts +44 -0
  74. package/dist/kernel/attachment-local/lib/types/normalization.js +148 -0
  75. package/dist/kernel/attachment-local/lib/types/request-image.d.ts +35 -0
  76. package/dist/kernel/attachment-local/lib/types/request-image.js +208 -0
  77. package/dist/kernel/attachment-local/lib/types/store.d.ts +36 -9
  78. package/dist/kernel/attachment-local/lib/types/store.js +60 -24
  79. package/dist/kernel/attachment-local/package.json +1 -1
  80. package/dist/kernel/authorization/lib/index.js +248 -0
  81. package/dist/kernel/authorization/lib/invariant.js +36 -0
  82. package/dist/kernel/authorization/lib/types/index.d.ts +223 -0
  83. package/dist/kernel/authorization/lib/types/index.js +299 -0
  84. package/dist/kernel/authorization/lib/types/invariant.d.ts +16 -0
  85. package/dist/kernel/authorization/lib/types/invariant.js +38 -0
  86. package/dist/kernel/authorization/lib/types/types.d.ts +83 -0
  87. package/dist/kernel/authorization/lib/types/types.js +8 -0
  88. package/dist/kernel/{client-web-react → authorization}/package.json +19 -16
  89. package/dist/kernel/base/cordis.patch.yml +31 -6
  90. package/dist/kernel/base/package.json +3 -1
  91. package/dist/kernel/bash-local/package.json +1 -1
  92. package/dist/kernel/bash-sandbox/package.json +1 -1
  93. package/dist/kernel/brand/package.json +1 -1
  94. package/dist/kernel/client-connection/lib/client.js +148 -28
  95. package/dist/kernel/client-connection/lib/index.js +4 -4
  96. package/dist/kernel/client-connection/lib/types/client/fixture.js +112 -20
  97. package/dist/kernel/client-connection/lib/types/client/index.d.ts +21 -1
  98. package/dist/kernel/client-connection/lib/types/client/index.js +3 -2
  99. package/dist/kernel/client-connection/lib/types/client/rpc.d.ts +4 -1
  100. package/dist/kernel/client-connection/lib/types/client/rpc.js +4 -2
  101. package/dist/kernel/client-connection/lib/types/http-bridge.d.ts +2 -2
  102. package/dist/kernel/client-connection/lib/types/http-bridge.js +3 -3
  103. package/dist/kernel/client-connection/lib/types/index.d.ts +1 -1
  104. package/dist/kernel/client-connection/package.json +15 -9
  105. package/dist/kernel/client-hmr/package.json +1 -1
  106. package/dist/kernel/client-locale/lib/client.js +48 -9
  107. package/dist/kernel/client-locale/lib/types/client/index.d.ts +19 -3
  108. package/dist/kernel/client-locale/lib/types/client/index.js +48 -7
  109. package/dist/kernel/client-locale/package.json +6 -6
  110. package/dist/kernel/client-modules/lib/client.js +188 -123
  111. package/dist/kernel/client-modules/lib/index.js +177 -31
  112. package/dist/kernel/client-modules/lib/types/client/index.d.ts +19 -8
  113. package/dist/kernel/client-modules/lib/types/client/index.js +25 -8
  114. package/dist/kernel/client-modules/lib/types/client/manifest.d.ts +90 -41
  115. package/dist/kernel/client-modules/lib/types/client/manifest.js +45 -12
  116. package/dist/kernel/client-modules/lib/types/client/system.d.ts +15 -17
  117. package/dist/kernel/client-modules/lib/types/client/system.js +85 -56
  118. package/dist/kernel/client-modules/lib/types/index.d.ts +28 -12
  119. package/dist/kernel/client-modules/lib/types/index.js +128 -34
  120. package/dist/kernel/client-modules/package.json +4 -2
  121. package/dist/kernel/client-runtime/lib/client.js +43 -8
  122. package/dist/kernel/client-runtime/lib/types/client/contract/session.d.ts +1 -1
  123. package/dist/kernel/client-runtime/lib/types/client/contract/store.d.ts +1 -1
  124. package/dist/kernel/client-runtime/lib/types/client/contract/store.js +2 -2
  125. package/dist/kernel/client-runtime/lib/types/client/index.d.ts +2 -2
  126. package/dist/kernel/client-runtime/lib/types/client/index.js +3 -3
  127. package/dist/kernel/client-runtime/lib/types/client/sessions/context-provenance.d.ts +8 -0
  128. package/dist/kernel/client-runtime/lib/types/client/sessions/context-provenance.js +13 -0
  129. package/dist/kernel/client-runtime/lib/types/client/sessions/conversation.d.ts +11 -7
  130. package/dist/kernel/client-runtime/lib/types/client/sessions/projection-store.d.ts +1 -1
  131. package/dist/kernel/client-runtime/lib/types/client/sessions/session.d.ts +1 -1
  132. package/dist/kernel/client-runtime/lib/types/client/sessions/session.js +4 -4
  133. package/dist/kernel/client-runtime/lib/types/client/slots.d.ts +1 -1
  134. package/dist/kernel/client-runtime/lib/types/client/slots.js +1 -1
  135. package/dist/kernel/client-runtime/lib/types/client/workspaces/path.d.ts +9 -0
  136. package/dist/kernel/client-runtime/lib/types/client/workspaces/path.js +27 -1
  137. package/dist/kernel/client-runtime/package.json +25 -14
  138. package/dist/kernel/client-ui-agent-preset/lib/client.js +55 -55
  139. package/dist/kernel/client-ui-agent-preset/lib/types/client/index.js +2 -2
  140. package/dist/kernel/client-ui-agent-preset/lib/types/client/settings-store.d.ts +7 -1
  141. package/dist/kernel/client-ui-agent-preset/lib/types/client/settings-store.js +21 -20
  142. package/dist/kernel/client-ui-agent-preset/package.json +2 -7
  143. package/dist/kernel/client-ui-attachment/lib/client.js +782 -0
  144. package/dist/kernel/client-ui-attachment/lib/index.js +5 -505
  145. package/dist/kernel/client-ui-attachment/lib/invariant.js +2 -3
  146. package/dist/kernel/client-ui-attachment/lib/types/client/ComposerAttachments.d.ts +4 -0
  147. package/dist/kernel/client-ui-attachment/lib/types/client/ComposerAttachments.js +85 -0
  148. package/dist/kernel/client-ui-attachment/lib/types/client/MessageImages.d.ts +4 -0
  149. package/dist/kernel/client-ui-attachment/lib/types/client/MessageImages.js +8 -0
  150. package/dist/kernel/client-ui-attachment/lib/types/client/index.d.ts +7 -0
  151. package/dist/kernel/client-ui-attachment/lib/types/client/index.js +16 -0
  152. package/dist/kernel/client-ui-attachment/lib/types/client/labels.d.ts +35 -0
  153. package/dist/kernel/client-ui-attachment/lib/types/client/labels.js +52 -0
  154. package/dist/kernel/client-ui-attachment/lib/types/index.d.ts +3 -15
  155. package/dist/kernel/client-ui-attachment/lib/types/index.js +3 -11
  156. package/dist/kernel/client-ui-attachment/lib/types/invariant.js +2 -3
  157. package/dist/kernel/client-ui-attachment/package.json +32 -9
  158. package/dist/kernel/client-ui-brand-official/lib/client.js +50 -0
  159. package/dist/kernel/client-ui-brand-official/lib/index.js +9 -0
  160. package/dist/kernel/{client-web-react → client-ui-brand-official}/lib/invariant.js +6 -8
  161. package/dist/kernel/client-ui-brand-official/lib/types/client/Brand.d.ts +16 -0
  162. package/dist/kernel/client-ui-brand-official/lib/types/client/Brand.js +18 -0
  163. package/dist/kernel/client-ui-brand-official/lib/types/client/index.d.ts +10 -0
  164. package/dist/kernel/client-ui-brand-official/lib/types/client/index.js +17 -0
  165. package/dist/kernel/client-ui-brand-official/lib/types/index.d.ts +7 -0
  166. package/dist/kernel/client-ui-brand-official/lib/types/index.js +7 -0
  167. package/dist/kernel/client-ui-brand-official/lib/types/invariant.d.ts +16 -0
  168. package/dist/kernel/{client-web-react → client-ui-brand-official}/lib/types/invariant.js +6 -8
  169. package/dist/kernel/client-ui-brand-official/package.json +72 -0
  170. package/dist/kernel/client-ui-commands/lib/client.js +44 -15
  171. package/dist/kernel/client-ui-commands/lib/types/client/locales.d.ts +2 -0
  172. package/dist/kernel/client-ui-commands/lib/types/client/locales.js +2 -0
  173. package/dist/kernel/client-ui-commands/lib/types/client/service.d.ts +11 -1
  174. package/dist/kernel/client-ui-commands/lib/types/client/service.js +39 -7
  175. package/dist/kernel/client-ui-commands/package.json +2 -5
  176. package/dist/kernel/client-ui-conversation/lib/client.js +949 -531
  177. package/dist/kernel/client-ui-conversation/lib/types/client/apply.js +6 -4
  178. package/dist/kernel/client-ui-conversation/lib/types/client/chat/AssistantMarkdown.d.ts +4 -5
  179. package/dist/kernel/client-ui-conversation/lib/types/client/chat/AssistantMarkdown.js +6 -6
  180. package/dist/kernel/client-ui-conversation/lib/types/client/chat/AssistantNodeView.d.ts +1 -1
  181. package/dist/kernel/client-ui-conversation/lib/types/client/chat/AssistantNodeView.js +2 -2
  182. package/dist/kernel/client-ui-conversation/lib/types/client/chat/ChatNodeSeat.d.ts +1 -1
  183. package/dist/kernel/client-ui-conversation/lib/types/client/chat/ChatNodeSeat.js +5 -3
  184. package/dist/kernel/client-ui-conversation/lib/types/client/chat/ChatView.js +53 -10
  185. package/dist/kernel/client-ui-conversation/lib/types/client/chat/ContextInjectionRow.js +4 -1
  186. package/dist/kernel/client-ui-conversation/lib/types/client/chat/MessageItem.d.ts +4 -5
  187. package/dist/kernel/client-ui-conversation/lib/types/client/chat/MessageItem.js +46 -16
  188. package/dist/kernel/client-ui-conversation/lib/types/client/chat/StatsLine.d.ts +5 -3
  189. package/dist/kernel/client-ui-conversation/lib/types/client/chat/StatsLine.js +54 -5
  190. package/dist/kernel/client-ui-conversation/lib/types/client/contract/slots.d.ts +90 -8
  191. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/assistant.js +1 -0
  192. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/chat-snapshot-builder.d.ts +1 -0
  193. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/chat-snapshot-builder.js +95 -6
  194. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/message.d.ts +11 -3
  195. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/turn-error.d.ts +6 -3
  196. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/turn-error.js +10 -26
  197. package/dist/kernel/client-ui-conversation/lib/types/client/image-labels.d.ts +1 -33
  198. package/dist/kernel/client-ui-conversation/lib/types/client/image-labels.js +5 -54
  199. package/dist/kernel/client-ui-conversation/lib/types/client/index.d.ts +1 -1
  200. package/dist/kernel/client-ui-conversation/lib/types/client/input/contract.d.ts +17 -14
  201. package/dist/kernel/client-ui-conversation/lib/types/client/input/decorations.d.ts +13 -5
  202. package/dist/kernel/client-ui-conversation/lib/types/client/input/decorations.js +26 -10
  203. package/dist/kernel/client-ui-conversation/lib/types/client/input/facade.d.ts +34 -14
  204. package/dist/kernel/client-ui-conversation/lib/types/client/input/facade.js +116 -34
  205. package/dist/kernel/client-ui-conversation/lib/types/client/input/hub.d.ts +1 -1
  206. package/dist/kernel/client-ui-conversation/lib/types/client/input/hub.js +21 -19
  207. package/dist/kernel/client-ui-conversation/lib/types/client/input/machine.d.ts +35 -14
  208. package/dist/kernel/client-ui-conversation/lib/types/client/input/machine.js +71 -34
  209. package/dist/kernel/client-ui-conversation/lib/types/client/locales.d.ts +16 -0
  210. package/dist/kernel/client-ui-conversation/lib/types/client/locales.js +16 -0
  211. package/dist/kernel/client-ui-conversation/lib/types/client/reference/ReferenceIcon.d.ts +16 -0
  212. package/dist/kernel/client-ui-conversation/lib/types/client/reference/ReferenceIcon.js +16 -0
  213. package/dist/kernel/client-ui-conversation/lib/types/client/service.d.ts +14 -1
  214. package/dist/kernel/client-ui-conversation/lib/types/client/service.js +26 -6
  215. package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/ConversationRoot.js +1 -1
  216. package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/ConversationSession.js +18 -3
  217. package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/EmptyHero.d.ts +3 -1
  218. package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/EmptyHero.js +4 -2
  219. package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/InputBar.js +141 -126
  220. package/dist/kernel/client-ui-conversation/package.json +9 -8
  221. package/dist/kernel/client-ui-cordis/lib/client.js +48 -48
  222. package/dist/kernel/client-ui-cordis/package.json +2 -5
  223. package/dist/kernel/client-ui-deliverables/lib/client.js +5 -5
  224. package/dist/kernel/client-ui-deliverables/package.json +4 -6
  225. package/dist/kernel/client-ui-directory-picker-browse/lib/client.js +26 -26
  226. package/dist/kernel/client-ui-directory-picker-browse/package.json +2 -5
  227. package/dist/kernel/client-ui-directory-picker-native/package.json +2 -5
  228. package/dist/kernel/client-ui-goal/lib/client.js +8 -8
  229. package/dist/kernel/client-ui-goal/package.json +6 -5
  230. package/dist/kernel/client-ui-input-trigger/lib/client.js +82 -26
  231. package/dist/kernel/client-ui-input-trigger/lib/types/client/MenuView.js +13 -9
  232. package/dist/kernel/client-ui-input-trigger/lib/types/client/controller.d.ts +5 -3
  233. package/dist/kernel/client-ui-input-trigger/lib/types/client/controller.js +19 -7
  234. package/dist/kernel/client-ui-input-trigger/lib/types/client/index.d.ts +1 -1
  235. package/dist/kernel/client-ui-input-trigger/lib/types/core/contract.d.ts +7 -2
  236. package/dist/kernel/client-ui-input-trigger/lib/types/core/detect.d.ts +4 -4
  237. package/dist/kernel/client-ui-input-trigger/lib/types/core/detect.js +24 -6
  238. package/dist/kernel/client-ui-input-trigger/lib/types/core/menu.d.ts +15 -2
  239. package/dist/kernel/client-ui-input-trigger/lib/types/core/menu.js +13 -4
  240. package/dist/kernel/client-ui-input-trigger/lib/types/types.d.ts +52 -8
  241. package/dist/kernel/client-ui-input-trigger/package.json +4 -5
  242. package/dist/kernel/client-ui-jobs/lib/client.js +10 -10
  243. package/dist/kernel/client-ui-jobs/package.json +3 -7
  244. package/dist/kernel/client-ui-layout/lib/client.js +3 -3
  245. package/dist/kernel/client-ui-layout/package.json +2 -4
  246. package/dist/kernel/client-ui-message-feedback/lib/client.js +174 -58
  247. package/dist/kernel/client-ui-message-feedback/lib/types/client/MessageFeedbackActions.d.ts +9 -3
  248. package/dist/kernel/client-ui-message-feedback/lib/types/client/MessageFeedbackActions.js +164 -25
  249. package/dist/kernel/client-ui-message-feedback/lib/types/client/locales.d.ts +2 -0
  250. package/dist/kernel/client-ui-message-feedback/lib/types/client/locales.js +2 -0
  251. package/dist/kernel/client-ui-message-feedback/package.json +3 -5
  252. package/dist/kernel/client-ui-model-selection/lib/client.js +18 -18
  253. package/dist/kernel/client-ui-model-selection/package.json +7 -9
  254. package/dist/kernel/client-ui-permission-presets/lib/client.js +97 -83
  255. package/dist/kernel/client-ui-permission-presets/lib/types/client/index.js +6 -19
  256. package/dist/kernel/client-ui-permission-presets/lib/types/client/settings-store.d.ts +27 -18
  257. package/dist/kernel/client-ui-permission-presets/lib/types/client/settings-store.js +95 -68
  258. package/dist/kernel/client-ui-permission-presets/package.json +2 -8
  259. package/dist/kernel/client-ui-plan/lib/client.js +1 -1
  260. package/dist/kernel/client-ui-plan/lib/types/client/index.js +1 -1
  261. package/dist/kernel/client-ui-plan/package.json +2 -6
  262. package/dist/kernel/client-ui-primitives/lib/Button.module.css +79 -0
  263. package/dist/kernel/client-ui-primitives/lib/ConnectionBanner.module.css +13 -0
  264. package/dist/kernel/client-ui-primitives/lib/DiffBlock.module.css +107 -0
  265. package/dist/kernel/client-ui-primitives/lib/DisclosureRow.module.css +69 -0
  266. package/dist/kernel/client-ui-primitives/lib/HoverCard.module.css +54 -0
  267. package/dist/kernel/client-ui-primitives/lib/Input.module.css +38 -0
  268. package/dist/kernel/client-ui-primitives/lib/JsonTree.module.css +222 -0
  269. package/dist/kernel/client-ui-primitives/lib/Menu.module.css +242 -0
  270. package/dist/kernel/client-ui-primitives/lib/Modal.module.css +103 -0
  271. package/dist/kernel/client-ui-primitives/lib/OnboardingSurface.module.css +29 -0
  272. package/dist/kernel/client-ui-primitives/lib/Pill.module.css +27 -0
  273. package/dist/kernel/client-ui-primitives/lib/ReadBlock.module.css +117 -0
  274. package/dist/kernel/client-ui-primitives/lib/RiskConfirmation.module.css +73 -0
  275. package/dist/kernel/client-ui-primitives/lib/SearchBlock.module.css +120 -0
  276. package/dist/kernel/client-ui-primitives/lib/StateDot.module.css +65 -0
  277. package/dist/kernel/client-ui-primitives/lib/TerminalBlock.module.css +211 -0
  278. package/dist/kernel/client-ui-primitives/lib/Toast.module.css +70 -0
  279. package/dist/kernel/client-ui-primitives/lib/Tooltip.module.css +49 -0
  280. package/dist/kernel/client-ui-primitives/lib/WebBlock.module.css +130 -0
  281. package/dist/kernel/client-ui-primitives/lib/index.js +291 -261
  282. package/dist/kernel/client-ui-primitives/lib/invariant.js +2 -0
  283. package/dist/kernel/client-ui-primitives/lib/markdown/CodeBlock.module.css +96 -0
  284. package/dist/kernel/client-ui-primitives/lib/markdown/JsonBlock.module.css +32 -0
  285. package/dist/kernel/client-ui-primitives/lib/markdown/MarkdownText.module.css +304 -0
  286. package/dist/kernel/client-ui-primitives/lib/markdown/MessageText.module.css +9 -0
  287. package/dist/kernel/client-ui-primitives/lib/types/BrandWordmark.d.ts +7 -1
  288. package/dist/kernel/client-ui-primitives/lib/types/BrandWordmark.js +4 -2
  289. package/dist/kernel/client-ui-primitives/lib/types/index.d.ts +4 -1
  290. package/dist/kernel/client-ui-primitives/lib/types/index.js +2 -1
  291. package/dist/kernel/client-ui-primitives/lib/types/markdown/render.d.ts +2 -0
  292. package/dist/kernel/client-ui-primitives/lib/types/markdown/render.js +10 -2
  293. package/dist/kernel/client-ui-primitives/lib/types/useAnchoredPosition.d.ts +32 -0
  294. package/dist/kernel/client-ui-primitives/lib/types/useAnchoredPosition.js +69 -0
  295. package/dist/kernel/client-ui-primitives/package.json +2 -1
  296. package/dist/kernel/client-ui-reference/lib/client.js +149 -0
  297. package/dist/kernel/client-ui-reference/lib/index.js +11 -0
  298. package/dist/kernel/{client-schema-form → client-ui-reference}/lib/invariant.js +7 -8
  299. package/dist/kernel/client-ui-reference/lib/types/client/index.d.ts +9 -0
  300. package/dist/kernel/client-ui-reference/lib/types/client/index.js +106 -0
  301. package/dist/kernel/client-ui-reference/lib/types/client/locales.d.ts +30 -0
  302. package/dist/kernel/client-ui-reference/lib/types/client/locales.js +22 -0
  303. package/dist/kernel/client-ui-reference/lib/types/index.d.ts +9 -0
  304. package/dist/kernel/client-ui-reference/lib/types/index.js +9 -0
  305. package/dist/kernel/{client-schema-form → client-ui-reference}/lib/types/invariant.d.ts +3 -3
  306. package/dist/kernel/{client-schema-form → client-ui-reference}/lib/types/invariant.js +7 -8
  307. package/dist/kernel/client-ui-reference/package.json +77 -0
  308. package/dist/kernel/client-ui-renderer/lib/client.js +989 -0
  309. package/dist/kernel/client-ui-renderer/lib/index.js +6 -0
  310. package/dist/kernel/client-ui-renderer/lib/invariant.js +23 -0
  311. package/dist/kernel/{client-web/lib/types → client-ui-renderer/lib/types/client}/DocumentTitle.d.ts +4 -4
  312. package/dist/kernel/client-ui-renderer/lib/types/client/DocumentTitle.js +17 -0
  313. package/dist/kernel/client-ui-renderer/lib/types/client/app.d.ts +18 -0
  314. package/dist/kernel/{client-web/lib/types → client-ui-renderer/lib/types/client}/app.js +5 -5
  315. package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/bind.d.ts +1 -1
  316. package/dist/kernel/client-ui-renderer/lib/types/client/index.d.ts +29 -0
  317. package/dist/kernel/client-ui-renderer/lib/types/client/index.js +51 -0
  318. package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/scoped-slots.d.ts +1 -1
  319. package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/scoped-slots.js +1 -1
  320. package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/session-provider.d.ts +1 -1
  321. package/dist/kernel/client-ui-renderer/lib/types/index.d.ts +4 -0
  322. package/dist/kernel/client-ui-renderer/lib/types/index.js +4 -0
  323. package/dist/kernel/{client-web-react → client-ui-renderer}/lib/types/invariant.d.ts +3 -3
  324. package/dist/kernel/client-ui-renderer/lib/types/invariant.js +22 -0
  325. package/dist/kernel/client-ui-renderer/package.json +71 -0
  326. package/dist/kernel/client-ui-settings/lib/client.js +1177 -67
  327. package/dist/kernel/client-ui-settings/lib/types/client/index.d.ts +20 -12
  328. package/dist/kernel/client-ui-settings/lib/types/client/index.js +25 -6
  329. package/dist/kernel/client-ui-settings/lib/types/client/schema.d.ts +72 -0
  330. package/dist/kernel/client-ui-settings/lib/types/client/schema.js +152 -0
  331. package/dist/kernel/client-ui-settings/lib/types/client/settings-mirror.d.ts +118 -0
  332. package/dist/kernel/client-ui-settings/lib/types/client/settings-mirror.js +160 -0
  333. package/dist/kernel/client-ui-settings/lib/types/client/settings-scope.d.ts +51 -24
  334. package/dist/kernel/client-ui-settings/lib/types/client/settings-scope.js +88 -71
  335. package/dist/kernel/client-ui-settings/package.json +7 -7
  336. package/dist/kernel/client-ui-settings-general/lib/client.js +60 -64
  337. package/dist/kernel/client-ui-settings-general/lib/types/client/SettingsDocumentAction.d.ts +7 -6
  338. package/dist/kernel/client-ui-settings-general/lib/types/client/index.js +10 -11
  339. package/dist/kernel/client-ui-settings-general/lib/types/client/settings-document-store.d.ts +13 -11
  340. package/dist/kernel/client-ui-settings-general/lib/types/client/settings-document-store.js +37 -40
  341. package/dist/kernel/client-ui-settings-general/package.json +4 -8
  342. package/dist/kernel/client-ui-settings-models/lib/client.js +280 -210
  343. package/dist/kernel/client-ui-settings-models/lib/types/client/DeepSeekOnboardingDialog.d.ts +3 -0
  344. package/dist/kernel/client-ui-settings-models/lib/types/client/DeepSeekOnboardingDialog.js +2 -2
  345. package/dist/kernel/client-ui-settings-models/lib/types/client/ModelListEditor.js +11 -1
  346. package/dist/kernel/client-ui-settings-models/lib/types/client/ModelsSection.d.ts +10 -5
  347. package/dist/kernel/client-ui-settings-models/lib/types/client/ModelsSection.js +9 -6
  348. package/dist/kernel/client-ui-settings-models/lib/types/client/ProviderEditor.d.ts +3 -0
  349. package/dist/kernel/client-ui-settings-models/lib/types/client/ProviderEditor.js +30 -29
  350. package/dist/kernel/client-ui-settings-models/lib/types/client/index.js +27 -22
  351. package/dist/kernel/client-ui-settings-models/lib/types/client/locales.d.ts +2 -0
  352. package/dist/kernel/client-ui-settings-models/lib/types/client/locales.js +4 -0
  353. package/dist/kernel/client-ui-settings-models/lib/types/client/schema-operations.d.ts +10 -0
  354. package/dist/kernel/client-ui-settings-models/lib/types/client/schema-operations.js +17 -0
  355. package/dist/kernel/client-ui-settings-models/lib/types/client/store.d.ts +15 -7
  356. package/dist/kernel/client-ui-settings-models/lib/types/client/store.js +30 -21
  357. package/dist/kernel/client-ui-settings-models/lib/types/client/welcome-store.d.ts +35 -18
  358. package/dist/kernel/client-ui-settings-models/lib/types/client/welcome-store.js +89 -82
  359. package/dist/kernel/client-ui-settings-models/package.json +3 -8
  360. package/dist/kernel/client-ui-settings-plugin-inventory/lib/client.js +11 -11
  361. package/dist/kernel/client-ui-settings-plugin-inventory/package.json +2 -5
  362. package/dist/kernel/client-ui-settings-plugins/lib/client.js +42 -65
  363. package/dist/kernel/client-ui-settings-plugins/lib/types/client/index.js +5 -8
  364. package/dist/kernel/client-ui-settings-plugins/lib/types/client/tab-store.d.ts +8 -17
  365. package/dist/kernel/client-ui-settings-plugins/lib/types/client/tab-store.js +22 -44
  366. package/dist/kernel/client-ui-settings-plugins/package.json +2 -7
  367. package/dist/kernel/client-ui-sidebar/lib/client.js +50 -20
  368. package/dist/kernel/client-ui-sidebar/lib/types/client/SidebarRoot.js +7 -3
  369. package/dist/kernel/client-ui-sidebar/lib/types/client/contract/slots.d.ts +30 -1
  370. package/dist/kernel/client-ui-sidebar/lib/types/client/index.d.ts +1 -1
  371. package/dist/kernel/client-ui-sidebar/lib/types/client/index.js +2 -0
  372. package/dist/kernel/client-ui-sidebar/package.json +2 -4
  373. package/dist/kernel/client-ui-skill/lib/client.js +12 -12
  374. package/dist/kernel/client-ui-skill/package.json +2 -5
  375. package/dist/kernel/client-ui-slots/lib/index.js +2 -0
  376. package/dist/kernel/client-ui-slots/lib/invariant.js +2 -0
  377. package/dist/kernel/client-ui-slots/lib/types/renderer.d.ts +1 -1
  378. package/dist/kernel/client-ui-slots/lib/types/store.d.ts +1 -1
  379. package/dist/kernel/client-ui-slots/package.json +1 -1
  380. package/dist/kernel/client-ui-subagent/lib/client.js +289 -157
  381. package/dist/kernel/client-ui-subagent/lib/types/client/SubagentHeaderLineage.d.ts +18 -0
  382. package/dist/kernel/client-ui-subagent/lib/types/client/{SubagentCatalogAction.js → SubagentHeaderLineage.js} +153 -25
  383. package/dist/kernel/client-ui-subagent/lib/types/client/index.d.ts +4 -16
  384. package/dist/kernel/client-ui-subagent/lib/types/client/index.js +7 -45
  385. package/dist/kernel/client-ui-subagent/lib/types/client/locales.d.ts +1 -0
  386. package/dist/kernel/client-ui-subagent/lib/types/client/locales.js +2 -0
  387. package/dist/kernel/client-ui-subagent/package.json +6 -8
  388. package/dist/kernel/client-ui-theme/lib/client.js +46 -3
  389. package/dist/kernel/client-ui-theme/lib/index.js +22 -23
  390. package/dist/kernel/client-ui-theme/lib/types/boot-theme.d.ts +9 -10
  391. package/dist/kernel/client-ui-theme/lib/types/boot-theme.js +12 -19
  392. package/dist/kernel/client-ui-theme/lib/types/client/index.d.ts +1 -1
  393. package/dist/kernel/client-ui-theme/lib/types/client/index.js +3 -1
  394. package/dist/kernel/client-ui-theme/lib/types/client/styles.d.ts +7 -0
  395. package/dist/kernel/client-ui-theme/lib/types/client/styles.js +32 -0
  396. package/dist/kernel/client-ui-theme/lib/types/index.d.ts +4 -3
  397. package/dist/kernel/client-ui-theme/lib/types/index.js +7 -6
  398. package/dist/kernel/client-ui-theme/package.json +4 -6
  399. package/dist/kernel/client-ui-tool/lib/client.js +105 -65
  400. package/dist/kernel/client-ui-tool/lib/types/client/apply.d.ts +1 -2
  401. package/dist/kernel/client-ui-tool/lib/types/client/apply.js +6 -2
  402. package/dist/kernel/client-ui-tool/lib/types/client/contract/slots.d.ts +13 -3
  403. package/dist/kernel/client-ui-tool/lib/types/client/index.d.ts +1 -1
  404. package/dist/kernel/client-ui-tool/lib/types/client/tool/ToolCallTree.d.ts +1 -1
  405. package/dist/kernel/client-ui-tool/lib/types/client/tool/ToolCallTree.js +8 -6
  406. package/dist/kernel/client-ui-tool/lib/types/client/tool/ToolDetails.d.ts +2 -9
  407. package/dist/kernel/client-ui-tool/lib/types/client/tool/ToolDetails.js +4 -3
  408. package/dist/kernel/client-ui-tool/lib/types/client/tool/models/read-card-model.d.ts +4 -18
  409. package/dist/kernel/client-ui-tool/lib/types/client/tool/models/read-card-model.js +21 -4
  410. package/dist/kernel/client-ui-tool/lib/types/client/tool/models/tool-call-model.d.ts +2 -9
  411. package/dist/kernel/client-ui-tool/lib/types/client/tool/models/tool-call-model.js +22 -2
  412. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/GenericToolCard.d.ts +1 -1
  413. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/GenericToolCard.js +3 -3
  414. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/file-mutation-row.d.ts +1 -1
  415. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/file-mutation-row.js +2 -2
  416. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/read-row.d.ts +1 -1
  417. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/read-row.js +3 -3
  418. package/dist/kernel/client-ui-tool/package.json +4 -6
  419. package/dist/kernel/client-ui-trajectory/lib/client.js +144 -143
  420. package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-assistant-definition.js +2 -1
  421. package/dist/kernel/client-ui-trajectory/package.json +2 -4
  422. package/dist/kernel/client-ui-user-questions/lib/client.js +73 -36
  423. package/dist/kernel/client-ui-user-questions/lib/types/client/QuestionComposer.js +24 -6
  424. package/dist/kernel/client-ui-user-questions/package.json +12 -10
  425. package/dist/kernel/client-ui-workflow-run/lib/client.js +262 -87
  426. package/dist/kernel/client-ui-workflow-run/lib/types/client/WorkflowRunPanel.js +162 -23
  427. package/dist/kernel/client-ui-workflow-run/package.json +3 -7
  428. package/dist/kernel/client-ui-workspace/lib/client.js +96 -60
  429. package/dist/kernel/client-ui-workspace/lib/types/client/WorkspaceBrowser.d.ts +1 -1
  430. package/dist/kernel/client-ui-workspace/lib/types/client/WorkspaceBrowser.js +38 -6
  431. package/dist/kernel/client-ui-workspace/lib/types/client/contract/slots.d.ts +9 -7
  432. package/dist/kernel/client-ui-workspace/lib/types/client/index.js +4 -2
  433. package/dist/kernel/client-ui-workspace/lib/types/client/rows/Rows.d.ts +4 -1
  434. package/dist/kernel/client-ui-workspace/lib/types/client/rows/Rows.js +5 -3
  435. package/dist/kernel/client-ui-workspace/package.json +6 -4
  436. package/dist/kernel/client-web/lib/base.css +41 -0
  437. package/dist/kernel/client-web/lib/boot-page.module.css +104 -0
  438. package/dist/kernel/client-web/lib/index.js +154 -308
  439. package/dist/kernel/client-web/lib/invariant.js +2 -0
  440. package/dist/kernel/client-web/lib/types/boot-page.d.ts +46 -0
  441. package/dist/kernel/client-web/lib/types/boot-page.js +93 -0
  442. package/dist/kernel/client-web/lib/types/boot.d.ts +20 -33
  443. package/dist/kernel/client-web/lib/types/boot.js +76 -149
  444. package/dist/kernel/client-web/lib/types/index.d.ts +5 -11
  445. package/dist/kernel/client-web/lib/types/index.js +4 -10
  446. package/dist/kernel/client-web/lib/types/loader-status.d.ts +3 -51
  447. package/dist/kernel/client-web/lib/types/loader-status.js +0 -35
  448. package/dist/kernel/client-web/lib/types/platform.d.ts +3 -1
  449. package/dist/kernel/client-web/lib/types/platform.js +4 -3
  450. package/dist/kernel/client-web/lib/types/seed.js +0 -6
  451. package/dist/kernel/client-web/package.json +8 -15
  452. package/dist/kernel/cmdline/package.json +1 -1
  453. package/dist/kernel/code-runtime/package.json +1 -1
  454. package/dist/kernel/code-runtime-python/lib/index.js +413 -0
  455. package/dist/kernel/code-runtime-python/lib/invariant.js +24 -0
  456. package/dist/kernel/code-runtime-python/lib/types/index.d.ts +12 -0
  457. package/dist/kernel/code-runtime-python/lib/types/index.js +11 -0
  458. package/dist/kernel/code-runtime-python/lib/types/invariant.d.ts +16 -0
  459. package/dist/kernel/code-runtime-python/lib/types/invariant.js +23 -0
  460. package/dist/kernel/code-runtime-python/lib/types/protocol.d.ts +329 -0
  461. package/dist/kernel/code-runtime-python/lib/types/protocol.js +496 -0
  462. package/dist/kernel/{client-schema-form → code-runtime-python}/package.json +11 -14
  463. package/dist/kernel/code-runtime-python/py/protocol.py +138 -0
  464. package/dist/kernel/code-runtime-worker-thread/package.json +1 -1
  465. package/dist/kernel/command-compact/package.json +1 -1
  466. package/dist/kernel/command-feedback/package.json +1 -1
  467. package/dist/kernel/command-goal/lib/index.js +40 -6
  468. package/dist/kernel/command-goal/lib/types/index.js +35 -6
  469. package/dist/kernel/command-goal/package.json +2 -1
  470. package/dist/kernel/commands/lib/index.js +78 -21
  471. package/dist/kernel/commands/lib/typert.host.js +53 -9
  472. package/dist/kernel/commands/lib/typert.remote-client.d.ts +4 -3
  473. package/dist/kernel/commands/lib/typert.remote-client.js +18 -2
  474. package/dist/kernel/commands/lib/types/index.d.ts +20 -1
  475. package/dist/kernel/commands/lib/types/index.js +77 -20
  476. package/dist/kernel/commands/lib/types/types.d.ts +8 -0
  477. package/dist/kernel/commands/package.json +5 -1
  478. package/dist/kernel/compaction/package.json +1 -1
  479. package/dist/kernel/compaction-basic/package.json +1 -1
  480. package/dist/kernel/compaction-tool-result-pruner/package.json +1 -1
  481. package/dist/kernel/cordis/package.json +3 -1
  482. package/dist/kernel/cordis-client-runner/lib/client.js +171 -37
  483. package/dist/kernel/cordis-client-runner/lib/types/client/api-catalog.js +3 -3
  484. package/dist/kernel/cordis-client-runner/lib/types/client/slot-catalog.js +208 -30
  485. package/dist/kernel/cordis-client-runner/package.json +2 -5
  486. package/dist/kernel/cordis-host-runner/lib/index.js +28 -5
  487. package/dist/kernel/cordis-host-runner/lib/typert.host.js +54 -6
  488. package/dist/kernel/cordis-host-runner/lib/types/sandbox.d.ts +9 -3
  489. package/dist/kernel/cordis-host-runner/lib/types/sandbox.js +34 -6
  490. package/dist/kernel/cordis-host-runner/package.json +1 -1
  491. package/dist/kernel/cordis-plugin-group/package.json +3 -1
  492. package/dist/kernel/cordis-plugin-hmr/lib/types/index.js +1 -1
  493. package/dist/kernel/cordis-plugin-hmr/package.json +3 -1
  494. package/dist/kernel/cordis-plugin-include/lib/index.js +2 -2
  495. package/dist/kernel/cordis-plugin-include/lib/types/index.d.ts +2 -2
  496. package/dist/kernel/cordis-plugin-include/lib/types/index.js +2 -2
  497. package/dist/kernel/cordis-plugin-include/package.json +3 -1
  498. package/dist/kernel/cordis-plugin-loader/package.json +3 -1
  499. package/dist/kernel/cordis-plugin-logger-console/package.json +3 -1
  500. package/dist/kernel/cordis-plugin-timer/package.json +3 -1
  501. package/dist/kernel/cosmokit/package.json +3 -1
  502. package/dist/kernel/credentials/lib/index.js +104 -13
  503. package/dist/kernel/credentials/lib/invariant.js +3 -3
  504. package/dist/kernel/credentials/lib/types/index.d.ts +136 -7
  505. package/dist/kernel/credentials/lib/types/index.js +114 -15
  506. package/dist/kernel/credentials/lib/types/invariant.js +3 -3
  507. package/dist/kernel/credentials/lib/types/types.d.ts +58 -5
  508. package/dist/kernel/credentials/lib/types/types.js +4 -4
  509. package/dist/kernel/credentials/package.json +1 -1
  510. package/dist/kernel/credentials-local/lib/index.js +387 -29
  511. package/dist/kernel/credentials-local/lib/invariant.js +1 -1
  512. package/dist/kernel/credentials-local/lib/types/index.d.ts +57 -12
  513. package/dist/kernel/credentials-local/lib/types/index.js +445 -30
  514. package/dist/kernel/credentials-local/lib/types/invariant.js +1 -1
  515. package/dist/kernel/credentials-local/package.json +1 -1
  516. package/dist/kernel/e2b/package.json +1 -1
  517. package/dist/kernel/experimental-agent-team/lib/index.js +1728 -0
  518. package/dist/kernel/experimental-agent-team/lib/invariant.js +354 -0
  519. package/dist/kernel/experimental-agent-team/lib/types/activity.d.ts +23 -0
  520. package/dist/kernel/experimental-agent-team/lib/types/activity.js +85 -0
  521. package/dist/kernel/experimental-agent-team/lib/types/error.d.ts +13 -0
  522. package/dist/kernel/experimental-agent-team/lib/types/error.js +23 -0
  523. package/dist/kernel/experimental-agent-team/lib/types/fold.d.ts +44 -0
  524. package/dist/kernel/experimental-agent-team/lib/types/fold.js +243 -0
  525. package/dist/kernel/experimental-agent-team/lib/types/index.d.ts +115 -0
  526. package/dist/kernel/experimental-agent-team/lib/types/index.js +205 -0
  527. package/dist/kernel/experimental-agent-team/lib/types/invariant.d.ts +9 -0
  528. package/dist/kernel/experimental-agent-team/lib/types/invariant.js +29 -0
  529. package/dist/kernel/experimental-agent-team/lib/types/journal.d.ts +39 -0
  530. package/dist/kernel/experimental-agent-team/lib/types/journal.js +59 -0
  531. package/dist/kernel/experimental-agent-team/lib/types/lifecycle.d.ts +33 -0
  532. package/dist/kernel/experimental-agent-team/lib/types/lifecycle.js +85 -0
  533. package/dist/kernel/experimental-agent-team/lib/types/mailbox.d.ts +79 -0
  534. package/dist/kernel/experimental-agent-team/lib/types/mailbox.js +303 -0
  535. package/dist/kernel/experimental-agent-team/lib/types/roster.d.ts +113 -0
  536. package/dist/kernel/experimental-agent-team/lib/types/roster.js +445 -0
  537. package/dist/kernel/experimental-agent-team/lib/types/session-message.d.ts +11 -0
  538. package/dist/kernel/experimental-agent-team/lib/types/session-message.js +23 -0
  539. package/dist/kernel/experimental-agent-team/lib/types/task-board.d.ts +62 -0
  540. package/dist/kernel/experimental-agent-team/lib/types/task-board.js +275 -0
  541. package/dist/kernel/experimental-agent-team/lib/types/task-graph.d.ts +21 -0
  542. package/dist/kernel/experimental-agent-team/lib/types/task-graph.js +62 -0
  543. package/dist/kernel/experimental-agent-team/lib/types/types.d.ts +192 -0
  544. package/dist/kernel/experimental-agent-team/lib/types/types.js +26 -0
  545. package/dist/kernel/experimental-agent-team/lib/types/validation.d.ts +16 -0
  546. package/dist/kernel/experimental-agent-team/lib/types/validation.js +33 -0
  547. package/dist/kernel/experimental-agent-team/package.json +62 -0
  548. package/dist/kernel/experimental-tool-agent-team/lib/index.js +555 -0
  549. package/dist/kernel/experimental-tool-agent-team/lib/invariant.js +13 -0
  550. package/dist/kernel/experimental-tool-agent-team/lib/types/index.d.ts +19 -0
  551. package/dist/kernel/experimental-tool-agent-team/lib/types/index.js +379 -0
  552. package/dist/kernel/experimental-tool-agent-team/lib/types/invariant.d.ts +9 -0
  553. package/dist/kernel/experimental-tool-agent-team/lib/types/invariant.js +11 -0
  554. package/dist/kernel/experimental-tool-agent-team/package.json +61 -0
  555. package/dist/kernel/file-reference/lib/index.js +138 -0
  556. package/dist/kernel/file-reference/lib/invariant.js +23 -0
  557. package/dist/kernel/file-reference/lib/typert.host.d.ts +3 -0
  558. package/dist/kernel/file-reference/lib/typert.host.js +436 -0
  559. package/dist/kernel/file-reference/lib/typert.remote-client.d.ts +26 -0
  560. package/dist/kernel/file-reference/lib/typert.remote-client.js +59 -0
  561. package/dist/kernel/file-reference/lib/types/grammar.d.ts +33 -0
  562. package/dist/kernel/file-reference/lib/types/grammar.js +43 -0
  563. package/dist/kernel/file-reference/lib/types/index.d.ts +42 -0
  564. package/dist/kernel/file-reference/lib/types/index.js +75 -0
  565. package/dist/kernel/file-reference/lib/types/invariant.d.ts +16 -0
  566. package/dist/kernel/file-reference/lib/types/invariant.js +22 -0
  567. package/dist/kernel/file-reference/lib/types/types.d.ts +13 -0
  568. package/dist/kernel/file-reference/lib/types/types.js +7 -0
  569. package/dist/kernel/file-reference/package.json +70 -0
  570. package/dist/kernel/file-reference-local/lib/index.js +327 -0
  571. package/dist/kernel/file-reference-local/lib/invariant.js +23 -0
  572. package/dist/kernel/file-reference-local/lib/types/index.d.ts +35 -0
  573. package/dist/kernel/file-reference-local/lib/types/index.js +105 -0
  574. package/dist/kernel/file-reference-local/lib/types/invariant.d.ts +16 -0
  575. package/dist/kernel/file-reference-local/lib/types/invariant.js +22 -0
  576. package/dist/kernel/file-reference-local/lib/types/search.d.ts +52 -0
  577. package/dist/kernel/file-reference-local/lib/types/search.js +258 -0
  578. package/dist/kernel/file-reference-local/package.json +58 -0
  579. package/dist/kernel/fs/package.json +1 -1
  580. package/dist/kernel/fs-e2b/package.json +1 -1
  581. package/dist/kernel/fs-local/package.json +1 -1
  582. package/dist/kernel/fs-observation-policy/package.json +1 -1
  583. package/dist/kernel/fs-sandbox/package.json +1 -1
  584. package/dist/kernel/goal/lib/index.js +5 -2
  585. package/dist/kernel/goal/lib/typert.host.js +27 -3
  586. package/dist/kernel/goal/lib/types/index.js +2 -2
  587. package/dist/kernel/goal/lib/types/types.d.ts +3 -0
  588. package/dist/kernel/goal/package.json +1 -1
  589. package/dist/kernel/goal-round-driver/package.json +1 -1
  590. package/dist/kernel/headless/package.json +1 -1
  591. package/dist/kernel/home-paths/package.json +1 -1
  592. package/dist/kernel/hook-protocol/package.json +1 -1
  593. package/dist/kernel/hooks-claude-code/package.json +1 -1
  594. package/dist/kernel/hooks-codex/package.json +1 -1
  595. package/dist/kernel/host-apiproxy/lib/index.js +25 -57
  596. package/dist/kernel/host-apiproxy/lib/types/api/host.d.ts +2 -0
  597. package/dist/kernel/host-apiproxy/lib/types/api/host.schema.d.ts +1 -0
  598. package/dist/kernel/host-apiproxy/lib/types/api/host.schema.js +1 -0
  599. package/dist/kernel/host-apiproxy/lib/types/api/sessions.d.ts +4 -0
  600. package/dist/kernel/host-apiproxy/lib/types/api/sessions.schema.js +1 -0
  601. package/dist/kernel/host-apiproxy/lib/types/api-proxy.js +15 -53
  602. package/dist/kernel/host-apiproxy/package.json +1 -1
  603. package/dist/kernel/host-directory-picker/package.json +1 -1
  604. package/dist/kernel/host-directory-picker-auto/package.json +1 -1
  605. package/dist/kernel/host-directory-picker-browse/package.json +1 -1
  606. package/dist/kernel/host-directory-picker-native/package.json +1 -1
  607. package/dist/kernel/host-frontend-static/lib/index.js +34 -26
  608. package/dist/kernel/host-frontend-static/lib/types/index.d.ts +10 -10
  609. package/dist/kernel/host-frontend-static/lib/types/index.js +38 -27
  610. package/dist/kernel/host-frontend-static/package.json +2 -2
  611. package/dist/kernel/host-plugin-inventory/package.json +1 -1
  612. package/dist/kernel/host-webserver/lib/index.js +102 -6
  613. package/dist/kernel/host-webserver/lib/types/index.d.ts +33 -5
  614. package/dist/kernel/host-webserver/lib/types/index.js +28 -5
  615. package/dist/kernel/host-webserver/lib/types/injections.d.ts +56 -0
  616. package/dist/kernel/host-webserver/lib/types/injections.js +82 -0
  617. package/dist/kernel/host-webserver/package.json +1 -1
  618. package/dist/kernel/invariants/package.json +1 -1
  619. package/dist/kernel/jobs/package.json +1 -1
  620. package/dist/kernel/jobs-local/package.json +1 -1
  621. package/dist/kernel/launch-environment/package.json +1 -1
  622. package/dist/kernel/llm/lib/index.js +247 -25
  623. package/dist/kernel/llm/lib/types/assembler.d.ts +10 -1
  624. package/dist/kernel/llm/lib/types/assembler.js +20 -1
  625. package/dist/kernel/llm/lib/types/content.d.ts +59 -0
  626. package/dist/kernel/llm/lib/types/content.js +149 -0
  627. package/dist/kernel/llm/lib/types/index.d.ts +24 -1
  628. package/dist/kernel/llm/lib/types/index.js +61 -8
  629. package/dist/kernel/llm/lib/types/retry-policy.d.ts +1 -1
  630. package/dist/kernel/llm/lib/types/retry-policy.js +6 -2
  631. package/dist/kernel/llm/package.json +1 -1
  632. package/dist/kernel/llm-deepseek/lib/index.js +1100 -70
  633. package/dist/kernel/llm-deepseek/lib/types/adapter.d.ts +69 -1
  634. package/dist/kernel/llm-deepseek/lib/types/adapter.js +296 -60
  635. package/dist/kernel/llm-deepseek/lib/types/file-id.d.ts +19 -0
  636. package/dist/kernel/llm-deepseek/lib/types/file-id.js +18 -0
  637. package/dist/kernel/llm-deepseek/lib/types/file-store.d.ts +83 -0
  638. package/dist/kernel/llm-deepseek/lib/types/file-store.js +261 -0
  639. package/dist/kernel/llm-deepseek/lib/types/files-api.d.ts +103 -0
  640. package/dist/kernel/llm-deepseek/lib/types/files-api.js +206 -0
  641. package/dist/kernel/llm-deepseek/lib/types/index.d.ts +31 -3
  642. package/dist/kernel/llm-deepseek/lib/types/index.js +139 -3
  643. package/dist/kernel/llm-deepseek/lib/types/serialize.d.ts +55 -6
  644. package/dist/kernel/llm-deepseek/lib/types/serialize.js +179 -23
  645. package/dist/kernel/llm-deepseek/lib/types/types.d.ts +28 -5
  646. package/dist/kernel/llm-deepseek/lib/types/upload-index.d.ts +68 -0
  647. package/dist/kernel/llm-deepseek/lib/types/upload-index.js +171 -0
  648. package/dist/kernel/llm-deepseek/package.json +9 -1
  649. package/dist/kernel/llm-pi-ai/lib/index.js +1758 -1171
  650. package/dist/kernel/llm-pi-ai/lib/types/adapter.d.ts +30 -5
  651. package/dist/kernel/llm-pi-ai/lib/types/adapter.js +43 -23
  652. package/dist/kernel/llm-pi-ai/lib/types/auth.d.ts +60 -0
  653. package/dist/kernel/llm-pi-ai/lib/types/auth.js +196 -0
  654. package/dist/kernel/llm-pi-ai/lib/types/catalog.d.ts +176 -38
  655. package/dist/kernel/llm-pi-ai/lib/types/catalog.js +245 -50
  656. package/dist/kernel/llm-pi-ai/lib/types/config.d.ts +37 -5
  657. package/dist/kernel/llm-pi-ai/lib/types/config.js +67 -2
  658. package/dist/kernel/llm-pi-ai/lib/types/context.d.ts +8 -3
  659. package/dist/kernel/llm-pi-ai/lib/types/context.js +60 -16
  660. package/dist/kernel/llm-pi-ai/lib/types/index.d.ts +1 -0
  661. package/dist/kernel/llm-pi-ai/lib/types/index.js +21 -19
  662. package/dist/kernel/llm-pi-ai/lib/types/login.d.ts +21 -0
  663. package/dist/kernel/llm-pi-ai/lib/types/login.js +154 -0
  664. package/dist/kernel/llm-pi-ai/lib/types/stream.js +4 -0
  665. package/dist/kernel/llm-pi-ai/package.json +3 -1
  666. package/dist/kernel/llm-retry/package.json +1 -1
  667. package/dist/kernel/lsp/package.json +1 -1
  668. package/dist/kernel/lsp-stdio/package.json +1 -1
  669. package/dist/kernel/manifest.json +10 -2
  670. package/dist/kernel/mcp-client/package.json +1 -1
  671. package/dist/kernel/message-feedback/package.json +1 -1
  672. package/dist/kernel/native-command/package.json +1 -1
  673. package/dist/kernel/node-addon-landlock-run/lib/index.js +1 -1
  674. package/dist/kernel/node-addon-landlock-run/package.json +4 -2
  675. package/dist/kernel/output-retention/package.json +1 -1
  676. package/dist/kernel/permission-presets/lib/index.js +14 -2
  677. package/dist/kernel/permission-presets/lib/types/index.d.ts +5 -0
  678. package/dist/kernel/permission-presets/lib/types/index.js +11 -2
  679. package/dist/kernel/permission-presets/package.json +1 -1
  680. package/dist/kernel/persona/package.json +1 -1
  681. package/dist/kernel/plan-mode/lib/index.js +49 -15
  682. package/dist/kernel/plan-mode/lib/types/index.d.ts +22 -0
  683. package/dist/kernel/plan-mode/lib/types/index.js +45 -19
  684. package/dist/kernel/plan-mode/lib/types/types.d.ts +5 -4
  685. package/dist/kernel/plan-mode/package.json +1 -1
  686. package/dist/kernel/pwsh-local/package.json +1 -1
  687. package/dist/kernel/pwsh-sandbox/package.json +1 -1
  688. package/dist/kernel/repeat-tool-reminder/lib/index.js +1 -1
  689. package/dist/kernel/repeat-tool-reminder/package.json +1 -1
  690. package/dist/kernel/sandbox/package.json +1 -1
  691. package/dist/kernel/sandbox-local/lib/index.js +8 -13
  692. package/dist/kernel/sandbox-local/lib/types/index.d.ts +1 -3
  693. package/dist/kernel/sandbox-local/lib/types/index.js +4 -7
  694. package/dist/kernel/sandbox-local/lib/types/profiles.js +1 -1
  695. package/dist/kernel/sandbox-local/package.json +1 -1
  696. package/dist/kernel/sandbox-policy/package.json +1 -1
  697. package/dist/kernel/sandbox-windows-acl/package.json +1 -1
  698. package/dist/kernel/schedule/package.json +1 -1
  699. package/dist/kernel/schemastery/package.json +3 -1
  700. package/dist/kernel/scope/package.json +1 -1
  701. package/dist/kernel/sdk-client/lib/index.js +2 -2
  702. package/dist/kernel/sdk-client/lib/types/api.js +2 -2
  703. package/dist/kernel/sdk-client/lib/types/types.d.ts +4 -4
  704. package/dist/kernel/sdk-client/package.json +1 -1
  705. package/dist/kernel/sdk-jsonrpc-server/lib/index.js +12 -5
  706. package/dist/kernel/sdk-jsonrpc-server/lib/types/index.js +7 -0
  707. package/dist/kernel/sdk-jsonrpc-server/lib/types/server.d.ts +2 -1
  708. package/dist/kernel/sdk-jsonrpc-server/lib/types/server.js +15 -6
  709. package/dist/kernel/sdk-jsonrpc-server/package.json +2 -1
  710. package/dist/kernel/sdk-protocol/package.json +1 -1
  711. package/dist/kernel/session/lib/index.js +4 -0
  712. package/dist/kernel/session/lib/types/known-event-types.js +4 -0
  713. package/dist/kernel/session/lib/types/types.d.ts +6 -1
  714. package/dist/kernel/session/package.json +1 -1
  715. package/dist/kernel/session-checkpoint-policy/package.json +1 -1
  716. package/dist/kernel/session-log-export/package.json +2 -5
  717. package/dist/kernel/session-persistence/lib/index.js +1 -1
  718. package/dist/kernel/session-persistence/lib/types/coordinator.js +2 -1
  719. package/dist/kernel/session-persistence/package.json +1 -1
  720. package/dist/kernel/session-persistence-jsonl/package.json +1 -1
  721. package/dist/kernel/session-persistence-sqlite/lib/index.js +1105 -375
  722. package/dist/kernel/session-persistence-sqlite/lib/invariant.js +2 -2
  723. package/dist/kernel/session-persistence-sqlite/lib/types/codec.d.ts +72 -0
  724. package/dist/kernel/session-persistence-sqlite/lib/types/codec.js +304 -0
  725. package/dist/kernel/session-persistence-sqlite/lib/types/compression.d.ts +46 -0
  726. package/dist/kernel/session-persistence-sqlite/lib/types/compression.js +234 -0
  727. package/dist/kernel/session-persistence-sqlite/lib/types/index.d.ts +22 -80
  728. package/dist/kernel/session-persistence-sqlite/lib/types/index.js +27 -278
  729. package/dist/kernel/session-persistence-sqlite/lib/types/invariant.js +2 -2
  730. package/dist/kernel/session-persistence-sqlite/lib/types/schema.d.ts +63 -85
  731. package/dist/kernel/session-persistence-sqlite/lib/types/schema.js +293 -159
  732. package/dist/kernel/session-persistence-sqlite/lib/types/sql.d.ts +15 -0
  733. package/dist/kernel/session-persistence-sqlite/lib/types/sql.js +57 -0
  734. package/dist/kernel/session-persistence-sqlite/lib/types/store.d.ts +66 -0
  735. package/dist/kernel/session-persistence-sqlite/lib/types/store.js +394 -0
  736. package/dist/kernel/session-persistence-sqlite/package.json +9 -3
  737. package/dist/kernel/session-persistence-sqlite/resources/sql/begin-immediate.sql +1 -0
  738. package/dist/kernel/session-persistence-sqlite/resources/sql/begin.sql +1 -0
  739. package/dist/kernel/session-persistence-sqlite/resources/sql/commit.sql +1 -0
  740. package/dist/kernel/session-persistence-sqlite/resources/sql/delete-events-from.sql +2 -0
  741. package/dist/kernel/session-persistence-sqlite/resources/sql/foreign-keys-on.sql +1 -0
  742. package/dist/kernel/session-persistence-sqlite/resources/sql/insert-event.sql +3 -0
  743. package/dist/kernel/session-persistence-sqlite/resources/sql/insert-persistence-state.sql +2 -0
  744. package/dist/kernel/session-persistence-sqlite/resources/sql/journal-mode-delete.sql +1 -0
  745. package/dist/kernel/session-persistence-sqlite/resources/sql/journal-mode-persist.sql +1 -0
  746. package/dist/kernel/session-persistence-sqlite/resources/sql/journal-mode-truncate.sql +1 -0
  747. package/dist/kernel/session-persistence-sqlite/resources/sql/journal-mode-wal.sql +1 -0
  748. package/dist/kernel/session-persistence-sqlite/resources/sql/mmap-off.sql +1 -0
  749. package/dist/kernel/session-persistence-sqlite/resources/sql/rollback.sql +1 -0
  750. package/dist/kernel/session-persistence-sqlite/resources/sql/schema.sql +30 -0
  751. package/dist/kernel/session-persistence-sqlite/resources/sql/select-application-id.sql +1 -0
  752. package/dist/kernel/session-persistence-sqlite/resources/sql/select-events-from.sql +4 -0
  753. package/dist/kernel/session-persistence-sqlite/resources/sql/select-events.sql +4 -0
  754. package/dist/kernel/session-persistence-sqlite/resources/sql/select-mmap-size.sql +1 -0
  755. package/dist/kernel/session-persistence-sqlite/resources/sql/select-packed-predecessors.sql +6 -0
  756. package/dist/kernel/session-persistence-sqlite/resources/sql/select-schema-objects.sql +4 -0
  757. package/dist/kernel/session-persistence-sqlite/resources/sql/select-session.sql +4 -0
  758. package/dist/kernel/session-persistence-sqlite/resources/sql/select-sessions.sql +3 -0
  759. package/dist/kernel/session-persistence-sqlite/resources/sql/select-store-id.sql +3 -0
  760. package/dist/kernel/session-persistence-sqlite/resources/sql/select-synchronous.sql +1 -0
  761. package/dist/kernel/session-persistence-sqlite/resources/sql/select-tail-events.sql +5 -0
  762. package/dist/kernel/session-persistence-sqlite/resources/sql/select-trusted-schema.sql +1 -0
  763. package/dist/kernel/session-persistence-sqlite/resources/sql/select-user-object-count.sql +3 -0
  764. package/dist/kernel/session-persistence-sqlite/resources/sql/select-user-version.sql +1 -0
  765. package/dist/kernel/session-persistence-sqlite/resources/sql/set-application-id.sql +1 -0
  766. package/dist/kernel/session-persistence-sqlite/resources/sql/set-user-version-17.sql +1 -0
  767. package/dist/kernel/session-persistence-sqlite/resources/sql/synchronous-full.sql +1 -0
  768. package/dist/kernel/session-persistence-sqlite/resources/sql/trusted-schema-off.sql +1 -0
  769. package/dist/kernel/session-persistence-sqlite/resources/sql/update-session-revision.sql +3 -0
  770. package/dist/kernel/session-persistence-sqlite/resources/sql/upsert-session.sql +13 -0
  771. package/dist/kernel/session-projection/lib/index.js +55 -30
  772. package/dist/kernel/session-projection/lib/types/index.d.ts +57 -34
  773. package/dist/kernel/session-projection/lib/types/index.js +61 -36
  774. package/dist/kernel/session-projection/lib/types/types.d.ts +11 -4
  775. package/dist/kernel/session-projection/package.json +1 -1
  776. package/dist/kernel/session-projection-cache/lib/index.js +1 -1
  777. package/dist/kernel/session-projection-cache/lib/types/index.d.ts +1 -1
  778. package/dist/kernel/session-projection-cache/lib/types/index.js +4 -5
  779. package/dist/kernel/session-projection-cache/package.json +1 -1
  780. package/dist/kernel/session-query/package.json +1 -1
  781. package/dist/kernel/session-query-sqlite/package.json +1 -1
  782. package/dist/kernel/session-reference/lib/index.js +232 -110
  783. package/dist/kernel/session-reference/lib/typert.host.d.ts +3 -0
  784. package/dist/kernel/session-reference/lib/typert.host.js +458 -0
  785. package/dist/kernel/session-reference/lib/typert.remote-client.d.ts +26 -0
  786. package/dist/kernel/session-reference/lib/typert.remote-client.js +62 -0
  787. package/dist/kernel/session-reference/lib/types/index.d.ts +25 -5
  788. package/dist/kernel/session-reference/lib/types/index.js +230 -126
  789. package/dist/kernel/session-reference/lib/types/types.d.ts +14 -3
  790. package/dist/kernel/session-reference/lib/types/types.js +6 -1
  791. package/dist/kernel/session-reference/package.json +23 -3
  792. package/dist/kernel/session-stats/lib/index.js +31 -12
  793. package/dist/kernel/session-stats/lib/types/projection.d.ts +64 -2
  794. package/dist/kernel/session-stats/lib/types/projection.js +31 -12
  795. package/dist/kernel/session-stats/package.json +1 -1
  796. package/dist/kernel/session-telemetry/package.json +1 -1
  797. package/dist/kernel/session-telemetry-otel/package.json +1 -1
  798. package/dist/kernel/session-title/lib/index.js +6 -2
  799. package/dist/kernel/session-title/lib/types/index.js +3 -2
  800. package/dist/kernel/session-title/lib/types/types.d.ts +3 -0
  801. package/dist/kernel/session-title/package.json +1 -1
  802. package/dist/kernel/session-title-all-prompts-llm/package.json +1 -1
  803. package/dist/kernel/session-title-first-prompt-llm/package.json +1 -1
  804. package/dist/kernel/session-title-llm/package.json +1 -1
  805. package/dist/kernel/settings/package.json +1 -1
  806. package/dist/kernel/settings-file/package.json +1 -1
  807. package/dist/kernel/shell/package.json +1 -1
  808. package/dist/kernel/shell-env/package.json +1 -1
  809. package/dist/kernel/skill/package.json +1 -1
  810. package/dist/kernel/skill-badge/assets/nomix-badge.md +6 -6
  811. package/dist/kernel/skill-badge/assets/nomix-badge.png +0 -0
  812. package/dist/kernel/skill-badge/lib/index.js +1 -1
  813. package/dist/kernel/skill-badge/lib/types/index.js +1 -1
  814. package/dist/kernel/skill-badge/package.json +1 -1
  815. package/dist/kernel/skill-filesystem/package.json +1 -1
  816. package/dist/kernel/spill/package.json +1 -1
  817. package/dist/kernel/spill-local/package.json +1 -1
  818. package/dist/kernel/spill-policy/package.json +1 -1
  819. package/dist/kernel/storage/package.json +1 -1
  820. package/dist/kernel/storage-domain/package.json +1 -1
  821. package/dist/kernel/storage-json/package.json +1 -1
  822. package/dist/kernel/storage-sqlite/package.json +1 -1
  823. package/dist/kernel/subagent/lib/index.js +123 -20
  824. package/dist/kernel/subagent/lib/types/continuation.d.ts +21 -2
  825. package/dist/kernel/subagent/lib/types/continuation.js +58 -7
  826. package/dist/kernel/subagent/lib/types/index.d.ts +11 -0
  827. package/dist/kernel/subagent/lib/types/index.js +16 -0
  828. package/dist/kernel/subagent/lib/types/out-of-process.d.ts +2 -0
  829. package/dist/kernel/subagent/lib/types/out-of-process.js +31 -1
  830. package/dist/kernel/subagent/lib/types/projection.d.ts +55 -8
  831. package/dist/kernel/subagent/lib/types/projection.js +30 -15
  832. package/dist/kernel/subagent/lib/types/run-settlement.js +10 -3
  833. package/dist/kernel/subagent/lib/types/types.d.ts +7 -0
  834. package/dist/kernel/subagent/package.json +1 -1
  835. package/dist/kernel/subagent-acp/package.json +1 -1
  836. package/dist/kernel/subagent-claude-code/cordis.patch.yml +6 -0
  837. package/dist/kernel/subagent-claude-code/lib/index.js +267 -73
  838. package/dist/kernel/subagent-claude-code/lib/types/index.d.ts +16 -6
  839. package/dist/kernel/subagent-claude-code/lib/types/index.js +35 -14
  840. package/dist/kernel/subagent-claude-code/lib/types/process.d.ts +5 -7
  841. package/dist/kernel/subagent-claude-code/lib/types/process.js +12 -24
  842. package/dist/kernel/subagent-claude-code/lib/types/run.d.ts +24 -7
  843. package/dist/kernel/subagent-claude-code/lib/types/run.js +266 -40
  844. package/dist/kernel/subagent-claude-code/package.json +10 -2
  845. package/dist/kernel/subagent-codex/cordis.patch.yml +5 -0
  846. package/dist/kernel/subagent-codex/lib/index.js +482 -91
  847. package/dist/kernel/subagent-codex/lib/types/index.d.ts +11 -6
  848. package/dist/kernel/subagent-codex/lib/types/index.js +33 -12
  849. package/dist/kernel/subagent-codex/lib/types/run.d.ts +17 -8
  850. package/dist/kernel/subagent-codex/lib/types/run.js +235 -42
  851. package/dist/kernel/subagent-codex/lib/types/wire.d.ts +49 -1
  852. package/dist/kernel/subagent-codex/lib/types/wire.js +280 -33
  853. package/dist/kernel/subagent-codex/package.json +10 -5
  854. package/dist/kernel/subagent-fork-in-process/package.json +1 -1
  855. package/dist/kernel/subagent-in-process-driver/package.json +1 -1
  856. package/dist/kernel/subagent-nomix-sdk/package.json +1 -1
  857. package/dist/kernel/subagent-spawn-in-process/package.json +1 -1
  858. package/dist/kernel/subprocess/package.json +1 -1
  859. package/dist/kernel/subprocess-e2b/package.json +1 -1
  860. package/dist/kernel/subprocess-local/lib/index.js +303 -1
  861. package/dist/kernel/subprocess-local/lib/types/process-inspector.js +3 -0
  862. package/dist/kernel/subprocess-local/lib/types/terminal.d.ts +6 -1
  863. package/dist/kernel/subprocess-local/lib/types/terminal.js +78 -1
  864. package/dist/kernel/subprocess-local/lib/types/windows-inspector.d.ts +80 -0
  865. package/dist/kernel/subprocess-local/lib/types/windows-inspector.js +259 -0
  866. package/dist/kernel/subprocess-local/package.json +2 -1
  867. package/dist/kernel/system-prompt/package.json +1 -1
  868. package/dist/kernel/terminal/package.json +1 -1
  869. package/dist/kernel/terminal-bash/lib/index.js +85 -20
  870. package/dist/kernel/terminal-bash/lib/types/config.d.ts +29 -5
  871. package/dist/kernel/terminal-bash/lib/types/config.js +33 -3
  872. package/dist/kernel/terminal-bash/lib/types/index.d.ts +7 -0
  873. package/dist/kernel/terminal-bash/lib/types/index.js +65 -13
  874. package/dist/kernel/terminal-bash/package.json +2 -1
  875. package/dist/kernel/time-context/lib/index.js +1 -1
  876. package/dist/kernel/time-context/lib/invariant.js +1 -1
  877. package/dist/kernel/time-context/package.json +1 -1
  878. package/dist/kernel/timeout/package.json +1 -1
  879. package/dist/kernel/tmux-context/lib/index.js +1 -1
  880. package/dist/kernel/tmux-context/package.json +1 -1
  881. package/dist/kernel/token-meter/lib/index.js +77 -21
  882. package/dist/kernel/token-meter/lib/types/breakdown-projection.d.ts +76 -9
  883. package/dist/kernel/token-meter/lib/types/breakdown-projection.js +22 -6
  884. package/dist/kernel/token-meter/lib/types/usage-projection.d.ts +186 -25
  885. package/dist/kernel/token-meter/lib/types/usage-projection.js +44 -15
  886. package/dist/kernel/token-meter/package.json +1 -1
  887. package/dist/kernel/tool-ask-user/package.json +1 -1
  888. package/dist/kernel/tool-bash/package.json +1 -1
  889. package/dist/kernel/tool-bash-persistent/lib/index.js +15 -5
  890. package/dist/kernel/tool-bash-persistent/lib/types/index.js +23 -6
  891. package/dist/kernel/tool-bash-persistent/package.json +1 -1
  892. package/dist/kernel/tool-call-timeout-policy/package.json +1 -1
  893. package/dist/kernel/tool-cordis/lib/index.js +655 -83
  894. package/dist/kernel/tool-cordis/lib/types/api-catalog.js +439 -41
  895. package/dist/kernel/tool-cordis/package.json +1 -1
  896. package/dist/kernel/tool-fs/lib/index.js +80 -52
  897. package/dist/kernel/tool-fs/lib/types/read-image.d.ts +16 -12
  898. package/dist/kernel/tool-fs/lib/types/read-image.js +73 -29
  899. package/dist/kernel/tool-fs/package.json +1 -1
  900. package/dist/kernel/tool-fs-search/lib/index.js +11 -7
  901. package/dist/kernel/tool-fs-search/lib/types/search-core.d.ts +5 -6
  902. package/dist/kernel/tool-fs-search/lib/types/search-core.js +12 -7
  903. package/dist/kernel/tool-fs-search/package.json +1 -1
  904. package/dist/kernel/tool-goal/package.json +1 -1
  905. package/dist/kernel/tool-jobs/package.json +1 -1
  906. package/dist/kernel/tool-lsp/package.json +1 -1
  907. package/dist/kernel/tool-pwsh/package.json +1 -1
  908. package/dist/kernel/tool-pwsh-persistent/lib/index.js +407 -0
  909. package/dist/kernel/tool-pwsh-persistent/lib/invariant.js +24 -0
  910. package/dist/kernel/tool-pwsh-persistent/lib/types/index.d.ts +24 -0
  911. package/dist/kernel/tool-pwsh-persistent/lib/types/index.js +465 -0
  912. package/dist/kernel/tool-pwsh-persistent/lib/types/invariant.d.ts +16 -0
  913. package/dist/kernel/tool-pwsh-persistent/lib/types/invariant.js +23 -0
  914. package/dist/kernel/tool-pwsh-persistent/package.json +62 -0
  915. package/dist/kernel/tool-ralph/package.json +1 -1
  916. package/dist/kernel/tool-session-query/package.json +1 -1
  917. package/dist/kernel/tool-skill/package.json +1 -1
  918. package/dist/kernel/tool-str-replace-editor/package.json +1 -1
  919. package/dist/kernel/tool-subagent/lib/index.js +10 -8
  920. package/dist/kernel/tool-subagent/lib/types/index.js +15 -8
  921. package/dist/kernel/tool-subagent/package.json +1 -1
  922. package/dist/kernel/tool-subagent-control/package.json +1 -1
  923. package/dist/kernel/tool-subagent-report/lib/index.js +1 -1
  924. package/dist/kernel/tool-subagent-report/lib/types/index.d.ts +3 -3
  925. package/dist/kernel/tool-subagent-report/lib/types/index.js +1 -1
  926. package/dist/kernel/tool-subagent-report/package.json +1 -1
  927. package/dist/kernel/tool-terminal/package.json +1 -1
  928. package/dist/kernel/tool-todo/lib/index.js +5 -2
  929. package/dist/kernel/tool-todo/lib/types/index.js +2 -2
  930. package/dist/kernel/tool-todo/lib/types/types.d.ts +3 -0
  931. package/dist/kernel/tool-todo/package.json +1 -1
  932. package/dist/kernel/tool-web/lib/index.js +101 -26
  933. package/dist/kernel/tool-web/lib/types/index.d.ts +4 -2
  934. package/dist/kernel/tool-web/lib/types/index.js +5 -3
  935. package/dist/kernel/tool-web/lib/types/search.d.ts +23 -20
  936. package/dist/kernel/tool-web/lib/types/search.js +109 -20
  937. package/dist/kernel/tool-web/package.json +1 -1
  938. package/dist/kernel/tool-workflow/package.json +1 -1
  939. package/dist/kernel/tools/package.json +1 -1
  940. package/dist/kernel/typert-generator/lib/index.js +8 -3
  941. package/dist/kernel/typert-generator/lib/types/cordis-catalog.js +8 -3
  942. package/dist/kernel/typert-generator/package.json +1 -1
  943. package/dist/kernel/typert-loader/package.json +1 -1
  944. package/dist/kernel/typert-protocol/package.json +1 -1
  945. package/dist/kernel/typert-registry/package.json +1 -1
  946. package/dist/kernel/user-approval/package.json +1 -1
  947. package/dist/kernel/user-questions/package.json +1 -1
  948. package/dist/kernel/web/lib/types/types.d.ts +4 -3
  949. package/dist/kernel/web/package.json +1 -1
  950. package/dist/kernel/web-app/cordis.patch.yml +27 -6
  951. package/dist/kernel/web-app/lib/index.js +111 -15
  952. package/dist/kernel/web-app/lib/startup.js +4 -2
  953. package/dist/kernel/web-app/lib/types/index.d.ts +8 -4
  954. package/dist/kernel/web-app/lib/types/index.js +116 -23
  955. package/dist/kernel/web-app/lib/types/startup.d.ts +3 -1
  956. package/dist/kernel/web-app/lib/types/startup.js +4 -1
  957. package/dist/kernel/web-app/package.json +12 -2
  958. package/dist/kernel/web-fetch-http/lib/index.js +1 -1
  959. package/dist/kernel/web-fetch-http/lib/types/index.d.ts +1 -1
  960. package/dist/kernel/web-fetch-http/lib/types/index.js +1 -1
  961. package/dist/kernel/web-fetch-http/package.json +1 -1
  962. package/dist/kernel/web-frontend/dist/assets/index-BnapMmQ_.css +1 -0
  963. package/dist/kernel/web-frontend/dist/assets/index-Dx7Ws_OC.js +96 -0
  964. package/dist/kernel/web-frontend/dist/assets/langs/{php-D-uCvoST.js → php-DDkx9sim.js} +2 -2
  965. package/dist/{assets/web/assets/langs/ruby-DEItuUFs.js → kernel/web-frontend/dist/assets/langs/ruby-DCxyoPen.js} +2 -2
  966. package/dist/kernel/web-frontend/dist/assets/{vendor-Cjbwl5VI.js → vendor-D22_Mp1f.js} +2 -2
  967. package/dist/kernel/web-frontend/dist/favicon.svg +8 -0
  968. package/dist/kernel/web-frontend/dist/index.html +5 -5
  969. package/dist/kernel/web-frontend/package.json +5 -8
  970. package/dist/kernel/web-search-deepseek/lib/index.js +1 -1
  971. package/dist/kernel/web-search-deepseek/lib/types/provider.js +1 -1
  972. package/dist/kernel/web-search-deepseek/package.json +1 -1
  973. package/dist/kernel/web-search-exa/lib/index.js +1 -1
  974. package/dist/kernel/web-search-exa/lib/types/provider.js +1 -1
  975. package/dist/kernel/web-search-exa/package.json +1 -1
  976. package/dist/kernel/web-search-perplexity/lib/index.js +1 -1
  977. package/dist/kernel/web-search-perplexity/lib/types/provider.js +1 -1
  978. package/dist/kernel/web-search-perplexity/package.json +1 -1
  979. package/dist/kernel/workflow/package.json +1 -1
  980. package/dist/kernel/workflow-worker-thread/package.json +1 -1
  981. package/dist/kernel/workspace/package.json +1 -1
  982. package/dist/plugins/manifest.json +50 -10
  983. package/dist/runtime/index.js +0 -2
  984. package/package.json +8 -6
  985. package/dist/assets/web/assets/index-B_fSXASy.css +0 -1
  986. package/dist/assets/web/assets/index-B_sZ-Gsu.js +0 -112
  987. package/dist/cli/builtin-registry.d.ts +0 -5
  988. package/dist/cli/profile-boot-CeU09iFc.js +0 -2
  989. package/dist/kernel/app-boot/lib/types/legacy-branding.d.ts +0 -6
  990. package/dist/kernel/app-boot/lib/types/legacy-branding.js +0 -18
  991. package/dist/kernel/client-schema-form/lib/index.js +0 -137
  992. package/dist/kernel/client-schema-form/lib/types/index.d.ts +0 -10
  993. package/dist/kernel/client-schema-form/lib/types/index.js +0 -9
  994. package/dist/kernel/client-schema-form/lib/types/model.d.ts +0 -66
  995. package/dist/kernel/client-schema-form/lib/types/model.js +0 -153
  996. package/dist/kernel/client-ui-subagent/lib/types/client/SubagentCatalogAction.d.ts +0 -18
  997. package/dist/kernel/client-ui-theme/lib/styles/base.css +0 -15
  998. package/dist/kernel/client-ui-theme/lib/styles/design-platform.css +0 -338
  999. package/dist/kernel/client-ui-theme/lib/styles/gradient-shadow-text.css +0 -232
  1000. package/dist/kernel/client-ui-theme/lib/styles/scrollbar.css +0 -90
  1001. package/dist/kernel/client-ui-theme/lib/styles/shiki.css +0 -31
  1002. package/dist/kernel/client-web/lib/types/AppRoot.d.ts +0 -16
  1003. package/dist/kernel/client-web/lib/types/AppRoot.js +0 -27
  1004. package/dist/kernel/client-web/lib/types/DocumentTitle.js +0 -16
  1005. package/dist/kernel/client-web/lib/types/app-shell.d.ts +0 -28
  1006. package/dist/kernel/client-web/lib/types/app-shell.js +0 -27
  1007. package/dist/kernel/client-web/lib/types/app.d.ts +0 -21
  1008. package/dist/kernel/client-web-react/lib/index.js +0 -810
  1009. package/dist/kernel/client-web-react/lib/types/index.d.ts +0 -16
  1010. package/dist/kernel/client-web-react/lib/types/index.js +0 -6
  1011. package/dist/kernel/client-web-react/lib/types/use-invoke.d.ts +0 -9
  1012. package/dist/kernel/client-web-react/lib/types/use-invoke.js +0 -52
  1013. package/dist/kernel/skill-badge/assets/nomix-badge.svg +0 -8
  1014. package/dist/kernel/web-frontend/dist/assets/index-B_fSXASy.css +0 -1
  1015. package/dist/kernel/web-frontend/dist/assets/index-B_sZ-Gsu.js +0 -112
  1016. /package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/bind.js +0 -0
  1017. /package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/session-provider.js +0 -0
@@ -0,0 +1,248 @@
1
+ import { Service } from "../../cordis/lib/index.js";
2
+ import { HarnessError } from "../../llm/lib/index.js";
3
+ //#region lib/types/index.js
4
+ /**
5
+ * Service Definition for the authorization capability seam (`ctx.authorization`):
6
+ * obtaining a credential nobody can supply from configuration alone, because
7
+ * getting it requires a conversation with the human — open this page, paste
8
+ * that code, pick an account.
9
+ *
10
+ * The seam owns the conversation and the lifecycle; it never owns the protocol.
11
+ * A plugin that knows how to obtain its own credential registers a flow keyed
12
+ * by the `CredentialKey` that flow writes, and the flow talks to whatever
13
+ * surface started it through one neutral vocabulary of notices and prompts. So
14
+ * a second authorization protocol arrives as another flow rather than as
15
+ * another seam, and a surface that renders one flow renders all of them.
16
+ *
17
+ * ```ts
18
+ * const dispose = ctx.authorization.registerFlow({
19
+ * key: credentialKey('llm-pi-ai', 'openai-codex'),
20
+ * label: 'ChatGPT (Codex)',
21
+ * methods: [{ id: 'oauth', label: 'Sign in with ChatGPT' }],
22
+ * async run(session) {
23
+ * session.notify({ message: 'Continue in your browser', url })
24
+ * await commitThroughCredentials(await exchange(session.signal))
25
+ * },
26
+ * })
27
+ * ```
28
+ *
29
+ * @module @nomix-ai/nomix-authorization
30
+ */
31
+ /** Stable error taxonomy for authorization failures. */
32
+ var AuthorizationError = class extends HarnessError {
33
+ constructor(message, code, options) {
34
+ super(message, code, options);
35
+ this.name = "AuthorizationError";
36
+ }
37
+ };
38
+ /**
39
+ * The rejection an {@link AuthorizationInteraction.prompt} uses to say the
40
+ * human declined — dismissed the question, chose not to answer — rather than
41
+ * that the surface broke. An attempt whose flow fails after a prompt was
42
+ * declined settles as `cancelled`, the same outcome as a withdrawn signal,
43
+ * because the human saying no is a refusal, not a breakage. Only a human's
44
+ * "no" may reject with this class: a prompt withdrawn by its own `signal` (a
45
+ * flow retiring the losing question of a race) must reject with something
46
+ * else, or a later genuine failure would be misread as a decline.
47
+ */
48
+ var AuthorizationDeclinedError = class extends AuthorizationError {
49
+ constructor(message = "the authorization prompt was declined") {
50
+ super(message, "DECLINED");
51
+ this.name = "AuthorizationDeclinedError";
52
+ }
53
+ };
54
+ /**
55
+ * `ctx.authorization`: a registry of credential-obtaining flows, one attempt at
56
+ * a time per key.
57
+ */
58
+ var AuthorizationService = class extends Service {
59
+ /** The commit this seam confirms is a credential-record write, so the store is required, not optional. */
60
+ static inject = ["credentials"];
61
+ flows = /* @__PURE__ */ new Map();
62
+ running = /* @__PURE__ */ new Map();
63
+ constructor(ctx) {
64
+ super(ctx, "authorization");
65
+ }
66
+ /**
67
+ * Offer a way to obtain one credential. One flow per key: two plugins
68
+ * claiming the same key would each write a record in their own format, and
69
+ * whichever ran last would leave the other reading a payload it cannot parse.
70
+ *
71
+ * @param flow - the key it writes, its label, its methods, and its runner.
72
+ * @returns Disposer that withdraws this flow.
73
+ * @throws {AuthorizationError} code `DUPLICATE_FLOW` when the key is already claimed.
74
+ */
75
+ registerFlow(flow) {
76
+ const dispose = this.ctx.effect(function* () {
77
+ if (this.flows.has(flow.key)) throw new AuthorizationError(`an authorization flow for "${flow.key}" is already registered`, "DUPLICATE_FLOW");
78
+ this.flows.set(flow.key, flow);
79
+ yield () => {
80
+ this.flows.delete(flow.key);
81
+ this.running.get(flow.key)?.controller.abort();
82
+ };
83
+ }.bind(this), "authorization.registerFlow()");
84
+ return () => void dispose();
85
+ }
86
+ /**
87
+ * Every registered flow, for a surface listing what can be authorized.
88
+ * @returns one entry per flow, in registration order.
89
+ */
90
+ list() {
91
+ return [...this.flows.values()].map((flow) => this.entry(flow));
92
+ }
93
+ /**
94
+ * One registered flow.
95
+ * @param key - the credential record to ask about.
96
+ * @returns the entry, or undefined when no flow claims that key.
97
+ */
98
+ describe(key) {
99
+ const flow = this.flows.get(key);
100
+ return flow === void 0 ? void 0 : this.entry(flow);
101
+ }
102
+ /** The public view of one registered flow. */
103
+ entry(flow) {
104
+ return {
105
+ key: flow.key,
106
+ label: flow.label,
107
+ methods: flow.methods,
108
+ inFlight: this.running.has(flow.key)
109
+ };
110
+ }
111
+ /**
112
+ * Withdraw the attempt running for a key, if any. Separate from the
113
+ * request's own signal because a request/response transport answers a Cancel
114
+ * button on a second call, with no handle on the first one's signal.
115
+ * @param key - the credential record whose attempt should stop.
116
+ */
117
+ cancel(key) {
118
+ this.running.get(key)?.controller.abort();
119
+ }
120
+ /**
121
+ * Run one attempt to authorize a key, and report how it ended.
122
+ *
123
+ * One attempt per key at a time. A second caller is refused rather than
124
+ * joined: the two would be prompting different humans through the same flow,
125
+ * and the second would answer questions the first was asked.
126
+ *
127
+ * @param request - the key, the method, the surface, and the cancel signal.
128
+ * @returns `authorized` once the flow's record is committed during this
129
+ * attempt and observed, or `cancelled` when the human declined or the
130
+ * caller withdrew.
131
+ * @throws {AuthorizationError} code `NO_FLOW` when nothing claims the key,
132
+ * `UNKNOWN_METHOD` when the named method is not one the flow offers,
133
+ * `ALREADY_IN_FLIGHT` when an attempt is already running for the key, or
134
+ * `NOT_COMMITTED` when the flow resolved without committing a record
135
+ * during the attempt.
136
+ */
137
+ async begin(request) {
138
+ const { key } = request;
139
+ const flow = this.flows.get(key);
140
+ if (flow === void 0) throw new AuthorizationError(`no authorization flow is registered for "${key}"`, "NO_FLOW");
141
+ const method = request.method ?? flow.methods[0].id;
142
+ if (!flow.methods.some((candidate) => candidate.id === method)) throw new AuthorizationError(`authorization flow for "${key}" offers no method "${method}"`, "UNKNOWN_METHOD");
143
+ if (this.running.has(key)) throw new AuthorizationError(`an authorization attempt for "${key}" is already running`, "ALREADY_IN_FLIGHT");
144
+ if (request.signal?.aborted === true) return { status: "cancelled" };
145
+ const controller = new AbortController();
146
+ const withdraw = () => {
147
+ controller.abort(request.signal?.reason);
148
+ };
149
+ request.signal?.addEventListener("abort", withdraw, { once: true });
150
+ this.running.set(key, { controller });
151
+ let settlement = "failed";
152
+ try {
153
+ const outcome = await this.attempt(flow, method, controller.signal, request.interaction);
154
+ settlement = outcome.status;
155
+ return outcome;
156
+ } finally {
157
+ request.signal?.removeEventListener("abort", withdraw);
158
+ this.running.delete(key);
159
+ this.settle(key, settlement);
160
+ }
161
+ }
162
+ /**
163
+ * Fan `authorization/settled` out with contained listener failures: every
164
+ * listener runs, and a sync throw or async rejection is logged without
165
+ * changing the finished attempt's own outcome — except `INVARIANT`-coded
166
+ * failures, which rethrow after every listener ran. The attempt is already
167
+ * over and its key released when this fires, so a broken watcher (that
168
+ * second browser tab) can never turn the caller's settled result into a
169
+ * failure of its own.
170
+ */
171
+ settle(key, settlement) {
172
+ let invariantFailure;
173
+ const args = [
174
+ "authorization/settled",
175
+ key,
176
+ settlement
177
+ ];
178
+ for (const listener of this.ctx.events.dispatch("emit", args)) try {
179
+ const returned = listener(key, settlement);
180
+ if (returned != null && typeof returned.then === "function") Promise.resolve(returned).then(void 0, (error) => {
181
+ this.warnSettledListenerFailure(key, error);
182
+ });
183
+ } catch (error) {
184
+ if (error?.code === "INVARIANT") {
185
+ invariantFailure ??= error;
186
+ continue;
187
+ }
188
+ this.warnSettledListenerFailure(key, error);
189
+ }
190
+ if (invariantFailure !== void 0) throw invariantFailure;
191
+ }
192
+ /** Contained-listener diagnostic shared by the sync and async failure paths. */
193
+ warnSettledListenerFailure(key, error) {
194
+ this.ctx.logger.warn("authorization: an authorization/settled listener for \"%s\" failed", key);
195
+ this.ctx.logger.warn(error);
196
+ }
197
+ /** Run the flow, then hold it to its half of the commit contract. */
198
+ async attempt(flow, method, signal, interaction) {
199
+ const withdrawn = new Promise((resolve) => {
200
+ signal.addEventListener("abort", () => {
201
+ resolve("withdrawn");
202
+ }, { once: true });
203
+ });
204
+ const observed = {
205
+ declined: false,
206
+ committed: false
207
+ };
208
+ const unwatch = this.ctx.on("credentials/record-updated", (key) => {
209
+ if (key === flow.key) observed.committed = true;
210
+ });
211
+ try {
212
+ const running = flow.run({
213
+ method,
214
+ signal,
215
+ notify: (notice) => {
216
+ try {
217
+ interaction.notify(notice);
218
+ } catch (error) {
219
+ this.ctx.logger.warn("authorization: the interaction surface failed to render a notice");
220
+ this.ctx.logger.warn(error);
221
+ }
222
+ },
223
+ prompt: (prompt) => interaction.prompt(prompt).catch((error) => {
224
+ if (error instanceof AuthorizationDeclinedError) observed.declined = true;
225
+ throw error;
226
+ })
227
+ });
228
+ try {
229
+ if (await Promise.race([running.then(() => "ran"), withdrawn]) === "withdrawn") {
230
+ running.catch(() => {
231
+ this.ctx.logger.debug("authorization: withdrawn flow failed after the fact");
232
+ });
233
+ return { status: "cancelled" };
234
+ }
235
+ } catch (error) {
236
+ if (signal.aborted || observed.declined) return { status: "cancelled" };
237
+ throw error;
238
+ }
239
+ } finally {
240
+ unwatch();
241
+ }
242
+ if (!observed.committed) throw new AuthorizationError(`authorization flow for "${flow.key}" resolved without committing a credential record in this attempt`, "NOT_COMMITTED");
243
+ if (!(await this.ctx.credentials.describeRecord(flow.key)).configured) throw new AuthorizationError(`authorization flow for "${flow.key}" deleted its credential record instead of committing one`, "NOT_COMMITTED");
244
+ return { status: "authorized" };
245
+ }
246
+ };
247
+ //#endregion
248
+ export { AuthorizationDeclinedError, AuthorizationError, AuthorizationService, AuthorizationService as default };
@@ -0,0 +1,36 @@
1
+ //#region lib/types/invariant.js
2
+ /**
3
+ * Package-owned invariant companion for `@nomix-ai/nomix-authorization`.
4
+ * @module @nomix-ai/nomix-authorization/invariant
5
+ */
6
+ const PACKAGE_NAME = "@nomix-ai/nomix-authorization";
7
+ /** Cordis companion plugin name. */
8
+ const name = "authorization-invariant";
9
+ /** Service required before the companion can reserve package ownership. */
10
+ const inject = ["invariants"];
11
+ /**
12
+ * Install the single-flight release contract: `authorization/settled` names a
13
+ * finished attempt, and the seam admits one attempt per key, so the key must
14
+ * already be free when the event fires. A slot still held at settlement is
15
+ * unrecoverable — every later `begin()` for that key is refused as
16
+ * `ALREADY_IN_FLIGHT` until the process restarts — and it is invisible from the
17
+ * outside, because a wedged key looks exactly like a busy one.
18
+ */
19
+ const install = (ctx, fail) => {
20
+ ctx.on("authorization/settled", (key) => {
21
+ const authorization = ctx.get("authorization");
22
+ if (authorization === void 0) {
23
+ fail(`authorization/settled for "${key}" emitted without a live authorization service`);
24
+ return;
25
+ }
26
+ if (authorization.describe(key)?.inFlight === true) fail(`authorization/settled for "${key}" left the key in flight, wedging every later attempt`);
27
+ });
28
+ };
29
+ /**
30
+ * Register this package's invariant companion.
31
+ * @param ctx - Cordis context carrying the invariant service.
32
+ * @returns the installed registration's disposer after setup succeeds.
33
+ */
34
+ const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
35
+ //#endregion
36
+ export { apply, inject, name };
@@ -0,0 +1,223 @@
1
+ /**
2
+ * Service Definition for the authorization capability seam (`ctx.authorization`):
3
+ * obtaining a credential nobody can supply from configuration alone, because
4
+ * getting it requires a conversation with the human — open this page, paste
5
+ * that code, pick an account.
6
+ *
7
+ * The seam owns the conversation and the lifecycle; it never owns the protocol.
8
+ * A plugin that knows how to obtain its own credential registers a flow keyed
9
+ * by the `CredentialKey` that flow writes, and the flow talks to whatever
10
+ * surface started it through one neutral vocabulary of notices and prompts. So
11
+ * a second authorization protocol arrives as another flow rather than as
12
+ * another seam, and a surface that renders one flow renders all of them.
13
+ *
14
+ * ```ts
15
+ * const dispose = ctx.authorization.registerFlow({
16
+ * key: credentialKey('llm-pi-ai', 'openai-codex'),
17
+ * label: 'ChatGPT (Codex)',
18
+ * methods: [{ id: 'oauth', label: 'Sign in with ChatGPT' }],
19
+ * async run(session) {
20
+ * session.notify({ message: 'Continue in your browser', url })
21
+ * await commitThroughCredentials(await exchange(session.signal))
22
+ * },
23
+ * })
24
+ * ```
25
+ *
26
+ * @module @nomix-ai/nomix-authorization
27
+ */
28
+ import { Context, Service } from '../../../cordis/lib/index.js';
29
+ import type { CredentialKey } from '../../../credentials/lib/index.js';
30
+ import { HarnessError } from '../../../llm/lib/index.js';
31
+ import type { AuthorizationEntry, AuthorizationMethod, AuthorizationNotice, AuthorizationOutcome, AuthorizationPrompt, AuthorizationSettlement } from './types.ts';
32
+ export type { AuthorizationEntry, AuthorizationMethod, AuthorizationNotice, AuthorizationOutcome, AuthorizationPrompt, AuthorizationPromptOption, AuthorizationSettlement, AuthorizationStatus, } from './types.ts';
33
+ declare module '@nomix-ai/cordis' {
34
+ interface Context {
35
+ authorization: AuthorizationService;
36
+ }
37
+ interface Events {
38
+ /**
39
+ * One authorization attempt has finished and released its key. Fires for
40
+ * every terminal outcome, failures included, so a surface watching a key it
41
+ * did not start (a second browser tab) learns the attempt is over.
42
+ * @mode emit
43
+ * @param key - the credential record the finished attempt was authorizing.
44
+ * @param settlement - how it ended, including the `failed` case its caller sees as a thrown error.
45
+ */
46
+ 'authorization/settled'(key: CredentialKey, settlement: AuthorizationSettlement): void;
47
+ }
48
+ }
49
+ /** Stable error taxonomy for authorization failures. */
50
+ export declare class AuthorizationError extends HarnessError {
51
+ constructor(message: string, code: string, options?: ErrorOptions);
52
+ }
53
+ /**
54
+ * The rejection an {@link AuthorizationInteraction.prompt} uses to say the
55
+ * human declined — dismissed the question, chose not to answer — rather than
56
+ * that the surface broke. An attempt whose flow fails after a prompt was
57
+ * declined settles as `cancelled`, the same outcome as a withdrawn signal,
58
+ * because the human saying no is a refusal, not a breakage. Only a human's
59
+ * "no" may reject with this class: a prompt withdrawn by its own `signal` (a
60
+ * flow retiring the losing question of a race) must reject with something
61
+ * else, or a later genuine failure would be misread as a decline.
62
+ */
63
+ export declare class AuthorizationDeclinedError extends AuthorizationError {
64
+ constructor(message?: string);
65
+ }
66
+ /**
67
+ * What a running flow is given to talk to the human. Every member is scoped to
68
+ * one attempt: the flow neither knows nor chooses which surface is listening.
69
+ */
70
+ export interface AuthorizationSession {
71
+ /** The method id the caller picked, always one this flow declared. */
72
+ readonly method: string;
73
+ /** Aborted when the caller withdraws or `cancel()` is called for this key. */
74
+ readonly signal: AbortSignal;
75
+ /**
76
+ * Report progress, or tell the human what to do next. Fire-and-forget: a
77
+ * surface that cannot render a notice must not stall the flow.
78
+ * @param notice - the message, and any page or code it refers to.
79
+ */
80
+ notify(notice: AuthorizationNotice): void;
81
+ /**
82
+ * Ask the human a question the flow cannot answer for itself.
83
+ * @param prompt - what to ask, and how it should be presented.
84
+ * @returns what the human typed, or the chosen option's id.
85
+ * @throws when the human declines, or the prompt's own signal withdraws it.
86
+ */
87
+ prompt(prompt: AuthorizationPrompt): Promise<string>;
88
+ }
89
+ /**
90
+ * A plugin's knowledge of how to obtain one credential. The flow owns the
91
+ * write: `run()` resolving means the record for `key` is committed through
92
+ * `ctx.credentials` during that run, which the seam confirms — a commit
93
+ * observed within the attempt, still present after it — before reporting
94
+ * success. Committing inside the flow is what lets a library that persists
95
+ * through its own store adapter (pi-ai's `Models.login()`) stay the single
96
+ * writer instead of being copied back out and written twice.
97
+ */
98
+ export interface AuthorizationFlow {
99
+ /** The credential record this flow writes. Its scope names the owning plugin. */
100
+ readonly key: CredentialKey;
101
+ /** User-facing name of what is being authorized. */
102
+ readonly label: string;
103
+ /**
104
+ * The methods offered, most preferred first; a caller naming none gets the
105
+ * first. Typed non-empty because a flow with nothing to run is a flow that
106
+ * cannot be begun, and the type says so at the one place flows are written.
107
+ */
108
+ readonly methods: readonly [AuthorizationMethod, ...AuthorizationMethod[]];
109
+ /**
110
+ * Run one attempt to obtain and commit the credential.
111
+ * @param session - the chosen method, the cancellation signal, and the interaction callbacks.
112
+ * @returns once the record is committed.
113
+ * @throws when the attempt fails or the human declines.
114
+ */
115
+ run(session: AuthorizationSession): Promise<void>;
116
+ }
117
+ /**
118
+ * The surface half of one attempt. Supplied with the request rather than
119
+ * registered, because the caller that starts an authorization is the one that
120
+ * can talk to the human about it: prompts reach exactly the page that asked,
121
+ * and a headless caller supplies an interaction that declines.
122
+ */
123
+ export interface AuthorizationInteraction {
124
+ /**
125
+ * Render a notice from the running flow.
126
+ * @param notice - the message, and any page or code it refers to.
127
+ */
128
+ notify(notice: AuthorizationNotice): void;
129
+ /**
130
+ * Put a question to the human and wait.
131
+ * @param prompt - what to ask, and how it should be presented.
132
+ * @returns the typed text, or the chosen option's id.
133
+ * @throws {AuthorizationDeclinedError} when the human declines; any other
134
+ * rejection reads as the surface failing, not as an answer.
135
+ */
136
+ prompt(prompt: AuthorizationPrompt): Promise<string>;
137
+ }
138
+ /** One request to authorize a key. */
139
+ export interface AuthorizationRequest {
140
+ /** The credential record to authorize; a flow must be registered for it. */
141
+ key: CredentialKey;
142
+ /** Which of the flow's methods to run. Defaults to the flow's first. */
143
+ method?: string;
144
+ /** The surface that will render this attempt's notices and prompts. */
145
+ interaction: AuthorizationInteraction;
146
+ /** Withdraws the whole attempt. */
147
+ signal?: AbortSignal;
148
+ }
149
+ /**
150
+ * `ctx.authorization`: a registry of credential-obtaining flows, one attempt at
151
+ * a time per key.
152
+ */
153
+ export declare class AuthorizationService extends Service {
154
+ /** The commit this seam confirms is a credential-record write, so the store is required, not optional. */
155
+ static inject: string[];
156
+ private readonly flows;
157
+ private readonly running;
158
+ constructor(ctx: Context);
159
+ /**
160
+ * Offer a way to obtain one credential. One flow per key: two plugins
161
+ * claiming the same key would each write a record in their own format, and
162
+ * whichever ran last would leave the other reading a payload it cannot parse.
163
+ *
164
+ * @param flow - the key it writes, its label, its methods, and its runner.
165
+ * @returns Disposer that withdraws this flow.
166
+ * @throws {AuthorizationError} code `DUPLICATE_FLOW` when the key is already claimed.
167
+ */
168
+ registerFlow(flow: AuthorizationFlow): () => void;
169
+ /**
170
+ * Every registered flow, for a surface listing what can be authorized.
171
+ * @returns one entry per flow, in registration order.
172
+ */
173
+ list(): readonly AuthorizationEntry[];
174
+ /**
175
+ * One registered flow.
176
+ * @param key - the credential record to ask about.
177
+ * @returns the entry, or undefined when no flow claims that key.
178
+ */
179
+ describe(key: CredentialKey): AuthorizationEntry | undefined;
180
+ /** The public view of one registered flow. */
181
+ private entry;
182
+ /**
183
+ * Withdraw the attempt running for a key, if any. Separate from the
184
+ * request's own signal because a request/response transport answers a Cancel
185
+ * button on a second call, with no handle on the first one's signal.
186
+ * @param key - the credential record whose attempt should stop.
187
+ */
188
+ cancel(key: CredentialKey): void;
189
+ /**
190
+ * Run one attempt to authorize a key, and report how it ended.
191
+ *
192
+ * One attempt per key at a time. A second caller is refused rather than
193
+ * joined: the two would be prompting different humans through the same flow,
194
+ * and the second would answer questions the first was asked.
195
+ *
196
+ * @param request - the key, the method, the surface, and the cancel signal.
197
+ * @returns `authorized` once the flow's record is committed during this
198
+ * attempt and observed, or `cancelled` when the human declined or the
199
+ * caller withdrew.
200
+ * @throws {AuthorizationError} code `NO_FLOW` when nothing claims the key,
201
+ * `UNKNOWN_METHOD` when the named method is not one the flow offers,
202
+ * `ALREADY_IN_FLIGHT` when an attempt is already running for the key, or
203
+ * `NOT_COMMITTED` when the flow resolved without committing a record
204
+ * during the attempt.
205
+ */
206
+ begin(request: AuthorizationRequest): Promise<AuthorizationOutcome>;
207
+ /**
208
+ * Fan `authorization/settled` out with contained listener failures: every
209
+ * listener runs, and a sync throw or async rejection is logged without
210
+ * changing the finished attempt's own outcome — except `INVARIANT`-coded
211
+ * failures, which rethrow after every listener ran. The attempt is already
212
+ * over and its key released when this fires, so a broken watcher (that
213
+ * second browser tab) can never turn the caller's settled result into a
214
+ * failure of its own.
215
+ */
216
+ private settle;
217
+ /** Contained-listener diagnostic shared by the sync and async failure paths. */
218
+ private warnSettledListenerFailure;
219
+ /** Run the flow, then hold it to its half of the commit contract. */
220
+ private attempt;
221
+ }
222
+ export default AuthorizationService;
223
+ //# sourceMappingURL=index.d.ts.map