@segmentstream/ontology 0.0.0-stage → 0.92.1
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,30 @@
|
|
|
1
|
+
import * as PgClient from "@effect/sql-pg/PgClient";
|
|
2
|
+
import { Effect, Redacted } from "effect";
|
|
3
|
+
import { SqlClient } from "effect/unstable/sql";
|
|
4
|
+
import { postgresTls } from "../runtime/postgres-tls.js";
|
|
5
|
+
import { maintainBlobStorage } from "./maintenance.js";
|
|
6
|
+
import { neonBlobProvider } from "./neon.js";
|
|
7
|
+
import { BlobStorageError } from "./provider.js";
|
|
8
|
+
/** Scheduler capability that survives removal of blob declarations. Never reads file contents. */
|
|
9
|
+
export function runBlobStorageMaintenance(input) {
|
|
10
|
+
const limit = input.limit ?? 100;
|
|
11
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 100) {
|
|
12
|
+
return Effect.fail(new BlobStorageError({ operation: "maintenance.limit" }));
|
|
13
|
+
}
|
|
14
|
+
return Effect.gen(function* () {
|
|
15
|
+
const sql = yield* SqlClient.SqlClient;
|
|
16
|
+
const [tables] = yield* sql `
|
|
17
|
+
SELECT to_regclass('public._blob_uploads')::text AS uploads
|
|
18
|
+
`;
|
|
19
|
+
if (!tables?.uploads) {
|
|
20
|
+
return { removed: 0, hasMore: false };
|
|
21
|
+
}
|
|
22
|
+
const provider = yield* Effect.acquireRelease(Effect.sync(() => neonBlobProvider(Redacted.value(input.binding))), (provider) => Effect.sync(() => provider.close?.()));
|
|
23
|
+
return yield* maintainBlobStorage(sql, provider, limit);
|
|
24
|
+
}).pipe(Effect.provide(PgClient.layer({
|
|
25
|
+
url: input.databaseUrl,
|
|
26
|
+
ssl: postgresTls(input.databaseUrl),
|
|
27
|
+
maxConnections: 1,
|
|
28
|
+
applicationName: "segmentstream-ontology-maintenance",
|
|
29
|
+
})), Effect.scoped);
|
|
30
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Context, Schema, type Effect } from "effect";
|
|
2
|
+
import { type DeploymentObservation } from "../deployment.js";
|
|
3
|
+
/** Validated deployment binding, independent of the action and browser contracts. */
|
|
4
|
+
export declare const BlobStorageBinding: Schema.Struct<{
|
|
5
|
+
readonly projectId: Schema.String;
|
|
6
|
+
readonly branchId: Schema.String;
|
|
7
|
+
/** Required on preview bindings, so a copied production binding fails closed. */
|
|
8
|
+
readonly deploymentId: Schema.optionalKey<Schema.String>;
|
|
9
|
+
/** Preview source branch fence, supplied from the provisioner's verified parent. */
|
|
10
|
+
readonly productionBranchId: Schema.optionalKey<Schema.String>;
|
|
11
|
+
readonly endpoint: Schema.String;
|
|
12
|
+
readonly region: Schema.String;
|
|
13
|
+
readonly bucket: Schema.Literal<"ontology-files">;
|
|
14
|
+
readonly accessKeyId: Schema.String;
|
|
15
|
+
readonly secretAccessKey: Schema.String;
|
|
16
|
+
readonly quotaBytes: Schema.Int;
|
|
17
|
+
}>;
|
|
18
|
+
export type BlobStorageBinding = typeof BlobStorageBinding.Type;
|
|
19
|
+
/** A copied production binding is never rebound or used by a preview runtime. */
|
|
20
|
+
export declare function validateDeploymentStorage(binding: BlobStorageBinding, deployment?: DeploymentObservation): void;
|
|
21
|
+
declare const BlobStorageError_base: Schema.Class<BlobStorageError, Schema.TaggedStruct<"BlobStorageError", {
|
|
22
|
+
readonly operation: Schema.String;
|
|
23
|
+
readonly cause: Schema.optionalKey<Schema.Unknown>;
|
|
24
|
+
/** The provider explicitly refused initiation; no multipart upload was created. */
|
|
25
|
+
readonly initiationRejected: Schema.optionalKey<Schema.Boolean>;
|
|
26
|
+
}>, import("effect/Cause").YieldableError>;
|
|
27
|
+
export declare class BlobStorageError extends BlobStorageError_base {
|
|
28
|
+
}
|
|
29
|
+
export interface TransferGrant {
|
|
30
|
+
readonly url: string;
|
|
31
|
+
readonly method: "GET" | "PUT";
|
|
32
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
33
|
+
readonly expiresAt: string;
|
|
34
|
+
}
|
|
35
|
+
export interface StoredObject {
|
|
36
|
+
readonly size: number;
|
|
37
|
+
readonly contentType: string;
|
|
38
|
+
readonly sessionId: string;
|
|
39
|
+
}
|
|
40
|
+
declare const BlobProvider_base: Context.ServiceClass<BlobProvider, "@segmentstream/ontology/BlobProvider", {
|
|
41
|
+
readonly binding: BlobStorageBinding;
|
|
42
|
+
readonly close?: () => void;
|
|
43
|
+
readonly initiate: (input: {
|
|
44
|
+
key: string;
|
|
45
|
+
filename: string;
|
|
46
|
+
contentType: string;
|
|
47
|
+
sessionId: string;
|
|
48
|
+
}) => Effect.Effect<string, BlobStorageError>;
|
|
49
|
+
readonly signPart: (input: {
|
|
50
|
+
key: string;
|
|
51
|
+
uploadId: string;
|
|
52
|
+
partNumber: number;
|
|
53
|
+
size: number;
|
|
54
|
+
}) => Effect.Effect<TransferGrant, BlobStorageError>;
|
|
55
|
+
readonly parts: (input: {
|
|
56
|
+
key: string;
|
|
57
|
+
uploadId: string;
|
|
58
|
+
}) => Effect.Effect<ReadonlyArray<{
|
|
59
|
+
number: number;
|
|
60
|
+
size: number;
|
|
61
|
+
etag: string;
|
|
62
|
+
}>, BlobStorageError>;
|
|
63
|
+
readonly complete: (input: {
|
|
64
|
+
key: string;
|
|
65
|
+
uploadId: string;
|
|
66
|
+
parts: ReadonlyArray<{
|
|
67
|
+
number: number;
|
|
68
|
+
etag: string;
|
|
69
|
+
}>;
|
|
70
|
+
}) => Effect.Effect<void, BlobStorageError>;
|
|
71
|
+
readonly inspect: (key: string) => Effect.Effect<StoredObject | undefined, BlobStorageError>;
|
|
72
|
+
/** Hash immutable content without buffering it. */
|
|
73
|
+
readonly sha256: (key: string, size: number) => Effect.Effect<string, BlobStorageError>;
|
|
74
|
+
readonly readPrefix: (key: string) => Effect.Effect<Uint8Array, BlobStorageError>;
|
|
75
|
+
/** The whole object, at most `maxBytes`; for verifying an agent attachment's digest. */
|
|
76
|
+
readonly read: (key: string, maxBytes: number) => Effect.Effect<Uint8Array, BlobStorageError>;
|
|
77
|
+
readonly download: (input: {
|
|
78
|
+
key: string;
|
|
79
|
+
filename: string;
|
|
80
|
+
contentType: string;
|
|
81
|
+
inline: boolean;
|
|
82
|
+
}) => Effect.Effect<TransferGrant, BlobStorageError>;
|
|
83
|
+
readonly abort: (input: {
|
|
84
|
+
key: string;
|
|
85
|
+
uploadId: string;
|
|
86
|
+
}) => Effect.Effect<void, BlobStorageError>;
|
|
87
|
+
readonly remove: (key: string) => Effect.Effect<void, BlobStorageError>;
|
|
88
|
+
readonly pending: (key: string) => Effect.Effect<ReadonlyArray<string>, BlobStorageError>;
|
|
89
|
+
}>;
|
|
90
|
+
/** Private provider capability. Actions never receive storage credentials or this service. */
|
|
91
|
+
export declare class BlobProvider extends BlobProvider_base {
|
|
92
|
+
}
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Context, Schema } from "effect";
|
|
2
|
+
import { DeploymentAdmissionError } from "../deployment.js";
|
|
3
|
+
/** Validated deployment binding, independent of the action and browser contracts. */
|
|
4
|
+
export const BlobStorageBinding = Schema.Struct({
|
|
5
|
+
projectId: Schema.String,
|
|
6
|
+
branchId: Schema.String,
|
|
7
|
+
/** Required on preview bindings, so a copied production binding fails closed. */
|
|
8
|
+
deploymentId: Schema.optionalKey(Schema.String),
|
|
9
|
+
/** Preview source branch fence, supplied from the provisioner's verified parent. */
|
|
10
|
+
productionBranchId: Schema.optionalKey(Schema.String),
|
|
11
|
+
endpoint: Schema.String,
|
|
12
|
+
region: Schema.String,
|
|
13
|
+
bucket: Schema.Literal("ontology-files"),
|
|
14
|
+
accessKeyId: Schema.String,
|
|
15
|
+
secretAccessKey: Schema.String,
|
|
16
|
+
quotaBytes: Schema.Int.check(Schema.isGreaterThan(0)),
|
|
17
|
+
});
|
|
18
|
+
/** A copied production binding is never rebound or used by a preview runtime. */
|
|
19
|
+
export function validateDeploymentStorage(binding, deployment) {
|
|
20
|
+
if (deployment?.target === "preview" &&
|
|
21
|
+
(binding.deploymentId !== deployment.deploymentId ||
|
|
22
|
+
!binding.productionBranchId ||
|
|
23
|
+
binding.productionBranchId === binding.branchId)) {
|
|
24
|
+
throw new DeploymentAdmissionError("preview_storage_binding_invalid");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export class BlobStorageError extends Schema.TaggedError()("BlobStorageError", {
|
|
28
|
+
operation: Schema.String,
|
|
29
|
+
cause: Schema.optionalKey(Schema.Unknown),
|
|
30
|
+
/** The provider explicitly refused initiation; no multipart upload was created. */
|
|
31
|
+
initiationRejected: Schema.optionalKey(Schema.Boolean),
|
|
32
|
+
}) {
|
|
33
|
+
}
|
|
34
|
+
/** Private provider capability. Actions never receive storage credentials or this service. */
|
|
35
|
+
export class BlobProvider extends Context.Service()("@segmentstream/ontology/BlobProvider") {
|
|
36
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import type { SqlClient } from "effect/unstable/sql";
|
|
3
|
+
import { type SqlError } from "effect/unstable/sql/SqlError";
|
|
4
|
+
import { ActionRejected, Conflict, NotFound } from "../errors.js";
|
|
5
|
+
import { Files } from "../files.js";
|
|
6
|
+
import type { FileInvocation } from "./file-access.js";
|
|
7
|
+
import type { Ontology } from "../ontology.js";
|
|
8
|
+
import type { Principal } from "../runtime.js";
|
|
9
|
+
import { BlobStorageError, type BlobProvider } from "./provider.js";
|
|
10
|
+
export declare const BeginUpload: Schema.encodeKeys<Schema.Struct<{
|
|
11
|
+
readonly entity: Schema.String;
|
|
12
|
+
readonly property: Schema.String;
|
|
13
|
+
readonly action: Schema.String;
|
|
14
|
+
readonly recordId: Schema.optionalKey<Schema.String>;
|
|
15
|
+
readonly createIntent: Schema.optionalKey<Schema.String>;
|
|
16
|
+
readonly idempotencyKey: Schema.optionalKey<Schema.String>;
|
|
17
|
+
readonly filename: Schema.String;
|
|
18
|
+
readonly contentType: Schema.String;
|
|
19
|
+
readonly size: Schema.Int;
|
|
20
|
+
}>, {
|
|
21
|
+
readonly recordId: "record_id";
|
|
22
|
+
readonly createIntent: "create_intent";
|
|
23
|
+
readonly idempotencyKey: "idempotency_key";
|
|
24
|
+
readonly contentType: "content_type";
|
|
25
|
+
}>;
|
|
26
|
+
export type BeginUpload = typeof BeginUpload.Type;
|
|
27
|
+
export declare const UploadView: Schema.encodeKeys<Schema.Struct<{
|
|
28
|
+
readonly id: Schema.String;
|
|
29
|
+
readonly state: Schema.String;
|
|
30
|
+
readonly expiresAt: Schema.String;
|
|
31
|
+
readonly ticket: Schema.optionalKey<Schema.decodeTo<Schema.Struct<{
|
|
32
|
+
readonly uploadId: Schema.String;
|
|
33
|
+
}>, Schema.Struct<{
|
|
34
|
+
readonly upload_id: Schema.String;
|
|
35
|
+
}>, never, never>>;
|
|
36
|
+
}>, {
|
|
37
|
+
readonly expiresAt: "expires_at";
|
|
38
|
+
}>;
|
|
39
|
+
export declare const OpenUpload: Schema.encodeKeys<Schema.Struct<{
|
|
40
|
+
readonly id: Schema.String;
|
|
41
|
+
readonly state: Schema.String;
|
|
42
|
+
readonly filename: Schema.String;
|
|
43
|
+
readonly contentType: Schema.String;
|
|
44
|
+
readonly size: Schema.Int;
|
|
45
|
+
readonly entity: Schema.String;
|
|
46
|
+
readonly property: Schema.String;
|
|
47
|
+
readonly action: Schema.String;
|
|
48
|
+
readonly recordId: Schema.NullOr<Schema.String>;
|
|
49
|
+
readonly createIntent: Schema.NullOr<Schema.String>;
|
|
50
|
+
readonly createdAt: Schema.String;
|
|
51
|
+
readonly expiresAt: Schema.String;
|
|
52
|
+
readonly awaitingAction: Schema.Boolean;
|
|
53
|
+
}>, {
|
|
54
|
+
readonly contentType: "content_type";
|
|
55
|
+
readonly recordId: "record_id";
|
|
56
|
+
readonly createIntent: "create_intent";
|
|
57
|
+
readonly createdAt: "created_at";
|
|
58
|
+
readonly expiresAt: "expires_at";
|
|
59
|
+
readonly awaitingAction: "awaiting_action";
|
|
60
|
+
}>;
|
|
61
|
+
export declare const OpenUploads: Schema.Struct<{
|
|
62
|
+
readonly uploads: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
|
|
63
|
+
readonly id: Schema.String;
|
|
64
|
+
readonly state: Schema.String;
|
|
65
|
+
readonly filename: Schema.String;
|
|
66
|
+
readonly contentType: Schema.String;
|
|
67
|
+
readonly size: Schema.Int;
|
|
68
|
+
readonly entity: Schema.String;
|
|
69
|
+
readonly property: Schema.String;
|
|
70
|
+
readonly action: Schema.String;
|
|
71
|
+
readonly recordId: Schema.NullOr<Schema.String>;
|
|
72
|
+
readonly createIntent: Schema.NullOr<Schema.String>;
|
|
73
|
+
readonly createdAt: Schema.String;
|
|
74
|
+
readonly expiresAt: Schema.String;
|
|
75
|
+
readonly awaitingAction: Schema.Boolean;
|
|
76
|
+
}>, {
|
|
77
|
+
readonly contentType: "content_type";
|
|
78
|
+
readonly recordId: "record_id";
|
|
79
|
+
readonly createIntent: "create_intent";
|
|
80
|
+
readonly createdAt: "created_at";
|
|
81
|
+
readonly expiresAt: "expires_at";
|
|
82
|
+
readonly awaitingAction: "awaiting_action";
|
|
83
|
+
}>>;
|
|
84
|
+
readonly pending: Schema.Int;
|
|
85
|
+
readonly max: Schema.Int;
|
|
86
|
+
}>;
|
|
87
|
+
export declare const TransferGrant: Schema.encodeKeys<Schema.Struct<{
|
|
88
|
+
readonly url: Schema.String;
|
|
89
|
+
readonly method: Schema.Literals<readonly ["GET", "PUT"]>;
|
|
90
|
+
readonly headers: Schema.$Record<Schema.String, Schema.String>;
|
|
91
|
+
readonly expiresAt: Schema.String;
|
|
92
|
+
}>, {
|
|
93
|
+
readonly expiresAt: "expires_at";
|
|
94
|
+
}>;
|
|
95
|
+
export declare const DownloadRequest: Schema.encodeKeys<Schema.Struct<{
|
|
96
|
+
readonly revisionId: Schema.optionalKey<Schema.String>;
|
|
97
|
+
readonly inline: Schema.optionalKey<Schema.Boolean>;
|
|
98
|
+
}>, {
|
|
99
|
+
readonly revisionId: "revision_id";
|
|
100
|
+
}>;
|
|
101
|
+
/** Persisted phases surround every provider call; no external I/O holds a database transaction. */
|
|
102
|
+
export declare function blobRuntime(ontology: Ontology, sql: SqlClient.SqlClient, provider: BlobProvider["Service"], fetchImpl?: typeof fetch): {
|
|
103
|
+
begin: (input: BeginUpload, principal: Principal) => Effect.Effect<{
|
|
104
|
+
ticket?: {
|
|
105
|
+
uploadId: string;
|
|
106
|
+
} | undefined;
|
|
107
|
+
id: string;
|
|
108
|
+
state: string;
|
|
109
|
+
expiresAt: string;
|
|
110
|
+
}, ActionRejected | import("../errors.js").PermissionDenied | Conflict | NotFound | SqlError | BlobStorageError, never>;
|
|
111
|
+
list: (principal: Principal) => Effect.Effect<{
|
|
112
|
+
uploads: {
|
|
113
|
+
id: string;
|
|
114
|
+
state: string;
|
|
115
|
+
filename: string;
|
|
116
|
+
contentType: string;
|
|
117
|
+
size: number;
|
|
118
|
+
entity: string;
|
|
119
|
+
property: string;
|
|
120
|
+
action: string;
|
|
121
|
+
recordId: string | null;
|
|
122
|
+
createIntent: string | null;
|
|
123
|
+
createdAt: string;
|
|
124
|
+
expiresAt: string;
|
|
125
|
+
awaitingAction: boolean;
|
|
126
|
+
}[];
|
|
127
|
+
pending: number;
|
|
128
|
+
max: number;
|
|
129
|
+
}, SqlError, never>;
|
|
130
|
+
status: (id: string, principal: Principal) => Effect.Effect<{
|
|
131
|
+
ticket?: {
|
|
132
|
+
uploadId: string;
|
|
133
|
+
} | undefined;
|
|
134
|
+
id: string;
|
|
135
|
+
state: string;
|
|
136
|
+
expiresAt: string;
|
|
137
|
+
}, import("../errors.js").PermissionDenied | Conflict | NotFound | SqlError, never>;
|
|
138
|
+
target: (id: string, principal: Principal) => Effect.Effect<{
|
|
139
|
+
entity: string;
|
|
140
|
+
action: string;
|
|
141
|
+
property: string;
|
|
142
|
+
recordId: string | null;
|
|
143
|
+
createIntent: string | null;
|
|
144
|
+
}, import("../errors.js").PermissionDenied | Conflict | NotFound | SqlError, never>;
|
|
145
|
+
part: (id: string, principal: Principal) => Effect.Effect<import("./provider.js").TransferGrant, import("../errors.js").PermissionDenied | Conflict | NotFound | SqlError | BlobStorageError, never>;
|
|
146
|
+
complete: (id: string, principal: Principal) => Effect.Effect<{
|
|
147
|
+
ticket?: {
|
|
148
|
+
uploadId: string;
|
|
149
|
+
} | undefined;
|
|
150
|
+
id: string;
|
|
151
|
+
state: string;
|
|
152
|
+
expiresAt: string;
|
|
153
|
+
}, ActionRejected | import("../errors.js").PermissionDenied | Conflict | NotFound | SqlError | BlobStorageError, never>;
|
|
154
|
+
cancel: (id: string, principal: Principal) => Effect.Effect<{
|
|
155
|
+
ticket?: {
|
|
156
|
+
uploadId: string;
|
|
157
|
+
} | undefined;
|
|
158
|
+
id: string;
|
|
159
|
+
state: string;
|
|
160
|
+
expiresAt: string;
|
|
161
|
+
}, import("../errors.js").PermissionDenied | Conflict | NotFound | SqlError, never>;
|
|
162
|
+
download: (entityName: string, recordId: string, propertyName: string, input: {
|
|
163
|
+
readonly inline?: boolean | undefined;
|
|
164
|
+
readonly revisionId?: string | undefined;
|
|
165
|
+
}, principal: Principal) => Effect.Effect<import("./provider.js").TransferGrant, import("../errors.js").PermissionDenied | NotFound | SqlError | BlobStorageError, never>;
|
|
166
|
+
downloadFile: (entityName: string, recordId: string, propertyName: string, input: {
|
|
167
|
+
readonly inline?: boolean | undefined;
|
|
168
|
+
readonly revisionId?: string | undefined;
|
|
169
|
+
}, principal: Principal) => Effect.Effect<{
|
|
170
|
+
file: {
|
|
171
|
+
id: string;
|
|
172
|
+
entity: string;
|
|
173
|
+
property: string;
|
|
174
|
+
revision_id: string;
|
|
175
|
+
filename: string;
|
|
176
|
+
content_type: string;
|
|
177
|
+
size: number;
|
|
178
|
+
sha256: string;
|
|
179
|
+
};
|
|
180
|
+
download: import("./provider.js").TransferGrant;
|
|
181
|
+
}, import("../errors.js").PermissionDenied | NotFound | SqlError | BlobStorageError, never>;
|
|
182
|
+
files: (invocation: FileInvocation) => Files["Service"];
|
|
183
|
+
};
|
|
184
|
+
export type BlobRuntime = Omit<ReturnType<typeof blobRuntime>, "target" | "files" | "list"> & Partial<Pick<ReturnType<typeof blobRuntime>, "target" | "files" | "list">>;
|