@nomix-ai/nomix-harness 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/builtin-registry.d.ts +1 -1
- package/dist/cli/builtin-registry.js +10 -0
- package/dist/cli/profile-boot.d.ts +2 -2
- package/dist/kernel/acp/lib/index.js +1 -1
- package/dist/kernel/acp/lib/types/content.d.ts +1 -1
- package/dist/kernel/acp/lib/types/index.d.ts +2 -2
- package/dist/kernel/acp/lib/types/index.js +1 -1
- package/dist/kernel/acp/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/acp/package.json +1 -1
- package/dist/kernel/agent/lib/index.js +1 -1
- package/dist/kernel/agent/lib/types/dispatch.d.ts +1 -1
- package/dist/kernel/agent/lib/types/index.d.ts +1 -1
- package/dist/kernel/agent/lib/types/index.js +1 -1
- package/dist/kernel/agent/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/agent/lib/types/model-selection.d.ts +1 -1
- package/dist/kernel/agent/lib/types/runtime-types.d.ts +1 -1
- package/dist/kernel/agent/package.json +1 -1
- package/dist/kernel/agent-default-model/lib/index.js +2 -2
- package/dist/kernel/agent-default-model/lib/types/index.d.ts +2 -2
- package/dist/kernel/agent-default-model/lib/types/index.js +2 -2
- package/dist/kernel/agent-default-model/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/agent-default-model/package.json +1 -1
- package/dist/kernel/agent-instructions/lib/index.js +1 -1
- package/dist/kernel/agent-instructions/lib/types/config.d.ts +1 -1
- package/dist/kernel/agent-instructions/lib/types/config.js +1 -1
- package/dist/kernel/agent-instructions/lib/types/index.d.ts +1 -1
- package/dist/kernel/agent-instructions/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/agent-instructions/package.json +1 -1
- package/dist/kernel/agent-loop/lib/index.js +2 -2
- package/dist/kernel/agent-loop/lib/types/agent.d.ts +1 -1
- package/dist/kernel/agent-loop/lib/types/index.d.ts +2 -2
- package/dist/kernel/agent-loop/lib/types/index.js +2 -2
- package/dist/kernel/agent-loop/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/agent-loop/lib/types/runtime-context.d.ts +1 -1
- package/dist/kernel/agent-loop/lib/types/tool-calls.d.ts +1 -1
- package/dist/kernel/agent-loop/package.json +1 -1
- package/dist/kernel/agent-presets/lib/index.js +3 -3
- package/dist/kernel/agent-presets/lib/invariant.js +3 -3
- package/dist/kernel/agent-presets/lib/types/discovery.js +1 -1
- package/dist/kernel/agent-presets/lib/types/index.d.ts +2 -2
- package/dist/kernel/agent-presets/lib/types/index.js +2 -2
- package/dist/kernel/agent-presets/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/agent-presets/lib/types/mount.d.ts +2 -2
- package/dist/kernel/agent-presets/lib/types/mount.js +2 -2
- package/dist/kernel/agent-presets/package.json +1 -1
- package/dist/kernel/agent-tool-presentation/lib/index.js +1 -1
- package/dist/kernel/agent-tool-presentation/lib/types/index.d.ts +2 -2
- package/dist/kernel/agent-tool-presentation/lib/types/index.js +1 -1
- package/dist/kernel/agent-tool-presentation/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/agent-tool-presentation/package.json +1 -1
- package/dist/kernel/anonymous-user-id/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/anonymous-user-id/package.json +1 -1
- package/dist/kernel/api-gateway/lib/index.js +1 -1
- package/dist/kernel/api-gateway/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/api-gateway/lib/types/client/index.js +1 -1
- package/dist/kernel/api-gateway/lib/types/index.d.ts +1 -1
- package/dist/kernel/api-gateway/lib/types/index.js +1 -1
- package/dist/kernel/api-gateway/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/api-gateway/package.json +1 -1
- package/dist/kernel/api-remotes/lib/types/agent-lookup.d.ts +1 -1
- package/dist/kernel/api-remotes/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/api-remotes/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/api-remotes/package.json +1 -1
- package/dist/kernel/app-boot/lib/index.js +4 -4
- package/dist/kernel/app-boot/lib/types/index.d.ts +3 -3
- package/dist/kernel/app-boot/lib/types/index.js +4 -4
- package/dist/kernel/app-boot/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/app-boot/lib/types/profile.d.ts +2 -2
- package/dist/kernel/app-boot/lib/types/profile.js +2 -2
- package/dist/kernel/app-boot/package.json +1 -1
- package/dist/kernel/atomic-write/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/atomic-write/package.json +1 -1
- package/dist/kernel/attachment/lib/index.js +1 -1
- package/dist/kernel/attachment/lib/types/index.d.ts +1 -1
- package/dist/kernel/attachment/lib/types/index.js +1 -1
- package/dist/kernel/attachment/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/attachment/package.json +1 -1
- package/dist/kernel/attachment-local/lib/index.js +1 -1
- package/dist/kernel/attachment-local/lib/types/index.d.ts +2 -2
- package/dist/kernel/attachment-local/lib/types/index.js +1 -1
- package/dist/kernel/attachment-local/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/attachment-local/package.json +1 -1
- package/dist/kernel/base/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/base/package.json +1 -1
- package/dist/kernel/bash-local/lib/index.js +1 -1
- package/dist/kernel/bash-local/lib/types/index.d.ts +2 -2
- package/dist/kernel/bash-local/lib/types/index.js +1 -1
- package/dist/kernel/bash-local/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/bash-local/package.json +1 -1
- package/dist/kernel/bash-sandbox/lib/types/index.d.ts +1 -1
- package/dist/kernel/bash-sandbox/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/bash-sandbox/package.json +1 -1
- package/dist/kernel/brand/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/brand/package.json +1 -1
- package/dist/kernel/client-connection/lib/index.js +2 -2
- package/dist/kernel/client-connection/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-connection/lib/types/index.d.ts +2 -2
- package/dist/kernel/client-connection/lib/types/index.js +1 -1
- package/dist/kernel/client-connection/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-connection/lib/types/rpc-host.d.ts +1 -1
- package/dist/kernel/client-connection/lib/types/rpc-host.js +1 -1
- package/dist/kernel/client-connection/package.json +1 -1
- package/dist/kernel/client-hmr/lib/index.js +1 -1
- package/dist/kernel/client-hmr/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-hmr/lib/types/index.d.ts +2 -2
- package/dist/kernel/client-hmr/lib/types/index.js +1 -1
- package/dist/kernel/client-hmr/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-hmr/package.json +1 -1
- package/dist/kernel/client-locale/lib/client.js +1 -1
- package/dist/kernel/client-locale/lib/index.js +1 -1
- package/dist/kernel/client-locale/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-locale/lib/types/index.d.ts +1 -1
- package/dist/kernel/client-locale/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-locale/lib/types/locale-settings.d.ts +1 -1
- package/dist/kernel/client-locale/lib/types/locale-settings.js +1 -1
- package/dist/kernel/client-locale/package.json +1 -1
- package/dist/kernel/client-modules/lib/index.js +1 -1
- package/dist/kernel/client-modules/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-modules/lib/types/index.d.ts +2 -2
- package/dist/kernel/client-modules/lib/types/index.js +1 -1
- package/dist/kernel/client-modules/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-modules/package.json +1 -1
- package/dist/kernel/client-runtime/lib/types/client/agents/scope.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/agents/scope.js +1 -1
- package/dist/kernel/client-runtime/lib/types/client/contract/sessions.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/conversation/definition-registry.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/conversation/definition-registry.js +1 -1
- package/dist/kernel/client-runtime/lib/types/client/conversation/event-registry.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/conversation/view-registry.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/sessions/remotes.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/sessions/service.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/sessions/session.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/slots.d.ts +2 -2
- package/dist/kernel/client-runtime/lib/types/client/slots.js +1 -1
- package/dist/kernel/client-runtime/lib/types/client/workspaces/service.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-runtime/package.json +1 -1
- package/dist/kernel/client-schema-form/lib/index.js +1 -1
- package/dist/kernel/client-schema-form/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-schema-form/lib/types/model.d.ts +1 -1
- package/dist/kernel/client-schema-form/lib/types/model.js +1 -1
- package/dist/kernel/client-schema-form/package.json +1 -1
- package/dist/kernel/client-ui-agent-preset/lib/client.js +36 -36
- package/dist/kernel/client-ui-agent-preset/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-agent-preset/package.json +1 -1
- package/dist/kernel/client-ui-attachment/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-attachment/package.json +1 -1
- package/dist/kernel/client-ui-commands/lib/client.js +7 -7
- package/dist/kernel/client-ui-commands/lib/types/client/service.d.ts +2 -2
- package/dist/kernel/client-ui-commands/lib/types/client/service.js +1 -1
- package/dist/kernel/client-ui-commands/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-commands/package.json +1 -1
- package/dist/kernel/client-ui-conversation/lib/client.js +156 -156
- package/dist/kernel/client-ui-conversation/lib/index.js +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/apply.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/register-node-renderers.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/assistant.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/chat-snapshot-builder.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/command.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/compaction.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/fallback.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/inbox.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/message.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/register.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/retry.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/tool.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/turn-error.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/turn-max-tokens.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/turn-tail.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/queue/QueueDock.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/service.d.ts +2 -2
- package/dist/kernel/client-ui-conversation/lib/types/client/service.js +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/TodoPanel.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/index.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/submission-settings.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/submission-settings.js +1 -1
- package/dist/kernel/client-ui-conversation/package.json +1 -1
- package/dist/kernel/client-ui-cordis/lib/client.js +48 -48
- package/dist/kernel/client-ui-cordis/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-cordis/package.json +1 -1
- package/dist/kernel/client-ui-deliverables/lib/client.js +4 -4
- package/dist/kernel/client-ui-deliverables/lib/types/index.d.ts +1 -1
- package/dist/kernel/client-ui-deliverables/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-deliverables/package.json +1 -1
- package/dist/kernel/client-ui-directory-picker-browse/lib/client.js +29 -29
- package/dist/kernel/client-ui-directory-picker-browse/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-directory-picker-browse/package.json +1 -1
- package/dist/kernel/client-ui-directory-picker-native/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-directory-picker-native/package.json +1 -1
- package/dist/kernel/client-ui-goal/lib/client.js +8 -8
- package/dist/kernel/client-ui-goal/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-goal/package.json +1 -1
- package/dist/kernel/client-ui-input-trigger/lib/client.js +7 -7
- package/dist/kernel/client-ui-input-trigger/lib/types/client/service.d.ts +2 -2
- package/dist/kernel/client-ui-input-trigger/lib/types/client/service.js +1 -1
- package/dist/kernel/client-ui-input-trigger/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-input-trigger/package.json +1 -1
- package/dist/kernel/client-ui-jobs/lib/client.js +8 -8
- package/dist/kernel/client-ui-jobs/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-jobs/package.json +1 -1
- package/dist/kernel/client-ui-layout/lib/client.js +2 -2
- package/dist/kernel/client-ui-layout/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-layout/package.json +1 -1
- package/dist/kernel/client-ui-message-feedback/lib/client.js +4 -4
- package/dist/kernel/client-ui-message-feedback/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-message-feedback/package.json +1 -1
- package/dist/kernel/client-ui-model-selection/lib/client.js +16 -16
- package/dist/kernel/client-ui-model-selection/lib/types/client/service.d.ts +2 -2
- package/dist/kernel/client-ui-model-selection/lib/types/client/service.js +1 -1
- package/dist/kernel/client-ui-model-selection/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-model-selection/package.json +1 -1
- package/dist/kernel/client-ui-permission-presets/lib/client.js +3 -3
- package/dist/kernel/client-ui-permission-presets/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-permission-presets/package.json +1 -1
- package/dist/kernel/client-ui-plan/lib/client.js +2 -2
- package/dist/kernel/client-ui-plan/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-plan/package.json +1 -1
- package/dist/kernel/client-ui-primitives/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-primitives/package.json +1 -1
- package/dist/kernel/client-ui-settings/lib/types/client/settings-scope.d.ts +2 -2
- package/dist/kernel/client-ui-settings/lib/types/client/settings-scope.js +1 -1
- package/dist/kernel/client-ui-settings/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-settings/package.json +1 -1
- package/dist/kernel/client-ui-settings-general/lib/client.js +16 -16
- package/dist/kernel/client-ui-settings-general/lib/index.js +1 -1
- package/dist/kernel/client-ui-settings-general/lib/types/index.d.ts +1 -1
- package/dist/kernel/client-ui-settings-general/lib/types/index.js +1 -1
- package/dist/kernel/client-ui-settings-general/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-settings-general/package.json +1 -1
- package/dist/kernel/client-ui-settings-models/lib/client.js +55 -55
- package/dist/kernel/client-ui-settings-models/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-settings-models/package.json +1 -1
- package/dist/kernel/client-ui-settings-plugin-inventory/lib/client.js +11 -11
- package/dist/kernel/client-ui-settings-plugin-inventory/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-settings-plugin-inventory/package.json +1 -1
- package/dist/kernel/client-ui-settings-plugins/lib/client.js +21 -21
- package/dist/kernel/client-ui-settings-plugins/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-settings-plugins/package.json +1 -1
- package/dist/kernel/client-ui-sidebar/lib/client.js +14 -14
- package/dist/kernel/client-ui-sidebar/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-sidebar/package.json +1 -1
- package/dist/kernel/client-ui-skill/lib/client.js +12 -12
- package/dist/kernel/client-ui-skill/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-skill/package.json +1 -1
- package/dist/kernel/client-ui-slots/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-slots/package.json +1 -1
- package/dist/kernel/client-ui-subagent/lib/client.js +17 -17
- package/dist/kernel/client-ui-subagent/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-subagent/package.json +1 -1
- package/dist/kernel/client-ui-theme/lib/client.js +3 -3
- package/dist/kernel/client-ui-theme/lib/index.js +1 -1
- package/dist/kernel/client-ui-theme/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-ui-theme/lib/types/index.d.ts +1 -1
- package/dist/kernel/client-ui-theme/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-theme/lib/types/theme-settings.d.ts +1 -1
- package/dist/kernel/client-ui-theme/lib/types/theme-settings.js +1 -1
- package/dist/kernel/client-ui-theme/package.json +1 -1
- package/dist/kernel/client-ui-tool/lib/client.js +37 -37
- package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/ask-question-row.d.ts +1 -1
- package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/bash-sample.d.ts +1 -1
- package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/file-mutation-row.d.ts +1 -1
- package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/read-row.d.ts +1 -1
- package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/search-row.d.ts +1 -1
- package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/todo-row.d.ts +1 -1
- package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/web-row.d.ts +1 -1
- package/dist/kernel/client-ui-tool/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-tool/package.json +1 -1
- package/dist/kernel/client-ui-trajectory/lib/client.js +149 -149
- package/dist/kernel/client-ui-trajectory/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-assistant-definition.d.ts +1 -1
- package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-compaction-definition.d.ts +1 -1
- package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-message-definitions.d.ts +1 -1
- package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-request-header-definition.d.ts +1 -1
- package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-snapshot-builder.d.ts +1 -1
- package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-tool-definition.d.ts +1 -1
- package/dist/kernel/client-ui-trajectory/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-trajectory/package.json +1 -1
- package/dist/kernel/client-ui-user-questions/lib/client.js +29 -29
- package/dist/kernel/client-ui-user-questions/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-user-questions/package.json +1 -1
- package/dist/kernel/client-ui-workflow-run/lib/client.js +16 -16
- package/dist/kernel/client-ui-workflow-run/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-workflow-run/package.json +1 -1
- package/dist/kernel/client-ui-workspace/lib/client.js +56 -56
- package/dist/kernel/client-ui-workspace/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-ui-workspace/package.json +1 -1
- package/dist/kernel/client-web/lib/index.js +3 -3
- package/dist/kernel/client-web/lib/types/app-shell.d.ts +1 -1
- package/dist/kernel/client-web/lib/types/app.d.ts +1 -1
- package/dist/kernel/client-web/lib/types/boot.js +2 -2
- package/dist/kernel/client-web/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-web/lib/types/loader-status.d.ts +1 -1
- package/dist/kernel/client-web/lib/types/seed.js +1 -1
- package/dist/kernel/client-web/package.json +1 -1
- package/dist/kernel/client-web-react/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/client-web-react/package.json +1 -1
- package/dist/kernel/cmdline/lib/types/index.d.ts +1 -1
- package/dist/kernel/cmdline/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/cmdline/package.json +1 -1
- package/dist/kernel/code-runtime/lib/index.js +1 -1
- package/dist/kernel/code-runtime/lib/types/index.d.ts +1 -1
- package/dist/kernel/code-runtime/lib/types/index.js +1 -1
- package/dist/kernel/code-runtime/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/code-runtime/package.json +1 -1
- package/dist/kernel/code-runtime-worker-thread/lib/index.js +1 -1
- package/dist/kernel/code-runtime-worker-thread/lib/types/index.d.ts +2 -2
- package/dist/kernel/code-runtime-worker-thread/lib/types/index.js +1 -1
- package/dist/kernel/code-runtime-worker-thread/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/code-runtime-worker-thread/package.json +1 -1
- package/dist/kernel/command-compact/lib/types/index.d.ts +1 -1
- package/dist/kernel/command-compact/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/command-compact/package.json +1 -1
- package/dist/kernel/command-feedback/lib/types/index.d.ts +1 -1
- package/dist/kernel/command-feedback/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/command-feedback/package.json +1 -1
- package/dist/kernel/command-goal/lib/types/index.d.ts +1 -1
- package/dist/kernel/command-goal/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/command-goal/package.json +1 -1
- package/dist/kernel/commands/lib/types/index.d.ts +1 -1
- package/dist/kernel/commands/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/commands/package.json +1 -1
- package/dist/kernel/compaction/lib/index.js +1 -1
- package/dist/kernel/compaction/lib/types/index.d.ts +1 -1
- package/dist/kernel/compaction/lib/types/index.js +1 -1
- package/dist/kernel/compaction/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/compaction/package.json +1 -1
- package/dist/kernel/compaction-basic/lib/index.js +1 -1
- package/dist/kernel/compaction-basic/lib/types/index.d.ts +2 -2
- package/dist/kernel/compaction-basic/lib/types/index.js +1 -1
- package/dist/kernel/compaction-basic/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/compaction-basic/lib/types/summarizer.d.ts +1 -1
- package/dist/kernel/compaction-basic/package.json +1 -1
- package/dist/kernel/compaction-tool-result-pruner/lib/index.js +2 -2
- package/dist/kernel/compaction-tool-result-pruner/lib/types/index.d.ts +2 -2
- package/dist/kernel/compaction-tool-result-pruner/lib/types/index.js +2 -2
- package/dist/kernel/compaction-tool-result-pruner/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/compaction-tool-result-pruner/package.json +1 -1
- package/dist/kernel/cordis/bin.js +16 -0
- package/dist/kernel/cordis/lib/index.js +1828 -0
- package/dist/kernel/cordis/lib/types/context.d.ts +101 -0
- package/dist/kernel/cordis/lib/types/context.js +99 -0
- package/dist/kernel/cordis/lib/types/events.d.ts +240 -0
- package/dist/kernel/cordis/lib/types/events.js +199 -0
- package/dist/kernel/cordis/lib/types/fiber.d.ts +202 -0
- package/dist/kernel/cordis/lib/types/fiber.js +660 -0
- package/dist/kernel/cordis/lib/types/index.d.ts +15 -0
- package/dist/kernel/cordis/lib/types/index.js +15 -0
- package/dist/kernel/cordis/lib/types/logger.d.ts +105 -0
- package/dist/kernel/cordis/lib/types/logger.js +185 -0
- package/dist/kernel/cordis/lib/types/reflect.d.ts +186 -0
- package/dist/kernel/cordis/lib/types/reflect.js +310 -0
- package/dist/kernel/cordis/lib/types/registry.d.ts +201 -0
- package/dist/kernel/cordis/lib/types/registry.js +218 -0
- package/dist/kernel/cordis/lib/types/service.d.ts +55 -0
- package/dist/kernel/cordis/lib/types/service.js +113 -0
- package/dist/kernel/cordis/lib/types/utils.d.ts +62 -0
- package/dist/kernel/cordis/lib/types/utils.js +271 -0
- package/dist/kernel/cordis/package.json +49 -0
- package/dist/kernel/cordis-client-runner/lib/types/client/guard.d.ts +1 -1
- package/dist/kernel/cordis-client-runner/lib/types/client/guard.js +1 -1
- package/dist/kernel/cordis-client-runner/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/cordis-client-runner/lib/types/client/inspect-registry.d.ts +1 -1
- package/dist/kernel/cordis-client-runner/lib/types/client/providers.d.ts +1 -1
- package/dist/kernel/cordis-client-runner/lib/types/client/runtime.d.ts +2 -2
- package/dist/kernel/cordis-client-runner/lib/types/client/timer.d.ts +2 -2
- package/dist/kernel/cordis-client-runner/lib/types/client/timer.js +1 -1
- package/dist/kernel/cordis-client-runner/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/cordis-client-runner/package.json +1 -1
- package/dist/kernel/cordis-host-runner/lib/index.js +2 -2
- package/dist/kernel/cordis-host-runner/lib/types/guard.d.ts +2 -2
- package/dist/kernel/cordis-host-runner/lib/types/guard.js +1 -1
- package/dist/kernel/cordis-host-runner/lib/types/index.d.ts +3 -3
- package/dist/kernel/cordis-host-runner/lib/types/index.js +1 -1
- package/dist/kernel/cordis-host-runner/lib/types/inspect-registry.d.ts +2 -2
- package/dist/kernel/cordis-host-runner/lib/types/inspect-registry.js +1 -1
- package/dist/kernel/cordis-host-runner/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/cordis-host-runner/lib/types/lifecycle.d.ts +1 -1
- package/dist/kernel/cordis-host-runner/lib/types/registry.d.ts +1 -1
- package/dist/kernel/cordis-host-runner/package.json +1 -1
- package/dist/kernel/cordis-plugin-group/lib/index.js +5 -0
- package/dist/kernel/cordis-plugin-group/lib/types/index.d.ts +3 -0
- package/dist/kernel/cordis-plugin-group/lib/types/index.js +3 -0
- package/dist/kernel/cordis-plugin-group/package.json +34 -0
- package/dist/kernel/cordis-plugin-hmr/lib/index.js +452 -0
- package/dist/kernel/cordis-plugin-hmr/lib/types/error.d.ts +4 -0
- package/dist/kernel/cordis-plugin-hmr/lib/types/error.js +33 -0
- package/dist/kernel/cordis-plugin-hmr/lib/types/index.d.ts +87 -0
- package/dist/kernel/cordis-plugin-hmr/lib/types/index.js +525 -0
- package/dist/kernel/cordis-plugin-hmr/package.json +57 -0
- package/dist/kernel/cordis-plugin-include/lib/index.js +284 -0
- package/dist/kernel/cordis-plugin-include/lib/types/index.d.ts +99 -0
- package/dist/kernel/cordis-plugin-include/lib/types/index.js +331 -0
- package/dist/kernel/cordis-plugin-include/package.json +38 -0
- package/dist/kernel/cordis-plugin-loader/lib/index.js +744 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/config/entry.d.ts +56 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/config/entry.js +283 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/config/group.d.ts +27 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/config/group.js +139 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/config/isolate.d.ts +35 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/config/isolate.js +151 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/config/tree.d.ts +38 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/config/tree.js +169 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/config/utils.d.ts +11 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/config/utils.js +28 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/index.d.ts +73 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/index.js +154 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/internal.d.ts +97 -0
- package/dist/kernel/cordis-plugin-loader/lib/types/internal.js +36 -0
- package/dist/kernel/cordis-plugin-loader/package.json +42 -0
- package/dist/kernel/cordis-plugin-logger-console/lib/browser.js +80 -0
- package/dist/kernel/cordis-plugin-logger-console/lib/index.js +95 -0
- package/dist/kernel/cordis-plugin-logger-console/lib/types/browser.d.ts +10 -0
- package/dist/kernel/cordis-plugin-logger-console/lib/types/browser.js +14 -0
- package/dist/kernel/cordis-plugin-logger-console/lib/types/index.d.ts +15 -0
- package/dist/kernel/cordis-plugin-logger-console/lib/types/index.js +23 -0
- package/dist/kernel/cordis-plugin-logger-console/lib/types/shared.d.ts +45 -0
- package/dist/kernel/cordis-plugin-logger-console/lib/types/shared.js +73 -0
- package/dist/kernel/cordis-plugin-logger-console/package.json +40 -0
- package/dist/kernel/cordis-plugin-timer/lib/index.js +152 -0
- package/dist/kernel/cordis-plugin-timer/lib/types/index.d.ts +30 -0
- package/dist/kernel/cordis-plugin-timer/lib/types/index.js +134 -0
- package/dist/kernel/cordis-plugin-timer/package.json +36 -0
- package/dist/kernel/cosmokit/lib/index.js +325 -0
- package/dist/kernel/cosmokit/lib/types/array.d.ts +15 -0
- package/dist/kernel/cosmokit/lib/types/array.js +37 -0
- package/dist/kernel/cosmokit/lib/types/index.d.ts +11 -0
- package/dist/kernel/cosmokit/lib/types/index.js +11 -0
- package/dist/kernel/cosmokit/lib/types/misc.d.ts +41 -0
- package/dist/kernel/cosmokit/lib/types/misc.js +50 -0
- package/dist/kernel/cosmokit/lib/types/string.d.ts +89 -0
- package/dist/kernel/cosmokit/lib/types/string.js +79 -0
- package/dist/kernel/cosmokit/lib/types/time.d.ts +19 -0
- package/dist/kernel/cosmokit/lib/types/time.js +101 -0
- package/dist/kernel/cosmokit/lib/types/types.d.ts +34 -0
- package/dist/kernel/cosmokit/lib/types/types.js +141 -0
- package/dist/kernel/cosmokit/package.json +30 -0
- package/dist/kernel/credentials/lib/index.js +1 -1
- package/dist/kernel/credentials/lib/types/index.d.ts +1 -1
- package/dist/kernel/credentials/lib/types/index.js +1 -1
- package/dist/kernel/credentials/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/credentials/package.json +1 -1
- package/dist/kernel/credentials-local/lib/index.js +2 -2
- package/dist/kernel/credentials-local/lib/types/index.d.ts +2 -2
- package/dist/kernel/credentials-local/lib/types/index.js +2 -2
- package/dist/kernel/credentials-local/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/credentials-local/package.json +1 -1
- package/dist/kernel/e2b/lib/index.js +2 -2
- package/dist/kernel/e2b/lib/types/index.d.ts +2 -2
- package/dist/kernel/e2b/lib/types/index.js +2 -2
- package/dist/kernel/e2b/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/e2b/package.json +1 -1
- package/dist/kernel/fs/lib/index.js +1 -1
- package/dist/kernel/fs/lib/types/index.d.ts +1 -1
- package/dist/kernel/fs/lib/types/index.js +1 -1
- package/dist/kernel/fs/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/fs/package.json +1 -1
- package/dist/kernel/fs-e2b/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/fs-e2b/package.json +1 -1
- package/dist/kernel/fs-local/lib/index.js +1 -1
- package/dist/kernel/fs-local/lib/types/index.d.ts +2 -2
- package/dist/kernel/fs-local/lib/types/index.js +1 -1
- package/dist/kernel/fs-local/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/fs-local/package.json +1 -1
- package/dist/kernel/fs-observation-policy/lib/types/index.d.ts +1 -1
- package/dist/kernel/fs-observation-policy/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/fs-observation-policy/package.json +1 -1
- package/dist/kernel/fs-sandbox/lib/types/index.d.ts +1 -1
- package/dist/kernel/fs-sandbox/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/fs-sandbox/package.json +1 -1
- package/dist/kernel/goal/lib/index.js +1 -1
- package/dist/kernel/goal/lib/types/index.d.ts +2 -2
- package/dist/kernel/goal/lib/types/index.js +1 -1
- package/dist/kernel/goal/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/goal/package.json +1 -1
- package/dist/kernel/goal-round-driver/lib/types/index.d.ts +1 -1
- package/dist/kernel/goal-round-driver/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/goal-round-driver/package.json +1 -1
- package/dist/kernel/headless/lib/index.js +1 -1
- package/dist/kernel/headless/lib/types/index.d.ts +2 -2
- package/dist/kernel/headless/lib/types/index.js +1 -1
- package/dist/kernel/headless/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/headless/lib/types/startup.d.ts +1 -1
- package/dist/kernel/headless/package.json +1 -1
- package/dist/kernel/home-paths/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/home-paths/package.json +1 -1
- package/dist/kernel/hook-protocol/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/hook-protocol/package.json +1 -1
- package/dist/kernel/hooks-claude-code/lib/index.js +1 -1
- package/dist/kernel/hooks-claude-code/lib/types/index.d.ts +2 -2
- package/dist/kernel/hooks-claude-code/lib/types/index.js +1 -1
- package/dist/kernel/hooks-claude-code/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/hooks-claude-code/package.json +1 -1
- package/dist/kernel/hooks-codex/lib/index.js +1 -1
- package/dist/kernel/hooks-codex/lib/types/index.d.ts +2 -2
- package/dist/kernel/hooks-codex/lib/types/index.js +1 -1
- package/dist/kernel/hooks-codex/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/hooks-codex/package.json +1 -1
- package/dist/kernel/host-apiproxy/lib/index.js +2 -2
- package/dist/kernel/host-apiproxy/lib/types/api-proxy.d.ts +1 -1
- package/dist/kernel/host-apiproxy/lib/types/index.d.ts +2 -2
- package/dist/kernel/host-apiproxy/lib/types/index.js +2 -2
- package/dist/kernel/host-apiproxy/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/host-apiproxy/lib/types/session-export.d.ts +1 -1
- package/dist/kernel/host-apiproxy/package.json +1 -1
- package/dist/kernel/host-directory-picker/lib/index.js +1 -1
- package/dist/kernel/host-directory-picker/lib/types/index.d.ts +1 -1
- package/dist/kernel/host-directory-picker/lib/types/index.js +1 -1
- package/dist/kernel/host-directory-picker/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/host-directory-picker/package.json +1 -1
- package/dist/kernel/host-directory-picker-auto/lib/types/index.d.ts +1 -1
- package/dist/kernel/host-directory-picker-auto/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/host-directory-picker-auto/package.json +1 -1
- package/dist/kernel/host-directory-picker-browse/lib/index.js +1 -1
- package/dist/kernel/host-directory-picker-browse/lib/types/index.d.ts +2 -2
- package/dist/kernel/host-directory-picker-browse/lib/types/index.js +1 -1
- package/dist/kernel/host-directory-picker-browse/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/host-directory-picker-browse/package.json +1 -1
- package/dist/kernel/host-directory-picker-native/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/host-directory-picker-native/package.json +1 -1
- package/dist/kernel/host-frontend-static/lib/index.js +1 -1
- package/dist/kernel/host-frontend-static/lib/types/index.d.ts +2 -2
- package/dist/kernel/host-frontend-static/lib/types/index.js +1 -1
- package/dist/kernel/host-frontend-static/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/host-frontend-static/package.json +1 -1
- package/dist/kernel/host-plugin-inventory/lib/types/index.d.ts +1 -1
- package/dist/kernel/host-plugin-inventory/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/host-plugin-inventory/package.json +1 -1
- package/dist/kernel/host-webserver/lib/index.js +2 -2
- package/dist/kernel/host-webserver/lib/types/index.d.ts +2 -2
- package/dist/kernel/host-webserver/lib/types/index.js +2 -2
- package/dist/kernel/host-webserver/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/host-webserver/package.json +1 -1
- package/dist/kernel/invariants/lib/index.js +2 -2
- package/dist/kernel/invariants/lib/types/index.d.ts +3 -3
- package/dist/kernel/invariants/lib/types/index.js +2 -2
- package/dist/kernel/invariants/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/invariants/package.json +1 -1
- package/dist/kernel/jobs/lib/index.js +1 -1
- package/dist/kernel/jobs/lib/types/index.d.ts +1 -1
- package/dist/kernel/jobs/lib/types/index.js +1 -1
- package/dist/kernel/jobs/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/jobs/package.json +1 -1
- package/dist/kernel/jobs-local/lib/index.js +1 -1
- package/dist/kernel/jobs-local/lib/types/index.d.ts +2 -2
- package/dist/kernel/jobs-local/lib/types/index.js +1 -1
- package/dist/kernel/jobs-local/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/jobs-local/package.json +1 -1
- package/dist/kernel/launch-environment/lib/types/index.d.ts +1 -1
- package/dist/kernel/launch-environment/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/launch-environment/package.json +1 -1
- package/dist/kernel/llm/lib/index.js +2 -2
- package/dist/kernel/llm/lib/types/index.d.ts +1 -1
- package/dist/kernel/llm/lib/types/index.js +1 -1
- package/dist/kernel/llm/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/llm/lib/types/retry-policy.d.ts +1 -1
- package/dist/kernel/llm/lib/types/retry-policy.js +1 -1
- package/dist/kernel/llm/package.json +1 -1
- package/dist/kernel/llm-deepseek/lib/index.js +1 -1
- package/dist/kernel/llm-deepseek/lib/types/index.d.ts +2 -2
- package/dist/kernel/llm-deepseek/lib/types/index.js +1 -1
- package/dist/kernel/llm-deepseek/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/llm-deepseek/package.json +1 -1
- package/dist/kernel/llm-pi-ai/lib/index.js +1 -1
- package/dist/kernel/llm-pi-ai/lib/types/config.d.ts +1 -1
- package/dist/kernel/llm-pi-ai/lib/types/config.js +1 -1
- package/dist/kernel/llm-pi-ai/lib/types/index.d.ts +1 -1
- package/dist/kernel/llm-pi-ai/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/llm-pi-ai/package.json +1 -1
- package/dist/kernel/llm-retry/lib/index.js +1 -1
- package/dist/kernel/llm-retry/lib/types/index.d.ts +2 -2
- package/dist/kernel/llm-retry/lib/types/index.js +1 -1
- package/dist/kernel/llm-retry/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/llm-retry/package.json +1 -1
- package/dist/kernel/lsp/lib/index.js +1 -1
- package/dist/kernel/lsp/lib/types/index.d.ts +1 -1
- package/dist/kernel/lsp/lib/types/index.js +1 -1
- package/dist/kernel/lsp/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/lsp/package.json +1 -1
- package/dist/kernel/lsp-stdio/lib/index.js +1 -1
- package/dist/kernel/lsp-stdio/lib/types/index.d.ts +2 -2
- package/dist/kernel/lsp-stdio/lib/types/index.js +1 -1
- package/dist/kernel/lsp-stdio/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/lsp-stdio/package.json +1 -1
- package/dist/kernel/manifest.json +11 -1
- package/dist/kernel/mcp-client/lib/index.js +1 -1
- package/dist/kernel/mcp-client/lib/types/connection.d.ts +1 -1
- package/dist/kernel/mcp-client/lib/types/index.d.ts +2 -2
- package/dist/kernel/mcp-client/lib/types/index.js +1 -1
- package/dist/kernel/mcp-client/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/mcp-client/lib/types/tools.d.ts +1 -1
- package/dist/kernel/mcp-client/package.json +1 -1
- package/dist/kernel/message-feedback/lib/index.js +2 -2
- package/dist/kernel/message-feedback/lib/types/index.d.ts +2 -2
- package/dist/kernel/message-feedback/lib/types/index.js +2 -2
- package/dist/kernel/message-feedback/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/message-feedback/package.json +1 -1
- package/dist/kernel/native-command/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/native-command/package.json +1 -1
- package/dist/kernel/node-addon-landlock-run/lib/index.d.ts +71 -0
- package/dist/kernel/node-addon-landlock-run/lib/index.js +101 -0
- package/dist/kernel/node-addon-landlock-run/package.json +39 -0
- package/dist/kernel/output-retention/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/output-retention/package.json +1 -1
- package/dist/kernel/permission-presets/lib/index.js +2 -2
- package/dist/kernel/permission-presets/lib/types/index.d.ts +2 -2
- package/dist/kernel/permission-presets/lib/types/index.js +2 -2
- package/dist/kernel/permission-presets/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/permission-presets/package.json +1 -1
- package/dist/kernel/persona/lib/index.js +1 -1
- package/dist/kernel/persona/lib/types/index.d.ts +2 -2
- package/dist/kernel/persona/lib/types/index.js +1 -1
- package/dist/kernel/persona/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/persona/package.json +1 -1
- package/dist/kernel/plan-mode/lib/index.js +1 -1
- package/dist/kernel/plan-mode/lib/types/index.d.ts +1 -1
- package/dist/kernel/plan-mode/lib/types/index.js +1 -1
- package/dist/kernel/plan-mode/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/plan-mode/package.json +1 -1
- package/dist/kernel/pwsh-local/lib/index.js +1 -1
- package/dist/kernel/pwsh-local/lib/types/index.d.ts +2 -2
- package/dist/kernel/pwsh-local/lib/types/index.js +1 -1
- package/dist/kernel/pwsh-local/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/pwsh-local/package.json +1 -1
- package/dist/kernel/pwsh-sandbox/lib/types/index.d.ts +1 -1
- package/dist/kernel/pwsh-sandbox/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/pwsh-sandbox/package.json +1 -1
- package/dist/kernel/repeat-tool-reminder/lib/index.js +2 -2
- package/dist/kernel/repeat-tool-reminder/lib/types/index.d.ts +2 -2
- package/dist/kernel/repeat-tool-reminder/lib/types/index.js +1 -1
- package/dist/kernel/repeat-tool-reminder/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/repeat-tool-reminder/package.json +1 -1
- package/dist/kernel/sandbox/lib/index.js +1 -1
- package/dist/kernel/sandbox/lib/types/index.d.ts +1 -1
- package/dist/kernel/sandbox/lib/types/index.js +1 -1
- package/dist/kernel/sandbox/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/sandbox/package.json +1 -1
- package/dist/kernel/sandbox-local/lib/index.js +7 -5
- package/dist/kernel/sandbox-local/lib/types/index.d.ts +5 -3
- package/dist/kernel/sandbox-local/lib/types/index.js +8 -5
- package/dist/kernel/sandbox-local/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/sandbox-local/lib/types/profiles.js +1 -1
- package/dist/kernel/sandbox-local/package.json +1 -1
- package/dist/kernel/sandbox-policy/lib/index.js +2 -2
- package/dist/kernel/sandbox-policy/lib/types/index.d.ts +2 -2
- package/dist/kernel/sandbox-policy/lib/types/index.js +2 -2
- package/dist/kernel/sandbox-policy/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/sandbox-policy/package.json +1 -1
- package/dist/kernel/sandbox-windows-acl/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/sandbox-windows-acl/package.json +1 -1
- package/dist/kernel/schedule/lib/types/index.d.ts +1 -1
- package/dist/kernel/schedule/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/schedule/lib/types/persistence.d.ts +1 -1
- package/dist/kernel/schedule/lib/types/runtime.d.ts +1 -1
- package/dist/kernel/schedule/lib/types/tools.d.ts +1 -1
- package/dist/kernel/schedule/package.json +1 -1
- package/dist/kernel/schemastery/lib/index.cjs +596 -0
- package/dist/kernel/schemastery/lib/index.mjs +596 -0
- package/dist/kernel/schemastery/lib/types/index.d.ts +200 -0
- package/dist/kernel/schemastery/lib/types/index.js +714 -0
- package/dist/kernel/schemastery/package.json +37 -0
- package/dist/kernel/scope/lib/index.js +1 -1
- package/dist/kernel/scope/lib/types/index.d.ts +1 -1
- package/dist/kernel/scope/lib/types/index.js +1 -1
- package/dist/kernel/scope/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/scope/lib/types/store.d.ts +1 -1
- package/dist/kernel/scope/package.json +1 -1
- package/dist/kernel/sdk-client/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/sdk-client/package.json +1 -1
- package/dist/kernel/sdk-jsonrpc-server/lib/index.js +1 -1
- package/dist/kernel/sdk-jsonrpc-server/lib/types/index.d.ts +2 -2
- package/dist/kernel/sdk-jsonrpc-server/lib/types/index.js +1 -1
- package/dist/kernel/sdk-jsonrpc-server/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/sdk-jsonrpc-server/lib/types/server.d.ts +1 -1
- package/dist/kernel/sdk-jsonrpc-server/package.json +1 -1
- package/dist/kernel/sdk-protocol/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/sdk-protocol/package.json +1 -1
- package/dist/kernel/session/lib/index.js +1 -1
- package/dist/kernel/session/lib/types/index.d.ts +1 -1
- package/dist/kernel/session/lib/types/index.js +1 -1
- package/dist/kernel/session/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session/package.json +1 -1
- package/dist/kernel/session-checkpoint-policy/lib/types/index.d.ts +1 -1
- package/dist/kernel/session-checkpoint-policy/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-checkpoint-policy/package.json +1 -1
- package/dist/kernel/session-log-export/lib/types/index.d.ts +1 -1
- package/dist/kernel/session-log-export/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-log-export/package.json +1 -1
- package/dist/kernel/session-persistence/lib/index.js +1 -1
- package/dist/kernel/session-persistence/lib/types/coordinator.d.ts +1 -1
- package/dist/kernel/session-persistence/lib/types/index.d.ts +1 -1
- package/dist/kernel/session-persistence/lib/types/index.js +1 -1
- package/dist/kernel/session-persistence/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-persistence/package.json +1 -1
- package/dist/kernel/session-persistence-jsonl/lib/index.js +1 -1
- package/dist/kernel/session-persistence-jsonl/lib/types/index.d.ts +2 -2
- package/dist/kernel/session-persistence-jsonl/lib/types/index.js +1 -1
- package/dist/kernel/session-persistence-jsonl/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-persistence-jsonl/package.json +1 -1
- package/dist/kernel/session-persistence-sqlite/lib/index.js +1 -1
- package/dist/kernel/session-persistence-sqlite/lib/types/index.d.ts +2 -2
- package/dist/kernel/session-persistence-sqlite/lib/types/index.js +1 -1
- package/dist/kernel/session-persistence-sqlite/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-persistence-sqlite/package.json +1 -1
- package/dist/kernel/session-projection/lib/index.js +1 -1
- package/dist/kernel/session-projection/lib/types/index.d.ts +1 -1
- package/dist/kernel/session-projection/lib/types/index.js +1 -1
- package/dist/kernel/session-projection/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-projection/package.json +1 -1
- package/dist/kernel/session-projection-cache/lib/index.js +2 -2
- package/dist/kernel/session-projection-cache/lib/types/index.d.ts +2 -2
- package/dist/kernel/session-projection-cache/lib/types/index.js +2 -2
- package/dist/kernel/session-projection-cache/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-projection-cache/package.json +1 -1
- package/dist/kernel/session-query/lib/index.js +1 -1
- package/dist/kernel/session-query/lib/types/corpus.d.ts +1 -1
- package/dist/kernel/session-query/lib/types/index.d.ts +1 -1
- package/dist/kernel/session-query/lib/types/index.js +1 -1
- package/dist/kernel/session-query/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-query/package.json +1 -1
- package/dist/kernel/session-query-sqlite/lib/index.js +2 -2
- package/dist/kernel/session-query-sqlite/lib/types/index.d.ts +2 -2
- package/dist/kernel/session-query-sqlite/lib/types/index.js +2 -2
- package/dist/kernel/session-query-sqlite/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-query-sqlite/package.json +1 -1
- package/dist/kernel/session-reference/lib/index.js +2 -2
- package/dist/kernel/session-reference/lib/types/index.d.ts +2 -2
- package/dist/kernel/session-reference/lib/types/index.js +2 -2
- package/dist/kernel/session-reference/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-reference/package.json +1 -1
- package/dist/kernel/session-stats/lib/types/index.d.ts +1 -1
- package/dist/kernel/session-stats/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-stats/package.json +1 -1
- package/dist/kernel/session-telemetry/lib/index.js +1 -1
- package/dist/kernel/session-telemetry/lib/types/coordinator.d.ts +1 -1
- package/dist/kernel/session-telemetry/lib/types/index.d.ts +1 -1
- package/dist/kernel/session-telemetry/lib/types/index.js +1 -1
- package/dist/kernel/session-telemetry/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-telemetry/package.json +1 -1
- package/dist/kernel/session-telemetry-otel/lib/index.js +1 -1
- package/dist/kernel/session-telemetry-otel/lib/types/index.d.ts +2 -2
- package/dist/kernel/session-telemetry-otel/lib/types/index.js +1 -1
- package/dist/kernel/session-telemetry-otel/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-telemetry-otel/package.json +1 -1
- package/dist/kernel/session-title/lib/index.js +2 -2
- package/dist/kernel/session-title/lib/types/index.d.ts +2 -2
- package/dist/kernel/session-title/lib/types/index.js +2 -2
- package/dist/kernel/session-title/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-title/package.json +1 -1
- package/dist/kernel/session-title-all-prompts-llm/lib/index.js +1 -1
- package/dist/kernel/session-title-all-prompts-llm/lib/types/index.d.ts +2 -2
- package/dist/kernel/session-title-all-prompts-llm/lib/types/index.js +1 -1
- package/dist/kernel/session-title-all-prompts-llm/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-title-all-prompts-llm/package.json +1 -1
- package/dist/kernel/session-title-first-prompt-llm/lib/index.js +1 -1
- package/dist/kernel/session-title-first-prompt-llm/lib/types/index.d.ts +2 -2
- package/dist/kernel/session-title-first-prompt-llm/lib/types/index.js +1 -1
- package/dist/kernel/session-title-first-prompt-llm/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-title-first-prompt-llm/package.json +1 -1
- package/dist/kernel/session-title-llm/lib/index.js +1 -1
- package/dist/kernel/session-title-llm/lib/types/index.d.ts +2 -2
- package/dist/kernel/session-title-llm/lib/types/index.js +1 -1
- package/dist/kernel/session-title-llm/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/session-title-llm/package.json +1 -1
- package/dist/kernel/settings/lib/index.js +1 -1
- package/dist/kernel/settings/lib/invariant.js +1 -1
- package/dist/kernel/settings/lib/types/index.d.ts +2 -2
- package/dist/kernel/settings/lib/types/index.js +1 -1
- package/dist/kernel/settings/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/settings/lib/types/redact.d.ts +1 -1
- package/dist/kernel/settings/package.json +1 -1
- package/dist/kernel/settings-file/lib/index.js +2 -2
- package/dist/kernel/settings-file/lib/types/index.d.ts +2 -2
- package/dist/kernel/settings-file/lib/types/index.js +2 -2
- package/dist/kernel/settings-file/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/settings-file/package.json +1 -1
- package/dist/kernel/shell/lib/index.js +1 -1
- package/dist/kernel/shell/lib/types/index.d.ts +1 -1
- package/dist/kernel/shell/lib/types/index.js +1 -1
- package/dist/kernel/shell/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/shell/package.json +1 -1
- package/dist/kernel/shell-env/lib/index.js +2 -2
- package/dist/kernel/shell-env/lib/types/index.d.ts +2 -2
- package/dist/kernel/shell-env/lib/types/index.js +2 -2
- package/dist/kernel/shell-env/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/shell-env/package.json +1 -1
- package/dist/kernel/skill/lib/index.js +2 -2
- package/dist/kernel/skill/lib/types/index.d.ts +2 -2
- package/dist/kernel/skill/lib/types/index.js +2 -2
- package/dist/kernel/skill/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/skill/package.json +1 -1
- package/dist/kernel/skill-badge/lib/types/index.d.ts +1 -1
- package/dist/kernel/skill-badge/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/skill-badge/package.json +1 -1
- package/dist/kernel/skill-filesystem/lib/index.js +1 -1
- package/dist/kernel/skill-filesystem/lib/types/index.d.ts +2 -2
- package/dist/kernel/skill-filesystem/lib/types/index.js +1 -1
- package/dist/kernel/skill-filesystem/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/skill-filesystem/package.json +1 -1
- package/dist/kernel/spill/lib/index.js +1 -1
- package/dist/kernel/spill/lib/types/index.d.ts +1 -1
- package/dist/kernel/spill/lib/types/index.js +1 -1
- package/dist/kernel/spill/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/spill/package.json +1 -1
- package/dist/kernel/spill-local/lib/index.js +1 -1
- package/dist/kernel/spill-local/lib/types/index.d.ts +2 -2
- package/dist/kernel/spill-local/lib/types/index.js +1 -1
- package/dist/kernel/spill-local/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/spill-local/package.json +1 -1
- package/dist/kernel/spill-policy/lib/index.js +1 -1
- package/dist/kernel/spill-policy/lib/types/index.d.ts +2 -2
- package/dist/kernel/spill-policy/lib/types/index.js +1 -1
- package/dist/kernel/spill-policy/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/spill-policy/package.json +1 -1
- package/dist/kernel/storage/lib/index.js +1 -1
- package/dist/kernel/storage/lib/types/index.d.ts +1 -1
- package/dist/kernel/storage/lib/types/index.js +1 -1
- package/dist/kernel/storage/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/storage/package.json +1 -1
- package/dist/kernel/storage-domain/lib/index.js +1 -1
- package/dist/kernel/storage-domain/lib/types/domain.d.ts +1 -1
- package/dist/kernel/storage-domain/lib/types/index.d.ts +2 -2
- package/dist/kernel/storage-domain/lib/types/index.js +1 -1
- package/dist/kernel/storage-domain/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/storage-domain/package.json +1 -1
- package/dist/kernel/storage-json/lib/index.js +1 -1
- package/dist/kernel/storage-json/lib/types/index.d.ts +2 -2
- package/dist/kernel/storage-json/lib/types/index.js +1 -1
- package/dist/kernel/storage-json/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/storage-json/package.json +1 -1
- package/dist/kernel/storage-sqlite/lib/index.js +1 -1
- package/dist/kernel/storage-sqlite/lib/types/index.d.ts +2 -2
- package/dist/kernel/storage-sqlite/lib/types/index.js +1 -1
- package/dist/kernel/storage-sqlite/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/storage-sqlite/package.json +1 -1
- package/dist/kernel/subagent/lib/index.js +1 -1
- package/dist/kernel/subagent/lib/types/activation-setup-registry.d.ts +1 -1
- package/dist/kernel/subagent/lib/types/child-agent.d.ts +1 -1
- package/dist/kernel/subagent/lib/types/continuation.d.ts +1 -1
- package/dist/kernel/subagent/lib/types/index.d.ts +1 -1
- package/dist/kernel/subagent/lib/types/index.js +1 -1
- package/dist/kernel/subagent/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/subagent/lib/types/lifecycle.d.ts +1 -1
- package/dist/kernel/subagent/lib/types/list-children.d.ts +1 -1
- package/dist/kernel/subagent/package.json +1 -1
- package/dist/kernel/subagent-acp/lib/index.js +1 -1
- package/dist/kernel/subagent-acp/lib/types/index.d.ts +2 -2
- package/dist/kernel/subagent-acp/lib/types/index.js +1 -1
- package/dist/kernel/subagent-acp/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/subagent-acp/package.json +1 -1
- package/dist/kernel/subagent-claude-code/lib/index.js +1 -1
- package/dist/kernel/subagent-claude-code/lib/types/index.d.ts +2 -2
- package/dist/kernel/subagent-claude-code/lib/types/index.js +1 -1
- package/dist/kernel/subagent-claude-code/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/subagent-claude-code/package.json +1 -1
- package/dist/kernel/subagent-codex/lib/index.js +1 -1
- package/dist/kernel/subagent-codex/lib/types/index.d.ts +2 -2
- package/dist/kernel/subagent-codex/lib/types/index.js +1 -1
- package/dist/kernel/subagent-codex/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/subagent-codex/package.json +1 -1
- package/dist/kernel/subagent-fork-in-process/lib/index.js +1 -1
- package/dist/kernel/subagent-fork-in-process/lib/types/index.d.ts +2 -2
- package/dist/kernel/subagent-fork-in-process/lib/types/index.js +1 -1
- package/dist/kernel/subagent-fork-in-process/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/subagent-fork-in-process/package.json +1 -1
- package/dist/kernel/subagent-in-process-driver/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/subagent-in-process-driver/lib/types/structured.d.ts +1 -1
- package/dist/kernel/subagent-in-process-driver/package.json +1 -1
- package/dist/kernel/subagent-nomix-sdk/lib/index.js +1 -1
- package/dist/kernel/subagent-nomix-sdk/lib/types/index.d.ts +2 -2
- package/dist/kernel/subagent-nomix-sdk/lib/types/index.js +1 -1
- package/dist/kernel/subagent-nomix-sdk/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/subagent-nomix-sdk/package.json +1 -1
- package/dist/kernel/subagent-spawn-in-process/lib/index.js +1 -1
- package/dist/kernel/subagent-spawn-in-process/lib/types/index.d.ts +2 -2
- package/dist/kernel/subagent-spawn-in-process/lib/types/index.js +1 -1
- package/dist/kernel/subagent-spawn-in-process/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/subagent-spawn-in-process/package.json +1 -1
- package/dist/kernel/subprocess/lib/index.js +1 -1
- package/dist/kernel/subprocess/lib/types/index.d.ts +1 -1
- package/dist/kernel/subprocess/lib/types/index.js +1 -1
- package/dist/kernel/subprocess/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/subprocess/package.json +1 -1
- package/dist/kernel/subprocess-e2b/lib/index.js +1 -1
- package/dist/kernel/subprocess-e2b/lib/types/index.d.ts +2 -2
- package/dist/kernel/subprocess-e2b/lib/types/index.js +1 -1
- package/dist/kernel/subprocess-e2b/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/subprocess-e2b/package.json +1 -1
- package/dist/kernel/subprocess-local/lib/types/index.d.ts +1 -1
- package/dist/kernel/subprocess-local/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/subprocess-local/package.json +1 -1
- package/dist/kernel/system-prompt/lib/index.js +2 -2
- package/dist/kernel/system-prompt/lib/types/index.d.ts +2 -2
- package/dist/kernel/system-prompt/lib/types/index.js +2 -2
- package/dist/kernel/system-prompt/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/system-prompt/package.json +1 -1
- package/dist/kernel/terminal/lib/index.js +1 -1
- package/dist/kernel/terminal/lib/types/index.d.ts +1 -1
- package/dist/kernel/terminal/lib/types/index.js +1 -1
- package/dist/kernel/terminal/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/terminal/package.json +1 -1
- package/dist/kernel/terminal-bash/lib/index.js +1 -1
- package/dist/kernel/terminal-bash/lib/types/config.d.ts +1 -1
- package/dist/kernel/terminal-bash/lib/types/config.js +1 -1
- package/dist/kernel/terminal-bash/lib/types/index.d.ts +1 -1
- package/dist/kernel/terminal-bash/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/terminal-bash/package.json +1 -1
- package/dist/kernel/time-context/lib/index.js +2 -2
- package/dist/kernel/time-context/lib/invariant.js +2 -2
- package/dist/kernel/time-context/lib/types/index.d.ts +2 -2
- package/dist/kernel/time-context/lib/types/index.js +1 -1
- package/dist/kernel/time-context/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/time-context/package.json +1 -1
- package/dist/kernel/timeout/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/timeout/package.json +1 -1
- package/dist/kernel/tmux-context/lib/index.js +2 -2
- package/dist/kernel/tmux-context/lib/types/index.d.ts +2 -2
- package/dist/kernel/tmux-context/lib/types/index.js +1 -1
- package/dist/kernel/tmux-context/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tmux-context/package.json +1 -1
- package/dist/kernel/token-meter/lib/index.js +2 -2
- package/dist/kernel/token-meter/lib/types/index.d.ts +2 -2
- package/dist/kernel/token-meter/lib/types/index.js +2 -2
- package/dist/kernel/token-meter/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/token-meter/package.json +1 -1
- package/dist/kernel/tool-ask-user/lib/types/index.d.ts +1 -1
- package/dist/kernel/tool-ask-user/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-ask-user/package.json +1 -1
- package/dist/kernel/tool-bash/lib/index.js +1 -1
- package/dist/kernel/tool-bash/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-bash/lib/types/index.js +1 -1
- package/dist/kernel/tool-bash/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-bash/package.json +1 -1
- package/dist/kernel/tool-bash-persistent/lib/index.js +1 -1
- package/dist/kernel/tool-bash-persistent/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-bash-persistent/lib/types/index.js +1 -1
- package/dist/kernel/tool-bash-persistent/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-bash-persistent/package.json +1 -1
- package/dist/kernel/tool-call-timeout-policy/lib/types/index.d.ts +1 -1
- package/dist/kernel/tool-call-timeout-policy/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-call-timeout-policy/package.json +1 -1
- package/dist/kernel/tool-cordis/lib/types/fiber-state.d.ts +1 -1
- package/dist/kernel/tool-cordis/lib/types/index.d.ts +1 -1
- package/dist/kernel/tool-cordis/lib/types/inspect.d.ts +1 -1
- package/dist/kernel/tool-cordis/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-cordis/lib/types/providers.d.ts +1 -1
- package/dist/kernel/tool-cordis/package.json +1 -1
- package/dist/kernel/tool-fs/lib/index.js +1 -1
- package/dist/kernel/tool-fs/lib/types/edit.d.ts +1 -1
- package/dist/kernel/tool-fs/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-fs/lib/types/index.js +1 -1
- package/dist/kernel/tool-fs/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-fs/lib/types/read-image.d.ts +1 -1
- package/dist/kernel/tool-fs/lib/types/read-target.d.ts +1 -1
- package/dist/kernel/tool-fs/lib/types/read.d.ts +1 -1
- package/dist/kernel/tool-fs/lib/types/sandbox.d.ts +1 -1
- package/dist/kernel/tool-fs/lib/types/write.d.ts +1 -1
- package/dist/kernel/tool-fs/package.json +1 -1
- package/dist/kernel/tool-fs-search/lib/index.js +1 -1
- package/dist/kernel/tool-fs-search/lib/types/direct-call.d.ts +1 -1
- package/dist/kernel/tool-fs-search/lib/types/glob.d.ts +1 -1
- package/dist/kernel/tool-fs-search/lib/types/grep.d.ts +1 -1
- package/dist/kernel/tool-fs-search/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-fs-search/lib/types/index.js +1 -1
- package/dist/kernel/tool-fs-search/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-fs-search/lib/types/search-core.d.ts +1 -1
- package/dist/kernel/tool-fs-search/package.json +1 -1
- package/dist/kernel/tool-goal/lib/index.js +1 -1
- package/dist/kernel/tool-goal/lib/types/authority.d.ts +1 -1
- package/dist/kernel/tool-goal/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-goal/lib/types/index.js +1 -1
- package/dist/kernel/tool-goal/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-goal/package.json +1 -1
- package/dist/kernel/tool-jobs/lib/index.js +1 -1
- package/dist/kernel/tool-jobs/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-jobs/lib/types/index.js +1 -1
- package/dist/kernel/tool-jobs/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-jobs/package.json +1 -1
- package/dist/kernel/tool-lsp/lib/index.js +1 -1
- package/dist/kernel/tool-lsp/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-lsp/lib/types/index.js +1 -1
- package/dist/kernel/tool-lsp/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-lsp/package.json +1 -1
- package/dist/kernel/tool-pwsh/lib/index.js +1 -1
- package/dist/kernel/tool-pwsh/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-pwsh/lib/types/index.js +1 -1
- package/dist/kernel/tool-pwsh/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-pwsh/package.json +1 -1
- package/dist/kernel/tool-ralph/lib/index.js +1 -1
- package/dist/kernel/tool-ralph/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-ralph/lib/types/index.js +1 -1
- package/dist/kernel/tool-ralph/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-ralph/package.json +1 -1
- package/dist/kernel/tool-session-query/lib/index.js +1 -1
- package/dist/kernel/tool-session-query/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-session-query/lib/types/index.js +1 -1
- package/dist/kernel/tool-session-query/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-session-query/lib/types/operations.d.ts +1 -1
- package/dist/kernel/tool-session-query/lib/types/service-boundary.d.ts +1 -1
- package/dist/kernel/tool-session-query/lib/types/workspace-access.d.ts +1 -1
- package/dist/kernel/tool-session-query/package.json +1 -1
- package/dist/kernel/tool-skill/lib/index.js +1 -1
- package/dist/kernel/tool-skill/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-skill/lib/types/index.js +1 -1
- package/dist/kernel/tool-skill/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-skill/package.json +1 -1
- package/dist/kernel/tool-str-replace-editor/lib/index.js +1 -1
- package/dist/kernel/tool-str-replace-editor/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-str-replace-editor/lib/types/index.js +1 -1
- package/dist/kernel/tool-str-replace-editor/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-str-replace-editor/package.json +1 -1
- package/dist/kernel/tool-subagent/lib/index.js +1 -1
- package/dist/kernel/tool-subagent/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-subagent/lib/types/index.js +1 -1
- package/dist/kernel/tool-subagent/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-subagent/package.json +1 -1
- package/dist/kernel/tool-subagent-control/lib/types/index.d.ts +1 -1
- package/dist/kernel/tool-subagent-control/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-subagent-control/lib/types/list-agents.d.ts +1 -1
- package/dist/kernel/tool-subagent-control/package.json +1 -1
- package/dist/kernel/tool-subagent-report/lib/index.js +1 -1
- package/dist/kernel/tool-subagent-report/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-subagent-report/lib/types/index.js +1 -1
- package/dist/kernel/tool-subagent-report/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-subagent-report/package.json +1 -1
- package/dist/kernel/tool-terminal/lib/index.js +1 -1
- package/dist/kernel/tool-terminal/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-terminal/lib/types/index.js +1 -1
- package/dist/kernel/tool-terminal/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-terminal/package.json +1 -1
- package/dist/kernel/tool-todo/lib/index.js +1 -1
- package/dist/kernel/tool-todo/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-todo/lib/types/index.js +1 -1
- package/dist/kernel/tool-todo/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-todo/package.json +1 -1
- package/dist/kernel/tool-web/lib/index.js +1 -1
- package/dist/kernel/tool-web/lib/types/fetch.d.ts +1 -1
- package/dist/kernel/tool-web/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-web/lib/types/index.js +1 -1
- package/dist/kernel/tool-web/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-web/lib/types/search.d.ts +1 -1
- package/dist/kernel/tool-web/package.json +1 -1
- package/dist/kernel/tool-workflow/lib/index.js +1 -1
- package/dist/kernel/tool-workflow/lib/types/index.d.ts +2 -2
- package/dist/kernel/tool-workflow/lib/types/index.js +1 -1
- package/dist/kernel/tool-workflow/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tool-workflow/package.json +1 -1
- package/dist/kernel/tools/lib/index.js +2 -2
- package/dist/kernel/tools/lib/types/index.d.ts +2 -2
- package/dist/kernel/tools/lib/types/index.js +2 -2
- package/dist/kernel/tools/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/tools/package.json +1 -1
- package/dist/kernel/typert-generator/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/typert-generator/package.json +1 -1
- package/dist/kernel/typert-loader/lib/index.js +1 -1
- package/dist/kernel/typert-loader/lib/types/index.d.ts +2 -2
- package/dist/kernel/typert-loader/lib/types/index.js +1 -1
- package/dist/kernel/typert-loader/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/typert-loader/package.json +1 -1
- package/dist/kernel/typert-protocol/lib/index.js +1 -1
- package/dist/kernel/typert-protocol/lib/types/index.d.ts +1 -1
- package/dist/kernel/typert-protocol/lib/types/index.js +1 -1
- package/dist/kernel/typert-protocol/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/typert-protocol/lib/types/types.d.ts +1 -1
- package/dist/kernel/typert-protocol/package.json +1 -1
- package/dist/kernel/typert-registry/lib/index.js +1 -1
- package/dist/kernel/typert-registry/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/typert-registry/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/typert-registry/lib/types/service.d.ts +1 -1
- package/dist/kernel/typert-registry/lib/types/service.js +1 -1
- package/dist/kernel/typert-registry/package.json +1 -1
- package/dist/kernel/user-approval/lib/index.js +2 -2
- package/dist/kernel/user-approval/lib/invariant.js +2 -2
- package/dist/kernel/user-approval/lib/types/index.d.ts +2 -2
- package/dist/kernel/user-approval/lib/types/index.js +2 -2
- package/dist/kernel/user-approval/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/user-approval/package.json +1 -1
- package/dist/kernel/user-questions/lib/index.js +1 -1
- package/dist/kernel/user-questions/lib/types/index.d.ts +1 -1
- package/dist/kernel/user-questions/lib/types/index.js +1 -1
- package/dist/kernel/user-questions/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/user-questions/package.json +1 -1
- package/dist/kernel/web/lib/index.js +2 -2
- package/dist/kernel/web/lib/types/index.d.ts +2 -2
- package/dist/kernel/web/lib/types/index.js +2 -2
- package/dist/kernel/web/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/web/package.json +1 -1
- package/dist/kernel/web-app/lib/index.js +1 -1
- package/dist/kernel/web-app/lib/types/index.d.ts +2 -2
- package/dist/kernel/web-app/lib/types/index.js +1 -1
- package/dist/kernel/web-app/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/web-app/lib/types/startup.d.ts +1 -1
- package/dist/kernel/web-app/package.json +1 -1
- package/dist/kernel/web-fetch-http/lib/index.js +1 -1
- package/dist/kernel/web-fetch-http/lib/types/index.d.ts +2 -2
- package/dist/kernel/web-fetch-http/lib/types/index.js +1 -1
- package/dist/kernel/web-fetch-http/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/web-fetch-http/package.json +1 -1
- package/dist/kernel/web-frontend/package.json +1 -1
- package/dist/kernel/web-search-deepseek/lib/index.js +1 -1
- package/dist/kernel/web-search-deepseek/lib/types/index.d.ts +2 -2
- package/dist/kernel/web-search-deepseek/lib/types/index.js +1 -1
- package/dist/kernel/web-search-deepseek/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/web-search-deepseek/package.json +1 -1
- package/dist/kernel/web-search-exa/lib/index.js +1 -1
- package/dist/kernel/web-search-exa/lib/types/index.d.ts +2 -2
- package/dist/kernel/web-search-exa/lib/types/index.js +1 -1
- package/dist/kernel/web-search-exa/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/web-search-exa/package.json +1 -1
- package/dist/kernel/web-search-perplexity/lib/index.js +1 -1
- package/dist/kernel/web-search-perplexity/lib/types/index.d.ts +2 -2
- package/dist/kernel/web-search-perplexity/lib/types/index.js +1 -1
- package/dist/kernel/web-search-perplexity/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/web-search-perplexity/package.json +1 -1
- package/dist/kernel/workflow/lib/index.js +1 -1
- package/dist/kernel/workflow/lib/types/index.d.ts +1 -1
- package/dist/kernel/workflow/lib/types/index.js +1 -1
- package/dist/kernel/workflow/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/workflow/package.json +1 -1
- package/dist/kernel/workflow-worker-thread/lib/index.js +1 -1
- package/dist/kernel/workflow-worker-thread/lib/types/host.d.ts +1 -1
- package/dist/kernel/workflow-worker-thread/lib/types/index.d.ts +2 -2
- package/dist/kernel/workflow-worker-thread/lib/types/index.js +1 -1
- package/dist/kernel/workflow-worker-thread/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/workflow-worker-thread/package.json +1 -1
- package/dist/kernel/workspace/lib/index.js +1 -1
- package/dist/kernel/workspace/lib/invariant.js +1 -1
- package/dist/kernel/workspace/lib/types/index.d.ts +1 -1
- package/dist/kernel/workspace/lib/types/index.js +1 -1
- package/dist/kernel/workspace/lib/types/invariant.d.ts +1 -1
- package/dist/kernel/workspace/package.json +1 -1
- package/dist/licenses/landlock-run.LICENSE +28 -0
- package/dist/native/landlock-run/linux-arm64/landlock-run +0 -0
- package/dist/native/landlock-run/linux-x64/landlock-run +0 -0
- package/package.json +7 -12
|
@@ -0,0 +1,744 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { Context, Inject, Service, composeError } from "../../cordis/lib/index.js";
|
|
3
|
+
import { deepEqual, defineProperty, isNonNullable, isNullable, valueMap } from "../../cosmokit/lib/index.js";
|
|
4
|
+
//#region lib/types/internal.js
|
|
5
|
+
/** Helpers for locating the current Node internal module loader. */
|
|
6
|
+
var ModuleLoader;
|
|
7
|
+
(function(ModuleLoader) {
|
|
8
|
+
let _cachedLoader;
|
|
9
|
+
function requireInternal(id) {
|
|
10
|
+
const require = createRequire(import.meta.url);
|
|
11
|
+
if (process.execArgv.includes("--expose-internals")) try {
|
|
12
|
+
return require(id);
|
|
13
|
+
} catch {}
|
|
14
|
+
try {
|
|
15
|
+
return require("node-addon-require-builtin").requireBuiltin(id);
|
|
16
|
+
} catch {}
|
|
17
|
+
}
|
|
18
|
+
function fromInternal() {
|
|
19
|
+
if (_cachedLoader) return _cachedLoader;
|
|
20
|
+
const [major] = process.versions.node.split(".").map(Number);
|
|
21
|
+
if (major >= 24) {
|
|
22
|
+
const raw = requireInternal("internal/modules/esm/loader")?.getOrInitializeCascadedLoader();
|
|
23
|
+
if (raw) return _cachedLoader = Object.assign(raw, { version: "v2" });
|
|
24
|
+
} else if (major >= 22) {
|
|
25
|
+
const raw = requireInternal("internal/modules/esm/loader")?.getOrInitializeCascadedLoader();
|
|
26
|
+
if (raw) return _cachedLoader = Object.assign(raw, { version: "v1" });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
ModuleLoader.fromInternal = fromInternal;
|
|
30
|
+
})(ModuleLoader || (ModuleLoader = {}));
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region lib/types/config/group.js
|
|
33
|
+
/** Runtime owner for a list of child loader entries. */
|
|
34
|
+
var EntryGroup = class {
|
|
35
|
+
ctx;
|
|
36
|
+
tree;
|
|
37
|
+
static key = Symbol.for("cordis.group");
|
|
38
|
+
data = [];
|
|
39
|
+
constructor(ctx, tree) {
|
|
40
|
+
this.ctx = ctx;
|
|
41
|
+
this.tree = tree;
|
|
42
|
+
const entry = ctx.fiber.entry;
|
|
43
|
+
if (entry) entry.subgroup = this;
|
|
44
|
+
}
|
|
45
|
+
get context() {
|
|
46
|
+
return this.ctx;
|
|
47
|
+
}
|
|
48
|
+
async create(options) {
|
|
49
|
+
const id = this.tree.ensureId(options);
|
|
50
|
+
const existing = this.tree.store[id];
|
|
51
|
+
const entry = existing ?? (this.tree.store[id] = new Entry(this.ctx.loader));
|
|
52
|
+
const previousParent = entry.parent;
|
|
53
|
+
entry.parent = this;
|
|
54
|
+
try {
|
|
55
|
+
await entry.update(options, true, true);
|
|
56
|
+
} catch (error) {
|
|
57
|
+
if (existing) entry.parent = previousParent;
|
|
58
|
+
else delete this.tree.store[id];
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
return entry.id;
|
|
62
|
+
}
|
|
63
|
+
unlink(options) {
|
|
64
|
+
const config = this.data;
|
|
65
|
+
const index = config.indexOf(options);
|
|
66
|
+
if (index >= 0) config.splice(index, 1);
|
|
67
|
+
}
|
|
68
|
+
async remove(id, isDispose = false) {
|
|
69
|
+
const entry = this.tree.store[id];
|
|
70
|
+
if (!entry) return;
|
|
71
|
+
await entry._dispose();
|
|
72
|
+
if (!isDispose) this.unlink(entry.options);
|
|
73
|
+
delete this.tree.store[id];
|
|
74
|
+
this.context.emit("loader/partial-dispose", entry, entry.options, false);
|
|
75
|
+
}
|
|
76
|
+
async update(config) {
|
|
77
|
+
const oldConfig = this.data;
|
|
78
|
+
const seen = /* @__PURE__ */ new Set();
|
|
79
|
+
for (const options of config) {
|
|
80
|
+
const id = this.tree.ensureId(options);
|
|
81
|
+
if (seen.has(id)) throw new TypeError(`duplicate loader entry id: ${id}`);
|
|
82
|
+
seen.add(id);
|
|
83
|
+
}
|
|
84
|
+
const oldMap = Object.fromEntries(oldConfig.map((options) => [options.id, options]));
|
|
85
|
+
const newMap = Object.fromEntries(config.map((options) => [options.id, options]));
|
|
86
|
+
try {
|
|
87
|
+
const outcomes = await Promise.allSettled(config.map((options) => this.create(options)));
|
|
88
|
+
if (this.ctx.fiber.uid === null) return;
|
|
89
|
+
const failures = outcomes.filter((outcome) => outcome.status === "rejected").map((outcome) => outcome.reason);
|
|
90
|
+
if (failures.length === 1) throw failures[0];
|
|
91
|
+
if (failures.length > 1) throw new AggregateError(failures, "loader entries failed to apply");
|
|
92
|
+
for (const id of Object.keys(oldMap)) if (!newMap[id]) await this.remove(id, true);
|
|
93
|
+
this.data = config;
|
|
94
|
+
} catch (error) {
|
|
95
|
+
const rollbackErrors = [];
|
|
96
|
+
for (const id of Object.keys(newMap).reverse()) {
|
|
97
|
+
if (oldMap[id]) continue;
|
|
98
|
+
try {
|
|
99
|
+
await this.remove(id, true);
|
|
100
|
+
} catch (rollbackError) {
|
|
101
|
+
rollbackErrors.push(rollbackError);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
for (const options of oldConfig) try {
|
|
105
|
+
await this.create(options);
|
|
106
|
+
} catch (rollbackError) {
|
|
107
|
+
rollbackErrors.push(rollbackError);
|
|
108
|
+
}
|
|
109
|
+
this.data = oldConfig;
|
|
110
|
+
if (rollbackErrors.length) throw new AggregateError([error, ...rollbackErrors], "loader entry rollback failed");
|
|
111
|
+
throw error;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
async stop() {
|
|
115
|
+
for (const options of this.data) await this.remove(options.id, true);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
/** Plugin that mounts a nested loader entry group. */
|
|
119
|
+
var Group = class extends EntryGroup {
|
|
120
|
+
ctx;
|
|
121
|
+
config;
|
|
122
|
+
static initial = [];
|
|
123
|
+
static [EntryGroup.key] = true;
|
|
124
|
+
constructor(ctx, config) {
|
|
125
|
+
super(ctx, ctx.fiber.entry.parent.tree);
|
|
126
|
+
this.ctx = ctx;
|
|
127
|
+
this.config = config;
|
|
128
|
+
ctx.on("internal/update", (config) => this.update(config));
|
|
129
|
+
}
|
|
130
|
+
async *[Service.init]() {
|
|
131
|
+
yield () => this.stop();
|
|
132
|
+
await this.update(this.config);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region lib/types/config/tree.js
|
|
137
|
+
var __rewriteRelativeImportExtension = function(path, preserveJsx) {
|
|
138
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
139
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
140
|
+
});
|
|
141
|
+
return path;
|
|
142
|
+
};
|
|
143
|
+
/** Mutable tree of loader entries. Persistence is supplied by subclasses. */
|
|
144
|
+
var EntryTree = class EntryTree {
|
|
145
|
+
static sep = ":";
|
|
146
|
+
ctx;
|
|
147
|
+
enableLogs;
|
|
148
|
+
root;
|
|
149
|
+
store = Object.create(null);
|
|
150
|
+
constructor(ctx) {
|
|
151
|
+
this.ctx = ctx.extend({ baseUrl: ctx.baseUrl });
|
|
152
|
+
this.root = new EntryGroup(this.ctx, this);
|
|
153
|
+
const entry = this.ctx.fiber.entry;
|
|
154
|
+
if (entry) entry.subtree = this;
|
|
155
|
+
}
|
|
156
|
+
get context() {
|
|
157
|
+
return this.ctx;
|
|
158
|
+
}
|
|
159
|
+
/** Iterate entries in this tree and any nested subtrees. */
|
|
160
|
+
*entries() {
|
|
161
|
+
for (const entry of Object.values(this.store)) {
|
|
162
|
+
yield entry;
|
|
163
|
+
if (!entry.subtree) continue;
|
|
164
|
+
yield* entry.subtree.entries();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/** Return pending import and lifecycle tasks owned by this tree. */
|
|
168
|
+
getTasks() {
|
|
169
|
+
return [...this.entries()].map((entry) => entry._initTask || entry.fiber?.inertia).filter(isNonNullable);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Wait until this tree has no active import or lifecycle tasks.
|
|
173
|
+
* @throws a settled fiber failure, or an aggregate when several fibers failed.
|
|
174
|
+
*/
|
|
175
|
+
async await() {
|
|
176
|
+
while (true) {
|
|
177
|
+
const tasks = this.getTasks();
|
|
178
|
+
if (tasks.length) {
|
|
179
|
+
await Promise.allSettled(tasks);
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
const failures = (await Promise.allSettled([...this.entries()].map((entry) => entry._await()))).filter((outcome) => outcome.status === "rejected").map((outcome) => outcome.reason);
|
|
183
|
+
if (failures.length === 1) throw failures[0];
|
|
184
|
+
if (failures.length > 1) throw new AggregateError(failures, "loader fibers failed");
|
|
185
|
+
this.ctx.reflect.notify(["loader"]);
|
|
186
|
+
if (!this.getTasks().length) return;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
ensureId(options) {
|
|
190
|
+
if (!options.id) do
|
|
191
|
+
options.id = Math.random().toString(16).slice(2, 10);
|
|
192
|
+
while (this.store[options.id]);
|
|
193
|
+
return options.id;
|
|
194
|
+
}
|
|
195
|
+
/** Resolve an entry by id, including nested ids separated by `EntryTree.sep`. */
|
|
196
|
+
resolve(id) {
|
|
197
|
+
const parts = id.split(EntryTree.sep);
|
|
198
|
+
let tree = this;
|
|
199
|
+
const final = parts.pop();
|
|
200
|
+
for (const part of parts) {
|
|
201
|
+
tree = tree.store[part]?.subtree;
|
|
202
|
+
if (!tree) throw new Error(`cannot resolve entry ${id}`);
|
|
203
|
+
}
|
|
204
|
+
const entry = tree.store[final];
|
|
205
|
+
if (!entry) throw new Error(`cannot resolve entry ${id}`);
|
|
206
|
+
return entry;
|
|
207
|
+
}
|
|
208
|
+
resolveGroup(id) {
|
|
209
|
+
if (!id) return this.root;
|
|
210
|
+
const entry = this.resolve(id);
|
|
211
|
+
if (!entry.subgroup) throw new Error(`entry ${id} is not a group`);
|
|
212
|
+
return entry.subgroup;
|
|
213
|
+
}
|
|
214
|
+
/** Create an entry in the root group or a nested group. */
|
|
215
|
+
async create(options, parent = null, position = Infinity) {
|
|
216
|
+
const group = this.resolveGroup(parent);
|
|
217
|
+
const id = await group.create(options);
|
|
218
|
+
const entry = this.resolve(id);
|
|
219
|
+
group.data.splice(position, 0, entry.options);
|
|
220
|
+
group.tree.write();
|
|
221
|
+
return id;
|
|
222
|
+
}
|
|
223
|
+
/** Stop and remove an entry from its parent group. */
|
|
224
|
+
async remove(id) {
|
|
225
|
+
const entry = this.resolve(id);
|
|
226
|
+
await entry.parent.remove(id);
|
|
227
|
+
entry.parent.tree.write();
|
|
228
|
+
}
|
|
229
|
+
/** Update an entry and optionally move it to another group. */
|
|
230
|
+
async update(id, options, parent, position) {
|
|
231
|
+
const entry = this.resolve(id);
|
|
232
|
+
const source = entry.parent;
|
|
233
|
+
const sourceIndex = source.data.indexOf(entry.options);
|
|
234
|
+
let target = source;
|
|
235
|
+
if (parent !== void 0) {
|
|
236
|
+
target = this.resolveGroup(parent);
|
|
237
|
+
source.unlink(entry.options);
|
|
238
|
+
target.data.splice(position ?? Infinity, 0, entry.options);
|
|
239
|
+
entry.parent = target;
|
|
240
|
+
}
|
|
241
|
+
try {
|
|
242
|
+
await entry.update(options, false, true);
|
|
243
|
+
} catch (error) {
|
|
244
|
+
if (parent !== void 0) {
|
|
245
|
+
target.unlink(entry.options);
|
|
246
|
+
source.data.splice(sourceIndex < 0 ? source.data.length : sourceIndex, 0, entry.options);
|
|
247
|
+
entry.parent = source;
|
|
248
|
+
try {
|
|
249
|
+
await entry.update({}, false, true);
|
|
250
|
+
} catch (rollbackError) {
|
|
251
|
+
throw new AggregateError([error, rollbackError], `failed to roll back loader entry move ${id}`);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
throw error;
|
|
255
|
+
}
|
|
256
|
+
source.tree.write();
|
|
257
|
+
if (target !== source) target.tree.write();
|
|
258
|
+
}
|
|
259
|
+
/** Import a plugin module from a specifier or `cordis:` builtin. */
|
|
260
|
+
import(name, getOuterStack) {
|
|
261
|
+
if (name.startsWith("cordis:")) return this.ctx.loader.builtins[name.slice(7)];
|
|
262
|
+
return composeError(async (info) => {
|
|
263
|
+
info.offset += 3;
|
|
264
|
+
if (this.ctx.loader.internal) return await this.ctx.loader.internal.import(name, this.ctx.baseUrl, {});
|
|
265
|
+
else if (name.startsWith(".")) return await import(__rewriteRelativeImportExtension(
|
|
266
|
+
/* @vite-ignore */
|
|
267
|
+
new URL(name, this.ctx.baseUrl).href
|
|
268
|
+
));
|
|
269
|
+
else return await import(__rewriteRelativeImportExtension(
|
|
270
|
+
/* @vite-ignore */
|
|
271
|
+
name
|
|
272
|
+
));
|
|
273
|
+
}, getOuterStack);
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region lib/types/config/utils.js
|
|
278
|
+
/** Evaluate a JavaScript expression against a loader context scope. */
|
|
279
|
+
const evaluate = new Function("ctx", "expr", `
|
|
280
|
+
with (ctx) {
|
|
281
|
+
return eval(expr)
|
|
282
|
+
}
|
|
283
|
+
`);
|
|
284
|
+
/** Recursively replace YAML `!js` expression nodes with evaluated values. */
|
|
285
|
+
function interpolate(ctx, value) {
|
|
286
|
+
if (isJsExpr(value)) return evaluate(ctx, value.__jsExpr);
|
|
287
|
+
else if (!value || typeof value !== "object") return value;
|
|
288
|
+
else if (Array.isArray(value)) return value.map((item) => interpolate(ctx, item));
|
|
289
|
+
else return valueMap(value, (item) => interpolate(ctx, item));
|
|
290
|
+
}
|
|
291
|
+
/** Return true when a value is a serialized loader JavaScript expression. */
|
|
292
|
+
function isJsExpr(value) {
|
|
293
|
+
return value instanceof Object && "__jsExpr" in value;
|
|
294
|
+
}
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region lib/types/config/entry.js
|
|
297
|
+
function updateError(stage, options, cause) {
|
|
298
|
+
const detail = cause instanceof Error ? cause.message : String(cause);
|
|
299
|
+
return new Error(`failed to ${stage} loader entry ${options.id} (${options.name}): ${detail}`, { cause });
|
|
300
|
+
}
|
|
301
|
+
function takeEntries(object, keys) {
|
|
302
|
+
const result = [];
|
|
303
|
+
for (const key of keys) {
|
|
304
|
+
if (!(key in object)) continue;
|
|
305
|
+
result.push([key, object[key]]);
|
|
306
|
+
delete object[key];
|
|
307
|
+
}
|
|
308
|
+
return result;
|
|
309
|
+
}
|
|
310
|
+
function sortKeys(object, prepend = ["id", "name"], append = ["config"]) {
|
|
311
|
+
const part1 = takeEntries(object, prepend);
|
|
312
|
+
const part2 = takeEntries(object, append);
|
|
313
|
+
const rest = takeEntries(object, Object.keys(object)).sort(([a], [b]) => a.localeCompare(b));
|
|
314
|
+
return Object.assign(object, Object.fromEntries([
|
|
315
|
+
...part1,
|
|
316
|
+
...rest,
|
|
317
|
+
...part2
|
|
318
|
+
]));
|
|
319
|
+
}
|
|
320
|
+
function replaceKeys(target, source) {
|
|
321
|
+
for (const key of Object.keys(target)) Reflect.deleteProperty(target, key);
|
|
322
|
+
return Object.assign(target, source);
|
|
323
|
+
}
|
|
324
|
+
/** One configured plugin node inside an `EntryTree`. */
|
|
325
|
+
var Entry = class Entry {
|
|
326
|
+
loader;
|
|
327
|
+
static key = Symbol.for("cordis.entry");
|
|
328
|
+
ctx;
|
|
329
|
+
fiber;
|
|
330
|
+
parent;
|
|
331
|
+
options = {};
|
|
332
|
+
subgroup;
|
|
333
|
+
subtree;
|
|
334
|
+
_initTask;
|
|
335
|
+
_disposing = 0;
|
|
336
|
+
constructor(loader) {
|
|
337
|
+
this.loader = loader;
|
|
338
|
+
this.ctx = loader.ctx.extend({ [Entry.key]: this });
|
|
339
|
+
this.context.emit("loader/entry-init", this);
|
|
340
|
+
}
|
|
341
|
+
get context() {
|
|
342
|
+
return this.ctx;
|
|
343
|
+
}
|
|
344
|
+
get id() {
|
|
345
|
+
let id = this.options.id;
|
|
346
|
+
if (this.parent.tree.ctx.fiber.entry) id = this.parent.tree.ctx.fiber.entry.id + EntryTree.sep + id;
|
|
347
|
+
return id;
|
|
348
|
+
}
|
|
349
|
+
/** True when this entry or any owning parent entry is disabled. */
|
|
350
|
+
get disabled() {
|
|
351
|
+
return this._disabled(this.options);
|
|
352
|
+
}
|
|
353
|
+
_disabled(options) {
|
|
354
|
+
if (options.group) return false;
|
|
355
|
+
if (this.disabledOf(options)) return true;
|
|
356
|
+
let entry = this.parent.ctx.fiber.entry;
|
|
357
|
+
while (entry) {
|
|
358
|
+
if (this.disabledOf(entry.options)) return true;
|
|
359
|
+
entry = entry.parent.ctx.fiber.entry;
|
|
360
|
+
}
|
|
361
|
+
return false;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Effective disabled state: a `!!js` expression evaluates against the loader
|
|
365
|
+
* context. The raw node stays in the options, so write-back keeps the form.
|
|
366
|
+
*/
|
|
367
|
+
disabledOf(options) {
|
|
368
|
+
return isJsExpr(options.disabled) ? Boolean(this.evaluate(options.disabled.__jsExpr)) : Boolean(options.disabled);
|
|
369
|
+
}
|
|
370
|
+
evaluate(expr) {
|
|
371
|
+
return evaluate(this.ctx, expr);
|
|
372
|
+
}
|
|
373
|
+
async _patchContext(diff) {
|
|
374
|
+
await this.context.waterfall("loader/patch-context", this, async () => {
|
|
375
|
+
Object.setPrototypeOf(this.ctx, this.parent.ctx);
|
|
376
|
+
if (this.fiber?.uid && (diff.includes("config") || this.options.group)) await this.fiber.update(this.options.config, true);
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
async refresh() {
|
|
380
|
+
if (this.fiber) return;
|
|
381
|
+
if (this.disabled) return;
|
|
382
|
+
await this.init();
|
|
383
|
+
}
|
|
384
|
+
async _dispose(fiber = this.fiber) {
|
|
385
|
+
if (!fiber) return;
|
|
386
|
+
if (this.fiber === fiber) this.fiber = void 0;
|
|
387
|
+
this._disposing += 1;
|
|
388
|
+
try {
|
|
389
|
+
await fiber.dispose();
|
|
390
|
+
} finally {
|
|
391
|
+
this._disposing -= 1;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
/** Merge new options, restart as needed, and persist through the parent tree. */
|
|
395
|
+
async update(options, create = false, force = false) {
|
|
396
|
+
const previousOptions = this.options;
|
|
397
|
+
const legacy = { ...previousOptions };
|
|
398
|
+
const candidate = create ? options : { ...previousOptions };
|
|
399
|
+
if (!create) for (const [key, value] of Object.entries(options)) if (isNullable(value)) delete candidate[key];
|
|
400
|
+
else candidate[key] = value;
|
|
401
|
+
sortKeys(candidate);
|
|
402
|
+
const diff = Object.keys({
|
|
403
|
+
...candidate,
|
|
404
|
+
...legacy
|
|
405
|
+
}).filter((key) => !deepEqual(candidate[key], legacy[key]));
|
|
406
|
+
if (!diff.length && !force) return;
|
|
407
|
+
const commit = () => {
|
|
408
|
+
if (create) return;
|
|
409
|
+
this.options = replaceKeys(previousOptions, candidate);
|
|
410
|
+
};
|
|
411
|
+
const previous = this.fiber;
|
|
412
|
+
if (!previous?.uid) {
|
|
413
|
+
this.fiber = void 0;
|
|
414
|
+
this.options = candidate;
|
|
415
|
+
try {
|
|
416
|
+
if (!this._disabled(candidate)) await this.init();
|
|
417
|
+
} catch (error) {
|
|
418
|
+
this.options = previousOptions;
|
|
419
|
+
throw error;
|
|
420
|
+
}
|
|
421
|
+
commit();
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
if (this._disabled(candidate)) {
|
|
425
|
+
this.options = candidate;
|
|
426
|
+
try {
|
|
427
|
+
await this._dispose(previous);
|
|
428
|
+
} catch (error) {
|
|
429
|
+
this.options = previousOptions;
|
|
430
|
+
throw updateError("dispose", candidate, error);
|
|
431
|
+
}
|
|
432
|
+
commit();
|
|
433
|
+
this.context.emit("loader/partial-dispose", this, legacy, true);
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
if (!diff.some((key) => key === "name" || key === "inject" || key === "group")) {
|
|
437
|
+
this.options = candidate;
|
|
438
|
+
try {
|
|
439
|
+
await this._patchContext(diff);
|
|
440
|
+
} catch (error) {
|
|
441
|
+
this.options = previousOptions;
|
|
442
|
+
try {
|
|
443
|
+
await this._patchContext(diff);
|
|
444
|
+
} catch (rollbackError) {
|
|
445
|
+
throw updateError("rollback", legacy, new AggregateError([error, rollbackError]));
|
|
446
|
+
}
|
|
447
|
+
this.context.emit("loader/partial-dispose", this, candidate, true);
|
|
448
|
+
throw updateError("apply", candidate, error);
|
|
449
|
+
}
|
|
450
|
+
commit();
|
|
451
|
+
this.context.emit("loader/partial-dispose", this, legacy, true);
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
let plugin;
|
|
455
|
+
try {
|
|
456
|
+
plugin = diff.includes("name") ? this.loader.unwrapExports(await this.parent.tree.import(candidate.name, this.getOuterStack)) : previous.runtime.callback;
|
|
457
|
+
} catch (error) {
|
|
458
|
+
throw updateError("import", candidate, error);
|
|
459
|
+
}
|
|
460
|
+
const previousPlugin = previous.runtime.callback;
|
|
461
|
+
this.options = candidate;
|
|
462
|
+
try {
|
|
463
|
+
await this._dispose(previous);
|
|
464
|
+
} catch (error) {
|
|
465
|
+
this.options = previousOptions;
|
|
466
|
+
throw updateError("dispose", candidate, error);
|
|
467
|
+
}
|
|
468
|
+
try {
|
|
469
|
+
await this._start(plugin);
|
|
470
|
+
} catch (error) {
|
|
471
|
+
this.options = previousOptions;
|
|
472
|
+
try {
|
|
473
|
+
await this._start(previousPlugin);
|
|
474
|
+
} catch (rollbackError) {
|
|
475
|
+
throw updateError("rollback", legacy, new AggregateError([error, rollbackError]));
|
|
476
|
+
}
|
|
477
|
+
this.context.emit("loader/partial-dispose", this, candidate, true);
|
|
478
|
+
throw updateError("apply", candidate, error);
|
|
479
|
+
}
|
|
480
|
+
commit();
|
|
481
|
+
this.context.emit("loader/partial-dispose", this, legacy, true);
|
|
482
|
+
}
|
|
483
|
+
getOuterStack = () => {
|
|
484
|
+
let entry = this;
|
|
485
|
+
const result = [];
|
|
486
|
+
do {
|
|
487
|
+
result.push(` at ${entry.parent.tree.ctx.baseUrl}#${entry.options.id}`);
|
|
488
|
+
entry = entry.parent.ctx.fiber.entry;
|
|
489
|
+
} while (entry);
|
|
490
|
+
return result;
|
|
491
|
+
};
|
|
492
|
+
/** Import and start the configured plugin if it is not already running. */
|
|
493
|
+
async init() {
|
|
494
|
+
try {
|
|
495
|
+
await (this._initTask ??= this._init());
|
|
496
|
+
} finally {
|
|
497
|
+
this._initTask = void 0;
|
|
498
|
+
if (!this.loader.getTasks().length) this.ctx.reflect.notify(["loader"]);
|
|
499
|
+
}
|
|
500
|
+
await this._await();
|
|
501
|
+
}
|
|
502
|
+
async _await() {
|
|
503
|
+
try {
|
|
504
|
+
await this.fiber?.await();
|
|
505
|
+
} catch (error) {
|
|
506
|
+
throw updateError("apply", this.options, error);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
async _init() {
|
|
510
|
+
let plugin;
|
|
511
|
+
try {
|
|
512
|
+
plugin = this.loader.unwrapExports(await this.parent.tree.import(this.options.name, this.getOuterStack));
|
|
513
|
+
} catch (error) {
|
|
514
|
+
throw updateError("import", this.options, error);
|
|
515
|
+
}
|
|
516
|
+
try {
|
|
517
|
+
await this._start(plugin);
|
|
518
|
+
} catch (error) {
|
|
519
|
+
throw updateError("apply", this.options, error);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
async _start(plugin) {
|
|
523
|
+
let fiber;
|
|
524
|
+
try {
|
|
525
|
+
await this._patchContext([]);
|
|
526
|
+
this.loader.showLog(this, "apply");
|
|
527
|
+
fiber = this.fiber = this.ctx.registry.plugin(plugin, this.options.config, this.getOuterStack);
|
|
528
|
+
await fiber.await();
|
|
529
|
+
} catch (error) {
|
|
530
|
+
await this._dispose(fiber);
|
|
531
|
+
throw error;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
//#endregion
|
|
536
|
+
//#region lib/types/config/isolate.js
|
|
537
|
+
function swap(target, source) {
|
|
538
|
+
for (const key of Reflect.ownKeys(target)) Reflect.deleteProperty(target, key);
|
|
539
|
+
for (const key of Reflect.ownKeys(source || {})) Reflect.defineProperty(target, key, Reflect.getOwnPropertyDescriptor(source, key));
|
|
540
|
+
}
|
|
541
|
+
/** Symbol realm used to isolate service implementations by entry or label. */
|
|
542
|
+
var Realm = class {
|
|
543
|
+
store = Object.create(null);
|
|
544
|
+
access(key, create = false) {
|
|
545
|
+
if (create) return this.store[key] ??= Symbol(`${key}${this.suffix}`);
|
|
546
|
+
else return this.store[key] ?? Symbol(`${key}${this.suffix}`);
|
|
547
|
+
}
|
|
548
|
+
delete(key) {
|
|
549
|
+
delete this.store[key];
|
|
550
|
+
}
|
|
551
|
+
get size() {
|
|
552
|
+
return Object.keys(this.store).length;
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
/** Entry-local isolation realm. */
|
|
556
|
+
var LocalRealm = class extends Realm {
|
|
557
|
+
entry;
|
|
558
|
+
constructor(entry) {
|
|
559
|
+
super();
|
|
560
|
+
this.entry = entry;
|
|
561
|
+
}
|
|
562
|
+
get suffix() {
|
|
563
|
+
return "#" + this.entry.options.id;
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
/** Named isolation realm shared by entries that use the same label. */
|
|
567
|
+
var GlobalRealm = class extends Realm {
|
|
568
|
+
label;
|
|
569
|
+
constructor(label) {
|
|
570
|
+
super();
|
|
571
|
+
this.label = label;
|
|
572
|
+
}
|
|
573
|
+
get suffix() {
|
|
574
|
+
return "@" + this.label;
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
/** Install loader hooks that apply `intercept` and `isolate` entry options. */
|
|
578
|
+
function isolate(ctx) {
|
|
579
|
+
const realms = Object.create(null);
|
|
580
|
+
const delims = Object.create(null);
|
|
581
|
+
function access(entry, name, create = false) {
|
|
582
|
+
let realm;
|
|
583
|
+
const label = entry.options.isolate?.[name];
|
|
584
|
+
if (!label) return;
|
|
585
|
+
if (label === true) realm = entry.realm ??= new LocalRealm(entry);
|
|
586
|
+
else if (create) realm = realms[label] ??= new GlobalRealm(label);
|
|
587
|
+
else realm = realms[label];
|
|
588
|
+
return realm?.access(name, create);
|
|
589
|
+
}
|
|
590
|
+
ctx.on("loader/entry-init", (entry) => {
|
|
591
|
+
entry.ctx[Context.intercept] = Object.create(entry.ctx[Context.intercept]);
|
|
592
|
+
entry.ctx[Context.isolate] = Object.create(entry.ctx[Context.isolate]);
|
|
593
|
+
});
|
|
594
|
+
ctx.on("loader/patch-context", async (entry, next) => {
|
|
595
|
+
const newMap = Object.create(entry.parent.ctx[Context.isolate]);
|
|
596
|
+
for (const name of Object.keys(entry.options.isolate ?? {})) newMap[name] = access(entry, name, true);
|
|
597
|
+
const diff = Object.create(null);
|
|
598
|
+
const oldMap = entry.ctx[Context.isolate];
|
|
599
|
+
for (const name in {
|
|
600
|
+
...newMap,
|
|
601
|
+
...delims
|
|
602
|
+
}) {
|
|
603
|
+
if (newMap[name] === oldMap[name]) continue;
|
|
604
|
+
const delim = delims[name] ??= Symbol(`delim:${name}`);
|
|
605
|
+
entry.ctx[delim] = Symbol(`${name}#${entry.id}`);
|
|
606
|
+
for (const symbol of [oldMap[name], newMap[name]]) {
|
|
607
|
+
const impl = symbol && entry.ctx.reflect.store[symbol];
|
|
608
|
+
if (!impl) continue;
|
|
609
|
+
if (!impl.fiber) {
|
|
610
|
+
entry.ctx.logger.warn(/* @__PURE__ */ new Error(`expected service ${name} to be implemented`));
|
|
611
|
+
continue;
|
|
612
|
+
}
|
|
613
|
+
diff[name] = [
|
|
614
|
+
oldMap[name],
|
|
615
|
+
newMap[name],
|
|
616
|
+
entry.ctx[delim],
|
|
617
|
+
impl.fiber.ctx[delim]
|
|
618
|
+
];
|
|
619
|
+
if (entry.ctx[delim] !== impl.fiber.ctx[delim]) break;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
Object.setPrototypeOf(entry.ctx[Context.isolate], entry.parent.ctx[Context.isolate]);
|
|
623
|
+
Object.setPrototypeOf(entry.ctx[Context.intercept], entry.parent.ctx[Context.intercept]);
|
|
624
|
+
swap(entry.ctx[Context.isolate], newMap);
|
|
625
|
+
swap(entry.ctx[Context.intercept], entry.options.intercept);
|
|
626
|
+
await next();
|
|
627
|
+
for (const [symbol1, symbol2, flag1, flag2] of Object.values(diff)) if (flag1 === flag2 && entry.ctx.reflect.store[symbol1] && !entry.ctx.reflect.store[symbol2]) {
|
|
628
|
+
entry.ctx.reflect.store[symbol2] = entry.ctx.reflect.store[symbol1];
|
|
629
|
+
delete entry.ctx.reflect.store[symbol1];
|
|
630
|
+
}
|
|
631
|
+
ctx.reflect.notify(Object.keys(diff), (ctx, name) => {
|
|
632
|
+
const [symbol1, symbol2, flag1, flag2] = diff[name];
|
|
633
|
+
const symbol3 = ctx[Context.isolate][name];
|
|
634
|
+
const flag3 = ctx[delims[name]];
|
|
635
|
+
return (symbol1 === symbol3 || symbol2 === symbol3) && flag1 === flag3 !== (flag1 === flag2);
|
|
636
|
+
});
|
|
637
|
+
for (const name in delims) if (!Reflect.ownKeys(newMap).includes(name)) delete entry.ctx[delims[name]];
|
|
638
|
+
});
|
|
639
|
+
ctx.on("loader/partial-dispose", (entry, legacy, active) => {
|
|
640
|
+
for (const [name, label] of Object.entries(legacy.isolate ?? {})) {
|
|
641
|
+
if (label === true) continue;
|
|
642
|
+
if (active && entry.options.isolate?.[name] === label) continue;
|
|
643
|
+
const realm = realms[label];
|
|
644
|
+
if (!realm) continue;
|
|
645
|
+
for (const entry of ctx.loader.entries()) if (entry.options.isolate?.[name] === realm.label) return;
|
|
646
|
+
realm.delete(name);
|
|
647
|
+
if (!realm.size) delete realms[realm.label];
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
//#endregion
|
|
652
|
+
//#region lib/types/index.js
|
|
653
|
+
/**
|
|
654
|
+
* Service that owns a loader entry tree and imports configured plugins.
|
|
655
|
+
*
|
|
656
|
+
* Subclasses provide persistence by implementing `write()` on `EntryTree`.
|
|
657
|
+
*/
|
|
658
|
+
var Loader = class extends EntryTree {
|
|
659
|
+
config;
|
|
660
|
+
envData = process.env.CORDIS_SHARED ? JSON.parse(process.env.CORDIS_SHARED) : { startTime: Date.now() };
|
|
661
|
+
name = "loader";
|
|
662
|
+
internal = ModuleLoader.fromInternal();
|
|
663
|
+
builtins = Object.create(null);
|
|
664
|
+
constructor(ctx, config = {}) {
|
|
665
|
+
super(ctx);
|
|
666
|
+
this.config = config;
|
|
667
|
+
if (config.baseUrl) this.ctx.baseUrl = config.baseUrl;
|
|
668
|
+
const self = this;
|
|
669
|
+
defineProperty(this, Service.tracker, {
|
|
670
|
+
associate: "loader",
|
|
671
|
+
property: "ctx",
|
|
672
|
+
noShadow: true
|
|
673
|
+
});
|
|
674
|
+
ctx.reflect.provide("loader", this, this[Service.check]);
|
|
675
|
+
ctx.on("internal/config", function(_config, next) {
|
|
676
|
+
const config = next();
|
|
677
|
+
if (!this.entry || this.parent.fiber?.entry === this.entry) return config;
|
|
678
|
+
if ((this.runtime?.callback)?.[EntryGroup.key]) return config;
|
|
679
|
+
return interpolate(this.ctx, config);
|
|
680
|
+
}, { global: true });
|
|
681
|
+
ctx.on("internal/update", async function(config, noSave, next) {
|
|
682
|
+
if (!this.entry || noSave || this.parent.fiber?.entry === this.entry) return next();
|
|
683
|
+
await next();
|
|
684
|
+
const unparse = this.runtime?.Config?.["simplify"];
|
|
685
|
+
this.entry.options.config = unparse ? unparse(config) : config;
|
|
686
|
+
this.entry.parent.tree.write();
|
|
687
|
+
}, {
|
|
688
|
+
global: true,
|
|
689
|
+
prepend: true
|
|
690
|
+
});
|
|
691
|
+
ctx.on("internal/update", function(config, _, next) {
|
|
692
|
+
if (!this.entry || this.parent.fiber?.entry === this.entry) return next();
|
|
693
|
+
self.showLog(this.entry, "reload");
|
|
694
|
+
return next();
|
|
695
|
+
}, { global: true });
|
|
696
|
+
ctx.on("internal/plugin", (fiber) => {
|
|
697
|
+
if (fiber.parent[Entry.key] && !fiber.entry) {
|
|
698
|
+
fiber.entry = fiber.parent[Entry.key];
|
|
699
|
+
Inject.resolve(fiber.entry.options.inject, fiber.inject);
|
|
700
|
+
}
|
|
701
|
+
if (fiber.uid) return;
|
|
702
|
+
if (!fiber.entry) return;
|
|
703
|
+
if (fiber.parent.fiber?.entry === fiber.entry) return;
|
|
704
|
+
if (!ctx.registry.has(fiber.runtime.callback)) return;
|
|
705
|
+
const treeOwner = fiber.entry.parent.tree.ctx.fiber;
|
|
706
|
+
if (!treeOwner.uid || treeOwner.state === 5) return;
|
|
707
|
+
if (fiber.entry._disposing) return;
|
|
708
|
+
this.showLog(fiber.entry, "unload");
|
|
709
|
+
if (fiber.entry.disabled) return;
|
|
710
|
+
fiber.entry.options.disabled = true;
|
|
711
|
+
fiber.entry.parent.tree.write();
|
|
712
|
+
});
|
|
713
|
+
ctx.plugin(isolate);
|
|
714
|
+
}
|
|
715
|
+
write() {}
|
|
716
|
+
[Service.check]() {
|
|
717
|
+
if (Service.prototype[Service.resolveConfig].call(this).await && this.getTasks().length) return false;
|
|
718
|
+
return true;
|
|
719
|
+
}
|
|
720
|
+
showLog(entry, type) {
|
|
721
|
+
if (entry.options.group || !entry.parent.tree.enableLogs) return;
|
|
722
|
+
this.ctx.root.logger?.("loader").info("%s plugin %C", type, entry.options.name);
|
|
723
|
+
}
|
|
724
|
+
/** Return the loader entry id that owns `fiber`, if any. */
|
|
725
|
+
locate(fiber = this.ctx.fiber) {
|
|
726
|
+
while (1) {
|
|
727
|
+
if (fiber.entry) return fiber.entry.id;
|
|
728
|
+
const next = fiber.parent.fiber;
|
|
729
|
+
if (fiber === next) return;
|
|
730
|
+
fiber = next;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
/** Hook for hosts that can restart the process on full-reload requests. */
|
|
734
|
+
exit() {}
|
|
735
|
+
/** Normalize ESM/CJS/default export shapes before applying a plugin. */
|
|
736
|
+
unwrapExports(exports) {
|
|
737
|
+
if (isNullable(exports)) return exports;
|
|
738
|
+
exports = exports.default ?? exports;
|
|
739
|
+
if (!exports.__esModule) return exports;
|
|
740
|
+
return exports.default ?? exports;
|
|
741
|
+
}
|
|
742
|
+
};
|
|
743
|
+
//#endregion
|
|
744
|
+
export { Entry, EntryGroup, EntryTree, GlobalRealm, Group, Loader, Loader as default, LocalRealm, ModuleLoader, Realm, evaluate, interpolate, isJsExpr };
|