@nomix-ai/nomix-harness 0.2.3 → 0.2.5

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 (1136) hide show
  1. package/dist/cli/builtin-registry.d.ts +1 -1
  2. package/dist/cli/builtin-registry.js +10 -0
  3. package/dist/cli/profile-boot.d.ts +2 -2
  4. package/dist/kernel/acp/lib/index.js +1 -1
  5. package/dist/kernel/acp/lib/types/content.d.ts +1 -1
  6. package/dist/kernel/acp/lib/types/index.d.ts +2 -2
  7. package/dist/kernel/acp/lib/types/index.js +1 -1
  8. package/dist/kernel/acp/lib/types/invariant.d.ts +1 -1
  9. package/dist/kernel/acp/package.json +1 -1
  10. package/dist/kernel/agent/lib/index.js +1 -1
  11. package/dist/kernel/agent/lib/types/dispatch.d.ts +1 -1
  12. package/dist/kernel/agent/lib/types/index.d.ts +1 -1
  13. package/dist/kernel/agent/lib/types/index.js +1 -1
  14. package/dist/kernel/agent/lib/types/invariant.d.ts +1 -1
  15. package/dist/kernel/agent/lib/types/model-selection.d.ts +1 -1
  16. package/dist/kernel/agent/lib/types/runtime-types.d.ts +1 -1
  17. package/dist/kernel/agent/package.json +1 -1
  18. package/dist/kernel/agent-default-model/lib/index.js +2 -2
  19. package/dist/kernel/agent-default-model/lib/types/index.d.ts +2 -2
  20. package/dist/kernel/agent-default-model/lib/types/index.js +2 -2
  21. package/dist/kernel/agent-default-model/lib/types/invariant.d.ts +1 -1
  22. package/dist/kernel/agent-default-model/package.json +1 -1
  23. package/dist/kernel/agent-instructions/lib/index.js +1 -1
  24. package/dist/kernel/agent-instructions/lib/types/config.d.ts +1 -1
  25. package/dist/kernel/agent-instructions/lib/types/config.js +1 -1
  26. package/dist/kernel/agent-instructions/lib/types/index.d.ts +1 -1
  27. package/dist/kernel/agent-instructions/lib/types/invariant.d.ts +1 -1
  28. package/dist/kernel/agent-instructions/package.json +1 -1
  29. package/dist/kernel/agent-loop/lib/index.js +2 -2
  30. package/dist/kernel/agent-loop/lib/types/agent.d.ts +1 -1
  31. package/dist/kernel/agent-loop/lib/types/index.d.ts +2 -2
  32. package/dist/kernel/agent-loop/lib/types/index.js +2 -2
  33. package/dist/kernel/agent-loop/lib/types/invariant.d.ts +1 -1
  34. package/dist/kernel/agent-loop/lib/types/runtime-context.d.ts +1 -1
  35. package/dist/kernel/agent-loop/lib/types/tool-calls.d.ts +1 -1
  36. package/dist/kernel/agent-loop/package.json +1 -1
  37. package/dist/kernel/agent-presets/lib/index.js +3 -3
  38. package/dist/kernel/agent-presets/lib/invariant.js +3 -3
  39. package/dist/kernel/agent-presets/lib/types/discovery.js +1 -1
  40. package/dist/kernel/agent-presets/lib/types/index.d.ts +2 -2
  41. package/dist/kernel/agent-presets/lib/types/index.js +2 -2
  42. package/dist/kernel/agent-presets/lib/types/invariant.d.ts +1 -1
  43. package/dist/kernel/agent-presets/lib/types/mount.d.ts +2 -2
  44. package/dist/kernel/agent-presets/lib/types/mount.js +2 -2
  45. package/dist/kernel/agent-presets/package.json +1 -1
  46. package/dist/kernel/agent-tool-presentation/lib/index.js +1 -1
  47. package/dist/kernel/agent-tool-presentation/lib/types/index.d.ts +2 -2
  48. package/dist/kernel/agent-tool-presentation/lib/types/index.js +1 -1
  49. package/dist/kernel/agent-tool-presentation/lib/types/invariant.d.ts +1 -1
  50. package/dist/kernel/agent-tool-presentation/package.json +1 -1
  51. package/dist/kernel/anonymous-user-id/lib/types/invariant.d.ts +1 -1
  52. package/dist/kernel/anonymous-user-id/package.json +1 -1
  53. package/dist/kernel/api-gateway/lib/index.js +1 -1
  54. package/dist/kernel/api-gateway/lib/types/client/index.d.ts +1 -1
  55. package/dist/kernel/api-gateway/lib/types/client/index.js +1 -1
  56. package/dist/kernel/api-gateway/lib/types/index.d.ts +1 -1
  57. package/dist/kernel/api-gateway/lib/types/index.js +1 -1
  58. package/dist/kernel/api-gateway/lib/types/invariant.d.ts +1 -1
  59. package/dist/kernel/api-gateway/package.json +1 -1
  60. package/dist/kernel/api-remotes/lib/types/agent-lookup.d.ts +1 -1
  61. package/dist/kernel/api-remotes/lib/types/client/index.d.ts +1 -1
  62. package/dist/kernel/api-remotes/lib/types/invariant.d.ts +1 -1
  63. package/dist/kernel/api-remotes/package.json +1 -1
  64. package/dist/kernel/app-boot/lib/index.js +4 -4
  65. package/dist/kernel/app-boot/lib/types/index.d.ts +3 -3
  66. package/dist/kernel/app-boot/lib/types/index.js +4 -4
  67. package/dist/kernel/app-boot/lib/types/invariant.d.ts +1 -1
  68. package/dist/kernel/app-boot/lib/types/profile.d.ts +2 -2
  69. package/dist/kernel/app-boot/lib/types/profile.js +2 -2
  70. package/dist/kernel/app-boot/package.json +1 -1
  71. package/dist/kernel/atomic-write/lib/types/invariant.d.ts +1 -1
  72. package/dist/kernel/atomic-write/package.json +1 -1
  73. package/dist/kernel/attachment/lib/index.js +1 -1
  74. package/dist/kernel/attachment/lib/types/index.d.ts +1 -1
  75. package/dist/kernel/attachment/lib/types/index.js +1 -1
  76. package/dist/kernel/attachment/lib/types/invariant.d.ts +1 -1
  77. package/dist/kernel/attachment/package.json +1 -1
  78. package/dist/kernel/attachment-local/lib/index.js +1 -1
  79. package/dist/kernel/attachment-local/lib/types/index.d.ts +2 -2
  80. package/dist/kernel/attachment-local/lib/types/index.js +1 -1
  81. package/dist/kernel/attachment-local/lib/types/invariant.d.ts +1 -1
  82. package/dist/kernel/attachment-local/package.json +1 -1
  83. package/dist/kernel/base/lib/types/invariant.d.ts +1 -1
  84. package/dist/kernel/base/package.json +1 -1
  85. package/dist/kernel/bash-local/lib/index.js +1 -1
  86. package/dist/kernel/bash-local/lib/types/index.d.ts +2 -2
  87. package/dist/kernel/bash-local/lib/types/index.js +1 -1
  88. package/dist/kernel/bash-local/lib/types/invariant.d.ts +1 -1
  89. package/dist/kernel/bash-local/package.json +1 -1
  90. package/dist/kernel/bash-sandbox/lib/types/index.d.ts +1 -1
  91. package/dist/kernel/bash-sandbox/lib/types/invariant.d.ts +1 -1
  92. package/dist/kernel/bash-sandbox/package.json +1 -1
  93. package/dist/kernel/brand/lib/types/invariant.d.ts +1 -1
  94. package/dist/kernel/brand/package.json +1 -1
  95. package/dist/kernel/client-connection/lib/index.js +2 -2
  96. package/dist/kernel/client-connection/lib/types/client/index.d.ts +1 -1
  97. package/dist/kernel/client-connection/lib/types/index.d.ts +2 -2
  98. package/dist/kernel/client-connection/lib/types/index.js +1 -1
  99. package/dist/kernel/client-connection/lib/types/invariant.d.ts +1 -1
  100. package/dist/kernel/client-connection/lib/types/rpc-host.d.ts +1 -1
  101. package/dist/kernel/client-connection/lib/types/rpc-host.js +1 -1
  102. package/dist/kernel/client-connection/package.json +1 -1
  103. package/dist/kernel/client-hmr/lib/index.js +1 -1
  104. package/dist/kernel/client-hmr/lib/types/client/index.d.ts +1 -1
  105. package/dist/kernel/client-hmr/lib/types/index.d.ts +2 -2
  106. package/dist/kernel/client-hmr/lib/types/index.js +1 -1
  107. package/dist/kernel/client-hmr/lib/types/invariant.d.ts +1 -1
  108. package/dist/kernel/client-hmr/package.json +1 -1
  109. package/dist/kernel/client-locale/lib/client.js +1 -1
  110. package/dist/kernel/client-locale/lib/index.js +1 -1
  111. package/dist/kernel/client-locale/lib/types/client/index.d.ts +1 -1
  112. package/dist/kernel/client-locale/lib/types/index.d.ts +1 -1
  113. package/dist/kernel/client-locale/lib/types/invariant.d.ts +1 -1
  114. package/dist/kernel/client-locale/lib/types/locale-settings.d.ts +1 -1
  115. package/dist/kernel/client-locale/lib/types/locale-settings.js +1 -1
  116. package/dist/kernel/client-locale/package.json +1 -1
  117. package/dist/kernel/client-modules/lib/index.js +1 -1
  118. package/dist/kernel/client-modules/lib/types/client/index.d.ts +1 -1
  119. package/dist/kernel/client-modules/lib/types/index.d.ts +2 -2
  120. package/dist/kernel/client-modules/lib/types/index.js +1 -1
  121. package/dist/kernel/client-modules/lib/types/invariant.d.ts +1 -1
  122. package/dist/kernel/client-modules/package.json +1 -1
  123. package/dist/kernel/client-runtime/lib/types/client/agents/scope.d.ts +1 -1
  124. package/dist/kernel/client-runtime/lib/types/client/agents/scope.js +1 -1
  125. package/dist/kernel/client-runtime/lib/types/client/contract/sessions.d.ts +1 -1
  126. package/dist/kernel/client-runtime/lib/types/client/conversation/definition-registry.d.ts +1 -1
  127. package/dist/kernel/client-runtime/lib/types/client/conversation/definition-registry.js +1 -1
  128. package/dist/kernel/client-runtime/lib/types/client/conversation/event-registry.d.ts +1 -1
  129. package/dist/kernel/client-runtime/lib/types/client/conversation/view-registry.d.ts +1 -1
  130. package/dist/kernel/client-runtime/lib/types/client/index.d.ts +1 -1
  131. package/dist/kernel/client-runtime/lib/types/client/sessions/remotes.d.ts +1 -1
  132. package/dist/kernel/client-runtime/lib/types/client/sessions/service.d.ts +1 -1
  133. package/dist/kernel/client-runtime/lib/types/client/sessions/session.d.ts +1 -1
  134. package/dist/kernel/client-runtime/lib/types/client/slots.d.ts +2 -2
  135. package/dist/kernel/client-runtime/lib/types/client/slots.js +1 -1
  136. package/dist/kernel/client-runtime/lib/types/client/workspaces/service.d.ts +1 -1
  137. package/dist/kernel/client-runtime/lib/types/invariant.d.ts +1 -1
  138. package/dist/kernel/client-runtime/package.json +1 -1
  139. package/dist/kernel/client-schema-form/lib/index.js +1 -1
  140. package/dist/kernel/client-schema-form/lib/types/invariant.d.ts +1 -1
  141. package/dist/kernel/client-schema-form/lib/types/model.d.ts +1 -1
  142. package/dist/kernel/client-schema-form/lib/types/model.js +1 -1
  143. package/dist/kernel/client-schema-form/package.json +1 -1
  144. package/dist/kernel/client-ui-agent-preset/lib/client.js +36 -36
  145. package/dist/kernel/client-ui-agent-preset/lib/types/invariant.d.ts +1 -1
  146. package/dist/kernel/client-ui-agent-preset/package.json +1 -1
  147. package/dist/kernel/client-ui-attachment/lib/types/invariant.d.ts +1 -1
  148. package/dist/kernel/client-ui-attachment/package.json +1 -1
  149. package/dist/kernel/client-ui-commands/lib/client.js +7 -7
  150. package/dist/kernel/client-ui-commands/lib/types/client/service.d.ts +2 -2
  151. package/dist/kernel/client-ui-commands/lib/types/client/service.js +1 -1
  152. package/dist/kernel/client-ui-commands/lib/types/invariant.d.ts +1 -1
  153. package/dist/kernel/client-ui-commands/package.json +1 -1
  154. package/dist/kernel/client-ui-conversation/lib/client.js +156 -156
  155. package/dist/kernel/client-ui-conversation/lib/index.js +1 -1
  156. package/dist/kernel/client-ui-conversation/lib/types/client/apply.d.ts +1 -1
  157. package/dist/kernel/client-ui-conversation/lib/types/client/chat/register-node-renderers.d.ts +1 -1
  158. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/assistant.d.ts +1 -1
  159. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/chat-snapshot-builder.d.ts +1 -1
  160. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/command.d.ts +1 -1
  161. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/compaction.d.ts +1 -1
  162. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/fallback.d.ts +1 -1
  163. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/inbox.d.ts +1 -1
  164. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/message.d.ts +1 -1
  165. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/register.d.ts +1 -1
  166. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/retry.d.ts +1 -1
  167. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/tool.d.ts +1 -1
  168. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/turn-error.d.ts +1 -1
  169. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/turn-max-tokens.d.ts +1 -1
  170. package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/turn-tail.d.ts +1 -1
  171. package/dist/kernel/client-ui-conversation/lib/types/client/queue/QueueDock.d.ts +1 -1
  172. package/dist/kernel/client-ui-conversation/lib/types/client/service.d.ts +2 -2
  173. package/dist/kernel/client-ui-conversation/lib/types/client/service.js +1 -1
  174. package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/TodoPanel.d.ts +1 -1
  175. package/dist/kernel/client-ui-conversation/lib/types/index.d.ts +1 -1
  176. package/dist/kernel/client-ui-conversation/lib/types/invariant.d.ts +1 -1
  177. package/dist/kernel/client-ui-conversation/lib/types/submission-settings.d.ts +1 -1
  178. package/dist/kernel/client-ui-conversation/lib/types/submission-settings.js +1 -1
  179. package/dist/kernel/client-ui-conversation/package.json +1 -1
  180. package/dist/kernel/client-ui-cordis/lib/client.js +48 -48
  181. package/dist/kernel/client-ui-cordis/lib/types/invariant.d.ts +1 -1
  182. package/dist/kernel/client-ui-cordis/package.json +1 -1
  183. package/dist/kernel/client-ui-deliverables/lib/client.js +4 -4
  184. package/dist/kernel/client-ui-deliverables/lib/types/index.d.ts +1 -1
  185. package/dist/kernel/client-ui-deliverables/lib/types/invariant.d.ts +1 -1
  186. package/dist/kernel/client-ui-deliverables/package.json +1 -1
  187. package/dist/kernel/client-ui-directory-picker-browse/lib/client.js +29 -29
  188. package/dist/kernel/client-ui-directory-picker-browse/lib/types/invariant.d.ts +1 -1
  189. package/dist/kernel/client-ui-directory-picker-browse/package.json +1 -1
  190. package/dist/kernel/client-ui-directory-picker-native/lib/types/invariant.d.ts +1 -1
  191. package/dist/kernel/client-ui-directory-picker-native/package.json +1 -1
  192. package/dist/kernel/client-ui-goal/lib/client.js +8 -8
  193. package/dist/kernel/client-ui-goal/lib/types/invariant.d.ts +1 -1
  194. package/dist/kernel/client-ui-goal/package.json +1 -1
  195. package/dist/kernel/client-ui-input-trigger/lib/client.js +7 -7
  196. package/dist/kernel/client-ui-input-trigger/lib/types/client/service.d.ts +2 -2
  197. package/dist/kernel/client-ui-input-trigger/lib/types/client/service.js +1 -1
  198. package/dist/kernel/client-ui-input-trigger/lib/types/invariant.d.ts +1 -1
  199. package/dist/kernel/client-ui-input-trigger/package.json +1 -1
  200. package/dist/kernel/client-ui-jobs/lib/client.js +8 -8
  201. package/dist/kernel/client-ui-jobs/lib/types/invariant.d.ts +1 -1
  202. package/dist/kernel/client-ui-jobs/package.json +1 -1
  203. package/dist/kernel/client-ui-layout/lib/client.js +2 -2
  204. package/dist/kernel/client-ui-layout/lib/types/invariant.d.ts +1 -1
  205. package/dist/kernel/client-ui-layout/package.json +1 -1
  206. package/dist/kernel/client-ui-message-feedback/lib/client.js +4 -4
  207. package/dist/kernel/client-ui-message-feedback/lib/types/invariant.d.ts +1 -1
  208. package/dist/kernel/client-ui-message-feedback/package.json +1 -1
  209. package/dist/kernel/client-ui-model-selection/lib/client.js +16 -16
  210. package/dist/kernel/client-ui-model-selection/lib/types/client/service.d.ts +2 -2
  211. package/dist/kernel/client-ui-model-selection/lib/types/client/service.js +1 -1
  212. package/dist/kernel/client-ui-model-selection/lib/types/invariant.d.ts +1 -1
  213. package/dist/kernel/client-ui-model-selection/package.json +1 -1
  214. package/dist/kernel/client-ui-permission-presets/lib/client.js +3 -3
  215. package/dist/kernel/client-ui-permission-presets/lib/types/invariant.d.ts +1 -1
  216. package/dist/kernel/client-ui-permission-presets/package.json +1 -1
  217. package/dist/kernel/client-ui-plan/lib/client.js +2 -2
  218. package/dist/kernel/client-ui-plan/lib/types/invariant.d.ts +1 -1
  219. package/dist/kernel/client-ui-plan/package.json +1 -1
  220. package/dist/kernel/client-ui-primitives/lib/types/invariant.d.ts +1 -1
  221. package/dist/kernel/client-ui-primitives/package.json +1 -1
  222. package/dist/kernel/client-ui-settings/lib/types/client/settings-scope.d.ts +2 -2
  223. package/dist/kernel/client-ui-settings/lib/types/client/settings-scope.js +1 -1
  224. package/dist/kernel/client-ui-settings/lib/types/invariant.d.ts +1 -1
  225. package/dist/kernel/client-ui-settings/package.json +1 -1
  226. package/dist/kernel/client-ui-settings-general/lib/client.js +16 -16
  227. package/dist/kernel/client-ui-settings-general/lib/index.js +1 -1
  228. package/dist/kernel/client-ui-settings-general/lib/types/index.d.ts +1 -1
  229. package/dist/kernel/client-ui-settings-general/lib/types/index.js +1 -1
  230. package/dist/kernel/client-ui-settings-general/lib/types/invariant.d.ts +1 -1
  231. package/dist/kernel/client-ui-settings-general/package.json +1 -1
  232. package/dist/kernel/client-ui-settings-models/lib/client.js +55 -55
  233. package/dist/kernel/client-ui-settings-models/lib/types/invariant.d.ts +1 -1
  234. package/dist/kernel/client-ui-settings-models/package.json +1 -1
  235. package/dist/kernel/client-ui-settings-plugin-inventory/lib/client.js +11 -11
  236. package/dist/kernel/client-ui-settings-plugin-inventory/lib/types/invariant.d.ts +1 -1
  237. package/dist/kernel/client-ui-settings-plugin-inventory/package.json +1 -1
  238. package/dist/kernel/client-ui-settings-plugins/lib/client.js +21 -21
  239. package/dist/kernel/client-ui-settings-plugins/lib/types/invariant.d.ts +1 -1
  240. package/dist/kernel/client-ui-settings-plugins/package.json +1 -1
  241. package/dist/kernel/client-ui-sidebar/lib/client.js +14 -14
  242. package/dist/kernel/client-ui-sidebar/lib/types/invariant.d.ts +1 -1
  243. package/dist/kernel/client-ui-sidebar/package.json +1 -1
  244. package/dist/kernel/client-ui-skill/lib/client.js +12 -12
  245. package/dist/kernel/client-ui-skill/lib/types/invariant.d.ts +1 -1
  246. package/dist/kernel/client-ui-skill/package.json +1 -1
  247. package/dist/kernel/client-ui-slots/lib/types/invariant.d.ts +1 -1
  248. package/dist/kernel/client-ui-slots/package.json +1 -1
  249. package/dist/kernel/client-ui-subagent/lib/client.js +17 -17
  250. package/dist/kernel/client-ui-subagent/lib/types/invariant.d.ts +1 -1
  251. package/dist/kernel/client-ui-subagent/package.json +1 -1
  252. package/dist/kernel/client-ui-theme/lib/client.js +3 -3
  253. package/dist/kernel/client-ui-theme/lib/index.js +1 -1
  254. package/dist/kernel/client-ui-theme/lib/types/client/index.d.ts +1 -1
  255. package/dist/kernel/client-ui-theme/lib/types/index.d.ts +1 -1
  256. package/dist/kernel/client-ui-theme/lib/types/invariant.d.ts +1 -1
  257. package/dist/kernel/client-ui-theme/lib/types/theme-settings.d.ts +1 -1
  258. package/dist/kernel/client-ui-theme/lib/types/theme-settings.js +1 -1
  259. package/dist/kernel/client-ui-theme/package.json +1 -1
  260. package/dist/kernel/client-ui-tool/lib/client.js +37 -37
  261. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/ask-question-row.d.ts +1 -1
  262. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/bash-sample.d.ts +1 -1
  263. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/file-mutation-row.d.ts +1 -1
  264. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/read-row.d.ts +1 -1
  265. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/search-row.d.ts +1 -1
  266. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/todo-row.d.ts +1 -1
  267. package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/web-row.d.ts +1 -1
  268. package/dist/kernel/client-ui-tool/lib/types/invariant.d.ts +1 -1
  269. package/dist/kernel/client-ui-tool/package.json +1 -1
  270. package/dist/kernel/client-ui-trajectory/lib/client.js +149 -149
  271. package/dist/kernel/client-ui-trajectory/lib/types/client/index.d.ts +1 -1
  272. package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-assistant-definition.d.ts +1 -1
  273. package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-compaction-definition.d.ts +1 -1
  274. package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-message-definitions.d.ts +1 -1
  275. package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-request-header-definition.d.ts +1 -1
  276. package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-snapshot-builder.d.ts +1 -1
  277. package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-tool-definition.d.ts +1 -1
  278. package/dist/kernel/client-ui-trajectory/lib/types/invariant.d.ts +1 -1
  279. package/dist/kernel/client-ui-trajectory/package.json +1 -1
  280. package/dist/kernel/client-ui-user-questions/lib/client.js +29 -29
  281. package/dist/kernel/client-ui-user-questions/lib/types/invariant.d.ts +1 -1
  282. package/dist/kernel/client-ui-user-questions/package.json +1 -1
  283. package/dist/kernel/client-ui-workflow-run/lib/client.js +16 -16
  284. package/dist/kernel/client-ui-workflow-run/lib/types/invariant.d.ts +1 -1
  285. package/dist/kernel/client-ui-workflow-run/package.json +1 -1
  286. package/dist/kernel/client-ui-workspace/lib/client.js +56 -56
  287. package/dist/kernel/client-ui-workspace/lib/types/invariant.d.ts +1 -1
  288. package/dist/kernel/client-ui-workspace/package.json +1 -1
  289. package/dist/kernel/client-web/lib/index.js +3 -3
  290. package/dist/kernel/client-web/lib/types/app-shell.d.ts +1 -1
  291. package/dist/kernel/client-web/lib/types/app.d.ts +1 -1
  292. package/dist/kernel/client-web/lib/types/boot.js +2 -2
  293. package/dist/kernel/client-web/lib/types/invariant.d.ts +1 -1
  294. package/dist/kernel/client-web/lib/types/loader-status.d.ts +1 -1
  295. package/dist/kernel/client-web/lib/types/seed.js +1 -1
  296. package/dist/kernel/client-web/package.json +1 -1
  297. package/dist/kernel/client-web-react/lib/types/invariant.d.ts +1 -1
  298. package/dist/kernel/client-web-react/package.json +1 -1
  299. package/dist/kernel/cmdline/lib/types/index.d.ts +1 -1
  300. package/dist/kernel/cmdline/lib/types/invariant.d.ts +1 -1
  301. package/dist/kernel/cmdline/package.json +1 -1
  302. package/dist/kernel/code-runtime/lib/index.js +1 -1
  303. package/dist/kernel/code-runtime/lib/types/index.d.ts +1 -1
  304. package/dist/kernel/code-runtime/lib/types/index.js +1 -1
  305. package/dist/kernel/code-runtime/lib/types/invariant.d.ts +1 -1
  306. package/dist/kernel/code-runtime/package.json +1 -1
  307. package/dist/kernel/code-runtime-worker-thread/lib/index.js +1 -1
  308. package/dist/kernel/code-runtime-worker-thread/lib/types/index.d.ts +2 -2
  309. package/dist/kernel/code-runtime-worker-thread/lib/types/index.js +1 -1
  310. package/dist/kernel/code-runtime-worker-thread/lib/types/invariant.d.ts +1 -1
  311. package/dist/kernel/code-runtime-worker-thread/package.json +1 -1
  312. package/dist/kernel/command-compact/lib/types/index.d.ts +1 -1
  313. package/dist/kernel/command-compact/lib/types/invariant.d.ts +1 -1
  314. package/dist/kernel/command-compact/package.json +1 -1
  315. package/dist/kernel/command-feedback/lib/types/index.d.ts +1 -1
  316. package/dist/kernel/command-feedback/lib/types/invariant.d.ts +1 -1
  317. package/dist/kernel/command-feedback/package.json +1 -1
  318. package/dist/kernel/command-goal/lib/types/index.d.ts +1 -1
  319. package/dist/kernel/command-goal/lib/types/invariant.d.ts +1 -1
  320. package/dist/kernel/command-goal/package.json +1 -1
  321. package/dist/kernel/commands/lib/types/index.d.ts +1 -1
  322. package/dist/kernel/commands/lib/types/invariant.d.ts +1 -1
  323. package/dist/kernel/commands/package.json +1 -1
  324. package/dist/kernel/compaction/lib/index.js +1 -1
  325. package/dist/kernel/compaction/lib/types/index.d.ts +1 -1
  326. package/dist/kernel/compaction/lib/types/index.js +1 -1
  327. package/dist/kernel/compaction/lib/types/invariant.d.ts +1 -1
  328. package/dist/kernel/compaction/package.json +1 -1
  329. package/dist/kernel/compaction-basic/lib/index.js +1 -1
  330. package/dist/kernel/compaction-basic/lib/types/index.d.ts +2 -2
  331. package/dist/kernel/compaction-basic/lib/types/index.js +1 -1
  332. package/dist/kernel/compaction-basic/lib/types/invariant.d.ts +1 -1
  333. package/dist/kernel/compaction-basic/lib/types/summarizer.d.ts +1 -1
  334. package/dist/kernel/compaction-basic/package.json +1 -1
  335. package/dist/kernel/compaction-tool-result-pruner/lib/index.js +2 -2
  336. package/dist/kernel/compaction-tool-result-pruner/lib/types/index.d.ts +2 -2
  337. package/dist/kernel/compaction-tool-result-pruner/lib/types/index.js +2 -2
  338. package/dist/kernel/compaction-tool-result-pruner/lib/types/invariant.d.ts +1 -1
  339. package/dist/kernel/compaction-tool-result-pruner/package.json +1 -1
  340. package/dist/kernel/cordis/bin.js +16 -0
  341. package/dist/kernel/cordis/lib/index.js +1828 -0
  342. package/dist/kernel/cordis/lib/types/context.d.ts +101 -0
  343. package/dist/kernel/cordis/lib/types/context.js +99 -0
  344. package/dist/kernel/cordis/lib/types/events.d.ts +240 -0
  345. package/dist/kernel/cordis/lib/types/events.js +199 -0
  346. package/dist/kernel/cordis/lib/types/fiber.d.ts +202 -0
  347. package/dist/kernel/cordis/lib/types/fiber.js +660 -0
  348. package/dist/kernel/cordis/lib/types/index.d.ts +15 -0
  349. package/dist/kernel/cordis/lib/types/index.js +15 -0
  350. package/dist/kernel/cordis/lib/types/logger.d.ts +105 -0
  351. package/dist/kernel/cordis/lib/types/logger.js +185 -0
  352. package/dist/kernel/cordis/lib/types/reflect.d.ts +186 -0
  353. package/dist/kernel/cordis/lib/types/reflect.js +310 -0
  354. package/dist/kernel/cordis/lib/types/registry.d.ts +201 -0
  355. package/dist/kernel/cordis/lib/types/registry.js +218 -0
  356. package/dist/kernel/cordis/lib/types/service.d.ts +55 -0
  357. package/dist/kernel/cordis/lib/types/service.js +113 -0
  358. package/dist/kernel/cordis/lib/types/utils.d.ts +62 -0
  359. package/dist/kernel/cordis/lib/types/utils.js +271 -0
  360. package/dist/kernel/cordis/package.json +49 -0
  361. package/dist/kernel/cordis-client-runner/lib/types/client/guard.d.ts +1 -1
  362. package/dist/kernel/cordis-client-runner/lib/types/client/guard.js +1 -1
  363. package/dist/kernel/cordis-client-runner/lib/types/client/index.d.ts +1 -1
  364. package/dist/kernel/cordis-client-runner/lib/types/client/inspect-registry.d.ts +1 -1
  365. package/dist/kernel/cordis-client-runner/lib/types/client/providers.d.ts +1 -1
  366. package/dist/kernel/cordis-client-runner/lib/types/client/runtime.d.ts +2 -2
  367. package/dist/kernel/cordis-client-runner/lib/types/client/timer.d.ts +2 -2
  368. package/dist/kernel/cordis-client-runner/lib/types/client/timer.js +1 -1
  369. package/dist/kernel/cordis-client-runner/lib/types/invariant.d.ts +1 -1
  370. package/dist/kernel/cordis-client-runner/package.json +1 -1
  371. package/dist/kernel/cordis-host-runner/lib/index.js +2 -2
  372. package/dist/kernel/cordis-host-runner/lib/types/guard.d.ts +2 -2
  373. package/dist/kernel/cordis-host-runner/lib/types/guard.js +1 -1
  374. package/dist/kernel/cordis-host-runner/lib/types/index.d.ts +3 -3
  375. package/dist/kernel/cordis-host-runner/lib/types/index.js +1 -1
  376. package/dist/kernel/cordis-host-runner/lib/types/inspect-registry.d.ts +2 -2
  377. package/dist/kernel/cordis-host-runner/lib/types/inspect-registry.js +1 -1
  378. package/dist/kernel/cordis-host-runner/lib/types/invariant.d.ts +1 -1
  379. package/dist/kernel/cordis-host-runner/lib/types/lifecycle.d.ts +1 -1
  380. package/dist/kernel/cordis-host-runner/lib/types/registry.d.ts +1 -1
  381. package/dist/kernel/cordis-host-runner/package.json +1 -1
  382. package/dist/kernel/cordis-plugin-group/lib/index.js +5 -0
  383. package/dist/kernel/cordis-plugin-group/lib/types/index.d.ts +3 -0
  384. package/dist/kernel/cordis-plugin-group/lib/types/index.js +3 -0
  385. package/dist/kernel/cordis-plugin-group/package.json +34 -0
  386. package/dist/kernel/cordis-plugin-hmr/lib/index.js +452 -0
  387. package/dist/kernel/cordis-plugin-hmr/lib/types/error.d.ts +4 -0
  388. package/dist/kernel/cordis-plugin-hmr/lib/types/error.js +33 -0
  389. package/dist/kernel/cordis-plugin-hmr/lib/types/index.d.ts +87 -0
  390. package/dist/kernel/cordis-plugin-hmr/lib/types/index.js +525 -0
  391. package/dist/kernel/cordis-plugin-hmr/package.json +57 -0
  392. package/dist/kernel/cordis-plugin-include/lib/index.js +284 -0
  393. package/dist/kernel/cordis-plugin-include/lib/types/index.d.ts +99 -0
  394. package/dist/kernel/cordis-plugin-include/lib/types/index.js +331 -0
  395. package/dist/kernel/cordis-plugin-include/package.json +38 -0
  396. package/dist/kernel/cordis-plugin-loader/lib/index.js +744 -0
  397. package/dist/kernel/cordis-plugin-loader/lib/types/config/entry.d.ts +56 -0
  398. package/dist/kernel/cordis-plugin-loader/lib/types/config/entry.js +283 -0
  399. package/dist/kernel/cordis-plugin-loader/lib/types/config/group.d.ts +27 -0
  400. package/dist/kernel/cordis-plugin-loader/lib/types/config/group.js +139 -0
  401. package/dist/kernel/cordis-plugin-loader/lib/types/config/isolate.d.ts +35 -0
  402. package/dist/kernel/cordis-plugin-loader/lib/types/config/isolate.js +151 -0
  403. package/dist/kernel/cordis-plugin-loader/lib/types/config/tree.d.ts +38 -0
  404. package/dist/kernel/cordis-plugin-loader/lib/types/config/tree.js +169 -0
  405. package/dist/kernel/cordis-plugin-loader/lib/types/config/utils.d.ts +11 -0
  406. package/dist/kernel/cordis-plugin-loader/lib/types/config/utils.js +28 -0
  407. package/dist/kernel/cordis-plugin-loader/lib/types/index.d.ts +73 -0
  408. package/dist/kernel/cordis-plugin-loader/lib/types/index.js +154 -0
  409. package/dist/kernel/cordis-plugin-loader/lib/types/internal.d.ts +97 -0
  410. package/dist/kernel/cordis-plugin-loader/lib/types/internal.js +36 -0
  411. package/dist/kernel/cordis-plugin-loader/package.json +42 -0
  412. package/dist/kernel/cordis-plugin-logger-console/lib/browser.js +80 -0
  413. package/dist/kernel/cordis-plugin-logger-console/lib/index.js +95 -0
  414. package/dist/kernel/cordis-plugin-logger-console/lib/types/browser.d.ts +10 -0
  415. package/dist/kernel/cordis-plugin-logger-console/lib/types/browser.js +14 -0
  416. package/dist/kernel/cordis-plugin-logger-console/lib/types/index.d.ts +15 -0
  417. package/dist/kernel/cordis-plugin-logger-console/lib/types/index.js +23 -0
  418. package/dist/kernel/cordis-plugin-logger-console/lib/types/shared.d.ts +45 -0
  419. package/dist/kernel/cordis-plugin-logger-console/lib/types/shared.js +73 -0
  420. package/dist/kernel/cordis-plugin-logger-console/package.json +40 -0
  421. package/dist/kernel/cordis-plugin-timer/lib/index.js +152 -0
  422. package/dist/kernel/cordis-plugin-timer/lib/types/index.d.ts +30 -0
  423. package/dist/kernel/cordis-plugin-timer/lib/types/index.js +134 -0
  424. package/dist/kernel/cordis-plugin-timer/package.json +36 -0
  425. package/dist/kernel/cosmokit/lib/index.js +325 -0
  426. package/dist/kernel/cosmokit/lib/types/array.d.ts +15 -0
  427. package/dist/kernel/cosmokit/lib/types/array.js +37 -0
  428. package/dist/kernel/cosmokit/lib/types/index.d.ts +11 -0
  429. package/dist/kernel/cosmokit/lib/types/index.js +11 -0
  430. package/dist/kernel/cosmokit/lib/types/misc.d.ts +41 -0
  431. package/dist/kernel/cosmokit/lib/types/misc.js +50 -0
  432. package/dist/kernel/cosmokit/lib/types/string.d.ts +89 -0
  433. package/dist/kernel/cosmokit/lib/types/string.js +79 -0
  434. package/dist/kernel/cosmokit/lib/types/time.d.ts +19 -0
  435. package/dist/kernel/cosmokit/lib/types/time.js +101 -0
  436. package/dist/kernel/cosmokit/lib/types/types.d.ts +34 -0
  437. package/dist/kernel/cosmokit/lib/types/types.js +141 -0
  438. package/dist/kernel/cosmokit/package.json +30 -0
  439. package/dist/kernel/credentials/lib/index.js +1 -1
  440. package/dist/kernel/credentials/lib/types/index.d.ts +1 -1
  441. package/dist/kernel/credentials/lib/types/index.js +1 -1
  442. package/dist/kernel/credentials/lib/types/invariant.d.ts +1 -1
  443. package/dist/kernel/credentials/package.json +1 -1
  444. package/dist/kernel/credentials-local/lib/index.js +2 -2
  445. package/dist/kernel/credentials-local/lib/types/index.d.ts +2 -2
  446. package/dist/kernel/credentials-local/lib/types/index.js +2 -2
  447. package/dist/kernel/credentials-local/lib/types/invariant.d.ts +1 -1
  448. package/dist/kernel/credentials-local/package.json +1 -1
  449. package/dist/kernel/e2b/lib/index.js +2 -2
  450. package/dist/kernel/e2b/lib/types/index.d.ts +2 -2
  451. package/dist/kernel/e2b/lib/types/index.js +2 -2
  452. package/dist/kernel/e2b/lib/types/invariant.d.ts +1 -1
  453. package/dist/kernel/e2b/package.json +1 -1
  454. package/dist/kernel/fs/lib/index.js +1 -1
  455. package/dist/kernel/fs/lib/types/index.d.ts +1 -1
  456. package/dist/kernel/fs/lib/types/index.js +1 -1
  457. package/dist/kernel/fs/lib/types/invariant.d.ts +1 -1
  458. package/dist/kernel/fs/package.json +1 -1
  459. package/dist/kernel/fs-e2b/lib/types/invariant.d.ts +1 -1
  460. package/dist/kernel/fs-e2b/package.json +1 -1
  461. package/dist/kernel/fs-local/lib/index.js +1 -1
  462. package/dist/kernel/fs-local/lib/types/index.d.ts +2 -2
  463. package/dist/kernel/fs-local/lib/types/index.js +1 -1
  464. package/dist/kernel/fs-local/lib/types/invariant.d.ts +1 -1
  465. package/dist/kernel/fs-local/package.json +1 -1
  466. package/dist/kernel/fs-observation-policy/lib/types/index.d.ts +1 -1
  467. package/dist/kernel/fs-observation-policy/lib/types/invariant.d.ts +1 -1
  468. package/dist/kernel/fs-observation-policy/package.json +1 -1
  469. package/dist/kernel/fs-sandbox/lib/types/index.d.ts +1 -1
  470. package/dist/kernel/fs-sandbox/lib/types/invariant.d.ts +1 -1
  471. package/dist/kernel/fs-sandbox/package.json +1 -1
  472. package/dist/kernel/goal/lib/index.js +1 -1
  473. package/dist/kernel/goal/lib/types/index.d.ts +2 -2
  474. package/dist/kernel/goal/lib/types/index.js +1 -1
  475. package/dist/kernel/goal/lib/types/invariant.d.ts +1 -1
  476. package/dist/kernel/goal/package.json +1 -1
  477. package/dist/kernel/goal-round-driver/lib/types/index.d.ts +1 -1
  478. package/dist/kernel/goal-round-driver/lib/types/invariant.d.ts +1 -1
  479. package/dist/kernel/goal-round-driver/package.json +1 -1
  480. package/dist/kernel/headless/lib/index.js +1 -1
  481. package/dist/kernel/headless/lib/types/index.d.ts +2 -2
  482. package/dist/kernel/headless/lib/types/index.js +1 -1
  483. package/dist/kernel/headless/lib/types/invariant.d.ts +1 -1
  484. package/dist/kernel/headless/lib/types/startup.d.ts +1 -1
  485. package/dist/kernel/headless/package.json +1 -1
  486. package/dist/kernel/home-paths/lib/types/invariant.d.ts +1 -1
  487. package/dist/kernel/home-paths/package.json +1 -1
  488. package/dist/kernel/hook-protocol/lib/types/invariant.d.ts +1 -1
  489. package/dist/kernel/hook-protocol/package.json +1 -1
  490. package/dist/kernel/hooks-claude-code/lib/index.js +1 -1
  491. package/dist/kernel/hooks-claude-code/lib/types/index.d.ts +2 -2
  492. package/dist/kernel/hooks-claude-code/lib/types/index.js +1 -1
  493. package/dist/kernel/hooks-claude-code/lib/types/invariant.d.ts +1 -1
  494. package/dist/kernel/hooks-claude-code/package.json +1 -1
  495. package/dist/kernel/hooks-codex/lib/index.js +1 -1
  496. package/dist/kernel/hooks-codex/lib/types/index.d.ts +2 -2
  497. package/dist/kernel/hooks-codex/lib/types/index.js +1 -1
  498. package/dist/kernel/hooks-codex/lib/types/invariant.d.ts +1 -1
  499. package/dist/kernel/hooks-codex/package.json +1 -1
  500. package/dist/kernel/host-apiproxy/lib/index.js +2 -2
  501. package/dist/kernel/host-apiproxy/lib/types/api-proxy.d.ts +1 -1
  502. package/dist/kernel/host-apiproxy/lib/types/index.d.ts +2 -2
  503. package/dist/kernel/host-apiproxy/lib/types/index.js +2 -2
  504. package/dist/kernel/host-apiproxy/lib/types/invariant.d.ts +1 -1
  505. package/dist/kernel/host-apiproxy/lib/types/session-export.d.ts +1 -1
  506. package/dist/kernel/host-apiproxy/package.json +1 -1
  507. package/dist/kernel/host-directory-picker/lib/index.js +1 -1
  508. package/dist/kernel/host-directory-picker/lib/types/index.d.ts +1 -1
  509. package/dist/kernel/host-directory-picker/lib/types/index.js +1 -1
  510. package/dist/kernel/host-directory-picker/lib/types/invariant.d.ts +1 -1
  511. package/dist/kernel/host-directory-picker/package.json +1 -1
  512. package/dist/kernel/host-directory-picker-auto/lib/types/index.d.ts +1 -1
  513. package/dist/kernel/host-directory-picker-auto/lib/types/invariant.d.ts +1 -1
  514. package/dist/kernel/host-directory-picker-auto/package.json +1 -1
  515. package/dist/kernel/host-directory-picker-browse/lib/index.js +1 -1
  516. package/dist/kernel/host-directory-picker-browse/lib/types/index.d.ts +2 -2
  517. package/dist/kernel/host-directory-picker-browse/lib/types/index.js +1 -1
  518. package/dist/kernel/host-directory-picker-browse/lib/types/invariant.d.ts +1 -1
  519. package/dist/kernel/host-directory-picker-browse/package.json +1 -1
  520. package/dist/kernel/host-directory-picker-native/lib/types/invariant.d.ts +1 -1
  521. package/dist/kernel/host-directory-picker-native/package.json +1 -1
  522. package/dist/kernel/host-frontend-static/lib/index.js +1 -1
  523. package/dist/kernel/host-frontend-static/lib/types/index.d.ts +2 -2
  524. package/dist/kernel/host-frontend-static/lib/types/index.js +1 -1
  525. package/dist/kernel/host-frontend-static/lib/types/invariant.d.ts +1 -1
  526. package/dist/kernel/host-frontend-static/package.json +1 -1
  527. package/dist/kernel/host-plugin-inventory/lib/types/index.d.ts +1 -1
  528. package/dist/kernel/host-plugin-inventory/lib/types/invariant.d.ts +1 -1
  529. package/dist/kernel/host-plugin-inventory/package.json +1 -1
  530. package/dist/kernel/host-webserver/lib/index.js +2 -2
  531. package/dist/kernel/host-webserver/lib/types/index.d.ts +2 -2
  532. package/dist/kernel/host-webserver/lib/types/index.js +2 -2
  533. package/dist/kernel/host-webserver/lib/types/invariant.d.ts +1 -1
  534. package/dist/kernel/host-webserver/package.json +1 -1
  535. package/dist/kernel/invariants/lib/index.js +2 -2
  536. package/dist/kernel/invariants/lib/types/index.d.ts +3 -3
  537. package/dist/kernel/invariants/lib/types/index.js +2 -2
  538. package/dist/kernel/invariants/lib/types/invariant.d.ts +1 -1
  539. package/dist/kernel/invariants/package.json +1 -1
  540. package/dist/kernel/jobs/lib/index.js +1 -1
  541. package/dist/kernel/jobs/lib/types/index.d.ts +1 -1
  542. package/dist/kernel/jobs/lib/types/index.js +1 -1
  543. package/dist/kernel/jobs/lib/types/invariant.d.ts +1 -1
  544. package/dist/kernel/jobs/package.json +1 -1
  545. package/dist/kernel/jobs-local/lib/index.js +1 -1
  546. package/dist/kernel/jobs-local/lib/types/index.d.ts +2 -2
  547. package/dist/kernel/jobs-local/lib/types/index.js +1 -1
  548. package/dist/kernel/jobs-local/lib/types/invariant.d.ts +1 -1
  549. package/dist/kernel/jobs-local/package.json +1 -1
  550. package/dist/kernel/launch-environment/lib/types/index.d.ts +1 -1
  551. package/dist/kernel/launch-environment/lib/types/invariant.d.ts +1 -1
  552. package/dist/kernel/launch-environment/package.json +1 -1
  553. package/dist/kernel/llm/lib/index.js +2 -2
  554. package/dist/kernel/llm/lib/types/index.d.ts +1 -1
  555. package/dist/kernel/llm/lib/types/index.js +1 -1
  556. package/dist/kernel/llm/lib/types/invariant.d.ts +1 -1
  557. package/dist/kernel/llm/lib/types/retry-policy.d.ts +1 -1
  558. package/dist/kernel/llm/lib/types/retry-policy.js +1 -1
  559. package/dist/kernel/llm/package.json +1 -1
  560. package/dist/kernel/llm-deepseek/lib/index.js +1 -1
  561. package/dist/kernel/llm-deepseek/lib/types/index.d.ts +2 -2
  562. package/dist/kernel/llm-deepseek/lib/types/index.js +1 -1
  563. package/dist/kernel/llm-deepseek/lib/types/invariant.d.ts +1 -1
  564. package/dist/kernel/llm-deepseek/package.json +1 -1
  565. package/dist/kernel/llm-pi-ai/lib/index.js +1 -1
  566. package/dist/kernel/llm-pi-ai/lib/types/config.d.ts +1 -1
  567. package/dist/kernel/llm-pi-ai/lib/types/config.js +1 -1
  568. package/dist/kernel/llm-pi-ai/lib/types/index.d.ts +1 -1
  569. package/dist/kernel/llm-pi-ai/lib/types/invariant.d.ts +1 -1
  570. package/dist/kernel/llm-pi-ai/package.json +1 -1
  571. package/dist/kernel/llm-retry/lib/index.js +1 -1
  572. package/dist/kernel/llm-retry/lib/types/index.d.ts +2 -2
  573. package/dist/kernel/llm-retry/lib/types/index.js +1 -1
  574. package/dist/kernel/llm-retry/lib/types/invariant.d.ts +1 -1
  575. package/dist/kernel/llm-retry/package.json +1 -1
  576. package/dist/kernel/lsp/lib/index.js +1 -1
  577. package/dist/kernel/lsp/lib/types/index.d.ts +1 -1
  578. package/dist/kernel/lsp/lib/types/index.js +1 -1
  579. package/dist/kernel/lsp/lib/types/invariant.d.ts +1 -1
  580. package/dist/kernel/lsp/package.json +1 -1
  581. package/dist/kernel/lsp-stdio/lib/index.js +1 -1
  582. package/dist/kernel/lsp-stdio/lib/types/index.d.ts +2 -2
  583. package/dist/kernel/lsp-stdio/lib/types/index.js +1 -1
  584. package/dist/kernel/lsp-stdio/lib/types/invariant.d.ts +1 -1
  585. package/dist/kernel/lsp-stdio/package.json +1 -1
  586. package/dist/kernel/manifest.json +11 -1
  587. package/dist/kernel/mcp-client/lib/index.js +1 -1
  588. package/dist/kernel/mcp-client/lib/types/connection.d.ts +1 -1
  589. package/dist/kernel/mcp-client/lib/types/index.d.ts +2 -2
  590. package/dist/kernel/mcp-client/lib/types/index.js +1 -1
  591. package/dist/kernel/mcp-client/lib/types/invariant.d.ts +1 -1
  592. package/dist/kernel/mcp-client/lib/types/tools.d.ts +1 -1
  593. package/dist/kernel/mcp-client/package.json +1 -1
  594. package/dist/kernel/message-feedback/lib/index.js +2 -2
  595. package/dist/kernel/message-feedback/lib/types/index.d.ts +2 -2
  596. package/dist/kernel/message-feedback/lib/types/index.js +2 -2
  597. package/dist/kernel/message-feedback/lib/types/invariant.d.ts +1 -1
  598. package/dist/kernel/message-feedback/package.json +1 -1
  599. package/dist/kernel/native-command/lib/types/invariant.d.ts +1 -1
  600. package/dist/kernel/native-command/package.json +1 -1
  601. package/dist/kernel/node-addon-landlock-run/lib/index.d.ts +71 -0
  602. package/dist/kernel/node-addon-landlock-run/lib/index.js +101 -0
  603. package/dist/kernel/node-addon-landlock-run/package.json +39 -0
  604. package/dist/kernel/output-retention/lib/types/invariant.d.ts +1 -1
  605. package/dist/kernel/output-retention/package.json +1 -1
  606. package/dist/kernel/permission-presets/lib/index.js +2 -2
  607. package/dist/kernel/permission-presets/lib/types/index.d.ts +2 -2
  608. package/dist/kernel/permission-presets/lib/types/index.js +2 -2
  609. package/dist/kernel/permission-presets/lib/types/invariant.d.ts +1 -1
  610. package/dist/kernel/permission-presets/package.json +1 -1
  611. package/dist/kernel/persona/lib/index.js +1 -1
  612. package/dist/kernel/persona/lib/types/index.d.ts +2 -2
  613. package/dist/kernel/persona/lib/types/index.js +1 -1
  614. package/dist/kernel/persona/lib/types/invariant.d.ts +1 -1
  615. package/dist/kernel/persona/package.json +1 -1
  616. package/dist/kernel/plan-mode/lib/index.js +1 -1
  617. package/dist/kernel/plan-mode/lib/types/index.d.ts +1 -1
  618. package/dist/kernel/plan-mode/lib/types/index.js +1 -1
  619. package/dist/kernel/plan-mode/lib/types/invariant.d.ts +1 -1
  620. package/dist/kernel/plan-mode/package.json +1 -1
  621. package/dist/kernel/pwsh-local/lib/index.js +1 -1
  622. package/dist/kernel/pwsh-local/lib/types/index.d.ts +2 -2
  623. package/dist/kernel/pwsh-local/lib/types/index.js +1 -1
  624. package/dist/kernel/pwsh-local/lib/types/invariant.d.ts +1 -1
  625. package/dist/kernel/pwsh-local/package.json +1 -1
  626. package/dist/kernel/pwsh-sandbox/lib/types/index.d.ts +1 -1
  627. package/dist/kernel/pwsh-sandbox/lib/types/invariant.d.ts +1 -1
  628. package/dist/kernel/pwsh-sandbox/package.json +1 -1
  629. package/dist/kernel/repeat-tool-reminder/lib/index.js +2 -2
  630. package/dist/kernel/repeat-tool-reminder/lib/types/index.d.ts +2 -2
  631. package/dist/kernel/repeat-tool-reminder/lib/types/index.js +1 -1
  632. package/dist/kernel/repeat-tool-reminder/lib/types/invariant.d.ts +1 -1
  633. package/dist/kernel/repeat-tool-reminder/package.json +1 -1
  634. package/dist/kernel/sandbox/lib/index.js +1 -1
  635. package/dist/kernel/sandbox/lib/types/index.d.ts +1 -1
  636. package/dist/kernel/sandbox/lib/types/index.js +1 -1
  637. package/dist/kernel/sandbox/lib/types/invariant.d.ts +1 -1
  638. package/dist/kernel/sandbox/package.json +1 -1
  639. package/dist/kernel/sandbox-local/lib/index.js +7 -5
  640. package/dist/kernel/sandbox-local/lib/types/index.d.ts +5 -3
  641. package/dist/kernel/sandbox-local/lib/types/index.js +8 -5
  642. package/dist/kernel/sandbox-local/lib/types/invariant.d.ts +1 -1
  643. package/dist/kernel/sandbox-local/lib/types/profiles.js +1 -1
  644. package/dist/kernel/sandbox-local/package.json +1 -1
  645. package/dist/kernel/sandbox-policy/lib/index.js +2 -2
  646. package/dist/kernel/sandbox-policy/lib/types/index.d.ts +2 -2
  647. package/dist/kernel/sandbox-policy/lib/types/index.js +2 -2
  648. package/dist/kernel/sandbox-policy/lib/types/invariant.d.ts +1 -1
  649. package/dist/kernel/sandbox-policy/package.json +1 -1
  650. package/dist/kernel/sandbox-windows-acl/lib/types/invariant.d.ts +1 -1
  651. package/dist/kernel/sandbox-windows-acl/package.json +1 -1
  652. package/dist/kernel/schedule/lib/types/index.d.ts +1 -1
  653. package/dist/kernel/schedule/lib/types/invariant.d.ts +1 -1
  654. package/dist/kernel/schedule/lib/types/persistence.d.ts +1 -1
  655. package/dist/kernel/schedule/lib/types/runtime.d.ts +1 -1
  656. package/dist/kernel/schedule/lib/types/tools.d.ts +1 -1
  657. package/dist/kernel/schedule/package.json +1 -1
  658. package/dist/kernel/schemastery/lib/index.cjs +596 -0
  659. package/dist/kernel/schemastery/lib/index.mjs +596 -0
  660. package/dist/kernel/schemastery/lib/types/index.d.ts +200 -0
  661. package/dist/kernel/schemastery/lib/types/index.js +714 -0
  662. package/dist/kernel/schemastery/package.json +37 -0
  663. package/dist/kernel/scope/lib/index.js +1 -1
  664. package/dist/kernel/scope/lib/types/index.d.ts +1 -1
  665. package/dist/kernel/scope/lib/types/index.js +1 -1
  666. package/dist/kernel/scope/lib/types/invariant.d.ts +1 -1
  667. package/dist/kernel/scope/lib/types/store.d.ts +1 -1
  668. package/dist/kernel/scope/package.json +1 -1
  669. package/dist/kernel/sdk-client/lib/types/invariant.d.ts +1 -1
  670. package/dist/kernel/sdk-client/package.json +1 -1
  671. package/dist/kernel/sdk-jsonrpc-server/lib/index.js +1 -1
  672. package/dist/kernel/sdk-jsonrpc-server/lib/types/index.d.ts +2 -2
  673. package/dist/kernel/sdk-jsonrpc-server/lib/types/index.js +1 -1
  674. package/dist/kernel/sdk-jsonrpc-server/lib/types/invariant.d.ts +1 -1
  675. package/dist/kernel/sdk-jsonrpc-server/lib/types/server.d.ts +1 -1
  676. package/dist/kernel/sdk-jsonrpc-server/package.json +1 -1
  677. package/dist/kernel/sdk-protocol/lib/types/invariant.d.ts +1 -1
  678. package/dist/kernel/sdk-protocol/package.json +1 -1
  679. package/dist/kernel/session/lib/index.js +1 -1
  680. package/dist/kernel/session/lib/types/index.d.ts +1 -1
  681. package/dist/kernel/session/lib/types/index.js +1 -1
  682. package/dist/kernel/session/lib/types/invariant.d.ts +1 -1
  683. package/dist/kernel/session/package.json +1 -1
  684. package/dist/kernel/session-checkpoint-policy/lib/types/index.d.ts +1 -1
  685. package/dist/kernel/session-checkpoint-policy/lib/types/invariant.d.ts +1 -1
  686. package/dist/kernel/session-checkpoint-policy/package.json +1 -1
  687. package/dist/kernel/session-log-export/lib/types/index.d.ts +1 -1
  688. package/dist/kernel/session-log-export/lib/types/invariant.d.ts +1 -1
  689. package/dist/kernel/session-log-export/package.json +1 -1
  690. package/dist/kernel/session-persistence/lib/index.js +1 -1
  691. package/dist/kernel/session-persistence/lib/types/coordinator.d.ts +1 -1
  692. package/dist/kernel/session-persistence/lib/types/index.d.ts +1 -1
  693. package/dist/kernel/session-persistence/lib/types/index.js +1 -1
  694. package/dist/kernel/session-persistence/lib/types/invariant.d.ts +1 -1
  695. package/dist/kernel/session-persistence/package.json +1 -1
  696. package/dist/kernel/session-persistence-jsonl/lib/index.js +1 -1
  697. package/dist/kernel/session-persistence-jsonl/lib/types/index.d.ts +2 -2
  698. package/dist/kernel/session-persistence-jsonl/lib/types/index.js +1 -1
  699. package/dist/kernel/session-persistence-jsonl/lib/types/invariant.d.ts +1 -1
  700. package/dist/kernel/session-persistence-jsonl/package.json +1 -1
  701. package/dist/kernel/session-persistence-sqlite/lib/index.js +1 -1
  702. package/dist/kernel/session-persistence-sqlite/lib/types/index.d.ts +2 -2
  703. package/dist/kernel/session-persistence-sqlite/lib/types/index.js +1 -1
  704. package/dist/kernel/session-persistence-sqlite/lib/types/invariant.d.ts +1 -1
  705. package/dist/kernel/session-persistence-sqlite/package.json +1 -1
  706. package/dist/kernel/session-projection/lib/index.js +1 -1
  707. package/dist/kernel/session-projection/lib/types/index.d.ts +1 -1
  708. package/dist/kernel/session-projection/lib/types/index.js +1 -1
  709. package/dist/kernel/session-projection/lib/types/invariant.d.ts +1 -1
  710. package/dist/kernel/session-projection/package.json +1 -1
  711. package/dist/kernel/session-projection-cache/lib/index.js +2 -2
  712. package/dist/kernel/session-projection-cache/lib/types/index.d.ts +2 -2
  713. package/dist/kernel/session-projection-cache/lib/types/index.js +2 -2
  714. package/dist/kernel/session-projection-cache/lib/types/invariant.d.ts +1 -1
  715. package/dist/kernel/session-projection-cache/package.json +1 -1
  716. package/dist/kernel/session-query/lib/index.js +1 -1
  717. package/dist/kernel/session-query/lib/types/corpus.d.ts +1 -1
  718. package/dist/kernel/session-query/lib/types/index.d.ts +1 -1
  719. package/dist/kernel/session-query/lib/types/index.js +1 -1
  720. package/dist/kernel/session-query/lib/types/invariant.d.ts +1 -1
  721. package/dist/kernel/session-query/package.json +1 -1
  722. package/dist/kernel/session-query-sqlite/lib/index.js +2 -2
  723. package/dist/kernel/session-query-sqlite/lib/types/index.d.ts +2 -2
  724. package/dist/kernel/session-query-sqlite/lib/types/index.js +2 -2
  725. package/dist/kernel/session-query-sqlite/lib/types/invariant.d.ts +1 -1
  726. package/dist/kernel/session-query-sqlite/package.json +1 -1
  727. package/dist/kernel/session-reference/lib/index.js +2 -2
  728. package/dist/kernel/session-reference/lib/types/index.d.ts +2 -2
  729. package/dist/kernel/session-reference/lib/types/index.js +2 -2
  730. package/dist/kernel/session-reference/lib/types/invariant.d.ts +1 -1
  731. package/dist/kernel/session-reference/package.json +1 -1
  732. package/dist/kernel/session-stats/lib/types/index.d.ts +1 -1
  733. package/dist/kernel/session-stats/lib/types/invariant.d.ts +1 -1
  734. package/dist/kernel/session-stats/package.json +1 -1
  735. package/dist/kernel/session-telemetry/lib/index.js +1 -1
  736. package/dist/kernel/session-telemetry/lib/types/coordinator.d.ts +1 -1
  737. package/dist/kernel/session-telemetry/lib/types/index.d.ts +1 -1
  738. package/dist/kernel/session-telemetry/lib/types/index.js +1 -1
  739. package/dist/kernel/session-telemetry/lib/types/invariant.d.ts +1 -1
  740. package/dist/kernel/session-telemetry/package.json +1 -1
  741. package/dist/kernel/session-telemetry-otel/lib/index.js +1 -1
  742. package/dist/kernel/session-telemetry-otel/lib/types/index.d.ts +2 -2
  743. package/dist/kernel/session-telemetry-otel/lib/types/index.js +1 -1
  744. package/dist/kernel/session-telemetry-otel/lib/types/invariant.d.ts +1 -1
  745. package/dist/kernel/session-telemetry-otel/package.json +1 -1
  746. package/dist/kernel/session-title/lib/index.js +2 -2
  747. package/dist/kernel/session-title/lib/types/index.d.ts +2 -2
  748. package/dist/kernel/session-title/lib/types/index.js +2 -2
  749. package/dist/kernel/session-title/lib/types/invariant.d.ts +1 -1
  750. package/dist/kernel/session-title/package.json +1 -1
  751. package/dist/kernel/session-title-all-prompts-llm/lib/index.js +1 -1
  752. package/dist/kernel/session-title-all-prompts-llm/lib/types/index.d.ts +2 -2
  753. package/dist/kernel/session-title-all-prompts-llm/lib/types/index.js +1 -1
  754. package/dist/kernel/session-title-all-prompts-llm/lib/types/invariant.d.ts +1 -1
  755. package/dist/kernel/session-title-all-prompts-llm/package.json +1 -1
  756. package/dist/kernel/session-title-first-prompt-llm/lib/index.js +1 -1
  757. package/dist/kernel/session-title-first-prompt-llm/lib/types/index.d.ts +2 -2
  758. package/dist/kernel/session-title-first-prompt-llm/lib/types/index.js +1 -1
  759. package/dist/kernel/session-title-first-prompt-llm/lib/types/invariant.d.ts +1 -1
  760. package/dist/kernel/session-title-first-prompt-llm/package.json +1 -1
  761. package/dist/kernel/session-title-llm/lib/index.js +1 -1
  762. package/dist/kernel/session-title-llm/lib/types/index.d.ts +2 -2
  763. package/dist/kernel/session-title-llm/lib/types/index.js +1 -1
  764. package/dist/kernel/session-title-llm/lib/types/invariant.d.ts +1 -1
  765. package/dist/kernel/session-title-llm/package.json +1 -1
  766. package/dist/kernel/settings/lib/index.js +1 -1
  767. package/dist/kernel/settings/lib/invariant.js +1 -1
  768. package/dist/kernel/settings/lib/types/index.d.ts +2 -2
  769. package/dist/kernel/settings/lib/types/index.js +1 -1
  770. package/dist/kernel/settings/lib/types/invariant.d.ts +1 -1
  771. package/dist/kernel/settings/lib/types/redact.d.ts +1 -1
  772. package/dist/kernel/settings/package.json +1 -1
  773. package/dist/kernel/settings-file/lib/index.js +2 -2
  774. package/dist/kernel/settings-file/lib/types/index.d.ts +2 -2
  775. package/dist/kernel/settings-file/lib/types/index.js +2 -2
  776. package/dist/kernel/settings-file/lib/types/invariant.d.ts +1 -1
  777. package/dist/kernel/settings-file/package.json +1 -1
  778. package/dist/kernel/shell/lib/index.js +1 -1
  779. package/dist/kernel/shell/lib/types/index.d.ts +1 -1
  780. package/dist/kernel/shell/lib/types/index.js +1 -1
  781. package/dist/kernel/shell/lib/types/invariant.d.ts +1 -1
  782. package/dist/kernel/shell/package.json +1 -1
  783. package/dist/kernel/shell-env/lib/index.js +2 -2
  784. package/dist/kernel/shell-env/lib/types/index.d.ts +2 -2
  785. package/dist/kernel/shell-env/lib/types/index.js +2 -2
  786. package/dist/kernel/shell-env/lib/types/invariant.d.ts +1 -1
  787. package/dist/kernel/shell-env/package.json +1 -1
  788. package/dist/kernel/skill/lib/index.js +2 -2
  789. package/dist/kernel/skill/lib/types/index.d.ts +2 -2
  790. package/dist/kernel/skill/lib/types/index.js +2 -2
  791. package/dist/kernel/skill/lib/types/invariant.d.ts +1 -1
  792. package/dist/kernel/skill/package.json +1 -1
  793. package/dist/kernel/skill-badge/lib/types/index.d.ts +1 -1
  794. package/dist/kernel/skill-badge/lib/types/invariant.d.ts +1 -1
  795. package/dist/kernel/skill-badge/package.json +1 -1
  796. package/dist/kernel/skill-filesystem/lib/index.js +1 -1
  797. package/dist/kernel/skill-filesystem/lib/types/index.d.ts +2 -2
  798. package/dist/kernel/skill-filesystem/lib/types/index.js +1 -1
  799. package/dist/kernel/skill-filesystem/lib/types/invariant.d.ts +1 -1
  800. package/dist/kernel/skill-filesystem/package.json +1 -1
  801. package/dist/kernel/spill/lib/index.js +1 -1
  802. package/dist/kernel/spill/lib/types/index.d.ts +1 -1
  803. package/dist/kernel/spill/lib/types/index.js +1 -1
  804. package/dist/kernel/spill/lib/types/invariant.d.ts +1 -1
  805. package/dist/kernel/spill/package.json +1 -1
  806. package/dist/kernel/spill-local/lib/index.js +1 -1
  807. package/dist/kernel/spill-local/lib/types/index.d.ts +2 -2
  808. package/dist/kernel/spill-local/lib/types/index.js +1 -1
  809. package/dist/kernel/spill-local/lib/types/invariant.d.ts +1 -1
  810. package/dist/kernel/spill-local/package.json +1 -1
  811. package/dist/kernel/spill-policy/lib/index.js +1 -1
  812. package/dist/kernel/spill-policy/lib/types/index.d.ts +2 -2
  813. package/dist/kernel/spill-policy/lib/types/index.js +1 -1
  814. package/dist/kernel/spill-policy/lib/types/invariant.d.ts +1 -1
  815. package/dist/kernel/spill-policy/package.json +1 -1
  816. package/dist/kernel/storage/lib/index.js +1 -1
  817. package/dist/kernel/storage/lib/types/index.d.ts +1 -1
  818. package/dist/kernel/storage/lib/types/index.js +1 -1
  819. package/dist/kernel/storage/lib/types/invariant.d.ts +1 -1
  820. package/dist/kernel/storage/package.json +1 -1
  821. package/dist/kernel/storage-domain/lib/index.js +1 -1
  822. package/dist/kernel/storage-domain/lib/types/domain.d.ts +1 -1
  823. package/dist/kernel/storage-domain/lib/types/index.d.ts +2 -2
  824. package/dist/kernel/storage-domain/lib/types/index.js +1 -1
  825. package/dist/kernel/storage-domain/lib/types/invariant.d.ts +1 -1
  826. package/dist/kernel/storage-domain/package.json +1 -1
  827. package/dist/kernel/storage-json/lib/index.js +1 -1
  828. package/dist/kernel/storage-json/lib/types/index.d.ts +2 -2
  829. package/dist/kernel/storage-json/lib/types/index.js +1 -1
  830. package/dist/kernel/storage-json/lib/types/invariant.d.ts +1 -1
  831. package/dist/kernel/storage-json/package.json +1 -1
  832. package/dist/kernel/storage-sqlite/lib/index.js +1 -1
  833. package/dist/kernel/storage-sqlite/lib/types/index.d.ts +2 -2
  834. package/dist/kernel/storage-sqlite/lib/types/index.js +1 -1
  835. package/dist/kernel/storage-sqlite/lib/types/invariant.d.ts +1 -1
  836. package/dist/kernel/storage-sqlite/package.json +1 -1
  837. package/dist/kernel/subagent/lib/index.js +1 -1
  838. package/dist/kernel/subagent/lib/types/activation-setup-registry.d.ts +1 -1
  839. package/dist/kernel/subagent/lib/types/child-agent.d.ts +1 -1
  840. package/dist/kernel/subagent/lib/types/continuation.d.ts +1 -1
  841. package/dist/kernel/subagent/lib/types/index.d.ts +1 -1
  842. package/dist/kernel/subagent/lib/types/index.js +1 -1
  843. package/dist/kernel/subagent/lib/types/invariant.d.ts +1 -1
  844. package/dist/kernel/subagent/lib/types/lifecycle.d.ts +1 -1
  845. package/dist/kernel/subagent/lib/types/list-children.d.ts +1 -1
  846. package/dist/kernel/subagent/package.json +1 -1
  847. package/dist/kernel/subagent-acp/lib/index.js +1 -1
  848. package/dist/kernel/subagent-acp/lib/types/index.d.ts +2 -2
  849. package/dist/kernel/subagent-acp/lib/types/index.js +1 -1
  850. package/dist/kernel/subagent-acp/lib/types/invariant.d.ts +1 -1
  851. package/dist/kernel/subagent-acp/package.json +1 -1
  852. package/dist/kernel/subagent-claude-code/lib/index.js +1 -1
  853. package/dist/kernel/subagent-claude-code/lib/types/index.d.ts +2 -2
  854. package/dist/kernel/subagent-claude-code/lib/types/index.js +1 -1
  855. package/dist/kernel/subagent-claude-code/lib/types/invariant.d.ts +1 -1
  856. package/dist/kernel/subagent-claude-code/package.json +1 -1
  857. package/dist/kernel/subagent-codex/lib/index.js +1 -1
  858. package/dist/kernel/subagent-codex/lib/types/index.d.ts +2 -2
  859. package/dist/kernel/subagent-codex/lib/types/index.js +1 -1
  860. package/dist/kernel/subagent-codex/lib/types/invariant.d.ts +1 -1
  861. package/dist/kernel/subagent-codex/package.json +1 -1
  862. package/dist/kernel/subagent-fork-in-process/lib/index.js +1 -1
  863. package/dist/kernel/subagent-fork-in-process/lib/types/index.d.ts +2 -2
  864. package/dist/kernel/subagent-fork-in-process/lib/types/index.js +1 -1
  865. package/dist/kernel/subagent-fork-in-process/lib/types/invariant.d.ts +1 -1
  866. package/dist/kernel/subagent-fork-in-process/package.json +1 -1
  867. package/dist/kernel/subagent-in-process-driver/lib/types/invariant.d.ts +1 -1
  868. package/dist/kernel/subagent-in-process-driver/lib/types/structured.d.ts +1 -1
  869. package/dist/kernel/subagent-in-process-driver/package.json +1 -1
  870. package/dist/kernel/subagent-nomix-sdk/lib/index.js +1 -1
  871. package/dist/kernel/subagent-nomix-sdk/lib/types/index.d.ts +2 -2
  872. package/dist/kernel/subagent-nomix-sdk/lib/types/index.js +1 -1
  873. package/dist/kernel/subagent-nomix-sdk/lib/types/invariant.d.ts +1 -1
  874. package/dist/kernel/subagent-nomix-sdk/package.json +1 -1
  875. package/dist/kernel/subagent-spawn-in-process/lib/index.js +1 -1
  876. package/dist/kernel/subagent-spawn-in-process/lib/types/index.d.ts +2 -2
  877. package/dist/kernel/subagent-spawn-in-process/lib/types/index.js +1 -1
  878. package/dist/kernel/subagent-spawn-in-process/lib/types/invariant.d.ts +1 -1
  879. package/dist/kernel/subagent-spawn-in-process/package.json +1 -1
  880. package/dist/kernel/subprocess/lib/index.js +1 -1
  881. package/dist/kernel/subprocess/lib/types/index.d.ts +1 -1
  882. package/dist/kernel/subprocess/lib/types/index.js +1 -1
  883. package/dist/kernel/subprocess/lib/types/invariant.d.ts +1 -1
  884. package/dist/kernel/subprocess/package.json +1 -1
  885. package/dist/kernel/subprocess-e2b/lib/index.js +1 -1
  886. package/dist/kernel/subprocess-e2b/lib/types/index.d.ts +2 -2
  887. package/dist/kernel/subprocess-e2b/lib/types/index.js +1 -1
  888. package/dist/kernel/subprocess-e2b/lib/types/invariant.d.ts +1 -1
  889. package/dist/kernel/subprocess-e2b/package.json +1 -1
  890. package/dist/kernel/subprocess-local/lib/types/index.d.ts +1 -1
  891. package/dist/kernel/subprocess-local/lib/types/invariant.d.ts +1 -1
  892. package/dist/kernel/subprocess-local/package.json +1 -1
  893. package/dist/kernel/system-prompt/lib/index.js +2 -2
  894. package/dist/kernel/system-prompt/lib/types/index.d.ts +2 -2
  895. package/dist/kernel/system-prompt/lib/types/index.js +2 -2
  896. package/dist/kernel/system-prompt/lib/types/invariant.d.ts +1 -1
  897. package/dist/kernel/system-prompt/package.json +1 -1
  898. package/dist/kernel/terminal/lib/index.js +1 -1
  899. package/dist/kernel/terminal/lib/types/index.d.ts +1 -1
  900. package/dist/kernel/terminal/lib/types/index.js +1 -1
  901. package/dist/kernel/terminal/lib/types/invariant.d.ts +1 -1
  902. package/dist/kernel/terminal/package.json +1 -1
  903. package/dist/kernel/terminal-bash/lib/index.js +1 -1
  904. package/dist/kernel/terminal-bash/lib/types/config.d.ts +1 -1
  905. package/dist/kernel/terminal-bash/lib/types/config.js +1 -1
  906. package/dist/kernel/terminal-bash/lib/types/index.d.ts +1 -1
  907. package/dist/kernel/terminal-bash/lib/types/invariant.d.ts +1 -1
  908. package/dist/kernel/terminal-bash/package.json +1 -1
  909. package/dist/kernel/time-context/lib/index.js +2 -2
  910. package/dist/kernel/time-context/lib/invariant.js +2 -2
  911. package/dist/kernel/time-context/lib/types/index.d.ts +2 -2
  912. package/dist/kernel/time-context/lib/types/index.js +1 -1
  913. package/dist/kernel/time-context/lib/types/invariant.d.ts +1 -1
  914. package/dist/kernel/time-context/package.json +1 -1
  915. package/dist/kernel/timeout/lib/types/invariant.d.ts +1 -1
  916. package/dist/kernel/timeout/package.json +1 -1
  917. package/dist/kernel/tmux-context/lib/index.js +2 -2
  918. package/dist/kernel/tmux-context/lib/types/index.d.ts +2 -2
  919. package/dist/kernel/tmux-context/lib/types/index.js +1 -1
  920. package/dist/kernel/tmux-context/lib/types/invariant.d.ts +1 -1
  921. package/dist/kernel/tmux-context/package.json +1 -1
  922. package/dist/kernel/token-meter/lib/index.js +2 -2
  923. package/dist/kernel/token-meter/lib/types/index.d.ts +2 -2
  924. package/dist/kernel/token-meter/lib/types/index.js +2 -2
  925. package/dist/kernel/token-meter/lib/types/invariant.d.ts +1 -1
  926. package/dist/kernel/token-meter/package.json +1 -1
  927. package/dist/kernel/tool-ask-user/lib/types/index.d.ts +1 -1
  928. package/dist/kernel/tool-ask-user/lib/types/invariant.d.ts +1 -1
  929. package/dist/kernel/tool-ask-user/package.json +1 -1
  930. package/dist/kernel/tool-bash/lib/index.js +1 -1
  931. package/dist/kernel/tool-bash/lib/types/index.d.ts +2 -2
  932. package/dist/kernel/tool-bash/lib/types/index.js +1 -1
  933. package/dist/kernel/tool-bash/lib/types/invariant.d.ts +1 -1
  934. package/dist/kernel/tool-bash/package.json +1 -1
  935. package/dist/kernel/tool-bash-persistent/lib/index.js +1 -1
  936. package/dist/kernel/tool-bash-persistent/lib/types/index.d.ts +2 -2
  937. package/dist/kernel/tool-bash-persistent/lib/types/index.js +1 -1
  938. package/dist/kernel/tool-bash-persistent/lib/types/invariant.d.ts +1 -1
  939. package/dist/kernel/tool-bash-persistent/package.json +1 -1
  940. package/dist/kernel/tool-call-timeout-policy/lib/types/index.d.ts +1 -1
  941. package/dist/kernel/tool-call-timeout-policy/lib/types/invariant.d.ts +1 -1
  942. package/dist/kernel/tool-call-timeout-policy/package.json +1 -1
  943. package/dist/kernel/tool-cordis/lib/types/fiber-state.d.ts +1 -1
  944. package/dist/kernel/tool-cordis/lib/types/index.d.ts +1 -1
  945. package/dist/kernel/tool-cordis/lib/types/inspect.d.ts +1 -1
  946. package/dist/kernel/tool-cordis/lib/types/invariant.d.ts +1 -1
  947. package/dist/kernel/tool-cordis/lib/types/providers.d.ts +1 -1
  948. package/dist/kernel/tool-cordis/package.json +1 -1
  949. package/dist/kernel/tool-fs/lib/index.js +1 -1
  950. package/dist/kernel/tool-fs/lib/types/edit.d.ts +1 -1
  951. package/dist/kernel/tool-fs/lib/types/index.d.ts +2 -2
  952. package/dist/kernel/tool-fs/lib/types/index.js +1 -1
  953. package/dist/kernel/tool-fs/lib/types/invariant.d.ts +1 -1
  954. package/dist/kernel/tool-fs/lib/types/read-image.d.ts +1 -1
  955. package/dist/kernel/tool-fs/lib/types/read-target.d.ts +1 -1
  956. package/dist/kernel/tool-fs/lib/types/read.d.ts +1 -1
  957. package/dist/kernel/tool-fs/lib/types/sandbox.d.ts +1 -1
  958. package/dist/kernel/tool-fs/lib/types/write.d.ts +1 -1
  959. package/dist/kernel/tool-fs/package.json +1 -1
  960. package/dist/kernel/tool-fs-search/lib/index.js +1 -1
  961. package/dist/kernel/tool-fs-search/lib/types/direct-call.d.ts +1 -1
  962. package/dist/kernel/tool-fs-search/lib/types/glob.d.ts +1 -1
  963. package/dist/kernel/tool-fs-search/lib/types/grep.d.ts +1 -1
  964. package/dist/kernel/tool-fs-search/lib/types/index.d.ts +2 -2
  965. package/dist/kernel/tool-fs-search/lib/types/index.js +1 -1
  966. package/dist/kernel/tool-fs-search/lib/types/invariant.d.ts +1 -1
  967. package/dist/kernel/tool-fs-search/lib/types/search-core.d.ts +1 -1
  968. package/dist/kernel/tool-fs-search/package.json +1 -1
  969. package/dist/kernel/tool-goal/lib/index.js +1 -1
  970. package/dist/kernel/tool-goal/lib/types/authority.d.ts +1 -1
  971. package/dist/kernel/tool-goal/lib/types/index.d.ts +2 -2
  972. package/dist/kernel/tool-goal/lib/types/index.js +1 -1
  973. package/dist/kernel/tool-goal/lib/types/invariant.d.ts +1 -1
  974. package/dist/kernel/tool-goal/package.json +1 -1
  975. package/dist/kernel/tool-jobs/lib/index.js +1 -1
  976. package/dist/kernel/tool-jobs/lib/types/index.d.ts +2 -2
  977. package/dist/kernel/tool-jobs/lib/types/index.js +1 -1
  978. package/dist/kernel/tool-jobs/lib/types/invariant.d.ts +1 -1
  979. package/dist/kernel/tool-jobs/package.json +1 -1
  980. package/dist/kernel/tool-lsp/lib/index.js +1 -1
  981. package/dist/kernel/tool-lsp/lib/types/index.d.ts +2 -2
  982. package/dist/kernel/tool-lsp/lib/types/index.js +1 -1
  983. package/dist/kernel/tool-lsp/lib/types/invariant.d.ts +1 -1
  984. package/dist/kernel/tool-lsp/package.json +1 -1
  985. package/dist/kernel/tool-pwsh/lib/index.js +1 -1
  986. package/dist/kernel/tool-pwsh/lib/types/index.d.ts +2 -2
  987. package/dist/kernel/tool-pwsh/lib/types/index.js +1 -1
  988. package/dist/kernel/tool-pwsh/lib/types/invariant.d.ts +1 -1
  989. package/dist/kernel/tool-pwsh/package.json +1 -1
  990. package/dist/kernel/tool-ralph/lib/index.js +1 -1
  991. package/dist/kernel/tool-ralph/lib/types/index.d.ts +2 -2
  992. package/dist/kernel/tool-ralph/lib/types/index.js +1 -1
  993. package/dist/kernel/tool-ralph/lib/types/invariant.d.ts +1 -1
  994. package/dist/kernel/tool-ralph/package.json +1 -1
  995. package/dist/kernel/tool-session-query/lib/index.js +1 -1
  996. package/dist/kernel/tool-session-query/lib/types/index.d.ts +2 -2
  997. package/dist/kernel/tool-session-query/lib/types/index.js +1 -1
  998. package/dist/kernel/tool-session-query/lib/types/invariant.d.ts +1 -1
  999. package/dist/kernel/tool-session-query/lib/types/operations.d.ts +1 -1
  1000. package/dist/kernel/tool-session-query/lib/types/service-boundary.d.ts +1 -1
  1001. package/dist/kernel/tool-session-query/lib/types/workspace-access.d.ts +1 -1
  1002. package/dist/kernel/tool-session-query/package.json +1 -1
  1003. package/dist/kernel/tool-skill/lib/index.js +1 -1
  1004. package/dist/kernel/tool-skill/lib/types/index.d.ts +2 -2
  1005. package/dist/kernel/tool-skill/lib/types/index.js +1 -1
  1006. package/dist/kernel/tool-skill/lib/types/invariant.d.ts +1 -1
  1007. package/dist/kernel/tool-skill/package.json +1 -1
  1008. package/dist/kernel/tool-str-replace-editor/lib/index.js +1 -1
  1009. package/dist/kernel/tool-str-replace-editor/lib/types/index.d.ts +2 -2
  1010. package/dist/kernel/tool-str-replace-editor/lib/types/index.js +1 -1
  1011. package/dist/kernel/tool-str-replace-editor/lib/types/invariant.d.ts +1 -1
  1012. package/dist/kernel/tool-str-replace-editor/package.json +1 -1
  1013. package/dist/kernel/tool-subagent/lib/index.js +1 -1
  1014. package/dist/kernel/tool-subagent/lib/types/index.d.ts +2 -2
  1015. package/dist/kernel/tool-subagent/lib/types/index.js +1 -1
  1016. package/dist/kernel/tool-subagent/lib/types/invariant.d.ts +1 -1
  1017. package/dist/kernel/tool-subagent/package.json +1 -1
  1018. package/dist/kernel/tool-subagent-control/lib/types/index.d.ts +1 -1
  1019. package/dist/kernel/tool-subagent-control/lib/types/invariant.d.ts +1 -1
  1020. package/dist/kernel/tool-subagent-control/lib/types/list-agents.d.ts +1 -1
  1021. package/dist/kernel/tool-subagent-control/package.json +1 -1
  1022. package/dist/kernel/tool-subagent-report/lib/index.js +1 -1
  1023. package/dist/kernel/tool-subagent-report/lib/types/index.d.ts +2 -2
  1024. package/dist/kernel/tool-subagent-report/lib/types/index.js +1 -1
  1025. package/dist/kernel/tool-subagent-report/lib/types/invariant.d.ts +1 -1
  1026. package/dist/kernel/tool-subagent-report/package.json +1 -1
  1027. package/dist/kernel/tool-terminal/lib/index.js +1 -1
  1028. package/dist/kernel/tool-terminal/lib/types/index.d.ts +2 -2
  1029. package/dist/kernel/tool-terminal/lib/types/index.js +1 -1
  1030. package/dist/kernel/tool-terminal/lib/types/invariant.d.ts +1 -1
  1031. package/dist/kernel/tool-terminal/package.json +1 -1
  1032. package/dist/kernel/tool-todo/lib/index.js +1 -1
  1033. package/dist/kernel/tool-todo/lib/types/index.d.ts +2 -2
  1034. package/dist/kernel/tool-todo/lib/types/index.js +1 -1
  1035. package/dist/kernel/tool-todo/lib/types/invariant.d.ts +1 -1
  1036. package/dist/kernel/tool-todo/package.json +1 -1
  1037. package/dist/kernel/tool-web/lib/index.js +1 -1
  1038. package/dist/kernel/tool-web/lib/types/fetch.d.ts +1 -1
  1039. package/dist/kernel/tool-web/lib/types/index.d.ts +2 -2
  1040. package/dist/kernel/tool-web/lib/types/index.js +1 -1
  1041. package/dist/kernel/tool-web/lib/types/invariant.d.ts +1 -1
  1042. package/dist/kernel/tool-web/lib/types/search.d.ts +1 -1
  1043. package/dist/kernel/tool-web/package.json +1 -1
  1044. package/dist/kernel/tool-workflow/lib/index.js +1 -1
  1045. package/dist/kernel/tool-workflow/lib/types/index.d.ts +2 -2
  1046. package/dist/kernel/tool-workflow/lib/types/index.js +1 -1
  1047. package/dist/kernel/tool-workflow/lib/types/invariant.d.ts +1 -1
  1048. package/dist/kernel/tool-workflow/package.json +1 -1
  1049. package/dist/kernel/tools/lib/index.js +2 -2
  1050. package/dist/kernel/tools/lib/types/index.d.ts +2 -2
  1051. package/dist/kernel/tools/lib/types/index.js +2 -2
  1052. package/dist/kernel/tools/lib/types/invariant.d.ts +1 -1
  1053. package/dist/kernel/tools/package.json +1 -1
  1054. package/dist/kernel/typert-generator/lib/types/invariant.d.ts +1 -1
  1055. package/dist/kernel/typert-generator/package.json +1 -1
  1056. package/dist/kernel/typert-loader/lib/index.js +1 -1
  1057. package/dist/kernel/typert-loader/lib/types/index.d.ts +2 -2
  1058. package/dist/kernel/typert-loader/lib/types/index.js +1 -1
  1059. package/dist/kernel/typert-loader/lib/types/invariant.d.ts +1 -1
  1060. package/dist/kernel/typert-loader/package.json +1 -1
  1061. package/dist/kernel/typert-protocol/lib/index.js +1 -1
  1062. package/dist/kernel/typert-protocol/lib/types/index.d.ts +1 -1
  1063. package/dist/kernel/typert-protocol/lib/types/index.js +1 -1
  1064. package/dist/kernel/typert-protocol/lib/types/invariant.d.ts +1 -1
  1065. package/dist/kernel/typert-protocol/lib/types/types.d.ts +1 -1
  1066. package/dist/kernel/typert-protocol/package.json +1 -1
  1067. package/dist/kernel/typert-registry/lib/index.js +1 -1
  1068. package/dist/kernel/typert-registry/lib/types/client/index.d.ts +1 -1
  1069. package/dist/kernel/typert-registry/lib/types/invariant.d.ts +1 -1
  1070. package/dist/kernel/typert-registry/lib/types/service.d.ts +1 -1
  1071. package/dist/kernel/typert-registry/lib/types/service.js +1 -1
  1072. package/dist/kernel/typert-registry/package.json +1 -1
  1073. package/dist/kernel/user-approval/lib/index.js +2 -2
  1074. package/dist/kernel/user-approval/lib/invariant.js +2 -2
  1075. package/dist/kernel/user-approval/lib/types/index.d.ts +2 -2
  1076. package/dist/kernel/user-approval/lib/types/index.js +2 -2
  1077. package/dist/kernel/user-approval/lib/types/invariant.d.ts +1 -1
  1078. package/dist/kernel/user-approval/package.json +1 -1
  1079. package/dist/kernel/user-questions/lib/index.js +1 -1
  1080. package/dist/kernel/user-questions/lib/types/index.d.ts +1 -1
  1081. package/dist/kernel/user-questions/lib/types/index.js +1 -1
  1082. package/dist/kernel/user-questions/lib/types/invariant.d.ts +1 -1
  1083. package/dist/kernel/user-questions/package.json +1 -1
  1084. package/dist/kernel/web/lib/index.js +2 -2
  1085. package/dist/kernel/web/lib/types/index.d.ts +2 -2
  1086. package/dist/kernel/web/lib/types/index.js +2 -2
  1087. package/dist/kernel/web/lib/types/invariant.d.ts +1 -1
  1088. package/dist/kernel/web/package.json +1 -1
  1089. package/dist/kernel/web-app/lib/index.js +1 -1
  1090. package/dist/kernel/web-app/lib/types/index.d.ts +2 -2
  1091. package/dist/kernel/web-app/lib/types/index.js +1 -1
  1092. package/dist/kernel/web-app/lib/types/invariant.d.ts +1 -1
  1093. package/dist/kernel/web-app/lib/types/startup.d.ts +1 -1
  1094. package/dist/kernel/web-app/package.json +1 -1
  1095. package/dist/kernel/web-fetch-http/lib/index.js +1 -1
  1096. package/dist/kernel/web-fetch-http/lib/types/index.d.ts +2 -2
  1097. package/dist/kernel/web-fetch-http/lib/types/index.js +1 -1
  1098. package/dist/kernel/web-fetch-http/lib/types/invariant.d.ts +1 -1
  1099. package/dist/kernel/web-fetch-http/package.json +1 -1
  1100. package/dist/kernel/web-frontend/package.json +1 -1
  1101. package/dist/kernel/web-search-deepseek/lib/index.js +1 -1
  1102. package/dist/kernel/web-search-deepseek/lib/types/index.d.ts +2 -2
  1103. package/dist/kernel/web-search-deepseek/lib/types/index.js +1 -1
  1104. package/dist/kernel/web-search-deepseek/lib/types/invariant.d.ts +1 -1
  1105. package/dist/kernel/web-search-deepseek/package.json +1 -1
  1106. package/dist/kernel/web-search-exa/lib/index.js +1 -1
  1107. package/dist/kernel/web-search-exa/lib/types/index.d.ts +2 -2
  1108. package/dist/kernel/web-search-exa/lib/types/index.js +1 -1
  1109. package/dist/kernel/web-search-exa/lib/types/invariant.d.ts +1 -1
  1110. package/dist/kernel/web-search-exa/package.json +1 -1
  1111. package/dist/kernel/web-search-perplexity/lib/index.js +1 -1
  1112. package/dist/kernel/web-search-perplexity/lib/types/index.d.ts +2 -2
  1113. package/dist/kernel/web-search-perplexity/lib/types/index.js +1 -1
  1114. package/dist/kernel/web-search-perplexity/lib/types/invariant.d.ts +1 -1
  1115. package/dist/kernel/web-search-perplexity/package.json +1 -1
  1116. package/dist/kernel/workflow/lib/index.js +1 -1
  1117. package/dist/kernel/workflow/lib/types/index.d.ts +1 -1
  1118. package/dist/kernel/workflow/lib/types/index.js +1 -1
  1119. package/dist/kernel/workflow/lib/types/invariant.d.ts +1 -1
  1120. package/dist/kernel/workflow/package.json +1 -1
  1121. package/dist/kernel/workflow-worker-thread/lib/index.js +1 -1
  1122. package/dist/kernel/workflow-worker-thread/lib/types/host.d.ts +1 -1
  1123. package/dist/kernel/workflow-worker-thread/lib/types/index.d.ts +2 -2
  1124. package/dist/kernel/workflow-worker-thread/lib/types/index.js +1 -1
  1125. package/dist/kernel/workflow-worker-thread/lib/types/invariant.d.ts +1 -1
  1126. package/dist/kernel/workflow-worker-thread/package.json +1 -1
  1127. package/dist/kernel/workspace/lib/index.js +1 -1
  1128. package/dist/kernel/workspace/lib/invariant.js +1 -1
  1129. package/dist/kernel/workspace/lib/types/index.d.ts +1 -1
  1130. package/dist/kernel/workspace/lib/types/index.js +1 -1
  1131. package/dist/kernel/workspace/lib/types/invariant.d.ts +1 -1
  1132. package/dist/kernel/workspace/package.json +1 -1
  1133. package/dist/licenses/landlock-run.LICENSE +28 -0
  1134. package/dist/native/landlock-run/linux-arm64/landlock-run +0 -0
  1135. package/dist/native/landlock-run/linux-x64/landlock-run +0 -0
  1136. package/package.json +7 -12
