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
package/dist/core/validation.js
CHANGED
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Entity validation schemas for Studiograph
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
4
|
+
* 20 canonical entity types post-redesign:
|
|
5
|
+
* - CRM (4): person, organization, position, deal
|
|
6
|
+
* - PM (4): project, event, task, deliverable
|
|
7
|
+
* - KM authored (7): document, deck, artifact, publication, case-study, service, skill
|
|
8
|
+
* - Capture (4): note, reference, dataset, material
|
|
9
|
+
* - System (1): comment
|
|
8
10
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
+
* The `asset` entity type was retired (asset-as-embed / Phase F); its name is
|
|
12
|
+
* reserved (see RESERVED_ENTITY_TYPES) so it can never be re-created.
|
|
13
|
+
*
|
|
14
|
+
* "An object earns first-class entity status only if it earns its own view
|
|
15
|
+
* behavior across the six primary views (List, Gallery, Kanban, Calendar,
|
|
16
|
+
* Timeline, Graph). Objects that are mostly useful because they're attached
|
|
17
|
+
* to something else become categories, fields, or inline blocks — not types."
|
|
18
|
+
*
|
|
19
|
+
* Workspaces can define additional custom types via schema_extensions.
|
|
11
20
|
*/
|
|
12
21
|
import { z } from 'zod';
|
|
22
|
+
import { ARTIFACT_KINDS } from './artifact-bundle.js';
|
|
23
|
+
function dateField(role, label, description) {
|
|
24
|
+
return z
|
|
25
|
+
.string()
|
|
26
|
+
.date()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe(description ?? label)
|
|
29
|
+
.meta({ dateRole: role, label });
|
|
30
|
+
}
|
|
13
31
|
/**
|
|
14
32
|
* Base entity schema - all entities have these fields
|
|
15
33
|
*/
|
|
@@ -22,69 +40,107 @@ export const EntityBaseSchema = z.object({
|
|
|
22
40
|
updated_at: z.string().datetime('Invalid datetime format'),
|
|
23
41
|
created_by: z.string().min(1, 'Created by is required'),
|
|
24
42
|
updated_by: z.string().min(1, 'Updated by is required'),
|
|
25
|
-
date:
|
|
43
|
+
date: dateField('primary', 'Date', "The entity's primary date (YYYY-MM-DD)"),
|
|
26
44
|
tags: z.array(z.string())
|
|
27
45
|
.optional()
|
|
28
46
|
.describe('Tags for categorization'),
|
|
29
47
|
}).passthrough(); // Allow custom fields beyond the base schema
|
|
30
48
|
// ══════════════════════════════════════════════════════════════════════════════
|
|
31
|
-
//
|
|
49
|
+
// CRM — people, organizations, positions, deals
|
|
32
50
|
// ══════════════════════════════════════════════════════════════════════════════
|
|
33
51
|
/**
|
|
34
|
-
* Person — team members, client contacts, any individual
|
|
52
|
+
* Person — team members, client contacts, any individual.
|
|
53
|
+
*
|
|
54
|
+
* `category` and `status` are split: category is the relationship type
|
|
55
|
+
* (employee/contractor/client/partner) and status is whether that
|
|
56
|
+
* relationship is current or historical. Mirrors organization.
|
|
35
57
|
*/
|
|
36
58
|
export const PersonSchema = EntityBaseSchema.extend({
|
|
37
59
|
entity_type: z.literal('person'),
|
|
38
60
|
name: z.string().min(1, 'Person name is required'),
|
|
39
|
-
role: z.string().optional().describe('
|
|
40
|
-
|
|
61
|
+
role: z.string().optional().describe('Free-text title (distinct from `position` entity)'),
|
|
62
|
+
category: z.enum(['employee', 'contractor', 'client', 'partner', 'other'])
|
|
41
63
|
.optional()
|
|
42
|
-
.describe('Relationship
|
|
64
|
+
.describe('Relationship category'),
|
|
65
|
+
status: z.enum(['current', 'former'])
|
|
66
|
+
.optional()
|
|
67
|
+
.describe('Whether the relationship is current or historical'),
|
|
43
68
|
email: z.string().optional().describe('Email address'),
|
|
44
69
|
location: z.string().optional().describe('Location'),
|
|
45
70
|
organization: z.string().optional().describe('Organization wikilink'),
|
|
71
|
+
// Bridge to the auth.db user account this person represents. Scalar handle
|
|
72
|
+
// string (not a wikilink): users are out-of-graph identities. Workspace-
|
|
73
|
+
// unique — write-path enforcement lives in user-person-bridge.ts. Optional
|
|
74
|
+
// because person entities can exist without a corresponding user
|
|
75
|
+
// (contractors, client contacts, anyone in the org chart who doesn't log
|
|
76
|
+
// in). Empty string is the "cleared" form — graph.create seeds optional
|
|
77
|
+
// string fields to "" on new entities, and unlink writes "" as well, so
|
|
78
|
+
// the regex must accept it explicitly.
|
|
79
|
+
user_handle: z.string()
|
|
80
|
+
// Empty (cleared) OR a kebab-case handle: leading alnum, alnum/hyphen
|
|
81
|
+
// body, alnum tail, no doubled hyphens. Mirrors what auth's
|
|
82
|
+
// slugifyHandle + allocateHandle can actually emit — accepting
|
|
83
|
+
// `foo-` or `foo--bar` here would let a hand-edit drift outside what
|
|
84
|
+
// findUserByHandle can match.
|
|
85
|
+
.regex(/^(|[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9]))*)$/, 'user_handle must match the auth handle format (lowercase, single hyphens between alnums, alnum endpoints)')
|
|
86
|
+
.optional()
|
|
87
|
+
.describe('Auth handle of the user this person represents'),
|
|
46
88
|
});
|
|
47
89
|
/**
|
|
48
|
-
* Organization — clients, vendors, partners, prospects,
|
|
90
|
+
* Organization — clients, vendors, partners, prospects, professional
|
|
91
|
+
* associations.
|
|
49
92
|
*/
|
|
50
93
|
export const OrganizationSchema = EntityBaseSchema.extend({
|
|
51
94
|
entity_type: z.literal('organization'),
|
|
52
95
|
name: z.string().min(1, 'Organization name is required'),
|
|
53
|
-
category: z.enum(['client', 'vendor', 'partner', 'prospect', '
|
|
96
|
+
category: z.enum(['client', 'vendor', 'partner', 'prospect', 'professional-association', 'other'])
|
|
54
97
|
.optional()
|
|
55
98
|
.describe('Relationship category'),
|
|
56
|
-
status: z.enum(['active', '
|
|
99
|
+
status: z.enum(['active', 'dormant', 'former'])
|
|
57
100
|
.default('active')
|
|
58
|
-
.describe('Organization status'),
|
|
101
|
+
.describe('Organization status (`dormant` covers clients you have not worked with in a while but might again)'),
|
|
59
102
|
industry: z.string().optional().describe('Industry sector'),
|
|
60
103
|
website: z.string().url().optional().describe('Website URL'),
|
|
61
104
|
});
|
|
62
105
|
/**
|
|
63
|
-
*
|
|
106
|
+
* Position — a position spec or open job. Renamed from `role` to avoid
|
|
107
|
+
* collision with `person.role` (the free-text title field). Reframes from
|
|
108
|
+
* "the person's seat" to "the spec for a position."
|
|
64
109
|
*/
|
|
65
|
-
export const
|
|
66
|
-
entity_type: z.literal('
|
|
67
|
-
name: z.string().min(1, '
|
|
110
|
+
export const PositionSchema = EntityBaseSchema.extend({
|
|
111
|
+
entity_type: z.literal('position'),
|
|
112
|
+
name: z.string().min(1, 'Position name is required'),
|
|
68
113
|
department: z.string().optional().describe('Department'),
|
|
69
114
|
category: z.enum(['staff', 'contractor', 'intern'])
|
|
70
115
|
.optional()
|
|
71
116
|
.describe('Employment category'),
|
|
72
|
-
status: z.enum(['
|
|
73
|
-
.default('
|
|
74
|
-
.describe('
|
|
117
|
+
status: z.enum(['draft', 'open', 'filled', 'closed'])
|
|
118
|
+
.default('open')
|
|
119
|
+
.describe('Position lifecycle'),
|
|
75
120
|
});
|
|
76
121
|
/**
|
|
77
|
-
*
|
|
122
|
+
* Deal — pre-project opportunity in the sales pipeline.
|
|
78
123
|
*/
|
|
79
|
-
export const
|
|
80
|
-
entity_type: z.literal('
|
|
81
|
-
name: z.string().min(1, '
|
|
124
|
+
export const DealSchema = EntityBaseSchema.extend({
|
|
125
|
+
entity_type: z.literal('deal'),
|
|
126
|
+
name: z.string().min(1, 'Deal name is required'),
|
|
127
|
+
client: z.string().optional().describe('Client organization wikilink'),
|
|
128
|
+
contact: z.string().optional().describe('Primary contact person wikilink'),
|
|
129
|
+
stage: z.enum(['qualification', 'scoping', 'proposal', 'negotiation', 'pending-signature', 'won', 'lost'])
|
|
130
|
+
.default('qualification')
|
|
131
|
+
.describe('Pipeline stage'),
|
|
132
|
+
deal_value: z.number().optional().describe('Estimated deal value'),
|
|
133
|
+
start_date: dateField('start', 'Start date', 'When work on the deal began (enables Timeline rendering of duration)'),
|
|
134
|
+
date: dateField('primary', 'Close date', 'Expected close date'),
|
|
82
135
|
});
|
|
83
136
|
// ══════════════════════════════════════════════════════════════════════════════
|
|
84
|
-
//
|
|
137
|
+
// PM — project, event, task, deliverable
|
|
85
138
|
// ══════════════════════════════════════════════════════════════════════════════
|
|
86
139
|
/**
|
|
87
|
-
* Project — a client engagement or internal initiative
|
|
140
|
+
* Project — a client engagement or internal initiative.
|
|
141
|
+
*
|
|
142
|
+
* `services` is a wikilink array to `service` entities the project includes
|
|
143
|
+
* (replaces the previous `practice_area` concept).
|
|
88
144
|
*/
|
|
89
145
|
export const ProjectSchema = EntityBaseSchema.extend({
|
|
90
146
|
entity_type: z.literal('project'),
|
|
@@ -94,103 +150,162 @@ export const ProjectSchema = EntityBaseSchema.extend({
|
|
|
94
150
|
.describe('Project category'),
|
|
95
151
|
project_type: z.string().optional().describe('Kind of project (e.g., website, research, event, rebrand, prototype)'),
|
|
96
152
|
client: z.string().optional().describe('Client organization wikilink'),
|
|
97
|
-
|
|
153
|
+
services: z.array(z.string()).optional()
|
|
154
|
+
.describe('Service entities this project includes (wikilinks)'),
|
|
155
|
+
status: z.enum(['planning', 'in-progress', 'paused', 'complete', 'archived'])
|
|
98
156
|
.optional()
|
|
99
157
|
.describe('Current project status'),
|
|
100
|
-
start_date:
|
|
101
|
-
|
|
158
|
+
start_date: dateField('start', 'Start date', 'Project start date'),
|
|
159
|
+
date: dateField('primary', 'End date', 'Project end date'),
|
|
102
160
|
});
|
|
103
161
|
/**
|
|
104
|
-
*
|
|
162
|
+
* Event — any scheduled gathering (meeting, call, workshop, review, etc.).
|
|
163
|
+
* `type` discriminates the kind of gathering for grouping/filtering. The
|
|
164
|
+
* default `meeting` preserves semantics for legacy meeting captures.
|
|
165
|
+
*
|
|
166
|
+
* Note: `deadline` is intentionally NOT a `type` value — deadlines are
|
|
167
|
+
* `task` entries with a `date` (the due date). Events are things you attend.
|
|
105
168
|
*/
|
|
106
|
-
export const
|
|
107
|
-
|
|
108
|
-
|
|
169
|
+
export const EVENT_TYPES = [
|
|
170
|
+
'meeting', 'call', 'review', 'workshop', 'presentation', 'conference', 'other',
|
|
171
|
+
];
|
|
172
|
+
export const EventSchema = EntityBaseSchema.extend({
|
|
173
|
+
entity_type: z.literal('event'),
|
|
174
|
+
name: z.string().min(1, 'Event name/subject is required'),
|
|
175
|
+
type: z.enum(EVENT_TYPES).default('meeting').describe('Kind of event'),
|
|
109
176
|
attendees: z.array(z.string()).optional().describe('Attendee wikilinks'),
|
|
110
177
|
location: z.string().optional().describe('Location or meeting link'),
|
|
178
|
+
start_date: dateField('start', 'Start date', 'When a multi-day event begins (omit for single-day events)'),
|
|
179
|
+
date: dateField('primary', 'Date', 'When the event takes place'),
|
|
111
180
|
});
|
|
112
181
|
/**
|
|
113
|
-
*
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
status: z.enum(['proposed', 'accepted', 'rejected', 'deprecated', 'superseded'])
|
|
119
|
-
.default('proposed')
|
|
120
|
-
.describe('Current status'),
|
|
121
|
-
});
|
|
122
|
-
/**
|
|
123
|
-
* Task — lightweight action items and to-dos
|
|
182
|
+
* Task — lightweight action items and to-dos.
|
|
183
|
+
*
|
|
184
|
+
* `phase` is intentionally free-text (not a separate entity type or workspace
|
|
185
|
+
* config list). Phases vary widely across project types; the Timeline view
|
|
186
|
+
* auto-discovers distinct values per-project for grouping.
|
|
124
187
|
*/
|
|
125
188
|
export const TaskSchema = EntityBaseSchema.extend({
|
|
126
189
|
entity_type: z.literal('task'),
|
|
127
190
|
name: z.string().min(1, 'Task name is required'),
|
|
128
|
-
status: z.enum(['
|
|
129
|
-
.default('
|
|
191
|
+
status: z.enum(['backlog', 'todo', 'in-progress', 'in-review', 'done', 'cancelled'])
|
|
192
|
+
.default('backlog')
|
|
130
193
|
.describe('Task status'),
|
|
131
194
|
priority: z.enum(['low', 'medium', 'high', 'urgent'])
|
|
132
195
|
.optional()
|
|
133
196
|
.describe('Priority level'),
|
|
134
|
-
assignee: z.string().optional().describe('
|
|
135
|
-
|
|
197
|
+
assignee: z.string().optional().describe('Who the task is assigned to: a workspace account as `[[user:<id>|@handle]]` (preferred — this is what powers "My Tasks"), or a person-entity wikilink `[[person-id]]` for someone without an account')
|
|
198
|
+
// `refType` rides on the field via `.meta()` (same mechanism as the date
|
|
199
|
+
// vocabulary's `dateRole`/`label`). It marks `assignee` as a reference
|
|
200
|
+
// that must point at a `person` entity — surfaced through
|
|
201
|
+
// `describeZodObject` → `/api/schema` + `get_entity_schema` so pickers
|
|
202
|
+
// scope generically, and consumed by the write-path validator in
|
|
203
|
+
// entity-mutations.ts that actually rejects non-person targets. Zod
|
|
204
|
+
// itself can't resolve wikilinks, so this is a hint, not enforcement.
|
|
205
|
+
.meta({ refType: 'person' }),
|
|
206
|
+
phase: z.string().optional().describe('Project phase (free-text — Discover, Design, Prototype, Build, etc.)'),
|
|
207
|
+
start_date: dateField('start', 'Start date', 'Task start date (enables Timeline / Gantt rendering of duration)'),
|
|
208
|
+
date: dateField('primary', 'Due date', 'When the task is due'),
|
|
209
|
+
// Auto-stamped by graph.update when status transitions to/from `done` (see
|
|
210
|
+
// composeUpdatedFrontmatter). Lets surfaces show "completed today" without
|
|
211
|
+
// conflating it with the due date. ISO datetime; cleared when reopened.
|
|
212
|
+
completed_at: z.string().datetime('Invalid datetime format').optional()
|
|
213
|
+
.describe('When the task was marked done (ISO datetime, auto-managed)')
|
|
214
|
+
.meta({ label: 'Completed at' }),
|
|
136
215
|
});
|
|
137
216
|
/**
|
|
138
|
-
*
|
|
217
|
+
* Deliverable — a scoped output promised to a client.
|
|
218
|
+
*/
|
|
219
|
+
export const DeliverableSchema = EntityBaseSchema.extend({
|
|
220
|
+
entity_type: z.literal('deliverable'),
|
|
221
|
+
name: z.string().min(1, 'Deliverable name is required'),
|
|
222
|
+
project: z.string().optional().describe('Parent project wikilink'),
|
|
223
|
+
status: z.enum(['planned', 'in-progress', 'delivered', 'accepted', 'rejected'])
|
|
224
|
+
.default('planned')
|
|
225
|
+
.describe('Delivery status'),
|
|
226
|
+
phase: z.string().optional().describe('Project phase (free-text — same semantics as task.phase)'),
|
|
227
|
+
start_date: dateField('start', 'Start date', 'Deliverable start date (enables Timeline rendering of duration)'),
|
|
228
|
+
date: dateField('primary', 'Due date', 'When the deliverable is due'),
|
|
229
|
+
});
|
|
230
|
+
// ══════════════════════════════════════════════════════════════════════════════
|
|
231
|
+
// KM — authored (document, deck, publication, case-study, service, skill)
|
|
232
|
+
// ══════════════════════════════════════════════════════════════════════════════
|
|
233
|
+
/**
|
|
234
|
+
* Shared description for the `asset_ref` field — now `dataset`-ONLY.
|
|
235
|
+
*
|
|
236
|
+
* Body-embed model (2026-06-01): an import seeds the asset reference INTO THE
|
|
237
|
+
* BODY (an `` image embed for materials, a `[name](url)` source
|
|
238
|
+
* link for documents) — exactly as a user would. So material/document no longer
|
|
239
|
+
* carry `asset_ref`; the reference is in the markdown, not the frontmatter.
|
|
240
|
+
*
|
|
241
|
+
* `dataset` is the lone exception: a dataset body must stay valid CSV, so it
|
|
242
|
+
* can't hold a body link. `asset_ref` records the STORAGE UUID of the source
|
|
243
|
+
* xlsx (the `assets.db` `asset_id` / immutable-key id, never a URL, never an
|
|
244
|
+
* entity id) as INVISIBLE provenance — survives the entity moving repos and an
|
|
245
|
+
* asset-backend swap. It is one-to-one provenance, NOT an embed graph (the
|
|
246
|
+
* many-to-many image-embed mechanism is still markdown `` in a body).
|
|
247
|
+
*
|
|
248
|
+
* `.meta({ internal: true })` keeps it out of the field-metadata API, the
|
|
249
|
+
* property panel, and the agent's `get_entity_schema` (same treatment as
|
|
250
|
+
* `source_file`) — it is set by the import path, never hand-edited.
|
|
251
|
+
*/
|
|
252
|
+
const ASSET_REF_DESC = 'Storage UUID of the source xlsx this dataset was imported from';
|
|
253
|
+
/**
|
|
254
|
+
* Document — any authored document. The `guideline` category absorbs the
|
|
255
|
+
* former standalone `guideline` entity type.
|
|
139
256
|
*/
|
|
140
257
|
export const DocumentSchema = EntityBaseSchema.extend({
|
|
141
258
|
entity_type: z.literal('document'),
|
|
142
259
|
name: z.string().min(1, 'Document name is required'),
|
|
143
|
-
category: z.enum(['proposal', 'contract', 'brief', 'memo', 'report', 'template', 'other'])
|
|
260
|
+
category: z.enum(['proposal', 'contract', 'brief', 'memo', 'report', 'template', 'guideline', 'other'])
|
|
144
261
|
.optional()
|
|
145
262
|
.describe('Document category'),
|
|
146
263
|
status: z.enum(['draft', 'review', 'final', 'archived'])
|
|
147
264
|
.default('draft')
|
|
148
265
|
.describe('Document status'),
|
|
266
|
+
// No asset_ref: under the body-embed model an imported document seeds the
|
|
267
|
+
// extracted text + a `[name](url)` source link directly into its body, so the
|
|
268
|
+
// source-file reference lives in the markdown, not the frontmatter.
|
|
149
269
|
});
|
|
150
270
|
/**
|
|
151
|
-
*
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
name: z.string().min(1),
|
|
155
|
-
type: z.enum(['string', 'number', 'boolean', 'date']),
|
|
156
|
-
required: z.boolean().optional(),
|
|
157
|
-
description: z.string().optional(),
|
|
158
|
-
});
|
|
159
|
-
export const DatasetSchema = EntityBaseSchema.extend({
|
|
160
|
-
entity_type: z.literal('dataset'),
|
|
161
|
-
name: z.string().min(1, 'Dataset name is required'),
|
|
162
|
-
schema: z.array(ColumnDefinitionSchema).min(1, 'At least one column required'),
|
|
163
|
-
});
|
|
164
|
-
/**
|
|
165
|
-
* Reference — external resources and inspiration
|
|
271
|
+
* Deck — a slide deck or presentation. Stays its own type alongside
|
|
272
|
+
* `document` because of the dedicated slides renderer + agent skills that
|
|
273
|
+
* pattern-match on `entity_type === 'deck'`.
|
|
166
274
|
*/
|
|
167
|
-
export const
|
|
168
|
-
entity_type: z.literal('
|
|
169
|
-
name: z.string().min(1, '
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
export const NoteSchema = EntityBaseSchema.extend({
|
|
177
|
-
entity_type: z.literal('note'),
|
|
178
|
-
name: z.string().min(1, 'Note name is required'),
|
|
275
|
+
export const DeckSchema = EntityBaseSchema.extend({
|
|
276
|
+
entity_type: z.literal('deck'),
|
|
277
|
+
name: z.string().min(1, 'Deck name is required'),
|
|
278
|
+
audience: z.enum(['client', 'team', 'board', 'external', 'other'])
|
|
279
|
+
.optional()
|
|
280
|
+
.describe('Intended audience'),
|
|
281
|
+
status: z.enum(['draft', 'review', 'final', 'archived'])
|
|
282
|
+
.default('draft')
|
|
283
|
+
.describe('Deck status'),
|
|
179
284
|
});
|
|
180
285
|
/**
|
|
181
|
-
*
|
|
286
|
+
* Artifact — a persisted Artifact Canvas bundle. The markdown body stores the
|
|
287
|
+
* serialized ArtifactBundle JSON; frontmatter carries scannable metadata for
|
|
288
|
+
* lists, filters, and the property panel.
|
|
182
289
|
*/
|
|
183
|
-
export const
|
|
184
|
-
entity_type: z.literal('
|
|
185
|
-
name: z.string().min(1, '
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
.
|
|
189
|
-
|
|
190
|
-
|
|
290
|
+
export const ArtifactSchema = EntityBaseSchema.extend({
|
|
291
|
+
entity_type: z.literal('artifact'),
|
|
292
|
+
name: z.string().min(1, 'Artifact name is required'),
|
|
293
|
+
kind: z.enum(ARTIFACT_KINDS)
|
|
294
|
+
.default('custom')
|
|
295
|
+
.describe('Artifact kind rendered by the canvas'),
|
|
296
|
+
status: z.enum(['draft', 'review', 'final', 'archived'])
|
|
297
|
+
.default('draft')
|
|
298
|
+
.describe('Artifact status'),
|
|
299
|
+
viewport_width: z.number().int().positive().optional()
|
|
300
|
+
.describe('Canvas viewport width in pixels'),
|
|
301
|
+
viewport_height: z.number().int().positive().optional()
|
|
302
|
+
.describe('Canvas viewport height in pixels'),
|
|
303
|
+
viewport_mode: z.enum(['fixed', 'responsive', 'paged'])
|
|
304
|
+
.optional()
|
|
305
|
+
.describe('Canvas viewport behavior'),
|
|
191
306
|
});
|
|
192
307
|
/**
|
|
193
|
-
* Publication — authored content published externally
|
|
308
|
+
* Publication — authored content published externally.
|
|
194
309
|
*/
|
|
195
310
|
export const PublicationSchema = EntityBaseSchema.extend({
|
|
196
311
|
entity_type: z.literal('publication'),
|
|
@@ -202,105 +317,298 @@ export const PublicationSchema = EntityBaseSchema.extend({
|
|
|
202
317
|
url: z.string().optional().describe('URL of published content'),
|
|
203
318
|
});
|
|
204
319
|
/**
|
|
205
|
-
*
|
|
320
|
+
* Case Study — portfolio narratives for completed projects.
|
|
206
321
|
*/
|
|
207
|
-
export const
|
|
208
|
-
entity_type: z.literal('
|
|
209
|
-
name: z.string().min(1, '
|
|
322
|
+
export const CaseStudySchema = EntityBaseSchema.extend({
|
|
323
|
+
entity_type: z.literal('case-study'),
|
|
324
|
+
name: z.string().min(1, 'Case study name is required'),
|
|
210
325
|
client: z.string().optional().describe('Client organization wikilink'),
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
326
|
+
services: z.array(z.string()).optional()
|
|
327
|
+
.describe('Service entities this case study highlights (wikilinks)'),
|
|
328
|
+
date_range: z.string().optional().describe('Project timeframe (e.g., 2025-09 / 2026-01)'),
|
|
329
|
+
status: z.enum(['draft', 'review', 'final', 'published'])
|
|
330
|
+
.default('draft')
|
|
331
|
+
.describe('Case study status'),
|
|
332
|
+
});
|
|
333
|
+
/**
|
|
334
|
+
* Service — the firm's offerings + methodologies. Replaces the old
|
|
335
|
+
* `process` type and absorbs `practice-area` (top-level services replace
|
|
336
|
+
* what practice-area was trying to be).
|
|
337
|
+
*
|
|
338
|
+
* `sprint` links a granular service to its parent service (top-level
|
|
339
|
+
* services have none). `depends_on` / `enables` form a directed graph
|
|
340
|
+
* across the service set — the Graph view's most valuable use case.
|
|
341
|
+
*/
|
|
342
|
+
export const ServiceSchema = EntityBaseSchema.extend({
|
|
343
|
+
entity_type: z.literal('service'),
|
|
344
|
+
name: z.string().min(1, 'Service name is required'),
|
|
345
|
+
service_id: z.string().optional()
|
|
346
|
+
.describe('Optional human-readable id (e.g. "1.4") for studios that number their services'),
|
|
347
|
+
sprint: z.string().optional()
|
|
348
|
+
.describe('Parent service wikilink for hierarchy (top-level services / sprints have none)'),
|
|
349
|
+
depends_on: z.array(z.string()).optional()
|
|
350
|
+
.describe('Services that must precede this one (wikilinks)'),
|
|
351
|
+
enables: z.array(z.string()).optional()
|
|
352
|
+
.describe('Services that this one unlocks (wikilinks)'),
|
|
353
|
+
deliverables: z.array(z.string()).optional()
|
|
354
|
+
.describe('Named outputs this service produces'),
|
|
355
|
+
status: z.enum(['offered', 'in-development', 'retired'])
|
|
356
|
+
.default('offered')
|
|
357
|
+
.describe('Service lifecycle'),
|
|
358
|
+
});
|
|
359
|
+
/**
|
|
360
|
+
* Skill — prompt-level instructions the agent can load to teach it how to
|
|
361
|
+
* do a specific job. The entity id is the skill name used by `load_skill`.
|
|
362
|
+
* The body markdown is the instruction content.
|
|
363
|
+
*
|
|
364
|
+
* `applies_to` lets the agent load deck-skills when working on a deck,
|
|
365
|
+
* proposal-skills when on a `document.category=proposal`, etc. Empty /
|
|
366
|
+
* unset = generally applicable.
|
|
367
|
+
*
|
|
368
|
+
* The previous `loading: eager | on-demand` field is gone for graph-authored
|
|
369
|
+
* skills. Filesystem skills (shipped with the product in `src/agent/skills/`)
|
|
370
|
+
* keep their own loading mechanism via skill-loader.ts and orchestrator.ts.
|
|
371
|
+
*
|
|
372
|
+
* `name` and `description` are optional at creation so the sidebar new-entry
|
|
373
|
+
* flow works — the user fills them in afterward via the property panel.
|
|
374
|
+
*/
|
|
375
|
+
export const SkillSchema = EntityBaseSchema.extend({
|
|
376
|
+
entity_type: z.literal('skill'),
|
|
377
|
+
name: z.string().optional().describe('Human-readable title (falls back to entity id)'),
|
|
378
|
+
description: z.string().optional().describe('Shown in the skill index so the agent knows when to load it'),
|
|
379
|
+
applies_to: z.array(z.string()).optional()
|
|
380
|
+
.describe('Entity types this skill applies to (e.g. ["deck"]). Empty = generally applicable.'),
|
|
217
381
|
});
|
|
218
382
|
// ══════════════════════════════════════════════════════════════════════════════
|
|
219
|
-
//
|
|
383
|
+
// CAPTURE — note, reference
|
|
220
384
|
// ══════════════════════════════════════════════════════════════════════════════
|
|
221
385
|
/**
|
|
222
|
-
*
|
|
386
|
+
* Note — freeform thinking, research, daily notes.
|
|
387
|
+
*
|
|
388
|
+
* Decisions migrated from the cut `decision` type land here as plain
|
|
389
|
+
* notes; operators may manually convert specific entries to `task` if they
|
|
390
|
+
* read better as work items.
|
|
223
391
|
*/
|
|
224
|
-
export const
|
|
225
|
-
entity_type: z.literal('
|
|
226
|
-
name: z.string().min(1, '
|
|
227
|
-
|
|
392
|
+
export const NoteSchema = EntityBaseSchema.extend({
|
|
393
|
+
entity_type: z.literal('note'),
|
|
394
|
+
name: z.string().min(1, 'Note name is required'),
|
|
395
|
+
// Entry-primary provenance (A2): when this note was derived from an
|
|
396
|
+
// uploaded asset (e.g. a converted .docx/.pdf), `source_file` holds the
|
|
397
|
+
// SOURCE ASSET'S ENTITY ID — never a URL — so the link survives an asset
|
|
398
|
+
// backend swap and joins the graph (the relationship is also surfaced as a
|
|
399
|
+
// wikilink in the body). Absent for notes created directly.
|
|
400
|
+
//
|
|
401
|
+
// `.meta({ internal: true })` marks it system-managed: the field-metadata
|
|
402
|
+
// API (describeZodObject) omits it, so it never appears in the property
|
|
403
|
+
// panel or the agent's get_entity_schema, and the create/changeType field
|
|
404
|
+
// seeders skip it (so a directly-created note has NO source_file rather
|
|
405
|
+
// than `''`). Set only by the import/convert path.
|
|
406
|
+
source_file: z.string().optional().describe('Entity id of the source asset this note was derived from').meta({ internal: true }),
|
|
228
407
|
});
|
|
229
408
|
/**
|
|
230
|
-
*
|
|
409
|
+
* Reference — external resources and inspiration.
|
|
231
410
|
*/
|
|
232
|
-
export const
|
|
233
|
-
entity_type: z.literal('
|
|
234
|
-
name: z.string().min(1, '
|
|
411
|
+
export const ReferenceSchema = EntityBaseSchema.extend({
|
|
412
|
+
entity_type: z.literal('reference'),
|
|
413
|
+
name: z.string().min(1, 'Reference name is required'),
|
|
414
|
+
source: z.string().optional().describe('Source or author'),
|
|
415
|
+
link: z.string().optional().describe('URL'),
|
|
235
416
|
});
|
|
236
417
|
/**
|
|
237
|
-
*
|
|
418
|
+
* Dataset — a CSV the workspace owns, edited in a grid.
|
|
419
|
+
*
|
|
420
|
+
* Conventional CSV: the markdown body IS the data, and the header row IS the
|
|
421
|
+
* column list — there's no separate typed column schema. The grid editor
|
|
422
|
+
* (web CsvEditor) and the agent's `query_dataset` / `append_rows` tools read
|
|
423
|
+
* the body through CSVService (src/services/csv-service.ts), deriving columns
|
|
424
|
+
* from the header. Distinct from an uploaded `asset` with
|
|
425
|
+
* `asset_kind: 'spreadsheet'`, which is an opaque binary — a dataset is
|
|
426
|
+
* in-graph, queryable, and row-appendable.
|
|
238
427
|
*/
|
|
239
|
-
export const
|
|
240
|
-
entity_type: z.literal('
|
|
241
|
-
name: z.string().min(1, '
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
428
|
+
export const DatasetSchema = EntityBaseSchema.extend({
|
|
429
|
+
entity_type: z.literal('dataset'),
|
|
430
|
+
name: z.string().min(1, 'Dataset name is required'),
|
|
431
|
+
// Entry-primary provenance (A2): set when this dataset was derived from an
|
|
432
|
+
// uploaded asset (e.g. one sheet of a converted .xlsx). Holds the SOURCE
|
|
433
|
+
// ASSET'S ENTITY ID, never a URL. See NoteSchema.source_file (incl. the
|
|
434
|
+
// `.meta({ internal: true })` rationale — same system-managed treatment).
|
|
435
|
+
source_file: z.string().optional().describe('Entity id of the source asset this dataset was derived from').meta({ internal: true }),
|
|
436
|
+
// When derived from one sheet of a converted .xlsx, the original worksheet
|
|
437
|
+
// name — the stable key that lets a re-convert (replace) match this dataset
|
|
438
|
+
// back to its sheet and update it IN PLACE, preserving the id + inbound
|
|
439
|
+
// links even if the first conversion's id was collision-suffixed. Internal
|
|
440
|
+
// (system-managed); never user-edited.
|
|
441
|
+
source_sheet: z.string().optional().describe('Original worksheet name this dataset was derived from').meta({ internal: true }),
|
|
442
|
+
// Asset-as-embed provenance: the storage UUID of the source asset (e.g. the
|
|
443
|
+
// .xlsx this sheet was imported from). Frontmatter only — the dataset body
|
|
444
|
+
// stays pure CSV, so the asset link is NEVER a body embed. See ASSET_REF_DESC.
|
|
445
|
+
asset_ref: z.string().optional().describe(ASSET_REF_DESC).meta({ internal: true }),
|
|
446
|
+
});
|
|
447
|
+
/**
|
|
448
|
+
* Material — a first-class graph entry that wraps a free-standing binary
|
|
449
|
+
* asset (image or opaque file: photo, logo, psd/ai/sketch/fig, video, audio,
|
|
450
|
+
* archive) when no better type fits. The asset-as-embed catch-all: import
|
|
451
|
+
* routes docx/pdf → `document`, xlsx → `dataset`, and everything else (image +
|
|
452
|
+
* opaque) → `material`.
|
|
453
|
+
*
|
|
454
|
+
* Distinct from `asset` (the stored bytes + `assets.db` row) and from
|
|
455
|
+
* `reference` (a pointer to an EXTERNAL source the workspace doesn't own).
|
|
456
|
+
* Under the body-embed model a material's body IS the asset: import seeds an
|
|
457
|
+
* inline `` image embed (images) or a `[name](url)` download link
|
|
458
|
+
* (opaque binaries). No `asset_ref` frontmatter — the reference lives in the
|
|
459
|
+
* markdown. A hand-created material (New Entry / agent) is a notes/catalog
|
|
460
|
+
* entry whose body the user writes themselves.
|
|
461
|
+
*/
|
|
462
|
+
export const MaterialSchema = EntityBaseSchema.extend({
|
|
463
|
+
entity_type: z.literal('material'),
|
|
464
|
+
name: z.string().min(1, 'Material name is required'),
|
|
465
|
+
// Purpose-oriented grouping axis (NOT a re-encoding of the asset's kind,
|
|
466
|
+
// which lives in assets.db). Optional. Values are intentionally minimal —
|
|
467
|
+
// enums are cheap to extend, expensive to remove.
|
|
468
|
+
category: z.enum(['design', 'brand', 'media', 'archive', 'other'])
|
|
469
|
+
.optional()
|
|
470
|
+
.describe('Purpose grouping (design source, brand asset, media, archive, other)'),
|
|
245
471
|
});
|
|
246
472
|
// ══════════════════════════════════════════════════════════════════════════════
|
|
473
|
+
// ASSET KINDS (store-facing — NOT an entity type)
|
|
474
|
+
// ══════════════════════════════════════════════════════════════════════════════
|
|
475
|
+
/**
|
|
476
|
+
* High-level kinds for stored binaries — assets.db media metadata + per-kind
|
|
477
|
+
* UI (icon/viewer/thumbnail). Drives `detectAssetKind` in
|
|
478
|
+
* src/services/assets/base.ts and the asset STORE, NOT any entity schema.
|
|
479
|
+
*
|
|
480
|
+
* The `asset` ENTITY type was retired (asset-as-embed §6 / Phase F): an
|
|
481
|
+
* imported binary now becomes a typed entry (material/document/dataset) that
|
|
482
|
+
* embeds a free-standing, folder-owned asset. The store (assets.db +
|
|
483
|
+
* immutable-key blobs + serving routes) stays.
|
|
484
|
+
*/
|
|
485
|
+
export const ASSET_KINDS = [
|
|
486
|
+
'image', 'video', 'audio', 'pdf', 'spreadsheet', 'other',
|
|
487
|
+
];
|
|
488
|
+
// ══════════════════════════════════════════════════════════════════════════════
|
|
489
|
+
// SYSTEM — comment (virtual entity, SQLite-backed)
|
|
490
|
+
// ══════════════════════════════════════════════════════════════════════════════
|
|
491
|
+
/**
|
|
492
|
+
* Comment — a threaded comment anchored to another entry. Unlike every other
|
|
493
|
+
* entity type, comments are NOT stored as markdown files; they live in
|
|
494
|
+
* `comments.db` (see `src/services/comment-service.ts`) for throughput.
|
|
495
|
+
* Agents see them as first-class typed entities through the virtual-entity
|
|
496
|
+
* adapter (`src/services/comment-virtual-entity.ts`), shared by the MCP and
|
|
497
|
+
* in-app agent surfaces, which is why the schema
|
|
498
|
+
* lives here alongside the file-backed types.
|
|
499
|
+
*
|
|
500
|
+
* The shape documents what fields the MCP envelope exposes; runtime
|
|
501
|
+
* validation happens inside CommentService itself.
|
|
502
|
+
*/
|
|
503
|
+
export const CommentSchema = EntityBaseSchema.extend({
|
|
504
|
+
entity_type: z.literal('comment'),
|
|
505
|
+
repo: z.string().describe('Folder the anchored entry lives in'),
|
|
506
|
+
entry_type: z.string().describe('Entity type of the anchored entry'),
|
|
507
|
+
entry_id: z.string().describe('Entity id of the anchored entry'),
|
|
508
|
+
thread_id: z.string().describe('Head comment id; replies share the same thread_id'),
|
|
509
|
+
parent_id: z.string().nullable().optional().describe('Parent comment id for replies, null on the head'),
|
|
510
|
+
author_user_id: z.number().int().describe('users.id of the author'),
|
|
511
|
+
author_role: z.enum(['user', 'agent']).describe('Whether the author was a human or the agent'),
|
|
512
|
+
anchor_quote: z.string().nullable().optional()
|
|
513
|
+
.describe('Original highlighted text at creation time, ≤256 chars (used for orphan rendering)'),
|
|
514
|
+
resolved_at: z.string().nullable().optional(),
|
|
515
|
+
resolved_by_user_id: z.number().int().nullable().optional(),
|
|
516
|
+
edited: z.boolean().optional(),
|
|
517
|
+
mentions: z.array(z.string()).optional().describe('Handles of mentioned users'),
|
|
518
|
+
});
|
|
247
519
|
// ══════════════════════════════════════════════════════════════════════════════
|
|
248
520
|
// SCHEMA REGISTRY
|
|
249
521
|
// ══════════════════════════════════════════════════════════════════════════════
|
|
250
522
|
/**
|
|
251
|
-
* Maps entity types to their Zod schemas.
|
|
252
|
-
*
|
|
523
|
+
* Maps entity types to their Zod schemas. 20 canonical built-in types
|
|
524
|
+
* (19 user-facing + 1 system). Workspaces can register additional custom
|
|
525
|
+
* types via SchemaRegistry (schema_extensions).
|
|
253
526
|
*/
|
|
254
527
|
export const ENTITY_SCHEMAS = {
|
|
255
|
-
//
|
|
528
|
+
// CRM (4)
|
|
256
529
|
person: PersonSchema,
|
|
257
530
|
organization: OrganizationSchema,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
//
|
|
531
|
+
position: PositionSchema,
|
|
532
|
+
deal: DealSchema,
|
|
533
|
+
// PM (4)
|
|
261
534
|
project: ProjectSchema,
|
|
262
|
-
|
|
263
|
-
decision: DecisionSchema,
|
|
535
|
+
event: EventSchema,
|
|
264
536
|
task: TaskSchema,
|
|
265
|
-
document: DocumentSchema,
|
|
266
|
-
dataset: DatasetSchema,
|
|
267
|
-
reference: ReferenceSchema,
|
|
268
|
-
note: NoteSchema,
|
|
269
537
|
deliverable: DeliverableSchema,
|
|
538
|
+
// KM — authored (7)
|
|
539
|
+
document: DocumentSchema,
|
|
540
|
+
deck: DeckSchema,
|
|
541
|
+
artifact: ArtifactSchema,
|
|
270
542
|
publication: PublicationSchema,
|
|
271
|
-
deal: DealSchema,
|
|
272
|
-
// Knowledge (3)
|
|
273
|
-
process: ProcessSchema,
|
|
274
|
-
guideline: GuidelineSchema,
|
|
275
543
|
'case-study': CaseStudySchema,
|
|
544
|
+
service: ServiceSchema,
|
|
545
|
+
skill: SkillSchema,
|
|
546
|
+
// Capture (4)
|
|
547
|
+
note: NoteSchema,
|
|
548
|
+
reference: ReferenceSchema,
|
|
549
|
+
dataset: DatasetSchema,
|
|
550
|
+
material: MaterialSchema,
|
|
551
|
+
// System (1)
|
|
552
|
+
comment: CommentSchema,
|
|
276
553
|
};
|
|
554
|
+
/**
|
|
555
|
+
* Retired entity-type names that must never be (re-)created, even if a legacy
|
|
556
|
+
* workspace still carries a `schema_extensions.<name>` for them. `asset` was
|
|
557
|
+
* retired in Phase F (asset-as-embed): binaries are now free-standing in
|
|
558
|
+
* assets.db and embedded by typed entries (material/document/dataset), so a
|
|
559
|
+
* file-backed `asset` entity would be an unvalidatable base-only stub. Enforced
|
|
560
|
+
* at the entity-creation entry points (graph.changeType, the web create route,
|
|
561
|
+
* and getAgentAllowedEntityTypes).
|
|
562
|
+
*/
|
|
563
|
+
export const RESERVED_ENTITY_TYPES = new Set(['asset']);
|
|
277
564
|
/**
|
|
278
565
|
* Plural subfolder name → singular entity_type mapping
|
|
279
566
|
*/
|
|
280
567
|
export const PLURAL_TO_SINGULAR = {
|
|
281
568
|
'people': 'person',
|
|
282
569
|
'organizations': 'organization',
|
|
283
|
-
'
|
|
284
|
-
'
|
|
570
|
+
'positions': 'position',
|
|
571
|
+
'deals': 'deal',
|
|
285
572
|
'projects': 'project',
|
|
286
|
-
'
|
|
287
|
-
'decisions': 'decision',
|
|
573
|
+
'events': 'event',
|
|
288
574
|
'tasks': 'task',
|
|
289
|
-
'documents': 'document',
|
|
290
|
-
'datasets': 'dataset',
|
|
291
|
-
'references': 'reference',
|
|
292
|
-
'notes': 'note',
|
|
293
575
|
'deliverables': 'deliverable',
|
|
576
|
+
'documents': 'document',
|
|
577
|
+
'decks': 'deck',
|
|
578
|
+
'artifacts': 'artifact',
|
|
294
579
|
'publications': 'publication',
|
|
295
|
-
'deals': 'deal',
|
|
296
|
-
'processes': 'process',
|
|
297
|
-
'guidelines': 'guideline',
|
|
298
580
|
'case-studies': 'case-study',
|
|
581
|
+
'services': 'service',
|
|
582
|
+
'skills': 'skill',
|
|
583
|
+
'notes': 'note',
|
|
584
|
+
'references': 'reference',
|
|
585
|
+
'datasets': 'dataset',
|
|
586
|
+
'materials': 'material',
|
|
587
|
+
'comments': 'comment',
|
|
299
588
|
};
|
|
300
589
|
/**
|
|
301
590
|
* Singular entity_type → plural subfolder name mapping
|
|
302
591
|
*/
|
|
303
592
|
export const SINGULAR_TO_PLURAL = Object.fromEntries(Object.entries(PLURAL_TO_SINGULAR).map(([plural, singular]) => [singular, plural]));
|
|
593
|
+
/**
|
|
594
|
+
* Cross-field task rule: a task's start date must not fall after its due date.
|
|
595
|
+
*
|
|
596
|
+
* This lives OUTSIDE the Zod schema on purpose. Expressing it as a
|
|
597
|
+
* `TaskSchema.refine(...)` would turn the ZodObject into a ZodEffects, which
|
|
598
|
+
* breaks shape introspection in schema-registry (`describeZodObject` and the
|
|
599
|
+
* schema_extensions `.extend()` path both rely on `instanceof z.ZodObject`) —
|
|
600
|
+
* and that powers the metadata field panel. So both validation entry points
|
|
601
|
+
* (this module's `validateEntity` and `graph.ts`'s private one) call this
|
|
602
|
+
* helper after a successful parse instead.
|
|
603
|
+
*
|
|
604
|
+
* `dateField` stores ISO 'YYYY-MM-DD' strings, so a lexicographic comparison
|
|
605
|
+
* is a correct date comparison.
|
|
606
|
+
*/
|
|
607
|
+
export function assertValidTaskDates(data) {
|
|
608
|
+
if (data.start_date && data.date && data.start_date > data.date) {
|
|
609
|
+
throw new Error(`Validation failed for task:\n - start_date: Start date (${data.start_date}) must be on or before the due date (${data.date})`);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
304
612
|
/**
|
|
305
613
|
* Validation helper with helpful error messages
|
|
306
614
|
*/
|
|
@@ -310,11 +618,14 @@ export function validateEntity(entityType, data) {
|
|
|
310
618
|
throw new Error(`Unknown entity type: ${entityType}`);
|
|
311
619
|
}
|
|
312
620
|
try {
|
|
313
|
-
|
|
621
|
+
const parsed = schema.parse(data);
|
|
622
|
+
if (entityType === 'task')
|
|
623
|
+
assertValidTaskDates(parsed);
|
|
624
|
+
return parsed;
|
|
314
625
|
}
|
|
315
626
|
catch (error) {
|
|
316
627
|
if (error instanceof z.ZodError) {
|
|
317
|
-
const messages = error.
|
|
628
|
+
const messages = error.issues.map(e => {
|
|
318
629
|
const path = e.path.join('.');
|
|
319
630
|
return ` - ${path}: ${e.message}`;
|
|
320
631
|
});
|
|
@@ -332,7 +643,7 @@ export function validateCustomEntity(data) {
|
|
|
332
643
|
}
|
|
333
644
|
catch (error) {
|
|
334
645
|
if (error instanceof z.ZodError) {
|
|
335
|
-
const messages = error.
|
|
646
|
+
const messages = error.issues.map(e => {
|
|
336
647
|
const path = e.path.join('.');
|
|
337
648
|
return ` - ${path}: ${e.message}`;
|
|
338
649
|
});
|