@nomix-ai/nomix-harness 0.2.4 → 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 +2 -2
  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 +37 -37
  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 +161 -161
  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 +50 -50
  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 +5 -5
  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 +7 -7
  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 +5 -5
  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 +3 -3
  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 +5 -5
  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 +19 -19
  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 +2 -2
  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 +15 -15
  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 +56 -56
  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 +12 -12
  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 +20 -20
  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 +15 -15
  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 +10 -10
  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 +39 -39
  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 +136 -136
  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 +30 -30
  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 +13 -13
  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 +54 -54
  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 +2 -2
  640. package/dist/kernel/sandbox-local/lib/types/index.d.ts +2 -2
  641. package/dist/kernel/sandbox-local/lib/types/index.js +2 -2
  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,56 @@
1
+ import { Context, Fiber, Inject } from '../../../../cordis/lib/index.js';
2
+ import { Loader } from '../index.ts';
3
+ import { EntryGroup } from './group.ts';
4
+ import { EntryTree } from './tree.ts';
5
+ /** Serialized plugin entry options stored in loader config files. */
6
+ export interface EntryOptions {
7
+ /** Stable id inside the containing entry tree. */
8
+ id: string;
9
+ /** Module specifier imported by the entry tree. */
10
+ name: string;
11
+ /** Config passed to the plugin. */
12
+ config?: any;
13
+ /** Marks this entry as a nested group. */
14
+ group?: boolean | null;
15
+ /** Prevents this entry and descendants from running. */
16
+ disabled?: boolean | null;
17
+ /** Required services or service intercept config for this entry. */
18
+ inject?: Inject | null;
19
+ }
20
+ /** One configured plugin node inside an `EntryTree`. */
21
+ export declare class Entry {
22
+ loader: Loader;
23
+ static readonly key: unique symbol;
24
+ ctx: Context;
25
+ fiber?: Fiber;
26
+ parent: EntryGroup;
27
+ options: EntryOptions;
28
+ subgroup?: EntryGroup;
29
+ subtree?: EntryTree;
30
+ _initTask?: Promise<void>;
31
+ _disposing: number;
32
+ constructor(loader: Loader);
33
+ get context(): Context;
34
+ get id(): string;
35
+ /** True when this entry or any owning parent entry is disabled. */
36
+ get disabled(): boolean;
37
+ private _disabled;
38
+ /**
39
+ * Effective disabled state: a `!!js` expression evaluates against the loader
40
+ * context. The raw node stays in the options, so write-back keeps the form.
41
+ */
42
+ private disabledOf;
43
+ evaluate(expr: string): any;
44
+ private _patchContext;
45
+ refresh(): Promise<void>;
46
+ _dispose(fiber?: Fiber | undefined): Promise<void>;
47
+ /** Merge new options, restart as needed, and persist through the parent tree. */
48
+ update(options: Partial<EntryOptions>, create?: boolean, force?: boolean): Promise<void>;
49
+ getOuterStack: () => string[];
50
+ /** Import and start the configured plugin if it is not already running. */
51
+ init(): Promise<void>;
52
+ _await(): Promise<void>;
53
+ private _init;
54
+ private _start;
55
+ }
56
+ //# sourceMappingURL=entry.d.ts.map
@@ -0,0 +1,283 @@
1
+ import { deepEqual, isNullable } from '../../../../cosmokit/lib/index.js';
2
+ import { EntryTree } from "./tree.js";
3
+ import { evaluate, isJsExpr } from "./utils.js";
4
+ function updateError(stage, options, cause) {
5
+ const detail = cause instanceof Error ? cause.message : String(cause);
6
+ return new Error(`failed to ${stage} loader entry ${options.id} (${options.name}): ${detail}`, { cause });
7
+ }
8
+ function takeEntries(object, keys) {
9
+ const result = [];
10
+ for (const key of keys) {
11
+ if (!(key in object))
12
+ continue;
13
+ result.push([key, object[key]]);
14
+ delete object[key];
15
+ }
16
+ return result;
17
+ }
18
+ function sortKeys(object, prepend = ['id', 'name'], append = ['config']) {
19
+ const part1 = takeEntries(object, prepend);
20
+ const part2 = takeEntries(object, append);
21
+ const rest = takeEntries(object, Object.keys(object)).sort(([a], [b]) => a.localeCompare(b));
22
+ return Object.assign(object, Object.fromEntries([...part1, ...rest, ...part2]));
23
+ }
24
+ function replaceKeys(target, source) {
25
+ for (const key of Object.keys(target))
26
+ Reflect.deleteProperty(target, key);
27
+ return Object.assign(target, source);
28
+ }
29
+ /** One configured plugin node inside an `EntryTree`. */
30
+ export class Entry {
31
+ loader;
32
+ static key = Symbol.for('cordis.entry');
33
+ ctx;
34
+ fiber;
35
+ parent;
36
+ // safety: call `entry.update()` immediately after creating an entry
37
+ options = {};
38
+ subgroup;
39
+ subtree;
40
+ _initTask;
41
+ _disposing = 0;
42
+ constructor(loader) {
43
+ this.loader = loader;
44
+ this.ctx = loader.ctx.extend({ [Entry.key]: this });
45
+ this.context.emit('loader/entry-init', this);
46
+ }
47
+ get context() {
48
+ return this.ctx;
49
+ }
50
+ get id() {
51
+ let id = this.options.id;
52
+ if (this.parent.tree.ctx.fiber.entry) {
53
+ id = this.parent.tree.ctx.fiber.entry.id + EntryTree.sep + id;
54
+ }
55
+ return id;
56
+ }
57
+ /** True when this entry or any owning parent entry is disabled. */
58
+ get disabled() {
59
+ return this._disabled(this.options);
60
+ }
61
+ _disabled(options) {
62
+ // group is always enabled
63
+ if (options.group)
64
+ return false;
65
+ if (this.disabledOf(options))
66
+ return true;
67
+ let entry = this.parent.ctx.fiber.entry;
68
+ while (entry) {
69
+ if (this.disabledOf(entry.options))
70
+ return true;
71
+ entry = entry.parent.ctx.fiber.entry;
72
+ }
73
+ return false;
74
+ }
75
+ /**
76
+ * Effective disabled state: a `!!js` expression evaluates against the loader
77
+ * context. The raw node stays in the options, so write-back keeps the form.
78
+ */
79
+ disabledOf(options) {
80
+ return isJsExpr(options.disabled)
81
+ ? Boolean(this.evaluate(options.disabled.__jsExpr))
82
+ : Boolean(options.disabled);
83
+ }
84
+ evaluate(expr) {
85
+ return evaluate(this.ctx, expr);
86
+ }
87
+ async _patchContext(diff) {
88
+ await this.context.waterfall('loader/patch-context', this, async () => {
89
+ Object.setPrototypeOf(this.ctx, this.parent.ctx);
90
+ if (this.fiber?.uid && (diff.includes('config') || this.options.group)) {
91
+ await this.fiber.update(this.options.config, true);
92
+ }
93
+ });
94
+ }
95
+ async refresh() {
96
+ if (this.fiber)
97
+ return;
98
+ if (this.disabled)
99
+ return;
100
+ await this.init();
101
+ }
102
+ async _dispose(fiber = this.fiber) {
103
+ if (!fiber)
104
+ return;
105
+ if (this.fiber === fiber)
106
+ this.fiber = undefined;
107
+ this._disposing += 1;
108
+ try {
109
+ await fiber.dispose();
110
+ }
111
+ finally {
112
+ this._disposing -= 1;
113
+ }
114
+ }
115
+ /** Merge new options, restart as needed, and persist through the parent tree. */
116
+ async update(options, create = false, force = false) {
117
+ const previousOptions = this.options;
118
+ const legacy = { ...previousOptions };
119
+ const candidate = create ? options : { ...previousOptions };
120
+ if (!create) {
121
+ for (const [key, value] of Object.entries(options)) {
122
+ if (isNullable(value)) {
123
+ delete candidate[key];
124
+ }
125
+ else {
126
+ candidate[key] = value;
127
+ }
128
+ }
129
+ }
130
+ sortKeys(candidate);
131
+ const diff = Object
132
+ .keys({ ...candidate, ...legacy })
133
+ .filter(key => !deepEqual(candidate[key], legacy[key]));
134
+ if (!diff.length && !force)
135
+ return;
136
+ const commit = () => {
137
+ if (create)
138
+ return;
139
+ this.options = replaceKeys(previousOptions, candidate);
140
+ };
141
+ const previous = this.fiber;
142
+ if (!previous?.uid) {
143
+ this.fiber = undefined;
144
+ this.options = candidate;
145
+ try {
146
+ if (!this._disabled(candidate))
147
+ await this.init();
148
+ }
149
+ catch (error) {
150
+ this.options = previousOptions;
151
+ throw error;
152
+ }
153
+ commit();
154
+ return;
155
+ }
156
+ if (this._disabled(candidate)) {
157
+ this.options = candidate;
158
+ try {
159
+ await this._dispose(previous);
160
+ }
161
+ catch (error) {
162
+ this.options = previousOptions;
163
+ throw updateError('dispose', candidate, error);
164
+ }
165
+ commit();
166
+ this.context.emit('loader/partial-dispose', this, legacy, true);
167
+ return;
168
+ }
169
+ const replace = diff.some(key => key === 'name' || key === 'inject' || key === 'group');
170
+ if (!replace) {
171
+ this.options = candidate;
172
+ try {
173
+ await this._patchContext(diff);
174
+ }
175
+ catch (error) {
176
+ this.options = previousOptions;
177
+ try {
178
+ await this._patchContext(diff);
179
+ }
180
+ catch (rollbackError) {
181
+ throw updateError('rollback', legacy, new AggregateError([error, rollbackError]));
182
+ }
183
+ this.context.emit('loader/partial-dispose', this, candidate, true);
184
+ throw updateError('apply', candidate, error);
185
+ }
186
+ commit();
187
+ this.context.emit('loader/partial-dispose', this, legacy, true);
188
+ return;
189
+ }
190
+ let plugin;
191
+ try {
192
+ plugin = diff.includes('name')
193
+ ? this.loader.unwrapExports(await this.parent.tree.import(candidate.name, this.getOuterStack))
194
+ : previous.runtime.callback;
195
+ }
196
+ catch (error) {
197
+ throw updateError('import', candidate, error);
198
+ }
199
+ const previousPlugin = previous.runtime.callback;
200
+ this.options = candidate;
201
+ try {
202
+ await this._dispose(previous);
203
+ }
204
+ catch (error) {
205
+ this.options = previousOptions;
206
+ throw updateError('dispose', candidate, error);
207
+ }
208
+ try {
209
+ await this._start(plugin);
210
+ }
211
+ catch (error) {
212
+ this.options = previousOptions;
213
+ try {
214
+ await this._start(previousPlugin);
215
+ }
216
+ catch (rollbackError) {
217
+ throw updateError('rollback', legacy, new AggregateError([error, rollbackError]));
218
+ }
219
+ this.context.emit('loader/partial-dispose', this, candidate, true);
220
+ throw updateError('apply', candidate, error);
221
+ }
222
+ commit();
223
+ this.context.emit('loader/partial-dispose', this, legacy, true);
224
+ }
225
+ getOuterStack = () => {
226
+ let entry = this;
227
+ const result = [];
228
+ do {
229
+ result.push(` at ${entry.parent.tree.ctx.baseUrl}#${entry.options.id}`);
230
+ entry = entry.parent.ctx.fiber.entry;
231
+ } while (entry);
232
+ return result;
233
+ };
234
+ /** Import and start the configured plugin if it is not already running. */
235
+ async init() {
236
+ try {
237
+ await (this._initTask ??= this._init());
238
+ }
239
+ finally {
240
+ this._initTask = undefined;
241
+ if (!this.loader.getTasks().length)
242
+ this.ctx.reflect.notify(['loader']);
243
+ }
244
+ await this._await();
245
+ }
246
+ async _await() {
247
+ try {
248
+ await this.fiber?.await();
249
+ }
250
+ catch (error) {
251
+ throw updateError('apply', this.options, error);
252
+ }
253
+ }
254
+ async _init() {
255
+ let plugin;
256
+ try {
257
+ plugin = this.loader.unwrapExports(await this.parent.tree.import(this.options.name, this.getOuterStack));
258
+ }
259
+ catch (error) {
260
+ throw updateError('import', this.options, error);
261
+ }
262
+ try {
263
+ await this._start(plugin);
264
+ }
265
+ catch (error) {
266
+ throw updateError('apply', this.options, error);
267
+ }
268
+ }
269
+ async _start(plugin) {
270
+ let fiber;
271
+ try {
272
+ await this._patchContext([]);
273
+ this.loader.showLog(this, 'apply');
274
+ fiber = this.fiber = this.ctx.registry.plugin(plugin, this.options.config, this.getOuterStack);
275
+ await fiber.await();
276
+ }
277
+ catch (error) {
278
+ await this._dispose(fiber);
279
+ throw error;
280
+ }
281
+ }
282
+ }
283
+ //# sourceMappingURL=entry.js.map
@@ -0,0 +1,27 @@
1
+ import { Context, Service } from '../../../../cordis/lib/index.js';
2
+ import { type EntryOptions } from './entry.ts';
3
+ import { EntryTree } from './tree.ts';
4
+ /** Runtime owner for a list of child loader entries. */
5
+ export declare class EntryGroup {
6
+ ctx: Context;
7
+ tree: EntryTree;
8
+ static readonly key: unique symbol;
9
+ data: EntryOptions[];
10
+ constructor(ctx: Context, tree: EntryTree);
11
+ get context(): Context;
12
+ create(options: Omit<EntryOptions, 'id'>): Promise<string>;
13
+ unlink(options: EntryOptions): void;
14
+ remove(id: string, isDispose?: boolean): Promise<void>;
15
+ update(config: EntryOptions[]): Promise<void>;
16
+ stop(): Promise<void>;
17
+ }
18
+ /** Plugin that mounts a nested loader entry group. */
19
+ export declare class Group extends EntryGroup {
20
+ ctx: Context;
21
+ config: EntryOptions[];
22
+ static initial: Omit<EntryOptions, 'id'>[];
23
+ static readonly [EntryGroup.key] = true;
24
+ constructor(ctx: Context, config: EntryOptions[]);
25
+ [Service.init](): AsyncGenerator<() => Promise<void>, void, unknown>;
26
+ }
27
+ //# sourceMappingURL=group.d.ts.map
@@ -0,0 +1,139 @@
1
+ import { Service } from '../../../../cordis/lib/index.js';
2
+ import { Entry } from "./entry.js";
3
+ /** Runtime owner for a list of child loader entries. */
4
+ export class EntryGroup {
5
+ ctx;
6
+ tree;
7
+ static key = Symbol.for('cordis.group');
8
+ data = [];
9
+ constructor(ctx, tree) {
10
+ this.ctx = ctx;
11
+ this.tree = tree;
12
+ const entry = ctx.fiber.entry;
13
+ if (entry)
14
+ entry.subgroup = this;
15
+ }
16
+ get context() {
17
+ return this.ctx;
18
+ }
19
+ async create(options) {
20
+ const id = this.tree.ensureId(options);
21
+ const existing = this.tree.store[id];
22
+ const entry = existing ?? (this.tree.store[id] = new Entry(this.ctx.loader));
23
+ const previousParent = entry.parent;
24
+ // Entry may be moved from another group,
25
+ // so we need to update the parent reference.
26
+ entry.parent = this;
27
+ // Use `create: true` to replace existing entry.options.
28
+ try {
29
+ await entry.update(options, true, true);
30
+ }
31
+ catch (error) {
32
+ if (existing) {
33
+ entry.parent = previousParent;
34
+ }
35
+ else {
36
+ delete this.tree.store[id];
37
+ }
38
+ throw error;
39
+ }
40
+ return entry.id;
41
+ }
42
+ unlink(options) {
43
+ const config = this.data;
44
+ const index = config.indexOf(options);
45
+ if (index >= 0)
46
+ config.splice(index, 1);
47
+ }
48
+ async remove(id, isDispose = false) {
49
+ const entry = this.tree.store[id];
50
+ if (!entry)
51
+ return;
52
+ await entry._dispose();
53
+ if (!isDispose) {
54
+ this.unlink(entry.options);
55
+ }
56
+ delete this.tree.store[id];
57
+ this.context.emit('loader/partial-dispose', entry, entry.options, false);
58
+ }
59
+ async update(config) {
60
+ const oldConfig = this.data;
61
+ const seen = new Set();
62
+ for (const options of config) {
63
+ const id = this.tree.ensureId(options);
64
+ if (seen.has(id))
65
+ throw new TypeError(`duplicate loader entry id: ${id}`);
66
+ seen.add(id);
67
+ }
68
+ const oldMap = Object.fromEntries(oldConfig.map(options => [options.id, options]));
69
+ const newMap = Object.fromEntries(config.map(options => [options.id, options]));
70
+ try {
71
+ const outcomes = await Promise.allSettled(config.map(options => this.create(options)));
72
+ // Disposal owns termination: sibling starts can still be settling after
73
+ // the containing tree has gone away, but their failures no longer
74
+ // describe a live update to roll back.
75
+ if (this.ctx.fiber.uid === null)
76
+ return;
77
+ const failures = outcomes
78
+ .filter((outcome) => outcome.status === 'rejected')
79
+ .map(outcome => outcome.reason);
80
+ if (failures.length === 1)
81
+ throw failures[0];
82
+ if (failures.length > 1)
83
+ throw new AggregateError(failures, 'loader entries failed to apply');
84
+ for (const id of Object.keys(oldMap)) {
85
+ if (!newMap[id])
86
+ await this.remove(id, true);
87
+ }
88
+ this.data = config;
89
+ }
90
+ catch (error) {
91
+ const rollbackErrors = [];
92
+ for (const id of Object.keys(newMap).reverse()) {
93
+ if (oldMap[id])
94
+ continue;
95
+ try {
96
+ await this.remove(id, true);
97
+ }
98
+ catch (rollbackError) {
99
+ rollbackErrors.push(rollbackError);
100
+ }
101
+ }
102
+ for (const options of oldConfig) {
103
+ try {
104
+ await this.create(options);
105
+ }
106
+ catch (rollbackError) {
107
+ rollbackErrors.push(rollbackError);
108
+ }
109
+ }
110
+ this.data = oldConfig;
111
+ if (rollbackErrors.length)
112
+ throw new AggregateError([error, ...rollbackErrors], 'loader entry rollback failed');
113
+ throw error;
114
+ }
115
+ }
116
+ async stop() {
117
+ for (const options of this.data) {
118
+ await this.remove(options.id, true);
119
+ }
120
+ }
121
+ }
122
+ /** Plugin that mounts a nested loader entry group. */
123
+ export class Group extends EntryGroup {
124
+ ctx;
125
+ config;
126
+ static initial = [];
127
+ static [EntryGroup.key] = true;
128
+ constructor(ctx, config) {
129
+ super(ctx, ctx.fiber.entry.parent.tree);
130
+ this.ctx = ctx;
131
+ this.config = config;
132
+ ctx.on('internal/update', config => this.update(config));
133
+ }
134
+ async *[Service.init]() {
135
+ yield () => this.stop();
136
+ await this.update(this.config);
137
+ }
138
+ }
139
+ //# sourceMappingURL=group.js.map
@@ -0,0 +1,35 @@
1
+ import { Context } from '../../../../cordis/lib/index.js';
2
+ import type { Dict } from '../../../../cosmokit/lib/index.js';
3
+ import { Entry } from './entry.ts';
4
+ declare module './entry.ts' {
5
+ interface EntryOptions {
6
+ intercept?: Dict | null;
7
+ isolate?: Dict<true | string> | null;
8
+ }
9
+ interface Entry {
10
+ realm: LocalRealm;
11
+ }
12
+ }
13
+ /** Symbol realm used to isolate service implementations by entry or label. */
14
+ export declare abstract class Realm {
15
+ protected store: Dict<symbol>;
16
+ abstract get suffix(): string;
17
+ access(key: string, create?: boolean): symbol;
18
+ delete(key: string): void;
19
+ get size(): number;
20
+ }
21
+ /** Entry-local isolation realm. */
22
+ export declare class LocalRealm extends Realm {
23
+ private entry;
24
+ constructor(entry: Entry);
25
+ get suffix(): string;
26
+ }
27
+ /** Named isolation realm shared by entries that use the same label. */
28
+ export declare class GlobalRealm extends Realm {
29
+ label: string;
30
+ constructor(label: string);
31
+ get suffix(): string;
32
+ }
33
+ /** Install loader hooks that apply `intercept` and `isolate` entry options. */
34
+ export default function isolate(ctx: Context): void;
35
+ //# sourceMappingURL=isolate.d.ts.map
@@ -0,0 +1,151 @@
1
+ import { Context } from '../../../../cordis/lib/index.js';
2
+ function swap(target, source) {
3
+ for (const key of Reflect.ownKeys(target)) {
4
+ Reflect.deleteProperty(target, key);
5
+ }
6
+ for (const key of Reflect.ownKeys(source || {})) {
7
+ Reflect.defineProperty(target, key, Reflect.getOwnPropertyDescriptor(source, key));
8
+ }
9
+ }
10
+ /** Symbol realm used to isolate service implementations by entry or label. */
11
+ export class Realm {
12
+ store = Object.create(null);
13
+ access(key, create = false) {
14
+ if (create) {
15
+ return this.store[key] ??= Symbol(`${key}${this.suffix}`);
16
+ }
17
+ else {
18
+ return this.store[key] ?? Symbol(`${key}${this.suffix}`);
19
+ }
20
+ }
21
+ delete(key) {
22
+ delete this.store[key];
23
+ }
24
+ get size() {
25
+ return Object.keys(this.store).length;
26
+ }
27
+ }
28
+ /** Entry-local isolation realm. */
29
+ export class LocalRealm extends Realm {
30
+ entry;
31
+ constructor(entry) {
32
+ super();
33
+ this.entry = entry;
34
+ }
35
+ get suffix() {
36
+ return '#' + this.entry.options.id;
37
+ }
38
+ }
39
+ /** Named isolation realm shared by entries that use the same label. */
40
+ export class GlobalRealm extends Realm {
41
+ label;
42
+ constructor(label) {
43
+ super();
44
+ this.label = label;
45
+ }
46
+ get suffix() {
47
+ return '@' + this.label;
48
+ }
49
+ }
50
+ /** Install loader hooks that apply `intercept` and `isolate` entry options. */
51
+ export default function isolate(ctx) {
52
+ const realms = Object.create(null);
53
+ const delims = Object.create(null);
54
+ function access(entry, name, create = false) {
55
+ let realm;
56
+ const label = entry.options.isolate?.[name];
57
+ if (!label)
58
+ return;
59
+ if (label === true) {
60
+ realm = entry.realm ??= new LocalRealm(entry);
61
+ }
62
+ else if (create) {
63
+ realm = realms[label] ??= new GlobalRealm(label);
64
+ }
65
+ else {
66
+ realm = realms[label];
67
+ }
68
+ return realm?.access(name, create);
69
+ }
70
+ ctx.on('loader/entry-init', (entry) => {
71
+ entry.ctx[Context.intercept] = Object.create(entry.ctx[Context.intercept]);
72
+ entry.ctx[Context.isolate] = Object.create(entry.ctx[Context.isolate]);
73
+ });
74
+ ctx.on('loader/patch-context', async (entry, next) => {
75
+ // step 1: generate new isolate map
76
+ const newMap = Object.create(entry.parent.ctx[Context.isolate]);
77
+ for (const name of Object.keys(entry.options.isolate ?? {})) {
78
+ newMap[name] = access(entry, name, true);
79
+ }
80
+ // step 2: generate service diff
81
+ const diff = Object.create(null);
82
+ const oldMap = entry.ctx[Context.isolate];
83
+ for (const name in { ...newMap, ...delims }) {
84
+ if (newMap[name] === oldMap[name])
85
+ continue;
86
+ const delim = delims[name] ??= Symbol(`delim:${name}`);
87
+ entry.ctx[delim] = Symbol(`${name}#${entry.id}`);
88
+ for (const symbol of [oldMap[name], newMap[name]]) {
89
+ const impl = symbol && entry.ctx.reflect.store[symbol];
90
+ if (!impl)
91
+ continue;
92
+ if (!impl.fiber) {
93
+ entry.ctx.logger.warn(new Error(`expected service ${name} to be implemented`));
94
+ continue;
95
+ }
96
+ diff[name] = [oldMap[name], newMap[name], entry.ctx[delim], impl.fiber.ctx[delim]];
97
+ if (entry.ctx[delim] !== impl.fiber.ctx[delim])
98
+ break;
99
+ }
100
+ }
101
+ // step 3: set prototype for transferred context
102
+ Object.setPrototypeOf(entry.ctx[Context.isolate], entry.parent.ctx[Context.isolate]);
103
+ Object.setPrototypeOf(entry.ctx[Context.intercept], entry.parent.ctx[Context.intercept]);
104
+ swap(entry.ctx[Context.isolate], newMap);
105
+ swap(entry.ctx[Context.intercept], entry.options.intercept);
106
+ // step 4: reload fiber
107
+ await next();
108
+ // step 5: replace service impl
109
+ for (const [symbol1, symbol2, flag1, flag2] of Object.values(diff)) {
110
+ if (flag1 === flag2 && entry.ctx.reflect.store[symbol1] && !entry.ctx.reflect.store[symbol2]) {
111
+ entry.ctx.reflect.store[symbol2] = entry.ctx.reflect.store[symbol1];
112
+ delete entry.ctx.reflect.store[symbol1];
113
+ }
114
+ }
115
+ // step 6: reflect notify
116
+ ctx.reflect.notify(Object.keys(diff), (ctx, name) => {
117
+ const [symbol1, symbol2, flag1, flag2] = diff[name];
118
+ const symbol3 = ctx[Context.isolate][name];
119
+ const flag3 = ctx[delims[name]];
120
+ return (symbol1 === symbol3 || symbol2 === symbol3) && (flag1 === flag3) !== (flag1 === flag2);
121
+ });
122
+ // step 7: clean up delimiters
123
+ for (const name in delims) {
124
+ if (!Reflect.ownKeys(newMap).includes(name)) {
125
+ delete entry.ctx[delims[name]];
126
+ }
127
+ }
128
+ });
129
+ ctx.on('loader/partial-dispose', (entry, legacy, active) => {
130
+ for (const [name, label] of Object.entries(legacy.isolate ?? {})) {
131
+ if (label === true)
132
+ continue;
133
+ if (active && entry.options.isolate?.[name] === label)
134
+ continue;
135
+ const realm = realms[label];
136
+ if (!realm)
137
+ continue;
138
+ // realm garbage collection
139
+ for (const entry of ctx.loader.entries()) {
140
+ // has reference to this realm
141
+ if (entry.options.isolate?.[name] === realm.label)
142
+ return;
143
+ }
144
+ realm.delete(name);
145
+ if (!realm.size) {
146
+ delete realms[realm.label];
147
+ }
148
+ }
149
+ });
150
+ }
151
+ //# sourceMappingURL=isolate.js.map