@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
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { Service } from "../../cordis/lib/index.js";
|
|
2
|
+
import { HarnessError } from "../../llm/lib/index.js";
|
|
3
|
+
//#region lib/types/index.js
|
|
4
|
+
/**
|
|
5
|
+
* Service Definition for the authorization capability seam (`ctx.authorization`):
|
|
6
|
+
* obtaining a credential nobody can supply from configuration alone, because
|
|
7
|
+
* getting it requires a conversation with the human — open this page, paste
|
|
8
|
+
* that code, pick an account.
|
|
9
|
+
*
|
|
10
|
+
* The seam owns the conversation and the lifecycle; it never owns the protocol.
|
|
11
|
+
* A plugin that knows how to obtain its own credential registers a flow keyed
|
|
12
|
+
* by the `CredentialKey` that flow writes, and the flow talks to whatever
|
|
13
|
+
* surface started it through one neutral vocabulary of notices and prompts. So
|
|
14
|
+
* a second authorization protocol arrives as another flow rather than as
|
|
15
|
+
* another seam, and a surface that renders one flow renders all of them.
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* const dispose = ctx.authorization.registerFlow({
|
|
19
|
+
* key: credentialKey('llm-pi-ai', 'openai-codex'),
|
|
20
|
+
* label: 'ChatGPT (Codex)',
|
|
21
|
+
* methods: [{ id: 'oauth', label: 'Sign in with ChatGPT' }],
|
|
22
|
+
* async run(session) {
|
|
23
|
+
* session.notify({ message: 'Continue in your browser', url })
|
|
24
|
+
* await commitThroughCredentials(await exchange(session.signal))
|
|
25
|
+
* },
|
|
26
|
+
* })
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @module @nomix-ai/nomix-authorization
|
|
30
|
+
*/
|
|
31
|
+
/** Stable error taxonomy for authorization failures. */
|
|
32
|
+
var AuthorizationError = class extends HarnessError {
|
|
33
|
+
constructor(message, code, options) {
|
|
34
|
+
super(message, code, options);
|
|
35
|
+
this.name = "AuthorizationError";
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The rejection an {@link AuthorizationInteraction.prompt} uses to say the
|
|
40
|
+
* human declined — dismissed the question, chose not to answer — rather than
|
|
41
|
+
* that the surface broke. An attempt whose flow fails after a prompt was
|
|
42
|
+
* declined settles as `cancelled`, the same outcome as a withdrawn signal,
|
|
43
|
+
* because the human saying no is a refusal, not a breakage. Only a human's
|
|
44
|
+
* "no" may reject with this class: a prompt withdrawn by its own `signal` (a
|
|
45
|
+
* flow retiring the losing question of a race) must reject with something
|
|
46
|
+
* else, or a later genuine failure would be misread as a decline.
|
|
47
|
+
*/
|
|
48
|
+
var AuthorizationDeclinedError = class extends AuthorizationError {
|
|
49
|
+
constructor(message = "the authorization prompt was declined") {
|
|
50
|
+
super(message, "DECLINED");
|
|
51
|
+
this.name = "AuthorizationDeclinedError";
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* `ctx.authorization`: a registry of credential-obtaining flows, one attempt at
|
|
56
|
+
* a time per key.
|
|
57
|
+
*/
|
|
58
|
+
var AuthorizationService = class extends Service {
|
|
59
|
+
/** The commit this seam confirms is a credential-record write, so the store is required, not optional. */
|
|
60
|
+
static inject = ["credentials"];
|
|
61
|
+
flows = /* @__PURE__ */ new Map();
|
|
62
|
+
running = /* @__PURE__ */ new Map();
|
|
63
|
+
constructor(ctx) {
|
|
64
|
+
super(ctx, "authorization");
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Offer a way to obtain one credential. One flow per key: two plugins
|
|
68
|
+
* claiming the same key would each write a record in their own format, and
|
|
69
|
+
* whichever ran last would leave the other reading a payload it cannot parse.
|
|
70
|
+
*
|
|
71
|
+
* @param flow - the key it writes, its label, its methods, and its runner.
|
|
72
|
+
* @returns Disposer that withdraws this flow.
|
|
73
|
+
* @throws {AuthorizationError} code `DUPLICATE_FLOW` when the key is already claimed.
|
|
74
|
+
*/
|
|
75
|
+
registerFlow(flow) {
|
|
76
|
+
const dispose = this.ctx.effect(function* () {
|
|
77
|
+
if (this.flows.has(flow.key)) throw new AuthorizationError(`an authorization flow for "${flow.key}" is already registered`, "DUPLICATE_FLOW");
|
|
78
|
+
this.flows.set(flow.key, flow);
|
|
79
|
+
yield () => {
|
|
80
|
+
this.flows.delete(flow.key);
|
|
81
|
+
this.running.get(flow.key)?.controller.abort();
|
|
82
|
+
};
|
|
83
|
+
}.bind(this), "authorization.registerFlow()");
|
|
84
|
+
return () => void dispose();
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Every registered flow, for a surface listing what can be authorized.
|
|
88
|
+
* @returns one entry per flow, in registration order.
|
|
89
|
+
*/
|
|
90
|
+
list() {
|
|
91
|
+
return [...this.flows.values()].map((flow) => this.entry(flow));
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* One registered flow.
|
|
95
|
+
* @param key - the credential record to ask about.
|
|
96
|
+
* @returns the entry, or undefined when no flow claims that key.
|
|
97
|
+
*/
|
|
98
|
+
describe(key) {
|
|
99
|
+
const flow = this.flows.get(key);
|
|
100
|
+
return flow === void 0 ? void 0 : this.entry(flow);
|
|
101
|
+
}
|
|
102
|
+
/** The public view of one registered flow. */
|
|
103
|
+
entry(flow) {
|
|
104
|
+
return {
|
|
105
|
+
key: flow.key,
|
|
106
|
+
label: flow.label,
|
|
107
|
+
methods: flow.methods,
|
|
108
|
+
inFlight: this.running.has(flow.key)
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Withdraw the attempt running for a key, if any. Separate from the
|
|
113
|
+
* request's own signal because a request/response transport answers a Cancel
|
|
114
|
+
* button on a second call, with no handle on the first one's signal.
|
|
115
|
+
* @param key - the credential record whose attempt should stop.
|
|
116
|
+
*/
|
|
117
|
+
cancel(key) {
|
|
118
|
+
this.running.get(key)?.controller.abort();
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Run one attempt to authorize a key, and report how it ended.
|
|
122
|
+
*
|
|
123
|
+
* One attempt per key at a time. A second caller is refused rather than
|
|
124
|
+
* joined: the two would be prompting different humans through the same flow,
|
|
125
|
+
* and the second would answer questions the first was asked.
|
|
126
|
+
*
|
|
127
|
+
* @param request - the key, the method, the surface, and the cancel signal.
|
|
128
|
+
* @returns `authorized` once the flow's record is committed during this
|
|
129
|
+
* attempt and observed, or `cancelled` when the human declined or the
|
|
130
|
+
* caller withdrew.
|
|
131
|
+
* @throws {AuthorizationError} code `NO_FLOW` when nothing claims the key,
|
|
132
|
+
* `UNKNOWN_METHOD` when the named method is not one the flow offers,
|
|
133
|
+
* `ALREADY_IN_FLIGHT` when an attempt is already running for the key, or
|
|
134
|
+
* `NOT_COMMITTED` when the flow resolved without committing a record
|
|
135
|
+
* during the attempt.
|
|
136
|
+
*/
|
|
137
|
+
async begin(request) {
|
|
138
|
+
const { key } = request;
|
|
139
|
+
const flow = this.flows.get(key);
|
|
140
|
+
if (flow === void 0) throw new AuthorizationError(`no authorization flow is registered for "${key}"`, "NO_FLOW");
|
|
141
|
+
const method = request.method ?? flow.methods[0].id;
|
|
142
|
+
if (!flow.methods.some((candidate) => candidate.id === method)) throw new AuthorizationError(`authorization flow for "${key}" offers no method "${method}"`, "UNKNOWN_METHOD");
|
|
143
|
+
if (this.running.has(key)) throw new AuthorizationError(`an authorization attempt for "${key}" is already running`, "ALREADY_IN_FLIGHT");
|
|
144
|
+
if (request.signal?.aborted === true) return { status: "cancelled" };
|
|
145
|
+
const controller = new AbortController();
|
|
146
|
+
const withdraw = () => {
|
|
147
|
+
controller.abort(request.signal?.reason);
|
|
148
|
+
};
|
|
149
|
+
request.signal?.addEventListener("abort", withdraw, { once: true });
|
|
150
|
+
this.running.set(key, { controller });
|
|
151
|
+
let settlement = "failed";
|
|
152
|
+
try {
|
|
153
|
+
const outcome = await this.attempt(flow, method, controller.signal, request.interaction);
|
|
154
|
+
settlement = outcome.status;
|
|
155
|
+
return outcome;
|
|
156
|
+
} finally {
|
|
157
|
+
request.signal?.removeEventListener("abort", withdraw);
|
|
158
|
+
this.running.delete(key);
|
|
159
|
+
this.settle(key, settlement);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Fan `authorization/settled` out with contained listener failures: every
|
|
164
|
+
* listener runs, and a sync throw or async rejection is logged without
|
|
165
|
+
* changing the finished attempt's own outcome — except `INVARIANT`-coded
|
|
166
|
+
* failures, which rethrow after every listener ran. The attempt is already
|
|
167
|
+
* over and its key released when this fires, so a broken watcher (that
|
|
168
|
+
* second browser tab) can never turn the caller's settled result into a
|
|
169
|
+
* failure of its own.
|
|
170
|
+
*/
|
|
171
|
+
settle(key, settlement) {
|
|
172
|
+
let invariantFailure;
|
|
173
|
+
const args = [
|
|
174
|
+
"authorization/settled",
|
|
175
|
+
key,
|
|
176
|
+
settlement
|
|
177
|
+
];
|
|
178
|
+
for (const listener of this.ctx.events.dispatch("emit", args)) try {
|
|
179
|
+
const returned = listener(key, settlement);
|
|
180
|
+
if (returned != null && typeof returned.then === "function") Promise.resolve(returned).then(void 0, (error) => {
|
|
181
|
+
this.warnSettledListenerFailure(key, error);
|
|
182
|
+
});
|
|
183
|
+
} catch (error) {
|
|
184
|
+
if (error?.code === "INVARIANT") {
|
|
185
|
+
invariantFailure ??= error;
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
this.warnSettledListenerFailure(key, error);
|
|
189
|
+
}
|
|
190
|
+
if (invariantFailure !== void 0) throw invariantFailure;
|
|
191
|
+
}
|
|
192
|
+
/** Contained-listener diagnostic shared by the sync and async failure paths. */
|
|
193
|
+
warnSettledListenerFailure(key, error) {
|
|
194
|
+
this.ctx.logger.warn("authorization: an authorization/settled listener for \"%s\" failed", key);
|
|
195
|
+
this.ctx.logger.warn(error);
|
|
196
|
+
}
|
|
197
|
+
/** Run the flow, then hold it to its half of the commit contract. */
|
|
198
|
+
async attempt(flow, method, signal, interaction) {
|
|
199
|
+
const withdrawn = new Promise((resolve) => {
|
|
200
|
+
signal.addEventListener("abort", () => {
|
|
201
|
+
resolve("withdrawn");
|
|
202
|
+
}, { once: true });
|
|
203
|
+
});
|
|
204
|
+
const observed = {
|
|
205
|
+
declined: false,
|
|
206
|
+
committed: false
|
|
207
|
+
};
|
|
208
|
+
const unwatch = this.ctx.on("credentials/record-updated", (key) => {
|
|
209
|
+
if (key === flow.key) observed.committed = true;
|
|
210
|
+
});
|
|
211
|
+
try {
|
|
212
|
+
const running = flow.run({
|
|
213
|
+
method,
|
|
214
|
+
signal,
|
|
215
|
+
notify: (notice) => {
|
|
216
|
+
try {
|
|
217
|
+
interaction.notify(notice);
|
|
218
|
+
} catch (error) {
|
|
219
|
+
this.ctx.logger.warn("authorization: the interaction surface failed to render a notice");
|
|
220
|
+
this.ctx.logger.warn(error);
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
prompt: (prompt) => interaction.prompt(prompt).catch((error) => {
|
|
224
|
+
if (error instanceof AuthorizationDeclinedError) observed.declined = true;
|
|
225
|
+
throw error;
|
|
226
|
+
})
|
|
227
|
+
});
|
|
228
|
+
try {
|
|
229
|
+
if (await Promise.race([running.then(() => "ran"), withdrawn]) === "withdrawn") {
|
|
230
|
+
running.catch(() => {
|
|
231
|
+
this.ctx.logger.debug("authorization: withdrawn flow failed after the fact");
|
|
232
|
+
});
|
|
233
|
+
return { status: "cancelled" };
|
|
234
|
+
}
|
|
235
|
+
} catch (error) {
|
|
236
|
+
if (signal.aborted || observed.declined) return { status: "cancelled" };
|
|
237
|
+
throw error;
|
|
238
|
+
}
|
|
239
|
+
} finally {
|
|
240
|
+
unwatch();
|
|
241
|
+
}
|
|
242
|
+
if (!observed.committed) throw new AuthorizationError(`authorization flow for "${flow.key}" resolved without committing a credential record in this attempt`, "NOT_COMMITTED");
|
|
243
|
+
if (!(await this.ctx.credentials.describeRecord(flow.key)).configured) throw new AuthorizationError(`authorization flow for "${flow.key}" deleted its credential record instead of committing one`, "NOT_COMMITTED");
|
|
244
|
+
return { status: "authorized" };
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
//#endregion
|
|
248
|
+
export { AuthorizationDeclinedError, AuthorizationError, AuthorizationService, AuthorizationService as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region lib/types/invariant.js
|
|
2
|
+
/**
|
|
3
|
+
* Package-owned invariant companion for `@nomix-ai/nomix-authorization`.
|
|
4
|
+
* @module @nomix-ai/nomix-authorization/invariant
|
|
5
|
+
*/
|
|
6
|
+
const PACKAGE_NAME = "@nomix-ai/nomix-authorization";
|
|
7
|
+
/** Cordis companion plugin name. */
|
|
8
|
+
const name = "authorization-invariant";
|
|
9
|
+
/** Service required before the companion can reserve package ownership. */
|
|
10
|
+
const inject = ["invariants"];
|
|
11
|
+
/**
|
|
12
|
+
* Install the single-flight release contract: `authorization/settled` names a
|
|
13
|
+
* finished attempt, and the seam admits one attempt per key, so the key must
|
|
14
|
+
* already be free when the event fires. A slot still held at settlement is
|
|
15
|
+
* unrecoverable — every later `begin()` for that key is refused as
|
|
16
|
+
* `ALREADY_IN_FLIGHT` until the process restarts — and it is invisible from the
|
|
17
|
+
* outside, because a wedged key looks exactly like a busy one.
|
|
18
|
+
*/
|
|
19
|
+
const install = (ctx, fail) => {
|
|
20
|
+
ctx.on("authorization/settled", (key) => {
|
|
21
|
+
const authorization = ctx.get("authorization");
|
|
22
|
+
if (authorization === void 0) {
|
|
23
|
+
fail(`authorization/settled for "${key}" emitted without a live authorization service`);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (authorization.describe(key)?.inFlight === true) fail(`authorization/settled for "${key}" left the key in flight, wedging every later attempt`);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Register this package's invariant companion.
|
|
31
|
+
* @param ctx - Cordis context carrying the invariant service.
|
|
32
|
+
* @returns the installed registration's disposer after setup succeeds.
|
|
33
|
+
*/
|
|
34
|
+
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
35
|
+
//#endregion
|
|
36
|
+
export { apply, inject, name };
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service Definition for the authorization capability seam (`ctx.authorization`):
|
|
3
|
+
* obtaining a credential nobody can supply from configuration alone, because
|
|
4
|
+
* getting it requires a conversation with the human — open this page, paste
|
|
5
|
+
* that code, pick an account.
|
|
6
|
+
*
|
|
7
|
+
* The seam owns the conversation and the lifecycle; it never owns the protocol.
|
|
8
|
+
* A plugin that knows how to obtain its own credential registers a flow keyed
|
|
9
|
+
* by the `CredentialKey` that flow writes, and the flow talks to whatever
|
|
10
|
+
* surface started it through one neutral vocabulary of notices and prompts. So
|
|
11
|
+
* a second authorization protocol arrives as another flow rather than as
|
|
12
|
+
* another seam, and a surface that renders one flow renders all of them.
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* const dispose = ctx.authorization.registerFlow({
|
|
16
|
+
* key: credentialKey('llm-pi-ai', 'openai-codex'),
|
|
17
|
+
* label: 'ChatGPT (Codex)',
|
|
18
|
+
* methods: [{ id: 'oauth', label: 'Sign in with ChatGPT' }],
|
|
19
|
+
* async run(session) {
|
|
20
|
+
* session.notify({ message: 'Continue in your browser', url })
|
|
21
|
+
* await commitThroughCredentials(await exchange(session.signal))
|
|
22
|
+
* },
|
|
23
|
+
* })
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @module @nomix-ai/nomix-authorization
|
|
27
|
+
*/
|
|
28
|
+
import { Context, Service } from '../../../cordis/lib/index.js';
|
|
29
|
+
import type { CredentialKey } from '../../../credentials/lib/index.js';
|
|
30
|
+
import { HarnessError } from '../../../llm/lib/index.js';
|
|
31
|
+
import type { AuthorizationEntry, AuthorizationMethod, AuthorizationNotice, AuthorizationOutcome, AuthorizationPrompt, AuthorizationSettlement } from './types.ts';
|
|
32
|
+
export type { AuthorizationEntry, AuthorizationMethod, AuthorizationNotice, AuthorizationOutcome, AuthorizationPrompt, AuthorizationPromptOption, AuthorizationSettlement, AuthorizationStatus, } from './types.ts';
|
|
33
|
+
declare module '@nomix-ai/cordis' {
|
|
34
|
+
interface Context {
|
|
35
|
+
authorization: AuthorizationService;
|
|
36
|
+
}
|
|
37
|
+
interface Events {
|
|
38
|
+
/**
|
|
39
|
+
* One authorization attempt has finished and released its key. Fires for
|
|
40
|
+
* every terminal outcome, failures included, so a surface watching a key it
|
|
41
|
+
* did not start (a second browser tab) learns the attempt is over.
|
|
42
|
+
* @mode emit
|
|
43
|
+
* @param key - the credential record the finished attempt was authorizing.
|
|
44
|
+
* @param settlement - how it ended, including the `failed` case its caller sees as a thrown error.
|
|
45
|
+
*/
|
|
46
|
+
'authorization/settled'(key: CredentialKey, settlement: AuthorizationSettlement): void;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/** Stable error taxonomy for authorization failures. */
|
|
50
|
+
export declare class AuthorizationError extends HarnessError {
|
|
51
|
+
constructor(message: string, code: string, options?: ErrorOptions);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The rejection an {@link AuthorizationInteraction.prompt} uses to say the
|
|
55
|
+
* human declined — dismissed the question, chose not to answer — rather than
|
|
56
|
+
* that the surface broke. An attempt whose flow fails after a prompt was
|
|
57
|
+
* declined settles as `cancelled`, the same outcome as a withdrawn signal,
|
|
58
|
+
* because the human saying no is a refusal, not a breakage. Only a human's
|
|
59
|
+
* "no" may reject with this class: a prompt withdrawn by its own `signal` (a
|
|
60
|
+
* flow retiring the losing question of a race) must reject with something
|
|
61
|
+
* else, or a later genuine failure would be misread as a decline.
|
|
62
|
+
*/
|
|
63
|
+
export declare class AuthorizationDeclinedError extends AuthorizationError {
|
|
64
|
+
constructor(message?: string);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* What a running flow is given to talk to the human. Every member is scoped to
|
|
68
|
+
* one attempt: the flow neither knows nor chooses which surface is listening.
|
|
69
|
+
*/
|
|
70
|
+
export interface AuthorizationSession {
|
|
71
|
+
/** The method id the caller picked, always one this flow declared. */
|
|
72
|
+
readonly method: string;
|
|
73
|
+
/** Aborted when the caller withdraws or `cancel()` is called for this key. */
|
|
74
|
+
readonly signal: AbortSignal;
|
|
75
|
+
/**
|
|
76
|
+
* Report progress, or tell the human what to do next. Fire-and-forget: a
|
|
77
|
+
* surface that cannot render a notice must not stall the flow.
|
|
78
|
+
* @param notice - the message, and any page or code it refers to.
|
|
79
|
+
*/
|
|
80
|
+
notify(notice: AuthorizationNotice): void;
|
|
81
|
+
/**
|
|
82
|
+
* Ask the human a question the flow cannot answer for itself.
|
|
83
|
+
* @param prompt - what to ask, and how it should be presented.
|
|
84
|
+
* @returns what the human typed, or the chosen option's id.
|
|
85
|
+
* @throws when the human declines, or the prompt's own signal withdraws it.
|
|
86
|
+
*/
|
|
87
|
+
prompt(prompt: AuthorizationPrompt): Promise<string>;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A plugin's knowledge of how to obtain one credential. The flow owns the
|
|
91
|
+
* write: `run()` resolving means the record for `key` is committed through
|
|
92
|
+
* `ctx.credentials` during that run, which the seam confirms — a commit
|
|
93
|
+
* observed within the attempt, still present after it — before reporting
|
|
94
|
+
* success. Committing inside the flow is what lets a library that persists
|
|
95
|
+
* through its own store adapter (pi-ai's `Models.login()`) stay the single
|
|
96
|
+
* writer instead of being copied back out and written twice.
|
|
97
|
+
*/
|
|
98
|
+
export interface AuthorizationFlow {
|
|
99
|
+
/** The credential record this flow writes. Its scope names the owning plugin. */
|
|
100
|
+
readonly key: CredentialKey;
|
|
101
|
+
/** User-facing name of what is being authorized. */
|
|
102
|
+
readonly label: string;
|
|
103
|
+
/**
|
|
104
|
+
* The methods offered, most preferred first; a caller naming none gets the
|
|
105
|
+
* first. Typed non-empty because a flow with nothing to run is a flow that
|
|
106
|
+
* cannot be begun, and the type says so at the one place flows are written.
|
|
107
|
+
*/
|
|
108
|
+
readonly methods: readonly [AuthorizationMethod, ...AuthorizationMethod[]];
|
|
109
|
+
/**
|
|
110
|
+
* Run one attempt to obtain and commit the credential.
|
|
111
|
+
* @param session - the chosen method, the cancellation signal, and the interaction callbacks.
|
|
112
|
+
* @returns once the record is committed.
|
|
113
|
+
* @throws when the attempt fails or the human declines.
|
|
114
|
+
*/
|
|
115
|
+
run(session: AuthorizationSession): Promise<void>;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The surface half of one attempt. Supplied with the request rather than
|
|
119
|
+
* registered, because the caller that starts an authorization is the one that
|
|
120
|
+
* can talk to the human about it: prompts reach exactly the page that asked,
|
|
121
|
+
* and a headless caller supplies an interaction that declines.
|
|
122
|
+
*/
|
|
123
|
+
export interface AuthorizationInteraction {
|
|
124
|
+
/**
|
|
125
|
+
* Render a notice from the running flow.
|
|
126
|
+
* @param notice - the message, and any page or code it refers to.
|
|
127
|
+
*/
|
|
128
|
+
notify(notice: AuthorizationNotice): void;
|
|
129
|
+
/**
|
|
130
|
+
* Put a question to the human and wait.
|
|
131
|
+
* @param prompt - what to ask, and how it should be presented.
|
|
132
|
+
* @returns the typed text, or the chosen option's id.
|
|
133
|
+
* @throws {AuthorizationDeclinedError} when the human declines; any other
|
|
134
|
+
* rejection reads as the surface failing, not as an answer.
|
|
135
|
+
*/
|
|
136
|
+
prompt(prompt: AuthorizationPrompt): Promise<string>;
|
|
137
|
+
}
|
|
138
|
+
/** One request to authorize a key. */
|
|
139
|
+
export interface AuthorizationRequest {
|
|
140
|
+
/** The credential record to authorize; a flow must be registered for it. */
|
|
141
|
+
key: CredentialKey;
|
|
142
|
+
/** Which of the flow's methods to run. Defaults to the flow's first. */
|
|
143
|
+
method?: string;
|
|
144
|
+
/** The surface that will render this attempt's notices and prompts. */
|
|
145
|
+
interaction: AuthorizationInteraction;
|
|
146
|
+
/** Withdraws the whole attempt. */
|
|
147
|
+
signal?: AbortSignal;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* `ctx.authorization`: a registry of credential-obtaining flows, one attempt at
|
|
151
|
+
* a time per key.
|
|
152
|
+
*/
|
|
153
|
+
export declare class AuthorizationService extends Service {
|
|
154
|
+
/** The commit this seam confirms is a credential-record write, so the store is required, not optional. */
|
|
155
|
+
static inject: string[];
|
|
156
|
+
private readonly flows;
|
|
157
|
+
private readonly running;
|
|
158
|
+
constructor(ctx: Context);
|
|
159
|
+
/**
|
|
160
|
+
* Offer a way to obtain one credential. One flow per key: two plugins
|
|
161
|
+
* claiming the same key would each write a record in their own format, and
|
|
162
|
+
* whichever ran last would leave the other reading a payload it cannot parse.
|
|
163
|
+
*
|
|
164
|
+
* @param flow - the key it writes, its label, its methods, and its runner.
|
|
165
|
+
* @returns Disposer that withdraws this flow.
|
|
166
|
+
* @throws {AuthorizationError} code `DUPLICATE_FLOW` when the key is already claimed.
|
|
167
|
+
*/
|
|
168
|
+
registerFlow(flow: AuthorizationFlow): () => void;
|
|
169
|
+
/**
|
|
170
|
+
* Every registered flow, for a surface listing what can be authorized.
|
|
171
|
+
* @returns one entry per flow, in registration order.
|
|
172
|
+
*/
|
|
173
|
+
list(): readonly AuthorizationEntry[];
|
|
174
|
+
/**
|
|
175
|
+
* One registered flow.
|
|
176
|
+
* @param key - the credential record to ask about.
|
|
177
|
+
* @returns the entry, or undefined when no flow claims that key.
|
|
178
|
+
*/
|
|
179
|
+
describe(key: CredentialKey): AuthorizationEntry | undefined;
|
|
180
|
+
/** The public view of one registered flow. */
|
|
181
|
+
private entry;
|
|
182
|
+
/**
|
|
183
|
+
* Withdraw the attempt running for a key, if any. Separate from the
|
|
184
|
+
* request's own signal because a request/response transport answers a Cancel
|
|
185
|
+
* button on a second call, with no handle on the first one's signal.
|
|
186
|
+
* @param key - the credential record whose attempt should stop.
|
|
187
|
+
*/
|
|
188
|
+
cancel(key: CredentialKey): void;
|
|
189
|
+
/**
|
|
190
|
+
* Run one attempt to authorize a key, and report how it ended.
|
|
191
|
+
*
|
|
192
|
+
* One attempt per key at a time. A second caller is refused rather than
|
|
193
|
+
* joined: the two would be prompting different humans through the same flow,
|
|
194
|
+
* and the second would answer questions the first was asked.
|
|
195
|
+
*
|
|
196
|
+
* @param request - the key, the method, the surface, and the cancel signal.
|
|
197
|
+
* @returns `authorized` once the flow's record is committed during this
|
|
198
|
+
* attempt and observed, or `cancelled` when the human declined or the
|
|
199
|
+
* caller withdrew.
|
|
200
|
+
* @throws {AuthorizationError} code `NO_FLOW` when nothing claims the key,
|
|
201
|
+
* `UNKNOWN_METHOD` when the named method is not one the flow offers,
|
|
202
|
+
* `ALREADY_IN_FLIGHT` when an attempt is already running for the key, or
|
|
203
|
+
* `NOT_COMMITTED` when the flow resolved without committing a record
|
|
204
|
+
* during the attempt.
|
|
205
|
+
*/
|
|
206
|
+
begin(request: AuthorizationRequest): Promise<AuthorizationOutcome>;
|
|
207
|
+
/**
|
|
208
|
+
* Fan `authorization/settled` out with contained listener failures: every
|
|
209
|
+
* listener runs, and a sync throw or async rejection is logged without
|
|
210
|
+
* changing the finished attempt's own outcome — except `INVARIANT`-coded
|
|
211
|
+
* failures, which rethrow after every listener ran. The attempt is already
|
|
212
|
+
* over and its key released when this fires, so a broken watcher (that
|
|
213
|
+
* second browser tab) can never turn the caller's settled result into a
|
|
214
|
+
* failure of its own.
|
|
215
|
+
*/
|
|
216
|
+
private settle;
|
|
217
|
+
/** Contained-listener diagnostic shared by the sync and async failure paths. */
|
|
218
|
+
private warnSettledListenerFailure;
|
|
219
|
+
/** Run the flow, then hold it to its half of the commit contract. */
|
|
220
|
+
private attempt;
|
|
221
|
+
}
|
|
222
|
+
export default AuthorizationService;
|
|
223
|
+
//# sourceMappingURL=index.d.ts.map
|