@undefineds.co/linx 0.3.25 → 0.3.27
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 +4 -3
- package/dist/index.js +3 -832
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-stream-bridge-contract.js +2 -0
- package/dist/lib/agent-stream-bridge-contract.js.map +1 -0
- package/dist/lib/auto-mode/auth.js +100 -2
- package/dist/lib/auto-mode/auth.js.map +1 -1
- package/dist/lib/auto-mode/backend-kind.js +13 -0
- package/dist/lib/auto-mode/backend-kind.js.map +1 -0
- package/dist/lib/auto-mode/display.js +1 -1
- package/dist/lib/auto-mode/display.js.map +1 -1
- package/dist/lib/auto-mode/format.js +1 -1
- package/dist/lib/auto-mode/format.js.map +1 -1
- package/dist/lib/auto-mode/hooks/{index.js → registry.js} +1 -1
- package/dist/lib/auto-mode/hooks/registry.js.map +1 -0
- package/dist/lib/auto-mode/pod-ai.js +1 -14
- package/dist/lib/auto-mode/pod-ai.js.map +1 -1
- package/dist/lib/auto-mode/pod-approval-store.js +596 -0
- package/dist/lib/auto-mode/pod-approval-store.js.map +1 -0
- package/dist/lib/auto-mode/pod-approval.js +4 -607
- package/dist/lib/auto-mode/pod-approval.js.map +1 -1
- package/dist/lib/auto-mode/pod-persistence-builders.js +266 -0
- package/dist/lib/auto-mode/pod-persistence-builders.js.map +1 -0
- package/dist/lib/auto-mode/pod-persistence.js +1 -281
- package/dist/lib/auto-mode/pod-persistence.js.map +1 -1
- package/dist/lib/auto-mode/runner.js +41 -378
- package/dist/lib/auto-mode/runner.js.map +1 -1
- package/dist/lib/auto-mode/runtime.js +25 -0
- package/dist/lib/auto-mode/runtime.js.map +1 -0
- package/dist/lib/auto-mode/secretary-reaction-window.js +12 -0
- package/dist/lib/auto-mode/secretary-reaction-window.js.map +1 -0
- package/dist/lib/auto-mode/secretary-runtime-config.js +66 -0
- package/dist/lib/auto-mode/secretary-runtime-config.js.map +1 -0
- package/dist/lib/auto-mode/secretary.js +2 -64
- package/dist/lib/auto-mode/secretary.js.map +1 -1
- package/dist/lib/auto-mode/session-log.js +25 -0
- package/dist/lib/auto-mode/session-log.js.map +1 -0
- package/dist/lib/auto-mode/shell-command.js +172 -0
- package/dist/lib/auto-mode/shell-command.js.map +1 -0
- package/dist/lib/auto-mode-command.js +2 -1
- package/dist/lib/auto-mode-command.js.map +1 -1
- package/dist/lib/backend-command-router-contract.js +2 -0
- package/dist/lib/backend-command-router-contract.js.map +1 -0
- package/dist/lib/{pi-adapter/backend-credentials.js → backend-credentials.js} +8 -8
- package/dist/lib/backend-credentials.js.map +1 -0
- package/dist/lib/linx-ai-connect-command.js +201 -0
- package/dist/lib/linx-ai-connect-command.js.map +1 -0
- package/dist/lib/linx-assistant-message-rendering.js +33 -0
- package/dist/lib/linx-assistant-message-rendering.js.map +1 -0
- package/dist/lib/linx-auto-command-routing.js +53 -0
- package/dist/lib/linx-auto-command-routing.js.map +1 -0
- package/dist/lib/linx-auto-editor-indicator-host.js +15 -0
- package/dist/lib/linx-auto-editor-indicator-host.js.map +1 -0
- package/dist/lib/linx-auto-editor-indicator.js +56 -0
- package/dist/lib/linx-auto-editor-indicator.js.map +1 -0
- package/dist/lib/linx-auto-mode-cli-admission.js +16 -0
- package/dist/lib/linx-auto-mode-cli-admission.js.map +1 -0
- package/dist/lib/linx-backend-command-router.js +64 -0
- package/dist/lib/linx-backend-command-router.js.map +1 -0
- package/dist/lib/linx-backend-event-source.js +32 -0
- package/dist/lib/linx-backend-event-source.js.map +1 -0
- package/dist/lib/linx-chat-completion-projection.js +276 -0
- package/dist/lib/linx-chat-completion-projection.js.map +1 -0
- package/dist/lib/linx-cloud-errors.js +1 -0
- package/dist/lib/linx-cloud-errors.js.map +1 -1
- package/dist/lib/linx-cloud-models.js +75 -0
- package/dist/lib/linx-cloud-models.js.map +1 -0
- package/dist/lib/linx-cloud-runtime-auth.js +146 -0
- package/dist/lib/linx-cloud-runtime-auth.js.map +1 -0
- package/dist/lib/linx-cloud-runtime-coordinator.js +102 -0
- package/dist/lib/linx-cloud-runtime-coordinator.js.map +1 -0
- package/dist/lib/linx-codex-plugin-command.js +56 -0
- package/dist/lib/linx-codex-plugin-command.js.map +1 -0
- package/dist/lib/linx-command-autocomplete.js +123 -0
- package/dist/lib/linx-command-autocomplete.js.map +1 -0
- package/dist/lib/linx-completion-backend.js +2 -0
- package/dist/lib/linx-completion-backend.js.map +1 -0
- package/dist/lib/linx-config-command.js +12 -0
- package/dist/lib/linx-config-command.js.map +1 -0
- package/dist/lib/linx-editor-component-router.js +83 -0
- package/dist/lib/linx-editor-component-router.js.map +1 -0
- package/dist/lib/linx-extension-ui-context-router.js +43 -0
- package/dist/lib/linx-extension-ui-context-router.js.map +1 -0
- package/dist/lib/linx-external-open-host.js +8 -0
- package/dist/lib/linx-external-open-host.js.map +1 -0
- package/dist/lib/linx-external-url.js +16 -0
- package/dist/lib/linx-external-url.js.map +1 -0
- package/dist/lib/linx-footer-patch.js +52 -0
- package/dist/lib/linx-footer-patch.js.map +1 -0
- package/dist/lib/linx-input-command-routing.js +65 -0
- package/dist/lib/linx-input-command-routing.js.map +1 -0
- package/dist/lib/linx-interactive-auth-state-host.js +50 -0
- package/dist/lib/linx-interactive-auth-state-host.js.map +1 -0
- package/dist/lib/linx-interactive-autocomplete-host.js +32 -0
- package/dist/lib/linx-interactive-autocomplete-host.js.map +1 -0
- package/dist/lib/linx-interactive-bootstrap.js +66 -0
- package/dist/lib/linx-interactive-bootstrap.js.map +1 -0
- package/dist/lib/linx-interactive-branding.js +24 -0
- package/dist/lib/linx-interactive-branding.js.map +1 -0
- package/dist/lib/linx-interactive-chat-text-host.js +16 -0
- package/dist/lib/linx-interactive-chat-text-host.js.map +1 -0
- package/dist/lib/linx-interactive-command-routing-host.js +31 -0
- package/dist/lib/linx-interactive-command-routing-host.js.map +1 -0
- package/dist/lib/linx-interactive-command-routing.js +75 -0
- package/dist/lib/linx-interactive-command-routing.js.map +1 -0
- package/dist/lib/linx-interactive-command-surface.js +16 -0
- package/dist/lib/linx-interactive-command-surface.js.map +1 -0
- package/dist/lib/linx-interactive-editor-text-host.js +16 -0
- package/dist/lib/linx-interactive-editor-text-host.js.map +1 -0
- package/dist/lib/linx-interactive-error-display.js +8 -0
- package/dist/lib/linx-interactive-error-display.js.map +1 -0
- package/dist/lib/linx-interactive-event-router.js +91 -0
- package/dist/lib/linx-interactive-event-router.js.map +1 -0
- package/dist/lib/linx-interactive-extension-input-host.js +7 -0
- package/dist/lib/linx-interactive-extension-input-host.js.map +1 -0
- package/dist/lib/linx-interactive-extension-selector-host.js +12 -0
- package/dist/lib/linx-interactive-extension-selector-host.js.map +1 -0
- package/dist/lib/linx-interactive-header-host.js +14 -0
- package/dist/lib/linx-interactive-header-host.js.map +1 -0
- package/dist/lib/linx-interactive-lifecycle-host.js +4 -0
- package/dist/lib/linx-interactive-lifecycle-host.js.map +1 -0
- package/dist/lib/linx-interactive-login-ui-router.js +81 -0
- package/dist/lib/linx-interactive-login-ui-router.js.map +1 -0
- package/dist/lib/linx-interactive-model-registry-host.js +14 -0
- package/dist/lib/linx-interactive-model-registry-host.js.map +1 -0
- package/dist/lib/linx-interactive-post-init.js +60 -0
- package/dist/lib/linx-interactive-post-init.js.map +1 -0
- package/dist/lib/linx-interactive-provider-count-host.js +4 -0
- package/dist/lib/linx-interactive-provider-count-host.js.map +1 -0
- package/dist/lib/linx-interactive-run-router.js +43 -0
- package/dist/lib/linx-interactive-run-router.js.map +1 -0
- package/dist/lib/linx-interactive-runtime-host.js +113 -0
- package/dist/lib/linx-interactive-runtime-host.js.map +1 -0
- package/dist/lib/linx-interactive-selector-host.js +12 -0
- package/dist/lib/linx-interactive-selector-host.js.map +1 -0
- package/dist/lib/linx-interactive-shell-state.js +215 -0
- package/dist/lib/linx-interactive-shell-state.js.map +1 -0
- package/dist/lib/linx-interactive-status-display.js +9 -0
- package/dist/lib/linx-interactive-status-display.js.map +1 -0
- package/dist/lib/linx-interactive-stop-router.js +85 -0
- package/dist/lib/linx-interactive-stop-router.js.map +1 -0
- package/dist/lib/linx-interactive-streaming-message-host.js +11 -0
- package/dist/lib/linx-interactive-streaming-message-host.js.map +1 -0
- package/dist/lib/linx-interactive-submit-router.js +63 -0
- package/dist/lib/linx-interactive-submit-router.js.map +1 -0
- package/dist/lib/linx-interactive-update-router.js +78 -0
- package/dist/lib/linx-interactive-update-router.js.map +1 -0
- package/dist/lib/linx-interactive-update-state-host.js +43 -0
- package/dist/lib/linx-interactive-update-state-host.js.map +1 -0
- package/dist/lib/linx-interactive-warning-display.js +4 -0
- package/dist/lib/linx-interactive-warning-display.js.map +1 -0
- package/dist/lib/linx-interrupt-control-host.js +22 -0
- package/dist/lib/linx-interrupt-control-host.js.map +1 -0
- package/dist/lib/linx-interrupt-control.js +96 -0
- package/dist/lib/linx-interrupt-control.js.map +1 -0
- package/dist/lib/linx-login-flow.js +566 -0
- package/dist/lib/linx-login-flow.js.map +1 -0
- package/dist/lib/linx-models-command.js +71 -0
- package/dist/lib/linx-models-command.js.map +1 -0
- package/dist/lib/linx-package-command.js +117 -0
- package/dist/lib/linx-package-command.js.map +1 -0
- package/dist/lib/linx-peer-command-routing.js +20 -0
- package/dist/lib/linx-peer-command-routing.js.map +1 -0
- package/dist/lib/linx-pi-cli-command.js +121 -0
- package/dist/lib/linx-pi-cli-command.js.map +1 -0
- package/dist/lib/linx-pi-completion-events.js +101 -0
- package/dist/lib/linx-pi-completion-events.js.map +1 -0
- package/dist/lib/linx-pi-normalized-event-stream.js +41 -0
- package/dist/lib/linx-pi-normalized-event-stream.js.map +1 -0
- package/dist/lib/linx-pi-resume-cli-admission.js +21 -0
- package/dist/lib/linx-pi-resume-cli-admission.js.map +1 -0
- package/dist/lib/linx-pi-runtime-execution.js +67 -0
- package/dist/lib/linx-pi-runtime-execution.js.map +1 -0
- package/dist/lib/linx-pi-startup-control.js +49 -0
- package/dist/lib/linx-pi-startup-control.js.map +1 -0
- package/dist/lib/linx-pi-startup-plan.js +103 -0
- package/dist/lib/linx-pi-startup-plan.js.map +1 -0
- package/dist/lib/linx-pi-stream-errors.js +10 -0
- package/dist/lib/linx-pi-stream-errors.js.map +1 -0
- package/dist/lib/linx-pod-backed-extension-ui.js +29 -0
- package/dist/lib/linx-pod-backed-extension-ui.js.map +1 -0
- package/dist/lib/linx-pod-data-session-factory.js +19 -0
- package/dist/lib/linx-pod-data-session-factory.js.map +1 -0
- package/dist/lib/linx-pod-mirror-runtime-host.js +50 -0
- package/dist/lib/linx-pod-mirror-runtime-host.js.map +1 -0
- package/dist/lib/linx-pod-mirror-sync-cli-admission.js +18 -0
- package/dist/lib/linx-pod-mirror-sync-cli-admission.js.map +1 -0
- package/dist/lib/linx-pod-mirror-sync-command.js +30 -0
- package/dist/lib/linx-pod-mirror-sync-command.js.map +1 -0
- package/dist/lib/{pi-adapter/sync-recovery.js → linx-pod-mirror-sync-recovery.js} +13 -13
- package/dist/lib/linx-pod-mirror-sync-recovery.js.map +1 -0
- package/dist/lib/{pi-adapter/pod-mirror.js → linx-pod-mirror.js} +63 -40
- package/dist/lib/linx-pod-mirror.js.map +1 -0
- package/dist/lib/linx-restored-auto-startup.js +21 -0
- package/dist/lib/linx-restored-auto-startup.js.map +1 -0
- package/dist/lib/linx-resume-output.js +209 -0
- package/dist/lib/linx-resume-output.js.map +1 -0
- package/dist/lib/linx-retired-command.js +22 -0
- package/dist/lib/linx-retired-command.js.map +1 -0
- package/dist/lib/linx-rewind-command.js +209 -0
- package/dist/lib/linx-rewind-command.js.map +1 -0
- package/dist/lib/linx-runtime-adapter-contract.js +2 -0
- package/dist/lib/linx-runtime-adapter-contract.js.map +1 -0
- package/dist/lib/linx-runtime-adapter-defaults.js +17 -0
- package/dist/lib/linx-runtime-adapter-defaults.js.map +1 -0
- package/dist/lib/linx-runtime-adapter-dependencies.js +2 -0
- package/dist/lib/linx-runtime-adapter-dependencies.js.map +1 -0
- package/dist/lib/linx-runtime-agent-session.js +130 -0
- package/dist/lib/linx-runtime-agent-session.js.map +1 -0
- package/dist/lib/linx-runtime-auth.js +5 -0
- package/dist/lib/linx-runtime-auth.js.map +1 -0
- package/dist/lib/linx-runtime-backend-composition.js +73 -0
- package/dist/lib/linx-runtime-backend-composition.js.map +1 -0
- package/dist/lib/linx-runtime-coding-tools.js +58 -0
- package/dist/lib/linx-runtime-coding-tools.js.map +1 -0
- package/dist/lib/linx-runtime-completion-backend.js +27 -0
- package/dist/lib/linx-runtime-completion-backend.js.map +1 -0
- package/dist/lib/linx-runtime-oauth-provider.js +57 -0
- package/dist/lib/linx-runtime-oauth-provider.js.map +1 -0
- package/dist/lib/linx-runtime-provider-registration.js +33 -0
- package/dist/lib/linx-runtime-provider-registration.js.map +1 -0
- package/dist/lib/linx-runtime-resources.js +167 -0
- package/dist/lib/linx-runtime-resources.js.map +1 -0
- package/dist/lib/linx-runtime-system-prompt.js +27 -0
- package/dist/lib/linx-runtime-system-prompt.js.map +1 -0
- package/dist/lib/linx-runtime-thinking.js +21 -0
- package/dist/lib/linx-runtime-thinking.js.map +1 -0
- package/dist/lib/linx-selector-choice.js +38 -0
- package/dist/lib/linx-selector-choice.js.map +1 -0
- package/dist/lib/linx-self-update.js +113 -0
- package/dist/lib/linx-self-update.js.map +1 -0
- package/dist/lib/linx-session-command-routing-host.js +24 -0
- package/dist/lib/linx-session-command-routing-host.js.map +1 -0
- package/dist/lib/linx-session-command-routing.js +68 -0
- package/dist/lib/linx-session-command-routing.js.map +1 -0
- package/dist/lib/linx-session-cwd-router.js +15 -0
- package/dist/lib/linx-session-cwd-router.js.map +1 -0
- package/dist/lib/linx-session-history.js +388 -0
- package/dist/lib/linx-session-history.js.map +1 -0
- package/dist/lib/{pi-adapter/session.js → linx-session-manager.js} +94 -46
- package/dist/lib/linx-session-manager.js.map +1 -0
- package/dist/lib/linx-session-metadata.js +55 -0
- package/dist/lib/linx-session-metadata.js.map +1 -0
- package/dist/lib/linx-session-selector-ui.js +32 -0
- package/dist/lib/linx-session-selector-ui.js.map +1 -0
- package/dist/lib/linx-session-thinking-capability-router.js +55 -0
- package/dist/lib/linx-session-thinking-capability-router.js.map +1 -0
- package/dist/lib/linx-session-work-control.js +163 -0
- package/dist/lib/linx-session-work-control.js.map +1 -0
- package/dist/lib/linx-shell-command-executor.js +41 -0
- package/dist/lib/linx-shell-command-executor.js.map +1 -0
- package/dist/lib/linx-shell-command-router.js +151 -0
- package/dist/lib/linx-shell-command-router.js.map +1 -0
- package/dist/lib/{pi-adapter/control-state.js → linx-startup-control-state.js} +6 -6
- package/dist/lib/linx-startup-control-state.js.map +1 -0
- package/dist/lib/linx-startup-login-policy.js +48 -0
- package/dist/lib/linx-startup-login-policy.js.map +1 -0
- package/dist/lib/linx-status-line-command.js +382 -0
- package/dist/lib/linx-status-line-command.js.map +1 -0
- package/dist/lib/{status-line-command.js → linx-status-line-config-command.js} +2 -12
- package/dist/lib/linx-status-line-config-command.js.map +1 -0
- package/dist/lib/linx-status-line.js +12 -4
- package/dist/lib/linx-status-line.js.map +1 -1
- package/dist/lib/linx-stream-abort.js +12 -0
- package/dist/lib/linx-stream-abort.js.map +1 -0
- package/dist/lib/linx-stream-error-formatting.js +54 -0
- package/dist/lib/linx-stream-error-formatting.js.map +1 -0
- package/dist/lib/linx-submitted-user-message-recording.js +16 -0
- package/dist/lib/linx-submitted-user-message-recording.js.map +1 -0
- package/dist/lib/linx-symphony-interactive-command.js +493 -0
- package/dist/lib/linx-symphony-interactive-command.js.map +1 -0
- package/dist/lib/linx-terminal-title-router.js +49 -0
- package/dist/lib/linx-terminal-title-router.js.map +1 -0
- package/dist/lib/{pi-adapter/theme.js → linx-theme.js} +2 -2
- package/dist/lib/linx-theme.js.map +1 -0
- package/dist/lib/linx-top-level-command-admission.js +27 -0
- package/dist/lib/linx-top-level-command-admission.js.map +1 -0
- package/dist/lib/linx-update-notification.js +176 -0
- package/dist/lib/linx-update-notification.js.map +1 -0
- package/dist/lib/linx-welcome-header.js +148 -0
- package/dist/lib/linx-welcome-header.js.map +1 -0
- package/dist/lib/linx-workspace-command.js +45 -0
- package/dist/lib/linx-workspace-command.js.map +1 -0
- package/dist/lib/native-backend-command-router.js +25 -0
- package/dist/lib/native-backend-command-router.js.map +1 -0
- package/dist/lib/native-backend-proxy.js +2 -0
- package/dist/lib/native-backend-proxy.js.map +1 -0
- package/dist/lib/native-backend-stream-backend.js +15 -0
- package/dist/lib/native-backend-stream-backend.js.map +1 -0
- package/dist/lib/oidc-auth.js +2 -4
- package/dist/lib/oidc-auth.js.map +1 -1
- package/dist/lib/pi-adapter/runtime.js +32 -841
- package/dist/lib/pi-adapter/runtime.js.map +1 -1
- package/dist/lib/pi-adapter/stream.js +17 -516
- package/dist/lib/pi-adapter/stream.js.map +1 -1
- package/dist/lib/{pi-adapter/pod-approval.js → pod-backed-extension-ui-context.js} +2 -2
- package/dist/lib/pod-backed-extension-ui-context.js.map +1 -0
- package/dist/lib/pod-chat-store-runtime.js +38 -0
- package/dist/lib/pod-chat-store-runtime.js.map +1 -0
- package/dist/lib/pod-chat-store.js +15 -65
- package/dist/lib/pod-chat-store.js.map +1 -1
- package/dist/lib/{pi-adapter/pod-mirror-mapping.js → pod-mirror-mapping.js} +8 -18
- package/dist/lib/pod-mirror-mapping.js.map +1 -0
- package/dist/lib/{pi-adapter/pod-native.js → pod-native.js} +1 -1
- package/dist/lib/pod-native.js.map +1 -0
- package/dist/lib/pod-status-output.js.map +1 -0
- package/dist/lib/{pi-adapter/auto-input-controller.js → secretary-auto-input-controller.js} +62 -77
- package/dist/lib/secretary-auto-input-controller.js.map +1 -0
- package/dist/lib/{pi-adapter/session-control.js → session-control.js} +80 -29
- package/dist/lib/session-control.js.map +1 -0
- package/dist/lib/shell-lifecycle.js +179 -0
- package/dist/lib/shell-lifecycle.js.map +1 -0
- package/dist/lib/solid-local-store.js +3 -3
- package/dist/lib/solid-local-store.js.map +1 -1
- package/dist/lib/symphony/pod-projection.js +1 -31
- package/dist/lib/symphony/pod-projection.js.map +1 -1
- package/dist/lib/{symphony-command.js → symphony/run.js} +11 -16
- package/dist/lib/symphony/run.js.map +1 -0
- package/dist/lib/symphony/runtime.js +30 -0
- package/dist/lib/symphony/runtime.js.map +1 -0
- package/dist/lib/symphony/status.js +242 -0
- package/dist/lib/symphony/status.js.map +1 -0
- package/dist/linx-cli-app.js +70 -0
- package/dist/linx-cli-app.js.map +1 -0
- package/dist/linx-cli-runtime-adapter-factory.js +12 -0
- package/dist/linx-cli-runtime-adapter-factory.js.map +1 -0
- package/dist/plugins/linx-symphony-codex/.codex-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/dist/lib/auto-mode/hooks/index.js.map +0 -1
- package/dist/lib/auto-mode/index.js +0 -10
- package/dist/lib/auto-mode/index.js.map +0 -1
- package/dist/lib/codex-plugin/index.js +0 -5
- package/dist/lib/codex-plugin/index.js.map +0 -1
- package/dist/lib/pi-adapter/auth.js +0 -68
- package/dist/lib/pi-adapter/auth.js.map +0 -1
- package/dist/lib/pi-adapter/auto-input-controller.js.map +0 -1
- package/dist/lib/pi-adapter/backend-command.js +0 -2
- package/dist/lib/pi-adapter/backend-command.js.map +0 -1
- package/dist/lib/pi-adapter/backend-credentials.js.map +0 -1
- package/dist/lib/pi-adapter/branding.js +0 -1188
- package/dist/lib/pi-adapter/branding.js.map +0 -1
- package/dist/lib/pi-adapter/control-state.js.map +0 -1
- package/dist/lib/pi-adapter/index.js +0 -4
- package/dist/lib/pi-adapter/index.js.map +0 -1
- package/dist/lib/pi-adapter/interactive.js +0 -3186
- package/dist/lib/pi-adapter/interactive.js.map +0 -1
- package/dist/lib/pi-adapter/pod-approval.js.map +0 -1
- package/dist/lib/pi-adapter/pod-mirror-mapping.js.map +0 -1
- package/dist/lib/pi-adapter/pod-mirror.js.map +0 -1
- package/dist/lib/pi-adapter/pod-native.js.map +0 -1
- package/dist/lib/pi-adapter/pod-status-output.js.map +0 -1
- package/dist/lib/pi-adapter/pod-tools.js +0 -140
- package/dist/lib/pi-adapter/pod-tools.js.map +0 -1
- package/dist/lib/pi-adapter/session-control.js.map +0 -1
- package/dist/lib/pi-adapter/session.js.map +0 -1
- package/dist/lib/pi-adapter/sync-recovery.js.map +0 -1
- package/dist/lib/pi-adapter/theme.js.map +0 -1
- package/dist/lib/pi-adapter/web-fetch.js +0 -170
- package/dist/lib/pi-adapter/web-fetch.js.map +0 -1
- package/dist/lib/status-line-command.js.map +0 -1
- package/dist/lib/symphony-command.js.map +0 -1
- /package/dist/lib/{pi-adapter/pod-status-output.js → pod-status-output.js} +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { handleInteractiveRewindSelector } from './linx-rewind-command.js';
|
|
2
|
+
import { showLinxInteractiveError } from './linx-interactive-error-display.js';
|
|
3
|
+
import { showLinxInteractiveStatus } from './linx-interactive-status-display.js';
|
|
4
|
+
import { getLinxInteractiveEditorText } from './linx-interactive-editor-text-host.js';
|
|
5
|
+
import { getLinxInteractiveDefaultEditorComponent } from './linx-editor-component-router.js';
|
|
6
|
+
import { getLinxInteractiveRuntime } from './linx-interactive-runtime-host.js';
|
|
7
|
+
import { isLinxInteractiveAutoModeEnabled } from './linx-interactive-shell-state.js';
|
|
8
|
+
import { stopLinxInteractiveSessionWorkNow } from './linx-session-work-control.js';
|
|
9
|
+
import { isClearInterruptInstalled, isEscapeInterruptInstalled, isEscapeInterruptWrapper, markClearInterruptInstalled, markEscapeInterruptInstalled, markEscapeInterruptWrapper, } from './linx-interrupt-control-host.js';
|
|
10
|
+
export function installLinxEscapeInterrupt(interactive, options = {}) {
|
|
11
|
+
const editor = getLinxInteractiveDefaultEditorComponent(interactive);
|
|
12
|
+
if (!editor || isEscapeInterruptInstalled(editor)) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const initialOnEscape = typeof editor.onEscape === 'function'
|
|
16
|
+
? editor.onEscape
|
|
17
|
+
: undefined;
|
|
18
|
+
let currentOnEscape = isEscapeInterruptWrapper(initialOnEscape)
|
|
19
|
+
? undefined
|
|
20
|
+
: initialOnEscape;
|
|
21
|
+
let lastIdleEscapeTime = 0;
|
|
22
|
+
const linxEscapeInterrupt = function linxEscapeInterrupt() {
|
|
23
|
+
if (handBackAutoControlOnInterrupt(interactive, options)) {
|
|
24
|
+
lastIdleEscapeTime = 0;
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (stopLinxInteractiveSessionWorkNow(interactive)) {
|
|
28
|
+
lastIdleEscapeTime = 0;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (shouldHandleLinxIdleDoubleEscape(interactive)) {
|
|
32
|
+
const now = Date.now();
|
|
33
|
+
if (now - lastIdleEscapeTime < 500) {
|
|
34
|
+
lastIdleEscapeTime = 0;
|
|
35
|
+
void openInteractiveRewindFromEscape(interactive);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
lastIdleEscapeTime = now;
|
|
39
|
+
showLinxInteractiveStatus(interactive, 'Press Escape again to rewind this session.');
|
|
40
|
+
}
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
lastIdleEscapeTime = 0;
|
|
44
|
+
currentOnEscape?.call(editor);
|
|
45
|
+
};
|
|
46
|
+
markEscapeInterruptWrapper(linxEscapeInterrupt);
|
|
47
|
+
Object.defineProperty(editor, 'onEscape', {
|
|
48
|
+
configurable: true,
|
|
49
|
+
get() {
|
|
50
|
+
return linxEscapeInterrupt;
|
|
51
|
+
},
|
|
52
|
+
set(next) {
|
|
53
|
+
if (isEscapeInterruptWrapper(next)) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
currentOnEscape = typeof next === 'function' ? next : undefined;
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
installLinxClearInterrupt(interactive, editor, options);
|
|
60
|
+
markEscapeInterruptInstalled(editor);
|
|
61
|
+
}
|
|
62
|
+
function shouldHandleLinxIdleDoubleEscape(interactive) {
|
|
63
|
+
const text = getLinxInteractiveEditorText(interactive);
|
|
64
|
+
return typeof text === 'string' && text.trim().length === 0;
|
|
65
|
+
}
|
|
66
|
+
async function openInteractiveRewindFromEscape(interactive) {
|
|
67
|
+
try {
|
|
68
|
+
await handleInteractiveRewindSelector(interactive, getLinxInteractiveRuntime(interactive));
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
showLinxInteractiveError(interactive, error instanceof Error ? error.message : String(error));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function installLinxClearInterrupt(interactive, editor, options) {
|
|
75
|
+
const handlers = editor?.actionHandlers;
|
|
76
|
+
if (!(handlers instanceof Map) || isClearInterruptInstalled(editor)) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const originalClear = handlers.get('app.clear');
|
|
80
|
+
handlers.set('app.clear', () => {
|
|
81
|
+
if (handBackAutoControlOnInterrupt(interactive, options)) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
originalClear?.call(editor);
|
|
85
|
+
});
|
|
86
|
+
markClearInterruptInstalled(editor);
|
|
87
|
+
}
|
|
88
|
+
function handBackAutoControlOnInterrupt(interactive, options) {
|
|
89
|
+
if (!isLinxInteractiveAutoModeEnabled(interactive, getLinxInteractiveRuntime(interactive))) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
stopLinxInteractiveSessionWorkNow(interactive);
|
|
93
|
+
void options.disableAutoMode?.(interactive);
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=linx-interrupt-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linx-interrupt-control.js","sourceRoot":"","sources":["../../src/lib/linx-interrupt-control.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
import { clearAccountSession } from './account-session.js';
|
|
2
|
+
import { clearCredentials } from './credentials-store.js';
|
|
3
|
+
import { clearOidcSessionStorage } from './oidc-session-storage.js';
|
|
4
|
+
import { persistSolidClientCredentialsLogin } from './solid-client-credentials-login.js';
|
|
5
|
+
import { LINX_RUNTIME_MANAGED_AUTH_KEY } from './linx-runtime-auth.js';
|
|
6
|
+
import { formatLinxCliErrorMessage, isLinxCloudAuthExpiredMessage } from './linx-cloud-errors.js';
|
|
7
|
+
import { normalizeSelectorChoice } from './linx-selector-choice.js';
|
|
8
|
+
import { openExternalUrl } from './linx-external-url.js';
|
|
9
|
+
import { clearLinxInteractiveRuntimeAuthPromptOnStart, resolveLinxInteractiveRuntimeProviderLabel, } from './linx-interactive-runtime-host.js';
|
|
10
|
+
import { registerLinxInteractiveSubmitHandler } from './linx-interactive-submit-router.js';
|
|
11
|
+
import { registerLinxInteractiveLoginDialogHandler, registerLinxInteractiveOAuthSelectorHandler, } from './linx-interactive-login-ui-router.js';
|
|
12
|
+
import { registerLinxInteractiveErrorHandler, registerLinxInteractiveEventHandler, } from './linx-interactive-event-router.js';
|
|
13
|
+
import { showLinxInteractiveError } from './linx-interactive-error-display.js';
|
|
14
|
+
import { showLinxInteractiveStatus } from './linx-interactive-status-display.js';
|
|
15
|
+
import { refreshLinxInteractiveProviderCount } from './linx-interactive-provider-count-host.js';
|
|
16
|
+
import { getLinxInteractiveAuthStorage, getLinxInteractiveLoginAuthStorage, refreshLinxInteractiveModelRegistry, } from './linx-interactive-model-registry-host.js';
|
|
17
|
+
import { canCollectLinxInteractiveExtensionInput, collectLinxInteractiveExtensionInput, } from './linx-interactive-extension-input-host.js';
|
|
18
|
+
import { canChooseLinxInteractiveExtensionSelectorOption, chooseLinxInteractiveExtensionSelectorOption, } from './linx-interactive-extension-selector-host.js';
|
|
19
|
+
import { clearLinxInteractiveStreamingMessage } from './linx-interactive-streaming-message-host.js';
|
|
20
|
+
import { appendLinxInteractiveChatText } from './linx-interactive-chat-text-host.js';
|
|
21
|
+
import { setLinxInteractiveEditorText } from './linx-interactive-editor-text-host.js';
|
|
22
|
+
import { getLinxInteractiveAuthState } from './linx-interactive-auth-state-host.js';
|
|
23
|
+
import { isLinxInteractiveInitialized } from './linx-interactive-lifecycle-host.js';
|
|
24
|
+
import { stopInteractiveShellUnlessRestarting } from './shell-lifecycle.js';
|
|
25
|
+
import { canMountLinxEditorComponent, createLinxLoginDialogComponent, mountLinxEditorComponent, } from './linx-editor-component-router.js';
|
|
26
|
+
import { captureLinxSessionRetryTurn, restoreLinxSessionHistoryBranch, } from './linx-session-history.js';
|
|
27
|
+
import { retryLinxInteractiveSessionTurn } from './linx-session-work-control.js';
|
|
28
|
+
const LINX_PROVIDER_ID = 'undefineds';
|
|
29
|
+
const linxLoginFlowOptions = new WeakMap();
|
|
30
|
+
const AUTH_OPTION_BROWSER = 'Authorize in browser';
|
|
31
|
+
const AUTH_OPTION_CLIENT_CREDENTIALS = 'Enter Solid client credentials';
|
|
32
|
+
const AUTH_OPTION_EXIT = 'Exit';
|
|
33
|
+
export function installLinxLoginFlow(interactive, options = {}) {
|
|
34
|
+
rememberLinxLoginFlowOptions(interactive, options);
|
|
35
|
+
patchNativeOAuthSelectors(interactive, options);
|
|
36
|
+
patchLoginCommand(interactive, options);
|
|
37
|
+
patchAuthExpiredSessionEvents(interactive, options);
|
|
38
|
+
patchAuthExpiredLoginPrompt(interactive, options);
|
|
39
|
+
}
|
|
40
|
+
export function shouldDeferLinxCloudLogin(interactive) {
|
|
41
|
+
const authState = getLinxInteractiveAuthState(interactive);
|
|
42
|
+
return Boolean(authState.loginInProgress
|
|
43
|
+
|| authState.loginOnInit
|
|
44
|
+
|| authState.pendingRetry
|
|
45
|
+
|| authState.loginScheduled);
|
|
46
|
+
}
|
|
47
|
+
export function requestLinxCloudLogin(interactive, reason = 'manual', options = {}) {
|
|
48
|
+
rememberLinxLoginFlowOptions(interactive, options);
|
|
49
|
+
if (!isLinxInteractiveInitialized(interactive)) {
|
|
50
|
+
getLinxInteractiveAuthState(interactive).loginOnInit = reason;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
void startLinxCloudLogin(interactive, { reason }, options);
|
|
54
|
+
}
|
|
55
|
+
export function startPendingLinxCloudLoginAfterInit(interactive) {
|
|
56
|
+
const authState = getLinxInteractiveAuthState(interactive);
|
|
57
|
+
if (!authState.loginOnInit) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const reason = typeof authState.loginOnInit === 'string'
|
|
61
|
+
? authState.loginOnInit
|
|
62
|
+
: 'startup';
|
|
63
|
+
authState.loginOnInit = false;
|
|
64
|
+
const options = getLinxLoginFlowOptions(interactive);
|
|
65
|
+
queueMicrotask(() => startLinxCloudLogin(interactive, { reason }, options));
|
|
66
|
+
}
|
|
67
|
+
function rememberLinxLoginFlowOptions(interactive, options) {
|
|
68
|
+
if (interactive && typeof interactive === 'object') {
|
|
69
|
+
linxLoginFlowOptions.set(interactive, options);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function getLinxLoginFlowOptions(interactive) {
|
|
73
|
+
if (!interactive || typeof interactive !== 'object') {
|
|
74
|
+
return {};
|
|
75
|
+
}
|
|
76
|
+
return linxLoginFlowOptions.get(interactive) ?? {};
|
|
77
|
+
}
|
|
78
|
+
function patchLoginCommand(interactive, options) {
|
|
79
|
+
registerLinxInteractiveSubmitHandler(interactive, {
|
|
80
|
+
name: 'linx-login',
|
|
81
|
+
priority: 10,
|
|
82
|
+
async handler({ interactive: target, input }) {
|
|
83
|
+
if (input !== '/login') {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
setLinxInteractiveEditorText(target, '');
|
|
87
|
+
await startLinxCloudLogin(target, {}, options);
|
|
88
|
+
return true;
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function patchNativeOAuthSelectors(interactive, options) {
|
|
93
|
+
registerLinxInteractiveOAuthSelectorHandler(interactive, {
|
|
94
|
+
name: 'linx-login-flow:oauth-selector',
|
|
95
|
+
priority: 0,
|
|
96
|
+
async handler({ interactive: target, mode }) {
|
|
97
|
+
if (mode === 'logout') {
|
|
98
|
+
const authStorage = getLinxInteractiveAuthStorage(target);
|
|
99
|
+
authStorage?.logout?.(LINX_PROVIDER_ID);
|
|
100
|
+
authStorage?.setRuntimeApiKey?.(LINX_PROVIDER_ID, '');
|
|
101
|
+
clearAccountSession();
|
|
102
|
+
clearCredentials();
|
|
103
|
+
clearOidcSessionStorage();
|
|
104
|
+
await refreshLinxAuthState(target);
|
|
105
|
+
showLinxInteractiveStatus(target, 'Logged out of LinX Cloud.');
|
|
106
|
+
return { handled: true };
|
|
107
|
+
}
|
|
108
|
+
await startLinxCloudLogin(target, { reason: 'manual' }, options);
|
|
109
|
+
return { handled: true };
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
registerLinxInteractiveLoginDialogHandler(interactive, {
|
|
113
|
+
name: 'linx-login-flow:login-dialog',
|
|
114
|
+
priority: 0,
|
|
115
|
+
async handler({ interactive: target, providerId }) {
|
|
116
|
+
if (!providerId || providerId === LINX_PROVIDER_ID) {
|
|
117
|
+
await startLinxCloudLogin(target, { reason: 'manual' }, options);
|
|
118
|
+
return { handled: true };
|
|
119
|
+
}
|
|
120
|
+
showLinxInteractiveStatus(target, 'LinX only supports LinX Cloud authentication in this TUI.');
|
|
121
|
+
await startLinxCloudLogin(target, { reason: 'manual' }, options);
|
|
122
|
+
return { handled: true };
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function patchAuthExpiredSessionEvents(interactive, options) {
|
|
127
|
+
registerLinxInteractiveEventHandler(interactive, {
|
|
128
|
+
name: 'linx-login-flow:auth-expired-event',
|
|
129
|
+
priority: 0,
|
|
130
|
+
handler({ interactive: target, event }) {
|
|
131
|
+
const normalizedEvent = normalizeLinxCliErrorEvent(event);
|
|
132
|
+
if (eventHasLinxAuthExpiredError(normalizedEvent)) {
|
|
133
|
+
showLinxAuthExpiredRecoveryNotice(target);
|
|
134
|
+
prepareLinxAuthExpiredRetry(target);
|
|
135
|
+
suppressLinxAuthExpiredAssistantError(target);
|
|
136
|
+
scheduleLinxCloudLogin(target, 'expired', options);
|
|
137
|
+
return { handled: true };
|
|
138
|
+
}
|
|
139
|
+
return { handled: false, event: normalizedEvent };
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function patchAuthExpiredLoginPrompt(interactive, options) {
|
|
144
|
+
registerLinxInteractiveErrorHandler(interactive, {
|
|
145
|
+
name: 'linx-login-flow:auth-expired-error',
|
|
146
|
+
priority: 0,
|
|
147
|
+
handler({ interactive: target, errorMessage }) {
|
|
148
|
+
const text = typeof errorMessage === 'string' ? errorMessage : String(errorMessage);
|
|
149
|
+
if (getLinxInteractiveAuthState(target).reportingError || !isLinxAuthExpiredError(text)) {
|
|
150
|
+
return { handled: false, errorMessage: formatLinxCliErrorMessage(errorMessage) };
|
|
151
|
+
}
|
|
152
|
+
showLinxAuthExpiredRecoveryNotice(target);
|
|
153
|
+
prepareLinxAuthExpiredRetry(target);
|
|
154
|
+
scheduleLinxCloudLogin(target, 'expired', options);
|
|
155
|
+
return { handled: true };
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function isLinxAuthExpiredError(text) {
|
|
160
|
+
return isLinxCloudAuthExpiredMessage(text);
|
|
161
|
+
}
|
|
162
|
+
function eventHasLinxAuthExpiredError(event) {
|
|
163
|
+
if (!isRecord(event)) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
const message = isRecord(event.message) ? event.message : undefined;
|
|
167
|
+
const topLevelErrorMessage = typeof event.errorMessage === 'string' ? event.errorMessage : '';
|
|
168
|
+
const errorMessage = typeof message?.errorMessage === 'string' ? message.errorMessage : '';
|
|
169
|
+
const error = isRecord(event.error) ? event.error : undefined;
|
|
170
|
+
const nestedErrorMessage = typeof error?.errorMessage === 'string' ? error.errorMessage : '';
|
|
171
|
+
return isLinxAuthExpiredError(`${topLevelErrorMessage}\n${errorMessage}\n${nestedErrorMessage}`);
|
|
172
|
+
}
|
|
173
|
+
function normalizeLinxCliErrorEvent(event) {
|
|
174
|
+
if (typeof event === 'string') {
|
|
175
|
+
const normalized = formatLinxCliErrorMessage(event);
|
|
176
|
+
return normalized === event ? event : normalized;
|
|
177
|
+
}
|
|
178
|
+
if (Array.isArray(event)) {
|
|
179
|
+
let changed = false;
|
|
180
|
+
const next = event.map((item) => {
|
|
181
|
+
const normalized = normalizeLinxCliErrorEvent(item);
|
|
182
|
+
if (normalized !== item) {
|
|
183
|
+
changed = true;
|
|
184
|
+
}
|
|
185
|
+
return normalized;
|
|
186
|
+
});
|
|
187
|
+
return changed ? next : event;
|
|
188
|
+
}
|
|
189
|
+
if (!isRecord(event)) {
|
|
190
|
+
return event;
|
|
191
|
+
}
|
|
192
|
+
let changed = false;
|
|
193
|
+
const next = {};
|
|
194
|
+
for (const [key, value] of Object.entries(event)) {
|
|
195
|
+
const normalized = normalizeLinxCliErrorEvent(value);
|
|
196
|
+
next[key] = normalized;
|
|
197
|
+
if (normalized !== value) {
|
|
198
|
+
changed = true;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return changed ? { ...event, ...next } : event;
|
|
202
|
+
}
|
|
203
|
+
function showLinxAuthExpiredRecoveryNotice(interactive) {
|
|
204
|
+
showLinxInteractiveStatus(interactive, [
|
|
205
|
+
'LinX Cloud login expired.',
|
|
206
|
+
'Your message reached LinX, but the Cloud token was rejected.',
|
|
207
|
+
'Choose a sign-in method below, or run /login if the selector is not visible.',
|
|
208
|
+
].join('\n'));
|
|
209
|
+
}
|
|
210
|
+
async function startLinxCloudLogin(interactive, loginOptions = {}, options = {}) {
|
|
211
|
+
const authState = getLinxInteractiveAuthState(interactive);
|
|
212
|
+
if (authState.loginInProgress) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
authState.loginInProgress = true;
|
|
216
|
+
try {
|
|
217
|
+
const authStorage = getLinxInteractiveAuthStorage(interactive);
|
|
218
|
+
if (!authStorage) {
|
|
219
|
+
prefillLoginCommand(interactive);
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
const reason = loginOptions.reason ?? 'manual';
|
|
223
|
+
const selected = await selectLinxAuthMethod(interactive, reason, options);
|
|
224
|
+
if (!selected) {
|
|
225
|
+
showLinxInteractiveStatus(interactive, 'LinX Cloud authorization cancelled.');
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (selected === AUTH_OPTION_BROWSER) {
|
|
229
|
+
const loginAuthStorage = getLinxInteractiveLoginAuthStorage(interactive);
|
|
230
|
+
if (!loginAuthStorage) {
|
|
231
|
+
prefillLoginCommand(interactive);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
await runLinxCloudBrowserLogin(interactive, loginAuthStorage, reason);
|
|
235
|
+
await refreshLinxAuthState(interactive);
|
|
236
|
+
await finishLinxAuthSuccess(interactive, reason, 'Browser authorization complete.');
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if (selected === AUTH_OPTION_CLIENT_CREDENTIALS) {
|
|
240
|
+
await promptForLinxClientCredentials(interactive, reason, options);
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
if (selected === AUTH_OPTION_EXIT) {
|
|
244
|
+
if (reason === 'startup') {
|
|
245
|
+
stopInteractiveShellUnlessRestarting(interactive);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
showLinxInteractiveStatus(interactive, 'LinX Cloud authorization cancelled.');
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
254
|
+
reportLinxLoginError(interactive, message);
|
|
255
|
+
}
|
|
256
|
+
finally {
|
|
257
|
+
authState.loginInProgress = false;
|
|
258
|
+
options.onLoginSettled?.(interactive);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
function scheduleLinxCloudLogin(interactive, reason, options) {
|
|
262
|
+
const authState = getLinxInteractiveAuthState(interactive);
|
|
263
|
+
if (authState.loginInProgress || authState.loginScheduled) {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
authState.loginScheduled = true;
|
|
267
|
+
setTimeout(() => {
|
|
268
|
+
getLinxInteractiveAuthState(interactive).loginScheduled = false;
|
|
269
|
+
void startLinxCloudLogin(interactive, { reason }, options);
|
|
270
|
+
}, 0);
|
|
271
|
+
}
|
|
272
|
+
function reportLinxLoginError(interactive, message) {
|
|
273
|
+
const authState = getLinxInteractiveAuthState(interactive);
|
|
274
|
+
const rendered = normalizeLinxLoginError(message);
|
|
275
|
+
if (authState.reportingError) {
|
|
276
|
+
showLinxInteractiveStatus(interactive, rendered);
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
authState.reportingError = true;
|
|
280
|
+
try {
|
|
281
|
+
showLinxInteractiveError(interactive, rendered);
|
|
282
|
+
}
|
|
283
|
+
finally {
|
|
284
|
+
authState.reportingError = false;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function normalizeLinxLoginError(message) {
|
|
288
|
+
const oidcCallbackError = /^OIDC callback returned\b/i.test(message);
|
|
289
|
+
if (oidcCallbackError) {
|
|
290
|
+
return `LinX Cloud login failed: ${message}`;
|
|
291
|
+
}
|
|
292
|
+
if (/server_error/i.test(message)) {
|
|
293
|
+
return `LinX Cloud login failed: the identity server rejected this browser login. ${message}`;
|
|
294
|
+
}
|
|
295
|
+
return `LinX Cloud login failed: ${message}`;
|
|
296
|
+
}
|
|
297
|
+
async function selectLinxAuthMethod(interactive, reason, flowOptions) {
|
|
298
|
+
const title = buildLinxAuthPromptTitle(reason, resolveProviderLabel(interactive, flowOptions));
|
|
299
|
+
const options = [AUTH_OPTION_BROWSER, AUTH_OPTION_CLIENT_CREDENTIALS, AUTH_OPTION_EXIT];
|
|
300
|
+
if (canChooseLinxInteractiveExtensionSelectorOption(interactive)) {
|
|
301
|
+
const choice = await chooseLinxInteractiveExtensionSelectorOption(interactive, title, options);
|
|
302
|
+
return normalizeSelectorChoice(choice, options);
|
|
303
|
+
}
|
|
304
|
+
showLinxAuthFallback(interactive, title, options);
|
|
305
|
+
return undefined;
|
|
306
|
+
}
|
|
307
|
+
function buildLinxAuthPromptTitle(reason, providerLabel) {
|
|
308
|
+
if (reason === 'startup') {
|
|
309
|
+
return [
|
|
310
|
+
'LinX Cloud login required',
|
|
311
|
+
`Connect to ${providerLabel} before using LinX TUI.`,
|
|
312
|
+
'Choose a sign-in method.',
|
|
313
|
+
].join('\n');
|
|
314
|
+
}
|
|
315
|
+
if (reason === 'expired') {
|
|
316
|
+
return [
|
|
317
|
+
'LinX Cloud login expired',
|
|
318
|
+
'Your current Solid token was rejected by LinX Cloud.',
|
|
319
|
+
'Re-authorize or enter Solid client credentials, then retry your message.',
|
|
320
|
+
].join('\n');
|
|
321
|
+
}
|
|
322
|
+
return [
|
|
323
|
+
'LinX Cloud authorization',
|
|
324
|
+
`Choose how LinX should authenticate with ${providerLabel}.`,
|
|
325
|
+
].join('\n');
|
|
326
|
+
}
|
|
327
|
+
function showLinxAuthFallback(interactive, title, options) {
|
|
328
|
+
appendLinxInteractiveChatText(interactive, [
|
|
329
|
+
`\x1b[1m${title}\x1b[22m`,
|
|
330
|
+
'',
|
|
331
|
+
...options.map((option) => `- ${option}`),
|
|
332
|
+
'',
|
|
333
|
+
'This terminal build cannot render the LinX auth selector. Run `linx login` in another shell.',
|
|
334
|
+
].join('\n'));
|
|
335
|
+
}
|
|
336
|
+
async function promptForLinxClientCredentials(interactive, reason, options) {
|
|
337
|
+
if (!canCollectLinxInteractiveExtensionInput(interactive)) {
|
|
338
|
+
showLinxInteractiveError(interactive, 'This terminal build cannot collect Solid client credentials inside the TUI.');
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
const credentials = await collectLinxInteractiveExtensionInput(interactive, [
|
|
342
|
+
reason === 'expired' ? 'Enter Solid client credentials' : 'Use Solid client credentials',
|
|
343
|
+
'This is only for Solid/LinX identity. AI provider keys belong in `linx ai connect`.',
|
|
344
|
+
'Format: client_id:client_secret',
|
|
345
|
+
'Press Escape to cancel.',
|
|
346
|
+
].join('\n'), 'client_id:client_secret');
|
|
347
|
+
const trimmed = typeof credentials === 'string' ? credentials.trim() : '';
|
|
348
|
+
if (!trimmed) {
|
|
349
|
+
showLinxInteractiveStatus(interactive, 'Solid client credentials entry cancelled.');
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
const result = await resolveSolidClientCredentialsLogin(options)(trimmed);
|
|
353
|
+
const authStorage = getLinxInteractiveAuthStorage(interactive);
|
|
354
|
+
authStorage?.setRuntimeApiKey?.(LINX_PROVIDER_ID, LINX_RUNTIME_MANAGED_AUTH_KEY);
|
|
355
|
+
authStorage?.set?.(LINX_PROVIDER_ID, {
|
|
356
|
+
type: 'api_key',
|
|
357
|
+
key: LINX_RUNTIME_MANAGED_AUTH_KEY,
|
|
358
|
+
webId: result.webId,
|
|
359
|
+
podUrl: result.podUrl,
|
|
360
|
+
});
|
|
361
|
+
await refreshLinxAuthState(interactive);
|
|
362
|
+
await finishLinxAuthSuccess(interactive, reason, 'Solid client credentials saved to ~/.solid/auth.');
|
|
363
|
+
}
|
|
364
|
+
function resolveSolidClientCredentialsLogin(options) {
|
|
365
|
+
return options.persistSolidClientCredentialsLogin ?? persistSolidClientCredentialsLogin;
|
|
366
|
+
}
|
|
367
|
+
async function finishLinxAuthSuccess(interactive, reason, detail) {
|
|
368
|
+
const prefix = authStatusPrefix(reason);
|
|
369
|
+
const retryStarted = await retryPendingLinxAuthTurn(interactive, reason);
|
|
370
|
+
if (retryStarted) {
|
|
371
|
+
showLinxInteractiveStatus(interactive, `${prefix} ${detail} Retrying your message...`);
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
const suffix = reason === 'expired' ? ' Retry your message.' : '';
|
|
375
|
+
showLinxInteractiveStatus(interactive, `${prefix} ${detail}${suffix}`);
|
|
376
|
+
}
|
|
377
|
+
function prepareLinxAuthExpiredRetry(interactive) {
|
|
378
|
+
const authState = getLinxInteractiveAuthState(interactive);
|
|
379
|
+
if (authState.pendingRetry) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
const pending = captureLinxSessionRetryTurn({ interactive });
|
|
383
|
+
authState.pendingRetry = pending;
|
|
384
|
+
// AgentSession persists the assistant error after TUI subscribers run. Restore
|
|
385
|
+
// the active branch on the next tick so "continue" never resumes from the
|
|
386
|
+
// failed auth assistant message if the user cancels or login fails.
|
|
387
|
+
setTimeout(() => {
|
|
388
|
+
if (getLinxInteractiveAuthState(interactive).pendingRetry === pending) {
|
|
389
|
+
restoreLinxSessionHistoryBranch({ interactive }, pending.continueFromId);
|
|
390
|
+
}
|
|
391
|
+
}, 0);
|
|
392
|
+
}
|
|
393
|
+
function suppressLinxAuthExpiredAssistantError(interactive) {
|
|
394
|
+
clearLinxInteractiveStreamingMessage(interactive);
|
|
395
|
+
}
|
|
396
|
+
async function retryPendingLinxAuthTurn(interactive, reason) {
|
|
397
|
+
if (reason !== 'expired') {
|
|
398
|
+
return false;
|
|
399
|
+
}
|
|
400
|
+
const authState = getLinxInteractiveAuthState(interactive);
|
|
401
|
+
const pending = authState.pendingRetry;
|
|
402
|
+
if (!pending) {
|
|
403
|
+
return false;
|
|
404
|
+
}
|
|
405
|
+
authState.pendingRetry = undefined;
|
|
406
|
+
return retryLinxInteractiveSessionTurn(interactive, pending, {
|
|
407
|
+
onRetryFailed(error) {
|
|
408
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
409
|
+
showLinxInteractiveError(interactive, `LinX Cloud retry failed: ${message}`);
|
|
410
|
+
},
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
export async function refreshLinxAuthState(interactive) {
|
|
414
|
+
clearLinxInteractiveRuntimeAuthPromptOnStart(interactive);
|
|
415
|
+
syncRuntimeCredential(interactive);
|
|
416
|
+
refreshLinxInteractiveModelRegistry(interactive);
|
|
417
|
+
await refreshLinxInteractiveProviderCount(interactive);
|
|
418
|
+
showLinxInteractiveStatus(interactive, null);
|
|
419
|
+
}
|
|
420
|
+
function authStatusPrefix(reason) {
|
|
421
|
+
if (reason === 'expired') {
|
|
422
|
+
return 'LinX Cloud login refreshed.';
|
|
423
|
+
}
|
|
424
|
+
if (reason === 'startup') {
|
|
425
|
+
return 'LinX Cloud connected.';
|
|
426
|
+
}
|
|
427
|
+
return 'LinX Cloud authorization updated.';
|
|
428
|
+
}
|
|
429
|
+
async function runLinxCloudLogin(interactive, authStorage, reason) {
|
|
430
|
+
await authStorage.login(LINX_PROVIDER_ID, {
|
|
431
|
+
forceFresh: true,
|
|
432
|
+
onAuth(info) {
|
|
433
|
+
showLinxLoginUrl(interactive, info);
|
|
434
|
+
openLoginUrl(info.url, interactive);
|
|
435
|
+
if (info.instructions) {
|
|
436
|
+
showLinxInteractiveStatus(interactive, info.instructions);
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
onProgress(message) {
|
|
440
|
+
showLinxInteractiveStatus(interactive, message);
|
|
441
|
+
},
|
|
442
|
+
onManualCodeInput(signal) {
|
|
443
|
+
return promptForLinxManualRedirectUrl(interactive, signal);
|
|
444
|
+
},
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
async function runLinxCloudBrowserLogin(interactive, authStorage, reason) {
|
|
448
|
+
if (canRenderLinxLoginDialog(interactive)) {
|
|
449
|
+
await runLinxCloudLoginDialog(interactive, authStorage, reason);
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
await runLinxCloudLogin(interactive, authStorage, reason);
|
|
453
|
+
}
|
|
454
|
+
function canRenderLinxLoginDialog(interactive) {
|
|
455
|
+
return canMountLinxEditorComponent(interactive);
|
|
456
|
+
}
|
|
457
|
+
async function runLinxCloudLoginDialog(interactive, authStorage, reason) {
|
|
458
|
+
const dialog = createLinxLoginDialogComponent(interactive, LINX_PROVIDER_ID);
|
|
459
|
+
const restoreEditor = mountLinxEditorComponent(interactive, dialog);
|
|
460
|
+
let manualRedirectResolve;
|
|
461
|
+
let manualRedirectReject;
|
|
462
|
+
const manualRedirectPromise = new Promise((resolve, reject) => {
|
|
463
|
+
manualRedirectResolve = resolve;
|
|
464
|
+
manualRedirectReject = reject;
|
|
465
|
+
});
|
|
466
|
+
try {
|
|
467
|
+
await authStorage.login(LINX_PROVIDER_ID, {
|
|
468
|
+
forceFresh: true,
|
|
469
|
+
onAuth(info) {
|
|
470
|
+
dialog.showAuth(info.url, info.instructions);
|
|
471
|
+
dialog.showManualInput('Paste redirect URL below, or complete login in browser:')
|
|
472
|
+
.then((value) => {
|
|
473
|
+
if (value && manualRedirectResolve) {
|
|
474
|
+
manualRedirectResolve(value);
|
|
475
|
+
manualRedirectResolve = undefined;
|
|
476
|
+
manualRedirectReject = undefined;
|
|
477
|
+
}
|
|
478
|
+
})
|
|
479
|
+
.catch((error) => {
|
|
480
|
+
if (manualRedirectReject) {
|
|
481
|
+
manualRedirectReject(error);
|
|
482
|
+
manualRedirectResolve = undefined;
|
|
483
|
+
manualRedirectReject = undefined;
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
},
|
|
487
|
+
onProgress(message) {
|
|
488
|
+
dialog.showProgress(message);
|
|
489
|
+
},
|
|
490
|
+
onManualCodeInput(signal) {
|
|
491
|
+
return waitForLinxDialogManualRedirect(manualRedirectPromise, signal);
|
|
492
|
+
},
|
|
493
|
+
signal: dialog.signal,
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
finally {
|
|
497
|
+
restoreEditor();
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
function waitForLinxDialogManualRedirect(manualRedirectPromise, signal) {
|
|
501
|
+
if (!signal) {
|
|
502
|
+
return manualRedirectPromise;
|
|
503
|
+
}
|
|
504
|
+
if (signal.aborted) {
|
|
505
|
+
return Promise.resolve('');
|
|
506
|
+
}
|
|
507
|
+
return new Promise((resolve, reject) => {
|
|
508
|
+
const onAbort = () => resolve('');
|
|
509
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
510
|
+
manualRedirectPromise
|
|
511
|
+
.then((value) => {
|
|
512
|
+
signal.removeEventListener('abort', onAbort);
|
|
513
|
+
resolve(value);
|
|
514
|
+
})
|
|
515
|
+
.catch((error) => {
|
|
516
|
+
signal.removeEventListener('abort', onAbort);
|
|
517
|
+
reject(error);
|
|
518
|
+
});
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
async function promptForLinxManualRedirectUrl(interactive, signal) {
|
|
522
|
+
if (!canCollectLinxInteractiveExtensionInput(interactive)) {
|
|
523
|
+
throw new Error('Manual redirect paste is not available in this terminal. Run `linx login` in another shell if the browser callback is blocked.');
|
|
524
|
+
}
|
|
525
|
+
const redirect = await collectLinxInteractiveExtensionInput(interactive, [
|
|
526
|
+
'Paste final redirect URL',
|
|
527
|
+
'If the browser cannot return to this terminal, paste the full callback URL below.',
|
|
528
|
+
].join('\n'), 'http://127.0.0.1:PORT/auth/callback?code=...&state=...&iss=...', signal ? { signal } : undefined);
|
|
529
|
+
const trimmed = typeof redirect === 'string' ? redirect.trim() : '';
|
|
530
|
+
if (!trimmed) {
|
|
531
|
+
throw new Error('Login cancelled');
|
|
532
|
+
}
|
|
533
|
+
return trimmed;
|
|
534
|
+
}
|
|
535
|
+
function syncRuntimeCredential(interactive) {
|
|
536
|
+
const authStorage = getLinxInteractiveAuthStorage(interactive);
|
|
537
|
+
authStorage?.setRuntimeApiKey?.(LINX_PROVIDER_ID, LINX_RUNTIME_MANAGED_AUTH_KEY);
|
|
538
|
+
}
|
|
539
|
+
function showLinxLoginUrl(interactive, info) {
|
|
540
|
+
const lines = [
|
|
541
|
+
'\x1b[1mLinX Cloud authorization\x1b[22m',
|
|
542
|
+
'Complete consent in the browser, then return here.',
|
|
543
|
+
'',
|
|
544
|
+
`\x1b[36m${info.url}\x1b[39m`,
|
|
545
|
+
];
|
|
546
|
+
if (info.instructions) {
|
|
547
|
+
lines.push('', `\x1b[2m${info.instructions}\x1b[22m`);
|
|
548
|
+
}
|
|
549
|
+
appendLinxInteractiveChatText(interactive, lines.join('\n'));
|
|
550
|
+
}
|
|
551
|
+
function openLoginUrl(url, interactive) {
|
|
552
|
+
openExternalUrl(url, interactive);
|
|
553
|
+
}
|
|
554
|
+
function prefillLoginCommand(interactive) {
|
|
555
|
+
setLinxInteractiveEditorText(interactive, '/login', { focus: true, render: true });
|
|
556
|
+
}
|
|
557
|
+
function resolveProviderLabel(interactive, options) {
|
|
558
|
+
return options.resolveProviderLabel?.(interactive) ?? resolveLinxInteractiveRuntimeProviderLabel(interactive);
|
|
559
|
+
}
|
|
560
|
+
function isRecord(value) {
|
|
561
|
+
return typeof value === 'object' && value !== null;
|
|
562
|
+
}
|
|
563
|
+
function stripAnsi(text) {
|
|
564
|
+
return text.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, '');
|
|
565
|
+
}
|
|
566
|
+
//# sourceMappingURL=linx-login-flow.js.map
|