@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
|
@@ -1,45 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
* One client. Every action a method. The host app imports ONLY from `@kortix/sdk`
|
|
6
|
-
* — never `@opencode-ai/sdk`, never `backendApi`/`authenticatedFetch` directly.
|
|
7
|
-
*
|
|
8
|
-
* const kortix = createKortix({ getToken });
|
|
9
|
-
* await kortix.projects.list();
|
|
10
|
-
* await kortix.project(pid).secrets.upsert({ name, value });
|
|
11
|
-
* const s = kortix.session(pid, sid);
|
|
12
|
-
* await s.start();
|
|
13
|
-
* s.runtime.session.prompt({ sessionID: sid, parts }); // typed opencode, via the SDK
|
|
14
|
-
*
|
|
15
|
-
* REST methods are direct references to the platform client, so they keep their
|
|
16
|
-
* exact types with zero re-typing. The `project()`/`session()` handles bind ids
|
|
17
|
-
* for ergonomics. Reactive data still comes from `@kortix/sdk/react` hooks.
|
|
18
|
-
*/
|
|
19
|
-
import * as F from '../files/client.js';
|
|
20
|
-
import { createPromptAttachmentController } from '../attachments/prompt-attachments.js';
|
|
1
|
+
export { SessionNotReadyError } from './session-shared.js';
|
|
2
|
+
export type { SessionModel } from './session-shared.js';
|
|
3
|
+
import type { RuntimeClient } from '../runtime/client.js';
|
|
21
4
|
import { type KortixPlatformConfig } from '../http/config.js';
|
|
22
5
|
import * as P from '../rest/projects-client/index.js';
|
|
23
|
-
|
|
24
|
-
import { type SessionRuntimeEntry } from '../session/session-runtime-registry.js';
|
|
25
|
-
import { type EventStreamHandle, type RuntimeEvent } from '../stream/event-stream.js';
|
|
26
|
-
/** A model the agent can run, as the opencode runtime identifies it. */
|
|
27
|
-
export type SessionModel = {
|
|
28
|
-
providerID: string;
|
|
29
|
-
modelID: string;
|
|
30
|
-
};
|
|
31
|
-
/** The opencode runtime client for the currently-active sandbox (set by the host). */
|
|
32
|
-
declare function runtime(): OpencodeClient;
|
|
33
|
-
export declare class SessionNotReadyError extends Error {
|
|
34
|
-
constructor(action: string);
|
|
35
|
-
}
|
|
6
|
+
declare function runtime(): RuntimeClient;
|
|
36
7
|
export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
37
8
|
global?: boolean;
|
|
38
9
|
}): {
|
|
39
10
|
/** The platform config in effect (for diagnostics). */
|
|
40
11
|
config: KortixPlatformConfig;
|
|
41
12
|
/** Headless regular auth — see `auth` above. */
|
|
42
|
-
auth:
|
|
13
|
+
auth: import("../../index.js").HeadlessAuthApi;
|
|
43
14
|
accounts: {
|
|
44
15
|
list: typeof P.listAccounts;
|
|
45
16
|
get: typeof P.getAccount;
|
|
@@ -54,7 +25,6 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
54
25
|
setAccess: typeof P.setAccountSecretResourceAccess;
|
|
55
26
|
};
|
|
56
27
|
updateName: typeof P.updateAccountName;
|
|
57
|
-
/** Organization branding (Enterprise): own logo / icon / favicon (light + dark) and product name. */
|
|
58
28
|
branding: {
|
|
59
29
|
get: typeof P.getAccountBranding;
|
|
60
30
|
update: typeof P.updateAccountBranding;
|
|
@@ -68,22 +38,17 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
68
38
|
removeMember: typeof P.removeAccountMember;
|
|
69
39
|
updateMemberRole: typeof P.updateAccountMemberRole;
|
|
70
40
|
invites: typeof P.listAccountInvites;
|
|
71
|
-
/** Cancel a pending account invite (accountId still known/scoped). */
|
|
72
41
|
cancelInvite: typeof P.cancelAccountInvite;
|
|
73
|
-
/** Resend a pending account invite (accountId still known/scoped). */
|
|
74
42
|
resendInvite: typeof P.resendAccountInvite;
|
|
75
|
-
/** CLI PAT minting — account-scoped personal access tokens (`kortix_pat_...`). */
|
|
76
43
|
tokens: {
|
|
77
44
|
list: typeof P.listAccountTokens;
|
|
78
45
|
create: typeof P.createAccountToken;
|
|
79
46
|
revoke: typeof P.revokeAccountToken;
|
|
80
47
|
};
|
|
81
|
-
/** Connected apps — the OAuth / MCP clients this person approved, across all accounts. */
|
|
82
48
|
connectedApps: {
|
|
83
49
|
list: typeof P.listOAuthGrants;
|
|
84
50
|
revoke: typeof P.revokeOAuthGrant;
|
|
85
51
|
};
|
|
86
|
-
/** Enterprise audit log — events + CSV/JSONL export + SIEM webhooks. */
|
|
87
52
|
audit: {
|
|
88
53
|
log: typeof P.listAccountAudit;
|
|
89
54
|
export: typeof P.exportAccountAudit;
|
|
@@ -97,16 +62,13 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
97
62
|
};
|
|
98
63
|
/** Identity and access — assignments, roles, permissions, groups, probes. */
|
|
99
64
|
iam: {
|
|
100
|
-
/** The grant table. One row per (principal, role, scope, object). */
|
|
101
65
|
assignments: {
|
|
102
66
|
list: typeof P.listAssignments;
|
|
103
67
|
create: typeof P.createAssignment;
|
|
104
68
|
revoke: typeof P.revokeAssignment;
|
|
105
69
|
};
|
|
106
|
-
/** The permission catalog as data — action, scope, delegability, implications. */
|
|
107
70
|
permissions: {
|
|
108
71
|
list: typeof P.listPermissions;
|
|
109
|
-
/** The leaves one role carries. */
|
|
110
72
|
forRole: typeof P.getRolePermissions;
|
|
111
73
|
};
|
|
112
74
|
roles: {
|
|
@@ -129,11 +91,7 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
129
91
|
remove: typeof P.removeGroupMember;
|
|
130
92
|
};
|
|
131
93
|
};
|
|
132
|
-
/** Auto-provisioned agent identities — the principal picker for binding a
|
|
133
|
-
* role to an agent. */
|
|
134
94
|
agentIdentities: typeof P.listAgentIdentities;
|
|
135
|
-
/** "Sign in with Kortix" app registry — pair a client with `createKortixAuth`
|
|
136
|
-
* from `@kortix/sdk/server`. The secret is returned once, on create/rotate. */
|
|
137
95
|
oauthClients: {
|
|
138
96
|
list: typeof P.listOAuthClients;
|
|
139
97
|
get: typeof P.getOAuthClient;
|
|
@@ -142,15 +100,11 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
142
100
|
rotateSecret: typeof P.rotateOAuthClientSecret;
|
|
143
101
|
remove: typeof P.deleteOAuthClient;
|
|
144
102
|
};
|
|
145
|
-
/** Ask the engine. This is the ONLY authorization read a client should make:
|
|
146
|
-
* probe the LEAF a route asserts, never a role label. */
|
|
147
103
|
can: typeof P.probeEffectivePermission;
|
|
148
|
-
/** Batch probe — one roundtrip for N leaves. */
|
|
149
104
|
canBatch: typeof P.probeEffectivePermissions;
|
|
150
105
|
};
|
|
151
106
|
/** Account-invite lifecycle reached by invite token alone (accept/decline/describe). */
|
|
152
107
|
accountInvites: {
|
|
153
|
-
/** The caller's own pending invites, matched by email. */
|
|
154
108
|
listMine: typeof P.listMyAccountInvites;
|
|
155
109
|
describe: typeof P.describeAccountInvite;
|
|
156
110
|
accept: typeof P.acceptAccountInvite;
|
|
@@ -162,7 +116,6 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
162
116
|
get: typeof P.getProject;
|
|
163
117
|
detail: typeof P.getProjectDetail;
|
|
164
118
|
create: typeof P.createProject;
|
|
165
|
-
/** Create a project backed by a brand-new Kortix-managed GitHub repo. */
|
|
166
119
|
createRepo: typeof P.createProjectRepo;
|
|
167
120
|
provision: typeof P.provisionProject;
|
|
168
121
|
update: typeof P.updateProject;
|
|
@@ -178,231 +131,407 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
178
131
|
};
|
|
179
132
|
/** Connector calls scoped by an agent/session token when no project id is available. */
|
|
180
133
|
connectors: {
|
|
181
|
-
/** Callable catalog for this project or token scope. */
|
|
182
134
|
catalog: (options?: Parameters<typeof P.getConnectorCatalog>[1]) => Promise<P.ConnectorCatalogEntry[]>;
|
|
183
|
-
/** Flattened `<connector>.<action>` tool list. */
|
|
184
135
|
tools: () => Promise<P.ConnectorTool[]>;
|
|
185
|
-
/** Search callable tools by id and description. */
|
|
186
136
|
search: (query?: string | undefined, options?: {
|
|
187
137
|
limit?: number;
|
|
188
138
|
} | undefined) => Promise<P.ConnectorTool[]>;
|
|
189
|
-
/** Describe one `<connector>.<action>` tool. */
|
|
190
139
|
describe: (tool: string) => Promise<P.ConnectorTool | null>;
|
|
191
|
-
/** Call one `<connector>.<action>` tool. */
|
|
192
140
|
call: <T = unknown>(tool: string, args?: Record<string, unknown> | undefined, options?: P.ConnectorCallOptions | undefined) => Promise<P.ConnectorCallResult<T>>;
|
|
193
|
-
/** The accounts a connector can be called as, default first. */
|
|
194
141
|
accounts: (slug: string) => Promise<P.ConnectorAccount[]>;
|
|
195
|
-
/** Upload bytes for use by a later connector call. */
|
|
196
142
|
uploadAttachment: (content: Blob | ArrayBuffer | Uint8Array<ArrayBufferLike>, input: P.ConnectorAttachmentUploadInput) => Promise<P.ConnectorAttachmentUploadResult>;
|
|
197
143
|
};
|
|
198
144
|
project: (projectId: string) => {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
145
|
+
session: (sessionId: string) => {
|
|
146
|
+
runtime: RuntimeClient;
|
|
147
|
+
messages: (options?: {
|
|
148
|
+
conversationId?: string;
|
|
149
|
+
limit?: number;
|
|
150
|
+
before?: string;
|
|
202
151
|
signal?: AbortSignal;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
152
|
+
}) => Promise<import("../session/index.js").TranscriptPage>;
|
|
153
|
+
pending: () => Promise<import("../session/index.js").PendingInteractions>;
|
|
154
|
+
answerPermission: (requestId: string, reply: import("../../index.js").RuntimePermissionReply, message?: string) => Promise<void>;
|
|
155
|
+
answerQuestion: (requestId: string, answers: import("../../index.js").RuntimeQuestionAnswer[] | null) => Promise<void>;
|
|
156
|
+
compact: (model?: {
|
|
157
|
+
providerID: string;
|
|
158
|
+
modelID: string;
|
|
159
|
+
}) => Promise<{
|
|
160
|
+
providerID: string;
|
|
161
|
+
modelID: string;
|
|
162
|
+
}>;
|
|
163
|
+
files: {
|
|
164
|
+
list: (dirPath: string) => Promise<import("../../index.js").FileNode[]>;
|
|
165
|
+
read: (filePath: string) => Promise<import("../../index.js").FileContent>;
|
|
166
|
+
readBlob: (filePath: string) => Promise<Blob>;
|
|
167
|
+
status: () => Promise<import("../../index.js").GitFileStatus[]>;
|
|
168
|
+
findFiles: (query: string, options?: {
|
|
169
|
+
type?: "file" | "directory";
|
|
170
|
+
limit?: number;
|
|
171
|
+
}) => Promise<string[]>;
|
|
172
|
+
findText: (pattern: string) => Promise<import("../../index.js").FindMatch[]>;
|
|
173
|
+
upload: (file: File | Blob, targetPath?: string, filename?: string, options?: import("../../index.js").UploadFileOptions) => Promise<import("../../index.js").UploadResult[]>;
|
|
174
|
+
write: (filePath: string, content: Blob | File) => Promise<import("../../index.js").WriteFileResult>;
|
|
175
|
+
create: (filePath: string) => Promise<import("../../index.js").UploadResult[]>;
|
|
176
|
+
copy: (sourcePath: string, destPath: string) => Promise<import("../../index.js").UploadResult[]>;
|
|
177
|
+
remove: (filePath: string) => Promise<boolean>;
|
|
178
|
+
mkdir: (dirPath: string) => Promise<boolean>;
|
|
179
|
+
rename: (from: string, to: string) => Promise<boolean>;
|
|
180
|
+
};
|
|
181
|
+
abort: () => Promise<({
|
|
182
|
+
data: undefined;
|
|
183
|
+
error: unknown;
|
|
184
|
+
} | {
|
|
185
|
+
data: boolean;
|
|
186
|
+
error: undefined;
|
|
187
|
+
}) & {
|
|
188
|
+
request: Request;
|
|
189
|
+
response: Response;
|
|
190
|
+
}>;
|
|
191
|
+
rewind: (messageId: string) => Promise<({
|
|
192
|
+
data: undefined;
|
|
193
|
+
error: unknown;
|
|
194
|
+
} | {
|
|
195
|
+
data: import("../../index.js").Session;
|
|
196
|
+
error: undefined;
|
|
197
|
+
}) & {
|
|
198
|
+
request: Request;
|
|
199
|
+
response: Response;
|
|
200
|
+
}>;
|
|
201
|
+
restoreRewind: () => Promise<({
|
|
202
|
+
data: undefined;
|
|
203
|
+
error: unknown;
|
|
204
|
+
} | {
|
|
205
|
+
data: import("../../index.js").Session;
|
|
206
|
+
error: undefined;
|
|
207
|
+
}) & {
|
|
208
|
+
request: Request;
|
|
209
|
+
response: Response;
|
|
210
|
+
}>;
|
|
211
|
+
stream: (opts: {
|
|
212
|
+
onEvent: (event: import("../../index.js").RuntimeEvent) => void;
|
|
213
|
+
onGapRehydrate?: (gapMs: number) => void;
|
|
214
|
+
signal?: AbortSignal;
|
|
215
|
+
}) => Promise<import("../../index.js").EventStreamHandle>;
|
|
216
|
+
scope: () => Promise<P.SessionScope>;
|
|
217
|
+
providerSecretPool: {
|
|
218
|
+
list: () => Promise<{
|
|
219
|
+
pools: P.SessionProviderSecretPool[];
|
|
220
|
+
can_edit: boolean;
|
|
232
221
|
}>;
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
222
|
+
get: (providerId: string) => Promise<P.SessionProviderSecretPool>;
|
|
223
|
+
set: (providerId: string, secretIds: string[] | null) => Promise<P.SessionProviderSecretPool>;
|
|
224
|
+
};
|
|
225
|
+
rescope: (scope: P.SessionScopeInput) => Promise<P.SessionScope>;
|
|
226
|
+
setAgent: (agent: string | undefined) => void;
|
|
227
|
+
send: (text: string, opts?: {
|
|
228
|
+
model?: import("./session-shared.js").SessionModel;
|
|
229
|
+
agent?: string;
|
|
230
|
+
}) => Promise<P.CreateSessionPromptResult>;
|
|
231
|
+
setModel: (model: import("./session-shared.js").SessionModel | undefined) => void;
|
|
232
|
+
changeModel: (model: string) => Promise<P.SessionModelChangeResult>;
|
|
233
|
+
health: (init?: RequestInit) => Promise<import("../session/index.js").SessionHealthResult>;
|
|
234
|
+
previewUrl: (port: number, path?: string) => string;
|
|
235
|
+
proxyUrl: (url?: string) => string | undefined;
|
|
236
|
+
sandboxPortUrl: (port: number) => string;
|
|
237
|
+
reminders: {
|
|
238
|
+
list: () => Promise<{
|
|
239
|
+
reminders: P.SessionReminder[];
|
|
237
240
|
}>;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
241
|
+
create: (input: Parameters<typeof P.createSessionReminder>[2]) => Promise<P.SessionReminder>;
|
|
242
|
+
update: (reminderId: string, input: Parameters<typeof P.updateSessionReminder>[3]) => Promise<P.SessionReminder>;
|
|
243
|
+
remove: (reminderId: string) => Promise<{
|
|
244
|
+
ok: boolean;
|
|
242
245
|
}>;
|
|
243
|
-
env: {
|
|
244
|
-
required: string[];
|
|
245
|
-
optional: string[];
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
|
-
project: P.KortixProject;
|
|
249
|
-
git_connection?: P.ProjectGitConnection | null;
|
|
250
|
-
file_count: number;
|
|
251
|
-
files: P.ProjectFileEntry[];
|
|
252
|
-
}>;
|
|
253
|
-
/** Canonical project-scoped audit timeline. */
|
|
254
|
-
audit: (options?: Parameters<typeof P.listProjectAudit>[1]) => Promise<P.AuditEventList>;
|
|
255
|
-
update: (input: Parameters<typeof P.updateProject>[1]) => Promise<P.KortixProject>;
|
|
256
|
-
archive: () => Promise<{
|
|
257
|
-
ok: boolean;
|
|
258
|
-
}>;
|
|
259
|
-
llmCatalog: () => Promise<P.ProjectLlmCatalogResponse>;
|
|
260
|
-
modelPicker: () => Promise<P.ProjectLlmCatalogResponse>;
|
|
261
|
-
modelAccess: () => Promise<P.ProjectModelAccess>;
|
|
262
|
-
setModelAccess: (change: P.ProjectModelAccessChange) => Promise<P.ProjectModelAccess>;
|
|
263
|
-
sandboxHealth: () => Promise<P.ProjectSandboxHealth>;
|
|
264
|
-
onboardingComplete: (completed: boolean) => Promise<P.KortixProject>;
|
|
265
|
-
/** Provider-neutral serverless Apps owned by this project. */
|
|
266
|
-
apps: {
|
|
267
|
-
list: () => Promise<P.App[]>;
|
|
268
|
-
create: (input: Parameters<typeof P.createApp>[1]) => Promise<P.App>;
|
|
269
|
-
get: (appId: string) => Promise<P.App>;
|
|
270
|
-
update: (appId: string, input: P.UpdateAppInput) => Promise<P.App>;
|
|
271
|
-
access: {
|
|
272
|
-
get: (appId: string) => Promise<P.AppAccessConfig>;
|
|
273
|
-
update: (appId: string, input: P.UpdateAppAccessInput) => Promise<P.AppAccessConfig>;
|
|
274
|
-
session: (appId: string) => Promise<P.AppAccessSession>;
|
|
275
|
-
/** Agents whose `kortix.yaml` `apps:` grant names this App. Read-only. */
|
|
276
|
-
agents: (appId: string) => Promise<P.AppAgentAccess[]>;
|
|
277
246
|
};
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
register: (input: Parameters<typeof P.registerAppArtifact>[1]) => Promise<P.RegisterAppArtifactResponse>;
|
|
283
|
-
uploadArchive: (input: Blob | Uint8Array<ArrayBufferLike>, options?: P.UploadAppArtifactOptions | undefined) => Promise<P.AppArtifact>;
|
|
284
|
-
finalize: (artifactId: string, input: P.FinalizeAppArtifactInput) => Promise<P.AppArtifact>;
|
|
247
|
+
audit: (limit?: number, options?: Parameters<typeof P.getSessionAudit>[3]) => Promise<P.SessionAudit>;
|
|
248
|
+
attachments: {
|
|
249
|
+
upload: (file: File, options?: Parameters<typeof P.uploadSessionAttachment>[3]) => Promise<P.SessionAttachment>;
|
|
250
|
+
read: (attachmentId: string, signal?: AbortSignal) => Promise<Blob>;
|
|
285
251
|
};
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
252
|
+
transcript: (options?: Parameters<typeof P.getSessionTranscript>[2]) => Promise<P.SessionTranscript>;
|
|
253
|
+
messageAuthors: () => Promise<P.SessionMessageAuthors>;
|
|
254
|
+
transcriptSync: (options?: Parameters<typeof P.getSessionTranscriptSync>[2]) => Promise<P.SessionTranscriptSyncEnvelope>;
|
|
255
|
+
turn: () => Promise<P.SessionTurnStatus>;
|
|
256
|
+
prompts: {
|
|
257
|
+
create: (input: P.CreateSessionPromptInput) => Promise<P.CreateSessionPromptResult>;
|
|
258
|
+
list: () => Promise<{
|
|
259
|
+
prompts: P.SessionPrompt[];
|
|
260
|
+
observed_at?: string;
|
|
261
|
+
}>;
|
|
262
|
+
remove: (promptId: string) => Promise<P.RemovedSessionPrompt>;
|
|
263
|
+
retry: (promptId: string) => Promise<P.SessionPrompt>;
|
|
264
|
+
edit: (promptId: string, text: string) => Promise<P.SessionPrompt>;
|
|
265
|
+
hold: (held: boolean) => Promise<{
|
|
266
|
+
prompts: P.SessionPrompt[];
|
|
267
|
+
observed_at?: string;
|
|
268
|
+
}>;
|
|
291
269
|
};
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
270
|
+
ensureReady: (opts?: {
|
|
271
|
+
readyTimeoutMs?: number;
|
|
272
|
+
}) => Promise<import("../../index.js").SessionRuntimeEntry>;
|
|
273
|
+
get: (opts?: {
|
|
274
|
+
showErrors?: boolean;
|
|
275
|
+
}) => Promise<P.ProjectSession>;
|
|
276
|
+
presence: (input: {
|
|
277
|
+
tab_id: string;
|
|
278
|
+
active: boolean;
|
|
279
|
+
}) => Promise<import("../../index.js").ApiResponse<{
|
|
301
280
|
ok: boolean;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
requestSecret: (input: Parameters<typeof P.requestProjectSecret>[1]) => Promise<P.SecretRequestLink>;
|
|
307
|
-
requestConnector: (input: Parameters<typeof P.requestProjectConnector>[1]) => Promise<P.ConnectorRequestLink>;
|
|
308
|
-
};
|
|
309
|
-
/** Validate a `kortix.yaml` (or legacy `kortix.toml`) manifest's raw text server-side — format is auto-resolved from the project's manifest path (same schema `kortix ship`/CR-merge use). */
|
|
310
|
-
validateManifest: (raw: string) => Promise<P.ManifestValidationResult>;
|
|
311
|
-
/** Mint a fresh scoped git push token for a managed project (409 for BYO repos). */
|
|
312
|
-
gitToken: () => Promise<P.ProjectGitToken>;
|
|
313
|
-
secrets: {
|
|
314
|
-
list: () => Promise<P.ProjectSecretsResponse>;
|
|
315
|
-
upsert: (input: Parameters<typeof P.upsertProjectSecret>[1]) => Promise<P.ProjectSecret>;
|
|
316
|
-
setStrategy: (identifier: string, strategy: P.SecretDeliveryStrategy, options?: P.UpdateSecretStrategyOptions | undefined) => Promise<P.ProjectSecret>;
|
|
317
|
-
broker: (identifier: string, input: P.SecretBrokerRequest) => Promise<P.SecretBrokerResponse>;
|
|
318
|
-
remove: (name: string) => Promise<{
|
|
281
|
+
}>>;
|
|
282
|
+
cost: () => Promise<P.SessionCostDetail>;
|
|
283
|
+
update: (input: Parameters<typeof P.updateProjectSession>[2]) => Promise<P.ProjectSession>;
|
|
284
|
+
delete: () => Promise<{
|
|
319
285
|
ok: boolean;
|
|
320
286
|
}>;
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}) => Promise<P.
|
|
325
|
-
|
|
287
|
+
start: (options?: number | {
|
|
288
|
+
waitMs?: number;
|
|
289
|
+
repositoryMode?: "previous";
|
|
290
|
+
} | undefined) => Promise<P.SessionStartResult | null>;
|
|
291
|
+
restart: () => Promise<{
|
|
326
292
|
ok: boolean;
|
|
293
|
+
session_id: string;
|
|
294
|
+
status: string;
|
|
327
295
|
}>;
|
|
328
|
-
|
|
329
|
-
configured: boolean;
|
|
330
|
-
provider: string;
|
|
331
|
-
git_connection: P.ProjectGitConnection;
|
|
332
|
-
}>;
|
|
333
|
-
/** The provider logins saved on this project (ChatGPT, OpenCode Zen, OpenCode Go). */
|
|
334
|
-
listProviderOAuth: () => Promise<P.ProviderOAuthCredential[]>;
|
|
335
|
-
/** Device-code OAuth flow to connect a subscription-backed provider (e.g. ChatGPT, opencode-go). */
|
|
336
|
-
startProviderOAuth: (provider: string, input?: {
|
|
337
|
-
sharing?: P.ConnectorSharing;
|
|
338
|
-
resourceLabel?: string;
|
|
339
|
-
resourceId?: string;
|
|
340
|
-
} | undefined) => Promise<P.ProviderOAuthStart>;
|
|
341
|
-
pollProviderOAuth: (provider: string, flowId: string) => Promise<P.ProviderOAuthPoll>;
|
|
342
|
-
removeProviderOAuth: (provider: string) => Promise<{
|
|
296
|
+
stop: () => Promise<{
|
|
343
297
|
ok: boolean;
|
|
298
|
+
session_id: string;
|
|
299
|
+
status: string;
|
|
344
300
|
}>;
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
invite_url: string;
|
|
355
|
-
email_sent: boolean;
|
|
356
|
-
email_skip_reason: string | null;
|
|
357
|
-
}>;
|
|
358
|
-
update: (userId: string, role: P.ProjectRole) => Promise<P.ProjectAccessMember>;
|
|
359
|
-
revoke: (userId: string) => Promise<{
|
|
360
|
-
ok: boolean;
|
|
301
|
+
configState: () => Promise<P.SessionConfigState>;
|
|
302
|
+
reloadConfig: (input?: Parameters<typeof P.reloadProjectSessionConfig>[2]) => Promise<P.SessionReloadResult>;
|
|
303
|
+
reloadConfigStream: (input: {
|
|
304
|
+
refresh_repo?: boolean;
|
|
305
|
+
force?: boolean;
|
|
306
|
+
}, onEvent: (event: P.SessionReloadStreamEvent) => void, options?: import("../../index.js").ApiClientOptions | undefined) => Promise<P.SessionReloadResult>;
|
|
307
|
+
setSharing: (intent: Parameters<typeof P.setProjectSessionSharing>[2]) => Promise<P.ProjectSession>;
|
|
308
|
+
previews: () => Promise<{
|
|
309
|
+
candidates: P.SessionPreviewCandidate[];
|
|
361
310
|
}>;
|
|
362
|
-
|
|
363
|
-
|
|
311
|
+
participants: () => Promise<P.SessionParticipants>;
|
|
312
|
+
commit: (input?: Parameters<typeof P.commitSessionChanges>[2]) => Promise<P.CommitSessionResult>;
|
|
313
|
+
publicShares: {
|
|
314
|
+
list: () => Promise<{
|
|
315
|
+
shares: P.SessionPublicShare[];
|
|
316
|
+
}>;
|
|
317
|
+
create: (input: P.CreateSessionPublicShareInput) => Promise<{
|
|
318
|
+
share: P.SessionPublicShare;
|
|
319
|
+
}>;
|
|
320
|
+
revoke: (shareId: string) => Promise<{
|
|
321
|
+
share: P.SessionPublicShare;
|
|
322
|
+
}>;
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
modelDefaults: {
|
|
326
|
+
get: () => Promise<P.ModelDefaultsResponse>;
|
|
327
|
+
set: (input: Parameters<typeof P.setModelDefault>[1]) => Promise<{
|
|
328
|
+
ok: boolean;
|
|
329
|
+
scope: string;
|
|
330
|
+
agentName?: string;
|
|
331
|
+
model: string;
|
|
364
332
|
}>;
|
|
365
|
-
|
|
366
|
-
revokeInvite: (inviteId: string) => Promise<{
|
|
333
|
+
clear: (params: Parameters<typeof P.clearModelDefault>[1]) => Promise<{
|
|
367
334
|
ok: boolean;
|
|
368
|
-
invitation_cancelled: boolean;
|
|
369
335
|
}>;
|
|
370
|
-
|
|
371
|
-
|
|
336
|
+
};
|
|
337
|
+
setDefaultAgent: (agentName: string) => Promise<P.UpdateProjectDefaultAgentResponse>;
|
|
338
|
+
sandbox: {
|
|
339
|
+
list: () => Promise<P.SandboxTemplatesResponse>;
|
|
340
|
+
snapshots: () => Promise<P.ProjectSnapshotsResponse>;
|
|
341
|
+
rebuildSnapshot: (slug?: string) => Promise<P.RebuildSnapshotResponse>;
|
|
342
|
+
fixWithAgent: () => Promise<{
|
|
343
|
+
session_id: string;
|
|
372
344
|
}>;
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
345
|
+
createTemplate: (input: Parameters<typeof P.createSandboxTemplate>[1]) => Promise<{
|
|
346
|
+
template_id: string;
|
|
347
|
+
slug: string;
|
|
376
348
|
}>;
|
|
377
|
-
|
|
378
|
-
|
|
349
|
+
updateTemplate: (templateId: string, input: P.UpdateSandboxTemplateInput) => Promise<{
|
|
350
|
+
template_id: string;
|
|
351
|
+
slug: string;
|
|
379
352
|
}>;
|
|
380
|
-
|
|
381
|
-
|
|
353
|
+
removeTemplate: (templateId: string) => Promise<null>;
|
|
354
|
+
buildTemplate: (templateId: string) => Promise<{
|
|
355
|
+
status: "started";
|
|
356
|
+
template_id: string;
|
|
357
|
+
slug: string;
|
|
358
|
+
providers?: Array<"daytona" | "platinum" | "e2b">;
|
|
382
359
|
}>;
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
360
|
+
setProvider: (provider: Parameters<typeof P.updateProjectSandboxProvider>[1]) => Promise<P.UpdateProjectSandboxProviderResult>;
|
|
361
|
+
};
|
|
362
|
+
setAgentScope: (agentName: string, scope: {
|
|
363
|
+
env?: P.AgentGrantSet;
|
|
364
|
+
connectors?: P.AgentGrantSet;
|
|
365
|
+
connectors_required?: string[];
|
|
366
|
+
connectors_personal?: string[];
|
|
367
|
+
}) => Promise<{
|
|
368
|
+
ok: boolean;
|
|
369
|
+
agent: string;
|
|
370
|
+
env: P.AgentGrantSet;
|
|
371
|
+
connectors: P.AgentGrantSet;
|
|
372
|
+
connectors_required: string[];
|
|
373
|
+
}>;
|
|
374
|
+
channels: {
|
|
375
|
+
slack: {
|
|
376
|
+
installation: () => Promise<P.SlackInstallation | null>;
|
|
377
|
+
connect: (input: Parameters<typeof P.connectSlack>[1]) => Promise<P.SlackInstallation>;
|
|
378
|
+
mode: () => Promise<P.SlackMode>;
|
|
379
|
+
completeInstall: (input: Parameters<typeof P.completeSlackInstall>[1]) => Promise<P.ChannelInstallCompletion>;
|
|
380
|
+
manifest: () => Promise<Record<string, unknown>>;
|
|
381
|
+
disconnect: () => Promise<void>;
|
|
382
|
+
getFile: (url: string) => Promise<Blob>;
|
|
383
|
+
uploadFile: (input: Parameters<typeof P.uploadSlackChannelFile>[1]) => Promise<P.UploadSlackChannelFileResult>;
|
|
384
|
+
};
|
|
385
|
+
teams: {
|
|
386
|
+
completeInstall: (input: Parameters<typeof P.completeTeamsInstall>[1]) => Promise<P.ChannelInstallCompletion>;
|
|
387
|
+
};
|
|
388
|
+
email: {
|
|
389
|
+
installation: (connectorSlug?: string | null) => Promise<P.EmailInstallation | null>;
|
|
390
|
+
mode: () => Promise<P.EmailMode>;
|
|
391
|
+
connect: (input: Parameters<typeof P.connectEmail>[1]) => Promise<P.EmailInstallation>;
|
|
392
|
+
disconnect: (connectorSlug?: string | null) => Promise<void>;
|
|
393
|
+
updatePolicy: (connectorSlug: string | null | undefined, senderPolicy: P.EmailSenderPolicy) => Promise<P.EmailInstallation>;
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
updateFeatureFlag: (feature: P.FeatureFlagKey, enabled: boolean | null) => Promise<P.KortixProject>;
|
|
397
|
+
updateExperimentalFeature: (feature: P.FeatureFlagKey, enabled: boolean | null) => Promise<P.KortixProject>;
|
|
398
|
+
gateway: {
|
|
399
|
+
logs: (opts?: Parameters<typeof P.listGatewayLogs>[1]) => Promise<P.GatewayLogsResponse>;
|
|
400
|
+
log: (logId: string) => Promise<P.GatewayLogDetail>;
|
|
401
|
+
overview: (days?: number) => Promise<P.GatewayOverview>;
|
|
402
|
+
series: (days?: number) => Promise<P.GatewaySeries>;
|
|
403
|
+
breakdown: (days?: number) => Promise<P.GatewayBreakdown>;
|
|
404
|
+
sessions: (days?: number) => Promise<P.GatewaySessions>;
|
|
405
|
+
errors: (days?: number) => Promise<P.GatewayErrorsResponse>;
|
|
406
|
+
budgets: () => Promise<P.GatewayBudgetsResponse>;
|
|
407
|
+
setBudget: (input: Parameters<typeof P.setGatewayBudget>[1]) => Promise<{
|
|
408
|
+
ok: boolean;
|
|
387
409
|
}>;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
group_id: string;
|
|
391
|
-
role: P.ProjectRole;
|
|
410
|
+
deleteBudget: (budgetId: string) => Promise<{
|
|
411
|
+
ok: boolean;
|
|
392
412
|
}>;
|
|
393
|
-
|
|
413
|
+
keys: () => Promise<{
|
|
414
|
+
keys: P.GatewayKeyRow[];
|
|
415
|
+
gateway_url?: string | null;
|
|
416
|
+
}>;
|
|
417
|
+
createKey: (name: string) => Promise<P.CreatedGatewayKey>;
|
|
418
|
+
revokeKey: (keyId: string) => Promise<{
|
|
394
419
|
ok: boolean;
|
|
395
420
|
}>;
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}>;
|
|
402
|
-
remove: (grantId: string) => Promise<{
|
|
403
|
-
ok: boolean;
|
|
404
|
-
}>;
|
|
421
|
+
routing: {
|
|
422
|
+
get: () => Promise<P.GatewayRoutingPolicyDocument>;
|
|
423
|
+
set: (policy: Parameters<typeof P.setGatewayRoutingPolicy>[1]) => Promise<P.GatewayRoutingPolicyDocument>;
|
|
424
|
+
reset: () => Promise<P.GatewayRoutingPolicyDocument>;
|
|
425
|
+
preview: (input: Parameters<typeof P.previewGatewayRoute>[1]) => Promise<P.GatewayRoutePreview>;
|
|
405
426
|
};
|
|
427
|
+
playground: (prompt: string, models: string[], system?: string) => Promise<P.GatewayPlaygroundResponse>;
|
|
428
|
+
};
|
|
429
|
+
sessions: {
|
|
430
|
+
list: (options?: Parameters<typeof P.listProjectSessions>[1]) => Promise<P.ProjectSession[]>;
|
|
431
|
+
listPage: (options?: Parameters<typeof P.listProjectSessionsPage>[1]) => Promise<P.ProjectSessionPage>;
|
|
432
|
+
create: (input?: Parameters<typeof P.createProjectSession>[1]) => Promise<P.ProjectSession>;
|
|
433
|
+
ensureWarm: () => Promise<P.WarmProjectSessionResult>;
|
|
434
|
+
claimWarm: (input: Parameters<typeof P.claimWarmProjectSession>[1]) => Promise<P.ProjectSession>;
|
|
435
|
+
};
|
|
436
|
+
review: {
|
|
437
|
+
list: (params?: Parameters<typeof P.listReviewItems>[1]) => Promise<{
|
|
438
|
+
review_items: P.ApiReviewItem[];
|
|
439
|
+
}>;
|
|
440
|
+
get: (reviewItemId: string) => Promise<{
|
|
441
|
+
review_item: P.ApiReviewItem;
|
|
442
|
+
}>;
|
|
443
|
+
submit: (input: Parameters<typeof P.submitReviewItem>[1]) => Promise<P.ApiReviewItem>;
|
|
444
|
+
act: (reviewItemId: string, input: {
|
|
445
|
+
verdict: P.ReviewVerdict;
|
|
446
|
+
feedback?: string;
|
|
447
|
+
}) => Promise<P.ApiReviewItem>;
|
|
448
|
+
bulkAct: (input: Parameters<typeof P.bulkActReviewItems>[1]) => Promise<{
|
|
449
|
+
updated: number;
|
|
450
|
+
review_items: P.ApiReviewItem[];
|
|
451
|
+
}>;
|
|
452
|
+
};
|
|
453
|
+
approvals: {
|
|
454
|
+
list: (options?: Parameters<typeof P.listPendingApprovals>[1]) => Promise<P.PendingApprovalsResponse>;
|
|
455
|
+
resolve: (executionId: string, decision: "deny" | "approve", options?: P.ResolveApprovalOptions | undefined) => Promise<{
|
|
456
|
+
ok: boolean;
|
|
457
|
+
}>;
|
|
458
|
+
sessionsNeedingInput: (options?: Parameters<typeof P.listSessionsNeedingInput>[1]) => Promise<P.SessionsNeedingInputResponse>;
|
|
459
|
+
};
|
|
460
|
+
files: {
|
|
461
|
+
list: (options?: Parameters<typeof P.listProjectFiles>[1]) => Promise<P.ProjectFileEntry[]>;
|
|
462
|
+
read: (path: string, ref?: string) => Promise<{
|
|
463
|
+
path: string;
|
|
464
|
+
ref: string;
|
|
465
|
+
content: string;
|
|
466
|
+
}>;
|
|
467
|
+
search: (query: string, options?: {
|
|
468
|
+
content?: boolean;
|
|
469
|
+
ref?: string;
|
|
470
|
+
limit?: number;
|
|
471
|
+
} | undefined) => Promise<P.ProjectFileSearchResponse>;
|
|
472
|
+
archive: (ref: string, path?: string | undefined) => Promise<Blob>;
|
|
473
|
+
history: (path: string, options?: {
|
|
474
|
+
ref?: string;
|
|
475
|
+
limit?: number;
|
|
476
|
+
skip?: number;
|
|
477
|
+
} | undefined) => Promise<P.ProjectFileHistoryResponse>;
|
|
478
|
+
};
|
|
479
|
+
git: {
|
|
480
|
+
commits: () => Promise<P.ProjectCommitsResponse>;
|
|
481
|
+
commit: (sha: string) => Promise<P.ProjectCommitDetail>;
|
|
482
|
+
commitDiff: (sha: string) => Promise<P.ProjectCommitDiffResponse>;
|
|
483
|
+
branches: () => Promise<P.ProjectBranchesResponse>;
|
|
484
|
+
versionDiff: (input: {
|
|
485
|
+
from: string;
|
|
486
|
+
into: string;
|
|
487
|
+
}) => Promise<P.VersionDiffPreview>;
|
|
488
|
+
inviteCollaborator: (githubUsername: string, permission?: "read" | "write" | undefined) => Promise<P.RepoCollaboratorInvite>;
|
|
489
|
+
};
|
|
490
|
+
changeRequests: {
|
|
491
|
+
list: () => Promise<{
|
|
492
|
+
change_requests: P.ChangeRequest[];
|
|
493
|
+
}>;
|
|
494
|
+
get: (crId: string) => Promise<P.ChangeRequestDetailResponse>;
|
|
495
|
+
diff: (crId: string) => Promise<P.ChangeRequestDiffResponse>;
|
|
496
|
+
mergePreview: (crId: string) => Promise<P.ChangeRequestMergePreview>;
|
|
497
|
+
open: (input: {
|
|
498
|
+
title: string;
|
|
499
|
+
description?: string;
|
|
500
|
+
head_ref: string;
|
|
501
|
+
base_ref?: string;
|
|
502
|
+
session_id?: string;
|
|
503
|
+
}) => Promise<P.ChangeRequest>;
|
|
504
|
+
merge: (crId: string, input?: {
|
|
505
|
+
message?: string;
|
|
506
|
+
} | undefined) => Promise<P.ChangeRequestMergeResponse>;
|
|
507
|
+
close: (crId: string) => Promise<P.ChangeRequest>;
|
|
508
|
+
reopen: (crId: string) => Promise<P.ChangeRequest>;
|
|
509
|
+
requestChanges: (crId: string, feedback: string) => Promise<{
|
|
510
|
+
change_request: P.ChangeRequest;
|
|
511
|
+
delivering: boolean;
|
|
512
|
+
}>;
|
|
513
|
+
};
|
|
514
|
+
policies: {
|
|
515
|
+
list: () => Promise<P.ProjectPoliciesResponse>;
|
|
516
|
+
set: (policies: P.ProjectPolicy[], defaultMode: P.PolicyDefaultMode) => Promise<{
|
|
517
|
+
ok: boolean;
|
|
518
|
+
sync?: P.ConnectorSyncResult;
|
|
519
|
+
}>;
|
|
520
|
+
};
|
|
521
|
+
reminders: {
|
|
522
|
+
list: () => Promise<{
|
|
523
|
+
reminders: P.ProjectReminder[];
|
|
524
|
+
}>;
|
|
525
|
+
};
|
|
526
|
+
triggers: {
|
|
527
|
+
list: () => Promise<P.ProjectTriggerListing>;
|
|
528
|
+
create: (input: P.CreateProjectTriggerInput) => Promise<P.ProjectTriggerListing>;
|
|
529
|
+
update: (slug: string, input: P.UpdateProjectTriggerInput) => Promise<P.ProjectTriggerListing>;
|
|
530
|
+
remove: (slug: string) => Promise<{
|
|
531
|
+
ok: boolean;
|
|
532
|
+
}>;
|
|
533
|
+
fire: (slug: string) => Promise<P.FireProjectTriggerResponse>;
|
|
534
|
+
setActivation: (paused: boolean) => Promise<P.ProjectTriggerListing>;
|
|
406
535
|
};
|
|
407
536
|
connectors: {
|
|
408
537
|
list: () => Promise<P.ConnectorsResponse>;
|
|
@@ -461,7 +590,6 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
461
590
|
}>;
|
|
462
591
|
rename: (connectionId: string, label: string) => Promise<P.Connection>;
|
|
463
592
|
share: (connectionId: string, principals?: P.ConnectionSharePrincipal[] | undefined) => Promise<P.Connection>;
|
|
464
|
-
/** Add a machine the caller paired to this project as a `computer` account. */
|
|
465
593
|
addComputer: (input: {
|
|
466
594
|
tunnelId: string;
|
|
467
595
|
share?: P.ConnectorConnectOwner;
|
|
@@ -481,11 +609,8 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
481
609
|
sync?: P.ConnectorSyncResult;
|
|
482
610
|
}>;
|
|
483
611
|
};
|
|
484
|
-
/** Easy-connect (Pipedream): app catalog + connect/finalize handshake. */
|
|
485
612
|
pipedream: {
|
|
486
613
|
listApps: (qOrQuery?: string | P.PipedreamCatalogQuery | undefined, cursor?: string | undefined) => Promise<P.PipedreamCatalogPage>;
|
|
487
|
-
/** The browse page: a fixed top slice of each of the largest
|
|
488
|
-
* categories, with each category's true total, in one request. */
|
|
489
614
|
listSections: (opts?: {
|
|
490
615
|
perCategory?: number;
|
|
491
616
|
maxCategories?: number;
|
|
@@ -497,559 +622,354 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
497
622
|
connect: (slug: string, options?: P.ConnectorConnectOptions | undefined) => Promise<P.ConnectorConnectResult>;
|
|
498
623
|
finalize: (slug: string, options?: P.ConnectorFinalizeOptions | undefined) => Promise<P.ConnectorFinalizeResult>;
|
|
499
624
|
};
|
|
500
|
-
/** Direct connector catalogue and normalized domain surfaces. */
|
|
501
625
|
discover: {
|
|
502
626
|
list: (qOrQuery?: string | P.DiscoverConnectorsQuery | undefined, cursor?: string | undefined) => Promise<P.DiscoverConnectorsPage>;
|
|
503
|
-
/** The browse page: Popular plus a fixed top slice of each section,
|
|
504
|
-
* with each section's true total, in one request. */
|
|
505
627
|
sections: (opts?: {
|
|
506
628
|
perCategory?: number;
|
|
507
629
|
maxCategories?: number;
|
|
508
630
|
} | undefined) => Promise<P.DiscoverSectionsPage>;
|
|
509
631
|
detail: (id: string) => Promise<P.DiscoverConnectorDetail>;
|
|
510
632
|
};
|
|
511
|
-
/** Callable catalog for this project or token scope. */
|
|
512
633
|
catalog: (options?: Parameters<typeof P.getConnectorCatalog>[1]) => Promise<P.ConnectorCatalogEntry[]>;
|
|
513
|
-
/** Flattened `<connector>.<action>` tool list. */
|
|
514
634
|
tools: () => Promise<P.ConnectorTool[]>;
|
|
515
|
-
/** Search callable tools by id and description. */
|
|
516
635
|
search: (query?: string | undefined, options?: {
|
|
517
636
|
limit?: number;
|
|
518
637
|
} | undefined) => Promise<P.ConnectorTool[]>;
|
|
519
|
-
/** Describe one `<connector>.<action>` tool. */
|
|
520
638
|
describe: (tool: string) => Promise<P.ConnectorTool | null>;
|
|
521
|
-
/** Call one `<connector>.<action>` tool. */
|
|
522
639
|
call: <T = unknown>(tool: string, args?: Record<string, unknown> | undefined, options?: P.ConnectorCallOptions | undefined) => Promise<P.ConnectorCallResult<T>>;
|
|
523
|
-
/** The accounts a connector can be called as, default first. */
|
|
524
640
|
accounts: (slug: string) => Promise<P.ConnectorAccount[]>;
|
|
525
|
-
/** Upload bytes for use by a later connector call. */
|
|
526
641
|
uploadAttachment: (content: Blob | ArrayBuffer | Uint8Array<ArrayBufferLike>, input: P.ConnectorAttachmentUploadInput) => Promise<P.ConnectorAttachmentUploadResult>;
|
|
527
642
|
};
|
|
528
|
-
|
|
529
|
-
list: () => Promise<P.
|
|
530
|
-
|
|
643
|
+
tokens: {
|
|
644
|
+
list: () => Promise<P.ProjectCliTokenListResponse>;
|
|
645
|
+
create: (input?: Parameters<typeof P.createProjectCliToken>[1]) => Promise<P.CreatedProjectCliToken>;
|
|
646
|
+
revoke: (tokenId: string) => Promise<{
|
|
531
647
|
ok: boolean;
|
|
532
|
-
sync?: P.ConnectorSyncResult;
|
|
533
|
-
}>;
|
|
534
|
-
};
|
|
535
|
-
/** Reminders on every session the caller can open — see `listProjectReminders`. */
|
|
536
|
-
reminders: {
|
|
537
|
-
list: () => Promise<{
|
|
538
|
-
reminders: P.ProjectReminder[];
|
|
539
648
|
}>;
|
|
540
649
|
};
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
update: (slug: string, input: P.UpdateProjectTriggerInput) => Promise<P.ProjectTriggerListing>;
|
|
545
|
-
remove: (slug: string) => Promise<{
|
|
546
|
-
ok: boolean;
|
|
547
|
-
}>;
|
|
548
|
-
fire: (slug: string) => Promise<P.FireProjectTriggerResponse>;
|
|
549
|
-
setActivation: (paused: boolean) => Promise<P.ProjectTriggerListing>;
|
|
550
|
-
};
|
|
551
|
-
files: {
|
|
552
|
-
list: (options?: Parameters<typeof P.listProjectFiles>[1]) => Promise<P.ProjectFileEntry[]>;
|
|
553
|
-
read: (path: string, ref?: string) => Promise<{
|
|
554
|
-
path: string;
|
|
555
|
-
ref: string;
|
|
556
|
-
content: string;
|
|
557
|
-
}>;
|
|
558
|
-
search: (query: string, options?: {
|
|
559
|
-
content?: boolean;
|
|
560
|
-
ref?: string;
|
|
561
|
-
limit?: number;
|
|
562
|
-
} | undefined) => Promise<P.ProjectFileSearchResponse>;
|
|
563
|
-
archive: (ref: string, path?: string | undefined) => Promise<Blob>;
|
|
564
|
-
history: (path: string, options?: {
|
|
565
|
-
ref?: string;
|
|
566
|
-
limit?: number;
|
|
567
|
-
skip?: number;
|
|
568
|
-
} | undefined) => Promise<P.ProjectFileHistoryResponse>;
|
|
569
|
-
};
|
|
570
|
-
git: {
|
|
571
|
-
commits: () => Promise<P.ProjectCommitsResponse>;
|
|
572
|
-
commit: (sha: string) => Promise<P.ProjectCommitDetail>;
|
|
573
|
-
commitDiff: (sha: string) => Promise<P.ProjectCommitDiffResponse>;
|
|
574
|
-
branches: () => Promise<P.ProjectBranchesResponse>;
|
|
575
|
-
versionDiff: (input: {
|
|
576
|
-
from: string;
|
|
577
|
-
into: string;
|
|
578
|
-
}) => Promise<P.VersionDiffPreview>;
|
|
579
|
-
/** Invite a GitHub user as a collaborator on a Kortix-managed repo. */
|
|
580
|
-
inviteCollaborator: (githubUsername: string, permission?: "read" | "write" | undefined) => Promise<P.RepoCollaboratorInvite>;
|
|
581
|
-
};
|
|
582
|
-
changeRequests: {
|
|
583
|
-
list: () => Promise<{
|
|
584
|
-
change_requests: P.ChangeRequest[];
|
|
585
|
-
}>;
|
|
586
|
-
get: (crId: string) => Promise<P.ChangeRequestDetailResponse>;
|
|
587
|
-
diff: (crId: string) => Promise<P.ChangeRequestDiffResponse>;
|
|
588
|
-
mergePreview: (crId: string) => Promise<P.ChangeRequestMergePreview>;
|
|
589
|
-
open: (input: {
|
|
590
|
-
title: string;
|
|
591
|
-
description?: string;
|
|
592
|
-
head_ref: string;
|
|
593
|
-
base_ref?: string;
|
|
594
|
-
session_id?: string;
|
|
595
|
-
}) => Promise<P.ChangeRequest>;
|
|
596
|
-
merge: (crId: string, input?: {
|
|
597
|
-
message?: string;
|
|
598
|
-
} | undefined) => Promise<P.ChangeRequestMergeResponse>;
|
|
599
|
-
close: (crId: string) => Promise<P.ChangeRequest>;
|
|
600
|
-
reopen: (crId: string) => Promise<P.ChangeRequest>;
|
|
601
|
-
/** Request changes on a CR (Review Center) — records feedback + optionally delivers it back to the originating session. */
|
|
602
|
-
requestChanges: (crId: string, feedback: string) => Promise<{
|
|
603
|
-
change_request: P.ChangeRequest;
|
|
604
|
-
delivering: boolean;
|
|
605
|
-
}>;
|
|
606
|
-
};
|
|
607
|
-
sessions: {
|
|
608
|
-
/** One page of sessions as a bare array. See `listPage` for `next_cursor`. */
|
|
609
|
-
list: (options?: Parameters<typeof P.listProjectSessions>[1]) => Promise<P.ProjectSession[]>;
|
|
610
|
-
/** One keyset page plus its continuation token. The list is bounded —
|
|
611
|
-
* walk it with `next_cursor`, and use `get(sessionId)` to resolve one
|
|
612
|
-
* session rather than paging in search of it. */
|
|
613
|
-
listPage: (options?: Parameters<typeof P.listProjectSessionsPage>[1]) => Promise<P.ProjectSessionPage>;
|
|
614
|
-
create: (input?: Parameters<typeof P.createProjectSession>[1]) => Promise<P.ProjectSession>;
|
|
615
|
-
/** Pre-create the session a present user is about to start. Ordinary session; ignore failures. */
|
|
616
|
-
ensureWarm: () => Promise<P.WarmProjectSessionResult>;
|
|
617
|
-
/** @deprecated Navigate to `ensureWarm()`'s session and prompt it. Removed in the next major. */
|
|
618
|
-
claimWarm: (input: Parameters<typeof P.claimWarmProjectSession>[1]) => Promise<P.ProjectSession>;
|
|
619
|
-
};
|
|
620
|
-
/** Review Center — the per-project human-in-the-loop inbox (change requests, tool approvals, agent outputs/decisions). */
|
|
621
|
-
review: {
|
|
622
|
-
list: (params?: Parameters<typeof P.listReviewItems>[1]) => Promise<{
|
|
623
|
-
review_items: P.ApiReviewItem[];
|
|
624
|
-
}>;
|
|
625
|
-
get: (reviewItemId: string) => Promise<{
|
|
626
|
-
review_item: P.ApiReviewItem;
|
|
627
|
-
}>;
|
|
628
|
-
submit: (input: Parameters<typeof P.submitReviewItem>[1]) => Promise<P.ApiReviewItem>;
|
|
629
|
-
act: (reviewItemId: string, input: {
|
|
630
|
-
verdict: P.ReviewVerdict;
|
|
631
|
-
feedback?: string;
|
|
632
|
-
}) => Promise<P.ApiReviewItem>;
|
|
633
|
-
bulkAct: (input: Parameters<typeof P.bulkActReviewItems>[1]) => Promise<{
|
|
634
|
-
updated: number;
|
|
635
|
-
review_items: P.ApiReviewItem[];
|
|
636
|
-
}>;
|
|
637
|
-
};
|
|
638
|
-
/** The manager inbox of connector-gated actions awaiting approve/deny (APPROVE / ASK / BLOCK). */
|
|
639
|
-
approvals: {
|
|
640
|
-
list: (options?: Parameters<typeof P.listPendingApprovals>[1]) => Promise<P.PendingApprovalsResponse>;
|
|
641
|
-
resolve: (executionId: string, decision: "deny" | "approve", options?: P.ResolveApprovalOptions | undefined) => Promise<{
|
|
642
|
-
ok: boolean;
|
|
643
|
-
}>;
|
|
644
|
-
sessionsNeedingInput: (options?: Parameters<typeof P.listSessionsNeedingInput>[1]) => Promise<P.SessionsNeedingInputResponse>;
|
|
650
|
+
setupLinks: {
|
|
651
|
+
requestSecret: (input: Parameters<typeof P.requestProjectSecret>[1]) => Promise<P.SecretRequestLink>;
|
|
652
|
+
requestConnector: (input: Parameters<typeof P.requestProjectConnector>[1]) => Promise<P.ConnectorRequestLink>;
|
|
645
653
|
};
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
budgets: () => Promise<P.GatewayBudgetsResponse>;
|
|
656
|
-
setBudget: (input: Parameters<typeof P.setGatewayBudget>[1]) => Promise<{
|
|
654
|
+
validateManifest: (raw: string) => Promise<P.ManifestValidationResult>;
|
|
655
|
+
gitToken: () => Promise<P.ProjectGitToken>;
|
|
656
|
+
agentIdentities: () => Promise<P.AgentIdentity[]>;
|
|
657
|
+
secrets: {
|
|
658
|
+
list: () => Promise<P.ProjectSecretsResponse>;
|
|
659
|
+
upsert: (input: Parameters<typeof P.upsertProjectSecret>[1]) => Promise<P.ProjectSecret>;
|
|
660
|
+
setStrategy: (identifier: string, strategy: P.SecretDeliveryStrategy, options?: P.UpdateSecretStrategyOptions | undefined) => Promise<P.ProjectSecret>;
|
|
661
|
+
broker: (identifier: string, input: P.SecretBrokerRequest) => Promise<P.SecretBrokerResponse>;
|
|
662
|
+
remove: (name: string) => Promise<{
|
|
657
663
|
ok: boolean;
|
|
658
664
|
}>;
|
|
659
|
-
|
|
665
|
+
setPersonal: (name: string, input: {
|
|
666
|
+
value?: string;
|
|
667
|
+
active?: boolean;
|
|
668
|
+
}) => Promise<P.ProjectSecret>;
|
|
669
|
+
removePersonal: (name: string) => Promise<{
|
|
660
670
|
ok: boolean;
|
|
661
671
|
}>;
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
672
|
+
setGitCredential: (input: Parameters<typeof P.upsertProjectGitCredential>[1]) => Promise<{
|
|
673
|
+
configured: boolean;
|
|
674
|
+
provider: string;
|
|
675
|
+
git_connection: P.ProjectGitConnection;
|
|
665
676
|
}>;
|
|
666
|
-
|
|
667
|
-
|
|
677
|
+
listProviderOAuth: () => Promise<P.ProviderOAuthCredential[]>;
|
|
678
|
+
startProviderOAuth: (provider: string, input?: {
|
|
679
|
+
sharing?: P.ConnectorSharing;
|
|
680
|
+
resourceLabel?: string;
|
|
681
|
+
resourceId?: string;
|
|
682
|
+
} | undefined) => Promise<P.ProviderOAuthStart>;
|
|
683
|
+
pollProviderOAuth: (provider: string, flowId: string) => Promise<P.ProviderOAuthPoll>;
|
|
684
|
+
removeProviderOAuth: (provider: string) => Promise<{
|
|
668
685
|
ok: boolean;
|
|
669
686
|
}>;
|
|
670
|
-
routing: {
|
|
671
|
-
get: () => Promise<P.GatewayRoutingPolicyDocument>;
|
|
672
|
-
set: (policy: Parameters<typeof P.setGatewayRoutingPolicy>[1]) => Promise<P.GatewayRoutingPolicyDocument>;
|
|
673
|
-
reset: () => Promise<P.GatewayRoutingPolicyDocument>;
|
|
674
|
-
preview: (input: Parameters<typeof P.previewGatewayRoute>[1]) => Promise<P.GatewayRoutePreview>;
|
|
675
|
-
};
|
|
676
|
-
/** Run one prompt against up to 6 models side by side (a model-comparison playground). */
|
|
677
|
-
playground: (prompt: string, models: string[], system?: string) => Promise<P.GatewayPlaygroundResponse>;
|
|
678
|
-
};
|
|
679
|
-
/** Slack + email + Meet channel connections. */
|
|
680
|
-
channels: {
|
|
681
|
-
slack: {
|
|
682
|
-
installation: () => Promise<P.SlackInstallation | null>;
|
|
683
|
-
connect: (input: Parameters<typeof P.connectSlack>[1]) => Promise<P.SlackInstallation>;
|
|
684
|
-
mode: () => Promise<P.SlackMode>;
|
|
685
|
-
/** Finish an "Add to Slack" install as the signed-in user (web completion page). */
|
|
686
|
-
completeInstall: (input: Parameters<typeof P.completeSlackInstall>[1]) => Promise<P.ChannelInstallCompletion>;
|
|
687
|
-
manifest: () => Promise<Record<string, unknown>>;
|
|
688
|
-
disconnect: () => Promise<void>;
|
|
689
|
-
/** Download a Slack-hosted file through the server-side proxy (bot token stays server-side). */
|
|
690
|
-
getFile: (url: string) => Promise<Blob>;
|
|
691
|
-
/** Upload a file to Slack through the server-side 3-step external-upload proxy. */
|
|
692
|
-
uploadFile: (input: Parameters<typeof P.uploadSlackChannelFile>[1]) => Promise<P.UploadSlackChannelFileResult>;
|
|
693
|
-
};
|
|
694
|
-
teams: {
|
|
695
|
-
/** Finish a Microsoft Teams org install as the signed-in user (web completion page). */
|
|
696
|
-
completeInstall: (input: Parameters<typeof P.completeTeamsInstall>[1]) => Promise<P.ChannelInstallCompletion>;
|
|
697
|
-
};
|
|
698
|
-
email: {
|
|
699
|
-
installation: (connectorSlug?: string | null) => Promise<P.EmailInstallation | null>;
|
|
700
|
-
mode: () => Promise<P.EmailMode>;
|
|
701
|
-
connect: (input: Parameters<typeof P.connectEmail>[1]) => Promise<P.EmailInstallation>;
|
|
702
|
-
disconnect: (connectorSlug?: string | null) => Promise<void>;
|
|
703
|
-
updatePolicy: (connectorSlug: string | null | undefined, senderPolicy: P.EmailSenderPolicy) => Promise<P.EmailInstallation>;
|
|
704
|
-
};
|
|
705
687
|
};
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
688
|
+
access: {
|
|
689
|
+
list: () => Promise<P.ProjectAccessResponse>;
|
|
690
|
+
invite: (email: string, role: P.ProjectRole, expiresAt?: string | null | undefined) => Promise<P.ProjectAccessMember | {
|
|
691
|
+
status: "invited";
|
|
692
|
+
email: string;
|
|
693
|
+
invite_id: string;
|
|
694
|
+
project_role: P.ProjectRole;
|
|
695
|
+
message: string;
|
|
696
|
+
invite_url: string;
|
|
697
|
+
email_sent: boolean;
|
|
698
|
+
email_skip_reason: string | null;
|
|
699
|
+
}>;
|
|
700
|
+
update: (userId: string, role: P.ProjectRole) => Promise<P.ProjectAccessMember>;
|
|
701
|
+
revoke: (userId: string) => Promise<{
|
|
714
702
|
ok: boolean;
|
|
715
|
-
scope: string;
|
|
716
|
-
agentName?: string;
|
|
717
|
-
model: string;
|
|
718
703
|
}>;
|
|
719
|
-
|
|
704
|
+
pendingInvites: () => Promise<{
|
|
705
|
+
pending: P.PendingProjectInvite[];
|
|
706
|
+
}>;
|
|
707
|
+
resendInvite: (inviteId: string) => Promise<P.ResendProjectInviteResult>;
|
|
708
|
+
revokeInvite: (inviteId: string) => Promise<{
|
|
720
709
|
ok: boolean;
|
|
710
|
+
invitation_cancelled: boolean;
|
|
721
711
|
}>;
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
setDefaultAgent: (agentName: string) => Promise<P.UpdateProjectDefaultAgentResponse>;
|
|
725
|
-
/** Sandbox templates + snapshot builds — Dockerfile/image/warm-pool config, beyond `sandboxHealth`/`sandboxTemplates`. */
|
|
726
|
-
sandbox: {
|
|
727
|
-
list: () => Promise<P.SandboxTemplatesResponse>;
|
|
728
|
-
snapshots: () => Promise<P.ProjectSnapshotsResponse>;
|
|
729
|
-
rebuildSnapshot: (slug?: string) => Promise<P.RebuildSnapshotResponse>;
|
|
730
|
-
fixWithAgent: () => Promise<{
|
|
731
|
-
session_id: string;
|
|
712
|
+
requests: () => Promise<{
|
|
713
|
+
requests: P.ProjectAccessRequest[];
|
|
732
714
|
}>;
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
715
|
+
approveRequest: (requestId: string, role?: P.ProjectRole | undefined) => Promise<{
|
|
716
|
+
request: P.ProjectAccessRequest;
|
|
717
|
+
member: P.ProjectAccessMember;
|
|
736
718
|
}>;
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
slug: string;
|
|
719
|
+
rejectRequest: (requestId: string) => Promise<{
|
|
720
|
+
request: P.ProjectAccessRequest;
|
|
740
721
|
}>;
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
status: "started";
|
|
744
|
-
template_id: string;
|
|
745
|
-
slug: string;
|
|
746
|
-
providers?: Array<"daytona" | "platinum" | "e2b">;
|
|
722
|
+
groupGrants: () => Promise<{
|
|
723
|
+
grants: P.ProjectGroupGrant[];
|
|
747
724
|
}>;
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
setAgentScope: (agentName: string, scope: {
|
|
753
|
-
env?: P.AgentGrantSet;
|
|
754
|
-
connectors?: P.AgentGrantSet;
|
|
755
|
-
connectors_required?: string[];
|
|
756
|
-
connectors_personal?: string[];
|
|
757
|
-
}) => Promise<{
|
|
758
|
-
ok: boolean;
|
|
759
|
-
agent: string;
|
|
760
|
-
env: P.AgentGrantSet;
|
|
761
|
-
connectors: P.AgentGrantSet;
|
|
762
|
-
connectors_required: string[];
|
|
763
|
-
}>;
|
|
764
|
-
session: (sessionId: string) => {
|
|
765
|
-
get: (opts?: {
|
|
766
|
-
showErrors?: boolean;
|
|
767
|
-
}) => Promise<P.ProjectSession>;
|
|
768
|
-
presence: (input: {
|
|
769
|
-
tab_id: string;
|
|
770
|
-
active: boolean;
|
|
771
|
-
}) => Promise<import("../../index.js").ApiResponse<{
|
|
772
|
-
ok: boolean;
|
|
773
|
-
}>>;
|
|
774
|
-
/** Unified finalized LLM and compute cost for this session. */
|
|
775
|
-
cost: () => Promise<P.SessionCostDetail>;
|
|
776
|
-
update: (input: Parameters<typeof P.updateProjectSession>[2]) => Promise<P.ProjectSession>;
|
|
777
|
-
delete: () => Promise<{
|
|
778
|
-
ok: boolean;
|
|
725
|
+
attachGroupGrant: (groupId: string, role: P.ProjectRole, expiresAt?: string | null | undefined) => Promise<{
|
|
726
|
+
project_id: string;
|
|
727
|
+
group_id: string;
|
|
728
|
+
role: P.ProjectRole;
|
|
779
729
|
}>;
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
restart: () => Promise<{
|
|
785
|
-
ok: boolean;
|
|
786
|
-
session_id: string;
|
|
787
|
-
status: string;
|
|
730
|
+
updateGroupGrant: (groupId: string, role: P.ProjectRole, expiresAt?: string | null | undefined) => Promise<{
|
|
731
|
+
project_id: string;
|
|
732
|
+
group_id: string;
|
|
733
|
+
role: P.ProjectRole;
|
|
788
734
|
}>;
|
|
789
|
-
|
|
735
|
+
detachGroupGrant: (groupId: string) => Promise<{
|
|
790
736
|
ok: boolean;
|
|
791
|
-
session_id: string;
|
|
792
|
-
status: string;
|
|
793
737
|
}>;
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
*
|
|
799
|
-
* Restarts opencode to rebuild its config, so readiness has to be
|
|
800
|
-
* resolved again — same reason `restart` forgets it.
|
|
801
|
-
*/
|
|
802
|
-
reloadConfig: (input?: Parameters<typeof P.reloadProjectSessionConfig>[2]) => Promise<P.SessionReloadResult>;
|
|
803
|
-
/** Reload config with server-observed progress events. */
|
|
804
|
-
reloadConfigStream: (input: {
|
|
805
|
-
refresh_repo?: boolean;
|
|
806
|
-
force?: boolean;
|
|
807
|
-
}, onEvent: (event: P.SessionReloadStreamEvent) => void, options?: import("../../index.js").ApiClientOptions | undefined) => Promise<P.SessionReloadResult>;
|
|
808
|
-
setSharing: (intent: Parameters<typeof P.setProjectSessionSharing>[2]) => Promise<P.ProjectSession>;
|
|
809
|
-
previews: () => Promise<{
|
|
810
|
-
candidates: P.SessionPreviewCandidate[];
|
|
811
|
-
}>;
|
|
812
|
-
commit: (input?: Parameters<typeof P.commitSessionChanges>[2]) => Promise<P.CommitSessionResult>;
|
|
813
|
-
publicShares: {
|
|
814
|
-
list: () => Promise<{
|
|
815
|
-
shares: P.SessionPublicShare[];
|
|
816
|
-
}>;
|
|
817
|
-
create: (input: P.CreateSessionPublicShareInput) => Promise<{
|
|
818
|
-
share: P.SessionPublicShare;
|
|
819
|
-
}>;
|
|
820
|
-
revoke: (shareId: string) => Promise<{
|
|
821
|
-
share: P.SessionPublicShare;
|
|
822
|
-
}>;
|
|
823
|
-
};
|
|
824
|
-
/** Scheduled prompts into this session — see `CreateSessionReminderInput`. */
|
|
825
|
-
reminders: {
|
|
826
|
-
list: () => Promise<{
|
|
827
|
-
reminders: P.SessionReminder[];
|
|
738
|
+
resourceGrants: {
|
|
739
|
+
list: () => Promise<P.ProjectResourceGrantsResponse>;
|
|
740
|
+
create: (input: Parameters<typeof P.createProjectResourceGrant>[1]) => Promise<{
|
|
741
|
+
grant_id: string;
|
|
828
742
|
}>;
|
|
829
|
-
|
|
830
|
-
update: (reminderId: string, input: Parameters<typeof P.updateSessionReminder>[3]) => Promise<P.SessionReminder>;
|
|
831
|
-
remove: (reminderId: string) => Promise<{
|
|
743
|
+
remove: (grantId: string) => Promise<{
|
|
832
744
|
ok: boolean;
|
|
833
745
|
}>;
|
|
834
746
|
};
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
747
|
+
};
|
|
748
|
+
apps: {
|
|
749
|
+
list: () => Promise<P.App[]>;
|
|
750
|
+
create: (input: Parameters<typeof P.createApp>[1]) => Promise<P.App>;
|
|
751
|
+
get: (appId: string) => Promise<P.App>;
|
|
752
|
+
update: (appId: string, input: P.UpdateAppInput) => Promise<P.App>;
|
|
753
|
+
access: {
|
|
754
|
+
get: (appId: string) => Promise<P.AppAccessConfig>;
|
|
755
|
+
update: (appId: string, input: P.UpdateAppAccessInput) => Promise<P.AppAccessConfig>;
|
|
756
|
+
session: (appId: string) => Promise<P.AppAccessSession>;
|
|
757
|
+
agents: (appId: string) => Promise<P.AppAgentAccess[]>;
|
|
840
758
|
};
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
transcriptSync: (options?: Parameters<typeof P.getSessionTranscriptSync>[2]) => Promise<P.SessionTranscriptSyncEnvelope>;
|
|
850
|
-
/** Which turns are running right now, and how did the last one end?
|
|
851
|
-
* Server truth from the control plane's lifecycle authority, independent
|
|
852
|
-
* of the live stream. */
|
|
853
|
-
turn: () => Promise<P.SessionTurnStatus>;
|
|
854
|
-
/** This session's SERVER-SIDE prompt inbox: the prompts it still owes the
|
|
855
|
-
* user. Durable, so it survives a closed tab and is the same list on
|
|
856
|
-
* every device. */
|
|
857
|
-
prompts: {
|
|
858
|
-
create: (input: P.CreateSessionPromptInput) => Promise<P.CreateSessionPromptResult>;
|
|
859
|
-
list: () => Promise<{
|
|
860
|
-
prompts: P.SessionPrompt[];
|
|
861
|
-
observed_at?: string;
|
|
862
|
-
}>;
|
|
863
|
-
remove: (promptId: string) => Promise<P.RemovedSessionPrompt>;
|
|
864
|
-
retry: (promptId: string) => Promise<P.SessionPrompt>;
|
|
865
|
-
/** Hold (or release) the whole queue — what the Stop button writes. */
|
|
866
|
-
hold: (held: boolean) => Promise<{
|
|
867
|
-
prompts: P.SessionPrompt[];
|
|
868
|
-
observed_at?: string;
|
|
869
|
-
}>;
|
|
759
|
+
remove: (appId: string) => Promise<{
|
|
760
|
+
ok: boolean;
|
|
761
|
+
images?: P.AppImageRelease;
|
|
762
|
+
}>;
|
|
763
|
+
artifacts: {
|
|
764
|
+
register: (input: Parameters<typeof P.registerAppArtifact>[1]) => Promise<P.RegisterAppArtifactResponse>;
|
|
765
|
+
uploadArchive: (input: Blob | Uint8Array<ArrayBufferLike>, options?: P.UploadAppArtifactOptions | undefined) => Promise<P.AppArtifact>;
|
|
766
|
+
finalize: (artifactId: string, input: P.FinalizeAppArtifactInput) => Promise<P.AppArtifact>;
|
|
870
767
|
};
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
* `SessionNotReadyError` instead of falling back to whatever sandbox
|
|
878
|
-
* happens to be globally active.
|
|
879
|
-
*/
|
|
880
|
-
ensureReady: (opts?: {
|
|
881
|
-
readyTimeoutMs?: number;
|
|
882
|
-
}) => Promise<SessionRuntimeEntry>;
|
|
883
|
-
/**
|
|
884
|
-
* Liveness/readiness of THIS session's runtime (`GET /kortix/health`).
|
|
885
|
-
* Unlike `.previewUrl()`/`.proxyUrl()`/`.runtime`, this never throws
|
|
886
|
-
* `SessionNotReadyError` — a health poller (e.g. a header dot ticking
|
|
887
|
-
* every 15s on a fresh inline handle) needs to be callable BEFORE the
|
|
888
|
-
* session has ever resolved a runtime. It degrades to the same graceful
|
|
889
|
-
* `{ status: 0, ok: false }` shape `getSessionHealth` already returns for
|
|
890
|
-
* "no URL yet", instead of forcing every caller to guard with `ensureReady()`.
|
|
891
|
-
*/
|
|
892
|
-
health: (init?: RequestInit) => Promise<import("../session/index.js").SessionHealthResult>;
|
|
893
|
-
/** Proxy/preview URL for a port THIS session's runtime exposes. */
|
|
894
|
-
previewUrl: (port: number, path?: string) => string;
|
|
895
|
-
/** Rewrite a localhost URL the agent printed into a reachable proxy URL. */
|
|
896
|
-
proxyUrl: (url?: string) => string | undefined;
|
|
897
|
-
/**
|
|
898
|
-
* The AUTHENTICATED backend proxy URL for a given sandbox port of THIS
|
|
899
|
-
* session's runtime: `${backendUrl}/p/{externalId}/{port}` — no browser
|
|
900
|
-
* preview-origin rewriting. This is the URL a local port-forward proxy
|
|
901
|
-
* dials with the caller's own bearer token (see `getSandboxUrlForExternalId`).
|
|
902
|
-
* Use `previewUrl()`/`proxyUrl()` instead for a browser tab.
|
|
903
|
-
*/
|
|
904
|
-
sandboxPortUrl: (port: number) => string;
|
|
905
|
-
/** Pick the model `send` will use for subsequent prompts (until changed). */
|
|
906
|
-
setModel: (model: SessionModel | undefined) => void;
|
|
907
|
-
/**
|
|
908
|
-
* PERSIST a new model for this session server-side, re-pointing the
|
|
909
|
-
* running sandbox. Distinct from `setModel`, which only chooses what the
|
|
910
|
-
* NEXT local `send` asks for and never leaves this handle.
|
|
911
|
-
*
|
|
912
|
-
* Restarting the runtime is how the change takes effect, so an in-flight
|
|
913
|
-
* turn ends. `applied_live` reports whether a running session took it now
|
|
914
|
-
* or whether it applies at next start.
|
|
915
|
-
*/
|
|
916
|
-
changeModel: (model: string) => Promise<P.SessionModelChangeResult>;
|
|
917
|
-
/** Read the authoritative secret allowlist and connections. */
|
|
918
|
-
scope: () => Promise<P.SessionScope>;
|
|
919
|
-
providerSecretPool: {
|
|
920
|
-
list: () => Promise<{
|
|
921
|
-
pools: P.SessionProviderSecretPool[];
|
|
922
|
-
can_edit: boolean;
|
|
923
|
-
}>;
|
|
924
|
-
get: (providerId: string) => Promise<P.SessionProviderSecretPool>;
|
|
925
|
-
set: (providerId: string, secretIds: string[] | null) => Promise<P.SessionProviderSecretPool>;
|
|
768
|
+
deployments: {
|
|
769
|
+
create: (appId: string, input: P.CreateAppDeploymentInput) => Promise<P.AppDeployment>;
|
|
770
|
+
list: (appId: string) => Promise<P.AppDeployment[]>;
|
|
771
|
+
get: (appId: string, deploymentId: string) => Promise<P.AppDeploymentDetail>;
|
|
772
|
+
logs: (appId: string, deploymentId: string, options?: P.AppLogsOptions | undefined) => Promise<P.AppLogsResponse>;
|
|
773
|
+
remove: (appId: string, deploymentId: string) => Promise<P.DeleteAppDeploymentResult>;
|
|
926
774
|
};
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
775
|
+
start: (appId: string) => Promise<P.App>;
|
|
776
|
+
stop: (appId: string) => Promise<P.App>;
|
|
777
|
+
rollback: (appId: string, deploymentId: string) => Promise<P.App>;
|
|
778
|
+
};
|
|
779
|
+
attachments: {
|
|
780
|
+
upload: (file: File, options?: P.PromptAttachmentUploadOptions | undefined) => Promise<P.PromptAttachment>;
|
|
781
|
+
delete: (attachmentId: string, options?: {
|
|
782
|
+
signal?: AbortSignal;
|
|
783
|
+
} | undefined) => Promise<void>;
|
|
784
|
+
createController: (options?: Parameters<typeof import("../../index.js").createPromptAttachmentController>[1]) => import("../../index.js").PromptAttachmentController;
|
|
785
|
+
};
|
|
786
|
+
get: (opts?: Parameters<typeof P.getProject>[1]) => Promise<P.KortixProject>;
|
|
787
|
+
detail: () => Promise<{
|
|
788
|
+
config: {
|
|
789
|
+
default_agent: string | null;
|
|
790
|
+
is_kortix_repo: boolean;
|
|
791
|
+
signals: Record<string, boolean>;
|
|
792
|
+
manifest_raw: string | null;
|
|
793
|
+
open_code_raw: string | null;
|
|
794
|
+
open_code_default_agent: string | null;
|
|
795
|
+
agent_discovery: "opencode" | "declarative";
|
|
796
|
+
agents: Array<{
|
|
797
|
+
name: string;
|
|
798
|
+
path: string;
|
|
799
|
+
description: string | null;
|
|
800
|
+
mode: string | null;
|
|
801
|
+
model?: string | null;
|
|
802
|
+
source?: "opencode" | "kortix.toml";
|
|
803
|
+
enabled?: boolean;
|
|
804
|
+
sandbox?: string | null;
|
|
805
|
+
scope?: {
|
|
806
|
+
env: string[] | "all";
|
|
807
|
+
connectors: string[] | "all";
|
|
808
|
+
kortix_permissions?: string[] | "all";
|
|
809
|
+
kortix_cli: string[] | "all";
|
|
810
|
+
apps?: string[] | "all";
|
|
811
|
+
};
|
|
812
|
+
}>;
|
|
813
|
+
skills: Array<{
|
|
814
|
+
name: string;
|
|
815
|
+
path: string;
|
|
816
|
+
description: string | null;
|
|
817
|
+
}>;
|
|
818
|
+
commands: Array<{
|
|
819
|
+
name: string;
|
|
820
|
+
path: string;
|
|
821
|
+
description: string | null;
|
|
822
|
+
}>;
|
|
823
|
+
env: {
|
|
824
|
+
required: string[];
|
|
825
|
+
optional: string[];
|
|
943
826
|
};
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
827
|
+
};
|
|
828
|
+
project: P.KortixProject;
|
|
829
|
+
git_connection?: P.ProjectGitConnection | null;
|
|
830
|
+
file_count: number;
|
|
831
|
+
files: P.ProjectFileEntry[];
|
|
832
|
+
}>;
|
|
833
|
+
audit: (options?: Parameters<typeof P.listProjectAudit>[1]) => Promise<P.AuditEventList>;
|
|
834
|
+
update: (input: Parameters<typeof P.updateProject>[1]) => Promise<P.KortixProject>;
|
|
835
|
+
archive: () => Promise<{
|
|
836
|
+
ok: boolean;
|
|
837
|
+
}>;
|
|
838
|
+
llmCatalog: () => Promise<P.ProjectLlmCatalogResponse>;
|
|
839
|
+
modelPicker: () => Promise<P.ProjectLlmCatalogResponse>;
|
|
840
|
+
modelAccess: () => Promise<P.ProjectModelAccess>;
|
|
841
|
+
setModelAccess: (change: P.ProjectModelAccessChange) => Promise<P.ProjectModelAccess>;
|
|
842
|
+
sandboxHealth: () => Promise<P.ProjectSandboxHealth>;
|
|
843
|
+
onboardingComplete: (completed: boolean) => Promise<P.KortixProject>;
|
|
844
|
+
};
|
|
845
|
+
session: (projectId: string, sessionId: string) => {
|
|
846
|
+
runtime: RuntimeClient;
|
|
847
|
+
messages: (options?: {
|
|
848
|
+
conversationId?: string;
|
|
849
|
+
limit?: number;
|
|
850
|
+
before?: string;
|
|
851
|
+
signal?: AbortSignal;
|
|
852
|
+
}) => Promise<import("../session/index.js").TranscriptPage>;
|
|
853
|
+
pending: () => Promise<import("../session/index.js").PendingInteractions>;
|
|
854
|
+
answerPermission: (requestId: string, reply: import("../../index.js").RuntimePermissionReply, message?: string) => Promise<void>;
|
|
855
|
+
answerQuestion: (requestId: string, answers: import("../../index.js").RuntimeQuestionAnswer[] | null) => Promise<void>;
|
|
856
|
+
compact: (model?: {
|
|
857
|
+
providerID: string;
|
|
858
|
+
modelID: string;
|
|
859
|
+
}) => Promise<{
|
|
860
|
+
providerID: string;
|
|
861
|
+
modelID: string;
|
|
862
|
+
}>;
|
|
863
|
+
files: {
|
|
864
|
+
list: (dirPath: string) => Promise<import("../../index.js").FileNode[]>;
|
|
865
|
+
read: (filePath: string) => Promise<import("../../index.js").FileContent>;
|
|
866
|
+
readBlob: (filePath: string) => Promise<Blob>;
|
|
867
|
+
status: () => Promise<import("../../index.js").GitFileStatus[]>;
|
|
868
|
+
findFiles: (query: string, options?: {
|
|
869
|
+
type?: "file" | "directory";
|
|
870
|
+
limit?: number;
|
|
871
|
+
}) => Promise<string[]>;
|
|
872
|
+
findText: (pattern: string) => Promise<import("../../index.js").FindMatch[]>;
|
|
873
|
+
upload: (file: File | Blob, targetPath?: string, filename?: string, options?: import("../../index.js").UploadFileOptions) => Promise<import("../../index.js").UploadResult[]>;
|
|
874
|
+
write: (filePath: string, content: Blob | File) => Promise<import("../../index.js").WriteFileResult>;
|
|
875
|
+
create: (filePath: string) => Promise<import("../../index.js").UploadResult[]>;
|
|
876
|
+
copy: (sourcePath: string, destPath: string) => Promise<import("../../index.js").UploadResult[]>;
|
|
877
|
+
remove: (filePath: string) => Promise<boolean>;
|
|
878
|
+
mkdir: (dirPath: string) => Promise<boolean>;
|
|
879
|
+
rename: (from: string, to: string) => Promise<boolean>;
|
|
880
|
+
};
|
|
881
|
+
abort: () => Promise<({
|
|
882
|
+
data: undefined;
|
|
883
|
+
error: unknown;
|
|
884
|
+
} | {
|
|
885
|
+
data: boolean;
|
|
886
|
+
error: undefined;
|
|
887
|
+
}) & {
|
|
888
|
+
request: Request;
|
|
889
|
+
response: Response;
|
|
890
|
+
}>;
|
|
891
|
+
rewind: (messageId: string) => Promise<({
|
|
892
|
+
data: undefined;
|
|
893
|
+
error: unknown;
|
|
894
|
+
} | {
|
|
895
|
+
data: import("../../index.js").Session;
|
|
896
|
+
error: undefined;
|
|
897
|
+
}) & {
|
|
898
|
+
request: Request;
|
|
899
|
+
response: Response;
|
|
900
|
+
}>;
|
|
901
|
+
restoreRewind: () => Promise<({
|
|
902
|
+
data: undefined;
|
|
903
|
+
error: unknown;
|
|
904
|
+
} | {
|
|
905
|
+
data: import("../../index.js").Session;
|
|
906
|
+
error: undefined;
|
|
907
|
+
}) & {
|
|
908
|
+
request: Request;
|
|
909
|
+
response: Response;
|
|
910
|
+
}>;
|
|
911
|
+
stream: (opts: {
|
|
912
|
+
onEvent: (event: import("../../index.js").RuntimeEvent) => void;
|
|
913
|
+
onGapRehydrate?: (gapMs: number) => void;
|
|
914
|
+
signal?: AbortSignal;
|
|
915
|
+
}) => Promise<import("../../index.js").EventStreamHandle>;
|
|
916
|
+
scope: () => Promise<P.SessionScope>;
|
|
917
|
+
providerSecretPool: {
|
|
918
|
+
list: () => Promise<{
|
|
919
|
+
pools: P.SessionProviderSecretPool[];
|
|
920
|
+
can_edit: boolean;
|
|
951
921
|
}>;
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
922
|
+
get: (providerId: string) => Promise<P.SessionProviderSecretPool>;
|
|
923
|
+
set: (providerId: string, secretIds: string[] | null) => Promise<P.SessionProviderSecretPool>;
|
|
924
|
+
};
|
|
925
|
+
rescope: (scope: P.SessionScopeInput) => Promise<P.SessionScope>;
|
|
926
|
+
setAgent: (agent: string | undefined) => void;
|
|
927
|
+
send: (text: string, opts?: {
|
|
928
|
+
model?: import("./session-shared.js").SessionModel;
|
|
929
|
+
agent?: string;
|
|
930
|
+
}) => Promise<P.CreateSessionPromptResult>;
|
|
931
|
+
setModel: (model: import("./session-shared.js").SessionModel | undefined) => void;
|
|
932
|
+
changeModel: (model: string) => Promise<P.SessionModelChangeResult>;
|
|
933
|
+
health: (init?: RequestInit) => Promise<import("../session/index.js").SessionHealthResult>;
|
|
934
|
+
previewUrl: (port: number, path?: string) => string;
|
|
935
|
+
proxyUrl: (url?: string) => string | undefined;
|
|
936
|
+
sandboxPortUrl: (port: number) => string;
|
|
937
|
+
reminders: {
|
|
938
|
+
list: () => Promise<{
|
|
939
|
+
reminders: P.SessionReminder[];
|
|
962
940
|
}>;
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
rewind: (messageId: string) => Promise<({
|
|
968
|
-
data: import("@opencode-ai/sdk/v2/types").Session;
|
|
969
|
-
error: undefined;
|
|
970
|
-
} | {
|
|
971
|
-
data: undefined;
|
|
972
|
-
error: import("@opencode-ai/sdk/v2/types").EffectHttpApiErrorBadRequest | import("@opencode-ai/sdk/v2/types").InvalidRequestError | import("@opencode-ai/sdk/v2/types").NotFoundError | import("@opencode-ai/sdk/v2/types").SessionBusyError;
|
|
973
|
-
}) & {
|
|
974
|
-
request: Request;
|
|
975
|
-
response: Response;
|
|
941
|
+
create: (input: Parameters<typeof P.createSessionReminder>[2]) => Promise<P.SessionReminder>;
|
|
942
|
+
update: (reminderId: string, input: Parameters<typeof P.updateSessionReminder>[3]) => Promise<P.SessionReminder>;
|
|
943
|
+
remove: (reminderId: string) => Promise<{
|
|
944
|
+
ok: boolean;
|
|
976
945
|
}>;
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
946
|
+
};
|
|
947
|
+
audit: (limit?: number, options?: Parameters<typeof P.getSessionAudit>[3]) => Promise<P.SessionAudit>;
|
|
948
|
+
attachments: {
|
|
949
|
+
upload: (file: File, options?: Parameters<typeof P.uploadSessionAttachment>[3]) => Promise<P.SessionAttachment>;
|
|
950
|
+
read: (attachmentId: string, signal?: AbortSignal) => Promise<Blob>;
|
|
951
|
+
};
|
|
952
|
+
transcript: (options?: Parameters<typeof P.getSessionTranscript>[2]) => Promise<P.SessionTranscript>;
|
|
953
|
+
messageAuthors: () => Promise<P.SessionMessageAuthors>;
|
|
954
|
+
transcriptSync: (options?: Parameters<typeof P.getSessionTranscriptSync>[2]) => Promise<P.SessionTranscriptSyncEnvelope>;
|
|
955
|
+
turn: () => Promise<P.SessionTurnStatus>;
|
|
956
|
+
prompts: {
|
|
957
|
+
create: (input: P.CreateSessionPromptInput) => Promise<P.CreateSessionPromptResult>;
|
|
958
|
+
list: () => Promise<{
|
|
959
|
+
prompts: P.SessionPrompt[];
|
|
960
|
+
observed_at?: string;
|
|
961
|
+
}>;
|
|
962
|
+
remove: (promptId: string) => Promise<P.RemovedSessionPrompt>;
|
|
963
|
+
retry: (promptId: string) => Promise<P.SessionPrompt>;
|
|
964
|
+
edit: (promptId: string, text: string) => Promise<P.SessionPrompt>;
|
|
965
|
+
hold: (held: boolean) => Promise<{
|
|
966
|
+
prompts: P.SessionPrompt[];
|
|
967
|
+
observed_at?: string;
|
|
987
968
|
}>;
|
|
988
|
-
/**
|
|
989
|
-
* Live SSE stream of THIS session's runtime events (message/part
|
|
990
|
-
* updates, session status, permissions/questions, lsp diagnostics, …).
|
|
991
|
-
* A thin facade over the framework-free `openEventStream` primitive
|
|
992
|
-
* (`@kortix/sdk`'s `openEventStream`, also used verbatim by
|
|
993
|
-
* `@kortix/sdk/react`'s `useRuntimeEventStream`): resolves THIS
|
|
994
|
-
* handle's own runtime first (`ensureReady()`), then connects a client
|
|
995
|
-
* bound to that runtime URL — never the module-global "active" one, so
|
|
996
|
-
* two session handles on two different sandboxes never cross wires.
|
|
997
|
-
* Framework-free — safe to call from a server-side "Kortix as a
|
|
998
|
-
* Backend" wrapper (Node/Bun), a worker, a CLI, or any non-React host.
|
|
999
|
-
*
|
|
1000
|
-
* Handles connect/reconnect/backoff, a 15s heartbeat watchdog, and
|
|
1001
|
-
* event coalescing internally. Call `handle.close()` to stop.
|
|
1002
|
-
*
|
|
1003
|
-
* const handle = await session.stream({ onEvent: (e) => console.log(e) });
|
|
1004
|
-
* // later
|
|
1005
|
-
* handle.close();
|
|
1006
|
-
*/
|
|
1007
|
-
stream: (opts: {
|
|
1008
|
-
onEvent: (event: RuntimeEvent) => void;
|
|
1009
|
-
onGapRehydrate?: (gapMs: number) => void;
|
|
1010
|
-
signal?: AbortSignal;
|
|
1011
|
-
}) => Promise<EventStreamHandle>;
|
|
1012
|
-
readonly runtime: OpencodeClient;
|
|
1013
|
-
/**
|
|
1014
|
-
* Workspace file operations (daemon `/file` + `/find`) bound to THIS
|
|
1015
|
-
* session's own resolved runtime — never the module-global "active"
|
|
1016
|
-
* sandbox the top-level `@kortix/sdk` `files` export follows. Fixes a
|
|
1017
|
-
* cross-session bleed: a host juggling multiple open sessions (e.g. a
|
|
1018
|
-
* server wrapping several concurrent agent sessions) that called the
|
|
1019
|
-
* global `files.list()` while a DIFFERENT session was "active" would
|
|
1020
|
-
* silently read/write the wrong sandbox. Each call here auto-provisions
|
|
1021
|
-
* via `ensureReady()` (same as `send`/`abort`/`stream`), then runs
|
|
1022
|
-
* against this handle's own runtime URL. Same 12-op surface as the
|
|
1023
|
-
* global `files` namespace, built from the same parameterized core
|
|
1024
|
-
* (`@kortix/sdk/files`'s exports all take an optional trailing
|
|
1025
|
-
* `baseUrl` — this just always supplies THIS session's).
|
|
1026
|
-
*/
|
|
1027
|
-
files: {
|
|
1028
|
-
list: (dirPath: string) => Promise<F.FileNode[]>;
|
|
1029
|
-
read: (filePath: string) => Promise<F.FileContent>;
|
|
1030
|
-
readBlob: (filePath: string) => Promise<Blob>;
|
|
1031
|
-
status: () => Promise<F.GitFileStatus[]>;
|
|
1032
|
-
findFiles: (query: string, options?: {
|
|
1033
|
-
type?: "file" | "directory";
|
|
1034
|
-
limit?: number;
|
|
1035
|
-
}) => Promise<string[]>;
|
|
1036
|
-
findText: (pattern: string) => Promise<F.FindMatch[]>;
|
|
1037
|
-
upload: (file: File | Blob, targetPath?: string, filename?: string, options?: F.UploadFileOptions) => Promise<F.UploadResult[]>;
|
|
1038
|
-
/**
|
|
1039
|
-
* Overwrite `filePath` in place. The daemon's upload endpoint never
|
|
1040
|
-
* overwrites (it uniquifies a colliding name), so a plain `upload` over
|
|
1041
|
-
* an existing path silently writes a DIFFERENT file — see `writeFile`.
|
|
1042
|
-
*/
|
|
1043
|
-
write: (filePath: string, content: Blob | File) => Promise<F.WriteFileResult>;
|
|
1044
|
-
create: (filePath: string) => Promise<F.UploadResult[]>;
|
|
1045
|
-
copy: (sourcePath: string, destPath: string) => Promise<F.UploadResult[]>;
|
|
1046
|
-
remove: (filePath: string) => Promise<boolean>;
|
|
1047
|
-
mkdir: (dirPath: string) => Promise<boolean>;
|
|
1048
|
-
rename: (from: string, to: string) => Promise<boolean>;
|
|
1049
|
-
};
|
|
1050
969
|
};
|
|
1051
|
-
|
|
1052
|
-
|
|
970
|
+
ensureReady: (opts?: {
|
|
971
|
+
readyTimeoutMs?: number;
|
|
972
|
+
}) => Promise<import("../../index.js").SessionRuntimeEntry>;
|
|
1053
973
|
get: (opts?: {
|
|
1054
974
|
showErrors?: boolean;
|
|
1055
975
|
}) => Promise<P.ProjectSession>;
|
|
@@ -1059,7 +979,6 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
1059
979
|
}) => Promise<import("../../index.js").ApiResponse<{
|
|
1060
980
|
ok: boolean;
|
|
1061
981
|
}>>;
|
|
1062
|
-
/** Unified finalized LLM and compute cost for this session. */
|
|
1063
982
|
cost: () => Promise<P.SessionCostDetail>;
|
|
1064
983
|
update: (input: Parameters<typeof P.updateProjectSession>[2]) => Promise<P.ProjectSession>;
|
|
1065
984
|
delete: () => Promise<{
|
|
@@ -1079,16 +998,8 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
1079
998
|
session_id: string;
|
|
1080
999
|
status: string;
|
|
1081
1000
|
}>;
|
|
1082
|
-
/** Is this session still running the config the manifest compiles to? */
|
|
1083
1001
|
configState: () => Promise<P.SessionConfigState>;
|
|
1084
|
-
/**
|
|
1085
|
-
* Recompile the agent config from git into this running session.
|
|
1086
|
-
*
|
|
1087
|
-
* Restarts opencode to rebuild its config, so readiness has to be
|
|
1088
|
-
* resolved again — same reason `restart` forgets it.
|
|
1089
|
-
*/
|
|
1090
1002
|
reloadConfig: (input?: Parameters<typeof P.reloadProjectSessionConfig>[2]) => Promise<P.SessionReloadResult>;
|
|
1091
|
-
/** Reload config with server-observed progress events. */
|
|
1092
1003
|
reloadConfigStream: (input: {
|
|
1093
1004
|
refresh_repo?: boolean;
|
|
1094
1005
|
force?: boolean;
|
|
@@ -1097,6 +1008,7 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
1097
1008
|
previews: () => Promise<{
|
|
1098
1009
|
candidates: P.SessionPreviewCandidate[];
|
|
1099
1010
|
}>;
|
|
1011
|
+
participants: () => Promise<P.SessionParticipants>;
|
|
1100
1012
|
commit: (input?: Parameters<typeof P.commitSessionChanges>[2]) => Promise<P.CommitSessionResult>;
|
|
1101
1013
|
publicShares: {
|
|
1102
1014
|
list: () => Promise<{
|
|
@@ -1109,232 +1021,6 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
1109
1021
|
share: P.SessionPublicShare;
|
|
1110
1022
|
}>;
|
|
1111
1023
|
};
|
|
1112
|
-
/** Scheduled prompts into this session — see `CreateSessionReminderInput`. */
|
|
1113
|
-
reminders: {
|
|
1114
|
-
list: () => Promise<{
|
|
1115
|
-
reminders: P.SessionReminder[];
|
|
1116
|
-
}>;
|
|
1117
|
-
create: (input: Parameters<typeof P.createSessionReminder>[2]) => Promise<P.SessionReminder>;
|
|
1118
|
-
update: (reminderId: string, input: Parameters<typeof P.updateSessionReminder>[3]) => Promise<P.SessionReminder>;
|
|
1119
|
-
remove: (reminderId: string) => Promise<{
|
|
1120
|
-
ok: boolean;
|
|
1121
|
-
}>;
|
|
1122
|
-
};
|
|
1123
|
-
/** Per-session audit trail of connector-gated agent actions. */
|
|
1124
|
-
audit: (limit?: number, options?: Parameters<typeof P.getSessionAudit>[3]) => Promise<P.SessionAudit>;
|
|
1125
|
-
attachments: {
|
|
1126
|
-
upload: (file: File, options?: Parameters<typeof P.uploadSessionAttachment>[3]) => Promise<P.SessionAttachment>;
|
|
1127
|
-
read: (attachmentId: string, signal?: AbortSignal) => Promise<Blob>;
|
|
1128
|
-
};
|
|
1129
|
-
/** Compact server-side transcript read (text + tool calls, no tool inputs/outputs) — callable with project-scoped session tokens. */
|
|
1130
|
-
transcript: (options?: Parameters<typeof P.getSessionTranscript>[2]) => Promise<P.SessionTranscript>;
|
|
1131
|
-
/** Who wrote each message: a member, or another session's agent. */
|
|
1132
|
-
messageAuthors: () => Promise<P.SessionMessageAuthors>;
|
|
1133
|
-
/** The DURABLE server-side transcript mirror, in sync-store shape
|
|
1134
|
-
* (OpenCode message envelopes verbatim, attachment bytes and tool
|
|
1135
|
-
* inputs/outputs stripped). This is the read that answers while the
|
|
1136
|
-
* sandbox is stopped or still waking. */
|
|
1137
|
-
transcriptSync: (options?: Parameters<typeof P.getSessionTranscriptSync>[2]) => Promise<P.SessionTranscriptSyncEnvelope>;
|
|
1138
|
-
/** Which turns are running right now, and how did the last one end?
|
|
1139
|
-
* Server truth from the control plane's lifecycle authority, independent
|
|
1140
|
-
* of the live stream. */
|
|
1141
|
-
turn: () => Promise<P.SessionTurnStatus>;
|
|
1142
|
-
/** This session's SERVER-SIDE prompt inbox: the prompts it still owes the
|
|
1143
|
-
* user. Durable, so it survives a closed tab and is the same list on
|
|
1144
|
-
* every device. */
|
|
1145
|
-
prompts: {
|
|
1146
|
-
create: (input: P.CreateSessionPromptInput) => Promise<P.CreateSessionPromptResult>;
|
|
1147
|
-
list: () => Promise<{
|
|
1148
|
-
prompts: P.SessionPrompt[];
|
|
1149
|
-
observed_at?: string;
|
|
1150
|
-
}>;
|
|
1151
|
-
remove: (promptId: string) => Promise<P.RemovedSessionPrompt>;
|
|
1152
|
-
retry: (promptId: string) => Promise<P.SessionPrompt>;
|
|
1153
|
-
/** Hold (or release) the whole queue — what the Stop button writes. */
|
|
1154
|
-
hold: (held: boolean) => Promise<{
|
|
1155
|
-
prompts: P.SessionPrompt[];
|
|
1156
|
-
observed_at?: string;
|
|
1157
|
-
}>;
|
|
1158
|
-
};
|
|
1159
|
-
/**
|
|
1160
|
-
* Resolve THIS handle's own runtime (idempotent): provisions/resumes the
|
|
1161
|
-
* sandbox (long-poll until ready) and caches the resolved OpenCode session
|
|
1162
|
-
* id + runtime URL + sandbox id for every other call on this handle. Call
|
|
1163
|
-
* this (or `send`/`abort`, which call it internally) before `.runtime`,
|
|
1164
|
-
* `.health()`, `.previewUrl()`, or `.proxyUrl()` — those throw
|
|
1165
|
-
* `SessionNotReadyError` instead of falling back to whatever sandbox
|
|
1166
|
-
* happens to be globally active.
|
|
1167
|
-
*/
|
|
1168
|
-
ensureReady: (opts?: {
|
|
1169
|
-
readyTimeoutMs?: number;
|
|
1170
|
-
}) => Promise<SessionRuntimeEntry>;
|
|
1171
|
-
/**
|
|
1172
|
-
* Liveness/readiness of THIS session's runtime (`GET /kortix/health`).
|
|
1173
|
-
* Unlike `.previewUrl()`/`.proxyUrl()`/`.runtime`, this never throws
|
|
1174
|
-
* `SessionNotReadyError` — a health poller (e.g. a header dot ticking
|
|
1175
|
-
* every 15s on a fresh inline handle) needs to be callable BEFORE the
|
|
1176
|
-
* session has ever resolved a runtime. It degrades to the same graceful
|
|
1177
|
-
* `{ status: 0, ok: false }` shape `getSessionHealth` already returns for
|
|
1178
|
-
* "no URL yet", instead of forcing every caller to guard with `ensureReady()`.
|
|
1179
|
-
*/
|
|
1180
|
-
health: (init?: RequestInit) => Promise<import("../session/index.js").SessionHealthResult>;
|
|
1181
|
-
/** Proxy/preview URL for a port THIS session's runtime exposes. */
|
|
1182
|
-
previewUrl: (port: number, path?: string) => string;
|
|
1183
|
-
/** Rewrite a localhost URL the agent printed into a reachable proxy URL. */
|
|
1184
|
-
proxyUrl: (url?: string) => string | undefined;
|
|
1185
|
-
/**
|
|
1186
|
-
* The AUTHENTICATED backend proxy URL for a given sandbox port of THIS
|
|
1187
|
-
* session's runtime: `${backendUrl}/p/{externalId}/{port}` — no browser
|
|
1188
|
-
* preview-origin rewriting. This is the URL a local port-forward proxy
|
|
1189
|
-
* dials with the caller's own bearer token (see `getSandboxUrlForExternalId`).
|
|
1190
|
-
* Use `previewUrl()`/`proxyUrl()` instead for a browser tab.
|
|
1191
|
-
*/
|
|
1192
|
-
sandboxPortUrl: (port: number) => string;
|
|
1193
|
-
/** Pick the model `send` will use for subsequent prompts (until changed). */
|
|
1194
|
-
setModel: (model: SessionModel | undefined) => void;
|
|
1195
|
-
/**
|
|
1196
|
-
* PERSIST a new model for this session server-side, re-pointing the
|
|
1197
|
-
* running sandbox. Distinct from `setModel`, which only chooses what the
|
|
1198
|
-
* NEXT local `send` asks for and never leaves this handle.
|
|
1199
|
-
*
|
|
1200
|
-
* Restarting the runtime is how the change takes effect, so an in-flight
|
|
1201
|
-
* turn ends. `applied_live` reports whether a running session took it now
|
|
1202
|
-
* or whether it applies at next start.
|
|
1203
|
-
*/
|
|
1204
|
-
changeModel: (model: string) => Promise<P.SessionModelChangeResult>;
|
|
1205
|
-
/** Read the authoritative secret allowlist and connections. */
|
|
1206
|
-
scope: () => Promise<P.SessionScope>;
|
|
1207
|
-
providerSecretPool: {
|
|
1208
|
-
list: () => Promise<{
|
|
1209
|
-
pools: P.SessionProviderSecretPool[];
|
|
1210
|
-
can_edit: boolean;
|
|
1211
|
-
}>;
|
|
1212
|
-
get: (providerId: string) => Promise<P.SessionProviderSecretPool>;
|
|
1213
|
-
set: (providerId: string, secretIds: string[] | null) => Promise<P.SessionProviderSecretPool>;
|
|
1214
|
-
};
|
|
1215
|
-
/** Re-scope a running session — set semantics; see setProjectSessionScope. */
|
|
1216
|
-
rescope: (scope: P.SessionScopeInput) => Promise<P.SessionScope>;
|
|
1217
|
-
/** Pick the agent `send` will use for subsequent prompts (until changed). */
|
|
1218
|
-
setAgent: (agent: string | undefined) => void;
|
|
1219
|
-
/**
|
|
1220
|
-
* Provision/resume if needed, then send a text prompt to the agent. A
|
|
1221
|
-
* per-call `{ model, agent }` overrides the sticky setModel/setAgent
|
|
1222
|
-
* choices for this message only.
|
|
1223
|
-
*/
|
|
1224
|
-
send: (text: string, opts?: {
|
|
1225
|
-
model?: SessionModel;
|
|
1226
|
-
agent?: string;
|
|
1227
|
-
}) => Promise<({
|
|
1228
|
-
data: {
|
|
1229
|
-
info: import("@opencode-ai/sdk/v2/types").AssistantMessage;
|
|
1230
|
-
parts: Array<import("@opencode-ai/sdk/v2/types").Part>;
|
|
1231
|
-
};
|
|
1232
|
-
error: undefined;
|
|
1233
|
-
} | {
|
|
1234
|
-
data: undefined;
|
|
1235
|
-
error: import("@opencode-ai/sdk/v2/types").EffectHttpApiErrorBadRequest | import("@opencode-ai/sdk/v2/types").InvalidRequestError | import("@opencode-ai/sdk/v2/types").NotFoundError;
|
|
1236
|
-
}) & {
|
|
1237
|
-
request: Request;
|
|
1238
|
-
response: Response;
|
|
1239
|
-
}>;
|
|
1240
|
-
/** Abort the agent's current run in this session. */
|
|
1241
|
-
abort: () => Promise<({
|
|
1242
|
-
data: boolean;
|
|
1243
|
-
error: undefined;
|
|
1244
|
-
} | {
|
|
1245
|
-
data: undefined;
|
|
1246
|
-
error: import("@opencode-ai/sdk/v2/types").EffectHttpApiErrorBadRequest | import("@opencode-ai/sdk/v2/types").InvalidRequestError;
|
|
1247
|
-
}) & {
|
|
1248
|
-
request: Request;
|
|
1249
|
-
response: Response;
|
|
1250
|
-
}>;
|
|
1251
|
-
/**
|
|
1252
|
-
* Stage a reversible rollback at one user message on this same canonical
|
|
1253
|
-
* OpenCode session. The next prompt commits the new path.
|
|
1254
|
-
*/
|
|
1255
|
-
rewind: (messageId: string) => Promise<({
|
|
1256
|
-
data: import("@opencode-ai/sdk/v2/types").Session;
|
|
1257
|
-
error: undefined;
|
|
1258
|
-
} | {
|
|
1259
|
-
data: undefined;
|
|
1260
|
-
error: import("@opencode-ai/sdk/v2/types").EffectHttpApiErrorBadRequest | import("@opencode-ai/sdk/v2/types").InvalidRequestError | import("@opencode-ai/sdk/v2/types").NotFoundError | import("@opencode-ai/sdk/v2/types").SessionBusyError;
|
|
1261
|
-
}) & {
|
|
1262
|
-
request: Request;
|
|
1263
|
-
response: Response;
|
|
1264
|
-
}>;
|
|
1265
|
-
/** Restore the path removed by `rewind()` before another prompt commits it. */
|
|
1266
|
-
restoreRewind: () => Promise<({
|
|
1267
|
-
data: import("@opencode-ai/sdk/v2/types").Session;
|
|
1268
|
-
error: undefined;
|
|
1269
|
-
} | {
|
|
1270
|
-
data: undefined;
|
|
1271
|
-
error: import("@opencode-ai/sdk/v2/types").EffectHttpApiErrorBadRequest | import("@opencode-ai/sdk/v2/types").InvalidRequestError | import("@opencode-ai/sdk/v2/types").NotFoundError | import("@opencode-ai/sdk/v2/types").SessionBusyError;
|
|
1272
|
-
}) & {
|
|
1273
|
-
request: Request;
|
|
1274
|
-
response: Response;
|
|
1275
|
-
}>;
|
|
1276
|
-
/**
|
|
1277
|
-
* Live SSE stream of THIS session's runtime events (message/part
|
|
1278
|
-
* updates, session status, permissions/questions, lsp diagnostics, …).
|
|
1279
|
-
* A thin facade over the framework-free `openEventStream` primitive
|
|
1280
|
-
* (`@kortix/sdk`'s `openEventStream`, also used verbatim by
|
|
1281
|
-
* `@kortix/sdk/react`'s `useRuntimeEventStream`): resolves THIS
|
|
1282
|
-
* handle's own runtime first (`ensureReady()`), then connects a client
|
|
1283
|
-
* bound to that runtime URL — never the module-global "active" one, so
|
|
1284
|
-
* two session handles on two different sandboxes never cross wires.
|
|
1285
|
-
* Framework-free — safe to call from a server-side "Kortix as a
|
|
1286
|
-
* Backend" wrapper (Node/Bun), a worker, a CLI, or any non-React host.
|
|
1287
|
-
*
|
|
1288
|
-
* Handles connect/reconnect/backoff, a 15s heartbeat watchdog, and
|
|
1289
|
-
* event coalescing internally. Call `handle.close()` to stop.
|
|
1290
|
-
*
|
|
1291
|
-
* const handle = await session.stream({ onEvent: (e) => console.log(e) });
|
|
1292
|
-
* // later
|
|
1293
|
-
* handle.close();
|
|
1294
|
-
*/
|
|
1295
|
-
stream: (opts: {
|
|
1296
|
-
onEvent: (event: RuntimeEvent) => void;
|
|
1297
|
-
onGapRehydrate?: (gapMs: number) => void;
|
|
1298
|
-
signal?: AbortSignal;
|
|
1299
|
-
}) => Promise<EventStreamHandle>;
|
|
1300
|
-
readonly runtime: OpencodeClient;
|
|
1301
|
-
/**
|
|
1302
|
-
* Workspace file operations (daemon `/file` + `/find`) bound to THIS
|
|
1303
|
-
* session's own resolved runtime — never the module-global "active"
|
|
1304
|
-
* sandbox the top-level `@kortix/sdk` `files` export follows. Fixes a
|
|
1305
|
-
* cross-session bleed: a host juggling multiple open sessions (e.g. a
|
|
1306
|
-
* server wrapping several concurrent agent sessions) that called the
|
|
1307
|
-
* global `files.list()` while a DIFFERENT session was "active" would
|
|
1308
|
-
* silently read/write the wrong sandbox. Each call here auto-provisions
|
|
1309
|
-
* via `ensureReady()` (same as `send`/`abort`/`stream`), then runs
|
|
1310
|
-
* against this handle's own runtime URL. Same 12-op surface as the
|
|
1311
|
-
* global `files` namespace, built from the same parameterized core
|
|
1312
|
-
* (`@kortix/sdk/files`'s exports all take an optional trailing
|
|
1313
|
-
* `baseUrl` — this just always supplies THIS session's).
|
|
1314
|
-
*/
|
|
1315
|
-
files: {
|
|
1316
|
-
list: (dirPath: string) => Promise<F.FileNode[]>;
|
|
1317
|
-
read: (filePath: string) => Promise<F.FileContent>;
|
|
1318
|
-
readBlob: (filePath: string) => Promise<Blob>;
|
|
1319
|
-
status: () => Promise<F.GitFileStatus[]>;
|
|
1320
|
-
findFiles: (query: string, options?: {
|
|
1321
|
-
type?: "file" | "directory";
|
|
1322
|
-
limit?: number;
|
|
1323
|
-
}) => Promise<string[]>;
|
|
1324
|
-
findText: (pattern: string) => Promise<F.FindMatch[]>;
|
|
1325
|
-
upload: (file: File | Blob, targetPath?: string, filename?: string, options?: F.UploadFileOptions) => Promise<F.UploadResult[]>;
|
|
1326
|
-
/**
|
|
1327
|
-
* Overwrite `filePath` in place. The daemon's upload endpoint never
|
|
1328
|
-
* overwrites (it uniquifies a colliding name), so a plain `upload` over
|
|
1329
|
-
* an existing path silently writes a DIFFERENT file — see `writeFile`.
|
|
1330
|
-
*/
|
|
1331
|
-
write: (filePath: string, content: Blob | File) => Promise<F.WriteFileResult>;
|
|
1332
|
-
create: (filePath: string) => Promise<F.UploadResult[]>;
|
|
1333
|
-
copy: (sourcePath: string, destPath: string) => Promise<F.UploadResult[]>;
|
|
1334
|
-
remove: (filePath: string) => Promise<boolean>;
|
|
1335
|
-
mkdir: (dirPath: string) => Promise<boolean>;
|
|
1336
|
-
rename: (from: string, to: string) => Promise<boolean>;
|
|
1337
|
-
};
|
|
1338
1024
|
};
|
|
1339
1025
|
/** GitHub App installation + repository linking (account-scoped). */
|
|
1340
1026
|
github: {
|
|
@@ -1348,8 +1034,6 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
1348
1034
|
linkInstallation: typeof P.linkGitHubInstallation;
|
|
1349
1035
|
saveInstallation: typeof P.saveGitHubInstallation;
|
|
1350
1036
|
deleteInstallation: typeof P.deleteGitHubInstallation;
|
|
1351
|
-
/** Store this user's GitHub authorization — needed to create a repository
|
|
1352
|
-
* in a personal GitHub account. */
|
|
1353
1037
|
storeUserToken: typeof P.storeGitHubUserToken;
|
|
1354
1038
|
};
|
|
1355
1039
|
/** The instance git backend ("Kortix managed", deployment-scoped). */
|
|
@@ -1365,20 +1049,16 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
1365
1049
|
transactionsSummary: typeof P.getBillingTransactionsSummary;
|
|
1366
1050
|
creditBreakdown: typeof P.getBillingCreditBreakdown;
|
|
1367
1051
|
usageHistory: typeof P.getBillingUsageHistory;
|
|
1368
|
-
/** Usage rollup (/v1/usage), optionally grouped by model, provider, or day. */
|
|
1369
1052
|
usageRollup: typeof P.getUsageRollup;
|
|
1370
|
-
/** Unified finalized LLM and compute cost by session. */
|
|
1371
1053
|
sessionCosts: {
|
|
1372
1054
|
list: typeof P.listSessionCosts;
|
|
1373
1055
|
get: typeof P.getSessionCostRecord;
|
|
1374
1056
|
};
|
|
1375
1057
|
tierConfigurations: typeof P.getBillingTierConfigurations;
|
|
1376
|
-
/** Stripe checkout — start a subscription and confirm it post-redirect. */
|
|
1377
1058
|
checkout: {
|
|
1378
1059
|
createSession: (input: Parameters<typeof P.createCheckoutSession>[0]) => Promise<P.CheckoutSessionResult>;
|
|
1379
1060
|
confirmSession: (sessionId: string, accountId?: string) => Promise<P.ConfirmCheckoutSessionResult>;
|
|
1380
1061
|
};
|
|
1381
|
-
/** Manage an existing subscription (portal, cancel/reactivate, downgrade). */
|
|
1382
1062
|
subscription: {
|
|
1383
1063
|
createPortalSession: (returnUrl: string, accountId?: string) => Promise<P.PortalSessionResult>;
|
|
1384
1064
|
cancel: (feedback?: string, accountId?: string) => Promise<P.SubscriptionMutationResult>;
|
|
@@ -1387,7 +1067,6 @@ export declare function createKortix(config: KortixPlatformConfig, opts?: {
|
|
|
1387
1067
|
cancelScheduledChange: (accountId?: string) => Promise<P.SubscriptionMutationResult>;
|
|
1388
1068
|
prorationPreview: (newPriceId: string, accountId?: string) => Promise<P.ProrationPreviewResult>;
|
|
1389
1069
|
};
|
|
1390
|
-
/** One-off credit purchases + recurring auto-topup configuration. */
|
|
1391
1070
|
credits: {
|
|
1392
1071
|
purchase: (input: Parameters<typeof P.purchaseCredits>[0]) => Promise<P.PurchaseCreditsResult>;
|
|
1393
1072
|
autoTopupSettings: (accountId?: string) => Promise<P.AutoTopupSettings>;
|
|
@@ -1427,6 +1106,4 @@ export type Kortix = ReturnType<typeof createKortix>;
|
|
|
1427
1106
|
export type ProjectHandle = ReturnType<Kortix['project']>;
|
|
1428
1107
|
/** The id-bound session handle returned by `kortix.session(pid, sid)`. */
|
|
1429
1108
|
export type SessionHandle = ReturnType<Kortix['session']>;
|
|
1430
|
-
type DropFirst<T extends unknown[]> = T extends [unknown, ...infer R] ? R : [];
|
|
1431
|
-
export {};
|
|
1432
1109
|
//# sourceMappingURL=kortix.d.ts.map
|