agor-live 0.22.0 → 0.23.2
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 +518 -89
- package/dist/core/claude/index.js +515 -88
- package/dist/core/claude-cli/index.cjs +24 -0
- package/dist/core/claude-cli/index.js +24 -0
- package/dist/core/claude-cli/pricing.d.ts.map +1 -1
- package/dist/core/client/index.cjs +52 -7
- package/dist/core/client/index.js +48 -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 +2767 -1232
- 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 +2601 -1094
- 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 +54 -3
- 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 +52 -2
- package/dist/core/db/repositories/branches.d.ts.map +1 -1
- package/dist/core/db/repositories/cards.d.ts +15 -1
- package/dist/core/db/repositories/cards.d.ts.map +1 -1
- package/dist/core/db/repositories/gateway-channels.d.ts +9 -0
- 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 +56 -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 +7 -6
- package/dist/core/environment/render-snapshot.d.ts +2 -0
- package/dist/core/environment/render-snapshot.d.ts.map +1 -1
- package/dist/core/environment/render-snapshot.js +7 -6
- package/dist/core/environment/variable-resolver.cjs +3 -1
- package/dist/core/environment/variable-resolver.js +3 -1
- 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 +11563 -10832
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +12203 -10962
- package/dist/core/lib/feathers-validation.cjs +9 -1
- package/dist/core/lib/feathers-validation.d.ts +2 -0
- package/dist/core/lib/feathers-validation.d.ts.map +1 -1
- package/dist/core/lib/feathers-validation.js +9 -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 +8008 -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 +8010 -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 +373 -28
- package/dist/core/mcp/index.d.ts +1 -1
- package/dist/core/mcp/index.d.ts.map +1 -1
- package/dist/core/mcp/index.js +369 -27
- package/dist/core/mcp/template-patterns.d.ts +15 -0
- package/dist/core/mcp/template-patterns.d.ts.map +1 -0
- package/dist/core/mcp/template-resolver.d.ts +13 -0
- package/dist/core/mcp/template-resolver.d.ts.map +1 -1
- package/dist/core/models/browser.cjs +154 -25
- package/dist/core/models/browser.js +150 -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 +154 -25
- package/dist/core/models/index.js +150 -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 +8569 -5519
- 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 +8580 -5535
- 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/templates/handlebars-helpers.cjs +3 -1
- package/dist/core/templates/handlebars-helpers.d.ts +5 -0
- package/dist/core/templates/handlebars-helpers.d.ts.map +1 -1
- package/dist/core/templates/handlebars-helpers.js +3 -1
- package/dist/core/tools/mcp/auth-secrets.cjs +3460 -3
- package/dist/core/tools/mcp/auth-secrets.d.ts.map +1 -1
- package/dist/core/tools/mcp/auth-secrets.js +3477 -3
- package/dist/core/tools/mcp/http-headers.cjs +17 -1
- package/dist/core/tools/mcp/http-headers.d.ts.map +1 -1
- package/dist/core/tools/mcp/http-headers.js +15 -1
- package/dist/core/tools/mcp/oauth-refresh.cjs +568 -114
- package/dist/core/tools/mcp/oauth-refresh.js +566 -115
- package/dist/core/types/board.d.ts +14 -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 +90 -1
- package/dist/core/types/gateway.d.ts.map +1 -1
- package/dist/core/types/index.cjs +42 -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 +38 -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 +1123 -674
- package/dist/core/unix/index.js +1071 -624
- 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 +34 -6
- package/dist/daemon/auth/executor-session-token.d.ts +15 -0
- package/dist/daemon/auth/executor-session-token.d.ts.map +1 -0
- package/dist/daemon/auth/executor-session-token.js +17 -0
- package/dist/daemon/auth/issue-browser-tokens-hook.d.ts +24 -0
- package/dist/daemon/auth/issue-browser-tokens-hook.d.ts.map +1 -0
- package/dist/daemon/auth/issue-browser-tokens-hook.js +95 -0
- 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 +141 -3
- 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 +5 -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 +8271 -2956
- 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 +8271 -2956
- 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 +1740 -81
- 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 +598 -24
- package/dist/daemon/mcp/tools/artifacts.js +560 -20
- package/dist/daemon/mcp/tools/boards.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/boards.js +567 -21
- package/dist/daemon/mcp/tools/branches.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/branches.js +624 -50
- package/dist/daemon/mcp/tools/card-types.js +558 -18
- package/dist/daemon/mcp/tools/cards.js +558 -18
- package/dist/daemon/mcp/tools/environment.js +566 -18
- 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 +16187 -0
- package/dist/daemon/mcp/tools/knowledge.js +558 -18
- package/dist/daemon/mcp/tools/mcp-servers.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/mcp-servers.js +893 -18
- package/dist/daemon/mcp/tools/messages.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/messages.js +618 -32
- package/dist/daemon/mcp/tools/proxies.js +568 -20
- package/dist/daemon/mcp/tools/repos.js +558 -18
- package/dist/daemon/mcp/tools/schedules.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/schedules.js +561 -19
- package/dist/daemon/mcp/tools/search.js +558 -18
- package/dist/daemon/mcp/tools/sessions.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/sessions.js +571 -24
- package/dist/daemon/mcp/tools/tasks.js +558 -18
- package/dist/daemon/mcp/tools/users.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/users.js +577 -23
- package/dist/daemon/mcp/tools/widgets.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/widgets.js +759 -83
- package/dist/daemon/oauth-auth-helpers.d.ts +35 -0
- package/dist/daemon/oauth-auth-helpers.d.ts.map +1 -0
- package/dist/daemon/oauth-auth-helpers.js +14 -0
- package/dist/daemon/register-hooks.d.ts +4 -2
- package/dist/daemon/register-hooks.d.ts.map +1 -1
- package/dist/daemon/register-hooks.js +1158 -595
- 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 +3161 -812
- 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 +2782 -739
- 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 +39 -5
- package/dist/daemon/services/boards.d.ts.map +1 -1
- package/dist/daemon/services/boards.js +123 -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 +272 -36
- 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 +387 -273
- 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 +63 -3
- package/dist/daemon/services/gateway.d.ts.map +1 -1
- package/dist/daemon/services/gateway.js +640 -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 +155 -30
- 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-streams.d.ts +29 -0
- package/dist/daemon/services/session-streams.d.ts.map +1 -0
- package/dist/daemon/services/session-streams.js +84 -0
- package/dist/daemon/services/session-token-service.d.ts.map +1 -1
- package/dist/daemon/services/session-token-service.js +11 -4
- 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 +137 -25
- 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 +108 -18
- package/dist/daemon/startup.d.ts +13 -2
- package/dist/daemon/startup.d.ts.map +1 -1
- package/dist/daemon/startup.js +377 -94
- 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 +36 -7
- 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/emit-service-event.d.ts +56 -0
- package/dist/daemon/utils/emit-service-event.d.ts.map +1 -0
- package/dist/daemon/utils/emit-service-event.js +23 -0
- 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-header-secrets.d.ts +3 -5
- package/dist/daemon/utils/mcp-header-secrets.d.ts.map +1 -1
- package/dist/daemon/utils/mcp-header-secrets.js +31 -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-access-cache.d.ts +9 -0
- package/dist/daemon/utils/realtime-access-cache.d.ts.map +1 -1
- package/dist/daemon/utils/realtime-access-cache.js +24 -0
- package/dist/daemon/utils/realtime-publish.d.ts +26 -0
- package/dist/daemon/utils/realtime-publish.d.ts.map +1 -1
- package/dist/daemon/utils/realtime-publish.js +171 -12
- package/dist/daemon/utils/session-queue-tenant-scope.d.ts +24 -0
- package/dist/daemon/utils/session-queue-tenant-scope.d.ts.map +1 -0
- package/dist/daemon/utils/session-queue-tenant-scope.js +133 -0
- 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/gateway-token/index.d.ts +114 -0
- package/dist/daemon/widgets/gateway-token/index.d.ts.map +1 -0
- package/dist/daemon/widgets/gateway-token/index.js +14711 -0
- package/dist/daemon/widgets/index.d.ts.map +1 -1
- package/dist/daemon/widgets/index.js +327 -37
- package/dist/daemon/widgets/registry.d.ts +7 -0
- package/dist/daemon/widgets/registry.d.ts.map +1 -1
- package/dist/daemon/widgets/submissions.js +12 -9
- package/dist/executor/commands/environment.d.ts.map +1 -1
- package/dist/executor/commands/environment.js +9 -5
- package/dist/executor/commands/git.d.ts.map +1 -1
- package/dist/executor/commands/git.js +3 -1
- package/dist/executor/db/feathers-repositories.d.ts +19 -1
- package/dist/executor/db/feathers-repositories.d.ts.map +1 -1
- package/dist/executor/db/feathers-repositories.js +31 -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/claude.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/claude.js +1 -1
- package/dist/executor/handlers/sdk/codex.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/codex.js +1 -1
- package/dist/executor/handlers/sdk/copilot.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/copilot.js +1 -1
- package/dist/executor/handlers/sdk/cursor.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/cursor.js +1 -0
- package/dist/executor/handlers/sdk/gemini.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/gemini.js +1 -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/handlers/sdk/opencode.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/opencode.js +1 -1
- package/dist/executor/payload-types.d.ts +5 -5
- package/dist/executor/sdk-handlers/base/diff-enrichment.js +1 -1
- package/dist/executor/sdk-handlers/base/mcp-scoping.d.ts +8 -1
- package/dist/executor/sdk-handlers/base/mcp-scoping.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/base/mcp-scoping.js +58 -6
- package/dist/executor/sdk-handlers/claude/claude-tool.d.ts +2 -2
- package/dist/executor/sdk-handlers/claude/claude-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/claude-tool.js +2 -2
- package/dist/executor/sdk-handlers/claude/prompt-service.d.ts +13 -3
- package/dist/executor/sdk-handlers/claude/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/prompt-service.js +16 -3
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts +2 -1
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/query-builder.js +2 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts +8 -12
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.js +14 -17
- 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 +3 -2
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.js +131 -12
- package/dist/executor/sdk-handlers/codex/usage.d.ts +14 -23
- package/dist/executor/sdk-handlers/codex/usage.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/usage.js +18 -33
- package/dist/executor/sdk-handlers/copilot/copilot-tool.d.ts +2 -2
- package/dist/executor/sdk-handlers/copilot/copilot-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/copilot/copilot-tool.js +2 -2
- package/dist/executor/sdk-handlers/copilot/prompt-service.d.ts +3 -2
- package/dist/executor/sdk-handlers/copilot/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/copilot/prompt-service.js +4 -1
- package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts +2 -2
- package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/gemini-tool.js +2 -2
- package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts +3 -2
- package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/prompt-service.js +4 -1
- package/dist/executor/sdk-handlers/opencode/opencode-tool.d.ts +3 -2
- package/dist/executor/sdk-handlers/opencode/opencode-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/opencode/opencode-tool.js +4 -1
- package/dist/executor/services/feathers-client.d.ts.map +1 -1
- package/dist/executor/services/feathers-client.js +124 -25
- 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-leeNywMc.js +1 -0
- package/dist/ui/assets/App-Dpl4Cc0U.js +4 -0
- package/dist/ui/assets/App-Dpl4Cc0U.js.gz +0 -0
- package/dist/ui/assets/AppNode-wN3UZlFK.js +1 -0
- package/dist/ui/assets/AppNode-wN3UZlFK.js.gz +0 -0
- package/dist/ui/assets/ArtifactConsentModal-DjzXcP_L.js +1 -0
- package/dist/ui/assets/ArtifactConsentModal-DjzXcP_L.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-B3b_EZ0F.js +9 -0
- package/dist/ui/assets/ArtifactFullscreenPage-B3b_EZ0F.js.gz +0 -0
- package/dist/ui/assets/ArtifactNode-DISy2T-6.js +9 -0
- package/dist/ui/assets/ArtifactNode-DISy2T-6.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-DUpsoEGr.js +19 -0
- package/dist/ui/assets/AutocompleteTextarea-DUpsoEGr.js.gz +0 -0
- package/dist/ui/assets/BoardObjectNodes-BakeGpIX.js +34 -0
- package/dist/ui/assets/BoardObjectNodes-BakeGpIX.js.gz +0 -0
- package/dist/ui/assets/CodeEditor.inner-HmSdTLW5.js +7 -0
- package/dist/ui/assets/CodeEditor.inner-HmSdTLW5.js.gz +0 -0
- package/dist/ui/assets/ConversationView-mWaA-B1f.js +1 -0
- package/dist/ui/assets/ConversationView-mWaA-B1f.js.gz +0 -0
- package/dist/ui/assets/EmbeddedTerminal-NNoyPA81.js +2 -0
- package/dist/ui/assets/EmbeddedTerminal-NNoyPA81.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-CkxVnRvz.js +24 -0
- package/dist/ui/assets/KnowledgePage-CkxVnRvz.js.gz +0 -0
- package/dist/ui/assets/{MarketingScreenshotPage-zv5RUCuV.js → MarketingScreenshotPage-B86Gs8jx.js} +2 -2
- package/dist/ui/assets/MarketingScreenshotPage-B86Gs8jx.js.gz +0 -0
- package/dist/ui/assets/MobileApp-BPs-SXvz.js +1 -0
- package/dist/ui/assets/MobileApp-BPs-SXvz.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/SessionCanvas-xVfDoEtz.js +13 -0
- package/dist/ui/assets/SessionCanvas-xVfDoEtz.js.gz +0 -0
- package/dist/ui/assets/{StreamdownDemoPage-wzWaqWwr.js → StreamdownDemoPage-CvWLzVsv.js} +2 -2
- package/dist/ui/assets/StreamdownDemoPage-CvWLzVsv.js.gz +0 -0
- package/dist/ui/assets/TerminalModal-ExOgsuOP.js +2 -0
- package/dist/ui/assets/TerminalModal-ExOgsuOP.js.gz +0 -0
- package/dist/ui/assets/ThemeSwitcher-Cgyp5ruu.js +1 -0
- package/dist/ui/assets/ThemeSwitcher-Cgyp5ruu.js.gz +0 -0
- package/dist/ui/assets/ThemedSyntaxHighlighter.inner-rpCN9S6K.js +1 -0
- package/dist/ui/assets/{antd-CfbbHJOz.js → antd-BCqimh1J.js} +5 -5
- package/dist/ui/assets/{antd-CfbbHJOz.js.gz → antd-BCqimh1J.js.gz} +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-BxSQIjrE.js +1 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-pDpGHSqT.js +36 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-pDpGHSqT.js.gz +0 -0
- package/dist/ui/assets/{blockDiagram-VD42YOAC-BhZaEN19.js → blockDiagram-VD42YOAC-uP8JTJpK.js} +4 -4
- package/dist/ui/assets/blockDiagram-VD42YOAC-uP8JTJpK.js.gz +0 -0
- package/dist/ui/assets/{c4Diagram-YG6GDRKO-Dk_UH-sY.js → c4Diagram-YG6GDRKO-qQe72Mm7.js} +2 -2
- package/dist/ui/assets/c4Diagram-YG6GDRKO-qQe72Mm7.js.gz +0 -0
- package/dist/ui/assets/channel-CoUBs6Zn.js +1 -0
- package/dist/ui/assets/{chunk-4BX2VUAB-XprbG2TG.js → chunk-4BX2VUAB-sz-YE8Nt.js} +1 -1
- package/dist/ui/assets/chunk-4ZMWKKQ3-3oKtfWXp.js +3 -0
- package/dist/ui/assets/chunk-4ZMWKKQ3-3oKtfWXp.js.gz +0 -0
- package/dist/ui/assets/chunk-55IACEB6-BS04dgKF.js +1 -0
- package/dist/ui/assets/{chunk-ABZYJK2D-BJcrryHK.js → chunk-ABZYJK2D-t3Gkphds.js} +3 -3
- package/dist/ui/assets/chunk-ABZYJK2D-t3Gkphds.js.gz +0 -0
- package/dist/ui/assets/{chunk-AGHRB4JF-DvxmfbM0.js → chunk-AGHRB4JF-D_QmWxbY.js} +1 -1
- package/dist/ui/assets/chunk-AGHRB4JF-D_QmWxbY.js.gz +0 -0
- package/dist/ui/assets/{chunk-ATLVNIR6-DbeJ0OrR.js → chunk-ATLVNIR6-Bmg7-Ufz.js} +1 -1
- package/dist/ui/assets/chunk-ATLVNIR6-Bmg7-Ufz.js.gz +0 -0
- package/dist/ui/assets/{chunk-B4BG7PRW-C53q2ggf.js → chunk-B4BG7PRW-dnSEE1u-.js} +3 -3
- package/dist/ui/assets/chunk-B4BG7PRW-dnSEE1u-.js.gz +0 -0
- package/dist/ui/assets/{chunk-CVBHYZKI-B3EBSlb3.js → chunk-CVBHYZKI-BStaYnF0.js} +1 -1
- package/dist/ui/assets/{chunk-DI55MBZ5-vIyNEQN-.js → chunk-DI55MBZ5-28dvx6o3.js} +1 -1
- package/dist/ui/assets/chunk-DI55MBZ5-28dvx6o3.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-X-FURkEh.js +1 -0
- package/dist/ui/assets/{chunk-FMBD7UC4-rddmfK-Z.js → chunk-FMBD7UC4-C_63gC9S.js} +1 -1
- package/dist/ui/assets/{chunk-HN2XXSSU-Dttqcg3b.js → chunk-HN2XXSSU-UFD374KI.js} +1 -1
- package/dist/ui/assets/chunk-HN2XXSSU-UFD374KI.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-B60hLNeR.js +11 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-B60hLNeR.js.gz +0 -0
- package/dist/ui/assets/{chunk-JZLCHNYA-EUmx2y4H.js → chunk-JZLCHNYA-ButC6pwN.js} +5 -5
- package/dist/ui/assets/chunk-JZLCHNYA-ButC6pwN.js.gz +0 -0
- package/dist/ui/assets/{chunk-MI3HLSF2-65n9Mkyc.js → chunk-MI3HLSF2-BivYzoSV.js} +1 -1
- package/dist/ui/assets/chunk-MI3HLSF2-BivYzoSV.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-mVWzo5wJ.js +2 -0
- package/dist/ui/assets/chunk-N4CR4FBY-mVWzo5wJ.js.gz +0 -0
- package/dist/ui/assets/{chunk-QN33PNHL-DsRKK6NR.js → chunk-QN33PNHL-tXtHZpaG.js} +1 -1
- package/dist/ui/assets/{chunk-QXUST7PY-BCYnMiS3.js → chunk-QXUST7PY-DATib_Vv.js} +2 -2
- package/dist/ui/assets/chunk-QXUST7PY-DATib_Vv.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-y6l249e5.js +1 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-BEtfmflI.js +2 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-BEtfmflI.js.gz +0 -0
- package/dist/ui/assets/{chunk-TZMSLE5B-BuQUQcTr.js → chunk-TZMSLE5B-BY1ZtogK.js} +1 -1
- package/dist/ui/assets/chunk-TZMSLE5B-BY1ZtogK.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-BYvq-uPY.js +1 -0
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-BYvq-uPY.js +1 -0
- package/dist/ui/assets/constants-CYzQKfD1.js +1 -0
- package/dist/ui/assets/{cose-bilkent-S5V4N54A-CnPB3ARO.js → cose-bilkent-S5V4N54A-DPvYrqGG.js} +1 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-DPvYrqGG.js.gz +0 -0
- package/dist/ui/assets/{dagre-6UL2VRFP-DhS-k_Se.js → dagre-6UL2VRFP-D800J6qb.js} +1 -1
- package/dist/ui/assets/dagre-6UL2VRFP-D800J6qb.js.gz +0 -0
- package/dist/ui/assets/{dagre-KgLoHEuy.js → dagre-TNc4wezg.js} +1 -1
- package/dist/ui/assets/dagre-TNc4wezg.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-CGdP9F-X.js +24 -0
- package/dist/ui/assets/diagram-PSM6KHXK-CGdP9F-X.js.gz +0 -0
- package/dist/ui/assets/{diagram-QEK2KX5R-BPCitvbo.js → diagram-QEK2KX5R-BD5lOCe5.js} +1 -1
- package/dist/ui/assets/diagram-QEK2KX5R-BD5lOCe5.js.gz +0 -0
- package/dist/ui/assets/{diagram-S2PKOQOG-NW4uK6sx.js → diagram-S2PKOQOG-cp3l22vN.js} +1 -1
- package/dist/ui/assets/diagram-S2PKOQOG-cp3l22vN.js.gz +0 -0
- package/dist/ui/assets/editor-Cr0W5BQI.js +39 -0
- package/dist/ui/assets/editor-Cr0W5BQI.js.gz +0 -0
- package/dist/ui/assets/emoji-Bv3m24sO.js +3 -0
- package/dist/ui/assets/emoji-Bv3m24sO.js.gz +0 -0
- package/dist/ui/assets/{erDiagram-Q2GNP2WA-me1fboaf.js → erDiagram-Q2GNP2WA-CQSXRgqr.js} +2 -2
- package/dist/ui/assets/erDiagram-Q2GNP2WA-CQSXRgqr.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-CKcKpkph.js +162 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-CKcKpkph.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-DlAHzXO5.js +267 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-DlAHzXO5.js.gz +0 -0
- package/dist/ui/assets/{gitGraph-F6HP7TQM-CfFE_uAC.js → gitGraph-F6HP7TQM-DeuXy4B1.js} +1 -1
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-aB-AI4Vq.js +65 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-aB-AI4Vq.js.gz +0 -0
- package/dist/ui/assets/index-B-qHc0o5.js +63 -0
- package/dist/ui/assets/index-B-qHc0o5.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-B9PG7xsc.js} +1 -1
- package/dist/ui/assets/{infoDiagram-ER5ION4S-2NL93b78.js → infoDiagram-ER5ION4S-C5Wpoqim.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-XKPGCS4Q-CZF-2DHU.js → journeyDiagram-XKPGCS4Q-CHLziqfS.js} +3 -3
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CHLziqfS.js.gz +0 -0
- package/dist/ui/assets/{kanban-definition-3W4ZIXB7-CfvJIOny.js → kanban-definition-3W4ZIXB7-Dq7GzQE_.js} +1 -1
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-Dq7GzQE_.js.gz +0 -0
- package/dist/ui/assets/{line-DDv8kOJk.js → line-DHKNg83I.js} +1 -1
- package/dist/ui/assets/{linear-Daef-l29.js → linear-BvUfn0I8.js} +1 -1
- package/dist/ui/assets/linear-BvUfn0I8.js.gz +0 -0
- package/dist/ui/assets/{mermaid-parser.core-CdK9QgYV.js → mermaid-parser.core-C6d9tKoo.js} +2 -2
- package/dist/ui/assets/mermaid-parser.core-C6d9tKoo.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-CxE5KezR.js +11 -0
- package/dist/ui/assets/mermaid.core-CxE5KezR.js.gz +0 -0
- package/dist/ui/assets/{mindmap-definition-VGOIOE7T-Cb3QMflX.js → mindmap-definition-VGOIOE7T-DmPoQ48w.js} +1 -1
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-DmPoQ48w.js.gz +0 -0
- package/dist/ui/assets/{packet-BFZMPI3H-Bm2uwz4i.js → packet-BFZMPI3H-JZEkVZxU.js} +1 -1
- package/dist/ui/assets/{particles-DsJFOarW.js → particles-CxMmUw86.js} +1 -1
- package/dist/ui/assets/particles-CxMmUw86.js.gz +0 -0
- package/dist/ui/assets/{pie-7BOR55EZ-5i17tVnF.js → pie-7BOR55EZ-_1II5pYQ.js} +1 -1
- package/dist/ui/assets/{pieDiagram-ADFJNKIX-BxIwQWvw.js → pieDiagram-ADFJNKIX-DrNkH33i.js} +1 -1
- package/dist/ui/assets/pieDiagram-ADFJNKIX-DrNkH33i.js.gz +0 -0
- package/dist/ui/assets/{quadrantDiagram-AYHSOK5B-B5HPe4ga.js → quadrantDiagram-AYHSOK5B-DOpC-HEF.js} +3 -3
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-DOpC-HEF.js.gz +0 -0
- package/dist/ui/assets/{radar-NHE76QYJ-BTn-tq0k.js → radar-NHE76QYJ-DDmqhzEZ.js} +1 -1
- package/dist/ui/assets/reactflow-D98uPOMq.js +2 -0
- package/dist/ui/assets/reactflow-D98uPOMq.js.gz +0 -0
- package/dist/ui/assets/{requirementDiagram-UZGBJVZJ-YfI6llkX.js → requirementDiagram-UZGBJVZJ-Bzx0iEPP.js} +1 -1
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-Bzx0iEPP.js.gz +0 -0
- package/dist/ui/assets/{sandpack-D7koO5op.js → sandpack-059Z4UWP.js} +38 -38
- package/dist/ui/assets/sandpack-059Z4UWP.js.gz +0 -0
- package/dist/ui/assets/sandpackDefaults-CPMNDsw7.js +1 -0
- package/dist/ui/assets/sandpackDefaults-CPMNDsw7.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-Do9pvfDv.js +10 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-Do9pvfDv.js.gz +0 -0
- package/dist/ui/assets/{sequenceDiagram-WL72ISMW-DAe4Um17.js → sequenceDiagram-WL72ISMW-CN8neUTA.js} +6 -6
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-CN8neUTA.js.gz +0 -0
- package/dist/ui/assets/src-DEbsv3pp.js +34 -0
- package/dist/ui/assets/src-DEbsv3pp.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BluWJi8n.js +1 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BluWJi8n.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-DeyqBMDR.js +1 -0
- package/dist/ui/assets/streamdown-BT1twtFc.js +521 -0
- package/dist/ui/assets/streamdown-BT1twtFc.js.gz +0 -0
- package/dist/ui/assets/syntax-CBu6nLfm.js +9 -0
- package/dist/ui/assets/syntax-CBu6nLfm.js.gz +0 -0
- package/dist/ui/assets/{timeline-definition-IT6M3QCI-D6P5txjT.js → timeline-definition-IT6M3QCI-WdUNkiRj.js} +16 -16
- package/dist/ui/assets/timeline-definition-IT6M3QCI-WdUNkiRj.js.gz +0 -0
- package/dist/ui/assets/{treemap-KMMF4GRG-Bitm3gy4.js → treemap-KMMF4GRG-CoriU4Jl.js} +1 -1
- package/dist/ui/assets/{useUserLocalStorage-Ckb8HsIw.js → useUserLocalStorage-GidNiOPC.js} +1 -1
- package/dist/ui/assets/useUserLocalStorage-GidNiOPC.js.gz +0 -0
- package/dist/ui/assets/{xychartDiagram-PRI3JC2R-CsybjUbd.js → xychartDiagram-PRI3JC2R-CgBAKNt2.js} +1 -1
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-CgBAKNt2.js.gz +0 -0
- package/dist/ui/index.html +11 -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
|
@@ -64,6 +64,12 @@ var init_executor_read_impersonation = __esm({
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
+
// src/mcp/tools/mcp-servers.ts
|
|
68
|
+
import {
|
|
69
|
+
isReservedMCPCustomHeaderName,
|
|
70
|
+
isValidMCPHeaderName
|
|
71
|
+
} from "@agor/core/tools/mcp/http-headers";
|
|
72
|
+
|
|
67
73
|
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
68
74
|
var external_exports = {};
|
|
69
75
|
__export(external_exports, {
|
|
@@ -14578,6 +14584,16 @@ function date4(params) {
|
|
|
14578
14584
|
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
14579
14585
|
config(en_default());
|
|
14580
14586
|
|
|
14587
|
+
// src/mcp/resolve-ids.ts
|
|
14588
|
+
async function resolveSessionId(ctx, id) {
|
|
14589
|
+
const entity = await ctx.app.service("sessions").get(id, ctx.baseServiceParams);
|
|
14590
|
+
return entity.session_id;
|
|
14591
|
+
}
|
|
14592
|
+
async function resolveMcpServerId(ctx, id) {
|
|
14593
|
+
const entity = await ctx.app.service("mcp-servers").get(id, ctx.baseServiceParams);
|
|
14594
|
+
return entity.mcp_server_id;
|
|
14595
|
+
}
|
|
14596
|
+
|
|
14581
14597
|
// src/mcp/schema.ts
|
|
14582
14598
|
function suffixExample(example) {
|
|
14583
14599
|
return example ? ` Example: ${example}` : "";
|
|
@@ -14592,6 +14608,11 @@ function mcpOptionalString(fieldName, description) {
|
|
|
14592
14608
|
error: `${fieldName} must be a string when provided.`
|
|
14593
14609
|
}).optional().describe(description);
|
|
14594
14610
|
}
|
|
14611
|
+
function mcpOptionalNonEmptyString(fieldName, description) {
|
|
14612
|
+
return external_exports.string({
|
|
14613
|
+
error: `${fieldName} must be a string when provided.`
|
|
14614
|
+
}).min(1, `${fieldName} cannot be empty when provided.`).optional().describe(description);
|
|
14615
|
+
}
|
|
14595
14616
|
function mcpOptionalNonBlankString(fieldName, description) {
|
|
14596
14617
|
return external_exports.string({
|
|
14597
14618
|
error: `${fieldName} must be a string when provided.`
|
|
@@ -14612,6 +14633,14 @@ function mcpRequiredPositiveInt(fieldName, description) {
|
|
|
14612
14633
|
error: `${fieldName} is required and must be a positive integer.`
|
|
14613
14634
|
}).int(`${fieldName} must be an integer.`).positive(`${fieldName} must be greater than 0.`).describe(description);
|
|
14614
14635
|
}
|
|
14636
|
+
function mcpOptionalPositiveInt(fieldName, description) {
|
|
14637
|
+
return external_exports.number({
|
|
14638
|
+
error: `${fieldName} must be a positive integer when provided.`
|
|
14639
|
+
}).int(`${fieldName} must be an integer.`).positive(`${fieldName} must be greater than 0.`).optional().describe(description);
|
|
14640
|
+
}
|
|
14641
|
+
function mcpLimit(defaultValue = 50) {
|
|
14642
|
+
return mcpOptionalPositiveInt("limit", `Maximum number of results (default: ${defaultValue})`);
|
|
14643
|
+
}
|
|
14615
14644
|
|
|
14616
14645
|
// src/mcp/server.ts
|
|
14617
14646
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
@@ -14624,7 +14653,11 @@ import { ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
|
14624
14653
|
|
|
14625
14654
|
// src/mcp/tokens.ts
|
|
14626
14655
|
import { MCP_TOKEN } from "@agor/core/config";
|
|
14627
|
-
import {
|
|
14656
|
+
import {
|
|
14657
|
+
generateId,
|
|
14658
|
+
SessionRepository,
|
|
14659
|
+
shortId
|
|
14660
|
+
} from "@agor/core/db";
|
|
14628
14661
|
import {
|
|
14629
14662
|
MCP_TOKEN_AUDIENCE,
|
|
14630
14663
|
MCP_TOKEN_ISSUER
|
|
@@ -14645,6 +14678,7 @@ var DOMAIN_DESCRIPTIONS = {
|
|
|
14645
14678
|
users: "User accounts, profiles, preferences, and administration",
|
|
14646
14679
|
analytics: "Usage and cost tracking leaderboard",
|
|
14647
14680
|
"mcp-servers": "External MCP server configuration and OAuth management",
|
|
14681
|
+
gateway: "Gateway channels for Slack, GitHub, Teams, and other message integrations",
|
|
14648
14682
|
proxies: "Configured HTTP proxies for third-party APIs (Shortcut, Linear, Jira, etc.)",
|
|
14649
14683
|
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",
|
|
14650
14684
|
knowledge: "DB-backed markdown knowledge documents, version history, search, and graph links",
|
|
@@ -14712,7 +14746,7 @@ var AgorRuntimeSchema = external_exports.object({
|
|
|
14712
14746
|
|
|
14713
14747
|
// src/mcp/tools/branches.ts
|
|
14714
14748
|
import { existsSync } from "fs";
|
|
14715
|
-
import { isBranchRbacEnabled } from "@agor/core/config";
|
|
14749
|
+
import { isBranchRbacEnabled, loadConfig } from "@agor/core/config";
|
|
14716
14750
|
import { BranchRepository as BranchRepository2, shortId as shortId3 } from "@agor/core/db";
|
|
14717
14751
|
import { BRANCH_PERMISSION_LEVELS as BRANCH_PERMISSION_LEVELS2, getAssistantConfig, isAssistant } from "@agor/core/types";
|
|
14718
14752
|
import { computeZoneRelativePosition } from "@agor/core/utils/board-placement";
|
|
@@ -14721,12 +14755,211 @@ import { normalizeOptionalHttpUrl } from "@agor/core/utils/url";
|
|
|
14721
14755
|
// src/mcp/tools/cards.ts
|
|
14722
14756
|
import { BoardObjectRepository } from "@agor/core/db";
|
|
14723
14757
|
|
|
14758
|
+
// src/mcp/tools/gateway-channels.ts
|
|
14759
|
+
import {
|
|
14760
|
+
BranchRepository as BranchRepository3,
|
|
14761
|
+
GatewayChannelRepository,
|
|
14762
|
+
SessionRepository as SessionRepository2,
|
|
14763
|
+
ThreadSessionMapRepository
|
|
14764
|
+
} from "@agor/core/db";
|
|
14765
|
+
import {
|
|
14766
|
+
buildSlackManifest,
|
|
14767
|
+
getConnector,
|
|
14768
|
+
requiredBotEvents,
|
|
14769
|
+
requiredBotScopes
|
|
14770
|
+
} from "@agor/core/gateway";
|
|
14771
|
+
import {
|
|
14772
|
+
GATEWAY_REDACTED_SENTINEL,
|
|
14773
|
+
GATEWAY_SENSITIVE_CONFIG_FIELDS,
|
|
14774
|
+
getRequiredSecretFields,
|
|
14775
|
+
hasMinimumRole as hasMinimumRole2,
|
|
14776
|
+
ROLES as ROLES2
|
|
14777
|
+
} from "@agor/core/types";
|
|
14778
|
+
var configSchema = external_exports.record(external_exports.string(), external_exports.unknown()).describe(
|
|
14779
|
+
"Platform-specific gateway configuration. Secrets are stored encrypted and returned redacted. Prefer env/template references for shared credentials where the connector supports them."
|
|
14780
|
+
);
|
|
14781
|
+
var outboundTargetSchema = external_exports.string().trim().regex(
|
|
14782
|
+
/^(channel:[^:\s]+|channel_name:[^\s]+|#[^\s]+|(?:email:|user_email:)?[^@\s]+@[^@\s]+\.[^@\s]+)$/
|
|
14783
|
+
).describe(
|
|
14784
|
+
"Slack outbound target for v0: channel:C123, #project-updates, channel_name:project-updates, or user@example.com. Thread targets are intentionally not supported."
|
|
14785
|
+
);
|
|
14786
|
+
var envVarSchema = external_exports.strictObject({
|
|
14787
|
+
key: mcpRequiredString("agenticConfig.envVars[].key", "Environment variable name"),
|
|
14788
|
+
value: mcpRequiredString(
|
|
14789
|
+
"agenticConfig.envVars[].value",
|
|
14790
|
+
`Environment variable value. Prefer references/templates over raw secrets. Existing redacted values may be passed as '${GATEWAY_REDACTED_SENTINEL}' on update to preserve them.`
|
|
14791
|
+
),
|
|
14792
|
+
forceOverride: external_exports.boolean().optional().describe("When true, channel value wins over user env vars. Defaults to false.")
|
|
14793
|
+
});
|
|
14794
|
+
var agenticConfigSchema = external_exports.strictObject({
|
|
14795
|
+
agent: external_exports.enum(["claude-code", "claude-code-cli", "codex", "gemini", "opencode", "copilot", "cursor"]).describe("Agent used for sessions created from this gateway channel."),
|
|
14796
|
+
permissionMode: external_exports.enum([
|
|
14797
|
+
"default",
|
|
14798
|
+
"acceptEdits",
|
|
14799
|
+
"bypassPermissions",
|
|
14800
|
+
"plan",
|
|
14801
|
+
"dontAsk",
|
|
14802
|
+
"autoEdit",
|
|
14803
|
+
"yolo",
|
|
14804
|
+
"ask",
|
|
14805
|
+
"auto",
|
|
14806
|
+
"on-failure",
|
|
14807
|
+
"allow-all"
|
|
14808
|
+
]).optional().describe("Permission mode for spawned sessions."),
|
|
14809
|
+
modelConfig: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("Agent model configuration."),
|
|
14810
|
+
mcpServerIds: external_exports.array(external_exports.string().min(1)).optional().describe("MCP server IDs to attach to gateway-created sessions."),
|
|
14811
|
+
codexSandboxMode: external_exports.enum(["read-only", "workspace-write", "danger-full-access"]).optional().describe("Codex sandbox mode for Codex gateway sessions."),
|
|
14812
|
+
codexApprovalPolicy: external_exports.enum(["untrusted", "on-failure", "on-request", "never"]).optional().describe("Codex approval policy for Codex gateway sessions."),
|
|
14813
|
+
codexNetworkAccess: external_exports.boolean().optional().describe("Allow Codex network access."),
|
|
14814
|
+
envVars: external_exports.array(envVarSchema).optional().describe("Gateway-level env vars. Values are redacted in responses.")
|
|
14815
|
+
}).describe("Agent/session defaults for conversations created through this gateway channel.");
|
|
14816
|
+
var gatewayChannelCreateSchema = external_exports.strictObject({
|
|
14817
|
+
name: mcpRequiredString("name", 'Human-readable channel name, e.g. "Engineering Slack".'),
|
|
14818
|
+
channelType: external_exports.enum(["slack", "github", "teams", "discord", "whatsapp", "telegram"]).default("slack").describe("Gateway platform type. Current active connectors are slack, github, and teams."),
|
|
14819
|
+
targetBranchId: mcpRequiredId(
|
|
14820
|
+
"targetBranchId",
|
|
14821
|
+
"Branch",
|
|
14822
|
+
"Branch/worktree ID that this gateway channel prompts."
|
|
14823
|
+
),
|
|
14824
|
+
agorUserId: mcpOptionalId(
|
|
14825
|
+
"agorUserId",
|
|
14826
|
+
"User",
|
|
14827
|
+
"Agor user ID whose identity is used when platform-user alignment is disabled."
|
|
14828
|
+
),
|
|
14829
|
+
enabled: external_exports.boolean().optional().describe("Whether the channel is active. Defaults to true."),
|
|
14830
|
+
config: configSchema,
|
|
14831
|
+
agenticConfig: agenticConfigSchema.optional()
|
|
14832
|
+
}).superRefine((value, issue2) => {
|
|
14833
|
+
const config2 = value.config ?? {};
|
|
14834
|
+
if (value.enabled !== false) {
|
|
14835
|
+
const requiredSecretMessages = {
|
|
14836
|
+
bot_token: "config.bot_token is required for Slack. Prefer a bot token stored outside the transcript when possible.",
|
|
14837
|
+
app_token: "config.app_token is required for Slack Socket Mode.",
|
|
14838
|
+
private_key: "config.private_key is required for GitHub gateway channels.",
|
|
14839
|
+
app_password: "config.app_password is required for Teams gateway channels."
|
|
14840
|
+
};
|
|
14841
|
+
for (const field of getRequiredSecretFields(value.channelType, config2)) {
|
|
14842
|
+
if (!config2[field]) {
|
|
14843
|
+
issue2.addIssue({
|
|
14844
|
+
code: "custom",
|
|
14845
|
+
path: ["config", field],
|
|
14846
|
+
message: requiredSecretMessages[field] ?? `config.${field} is required for ${value.channelType} gateway channels.`
|
|
14847
|
+
});
|
|
14848
|
+
}
|
|
14849
|
+
}
|
|
14850
|
+
}
|
|
14851
|
+
if (value.channelType === "github") {
|
|
14852
|
+
for (const field of ["app_id", "installation_id", "watch_repos"]) {
|
|
14853
|
+
if (!config2[field]) {
|
|
14854
|
+
issue2.addIssue({
|
|
14855
|
+
code: "custom",
|
|
14856
|
+
path: ["config", field],
|
|
14857
|
+
message: `config.${field} is required for GitHub gateway channels.`
|
|
14858
|
+
});
|
|
14859
|
+
}
|
|
14860
|
+
}
|
|
14861
|
+
}
|
|
14862
|
+
if (value.channelType === "teams" && !config2.app_id) {
|
|
14863
|
+
issue2.addIssue({
|
|
14864
|
+
code: "custom",
|
|
14865
|
+
path: ["config", "app_id"],
|
|
14866
|
+
message: "config.app_id is required for Teams gateway channels."
|
|
14867
|
+
});
|
|
14868
|
+
}
|
|
14869
|
+
if (value.channelType === "slack" && config2.align_slack_users !== true && !value.agorUserId) {
|
|
14870
|
+
issue2.addIssue({
|
|
14871
|
+
code: "custom",
|
|
14872
|
+
path: ["agorUserId"],
|
|
14873
|
+
message: "Run-as-selected-user needs agorUserId \u2014 set config.align_slack_users:true to align by email, or pass agorUserId."
|
|
14874
|
+
});
|
|
14875
|
+
}
|
|
14876
|
+
});
|
|
14877
|
+
var slackThreadHistorySchema = external_exports.strictObject({
|
|
14878
|
+
sessionId: mcpOptionalId(
|
|
14879
|
+
"sessionId",
|
|
14880
|
+
"Session",
|
|
14881
|
+
"Preferred: resolve the Slack thread mapping from an accessible Agor session ID (UUIDv7 or short ID). If provided, gatewayChannelId/threadId are ignored."
|
|
14882
|
+
),
|
|
14883
|
+
gatewayChannelId: mcpOptionalId(
|
|
14884
|
+
"gatewayChannelId",
|
|
14885
|
+
"Gateway channel",
|
|
14886
|
+
"Explicit Slack gateway channel ID (UUIDv7 or short ID). Required when sessionId is omitted."
|
|
14887
|
+
),
|
|
14888
|
+
threadId: mcpOptionalNonEmptyString(
|
|
14889
|
+
"threadId",
|
|
14890
|
+
"Explicit Slack thread ID in Agor gateway format, e.g. C123-171234.000100. Required when sessionId is omitted."
|
|
14891
|
+
),
|
|
14892
|
+
oldestTs: mcpOptionalNonEmptyString(
|
|
14893
|
+
"oldestTs",
|
|
14894
|
+
"Optional Slack oldest timestamp bound, e.g. 171234.000100."
|
|
14895
|
+
),
|
|
14896
|
+
latestTs: mcpOptionalNonEmptyString(
|
|
14897
|
+
"latestTs",
|
|
14898
|
+
"Optional Slack latest timestamp bound, e.g. 171235.000200."
|
|
14899
|
+
),
|
|
14900
|
+
inclusive: external_exports.boolean().optional().describe("Whether Slack should include messages exactly at oldest/latest bounds."),
|
|
14901
|
+
limit: mcpLimit(50).describe("Maximum Slack messages to request (default: 50, max: 200)."),
|
|
14902
|
+
includeBotMessages: external_exports.boolean().optional().describe("Include Slack bot messages in the returned history. Defaults to false."),
|
|
14903
|
+
format: external_exports.enum(["messages", "markdown"]).optional().describe(
|
|
14904
|
+
'Response body format. "messages" returns normalized JSON; "markdown" returns a transcript string.'
|
|
14905
|
+
)
|
|
14906
|
+
}).superRefine((value, issue2) => {
|
|
14907
|
+
if (value.sessionId) return;
|
|
14908
|
+
if (!value.gatewayChannelId) {
|
|
14909
|
+
issue2.addIssue({
|
|
14910
|
+
code: "custom",
|
|
14911
|
+
path: ["gatewayChannelId"],
|
|
14912
|
+
message: "gatewayChannelId is required when sessionId is omitted."
|
|
14913
|
+
});
|
|
14914
|
+
}
|
|
14915
|
+
if (!value.threadId) {
|
|
14916
|
+
issue2.addIssue({
|
|
14917
|
+
code: "custom",
|
|
14918
|
+
path: ["threadId"],
|
|
14919
|
+
message: "threadId is required when sessionId is omitted."
|
|
14920
|
+
});
|
|
14921
|
+
}
|
|
14922
|
+
});
|
|
14923
|
+
var gatewayChannelUpdateSchema = external_exports.strictObject({
|
|
14924
|
+
gatewayChannelId: mcpRequiredId(
|
|
14925
|
+
"gatewayChannelId",
|
|
14926
|
+
"Gateway channel",
|
|
14927
|
+
"Gateway channel ID (UUIDv7 or short ID)"
|
|
14928
|
+
),
|
|
14929
|
+
name: mcpOptionalNonEmptyString("name", "New human-readable channel name."),
|
|
14930
|
+
channelType: external_exports.enum(["slack", "github", "teams", "discord", "whatsapp", "telegram"]).optional().describe("Gateway platform type. Changing this should include compatible config."),
|
|
14931
|
+
targetBranchId: mcpOptionalId("targetBranchId", "Branch", "New target branch/worktree ID."),
|
|
14932
|
+
agorUserId: mcpOptionalId("agorUserId", "User", "New run-as Agor user ID."),
|
|
14933
|
+
enabled: external_exports.boolean().optional().describe("Enable/disable the channel."),
|
|
14934
|
+
config: configSchema.optional().describe(
|
|
14935
|
+
`Partial platform config to merge. Send '${GATEWAY_REDACTED_SENTINEL}' or omit sensitive fields to preserve existing secrets; send a new value to rotate.`
|
|
14936
|
+
),
|
|
14937
|
+
agenticConfig: agenticConfigSchema.nullable().optional().describe("Replace agent/session defaults. null clears the gateway agentic config.")
|
|
14938
|
+
});
|
|
14939
|
+
var slackManifestGenerateSchema = external_exports.strictObject({
|
|
14940
|
+
appName: mcpRequiredString("appName", 'Slack app display name, e.g. "Agor".'),
|
|
14941
|
+
botDisplayName: mcpOptionalNonEmptyString(
|
|
14942
|
+
"botDisplayName",
|
|
14943
|
+
"Bot user display name. Defaults to appName."
|
|
14944
|
+
),
|
|
14945
|
+
publicChannels: external_exports.boolean().default(false).describe("Listen in public channels (#channel) via @mention."),
|
|
14946
|
+
privateChannels: external_exports.boolean().default(false).describe("Listen in private channels (groups) via @mention."),
|
|
14947
|
+
groupDms: external_exports.boolean().default(false).describe("Listen in group DMs (multi-person IMs) via @mention."),
|
|
14948
|
+
alignUsers: external_exports.boolean().default(true).describe(
|
|
14949
|
+
"Resolve Slack user email \u2192 Agor user (adds the users:read.email scope). Defaults to true: each Slack user runs as their matched Agor account and unmatched users are rejected, so no fixed run-as user is needed. Set false to run every message as one fixed Agor user (then pass agorUserId to agor_gateway_channels_create)."
|
|
14950
|
+
),
|
|
14951
|
+
outbound: external_exports.boolean().default(false).describe("Proactive outbound: post to channels by name and DM users by email."),
|
|
14952
|
+
restrictToChannelIds: external_exports.array(external_exports.string().min(1)).optional().describe(
|
|
14953
|
+
"Slack channel ID whitelist. Maps to config.allowed_channel_ids when you call agor_gateway_channels_create; it does NOT change the manifest scopes or events."
|
|
14954
|
+
)
|
|
14955
|
+
});
|
|
14956
|
+
|
|
14724
14957
|
// src/mcp/tools/knowledge.ts
|
|
14725
14958
|
import { createHash, randomUUID } from "crypto";
|
|
14726
14959
|
import fs2 from "fs";
|
|
14727
14960
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
14728
14961
|
import path3 from "path";
|
|
14729
|
-
import { BranchRepository as
|
|
14962
|
+
import { BranchRepository as BranchRepository5, KnowledgeNamespaceRepository as KnowledgeNamespaceRepository2 } from "@agor/core/db";
|
|
14730
14963
|
import { NotFound as NotFound2 } from "@agor/core/feathers";
|
|
14731
14964
|
import {
|
|
14732
14965
|
buildKnowledgeDocumentUri,
|
|
@@ -14752,14 +14985,14 @@ import { unified } from "unified";
|
|
|
14752
14985
|
|
|
14753
14986
|
// src/services/assistant-knowledge.ts
|
|
14754
14987
|
import {
|
|
14755
|
-
BranchRepository as
|
|
14988
|
+
BranchRepository as BranchRepository4,
|
|
14756
14989
|
KnowledgeNamespaceRepository,
|
|
14757
14990
|
shortId as shortId4
|
|
14758
14991
|
} from "@agor/core/db";
|
|
14759
14992
|
import { getAssistantConfig as getAssistantConfig2, isAssistant as isAssistant2 } from "@agor/core/types";
|
|
14760
14993
|
|
|
14761
14994
|
// src/services/knowledge-access.ts
|
|
14762
|
-
import { hasMinimumRole as
|
|
14995
|
+
import { hasMinimumRole as hasMinimumRole3, ROLES as ROLES3 } from "@agor/core/types";
|
|
14763
14996
|
|
|
14764
14997
|
// src/utils/branch-workspace-path.ts
|
|
14765
14998
|
import fs from "fs";
|
|
@@ -14908,16 +15141,18 @@ import {
|
|
|
14908
15141
|
asc,
|
|
14909
15142
|
desc,
|
|
14910
15143
|
eq,
|
|
14911
|
-
|
|
15144
|
+
gte,
|
|
15145
|
+
lte,
|
|
14912
15146
|
messages as messagesTable,
|
|
14913
15147
|
or,
|
|
14914
|
-
SessionRepository as SessionRepository2,
|
|
14915
15148
|
select,
|
|
14916
|
-
sql
|
|
15149
|
+
sql,
|
|
15150
|
+
visibleSessionReferenceAccessExists
|
|
14917
15151
|
} from "@agor/core/db";
|
|
15152
|
+
var MAX_CROSS_SESSION_SEARCH_WINDOW_MS = 31 * 24 * 60 * 60 * 1e3;
|
|
14918
15153
|
|
|
14919
15154
|
// src/mcp/tools/proxies.ts
|
|
14920
|
-
import { getBaseUrl, loadConfig, resolveProxies } from "@agor/core/config";
|
|
15155
|
+
import { getBaseUrl, loadConfig as loadConfig2, resolveProxies } from "@agor/core/config";
|
|
14921
15156
|
|
|
14922
15157
|
// src/mcp/tools/repos.ts
|
|
14923
15158
|
import { extractSlugFromUrl, isValidGitUrl, isValidSlug } from "@agor/core/config";
|
|
@@ -14929,7 +15164,7 @@ var agenticToolConfigSchema = external_exports.object({
|
|
|
14929
15164
|
model_config: external_exports.object({
|
|
14930
15165
|
mode: external_exports.enum(["alias", "exact"]).optional(),
|
|
14931
15166
|
model: mcpOptionalString("model_config.model", "Model name override."),
|
|
14932
|
-
effort: external_exports.enum(["low", "medium", "high", "max"]).optional(),
|
|
15167
|
+
effort: external_exports.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
|
|
14933
15168
|
advisorModel: mcpOptionalString(
|
|
14934
15169
|
"model_config.advisorModel",
|
|
14935
15170
|
"Claude Code advisor model override (e.g. 'opus', 'sonnet', 'fable')."
|
|
@@ -14945,7 +15180,7 @@ var agenticToolConfigSchema = external_exports.object({
|
|
|
14945
15180
|
|
|
14946
15181
|
// src/mcp/tools/sessions.ts
|
|
14947
15182
|
import {
|
|
14948
|
-
BranchRepository as
|
|
15183
|
+
BranchRepository as BranchRepository6,
|
|
14949
15184
|
SessionRelationshipRepository,
|
|
14950
15185
|
shortId as shortId5
|
|
14951
15186
|
} from "@agor/core/db";
|
|
@@ -14968,6 +15203,7 @@ import {
|
|
|
14968
15203
|
} from "@agor/core/types";
|
|
14969
15204
|
init_branch_inspect();
|
|
14970
15205
|
init_executor_read_impersonation();
|
|
15206
|
+
init_spawn_executor();
|
|
14971
15207
|
var modelConfigObjectSchema = external_exports.object({
|
|
14972
15208
|
mode: external_exports.enum(["alias", "exact"]).optional().describe("Model selection mode (default: 'alias')"),
|
|
14973
15209
|
// .min(1): reject empty-string model explicitly so callers don't silently
|
|
@@ -14976,7 +15212,7 @@ var modelConfigObjectSchema = external_exports.object({
|
|
|
14976
15212
|
"modelConfig.model",
|
|
14977
15213
|
"Model identifier (e.g. 'claude-opus-4-6', 'claude-sonnet-4-6')"
|
|
14978
15214
|
),
|
|
14979
|
-
effort: external_exports.enum(["low", "medium", "high", "max"]).optional().describe("Reasoning effort level (default: high)"),
|
|
15215
|
+
effort: external_exports.enum(["low", "medium", "high", "xhigh", "max"]).optional().describe("Reasoning effort level (default: high)"),
|
|
14980
15216
|
advisorModel: mcpOptionalString(
|
|
14981
15217
|
"modelConfig.advisorModel",
|
|
14982
15218
|
"Claude Code advisor model override (e.g. 'opus', 'sonnet', 'fable', or a full model ID)."
|
|
@@ -14997,10 +15233,10 @@ var modelConfigInputSchema = external_exports.union([
|
|
|
14997
15233
|
);
|
|
14998
15234
|
|
|
14999
15235
|
// src/mcp/tools/users.ts
|
|
15000
|
-
import { ROLES as
|
|
15236
|
+
import { ROLES as ROLES4 } from "@agor/core/types";
|
|
15001
15237
|
|
|
15002
15238
|
// src/mcp/tools/widgets.ts
|
|
15003
|
-
import { MessageRole as MessageRole2 } from "@agor/core/types";
|
|
15239
|
+
import { getRequiredSecretFields as getRequiredSecretFields2, hasMinimumRole as hasMinimumRole5, MessageRole as MessageRole2, ROLES as ROLES6 } from "@agor/core/types";
|
|
15004
15240
|
|
|
15005
15241
|
// src/utils/append-system-message.ts
|
|
15006
15242
|
import { generateId as generateId2, SessionRepository as SessionRepository3 } from "@agor/core/db";
|
|
@@ -15010,9 +15246,20 @@ import { MessageRole } from "@agor/core/types";
|
|
|
15010
15246
|
import { EXECUTING_TASK_STATUSES, isTaskExecuting } from "@agor/core/types";
|
|
15011
15247
|
|
|
15012
15248
|
// src/widgets/env-vars/index.ts
|
|
15013
|
-
import {
|
|
15249
|
+
import {
|
|
15250
|
+
ENV_VAR_CONSTRAINTS,
|
|
15251
|
+
isEnvVarAllowed,
|
|
15252
|
+
validateEnvVar
|
|
15253
|
+
} from "@agor/core/config";
|
|
15254
|
+
import { SessionEnvSelectionRepository } from "@agor/core/db";
|
|
15014
15255
|
import { BadRequest } from "@agor/core/feathers";
|
|
15015
15256
|
var ENV_VAR_NAME_REGEX = ENV_VAR_CONSTRAINTS.NAME_PATTERN;
|
|
15257
|
+
var envVarFieldMetadataSchema = external_exports.object({
|
|
15258
|
+
description: external_exports.string().max(200).optional(),
|
|
15259
|
+
placeholder: external_exports.string().max(120).optional(),
|
|
15260
|
+
format_hint: external_exports.string().max(80).optional(),
|
|
15261
|
+
input_type: external_exports.enum(["password", "text", "textarea"]).default("password").optional()
|
|
15262
|
+
}).strict();
|
|
15016
15263
|
var envVarsParamsSchema = external_exports.object({
|
|
15017
15264
|
names: external_exports.array(external_exports.string().regex(ENV_VAR_NAME_REGEX)).min(1).max(10).refine((names) => new Set(names).size === names.length, {
|
|
15018
15265
|
message: "Env var names must be unique"
|
|
@@ -15020,20 +15267,82 @@ var envVarsParamsSchema = external_exports.object({
|
|
|
15020
15267
|
reason: external_exports.string().min(1).max(200).describe(
|
|
15021
15268
|
"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."
|
|
15022
15269
|
),
|
|
15270
|
+
variable_metadata: external_exports.record(external_exports.string().regex(ENV_VAR_NAME_REGEX), envVarFieldMetadataSchema).optional().describe(
|
|
15271
|
+
"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."
|
|
15272
|
+
),
|
|
15023
15273
|
auto_resume: external_exports.boolean().default(true).describe(
|
|
15024
15274
|
"When true (default), a system-authored prompt is auto-queued back into the agent on submit/dismiss."
|
|
15025
15275
|
)
|
|
15276
|
+
}).superRefine((params, ctx) => {
|
|
15277
|
+
const requested = new Set(params.names);
|
|
15278
|
+
for (const key of Object.keys(params.variable_metadata ?? {})) {
|
|
15279
|
+
if (!requested.has(key)) {
|
|
15280
|
+
ctx.addIssue({
|
|
15281
|
+
code: external_exports.ZodIssueCode.custom,
|
|
15282
|
+
path: ["variable_metadata", key],
|
|
15283
|
+
message: `Metadata key ${key} must match a requested env var name`
|
|
15284
|
+
});
|
|
15285
|
+
}
|
|
15286
|
+
}
|
|
15026
15287
|
});
|
|
15027
15288
|
var envVarsSubmitSchema = external_exports.object({
|
|
15028
15289
|
values: external_exports.record(
|
|
15029
15290
|
external_exports.string().regex(ENV_VAR_NAME_REGEX),
|
|
15030
15291
|
external_exports.string().min(1).max(ENV_VAR_CONSTRAINTS.MAX_VALUE_LENGTH)
|
|
15031
|
-
).
|
|
15032
|
-
|
|
15033
|
-
}),
|
|
15292
|
+
).default({}),
|
|
15293
|
+
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."),
|
|
15034
15294
|
scope: external_exports.enum(["global", "session"])
|
|
15295
|
+
}).superRefine((submit, ctx) => {
|
|
15296
|
+
const valueNames = Object.keys(submit.values);
|
|
15297
|
+
const existingNames = submit.use_existing;
|
|
15298
|
+
const total = valueNames.length + existingNames.length;
|
|
15299
|
+
if (total < 1 || total > 10) {
|
|
15300
|
+
ctx.addIssue({
|
|
15301
|
+
code: external_exports.ZodIssueCode.custom,
|
|
15302
|
+
message: "Must submit between 1 and 10 env vars"
|
|
15303
|
+
});
|
|
15304
|
+
}
|
|
15305
|
+
const duplicates = existingNames.filter((name) => valueNames.includes(name));
|
|
15306
|
+
for (const name of duplicates) {
|
|
15307
|
+
ctx.addIssue({
|
|
15308
|
+
code: external_exports.ZodIssueCode.custom,
|
|
15309
|
+
path: ["use_existing"],
|
|
15310
|
+
message: `Cannot both submit and use existing value for ${name}`
|
|
15311
|
+
});
|
|
15312
|
+
}
|
|
15313
|
+
if (new Set(existingNames).size !== existingNames.length) {
|
|
15314
|
+
ctx.addIssue({
|
|
15315
|
+
code: external_exports.ZodIssueCode.custom,
|
|
15316
|
+
path: ["use_existing"],
|
|
15317
|
+
message: "use_existing names must be unique"
|
|
15318
|
+
});
|
|
15319
|
+
}
|
|
15035
15320
|
});
|
|
15036
15321
|
|
|
15322
|
+
// src/widgets/gateway-token/index.ts
|
|
15323
|
+
import { Forbidden as Forbidden2 } from "@agor/core/feathers";
|
|
15324
|
+
import {
|
|
15325
|
+
GATEWAY_SENSITIVE_CONFIG_FIELDS as GATEWAY_SENSITIVE_CONFIG_FIELDS2,
|
|
15326
|
+
hasMinimumRole as hasMinimumRole4,
|
|
15327
|
+
ROLES as ROLES5
|
|
15328
|
+
} from "@agor/core/types";
|
|
15329
|
+
var MAX_TOKEN_LENGTH = 8192;
|
|
15330
|
+
var gatewayTokenParamsSchema = external_exports.object({
|
|
15331
|
+
gatewayChannelId: external_exports.string().min(1).describe("Gateway channel whose credentials are being set."),
|
|
15332
|
+
channelType: external_exports.enum(["slack", "discord", "whatsapp", "telegram", "github", "teams"]).describe("Platform type of the channel; drives per-field placeholders."),
|
|
15333
|
+
channelName: external_exports.string().min(1).max(200).describe("Human-readable channel name for the form heading and prompts."),
|
|
15334
|
+
fields: external_exports.array(external_exports.enum(GATEWAY_SENSITIVE_CONFIG_FIELDS2)).min(1).max(GATEWAY_SENSITIVE_CONFIG_FIELDS2.length).refine((fields) => new Set(fields).size === fields.length, {
|
|
15335
|
+
message: "Token field names must be unique"
|
|
15336
|
+
}).describe("Secret config field names to collect (subset of the sensitive fields)."),
|
|
15337
|
+
reason: external_exports.string().min(1).max(200).describe("One sentence explaining why the tokens are needed. Renders as a muted line.")
|
|
15338
|
+
}).strict();
|
|
15339
|
+
var gatewayTokenSubmitSchema = external_exports.object({
|
|
15340
|
+
tokens: external_exports.partialRecord(
|
|
15341
|
+
external_exports.enum(GATEWAY_SENSITIVE_CONFIG_FIELDS2),
|
|
15342
|
+
external_exports.string().min(1).max(MAX_TOKEN_LENGTH)
|
|
15343
|
+
).describe("Map of sensitive field name \u2192 credential value.")
|
|
15344
|
+
}).strict();
|
|
15345
|
+
|
|
15037
15346
|
// src/mcp/server.ts
|
|
15038
15347
|
var DEBUG_MCP_REQUESTS = process.env.AGOR_DEBUG_MCP_REQUESTS === "1" || process.env.DEBUG?.includes("mcp-requests");
|
|
15039
15348
|
function textResult(data) {
|
|
@@ -15126,6 +15435,329 @@ async function listAttachedMcpServers(ctx, sessionId, opts = {}) {
|
|
|
15126
15435
|
}
|
|
15127
15436
|
return summaries;
|
|
15128
15437
|
}
|
|
15438
|
+
var mcpNameSchema = external_exports.string({
|
|
15439
|
+
error: 'name is required and must be a string. Example: { "name": "context7" }'
|
|
15440
|
+
}).regex(
|
|
15441
|
+
/^[a-z][a-z0-9_-]{0,63}$/,
|
|
15442
|
+
'name must start with a lowercase letter and contain only lowercase letters, digits, "_" or "-" (max 64 chars).'
|
|
15443
|
+
).describe('Stable internal ID, e.g. "context7", "github", "datadog". Cannot be changed later.');
|
|
15444
|
+
var stringMapSchema = external_exports.record(external_exports.string(), external_exports.string()).describe(
|
|
15445
|
+
"JSON object of string keys/values. Values may use templates like {{ user.env.API_TOKEN }}."
|
|
15446
|
+
);
|
|
15447
|
+
var mcpAuthInputSchema = external_exports.strictObject({
|
|
15448
|
+
type: external_exports.enum(["none", "bearer", "jwt", "oauth"]).describe(
|
|
15449
|
+
"Authentication mode. OAuth tip: start with { type: 'oauth' } plus the MCP server URL; only add endpoint/client fields if discovery/DCR fails."
|
|
15450
|
+
),
|
|
15451
|
+
token: mcpOptionalString(
|
|
15452
|
+
"auth.token",
|
|
15453
|
+
"Bearer token. Prefer {{ user.env.MCP_TOKEN }} templates; raw secrets will be stored redacted but are still visible in this MCP call transcript."
|
|
15454
|
+
),
|
|
15455
|
+
api_url: mcpOptionalString("auth.api_url", "JWT auth API URL."),
|
|
15456
|
+
api_token: mcpOptionalString(
|
|
15457
|
+
"auth.api_token",
|
|
15458
|
+
"JWT API token. Prefer {{ user.env.JWT_TOKEN }} templates."
|
|
15459
|
+
),
|
|
15460
|
+
api_secret: mcpOptionalString(
|
|
15461
|
+
"auth.api_secret",
|
|
15462
|
+
"JWT API secret. Prefer {{ user.env.JWT_SECRET }} templates."
|
|
15463
|
+
),
|
|
15464
|
+
oauth_authorization_url: mcpOptionalString(
|
|
15465
|
+
"auth.oauth_authorization_url",
|
|
15466
|
+
"Optional OAuth authorization endpoint override. Leave blank for discovery."
|
|
15467
|
+
),
|
|
15468
|
+
oauth_token_url: mcpOptionalString(
|
|
15469
|
+
"auth.oauth_token_url",
|
|
15470
|
+
"Optional OAuth token endpoint override. Leave blank for discovery."
|
|
15471
|
+
),
|
|
15472
|
+
oauth_client_id: mcpOptionalString(
|
|
15473
|
+
"auth.oauth_client_id",
|
|
15474
|
+
"Optional OAuth client ID for providers that require a pre-registered app. Leave blank for Dynamic Client Registration where supported."
|
|
15475
|
+
),
|
|
15476
|
+
oauth_client_secret: mcpOptionalString(
|
|
15477
|
+
"auth.oauth_client_secret",
|
|
15478
|
+
"Optional OAuth client secret. Prefer {{ user.env.OAUTH_CLIENT_SECRET }} templates; raw secrets are not returned by this tool."
|
|
15479
|
+
),
|
|
15480
|
+
oauth_scope: mcpOptionalString("auth.oauth_scope", "Optional OAuth scopes, space-separated."),
|
|
15481
|
+
oauth_grant_type: external_exports.enum(["client_credentials", "authorization_code"]).optional().describe(
|
|
15482
|
+
"OAuth grant type hint. Defaults to 'client_credentials' for legacy token testing; browser OAuth uses authorization code with PKCE."
|
|
15483
|
+
),
|
|
15484
|
+
oauth_mode: external_exports.enum(["per_user", "shared"]).optional().describe("OAuth token ownership. Defaults to 'per_user' (recommended)."),
|
|
15485
|
+
insecure: external_exports.boolean().optional().describe("Allow insecure auth behavior if supported.")
|
|
15486
|
+
}).superRefine((auth, issue2) => {
|
|
15487
|
+
if (auth.type === "bearer" && !auth.token) {
|
|
15488
|
+
issue2.addIssue({
|
|
15489
|
+
code: "custom",
|
|
15490
|
+
path: ["token"],
|
|
15491
|
+
message: "auth.token is required when auth.type is 'bearer'."
|
|
15492
|
+
});
|
|
15493
|
+
}
|
|
15494
|
+
const fieldsByType = {
|
|
15495
|
+
none: [],
|
|
15496
|
+
bearer: ["token"],
|
|
15497
|
+
jwt: ["api_url", "api_token", "api_secret"],
|
|
15498
|
+
oauth: [
|
|
15499
|
+
"oauth_authorization_url",
|
|
15500
|
+
"oauth_token_url",
|
|
15501
|
+
"oauth_client_id",
|
|
15502
|
+
"oauth_client_secret",
|
|
15503
|
+
"oauth_scope",
|
|
15504
|
+
"oauth_grant_type",
|
|
15505
|
+
"oauth_mode",
|
|
15506
|
+
"insecure"
|
|
15507
|
+
]
|
|
15508
|
+
};
|
|
15509
|
+
const allowed = /* @__PURE__ */ new Set(["type", ...fieldsByType[auth.type]]);
|
|
15510
|
+
for (const key of Object.keys(auth)) {
|
|
15511
|
+
if (!allowed.has(key)) {
|
|
15512
|
+
issue2.addIssue({
|
|
15513
|
+
code: "custom",
|
|
15514
|
+
path: [key],
|
|
15515
|
+
message: `auth.${key} does not apply when auth.type is '${auth.type}'.`
|
|
15516
|
+
});
|
|
15517
|
+
}
|
|
15518
|
+
}
|
|
15519
|
+
if (auth.type === "jwt") {
|
|
15520
|
+
for (const field of ["api_url", "api_token", "api_secret"]) {
|
|
15521
|
+
if (!auth[field]) {
|
|
15522
|
+
issue2.addIssue({
|
|
15523
|
+
code: "custom",
|
|
15524
|
+
path: [field],
|
|
15525
|
+
message: `auth.${field} is required when auth.type is 'jwt'.`
|
|
15526
|
+
});
|
|
15527
|
+
}
|
|
15528
|
+
}
|
|
15529
|
+
}
|
|
15530
|
+
}).describe(
|
|
15531
|
+
"Auth config. Common OAuth path: { type: 'oauth' } plus url; leave OAuth URLs/client fields blank first so metadata discovery/DCR can do the work."
|
|
15532
|
+
);
|
|
15533
|
+
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' }.");
|
|
15534
|
+
var mcpServerCreateSchema = external_exports.strictObject({
|
|
15535
|
+
name: mcpNameSchema,
|
|
15536
|
+
displayName: mcpOptionalNonEmptyString(
|
|
15537
|
+
"displayName",
|
|
15538
|
+
'Human-friendly display name, e.g. "Context7 MCP".'
|
|
15539
|
+
),
|
|
15540
|
+
description: mcpOptionalString("description", "Optional description."),
|
|
15541
|
+
transport: external_exports.enum(["stdio", "http", "sse"]).optional().describe(
|
|
15542
|
+
"Transport. Defaults to 'http' when url is provided, otherwise 'stdio'. Most remote OAuth MCP servers use 'http'."
|
|
15543
|
+
),
|
|
15544
|
+
url: mcpOptionalString(
|
|
15545
|
+
"url",
|
|
15546
|
+
"Remote MCP server URL for http/sse transports. Supports templates like {{ user.env.MCP_URL }}."
|
|
15547
|
+
),
|
|
15548
|
+
command: mcpOptionalString("command", 'Local command for stdio transport, e.g. "npx".'),
|
|
15549
|
+
args: external_exports.array(external_exports.string()).optional().describe(
|
|
15550
|
+
'Arguments for stdio command, e.g. ["-y", "@modelcontextprotocol/server-filesystem"].'
|
|
15551
|
+
),
|
|
15552
|
+
headers: stringMapSchema.optional().describe(
|
|
15553
|
+
"Custom HTTP headers for http/sse transports. Do not include Authorization; use auth instead. Prefer templates for secret values."
|
|
15554
|
+
),
|
|
15555
|
+
env: stringMapSchema.optional().describe(
|
|
15556
|
+
"Environment variables for the MCP process/config. Prefer {{ user.env.VAR }} templates for secrets."
|
|
15557
|
+
),
|
|
15558
|
+
auth: mcpAuthInputSchema.optional(),
|
|
15559
|
+
scope: external_exports.enum(["global", "session"]).optional().describe(
|
|
15560
|
+
"Scope. Defaults to 'global' so it appears in agor_mcp_servers_list. 'session' is only for explicit session attachment workflows."
|
|
15561
|
+
),
|
|
15562
|
+
enabled: external_exports.boolean().optional().describe("Whether the server is enabled. Defaults to true."),
|
|
15563
|
+
attachToCurrentSession: external_exports.boolean().optional().describe(
|
|
15564
|
+
`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.`
|
|
15565
|
+
),
|
|
15566
|
+
attachToSessionId: mcpOptionalId(
|
|
15567
|
+
"attachToSessionId",
|
|
15568
|
+
"Session",
|
|
15569
|
+
"Optional session ID (UUIDv7 or short ID) to attach after creating. Overrides attachToCurrentSession."
|
|
15570
|
+
)
|
|
15571
|
+
}).superRefine((value, issue2) => validateMcpServerConfig(value, issue2, false));
|
|
15572
|
+
var mcpServerUpdateSchema = external_exports.strictObject({
|
|
15573
|
+
mcpServerId: mcpRequiredId(
|
|
15574
|
+
"mcpServerId",
|
|
15575
|
+
"MCP server",
|
|
15576
|
+
"MCP server ID to update (UUIDv7 or short ID)"
|
|
15577
|
+
),
|
|
15578
|
+
displayName: mcpOptionalNonEmptyString("displayName", "New human-friendly display name."),
|
|
15579
|
+
description: mcpOptionalString(
|
|
15580
|
+
"description",
|
|
15581
|
+
"New description. Pass an empty string to clear."
|
|
15582
|
+
),
|
|
15583
|
+
transport: external_exports.enum(["stdio", "http", "sse"]).optional().describe("Transport to set."),
|
|
15584
|
+
url: mcpOptionalString("url", "Remote MCP URL for http/sse transports."),
|
|
15585
|
+
command: mcpOptionalString("command", "Local command for stdio transport."),
|
|
15586
|
+
args: external_exports.array(external_exports.string()).optional().describe("Arguments for stdio command."),
|
|
15587
|
+
headers: stringMapSchema.optional().describe(
|
|
15588
|
+
"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."
|
|
15589
|
+
),
|
|
15590
|
+
env: stringMapSchema.optional().describe("Replace environment variables."),
|
|
15591
|
+
auth: mcpAuthInputSchema.optional().describe(
|
|
15592
|
+
"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."
|
|
15593
|
+
),
|
|
15594
|
+
scope: external_exports.enum(["global", "session"]).optional().describe("Scope to set."),
|
|
15595
|
+
enabled: external_exports.boolean().optional().describe("Enabled flag."),
|
|
15596
|
+
toolPermissions: toolPermissionsSchema.optional()
|
|
15597
|
+
}).superRefine((value, issue2) => validateMcpServerConfig(value, issue2, true));
|
|
15598
|
+
function validateHeaders(headers, issue2) {
|
|
15599
|
+
if (!headers) return;
|
|
15600
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
15601
|
+
const name = key.trim();
|
|
15602
|
+
if (!name) {
|
|
15603
|
+
issue2.addIssue({
|
|
15604
|
+
code: "custom",
|
|
15605
|
+
path: ["headers", key],
|
|
15606
|
+
message: "Header names cannot be empty."
|
|
15607
|
+
});
|
|
15608
|
+
} else if (!isValidMCPHeaderName(name)) {
|
|
15609
|
+
issue2.addIssue({
|
|
15610
|
+
code: "custom",
|
|
15611
|
+
path: ["headers", key],
|
|
15612
|
+
message: `Invalid HTTP header name: ${key}`
|
|
15613
|
+
});
|
|
15614
|
+
} else if (isReservedMCPCustomHeaderName(name)) {
|
|
15615
|
+
issue2.addIssue({
|
|
15616
|
+
code: "custom",
|
|
15617
|
+
path: ["headers", key],
|
|
15618
|
+
message: `Header ${name} is reserved; configure Authorization through auth instead.`
|
|
15619
|
+
});
|
|
15620
|
+
}
|
|
15621
|
+
if (typeof value !== "string") {
|
|
15622
|
+
issue2.addIssue({
|
|
15623
|
+
code: "custom",
|
|
15624
|
+
path: ["headers", key],
|
|
15625
|
+
message: "Header values must be strings."
|
|
15626
|
+
});
|
|
15627
|
+
}
|
|
15628
|
+
}
|
|
15629
|
+
}
|
|
15630
|
+
function validateMcpServerConfig(value, issue2, partial2) {
|
|
15631
|
+
const transport = value.transport ?? (value.url ? "http" : "stdio");
|
|
15632
|
+
validateHeaders(value.headers, issue2);
|
|
15633
|
+
if (!partial2 || value.transport !== void 0 || value.url !== void 0 || value.command !== void 0) {
|
|
15634
|
+
if (transport === "stdio") {
|
|
15635
|
+
if (!partial2 && !value.command) {
|
|
15636
|
+
issue2.addIssue({
|
|
15637
|
+
code: "custom",
|
|
15638
|
+
path: ["command"],
|
|
15639
|
+
message: "command is required for stdio transport."
|
|
15640
|
+
});
|
|
15641
|
+
}
|
|
15642
|
+
if (value.url) {
|
|
15643
|
+
issue2.addIssue({
|
|
15644
|
+
code: "custom",
|
|
15645
|
+
path: ["url"],
|
|
15646
|
+
message: "url only applies to http/sse transports, not stdio."
|
|
15647
|
+
});
|
|
15648
|
+
}
|
|
15649
|
+
if (value.headers) {
|
|
15650
|
+
issue2.addIssue({
|
|
15651
|
+
code: "custom",
|
|
15652
|
+
path: ["headers"],
|
|
15653
|
+
message: "headers only apply to http/sse transports, not stdio."
|
|
15654
|
+
});
|
|
15655
|
+
}
|
|
15656
|
+
if (value.auth && value.auth.type !== "none") {
|
|
15657
|
+
issue2.addIssue({
|
|
15658
|
+
code: "custom",
|
|
15659
|
+
path: ["auth", "type"],
|
|
15660
|
+
message: "Authentication config only applies to http/sse transports."
|
|
15661
|
+
});
|
|
15662
|
+
}
|
|
15663
|
+
} else if (!partial2 && !value.url) {
|
|
15664
|
+
issue2.addIssue({
|
|
15665
|
+
code: "custom",
|
|
15666
|
+
path: ["url"],
|
|
15667
|
+
message: `url is required for ${transport} transport.`
|
|
15668
|
+
});
|
|
15669
|
+
} else {
|
|
15670
|
+
if (value.command) {
|
|
15671
|
+
issue2.addIssue({
|
|
15672
|
+
code: "custom",
|
|
15673
|
+
path: ["command"],
|
|
15674
|
+
message: "command only applies to stdio transport, not http/sse."
|
|
15675
|
+
});
|
|
15676
|
+
}
|
|
15677
|
+
if (value.args && value.args.length > 0) {
|
|
15678
|
+
issue2.addIssue({
|
|
15679
|
+
code: "custom",
|
|
15680
|
+
path: ["args"],
|
|
15681
|
+
message: "args only apply to stdio transport, not http/sse."
|
|
15682
|
+
});
|
|
15683
|
+
}
|
|
15684
|
+
}
|
|
15685
|
+
}
|
|
15686
|
+
}
|
|
15687
|
+
function assertUpdateCompatibleWithCurrent(current, args) {
|
|
15688
|
+
const transport = args.transport ?? current.transport;
|
|
15689
|
+
const url2 = args.url ?? current.url;
|
|
15690
|
+
const command = args.command ?? current.command;
|
|
15691
|
+
const errors = [];
|
|
15692
|
+
if (transport === "stdio") {
|
|
15693
|
+
if (!command) errors.push("command is required for stdio transport.");
|
|
15694
|
+
if (args.url) errors.push("url only applies to http/sse transports, not stdio.");
|
|
15695
|
+
if (args.headers && Object.keys(args.headers).length > 0) {
|
|
15696
|
+
errors.push("headers only apply to http/sse transports, not stdio.");
|
|
15697
|
+
}
|
|
15698
|
+
if (args.auth && args.auth.type !== "none") {
|
|
15699
|
+
errors.push("auth only applies to http/sse transports, not stdio.");
|
|
15700
|
+
}
|
|
15701
|
+
} else {
|
|
15702
|
+
if (!url2) errors.push(`url is required for ${transport} transport.`);
|
|
15703
|
+
if (args.command) errors.push("command only applies to stdio transport, not http/sse.");
|
|
15704
|
+
if (args.args && args.args.length > 0) {
|
|
15705
|
+
errors.push("args only apply to stdio transport, not http/sse.");
|
|
15706
|
+
}
|
|
15707
|
+
}
|
|
15708
|
+
if (errors.length > 0) {
|
|
15709
|
+
throw new Error(`Invalid MCP server update: ${errors.join(" ")}`);
|
|
15710
|
+
}
|
|
15711
|
+
}
|
|
15712
|
+
function createOrUpdateNextSteps(server, attach) {
|
|
15713
|
+
const authType = server.auth?.type || "none";
|
|
15714
|
+
const steps = [];
|
|
15715
|
+
if (authType === "oauth") {
|
|
15716
|
+
steps.push(
|
|
15717
|
+
`OAuth configured. If oauth_authenticated is false, authenticate in Settings > MCP Servers > ${server.display_name || server.name} > Test Authentication > Start OAuth Flow.`
|
|
15718
|
+
);
|
|
15719
|
+
}
|
|
15720
|
+
if (attach?.ok) {
|
|
15721
|
+
steps.push(
|
|
15722
|
+
`Attached to session ${attach.sessionId}. Restart or re-prompt the agent if its MCP client does not hot-reload tools.`
|
|
15723
|
+
);
|
|
15724
|
+
} else if (attach?.error) {
|
|
15725
|
+
steps.push(`Attach to session ${attach.sessionId} failed: ${attach.error}`);
|
|
15726
|
+
} else if (server.scope === "global") {
|
|
15727
|
+
steps.push(
|
|
15728
|
+
"This enabled global MCP server is in every session\u2019s effective MCP set. Restart or re-prompt an existing agent if its MCP client does not hot-reload tools."
|
|
15729
|
+
);
|
|
15730
|
+
} else {
|
|
15731
|
+
steps.push(
|
|
15732
|
+
"This session-scoped MCP server must be linked to a session with agor_sessions_add_mcp_server (or set on session creation) before that session can use it."
|
|
15733
|
+
);
|
|
15734
|
+
}
|
|
15735
|
+
return steps;
|
|
15736
|
+
}
|
|
15737
|
+
async function attachMcpServerToSession(ctx, sessionId, mcpServerId) {
|
|
15738
|
+
return ctx.app.service("/sessions/:id/mcp-servers").create(
|
|
15739
|
+
{ mcpServerId },
|
|
15740
|
+
{
|
|
15741
|
+
...ctx.baseServiceParams,
|
|
15742
|
+
route: { id: sessionId }
|
|
15743
|
+
}
|
|
15744
|
+
);
|
|
15745
|
+
}
|
|
15746
|
+
async function removeMcpServerFromSession(ctx, sessionId, mcpServerId) {
|
|
15747
|
+
return ctx.app.service("/sessions/:id/mcp-servers").remove(mcpServerId, {
|
|
15748
|
+
...ctx.baseServiceParams,
|
|
15749
|
+
route: { id: sessionId }
|
|
15750
|
+
});
|
|
15751
|
+
}
|
|
15752
|
+
async function resolveTargetSessionId(ctx, sessionId) {
|
|
15753
|
+
const targetSessionId = sessionId ? await resolveSessionId(ctx, sessionId) : ctx.sessionId;
|
|
15754
|
+
if (!targetSessionId) {
|
|
15755
|
+
return {
|
|
15756
|
+
error: "No current session context. Pass sessionId explicitly, or reconnect with X-Agor-Session-Id / a session-scoped MCP token."
|
|
15757
|
+
};
|
|
15758
|
+
}
|
|
15759
|
+
return { sessionId: targetSessionId };
|
|
15760
|
+
}
|
|
15129
15761
|
function registerMcpServerTools(server, ctx) {
|
|
15130
15762
|
server.registerTool(
|
|
15131
15763
|
"agor_mcp_servers_list",
|
|
@@ -15192,6 +15824,249 @@ function registerMcpServerTools(server, ctx) {
|
|
|
15192
15824
|
});
|
|
15193
15825
|
}
|
|
15194
15826
|
);
|
|
15827
|
+
server.registerTool(
|
|
15828
|
+
"agor_mcp_servers_create",
|
|
15829
|
+
{
|
|
15830
|
+
description: 'Register a new MCP server definition. Permissions are service-enforced: only admins can create MCP configs. Scope matters: enabled `global` servers are automatically in each session\'s effective MCP set; `session` scoped servers must be linked with `agor_sessions_add_mcp_server` (or `attachToCurrentSession` / `attachToSessionId`). Start simple for remote OAuth: `name` + `url` + `auth:{type:"oauth"}`; add endpoint/client fields only if discovery/DCR fails. For stdio use `transport:"stdio"` + `command` (+ `args`). Use `auth`, not Authorization headers. Prefer `{{ user.env.SECRET_NAME }}` templates; raw secrets are visible in the MCP transcript though never returned.',
|
|
15831
|
+
annotations: { destructiveHint: false, idempotentHint: false },
|
|
15832
|
+
inputSchema: mcpServerCreateSchema
|
|
15833
|
+
},
|
|
15834
|
+
async (args) => {
|
|
15835
|
+
const transport = args.transport ?? (args.url ? "http" : "stdio");
|
|
15836
|
+
const wantsAttach = args.attachToSessionId !== void 0 || args.attachToCurrentSession;
|
|
15837
|
+
const attachTargetResult = wantsAttach ? await resolveTargetSessionId(ctx, args.attachToSessionId) : void 0;
|
|
15838
|
+
if (attachTargetResult && "error" in attachTargetResult) {
|
|
15839
|
+
return { ...textResult({ error: attachTargetResult.error }), isError: true };
|
|
15840
|
+
}
|
|
15841
|
+
const attachTarget = attachTargetResult?.sessionId;
|
|
15842
|
+
const createData = {
|
|
15843
|
+
name: args.name,
|
|
15844
|
+
display_name: args.displayName,
|
|
15845
|
+
description: args.description,
|
|
15846
|
+
transport,
|
|
15847
|
+
command: transport === "stdio" ? args.command : void 0,
|
|
15848
|
+
args: transport === "stdio" ? args.args : void 0,
|
|
15849
|
+
url: transport === "stdio" ? void 0 : args.url,
|
|
15850
|
+
headers: transport === "stdio" ? void 0 : args.headers,
|
|
15851
|
+
env: args.env,
|
|
15852
|
+
auth: transport === "stdio" || !args.auth || args.auth.type === "none" ? void 0 : args.auth,
|
|
15853
|
+
scope: args.scope ?? "global",
|
|
15854
|
+
source: "user",
|
|
15855
|
+
enabled: args.enabled ?? true
|
|
15856
|
+
};
|
|
15857
|
+
const created = await ctx.app.service("mcp-servers").create(createData, ctx.baseServiceParams);
|
|
15858
|
+
let attachResult;
|
|
15859
|
+
if (attachTarget) {
|
|
15860
|
+
try {
|
|
15861
|
+
await attachMcpServerToSession(ctx, attachTarget, created.mcp_server_id);
|
|
15862
|
+
attachResult = { sessionId: attachTarget, ok: true };
|
|
15863
|
+
} catch (error51) {
|
|
15864
|
+
attachResult = {
|
|
15865
|
+
sessionId: attachTarget,
|
|
15866
|
+
ok: false,
|
|
15867
|
+
error: error51 instanceof Error ? error51.message : String(error51)
|
|
15868
|
+
};
|
|
15869
|
+
}
|
|
15870
|
+
}
|
|
15871
|
+
const summary = await summarizeMcpServer(ctx, created);
|
|
15872
|
+
return textResult({
|
|
15873
|
+
mcp_server: summary,
|
|
15874
|
+
attached: attachResult?.ok ? { session_id: attachResult.sessionId, mcp_server_id: created.mcp_server_id } : void 0,
|
|
15875
|
+
attach_error: attachResult && !attachResult.ok ? attachResult.error : void 0,
|
|
15876
|
+
next_steps: createOrUpdateNextSteps(created, attachResult)
|
|
15877
|
+
});
|
|
15878
|
+
}
|
|
15879
|
+
);
|
|
15880
|
+
server.registerTool(
|
|
15881
|
+
"agor_mcp_servers_update",
|
|
15882
|
+
{
|
|
15883
|
+
description: 'Update an existing MCP server definition. Permissions are service-enforced: only admins can update MCP configs. Updating config does not create a session-specific link: enabled `global` servers are already effective for all sessions, while `session` scoped servers need `agor_sessions_add_mcp_server`. Provide only fields to change. Validation rejects incompatible combinations (e.g. stdio+url/auth/headers, remote+command/args, wrong auth fields). OAuth tip: keep only `auth:{type:"oauth"}` unless discovery fails or a provider requires endpoint/client overrides. Use `auth:{type:"none"}` to clear auth.',
|
|
15884
|
+
annotations: { destructiveHint: false, idempotentHint: false },
|
|
15885
|
+
inputSchema: mcpServerUpdateSchema
|
|
15886
|
+
},
|
|
15887
|
+
async (args) => {
|
|
15888
|
+
const mcpServerId = await resolveMcpServerId(ctx, args.mcpServerId);
|
|
15889
|
+
const current = await ctx.app.service("mcp-servers").get(mcpServerId, ctx.baseServiceParams);
|
|
15890
|
+
assertUpdateCompatibleWithCurrent(current, args);
|
|
15891
|
+
const updates = {};
|
|
15892
|
+
if (args.displayName !== void 0) updates.display_name = args.displayName;
|
|
15893
|
+
if (args.description !== void 0) updates.description = args.description;
|
|
15894
|
+
if (args.transport !== void 0) updates.transport = args.transport;
|
|
15895
|
+
if (args.command !== void 0) updates.command = args.command;
|
|
15896
|
+
if (args.args !== void 0) updates.args = args.args;
|
|
15897
|
+
if (args.url !== void 0) updates.url = args.url;
|
|
15898
|
+
if (args.headers !== void 0) updates.headers = args.headers;
|
|
15899
|
+
if (args.env !== void 0) updates.env = args.env;
|
|
15900
|
+
if (args.auth !== void 0) {
|
|
15901
|
+
updates.auth = args.auth.type === "none" ? { type: "none" } : args.auth;
|
|
15902
|
+
}
|
|
15903
|
+
if (args.scope !== void 0) updates.scope = args.scope;
|
|
15904
|
+
if (args.enabled !== void 0) updates.enabled = args.enabled;
|
|
15905
|
+
if (args.toolPermissions !== void 0) updates.tool_permissions = args.toolPermissions;
|
|
15906
|
+
if (args.transport === "stdio") {
|
|
15907
|
+
updates.url = void 0;
|
|
15908
|
+
updates.headers = void 0;
|
|
15909
|
+
updates.auth = void 0;
|
|
15910
|
+
} else if (args.transport === "http" || args.transport === "sse") {
|
|
15911
|
+
updates.command = void 0;
|
|
15912
|
+
updates.args = void 0;
|
|
15913
|
+
}
|
|
15914
|
+
const updated = await ctx.app.service("mcp-servers").patch(mcpServerId, updates, ctx.baseServiceParams);
|
|
15915
|
+
return textResult({
|
|
15916
|
+
mcp_server: await summarizeMcpServer(ctx, updated),
|
|
15917
|
+
next_steps: createOrUpdateNextSteps(updated)
|
|
15918
|
+
});
|
|
15919
|
+
}
|
|
15920
|
+
);
|
|
15921
|
+
server.registerTool(
|
|
15922
|
+
"agor_sessions_add_mcp_server",
|
|
15923
|
+
{
|
|
15924
|
+
description: "Attach a registered MCP server to a session. Defaults to current session when `sessionId` is omitted. Permissions are service-enforced via the same session-scoped route as the UI: caller must be allowed to edit that session config. Verify with `agor_sessions_get_current`/`agor_sessions_get`; the agent may need a restart/re-prompt before its MCP client sees new tools.",
|
|
15925
|
+
annotations: { destructiveHint: false, idempotentHint: true },
|
|
15926
|
+
inputSchema: external_exports.strictObject({
|
|
15927
|
+
mcpServerId: mcpRequiredId(
|
|
15928
|
+
"mcpServerId",
|
|
15929
|
+
"MCP server",
|
|
15930
|
+
"MCP server ID to attach (UUIDv7 or short ID)"
|
|
15931
|
+
),
|
|
15932
|
+
sessionId: mcpOptionalId(
|
|
15933
|
+
"sessionId",
|
|
15934
|
+
"Session",
|
|
15935
|
+
"Target session ID (UUIDv7 or short ID). Omit to attach to the current session."
|
|
15936
|
+
)
|
|
15937
|
+
})
|
|
15938
|
+
},
|
|
15939
|
+
async (args) => {
|
|
15940
|
+
const target = await resolveTargetSessionId(ctx, args.sessionId);
|
|
15941
|
+
if ("error" in target) {
|
|
15942
|
+
return {
|
|
15943
|
+
...textResult({
|
|
15944
|
+
error: target.error
|
|
15945
|
+
}),
|
|
15946
|
+
isError: true
|
|
15947
|
+
};
|
|
15948
|
+
}
|
|
15949
|
+
const sessionId = target.sessionId;
|
|
15950
|
+
const mcpServerId = await resolveMcpServerId(ctx, args.mcpServerId);
|
|
15951
|
+
const relationship = await attachMcpServerToSession(ctx, sessionId, mcpServerId);
|
|
15952
|
+
const mcpServer = await ctx.app.service("mcp-servers").get(mcpServerId, ctx.baseServiceParams);
|
|
15953
|
+
return textResult({
|
|
15954
|
+
relationship,
|
|
15955
|
+
mcp_server: await summarizeMcpServer(ctx, mcpServer),
|
|
15956
|
+
next_steps: createOrUpdateNextSteps(mcpServer, { sessionId, ok: true })
|
|
15957
|
+
});
|
|
15958
|
+
}
|
|
15959
|
+
);
|
|
15960
|
+
server.registerTool(
|
|
15961
|
+
"agor_sessions_remove_mcp_server",
|
|
15962
|
+
{
|
|
15963
|
+
description: "Remove a session-specific MCP server link from a session. Defaults to current session when `sessionId` is omitted. Permissions are service-enforced by the same session-scoped route as the UI. This only removes the session link; it does not delete the registered MCP server. Note: enabled global MCP servers remain effective for all sessions and cannot be removed from just one session with this link-removal tool.",
|
|
15964
|
+
annotations: { destructiveHint: true, idempotentHint: true },
|
|
15965
|
+
inputSchema: external_exports.strictObject({
|
|
15966
|
+
mcpServerId: mcpRequiredId(
|
|
15967
|
+
"mcpServerId",
|
|
15968
|
+
"MCP server",
|
|
15969
|
+
"MCP server ID to remove from the session (UUIDv7 or short ID)"
|
|
15970
|
+
),
|
|
15971
|
+
sessionId: mcpOptionalId(
|
|
15972
|
+
"sessionId",
|
|
15973
|
+
"Session",
|
|
15974
|
+
"Target session ID (UUIDv7 or short ID). Omit to use the current session."
|
|
15975
|
+
)
|
|
15976
|
+
})
|
|
15977
|
+
},
|
|
15978
|
+
async (args) => {
|
|
15979
|
+
const target = await resolveTargetSessionId(ctx, args.sessionId);
|
|
15980
|
+
if ("error" in target) {
|
|
15981
|
+
return { ...textResult({ error: target.error }), isError: true };
|
|
15982
|
+
}
|
|
15983
|
+
const mcpServerId = await resolveMcpServerId(ctx, args.mcpServerId);
|
|
15984
|
+
const relationship = await removeMcpServerFromSession(ctx, target.sessionId, mcpServerId);
|
|
15985
|
+
return textResult({
|
|
15986
|
+
relationship,
|
|
15987
|
+
removed: { session_id: target.sessionId, mcp_server_id: mcpServerId },
|
|
15988
|
+
next_steps: [
|
|
15989
|
+
"Verify with agor_sessions_get_current/agor_sessions_get. Restart or re-prompt an existing agent if its MCP client does not hot-reload tool removals."
|
|
15990
|
+
]
|
|
15991
|
+
});
|
|
15992
|
+
}
|
|
15993
|
+
);
|
|
15994
|
+
server.registerTool(
|
|
15995
|
+
"agor_sessions_set_mcp_servers",
|
|
15996
|
+
{
|
|
15997
|
+
description: "Replace the session-specific MCP links for a session by diffing through the same add/remove route the UI uses. Defaults to current session when `sessionId` is omitted. Permissions are service-enforced per add/remove. This manages session links only; enabled global MCP servers are still effective for every session even if omitted here.",
|
|
15998
|
+
annotations: { destructiveHint: true, idempotentHint: true },
|
|
15999
|
+
inputSchema: external_exports.strictObject({
|
|
16000
|
+
mcpServerIds: external_exports.array(mcpRequiredId("mcpServerIds[]", "MCP server", "MCP server ID")).describe(
|
|
16001
|
+
"Exact desired set of session-specific MCP server IDs. Pass [] to remove all session-specific links."
|
|
16002
|
+
),
|
|
16003
|
+
sessionId: mcpOptionalId(
|
|
16004
|
+
"sessionId",
|
|
16005
|
+
"Session",
|
|
16006
|
+
"Target session ID (UUIDv7 or short ID). Omit to use the current session."
|
|
16007
|
+
)
|
|
16008
|
+
})
|
|
16009
|
+
},
|
|
16010
|
+
async (args) => {
|
|
16011
|
+
const target = await resolveTargetSessionId(ctx, args.sessionId);
|
|
16012
|
+
if ("error" in target) {
|
|
16013
|
+
return { ...textResult({ error: target.error }), isError: true };
|
|
16014
|
+
}
|
|
16015
|
+
const desired = [
|
|
16016
|
+
...new Set(await Promise.all(args.mcpServerIds.map((id) => resolveMcpServerId(ctx, id))))
|
|
16017
|
+
];
|
|
16018
|
+
const currentResult = await ctx.app.service("/sessions/:id/mcp-servers").find({
|
|
16019
|
+
...ctx.baseServiceParams,
|
|
16020
|
+
route: { id: target.sessionId }
|
|
16021
|
+
});
|
|
16022
|
+
const currentServers = Array.isArray(currentResult) ? currentResult : currentResult.data;
|
|
16023
|
+
const current = currentServers.map((s) => s.mcp_server_id);
|
|
16024
|
+
const currentSet = new Set(current);
|
|
16025
|
+
const desiredSet = new Set(desired);
|
|
16026
|
+
const toAdd = desired.filter((id) => !currentSet.has(id));
|
|
16027
|
+
const toRemove = current.filter((id) => !desiredSet.has(id));
|
|
16028
|
+
const failures = [];
|
|
16029
|
+
for (const mcpServerId of toRemove) {
|
|
16030
|
+
try {
|
|
16031
|
+
await removeMcpServerFromSession(ctx, target.sessionId, mcpServerId);
|
|
16032
|
+
} catch (error51) {
|
|
16033
|
+
failures.push({
|
|
16034
|
+
mcp_server_id: mcpServerId,
|
|
16035
|
+
action: "remove",
|
|
16036
|
+
reason: error51 instanceof Error ? error51.message : String(error51)
|
|
16037
|
+
});
|
|
16038
|
+
}
|
|
16039
|
+
}
|
|
16040
|
+
for (const mcpServerId of toAdd) {
|
|
16041
|
+
try {
|
|
16042
|
+
await attachMcpServerToSession(ctx, target.sessionId, mcpServerId);
|
|
16043
|
+
} catch (error51) {
|
|
16044
|
+
failures.push({
|
|
16045
|
+
mcp_server_id: mcpServerId,
|
|
16046
|
+
action: "add",
|
|
16047
|
+
reason: error51 instanceof Error ? error51.message : String(error51)
|
|
16048
|
+
});
|
|
16049
|
+
}
|
|
16050
|
+
}
|
|
16051
|
+
const payload = {
|
|
16052
|
+
session_id: target.sessionId,
|
|
16053
|
+
desired_mcp_server_ids: desired,
|
|
16054
|
+
added_mcp_server_ids: toAdd.filter(
|
|
16055
|
+
(id) => !failures.some((f) => f.action === "add" && f.mcp_server_id === id)
|
|
16056
|
+
),
|
|
16057
|
+
removed_mcp_server_ids: toRemove.filter(
|
|
16058
|
+
(id) => !failures.some((f) => f.action === "remove" && f.mcp_server_id === id)
|
|
16059
|
+
),
|
|
16060
|
+
unchanged_mcp_server_ids: desired.filter((id) => currentSet.has(id)),
|
|
16061
|
+
failures: failures.length > 0 ? failures : void 0,
|
|
16062
|
+
next_steps: [
|
|
16063
|
+
"Verify with agor_sessions_get_current/agor_sessions_get. Enabled global MCP servers remain effective even if not listed here.",
|
|
16064
|
+
"Restart or re-prompt an existing agent if its MCP client does not hot-reload MCP link changes."
|
|
16065
|
+
]
|
|
16066
|
+
};
|
|
16067
|
+
return failures.length > 0 ? { ...textResult(payload), isError: true } : textResult(payload);
|
|
16068
|
+
}
|
|
16069
|
+
);
|
|
15195
16070
|
}
|
|
15196
16071
|
export {
|
|
15197
16072
|
listAttachedMcpServers,
|