@@ -0,0 +1,660 @@
1
+ import { defineProperty, isNullable } from '../../../cosmokit/lib/index.js';
2
+ import { Context } from "./context.js";
3
+ import { buildOuterStack, composeError, DisposableList, getTraceable, isConstructor, isObject, symbols } from "./utils.js";
4
+ const kValidationError = Symbol.for('ValidationError');
5
+ /** Error raised when plugin configuration fails standard-schema validation. */
6
+ export class ValidationError extends TypeError {
7
+ name = 'ValidationError';
8
+ /**
9
+ * Build the aggregated message from schema issues.
10
+ *
11
+ * @param issues — the standard-schema issues, one message line each.
12
+ */
13
+ constructor(issues) {
14
+ super(`invalid config:\n` + issues.map(issue => {
15
+ if (issue.path) {
16
+ return ` - ${issue.message} (at ${issue.path.join('.')})`;
17
+ }
18
+ else {
19
+ return ` - ${issue.message}`;
20
+ }
21
+ }).join('\n'));
22
+ }
23
+ }
24
+ Object.defineProperty(ValidationError.prototype, kValidationError, {
25
+ value: true,
26
+ });
27
+ /**
28
+ * Validate and normalize config for a plugin runtime before it starts.
29
+ *
30
+ * @param runtime — the plugin runtime whose `Config` schema to apply.
31
+ * @param config — the raw user config.
32
+ * @returns the validated config, or `config` unchanged if the runtime has no schema.
33
+ * @throws {ValidationError} when validation reports issues.
34
+ */
35
+ export function resolveConfig(runtime, config) {
36
+ if (!runtime.Config)
37
+ return config;
38
+ // TODO: async validation
39
+ const result = runtime.Config['~standard'].validate(config);
40
+ if ('then' in result) {
41
+ throw new TypeError('Async config validation is not supported');
42
+ }
43
+ if (result.issues) {
44
+ throw new ValidationError(result.issues);
45
+ }
46
+ else {
47
+ return result.value;
48
+ }
49
+ }
50
+ // Public effect disposers remain single-shot, but structural owners and outer
51
+ // effects must still be able to join a cleanup that another caller started.
52
+ const effectInertia = new WeakMap();
53
+ function runDisposable(dispose) {
54
+ const result = dispose();
55
+ return effectInertia.get(dispose)?.() ?? result;
56
+ }
57
+ /** Notify plugin teardown without allowing one observer to break ownership cleanup. */
58
+ function emitPluginDisposed(context, fiber) {
59
+ const args = ['internal/plugin', fiber];
60
+ let callbacks;
61
+ try {
62
+ callbacks = context.events.dispatch('emit', args);
63
+ }
64
+ catch (error) {
65
+ context.logger.error(error);
66
+ return;
67
+ }
68
+ for (const callback of callbacks) {
69
+ try {
70
+ const returned = callback(...args);
71
+ void Promise.resolve(returned).catch(error => context.logger.error(error));
72
+ }
73
+ catch (error) {
74
+ context.logger.error(error);
75
+ }
76
+ }
77
+ }
78
+ /** Framework error with a stable machine-readable code. */
79
+ export class CordisError extends Error {
80
+ code;
81
+ /**
82
+ * @param code — the stable error code; also the default message.
83
+ * @param message — optional human-readable override.
84
+ */
85
+ constructor(code, message) {
86
+ super(message ?? CordisError.Code[code]);
87
+ this.code = code;
88
+ }
89
+ }
90
+ /** Cordis error code definitions. */
91
+ (function (CordisError) {
92
+ CordisError.Code = {
93
+ INACTIVE_EFFECT: 'cannot create effect on inactive context',
94
+ };
95
+ })(CordisError || (CordisError = {}));
96
+ const INACTIVE = '__INACTIVE__';
97
+ /**
98
+ * Runtime instance of one plugin application.
99
+ *
100
+ * A fiber tracks dependency state, validated config, lifecycle effects, and
101
+ * cleanup for the plugin context returned by `ctx.plugin()`.
102
+ */
103
+ export class Fiber {
104
+ parent;
105
+ inject;
106
+ runtime;
107
+ /** Unique id within the registry; 0 for the root fiber, `null` once disposed. */
108
+ uid;
109
+ /** The context this fiber's plugin runs in (extends the parent context). */
110
+ ctx;
111
+ /** The validated plugin config (updated by `update()`). */
112
+ config;
113
+ /** The raw plugin config, re-resolved before each activation. */
114
+ _config;
115
+ /** Current lifecycle state; transitions emit `internal/status`. */
116
+ state = 0 /* FiberState.PENDING */;
117
+ /** Dispose this fiber: unload the plugin, then settle once cleanup finished. */
118
+ dispose;
119
+ /** Snapshot of required service implementations while loaded; `undefined` otherwise. */
120
+ store;
121
+ /** The in-flight load/unload transition, if one is currently running. */
122
+ inertia;
123
+ _hooks = Object.create(null);
124
+ _disposables = new DisposableList();
125
+ // Same as `this.ctx`, but with a more specific type.
126
+ context;
127
+ _error;
128
+ _runner;
129
+ _store = Object.create(null);
130
+ /**
131
+ * Create a fiber. Plugin authors normally obtain fibers from `ctx.plugin()`
132
+ * rather than constructing them directly.
133
+ *
134
+ * @param parent — the context the plugin was loaded from.
135
+ * @param config — raw config, validated against the runtime's schema.
136
+ * @param inject — resolved dependency map (service name → intercept config).
137
+ * @param runtime — the shared plugin runtime, or `null` for the root fiber.
138
+ * @param getOuterStack — captures the caller stack for effect diagnostics.
139
+ */
140
+ constructor(parent, config, inject, runtime, getOuterStack) {
141
+ this.parent = parent;
142
+ this.inject = inject;
143
+ this.runtime = runtime;
144
+ this._config = config;
145
+ const collect = (dispose) => {
146
+ this._disposables.push(dispose);
147
+ };
148
+ if (runtime) {
149
+ this.uid = parent.registry.counter;
150
+ this.ctx = this.context = parent.extend({ fiber: this });
151
+ const injectEntries = Object.entries(this.inject);
152
+ if (injectEntries.length) {
153
+ this.ctx[Context.intercept] = Object.create(parent[Context.intercept]);
154
+ for (const [name, config] of injectEntries) {
155
+ if (isNullable(config))
156
+ continue;
157
+ this.ctx[Context.intercept][name] = config;
158
+ }
159
+ }
160
+ this._runner = {
161
+ epoch: INACTIVE,
162
+ getOuterStack,
163
+ execute: function () {
164
+ if (isConstructor(runtime.callback)) {
165
+ // eslint-disable-next-line new-cap
166
+ const instance = new runtime.callback(this.ctx, this.config);
167
+ for (const hook of instance?.[symbols.initHooks] ?? []) {
168
+ hook();
169
+ }
170
+ return instance?.[symbols.init]?.();
171
+ }
172
+ else {
173
+ return runtime.callback(this.ctx, this.config);
174
+ }
175
+ },
176
+ collect,
177
+ };
178
+ this.dispose = parent.fiber.effect(() => {
179
+ const remove = runtime.fibers.push(this);
180
+ return async () => {
181
+ this.uid = null;
182
+ emitPluginDisposed(this.context, this);
183
+ if (this.ctx.registry.has(runtime.callback)) {
184
+ remove();
185
+ if (!runtime.fibers.length) {
186
+ this.ctx.registry.delete(runtime.callback);
187
+ }
188
+ }
189
+ this._setEpoch(INACTIVE);
190
+ // A PENDING fiber can already own effects registered by an
191
+ // internal/plugin observer. Its epoch is still INACTIVE, so
192
+ // _setEpoch() has no transition to drive; explicitly unload that
193
+ // pre-activation work before reporting disposal complete.
194
+ if (!this.inertia) {
195
+ this._updateState(() => {
196
+ this.inertia = this._unload();
197
+ return 5 /* FiberState.UNLOADING */;
198
+ });
199
+ }
200
+ // `this.inertia` itself should never reject — both `_reload` and
201
+ // `_unload` swallow their own work errors via `ctx.logger.error`.
202
+ // If it *does* reject, the only remaining cause is the logger
203
+ // itself failing, which we can't recover from in this exact spot
204
+ // (calling the logger again is what just failed). Let the
205
+ // rejection propagate; process-level crash is the honest outcome.
206
+ while (this.inertia) {
207
+ await this.inertia;
208
+ }
209
+ };
210
+ }, 'ctx.plugin()');
211
+ try {
212
+ // Publish only after the parent owns a fully assigned disposer. A
213
+ // synchronous observer may dispose either this fiber or its parent.
214
+ this.context.emit('internal/plugin', this);
215
+ }
216
+ catch (error) {
217
+ // Publication failed synchronously. The disposer removes the child
218
+ // from both the parent and runtime before control escapes.
219
+ void Promise.resolve(this.dispose()).catch(reason => this.ctx.logger.error(reason));
220
+ throw error;
221
+ }
222
+ // Keep the initial notification's historical PENDING view. The loader
223
+ // may also extend `inject` in that notification, so resolve dependencies
224
+ // only after publication. A reentrant parent unload makes the child
225
+ // disposer responsible for draining any PENDING effects instead.
226
+ if (this.uid !== null && parent.fiber.state !== 5 /* FiberState.UNLOADING */) {
227
+ for (const name of Object.keys(this.inject)) {
228
+ this._checkImpl(name);
229
+ }
230
+ this._refresh();
231
+ }
232
+ }
233
+ else {
234
+ this.uid = 0;
235
+ this.ctx = this.context = parent;
236
+ this.state = 2 /* FiberState.ACTIVE */;
237
+ this.store = Object.create(null);
238
+ this._runner = {
239
+ epoch: '',
240
+ getOuterStack,
241
+ execute: () => { },
242
+ collect,
243
+ };
244
+ this.dispose = () => this.restart();
245
+ }
246
+ }
247
+ /** The plugin's display name, inherited from the nearest named ancestor, else `'root'`. */
248
+ get name() {
249
+ let fiber = this;
250
+ do {
251
+ if (fiber.runtime?.name)
252
+ return fiber.runtime.name;
253
+ fiber = fiber.parent.fiber;
254
+ } while (fiber !== fiber.parent.fiber);
255
+ return 'root';
256
+ }
257
+ /**
258
+ * Throw if the fiber has already been disposed.
259
+ *
260
+ * @returns nothing when the fiber is still active.
261
+ * @throws {CordisError} `INACTIVE_EFFECT` when the fiber's uid has been cleared.
262
+ */
263
+ assertActive() {
264
+ if (this.uid !== null)
265
+ return;
266
+ throw new CordisError('INACTIVE_EFFECT');
267
+ }
268
+ _execute(runner) {
269
+ const oldEpoch = runner.epoch;
270
+ return composeError((info) => {
271
+ const safeCollect = (dispose) => {
272
+ if (typeof dispose === 'function') {
273
+ runner.collect(dispose);
274
+ }
275
+ else if (!isNullable(dispose)) {
276
+ throw new TypeError('Invalid effect');
277
+ }
278
+ };
279
+ const effect = runner.execute.call(this);
280
+ if (typeof effect === 'function') {
281
+ return runner.collect(effect);
282
+ }
283
+ else if (isNullable(effect)) {
284
+ // return
285
+ }
286
+ else if (!isObject(effect)) {
287
+ throw new TypeError('Invalid effect');
288
+ }
289
+ else if ('then' in effect) {
290
+ return effect.then(safeCollect);
291
+ }
292
+ else if (Symbol.iterator in effect) {
293
+ info.error = new Error();
294
+ const iter = effect[Symbol.iterator]();
295
+ while (true) {
296
+ const result = iter.next();
297
+ safeCollect(result.value);
298
+ if (result.done)
299
+ return;
300
+ }
301
+ }
302
+ else if (Symbol.asyncIterator in effect) {
303
+ const iter = effect[Symbol.asyncIterator]();
304
+ return (async () => {
305
+ // force async stack trace
306
+ await Promise.resolve();
307
+ info.error = new Error();
308
+ while (true) {
309
+ if (runner.epoch !== oldEpoch)
310
+ return;
311
+ const result = await iter.next();
312
+ safeCollect(result.value);
313
+ if (result.done)
314
+ return;
315
+ }
316
+ })();
317
+ }
318
+ else {
319
+ throw new TypeError('Invalid effect');
320
+ }
321
+ }, runner.getOuterStack);
322
+ }
323
+ effect(execute, label = 'anonymous') {
324
+ this.assertActive();
325
+ if (this.state === 5 /* FiberState.UNLOADING */) {
326
+ throw new CordisError('INACTIVE_EFFECT');
327
+ }
328
+ const disposables = [];
329
+ let disposing = false;
330
+ let disposalTask;
331
+ const dispose = () => {
332
+ if (disposing)
333
+ return disposalTask;
334
+ disposing = true;
335
+ let task;
336
+ for (const disposable of disposables.splice(0).reverse()) {
337
+ if (task) {
338
+ task = task.then(() => runDisposable(disposable));
339
+ }
340
+ else {
341
+ const result = runDisposable(disposable);
342
+ if (isObject(result) && 'then' in result) {
343
+ task = result;
344
+ }
345
+ }
346
+ }
347
+ return disposalTask = task;
348
+ };
349
+ const meta = { label, children: [] };
350
+ const runner = {
351
+ execute,
352
+ epoch: true,
353
+ collect: (dispose) => {
354
+ disposables.push(dispose);
355
+ this._disposables.delete(dispose);
356
+ if (dispose[symbols.effect]) {
357
+ meta.children.push(dispose[symbols.effect]);
358
+ }
359
+ },
360
+ getOuterStack: buildOuterStack(),
361
+ };
362
+ let task;
363
+ let executing = true;
364
+ let resolveSetup;
365
+ let rejectSetup;
366
+ let setupBarrier;
367
+ let setupFailed = false;
368
+ let inFlight;
369
+ let removeWrapper = () => false;
370
+ const waitForSetup = () => {
371
+ setupBarrier ??= new Promise((resolve, reject) => {
372
+ resolveSetup = resolve;
373
+ rejectSetup = reject;
374
+ });
375
+ return setupBarrier;
376
+ };
377
+ const disposeAfter = (setup) => {
378
+ return Promise.resolve(setup).then(() => dispose(), async (reason) => {
379
+ await dispose();
380
+ throw reason;
381
+ });
382
+ };
383
+ const finalizeDisposal = (callback) => {
384
+ let result;
385
+ try {
386
+ result = callback();
387
+ }
388
+ catch (error) {
389
+ removeWrapper();
390
+ throw error;
391
+ }
392
+ if (isObject(result) && 'then' in result) {
393
+ const pending = Promise.resolve(result).finally(() => {
394
+ removeWrapper();
395
+ if (inFlight === pending)
396
+ inFlight = undefined;
397
+ });
398
+ return inFlight = pending;
399
+ }
400
+ removeWrapper();
401
+ return result;
402
+ };
403
+ const wrapper = defineProperty(() => {
404
+ // A synchronous setup failure can race an owner unload that already
405
+ // captured this wrapper but has not invoked it yet. The failed effect is
406
+ // never returned publicly, so let that internal caller await rollback.
407
+ if (!runner.epoch)
408
+ return setupFailed ? inFlight : undefined;
409
+ runner.epoch = false;
410
+ return finalizeDisposal(() => {
411
+ if (executing)
412
+ return disposeAfter(waitForSetup());
413
+ return task ? disposeAfter(task) : dispose();
414
+ });
415
+ }, symbols.effect, meta);
416
+ effectInertia.set(wrapper, () => inFlight);
417
+ // Make the effect visible to a reentrant owner unload before execute()
418
+ // runs any plugin code. Async teardown stays owner-visible until it
419
+ // settles, allowing an outer effect to join cleanup another caller began.
420
+ removeWrapper = this._disposables.push(wrapper);
421
+ try {
422
+ task = this._execute(runner);
423
+ }
424
+ catch (reason) {
425
+ executing = false;
426
+ setupFailed = true;
427
+ runner.epoch = false;
428
+ let cleanup;
429
+ try {
430
+ cleanup = finalizeDisposal(dispose);
431
+ }
432
+ finally {
433
+ rejectSetup?.(reason);
434
+ }
435
+ if (isObject(cleanup) && 'then' in cleanup) {
436
+ cleanup.catch(error => this.ctx.logger.error(error));
437
+ }
438
+ throw reason;
439
+ }
440
+ executing = false;
441
+ if (setupBarrier) {
442
+ Promise.resolve(task).then(resolveSetup, rejectSetup);
443
+ }
444
+ // prevent unhandled rejection — both from `task` itself and from the
445
+ // disposer chain if it fails to settle cleanly.
446
+ task?.catch(() => {
447
+ if (!runner.epoch)
448
+ return dispose();
449
+ return finalizeDisposal(dispose);
450
+ }).catch((error) => this.ctx.logger.error(error));
451
+ const disposeAsync = () => {
452
+ if (!runner.epoch)
453
+ return;
454
+ runner.epoch = false;
455
+ return finalizeDisposal(dispose);
456
+ };
457
+ wrapper.then = async (onFulfilled, onRejected) => {
458
+ return Promise.resolve(task)
459
+ .then(() => disposeAsync)
460
+ .then(onFulfilled, onRejected);
461
+ };
462
+ return wrapper;
463
+ }
464
+ /**
465
+ * Return metadata for currently registered effects.
466
+ *
467
+ * @returns one {@link EffectMeta} tree per labeled live effect.
468
+ */
469
+ getEffects() {
470
+ return [...this._disposables]
471
+ .map(dispose => dispose[symbols.effect])
472
+ .filter(Boolean);
473
+ }
474
+ _getState() {
475
+ if (this.uid === null)
476
+ return 4 /* FiberState.DISPOSED */;
477
+ if (this._error)
478
+ return 3 /* FiberState.FAILED */;
479
+ if (this._runner.epoch !== INACTIVE)
480
+ return 2 /* FiberState.ACTIVE */;
481
+ return 0 /* FiberState.PENDING */;
482
+ }
483
+ _updateState(callback) {
484
+ const oldState = this.state;
485
+ this.state = callback() ?? this._getState();
486
+ if (oldState === this.state)
487
+ return;
488
+ // FIXME internal/fiber-info
489
+ this.context.emit('internal/status', this, oldState);
490
+ // only notify changes between ACTIVE and NON-ACTIVE states
491
+ if (oldState !== 2 /* FiberState.ACTIVE */ && this.state !== 2 /* FiberState.ACTIVE */)
492
+ return;
493
+ for (const key of Reflect.ownKeys(this.ctx.reflect.store)) {
494
+ const impl = this.ctx.reflect.store[key];
495
+ if (impl.fiber !== this)
496
+ continue;
497
+ this.ctx.reflect.notify([impl.name]);
498
+ }
499
+ }
500
+ _checkImpl(name) {
501
+ const impl = this.ctx.reflect._getImpl(name, true);
502
+ if (!impl)
503
+ return delete this._store[name];
504
+ try {
505
+ if (impl.check && !impl.check.call(getTraceable(this.ctx, impl.value))) {
506
+ return delete this._store[name];
507
+ }
508
+ }
509
+ catch (error) {
510
+ impl.fiber.ctx.logger.error(error);
511
+ return delete this._store[name];
512
+ }
513
+ this._store[name] = impl;
514
+ }
515
+ _refresh() {
516
+ let epoch = false;
517
+ epoch = '';
518
+ for (const name of Object.keys(this.inject)) {
519
+ const impl = this._store[name];
520
+ if (!impl) {
521
+ epoch = INACTIVE;
522
+ break;
523
+ }
524
+ epoch += ':' + impl.fiber.uid;
525
+ }
526
+ this._setEpoch(epoch);
527
+ }
528
+ _setEpoch(epoch) {
529
+ const oldEpoch = this._runner.epoch;
530
+ if (epoch === oldEpoch)
531
+ return;
532
+ this._runner.epoch = epoch;
533
+ if (this.inertia)
534
+ return;
535
+ this._updateState(() => {
536
+ if (epoch !== INACTIVE && oldEpoch === INACTIVE) {
537
+ this.inertia = this._reload();
538
+ return 1 /* FiberState.LOADING */;
539
+ }
540
+ else {
541
+ this.inertia = this._unload();
542
+ return 5 /* FiberState.UNLOADING */;
543
+ }
544
+ });
545
+ }
546
+ _resolveConfig(config) {
547
+ config = this.context.waterfall(this, 'internal/config', config, () => config);
548
+ return this.runtime ? resolveConfig(this.runtime, config) : config;
549
+ }
550
+ async _reload() {
551
+ this.store = { ...this._store };
552
+ const oldEpoch = this._runner.epoch;
553
+ try {
554
+ await Promise.resolve();
555
+ // A disposer queued before this checkpoint may already have invalidated
556
+ // the load. Do not run plugin code for a stale epoch; the state update
557
+ // below will drain any effects collected while the fiber was PENDING.
558
+ if (this._runner.epoch === oldEpoch) {
559
+ this.config = this._resolveConfig(this._config);
560
+ await this._execute(this._runner);
561
+ this._error = undefined;
562
+ }
563
+ }
564
+ catch (reason) {
565
+ // impl guarantees that the error is non-null (?)
566
+ this.ctx.logger.error(reason);
567
+ this._error = reason;
568
+ this._runner.epoch = INACTIVE;
569
+ }
570
+ this._updateState(() => {
571
+ if (this._runner.epoch === oldEpoch) {
572
+ this.inertia = undefined;
573
+ }
574
+ else {
575
+ this.inertia = this._unload();
576
+ return 5 /* FiberState.UNLOADING */;
577
+ }
578
+ });
579
+ }
580
+ async _unload() {
581
+ await Promise.all(this._disposables.clear().map(async (dispose) => {
582
+ try {
583
+ await composeError(async (info) => {
584
+ await Promise.resolve();
585
+ info.error = new Error();
586
+ await runDisposable(dispose);
587
+ }, this._runner.getOuterStack);
588
+ }
589
+ catch (reason) {
590
+ this.ctx.logger.error(reason);
591
+ }
592
+ }));
593
+ this.store = undefined;
594
+ this._updateState(() => {
595
+ if (this._runner.epoch === INACTIVE) {
596
+ this.inertia = undefined;
597
+ }
598
+ else {
599
+ this.inertia = this._reload();
600
+ return 1 /* FiberState.LOADING */;
601
+ }
602
+ });
603
+ }
604
+ /**
605
+ * Wait for current lifecycle work and rethrow startup errors.
606
+ *
607
+ * @returns this fiber, once it has settled into a stable state.
608
+ * @throws the config-validation or plugin-startup error, if any.
609
+ */
610
+ async await() {
611
+ while (this.inertia) {
612
+ await this.inertia;
613
+ }
614
+ if (this._error)
615
+ throw this._error;
616
+ return this;
617
+ }
618
+ /**
619
+ * Dispose and immediately reload this plugin with its current config.
620
+ *
621
+ * @returns a promise resolving once the reload settled.
622
+ * @throws {CordisError} `INACTIVE_EFFECT` when the fiber is already disposed.
623
+ */
624
+ async restart() {
625
+ this.assertActive();
626
+ this._setEpoch(INACTIVE);
627
+ this._refresh();
628
+ await this.await();
629
+ }
630
+ /**
631
+ * Validate and apply new config, then restart the plugin.
632
+ *
633
+ * Runs the `internal/update` waterfall first, so update hooks (and HMR)
634
+ * can veto or replace the restart.
635
+ *
636
+ * @param config — the new raw config; validated before anything restarts.
637
+ * @param noSave — hint for persistence hooks not to write the change back.
638
+ * @returns the update waterfall result; the default restart returns a promise.
639
+ * @throws when validation, an update listener, or the restarted plugin fails.
640
+ */
641
+ update(config, noSave = false) {
642
+ this.assertActive();
643
+ this._config = config;
644
+ if (this.state !== 2 /* FiberState.ACTIVE */) {
645
+ // Config resolution may access injected services, so defer it until the
646
+ // fiber can activate.
647
+ this._error = undefined;
648
+ this._setEpoch(INACTIVE);
649
+ this._refresh();
650
+ return;
651
+ }
652
+ config = this._resolveConfig(config);
653
+ return this.context.waterfall(this, 'internal/update', config, noSave, () => {
654
+ this.config = config;
655
+ this._error = undefined;
656
+ return this.restart();
657
+ });
658
+ }
659
+ }
660
+ //# sourceMappingURL=fiber.js.map
@@ -0,0 +1,15 @@
1
+ /** Core context type and root context implementation. */
2
+ export * from './context.ts';
3
+ /** Event bus, dispatch modes, and event augmentation types. */
4
+ export * from './events.ts';
5
+ /** Plugin fiber lifecycle, effects, and config validation helpers. */
6
+ export * from './fiber.ts';
7
+ /** Logger facade, logger service, message, exporter, and formatting types. */
8
+ export * from './logger.ts';
9
+ /** Plugin registry, dependency injection, and plugin entrypoint types. */
10
+ export * from './registry.ts';
11
+ /** Base service class and service lifecycle symbols. */
12
+ export * from './service.ts';
13
+ /** Shared internal helpers used by context, services, and plugin fibers. */
14
+ export * from './utils.ts';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,15 @@
1
+ /** Core context type and root context implementation. */
2
+ export * from "./context.js";
3
+ /** Event bus, dispatch modes, and event augmentation types. */
4
+ export * from "./events.js";
5
+ /** Plugin fiber lifecycle, effects, and config validation helpers. */
6
+ export * from "./fiber.js";
7
+ /** Logger facade, logger service, message, exporter, and formatting types. */
8
+ export * from "./logger.js";
9
+ /** Plugin registry, dependency injection, and plugin entrypoint types. */
10
+ export * from "./registry.js";
11
+ /** Base service class and service lifecycle symbols. */
12
+ export * from "./service.js";
13
+ /** Shared internal helpers used by context, services, and plugin fibers. */
14
+ export * from "./utils.js";
15
+ //# sourceMappingURL=index.js.map