agor-live 0.21.2 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/admin/add-to-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/add-to-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/add-to-branch-group.js +133 -33
- package/dist/cli/commands/admin/create-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/create-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/create-branch-group.js +132 -38
- package/dist/cli/commands/admin/create-symlink.d.ts +2 -14
- package/dist/cli/commands/admin/create-symlink.d.ts.map +1 -1
- package/dist/cli/commands/admin/create-symlink.js +138 -61
- package/dist/cli/commands/admin/delete-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/delete-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/delete-branch-group.js +132 -28
- package/dist/cli/commands/admin/delete-user.d.ts +2 -13
- package/dist/cli/commands/admin/delete-user.d.ts.map +1 -1
- package/dist/cli/commands/admin/delete-user.js +132 -38
- package/dist/cli/commands/admin/ensure-user.d.ts +2 -14
- package/dist/cli/commands/admin/ensure-user.d.ts.map +1 -1
- package/dist/cli/commands/admin/ensure-user.js +131 -46
- package/dist/cli/commands/admin/remove-from-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/remove-from-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/remove-from-branch-group.js +133 -33
- package/dist/cli/commands/admin/remove-symlink.d.ts +2 -14
- package/dist/cli/commands/admin/remove-symlink.d.ts.map +1 -1
- package/dist/cli/commands/admin/remove-symlink.js +136 -49
- package/dist/cli/commands/admin/scrub-git-remotes.d.ts +2 -2
- package/dist/cli/commands/admin/scrub-git-remotes.d.ts.map +1 -1
- package/dist/cli/commands/admin/scrub-git-remotes.js +128 -86
- package/dist/cli/commands/admin/sync-user-symlinks.d.ts +2 -14
- package/dist/cli/commands/admin/sync-user-symlinks.d.ts.map +1 -1
- package/dist/cli/commands/admin/sync-user-symlinks.js +132 -43
- package/dist/cli/commands/auth/whoami.d.ts.map +1 -1
- package/dist/cli/commands/auth/whoami.js +2 -1
- package/dist/cli/commands/branch/env/request.test.d.ts +2 -0
- package/dist/cli/commands/branch/env/request.test.d.ts.map +1 -0
- package/dist/cli/commands/branch/env/request.test.js +17723 -0
- package/dist/cli/commands/branch/env/restart.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/restart.js +8 -2
- package/dist/cli/commands/branch/env/start.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/start.js +8 -2
- package/dist/cli/commands/branch/env/stop.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/stop.js +8 -2
- package/dist/cli/commands/daemon/status.d.ts.map +1 -1
- package/dist/cli/commands/daemon/status.js +2 -1
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +140 -2
- package/dist/cli/commands/local/add-to-branch-group.d.ts +13 -0
- package/dist/cli/commands/local/add-to-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/add-to-branch-group.js +37 -0
- package/dist/cli/commands/local/create-branch-group.d.ts +12 -0
- package/dist/cli/commands/local/create-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/create-branch-group.js +35 -0
- package/dist/cli/commands/local/create-symlink.d.ts +14 -0
- package/dist/cli/commands/local/create-symlink.d.ts.map +1 -0
- package/dist/cli/commands/local/create-symlink.js +45 -0
- package/dist/cli/commands/{daemon → local/daemon}/sync.d.ts +1 -1
- package/dist/cli/commands/local/daemon/sync.d.ts.map +1 -0
- package/dist/cli/commands/{daemon → local/daemon}/sync.js +7 -6
- package/dist/cli/commands/local/delete-branch-group.d.ts +12 -0
- package/dist/cli/commands/local/delete-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/delete-branch-group.js +35 -0
- package/dist/cli/commands/local/delete-user.d.ts +12 -0
- package/dist/cli/commands/local/delete-user.d.ts.map +1 -0
- package/dist/cli/commands/local/delete-user.js +36 -0
- package/dist/cli/commands/local/ensure-user.d.ts +12 -0
- package/dist/cli/commands/local/ensure-user.d.ts.map +1 -0
- package/dist/cli/commands/local/ensure-user.js +41 -0
- package/dist/cli/commands/local/remove-from-branch-group.d.ts +13 -0
- package/dist/cli/commands/local/remove-from-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/remove-from-branch-group.js +37 -0
- package/dist/cli/commands/local/remove-symlink.d.ts +13 -0
- package/dist/cli/commands/local/remove-symlink.d.ts.map +1 -0
- package/dist/cli/commands/local/remove-symlink.js +39 -0
- package/dist/cli/commands/local/scrub-git-remotes.d.ts +9 -0
- package/dist/cli/commands/local/scrub-git-remotes.d.ts.map +1 -0
- package/dist/cli/commands/local/scrub-git-remotes.js +23 -0
- package/dist/cli/commands/{admin → local}/sync-unix.d.ts.map +1 -1
- package/dist/cli/commands/{admin → local}/sync-unix.js +3 -3
- package/dist/cli/commands/local/sync-user-symlinks.d.ts +12 -0
- package/dist/cli/commands/local/sync-user-symlinks.d.ts.map +1 -0
- package/dist/cli/commands/local/sync-user-symlinks.js +37 -0
- package/dist/cli/commands/telemetry/index.d.ts +7 -0
- package/dist/cli/commands/telemetry/index.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/index.js +40 -0
- package/dist/cli/commands/telemetry/off.d.ts +6 -0
- package/dist/cli/commands/telemetry/off.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/off.js +35 -0
- package/dist/cli/commands/telemetry/on.d.ts +6 -0
- package/dist/cli/commands/telemetry/on.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/on.js +37 -0
- package/dist/cli/commands/telemetry/test.d.ts +6 -0
- package/dist/cli/commands/telemetry/test.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/test.js +56 -0
- package/dist/cli/commands/user/create-admin.d.ts.map +1 -1
- package/dist/cli/commands/user/create-admin.js +81 -72
- package/dist/cli/commands/user/list.d.ts.map +1 -1
- package/dist/cli/commands/user/list.js +1 -0
- package/dist/cli/commands/whoami.js +2 -1
- package/dist/cli/lib/branch-environment-action.d.ts +21 -0
- package/dist/cli/lib/branch-environment-action.d.ts.map +1 -0
- package/dist/cli/lib/branch-environment-action.js +8 -0
- package/dist/core/api/index.cjs +12 -3
- package/dist/core/api/index.d.ts +16 -2
- package/dist/core/api/index.d.ts.map +1 -1
- package/dist/core/api/index.js +12 -3
- package/dist/core/claude/index.cjs +634 -81
- package/dist/core/claude/index.js +631 -80
- package/dist/core/claude-cli/index.cjs +11 -0
- package/dist/core/claude-cli/index.js +11 -0
- package/dist/core/claude-cli/pricing.d.ts.map +1 -1
- package/dist/core/client/index.cjs +78 -10
- package/dist/core/client/index.js +69 -10
- package/dist/core/config/browser.cjs +5 -7
- package/dist/core/config/browser.js +5 -7
- package/dist/core/config/config-manager.d.ts +33 -13
- package/dist/core/config/config-manager.d.ts.map +1 -1
- package/dist/core/config/constants.d.ts +1 -1
- package/dist/core/config/index.cjs +4277 -4391
- package/dist/core/config/index.d.ts +1 -0
- package/dist/core/config/index.d.ts.map +1 -1
- package/dist/core/config/index.js +4299 -4433
- package/dist/core/config/key-resolver.d.ts.map +1 -1
- package/dist/core/config/multitenancy.d.ts +33 -0
- package/dist/core/config/multitenancy.d.ts.map +1 -0
- package/dist/core/config/security-resolver.d.ts +1 -0
- package/dist/core/config/security-resolver.d.ts.map +1 -1
- package/dist/core/config/types.d.ts +75 -4
- package/dist/core/config/types.d.ts.map +1 -1
- package/dist/core/db/client.d.ts +34 -2
- package/dist/core/db/client.d.ts.map +1 -1
- package/dist/core/db/database-wrapper.d.ts.map +1 -1
- package/dist/core/db/first-run-bootstrap.d.ts.map +1 -1
- package/dist/core/db/index.cjs +2765 -1018
- package/dist/core/db/index.d.ts +2 -1
- package/dist/core/db/index.d.ts.map +1 -1
- package/dist/core/db/index.js +2612 -895
- package/dist/core/db/migrate.d.ts.map +1 -1
- package/dist/core/db/repositories/artifacts.d.ts +27 -2
- package/dist/core/db/repositories/artifacts.d.ts.map +1 -1
- package/dist/core/db/repositories/base.d.ts +18 -0
- package/dist/core/db/repositories/base.d.ts.map +1 -1
- package/dist/core/db/repositories/board-comments.d.ts +17 -1
- package/dist/core/db/repositories/board-comments.d.ts.map +1 -1
- package/dist/core/db/repositories/board-objects.d.ts.map +1 -1
- package/dist/core/db/repositories/boards.d.ts +28 -4
- package/dist/core/db/repositories/boards.d.ts.map +1 -1
- package/dist/core/db/repositories/branch-access.d.ts +32 -0
- package/dist/core/db/repositories/branch-access.d.ts.map +1 -1
- package/dist/core/db/repositories/branches.d.ts +54 -2
- package/dist/core/db/repositories/branches.d.ts.map +1 -1
- package/dist/core/db/repositories/cards.d.ts +15 -1
- package/dist/core/db/repositories/cards.d.ts.map +1 -1
- package/dist/core/db/repositories/gateway-channels.d.ts.map +1 -1
- package/dist/core/db/repositories/gateway-outbound-messages.d.ts +19 -0
- package/dist/core/db/repositories/gateway-outbound-messages.d.ts.map +1 -0
- package/dist/core/db/repositories/index.d.ts +3 -0
- package/dist/core/db/repositories/index.d.ts.map +1 -1
- package/dist/core/db/repositories/messages.d.ts +9 -2
- package/dist/core/db/repositories/messages.d.ts.map +1 -1
- package/dist/core/db/repositories/repos.d.ts.map +1 -1
- package/dist/core/db/repositories/schedules.d.ts +12 -1
- package/dist/core/db/repositories/schedules.d.ts.map +1 -1
- package/dist/core/db/repositories/session-relationships.d.ts +30 -0
- package/dist/core/db/repositories/session-relationships.d.ts.map +1 -0
- package/dist/core/db/repositories/sessions.d.ts +49 -5
- package/dist/core/db/repositories/sessions.d.ts.map +1 -1
- package/dist/core/db/repositories/tasks.d.ts +7 -2
- package/dist/core/db/repositories/tasks.d.ts.map +1 -1
- package/dist/core/db/repositories/user-api-keys.d.ts +10 -1
- package/dist/core/db/repositories/user-api-keys.d.ts.map +1 -1
- package/dist/core/db/repositories/users.d.ts +18 -7
- package/dist/core/db/repositories/users.d.ts.map +1 -1
- package/dist/core/db/schema.d.ts +2605 -766
- package/dist/core/db/schema.d.ts.map +1 -1
- package/dist/core/db/schema.postgres.d.ts +1318 -49
- package/dist/core/db/schema.postgres.d.ts.map +1 -1
- package/dist/core/db/schema.sqlite.d.ts +667 -45
- package/dist/core/db/schema.sqlite.d.ts.map +1 -1
- package/dist/core/db/tenant-context.d.ts +26 -0
- package/dist/core/db/tenant-context.d.ts.map +1 -0
- package/dist/core/db/tenant-scope.d.ts +31 -0
- package/dist/core/db/tenant-scope.d.ts.map +1 -0
- package/dist/core/db/user-utils.d.ts +2 -2
- package/dist/core/db/user-utils.d.ts.map +1 -1
- package/dist/core/drizzle/postgres/0050_artifact_source_session.sql +3 -0
- package/dist/core/drizzle/postgres/0051_session_relationships.sql +26 -0
- package/dist/core/drizzle/postgres/0052_gateway_outbound_messages.sql +45 -0
- package/dist/core/drizzle/postgres/0053_user_token_invalidation.sql +1 -0
- package/dist/core/drizzle/postgres/0054_app_level_multitenancy.sql +219 -0
- package/dist/core/drizzle/postgres/0055_app_level_multitenancy_rls.sql +411 -0
- package/dist/core/drizzle/postgres/0056_composite_indexes.sql +15 -0
- package/dist/core/drizzle/postgres/0057_message_timestamp_indexes.sql +3 -0
- package/dist/core/drizzle/postgres/meta/_journal.json +56 -0
- package/dist/core/drizzle/sqlite/0059_artifact_source_session.sql +2 -0
- package/dist/core/drizzle/sqlite/0060_session_relationships.sql +23 -0
- package/dist/core/drizzle/sqlite/0061_gateway_outbound_messages.sql +38 -0
- package/dist/core/drizzle/sqlite/0062_user_token_invalidation.sql +1 -0
- package/dist/core/drizzle/sqlite/0063_composite_indexes.sql +10 -0
- package/dist/core/drizzle/sqlite/0064_message_timestamp_indexes.sql +2 -0
- package/dist/core/drizzle/sqlite/meta/_journal.json +42 -0
- package/dist/core/environment/render-snapshot.cjs +1 -4
- package/dist/core/environment/render-snapshot.js +1 -4
- package/dist/core/environment/webhook.cjs +1 -4
- package/dist/core/environment/webhook.js +1 -4
- package/dist/core/gateway/connector-registry.d.ts.map +1 -1
- package/dist/core/gateway/connector.d.ts +32 -1
- package/dist/core/gateway/connector.d.ts.map +1 -1
- package/dist/core/gateway/connectors/slack-manifest.cjs +108 -0
- package/dist/core/gateway/connectors/slack-manifest.d.ts +85 -0
- package/dist/core/gateway/connectors/slack-manifest.d.ts.map +1 -0
- package/dist/core/gateway/connectors/slack-manifest.js +81 -0
- package/dist/core/gateway/connectors/slack.d.ts +136 -7
- package/dist/core/gateway/connectors/slack.d.ts.map +1 -1
- package/dist/core/gateway/connectors/teams.d.ts +107 -0
- package/dist/core/gateway/connectors/teams.d.ts.map +1 -0
- package/dist/core/gateway/context.d.ts.map +1 -1
- package/dist/core/gateway/index.cjs +1044 -78
- package/dist/core/gateway/index.d.ts +6 -2
- package/dist/core/gateway/index.d.ts.map +1 -1
- package/dist/core/gateway/index.js +1031 -77
- package/dist/core/gateway/system-message.d.ts +21 -0
- package/dist/core/gateway/system-message.d.ts.map +1 -1
- package/dist/core/git/exec.cjs +24 -0
- package/dist/core/git/exec.d.ts +6 -4
- package/dist/core/git/exec.d.ts.map +1 -1
- package/dist/core/git/exec.js +2 -0
- package/dist/core/git/index.cjs +3 -1363
- package/dist/core/git/index.d.ts +4 -614
- package/dist/core/git/index.d.ts.map +1 -1
- package/dist/core/git/index.js +1 -1304
- package/dist/core/git/pure.cjs +24 -0
- package/dist/core/git/pure.d.ts +2 -27
- package/dist/core/git/pure.d.ts.map +1 -1
- package/dist/core/git/pure.js +2 -0
- package/dist/core/index.cjs +11268 -10246
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +11703 -10179
- package/dist/core/lib/feathers-validation.cjs +6 -1
- package/dist/core/lib/feathers-validation.d.ts +1 -0
- package/dist/core/lib/feathers-validation.d.ts.map +1 -1
- package/dist/core/lib/feathers-validation.js +6 -1
- package/dist/core/local-actions/git-remotes.d.ts +7 -0
- package/dist/core/local-actions/git-remotes.d.ts.map +1 -0
- package/dist/core/local-actions/index.cjs +7941 -0
- package/dist/core/local-actions/index.d.ts +6 -0
- package/dist/core/local-actions/index.d.ts.map +1 -0
- package/dist/core/local-actions/index.js +7943 -0
- package/dist/core/local-actions/symlinks.d.ts +20 -0
- package/dist/core/local-actions/symlinks.d.ts.map +1 -0
- package/dist/core/local-actions/types.d.ts +14 -0
- package/dist/core/local-actions/types.d.ts.map +1 -0
- package/dist/core/local-actions/unix-groups.d.ts +16 -0
- package/dist/core/local-actions/unix-groups.d.ts.map +1 -0
- package/dist/core/local-actions/unix-users.d.ts +12 -0
- package/dist/core/local-actions/unix-users.d.ts.map +1 -0
- package/dist/core/mcp/index.cjs +498 -34
- package/dist/core/mcp/index.js +497 -33
- package/dist/core/mcp/template-resolver.d.ts.map +1 -1
- package/dist/core/models/browser.cjs +148 -25
- package/dist/core/models/browser.js +144 -25
- package/dist/core/models/claude.d.ts +2 -2
- package/dist/core/models/claude.d.ts.map +1 -1
- package/dist/core/models/codex.d.ts +205 -21
- package/dist/core/models/codex.d.ts.map +1 -1
- package/dist/core/models/index.cjs +148 -25
- package/dist/core/models/index.js +144 -25
- package/dist/core/package.json +24 -0
- package/dist/core/seed/demo-fixtures.d.ts +87 -0
- package/dist/core/seed/demo-fixtures.d.ts.map +1 -0
- package/dist/core/seed/dev-fixtures.d.ts.map +1 -1
- package/dist/core/seed/index.cjs +8785 -5563
- package/dist/core/seed/index.d.ts +1 -0
- package/dist/core/seed/index.d.ts.map +1 -1
- package/dist/core/seed/index.js +8787 -5570
- package/dist/core/sessions/index.cjs +129 -24
- package/dist/core/sessions/index.js +129 -24
- package/dist/core/telemetry/index.cjs +361 -0
- package/dist/core/telemetry/index.d.ts +5 -0
- package/dist/core/telemetry/index.d.ts.map +1 -0
- package/dist/core/telemetry/index.js +315 -0
- package/dist/core/telemetry/logger.d.ts +44 -0
- package/dist/core/telemetry/logger.d.ts.map +1 -0
- package/dist/core/telemetry/model-normalization.d.ts +3 -0
- package/dist/core/telemetry/model-normalization.d.ts.map +1 -0
- package/dist/core/telemetry/types.d.ts +47 -0
- package/dist/core/telemetry/types.d.ts.map +1 -0
- package/dist/core/telemetry/version.d.ts +9 -0
- package/dist/core/telemetry/version.d.ts.map +1 -0
- package/dist/core/templates/agor-system-prompt.md +22 -53
- package/dist/core/templates/session-context.cjs +2 -73
- package/dist/core/templates/session-context.d.ts +9 -53
- package/dist/core/templates/session-context.d.ts.map +1 -1
- package/dist/core/templates/session-context.js +2 -72
- package/dist/core/tools/mcp/jwt-auth.cjs +2 -20
- package/dist/core/tools/mcp/jwt-auth.d.ts.map +1 -1
- package/dist/core/tools/mcp/jwt-auth.js +2 -20
- package/dist/core/tools/mcp/oauth-mcp-transport.cjs +2 -15
- package/dist/core/tools/mcp/oauth-mcp-transport.d.ts.map +1 -1
- package/dist/core/tools/mcp/oauth-mcp-transport.js +2 -15
- package/dist/core/tools/mcp/oauth-refresh.cjs +684 -106
- package/dist/core/tools/mcp/oauth-refresh.js +682 -107
- package/dist/core/types/artifact.d.ts +5 -1
- package/dist/core/types/artifact.d.ts.map +1 -1
- package/dist/core/types/board.d.ts +2 -0
- package/dist/core/types/board.d.ts.map +1 -1
- package/dist/core/types/branch.d.ts +27 -0
- package/dist/core/types/branch.d.ts.map +1 -1
- package/dist/core/types/config-services.d.ts.map +1 -1
- package/dist/core/types/feathers.d.ts +6 -0
- package/dist/core/types/feathers.d.ts.map +1 -1
- package/dist/core/types/gateway.d.ts +77 -2
- package/dist/core/types/gateway.d.ts.map +1 -1
- package/dist/core/types/id.d.ts +1 -0
- package/dist/core/types/id.d.ts.map +1 -1
- package/dist/core/types/index.cjs +61 -0
- package/dist/core/types/index.d.ts +1 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/index.js +52 -0
- package/dist/core/types/schedule.d.ts +4 -3
- package/dist/core/types/schedule.d.ts.map +1 -1
- package/dist/core/types/session.d.ts +72 -2
- package/dist/core/types/session.d.ts.map +1 -1
- package/dist/core/types/task.d.ts +9 -0
- package/dist/core/types/task.d.ts.map +1 -1
- package/dist/core/types/tenant.d.ts +15 -0
- package/dist/core/types/tenant.d.ts.map +1 -0
- package/dist/core/types/user.d.ts +61 -0
- package/dist/core/types/user.d.ts.map +1 -1
- package/dist/core/unix/index.cjs +1367 -669
- package/dist/core/unix/index.js +1330 -634
- package/dist/core/unix/unix-integration-service.d.ts +10 -7
- package/dist/core/unix/unix-integration-service.d.ts.map +1 -1
- package/dist/core/utils/emoji-shortcodes.d.ts +13 -0
- package/dist/core/utils/emoji-shortcodes.d.ts.map +1 -0
- package/dist/core/utils/permission-mode-mapper.cjs +19 -0
- package/dist/core/utils/permission-mode-mapper.js +19 -0
- package/dist/core/yaml/index.cjs +8 -8
- package/dist/core/yaml/index.d.ts +1 -1
- package/dist/core/yaml/index.d.ts.map +1 -1
- package/dist/core/yaml/index.js +7 -7
- package/dist/daemon/adapters/drizzle.d.ts +26 -4
- package/dist/daemon/adapters/drizzle.d.ts.map +1 -1
- package/dist/daemon/adapters/drizzle.js +68 -7
- package/dist/daemon/auth/api-key-strategy.js +1 -1
- package/dist/daemon/auth/executor-runtime-scope.d.ts.map +1 -1
- package/dist/daemon/auth/executor-runtime-scope.js +19 -5
- package/dist/daemon/auth/launch-auth.d.ts +5 -4
- package/dist/daemon/auth/launch-auth.d.ts.map +1 -1
- package/dist/daemon/auth/launch-auth.js +123 -39
- package/dist/daemon/auth/refresh-token-service.d.ts +22 -0
- package/dist/daemon/auth/refresh-token-service.d.ts.map +1 -0
- package/dist/daemon/auth/refresh-token-service.js +133 -0
- package/dist/daemon/auth/runtime-tokens.d.ts +3 -1
- package/dist/daemon/auth/runtime-tokens.d.ts.map +1 -1
- package/dist/daemon/auth/runtime-tokens.js +17 -4
- package/dist/daemon/auth/service-jwt-strategy.d.ts +2 -1
- package/dist/daemon/auth/service-jwt-strategy.d.ts.map +1 -1
- package/dist/daemon/auth/service-jwt-strategy.js +127 -1
- package/dist/daemon/auth/token-invalidation.d.ts +11 -0
- package/dist/daemon/auth/token-invalidation.d.ts.map +1 -0
- package/dist/daemon/auth/token-invalidation.js +38 -0
- package/dist/daemon/auth/user-redaction.d.ts +12 -0
- package/dist/daemon/auth/user-redaction.d.ts.map +1 -0
- package/dist/daemon/auth/user-redaction.js +13 -0
- package/dist/daemon/declarations.d.ts +8 -1
- package/dist/daemon/declarations.d.ts.map +1 -1
- package/dist/daemon/hooks/gateway-route.d.ts.map +1 -1
- package/dist/daemon/hooks/gateway-route.js +69 -7
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +10429 -4408
- package/dist/daemon/knowledge/pgvector.d.ts +3 -3
- package/dist/daemon/knowledge/pgvector.d.ts.map +1 -1
- package/dist/daemon/knowledge/pgvector.js +24 -0
- package/dist/daemon/knowledge/units.d.ts +2 -2
- package/dist/daemon/knowledge/units.d.ts.map +1 -1
- package/dist/daemon/main.js +10429 -4408
- package/dist/daemon/mcp/server.d.ts +3 -3
- package/dist/daemon/mcp/server.d.ts.map +1 -1
- package/dist/daemon/mcp/server.js +1621 -87
- package/dist/daemon/mcp/tokens.d.ts +2 -2
- package/dist/daemon/mcp/tokens.d.ts.map +1 -1
- package/dist/daemon/mcp/tokens.js +5 -1
- package/dist/daemon/mcp/tool-registry.d.ts.map +1 -1
- package/dist/daemon/mcp/tool-registry.js +1 -0
- package/dist/daemon/mcp/tools/analytics.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/analytics.js +553 -29
- package/dist/daemon/mcp/tools/artifacts.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/artifacts.js +516 -25
- package/dist/daemon/mcp/tools/boards.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/boards.js +522 -26
- package/dist/daemon/mcp/tools/branches.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/branches.js +579 -55
- package/dist/daemon/mcp/tools/card-types.js +513 -23
- package/dist/daemon/mcp/tools/cards.js +513 -23
- package/dist/daemon/mcp/tools/environment.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/environment.js +534 -28
- package/dist/daemon/mcp/tools/gateway-channels.d.ts +4 -0
- package/dist/daemon/mcp/tools/gateway-channels.d.ts.map +1 -0
- package/dist/daemon/mcp/tools/gateway-channels.js +16035 -0
- package/dist/daemon/mcp/tools/knowledge.js +513 -23
- package/dist/daemon/mcp/tools/mcp-servers.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/mcp-servers.js +848 -23
- package/dist/daemon/mcp/tools/messages.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/messages.js +573 -37
- package/dist/daemon/mcp/tools/proxies.js +523 -25
- package/dist/daemon/mcp/tools/repos.js +513 -23
- package/dist/daemon/mcp/tools/schedules.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/schedules.js +516 -24
- package/dist/daemon/mcp/tools/search.js +513 -23
- package/dist/daemon/mcp/tools/sessions.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/sessions.js +660 -33
- package/dist/daemon/mcp/tools/tasks.js +513 -23
- package/dist/daemon/mcp/tools/users.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/users.js +532 -28
- package/dist/daemon/mcp/tools/widgets.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/widgets.js +542 -25
- package/dist/daemon/register-hooks.d.ts +8 -3
- package/dist/daemon/register-hooks.d.ts.map +1 -1
- package/dist/daemon/register-hooks.js +1146 -609
- package/dist/daemon/register-routes.d.ts +3 -2
- package/dist/daemon/register-routes.d.ts.map +1 -1
- package/dist/daemon/register-routes.js +2926 -829
- package/dist/daemon/register-services.d.ts +2 -2
- package/dist/daemon/register-services.d.ts.map +1 -1
- package/dist/daemon/register-services.js +4209 -1140
- package/dist/daemon/services/artifacts.d.ts +43 -6
- package/dist/daemon/services/artifacts.d.ts.map +1 -1
- package/dist/daemon/services/artifacts.js +134 -9
- package/dist/daemon/services/assistant-knowledge.d.ts +2 -2
- package/dist/daemon/services/assistant-knowledge.d.ts.map +1 -1
- package/dist/daemon/services/board-comments.d.ts +8 -5
- package/dist/daemon/services/board-comments.d.ts.map +1 -1
- package/dist/daemon/services/board-comments.js +78 -13
- package/dist/daemon/services/board-objects.d.ts +8 -5
- package/dist/daemon/services/board-objects.d.ts.map +1 -1
- package/dist/daemon/services/board-objects.js +14 -4
- package/dist/daemon/services/boards.d.ts +34 -5
- package/dist/daemon/services/boards.d.ts.map +1 -1
- package/dist/daemon/services/boards.js +116 -8
- package/dist/daemon/services/branch-owners.d.ts +3 -1
- package/dist/daemon/services/branch-owners.d.ts.map +1 -1
- package/dist/daemon/services/branch-owners.js +31 -4
- package/dist/daemon/services/branches.d.ts +39 -6
- package/dist/daemon/services/branches.d.ts.map +1 -1
- package/dist/daemon/services/branches.js +703 -210
- package/dist/daemon/services/card-types.d.ts +3 -3
- package/dist/daemon/services/card-types.d.ts.map +1 -1
- package/dist/daemon/services/card-types.js +68 -7
- package/dist/daemon/services/cards.d.ts +19 -4
- package/dist/daemon/services/cards.d.ts.map +1 -1
- package/dist/daemon/services/cards.js +92 -8
- package/dist/daemon/services/check-auth.d.ts +2 -2
- package/dist/daemon/services/check-auth.d.ts.map +1 -1
- package/dist/daemon/services/claude-cli-integration.d.ts +4 -1
- package/dist/daemon/services/claude-cli-integration.d.ts.map +1 -1
- package/dist/daemon/services/claude-cli-integration.js +117 -65
- package/dist/daemon/services/claude-models.d.ts +3 -3
- package/dist/daemon/services/claude-models.d.ts.map +1 -1
- package/dist/daemon/services/claude-models.js +1048 -397
- package/dist/daemon/services/config.d.ts +12 -4
- package/dist/daemon/services/config.d.ts.map +1 -1
- package/dist/daemon/services/config.js +39 -3
- package/dist/daemon/services/copilot-models.d.ts +3 -3
- package/dist/daemon/services/copilot-models.d.ts.map +1 -1
- package/dist/daemon/services/cursor-models.d.ts +3 -3
- package/dist/daemon/services/cursor-models.d.ts.map +1 -1
- package/dist/daemon/services/files.d.ts +3 -3
- package/dist/daemon/services/files.d.ts.map +1 -1
- package/dist/daemon/services/files.js +24 -5
- package/dist/daemon/services/gateway-channels-test.d.ts +24 -0
- package/dist/daemon/services/gateway-channels-test.d.ts.map +1 -0
- package/dist/daemon/services/gateway-channels-test.js +66 -0
- package/dist/daemon/services/gateway-channels.d.ts +3 -3
- package/dist/daemon/services/gateway-channels.d.ts.map +1 -1
- package/dist/daemon/services/gateway-channels.js +68 -7
- package/dist/daemon/services/gateway.d.ts +106 -5
- package/dist/daemon/services/gateway.d.ts.map +1 -1
- package/dist/daemon/services/gateway.js +1184 -95
- package/dist/daemon/services/github-app-setup.d.ts +3 -3
- package/dist/daemon/services/github-app-setup.d.ts.map +1 -1
- package/dist/daemon/services/groups.d.ts +7 -5
- package/dist/daemon/services/groups.d.ts.map +1 -1
- package/dist/daemon/services/groups.js +56 -0
- package/dist/daemon/services/health-monitor.d.ts +34 -2
- package/dist/daemon/services/health-monitor.d.ts.map +1 -1
- package/dist/daemon/services/health-monitor.js +145 -23
- package/dist/daemon/services/knowledge-document-edits.d.ts +3 -3
- package/dist/daemon/services/knowledge-document-edits.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-documents.d.ts +3 -3
- package/dist/daemon/services/knowledge-documents.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-documents.js +92 -7
- package/dist/daemon/services/knowledge-embedding-indexer.d.ts +7 -2
- package/dist/daemon/services/knowledge-embedding-indexer.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-embedding-indexer.js +37 -3
- package/dist/daemon/services/knowledge-graph.d.ts +3 -3
- package/dist/daemon/services/knowledge-graph.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-indexing.d.ts +3 -3
- package/dist/daemon/services/knowledge-indexing.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-namespaces.d.ts +3 -3
- package/dist/daemon/services/knowledge-namespaces.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-namespaces.js +72 -8
- package/dist/daemon/services/knowledge-reindex.d.ts +3 -3
- package/dist/daemon/services/knowledge-reindex.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-reindex.js +28 -1
- package/dist/daemon/services/knowledge-search.d.ts +3 -3
- package/dist/daemon/services/knowledge-search.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-settings.d.ts +3 -3
- package/dist/daemon/services/knowledge-settings.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-settings.js +24 -0
- package/dist/daemon/services/knowledge-versions.d.ts +3 -3
- package/dist/daemon/services/knowledge-versions.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-versions.js +68 -7
- package/dist/daemon/services/leaderboard.d.ts +14 -6
- package/dist/daemon/services/leaderboard.d.ts.map +1 -1
- package/dist/daemon/services/leaderboard.js +74 -15
- package/dist/daemon/services/local-actions.d.ts +13 -0
- package/dist/daemon/services/local-actions.d.ts.map +1 -0
- package/dist/daemon/services/local-actions.js +120 -0
- package/dist/daemon/services/mcp-servers.d.ts +3 -3
- package/dist/daemon/services/mcp-servers.d.ts.map +1 -1
- package/dist/daemon/services/mcp-servers.js +68 -13
- package/dist/daemon/services/messages.d.ts +10 -6
- package/dist/daemon/services/messages.d.ts.map +1 -1
- package/dist/daemon/services/messages.js +87 -7
- package/dist/daemon/services/repos.d.ts +6 -6
- package/dist/daemon/services/repos.d.ts.map +1 -1
- package/dist/daemon/services/repos.js +131 -32
- package/dist/daemon/services/scheduler.d.ts +23 -27
- package/dist/daemon/services/scheduler.d.ts.map +1 -1
- package/dist/daemon/services/scheduler.js +61 -30
- package/dist/daemon/services/schedules.d.ts +3 -3
- package/dist/daemon/services/schedules.d.ts.map +1 -1
- package/dist/daemon/services/schedules.js +68 -7
- package/dist/daemon/services/session-env-selections.d.ts +3 -3
- package/dist/daemon/services/session-env-selections.d.ts.map +1 -1
- package/dist/daemon/services/session-mcp-servers.d.ts +3 -3
- package/dist/daemon/services/session-mcp-servers.d.ts.map +1 -1
- package/dist/daemon/services/session-token-service.d.ts.map +1 -1
- package/dist/daemon/services/session-token-service.js +3 -0
- package/dist/daemon/services/sessions.d.ts +20 -8
- package/dist/daemon/services/sessions.d.ts.map +1 -1
- package/dist/daemon/services/sessions.js +211 -17
- package/dist/daemon/services/tasks.d.ts +24 -7
- package/dist/daemon/services/tasks.d.ts.map +1 -1
- package/dist/daemon/services/tasks.js +235 -59
- package/dist/daemon/services/terminals.d.ts +21 -3
- package/dist/daemon/services/terminals.d.ts.map +1 -1
- package/dist/daemon/services/terminals.js +81 -25
- package/dist/daemon/services/thread-session-map.d.ts +3 -3
- package/dist/daemon/services/thread-session-map.d.ts.map +1 -1
- package/dist/daemon/services/thread-session-map.js +68 -7
- package/dist/daemon/services/user-avatar-sync.d.ts +21 -0
- package/dist/daemon/services/user-avatar-sync.d.ts.map +1 -0
- package/dist/daemon/services/user-avatar-sync.js +267 -0
- package/dist/daemon/services/users.d.ts +29 -9
- package/dist/daemon/services/users.d.ts.map +1 -1
- package/dist/daemon/services/users.js +383 -30
- package/dist/daemon/services/zone-trigger.d.ts.map +1 -1
- package/dist/daemon/services/zone-trigger.js +17 -4
- package/dist/daemon/setup/build-info.d.ts +1 -1
- package/dist/daemon/setup/build-info.d.ts.map +1 -1
- package/dist/daemon/setup/build-info.js +5 -1
- package/dist/daemon/setup/database.d.ts +8 -3
- package/dist/daemon/setup/database.d.ts.map +1 -1
- package/dist/daemon/setup/database.js +26 -6
- package/dist/daemon/setup/first-run-admin.d.ts +2 -2
- package/dist/daemon/setup/first-run-admin.d.ts.map +1 -1
- package/dist/daemon/setup/index.js +97 -17
- package/dist/daemon/setup/socketio.d.ts +10 -1
- package/dist/daemon/setup/socketio.d.ts.map +1 -1
- package/dist/daemon/setup/socketio.js +68 -10
- package/dist/daemon/startup.d.ts +13 -2
- package/dist/daemon/startup.d.ts.map +1 -1
- package/dist/daemon/startup.js +354 -88
- package/dist/daemon/utils/append-system-message.d.ts +2 -2
- package/dist/daemon/utils/append-system-message.d.ts.map +1 -1
- package/dist/daemon/utils/apply-session-config-defaults.d.ts.map +1 -1
- package/dist/daemon/utils/apply-session-config-defaults.js +12 -1
- package/dist/daemon/utils/authorization.d.ts +3 -1
- package/dist/daemon/utils/authorization.d.ts.map +1 -1
- package/dist/daemon/utils/authorization.js +21 -6
- package/dist/daemon/utils/branch-authorization.d.ts +30 -0
- package/dist/daemon/utils/branch-authorization.d.ts.map +1 -1
- package/dist/daemon/utils/branch-authorization.js +63 -5
- package/dist/daemon/utils/branch-inspect.d.ts +1 -0
- package/dist/daemon/utils/branch-inspect.d.ts.map +1 -1
- package/dist/daemon/utils/branch-inspect.js +11 -3
- package/dist/daemon/utils/executor-read-impersonation.d.ts +2 -2
- package/dist/daemon/utils/executor-read-impersonation.d.ts.map +1 -1
- package/dist/daemon/utils/git-impersonation.d.ts +10 -10
- package/dist/daemon/utils/git-impersonation.d.ts.map +1 -1
- package/dist/daemon/utils/git-remote-credential-scan.d.ts +3 -3
- package/dist/daemon/utils/git-remote-credential-scan.d.ts.map +1 -1
- package/dist/daemon/utils/git-remote-credential-scan.js +6 -2
- package/dist/daemon/utils/mcp-token-authorization.d.ts +18 -13
- package/dist/daemon/utils/mcp-token-authorization.d.ts.map +1 -1
- package/dist/daemon/utils/mcp-token-authorization.js +11 -5
- package/dist/daemon/utils/open-source-telemetry-config.d.ts +6 -0
- package/dist/daemon/utils/open-source-telemetry-config.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-config.js +21 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.d.ts +7 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.js +15 -0
- package/dist/daemon/utils/open-source-telemetry-usage.d.ts +9 -0
- package/dist/daemon/utils/open-source-telemetry-usage.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-usage.js +121 -0
- package/dist/daemon/utils/realign-repo-origin.d.ts +3 -3
- package/dist/daemon/utils/realign-repo-origin.d.ts.map +1 -1
- package/dist/daemon/utils/realign-repo-origin.js +47 -16
- package/dist/daemon/utils/realtime-publish.d.ts +2 -0
- package/dist/daemon/utils/realtime-publish.d.ts.map +1 -1
- package/dist/daemon/utils/realtime-publish.js +51 -10
- package/dist/daemon/utils/session-state-hooks.d.ts +3 -3
- package/dist/daemon/utils/session-state-hooks.d.ts.map +1 -1
- package/dist/daemon/utils/session-stop.d.ts +43 -0
- package/dist/daemon/utils/session-stop.d.ts.map +1 -0
- package/dist/daemon/utils/session-stop.js +102 -0
- package/dist/daemon/utils/session-task-state.d.ts +7 -2
- package/dist/daemon/utils/session-task-state.d.ts.map +1 -1
- package/dist/daemon/utils/session-task-state.js +9 -3
- package/dist/daemon/utils/session-tasks.d.ts +4 -4
- package/dist/daemon/utils/session-tasks.d.ts.map +1 -1
- package/dist/daemon/utils/session-tasks.js +4 -8
- package/dist/daemon/utils/session-turn-lock.d.ts +8 -1
- package/dist/daemon/utils/session-turn-lock.d.ts.map +1 -1
- package/dist/daemon/utils/session-turn-lock.js +25 -2
- package/dist/daemon/utils/spawn-executor.d.ts +23 -1
- package/dist/daemon/utils/spawn-executor.d.ts.map +1 -1
- package/dist/daemon/utils/spawn-executor.js +34 -4
- package/dist/daemon/utils/tenant-db-scope.d.ts +20 -0
- package/dist/daemon/utils/tenant-db-scope.d.ts.map +1 -0
- package/dist/daemon/utils/tenant-db-scope.js +114 -0
- package/dist/daemon/utils/unix-group-init.d.ts +3 -3
- package/dist/daemon/utils/unix-group-init.d.ts.map +1 -1
- package/dist/daemon/utils/upload.d.ts +6 -9
- package/dist/daemon/utils/upload.d.ts.map +1 -1
- package/dist/daemon/utils/upload.js +30 -37
- package/dist/daemon/widgets/env-vars/index.d.ts +26 -1
- package/dist/daemon/widgets/env-vars/index.d.ts.map +1 -1
- package/dist/daemon/widgets/env-vars/index.js +145 -21
- package/dist/daemon/widgets/index.js +137 -21
- package/dist/executor/commands/environment.d.ts +13 -0
- package/dist/executor/commands/environment.d.ts.map +1 -0
- package/dist/executor/commands/environment.js +291 -0
- package/dist/executor/commands/git.js +1 -1
- package/dist/executor/commands/index.d.ts.map +1 -1
- package/dist/executor/commands/index.js +5 -1
- package/dist/executor/commands/unix.d.ts +8 -1
- package/dist/executor/commands/unix.d.ts.map +1 -1
- package/dist/executor/commands/unix.js +157 -2
- package/dist/executor/git/index.d.ts +8 -0
- package/dist/executor/git/index.d.ts.map +1 -0
- package/dist/executor/git/index.js +7 -0
- package/dist/executor/handlers/sdk/base-executor.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/base-executor.js +4 -1
- package/dist/executor/handlers/sdk/git-safe-directory.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/git-safe-directory.js +1 -1
- package/dist/executor/payload-types.d.ts +201 -5
- package/dist/executor/payload-types.d.ts.map +1 -1
- package/dist/executor/payload-types.js +98 -0
- package/dist/executor/sdk-handlers/base/diff-enrichment.js +1 -1
- package/dist/executor/sdk-handlers/base/mcp-scoping.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/base/mcp-scoping.js +14 -0
- package/dist/executor/sdk-handlers/claude/message-processor.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/message-processor.js +0 -1
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts +1 -0
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/query-builder.js +91 -39
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts +6 -10
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.js +12 -15
- package/dist/executor/sdk-handlers/codex/normalizer.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/normalizer.js +11 -1
- package/dist/executor/sdk-handlers/codex/pricing/litellm-openai-model-prices.json +3663 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.d.ts +31 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.d.ts.map +1 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.js +46 -0
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts +12 -5
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.js +133 -36
- package/dist/executor/sdk-handlers/codex/usage.d.ts +14 -23
- package/dist/executor/sdk-handlers/codex/usage.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/usage.js +18 -33
- package/dist/executor/sdk-handlers/copilot/prompt-service.d.ts +2 -4
- package/dist/executor/sdk-handlers/copilot/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/copilot/prompt-service.js +4 -13
- package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts +2 -4
- package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/prompt-service.js +4 -13
- package/dist/executor/services/feathers-client.js +5 -5
- package/dist/git/index.cjs +1101 -0
- package/dist/git/index.d.ts +533 -0
- package/dist/git/index.d.ts.map +1 -0
- package/dist/git/index.js +1022 -0
- package/dist/git/package.json +21 -0
- package/dist/git/pure.cjs +185 -0
- package/dist/git/pure.d.ts +39 -0
- package/dist/git/pure.d.ts.map +1 -0
- package/dist/git/pure.js +139 -0
- package/dist/ui/assets/AgorEmojiPickerInner-DQjr8M3_.js +1 -0
- package/dist/ui/assets/App-hJtcOxHv.js +5 -0
- package/dist/ui/assets/App-hJtcOxHv.js.gz +0 -0
- package/dist/ui/assets/AppNode-BhuMpn8O.js +1 -0
- package/dist/ui/assets/AppNode-BhuMpn8O.js.gz +0 -0
- package/dist/ui/assets/ArtifactConsentModal-oMMzRn8L.js +1 -0
- package/dist/ui/assets/ArtifactConsentModal-oMMzRn8L.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-B3wT8t8f.js +9 -0
- package/dist/ui/assets/ArtifactFullscreenPage-B3wT8t8f.js.gz +0 -0
- package/dist/ui/assets/ArtifactNode-BzQcrwFS.js +9 -0
- package/dist/ui/assets/ArtifactNode-BzQcrwFS.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-Dau-V_30.js +19 -0
- package/dist/ui/assets/AutocompleteTextarea-Dau-V_30.js.gz +0 -0
- package/dist/ui/assets/BoardObjectNodes-DdKWv_ZT.js +34 -0
- package/dist/ui/assets/BoardObjectNodes-DdKWv_ZT.js.gz +0 -0
- package/dist/ui/assets/CodeEditor.inner-Cuj6RuLL.js +7 -0
- package/dist/ui/assets/CodeEditor.inner-Cuj6RuLL.js.gz +0 -0
- package/dist/ui/assets/ConversationView-9-3ma1u-.js +1 -0
- package/dist/ui/assets/ConversationView-9-3ma1u-.js.gz +0 -0
- package/dist/ui/assets/EmbeddedTerminal-Lx5I9EOJ.js +2 -0
- package/dist/ui/assets/EmbeddedTerminal-Lx5I9EOJ.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-Dz8YAMYC.js +24 -0
- package/dist/ui/assets/KnowledgePage-Dz8YAMYC.js.gz +0 -0
- package/dist/ui/assets/MarketingScreenshotPage-9Qd7eZsm.css +1 -0
- package/dist/ui/assets/MarketingScreenshotPage-CmDPBHOl.js +143 -0
- package/dist/ui/assets/MarketingScreenshotPage-CmDPBHOl.js.gz +0 -0
- package/dist/ui/assets/MobileApp-BpgSG_gz.js +1 -0
- package/dist/ui/assets/MobileApp-BpgSG_gz.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-B6_mtlxK.js +13 -0
- package/dist/ui/assets/SessionCanvas-B6_mtlxK.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-Bh7Yg5dZ.css +1 -0
- package/dist/ui/assets/SessionCanvas-Bh7Yg5dZ.css.gz +0 -0
- package/dist/ui/assets/{StreamdownDemoPage-B9wbgp2s.js → StreamdownDemoPage-okKKR2QH.js} +2 -2
- package/dist/ui/assets/StreamdownDemoPage-okKKR2QH.js.gz +0 -0
- package/dist/ui/assets/TerminalModal-D9jMGZXv.js +2 -0
- package/dist/ui/assets/TerminalModal-D9jMGZXv.js.gz +0 -0
- package/dist/ui/assets/ThemeSwitcher-D9HgT37l.js +1 -0
- package/dist/ui/assets/ThemeSwitcher-D9HgT37l.js.gz +0 -0
- package/dist/ui/assets/ThemedSyntaxHighlighter.inner-C1FdIHn0.js +1 -0
- package/dist/ui/assets/antd-DT5ackd0.js +401 -0
- package/dist/ui/assets/antd-DT5ackd0.js.gz +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-DMnxkQRZ.js +1 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-DwTJGGoj.js +36 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-DwTJGGoj.js.gz +0 -0
- package/dist/ui/assets/{blockDiagram-VD42YOAC-CzGHAHao.js → blockDiagram-VD42YOAC-Dh1_TVW2.js} +4 -4
- package/dist/ui/assets/blockDiagram-VD42YOAC-Dh1_TVW2.js.gz +0 -0
- package/dist/ui/assets/{c4Diagram-YG6GDRKO-DscJyaWN.js → c4Diagram-YG6GDRKO-B1e96AcB.js} +2 -2
- package/dist/ui/assets/c4Diagram-YG6GDRKO-B1e96AcB.js.gz +0 -0
- package/dist/ui/assets/channel-Jv4dT4S5.js +1 -0
- package/dist/ui/assets/{chunk-4BX2VUAB-DoWpTvP8.js → chunk-4BX2VUAB-BODpCjJx.js} +1 -1
- package/dist/ui/assets/chunk-55IACEB6-lJXvUquf.js +1 -0
- package/dist/ui/assets/{chunk-ABZYJK2D-RzDCrjE6.js → chunk-ABZYJK2D-DCTXWSzV.js} +3 -3
- package/dist/ui/assets/chunk-ABZYJK2D-DCTXWSzV.js.gz +0 -0
- package/dist/ui/assets/{chunk-AGHRB4JF-jidCS5Of.js → chunk-AGHRB4JF-CbNphBjE.js} +1 -1
- package/dist/ui/assets/chunk-AGHRB4JF-CbNphBjE.js.gz +0 -0
- package/dist/ui/assets/{chunk-ATLVNIR6-BEIIfJtC.js → chunk-ATLVNIR6-rWg3qxof.js} +1 -1
- package/dist/ui/assets/chunk-ATLVNIR6-rWg3qxof.js.gz +0 -0
- package/dist/ui/assets/{chunk-B4BG7PRW-B8b6dQQ2.js → chunk-B4BG7PRW-CgtLCbpE.js} +3 -3
- package/dist/ui/assets/chunk-B4BG7PRW-CgtLCbpE.js.gz +0 -0
- package/dist/ui/assets/{chunk-CVBHYZKI-D-mQAfrk.js → chunk-CVBHYZKI-DTL6Zgr0.js} +1 -1
- package/dist/ui/assets/{chunk-DI55MBZ5-BfATX3V8.js → chunk-DI55MBZ5-Dwvx2Kva.js} +1 -1
- package/dist/ui/assets/chunk-DI55MBZ5-Dwvx2Kva.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-DHyaqTsP.js +1 -0
- package/dist/ui/assets/{chunk-FMBD7UC4-fqXscNvc.js → chunk-FMBD7UC4-BogA_9CV.js} +1 -1
- package/dist/ui/assets/{chunk-HN2XXSSU-BCHvD80g.js → chunk-HN2XXSSU-2blQO3Gb.js} +1 -1
- package/dist/ui/assets/chunk-HN2XXSSU-2blQO3Gb.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-Cr1rmOui.js +11 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-Cr1rmOui.js.gz +0 -0
- package/dist/ui/assets/{chunk-JZLCHNYA-cKMooY3y.js → chunk-JZLCHNYA-BsgZ79Fa.js} +5 -5
- package/dist/ui/assets/chunk-JZLCHNYA-BsgZ79Fa.js.gz +0 -0
- package/dist/ui/assets/{chunk-MI3HLSF2-BlzO5wOE.js → chunk-MI3HLSF2-dwYeUy5S.js} +1 -1
- package/dist/ui/assets/chunk-MI3HLSF2-dwYeUy5S.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-DEMgSRVe.js +2 -0
- package/dist/ui/assets/chunk-N4CR4FBY-DEMgSRVe.js.gz +0 -0
- package/dist/ui/assets/{chunk-QN33PNHL-DIHGQ_pd.js → chunk-QN33PNHL-DxdIDCAa.js} +1 -1
- package/dist/ui/assets/{chunk-QXUST7PY-C9l0muI0.js → chunk-QXUST7PY-BCK2V0i-.js} +2 -2
- package/dist/ui/assets/chunk-QXUST7PY-BCK2V0i-.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-CALjGrEE.js +1 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-GP3zIxrB.js +2 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-GP3zIxrB.js.gz +0 -0
- package/dist/ui/assets/{chunk-TZMSLE5B-DZwI0C_2.js → chunk-TZMSLE5B-dX5RaM6g.js} +1 -1
- package/dist/ui/assets/chunk-TZMSLE5B-dX5RaM6g.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-C3_RVP70.js +1 -0
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-C3_RVP70.js +1 -0
- package/dist/ui/assets/constants-GjIDNVyt.js +1 -0
- package/dist/ui/assets/{cose-bilkent-S5V4N54A-Ipik-oSD.js → cose-bilkent-S5V4N54A-Dx0BJVDl.js} +1 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-Dx0BJVDl.js.gz +0 -0
- package/dist/ui/assets/cursor-QEb7m-rN.png +0 -0
- package/dist/ui/assets/{dagre-6UL2VRFP-BDpyWQnh.js → dagre-6UL2VRFP-DiQSUxqN.js} +1 -1
- package/dist/ui/assets/dagre-6UL2VRFP-DiQSUxqN.js.gz +0 -0
- package/dist/ui/assets/{dagre-CgA4KhUX.js → dagre-Bekd9Vdj.js} +1 -1
- package/dist/ui/assets/dagre-Bekd9Vdj.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-DtJnDQjc.js +24 -0
- package/dist/ui/assets/diagram-PSM6KHXK-DtJnDQjc.js.gz +0 -0
- package/dist/ui/assets/{diagram-QEK2KX5R-BWPW28XI.js → diagram-QEK2KX5R-CobkCRdj.js} +1 -1
- package/dist/ui/assets/diagram-QEK2KX5R-CobkCRdj.js.gz +0 -0
- package/dist/ui/assets/{diagram-S2PKOQOG-BIHhcGoV.js → diagram-S2PKOQOG-DHEZYivc.js} +1 -1
- package/dist/ui/assets/diagram-S2PKOQOG-DHEZYivc.js.gz +0 -0
- package/dist/ui/assets/editor-DQIG-JYZ.js +43 -0
- package/dist/ui/assets/editor-DQIG-JYZ.js.gz +0 -0
- package/dist/ui/assets/emoji-B0hLmSLZ.js +3 -0
- package/dist/ui/assets/emoji-B0hLmSLZ.js.gz +0 -0
- package/dist/ui/assets/{erDiagram-Q2GNP2WA-ubTaAFcK.js → erDiagram-Q2GNP2WA-BVNeTZPQ.js} +2 -2
- package/dist/ui/assets/erDiagram-Q2GNP2WA-BVNeTZPQ.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-C73VFdyk.js +162 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-C73VFdyk.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-B_RosuD1.js +267 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-B_RosuD1.js.gz +0 -0
- package/dist/ui/assets/{gitGraph-F6HP7TQM-DghoobE6.js → gitGraph-F6HP7TQM-DMFIqn4h.js} +1 -1
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-hxbgwNA1.js +65 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-hxbgwNA1.js.gz +0 -0
- package/dist/ui/assets/index-DTz1Dif6.js +64 -0
- package/dist/ui/assets/index-DTz1Dif6.js.gz +0 -0
- package/dist/ui/assets/index-qkT7Qqm2.css +1 -0
- package/dist/ui/assets/index-qkT7Qqm2.css.gz +0 -0
- package/dist/ui/assets/{info-NVLQJR56-0ZldEXPQ.js → info-NVLQJR56-DZ3K-w48.js} +1 -1
- package/dist/ui/assets/{infoDiagram-ER5ION4S-DMmPX-il.js → infoDiagram-ER5ION4S-CxnBJQu6.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-XKPGCS4Q-CrVickA2.js → journeyDiagram-XKPGCS4Q-CHYNj-f8.js} +3 -3
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CHYNj-f8.js.gz +0 -0
- package/dist/ui/assets/{kanban-definition-3W4ZIXB7-C_BsdHYL.js → kanban-definition-3W4ZIXB7-DQPCCsj2.js} +1 -1
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-DQPCCsj2.js.gz +0 -0
- package/dist/ui/assets/{line-CfBP7Yic.js → line-DBRjKmfa.js} +1 -1
- package/dist/ui/assets/{linear-BsjageUB.js → linear-DFao5Wyp.js} +1 -1
- package/dist/ui/assets/linear-DFao5Wyp.js.gz +0 -0
- package/dist/ui/assets/{mermaid-parser.core-DZdP-NFq.js → mermaid-parser.core-DYCfacHj.js} +2 -2
- package/dist/ui/assets/mermaid-parser.core-DYCfacHj.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-C6xGFSdE.js +11 -0
- package/dist/ui/assets/mermaid.core-C6xGFSdE.js.gz +0 -0
- package/dist/ui/assets/{mindmap-definition-VGOIOE7T-BbmaUjMY.js → mindmap-definition-VGOIOE7T-L3Pw-YM7.js} +1 -1
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-L3Pw-YM7.js.gz +0 -0
- package/dist/ui/assets/{packet-BFZMPI3H-D_ZhkXuT.js → packet-BFZMPI3H-CpL6iNoa.js} +1 -1
- package/dist/ui/assets/{particles-Dv28pjOd.js → particles-CT8hcJOA.js} +1 -1
- package/dist/ui/assets/particles-CT8hcJOA.js.gz +0 -0
- package/dist/ui/assets/{pie-7BOR55EZ-Dn0Q3qNx.js → pie-7BOR55EZ-hTqChbTo.js} +1 -1
- package/dist/ui/assets/{pieDiagram-ADFJNKIX-BbyjfYu8.js → pieDiagram-ADFJNKIX-Bf4Nou75.js} +1 -1
- package/dist/ui/assets/pieDiagram-ADFJNKIX-Bf4Nou75.js.gz +0 -0
- package/dist/ui/assets/{quadrantDiagram-AYHSOK5B-Bc3GqMKz.js → quadrantDiagram-AYHSOK5B-DpjUTLB1.js} +3 -3
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-DpjUTLB1.js.gz +0 -0
- package/dist/ui/assets/{radar-NHE76QYJ-BHwoAy1q.js → radar-NHE76QYJ-myy7OENC.js} +1 -1
- package/dist/ui/assets/reactflow-Cubtnk8i.js +2 -0
- package/dist/ui/assets/reactflow-Cubtnk8i.js.gz +0 -0
- package/dist/ui/assets/{requirementDiagram-UZGBJVZJ-BQaKKL09.js → requirementDiagram-UZGBJVZJ-Bfrfh-0-.js} +1 -1
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-Bfrfh-0-.js.gz +0 -0
- package/dist/ui/assets/{sandpack-BQW_FQ7G.js → sandpack-C58bwfIS.js} +38 -38
- package/dist/ui/assets/sandpack-C58bwfIS.js.gz +0 -0
- package/dist/ui/assets/sandpackDefaults-Bkga8XAE.js +1 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-ClZAZ6va.js +10 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-ClZAZ6va.js.gz +0 -0
- package/dist/ui/assets/{sequenceDiagram-WL72ISMW-Dw32824o.js → sequenceDiagram-WL72ISMW-CNgly63p.js} +6 -6
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-CNgly63p.js.gz +0 -0
- package/dist/ui/assets/src-DAeyG22O.js +34 -0
- package/dist/ui/assets/src-DAeyG22O.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BrEAoDpE.js +1 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BrEAoDpE.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-BNL52_oN.js +1 -0
- package/dist/ui/assets/streamdown-BdAVfkeF.js +521 -0
- package/dist/ui/assets/streamdown-BdAVfkeF.js.gz +0 -0
- package/dist/ui/assets/syntax-BOfTnQiy.js +9 -0
- package/dist/ui/assets/syntax-BOfTnQiy.js.gz +0 -0
- package/dist/ui/assets/{timeline-definition-IT6M3QCI-Jh_WZzXv.js → timeline-definition-IT6M3QCI-CaRH3k4l.js} +16 -16
- package/dist/ui/assets/timeline-definition-IT6M3QCI-CaRH3k4l.js.gz +0 -0
- package/dist/ui/assets/{treemap-KMMF4GRG-CPYIgjxE.js → treemap-KMMF4GRG-CUaLOV_B.js} +1 -1
- package/dist/ui/assets/{knowledgeRoutes-CivaUqha.js → useUserLocalStorage-C8sgXgXR.js} +1 -1
- package/dist/ui/assets/useUserLocalStorage-C8sgXgXR.js.gz +0 -0
- package/dist/ui/assets/{xychartDiagram-PRI3JC2R-CERc7Rdb.js → xychartDiagram-PRI3JC2R-BlhkI9T_.js} +1 -1
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-BlhkI9T_.js.gz +0 -0
- package/dist/ui/index.html +13 -12
- package/dist/ui/index.html.gz +0 -0
- package/package.json +12 -10
- package/scripts/postinstall.js +27 -19
- package/dist/cli/commands/daemon/sync.d.ts.map +0 -1
- package/dist/ui/assets/App-9s2WHM6S.js +0 -22
- package/dist/ui/assets/App-9s2WHM6S.js.gz +0 -0
- package/dist/ui/assets/App-BAdBsEnV.css +0 -1
- package/dist/ui/assets/App-BAdBsEnV.css.gz +0 -0
- package/dist/ui/assets/ArtifactConsentModal-ParNk5kW.js +0 -1
- package/dist/ui/assets/ArtifactConsentModal-ParNk5kW.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-VQxLMCiN.js +0 -9
- package/dist/ui/assets/ArtifactFullscreenPage-VQxLMCiN.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-3RchrIgk.js +0 -18
- package/dist/ui/assets/AutocompleteTextarea-3RchrIgk.js.gz +0 -0
- package/dist/ui/assets/CodeEditor.inner-D51Z_CLQ.js +0 -8
- package/dist/ui/assets/CodeEditor.inner-D51Z_CLQ.js.gz +0 -0
- package/dist/ui/assets/ConversationView-Dyddw2b1.js +0 -34
- package/dist/ui/assets/ConversationView-Dyddw2b1.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-CdftslnF.js +0 -24
- package/dist/ui/assets/KnowledgePage-CdftslnF.js.gz +0 -0
- package/dist/ui/assets/MobileApp-BdBMpnJ1.js +0 -1
- package/dist/ui/assets/MobileApp-BdBMpnJ1.js.gz +0 -0
- package/dist/ui/assets/StreamdownDemoPage-B9wbgp2s.js.gz +0 -0
- package/dist/ui/assets/ThemeSwitcher-ubn6IOz9.js +0 -1
- package/dist/ui/assets/ThemeSwitcher-ubn6IOz9.js.gz +0 -0
- package/dist/ui/assets/antd-C-HfEC4E.js +0 -400
- package/dist/ui/assets/antd-C-HfEC4E.js.gz +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-dkBewUpN.js +0 -1
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-ChmZt3zk.js +0 -36
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-ChmZt3zk.js.gz +0 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-CzGHAHao.js.gz +0 -0
- package/dist/ui/assets/c4Diagram-YG6GDRKO-DscJyaWN.js.gz +0 -0
- package/dist/ui/assets/channel-DvRQqEqC.js +0 -1
- package/dist/ui/assets/chunk-55IACEB6-DojF2pZN.js +0 -1
- package/dist/ui/assets/chunk-ABZYJK2D-RzDCrjE6.js.gz +0 -0
- package/dist/ui/assets/chunk-AGHRB4JF-jidCS5Of.js.gz +0 -0
- package/dist/ui/assets/chunk-ATLVNIR6-BEIIfJtC.js.gz +0 -0
- package/dist/ui/assets/chunk-B4BG7PRW-B8b6dQQ2.js.gz +0 -0
- package/dist/ui/assets/chunk-DI55MBZ5-BfATX3V8.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-BKt6lPJM.js +0 -1
- package/dist/ui/assets/chunk-HN2XXSSU-BCHvD80g.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-Cp6dqHnY.js +0 -11
- package/dist/ui/assets/chunk-JA3XYJ7Z-Cp6dqHnY.js.gz +0 -0
- package/dist/ui/assets/chunk-JZLCHNYA-cKMooY3y.js.gz +0 -0
- package/dist/ui/assets/chunk-MI3HLSF2-BlzO5wOE.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-pASDorUx.js +0 -2
- package/dist/ui/assets/chunk-N4CR4FBY-pASDorUx.js.gz +0 -0
- package/dist/ui/assets/chunk-QXUST7PY-C9l0muI0.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-CZskCFCf.js +0 -1
- package/dist/ui/assets/chunk-S3R3BYOJ-VJiLzt2o.js +0 -2
- package/dist/ui/assets/chunk-S3R3BYOJ-VJiLzt2o.js.gz +0 -0
- package/dist/ui/assets/chunk-TZMSLE5B-DZwI0C_2.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-BFASUbmZ.js +0 -1
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-BFASUbmZ.js +0 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-Ipik-oSD.js.gz +0 -0
- package/dist/ui/assets/dagre-6UL2VRFP-BDpyWQnh.js.gz +0 -0
- package/dist/ui/assets/dagre-CgA4KhUX.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-B4GRzxLJ.js +0 -24
- package/dist/ui/assets/diagram-PSM6KHXK-B4GRzxLJ.js.gz +0 -0
- package/dist/ui/assets/diagram-QEK2KX5R-BWPW28XI.js.gz +0 -0
- package/dist/ui/assets/diagram-S2PKOQOG-BIHhcGoV.js.gz +0 -0
- package/dist/ui/assets/editor-C-HJ7Yw0.js +0 -39
- package/dist/ui/assets/editor-C-HJ7Yw0.js.gz +0 -0
- package/dist/ui/assets/emoji-D8F6B62m.js +0 -3
- package/dist/ui/assets/emoji-D8F6B62m.js.gz +0 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-ubTaAFcK.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-BHLCTYjI.js +0 -162
- package/dist/ui/assets/flowDiagram-NV44I4VS-BHLCTYjI.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-ClC3pay1.js +0 -267
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-ClC3pay1.js.gz +0 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-Clqpiswu.js +0 -65
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-Clqpiswu.js.gz +0 -0
- package/dist/ui/assets/index-D9OElx9A.css +0 -1
- package/dist/ui/assets/index-D9OElx9A.css.gz +0 -0
- package/dist/ui/assets/index-DxPuzG7E.js +0 -350
- package/dist/ui/assets/index-DxPuzG7E.js.gz +0 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CrVickA2.js.gz +0 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-C_BsdHYL.js.gz +0 -0
- package/dist/ui/assets/katex-CamJ39w1.js +0 -257
- package/dist/ui/assets/katex-CamJ39w1.js.gz +0 -0
- package/dist/ui/assets/knowledgeRoutes-CivaUqha.js.gz +0 -0
- package/dist/ui/assets/linear-BsjageUB.js.gz +0 -0
- package/dist/ui/assets/mermaid-parser.core-DZdP-NFq.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-TNrI0pHG.js +0 -11
- package/dist/ui/assets/mermaid.core-TNrI0pHG.js.gz +0 -0
- package/dist/ui/assets/message-BtWWJ9Af.js +0 -36
- package/dist/ui/assets/message-BtWWJ9Af.js.gz +0 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-BbmaUjMY.js.gz +0 -0
- package/dist/ui/assets/particles-Dv28pjOd.js.gz +0 -0
- package/dist/ui/assets/pieDiagram-ADFJNKIX-BbyjfYu8.js.gz +0 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-Bc3GqMKz.js.gz +0 -0
- package/dist/ui/assets/reactflow-BVYPxNhc.js +0 -2
- package/dist/ui/assets/reactflow-BVYPxNhc.js.gz +0 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-BQaKKL09.js.gz +0 -0
- package/dist/ui/assets/sandpack-BQW_FQ7G.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DiJvDvhb.js +0 -10
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DiJvDvhb.js.gz +0 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-Dw32824o.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BCOpNdHV.js +0 -1
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BCOpNdHV.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-Cuqwvgfg.js +0 -1
- package/dist/ui/assets/syntax-VJrU5BEu.js +0 -10
- package/dist/ui/assets/syntax-VJrU5BEu.js.gz +0 -0
- package/dist/ui/assets/theme-DZtFA8b4.js +0 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-Jh_WZzXv.js.gz +0 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-CERc7Rdb.js.gz +0 -0
- /package/dist/cli/commands/{admin → local}/sync-unix.d.ts +0 -0
package/dist/core/mcp/index.cjs
CHANGED
|
@@ -43,6 +43,10 @@ var import_drizzle_orm5 = require("drizzle-orm");
|
|
|
43
43
|
// src/db/database-wrapper.ts
|
|
44
44
|
var import_drizzle_orm = require("drizzle-orm");
|
|
45
45
|
|
|
46
|
+
// src/db/tenant-context.ts
|
|
47
|
+
var import_node_async_hooks = require("async_hooks");
|
|
48
|
+
var tenantDatabaseScope = new import_node_async_hooks.AsyncLocalStorage();
|
|
49
|
+
|
|
46
50
|
// src/db/encryption.ts
|
|
47
51
|
var import_node_crypto = require("crypto");
|
|
48
52
|
|
|
@@ -67,6 +71,7 @@ __export(schema_postgres_exports, {
|
|
|
67
71
|
cardTypes: () => cardTypes,
|
|
68
72
|
cards: () => cards,
|
|
69
73
|
gatewayChannels: () => gatewayChannels,
|
|
74
|
+
gatewayOutboundMessages: () => gatewayOutboundMessages,
|
|
70
75
|
groupMemberships: () => groupMemberships,
|
|
71
76
|
groups: () => groups,
|
|
72
77
|
kbDocumentUnits: () => kbDocumentUnits,
|
|
@@ -85,6 +90,8 @@ __export(schema_postgres_exports, {
|
|
|
85
90
|
serializedSessions: () => serializedSessions,
|
|
86
91
|
sessionEnvSelections: () => sessionEnvSelections,
|
|
87
92
|
sessionMcpServers: () => sessionMcpServers,
|
|
93
|
+
sessionRelationships: () => sessionRelationships,
|
|
94
|
+
sessionRelationshipsRelations: () => sessionRelationshipsRelations,
|
|
88
95
|
sessions: () => sessions,
|
|
89
96
|
sessionsRelations: () => sessionsRelations,
|
|
90
97
|
tasks: () => tasks,
|
|
@@ -97,6 +104,27 @@ __export(schema_postgres_exports, {
|
|
|
97
104
|
// src/types/branch.ts
|
|
98
105
|
var BRANCH_PERMISSION_LEVELS = ["none", "view", "session", "prompt", "all"];
|
|
99
106
|
|
|
107
|
+
// src/types/session.ts
|
|
108
|
+
var SessionStatus = {
|
|
109
|
+
IDLE: "idle",
|
|
110
|
+
RUNNING: "running",
|
|
111
|
+
STOPPING: "stopping",
|
|
112
|
+
// Stop requested, waiting for task to stop
|
|
113
|
+
AWAITING_PERMISSION: "awaiting_permission",
|
|
114
|
+
AWAITING_INPUT: "awaiting_input",
|
|
115
|
+
// Legacy / pre-#1177: AskUserQuestion was disallowed at the SDK; new sessions never enter this state, kept for historical rows
|
|
116
|
+
TIMED_OUT: "timed_out",
|
|
117
|
+
// Permission/input request timed out, executor exited — user must re-prompt
|
|
118
|
+
COMPLETED: "completed",
|
|
119
|
+
FAILED: "failed"
|
|
120
|
+
};
|
|
121
|
+
var EXECUTING_SESSION_STATUSES = /* @__PURE__ */ new Set([
|
|
122
|
+
SessionStatus.RUNNING,
|
|
123
|
+
SessionStatus.STOPPING,
|
|
124
|
+
SessionStatus.AWAITING_PERMISSION,
|
|
125
|
+
SessionStatus.AWAITING_INPUT
|
|
126
|
+
]);
|
|
127
|
+
|
|
100
128
|
// src/types/task.ts
|
|
101
129
|
var TaskStatus = {
|
|
102
130
|
QUEUED: "queued",
|
|
@@ -121,6 +149,12 @@ var TERMINAL_TASK_STATUSES = /* @__PURE__ */ new Set([
|
|
|
121
149
|
TaskStatus.STOPPED,
|
|
122
150
|
TaskStatus.TIMED_OUT
|
|
123
151
|
]);
|
|
152
|
+
var EXECUTING_TASK_STATUSES = /* @__PURE__ */ new Set([
|
|
153
|
+
TaskStatus.RUNNING,
|
|
154
|
+
TaskStatus.STOPPING,
|
|
155
|
+
TaskStatus.AWAITING_PERMISSION,
|
|
156
|
+
TaskStatus.AWAITING_INPUT
|
|
157
|
+
]);
|
|
124
158
|
|
|
125
159
|
// src/types/user.ts
|
|
126
160
|
var ROLES = {
|
|
@@ -167,6 +201,7 @@ var t = {
|
|
|
167
201
|
var sessions = (0, import_pg_core.pgTable)(
|
|
168
202
|
"sessions",
|
|
169
203
|
{
|
|
204
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
170
205
|
// Primary identity
|
|
171
206
|
session_id: (0, import_pg_core.varchar)("session_id", { length: 36 }).primaryKey(),
|
|
172
207
|
created_at: t.timestamp("created_at").notNull(),
|
|
@@ -226,7 +261,9 @@ var sessions = (0, import_pg_core.pgTable)(
|
|
|
226
261
|
data: t.json("data").$type().notNull()
|
|
227
262
|
},
|
|
228
263
|
(table) => ({
|
|
264
|
+
tenantIdx: (0, import_pg_core.index)("sessions_tenant_id_idx").on(table.tenant_id),
|
|
229
265
|
statusIdx: (0, import_pg_core.index)("sessions_status_idx").on(table.status),
|
|
266
|
+
statusReadyIdx: (0, import_pg_core.index)("sessions_status_ready_idx").on(table.status, table.ready_for_prompt),
|
|
230
267
|
agenticToolIdx: (0, import_pg_core.index)("sessions_agentic_tool_idx").on(table.agentic_tool),
|
|
231
268
|
boardIdx: (0, import_pg_core.index)("sessions_board_idx").on(table.board_id),
|
|
232
269
|
branchIdx: (0, import_pg_core.index)("sessions_branch_idx").on(table.branch_id),
|
|
@@ -238,12 +275,57 @@ var sessions = (0, import_pg_core.pgTable)(
|
|
|
238
275
|
// Partial unique index — covering for the scheduler's dedup lookup
|
|
239
276
|
// AND serves as the DB-level guard against check-then-create races
|
|
240
277
|
// in spawnScheduledSession.
|
|
241
|
-
scheduleRunUnique: (0, import_pg_core.uniqueIndex)("sessions_schedule_run_unique").on(table.schedule_id, table.scheduled_run_at).where(import_drizzle_orm2.sql`${table.schedule_id} IS NOT NULL AND ${table.scheduled_run_at} IS NOT NULL`)
|
|
278
|
+
scheduleRunUnique: (0, import_pg_core.uniqueIndex)("sessions_schedule_run_unique").on(table.tenant_id, table.schedule_id, table.scheduled_run_at).where(import_drizzle_orm2.sql`${table.schedule_id} IS NOT NULL AND ${table.scheduled_run_at} IS NOT NULL`)
|
|
279
|
+
})
|
|
280
|
+
);
|
|
281
|
+
var sessionRelationships = (0, import_pg_core.pgTable)(
|
|
282
|
+
"session_relationships",
|
|
283
|
+
{
|
|
284
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
285
|
+
relationship_id: (0, import_pg_core.varchar)("relationship_id", { length: 36 }).primaryKey(),
|
|
286
|
+
source_session_id: (0, import_pg_core.varchar)("source_session_id", { length: 36 }).notNull().references(() => sessions.session_id, { onDelete: "cascade" }),
|
|
287
|
+
target_session_id: (0, import_pg_core.varchar)("target_session_id", { length: 36 }).notNull().references(() => sessions.session_id, { onDelete: "cascade" }),
|
|
288
|
+
relationship_type: (0, import_pg_core.text)("relationship_type", { enum: ["remote_create"] }).notNull(),
|
|
289
|
+
created_by: (0, import_pg_core.varchar)("created_by", { length: 36 }).notNull(),
|
|
290
|
+
created_at: t.timestamp("created_at").notNull(),
|
|
291
|
+
updated_at: t.timestamp("updated_at"),
|
|
292
|
+
callback_enabled: t.bool("callback_enabled").notNull().default(false),
|
|
293
|
+
callback_session_id: (0, import_pg_core.varchar)("callback_session_id", { length: 36 }).references(
|
|
294
|
+
() => sessions.session_id,
|
|
295
|
+
{
|
|
296
|
+
onDelete: "set null"
|
|
297
|
+
}
|
|
298
|
+
),
|
|
299
|
+
data: t.json("data")
|
|
300
|
+
},
|
|
301
|
+
(table) => ({
|
|
302
|
+
tenantIdx: (0, import_pg_core.index)("session_relationships_tenant_id_idx").on(table.tenant_id),
|
|
303
|
+
sourceIdx: (0, import_pg_core.index)("session_relationships_source_idx").on(table.source_session_id),
|
|
304
|
+
targetIdx: (0, import_pg_core.index)("session_relationships_target_idx").on(table.target_session_id),
|
|
305
|
+
callbackIdx: (0, import_pg_core.index)("session_relationships_callback_idx").on(table.callback_session_id),
|
|
306
|
+
// Composite indexes so the OR predicate in dispatchCompletionCallbacks
|
|
307
|
+
// (WHERE source_session_id = $1 OR target_session_id = $2) uses BitmapOr
|
|
308
|
+
// over these instead of a full tenant table scan via tenant_id_idx.
|
|
309
|
+
tenantSourceIdx: (0, import_pg_core.index)("session_relationships_tenant_source_idx").on(
|
|
310
|
+
table.tenant_id,
|
|
311
|
+
table.source_session_id
|
|
312
|
+
),
|
|
313
|
+
tenantTargetIdx: (0, import_pg_core.index)("session_relationships_tenant_target_idx").on(
|
|
314
|
+
table.tenant_id,
|
|
315
|
+
table.target_session_id
|
|
316
|
+
),
|
|
317
|
+
sourceTargetTypeUnique: (0, import_pg_core.uniqueIndex)("session_relationships_source_target_type_unique").on(
|
|
318
|
+
table.tenant_id,
|
|
319
|
+
table.source_session_id,
|
|
320
|
+
table.target_session_id,
|
|
321
|
+
table.relationship_type
|
|
322
|
+
)
|
|
242
323
|
})
|
|
243
324
|
);
|
|
244
325
|
var tasks = (0, import_pg_core.pgTable)(
|
|
245
326
|
"tasks",
|
|
246
327
|
{
|
|
328
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
247
329
|
task_id: (0, import_pg_core.varchar)("task_id", { length: 36 }).primaryKey(),
|
|
248
330
|
session_id: (0, import_pg_core.varchar)("session_id", { length: 36 }).notNull().references(() => sessions.session_id, { onDelete: "cascade" }),
|
|
249
331
|
created_at: t.timestamp("created_at").notNull(),
|
|
@@ -273,19 +355,23 @@ var tasks = (0, import_pg_core.pgTable)(
|
|
|
273
355
|
data: t.json("data").$type().notNull()
|
|
274
356
|
},
|
|
275
357
|
(table) => ({
|
|
358
|
+
tenantIdx: (0, import_pg_core.index)("tasks_tenant_id_idx").on(table.tenant_id),
|
|
276
359
|
sessionIdx: (0, import_pg_core.index)("tasks_session_idx").on(table.session_id),
|
|
277
360
|
statusIdx: (0, import_pg_core.index)("tasks_status_idx").on(table.status),
|
|
278
361
|
createdIdx: (0, import_pg_core.index)("tasks_created_idx").on(table.created_at),
|
|
362
|
+
// Composite for "latest task for session" queries (ORDER BY created_at DESC LIMIT 1).
|
|
363
|
+
sessionCreatedIdx: (0, import_pg_core.index)("tasks_session_created_idx").on(table.session_id, table.created_at),
|
|
279
364
|
queueIdx: (0, import_pg_core.index)("tasks_queue_idx").on(table.session_id, table.status, table.queue_position),
|
|
280
365
|
// Partial unique index — defense-in-depth for `tasks.createPending` race
|
|
281
366
|
// serialization. Only QUEUED rows are constrained; CREATED/RUNNING/done
|
|
282
367
|
// rows have NULL queue_position and are unaffected.
|
|
283
|
-
queuedPositionUnique: (0, import_pg_core.uniqueIndex)("tasks_queued_position_unique").on(table.session_id, table.queue_position).where(import_drizzle_orm2.sql`${table.status} = 'queued'`)
|
|
368
|
+
queuedPositionUnique: (0, import_pg_core.uniqueIndex)("tasks_queued_position_unique").on(table.tenant_id, table.session_id, table.queue_position).where(import_drizzle_orm2.sql`${table.status} = 'queued'`)
|
|
284
369
|
})
|
|
285
370
|
);
|
|
286
371
|
var serializedSessions = (0, import_pg_core.pgTable)(
|
|
287
372
|
"serialized_sessions",
|
|
288
373
|
{
|
|
374
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
289
375
|
id: (0, import_pg_core.varchar)("id", { length: 36 }).primaryKey(),
|
|
290
376
|
session_id: (0, import_pg_core.varchar)("session_id", { length: 36 }).notNull().references(() => sessions.session_id, { onDelete: "cascade" }),
|
|
291
377
|
branch_id: (0, import_pg_core.varchar)("branch_id", { length: 36 }).notNull().references(() => branches.branch_id, { onDelete: "cascade" }),
|
|
@@ -301,6 +387,7 @@ var serializedSessions = (0, import_pg_core.pgTable)(
|
|
|
301
387
|
// gzipped; NULL while status='processing'
|
|
302
388
|
},
|
|
303
389
|
(table) => ({
|
|
390
|
+
tenantIdx: (0, import_pg_core.index)("serialized_sessions_tenant_id_idx").on(table.tenant_id),
|
|
304
391
|
sessionTurnIdx: (0, import_pg_core.index)("serialized_sessions_session_turn_idx").on(
|
|
305
392
|
table.session_id,
|
|
306
393
|
table.turn_index
|
|
@@ -311,6 +398,7 @@ var serializedSessions = (0, import_pg_core.pgTable)(
|
|
|
311
398
|
var messages = (0, import_pg_core.pgTable)(
|
|
312
399
|
"messages",
|
|
313
400
|
{
|
|
401
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
314
402
|
// Primary identity
|
|
315
403
|
message_id: (0, import_pg_core.varchar)("message_id", { length: 36 }).primaryKey(),
|
|
316
404
|
created_at: t.timestamp("created_at").notNull(),
|
|
@@ -350,15 +438,23 @@ var messages = (0, import_pg_core.pgTable)(
|
|
|
350
438
|
data: t.json("data").$type().notNull()
|
|
351
439
|
},
|
|
352
440
|
(table) => ({
|
|
441
|
+
tenantIdx: (0, import_pg_core.index)("messages_tenant_id_idx").on(table.tenant_id),
|
|
442
|
+
tenantTimestampIdx: (0, import_pg_core.index)("messages_tenant_timestamp_idx").on(table.tenant_id, table.timestamp),
|
|
353
443
|
// Indexes for efficient lookups
|
|
354
444
|
sessionIdx: (0, import_pg_core.index)("messages_session_id_idx").on(table.session_id),
|
|
355
445
|
taskIdx: (0, import_pg_core.index)("messages_task_id_idx").on(table.task_id),
|
|
356
|
-
sessionIndexIdx: (0, import_pg_core.index)("messages_session_index_idx").on(table.session_id, table.index)
|
|
446
|
+
sessionIndexIdx: (0, import_pg_core.index)("messages_session_index_idx").on(table.session_id, table.index),
|
|
447
|
+
timestampIdx: (0, import_pg_core.index)("messages_timestamp_idx").on(table.timestamp),
|
|
448
|
+
sessionTimestampIdx: (0, import_pg_core.index)("messages_session_timestamp_idx").on(
|
|
449
|
+
table.session_id,
|
|
450
|
+
table.timestamp
|
|
451
|
+
)
|
|
357
452
|
})
|
|
358
453
|
);
|
|
359
454
|
var boards = (0, import_pg_core.pgTable)(
|
|
360
455
|
"boards",
|
|
361
456
|
{
|
|
457
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
362
458
|
board_id: (0, import_pg_core.varchar)("board_id", { length: 36 }).primaryKey(),
|
|
363
459
|
created_at: t.timestamp("created_at").notNull(),
|
|
364
460
|
updated_at: t.timestamp("updated_at"),
|
|
@@ -366,7 +462,7 @@ var boards = (0, import_pg_core.pgTable)(
|
|
|
366
462
|
created_by: (0, import_pg_core.varchar)("created_by", { length: 36 }).notNull(),
|
|
367
463
|
// Materialized for lookups
|
|
368
464
|
name: (0, import_pg_core.text)("name").notNull(),
|
|
369
|
-
slug: (0, import_pg_core.text)("slug")
|
|
465
|
+
slug: (0, import_pg_core.text)("slug"),
|
|
370
466
|
primary_assistant_id: (0, import_pg_core.varchar)("primary_assistant_id", { length: 36 }).references(
|
|
371
467
|
() => branches.branch_id,
|
|
372
468
|
{
|
|
@@ -381,18 +477,21 @@ var boards = (0, import_pg_core.pgTable)(
|
|
|
381
477
|
archived_by: (0, import_pg_core.varchar)("archived_by", { length: 36 })
|
|
382
478
|
},
|
|
383
479
|
(table) => ({
|
|
480
|
+
tenantIdx: (0, import_pg_core.index)("boards_tenant_id_idx").on(table.tenant_id),
|
|
384
481
|
nameIdx: (0, import_pg_core.index)("boards_name_idx").on(table.name),
|
|
385
|
-
slugIdx: (0, import_pg_core.index)("boards_slug_idx").on(table.slug)
|
|
482
|
+
slugIdx: (0, import_pg_core.index)("boards_slug_idx").on(table.slug),
|
|
483
|
+
slugTenantUnique: (0, import_pg_core.uniqueIndex)("boards_tenant_slug_unique").on(table.tenant_id, table.slug)
|
|
386
484
|
})
|
|
387
485
|
);
|
|
388
486
|
var repos = (0, import_pg_core.pgTable)(
|
|
389
487
|
"repos",
|
|
390
488
|
{
|
|
489
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
391
490
|
repo_id: (0, import_pg_core.varchar)("repo_id", { length: 36 }).primaryKey(),
|
|
392
491
|
created_at: t.timestamp("created_at").notNull(),
|
|
393
492
|
updated_at: t.timestamp("updated_at"),
|
|
394
493
|
// Materialized for querying
|
|
395
|
-
slug: (0, import_pg_core.text)("slug").notNull()
|
|
494
|
+
slug: (0, import_pg_core.text)("slug").notNull(),
|
|
396
495
|
repo_type: (0, import_pg_core.text)("repo_type", { enum: ["remote", "local"] }).notNull().default("remote"),
|
|
397
496
|
// Unix group for repo-level git access (agor_rp_<short-id>)
|
|
398
497
|
// Users who have access to ANY branch in this repo get added to this group.
|
|
@@ -403,12 +502,15 @@ var repos = (0, import_pg_core.pgTable)(
|
|
|
403
502
|
data: t.json("data").$type().notNull()
|
|
404
503
|
},
|
|
405
504
|
(table) => ({
|
|
406
|
-
|
|
505
|
+
tenantIdx: (0, import_pg_core.index)("repos_tenant_id_idx").on(table.tenant_id),
|
|
506
|
+
slugIdx: (0, import_pg_core.index)("repos_slug_idx").on(table.slug),
|
|
507
|
+
slugTenantUnique: (0, import_pg_core.uniqueIndex)("repos_tenant_slug_unique").on(table.tenant_id, table.slug)
|
|
407
508
|
})
|
|
408
509
|
);
|
|
409
510
|
var branches = (0, import_pg_core.pgTable)(
|
|
410
511
|
"branches",
|
|
411
512
|
{
|
|
513
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
412
514
|
// Primary identity
|
|
413
515
|
branch_id: (0, import_pg_core.varchar)("branch_id", { length: 36 }).primaryKey(),
|
|
414
516
|
repo_id: (0, import_pg_core.varchar)("repo_id", { length: 36 }).notNull().references(() => repos.repo_id, { onDelete: "cascade" }),
|
|
@@ -483,6 +585,7 @@ var branches = (0, import_pg_core.pgTable)(
|
|
|
483
585
|
data: t.json("data").$type().notNull()
|
|
484
586
|
},
|
|
485
587
|
(table) => ({
|
|
588
|
+
tenantIdx: (0, import_pg_core.index)("branches_tenant_id_idx").on(table.tenant_id),
|
|
486
589
|
repoIdx: (0, import_pg_core.index)("branches_repo_idx").on(table.repo_id),
|
|
487
590
|
nameIdx: (0, import_pg_core.index)("branches_name_idx").on(table.name),
|
|
488
591
|
refIdx: (0, import_pg_core.index)("branches_ref_idx").on(table.ref),
|
|
@@ -496,22 +599,26 @@ var branches = (0, import_pg_core.pgTable)(
|
|
|
496
599
|
var branchOwners = (0, import_pg_core.pgTable)(
|
|
497
600
|
"branch_owners",
|
|
498
601
|
{
|
|
602
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
499
603
|
branch_id: (0, import_pg_core.varchar)("branch_id", { length: 36 }).notNull().references(() => branches.branch_id, { onDelete: "cascade" }),
|
|
500
604
|
user_id: (0, import_pg_core.varchar)("user_id", { length: 36 }).notNull().references(() => users.user_id, { onDelete: "cascade" }),
|
|
501
605
|
created_at: t.timestamp("created_at").defaultNow()
|
|
502
606
|
},
|
|
503
607
|
(table) => ({
|
|
608
|
+
tenantIdx: (0, import_pg_core.index)("branch_owners_tenant_id_idx").on(table.tenant_id),
|
|
504
609
|
pk: (0, import_pg_core.primaryKey)({ columns: [table.branch_id, table.user_id] })
|
|
505
610
|
})
|
|
506
611
|
);
|
|
507
612
|
var boardOwners = (0, import_pg_core.pgTable)(
|
|
508
613
|
"board_owners",
|
|
509
614
|
{
|
|
615
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
510
616
|
board_id: (0, import_pg_core.varchar)("board_id", { length: 36 }).notNull().references(() => boards.board_id, { onDelete: "cascade" }),
|
|
511
617
|
user_id: (0, import_pg_core.varchar)("user_id", { length: 36 }).notNull().references(() => users.user_id, { onDelete: "cascade" }),
|
|
512
618
|
created_at: t.timestamp("created_at")
|
|
513
619
|
},
|
|
514
620
|
(table) => ({
|
|
621
|
+
tenantIdx: (0, import_pg_core.index)("board_owners_tenant_id_idx").on(table.tenant_id),
|
|
515
622
|
pk: (0, import_pg_core.primaryKey)({ columns: [table.board_id, table.user_id] }),
|
|
516
623
|
userIdx: (0, import_pg_core.index)("board_owners_user_idx").on(table.user_id)
|
|
517
624
|
})
|
|
@@ -519,6 +626,7 @@ var boardOwners = (0, import_pg_core.pgTable)(
|
|
|
519
626
|
var schedules = (0, import_pg_core.pgTable)(
|
|
520
627
|
"schedules",
|
|
521
628
|
{
|
|
629
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
522
630
|
schedule_id: (0, import_pg_core.varchar)("schedule_id", { length: 36 }).primaryKey(),
|
|
523
631
|
branch_id: (0, import_pg_core.varchar)("branch_id", { length: 36 }).notNull().references(() => branches.branch_id, { onDelete: "cascade" }),
|
|
524
632
|
name: (0, import_pg_core.text)("name").notNull(),
|
|
@@ -542,6 +650,7 @@ var schedules = (0, import_pg_core.pgTable)(
|
|
|
542
650
|
created_by: (0, import_pg_core.varchar)("created_by", { length: 36 }).notNull().references(() => users.user_id)
|
|
543
651
|
},
|
|
544
652
|
(table) => ({
|
|
653
|
+
tenantIdx: (0, import_pg_core.index)("schedules_tenant_id_idx").on(table.tenant_id),
|
|
545
654
|
enabledNextRunIdx: (0, import_pg_core.index)("schedules_enabled_next_run_idx").on(table.enabled, table.next_run_at),
|
|
546
655
|
branchIdx: (0, import_pg_core.index)("schedules_branch_idx").on(table.branch_id),
|
|
547
656
|
createdByIdx: (0, import_pg_core.index)("schedules_created_by_idx").on(table.created_by)
|
|
@@ -550,12 +659,13 @@ var schedules = (0, import_pg_core.pgTable)(
|
|
|
550
659
|
var users = (0, import_pg_core.pgTable)(
|
|
551
660
|
"users",
|
|
552
661
|
{
|
|
662
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
553
663
|
// Primary identity
|
|
554
664
|
user_id: (0, import_pg_core.varchar)("user_id", { length: 36 }).primaryKey(),
|
|
555
665
|
created_at: t.timestamp("created_at").notNull(),
|
|
556
666
|
updated_at: t.timestamp("updated_at"),
|
|
557
667
|
// Materialized for auth lookups
|
|
558
|
-
email: (0, import_pg_core.text)("email").
|
|
668
|
+
email: (0, import_pg_core.text)("email").notNull(),
|
|
559
669
|
password: (0, import_pg_core.text)("password").notNull(),
|
|
560
670
|
// bcrypt hashed
|
|
561
671
|
// Basic profile (materialized for display)
|
|
@@ -571,16 +681,22 @@ var users = (0, import_pg_core.pgTable)(
|
|
|
571
681
|
onboarding_completed: t.bool("onboarding_completed").notNull().default(false),
|
|
572
682
|
// Force password change flag (admin-settable, auto-cleared on password change)
|
|
573
683
|
must_change_password: t.bool("must_change_password").notNull().default(false),
|
|
684
|
+
// Auth invalidation marker. Password changes set this timestamp so any
|
|
685
|
+
// previously issued browser access or refresh token is rejected.
|
|
686
|
+
tokens_valid_after: t.timestamp("tokens_valid_after"),
|
|
574
687
|
// JSON blob for profile/preferences
|
|
575
688
|
data: t.json("data").$type().notNull()
|
|
576
689
|
},
|
|
577
690
|
(table) => ({
|
|
578
|
-
|
|
691
|
+
tenantIdx: (0, import_pg_core.index)("users_tenant_id_idx").on(table.tenant_id),
|
|
692
|
+
emailIdx: (0, import_pg_core.index)("users_email_idx").on(table.email),
|
|
693
|
+
emailTenantUnique: (0, import_pg_core.uniqueIndex)("users_tenant_email_unique").on(table.tenant_id, table.email)
|
|
579
694
|
})
|
|
580
695
|
);
|
|
581
696
|
var groups = (0, import_pg_core.pgTable)(
|
|
582
697
|
"groups",
|
|
583
698
|
{
|
|
699
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
584
700
|
group_id: (0, import_pg_core.varchar)("group_id", { length: 36 }).primaryKey(),
|
|
585
701
|
name: (0, import_pg_core.text)("name").notNull(),
|
|
586
702
|
slug: (0, import_pg_core.text)("slug").notNull(),
|
|
@@ -593,13 +709,15 @@ var groups = (0, import_pg_core.pgTable)(
|
|
|
593
709
|
updated_at: t.timestamp("updated_at")
|
|
594
710
|
},
|
|
595
711
|
(table) => ({
|
|
596
|
-
|
|
712
|
+
tenantIdx: (0, import_pg_core.index)("groups_tenant_id_idx").on(table.tenant_id),
|
|
713
|
+
slugIdx: (0, import_pg_core.uniqueIndex)("groups_tenant_slug_unique").on(table.tenant_id, table.slug),
|
|
597
714
|
archivedIdx: (0, import_pg_core.index)("groups_archived_idx").on(table.archived)
|
|
598
715
|
})
|
|
599
716
|
);
|
|
600
717
|
var groupMemberships = (0, import_pg_core.pgTable)(
|
|
601
718
|
"group_memberships",
|
|
602
719
|
{
|
|
720
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
603
721
|
group_id: (0, import_pg_core.varchar)("group_id", { length: 36 }).notNull().references(() => groups.group_id, { onDelete: "cascade" }),
|
|
604
722
|
user_id: (0, import_pg_core.varchar)("user_id", { length: 36 }).notNull().references(() => users.user_id, { onDelete: "cascade" }),
|
|
605
723
|
added_by: (0, import_pg_core.varchar)("added_by", { length: 36 }).references(() => users.user_id, {
|
|
@@ -608,6 +726,7 @@ var groupMemberships = (0, import_pg_core.pgTable)(
|
|
|
608
726
|
created_at: t.timestamp("created_at").notNull()
|
|
609
727
|
},
|
|
610
728
|
(table) => ({
|
|
729
|
+
tenantIdx: (0, import_pg_core.index)("group_memberships_tenant_id_idx").on(table.tenant_id),
|
|
611
730
|
pk: (0, import_pg_core.primaryKey)({ columns: [table.group_id, table.user_id] }),
|
|
612
731
|
userIdx: (0, import_pg_core.index)("group_memberships_user_idx").on(table.user_id)
|
|
613
732
|
})
|
|
@@ -615,6 +734,7 @@ var groupMemberships = (0, import_pg_core.pgTable)(
|
|
|
615
734
|
var branchGroupGrants = (0, import_pg_core.pgTable)(
|
|
616
735
|
"branch_group_grants",
|
|
617
736
|
{
|
|
737
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
618
738
|
branch_id: (0, import_pg_core.varchar)("branch_id", { length: 36 }).notNull().references(() => branches.branch_id, { onDelete: "cascade" }),
|
|
619
739
|
group_id: (0, import_pg_core.varchar)("group_id", { length: 36 }).notNull().references(() => groups.group_id, { onDelete: "cascade" }),
|
|
620
740
|
can: (0, import_pg_core.text)("can", { enum: [...BRANCH_PERMISSION_LEVELS] }).notNull().default("view"),
|
|
@@ -626,6 +746,7 @@ var branchGroupGrants = (0, import_pg_core.pgTable)(
|
|
|
626
746
|
updated_at: t.timestamp("updated_at")
|
|
627
747
|
},
|
|
628
748
|
(table) => ({
|
|
749
|
+
tenantIdx: (0, import_pg_core.index)("branch_group_grants_tenant_id_idx").on(table.tenant_id),
|
|
629
750
|
pk: (0, import_pg_core.primaryKey)({ columns: [table.branch_id, table.group_id] }),
|
|
630
751
|
groupIdx: (0, import_pg_core.index)("branch_group_grants_group_idx").on(table.group_id)
|
|
631
752
|
})
|
|
@@ -633,6 +754,7 @@ var branchGroupGrants = (0, import_pg_core.pgTable)(
|
|
|
633
754
|
var boardGroupGrants = (0, import_pg_core.pgTable)(
|
|
634
755
|
"board_group_grants",
|
|
635
756
|
{
|
|
757
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
636
758
|
board_id: (0, import_pg_core.varchar)("board_id", { length: 36 }).notNull().references(() => boards.board_id, { onDelete: "cascade" }),
|
|
637
759
|
group_id: (0, import_pg_core.varchar)("group_id", { length: 36 }).notNull().references(() => groups.group_id, { onDelete: "cascade" }),
|
|
638
760
|
can: (0, import_pg_core.text)("can", { enum: [...BRANCH_PERMISSION_LEVELS] }).notNull().default("view"),
|
|
@@ -644,6 +766,7 @@ var boardGroupGrants = (0, import_pg_core.pgTable)(
|
|
|
644
766
|
updated_at: t.timestamp("updated_at")
|
|
645
767
|
},
|
|
646
768
|
(table) => ({
|
|
769
|
+
tenantIdx: (0, import_pg_core.index)("board_group_grants_tenant_id_idx").on(table.tenant_id),
|
|
647
770
|
pk: (0, import_pg_core.primaryKey)({ columns: [table.board_id, table.group_id] }),
|
|
648
771
|
groupIdx: (0, import_pg_core.index)("board_group_grants_group_idx").on(table.group_id)
|
|
649
772
|
})
|
|
@@ -651,6 +774,7 @@ var boardGroupGrants = (0, import_pg_core.pgTable)(
|
|
|
651
774
|
var appVariables = (0, import_pg_core.pgTable)(
|
|
652
775
|
"app_variables",
|
|
653
776
|
{
|
|
777
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
654
778
|
variable_id: (0, import_pg_core.varchar)("variable_id", { length: 36 }).primaryKey(),
|
|
655
779
|
namespace: (0, import_pg_core.text)("namespace").notNull(),
|
|
656
780
|
key: (0, import_pg_core.text)("key").notNull(),
|
|
@@ -666,13 +790,19 @@ var appVariables = (0, import_pg_core.pgTable)(
|
|
|
666
790
|
updated_at: t.timestamp("updated_at").notNull()
|
|
667
791
|
},
|
|
668
792
|
(table) => ({
|
|
669
|
-
|
|
793
|
+
tenantIdx: (0, import_pg_core.index)("app_variables_tenant_id_idx").on(table.tenant_id),
|
|
794
|
+
namespaceKeyIdx: (0, import_pg_core.uniqueIndex)("app_variables_tenant_namespace_key_unique").on(
|
|
795
|
+
table.tenant_id,
|
|
796
|
+
table.namespace,
|
|
797
|
+
table.key
|
|
798
|
+
),
|
|
670
799
|
namespaceIdx: (0, import_pg_core.index)("app_variables_namespace_idx").on(table.namespace)
|
|
671
800
|
})
|
|
672
801
|
);
|
|
673
802
|
var userApiKeys = (0, import_pg_core.pgTable)(
|
|
674
803
|
"user_api_keys",
|
|
675
804
|
{
|
|
805
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
676
806
|
id: (0, import_pg_core.varchar)("id", { length: 36 }).primaryKey(),
|
|
677
807
|
user_id: (0, import_pg_core.varchar)("user_id", { length: 36 }).notNull().references(() => users.user_id, { onDelete: "cascade" }),
|
|
678
808
|
name: (0, import_pg_core.text)("name").notNull(),
|
|
@@ -684,6 +814,7 @@ var userApiKeys = (0, import_pg_core.pgTable)(
|
|
|
684
814
|
last_used_at: t.timestamp("last_used_at")
|
|
685
815
|
},
|
|
686
816
|
(table) => ({
|
|
817
|
+
tenantIdx: (0, import_pg_core.index)("user_api_keys_tenant_id_idx").on(table.tenant_id),
|
|
687
818
|
userIdx: (0, import_pg_core.index)("user_api_keys_user_idx").on(table.user_id),
|
|
688
819
|
prefixIdx: (0, import_pg_core.index)("user_api_keys_prefix_idx").on(table.prefix)
|
|
689
820
|
})
|
|
@@ -691,6 +822,7 @@ var userApiKeys = (0, import_pg_core.pgTable)(
|
|
|
691
822
|
var mcpServers = (0, import_pg_core.pgTable)(
|
|
692
823
|
"mcp_servers",
|
|
693
824
|
{
|
|
825
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
694
826
|
// Primary identity
|
|
695
827
|
mcp_server_id: (0, import_pg_core.varchar)("mcp_server_id", { length: 36 }).primaryKey(),
|
|
696
828
|
created_at: t.timestamp("created_at").notNull(),
|
|
@@ -717,6 +849,7 @@ var mcpServers = (0, import_pg_core.pgTable)(
|
|
|
717
849
|
data: t.json("data").$type().notNull()
|
|
718
850
|
},
|
|
719
851
|
(table) => ({
|
|
852
|
+
tenantIdx: (0, import_pg_core.index)("mcp_servers_tenant_id_idx").on(table.tenant_id),
|
|
720
853
|
nameIdx: (0, import_pg_core.index)("mcp_servers_name_idx").on(table.name),
|
|
721
854
|
scopeIdx: (0, import_pg_core.index)("mcp_servers_scope_idx").on(table.scope),
|
|
722
855
|
ownerIdx: (0, import_pg_core.index)("mcp_servers_owner_idx").on(table.owner_user_id),
|
|
@@ -726,6 +859,7 @@ var mcpServers = (0, import_pg_core.pgTable)(
|
|
|
726
859
|
var cardTypes = (0, import_pg_core.pgTable)(
|
|
727
860
|
"card_types",
|
|
728
861
|
{
|
|
862
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
729
863
|
card_type_id: (0, import_pg_core.varchar)("card_type_id", { length: 36 }).primaryKey(),
|
|
730
864
|
name: (0, import_pg_core.text)("name").notNull(),
|
|
731
865
|
emoji: (0, import_pg_core.text)("emoji"),
|
|
@@ -737,12 +871,14 @@ var cardTypes = (0, import_pg_core.pgTable)(
|
|
|
737
871
|
updated_at: t.timestamp("updated_at").notNull()
|
|
738
872
|
},
|
|
739
873
|
(table) => ({
|
|
874
|
+
tenantIdx: (0, import_pg_core.index)("card_types_tenant_id_idx").on(table.tenant_id),
|
|
740
875
|
nameIdx: (0, import_pg_core.index)("card_types_name_idx").on(table.name)
|
|
741
876
|
})
|
|
742
877
|
);
|
|
743
878
|
var cards = (0, import_pg_core.pgTable)(
|
|
744
879
|
"cards",
|
|
745
880
|
{
|
|
881
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
746
882
|
card_id: (0, import_pg_core.varchar)("card_id", { length: 36 }).primaryKey(),
|
|
747
883
|
board_id: (0, import_pg_core.varchar)("board_id", { length: 36 }).notNull().references(() => boards.board_id, { onDelete: "cascade" }),
|
|
748
884
|
card_type_id: (0, import_pg_core.varchar)("card_type_id", { length: 36 }).references(() => cardTypes.card_type_id, {
|
|
@@ -763,6 +899,7 @@ var cards = (0, import_pg_core.pgTable)(
|
|
|
763
899
|
archived_at: t.timestamp("archived_at")
|
|
764
900
|
},
|
|
765
901
|
(table) => ({
|
|
902
|
+
tenantIdx: (0, import_pg_core.index)("cards_tenant_id_idx").on(table.tenant_id),
|
|
766
903
|
boardIdx: (0, import_pg_core.index)("cards_board_idx").on(table.board_id),
|
|
767
904
|
cardTypeIdx: (0, import_pg_core.index)("cards_card_type_idx").on(table.card_type_id),
|
|
768
905
|
titleIdx: (0, import_pg_core.index)("cards_title_idx").on(table.title),
|
|
@@ -773,10 +910,17 @@ var cards = (0, import_pg_core.pgTable)(
|
|
|
773
910
|
var artifacts = (0, import_pg_core.pgTable)(
|
|
774
911
|
"artifacts",
|
|
775
912
|
{
|
|
913
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
776
914
|
artifact_id: (0, import_pg_core.varchar)("artifact_id", { length: 36 }).primaryKey(),
|
|
777
915
|
branch_id: (0, import_pg_core.varchar)("branch_id", { length: 36 }).references(() => branches.branch_id, {
|
|
778
916
|
onDelete: "set null"
|
|
779
917
|
}),
|
|
918
|
+
source_session_id: (0, import_pg_core.varchar)("source_session_id", { length: 36 }).references(
|
|
919
|
+
() => sessions.session_id,
|
|
920
|
+
{
|
|
921
|
+
onDelete: "set null"
|
|
922
|
+
}
|
|
923
|
+
),
|
|
780
924
|
board_id: (0, import_pg_core.varchar)("board_id", { length: 36 }).notNull().references(() => boards.board_id, { onDelete: "cascade" }),
|
|
781
925
|
name: (0, import_pg_core.text)("name").notNull(),
|
|
782
926
|
description: (0, import_pg_core.text)("description"),
|
|
@@ -802,7 +946,9 @@ var artifacts = (0, import_pg_core.pgTable)(
|
|
|
802
946
|
archived_at: t.timestamp("archived_at")
|
|
803
947
|
},
|
|
804
948
|
(table) => ({
|
|
949
|
+
tenantIdx: (0, import_pg_core.index)("artifacts_tenant_id_idx").on(table.tenant_id),
|
|
805
950
|
branchIdx: (0, import_pg_core.index)("artifacts_branch_idx").on(table.branch_id),
|
|
951
|
+
sourceSessionIdx: (0, import_pg_core.index)("artifacts_source_session_idx").on(table.source_session_id),
|
|
806
952
|
boardIdx: (0, import_pg_core.index)("artifacts_board_idx").on(table.board_id),
|
|
807
953
|
archivedIdx: (0, import_pg_core.index)("artifacts_archived_idx").on(table.archived),
|
|
808
954
|
publicIdx: (0, import_pg_core.index)("artifacts_public_idx").on(table.public)
|
|
@@ -811,6 +957,7 @@ var artifacts = (0, import_pg_core.pgTable)(
|
|
|
811
957
|
var artifactTrustGrants = (0, import_pg_core.pgTable)(
|
|
812
958
|
"artifact_trust_grants",
|
|
813
959
|
{
|
|
960
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
814
961
|
grant_id: (0, import_pg_core.varchar)("grant_id", { length: 36 }).primaryKey(),
|
|
815
962
|
user_id: (0, import_pg_core.varchar)("user_id", { length: 36 }).notNull(),
|
|
816
963
|
scope_type: (0, import_pg_core.text)("scope_type").notNull(),
|
|
@@ -821,6 +968,7 @@ var artifactTrustGrants = (0, import_pg_core.pgTable)(
|
|
|
821
968
|
revoked_at: t.timestamp("revoked_at")
|
|
822
969
|
},
|
|
823
970
|
(table) => ({
|
|
971
|
+
tenantIdx: (0, import_pg_core.index)("artifact_trust_grants_tenant_id_idx").on(table.tenant_id),
|
|
824
972
|
userIdx: (0, import_pg_core.index)("artifact_trust_grants_user_idx").on(table.user_id),
|
|
825
973
|
scopeIdx: (0, import_pg_core.index)("artifact_trust_grants_scope_idx").on(table.scope_type, table.scope_value)
|
|
826
974
|
})
|
|
@@ -828,6 +976,7 @@ var artifactTrustGrants = (0, import_pg_core.pgTable)(
|
|
|
828
976
|
var boardObjects = (0, import_pg_core.pgTable)(
|
|
829
977
|
"board_objects",
|
|
830
978
|
{
|
|
979
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
831
980
|
// Primary identity
|
|
832
981
|
object_id: (0, import_pg_core.varchar)("object_id", { length: 36 }).primaryKey(),
|
|
833
982
|
board_id: (0, import_pg_core.varchar)("board_id", { length: 36 }).notNull().references(() => boards.board_id, { onDelete: "cascade" }),
|
|
@@ -843,6 +992,7 @@ var boardObjects = (0, import_pg_core.pgTable)(
|
|
|
843
992
|
data: t.json("data").$type().notNull()
|
|
844
993
|
},
|
|
845
994
|
(table) => ({
|
|
995
|
+
tenantIdx: (0, import_pg_core.index)("board_objects_tenant_id_idx").on(table.tenant_id),
|
|
846
996
|
boardIdx: (0, import_pg_core.index)("board_objects_board_idx").on(table.board_id),
|
|
847
997
|
branchIdx: (0, import_pg_core.index)("board_objects_branch_idx").on(table.branch_id),
|
|
848
998
|
cardIdx: (0, import_pg_core.index)("board_objects_card_idx").on(table.card_id)
|
|
@@ -851,12 +1001,14 @@ var boardObjects = (0, import_pg_core.pgTable)(
|
|
|
851
1001
|
var sessionMcpServers = (0, import_pg_core.pgTable)(
|
|
852
1002
|
"session_mcp_servers",
|
|
853
1003
|
{
|
|
1004
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
854
1005
|
session_id: (0, import_pg_core.varchar)("session_id", { length: 36 }).notNull().references(() => sessions.session_id, { onDelete: "cascade" }),
|
|
855
1006
|
mcp_server_id: (0, import_pg_core.varchar)("mcp_server_id", { length: 36 }).notNull().references(() => mcpServers.mcp_server_id, { onDelete: "cascade" }),
|
|
856
1007
|
enabled: t.bool("enabled").notNull().default(true),
|
|
857
1008
|
added_at: t.timestamp("added_at").notNull()
|
|
858
1009
|
},
|
|
859
1010
|
(table) => ({
|
|
1011
|
+
tenantIdx: (0, import_pg_core.index)("session_mcp_servers_tenant_id_idx").on(table.tenant_id),
|
|
860
1012
|
// Composite primary key
|
|
861
1013
|
pk: (0, import_pg_core.index)("session_mcp_servers_pk").on(table.session_id, table.mcp_server_id),
|
|
862
1014
|
// Indexes for queries
|
|
@@ -868,6 +1020,7 @@ var sessionMcpServers = (0, import_pg_core.pgTable)(
|
|
|
868
1020
|
var userMcpOauthTokens = (0, import_pg_core.pgTable)(
|
|
869
1021
|
"user_mcp_oauth_tokens",
|
|
870
1022
|
{
|
|
1023
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
871
1024
|
// NULL = shared-mode token (one per mcp_server_id)
|
|
872
1025
|
user_id: (0, import_pg_core.varchar)("user_id", { length: 36 }).references(() => users.user_id, {
|
|
873
1026
|
onDelete: "cascade"
|
|
@@ -885,6 +1038,7 @@ var userMcpOauthTokens = (0, import_pg_core.pgTable)(
|
|
|
885
1038
|
updated_at: t.timestamp("updated_at")
|
|
886
1039
|
},
|
|
887
1040
|
(table) => ({
|
|
1041
|
+
tenantIdx: (0, import_pg_core.index)("user_mcp_oauth_tokens_tenant_id_idx").on(table.tenant_id),
|
|
888
1042
|
// Composite lookup indexes. Uniqueness enforced via partial unique indexes
|
|
889
1043
|
// created in the migration (one for per-user rows, one for the shared row).
|
|
890
1044
|
pk: (0, import_pg_core.index)("user_mcp_oauth_tokens_pk").on(table.user_id, table.mcp_server_id),
|
|
@@ -895,6 +1049,7 @@ var userMcpOauthTokens = (0, import_pg_core.pgTable)(
|
|
|
895
1049
|
var boardComments = (0, import_pg_core.pgTable)(
|
|
896
1050
|
"board_comments",
|
|
897
1051
|
{
|
|
1052
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
898
1053
|
// Primary identity
|
|
899
1054
|
comment_id: (0, import_pg_core.varchar)("comment_id", { length: 36 }).primaryKey(),
|
|
900
1055
|
created_at: t.timestamp("created_at").notNull(),
|
|
@@ -936,6 +1091,7 @@ var boardComments = (0, import_pg_core.pgTable)(
|
|
|
936
1091
|
data: t.json("data").$type().notNull()
|
|
937
1092
|
},
|
|
938
1093
|
(table) => ({
|
|
1094
|
+
tenantIdx: (0, import_pg_core.index)("board_comments_tenant_id_idx").on(table.tenant_id),
|
|
939
1095
|
boardIdx: (0, import_pg_core.index)("board_comments_board_idx").on(table.board_id),
|
|
940
1096
|
sessionIdx: (0, import_pg_core.index)("board_comments_session_idx").on(table.session_id),
|
|
941
1097
|
taskIdx: (0, import_pg_core.index)("board_comments_task_idx").on(table.task_id),
|
|
@@ -950,6 +1106,7 @@ var boardComments = (0, import_pg_core.pgTable)(
|
|
|
950
1106
|
var gatewayChannels = (0, import_pg_core.pgTable)(
|
|
951
1107
|
"gateway_channels",
|
|
952
1108
|
{
|
|
1109
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
953
1110
|
// Primary identity
|
|
954
1111
|
id: (0, import_pg_core.varchar)("id", { length: 36 }).primaryKey(),
|
|
955
1112
|
created_at: t.timestamp("created_at").notNull(),
|
|
@@ -959,11 +1116,11 @@ var gatewayChannels = (0, import_pg_core.pgTable)(
|
|
|
959
1116
|
// Materialized for queries
|
|
960
1117
|
name: (0, import_pg_core.text)("name").notNull(),
|
|
961
1118
|
channel_type: (0, import_pg_core.text)("channel_type", {
|
|
962
|
-
enum: ["slack", "discord", "whatsapp", "telegram", "github"]
|
|
1119
|
+
enum: ["slack", "discord", "whatsapp", "telegram", "github", "teams"]
|
|
963
1120
|
}).notNull(),
|
|
964
1121
|
target_branch_id: (0, import_pg_core.varchar)("target_branch_id", { length: 36 }).notNull().references(() => branches.branch_id, { onDelete: "cascade" }),
|
|
965
1122
|
agor_user_id: (0, import_pg_core.varchar)("agor_user_id", { length: 36 }).notNull(),
|
|
966
|
-
channel_key: (0, import_pg_core.text)("channel_key").notNull()
|
|
1123
|
+
channel_key: (0, import_pg_core.text)("channel_key").notNull(),
|
|
967
1124
|
enabled: t.bool("enabled").notNull().default(true),
|
|
968
1125
|
last_message_at: t.timestamp("last_message_at"),
|
|
969
1126
|
// JSON blob for platform credentials (encrypted at rest)
|
|
@@ -972,13 +1129,19 @@ var gatewayChannels = (0, import_pg_core.pgTable)(
|
|
|
972
1129
|
agentic_config: t.json("agentic_config")
|
|
973
1130
|
},
|
|
974
1131
|
(table) => ({
|
|
1132
|
+
tenantIdx: (0, import_pg_core.index)("gateway_channels_tenant_id_idx").on(table.tenant_id),
|
|
975
1133
|
channelKeyIdx: (0, import_pg_core.index)("idx_gateway_channel_key").on(table.channel_key),
|
|
1134
|
+
channelKeyTenantUnique: (0, import_pg_core.uniqueIndex)("gateway_channels_tenant_channel_key_unique").on(
|
|
1135
|
+
table.tenant_id,
|
|
1136
|
+
table.channel_key
|
|
1137
|
+
),
|
|
976
1138
|
enabledTypeIdx: (0, import_pg_core.index)("idx_gateway_enabled_type").on(table.enabled, table.channel_type)
|
|
977
1139
|
})
|
|
978
1140
|
);
|
|
979
1141
|
var threadSessionMap = (0, import_pg_core.pgTable)(
|
|
980
1142
|
"thread_session_map",
|
|
981
1143
|
{
|
|
1144
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
982
1145
|
// Primary identity
|
|
983
1146
|
id: (0, import_pg_core.varchar)("id", { length: 36 }).primaryKey(),
|
|
984
1147
|
created_at: t.timestamp("created_at").notNull(),
|
|
@@ -996,7 +1159,9 @@ var threadSessionMap = (0, import_pg_core.pgTable)(
|
|
|
996
1159
|
metadata: t.json("metadata")
|
|
997
1160
|
},
|
|
998
1161
|
(table) => ({
|
|
999
|
-
|
|
1162
|
+
tenantIdx: (0, import_pg_core.index)("thread_session_map_tenant_id_idx").on(table.tenant_id),
|
|
1163
|
+
uniqueChannelThread: (0, import_pg_core.uniqueIndex)("uniq_thread_map_tenant_channel_thread").on(
|
|
1164
|
+
table.tenant_id,
|
|
1000
1165
|
table.channel_id,
|
|
1001
1166
|
table.thread_id
|
|
1002
1167
|
),
|
|
@@ -1005,14 +1170,82 @@ var threadSessionMap = (0, import_pg_core.pgTable)(
|
|
|
1005
1170
|
channelStatusIdx: (0, import_pg_core.index)("idx_thread_map_channel_status").on(table.channel_id, table.status)
|
|
1006
1171
|
})
|
|
1007
1172
|
);
|
|
1173
|
+
var gatewayOutboundMessages = (0, import_pg_core.pgTable)(
|
|
1174
|
+
"gateway_outbound_messages",
|
|
1175
|
+
{
|
|
1176
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
1177
|
+
id: (0, import_pg_core.varchar)("id", { length: 36 }).primaryKey(),
|
|
1178
|
+
created_at: t.timestamp("created_at").notNull(),
|
|
1179
|
+
updated_at: t.timestamp("updated_at").notNull(),
|
|
1180
|
+
gateway_channel_id: (0, import_pg_core.varchar)("gateway_channel_id", { length: 36 }).notNull().references(() => gatewayChannels.id, { onDelete: "cascade" }),
|
|
1181
|
+
channel_type: (0, import_pg_core.text)("channel_type", {
|
|
1182
|
+
enum: ["slack", "discord", "whatsapp", "telegram", "github", "teams"]
|
|
1183
|
+
}).notNull(),
|
|
1184
|
+
platform_channel_id: (0, import_pg_core.text)("platform_channel_id").notNull(),
|
|
1185
|
+
platform_message_id: (0, import_pg_core.text)("platform_message_id").notNull(),
|
|
1186
|
+
platform_thread_id: (0, import_pg_core.text)("platform_thread_id").notNull(),
|
|
1187
|
+
platform_permalink: (0, import_pg_core.text)("platform_permalink"),
|
|
1188
|
+
target_branch_id: (0, import_pg_core.varchar)("target_branch_id", { length: 36 }).notNull().references(() => branches.branch_id),
|
|
1189
|
+
emitted_by_user_id: (0, import_pg_core.varchar)("emitted_by_user_id", { length: 36 }).notNull().references(() => users.user_id),
|
|
1190
|
+
emitted_by_session_id: (0, import_pg_core.varchar)("emitted_by_session_id", { length: 36 }).references(
|
|
1191
|
+
() => sessions.session_id,
|
|
1192
|
+
{
|
|
1193
|
+
onDelete: "set null"
|
|
1194
|
+
}
|
|
1195
|
+
),
|
|
1196
|
+
emitted_by_task_id: (0, import_pg_core.varchar)("emitted_by_task_id", { length: 36 }).references(
|
|
1197
|
+
() => tasks.task_id,
|
|
1198
|
+
{
|
|
1199
|
+
onDelete: "set null"
|
|
1200
|
+
}
|
|
1201
|
+
),
|
|
1202
|
+
emitted_by_schedule_id: (0, import_pg_core.varchar)("emitted_by_schedule_id", { length: 36 }).references(
|
|
1203
|
+
() => schedules.schedule_id,
|
|
1204
|
+
{
|
|
1205
|
+
onDelete: "set null"
|
|
1206
|
+
}
|
|
1207
|
+
),
|
|
1208
|
+
message_text: (0, import_pg_core.text)("message_text").notNull(),
|
|
1209
|
+
message_preview: (0, import_pg_core.text)("message_preview").notNull(),
|
|
1210
|
+
metadata: t.json("metadata"),
|
|
1211
|
+
consumed_by_session_id: (0, import_pg_core.varchar)("consumed_by_session_id", { length: 36 }).references(
|
|
1212
|
+
() => sessions.session_id,
|
|
1213
|
+
{
|
|
1214
|
+
onDelete: "set null"
|
|
1215
|
+
}
|
|
1216
|
+
),
|
|
1217
|
+
consumed_at: t.timestamp("consumed_at")
|
|
1218
|
+
},
|
|
1219
|
+
(table) => ({
|
|
1220
|
+
tenantIdx: (0, import_pg_core.index)("gateway_outbound_messages_tenant_id_idx").on(table.tenant_id),
|
|
1221
|
+
uniqueChannelThread: (0, import_pg_core.uniqueIndex)("uniq_gateway_outbound_tenant_channel_thread").on(
|
|
1222
|
+
table.tenant_id,
|
|
1223
|
+
table.gateway_channel_id,
|
|
1224
|
+
table.platform_thread_id
|
|
1225
|
+
),
|
|
1226
|
+
emittedSessionIdx: (0, import_pg_core.index)("idx_gateway_outbound_emitted_session").on(
|
|
1227
|
+
table.emitted_by_session_id
|
|
1228
|
+
),
|
|
1229
|
+
emittedScheduleIdx: (0, import_pg_core.index)("idx_gateway_outbound_emitted_schedule").on(
|
|
1230
|
+
table.emitted_by_schedule_id
|
|
1231
|
+
),
|
|
1232
|
+
targetBranchCreatedIdx: (0, import_pg_core.index)("idx_gateway_outbound_branch_created").on(
|
|
1233
|
+
table.target_branch_id,
|
|
1234
|
+
table.created_at
|
|
1235
|
+
),
|
|
1236
|
+
consumedIdx: (0, import_pg_core.index)("idx_gateway_outbound_consumed").on(table.consumed_at)
|
|
1237
|
+
})
|
|
1238
|
+
);
|
|
1008
1239
|
var sessionEnvSelections = (0, import_pg_core.pgTable)(
|
|
1009
1240
|
"session_env_selections",
|
|
1010
1241
|
{
|
|
1242
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
1011
1243
|
session_id: (0, import_pg_core.varchar)("session_id", { length: 36 }).notNull().references(() => sessions.session_id, { onDelete: "cascade" }),
|
|
1012
1244
|
env_var_name: (0, import_pg_core.text)("env_var_name").notNull(),
|
|
1013
1245
|
created_at: t.timestamp("created_at").notNull()
|
|
1014
1246
|
},
|
|
1015
1247
|
(table) => ({
|
|
1248
|
+
tenantIdx: (0, import_pg_core.index)("session_env_selections_tenant_id_idx").on(table.tenant_id),
|
|
1016
1249
|
pk: (0, import_pg_core.primaryKey)({ columns: [table.session_id, table.env_var_name] }),
|
|
1017
1250
|
sessionIdx: (0, import_pg_core.index)("session_env_selections_session_idx").on(table.session_id)
|
|
1018
1251
|
})
|
|
@@ -1020,6 +1253,7 @@ var sessionEnvSelections = (0, import_pg_core.pgTable)(
|
|
|
1020
1253
|
var kbNamespaces = (0, import_pg_core.pgTable)(
|
|
1021
1254
|
"kb_namespaces",
|
|
1022
1255
|
{
|
|
1256
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
1023
1257
|
namespace_id: (0, import_pg_core.varchar)("namespace_id", { length: 36 }).primaryKey(),
|
|
1024
1258
|
slug: (0, import_pg_core.text)("slug").notNull(),
|
|
1025
1259
|
display_name: (0, import_pg_core.text)("display_name").notNull(),
|
|
@@ -1046,7 +1280,8 @@ var kbNamespaces = (0, import_pg_core.pgTable)(
|
|
|
1046
1280
|
archived_at: t.timestamp("archived_at")
|
|
1047
1281
|
},
|
|
1048
1282
|
(table) => ({
|
|
1049
|
-
|
|
1283
|
+
tenantIdx: (0, import_pg_core.index)("kb_namespaces_tenant_id_idx").on(table.tenant_id),
|
|
1284
|
+
slugIdx: (0, import_pg_core.uniqueIndex)("kb_namespaces_tenant_slug_unique").on(table.tenant_id, table.slug).where(import_drizzle_orm2.sql`${table.archived} = false`),
|
|
1050
1285
|
kindIdx: (0, import_pg_core.index)("kb_namespaces_kind_idx").on(table.kind),
|
|
1051
1286
|
ownerIdx: (0, import_pg_core.index)("kb_namespaces_owner_idx").on(table.owner_user_id),
|
|
1052
1287
|
repoIdx: (0, import_pg_core.index)("kb_namespaces_repo_idx").on(table.repo_id),
|
|
@@ -1057,6 +1292,7 @@ var kbNamespaces = (0, import_pg_core.pgTable)(
|
|
|
1057
1292
|
var kbNamespaceAcl = (0, import_pg_core.pgTable)(
|
|
1058
1293
|
"kb_namespace_acl",
|
|
1059
1294
|
{
|
|
1295
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
1060
1296
|
namespace_acl_id: (0, import_pg_core.varchar)("namespace_acl_id", { length: 36 }).primaryKey(),
|
|
1061
1297
|
namespace_id: (0, import_pg_core.varchar)("namespace_id", { length: 36 }).notNull().references(() => kbNamespaces.namespace_id, { onDelete: "cascade" }),
|
|
1062
1298
|
subject_type: (0, import_pg_core.text)("subject_type", { enum: ["user", "group"] }).notNull(),
|
|
@@ -1069,9 +1305,11 @@ var kbNamespaceAcl = (0, import_pg_core.pgTable)(
|
|
|
1069
1305
|
updated_at: t.timestamp("updated_at")
|
|
1070
1306
|
},
|
|
1071
1307
|
(table) => ({
|
|
1308
|
+
tenantIdx: (0, import_pg_core.index)("kb_namespace_acl_tenant_id_idx").on(table.tenant_id),
|
|
1072
1309
|
namespaceIdx: (0, import_pg_core.index)("kb_namespace_acl_namespace_idx").on(table.namespace_id),
|
|
1073
1310
|
subjectIdx: (0, import_pg_core.index)("kb_namespace_acl_subject_idx").on(table.subject_type, table.subject_id),
|
|
1074
|
-
namespaceSubjectIdx: (0, import_pg_core.uniqueIndex)("
|
|
1311
|
+
namespaceSubjectIdx: (0, import_pg_core.uniqueIndex)("kb_namespace_acl_tenant_namespace_subject_unique").on(
|
|
1312
|
+
table.tenant_id,
|
|
1075
1313
|
table.namespace_id,
|
|
1076
1314
|
table.subject_type,
|
|
1077
1315
|
table.subject_id
|
|
@@ -1081,6 +1319,7 @@ var kbNamespaceAcl = (0, import_pg_core.pgTable)(
|
|
|
1081
1319
|
var kbDocuments = (0, import_pg_core.pgTable)(
|
|
1082
1320
|
"kb_documents",
|
|
1083
1321
|
{
|
|
1322
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
1084
1323
|
document_id: (0, import_pg_core.varchar)("document_id", { length: 36 }).primaryKey(),
|
|
1085
1324
|
namespace_id: (0, import_pg_core.varchar)("namespace_id", { length: 36 }).notNull().references(() => kbNamespaces.namespace_id, { onDelete: "cascade" }),
|
|
1086
1325
|
path: (0, import_pg_core.text)("path").notNull(),
|
|
@@ -1108,8 +1347,9 @@ var kbDocuments = (0, import_pg_core.pgTable)(
|
|
|
1108
1347
|
archived_at: t.timestamp("archived_at")
|
|
1109
1348
|
},
|
|
1110
1349
|
(table) => ({
|
|
1111
|
-
|
|
1112
|
-
|
|
1350
|
+
tenantIdx: (0, import_pg_core.index)("kb_documents_tenant_id_idx").on(table.tenant_id),
|
|
1351
|
+
namespacePathIdx: (0, import_pg_core.uniqueIndex)("kb_documents_tenant_namespace_path_unique").on(table.tenant_id, table.namespace_id, table.path).where(import_drizzle_orm2.sql`${table.archived} = false`),
|
|
1352
|
+
uriIdx: (0, import_pg_core.uniqueIndex)("kb_documents_tenant_uri_unique").on(table.tenant_id, table.uri).where(import_drizzle_orm2.sql`${table.archived} = false`),
|
|
1113
1353
|
namespaceIdx: (0, import_pg_core.index)("kb_documents_namespace_idx").on(table.namespace_id),
|
|
1114
1354
|
kindIdx: (0, import_pg_core.index)("kb_documents_kind_idx").on(table.kind),
|
|
1115
1355
|
visibilityIdx: (0, import_pg_core.index)("kb_documents_visibility_idx").on(table.visibility),
|
|
@@ -1122,6 +1362,7 @@ var kbDocuments = (0, import_pg_core.pgTable)(
|
|
|
1122
1362
|
var kbDocumentVersions = (0, import_pg_core.pgTable)(
|
|
1123
1363
|
"kb_document_versions",
|
|
1124
1364
|
{
|
|
1365
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
1125
1366
|
version_id: (0, import_pg_core.varchar)("version_id", { length: 36 }).primaryKey(),
|
|
1126
1367
|
document_id: (0, import_pg_core.varchar)("document_id", { length: 36 }).notNull().references(() => kbDocuments.document_id, { onDelete: "cascade" }),
|
|
1127
1368
|
version_number: (0, import_pg_core.integer)("version_number").notNull(),
|
|
@@ -1141,7 +1382,9 @@ var kbDocumentVersions = (0, import_pg_core.pgTable)(
|
|
|
1141
1382
|
created_at: t.timestamp("created_at").notNull()
|
|
1142
1383
|
},
|
|
1143
1384
|
(table) => ({
|
|
1144
|
-
|
|
1385
|
+
tenantIdx: (0, import_pg_core.index)("kb_document_versions_tenant_id_idx").on(table.tenant_id),
|
|
1386
|
+
documentVersionIdx: (0, import_pg_core.uniqueIndex)("kb_document_versions_tenant_document_version_unique").on(
|
|
1387
|
+
table.tenant_id,
|
|
1145
1388
|
table.document_id,
|
|
1146
1389
|
table.version_number
|
|
1147
1390
|
),
|
|
@@ -1153,6 +1396,7 @@ var kbDocumentVersions = (0, import_pg_core.pgTable)(
|
|
|
1153
1396
|
var kbDocumentUnits = (0, import_pg_core.pgTable)(
|
|
1154
1397
|
"kb_document_units",
|
|
1155
1398
|
{
|
|
1399
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
1156
1400
|
unit_id: (0, import_pg_core.varchar)("unit_id", { length: 36 }).primaryKey(),
|
|
1157
1401
|
document_id: (0, import_pg_core.varchar)("document_id", { length: 36 }).notNull().references(() => kbDocuments.document_id, { onDelete: "cascade" }),
|
|
1158
1402
|
version_id: (0, import_pg_core.varchar)("version_id", { length: 36 }).notNull().references(() => kbDocumentVersions.version_id, { onDelete: "cascade" }),
|
|
@@ -1177,6 +1421,7 @@ var kbDocumentUnits = (0, import_pg_core.pgTable)(
|
|
|
1177
1421
|
updated_at: t.timestamp("updated_at")
|
|
1178
1422
|
},
|
|
1179
1423
|
(table) => ({
|
|
1424
|
+
tenantIdx: (0, import_pg_core.index)("kb_document_units_tenant_id_idx").on(table.tenant_id),
|
|
1180
1425
|
documentIdx: (0, import_pg_core.index)("kb_document_units_document_idx").on(table.document_id),
|
|
1181
1426
|
versionIdx: (0, import_pg_core.index)("kb_document_units_version_idx").on(table.version_id),
|
|
1182
1427
|
versionOrdinalIdx: (0, import_pg_core.index)("kb_document_units_version_ordinal_idx").on(
|
|
@@ -1190,6 +1435,7 @@ var kbDocumentUnits = (0, import_pg_core.pgTable)(
|
|
|
1190
1435
|
var kbEmbeddingSpaces = (0, import_pg_core.pgTable)(
|
|
1191
1436
|
"kb_embedding_spaces",
|
|
1192
1437
|
{
|
|
1438
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
1193
1439
|
embedding_space_id: (0, import_pg_core.varchar)("embedding_space_id", { length: 36 }).primaryKey(),
|
|
1194
1440
|
provider: (0, import_pg_core.text)("provider").notNull(),
|
|
1195
1441
|
model: (0, import_pg_core.text)("model").notNull(),
|
|
@@ -1202,7 +1448,9 @@ var kbEmbeddingSpaces = (0, import_pg_core.pgTable)(
|
|
|
1202
1448
|
updated_at: t.timestamp("updated_at")
|
|
1203
1449
|
},
|
|
1204
1450
|
(table) => ({
|
|
1205
|
-
|
|
1451
|
+
tenantIdx: (0, import_pg_core.index)("kb_embedding_spaces_tenant_id_idx").on(table.tenant_id),
|
|
1452
|
+
providerModelIdx: (0, import_pg_core.uniqueIndex)("kb_embedding_spaces_tenant_provider_model_unique").on(
|
|
1453
|
+
table.tenant_id,
|
|
1206
1454
|
table.provider,
|
|
1207
1455
|
table.model,
|
|
1208
1456
|
table.dimensions,
|
|
@@ -1215,6 +1463,7 @@ var kbEmbeddingSpaces = (0, import_pg_core.pgTable)(
|
|
|
1215
1463
|
var kbGraphNodes = (0, import_pg_core.pgTable)(
|
|
1216
1464
|
"kb_graph_nodes",
|
|
1217
1465
|
{
|
|
1466
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
1218
1467
|
node_id: (0, import_pg_core.varchar)("node_id", { length: 36 }).primaryKey(),
|
|
1219
1468
|
node_type: (0, import_pg_core.text)("node_type", {
|
|
1220
1469
|
enum: [
|
|
@@ -1280,7 +1529,8 @@ var kbGraphNodes = (0, import_pg_core.pgTable)(
|
|
|
1280
1529
|
archived_at: t.timestamp("archived_at")
|
|
1281
1530
|
},
|
|
1282
1531
|
(table) => ({
|
|
1283
|
-
|
|
1532
|
+
tenantIdx: (0, import_pg_core.index)("kb_graph_nodes_tenant_id_idx").on(table.tenant_id),
|
|
1533
|
+
uriIdx: (0, import_pg_core.uniqueIndex)("kb_graph_nodes_tenant_uri_unique").on(table.tenant_id, table.uri).where(import_drizzle_orm2.sql`${table.archived} = false`),
|
|
1284
1534
|
typeIdx: (0, import_pg_core.index)("kb_graph_nodes_type_idx").on(table.node_type),
|
|
1285
1535
|
namespaceIdx: (0, import_pg_core.index)("kb_graph_nodes_namespace_idx").on(table.namespace_id),
|
|
1286
1536
|
documentIdx: (0, import_pg_core.index)("kb_graph_nodes_document_idx").on(table.document_id),
|
|
@@ -1300,6 +1550,7 @@ var kbGraphNodes = (0, import_pg_core.pgTable)(
|
|
|
1300
1550
|
var kbGraphEdges = (0, import_pg_core.pgTable)(
|
|
1301
1551
|
"kb_graph_edges",
|
|
1302
1552
|
{
|
|
1553
|
+
tenant_id: (0, import_pg_core.text)("tenant_id").notNull().default("default"),
|
|
1303
1554
|
edge_id: (0, import_pg_core.varchar)("edge_id", { length: 36 }).primaryKey(),
|
|
1304
1555
|
source_node_id: (0, import_pg_core.varchar)("source_node_id", { length: 36 }).notNull().references(() => kbGraphNodes.node_id, { onDelete: "cascade" }),
|
|
1305
1556
|
target_node_id: (0, import_pg_core.varchar)("target_node_id", { length: 36 }).notNull().references(() => kbGraphNodes.node_id, { onDelete: "cascade" }),
|
|
@@ -1328,6 +1579,7 @@ var kbGraphEdges = (0, import_pg_core.pgTable)(
|
|
|
1328
1579
|
archived_at: t.timestamp("archived_at")
|
|
1329
1580
|
},
|
|
1330
1581
|
(table) => ({
|
|
1582
|
+
tenantIdx: (0, import_pg_core.index)("kb_graph_edges_tenant_id_idx").on(table.tenant_id),
|
|
1331
1583
|
sourceIdx: (0, import_pg_core.index)("kb_graph_edges_source_idx").on(table.source_node_id),
|
|
1332
1584
|
targetIdx: (0, import_pg_core.index)("kb_graph_edges_target_idx").on(table.target_node_id),
|
|
1333
1585
|
typeIdx: (0, import_pg_core.index)("kb_graph_edges_type_idx").on(table.edge_type),
|
|
@@ -1339,11 +1591,11 @@ var kbGraphEdges = (0, import_pg_core.pgTable)(
|
|
|
1339
1591
|
table.target_node_id,
|
|
1340
1592
|
table.edge_type
|
|
1341
1593
|
),
|
|
1342
|
-
sourceTargetTypeIdx: (0, import_pg_core.uniqueIndex)("
|
|
1594
|
+
sourceTargetTypeIdx: (0, import_pg_core.uniqueIndex)("kb_graph_edges_tenant_source_target_type_unique").on(table.tenant_id, table.source_node_id, table.target_node_id, table.edge_type).where(import_drizzle_orm2.sql`${table.archived} = false`),
|
|
1343
1595
|
archivedIdx: (0, import_pg_core.index)("kb_graph_edges_archived_idx").on(table.archived)
|
|
1344
1596
|
})
|
|
1345
1597
|
);
|
|
1346
|
-
var sessionsRelations = (0, import_drizzle_orm2.relations)(sessions, ({ one }) => ({
|
|
1598
|
+
var sessionsRelations = (0, import_drizzle_orm2.relations)(sessions, ({ one, many }) => ({
|
|
1347
1599
|
branch: one(branches, {
|
|
1348
1600
|
fields: [sessions.branch_id],
|
|
1349
1601
|
references: [branches.branch_id]
|
|
@@ -1351,6 +1603,24 @@ var sessionsRelations = (0, import_drizzle_orm2.relations)(sessions, ({ one }) =
|
|
|
1351
1603
|
schedule: one(schedules, {
|
|
1352
1604
|
fields: [sessions.schedule_id],
|
|
1353
1605
|
references: [schedules.schedule_id]
|
|
1606
|
+
}),
|
|
1607
|
+
outboundRelationships: many(sessionRelationships, { relationName: "relationshipSource" }),
|
|
1608
|
+
inboundRelationships: many(sessionRelationships, { relationName: "relationshipTarget" })
|
|
1609
|
+
}));
|
|
1610
|
+
var sessionRelationshipsRelations = (0, import_drizzle_orm2.relations)(sessionRelationships, ({ one }) => ({
|
|
1611
|
+
sourceSession: one(sessions, {
|
|
1612
|
+
fields: [sessionRelationships.source_session_id],
|
|
1613
|
+
references: [sessions.session_id],
|
|
1614
|
+
relationName: "relationshipSource"
|
|
1615
|
+
}),
|
|
1616
|
+
targetSession: one(sessions, {
|
|
1617
|
+
fields: [sessionRelationships.target_session_id],
|
|
1618
|
+
references: [sessions.session_id],
|
|
1619
|
+
relationName: "relationshipTarget"
|
|
1620
|
+
}),
|
|
1621
|
+
callbackSession: one(sessions, {
|
|
1622
|
+
fields: [sessionRelationships.callback_session_id],
|
|
1623
|
+
references: [sessions.session_id]
|
|
1354
1624
|
})
|
|
1355
1625
|
}));
|
|
1356
1626
|
var branchesRelations = (0, import_drizzle_orm2.relations)(branches, ({ many }) => ({
|
|
@@ -1383,6 +1653,7 @@ __export(schema_sqlite_exports, {
|
|
|
1383
1653
|
cardTypes: () => cardTypes2,
|
|
1384
1654
|
cards: () => cards2,
|
|
1385
1655
|
gatewayChannels: () => gatewayChannels2,
|
|
1656
|
+
gatewayOutboundMessages: () => gatewayOutboundMessages2,
|
|
1386
1657
|
groupMemberships: () => groupMemberships2,
|
|
1387
1658
|
groups: () => groups2,
|
|
1388
1659
|
kbDocumentUnits: () => kbDocumentUnits2,
|
|
@@ -1401,6 +1672,8 @@ __export(schema_sqlite_exports, {
|
|
|
1401
1672
|
serializedSessions: () => serializedSessions2,
|
|
1402
1673
|
sessionEnvSelections: () => sessionEnvSelections2,
|
|
1403
1674
|
sessionMcpServers: () => sessionMcpServers2,
|
|
1675
|
+
sessionRelationships: () => sessionRelationships2,
|
|
1676
|
+
sessionRelationshipsRelations: () => sessionRelationshipsRelations2,
|
|
1404
1677
|
sessions: () => sessions2,
|
|
1405
1678
|
sessionsRelations: () => sessionsRelations2,
|
|
1406
1679
|
tasks: () => tasks2,
|
|
@@ -1479,6 +1752,7 @@ var sessions2 = (0, import_sqlite_core.sqliteTable)(
|
|
|
1479
1752
|
},
|
|
1480
1753
|
(table) => ({
|
|
1481
1754
|
statusIdx: (0, import_sqlite_core.index)("sessions_status_idx").on(table.status),
|
|
1755
|
+
statusReadyIdx: (0, import_sqlite_core.index)("sessions_status_ready_idx").on(table.status, table.ready_for_prompt),
|
|
1482
1756
|
agenticToolIdx: (0, import_sqlite_core.index)("sessions_agentic_tool_idx").on(table.agentic_tool),
|
|
1483
1757
|
boardIdx: (0, import_sqlite_core.index)("sessions_board_idx").on(table.board_id),
|
|
1484
1758
|
branchIdx: (0, import_sqlite_core.index)("sessions_branch_idx").on(table.branch_id),
|
|
@@ -1495,6 +1769,39 @@ var sessions2 = (0, import_sqlite_core.sqliteTable)(
|
|
|
1495
1769
|
scheduleRunUnique: (0, import_sqlite_core.uniqueIndex)("sessions_schedule_run_unique").on(table.schedule_id, table.scheduled_run_at).where(import_drizzle_orm3.sql`${table.schedule_id} IS NOT NULL AND ${table.scheduled_run_at} IS NOT NULL`)
|
|
1496
1770
|
})
|
|
1497
1771
|
);
|
|
1772
|
+
var sessionRelationships2 = (0, import_sqlite_core.sqliteTable)(
|
|
1773
|
+
"session_relationships",
|
|
1774
|
+
{
|
|
1775
|
+
relationship_id: (0, import_sqlite_core.text)("relationship_id", { length: 36 }).primaryKey(),
|
|
1776
|
+
source_session_id: (0, import_sqlite_core.text)("source_session_id", { length: 36 }).notNull().references(() => sessions2.session_id, { onDelete: "cascade" }),
|
|
1777
|
+
target_session_id: (0, import_sqlite_core.text)("target_session_id", { length: 36 }).notNull().references(() => sessions2.session_id, { onDelete: "cascade" }),
|
|
1778
|
+
relationship_type: (0, import_sqlite_core.text)("relationship_type", { enum: ["remote_create"] }).notNull(),
|
|
1779
|
+
created_by: (0, import_sqlite_core.text)("created_by", { length: 36 }).notNull(),
|
|
1780
|
+
created_at: t2.timestamp("created_at").notNull(),
|
|
1781
|
+
updated_at: t2.timestamp("updated_at"),
|
|
1782
|
+
callback_enabled: t2.bool("callback_enabled").notNull().default(false),
|
|
1783
|
+
callback_session_id: (0, import_sqlite_core.text)("callback_session_id", { length: 36 }).references(
|
|
1784
|
+
() => sessions2.session_id,
|
|
1785
|
+
{
|
|
1786
|
+
onDelete: "set null"
|
|
1787
|
+
}
|
|
1788
|
+
),
|
|
1789
|
+
data: t2.json("data")
|
|
1790
|
+
},
|
|
1791
|
+
(table) => ({
|
|
1792
|
+
sourceIdx: (0, import_sqlite_core.index)("session_relationships_source_idx").on(table.source_session_id),
|
|
1793
|
+
targetIdx: (0, import_sqlite_core.index)("session_relationships_target_idx").on(table.target_session_id),
|
|
1794
|
+
callbackIdx: (0, import_sqlite_core.index)("session_relationships_callback_idx").on(table.callback_session_id),
|
|
1795
|
+
// Note: no tenant_source/tenant_target composite indexes here — SQLite schema
|
|
1796
|
+
// has no tenant column on this table (RLS is Postgres-only). The standalone
|
|
1797
|
+
// source/target indexes above are sufficient for SQLite.
|
|
1798
|
+
sourceTargetTypeUnique: (0, import_sqlite_core.uniqueIndex)("session_relationships_source_target_type_unique").on(
|
|
1799
|
+
table.source_session_id,
|
|
1800
|
+
table.target_session_id,
|
|
1801
|
+
table.relationship_type
|
|
1802
|
+
)
|
|
1803
|
+
})
|
|
1804
|
+
);
|
|
1498
1805
|
var tasks2 = (0, import_sqlite_core.sqliteTable)(
|
|
1499
1806
|
"tasks",
|
|
1500
1807
|
{
|
|
@@ -1607,7 +1914,12 @@ var messages2 = (0, import_sqlite_core.sqliteTable)(
|
|
|
1607
1914
|
// Indexes for efficient lookups
|
|
1608
1915
|
sessionIdx: (0, import_sqlite_core.index)("messages_session_id_idx").on(table.session_id),
|
|
1609
1916
|
taskIdx: (0, import_sqlite_core.index)("messages_task_id_idx").on(table.task_id),
|
|
1610
|
-
sessionIndexIdx: (0, import_sqlite_core.index)("messages_session_index_idx").on(table.session_id, table.index)
|
|
1917
|
+
sessionIndexIdx: (0, import_sqlite_core.index)("messages_session_index_idx").on(table.session_id, table.index),
|
|
1918
|
+
timestampIdx: (0, import_sqlite_core.index)("messages_timestamp_idx").on(table.timestamp),
|
|
1919
|
+
sessionTimestampIdx: (0, import_sqlite_core.index)("messages_session_timestamp_idx").on(
|
|
1920
|
+
table.session_id,
|
|
1921
|
+
table.timestamp
|
|
1922
|
+
)
|
|
1611
1923
|
})
|
|
1612
1924
|
);
|
|
1613
1925
|
var boards2 = (0, import_sqlite_core.sqliteTable)(
|
|
@@ -1833,6 +2145,9 @@ var users2 = (0, import_sqlite_core.sqliteTable)(
|
|
|
1833
2145
|
onboarding_completed: t2.bool("onboarding_completed").notNull().default(false),
|
|
1834
2146
|
// Force password change flag (admin-settable, auto-cleared on password change)
|
|
1835
2147
|
must_change_password: t2.bool("must_change_password").notNull().default(false),
|
|
2148
|
+
// Auth invalidation marker. Password changes set this timestamp so any
|
|
2149
|
+
// previously issued browser access or refresh token is rejected.
|
|
2150
|
+
tokens_valid_after: t2.timestamp("tokens_valid_after"),
|
|
1836
2151
|
// JSON blob for profile/preferences
|
|
1837
2152
|
data: t2.json("data").$type().notNull()
|
|
1838
2153
|
},
|
|
@@ -2039,6 +2354,12 @@ var artifacts2 = (0, import_sqlite_core.sqliteTable)(
|
|
|
2039
2354
|
branch_id: (0, import_sqlite_core.text)("branch_id", { length: 36 }).references(() => branches2.branch_id, {
|
|
2040
2355
|
onDelete: "set null"
|
|
2041
2356
|
}),
|
|
2357
|
+
source_session_id: (0, import_sqlite_core.text)("source_session_id", { length: 36 }).references(
|
|
2358
|
+
() => sessions2.session_id,
|
|
2359
|
+
{
|
|
2360
|
+
onDelete: "set null"
|
|
2361
|
+
}
|
|
2362
|
+
),
|
|
2042
2363
|
board_id: (0, import_sqlite_core.text)("board_id", { length: 36 }).notNull().references(() => boards2.board_id, { onDelete: "cascade" }),
|
|
2043
2364
|
name: (0, import_sqlite_core.text)("name").notNull(),
|
|
2044
2365
|
description: (0, import_sqlite_core.text)("description"),
|
|
@@ -2065,6 +2386,7 @@ var artifacts2 = (0, import_sqlite_core.sqliteTable)(
|
|
|
2065
2386
|
},
|
|
2066
2387
|
(table) => ({
|
|
2067
2388
|
branchIdx: (0, import_sqlite_core.index)("artifacts_branch_idx").on(table.branch_id),
|
|
2389
|
+
sourceSessionIdx: (0, import_sqlite_core.index)("artifacts_source_session_idx").on(table.source_session_id),
|
|
2068
2390
|
boardIdx: (0, import_sqlite_core.index)("artifacts_board_idx").on(table.board_id),
|
|
2069
2391
|
archivedIdx: (0, import_sqlite_core.index)("artifacts_archived_idx").on(table.archived),
|
|
2070
2392
|
publicIdx: (0, import_sqlite_core.index)("artifacts_public_idx").on(table.public)
|
|
@@ -2223,7 +2545,7 @@ var gatewayChannels2 = (0, import_sqlite_core.sqliteTable)(
|
|
|
2223
2545
|
// Materialized for queries
|
|
2224
2546
|
name: (0, import_sqlite_core.text)("name").notNull(),
|
|
2225
2547
|
channel_type: (0, import_sqlite_core.text)("channel_type", {
|
|
2226
|
-
enum: ["slack", "discord", "whatsapp", "telegram", "github"]
|
|
2548
|
+
enum: ["slack", "discord", "whatsapp", "telegram", "github", "teams"]
|
|
2227
2549
|
}).notNull(),
|
|
2228
2550
|
target_branch_id: (0, import_sqlite_core.text)("target_branch_id", { length: 36 }).notNull().references(() => branches2.branch_id, { onDelete: "cascade" }),
|
|
2229
2551
|
agor_user_id: (0, import_sqlite_core.text)("agor_user_id", { length: 36 }).notNull(),
|
|
@@ -2269,6 +2591,66 @@ var threadSessionMap2 = (0, import_sqlite_core.sqliteTable)(
|
|
|
2269
2591
|
channelStatusIdx: (0, import_sqlite_core.index)("idx_thread_map_channel_status").on(table.channel_id, table.status)
|
|
2270
2592
|
})
|
|
2271
2593
|
);
|
|
2594
|
+
var gatewayOutboundMessages2 = (0, import_sqlite_core.sqliteTable)(
|
|
2595
|
+
"gateway_outbound_messages",
|
|
2596
|
+
{
|
|
2597
|
+
id: (0, import_sqlite_core.text)("id", { length: 36 }).primaryKey(),
|
|
2598
|
+
created_at: t2.timestamp("created_at").notNull(),
|
|
2599
|
+
updated_at: t2.timestamp("updated_at").notNull(),
|
|
2600
|
+
gateway_channel_id: (0, import_sqlite_core.text)("gateway_channel_id", { length: 36 }).notNull().references(() => gatewayChannels2.id, { onDelete: "cascade" }),
|
|
2601
|
+
channel_type: (0, import_sqlite_core.text)("channel_type", {
|
|
2602
|
+
enum: ["slack", "discord", "whatsapp", "telegram", "github", "teams"]
|
|
2603
|
+
}).notNull(),
|
|
2604
|
+
platform_channel_id: (0, import_sqlite_core.text)("platform_channel_id").notNull(),
|
|
2605
|
+
platform_message_id: (0, import_sqlite_core.text)("platform_message_id").notNull(),
|
|
2606
|
+
platform_thread_id: (0, import_sqlite_core.text)("platform_thread_id").notNull(),
|
|
2607
|
+
platform_permalink: (0, import_sqlite_core.text)("platform_permalink"),
|
|
2608
|
+
target_branch_id: (0, import_sqlite_core.text)("target_branch_id", { length: 36 }).notNull().references(() => branches2.branch_id),
|
|
2609
|
+
emitted_by_user_id: (0, import_sqlite_core.text)("emitted_by_user_id", { length: 36 }).notNull().references(() => users2.user_id),
|
|
2610
|
+
emitted_by_session_id: (0, import_sqlite_core.text)("emitted_by_session_id", { length: 36 }).references(
|
|
2611
|
+
() => sessions2.session_id,
|
|
2612
|
+
{
|
|
2613
|
+
onDelete: "set null"
|
|
2614
|
+
}
|
|
2615
|
+
),
|
|
2616
|
+
emitted_by_task_id: (0, import_sqlite_core.text)("emitted_by_task_id", { length: 36 }).references(() => tasks2.task_id, {
|
|
2617
|
+
onDelete: "set null"
|
|
2618
|
+
}),
|
|
2619
|
+
emitted_by_schedule_id: (0, import_sqlite_core.text)("emitted_by_schedule_id", { length: 36 }).references(
|
|
2620
|
+
() => schedules2.schedule_id,
|
|
2621
|
+
{
|
|
2622
|
+
onDelete: "set null"
|
|
2623
|
+
}
|
|
2624
|
+
),
|
|
2625
|
+
message_text: (0, import_sqlite_core.text)("message_text").notNull(),
|
|
2626
|
+
message_preview: (0, import_sqlite_core.text)("message_preview").notNull(),
|
|
2627
|
+
metadata: t2.json("metadata"),
|
|
2628
|
+
consumed_by_session_id: (0, import_sqlite_core.text)("consumed_by_session_id", { length: 36 }).references(
|
|
2629
|
+
() => sessions2.session_id,
|
|
2630
|
+
{
|
|
2631
|
+
onDelete: "set null"
|
|
2632
|
+
}
|
|
2633
|
+
),
|
|
2634
|
+
consumed_at: t2.timestamp("consumed_at")
|
|
2635
|
+
},
|
|
2636
|
+
(table) => ({
|
|
2637
|
+
uniqueChannelThread: (0, import_sqlite_core.uniqueIndex)("uniq_gateway_outbound_channel_thread").on(
|
|
2638
|
+
table.gateway_channel_id,
|
|
2639
|
+
table.platform_thread_id
|
|
2640
|
+
),
|
|
2641
|
+
emittedSessionIdx: (0, import_sqlite_core.index)("idx_gateway_outbound_emitted_session").on(
|
|
2642
|
+
table.emitted_by_session_id
|
|
2643
|
+
),
|
|
2644
|
+
emittedScheduleIdx: (0, import_sqlite_core.index)("idx_gateway_outbound_emitted_schedule").on(
|
|
2645
|
+
table.emitted_by_schedule_id
|
|
2646
|
+
),
|
|
2647
|
+
targetBranchCreatedIdx: (0, import_sqlite_core.index)("idx_gateway_outbound_branch_created").on(
|
|
2648
|
+
table.target_branch_id,
|
|
2649
|
+
table.created_at
|
|
2650
|
+
),
|
|
2651
|
+
consumedIdx: (0, import_sqlite_core.index)("idx_gateway_outbound_consumed").on(table.consumed_at)
|
|
2652
|
+
})
|
|
2653
|
+
);
|
|
2272
2654
|
var sessionEnvSelections2 = (0, import_sqlite_core.sqliteTable)(
|
|
2273
2655
|
"session_env_selections",
|
|
2274
2656
|
{
|
|
@@ -2606,7 +2988,7 @@ var kbGraphEdges2 = (0, import_sqlite_core.sqliteTable)(
|
|
|
2606
2988
|
archivedIdx: (0, import_sqlite_core.index)("kb_graph_edges_archived_idx").on(table.archived)
|
|
2607
2989
|
})
|
|
2608
2990
|
);
|
|
2609
|
-
var sessionsRelations2 = (0, import_drizzle_orm3.relations)(sessions2, ({ one }) => ({
|
|
2991
|
+
var sessionsRelations2 = (0, import_drizzle_orm3.relations)(sessions2, ({ one, many }) => ({
|
|
2610
2992
|
branch: one(branches2, {
|
|
2611
2993
|
fields: [sessions2.branch_id],
|
|
2612
2994
|
references: [branches2.branch_id]
|
|
@@ -2614,6 +2996,24 @@ var sessionsRelations2 = (0, import_drizzle_orm3.relations)(sessions2, ({ one })
|
|
|
2614
2996
|
schedule: one(schedules2, {
|
|
2615
2997
|
fields: [sessions2.schedule_id],
|
|
2616
2998
|
references: [schedules2.schedule_id]
|
|
2999
|
+
}),
|
|
3000
|
+
outboundRelationships: many(sessionRelationships2, { relationName: "relationshipSource" }),
|
|
3001
|
+
inboundRelationships: many(sessionRelationships2, { relationName: "relationshipTarget" })
|
|
3002
|
+
}));
|
|
3003
|
+
var sessionRelationshipsRelations2 = (0, import_drizzle_orm3.relations)(sessionRelationships2, ({ one }) => ({
|
|
3004
|
+
sourceSession: one(sessions2, {
|
|
3005
|
+
fields: [sessionRelationships2.source_session_id],
|
|
3006
|
+
references: [sessions2.session_id],
|
|
3007
|
+
relationName: "relationshipSource"
|
|
3008
|
+
}),
|
|
3009
|
+
targetSession: one(sessions2, {
|
|
3010
|
+
fields: [sessionRelationships2.target_session_id],
|
|
3011
|
+
references: [sessions2.session_id],
|
|
3012
|
+
relationName: "relationshipTarget"
|
|
3013
|
+
}),
|
|
3014
|
+
callbackSession: one(sessions2, {
|
|
3015
|
+
fields: [sessionRelationships2.callback_session_id],
|
|
3016
|
+
references: [sessions2.session_id]
|
|
2617
3017
|
})
|
|
2618
3018
|
}));
|
|
2619
3019
|
var branchesRelations2 = (0, import_drizzle_orm3.relations)(branches2, ({ many }) => ({
|
|
@@ -2633,7 +3033,7 @@ var import_node_fs = require("fs");
|
|
|
2633
3033
|
var import_promises = __toESM(require("fs/promises"), 1);
|
|
2634
3034
|
var import_node_os = __toESM(require("os"), 1);
|
|
2635
3035
|
var import_node_path = __toESM(require("path"), 1);
|
|
2636
|
-
var
|
|
3036
|
+
var yaml = __toESM(require("js-yaml"), 1);
|
|
2637
3037
|
|
|
2638
3038
|
// src/config/analytics-defaults.ts
|
|
2639
3039
|
function getDefaultAnalyticsConfig() {
|
|
@@ -2734,6 +3134,64 @@ function resolveExecutorHeartbeatConfig(execution) {
|
|
|
2734
3134
|
};
|
|
2735
3135
|
}
|
|
2736
3136
|
|
|
3137
|
+
// src/config/multitenancy.ts
|
|
3138
|
+
var DEFAULT_STATIC_TENANT_ID = "default";
|
|
3139
|
+
var RESERVED_AUTH_CLAIMS = /* @__PURE__ */ new Set(["aud", "exp", "iat", "iss", "jti", "nbf", "sub", "type"]);
|
|
3140
|
+
function detectPostgresUrl(url) {
|
|
3141
|
+
if (!url) return false;
|
|
3142
|
+
const lower = url.toLowerCase();
|
|
3143
|
+
return lower.startsWith("postgresql://") || lower.startsWith("postgres://") || lower.startsWith("pg://");
|
|
3144
|
+
}
|
|
3145
|
+
function resolveMultiTenancyDatabaseDialect(config = {}) {
|
|
3146
|
+
if (process.env.AGOR_DB_DIALECT === "postgresql" || process.env.AGOR_DB_DIALECT === "sqlite") {
|
|
3147
|
+
return process.env.AGOR_DB_DIALECT;
|
|
3148
|
+
}
|
|
3149
|
+
if (detectPostgresUrl(process.env.DATABASE_URL)) return "postgresql";
|
|
3150
|
+
if (config.database?.dialect === "postgresql" || config.database?.dialect === "sqlite") {
|
|
3151
|
+
return config.database.dialect;
|
|
3152
|
+
}
|
|
3153
|
+
if (detectPostgresUrl(config.database?.postgresql?.url) || config.database?.postgresql?.host) {
|
|
3154
|
+
return "postgresql";
|
|
3155
|
+
}
|
|
3156
|
+
return "sqlite";
|
|
3157
|
+
}
|
|
3158
|
+
function resolveMultiTenancyConfig(config) {
|
|
3159
|
+
const raw = config.multi_tenancy ?? {};
|
|
3160
|
+
const mode = raw.mode ?? "static";
|
|
3161
|
+
return {
|
|
3162
|
+
mode,
|
|
3163
|
+
static_tenant_id: raw.static_tenant_id?.trim() || DEFAULT_STATIC_TENANT_ID,
|
|
3164
|
+
...raw.auth_claim ? { auth_claim: raw.auth_claim } : {},
|
|
3165
|
+
...raw.trusted_header ? { trusted_header: raw.trusted_header } : {}
|
|
3166
|
+
};
|
|
3167
|
+
}
|
|
3168
|
+
function assertValidMultiTenancyConfig(config) {
|
|
3169
|
+
const resolved = resolveMultiTenancyConfig(config);
|
|
3170
|
+
if (resolved.mode !== "static" && resolved.mode !== "required_from_auth") {
|
|
3171
|
+
throw new Error("Config error: multi_tenancy.mode must be one of: static, required_from_auth");
|
|
3172
|
+
}
|
|
3173
|
+
if (!resolved.static_tenant_id) {
|
|
3174
|
+
throw new Error("Config error: multi_tenancy.static_tenant_id must not be empty");
|
|
3175
|
+
}
|
|
3176
|
+
if (resolved.auth_claim && RESERVED_AUTH_CLAIMS.has(resolved.auth_claim)) {
|
|
3177
|
+
throw new Error(
|
|
3178
|
+
`Config error: multi_tenancy.auth_claim cannot be reserved JWT claim '${resolved.auth_claim}'`
|
|
3179
|
+
);
|
|
3180
|
+
}
|
|
3181
|
+
if (resolved.mode === "required_from_auth") {
|
|
3182
|
+
if (resolveMultiTenancyDatabaseDialect(config) !== "postgresql") {
|
|
3183
|
+
throw new Error(
|
|
3184
|
+
"Config error: multi_tenancy.required_from_auth requires database.dialect: postgresql"
|
|
3185
|
+
);
|
|
3186
|
+
}
|
|
3187
|
+
if (!resolved.auth_claim && !resolved.trusted_header) {
|
|
3188
|
+
throw new Error(
|
|
3189
|
+
"Config error: multi_tenancy.required_from_auth requires multi_tenancy.auth_claim or multi_tenancy.trusted_header"
|
|
3190
|
+
);
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
}
|
|
3194
|
+
|
|
2737
3195
|
// src/config/config-manager.ts
|
|
2738
3196
|
var NO_FILE = -1;
|
|
2739
3197
|
var NO_FILE_KEY = { mtimeMs: NO_FILE, size: 0 };
|
|
@@ -2766,7 +3224,10 @@ function writeCachedConfig(configPath, config, key) {
|
|
|
2766
3224
|
cachedEntry = { path: configPath, config: structuredClone(config), key };
|
|
2767
3225
|
}
|
|
2768
3226
|
function parseAndValidateConfig(content) {
|
|
2769
|
-
|
|
3227
|
+
if (content.trim() === "") {
|
|
3228
|
+
return {};
|
|
3229
|
+
}
|
|
3230
|
+
const parsed = yaml.load(content);
|
|
2770
3231
|
const finalConfig = parsed || {};
|
|
2771
3232
|
validateConfig(finalConfig);
|
|
2772
3233
|
return finalConfig;
|
|
@@ -2795,6 +3256,7 @@ To update: agor config set execution.unix_user_mode insulated`
|
|
|
2795
3256
|
`Config error: execution.managed_envs_execution_mode must be one of: hybrid, webhook-only`
|
|
2796
3257
|
);
|
|
2797
3258
|
}
|
|
3259
|
+
assertValidMultiTenancyConfig(config);
|
|
2798
3260
|
validateOptionalHttpUrl(
|
|
2799
3261
|
config.external_launch,
|
|
2800
3262
|
"login_redirect_url",
|
|
@@ -2855,7 +3317,12 @@ function getDefaultConfig() {
|
|
|
2855
3317
|
// Default: sync passwords to Unix
|
|
2856
3318
|
executor_heartbeat: resolveExecutorHeartbeatConfig()
|
|
2857
3319
|
},
|
|
2858
|
-
analytics: getDefaultAnalyticsConfig()
|
|
3320
|
+
analytics: getDefaultAnalyticsConfig(),
|
|
3321
|
+
telemetry: {},
|
|
3322
|
+
multi_tenancy: {
|
|
3323
|
+
mode: "static",
|
|
3324
|
+
static_tenant_id: "default"
|
|
3325
|
+
}
|
|
2859
3326
|
};
|
|
2860
3327
|
}
|
|
2861
3328
|
function loadConfigSync() {
|
|
@@ -2963,11 +3430,13 @@ var artifacts3 = schema.artifacts;
|
|
|
2963
3430
|
var artifactTrustGrants3 = schema.artifactTrustGrants;
|
|
2964
3431
|
var boardObjects3 = schema.boardObjects;
|
|
2965
3432
|
var sessionMcpServers3 = schema.sessionMcpServers;
|
|
3433
|
+
var sessionRelationships3 = schema.sessionRelationships;
|
|
2966
3434
|
var sessionEnvSelections3 = schema.sessionEnvSelections;
|
|
2967
3435
|
var userMcpOauthTokens3 = schema.userMcpOauthTokens;
|
|
2968
3436
|
var boardComments3 = schema.boardComments;
|
|
2969
3437
|
var gatewayChannels3 = schema.gatewayChannels;
|
|
2970
3438
|
var threadSessionMap3 = schema.threadSessionMap;
|
|
3439
|
+
var gatewayOutboundMessages3 = schema.gatewayOutboundMessages;
|
|
2971
3440
|
var userApiKeys3 = schema.userApiKeys;
|
|
2972
3441
|
var serializedSessions3 = schema.serializedSessions;
|
|
2973
3442
|
var kbNamespaces3 = schema.kbNamespaces;
|
|
@@ -3122,11 +3591,6 @@ function buildMCPTemplateContextFromEnv(env) {
|
|
|
3122
3591
|
userEnv[key] = value;
|
|
3123
3592
|
}
|
|
3124
3593
|
}
|
|
3125
|
-
if (allowedKeys.size > 0) {
|
|
3126
|
-
console.log(
|
|
3127
|
-
` \u{1F510} MCP template context: ${allowedKeys.size} user env var(s) available for templates`
|
|
3128
|
-
);
|
|
3129
|
-
}
|
|
3130
3594
|
return {
|
|
3131
3595
|
user: {
|
|
3132
3596
|
env: userEnv
|