@kortix/sdk 0.13.56 → 0.14.0
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 +225 -14
- package/dist/browser/cache/idb-sync-cache.d.ts.map +1 -1
- package/dist/browser/cache/idb-sync-cache.js +19 -5
- package/dist/browser/cache/idb-sync-cache.js.map +1 -1
- package/dist/browser/session-sync/server-transcript-mirror.d.ts +26 -7
- package/dist/browser/session-sync/server-transcript-mirror.d.ts.map +1 -1
- package/dist/browser/session-sync/server-transcript-mirror.js +51 -44
- package/dist/browser/session-sync/server-transcript-mirror.js.map +1 -1
- package/dist/browser/session-sync/session-sync-registry.d.ts +11 -1
- package/dist/browser/session-sync/session-sync-registry.d.ts.map +1 -1
- package/dist/browser/session-sync/session-sync-registry.js +68 -3
- package/dist/browser/session-sync/session-sync-registry.js.map +1 -1
- package/dist/browser/stores/sync-store/keep-unchanged.d.ts +17 -0
- package/dist/browser/stores/sync-store/keep-unchanged.d.ts.map +1 -0
- package/dist/browser/stores/sync-store/keep-unchanged.js +47 -0
- package/dist/browser/stores/sync-store/keep-unchanged.js.map +1 -0
- package/dist/browser/stores/sync-store.d.ts +6 -0
- package/dist/browser/stores/sync-store.d.ts.map +1 -1
- package/dist/browser/stores/sync-store.js +115 -17
- package/dist/browser/stores/sync-store.js.map +1 -1
- package/dist/core/attachments/prompt-attachments.d.ts +11 -0
- package/dist/core/attachments/prompt-attachments.d.ts.map +1 -1
- package/dist/core/attachments/prompt-attachments.js +34 -0
- package/dist/core/attachments/prompt-attachments.js.map +1 -1
- package/dist/core/auth/app-viewer.d.ts +3 -0
- package/dist/core/auth/app-viewer.d.ts.map +1 -1
- package/dist/core/auth/app-viewer.js +3 -0
- package/dist/core/auth/app-viewer.js.map +1 -1
- package/dist/core/capture/rules.d.ts +44 -0
- package/dist/core/capture/rules.d.ts.map +1 -0
- package/dist/core/capture/rules.js +55 -0
- package/dist/core/capture/rules.js.map +1 -0
- package/dist/core/client/capture.d.ts +122 -0
- package/dist/core/client/capture.d.ts.map +1 -0
- package/dist/core/client/capture.js +62 -0
- package/dist/core/client/capture.js.map +1 -0
- package/dist/core/client/facade-commerce.d.ts +10 -1
- package/dist/core/client/facade-commerce.d.ts.map +1 -1
- package/dist/core/client/facade-commerce.js +10 -1
- package/dist/core/client/facade-commerce.js.map +1 -1
- package/dist/core/client/facade-identity.d.ts +2 -0
- package/dist/core/client/facade-identity.d.ts.map +1 -1
- package/dist/core/client/facade-identity.js +2 -0
- package/dist/core/client/facade-identity.js.map +1 -1
- package/dist/core/client/kortix.d.ts +97 -5
- package/dist/core/client/kortix.d.ts.map +1 -1
- package/dist/core/client/kortix.js +3 -0
- package/dist/core/client/kortix.js.map +1 -1
- package/dist/core/client/project-access-resources.d.ts +4 -2
- package/dist/core/client/project-access-resources.d.ts.map +1 -1
- package/dist/core/client/project-access-resources.js +2 -2
- package/dist/core/client/project-access-resources.js.map +1 -1
- package/dist/core/client/project-core.d.ts.map +1 -1
- package/dist/core/client/project-operations-admin.d.ts +4 -4
- package/dist/core/client/project-operations-review.d.ts +4 -3
- package/dist/core/client/project-operations-review.d.ts.map +1 -1
- package/dist/core/client/project-operations-review.js +3 -0
- package/dist/core/client/project-operations-review.js.map +1 -1
- package/dist/core/client/project-operations-workspace.d.ts +5 -4
- package/dist/core/client/project-operations-workspace.d.ts.map +1 -1
- package/dist/core/client/project-operations-workspace.js +2 -1
- package/dist/core/client/project-operations-workspace.js.map +1 -1
- package/dist/core/client/project-operations.d.ts +5 -4
- package/dist/core/client/project-operations.d.ts.map +1 -1
- package/dist/core/client/session-context.d.ts +2 -0
- package/dist/core/client/session-context.d.ts.map +1 -1
- package/dist/core/client/session-handle.d.ts +13 -0
- package/dist/core/client/session-handle.d.ts.map +1 -1
- package/dist/core/client/session-lifecycle-resources.d.ts +21 -0
- package/dist/core/client/session-lifecycle-resources.d.ts.map +1 -1
- package/dist/core/client/session-lifecycle-resources.js +14 -0
- package/dist/core/client/session-lifecycle-resources.js.map +1 -1
- package/dist/core/client/session-lifecycle-security.d.ts +5 -0
- package/dist/core/client/session-lifecycle-security.d.ts.map +1 -1
- package/dist/core/client/session-lifecycle-security.js +4 -0
- package/dist/core/client/session-lifecycle-security.js.map +1 -1
- package/dist/core/client/session-readiness.d.ts +7 -0
- package/dist/core/client/session-readiness.d.ts.map +1 -1
- package/dist/core/client/session-readiness.js +20 -1
- package/dist/core/client/session-readiness.js.map +1 -1
- package/dist/core/http/api-client.d.ts +17 -0
- package/dist/core/http/api-client.d.ts.map +1 -1
- package/dist/core/http/api-client.js +17 -0
- package/dist/core/http/api-client.js.map +1 -1
- package/dist/core/http/config.d.ts +17 -0
- package/dist/core/http/config.d.ts.map +1 -1
- package/dist/core/http/config.js.map +1 -1
- package/dist/core/http/response-error.d.ts.map +1 -1
- package/dist/core/http/response-error.js +43 -11
- package/dist/core/http/response-error.js.map +1 -1
- package/dist/core/http/transport.d.ts.map +1 -1
- package/dist/core/http/transport.js +8 -2
- package/dist/core/http/transport.js.map +1 -1
- package/dist/core/models/composer-model.d.ts +35 -0
- package/dist/core/models/composer-model.d.ts.map +1 -1
- package/dist/core/models/composer-model.js +41 -1
- package/dist/core/models/composer-model.js.map +1 -1
- package/dist/core/rest/platform-client/capture.d.ts +497 -0
- package/dist/core/rest/platform-client/capture.d.ts.map +1 -0
- package/dist/core/rest/platform-client/capture.js +178 -0
- package/dist/core/rest/platform-client/capture.js.map +1 -0
- package/dist/core/rest/platform-client/index.d.ts +1 -0
- package/dist/core/rest/platform-client/index.d.ts.map +1 -1
- package/dist/core/rest/platform-client/index.js +1 -0
- package/dist/core/rest/platform-client/index.js.map +1 -1
- package/dist/core/rest/platform-client/lifecycle.d.ts +14 -4
- package/dist/core/rest/platform-client/lifecycle.d.ts.map +1 -1
- package/dist/core/rest/platform-client/lifecycle.js +32 -16
- package/dist/core/rest/platform-client/lifecycle.js.map +1 -1
- package/dist/core/rest/platform-client/shared.d.ts +22 -0
- package/dist/core/rest/platform-client/shared.d.ts.map +1 -1
- package/dist/core/rest/platform-client/shared.js +35 -0
- package/dist/core/rest/platform-client/shared.js.map +1 -1
- package/dist/core/rest/projects-client/account-secret-resources.d.ts +5 -1
- package/dist/core/rest/projects-client/account-secret-resources.d.ts.map +1 -1
- package/dist/core/rest/projects-client/account-secret-resources.js.map +1 -1
- package/dist/core/rest/projects-client/accounts.d.ts +47 -0
- package/dist/core/rest/projects-client/accounts.d.ts.map +1 -1
- package/dist/core/rest/projects-client/accounts.js +21 -0
- package/dist/core/rest/projects-client/accounts.js.map +1 -1
- package/dist/core/rest/projects-client/admin-providers.d.ts +0 -61
- package/dist/core/rest/projects-client/admin-providers.d.ts.map +1 -1
- package/dist/core/rest/projects-client/admin-providers.js +0 -6
- package/dist/core/rest/projects-client/admin-providers.js.map +1 -1
- package/dist/core/rest/projects-client/agent-config.d.ts +13 -7
- package/dist/core/rest/projects-client/agent-config.d.ts.map +1 -1
- package/dist/core/rest/projects-client/agent-config.js +1 -1
- package/dist/core/rest/projects-client/agent-config.js.map +1 -1
- package/dist/core/rest/projects-client/apps-fleet.d.ts +14 -3
- package/dist/core/rest/projects-client/apps-fleet.d.ts.map +1 -1
- package/dist/core/rest/projects-client/apps-fleet.js +8 -4
- package/dist/core/rest/projects-client/apps-fleet.js.map +1 -1
- package/dist/core/rest/projects-client/apps.d.ts +13 -1
- package/dist/core/rest/projects-client/apps.d.ts.map +1 -1
- package/dist/core/rest/projects-client/apps.js.map +1 -1
- package/dist/core/rest/projects-client/billing.d.ts +245 -55
- package/dist/core/rest/projects-client/billing.d.ts.map +1 -1
- package/dist/core/rest/projects-client/billing.js +102 -33
- package/dist/core/rest/projects-client/billing.js.map +1 -1
- package/dist/core/rest/projects-client/change-requests.d.ts +10 -2
- package/dist/core/rest/projects-client/change-requests.d.ts.map +1 -1
- package/dist/core/rest/projects-client/change-requests.js +8 -0
- package/dist/core/rest/projects-client/change-requests.js.map +1 -1
- package/dist/core/rest/projects-client/connector-run.d.ts +1 -1
- package/dist/core/rest/projects-client/connector-run.js +1 -1
- package/dist/core/rest/projects-client/connectors.d.ts +19 -0
- package/dist/core/rest/projects-client/connectors.d.ts.map +1 -1
- package/dist/core/rest/projects-client/connectors.js +9 -0
- package/dist/core/rest/projects-client/connectors.js.map +1 -1
- package/dist/core/rest/projects-client/files.d.ts +14 -0
- package/dist/core/rest/projects-client/files.d.ts.map +1 -1
- package/dist/core/rest/projects-client/files.js +9 -0
- package/dist/core/rest/projects-client/files.js.map +1 -1
- package/dist/core/rest/projects-client/gateway.d.ts +19 -0
- package/dist/core/rest/projects-client/gateway.d.ts.map +1 -1
- package/dist/core/rest/projects-client/gateway.js.map +1 -1
- package/dist/core/rest/projects-client/iam-actions.d.ts +134 -0
- package/dist/core/rest/projects-client/iam-actions.d.ts.map +1 -0
- package/dist/core/rest/projects-client/iam-actions.js +153 -0
- package/dist/core/rest/projects-client/iam-actions.js.map +1 -0
- package/dist/core/rest/projects-client/iam-enterprise.d.ts +2 -0
- package/dist/core/rest/projects-client/iam-enterprise.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam-enterprise.js +11 -9
- package/dist/core/rest/projects-client/iam-enterprise.js.map +1 -1
- package/dist/core/rest/projects-client/iam.d.ts +1 -0
- package/dist/core/rest/projects-client/iam.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam.js +1 -0
- package/dist/core/rest/projects-client/iam.js.map +1 -1
- package/dist/core/rest/projects-client/notifications.d.ts +3 -2
- package/dist/core/rest/projects-client/notifications.d.ts.map +1 -1
- package/dist/core/rest/projects-client/notifications.js +4 -0
- package/dist/core/rest/projects-client/notifications.js.map +1 -1
- package/dist/core/rest/projects-client/projects.d.ts +24 -14
- package/dist/core/rest/projects-client/projects.d.ts.map +1 -1
- package/dist/core/rest/projects-client/projects.js +2 -3
- package/dist/core/rest/projects-client/projects.js.map +1 -1
- package/dist/core/rest/projects-client/review-items.d.ts +7 -0
- package/dist/core/rest/projects-client/review-items.d.ts.map +1 -1
- package/dist/core/rest/projects-client/review-items.js +6 -0
- package/dist/core/rest/projects-client/review-items.js.map +1 -1
- package/dist/core/rest/projects-client/review.d.ts +52 -3
- package/dist/core/rest/projects-client/review.d.ts.map +1 -1
- package/dist/core/rest/projects-client/review.js +27 -0
- package/dist/core/rest/projects-client/review.js.map +1 -1
- package/dist/core/rest/projects-client/secrets.d.ts +17 -2
- package/dist/core/rest/projects-client/secrets.d.ts.map +1 -1
- package/dist/core/rest/projects-client/secrets.js.map +1 -1
- package/dist/core/rest/projects-client/session-attachments.d.ts +4 -0
- package/dist/core/rest/projects-client/session-attachments.d.ts.map +1 -1
- package/dist/core/rest/projects-client/session-attachments.js +20 -1
- package/dist/core/rest/projects-client/session-attachments.js.map +1 -1
- package/dist/core/rest/projects-client/sessions.d.ts +107 -14
- package/dist/core/rest/projects-client/sessions.d.ts.map +1 -1
- package/dist/core/rest/projects-client/sessions.js +83 -10
- package/dist/core/rest/projects-client/sessions.js.map +1 -1
- package/dist/core/runtime/client.d.ts.map +1 -1
- package/dist/core/runtime/client.js +5 -5
- package/dist/core/runtime/client.js.map +1 -1
- package/dist/core/runtime/env.js +1 -1
- package/dist/core/runtime/env.js.map +1 -1
- package/dist/core/runtime/runtime-rest-client.d.ts.map +1 -1
- package/dist/core/runtime/runtime-rest-client.js +3 -1
- package/dist/core/runtime/runtime-rest-client.js.map +1 -1
- package/dist/core/runtime/runtime-types.d.ts +5 -0
- package/dist/core/runtime/runtime-types.d.ts.map +1 -1
- package/dist/core/session/open-bundle.d.ts +28 -34
- package/dist/core/session/open-bundle.d.ts.map +1 -1
- package/dist/core/session/open-bundle.js +57 -80
- package/dist/core/session/open-bundle.js.map +1 -1
- package/dist/core/session/turn-end-watch.d.ts +112 -0
- package/dist/core/session/turn-end-watch.d.ts.map +1 -0
- package/dist/core/session/turn-end-watch.js +196 -0
- package/dist/core/session/turn-end-watch.js.map +1 -0
- package/dist/core/session-log/index.d.ts +5 -0
- package/dist/core/session-log/index.d.ts.map +1 -1
- package/dist/core/session-log/index.js +9 -0
- package/dist/core/session-log/index.js.map +1 -1
- package/dist/core/session-log/source.d.ts.map +1 -1
- package/dist/core/session-log/source.js +3 -2
- package/dist/core/session-log/source.js.map +1 -1
- package/dist/core/session-log/tool-call.d.ts +53 -0
- package/dist/core/session-log/tool-call.d.ts.map +1 -0
- package/dist/core/session-log/tool-call.js +94 -0
- package/dist/core/session-log/tool-call.js.map +1 -0
- package/dist/core/session-log/turns/blocks.d.ts +106 -0
- package/dist/core/session-log/turns/blocks.d.ts.map +1 -0
- package/dist/core/session-log/turns/blocks.js +167 -0
- package/dist/core/session-log/turns/blocks.js.map +1 -0
- package/dist/core/session-log/turns/history.d.ts +92 -0
- package/dist/core/session-log/turns/history.d.ts.map +1 -0
- package/dist/core/session-log/turns/history.js +145 -0
- package/dist/core/session-log/turns/history.js.map +1 -0
- package/dist/core/session-log/turns/index.d.ts +35 -0
- package/dist/core/session-log/turns/index.d.ts.map +1 -0
- package/dist/core/session-log/turns/index.js +35 -0
- package/dist/core/session-log/turns/index.js.map +1 -0
- package/dist/core/session-log/turns/metrics.d.ts +35 -0
- package/dist/core/session-log/turns/metrics.d.ts.map +1 -0
- package/dist/core/session-log/turns/metrics.js +31 -0
- package/dist/core/session-log/turns/metrics.js.map +1 -0
- package/dist/core/session-log/turns/turn.d.ts +137 -0
- package/dist/core/session-log/turns/turn.d.ts.map +1 -0
- package/dist/core/session-log/turns/turn.js +320 -0
- package/dist/core/session-log/turns/turn.js.map +1 -0
- package/dist/core/session-log/turns/v1-parts.d.ts +27 -0
- package/dist/core/session-log/turns/v1-parts.d.ts.map +1 -0
- package/dist/core/session-log/turns/v1-parts.js +55 -0
- package/dist/core/session-log/turns/v1-parts.js.map +1 -0
- package/dist/core/session-log/types.d.ts +10 -5
- package/dist/core/session-log/types.d.ts.map +1 -1
- package/dist/core/session-log/types.js +2 -2
- package/dist/core/session-log/types.js.map +1 -1
- package/dist/core/session-log/v1-view.d.ts +37 -7
- package/dist/core/session-log/v1-view.d.ts.map +1 -1
- package/dist/core/session-log/v1-view.js +176 -22
- package/dist/core/session-log/v1-view.js.map +1 -1
- package/dist/core/session-log/v1.d.ts +15 -1
- package/dist/core/session-log/v1.d.ts.map +1 -1
- package/dist/core/session-log/v1.js +28 -5
- package/dist/core/session-log/v1.js.map +1 -1
- package/dist/core/session-sync/saved-transcript.d.ts +57 -1
- package/dist/core/session-sync/saved-transcript.d.ts.map +1 -1
- package/dist/core/session-sync/saved-transcript.js +93 -0
- package/dist/core/session-sync/saved-transcript.js.map +1 -1
- package/dist/core/session-sync/session-sync-controller.d.ts +2 -1
- package/dist/core/session-sync/session-sync-controller.d.ts.map +1 -1
- package/dist/core/session-sync/session-sync-controller.js +9 -0
- package/dist/core/session-sync/session-sync-controller.js.map +1 -1
- package/dist/core/stream/event-stream.d.ts.map +1 -1
- package/dist/core/stream/event-stream.js +4 -1
- package/dist/core/stream/event-stream.js.map +1 -1
- package/dist/core/turns/classify.d.ts +3 -2
- package/dist/core/turns/classify.d.ts.map +1 -1
- package/dist/core/turns/classify.js +10 -5
- package/dist/core/turns/classify.js.map +1 -1
- package/dist/core/turns/edit-blocks.d.ts +8 -0
- package/dist/core/turns/edit-blocks.d.ts.map +1 -0
- package/dist/core/turns/edit-blocks.js +22 -0
- package/dist/core/turns/edit-blocks.js.map +1 -0
- package/dist/core/turns/parts.d.ts +4 -3
- package/dist/core/turns/parts.d.ts.map +1 -1
- package/dist/core/turns/parts.js +5 -3
- package/dist/core/turns/parts.js.map +1 -1
- package/dist/core/turns/segments/burst-summary.d.ts +10 -0
- package/dist/core/turns/segments/burst-summary.d.ts.map +1 -1
- package/dist/core/turns/segments/burst-summary.js +33 -0
- package/dist/core/turns/segments/burst-summary.js.map +1 -1
- package/dist/core/turns/segments/group-steps.d.ts +7 -4
- package/dist/core/turns/segments/group-steps.d.ts.map +1 -1
- package/dist/core/turns/segments/group-steps.js +10 -6
- package/dist/core/turns/segments/group-steps.js.map +1 -1
- package/dist/core/turns/segments/narration.d.ts +5 -4
- package/dist/core/turns/segments/narration.d.ts.map +1 -1
- package/dist/core/turns/segments/narration.js +16 -3
- package/dist/core/turns/segments/narration.js.map +1 -1
- package/dist/core/turns/segments/session-activity-groups.d.ts +2 -1
- package/dist/core/turns/segments/session-activity-groups.d.ts.map +1 -1
- package/dist/core/turns/segments/session-activity-groups.js +3 -1
- package/dist/core/turns/segments/session-activity-groups.js.map +1 -1
- package/dist/core/turns/segments/step-label.d.ts +6 -1
- package/dist/core/turns/segments/step-label.d.ts.map +1 -1
- package/dist/core/turns/segments/step-label.js +7 -1
- package/dist/core/turns/segments/step-label.js.map +1 -1
- package/dist/core/turns/segments/working-turn.d.ts +5 -2
- package/dist/core/turns/segments/working-turn.d.ts.map +1 -1
- package/dist/core/turns/segments/working-turn.js +9 -8
- package/dist/core/turns/segments/working-turn.js.map +1 -1
- package/dist/core/turns/state.d.ts +5 -4
- package/dist/core/turns/state.d.ts.map +1 -1
- package/dist/core/turns/state.js +5 -4
- package/dist/core/turns/state.js.map +1 -1
- package/dist/core/turns/tool-kind.d.ts +6 -4
- package/dist/core/turns/tool-kind.d.ts.map +1 -1
- package/dist/core/turns/tool-kind.js +13 -5
- package/dist/core/turns/tool-kind.js.map +1 -1
- package/dist/core/turns/tool-registry.d.ts.map +1 -1
- package/dist/core/turns/tool-registry.js +1 -0
- package/dist/core/turns/tool-registry.js.map +1 -1
- package/dist/core/turns/tools/tool-meta.d.ts +5 -3
- package/dist/core/turns/tools/tool-meta.d.ts.map +1 -1
- package/dist/core/turns/tools/tool-meta.js +7 -3
- package/dist/core/turns/tools/tool-meta.js.map +1 -1
- package/dist/core/turns/tools/tool-outcome.d.ts +4 -2
- package/dist/core/turns/tools/tool-outcome.d.ts.map +1 -1
- package/dist/core/turns/tools/tool-outcome.js +5 -2
- package/dist/core/turns/tools/tool-outcome.js.map +1 -1
- package/dist/core/turns/view-model.d.ts.map +1 -1
- package/dist/core/turns/view-model.js +1 -14
- package/dist/core/turns/view-model.js.map +1 -1
- package/dist/genui/catalog.d.ts +40 -0
- package/dist/genui/catalog.d.ts.map +1 -0
- package/dist/genui/catalog.js +420 -0
- package/dist/genui/catalog.js.map +1 -0
- package/dist/genui/expansion.d.ts +19 -0
- package/dist/genui/expansion.d.ts.map +1 -0
- package/dist/genui/expansion.js +344 -0
- package/dist/genui/expansion.js.map +1 -0
- package/dist/genui/fence-entry.d.ts +3 -0
- package/dist/genui/fence-entry.d.ts.map +1 -0
- package/dist/genui/fence-entry.js +4 -0
- package/dist/genui/fence-entry.js.map +1 -0
- package/dist/genui/fence.d.ts +53 -0
- package/dist/genui/fence.d.ts.map +1 -0
- package/dist/genui/fence.js +170 -0
- package/dist/genui/fence.js.map +1 -0
- package/dist/genui/index.d.ts +7 -0
- package/dist/genui/index.d.ts.map +1 -0
- package/dist/genui/index.js +7 -0
- package/dist/genui/index.js.map +1 -0
- package/dist/genui/markdown.d.ts +33 -0
- package/dist/genui/markdown.d.ts.map +1 -0
- package/dist/genui/markdown.js +133 -0
- package/dist/genui/markdown.js.map +1 -0
- package/dist/genui/parse.d.ts +12 -0
- package/dist/genui/parse.d.ts.map +1 -0
- package/dist/genui/parse.js +83 -0
- package/dist/genui/parse.js.map +1 -0
- package/dist/genui/prompt.d.ts +5 -0
- package/dist/genui/prompt.d.ts.map +1 -0
- package/dist/genui/prompt.js +209 -0
- package/dist/genui/prompt.js.map +1 -0
- package/dist/genui/react/default-components.d.ts +3 -0
- package/dist/genui/react/default-components.d.ts.map +1 -0
- package/dist/genui/react/default-components.js +81 -0
- package/dist/genui/react/default-components.js.map +1 -0
- package/dist/genui/react/genui-block.d.ts +46 -0
- package/dist/genui/react/genui-block.d.ts.map +1 -0
- package/dist/genui/react/genui-block.js +106 -0
- package/dist/genui/react/genui-block.js.map +1 -0
- package/dist/genui/react/index.d.ts +3 -0
- package/dist/genui/react/index.d.ts.map +1 -0
- package/dist/genui/react/index.js +3 -0
- package/dist/genui/react/index.js.map +1 -0
- package/dist/genui/share.d.ts +11 -0
- package/dist/genui/share.d.ts.map +1 -0
- package/dist/genui/share.js +36 -0
- package/dist/genui/share.js.map +1 -0
- package/dist/genui/types.d.ts +51 -0
- package/dist/genui/types.d.ts.map +1 -0
- package/dist/genui/types.js +3 -0
- package/dist/genui/types.js.map +1 -0
- package/dist/genui/urls.d.ts +7 -0
- package/dist/genui/urls.d.ts.map +1 -0
- package/dist/genui/urls.js +24 -0
- package/dist/genui/urls.js.map +1 -0
- package/dist/genui/validate.d.ts +25 -0
- package/dist/genui/validate.d.ts.map +1 -0
- package/dist/genui/validate.js +139 -0
- package/dist/genui/validate.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/kortix.esm.min.js +38 -36
- package/dist/kortix.global.js +39 -37
- package/dist/platform/ui.d.ts +20 -2
- package/dist/platform/ui.d.ts.map +1 -1
- package/dist/platform/ui.js +31 -4
- package/dist/platform/ui.js.map +1 -1
- package/dist/react/chat/use-chat-turns.d.ts +1 -1
- package/dist/react/chat/use-chat-turns.d.ts.map +1 -1
- package/dist/react/chat/use-chat-turns.js.map +1 -1
- package/dist/react/hold-live-start.js +1 -1
- package/dist/react/hold-live-start.js.map +1 -1
- package/dist/react/human-presence.d.ts +21 -0
- package/dist/react/human-presence.d.ts.map +1 -1
- package/dist/react/human-presence.js +24 -0
- package/dist/react/human-presence.js.map +1 -1
- package/dist/react/index.d.ts +4 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +5 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/opencode.d.ts +1 -1
- package/dist/react/opencode.d.ts.map +1 -1
- package/dist/react/opencode.js +1 -1
- package/dist/react/opencode.js.map +1 -1
- package/dist/react/query-contracts.d.ts +10 -0
- package/dist/react/query-contracts.d.ts.map +1 -1
- package/dist/react/query-contracts.js +10 -0
- package/dist/react/query-contracts.js.map +1 -1
- package/dist/react/query-keys.d.ts +29 -1
- package/dist/react/query-keys.d.ts.map +1 -1
- package/dist/react/query-keys.js +37 -2
- package/dist/react/query-keys.js.map +1 -1
- package/dist/react/reset-identity-state.d.ts +2 -1
- package/dist/react/reset-identity-state.d.ts.map +1 -1
- package/dist/react/reset-identity-state.js +4 -1
- package/dist/react/reset-identity-state.js.map +1 -1
- package/dist/react/session-cache-write.d.ts +2 -0
- package/dist/react/session-cache-write.d.ts.map +1 -1
- package/dist/react/session-cache-write.js +24 -1
- package/dist/react/session-cache-write.js.map +1 -1
- package/dist/react/session-transcript-subscription.js +1 -1
- package/dist/react/session-transcript-subscription.js.map +1 -1
- package/dist/react/sign-in-with-kortix.d.ts +5 -5
- package/dist/react/turn-end-handoff.d.ts +24 -0
- package/dist/react/turn-end-handoff.d.ts.map +1 -0
- package/dist/react/turn-end-handoff.js +131 -0
- package/dist/react/turn-end-handoff.js.map +1 -0
- package/dist/react/use-admin-accounts.d.ts +124 -39
- package/dist/react/use-admin-accounts.d.ts.map +1 -1
- package/dist/react/use-admin-accounts.js +96 -41
- package/dist/react/use-admin-accounts.js.map +1 -1
- package/dist/react/use-admin-providers.d.ts +0 -3
- package/dist/react/use-admin-providers.d.ts.map +1 -1
- package/dist/react/use-admin-providers.js +1 -11
- package/dist/react/use-admin-providers.js.map +1 -1
- package/dist/react/use-billing-plan.d.ts +38 -0
- package/dist/react/use-billing-plan.d.ts.map +1 -0
- package/dist/react/use-billing-plan.js +64 -0
- package/dist/react/use-billing-plan.js.map +1 -0
- package/dist/react/use-capture.d.ts +77 -0
- package/dist/react/use-capture.d.ts.map +1 -0
- package/dist/react/use-capture.js +210 -0
- package/dist/react/use-capture.js.map +1 -0
- package/dist/react/use-feature-flag.d.ts +3 -3
- package/dist/react/use-feature-flag.d.ts.map +1 -1
- package/dist/react/use-feature-flag.js +4 -3
- package/dist/react/use-feature-flag.js.map +1 -1
- package/dist/react/use-opencode-events/handle-interaction-event.d.ts.map +1 -1
- package/dist/react/use-opencode-events/handle-interaction-event.js +12 -3
- package/dist/react/use-opencode-events/handle-interaction-event.js.map +1 -1
- package/dist/react/use-opencode-events/handle-session-event.d.ts.map +1 -1
- package/dist/react/use-opencode-events/handle-session-event.js +19 -8
- package/dist/react/use-opencode-events/handle-session-event.js.map +1 -1
- package/dist/react/use-opencode-events/handler-context.d.ts +2 -0
- package/dist/react/use-opencode-events/handler-context.d.ts.map +1 -1
- package/dist/react/use-opencode-events/helpers.d.ts +11 -0
- package/dist/react/use-opencode-events/helpers.d.ts.map +1 -1
- package/dist/react/use-opencode-events/helpers.js +21 -1
- package/dist/react/use-opencode-events/helpers.js.map +1 -1
- package/dist/react/use-opencode-local.d.ts +12 -1
- package/dist/react/use-opencode-local.d.ts.map +1 -1
- package/dist/react/use-opencode-local.js +23 -3
- package/dist/react/use-opencode-local.js.map +1 -1
- package/dist/react/use-opencode-sessions/commands.d.ts +20 -1
- package/dist/react/use-opencode-sessions/commands.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/commands.js +29 -1
- package/dist/react/use-opencode-sessions/commands.js.map +1 -1
- package/dist/react/use-opencode-sessions/permissions.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/permissions.js +46 -1
- package/dist/react/use-opencode-sessions/permissions.js.map +1 -1
- package/dist/react/use-project-sessions.d.ts +13 -7
- package/dist/react/use-project-sessions.d.ts.map +1 -1
- package/dist/react/use-project-sessions.js +11 -6
- package/dist/react/use-project-sessions.js.map +1 -1
- package/dist/react/use-prompt-attachments.d.ts.map +1 -1
- package/dist/react/use-prompt-attachments.js +1 -0
- package/dist/react/use-prompt-attachments.js.map +1 -1
- package/dist/react/use-review-summary.d.ts +29 -0
- package/dist/react/use-review-summary.d.ts.map +1 -0
- package/dist/react/use-review-summary.js +48 -0
- package/dist/react/use-review-summary.js.map +1 -0
- package/dist/react/use-runtime-reconnect.js +2 -2
- package/dist/react/use-runtime-reconnect.js.map +1 -1
- package/dist/react/use-session-list-state.d.ts +14 -0
- package/dist/react/use-session-list-state.d.ts.map +1 -0
- package/dist/react/use-session-list-state.js +43 -0
- package/dist/react/use-session-list-state.js.map +1 -0
- package/dist/react/use-session-log.d.ts +41 -27
- package/dist/react/use-session-log.d.ts.map +1 -1
- package/dist/react/use-session-log.js +88 -39
- package/dist/react/use-session-log.js.map +1 -1
- package/dist/react/use-session-messages.d.ts +8 -1
- package/dist/react/use-session-messages.d.ts.map +1 -1
- package/dist/react/use-session-messages.js +25 -18
- package/dist/react/use-session-messages.js.map +1 -1
- package/dist/react/use-session-stream.d.ts.map +1 -1
- package/dist/react/use-session-stream.js +16 -1
- package/dist/react/use-session-stream.js.map +1 -1
- package/dist/react/use-session-sync.d.ts +10 -2
- package/dist/react/use-session-sync.d.ts.map +1 -1
- package/dist/react/use-session-sync.js +14 -8
- package/dist/react/use-session-sync.js.map +1 -1
- package/dist/react/use-session-transcript-history.d.ts +1 -0
- package/dist/react/use-session-transcript-history.d.ts.map +1 -1
- package/dist/react/use-session-transcript-history.js +5 -16
- package/dist/react/use-session-transcript-history.js.map +1 -1
- package/dist/react/use-session-working.d.ts +11 -0
- package/dist/react/use-session-working.d.ts.map +1 -1
- package/dist/react/use-session-working.js +16 -0
- package/dist/react/use-session-working.js.map +1 -1
- package/dist/react/use-session.d.ts +46 -1
- package/dist/react/use-session.d.ts.map +1 -1
- package/dist/react/use-session.js +170 -15
- package/dist/react/use-session.js.map +1 -1
- package/dist/react/use-sessions-needing-input.d.ts +2 -1
- package/dist/react/use-sessions-needing-input.d.ts.map +1 -1
- package/dist/react/use-sessions-needing-input.js +2 -1
- package/dist/react/use-sessions-needing-input.js.map +1 -1
- package/package.json +33 -6
package/README.md
CHANGED
|
@@ -216,12 +216,19 @@ cannot retry: `retry` throws, and the item error carries code
|
|
|
216
216
|
resolves at once. It deletes unbound storage best-effort and never rejects; a
|
|
217
217
|
failed or refused DELETE leaves the object to the 24-hour expiry.
|
|
218
218
|
`abort(localId)` cancels unfinished work. `dispose()` aborts listed work and
|
|
219
|
-
deletes its uploads best-effort: no send holds them
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
219
|
+
deletes its uploads best-effort: no send holds them. Call it on non-React
|
|
220
|
+
cleanup; the hook handles unmount and project changes. Unused uploads expire
|
|
221
|
+
after 24 hours.
|
|
222
|
+
|
|
223
|
+
A draft may keep a finished upload, so a reload or another composer brings the
|
|
224
|
+
file back. Store its metadata (`item.attachment`: `attachment_id`, `filename`,
|
|
225
|
+
`mime`, `size`, `expires_at`) and call `forget(ids)` before `dispose()`, so the
|
|
226
|
+
upload is not deleted. Later, `restore([{ attachment, file? }])` lists it again
|
|
227
|
+
as `ready` with no request, and returns its new id (`undefined` for an expired or
|
|
228
|
+
invalid one). Send uses it like any ready upload. The server binds an attachment
|
|
229
|
+
only for its own account, project and person, so the id grants nothing to
|
|
230
|
+
anyone else. Never persist a File, a blob URL, or a signed URL: an unfinished
|
|
231
|
+
upload cannot be kept.
|
|
225
232
|
|
|
226
233
|
For non-composer uploads, call `kortix.project(projectId).attachments.upload(file,
|
|
227
234
|
{ signal, onProgress, onUpload, resume })`. The server selects the transport in the
|
|
@@ -402,7 +409,7 @@ both the pool list and the session's provider-specific query cache.
|
|
|
402
409
|
|
|
403
410
|
### Apps
|
|
404
411
|
|
|
405
|
-
`kortix.project(projectId).apps` deploys immutable App releases behind one stable URL: releases, machines per process group, persistent volumes. New Apps use `private` access. Apps is
|
|
412
|
+
`kortix.project(projectId).apps` deploys immutable App releases behind one stable URL: releases, machines per process group, persistent volumes. New Apps use `private` access. Apps is generally available: every project can create and deploy them.
|
|
406
413
|
|
|
407
414
|
```ts
|
|
408
415
|
const apps = kortix.project(projectId).apps;
|
|
@@ -476,8 +483,16 @@ most 16,384 characters of JSON. Example: `examples/12-session-labels.ts`.
|
|
|
476
483
|
`kortix.session(projectId, sessionId).messageAuthors()` (or `getSessionMessageAuthors`) returns
|
|
477
484
|
`{ authors, initial_author }`: `authors` maps a runtime message id to a `SessionMessageAuthor`,
|
|
478
485
|
`{ kind: 'member', user_id, name, email, avatar_url }` or `{ kind: 'session', session_id, name, agent? }`.
|
|
486
|
+
`stops` maps the user message that started a turn to the member who stopped that turn.
|
|
479
487
|
In React, `useSessionMessageAuthors(projectId, sessionId, messageCount)` reads the same data.
|
|
480
488
|
|
|
489
|
+
### Who may stop a turn
|
|
490
|
+
|
|
491
|
+
In a shared session only the member who started the running turn, the session owner or a
|
|
492
|
+
project manager may stop it. `GET .../turn` answers per caller in `can_stop`, and
|
|
493
|
+
`useSession().canStop` reads it with no extra request: `false` means show no Stop and let a
|
|
494
|
+
send queue. Any other stop answers 403 with `code: 'not_turn_prompter'`.
|
|
495
|
+
|
|
481
496
|
### Which model answered a turn
|
|
482
497
|
|
|
483
498
|
`kortix.session(projectId, sessionId).modelUsage()` (or `getSessionModelUsage`) returns
|
|
@@ -505,6 +520,11 @@ server-validated runtime session id and lets the live read reconcile the saved m
|
|
|
505
520
|
A live read that returns no messages keeps the saved messages on screen: it means the computer
|
|
506
521
|
lost its state, not that the conversation is empty. The first live read with messages reconciles them.
|
|
507
522
|
Missing or rejected history falls back to the existing runtime path.
|
|
523
|
+
An open reads the saved window once: the session-open snapshot carries it (the read waits up
|
|
524
|
+
to 2 s for one in flight), else `GET …/transcript?shape=sync&history=true`. A host that shows
|
|
525
|
+
the saved copy before `useSession` binds the session calls `readSavedSessionCopy`, the same read
|
|
526
|
+
plus the empty-conversation proof. The SDK holds that copy for the open that follows (up to 5 min):
|
|
527
|
+
the snapshot then asks for no window, and the saved-history read answers from the held copy.
|
|
508
528
|
|
|
509
529
|
`useSession().savedTranscript` says whether that saved conversation can show before the
|
|
510
530
|
computer wakes: `loading` while a saved copy may still arrive, `shown` once messages are in
|
|
@@ -566,7 +586,7 @@ exhaustive — see `API-MAP.md` for the full per-domain surface:
|
|
|
566
586
|
|---|---|
|
|
567
587
|
| `kortix.projects` | list · get · detail · create · provision · update · archive · llmCatalog · modelPicker · sandboxTemplates · sessions (+ more: `listForAccount`, `sandboxHealth`, `createSession`) |
|
|
568
588
|
| `kortix.accounts` | list · get · create · members · invites · `secretResources.{list,create,rotate,delete,grant,revoke,setAccess}` · `tokens.{list,create,revoke}` (account-scoped CLI PATs, `kortix_pat_…`) · `audit.{log,export,webhooks.*}` (filterable project/session reconstruction log) · `branding.{get,update,uploadAsset,removeAsset,reset}` (Enterprise organization branding: logo / icon / favicon, light + dark, product name) (+ more: `updateName`, `leave`, `invite`, `removeMember`, `updateMemberRole`) |
|
|
569
|
-
| `kortix.billing` | entitlement/usage reads: `accountState` · `accountStateMinimal` · `transactions` · `transactionsSummary` · `creditBreakdown` · `usageHistory` · `usageRollup` · `sessionCosts.{list,get}` · `tierConfigurations` — plus a curated mutation surface: `subscription.{createPortalSession,cancel,reactivate
|
|
589
|
+
| `kortix.billing` | entitlement/usage reads: `accountState` · `accountStateMinimal` · `transactions` · `transactionsSummary` · `creditBreakdown` · `usageHistory` · `usageRollup` · `sessionCosts.{list,get}` · `tierConfigurations` (with `min_monthly_usd` / `max_monthly_usd`) — plus a curated mutation surface: `setPlan` (subscribe to or change the credits plan; `useSetBillingPlan()` in `@kortix/sdk/react`) · `subscription.{createPortalSession,cancel,reactivate}` · `credits.{purchase,autoTopupSettings,configureAutoTopup}`. `checkout.{createSession,confirmSession}`, `subscription.{scheduleDowngrade,cancelScheduledChange,prorationPreview}`, `createPerSeatCheckout` and `claimPerSeatBilling` are deprecated: they reject with `ENDPOINT_RETIRED` |
|
|
570
590
|
| `kortix.marketplace` | public marketplace catalog browse + sources (not project-scoped): `items` · `item` · `itemFile` · `marketplaces` · `featured` · `sources.{list,add,remove}` — distinct from the install-scoped `project(id).marketplace` |
|
|
571
591
|
| `kortix.github` | account-scoped GitHub App installs and repo linking: `getInstallation` · `listInstallations` · `listLinkableInstallations` (each entry carries `linked_to_other_accounts`, a count and never a tenant name) · `listRepositories` · `listRepositoryBranches` · `linkInstallation` · `saveInstallation` · `deleteInstallation` · `linkRepository` (`source: 'managed'` imports a repository the instance backend holds — self-host operator only, and mutually exclusive with `installation_id`) · `replaceProjectRepository` (changes an existing project's repository with an expected old URL; accepts a repository-scoped PAT or a temporary GitHub user proof for a repository-scoped App grant; can atomically copy selected shared runtime secrets from another project in the same account) |
|
|
572
592
|
| `kortix.gitBackend` | the instance git backend ("Kortix managed", one per deployment, never an account connection): `get()` → `{configured, kind: 'app'|'pat'|null, owner}` (any authenticated user) · `repositories({search?, limit?})` (self-host operator only; 403 otherwise) |
|
|
@@ -575,7 +595,7 @@ exhaustive — see `API-MAP.md` for the full per-domain surface:
|
|
|
575
595
|
| `kortix.validateToken()` | pasted-API-key validation helper — `GET /accounts/me`, never throws, resolves `{valid, identity?, error?}` |
|
|
576
596
|
| `kortix.connectors` | Connector data plane for an agent-minted session token: `catalog` · `tools` · `search` · `describe` · `call` (`{ account }`) · `accounts` · `uploadAttachment` |
|
|
577
597
|
| `kortix.project(id)` | id-bound handle: `.apps` (stable App URLs, access, artifacts, deployments, logs, rollback, start/stop, machines (`machines.list/start/stop/restart/destroy`, `scale`, `exec`), volumes (`volumes.list/create/update/destroy/snapshots/snapshot/restore/fork`), and `token`) · `.secrets` · `.access` · `.connectors` (data plane + configuration + Connections) · `.policies` · `.triggers` (cron / webhook / monitor / event; `.eventTypes({ connector })` lists a connector's app events) · `.files` · `.git` · `.changeRequests` (incl. `requestChanges`) · `.sessions` · `.tokens` (project-scoped CLI PATs — the `KORTIX_TOKEN` shape) · `.marketplace` / `.registry` (install/update/remove catalog items) · `.setupLinks.{requestSecret,requestConnector}` (agent-minted secret-entry / connector links) · `.validateManifest` · `.gitToken` · `.setDefaultAgent(name)` · `.session(sid)` (+ more namespaces: `.review`, `.approvals`, `.gateway` (incl. `.routing` and `.playground`), `.channels`, `.modelDefaults`, `.sandbox`) |
|
|
578
|
-
| `kortix.session(pid, sid)` | id-bound handle: lifecycle (`get`/`update`/`delete`/`start`/`restart`/`stop`/`reloadConfig`/`reloadConfigStream`/`setSharing`/`participants`/`watch`/`setWatch`/`presence`/`previews`/`commit`/`publicShares`/`ensureReady`) · `providerSecretPool.{list,get,set}` · finalized `cost()` · `send`/`abort`/`rewind`/`restoreRewind`/`setModel`/`setAgent` · `transcript()` · `.files` · runtime URL helpers (`health`/`previewUrl`/`proxyUrl`) · runtime REST escape hatches: `stream()` and the deprecated `.runtime` |
|
|
598
|
+
| `kortix.session(pid, sid)` | id-bound handle: lifecycle (`get`/`update`/`delete`/`restore`/`start`/`restart`/`stop`/`reloadConfig`/`reloadConfigStream`/`setSharing`/`participants`/`watch`/`setWatch`/`presence`/`previews`/`commit`/`publicShares`/`ensureReady`) · `providerSecretPool.{list,get,set}` · finalized `cost()` · `send`/`abort`/`rewind`/`restoreRewind`/`setModel`/`setAgent` · `transcript()` · `.files` · runtime URL helpers (`health`/`previewUrl`/`proxyUrl`) · runtime REST escape hatches: `stream()` and the deprecated `.runtime` |
|
|
579
599
|
| `kortix.runtime()` | the runtime REST client for the active sandbox (the SDK's own `RuntimeClient`, frozen at the `@opencode-ai/sdk` 1.18.23 route shapes); use a session-scoped handle in multi-tenant code |
|
|
580
600
|
|
|
581
601
|
Runnable, self-contained scripts for the highest-value flows live in
|
|
@@ -697,14 +717,120 @@ session-log types, and a test fails when the two differ. See the
|
|
|
697
717
|
[reference](https://kortix.com/docs/sdk/reference#session-log-types).
|
|
698
718
|
|
|
699
719
|
`@kortix/sdk/react` adds `useSessionLog(session)` and
|
|
700
|
-
`useSessionLogThread(session, threadId?)`: the log of a session `useSession`
|
|
701
|
-
owns
|
|
702
|
-
the runtime lists `session.log.v2`, the project flag
|
|
703
|
-
the API holds a log for
|
|
704
|
-
hooks
|
|
720
|
+
`useSessionLogThread(session, threadId?, { throttleMs? })`: the log of a session `useSession`
|
|
721
|
+
owns. `useSessionLog` marks its source: `'v2'` is the API's log, which a session
|
|
722
|
+
reads only when the runtime lists `session.log.v2`, the project flag
|
|
723
|
+
`session_log` is on, and the API holds a log for the session (OpenCode or pi).
|
|
724
|
+
Every other session reads v1, and the hooks return `source: 'v1'`: the `fromV1`
|
|
725
|
+
conversion of the v1 rows, with the turn that runs kept open. Pass the session's
|
|
726
|
+
`runtimeSessionId`; without it, or before the first row, they return `null`.
|
|
727
|
+
`throttleMs` paces the v1 rows as `useSessionMessages` paces them. The
|
|
728
|
+
v1 hooks (`useSessionMessages`, `useSession().messages`) return the same rows
|
|
705
729
|
either way. See the
|
|
706
730
|
[reference](https://kortix.com/docs/sdk/react#read-the-session-log).
|
|
707
731
|
|
|
732
|
+
Three transitional functions bridge a host that renders blocks while its rows are
|
|
733
|
+
still v1:
|
|
734
|
+
|
|
735
|
+
- `toolCallBlock(part)`: the `ToolCallBlock` of a v1 tool part, the block
|
|
736
|
+
`fromV1` builds for it. An open call stays open; a call that streams its input
|
|
737
|
+
has the text so far as its `input`. One block per part object. It goes away in
|
|
738
|
+
the SDK major that removes the v1 rows.
|
|
739
|
+
- `toolCallMetadata(call)`: the harness's display metadata of a tool call, the
|
|
740
|
+
whole `state.metadata` of the v1 part it came from (bash `command`, read
|
|
741
|
+
`loaded`, task `sessionId`, edit `filediff`); for a record a harness wrote
|
|
742
|
+
natively (pi), its `details`. It stays until the session-log schema carries
|
|
743
|
+
display metadata of its own.
|
|
744
|
+
- `sessionLogOfV1Rows(sessionId, runtimeSessionId, rows)`: the `fromV1` live view
|
|
745
|
+
of one runtime session's v1 rows, the log `useSessionLogThread` returns on v1,
|
|
746
|
+
for rows a host reads without a `useSession` (a sub-agent's chat). One message
|
|
747
|
+
per row object, kept while the row is unchanged. It goes away with the v1 rows.
|
|
748
|
+
|
|
749
|
+
A host draws a `ToolCallBlock` with `toolCallStatus(call)` (`completed`, not
|
|
750
|
+
`complete`), `toolCallRawOutput(call)`, `toolCallError(call)` (the semantic error,
|
|
751
|
+
else the result text) and, for a sub-agent row, `subAgentCalls(thread)`.
|
|
752
|
+
|
|
753
|
+
`getSessionLogPage(projectId, sessionId, query?)`, or `kortix.session(p, s).log(query?)`,
|
|
754
|
+
reads one page of the stored session log (`SessionLogPage`: the session record,
|
|
755
|
+
every thread head, a thread's newest messages by `seq`, `has_more`). `query` is
|
|
756
|
+
`{ thread?, before_seq?, limit? }` (`SessionLogPageQuery`). It answers while the
|
|
757
|
+
sandbox is stopped, and is `null` when the session has no stored log yet.
|
|
758
|
+
`findSessionAttachments` reads session-log records as well as v1 messages.
|
|
759
|
+
|
|
760
|
+
`toToolView`, `getChildSessionId`, `partOutcome`, `contextToolTrigger` and
|
|
761
|
+
`shouldShowToolPart` accept a `ToolCallBlock` as well as a v1 tool part.
|
|
762
|
+
|
|
763
|
+
### Block turns
|
|
764
|
+
|
|
765
|
+
The root entry also exports the turn model over session-log blocks, the one a
|
|
766
|
+
transcript renders a thread from. It replaces the v1 turn helpers over
|
|
767
|
+
`MessageWithParts` (`groupMessagesIntoTurns`, `collectTurnParts`,
|
|
768
|
+
`getTurnStatus`, `getTurnError`, `getTurnCost`, `findLastTextPart`,
|
|
769
|
+
`getShellModePart`, `isAttachment`, `segmentTurn`, `groupShowSegments`,
|
|
770
|
+
`splitTurnWork`, `mergeBurstSteps`, `compactionTurnInfo`, `resolveWorkingTurn`,
|
|
771
|
+
`hasRetryingAssistantTurn`), which stay until the next major.
|
|
772
|
+
|
|
773
|
+
- `sessionLogTurns(thread, options?)` returns one `SessionLogTurn` per user message:
|
|
774
|
+
`user`, `assistant` (the replies, by `reply_to` then order), `blocks`, and the
|
|
775
|
+
derived fields `status`, `error`, `cost`, `compaction`, `threads`, `plan`,
|
|
776
|
+
`shell`, `response`, `attachments`, `live`, `queued` and `retrying`, computed
|
|
777
|
+
once. Options: `busy` (the session works), `liveMessageId` (the working
|
|
778
|
+
projection's turn), `held` (the prompts the inbox still holds, in queue
|
|
779
|
+
order), `threads` (the session's threads, for `threads`), `pricing`. A turn
|
|
780
|
+
keeps its identity while its messages and derived fields do. A message out
|
|
781
|
+
of context (a failed attempt) keeps its turn; `hideOutOfContext: true` leaves
|
|
782
|
+
out every message with `in_context: false` that is not streaming.
|
|
783
|
+
- `sessionLogTurnSegments(blocks, options?)`, `splitSessionLogTurnWork(segments, { working })`
|
|
784
|
+
and `sessionLogBurstSteps(blocks)` draw a turn: bursts, text and standalone calls,
|
|
785
|
+
the settled-turn fold, and the rows of a burst.
|
|
786
|
+
- `sessionLogCallStatus(call, live)` is the status a call renders with: an open call,
|
|
787
|
+
or one the closure rule closed, is `running` or `pending` on a live turn and
|
|
788
|
+
`interrupted` on any other. `sessionLogOpenCall(call)` is the call in that open
|
|
789
|
+
shape (a closure-rule call reopened, without its result), so the v1 live view and
|
|
790
|
+
the v2 page render one call the same.
|
|
791
|
+
- `sessionLogBurstSummary(blocks)` counts a burst's steps (`total`, `failed`,
|
|
792
|
+
`completed`, `hasPlumbing`); `sessionLogBurstRunning(blocks, { working, trailing? })`
|
|
793
|
+
says whether it is still in progress.
|
|
794
|
+
- `sessionLogShowGroupCall(calls)` is a `show-group` segment as one `show` call
|
|
795
|
+
whose `input.items` is the carousel. `sessionLogAnsweredQuestionCall(call, answers, input?)`
|
|
796
|
+
is a `question` call with answers the harness has not confirmed yet.
|
|
797
|
+
- `sessionLogActivityText(turn, childMessages?)` is the activity line of a live turn.
|
|
798
|
+
- `sessionLogRetrying(thread)` says whether the thread's last reply retries a provider
|
|
799
|
+
error (a turn's `retrying`), without grouping turns: the busy state a host passes
|
|
800
|
+
as `busy` reads it. `freshSendHint` and `fallbackBusyRowAfterTurnId` accept block
|
|
801
|
+
turns as well as v1 turns, and `stepLabel` any session-log block.
|
|
802
|
+
- `classifySessionLogMessage(message)` is `classifyTurn` of one session-log message:
|
|
803
|
+
its blocks as `ClassifiedPart`s and its error with the gateway's own sentence. A
|
|
804
|
+
host whose renderers take `ClassifiedPart`s renders a thread through it until the
|
|
805
|
+
v1 helpers go.
|
|
806
|
+
- `sessionLogPromptMessage(prompt, threadId)` is the user message of a queued inbox
|
|
807
|
+
prompt the thread has not placed; append it and name it in `held`.
|
|
808
|
+
- `sessionLogThreadMetrics(thread, { pricing? })` is one thread's `cost` (every reply's
|
|
809
|
+
usage priced: its reported cost, else the lookup), `messages` (`all`, `user`, `assistant`: a compaction counts as its marker
|
|
810
|
+
and, once landed, its summary reply), `tokens` (every priced reply's usage summed) and
|
|
811
|
+
`context` (the last reply with tokens: its `usage` is the context size): what a context
|
|
812
|
+
modal's overview and its sub-agent rows show.
|
|
813
|
+
- A pending permission or question matches a call by `call.call_id`
|
|
814
|
+
(`getPermissionForTool`, `getQuestionForTool`).
|
|
815
|
+
- A session's history: `isSessionLogRestoreNote(message)` is the note a partial
|
|
816
|
+
restore leaves for the agent (render it as a notice, not a prompt);
|
|
817
|
+
`sessionLogRestoreNotice(session)` is what that restore could not bring back
|
|
818
|
+
(`{ generation, missing: [{ kind, count }] }`, null unless the grade is
|
|
819
|
+
`partial` and a restore wrote the record); `sessionLogHarnessSwitches(history, turns)`
|
|
820
|
+
maps each switch `harness.history` records to the turn it lands on.
|
|
821
|
+
- Texts stored by reference: `sessionLogReferencedTexts(messages)` lists every
|
|
822
|
+
text the API kept as a 16 kB preview (`{ ref, bytes }`); read one with
|
|
823
|
+
`fetchSessionAttachment(ref)` and put it back with `sessionLogWithFullTexts(thread, texts)`. `sessionLogFullTextAction(refs)` says
|
|
824
|
+
`'download'` above `SESSION_LOG_FULL_TEXT_INLINE_MAX_BYTES` (1 MiB) in all, else `'inline'`;
|
|
825
|
+
`sessionLogFullTextPlan(refs)` says which texts: the smallest fill the 1 MiB inline budget,
|
|
826
|
+
only the rest download.
|
|
827
|
+
- `useSessionLogRecord(session)` (`@kortix/sdk/react`) is the v2 session record without threads
|
|
828
|
+
(`restore_grade`, `grade_counts`, `harness`, `ext`); it keeps its identity through message puts.
|
|
829
|
+
|
|
830
|
+
Both layers give one answer for a record converted from v1 (its `cost` too: a
|
|
831
|
+
v1-derived reply is priced over its v1 parts): the SDK's test suite compares them
|
|
832
|
+
on every golden fixture.
|
|
833
|
+
|
|
708
834
|
## Kortix as a Backend (server-side)
|
|
709
835
|
|
|
710
836
|
`createKortix()` stores its config — crucially, the bearer-token getter — in a
|
|
@@ -832,6 +958,8 @@ the root import — offers the same agents and models and sends the same pick.
|
|
|
832
958
|
| `modelInDefaultView(model, { search, isStoreVisible, selected })` | → whether the empty-search picker shows the model |
|
|
833
959
|
| `resolveModelDefault(modelDefaults, agentName)` | `/model-defaults` → agent → project → account → platform default |
|
|
834
960
|
| `resolveComposerModel({ models, picks, serverDefault, globalDefault, agentModel, configModel, recent, providers })` | → `{ model, explicit, fallback }` |
|
|
961
|
+
| `sessionModelCandidates({ session, lastPromptModel, gatewayEnabled })` | session row + last prompt's model → the models the session already runs, most trusted first: a chosen pin (`explicit`, `repointed`), the last prompt's model, a default pin. Put them in `picks` after this composer's own pick for the session |
|
|
962
|
+
| `latestPromptModel(messages)` | transcript → the model of the newest user message that records one |
|
|
835
963
|
|
|
836
964
|
The root barrel reads catalog helpers from `@kortix/llm-catalog/lite`, which
|
|
837
965
|
never includes the ~7.6 MB models.dev snapshot, so a bundler that does not
|
|
@@ -949,16 +1077,37 @@ interface KortixPlatformConfig {
|
|
|
949
1077
|
/** @deprecated Inert: the SDK sends no client label. */
|
|
950
1078
|
clientSource?: 'api' | 'cli' | 'mobile' | 'tui' | 'web';
|
|
951
1079
|
clientVersion?: string; // '<surface>/<version>', sent as X-Kortix-Client-Version
|
|
1080
|
+
credentialHeader?: string; // send the raw token in this header instead of Authorization
|
|
952
1081
|
getUserId?: () => Promise<string | null>;
|
|
953
1082
|
billingEnabled?: boolean;
|
|
954
1083
|
sandboxId?: string | null;
|
|
955
1084
|
onError?: (error: unknown, context?: unknown) => void;
|
|
1085
|
+
onAccessRemedy?: (code: 'sso_required' | 'account_mfa_required') => void;
|
|
956
1086
|
onToast?: (level, message, options?) => void;
|
|
957
1087
|
onNotify?: (event) => void;
|
|
958
1088
|
featureFlags?: KortixFeatureFlagOverrides; // per-flag overrides for non-Next.js hosts
|
|
959
1089
|
}
|
|
960
1090
|
```
|
|
961
1091
|
|
|
1092
|
+
`onNotify` receives the session events a host shows as notifications:
|
|
1093
|
+
`task-complete` (`sessionTitle`), `session-error` (`errorTitle`), `question`
|
|
1094
|
+
(`questionText`) and `permission` (`toolName`), each with `sessionId`.
|
|
1095
|
+
`useSession` raises them from its event stream. When its view unmounts with a
|
|
1096
|
+
turn still running, a watch follows the turn on the session's control stream
|
|
1097
|
+
(`kortix.control.turn`; `GET …/turn` while the stream is down) and raises
|
|
1098
|
+
`task-complete` or `session-error` itself, with `projectId`; `task-complete`
|
|
1099
|
+
also carries `watchedSinceMs`, the watch's start in `Date.now()`. Mounting the
|
|
1100
|
+
view again ends the watch. Without `onNotify`, no watch runs. See
|
|
1101
|
+
`src/core/session/turn-end-watch.ts`.
|
|
1102
|
+
|
|
1103
|
+
`onAccessRemedy` receives the code of a 403 the person can fix: `sso_required`
|
|
1104
|
+
(sign in again through the account's identity provider) or
|
|
1105
|
+
`account_mfa_required` (complete multi-factor authentication). It runs for every
|
|
1106
|
+
response of the REST client (`backendApi`), also one made with `showErrors: false`.
|
|
1107
|
+
The session runtime proxy and the event stream do not call it. A browser also receives the
|
|
1108
|
+
`kortix:sso-required` or `kortix:mfa-required` window event. React Native has no
|
|
1109
|
+
DOM events, so `apps/mobile` uses the hook.
|
|
1110
|
+
|
|
962
1111
|
`clientSource` is deprecated and inert. The audit log records what the API
|
|
963
1112
|
authenticated (`credential_kind`: browser session, personal access token,
|
|
964
1113
|
connected app, agent session, API key, service account), never a label the
|
|
@@ -970,6 +1119,29 @@ The API writes it to its request log only, so a route is retired only when no
|
|
|
970
1119
|
supported client version still calls it. It is telemetry: it never reaches the
|
|
971
1120
|
audit log and grants nothing. A blank value sends nothing.
|
|
972
1121
|
|
|
1122
|
+
Set `credentialHeader` when a backend proxy reads the credential from a custom
|
|
1123
|
+
header, for example `credentialHeader: 'x-app-reader-token'`. The SDK then sends
|
|
1124
|
+
the raw token from `getToken` in that header and sends no `Authorization`. The
|
|
1125
|
+
401 replay still asks `getToken` for a fresh token. A caller-set header of the
|
|
1126
|
+
same name wins.
|
|
1127
|
+
|
|
1128
|
+
To start the first App-binding token fetch before the SDK loads (an inline
|
|
1129
|
+
`<script>`), hand its response to `kortixBinding` through the `fetch` option. The
|
|
1130
|
+
binding calls `fetch` once per token; return the early response for the first
|
|
1131
|
+
call and the real `fetch` after:
|
|
1132
|
+
|
|
1133
|
+
```ts
|
|
1134
|
+
const early = fetch('/_kortix/token?audience=backend', { credentials: 'same-origin' });
|
|
1135
|
+
let first: Promise<Response> | null = early;
|
|
1136
|
+
const backend = kortixBinding('backend', {
|
|
1137
|
+
fetch: (input, init) => {
|
|
1138
|
+
const reply = first;
|
|
1139
|
+
first = null;
|
|
1140
|
+
return reply ?? fetch(input, init);
|
|
1141
|
+
},
|
|
1142
|
+
});
|
|
1143
|
+
```
|
|
1144
|
+
|
|
973
1145
|
The SDK is host-agnostic: no Next.js / web coupling in the core. The host injects
|
|
974
1146
|
its token getter and toast/notify sinks; the SDK does the rest. Today that's proven
|
|
975
1147
|
in React DOM (`apps/web` and the `apps/whitelabel-demo` reference app are the
|
|
@@ -1107,6 +1279,7 @@ per-release changes.
|
|
|
1107
1279
|
### Agent repository access
|
|
1108
1280
|
|
|
1109
1281
|
Agent configuration accepts `repository_access?: boolean` (default `true`).
|
|
1282
|
+
The API stores it in `kortix.yaml` as `agents.<name>.workspace.project_repository`.
|
|
1110
1283
|
Set `false` to run new sessions without the project repository or repository API access.
|
|
1111
1284
|
Git, secret, connector, and tool permissions remain separate. Existing sessions retain their saved policy.
|
|
1112
1285
|
`AgentConfigBlock.workspace` is deprecated. The SDK maps legacy `branch`/`runtime` to the boolean field.
|
|
@@ -1257,3 +1430,41 @@ member queries every 10 seconds while the tab is visible. It also refreshes on
|
|
|
1257
1430
|
focus and reconnect, including data still inside the stale-time window. It does
|
|
1258
1431
|
not poll background tabs or change the identity provider's provisioning schedule.
|
|
1259
1432
|
Other freshness tiers keep their existing behavior.
|
|
1433
|
+
|
|
1434
|
+
## Generative UI (`@kortix/sdk/genui`)
|
|
1435
|
+
|
|
1436
|
+
When a project turns on the `genui` flag, the agent may answer with ` ```openui ` blocks:
|
|
1437
|
+
cards, comparisons, charts, maps, tabs. Render them with the headless renderer and your own
|
|
1438
|
+
components, or with the bundled defaults:
|
|
1439
|
+
|
|
1440
|
+
```tsx
|
|
1441
|
+
import { genuiVersionFromClassName } from '@kortix/sdk/genui';
|
|
1442
|
+
import { GenuiBlock, defaultGenuiComponents } from '@kortix/sdk/genui/react';
|
|
1443
|
+
|
|
1444
|
+
// A module constant: the same function on every render.
|
|
1445
|
+
const renderMarkdown = (md: string) => <Markdown>{md}</Markdown>;
|
|
1446
|
+
|
|
1447
|
+
// Inside your markdown renderer's `code` override:
|
|
1448
|
+
const version = genuiVersionFromClassName(className);
|
|
1449
|
+
if (version !== null) {
|
|
1450
|
+
return (
|
|
1451
|
+
<GenuiBlock
|
|
1452
|
+
code={code}
|
|
1453
|
+
version={version}
|
|
1454
|
+
streaming={isStreaming}
|
|
1455
|
+
components={defaultGenuiComponents}
|
|
1456
|
+
renderMarkdown={renderMarkdown}
|
|
1457
|
+
/>
|
|
1458
|
+
);
|
|
1459
|
+
}
|
|
1460
|
+
```
|
|
1461
|
+
|
|
1462
|
+
Pass a stable `renderMarkdown` (module constant or `useCallback`): a new function re-renders the block's markdown parts and node views.
|
|
1463
|
+
|
|
1464
|
+
A host that renders no UI (email, a chat bot, a CLI) converts a reply with `genuiToMarkdown(text)`.
|
|
1465
|
+
It converts blocks inside blockquotes and list items too. For a reply that is still streaming, pass
|
|
1466
|
+
`genuiToMarkdown(text, { streaming: true })`: the unfinished last block shows no "cut off" note.
|
|
1467
|
+
|
|
1468
|
+
Install the optional peers: `npm i zod @openuidev/lang-core@0.3.1`. `@openuidev/lang-core`
|
|
1469
|
+
sends one pseudonymous PostHog event at install time; set `OPENUI_TELEMETRY_DISABLED=1` or
|
|
1470
|
+
`DO_NOT_TRACK=1` to turn it off. Runtime telemetry is off unless you opt in.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idb-sync-cache.d.ts","sourceRoot":"","sources":["../../../src/browser/cache/idb-sync-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"idb-sync-cache.d.ts","sourceRoot":"","sources":["../../../src/browser/cache/idb-sync-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AA8E9E;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,eAAe,GAAG,IAAI,CAWjE;AAED,+FAA+F;AAC/F,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,GAAG,EAAE,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EAC7B,mBAAmB,CAAC,EAAE,MAAM,GAC3B,OAAO,CAAC,IAAI,CAAC,CAAG;AAEnB,+EAA+E;AAC/E,wBAAgB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAE9C;AAED,8FAA8F;AAC9F,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,EAClB,mBAAmB,CAAC,EAAE,MAAM,GAC3B,OAAO,CAAC;IAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAA;CAAE,GAAG,IAAI,CAAC,CAEnE;AAED,6FAA6F;AAC7F,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAElE;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIzG;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAM1D;AAED,+FAA+F;AAC/F,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAG"}
|
|
@@ -51,11 +51,25 @@ function openDB() {
|
|
|
51
51
|
const pending = new Promise((resolve, reject) => {
|
|
52
52
|
const request = idb.open(DB_NAME, DB_VERSION);
|
|
53
53
|
request.onupgradeneeded = () => {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
db.
|
|
54
|
+
// A throw here escapes to window.onerror (seen on Chrome 115 as
|
|
55
|
+
// InvalidStateError from createObjectStore). Fail the open instead: the
|
|
56
|
+
// cache is optional, and every caller already handles a failed open.
|
|
57
|
+
try {
|
|
58
|
+
const db = request.result;
|
|
59
|
+
if (db.objectStoreNames.contains(RETIRED_STORE_NAME))
|
|
60
|
+
db.deleteObjectStore(RETIRED_STORE_NAME);
|
|
61
|
+
if (!db.objectStoreNames.contains(STORE_NAME))
|
|
62
|
+
db.createObjectStore(STORE_NAME);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
reject(error);
|
|
66
|
+
try {
|
|
67
|
+
request.transaction?.abort();
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
// The transaction is already finished; the open fails on its own.
|
|
71
|
+
}
|
|
72
|
+
}
|
|
59
73
|
};
|
|
60
74
|
request.onsuccess = () => {
|
|
61
75
|
const db = request.result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idb-sync-cache.js","sourceRoot":"","sources":["../../../src/browser/cache/idb-sync-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAEnF,MAAM,OAAO,GAAG,sBAAsB,CAAC;AACvC,kFAAkF;AAClF,MAAM,UAAU,GAAG,CAAC,CA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AU,cAAc;IAC5B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AAC3B,CAAC;AAED,8FAA8F;AAC9F,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,UAAkB,EAClB,mBAA4B;IAE5B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,6FAA6F;AAC7F,MAAM,CAAC,KAAK,UAAU,wBAAwB;IAC5C,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,UAAkB,EAAE,kBAA2B;IACxF,MAAM,KAAK,GAAG,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;IAC1D,IAAI,CAAC,KAAK;QAAE,OAAO;IACnB,MAAM,qBAAqB,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;AAC1E,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACP,sCAAsC;IACxC,CAAC;AACH,CAAC;AAED,+FAA+F;AAC/F,MAAM,CAAC,KAAK,UAAU,aAAa,KAAmB,CAAC"}
|
|
@@ -71,13 +71,19 @@ export declare function parseKortixSessionScope(scope: string | undefined): {
|
|
|
71
71
|
sessionId: string;
|
|
72
72
|
} | null;
|
|
73
73
|
/**
|
|
74
|
-
* Fetch the
|
|
75
|
-
*
|
|
76
|
-
*
|
|
74
|
+
* Fetch the saved copy for a host that passed `useSessionSync` no `mirror`.
|
|
75
|
+
* Never throws and never surfaces an error toast: a session that has never
|
|
76
|
+
* been captured is an ordinary answer, not a failure, and this read is an
|
|
77
|
+
* accelerator whose absence costs only the old blank wake.
|
|
78
|
+
*
|
|
79
|
+
* The conversation's window is THE saved-history read
|
|
80
|
+
* (`loadSavedTranscript`): the session-open snapshot's window when one is in
|
|
81
|
+
* flight or just answered, else the route. `useSession` passes its answer in,
|
|
82
|
+
* so for a session it owns this never runs. A sub-agent's window is read here,
|
|
83
|
+
* by `child`: the snapshot carries only the conversation's.
|
|
77
84
|
*/
|
|
78
85
|
export declare function loadSessionTranscriptMirror(input: {
|
|
79
86
|
kortixSessionScope: string | undefined;
|
|
80
|
-
limit?: number;
|
|
81
87
|
signal?: AbortSignal;
|
|
82
88
|
/** A sub-agent's OpenCode session inside the scope: its own saved window. */
|
|
83
89
|
child?: string;
|
|
@@ -86,9 +92,9 @@ export declare function loadSessionTranscriptMirror(input: {
|
|
|
86
92
|
* The mirror window OLDER than `before`.
|
|
87
93
|
*
|
|
88
94
|
* Deliberately NOT `loadSessionTranscriptMirror` with an extra argument: that
|
|
89
|
-
* function
|
|
90
|
-
*
|
|
91
|
-
*
|
|
95
|
+
* function can answer from the session-open snapshot, which holds the FIRST
|
|
96
|
+
* window and must never be handed back for an older one. This is always a
|
|
97
|
+
* fresh read.
|
|
92
98
|
*
|
|
93
99
|
* `history: true` is not sent. It only adds the server's current-root check,
|
|
94
100
|
* and `shouldHydrateFromMirror` already applies that guard client-side — the
|
|
@@ -106,6 +112,19 @@ export declare function loadOlderSessionTranscriptMirror(input: {
|
|
|
106
112
|
/** A sub-agent's OpenCode session inside the scope. */
|
|
107
113
|
child?: string;
|
|
108
114
|
}): Promise<SessionTranscriptSyncEnvelope | null>;
|
|
115
|
+
/**
|
|
116
|
+
* Every message of the saved copy, oldest first: each window back from the
|
|
117
|
+
* newest, until the server leaves no cursor. For an export, which needs the
|
|
118
|
+
* whole conversation while the computer cannot answer. Unlike the reads above
|
|
119
|
+
* it throws on a failed read: a partial export must not pass for a whole one.
|
|
120
|
+
*/
|
|
121
|
+
export declare function loadSavedSessionTranscriptMessages(scope: {
|
|
122
|
+
projectId: string;
|
|
123
|
+
sessionId: string;
|
|
124
|
+
}, signal?: AbortSignal): Promise<Array<{
|
|
125
|
+
info: Message;
|
|
126
|
+
parts: Part[];
|
|
127
|
+
}>>;
|
|
109
128
|
/**
|
|
110
129
|
* How long after a turn ends the device's copy is re-read. The server writes
|
|
111
130
|
* its saved copy on the turn-end relay, a moment after the runtime goes idle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-transcript-mirror.d.ts","sourceRoot":"","sources":["../../../src/browser/session-sync/server-transcript-mirror.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EACN,KAAK,6BAA6B,EAElC,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"server-transcript-mirror.d.ts","sourceRoot":"","sources":["../../../src/browser/session-sync/server-transcript-mirror.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EACN,KAAK,6BAA6B,EAElC,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAG/E;;6BAE6B;AAC7B,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,MAAM,WAAW,qBAAqB;IACrC,QAAQ,EAAE,6BAA6B,GAAG,IAAI,CAAC;IAC/C,oDAAoD;IACpD,gBAAgB,EAAE,MAAM,CAAC;IACzB,sDAAsD;IACtD,WAAW,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAiB7E;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACvC,QAAQ,EAAE,6BAA6B,GACrC,KAAK,CAAC;IAAE,IAAI,EAAE,OAAO,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GACf,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
* on the runtime).
|
|
32
32
|
*/
|
|
33
33
|
import { getSessionTranscriptSync, } from "../../core/rest/projects-client/sessions.js";
|
|
34
|
-
import {
|
|
34
|
+
import { loadSavedTranscript } from "../../core/session-sync/saved-transcript.js";
|
|
35
35
|
/** How many mirrored messages a first paint asks for. Matches the sync
|
|
36
36
|
* controller's own initial tail, so the mirror and the read that replaces it
|
|
37
37
|
* cover the same window. */
|
|
@@ -108,53 +108,29 @@ export function parseKortixSessionScope(scope) {
|
|
|
108
108
|
return { projectId, sessionId };
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
|
-
* Fetch the
|
|
112
|
-
*
|
|
113
|
-
*
|
|
111
|
+
* Fetch the saved copy for a host that passed `useSessionSync` no `mirror`.
|
|
112
|
+
* Never throws and never surfaces an error toast: a session that has never
|
|
113
|
+
* been captured is an ordinary answer, not a failure, and this read is an
|
|
114
|
+
* accelerator whose absence costs only the old blank wake.
|
|
115
|
+
*
|
|
116
|
+
* The conversation's window is THE saved-history read
|
|
117
|
+
* (`loadSavedTranscript`): the session-open snapshot's window when one is in
|
|
118
|
+
* flight or just answered, else the route. `useSession` passes its answer in,
|
|
119
|
+
* so for a session it owns this never runs. A sub-agent's window is read here,
|
|
120
|
+
* by `child`: the snapshot carries only the conversation's.
|
|
114
121
|
*/
|
|
115
122
|
export async function loadSessionTranscriptMirror(input) {
|
|
116
123
|
const scope = parseKortixSessionScope(input.kortixSessionScope);
|
|
117
124
|
if (!scope)
|
|
118
125
|
return null;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return await getSessionTranscriptSync(scope.projectId, scope.sessionId, {
|
|
124
|
-
limit: input.limit ?? MIRROR_HYDRATE_LIMIT,
|
|
126
|
+
try {
|
|
127
|
+
return input.child
|
|
128
|
+
? await getSessionTranscriptSync(scope.projectId, scope.sessionId, {
|
|
129
|
+
limit: MIRROR_HYDRATE_LIMIT,
|
|
125
130
|
signal: input.signal,
|
|
126
131
|
child: input.child,
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
catch {
|
|
130
|
-
return null;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// The SESSION-OPEN BUNDLE fetches this mirror in the same round trip that
|
|
134
|
-
// answers the turn and the queue. This hydrate runs at MOUNT, while that
|
|
135
|
-
// read is still in flight, so it waits for the read it is riding rather
|
|
136
|
-
// than starting a second one — the wait costs nothing (the bundle is
|
|
137
|
-
// already on the wire) and saves a full transcript request per open.
|
|
138
|
-
//
|
|
139
|
-
// The stash is ONE-SHOT: this is the only reader allowed to paint a
|
|
140
|
-
// snapshot, and a second paint over a store the runtime has already filled
|
|
141
|
-
// is how a transcript grows ghosts.
|
|
142
|
-
const claimed = claimOpenBundle(scope.projectId, scope.sessionId);
|
|
143
|
-
if (claimed)
|
|
144
|
-
await claimed;
|
|
145
|
-
const stashed = takeOpenBundleTranscript(scope.projectId, scope.sessionId);
|
|
146
|
-
if (stashed)
|
|
147
|
-
return stashed;
|
|
148
|
-
// The bundle already answered that there is no saved copy. The transcript
|
|
149
|
-
// route would answer the same, one round trip later — and a host waiting
|
|
150
|
-
// on this answer shows placeholder rows until it lands.
|
|
151
|
-
if (takeOpenBundleTranscriptAbsence(scope.projectId, scope.sessionId))
|
|
152
|
-
return null;
|
|
153
|
-
try {
|
|
154
|
-
return await getSessionTranscriptSync(scope.projectId, scope.sessionId, {
|
|
155
|
-
limit: input.limit ?? MIRROR_HYDRATE_LIMIT,
|
|
156
|
-
signal: input.signal,
|
|
157
|
-
});
|
|
132
|
+
})
|
|
133
|
+
: await loadSavedTranscript(scope.projectId, scope.sessionId, { signal: input.signal });
|
|
158
134
|
}
|
|
159
135
|
catch {
|
|
160
136
|
return null;
|
|
@@ -164,9 +140,9 @@ export async function loadSessionTranscriptMirror(input) {
|
|
|
164
140
|
* The mirror window OLDER than `before`.
|
|
165
141
|
*
|
|
166
142
|
* Deliberately NOT `loadSessionTranscriptMirror` with an extra argument: that
|
|
167
|
-
* function
|
|
168
|
-
*
|
|
169
|
-
*
|
|
143
|
+
* function can answer from the session-open snapshot, which holds the FIRST
|
|
144
|
+
* window and must never be handed back for an older one. This is always a
|
|
145
|
+
* fresh read.
|
|
170
146
|
*
|
|
171
147
|
* `history: true` is not sent. It only adds the server's current-root check,
|
|
172
148
|
* and `shouldHydrateFromMirror` already applies that guard client-side — the
|
|
@@ -192,6 +168,37 @@ export async function loadOlderSessionTranscriptMirror(input) {
|
|
|
192
168
|
return null;
|
|
193
169
|
}
|
|
194
170
|
}
|
|
171
|
+
/** The route's largest window: an export walks the whole saved copy. */
|
|
172
|
+
const SAVED_EXPORT_WINDOW = 500;
|
|
173
|
+
/**
|
|
174
|
+
* Every message of the saved copy, oldest first: each window back from the
|
|
175
|
+
* newest, until the server leaves no cursor. For an export, which needs the
|
|
176
|
+
* whole conversation while the computer cannot answer. Unlike the reads above
|
|
177
|
+
* it throws on a failed read: a partial export must not pass for a whole one.
|
|
178
|
+
*/
|
|
179
|
+
export async function loadSavedSessionTranscriptMessages(scope, signal) {
|
|
180
|
+
const windows = [];
|
|
181
|
+
const seen = new Set();
|
|
182
|
+
let before = null;
|
|
183
|
+
do {
|
|
184
|
+
const envelope = await getSessionTranscriptSync(scope.projectId, scope.sessionId, {
|
|
185
|
+
limit: SAVED_EXPORT_WINDOW,
|
|
186
|
+
history: true,
|
|
187
|
+
before,
|
|
188
|
+
signal,
|
|
189
|
+
});
|
|
190
|
+
if (!envelope.available)
|
|
191
|
+
break;
|
|
192
|
+
windows.unshift(mirrorMessagesForHydrate(envelope));
|
|
193
|
+
before = envelope.next_cursor ?? null;
|
|
194
|
+
// A cursor the server already gave is a server that is not advancing.
|
|
195
|
+
if (before !== null && seen.has(before))
|
|
196
|
+
break;
|
|
197
|
+
if (before !== null)
|
|
198
|
+
seen.add(before);
|
|
199
|
+
} while (before !== null);
|
|
200
|
+
return windows.flat();
|
|
201
|
+
}
|
|
195
202
|
/**
|
|
196
203
|
* How long after a turn ends the device's copy is re-read. The server writes
|
|
197
204
|
* its saved copy on the turn-end relay, a moment after the runtime goes idle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-transcript-mirror.js","sourceRoot":"","sources":["../../../src/browser/session-sync/server-transcript-mirror.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAEN,wBAAwB,GACxB,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"server-transcript-mirror.js","sourceRoot":"","sources":["../../../src/browser/session-sync/server-transcript-mirror.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAEN,wBAAwB,GACxB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E;;6BAE6B;AAC7B,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAUvC;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAA4B;IACnE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC1D,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5B,2EAA2E;IAC3E,0EAA0E;IAC1E,IAAI,WAAW;QAAE,OAAO,KAAK,CAAC;IAC9B,2EAA2E;IAC3E,gCAAgC;IAChC,IAAI,CAAC,gBAAgB;QAAE,OAAO,KAAK,CAAC;IACpC,IAAI,CAAC,QAAQ,CAAC,SAAS;QAAE,OAAO,KAAK,CAAC;IACtC,oDAAoD;IACpD,IAAI,QAAQ,CAAC,MAAM,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC/C,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,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