studiograph 1.3.48-next.21 → 1.3.48-next.211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -16
- package/dist/agent/agent-pool.d.ts +87 -3
- package/dist/agent/agent-pool.js +188 -15
- package/dist/agent/agent-pool.js.map +1 -1
- package/dist/agent/followups.d.ts +34 -0
- package/dist/agent/followups.js +52 -0
- package/dist/agent/followups.js.map +1 -0
- package/dist/agent/orchestrator.d.ts +101 -4
- package/dist/agent/orchestrator.js +464 -66
- package/dist/agent/orchestrator.js.map +1 -1
- package/dist/agent/prompts/entity-types-section.d.ts +34 -0
- package/dist/agent/prompts/entity-types-section.js +76 -0
- package/dist/agent/prompts/entity-types-section.js.map +1 -0
- package/dist/agent/prompts/system.md +112 -54
- package/dist/agent/skill-loader.d.ts +30 -17
- package/dist/agent/skill-loader.js +63 -30
- package/dist/agent/skill-loader.js.map +1 -1
- package/dist/agent/skills/artifact-canvas/skill.md +152 -0
- package/dist/agent/skills/entity-schema.md +75 -431
- package/dist/agent/skills/interview/entity-templates.md +38 -37
- package/dist/agent/skills/interview/question-domains.md +54 -49
- package/dist/agent/skills/interview/skill.md +84 -16
- package/dist/agent/skills/schema-rules.md +28 -28
- package/dist/agent/tools/artifact-tools.d.ts +124 -0
- package/dist/agent/tools/artifact-tools.js +207 -0
- package/dist/agent/tools/artifact-tools.js.map +1 -0
- package/dist/agent/tools/capture-tools.d.ts +31 -0
- package/dist/agent/tools/capture-tools.js +40 -0
- package/dist/agent/tools/capture-tools.js.map +1 -0
- package/dist/agent/tools/folder-tools.d.ts +47 -0
- package/dist/agent/tools/folder-tools.js +249 -0
- package/dist/agent/tools/folder-tools.js.map +1 -0
- package/dist/agent/tools/fs-tools.d.ts +6 -5
- package/dist/agent/tools/fs-tools.js +5 -5
- package/dist/agent/tools/fs-tools.js.map +1 -1
- package/dist/agent/tools/graph-tools.d.ts +48 -72
- package/dist/agent/tools/graph-tools.js +852 -329
- package/dist/agent/tools/graph-tools.js.map +1 -1
- package/dist/agent/tools/history-tools.d.ts +95 -0
- package/dist/agent/tools/history-tools.js +461 -0
- package/dist/agent/tools/history-tools.js.map +1 -0
- package/dist/agent/tools/load-skill.d.ts +6 -5
- package/dist/agent/tools/load-skill.js +3 -3
- package/dist/agent/tools/load-skill.js.map +1 -1
- package/dist/agent/tools/ops-tools.d.ts +5 -4
- package/dist/agent/tools/ops-tools.js +130 -236
- package/dist/agent/tools/ops-tools.js.map +1 -1
- package/dist/agent/tools/permission-tools.d.ts +87 -17
- package/dist/agent/tools/permission-tools.js +233 -43
- package/dist/agent/tools/permission-tools.js.map +1 -1
- package/dist/agent/tools/tool-loader.js +5 -4
- package/dist/agent/tools/tool-loader.js.map +1 -1
- package/dist/agent/tools/web-tools.js +58 -9
- package/dist/agent/tools/web-tools.js.map +1 -1
- package/dist/cli/commands/about.d.ts +1 -0
- package/dist/cli/commands/about.js +55 -3
- package/dist/cli/commands/about.js.map +1 -1
- package/dist/cli/commands/admin/audit-workspace.d.ts +23 -0
- package/dist/cli/commands/admin/audit-workspace.js +133 -0
- package/dist/cli/commands/admin/audit-workspace.js.map +1 -0
- package/dist/cli/commands/admin/audit.d.ts +21 -0
- package/dist/cli/commands/admin/audit.js +174 -0
- package/dist/cli/commands/admin/audit.js.map +1 -0
- package/dist/cli/commands/admin/backup.d.ts +54 -0
- package/dist/cli/commands/admin/backup.js +207 -0
- package/dist/cli/commands/admin/backup.js.map +1 -0
- package/dist/cli/commands/admin/folder.d.ts +11 -0
- package/dist/cli/commands/{collection.js → admin/folder.js} +33 -32
- package/dist/cli/commands/admin/folder.js.map +1 -0
- package/dist/cli/commands/admin/index.d.ts +16 -0
- package/dist/cli/commands/admin/index.js +46 -0
- package/dist/cli/commands/admin/index.js.map +1 -0
- package/dist/cli/commands/admin/migrate-assets.d.ts +53 -0
- package/dist/cli/commands/admin/migrate-assets.js +184 -0
- package/dist/cli/commands/admin/migrate-assets.js.map +1 -0
- package/dist/cli/commands/admin/migrate.d.ts +56 -0
- package/dist/cli/commands/admin/migrate.js +263 -0
- package/dist/cli/commands/admin/migrate.js.map +1 -0
- package/dist/cli/commands/admin/restore.d.ts +24 -0
- package/dist/cli/commands/admin/restore.js +228 -0
- package/dist/cli/commands/admin/restore.js.map +1 -0
- package/dist/cli/commands/admin/secrets.d.ts +23 -0
- package/dist/cli/commands/admin/secrets.js +256 -0
- package/dist/cli/commands/admin/secrets.js.map +1 -0
- package/dist/cli/commands/admin/settings.d.ts +28 -0
- package/dist/cli/commands/admin/settings.js +284 -0
- package/dist/cli/commands/admin/settings.js.map +1 -0
- package/dist/cli/commands/admin/token.d.ts +42 -0
- package/dist/cli/commands/admin/token.js +126 -0
- package/dist/cli/commands/admin/token.js.map +1 -0
- package/dist/cli/commands/admin/transfer-ownership.d.ts +15 -0
- package/dist/cli/commands/admin/transfer-ownership.js +106 -0
- package/dist/cli/commands/admin/transfer-ownership.js.map +1 -0
- package/dist/cli/commands/admin/user.d.ts +11 -0
- package/dist/cli/commands/admin/user.js +187 -0
- package/dist/cli/commands/admin/user.js.map +1 -0
- package/dist/cli/commands/clone.d.ts +25 -3
- package/dist/cli/commands/clone.js +142 -36
- package/dist/cli/commands/clone.js.map +1 -1
- package/dist/cli/commands/config.d.ts +23 -107
- package/dist/cli/commands/config.js +52 -260
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/connector.d.ts +10 -13
- package/dist/cli/commands/connector.js +16 -58
- package/dist/cli/commands/connector.js.map +1 -1
- package/dist/cli/commands/deploy.js +215 -68
- package/dist/cli/commands/deploy.js.map +1 -1
- package/dist/cli/commands/index.js +5 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.js +10 -30
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/mcp.js +54 -6
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/r2.d.ts +3 -0
- package/dist/cli/commands/r2.js +223 -204
- package/dist/cli/commands/r2.js.map +1 -1
- package/dist/cli/commands/redeploy.js +65 -12
- package/dist/cli/commands/redeploy.js.map +1 -1
- package/dist/cli/commands/reset.d.ts +22 -6
- package/dist/cli/commands/reset.js +132 -34
- package/dist/cli/commands/reset.js.map +1 -1
- package/dist/cli/commands/serve.js +231 -26
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/sync.d.ts +1 -1
- package/dist/cli/commands/sync.js +237 -227
- package/dist/cli/commands/sync.js.map +1 -1
- package/dist/cli/crypto-bundle.d.ts +39 -0
- package/dist/cli/crypto-bundle.js +94 -0
- package/dist/cli/crypto-bundle.js.map +1 -0
- package/dist/cli/index.js +24 -26
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/railway-pin.d.ts +68 -0
- package/dist/cli/railway-pin.js +96 -0
- package/dist/cli/railway-pin.js.map +1 -0
- package/dist/cli/railway-provisioning.d.ts +53 -0
- package/dist/cli/railway-provisioning.js +85 -0
- package/dist/cli/railway-provisioning.js.map +1 -0
- package/dist/cli/setup-wizard.d.ts +30 -49
- package/dist/cli/setup-wizard.js +39 -40
- package/dist/cli/setup-wizard.js.map +1 -1
- package/dist/core/accent-palette.d.ts +22 -0
- package/dist/core/accent-palette.js +47 -0
- package/dist/core/accent-palette.js.map +1 -0
- package/dist/core/artifact-asset-urls.d.ts +51 -0
- package/dist/core/artifact-asset-urls.js +79 -0
- package/dist/core/artifact-asset-urls.js.map +1 -0
- package/dist/core/artifact-bundle.d.ts +69 -0
- package/dist/core/artifact-bundle.js +305 -0
- package/dist/core/artifact-bundle.js.map +1 -0
- package/dist/core/artifact-escape.d.ts +5 -0
- package/dist/core/artifact-escape.js +26 -0
- package/dist/core/artifact-escape.js.map +1 -0
- package/dist/core/artifact-export.d.ts +17 -0
- package/dist/core/artifact-export.js +529 -0
- package/dist/core/artifact-export.js.map +1 -0
- package/dist/core/cell-anchor.d.ts +29 -0
- package/dist/core/cell-anchor.js +53 -0
- package/dist/core/cell-anchor.js.map +1 -0
- package/dist/core/comment-anchor.d.ts +41 -0
- package/dist/core/comment-anchor.js +147 -0
- package/dist/core/comment-anchor.js.map +1 -0
- package/dist/core/commit-messages.d.ts +57 -0
- package/dist/core/commit-messages.js +85 -0
- package/dist/core/commit-messages.js.map +1 -0
- package/dist/core/embeds.d.ts +96 -0
- package/dist/core/embeds.js +196 -0
- package/dist/core/embeds.js.map +1 -0
- package/dist/core/entity-body-templates.d.ts +21 -0
- package/dist/core/entity-body-templates.js +67 -0
- package/dist/core/entity-body-templates.js.map +1 -0
- package/dist/core/entity-types-catalog.d.ts +65 -0
- package/dist/core/entity-types-catalog.js +142 -0
- package/dist/core/entity-types-catalog.js.map +1 -0
- package/dist/core/field-library.d.ts +62 -0
- package/dist/core/field-library.js +129 -0
- package/dist/core/field-library.js.map +1 -0
- package/dist/core/folder-paths.d.ts +41 -0
- package/dist/core/folder-paths.js +95 -0
- package/dist/core/folder-paths.js.map +1 -0
- package/dist/core/folder-sidecar.d.ts +36 -0
- package/dist/core/folder-sidecar.js +91 -0
- package/dist/core/folder-sidecar.js.map +1 -0
- package/dist/core/format-registry.d.ts +170 -0
- package/dist/core/format-registry.js +412 -0
- package/dist/core/format-registry.js.map +1 -0
- package/dist/core/graph.d.ts +773 -14
- package/dist/core/graph.js +2269 -308
- package/dist/core/graph.js.map +1 -1
- package/dist/core/history-diff.d.ts +35 -0
- package/dist/core/history-diff.js +114 -0
- package/dist/core/history-diff.js.map +1 -0
- package/dist/core/refs.d.ts +41 -0
- package/dist/core/refs.js +80 -0
- package/dist/core/refs.js.map +1 -0
- package/dist/core/schema-registry.d.ts +66 -0
- package/dist/core/schema-registry.js +198 -37
- package/dist/core/schema-registry.js.map +1 -1
- package/dist/core/schemas/connector.d.ts +67 -0
- package/dist/core/schemas/connector.js +100 -0
- package/dist/core/schemas/connector.js.map +1 -0
- package/dist/core/schemas/workspace.d.ts +122 -0
- package/dist/core/schemas/workspace.js +211 -0
- package/dist/core/schemas/workspace.js.map +1 -0
- package/dist/core/secrets/SecretStore.d.ts +77 -0
- package/dist/core/secrets/SecretStore.js +13 -0
- package/dist/core/secrets/SecretStore.js.map +1 -0
- package/dist/core/secrets/SettingsResolver.d.ts +54 -0
- package/dist/core/secrets/SettingsResolver.js +80 -0
- package/dist/core/secrets/SettingsResolver.js.map +1 -0
- package/dist/core/secrets/SettingsStore.d.ts +30 -0
- package/dist/core/secrets/SettingsStore.js +9 -0
- package/dist/core/secrets/SettingsStore.js.map +1 -0
- package/dist/core/secrets/SqliteEncryptedStore.d.ts +90 -0
- package/dist/core/secrets/SqliteEncryptedStore.js +598 -0
- package/dist/core/secrets/SqliteEncryptedStore.js.map +1 -0
- package/dist/core/secrets/audit.d.ts +36 -0
- package/dist/core/secrets/audit.js +60 -0
- package/dist/core/secrets/audit.js.map +1 -0
- package/dist/core/secrets/auth-db-migration.d.ts +129 -0
- package/dist/core/secrets/auth-db-migration.js +653 -0
- package/dist/core/secrets/auth-db-migration.js.map +1 -0
- package/dist/core/secrets/bundle.d.ts +141 -0
- package/dist/core/secrets/bundle.js +435 -0
- package/dist/core/secrets/bundle.js.map +1 -0
- package/dist/core/secrets/dual-write.d.ts +81 -0
- package/dist/core/secrets/dual-write.js +247 -0
- package/dist/core/secrets/dual-write.js.map +1 -0
- package/dist/core/secrets/encryption.d.ts +44 -0
- package/dist/core/secrets/encryption.js +97 -0
- package/dist/core/secrets/encryption.js.map +1 -0
- package/dist/core/secrets/index.d.ts +49 -0
- package/dist/core/secrets/index.js +74 -0
- package/dist/core/secrets/index.js.map +1 -0
- package/dist/core/secrets/master-key.d.ts +38 -0
- package/dist/core/secrets/master-key.js +122 -0
- package/dist/core/secrets/master-key.js.map +1 -0
- package/dist/core/secrets/probes/anthropic.d.ts +98 -0
- package/dist/core/secrets/probes/anthropic.js +300 -0
- package/dist/core/secrets/probes/anthropic.js.map +1 -0
- package/dist/core/secrets/probes/brave.d.ts +9 -0
- package/dist/core/secrets/probes/brave.js +15 -0
- package/dist/core/secrets/probes/brave.js.map +1 -0
- package/dist/core/secrets/probes/r2.d.ts +15 -0
- package/dist/core/secrets/probes/r2.js +14 -0
- package/dist/core/secrets/probes/r2.js.map +1 -0
- package/dist/core/secrets/probes/tavily.d.ts +18 -0
- package/dist/core/secrets/probes/tavily.js +58 -0
- package/dist/core/secrets/probes/tavily.js.map +1 -0
- package/dist/core/secrets/probes/voyage.d.ts +13 -0
- package/dist/core/secrets/probes/voyage.js +52 -0
- package/dist/core/secrets/probes/voyage.js.map +1 -0
- package/dist/core/secrets/r2-structural-migration.d.ts +39 -0
- package/dist/core/secrets/r2-structural-migration.js +109 -0
- package/dist/core/secrets/r2-structural-migration.js.map +1 -0
- package/dist/core/secrets/read-flip.d.ts +59 -0
- package/dist/core/secrets/read-flip.js +87 -0
- package/dist/core/secrets/read-flip.js.map +1 -0
- package/dist/core/secrets/registry.d.ts +188 -0
- package/dist/core/secrets/registry.js +616 -0
- package/dist/core/secrets/registry.js.map +1 -0
- package/dist/core/types.d.ts +77 -483
- package/dist/core/types.js +25 -3
- package/dist/core/types.js.map +1 -1
- package/dist/core/user-config.d.ts +75 -12
- package/dist/core/user-config.js +155 -14
- package/dist/core/user-config.js.map +1 -1
- package/dist/core/validation.d.ts +786 -1373
- package/dist/core/validation.js +458 -147
- package/dist/core/validation.js.map +1 -1
- package/dist/core/workspace-manager.d.ts +87 -14
- package/dist/core/workspace-manager.js +222 -94
- package/dist/core/workspace-manager.js.map +1 -1
- package/dist/core/workspace.d.ts +19 -5
- package/dist/core/workspace.js +67 -39
- package/dist/core/workspace.js.map +1 -1
- package/dist/mcp/comment-virtual-entity.d.ts +36 -0
- package/dist/mcp/comment-virtual-entity.js +71 -0
- package/dist/mcp/comment-virtual-entity.js.map +1 -0
- package/dist/mcp/connector-manager.d.ts +72 -2
- package/dist/mcp/connector-manager.js +211 -32
- package/dist/mcp/connector-manager.js.map +1 -1
- package/dist/mcp/oauth-provider.d.ts +0 -5
- package/dist/mcp/oauth-provider.js +10 -22
- package/dist/mcp/oauth-provider.js.map +1 -1
- package/dist/mcp/oauth-registry.d.ts +46 -8
- package/dist/mcp/oauth-registry.js +52 -13
- package/dist/mcp/oauth-registry.js.map +1 -1
- package/dist/mcp/server-discovery.d.ts +73 -0
- package/dist/mcp/server-discovery.js +164 -0
- package/dist/mcp/server-discovery.js.map +1 -0
- package/dist/mcp/server.d.ts +24 -3
- package/dist/mcp/server.js +53 -10
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/state-signer.d.ts +62 -0
- package/dist/mcp/state-signer.js +205 -0
- package/dist/mcp/state-signer.js.map +1 -0
- package/dist/mcp/stdio-proxy.d.ts +67 -0
- package/dist/mcp/stdio-proxy.js +149 -0
- package/dist/mcp/stdio-proxy.js.map +1 -0
- package/dist/mcp/tools.d.ts +65 -2
- package/dist/mcp/tools.js +1772 -124
- package/dist/mcp/tools.js.map +1 -1
- package/dist/server/__tests__/helpers/graph-api.d.ts +16 -0
- package/dist/server/__tests__/helpers/graph-api.js +16 -0
- package/dist/server/__tests__/helpers/graph-api.js.map +1 -0
- package/dist/server/artifact-asset-mint.d.ts +41 -0
- package/dist/server/artifact-asset-mint.js +59 -0
- package/dist/server/artifact-asset-mint.js.map +1 -0
- package/dist/server/asset-index-queue.d.ts +98 -0
- package/dist/server/asset-index-queue.js +193 -0
- package/dist/server/asset-index-queue.js.map +1 -0
- package/dist/server/body-write-coordinator.d.ts +161 -0
- package/dist/server/body-write-coordinator.js +182 -0
- package/dist/server/body-write-coordinator.js.map +1 -0
- package/dist/server/cloud-billing-flow.d.ts +32 -0
- package/dist/server/cloud-billing-flow.js +75 -0
- package/dist/server/cloud-billing-flow.js.map +1 -0
- package/dist/server/commit-audit.d.ts +26 -0
- package/dist/server/commit-audit.js +30 -0
- package/dist/server/commit-audit.js.map +1 -0
- package/dist/server/index.d.ts +29 -3
- package/dist/server/index.js +657 -269
- package/dist/server/index.js.map +1 -1
- package/dist/server/middleware/sanitize.d.ts +46 -0
- package/dist/server/middleware/sanitize.js +182 -0
- package/dist/server/middleware/sanitize.js.map +1 -0
- package/dist/server/routes/artifact-export-api.d.ts +11 -0
- package/dist/server/routes/artifact-export-api.js +159 -0
- package/dist/server/routes/artifact-export-api.js.map +1 -0
- package/dist/server/routes/asset-api.d.ts +76 -1
- package/dist/server/routes/asset-api.js +761 -61
- package/dist/server/routes/asset-api.js.map +1 -1
- package/dist/server/routes/audit-api.d.ts +24 -0
- package/dist/server/routes/audit-api.js +117 -0
- package/dist/server/routes/audit-api.js.map +1 -0
- package/dist/server/routes/auth-api.js +532 -63
- package/dist/server/routes/auth-api.js.map +1 -1
- package/dist/server/routes/capture-api.d.ts +10 -3
- package/dist/server/routes/capture-api.js +213 -25
- package/dist/server/routes/capture-api.js.map +1 -1
- package/dist/server/routes/chat-sessions-api.d.ts +13 -0
- package/dist/server/routes/chat-sessions-api.js +455 -0
- package/dist/server/routes/chat-sessions-api.js.map +1 -0
- package/dist/server/routes/chat.d.ts +35 -1
- package/dist/server/routes/chat.js +699 -54
- package/dist/server/routes/chat.js.map +1 -1
- package/dist/server/routes/comments-api.d.ts +15 -0
- package/dist/server/routes/comments-api.js +444 -0
- package/dist/server/routes/comments-api.js.map +1 -0
- package/dist/server/routes/config-api.d.ts +3 -2
- package/dist/server/routes/config-api.js +179 -49
- package/dist/server/routes/config-api.js.map +1 -1
- package/dist/server/routes/connectors-api.js +177 -42
- package/dist/server/routes/connectors-api.js.map +1 -1
- package/dist/server/routes/event-ingest-api.d.ts +15 -0
- package/dist/server/routes/{meeting-ingest-api.js → event-ingest-api.js} +35 -20
- package/dist/server/routes/event-ingest-api.js.map +1 -0
- package/dist/server/routes/field-library-api.d.ts +28 -0
- package/dist/server/routes/field-library-api.js +126 -0
- package/dist/server/routes/field-library-api.js.map +1 -0
- package/dist/server/routes/git-http.d.ts +2 -2
- package/dist/server/routes/git-http.js +86 -39
- package/dist/server/routes/git-http.js.map +1 -1
- package/dist/server/routes/graph-api-access.d.ts +57 -0
- package/dist/server/routes/graph-api-access.js +112 -0
- package/dist/server/routes/graph-api-access.js.map +1 -0
- package/dist/server/routes/graph-api.d.ts +1 -1
- package/dist/server/routes/graph-api.js +1455 -325
- package/dist/server/routes/graph-api.js.map +1 -1
- package/dist/server/routes/health.d.ts +18 -0
- package/dist/server/routes/health.js +74 -0
- package/dist/server/routes/health.js.map +1 -0
- package/dist/server/routes/import-batch.d.ts +24 -0
- package/dist/server/routes/import-batch.js +33 -0
- package/dist/server/routes/import-batch.js.map +1 -0
- package/dist/server/routes/insights-api.d.ts +9 -2
- package/dist/server/routes/insights-api.js +355 -61
- package/dist/server/routes/insights-api.js.map +1 -1
- package/dist/server/routes/mcp.d.ts +7 -3
- package/dist/server/routes/mcp.js +24 -8
- package/dist/server/routes/mcp.js.map +1 -1
- package/dist/server/routes/oauth-api.d.ts +67 -0
- package/dist/server/routes/oauth-api.js +421 -0
- package/dist/server/routes/oauth-api.js.map +1 -0
- package/dist/server/routes/permissions-api.d.ts +9 -2
- package/dist/server/routes/permissions-api.js +87 -31
- package/dist/server/routes/permissions-api.js.map +1 -1
- package/dist/server/routes/r2-api.d.ts +25 -0
- package/dist/server/routes/r2-api.js +276 -0
- package/dist/server/routes/r2-api.js.map +1 -0
- package/dist/server/routes/secrets-api.d.ts +36 -0
- package/dist/server/routes/secrets-api.js +308 -0
- package/dist/server/routes/secrets-api.js.map +1 -0
- package/dist/server/routes/settings-api.d.ts +29 -0
- package/dist/server/routes/settings-api.js +180 -0
- package/dist/server/routes/settings-api.js.map +1 -0
- package/dist/server/routes/share-api.d.ts +32 -0
- package/dist/server/routes/share-api.js +234 -0
- package/dist/server/routes/share-api.js.map +1 -0
- package/dist/server/routes/views-api.js +51 -0
- package/dist/server/routes/views-api.js.map +1 -1
- package/dist/server/routes/workspace-api.d.ts +2 -1
- package/dist/server/routes/workspace-api.js +142 -23
- package/dist/server/routes/workspace-api.js.map +1 -1
- package/dist/server/routes/ws.d.ts +3 -2
- package/dist/server/routes/ws.js +68 -17
- package/dist/server/routes/ws.js.map +1 -1
- package/dist/server/session-manager.d.ts +48 -5
- package/dist/server/session-manager.js +182 -14
- package/dist/server/session-manager.js.map +1 -1
- package/dist/server/ws-hub.d.ts +124 -37
- package/dist/server/ws-hub.js +0 -0
- package/dist/server/ws-hub.js.map +1 -1
- package/dist/server/yjs-manager.d.ts +278 -7
- package/dist/server/yjs-manager.js +830 -38
- package/dist/server/yjs-manager.js.map +1 -1
- package/dist/server/yjs-persistence.d.ts +165 -0
- package/dist/server/yjs-persistence.js +557 -0
- package/dist/server/yjs-persistence.js.map +1 -0
- package/dist/server/yjs-text-diff.d.ts +32 -0
- package/dist/server/yjs-text-diff.js +61 -0
- package/dist/server/yjs-text-diff.js.map +1 -0
- package/dist/services/access-control.d.ts +73 -0
- package/dist/services/access-control.js +165 -0
- package/dist/services/access-control.js.map +1 -0
- package/dist/services/artifact-asset-token.d.ts +69 -0
- package/dist/services/artifact-asset-token.js +94 -0
- package/dist/services/artifact-asset-token.js.map +1 -0
- package/dist/services/artifact-library-sources.d.ts +3 -0
- package/dist/services/artifact-library-sources.js +44 -0
- package/dist/services/artifact-library-sources.js.map +1 -0
- package/dist/services/artifact-render-export.d.ts +97 -0
- package/dist/services/artifact-render-export.js +467 -0
- package/dist/services/artifact-render-export.js.map +1 -0
- package/dist/services/asset-caption-service.d.ts +103 -0
- package/dist/services/asset-caption-service.js +186 -0
- package/dist/services/asset-caption-service.js.map +1 -0
- package/dist/services/asset-delete-authz.d.ts +31 -0
- package/dist/services/asset-delete-authz.js +61 -0
- package/dist/services/asset-delete-authz.js.map +1 -0
- package/dist/services/asset-finalize-service.d.ts +58 -0
- package/dist/services/asset-finalize-service.js +216 -0
- package/dist/services/asset-finalize-service.js.map +1 -0
- package/dist/services/asset-import-service.d.ts +111 -0
- package/dist/services/asset-import-service.js +394 -0
- package/dist/services/asset-import-service.js.map +1 -0
- package/dist/services/asset-index-sweep.d.ts +95 -0
- package/dist/services/asset-index-sweep.js +249 -0
- package/dist/services/asset-index-sweep.js.map +1 -0
- package/dist/services/asset-lifecycle-check.d.ts +22 -0
- package/dist/services/asset-lifecycle-check.js +80 -0
- package/dist/services/asset-lifecycle-check.js.map +1 -0
- package/dist/services/asset-listing.d.ts +72 -0
- package/dist/services/asset-listing.js +321 -0
- package/dist/services/asset-listing.js.map +1 -0
- package/dist/services/asset-presign-service.d.ts +68 -0
- package/dist/services/asset-presign-service.js +124 -0
- package/dist/services/asset-presign-service.js.map +1 -0
- package/dist/services/asset-sidecar-service.d.ts +28 -0
- package/dist/services/asset-sidecar-service.js +79 -0
- package/dist/services/asset-sidecar-service.js.map +1 -0
- package/dist/services/asset-upload-errors.d.ts +41 -0
- package/dist/services/asset-upload-errors.js +45 -0
- package/dist/services/asset-upload-errors.js.map +1 -0
- package/dist/services/asset-upload-service.d.ts +56 -0
- package/dist/services/asset-upload-service.js +200 -0
- package/dist/services/asset-upload-service.js.map +1 -0
- package/dist/services/asset-upload-token.d.ts +58 -0
- package/dist/services/asset-upload-token.js +75 -0
- package/dist/services/asset-upload-token.js.map +1 -0
- package/dist/services/assets/asset-index-service.d.ts +127 -0
- package/dist/services/assets/asset-index-service.js +227 -0
- package/dist/services/assets/asset-index-service.js.map +1 -0
- package/dist/services/assets/base.d.ts +128 -2
- package/dist/services/assets/base.js +98 -1
- package/dist/services/assets/base.js.map +1 -1
- package/dist/services/assets/index.d.ts +114 -1
- package/dist/services/assets/index.js +221 -0
- package/dist/services/assets/index.js.map +1 -1
- package/dist/services/assets/local.d.ts +16 -1
- package/dist/services/assets/local.js +110 -1
- package/dist/services/assets/local.js.map +1 -1
- package/dist/services/assets/r2-sync.d.ts +88 -0
- package/dist/services/assets/r2-sync.js +412 -0
- package/dist/services/assets/r2-sync.js.map +1 -0
- package/dist/services/assets/r2.d.ts +87 -1
- package/dist/services/assets/r2.js +203 -1
- package/dist/services/assets/r2.js.map +1 -1
- package/dist/services/auth-service.d.ts +312 -45
- package/dist/services/auth-service.js +1011 -195
- package/dist/services/auth-service.js.map +1 -1
- package/dist/services/chat-session-service.d.ts +188 -0
- package/dist/services/chat-session-service.js +512 -0
- package/dist/services/chat-session-service.js.map +1 -0
- package/dist/services/cloud-inference-billing.d.ts +64 -0
- package/dist/services/cloud-inference-billing.js +313 -0
- package/dist/services/cloud-inference-billing.js.map +1 -0
- package/dist/services/comment-service.d.ts +97 -0
- package/dist/services/comment-service.js +341 -0
- package/dist/services/comment-service.js.map +1 -0
- package/dist/services/comment-virtual-entity.d.ts +36 -0
- package/dist/services/comment-virtual-entity.js +71 -0
- package/dist/services/comment-virtual-entity.js.map +1 -0
- package/dist/services/convert-service.d.ts +64 -0
- package/dist/services/convert-service.js +68 -0
- package/dist/services/convert-service.js.map +1 -0
- package/dist/services/csv-service.d.ts +22 -17
- package/dist/services/csv-service.js +55 -92
- package/dist/services/csv-service.js.map +1 -1
- package/dist/services/entity-mutations.d.ts +213 -0
- package/dist/services/entity-mutations.js +380 -0
- package/dist/services/entity-mutations.js.map +1 -0
- package/dist/services/{meeting-processor.d.ts → event-processor.d.ts} +15 -8
- package/dist/services/{meeting-processor.js → event-processor.js} +124 -65
- package/dist/services/event-processor.js.map +1 -0
- package/dist/services/extract/docx.d.ts +1 -0
- package/dist/services/extract/docx.js +233 -0
- package/dist/services/extract/docx.js.map +1 -0
- package/dist/services/extract/index.d.ts +9 -0
- package/dist/services/extract/index.js +10 -0
- package/dist/services/extract/index.js.map +1 -0
- package/dist/services/extract/pdf.d.ts +13 -0
- package/dist/services/extract/pdf.js +69 -0
- package/dist/services/extract/pdf.js.map +1 -0
- package/dist/services/folder-creation.d.ts +33 -0
- package/dist/services/folder-creation.js +103 -0
- package/dist/services/folder-creation.js.map +1 -0
- package/dist/services/git.d.ts +58 -0
- package/dist/services/git.js +194 -55
- package/dist/services/git.js.map +1 -1
- package/dist/services/graph-maintenance.js +4 -4
- package/dist/services/graph-maintenance.js.map +1 -1
- package/dist/services/import-service.d.ts +51 -2
- package/dist/services/import-service.js +254 -107
- package/dist/services/import-service.js.map +1 -1
- package/dist/services/lint-service.js +10 -17
- package/dist/services/lint-service.js.map +1 -1
- package/dist/services/markdown.d.ts +12 -1
- package/dist/services/markdown.js +77 -9
- package/dist/services/markdown.js.map +1 -1
- package/dist/services/mention-detector.d.ts +23 -0
- package/dist/services/mention-detector.js +47 -0
- package/dist/services/mention-detector.js.map +1 -0
- package/dist/services/model-capabilities.d.ts +41 -0
- package/dist/services/model-capabilities.js +107 -0
- package/dist/services/model-capabilities.js.map +1 -0
- package/dist/services/notification-broadcast.d.ts +32 -0
- package/dist/services/notification-broadcast.js +38 -0
- package/dist/services/notification-broadcast.js.map +1 -0
- package/dist/services/notification-service.d.ts +41 -0
- package/dist/services/notification-service.js +100 -0
- package/dist/services/notification-service.js.map +1 -0
- package/dist/services/oauth-server-store.d.ts +147 -0
- package/dist/services/oauth-server-store.js +319 -0
- package/dist/services/oauth-server-store.js.map +1 -0
- package/dist/services/orphan-service.js +2 -2
- package/dist/services/orphan-service.js.map +1 -1
- package/dist/services/personal-folder.d.ts +40 -0
- package/dist/services/personal-folder.js +101 -0
- package/dist/services/personal-folder.js.map +1 -0
- package/dist/services/scratch-asset-promote.d.ts +57 -0
- package/dist/services/scratch-asset-promote.js +95 -0
- package/dist/services/scratch-asset-promote.js.map +1 -0
- package/dist/services/scratch-attachment-service.d.ts +196 -0
- package/dist/services/scratch-attachment-service.js +347 -0
- package/dist/services/scratch-attachment-service.js.map +1 -0
- package/dist/services/share-link-service.d.ts +57 -0
- package/dist/services/share-link-service.js +142 -0
- package/dist/services/share-link-service.js.map +1 -0
- package/dist/services/user-person-bridge.d.ts +136 -0
- package/dist/services/user-person-bridge.js +340 -0
- package/dist/services/user-person-bridge.js.map +1 -0
- package/dist/services/vector-service.d.ts +282 -5
- package/dist/services/vector-service.js +585 -29
- package/dist/services/vector-service.js.map +1 -1
- package/dist/services/workspace-access.d.ts +108 -0
- package/dist/services/workspace-access.js +149 -0
- package/dist/services/workspace-access.js.map +1 -0
- package/dist/services/workspace-assets-folder.d.ts +46 -0
- package/dist/services/workspace-assets-folder.js +75 -0
- package/dist/services/workspace-assets-folder.js.map +1 -0
- package/dist/utils/git.d.ts +17 -2
- package/dist/utils/git.js +23 -7
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/log.d.ts +42 -0
- package/dist/utils/log.js +137 -0
- package/dist/utils/log.js.map +1 -0
- package/dist/utils/preflight.js +2 -2
- package/dist/utils/preflight.js.map +1 -1
- package/dist/utils/version-checker.d.ts +12 -19
- package/dist/utils/version-checker.js +14 -104
- package/dist/utils/version-checker.js.map +1 -1
- package/dist/web/_app/immutable/assets/0.Bs_z3Z86.css +2 -0
- package/dist/web/_app/immutable/assets/12.DlIf1mKh.css +1 -0
- package/dist/web/_app/immutable/assets/14.7d-Q37wc.css +1 -0
- package/dist/web/_app/immutable/assets/15.BwBFdc1D.css +1 -0
- package/dist/web/_app/immutable/assets/16.CmLrbzZp.css +1 -0
- package/dist/web/_app/immutable/assets/17.DcuK5ZVm.css +1 -0
- package/dist/web/_app/immutable/assets/2.DATnR31c.css +1 -0
- package/dist/web/_app/immutable/assets/3.Cz4H8n_O.css +1 -0
- package/dist/web/_app/immutable/assets/4.aDHteTDy.css +1 -0
- package/dist/web/_app/immutable/assets/6.CF1i5Bon.css +1 -0
- package/dist/web/_app/immutable/assets/ArtifactEntityView.C4ooklFD.css +1 -0
- package/dist/web/_app/immutable/assets/AssetLibraryPicker.BOFW0MvF.css +1 -0
- package/dist/web/_app/immutable/assets/BulkActionsBar.cmKvHzRK.css +1 -0
- package/dist/web/_app/immutable/assets/CalendarView.lBCvS3X5.css +1 -0
- package/dist/web/_app/immutable/assets/CodeMirrorEditor.D6hf2pNJ.css +1 -0
- package/dist/web/_app/immutable/assets/CopyField.DVGZtw4U.css +1 -0
- package/dist/web/_app/immutable/assets/FolderMembersPanel.kiYnDFHu.css +1 -0
- package/dist/web/_app/immutable/assets/FolderMutationDialogs.BMRF6Z3z.css +1 -0
- package/dist/web/_app/immutable/assets/FolderPicker.Cp46GHe2.css +1 -0
- package/dist/web/_app/immutable/assets/GalleryView.WBGxxUQc.css +1 -0
- package/dist/web/_app/immutable/assets/GraphView.BJtGL9py.css +1 -0
- package/dist/web/_app/immutable/assets/KanbanView.BOaI5KFL.css +1 -0
- package/dist/web/_app/immutable/assets/Link.vV0ne105.css +1 -0
- package/dist/web/_app/immutable/assets/Markdown.BZnsSOSf.css +1 -0
- package/dist/web/_app/immutable/assets/Rail.ilusFgD4.css +1 -0
- package/dist/web/_app/immutable/assets/SettingsDialog.D7-BO6S_.css +1 -0
- package/dist/web/_app/immutable/assets/Spinner.UBfl0pab.css +1 -0
- package/dist/web/_app/immutable/assets/StopFilledAlt.fNlDN65D.css +1 -0
- package/dist/web/_app/immutable/assets/TimelineView.xAZBJhHw.css +1 -0
- package/dist/web/_app/immutable/assets/WorkspaceView.C8ErUJAY.css +1 -0
- package/dist/web/_app/immutable/assets/button.BlLm4Dg1.css +1 -0
- package/dist/web/_app/immutable/assets/history-summary.LpmHXasl.css +1 -0
- package/dist/web/_app/immutable/assets/ibm-plex-mono-latin-400-normal.CvHOgSBP.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-mono-latin-400-normal.DMJ8VG8y.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-mono-latin-500-normal.CB9ihrfo.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-mono-latin-500-normal.DSY6xOcd.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-400-italic.CZTNEAuW.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-400-italic.CsGl1sm0.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-400-normal.CDDApCn2.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-400-normal.CYLoc0-x.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-500-italic.BNK2_mGO.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-500-italic.DpEwFAQM.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-500-normal.6ng42L7E.woff2 +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-500-normal.BgVn5rGT.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-600-normal.Cu4Hd6ag.woff +0 -0
- package/dist/web/_app/immutable/assets/ibm-plex-sans-latin-600-normal.CuJfVYMP.woff2 +0 -0
- package/dist/web/_app/immutable/assets/inline-list.cqga56xT.css +1 -0
- package/dist/web/_app/immutable/assets/list-columns.BgnafZ4K.css +1 -0
- package/dist/web/_app/immutable/assets/realtime.DDCWxn3B.css +1 -0
- package/dist/web/_app/immutable/assets/select.B90KUqR4.css +1 -0
- package/dist/web/_app/immutable/assets/sheet.RF9RBmml.css +1 -0
- package/dist/web/_app/immutable/chunks/22qYtvr82.js +1 -0
- package/dist/web/_app/immutable/chunks/2f1VclTm.js +1 -0
- package/dist/web/_app/immutable/chunks/4xgUPoGj2.js +2 -0
- package/dist/web/_app/immutable/chunks/5CYQk4xR.js +1 -0
- package/dist/web/_app/immutable/chunks/6S9WOky52.js +1 -0
- package/dist/web/_app/immutable/chunks/9K8VREGP.js +1 -0
- package/dist/web/_app/immutable/chunks/B-n5q6ku.js +1 -0
- package/dist/web/_app/immutable/chunks/B0p2fSEV2.js +1 -0
- package/dist/web/_app/immutable/chunks/B2oi87jG.js +2 -0
- package/dist/web/_app/immutable/chunks/B5Rb52QU.js +1 -0
- package/dist/web/_app/immutable/chunks/B6Lt-qaJ.js +1 -0
- package/dist/web/_app/immutable/chunks/B6O-q2CN.js +1 -0
- package/dist/web/_app/immutable/chunks/B6qeIQZz.js +2 -0
- package/dist/web/_app/immutable/chunks/B9KfEsQw2.js +1 -0
- package/dist/web/_app/immutable/chunks/BB-RSeXQ.js +1 -0
- package/dist/web/_app/immutable/chunks/BCQQzpbj.js +1 -0
- package/dist/web/_app/immutable/chunks/BGdzd-Tc.js +1 -0
- package/dist/web/_app/immutable/chunks/BLs1h0Rh2.js +1 -0
- package/dist/web/_app/immutable/chunks/BPzV_xOS2.js +1 -0
- package/dist/web/_app/immutable/chunks/BT2C6q8n.js +1 -0
- package/dist/web/_app/immutable/chunks/BUesbLq2.js +1 -0
- package/dist/web/_app/immutable/chunks/BUrnwOw4.js +2 -0
- package/dist/web/_app/immutable/chunks/BV-iCKqa.js +1 -0
- package/dist/web/_app/immutable/chunks/BVCJtXyc.js +1 -0
- package/dist/web/_app/immutable/chunks/BY9a3GSt.js +6 -0
- package/dist/web/_app/immutable/chunks/BZi3uKF4.js +1 -0
- package/dist/web/_app/immutable/chunks/BbfHGU9n2.js +1 -0
- package/dist/web/_app/immutable/chunks/Bbqu2-5G2.js +1 -0
- package/dist/web/_app/immutable/chunks/BbsX1Slr.js +3 -0
- package/dist/web/_app/immutable/chunks/BcwjqHaZ2.js +1 -0
- package/dist/web/_app/immutable/chunks/BizeEpTx.js +2 -0
- package/dist/web/_app/immutable/chunks/BlgjVmFM2.js +14 -0
- package/dist/web/_app/immutable/chunks/BocSRgv12.js +1 -0
- package/dist/web/_app/immutable/chunks/BojBYqc3.js +1 -0
- package/dist/web/_app/immutable/chunks/BpCG9m962.js +1 -0
- package/dist/web/_app/immutable/chunks/BqvnBg_y.js +1 -0
- package/dist/web/_app/immutable/chunks/BsT0J1QD.js +1 -0
- package/dist/web/_app/immutable/chunks/BsW72fyR2.js +1 -0
- package/dist/web/_app/immutable/chunks/Bti_XKwx.js +2692 -0
- package/dist/web/_app/immutable/chunks/Bua97Had2.js +2 -0
- package/dist/web/_app/immutable/chunks/BuhW5Fr0.js +689 -0
- package/dist/web/_app/immutable/chunks/Bx74EEyn2.js +1 -0
- package/dist/web/_app/immutable/chunks/BxPN0T61.js +1 -0
- package/dist/web/_app/immutable/chunks/Bz9lrgGs.js +1 -0
- package/dist/web/_app/immutable/chunks/BzaxZ6j12.js +1 -0
- package/dist/web/_app/immutable/chunks/C1B4xDs0.js +1 -0
- package/dist/web/_app/immutable/chunks/C1trcC8M.js +7 -0
- package/dist/web/_app/immutable/chunks/C9tvkk7Y2.js +22 -0
- package/dist/web/_app/immutable/chunks/CBQjdDZf.js +1 -0
- package/dist/web/_app/immutable/chunks/CDeazMFW2.js +2 -0
- package/dist/web/_app/immutable/chunks/CEahbtnP.js +1 -0
- package/dist/web/_app/immutable/chunks/CGjVCd0e.js +8 -0
- package/dist/web/_app/immutable/chunks/CICK9maP.js +1 -0
- package/dist/web/_app/immutable/chunks/CIoNEHQ82.js +184 -0
- package/dist/web/_app/immutable/chunks/CP8_U450.js +1 -0
- package/dist/web/_app/immutable/chunks/CQ1eQ93t2.js +6 -0
- package/dist/web/_app/immutable/chunks/CUFQMEBn2.js +1 -0
- package/dist/web/_app/immutable/chunks/CYEYDNwO2.js +1 -0
- package/dist/web/_app/immutable/chunks/CYyIP7kP2.js +66 -0
- package/dist/web/_app/immutable/chunks/CZgFaimi2.js +83 -0
- package/dist/web/_app/immutable/chunks/CZqvCTCv.js +1 -0
- package/dist/web/_app/immutable/chunks/CcI9jYBV.js +1 -0
- package/dist/web/_app/immutable/chunks/CcWaWbrI2.js +1 -0
- package/dist/web/_app/immutable/chunks/CdtzRVZK.js +1 -0
- package/dist/web/_app/immutable/chunks/CfYG72Hc.js +1 -0
- package/dist/web/_app/immutable/chunks/Ch1kmm3J2.js +1 -0
- package/dist/web/_app/immutable/chunks/CmSSN61R2.js +1 -0
- package/dist/web/_app/immutable/chunks/Cqm5wAin.js +1 -0
- package/dist/web/_app/immutable/chunks/CuYPXpWU.js +1 -0
- package/dist/web/_app/immutable/chunks/CvSEodTA.js +1 -0
- package/dist/web/_app/immutable/chunks/CvqqrTrj.js +1 -0
- package/dist/web/_app/immutable/chunks/CwAmWt6h.js +1 -0
- package/dist/web/_app/immutable/chunks/CwP3Oa7F.js +1 -0
- package/dist/web/_app/immutable/chunks/CyTluew1.js +2 -0
- package/dist/web/_app/immutable/chunks/CzXdOgVl2.js +7 -0
- package/dist/web/_app/immutable/chunks/D0IAituJ.js +1 -0
- package/dist/web/_app/immutable/chunks/D0W7c6Sg.js +185 -0
- package/dist/web/_app/immutable/chunks/D0rBhnqB2.js +1 -0
- package/dist/web/_app/immutable/chunks/D1-GZSN1.js +1 -0
- package/dist/web/_app/immutable/chunks/D1yvtriI.js +1 -0
- package/dist/web/_app/immutable/chunks/D25NMRpl.js +1 -0
- package/dist/web/_app/immutable/chunks/D8wZ2xul.js +4 -0
- package/dist/web/_app/immutable/chunks/DA3HEX3X.js +1 -0
- package/dist/web/_app/immutable/chunks/DD9wj4ca2.js +1 -0
- package/dist/web/_app/immutable/chunks/DJ1YeiJL2.js +1 -0
- package/dist/web/_app/immutable/chunks/DKFZnpVC.js +5 -0
- package/dist/web/_app/immutable/chunks/DKJl40hl.js +1 -0
- package/dist/web/_app/immutable/chunks/DPUVu0T0.js +1 -0
- package/dist/web/_app/immutable/chunks/DQMWa2t7.js +1 -0
- package/dist/web/_app/immutable/chunks/DXsFrDer2.js +1 -0
- package/dist/web/_app/immutable/chunks/DYc5KW3F.js +1 -0
- package/dist/web/_app/immutable/chunks/DZcTwXBW.js +1 -0
- package/dist/web/_app/immutable/chunks/DcPrzUMJ.js +1 -0
- package/dist/web/_app/immutable/chunks/DdPO8kRu2.js +2 -0
- package/dist/web/_app/immutable/chunks/DeOXyJZw2.js +1 -0
- package/dist/web/_app/immutable/chunks/DfufUFR1.js +2 -0
- package/dist/web/_app/immutable/chunks/DiQg3ing.js +1 -0
- package/dist/web/_app/immutable/chunks/DjIqa1_y.js +2 -0
- package/dist/web/_app/immutable/chunks/DkJ1dkxV2.js +1 -0
- package/dist/web/_app/immutable/chunks/Dl63IUnH2.js +224 -0
- package/dist/web/_app/immutable/chunks/DmFdD6zT.js +1 -0
- package/dist/web/_app/immutable/chunks/Dn3R8S-U.js +1 -0
- package/dist/web/_app/immutable/chunks/DpNr1GQ2.js +1 -0
- package/dist/web/_app/immutable/chunks/DpVNDHXz.js +2 -0
- package/dist/web/_app/immutable/chunks/DuxziNnw.js +1 -0
- package/dist/web/_app/immutable/chunks/Dv3A3Wcj.js +1 -0
- package/dist/web/_app/immutable/chunks/FuiJnZG0.js +1 -0
- package/dist/web/_app/immutable/chunks/Izkulod7.js +1 -0
- package/dist/web/_app/immutable/chunks/KZY6ongq2.js +2 -0
- package/dist/web/_app/immutable/chunks/LYL8znYR2.js +23 -0
- package/dist/web/_app/immutable/chunks/PhN6tXuJ2.js +1 -0
- package/dist/web/_app/immutable/chunks/PyLyCpuL.js +1 -0
- package/dist/web/_app/immutable/chunks/RK4gCWN0.js +2 -0
- package/dist/web/_app/immutable/chunks/VsBngTf4.js +2 -0
- package/dist/web/_app/immutable/chunks/XcWejFm_.js +5 -0
- package/dist/web/_app/immutable/chunks/al_nidE9.js +1 -0
- package/dist/web/_app/immutable/chunks/e50-izZO2.js +1 -0
- package/dist/web/_app/immutable/chunks/hG-QCarB.js +1 -0
- package/dist/web/_app/immutable/chunks/hStvCHkX.js +1 -0
- package/dist/web/_app/immutable/chunks/iJVY9p0y.js +3 -0
- package/dist/web/_app/immutable/chunks/kNaey6uv.js +1 -0
- package/dist/web/_app/immutable/chunks/pIXNe0C1.js +1 -0
- package/dist/web/_app/immutable/chunks/pNSRq_1B.js +2 -0
- package/dist/web/_app/immutable/chunks/qwr5boV8.js +1 -0
- package/dist/web/_app/immutable/chunks/rjjyuGhb.js +1 -0
- package/dist/web/_app/immutable/chunks/sg-T-FoN.js +1 -0
- package/dist/web/_app/immutable/chunks/uBgoVlsx.js +3 -0
- package/dist/web/_app/immutable/chunks/ulshNz6x.js +2 -0
- package/dist/web/_app/immutable/chunks/xY0c-UfG.js +3 -0
- package/dist/web/_app/immutable/chunks/xeNvx4Bl2.js +1 -0
- package/dist/web/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/dist/web/_app/immutable/entry/app.pNUW-q4U.js +2 -0
- package/dist/web/_app/immutable/entry/start.DxGtIGG_.js +1 -0
- package/dist/web/_app/immutable/nodes/0.D6ZCY_R6.js +2 -0
- package/dist/web/_app/immutable/nodes/1.BryH3TNr.js +1 -0
- package/dist/web/_app/immutable/nodes/10.CMZMvR17.js +1 -0
- package/dist/web/_app/immutable/nodes/11.QHx_JShx.js +1 -0
- package/dist/web/_app/immutable/nodes/12.CiRWbb4X.js +1 -0
- package/dist/web/_app/immutable/nodes/13.CYrHXCA8.js +1 -0
- package/dist/web/_app/immutable/nodes/14.K18eIE5Z.js +1 -0
- package/dist/web/_app/immutable/nodes/15.DxgnZ61h.js +1 -0
- package/dist/web/_app/immutable/nodes/16.Dn6iuWIo.js +1 -0
- package/dist/web/_app/immutable/nodes/17.viwS7vTR.js +77 -0
- package/dist/web/_app/immutable/nodes/2.BQkQ_uUM.js +122 -0
- package/dist/web/_app/immutable/nodes/3.B4pqXsqq.js +6 -0
- package/dist/web/_app/immutable/nodes/4.CKXEgIAP.js +11 -0
- package/dist/web/_app/immutable/nodes/5.A2TASl4Q.js +1 -0
- package/dist/web/_app/immutable/nodes/6.DaIRO3SI.js +6 -0
- package/dist/web/_app/immutable/nodes/7.ga2UvFm-.js +1 -0
- package/dist/web/_app/immutable/nodes/8.BTEWT81u.js +1 -0
- package/dist/web/_app/immutable/nodes/9.BVxo0E0c.js +1 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/favicon-16.png +0 -0
- package/dist/web/favicon-180.png +0 -0
- package/dist/web/favicon-32.png +0 -0
- package/dist/web/favicon-48.png +0 -0
- package/dist/web/favicon-512.png +0 -0
- package/dist/web/favicon.ico +0 -0
- package/dist/web/favicon.svg +8 -0
- package/dist/web/index.html +56 -21
- package/dist/web/studiograph-logomark.svg +29 -0
- package/package.json +35 -14
- package/dist/agent/skills/enrich-entities.md +0 -136
- package/dist/agent/skills/sync-configuration.md +0 -119
- package/dist/agent/skills/sync-setup.md +0 -82
- package/dist/agent/tools/message-tools.d.ts +0 -42
- package/dist/agent/tools/message-tools.js +0 -106
- package/dist/agent/tools/message-tools.js.map +0 -1
- package/dist/cli/commands/app.d.ts +0 -7
- package/dist/cli/commands/app.js +0 -268
- package/dist/cli/commands/app.js.map +0 -1
- package/dist/cli/commands/clear.d.ts +0 -5
- package/dist/cli/commands/clear.js +0 -36
- package/dist/cli/commands/clear.js.map +0 -1
- package/dist/cli/commands/collection.d.ts +0 -10
- package/dist/cli/commands/collection.js.map +0 -1
- package/dist/cli/commands/join.d.ts +0 -9
- package/dist/cli/commands/join.js +0 -255
- package/dist/cli/commands/join.js.map +0 -1
- package/dist/cli/commands/start.d.ts +0 -7
- package/dist/cli/commands/start.js +0 -584
- package/dist/cli/commands/start.js.map +0 -1
- package/dist/cli/commands/update.d.ts +0 -8
- package/dist/cli/commands/update.js +0 -155
- package/dist/cli/commands/update.js.map +0 -1
- package/dist/cli/commands/user.d.ts +0 -7
- package/dist/cli/commands/user.js +0 -175
- package/dist/cli/commands/user.js.map +0 -1
- package/dist/cli/scaffolding.d.ts +0 -12
- package/dist/cli/scaffolding.js +0 -397
- package/dist/cli/scaffolding.js.map +0 -1
- package/dist/integrations/registry.d.ts +0 -8
- package/dist/integrations/registry.js +0 -7
- package/dist/integrations/registry.js.map +0 -1
- package/dist/integrations/types.d.ts +0 -43
- package/dist/integrations/types.js +0 -5
- package/dist/integrations/types.js.map +0 -1
- package/dist/lib/lib/utils.d.ts +0 -2
- package/dist/lib/lib/utils.js +0 -6
- package/dist/lib/lib/utils.js.map +0 -1
- package/dist/server/chrome/chrome.css +0 -691
- package/dist/server/chrome/chrome.js +0 -374
- package/dist/server/commit-scheduler.d.ts +0 -39
- package/dist/server/commit-scheduler.js +0 -113
- package/dist/server/commit-scheduler.js.map +0 -1
- package/dist/server/plugin-loader.d.ts +0 -53
- package/dist/server/plugin-loader.js +0 -155
- package/dist/server/plugin-loader.js.map +0 -1
- package/dist/server/routes/meeting-ingest-api.d.ts +0 -14
- package/dist/server/routes/meeting-ingest-api.js.map +0 -1
- package/dist/server/routes/messages-api.d.ts +0 -15
- package/dist/server/routes/messages-api.js +0 -385
- package/dist/server/routes/messages-api.js.map +0 -1
- package/dist/services/batch-processor.d.ts +0 -49
- package/dist/services/batch-processor.js +0 -166
- package/dist/services/batch-processor.js.map +0 -1
- package/dist/services/briefing.d.ts +0 -26
- package/dist/services/briefing.js +0 -230
- package/dist/services/briefing.js.map +0 -1
- package/dist/services/heartbeat.d.ts +0 -28
- package/dist/services/heartbeat.js +0 -183
- package/dist/services/heartbeat.js.map +0 -1
- package/dist/services/image-import-service.d.ts +0 -24
- package/dist/services/image-import-service.js +0 -108
- package/dist/services/image-import-service.js.map +0 -1
- package/dist/services/insights.d.ts +0 -38
- package/dist/services/insights.js +0 -269
- package/dist/services/insights.js.map +0 -1
- package/dist/services/meeting-processor.js.map +0 -1
- package/dist/services/message-service.d.ts +0 -68
- package/dist/services/message-service.js +0 -220
- package/dist/services/message-service.js.map +0 -1
- package/dist/utils/workspace-config.d.ts +0 -8
- package/dist/utils/workspace-config.js +0 -22
- package/dist/utils/workspace-config.js.map +0 -1
- package/dist/web/_app/immutable/assets/0.uPSqtsC5.css +0 -1
- package/dist/web/_app/immutable/assets/11.2jzI3cZY.css +0 -1
- package/dist/web/_app/immutable/assets/12.CT4xL4K3.css +0 -1
- package/dist/web/_app/immutable/assets/13.BUrHkYry.css +0 -1
- package/dist/web/_app/immutable/assets/2.DpQWr6q6.css +0 -1
- package/dist/web/_app/immutable/assets/3.BxdqT7zi.css +0 -1
- package/dist/web/_app/immutable/assets/4.DdNqjd0T.css +0 -1
- package/dist/web/_app/immutable/assets/5.DFeGxLYf.css +0 -1
- package/dist/web/_app/immutable/assets/6.DXZr_rI_.css +0 -1
- package/dist/web/_app/immutable/assets/GraphView.D9ePpZez.css +0 -1
- package/dist/web/_app/immutable/assets/Toaster.rN8r_Hzv.css +0 -1
- package/dist/web/_app/immutable/assets/ViewToolbar.BWE03S64.css +0 -1
- package/dist/web/_app/immutable/assets/WorkspaceView.CgGDi_Zb.css +0 -1
- package/dist/web/_app/immutable/assets/wikilinks.CzMBkUMB.css +0 -1
- package/dist/web/_app/immutable/chunks/-jG4Obyh.js +0 -4
- package/dist/web/_app/immutable/chunks/2nrc8f_O.js +0 -1
- package/dist/web/_app/immutable/chunks/7S2LGqoP.js +0 -2
- package/dist/web/_app/immutable/chunks/8Q3ZJIYu.js +0 -1
- package/dist/web/_app/immutable/chunks/B8ydT5xX.js +0 -2
- package/dist/web/_app/immutable/chunks/BB_5th5W.js +0 -3383
- package/dist/web/_app/immutable/chunks/BEn6N5c2.js +0 -1
- package/dist/web/_app/immutable/chunks/BFNNbCAM.js +0 -1
- package/dist/web/_app/immutable/chunks/BFZZEUd5.js +0 -1
- package/dist/web/_app/immutable/chunks/BGk8kfOE.js +0 -2
- package/dist/web/_app/immutable/chunks/BIBCr278.js +0 -1
- package/dist/web/_app/immutable/chunks/BPCkkwqe.js +0 -1
- package/dist/web/_app/immutable/chunks/BhlvzGQx.js +0 -1
- package/dist/web/_app/immutable/chunks/BlMknQeF.js +0 -1
- package/dist/web/_app/immutable/chunks/BpjqrlCg.js +0 -1
- package/dist/web/_app/immutable/chunks/BrebtJNG.js +0 -18
- package/dist/web/_app/immutable/chunks/ByBZ7JIT.js +0 -1
- package/dist/web/_app/immutable/chunks/Bz0ZjVQE.js +0 -2
- package/dist/web/_app/immutable/chunks/BzJTZOK2.js +0 -1
- package/dist/web/_app/immutable/chunks/C0LVZhvn.js +0 -1
- package/dist/web/_app/immutable/chunks/C3uBrOS5.js +0 -1
- package/dist/web/_app/immutable/chunks/C8R1sDpW.js +0 -1
- package/dist/web/_app/immutable/chunks/CDRHrs0g.js +0 -1
- package/dist/web/_app/immutable/chunks/CN5_py1I.js +0 -1
- package/dist/web/_app/immutable/chunks/CPne482a.js +0 -1
- package/dist/web/_app/immutable/chunks/CSVbGg_b.js +0 -5
- package/dist/web/_app/immutable/chunks/CWyU-seV.js +0 -1
- package/dist/web/_app/immutable/chunks/CX_61fY8.js +0 -5
- package/dist/web/_app/immutable/chunks/CYrVHOHA.js +0 -1
- package/dist/web/_app/immutable/chunks/ChsiIm-E.js +0 -1
- package/dist/web/_app/immutable/chunks/CojKppbh.js +0 -1
- package/dist/web/_app/immutable/chunks/CqkleIqs.js +0 -1
- package/dist/web/_app/immutable/chunks/CtYLtD7K.js +0 -1
- package/dist/web/_app/immutable/chunks/D-HDy5qS.js +0 -1
- package/dist/web/_app/immutable/chunks/D5aIYSkd.js +0 -1
- package/dist/web/_app/immutable/chunks/DBBXARVf.js +0 -1
- package/dist/web/_app/immutable/chunks/DFYOFE3o.js +0 -1
- package/dist/web/_app/immutable/chunks/DKaafS50.js +0 -1
- package/dist/web/_app/immutable/chunks/DUMOo1Pn.js +0 -1
- package/dist/web/_app/immutable/chunks/DWX9f6AF.js +0 -1
- package/dist/web/_app/immutable/chunks/DY8-EONP.js +0 -1
- package/dist/web/_app/immutable/chunks/DkoHPElM.js +0 -1
- package/dist/web/_app/immutable/chunks/DnL9f0lc.js +0 -7
- package/dist/web/_app/immutable/chunks/DsnmJJEf.js +0 -1
- package/dist/web/_app/immutable/chunks/DujahU3W.js +0 -1
- package/dist/web/_app/immutable/chunks/FBn-ES5k.js +0 -1
- package/dist/web/_app/immutable/chunks/HQpwSOb3.js +0 -1
- package/dist/web/_app/immutable/chunks/KyjzlWRN.js +0 -2
- package/dist/web/_app/immutable/chunks/PPVm8Dsz.js +0 -1
- package/dist/web/_app/immutable/chunks/UwYfmrPx.js +0 -2
- package/dist/web/_app/immutable/chunks/W25ZVI8L.js +0 -2
- package/dist/web/_app/immutable/chunks/WSUKABI_.js +0 -1
- package/dist/web/_app/immutable/chunks/XjsuEnNE.js +0 -5
- package/dist/web/_app/immutable/chunks/ZD6ARAtb.js +0 -1
- package/dist/web/_app/immutable/chunks/pBTf4stg.js +0 -2
- package/dist/web/_app/immutable/chunks/rGIarcnp.js +0 -1
- package/dist/web/_app/immutable/chunks/vxEtkL8z.js +0 -1
- package/dist/web/_app/immutable/chunks/wDIGUaoU.js +0 -3
- package/dist/web/_app/immutable/entry/app.ZHiTM8WS.js +0 -2
- package/dist/web/_app/immutable/entry/start.C9-FfAVc.js +0 -1
- package/dist/web/_app/immutable/nodes/0.D92Orz8k.js +0 -2
- package/dist/web/_app/immutable/nodes/1.BMdyglM_.js +0 -1
- package/dist/web/_app/immutable/nodes/10.BilVDHSL.js +0 -1
- package/dist/web/_app/immutable/nodes/11.CS9E0Hic.js +0 -1
- package/dist/web/_app/immutable/nodes/12.D3BOxYzG.js +0 -1
- package/dist/web/_app/immutable/nodes/13.CClMKYtN.js +0 -1
- package/dist/web/_app/immutable/nodes/2.C8KKElPL.js +0 -267
- package/dist/web/_app/immutable/nodes/3.C5n5uiWU.js +0 -5
- package/dist/web/_app/immutable/nodes/4.DcGVvgiL.js +0 -11
- package/dist/web/_app/immutable/nodes/5.DxIjnFQO.js +0 -4
- package/dist/web/_app/immutable/nodes/6.lkh6kKLj.js +0 -1
- package/dist/web/_app/immutable/nodes/7.Bg7SbfhA.js +0 -1
- package/dist/web/_app/immutable/nodes/8.DcXWCNBE.js +0 -1
- package/dist/web/_app/immutable/nodes/9.Cefi8Jfm.js +0 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Yjs-native anchor serialization for span-anchored comments.
|
|
3
|
+
*
|
|
4
|
+
* Anchors are pairs of `Y.RelativePosition` objects pointing at the start
|
|
5
|
+
* and end of the comment’s target span. RelativePosition is symbolic
|
|
6
|
+
* (“between these two Yjs items”) rather than offset-based, so it survives
|
|
7
|
+
* concurrent edits automatically — that’s the whole reason we built on Yjs
|
|
8
|
+
* for the editor. Comments survive other users typing in front of the
|
|
9
|
+
* highlighted span, surrounding deletes, or remote rewrites, with no
|
|
10
|
+
* server-side migration logic.
|
|
11
|
+
*
|
|
12
|
+
* Wire format:
|
|
13
|
+
* 2 bytes (big-endian) — length of start blob
|
|
14
|
+
* start blob — Y.encodeRelativePosition output
|
|
15
|
+
* end blob — Y.encodeRelativePosition output
|
|
16
|
+
* ↓ base64-encoded for SQLite blob storage / JSON transport
|
|
17
|
+
*
|
|
18
|
+
* Resolution falls back to fuzzy-quote matching when the primary anchor
|
|
19
|
+
* resolves to null AND the original highlighted text still exists exactly
|
|
20
|
+
* once in the document — Google Docs / Hypothesis pattern. If both fail,
|
|
21
|
+
* the comment renders as orphaned with the preserved quote as context.
|
|
22
|
+
*/
|
|
23
|
+
import * as Y from 'yjs';
|
|
24
|
+
/**
|
|
25
|
+
* Encode a Uint8Array as base64. Uses Node's Buffer when available so
|
|
26
|
+
* server-side callers (MCP virtual-entity adapter, agent context builder)
|
|
27
|
+
* round-trip byte-identical to the browser path; falls back to btoa for
|
|
28
|
+
* pure-browser builds. Both halves must agree because anchors travel
|
|
29
|
+
* through the JSON wire format and back.
|
|
30
|
+
*/
|
|
31
|
+
function bytesToBase64(bytes) {
|
|
32
|
+
if (typeof Buffer !== 'undefined') {
|
|
33
|
+
return Buffer.from(bytes).toString('base64');
|
|
34
|
+
}
|
|
35
|
+
let s = '';
|
|
36
|
+
for (let i = 0; i < bytes.length; i++)
|
|
37
|
+
s += String.fromCharCode(bytes[i]);
|
|
38
|
+
return btoa(s);
|
|
39
|
+
}
|
|
40
|
+
function base64ToBytes(b64) {
|
|
41
|
+
if (typeof Buffer !== 'undefined') {
|
|
42
|
+
const buf = Buffer.from(b64, 'base64');
|
|
43
|
+
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
44
|
+
}
|
|
45
|
+
const s = atob(b64);
|
|
46
|
+
const out = new Uint8Array(s.length);
|
|
47
|
+
for (let i = 0; i < s.length; i++)
|
|
48
|
+
out[i] = s.charCodeAt(i);
|
|
49
|
+
return out;
|
|
50
|
+
}
|
|
51
|
+
export function serializeAnchor(ytext, from, to) {
|
|
52
|
+
const fromRel = Y.createRelativePositionFromTypeIndex(ytext, from);
|
|
53
|
+
const toRel = Y.createRelativePositionFromTypeIndex(ytext, to);
|
|
54
|
+
const startBytes = Y.encodeRelativePosition(fromRel);
|
|
55
|
+
const endBytes = Y.encodeRelativePosition(toRel);
|
|
56
|
+
const wire = new Uint8Array(2 + startBytes.length + endBytes.length);
|
|
57
|
+
const len = startBytes.length;
|
|
58
|
+
wire[0] = (len >> 8) & 0xff;
|
|
59
|
+
wire[1] = len & 0xff;
|
|
60
|
+
wire.set(startBytes, 2);
|
|
61
|
+
wire.set(endBytes, 2 + len);
|
|
62
|
+
const quote = ytext.toString().slice(from, to).slice(0, 256);
|
|
63
|
+
return { relpos: bytesToBase64(wire), quote };
|
|
64
|
+
}
|
|
65
|
+
export function resolveAnchor(ydoc, ytext, relposBase64, quote) {
|
|
66
|
+
try {
|
|
67
|
+
const wire = base64ToBytes(relposBase64);
|
|
68
|
+
const startLen = (wire[0] << 8) | wire[1];
|
|
69
|
+
const startBytes = wire.slice(2, 2 + startLen);
|
|
70
|
+
const endBytes = wire.slice(2 + startLen);
|
|
71
|
+
const fromRel = Y.decodeRelativePosition(startBytes);
|
|
72
|
+
const toRel = Y.decodeRelativePosition(endBytes);
|
|
73
|
+
const fromAbs = Y.createAbsolutePositionFromRelativePosition(fromRel, ydoc);
|
|
74
|
+
const toAbs = Y.createAbsolutePositionFromRelativePosition(toRel, ydoc);
|
|
75
|
+
if (fromAbs && toAbs && fromAbs.type === ytext && toAbs.type === ytext && fromAbs.index <= toAbs.index) {
|
|
76
|
+
// Yjs RelativePositions don’t return null when the items they
|
|
77
|
+
// reference are gone — they snap to a surviving item (often
|
|
78
|
+
// position 0 or the doc end), producing a degenerate
|
|
79
|
+
// from===to resolution. When the original anchor had
|
|
80
|
+
// non-empty content, a zero-width result means the anchor
|
|
81
|
+
// is stale, not literally degenerate; fall through to the
|
|
82
|
+
// quote-fallback. We accept from===to only when the original
|
|
83
|
+
// quote was also empty (entry-level anchors aren’t issued
|
|
84
|
+
// with an empty selection by the rail UI but the serializer
|
|
85
|
+
// permits it structurally).
|
|
86
|
+
const degenerate = fromAbs.index === toAbs.index && quote.length > 0;
|
|
87
|
+
if (!degenerate) {
|
|
88
|
+
// Even when both endpoints resolve to a non-degenerate range,
|
|
89
|
+
// Yjs may snap to surviving items that flank a deleted middle —
|
|
90
|
+
// the range exists but no longer covers the quoted text.
|
|
91
|
+
// Heuristic: when the resolved range is materially shorter than
|
|
92
|
+
// the quote, treat as drift and fall through to quote-fallback.
|
|
93
|
+
// (Pure insertion inside the anchor EXPANDS the range, so a
|
|
94
|
+
// longer-than-quote resolved range is the expected case and
|
|
95
|
+
// must still be accepted.) Threshold: resolved must be at
|
|
96
|
+
// least 50% of the quote length (min 1) — catches
|
|
97
|
+
// most-of-content-deleted while leaving normal edits alone.
|
|
98
|
+
if (quote.length > 0) {
|
|
99
|
+
const resolvedLen = toAbs.index - fromAbs.index;
|
|
100
|
+
const minLen = Math.max(1, Math.floor(quote.length * 0.5));
|
|
101
|
+
if (resolvedLen < minLen) {
|
|
102
|
+
// Drift — but if the surviving range is a clean prefix or
|
|
103
|
+
// suffix of the original quote, the edit just lopped off
|
|
104
|
+
// one end and the resolved range still points exactly
|
|
105
|
+
// where the comment belongs (just shorter). Accept it as
|
|
106
|
+
// a partial resolution. Middle-collapse cases produce
|
|
107
|
+
// resolved text that's neither a prefix nor suffix of the
|
|
108
|
+
// quote (e.g. anchor "quick brown fox" with the middle
|
|
109
|
+
// deleted resolves to "qx" — not a prefix of the quote)
|
|
110
|
+
// and still fall through to quote-fallback → orphan.
|
|
111
|
+
const resolvedText = ytext.toString().slice(fromAbs.index, toAbs.index);
|
|
112
|
+
if (quote.startsWith(resolvedText) || quote.endsWith(resolvedText)) {
|
|
113
|
+
return { from: fromAbs.index, to: toAbs.index, orphaned: false, recovered: true };
|
|
114
|
+
}
|
|
115
|
+
// else: real drift — fall through to quote-fallback below.
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
return { from: fromAbs.index, to: toAbs.index, orphaned: false, recovered: false };
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
return { from: fromAbs.index, to: toAbs.index, orphaned: false, recovered: false };
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
// fall through to quote-fallback
|
|
129
|
+
}
|
|
130
|
+
// Primary anchor failed. If the quote is still findable exactly once,
|
|
131
|
+
// re-anchor onto that occurrence. Multiple occurrences are ambiguous —
|
|
132
|
+
// we treat that as orphan to avoid silently picking the wrong instance.
|
|
133
|
+
if (quote.length > 0) {
|
|
134
|
+
const doc = ytext.toString();
|
|
135
|
+
const first = doc.indexOf(quote);
|
|
136
|
+
if (first >= 0 && doc.indexOf(quote, first + 1) < 0) {
|
|
137
|
+
return {
|
|
138
|
+
from: first,
|
|
139
|
+
to: first + quote.length,
|
|
140
|
+
orphaned: false,
|
|
141
|
+
recovered: true,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return { from: -1, to: -1, orphaned: true, recovered: false };
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=comment-anchor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment-anchor.js","sourceRoot":"","sources":["../../src/core/comment-anchor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAoBzB;;;;;;GAMG;AACH,SAAS,aAAa,CAAC,KAAiB;IACvC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QACnC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC9C,CAAC;IACD,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,CAAC,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1E,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;AA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EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Human-readable commit messages for entity + folder mutations.
|
|
3
|
+
*
|
|
4
|
+
* These strings are display-only — nothing parses them for behavior. Restore
|
|
5
|
+
* keys off the commit hash + the entity from the request, and the audit log
|
|
6
|
+
* only records the string. They surface in `git log`, the audit log, MCP file
|
|
7
|
+
* history, and any future cross-entity history view, where the entity name +
|
|
8
|
+
* type IS the useful context.
|
|
9
|
+
*
|
|
10
|
+
* The per-entity History panel renders its own change summary (computed from
|
|
11
|
+
* the file diff) and does NOT show these messages, so we optimize purely for
|
|
12
|
+
* how they read in a flat log.
|
|
13
|
+
*
|
|
14
|
+
* Format decisions:
|
|
15
|
+
* - Past tense ("Created", "Edited", "Moved") — it's a log of what happened.
|
|
16
|
+
* - `"Display Title" (Type)` — the title in quotes, the friendly type in parens.
|
|
17
|
+
* - Batches enumerate up to 3 names + "(+N more)".
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Title-case an internal type key for display:
|
|
21
|
+
* "deal" → "Deal", "meeting_note" → "Meeting Note".
|
|
22
|
+
* Built-in types have no stored label, so this is their friendly name.
|
|
23
|
+
*/
|
|
24
|
+
export declare function titleCaseType(type: string): string;
|
|
25
|
+
export interface EntityRef {
|
|
26
|
+
/** Friendly type label, already resolved (e.g. "Deal"). */
|
|
27
|
+
typeLabel: string;
|
|
28
|
+
/** Display title (frontmatter `name`). Falls back to `id` when absent. */
|
|
29
|
+
title?: string | null;
|
|
30
|
+
/** Slug id — the fallback when there's no title. */
|
|
31
|
+
id: string;
|
|
32
|
+
}
|
|
33
|
+
/** `"Acme Corp Redesign" (Deal)` */
|
|
34
|
+
export declare function entityLabel(ref: EntityRef): string;
|
|
35
|
+
export declare const commitMessage: {
|
|
36
|
+
created: (ref: EntityRef) => string;
|
|
37
|
+
edited: (ref: EntityRef) => string;
|
|
38
|
+
editedBatch: (refs: EntityRef[]) => string;
|
|
39
|
+
deleted: (ref: EntityRef) => string;
|
|
40
|
+
deletedBatch: (refs: EntityRef[]) => string;
|
|
41
|
+
/** Rename changes the slug id; the title may be unchanged, so show the ids. */
|
|
42
|
+
renamed: (typeLabel: string, oldId: string, newId: string) => string;
|
|
43
|
+
changedType: (ref: EntityRef, fromLabel: string, toLabel: string) => string;
|
|
44
|
+
/** `folder` is the destination path display, or "(root)" for the repo root. */
|
|
45
|
+
movedTo: (ref: EntityRef, folder: string) => string;
|
|
46
|
+
/** Bulk move: count + destination reads cleaner than enumerate + target. */
|
|
47
|
+
movedBatch: (count: number, where: string) => string;
|
|
48
|
+
receivedBatch: (count: number, fromRepo: string) => string;
|
|
49
|
+
restored: (ref: EntityRef, shortHash: string) => string;
|
|
50
|
+
relinked: (oldId: string, newId: string) => string;
|
|
51
|
+
folderCreated: (path: string) => string;
|
|
52
|
+
folderRenamed: (from: string, to: string) => string;
|
|
53
|
+
folderDisplayRenamed: (path: string) => string;
|
|
54
|
+
folderDeleted: (path: string) => string;
|
|
55
|
+
folderMoved: (from: string, toRepo: string, to: string) => string;
|
|
56
|
+
folderReceived: (fromRepo: string, from: string, to: string) => string;
|
|
57
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Human-readable commit messages for entity + folder mutations.
|
|
3
|
+
*
|
|
4
|
+
* These strings are display-only — nothing parses them for behavior. Restore
|
|
5
|
+
* keys off the commit hash + the entity from the request, and the audit log
|
|
6
|
+
* only records the string. They surface in `git log`, the audit log, MCP file
|
|
7
|
+
* history, and any future cross-entity history view, where the entity name +
|
|
8
|
+
* type IS the useful context.
|
|
9
|
+
*
|
|
10
|
+
* The per-entity History panel renders its own change summary (computed from
|
|
11
|
+
* the file diff) and does NOT show these messages, so we optimize purely for
|
|
12
|
+
* how they read in a flat log.
|
|
13
|
+
*
|
|
14
|
+
* Format decisions:
|
|
15
|
+
* - Past tense ("Created", "Edited", "Moved") — it's a log of what happened.
|
|
16
|
+
* - `"Display Title" (Type)` — the title in quotes, the friendly type in parens.
|
|
17
|
+
* - Batches enumerate up to 3 names + "(+N more)".
|
|
18
|
+
*/
|
|
19
|
+
/** Cap a title so it can't blow out a one-line subject. */
|
|
20
|
+
const MAX_TITLE = 80;
|
|
21
|
+
/**
|
|
22
|
+
* Title-case an internal type key for display:
|
|
23
|
+
* "deal" → "Deal", "meeting_note" → "Meeting Note".
|
|
24
|
+
* Built-in types have no stored label, so this is their friendly name.
|
|
25
|
+
*/
|
|
26
|
+
export function titleCaseType(type) {
|
|
27
|
+
const cased = type
|
|
28
|
+
.split(/[_-]+/)
|
|
29
|
+
.filter(Boolean)
|
|
30
|
+
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
31
|
+
.join(' ');
|
|
32
|
+
return cased || type;
|
|
33
|
+
}
|
|
34
|
+
/** Collapse whitespace and cap length so a title is safe in a subject line. */
|
|
35
|
+
function cleanTitle(title) {
|
|
36
|
+
if (!title)
|
|
37
|
+
return '';
|
|
38
|
+
const flat = String(title).replace(/\s+/g, ' ').trim();
|
|
39
|
+
return flat.length > MAX_TITLE ? `${flat.slice(0, MAX_TITLE - 1)}…` : flat;
|
|
40
|
+
}
|
|
41
|
+
/** The user-facing name for an entity: cleaned title, or the slug as fallback. */
|
|
42
|
+
function displayName(ref) {
|
|
43
|
+
return cleanTitle(ref.title) || ref.id;
|
|
44
|
+
}
|
|
45
|
+
/** `"Acme Corp Redesign" (Deal)` */
|
|
46
|
+
export function entityLabel(ref) {
|
|
47
|
+
return `"${displayName(ref)}" (${ref.typeLabel})`;
|
|
48
|
+
}
|
|
49
|
+
/** Just the quoted name (no type) — for batch enumeration. */
|
|
50
|
+
function quotedName(ref) {
|
|
51
|
+
return `"${displayName(ref)}"`;
|
|
52
|
+
}
|
|
53
|
+
/** `"A", "B", "C" (+2 more)` — enumerate up to `max` names. */
|
|
54
|
+
function enumerateNames(refs, max = 3) {
|
|
55
|
+
const names = refs.map(quotedName);
|
|
56
|
+
if (names.length <= max)
|
|
57
|
+
return names.join(', ');
|
|
58
|
+
return `${names.slice(0, max).join(', ')} (+${names.length - max} more)`;
|
|
59
|
+
}
|
|
60
|
+
const plural = (n) => (n === 1 ? 'entry' : 'entries');
|
|
61
|
+
export const commitMessage = {
|
|
62
|
+
created: (ref) => `Created ${entityLabel(ref)}`,
|
|
63
|
+
edited: (ref) => `Edited ${entityLabel(ref)}`,
|
|
64
|
+
editedBatch: (refs) => `Edited ${enumerateNames(refs)}`,
|
|
65
|
+
deleted: (ref) => `Deleted ${entityLabel(ref)}`,
|
|
66
|
+
deletedBatch: (refs) => `Deleted ${enumerateNames(refs)}`,
|
|
67
|
+
/** Rename changes the slug id; the title may be unchanged, so show the ids. */
|
|
68
|
+
renamed: (typeLabel, oldId, newId) => `Renamed "${oldId}" → "${newId}" (${typeLabel})`,
|
|
69
|
+
changedType: (ref, fromLabel, toLabel) => `Changed ${quotedName(ref)} from ${fromLabel} to ${toLabel}`,
|
|
70
|
+
/** `folder` is the destination path display, or "(root)" for the repo root. */
|
|
71
|
+
movedTo: (ref, folder) => `Moved ${entityLabel(ref)} → ${folder}`,
|
|
72
|
+
/** Bulk move: count + destination reads cleaner than enumerate + target. */
|
|
73
|
+
movedBatch: (count, where) => `Moved ${count} ${plural(count)} → ${where}`,
|
|
74
|
+
receivedBatch: (count, fromRepo) => `Received ${count} ${plural(count)} from ${fromRepo}`,
|
|
75
|
+
restored: (ref, shortHash) => `Restored ${entityLabel(ref)} from ${shortHash}`,
|
|
76
|
+
relinked: (oldId, newId) => `Relinked "${oldId}" → "${newId}"`,
|
|
77
|
+
// Folders are path-based (no type/title).
|
|
78
|
+
folderCreated: (path) => `Created folder "${path}"`,
|
|
79
|
+
folderRenamed: (from, to) => `Renamed folder "${from}" → "${to}"`,
|
|
80
|
+
folderDisplayRenamed: (path) => `Renamed folder "${path}"`,
|
|
81
|
+
folderDeleted: (path) => `Deleted folder "${path}"`,
|
|
82
|
+
folderMoved: (from, toRepo, to) => `Moved folder "${from}" → ${toRepo}:${to || '/'}`,
|
|
83
|
+
folderReceived: (fromRepo, from, to) => `Received folder from ${fromRepo}:${from} → ${to || '/'}`,
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=commit-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-messages.js","sourceRoot":"","sources":["../../src/core/commit-messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,2DAA2D;AAC3D,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,KAAK,GAAG,IAAI;SACf,KAAK,CAAC,OAAO,CAAC;SACd,MAAM,CAAC,OAAO,CAAC;SACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAClD,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,KAAK,IAAI,IAAI,CAAC;AACvB,CAAC;AAED,+EAA+E;AAC/E,SAAS,UAAU,CAAC,KAAqB;IACvC,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IACvD,OAAO,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7E,CAAC;AAWD,kFAAkF;AAClF,SAAS,WAAW,CAAC,GAAc;IACjC,OAAO,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;AACzC,CAAC;A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c,EAAE,EAAU,EAAE,EAAE,CACxD,iBAAiB,IAAI,OAAO,MAAM,IAAI,EAAE,IAAI,GAAG,EAAE;IACnD,cAAc,EAAE,CAAC,QAAgB,EAAE,IAAY,EAAE,EAAU,EAAE,EAAE,CAC7D,wBAAwB,QAAQ,IAAI,IAAI,MAAM,EAAE,IAAI,GAAG,EAAE;CAC5D,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset-embed extraction + diffing.
|
|
3
|
+
*
|
|
4
|
+
* Entry bodies reference binary assets two ways:
|
|
5
|
+
* - Obsidian-style transclusion embeds: ![[Foo.png]] / ![[Foo.png|alt]]
|
|
6
|
+
* - Standard markdown images: 
|
|
7
|
+
*
|
|
8
|
+
* Asset *binaries* live outside git (the workspace `.studiograph/assets/`
|
|
9
|
+
* tree for the local backend, or Cloudflare R2), so git history can only ever
|
|
10
|
+
* recover the *reference* — the embed text in the body, not the bytes. These
|
|
11
|
+
* helpers let the write path detect when a whole-body rewrite would drop a
|
|
12
|
+
* reference the prior body had, and let the history tools report which embeds
|
|
13
|
+
* exist at a given revision.
|
|
14
|
+
*
|
|
15
|
+
* Callers pass the markdown body (post-frontmatter). Embed syntax is a body
|
|
16
|
+
* construct; frontmatter is not scanned.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Extract every embedded asset reference from a markdown body,
|
|
20
|
+
* de-duplicated, transclusions first then markdown images. Returns the raw
|
|
21
|
+
* target (transclusion target or image URL) so callers can compare
|
|
22
|
+
* references across revisions and surface them to users/agents.
|
|
23
|
+
*/
|
|
24
|
+
export declare function extractAssetEmbeds(body: string): string[];
|
|
25
|
+
/**
|
|
26
|
+
* The canonical, render-safe markdown embed for an asset: ``.
|
|
27
|
+
* This is exactly what the editor inserts on drop/paste
|
|
28
|
+
* (web FormattingPalette), so any agent-placed embed that uses this form is
|
|
29
|
+
* guaranteed to render. Agents must NOT invent `![[filename]]` transclusion
|
|
30
|
+
* placeholders — those don't resolve to a stored asset and render as dead text.
|
|
31
|
+
*/
|
|
32
|
+
export declare function assetEmbed(filename: string, url: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Derive a human display name from a filename: drop the extension, turn
|
|
35
|
+
* `_`/`-` runs into spaces, and Title-Case each word
|
|
36
|
+
* (`haneya_sake.jpg` → `Haneya Sake`). Shared by every free-standing-asset
|
|
37
|
+
* creation path (manager upload, presign finalize, chat-image promote) so the
|
|
38
|
+
* label rule never drifts. Returns "" for an extension-only name; callers add
|
|
39
|
+
* their own fallback (filename / assetId).
|
|
40
|
+
*/
|
|
41
|
+
export declare function deriveAssetDisplayName(filename: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* References present in `before` but absent from `after` — i.e. embeds a
|
|
44
|
+
* body rewrite would drop. Set semantics on the raw reference string.
|
|
45
|
+
*/
|
|
46
|
+
export declare function droppedAssetEmbeds(before: string, after: string): string[];
|
|
47
|
+
/**
|
|
48
|
+
* Strip a leading YAML frontmatter block (`---\n…\n---`) so embed extraction
|
|
49
|
+
* runs against the body only. Returns the input unchanged when there is no
|
|
50
|
+
* frontmatter. Mirrors the lightweight frontmatter sniff the history tools
|
|
51
|
+
* already use, avoiding a full markdown parse for a read-only report.
|
|
52
|
+
*/
|
|
53
|
+
export declare function stripFrontmatter(fileContent: string): string;
|
|
54
|
+
export interface LegacyAssetRef {
|
|
55
|
+
/** Full matched URL, e.g. /api/assets/note/critique/172-shot.png */
|
|
56
|
+
url: string;
|
|
57
|
+
/** Storage key {type}/{id}/{filename} the blob lives at today. */
|
|
58
|
+
oldKey: string;
|
|
59
|
+
type: string;
|
|
60
|
+
id: string;
|
|
61
|
+
filename: string;
|
|
62
|
+
}
|
|
63
|
+
/** Every legacy `/api/assets/{type}/{id}/{filename}` reference in a file,
|
|
64
|
+
* de-duplicated by URL. Pass the RAW file (frontmatter + body). */
|
|
65
|
+
export declare function extractLegacyAssetUrls(fileContent: string): LegacyAssetRef[];
|
|
66
|
+
/**
|
|
67
|
+
* Rewrite every immutable `/api/assets/{assetId}/{filename}` reference in a
|
|
68
|
+
* body via `replace(assetId, filename)`. Legacy three-segment URLs and
|
|
69
|
+
* `![[transclusions]]` are left untouched. Used by the public share read to
|
|
70
|
+
* point embedded images at the token-scoped `/api/share/{token}/asset/...`
|
|
71
|
+
* surface without leaking the authed `/api/assets` URLs to guests.
|
|
72
|
+
*/
|
|
73
|
+
export declare function rewriteImmutableAssetUrls(body: string, replace: (assetId: string, filename: string) => string): string;
|
|
74
|
+
/**
|
|
75
|
+
* Every immutable `/api/assets/{assetId}/{filename}` reference embedded in a
|
|
76
|
+
* body, de-duplicated by `{assetId}/{filename}`. Uses the SAME grammar as
|
|
77
|
+
* `rewriteImmutableAssetUrls` (the public share read rewrites exactly these
|
|
78
|
+
* URLs), so the public asset handler can scope itself to the assets a shared
|
|
79
|
+
* entry actually embeds — not every asset that merely shares its repo. Legacy
|
|
80
|
+
* three-segment URLs and `![[transclusions]]` are intentionally ignored, the
|
|
81
|
+
* same way the rewrite leaves them untouched.
|
|
82
|
+
*/
|
|
83
|
+
export declare function extractImmutableAssetRefs(body: string): Array<{
|
|
84
|
+
assetId: string;
|
|
85
|
+
filename: string;
|
|
86
|
+
}>;
|
|
87
|
+
/**
|
|
88
|
+
* Every immutable assetId an entity embeds — in its markdown `body` OR any
|
|
89
|
+
* string frontmatter value (e.g. a `thumbnail` / `link` url, or an array of
|
|
90
|
+
* urls). De-duplicated. This is the single definition of "what assets does this
|
|
91
|
+
* entry embed", shared by the caption fold (`VectorService.resolveEmbeddedCaptions`,
|
|
92
|
+
* which reads each embedded image's caption into the entry's search text) and
|
|
93
|
+
* the caption sweep's embedder re-index — so the two never disagree on coverage.
|
|
94
|
+
* A cheap substring pre-check skips the regex for the common no-asset entry.
|
|
95
|
+
*/
|
|
96
|
+
export declare function embeddedAssetIds(body: string, frontmatter: Record<string, unknown>): Set<string>;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asset-embed extraction + diffing.
|
|
3
|
+
*
|
|
4
|
+
* Entry bodies reference binary assets two ways:
|
|
5
|
+
* - Obsidian-style transclusion embeds: ![[Foo.png]] / ![[Foo.png|alt]]
|
|
6
|
+
* - Standard markdown images: 
|
|
7
|
+
*
|
|
8
|
+
* Asset *binaries* live outside git (the workspace `.studiograph/assets/`
|
|
9
|
+
* tree for the local backend, or Cloudflare R2), so git history can only ever
|
|
10
|
+
* recover the *reference* — the embed text in the body, not the bytes. These
|
|
11
|
+
* helpers let the write path detect when a whole-body rewrite would drop a
|
|
12
|
+
* reference the prior body had, and let the history tools report which embeds
|
|
13
|
+
* exist at a given revision.
|
|
14
|
+
*
|
|
15
|
+
* Callers pass the markdown body (post-frontmatter). Embed syntax is a body
|
|
16
|
+
* construct; frontmatter is not scanned.
|
|
17
|
+
*/
|
|
18
|
+
// ![[target]] or ![[target|alias]] — capture the target (pre-pipe).
|
|
19
|
+
const TRANSCLUSION_RE = /!\[\[([^\]|]+)(?:\|[^\]]*)?\]\]/g;
|
|
20
|
+
//  — capture the url. Stops at the first closing paren; asset
|
|
21
|
+
// embed URLs in this app never contain parens.
|
|
22
|
+
const MARKDOWN_IMAGE_RE = /!\[[^\]]*\]\(([^)]+)\)/g;
|
|
23
|
+
/**
|
|
24
|
+
* Extract every embedded asset reference from a markdown body,
|
|
25
|
+
* de-duplicated, transclusions first then markdown images. Returns the raw
|
|
26
|
+
* target (transclusion target or image URL) so callers can compare
|
|
27
|
+
* references across revisions and surface them to users/agents.
|
|
28
|
+
*/
|
|
29
|
+
export function extractAssetEmbeds(body) {
|
|
30
|
+
if (!body)
|
|
31
|
+
return [];
|
|
32
|
+
const out = [];
|
|
33
|
+
const seen = new Set();
|
|
34
|
+
const push = (ref) => {
|
|
35
|
+
const trimmed = ref.trim();
|
|
36
|
+
if (!trimmed || seen.has(trimmed))
|
|
37
|
+
return;
|
|
38
|
+
seen.add(trimmed);
|
|
39
|
+
out.push(trimmed);
|
|
40
|
+
};
|
|
41
|
+
let m;
|
|
42
|
+
TRANSCLUSION_RE.lastIndex = 0;
|
|
43
|
+
while ((m = TRANSCLUSION_RE.exec(body)) !== null)
|
|
44
|
+
push(m[1]);
|
|
45
|
+
MARKDOWN_IMAGE_RE.lastIndex = 0;
|
|
46
|
+
while ((m = MARKDOWN_IMAGE_RE.exec(body)) !== null)
|
|
47
|
+
push(m[1]);
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The canonical, render-safe markdown embed for an asset: ``.
|
|
52
|
+
* This is exactly what the editor inserts on drop/paste
|
|
53
|
+
* (web FormattingPalette), so any agent-placed embed that uses this form is
|
|
54
|
+
* guaranteed to render. Agents must NOT invent `![[filename]]` transclusion
|
|
55
|
+
* placeholders — those don't resolve to a stored asset and render as dead text.
|
|
56
|
+
*/
|
|
57
|
+
export function assetEmbed(filename, url) {
|
|
58
|
+
return ``;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Derive a human display name from a filename: drop the extension, turn
|
|
62
|
+
* `_`/`-` runs into spaces, and Title-Case each word
|
|
63
|
+
* (`haneya_sake.jpg` → `Haneya Sake`). Shared by every free-standing-asset
|
|
64
|
+
* creation path (manager upload, presign finalize, chat-image promote) so the
|
|
65
|
+
* label rule never drifts. Returns "" for an extension-only name; callers add
|
|
66
|
+
* their own fallback (filename / assetId).
|
|
67
|
+
*/
|
|
68
|
+
export function deriveAssetDisplayName(filename) {
|
|
69
|
+
const stem = filename.replace(/\.[^.]+$/, '');
|
|
70
|
+
return stem.replace(/[_-]+/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase());
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* References present in `before` but absent from `after` — i.e. embeds a
|
|
74
|
+
* body rewrite would drop. Set semantics on the raw reference string.
|
|
75
|
+
*/
|
|
76
|
+
export function droppedAssetEmbeds(before, after) {
|
|
77
|
+
const beforeRefs = extractAssetEmbeds(before);
|
|
78
|
+
if (beforeRefs.length === 0)
|
|
79
|
+
return [];
|
|
80
|
+
const afterRefs = new Set(extractAssetEmbeds(after));
|
|
81
|
+
return beforeRefs.filter((ref) => !afterRefs.has(ref));
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Strip a leading YAML frontmatter block (`---\n…\n---`) so embed extraction
|
|
85
|
+
* runs against the body only. Returns the input unchanged when there is no
|
|
86
|
+
* frontmatter. Mirrors the lightweight frontmatter sniff the history tools
|
|
87
|
+
* already use, avoiding a full markdown parse for a read-only report.
|
|
88
|
+
*/
|
|
89
|
+
export function stripFrontmatter(fileContent) {
|
|
90
|
+
return fileContent.replace(/^---\s*\n[\s\S]*?\n---\s*\n?/, '');
|
|
91
|
+
}
|
|
92
|
+
// Three path segments after /api/assets/ (type/id/filename). New-scheme URLs
|
|
93
|
+
// have only two (assetId/filename), so they never match — the migration is
|
|
94
|
+
// idempotent against already-rewritten content. Segments stop at the chars
|
|
95
|
+
// that terminate a URL in markdown/YAML: whitespace, ) " ' ]. The backslash is
|
|
96
|
+
// in the terminator set too: inside an artifact's JSON-bundle body a URL is
|
|
97
|
+
// serialized as `\"/api/assets/<type>/<id>/<file>\"`, so without it the filename
|
|
98
|
+
// group would greedily eat the trailing `\` (capturing `icon.png\`), the blob
|
|
99
|
+
// lookup would miss, and the migration would silently skip the embedded URL.
|
|
100
|
+
const LEGACY_ASSET_URL_RE = /\/api\/assets\/([^/\s)"'\\\]]+)\/([^/\s)"'\\\]]+)\/([^/\s)"'\\\]]+)/g;
|
|
101
|
+
/** Every legacy `/api/assets/{type}/{id}/{filename}` reference in a file,
|
|
102
|
+
* de-duplicated by URL. Pass the RAW file (frontmatter + body). */
|
|
103
|
+
export function extractLegacyAssetUrls(fileContent) {
|
|
104
|
+
if (!fileContent)
|
|
105
|
+
return [];
|
|
106
|
+
const out = [];
|
|
107
|
+
const seen = new Set();
|
|
108
|
+
let m;
|
|
109
|
+
LEGACY_ASSET_URL_RE.lastIndex = 0;
|
|
110
|
+
while ((m = LEGACY_ASSET_URL_RE.exec(fileContent)) !== null) {
|
|
111
|
+
const url = m[0];
|
|
112
|
+
if (seen.has(url))
|
|
113
|
+
continue;
|
|
114
|
+
seen.add(url);
|
|
115
|
+
out.push({ url, type: m[1], id: m[2], filename: m[3], oldKey: `${m[1]}/${m[2]}/${m[3]}` });
|
|
116
|
+
}
|
|
117
|
+
return out;
|
|
118
|
+
}
|
|
119
|
+
// ── Immutable-key asset URLs ──────────────────────────────────────────────
|
|
120
|
+
//
|
|
121
|
+
// New-scheme references have exactly two segments after /api/assets/:
|
|
122
|
+
// `{assetId}/{filename}`. Uses the SAME terminator set as LEGACY_ASSET_URL_RE
|
|
123
|
+
// (whitespace, ) " ' ] \) plus < > for raw HTML `src`, so both grammars classify
|
|
124
|
+
// URL boundaries identically. The backslash terminator matters for the share
|
|
125
|
+
// read + asset allowlist (share-api.ts), which run this grammar over ANY shared
|
|
126
|
+
// body — including an artifact's JSON bundle, where a 2-segment URL is serialized
|
|
127
|
+
// as `\"/api/assets/<assetId>/<file>\"`; without it the filename group eats the
|
|
128
|
+
// trailing `\` (→ `file.png\`), so the rewrite emits a wrong share URL and the
|
|
129
|
+
// embed-allowlist check fails the image closed. The trailing lookahead pins the
|
|
130
|
+
// match to two segments (filename is the last segment), so a three-segment legacy
|
|
131
|
+
// URL — whose second segment is followed by another `/` — never matches.
|
|
132
|
+
const IMMUTABLE_ASSET_URL_RE = /\/api\/assets\/([^/\s)"'\\\]<>]+)\/([^/\s)"'\\\]<>]+)(?=[\s)"'\\\]<>]|$)/g;
|
|
133
|
+
/**
|
|
134
|
+
* Rewrite every immutable `/api/assets/{assetId}/{filename}` reference in a
|
|
135
|
+
* body via `replace(assetId, filename)`. Legacy three-segment URLs and
|
|
136
|
+
* `![[transclusions]]` are left untouched. Used by the public share read to
|
|
137
|
+
* point embedded images at the token-scoped `/api/share/{token}/asset/...`
|
|
138
|
+
* surface without leaking the authed `/api/assets` URLs to guests.
|
|
139
|
+
*/
|
|
140
|
+
export function rewriteImmutableAssetUrls(body, replace) {
|
|
141
|
+
return body.replace(IMMUTABLE_ASSET_URL_RE, (_m, assetId, filename) => replace(assetId, filename));
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Every immutable `/api/assets/{assetId}/{filename}` reference embedded in a
|
|
145
|
+
* body, de-duplicated by `{assetId}/{filename}`. Uses the SAME grammar as
|
|
146
|
+
* `rewriteImmutableAssetUrls` (the public share read rewrites exactly these
|
|
147
|
+
* URLs), so the public asset handler can scope itself to the assets a shared
|
|
148
|
+
* entry actually embeds — not every asset that merely shares its repo. Legacy
|
|
149
|
+
* three-segment URLs and `![[transclusions]]` are intentionally ignored, the
|
|
150
|
+
* same way the rewrite leaves them untouched.
|
|
151
|
+
*/
|
|
152
|
+
export function extractImmutableAssetRefs(body) {
|
|
153
|
+
if (!body)
|
|
154
|
+
return [];
|
|
155
|
+
const out = [];
|
|
156
|
+
const seen = new Set();
|
|
157
|
+
let m;
|
|
158
|
+
IMMUTABLE_ASSET_URL_RE.lastIndex = 0;
|
|
159
|
+
while ((m = IMMUTABLE_ASSET_URL_RE.exec(body)) !== null) {
|
|
160
|
+
const key = `${m[1]}/${m[2]}`;
|
|
161
|
+
if (seen.has(key))
|
|
162
|
+
continue;
|
|
163
|
+
seen.add(key);
|
|
164
|
+
out.push({ assetId: m[1], filename: m[2] });
|
|
165
|
+
}
|
|
166
|
+
return out;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Every immutable assetId an entity embeds — in its markdown `body` OR any
|
|
170
|
+
* string frontmatter value (e.g. a `thumbnail` / `link` url, or an array of
|
|
171
|
+
* urls). De-duplicated. This is the single definition of "what assets does this
|
|
172
|
+
* entry embed", shared by the caption fold (`VectorService.resolveEmbeddedCaptions`,
|
|
173
|
+
* which reads each embedded image's caption into the entry's search text) and
|
|
174
|
+
* the caption sweep's embedder re-index — so the two never disagree on coverage.
|
|
175
|
+
* A cheap substring pre-check skips the regex for the common no-asset entry.
|
|
176
|
+
*/
|
|
177
|
+
export function embeddedAssetIds(body, frontmatter) {
|
|
178
|
+
const ids = new Set();
|
|
179
|
+
const scan = (s) => {
|
|
180
|
+
if (!s || s.indexOf('/api/assets/') === -1)
|
|
181
|
+
return;
|
|
182
|
+
for (const ref of extractImmutableAssetRefs(s))
|
|
183
|
+
ids.add(ref.assetId);
|
|
184
|
+
};
|
|
185
|
+
scan(body);
|
|
186
|
+
for (const v of Object.values(frontmatter)) {
|
|
187
|
+
if (typeof v === 'string')
|
|
188
|
+
scan(v);
|
|
189
|
+
else if (Array.isArray(v))
|
|
190
|
+
for (const x of v)
|
|
191
|
+
if (typeof x === 'string')
|
|
192
|
+
scan(x);
|
|
193
|
+
}
|
|
194
|
+
return ids;
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=embeds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embeds.js","sourceRoot":"","sources":["../../src/core/embeds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,oEAAoE;AACpE,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAC3D,yEAAyE;AACzE,+CAA+C;AAC/C,MAAM,iBAAiB,GAAG,yBAAyB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,EAAE;QAC3B,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;QAC3B,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YAAE,OAAO;QAC1C,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAClB,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;I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AM,UAAU,gBAAgB,CAAC,IAAY,EAAE,WAAoC;IACjF,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,MAAM,IAAI,GAAG,CAAC,CAAS,EAAQ,EAAE;QAC/B,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YAAE,OAAO;QACnD,KAAK,MAAM,GAAG,IAAI,yBAAyB,CAAC,CAAC,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACvE,CAAC,CAAC;IACF,IAAI,CAAC,IAAI,CAAC,CAAC;IACX,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QAC3C,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,IAAI,CAAC,CAAC,CAAC,CAAC;aAC9B,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YAAE,KAAK,MAAM,CAAC,IAAI,CAAC;gBAAE,IAAI,OAAO,CAAC,KAAK,QAAQ;oBAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in markdown body templates for each canonical entity type.
|
|
3
|
+
*
|
|
4
|
+
* Shared between:
|
|
5
|
+
* - `src/core/schema-registry.ts` — server-side default-body lookup
|
|
6
|
+
* - `web/src/lib/components/layout/Sidebar.svelte` — New Entry picker
|
|
7
|
+
*
|
|
8
|
+
* Previously the Sidebar shipped its own copy of this map, which drifted
|
|
9
|
+
* from the server version (e.g. `deck:` was briefly slides-renderer
|
|
10
|
+
* markup on the frontend while the server had a renderer-agnostic
|
|
11
|
+
* outline). Keeping one source avoids that trap.
|
|
12
|
+
*
|
|
13
|
+
* Pure data, no runtime deps — safe to import from the web bundle via
|
|
14
|
+
* the `@core/entity-body-templates` alias.
|
|
15
|
+
*/
|
|
16
|
+
export declare const BUILTIN_BODY_TEMPLATES: Record<string, string>;
|
|
17
|
+
/**
|
|
18
|
+
* Look up the default body template for a canonical type.
|
|
19
|
+
* Returns null when the type has no template (e.g. `note`).
|
|
20
|
+
*/
|
|
21
|
+
export declare function getBuiltinBodyTemplate(entityType: string): string | null;
|