@kortix/sdk 0.13.46 → 0.13.48
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 +67 -44
- package/dist/browser/session-sync/server-transcript-mirror.d.ts +1 -1
- package/dist/browser/session-sync/server-transcript-mirror.d.ts.map +1 -1
- package/dist/browser/session-sync/session-sync-registry.d.ts +1 -1
- package/dist/browser/session-sync/session-sync-registry.d.ts.map +1 -1
- package/dist/browser/session-sync/visibility.d.ts +0 -12
- package/dist/browser/session-sync/visibility.d.ts.map +1 -1
- package/dist/browser/session-sync/visibility.js +23 -2
- package/dist/browser/session-sync/visibility.js.map +1 -1
- package/dist/browser/stores/opencode-pending-store.d.ts +1 -1
- package/dist/browser/stores/opencode-pending-store.d.ts.map +1 -1
- package/dist/browser/stores/sandbox-connection-store.d.ts +8 -0
- package/dist/browser/stores/sandbox-connection-store.d.ts.map +1 -1
- package/dist/browser/stores/sandbox-connection-store.js +14 -0
- package/dist/browser/stores/sandbox-connection-store.js.map +1 -1
- package/dist/browser/stores/sync-store/reconcile-parts.d.ts +1 -1
- package/dist/browser/stores/sync-store/reconcile-parts.d.ts.map +1 -1
- package/dist/browser/stores/sync-store/types.d.ts +1 -1
- package/dist/browser/stores/sync-store/types.d.ts.map +1 -1
- package/dist/browser/stores/sync-store.d.ts +1 -1
- package/dist/browser/stores/sync-store.d.ts.map +1 -1
- package/dist/browser/stores/sync-store.js +79 -60
- package/dist/browser/stores/sync-store.js.map +1 -1
- package/dist/core/agents/composer-agents.d.ts +8 -6
- package/dist/core/agents/composer-agents.d.ts.map +1 -1
- package/dist/core/agents/composer-agents.js +3 -3
- package/dist/core/agents/composer-agents.js.map +1 -1
- package/dist/core/client/binding-types.d.ts +2 -0
- package/dist/core/client/binding-types.d.ts.map +1 -0
- package/dist/core/client/binding-types.js +2 -0
- package/dist/core/client/binding-types.js.map +1 -0
- package/dist/core/client/facade-accounts.d.ts +57 -0
- package/dist/core/client/facade-accounts.d.ts.map +1 -0
- package/dist/core/client/facade-accounts.js +59 -0
- package/dist/core/client/facade-accounts.js.map +1 -0
- package/dist/core/client/facade-catalog.d.ts +58 -0
- package/dist/core/client/facade-catalog.d.ts.map +1 -0
- package/dist/core/client/facade-catalog.js +70 -0
- package/dist/core/client/facade-catalog.js.map +1 -0
- package/dist/core/client/facade-commerce.d.ts +45 -0
- package/dist/core/client/facade-commerce.d.ts.map +1 -0
- package/dist/core/client/facade-commerce.js +53 -0
- package/dist/core/client/facade-commerce.js.map +1 -0
- package/dist/core/client/facade-iam.d.ts +54 -0
- package/dist/core/client/facade-iam.d.ts.map +1 -0
- package/dist/core/client/facade-iam.js +62 -0
- package/dist/core/client/facade-iam.js.map +1 -0
- package/dist/core/client/facade-identity.d.ts +104 -0
- package/dist/core/client/facade-identity.d.ts.map +1 -0
- package/dist/core/client/facade-identity.js +36 -0
- package/dist/core/client/facade-identity.js.map +1 -0
- package/dist/core/client/facade-preview.d.ts +4 -0
- package/dist/core/client/facade-preview.d.ts.map +1 -0
- package/dist/core/client/facade-preview.js +61 -0
- package/dist/core/client/facade-preview.js.map +1 -0
- package/dist/core/client/kortix.d.ts +662 -985
- package/dist/core/client/kortix.d.ts.map +1 -1
- package/dist/core/client/kortix.js +31 -1162
- package/dist/core/client/kortix.js.map +1 -1
- package/dist/core/client/project-access-resources.d.ts +38 -0
- package/dist/core/client/project-access-resources.d.ts.map +1 -0
- package/dist/core/client/project-access-resources.js +37 -0
- package/dist/core/client/project-access-resources.js.map +1 -0
- package/dist/core/client/project-access-security.d.ts +117 -0
- package/dist/core/client/project-access-security.d.ts.map +1 -0
- package/dist/core/client/project-access-security.js +41 -0
- package/dist/core/client/project-access-security.js.map +1 -0
- package/dist/core/client/project-connections.d.ts +34 -0
- package/dist/core/client/project-connections.d.ts.map +1 -0
- package/dist/core/client/project-connections.js +20 -0
- package/dist/core/client/project-connections.js.map +1 -0
- package/dist/core/client/project-connectors.d.ts +21 -0
- package/dist/core/client/project-connectors.d.ts.map +1 -0
- package/dist/core/client/project-connectors.js +20 -0
- package/dist/core/client/project-connectors.js.map +1 -0
- package/dist/core/client/project-core.d.ts +72 -0
- package/dist/core/client/project-core.d.ts.map +1 -0
- package/dist/core/client/project-core.js +24 -0
- package/dist/core/client/project-core.js.map +1 -0
- package/dist/core/client/project-membership.d.ts +64 -0
- package/dist/core/client/project-membership.d.ts.map +1 -0
- package/dist/core/client/project-membership.js +26 -0
- package/dist/core/client/project-membership.js.map +1 -0
- package/dist/core/client/project-operations-admin.d.ts +112 -0
- package/dist/core/client/project-operations-admin.d.ts.map +1 -0
- package/dist/core/client/project-operations-admin.js +24 -0
- package/dist/core/client/project-operations-admin.js.map +1 -0
- package/dist/core/client/project-operations-review.d.ts +44 -0
- package/dist/core/client/project-operations-review.d.ts.map +1 -0
- package/dist/core/client/project-operations-review.js +34 -0
- package/dist/core/client/project-operations-review.js.map +1 -0
- package/dist/core/client/project-operations-workspace.d.ts +91 -0
- package/dist/core/client/project-operations-workspace.d.ts.map +1 -0
- package/dist/core/client/project-operations-workspace.js +36 -0
- package/dist/core/client/project-operations-workspace.js.map +1 -0
- package/dist/core/client/project-operations.d.ts +225 -0
- package/dist/core/client/project-operations.d.ts.map +1 -0
- package/dist/core/client/project-operations.js +47 -0
- package/dist/core/client/project-operations.js.map +1 -0
- package/dist/core/client/project-platform-resources.d.ts +36 -0
- package/dist/core/client/project-platform-resources.d.ts.map +1 -0
- package/dist/core/client/project-platform-resources.js +29 -0
- package/dist/core/client/project-platform-resources.js.map +1 -0
- package/dist/core/client/project-platform-security.d.ts +83 -0
- package/dist/core/client/project-platform-security.d.ts.map +1 -0
- package/dist/core/client/project-platform-security.js +39 -0
- package/dist/core/client/project-platform-security.js.map +1 -0
- package/dist/core/client/project-platform-settings.d.ts +58 -0
- package/dist/core/client/project-platform-settings.d.ts.map +1 -0
- package/dist/core/client/project-platform-settings.js +28 -0
- package/dist/core/client/project-platform-settings.js.map +1 -0
- package/dist/core/client/session-actions-resources.d.ts +18 -0
- package/dist/core/client/session-actions-resources.d.ts.map +1 -0
- package/dist/core/client/session-actions-resources.js +31 -0
- package/dist/core/client/session-actions-resources.js.map +1 -0
- package/dist/core/client/session-actions-security.d.ts +31 -0
- package/dist/core/client/session-actions-security.d.ts.map +1 -0
- package/dist/core/client/session-actions-security.js +51 -0
- package/dist/core/client/session-actions-security.js.map +1 -0
- package/dist/core/client/session-actions-services.d.ts +64 -0
- package/dist/core/client/session-actions-services.d.ts.map +1 -0
- package/dist/core/client/session-actions-services.js +59 -0
- package/dist/core/client/session-actions-services.js.map +1 -0
- package/dist/core/client/session-context.d.ts +22 -0
- package/dist/core/client/session-context.d.ts.map +1 -0
- package/dist/core/client/session-context.js +2 -0
- package/dist/core/client/session-context.js.map +1 -0
- package/dist/core/client/session-defaults.d.ts +9 -0
- package/dist/core/client/session-defaults.d.ts.map +1 -0
- package/dist/core/client/session-defaults.js +45 -0
- package/dist/core/client/session-defaults.js.map +1 -0
- package/dist/core/client/session-files.d.ts +26 -0
- package/dist/core/client/session-files.d.ts.map +1 -0
- package/dist/core/client/session-files.js +24 -0
- package/dist/core/client/session-files.js.map +1 -0
- package/dist/core/client/session-handle.d.ts +186 -0
- package/dist/core/client/session-handle.d.ts.map +1 -0
- package/dist/core/client/session-handle.js +68 -0
- package/dist/core/client/session-handle.js.map +1 -0
- package/dist/core/client/session-lifecycle-resources.d.ts +67 -0
- package/dist/core/client/session-lifecycle-resources.d.ts.map +1 -0
- package/dist/core/client/session-lifecycle-resources.js +56 -0
- package/dist/core/client/session-lifecycle-resources.js.map +1 -0
- package/dist/core/client/session-lifecycle-security.d.ts +65 -0
- package/dist/core/client/session-lifecycle-security.d.ts.map +1 -0
- package/dist/core/client/session-lifecycle-security.js +54 -0
- package/dist/core/client/session-lifecycle-security.js.map +1 -0
- package/dist/core/client/session-preview.d.ts +26 -0
- package/dist/core/client/session-preview.d.ts.map +1 -0
- package/dist/core/client/session-preview.js +31 -0
- package/dist/core/client/session-preview.js.map +1 -0
- package/dist/core/client/session-readiness.d.ts +11 -0
- package/dist/core/client/session-readiness.d.ts.map +1 -0
- package/dist/core/client/session-readiness.js +77 -0
- package/dist/core/client/session-readiness.js.map +1 -0
- package/dist/core/client/session-runtime.d.ts +35 -0
- package/dist/core/client/session-runtime.d.ts.map +1 -0
- package/dist/core/client/session-runtime.js +30 -0
- package/dist/core/client/session-runtime.js.map +1 -0
- package/dist/core/client/session-shared.d.ts +46 -0
- package/dist/core/client/session-shared.d.ts.map +1 -0
- package/dist/core/client/session-shared.js +48 -0
- package/dist/core/client/session-shared.js.map +1 -0
- package/dist/core/client/session-start.d.ts +3 -0
- package/dist/core/client/session-start.d.ts.map +1 -0
- package/dist/core/client/session-start.js +60 -0
- package/dist/core/client/session-start.js.map +1 -0
- package/dist/core/files/client.d.ts.map +1 -1
- package/dist/core/files/client.js +29 -3
- package/dist/core/files/client.js.map +1 -1
- package/dist/core/http/api-client.d.ts.map +1 -1
- package/dist/core/http/api-client.js +2 -419
- package/dist/core/http/api-client.js.map +1 -1
- package/dist/core/http/config.d.ts +15 -0
- package/dist/core/http/config.d.ts.map +1 -1
- package/dist/core/http/config.js.map +1 -1
- package/dist/core/http/request.d.ts +3 -0
- package/dist/core/http/request.d.ts.map +1 -0
- package/dist/core/http/request.js +215 -0
- package/dist/core/http/request.js.map +1 -0
- package/dist/core/http/response-error.d.ts +3 -0
- package/dist/core/http/response-error.d.ts.map +1 -0
- package/dist/core/http/response-error.js +113 -0
- package/dist/core/http/response-error.js.map +1 -0
- package/dist/core/http/runtime-errors.d.ts +23 -0
- package/dist/core/http/runtime-errors.d.ts.map +1 -1
- package/dist/core/http/runtime-errors.js +39 -1
- package/dist/core/http/runtime-errors.js.map +1 -1
- package/dist/core/http/transport.d.ts +13 -1
- package/dist/core/http/transport.d.ts.map +1 -1
- package/dist/core/http/transport.js +25 -4
- package/dist/core/http/transport.js.map +1 -1
- package/dist/core/models/composer-model.d.ts +1 -1
- package/dist/core/models/composer-model.d.ts.map +1 -1
- package/dist/core/models/model-flatten.d.ts +8 -1
- package/dist/core/models/model-flatten.d.ts.map +1 -1
- package/dist/core/models/model-flatten.js +2 -0
- package/dist/core/models/model-flatten.js.map +1 -1
- package/dist/core/models/model-key.d.ts +11 -0
- package/dist/core/models/model-key.d.ts.map +1 -1
- package/dist/core/models/model-key.js +20 -0
- package/dist/core/models/model-key.js.map +1 -1
- package/dist/core/models/provider-selection.d.ts +1 -1
- package/dist/core/models/provider-selection.d.ts.map +1 -1
- package/dist/core/rest/platform-client/host-boundary.d.ts +14 -19
- package/dist/core/rest/platform-client/host-boundary.d.ts.map +1 -1
- package/dist/core/rest/platform-client/host-boundary.js +7 -38
- package/dist/core/rest/platform-client/host-boundary.js.map +1 -1
- package/dist/core/rest/projects-client/admin-providers.d.ts +64 -3
- package/dist/core/rest/projects-client/admin-providers.d.ts.map +1 -1
- package/dist/core/rest/projects-client/admin-providers.js.map +1 -1
- package/dist/core/rest/projects-client/agent-config.d.ts +8 -0
- package/dist/core/rest/projects-client/agent-config.d.ts.map +1 -1
- package/dist/core/rest/projects-client/agent-config.js.map +1 -1
- package/dist/core/rest/projects-client/apps.d.ts +30 -0
- package/dist/core/rest/projects-client/apps.d.ts.map +1 -1
- package/dist/core/rest/projects-client/apps.js +10 -0
- package/dist/core/rest/projects-client/apps.js.map +1 -1
- package/dist/core/rest/projects-client/audit-filter.d.ts +6 -0
- package/dist/core/rest/projects-client/audit-filter.d.ts.map +1 -0
- package/dist/core/rest/projects-client/audit-filter.js +11 -0
- package/dist/core/rest/projects-client/audit-filter.js.map +1 -0
- package/dist/core/rest/projects-client/audit.d.ts +6 -18
- package/dist/core/rest/projects-client/audit.d.ts.map +1 -1
- package/dist/core/rest/projects-client/audit.js +30 -108
- package/dist/core/rest/projects-client/audit.js.map +1 -1
- package/dist/core/rest/projects-client/channels.d.ts +19 -0
- package/dist/core/rest/projects-client/channels.d.ts.map +1 -1
- package/dist/core/rest/projects-client/channels.js.map +1 -1
- package/dist/core/rest/projects-client/connectors.d.ts +4 -3
- package/dist/core/rest/projects-client/connectors.d.ts.map +1 -1
- package/dist/core/rest/projects-client/connectors.js.map +1 -1
- package/dist/core/rest/projects-client/iam-roles.d.ts +5 -0
- package/dist/core/rest/projects-client/iam-roles.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam-roles.js +9 -0
- package/dist/core/rest/projects-client/iam-roles.js.map +1 -1
- package/dist/core/rest/projects-client/projects.d.ts +11 -6
- package/dist/core/rest/projects-client/projects.d.ts.map +1 -1
- package/dist/core/rest/projects-client/projects.js +0 -2
- package/dist/core/rest/projects-client/projects.js.map +1 -1
- package/dist/core/rest/projects-client/secrets.d.ts +61 -8
- package/dist/core/rest/projects-client/secrets.d.ts.map +1 -1
- package/dist/core/rest/projects-client/secrets.js +52 -0
- package/dist/core/rest/projects-client/secrets.js.map +1 -1
- package/dist/core/rest/projects-client/session-sandbox.d.ts +6 -0
- package/dist/core/rest/projects-client/session-sandbox.d.ts.map +1 -1
- package/dist/core/rest/projects-client/session-sandbox.js.map +1 -1
- package/dist/core/rest/projects-client/sessions.d.ts +49 -24
- package/dist/core/rest/projects-client/sessions.d.ts.map +1 -1
- package/dist/core/rest/projects-client/sessions.js +33 -4
- package/dist/core/rest/projects-client/sessions.js.map +1 -1
- package/dist/core/rest/projects-client/triggers.d.ts +12 -0
- package/dist/core/rest/projects-client/triggers.d.ts.map +1 -1
- package/dist/core/rest/projects-client/triggers.js.map +1 -1
- package/dist/core/runtime/client.d.ts +12 -11
- package/dist/core/runtime/client.d.ts.map +1 -1
- package/dist/core/runtime/client.js +36 -5
- package/dist/core/runtime/client.js.map +1 -1
- package/dist/core/runtime/runtime-rest-client.d.ts +462 -0
- package/dist/core/runtime/runtime-rest-client.d.ts.map +1 -0
- package/dist/core/runtime/runtime-rest-client.js +309 -0
- package/dist/core/runtime/runtime-rest-client.js.map +1 -0
- package/dist/core/runtime/runtime-types.d.ts +1174 -0
- package/dist/core/runtime/runtime-types.d.ts.map +1 -0
- package/dist/core/runtime/runtime-types.js +2 -0
- package/dist/core/runtime/runtime-types.js.map +1 -0
- package/dist/core/runtime/transcript-types.d.ts +564 -0
- package/dist/core/runtime/transcript-types.d.ts.map +1 -0
- package/dist/core/runtime/transcript-types.js +57 -0
- package/dist/core/runtime/transcript-types.js.map +1 -0
- package/dist/core/session/health.d.ts +2 -1
- package/dist/core/session/health.d.ts.map +1 -1
- package/dist/core/session/health.js.map +1 -1
- package/dist/core/session/host-signals.d.ts +16 -0
- package/dist/core/session/host-signals.d.ts.map +1 -0
- package/dist/core/session/host-signals.js +20 -0
- package/dist/core/session/host-signals.js.map +1 -0
- package/dist/core/session/index.d.ts +3 -0
- package/dist/core/session/index.d.ts.map +1 -1
- package/dist/core/session/index.js +2 -0
- package/dist/core/session/index.js.map +1 -1
- package/dist/core/session/open-bundle.d.ts +16 -0
- package/dist/core/session/open-bundle.d.ts.map +1 -1
- package/dist/core/session/open-bundle.js +31 -0
- package/dist/core/session/open-bundle.js.map +1 -1
- package/dist/core/session/runtime-sessions.d.ts +26 -0
- package/dist/core/session/runtime-sessions.d.ts.map +1 -0
- package/dist/core/session/runtime-sessions.js +39 -0
- package/dist/core/session/runtime-sessions.js.map +1 -0
- package/dist/core/session/runtime-verbs.d.ts +55 -0
- package/dist/core/session/runtime-verbs.d.ts.map +1 -0
- package/dist/core/session/runtime-verbs.js +124 -0
- package/dist/core/session/runtime-verbs.js.map +1 -0
- package/dist/core/session/wake-escalation.d.ts +1 -1
- package/dist/core/session/wake-escalation.js +1 -1
- package/dist/core/session/wire-message-id.d.ts +55 -12
- package/dist/core/session/wire-message-id.d.ts.map +1 -1
- package/dist/core/session/wire-message-id.js +62 -12
- package/dist/core/session/wire-message-id.js.map +1 -1
- package/dist/core/session/working-evidence.d.ts +15 -0
- package/dist/core/session/working-evidence.d.ts.map +1 -0
- package/dist/core/session/working-evidence.js +27 -0
- package/dist/core/session/working-evidence.js.map +1 -0
- package/dist/core/session/working-project.d.ts +3 -0
- package/dist/core/session/working-project.d.ts.map +1 -0
- package/dist/core/session/working-project.js +187 -0
- package/dist/core/session/working-project.js.map +1 -0
- package/dist/core/session/working-runtime.d.ts +33 -0
- package/dist/core/session/working-runtime.d.ts.map +1 -0
- package/dist/core/session/working-runtime.js +46 -0
- package/dist/core/session/working-runtime.js.map +1 -0
- package/dist/core/session/working-time.d.ts +2 -0
- package/dist/core/session/working-time.d.ts.map +1 -0
- package/dist/core/session/working-time.js +7 -0
- package/dist/core/session/working-time.js.map +1 -0
- package/dist/core/session/working.d.ts.map +1 -1
- package/dist/core/session/working.js +2 -316
- package/dist/core/session/working.js.map +1 -1
- package/dist/core/session-sync/session-sync-controller.d.ts +1 -1
- package/dist/core/session-sync/session-sync-controller.d.ts.map +1 -1
- package/dist/core/stream/event-stream.d.ts +25 -6
- package/dist/core/stream/event-stream.d.ts.map +1 -1
- package/dist/core/stream/event-stream.js +63 -9
- package/dist/core/stream/event-stream.js.map +1 -1
- package/dist/core/turns/classify.d.ts +31 -2
- package/dist/core/turns/classify.d.ts.map +1 -1
- package/dist/core/turns/classify.js +94 -0
- package/dist/core/turns/classify.js.map +1 -1
- package/dist/core/turns/index.d.ts +1 -0
- package/dist/core/turns/index.d.ts.map +1 -1
- package/dist/core/turns/index.js +1 -0
- package/dist/core/turns/index.js.map +1 -1
- package/dist/core/turns/parts.d.ts +6 -1
- package/dist/core/turns/parts.d.ts.map +1 -1
- package/dist/core/turns/parts.js +57 -49
- package/dist/core/turns/parts.js.map +1 -1
- package/dist/core/turns/segments/narration.d.ts.map +1 -1
- package/dist/core/turns/segments/narration.js +40 -130
- package/dist/core/turns/segments/narration.js.map +1 -1
- package/dist/core/turns/segments/turn-busy-visibility.d.ts +1 -1
- package/dist/core/turns/segments/turn-busy-visibility.js +1 -1
- package/dist/core/turns/segments/working-turn.js +1 -1
- package/dist/core/turns/segments/working-turn.js.map +1 -1
- package/dist/core/turns/tool-kind.d.ts +15 -0
- package/dist/core/turns/tool-kind.d.ts.map +1 -0
- package/dist/core/turns/tool-kind.js +115 -0
- package/dist/core/turns/tool-kind.js.map +1 -0
- package/dist/core/turns/tool-registry.d.ts +6 -7
- package/dist/core/turns/tool-registry.d.ts.map +1 -1
- package/dist/core/turns/tool-registry.js +78 -73
- package/dist/core/turns/tool-registry.js.map +1 -1
- package/dist/core/turns/tools/tool-meta.d.ts +1 -0
- package/dist/core/turns/tools/tool-meta.d.ts.map +1 -1
- package/dist/core/turns/tools/tool-meta.js +7 -6
- package/dist/core/turns/tools/tool-meta.js.map +1 -1
- package/dist/core/turns/view-model.d.ts.map +1 -1
- package/dist/core/turns/view-model.js +19 -12
- package/dist/core/turns/view-model.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/kortix.esm.min.js +46 -45
- package/dist/kortix.global.js +46 -45
- package/dist/node/app-viewer.js +1 -1
- package/dist/node/app-viewer.js.map +1 -1
- package/dist/node/auth.js +1 -1
- package/dist/node/auth.js.map +1 -1
- package/dist/node/scoped-client.d.ts +20 -0
- package/dist/node/scoped-client.d.ts.map +1 -0
- package/dist/node/scoped-client.js +170 -0
- package/dist/node/scoped-client.js.map +1 -0
- package/dist/node/server.d.ts +2 -21
- package/dist/node/server.d.ts.map +1 -1
- package/dist/node/server.js +2 -170
- package/dist/node/server.js.map +1 -1
- package/dist/react/index.d.ts +4 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +3 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/prefetch-session-open.d.ts +13 -0
- package/dist/react/prefetch-session-open.d.ts.map +1 -1
- package/dist/react/prefetch-session-open.js +22 -1
- package/dist/react/prefetch-session-open.js.map +1 -1
- package/dist/react/query-keys.d.ts +3 -2
- package/dist/react/query-keys.d.ts.map +1 -1
- package/dist/react/query-keys.js +4 -4
- package/dist/react/query-keys.js.map +1 -1
- package/dist/react/sign-in-with-kortix.d.ts +8 -8
- package/dist/react/use-admin-providers.d.ts +18 -0
- package/dist/react/use-admin-providers.d.ts.map +1 -0
- package/dist/react/use-admin-providers.js +36 -0
- package/dist/react/use-admin-providers.js.map +1 -0
- package/dist/react/use-feature-flag.d.ts +2 -2
- package/dist/react/use-feature-flag.d.ts.map +1 -1
- package/dist/react/use-feature-flag.js +3 -2
- package/dist/react/use-feature-flag.js.map +1 -1
- package/dist/react/use-kortix-master.d.ts +1 -1
- package/dist/react/use-opencode-config.d.ts +7 -1
- package/dist/react/use-opencode-config.d.ts.map +1 -1
- package/dist/react/use-opencode-config.js +9 -1
- package/dist/react/use-opencode-config.js.map +1 -1
- package/dist/react/use-opencode-events/diagnostics.d.ts +1 -1
- package/dist/react/use-opencode-events/diagnostics.d.ts.map +1 -1
- package/dist/react/use-opencode-events/handle-event.d.ts +4 -6
- package/dist/react/use-opencode-events/handle-event.d.ts.map +1 -1
- package/dist/react/use-opencode-events/handle-event.js +43 -594
- package/dist/react/use-opencode-events/handle-event.js.map +1 -1
- package/dist/react/use-opencode-events/handle-interaction-event.d.ts +4 -0
- package/dist/react/use-opencode-events/handle-interaction-event.d.ts.map +1 -0
- package/dist/react/use-opencode-events/handle-interaction-event.js +42 -0
- package/dist/react/use-opencode-events/handle-interaction-event.js.map +1 -0
- package/dist/react/use-opencode-events/handle-message-event.d.ts +4 -0
- package/dist/react/use-opencode-events/handle-message-event.d.ts.map +1 -0
- package/dist/react/use-opencode-events/handle-message-event.js +33 -0
- package/dist/react/use-opencode-events/handle-message-event.js.map +1 -0
- package/dist/react/use-opencode-events/handle-session-event.d.ts +5 -0
- package/dist/react/use-opencode-events/handle-session-event.d.ts.map +1 -0
- package/dist/react/use-opencode-events/handle-session-event.js +243 -0
- package/dist/react/use-opencode-events/handle-session-event.js.map +1 -0
- package/dist/react/use-opencode-events/handle-workspace-event.d.ts +4 -0
- package/dist/react/use-opencode-events/handle-workspace-event.d.ts.map +1 -0
- package/dist/react/use-opencode-events/handle-workspace-event.js +113 -0
- package/dist/react/use-opencode-events/handle-workspace-event.js.map +1 -0
- package/dist/react/use-opencode-events/handler-context.d.ts +29 -0
- package/dist/react/use-opencode-events/handler-context.d.ts.map +1 -0
- package/dist/react/use-opencode-events/handler-context.js +2 -0
- package/dist/react/use-opencode-events/handler-context.js.map +1 -0
- package/dist/react/use-opencode-events/hydrate-core.d.ts +23 -0
- package/dist/react/use-opencode-events/hydrate-core.d.ts.map +1 -0
- package/dist/react/use-opencode-events/hydrate-core.js +126 -0
- package/dist/react/use-opencode-events/hydrate-core.js.map +1 -0
- package/dist/react/use-opencode-events/index.d.ts +1 -0
- package/dist/react/use-opencode-events/index.d.ts.map +1 -1
- package/dist/react/use-opencode-events/index.js +40 -143
- package/dist/react/use-opencode-events/index.js.map +1 -1
- package/dist/react/use-opencode-events/runtime-stream-signals.d.ts +45 -0
- package/dist/react/use-opencode-events/runtime-stream-signals.d.ts.map +1 -0
- package/dist/react/use-opencode-events/runtime-stream-signals.js +32 -0
- package/dist/react/use-opencode-events/runtime-stream-signals.js.map +1 -0
- package/dist/react/use-opencode-events/stream-revival.d.ts +0 -21
- package/dist/react/use-opencode-events/stream-revival.d.ts.map +1 -1
- package/dist/react/use-opencode-events/stream-revival.js +33 -2
- package/dist/react/use-opencode-events/stream-revival.js.map +1 -1
- package/dist/react/use-opencode-events/use-event-stream-refs.d.ts +1 -1
- package/dist/react/use-opencode-events/use-event-stream-refs.d.ts.map +1 -1
- package/dist/react/use-opencode-local.d.ts +1 -1
- package/dist/react/use-opencode-local.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/agents.d.ts +1 -1
- package/dist/react/use-opencode-sessions/agents.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/commands.d.ts +4 -1
- package/dist/react/use-opencode-sessions/commands.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/commands.js +6 -1
- package/dist/react/use-opencode-sessions/commands.js.map +1 -1
- package/dist/react/use-opencode-sessions/files.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/files.js +8 -33
- package/dist/react/use-opencode-sessions/files.js.map +1 -1
- package/dist/react/use-opencode-sessions/keys.d.ts +12 -1
- package/dist/react/use-opencode-sessions/keys.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/keys.js +10 -0
- package/dist/react/use-opencode-sessions/keys.js.map +1 -1
- package/dist/react/use-opencode-sessions/mcp.d.ts +1 -1
- package/dist/react/use-opencode-sessions/mcp.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/messages.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/messages.js +8 -2
- package/dist/react/use-opencode-sessions/messages.js.map +1 -1
- package/dist/react/use-opencode-sessions/parts.d.ts +2 -2
- package/dist/react/use-opencode-sessions/parts.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/projects.d.ts +1 -1
- package/dist/react/use-opencode-sessions/projects.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/providers.d.ts +1 -1
- package/dist/react/use-opencode-sessions/providers.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/providers.js +12 -2
- package/dist/react/use-opencode-sessions/providers.js.map +1 -1
- package/dist/react/use-opencode-sessions/sessions.d.ts +8 -3
- package/dist/react/use-opencode-sessions/sessions.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/sessions.js +9 -2
- package/dist/react/use-opencode-sessions/sessions.js.map +1 -1
- package/dist/react/use-opencode-sessions/shared.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/shared.js +6 -1
- package/dist/react/use-opencode-sessions/shared.js.map +1 -1
- package/dist/react/use-opencode-sessions/sharing.d.ts +1 -1
- package/dist/react/use-opencode-sessions/sharing.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/vcs.d.ts +1 -1
- package/dist/react/use-opencode-sessions/vcs.d.ts.map +1 -1
- package/dist/react/use-project-apps.d.ts +6 -0
- package/dist/react/use-project-apps.d.ts.map +1 -1
- package/dist/react/use-project-gateway.d.ts +28 -0
- package/dist/react/use-project-gateway.d.ts.map +1 -0
- package/dist/react/use-project-gateway.js +120 -0
- package/dist/react/use-project-gateway.js.map +1 -0
- package/dist/react/use-project-secrets.d.ts +6 -6
- package/dist/react/use-project-sessions.d.ts +1 -1
- package/dist/react/use-project-sessions.d.ts.map +1 -1
- package/dist/react/use-project-sessions.js +2 -3
- package/dist/react/use-project-sessions.js.map +1 -1
- package/dist/react/use-session-messages.d.ts +4 -2
- package/dist/react/use-session-messages.d.ts.map +1 -1
- package/dist/react/use-session-messages.js +1 -1
- package/dist/react/use-session-messages.js.map +1 -1
- package/dist/react/use-session-participants.d.ts +10 -0
- package/dist/react/use-session-participants.d.ts.map +1 -0
- package/dist/react/use-session-participants.js +19 -0
- package/dist/react/use-session-participants.js.map +1 -0
- package/dist/react/use-session-prompts.d.ts +6 -0
- package/dist/react/use-session-prompts.d.ts.map +1 -1
- package/dist/react/use-session-prompts.js +17 -1
- package/dist/react/use-session-prompts.js.map +1 -1
- package/dist/react/use-session-sync.d.ts +4 -5
- package/dist/react/use-session-sync.d.ts.map +1 -1
- package/dist/react/use-session-sync.js +4 -1
- package/dist/react/use-session-sync.js.map +1 -1
- package/dist/react/use-session-transcript-history.d.ts.map +1 -1
- package/dist/react/use-session-transcript-history.js +14 -5
- package/dist/react/use-session-transcript-history.js.map +1 -1
- package/dist/react/use-session-working.d.ts +1 -1
- package/dist/react/use-session-working.d.ts.map +1 -1
- package/dist/react/use-session.d.ts +21 -9
- package/dist/react/use-session.d.ts.map +1 -1
- package/dist/react/use-session.js +64 -17
- package/dist/react/use-session.js.map +1 -1
- package/dist/react/use-teams-installations.d.ts +14 -0
- package/dist/react/use-teams-installations.d.ts.map +1 -1
- package/dist/react/use-teams-installations.js.map +1 -1
- package/dist/react/use-tunnel.d.ts +9 -0
- package/dist/react/use-tunnel.d.ts.map +1 -1
- package/dist/react/use-tunnel.js +9 -3
- package/dist/react/use-tunnel.js.map +1 -1
- package/dist/react/use-visible-agents.d.ts +1 -1
- package/dist/react/use-visible-agents.d.ts.map +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transcript.d.ts.map +1 -1
- package/dist/workspace-search/client.d.ts +20 -0
- package/dist/workspace-search/client.d.ts.map +1 -0
- package/dist/workspace-search/client.js +235 -0
- package/dist/workspace-search/client.js.map +1 -0
- package/dist/workspace-search/core.d.ts +2 -2
- package/dist/workspace-search/core.d.ts.map +1 -1
- package/dist/workspace-search/core.js +44 -4
- package/dist/workspace-search/core.js.map +1 -1
- package/dist/workspace-search/index.d.ts +3 -0
- package/dist/workspace-search/index.d.ts.map +1 -0
- package/dist/workspace-search/index.js +3 -0
- package/dist/workspace-search/index.js.map +1 -0
- package/package.json +7 -5
- package/dist/core/runtime/opencode-v2-event-aliases.d.ts +0 -184
- package/dist/core/runtime/opencode-v2-event-aliases.d.ts.map +0 -1
- package/dist/core/runtime/opencode-v2-event-aliases.js +0 -2
- package/dist/core/runtime/opencode-v2-event-aliases.js.map +0 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Kortix session transcript and event format, `kortix.transcript.v1`:
|
|
3
|
+
* a message is `{ info, parts }`, streamed as `{ type, properties }` events.
|
|
4
|
+
*
|
|
5
|
+
* A copy of `packages/api-contract/src/transcript.ts`, which kortixd and
|
|
6
|
+
* apps/api import. This package is published and cannot depend on that
|
|
7
|
+
* private one; `transcript-types.test.ts` fails when the two copies differ
|
|
8
|
+
* below this header.
|
|
9
|
+
*
|
|
10
|
+
* v1 keeps OpenCode 1.18's field names, so an OpenCode frame is a valid
|
|
11
|
+
* Kortix frame. The names this SDK published before v1 (`Message`, `Part`,
|
|
12
|
+
* `TextPart`, …) are aliases of these types in `runtime-types.ts`.
|
|
13
|
+
*/
|
|
14
|
+
export const KORTIX_TRANSCRIPT_SCHEMA = 'kortix.transcript.v1';
|
|
15
|
+
// ─── Turn errors ─────────────────────────────────────────────────────────────
|
|
16
|
+
/**
|
|
17
|
+
* Why a turn failed, as the daemon classifies it. Channels (Slack, Teams) pick
|
|
18
|
+
* the message a user sees from it. `unknown` covers every failure without a
|
|
19
|
+
* more specific code, including an abort nobody asked for.
|
|
20
|
+
*/
|
|
21
|
+
export const TURN_ERROR_CODES = [
|
|
22
|
+
'auth',
|
|
23
|
+
'rate_limit',
|
|
24
|
+
'credits',
|
|
25
|
+
'context_length',
|
|
26
|
+
'output_length',
|
|
27
|
+
'aborted',
|
|
28
|
+
'unknown',
|
|
29
|
+
];
|
|
30
|
+
export function isTurnErrorCode(value) {
|
|
31
|
+
return typeof value === 'string' && TURN_ERROR_CODES.includes(value);
|
|
32
|
+
}
|
|
33
|
+
/** `once` allows this call, `always` allows the capability for the session, `reject` denies it. */
|
|
34
|
+
export const RUNTIME_PERMISSION_REPLIES = ['once', 'always', 'reject'];
|
|
35
|
+
/**
|
|
36
|
+
* The capabilities a permission rule names. A harness maps each of its tool
|
|
37
|
+
* names onto one of these: pi's `write` is `edit`, OpenCode's `pty_*` tools
|
|
38
|
+
* are `bash`. They equal the manifest's permission keys.
|
|
39
|
+
*/
|
|
40
|
+
export const RUNTIME_PERMISSION_CAPABILITIES = [
|
|
41
|
+
'read',
|
|
42
|
+
'edit',
|
|
43
|
+
'glob',
|
|
44
|
+
'grep',
|
|
45
|
+
'list',
|
|
46
|
+
'bash',
|
|
47
|
+
'task',
|
|
48
|
+
'external_directory',
|
|
49
|
+
'todowrite',
|
|
50
|
+
'question',
|
|
51
|
+
'webfetch',
|
|
52
|
+
'websearch',
|
|
53
|
+
'lsp',
|
|
54
|
+
'doom_loop',
|
|
55
|
+
'skill',
|
|
56
|
+
];
|
|
57
|
+
//# sourceMappingURL=transcript-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-types.js","sourceRoot":"","sources":["../../../src/core/runtime/transcript-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,sBAA+B,CAAC;AAExE,gFAAgF;AAEhF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM;IACN,YAAY;IACZ,SAAS;IACT,gBAAgB;IAChB,eAAe;IACf,SAAS;IACT,SAAS;CACD,CAAC;AAGX,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,gBAAsC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9F,CAAC;AAoXD,mGAAmG;AACnG,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAGhF;;;;GAIG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,oBAAoB;IACpB,WAAW;IACX,UAAU;IACV,UAAU;IACV,WAAW;IACX,KAAK;IACL,WAAW;IACX,OAAO;CACC,CAAC"}
|
|
@@ -65,8 +65,9 @@ export type SessionHealthResponse = {
|
|
|
65
65
|
* - `session.todo` the runtime's todo list
|
|
66
66
|
* - `session.shell` a shell command run as a turn
|
|
67
67
|
* - `session.attach` attach the harness's own terminal client
|
|
68
|
+
* - `session.config` a runtime config document (`/global/config`)
|
|
68
69
|
*/
|
|
69
|
-
export type RuntimeCapability = 'session.rewind' | 'session.compact' | 'session.commands' | 'session.fork' | 'session.subagents' | 'session.mcp' | 'session.todo' | 'session.shell' | 'session.attach';
|
|
70
|
+
export type RuntimeCapability = 'session.rewind' | 'session.compact' | 'session.commands' | 'session.fork' | 'session.subagents' | 'session.mcp' | 'session.todo' | 'session.shell' | 'session.attach' | 'session.config';
|
|
70
71
|
/**
|
|
71
72
|
* Does the session's runtime serve `capability`? Pass the health
|
|
72
73
|
* `capabilities` list. A host hides the control of an absent feature instead
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../../src/core/session/health.ts"],"names":[],"mappings":"AAAA;;;;;;;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;AACH,MAAM,MAAM,QAAQ,GAAG,eAAe,GAAG,kBAAkB,GAAG,QAAQ,GAAG,eAAe,CAAC;AASzF;;4EAE4E;AAC5E,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,IAAI,CAE7D;AAED,MAAM,WAAW,mBAAmB;IAClC,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,OAAO,CAAC;IACZ,iEAAiE;IACjE,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACrC,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;IACrB,wEAAwE;IACxE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,GAAG,OAAO,CAW5E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,EAC1B,IAAI,CAAC,EAAE,WAAW,GACjB,OAAO,CAAC,mBAAmB,CAAC,CAgC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.js","sourceRoot":"","sources":["../../../src/core/session/health.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"health.js","sourceRoot":"","sources":["../../../src/core/session/health.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA8D5D;;;;;;;;GAQG;AACH,MAAM,UAAU,eAA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C,cAAc,CAAC,IAAI,cAAc,GAAG,CAAC;QACnD,CAAC,CAAC,cAAc;QAChB,CAAC,CAAC,OAAO,YAAY,KAAK,QAAQ;YAChC,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,IAAI,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lifecycle signals from a host that has no DOM events.
|
|
3
|
+
*
|
|
4
|
+
* A browser tells the SDK that the tab is visible again or the network is back
|
|
5
|
+
* through `visibilitychange` and `online`. React Native has neither event: its
|
|
6
|
+
* host reports the same facts here, from `AppState` and its network listener.
|
|
7
|
+
* `retry` is a person asking for a reconnect now (a "Reconnect" control).
|
|
8
|
+
*
|
|
9
|
+
* No globals, so the module loads on every runtime.
|
|
10
|
+
*/
|
|
11
|
+
export type HostSignal = 'visible' | 'online' | 'retry';
|
|
12
|
+
/** Report a lifecycle signal to the SDK. Safe to call with no listener mounted. */
|
|
13
|
+
export declare function notifyHostSignal(signal: HostSignal): void;
|
|
14
|
+
/** Run `listener` on every host signal. Returns the unsubscribe. */
|
|
15
|
+
export declare function onHostSignal(listener: (signal: HostSignal) => void): () => void;
|
|
16
|
+
//# sourceMappingURL=host-signals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-signals.d.ts","sourceRoot":"","sources":["../../../src/core/session/host-signals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAIxD,mFAAmF;AACnF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAQzD;AAED,oEAAoE;AACpE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GAAG,MAAM,IAAI,CAK/E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const listeners = new Set();
|
|
2
|
+
/** Report a lifecycle signal to the SDK. Safe to call with no listener mounted. */
|
|
3
|
+
export function notifyHostSignal(signal) {
|
|
4
|
+
for (const listener of [...listeners]) {
|
|
5
|
+
try {
|
|
6
|
+
listener(signal);
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
// One listener must not stop the others.
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/** Run `listener` on every host signal. Returns the unsubscribe. */
|
|
14
|
+
export function onHostSignal(listener) {
|
|
15
|
+
listeners.add(listener);
|
|
16
|
+
return () => {
|
|
17
|
+
listeners.delete(listener);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=host-signals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-signals.js","sourceRoot":"","sources":["../../../src/core/session/host-signals.ts"],"names":[],"mappings":"AAYA,MAAM,SAAS,GAAG,IAAI,GAAG,EAAgC,CAAC;AAE1D,mFAAmF;AACnF,MAAM,UAAU,gBAAgB,CAAC,MAAkB;IACjD,KAAK,MAAM,QAAQ,IAAI,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC;QACtC,IAAI,CAAC;YACH,QAAQ,CAAC,MAAM,CAAC,CAAC;QACnB,CAAC;QAAC,MAAM,CAAC;YACP,yCAAyC;QAC3C,CAAC;IACH,CAAC;AACH,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,YAAY,CAAC,QAAsC;IACjE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,OAAO,GAAG,EAAE;QACV,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -25,4 +25,7 @@ export * from './turn-end-cause.js';
|
|
|
25
25
|
export * from './compaction.js';
|
|
26
26
|
export * from './wake-escalation.js';
|
|
27
27
|
export * from './status-vocabulary.js';
|
|
28
|
+
export type { PendingInteractions, RuntimeVerbs, TranscriptPage } from './runtime-verbs.js';
|
|
29
|
+
export * from './runtime-sessions.js';
|
|
30
|
+
export { notifyHostSignal, type HostSignal } from './host-signals.js';
|
|
28
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACzF,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -25,4 +25,6 @@ export * from './turn-end-cause.js';
|
|
|
25
25
|
export * from './compaction.js';
|
|
26
26
|
export * from './wake-escalation.js';
|
|
27
27
|
export * from './status-vocabulary.js';
|
|
28
|
+
export * from './runtime-sessions.js';
|
|
29
|
+
export { notifyHostSignal } from './host-signals.js';
|
|
28
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC"}
|
|
@@ -83,6 +83,12 @@ export declare function openSessionBundle(projectId: string, sessionId: string,
|
|
|
83
83
|
* case on purpose: a consumer must be able to decide without awaiting.
|
|
84
84
|
*/
|
|
85
85
|
export declare function claimOpenBundle(projectId: string, sessionId: string, nowMs?: number): Promise<SessionOpenBundle | null> | null;
|
|
86
|
+
/**
|
|
87
|
+
* The bundle this session's open has ALREADY received, inside the share window.
|
|
88
|
+
* `null` while it is in flight: for a reader that must not wait for the
|
|
89
|
+
* snapshot. It asks its own route instead.
|
|
90
|
+
*/
|
|
91
|
+
export declare function settledOpenBundle(projectId: string, sessionId: string, nowMs?: number): SessionOpenBundle | null;
|
|
86
92
|
/** One `GET .../turn` answer plus the instant the SERVER took it. Structurally
|
|
87
93
|
* the observation `useSessionWorking` stamps for itself — the ranking rule it
|
|
88
94
|
* feeds only works if the stamp is the read's own instant, never arrival. */
|
|
@@ -106,6 +112,16 @@ export declare function openBundleQueue(bundle: SessionOpenBundle): SessionPromp
|
|
|
106
112
|
* — never `{ actions: [] }`, which would read as "nothing pending" for a
|
|
107
113
|
* leg that could not answer. */
|
|
108
114
|
export declare function openBundleAudit(bundle: SessionOpenBundle): SessionAudit | null;
|
|
115
|
+
/**
|
|
116
|
+
* Project the transcript leg onto what the saved-history read
|
|
117
|
+
* (`GET .../transcript?shape=sync&history=true`) answers: the same window, served
|
|
118
|
+
* only for the session's CURRENT root. `null` when the leg is unknown or
|
|
119
|
+
* pointer-only, and when a saved copy's root is not the root the session row
|
|
120
|
+
* names. The route decides those.
|
|
121
|
+
*
|
|
122
|
+
* Reads the leg, never the one-shot stash: the stash is the mirror paint's.
|
|
123
|
+
*/
|
|
124
|
+
export declare function openBundleHistory(bundle: SessionOpenBundle): SessionTranscriptSyncEnvelope | null;
|
|
109
125
|
/**
|
|
110
126
|
* Take the mirrored transcript this open fetched, ONCE.
|
|
111
127
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-bundle.d.ts","sourceRoot":"","sources":["../../../src/core/session/open-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,6BAA6B,EAClC,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAExB,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,OAAQ,CAAC;AAE1C;;kEAEkE;AAClE,eAAO,MAAM,6BAA6B,QAAS,CAAC;AAEpD;0CAC0C;AAC1C,eAAO,MAAM,4BAA4B,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"open-bundle.d.ts","sourceRoot":"","sources":["../../../src/core/session/open-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,6BAA6B,EAClC,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAExB,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,OAAQ,CAAC;AAE1C;;kEAEkE;AAClE,eAAO,MAAM,6BAA6B,QAAS,CAAC;AAEpD;0CAC0C;AAC1C,eAAO,MAAM,4BAA4B,KAAK,CAAC;AA6B/C;gDACgD;AAChD,wBAAgB,uBAAuB,IAAI,IAAI,CAI9C;AAED,MAAM,WAAW,wBAAwB;IACvC;oDACgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,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-101,6 +101,7 @@ export function openSessionBundle(projectId, sessionId, options = {}) {
|
|
|
101
101
|
};
|
|
102
102
|
entry.promise = entry.promise.then((bundle) => {
|
|
103
103
|
entry.settledAtMs = now();
|
|
104
|
+
entry.bundle = bundle;
|
|
104
105
|
return bundle;
|
|
105
106
|
});
|
|
106
107
|
entries.set(key, entry);
|
|
@@ -132,6 +133,15 @@ export function claimOpenBundle(projectId, sessionId, nowMs = Date.now()) {
|
|
|
132
133
|
}
|
|
133
134
|
return entry.promise;
|
|
134
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* The bundle this session's open has ALREADY received, inside the share window.
|
|
138
|
+
* `null` while it is in flight: for a reader that must not wait for the
|
|
139
|
+
* snapshot. It asks its own route instead.
|
|
140
|
+
*/
|
|
141
|
+
export function settledOpenBundle(projectId, sessionId, nowMs = Date.now()) {
|
|
142
|
+
const entry = entries.get(scopeKey(projectId, sessionId));
|
|
143
|
+
return entry && entry.settledAtMs !== null && claimable(entry, nowMs) ? (entry.bundle ?? null) : null;
|
|
144
|
+
}
|
|
135
145
|
/**
|
|
136
146
|
* Project the turn leg. `null` for an unknown leg — never `{ turns: [] }`,
|
|
137
147
|
* which would be an idle claim made by something that did not know.
|
|
@@ -173,6 +183,27 @@ export function openBundleAudit(bundle) {
|
|
|
173
183
|
actions: audit.actions,
|
|
174
184
|
};
|
|
175
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Project the transcript leg onto what the saved-history read
|
|
188
|
+
* (`GET .../transcript?shape=sync&history=true`) answers: the same window, served
|
|
189
|
+
* only for the session's CURRENT root. `null` when the leg is unknown or
|
|
190
|
+
* pointer-only, and when a saved copy's root is not the root the session row
|
|
191
|
+
* names. The route decides those.
|
|
192
|
+
*
|
|
193
|
+
* Reads the leg, never the one-shot stash: the stash is the mirror paint's.
|
|
194
|
+
*/
|
|
195
|
+
export function openBundleHistory(bundle) {
|
|
196
|
+
const transcript = bundle.transcript;
|
|
197
|
+
if (!transcript || transcript.known !== true || transcript.requested !== true)
|
|
198
|
+
return null;
|
|
199
|
+
const { known: _known, requested: _requested, ...envelope } = transcript;
|
|
200
|
+
// "No saved copy" is the same answer with or without the root check.
|
|
201
|
+
if (!envelope.available)
|
|
202
|
+
return envelope;
|
|
203
|
+
const root = bundle.session?.runtime_session_id ?? bundle.session?.opencode_session_id;
|
|
204
|
+
const savedRoot = envelope.runtime_session_id ?? envelope.opencode_session_id;
|
|
205
|
+
return root && savedRoot === root ? envelope : null;
|
|
206
|
+
}
|
|
176
207
|
function stashTranscript(key, bundle, nowMs) {
|
|
177
208
|
const transcript = bundle.transcript;
|
|
178
209
|
if (!transcript || transcript.known !== true || transcript.requested !== true)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-bundle.js","sourceRoot":"","sources":["../../../src/core/session/open-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAQL,oBAAoB,GACrB,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C;;kEAEkE;AAClE,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC;AAEpD;0CAC0C;AAC1C,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"open-bundle.js","sourceRoot":"","sources":["../../../src/core/session/open-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAQL,oBAAoB,GACrB,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C;;kEAEkE;AAClE,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC;AAEpD;0CAC0C;AAC1C,MAAM,CAAC,MAAM,4BAA4B,GA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,6BAA6B;QAAE,OAAO,IAAI,CAAC;IAC3E,OAAO,KAAK,CAAC,QAAQ,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A project session's conversation tree: its root conversation in the
|
|
3
|
+
* session runtime and the subagent children under it. The API serves the
|
|
4
|
+
* tree as `runtime_sessions` (read from the runtime projection); older API
|
|
5
|
+
* builds send only `opencode_sessions`, so every reader goes through these.
|
|
6
|
+
*/
|
|
7
|
+
import type { ProjectRuntimeSession, ProjectSession } from '../rest/projects-client/sessions.js';
|
|
8
|
+
type SessionTree = Pick<ProjectSession, 'runtime_sessions' | 'opencode_sessions' | 'runtime_session_id' | 'opencode_session_id'>;
|
|
9
|
+
/** Every conversation of a session's runtime: the root and its children. */
|
|
10
|
+
export declare function runtimeSessionsOf(session: SessionTree): ProjectRuntimeSession[];
|
|
11
|
+
/** The root conversation a session is pinned to, else (no pin yet) the first parentless one. */
|
|
12
|
+
export declare function rootRuntimeSession(session: SessionTree): ProjectRuntimeSession | null;
|
|
13
|
+
/**
|
|
14
|
+
* Direct, non-archived children of the root, newest `updated_at` first. A
|
|
15
|
+
* missing time counts as 0 and ties break on id, so the order never churns
|
|
16
|
+
* between refetches.
|
|
17
|
+
*/
|
|
18
|
+
export declare function directSubsessions(session: SessionTree): ProjectRuntimeSession[];
|
|
19
|
+
/**
|
|
20
|
+
* The project session that owns a runtime conversation id: a session id or
|
|
21
|
+
* root pin first, then any conversation of a row (a child runs in its
|
|
22
|
+
* parent's sandbox). Null for null or an unknown id.
|
|
23
|
+
*/
|
|
24
|
+
export declare function projectSessionForRuntimeId<S extends SessionTree & Pick<ProjectSession, 'session_id'>>(sessions: readonly S[], runtimeId: string | null): S | null;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=runtime-sessions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-sessions.d.ts","sourceRoot":"","sources":["../../../src/core/session/runtime-sessions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAE9F,KAAK,WAAW,GAAG,IAAI,CACrB,cAAc,EACd,kBAAkB,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,qBAAqB,CACxF,CAAC;AAEF,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,qBAAqB,EAAE,CAE/E;AAED,gGAAgG;AAChG,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,qBAAqB,GAAG,IAAI,CAKrF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,qBAAqB,EAAE,CAM/E;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,EACnG,QAAQ,EAAE,SAAS,CAAC,EAAE,EACtB,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,CAAC,GAAG,IAAI,CAQV"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Every conversation of a session's runtime: the root and its children. */
|
|
2
|
+
export function runtimeSessionsOf(session) {
|
|
3
|
+
return session.runtime_sessions ?? session.opencode_sessions ?? [];
|
|
4
|
+
}
|
|
5
|
+
/** The root conversation a session is pinned to, else (no pin yet) the first parentless one. */
|
|
6
|
+
export function rootRuntimeSession(session) {
|
|
7
|
+
const conversations = runtimeSessionsOf(session);
|
|
8
|
+
const rootId = session.runtime_session_id ?? session.opencode_session_id;
|
|
9
|
+
if (rootId)
|
|
10
|
+
return conversations.find((item) => item.id === rootId) ?? null;
|
|
11
|
+
return conversations.find((item) => !item.parent_id) ?? null;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Direct, non-archived children of the root, newest `updated_at` first. A
|
|
15
|
+
* missing time counts as 0 and ties break on id, so the order never churns
|
|
16
|
+
* between refetches.
|
|
17
|
+
*/
|
|
18
|
+
export function directSubsessions(session) {
|
|
19
|
+
const root = rootRuntimeSession(session);
|
|
20
|
+
if (!root)
|
|
21
|
+
return [];
|
|
22
|
+
return runtimeSessionsOf(session)
|
|
23
|
+
.filter((item) => item.parent_id === root.id && !item.archived_at)
|
|
24
|
+
.sort((a, b) => (b.updated_at ?? 0) - (a.updated_at ?? 0) || a.id.localeCompare(b.id));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The project session that owns a runtime conversation id: a session id or
|
|
28
|
+
* root pin first, then any conversation of a row (a child runs in its
|
|
29
|
+
* parent's sandbox). Null for null or an unknown id.
|
|
30
|
+
*/
|
|
31
|
+
export function projectSessionForRuntimeId(sessions, runtimeId) {
|
|
32
|
+
if (!runtimeId)
|
|
33
|
+
return null;
|
|
34
|
+
const direct = sessions.find((session) => session.session_id === runtimeId || (session.runtime_session_id ?? session.opencode_session_id) === runtimeId);
|
|
35
|
+
if (direct)
|
|
36
|
+
return direct;
|
|
37
|
+
return sessions.find((session) => runtimeSessionsOf(session).some((item) => item.id === runtimeId)) ?? null;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=runtime-sessions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-sessions.js","sourceRoot":"","sources":["../../../src/core/session/runtime-sessions.ts"],"names":[],"mappings":"AAaA,4EAA4E;AAC5E,MAAM,UAAU,iBAAiB,CAAC,OAAoB;IACpD,OAAO,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC;AACrE,CAAC;AAED,gGAAgG;AAChG,MAAM,UAAU,kBAAkB,CAAC,OAAoB;IACrD,MAAM,aAAa,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,OAAO,CAAC,kBAAkB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IACzE,IAAI,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EAAE,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,IAAI,IAAI,CAAC;AAC9G,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { KortixMessage, KortixSessionStatus, RuntimePermissionReply, RuntimePermissionRequest, RuntimeQuestionAnswer, RuntimeQuestionRequest } from '../runtime/transcript-types.js';
|
|
2
|
+
export interface RuntimeVerbsInput {
|
|
3
|
+
/** The session's runtime base URL (`${backendUrl}/p/{externalId}/{port}`). */
|
|
4
|
+
runtimeUrl: string;
|
|
5
|
+
/** The session's root conversation in the runtime. */
|
|
6
|
+
rootId: string;
|
|
7
|
+
/** The fetch to send with (the SDK's authenticated fetch). */
|
|
8
|
+
fetch: typeof fetch;
|
|
9
|
+
}
|
|
10
|
+
/** One page of a conversation, oldest first. */
|
|
11
|
+
export interface TranscriptPage {
|
|
12
|
+
messages: KortixMessage[];
|
|
13
|
+
/** More messages exist before the first one. */
|
|
14
|
+
hasMore: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** What a session's runtime waits on. */
|
|
17
|
+
export interface PendingInteractions {
|
|
18
|
+
/** Status per conversation id (the root and its subagent children). */
|
|
19
|
+
statuses: Record<string, KortixSessionStatus>;
|
|
20
|
+
permissions: RuntimePermissionRequest[];
|
|
21
|
+
questions: RuntimeQuestionRequest[];
|
|
22
|
+
}
|
|
23
|
+
export declare function createRuntimeVerbs(input: RuntimeVerbsInput): {
|
|
24
|
+
/**
|
|
25
|
+
* A page of a conversation's messages, oldest first: the root by default,
|
|
26
|
+
* or `conversationId` (a subagent child). `before` pages backwards; a
|
|
27
|
+
* `limit` above the daemon's 200-message page is read in several pages.
|
|
28
|
+
*/
|
|
29
|
+
messages: (options?: {
|
|
30
|
+
conversationId?: string;
|
|
31
|
+
limit?: number;
|
|
32
|
+
before?: string;
|
|
33
|
+
signal?: AbortSignal;
|
|
34
|
+
}) => Promise<TranscriptPage>;
|
|
35
|
+
/** The conversations' statuses and the permission requests and questions waiting for an answer. */
|
|
36
|
+
pending: () => Promise<PendingInteractions>;
|
|
37
|
+
/** Answer a permission request: allow this call, allow the capability for the session, or deny. */
|
|
38
|
+
answerPermission: (requestId: string, reply: RuntimePermissionReply, message?: string) => Promise<void>;
|
|
39
|
+
/** Answer a question (one answer per question), or dismiss it with `null`. */
|
|
40
|
+
answerQuestion: (requestId: string, answers: RuntimeQuestionAnswer[] | null) => Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Summarize the conversation so far into a shorter context. Uses `model`,
|
|
43
|
+
* else the runtime's default model; throws an `ApiError` with code
|
|
44
|
+
* `MODEL_REQUIRED` when neither names one. Resolves with the model it used.
|
|
45
|
+
*/
|
|
46
|
+
compact: (model?: {
|
|
47
|
+
providerID: string;
|
|
48
|
+
modelID: string;
|
|
49
|
+
}) => Promise<{
|
|
50
|
+
providerID: string;
|
|
51
|
+
modelID: string;
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
54
|
+
export type RuntimeVerbs = ReturnType<typeof createRuntimeVerbs>;
|
|
55
|
+
//# sourceMappingURL=runtime-verbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-verbs.d.ts","sourceRoot":"","sources":["../../../src/core/session/runtime-verbs.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,6BAA6B,CAAC;AAKrC,MAAM,WAAW,iBAAiB;IAChC,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,KAAK,EAAE,OAAO,KAAK,CAAC;CACrB;AAED,gDAAgD;AAChD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,gDAAgD;IAChD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,yCAAyC;AACzC,MAAM,WAAW,mBAAmB;IAClC,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IAC9C,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxC,SAAS,EAAE,sBAAsB,EAAE,CAAC;CACrC;AAuBD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB;IAKvD;;;;OAIG;yBAEQ;QAAE,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,KAC1F,OAAO,CAAC,cAAc,CAAC;IAqC1B,mGAAmG;mBAChF,OAAO,CAAC,mBAAmB,CAAC;IAS/C,mGAAmG;kCAC/D,MAAM,SAAS,sBAAsB,YAAY,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;IAO3G,8EAA8E;gCAC5C,MAAM,WAAW,qBAAqB,EAAE,GAAG,IAAI,KAAG,OAAO,CAAC,IAAI,CAAC;IAQjG;;;;OAIG;sBACqB;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAG,OAAO,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;EAmBrH;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The session verbs a host calls instead of the raw runtime client: read the
|
|
3
|
+
* transcript, read what the agent waits on, answer it, compact. Each verb is
|
|
4
|
+
* bound to one session's runtime URL and root conversation, and throws an
|
|
5
|
+
* `ApiError` when the runtime refuses.
|
|
6
|
+
*
|
|
7
|
+
* `messages()` reads the Kortix transcript route (`/kortix/runtime/messages`);
|
|
8
|
+
* the other verbs use the runtime's compatibility routes until the daemon
|
|
9
|
+
* serves Kortix ones. A host never needs to know which.
|
|
10
|
+
*/
|
|
11
|
+
import { ApiError } from '../http/api/errors.js';
|
|
12
|
+
import { createRuntimeRestClient } from '../runtime/runtime-rest-client.js';
|
|
13
|
+
/** The most messages kortixd answers in one transcript page (`MAX_MESSAGE_PAGE`). */
|
|
14
|
+
const MESSAGE_PAGE_MAX = 200;
|
|
15
|
+
async function errorMessage(response) {
|
|
16
|
+
const text = await response.text().catch(() => '');
|
|
17
|
+
try {
|
|
18
|
+
const body = JSON.parse(text);
|
|
19
|
+
return body.data?.message || body.error || body.message || text || `HTTP ${response.status}`;
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return text || `HTTP ${response.status}`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** A compatibility-route result as data, or an `ApiError`. */
|
|
26
|
+
function unwrap(result, what) {
|
|
27
|
+
if (result.error === undefined)
|
|
28
|
+
return result.data;
|
|
29
|
+
const error = result.error;
|
|
30
|
+
const detail = typeof error === 'string' ? error : error?.data?.message || error?.message || error?.error || 'request failed';
|
|
31
|
+
throw new ApiError(`${what}: ${detail}`, {
|
|
32
|
+
...(result.response ? { status: result.response.status, response: result.response } : {}),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export function createRuntimeVerbs(input) {
|
|
36
|
+
const base = input.runtimeUrl.replace(/\/$/, '');
|
|
37
|
+
const client = createRuntimeRestClient({ baseUrl: base, fetch: input.fetch });
|
|
38
|
+
return {
|
|
39
|
+
/**
|
|
40
|
+
* A page of a conversation's messages, oldest first: the root by default,
|
|
41
|
+
* or `conversationId` (a subagent child). `before` pages backwards; a
|
|
42
|
+
* `limit` above the daemon's 200-message page is read in several pages.
|
|
43
|
+
*/
|
|
44
|
+
messages: async (options = {}) => {
|
|
45
|
+
const conversation = encodeURIComponent(options.conversationId ?? input.rootId);
|
|
46
|
+
const readPage = async (limit, before) => {
|
|
47
|
+
const query = new URLSearchParams();
|
|
48
|
+
if (limit !== undefined)
|
|
49
|
+
query.set('limit', String(limit));
|
|
50
|
+
if (before)
|
|
51
|
+
query.set('before', before);
|
|
52
|
+
const suffix = `/messages/${conversation}${query.size ? `?${query}` : ''}`;
|
|
53
|
+
const read = (mount) => input.fetch(new Request(`${base}${mount}${suffix}`, { method: 'GET', ...(options.signal ? { signal: options.signal } : {}) }));
|
|
54
|
+
let response = await read('/kortix/runtime');
|
|
55
|
+
// A daemon built before W3 serves the same route at its OpenCode name.
|
|
56
|
+
if (response.status === 404 || (response.headers.get('content-type') ?? '').startsWith('text/html')) {
|
|
57
|
+
response = await read('/kortix/opencode');
|
|
58
|
+
}
|
|
59
|
+
if (!response.ok) {
|
|
60
|
+
throw new ApiError(`Reading the session transcript failed: ${await errorMessage(response)}`, {
|
|
61
|
+
status: response.status,
|
|
62
|
+
response,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
const body = (await response.json());
|
|
66
|
+
return { messages: body.messages ?? [], hasMore: body.has_more === true };
|
|
67
|
+
};
|
|
68
|
+
// The daemon serves at most MESSAGE_PAGE_MAX a page: a larger limit pages
|
|
69
|
+
// backwards from the newest, and the pages join oldest first.
|
|
70
|
+
let page = await readPage(options.limit === undefined ? undefined : Math.min(options.limit, MESSAGE_PAGE_MAX), options.before);
|
|
71
|
+
const messages = [...page.messages];
|
|
72
|
+
while (options.limit !== undefined && messages.length < options.limit && page.hasMore && messages.length > 0) {
|
|
73
|
+
page = await readPage(Math.min(options.limit - messages.length, MESSAGE_PAGE_MAX), messages[0].info.id);
|
|
74
|
+
if (!page.messages.length)
|
|
75
|
+
break;
|
|
76
|
+
messages.unshift(...page.messages);
|
|
77
|
+
}
|
|
78
|
+
return { messages, hasMore: page.hasMore };
|
|
79
|
+
},
|
|
80
|
+
/** The conversations' statuses and the permission requests and questions waiting for an answer. */
|
|
81
|
+
pending: async () => {
|
|
82
|
+
const [statuses, permissions, questions] = await Promise.all([
|
|
83
|
+
client.session.status().then((r) => unwrap(r, 'Reading the session status failed')),
|
|
84
|
+
client.permission.list().then((r) => unwrap(r, 'Reading permission requests failed')),
|
|
85
|
+
client.question.list().then((r) => unwrap(r, 'Reading questions failed')),
|
|
86
|
+
]);
|
|
87
|
+
return { statuses: statuses ?? {}, permissions: permissions ?? [], questions: questions ?? [] };
|
|
88
|
+
},
|
|
89
|
+
/** Answer a permission request: allow this call, allow the capability for the session, or deny. */
|
|
90
|
+
answerPermission: async (requestId, reply, message) => {
|
|
91
|
+
unwrap(await client.permission.reply({ requestID: requestId, reply, ...(message !== undefined ? { message } : {}) }), 'Answering the permission request failed');
|
|
92
|
+
},
|
|
93
|
+
/** Answer a question (one answer per question), or dismiss it with `null`. */
|
|
94
|
+
answerQuestion: async (requestId, answers) => {
|
|
95
|
+
if (answers === null) {
|
|
96
|
+
unwrap(await client.question.reject({ requestID: requestId }), 'Dismissing the question failed');
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
unwrap(await client.question.reply({ requestID: requestId, answers }), 'Answering the question failed');
|
|
100
|
+
},
|
|
101
|
+
/**
|
|
102
|
+
* Summarize the conversation so far into a shorter context. Uses `model`,
|
|
103
|
+
* else the runtime's default model; throws an `ApiError` with code
|
|
104
|
+
* `MODEL_REQUIRED` when neither names one. Resolves with the model it used.
|
|
105
|
+
*/
|
|
106
|
+
compact: async (model) => {
|
|
107
|
+
let chosen = model;
|
|
108
|
+
if (!chosen) {
|
|
109
|
+
// An unreadable config names no model: never guess one.
|
|
110
|
+
const config = await client.global.config.get().then((result) => (result.error === undefined ? result.data : null));
|
|
111
|
+
const reference = typeof config?.model === 'string' ? config.model : '';
|
|
112
|
+
const slash = reference.indexOf('/');
|
|
113
|
+
if (slash > 0 && slash < reference.length - 1) {
|
|
114
|
+
chosen = { providerID: reference.slice(0, slash), modelID: reference.slice(slash + 1) };
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (!chosen)
|
|
118
|
+
throw new ApiError('Cannot compact: no model is set for this session', { code: 'MODEL_REQUIRED' });
|
|
119
|
+
unwrap(await client.session.summarize({ sessionID: input.rootId, providerID: chosen.providerID, modelID: chosen.modelID }), 'Compacting the session failed');
|
|
120
|
+
return chosen;
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=runtime-verbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-verbs.js","sourceRoot":"","sources":["../../../src/core/session/runtime-verbs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAUzE,qFAAqF;AACrF,MAAM,gBAAgB,GAAG,GAAG,CAAC;AA0B7B,KAAK,UAAU,YAAY,CAAC,QAAkB;IAC5C,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;IACnD,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAsE,CAAC;QACnG,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,IAAI,QAAQ,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC/F,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,IAAI,QAAQ,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC3C,CAAC;AACH,CAAC;AAED,8DAA8D;AAC9D,SAAS,MAAM,CAAI,MAA0D,EAAE,IAAY;IACzF,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,IAAS,CAAC;IACxD,MAAM,KAAK,GA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achable. Restart the session to try again."
|
|
16
16
|
*
|
|
17
|
-
* Measured on SampleCo (2026-08-26, box
|
|
17
|
+
* Measured on SampleCo (2026-08-26, one E2B box): that card
|
|
18
18
|
* painted while the box was SECONDS from ready — its daemon logged
|
|
19
19
|
* `opencode ready` at 06:10:02, right after the budget expired. The card is a
|
|
20
20
|
* dead end with no auto-recovery, and the human's fix is always the same one
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* "Couldn't start session <id> — The session runtime did not become
|
|
15
15
|
* reachable. Restart the session to try again."
|
|
16
16
|
*
|
|
17
|
-
* Measured on SampleCo (2026-08-26, box
|
|
17
|
+
* Measured on SampleCo (2026-08-26, one E2B box): that card
|
|
18
18
|
* painted while the box was SECONDS from ready — its daemon logged
|
|
19
19
|
* `opencode ready` at 06:10:02, right after the budget expired. The card is a
|
|
20
20
|
* dead end with no auto-recovery, and the human's fix is always the same one
|