@kortix/sdk 0.15.1 → 0.15.3
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 +211 -299
- package/dist/browser/session-sync/session-sync-registry.d.ts +1 -2
- package/dist/browser/session-sync/session-sync-registry.d.ts.map +1 -1
- package/dist/browser/session-sync/session-sync-registry.js +1 -4
- package/dist/browser/session-sync/session-sync-registry.js.map +1 -1
- package/dist/browser/stores/sync-store.d.ts +0 -6
- package/dist/browser/stores/sync-store.d.ts.map +1 -1
- package/dist/browser/stores/sync-store.js +105 -310
- package/dist/browser/stores/sync-store.js.map +1 -1
- package/dist/core/client/facade-catalog.d.ts +16 -14
- package/dist/core/client/facade-catalog.d.ts.map +1 -1
- package/dist/core/client/facade-catalog.js +16 -14
- package/dist/core/client/facade-catalog.js.map +1 -1
- package/dist/core/client/facade-workspaces.d.ts +104 -0
- package/dist/core/client/facade-workspaces.d.ts.map +1 -0
- package/dist/core/client/facade-workspaces.js +89 -0
- package/dist/core/client/facade-workspaces.js.map +1 -0
- package/dist/core/client/kortix.d.ts +1199 -104
- package/dist/core/client/kortix.d.ts.map +1 -1
- package/dist/core/client/kortix.js +27 -2
- package/dist/core/client/kortix.js.map +1 -1
- package/dist/core/client/project-access-security.d.ts +6 -6
- package/dist/core/client/project-access-security.d.ts.map +1 -1
- package/dist/core/client/project-access-security.js +20 -20
- package/dist/core/client/project-access-security.js.map +1 -1
- package/dist/core/client/project-connections.js +1 -1
- package/dist/core/client/project-connections.js.map +1 -1
- package/dist/core/client/project-core.d.ts +1 -1
- package/dist/core/client/project-core.d.ts.map +1 -1
- package/dist/core/client/project-core.js +12 -12
- package/dist/core/client/project-core.js.map +1 -1
- package/dist/core/client/project-membership.d.ts +1 -1
- package/dist/core/client/project-membership.d.ts.map +1 -1
- package/dist/core/client/project-membership.js +16 -16
- package/dist/core/client/project-membership.js.map +1 -1
- package/dist/core/client/project-operations-admin.d.ts +9 -9
- package/dist/core/client/project-operations-admin.d.ts.map +1 -1
- package/dist/core/client/project-operations-admin.js +12 -12
- package/dist/core/client/project-operations-admin.js.map +1 -1
- package/dist/core/client/project-operations-review.d.ts +5 -5
- package/dist/core/client/project-operations-review.d.ts.map +1 -1
- package/dist/core/client/project-operations-review.js +36 -36
- package/dist/core/client/project-operations-review.js.map +1 -1
- package/dist/core/client/project-operations-workspace.d.ts +9 -9
- package/dist/core/client/project-operations-workspace.d.ts.map +1 -1
- package/dist/core/client/project-operations-workspace.js +12 -12
- package/dist/core/client/project-operations-workspace.js.map +1 -1
- package/dist/core/client/project-operations.d.ts +9 -9
- package/dist/core/client/project-operations.d.ts.map +1 -1
- package/dist/core/client/project-platform-security.d.ts +1 -1
- package/dist/core/client/project-platform-settings.d.ts +1 -1
- package/dist/core/client/project-platform-settings.d.ts.map +1 -1
- package/dist/core/client/project-platform-settings.js +5 -5
- package/dist/core/client/project-platform-settings.js.map +1 -1
- package/dist/core/client/session-actions-resources.js +3 -3
- package/dist/core/client/session-actions-resources.js.map +1 -1
- package/dist/core/client/session-actions-security.js +2 -2
- package/dist/core/client/session-actions-security.js.map +1 -1
- package/dist/core/client/session-defaults.js +1 -1
- package/dist/core/client/session-defaults.js.map +1 -1
- package/dist/core/client/session-handle.d.ts +3 -3
- package/dist/core/client/session-handle.d.ts.map +1 -1
- package/dist/core/client/session-lifecycle-resources.d.ts +3 -3
- package/dist/core/client/session-lifecycle-resources.d.ts.map +1 -1
- package/dist/core/client/session-lifecycle-resources.js +14 -14
- package/dist/core/client/session-lifecycle-resources.js.map +1 -1
- package/dist/core/client/session-start.js +2 -2
- package/dist/core/client/session-start.js.map +1 -1
- package/dist/core/connectors/connect-link.d.ts +23 -3
- package/dist/core/connectors/connect-link.d.ts.map +1 -1
- package/dist/core/connectors/connect-link.js +13 -2
- package/dist/core/connectors/connect-link.js.map +1 -1
- package/dist/core/connectors/connector-accounts.d.ts +3 -1
- package/dist/core/connectors/connector-accounts.d.ts.map +1 -1
- package/dist/core/connectors/connector-accounts.js +4 -2
- package/dist/core/connectors/connector-accounts.js.map +1 -1
- package/dist/core/files/client.d.ts +4 -2
- package/dist/core/files/client.d.ts.map +1 -1
- package/dist/core/files/client.js +40 -10
- package/dist/core/files/client.js.map +1 -1
- package/dist/core/http/api/errors.d.ts +12 -0
- package/dist/core/http/api/errors.d.ts.map +1 -1
- package/dist/core/http/api/errors.js +14 -0
- package/dist/core/http/api/errors.js.map +1 -1
- package/dist/core/http/instance-routes.js +1 -1
- package/dist/core/http/instance-routes.js.map +1 -1
- package/dist/core/http/response-error.d.ts.map +1 -1
- package/dist/core/http/response-error.js +4 -2
- package/dist/core/http/response-error.js.map +1 -1
- package/dist/core/http/runtime-errors.d.ts.map +1 -1
- package/dist/core/http/runtime-errors.js +3 -2
- package/dist/core/http/runtime-errors.js.map +1 -1
- package/dist/core/http/transport.d.ts +3 -1
- package/dist/core/http/transport.d.ts.map +1 -1
- package/dist/core/http/transport.js +6 -2
- package/dist/core/http/transport.js.map +1 -1
- package/dist/core/http/url.d.ts +17 -0
- package/dist/core/http/url.d.ts.map +1 -0
- package/dist/core/http/url.js +42 -0
- package/dist/core/http/url.js.map +1 -0
- package/dist/core/http/workspace-routes.d.ts +48 -0
- package/dist/core/http/workspace-routes.d.ts.map +1 -0
- package/dist/core/http/workspace-routes.js +221 -0
- package/dist/core/http/workspace-routes.js.map +1 -0
- package/dist/core/models/provider-selection.d.ts +3 -1
- package/dist/core/models/provider-selection.d.ts.map +1 -1
- package/dist/core/models/provider-selection.js +3 -1
- package/dist/core/models/provider-selection.js.map +1 -1
- package/dist/core/rest/platform-client/host-boundary.d.ts +8 -0
- package/dist/core/rest/platform-client/host-boundary.d.ts.map +1 -1
- package/dist/core/rest/platform-client/host-boundary.js +14 -4
- package/dist/core/rest/platform-client/host-boundary.js.map +1 -1
- package/dist/core/rest/platform-client/lifecycle.js +5 -5
- package/dist/core/rest/platform-client/lifecycle.js.map +1 -1
- package/dist/core/rest/platform-client/members.d.ts +15 -3
- package/dist/core/rest/platform-client/members.d.ts.map +1 -1
- package/dist/core/rest/platform-client/members.js +9 -3
- package/dist/core/rest/platform-client/members.js.map +1 -1
- package/dist/core/rest/platform-client/shared.d.ts +1 -8
- package/dist/core/rest/platform-client/shared.d.ts.map +1 -1
- package/dist/core/rest/platform-client/shared.js +7 -27
- package/dist/core/rest/platform-client/shared.js.map +1 -1
- package/dist/core/rest/projects-client/access.d.ts +106 -21
- package/dist/core/rest/projects-client/access.d.ts.map +1 -1
- package/dist/core/rest/projects-client/access.js +90 -53
- package/dist/core/rest/projects-client/access.js.map +1 -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 +7 -6
- package/dist/core/rest/projects-client/account-secret-resources.js.map +1 -1
- package/dist/core/rest/projects-client/accounts.d.ts +29 -0
- package/dist/core/rest/projects-client/accounts.d.ts.map +1 -1
- package/dist/core/rest/projects-client/accounts.js +14 -5
- package/dist/core/rest/projects-client/accounts.js.map +1 -1
- package/dist/core/rest/projects-client/agent-capabilities.d.ts +10 -2
- package/dist/core/rest/projects-client/agent-capabilities.d.ts.map +1 -1
- package/dist/core/rest/projects-client/agent-capabilities.js +5 -3
- package/dist/core/rest/projects-client/agent-capabilities.js.map +1 -1
- package/dist/core/rest/projects-client/agent-config.d.ts +6 -1
- package/dist/core/rest/projects-client/agent-config.d.ts.map +1 -1
- package/dist/core/rest/projects-client/agent-config.js +7 -5
- package/dist/core/rest/projects-client/agent-config.js.map +1 -1
- package/dist/core/rest/projects-client/agent-scope.js +1 -1
- package/dist/core/rest/projects-client/agent-scope.js.map +1 -1
- package/dist/core/rest/projects-client/apps-fleet.d.ts.map +1 -1
- package/dist/core/rest/projects-client/apps-fleet.js +14 -14
- package/dist/core/rest/projects-client/apps-fleet.js.map +1 -1
- package/dist/core/rest/projects-client/apps-paths.d.ts +3 -0
- package/dist/core/rest/projects-client/apps-paths.d.ts.map +1 -0
- package/dist/core/rest/projects-client/apps-paths.js +8 -0
- package/dist/core/rest/projects-client/apps-paths.js.map +1 -0
- package/dist/core/rest/projects-client/apps.d.ts.map +1 -1
- package/dist/core/rest/projects-client/apps.js +39 -42
- package/dist/core/rest/projects-client/apps.js.map +1 -1
- package/dist/core/rest/projects-client/artifacts.d.ts +3 -247
- package/dist/core/rest/projects-client/artifacts.d.ts.map +1 -1
- package/dist/core/rest/projects-client/artifacts.js +17 -137
- package/dist/core/rest/projects-client/artifacts.js.map +1 -1
- package/dist/core/rest/projects-client/asks.d.ts +20 -5
- package/dist/core/rest/projects-client/asks.d.ts.map +1 -1
- package/dist/core/rest/projects-client/asks.js +3 -3
- package/dist/core/rest/projects-client/asks.js.map +1 -1
- package/dist/core/rest/projects-client/assignments-at.d.ts +6 -0
- package/dist/core/rest/projects-client/assignments-at.d.ts.map +1 -0
- package/dist/core/rest/projects-client/assignments-at.js +42 -0
- package/dist/core/rest/projects-client/assignments-at.js.map +1 -0
- package/dist/core/rest/projects-client/assignments.d.ts.map +1 -1
- package/dist/core/rest/projects-client/assignments.js +5 -34
- package/dist/core/rest/projects-client/assignments.js.map +1 -1
- package/dist/core/rest/projects-client/audit.d.ts +3 -1
- package/dist/core/rest/projects-client/audit.d.ts.map +1 -1
- package/dist/core/rest/projects-client/audit.js +8 -2
- package/dist/core/rest/projects-client/audit.js.map +1 -1
- package/dist/core/rest/projects-client/billing.d.ts +24 -1
- package/dist/core/rest/projects-client/billing.d.ts.map +1 -1
- package/dist/core/rest/projects-client/billing.js.map +1 -1
- package/dist/core/rest/projects-client/change-request-recovery.js +3 -3
- package/dist/core/rest/projects-client/change-request-recovery.js.map +1 -1
- package/dist/core/rest/projects-client/change-requests.js +12 -12
- package/dist/core/rest/projects-client/change-requests.js.map +1 -1
- package/dist/core/rest/projects-client/channels.js +24 -24
- package/dist/core/rest/projects-client/channels.js.map +1 -1
- package/dist/core/rest/projects-client/claude-subscription.js +1 -1
- package/dist/core/rest/projects-client/claude-subscription.js.map +1 -1
- package/dist/core/rest/projects-client/connectors.d.ts +6 -2
- package/dist/core/rest/projects-client/connectors.d.ts.map +1 -1
- package/dist/core/rest/projects-client/connectors.js +55 -51
- package/dist/core/rest/projects-client/connectors.js.map +1 -1
- package/dist/core/rest/projects-client/custom-llm-providers.js +5 -5
- package/dist/core/rest/projects-client/custom-llm-providers.js.map +1 -1
- package/dist/core/rest/projects-client/drives.d.ts +10 -2
- package/dist/core/rest/projects-client/drives.d.ts.map +1 -1
- package/dist/core/rest/projects-client/drives.js +4 -2
- package/dist/core/rest/projects-client/drives.js.map +1 -1
- package/dist/core/rest/projects-client/files.d.ts +41 -10
- package/dist/core/rest/projects-client/files.d.ts.map +1 -1
- package/dist/core/rest/projects-client/files.js +33 -17
- package/dist/core/rest/projects-client/files.js.map +1 -1
- package/dist/core/rest/projects-client/gateway.d.ts +3 -0
- package/dist/core/rest/projects-client/gateway.d.ts.map +1 -1
- package/dist/core/rest/projects-client/gateway.js +20 -20
- package/dist/core/rest/projects-client/gateway.js.map +1 -1
- package/dist/core/rest/projects-client/git-backend.js +2 -2
- package/dist/core/rest/projects-client/git-backend.js.map +1 -1
- package/dist/core/rest/projects-client/git-history.d.ts +49 -6
- package/dist/core/rest/projects-client/git-history.d.ts.map +1 -1
- package/dist/core/rest/projects-client/git-history.js +20 -10
- package/dist/core/rest/projects-client/git-history.js.map +1 -1
- package/dist/core/rest/projects-client/github.d.ts +16 -2
- package/dist/core/rest/projects-client/github.d.ts.map +1 -1
- package/dist/core/rest/projects-client/github.js +18 -14
- package/dist/core/rest/projects-client/github.js.map +1 -1
- package/dist/core/rest/projects-client/goals.d.ts +149 -20
- package/dist/core/rest/projects-client/goals.d.ts.map +1 -1
- package/dist/core/rest/projects-client/goals.js +69 -21
- package/dist/core/rest/projects-client/goals.js.map +1 -1
- package/dist/core/rest/projects-client/iam-actions.d.ts +112 -1
- package/dist/core/rest/projects-client/iam-actions.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam-actions.js +117 -1
- package/dist/core/rest/projects-client/iam-actions.js.map +1 -1
- package/dist/core/rest/projects-client/iam-audit.js +1 -1
- package/dist/core/rest/projects-client/iam-audit.js.map +1 -1
- package/dist/core/rest/projects-client/iam-grants.js +1 -1
- package/dist/core/rest/projects-client/iam-grants.js.map +1 -1
- package/dist/core/rest/projects-client/iam-groups.d.ts +12 -2
- package/dist/core/rest/projects-client/iam-groups.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam-groups.js +6 -2
- package/dist/core/rest/projects-client/iam-groups.js.map +1 -1
- package/dist/core/rest/projects-client/iam-policies.js +1 -1
- package/dist/core/rest/projects-client/iam-policies.js.map +1 -1
- package/dist/core/rest/projects-client/iam-probe.d.ts +2 -0
- package/dist/core/rest/projects-client/iam-probe.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam-probe.js.map +1 -1
- package/dist/core/rest/projects-client/iam-roles.d.ts +3 -1
- package/dist/core/rest/projects-client/iam-roles.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam-roles.js +4 -2
- package/dist/core/rest/projects-client/iam-roles.js.map +1 -1
- package/dist/core/rest/projects-client/iam-sessions.d.ts +6 -0
- package/dist/core/rest/projects-client/iam-sessions.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam-sessions.js.map +1 -1
- package/dist/core/rest/projects-client/iam-types.d.ts +2 -0
- package/dist/core/rest/projects-client/iam-types.d.ts.map +1 -1
- package/dist/core/rest/projects-client/index.d.ts +2 -3
- package/dist/core/rest/projects-client/index.d.ts.map +1 -1
- package/dist/core/rest/projects-client/index.js +1 -2
- package/dist/core/rest/projects-client/index.js.map +1 -1
- package/dist/core/rest/projects-client/manifest-spaces.d.ts +6 -1
- package/dist/core/rest/projects-client/manifest-spaces.d.ts.map +1 -1
- package/dist/core/rest/projects-client/manifest-spaces.js +6 -1
- package/dist/core/rest/projects-client/manifest-spaces.js.map +1 -1
- package/dist/core/rest/projects-client/marketplace-catalog.js +1 -1
- package/dist/core/rest/projects-client/marketplace-catalog.js.map +1 -1
- package/dist/core/rest/projects-client/memory.d.ts +146 -22
- package/dist/core/rest/projects-client/memory.d.ts.map +1 -1
- package/dist/core/rest/projects-client/memory.js +31 -12
- package/dist/core/rest/projects-client/memory.js.map +1 -1
- package/dist/core/rest/projects-client/model-access.d.ts +16 -3
- package/dist/core/rest/projects-client/model-access.d.ts.map +1 -1
- package/dist/core/rest/projects-client/model-access.js +8 -4
- package/dist/core/rest/projects-client/model-access.js.map +1 -1
- package/dist/core/rest/projects-client/model-defaults.js +3 -3
- package/dist/core/rest/projects-client/model-defaults.js.map +1 -1
- package/dist/core/rest/projects-client/model-enablement.d.ts +3 -1
- package/dist/core/rest/projects-client/model-enablement.d.ts.map +1 -1
- package/dist/core/rest/projects-client/model-enablement.js +4 -2
- package/dist/core/rest/projects-client/model-enablement.js.map +1 -1
- package/dist/core/rest/projects-client/multi-agent.d.ts.map +1 -1
- package/dist/core/rest/projects-client/multi-agent.js +4 -3
- package/dist/core/rest/projects-client/multi-agent.js.map +1 -1
- package/dist/core/rest/projects-client/notifications.d.ts +2 -6
- package/dist/core/rest/projects-client/notifications.d.ts.map +1 -1
- package/dist/core/rest/projects-client/notifications.js +4 -6
- package/dist/core/rest/projects-client/notifications.js.map +1 -1
- package/dist/core/rest/projects-client/policies.d.ts +12 -2
- package/dist/core/rest/projects-client/policies.d.ts.map +1 -1
- package/dist/core/rest/projects-client/policies.js +8 -4
- package/dist/core/rest/projects-client/policies.js.map +1 -1
- package/dist/core/rest/projects-client/project-agents.d.ts +3 -1
- package/dist/core/rest/projects-client/project-agents.d.ts.map +1 -1
- package/dist/core/rest/projects-client/project-agents.js +3 -1
- package/dist/core/rest/projects-client/project-agents.js.map +1 -1
- package/dist/core/rest/projects-client/project-search.d.ts +24 -4
- package/dist/core/rest/projects-client/project-search.d.ts.map +1 -1
- package/dist/core/rest/projects-client/project-search.js +4 -2
- package/dist/core/rest/projects-client/project-search.js.map +1 -1
- package/dist/core/rest/projects-client/projects.d.ts +172 -50
- package/dist/core/rest/projects-client/projects.d.ts.map +1 -1
- package/dist/core/rest/projects-client/projects.js +116 -158
- package/dist/core/rest/projects-client/projects.js.map +1 -1
- package/dist/core/rest/projects-client/prompt-attachments.js +1 -1
- package/dist/core/rest/projects-client/prompt-attachments.js.map +1 -1
- package/dist/core/rest/projects-client/provision-stream.d.ts +15 -0
- package/dist/core/rest/projects-client/provision-stream.d.ts.map +1 -0
- package/dist/core/rest/projects-client/provision-stream.js +105 -0
- package/dist/core/rest/projects-client/provision-stream.js.map +1 -0
- package/dist/core/rest/projects-client/review.js +6 -6
- package/dist/core/rest/projects-client/review.js.map +1 -1
- package/dist/core/rest/projects-client/runtime-triggers.js +3 -3
- package/dist/core/rest/projects-client/runtime-triggers.js.map +1 -1
- package/dist/core/rest/projects-client/sandbox.d.ts +31 -6
- package/dist/core/rest/projects-client/sandbox.d.ts.map +1 -1
- package/dist/core/rest/projects-client/sandbox.js +27 -17
- package/dist/core/rest/projects-client/sandbox.js.map +1 -1
- package/dist/core/rest/projects-client/secrets.d.ts +60 -15
- package/dist/core/rest/projects-client/secrets.d.ts.map +1 -1
- package/dist/core/rest/projects-client/secrets.js +53 -27
- package/dist/core/rest/projects-client/secrets.js.map +1 -1
- package/dist/core/rest/projects-client/session-attachments.js +2 -2
- package/dist/core/rest/projects-client/session-attachments.js.map +1 -1
- package/dist/core/rest/projects-client/session-costs.d.ts +33 -2
- package/dist/core/rest/projects-client/session-costs.d.ts.map +1 -1
- package/dist/core/rest/projects-client/session-costs.js +3 -1
- package/dist/core/rest/projects-client/session-costs.js.map +1 -1
- package/dist/core/rest/projects-client/session-groups.d.ts +35 -8
- package/dist/core/rest/projects-client/session-groups.d.ts.map +1 -1
- package/dist/core/rest/projects-client/session-groups.js +24 -12
- package/dist/core/rest/projects-client/session-groups.js.map +1 -1
- package/dist/core/rest/projects-client/session-reminders.d.ts +10 -2
- package/dist/core/rest/projects-client/session-reminders.d.ts.map +1 -1
- package/dist/core/rest/projects-client/session-reminders.js +9 -7
- package/dist/core/rest/projects-client/session-reminders.js.map +1 -1
- package/dist/core/rest/projects-client/session-sandbox.d.ts +13 -3
- package/dist/core/rest/projects-client/session-sandbox.d.ts.map +1 -1
- package/dist/core/rest/projects-client/session-sandbox.js +8 -4
- package/dist/core/rest/projects-client/session-sandbox.js.map +1 -1
- package/dist/core/rest/projects-client/sessions.d.ts +127 -27
- package/dist/core/rest/projects-client/sessions.d.ts.map +1 -1
- package/dist/core/rest/projects-client/sessions.js +124 -68
- package/dist/core/rest/projects-client/sessions.js.map +1 -1
- package/dist/core/rest/projects-client/setup-links.d.ts +12 -2
- package/dist/core/rest/projects-client/setup-links.d.ts.map +1 -1
- package/dist/core/rest/projects-client/setup-links.js +8 -4
- package/dist/core/rest/projects-client/setup-links.js.map +1 -1
- package/dist/core/rest/projects-client/shared.d.ts +8 -0
- package/dist/core/rest/projects-client/shared.d.ts.map +1 -1
- package/dist/core/rest/projects-client/shared.js +2 -1
- package/dist/core/rest/projects-client/shared.js.map +1 -1
- package/dist/core/rest/projects-client/skills.d.ts +20 -4
- package/dist/core/rest/projects-client/skills.d.ts.map +1 -1
- package/dist/core/rest/projects-client/skills.js +8 -4
- package/dist/core/rest/projects-client/skills.js.map +1 -1
- package/dist/core/rest/projects-client/spaces.d.ts +117 -24
- package/dist/core/rest/projects-client/spaces.d.ts.map +1 -1
- package/dist/core/rest/projects-client/spaces.js +76 -40
- package/dist/core/rest/projects-client/spaces.js.map +1 -1
- package/dist/core/rest/projects-client/tokens.d.ts +87 -11
- package/dist/core/rest/projects-client/tokens.d.ts.map +1 -1
- package/dist/core/rest/projects-client/tokens.js +48 -16
- package/dist/core/rest/projects-client/tokens.js.map +1 -1
- package/dist/core/rest/projects-client/triggers.d.ts +153 -25
- package/dist/core/rest/projects-client/triggers.d.ts.map +1 -1
- package/dist/core/rest/projects-client/triggers.js +38 -20
- package/dist/core/rest/projects-client/triggers.js.map +1 -1
- package/dist/core/rest/projects-client/workspaces.d.ts +425 -0
- package/dist/core/rest/projects-client/workspaces.d.ts.map +1 -0
- package/dist/core/rest/projects-client/workspaces.js +437 -0
- package/dist/core/rest/projects-client/workspaces.js.map +1 -0
- package/dist/core/runtime/env.d.ts.map +1 -1
- package/dist/core/runtime/env.js +7 -29
- package/dist/core/runtime/env.js.map +1 -1
- package/dist/core/runtime/kortix-master.d.ts.map +1 -1
- package/dist/core/runtime/kortix-master.js +53 -87
- package/dist/core/runtime/kortix-master.js.map +1 -1
- package/dist/core/runtime/pty.d.ts.map +1 -1
- package/dist/core/runtime/pty.js +13 -43
- package/dist/core/runtime/pty.js.map +1 -1
- package/dist/core/runtime/sandbox-request.d.ts +22 -0
- package/dist/core/runtime/sandbox-request.d.ts.map +1 -0
- package/dist/core/runtime/sandbox-request.js +69 -0
- package/dist/core/runtime/sandbox-request.js.map +1 -0
- package/dist/core/runtime/triggers.d.ts.map +1 -1
- package/dist/core/runtime/triggers.js +2 -16
- package/dist/core/runtime/triggers.js.map +1 -1
- package/dist/core/session/control-stream.js +1 -1
- package/dist/core/session/control-stream.js.map +1 -1
- package/dist/core/session/presentation.d.ts.map +1 -1
- package/dist/core/session/presentation.js +2 -7
- package/dist/core/session/presentation.js.map +1 -1
- package/dist/core/session/project-session-read.d.ts +2 -2
- package/dist/core/session/project-session-read.d.ts.map +1 -1
- package/dist/core/session/project-session-read.js +2 -2
- package/dist/core/session/project-session-read.js.map +1 -1
- package/dist/core/session/runtime-sessions.d.ts +3 -1
- package/dist/core/session/runtime-sessions.d.ts.map +1 -1
- package/dist/core/session/runtime-sessions.js +3 -1
- package/dist/core/session/runtime-sessions.js.map +1 -1
- package/dist/core/session/runtime-workflows.js +2 -2
- package/dist/core/session/runtime-workflows.js.map +1 -1
- package/dist/core/session-log/source.d.ts +2 -4
- package/dist/core/session-log/source.d.ts.map +1 -1
- package/dist/core/session-log/source.js +2 -7
- package/dist/core/session-log/source.js.map +1 -1
- package/dist/core/session-sync/saved-transcript.js +1 -1
- package/dist/core/session-sync/saved-transcript.js.map +1 -1
- package/dist/core/turns/errors.d.ts.map +1 -1
- package/dist/core/turns/errors.js +1 -10
- package/dist/core/turns/errors.js.map +1 -1
- package/dist/core/turns/text-scan.d.ts +8 -0
- package/dist/core/turns/text-scan.d.ts.map +1 -1
- package/dist/core/turns/text-scan.js +28 -2
- package/dist/core/turns/text-scan.js.map +1 -1
- package/dist/core/turns/tools/kortix-tool-card.d.ts +0 -8
- package/dist/core/turns/tools/kortix-tool-card.d.ts.map +1 -1
- package/dist/core/turns/tools/kortix-tool-card.js +40 -5
- package/dist/core/turns/tools/kortix-tool-card.js.map +1 -1
- package/dist/core/turns/tools/tool-outcome.d.ts.map +1 -1
- package/dist/core/turns/tools/tool-outcome.js +1 -14
- package/dist/core/turns/tools/tool-outcome.js.map +1 -1
- package/dist/core/turns/tools/tool-output-format.d.ts.map +1 -1
- package/dist/core/turns/tools/tool-output-format.js +1 -9
- package/dist/core/turns/tools/tool-output-format.js.map +1 -1
- package/dist/core/turns/tools/workflow-run.d.ts.map +1 -1
- package/dist/core/turns/tools/workflow-run.js +10 -19
- package/dist/core/turns/tools/workflow-run.js.map +1 -1
- package/dist/core/turns/view-model.d.ts.map +1 -1
- package/dist/core/turns/view-model.js +2 -3
- package/dist/core/turns/view-model.js.map +1 -1
- package/dist/core/wire-values.d.ts +8 -5
- package/dist/core/wire-values.d.ts.map +1 -1
- package/dist/core/wire-values.js +8 -5
- package/dist/core/wire-values.js.map +1 -1
- package/dist/index.d.ts +5 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/dist/kortix.esm.min.js +55 -54
- package/dist/kortix.global.js +55 -54
- package/dist/node/app-guard.d.ts.map +1 -1
- package/dist/node/app-guard.js +2 -1
- package/dist/node/app-guard.js.map +1 -1
- package/dist/node/auth.d.ts.map +1 -1
- package/dist/node/auth.js +4 -2
- package/dist/node/auth.js.map +1 -1
- package/dist/react/index.d.ts +10 -9
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +13 -9
- package/dist/react/index.js.map +1 -1
- package/dist/react/invalidate-project.d.ts +16 -4
- package/dist/react/invalidate-project.d.ts.map +1 -1
- package/dist/react/invalidate-project.js +14 -4
- package/dist/react/invalidate-project.js.map +1 -1
- package/dist/react/prefetch-session-start.js +2 -2
- package/dist/react/prefetch-session-start.js.map +1 -1
- package/dist/react/provider-refresh.d.ts +6 -2
- package/dist/react/provider-refresh.d.ts.map +1 -1
- package/dist/react/provider-refresh.js +8 -4
- package/dist/react/provider-refresh.js.map +1 -1
- package/dist/react/query-keys.d.ts +19 -15
- package/dist/react/query-keys.d.ts.map +1 -1
- package/dist/react/query-keys.js +13 -5
- package/dist/react/query-keys.js.map +1 -1
- package/dist/react/route-project.d.ts +6 -2
- package/dist/react/route-project.d.ts.map +1 -1
- package/dist/react/route-project.js +6 -2
- package/dist/react/route-project.js.map +1 -1
- package/dist/react/runtime-actions.d.ts +6 -2
- package/dist/react/runtime-actions.d.ts.map +1 -1
- package/dist/react/runtime-actions.js +7 -3
- package/dist/react/runtime-actions.js.map +1 -1
- package/dist/react/runtime-hooks.d.ts +5 -5
- package/dist/react/runtime-hooks.d.ts.map +1 -1
- package/dist/react/runtime-hooks.js +4 -4
- package/dist/react/runtime-hooks.js.map +1 -1
- package/dist/react/session-cache-write.d.ts +18 -5
- package/dist/react/session-cache-write.d.ts.map +1 -1
- package/dist/react/session-cache-write.js +16 -6
- package/dist/react/session-cache-write.js.map +1 -1
- package/dist/react/sign-in-with-kortix.d.ts +2 -2
- package/dist/react/use-accounts.d.ts +13 -1
- package/dist/react/use-accounts.d.ts.map +1 -1
- package/dist/react/use-accounts.js +9 -3
- package/dist/react/use-accounts.js.map +1 -1
- package/dist/react/use-admin-accounts.d.ts +6 -1
- package/dist/react/use-admin-accounts.d.ts.map +1 -1
- package/dist/react/use-admin-accounts.js +3 -1
- package/dist/react/use-admin-accounts.js.map +1 -1
- package/dist/react/use-admin-projects.d.ts +26 -3
- package/dist/react/use-admin-projects.d.ts.map +1 -1
- package/dist/react/use-admin-projects.js +3 -1
- package/dist/react/use-admin-projects.js.map +1 -1
- package/dist/react/use-artifacts.d.ts +2 -492
- package/dist/react/use-artifacts.d.ts.map +1 -1
- package/dist/react/use-artifacts.js +3 -390
- package/dist/react/use-artifacts.js.map +1 -1
- package/dist/react/use-canonical-runtime-session.js +2 -2
- package/dist/react/use-canonical-runtime-session.js.map +1 -1
- package/dist/react/use-feature-flag.d.ts +26 -1
- package/dist/react/use-feature-flag.d.ts.map +1 -1
- package/dist/react/use-feature-flag.js +48 -2
- package/dist/react/use-feature-flag.js.map +1 -1
- package/dist/react/use-gateway-catalog-sync.js +4 -4
- package/dist/react/use-gateway-catalog-sync.js.map +1 -1
- package/dist/react/use-goals.d.ts +25 -7
- package/dist/react/use-goals.d.ts.map +1 -1
- package/dist/react/use-goals.js +31 -19
- package/dist/react/use-goals.js.map +1 -1
- package/dist/react/use-model-access.js +3 -3
- package/dist/react/use-model-access.js.map +1 -1
- package/dist/react/use-model-enablement.js +4 -4
- package/dist/react/use-model-enablement.js.map +1 -1
- package/dist/react/use-model-store.d.ts +7 -0
- package/dist/react/use-model-store.d.ts.map +1 -1
- package/dist/react/use-model-store.js +48 -46
- package/dist/react/use-model-store.js.map +1 -1
- package/dist/react/use-multi-agent.js +2 -2
- package/dist/react/use-multi-agent.js.map +1 -1
- package/dist/react/use-now.d.ts +7 -0
- package/dist/react/use-now.d.ts.map +1 -0
- package/dist/react/use-now.js +18 -0
- package/dist/react/use-now.js.map +1 -0
- package/dist/react/use-project-apps.d.ts +5 -1
- package/dist/react/use-project-apps.d.ts.map +1 -1
- package/dist/react/use-project-apps.js +38 -55
- package/dist/react/use-project-apps.js.map +1 -1
- package/dist/react/use-project-config.d.ts +3 -1
- package/dist/react/use-project-config.d.ts.map +1 -1
- package/dist/react/use-project-config.js +5 -3
- package/dist/react/use-project-config.js.map +1 -1
- package/dist/react/use-project-files.d.ts +9 -3
- package/dist/react/use-project-files.d.ts.map +1 -1
- package/dist/react/use-project-files.js +12 -6
- package/dist/react/use-project-files.js.map +1 -1
- package/dist/react/use-project-memory.d.ts +24 -8
- package/dist/react/use-project-memory.d.ts.map +1 -1
- package/dist/react/use-project-memory.js +33 -17
- package/dist/react/use-project-memory.js.map +1 -1
- package/dist/react/use-project-models.d.ts +6 -2
- package/dist/react/use-project-models.d.ts.map +1 -1
- package/dist/react/use-project-models.js +9 -5
- package/dist/react/use-project-models.js.map +1 -1
- package/dist/react/use-project-name.d.ts +9 -3
- package/dist/react/use-project-name.d.ts.map +1 -1
- package/dist/react/use-project-name.js +9 -3
- package/dist/react/use-project-name.js.map +1 -1
- package/dist/react/use-project-search.d.ts +3 -1
- package/dist/react/use-project-search.d.ts.map +1 -1
- package/dist/react/use-project-search.js +5 -3
- package/dist/react/use-project-search.js.map +1 -1
- package/dist/react/use-project-secrets.d.ts +12 -8
- package/dist/react/use-project-secrets.d.ts.map +1 -1
- package/dist/react/use-project-secrets.js +13 -9
- package/dist/react/use-project-secrets.js.map +1 -1
- package/dist/react/use-project-session.d.ts +3 -1
- package/dist/react/use-project-session.d.ts.map +1 -1
- package/dist/react/use-project-session.js +5 -3
- package/dist/react/use-project-session.js.map +1 -1
- package/dist/react/use-project-sessions.d.ts +12 -3
- package/dist/react/use-project-sessions.d.ts.map +1 -1
- package/dist/react/use-project-sessions.js +17 -11
- package/dist/react/use-project-sessions.js.map +1 -1
- package/dist/react/use-project-spaces.d.ts +54 -18
- package/dist/react/use-project-spaces.d.ts.map +1 -1
- package/dist/react/use-project-spaces.js +73 -37
- package/dist/react/use-project-spaces.js.map +1 -1
- package/dist/react/use-project-triggers.d.ts +27 -11
- package/dist/react/use-project-triggers.d.ts.map +1 -1
- package/dist/react/use-project-triggers.js +40 -24
- package/dist/react/use-project-triggers.js.map +1 -1
- package/dist/react/use-reminders.d.ts +3 -1
- package/dist/react/use-reminders.d.ts.map +1 -1
- package/dist/react/use-reminders.js +5 -3
- package/dist/react/use-reminders.js.map +1 -1
- package/dist/react/use-runtime-events/connect-stream.d.ts +63 -0
- package/dist/react/use-runtime-events/connect-stream.d.ts.map +1 -0
- package/dist/react/use-runtime-events/connect-stream.js +178 -0
- package/dist/react/use-runtime-events/connect-stream.js.map +1 -0
- package/dist/react/use-runtime-events/helpers.js +4 -4
- package/dist/react/use-runtime-events/helpers.js.map +1 -1
- package/dist/react/use-runtime-events/index.d.ts +3 -16
- package/dist/react/use-runtime-events/index.d.ts.map +1 -1
- package/dist/react/use-runtime-events/index.js +84 -201
- package/dist/react/use-runtime-events/index.js.map +1 -1
- package/dist/react/use-runtime-events/lsp-diagnostics.d.ts +15 -0
- package/dist/react/use-runtime-events/lsp-diagnostics.d.ts.map +1 -0
- package/dist/react/use-runtime-events/lsp-diagnostics.js +98 -0
- package/dist/react/use-runtime-events/lsp-diagnostics.js.map +1 -0
- package/dist/react/use-runtime-events/use-event-stream-refs.d.ts +2 -3
- package/dist/react/use-runtime-events/use-event-stream-refs.d.ts.map +1 -1
- package/dist/react/use-runtime-events/use-event-stream-refs.js +8 -89
- package/dist/react/use-runtime-events/use-event-stream-refs.js.map +1 -1
- package/dist/react/use-runtime-local.js +2 -2
- package/dist/react/use-runtime-local.js.map +1 -1
- package/dist/react/use-runtime-sessions/agents.js +2 -2
- package/dist/react/use-runtime-sessions/agents.js.map +1 -1
- package/dist/react/use-runtime-sessions/messages.js +1 -1
- package/dist/react/use-runtime-sessions/messages.js.map +1 -1
- package/dist/react/use-runtime-sessions/projects.d.ts +3 -1
- package/dist/react/use-runtime-sessions/projects.d.ts.map +1 -1
- package/dist/react/use-runtime-sessions/projects.js +5 -3
- package/dist/react/use-runtime-sessions/projects.js.map +1 -1
- package/dist/react/use-runtime-sessions/providers.js +4 -4
- package/dist/react/use-runtime-sessions/providers.js.map +1 -1
- package/dist/react/use-session-groups.d.ts +18 -6
- package/dist/react/use-session-groups.d.ts.map +1 -1
- package/dist/react/use-session-groups.js +30 -18
- package/dist/react/use-session-groups.js.map +1 -1
- package/dist/react/use-session-list-state.js +2 -2
- package/dist/react/use-session-list-state.js.map +1 -1
- package/dist/react/use-session-model-selection.js +2 -2
- package/dist/react/use-session-model-selection.js.map +1 -1
- package/dist/react/use-session-stream.d.ts +9 -3
- package/dist/react/use-session-stream.d.ts.map +1 -1
- package/dist/react/use-session-stream.js +29 -39
- package/dist/react/use-session-stream.js.map +1 -1
- package/dist/react/use-session.d.ts +4 -4
- package/dist/react/use-session.d.ts.map +1 -1
- package/dist/react/use-session.js +10 -9
- package/dist/react/use-session.js.map +1 -1
- package/dist/react/use-sessions-needing-input.d.ts +3 -1
- package/dist/react/use-sessions-needing-input.d.ts.map +1 -1
- package/dist/react/use-sessions-needing-input.js +4 -2
- package/dist/react/use-sessions-needing-input.js.map +1 -1
- package/dist/react/use-teams-installations.js +5 -5
- package/dist/react/use-teams-installations.js.map +1 -1
- package/dist/react/use-tunnel.d.ts +3 -1
- package/dist/react/use-tunnel.d.ts.map +1 -1
- package/dist/react/use-tunnel.js +5 -3
- package/dist/react/use-tunnel.js.map +1 -1
- package/dist/react/use-workspaces.d.ts +84 -0
- package/dist/react/use-workspaces.d.ts.map +1 -0
- package/dist/react/use-workspaces.js +88 -0
- package/dist/react/use-workspaces.js.map +1 -0
- package/package.json +6 -2
- package/dist/core/artifact-doc/base64.d.ts +0 -17
- package/dist/core/artifact-doc/base64.d.ts.map +0 -1
- package/dist/core/artifact-doc/base64.js +0 -69
- package/dist/core/artifact-doc/base64.js.map +0 -1
- package/dist/core/artifact-doc/index.d.ts +0 -7
- package/dist/core/artifact-doc/index.d.ts.map +0 -1
- package/dist/core/artifact-doc/index.js +0 -7
- package/dist/core/artifact-doc/index.js.map +0 -1
- package/dist/core/artifact-doc/sync.d.ts +0 -178
- package/dist/core/artifact-doc/sync.d.ts.map +0 -1
- package/dist/core/artifact-doc/sync.js +0 -838
- package/dist/core/artifact-doc/sync.js.map +0 -1
- package/dist/core/artifact-live/connection.d.ts +0 -116
- package/dist/core/artifact-live/connection.d.ts.map +0 -1
- package/dist/core/artifact-live/connection.js +0 -433
- package/dist/core/artifact-live/connection.js.map +0 -1
- package/dist/core/artifact-live/index.d.ts +0 -8
- package/dist/core/artifact-live/index.d.ts.map +0 -1
- package/dist/core/artifact-live/index.js +0 -7
- package/dist/core/artifact-live/index.js.map +0 -1
- package/dist/core/artifact-live/protocol.d.ts +0 -167
- package/dist/core/artifact-live/protocol.d.ts.map +0 -1
- package/dist/core/artifact-live/protocol.js +0 -153
- package/dist/core/artifact-live/protocol.js.map +0 -1
- package/dist/core/client/project-artifacts.d.ts +0 -74
- package/dist/core/client/project-artifacts.d.ts.map +0 -1
- package/dist/core/client/project-artifacts.js +0 -38
- package/dist/core/client/project-artifacts.js.map +0 -1
- package/dist/core/rest/projects-client/artifact-doc.d.ts +0 -118
- package/dist/core/rest/projects-client/artifact-doc.d.ts.map +0 -1
- package/dist/core/rest/projects-client/artifact-doc.js +0 -122
- package/dist/core/rest/projects-client/artifact-doc.js.map +0 -1
- package/dist/core/rest/projects-client/artifact-live.d.ts +0 -22
- package/dist/core/rest/projects-client/artifact-live.d.ts.map +0 -1
- package/dist/core/rest/projects-client/artifact-live.js +0 -25
- package/dist/core/rest/projects-client/artifact-live.js.map +0 -1
- package/dist/core/rest/projects-client/iam-query.d.ts +0 -3
- package/dist/core/rest/projects-client/iam-query.d.ts.map +0 -1
- package/dist/core/rest/projects-client/iam-query.js +0 -11
- package/dist/core/rest/projects-client/iam-query.js.map +0 -1
- package/dist/react/use-artifact-live.d.ts +0 -41
- package/dist/react/use-artifact-live.d.ts.map +0 -1
- package/dist/react/use-artifact-live.js +0 -114
- package/dist/react/use-artifact-live.js.map +0 -1
- package/dist/react/use-runtime-events/rehydrate-targets.d.ts +0 -18
- package/dist/react/use-runtime-events/rehydrate-targets.d.ts.map +0 -1
- package/dist/react/use-runtime-events/rehydrate-targets.js +0 -20
- package/dist/react/use-runtime-events/rehydrate-targets.js.map +0 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ const kortix = createKortix({
|
|
|
31
31
|
backendUrl: "https://api.kortix.com/v1",
|
|
32
32
|
getToken,
|
|
33
33
|
});
|
|
34
|
-
await kortix.
|
|
34
|
+
await kortix.workspaces.list();
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### Call external systems through Connectors
|
|
@@ -286,7 +286,7 @@ no build step required:
|
|
|
286
286
|
## Entry points
|
|
287
287
|
|
|
288
288
|
`@kortix/sdk` is the canonical entry — everything framework-free lives there.
|
|
289
|
-
|
|
289
|
+
Nine others are stable, each for a reason that fits in one sentence:
|
|
290
290
|
|
|
291
291
|
| Entry | Why it is separate |
|
|
292
292
|
| ------------------------------- | ---------------------------------------------------------- |
|
|
@@ -296,6 +296,7 @@ Eight others are stable, each for a reason that fits in one sentence:
|
|
|
296
296
|
| `@kortix/sdk/genui` | needs the optional peers `zod` and `@openuidev/lang-core` |
|
|
297
297
|
| `@kortix/sdk/genui/react` | React and the Generative UI peers |
|
|
298
298
|
| `@kortix/sdk/wire-message-id` | the message-id mint alone, one file with no imports (also at root) |
|
|
299
|
+
| `@kortix/sdk/wire-values` | the session wire value sets alone, one file with no imports (also at root) |
|
|
299
300
|
| `@kortix/sdk/workspace-search` | the workspace search client; the root does not export it |
|
|
300
301
|
| `@kortix/sdk/capture-rules` | the Kortix Capture constants alone |
|
|
301
302
|
| `@kortix/sdk/internal/*` | unsupported, outside semver |
|
|
@@ -328,9 +329,9 @@ const kortix = createKortix({
|
|
|
328
329
|
.then((s) => s.data.session?.access_token ?? null),
|
|
329
330
|
});
|
|
330
331
|
|
|
331
|
-
//
|
|
332
|
-
const
|
|
333
|
-
const detail = await kortix.
|
|
332
|
+
// Workspaces (a workspace id is the project id: `kortix.project(pid)` still works)
|
|
333
|
+
const workspaces = await kortix.workspaces.list();
|
|
334
|
+
const detail = await kortix.workspace(pid).detail();
|
|
334
335
|
await kortix.project(pid).secrets.upsert({
|
|
335
336
|
name: "LOCAL_TOOL_TOKEN",
|
|
336
337
|
value,
|
|
@@ -362,7 +363,7 @@ const projectInventory = await kortix
|
|
|
362
363
|
const mine = await kortix.project(pid).sessions.list({ parent: "root", startedBy: "me" });
|
|
363
364
|
const found = await kortix.project(pid).sessions.list({ parent: "root", q: "nightly" }); // searches every visible session
|
|
364
365
|
const spawned = await kortix.project(pid).sessions.list({ parent: mine[0].session_id });
|
|
365
|
-
// React:
|
|
366
|
+
// React: useWorkspaceSessions(pid, { parent: "root", startedBy: "me" }), useSessionChildren(pid, parentId)
|
|
366
367
|
|
|
367
368
|
// Sessions (id-bound handle)
|
|
368
369
|
const s = kortix.session(pid, sid);
|
|
@@ -453,7 +454,7 @@ Every session carries `labels: string[]` and a free-form `metadata` object. Set
|
|
|
453
454
|
at `project.sessions.create({ labels, metadata })`. `session.update({ labels })`
|
|
454
455
|
replaces the labels; `session.update({ metadata })` merges keys, and a `null` value
|
|
455
456
|
removes a key. `project.sessions.listPage({ labels })` returns only sessions that carry
|
|
456
|
-
every given label, and `
|
|
457
|
+
every given label, and `useWorkspaceSessions(projectId, { labels })` does the same in
|
|
457
458
|
React. Each label is 1–64 characters, at most 20 per session; one metadata write is at
|
|
458
459
|
most 16,384 characters of JSON. Example: `examples/12-session-labels.ts`.
|
|
459
460
|
|
|
@@ -554,7 +555,7 @@ await s.workflows.control(runId, { action: 'pause' }) // 'resume' | 'stop' | 're
|
|
|
554
555
|
approves it), `refused`, or `dropped` (a duplicate). A `to` that names several sessions is a
|
|
555
556
|
`409` with the candidates. A session row carries `board_state` (`working`, `needs_input`,
|
|
556
557
|
`idle`, `completed`, `failed`, `stopped`), `attention`, `last_activity_at`, `result_excerpt`,
|
|
557
|
-
`agent_handle`, `team_lead_session_id` and `inbound`; `
|
|
558
|
+
`agent_handle`, `team_lead_session_id` and `inbound`; `listWorkspaceSessionsPage(projectId,
|
|
558
559
|
{ teamLead })` lists a lead's teammates. In React: `useReachableAgents(pid, sid, scope?)`,
|
|
559
560
|
`usePeerMessages(pid, sid, direction?)` (with `approve` and `deny`), `useTeamTasks(pid, lead)`,
|
|
560
561
|
`useTeammates(pid, lead)` and `useSessionWorkflows(pid, sid)` (with `control`). Each polls
|
|
@@ -662,19 +663,19 @@ sessions, limits and verification; the goal's Drive folder holds the brief
|
|
|
662
663
|
`GOAL.md` change nothing.
|
|
663
664
|
|
|
664
665
|
```ts
|
|
665
|
-
import {
|
|
666
|
+
import { createWorkspaceGoal, listWorkspaceGoals, pauseWorkspaceGoal, WorkspaceGoalConflictError } from '@kortix/sdk';
|
|
666
667
|
|
|
667
668
|
// goalId is the idempotency key: retry with the same id, get the same goal.
|
|
668
|
-
const { goal } = await
|
|
669
|
+
const { goal } = await createWorkspaceGoal(projectId, { outcome: 'EU billing live', goalId });
|
|
669
670
|
|
|
670
|
-
const [first] = await
|
|
671
|
+
const [first] = await listWorkspaceGoals(projectId);
|
|
671
672
|
if (first?.capabilities.pause) {
|
|
672
673
|
try {
|
|
673
|
-
const { projectGoal } = await
|
|
674
|
+
const { projectGoal } = await pauseWorkspaceGoal(projectId, first, 'Paused from my app.');
|
|
674
675
|
console.log(projectGoal.revision); // the new revision
|
|
675
676
|
} catch (error) {
|
|
676
677
|
// Someone changed the goal first: error.goal is the goal as it is now.
|
|
677
|
-
if (error instanceof
|
|
678
|
+
if (error instanceof WorkspaceGoalConflictError) console.log(error.goal.record.state);
|
|
678
679
|
else throw error;
|
|
679
680
|
}
|
|
680
681
|
}
|
|
@@ -686,289 +687,13 @@ if (first?.capabilities.pause) {
|
|
|
686
687
|
`criteria[].reported_met` is the agent's claim.
|
|
687
688
|
- `blockedReason` says why a goal cannot go on (`credits`, `wake_cap`,
|
|
688
689
|
`session_cap`, `owner_lost`, `storage`, `flag_off`, `setup`).
|
|
689
|
-
- `
|
|
690
|
+
- `replyToWorkspaceGoal(projectId, goal, text, { answerId })` answers as the
|
|
690
691
|
caller; one answer per `answerId`.
|
|
691
|
-
- React: `
|
|
692
|
-
`
|
|
692
|
+
- React: `useWorkspaceGoals`, `useWorkspaceGoal`, `useWorkspaceGoalEvents`,
|
|
693
|
+
`useWorkspaceGoalFiles`, `useSessionGoal`, and `useWorkspaceGoalControl` (one
|
|
693
694
|
request per double submit, the cache updated on success and on a `409`).
|
|
694
|
-
- Deprecated: `
|
|
695
|
-
`
|
|
696
|
-
|
|
697
|
-
## Artifact comments and activity
|
|
698
|
-
|
|
699
|
-
Projects enable `artifacts` and `artifact_comments` before using comments.
|
|
700
|
-
`artifact_comments` defaults off. Agent tokens need `project.artifact.comment`.
|
|
701
|
-
Every comment identifies its author as a user or a session.
|
|
702
|
-
|
|
703
|
-
```ts
|
|
704
|
-
const artifact = kortix.project(projectId).artifacts;
|
|
705
|
-
const thread = await artifact.comments.create(artifactId, {
|
|
706
|
-
anchor: { type: 'none', version: entryVersion },
|
|
707
|
-
body: 'Confirm the forecast.',
|
|
708
|
-
});
|
|
709
|
-
await artifact.comments.reply(artifactId, thread.thread_id, { body: 'Confirmed.' });
|
|
710
|
-
const handoff = await artifact.comments.send(artifactId, {
|
|
711
|
-
thread_ids: [thread.thread_id],
|
|
712
|
-
batch_id: crypto.randomUUID(),
|
|
713
|
-
agent: 'reviewer',
|
|
714
|
-
});
|
|
715
|
-
await artifact.comments.setStatus(artifactId, thread.thread_id, 'resolved');
|
|
716
|
-
const threads = await artifact.comments.list(artifactId, { status: 'all' });
|
|
717
|
-
const activity = await artifact.activity(artifactId, { limit: 50 });
|
|
718
|
-
```
|
|
719
|
-
|
|
720
|
-
Text anchors carry `version`, `quote`, `prefix`, and `suffix`.
|
|
721
|
-
`quote` accepts up to 500 UTF-16 code units, and `prefix` and `suffix` up to 32 each. Point and region anchors carry a CSS selector,
|
|
722
|
-
element-relative fractions, viewport width, and scroll position.
|
|
723
|
-
|
|
724
|
-
The root exports `listArtifactComments`, `createArtifactComment`,
|
|
725
|
-
`replyArtifactComment`, `setArtifactCommentStatus`, `editArtifactComment`,
|
|
726
|
-
`deleteArtifactComment`, and `listArtifactActivity`. The write functions return
|
|
727
|
-
the thread or comment. `getArtifactCommentThread(projectId, threadId)` resolves
|
|
728
|
-
a bare thread id with the same visibility checks. Activity returns
|
|
729
|
-
`{ items, next_cursor, older_versions }`; pass `next_cursor` as `cursor` to
|
|
730
|
-
read the next page. Unknown historical save authors remain `System`.
|
|
731
|
-
|
|
732
|
-
Comments and replies also accept optional `marks` and `screenshot_base64`. Marks are normalized pen, arrow, or rectangle geometry relative to a region anchor. PNG and WebP screenshots are limited to 2 MiB decoded. `parseArtifactCommentMarks` validates the published `marks: unknown[]` response without changing that existing type. Invalid stored marks return `null`; an empty array is valid.
|
|
733
|
-
|
|
734
|
-
`readArtifactCommentScreenshot(projectId, artifactId, commentId, { signal? })` returns a `Blob` through the authenticated API. The project facade exposes `project.artifacts.comments.readScreenshot(artifactId, commentId)`. Every read checks Artifact visibility. A missing, deleted, or inaccessible screenshot answers `404`. The optional `screenshot_url` response field is a protected relative API path, not a public image URL. `useArtifactCommentScreenshot(projectId, artifactId, commentId)` reads the same authenticated blob for a mounted thumbnail, without retaining it after unmount. A browser host creates an object URL from the returned blob and revokes it when the image leaves the screen. Editing comment text does not change its marks or screenshot. A failed page capture can still save the marks and anchor without a screenshot.
|
|
735
|
-
|
|
736
|
-
Send attaches screenshot bytes only when the target model supports images. Image batches allow at most 20 files, 100 MiB of decoded attachments, and 12 MiB of serialized image parts. A refused batch returns `413` with code `artifact_comment_screenshot_limit`. `ApiError.details.limits` retains the API fields `max_files`, `max_total_bytes`, `max_screenshot_bytes`, and optional `max_parts_bytes`. Text-only targets receive the protected screenshot references in the comment context.
|
|
737
|
-
|
|
738
|
-
`sendArtifactComments` sends selected threads to an agent. Reuse `batch_id`
|
|
739
|
-
when retrying the same handoff. An omitted id is generated once by the SDK.
|
|
740
|
-
The result identifies the target session. A newly reserved session remains
|
|
741
|
-
pending until queued creation succeeds. Read the thread's `agent_state` before
|
|
742
|
-
opening it. `agent_error` distinguishes a delivery failure from the loop guard.
|
|
743
|
-
Editing a comment updates its mentions without requesting another turn; use
|
|
744
|
-
Send to agent to deliver an edited request.
|
|
745
|
-
|
|
746
|
-
`ArtifactCommentMention` identifies a person (`kind: 'user', user_id`), an
|
|
747
|
-
existing session (`kind: 'session', session_id, agent_name`), or a project agent
|
|
748
|
-
(`kind: 'agent', agent_name`). Comments return the server-resolved mentions.
|
|
749
|
-
Agent and session mentions can include their literal `token` for display without agent-run permission.
|
|
750
|
-
|
|
751
|
-
`useArtifactComments(projectId, artifactId, { status?, enabled? })` returns the
|
|
752
|
-
thread query and `create`, `reply`, `setStatus`, `edit`, `remove`, and `send` writes.
|
|
753
|
-
Writes are optimistic: `create`, `reply`, `setStatus`, `edit` and `remove`
|
|
754
|
-
change every loaded thread list at once, and a failed write undoes only its own
|
|
755
|
-
change. A thread or comment that the server has not confirmed yet carries
|
|
756
|
-
`optimistic: true`; a new one also has an `optimistic-` id, an empty author
|
|
757
|
-
(`user_id: ''`) and every `can_*` action false. Hosts render it as pending.
|
|
758
|
-
Mounted Comments and Activity queries, the `useArtifacts` list and the current
|
|
759
|
-
`useArtifact` read refetch after the last concurrent write.
|
|
760
|
-
|
|
761
|
-
`listArtifacts` and `getArtifact` return `open_thread_count` while the project
|
|
762
|
-
has `artifact_comments` on: the threads with status `open` whose first comment
|
|
763
|
-
is not deleted. The field is absent while the flag is off, and from older APIs.
|
|
764
|
-
Hosts show it on an Artifact card before the person opens it.
|
|
765
|
-
`useArtifactActivity(projectId, artifactId, { limit?, cursor?, enabled? })`
|
|
766
|
-
returns one activity page. Both hooks poll every 10 seconds while mounted and
|
|
767
|
-
visible. A missing project or Artifact id disables reads. Comment reads never
|
|
768
|
-
retry a 4xx and retry another 5xx once.
|
|
769
|
-
|
|
770
|
-
`getArtifactCommentContext(projectId, artifactId, { version?, agent? })` returns
|
|
771
|
-
the current action permissions, literal mention insertion tokens, eligible
|
|
772
|
-
`send_thread_ids` (at most 100), the total eligible `send_thread_count`, and
|
|
773
|
-
the proposed session or new-session target. When the project's agent manifest
|
|
774
|
-
cannot be read, the context still answers: `agents` is empty, `send_target` is
|
|
775
|
-
null and `agents_unavailable` is true. People keep commenting; an explicit
|
|
776
|
-
`@agent.` mention is refused until the manifest reads again. Hosts show the bounded batch
|
|
777
|
-
and total when more threads remain. A successful Send refreshes the next batch.
|
|
778
|
-
Hosts use
|
|
779
|
-
that response to label Send before it runs. They do not infer the target from
|
|
780
|
-
the Artifact creator or from `created` on a previous handoff.
|
|
781
|
-
|
|
782
|
-
`readArtifactCommentSnapshot(projectId, artifactId, { version? })` reads the
|
|
783
|
-
context's immutable Files commit and its Markdown. It returns `{ version,
|
|
784
|
-
text }`. An entry ETag is a separate value. A missing saved commit rejects
|
|
785
|
-
with `artifact_comment_snapshot_unavailable`. The project facade exposes
|
|
786
|
-
these readers as `.artifacts.comments.context` and `.snapshot`.
|
|
787
|
-
|
|
788
|
-
`listArtifactComments` and `useArtifactComments` accept `version` for a
|
|
789
|
-
historical Files commit. Returned action permissions are false for that view.
|
|
790
|
-
The historical hook also rejects writes before making an HTTP request.
|
|
791
|
-
|
|
792
|
-
`useArtifactCommentContext` shares the comments cache prefix, so every comment
|
|
793
|
-
write refreshes its count, permissions, and Send target. For a complete
|
|
794
|
-
timeline, `useInfiniteArtifactActivity(projectId, artifactId, { limit?, enabled? })`
|
|
795
|
-
owns cursor pages and exposes ordered, deduplicated `items`, `olderVersions`,
|
|
796
|
-
`fetchNextPage`, and the query status. Hosts render those items without keeping
|
|
797
|
-
a second copy of activity pages. Its mounted polling and write invalidation
|
|
798
|
-
match the one-page hook.
|
|
799
|
-
|
|
800
|
-
### Live presence
|
|
801
|
-
|
|
802
|
-
An open Artifact has one WebSocket per viewer. It carries who is here, their
|
|
803
|
-
cursor, selection, typing and open thread, and a ping when comments, activity
|
|
804
|
-
or content change. It carries no comment text and no Artifact content: those
|
|
805
|
-
stay on REST. It needs `artifacts` and `artifact_comments`.
|
|
806
|
-
|
|
807
|
-
```ts
|
|
808
|
-
// React: one hook per open Artifact.
|
|
809
|
-
const live = useArtifactLive(projectId, artifactId, {
|
|
810
|
-
enabled: artifactCommentsOn, // never connects while false
|
|
811
|
-
view: 'doc', // or 'page'
|
|
812
|
-
version: artifact.entry_version,
|
|
813
|
-
hidden: document.hidden,
|
|
814
|
-
});
|
|
815
|
-
live.status; // 'connecting' | 'live' | 'reconnecting' | 'closed' | 'access_lost'
|
|
816
|
-
live.participants; // ArtifactLiveParticipant[], this tab included (id === live.you)
|
|
817
|
-
live.setCursor({ kind: 'doc', quote: 'Churn fell', prefix: 'quarter. ', offset: 5 });
|
|
818
|
-
live.setTyping({ thread_id: threadId }, true);
|
|
819
|
-
|
|
820
|
-
// Without React (any runtime with a WebSocket, or pass `webSocket`).
|
|
821
|
-
const connection = kortix.project(projectId).artifacts.live.connect(artifactId, {
|
|
822
|
-
view: 'page',
|
|
823
|
-
onEvent: (event) => { /* status, welcome, presence, changed, resync */ },
|
|
824
|
-
});
|
|
825
|
-
connection.setFocus(threadId);
|
|
826
|
-
connection.close();
|
|
827
|
-
```
|
|
828
|
-
|
|
829
|
-
`useArtifactLive` refetches on a `changed` ping: `comments` refetches the
|
|
830
|
-
Artifact's comment reads (not screenshots; deferred while a comment write is
|
|
831
|
-
in flight), `activity` the activity reads, and `content` the current
|
|
832
|
-
Artifact, its versions and the `useArtifacts` list. After a reconnect it
|
|
833
|
-
refetches all of them once (`resync`). It closes on unmount, when `enabled`
|
|
834
|
-
turns false, or when the project or Artifact changes. A `version` change does
|
|
835
|
-
not reconnect; a `hidden` change sends one frame.
|
|
836
|
-
|
|
837
|
-
`createArtifactLiveConnection({ projectId, artifactId, view, version?, hidden?,
|
|
838
|
-
getTicket?, webSocket?, backendUrl?, onEvent? })` is the framework-free
|
|
839
|
-
client. Each attempt mints a one-use ticket (`createArtifactLiveTicket`, a
|
|
840
|
-
60 s ticket from `POST …/live/ticket`) and opens `GET …/live?ticket=` on the
|
|
841
|
-
`ws(s)://` form of `backendUrl`. It sends `hello`, pings every 25 s, and
|
|
842
|
-
replaces a socket that missed a pong or got no welcome in 20 s. It sends at
|
|
843
|
-
most 8 frames a second: each field coalesces to its newest value, so a fast
|
|
844
|
-
pointer never builds a backlog. A setter returns `false` and sends nothing for
|
|
845
|
-
a value the protocol refuses (a doc cursor quote over 64 characters, a frame
|
|
846
|
-
over 1024 UTF-8 bytes, an id that is not a UUID). Reconnects back off 1, 2,
|
|
847
|
-
4, 8, 16, 30 s (plus up to 50 % jitter, at most 30 s), with a new ticket each
|
|
848
|
-
time. Close code `4403`, or a ticket refused with `403` or `404`, ends the
|
|
849
|
-
connection with `access_lost`. Every server frame is validated; an invalid
|
|
850
|
-
frame is dropped.
|
|
851
|
-
|
|
852
|
-
`signalArtifactLiveAgent(projectId, artifactId, { status, thread_id?, quote? })`
|
|
853
|
-
names an agent session's place: `reading`, `editing` or `writing` a thread or
|
|
854
|
-
near a quote, or `idle` to leave. Only a session-bound token may call it; a
|
|
855
|
-
person's token answers `403`. The CLI form is `kortix artifacts focus`.
|
|
856
|
-
|
|
857
|
-
### Co-editing a doc
|
|
858
|
-
|
|
859
|
-
Several people and agents edit one doc Artifact (`type = 'doc'`) at the same
|
|
860
|
-
time over Yjs. It needs `artifacts` and `artifact_comments`. Updates travel
|
|
861
|
-
over REST, not the live socket: a tab POSTs its updates, the server stores
|
|
862
|
-
each under a per-Artifact `seq` and pings the socket with `changed doc`, and
|
|
863
|
-
every tab GETs the updates after its last seq. One tab holds a 15 s lease and
|
|
864
|
-
writes the Markdown file with the save route; the file stays the truth for
|
|
865
|
-
agents, versions and readers. The Yjs state is disposable: every seed starts a
|
|
866
|
-
new `epoch`, and a reset or the GC of an idle doc deletes it. The next open
|
|
867
|
-
seeds it again from the file.
|
|
868
|
-
|
|
869
|
-
The SDK has no yjs dependency. `createArtifactDocSync` works on bytes; the host
|
|
870
|
-
owns the `Y.Doc`:
|
|
871
|
-
|
|
872
|
-
```ts
|
|
873
|
-
import * as Y from 'yjs';
|
|
874
|
-
import { createArtifactDocSync } from '@kortix/sdk';
|
|
875
|
-
|
|
876
|
-
const remote = Symbol('remote');
|
|
877
|
-
let doc = new Y.Doc();
|
|
878
|
-
let known: string | null = null; // the last flushed Markdown this tab knew
|
|
879
|
-
const bind = () => doc.on('update', (update, origin) => { if (origin !== remote) sync.push(update); });
|
|
880
|
-
// The seed is ALWAYS built from the current file, in a scratch Y.Doc.
|
|
881
|
-
const fromFile = async () => {
|
|
882
|
-
const file = await readFile();
|
|
883
|
-
return { update: seedFromMarkdown(file.text), markdown: file.text, version: file.entry_version };
|
|
884
|
-
};
|
|
885
|
-
|
|
886
|
-
const sync = createArtifactDocSync({
|
|
887
|
-
projectId, artifactId,
|
|
888
|
-
holder: crypto.randomUUID(), // this tab's lease id
|
|
889
|
-
apply: (update) => Y.applyUpdate(doc, update, remote), // always the current doc
|
|
890
|
-
merge: (updates) => Y.mergeUpdates(updates),
|
|
891
|
-
onLeader: (leader) => { /* the leader writes the file 2 s after the last edit */ },
|
|
892
|
-
onStatus: (status) => { /* 'failed': fall back to single-writer autosave */ },
|
|
893
|
-
onReset: async ({ reason }) => {
|
|
894
|
-
const mine = editorMarkdown(); // the person's text
|
|
895
|
-
const before = known; // the last flushed Markdown this tab knew
|
|
896
|
-
doc.destroy();
|
|
897
|
-
doc = new Y.Doc(); // never reuse the old doc
|
|
898
|
-
bind();
|
|
899
|
-
known = (await sync.start(fromFile)).base?.markdown ?? known;
|
|
900
|
-
if (canWrite && before !== null && mine !== before) applyOutsideEdit(editor, before, mine);
|
|
901
|
-
},
|
|
902
|
-
});
|
|
903
|
-
bind();
|
|
904
|
-
const { created, base } = await sync.start(fromFile);
|
|
905
|
-
known = base?.markdown ?? null; // update it after each flush and base()
|
|
906
|
-
|
|
907
|
-
useArtifactLive(projectId, artifactId, { view: 'doc', onDoc: (seq) => sync.notify(seq) });
|
|
908
|
-
|
|
909
|
-
// The leader serializes the doc, captures covered at that moment, saves the file, then:
|
|
910
|
-
const seq = sync.covered;
|
|
911
|
-
const saved = await save(serialize(doc));
|
|
912
|
-
await sync.flushed({ version: saved.entry_version, markdown: saved.text, seq });
|
|
913
|
-
sync.close(); // on unmount: sends what is unsent, releases the lease
|
|
914
|
-
```
|
|
915
|
-
|
|
916
|
-
- `start(buildSeed)` reads every stored update (`after=0&base=true`) and applies
|
|
917
|
-
it. An unseeded doc is seeded with `buildSeed()`: build that update from the
|
|
918
|
-
current Markdown file, in a scratch `Y.Doc`, never from live state. The
|
|
919
|
-
engine applies the seed only once the server accepts it: on `409 doc_seeded`
|
|
920
|
-
another tab won, and its doc is pulled instead. `start` runs once, and again
|
|
921
|
-
only after `onReset`; `buildSeed` then gets `restart: true`, and the seed
|
|
922
|
-
still comes from the file.
|
|
923
|
-
- **Reset.** Every push, lease call and flush names the `epoch` the tab
|
|
924
|
-
loaded. A pull that finds the doc unseeded or under another `epoch`, or a
|
|
925
|
-
push, lease renewal or flush answered `409 doc_not_seeded` or `409
|
|
926
|
-
epoch_mismatch`, means the doc this tab loaded is gone. An epoch is adopted
|
|
927
|
-
only when `start` saw none (a doc seeded before epochs); any other change is
|
|
928
|
-
a reset. The engine stops, drops its unacknowledged pushes, rejects
|
|
929
|
-
waiting `flushed` and `base` calls with code `doc_reset`, calls
|
|
930
|
-
`onLeader(false)`, sets the status `reset`, and calls `onReset({ reason })`
|
|
931
|
-
once (`'not_seeded'`, `'epoch'` or `'poisoned'`). The host keeps its editor's
|
|
932
|
-
Markdown (`mine`) and the last flushed Markdown it knew, builds a fresh
|
|
933
|
-
`Y.Doc`, calls `start` again, and then merges `mine` into the new doc. The
|
|
934
|
-
person's unsynced edits survive through that text merge, not through Yjs. A
|
|
935
|
-
read-only viewer rebuilds and merges nothing. The reset ping
|
|
936
|
-
(`changed doc`, version `'0'`) and any ping below the highest seq here
|
|
937
|
-
(seqs restart at 1 after a re-seed), except this tab's own echoes, pull at
|
|
938
|
-
once, so a reset is seen within one round trip.
|
|
939
|
-
- **Poison.** When `apply` throws for a stored update, the engine stops
|
|
940
|
-
applying, sets `retrying`, and resets the doc on the server
|
|
941
|
-
(`resetArtifactDoc`). When another tab holds the lease (`409 not_leader`),
|
|
942
|
-
it checks every 3 s until that tab has reset it. Then it reports
|
|
943
|
-
`onReset({ reason: 'poisoned' })`.
|
|
944
|
-
- `push(update)` batches for 50 ms, merges the batch with `merge`, and keeps
|
|
945
|
-
one push in flight, in order. A failed push retries after 1, 2, 4, 8, 16,
|
|
946
|
-
30 s (plus up to 50 % jitter, at most 30 s) with the later updates merged
|
|
947
|
-
behind it; no update is dropped while the doc lives. A merged batch over
|
|
948
|
-
512 KiB is split. A refusal (`400`, `403`, `404`, one update over 512 KiB,
|
|
949
|
-
`413 doc_too_large` when the doc's stored updates pass their limit) calls
|
|
950
|
-
`onError` and sets `failed`, a final status: the host falls back to autosave.
|
|
951
|
-
- `notify(seq)` pulls when that seq is not here yet. Pulls are serial. Without
|
|
952
|
-
a notify for 3 s the engine polls every 3 s.
|
|
953
|
-
- `covered` is the highest seq such that every update up to it is in the local
|
|
954
|
-
doc. `flushed({ version, markdown, seq? })` waits for the updates pushed
|
|
955
|
-
before it, then records `seq`: the `covered` the host captured when it
|
|
956
|
-
serialized that Markdown, else `covered` now. `409 not_leader` rejects and
|
|
957
|
-
calls `onLeader(false)`. `base()` returns the last flushed Markdown.
|
|
958
|
-
- The lease renews every 5 s. A leader whose renewals fail steps down 13 s
|
|
959
|
-
after its last renewal was sent. A viewer without write access gets `403`
|
|
960
|
-
on the lease and never leads; it still pulls.
|
|
961
|
-
|
|
962
|
-
`getArtifactDoc`, `seedArtifactDoc`, `pushArtifactDocUpdate`,
|
|
963
|
-
`leaseArtifactDoc`, `markArtifactDocFlushed` and `resetArtifactDoc` are the
|
|
964
|
-
REST calls (also `kortix.project(id).artifacts.doc.{get, seed, push, lease,
|
|
965
|
-
flushed, reset}`). They take and return `Uint8Array`; base64 is the wire form
|
|
966
|
-
only. `getArtifactDoc` and `seedArtifactDoc` report the `epoch`. They never
|
|
967
|
-
call the global `onError`. The live connection never emits a `changed` event
|
|
968
|
-
for `doc`, and `ArtifactLiveChange` stays `'comments' | 'activity' |
|
|
969
|
-
'content'`: `createArtifactLiveConnection({ onDoc })` and
|
|
970
|
-
`useArtifactLive(…, { onDoc })` receive the seq, and the hook refetches nothing
|
|
971
|
-
for it.
|
|
695
|
+
- Deprecated: `WorkspaceGoal.heartbeat` is always `null`;
|
|
696
|
+
`CreateWorkspaceGoalInput.sessionId` is sent as the goal id.
|
|
972
697
|
|
|
973
698
|
## The facade surface
|
|
974
699
|
|
|
@@ -977,7 +702,9 @@ exhaustive — see `API-MAP.md` for the full per-domain surface:
|
|
|
977
702
|
|
|
978
703
|
| namespace | what |
|
|
979
704
|
|---|---|
|
|
980
|
-
| `kortix.
|
|
705
|
+
| `kortix.workspaces` | `list` (every workspace the caller can open, across accounts, one request) · `get` (role + state + settings) · `update` · `create` · `delete` · `restore`. See [Workspaces](#workspaces) |
|
|
706
|
+
| `kortix.workspace(id)` | everything on `kortix.project(id)`, except that `get` / `update` read and change the `Workspace` and `tokens` manages workspace keys (the project CLI tokens are `cliTokens`), plus `delete` · `restore` · `setup` · `accountId` · `members.{list,invite,updateRole,remove,invites,cancelInvite,resendInvite}` · `leave` · `billing.state` · `iam.{assignments.{list,create,revoke},roles,groups,can,canBatch}` |
|
|
707
|
+
| `kortix.projects` | project-named calls, kept permanently: list · get · detail · create · provision · createWorkspace · update · archive · llmCatalog · modelPicker · sandboxTemplates · sessions (+ more: `listForAccount`, `sandboxHealth`, `createSession`) |
|
|
981
708
|
| `kortix.accounts` | list · get · create · members · invites · `secretResources.{list,create,rotate,retry,remove,grant,revoke,setAccess}` · `subscriptions.{list,usage}` (project-authorized usage for named and legacy ChatGPT logins; reads credentials in place) · `tokens.{list,create,revoke}` (account-scoped CLI PATs, `kortix_pat_…`) · `audit.{log,export,activity,webhooks.*}` (filterable project/session reconstruction log; `activity` = who was active and how often, per UTC day) · `branding.{get,update,uploadAsset,removeAsset,reset}` (Enterprise organization branding: logo / icon / favicon, light + dark, product name) (+ more: `updateName`, `leave`, `invite`, `removeMember`, `updateMemberRole`) |
|
|
982
709
|
| `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,redeem,autoTopupSettings,configureAutoTopup}` (`redeem({ code, accountId })` adds a credit code's amount to the non-expiring credits, once per account). `checkout.{createSession,confirmSession}`, `subscription.{scheduleDowngrade,cancelScheduledChange,prorationPreview}`, `createPerSeatCheckout` and `claimPerSeatBilling` are deprecated: they reject with `ENDPOINT_RETIRED` |
|
|
983
710
|
| `kortix.marketplace` | public marketplace catalog browse + sources (not project-scoped): `items` · `item` · `itemFile` · `marketplaces` · `featured` · `sources.{list,add,remove}`. A project installs an item through `createMarketplaceInstallSession(projectId, itemId)`, which starts a session whose agent merges the item into the project and opens a change request; it resolves `{ session_id }` |
|
|
@@ -985,7 +712,7 @@ exhaustive — see `API-MAP.md` for the full per-domain surface:
|
|
|
985
712
|
| `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) |
|
|
986
713
|
| `kortix.notifications` | native push for a person's devices: `registerDeviceToken` · `unregisterDeviceToken` (Expo push tokens) · `releaseDeviceToken(token, { backendUrl?, signal? })` (**no token needed**: a signed-out app removes its device token from a backend, `POST /v1/notifications/device-token/release`; resolves `{ ok: true }`, a non-2xx answer throws `ApiError` with `status`). A session push reaches the phone of the person who created the session |
|
|
987
714
|
| `kortix.mobileClientPolicy()` | the operator's mobile release policy, `GET /v1/clients/mobile`, **no token needed** (read before login): resolves `{ minimum_version, store_url_ios, store_url_android }`, each a string or `null`; a non-200 answer throws `ApiError`. A mobile host compares its app version to `minimum_version` with `compareSemver(a, b)` (`-1 \| 0 \| 1`, or `null` when either side does not parse; ignores a leading `v` and `-pre`/`+build` suffixes) and fails open on `null`. Also exported standalone as `getMobileClientPolicy` and the `MobileClientPolicy` type. The operator sets `MOBILE_MIN_VERSION`, `MOBILE_STORE_URL_IOS`, `MOBILE_STORE_URL_ANDROID` on the API |
|
|
988
|
-
| `kortix.validateToken()` | pasted-API-key validation helper — `GET /
|
|
715
|
+
| `kortix.validateToken()` | pasted-API-key validation helper — `GET /me`, never throws, resolves `{valid, identity?, error?}` |
|
|
989
716
|
| `kortix.connectors` | Connector data plane for an agent-minted session token: `catalog` · `tools` · `search` · `describe` · `call` (`{ account }`) · `accounts` · `uploadAttachment` |
|
|
990
717
|
| `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 / app; `.fire(slug, { payload, dryRun })`; run history `.runs(slug)` / `.projectRuns({ status })`; `.replay(slug, runId)`) · `.files` · `.git` · `.changeRequests` (incl. `requestChanges`) · `.sessions` · `.tokens` (project-scoped CLI PATs — the `KORTIX_TOKEN` shape) · `.setupLinks.{requestSecret,requestConnector}` (agent-minted secret-entry / connector links) · `.validateManifest` · `.gitToken` · `.setDefaultAgent(name)` · `.session(sid)` (+ more namespaces: `.skills`, `.review`, `.approvals`, `.gateway` (incl. `.routing` and `.playground`), `.channels`, `.modelDefaults`, `.sandbox`) |
|
|
991
718
|
| `kortix.session(pid, sid)` | id-bound handle: lifecycle (`get`/`update`/`delete`/`restore`/`start`/`restart`/`stop`/`reloadConfig`/`reloadConfigStream`/`setSharing`/`participants`/`setPinned`/`setArchived`/`presence`/`previews`/`commit`/`publicShares`/`ensureReady`) · finalized `cost()` · `send`/`abort`/`rewind`/`restoreRewind` (needs `session.rewind`)/`setModel`/`setAgent` · `transcript()` · `.files` · runtime URL helpers (`health`/`previewUrl`/`proxyUrl`) · the session verbs (`messages`/`pending`/`answerPermission`/`answerQuestion`/`compact`) · `stream()` · the deprecated `.runtime` |
|
|
@@ -1379,7 +1106,7 @@ the root import — offers the same agents and models and sends the same pick.
|
|
|
1379
1106
|
|
|
1380
1107
|
| Function | Input → output |
|
|
1381
1108
|
|---|---|
|
|
1382
|
-
| `projectConfigAgentsToRuntimeAgents(config)` | `/
|
|
1109
|
+
| `projectConfigAgentsToRuntimeAgents(config)` | `/workspaces/:id/detail` config → agent roster, project default first |
|
|
1383
1110
|
| `composerSelectableAgents(agents, { enableProjects?, includeSubagents? })` | roster → picker list (no hidden agents, no subagents, `project-manager` only with `enableProjects`) |
|
|
1384
1111
|
| `resolveComposerAgent({ agents, boundAgent, defaultAgent, selectedAgent })` | → the agent to send, and `disabled` when none is accessible |
|
|
1385
1112
|
| `pickerProviderList({ modelPicker })` | `/model-picker` catalog → provider list (the single `kortix` provider). `gatewayEnabled`, `runtimeProviders`, `llmCatalogProviders` and `secretNames` are deprecated and ignored |
|
|
@@ -1416,6 +1143,156 @@ the root barrel; `@kortix/sdk/react` re-exports them too). They're real classes:
|
|
|
1416
1143
|
- `SessionNotReadyError` (root barrel) — a session handle's runtime-scoped
|
|
1417
1144
|
member (`.runtime`, `.previewUrl()`, `.proxyUrl()`) was touched before
|
|
1418
1145
|
`ensureReady()` resolved this session's own sandbox.
|
|
1146
|
+
- `isNoWorkspaceError(err)` — HTTP 409 with `code: NO_WORKSPACE_CODE`
|
|
1147
|
+
(`'no_workspace'`): the caller belongs to no workspace. Sign-up creates no
|
|
1148
|
+
account; show "Create a workspace or join one" and call `createWorkspace`.
|
|
1149
|
+
|
|
1150
|
+
## Workspaces
|
|
1151
|
+
|
|
1152
|
+
A workspace is the one top-level Kortix entity, like a Slack workspace: one
|
|
1153
|
+
company's members, roles, billing, secrets, agents and sessions. The
|
|
1154
|
+
workspace id (`workspace_id`) is the project id, so every session URL,
|
|
1155
|
+
`kortix.project(id)` call and `KORTIX_PROJECT_ID` already carries it. The
|
|
1156
|
+
account id stays an internal billing and directory key; no `Workspace*` call
|
|
1157
|
+
asks for it.
|
|
1158
|
+
|
|
1159
|
+
```ts
|
|
1160
|
+
import { createKortix } from "@kortix/sdk";
|
|
1161
|
+
|
|
1162
|
+
const kortix = createKortix({ backendUrl, getToken });
|
|
1163
|
+
|
|
1164
|
+
const list = await kortix.workspaces.list(); // every workspace, every account, ONE request
|
|
1165
|
+
const ws = kortix.workspace(list[0].workspace_id);
|
|
1166
|
+
|
|
1167
|
+
const workspace = await ws.get(); // Workspace: role + state + settings (mfa_required, branding, …)
|
|
1168
|
+
await ws.update({ name: "Northwind" }); // one name, everywhere
|
|
1169
|
+
const members = await ws.members.list();
|
|
1170
|
+
await ws.members.invite({ email: "person@example.com", role: "manager" });
|
|
1171
|
+
const state = await ws.billing.state(); // plan, credits, limits
|
|
1172
|
+
const { secret_key } = await ws.tokens.create({ name: "ci" }); // a workspace key, returned once
|
|
1173
|
+
await ws.session(sessionId).send("hello"); // every project(id) member is here too
|
|
1174
|
+
```
|
|
1175
|
+
|
|
1176
|
+
| Name | What |
|
|
1177
|
+
|---|---|
|
|
1178
|
+
| `Workspace` | one workspace: every `KortixWorkspace` field + `workspace_id` + `role` + `state` + the settings (`mfa_required`, `branding`, `member_count`, `session_*`, `pat_*`, `split_pending`, `secret_default_strategy`, …) |
|
|
1179
|
+
| `WorkspaceSummary` | one list row: every `KortixWorkspace` field + `workspace_id` + `role` + `state` (+ `split_pending`, `deletion_scheduled_for`) |
|
|
1180
|
+
| `WorkspaceRole` | `'owner' \| 'admin' \| 'manager' \| 'member'` |
|
|
1181
|
+
| `WorkspaceState` | `'active'` · `'setup_required'` (pays, no repository yet: `setupWorkspace`) · `'deleting'` (owners only, until `deletion_scheduled_for`: `restoreWorkspace`) |
|
|
1182
|
+
| `listWorkspaces({ includeInactive? })` · `getWorkspace(id)` · `updateWorkspace(id, input)` | the entity. `listWorkspaces` is one `GET /v1/workspaces`; active workspaces unless `includeInactive` |
|
|
1183
|
+
| `createWorkspace(input, onEvent?)` · `deleteWorkspace(id)` · `restoreWorkspace(id)` · `setupWorkspace(id, input?)` | the lifecycle |
|
|
1184
|
+
| `listWorkspaceMembers` · `inviteWorkspaceMember` · `updateWorkspaceMemberRole` · `removeWorkspaceMember` · `listWorkspaceInvites` · `cancelWorkspaceInvite` · `resendWorkspaceInvite` · `leaveWorkspace` | people, on the `WorkspaceRole` ladder (an owner is made by transfer, never by invite) |
|
|
1185
|
+
| `listWorkspaceTokens` · `createWorkspaceToken` · `revokeWorkspaceToken` | workspace keys (`kortix_pat_…` that act on this workspace only) |
|
|
1186
|
+
| `listPersonalTokens()` · `revokePersonalToken(id)` | the caller's personal keys (the CLI login; act as the person in every workspace) |
|
|
1187
|
+
| `getPersonDeletionPlan()` | what "Delete my account" would do: the workspaces deleted, left, and the shared ones to hand over first |
|
|
1188
|
+
| `getWorkspaceBillingState` | plan, credits, limits (`AccountState`) |
|
|
1189
|
+
| `listWorkspaceAssignments` · `createWorkspaceAssignment` · `revokeWorkspaceAssignment` · `listWorkspaceRoles` · `listWorkspaceGroups` · `probeWorkspacePermission(s)` | identity and access |
|
|
1190
|
+
| `buildWorkspaceSummaries` · `compareWorkspacesByRecent` · `workspaceFromProject` · `workspaceRole` | pure helpers for a host that already holds per-account lists (an older API) |
|
|
1191
|
+
| `resolveWorkspaceAccountId(id)` | the account behind a workspace, for an older `Account*` call |
|
|
1192
|
+
| `useWorkspaces({ userId })` · `useWorkspace(id)` (`@kortix/sdk/react`) | the hooks. `useWorkspaces` reads `listWorkspaces()` (key `qk.projects.workspaces(userId)`) and returns `{ workspaces, accounts, isLoading, isError, failedAccountIds, refetchFailed }` |
|
|
1193
|
+
|
|
1194
|
+
**The workspace handle.** `kortix.workspace(id)` carries every member of
|
|
1195
|
+
`kortix.project(id)`. Three keys have the workspace meaning there: `get` and
|
|
1196
|
+
`update` read and change the `Workspace`, and `tokens` manages workspace keys.
|
|
1197
|
+
The project CLI tokens of `kortix.project(id).tokens` are `cliTokens` on the
|
|
1198
|
+
workspace handle. The handle adds `delete`, `restore`, `setup`, `accountId`,
|
|
1199
|
+
`members`, `leave`, `billing` and `iam`.
|
|
1200
|
+
|
|
1201
|
+
Every response that names a workspace carries `workspace_id` next to
|
|
1202
|
+
`project_id` (projects, sessions, secrets, tokens, access and member rows,
|
|
1203
|
+
accounts, `/v1/me`). `account_id` stays, deprecated. Older servers omit
|
|
1204
|
+
`workspace_id`.
|
|
1205
|
+
|
|
1206
|
+
**Compatibility is permanent.** Every `Project*` and `Account*` name keeps
|
|
1207
|
+
working; none is scheduled for removal. Every `Project*` name has a workspace
|
|
1208
|
+
twin (the same function, class, value or type; see [Legacy names](#legacy-names)),
|
|
1209
|
+
and the project name carries `@deprecated Use <twin>`. An `Account*` name with
|
|
1210
|
+
an exact workspace equivalent carries `@deprecated` naming it
|
|
1211
|
+
(`listAccountMembers` → `listWorkspaceMembers`, …). `listAccounts` and
|
|
1212
|
+
`createAccountToken` (a personal key, not a workspace key) stay current: they
|
|
1213
|
+
have no exact equivalent.
|
|
1214
|
+
|
|
1215
|
+
**Not the sandbox directory.** `RuntimeWorkspace*`, `useRuntimeWorkspace`,
|
|
1216
|
+
`@kortix/sdk/workspace-search`, `toWorkspaceRelative` and
|
|
1217
|
+
`normalizeWorkspacePath` are about the session sandbox's `/workspace`
|
|
1218
|
+
directory. `CaptureWorkspace` is a Kortix Capture tenant. Neither is a Kortix
|
|
1219
|
+
workspace.
|
|
1220
|
+
|
|
1221
|
+
### Legacy names
|
|
1222
|
+
|
|
1223
|
+
Every public name that says Project has a workspace twin. The rule is
|
|
1224
|
+
mechanical: `Project` → `Workspace`, `project` → `workspace`, `PROJECT` →
|
|
1225
|
+
`WORKSPACE` (`listProjectSessions` → `listWorkspaceSessions`, `ProjectSession`
|
|
1226
|
+
→ `WorkspaceSession`, `useProjectTriggers` → `useWorkspaceTriggers`,
|
|
1227
|
+
`PROJECT_WIDE_SPACE` → `WORKSPACE_WIDE_SPACE`). The twin is the same function,
|
|
1228
|
+
class, value or type, so `listProjectSessions === listWorkspaceSessions`. The
|
|
1229
|
+
project name stays exported permanently and is `@deprecated`. Facade members
|
|
1230
|
+
(`kortix.projects.*`, `kortix.project(id).*`) keep their names.
|
|
1231
|
+
|
|
1232
|
+
These project names have no identical twin:
|
|
1233
|
+
|
|
1234
|
+
| Legacy name | Use instead | Why |
|
|
1235
|
+
|---|---|---|
|
|
1236
|
+
| `listProjects()` | `listWorkspaces()` | Lists one account's projects; `listWorkspaces` lists every workspace of the caller |
|
|
1237
|
+
| `useProjects(accountId?)`, `UseProjectsOptions`, `projectsQueryOptions`, `ProjectsKey`, `ProjectsListKey` | `useWorkspaces()`, `UseWorkspacesOptions` | The same difference, in React |
|
|
1238
|
+
| `getProject(id)` | `getWorkspace(id)` | `getWorkspace` adds the role, the state and the settings block |
|
|
1239
|
+
| `updateProject(id, input)` | `updateWorkspace(id, input)` | `updateWorkspace` refuses a settings key with `workspace_setting_read_only` |
|
|
1240
|
+
| `createProject(input)` | `linkRepository(input)` | Both import a repository; `createWorkspace` makes a new one |
|
|
1241
|
+
| `inviteProjectMember(id, email, role)` | `inviteWorkspaceMember(id, input)` | Membership is access: one invite, one role |
|
|
1242
|
+
| `ProjectHandle` | `WorkspaceHandle` | `kortix.workspace(id)` carries every member of `kortix.project(id)` plus the workspace itself |
|
|
1243
|
+
| `ProjectRole` | `WorkspaceRole` | One role ladder: `owner`, `admin`, `manager`, `member` |
|
|
1244
|
+
| `PROJECT_ACTIONS`, `ProjectAction` | (current) | The values are the IAM action ids (`project.*`); `WorkspaceAction` and `toWorkspaceAction` give the workspace ids |
|
|
1245
|
+
|
|
1246
|
+
Names that say project and are not the workspace keep their names: the
|
|
1247
|
+
sandbox daemon's board project (`KortixMasterProject`, `listKortixProjects`,
|
|
1248
|
+
… in `@kortix/sdk/react`, `KortixProject` is the daemon's), the session
|
|
1249
|
+
runtime's project record (`Project`, `ProjectVcs`, `RuntimeProjectInfo`), the
|
|
1250
|
+
verb "project" (`projectWorking`, `projectSessionConnection`), the wire code
|
|
1251
|
+
`WORKSPACE_HAS_PROJECT_CODE`, and the removed warm-session and mount calls.
|
|
1252
|
+
`src/workspace-names.test.ts` fails on a new project name without a twin or a
|
|
1253
|
+
reason.
|
|
1254
|
+
|
|
1255
|
+
### Workspace errors
|
|
1256
|
+
|
|
1257
|
+
| Code | Status | Meaning | Predicate / constant |
|
|
1258
|
+
|---|---|---|---|
|
|
1259
|
+
| `workspace_not_found` | 404 | No such workspace, an account id on a canonical path, or no access | `WORKSPACE_NOT_FOUND_CODE` |
|
|
1260
|
+
| `workspace_setup_required` | 409 | The workspace has no repository yet: `setupWorkspace` | `WORKSPACE_SETUP_REQUIRED_CODE` |
|
|
1261
|
+
| `workspace_deleting` | 409 | The workspace is being deleted: an owner restores it first | `WORKSPACE_DELETING_CODE` |
|
|
1262
|
+
| `workspace_has_project` | 409 | The account already holds its workspace's project; the body names it (`workspace_id`). Create another workspace instead | `WORKSPACE_HAS_PROJECT_CODE` · `isWorkspaceHasProjectError` |
|
|
1263
|
+
| `workspace_setting_read_only` | 400 | `updateWorkspace` named a setting; `field` and `writer` (the route that writes it) are in the body | `WORKSPACE_SETTING_READ_ONLY_CODE` |
|
|
1264
|
+
| `workspace_ambiguous` | 409 | A legacy account key names several workspaces (not split yet): name the workspace id | — |
|
|
1265
|
+
| `no_workspace` | 409 | The caller belongs to no workspace | `NO_WORKSPACE_CODE` · `isNoWorkspaceError` |
|
|
1266
|
+
| `new_workspace_requires_person` | 403 | Only a person creates a workspace (not an API key, a service account or a workspace key) | — |
|
|
1267
|
+
| `account_creation_restricted` | 403 | The deployment lets only its admin create workspaces | — |
|
|
1268
|
+
| `project_limit_reached` | 403 | Deprecated: an older API's plan cap. Current APIs answer `workspace_has_project` | — |
|
|
1269
|
+
|
|
1270
|
+
## Create a workspace
|
|
1271
|
+
|
|
1272
|
+
`createWorkspace(input, onEvent?, options?)` (also `kortix.workspaces.create`
|
|
1273
|
+
and `kortix.projects.createWorkspace`) creates a whole workspace with
|
|
1274
|
+
`POST /v1/workspaces`: always a new account, the caller its owner. An
|
|
1275
|
+
idempotent retry (the same `idempotency_key`) answers the workspace that key
|
|
1276
|
+
already created. It answers the `Workspace`. `input` is
|
|
1277
|
+
`CreateWorkspaceInput`: the name and the repository fields, without
|
|
1278
|
+
`account_id`. Pass `onEvent` to stream the phases (`Accept:
|
|
1279
|
+
text/event-stream`); omit it on React Native. On an older API the call sends
|
|
1280
|
+
`new_workspace: true` to `POST /v1/projects/provision` instead.
|
|
1281
|
+
|
|
1282
|
+
```ts
|
|
1283
|
+
import { createWorkspace } from "@kortix/sdk";
|
|
1284
|
+
|
|
1285
|
+
const ws = await createWorkspace(
|
|
1286
|
+
{ name: "Northwind", idempotency_key: crypto.randomUUID() },
|
|
1287
|
+
(e) => e.type === "phase" && console.log(e.phase),
|
|
1288
|
+
);
|
|
1289
|
+
// ws.workspace_id === ws.project_id; ws.role === "owner".
|
|
1290
|
+
```
|
|
1291
|
+
|
|
1292
|
+
Codes: `403 account_creation_restricted` (the deployment restricts account
|
|
1293
|
+
creation), `403 new_workspace_requires_person` (an API key, a service account
|
|
1294
|
+
or a workspace key), `403 impersonation_invalid`, `409 provision_in_flight`
|
|
1295
|
+
(retry with the same key).
|
|
1419
1296
|
|
|
1420
1297
|
The canonical server-side wrapper shape — catch a 402 and pass the payload
|
|
1421
1298
|
through to your own client for re-billing, instead of leaking a Kortix error:
|
|
@@ -1507,6 +1384,7 @@ learn it once.
|
|
|
1507
1384
|
| `@kortix/sdk/server` | `runWithKortix`, `createScopedKortix`, `getScopedConfig` — per-request config isolation in a Node/Bun backend | imports `node:async_hooks`. Never let it into a browser bundle |
|
|
1508
1385
|
| `@kortix/sdk/genui/fence`, `@kortix/sdk/genui`, `@kortix/sdk/genui/react` | Generative UI: split `openui` blocks out of text, parse them, render them (see **Generative UI** below) | `genui` and `genui/react` need the optional peers `zod` and `@openuidev/lang-core`; `genui/fence` loads neither |
|
|
1509
1386
|
| `@kortix/sdk/wire-message-id` | `mintWireMessageId` and `WIRE_MESSAGE_ID`: mint and validate a Kortix message id. Its clock helpers (`wireIdClockDelta`, `mintWireMessageIdAbove`, …) place ids on the 48-bit clock | not a dependency split: the root exports the same names. A server that mints ids loads this one import-free module instead of the whole barrel |
|
|
1387
|
+
| `@kortix/sdk/wire-values` | the session wire value sets (`THREAD_STATUSES`, `RUNTIME_CAPABILITIES`, the control-frame types, the prompt reasons, the decision functions). `@kortix/api-contract/wire-values` re-exports it | the root exports the same names; this module loads alone (zero imports) so a server bundles the contract without zod or the barrel |
|
|
1510
1388
|
| `@kortix/sdk/workspace-search` | `createWorkspaceSearchClient` and its ranking helpers | isolated from the root on purpose |
|
|
1511
1389
|
| `@kortix/sdk/capture-rules` | the Kortix Capture constants (`CAPTURE_LAYERS`, `CAPTURE_DEVICE_DEFAULTS`, …) | the root exports the same names; this module loads alone |
|
|
1512
1390
|
| `@kortix/sdk/internal/*` | nothing, in host code | apps/web's zustand stores. Browser-only, **outside semver**, and not on the `window.Kortix` global. Implementation detail that is regrettably visible |
|
|
@@ -1639,6 +1517,40 @@ Its only platform code for the session runtime is the event transport
|
|
|
1639
1517
|
- **React data** comes from `@kortix/sdk/react` hooks; **imperative actions** from
|
|
1640
1518
|
the `createKortix` facade.
|
|
1641
1519
|
|
|
1520
|
+
## Route names and older APIs
|
|
1521
|
+
|
|
1522
|
+
The SDK calls the canonical workspace routes. The API serves the older names
|
|
1523
|
+
permanently:
|
|
1524
|
+
|
|
1525
|
+
| Canonical | Legacy (permanent) | Note |
|
|
1526
|
+
|---|---|---|
|
|
1527
|
+
| `GET /v1/workspaces` | `GET /v1/projects` | Not an alias: canonical lists every workspace of the caller in one request; legacy lists one account's projects (`?account_id=`) |
|
|
1528
|
+
| `POST /v1/workspaces` | `POST /v1/projects/provision` with `new_workspace: true` | Not an alias: `POST /v1/projects` imports a GitHub repository into an account |
|
|
1529
|
+
| `GET`/`PATCH /v1/workspaces/:id` | `GET`/`PATCH /v1/projects/:id` | Not an alias: canonical adds `role`, `state` and the settings block, and refuses a settings key |
|
|
1530
|
+
| `/v1/workspaces/:id/<sub-path>` | `/v1/projects/:id/<sub-path>` | Same handler |
|
|
1531
|
+
| `/v1/workspaces/:id/<family>` (members, invites, iam, audit, tokens, branding, capture, …) | `/v1/accounts/:accountId/<family>` | Same handler; `GET …/audit` is the workspace log, not the project slice |
|
|
1532
|
+
| `/v1/me[/…]` · `/v1/invites[/…]` | `/v1/accounts/me[/…]` · `/v1/account-invites[/…]` | Same handler |
|
|
1533
|
+
| `/v1/connectors/workspaces/:id/…` · `/scim/v2/workspaces/:id/…` | `/v1/connectors/projects/:id/…` · `/scim/v2/accounts/:accountId/…` | Same handler |
|
|
1534
|
+
| `GET /v1/workspaces/:id/audit/events` | `GET /v1/projects/:id/audit` | Same handler: the project audit slice |
|
|
1535
|
+
| `POST /v1/workspaces/{link-repository,create-repo}` · `/v1/workspaces/:id/transfer` | `POST /v1/projects/{link-repository,create-repo}` · `/v1/projects/:id/transfer` | Same handler |
|
|
1536
|
+
| `POST /v1/webhooks/workspaces/:id/:slug` | `POST /v1/webhooks/projects/:id/:slug` | Same handler |
|
|
1537
|
+
| — | `/v1/projects/{provision,provision-stream,quota}` | Legacy only: account-scoped managed create and quota; `POST /v1/workspaces` has no quota |
|
|
1538
|
+
| `GET`/`POST /v1/workspaces` · `GET`/`PATCH /v1/workspaces/:id` · `/v1/workspaces/:id/tokens` | `/v1/accounts` · `/v1/accounts/:accountId` · `/v1/accounts/tokens` | Not aliases: deprecated in the OpenAPI spec (`x-kortix-replaced-by`) |
|
|
1539
|
+
|
|
1540
|
+
**Ids.** A canonical path takes the workspace id only. An account id, an
|
|
1541
|
+
unknown id or a workspace the caller cannot read answers `404
|
|
1542
|
+
workspace_not_found` on every sub-path, so a caller cannot probe which ids
|
|
1543
|
+
exist. A legacy path accepts either id forever. Ids are case-insensitive. An
|
|
1544
|
+
`Account*` function that holds an account id calls the legacy name.
|
|
1545
|
+
|
|
1546
|
+
An API older than the workspace routes answers a canonical name with its
|
|
1547
|
+
unknown-route 404 (`{ "error": true, "message": "Not found", "status": 404
|
|
1548
|
+
}`). The SDK then sends the same request once more on the older name and uses
|
|
1549
|
+
the older names for that API base until the process restarts (a legacy-only
|
|
1550
|
+
route retries without marking the base). A 404 that a route returns for a
|
|
1551
|
+
missing resource is returned as is. Function names and signatures do not
|
|
1552
|
+
change.
|
|
1553
|
+
|
|
1642
1554
|
## Auth
|
|
1643
1555
|
|
|
1644
1556
|
`Authorization: Bearer <token>` — a Supabase JWT (user sessions), a Kortix PAT
|
|
@@ -1773,7 +1685,7 @@ await kortix.projects.setModelAccess(projectId, {
|
|
|
1773
1685
|
|
|
1774
1686
|
`kortix` identifies Kortix Managed Models. Other provider IDs identify BYOK, Codex, or custom providers. Provider disable takes precedence over individual model choices. Each write changes one target and preserves credentials. Disabling the current project default or its provider returns `409 cannot_disable_default`; select another default first.
|
|
1775
1687
|
|
|
1776
|
-
`useModelAccess(projectId)` from `@kortix/sdk/react` exposes the policy, write state, and `setEnabled(change)`. Successful writes refresh both picker caches. Rejected writes leave the displayed policy unchanged. The policy blocks gateway inference; legacy `
|
|
1688
|
+
`useModelAccess(projectId)` from `@kortix/sdk/react` exposes the policy, write state, and `setEnabled(change)`. Successful writes refresh both picker caches. Rejected writes leave the displayed policy unchanged. The policy blocks gateway inference; legacy `setWorkspaceModelEnablement` remains display-only. The LLM gateway is the only model path, so `enforced` is always `true`.
|
|
1777
1689
|
|
|
1778
1690
|
### Custom LLM providers
|
|
1779
1691
|
|
|
@@ -1953,7 +1865,7 @@ visible origin session and returns its ID. It uses queue delivery, so a running
|
|
|
1953
1865
|
turn is not interrupted. The origin prompt updates the existing change request
|
|
1954
1866
|
and leaves application to the person. A visible archived origin creates a child;
|
|
1955
1867
|
an unavailable origin creates a root with `metadata.origin_session_id`.
|
|
1956
|
-
`
|
|
1868
|
+
`createWorkspaceSession` accepts an optional `parent_session_id` for a visible
|
|
1957
1869
|
same-project parent. This groups the new session without inheriting the parent's
|
|
1958
1870
|
sharing or automation identity. A session-bound credential retains its own
|
|
1959
1871
|
server-derived parent regardless of that field.
|