@nomix-ai/nomix-harness 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -9
- package/dist/assets/web/assets/index-BnapMmQ_.css +1 -0
- package/dist/assets/web/assets/index-Dx7Ws_OC.js +96 -0
- package/dist/assets/web/assets/langs/{php-D-uCvoST.js → php-DDkx9sim.js} +2 -2
- package/dist/{kernel/web-frontend/dist/assets/langs/ruby-DEItuUFs.js → assets/web/assets/langs/ruby-DCxyoPen.js} +2 -2
- package/dist/assets/web/assets/{vendor-Cjbwl5VI.js → vendor-D22_Mp1f.js} +2 -2
- package/dist/assets/web/favicon.svg +8 -0
- package/dist/assets/web/index.html +5 -5
- package/dist/bundles/base/cordis.patch.yml +31 -6
- package/dist/bundles/web-app/cordis.patch.yml +27 -6
- package/dist/cli/bin.js +4 -5
- package/dist/cli/builtin-registry.js +34 -4
- package/dist/cli/{dump-config-d3ECray2.js → dump-config-BEj2GlJo.js} +1 -1
- package/dist/cli/{plugin-Bw9wgrmj.js → plugin-D_gLgCYL.js} +1 -1
- package/dist/cli/profile-boot-BSrYtiQI.js +2 -0
- package/dist/cli/{profile-boot-DFHdh9Xq.js → profile-boot-CByqUxLM.js} +0 -2
- package/dist/cli/runtime.js +0 -2
- package/dist/config/agent-presets/code/agent.cordis.yml +4 -3
- package/dist/config/agent-presets/cordis/agent.cordis.yml +4 -3
- package/dist/config/agent-presets/cordis/skills/editing-cordis-compositions/SKILL.md +13 -2
- package/dist/config/agent-presets/minimal/agent.cordis.yml +27 -1
- package/dist/config/agent-presets/standard/agent.cordis.yml +4 -3
- package/dist/kernel/acp/package.json +1 -1
- package/dist/kernel/agent/package.json +1 -1
- package/dist/kernel/agent-default-model/package.json +1 -1
- package/dist/kernel/agent-instructions/package.json +1 -1
- package/dist/kernel/agent-loop/lib/index.js +33 -10
- package/dist/kernel/agent-loop/lib/types/agent.js +26 -6
- package/dist/kernel/agent-loop/package.json +1 -1
- package/dist/kernel/agent-presets/package.json +1 -1
- package/dist/kernel/agent-tool-presentation/package.json +1 -1
- package/dist/kernel/anonymous-user-id/package.json +1 -1
- package/dist/kernel/api-gateway/lib/client.js +84 -55
- package/dist/kernel/api-gateway/lib/types/client/index.js +93 -61
- package/dist/kernel/api-gateway/package.json +1 -1
- package/dist/kernel/api-remotes/lib/client.js +166 -27
- package/dist/kernel/api-remotes/lib/index.js +1 -1
- package/dist/kernel/api-remotes/lib/types/client/index.d.ts +4 -0
- package/dist/kernel/api-remotes/lib/types/client/index.js +4 -1
- package/dist/kernel/api-remotes/lib/types/remote-events.d.ts +1 -1
- package/dist/kernel/api-remotes/lib/types/remote-events.js +1 -1
- package/dist/kernel/api-remotes/package.json +11 -7
- package/dist/kernel/app-boot/lib/index.js +19 -41
- package/dist/kernel/app-boot/lib/types/index.d.ts +0 -1
- package/dist/kernel/app-boot/lib/types/index.js +2 -3
- package/dist/kernel/app-boot/lib/types/profile.d.ts +15 -12
- package/dist/kernel/app-boot/lib/types/profile.js +15 -25
- package/dist/kernel/app-boot/package.json +1 -1
- package/dist/kernel/atomic-write/lib/index.js +36 -16
- package/dist/kernel/atomic-write/lib/types/index.d.ts +21 -5
- package/dist/kernel/atomic-write/lib/types/index.js +40 -16
- package/dist/kernel/atomic-write/package.json +1 -1
- package/dist/kernel/attachment/lib/index.js +62 -3
- package/dist/kernel/attachment/lib/types/admission.d.ts +15 -0
- package/dist/kernel/attachment/lib/types/admission.js +33 -0
- package/dist/kernel/attachment/lib/types/brand.d.ts +8 -0
- package/dist/kernel/attachment/lib/types/brand.js +8 -0
- package/dist/kernel/attachment/lib/types/error.d.ts +2 -2
- package/dist/kernel/attachment/lib/types/error.js +1 -0
- package/dist/kernel/attachment/lib/types/index.d.ts +23 -5
- package/dist/kernel/attachment/lib/types/index.js +24 -2
- package/dist/kernel/attachment/lib/types/types.d.ts +47 -2
- package/dist/kernel/attachment/package.json +3 -2
- package/dist/kernel/attachment-local/lib/index.js +640 -48
- package/dist/kernel/attachment-local/lib/types/compression-limiter.d.ts +18 -0
- package/dist/kernel/attachment-local/lib/types/compression-limiter.js +43 -0
- package/dist/kernel/attachment-local/lib/types/encoding.d.ts +23 -0
- package/dist/kernel/attachment-local/lib/types/encoding.js +33 -0
- package/dist/kernel/attachment-local/lib/types/image.d.ts +31 -2
- package/dist/kernel/attachment-local/lib/types/image.js +43 -4
- package/dist/kernel/attachment-local/lib/types/index.d.ts +45 -10
- package/dist/kernel/attachment-local/lib/types/index.js +140 -10
- package/dist/kernel/attachment-local/lib/types/normalization.d.ts +44 -0
- package/dist/kernel/attachment-local/lib/types/normalization.js +148 -0
- package/dist/kernel/attachment-local/lib/types/request-image.d.ts +35 -0
- package/dist/kernel/attachment-local/lib/types/request-image.js +208 -0
- package/dist/kernel/attachment-local/lib/types/store.d.ts +36 -9
- package/dist/kernel/attachment-local/lib/types/store.js +60 -24
- package/dist/kernel/attachment-local/package.json +1 -1
- package/dist/kernel/authorization/lib/index.js +248 -0
- package/dist/kernel/authorization/lib/invariant.js +36 -0
- package/dist/kernel/authorization/lib/types/index.d.ts +223 -0
- package/dist/kernel/authorization/lib/types/index.js +299 -0
- package/dist/kernel/authorization/lib/types/invariant.d.ts +16 -0
- package/dist/kernel/authorization/lib/types/invariant.js +38 -0
- package/dist/kernel/authorization/lib/types/types.d.ts +83 -0
- package/dist/kernel/authorization/lib/types/types.js +8 -0
- package/dist/kernel/{client-web-react → authorization}/package.json +19 -16
- package/dist/kernel/base/cordis.patch.yml +31 -6
- package/dist/kernel/base/package.json +3 -1
- package/dist/kernel/bash-local/package.json +1 -1
- package/dist/kernel/bash-sandbox/package.json +1 -1
- package/dist/kernel/brand/package.json +1 -1
- package/dist/kernel/client-connection/lib/client.js +148 -28
- package/dist/kernel/client-connection/lib/index.js +4 -4
- package/dist/kernel/client-connection/lib/types/client/fixture.js +112 -20
- package/dist/kernel/client-connection/lib/types/client/index.d.ts +21 -1
- package/dist/kernel/client-connection/lib/types/client/index.js +3 -2
- package/dist/kernel/client-connection/lib/types/client/rpc.d.ts +4 -1
- package/dist/kernel/client-connection/lib/types/client/rpc.js +4 -2
- package/dist/kernel/client-connection/lib/types/http-bridge.d.ts +2 -2
- package/dist/kernel/client-connection/lib/types/http-bridge.js +3 -3
- package/dist/kernel/client-connection/lib/types/index.d.ts +1 -1
- package/dist/kernel/client-connection/package.json +15 -9
- package/dist/kernel/client-hmr/package.json +1 -1
- package/dist/kernel/client-locale/lib/client.js +48 -9
- package/dist/kernel/client-locale/lib/types/client/index.d.ts +19 -3
- package/dist/kernel/client-locale/lib/types/client/index.js +48 -7
- package/dist/kernel/client-locale/package.json +6 -6
- package/dist/kernel/client-modules/lib/client.js +188 -123
- package/dist/kernel/client-modules/lib/index.js +177 -31
- package/dist/kernel/client-modules/lib/types/client/index.d.ts +19 -8
- package/dist/kernel/client-modules/lib/types/client/index.js +25 -8
- package/dist/kernel/client-modules/lib/types/client/manifest.d.ts +90 -41
- package/dist/kernel/client-modules/lib/types/client/manifest.js +45 -12
- package/dist/kernel/client-modules/lib/types/client/system.d.ts +15 -17
- package/dist/kernel/client-modules/lib/types/client/system.js +85 -56
- package/dist/kernel/client-modules/lib/types/index.d.ts +28 -12
- package/dist/kernel/client-modules/lib/types/index.js +128 -34
- package/dist/kernel/client-modules/package.json +4 -2
- package/dist/kernel/client-runtime/lib/client.js +43 -8
- package/dist/kernel/client-runtime/lib/types/client/contract/session.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/contract/store.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/contract/store.js +2 -2
- package/dist/kernel/client-runtime/lib/types/client/index.d.ts +2 -2
- package/dist/kernel/client-runtime/lib/types/client/index.js +3 -3
- package/dist/kernel/client-runtime/lib/types/client/sessions/context-provenance.d.ts +8 -0
- package/dist/kernel/client-runtime/lib/types/client/sessions/context-provenance.js +13 -0
- package/dist/kernel/client-runtime/lib/types/client/sessions/conversation.d.ts +11 -7
- package/dist/kernel/client-runtime/lib/types/client/sessions/projection-store.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/sessions/session.js +4 -4
- package/dist/kernel/client-runtime/lib/types/client/slots.d.ts +1 -1
- package/dist/kernel/client-runtime/lib/types/client/slots.js +1 -1
- package/dist/kernel/client-runtime/lib/types/client/workspaces/path.d.ts +9 -0
- package/dist/kernel/client-runtime/lib/types/client/workspaces/path.js +27 -1
- package/dist/kernel/client-runtime/package.json +25 -14
- package/dist/kernel/client-ui-agent-preset/lib/client.js +55 -55
- package/dist/kernel/client-ui-agent-preset/lib/types/client/index.js +2 -2
- package/dist/kernel/client-ui-agent-preset/lib/types/client/settings-store.d.ts +7 -1
- package/dist/kernel/client-ui-agent-preset/lib/types/client/settings-store.js +21 -20
- package/dist/kernel/client-ui-agent-preset/package.json +2 -7
- package/dist/kernel/client-ui-attachment/lib/client.js +782 -0
- package/dist/kernel/client-ui-attachment/lib/index.js +5 -505
- package/dist/kernel/client-ui-attachment/lib/invariant.js +2 -3
- package/dist/kernel/client-ui-attachment/lib/types/client/ComposerAttachments.d.ts +4 -0
- package/dist/kernel/client-ui-attachment/lib/types/client/ComposerAttachments.js +85 -0
- package/dist/kernel/client-ui-attachment/lib/types/client/MessageImages.d.ts +4 -0
- package/dist/kernel/client-ui-attachment/lib/types/client/MessageImages.js +8 -0
- package/dist/kernel/client-ui-attachment/lib/types/client/index.d.ts +7 -0
- package/dist/kernel/client-ui-attachment/lib/types/client/index.js +16 -0
- package/dist/kernel/client-ui-attachment/lib/types/client/labels.d.ts +35 -0
- package/dist/kernel/client-ui-attachment/lib/types/client/labels.js +52 -0
- package/dist/kernel/client-ui-attachment/lib/types/index.d.ts +3 -15
- package/dist/kernel/client-ui-attachment/lib/types/index.js +3 -11
- package/dist/kernel/client-ui-attachment/lib/types/invariant.js +2 -3
- package/dist/kernel/client-ui-attachment/package.json +32 -9
- package/dist/kernel/client-ui-brand-official/lib/client.js +50 -0
- package/dist/kernel/client-ui-brand-official/lib/index.js +9 -0
- package/dist/kernel/{client-web-react → client-ui-brand-official}/lib/invariant.js +6 -8
- package/dist/kernel/client-ui-brand-official/lib/types/client/Brand.d.ts +16 -0
- package/dist/kernel/client-ui-brand-official/lib/types/client/Brand.js +18 -0
- package/dist/kernel/client-ui-brand-official/lib/types/client/index.d.ts +10 -0
- package/dist/kernel/client-ui-brand-official/lib/types/client/index.js +17 -0
- package/dist/kernel/client-ui-brand-official/lib/types/index.d.ts +7 -0
- package/dist/kernel/client-ui-brand-official/lib/types/index.js +7 -0
- package/dist/kernel/client-ui-brand-official/lib/types/invariant.d.ts +16 -0
- package/dist/kernel/{client-web-react → client-ui-brand-official}/lib/types/invariant.js +6 -8
- package/dist/kernel/client-ui-brand-official/package.json +72 -0
- package/dist/kernel/client-ui-commands/lib/client.js +44 -15
- package/dist/kernel/client-ui-commands/lib/types/client/locales.d.ts +2 -0
- package/dist/kernel/client-ui-commands/lib/types/client/locales.js +2 -0
- package/dist/kernel/client-ui-commands/lib/types/client/service.d.ts +11 -1
- package/dist/kernel/client-ui-commands/lib/types/client/service.js +39 -7
- package/dist/kernel/client-ui-commands/package.json +2 -5
- package/dist/kernel/client-ui-conversation/lib/client.js +949 -531
- package/dist/kernel/client-ui-conversation/lib/types/client/apply.js +6 -4
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/AssistantMarkdown.d.ts +4 -5
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/AssistantMarkdown.js +6 -6
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/AssistantNodeView.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/AssistantNodeView.js +2 -2
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/ChatNodeSeat.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/ChatNodeSeat.js +5 -3
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/ChatView.js +53 -10
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/ContextInjectionRow.js +4 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/MessageItem.d.ts +4 -5
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/MessageItem.js +46 -16
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/StatsLine.d.ts +5 -3
- package/dist/kernel/client-ui-conversation/lib/types/client/chat/StatsLine.js +54 -5
- package/dist/kernel/client-ui-conversation/lib/types/client/contract/slots.d.ts +90 -8
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/assistant.js +1 -0
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/chat-snapshot-builder.d.ts +1 -0
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/chat-snapshot-builder.js +95 -6
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/message.d.ts +11 -3
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/turn-error.d.ts +6 -3
- package/dist/kernel/client-ui-conversation/lib/types/client/conversation-nodes/turn-error.js +10 -26
- package/dist/kernel/client-ui-conversation/lib/types/client/image-labels.d.ts +1 -33
- package/dist/kernel/client-ui-conversation/lib/types/client/image-labels.js +5 -54
- package/dist/kernel/client-ui-conversation/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/input/contract.d.ts +17 -14
- package/dist/kernel/client-ui-conversation/lib/types/client/input/decorations.d.ts +13 -5
- package/dist/kernel/client-ui-conversation/lib/types/client/input/decorations.js +26 -10
- package/dist/kernel/client-ui-conversation/lib/types/client/input/facade.d.ts +34 -14
- package/dist/kernel/client-ui-conversation/lib/types/client/input/facade.js +116 -34
- package/dist/kernel/client-ui-conversation/lib/types/client/input/hub.d.ts +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/input/hub.js +21 -19
- package/dist/kernel/client-ui-conversation/lib/types/client/input/machine.d.ts +35 -14
- package/dist/kernel/client-ui-conversation/lib/types/client/input/machine.js +71 -34
- package/dist/kernel/client-ui-conversation/lib/types/client/locales.d.ts +16 -0
- package/dist/kernel/client-ui-conversation/lib/types/client/locales.js +16 -0
- package/dist/kernel/client-ui-conversation/lib/types/client/reference/ReferenceIcon.d.ts +16 -0
- package/dist/kernel/client-ui-conversation/lib/types/client/reference/ReferenceIcon.js +16 -0
- package/dist/kernel/client-ui-conversation/lib/types/client/service.d.ts +14 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/service.js +26 -6
- package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/ConversationRoot.js +1 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/ConversationSession.js +18 -3
- package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/EmptyHero.d.ts +3 -1
- package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/EmptyHero.js +4 -2
- package/dist/kernel/client-ui-conversation/lib/types/client/skeleton/InputBar.js +141 -126
- package/dist/kernel/client-ui-conversation/package.json +9 -8
- package/dist/kernel/client-ui-cordis/lib/client.js +48 -48
- package/dist/kernel/client-ui-cordis/package.json +2 -5
- package/dist/kernel/client-ui-deliverables/lib/client.js +5 -5
- package/dist/kernel/client-ui-deliverables/package.json +4 -6
- package/dist/kernel/client-ui-directory-picker-browse/lib/client.js +26 -26
- package/dist/kernel/client-ui-directory-picker-browse/package.json +2 -5
- package/dist/kernel/client-ui-directory-picker-native/package.json +2 -5
- package/dist/kernel/client-ui-goal/lib/client.js +8 -8
- package/dist/kernel/client-ui-goal/package.json +6 -5
- package/dist/kernel/client-ui-input-trigger/lib/client.js +82 -26
- package/dist/kernel/client-ui-input-trigger/lib/types/client/MenuView.js +13 -9
- package/dist/kernel/client-ui-input-trigger/lib/types/client/controller.d.ts +5 -3
- package/dist/kernel/client-ui-input-trigger/lib/types/client/controller.js +19 -7
- package/dist/kernel/client-ui-input-trigger/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-ui-input-trigger/lib/types/core/contract.d.ts +7 -2
- package/dist/kernel/client-ui-input-trigger/lib/types/core/detect.d.ts +4 -4
- package/dist/kernel/client-ui-input-trigger/lib/types/core/detect.js +24 -6
- package/dist/kernel/client-ui-input-trigger/lib/types/core/menu.d.ts +15 -2
- package/dist/kernel/client-ui-input-trigger/lib/types/core/menu.js +13 -4
- package/dist/kernel/client-ui-input-trigger/lib/types/types.d.ts +52 -8
- package/dist/kernel/client-ui-input-trigger/package.json +4 -5
- package/dist/kernel/client-ui-jobs/lib/client.js +10 -10
- package/dist/kernel/client-ui-jobs/package.json +3 -7
- package/dist/kernel/client-ui-layout/lib/client.js +3 -3
- package/dist/kernel/client-ui-layout/package.json +2 -4
- package/dist/kernel/client-ui-message-feedback/lib/client.js +174 -58
- package/dist/kernel/client-ui-message-feedback/lib/types/client/MessageFeedbackActions.d.ts +9 -3
- package/dist/kernel/client-ui-message-feedback/lib/types/client/MessageFeedbackActions.js +164 -25
- package/dist/kernel/client-ui-message-feedback/lib/types/client/locales.d.ts +2 -0
- package/dist/kernel/client-ui-message-feedback/lib/types/client/locales.js +2 -0
- package/dist/kernel/client-ui-message-feedback/package.json +3 -5
- package/dist/kernel/client-ui-model-selection/lib/client.js +18 -18
- package/dist/kernel/client-ui-model-selection/package.json +7 -9
- package/dist/kernel/client-ui-permission-presets/lib/client.js +97 -83
- package/dist/kernel/client-ui-permission-presets/lib/types/client/index.js +6 -19
- package/dist/kernel/client-ui-permission-presets/lib/types/client/settings-store.d.ts +27 -18
- package/dist/kernel/client-ui-permission-presets/lib/types/client/settings-store.js +95 -68
- package/dist/kernel/client-ui-permission-presets/package.json +2 -8
- package/dist/kernel/client-ui-plan/lib/client.js +1 -1
- package/dist/kernel/client-ui-plan/lib/types/client/index.js +1 -1
- package/dist/kernel/client-ui-plan/package.json +2 -6
- package/dist/kernel/client-ui-primitives/lib/Button.module.css +79 -0
- package/dist/kernel/client-ui-primitives/lib/ConnectionBanner.module.css +13 -0
- package/dist/kernel/client-ui-primitives/lib/DiffBlock.module.css +107 -0
- package/dist/kernel/client-ui-primitives/lib/DisclosureRow.module.css +69 -0
- package/dist/kernel/client-ui-primitives/lib/HoverCard.module.css +54 -0
- package/dist/kernel/client-ui-primitives/lib/Input.module.css +38 -0
- package/dist/kernel/client-ui-primitives/lib/JsonTree.module.css +222 -0
- package/dist/kernel/client-ui-primitives/lib/Menu.module.css +242 -0
- package/dist/kernel/client-ui-primitives/lib/Modal.module.css +103 -0
- package/dist/kernel/client-ui-primitives/lib/OnboardingSurface.module.css +29 -0
- package/dist/kernel/client-ui-primitives/lib/Pill.module.css +27 -0
- package/dist/kernel/client-ui-primitives/lib/ReadBlock.module.css +117 -0
- package/dist/kernel/client-ui-primitives/lib/RiskConfirmation.module.css +73 -0
- package/dist/kernel/client-ui-primitives/lib/SearchBlock.module.css +120 -0
- package/dist/kernel/client-ui-primitives/lib/StateDot.module.css +65 -0
- package/dist/kernel/client-ui-primitives/lib/TerminalBlock.module.css +211 -0
- package/dist/kernel/client-ui-primitives/lib/Toast.module.css +70 -0
- package/dist/kernel/client-ui-primitives/lib/Tooltip.module.css +49 -0
- package/dist/kernel/client-ui-primitives/lib/WebBlock.module.css +130 -0
- package/dist/kernel/client-ui-primitives/lib/index.js +291 -261
- package/dist/kernel/client-ui-primitives/lib/invariant.js +2 -0
- package/dist/kernel/client-ui-primitives/lib/markdown/CodeBlock.module.css +96 -0
- package/dist/kernel/client-ui-primitives/lib/markdown/JsonBlock.module.css +32 -0
- package/dist/kernel/client-ui-primitives/lib/markdown/MarkdownText.module.css +304 -0
- package/dist/kernel/client-ui-primitives/lib/markdown/MessageText.module.css +9 -0
- package/dist/kernel/client-ui-primitives/lib/types/BrandWordmark.d.ts +7 -1
- package/dist/kernel/client-ui-primitives/lib/types/BrandWordmark.js +4 -2
- package/dist/kernel/client-ui-primitives/lib/types/index.d.ts +4 -1
- package/dist/kernel/client-ui-primitives/lib/types/index.js +2 -1
- package/dist/kernel/client-ui-primitives/lib/types/markdown/render.d.ts +2 -0
- package/dist/kernel/client-ui-primitives/lib/types/markdown/render.js +10 -2
- package/dist/kernel/client-ui-primitives/lib/types/useAnchoredPosition.d.ts +32 -0
- package/dist/kernel/client-ui-primitives/lib/types/useAnchoredPosition.js +69 -0
- package/dist/kernel/client-ui-primitives/package.json +2 -1
- package/dist/kernel/client-ui-reference/lib/client.js +149 -0
- package/dist/kernel/client-ui-reference/lib/index.js +11 -0
- package/dist/kernel/{client-schema-form → client-ui-reference}/lib/invariant.js +7 -8
- package/dist/kernel/client-ui-reference/lib/types/client/index.d.ts +9 -0
- package/dist/kernel/client-ui-reference/lib/types/client/index.js +106 -0
- package/dist/kernel/client-ui-reference/lib/types/client/locales.d.ts +30 -0
- package/dist/kernel/client-ui-reference/lib/types/client/locales.js +22 -0
- package/dist/kernel/client-ui-reference/lib/types/index.d.ts +9 -0
- package/dist/kernel/client-ui-reference/lib/types/index.js +9 -0
- package/dist/kernel/{client-schema-form → client-ui-reference}/lib/types/invariant.d.ts +3 -3
- package/dist/kernel/{client-schema-form → client-ui-reference}/lib/types/invariant.js +7 -8
- package/dist/kernel/client-ui-reference/package.json +77 -0
- package/dist/kernel/client-ui-renderer/lib/client.js +989 -0
- package/dist/kernel/client-ui-renderer/lib/index.js +6 -0
- package/dist/kernel/client-ui-renderer/lib/invariant.js +23 -0
- package/dist/kernel/{client-web/lib/types → client-ui-renderer/lib/types/client}/DocumentTitle.d.ts +4 -4
- package/dist/kernel/client-ui-renderer/lib/types/client/DocumentTitle.js +17 -0
- package/dist/kernel/client-ui-renderer/lib/types/client/app.d.ts +18 -0
- package/dist/kernel/{client-web/lib/types → client-ui-renderer/lib/types/client}/app.js +5 -5
- package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/bind.d.ts +1 -1
- package/dist/kernel/client-ui-renderer/lib/types/client/index.d.ts +29 -0
- package/dist/kernel/client-ui-renderer/lib/types/client/index.js +51 -0
- package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/scoped-slots.d.ts +1 -1
- package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/scoped-slots.js +1 -1
- package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/session-provider.d.ts +1 -1
- package/dist/kernel/client-ui-renderer/lib/types/index.d.ts +4 -0
- package/dist/kernel/client-ui-renderer/lib/types/index.js +4 -0
- package/dist/kernel/{client-web-react → client-ui-renderer}/lib/types/invariant.d.ts +3 -3
- package/dist/kernel/client-ui-renderer/lib/types/invariant.js +22 -0
- package/dist/kernel/client-ui-renderer/package.json +71 -0
- package/dist/kernel/client-ui-settings/lib/client.js +1177 -67
- package/dist/kernel/client-ui-settings/lib/types/client/index.d.ts +20 -12
- package/dist/kernel/client-ui-settings/lib/types/client/index.js +25 -6
- package/dist/kernel/client-ui-settings/lib/types/client/schema.d.ts +72 -0
- package/dist/kernel/client-ui-settings/lib/types/client/schema.js +152 -0
- package/dist/kernel/client-ui-settings/lib/types/client/settings-mirror.d.ts +118 -0
- package/dist/kernel/client-ui-settings/lib/types/client/settings-mirror.js +160 -0
- package/dist/kernel/client-ui-settings/lib/types/client/settings-scope.d.ts +51 -24
- package/dist/kernel/client-ui-settings/lib/types/client/settings-scope.js +88 -71
- package/dist/kernel/client-ui-settings/package.json +7 -7
- package/dist/kernel/client-ui-settings-general/lib/client.js +60 -64
- package/dist/kernel/client-ui-settings-general/lib/types/client/SettingsDocumentAction.d.ts +7 -6
- package/dist/kernel/client-ui-settings-general/lib/types/client/index.js +10 -11
- package/dist/kernel/client-ui-settings-general/lib/types/client/settings-document-store.d.ts +13 -11
- package/dist/kernel/client-ui-settings-general/lib/types/client/settings-document-store.js +37 -40
- package/dist/kernel/client-ui-settings-general/package.json +4 -8
- package/dist/kernel/client-ui-settings-models/lib/client.js +280 -210
- package/dist/kernel/client-ui-settings-models/lib/types/client/DeepSeekOnboardingDialog.d.ts +3 -0
- package/dist/kernel/client-ui-settings-models/lib/types/client/DeepSeekOnboardingDialog.js +2 -2
- package/dist/kernel/client-ui-settings-models/lib/types/client/ModelListEditor.js +11 -1
- package/dist/kernel/client-ui-settings-models/lib/types/client/ModelsSection.d.ts +10 -5
- package/dist/kernel/client-ui-settings-models/lib/types/client/ModelsSection.js +9 -6
- package/dist/kernel/client-ui-settings-models/lib/types/client/ProviderEditor.d.ts +3 -0
- package/dist/kernel/client-ui-settings-models/lib/types/client/ProviderEditor.js +30 -29
- package/dist/kernel/client-ui-settings-models/lib/types/client/index.js +27 -22
- package/dist/kernel/client-ui-settings-models/lib/types/client/locales.d.ts +2 -0
- package/dist/kernel/client-ui-settings-models/lib/types/client/locales.js +4 -0
- package/dist/kernel/client-ui-settings-models/lib/types/client/schema-operations.d.ts +10 -0
- package/dist/kernel/client-ui-settings-models/lib/types/client/schema-operations.js +17 -0
- package/dist/kernel/client-ui-settings-models/lib/types/client/store.d.ts +15 -7
- package/dist/kernel/client-ui-settings-models/lib/types/client/store.js +30 -21
- package/dist/kernel/client-ui-settings-models/lib/types/client/welcome-store.d.ts +35 -18
- package/dist/kernel/client-ui-settings-models/lib/types/client/welcome-store.js +89 -82
- package/dist/kernel/client-ui-settings-models/package.json +3 -8
- package/dist/kernel/client-ui-settings-plugin-inventory/lib/client.js +11 -11
- package/dist/kernel/client-ui-settings-plugin-inventory/package.json +2 -5
- package/dist/kernel/client-ui-settings-plugins/lib/client.js +42 -65
- package/dist/kernel/client-ui-settings-plugins/lib/types/client/index.js +5 -8
- package/dist/kernel/client-ui-settings-plugins/lib/types/client/tab-store.d.ts +8 -17
- package/dist/kernel/client-ui-settings-plugins/lib/types/client/tab-store.js +22 -44
- package/dist/kernel/client-ui-settings-plugins/package.json +2 -7
- package/dist/kernel/client-ui-sidebar/lib/client.js +50 -20
- package/dist/kernel/client-ui-sidebar/lib/types/client/SidebarRoot.js +7 -3
- package/dist/kernel/client-ui-sidebar/lib/types/client/contract/slots.d.ts +30 -1
- package/dist/kernel/client-ui-sidebar/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-ui-sidebar/lib/types/client/index.js +2 -0
- package/dist/kernel/client-ui-sidebar/package.json +2 -4
- package/dist/kernel/client-ui-skill/lib/client.js +12 -12
- package/dist/kernel/client-ui-skill/package.json +2 -5
- package/dist/kernel/client-ui-slots/lib/index.js +2 -0
- package/dist/kernel/client-ui-slots/lib/invariant.js +2 -0
- package/dist/kernel/client-ui-slots/lib/types/renderer.d.ts +1 -1
- package/dist/kernel/client-ui-slots/lib/types/store.d.ts +1 -1
- package/dist/kernel/client-ui-slots/package.json +1 -1
- package/dist/kernel/client-ui-subagent/lib/client.js +289 -157
- package/dist/kernel/client-ui-subagent/lib/types/client/SubagentHeaderLineage.d.ts +18 -0
- package/dist/kernel/client-ui-subagent/lib/types/client/{SubagentCatalogAction.js → SubagentHeaderLineage.js} +153 -25
- package/dist/kernel/client-ui-subagent/lib/types/client/index.d.ts +4 -16
- package/dist/kernel/client-ui-subagent/lib/types/client/index.js +7 -45
- package/dist/kernel/client-ui-subagent/lib/types/client/locales.d.ts +1 -0
- package/dist/kernel/client-ui-subagent/lib/types/client/locales.js +2 -0
- package/dist/kernel/client-ui-subagent/package.json +6 -8
- package/dist/kernel/client-ui-theme/lib/client.js +46 -3
- package/dist/kernel/client-ui-theme/lib/index.js +22 -23
- package/dist/kernel/client-ui-theme/lib/types/boot-theme.d.ts +9 -10
- package/dist/kernel/client-ui-theme/lib/types/boot-theme.js +12 -19
- package/dist/kernel/client-ui-theme/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-ui-theme/lib/types/client/index.js +3 -1
- package/dist/kernel/client-ui-theme/lib/types/client/styles.d.ts +7 -0
- package/dist/kernel/client-ui-theme/lib/types/client/styles.js +32 -0
- package/dist/kernel/client-ui-theme/lib/types/index.d.ts +4 -3
- package/dist/kernel/client-ui-theme/lib/types/index.js +7 -6
- package/dist/kernel/client-ui-theme/package.json +4 -6
- package/dist/kernel/client-ui-tool/lib/client.js +105 -65
- package/dist/kernel/client-ui-tool/lib/types/client/apply.d.ts +1 -2
- package/dist/kernel/client-ui-tool/lib/types/client/apply.js +6 -2
- package/dist/kernel/client-ui-tool/lib/types/client/contract/slots.d.ts +13 -3
- package/dist/kernel/client-ui-tool/lib/types/client/index.d.ts +1 -1
- package/dist/kernel/client-ui-tool/lib/types/client/tool/ToolCallTree.d.ts +1 -1
- package/dist/kernel/client-ui-tool/lib/types/client/tool/ToolCallTree.js +8 -6
- package/dist/kernel/client-ui-tool/lib/types/client/tool/ToolDetails.d.ts +2 -9
- package/dist/kernel/client-ui-tool/lib/types/client/tool/ToolDetails.js +4 -3
- package/dist/kernel/client-ui-tool/lib/types/client/tool/models/read-card-model.d.ts +4 -18
- package/dist/kernel/client-ui-tool/lib/types/client/tool/models/read-card-model.js +21 -4
- package/dist/kernel/client-ui-tool/lib/types/client/tool/models/tool-call-model.d.ts +2 -9
- package/dist/kernel/client-ui-tool/lib/types/client/tool/models/tool-call-model.js +22 -2
- package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/GenericToolCard.d.ts +1 -1
- package/dist/kernel/client-ui-tool/lib/types/client/tool/toolviews/GenericToolCard.js +3 -3
- 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/file-mutation-row.js +2 -2
- 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/read-row.js +3 -3
- package/dist/kernel/client-ui-tool/package.json +4 -6
- package/dist/kernel/client-ui-trajectory/lib/client.js +144 -143
- package/dist/kernel/client-ui-trajectory/lib/types/client/trajectory-assistant-definition.js +2 -1
- package/dist/kernel/client-ui-trajectory/package.json +2 -4
- package/dist/kernel/client-ui-user-questions/lib/client.js +73 -36
- package/dist/kernel/client-ui-user-questions/lib/types/client/QuestionComposer.js +24 -6
- package/dist/kernel/client-ui-user-questions/package.json +12 -10
- package/dist/kernel/client-ui-workflow-run/lib/client.js +262 -87
- package/dist/kernel/client-ui-workflow-run/lib/types/client/WorkflowRunPanel.js +162 -23
- package/dist/kernel/client-ui-workflow-run/package.json +3 -7
- package/dist/kernel/client-ui-workspace/lib/client.js +96 -60
- package/dist/kernel/client-ui-workspace/lib/types/client/WorkspaceBrowser.d.ts +1 -1
- package/dist/kernel/client-ui-workspace/lib/types/client/WorkspaceBrowser.js +38 -6
- package/dist/kernel/client-ui-workspace/lib/types/client/contract/slots.d.ts +9 -7
- package/dist/kernel/client-ui-workspace/lib/types/client/index.js +4 -2
- package/dist/kernel/client-ui-workspace/lib/types/client/rows/Rows.d.ts +4 -1
- package/dist/kernel/client-ui-workspace/lib/types/client/rows/Rows.js +5 -3
- package/dist/kernel/client-ui-workspace/package.json +6 -4
- package/dist/kernel/client-web/lib/base.css +41 -0
- package/dist/kernel/client-web/lib/boot-page.module.css +104 -0
- package/dist/kernel/client-web/lib/index.js +154 -308
- package/dist/kernel/client-web/lib/invariant.js +2 -0
- package/dist/kernel/client-web/lib/types/boot-page.d.ts +46 -0
- package/dist/kernel/client-web/lib/types/boot-page.js +93 -0
- package/dist/kernel/client-web/lib/types/boot.d.ts +20 -33
- package/dist/kernel/client-web/lib/types/boot.js +76 -149
- package/dist/kernel/client-web/lib/types/index.d.ts +5 -11
- package/dist/kernel/client-web/lib/types/index.js +4 -10
- package/dist/kernel/client-web/lib/types/loader-status.d.ts +3 -51
- package/dist/kernel/client-web/lib/types/loader-status.js +0 -35
- package/dist/kernel/client-web/lib/types/platform.d.ts +3 -1
- package/dist/kernel/client-web/lib/types/platform.js +4 -3
- package/dist/kernel/client-web/lib/types/seed.js +0 -6
- package/dist/kernel/client-web/package.json +8 -15
- package/dist/kernel/cmdline/package.json +1 -1
- package/dist/kernel/code-runtime/package.json +1 -1
- package/dist/kernel/code-runtime-python/lib/index.js +413 -0
- package/dist/kernel/code-runtime-python/lib/invariant.js +24 -0
- package/dist/kernel/code-runtime-python/lib/types/index.d.ts +12 -0
- package/dist/kernel/code-runtime-python/lib/types/index.js +11 -0
- package/dist/kernel/code-runtime-python/lib/types/invariant.d.ts +16 -0
- package/dist/kernel/code-runtime-python/lib/types/invariant.js +23 -0
- package/dist/kernel/code-runtime-python/lib/types/protocol.d.ts +329 -0
- package/dist/kernel/code-runtime-python/lib/types/protocol.js +496 -0
- package/dist/kernel/{client-schema-form → code-runtime-python}/package.json +11 -14
- package/dist/kernel/code-runtime-python/py/protocol.py +138 -0
- package/dist/kernel/code-runtime-worker-thread/package.json +1 -1
- package/dist/kernel/command-compact/package.json +1 -1
- package/dist/kernel/command-feedback/package.json +1 -1
- package/dist/kernel/command-goal/lib/index.js +40 -6
- package/dist/kernel/command-goal/lib/types/index.js +35 -6
- package/dist/kernel/command-goal/package.json +2 -1
- package/dist/kernel/commands/lib/index.js +78 -21
- package/dist/kernel/commands/lib/typert.host.js +53 -9
- package/dist/kernel/commands/lib/typert.remote-client.d.ts +4 -3
- package/dist/kernel/commands/lib/typert.remote-client.js +18 -2
- package/dist/kernel/commands/lib/types/index.d.ts +20 -1
- package/dist/kernel/commands/lib/types/index.js +77 -20
- package/dist/kernel/commands/lib/types/types.d.ts +8 -0
- package/dist/kernel/commands/package.json +5 -1
- package/dist/kernel/compaction/package.json +1 -1
- package/dist/kernel/compaction-basic/package.json +1 -1
- package/dist/kernel/compaction-tool-result-pruner/package.json +1 -1
- package/dist/kernel/cordis/package.json +3 -1
- package/dist/kernel/cordis-client-runner/lib/client.js +171 -37
- package/dist/kernel/cordis-client-runner/lib/types/client/api-catalog.js +3 -3
- package/dist/kernel/cordis-client-runner/lib/types/client/slot-catalog.js +208 -30
- package/dist/kernel/cordis-client-runner/package.json +2 -5
- package/dist/kernel/cordis-host-runner/lib/index.js +28 -5
- package/dist/kernel/cordis-host-runner/lib/typert.host.js +54 -6
- package/dist/kernel/cordis-host-runner/lib/types/sandbox.d.ts +9 -3
- package/dist/kernel/cordis-host-runner/lib/types/sandbox.js +34 -6
- package/dist/kernel/cordis-host-runner/package.json +1 -1
- package/dist/kernel/cordis-plugin-group/package.json +3 -1
- package/dist/kernel/cordis-plugin-hmr/lib/types/index.js +1 -1
- package/dist/kernel/cordis-plugin-hmr/package.json +3 -1
- package/dist/kernel/cordis-plugin-include/lib/index.js +2 -2
- package/dist/kernel/cordis-plugin-include/lib/types/index.d.ts +2 -2
- package/dist/kernel/cordis-plugin-include/lib/types/index.js +2 -2
- package/dist/kernel/cordis-plugin-include/package.json +3 -1
- package/dist/kernel/cordis-plugin-loader/package.json +3 -1
- package/dist/kernel/cordis-plugin-logger-console/package.json +3 -1
- package/dist/kernel/cordis-plugin-timer/package.json +3 -1
- package/dist/kernel/cosmokit/package.json +3 -1
- package/dist/kernel/credentials/lib/index.js +104 -13
- package/dist/kernel/credentials/lib/invariant.js +3 -3
- package/dist/kernel/credentials/lib/types/index.d.ts +136 -7
- package/dist/kernel/credentials/lib/types/index.js +114 -15
- package/dist/kernel/credentials/lib/types/invariant.js +3 -3
- package/dist/kernel/credentials/lib/types/types.d.ts +58 -5
- package/dist/kernel/credentials/lib/types/types.js +4 -4
- package/dist/kernel/credentials/package.json +1 -1
- package/dist/kernel/credentials-local/lib/index.js +387 -29
- package/dist/kernel/credentials-local/lib/invariant.js +1 -1
- package/dist/kernel/credentials-local/lib/types/index.d.ts +57 -12
- package/dist/kernel/credentials-local/lib/types/index.js +445 -30
- package/dist/kernel/credentials-local/lib/types/invariant.js +1 -1
- package/dist/kernel/credentials-local/package.json +1 -1
- package/dist/kernel/e2b/package.json +1 -1
- package/dist/kernel/experimental-agent-team/lib/index.js +1728 -0
- package/dist/kernel/experimental-agent-team/lib/invariant.js +354 -0
- package/dist/kernel/experimental-agent-team/lib/types/activity.d.ts +23 -0
- package/dist/kernel/experimental-agent-team/lib/types/activity.js +85 -0
- package/dist/kernel/experimental-agent-team/lib/types/error.d.ts +13 -0
- package/dist/kernel/experimental-agent-team/lib/types/error.js +23 -0
- package/dist/kernel/experimental-agent-team/lib/types/fold.d.ts +44 -0
- package/dist/kernel/experimental-agent-team/lib/types/fold.js +243 -0
- package/dist/kernel/experimental-agent-team/lib/types/index.d.ts +115 -0
- package/dist/kernel/experimental-agent-team/lib/types/index.js +205 -0
- package/dist/kernel/experimental-agent-team/lib/types/invariant.d.ts +9 -0
- package/dist/kernel/experimental-agent-team/lib/types/invariant.js +29 -0
- package/dist/kernel/experimental-agent-team/lib/types/journal.d.ts +39 -0
- package/dist/kernel/experimental-agent-team/lib/types/journal.js +59 -0
- package/dist/kernel/experimental-agent-team/lib/types/lifecycle.d.ts +33 -0
- package/dist/kernel/experimental-agent-team/lib/types/lifecycle.js +85 -0
- package/dist/kernel/experimental-agent-team/lib/types/mailbox.d.ts +79 -0
- package/dist/kernel/experimental-agent-team/lib/types/mailbox.js +303 -0
- package/dist/kernel/experimental-agent-team/lib/types/roster.d.ts +113 -0
- package/dist/kernel/experimental-agent-team/lib/types/roster.js +445 -0
- package/dist/kernel/experimental-agent-team/lib/types/session-message.d.ts +11 -0
- package/dist/kernel/experimental-agent-team/lib/types/session-message.js +23 -0
- package/dist/kernel/experimental-agent-team/lib/types/task-board.d.ts +62 -0
- package/dist/kernel/experimental-agent-team/lib/types/task-board.js +275 -0
- package/dist/kernel/experimental-agent-team/lib/types/task-graph.d.ts +21 -0
- package/dist/kernel/experimental-agent-team/lib/types/task-graph.js +62 -0
- package/dist/kernel/experimental-agent-team/lib/types/types.d.ts +192 -0
- package/dist/kernel/experimental-agent-team/lib/types/types.js +26 -0
- package/dist/kernel/experimental-agent-team/lib/types/validation.d.ts +16 -0
- package/dist/kernel/experimental-agent-team/lib/types/validation.js +33 -0
- package/dist/kernel/experimental-agent-team/package.json +62 -0
- package/dist/kernel/experimental-tool-agent-team/lib/index.js +555 -0
- package/dist/kernel/experimental-tool-agent-team/lib/invariant.js +13 -0
- package/dist/kernel/experimental-tool-agent-team/lib/types/index.d.ts +19 -0
- package/dist/kernel/experimental-tool-agent-team/lib/types/index.js +379 -0
- package/dist/kernel/experimental-tool-agent-team/lib/types/invariant.d.ts +9 -0
- package/dist/kernel/experimental-tool-agent-team/lib/types/invariant.js +11 -0
- package/dist/kernel/experimental-tool-agent-team/package.json +61 -0
- package/dist/kernel/file-reference/lib/index.js +138 -0
- package/dist/kernel/file-reference/lib/invariant.js +23 -0
- package/dist/kernel/file-reference/lib/typert.host.d.ts +3 -0
- package/dist/kernel/file-reference/lib/typert.host.js +436 -0
- package/dist/kernel/file-reference/lib/typert.remote-client.d.ts +26 -0
- package/dist/kernel/file-reference/lib/typert.remote-client.js +59 -0
- package/dist/kernel/file-reference/lib/types/grammar.d.ts +33 -0
- package/dist/kernel/file-reference/lib/types/grammar.js +43 -0
- package/dist/kernel/file-reference/lib/types/index.d.ts +42 -0
- package/dist/kernel/file-reference/lib/types/index.js +75 -0
- package/dist/kernel/file-reference/lib/types/invariant.d.ts +16 -0
- package/dist/kernel/file-reference/lib/types/invariant.js +22 -0
- package/dist/kernel/file-reference/lib/types/types.d.ts +13 -0
- package/dist/kernel/file-reference/lib/types/types.js +7 -0
- package/dist/kernel/file-reference/package.json +70 -0
- package/dist/kernel/file-reference-local/lib/index.js +327 -0
- package/dist/kernel/file-reference-local/lib/invariant.js +23 -0
- package/dist/kernel/file-reference-local/lib/types/index.d.ts +35 -0
- package/dist/kernel/file-reference-local/lib/types/index.js +105 -0
- package/dist/kernel/file-reference-local/lib/types/invariant.d.ts +16 -0
- package/dist/kernel/file-reference-local/lib/types/invariant.js +22 -0
- package/dist/kernel/file-reference-local/lib/types/search.d.ts +52 -0
- package/dist/kernel/file-reference-local/lib/types/search.js +258 -0
- package/dist/kernel/file-reference-local/package.json +58 -0
- package/dist/kernel/fs/package.json +1 -1
- package/dist/kernel/fs-e2b/package.json +1 -1
- package/dist/kernel/fs-local/package.json +1 -1
- package/dist/kernel/fs-observation-policy/package.json +1 -1
- package/dist/kernel/fs-sandbox/package.json +1 -1
- package/dist/kernel/goal/lib/index.js +5 -2
- package/dist/kernel/goal/lib/typert.host.js +27 -3
- package/dist/kernel/goal/lib/types/index.js +2 -2
- package/dist/kernel/goal/lib/types/types.d.ts +3 -0
- package/dist/kernel/goal/package.json +1 -1
- package/dist/kernel/goal-round-driver/package.json +1 -1
- package/dist/kernel/headless/package.json +1 -1
- package/dist/kernel/home-paths/package.json +1 -1
- package/dist/kernel/hook-protocol/package.json +1 -1
- package/dist/kernel/hooks-claude-code/package.json +1 -1
- package/dist/kernel/hooks-codex/package.json +1 -1
- package/dist/kernel/host-apiproxy/lib/index.js +25 -57
- package/dist/kernel/host-apiproxy/lib/types/api/host.d.ts +2 -0
- package/dist/kernel/host-apiproxy/lib/types/api/host.schema.d.ts +1 -0
- package/dist/kernel/host-apiproxy/lib/types/api/host.schema.js +1 -0
- package/dist/kernel/host-apiproxy/lib/types/api/sessions.d.ts +4 -0
- package/dist/kernel/host-apiproxy/lib/types/api/sessions.schema.js +1 -0
- package/dist/kernel/host-apiproxy/lib/types/api-proxy.js +15 -53
- package/dist/kernel/host-apiproxy/package.json +1 -1
- package/dist/kernel/host-directory-picker/package.json +1 -1
- package/dist/kernel/host-directory-picker-auto/package.json +1 -1
- package/dist/kernel/host-directory-picker-browse/package.json +1 -1
- package/dist/kernel/host-directory-picker-native/package.json +1 -1
- package/dist/kernel/host-frontend-static/lib/index.js +34 -26
- package/dist/kernel/host-frontend-static/lib/types/index.d.ts +10 -10
- package/dist/kernel/host-frontend-static/lib/types/index.js +38 -27
- package/dist/kernel/host-frontend-static/package.json +2 -2
- package/dist/kernel/host-plugin-inventory/package.json +1 -1
- package/dist/kernel/host-webserver/lib/index.js +102 -6
- package/dist/kernel/host-webserver/lib/types/index.d.ts +33 -5
- package/dist/kernel/host-webserver/lib/types/index.js +28 -5
- package/dist/kernel/host-webserver/lib/types/injections.d.ts +56 -0
- package/dist/kernel/host-webserver/lib/types/injections.js +82 -0
- package/dist/kernel/host-webserver/package.json +1 -1
- package/dist/kernel/invariants/package.json +1 -1
- package/dist/kernel/jobs/package.json +1 -1
- package/dist/kernel/jobs-local/package.json +1 -1
- package/dist/kernel/launch-environment/package.json +1 -1
- package/dist/kernel/llm/lib/index.js +247 -25
- package/dist/kernel/llm/lib/types/assembler.d.ts +10 -1
- package/dist/kernel/llm/lib/types/assembler.js +20 -1
- package/dist/kernel/llm/lib/types/content.d.ts +59 -0
- package/dist/kernel/llm/lib/types/content.js +149 -0
- package/dist/kernel/llm/lib/types/index.d.ts +24 -1
- package/dist/kernel/llm/lib/types/index.js +61 -8
- package/dist/kernel/llm/lib/types/retry-policy.d.ts +1 -1
- package/dist/kernel/llm/lib/types/retry-policy.js +6 -2
- package/dist/kernel/llm/package.json +1 -1
- package/dist/kernel/llm-deepseek/lib/index.js +1100 -70
- package/dist/kernel/llm-deepseek/lib/types/adapter.d.ts +69 -1
- package/dist/kernel/llm-deepseek/lib/types/adapter.js +296 -60
- package/dist/kernel/llm-deepseek/lib/types/file-id.d.ts +19 -0
- package/dist/kernel/llm-deepseek/lib/types/file-id.js +18 -0
- package/dist/kernel/llm-deepseek/lib/types/file-store.d.ts +83 -0
- package/dist/kernel/llm-deepseek/lib/types/file-store.js +261 -0
- package/dist/kernel/llm-deepseek/lib/types/files-api.d.ts +103 -0
- package/dist/kernel/llm-deepseek/lib/types/files-api.js +206 -0
- package/dist/kernel/llm-deepseek/lib/types/index.d.ts +31 -3
- package/dist/kernel/llm-deepseek/lib/types/index.js +139 -3
- package/dist/kernel/llm-deepseek/lib/types/serialize.d.ts +55 -6
- package/dist/kernel/llm-deepseek/lib/types/serialize.js +179 -23
- package/dist/kernel/llm-deepseek/lib/types/types.d.ts +28 -5
- package/dist/kernel/llm-deepseek/lib/types/upload-index.d.ts +68 -0
- package/dist/kernel/llm-deepseek/lib/types/upload-index.js +171 -0
- package/dist/kernel/llm-deepseek/package.json +9 -1
- package/dist/kernel/llm-pi-ai/lib/index.js +1758 -1171
- package/dist/kernel/llm-pi-ai/lib/types/adapter.d.ts +30 -5
- package/dist/kernel/llm-pi-ai/lib/types/adapter.js +43 -23
- package/dist/kernel/llm-pi-ai/lib/types/auth.d.ts +60 -0
- package/dist/kernel/llm-pi-ai/lib/types/auth.js +196 -0
- package/dist/kernel/llm-pi-ai/lib/types/catalog.d.ts +176 -38
- package/dist/kernel/llm-pi-ai/lib/types/catalog.js +245 -50
- package/dist/kernel/llm-pi-ai/lib/types/config.d.ts +37 -5
- package/dist/kernel/llm-pi-ai/lib/types/config.js +67 -2
- package/dist/kernel/llm-pi-ai/lib/types/context.d.ts +8 -3
- package/dist/kernel/llm-pi-ai/lib/types/context.js +60 -16
- package/dist/kernel/llm-pi-ai/lib/types/index.d.ts +1 -0
- package/dist/kernel/llm-pi-ai/lib/types/index.js +21 -19
- package/dist/kernel/llm-pi-ai/lib/types/login.d.ts +21 -0
- package/dist/kernel/llm-pi-ai/lib/types/login.js +154 -0
- package/dist/kernel/llm-pi-ai/lib/types/stream.js +4 -0
- package/dist/kernel/llm-pi-ai/package.json +3 -1
- package/dist/kernel/llm-retry/package.json +1 -1
- package/dist/kernel/lsp/package.json +1 -1
- package/dist/kernel/lsp-stdio/package.json +1 -1
- package/dist/kernel/manifest.json +10 -2
- package/dist/kernel/mcp-client/package.json +1 -1
- package/dist/kernel/message-feedback/package.json +1 -1
- package/dist/kernel/native-command/package.json +1 -1
- package/dist/kernel/node-addon-landlock-run/lib/index.js +1 -1
- package/dist/kernel/node-addon-landlock-run/package.json +4 -2
- package/dist/kernel/output-retention/package.json +1 -1
- package/dist/kernel/permission-presets/lib/index.js +14 -2
- package/dist/kernel/permission-presets/lib/types/index.d.ts +5 -0
- package/dist/kernel/permission-presets/lib/types/index.js +11 -2
- package/dist/kernel/permission-presets/package.json +1 -1
- package/dist/kernel/persona/package.json +1 -1
- package/dist/kernel/plan-mode/lib/index.js +49 -15
- package/dist/kernel/plan-mode/lib/types/index.d.ts +22 -0
- package/dist/kernel/plan-mode/lib/types/index.js +45 -19
- package/dist/kernel/plan-mode/lib/types/types.d.ts +5 -4
- package/dist/kernel/plan-mode/package.json +1 -1
- package/dist/kernel/pwsh-local/package.json +1 -1
- package/dist/kernel/pwsh-sandbox/package.json +1 -1
- package/dist/kernel/repeat-tool-reminder/lib/index.js +1 -1
- package/dist/kernel/repeat-tool-reminder/package.json +1 -1
- package/dist/kernel/sandbox/package.json +1 -1
- package/dist/kernel/sandbox-local/lib/index.js +8 -13
- package/dist/kernel/sandbox-local/lib/types/index.d.ts +1 -3
- package/dist/kernel/sandbox-local/lib/types/index.js +4 -7
- 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/package.json +1 -1
- package/dist/kernel/sandbox-windows-acl/package.json +1 -1
- package/dist/kernel/schedule/package.json +1 -1
- package/dist/kernel/schemastery/package.json +3 -1
- package/dist/kernel/scope/package.json +1 -1
- package/dist/kernel/sdk-client/lib/index.js +2 -2
- package/dist/kernel/sdk-client/lib/types/api.js +2 -2
- package/dist/kernel/sdk-client/lib/types/types.d.ts +4 -4
- package/dist/kernel/sdk-client/package.json +1 -1
- package/dist/kernel/sdk-jsonrpc-server/lib/index.js +12 -5
- package/dist/kernel/sdk-jsonrpc-server/lib/types/index.js +7 -0
- package/dist/kernel/sdk-jsonrpc-server/lib/types/server.d.ts +2 -1
- package/dist/kernel/sdk-jsonrpc-server/lib/types/server.js +15 -6
- package/dist/kernel/sdk-jsonrpc-server/package.json +2 -1
- package/dist/kernel/sdk-protocol/package.json +1 -1
- package/dist/kernel/session/lib/index.js +4 -0
- package/dist/kernel/session/lib/types/known-event-types.js +4 -0
- package/dist/kernel/session/lib/types/types.d.ts +6 -1
- package/dist/kernel/session/package.json +1 -1
- package/dist/kernel/session-checkpoint-policy/package.json +1 -1
- package/dist/kernel/session-log-export/package.json +2 -5
- package/dist/kernel/session-persistence/lib/index.js +1 -1
- package/dist/kernel/session-persistence/lib/types/coordinator.js +2 -1
- package/dist/kernel/session-persistence/package.json +1 -1
- package/dist/kernel/session-persistence-jsonl/package.json +1 -1
- package/dist/kernel/session-persistence-sqlite/lib/index.js +1105 -375
- package/dist/kernel/session-persistence-sqlite/lib/invariant.js +2 -2
- package/dist/kernel/session-persistence-sqlite/lib/types/codec.d.ts +72 -0
- package/dist/kernel/session-persistence-sqlite/lib/types/codec.js +304 -0
- package/dist/kernel/session-persistence-sqlite/lib/types/compression.d.ts +46 -0
- package/dist/kernel/session-persistence-sqlite/lib/types/compression.js +234 -0
- package/dist/kernel/session-persistence-sqlite/lib/types/index.d.ts +22 -80
- package/dist/kernel/session-persistence-sqlite/lib/types/index.js +27 -278
- package/dist/kernel/session-persistence-sqlite/lib/types/invariant.js +2 -2
- package/dist/kernel/session-persistence-sqlite/lib/types/schema.d.ts +63 -85
- package/dist/kernel/session-persistence-sqlite/lib/types/schema.js +293 -159
- package/dist/kernel/session-persistence-sqlite/lib/types/sql.d.ts +15 -0
- package/dist/kernel/session-persistence-sqlite/lib/types/sql.js +57 -0
- package/dist/kernel/session-persistence-sqlite/lib/types/store.d.ts +66 -0
- package/dist/kernel/session-persistence-sqlite/lib/types/store.js +394 -0
- package/dist/kernel/session-persistence-sqlite/package.json +9 -3
- package/dist/kernel/session-persistence-sqlite/resources/sql/begin-immediate.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/begin.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/commit.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/delete-events-from.sql +2 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/foreign-keys-on.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/insert-event.sql +3 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/insert-persistence-state.sql +2 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/journal-mode-delete.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/journal-mode-persist.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/journal-mode-truncate.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/journal-mode-wal.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/mmap-off.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/rollback.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/schema.sql +30 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-application-id.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-events-from.sql +4 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-events.sql +4 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-mmap-size.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-packed-predecessors.sql +6 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-schema-objects.sql +4 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-session.sql +4 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-sessions.sql +3 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-store-id.sql +3 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-synchronous.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-tail-events.sql +5 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-trusted-schema.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-user-object-count.sql +3 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/select-user-version.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/set-application-id.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/set-user-version-17.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/synchronous-full.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/trusted-schema-off.sql +1 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/update-session-revision.sql +3 -0
- package/dist/kernel/session-persistence-sqlite/resources/sql/upsert-session.sql +13 -0
- package/dist/kernel/session-projection/lib/index.js +55 -30
- package/dist/kernel/session-projection/lib/types/index.d.ts +57 -34
- package/dist/kernel/session-projection/lib/types/index.js +61 -36
- package/dist/kernel/session-projection/lib/types/types.d.ts +11 -4
- package/dist/kernel/session-projection/package.json +1 -1
- package/dist/kernel/session-projection-cache/lib/index.js +1 -1
- package/dist/kernel/session-projection-cache/lib/types/index.d.ts +1 -1
- package/dist/kernel/session-projection-cache/lib/types/index.js +4 -5
- package/dist/kernel/session-projection-cache/package.json +1 -1
- package/dist/kernel/session-query/package.json +1 -1
- package/dist/kernel/session-query-sqlite/package.json +1 -1
- package/dist/kernel/session-reference/lib/index.js +232 -110
- package/dist/kernel/session-reference/lib/typert.host.d.ts +3 -0
- package/dist/kernel/session-reference/lib/typert.host.js +458 -0
- package/dist/kernel/session-reference/lib/typert.remote-client.d.ts +26 -0
- package/dist/kernel/session-reference/lib/typert.remote-client.js +62 -0
- package/dist/kernel/session-reference/lib/types/index.d.ts +25 -5
- package/dist/kernel/session-reference/lib/types/index.js +230 -126
- package/dist/kernel/session-reference/lib/types/types.d.ts +14 -3
- package/dist/kernel/session-reference/lib/types/types.js +6 -1
- package/dist/kernel/session-reference/package.json +23 -3
- package/dist/kernel/session-stats/lib/index.js +31 -12
- package/dist/kernel/session-stats/lib/types/projection.d.ts +64 -2
- package/dist/kernel/session-stats/lib/types/projection.js +31 -12
- package/dist/kernel/session-stats/package.json +1 -1
- package/dist/kernel/session-telemetry/package.json +1 -1
- package/dist/kernel/session-telemetry-otel/package.json +1 -1
- package/dist/kernel/session-title/lib/index.js +6 -2
- package/dist/kernel/session-title/lib/types/index.js +3 -2
- package/dist/kernel/session-title/lib/types/types.d.ts +3 -0
- package/dist/kernel/session-title/package.json +1 -1
- package/dist/kernel/session-title-all-prompts-llm/package.json +1 -1
- package/dist/kernel/session-title-first-prompt-llm/package.json +1 -1
- package/dist/kernel/session-title-llm/package.json +1 -1
- package/dist/kernel/settings/package.json +1 -1
- package/dist/kernel/settings-file/package.json +1 -1
- package/dist/kernel/shell/package.json +1 -1
- package/dist/kernel/shell-env/package.json +1 -1
- package/dist/kernel/skill/package.json +1 -1
- package/dist/kernel/skill-badge/assets/nomix-badge.md +6 -6
- package/dist/kernel/skill-badge/assets/nomix-badge.png +0 -0
- package/dist/kernel/skill-badge/lib/index.js +1 -1
- package/dist/kernel/skill-badge/lib/types/index.js +1 -1
- package/dist/kernel/skill-badge/package.json +1 -1
- package/dist/kernel/skill-filesystem/package.json +1 -1
- package/dist/kernel/spill/package.json +1 -1
- package/dist/kernel/spill-local/package.json +1 -1
- package/dist/kernel/spill-policy/package.json +1 -1
- package/dist/kernel/storage/package.json +1 -1
- package/dist/kernel/storage-domain/package.json +1 -1
- package/dist/kernel/storage-json/package.json +1 -1
- package/dist/kernel/storage-sqlite/package.json +1 -1
- package/dist/kernel/subagent/lib/index.js +123 -20
- package/dist/kernel/subagent/lib/types/continuation.d.ts +21 -2
- package/dist/kernel/subagent/lib/types/continuation.js +58 -7
- package/dist/kernel/subagent/lib/types/index.d.ts +11 -0
- package/dist/kernel/subagent/lib/types/index.js +16 -0
- package/dist/kernel/subagent/lib/types/out-of-process.d.ts +2 -0
- package/dist/kernel/subagent/lib/types/out-of-process.js +31 -1
- package/dist/kernel/subagent/lib/types/projection.d.ts +55 -8
- package/dist/kernel/subagent/lib/types/projection.js +30 -15
- package/dist/kernel/subagent/lib/types/run-settlement.js +10 -3
- package/dist/kernel/subagent/lib/types/types.d.ts +7 -0
- package/dist/kernel/subagent/package.json +1 -1
- package/dist/kernel/subagent-acp/package.json +1 -1
- package/dist/kernel/subagent-claude-code/cordis.patch.yml +6 -0
- package/dist/kernel/subagent-claude-code/lib/index.js +267 -73
- package/dist/kernel/subagent-claude-code/lib/types/index.d.ts +16 -6
- package/dist/kernel/subagent-claude-code/lib/types/index.js +35 -14
- package/dist/kernel/subagent-claude-code/lib/types/process.d.ts +5 -7
- package/dist/kernel/subagent-claude-code/lib/types/process.js +12 -24
- package/dist/kernel/subagent-claude-code/lib/types/run.d.ts +24 -7
- package/dist/kernel/subagent-claude-code/lib/types/run.js +266 -40
- package/dist/kernel/subagent-claude-code/package.json +10 -2
- package/dist/kernel/subagent-codex/cordis.patch.yml +5 -0
- package/dist/kernel/subagent-codex/lib/index.js +482 -91
- package/dist/kernel/subagent-codex/lib/types/index.d.ts +11 -6
- package/dist/kernel/subagent-codex/lib/types/index.js +33 -12
- package/dist/kernel/subagent-codex/lib/types/run.d.ts +17 -8
- package/dist/kernel/subagent-codex/lib/types/run.js +235 -42
- package/dist/kernel/subagent-codex/lib/types/wire.d.ts +49 -1
- package/dist/kernel/subagent-codex/lib/types/wire.js +280 -33
- package/dist/kernel/subagent-codex/package.json +10 -5
- package/dist/kernel/subagent-fork-in-process/package.json +1 -1
- package/dist/kernel/subagent-in-process-driver/package.json +1 -1
- package/dist/kernel/subagent-nomix-sdk/package.json +1 -1
- package/dist/kernel/subagent-spawn-in-process/package.json +1 -1
- package/dist/kernel/subprocess/package.json +1 -1
- package/dist/kernel/subprocess-e2b/package.json +1 -1
- package/dist/kernel/subprocess-local/lib/index.js +303 -1
- package/dist/kernel/subprocess-local/lib/types/process-inspector.js +3 -0
- package/dist/kernel/subprocess-local/lib/types/terminal.d.ts +6 -1
- package/dist/kernel/subprocess-local/lib/types/terminal.js +78 -1
- package/dist/kernel/subprocess-local/lib/types/windows-inspector.d.ts +80 -0
- package/dist/kernel/subprocess-local/lib/types/windows-inspector.js +259 -0
- package/dist/kernel/subprocess-local/package.json +2 -1
- package/dist/kernel/system-prompt/package.json +1 -1
- package/dist/kernel/terminal/package.json +1 -1
- package/dist/kernel/terminal-bash/lib/index.js +85 -20
- package/dist/kernel/terminal-bash/lib/types/config.d.ts +29 -5
- package/dist/kernel/terminal-bash/lib/types/config.js +33 -3
- package/dist/kernel/terminal-bash/lib/types/index.d.ts +7 -0
- package/dist/kernel/terminal-bash/lib/types/index.js +65 -13
- package/dist/kernel/terminal-bash/package.json +2 -1
- package/dist/kernel/time-context/lib/index.js +1 -1
- package/dist/kernel/time-context/lib/invariant.js +1 -1
- package/dist/kernel/time-context/package.json +1 -1
- package/dist/kernel/timeout/package.json +1 -1
- package/dist/kernel/tmux-context/lib/index.js +1 -1
- package/dist/kernel/tmux-context/package.json +1 -1
- package/dist/kernel/token-meter/lib/index.js +77 -21
- package/dist/kernel/token-meter/lib/types/breakdown-projection.d.ts +76 -9
- package/dist/kernel/token-meter/lib/types/breakdown-projection.js +22 -6
- package/dist/kernel/token-meter/lib/types/usage-projection.d.ts +186 -25
- package/dist/kernel/token-meter/lib/types/usage-projection.js +44 -15
- package/dist/kernel/token-meter/package.json +1 -1
- package/dist/kernel/tool-ask-user/package.json +1 -1
- package/dist/kernel/tool-bash/package.json +1 -1
- package/dist/kernel/tool-bash-persistent/lib/index.js +15 -5
- package/dist/kernel/tool-bash-persistent/lib/types/index.js +23 -6
- package/dist/kernel/tool-bash-persistent/package.json +1 -1
- package/dist/kernel/tool-call-timeout-policy/package.json +1 -1
- package/dist/kernel/tool-cordis/lib/index.js +655 -83
- package/dist/kernel/tool-cordis/lib/types/api-catalog.js +439 -41
- package/dist/kernel/tool-cordis/package.json +1 -1
- package/dist/kernel/tool-fs/lib/index.js +80 -52
- package/dist/kernel/tool-fs/lib/types/read-image.d.ts +16 -12
- package/dist/kernel/tool-fs/lib/types/read-image.js +73 -29
- package/dist/kernel/tool-fs/package.json +1 -1
- package/dist/kernel/tool-fs-search/lib/index.js +11 -7
- package/dist/kernel/tool-fs-search/lib/types/search-core.d.ts +5 -6
- package/dist/kernel/tool-fs-search/lib/types/search-core.js +12 -7
- package/dist/kernel/tool-fs-search/package.json +1 -1
- package/dist/kernel/tool-goal/package.json +1 -1
- package/dist/kernel/tool-jobs/package.json +1 -1
- package/dist/kernel/tool-lsp/package.json +1 -1
- package/dist/kernel/tool-pwsh/package.json +1 -1
- package/dist/kernel/tool-pwsh-persistent/lib/index.js +407 -0
- package/dist/kernel/tool-pwsh-persistent/lib/invariant.js +24 -0
- package/dist/kernel/tool-pwsh-persistent/lib/types/index.d.ts +24 -0
- package/dist/kernel/tool-pwsh-persistent/lib/types/index.js +465 -0
- package/dist/kernel/tool-pwsh-persistent/lib/types/invariant.d.ts +16 -0
- package/dist/kernel/tool-pwsh-persistent/lib/types/invariant.js +23 -0
- package/dist/kernel/tool-pwsh-persistent/package.json +62 -0
- package/dist/kernel/tool-ralph/package.json +1 -1
- package/dist/kernel/tool-session-query/package.json +1 -1
- package/dist/kernel/tool-skill/package.json +1 -1
- package/dist/kernel/tool-str-replace-editor/package.json +1 -1
- package/dist/kernel/tool-subagent/lib/index.js +10 -8
- package/dist/kernel/tool-subagent/lib/types/index.js +15 -8
- package/dist/kernel/tool-subagent/package.json +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 +3 -3
- package/dist/kernel/tool-subagent-report/lib/types/index.js +1 -1
- package/dist/kernel/tool-subagent-report/package.json +1 -1
- package/dist/kernel/tool-terminal/package.json +1 -1
- package/dist/kernel/tool-todo/lib/index.js +5 -2
- package/dist/kernel/tool-todo/lib/types/index.js +2 -2
- package/dist/kernel/tool-todo/lib/types/types.d.ts +3 -0
- package/dist/kernel/tool-todo/package.json +1 -1
- package/dist/kernel/tool-web/lib/index.js +101 -26
- package/dist/kernel/tool-web/lib/types/index.d.ts +4 -2
- package/dist/kernel/tool-web/lib/types/index.js +5 -3
- package/dist/kernel/tool-web/lib/types/search.d.ts +23 -20
- package/dist/kernel/tool-web/lib/types/search.js +109 -20
- package/dist/kernel/tool-web/package.json +1 -1
- package/dist/kernel/tool-workflow/package.json +1 -1
- package/dist/kernel/tools/package.json +1 -1
- package/dist/kernel/typert-generator/lib/index.js +8 -3
- package/dist/kernel/typert-generator/lib/types/cordis-catalog.js +8 -3
- package/dist/kernel/typert-generator/package.json +1 -1
- package/dist/kernel/typert-loader/package.json +1 -1
- package/dist/kernel/typert-protocol/package.json +1 -1
- package/dist/kernel/typert-registry/package.json +1 -1
- package/dist/kernel/user-approval/package.json +1 -1
- package/dist/kernel/user-questions/package.json +1 -1
- package/dist/kernel/web/lib/types/types.d.ts +4 -3
- package/dist/kernel/web/package.json +1 -1
- package/dist/kernel/web-app/cordis.patch.yml +27 -6
- package/dist/kernel/web-app/lib/index.js +111 -15
- package/dist/kernel/web-app/lib/startup.js +4 -2
- package/dist/kernel/web-app/lib/types/index.d.ts +8 -4
- package/dist/kernel/web-app/lib/types/index.js +116 -23
- package/dist/kernel/web-app/lib/types/startup.d.ts +3 -1
- package/dist/kernel/web-app/lib/types/startup.js +4 -1
- package/dist/kernel/web-app/package.json +12 -2
- package/dist/kernel/web-fetch-http/lib/index.js +1 -1
- package/dist/kernel/web-fetch-http/lib/types/index.d.ts +1 -1
- package/dist/kernel/web-fetch-http/lib/types/index.js +1 -1
- package/dist/kernel/web-fetch-http/package.json +1 -1
- package/dist/kernel/web-frontend/dist/assets/index-BnapMmQ_.css +1 -0
- package/dist/kernel/web-frontend/dist/assets/index-Dx7Ws_OC.js +96 -0
- package/dist/kernel/web-frontend/dist/assets/langs/{php-D-uCvoST.js → php-DDkx9sim.js} +2 -2
- package/dist/{assets/web/assets/langs/ruby-DEItuUFs.js → kernel/web-frontend/dist/assets/langs/ruby-DCxyoPen.js} +2 -2
- package/dist/kernel/web-frontend/dist/assets/{vendor-Cjbwl5VI.js → vendor-D22_Mp1f.js} +2 -2
- package/dist/kernel/web-frontend/dist/favicon.svg +8 -0
- package/dist/kernel/web-frontend/dist/index.html +5 -5
- package/dist/kernel/web-frontend/package.json +5 -8
- package/dist/kernel/web-search-deepseek/lib/index.js +1 -1
- package/dist/kernel/web-search-deepseek/lib/types/provider.js +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/provider.js +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/provider.js +1 -1
- package/dist/kernel/web-search-perplexity/package.json +1 -1
- package/dist/kernel/workflow/package.json +1 -1
- package/dist/kernel/workflow-worker-thread/package.json +1 -1
- package/dist/kernel/workspace/package.json +1 -1
- package/dist/plugins/manifest.json +50 -10
- package/dist/runtime/index.js +0 -2
- package/package.json +8 -6
- package/dist/assets/web/assets/index-B_fSXASy.css +0 -1
- package/dist/assets/web/assets/index-B_sZ-Gsu.js +0 -112
- package/dist/cli/builtin-registry.d.ts +0 -5
- package/dist/cli/profile-boot-CeU09iFc.js +0 -2
- package/dist/kernel/app-boot/lib/types/legacy-branding.d.ts +0 -6
- package/dist/kernel/app-boot/lib/types/legacy-branding.js +0 -18
- package/dist/kernel/client-schema-form/lib/index.js +0 -137
- package/dist/kernel/client-schema-form/lib/types/index.d.ts +0 -10
- package/dist/kernel/client-schema-form/lib/types/index.js +0 -9
- package/dist/kernel/client-schema-form/lib/types/model.d.ts +0 -66
- package/dist/kernel/client-schema-form/lib/types/model.js +0 -153
- package/dist/kernel/client-ui-subagent/lib/types/client/SubagentCatalogAction.d.ts +0 -18
- package/dist/kernel/client-ui-theme/lib/styles/base.css +0 -15
- package/dist/kernel/client-ui-theme/lib/styles/design-platform.css +0 -338
- package/dist/kernel/client-ui-theme/lib/styles/gradient-shadow-text.css +0 -232
- package/dist/kernel/client-ui-theme/lib/styles/scrollbar.css +0 -90
- package/dist/kernel/client-ui-theme/lib/styles/shiki.css +0 -31
- package/dist/kernel/client-web/lib/types/AppRoot.d.ts +0 -16
- package/dist/kernel/client-web/lib/types/AppRoot.js +0 -27
- package/dist/kernel/client-web/lib/types/DocumentTitle.js +0 -16
- package/dist/kernel/client-web/lib/types/app-shell.d.ts +0 -28
- package/dist/kernel/client-web/lib/types/app-shell.js +0 -27
- package/dist/kernel/client-web/lib/types/app.d.ts +0 -21
- package/dist/kernel/client-web-react/lib/index.js +0 -810
- package/dist/kernel/client-web-react/lib/types/index.d.ts +0 -16
- package/dist/kernel/client-web-react/lib/types/index.js +0 -6
- package/dist/kernel/client-web-react/lib/types/use-invoke.d.ts +0 -9
- package/dist/kernel/client-web-react/lib/types/use-invoke.js +0 -52
- package/dist/kernel/skill-badge/assets/nomix-badge.svg +0 -8
- package/dist/kernel/web-frontend/dist/assets/index-B_fSXASy.css +0 -1
- package/dist/kernel/web-frontend/dist/assets/index-B_sZ-Gsu.js +0 -112
- /package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/bind.js +0 -0
- /package/dist/kernel/{client-web-react/lib/types → client-ui-renderer/lib/types/client}/session-provider.js +0 -0
|
@@ -1,810 +0,0 @@
|
|
|
1
|
-
import { useSyncExternalStoreWithSelector } from "use-sync-external-store/shim/with-selector.js";
|
|
2
|
-
import { SlotOwnershipError, SlotOwnershipError as SlotOwnershipError$1, StaleAuthorizationError, StaleAuthorizationError as StaleAuthorizationError$1 } from "../../client-ui-slots/lib/index.js";
|
|
3
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { Component, createContext, useContext, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
5
|
-
//#region lib/types/bind.js
|
|
6
|
-
/**
|
|
7
|
-
* uSES bridge: turns any bare observable snapshot source into a typed
|
|
8
|
-
* selector hook. Client-side-rendered only, so no server snapshot is wired.
|
|
9
|
-
* This is the ONE hook constructor in the client stack — engines and hosts
|
|
10
|
-
* traffic in bare sources; binding happens on the React side.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Bind a bare observable source to a typed uSES selector hook.
|
|
14
|
-
* subscribe/getSnapshot are captured once per source into stable closures
|
|
15
|
-
* (also re-binds `this` for method-based sources), so components never
|
|
16
|
-
* resubscribe across renders. Equality defaults to Object.is.
|
|
17
|
-
* @param w - snapshot source (engine store, Session object, store instance).
|
|
18
|
-
* @returns the selector hook.
|
|
19
|
-
*/
|
|
20
|
-
function bindSnapshotSelector(w) {
|
|
21
|
-
const subscribe = (fn) => w.subscribe(fn);
|
|
22
|
-
const getSnapshot = () => w.getSnapshot();
|
|
23
|
-
return function useSelector(sel, eq) {
|
|
24
|
-
return useSyncExternalStoreWithSelector(subscribe, getSnapshot, void 0, sel, eq);
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region lib/types/session-provider.js
|
|
29
|
-
/** Internal React bindings for the renderer host and active session provide bundle. */
|
|
30
|
-
/**
|
|
31
|
-
* A missing-provider assembly error: the shell wired the tree wrong. The slot
|
|
32
|
-
* error boundary rethrows this class so misassembly stays fail-loud while
|
|
33
|
-
* registrant errors (inject factories, entry components) are contained
|
|
34
|
-
* per entry.
|
|
35
|
-
*/
|
|
36
|
-
var SlotAssemblyError = class extends Error {};
|
|
37
|
-
/** In-package renderer host context. */
|
|
38
|
-
const HostContext = createContext(null);
|
|
39
|
-
/**
|
|
40
|
-
* Read the installed renderer host; throws outside the rendered root tree
|
|
41
|
-
* (framework components must not render detached from the renderer).
|
|
42
|
-
* @returns the host API.
|
|
43
|
-
*/
|
|
44
|
-
function useHost() {
|
|
45
|
-
const host = useContext(HostContext);
|
|
46
|
-
if (!host) throw new SlotAssemblyError("slot machinery rendered outside the installed renderer tree");
|
|
47
|
-
return host;
|
|
48
|
-
}
|
|
49
|
-
const BindingContext = createContext(null);
|
|
50
|
-
/** Read the current-session-optional bundle supplied at the root. */
|
|
51
|
-
function useSessionMaybeProvideInfo() {
|
|
52
|
-
const info = useContext(BindingContext);
|
|
53
|
-
if (!info) throw new SlotAssemblyError("session-aware slot rendered outside the root binding provider");
|
|
54
|
-
return info;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Identity-stable selector hook per host observable. uSES resubscribes when
|
|
58
|
-
* the subscribe reference changes, so the bound hook must be created once per
|
|
59
|
-
* source — cached here by source identity (sources are host-owned singletons).
|
|
60
|
-
* @param source - host-provided observable.
|
|
61
|
-
* @returns the cached selector hook.
|
|
62
|
-
*/
|
|
63
|
-
function observableHook(source) {
|
|
64
|
-
let hook = hookCache.get(source);
|
|
65
|
-
if (hook === void 0) {
|
|
66
|
-
hook = bindSnapshotSelector(source);
|
|
67
|
-
hookCache.set(source, hook);
|
|
68
|
-
}
|
|
69
|
-
return hook;
|
|
70
|
-
}
|
|
71
|
-
const hookCache = /* @__PURE__ */ new WeakMap();
|
|
72
|
-
const absentSource = {
|
|
73
|
-
getSnapshot: () => void 0,
|
|
74
|
-
subscribe: () => () => {}
|
|
75
|
-
};
|
|
76
|
-
/** Bind a source that disappears with the current session to an optional selector hook. */
|
|
77
|
-
function maybeObservableHook(source) {
|
|
78
|
-
if (source !== void 0) return observableHook(source);
|
|
79
|
-
return useAbsentSnapshot;
|
|
80
|
-
}
|
|
81
|
-
function useAbsentSnapshot(_selector, _equal) {
|
|
82
|
-
observableHook(absentSource)(() => void 0);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* The useProjection framework seat (docs/subsystems/session-projection.md), one bound
|
|
86
|
-
* function per provide bundle (cached by info identity — components may hold
|
|
87
|
-
* it across renders). Key-addressed: the key resolves a per-session value
|
|
88
|
-
* face off the projection store; the bound selector hook comes from the same
|
|
89
|
-
* per-source cache as every other kit hook, so exactly one uSES subscription
|
|
90
|
-
* runs per call and the subscribe reference stays stable per key. A key no
|
|
91
|
-
* baseline or frame has carried (or a no-session bundle) reads `undefined` —
|
|
92
|
-
* capability absence — keeping the hook order constant.
|
|
93
|
-
*/
|
|
94
|
-
function projectionHook(info) {
|
|
95
|
-
let hook = projectionHookCache.get(info);
|
|
96
|
-
if (hook === void 0) {
|
|
97
|
-
hook = (key, selector, eq) => {
|
|
98
|
-
return observableHook(info.projections?.faceOf(key) ?? absentSource)(selector ?? ((value) => value), eq);
|
|
99
|
-
};
|
|
100
|
-
projectionHookCache.set(info, hook);
|
|
101
|
-
}
|
|
102
|
-
return hook;
|
|
103
|
-
}
|
|
104
|
-
const projectionHookCache = /* @__PURE__ */ new WeakMap();
|
|
105
|
-
/**
|
|
106
|
-
* Root-level binding provider. It follows current selection without a key;
|
|
107
|
-
* per-entry identity is the outlet's adoption bookkeeping (SessionMaybeEntry):
|
|
108
|
-
* a blank-born incarnation adopts the first session without remounting, and
|
|
109
|
-
* every later transition (switch or loss) remounts like a strict entry.
|
|
110
|
-
*/
|
|
111
|
-
function SessionMaybeProvider({ children }) {
|
|
112
|
-
const info = observableHook(useHost().sessions.provideInfo)((s) => s);
|
|
113
|
-
return jsx(BindingContext.Provider, {
|
|
114
|
-
value: info,
|
|
115
|
-
children
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Framework-wired session area: subscribes to the host's current provide
|
|
120
|
-
* source and remounts the body under `key={sessionId}` so a session switch
|
|
121
|
-
* rebuilds the session subtree. This dependency-inverted layer uses plain
|
|
122
|
-
* string ids; `PropsRuntime` applies the branded type at the component
|
|
123
|
-
* boundary.
|
|
124
|
-
*/
|
|
125
|
-
function SessionProvider({ empty, children }) {
|
|
126
|
-
const info = observableHook(useHost().sessions.provideInfo)((s) => s);
|
|
127
|
-
const id = info.sessionId;
|
|
128
|
-
if (id === void 0) return jsx(Fragment, { children: empty?.() ?? null });
|
|
129
|
-
return jsx(BindingContext.Provider, {
|
|
130
|
-
value: info,
|
|
131
|
-
children: children(id)
|
|
132
|
-
}, id);
|
|
133
|
-
}
|
|
134
|
-
//#endregion
|
|
135
|
-
//#region lib/types/scoped-slots.js
|
|
136
|
-
/**
|
|
137
|
-
* React renderer for declarative slots. Per-entry bindings enforce child
|
|
138
|
-
* authorization, and entry boundaries contain registrant failures.
|
|
139
|
-
*/
|
|
140
|
-
/**
|
|
141
|
-
* Per-entry renderSlot bindings. The binding is identity-stable per entry
|
|
142
|
-
* (memoized components must not resubscribe on unrelated re-renders) and dies
|
|
143
|
-
* with the entry: a retained closure calling after the entry's disposal hits
|
|
144
|
-
* the in-ledger check and throws.
|
|
145
|
-
*/
|
|
146
|
-
const renderSlotCache = /* @__PURE__ */ new WeakMap();
|
|
147
|
-
function boundRenderSlot(host, entry) {
|
|
148
|
-
let binding = renderSlotCache.get(entry);
|
|
149
|
-
if (!binding) {
|
|
150
|
-
binding = (key, owner, opts) => {
|
|
151
|
-
if (!host.isLive(entry)) throw new StaleAuthorizationError$1(`renderSlot('${key}') from a disposed registration`);
|
|
152
|
-
const declared = entry.children?.[key];
|
|
153
|
-
if (declared === void 0) throw new SlotOwnershipError$1(`slot '${key}' is not declared by this entry's children`);
|
|
154
|
-
if (declared.kind === "chain") throw new SlotOwnershipError$1(`slot '${key}' is declared 'chain' — use renderSlotChain`);
|
|
155
|
-
return jsx(SlotOutlet, {
|
|
156
|
-
slotKey: key,
|
|
157
|
-
ownerProps: owner,
|
|
158
|
-
opts
|
|
159
|
-
});
|
|
160
|
-
};
|
|
161
|
-
renderSlotCache.set(entry, binding);
|
|
162
|
-
}
|
|
163
|
-
return binding;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Per-entry renderSlotChain bindings: identity-stable per entry (same cache
|
|
167
|
-
* axis as renderSlot — a per-frame dispatch must not rebuild the binding) and
|
|
168
|
-
* dead with the entry. The chain-kind check is the plain-JS backstop twin of
|
|
169
|
-
* the declaration check; typed callers are narrowed to chain keys.
|
|
170
|
-
*/
|
|
171
|
-
const renderSlotChainCache = /* @__PURE__ */ new WeakMap();
|
|
172
|
-
function boundRenderSlotChain(host, entry) {
|
|
173
|
-
let binding = renderSlotChainCache.get(entry);
|
|
174
|
-
if (!binding) {
|
|
175
|
-
binding = (key, owner, opts) => {
|
|
176
|
-
if (!host.isLive(entry)) throw new StaleAuthorizationError$1(`renderSlotChain('${key}') from a disposed registration`);
|
|
177
|
-
const declared = entry.children?.[key];
|
|
178
|
-
if (declared === void 0) throw new SlotOwnershipError$1(`slot '${key}' is not declared by this entry's children`);
|
|
179
|
-
if (declared.kind !== "chain") throw new SlotOwnershipError$1(`slot '${key}' is declared '${declared.kind}', not 'chain' — use renderSlot`);
|
|
180
|
-
return jsx(SlotOutlet, {
|
|
181
|
-
slotKey: key,
|
|
182
|
-
ownerProps: owner,
|
|
183
|
-
opts
|
|
184
|
-
});
|
|
185
|
-
};
|
|
186
|
-
renderSlotChainCache.set(entry, binding);
|
|
187
|
-
}
|
|
188
|
-
return binding;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Inject results cache: root entries per entry, session entries per
|
|
192
|
-
* (entry x provide bundle). WeakMap keys are entry/info objects (both
|
|
193
|
-
* identity-stable per registration/session scope), so cache lifetime rides
|
|
194
|
-
* the same axes as the values it memoizes.
|
|
195
|
-
*/
|
|
196
|
-
const rootInjectCache = /* @__PURE__ */ new WeakMap();
|
|
197
|
-
const sessionInjectCache = /* @__PURE__ */ new WeakMap();
|
|
198
|
-
const sessionMaybeInjectCache = /* @__PURE__ */ new WeakMap();
|
|
199
|
-
const EMPTY_INJECTED_PROPS = {};
|
|
200
|
-
function runInject(entry, info, actions) {
|
|
201
|
-
const inject = entry.inject;
|
|
202
|
-
if (!inject) return EMPTY_INJECTED_PROPS;
|
|
203
|
-
const args = [];
|
|
204
|
-
if (info !== void 0) args.push(info.sessionId);
|
|
205
|
-
if (actions !== void 0) args.push(actions);
|
|
206
|
-
return bindInjectHooks(inject(...args));
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Normalize one entry-owned inject face on its existing cache axis. Its hooks
|
|
210
|
-
* compartment remains the original Observable-only contract.
|
|
211
|
-
*/
|
|
212
|
-
function bindInjectHooks(face) {
|
|
213
|
-
const sources = face["hooks"];
|
|
214
|
-
if (sources === void 0) return face;
|
|
215
|
-
const { hooks: _hooks, ...rest } = face;
|
|
216
|
-
const bound = rest;
|
|
217
|
-
for (const [name, source] of Object.entries(sources)) {
|
|
218
|
-
const hookName = `use${name[0]?.toUpperCase() ?? ""}${name.slice(1)}`;
|
|
219
|
-
bound[hookName] = observableHook(source);
|
|
220
|
-
}
|
|
221
|
-
return bound;
|
|
222
|
-
}
|
|
223
|
-
const slotInjectCache = /* @__PURE__ */ new WeakMap();
|
|
224
|
-
const EMPTY_SLOT_INJECT = { props: EMPTY_INJECTED_PROPS };
|
|
225
|
-
/** Normalize one dispatcher-owned inject face by its stable object identity. */
|
|
226
|
-
function cachedSlotInject(face) {
|
|
227
|
-
if (face === void 0) return EMPTY_SLOT_INJECT;
|
|
228
|
-
let bound = slotInjectCache.get(face);
|
|
229
|
-
if (bound !== void 0) return bound;
|
|
230
|
-
const definitions = face["hooks"];
|
|
231
|
-
if (definitions === void 0) {
|
|
232
|
-
bound = { props: face };
|
|
233
|
-
slotInjectCache.set(face, bound);
|
|
234
|
-
return bound;
|
|
235
|
-
}
|
|
236
|
-
const { hooks: _hooks, ...rest } = face;
|
|
237
|
-
const props = rest;
|
|
238
|
-
let factories;
|
|
239
|
-
for (const [name, definition] of Object.entries(definitions)) {
|
|
240
|
-
const hookName = `use${name[0]?.toUpperCase() ?? ""}${name.slice(1)}`;
|
|
241
|
-
if (typeof definition === "function") {
|
|
242
|
-
factories ??= {};
|
|
243
|
-
factories[name] = definition;
|
|
244
|
-
} else props[hookName] = observableHook(definition);
|
|
245
|
-
}
|
|
246
|
-
bound = factories === void 0 ? { props } : {
|
|
247
|
-
props,
|
|
248
|
-
slotHookFactories: factories
|
|
249
|
-
};
|
|
250
|
-
slotInjectCache.set(face, bound);
|
|
251
|
-
return bound;
|
|
252
|
-
}
|
|
253
|
-
/** Bind deferred slot-level factories for one stable renderSlot occurrence. */
|
|
254
|
-
function bindSlotHookFactories(factories, standard, hookContext) {
|
|
255
|
-
const hooks = {};
|
|
256
|
-
for (const [name, factory] of Object.entries(factories)) {
|
|
257
|
-
const hookName = `use${name[0]?.toUpperCase() ?? ""}${name.slice(1)}`;
|
|
258
|
-
hooks[hookName] = factory(standard, hookContext);
|
|
259
|
-
}
|
|
260
|
-
return hooks;
|
|
261
|
-
}
|
|
262
|
-
function cachedRootInject(entry, actions) {
|
|
263
|
-
let props = rootInjectCache.get(entry);
|
|
264
|
-
if (!props) {
|
|
265
|
-
props = runInject(entry, void 0, actions);
|
|
266
|
-
rootInjectCache.set(entry, props);
|
|
267
|
-
}
|
|
268
|
-
return props;
|
|
269
|
-
}
|
|
270
|
-
function cachedSessionInject(entry, info, actions) {
|
|
271
|
-
let perInfo = sessionInjectCache.get(entry);
|
|
272
|
-
if (!perInfo) {
|
|
273
|
-
perInfo = /* @__PURE__ */ new WeakMap();
|
|
274
|
-
sessionInjectCache.set(entry, perInfo);
|
|
275
|
-
}
|
|
276
|
-
let props = perInfo.get(info);
|
|
277
|
-
if (!props) {
|
|
278
|
-
props = runInject(entry, info, actions);
|
|
279
|
-
perInfo.set(info, props);
|
|
280
|
-
}
|
|
281
|
-
return props;
|
|
282
|
-
}
|
|
283
|
-
function cachedSessionMaybeInject(entry, info, actions) {
|
|
284
|
-
let perInfo = sessionMaybeInjectCache.get(entry);
|
|
285
|
-
if (!perInfo) {
|
|
286
|
-
perInfo = /* @__PURE__ */ new WeakMap();
|
|
287
|
-
sessionMaybeInjectCache.set(entry, perInfo);
|
|
288
|
-
}
|
|
289
|
-
let props = perInfo.get(info);
|
|
290
|
-
if (!props) {
|
|
291
|
-
props = runInject(entry, info, actions);
|
|
292
|
-
perInfo.set(info, props);
|
|
293
|
-
}
|
|
294
|
-
return props;
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Locale `t` seat bindings, cached per (face, namespace, revision). The
|
|
298
|
-
* revision is part of the cache key ON PURPOSE: a locale switch mints a NEW
|
|
299
|
-
* function reference per namespace, so `React.memo` components taking `t`
|
|
300
|
-
* re-render through ordinary shallow comparison — freshness rides identity,
|
|
301
|
-
* no extra invalidation channel. Within one revision the reference is stable
|
|
302
|
-
* (memoized children do not churn on unrelated re-renders).
|
|
303
|
-
*/
|
|
304
|
-
const localeSeatCache = /* @__PURE__ */ new WeakMap();
|
|
305
|
-
function localeSeat(face, ns) {
|
|
306
|
-
let perNs = localeSeatCache.get(face);
|
|
307
|
-
if (!perNs) {
|
|
308
|
-
perNs = /* @__PURE__ */ new Map();
|
|
309
|
-
localeSeatCache.set(face, perNs);
|
|
310
|
-
}
|
|
311
|
-
const revision = face.getSnapshot().revision;
|
|
312
|
-
const cached = perNs.get(ns);
|
|
313
|
-
if (cached && cached.revision === revision) return cached.t;
|
|
314
|
-
const bound = face.bind(ns);
|
|
315
|
-
const t = (key, params) => bound(key, params);
|
|
316
|
-
perNs.set(ns, {
|
|
317
|
-
revision,
|
|
318
|
-
t
|
|
319
|
-
});
|
|
320
|
-
return t;
|
|
321
|
-
}
|
|
322
|
-
const noopSubscribe = () => () => {};
|
|
323
|
-
const zeroRevision = () => 0;
|
|
324
|
-
/**
|
|
325
|
-
* Per-face subscribe/getSnapshot closure pair. Cached by face identity: the
|
|
326
|
-
* face is one global source shared by every outlet, and uSES resubscribes
|
|
327
|
-
* whenever the subscribe reference changes — fresh closures per render would
|
|
328
|
-
* churn one unsubscribe/resubscribe pair per outlet per render.
|
|
329
|
-
*/
|
|
330
|
-
const localeSubscriptionCache = /* @__PURE__ */ new WeakMap();
|
|
331
|
-
function localeSubscription(face) {
|
|
332
|
-
let cached = localeSubscriptionCache.get(face);
|
|
333
|
-
if (!cached) {
|
|
334
|
-
cached = {
|
|
335
|
-
subscribe: (fn) => face.subscribe(fn),
|
|
336
|
-
getRevision: () => face.getSnapshot().revision
|
|
337
|
-
};
|
|
338
|
-
localeSubscriptionCache.set(face, cached);
|
|
339
|
-
}
|
|
340
|
-
return cached;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Subscribe an outlet to the installed locale face's revision (0 while none
|
|
344
|
-
* is installed — exactly one uSES call either way, keeping hook order
|
|
345
|
-
* stable). Every outlet re-renders on a locale switch; entry bodies then
|
|
346
|
-
* re-derive their `t` seat at the new revision. The face must be installed
|
|
347
|
-
* before the first render that needs it — a face appearing later has no
|
|
348
|
-
* notification channel to already-mounted outlets.
|
|
349
|
-
*/
|
|
350
|
-
function useLocaleRevision(face) {
|
|
351
|
-
const subscription = face !== void 0 ? localeSubscription(face) : void 0;
|
|
352
|
-
return useSyncExternalStore(subscription?.subscribe ?? noopSubscribe, subscription?.getRevision ?? zeroRevision);
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Entry-identity React keys for entry boundaries. An outlet renders one
|
|
356
|
-
* winner per position (single/keyed/list cell head, chain election) through
|
|
357
|
-
* an error boundary; without a key, a boundary that failed on entry A would
|
|
358
|
-
* survive a winner change (re-election, shadowing fallback after an
|
|
359
|
-
* abdication, HMR re-registration) and keep a healthy entry B blacked out.
|
|
360
|
-
* Keying by entry identity remounts the boundary fresh whenever the winner
|
|
361
|
-
* changes (entries are identity-stable per registration, so the key is
|
|
362
|
-
* stable while the same entry stays the winner).
|
|
363
|
-
*/
|
|
364
|
-
let nextEntryKey = 0;
|
|
365
|
-
const entryKeys = /* @__PURE__ */ new WeakMap();
|
|
366
|
-
function entryKeyOf(entry) {
|
|
367
|
-
let key = entryKeys.get(entry);
|
|
368
|
-
if (key === void 0) {
|
|
369
|
-
key = nextEntryKey++;
|
|
370
|
-
entryKeys.set(entry, key);
|
|
371
|
-
}
|
|
372
|
-
return key;
|
|
373
|
-
}
|
|
374
|
-
/**
|
|
375
|
-
* Per-entry isolation: one registrant crashing (component render or inject
|
|
376
|
-
* factory) must not take down siblings. Assembly errors (missing providers)
|
|
377
|
-
* rethrow — a miswired shell must fail loud, not degrade into fallbacks.
|
|
378
|
-
* Every catch reports through `onEntryError` (the ledger's supervision
|
|
379
|
-
* seam); for shadowing kinds the report abdicates the entry, the outlet
|
|
380
|
-
* re-renders onto the cell's next survivor, and this boundary's crash face
|
|
381
|
-
* only shows until that re-render lands (permanently once the cell is dry —
|
|
382
|
-
* the outlet then owns the crash face).
|
|
383
|
-
*/
|
|
384
|
-
var SlotErrorBoundary = class extends Component {
|
|
385
|
-
state = { failed: false };
|
|
386
|
-
static getDerivedStateFromError(error) {
|
|
387
|
-
if (error instanceof SlotAssemblyError) throw error;
|
|
388
|
-
return { failed: true };
|
|
389
|
-
}
|
|
390
|
-
componentDidCatch(error) {
|
|
391
|
-
console.error(`slot entry crashed in '${this.props.slotKey}':`, error);
|
|
392
|
-
this.props.onEntryError(error);
|
|
393
|
-
}
|
|
394
|
-
render() {
|
|
395
|
-
if (this.state.failed) return jsx("div", { "data-slot-error": this.props.slotKey });
|
|
396
|
-
return this.props.children;
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
const standardPropsCache = /* @__PURE__ */ new WeakMap();
|
|
400
|
-
/** Stable official-props object used by contextual Hook factories. */
|
|
401
|
-
function standardProps(host, scope, info) {
|
|
402
|
-
let cache = standardPropsCache.get(host);
|
|
403
|
-
if (cache === void 0) {
|
|
404
|
-
cache = {
|
|
405
|
-
root: {
|
|
406
|
-
useSessions: observableHook(host.sessions.list),
|
|
407
|
-
useWorkspaces: observableHook(host.workspaces.list)
|
|
408
|
-
},
|
|
409
|
-
session: /* @__PURE__ */ new WeakMap(),
|
|
410
|
-
sessionMaybe: /* @__PURE__ */ new WeakMap()
|
|
411
|
-
};
|
|
412
|
-
standardPropsCache.set(host, cache);
|
|
413
|
-
}
|
|
414
|
-
if (scope === "root") return cache.root;
|
|
415
|
-
if (info === void 0) throw new SlotAssemblyError(`scope '${scope}' rendered without session provide info`);
|
|
416
|
-
const byInfo = scope === "session" ? cache.session : cache.sessionMaybe;
|
|
417
|
-
let standard = byInfo.get(info);
|
|
418
|
-
if (standard !== void 0) return standard;
|
|
419
|
-
standard = { ...cache.root };
|
|
420
|
-
for (const [name, source] of Object.entries(info.hooks)) {
|
|
421
|
-
const hookName = `use${name[0]?.toUpperCase() ?? ""}${name.slice(1)}`;
|
|
422
|
-
if (scope === "session-maybe") standard[hookName] = maybeObservableHook(source);
|
|
423
|
-
else {
|
|
424
|
-
if (source === void 0) throw new SlotAssemblyError(`strict session hook '${name}' has no source`);
|
|
425
|
-
standard[hookName] = observableHook(source);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
Object.assign(standard, info.props);
|
|
429
|
-
standard["sessionId"] = info.sessionId;
|
|
430
|
-
standard["useProjection"] = projectionHook(info);
|
|
431
|
-
byInfo.set(info, standard);
|
|
432
|
-
return standard;
|
|
433
|
-
}
|
|
434
|
-
/**
|
|
435
|
-
* Standard-kit synthesis shared by both scope branches: the global
|
|
436
|
-
* useSessions/useWorkspaces hooks, the per-session provide bundle (every
|
|
437
|
-
* `hooks` source becomes a `use<Name>` selector hook — useSession is the
|
|
438
|
-
* runtime's own 'session' contribution, no special case — and `props` spread
|
|
439
|
-
* verbatim), the store pair when declared, the renderSlot binding when
|
|
440
|
-
* children are declared, and the SessionProvider seat when the children
|
|
441
|
-
* declare a session-scope slot. Hosts hand out BARE observable sources
|
|
442
|
-
* (hooks never cross the host contract); every hook is bound HERE, cached
|
|
443
|
-
* per source (observableHook), so spreading a fresh kit object per render
|
|
444
|
-
* never churns child subscriptions.
|
|
445
|
-
*/
|
|
446
|
-
function standardKit(host, entry, scope, info) {
|
|
447
|
-
const standard = standardProps(host, scope, info);
|
|
448
|
-
const kit = { ...standard };
|
|
449
|
-
if (entry.locale !== void 0) {
|
|
450
|
-
const face = host.locale;
|
|
451
|
-
if (face === void 0) throw new SlotAssemblyError(`entry declares locale namespace '${entry.locale}' but no locale face is installed (locale plugin missing from the composition?)`);
|
|
452
|
-
kit["t"] = localeSeat(face, entry.locale);
|
|
453
|
-
}
|
|
454
|
-
const store = scope === "session-maybe" && info?.sessionId === void 0 ? void 0 : host.storeOf(entry, info?.sessionId);
|
|
455
|
-
if (store !== void 0) {
|
|
456
|
-
kit["useStore"] = observableHook(store);
|
|
457
|
-
kit["actions"] = store.actions;
|
|
458
|
-
}
|
|
459
|
-
if (entry.children !== void 0) {
|
|
460
|
-
kit["renderSlot"] = boundRenderSlot(host, entry);
|
|
461
|
-
if (Object.values(entry.children).some((spec) => spec.kind === "chain")) kit["renderSlotChain"] = boundRenderSlotChain(host, entry);
|
|
462
|
-
if (Object.values(entry.children).some((spec) => spec.scope === "session")) kit["SessionProvider"] = SessionProvider;
|
|
463
|
-
}
|
|
464
|
-
return {
|
|
465
|
-
kit,
|
|
466
|
-
standard,
|
|
467
|
-
actions: store?.actions
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
471
|
-
* One rendered entry: standard kit + cached entry inject + common slot inject
|
|
472
|
-
* + owner props (owner wins). The shares are erased at this render boundary;
|
|
473
|
-
* the registration and renderSlot seams already proved their contracts.
|
|
474
|
-
*/
|
|
475
|
-
function ContextualEntry({ slotKey, Comp, kit, standard, injected, slotInjected, ownerProps, hookContext, hasHookContext }) {
|
|
476
|
-
const contextual = useMemo(() => {
|
|
477
|
-
if (!hasHookContext) throw new SlotAssemblyError(`slot '${slotKey}' has contextual injected Hooks but no hookContext`);
|
|
478
|
-
return bindSlotHookFactories(slotInjected.slotHookFactories, standard, hookContext);
|
|
479
|
-
}, [
|
|
480
|
-
hasHookContext,
|
|
481
|
-
hookContext,
|
|
482
|
-
slotInjected.slotHookFactories,
|
|
483
|
-
slotKey,
|
|
484
|
-
standard
|
|
485
|
-
]);
|
|
486
|
-
return jsx(Comp, {
|
|
487
|
-
...kit,
|
|
488
|
-
...injected,
|
|
489
|
-
...slotInjected.props,
|
|
490
|
-
...contextual,
|
|
491
|
-
...ownerProps
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
function renderEntry(slotKey, Comp, kit, standard, injected, slotInjected, ownerProps, hookContext, hasHookContext) {
|
|
495
|
-
if (slotInjected.slotHookFactories === void 0) return jsx(Comp, {
|
|
496
|
-
...kit,
|
|
497
|
-
...injected,
|
|
498
|
-
...slotInjected.props,
|
|
499
|
-
...ownerProps
|
|
500
|
-
});
|
|
501
|
-
return jsx(ContextualEntry, {
|
|
502
|
-
slotKey,
|
|
503
|
-
Comp,
|
|
504
|
-
kit,
|
|
505
|
-
standard,
|
|
506
|
-
injected,
|
|
507
|
-
slotInjected,
|
|
508
|
-
ownerProps,
|
|
509
|
-
hookContext,
|
|
510
|
-
hasHookContext
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
function SessionEntry({ entry, ownerProps, info, slotKey, slotInjected, hookContext, hasHookContext }) {
|
|
514
|
-
const host = useHost();
|
|
515
|
-
const Comp = entry.component;
|
|
516
|
-
const { kit, standard, actions } = standardKit(host, entry, "session", info);
|
|
517
|
-
return renderEntry(slotKey, Comp, kit, standard, cachedSessionInject(entry, info, actions), slotInjected, ownerProps, hookContext, hasHookContext);
|
|
518
|
-
}
|
|
519
|
-
function SessionMaybeEntryBody({ entry, ownerProps, info, slotKey, slotInjected, hookContext, hasHookContext }) {
|
|
520
|
-
const host = useHost();
|
|
521
|
-
const Comp = entry.component;
|
|
522
|
-
const { kit, standard, actions } = standardKit(host, entry, "session-maybe", info);
|
|
523
|
-
return renderEntry(slotKey, Comp, kit, standard, cachedSessionMaybeInject(entry, info, actions), slotInjected, ownerProps, hookContext, hasHookContext);
|
|
524
|
-
}
|
|
525
|
-
/**
|
|
526
|
-
* Session-maybe identity: adoption — the ONLY behavior (there is no
|
|
527
|
-
* hold-identity-forever mode). An incarnation born session-less ADOPTS the
|
|
528
|
-
* first session that arrives: identity holds across that one transition
|
|
529
|
-
* (undefined → first id), so a blank shell's DOM survives the moment a
|
|
530
|
-
* session appears. From then on the entry behaves exactly like a strict
|
|
531
|
-
* session entry: switching to a DIFFERENT session remounts (component-local
|
|
532
|
-
* state must not leak between sessions), and dropping back to no-session
|
|
533
|
-
* remounts into a fresh blank incarnation, which will adopt again.
|
|
534
|
-
* Component-local per-session state therefore clears by construction; state
|
|
535
|
-
* that must SURVIVE a switch belongs in session-bound sources (machine,
|
|
536
|
-
* store, hooks) — the existing layering rule, now load-bearing.
|
|
537
|
-
*/
|
|
538
|
-
function SessionMaybeEntry({ entry, ownerProps, slotKey, slotInjected, hookContext, hasHookContext }) {
|
|
539
|
-
const info = useSessionMaybeProvideInfo();
|
|
540
|
-
const [state, setState] = useState(FIRST_INCARNATION);
|
|
541
|
-
let { adopted, epoch } = state;
|
|
542
|
-
if (info.sessionId !== void 0 && adopted === void 0) {
|
|
543
|
-
adopted = info.sessionId;
|
|
544
|
-
setState({
|
|
545
|
-
adopted,
|
|
546
|
-
epoch
|
|
547
|
-
});
|
|
548
|
-
} else if (adopted !== void 0 && info.sessionId !== void 0 && info.sessionId !== adopted) {
|
|
549
|
-
adopted = info.sessionId;
|
|
550
|
-
epoch += 1;
|
|
551
|
-
setState({
|
|
552
|
-
adopted,
|
|
553
|
-
epoch
|
|
554
|
-
});
|
|
555
|
-
} else if (adopted !== void 0 && info.sessionId === void 0) {
|
|
556
|
-
adopted = void 0;
|
|
557
|
-
epoch += 1;
|
|
558
|
-
setState({
|
|
559
|
-
adopted,
|
|
560
|
-
epoch
|
|
561
|
-
});
|
|
562
|
-
}
|
|
563
|
-
return jsx(SessionMaybeEntryBody, {
|
|
564
|
-
entry,
|
|
565
|
-
ownerProps,
|
|
566
|
-
info,
|
|
567
|
-
slotKey,
|
|
568
|
-
slotInjected,
|
|
569
|
-
hookContext,
|
|
570
|
-
hasHookContext
|
|
571
|
-
}, epoch);
|
|
572
|
-
}
|
|
573
|
-
const FIRST_INCARNATION = {
|
|
574
|
-
adopted: void 0,
|
|
575
|
-
epoch: 0
|
|
576
|
-
};
|
|
577
|
-
function RootEntry({ entry, ownerProps, slotKey, slotInjected, hookContext, hasHookContext }) {
|
|
578
|
-
const host = useHost();
|
|
579
|
-
const Comp = entry.component;
|
|
580
|
-
const { kit, standard, actions } = standardKit(host, entry, "root", void 0);
|
|
581
|
-
return renderEntry(slotKey, Comp, kit, standard, cachedRootInject(entry, actions), slotInjected, ownerProps, hookContext, hasHookContext);
|
|
582
|
-
}
|
|
583
|
-
function StrictSessionEntry({ slotKey, entry, ownerProps, slotInjected, hookContext, hasHookContext, onEntryError }) {
|
|
584
|
-
const info = useSessionMaybeProvideInfo();
|
|
585
|
-
if (info.sessionId === void 0) return null;
|
|
586
|
-
return jsx(SlotErrorBoundary, {
|
|
587
|
-
slotKey,
|
|
588
|
-
onEntryError,
|
|
589
|
-
children: jsx(SessionEntry, {
|
|
590
|
-
entry,
|
|
591
|
-
ownerProps,
|
|
592
|
-
info,
|
|
593
|
-
slotKey,
|
|
594
|
-
slotInjected,
|
|
595
|
-
hookContext,
|
|
596
|
-
hasHookContext
|
|
597
|
-
})
|
|
598
|
-
}, info.sessionId);
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* Anchor style shared by every outlet wrapper: `display:contents` keeps the
|
|
602
|
-
* wrapper out of layout (grid/flex parents see the slot's own children), so
|
|
603
|
-
* the anchor is purely addressable surface. Module-level constant — a stable
|
|
604
|
-
* reference so the wrapper never diffs its style prop.
|
|
605
|
-
*/
|
|
606
|
-
const ANCHOR_STYLE = { display: "contents" };
|
|
607
|
-
function SlotOutlet({ slotKey, ownerProps, opts }) {
|
|
608
|
-
const host = useHost();
|
|
609
|
-
useSyncExternalStore((fn) => host.subscribe(slotKey, fn), () => host.getVersion(slotKey));
|
|
610
|
-
useLocaleRevision(host.locale);
|
|
611
|
-
return jsx("div", {
|
|
612
|
-
"data-slot": slotKey,
|
|
613
|
-
style: ANCHOR_STYLE,
|
|
614
|
-
children: renderOutletContent(host, slotKey, ownerProps, opts, useSessionMaybeProvideInfo())
|
|
615
|
-
});
|
|
616
|
-
}
|
|
617
|
-
/** Kind dispatch behind the outlet anchor (single/keyed/list/chain, fallbacks, crash faces). */
|
|
618
|
-
function renderOutletContent(host, slotKey, ownerProps, opts, sessionInfo) {
|
|
619
|
-
const spec = host.specOf(slotKey);
|
|
620
|
-
if (!spec) return null;
|
|
621
|
-
const strictSessionAbsent = spec.scope === "session" && sessionInfo.sessionId === void 0;
|
|
622
|
-
if (strictSessionAbsent && (spec.kind !== "chain" || !opts?.overlay)) return jsx(Fragment, { children: opts?.fallback ?? null });
|
|
623
|
-
const entries = strictSessionAbsent ? [] : host.entriesOf(slotKey);
|
|
624
|
-
const slotInjected = cachedSlotInject(spec.inject);
|
|
625
|
-
const guarded = (entry, key, owner = ownerProps) => {
|
|
626
|
-
const hasHookContext = opts !== void 0 && Object.hasOwn(opts, "hookContext");
|
|
627
|
-
const hookContext = opts?.hookContext;
|
|
628
|
-
const onEntryError = (error) => {
|
|
629
|
-
host.reportEntryError(slotKey, entry, error, { abdicate: spec.kind !== "chain" });
|
|
630
|
-
};
|
|
631
|
-
return spec.scope === "session" ? jsx(StrictSessionEntry, {
|
|
632
|
-
slotKey,
|
|
633
|
-
entry,
|
|
634
|
-
ownerProps: owner,
|
|
635
|
-
slotInjected,
|
|
636
|
-
hookContext,
|
|
637
|
-
hasHookContext,
|
|
638
|
-
onEntryError
|
|
639
|
-
}, key) : jsx(SlotErrorBoundary, {
|
|
640
|
-
slotKey,
|
|
641
|
-
onEntryError,
|
|
642
|
-
children: spec.scope === "session-maybe" ? jsx(SessionMaybeEntry, {
|
|
643
|
-
entry,
|
|
644
|
-
ownerProps: owner,
|
|
645
|
-
slotKey,
|
|
646
|
-
slotInjected,
|
|
647
|
-
hookContext,
|
|
648
|
-
hasHookContext
|
|
649
|
-
}) : jsx(RootEntry, {
|
|
650
|
-
entry,
|
|
651
|
-
ownerProps: owner,
|
|
652
|
-
slotKey,
|
|
653
|
-
slotInjected,
|
|
654
|
-
hookContext,
|
|
655
|
-
hasHookContext
|
|
656
|
-
})
|
|
657
|
-
}, key);
|
|
658
|
-
};
|
|
659
|
-
const deadCell = () => jsx("div", { "data-slot-error": slotKey });
|
|
660
|
-
if (spec.kind === "single") {
|
|
661
|
-
const entry = host.entriesOfSlot(slotKey)[0];
|
|
662
|
-
if (!entry) return entries.length > 0 ? deadCell() : jsx(Fragment, { children: opts?.fallback ?? null });
|
|
663
|
-
return guarded(entry, entryKeyOf(entry));
|
|
664
|
-
}
|
|
665
|
-
if (spec.kind === "keyed") {
|
|
666
|
-
const entry = host.entriesOfSlot(slotKey).find((e) => e.options.key === opts?.entryKey);
|
|
667
|
-
if (!entry) return entries.some((e) => e.options.key === opts?.entryKey) ? deadCell() : jsx(Fragment, { children: opts?.fallback ?? null });
|
|
668
|
-
return guarded(entry, entryKeyOf(entry));
|
|
669
|
-
}
|
|
670
|
-
if (spec.kind === "chain") {
|
|
671
|
-
let elected = null;
|
|
672
|
-
for (const entry of entries) {
|
|
673
|
-
let matched;
|
|
674
|
-
try {
|
|
675
|
-
matched = entry.select(ownerProps);
|
|
676
|
-
} catch (error) {
|
|
677
|
-
console.error(`chain selector crashed in '${slotKey}' (${entry.registrant ?? "unknown registrant"}), treating as declined:`, error);
|
|
678
|
-
continue;
|
|
679
|
-
}
|
|
680
|
-
if (matched !== null) {
|
|
681
|
-
elected = guarded(entry, entryKeyOf(entry), {
|
|
682
|
-
...ownerProps,
|
|
683
|
-
matched
|
|
684
|
-
});
|
|
685
|
-
break;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
if (opts?.overlay) return jsxs(Fragment, { children: [jsx("div", {
|
|
689
|
-
"data-chain-overlay-fallback": slotKey,
|
|
690
|
-
style: { display: elected === null ? "contents" : "none" },
|
|
691
|
-
children: opts.fallback ?? null
|
|
692
|
-
}), elected] });
|
|
693
|
-
return elected ?? jsx(Fragment, { children: opts?.fallback ?? null });
|
|
694
|
-
}
|
|
695
|
-
const rows = host.entriesOfSlot(slotKey).map((entry) => ({
|
|
696
|
-
entry,
|
|
697
|
-
id: entry.options.id,
|
|
698
|
-
order: entry.options.order ?? 0
|
|
699
|
-
}));
|
|
700
|
-
const rowIds = new Set(rows.map((row) => row.id));
|
|
701
|
-
for (const entry of entries) {
|
|
702
|
-
if (rowIds.has(entry.options.id)) continue;
|
|
703
|
-
rowIds.add(entry.options.id);
|
|
704
|
-
rows.push({
|
|
705
|
-
entry: void 0,
|
|
706
|
-
id: entry.options.id,
|
|
707
|
-
order: entry.options.order ?? 0
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
let list = [...rows].sort((a, b) => a.order - b.order);
|
|
711
|
-
if (opts?.only !== void 0) list = list.filter((item) => item.id === opts.only);
|
|
712
|
-
if (list.length === 0) return jsx(Fragment, { children: opts?.fallback ?? null });
|
|
713
|
-
return jsx(Fragment, { children: list.map((item, i) => item.entry !== void 0 ? guarded(item.entry, `e${entryKeyOf(item.entry)}`) : jsx("div", { "data-slot-error": slotKey }, `x${item.id ?? i}`)) });
|
|
714
|
-
}
|
|
715
|
-
/** Root outlet: the shell's single ctx-level render entry — an unregistered 'root' is a boot-order failure, never a silent blank. */
|
|
716
|
-
function RootOutlet({ ownerProps }) {
|
|
717
|
-
const host = useHost();
|
|
718
|
-
useSyncExternalStore((fn) => host.subscribe("root", fn), () => host.getVersion("root"));
|
|
719
|
-
useLocaleRevision(host.locale);
|
|
720
|
-
const entry = host.entriesOfSlot("root")[0];
|
|
721
|
-
if (!entry) {
|
|
722
|
-
if (host.entriesOf("root").length > 0) return jsx("div", { "data-slot-error": "root" });
|
|
723
|
-
throw new SlotAssemblyError("renderSlot('root') before any 'root' registration (boot order)");
|
|
724
|
-
}
|
|
725
|
-
return jsx("div", {
|
|
726
|
-
"data-slot": "root",
|
|
727
|
-
style: ANCHOR_STYLE,
|
|
728
|
-
children: jsx(SlotErrorBoundary, {
|
|
729
|
-
slotKey: "root",
|
|
730
|
-
onEntryError: (error) => {
|
|
731
|
-
host.reportEntryError("root", entry, error, { abdicate: true });
|
|
732
|
-
},
|
|
733
|
-
children: jsx(RootEntry, {
|
|
734
|
-
entry,
|
|
735
|
-
ownerProps,
|
|
736
|
-
slotKey: "root",
|
|
737
|
-
slotInjected: EMPTY_SLOT_INJECT,
|
|
738
|
-
hookContext: void 0,
|
|
739
|
-
hasHookContext: false
|
|
740
|
-
})
|
|
741
|
-
}, entryKeyOf(entry))
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* Build the renderer the shell installs into the runtime SlotRegistry
|
|
746
|
-
* (ctx.slots.install(createSlotRenderer()) at boot; the service owns the
|
|
747
|
-
* install/renderSlot contract and the double-install/not-installed throws).
|
|
748
|
-
* @returns the renderer.
|
|
749
|
-
*/
|
|
750
|
-
function createSlotRenderer() {
|
|
751
|
-
return { renderRoot(host, ownerProps) {
|
|
752
|
-
return jsx(HostContext.Provider, {
|
|
753
|
-
value: host,
|
|
754
|
-
children: jsx(SessionMaybeProvider, { children: jsx(RootOutlet, { ownerProps }) })
|
|
755
|
-
});
|
|
756
|
-
} };
|
|
757
|
-
}
|
|
758
|
-
//#endregion
|
|
759
|
-
//#region lib/types/use-invoke.js
|
|
760
|
-
/**
|
|
761
|
-
* useInvoke: wrap an async action into a stable trigger plus pending flag.
|
|
762
|
-
* Pending is tracked in a per-hook external store read through uSES instead
|
|
763
|
-
* of setState, keeping the render body side-effect free and the invoke
|
|
764
|
-
* reference stable across renders (idempotent-hook rules).
|
|
765
|
-
*/
|
|
766
|
-
function createCell(fn) {
|
|
767
|
-
const cell = {
|
|
768
|
-
inflight: 0,
|
|
769
|
-
listeners: /* @__PURE__ */ new Set(),
|
|
770
|
-
fn,
|
|
771
|
-
invoke: () => {
|
|
772
|
-
bump(cell, 1);
|
|
773
|
-
cell.fn().catch((error) => {
|
|
774
|
-
console.error("useInvoke action failed:", error);
|
|
775
|
-
}).finally(() => {
|
|
776
|
-
bump(cell, -1);
|
|
777
|
-
});
|
|
778
|
-
},
|
|
779
|
-
subscribe: (listener) => {
|
|
780
|
-
cell.listeners.add(listener);
|
|
781
|
-
return () => {
|
|
782
|
-
cell.listeners.delete(listener);
|
|
783
|
-
};
|
|
784
|
-
},
|
|
785
|
-
getPending: () => cell.inflight > 0
|
|
786
|
-
};
|
|
787
|
-
return cell;
|
|
788
|
-
}
|
|
789
|
-
function bump(cell, delta) {
|
|
790
|
-
const wasPending = cell.inflight > 0;
|
|
791
|
-
cell.inflight += delta;
|
|
792
|
-
if (wasPending !== cell.inflight > 0) for (const listener of [...cell.listeners]) listener();
|
|
793
|
-
}
|
|
794
|
-
/**
|
|
795
|
-
* Wrap an async action into a stable invoke callback plus pending flag.
|
|
796
|
-
* Concurrent invocations are counted: pending stays true until the last
|
|
797
|
-
* in-flight call settles. The latest `fn` is always the one invoked.
|
|
798
|
-
* @param fn - async action.
|
|
799
|
-
* @returns invoke trigger and pending state.
|
|
800
|
-
*/
|
|
801
|
-
function useInvoke(fn) {
|
|
802
|
-
const ref = useRef(null);
|
|
803
|
-
ref.current ??= createCell(fn);
|
|
804
|
-
const cell = ref.current;
|
|
805
|
-
cell.fn = fn;
|
|
806
|
-
const pending = useSyncExternalStore(cell.subscribe, cell.getPending);
|
|
807
|
-
return [cell.invoke, pending];
|
|
808
|
-
}
|
|
809
|
-
//#endregion
|
|
810
|
-
export { SessionProvider, SlotAssemblyError, SlotOwnershipError, StaleAuthorizationError, bindSnapshotSelector, createSlotRenderer, useInvoke };
|