agor-live 0.22.0 → 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 +7 -1
- package/dist/cli/commands/branch/env/start.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/start.js +7 -1
- package/dist/cli/commands/branch/env/stop.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/stop.js +7 -1
- 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 +7 -2
- package/dist/core/api/index.d.ts +13 -4
- package/dist/core/api/index.d.ts.map +1 -1
- package/dist/core/api/index.js +7 -2
- package/dist/core/claude/index.cjs +482 -77
- package/dist/core/claude/index.js +479 -76
- 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 +35 -7
- package/dist/core/client/index.js +32 -7
- package/dist/core/config/browser.cjs +3 -5
- package/dist/core/config/browser.js +3 -5
- 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/index.cjs +4259 -4527
- 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 +4295 -4583
- 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 +67 -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 +2422 -1084
- 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 +2162 -852
- 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 +41 -1
- 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 +2 -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/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 +8 -8
- package/dist/core/db/repositories/users.d.ts.map +1 -1
- package/dist/core/db/schema.d.ts +1460 -38
- package/dist/core/db/schema.d.ts.map +1 -1
- package/dist/core/db/schema.postgres.d.ts +1082 -37
- package/dist/core/db/schema.postgres.d.ts.map +1 -1
- package/dist/core/db/schema.sqlite.d.ts +397 -1
- 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/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 +42 -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 +28 -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.d.ts +10 -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 +101 -4
- package/dist/core/gateway/connectors/slack.d.ts.map +1 -1
- package/dist/core/gateway/index.cjs +495 -29
- package/dist/core/gateway/index.d.ts +4 -1
- package/dist/core/gateway/index.d.ts.map +1 -1
- package/dist/core/gateway/index.js +490 -28
- 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 +11137 -10604
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +11673 -10630
- 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 +352 -25
- package/dist/core/mcp/index.js +351 -24
- 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 +8410 -5504
- 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 +8434 -5533
- package/dist/core/sessions/index.cjs +110 -24
- package/dist/core/sessions/index.js +110 -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 +1 -0
- package/dist/core/tools/mcp/oauth-refresh.cjs +532 -102
- package/dist/core/tools/mcp/oauth-refresh.js +530 -103
- 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 +13 -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 +76 -1
- package/dist/core/types/gateway.d.ts.map +1 -1
- package/dist/core/types/index.cjs +25 -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 +22 -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 +7 -1
- package/dist/core/types/session.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 +1056 -674
- package/dist/core/unix/index.js +1003 -623
- package/dist/core/utils/emoji-shortcodes.d.ts +13 -0
- package/dist/core/utils/emoji-shortcodes.d.ts.map +1 -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 +4 -4
- 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 +23 -13
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +7234 -2866
- 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 +7234 -2866
- 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 +1467 -71
- 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 +548 -23
- package/dist/daemon/mcp/tools/artifacts.js +510 -19
- package/dist/daemon/mcp/tools/boards.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/boards.js +517 -20
- package/dist/daemon/mcp/tools/branches.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/branches.js +574 -49
- package/dist/daemon/mcp/tools/card-types.js +508 -17
- package/dist/daemon/mcp/tools/cards.js +508 -17
- package/dist/daemon/mcp/tools/environment.js +516 -17
- 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 +508 -17
- package/dist/daemon/mcp/tools/mcp-servers.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/mcp-servers.js +843 -17
- package/dist/daemon/mcp/tools/messages.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/messages.js +568 -31
- package/dist/daemon/mcp/tools/proxies.js +518 -19
- package/dist/daemon/mcp/tools/repos.js +508 -17
- package/dist/daemon/mcp/tools/schedules.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/schedules.js +511 -18
- package/dist/daemon/mcp/tools/search.js +508 -17
- package/dist/daemon/mcp/tools/sessions.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/sessions.js +521 -23
- package/dist/daemon/mcp/tools/tasks.js +508 -17
- package/dist/daemon/mcp/tools/users.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/users.js +527 -22
- package/dist/daemon/mcp/tools/widgets.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/widgets.js +536 -18
- package/dist/daemon/register-hooks.d.ts +3 -2
- package/dist/daemon/register-hooks.d.ts.map +1 -1
- package/dist/daemon/register-hooks.js +894 -582
- 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 +2715 -816
- 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 +2445 -633
- package/dist/daemon/services/artifacts.d.ts +34 -6
- package/dist/daemon/services/artifacts.d.ts.map +1 -1
- package/dist/daemon/services/artifacts.js +109 -8
- 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 +31 -8
- package/dist/daemon/services/branches.d.ts.map +1 -1
- package/dist/daemon/services/branches.js +242 -35
- 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 +383 -272
- 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 +48 -3
- package/dist/daemon/services/gateway.d.ts.map +1 -1
- package/dist/daemon/services/gateway.js +606 -60
- 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 +5 -5
- package/dist/daemon/services/groups.d.ts.map +1 -1
- 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 -7
- 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 +55 -28
- 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 +9 -5
- package/dist/daemon/services/sessions.d.ts.map +1 -1
- package/dist/daemon/services/sessions.js +143 -10
- package/dist/daemon/services/tasks.d.ts +11 -5
- package/dist/daemon/services/tasks.d.ts.map +1 -1
- package/dist/daemon/services/tasks.js +199 -39
- 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 +348 -86
- 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-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.map +1 -1
- package/dist/executor/commands/environment.js +9 -5
- package/dist/executor/commands/git.js +1 -1
- 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/sdk-handlers/base/diff-enrichment.js +1 -1
- 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.map +1 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.js +61 -6
- 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/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-zv5RUCuV.js → MarketingScreenshotPage-CmDPBHOl.js} +2 -2
- 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-mEmYGZhC.css → SessionCanvas-Bh7Yg5dZ.css} +1 -1
- package/dist/ui/assets/SessionCanvas-Bh7Yg5dZ.css.gz +0 -0
- package/dist/ui/assets/{StreamdownDemoPage-wzWaqWwr.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-CfbbHJOz.js → antd-DT5ackd0.js} +5 -5
- package/dist/ui/assets/{antd-CfbbHJOz.js.gz → 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-BhZaEN19.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-Dk_UH-sY.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-XprbG2TG.js → chunk-4BX2VUAB-BODpCjJx.js} +1 -1
- package/dist/ui/assets/chunk-55IACEB6-lJXvUquf.js +1 -0
- package/dist/ui/assets/{chunk-ABZYJK2D-BJcrryHK.js → chunk-ABZYJK2D-DCTXWSzV.js} +3 -3
- package/dist/ui/assets/chunk-ABZYJK2D-DCTXWSzV.js.gz +0 -0
- package/dist/ui/assets/{chunk-AGHRB4JF-DvxmfbM0.js → chunk-AGHRB4JF-CbNphBjE.js} +1 -1
- package/dist/ui/assets/chunk-AGHRB4JF-CbNphBjE.js.gz +0 -0
- package/dist/ui/assets/{chunk-ATLVNIR6-DbeJ0OrR.js → chunk-ATLVNIR6-rWg3qxof.js} +1 -1
- package/dist/ui/assets/chunk-ATLVNIR6-rWg3qxof.js.gz +0 -0
- package/dist/ui/assets/{chunk-B4BG7PRW-C53q2ggf.js → chunk-B4BG7PRW-CgtLCbpE.js} +3 -3
- package/dist/ui/assets/chunk-B4BG7PRW-CgtLCbpE.js.gz +0 -0
- package/dist/ui/assets/{chunk-CVBHYZKI-B3EBSlb3.js → chunk-CVBHYZKI-DTL6Zgr0.js} +1 -1
- package/dist/ui/assets/{chunk-DI55MBZ5-vIyNEQN-.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-rddmfK-Z.js → chunk-FMBD7UC4-BogA_9CV.js} +1 -1
- package/dist/ui/assets/{chunk-HN2XXSSU-Dttqcg3b.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-EUmx2y4H.js → chunk-JZLCHNYA-BsgZ79Fa.js} +5 -5
- package/dist/ui/assets/chunk-JZLCHNYA-BsgZ79Fa.js.gz +0 -0
- package/dist/ui/assets/{chunk-MI3HLSF2-65n9Mkyc.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-DsRKK6NR.js → chunk-QN33PNHL-DxdIDCAa.js} +1 -1
- package/dist/ui/assets/{chunk-QXUST7PY-BCYnMiS3.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-BuQUQcTr.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-CnPB3ARO.js → cose-bilkent-S5V4N54A-Dx0BJVDl.js} +1 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-Dx0BJVDl.js.gz +0 -0
- package/dist/ui/assets/{dagre-6UL2VRFP-DhS-k_Se.js → dagre-6UL2VRFP-DiQSUxqN.js} +1 -1
- package/dist/ui/assets/dagre-6UL2VRFP-DiQSUxqN.js.gz +0 -0
- package/dist/ui/assets/{dagre-KgLoHEuy.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-BPCitvbo.js → diagram-QEK2KX5R-CobkCRdj.js} +1 -1
- package/dist/ui/assets/diagram-QEK2KX5R-CobkCRdj.js.gz +0 -0
- package/dist/ui/assets/{diagram-S2PKOQOG-NW4uK6sx.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-me1fboaf.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-CfFE_uAC.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-DxuPq13l.css → index-qkT7Qqm2.css} +1 -1
- package/dist/ui/assets/index-qkT7Qqm2.css.gz +0 -0
- package/dist/ui/assets/{info-NVLQJR56-i_xHYg3f.js → info-NVLQJR56-DZ3K-w48.js} +1 -1
- package/dist/ui/assets/{infoDiagram-ER5ION4S-2NL93b78.js → infoDiagram-ER5ION4S-CxnBJQu6.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-XKPGCS4Q-CZF-2DHU.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-CfvJIOny.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-DDv8kOJk.js → line-DBRjKmfa.js} +1 -1
- package/dist/ui/assets/{linear-Daef-l29.js → linear-DFao5Wyp.js} +1 -1
- package/dist/ui/assets/linear-DFao5Wyp.js.gz +0 -0
- package/dist/ui/assets/{mermaid-parser.core-CdK9QgYV.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-Cb3QMflX.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-Bm2uwz4i.js → packet-BFZMPI3H-CpL6iNoa.js} +1 -1
- package/dist/ui/assets/{particles-DsJFOarW.js → particles-CT8hcJOA.js} +1 -1
- package/dist/ui/assets/particles-CT8hcJOA.js.gz +0 -0
- package/dist/ui/assets/{pie-7BOR55EZ-5i17tVnF.js → pie-7BOR55EZ-hTqChbTo.js} +1 -1
- package/dist/ui/assets/{pieDiagram-ADFJNKIX-BxIwQWvw.js → pieDiagram-ADFJNKIX-Bf4Nou75.js} +1 -1
- package/dist/ui/assets/pieDiagram-ADFJNKIX-Bf4Nou75.js.gz +0 -0
- package/dist/ui/assets/{quadrantDiagram-AYHSOK5B-B5HPe4ga.js → quadrantDiagram-AYHSOK5B-DpjUTLB1.js} +3 -3
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-DpjUTLB1.js.gz +0 -0
- package/dist/ui/assets/{radar-NHE76QYJ-BTn-tq0k.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-YfI6llkX.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-D7koO5op.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-DAe4Um17.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-D6P5txjT.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-Bitm3gy4.js → treemap-KMMF4GRG-CUaLOV_B.js} +1 -1
- package/dist/ui/assets/{useUserLocalStorage-Ckb8HsIw.js → useUserLocalStorage-C8sgXgXR.js} +1 -1
- package/dist/ui/assets/useUserLocalStorage-C8sgXgXR.js.gz +0 -0
- package/dist/ui/assets/{xychartDiagram-PRI3JC2R-CsybjUbd.js → xychartDiagram-PRI3JC2R-BlhkI9T_.js} +1 -1
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-BlhkI9T_.js.gz +0 -0
- package/dist/ui/index.html +10 -11
- package/dist/ui/index.html.gz +0 -0
- package/package.json +6 -5
- package/scripts/postinstall.js +27 -19
- package/dist/cli/commands/daemon/sync.d.ts.map +0 -1
- package/dist/ui/assets/App-DcEY8Ota.js +0 -3
- package/dist/ui/assets/App-DcEY8Ota.js.gz +0 -0
- package/dist/ui/assets/ArtifactConsentModal-CiCbK9iv.js +0 -1
- package/dist/ui/assets/ArtifactConsentModal-CiCbK9iv.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-CfsTEGKd.js +0 -9
- package/dist/ui/assets/ArtifactFullscreenPage-CfsTEGKd.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-BAFFH_5e.js +0 -18
- package/dist/ui/assets/AutocompleteTextarea-BAFFH_5e.js.gz +0 -0
- package/dist/ui/assets/BoardObjectNodes-D-O6bZIG.js +0 -34
- package/dist/ui/assets/BoardObjectNodes-D-O6bZIG.js.gz +0 -0
- package/dist/ui/assets/CodeEditor.inner-DBgsP4tn.js +0 -8
- package/dist/ui/assets/CodeEditor.inner-DBgsP4tn.js.gz +0 -0
- package/dist/ui/assets/ConversationView-CUWR0gR6.js +0 -1
- package/dist/ui/assets/ConversationView-CUWR0gR6.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-B2bzlXfn.js +0 -24
- package/dist/ui/assets/KnowledgePage-B2bzlXfn.js.gz +0 -0
- package/dist/ui/assets/MarketingScreenshotPage-zv5RUCuV.js.gz +0 -0
- package/dist/ui/assets/MobileApp-VgVnsnsN.js +0 -1
- package/dist/ui/assets/MobileApp-VgVnsnsN.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-f1-1Gbcw.js +0 -20
- package/dist/ui/assets/SessionCanvas-f1-1Gbcw.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-mEmYGZhC.css.gz +0 -0
- package/dist/ui/assets/StreamdownDemoPage-wzWaqWwr.js.gz +0 -0
- package/dist/ui/assets/ThemeSwitcher-Dly2y9pi.js +0 -1
- package/dist/ui/assets/ThemeSwitcher-Dly2y9pi.js.gz +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-CykGFbQU.js +0 -1
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-C8HXAenz.js +0 -36
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-C8HXAenz.js.gz +0 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-BhZaEN19.js.gz +0 -0
- package/dist/ui/assets/c4Diagram-YG6GDRKO-Dk_UH-sY.js.gz +0 -0
- package/dist/ui/assets/channel-D6_nUWlW.js +0 -1
- package/dist/ui/assets/chunk-55IACEB6-ByzqIgSb.js +0 -1
- package/dist/ui/assets/chunk-ABZYJK2D-BJcrryHK.js.gz +0 -0
- package/dist/ui/assets/chunk-AGHRB4JF-DvxmfbM0.js.gz +0 -0
- package/dist/ui/assets/chunk-ATLVNIR6-DbeJ0OrR.js.gz +0 -0
- package/dist/ui/assets/chunk-B4BG7PRW-C53q2ggf.js.gz +0 -0
- package/dist/ui/assets/chunk-DI55MBZ5-vIyNEQN-.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-B3ObkuOm.js +0 -1
- package/dist/ui/assets/chunk-HN2XXSSU-Dttqcg3b.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-DbNDev3D.js +0 -11
- package/dist/ui/assets/chunk-JA3XYJ7Z-DbNDev3D.js.gz +0 -0
- package/dist/ui/assets/chunk-JZLCHNYA-EUmx2y4H.js.gz +0 -0
- package/dist/ui/assets/chunk-MI3HLSF2-65n9Mkyc.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-mv5koXqW.js +0 -2
- package/dist/ui/assets/chunk-N4CR4FBY-mv5koXqW.js.gz +0 -0
- package/dist/ui/assets/chunk-QXUST7PY-BCYnMiS3.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-HucAw4xW.js +0 -1
- package/dist/ui/assets/chunk-S3R3BYOJ-CWMEa9Dc.js +0 -2
- package/dist/ui/assets/chunk-S3R3BYOJ-CWMEa9Dc.js.gz +0 -0
- package/dist/ui/assets/chunk-TZMSLE5B-BuQUQcTr.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-CUT3rPTB.js +0 -1
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-CUT3rPTB.js +0 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-CnPB3ARO.js.gz +0 -0
- package/dist/ui/assets/dagre-6UL2VRFP-DhS-k_Se.js.gz +0 -0
- package/dist/ui/assets/dagre-KgLoHEuy.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-BZg3MJmb.js +0 -24
- package/dist/ui/assets/diagram-PSM6KHXK-BZg3MJmb.js.gz +0 -0
- package/dist/ui/assets/diagram-QEK2KX5R-BPCitvbo.js.gz +0 -0
- package/dist/ui/assets/diagram-S2PKOQOG-NW4uK6sx.js.gz +0 -0
- package/dist/ui/assets/editor-CzFWIUw2.js +0 -39
- package/dist/ui/assets/editor-CzFWIUw2.js.gz +0 -0
- package/dist/ui/assets/emoji-Dkz4Zzv_.js +0 -3
- package/dist/ui/assets/emoji-Dkz4Zzv_.js.gz +0 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-me1fboaf.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-DzE8dGsh.js +0 -162
- package/dist/ui/assets/flowDiagram-NV44I4VS-DzE8dGsh.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-CFQD09Mi.js +0 -267
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-CFQD09Mi.js.gz +0 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-CaVoxU4C.js +0 -65
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-CaVoxU4C.js.gz +0 -0
- package/dist/ui/assets/index-BN5_Qq7R.js +0 -324
- package/dist/ui/assets/index-BN5_Qq7R.js.gz +0 -0
- package/dist/ui/assets/index-DxuPq13l.css.gz +0 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CZF-2DHU.js.gz +0 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-CfvJIOny.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/linear-Daef-l29.js.gz +0 -0
- package/dist/ui/assets/mermaid-parser.core-CdK9QgYV.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-D6GS9mU-.js +0 -11
- package/dist/ui/assets/mermaid.core-D6GS9mU-.js.gz +0 -0
- package/dist/ui/assets/message-SqLqNYcv.js +0 -36
- package/dist/ui/assets/message-SqLqNYcv.js.gz +0 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-Cb3QMflX.js.gz +0 -0
- package/dist/ui/assets/particles-DsJFOarW.js.gz +0 -0
- package/dist/ui/assets/pieDiagram-ADFJNKIX-BxIwQWvw.js.gz +0 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-B5HPe4ga.js.gz +0 -0
- package/dist/ui/assets/reactflow-Bf74ngoo.js +0 -2
- package/dist/ui/assets/reactflow-Bf74ngoo.js.gz +0 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-YfI6llkX.js.gz +0 -0
- package/dist/ui/assets/sandpack-D7koO5op.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DOk_B10B.js +0 -10
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DOk_B10B.js.gz +0 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-DAe4Um17.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-CCesDu_C.js +0 -1
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-CCesDu_C.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-CMlIrsoO.js +0 -1
- package/dist/ui/assets/syntax-C-M-8jOU.js +0 -10
- package/dist/ui/assets/syntax-C-M-8jOU.js.gz +0 -0
- package/dist/ui/assets/theme-BQZdiqwv.js +0 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-D6P5txjT.js.gz +0 -0
- package/dist/ui/assets/useUserLocalStorage-Ckb8HsIw.js.gz +0 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-CsybjUbd.js.gz +0 -0
- /package/dist/cli/commands/{admin → local}/sync-unix.d.ts +0 -0
|
@@ -71,12 +71,13 @@ import {
|
|
|
71
71
|
asc,
|
|
72
72
|
desc,
|
|
73
73
|
eq,
|
|
74
|
-
|
|
74
|
+
gte,
|
|
75
|
+
lte,
|
|
75
76
|
messages as messagesTable,
|
|
76
77
|
or,
|
|
77
|
-
SessionRepository as SessionRepository3,
|
|
78
78
|
select,
|
|
79
|
-
sql
|
|
79
|
+
sql,
|
|
80
|
+
visibleSessionReferenceAccessExists
|
|
80
81
|
} from "@agor/core/db";
|
|
81
82
|
|
|
82
83
|
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
@@ -14629,6 +14630,11 @@ function mcpOptionalString(fieldName, description) {
|
|
|
14629
14630
|
error: `${fieldName} must be a string when provided.`
|
|
14630
14631
|
}).optional().describe(description);
|
|
14631
14632
|
}
|
|
14633
|
+
function mcpOptionalNonEmptyString(fieldName, description) {
|
|
14634
|
+
return external_exports.string({
|
|
14635
|
+
error: `${fieldName} must be a string when provided.`
|
|
14636
|
+
}).min(1, `${fieldName} cannot be empty when provided.`).optional().describe(description);
|
|
14637
|
+
}
|
|
14632
14638
|
function mcpOptionalNonBlankString(fieldName, description) {
|
|
14633
14639
|
return external_exports.string({
|
|
14634
14640
|
error: `${fieldName} must be a string when provided.`
|
|
@@ -14680,7 +14686,11 @@ import { ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
|
14680
14686
|
|
|
14681
14687
|
// src/mcp/tokens.ts
|
|
14682
14688
|
import { MCP_TOKEN } from "@agor/core/config";
|
|
14683
|
-
import {
|
|
14689
|
+
import {
|
|
14690
|
+
generateId,
|
|
14691
|
+
SessionRepository,
|
|
14692
|
+
shortId as shortId2
|
|
14693
|
+
} from "@agor/core/db";
|
|
14684
14694
|
import {
|
|
14685
14695
|
MCP_TOKEN_AUDIENCE,
|
|
14686
14696
|
MCP_TOKEN_ISSUER
|
|
@@ -14701,6 +14711,7 @@ var DOMAIN_DESCRIPTIONS = {
|
|
|
14701
14711
|
users: "User accounts, profiles, preferences, and administration",
|
|
14702
14712
|
analytics: "Usage and cost tracking leaderboard",
|
|
14703
14713
|
"mcp-servers": "External MCP server configuration and OAuth management",
|
|
14714
|
+
gateway: "Gateway channels for Slack, GitHub, Teams, and other message integrations",
|
|
14704
14715
|
proxies: "Configured HTTP proxies for third-party APIs (Shortcut, Linear, Jira, etc.)",
|
|
14705
14716
|
widgets: "In-conversation interactive widgets \u2014 agents render small forms/buttons inline in the transcript to capture user input that never enters the LLM context",
|
|
14706
14717
|
knowledge: "DB-backed markdown knowledge documents, version history, search, and graph links",
|
|
@@ -14758,7 +14769,7 @@ var AgorRuntimeSchema = external_exports.object({
|
|
|
14758
14769
|
|
|
14759
14770
|
// src/mcp/tools/branches.ts
|
|
14760
14771
|
import { existsSync } from "fs";
|
|
14761
|
-
import { isBranchRbacEnabled } from "@agor/core/config";
|
|
14772
|
+
import { isBranchRbacEnabled, loadConfig } from "@agor/core/config";
|
|
14762
14773
|
import { BranchRepository as BranchRepository2, shortId as shortId3 } from "@agor/core/db";
|
|
14763
14774
|
import { BRANCH_PERMISSION_LEVELS as BRANCH_PERMISSION_LEVELS2, getAssistantConfig, isAssistant } from "@agor/core/types";
|
|
14764
14775
|
import { computeZoneRelativePosition } from "@agor/core/utils/board-placement";
|
|
@@ -14767,12 +14778,186 @@ import { normalizeOptionalHttpUrl } from "@agor/core/utils/url";
|
|
|
14767
14778
|
// src/mcp/tools/cards.ts
|
|
14768
14779
|
import { BoardObjectRepository } from "@agor/core/db";
|
|
14769
14780
|
|
|
14781
|
+
// src/mcp/tools/gateway-channels.ts
|
|
14782
|
+
import {
|
|
14783
|
+
BranchRepository as BranchRepository3,
|
|
14784
|
+
GatewayChannelRepository,
|
|
14785
|
+
SessionRepository as SessionRepository2,
|
|
14786
|
+
ThreadSessionMapRepository
|
|
14787
|
+
} from "@agor/core/db";
|
|
14788
|
+
import {
|
|
14789
|
+
getConnector
|
|
14790
|
+
} from "@agor/core/gateway";
|
|
14791
|
+
import {
|
|
14792
|
+
GATEWAY_REDACTED_SENTINEL,
|
|
14793
|
+
GATEWAY_SENSITIVE_CONFIG_FIELDS,
|
|
14794
|
+
hasMinimumRole as hasMinimumRole2,
|
|
14795
|
+
ROLES as ROLES2
|
|
14796
|
+
} from "@agor/core/types";
|
|
14797
|
+
var configSchema = external_exports.record(external_exports.string(), external_exports.unknown()).describe(
|
|
14798
|
+
"Platform-specific gateway configuration. Secrets are stored encrypted and returned redacted. Prefer env/template references for shared credentials where the connector supports them."
|
|
14799
|
+
);
|
|
14800
|
+
var outboundTargetSchema = external_exports.string().trim().regex(
|
|
14801
|
+
/^(channel:[^:\s]+|channel_name:[^\s]+|#[^\s]+|(?:email:|user_email:)?[^@\s]+@[^@\s]+\.[^@\s]+)$/
|
|
14802
|
+
).describe(
|
|
14803
|
+
"Slack outbound target for v0: channel:C123, #project-updates, channel_name:project-updates, or user@example.com. Thread targets are intentionally not supported."
|
|
14804
|
+
);
|
|
14805
|
+
var envVarSchema = external_exports.strictObject({
|
|
14806
|
+
key: mcpRequiredString("agenticConfig.envVars[].key", "Environment variable name"),
|
|
14807
|
+
value: mcpRequiredString(
|
|
14808
|
+
"agenticConfig.envVars[].value",
|
|
14809
|
+
`Environment variable value. Prefer references/templates over raw secrets. Existing redacted values may be passed as '${GATEWAY_REDACTED_SENTINEL}' on update to preserve them.`
|
|
14810
|
+
),
|
|
14811
|
+
forceOverride: external_exports.boolean().optional().describe("When true, channel value wins over user env vars. Defaults to false.")
|
|
14812
|
+
});
|
|
14813
|
+
var agenticConfigSchema = external_exports.strictObject({
|
|
14814
|
+
agent: external_exports.enum(["claude-code", "claude-code-cli", "codex", "gemini", "opencode", "copilot", "cursor"]).describe("Agent used for sessions created from this gateway channel."),
|
|
14815
|
+
permissionMode: external_exports.enum([
|
|
14816
|
+
"default",
|
|
14817
|
+
"acceptEdits",
|
|
14818
|
+
"bypassPermissions",
|
|
14819
|
+
"plan",
|
|
14820
|
+
"dontAsk",
|
|
14821
|
+
"autoEdit",
|
|
14822
|
+
"yolo",
|
|
14823
|
+
"ask",
|
|
14824
|
+
"auto",
|
|
14825
|
+
"on-failure",
|
|
14826
|
+
"allow-all"
|
|
14827
|
+
]).optional().describe("Permission mode for spawned sessions."),
|
|
14828
|
+
modelConfig: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("Agent model configuration."),
|
|
14829
|
+
mcpServerIds: external_exports.array(external_exports.string().min(1)).optional().describe("MCP server IDs to attach to gateway-created sessions."),
|
|
14830
|
+
codexSandboxMode: external_exports.enum(["read-only", "workspace-write", "danger-full-access"]).optional().describe("Codex sandbox mode for Codex gateway sessions."),
|
|
14831
|
+
codexApprovalPolicy: external_exports.enum(["untrusted", "on-failure", "on-request", "never"]).optional().describe("Codex approval policy for Codex gateway sessions."),
|
|
14832
|
+
codexNetworkAccess: external_exports.boolean().optional().describe("Allow Codex network access."),
|
|
14833
|
+
envVars: external_exports.array(envVarSchema).optional().describe("Gateway-level env vars. Values are redacted in responses.")
|
|
14834
|
+
}).describe("Agent/session defaults for conversations created through this gateway channel.");
|
|
14835
|
+
var gatewayChannelCreateSchema = external_exports.strictObject({
|
|
14836
|
+
name: mcpRequiredString("name", 'Human-readable channel name, e.g. "Engineering Slack".'),
|
|
14837
|
+
channelType: external_exports.enum(["slack", "github", "teams", "discord", "whatsapp", "telegram"]).default("slack").describe("Gateway platform type. Current active connectors are slack, github, and teams."),
|
|
14838
|
+
targetBranchId: mcpRequiredId(
|
|
14839
|
+
"targetBranchId",
|
|
14840
|
+
"Branch",
|
|
14841
|
+
"Branch/worktree ID that this gateway channel prompts."
|
|
14842
|
+
),
|
|
14843
|
+
agorUserId: mcpOptionalId(
|
|
14844
|
+
"agorUserId",
|
|
14845
|
+
"User",
|
|
14846
|
+
"Agor user ID whose identity is used when platform-user alignment is disabled."
|
|
14847
|
+
),
|
|
14848
|
+
enabled: external_exports.boolean().optional().describe("Whether the channel is active. Defaults to true."),
|
|
14849
|
+
config: configSchema,
|
|
14850
|
+
agenticConfig: agenticConfigSchema.optional()
|
|
14851
|
+
}).superRefine((value, issue2) => {
|
|
14852
|
+
const config2 = value.config ?? {};
|
|
14853
|
+
if (value.channelType === "slack") {
|
|
14854
|
+
if (!config2.bot_token) {
|
|
14855
|
+
issue2.addIssue({
|
|
14856
|
+
code: "custom",
|
|
14857
|
+
path: ["config", "bot_token"],
|
|
14858
|
+
message: "config.bot_token is required for Slack. Prefer a bot token stored outside the transcript when possible."
|
|
14859
|
+
});
|
|
14860
|
+
}
|
|
14861
|
+
if (config2.connection_mode === "socket" && !config2.app_token) {
|
|
14862
|
+
issue2.addIssue({
|
|
14863
|
+
code: "custom",
|
|
14864
|
+
path: ["config", "app_token"],
|
|
14865
|
+
message: "config.app_token is required for Slack Socket Mode."
|
|
14866
|
+
});
|
|
14867
|
+
}
|
|
14868
|
+
}
|
|
14869
|
+
if (value.channelType === "github") {
|
|
14870
|
+
for (const field of ["app_id", "private_key", "installation_id", "watch_repos"]) {
|
|
14871
|
+
if (!config2[field]) {
|
|
14872
|
+
issue2.addIssue({
|
|
14873
|
+
code: "custom",
|
|
14874
|
+
path: ["config", field],
|
|
14875
|
+
message: `config.${field} is required for GitHub gateway channels.`
|
|
14876
|
+
});
|
|
14877
|
+
}
|
|
14878
|
+
}
|
|
14879
|
+
}
|
|
14880
|
+
if (value.channelType === "teams") {
|
|
14881
|
+
for (const field of ["app_id", "app_password"]) {
|
|
14882
|
+
if (!config2[field]) {
|
|
14883
|
+
issue2.addIssue({
|
|
14884
|
+
code: "custom",
|
|
14885
|
+
path: ["config", field],
|
|
14886
|
+
message: `config.${field} is required for Teams gateway channels.`
|
|
14887
|
+
});
|
|
14888
|
+
}
|
|
14889
|
+
}
|
|
14890
|
+
}
|
|
14891
|
+
});
|
|
14892
|
+
var slackThreadHistorySchema = external_exports.strictObject({
|
|
14893
|
+
sessionId: mcpOptionalId(
|
|
14894
|
+
"sessionId",
|
|
14895
|
+
"Session",
|
|
14896
|
+
"Preferred: resolve the Slack thread mapping from an accessible Agor session ID (UUIDv7 or short ID). If provided, gatewayChannelId/threadId are ignored."
|
|
14897
|
+
),
|
|
14898
|
+
gatewayChannelId: mcpOptionalId(
|
|
14899
|
+
"gatewayChannelId",
|
|
14900
|
+
"Gateway channel",
|
|
14901
|
+
"Explicit Slack gateway channel ID (UUIDv7 or short ID). Required when sessionId is omitted."
|
|
14902
|
+
),
|
|
14903
|
+
threadId: mcpOptionalNonEmptyString(
|
|
14904
|
+
"threadId",
|
|
14905
|
+
"Explicit Slack thread ID in Agor gateway format, e.g. C123-171234.000100. Required when sessionId is omitted."
|
|
14906
|
+
),
|
|
14907
|
+
oldestTs: mcpOptionalNonEmptyString(
|
|
14908
|
+
"oldestTs",
|
|
14909
|
+
"Optional Slack oldest timestamp bound, e.g. 171234.000100."
|
|
14910
|
+
),
|
|
14911
|
+
latestTs: mcpOptionalNonEmptyString(
|
|
14912
|
+
"latestTs",
|
|
14913
|
+
"Optional Slack latest timestamp bound, e.g. 171235.000200."
|
|
14914
|
+
),
|
|
14915
|
+
inclusive: external_exports.boolean().optional().describe("Whether Slack should include messages exactly at oldest/latest bounds."),
|
|
14916
|
+
limit: mcpLimit(50).describe("Maximum Slack messages to request (default: 50, max: 200)."),
|
|
14917
|
+
includeBotMessages: external_exports.boolean().optional().describe("Include Slack bot messages in the returned history. Defaults to false."),
|
|
14918
|
+
format: external_exports.enum(["messages", "markdown"]).optional().describe(
|
|
14919
|
+
'Response body format. "messages" returns normalized JSON; "markdown" returns a transcript string.'
|
|
14920
|
+
)
|
|
14921
|
+
}).superRefine((value, issue2) => {
|
|
14922
|
+
if (value.sessionId) return;
|
|
14923
|
+
if (!value.gatewayChannelId) {
|
|
14924
|
+
issue2.addIssue({
|
|
14925
|
+
code: "custom",
|
|
14926
|
+
path: ["gatewayChannelId"],
|
|
14927
|
+
message: "gatewayChannelId is required when sessionId is omitted."
|
|
14928
|
+
});
|
|
14929
|
+
}
|
|
14930
|
+
if (!value.threadId) {
|
|
14931
|
+
issue2.addIssue({
|
|
14932
|
+
code: "custom",
|
|
14933
|
+
path: ["threadId"],
|
|
14934
|
+
message: "threadId is required when sessionId is omitted."
|
|
14935
|
+
});
|
|
14936
|
+
}
|
|
14937
|
+
});
|
|
14938
|
+
var gatewayChannelUpdateSchema = external_exports.strictObject({
|
|
14939
|
+
gatewayChannelId: mcpRequiredId(
|
|
14940
|
+
"gatewayChannelId",
|
|
14941
|
+
"Gateway channel",
|
|
14942
|
+
"Gateway channel ID (UUIDv7 or short ID)"
|
|
14943
|
+
),
|
|
14944
|
+
name: mcpOptionalNonEmptyString("name", "New human-readable channel name."),
|
|
14945
|
+
channelType: external_exports.enum(["slack", "github", "teams", "discord", "whatsapp", "telegram"]).optional().describe("Gateway platform type. Changing this should include compatible config."),
|
|
14946
|
+
targetBranchId: mcpOptionalId("targetBranchId", "Branch", "New target branch/worktree ID."),
|
|
14947
|
+
agorUserId: mcpOptionalId("agorUserId", "User", "New run-as Agor user ID."),
|
|
14948
|
+
enabled: external_exports.boolean().optional().describe("Enable/disable the channel."),
|
|
14949
|
+
config: configSchema.optional().describe(
|
|
14950
|
+
`Partial platform config to merge. Send '${GATEWAY_REDACTED_SENTINEL}' or omit sensitive fields to preserve existing secrets; send a new value to rotate.`
|
|
14951
|
+
),
|
|
14952
|
+
agenticConfig: agenticConfigSchema.nullable().optional().describe("Replace agent/session defaults. null clears the gateway agentic config.")
|
|
14953
|
+
});
|
|
14954
|
+
|
|
14770
14955
|
// src/mcp/tools/knowledge.ts
|
|
14771
14956
|
import { createHash, randomUUID } from "crypto";
|
|
14772
14957
|
import fs2 from "fs";
|
|
14773
14958
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
14774
14959
|
import path3 from "path";
|
|
14775
|
-
import { BranchRepository as
|
|
14960
|
+
import { BranchRepository as BranchRepository5, KnowledgeNamespaceRepository as KnowledgeNamespaceRepository2 } from "@agor/core/db";
|
|
14776
14961
|
import { NotFound as NotFound2 } from "@agor/core/feathers";
|
|
14777
14962
|
import {
|
|
14778
14963
|
buildKnowledgeDocumentUri,
|
|
@@ -14798,14 +14983,14 @@ import { unified } from "unified";
|
|
|
14798
14983
|
|
|
14799
14984
|
// src/services/assistant-knowledge.ts
|
|
14800
14985
|
import {
|
|
14801
|
-
BranchRepository as
|
|
14986
|
+
BranchRepository as BranchRepository4,
|
|
14802
14987
|
KnowledgeNamespaceRepository,
|
|
14803
14988
|
shortId as shortId4
|
|
14804
14989
|
} from "@agor/core/db";
|
|
14805
14990
|
import { getAssistantConfig as getAssistantConfig2, isAssistant as isAssistant2 } from "@agor/core/types";
|
|
14806
14991
|
|
|
14807
14992
|
// src/services/knowledge-access.ts
|
|
14808
|
-
import { hasMinimumRole as
|
|
14993
|
+
import { hasMinimumRole as hasMinimumRole3, ROLES as ROLES3 } from "@agor/core/types";
|
|
14809
14994
|
|
|
14810
14995
|
// src/utils/branch-workspace-path.ts
|
|
14811
14996
|
import fs from "fs";
|
|
@@ -14947,8 +15132,263 @@ var KnowledgeNodeRefSchema = external_exports.object(
|
|
|
14947
15132
|
"Reference to an existing or creatable knowledge graph node. Prefer nodeId or uri; use typed IDs for links to Agor core objects."
|
|
14948
15133
|
);
|
|
14949
15134
|
|
|
15135
|
+
// src/mcp/tools/mcp-servers.ts
|
|
15136
|
+
import {
|
|
15137
|
+
isReservedMCPCustomHeaderName,
|
|
15138
|
+
isValidMCPHeaderName
|
|
15139
|
+
} from "@agor/core/tools/mcp/http-headers";
|
|
15140
|
+
var mcpNameSchema = external_exports.string({
|
|
15141
|
+
error: 'name is required and must be a string. Example: { "name": "context7" }'
|
|
15142
|
+
}).regex(
|
|
15143
|
+
/^[a-z][a-z0-9_-]{0,63}$/,
|
|
15144
|
+
'name must start with a lowercase letter and contain only lowercase letters, digits, "_" or "-" (max 64 chars).'
|
|
15145
|
+
).describe('Stable internal ID, e.g. "context7", "github", "datadog". Cannot be changed later.');
|
|
15146
|
+
var stringMapSchema = external_exports.record(external_exports.string(), external_exports.string()).describe(
|
|
15147
|
+
"JSON object of string keys/values. Values may use templates like {{ user.env.API_TOKEN }}."
|
|
15148
|
+
);
|
|
15149
|
+
var mcpAuthInputSchema = external_exports.strictObject({
|
|
15150
|
+
type: external_exports.enum(["none", "bearer", "jwt", "oauth"]).describe(
|
|
15151
|
+
"Authentication mode. OAuth tip: start with { type: 'oauth' } plus the MCP server URL; only add endpoint/client fields if discovery/DCR fails."
|
|
15152
|
+
),
|
|
15153
|
+
token: mcpOptionalString(
|
|
15154
|
+
"auth.token",
|
|
15155
|
+
"Bearer token. Prefer {{ user.env.MCP_TOKEN }} templates; raw secrets will be stored redacted but are still visible in this MCP call transcript."
|
|
15156
|
+
),
|
|
15157
|
+
api_url: mcpOptionalString("auth.api_url", "JWT auth API URL."),
|
|
15158
|
+
api_token: mcpOptionalString(
|
|
15159
|
+
"auth.api_token",
|
|
15160
|
+
"JWT API token. Prefer {{ user.env.JWT_TOKEN }} templates."
|
|
15161
|
+
),
|
|
15162
|
+
api_secret: mcpOptionalString(
|
|
15163
|
+
"auth.api_secret",
|
|
15164
|
+
"JWT API secret. Prefer {{ user.env.JWT_SECRET }} templates."
|
|
15165
|
+
),
|
|
15166
|
+
oauth_authorization_url: mcpOptionalString(
|
|
15167
|
+
"auth.oauth_authorization_url",
|
|
15168
|
+
"Optional OAuth authorization endpoint override. Leave blank for discovery."
|
|
15169
|
+
),
|
|
15170
|
+
oauth_token_url: mcpOptionalString(
|
|
15171
|
+
"auth.oauth_token_url",
|
|
15172
|
+
"Optional OAuth token endpoint override. Leave blank for discovery."
|
|
15173
|
+
),
|
|
15174
|
+
oauth_client_id: mcpOptionalString(
|
|
15175
|
+
"auth.oauth_client_id",
|
|
15176
|
+
"Optional OAuth client ID for providers that require a pre-registered app. Leave blank for Dynamic Client Registration where supported."
|
|
15177
|
+
),
|
|
15178
|
+
oauth_client_secret: mcpOptionalString(
|
|
15179
|
+
"auth.oauth_client_secret",
|
|
15180
|
+
"Optional OAuth client secret. Prefer {{ user.env.OAUTH_CLIENT_SECRET }} templates; raw secrets are not returned by this tool."
|
|
15181
|
+
),
|
|
15182
|
+
oauth_scope: mcpOptionalString("auth.oauth_scope", "Optional OAuth scopes, space-separated."),
|
|
15183
|
+
oauth_grant_type: external_exports.enum(["client_credentials", "authorization_code"]).optional().describe(
|
|
15184
|
+
"OAuth grant type hint. Defaults to 'client_credentials' for legacy token testing; browser OAuth uses authorization code with PKCE."
|
|
15185
|
+
),
|
|
15186
|
+
oauth_mode: external_exports.enum(["per_user", "shared"]).optional().describe("OAuth token ownership. Defaults to 'per_user' (recommended)."),
|
|
15187
|
+
insecure: external_exports.boolean().optional().describe("Allow insecure auth behavior if supported.")
|
|
15188
|
+
}).superRefine((auth, issue2) => {
|
|
15189
|
+
if (auth.type === "bearer" && !auth.token) {
|
|
15190
|
+
issue2.addIssue({
|
|
15191
|
+
code: "custom",
|
|
15192
|
+
path: ["token"],
|
|
15193
|
+
message: "auth.token is required when auth.type is 'bearer'."
|
|
15194
|
+
});
|
|
15195
|
+
}
|
|
15196
|
+
const fieldsByType = {
|
|
15197
|
+
none: [],
|
|
15198
|
+
bearer: ["token"],
|
|
15199
|
+
jwt: ["api_url", "api_token", "api_secret"],
|
|
15200
|
+
oauth: [
|
|
15201
|
+
"oauth_authorization_url",
|
|
15202
|
+
"oauth_token_url",
|
|
15203
|
+
"oauth_client_id",
|
|
15204
|
+
"oauth_client_secret",
|
|
15205
|
+
"oauth_scope",
|
|
15206
|
+
"oauth_grant_type",
|
|
15207
|
+
"oauth_mode",
|
|
15208
|
+
"insecure"
|
|
15209
|
+
]
|
|
15210
|
+
};
|
|
15211
|
+
const allowed = /* @__PURE__ */ new Set(["type", ...fieldsByType[auth.type]]);
|
|
15212
|
+
for (const key of Object.keys(auth)) {
|
|
15213
|
+
if (!allowed.has(key)) {
|
|
15214
|
+
issue2.addIssue({
|
|
15215
|
+
code: "custom",
|
|
15216
|
+
path: [key],
|
|
15217
|
+
message: `auth.${key} does not apply when auth.type is '${auth.type}'.`
|
|
15218
|
+
});
|
|
15219
|
+
}
|
|
15220
|
+
}
|
|
15221
|
+
if (auth.type === "jwt") {
|
|
15222
|
+
for (const field of ["api_url", "api_token", "api_secret"]) {
|
|
15223
|
+
if (!auth[field]) {
|
|
15224
|
+
issue2.addIssue({
|
|
15225
|
+
code: "custom",
|
|
15226
|
+
path: [field],
|
|
15227
|
+
message: `auth.${field} is required when auth.type is 'jwt'.`
|
|
15228
|
+
});
|
|
15229
|
+
}
|
|
15230
|
+
}
|
|
15231
|
+
}
|
|
15232
|
+
}).describe(
|
|
15233
|
+
"Auth config. Common OAuth path: { type: 'oauth' } plus url; leave OAuth URLs/client fields blank first so metadata discovery/DCR can do the work."
|
|
15234
|
+
);
|
|
15235
|
+
var toolPermissionsSchema = external_exports.record(external_exports.string(), external_exports.enum(["ask", "allow", "deny"])).describe("Optional per-tool permissions, e.g. { 'list_files': 'allow', 'write_file': 'ask' }.");
|
|
15236
|
+
var mcpServerCreateSchema = external_exports.strictObject({
|
|
15237
|
+
name: mcpNameSchema,
|
|
15238
|
+
displayName: mcpOptionalNonEmptyString(
|
|
15239
|
+
"displayName",
|
|
15240
|
+
'Human-friendly display name, e.g. "Context7 MCP".'
|
|
15241
|
+
),
|
|
15242
|
+
description: mcpOptionalString("description", "Optional description."),
|
|
15243
|
+
transport: external_exports.enum(["stdio", "http", "sse"]).optional().describe(
|
|
15244
|
+
"Transport. Defaults to 'http' when url is provided, otherwise 'stdio'. Most remote OAuth MCP servers use 'http'."
|
|
15245
|
+
),
|
|
15246
|
+
url: mcpOptionalString(
|
|
15247
|
+
"url",
|
|
15248
|
+
"Remote MCP server URL for http/sse transports. Supports templates like {{ user.env.MCP_URL }}."
|
|
15249
|
+
),
|
|
15250
|
+
command: mcpOptionalString("command", 'Local command for stdio transport, e.g. "npx".'),
|
|
15251
|
+
args: external_exports.array(external_exports.string()).optional().describe(
|
|
15252
|
+
'Arguments for stdio command, e.g. ["-y", "@modelcontextprotocol/server-filesystem"].'
|
|
15253
|
+
),
|
|
15254
|
+
headers: stringMapSchema.optional().describe(
|
|
15255
|
+
"Custom HTTP headers for http/sse transports. Do not include Authorization; use auth instead. Prefer templates for secret values."
|
|
15256
|
+
),
|
|
15257
|
+
env: stringMapSchema.optional().describe(
|
|
15258
|
+
"Environment variables for the MCP process/config. Prefer {{ user.env.VAR }} templates for secrets."
|
|
15259
|
+
),
|
|
15260
|
+
auth: mcpAuthInputSchema.optional(),
|
|
15261
|
+
scope: external_exports.enum(["global", "session"]).optional().describe(
|
|
15262
|
+
"Scope. Defaults to 'global' so it appears in agor_mcp_servers_list. 'session' is only for explicit session attachment workflows."
|
|
15263
|
+
),
|
|
15264
|
+
enabled: external_exports.boolean().optional().describe("Whether the server is enabled. Defaults to true."),
|
|
15265
|
+
attachToCurrentSession: external_exports.boolean().optional().describe(
|
|
15266
|
+
`If true, also add a session-specific link after creating. Mostly useful for scope:"session" servers; global enabled servers are already in each session's effective MCP set.`
|
|
15267
|
+
),
|
|
15268
|
+
attachToSessionId: mcpOptionalId(
|
|
15269
|
+
"attachToSessionId",
|
|
15270
|
+
"Session",
|
|
15271
|
+
"Optional session ID (UUIDv7 or short ID) to attach after creating. Overrides attachToCurrentSession."
|
|
15272
|
+
)
|
|
15273
|
+
}).superRefine((value, issue2) => validateMcpServerConfig(value, issue2, false));
|
|
15274
|
+
var mcpServerUpdateSchema = external_exports.strictObject({
|
|
15275
|
+
mcpServerId: mcpRequiredId(
|
|
15276
|
+
"mcpServerId",
|
|
15277
|
+
"MCP server",
|
|
15278
|
+
"MCP server ID to update (UUIDv7 or short ID)"
|
|
15279
|
+
),
|
|
15280
|
+
displayName: mcpOptionalNonEmptyString("displayName", "New human-friendly display name."),
|
|
15281
|
+
description: mcpOptionalString(
|
|
15282
|
+
"description",
|
|
15283
|
+
"New description. Pass an empty string to clear."
|
|
15284
|
+
),
|
|
15285
|
+
transport: external_exports.enum(["stdio", "http", "sse"]).optional().describe("Transport to set."),
|
|
15286
|
+
url: mcpOptionalString("url", "Remote MCP URL for http/sse transports."),
|
|
15287
|
+
command: mcpOptionalString("command", "Local command for stdio transport."),
|
|
15288
|
+
args: external_exports.array(external_exports.string()).optional().describe("Arguments for stdio command."),
|
|
15289
|
+
headers: stringMapSchema.optional().describe(
|
|
15290
|
+
"Replace custom HTTP headers. Redacted existing header values may be passed back unchanged by the UI; this tool should normally pass real template values or omit headers."
|
|
15291
|
+
),
|
|
15292
|
+
env: stringMapSchema.optional().describe("Replace environment variables."),
|
|
15293
|
+
auth: mcpAuthInputSchema.optional().describe(
|
|
15294
|
+
"Replace auth config. Existing redacted secrets are preserved if their redacted placeholders are passed back; prefer omitting auth unless changing it. Use { type: 'none' } to clear auth."
|
|
15295
|
+
),
|
|
15296
|
+
scope: external_exports.enum(["global", "session"]).optional().describe("Scope to set."),
|
|
15297
|
+
enabled: external_exports.boolean().optional().describe("Enabled flag."),
|
|
15298
|
+
toolPermissions: toolPermissionsSchema.optional()
|
|
15299
|
+
}).superRefine((value, issue2) => validateMcpServerConfig(value, issue2, true));
|
|
15300
|
+
function validateHeaders(headers, issue2) {
|
|
15301
|
+
if (!headers) return;
|
|
15302
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
15303
|
+
const name = key.trim();
|
|
15304
|
+
if (!name) {
|
|
15305
|
+
issue2.addIssue({
|
|
15306
|
+
code: "custom",
|
|
15307
|
+
path: ["headers", key],
|
|
15308
|
+
message: "Header names cannot be empty."
|
|
15309
|
+
});
|
|
15310
|
+
} else if (!isValidMCPHeaderName(name)) {
|
|
15311
|
+
issue2.addIssue({
|
|
15312
|
+
code: "custom",
|
|
15313
|
+
path: ["headers", key],
|
|
15314
|
+
message: `Invalid HTTP header name: ${key}`
|
|
15315
|
+
});
|
|
15316
|
+
} else if (isReservedMCPCustomHeaderName(name)) {
|
|
15317
|
+
issue2.addIssue({
|
|
15318
|
+
code: "custom",
|
|
15319
|
+
path: ["headers", key],
|
|
15320
|
+
message: `Header ${name} is reserved; configure Authorization through auth instead.`
|
|
15321
|
+
});
|
|
15322
|
+
}
|
|
15323
|
+
if (typeof value !== "string") {
|
|
15324
|
+
issue2.addIssue({
|
|
15325
|
+
code: "custom",
|
|
15326
|
+
path: ["headers", key],
|
|
15327
|
+
message: "Header values must be strings."
|
|
15328
|
+
});
|
|
15329
|
+
}
|
|
15330
|
+
}
|
|
15331
|
+
}
|
|
15332
|
+
function validateMcpServerConfig(value, issue2, partial2) {
|
|
15333
|
+
const transport = value.transport ?? (value.url ? "http" : "stdio");
|
|
15334
|
+
validateHeaders(value.headers, issue2);
|
|
15335
|
+
if (!partial2 || value.transport !== void 0 || value.url !== void 0 || value.command !== void 0) {
|
|
15336
|
+
if (transport === "stdio") {
|
|
15337
|
+
if (!partial2 && !value.command) {
|
|
15338
|
+
issue2.addIssue({
|
|
15339
|
+
code: "custom",
|
|
15340
|
+
path: ["command"],
|
|
15341
|
+
message: "command is required for stdio transport."
|
|
15342
|
+
});
|
|
15343
|
+
}
|
|
15344
|
+
if (value.url) {
|
|
15345
|
+
issue2.addIssue({
|
|
15346
|
+
code: "custom",
|
|
15347
|
+
path: ["url"],
|
|
15348
|
+
message: "url only applies to http/sse transports, not stdio."
|
|
15349
|
+
});
|
|
15350
|
+
}
|
|
15351
|
+
if (value.headers) {
|
|
15352
|
+
issue2.addIssue({
|
|
15353
|
+
code: "custom",
|
|
15354
|
+
path: ["headers"],
|
|
15355
|
+
message: "headers only apply to http/sse transports, not stdio."
|
|
15356
|
+
});
|
|
15357
|
+
}
|
|
15358
|
+
if (value.auth && value.auth.type !== "none") {
|
|
15359
|
+
issue2.addIssue({
|
|
15360
|
+
code: "custom",
|
|
15361
|
+
path: ["auth", "type"],
|
|
15362
|
+
message: "Authentication config only applies to http/sse transports."
|
|
15363
|
+
});
|
|
15364
|
+
}
|
|
15365
|
+
} else if (!partial2 && !value.url) {
|
|
15366
|
+
issue2.addIssue({
|
|
15367
|
+
code: "custom",
|
|
15368
|
+
path: ["url"],
|
|
15369
|
+
message: `url is required for ${transport} transport.`
|
|
15370
|
+
});
|
|
15371
|
+
} else {
|
|
15372
|
+
if (value.command) {
|
|
15373
|
+
issue2.addIssue({
|
|
15374
|
+
code: "custom",
|
|
15375
|
+
path: ["command"],
|
|
15376
|
+
message: "command only applies to stdio transport, not http/sse."
|
|
15377
|
+
});
|
|
15378
|
+
}
|
|
15379
|
+
if (value.args && value.args.length > 0) {
|
|
15380
|
+
issue2.addIssue({
|
|
15381
|
+
code: "custom",
|
|
15382
|
+
path: ["args"],
|
|
15383
|
+
message: "args only apply to stdio transport, not http/sse."
|
|
15384
|
+
});
|
|
15385
|
+
}
|
|
15386
|
+
}
|
|
15387
|
+
}
|
|
15388
|
+
}
|
|
15389
|
+
|
|
14950
15390
|
// src/mcp/tools/proxies.ts
|
|
14951
|
-
import { getBaseUrl, loadConfig, resolveProxies } from "@agor/core/config";
|
|
15391
|
+
import { getBaseUrl, loadConfig as loadConfig2, resolveProxies } from "@agor/core/config";
|
|
14952
15392
|
|
|
14953
15393
|
// src/mcp/tools/repos.ts
|
|
14954
15394
|
import { extractSlugFromUrl, isValidGitUrl, isValidSlug } from "@agor/core/config";
|
|
@@ -14960,7 +15400,7 @@ var agenticToolConfigSchema = external_exports.object({
|
|
|
14960
15400
|
model_config: external_exports.object({
|
|
14961
15401
|
mode: external_exports.enum(["alias", "exact"]).optional(),
|
|
14962
15402
|
model: mcpOptionalString("model_config.model", "Model name override."),
|
|
14963
|
-
effort: external_exports.enum(["low", "medium", "high", "max"]).optional(),
|
|
15403
|
+
effort: external_exports.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
|
|
14964
15404
|
advisorModel: mcpOptionalString(
|
|
14965
15405
|
"model_config.advisorModel",
|
|
14966
15406
|
"Claude Code advisor model override (e.g. 'opus', 'sonnet', 'fable')."
|
|
@@ -14976,7 +15416,7 @@ var agenticToolConfigSchema = external_exports.object({
|
|
|
14976
15416
|
|
|
14977
15417
|
// src/mcp/tools/sessions.ts
|
|
14978
15418
|
import {
|
|
14979
|
-
BranchRepository as
|
|
15419
|
+
BranchRepository as BranchRepository6,
|
|
14980
15420
|
SessionRelationshipRepository,
|
|
14981
15421
|
shortId as shortId5
|
|
14982
15422
|
} from "@agor/core/db";
|
|
@@ -14999,6 +15439,7 @@ import {
|
|
|
14999
15439
|
} from "@agor/core/types";
|
|
15000
15440
|
init_branch_inspect();
|
|
15001
15441
|
init_executor_read_impersonation();
|
|
15442
|
+
init_spawn_executor();
|
|
15002
15443
|
var modelConfigObjectSchema = external_exports.object({
|
|
15003
15444
|
mode: external_exports.enum(["alias", "exact"]).optional().describe("Model selection mode (default: 'alias')"),
|
|
15004
15445
|
// .min(1): reject empty-string model explicitly so callers don't silently
|
|
@@ -15007,7 +15448,7 @@ var modelConfigObjectSchema = external_exports.object({
|
|
|
15007
15448
|
"modelConfig.model",
|
|
15008
15449
|
"Model identifier (e.g. 'claude-opus-4-6', 'claude-sonnet-4-6')"
|
|
15009
15450
|
),
|
|
15010
|
-
effort: external_exports.enum(["low", "medium", "high", "max"]).optional().describe("Reasoning effort level (default: high)"),
|
|
15451
|
+
effort: external_exports.enum(["low", "medium", "high", "xhigh", "max"]).optional().describe("Reasoning effort level (default: high)"),
|
|
15011
15452
|
advisorModel: mcpOptionalString(
|
|
15012
15453
|
"modelConfig.advisorModel",
|
|
15013
15454
|
"Claude Code advisor model override (e.g. 'opus', 'sonnet', 'fable', or a full model ID)."
|
|
@@ -15028,22 +15469,33 @@ var modelConfigInputSchema = external_exports.union([
|
|
|
15028
15469
|
);
|
|
15029
15470
|
|
|
15030
15471
|
// src/mcp/tools/users.ts
|
|
15031
|
-
import { ROLES as
|
|
15472
|
+
import { ROLES as ROLES4 } from "@agor/core/types";
|
|
15032
15473
|
|
|
15033
15474
|
// src/mcp/tools/widgets.ts
|
|
15034
15475
|
import { MessageRole as MessageRole2 } from "@agor/core/types";
|
|
15035
15476
|
|
|
15036
15477
|
// src/utils/append-system-message.ts
|
|
15037
|
-
import { generateId as generateId2, SessionRepository as
|
|
15478
|
+
import { generateId as generateId2, SessionRepository as SessionRepository3 } from "@agor/core/db";
|
|
15038
15479
|
import { MessageRole } from "@agor/core/types";
|
|
15039
15480
|
|
|
15040
15481
|
// src/utils/session-tasks.ts
|
|
15041
15482
|
import { EXECUTING_TASK_STATUSES, isTaskExecuting } from "@agor/core/types";
|
|
15042
15483
|
|
|
15043
15484
|
// src/widgets/env-vars/index.ts
|
|
15044
|
-
import {
|
|
15485
|
+
import {
|
|
15486
|
+
ENV_VAR_CONSTRAINTS,
|
|
15487
|
+
isEnvVarAllowed,
|
|
15488
|
+
validateEnvVar
|
|
15489
|
+
} from "@agor/core/config";
|
|
15490
|
+
import { SessionEnvSelectionRepository } from "@agor/core/db";
|
|
15045
15491
|
import { BadRequest } from "@agor/core/feathers";
|
|
15046
15492
|
var ENV_VAR_NAME_REGEX = ENV_VAR_CONSTRAINTS.NAME_PATTERN;
|
|
15493
|
+
var envVarFieldMetadataSchema = external_exports.object({
|
|
15494
|
+
description: external_exports.string().max(200).optional(),
|
|
15495
|
+
placeholder: external_exports.string().max(120).optional(),
|
|
15496
|
+
format_hint: external_exports.string().max(80).optional(),
|
|
15497
|
+
input_type: external_exports.enum(["password", "text", "textarea"]).default("password").optional()
|
|
15498
|
+
}).strict();
|
|
15047
15499
|
var envVarsParamsSchema = external_exports.object({
|
|
15048
15500
|
names: external_exports.array(external_exports.string().regex(ENV_VAR_NAME_REGEX)).min(1).max(10).refine((names) => new Set(names).size === names.length, {
|
|
15049
15501
|
message: "Env var names must be unique"
|
|
@@ -15051,18 +15503,56 @@ var envVarsParamsSchema = external_exports.object({
|
|
|
15051
15503
|
reason: external_exports.string().min(1).max(200).describe(
|
|
15052
15504
|
"One sentence explaining why you need the value(s). Keep it tight \u2014 this renders in a small muted line under the input. NOT a place to restate what the widget does."
|
|
15053
15505
|
),
|
|
15506
|
+
variable_metadata: external_exports.record(external_exports.string().regex(ENV_VAR_NAME_REGEX), envVarFieldMetadataSchema).optional().describe(
|
|
15507
|
+
"Optional per-variable display metadata keyed by requested name. Allowed keys per variable: description, placeholder, format_hint, input_type (password|text|textarea). Do not include values, defaults, examples containing secrets, or anything secret-like."
|
|
15508
|
+
),
|
|
15054
15509
|
auto_resume: external_exports.boolean().default(true).describe(
|
|
15055
15510
|
"When true (default), a system-authored prompt is auto-queued back into the agent on submit/dismiss."
|
|
15056
15511
|
)
|
|
15512
|
+
}).superRefine((params, ctx) => {
|
|
15513
|
+
const requested = new Set(params.names);
|
|
15514
|
+
for (const key of Object.keys(params.variable_metadata ?? {})) {
|
|
15515
|
+
if (!requested.has(key)) {
|
|
15516
|
+
ctx.addIssue({
|
|
15517
|
+
code: external_exports.ZodIssueCode.custom,
|
|
15518
|
+
path: ["variable_metadata", key],
|
|
15519
|
+
message: `Metadata key ${key} must match a requested env var name`
|
|
15520
|
+
});
|
|
15521
|
+
}
|
|
15522
|
+
}
|
|
15057
15523
|
});
|
|
15058
15524
|
var envVarsSubmitSchema = external_exports.object({
|
|
15059
15525
|
values: external_exports.record(
|
|
15060
15526
|
external_exports.string().regex(ENV_VAR_NAME_REGEX),
|
|
15061
15527
|
external_exports.string().min(1).max(ENV_VAR_CONSTRAINTS.MAX_VALUE_LENGTH)
|
|
15062
|
-
).
|
|
15063
|
-
|
|
15064
|
-
}),
|
|
15528
|
+
).default({}),
|
|
15529
|
+
use_existing: external_exports.array(external_exports.string().regex(ENV_VAR_NAME_REGEX)).max(10).default([]).describe("Requested names whose already-saved global values should be used."),
|
|
15065
15530
|
scope: external_exports.enum(["global", "session"])
|
|
15531
|
+
}).superRefine((submit, ctx) => {
|
|
15532
|
+
const valueNames = Object.keys(submit.values);
|
|
15533
|
+
const existingNames = submit.use_existing;
|
|
15534
|
+
const total = valueNames.length + existingNames.length;
|
|
15535
|
+
if (total < 1 || total > 10) {
|
|
15536
|
+
ctx.addIssue({
|
|
15537
|
+
code: external_exports.ZodIssueCode.custom,
|
|
15538
|
+
message: "Must submit between 1 and 10 env vars"
|
|
15539
|
+
});
|
|
15540
|
+
}
|
|
15541
|
+
const duplicates = existingNames.filter((name) => valueNames.includes(name));
|
|
15542
|
+
for (const name of duplicates) {
|
|
15543
|
+
ctx.addIssue({
|
|
15544
|
+
code: external_exports.ZodIssueCode.custom,
|
|
15545
|
+
path: ["use_existing"],
|
|
15546
|
+
message: `Cannot both submit and use existing value for ${name}`
|
|
15547
|
+
});
|
|
15548
|
+
}
|
|
15549
|
+
if (new Set(existingNames).size !== existingNames.length) {
|
|
15550
|
+
ctx.addIssue({
|
|
15551
|
+
code: external_exports.ZodIssueCode.custom,
|
|
15552
|
+
path: ["use_existing"],
|
|
15553
|
+
message: "use_existing names must be unique"
|
|
15554
|
+
});
|
|
15555
|
+
}
|
|
15066
15556
|
});
|
|
15067
15557
|
|
|
15068
15558
|
// src/mcp/server.ts
|
|
@@ -15105,6 +15595,21 @@ Continue or fork an existing session:
|
|
|
15105
15595
|
Discover tools: search domains/summaries \u2192 get details for one tool \u2192 execute`;
|
|
15106
15596
|
|
|
15107
15597
|
// src/mcp/tools/messages.ts
|
|
15598
|
+
var BROAD_SEARCH_GUIDANCE = 'Broad cross-session message search must be scoped to sessionId/taskId or bounded with createdAfter. Use a window of 31 days or less; add createdBefore for historical searches. Example: { "search": "SEO", "createdAfter": "2026-06-01T00:00:00Z", "createdBefore": "2026-06-15T00:00:00Z" }. This prevents full-table scans on large message databases.';
|
|
15599
|
+
var MAX_CROSS_SESSION_SEARCH_WINDOW_MS = 31 * 24 * 60 * 60 * 1e3;
|
|
15600
|
+
function parseDateArg(name, value) {
|
|
15601
|
+
if (value === void 0 || value === null || value === "") return void 0;
|
|
15602
|
+
if (typeof value !== "string") {
|
|
15603
|
+
throw new Error(`${name} must be an ISO-8601 date string, for example "2026-06-01T00:00:00Z".`);
|
|
15604
|
+
}
|
|
15605
|
+
const date5 = new Date(value);
|
|
15606
|
+
if (Number.isNaN(date5.getTime())) {
|
|
15607
|
+
throw new Error(
|
|
15608
|
+
`${name} must be a valid ISO-8601 date string, for example "2026-06-01" or "2026-06-01T00:00:00Z".`
|
|
15609
|
+
);
|
|
15610
|
+
}
|
|
15611
|
+
return date5;
|
|
15612
|
+
}
|
|
15108
15613
|
function registerMessageTools(server, ctx) {
|
|
15109
15614
|
server.registerTool(
|
|
15110
15615
|
"agor_messages_list",
|
|
@@ -15120,7 +15625,15 @@ function registerMessageTools(server, ctx) {
|
|
|
15120
15625
|
taskId: mcpOptionalId("taskId", "Task", "Task ID to scope messages to (optional)"),
|
|
15121
15626
|
search: mcpOptionalString(
|
|
15122
15627
|
"search",
|
|
15123
|
-
`Keyword search across message content. Space-separated terms are AND'd, pipe (|) for OR. Example: "OAuth middleware" requires both; "OAuth | JWT" matches either.`
|
|
15628
|
+
`Keyword search across message content. Space-separated terms are AND'd, pipe (|) for OR. Example: "OAuth middleware" requires both; "OAuth | JWT" matches either. Cross-session search must include sessionId/taskId or a createdAfter-bounded window of 31 days or less.`
|
|
15629
|
+
),
|
|
15630
|
+
createdAfter: mcpOptionalString(
|
|
15631
|
+
"createdAfter",
|
|
15632
|
+
'Only include messages at or after this message timestamp. ISO-8601 date/time, e.g. "2026-06-01" or "2026-06-01T00:00:00Z". Recommended for broad searches.'
|
|
15633
|
+
),
|
|
15634
|
+
createdBefore: mcpOptionalString(
|
|
15635
|
+
"createdBefore",
|
|
15636
|
+
'Only include messages before or at this message timestamp. ISO-8601 date/time, e.g. "2026-06-28T23:59:59Z". Use with createdAfter for historical cross-session searches.'
|
|
15124
15637
|
),
|
|
15125
15638
|
includeToolCalls: external_exports.boolean().optional().describe(
|
|
15126
15639
|
"Include tool call messages and tool_use content blocks (default: false). When false, strips tool noise for cleaner output."
|
|
@@ -15140,11 +15653,25 @@ function registerMessageTools(server, ctx) {
|
|
|
15140
15653
|
const sessionIdRaw = coerceString(args.sessionId);
|
|
15141
15654
|
const taskIdRaw = coerceString(args.taskId);
|
|
15142
15655
|
const search = coerceString(args.search);
|
|
15656
|
+
const createdAfter = parseDateArg("createdAfter", args.createdAfter);
|
|
15657
|
+
const createdBefore = parseDateArg("createdBefore", args.createdBefore);
|
|
15658
|
+
if (createdAfter && createdBefore && createdAfter.getTime() > createdBefore.getTime()) {
|
|
15659
|
+
throw new Error("createdAfter must be earlier than or equal to createdBefore.");
|
|
15660
|
+
}
|
|
15143
15661
|
if (!sessionIdRaw && !taskIdRaw && !search) {
|
|
15144
15662
|
throw new Error(
|
|
15145
|
-
'At least one of sessionId, taskId, or search must be provided as a non-empty string. Example: { "sessionId": "01abcdef" } or { "search": "OAuth middleware" }.'
|
|
15663
|
+
'At least one of sessionId, taskId, or search must be provided as a non-empty string. Example: { "sessionId": "01abcdef" } or { "search": "OAuth middleware", "createdAfter": "2026-06-01T00:00:00Z" }.'
|
|
15146
15664
|
);
|
|
15147
15665
|
}
|
|
15666
|
+
if (search && !sessionIdRaw && !taskIdRaw) {
|
|
15667
|
+
if (!createdAfter) {
|
|
15668
|
+
throw new Error(BROAD_SEARCH_GUIDANCE);
|
|
15669
|
+
}
|
|
15670
|
+
const effectiveCreatedBefore = createdBefore ?? /* @__PURE__ */ new Date();
|
|
15671
|
+
if (effectiveCreatedBefore.getTime() - createdAfter.getTime() > MAX_CROSS_SESSION_SEARCH_WINDOW_MS) {
|
|
15672
|
+
throw new Error(BROAD_SEARCH_GUIDANCE);
|
|
15673
|
+
}
|
|
15674
|
+
}
|
|
15148
15675
|
const sessionId = sessionIdRaw ? await resolveSessionId(ctx, sessionIdRaw) : void 0;
|
|
15149
15676
|
const taskId = taskIdRaw ? await resolveTaskId(ctx, taskIdRaw) : void 0;
|
|
15150
15677
|
const includeToolCalls = args.includeToolCalls === true;
|
|
@@ -15159,6 +15686,8 @@ function registerMessageTools(server, ctx) {
|
|
|
15159
15686
|
if (sessionId) conditions.push(eq(messagesTable.session_id, sessionId));
|
|
15160
15687
|
if (taskId) conditions.push(eq(messagesTable.task_id, taskId));
|
|
15161
15688
|
if (role) conditions.push(eq(messagesTable.role, role));
|
|
15689
|
+
if (createdAfter) conditions.push(gte(messagesTable.timestamp, createdAfter));
|
|
15690
|
+
if (createdBefore) conditions.push(lte(messagesTable.timestamp, createdBefore));
|
|
15162
15691
|
if (!includeToolCalls) {
|
|
15163
15692
|
conditions.push(
|
|
15164
15693
|
sql`${messagesTable.type} NOT IN ('file-history-snapshot', 'permission_request', 'input_request')`
|
|
@@ -15177,20 +15706,20 @@ function registerMessageTools(server, ctx) {
|
|
|
15177
15706
|
if (isBranchRbacEnabled2()) {
|
|
15178
15707
|
const userRole = ctx.authenticatedUser?.role;
|
|
15179
15708
|
if (!isSuperAdmin(userRole)) {
|
|
15180
|
-
|
|
15181
|
-
|
|
15182
|
-
|
|
15183
|
-
if (accessibleIds.length === 0) {
|
|
15184
|
-
return textResult({ messages: [], total: 0, offset, limit });
|
|
15185
|
-
}
|
|
15186
|
-
conditions.push(inArray(messagesTable.session_id, accessibleIds));
|
|
15709
|
+
conditions.push(
|
|
15710
|
+
visibleSessionReferenceAccessExists(ctx.db, ctx.userId, messagesTable.session_id)
|
|
15711
|
+
);
|
|
15187
15712
|
}
|
|
15188
15713
|
}
|
|
15189
15714
|
const orderCol = sessionId ? messagesTable.index : messagesTable.timestamp;
|
|
15190
15715
|
const orderBy = order === "desc" ? desc(orderCol) : asc(orderCol);
|
|
15191
|
-
const
|
|
15716
|
+
const fetchLimit = Math.min(limit + 100, 200);
|
|
15717
|
+
const allRows = await select(ctx.db).from(messagesTable).where(conditions.length > 0 ? and(...conditions) : void 0).orderBy(orderBy).limit(fetchLimit).offset(offset).all();
|
|
15192
15718
|
const processed = [];
|
|
15719
|
+
let consumedRows = 0;
|
|
15193
15720
|
for (const row of allRows) {
|
|
15721
|
+
if (processed.length >= limit) break;
|
|
15722
|
+
consumedRows++;
|
|
15194
15723
|
const data = row.data;
|
|
15195
15724
|
const content = data?.content;
|
|
15196
15725
|
if (!includeToolCalls && row.role === "user" && Array.isArray(content)) {
|
|
@@ -15241,9 +15770,17 @@ function registerMessageTools(server, ctx) {
|
|
|
15241
15770
|
if (toolCallCount > 0) msg.tool_call_count = toolCallCount;
|
|
15242
15771
|
processed.push(msg);
|
|
15243
15772
|
}
|
|
15244
|
-
const
|
|
15245
|
-
|
|
15246
|
-
|
|
15773
|
+
const hasMore = allRows.length > consumedRows || allRows.length === fetchLimit;
|
|
15774
|
+
return textResult({
|
|
15775
|
+
messages: processed,
|
|
15776
|
+
returned: processed.length,
|
|
15777
|
+
offset,
|
|
15778
|
+
limit,
|
|
15779
|
+
scanned: allRows.length,
|
|
15780
|
+
scan_limit: fetchLimit,
|
|
15781
|
+
has_more: hasMore,
|
|
15782
|
+
next_offset: hasMore ? offset + consumedRows : void 0
|
|
15783
|
+
});
|
|
15247
15784
|
}
|
|
15248
15785
|
);
|
|
15249
15786
|
}
|