studiograph 1.3.48-next.21 → 1.3.48-next.211
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 +26 -16
- package/dist/agent/agent-pool.d.ts +87 -3
- package/dist/agent/agent-pool.js +188 -15
- package/dist/agent/agent-pool.js.map +1 -1
- package/dist/agent/followups.d.ts +34 -0
- package/dist/agent/followups.js +52 -0
- package/dist/agent/followups.js.map +1 -0
- package/dist/agent/orchestrator.d.ts +101 -4
- package/dist/agent/orchestrator.js +464 -66
- package/dist/agent/orchestrator.js.map +1 -1
- package/dist/agent/prompts/entity-types-section.d.ts +34 -0
- package/dist/agent/prompts/entity-types-section.js +76 -0
- package/dist/agent/prompts/entity-types-section.js.map +1 -0
- package/dist/agent/prompts/system.md +112 -54
- package/dist/agent/skill-loader.d.ts +30 -17
- package/dist/agent/skill-loader.js +63 -30
- package/dist/agent/skill-loader.js.map +1 -1
- package/dist/agent/skills/artifact-canvas/skill.md +152 -0
- package/dist/agent/skills/entity-schema.md +75 -431
- package/dist/agent/skills/interview/entity-templates.md +38 -37
- package/dist/agent/skills/interview/question-domains.md +54 -49
- package/dist/agent/skills/interview/skill.md +84 -16
- package/dist/agent/skills/schema-rules.md +28 -28
- package/dist/agent/tools/artifact-tools.d.ts +124 -0
- package/dist/agent/tools/artifact-tools.js +207 -0
- package/dist/agent/tools/artifact-tools.js.map +1 -0
- package/dist/agent/tools/capture-tools.d.ts +31 -0
- package/dist/agent/tools/capture-tools.js +40 -0
- package/dist/agent/tools/capture-tools.js.map +1 -0
- package/dist/agent/tools/folder-tools.d.ts +47 -0
- package/dist/agent/tools/folder-tools.js +249 -0
- package/dist/agent/tools/folder-tools.js.map +1 -0
- package/dist/agent/tools/fs-tools.d.ts +6 -5
- package/dist/agent/tools/fs-tools.js +5 -5
- package/dist/agent/tools/fs-tools.js.map +1 -1
- package/dist/agent/tools/graph-tools.d.ts +48 -72
- package/dist/agent/tools/graph-tools.js +852 -329
- package/dist/agent/tools/graph-tools.js.map +1 -1
- package/dist/agent/tools/history-tools.d.ts +95 -0
- package/dist/agent/tools/history-tools.js +461 -0
- package/dist/agent/tools/history-tools.js.map +1 -0
- package/dist/agent/tools/load-skill.d.ts +6 -5
- package/dist/agent/tools/load-skill.js +3 -3
- package/dist/agent/tools/load-skill.js.map +1 -1
- package/dist/agent/tools/ops-tools.d.ts +5 -4
- package/dist/agent/tools/ops-tools.js +130 -236
- package/dist/agent/tools/ops-tools.js.map +1 -1
- package/dist/agent/tools/permission-tools.d.ts +87 -17
- package/dist/agent/tools/permission-tools.js +233 -43
- package/dist/agent/tools/permission-tools.js.map +1 -1
- package/dist/agent/tools/tool-loader.js +5 -4
- package/dist/agent/tools/tool-loader.js.map +1 -1
- package/dist/agent/tools/web-tools.js +58 -9
- package/dist/agent/tools/web-tools.js.map +1 -1
- package/dist/cli/commands/about.d.ts +1 -0
- package/dist/cli/commands/about.js +55 -3
- package/dist/cli/commands/about.js.map +1 -1
- package/dist/cli/commands/admin/audit-workspace.d.ts +23 -0
- package/dist/cli/commands/admin/audit-workspace.js +133 -0
- package/dist/cli/commands/admin/audit-workspace.js.map +1 -0
- package/dist/cli/commands/admin/audit.d.ts +21 -0
- package/dist/cli/commands/admin/audit.js +174 -0
- package/dist/cli/commands/admin/audit.js.map +1 -0
- package/dist/cli/commands/admin/backup.d.ts +54 -0
- package/dist/cli/commands/admin/backup.js +207 -0
- package/dist/cli/commands/admin/backup.js.map +1 -0
- package/dist/cli/commands/admin/folder.d.ts +11 -0
- package/dist/cli/commands/{collection.js → admin/folder.js} +33 -32
- package/dist/cli/commands/admin/folder.js.map +1 -0
- package/dist/cli/commands/admin/index.d.ts +16 -0
- package/dist/cli/commands/admin/index.js +46 -0
- package/dist/cli/commands/admin/index.js.map +1 -0
- package/dist/cli/commands/admin/migrate-assets.d.ts +53 -0
- package/dist/cli/commands/admin/migrate-assets.js +184 -0
- package/dist/cli/commands/admin/migrate-assets.js.map +1 -0
- package/dist/cli/commands/admin/migrate.d.ts +56 -0
- package/dist/cli/commands/admin/migrate.js +263 -0
- package/dist/cli/commands/admin/migrate.js.map +1 -0
- package/dist/cli/commands/admin/restore.d.ts +24 -0
- package/dist/cli/commands/admin/restore.js +228 -0
- package/dist/cli/commands/admin/restore.js.map +1 -0
- package/dist/cli/commands/admin/secrets.d.ts +23 -0
- package/dist/cli/commands/admin/secrets.js +256 -0
- package/dist/cli/commands/admin/secrets.js.map +1 -0
- package/dist/cli/commands/admin/settings.d.ts +28 -0
- package/dist/cli/commands/admin/settings.js +284 -0
- package/dist/cli/commands/admin/settings.js.map +1 -0
- package/dist/cli/commands/admin/token.d.ts +42 -0
- package/dist/cli/commands/admin/token.js +126 -0
- package/dist/cli/commands/admin/token.js.map +1 -0
- package/dist/cli/commands/admin/transfer-ownership.d.ts +15 -0
- package/dist/cli/commands/admin/transfer-ownership.js +106 -0
- package/dist/cli/commands/admin/transfer-ownership.js.map +1 -0
- package/dist/cli/commands/admin/user.d.ts +11 -0
- package/dist/cli/commands/admin/user.js +187 -0
- package/dist/cli/commands/admin/user.js.map +1 -0
- package/dist/cli/commands/clone.d.ts +25 -3
- package/dist/cli/commands/clone.js +142 -36
- package/dist/cli/commands/clone.js.map +1 -1
- package/dist/cli/commands/config.d.ts +23 -107
- package/dist/cli/commands/config.js +52 -260
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/connector.d.ts +10 -13
- package/dist/cli/commands/connector.js +16 -58
- package/dist/cli/commands/connector.js.map +1 -1
- package/dist/cli/commands/deploy.js +215 -68
- package/dist/cli/commands/deploy.js.map +1 -1
- package/dist/cli/commands/index.js +5 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.js +10 -30
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/mcp.js +54 -6
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/r2.d.ts +3 -0
- package/dist/cli/commands/r2.js +223 -204
- package/dist/cli/commands/r2.js.map +1 -1
- package/dist/cli/commands/redeploy.js +65 -12
- package/dist/cli/commands/redeploy.js.map +1 -1
- package/dist/cli/commands/reset.d.ts +22 -6
- package/dist/cli/commands/reset.js +132 -34
- package/dist/cli/commands/reset.js.map +1 -1
- package/dist/cli/commands/serve.js +231 -26
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/sync.d.ts +1 -1
- package/dist/cli/commands/sync.js +237 -227
- package/dist/cli/commands/sync.js.map +1 -1
- package/dist/cli/crypto-bundle.d.ts +39 -0
- package/dist/cli/crypto-bundle.js +94 -0
- package/dist/cli/crypto-bundle.js.map +1 -0
- package/dist/cli/index.js +24 -26
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/railway-pin.d.ts +68 -0
- package/dist/cli/railway-pin.js +96 -0
- package/dist/cli/railway-pin.js.map +1 -0
- package/dist/cli/railway-provisioning.d.ts +53 -0
- package/dist/cli/railway-provisioning.js +85 -0
- package/dist/cli/railway-provisioning.js.map +1 -0
- package/dist/cli/setup-wizard.d.ts +30 -49
- package/dist/cli/setup-wizard.js +39 -40
- package/dist/cli/setup-wizard.js.map +1 -1
- package/dist/core/accent-palette.d.ts +22 -0
- package/dist/core/accent-palette.js +47 -0
- package/dist/core/accent-palette.js.map +1 -0
- package/dist/core/artifact-asset-urls.d.ts +51 -0
- package/dist/core/artifact-asset-urls.js +79 -0
- package/dist/core/artifact-asset-urls.js.map +1 -0
- package/dist/core/artifact-bundle.d.ts +69 -0
- package/dist/core/artifact-bundle.js +305 -0
- package/dist/core/artifact-bundle.js.map +1 -0
- package/dist/core/artifact-escape.d.ts +5 -0
- package/dist/core/artifact-escape.js +26 -0
- package/dist/core/artifact-escape.js.map +1 -0
- package/dist/core/artifact-export.d.ts +17 -0
- package/dist/core/artifact-export.js +529 -0
- package/dist/core/artifact-export.js.map +1 -0
- package/dist/core/cell-anchor.d.ts +29 -0
- package/dist/core/cell-anchor.js +53 -0
- package/dist/core/cell-anchor.js.map +1 -0
- package/dist/core/comment-anchor.d.ts +41 -0
- package/dist/core/comment-anchor.js +147 -0
- package/dist/core/comment-anchor.js.map +1 -0
- package/dist/core/commit-messages.d.ts +57 -0
- package/dist/core/commit-messages.js +85 -0
- package/dist/core/commit-messages.js.map +1 -0
- package/dist/core/embeds.d.ts +96 -0
- package/dist/core/embeds.js +196 -0
- package/dist/core/embeds.js.map +1 -0
- package/dist/core/entity-body-templates.d.ts +21 -0
- package/dist/core/entity-body-templates.js +67 -0
- package/dist/core/entity-body-templates.js.map +1 -0
- package/dist/core/entity-types-catalog.d.ts +65 -0
- package/dist/core/entity-types-catalog.js +142 -0
- package/dist/core/entity-types-catalog.js.map +1 -0
- package/dist/core/field-library.d.ts +62 -0
- package/dist/core/field-library.js +129 -0
- package/dist/core/field-library.js.map +1 -0
- package/dist/core/folder-paths.d.ts +41 -0
- package/dist/core/folder-paths.js +95 -0
- package/dist/core/folder-paths.js.map +1 -0
- package/dist/core/folder-sidecar.d.ts +36 -0
- package/dist/core/folder-sidecar.js +91 -0
- package/dist/core/folder-sidecar.js.map +1 -0
- package/dist/core/format-registry.d.ts +170 -0
- package/dist/core/format-registry.js +412 -0
- package/dist/core/format-registry.js.map +1 -0
- package/dist/core/graph.d.ts +773 -14
- package/dist/core/graph.js +2269 -308
- package/dist/core/graph.js.map +1 -1
- package/dist/core/history-diff.d.ts +35 -0
- package/dist/core/history-diff.js +114 -0
- package/dist/core/history-diff.js.map +1 -0
- package/dist/core/refs.d.ts +41 -0
- package/dist/core/refs.js +80 -0
- package/dist/core/refs.js.map +1 -0
- package/dist/core/schema-registry.d.ts +66 -0
- package/dist/core/schema-registry.js +198 -37
- package/dist/core/schema-registry.js.map +1 -1
- package/dist/core/schemas/connector.d.ts +67 -0
- package/dist/core/schemas/connector.js +100 -0
- package/dist/core/schemas/connector.js.map +1 -0
- package/dist/core/schemas/workspace.d.ts +122 -0
- package/dist/core/schemas/workspace.js +211 -0
- package/dist/core/schemas/workspace.js.map +1 -0
- package/dist/core/secrets/SecretStore.d.ts +77 -0
- package/dist/core/secrets/SecretStore.js +13 -0
- package/dist/core/secrets/SecretStore.js.map +1 -0
- package/dist/core/secrets/SettingsResolver.d.ts +54 -0
- package/dist/core/secrets/SettingsResolver.js +80 -0
- package/dist/core/secrets/SettingsResolver.js.map +1 -0
- package/dist/core/secrets/SettingsStore.d.ts +30 -0
- package/dist/core/secrets/SettingsStore.js +9 -0
- package/dist/core/secrets/SettingsStore.js.map +1 -0
- package/dist/core/secrets/SqliteEncryptedStore.d.ts +90 -0
- package/dist/core/secrets/SqliteEncryptedStore.js +598 -0
- package/dist/core/secrets/SqliteEncryptedStore.js.map +1 -0
- package/dist/core/secrets/audit.d.ts +36 -0
- package/dist/core/secrets/audit.js +60 -0
- package/dist/core/secrets/audit.js.map +1 -0
- package/dist/core/secrets/auth-db-migration.d.ts +129 -0
- package/dist/core/secrets/auth-db-migration.js +653 -0
- package/dist/core/secrets/auth-db-migration.js.map +1 -0
- package/dist/core/secrets/bundle.d.ts +141 -0
- package/dist/core/secrets/bundle.js +435 -0
- package/dist/core/secrets/bundle.js.map +1 -0
- package/dist/core/secrets/dual-write.d.ts +81 -0
- package/dist/core/secrets/dual-write.js +247 -0
- package/dist/core/secrets/dual-write.js.map +1 -0
- package/dist/core/secrets/encryption.d.ts +44 -0
- package/dist/core/secrets/encryption.js +97 -0
- package/dist/core/secrets/encryption.js.map +1 -0
- package/dist/core/secrets/index.d.ts +49 -0
- package/dist/core/secrets/index.js +74 -0
- package/dist/core/secrets/index.js.map +1 -0
- package/dist/core/secrets/master-key.d.ts +38 -0
- package/dist/core/secrets/master-key.js +122 -0
- package/dist/core/secrets/master-key.js.map +1 -0
- package/dist/core/secrets/probes/anthropic.d.ts +98 -0
- package/dist/core/secrets/probes/anthropic.js +300 -0
- package/dist/core/secrets/probes/anthropic.js.map +1 -0
- package/dist/core/secrets/probes/brave.d.ts +9 -0
- package/dist/core/secrets/probes/brave.js +15 -0
- package/dist/core/secrets/probes/brave.js.map +1 -0
- package/dist/core/secrets/probes/r2.d.ts +15 -0
- package/dist/core/secrets/probes/r2.js +14 -0
- package/dist/core/secrets/probes/r2.js.map +1 -0
- package/dist/core/secrets/probes/tavily.d.ts +18 -0
- package/dist/core/secrets/probes/tavily.js +58 -0
- package/dist/core/secrets/probes/tavily.js.map +1 -0
- package/dist/core/secrets/probes/voyage.d.ts +13 -0
- package/dist/core/secrets/probes/voyage.js +52 -0
- package/dist/core/secrets/probes/voyage.js.map +1 -0
- package/dist/core/secrets/r2-structural-migration.d.ts +39 -0
- package/dist/core/secrets/r2-structural-migration.js +109 -0
- package/dist/core/secrets/r2-structural-migration.js.map +1 -0
- package/dist/core/secrets/read-flip.d.ts +59 -0
- package/dist/core/secrets/read-flip.js +87 -0
- package/dist/core/secrets/read-flip.js.map +1 -0
- package/dist/core/secrets/registry.d.ts +188 -0
- package/dist/core/secrets/registry.js +616 -0
- package/dist/core/secrets/registry.js.map +1 -0
- package/dist/core/types.d.ts +77 -483
- package/dist/core/types.js +25 -3
- package/dist/core/types.js.map +1 -1
- package/dist/core/user-config.d.ts +75 -12
- package/dist/core/user-config.js +155 -14
- package/dist/core/user-config.js.map +1 -1
- package/dist/core/validation.d.ts +786 -1373
- package/dist/core/validation.js +458 -147
- package/dist/core/validation.js.map +1 -1
- package/dist/core/workspace-manager.d.ts +87 -14
- package/dist/core/workspace-manager.js +222 -94
- package/dist/core/workspace-manager.js.map +1 -1
- package/dist/core/workspace.d.ts +19 -5
- package/dist/core/workspace.js +67 -39
- package/dist/core/workspace.js.map +1 -1
- package/dist/mcp/comment-virtual-entity.d.ts +36 -0
- package/dist/mcp/comment-virtual-entity.js +71 -0
- package/dist/mcp/comment-virtual-entity.js.map +1 -0
- package/dist/mcp/connector-manager.d.ts +72 -2
- package/dist/mcp/connector-manager.js +211 -32
- package/dist/mcp/connector-manager.js.map +1 -1
- package/dist/mcp/oauth-provider.d.ts +0 -5
- package/dist/mcp/oauth-provider.js +10 -22
- package/dist/mcp/oauth-provider.js.map +1 -1
- package/dist/mcp/oauth-registry.d.ts +46 -8
- package/dist/mcp/oauth-registry.js +52 -13
- package/dist/mcp/oauth-registry.js.map +1 -1
- package/dist/mcp/server-discovery.d.ts +73 -0
- package/dist/mcp/server-discovery.js +164 -0
- package/dist/mcp/server-discovery.js.map +1 -0
- package/dist/mcp/server.d.ts +24 -3
- package/dist/mcp/server.js +53 -10
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/state-signer.d.ts +62 -0
- package/dist/mcp/state-signer.js +205 -0
- package/dist/mcp/state-signer.js.map +1 -0
- package/dist/mcp/stdio-proxy.d.ts +67 -0
- package/dist/mcp/stdio-proxy.js +149 -0
- package/dist/mcp/stdio-proxy.js.map +1 -0
- package/dist/mcp/tools.d.ts +65 -2
- package/dist/mcp/tools.js +1772 -124
- package/dist/mcp/tools.js.map +1 -1
- package/dist/server/__tests__/helpers/graph-api.d.ts +16 -0
- package/dist/server/__tests__/helpers/graph-api.js +16 -0
- package/dist/server/__tests__/helpers/graph-api.js.map +1 -0
- package/dist/server/artifact-asset-mint.d.ts +41 -0
- package/dist/server/artifact-asset-mint.js +59 -0
- package/dist/server/artifact-asset-mint.js.map +1 -0
- package/dist/server/asset-index-queue.d.ts +98 -0
- package/dist/server/asset-index-queue.js +193 -0
- package/dist/server/asset-index-queue.js.map +1 -0
- package/dist/server/body-write-coordinator.d.ts +161 -0
- package/dist/server/body-write-coordinator.js +182 -0
- package/dist/server/body-write-coordinator.js.map +1 -0
- package/dist/server/cloud-billing-flow.d.ts +32 -0
- package/dist/server/cloud-billing-flow.js +75 -0
- package/dist/server/cloud-billing-flow.js.map +1 -0
- package/dist/server/commit-audit.d.ts +26 -0
- package/dist/server/commit-audit.js +30 -0
- package/dist/server/commit-audit.js.map +1 -0
- package/dist/server/index.d.ts +29 -3
- package/dist/server/index.js +657 -269
- package/dist/server/index.js.map +1 -1
- package/dist/server/middleware/sanitize.d.ts +46 -0
- package/dist/server/middleware/sanitize.js +182 -0
- package/dist/server/middleware/sanitize.js.map +1 -0
- package/dist/server/routes/artifact-export-api.d.ts +11 -0
- package/dist/server/routes/artifact-export-api.js +159 -0
- package/dist/server/routes/artifact-export-api.js.map +1 -0
- package/dist/server/routes/asset-api.d.ts +76 -1
- package/dist/server/routes/asset-api.js +761 -61
- package/dist/server/routes/asset-api.js.map +1 -1
- package/dist/server/routes/audit-api.d.ts +24 -0
- package/dist/server/routes/audit-api.js +117 -0
- package/dist/server/routes/audit-api.js.map +1 -0
- package/dist/server/routes/auth-api.js +532 -63
- package/dist/server/routes/auth-api.js.map +1 -1
- package/dist/server/routes/capture-api.d.ts +10 -3
- package/dist/server/routes/capture-api.js +213 -25
- package/dist/server/routes/capture-api.js.map +1 -1
- package/dist/server/routes/chat-sessions-api.d.ts +13 -0
- package/dist/server/routes/chat-sessions-api.js +455 -0
- package/dist/server/routes/chat-sessions-api.js.map +1 -0
- package/dist/server/routes/chat.d.ts +35 -1
- package/dist/server/routes/chat.js +699 -54
- package/dist/server/routes/chat.js.map +1 -1
- package/dist/server/routes/comments-api.d.ts +15 -0
- package/dist/server/routes/comments-api.js +444 -0
- package/dist/server/routes/comments-api.js.map +1 -0
- package/dist/server/routes/config-api.d.ts +3 -2
- package/dist/server/routes/config-api.js +179 -49
- package/dist/server/routes/config-api.js.map +1 -1
- package/dist/server/routes/connectors-api.js +177 -42
- package/dist/server/routes/connectors-api.js.map +1 -1
- package/dist/server/routes/event-ingest-api.d.ts +15 -0
- package/dist/server/routes/{meeting-ingest-api.js → event-ingest-api.js} +35 -20
- package/dist/server/routes/event-ingest-api.js.map +1 -0
- package/dist/server/routes/field-library-api.d.ts +28 -0
- package/dist/server/routes/field-library-api.js +126 -0
- package/dist/server/routes/field-library-api.js.map +1 -0
- package/dist/server/routes/git-http.d.ts +2 -2
- package/dist/server/routes/git-http.js +86 -39
- package/dist/server/routes/git-http.js.map +1 -1
- package/dist/server/routes/graph-api-access.d.ts +57 -0
- package/dist/server/routes/graph-api-access.js +112 -0
- package/dist/server/routes/graph-api-access.js.map +1 -0
- package/dist/server/routes/graph-api.d.ts +1 -1
- package/dist/server/routes/graph-api.js +1455 -325
- package/dist/server/routes/graph-api.js.map +1 -1
- package/dist/server/routes/health.d.ts +18 -0
- package/dist/server/routes/health.js +74 -0
- package/dist/server/routes/health.js.map +1 -0
- package/dist/server/routes/import-batch.d.ts +24 -0
- package/dist/server/routes/import-batch.js +33 -0
- package/dist/server/routes/import-batch.js.map +1 -0
- package/dist/server/routes/insights-api.d.ts +9 -2
- package/dist/server/routes/insights-api.js +355 -61
- package/dist/server/routes/insights-api.js.map +1 -1
- package/dist/server/routes/mcp.d.ts +7 -3
- package/dist/server/routes/mcp.js +24 -8
- package/dist/server/routes/mcp.js.map +1 -1
- package/dist/server/routes/oauth-api.d.ts +67 -0
- package/dist/server/routes/oauth-api.js +421 -0
- package/dist/server/routes/oauth-api.js.map +1 -0
- package/dist/server/routes/permissions-api.d.ts +9 -2
- package/dist/server/routes/permissions-api.js +87 -31
- package/dist/server/routes/permissions-api.js.map +1 -1
- package/dist/server/routes/r2-api.d.ts +25 -0
- package/dist/server/routes/r2-api.js +276 -0
- package/dist/server/routes/r2-api.js.map +1 -0
- package/dist/server/routes/secrets-api.d.ts +36 -0
- package/dist/server/routes/secrets-api.js +308 -0
- package/dist/server/routes/secrets-api.js.map +1 -0
- package/dist/server/routes/settings-api.d.ts +29 -0
- package/dist/server/routes/settings-api.js +180 -0
- package/dist/server/routes/settings-api.js.map +1 -0
- package/dist/server/routes/share-api.d.ts +32 -0
- package/dist/server/routes/share-api.js +234 -0
- package/dist/server/routes/share-api.js.map +1 -0
- package/dist/server/routes/views-api.js +51 -0
- package/dist/server/routes/views-api.js.map +1 -1
- package/dist/server/routes/workspace-api.d.ts +2 -1
- package/dist/server/routes/workspace-api.js +142 -23
- package/dist/server/routes/workspace-api.js.map +1 -1
- package/dist/server/routes/ws.d.ts +3 -2
- package/dist/server/routes/ws.js +68 -17
- package/dist/server/routes/ws.js.map +1 -1
- package/dist/server/session-manager.d.ts +48 -5
- package/dist/server/session-manager.js +182 -14
- package/dist/server/session-manager.js.map +1 -1
- package/dist/server/ws-hub.d.ts +124 -37
- package/dist/server/ws-hub.js +0 -0
- package/dist/server/ws-hub.js.map +1 -1
- package/dist/server/yjs-manager.d.ts +278 -7
- package/dist/server/yjs-manager.js +830 -38
- package/dist/server/yjs-manager.js.map +1 -1
- package/dist/server/yjs-persistence.d.ts +165 -0
- package/dist/server/yjs-persistence.js +557 -0
- package/dist/server/yjs-persistence.js.map +1 -0
- package/dist/server/yjs-text-diff.d.ts +32 -0
- package/dist/server/yjs-text-diff.js +61 -0
- package/dist/server/yjs-text-diff.js.map +1 -0
- package/dist/services/access-control.d.ts +73 -0
- package/dist/services/access-control.js +165 -0
- package/dist/services/access-control.js.map +1 -0
- package/dist/services/artifact-asset-token.d.ts +69 -0
- package/dist/services/artifact-asset-token.js +94 -0
- package/dist/services/artifact-asset-token.js.map +1 -0
- package/dist/services/artifact-library-sources.d.ts +3 -0
- package/dist/services/artifact-library-sources.js +44 -0
- package/dist/services/artifact-library-sources.js.map +1 -0
- package/dist/services/artifact-render-export.d.ts +97 -0
- package/dist/services/artifact-render-export.js +467 -0
- package/dist/services/artifact-render-export.js.map +1 -0
- package/dist/services/asset-caption-service.d.ts +103 -0
- package/dist/services/asset-caption-service.js +186 -0
- package/dist/services/asset-caption-service.js.map +1 -0
- package/dist/services/asset-delete-authz.d.ts +31 -0
- package/dist/services/asset-delete-authz.js +61 -0
- package/dist/services/asset-delete-authz.js.map +1 -0
- package/dist/services/asset-finalize-service.d.ts +58 -0
- package/dist/services/asset-finalize-service.js +216 -0
- package/dist/services/asset-finalize-service.js.map +1 -0
- package/dist/services/asset-import-service.d.ts +111 -0
- package/dist/services/asset-import-service.js +394 -0
- package/dist/services/asset-import-service.js.map +1 -0
- package/dist/services/asset-index-sweep.d.ts +95 -0
- package/dist/services/asset-index-sweep.js +249 -0
- package/dist/services/asset-index-sweep.js.map +1 -0
- package/dist/services/asset-lifecycle-check.d.ts +22 -0
- package/dist/services/asset-lifecycle-check.js +80 -0
- package/dist/services/asset-lifecycle-check.js.map +1 -0
- package/dist/services/asset-listing.d.ts +72 -0
- package/dist/services/asset-listing.js +321 -0
- package/dist/services/asset-listing.js.map +1 -0
- package/dist/services/asset-presign-service.d.ts +68 -0
- package/dist/services/asset-presign-service.js +124 -0
- package/dist/services/asset-presign-service.js.map +1 -0
- package/dist/services/asset-sidecar-service.d.ts +28 -0
- package/dist/services/asset-sidecar-service.js +79 -0
- package/dist/services/asset-sidecar-service.js.map +1 -0
- package/dist/services/asset-upload-errors.d.ts +41 -0
- package/dist/services/asset-upload-errors.js +45 -0
- package/dist/services/asset-upload-errors.js.map +1 -0
- package/dist/services/asset-upload-service.d.ts +56 -0
- package/dist/services/asset-upload-service.js +200 -0
- package/dist/services/asset-upload-service.js.map +1 -0
- package/dist/services/asset-upload-token.d.ts +58 -0
- package/dist/services/asset-upload-token.js +75 -0
- package/dist/services/asset-upload-token.js.map +1 -0
- package/dist/services/assets/asset-index-service.d.ts +127 -0
- package/dist/services/assets/asset-index-service.js +227 -0
- package/dist/services/assets/asset-index-service.js.map +1 -0
- package/dist/services/assets/base.d.ts +128 -2
- package/dist/services/assets/base.js +98 -1
- package/dist/services/assets/base.js.map +1 -1
- package/dist/services/assets/index.d.ts +114 -1
- package/dist/services/assets/index.js +221 -0
- package/dist/services/assets/index.js.map +1 -1
- package/dist/services/assets/local.d.ts +16 -1
- package/dist/services/assets/local.js +110 -1
- package/dist/services/assets/local.js.map +1 -1
- package/dist/services/assets/r2-sync.d.ts +88 -0
- package/dist/services/assets/r2-sync.js +412 -0
- package/dist/services/assets/r2-sync.js.map +1 -0
- package/dist/services/assets/r2.d.ts +87 -1
- package/dist/services/assets/r2.js +203 -1
- package/dist/services/assets/r2.js.map +1 -1
- package/dist/services/auth-service.d.ts +312 -45
- package/dist/services/auth-service.js +1011 -195
- package/dist/services/auth-service.js.map +1 -1
- package/dist/services/chat-session-service.d.ts +188 -0
- package/dist/services/chat-session-service.js +512 -0
- package/dist/services/chat-session-service.js.map +1 -0
- package/dist/services/cloud-inference-billing.d.ts +64 -0
- package/dist/services/cloud-inference-billing.js +313 -0
- package/dist/services/cloud-inference-billing.js.map +1 -0
- package/dist/services/comment-service.d.ts +97 -0
- package/dist/services/comment-service.js +341 -0
- package/dist/services/comment-service.js.map +1 -0
- package/dist/services/comment-virtual-entity.d.ts +36 -0
- package/dist/services/comment-virtual-entity.js +71 -0
- package/dist/services/comment-virtual-entity.js.map +1 -0
- package/dist/services/convert-service.d.ts +64 -0
- package/dist/services/convert-service.js +68 -0
- package/dist/services/convert-service.js.map +1 -0
- package/dist/services/csv-service.d.ts +22 -17
- package/dist/services/csv-service.js +55 -92
- package/dist/services/csv-service.js.map +1 -1
- package/dist/services/entity-mutations.d.ts +213 -0
- package/dist/services/entity-mutations.js +380 -0
- package/dist/services/entity-mutations.js.map +1 -0
- package/dist/services/{meeting-processor.d.ts → event-processor.d.ts} +15 -8
- package/dist/services/{meeting-processor.js → event-processor.js} +124 -65
- package/dist/services/event-processor.js.map +1 -0
- package/dist/services/extract/docx.d.ts +1 -0
- package/dist/services/extract/docx.js +233 -0
- package/dist/services/extract/docx.js.map +1 -0
- package/dist/services/extract/index.d.ts +9 -0
- package/dist/services/extract/index.js +10 -0
- package/dist/services/extract/index.js.map +1 -0
- package/dist/services/extract/pdf.d.ts +13 -0
- package/dist/services/extract/pdf.js +69 -0
- package/dist/services/extract/pdf.js.map +1 -0
- package/dist/services/folder-creation.d.ts +33 -0
- package/dist/services/folder-creation.js +103 -0
- package/dist/services/folder-creation.js.map +1 -0
- package/dist/services/git.d.ts +58 -0
- package/dist/services/git.js +194 -55
- package/dist/services/git.js.map +1 -1
- package/dist/services/graph-maintenance.js +4 -4
- package/dist/services/graph-maintenance.js.map +1 -1
- package/dist/services/import-service.d.ts +51 -2
- package/dist/services/import-service.js +254 -107
- package/dist/services/import-service.js.map +1 -1
- package/dist/services/lint-service.js +10 -17
- package/dist/services/lint-service.js.map +1 -1
- package/dist/services/markdown.d.ts +12 -1
- package/dist/services/markdown.js +77 -9
- package/dist/services/markdown.js.map +1 -1
- package/dist/services/mention-detector.d.ts +23 -0
- package/dist/services/mention-detector.js +47 -0
- package/dist/services/mention-detector.js.map +1 -0
- package/dist/services/model-capabilities.d.ts +41 -0
- package/dist/services/model-capabilities.js +107 -0
- package/dist/services/model-capabilities.js.map +1 -0
- package/dist/services/notification-broadcast.d.ts +32 -0
- package/dist/services/notification-broadcast.js +38 -0
- package/dist/services/notification-broadcast.js.map +1 -0
- package/dist/services/notification-service.d.ts +41 -0
- package/dist/services/notification-service.js +100 -0
- package/dist/services/notification-service.js.map +1 -0
- package/dist/services/oauth-server-store.d.ts +147 -0
- package/dist/services/oauth-server-store.js +319 -0
- package/dist/services/oauth-server-store.js.map +1 -0
- package/dist/services/orphan-service.js +2 -2
- package/dist/services/orphan-service.js.map +1 -1
- package/dist/services/personal-folder.d.ts +40 -0
- package/dist/services/personal-folder.js +101 -0
- package/dist/services/personal-folder.js.map +1 -0
- package/dist/services/scratch-asset-promote.d.ts +57 -0
- package/dist/services/scratch-asset-promote.js +95 -0
- package/dist/services/scratch-asset-promote.js.map +1 -0
- package/dist/services/scratch-attachment-service.d.ts +196 -0
- package/dist/services/scratch-attachment-service.js +347 -0
- package/dist/services/scratch-attachment-service.js.map +1 -0
- package/dist/services/share-link-service.d.ts +57 -0
- package/dist/services/share-link-service.js +142 -0
- package/dist/services/share-link-service.js.map +1 -0
- package/dist/services/user-person-bridge.d.ts +136 -0
- package/dist/services/user-person-bridge.js +340 -0
- package/dist/services/user-person-bridge.js.map +1 -0
- package/dist/services/vector-service.d.ts +282 -5
- package/dist/services/vector-service.js +585 -29
- package/dist/services/vector-service.js.map +1 -1
- package/dist/services/workspace-access.d.ts +108 -0
- package/dist/services/workspace-access.js +149 -0
- package/dist/services/workspace-access.js.map +1 -0
- package/dist/services/workspace-assets-folder.d.ts +46 -0
- package/dist/services/workspace-assets-folder.js +75 -0
- package/dist/services/workspace-assets-folder.js.map +1 -0
- package/dist/utils/git.d.ts +17 -2
- package/dist/utils/git.js +23 -7
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/log.d.ts +42 -0
- package/dist/utils/log.js +137 -0
- package/dist/utils/log.js.map +1 -0
- package/dist/utils/preflight.js +2 -2
- package/dist/utils/preflight.js.map +1 -1
- package/dist/utils/version-checker.d.ts +12 -19
- package/dist/utils/version-checker.js +14 -104
- package/dist/utils/version-checker.js.map +1 -1
- package/dist/web/_app/immutable/assets/0.Bs_z3Z86.css +2 -0
- package/dist/web/_app/immutable/assets/12.DlIf1mKh.css +1 -0
- package/dist/web/_app/immutable/assets/14.7d-Q37wc.css +1 -0
- package/dist/web/_app/immutable/assets/15.BwBFdc1D.css +1 -0
- package/dist/web/_app/immutable/assets/16.CmLrbzZp.css +1 -0
- package/dist/web/_app/immutable/assets/17.DcuK5ZVm.css +1 -0
- package/dist/web/_app/immutable/assets/2.DATnR31c.css +1 -0
- package/dist/web/_app/immutable/assets/3.Cz4H8n_O.css +1 -0
- package/dist/web/_app/immutable/assets/4.aDHteTDy.css +1 -0
- package/dist/web/_app/immutable/assets/6.CF1i5Bon.css +1 -0
- package/dist/web/_app/immutable/assets/ArtifactEntityView.C4ooklFD.css +1 -0
- package/dist/web/_app/immutable/assets/AssetLibraryPicker.BOFW0MvF.css +1 -0
- package/dist/web/_app/immutable/assets/BulkActionsBar.cmKvHzRK.css +1 -0
- package/dist/web/_app/immutable/assets/CalendarView.lBCvS3X5.css +1 -0
- package/dist/web/_app/immutable/assets/CodeMirrorEditor.D6hf2pNJ.css +1 -0
- package/dist/web/_app/immutable/assets/CopyField.DVGZtw4U.css +1 -0
- package/dist/web/_app/immutable/assets/FolderMembersPanel.kiYnDFHu.css +1 -0
- package/dist/web/_app/immutable/assets/FolderMutationDialogs.BMRF6Z3z.css +1 -0
- package/dist/web/_app/immutable/assets/FolderPicker.Cp46GHe2.css +1 -0
- package/dist/web/_app/immutable/assets/GalleryView.WBGxxUQc.css +1 -0
- package/dist/web/_app/immutable/assets/GraphView.BJtGL9py.css +1 -0
- package/dist/web/_app/immutable/assets/KanbanView.BOaI5KFL.css +1 -0
- package/dist/web/_app/immutable/assets/Link.vV0ne105.css +1 -0
- package/dist/web/_app/immutable/assets/Markdown.BZnsSOSf.css +1 -0
- package/dist/web/_app/immutable/assets/Rail.ilusFgD4.css +1 -0
- package/dist/web/_app/immutable/assets/SettingsDialog.D7-BO6S_.css +1 -0
- package/dist/web/_app/immutable/assets/Spinner.UBfl0pab.css +1 -0
- package/dist/web/_app/immutable/assets/StopFilledAlt.fNlDN65D.css +1 -0
- package/dist/web/_app/immutable/assets/TimelineView.xAZBJhHw.css +1 -0
- package/dist/web/_app/immutable/assets/WorkspaceView.C8ErUJAY.css +1 -0
- package/dist/web/_app/immutable/assets/button.BlLm4Dg1.css +1 -0
- package/dist/web/_app/immutable/assets/history-summary.LpmHXasl.css +1 -0
- package/dist/web/_app/immutable/assets/ibm-plex-mono-latin-400-normal.CvHOgSBP.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-mono-latin-400-normal.DMJ8VG8y.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-mono-latin-500-normal.CB9ihrfo.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-mono-latin-500-normal.DSY6xOcd.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-400-italic.CZTNEAuW.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-400-italic.CsGl1sm0.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-400-normal.CDDApCn2.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-400-normal.CYLoc0-x.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-500-italic.BNK2_mGO.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-500-italic.DpEwFAQM.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-500-normal.6ng42L7E.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-500-normal.BgVn5rGT.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-600-normal.Cu4Hd6ag.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-600-normal.CuJfVYMP.woff2 +0 -0
- package/dist/web/_app/immutable/assets/inline-list.cqga56xT.css +1 -0
- package/dist/web/_app/immutable/assets/list-columns.BgnafZ4K.css +1 -0
- package/dist/web/_app/immutable/assets/realtime.DDCWxn3B.css +1 -0
- package/dist/web/_app/immutable/assets/select.B90KUqR4.css +1 -0
- package/dist/web/_app/immutable/assets/sheet.RF9RBmml.css +1 -0
- package/dist/web/_app/immutable/chunks/22qYtvr82.js +1 -0
- package/dist/web/_app/immutable/chunks/2f1VclTm.js +1 -0
- package/dist/web/_app/immutable/chunks/4xgUPoGj2.js +2 -0
- package/dist/web/_app/immutable/chunks/5CYQk4xR.js +1 -0
- package/dist/web/_app/immutable/chunks/6S9WOky52.js +1 -0
- package/dist/web/_app/immutable/chunks/9K8VREGP.js +1 -0
- package/dist/web/_app/immutable/chunks/B-n5q6ku.js +1 -0
- package/dist/web/_app/immutable/chunks/B0p2fSEV2.js +1 -0
- package/dist/web/_app/immutable/chunks/B2oi87jG.js +2 -0
- package/dist/web/_app/immutable/chunks/B5Rb52QU.js +1 -0
- package/dist/web/_app/immutable/chunks/B6Lt-qaJ.js +1 -0
- package/dist/web/_app/immutable/chunks/B6O-q2CN.js +1 -0
- package/dist/web/_app/immutable/chunks/B6qeIQZz.js +2 -0
- package/dist/web/_app/immutable/chunks/B9KfEsQw2.js +1 -0
- package/dist/web/_app/immutable/chunks/BB-RSeXQ.js +1 -0
- package/dist/web/_app/immutable/chunks/BCQQzpbj.js +1 -0
- package/dist/web/_app/immutable/chunks/BGdzd-Tc.js +1 -0
- package/dist/web/_app/immutable/chunks/BLs1h0Rh2.js +1 -0
- package/dist/web/_app/immutable/chunks/BPzV_xOS2.js +1 -0
- package/dist/web/_app/immutable/chunks/BT2C6q8n.js +1 -0
- package/dist/web/_app/immutable/chunks/BUesbLq2.js +1 -0
- package/dist/web/_app/immutable/chunks/BUrnwOw4.js +2 -0
- package/dist/web/_app/immutable/chunks/BV-iCKqa.js +1 -0
- package/dist/web/_app/immutable/chunks/BVCJtXyc.js +1 -0
- package/dist/web/_app/immutable/chunks/BY9a3GSt.js +6 -0
- package/dist/web/_app/immutable/chunks/BZi3uKF4.js +1 -0
- package/dist/web/_app/immutable/chunks/BbfHGU9n2.js +1 -0
- package/dist/web/_app/immutable/chunks/Bbqu2-5G2.js +1 -0
- package/dist/web/_app/immutable/chunks/BbsX1Slr.js +3 -0
- package/dist/web/_app/immutable/chunks/BcwjqHaZ2.js +1 -0
- package/dist/web/_app/immutable/chunks/BizeEpTx.js +2 -0
- package/dist/web/_app/immutable/chunks/BlgjVmFM2.js +14 -0
- package/dist/web/_app/immutable/chunks/BocSRgv12.js +1 -0
- package/dist/web/_app/immutable/chunks/BojBYqc3.js +1 -0
- package/dist/web/_app/immutable/chunks/BpCG9m962.js +1 -0
- package/dist/web/_app/immutable/chunks/BqvnBg_y.js +1 -0
- package/dist/web/_app/immutable/chunks/BsT0J1QD.js +1 -0
- package/dist/web/_app/immutable/chunks/BsW72fyR2.js +1 -0
- package/dist/web/_app/immutable/chunks/Bti_XKwx.js +2692 -0
- package/dist/web/_app/immutable/chunks/Bua97Had2.js +2 -0
- package/dist/web/_app/immutable/chunks/BuhW5Fr0.js +689 -0
- package/dist/web/_app/immutable/chunks/Bx74EEyn2.js +1 -0
- package/dist/web/_app/immutable/chunks/BxPN0T61.js +1 -0
- package/dist/web/_app/immutable/chunks/Bz9lrgGs.js +1 -0
- package/dist/web/_app/immutable/chunks/BzaxZ6j12.js +1 -0
- package/dist/web/_app/immutable/chunks/C1B4xDs0.js +1 -0
- package/dist/web/_app/immutable/chunks/C1trcC8M.js +7 -0
- package/dist/web/_app/immutable/chunks/C9tvkk7Y2.js +22 -0
- package/dist/web/_app/immutable/chunks/CBQjdDZf.js +1 -0
- package/dist/web/_app/immutable/chunks/CDeazMFW2.js +2 -0
- package/dist/web/_app/immutable/chunks/CEahbtnP.js +1 -0
- package/dist/web/_app/immutable/chunks/CGjVCd0e.js +8 -0
- package/dist/web/_app/immutable/chunks/CICK9maP.js +1 -0
- package/dist/web/_app/immutable/chunks/CIoNEHQ82.js +184 -0
- package/dist/web/_app/immutable/chunks/CP8_U450.js +1 -0
- package/dist/web/_app/immutable/chunks/CQ1eQ93t2.js +6 -0
- package/dist/web/_app/immutable/chunks/CUFQMEBn2.js +1 -0
- package/dist/web/_app/immutable/chunks/CYEYDNwO2.js +1 -0
- package/dist/web/_app/immutable/chunks/CYyIP7kP2.js +66 -0
- package/dist/web/_app/immutable/chunks/CZgFaimi2.js +83 -0
- package/dist/web/_app/immutable/chunks/CZqvCTCv.js +1 -0
- package/dist/web/_app/immutable/chunks/CcI9jYBV.js +1 -0
- package/dist/web/_app/immutable/chunks/CcWaWbrI2.js +1 -0
- package/dist/web/_app/immutable/chunks/CdtzRVZK.js +1 -0
- package/dist/web/_app/immutable/chunks/CfYG72Hc.js +1 -0
- package/dist/web/_app/immutable/chunks/Ch1kmm3J2.js +1 -0
- package/dist/web/_app/immutable/chunks/CmSSN61R2.js +1 -0
- package/dist/web/_app/immutable/chunks/Cqm5wAin.js +1 -0
- package/dist/web/_app/immutable/chunks/CuYPXpWU.js +1 -0
- package/dist/web/_app/immutable/chunks/CvSEodTA.js +1 -0
- package/dist/web/_app/immutable/chunks/CvqqrTrj.js +1 -0
- package/dist/web/_app/immutable/chunks/CwAmWt6h.js +1 -0
- package/dist/web/_app/immutable/chunks/CwP3Oa7F.js +1 -0
- package/dist/web/_app/immutable/chunks/CyTluew1.js +2 -0
- package/dist/web/_app/immutable/chunks/CzXdOgVl2.js +7 -0
- package/dist/web/_app/immutable/chunks/D0IAituJ.js +1 -0
- package/dist/web/_app/immutable/chunks/D0W7c6Sg.js +185 -0
- package/dist/web/_app/immutable/chunks/D0rBhnqB2.js +1 -0
- package/dist/web/_app/immutable/chunks/D1-GZSN1.js +1 -0
- package/dist/web/_app/immutable/chunks/D1yvtriI.js +1 -0
- package/dist/web/_app/immutable/chunks/D25NMRpl.js +1 -0
- package/dist/web/_app/immutable/chunks/D8wZ2xul.js +4 -0
- package/dist/web/_app/immutable/chunks/DA3HEX3X.js +1 -0
- package/dist/web/_app/immutable/chunks/DD9wj4ca2.js +1 -0
- package/dist/web/_app/immutable/chunks/DJ1YeiJL2.js +1 -0
- package/dist/web/_app/immutable/chunks/DKFZnpVC.js +5 -0
- package/dist/web/_app/immutable/chunks/DKJl40hl.js +1 -0
- package/dist/web/_app/immutable/chunks/DPUVu0T0.js +1 -0
- package/dist/web/_app/immutable/chunks/DQMWa2t7.js +1 -0
- package/dist/web/_app/immutable/chunks/DXsFrDer2.js +1 -0
- package/dist/web/_app/immutable/chunks/DYc5KW3F.js +1 -0
- package/dist/web/_app/immutable/chunks/DZcTwXBW.js +1 -0
- package/dist/web/_app/immutable/chunks/DcPrzUMJ.js +1 -0
- package/dist/web/_app/immutable/chunks/DdPO8kRu2.js +2 -0
- package/dist/web/_app/immutable/chunks/DeOXyJZw2.js +1 -0
- package/dist/web/_app/immutable/chunks/DfufUFR1.js +2 -0
- package/dist/web/_app/immutable/chunks/DiQg3ing.js +1 -0
- package/dist/web/_app/immutable/chunks/DjIqa1_y.js +2 -0
- package/dist/web/_app/immutable/chunks/DkJ1dkxV2.js +1 -0
- package/dist/web/_app/immutable/chunks/Dl63IUnH2.js +224 -0
- package/dist/web/_app/immutable/chunks/DmFdD6zT.js +1 -0
- package/dist/web/_app/immutable/chunks/Dn3R8S-U.js +1 -0
- package/dist/web/_app/immutable/chunks/DpNr1GQ2.js +1 -0
- package/dist/web/_app/immutable/chunks/DpVNDHXz.js +2 -0
- package/dist/web/_app/immutable/chunks/DuxziNnw.js +1 -0
- package/dist/web/_app/immutable/chunks/Dv3A3Wcj.js +1 -0
- package/dist/web/_app/immutable/chunks/FuiJnZG0.js +1 -0
- package/dist/web/_app/immutable/chunks/Izkulod7.js +1 -0
- package/dist/web/_app/immutable/chunks/KZY6ongq2.js +2 -0
- package/dist/web/_app/immutable/chunks/LYL8znYR2.js +23 -0
- package/dist/web/_app/immutable/chunks/PhN6tXuJ2.js +1 -0
- package/dist/web/_app/immutable/chunks/PyLyCpuL.js +1 -0
- package/dist/web/_app/immutable/chunks/RK4gCWN0.js +2 -0
- package/dist/web/_app/immutable/chunks/VsBngTf4.js +2 -0
- package/dist/web/_app/immutable/chunks/XcWejFm_.js +5 -0
- package/dist/web/_app/immutable/chunks/al_nidE9.js +1 -0
- package/dist/web/_app/immutable/chunks/e50-izZO2.js +1 -0
- package/dist/web/_app/immutable/chunks/hG-QCarB.js +1 -0
- package/dist/web/_app/immutable/chunks/hStvCHkX.js +1 -0
- package/dist/web/_app/immutable/chunks/iJVY9p0y.js +3 -0
- package/dist/web/_app/immutable/chunks/kNaey6uv.js +1 -0
- package/dist/web/_app/immutable/chunks/pIXNe0C1.js +1 -0
- package/dist/web/_app/immutable/chunks/pNSRq_1B.js +2 -0
- package/dist/web/_app/immutable/chunks/qwr5boV8.js +1 -0
- package/dist/web/_app/immutable/chunks/rjjyuGhb.js +1 -0
- package/dist/web/_app/immutable/chunks/sg-T-FoN.js +1 -0
- package/dist/web/_app/immutable/chunks/uBgoVlsx.js +3 -0
- package/dist/web/_app/immutable/chunks/ulshNz6x.js +2 -0
- package/dist/web/_app/immutable/chunks/xY0c-UfG.js +3 -0
- package/dist/web/_app/immutable/chunks/xeNvx4Bl2.js +1 -0
- package/dist/web/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/dist/web/_app/immutable/entry/app.pNUW-q4U.js +2 -0
- package/dist/web/_app/immutable/entry/start.DxGtIGG_.js +1 -0
- package/dist/web/_app/immutable/nodes/0.D6ZCY_R6.js +2 -0
- package/dist/web/_app/immutable/nodes/1.BryH3TNr.js +1 -0
- package/dist/web/_app/immutable/nodes/10.CMZMvR17.js +1 -0
- package/dist/web/_app/immutable/nodes/11.QHx_JShx.js +1 -0
- package/dist/web/_app/immutable/nodes/12.CiRWbb4X.js +1 -0
- package/dist/web/_app/immutable/nodes/13.CYrHXCA8.js +1 -0
- package/dist/web/_app/immutable/nodes/14.K18eIE5Z.js +1 -0
- package/dist/web/_app/immutable/nodes/15.DxgnZ61h.js +1 -0
- package/dist/web/_app/immutable/nodes/16.Dn6iuWIo.js +1 -0
- package/dist/web/_app/immutable/nodes/17.viwS7vTR.js +77 -0
- package/dist/web/_app/immutable/nodes/2.BQkQ_uUM.js +122 -0
- package/dist/web/_app/immutable/nodes/3.B4pqXsqq.js +6 -0
- package/dist/web/_app/immutable/nodes/4.CKXEgIAP.js +11 -0
- package/dist/web/_app/immutable/nodes/5.A2TASl4Q.js +1 -0
- package/dist/web/_app/immutable/nodes/6.DaIRO3SI.js +6 -0
- package/dist/web/_app/immutable/nodes/7.ga2UvFm-.js +1 -0
- package/dist/web/_app/immutable/nodes/8.BTEWT81u.js +1 -0
- package/dist/web/_app/immutable/nodes/9.BVxo0E0c.js +1 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/favicon-16.png +0 -0
- package/dist/web/favicon-180.png +0 -0
- package/dist/web/favicon-32.png +0 -0
- package/dist/web/favicon-48.png +0 -0
- package/dist/web/favicon-512.png +0 -0
- package/dist/web/favicon.ico +0 -0
- package/dist/web/favicon.svg +8 -0
- package/dist/web/index.html +56 -21
- package/dist/web/studiograph-logomark.svg +29 -0
- package/package.json +35 -14
- package/dist/agent/skills/enrich-entities.md +0 -136
- package/dist/agent/skills/sync-configuration.md +0 -119
- package/dist/agent/skills/sync-setup.md +0 -82
- package/dist/agent/tools/message-tools.d.ts +0 -42
- package/dist/agent/tools/message-tools.js +0 -106
- package/dist/agent/tools/message-tools.js.map +0 -1
- package/dist/cli/commands/app.d.ts +0 -7
- package/dist/cli/commands/app.js +0 -268
- package/dist/cli/commands/app.js.map +0 -1
- package/dist/cli/commands/clear.d.ts +0 -5
- package/dist/cli/commands/clear.js +0 -36
- package/dist/cli/commands/clear.js.map +0 -1
- package/dist/cli/commands/collection.d.ts +0 -10
- package/dist/cli/commands/collection.js.map +0 -1
- package/dist/cli/commands/join.d.ts +0 -9
- package/dist/cli/commands/join.js +0 -255
- package/dist/cli/commands/join.js.map +0 -1
- package/dist/cli/commands/start.d.ts +0 -7
- package/dist/cli/commands/start.js +0 -584
- package/dist/cli/commands/start.js.map +0 -1
- package/dist/cli/commands/update.d.ts +0 -8
- package/dist/cli/commands/update.js +0 -155
- package/dist/cli/commands/update.js.map +0 -1
- package/dist/cli/commands/user.d.ts +0 -7
- package/dist/cli/commands/user.js +0 -175
- package/dist/cli/commands/user.js.map +0 -1
- package/dist/cli/scaffolding.d.ts +0 -12
- package/dist/cli/scaffolding.js +0 -397
- package/dist/cli/scaffolding.js.map +0 -1
- package/dist/integrations/registry.d.ts +0 -8
- package/dist/integrations/registry.js +0 -7
- package/dist/integrations/registry.js.map +0 -1
- package/dist/integrations/types.d.ts +0 -43
- package/dist/integrations/types.js +0 -5
- package/dist/integrations/types.js.map +0 -1
- package/dist/lib/lib/utils.d.ts +0 -2
- package/dist/lib/lib/utils.js +0 -6
- package/dist/lib/lib/utils.js.map +0 -1
- package/dist/server/chrome/chrome.css +0 -691
- package/dist/server/chrome/chrome.js +0 -374
- package/dist/server/commit-scheduler.d.ts +0 -39
- package/dist/server/commit-scheduler.js +0 -113
- package/dist/server/commit-scheduler.js.map +0 -1
- package/dist/server/plugin-loader.d.ts +0 -53
- package/dist/server/plugin-loader.js +0 -155
- package/dist/server/plugin-loader.js.map +0 -1
- package/dist/server/routes/meeting-ingest-api.d.ts +0 -14
- package/dist/server/routes/meeting-ingest-api.js.map +0 -1
- package/dist/server/routes/messages-api.d.ts +0 -15
- package/dist/server/routes/messages-api.js +0 -385
- package/dist/server/routes/messages-api.js.map +0 -1
- package/dist/services/batch-processor.d.ts +0 -49
- package/dist/services/batch-processor.js +0 -166
- package/dist/services/batch-processor.js.map +0 -1
- package/dist/services/briefing.d.ts +0 -26
- package/dist/services/briefing.js +0 -230
- package/dist/services/briefing.js.map +0 -1
- package/dist/services/heartbeat.d.ts +0 -28
- package/dist/services/heartbeat.js +0 -183
- package/dist/services/heartbeat.js.map +0 -1
- package/dist/services/image-import-service.d.ts +0 -24
- package/dist/services/image-import-service.js +0 -108
- package/dist/services/image-import-service.js.map +0 -1
- package/dist/services/insights.d.ts +0 -38
- package/dist/services/insights.js +0 -269
- package/dist/services/insights.js.map +0 -1
- package/dist/services/meeting-processor.js.map +0 -1
- package/dist/services/message-service.d.ts +0 -68
- package/dist/services/message-service.js +0 -220
- package/dist/services/message-service.js.map +0 -1
- package/dist/utils/workspace-config.d.ts +0 -8
- package/dist/utils/workspace-config.js +0 -22
- package/dist/utils/workspace-config.js.map +0 -1
- package/dist/web/_app/immutable/assets/0.uPSqtsC5.css +0 -1
- package/dist/web/_app/immutable/assets/11.2jzI3cZY.css +0 -1
- package/dist/web/_app/immutable/assets/12.CT4xL4K3.css +0 -1
- package/dist/web/_app/immutable/assets/13.BUrHkYry.css +0 -1
- package/dist/web/_app/immutable/assets/2.DpQWr6q6.css +0 -1
- package/dist/web/_app/immutable/assets/3.BxdqT7zi.css +0 -1
- package/dist/web/_app/immutable/assets/4.DdNqjd0T.css +0 -1
- package/dist/web/_app/immutable/assets/5.DFeGxLYf.css +0 -1
- package/dist/web/_app/immutable/assets/6.DXZr_rI_.css +0 -1
- package/dist/web/_app/immutable/assets/GraphView.D9ePpZez.css +0 -1
- package/dist/web/_app/immutable/assets/Toaster.rN8r_Hzv.css +0 -1
- package/dist/web/_app/immutable/assets/ViewToolbar.BWE03S64.css +0 -1
- package/dist/web/_app/immutable/assets/WorkspaceView.CgGDi_Zb.css +0 -1
- package/dist/web/_app/immutable/assets/wikilinks.CzMBkUMB.css +0 -1
- package/dist/web/_app/immutable/chunks/-jG4Obyh.js +0 -4
- package/dist/web/_app/immutable/chunks/2nrc8f_O.js +0 -1
- package/dist/web/_app/immutable/chunks/7S2LGqoP.js +0 -2
- package/dist/web/_app/immutable/chunks/8Q3ZJIYu.js +0 -1
- package/dist/web/_app/immutable/chunks/B8ydT5xX.js +0 -2
- package/dist/web/_app/immutable/chunks/BB_5th5W.js +0 -3383
- package/dist/web/_app/immutable/chunks/BEn6N5c2.js +0 -1
- package/dist/web/_app/immutable/chunks/BFNNbCAM.js +0 -1
- package/dist/web/_app/immutable/chunks/BFZZEUd5.js +0 -1
- package/dist/web/_app/immutable/chunks/BGk8kfOE.js +0 -2
- package/dist/web/_app/immutable/chunks/BIBCr278.js +0 -1
- package/dist/web/_app/immutable/chunks/BPCkkwqe.js +0 -1
- package/dist/web/_app/immutable/chunks/BhlvzGQx.js +0 -1
- package/dist/web/_app/immutable/chunks/BlMknQeF.js +0 -1
- package/dist/web/_app/immutable/chunks/BpjqrlCg.js +0 -1
- package/dist/web/_app/immutable/chunks/BrebtJNG.js +0 -18
- package/dist/web/_app/immutable/chunks/ByBZ7JIT.js +0 -1
- package/dist/web/_app/immutable/chunks/Bz0ZjVQE.js +0 -2
- package/dist/web/_app/immutable/chunks/BzJTZOK2.js +0 -1
- package/dist/web/_app/immutable/chunks/C0LVZhvn.js +0 -1
- package/dist/web/_app/immutable/chunks/C3uBrOS5.js +0 -1
- package/dist/web/_app/immutable/chunks/C8R1sDpW.js +0 -1
- package/dist/web/_app/immutable/chunks/CDRHrs0g.js +0 -1
- package/dist/web/_app/immutable/chunks/CN5_py1I.js +0 -1
- package/dist/web/_app/immutable/chunks/CPne482a.js +0 -1
- package/dist/web/_app/immutable/chunks/CSVbGg_b.js +0 -5
- package/dist/web/_app/immutable/chunks/CWyU-seV.js +0 -1
- package/dist/web/_app/immutable/chunks/CX_61fY8.js +0 -5
- package/dist/web/_app/immutable/chunks/CYrVHOHA.js +0 -1
- package/dist/web/_app/immutable/chunks/ChsiIm-E.js +0 -1
- package/dist/web/_app/immutable/chunks/CojKppbh.js +0 -1
- package/dist/web/_app/immutable/chunks/CqkleIqs.js +0 -1
- package/dist/web/_app/immutable/chunks/CtYLtD7K.js +0 -1
- package/dist/web/_app/immutable/chunks/D-HDy5qS.js +0 -1
- package/dist/web/_app/immutable/chunks/D5aIYSkd.js +0 -1
- package/dist/web/_app/immutable/chunks/DBBXARVf.js +0 -1
- package/dist/web/_app/immutable/chunks/DFYOFE3o.js +0 -1
- package/dist/web/_app/immutable/chunks/DKaafS50.js +0 -1
- package/dist/web/_app/immutable/chunks/DUMOo1Pn.js +0 -1
- package/dist/web/_app/immutable/chunks/DWX9f6AF.js +0 -1
- package/dist/web/_app/immutable/chunks/DY8-EONP.js +0 -1
- package/dist/web/_app/immutable/chunks/DkoHPElM.js +0 -1
- package/dist/web/_app/immutable/chunks/DnL9f0lc.js +0 -7
- package/dist/web/_app/immutable/chunks/DsnmJJEf.js +0 -1
- package/dist/web/_app/immutable/chunks/DujahU3W.js +0 -1
- package/dist/web/_app/immutable/chunks/FBn-ES5k.js +0 -1
- package/dist/web/_app/immutable/chunks/HQpwSOb3.js +0 -1
- package/dist/web/_app/immutable/chunks/KyjzlWRN.js +0 -2
- package/dist/web/_app/immutable/chunks/PPVm8Dsz.js +0 -1
- package/dist/web/_app/immutable/chunks/UwYfmrPx.js +0 -2
- package/dist/web/_app/immutable/chunks/W25ZVI8L.js +0 -2
- package/dist/web/_app/immutable/chunks/WSUKABI_.js +0 -1
- package/dist/web/_app/immutable/chunks/XjsuEnNE.js +0 -5
- package/dist/web/_app/immutable/chunks/ZD6ARAtb.js +0 -1
- package/dist/web/_app/immutable/chunks/pBTf4stg.js +0 -2
- package/dist/web/_app/immutable/chunks/rGIarcnp.js +0 -1
- package/dist/web/_app/immutable/chunks/vxEtkL8z.js +0 -1
- package/dist/web/_app/immutable/chunks/wDIGUaoU.js +0 -3
- package/dist/web/_app/immutable/entry/app.ZHiTM8WS.js +0 -2
- package/dist/web/_app/immutable/entry/start.C9-FfAVc.js +0 -1
- package/dist/web/_app/immutable/nodes/0.D92Orz8k.js +0 -2
- package/dist/web/_app/immutable/nodes/1.BMdyglM_.js +0 -1
- package/dist/web/_app/immutable/nodes/10.BilVDHSL.js +0 -1
- package/dist/web/_app/immutable/nodes/11.CS9E0Hic.js +0 -1
- package/dist/web/_app/immutable/nodes/12.D3BOxYzG.js +0 -1
- package/dist/web/_app/immutable/nodes/13.CClMKYtN.js +0 -1
- package/dist/web/_app/immutable/nodes/2.C8KKElPL.js +0 -267
- package/dist/web/_app/immutable/nodes/3.C5n5uiWU.js +0 -5
- package/dist/web/_app/immutable/nodes/4.DcGVvgiL.js +0 -11
- package/dist/web/_app/immutable/nodes/5.DxIjnFQO.js +0 -4
- package/dist/web/_app/immutable/nodes/6.lkh6kKLj.js +0 -1
- package/dist/web/_app/immutable/nodes/7.Bg7SbfhA.js +0 -1
- package/dist/web/_app/immutable/nodes/8.DcXWCNBE.js +0 -1
- package/dist/web/_app/immutable/nodes/9.Cefi8Jfm.js +0 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase 9a — workspace.json schema (WARN-MODE).
|
|
3
|
+
*
|
|
4
|
+
* Registry-driven validator that flags secret-shaped material anywhere in a
|
|
5
|
+
* workspace.json blob. In 9a the validator runs but only *logs* violations;
|
|
6
|
+
* the write proceeds. Phase 9b will route writers through the validator, and
|
|
7
|
+
* 9c will flip rejections on.
|
|
8
|
+
*
|
|
9
|
+
* The detector reuses `findSecretLeaks()` from `bundle.ts` — the goal is
|
|
10
|
+
* that import-time, export-time, and save-time agree on what "looks like a
|
|
11
|
+
* secret" so leaks can't slip through one path while another rejects them.
|
|
12
|
+
*
|
|
13
|
+
* Output format is the structured single-line shape from the plan §5:
|
|
14
|
+
* [schema-warn] workspace_config: field '<path>' has secret-shaped value
|
|
15
|
+
* (registry: <key.name>, classification: <classification>)
|
|
16
|
+
*
|
|
17
|
+
* One line per violation. No multi-line stack traces. Cheap to grep, cheap
|
|
18
|
+
* for downstream log routing to redact further once Phase 11's sanitize()
|
|
19
|
+
* is wired.
|
|
20
|
+
*/
|
|
21
|
+
import { z } from 'zod';
|
|
22
|
+
/**
|
|
23
|
+
* Phase 9c — strict-mode error.
|
|
24
|
+
*
|
|
25
|
+
* Thrown when `STUDIOGRAPH_SCHEMA_STRICT` is on (default) and the
|
|
26
|
+
* workspace or connector validator finds at least one violation.
|
|
27
|
+
*
|
|
28
|
+
* **The error message MUST NOT contain the offending value.** Only the
|
|
29
|
+
* field path, registry classification, and a remediation hint are
|
|
30
|
+
* exposed — exactly what a route handler can log and surface to the
|
|
31
|
+
* user without re-leaking the secret.
|
|
32
|
+
*
|
|
33
|
+
* Routes that catch this translate it to:
|
|
34
|
+
* - HTTP 400 with error code `schema_violation` (config-api, etc.)
|
|
35
|
+
* - CLI exit 1 with a red message (sync, clone, join, ...)
|
|
36
|
+
*
|
|
37
|
+
* Callers can read `violations` and `scope` to build their own message.
|
|
38
|
+
*/
|
|
39
|
+
export declare class SchemaViolationError extends Error {
|
|
40
|
+
static readonly code: "schema_violation";
|
|
41
|
+
readonly code: "schema_violation";
|
|
42
|
+
readonly scope: 'workspace_config' | 'connector_config';
|
|
43
|
+
readonly violations: ReadonlyArray<SchemaViolation>;
|
|
44
|
+
constructor(scope: 'workspace_config' | 'connector_config', violations: SchemaViolation[]);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Phase 9c — runtime check for strict mode.
|
|
48
|
+
*
|
|
49
|
+
* Read at validation time (not cached at boot) so operators can flip the
|
|
50
|
+
* env in a hotfix without restarting the process. Default behaviour
|
|
51
|
+
* (env unset) is strict — `'0'` and `'false'` are the only opt-outs.
|
|
52
|
+
*/
|
|
53
|
+
export declare function isSchemaStrict(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* A structured violation. Returned by `validateWorkspaceConfig()` so callers
|
|
56
|
+
* can choose to log, reject, or aggregate. The default warn-mode wiring
|
|
57
|
+
* passes these straight to `console.warn` via `formatViolation()` below.
|
|
58
|
+
*/
|
|
59
|
+
export interface SchemaViolation {
|
|
60
|
+
/** Dotted path within the validated object. */
|
|
61
|
+
path: string;
|
|
62
|
+
/** Canonical registry key this path resolves to, if any. */
|
|
63
|
+
registryKey?: string;
|
|
64
|
+
/** Registry classification (`bootstrap`, `workspace-secret`, …). */
|
|
65
|
+
classification?: string;
|
|
66
|
+
/** Why the detector flagged the value. */
|
|
67
|
+
reason: 'registry' | 'value-shape' | 'connector';
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Top-level shape. Loose by design in 9a — we keep unknown fields so
|
|
71
|
+
* upstream callers (workspace.ts writeConfig, dual-write mirrors) don't
|
|
72
|
+
* regress on perfectly valid existing data. Phase 9b/c can tighten this to
|
|
73
|
+
* `.strict()` once the warn-mode telemetry shows what real data looks like.
|
|
74
|
+
*/
|
|
75
|
+
export declare const WorkspaceConfigSchema: z.ZodObject<{
|
|
76
|
+
version: z.ZodOptional<z.ZodString>;
|
|
77
|
+
team_name: z.ZodOptional<z.ZodString>;
|
|
78
|
+
name: z.ZodOptional<z.ZodString>;
|
|
79
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
80
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
81
|
+
repos: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
82
|
+
}, z.core.$loose>;
|
|
83
|
+
/**
|
|
84
|
+
* Run the secret-leak walker over a workspace.json blob and return a list of
|
|
85
|
+
* structured violations. The walker uses `findSecretLeaks()` from bundle.ts,
|
|
86
|
+
* which understands:
|
|
87
|
+
* - registry-named paths (`r2_config.secret_access_key` → bootstrap)
|
|
88
|
+
* - bootstrap field names (`jwtSecret`, `apiKey`)
|
|
89
|
+
* - value-shape patterns (`sk-*`, `Bearer *`, `https://user:pass@…`, etc.)
|
|
90
|
+
*
|
|
91
|
+
* The validator does NOT mutate, throw, or reject — it just produces the
|
|
92
|
+
* violation list. Callers that want strict behaviour wrap it in their own
|
|
93
|
+
* `if (violations.length) throw` check (Phase 9c).
|
|
94
|
+
*/
|
|
95
|
+
export declare function validateWorkspaceConfig(input: unknown): SchemaViolation[];
|
|
96
|
+
/**
|
|
97
|
+
* Format a single violation as the warn-mode log line. Stable, greppable,
|
|
98
|
+
* one line per violation. Phase 11's `sanitize()` is responsible for any
|
|
99
|
+
* further redaction once the centralized logger lands.
|
|
100
|
+
*/
|
|
101
|
+
export declare function formatViolation(scope: 'workspace_config' | 'connector_config', v: SchemaViolation): string;
|
|
102
|
+
/**
|
|
103
|
+
* Warn-mode entry point: validate + log each violation via `console.warn`.
|
|
104
|
+
* Returns the violation list so callers (tests, telemetry) can also
|
|
105
|
+
* inspect what was found.
|
|
106
|
+
*
|
|
107
|
+
* The logger seam is `console.warn` for 9a; Phase 11 will swap this for the
|
|
108
|
+
* centralized `log.warn` once that lands. Using `console.warn` here keeps
|
|
109
|
+
* the import graph small and avoids a Phase-11 dependency.
|
|
110
|
+
*/
|
|
111
|
+
export declare function warnOnWorkspaceConfigViolations(input: unknown): SchemaViolation[];
|
|
112
|
+
/**
|
|
113
|
+
* Phase 9c — strict-or-warn entry point used by save sites.
|
|
114
|
+
*
|
|
115
|
+
* When `STUDIOGRAPH_SCHEMA_STRICT` is on (default), throws
|
|
116
|
+
* `SchemaViolationError` on the first non-empty violation list. Otherwise
|
|
117
|
+
* delegates to `warnOnWorkspaceConfigViolations` for log-only behaviour.
|
|
118
|
+
*
|
|
119
|
+
* This is the canonical helper that `Workspace.writeConfig` should call.
|
|
120
|
+
* Tests can flip the env to exercise both modes.
|
|
121
|
+
*/
|
|
122
|
+
export declare function enforceWorkspaceConfig(input: unknown): SchemaViolation[];
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase 9a — workspace.json schema (WARN-MODE).
|
|
3
|
+
*
|
|
4
|
+
* Registry-driven validator that flags secret-shaped material anywhere in a
|
|
5
|
+
* workspace.json blob. In 9a the validator runs but only *logs* violations;
|
|
6
|
+
* the write proceeds. Phase 9b will route writers through the validator, and
|
|
7
|
+
* 9c will flip rejections on.
|
|
8
|
+
*
|
|
9
|
+
* The detector reuses `findSecretLeaks()` from `bundle.ts` — the goal is
|
|
10
|
+
* that import-time, export-time, and save-time agree on what "looks like a
|
|
11
|
+
* secret" so leaks can't slip through one path while another rejects them.
|
|
12
|
+
*
|
|
13
|
+
* Output format is the structured single-line shape from the plan §5:
|
|
14
|
+
* [schema-warn] workspace_config: field '<path>' has secret-shaped value
|
|
15
|
+
* (registry: <key.name>, classification: <classification>)
|
|
16
|
+
*
|
|
17
|
+
* One line per violation. No multi-line stack traces. Cheap to grep, cheap
|
|
18
|
+
* for downstream log routing to redact further once Phase 11's sanitize()
|
|
19
|
+
* is wired.
|
|
20
|
+
*/
|
|
21
|
+
import { z } from 'zod';
|
|
22
|
+
import { findSecretLeaks } from '../secrets/bundle.js';
|
|
23
|
+
import { getKeyDef } from '../secrets/registry.js';
|
|
24
|
+
/**
|
|
25
|
+
* Phase 9c — strict-mode error.
|
|
26
|
+
*
|
|
27
|
+
* Thrown when `STUDIOGRAPH_SCHEMA_STRICT` is on (default) and the
|
|
28
|
+
* workspace or connector validator finds at least one violation.
|
|
29
|
+
*
|
|
30
|
+
* **The error message MUST NOT contain the offending value.** Only the
|
|
31
|
+
* field path, registry classification, and a remediation hint are
|
|
32
|
+
* exposed — exactly what a route handler can log and surface to the
|
|
33
|
+
* user without re-leaking the secret.
|
|
34
|
+
*
|
|
35
|
+
* Routes that catch this translate it to:
|
|
36
|
+
* - HTTP 400 with error code `schema_violation` (config-api, etc.)
|
|
37
|
+
* - CLI exit 1 with a red message (sync, clone, join, ...)
|
|
38
|
+
*
|
|
39
|
+
* Callers can read `violations` and `scope` to build their own message.
|
|
40
|
+
*/
|
|
41
|
+
export class SchemaViolationError extends Error {
|
|
42
|
+
static code = 'schema_violation';
|
|
43
|
+
code = SchemaViolationError.code;
|
|
44
|
+
scope;
|
|
45
|
+
violations;
|
|
46
|
+
constructor(scope, violations) {
|
|
47
|
+
super(formatSchemaViolationMessage(scope, violations));
|
|
48
|
+
this.name = 'SchemaViolationError';
|
|
49
|
+
this.scope = scope;
|
|
50
|
+
this.violations = violations;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function formatSchemaViolationMessage(scope, violations) {
|
|
54
|
+
const lines = violations.map((v) => {
|
|
55
|
+
const meta = [];
|
|
56
|
+
if (v.registryKey)
|
|
57
|
+
meta.push(`registry: ${v.registryKey}`);
|
|
58
|
+
if (v.classification)
|
|
59
|
+
meta.push(`classification: ${v.classification}`);
|
|
60
|
+
if (!meta.length)
|
|
61
|
+
meta.push(`reason: ${v.reason}`);
|
|
62
|
+
return ` - ${v.path} (${meta.join(', ')})`;
|
|
63
|
+
});
|
|
64
|
+
const remediation = scope === 'workspace_config'
|
|
65
|
+
? 'Move secret values to environment variables or the encrypted store. ' +
|
|
66
|
+
'workspace.json is committed to the config repo and must not carry literals.'
|
|
67
|
+
: 'Use $ENV_VAR placeholders for secret-named fields (Authorization, ' +
|
|
68
|
+
'oauth.client_secret, token). Literal values belong in ~/.studiograph/connectors/ ' +
|
|
69
|
+
'(homedir layer), not the workspace-layer file.';
|
|
70
|
+
return [
|
|
71
|
+
`${scope} schema violation — secret-shaped content detected:`,
|
|
72
|
+
...lines,
|
|
73
|
+
remediation,
|
|
74
|
+
'Set STUDIOGRAPH_SCHEMA_STRICT=0 to fall back to warn-mode while fixing.',
|
|
75
|
+
].join('\n');
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Phase 9c — runtime check for strict mode.
|
|
79
|
+
*
|
|
80
|
+
* Read at validation time (not cached at boot) so operators can flip the
|
|
81
|
+
* env in a hotfix without restarting the process. Default behaviour
|
|
82
|
+
* (env unset) is strict — `'0'` and `'false'` are the only opt-outs.
|
|
83
|
+
*/
|
|
84
|
+
export function isSchemaStrict() {
|
|
85
|
+
const raw = process.env.STUDIOGRAPH_SCHEMA_STRICT;
|
|
86
|
+
if (raw === undefined || raw === '')
|
|
87
|
+
return true;
|
|
88
|
+
const v = raw.toLowerCase();
|
|
89
|
+
return !(v === '0' || v === 'false' || v === 'off' || v === 'no');
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Top-level shape. Loose by design in 9a — we keep unknown fields so
|
|
93
|
+
* upstream callers (workspace.ts writeConfig, dual-write mirrors) don't
|
|
94
|
+
* regress on perfectly valid existing data. Phase 9b/c can tighten this to
|
|
95
|
+
* `.strict()` once the warn-mode telemetry shows what real data looks like.
|
|
96
|
+
*/
|
|
97
|
+
export const WorkspaceConfigSchema = z
|
|
98
|
+
.object({
|
|
99
|
+
version: z.string().optional(),
|
|
100
|
+
team_name: z.string().optional(),
|
|
101
|
+
name: z.string().optional(),
|
|
102
|
+
slug: z.string().optional(),
|
|
103
|
+
created_at: z.string().optional(),
|
|
104
|
+
repos: z.array(z.unknown()).optional(),
|
|
105
|
+
})
|
|
106
|
+
.passthrough();
|
|
107
|
+
/**
|
|
108
|
+
* Run the secret-leak walker over a workspace.json blob and return a list of
|
|
109
|
+
* structured violations. The walker uses `findSecretLeaks()` from bundle.ts,
|
|
110
|
+
* which understands:
|
|
111
|
+
* - registry-named paths (`r2_config.secret_access_key` → bootstrap)
|
|
112
|
+
* - bootstrap field names (`jwtSecret`, `apiKey`)
|
|
113
|
+
* - value-shape patterns (`sk-*`, `Bearer *`, `https://user:pass@…`, etc.)
|
|
114
|
+
*
|
|
115
|
+
* The validator does NOT mutate, throw, or reject — it just produces the
|
|
116
|
+
* violation list. Callers that want strict behaviour wrap it in their own
|
|
117
|
+
* `if (violations.length) throw` check (Phase 9c).
|
|
118
|
+
*/
|
|
119
|
+
export function validateWorkspaceConfig(input) {
|
|
120
|
+
const violations = [];
|
|
121
|
+
if (!input || typeof input !== 'object')
|
|
122
|
+
return violations;
|
|
123
|
+
for (const leak of findSecretLeaks('', input)) {
|
|
124
|
+
const def = lookupKey(leak.path);
|
|
125
|
+
violations.push({
|
|
126
|
+
path: leak.path,
|
|
127
|
+
registryKey: def?.name,
|
|
128
|
+
classification: def?.classification,
|
|
129
|
+
reason: leak.reason,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return violations;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Format a single violation as the warn-mode log line. Stable, greppable,
|
|
136
|
+
* one line per violation. Phase 11's `sanitize()` is responsible for any
|
|
137
|
+
* further redaction once the centralized logger lands.
|
|
138
|
+
*/
|
|
139
|
+
export function formatViolation(scope, v) {
|
|
140
|
+
const parts = [];
|
|
141
|
+
parts.push(`[schema-warn] ${scope}: field '${v.path}' has secret-shaped value`);
|
|
142
|
+
if (v.registryKey || v.classification) {
|
|
143
|
+
const meta = [];
|
|
144
|
+
if (v.registryKey)
|
|
145
|
+
meta.push(`registry: ${v.registryKey}`);
|
|
146
|
+
if (v.classification)
|
|
147
|
+
meta.push(`classification: ${v.classification}`);
|
|
148
|
+
parts.push(`(${meta.join(', ')})`);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
parts.push('(registry: <unmapped>, reason: value-shape)');
|
|
152
|
+
}
|
|
153
|
+
return parts.join(' ');
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Warn-mode entry point: validate + log each violation via `console.warn`.
|
|
157
|
+
* Returns the violation list so callers (tests, telemetry) can also
|
|
158
|
+
* inspect what was found.
|
|
159
|
+
*
|
|
160
|
+
* The logger seam is `console.warn` for 9a; Phase 11 will swap this for the
|
|
161
|
+
* centralized `log.warn` once that lands. Using `console.warn` here keeps
|
|
162
|
+
* the import graph small and avoids a Phase-11 dependency.
|
|
163
|
+
*/
|
|
164
|
+
export function warnOnWorkspaceConfigViolations(input) {
|
|
165
|
+
const violations = validateWorkspaceConfig(input);
|
|
166
|
+
for (const v of violations) {
|
|
167
|
+
// eslint-disable-next-line no-console
|
|
168
|
+
console.warn(formatViolation('workspace_config', v));
|
|
169
|
+
}
|
|
170
|
+
return violations;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Phase 9c — strict-or-warn entry point used by save sites.
|
|
174
|
+
*
|
|
175
|
+
* When `STUDIOGRAPH_SCHEMA_STRICT` is on (default), throws
|
|
176
|
+
* `SchemaViolationError` on the first non-empty violation list. Otherwise
|
|
177
|
+
* delegates to `warnOnWorkspaceConfigViolations` for log-only behaviour.
|
|
178
|
+
*
|
|
179
|
+
* This is the canonical helper that `Workspace.writeConfig` should call.
|
|
180
|
+
* Tests can flip the env to exercise both modes.
|
|
181
|
+
*/
|
|
182
|
+
export function enforceWorkspaceConfig(input) {
|
|
183
|
+
if (!isSchemaStrict()) {
|
|
184
|
+
return warnOnWorkspaceConfigViolations(input);
|
|
185
|
+
}
|
|
186
|
+
const violations = validateWorkspaceConfig(input);
|
|
187
|
+
if (violations.length > 0) {
|
|
188
|
+
throw new SchemaViolationError('workspace_config', violations);
|
|
189
|
+
}
|
|
190
|
+
return violations;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Resolve a leak path to a registry entry. Tries direct match, the
|
|
194
|
+
* `workspace.`/`instance.` prefixes, and tail-walks suffixes — mirrors
|
|
195
|
+
* bundle.ts's lookup logic so the two stay in sync.
|
|
196
|
+
*/
|
|
197
|
+
function lookupKey(path) {
|
|
198
|
+
const direct = getKeyDef(path) ?? getKeyDef(`workspace.${path}`) ?? getKeyDef(`instance.${path}`);
|
|
199
|
+
if (direct)
|
|
200
|
+
return direct;
|
|
201
|
+
// Try the suffix walk: a.b.c → b.c, then c.
|
|
202
|
+
const parts = path.split('.');
|
|
203
|
+
for (let i = 1; i < parts.length; i++) {
|
|
204
|
+
const tail = parts.slice(i).join('.');
|
|
205
|
+
const m = getKeyDef(tail) ?? getKeyDef(`workspace.${tail}`) ?? getKeyDef(`instance.${tail}`);
|
|
206
|
+
if (m)
|
|
207
|
+
return m;
|
|
208
|
+
}
|
|
209
|
+
return undefined;
|
|
210
|
+
}
|
|
211
|
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ACtC,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,MAAM,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,aAAa,IAAI,EAAE,CAAC,IAAI,SAAS,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC;QAC7F,IAAI,CAAC;YAAE,OAAO,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SecretStore — write-only-from-the-outside contract for secret-classified
|
|
3
|
+
* keys. The value never round-trips out via `describe()`; only metadata is
|
|
4
|
+
* exposed to the UI/API. Internal callers (resolver, encryption migration)
|
|
5
|
+
* read raw values via `unsafeGetForResolver()`.
|
|
6
|
+
*
|
|
7
|
+
* After the scope-collapse refactor, the store is single-tier: Studiograph
|
|
8
|
+
* is single-workspace-per-process, so secrets.db has no `scope` / `scope_id`
|
|
9
|
+
* dimension. The `Classification` registry tag (workspace-secret /
|
|
10
|
+
* workspace-setting) is the only categorization that matters.
|
|
11
|
+
*/
|
|
12
|
+
import type { Classification } from './registry.js';
|
|
13
|
+
export interface ActorContext {
|
|
14
|
+
type: 'user' | 'system';
|
|
15
|
+
/** Set when type === 'user'. */
|
|
16
|
+
userId?: string;
|
|
17
|
+
/** Set when type === 'system'. e.g. 'importer', 'boot-migration', 'cli-rotate-master'. */
|
|
18
|
+
systemId?: string;
|
|
19
|
+
/** Optional, for HTTP-originated calls. */
|
|
20
|
+
ip?: string;
|
|
21
|
+
userAgent?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface SecretMetadata {
|
|
24
|
+
key: string;
|
|
25
|
+
classification: Classification;
|
|
26
|
+
/** Human label set when written, e.g. "Production Anthropic". */
|
|
27
|
+
label?: string;
|
|
28
|
+
/** Provider hint for UI presentation. */
|
|
29
|
+
provider?: string;
|
|
30
|
+
/** Last successful test_connection timestamp (ms epoch). */
|
|
31
|
+
lastTestedAt?: number;
|
|
32
|
+
/** 'ok' | 'fail' | undefined when never tested. */
|
|
33
|
+
lastTestResult?: 'ok' | 'fail';
|
|
34
|
+
updatedAt: number;
|
|
35
|
+
updatedBy: string;
|
|
36
|
+
/** Master-key version used to encrypt the row. */
|
|
37
|
+
keyVersion: string;
|
|
38
|
+
}
|
|
39
|
+
export interface SetSecretInput {
|
|
40
|
+
key: string;
|
|
41
|
+
value: string;
|
|
42
|
+
label?: string;
|
|
43
|
+
provider?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface SecretStore {
|
|
46
|
+
/**
|
|
47
|
+
* Write or overwrite a secret. Audit-logged. Validates that `key` is in
|
|
48
|
+
* the registry with a *-secret classification (workspace-secret) —
|
|
49
|
+
* bootstrap and user-secret keys reject.
|
|
50
|
+
*/
|
|
51
|
+
set(input: SetSecretInput, actor: ActorContext): Promise<SecretMetadata>;
|
|
52
|
+
/**
|
|
53
|
+
* Return metadata for a given key. The actual ciphertext
|
|
54
|
+
* is NEVER returned through this method. Use `unsafeGetForResolver()` for
|
|
55
|
+
* resolver / migration paths.
|
|
56
|
+
*/
|
|
57
|
+
describe(key: string): SecretMetadata | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Enumerate secret metadata. Audit-logged when actor is provided
|
|
60
|
+
* (UI/API metadata reads). Named `listSecrets` to avoid ambiguity with
|
|
61
|
+
* `SettingsStore.list()` when one class implements both interfaces.
|
|
62
|
+
*/
|
|
63
|
+
listSecrets(actor?: ActorContext): SecretMetadata[];
|
|
64
|
+
/**
|
|
65
|
+
* Delete a secret. Audit-logged.
|
|
66
|
+
*/
|
|
67
|
+
delete(key: string, actor: ActorContext): Promise<boolean>;
|
|
68
|
+
/**
|
|
69
|
+
* Resolver-only path: return the decrypted plaintext or undefined. NOT
|
|
70
|
+
* audit-logged (hot path). Throws on AEAD failure (caller should audit
|
|
71
|
+
* the failure as `decrypt_fail`).
|
|
72
|
+
*
|
|
73
|
+
* Named `unsafe*` because every UI/API caller MUST go through `describe()`
|
|
74
|
+
* instead — the value should not leave the resolver.
|
|
75
|
+
*/
|
|
76
|
+
unsafeGetForResolver(key: string): string | undefined;
|
|
77
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SecretStore — write-only-from-the-outside contract for secret-classified
|
|
3
|
+
* keys. The value never round-trips out via `describe()`; only metadata is
|
|
4
|
+
* exposed to the UI/API. Internal callers (resolver, encryption migration)
|
|
5
|
+
* read raw values via `unsafeGetForResolver()`.
|
|
6
|
+
*
|
|
7
|
+
* After the scope-collapse refactor, the store is single-tier: Studiograph
|
|
8
|
+
* is single-workspace-per-process, so secrets.db has no `scope` / `scope_id`
|
|
9
|
+
* dimension. The `Classification` registry tag (workspace-secret /
|
|
10
|
+
* workspace-setting) is the only categorization that matters.
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=SecretStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecretStore.js","sourceRoot":"","sources":["../../../src/core/secrets/SecretStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SettingsResolver — single read-side entry point. Implements the
|
|
3
|
+
* precedence chain:
|
|
4
|
+
*
|
|
5
|
+
* bootstrap → env > default (env-only; no store layer)
|
|
6
|
+
* workspace-* → store > default (env is NOT consulted at resolve time)
|
|
7
|
+
* user-* → handled by auth.db readers (not this module)
|
|
8
|
+
*
|
|
9
|
+
* Env values for workspace-* keys are read ONCE by the first-run importer
|
|
10
|
+
* and mirrored into the store on cold boot; after that, the store is
|
|
11
|
+
* canonical. This avoids the "env shadows store" confusion that the UI
|
|
12
|
+
* banner used to apologise for — if a user updates ANTHROPIC_API_KEY in
|
|
13
|
+
* Railway after the importer has run, the change is silently ignored
|
|
14
|
+
* until they update via the UI or CLI.
|
|
15
|
+
*
|
|
16
|
+
* Studiograph is single-workspace-per-process: the deployment IS the
|
|
17
|
+
* workspace, so there is no separate "instance" tier and no scope
|
|
18
|
+
* cascade. The old `'store-workspace'` and `'store-instance'` source
|
|
19
|
+
* values collapse to a single `'store'`.
|
|
20
|
+
*/
|
|
21
|
+
import type { SecretStore } from './SecretStore.js';
|
|
22
|
+
import type { SettingsStore } from './SettingsStore.js';
|
|
23
|
+
export type ResolutionSource = 'env' | 'store' | 'default' | 'unset';
|
|
24
|
+
export interface ResolvedValue<T = unknown> {
|
|
25
|
+
value: T | undefined;
|
|
26
|
+
source: ResolutionSource;
|
|
27
|
+
/** Set when source === 'env' — which alias actually matched. */
|
|
28
|
+
envAlias?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Reserved for forward compatibility. There is no scope cascade in v1 —
|
|
32
|
+
* the process IS the workspace — but the type stays around to keep call
|
|
33
|
+
* sites diff-free in case a future feature introduces sub-tenant scoping
|
|
34
|
+
* inside a single workspace.
|
|
35
|
+
*/
|
|
36
|
+
export interface ResolverContext {
|
|
37
|
+
}
|
|
38
|
+
export interface ResolverDeps {
|
|
39
|
+
secrets: SecretStore;
|
|
40
|
+
settings: SettingsStore;
|
|
41
|
+
}
|
|
42
|
+
export declare class SettingsResolver {
|
|
43
|
+
private readonly deps;
|
|
44
|
+
constructor(deps: ResolverDeps);
|
|
45
|
+
/**
|
|
46
|
+
* Resolve a key by canonical name. Returns the parsed value plus the
|
|
47
|
+
* source that won. Caller is responsible for handling `undefined` —
|
|
48
|
+
* the resolver does not throw on missing values.
|
|
49
|
+
*/
|
|
50
|
+
resolveWithSource<T = unknown>(name: string, ctx?: ResolverContext): ResolvedValue<T>;
|
|
51
|
+
resolve<T = unknown>(name: string, ctx?: ResolverContext): T | undefined;
|
|
52
|
+
private resolveDef;
|
|
53
|
+
private readFromStore;
|
|
54
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SettingsResolver — single read-side entry point. Implements the
|
|
3
|
+
* precedence chain:
|
|
4
|
+
*
|
|
5
|
+
* bootstrap → env > default (env-only; no store layer)
|
|
6
|
+
* workspace-* → store > default (env is NOT consulted at resolve time)
|
|
7
|
+
* user-* → handled by auth.db readers (not this module)
|
|
8
|
+
*
|
|
9
|
+
* Env values for workspace-* keys are read ONCE by the first-run importer
|
|
10
|
+
* and mirrored into the store on cold boot; after that, the store is
|
|
11
|
+
* canonical. This avoids the "env shadows store" confusion that the UI
|
|
12
|
+
* banner used to apologise for — if a user updates ANTHROPIC_API_KEY in
|
|
13
|
+
* Railway after the importer has run, the change is silently ignored
|
|
14
|
+
* until they update via the UI or CLI.
|
|
15
|
+
*
|
|
16
|
+
* Studiograph is single-workspace-per-process: the deployment IS the
|
|
17
|
+
* workspace, so there is no separate "instance" tier and no scope
|
|
18
|
+
* cascade. The old `'store-workspace'` and `'store-instance'` source
|
|
19
|
+
* values collapse to a single `'store'`.
|
|
20
|
+
*/
|
|
21
|
+
import { getKeyDef } from './registry.js';
|
|
22
|
+
export class SettingsResolver {
|
|
23
|
+
deps;
|
|
24
|
+
constructor(deps) {
|
|
25
|
+
this.deps = deps;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Resolve a key by canonical name. Returns the parsed value plus the
|
|
29
|
+
* source that won. Caller is responsible for handling `undefined` —
|
|
30
|
+
* the resolver does not throw on missing values.
|
|
31
|
+
*/
|
|
32
|
+
resolveWithSource(name, ctx = {}) {
|
|
33
|
+
const def = getKeyDef(name);
|
|
34
|
+
if (!def) {
|
|
35
|
+
throw new Error(`SettingsResolver: unknown key "${name}". Add it to the registry.`);
|
|
36
|
+
}
|
|
37
|
+
return this.resolveDef(def, ctx);
|
|
38
|
+
}
|
|
39
|
+
resolve(name, ctx = {}) {
|
|
40
|
+
return this.resolveWithSource(name, ctx).value;
|
|
41
|
+
}
|
|
42
|
+
resolveDef(def, ctx) {
|
|
43
|
+
// Bootstrap: env-only. These keys (master.key, jwt.secret, the CLI
|
|
44
|
+
// credentials, railway.token) load before the encrypted store exists,
|
|
45
|
+
// so they have no store layer to read from. Env wins; fall through to
|
|
46
|
+
// default.
|
|
47
|
+
if (def.classification === 'bootstrap') {
|
|
48
|
+
for (const alias of def.envAliases) {
|
|
49
|
+
const raw = process.env[alias];
|
|
50
|
+
if (raw === undefined || raw === '')
|
|
51
|
+
continue;
|
|
52
|
+
return { value: raw, source: 'env', envAlias: alias };
|
|
53
|
+
}
|
|
54
|
+
return { value: def.default, source: def.default !== undefined ? 'default' : 'unset' };
|
|
55
|
+
}
|
|
56
|
+
// Workspace-* keys: store > default. Env is NOT consulted at resolve
|
|
57
|
+
// time — the first-run importer mirrors env into the store on cold
|
|
58
|
+
// boot, then env stops being read. Operators who update env after
|
|
59
|
+
// the importer has run must update via UI or CLI for the change to
|
|
60
|
+
// take effect.
|
|
61
|
+
if (def.classification === 'workspace-secret' ||
|
|
62
|
+
def.classification === 'workspace-setting') {
|
|
63
|
+
const fromStore = this.readFromStore(def);
|
|
64
|
+
if (fromStore !== undefined)
|
|
65
|
+
return { value: fromStore, source: 'store' };
|
|
66
|
+
}
|
|
67
|
+
if (def.default !== undefined) {
|
|
68
|
+
return { value: def.default, source: 'default' };
|
|
69
|
+
}
|
|
70
|
+
return { value: undefined, source: 'unset' };
|
|
71
|
+
}
|
|
72
|
+
readFromStore(def) {
|
|
73
|
+
if (def.classification.endsWith('-secret')) {
|
|
74
|
+
const v = this.deps.secrets.unsafeGetForResolver(def.name);
|
|
75
|
+
return v;
|
|
76
|
+
}
|
|
77
|
+
return this.deps.settings.get(def.name);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=SettingsResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsResolver.js","sourceRoot":"","sources":["../../../src/core/secrets/SettingsResolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AA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mEAAmE;QACnE,kEAAkE;QAClE,mEAAmE;QACnE,eAAe;QACf,IACE,GAAG,CAAC,cAAc,KAAK,kBAAkB;YACzC,GAAG,CAAC,cAAc,KAAK,mBAAmB,EAC1C,CAAC;YACD,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAI,GAAG,CAAC,CAAC;YAC7C,IAAI,SAAS,KAAK,SAAS;gBAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;QAC5E,CAAC;QAED,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,OAAY,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QACxD,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IAC/C,CAAC;IAEO,aAAa,CAAI,GAAW;QAClC,IAAI,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC3D,OAAO,CAA6B,CAAC;QACvC,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAI,GAAG,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SettingsStore — non-secret workspace key/value pairs.
|
|
3
|
+
* Plaintext on disk; UI can read and write.
|
|
4
|
+
*
|
|
5
|
+
* After the scope-collapse refactor, settings are single-tier: Studiograph
|
|
6
|
+
* is single-workspace-per-process, so secrets.db has no scope dimension.
|
|
7
|
+
*/
|
|
8
|
+
import type { ActorContext } from './SecretStore.js';
|
|
9
|
+
export interface SettingMetadata {
|
|
10
|
+
key: string;
|
|
11
|
+
/** JSON-serialized value. Use `getValue<T>()` for typed access. */
|
|
12
|
+
valueJson: string;
|
|
13
|
+
updatedAt: number;
|
|
14
|
+
updatedBy: string;
|
|
15
|
+
}
|
|
16
|
+
export interface SetSettingInput {
|
|
17
|
+
key: string;
|
|
18
|
+
/** Any JSON-serializable value. */
|
|
19
|
+
value: unknown;
|
|
20
|
+
}
|
|
21
|
+
export interface SettingsStore {
|
|
22
|
+
set(input: SetSettingInput, actor: ActorContext): Promise<SettingMetadata>;
|
|
23
|
+
/**
|
|
24
|
+
* Return the parsed value, or undefined when unset. Synchronous —
|
|
25
|
+
* settings are read on the hot path.
|
|
26
|
+
*/
|
|
27
|
+
get<T = unknown>(key: string): T | undefined;
|
|
28
|
+
list(): SettingMetadata[];
|
|
29
|
+
delete(key: string, actor: ActorContext): Promise<boolean>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SettingsStore — non-secret workspace key/value pairs.
|
|
3
|
+
* Plaintext on disk; UI can read and write.
|
|
4
|
+
*
|
|
5
|
+
* After the scope-collapse refactor, settings are single-tier: Studiograph
|
|
6
|
+
* is single-workspace-per-process, so secrets.db has no scope dimension.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=SettingsStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsStore.js","sourceRoot":"","sources":["../../../src/core/secrets/SettingsStore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|