@segmentstream/ontology 0.0.0-stage → 0.92.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +1655 -2
- package/dist/action.d.ts +193 -0
- package/dist/action.js +41 -0
- package/dist/agent-chat.d.ts +44 -0
- package/dist/agent-chat.js +91 -0
- package/dist/agent-task-contract.d.ts +64 -0
- package/dist/agent-task-contract.js +15 -0
- package/dist/agent-task.d.ts +39 -0
- package/dist/agent-task.js +112 -0
- package/dist/analyze.d.ts +215 -0
- package/dist/analyze.js +2438 -0
- package/dist/app-feedback.d.ts +167 -0
- package/dist/app-feedback.js +176 -0
- package/dist/authoring-input.d.ts +3 -0
- package/dist/authoring-input.js +107 -0
- package/dist/authoring-names.d.ts +4 -0
- package/dist/authoring-names.js +13 -0
- package/dist/authoring-records.d.ts +35 -0
- package/dist/authoring-records.js +264 -0
- package/dist/authoring.d.ts +15 -0
- package/dist/authoring.js +331 -0
- package/dist/bin/check.d.ts +30 -0
- package/dist/bin/check.js +99 -0
- package/dist/bin/load.d.ts +48 -0
- package/dist/bin/load.js +139 -0
- package/dist/bin/main.d.ts +31 -0
- package/dist/bin/main.js +121 -0
- package/dist/bin/migrate.d.ts +57 -0
- package/dist/bin/migrate.js +170 -0
- package/dist/bin/output.d.ts +31 -0
- package/dist/bin/output.js +84 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +31 -0
- package/dist/blob.d.ts +52 -0
- package/dist/blob.js +87 -0
- package/dist/channel-session.d.ts +16 -0
- package/dist/channel-session.js +16 -0
- package/dist/chat.d.ts +43 -0
- package/dist/chat.js +34 -0
- package/dist/confirmation.d.ts +46 -0
- package/dist/confirmation.js +41 -0
- package/dist/connection.d.ts +213 -0
- package/dist/connection.js +289 -0
- package/dist/deployment.d.ts +35 -0
- package/dist/deployment.js +76 -0
- package/dist/diagnostics.d.ts +27 -0
- package/dist/diagnostics.js +106 -0
- package/dist/emails.d.ts +70 -0
- package/dist/emails.js +221 -0
- package/dist/entity.d.ts +331 -0
- package/dist/entity.js +153 -0
- package/dist/errors.d.ts +154 -0
- package/dist/errors.js +109 -0
- package/dist/feedback-config.d.ts +24 -0
- package/dist/feedback-config.js +126 -0
- package/dist/files.d.ts +39 -0
- package/dist/files.js +4 -0
- package/dist/groups.d.ts +95 -0
- package/dist/groups.js +280 -0
- package/dist/index.d.ts +109 -0
- package/dist/index.js +70 -0
- package/dist/internal/diagnostics.js +594 -0
- package/dist/legacy.d.ts +160 -0
- package/dist/legacy.js +270 -0
- package/dist/manifest-compatibility.d.ts +8 -0
- package/dist/manifest-compatibility.js +87 -0
- package/dist/manifest.d.ts +3329 -0
- package/dist/manifest.js +757 -0
- package/dist/me.d.ts +46 -0
- package/dist/me.js +109 -0
- package/dist/metric-filters.d.ts +48 -0
- package/dist/metric-filters.js +252 -0
- package/dist/metric-routes.d.ts +132 -0
- package/dist/metric-routes.js +498 -0
- package/dist/metric.d.ts +172 -0
- package/dist/metric.js +132 -0
- package/dist/migrate/apply.d.ts +94 -0
- package/dist/migrate/apply.js +526 -0
- package/dist/migrate/errors.d.ts +46 -0
- package/dist/migrate/errors.js +38 -0
- package/dist/migrate/index.d.ts +10 -0
- package/dist/migrate/index.js +7 -0
- package/dist/migrate/model.d.ts +2311 -0
- package/dist/migrate/model.js +148 -0
- package/dist/migrate/plan.d.ts +51 -0
- package/dist/migrate/plan.js +1856 -0
- package/dist/migrate/preview.d.ts +13 -0
- package/dist/migrate/preview.js +65 -0
- package/dist/migrate/storage.d.ts +226 -0
- package/dist/migrate/storage.js +774 -0
- package/dist/model-metrics.d.ts +22 -0
- package/dist/model-metrics.js +545 -0
- package/dist/names.d.ts +49 -0
- package/dist/names.js +110 -0
- package/dist/navigation-artifact.d.ts +13 -0
- package/dist/navigation-artifact.js +11 -0
- package/dist/navigation-catalog.d.ts +55 -0
- package/dist/navigation-catalog.js +297 -0
- package/dist/nitro-navigation.d.ts +3 -0
- package/dist/nitro-navigation.js +64 -0
- package/dist/nitro-workflows.d.ts +108 -0
- package/dist/nitro-workflows.js +286 -0
- package/dist/nitro.d.ts +40 -0
- package/dist/nitro.js +50 -0
- package/dist/ontology.d.ts +41 -0
- package/dist/ontology.js +46 -0
- package/dist/permissions.d.ts +198 -0
- package/dist/permissions.js +272 -0
- package/dist/property.d.ts +188 -0
- package/dist/property.js +301 -0
- package/dist/query.d.ts +245 -0
- package/dist/query.js +615 -0
- package/dist/relationship.d.ts +99 -0
- package/dist/relationship.js +33 -0
- package/dist/render.d.ts +81 -0
- package/dist/render.js +512 -0
- package/dist/replication/baseline.d.ts +51 -0
- package/dist/replication/baseline.js +215 -0
- package/dist/replication/bigquery.d.ts +37 -0
- package/dist/replication/bigquery.js +211 -0
- package/dist/replication/coverage.d.ts +14 -0
- package/dist/replication/coverage.js +53 -0
- package/dist/replication/evolution.d.ts +25 -0
- package/dist/replication/evolution.js +184 -0
- package/dist/replication/identities.d.ts +6 -0
- package/dist/replication/identities.js +47 -0
- package/dist/replication/legacy-baseline.d.ts +27 -0
- package/dist/replication/legacy-baseline.js +109 -0
- package/dist/replication/legacy-store.d.ts +19 -0
- package/dist/replication/legacy-store.js +63 -0
- package/dist/replication/lineage.d.ts +36 -0
- package/dist/replication/lineage.js +72 -0
- package/dist/replication/migrate.d.ts +21 -0
- package/dist/replication/migrate.js +84 -0
- package/dist/replication/model.d.ts +52 -0
- package/dist/replication/model.js +99 -0
- package/dist/replication/scans.d.ts +34 -0
- package/dist/replication/scans.js +158 -0
- package/dist/replication/schema.d.ts +11 -0
- package/dist/replication/schema.js +226 -0
- package/dist/replication/shadow-schema.d.ts +4 -0
- package/dist/replication/shadow-schema.js +61 -0
- package/dist/replication/shadow.d.ts +127 -0
- package/dist/replication/shadow.js +614 -0
- package/dist/replication/source-replacement.d.ts +33 -0
- package/dist/replication/source-replacement.js +76 -0
- package/dist/replication/store.d.ts +36 -0
- package/dist/replication/store.js +382 -0
- package/dist/replication/transaction.d.ts +23 -0
- package/dist/replication/transaction.js +88 -0
- package/dist/role.d.ts +61 -0
- package/dist/role.js +76 -0
- package/dist/runtime/action-deadlocks.d.ts +21 -0
- package/dist/runtime/action-deadlocks.js +130 -0
- package/dist/runtime/action-transactions.d.ts +35 -0
- package/dist/runtime/action-transactions.js +54 -0
- package/dist/runtime/agent-counters.d.ts +26 -0
- package/dist/runtime/agent-counters.js +98 -0
- package/dist/runtime/agent-tasks.d.ts +63 -0
- package/dist/runtime/agent-tasks.js +120 -0
- package/dist/runtime/agents.d.ts +15 -0
- package/dist/runtime/agents.js +457 -0
- package/dist/runtime/batch-diagnostics.d.ts +22 -0
- package/dist/runtime/batch-diagnostics.js +89 -0
- package/dist/runtime/batch.d.ts +52 -0
- package/dist/runtime/batch.js +534 -0
- package/dist/runtime/channel-session-revocation.d.ts +3 -0
- package/dist/runtime/channel-session-revocation.js +5 -0
- package/dist/runtime/channel-sessions.d.ts +4 -0
- package/dist/runtime/channel-sessions.js +61 -0
- package/dist/runtime/confirmations.d.ts +29 -0
- package/dist/runtime/confirmations.js +57 -0
- package/dist/runtime/cursor.d.ts +23 -0
- package/dist/runtime/cursor.js +100 -0
- package/dist/runtime/deployment.d.ts +7 -0
- package/dist/runtime/deployment.js +4 -0
- package/dist/runtime/errors.d.ts +118 -0
- package/dist/runtime/errors.js +109 -0
- package/dist/runtime/federation-tables.d.ts +2 -0
- package/dist/runtime/federation-tables.js +20 -0
- package/dist/runtime/federation.d.ts +42 -0
- package/dist/runtime/federation.js +222 -0
- package/dist/runtime/files.d.ts +39 -0
- package/dist/runtime/files.js +44 -0
- package/dist/runtime/generated-actions.d.ts +37 -0
- package/dist/runtime/generated-actions.js +307 -0
- package/dist/runtime/history.d.ts +91 -0
- package/dist/runtime/history.js +77 -0
- package/dist/runtime/ids.d.ts +6 -0
- package/dist/runtime/ids.js +39 -0
- package/dist/runtime/member-tables.d.ts +8 -0
- package/dist/runtime/member-tables.js +33 -0
- package/dist/runtime/member-writes.d.ts +78 -0
- package/dist/runtime/member-writes.js +202 -0
- package/dist/runtime/metric-query.d.ts +19 -0
- package/dist/runtime/metric-query.js +411 -0
- package/dist/runtime/model.d.ts +67 -0
- package/dist/runtime/model.js +150 -0
- package/dist/runtime/new-user-hook.d.ts +6 -0
- package/dist/runtime/new-user-hook.js +37 -0
- package/dist/runtime/oauth.d.ts +9 -0
- package/dist/runtime/oauth.js +299 -0
- package/dist/runtime/pipeline.d.ts +155 -0
- package/dist/runtime/pipeline.js +597 -0
- package/dist/runtime/postgres-tls.d.ts +10 -0
- package/dist/runtime/postgres-tls.js +14 -0
- package/dist/runtime/principals.d.ts +302 -0
- package/dist/runtime/principals.js +1307 -0
- package/dist/runtime/reads.d.ts +55 -0
- package/dist/runtime/reads.js +313 -0
- package/dist/runtime/records.d.ts +42 -0
- package/dist/runtime/records.js +245 -0
- package/dist/runtime/resolve-agent-identity.d.ts +6 -0
- package/dist/runtime/resolve-agent-identity.js +181 -0
- package/dist/runtime/service-binding.d.ts +18 -0
- package/dist/runtime/service-binding.js +266 -0
- package/dist/runtime/sign-in-links.d.ts +68 -0
- package/dist/runtime/sign-in-links.js +147 -0
- package/dist/runtime/sql-runtime.d.ts +131 -0
- package/dist/runtime/sql-runtime.js +362 -0
- package/dist/runtime/statement.d.ts +18 -0
- package/dist/runtime/statement.js +31 -0
- package/dist/runtime/user-identities.d.ts +66 -0
- package/dist/runtime/user-identities.js +106 -0
- package/dist/runtime/user-identity-sql.d.ts +86 -0
- package/dist/runtime/user-identity-sql.js +297 -0
- package/dist/runtime/user-roles.d.ts +16 -0
- package/dist/runtime/user-roles.js +32 -0
- package/dist/runtime/validation.d.ts +16 -0
- package/dist/runtime/validation.js +26 -0
- package/dist/runtime/where.d.ts +57 -0
- package/dist/runtime/where.js +404 -0
- package/dist/runtime/workflow-admission.d.ts +49 -0
- package/dist/runtime/workflow-admission.js +92 -0
- package/dist/runtime/workflow-argument-codec.d.ts +10 -0
- package/dist/runtime/workflow-argument-codec.js +120 -0
- package/dist/runtime/workflow-arguments.d.ts +17 -0
- package/dist/runtime/workflow-arguments.js +99 -0
- package/dist/runtime/workflow-starts.d.ts +203 -0
- package/dist/runtime/workflow-starts.js +493 -0
- package/dist/runtime/workflow-users.d.ts +9 -0
- package/dist/runtime/workflow-users.js +17 -0
- package/dist/runtime/workload.d.ts +25 -0
- package/dist/runtime/workload.js +24 -0
- package/dist/runtime/writes.d.ts +108 -0
- package/dist/runtime/writes.js +491 -0
- package/dist/runtime-source.d.ts +22 -0
- package/dist/runtime-source.js +28 -0
- package/dist/runtime.d.ts +310 -0
- package/dist/runtime.js +31 -0
- package/dist/server.d.ts +23 -0
- package/dist/server.js +107 -0
- package/dist/service/agent/attachments.d.ts +33 -0
- package/dist/service/agent/attachments.js +228 -0
- package/dist/service/agent/authentication.d.ts +22 -0
- package/dist/service/agent/authentication.js +58 -0
- package/dist/service/agent/confirmations.d.ts +5 -0
- package/dist/service/agent/confirmations.js +73 -0
- package/dist/service/agent/conversation-routes.d.ts +14 -0
- package/dist/service/agent/conversation-routes.js +45 -0
- package/dist/service/agent/conversations.d.ts +40 -0
- package/dist/service/agent/conversations.js +69 -0
- package/dist/service/agent/files.d.ts +12 -0
- package/dist/service/agent/files.js +69 -0
- package/dist/service/agent/protocol.d.ts +90 -0
- package/dist/service/agent/protocol.js +114 -0
- package/dist/service/agent/server.d.ts +28 -0
- package/dist/service/agent/server.js +374 -0
- package/dist/service/agent/task-caller.d.ts +21 -0
- package/dist/service/agent/task-caller.js +35 -0
- package/dist/service/agent/task-start.d.ts +53 -0
- package/dist/service/agent/task-start.js +161 -0
- package/dist/service/agent/tasks.d.ts +40 -0
- package/dist/service/agent/tasks.js +155 -0
- package/dist/service/api.d.ts +50 -0
- package/dist/service/api.js +288 -0
- package/dist/service/authentication.d.ts +227 -0
- package/dist/service/authentication.js +767 -0
- package/dist/service/caller-context.d.ts +24 -0
- package/dist/service/caller-context.js +6 -0
- package/dist/service/catalog.d.ts +42 -0
- package/dist/service/catalog.js +66 -0
- package/dist/service/channel/provider.d.ts +10 -0
- package/dist/service/channel/provider.js +1 -0
- package/dist/service/channel/providers/telegram.d.ts +18 -0
- package/dist/service/channel/providers/telegram.js +108 -0
- package/dist/service/channel/sessions.d.ts +5 -0
- package/dist/service/channel/sessions.js +53 -0
- package/dist/service/channel/sign-in.d.ts +7 -0
- package/dist/service/channel/sign-in.js +78 -0
- package/dist/service/chat/archive.d.ts +64 -0
- package/dist/service/chat/archive.js +62 -0
- package/dist/service/chat/attribution.d.ts +26 -0
- package/dist/service/chat/attribution.js +28 -0
- package/dist/service/chat/delivery.d.ts +18 -0
- package/dist/service/chat/delivery.js +251 -0
- package/dist/service/chat/diagnostics.d.ts +2 -0
- package/dist/service/chat/diagnostics.js +35 -0
- package/dist/service/chat/envelope.d.ts +96 -0
- package/dist/service/chat/envelope.js +39 -0
- package/dist/service/chat/idempotency.d.ts +19 -0
- package/dist/service/chat/idempotency.js +37 -0
- package/dist/service/chat/providers/telegram.d.ts +36 -0
- package/dist/service/chat/providers/telegram.js +133 -0
- package/dist/service/chat/reads.d.ts +25 -0
- package/dist/service/chat/reads.js +75 -0
- package/dist/service/chat/resolve.d.ts +34 -0
- package/dist/service/chat/resolve.js +150 -0
- package/dist/service/chat/routes.d.ts +23 -0
- package/dist/service/chat/routes.js +75 -0
- package/dist/service/chat/schemas.d.ts +43 -0
- package/dist/service/chat/schemas.js +31 -0
- package/dist/service/config.d.ts +218 -0
- package/dist/service/config.js +265 -0
- package/dist/service/connection-stream.d.ts +10 -0
- package/dist/service/connection-stream.js +191 -0
- package/dist/service/connections.d.ts +60 -0
- package/dist/service/connections.js +271 -0
- package/dist/service/decisions.d.ts +35 -0
- package/dist/service/decisions.js +63 -0
- package/dist/service/descriptions.d.ts +8 -0
- package/dist/service/descriptions.js +20 -0
- package/dist/service/discovery-schemas.d.ts +92 -0
- package/dist/service/discovery-schemas.js +59 -0
- package/dist/service/discovery-search.d.ts +30 -0
- package/dist/service/discovery-search.js +95 -0
- package/dist/service/discovery.d.ts +37 -0
- package/dist/service/discovery.js +436 -0
- package/dist/service/docs.d.ts +9 -0
- package/dist/service/docs.js +197 -0
- package/dist/service/errors.d.ts +145 -0
- package/dist/service/errors.js +704 -0
- package/dist/service/federation-provider.d.ts +36 -0
- package/dist/service/federation-provider.js +110 -0
- package/dist/service/federation-server.d.ts +20 -0
- package/dist/service/federation-server.js +249 -0
- package/dist/service/federation-status.d.ts +40 -0
- package/dist/service/federation-status.js +151 -0
- package/dist/service/handlers.d.ts +18 -0
- package/dist/service/handlers.js +287 -0
- package/dist/service/mcp/confirmation.d.ts +68 -0
- package/dist/service/mcp/confirmation.js +178 -0
- package/dist/service/mcp/find-input.d.ts +12 -0
- package/dist/service/mcp/find-input.js +122 -0
- package/dist/service/mcp/input-schema.d.ts +6 -0
- package/dist/service/mcp/input-schema.js +126 -0
- package/dist/service/mcp/listing.d.ts +26 -0
- package/dist/service/mcp/listing.js +92 -0
- package/dist/service/mcp/metric-tools.d.ts +85 -0
- package/dist/service/mcp/metric-tools.js +258 -0
- package/dist/service/mcp/request-log.d.ts +5 -0
- package/dist/service/mcp/request-log.js +53 -0
- package/dist/service/mcp/runtime-policy.d.ts +27 -0
- package/dist/service/mcp/runtime-policy.js +62 -0
- package/dist/service/mcp/server.d.ts +52 -0
- package/dist/service/mcp/server.js +861 -0
- package/dist/service/mcp/tools.d.ts +99 -0
- package/dist/service/mcp/tools.js +938 -0
- package/dist/service/member-file-routes.d.ts +22 -0
- package/dist/service/member-file-routes.js +52 -0
- package/dist/service/member-files.d.ts +245 -0
- package/dist/service/member-files.js +258 -0
- package/dist/service/metric-query-platform.d.ts +77 -0
- package/dist/service/metric-query-platform.js +198 -0
- package/dist/service/metric-query-scopes.d.ts +43 -0
- package/dist/service/metric-query-scopes.js +147 -0
- package/dist/service/metric-query.d.ts +48 -0
- package/dist/service/metric-query.js +200 -0
- package/dist/service/name-suggestions.d.ts +3 -0
- package/dist/service/name-suggestions.js +38 -0
- package/dist/service/navigation-schemas.d.ts +80 -0
- package/dist/service/navigation-schemas.js +49 -0
- package/dist/service/navigation.d.ts +20 -0
- package/dist/service/navigation.js +165 -0
- package/dist/service/oauth/protocol.d.ts +70 -0
- package/dist/service/oauth/protocol.js +157 -0
- package/dist/service/oauth/refresh-replay.d.ts +2 -0
- package/dist/service/oauth/refresh-replay.js +20 -0
- package/dist/service/oauth/server.d.ts +28 -0
- package/dist/service/oauth/server.js +769 -0
- package/dist/service/operations.d.ts +170 -0
- package/dist/service/operations.js +392 -0
- package/dist/service/plan.d.ts +57 -0
- package/dist/service/plan.js +96 -0
- package/dist/service/rate-limit.d.ts +22 -0
- package/dist/service/rate-limit.js +52 -0
- package/dist/service/record-reads.d.ts +21 -0
- package/dist/service/record-reads.js +155 -0
- package/dist/service/replication.d.ts +5 -0
- package/dist/service/replication.js +39 -0
- package/dist/service/runtime-contract.d.ts +508 -0
- package/dist/service/runtime-contract.js +18 -0
- package/dist/service/runtime-identity.d.ts +71 -0
- package/dist/service/runtime-identity.js +122 -0
- package/dist/service/schemas.d.ts +961 -0
- package/dist/service/schemas.js +639 -0
- package/dist/service/service.d.ts +21 -0
- package/dist/service/service.js +526 -0
- package/dist/service/warehouse-platform.d.ts +17 -0
- package/dist/service/warehouse-platform.js +122 -0
- package/dist/service/warehouse-query.d.ts +24 -0
- package/dist/service/warehouse-query.js +280 -0
- package/dist/service/webhooks.d.ts +106 -0
- package/dist/service/webhooks.js +233 -0
- package/dist/service/workflow-admission-provider.d.ts +31 -0
- package/dist/service/workflow-admission-provider.js +205 -0
- package/dist/service/workflow-argument-serialization.d.ts +2 -0
- package/dist/service/workflow-argument-serialization.js +14 -0
- package/dist/service/workflow-callback.d.ts +22 -0
- package/dist/service/workflow-callback.js +75 -0
- package/dist/service/workflow-deployment.d.ts +8 -0
- package/dist/service/workflow-deployment.js +131 -0
- package/dist/service/workflow-diagnostics.d.ts +23 -0
- package/dist/service/workflow-diagnostics.js +263 -0
- package/dist/service/workflow-errors.d.ts +26 -0
- package/dist/service/workflow-errors.js +181 -0
- package/dist/service/workflow-logging.d.ts +2 -0
- package/dist/service/workflow-logging.js +50 -0
- package/dist/service/workflow-queue-fence.d.ts +6 -0
- package/dist/service/workflow-queue-fence.js +66 -0
- package/dist/service/workflows.d.ts +200 -0
- package/dist/service/workflows.js +1549 -0
- package/dist/sign-in.d.ts +58 -0
- package/dist/sign-in.js +57 -0
- package/dist/source.d.ts +30 -0
- package/dist/source.js +107 -0
- package/dist/start-recovery-contract.d.ts +49 -0
- package/dist/start-recovery-contract.js +26 -0
- package/dist/start-recovery.d.ts +27 -0
- package/dist/start-recovery.js +81 -0
- package/dist/storage/api.d.ts +4 -0
- package/dist/storage/api.js +40 -0
- package/dist/storage/attachments.d.ts +146 -0
- package/dist/storage/attachments.js +733 -0
- package/dist/storage/authorization.d.ts +38 -0
- package/dist/storage/authorization.js +83 -0
- package/dist/storage/file-access.d.ts +17 -0
- package/dist/storage/file-access.js +8 -0
- package/dist/storage/limits.d.ts +12 -0
- package/dist/storage/limits.js +17 -0
- package/dist/storage/maintenance-auth.d.ts +20 -0
- package/dist/storage/maintenance-auth.js +24 -0
- package/dist/storage/maintenance.d.ts +11 -0
- package/dist/storage/maintenance.js +67 -0
- package/dist/storage/neon.d.ts +4 -0
- package/dist/storage/neon.js +318 -0
- package/dist/storage/operator.d.ts +11 -0
- package/dist/storage/operator.js +30 -0
- package/dist/storage/provider.d.ts +93 -0
- package/dist/storage/provider.js +36 -0
- package/dist/storage/sessions.d.ts +184 -0
- package/dist/storage/sessions.js +688 -0
- package/dist/storage/tables.d.ts +54 -0
- package/dist/storage/tables.js +205 -0
- package/dist/storage/transfers.d.ts +16 -0
- package/dist/storage/transfers.js +153 -0
- package/dist/storage/writes.d.ts +7 -0
- package/dist/storage/writes.js +88 -0
- package/dist/telegram.d.ts +35 -0
- package/dist/telegram.js +173 -0
- package/dist/user-identity.d.ts +28 -0
- package/dist/user-identity.js +106 -0
- package/dist/user.d.ts +75 -0
- package/dist/user.js +111 -0
- package/dist/warehouse-backed.d.ts +6 -0
- package/dist/warehouse-backed.js +495 -0
- package/dist/webhook-token.d.ts +11 -0
- package/dist/webhook-token.js +18 -0
- package/dist/webhooks.d.ts +40 -0
- package/dist/webhooks.js +55 -0
- package/dist/wire.d.ts +10 -0
- package/dist/wire.js +35 -0
- package/dist/workflow-runtime.d.ts +116 -0
- package/dist/workflow-runtime.js +109 -0
- package/dist/workflow-topics.d.ts +28 -0
- package/dist/workflow-topics.js +28 -0
- package/dist/workflow.d.ts +284 -0
- package/dist/workflow.js +259 -0
- package/dist/workflows.d.ts +24 -0
- package/dist/workflows.js +18 -0
- package/package.json +127 -4
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import type { SqlClient } from "effect/unstable/sql";
|
|
3
|
+
import type { SqlError } from "effect/unstable/sql/SqlError";
|
|
4
|
+
/**
|
|
5
|
+
* Invalidate copied SDK credentials and runnable state on a verified, unexposed child database.
|
|
6
|
+
* The caller owns branch verification and provider-side Neon Auth invalidation/configuration.
|
|
7
|
+
* No provider-owned schema, business record, history, user, role assignment or member block is changed;
|
|
8
|
+
* of the `user_identity` records, only channel accounts are deleted, as their legacy rows are.
|
|
9
|
+
* Safe to repeat, including databases created by older SDKs with fewer runtime tables.
|
|
10
|
+
*/
|
|
11
|
+
export declare function preparePreviewDatabase({ sql, }: {
|
|
12
|
+
readonly sql: SqlClient.SqlClient;
|
|
13
|
+
}): Effect.Effect<void, SqlError>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { AGENT_TASKS_TABLE, ATTACHMENTS_TABLE, SIGN_IN_EMAILS_TABLE, WORKFLOW_STARTS_TABLE, } from "../storage/tables.js";
|
|
3
|
+
import { CONFIRMATION_TABLE } from "../runtime/confirmations.js";
|
|
4
|
+
import { CHANNEL_ORIGIN_SQL, USER_IDENTITY_TABLE } from "../runtime/user-identity-sql.js";
|
|
5
|
+
import { AGENT_COUNTERS_TABLE, AGENT_IDENTITIES_TABLE, AGENT_PAIRINGS_TABLE, API_KEYS_TABLE, IDENTITY_NOTICES_TABLE, OAUTH_TABLES, quoteIdentifier, } from "./storage.js";
|
|
6
|
+
/**
|
|
7
|
+
* Invalidate copied SDK credentials and runnable state on a verified, unexposed child database.
|
|
8
|
+
* The caller owns branch verification and provider-side Neon Auth invalidation/configuration.
|
|
9
|
+
* No provider-owned schema, business record, history, user, role assignment or member block is changed;
|
|
10
|
+
* of the `user_identity` records, only channel accounts are deleted, as their legacy rows are.
|
|
11
|
+
* Safe to repeat, including databases created by older SDKs with fewer runtime tables.
|
|
12
|
+
*/
|
|
13
|
+
export function preparePreviewDatabase({ sql, }) {
|
|
14
|
+
return sql.withTransaction(Effect.gen(function* () {
|
|
15
|
+
yield* sql.unsafe("SET LOCAL statement_timeout = '30s'");
|
|
16
|
+
yield* sql.unsafe("SET LOCAL lock_timeout = '5s'");
|
|
17
|
+
yield* sql.unsafe("SELECT pg_advisory_xact_lock(hashtextextended('segmentstream.ontology.migration', 0))");
|
|
18
|
+
const tables = yield* sql.unsafe("SELECT tablename AS name FROM pg_catalog.pg_tables WHERE schemaname = current_schema()");
|
|
19
|
+
const present = new Set(tables.map(({ name }) => name));
|
|
20
|
+
// Emptied in one TRUNCATE, which takes the same time at any size: replication bookkeeping
|
|
21
|
+
// copied from production reaches gigabytes. Without CASCADE it fails when a table outside
|
|
22
|
+
// this list references one in it, so workspace-owned references are never erased.
|
|
23
|
+
const clear = [
|
|
24
|
+
...[...OAUTH_TABLES].reverse(),
|
|
25
|
+
"_federation_sessions",
|
|
26
|
+
API_KEYS_TABLE,
|
|
27
|
+
// Channel lifecycle and limits are durable policy, including sticky member blocks.
|
|
28
|
+
// List ephemeral agent state explicitly so new policy tables are never cleared by default.
|
|
29
|
+
CONFIRMATION_TABLE,
|
|
30
|
+
AGENT_COUNTERS_TABLE,
|
|
31
|
+
AGENT_IDENTITIES_TABLE,
|
|
32
|
+
IDENTITY_NOTICES_TABLE,
|
|
33
|
+
AGENT_PAIRINGS_TABLE,
|
|
34
|
+
AGENT_TASKS_TABLE,
|
|
35
|
+
SIGN_IN_EMAILS_TABLE,
|
|
36
|
+
WORKFLOW_STARTS_TABLE,
|
|
37
|
+
ATTACHMENTS_TABLE,
|
|
38
|
+
"_blob_action_results",
|
|
39
|
+
"_blob_uploads",
|
|
40
|
+
"_ontology_replication_delivery",
|
|
41
|
+
"_ontology_replication_segments",
|
|
42
|
+
"_ontology_replication_control_jobs",
|
|
43
|
+
"_ontology_replication_source_replacements",
|
|
44
|
+
"_ontology_replication_epochs",
|
|
45
|
+
"_ontology_replication_scans",
|
|
46
|
+
"_ontology_replication_baselines",
|
|
47
|
+
"_ontology_replication_receipts",
|
|
48
|
+
"_ontology_replication_targets",
|
|
49
|
+
];
|
|
50
|
+
if (present.has("_ontology_replication")) {
|
|
51
|
+
yield* sql.unsafe(`UPDATE _ontology_replication SET enabled=false,
|
|
52
|
+
source_id=gen_random_uuid(), active_generation=NULL, selection='{}'::jsonb WHERE id`);
|
|
53
|
+
}
|
|
54
|
+
const cleared = clear.filter((table) => present.has(table));
|
|
55
|
+
if (cleared.length > 0) {
|
|
56
|
+
yield* sql.unsafe(`TRUNCATE ${cleared.map(quoteIdentifier).join(", ")}`);
|
|
57
|
+
}
|
|
58
|
+
// Channel accounts are cleared with their legacy rows: the copy's agent acts for no one until
|
|
59
|
+
// members pair again. Sign-in identities stay, as Neon Auth and the user records do.
|
|
60
|
+
if (present.has(USER_IDENTITY_TABLE)) {
|
|
61
|
+
yield* sql.unsafe(`DELETE FROM ${quoteIdentifier(USER_IDENTITY_TABLE)} ` +
|
|
62
|
+
`WHERE "origin"::text IN ${CHANNEL_ORIGIN_SQL}`);
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { type EntityManifest, type PropertyManifest, type RelationshipManifest } from "../manifest.js";
|
|
2
|
+
import type { PropertyType } from "../property.js";
|
|
3
|
+
/**
|
|
4
|
+
* The physical mapping of an ontology onto Postgres. The planner creates exactly these objects and the
|
|
5
|
+
* runtime reads and writes them, so every name here is part of the storage contract.
|
|
6
|
+
*/
|
|
7
|
+
/** Postgres silently truncates longer identifiers; the planner refuses names that would be truncated. */
|
|
8
|
+
export declare const MAX_IDENTIFIER_LENGTH = 63;
|
|
9
|
+
/** The one-row table that records the applied manifest. */
|
|
10
|
+
export declare const CATALOG_TABLE = "_ontology";
|
|
11
|
+
/** The built-in user entity's table. System columns and history principals refer to it. */
|
|
12
|
+
export declare const USER_TABLE = "user";
|
|
13
|
+
/** System properties and their columns, present on every entity table. */
|
|
14
|
+
export declare const SYSTEM_COLUMNS: {
|
|
15
|
+
readonly id: "id";
|
|
16
|
+
readonly created_at: "created_at";
|
|
17
|
+
readonly updated_at: "updated_at";
|
|
18
|
+
readonly created_by: "created_by";
|
|
19
|
+
readonly updated_by: "updated_by";
|
|
20
|
+
};
|
|
21
|
+
/** The kinds of change a history row records. */
|
|
22
|
+
export declare const HISTORY_KINDS: readonly ["create", "update", "delete", "link", "unlink"];
|
|
23
|
+
/**
|
|
24
|
+
* Column types of every property type except `select`, which gets an enum type of its own, and
|
|
25
|
+
* `list`, which has no column: the runtime reads it from the platform's tables.
|
|
26
|
+
*/
|
|
27
|
+
export declare const COLUMN_TYPES: {
|
|
28
|
+
readonly text: "text";
|
|
29
|
+
readonly email: "text";
|
|
30
|
+
readonly url: "text";
|
|
31
|
+
readonly integer: "bigint";
|
|
32
|
+
readonly number: "double precision";
|
|
33
|
+
readonly boolean: "boolean";
|
|
34
|
+
readonly date: "date";
|
|
35
|
+
readonly timestamp: "timestamptz";
|
|
36
|
+
readonly json: "jsonb";
|
|
37
|
+
readonly blob: "uuid";
|
|
38
|
+
};
|
|
39
|
+
/** Whether a property has a column: every type but `list`. */
|
|
40
|
+
export declare function isStoredProperty(property: {
|
|
41
|
+
readonly type: PropertyType;
|
|
42
|
+
}): boolean;
|
|
43
|
+
/** The entity with only the properties that have a column, as storage and migrations see it. */
|
|
44
|
+
export declare function storedEntity(entity: EntityManifest): EntityManifest;
|
|
45
|
+
export interface ColumnStorage {
|
|
46
|
+
readonly name: string;
|
|
47
|
+
/** The SQL type, with enum types quoted. */
|
|
48
|
+
readonly type: string;
|
|
49
|
+
readonly notNull: boolean;
|
|
50
|
+
/** The SQL default expression. */
|
|
51
|
+
readonly default?: string;
|
|
52
|
+
}
|
|
53
|
+
/** A named `CHECK` or `FOREIGN KEY` table constraint. */
|
|
54
|
+
export interface ConstraintStorage {
|
|
55
|
+
readonly name: string;
|
|
56
|
+
readonly kind: "check" | "foreignKey";
|
|
57
|
+
/** The constraint after `CONSTRAINT <name>`, for example `CHECK ("fit_score" >= 0)`. */
|
|
58
|
+
readonly definition: string;
|
|
59
|
+
/** The table a foreign key points at. */
|
|
60
|
+
readonly references?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface IndexStorage {
|
|
63
|
+
readonly name: string;
|
|
64
|
+
readonly table: string;
|
|
65
|
+
readonly columns: ReadonlyArray<string>;
|
|
66
|
+
readonly unique: boolean;
|
|
67
|
+
/** Why the index exists, for plan descriptions. */
|
|
68
|
+
readonly origin: string;
|
|
69
|
+
}
|
|
70
|
+
export interface TableStorage {
|
|
71
|
+
readonly name: string;
|
|
72
|
+
readonly columns: ReadonlyArray<ColumnStorage>;
|
|
73
|
+
/** The primary key constraint; its index has the same name. */
|
|
74
|
+
readonly primaryKey: {
|
|
75
|
+
readonly name: string;
|
|
76
|
+
readonly columns: ReadonlyArray<string>;
|
|
77
|
+
};
|
|
78
|
+
readonly constraints: ReadonlyArray<ConstraintStorage>;
|
|
79
|
+
readonly indexes: ReadonlyArray<IndexStorage>;
|
|
80
|
+
}
|
|
81
|
+
export interface EnumStorage {
|
|
82
|
+
readonly name: string;
|
|
83
|
+
/** The option values in declaration order, which is also their sort order. */
|
|
84
|
+
readonly values: ReadonlyArray<string>;
|
|
85
|
+
}
|
|
86
|
+
/** Everything one entity stores: its table, its history table, its enum types and its join tables. */
|
|
87
|
+
export interface EntityStorage {
|
|
88
|
+
readonly entity: string;
|
|
89
|
+
readonly table: TableStorage;
|
|
90
|
+
readonly history: TableStorage;
|
|
91
|
+
readonly enums: ReadonlyArray<EnumStorage>;
|
|
92
|
+
/** One join table per `rel.many` the entity declares. */
|
|
93
|
+
readonly joins: ReadonlyArray<TableStorage>;
|
|
94
|
+
}
|
|
95
|
+
/** `"name"`, with embedded quotes doubled. */
|
|
96
|
+
export declare function quoteIdentifier(name: string): string;
|
|
97
|
+
/** `'value'`, with embedded quotes doubled (standard_conforming_strings is on). */
|
|
98
|
+
export declare function quoteLiteral(value: string): string;
|
|
99
|
+
/** `fitScore` → `fit_score`. New property names already use snake_case; conversion remains for historical manifests. */
|
|
100
|
+
export declare function snakeCase(name: string): string;
|
|
101
|
+
/** An entity's table is named after the entity: `lead`, `user`. */
|
|
102
|
+
export declare function tableName(entity: string): string;
|
|
103
|
+
export declare function historyTableName(entity: string): string;
|
|
104
|
+
/** The column of a property: `fitScore` → `fit_score`. */
|
|
105
|
+
export declare function columnName(property: string): string;
|
|
106
|
+
/** The key column of a `rel.one`: `owner` → `owner_id`. */
|
|
107
|
+
export declare function relationshipColumnName(relationship: string): string;
|
|
108
|
+
/** The join table of a `rel.many`: `lead` + `tags` → `lead_tags`. */
|
|
109
|
+
export declare function joinTableName(entity: string, relationship: string): string;
|
|
110
|
+
/**
|
|
111
|
+
* The two key columns of a join table: `<entity>_id` and `<target>_id`. A relationship from an entity to
|
|
112
|
+
* itself names the target column after the relationship instead (`lead_id`, `related_id`).
|
|
113
|
+
*/
|
|
114
|
+
export declare function joinColumnNames(input: {
|
|
115
|
+
readonly entity: string;
|
|
116
|
+
readonly relationship: string;
|
|
117
|
+
readonly target: string;
|
|
118
|
+
}): {
|
|
119
|
+
readonly source: string;
|
|
120
|
+
readonly target: string;
|
|
121
|
+
};
|
|
122
|
+
/** The enum type of a `select` property: `lead` + `status` → `lead_status`. */
|
|
123
|
+
export declare function enumTypeName(entity: string, property: string): string;
|
|
124
|
+
/** The unique index of a `unique: true` property. */
|
|
125
|
+
export declare function uniqueIndexName(entity: string, property: string): string;
|
|
126
|
+
/** The `CHECK` constraint holding a property's `maxLength`, `min` and `max`. */
|
|
127
|
+
export declare function checkConstraintName(entity: string, property: string): string;
|
|
128
|
+
export declare function foreignKeyName(table: string, column: string): string;
|
|
129
|
+
export declare function primaryKeyName(table: string): string;
|
|
130
|
+
/** An index over columns: `lead` + `status, created_at` → `lead_status_created_at_idx`. */
|
|
131
|
+
export declare function indexName(table: string, columns: ReadonlyArray<string>): string;
|
|
132
|
+
/**
|
|
133
|
+
* The column of an index field: a system property (`created_at` → `created_at`), a property, or a
|
|
134
|
+
* stored `rel.one` (`owner` → `owner_id`). Returns undefined for anything else, value-matched
|
|
135
|
+
* relationships included: they have no column.
|
|
136
|
+
*/
|
|
137
|
+
export declare function fieldColumnName(entity: EntityManifest, field: string): string | undefined;
|
|
138
|
+
/** The SQL default of a property, or undefined when it declares none. */
|
|
139
|
+
export declare function defaultExpression(property: PropertyManifest): string | undefined;
|
|
140
|
+
/** The body of a property's `CHECK` constraint, or undefined when it has no bounds. */
|
|
141
|
+
export declare function checkExpression(property: PropertyManifest): string | undefined;
|
|
142
|
+
export declare function propertyColumn(entity: string, property: PropertyManifest): ColumnStorage;
|
|
143
|
+
export declare function propertyCheck(entity: string, property: PropertyManifest): ConstraintStorage | undefined;
|
|
144
|
+
export declare function propertyEnum(entity: string, property: PropertyManifest): EnumStorage | undefined;
|
|
145
|
+
export declare function blobForeignKey(entity: string, property: PropertyManifest): ConstraintStorage;
|
|
146
|
+
/** The key column of a `rel.one`. */
|
|
147
|
+
export declare function relationshipColumn(relationship: RelationshipManifest): ColumnStorage;
|
|
148
|
+
/** The foreign key of a `rel.one`, with its `onDelete` action. */
|
|
149
|
+
export declare function relationshipForeignKey(entity: string, relationship: RelationshipManifest): ConstraintStorage;
|
|
150
|
+
/** The join table of a `rel.many`: both keys cascade, and the target key is indexed. */
|
|
151
|
+
export declare function joinTable(entity: string, relationship: RelationshipManifest): TableStorage;
|
|
152
|
+
/** Covers rolling activity counts without reading the JSON history payloads. */
|
|
153
|
+
export declare function historyActivityIndex(entity: string): IndexStorage;
|
|
154
|
+
/** `<entity>_history`: one row per change to a record, written by the runtime. */
|
|
155
|
+
export declare function historyTable(entity: string): TableStorage;
|
|
156
|
+
/** The table, history table, enum types and join tables of an entity. */
|
|
157
|
+
export declare function entityStorage(declared: EntityManifest): EntityStorage;
|
|
158
|
+
/** The `_ontology` catalog table. */
|
|
159
|
+
export declare const CATALOG_TABLE_DDL: string;
|
|
160
|
+
/** Role assignments: the roles a user holds beyond the `member` every active member has. */
|
|
161
|
+
export declare const USER_ROLES_TABLE = "_user_roles";
|
|
162
|
+
/**
|
|
163
|
+
* API keys. A key is `ssk_<key id>.<secret>`: the key id is stored in clear to find the row, the
|
|
164
|
+
* secret only as a salted PBKDF2 hash.
|
|
165
|
+
*/
|
|
166
|
+
export declare const API_KEYS_TABLE = "_api_keys";
|
|
167
|
+
/** OAuth clients that registered themselves to connect agents to the MCP server. */
|
|
168
|
+
export declare const OAUTH_CLIENTS_TABLE = "_oauth_clients";
|
|
169
|
+
/** Authorization requests waiting for a member's consent, for a few minutes. */
|
|
170
|
+
export declare const OAUTH_REQUESTS_TABLE = "_oauth_requests";
|
|
171
|
+
/** What a member allowed a client to do: revoking a grant stops its tokens. */
|
|
172
|
+
export declare const OAUTH_GRANTS_TABLE = "_oauth_grants";
|
|
173
|
+
/** Authorization codes, access tokens and refresh tokens, stored only as SHA-256 hashes. */
|
|
174
|
+
export declare const OAUTH_TOKENS_TABLE = "_oauth_tokens";
|
|
175
|
+
/** The OAuth tables, in the order they are created. */
|
|
176
|
+
export declare const OAUTH_TABLES: ReadonlyArray<string>;
|
|
177
|
+
/** The OAuth tables of the MCP server's authorization server. Every statement is idempotent. */
|
|
178
|
+
export declare const OAUTH_TABLES_DDL: ReadonlyArray<string>;
|
|
179
|
+
/** Channel accounts waiting, for ten minutes, for a member to claim them with a short code. */
|
|
180
|
+
export declare const AGENT_PAIRINGS_TABLE = "_agent_pairings";
|
|
181
|
+
/**
|
|
182
|
+
* Channel accounts paired with members, as SDKs before `user_identity` read them. The built-in
|
|
183
|
+
* `user_identity` entity holds them now, with the same ids; this table is still written beside it
|
|
184
|
+
* so that an earlier SDK deployed again finds them. See docs/workspace-user-identities.md.
|
|
185
|
+
*/
|
|
186
|
+
export declare const AGENT_IDENTITIES_TABLE = "_agent_identities";
|
|
187
|
+
/**
|
|
188
|
+
* When a provisioned channel account was last shown the first-contact notice, keyed by its
|
|
189
|
+
* `user_identity` id: operational state, not identity data. It has no foreign key, so that an
|
|
190
|
+
* earlier SDK may still drop the `user_identity` table it does not know.
|
|
191
|
+
*/
|
|
192
|
+
export declare const IDENTITY_NOTICES_TABLE = "_identity_notices";
|
|
193
|
+
/** Durable fixed-window admission and turn counters. */
|
|
194
|
+
export declare const AGENT_COUNTERS_TABLE = "_agent_counters";
|
|
195
|
+
/** User-scoped channel lifecycle and trusted effective limits shared across entry points. */
|
|
196
|
+
export declare const CHANNEL_USERS_TABLE = "_channel_users";
|
|
197
|
+
export declare const CHANNEL_LIMITS_TABLE = "_channel_limits";
|
|
198
|
+
/** The agent's tables, in the order they are created. */
|
|
199
|
+
export declare const AGENT_TABLES: ReadonlyArray<string>;
|
|
200
|
+
/**
|
|
201
|
+
* The tables of the app's agent: pairing codes, stored only as SHA-256 hashes, the legacy channel
|
|
202
|
+
* identities they create, and the first-contact notices of `user_identity` channel accounts. An
|
|
203
|
+
* account and a member each have at most one live identity per provider. Every statement is
|
|
204
|
+
* idempotent.
|
|
205
|
+
*/
|
|
206
|
+
export declare const AGENT_TABLES_DDL: ReadonlyArray<string>;
|
|
207
|
+
/**
|
|
208
|
+
* The runtime's own tables beside the catalog. They are created with it, after the entity tables
|
|
209
|
+
* because they refer to the built-in user table, and every statement is idempotent.
|
|
210
|
+
*/
|
|
211
|
+
export declare const ACTION_ATTRIBUTION_TABLE = "_ontology_action_attribution";
|
|
212
|
+
/** Runtime audit metadata deliberately has no foreign key: deleted records retain their history. */
|
|
213
|
+
export declare const ACTION_ATTRIBUTION_DDL: ReadonlyArray<string>;
|
|
214
|
+
export declare const RUNTIME_TABLES_DDL: ReadonlyArray<string>;
|
|
215
|
+
export declare function columnDefinition(column: ColumnStorage): string;
|
|
216
|
+
export declare function constraintDefinition(constraint: {
|
|
217
|
+
readonly name: string;
|
|
218
|
+
readonly definition: string;
|
|
219
|
+
}): string;
|
|
220
|
+
/** `CREATE TABLE` with every column, the primary key and the given constraints. */
|
|
221
|
+
export declare function createTableStatement(table: TableStorage, constraints?: ReadonlyArray<ConstraintStorage>): string;
|
|
222
|
+
export declare function createIndexStatement(index: IndexStorage, options?: {
|
|
223
|
+
readonly concurrently?: boolean;
|
|
224
|
+
}): string;
|
|
225
|
+
export declare function createEnumStatement(storage: EnumStorage): string;
|
|
226
|
+
export declare function addConstraintStatement(table: string, constraint: ConstraintStorage): string;
|