@kortix/sdk 0.9.98
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 +313 -0
- package/dist/files/client.d.ts +96 -0
- package/dist/files/client.d.ts.map +1 -0
- package/dist/files/client.js +346 -0
- package/dist/files/client.js.map +1 -0
- package/dist/files/types.d.ts +82 -0
- package/dist/files/types.d.ts.map +1 -0
- package/dist/files/types.js +6 -0
- package/dist/files/types.js.map +1 -0
- package/dist/index.d.ts +119 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +93 -0
- package/dist/index.js.map +1 -0
- package/dist/kortix.d.ts +897 -0
- package/dist/kortix.d.ts.map +1 -0
- package/dist/kortix.js +772 -0
- package/dist/kortix.js.map +1 -0
- package/dist/opencode/client.d.ts +89 -0
- package/dist/opencode/client.d.ts.map +1 -0
- package/dist/opencode/client.js +191 -0
- package/dist/opencode/client.js.map +1 -0
- package/dist/opencode/env.d.ts +13 -0
- package/dist/opencode/env.d.ts.map +1 -0
- package/dist/opencode/env.js +63 -0
- package/dist/opencode/env.js.map +1 -0
- package/dist/opencode/kortix-master.d.ts +487 -0
- package/dist/opencode/kortix-master.d.ts.map +1 -0
- package/dist/opencode/kortix-master.js +313 -0
- package/dist/opencode/kortix-master.js.map +1 -0
- package/dist/opencode/triggers.d.ts +6 -0
- package/dist/opencode/triggers.d.ts.map +1 -0
- package/dist/opencode/triggers.js +34 -0
- package/dist/opencode/triggers.js.map +1 -0
- package/dist/platform/api/errors.d.ts +106 -0
- package/dist/platform/api/errors.d.ts.map +1 -0
- package/dist/platform/api/errors.js +137 -0
- package/dist/platform/api/errors.js.map +1 -0
- package/dist/platform/api-client.d.ts +35 -0
- package/dist/platform/api-client.d.ts.map +1 -0
- package/dist/platform/api-client.js +279 -0
- package/dist/platform/api-client.js.map +1 -0
- package/dist/platform/auth-core.d.ts +60 -0
- package/dist/platform/auth-core.d.ts.map +1 -0
- package/dist/platform/auth-core.js +104 -0
- package/dist/platform/auth-core.js.map +1 -0
- package/dist/platform/auth.d.ts +88 -0
- package/dist/platform/auth.d.ts.map +1 -0
- package/dist/platform/auth.js +161 -0
- package/dist/platform/auth.js.map +1 -0
- package/dist/platform/config-node.d.ts +33 -0
- package/dist/platform/config-node.d.ts.map +1 -0
- package/dist/platform/config-node.js +63 -0
- package/dist/platform/config-node.js.map +1 -0
- package/dist/platform/config.d.ts +77 -0
- package/dist/platform/config.d.ts.map +1 -0
- package/dist/platform/config.js +62 -0
- package/dist/platform/config.js.map +1 -0
- package/dist/platform/feature-flags.d.ts +25 -0
- package/dist/platform/feature-flags.d.ts.map +1 -0
- package/dist/platform/feature-flags.js +114 -0
- package/dist/platform/feature-flags.js.map +1 -0
- package/dist/platform/fresh-sessions.d.ts +4 -0
- package/dist/platform/fresh-sessions.d.ts.map +1 -0
- package/dist/platform/fresh-sessions.js +22 -0
- package/dist/platform/fresh-sessions.js.map +1 -0
- package/dist/platform/instance-routes.d.ts +17 -0
- package/dist/platform/instance-routes.d.ts.map +1 -0
- package/dist/platform/instance-routes.js +105 -0
- package/dist/platform/instance-routes.js.map +1 -0
- package/dist/platform/logger.d.ts +20 -0
- package/dist/platform/logger.d.ts.map +1 -0
- package/dist/platform/logger.js +44 -0
- package/dist/platform/logger.js.map +1 -0
- package/dist/platform/opencode-errors.d.ts +20 -0
- package/dist/platform/opencode-errors.d.ts.map +1 -0
- package/dist/platform/opencode-errors.js +71 -0
- package/dist/platform/opencode-errors.js.map +1 -0
- package/dist/platform/platform-client/backups.d.ts +22 -0
- package/dist/platform/platform-client/backups.d.ts.map +1 -0
- package/dist/platform/platform-client/backups.js +16 -0
- package/dist/platform/platform-client/backups.js.map +1 -0
- package/dist/platform/platform-client/index.d.ts +21 -0
- package/dist/platform/platform-client/index.d.ts.map +1 -0
- package/dist/platform/platform-client/index.js +21 -0
- package/dist/platform/platform-client/index.js.map +1 -0
- package/dist/platform/platform-client/instance-admin.d.ts +67 -0
- package/dist/platform/platform-client/instance-admin.d.ts.map +1 -0
- package/dist/platform/platform-client/instance-admin.js +59 -0
- package/dist/platform/platform-client/instance-admin.js.map +1 -0
- package/dist/platform/platform-client/invites.d.ts +35 -0
- package/dist/platform/platform-client/invites.d.ts.map +1 -0
- package/dist/platform/platform-client/invites.js +25 -0
- package/dist/platform/platform-client/invites.js.map +1 -0
- package/dist/platform/platform-client/lifecycle.d.ts +78 -0
- package/dist/platform/platform-client/lifecycle.d.ts.map +1 -0
- package/dist/platform/platform-client/lifecycle.js +151 -0
- package/dist/platform/platform-client/lifecycle.js.map +1 -0
- package/dist/platform/platform-client/members.d.ts +81 -0
- package/dist/platform/platform-client/members.d.ts.map +1 -0
- package/dist/platform/platform-client/members.js +59 -0
- package/dist/platform/platform-client/members.js.map +1 -0
- package/dist/platform/platform-client/shared.d.ts +44 -0
- package/dist/platform/platform-client/shared.d.ts.map +1 -0
- package/dist/platform/platform-client/shared.js +177 -0
- package/dist/platform/platform-client/shared.js.map +1 -0
- package/dist/platform/platform-client/ssh.d.ts +29 -0
- package/dist/platform/platform-client/ssh.d.ts.map +1 -0
- package/dist/platform/platform-client/ssh.js +14 -0
- package/dist/platform/platform-client/ssh.js.map +1 -0
- package/dist/platform/platform-client/types.d.ts +56 -0
- package/dist/platform/platform-client/types.d.ts.map +1 -0
- package/dist/platform/platform-client/types.js +19 -0
- package/dist/platform/platform-client/types.js.map +1 -0
- package/dist/platform/platform-client/updates.d.ts +117 -0
- package/dist/platform/platform-client/updates.d.ts.map +1 -0
- package/dist/platform/platform-client/updates.js +97 -0
- package/dist/platform/platform-client/updates.js.map +1 -0
- package/dist/platform/platform-client/urls.d.ts +18 -0
- package/dist/platform/platform-client/urls.d.ts.map +1 -0
- package/dist/platform/platform-client/urls.js +31 -0
- package/dist/platform/platform-client/urls.js.map +1 -0
- package/dist/platform/projects-client/access.d.ts +273 -0
- package/dist/platform/projects-client/access.d.ts.map +1 -0
- package/dist/platform/projects-client/access.js +89 -0
- package/dist/platform/projects-client/access.js.map +1 -0
- package/dist/platform/projects-client/accounts.d.ts +184 -0
- package/dist/platform/projects-client/accounts.d.ts.map +1 -0
- package/dist/platform/projects-client/accounts.js +78 -0
- package/dist/platform/projects-client/accounts.js.map +1 -0
- package/dist/platform/projects-client/agent-config.d.ts +58 -0
- package/dist/platform/projects-client/agent-config.d.ts.map +1 -0
- package/dist/platform/projects-client/agent-config.js +9 -0
- package/dist/platform/projects-client/agent-config.js.map +1 -0
- package/dist/platform/projects-client/agent-scope.d.ts +12 -0
- package/dist/platform/projects-client/agent-scope.d.ts.map +1 -0
- package/dist/platform/projects-client/agent-scope.js +6 -0
- package/dist/platform/projects-client/agent-scope.js.map +1 -0
- package/dist/platform/projects-client/apps.d.ts +98 -0
- package/dist/platform/projects-client/apps.d.ts.map +1 -0
- package/dist/platform/projects-client/apps.js +29 -0
- package/dist/platform/projects-client/apps.js.map +1 -0
- package/dist/platform/projects-client/audit.d.ts +85 -0
- package/dist/platform/projects-client/audit.d.ts.map +1 -0
- package/dist/platform/projects-client/audit.js +51 -0
- package/dist/platform/projects-client/audit.js.map +1 -0
- package/dist/platform/projects-client/billing.d.ts +336 -0
- package/dist/platform/projects-client/billing.d.ts.map +1 -0
- package/dist/platform/projects-client/billing.js +260 -0
- package/dist/platform/projects-client/billing.js.map +1 -0
- package/dist/platform/projects-client/change-requests.d.ts +119 -0
- package/dist/platform/projects-client/change-requests.d.ts.map +1 -0
- package/dist/platform/projects-client/change-requests.js +56 -0
- package/dist/platform/projects-client/change-requests.js.map +1 -0
- package/dist/platform/projects-client/channels.d.ts +135 -0
- package/dist/platform/projects-client/channels.d.ts.map +1 -0
- package/dist/platform/projects-client/channels.js +103 -0
- package/dist/platform/projects-client/channels.js.map +1 -0
- package/dist/platform/projects-client/connectors.d.ts +148 -0
- package/dist/platform/projects-client/connectors.d.ts.map +1 -0
- package/dist/platform/projects-client/connectors.js +66 -0
- package/dist/platform/projects-client/connectors.js.map +1 -0
- package/dist/platform/projects-client/files.d.ts +37 -0
- package/dist/platform/projects-client/files.d.ts.map +1 -0
- package/dist/platform/projects-client/files.js +58 -0
- package/dist/platform/projects-client/files.js.map +1 -0
- package/dist/platform/projects-client/gateway.d.ts +177 -0
- package/dist/platform/projects-client/gateway.d.ts.map +1 -0
- package/dist/platform/projects-client/gateway.js +59 -0
- package/dist/platform/projects-client/gateway.js.map +1 -0
- package/dist/platform/projects-client/git-history.d.ts +74 -0
- package/dist/platform/projects-client/git-history.d.ts.map +1 -0
- package/dist/platform/projects-client/git-history.js +40 -0
- package/dist/platform/projects-client/git-history.js.map +1 -0
- package/dist/platform/projects-client/github.d.ts +62 -0
- package/dist/platform/projects-client/github.d.ts.map +1 -0
- package/dist/platform/projects-client/github.js +30 -0
- package/dist/platform/projects-client/github.js.map +1 -0
- package/dist/platform/projects-client/index.d.ts +32 -0
- package/dist/platform/projects-client/index.d.ts.map +1 -0
- package/dist/platform/projects-client/index.js +34 -0
- package/dist/platform/projects-client/index.js.map +1 -0
- package/dist/platform/projects-client/marketplace-catalog.d.ts +76 -0
- package/dist/platform/projects-client/marketplace-catalog.d.ts.map +1 -0
- package/dist/platform/projects-client/marketplace-catalog.js +48 -0
- package/dist/platform/projects-client/marketplace-catalog.js.map +1 -0
- package/dist/platform/projects-client/marketplace.d.ts +80 -0
- package/dist/platform/projects-client/marketplace.d.ts.map +1 -0
- package/dist/platform/projects-client/marketplace.js +52 -0
- package/dist/platform/projects-client/marketplace.js.map +1 -0
- package/dist/platform/projects-client/model-defaults.d.ts +36 -0
- package/dist/platform/projects-client/model-defaults.d.ts.map +1 -0
- package/dist/platform/projects-client/model-defaults.js +16 -0
- package/dist/platform/projects-client/model-defaults.js.map +1 -0
- package/dist/platform/projects-client/policies.d.ts +21 -0
- package/dist/platform/projects-client/policies.d.ts.map +1 -0
- package/dist/platform/projects-client/policies.js +10 -0
- package/dist/platform/projects-client/policies.js.map +1 -0
- package/dist/platform/projects-client/projects.d.ts +235 -0
- package/dist/platform/projects-client/projects.d.ts.map +1 -0
- package/dist/platform/projects-client/projects.js +161 -0
- package/dist/platform/projects-client/projects.js.map +1 -0
- package/dist/platform/projects-client/public-session-shares.d.ts +52 -0
- package/dist/platform/projects-client/public-session-shares.d.ts.map +1 -0
- package/dist/platform/projects-client/public-session-shares.js +54 -0
- package/dist/platform/projects-client/public-session-shares.js.map +1 -0
- package/dist/platform/projects-client/review.d.ts +57 -0
- package/dist/platform/projects-client/review.d.ts.map +1 -0
- package/dist/platform/projects-client/review.js +28 -0
- package/dist/platform/projects-client/review.js.map +1 -0
- package/dist/platform/projects-client/sandbox-shares.d.ts +25 -0
- package/dist/platform/projects-client/sandbox-shares.d.ts.map +1 -0
- package/dist/platform/projects-client/sandbox-shares.js +29 -0
- package/dist/platform/projects-client/sandbox-shares.js.map +1 -0
- package/dist/platform/projects-client/sandbox.d.ts +123 -0
- package/dist/platform/projects-client/sandbox.d.ts.map +1 -0
- package/dist/platform/projects-client/sandbox.js +45 -0
- package/dist/platform/projects-client/sandbox.js.map +1 -0
- package/dist/platform/projects-client/secrets.d.ts +122 -0
- package/dist/platform/projects-client/secrets.d.ts.map +1 -0
- package/dist/platform/projects-client/secrets.js +34 -0
- package/dist/platform/projects-client/secrets.js.map +1 -0
- package/dist/platform/projects-client/session-sandbox.d.ts +61 -0
- package/dist/platform/projects-client/session-sandbox.d.ts.map +1 -0
- package/dist/platform/projects-client/session-sandbox.js +82 -0
- package/dist/platform/projects-client/session-sandbox.js.map +1 -0
- package/dist/platform/projects-client/sessions.d.ts +216 -0
- package/dist/platform/projects-client/sessions.d.ts.map +1 -0
- package/dist/platform/projects-client/sessions.js +74 -0
- package/dist/platform/projects-client/sessions.js.map +1 -0
- package/dist/platform/projects-client/setup-links.d.ts +35 -0
- package/dist/platform/projects-client/setup-links.d.ts.map +1 -0
- package/dist/platform/projects-client/setup-links.js +24 -0
- package/dist/platform/projects-client/setup-links.js.map +1 -0
- package/dist/platform/projects-client/shared.d.ts +66 -0
- package/dist/platform/projects-client/shared.d.ts.map +1 -0
- package/dist/platform/projects-client/shared.js +44 -0
- package/dist/platform/projects-client/shared.js.map +1 -0
- package/dist/platform/projects-client/tokens.d.ts +77 -0
- package/dist/platform/projects-client/tokens.d.ts.map +1 -0
- package/dist/platform/projects-client/tokens.js +43 -0
- package/dist/platform/projects-client/tokens.js.map +1 -0
- package/dist/platform/projects-client/transcription.d.ts +5 -0
- package/dist/platform/projects-client/transcription.d.ts.map +1 -0
- package/dist/platform/projects-client/transcription.js +14 -0
- package/dist/platform/projects-client/transcription.js.map +1 -0
- package/dist/platform/projects-client/triggers.d.ts +102 -0
- package/dist/platform/projects-client/triggers.d.ts.map +1 -0
- package/dist/platform/projects-client/triggers.js +27 -0
- package/dist/platform/projects-client/triggers.js.map +1 -0
- package/dist/platform/session-id.d.ts +9 -0
- package/dist/platform/session-id.d.ts.map +1 -0
- package/dist/platform/session-id.js +23 -0
- package/dist/platform/session-id.js.map +1 -0
- package/dist/platform/storage/managed-storage.d.ts +97 -0
- package/dist/platform/storage/managed-storage.d.ts.map +1 -0
- package/dist/platform/storage/managed-storage.js +271 -0
- package/dist/platform/storage/managed-storage.js.map +1 -0
- package/dist/platform/strings.d.ts +12 -0
- package/dist/platform/strings.d.ts.map +1 -0
- package/dist/platform/strings.js +17 -0
- package/dist/platform/strings.js.map +1 -0
- package/dist/platform/ui.d.ts +11 -0
- package/dist/platform/ui.d.ts.map +1 -0
- package/dist/platform/ui.js +22 -0
- package/dist/platform/ui.js.map +1 -0
- package/dist/react/chat/index.d.ts +3 -0
- package/dist/react/chat/index.d.ts.map +1 -0
- package/dist/react/chat/index.js +7 -0
- package/dist/react/chat/index.js.map +1 -0
- package/dist/react/chat/render-parts.d.ts +39 -0
- package/dist/react/chat/render-parts.d.ts.map +1 -0
- package/dist/react/chat/render-parts.js +34 -0
- package/dist/react/chat/render-parts.js.map +1 -0
- package/dist/react/chat/use-chat-turns.d.ts +19 -0
- package/dist/react/chat/use-chat-turns.d.ts.map +1 -0
- package/dist/react/chat/use-chat-turns.js +27 -0
- package/dist/react/chat/use-chat-turns.js.map +1 -0
- package/dist/react/file-keys.d.ts +18 -0
- package/dist/react/file-keys.d.ts.map +1 -0
- package/dist/react/file-keys.js +18 -0
- package/dist/react/file-keys.js.map +1 -0
- package/dist/react/index.d.ts +12 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +49 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/model-flatten.d.ts +33 -0
- package/dist/react/model-flatten.d.ts.map +1 -0
- package/dist/react/model-flatten.js +59 -0
- package/dist/react/model-flatten.js.map +1 -0
- package/dist/react/opencode.d.ts +43 -0
- package/dist/react/opencode.d.ts.map +1 -0
- package/dist/react/opencode.js +100 -0
- package/dist/react/opencode.js.map +1 -0
- package/dist/react/prefetch-session-start.d.ts +10 -0
- package/dist/react/prefetch-session-start.d.ts.map +1 -0
- package/dist/react/prefetch-session-start.js +17 -0
- package/dist/react/prefetch-session-start.js.map +1 -0
- package/dist/react/provider-refresh.d.ts +7 -0
- package/dist/react/provider-refresh.d.ts.map +1 -0
- package/dist/react/provider-refresh.js +28 -0
- package/dist/react/provider-refresh.js.map +1 -0
- package/dist/react/provider-selection.d.ts +31 -0
- package/dist/react/provider-selection.d.ts.map +1 -0
- package/dist/react/provider-selection.js +135 -0
- package/dist/react/provider-selection.js.map +1 -0
- package/dist/react/route-project.d.ts +7 -0
- package/dist/react/route-project.d.ts.map +1 -0
- package/dist/react/route-project.js +19 -0
- package/dist/react/route-project.js.map +1 -0
- package/dist/react/session-start-stash.d.ts +56 -0
- package/dist/react/session-start-stash.d.ts.map +1 -0
- package/dist/react/session-start-stash.js +202 -0
- package/dist/react/session-start-stash.js.map +1 -0
- package/dist/react/use-canonical-opencode-session.d.ts +35 -0
- package/dist/react/use-canonical-opencode-session.d.ts.map +1 -0
- package/dist/react/use-canonical-opencode-session.js +52 -0
- package/dist/react/use-canonical-opencode-session.js.map +1 -0
- package/dist/react/use-change-requests.d.ts +321 -0
- package/dist/react/use-change-requests.d.ts.map +1 -0
- package/dist/react/use-change-requests.js +43 -0
- package/dist/react/use-change-requests.js.map +1 -0
- package/dist/react/use-current-runtime.d.ts +8 -0
- package/dist/react/use-current-runtime.d.ts.map +1 -0
- package/dist/react/use-current-runtime.js +12 -0
- package/dist/react/use-current-runtime.js.map +1 -0
- package/dist/react/use-gateway-catalog-sync.d.ts +2 -0
- package/dist/react/use-gateway-catalog-sync.d.ts.map +1 -0
- package/dist/react/use-gateway-catalog-sync.js +39 -0
- package/dist/react/use-gateway-catalog-sync.js.map +1 -0
- package/dist/react/use-kortix-master.d.ts +384 -0
- package/dist/react/use-kortix-master.d.ts.map +1 -0
- package/dist/react/use-kortix-master.js +958 -0
- package/dist/react/use-kortix-master.js.map +1 -0
- package/dist/react/use-model-store.d.ts +71 -0
- package/dist/react/use-model-store.d.ts.map +1 -0
- package/dist/react/use-model-store.js +411 -0
- package/dist/react/use-model-store.js.map +1 -0
- package/dist/react/use-opencode-config.d.ts +15 -0
- package/dist/react/use-opencode-config.d.ts.map +1 -0
- package/dist/react/use-opencode-config.js +79 -0
- package/dist/react/use-opencode-config.js.map +1 -0
- package/dist/react/use-opencode-events/diagnostics.d.ts +11 -0
- package/dist/react/use-opencode-events/diagnostics.d.ts.map +1 -0
- package/dist/react/use-opencode-events/diagnostics.js +58 -0
- package/dist/react/use-opencode-events/diagnostics.js.map +1 -0
- package/dist/react/use-opencode-events/handle-event.d.ts +20 -0
- package/dist/react/use-opencode-events/handle-event.d.ts.map +1 -0
- package/dist/react/use-opencode-events/handle-event.js +450 -0
- package/dist/react/use-opencode-events/handle-event.js.map +1 -0
- package/dist/react/use-opencode-events/helpers.d.ts +30 -0
- package/dist/react/use-opencode-events/helpers.d.ts.map +1 -0
- package/dist/react/use-opencode-events/helpers.js +93 -0
- package/dist/react/use-opencode-events/helpers.js.map +1 -0
- package/dist/react/use-opencode-events/index.d.ts +25 -0
- package/dist/react/use-opencode-events/index.d.ts.map +1 -0
- package/dist/react/use-opencode-events/index.js +242 -0
- package/dist/react/use-opencode-events/index.js.map +1 -0
- package/dist/react/use-opencode-events/types.d.ts +10 -0
- package/dist/react/use-opencode-events/types.d.ts.map +1 -0
- package/dist/react/use-opencode-events/types.js +2 -0
- package/dist/react/use-opencode-events/types.js.map +1 -0
- package/dist/react/use-opencode-events/use-event-stream-refs.d.ts +22 -0
- package/dist/react/use-opencode-events/use-event-stream-refs.d.ts.map +1 -0
- package/dist/react/use-opencode-events/use-event-stream-refs.js +158 -0
- package/dist/react/use-opencode-events/use-event-stream-refs.js.map +1 -0
- package/dist/react/use-opencode-local.d.ts +139 -0
- package/dist/react/use-opencode-local.d.ts.map +1 -0
- package/dist/react/use-opencode-local.js +484 -0
- package/dist/react/use-opencode-local.js.map +1 -0
- package/dist/react/use-opencode-mcp.d.ts +34 -0
- package/dist/react/use-opencode-mcp.d.ts.map +1 -0
- package/dist/react/use-opencode-mcp.js +190 -0
- package/dist/react/use-opencode-mcp.js.map +1 -0
- package/dist/react/use-opencode-pty.d.ts +30 -0
- package/dist/react/use-opencode-pty.d.ts.map +1 -0
- package/dist/react/use-opencode-pty.js +126 -0
- package/dist/react/use-opencode-pty.js.map +1 -0
- package/dist/react/use-opencode-sessions/agents.d.ts +14 -0
- package/dist/react/use-opencode-sessions/agents.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/agents.js +82 -0
- package/dist/react/use-opencode-sessions/agents.js.map +1 -0
- package/dist/react/use-opencode-sessions/commands.d.ts +8 -0
- package/dist/react/use-opencode-sessions/commands.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/commands.js +46 -0
- package/dist/react/use-opencode-sessions/commands.js.map +1 -0
- package/dist/react/use-opencode-sessions/files.d.ts +2 -0
- package/dist/react/use-opencode-sessions/files.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/files.js +181 -0
- package/dist/react/use-opencode-sessions/files.js.map +1 -0
- package/dist/react/use-opencode-sessions/index.d.ts +15 -0
- package/dist/react/use-opencode-sessions/index.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/index.js +21 -0
- package/dist/react/use-opencode-sessions/index.js.map +1 -0
- package/dist/react/use-opencode-sessions/keys.d.ts +94 -0
- package/dist/react/use-opencode-sessions/keys.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/keys.js +39 -0
- package/dist/react/use-opencode-sessions/keys.js.map +1 -0
- package/dist/react/use-opencode-sessions/mcp.d.ts +3 -0
- package/dist/react/use-opencode-sessions/mcp.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/mcp.js +23 -0
- package/dist/react/use-opencode-sessions/mcp.js.map +1 -0
- package/dist/react/use-opencode-sessions/messages.d.ts +75 -0
- package/dist/react/use-opencode-sessions/messages.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/messages.js +319 -0
- package/dist/react/use-opencode-sessions/messages.js.map +1 -0
- package/dist/react/use-opencode-sessions/parts.d.ts +23 -0
- package/dist/react/use-opencode-sessions/parts.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/parts.js +49 -0
- package/dist/react/use-opencode-sessions/parts.js.map +1 -0
- package/dist/react/use-opencode-sessions/permissions.d.ts +17 -0
- package/dist/react/use-opencode-sessions/permissions.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/permissions.js +66 -0
- package/dist/react/use-opencode-sessions/permissions.js.map +1 -0
- package/dist/react/use-opencode-sessions/projects.d.ts +5 -0
- package/dist/react/use-opencode-sessions/projects.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/projects.js +54 -0
- package/dist/react/use-opencode-sessions/projects.js.map +1 -0
- package/dist/react/use-opencode-sessions/providers.d.ts +10 -0
- package/dist/react/use-opencode-sessions/providers.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/providers.js +98 -0
- package/dist/react/use-opencode-sessions/providers.js.map +1 -0
- package/dist/react/use-opencode-sessions/sessions.d.ts +35 -0
- package/dist/react/use-opencode-sessions/sessions.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/sessions.js +380 -0
- package/dist/react/use-opencode-sessions/sessions.js.map +1 -0
- package/dist/react/use-opencode-sessions/shared.d.ts +43 -0
- package/dist/react/use-opencode-sessions/shared.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/shared.js +109 -0
- package/dist/react/use-opencode-sessions/shared.js.map +1 -0
- package/dist/react/use-opencode-sessions/sharing.d.ts +4 -0
- package/dist/react/use-opencode-sessions/sharing.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/sharing.js +57 -0
- package/dist/react/use-opencode-sessions/sharing.js.map +1 -0
- package/dist/react/use-opencode-sessions/tools.d.ts +5 -0
- package/dist/react/use-opencode-sessions/tools.d.ts.map +1 -0
- package/dist/react/use-opencode-sessions/tools.js +54 -0
- package/dist/react/use-opencode-sessions/tools.js.map +1 -0
- package/dist/react/use-permission-self-heal.d.ts +45 -0
- package/dist/react/use-permission-self-heal.d.ts.map +1 -0
- package/dist/react/use-permission-self-heal.js +144 -0
- package/dist/react/use-permission-self-heal.js.map +1 -0
- package/dist/react/use-project-config.d.ts +11 -0
- package/dist/react/use-project-config.d.ts.map +1 -0
- package/dist/react/use-project-config.js +22 -0
- package/dist/react/use-project-config.js.map +1 -0
- package/dist/react/use-project-models.d.ts +11 -0
- package/dist/react/use-project-models.d.ts.map +1 -0
- package/dist/react/use-project-models.js +25 -0
- package/dist/react/use-project-models.js.map +1 -0
- package/dist/react/use-project-secrets.d.ts +265 -0
- package/dist/react/use-project-secrets.d.ts.map +1 -0
- package/dist/react/use-project-secrets.js +41 -0
- package/dist/react/use-project-secrets.js.map +1 -0
- package/dist/react/use-project-triggers.d.ts +228 -0
- package/dist/react/use-project-triggers.d.ts.map +1 -0
- package/dist/react/use-project-triggers.js +42 -0
- package/dist/react/use-project-triggers.js.map +1 -0
- package/dist/react/use-question-self-heal.d.ts +36 -0
- package/dist/react/use-question-self-heal.d.ts.map +1 -0
- package/dist/react/use-question-self-heal.js +95 -0
- package/dist/react/use-question-self-heal.js.map +1 -0
- package/dist/react/use-runtime-phase.d.ts +9 -0
- package/dist/react/use-runtime-phase.d.ts.map +1 -0
- package/dist/react/use-runtime-phase.js +20 -0
- package/dist/react/use-runtime-phase.js.map +1 -0
- package/dist/react/use-runtime-reconnect.d.ts +90 -0
- package/dist/react/use-runtime-reconnect.d.ts.map +1 -0
- package/dist/react/use-runtime-reconnect.js +234 -0
- package/dist/react/use-runtime-reconnect.js.map +1 -0
- package/dist/react/use-session-picks.d.ts +17 -0
- package/dist/react/use-session-picks.d.ts.map +1 -0
- package/dist/react/use-session-picks.js +36 -0
- package/dist/react/use-session-picks.js.map +1 -0
- package/dist/react/use-session-prefetch.d.ts +18 -0
- package/dist/react/use-session-prefetch.d.ts.map +1 -0
- package/dist/react/use-session-prefetch.js +84 -0
- package/dist/react/use-session-prefetch.js.map +1 -0
- package/dist/react/use-session-send.d.ts +183 -0
- package/dist/react/use-session-send.d.ts.map +1 -0
- package/dist/react/use-session-send.js +287 -0
- package/dist/react/use-session-send.js.map +1 -0
- package/dist/react/use-session-sync.d.ts +24 -0
- package/dist/react/use-session-sync.d.ts.map +1 -0
- package/dist/react/use-session-sync.js +375 -0
- package/dist/react/use-session-sync.js.map +1 -0
- package/dist/react/use-session.d.ts +171 -0
- package/dist/react/use-session.d.ts.map +1 -0
- package/dist/react/use-session.js +396 -0
- package/dist/react/use-session.js.map +1 -0
- package/dist/react/use-visible-agents.d.ts +22 -0
- package/dist/react/use-visible-agents.d.ts.map +1 -0
- package/dist/react/use-visible-agents.js +45 -0
- package/dist/react/use-visible-agents.js.map +1 -0
- package/dist/server.d.ts +55 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +122 -0
- package/dist/server.js.map +1 -0
- package/dist/session/health.d.ts +49 -0
- package/dist/session/health.d.ts.map +1 -0
- package/dist/session/health.js +57 -0
- package/dist/session/health.js.map +1 -0
- package/dist/session/index.d.ts +19 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +19 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/preview.d.ts +24 -0
- package/dist/session/preview.d.ts.map +1 -0
- package/dist/session/preview.js +85 -0
- package/dist/session/preview.js.map +1 -0
- package/dist/session/url.d.ts +160 -0
- package/dist/session/url.d.ts.map +1 -0
- package/dist/session/url.js +522 -0
- package/dist/session/url.js.map +1 -0
- package/dist/state/chat-events.d.ts +141 -0
- package/dist/state/chat-events.d.ts.map +1 -0
- package/dist/state/chat-events.js +135 -0
- package/dist/state/chat-events.js.map +1 -0
- package/dist/state/current-runtime.d.ts +44 -0
- package/dist/state/current-runtime.d.ts.map +1 -0
- package/dist/state/current-runtime.js +44 -0
- package/dist/state/current-runtime.js.map +1 -0
- package/dist/state/diagnostics-store.d.ts +114 -0
- package/dist/state/diagnostics-store.d.ts.map +1 -0
- package/dist/state/diagnostics-store.js +319 -0
- package/dist/state/diagnostics-store.js.map +1 -0
- package/dist/state/event-stream.d.ts +134 -0
- package/dist/state/event-stream.d.ts.map +1 -0
- package/dist/state/event-stream.js +424 -0
- package/dist/state/event-stream.js.map +1 -0
- package/dist/state/idb-sync-cache.d.ts +18 -0
- package/dist/state/idb-sync-cache.d.ts.map +1 -0
- package/dist/state/idb-sync-cache.js +209 -0
- package/dist/state/idb-sync-cache.js.map +1 -0
- package/dist/state/opencode-compaction-store.d.ts +10 -0
- package/dist/state/opencode-compaction-store.d.ts.map +1 -0
- package/dist/state/opencode-compaction-store.js +32 -0
- package/dist/state/opencode-compaction-store.js.map +1 -0
- package/dist/state/opencode-pending-store.d.ts +19 -0
- package/dist/state/opencode-pending-store.d.ts.map +1 -0
- package/dist/state/opencode-pending-store.js +76 -0
- package/dist/state/opencode-pending-store.js.map +1 -0
- package/dist/state/sandbox-connection-store.d.ts +62 -0
- package/dist/state/sandbox-connection-store.d.ts.map +1 -0
- package/dist/state/sandbox-connection-store.js +290 -0
- package/dist/state/sandbox-connection-store.js.map +1 -0
- package/dist/state/server-store/active.d.ts +49 -0
- package/dist/state/server-store/active.d.ts.map +1 -0
- package/dist/state/server-store/active.js +76 -0
- package/dist/state/server-store/active.js.map +1 -0
- package/dist/state/server-store/types.d.ts +12 -0
- package/dist/state/server-store/types.d.ts.map +1 -0
- package/dist/state/server-store/types.js +2 -0
- package/dist/state/server-store/types.js.map +1 -0
- package/dist/state/server-store/url-helpers.d.ts +33 -0
- package/dist/state/server-store/url-helpers.d.ts.map +1 -0
- package/dist/state/server-store/url-helpers.js +55 -0
- package/dist/state/server-store/url-helpers.js.map +1 -0
- package/dist/state/server-store.d.ts +18 -0
- package/dist/state/server-store.d.ts.map +1 -0
- package/dist/state/server-store.js +23 -0
- package/dist/state/server-store.js.map +1 -0
- package/dist/state/session-runtime-registry.d.ts +49 -0
- package/dist/state/session-runtime-registry.d.ts.map +1 -0
- package/dist/state/session-runtime-registry.js +85 -0
- package/dist/state/session-runtime-registry.js.map +1 -0
- package/dist/state/sync-store/ascending-id.d.ts +2 -0
- package/dist/state/sync-store/ascending-id.d.ts.map +1 -0
- package/dist/state/sync-store/ascending-id.js +21 -0
- package/dist/state/sync-store/ascending-id.js.map +1 -0
- package/dist/state/sync-store/binary.d.ts +7 -0
- package/dist/state/sync-store/binary.d.ts.map +1 -0
- package/dist/state/sync-store/binary.js +21 -0
- package/dist/state/sync-store/binary.js.map +1 -0
- package/dist/state/sync-store/stream-cache.d.ts +2 -0
- package/dist/state/sync-store/stream-cache.d.ts.map +1 -0
- package/dist/state/sync-store/stream-cache.js +29 -0
- package/dist/state/sync-store/stream-cache.js.map +1 -0
- package/dist/state/sync-store/types.d.ts +29 -0
- package/dist/state/sync-store/types.d.ts.map +1 -0
- package/dist/state/sync-store/types.js +2 -0
- package/dist/state/sync-store/types.js.map +1 -0
- package/dist/state/sync-store.d.ts +39 -0
- package/dist/state/sync-store.d.ts.map +1 -0
- package/dist/state/sync-store.js +692 -0
- package/dist/state/sync-store.js.map +1 -0
- package/dist/state/tab-store.d.ts +91 -0
- package/dist/state/tab-store.d.ts.map +1 -0
- package/dist/state/tab-store.js +369 -0
- package/dist/state/tab-store.js.map +1 -0
- package/dist/transcript.d.ts +40 -0
- package/dist/transcript.d.ts.map +1 -0
- package/dist/transcript.js +126 -0
- package/dist/transcript.js.map +1 -0
- package/dist/turns/classify.d.ts +166 -0
- package/dist/turns/classify.d.ts.map +1 -0
- package/dist/turns/classify.js +259 -0
- package/dist/turns/classify.js.map +1 -0
- package/dist/turns/errors.d.ts +11 -0
- package/dist/turns/errors.d.ts.map +1 -0
- package/dist/turns/errors.js +85 -0
- package/dist/turns/errors.js.map +1 -0
- package/dist/turns/index.d.ts +264 -0
- package/dist/turns/index.d.ts.map +1 -0
- package/dist/turns/index.js +1243 -0
- package/dist/turns/index.js.map +1 -0
- package/dist/turns/tool-registry.d.ts +33 -0
- package/dist/turns/tool-registry.d.ts.map +1 -0
- package/dist/turns/tool-registry.js +108 -0
- package/dist/turns/tool-registry.js.map +1 -0
- package/dist/turns/types.d.ts +125 -0
- package/dist/turns/types.d.ts.map +1 -0
- package/dist/turns/types.js +12 -0
- package/dist/turns/types.js.map +1 -0
- package/dist/turns/view-model.d.ts +127 -0
- package/dist/turns/view-model.d.ts.map +1 -0
- package/dist/turns/view-model.js +401 -0
- package/dist/turns/view-model.js.map +1 -0
- package/package.json +155 -0
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { create } from "zustand";
|
|
2
|
+
import { logger } from "../platform/logger.js";
|
|
3
|
+
// ── Persist wasConnected across hard refreshes via sessionStorage ──
|
|
4
|
+
// On hard refresh, wasConnected resets to false which triggers a full-screen
|
|
5
|
+
// blocking overlay. By persisting it, users who were previously connected
|
|
6
|
+
// see the lightweight reconnect pill instead, making reconnection feel instant.
|
|
7
|
+
const STORAGE_KEY = "kortix-runtime-was-connected";
|
|
8
|
+
const PROVISION_VERIFIED_KEY = "kortix-runtime-provision-verified";
|
|
9
|
+
// Stronger than PROVISION_VERIFIED: POST /start already resolved stage='ready',
|
|
10
|
+
// which the backend only returns once it reached the daemon's /session (runtime
|
|
11
|
+
// proven healthy server-side). When this flag is set, the new instance starts
|
|
12
|
+
// optimistically connected+healthy so the chat shows WITHOUT waiting out an extra
|
|
13
|
+
// client-side /kortix/health round-trip. The poller still runs and self-corrects.
|
|
14
|
+
const RUNTIME_READY_VERIFIED_KEY = "kortix-runtime-ready";
|
|
15
|
+
function loadWasConnected() {
|
|
16
|
+
try {
|
|
17
|
+
return sessionStorage.getItem(STORAGE_KEY) === "1";
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function saveWasConnected(value) {
|
|
24
|
+
try {
|
|
25
|
+
if (value) {
|
|
26
|
+
sessionStorage.setItem(STORAGE_KEY, "1");
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
sessionStorage.removeItem(STORAGE_KEY);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
/* SSR or storage unavailable */
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function loadProvisionVerified() {
|
|
37
|
+
try {
|
|
38
|
+
return sessionStorage.getItem(PROVISION_VERIFIED_KEY) === "1";
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function clearProvisionVerified() {
|
|
45
|
+
try {
|
|
46
|
+
sessionStorage.removeItem(PROVISION_VERIFIED_KEY);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
/* SSR or storage unavailable */
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function loadRuntimeReadyVerified() {
|
|
53
|
+
try {
|
|
54
|
+
return sessionStorage.getItem(RUNTIME_READY_VERIFIED_KEY) === "1";
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function clearRuntimeReadyVerified() {
|
|
61
|
+
try {
|
|
62
|
+
sessionStorage.removeItem(RUNTIME_READY_VERIFIED_KEY);
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
/* SSR or storage unavailable */
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export const useSandboxConnectionStore = create(() => ({
|
|
69
|
+
status: "connecting",
|
|
70
|
+
failCount: 0,
|
|
71
|
+
lastConnectedAt: null,
|
|
72
|
+
initialCheckDone: false,
|
|
73
|
+
wasConnected: loadWasConnected(),
|
|
74
|
+
reconnectAttempts: 0,
|
|
75
|
+
disconnectedAt: null,
|
|
76
|
+
sandboxVersion: null,
|
|
77
|
+
openCodeVersion: null,
|
|
78
|
+
healthy: null,
|
|
79
|
+
runtimeError: null,
|
|
80
|
+
recoveryPhase: "idle",
|
|
81
|
+
restartRequestedAt: null,
|
|
82
|
+
}));
|
|
83
|
+
// ── Static actions (stable references, no re-render loops) ──
|
|
84
|
+
/** Only updates status if it actually changed. */
|
|
85
|
+
export function setSandboxStatus(next) {
|
|
86
|
+
const state = useSandboxConnectionStore.getState();
|
|
87
|
+
if (state.status === next)
|
|
88
|
+
return;
|
|
89
|
+
const updates = { status: next };
|
|
90
|
+
if (next === "connected") {
|
|
91
|
+
updates.lastConnectedAt = Date.now();
|
|
92
|
+
updates.failCount = 0;
|
|
93
|
+
updates.wasConnected = true;
|
|
94
|
+
updates.reconnectAttempts = 0;
|
|
95
|
+
updates.disconnectedAt = null;
|
|
96
|
+
updates.recoveryPhase = "idle";
|
|
97
|
+
updates.restartRequestedAt = null;
|
|
98
|
+
saveWasConnected(true);
|
|
99
|
+
if (state.status === "unreachable") {
|
|
100
|
+
logger.info("Sandbox connection restored", {
|
|
101
|
+
previousStatus: state.status,
|
|
102
|
+
reconnectAttempts: state.reconnectAttempts,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
else if (next === "unreachable") {
|
|
107
|
+
if (!state.disconnectedAt) {
|
|
108
|
+
updates.disconnectedAt = Date.now();
|
|
109
|
+
}
|
|
110
|
+
logger.warn("Sandbox became unreachable", {
|
|
111
|
+
failCount: state.failCount,
|
|
112
|
+
reconnectAttempts: state.reconnectAttempts,
|
|
113
|
+
wasConnected: state.wasConnected,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
else if (next === "connecting") {
|
|
117
|
+
// Track when we first went down (don't overwrite if already set)
|
|
118
|
+
if (!state.disconnectedAt) {
|
|
119
|
+
updates.disconnectedAt = Date.now();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
useSandboxConnectionStore.setState(updates);
|
|
123
|
+
}
|
|
124
|
+
export function markInitialCheckDone() {
|
|
125
|
+
if (useSandboxConnectionStore.getState().initialCheckDone)
|
|
126
|
+
return; // no-op
|
|
127
|
+
useSandboxConnectionStore.setState({ initialCheckDone: true });
|
|
128
|
+
}
|
|
129
|
+
export function incrementSandboxFail() {
|
|
130
|
+
const state = useSandboxConnectionStore.getState();
|
|
131
|
+
logger.warn("Sandbox health-check failed", {
|
|
132
|
+
failCount: state.failCount + 1,
|
|
133
|
+
reconnectAttempts: state.reconnectAttempts + 1,
|
|
134
|
+
});
|
|
135
|
+
useSandboxConnectionStore.setState((s) => ({
|
|
136
|
+
failCount: s.failCount + 1,
|
|
137
|
+
reconnectAttempts: s.reconnectAttempts + 1,
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
export function resetSandboxFail() {
|
|
141
|
+
const { failCount } = useSandboxConnectionStore.getState();
|
|
142
|
+
if (failCount === 0)
|
|
143
|
+
return; // no-op — avoids unnecessary re-renders
|
|
144
|
+
useSandboxConnectionStore.setState({ failCount: 0 });
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Full reset for server switches — clears ALL connection state so the new
|
|
148
|
+
* instance starts fresh. Without this, `wasConnected` from a previous instance
|
|
149
|
+
* leaks into the new one, causing wrong thresholds and stale UI.
|
|
150
|
+
*
|
|
151
|
+
* Exception: if the provisioning page just verified health and set the
|
|
152
|
+
* PROVISION_VERIFIED_KEY flag, we start as "connected" with wasConnected=true
|
|
153
|
+
* so the dashboard doesn't show a blocking overlay during the transition.
|
|
154
|
+
*/
|
|
155
|
+
export function resetForServerSwitch() {
|
|
156
|
+
const runtimeReady = loadRuntimeReadyVerified();
|
|
157
|
+
const fromProvisioning = loadProvisionVerified();
|
|
158
|
+
clearRuntimeReadyVerified();
|
|
159
|
+
clearProvisionVerified();
|
|
160
|
+
if (runtimeReady) {
|
|
161
|
+
// /start already resolved stage==='ready' (markRuntimeReadyVerified is set
|
|
162
|
+
// ONLY then — page.tsx), which the backend returns only after it reached the
|
|
163
|
+
// daemon and OpenCode answered: the runtime is PROVEN healthy server-side.
|
|
164
|
+
// So seed healthy=true (optimistic) — NOT healthy=null. The SSE event stream
|
|
165
|
+
// (use-opencode-events) AND message sync (use-session-sync) both gate on this
|
|
166
|
+
// same `healthy` flag, so seeding null left the FE UNSUBSCRIBED until the
|
|
167
|
+
// ~350ms client health poll flipped it green — by which point the server-side
|
|
168
|
+
// first turn (KORTIX_INITIAL_PROMPT, delivered during boot) had accumulated
|
|
169
|
+
// and bulk-rendered AT ONCE instead of streaming. healthy=true subscribes at
|
|
170
|
+
// the switch, so part.updated events render token-by-token, and also reclaims
|
|
171
|
+
// the redundant health RTT. The 350ms poller still runs and self-corrects to
|
|
172
|
+
// healthy=false (reconnect pill) if the browser genuinely can't reach the box,
|
|
173
|
+
// so this only narrows to the ready path where health was actually proven.
|
|
174
|
+
useSandboxConnectionStore.setState({
|
|
175
|
+
status: "connected",
|
|
176
|
+
failCount: 0,
|
|
177
|
+
initialCheckDone: true,
|
|
178
|
+
wasConnected: true,
|
|
179
|
+
reconnectAttempts: 0,
|
|
180
|
+
disconnectedAt: null,
|
|
181
|
+
sandboxVersion: null,
|
|
182
|
+
openCodeVersion: null,
|
|
183
|
+
healthy: true,
|
|
184
|
+
runtimeError: null,
|
|
185
|
+
recoveryPhase: "idle",
|
|
186
|
+
restartRequestedAt: null,
|
|
187
|
+
});
|
|
188
|
+
saveWasConnected(true);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
if (fromProvisioning) {
|
|
192
|
+
// Provisioning already verified health — skip the blocking overlay.
|
|
193
|
+
// The health poller will still run and correct the status if needed.
|
|
194
|
+
useSandboxConnectionStore.setState({
|
|
195
|
+
status: "connecting",
|
|
196
|
+
failCount: 0,
|
|
197
|
+
initialCheckDone: false,
|
|
198
|
+
wasConnected: true, // lightweight reconnect pill instead of blocking overlay
|
|
199
|
+
reconnectAttempts: 0,
|
|
200
|
+
disconnectedAt: null,
|
|
201
|
+
sandboxVersion: null,
|
|
202
|
+
openCodeVersion: null,
|
|
203
|
+
healthy: null,
|
|
204
|
+
runtimeError: null,
|
|
205
|
+
recoveryPhase: "idle",
|
|
206
|
+
restartRequestedAt: null,
|
|
207
|
+
});
|
|
208
|
+
saveWasConnected(true);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
useSandboxConnectionStore.setState({
|
|
212
|
+
status: "connecting",
|
|
213
|
+
failCount: 0,
|
|
214
|
+
initialCheckDone: false,
|
|
215
|
+
wasConnected: false,
|
|
216
|
+
reconnectAttempts: 0,
|
|
217
|
+
disconnectedAt: null,
|
|
218
|
+
sandboxVersion: null,
|
|
219
|
+
openCodeVersion: null,
|
|
220
|
+
healthy: null,
|
|
221
|
+
runtimeError: null,
|
|
222
|
+
recoveryPhase: "idle",
|
|
223
|
+
restartRequestedAt: null,
|
|
224
|
+
});
|
|
225
|
+
saveWasConnected(false);
|
|
226
|
+
}
|
|
227
|
+
export function markRecoveryRequested(phase) {
|
|
228
|
+
const now = Date.now();
|
|
229
|
+
useSandboxConnectionStore.setState((state) => ({
|
|
230
|
+
recoveryPhase: phase,
|
|
231
|
+
restartRequestedAt: now,
|
|
232
|
+
status: state.status === "connected" ? "connecting" : state.status,
|
|
233
|
+
disconnectedAt: state.disconnectedAt ?? now,
|
|
234
|
+
}));
|
|
235
|
+
}
|
|
236
|
+
export function markHostRestartRequested() {
|
|
237
|
+
markRecoveryRequested("restarting_host");
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Called by the provisioning page right before redirecting to the dashboard.
|
|
241
|
+
* Signals that the sandbox was already verified as healthy, so the dashboard
|
|
242
|
+
* should NOT show a full-screen blocking overlay on first load.
|
|
243
|
+
*/
|
|
244
|
+
export function markProvisioningVerified() {
|
|
245
|
+
try {
|
|
246
|
+
sessionStorage.setItem(PROVISION_VERIFIED_KEY, "1");
|
|
247
|
+
}
|
|
248
|
+
catch {
|
|
249
|
+
/* SSR or storage unavailable */
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Called right before switching to a sandbox whose POST /start already returned
|
|
254
|
+
* stage='ready' (runtime proven healthy server-side). The next server-switch
|
|
255
|
+
* reset starts optimistically connected+healthy so the chat shows without an
|
|
256
|
+
* extra client health RTT. Implies provisioning-verified.
|
|
257
|
+
*/
|
|
258
|
+
export function markRuntimeReadyVerified() {
|
|
259
|
+
try {
|
|
260
|
+
sessionStorage.setItem(RUNTIME_READY_VERIFIED_KEY, "1");
|
|
261
|
+
}
|
|
262
|
+
catch {
|
|
263
|
+
/* SSR or storage unavailable */
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
export function setSandboxVersion(version) {
|
|
267
|
+
const current = useSandboxConnectionStore.getState().sandboxVersion;
|
|
268
|
+
if (current === version)
|
|
269
|
+
return;
|
|
270
|
+
useSandboxConnectionStore.setState({ sandboxVersion: version });
|
|
271
|
+
}
|
|
272
|
+
export function setOpenCodeHealth(healthy, version, runtimeError) {
|
|
273
|
+
const state = useSandboxConnectionStore.getState();
|
|
274
|
+
const updates = {};
|
|
275
|
+
if (state.healthy !== healthy)
|
|
276
|
+
updates.healthy = healthy;
|
|
277
|
+
if (version !== undefined && state.openCodeVersion !== version)
|
|
278
|
+
updates.openCodeVersion = version;
|
|
279
|
+
const nextRuntimeError = healthy ? null : runtimeError;
|
|
280
|
+
if (runtimeError !== undefined && state.runtimeError !== nextRuntimeError) {
|
|
281
|
+
updates.runtimeError = nextRuntimeError;
|
|
282
|
+
}
|
|
283
|
+
else if (healthy && state.runtimeError !== null) {
|
|
284
|
+
updates.runtimeError = null;
|
|
285
|
+
}
|
|
286
|
+
if (Object.keys(updates).length > 0) {
|
|
287
|
+
useSandboxConnectionStore.setState(updates);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
//# sourceMappingURL=sandbox-connection-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox-connection-store.js","sourceRoot":"","sources":["../../src/state/sandbox-connection-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAuC5C,sEAAsE;AACtE,6EAA6E;AAC7E,0EAA0E;AAC1E,gFAAgF;AAChF,MAAM,WAAW,GAAG,8BAA8B,CAAC;AACnD,MAAM,sBAAsB,GAAG,mCAAmC,CAAC;AACnE,gFAAgF;AAChF,gFAAgF;AAChF,8EAA8E;AAC9E,kFAAkF;AAClF,kFAAkF;AAClF,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAE1D,SAAS,gBAAgB;IACxB,IAAI,CAAC;QACJ,OAAO,cAAc,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACvC,IAAI,CAAC;QACJ,IAAI,KAAK,EAAE,CAAC;YACX,cAAc,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACP,cAAc,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACxC,CAAC;IACF,CAAC;IAAC,MAAM,CAAC;QACR,gCAAgC;IACjC,CAAC;AACF,CAAC;AAED,SAAS,qBAAqB;IAC7B,IAAI,CAAC;QACJ,OAAO,cAAc,CAA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,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAgB,EAAE,OAAgB,EAAE,YAA4B;IACjG,MAAM,KAAK,GAAG,yBAAyB,CAAC,QAAQ,EAAE,CAAC;IACnD,MAAM,OAAO,GAAoC,EAAE,CAAC;IACpD,IAAI,KAAK,CAAC,OAAO,KAAK,OAAO;QAAE,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;IACzD,IAAI,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,eAAe,KAAK,OAAO;QAAE,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC;IAClG,MAAM,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC;IACvD,IAAI,YAAY,KAAK,SAAS,IAAI,KAAK,CAAC,YAAY,KAAK,gBAAgB,EAAE,CAAC;QAC3E,OAAO,CAAC,YAAY,GAAG,gBAAgB,CAAC;IACzC,CAAC;SAAM,IAAI,OAAO,IAAI,KAAK,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;QACnD,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7B,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrC,yBAAyB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Active-runtime resolution, framework-free. These are the read helpers the
|
|
3
|
+
* isomorphic core (`createKortix`, the opencode client factory) resolves the
|
|
4
|
+
* runtime through; the zustand read surface in `../server-store` layers on top
|
|
5
|
+
* for React hosts.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Resolve the active OpenCode proxy URL (routed through the backend).
|
|
9
|
+
* Prefers the per-session runtime; falls back to the local-dev default sandbox.
|
|
10
|
+
* Use in non-React contexts (API modules, etc.).
|
|
11
|
+
*/
|
|
12
|
+
export declare function getActiveOpenCodeUrl(): string;
|
|
13
|
+
/**
|
|
14
|
+
* sandboxId for the active runtime.
|
|
15
|
+
* - With an active session: the session's sandbox external id (current-runtime).
|
|
16
|
+
* - Otherwise: the configured default sandbox id (self-hosted local dev).
|
|
17
|
+
*/
|
|
18
|
+
export declare function getActiveSandboxId(): string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* DB instance id (platform `sandbox_id`) for the active runtime's sandbox.
|
|
21
|
+
*
|
|
22
|
+
* This is the stable DB primary key — distinct from the external id returned by
|
|
23
|
+
* `getActiveSandboxId()`. Ownership-scoped APIs (per-sandbox API keys) key on
|
|
24
|
+
* this, not the external id (which the backend would mistake for the DB key).
|
|
25
|
+
* Only set while a session runtime is active.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getActiveDbSandboxId(): string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Extract the backend port from NEXT_PUBLIC_BACKEND_URL (e.g. 8008 from
|
|
30
|
+
* "http://localhost:8008/v1"). Used for subdomain URL construction:
|
|
31
|
+
* http://p{port}-{sandboxId}.localhost:{backendPort}/
|
|
32
|
+
*/
|
|
33
|
+
export declare function getBackendPort(): number;
|
|
34
|
+
/**
|
|
35
|
+
* Subdomain URL options for the active runtime (pure-ish function).
|
|
36
|
+
*
|
|
37
|
+
* Always returns a valid options object — never undefined. Every provider routes
|
|
38
|
+
* through the same backend preview proxy; the `apiBaseUrl` field lets
|
|
39
|
+
* `rewriteLocalhostUrl` take the path-based branch on VPS/cloud deployments
|
|
40
|
+
* where *.localhost DNS isn't available. The sandbox id comes from the active
|
|
41
|
+
* runtime (no legacy 'kortix-sandbox' default — it masked the real cloud sandbox
|
|
42
|
+
* and 403'd the preview proxy).
|
|
43
|
+
*/
|
|
44
|
+
export declare function deriveSubdomainOpts(): {
|
|
45
|
+
sandboxId: string;
|
|
46
|
+
backendPort: number;
|
|
47
|
+
apiBaseUrl: string;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=active.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active.d.ts","sourceRoot":"","sources":["../../../src/state/server-store/active.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AAEH;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAQ7C;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAEvD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,SAAS,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAOvC;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB,CAMA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { platformConfig } from '../../platform/config.js';
|
|
2
|
+
import { getCurrentRuntimeDbSandboxId, getCurrentRuntimeSandboxId, getCurrentRuntimeUrl, } from '../current-runtime.js';
|
|
3
|
+
import { getBackendUrl, getDefaultSandboxUrl } from './url-helpers.js';
|
|
4
|
+
/**
|
|
5
|
+
* Active-runtime resolution, framework-free. These are the read helpers the
|
|
6
|
+
* isomorphic core (`createKortix`, the opencode client factory) resolves the
|
|
7
|
+
* runtime through; the zustand read surface in `../server-store` layers on top
|
|
8
|
+
* for React hosts.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Resolve the active OpenCode proxy URL (routed through the backend).
|
|
12
|
+
* Prefers the per-session runtime; falls back to the local-dev default sandbox.
|
|
13
|
+
* Use in non-React contexts (API modules, etc.).
|
|
14
|
+
*/
|
|
15
|
+
export function getActiveOpenCodeUrl() {
|
|
16
|
+
const current = getCurrentRuntimeUrl();
|
|
17
|
+
if (current)
|
|
18
|
+
return current;
|
|
19
|
+
// Cloud/billing deployments have no local default — wait for the session to
|
|
20
|
+
// point the runtime at its sandbox ('' tells callers to skip/retry).
|
|
21
|
+
if (platformConfig().billingEnabled ?? false)
|
|
22
|
+
return '';
|
|
23
|
+
// Self-hosted local dev: talk to the default container sandbox.
|
|
24
|
+
return getDefaultSandboxUrl();
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* sandboxId for the active runtime.
|
|
28
|
+
* - With an active session: the session's sandbox external id (current-runtime).
|
|
29
|
+
* - Otherwise: the configured default sandbox id (self-hosted local dev).
|
|
30
|
+
*/
|
|
31
|
+
export function getActiveSandboxId() {
|
|
32
|
+
return getCurrentRuntimeSandboxId() ?? platformConfig().sandboxId ?? undefined;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* DB instance id (platform `sandbox_id`) for the active runtime's sandbox.
|
|
36
|
+
*
|
|
37
|
+
* This is the stable DB primary key — distinct from the external id returned by
|
|
38
|
+
* `getActiveSandboxId()`. Ownership-scoped APIs (per-sandbox API keys) key on
|
|
39
|
+
* this, not the external id (which the backend would mistake for the DB key).
|
|
40
|
+
* Only set while a session runtime is active.
|
|
41
|
+
*/
|
|
42
|
+
export function getActiveDbSandboxId() {
|
|
43
|
+
return getCurrentRuntimeDbSandboxId() ?? undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Extract the backend port from NEXT_PUBLIC_BACKEND_URL (e.g. 8008 from
|
|
47
|
+
* "http://localhost:8008/v1"). Used for subdomain URL construction:
|
|
48
|
+
* http://p{port}-{sandboxId}.localhost:{backendPort}/
|
|
49
|
+
*/
|
|
50
|
+
export function getBackendPort() {
|
|
51
|
+
try {
|
|
52
|
+
const url = new URL(getBackendUrl());
|
|
53
|
+
return Number.parseInt(url.port, 10) || (url.protocol === 'https:' ? 443 : 80);
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
return 8008; // fallback for local dev
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Subdomain URL options for the active runtime (pure-ish function).
|
|
61
|
+
*
|
|
62
|
+
* Always returns a valid options object — never undefined. Every provider routes
|
|
63
|
+
* through the same backend preview proxy; the `apiBaseUrl` field lets
|
|
64
|
+
* `rewriteLocalhostUrl` take the path-based branch on VPS/cloud deployments
|
|
65
|
+
* where *.localhost DNS isn't available. The sandbox id comes from the active
|
|
66
|
+
* runtime (no legacy 'kortix-sandbox' default — it masked the real cloud sandbox
|
|
67
|
+
* and 403'd the preview proxy).
|
|
68
|
+
*/
|
|
69
|
+
export function deriveSubdomainOpts() {
|
|
70
|
+
return {
|
|
71
|
+
sandboxId: getActiveSandboxId() || '',
|
|
72
|
+
backendPort: getBackendPort(),
|
|
73
|
+
apiBaseUrl: getBackendUrl(),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=active.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active.js","sourceRoot":"","sources":["../../../src/state/server-store/active.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAEpE;;;;;GAKG;AAEH;;;;GAIG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IACvC,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC;IAC5B,4EAA4E;IAC5E,qEAAqE;IACrE,IAAI,cAAc,EAAE,CAAC,cAAc,IAAI,KAAK;QAAE,OAAO,EAAE,CAAC;IACxD,gEAAgE;IAChE,OAAO,oBAAoB,EAAE,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,0BAA0B,EAAE,IAAI,cAAc,EAAE,CAAC,SAAS,IAAI,SAAS,CAAC;AACjF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,4BAA4B,EAAE,IAAI,SAAS,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC;QACrC,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACjF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,CAAC,yBAAyB;IACxC,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB;IAKjC,OAAO;QACL,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE;QACrC,WAAW,EAAE,cAAc,EAAE;QAC7B,UAAU,EAAE,aAAa,EAAE;KAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thin runtime view consumed across the app. The per-session runtime is owned
|
|
3
|
+
* by `current-runtime` (set by the active session via useSession); this store is
|
|
4
|
+
* a stable read surface over it: `getActiveServerUrl()` resolves the active
|
|
5
|
+
* OpenCode proxy URL (current runtime, then the local-dev fallback).
|
|
6
|
+
*/
|
|
7
|
+
export interface ServerStore {
|
|
8
|
+
/** Resolve the active OpenCode proxy URL (current runtime + local-dev fallback). */
|
|
9
|
+
getActiveServerUrl: () => string;
|
|
10
|
+
}
|
|
11
|
+
export declare const PATH_PROXY_URL_REGEX: RegExp;
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/state/server-store/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,oFAAoF;IACpF,kBAAkB,EAAE,MAAM,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,oBAAoB,QACmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/state/server-store/types.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,oBAAoB,GAC/B,kDAAkD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The backend base URL. All sandbox traffic routes through the backend's
|
|
3
|
+
* unified preview proxy: /v1/p/{sandboxId}/{port}/*
|
|
4
|
+
*/
|
|
5
|
+
export declare function getBackendUrl(): string;
|
|
6
|
+
export declare function getDefaultSandboxUrl(): string;
|
|
7
|
+
/**
|
|
8
|
+
* Derive the proxy URL for a managed sandbox by its provider sandbox id.
|
|
9
|
+
* Always computed fresh — never persisted — so route renames can't go stale.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getSandboxServerUrl(sandboxId: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Derive the OpenCode proxy URL for a sandbox by its provider sandbox id
|
|
14
|
+
* (a project session's `external_id`). Pure function of the id — no dependency
|
|
15
|
+
* on the active server — so we can connect to several session sandboxes in
|
|
16
|
+
* parallel (e.g. background SSE streams for every open session tab).
|
|
17
|
+
*/
|
|
18
|
+
export declare function getSandboxUrlForExternalId(externalId: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Derive the base URL for the backend's UNAUTHENTICATED public-share proxy
|
|
21
|
+
* (`/v1/p/public-share/{token}/{port}` — see
|
|
22
|
+
* `apps/api/src/sandbox-proxy/routes/public-share.ts`), mirroring how
|
|
23
|
+
* {@link getSandboxUrlForExternalId} derives the authenticated
|
|
24
|
+
* `/v1/p/{externalId}/{port}` route. Pure function of the token — no
|
|
25
|
+
* dependency on the active server.
|
|
26
|
+
*
|
|
27
|
+
* The backend blocks the opencode API port (8000) on this route
|
|
28
|
+
* (`PUBLIC_SHARE_BLOCKED_PORTS` in `apps/api/src/shared/session-public-shares.ts`)
|
|
29
|
+
* — this only ever reaches a shared preview port or the file share, never a
|
|
30
|
+
* session's opencode `/session`/`/session/:id/message` API.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getPublicShareUrlForToken(token: string, port: number): string;
|
|
33
|
+
//# sourceMappingURL=url-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-helpers.d.ts","sourceRoot":"","sources":["../../../src/state/server-store/url-helpers.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAK7C;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAErE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7E"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { platformConfig } from '../../platform/config.js';
|
|
2
|
+
// Linear trailing-slash strip — the regex form (/\/+$/) backtracks
|
|
3
|
+
// quadratically on adversarial input (CodeQL js/polynomial-redos).
|
|
4
|
+
function stripTrailingSlashes(s) {
|
|
5
|
+
let end = s.length;
|
|
6
|
+
while (end > 0 && s.charCodeAt(end - 1) === 47 /* '/' */)
|
|
7
|
+
end--;
|
|
8
|
+
return s.slice(0, end);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The backend base URL. All sandbox traffic routes through the backend's
|
|
12
|
+
* unified preview proxy: /v1/p/{sandboxId}/{port}/*
|
|
13
|
+
*/
|
|
14
|
+
export function getBackendUrl() {
|
|
15
|
+
return stripTrailingSlashes(platformConfig().backendUrl || 'http://localhost:8008/v1');
|
|
16
|
+
}
|
|
17
|
+
export function getDefaultSandboxUrl() {
|
|
18
|
+
// Self-host override only; empty in cloud (the session runtime is the source
|
|
19
|
+
// of truth). No auto-default — an unconfigured id just yields an empty path.
|
|
20
|
+
const sandboxId = platformConfig().sandboxId || '';
|
|
21
|
+
return `${getBackendUrl()}/p/${sandboxId}/8000`;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Derive the proxy URL for a managed sandbox by its provider sandbox id.
|
|
25
|
+
* Always computed fresh — never persisted — so route renames can't go stale.
|
|
26
|
+
*/
|
|
27
|
+
export function getSandboxServerUrl(sandboxId) {
|
|
28
|
+
return `${getBackendUrl()}/p/${sandboxId}/8000`;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Derive the OpenCode proxy URL for a sandbox by its provider sandbox id
|
|
32
|
+
* (a project session's `external_id`). Pure function of the id — no dependency
|
|
33
|
+
* on the active server — so we can connect to several session sandboxes in
|
|
34
|
+
* parallel (e.g. background SSE streams for every open session tab).
|
|
35
|
+
*/
|
|
36
|
+
export function getSandboxUrlForExternalId(externalId) {
|
|
37
|
+
return getSandboxServerUrl(externalId);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Derive the base URL for the backend's UNAUTHENTICATED public-share proxy
|
|
41
|
+
* (`/v1/p/public-share/{token}/{port}` — see
|
|
42
|
+
* `apps/api/src/sandbox-proxy/routes/public-share.ts`), mirroring how
|
|
43
|
+
* {@link getSandboxUrlForExternalId} derives the authenticated
|
|
44
|
+
* `/v1/p/{externalId}/{port}` route. Pure function of the token — no
|
|
45
|
+
* dependency on the active server.
|
|
46
|
+
*
|
|
47
|
+
* The backend blocks the opencode API port (8000) on this route
|
|
48
|
+
* (`PUBLIC_SHARE_BLOCKED_PORTS` in `apps/api/src/shared/session-public-shares.ts`)
|
|
49
|
+
* — this only ever reaches a shared preview port or the file share, never a
|
|
50
|
+
* session's opencode `/session`/`/session/:id/message` API.
|
|
51
|
+
*/
|
|
52
|
+
export function getPublicShareUrlForToken(token, port) {
|
|
53
|
+
return `${getBackendUrl()}/p/public-share/${token}/${port}`;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=url-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-helpers.js","sourceRoot":"","sources":["../../../src/state/server-store/url-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,mEAAmE;AACnE,mEAAmE;AACnE,SAAS,oBAAoB,CAAC,CAAS;IACrC,IAAI,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC;IACnB,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,SAAS;QAAE,GAAG,EAAE,CAAC;IAChE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACzB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,oBAAoB,CAAC,cAAc,EAAE,CAAC,UAAU,IAAI,0BAA0B,CAAC,CAAC;AACzF,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,6EAA6E;IAC7E,6EAA6E;IAC7E,MAAM,SAAS,GAAG,cAAc,EAAE,CAAC,SAAS,IAAI,EAAE,CAAC;IACnD,OAAO,GAAG,aAAa,EAAE,MAAM,SAAS,OAAO,CAAC;AAClD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAiB;IACnD,OAAO,GAAG,aAAa,EAAE,MAAM,SAAS,OAAO,CAAC;AAClD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,UAAkB;IAC3D,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAa,EAAE,IAAY;IACnE,OAAO,GAAG,aAAa,EAAE,mBAAmB,KAAK,IAAI,IAAI,EAAE,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ServerStore } from './server-store/types.js';
|
|
2
|
+
export { getSandboxUrlForExternalId, getPublicShareUrlForToken } from './server-store/url-helpers.js';
|
|
3
|
+
export { deriveSubdomainOpts, getActiveDbSandboxId, getActiveOpenCodeUrl, getActiveSandboxId, getBackendPort, } from './server-store/active.js';
|
|
4
|
+
/**
|
|
5
|
+
* server-store — a thin, read-only view over the per-session runtime.
|
|
6
|
+
*
|
|
7
|
+
* The runtime (which sandbox the app talks to) is owned by `current-runtime`,
|
|
8
|
+
* set by the active session via `useSession`. This store exposes it as a stable
|
|
9
|
+
* surface: `getActiveServerUrl()` resolves the active OpenCode proxy URL. The
|
|
10
|
+
* old multi-instance registry, the persisted server list, and the server-
|
|
11
|
+
* switching machinery are gone — there is no "active server" to switch.
|
|
12
|
+
*
|
|
13
|
+
* The resolution helpers themselves live in `./server-store/active` (framework-
|
|
14
|
+
* free, part of the isomorphic core); this module adds only the zustand read
|
|
15
|
+
* surface for React hosts.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useServerStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ServerStore>>;
|
|
18
|
+
//# sourceMappingURL=server-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-store.d.ts","sourceRoot":"","sources":["../../src/state/server-store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACnG,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAE/B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,0EAExB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { create } from 'zustand';
|
|
2
|
+
import { getActiveOpenCodeUrl } from './server-store/active.js';
|
|
3
|
+
// Re-export the public surface that lives in sibling modules so importers of
|
|
4
|
+
// '../state/server-store' (and '@kortix/sdk/server-store') stay unchanged.
|
|
5
|
+
export { getSandboxUrlForExternalId, getPublicShareUrlForToken } from './server-store/url-helpers.js';
|
|
6
|
+
export { deriveSubdomainOpts, getActiveDbSandboxId, getActiveOpenCodeUrl, getActiveSandboxId, getBackendPort, } from './server-store/active.js';
|
|
7
|
+
/**
|
|
8
|
+
* server-store — a thin, read-only view over the per-session runtime.
|
|
9
|
+
*
|
|
10
|
+
* The runtime (which sandbox the app talks to) is owned by `current-runtime`,
|
|
11
|
+
* set by the active session via `useSession`. This store exposes it as a stable
|
|
12
|
+
* surface: `getActiveServerUrl()` resolves the active OpenCode proxy URL. The
|
|
13
|
+
* old multi-instance registry, the persisted server list, and the server-
|
|
14
|
+
* switching machinery are gone — there is no "active server" to switch.
|
|
15
|
+
*
|
|
16
|
+
* The resolution helpers themselves live in `./server-store/active` (framework-
|
|
17
|
+
* free, part of the isomorphic core); this module adds only the zustand read
|
|
18
|
+
* surface for React hosts.
|
|
19
|
+
*/
|
|
20
|
+
export const useServerStore = create(() => ({
|
|
21
|
+
getActiveServerUrl: () => getActiveOpenCodeUrl(),
|
|
22
|
+
}));
|
|
23
|
+
//# sourceMappingURL=server-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-store.js","sourceRoot":"","sources":["../../src/state/server-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAG7D,6EAA6E;AAC7E,2EAA2E;AAC3E,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACnG,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAE/B;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAc,GAAG,EAAE,CAAC,CAAC;IACvD,kBAAkB,EAAE,GAAG,EAAE,CAAC,oBAAoB,EAAE;CACjD,CAAC,CAAC,CAAC"}
|