agor-live 0.22.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/admin/add-to-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/add-to-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/add-to-branch-group.js +133 -33
- package/dist/cli/commands/admin/create-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/create-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/create-branch-group.js +132 -38
- package/dist/cli/commands/admin/create-symlink.d.ts +2 -14
- package/dist/cli/commands/admin/create-symlink.d.ts.map +1 -1
- package/dist/cli/commands/admin/create-symlink.js +138 -61
- package/dist/cli/commands/admin/delete-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/delete-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/delete-branch-group.js +132 -28
- package/dist/cli/commands/admin/delete-user.d.ts +2 -13
- package/dist/cli/commands/admin/delete-user.d.ts.map +1 -1
- package/dist/cli/commands/admin/delete-user.js +132 -38
- package/dist/cli/commands/admin/ensure-user.d.ts +2 -14
- package/dist/cli/commands/admin/ensure-user.d.ts.map +1 -1
- package/dist/cli/commands/admin/ensure-user.js +131 -46
- package/dist/cli/commands/admin/remove-from-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/remove-from-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/remove-from-branch-group.js +133 -33
- package/dist/cli/commands/admin/remove-symlink.d.ts +2 -14
- package/dist/cli/commands/admin/remove-symlink.d.ts.map +1 -1
- package/dist/cli/commands/admin/remove-symlink.js +136 -49
- package/dist/cli/commands/admin/scrub-git-remotes.d.ts +2 -2
- package/dist/cli/commands/admin/scrub-git-remotes.d.ts.map +1 -1
- package/dist/cli/commands/admin/scrub-git-remotes.js +128 -86
- package/dist/cli/commands/admin/sync-user-symlinks.d.ts +2 -14
- package/dist/cli/commands/admin/sync-user-symlinks.d.ts.map +1 -1
- package/dist/cli/commands/admin/sync-user-symlinks.js +132 -43
- package/dist/cli/commands/auth/whoami.d.ts.map +1 -1
- package/dist/cli/commands/auth/whoami.js +2 -1
- package/dist/cli/commands/branch/env/request.test.d.ts +2 -0
- package/dist/cli/commands/branch/env/request.test.d.ts.map +1 -0
- package/dist/cli/commands/branch/env/request.test.js +17723 -0
- package/dist/cli/commands/branch/env/restart.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/restart.js +7 -1
- package/dist/cli/commands/branch/env/start.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/start.js +7 -1
- package/dist/cli/commands/branch/env/stop.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/stop.js +7 -1
- package/dist/cli/commands/daemon/status.d.ts.map +1 -1
- package/dist/cli/commands/daemon/status.js +2 -1
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +140 -2
- package/dist/cli/commands/local/add-to-branch-group.d.ts +13 -0
- package/dist/cli/commands/local/add-to-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/add-to-branch-group.js +37 -0
- package/dist/cli/commands/local/create-branch-group.d.ts +12 -0
- package/dist/cli/commands/local/create-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/create-branch-group.js +35 -0
- package/dist/cli/commands/local/create-symlink.d.ts +14 -0
- package/dist/cli/commands/local/create-symlink.d.ts.map +1 -0
- package/dist/cli/commands/local/create-symlink.js +45 -0
- package/dist/cli/commands/{daemon → local/daemon}/sync.d.ts +1 -1
- package/dist/cli/commands/local/daemon/sync.d.ts.map +1 -0
- package/dist/cli/commands/{daemon → local/daemon}/sync.js +7 -6
- package/dist/cli/commands/local/delete-branch-group.d.ts +12 -0
- package/dist/cli/commands/local/delete-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/delete-branch-group.js +35 -0
- package/dist/cli/commands/local/delete-user.d.ts +12 -0
- package/dist/cli/commands/local/delete-user.d.ts.map +1 -0
- package/dist/cli/commands/local/delete-user.js +36 -0
- package/dist/cli/commands/local/ensure-user.d.ts +12 -0
- package/dist/cli/commands/local/ensure-user.d.ts.map +1 -0
- package/dist/cli/commands/local/ensure-user.js +41 -0
- package/dist/cli/commands/local/remove-from-branch-group.d.ts +13 -0
- package/dist/cli/commands/local/remove-from-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/remove-from-branch-group.js +37 -0
- package/dist/cli/commands/local/remove-symlink.d.ts +13 -0
- package/dist/cli/commands/local/remove-symlink.d.ts.map +1 -0
- package/dist/cli/commands/local/remove-symlink.js +39 -0
- package/dist/cli/commands/local/scrub-git-remotes.d.ts +9 -0
- package/dist/cli/commands/local/scrub-git-remotes.d.ts.map +1 -0
- package/dist/cli/commands/local/scrub-git-remotes.js +23 -0
- package/dist/cli/commands/{admin → local}/sync-unix.d.ts.map +1 -1
- package/dist/cli/commands/{admin → local}/sync-unix.js +3 -3
- package/dist/cli/commands/local/sync-user-symlinks.d.ts +12 -0
- package/dist/cli/commands/local/sync-user-symlinks.d.ts.map +1 -0
- package/dist/cli/commands/local/sync-user-symlinks.js +37 -0
- package/dist/cli/commands/telemetry/index.d.ts +7 -0
- package/dist/cli/commands/telemetry/index.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/index.js +40 -0
- package/dist/cli/commands/telemetry/off.d.ts +6 -0
- package/dist/cli/commands/telemetry/off.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/off.js +35 -0
- package/dist/cli/commands/telemetry/on.d.ts +6 -0
- package/dist/cli/commands/telemetry/on.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/on.js +37 -0
- package/dist/cli/commands/telemetry/test.d.ts +6 -0
- package/dist/cli/commands/telemetry/test.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/test.js +56 -0
- package/dist/cli/commands/user/create-admin.d.ts.map +1 -1
- package/dist/cli/commands/user/create-admin.js +81 -72
- package/dist/cli/commands/user/list.d.ts.map +1 -1
- package/dist/cli/commands/user/list.js +1 -0
- package/dist/cli/commands/whoami.js +2 -1
- package/dist/cli/lib/branch-environment-action.d.ts +21 -0
- package/dist/cli/lib/branch-environment-action.d.ts.map +1 -0
- package/dist/cli/lib/branch-environment-action.js +8 -0
- package/dist/core/api/index.cjs +7 -2
- package/dist/core/api/index.d.ts +13 -4
- package/dist/core/api/index.d.ts.map +1 -1
- package/dist/core/api/index.js +7 -2
- package/dist/core/claude/index.cjs +482 -77
- package/dist/core/claude/index.js +479 -76
- package/dist/core/claude-cli/index.cjs +11 -0
- package/dist/core/claude-cli/index.js +11 -0
- package/dist/core/claude-cli/pricing.d.ts.map +1 -1
- package/dist/core/client/index.cjs +35 -7
- package/dist/core/client/index.js +32 -7
- package/dist/core/config/browser.cjs +3 -5
- package/dist/core/config/browser.js +3 -5
- package/dist/core/config/config-manager.d.ts +33 -13
- package/dist/core/config/config-manager.d.ts.map +1 -1
- package/dist/core/config/index.cjs +4259 -4527
- package/dist/core/config/index.d.ts +1 -0
- package/dist/core/config/index.d.ts.map +1 -1
- package/dist/core/config/index.js +4295 -4583
- package/dist/core/config/key-resolver.d.ts.map +1 -1
- package/dist/core/config/multitenancy.d.ts +33 -0
- package/dist/core/config/multitenancy.d.ts.map +1 -0
- package/dist/core/config/security-resolver.d.ts +1 -0
- package/dist/core/config/security-resolver.d.ts.map +1 -1
- package/dist/core/config/types.d.ts +67 -4
- package/dist/core/config/types.d.ts.map +1 -1
- package/dist/core/db/client.d.ts +34 -2
- package/dist/core/db/client.d.ts.map +1 -1
- package/dist/core/db/database-wrapper.d.ts.map +1 -1
- package/dist/core/db/first-run-bootstrap.d.ts.map +1 -1
- package/dist/core/db/index.cjs +2422 -1084
- package/dist/core/db/index.d.ts +2 -1
- package/dist/core/db/index.d.ts.map +1 -1
- package/dist/core/db/index.js +2162 -852
- package/dist/core/db/migrate.d.ts.map +1 -1
- package/dist/core/db/repositories/artifacts.d.ts +27 -2
- package/dist/core/db/repositories/artifacts.d.ts.map +1 -1
- package/dist/core/db/repositories/base.d.ts +18 -0
- package/dist/core/db/repositories/base.d.ts.map +1 -1
- package/dist/core/db/repositories/board-comments.d.ts +17 -1
- package/dist/core/db/repositories/board-comments.d.ts.map +1 -1
- package/dist/core/db/repositories/board-objects.d.ts.map +1 -1
- package/dist/core/db/repositories/boards.d.ts +28 -4
- package/dist/core/db/repositories/boards.d.ts.map +1 -1
- package/dist/core/db/repositories/branch-access.d.ts +32 -0
- package/dist/core/db/repositories/branch-access.d.ts.map +1 -1
- package/dist/core/db/repositories/branches.d.ts +41 -1
- package/dist/core/db/repositories/branches.d.ts.map +1 -1
- package/dist/core/db/repositories/cards.d.ts +15 -1
- package/dist/core/db/repositories/cards.d.ts.map +1 -1
- package/dist/core/db/repositories/gateway-channels.d.ts.map +1 -1
- package/dist/core/db/repositories/gateway-outbound-messages.d.ts +19 -0
- package/dist/core/db/repositories/gateway-outbound-messages.d.ts.map +1 -0
- package/dist/core/db/repositories/index.d.ts +2 -0
- package/dist/core/db/repositories/index.d.ts.map +1 -1
- package/dist/core/db/repositories/messages.d.ts +9 -2
- package/dist/core/db/repositories/messages.d.ts.map +1 -1
- package/dist/core/db/repositories/repos.d.ts.map +1 -1
- package/dist/core/db/repositories/schedules.d.ts +12 -1
- package/dist/core/db/repositories/schedules.d.ts.map +1 -1
- package/dist/core/db/repositories/sessions.d.ts +49 -5
- package/dist/core/db/repositories/sessions.d.ts.map +1 -1
- package/dist/core/db/repositories/tasks.d.ts +7 -2
- package/dist/core/db/repositories/tasks.d.ts.map +1 -1
- package/dist/core/db/repositories/user-api-keys.d.ts +10 -1
- package/dist/core/db/repositories/user-api-keys.d.ts.map +1 -1
- package/dist/core/db/repositories/users.d.ts +8 -8
- package/dist/core/db/repositories/users.d.ts.map +1 -1
- package/dist/core/db/schema.d.ts +1460 -38
- package/dist/core/db/schema.d.ts.map +1 -1
- package/dist/core/db/schema.postgres.d.ts +1082 -37
- package/dist/core/db/schema.postgres.d.ts.map +1 -1
- package/dist/core/db/schema.sqlite.d.ts +397 -1
- package/dist/core/db/schema.sqlite.d.ts.map +1 -1
- package/dist/core/db/tenant-context.d.ts +26 -0
- package/dist/core/db/tenant-context.d.ts.map +1 -0
- package/dist/core/db/tenant-scope.d.ts +31 -0
- package/dist/core/db/tenant-scope.d.ts.map +1 -0
- package/dist/core/db/user-utils.d.ts +2 -2
- package/dist/core/db/user-utils.d.ts.map +1 -1
- package/dist/core/drizzle/postgres/0052_gateway_outbound_messages.sql +45 -0
- package/dist/core/drizzle/postgres/0053_user_token_invalidation.sql +1 -0
- package/dist/core/drizzle/postgres/0054_app_level_multitenancy.sql +219 -0
- package/dist/core/drizzle/postgres/0055_app_level_multitenancy_rls.sql +411 -0
- package/dist/core/drizzle/postgres/0056_composite_indexes.sql +15 -0
- package/dist/core/drizzle/postgres/0057_message_timestamp_indexes.sql +3 -0
- package/dist/core/drizzle/postgres/meta/_journal.json +42 -0
- package/dist/core/drizzle/sqlite/0061_gateway_outbound_messages.sql +38 -0
- package/dist/core/drizzle/sqlite/0062_user_token_invalidation.sql +1 -0
- package/dist/core/drizzle/sqlite/0063_composite_indexes.sql +10 -0
- package/dist/core/drizzle/sqlite/0064_message_timestamp_indexes.sql +2 -0
- package/dist/core/drizzle/sqlite/meta/_journal.json +28 -0
- package/dist/core/environment/render-snapshot.cjs +1 -4
- package/dist/core/environment/render-snapshot.js +1 -4
- package/dist/core/environment/webhook.cjs +1 -4
- package/dist/core/environment/webhook.js +1 -4
- package/dist/core/gateway/connector.d.ts +10 -1
- package/dist/core/gateway/connector.d.ts.map +1 -1
- package/dist/core/gateway/connectors/slack-manifest.cjs +108 -0
- package/dist/core/gateway/connectors/slack-manifest.d.ts +85 -0
- package/dist/core/gateway/connectors/slack-manifest.d.ts.map +1 -0
- package/dist/core/gateway/connectors/slack-manifest.js +81 -0
- package/dist/core/gateway/connectors/slack.d.ts +101 -4
- package/dist/core/gateway/connectors/slack.d.ts.map +1 -1
- package/dist/core/gateway/index.cjs +495 -29
- package/dist/core/gateway/index.d.ts +4 -1
- package/dist/core/gateway/index.d.ts.map +1 -1
- package/dist/core/gateway/index.js +490 -28
- package/dist/core/gateway/system-message.d.ts.map +1 -1
- package/dist/core/git/exec.cjs +24 -0
- package/dist/core/git/exec.d.ts +6 -4
- package/dist/core/git/exec.d.ts.map +1 -1
- package/dist/core/git/exec.js +2 -0
- package/dist/core/git/index.cjs +3 -1363
- package/dist/core/git/index.d.ts +4 -614
- package/dist/core/git/index.d.ts.map +1 -1
- package/dist/core/git/index.js +1 -1304
- package/dist/core/git/pure.cjs +24 -0
- package/dist/core/git/pure.d.ts +2 -27
- package/dist/core/git/pure.d.ts.map +1 -1
- package/dist/core/git/pure.js +2 -0
- package/dist/core/index.cjs +11137 -10604
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +11673 -10630
- package/dist/core/lib/feathers-validation.cjs +6 -1
- package/dist/core/lib/feathers-validation.d.ts +1 -0
- package/dist/core/lib/feathers-validation.d.ts.map +1 -1
- package/dist/core/lib/feathers-validation.js +6 -1
- package/dist/core/local-actions/git-remotes.d.ts +7 -0
- package/dist/core/local-actions/git-remotes.d.ts.map +1 -0
- package/dist/core/local-actions/index.cjs +7941 -0
- package/dist/core/local-actions/index.d.ts +6 -0
- package/dist/core/local-actions/index.d.ts.map +1 -0
- package/dist/core/local-actions/index.js +7943 -0
- package/dist/core/local-actions/symlinks.d.ts +20 -0
- package/dist/core/local-actions/symlinks.d.ts.map +1 -0
- package/dist/core/local-actions/types.d.ts +14 -0
- package/dist/core/local-actions/types.d.ts.map +1 -0
- package/dist/core/local-actions/unix-groups.d.ts +16 -0
- package/dist/core/local-actions/unix-groups.d.ts.map +1 -0
- package/dist/core/local-actions/unix-users.d.ts +12 -0
- package/dist/core/local-actions/unix-users.d.ts.map +1 -0
- package/dist/core/mcp/index.cjs +352 -25
- package/dist/core/mcp/index.js +351 -24
- package/dist/core/models/browser.cjs +148 -25
- package/dist/core/models/browser.js +144 -25
- package/dist/core/models/claude.d.ts +2 -2
- package/dist/core/models/claude.d.ts.map +1 -1
- package/dist/core/models/codex.d.ts +205 -21
- package/dist/core/models/codex.d.ts.map +1 -1
- package/dist/core/models/index.cjs +148 -25
- package/dist/core/models/index.js +144 -25
- package/dist/core/package.json +24 -0
- package/dist/core/seed/demo-fixtures.d.ts +87 -0
- package/dist/core/seed/demo-fixtures.d.ts.map +1 -0
- package/dist/core/seed/dev-fixtures.d.ts.map +1 -1
- package/dist/core/seed/index.cjs +8410 -5504
- package/dist/core/seed/index.d.ts +1 -0
- package/dist/core/seed/index.d.ts.map +1 -1
- package/dist/core/seed/index.js +8434 -5533
- package/dist/core/sessions/index.cjs +110 -24
- package/dist/core/sessions/index.js +110 -24
- package/dist/core/telemetry/index.cjs +361 -0
- package/dist/core/telemetry/index.d.ts +5 -0
- package/dist/core/telemetry/index.d.ts.map +1 -0
- package/dist/core/telemetry/index.js +315 -0
- package/dist/core/telemetry/logger.d.ts +44 -0
- package/dist/core/telemetry/logger.d.ts.map +1 -0
- package/dist/core/telemetry/model-normalization.d.ts +3 -0
- package/dist/core/telemetry/model-normalization.d.ts.map +1 -0
- package/dist/core/telemetry/types.d.ts +47 -0
- package/dist/core/telemetry/types.d.ts.map +1 -0
- package/dist/core/telemetry/version.d.ts +9 -0
- package/dist/core/telemetry/version.d.ts.map +1 -0
- package/dist/core/templates/agor-system-prompt.md +1 -0
- package/dist/core/tools/mcp/oauth-refresh.cjs +532 -102
- package/dist/core/tools/mcp/oauth-refresh.js +530 -103
- package/dist/core/types/board.d.ts +2 -0
- package/dist/core/types/board.d.ts.map +1 -1
- package/dist/core/types/branch.d.ts +13 -0
- package/dist/core/types/branch.d.ts.map +1 -1
- package/dist/core/types/config-services.d.ts.map +1 -1
- package/dist/core/types/feathers.d.ts +6 -0
- package/dist/core/types/feathers.d.ts.map +1 -1
- package/dist/core/types/gateway.d.ts +76 -1
- package/dist/core/types/gateway.d.ts.map +1 -1
- package/dist/core/types/index.cjs +25 -0
- package/dist/core/types/index.d.ts +1 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/index.js +22 -0
- package/dist/core/types/schedule.d.ts +4 -3
- package/dist/core/types/schedule.d.ts.map +1 -1
- package/dist/core/types/session.d.ts +7 -1
- package/dist/core/types/session.d.ts.map +1 -1
- package/dist/core/types/tenant.d.ts +15 -0
- package/dist/core/types/tenant.d.ts.map +1 -0
- package/dist/core/types/user.d.ts +61 -0
- package/dist/core/types/user.d.ts.map +1 -1
- package/dist/core/unix/index.cjs +1056 -674
- package/dist/core/unix/index.js +1003 -623
- package/dist/core/utils/emoji-shortcodes.d.ts +13 -0
- package/dist/core/utils/emoji-shortcodes.d.ts.map +1 -0
- package/dist/core/yaml/index.cjs +8 -8
- package/dist/core/yaml/index.d.ts +1 -1
- package/dist/core/yaml/index.d.ts.map +1 -1
- package/dist/core/yaml/index.js +7 -7
- package/dist/daemon/adapters/drizzle.d.ts +26 -4
- package/dist/daemon/adapters/drizzle.d.ts.map +1 -1
- package/dist/daemon/adapters/drizzle.js +68 -7
- package/dist/daemon/auth/api-key-strategy.js +1 -1
- package/dist/daemon/auth/executor-runtime-scope.d.ts.map +1 -1
- package/dist/daemon/auth/executor-runtime-scope.js +19 -5
- package/dist/daemon/auth/launch-auth.d.ts +5 -4
- package/dist/daemon/auth/launch-auth.d.ts.map +1 -1
- package/dist/daemon/auth/launch-auth.js +123 -39
- package/dist/daemon/auth/refresh-token-service.d.ts +22 -0
- package/dist/daemon/auth/refresh-token-service.d.ts.map +1 -0
- package/dist/daemon/auth/refresh-token-service.js +133 -0
- package/dist/daemon/auth/runtime-tokens.d.ts +3 -1
- package/dist/daemon/auth/runtime-tokens.d.ts.map +1 -1
- package/dist/daemon/auth/runtime-tokens.js +17 -4
- package/dist/daemon/auth/service-jwt-strategy.d.ts +2 -1
- package/dist/daemon/auth/service-jwt-strategy.d.ts.map +1 -1
- package/dist/daemon/auth/service-jwt-strategy.js +127 -1
- package/dist/daemon/auth/token-invalidation.d.ts +11 -0
- package/dist/daemon/auth/token-invalidation.d.ts.map +1 -0
- package/dist/daemon/auth/token-invalidation.js +38 -0
- package/dist/daemon/auth/user-redaction.d.ts +12 -0
- package/dist/daemon/auth/user-redaction.d.ts.map +1 -0
- package/dist/daemon/auth/user-redaction.js +13 -0
- package/dist/daemon/declarations.d.ts +4 -4
- package/dist/daemon/declarations.d.ts.map +1 -1
- package/dist/daemon/hooks/gateway-route.d.ts.map +1 -1
- package/dist/daemon/hooks/gateway-route.js +23 -13
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +7234 -2866
- package/dist/daemon/knowledge/pgvector.d.ts +3 -3
- package/dist/daemon/knowledge/pgvector.d.ts.map +1 -1
- package/dist/daemon/knowledge/pgvector.js +24 -0
- package/dist/daemon/knowledge/units.d.ts +2 -2
- package/dist/daemon/knowledge/units.d.ts.map +1 -1
- package/dist/daemon/main.js +7234 -2866
- package/dist/daemon/mcp/server.d.ts +3 -3
- package/dist/daemon/mcp/server.d.ts.map +1 -1
- package/dist/daemon/mcp/server.js +1467 -71
- package/dist/daemon/mcp/tokens.d.ts +2 -2
- package/dist/daemon/mcp/tokens.d.ts.map +1 -1
- package/dist/daemon/mcp/tokens.js +5 -1
- package/dist/daemon/mcp/tool-registry.d.ts.map +1 -1
- package/dist/daemon/mcp/tool-registry.js +1 -0
- package/dist/daemon/mcp/tools/analytics.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/analytics.js +548 -23
- package/dist/daemon/mcp/tools/artifacts.js +510 -19
- package/dist/daemon/mcp/tools/boards.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/boards.js +517 -20
- package/dist/daemon/mcp/tools/branches.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/branches.js +574 -49
- package/dist/daemon/mcp/tools/card-types.js +508 -17
- package/dist/daemon/mcp/tools/cards.js +508 -17
- package/dist/daemon/mcp/tools/environment.js +516 -17
- package/dist/daemon/mcp/tools/gateway-channels.d.ts +4 -0
- package/dist/daemon/mcp/tools/gateway-channels.d.ts.map +1 -0
- package/dist/daemon/mcp/tools/gateway-channels.js +16035 -0
- package/dist/daemon/mcp/tools/knowledge.js +508 -17
- package/dist/daemon/mcp/tools/mcp-servers.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/mcp-servers.js +843 -17
- package/dist/daemon/mcp/tools/messages.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/messages.js +568 -31
- package/dist/daemon/mcp/tools/proxies.js +518 -19
- package/dist/daemon/mcp/tools/repos.js +508 -17
- package/dist/daemon/mcp/tools/schedules.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/schedules.js +511 -18
- package/dist/daemon/mcp/tools/search.js +508 -17
- package/dist/daemon/mcp/tools/sessions.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/sessions.js +521 -23
- package/dist/daemon/mcp/tools/tasks.js +508 -17
- package/dist/daemon/mcp/tools/users.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/users.js +527 -22
- package/dist/daemon/mcp/tools/widgets.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/widgets.js +536 -18
- package/dist/daemon/register-hooks.d.ts +3 -2
- package/dist/daemon/register-hooks.d.ts.map +1 -1
- package/dist/daemon/register-hooks.js +894 -582
- package/dist/daemon/register-routes.d.ts +3 -2
- package/dist/daemon/register-routes.d.ts.map +1 -1
- package/dist/daemon/register-routes.js +2715 -816
- package/dist/daemon/register-services.d.ts +2 -2
- package/dist/daemon/register-services.d.ts.map +1 -1
- package/dist/daemon/register-services.js +2445 -633
- package/dist/daemon/services/artifacts.d.ts +34 -6
- package/dist/daemon/services/artifacts.d.ts.map +1 -1
- package/dist/daemon/services/artifacts.js +109 -8
- package/dist/daemon/services/assistant-knowledge.d.ts +2 -2
- package/dist/daemon/services/assistant-knowledge.d.ts.map +1 -1
- package/dist/daemon/services/board-comments.d.ts +8 -5
- package/dist/daemon/services/board-comments.d.ts.map +1 -1
- package/dist/daemon/services/board-comments.js +78 -13
- package/dist/daemon/services/board-objects.d.ts +8 -5
- package/dist/daemon/services/board-objects.d.ts.map +1 -1
- package/dist/daemon/services/board-objects.js +14 -4
- package/dist/daemon/services/boards.d.ts +34 -5
- package/dist/daemon/services/boards.d.ts.map +1 -1
- package/dist/daemon/services/boards.js +116 -8
- package/dist/daemon/services/branch-owners.d.ts +3 -1
- package/dist/daemon/services/branch-owners.d.ts.map +1 -1
- package/dist/daemon/services/branch-owners.js +31 -4
- package/dist/daemon/services/branches.d.ts +31 -8
- package/dist/daemon/services/branches.d.ts.map +1 -1
- package/dist/daemon/services/branches.js +242 -35
- package/dist/daemon/services/card-types.d.ts +3 -3
- package/dist/daemon/services/card-types.d.ts.map +1 -1
- package/dist/daemon/services/card-types.js +68 -7
- package/dist/daemon/services/cards.d.ts +19 -4
- package/dist/daemon/services/cards.d.ts.map +1 -1
- package/dist/daemon/services/cards.js +92 -8
- package/dist/daemon/services/check-auth.d.ts +2 -2
- package/dist/daemon/services/check-auth.d.ts.map +1 -1
- package/dist/daemon/services/claude-cli-integration.d.ts +4 -1
- package/dist/daemon/services/claude-cli-integration.d.ts.map +1 -1
- package/dist/daemon/services/claude-cli-integration.js +117 -65
- package/dist/daemon/services/claude-models.d.ts +3 -3
- package/dist/daemon/services/claude-models.d.ts.map +1 -1
- package/dist/daemon/services/claude-models.js +383 -272
- package/dist/daemon/services/config.d.ts +12 -4
- package/dist/daemon/services/config.d.ts.map +1 -1
- package/dist/daemon/services/config.js +39 -3
- package/dist/daemon/services/copilot-models.d.ts +3 -3
- package/dist/daemon/services/copilot-models.d.ts.map +1 -1
- package/dist/daemon/services/cursor-models.d.ts +3 -3
- package/dist/daemon/services/cursor-models.d.ts.map +1 -1
- package/dist/daemon/services/files.d.ts +3 -3
- package/dist/daemon/services/files.d.ts.map +1 -1
- package/dist/daemon/services/files.js +24 -5
- package/dist/daemon/services/gateway-channels-test.d.ts +24 -0
- package/dist/daemon/services/gateway-channels-test.d.ts.map +1 -0
- package/dist/daemon/services/gateway-channels-test.js +66 -0
- package/dist/daemon/services/gateway-channels.d.ts +3 -3
- package/dist/daemon/services/gateway-channels.d.ts.map +1 -1
- package/dist/daemon/services/gateway-channels.js +68 -7
- package/dist/daemon/services/gateway.d.ts +48 -3
- package/dist/daemon/services/gateway.d.ts.map +1 -1
- package/dist/daemon/services/gateway.js +606 -60
- package/dist/daemon/services/github-app-setup.d.ts +3 -3
- package/dist/daemon/services/github-app-setup.d.ts.map +1 -1
- package/dist/daemon/services/groups.d.ts +5 -5
- package/dist/daemon/services/groups.d.ts.map +1 -1
- package/dist/daemon/services/health-monitor.d.ts +34 -2
- package/dist/daemon/services/health-monitor.d.ts.map +1 -1
- package/dist/daemon/services/health-monitor.js +145 -23
- package/dist/daemon/services/knowledge-document-edits.d.ts +3 -3
- package/dist/daemon/services/knowledge-document-edits.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-documents.d.ts +3 -3
- package/dist/daemon/services/knowledge-documents.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-documents.js +92 -7
- package/dist/daemon/services/knowledge-embedding-indexer.d.ts +7 -2
- package/dist/daemon/services/knowledge-embedding-indexer.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-embedding-indexer.js +37 -3
- package/dist/daemon/services/knowledge-graph.d.ts +3 -3
- package/dist/daemon/services/knowledge-graph.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-indexing.d.ts +3 -3
- package/dist/daemon/services/knowledge-indexing.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-namespaces.d.ts +3 -3
- package/dist/daemon/services/knowledge-namespaces.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-namespaces.js +72 -8
- package/dist/daemon/services/knowledge-reindex.d.ts +3 -3
- package/dist/daemon/services/knowledge-reindex.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-reindex.js +28 -1
- package/dist/daemon/services/knowledge-search.d.ts +3 -3
- package/dist/daemon/services/knowledge-search.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-settings.d.ts +3 -3
- package/dist/daemon/services/knowledge-settings.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-settings.js +24 -0
- package/dist/daemon/services/knowledge-versions.d.ts +3 -3
- package/dist/daemon/services/knowledge-versions.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-versions.js +68 -7
- package/dist/daemon/services/leaderboard.d.ts +14 -6
- package/dist/daemon/services/leaderboard.d.ts.map +1 -1
- package/dist/daemon/services/leaderboard.js +74 -15
- package/dist/daemon/services/local-actions.d.ts +13 -0
- package/dist/daemon/services/local-actions.d.ts.map +1 -0
- package/dist/daemon/services/local-actions.js +120 -0
- package/dist/daemon/services/mcp-servers.d.ts +3 -3
- package/dist/daemon/services/mcp-servers.d.ts.map +1 -1
- package/dist/daemon/services/mcp-servers.js +68 -7
- package/dist/daemon/services/messages.d.ts +10 -6
- package/dist/daemon/services/messages.d.ts.map +1 -1
- package/dist/daemon/services/messages.js +87 -7
- package/dist/daemon/services/repos.d.ts +6 -6
- package/dist/daemon/services/repos.d.ts.map +1 -1
- package/dist/daemon/services/repos.js +131 -32
- package/dist/daemon/services/scheduler.d.ts +23 -27
- package/dist/daemon/services/scheduler.d.ts.map +1 -1
- package/dist/daemon/services/scheduler.js +55 -28
- package/dist/daemon/services/schedules.d.ts +3 -3
- package/dist/daemon/services/schedules.d.ts.map +1 -1
- package/dist/daemon/services/schedules.js +68 -7
- package/dist/daemon/services/session-env-selections.d.ts +3 -3
- package/dist/daemon/services/session-env-selections.d.ts.map +1 -1
- package/dist/daemon/services/session-mcp-servers.d.ts +3 -3
- package/dist/daemon/services/session-mcp-servers.d.ts.map +1 -1
- package/dist/daemon/services/session-token-service.d.ts.map +1 -1
- package/dist/daemon/services/session-token-service.js +3 -0
- package/dist/daemon/services/sessions.d.ts +9 -5
- package/dist/daemon/services/sessions.d.ts.map +1 -1
- package/dist/daemon/services/sessions.js +143 -10
- package/dist/daemon/services/tasks.d.ts +11 -5
- package/dist/daemon/services/tasks.d.ts.map +1 -1
- package/dist/daemon/services/tasks.js +199 -39
- package/dist/daemon/services/terminals.d.ts +21 -3
- package/dist/daemon/services/terminals.d.ts.map +1 -1
- package/dist/daemon/services/terminals.js +81 -25
- package/dist/daemon/services/thread-session-map.d.ts +3 -3
- package/dist/daemon/services/thread-session-map.d.ts.map +1 -1
- package/dist/daemon/services/thread-session-map.js +68 -7
- package/dist/daemon/services/user-avatar-sync.d.ts +21 -0
- package/dist/daemon/services/user-avatar-sync.d.ts.map +1 -0
- package/dist/daemon/services/user-avatar-sync.js +267 -0
- package/dist/daemon/services/users.d.ts +29 -9
- package/dist/daemon/services/users.d.ts.map +1 -1
- package/dist/daemon/services/users.js +383 -30
- package/dist/daemon/services/zone-trigger.d.ts.map +1 -1
- package/dist/daemon/services/zone-trigger.js +17 -4
- package/dist/daemon/setup/build-info.d.ts +1 -1
- package/dist/daemon/setup/build-info.d.ts.map +1 -1
- package/dist/daemon/setup/build-info.js +5 -1
- package/dist/daemon/setup/database.d.ts +8 -3
- package/dist/daemon/setup/database.d.ts.map +1 -1
- package/dist/daemon/setup/database.js +26 -6
- package/dist/daemon/setup/first-run-admin.d.ts +2 -2
- package/dist/daemon/setup/first-run-admin.d.ts.map +1 -1
- package/dist/daemon/setup/index.js +97 -17
- package/dist/daemon/setup/socketio.d.ts +10 -1
- package/dist/daemon/setup/socketio.d.ts.map +1 -1
- package/dist/daemon/setup/socketio.js +68 -10
- package/dist/daemon/startup.d.ts +13 -2
- package/dist/daemon/startup.d.ts.map +1 -1
- package/dist/daemon/startup.js +348 -86
- package/dist/daemon/utils/append-system-message.d.ts +2 -2
- package/dist/daemon/utils/append-system-message.d.ts.map +1 -1
- package/dist/daemon/utils/apply-session-config-defaults.d.ts.map +1 -1
- package/dist/daemon/utils/apply-session-config-defaults.js +12 -1
- package/dist/daemon/utils/authorization.d.ts +3 -1
- package/dist/daemon/utils/authorization.d.ts.map +1 -1
- package/dist/daemon/utils/authorization.js +21 -6
- package/dist/daemon/utils/branch-authorization.d.ts +30 -0
- package/dist/daemon/utils/branch-authorization.d.ts.map +1 -1
- package/dist/daemon/utils/branch-authorization.js +63 -5
- package/dist/daemon/utils/branch-inspect.d.ts +1 -0
- package/dist/daemon/utils/branch-inspect.d.ts.map +1 -1
- package/dist/daemon/utils/branch-inspect.js +11 -3
- package/dist/daemon/utils/executor-read-impersonation.d.ts +2 -2
- package/dist/daemon/utils/executor-read-impersonation.d.ts.map +1 -1
- package/dist/daemon/utils/git-impersonation.d.ts +10 -10
- package/dist/daemon/utils/git-impersonation.d.ts.map +1 -1
- package/dist/daemon/utils/git-remote-credential-scan.d.ts +3 -3
- package/dist/daemon/utils/git-remote-credential-scan.d.ts.map +1 -1
- package/dist/daemon/utils/git-remote-credential-scan.js +6 -2
- package/dist/daemon/utils/mcp-token-authorization.d.ts +18 -13
- package/dist/daemon/utils/mcp-token-authorization.d.ts.map +1 -1
- package/dist/daemon/utils/mcp-token-authorization.js +11 -5
- package/dist/daemon/utils/open-source-telemetry-config.d.ts +6 -0
- package/dist/daemon/utils/open-source-telemetry-config.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-config.js +21 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.d.ts +7 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.js +15 -0
- package/dist/daemon/utils/open-source-telemetry-usage.d.ts +9 -0
- package/dist/daemon/utils/open-source-telemetry-usage.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-usage.js +121 -0
- package/dist/daemon/utils/realign-repo-origin.d.ts +3 -3
- package/dist/daemon/utils/realign-repo-origin.d.ts.map +1 -1
- package/dist/daemon/utils/realign-repo-origin.js +47 -16
- package/dist/daemon/utils/realtime-publish.d.ts +2 -0
- package/dist/daemon/utils/realtime-publish.d.ts.map +1 -1
- package/dist/daemon/utils/realtime-publish.js +51 -10
- package/dist/daemon/utils/session-state-hooks.d.ts +3 -3
- package/dist/daemon/utils/session-state-hooks.d.ts.map +1 -1
- package/dist/daemon/utils/session-turn-lock.d.ts +8 -1
- package/dist/daemon/utils/session-turn-lock.d.ts.map +1 -1
- package/dist/daemon/utils/session-turn-lock.js +25 -2
- package/dist/daemon/utils/spawn-executor.d.ts +23 -1
- package/dist/daemon/utils/spawn-executor.d.ts.map +1 -1
- package/dist/daemon/utils/spawn-executor.js +34 -4
- package/dist/daemon/utils/tenant-db-scope.d.ts +20 -0
- package/dist/daemon/utils/tenant-db-scope.d.ts.map +1 -0
- package/dist/daemon/utils/tenant-db-scope.js +114 -0
- package/dist/daemon/utils/unix-group-init.d.ts +3 -3
- package/dist/daemon/utils/unix-group-init.d.ts.map +1 -1
- package/dist/daemon/utils/upload.d.ts +6 -9
- package/dist/daemon/utils/upload.d.ts.map +1 -1
- package/dist/daemon/utils/upload.js +30 -37
- package/dist/daemon/widgets/env-vars/index.d.ts +26 -1
- package/dist/daemon/widgets/env-vars/index.d.ts.map +1 -1
- package/dist/daemon/widgets/env-vars/index.js +145 -21
- package/dist/daemon/widgets/index.js +137 -21
- package/dist/executor/commands/environment.d.ts.map +1 -1
- package/dist/executor/commands/environment.js +9 -5
- package/dist/executor/commands/git.js +1 -1
- package/dist/executor/git/index.d.ts +8 -0
- package/dist/executor/git/index.d.ts.map +1 -0
- package/dist/executor/git/index.js +7 -0
- package/dist/executor/handlers/sdk/base-executor.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/base-executor.js +4 -1
- package/dist/executor/handlers/sdk/git-safe-directory.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/git-safe-directory.js +1 -1
- package/dist/executor/sdk-handlers/base/diff-enrichment.js +1 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts +6 -10
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.js +12 -15
- package/dist/executor/sdk-handlers/codex/normalizer.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/normalizer.js +11 -1
- package/dist/executor/sdk-handlers/codex/pricing/litellm-openai-model-prices.json +3663 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.d.ts +31 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.d.ts.map +1 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.js +46 -0
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.js +61 -6
- package/dist/executor/sdk-handlers/codex/usage.d.ts +14 -23
- package/dist/executor/sdk-handlers/codex/usage.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/usage.js +18 -33
- package/dist/executor/services/feathers-client.js +5 -5
- package/dist/git/index.cjs +1101 -0
- package/dist/git/index.d.ts +533 -0
- package/dist/git/index.d.ts.map +1 -0
- package/dist/git/index.js +1022 -0
- package/dist/git/package.json +21 -0
- package/dist/git/pure.cjs +185 -0
- package/dist/git/pure.d.ts +39 -0
- package/dist/git/pure.d.ts.map +1 -0
- package/dist/git/pure.js +139 -0
- package/dist/ui/assets/AgorEmojiPickerInner-DQjr8M3_.js +1 -0
- package/dist/ui/assets/App-hJtcOxHv.js +5 -0
- package/dist/ui/assets/App-hJtcOxHv.js.gz +0 -0
- package/dist/ui/assets/AppNode-BhuMpn8O.js +1 -0
- package/dist/ui/assets/AppNode-BhuMpn8O.js.gz +0 -0
- package/dist/ui/assets/ArtifactConsentModal-oMMzRn8L.js +1 -0
- package/dist/ui/assets/ArtifactConsentModal-oMMzRn8L.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-B3wT8t8f.js +9 -0
- package/dist/ui/assets/ArtifactFullscreenPage-B3wT8t8f.js.gz +0 -0
- package/dist/ui/assets/ArtifactNode-BzQcrwFS.js +9 -0
- package/dist/ui/assets/ArtifactNode-BzQcrwFS.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-Dau-V_30.js +19 -0
- package/dist/ui/assets/AutocompleteTextarea-Dau-V_30.js.gz +0 -0
- package/dist/ui/assets/BoardObjectNodes-DdKWv_ZT.js +34 -0
- package/dist/ui/assets/BoardObjectNodes-DdKWv_ZT.js.gz +0 -0
- package/dist/ui/assets/CodeEditor.inner-Cuj6RuLL.js +7 -0
- package/dist/ui/assets/CodeEditor.inner-Cuj6RuLL.js.gz +0 -0
- package/dist/ui/assets/ConversationView-9-3ma1u-.js +1 -0
- package/dist/ui/assets/ConversationView-9-3ma1u-.js.gz +0 -0
- package/dist/ui/assets/EmbeddedTerminal-Lx5I9EOJ.js +2 -0
- package/dist/ui/assets/EmbeddedTerminal-Lx5I9EOJ.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-Dz8YAMYC.js +24 -0
- package/dist/ui/assets/KnowledgePage-Dz8YAMYC.js.gz +0 -0
- package/dist/ui/assets/{MarketingScreenshotPage-zv5RUCuV.js → MarketingScreenshotPage-CmDPBHOl.js} +2 -2
- package/dist/ui/assets/MarketingScreenshotPage-CmDPBHOl.js.gz +0 -0
- package/dist/ui/assets/MobileApp-BpgSG_gz.js +1 -0
- package/dist/ui/assets/MobileApp-BpgSG_gz.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-B6_mtlxK.js +13 -0
- package/dist/ui/assets/SessionCanvas-B6_mtlxK.js.gz +0 -0
- package/dist/ui/assets/{SessionCanvas-mEmYGZhC.css → SessionCanvas-Bh7Yg5dZ.css} +1 -1
- package/dist/ui/assets/SessionCanvas-Bh7Yg5dZ.css.gz +0 -0
- package/dist/ui/assets/{StreamdownDemoPage-wzWaqWwr.js → StreamdownDemoPage-okKKR2QH.js} +2 -2
- package/dist/ui/assets/StreamdownDemoPage-okKKR2QH.js.gz +0 -0
- package/dist/ui/assets/TerminalModal-D9jMGZXv.js +2 -0
- package/dist/ui/assets/TerminalModal-D9jMGZXv.js.gz +0 -0
- package/dist/ui/assets/ThemeSwitcher-D9HgT37l.js +1 -0
- package/dist/ui/assets/ThemeSwitcher-D9HgT37l.js.gz +0 -0
- package/dist/ui/assets/ThemedSyntaxHighlighter.inner-C1FdIHn0.js +1 -0
- package/dist/ui/assets/{antd-CfbbHJOz.js → antd-DT5ackd0.js} +5 -5
- package/dist/ui/assets/{antd-CfbbHJOz.js.gz → antd-DT5ackd0.js.gz} +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-DMnxkQRZ.js +1 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-DwTJGGoj.js +36 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-DwTJGGoj.js.gz +0 -0
- package/dist/ui/assets/{blockDiagram-VD42YOAC-BhZaEN19.js → blockDiagram-VD42YOAC-Dh1_TVW2.js} +4 -4
- package/dist/ui/assets/blockDiagram-VD42YOAC-Dh1_TVW2.js.gz +0 -0
- package/dist/ui/assets/{c4Diagram-YG6GDRKO-Dk_UH-sY.js → c4Diagram-YG6GDRKO-B1e96AcB.js} +2 -2
- package/dist/ui/assets/c4Diagram-YG6GDRKO-B1e96AcB.js.gz +0 -0
- package/dist/ui/assets/channel-Jv4dT4S5.js +1 -0
- package/dist/ui/assets/{chunk-4BX2VUAB-XprbG2TG.js → chunk-4BX2VUAB-BODpCjJx.js} +1 -1
- package/dist/ui/assets/chunk-55IACEB6-lJXvUquf.js +1 -0
- package/dist/ui/assets/{chunk-ABZYJK2D-BJcrryHK.js → chunk-ABZYJK2D-DCTXWSzV.js} +3 -3
- package/dist/ui/assets/chunk-ABZYJK2D-DCTXWSzV.js.gz +0 -0
- package/dist/ui/assets/{chunk-AGHRB4JF-DvxmfbM0.js → chunk-AGHRB4JF-CbNphBjE.js} +1 -1
- package/dist/ui/assets/chunk-AGHRB4JF-CbNphBjE.js.gz +0 -0
- package/dist/ui/assets/{chunk-ATLVNIR6-DbeJ0OrR.js → chunk-ATLVNIR6-rWg3qxof.js} +1 -1
- package/dist/ui/assets/chunk-ATLVNIR6-rWg3qxof.js.gz +0 -0
- package/dist/ui/assets/{chunk-B4BG7PRW-C53q2ggf.js → chunk-B4BG7PRW-CgtLCbpE.js} +3 -3
- package/dist/ui/assets/chunk-B4BG7PRW-CgtLCbpE.js.gz +0 -0
- package/dist/ui/assets/{chunk-CVBHYZKI-B3EBSlb3.js → chunk-CVBHYZKI-DTL6Zgr0.js} +1 -1
- package/dist/ui/assets/{chunk-DI55MBZ5-vIyNEQN-.js → chunk-DI55MBZ5-Dwvx2Kva.js} +1 -1
- package/dist/ui/assets/chunk-DI55MBZ5-Dwvx2Kva.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-DHyaqTsP.js +1 -0
- package/dist/ui/assets/{chunk-FMBD7UC4-rddmfK-Z.js → chunk-FMBD7UC4-BogA_9CV.js} +1 -1
- package/dist/ui/assets/{chunk-HN2XXSSU-Dttqcg3b.js → chunk-HN2XXSSU-2blQO3Gb.js} +1 -1
- package/dist/ui/assets/chunk-HN2XXSSU-2blQO3Gb.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-Cr1rmOui.js +11 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-Cr1rmOui.js.gz +0 -0
- package/dist/ui/assets/{chunk-JZLCHNYA-EUmx2y4H.js → chunk-JZLCHNYA-BsgZ79Fa.js} +5 -5
- package/dist/ui/assets/chunk-JZLCHNYA-BsgZ79Fa.js.gz +0 -0
- package/dist/ui/assets/{chunk-MI3HLSF2-65n9Mkyc.js → chunk-MI3HLSF2-dwYeUy5S.js} +1 -1
- package/dist/ui/assets/chunk-MI3HLSF2-dwYeUy5S.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-DEMgSRVe.js +2 -0
- package/dist/ui/assets/chunk-N4CR4FBY-DEMgSRVe.js.gz +0 -0
- package/dist/ui/assets/{chunk-QN33PNHL-DsRKK6NR.js → chunk-QN33PNHL-DxdIDCAa.js} +1 -1
- package/dist/ui/assets/{chunk-QXUST7PY-BCYnMiS3.js → chunk-QXUST7PY-BCK2V0i-.js} +2 -2
- package/dist/ui/assets/chunk-QXUST7PY-BCK2V0i-.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-CALjGrEE.js +1 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-GP3zIxrB.js +2 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-GP3zIxrB.js.gz +0 -0
- package/dist/ui/assets/{chunk-TZMSLE5B-BuQUQcTr.js → chunk-TZMSLE5B-dX5RaM6g.js} +1 -1
- package/dist/ui/assets/chunk-TZMSLE5B-dX5RaM6g.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-C3_RVP70.js +1 -0
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-C3_RVP70.js +1 -0
- package/dist/ui/assets/constants-GjIDNVyt.js +1 -0
- package/dist/ui/assets/{cose-bilkent-S5V4N54A-CnPB3ARO.js → cose-bilkent-S5V4N54A-Dx0BJVDl.js} +1 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-Dx0BJVDl.js.gz +0 -0
- package/dist/ui/assets/{dagre-6UL2VRFP-DhS-k_Se.js → dagre-6UL2VRFP-DiQSUxqN.js} +1 -1
- package/dist/ui/assets/dagre-6UL2VRFP-DiQSUxqN.js.gz +0 -0
- package/dist/ui/assets/{dagre-KgLoHEuy.js → dagre-Bekd9Vdj.js} +1 -1
- package/dist/ui/assets/dagre-Bekd9Vdj.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-DtJnDQjc.js +24 -0
- package/dist/ui/assets/diagram-PSM6KHXK-DtJnDQjc.js.gz +0 -0
- package/dist/ui/assets/{diagram-QEK2KX5R-BPCitvbo.js → diagram-QEK2KX5R-CobkCRdj.js} +1 -1
- package/dist/ui/assets/diagram-QEK2KX5R-CobkCRdj.js.gz +0 -0
- package/dist/ui/assets/{diagram-S2PKOQOG-NW4uK6sx.js → diagram-S2PKOQOG-DHEZYivc.js} +1 -1
- package/dist/ui/assets/diagram-S2PKOQOG-DHEZYivc.js.gz +0 -0
- package/dist/ui/assets/editor-DQIG-JYZ.js +43 -0
- package/dist/ui/assets/editor-DQIG-JYZ.js.gz +0 -0
- package/dist/ui/assets/emoji-B0hLmSLZ.js +3 -0
- package/dist/ui/assets/emoji-B0hLmSLZ.js.gz +0 -0
- package/dist/ui/assets/{erDiagram-Q2GNP2WA-me1fboaf.js → erDiagram-Q2GNP2WA-BVNeTZPQ.js} +2 -2
- package/dist/ui/assets/erDiagram-Q2GNP2WA-BVNeTZPQ.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-C73VFdyk.js +162 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-C73VFdyk.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-B_RosuD1.js +267 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-B_RosuD1.js.gz +0 -0
- package/dist/ui/assets/{gitGraph-F6HP7TQM-CfFE_uAC.js → gitGraph-F6HP7TQM-DMFIqn4h.js} +1 -1
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-hxbgwNA1.js +65 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-hxbgwNA1.js.gz +0 -0
- package/dist/ui/assets/index-DTz1Dif6.js +64 -0
- package/dist/ui/assets/index-DTz1Dif6.js.gz +0 -0
- package/dist/ui/assets/{index-DxuPq13l.css → index-qkT7Qqm2.css} +1 -1
- package/dist/ui/assets/index-qkT7Qqm2.css.gz +0 -0
- package/dist/ui/assets/{info-NVLQJR56-i_xHYg3f.js → info-NVLQJR56-DZ3K-w48.js} +1 -1
- package/dist/ui/assets/{infoDiagram-ER5ION4S-2NL93b78.js → infoDiagram-ER5ION4S-CxnBJQu6.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-XKPGCS4Q-CZF-2DHU.js → journeyDiagram-XKPGCS4Q-CHYNj-f8.js} +3 -3
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CHYNj-f8.js.gz +0 -0
- package/dist/ui/assets/{kanban-definition-3W4ZIXB7-CfvJIOny.js → kanban-definition-3W4ZIXB7-DQPCCsj2.js} +1 -1
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-DQPCCsj2.js.gz +0 -0
- package/dist/ui/assets/{line-DDv8kOJk.js → line-DBRjKmfa.js} +1 -1
- package/dist/ui/assets/{linear-Daef-l29.js → linear-DFao5Wyp.js} +1 -1
- package/dist/ui/assets/linear-DFao5Wyp.js.gz +0 -0
- package/dist/ui/assets/{mermaid-parser.core-CdK9QgYV.js → mermaid-parser.core-DYCfacHj.js} +2 -2
- package/dist/ui/assets/mermaid-parser.core-DYCfacHj.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-C6xGFSdE.js +11 -0
- package/dist/ui/assets/mermaid.core-C6xGFSdE.js.gz +0 -0
- package/dist/ui/assets/{mindmap-definition-VGOIOE7T-Cb3QMflX.js → mindmap-definition-VGOIOE7T-L3Pw-YM7.js} +1 -1
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-L3Pw-YM7.js.gz +0 -0
- package/dist/ui/assets/{packet-BFZMPI3H-Bm2uwz4i.js → packet-BFZMPI3H-CpL6iNoa.js} +1 -1
- package/dist/ui/assets/{particles-DsJFOarW.js → particles-CT8hcJOA.js} +1 -1
- package/dist/ui/assets/particles-CT8hcJOA.js.gz +0 -0
- package/dist/ui/assets/{pie-7BOR55EZ-5i17tVnF.js → pie-7BOR55EZ-hTqChbTo.js} +1 -1
- package/dist/ui/assets/{pieDiagram-ADFJNKIX-BxIwQWvw.js → pieDiagram-ADFJNKIX-Bf4Nou75.js} +1 -1
- package/dist/ui/assets/pieDiagram-ADFJNKIX-Bf4Nou75.js.gz +0 -0
- package/dist/ui/assets/{quadrantDiagram-AYHSOK5B-B5HPe4ga.js → quadrantDiagram-AYHSOK5B-DpjUTLB1.js} +3 -3
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-DpjUTLB1.js.gz +0 -0
- package/dist/ui/assets/{radar-NHE76QYJ-BTn-tq0k.js → radar-NHE76QYJ-myy7OENC.js} +1 -1
- package/dist/ui/assets/reactflow-Cubtnk8i.js +2 -0
- package/dist/ui/assets/reactflow-Cubtnk8i.js.gz +0 -0
- package/dist/ui/assets/{requirementDiagram-UZGBJVZJ-YfI6llkX.js → requirementDiagram-UZGBJVZJ-Bfrfh-0-.js} +1 -1
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-Bfrfh-0-.js.gz +0 -0
- package/dist/ui/assets/{sandpack-D7koO5op.js → sandpack-C58bwfIS.js} +38 -38
- package/dist/ui/assets/sandpack-C58bwfIS.js.gz +0 -0
- package/dist/ui/assets/sandpackDefaults-Bkga8XAE.js +1 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-ClZAZ6va.js +10 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-ClZAZ6va.js.gz +0 -0
- package/dist/ui/assets/{sequenceDiagram-WL72ISMW-DAe4Um17.js → sequenceDiagram-WL72ISMW-CNgly63p.js} +6 -6
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-CNgly63p.js.gz +0 -0
- package/dist/ui/assets/src-DAeyG22O.js +34 -0
- package/dist/ui/assets/src-DAeyG22O.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BrEAoDpE.js +1 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BrEAoDpE.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-BNL52_oN.js +1 -0
- package/dist/ui/assets/streamdown-BdAVfkeF.js +521 -0
- package/dist/ui/assets/streamdown-BdAVfkeF.js.gz +0 -0
- package/dist/ui/assets/syntax-BOfTnQiy.js +9 -0
- package/dist/ui/assets/syntax-BOfTnQiy.js.gz +0 -0
- package/dist/ui/assets/{timeline-definition-IT6M3QCI-D6P5txjT.js → timeline-definition-IT6M3QCI-CaRH3k4l.js} +16 -16
- package/dist/ui/assets/timeline-definition-IT6M3QCI-CaRH3k4l.js.gz +0 -0
- package/dist/ui/assets/{treemap-KMMF4GRG-Bitm3gy4.js → treemap-KMMF4GRG-CUaLOV_B.js} +1 -1
- package/dist/ui/assets/{useUserLocalStorage-Ckb8HsIw.js → useUserLocalStorage-C8sgXgXR.js} +1 -1
- package/dist/ui/assets/useUserLocalStorage-C8sgXgXR.js.gz +0 -0
- package/dist/ui/assets/{xychartDiagram-PRI3JC2R-CsybjUbd.js → xychartDiagram-PRI3JC2R-BlhkI9T_.js} +1 -1
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-BlhkI9T_.js.gz +0 -0
- package/dist/ui/index.html +10 -11
- package/dist/ui/index.html.gz +0 -0
- package/package.json +6 -5
- package/scripts/postinstall.js +27 -19
- package/dist/cli/commands/daemon/sync.d.ts.map +0 -1
- package/dist/ui/assets/App-DcEY8Ota.js +0 -3
- package/dist/ui/assets/App-DcEY8Ota.js.gz +0 -0
- package/dist/ui/assets/ArtifactConsentModal-CiCbK9iv.js +0 -1
- package/dist/ui/assets/ArtifactConsentModal-CiCbK9iv.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-CfsTEGKd.js +0 -9
- package/dist/ui/assets/ArtifactFullscreenPage-CfsTEGKd.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-BAFFH_5e.js +0 -18
- package/dist/ui/assets/AutocompleteTextarea-BAFFH_5e.js.gz +0 -0
- package/dist/ui/assets/BoardObjectNodes-D-O6bZIG.js +0 -34
- package/dist/ui/assets/BoardObjectNodes-D-O6bZIG.js.gz +0 -0
- package/dist/ui/assets/CodeEditor.inner-DBgsP4tn.js +0 -8
- package/dist/ui/assets/CodeEditor.inner-DBgsP4tn.js.gz +0 -0
- package/dist/ui/assets/ConversationView-CUWR0gR6.js +0 -1
- package/dist/ui/assets/ConversationView-CUWR0gR6.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-B2bzlXfn.js +0 -24
- package/dist/ui/assets/KnowledgePage-B2bzlXfn.js.gz +0 -0
- package/dist/ui/assets/MarketingScreenshotPage-zv5RUCuV.js.gz +0 -0
- package/dist/ui/assets/MobileApp-VgVnsnsN.js +0 -1
- package/dist/ui/assets/MobileApp-VgVnsnsN.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-f1-1Gbcw.js +0 -20
- package/dist/ui/assets/SessionCanvas-f1-1Gbcw.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-mEmYGZhC.css.gz +0 -0
- package/dist/ui/assets/StreamdownDemoPage-wzWaqWwr.js.gz +0 -0
- package/dist/ui/assets/ThemeSwitcher-Dly2y9pi.js +0 -1
- package/dist/ui/assets/ThemeSwitcher-Dly2y9pi.js.gz +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-CykGFbQU.js +0 -1
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-C8HXAenz.js +0 -36
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-C8HXAenz.js.gz +0 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-BhZaEN19.js.gz +0 -0
- package/dist/ui/assets/c4Diagram-YG6GDRKO-Dk_UH-sY.js.gz +0 -0
- package/dist/ui/assets/channel-D6_nUWlW.js +0 -1
- package/dist/ui/assets/chunk-55IACEB6-ByzqIgSb.js +0 -1
- package/dist/ui/assets/chunk-ABZYJK2D-BJcrryHK.js.gz +0 -0
- package/dist/ui/assets/chunk-AGHRB4JF-DvxmfbM0.js.gz +0 -0
- package/dist/ui/assets/chunk-ATLVNIR6-DbeJ0OrR.js.gz +0 -0
- package/dist/ui/assets/chunk-B4BG7PRW-C53q2ggf.js.gz +0 -0
- package/dist/ui/assets/chunk-DI55MBZ5-vIyNEQN-.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-B3ObkuOm.js +0 -1
- package/dist/ui/assets/chunk-HN2XXSSU-Dttqcg3b.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-DbNDev3D.js +0 -11
- package/dist/ui/assets/chunk-JA3XYJ7Z-DbNDev3D.js.gz +0 -0
- package/dist/ui/assets/chunk-JZLCHNYA-EUmx2y4H.js.gz +0 -0
- package/dist/ui/assets/chunk-MI3HLSF2-65n9Mkyc.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-mv5koXqW.js +0 -2
- package/dist/ui/assets/chunk-N4CR4FBY-mv5koXqW.js.gz +0 -0
- package/dist/ui/assets/chunk-QXUST7PY-BCYnMiS3.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-HucAw4xW.js +0 -1
- package/dist/ui/assets/chunk-S3R3BYOJ-CWMEa9Dc.js +0 -2
- package/dist/ui/assets/chunk-S3R3BYOJ-CWMEa9Dc.js.gz +0 -0
- package/dist/ui/assets/chunk-TZMSLE5B-BuQUQcTr.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-CUT3rPTB.js +0 -1
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-CUT3rPTB.js +0 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-CnPB3ARO.js.gz +0 -0
- package/dist/ui/assets/dagre-6UL2VRFP-DhS-k_Se.js.gz +0 -0
- package/dist/ui/assets/dagre-KgLoHEuy.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-BZg3MJmb.js +0 -24
- package/dist/ui/assets/diagram-PSM6KHXK-BZg3MJmb.js.gz +0 -0
- package/dist/ui/assets/diagram-QEK2KX5R-BPCitvbo.js.gz +0 -0
- package/dist/ui/assets/diagram-S2PKOQOG-NW4uK6sx.js.gz +0 -0
- package/dist/ui/assets/editor-CzFWIUw2.js +0 -39
- package/dist/ui/assets/editor-CzFWIUw2.js.gz +0 -0
- package/dist/ui/assets/emoji-Dkz4Zzv_.js +0 -3
- package/dist/ui/assets/emoji-Dkz4Zzv_.js.gz +0 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-me1fboaf.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-DzE8dGsh.js +0 -162
- package/dist/ui/assets/flowDiagram-NV44I4VS-DzE8dGsh.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-CFQD09Mi.js +0 -267
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-CFQD09Mi.js.gz +0 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-CaVoxU4C.js +0 -65
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-CaVoxU4C.js.gz +0 -0
- package/dist/ui/assets/index-BN5_Qq7R.js +0 -324
- package/dist/ui/assets/index-BN5_Qq7R.js.gz +0 -0
- package/dist/ui/assets/index-DxuPq13l.css.gz +0 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CZF-2DHU.js.gz +0 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-CfvJIOny.js.gz +0 -0
- package/dist/ui/assets/katex-CamJ39w1.js +0 -257
- package/dist/ui/assets/katex-CamJ39w1.js.gz +0 -0
- package/dist/ui/assets/linear-Daef-l29.js.gz +0 -0
- package/dist/ui/assets/mermaid-parser.core-CdK9QgYV.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-D6GS9mU-.js +0 -11
- package/dist/ui/assets/mermaid.core-D6GS9mU-.js.gz +0 -0
- package/dist/ui/assets/message-SqLqNYcv.js +0 -36
- package/dist/ui/assets/message-SqLqNYcv.js.gz +0 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-Cb3QMflX.js.gz +0 -0
- package/dist/ui/assets/particles-DsJFOarW.js.gz +0 -0
- package/dist/ui/assets/pieDiagram-ADFJNKIX-BxIwQWvw.js.gz +0 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-B5HPe4ga.js.gz +0 -0
- package/dist/ui/assets/reactflow-Bf74ngoo.js +0 -2
- package/dist/ui/assets/reactflow-Bf74ngoo.js.gz +0 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-YfI6llkX.js.gz +0 -0
- package/dist/ui/assets/sandpack-D7koO5op.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DOk_B10B.js +0 -10
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DOk_B10B.js.gz +0 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-DAe4Um17.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-CCesDu_C.js +0 -1
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-CCesDu_C.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-CMlIrsoO.js +0 -1
- package/dist/ui/assets/syntax-C-M-8jOU.js +0 -10
- package/dist/ui/assets/syntax-C-M-8jOU.js.gz +0 -0
- package/dist/ui/assets/theme-BQZdiqwv.js +0 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-D6P5txjT.js.gz +0 -0
- package/dist/ui/assets/useUserLocalStorage-Ckb8HsIw.js.gz +0 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-CsybjUbd.js.gz +0 -0
- /package/dist/cli/commands/{admin → local}/sync-unix.d.ts +0 -0
|
@@ -125,6 +125,13 @@ function generateTaskId() {
|
|
|
125
125
|
return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
126
126
|
}
|
|
127
127
|
function findExecutorPath() {
|
|
128
|
+
const configuredPath = process.env.AGOR_EXECUTOR_PATH;
|
|
129
|
+
if (configuredPath) {
|
|
130
|
+
if (!existsSync(configuredPath)) {
|
|
131
|
+
throw new Error(`Configured AGOR_EXECUTOR_PATH does not exist: ${configuredPath}`);
|
|
132
|
+
}
|
|
133
|
+
return configuredPath;
|
|
134
|
+
}
|
|
128
135
|
const dirname = typeof __dirname !== "undefined" ? __dirname : path4.dirname(fileURLToPath(import.meta.url));
|
|
129
136
|
const possiblePaths = [
|
|
130
137
|
path4.join(dirname, "../executor/cli.js"),
|
|
@@ -423,12 +430,16 @@ function createServiceToken(jwtSecret, expiresIn, scope = {}) {
|
|
|
423
430
|
expiresIn || "5m"
|
|
424
431
|
);
|
|
425
432
|
}
|
|
426
|
-
function
|
|
433
|
+
function serviceTokenScopeForParams(params) {
|
|
434
|
+
const tenantId = params?.tenant?.tenant_id ?? params?.tenant_id ?? params?.user?.tenant_id;
|
|
435
|
+
return tenantId ? { tenant_id: tenantId } : {};
|
|
436
|
+
}
|
|
437
|
+
function generateSessionToken(app, scope = {}) {
|
|
427
438
|
const jwtSecret = app.settings.authentication?.secret;
|
|
428
439
|
if (!jwtSecret) {
|
|
429
440
|
throw new Error("JWT secret not configured in app settings");
|
|
430
441
|
}
|
|
431
|
-
return createServiceToken(jwtSecret);
|
|
442
|
+
return createServiceToken(jwtSecret, void 0, scope);
|
|
432
443
|
}
|
|
433
444
|
var configuredDaemonUrl, configuredExecutorDefaults, EXECUTOR_RESULT_PREFIX;
|
|
434
445
|
var init_spawn_executor = __esm({
|
|
@@ -448,7 +459,8 @@ function isBranchInspectResult(value) {
|
|
|
448
459
|
}
|
|
449
460
|
async function inspectBranchViaExecutor(app, branchId, options = {}) {
|
|
450
461
|
const sessionToken = generateSessionToken(
|
|
451
|
-
app
|
|
462
|
+
app,
|
|
463
|
+
options.serviceTokenScope
|
|
452
464
|
);
|
|
453
465
|
const result = await runExecutorCommand(
|
|
454
466
|
{
|
|
@@ -545,7 +557,8 @@ async function fireAlwaysNewZoneTrigger(input) {
|
|
|
545
557
|
const asUser = db ? await resolveExecutorReadAsUser(db, user) : void 0;
|
|
546
558
|
const { currentSha, currentRef } = await inspectBranchViaExecutor(app, branch.branch_id, {
|
|
547
559
|
asUser,
|
|
548
|
-
logPrefix: `[zone-trigger ${branch.name}]
|
|
560
|
+
logPrefix: `[zone-trigger ${branch.name}]`,
|
|
561
|
+
serviceTokenScope: serviceTokenScopeForParams(params)
|
|
549
562
|
});
|
|
550
563
|
const newSession = await app.service("sessions").create(
|
|
551
564
|
{
|
|
@@ -588,14 +601,15 @@ var init_zone_trigger = __esm({
|
|
|
588
601
|
"use strict";
|
|
589
602
|
init_branch_inspect();
|
|
590
603
|
init_executor_read_impersonation();
|
|
604
|
+
init_spawn_executor();
|
|
591
605
|
VALID_AGENTS = ["claude-code", "codex", "gemini", "opencode"];
|
|
592
606
|
}
|
|
593
607
|
});
|
|
594
608
|
|
|
595
609
|
// src/mcp/tools/branches.ts
|
|
596
610
|
import { existsSync as existsSync2 } from "fs";
|
|
597
|
-
import { isBranchRbacEnabled as isBranchRbacEnabled2 } from "@agor/core/config";
|
|
598
|
-
import { BranchRepository as
|
|
611
|
+
import { isBranchRbacEnabled as isBranchRbacEnabled2, loadConfig as loadConfig2 } from "@agor/core/config";
|
|
612
|
+
import { BranchRepository as BranchRepository6, shortId as shortId6 } from "@agor/core/db";
|
|
599
613
|
import { BRANCH_PERMISSION_LEVELS as BRANCH_PERMISSION_LEVELS2, getAssistantConfig as getAssistantConfig3, isAssistant as isAssistant3 } from "@agor/core/types";
|
|
600
614
|
import { computeZoneRelativePosition } from "@agor/core/utils/board-placement";
|
|
601
615
|
import { normalizeOptionalHttpUrl } from "@agor/core/utils/url";
|
|
@@ -15114,11 +15128,19 @@ function date4(params) {
|
|
|
15114
15128
|
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
15115
15129
|
config(en_default());
|
|
15116
15130
|
|
|
15117
|
-
// src/
|
|
15118
|
-
|
|
15119
|
-
|
|
15120
|
-
|
|
15131
|
+
// src/utils/branch-authorization.ts
|
|
15132
|
+
import { shortId } from "@agor/core/db";
|
|
15133
|
+
import { Forbidden, NotAuthenticated, NotFound } from "@agor/core/feathers";
|
|
15134
|
+
import { BRANCH_PERMISSION_LEVELS, hasMinimumRole, ROLES } from "@agor/core/types";
|
|
15135
|
+
function isSuperAdmin(role, allowSuperadmin = true) {
|
|
15136
|
+
if (!allowSuperadmin) return false;
|
|
15137
|
+
return role === ROLES.SUPERADMIN || role === "owner";
|
|
15121
15138
|
}
|
|
15139
|
+
var PERMISSION_RANK = Object.fromEntries(
|
|
15140
|
+
BRANCH_PERMISSION_LEVELS.map((level, i) => [level, i - 1])
|
|
15141
|
+
);
|
|
15142
|
+
|
|
15143
|
+
// src/mcp/resolve-ids.ts
|
|
15122
15144
|
async function resolveBranchId(ctx, id) {
|
|
15123
15145
|
const entity = await ctx.app.service("branches").get(id, ctx.baseServiceParams);
|
|
15124
15146
|
return entity.branch_id;
|
|
@@ -15150,6 +15172,11 @@ function mcpOptionalString(fieldName, description) {
|
|
|
15150
15172
|
error: `${fieldName} must be a string when provided.`
|
|
15151
15173
|
}).optional().describe(description);
|
|
15152
15174
|
}
|
|
15175
|
+
function mcpOptionalNonEmptyString(fieldName, description) {
|
|
15176
|
+
return external_exports.string({
|
|
15177
|
+
error: `${fieldName} must be a string when provided.`
|
|
15178
|
+
}).min(1, `${fieldName} cannot be empty when provided.`).optional().describe(description);
|
|
15179
|
+
}
|
|
15153
15180
|
function mcpOptionalNonBlankString(fieldName, description) {
|
|
15154
15181
|
return external_exports.string({
|
|
15155
15182
|
error: `${fieldName} must be a string when provided.`
|
|
@@ -15195,7 +15222,11 @@ import { ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
|
15195
15222
|
|
|
15196
15223
|
// src/mcp/tokens.ts
|
|
15197
15224
|
import { MCP_TOKEN } from "@agor/core/config";
|
|
15198
|
-
import {
|
|
15225
|
+
import {
|
|
15226
|
+
generateId,
|
|
15227
|
+
SessionRepository,
|
|
15228
|
+
shortId as shortId2
|
|
15229
|
+
} from "@agor/core/db";
|
|
15199
15230
|
import {
|
|
15200
15231
|
MCP_TOKEN_AUDIENCE,
|
|
15201
15232
|
MCP_TOKEN_ISSUER
|
|
@@ -15216,6 +15247,7 @@ var DOMAIN_DESCRIPTIONS = {
|
|
|
15216
15247
|
users: "User accounts, profiles, preferences, and administration",
|
|
15217
15248
|
analytics: "Usage and cost tracking leaderboard",
|
|
15218
15249
|
"mcp-servers": "External MCP server configuration and OAuth management",
|
|
15250
|
+
gateway: "Gateway channels for Slack, GitHub, Teams, and other message integrations",
|
|
15219
15251
|
proxies: "Configured HTTP proxies for third-party APIs (Shortcut, Linear, Jira, etc.)",
|
|
15220
15252
|
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",
|
|
15221
15253
|
knowledge: "DB-backed markdown knowledge documents, version history, search, and graph links",
|
|
@@ -15229,16 +15261,6 @@ function formatDomainDescriptionsForInstructions() {
|
|
|
15229
15261
|
import path from "path";
|
|
15230
15262
|
import { BranchRepository } from "@agor/core/db";
|
|
15231
15263
|
import { NotFoundError } from "@agor/core/utils/errors";
|
|
15232
|
-
|
|
15233
|
-
// src/utils/branch-authorization.ts
|
|
15234
|
-
import { shortId as shortId2 } from "@agor/core/db";
|
|
15235
|
-
import { Forbidden, NotAuthenticated, NotFound } from "@agor/core/feathers";
|
|
15236
|
-
import { BRANCH_PERMISSION_LEVELS, hasMinimumRole, ROLES } from "@agor/core/types";
|
|
15237
|
-
var PERMISSION_RANK = Object.fromEntries(
|
|
15238
|
-
BRANCH_PERMISSION_LEVELS.map((level, i) => [level, i - 1])
|
|
15239
|
-
);
|
|
15240
|
-
|
|
15241
|
-
// src/mcp/tools/artifacts.ts
|
|
15242
15264
|
var SANDPACK_TEMPLATES = [
|
|
15243
15265
|
"react",
|
|
15244
15266
|
"react-ts",
|
|
@@ -15295,12 +15317,186 @@ function assertValidVariant(repo, variant) {
|
|
|
15295
15317
|
}
|
|
15296
15318
|
}
|
|
15297
15319
|
|
|
15320
|
+
// src/mcp/tools/gateway-channels.ts
|
|
15321
|
+
import {
|
|
15322
|
+
BranchRepository as BranchRepository2,
|
|
15323
|
+
GatewayChannelRepository,
|
|
15324
|
+
SessionRepository as SessionRepository2,
|
|
15325
|
+
ThreadSessionMapRepository
|
|
15326
|
+
} from "@agor/core/db";
|
|
15327
|
+
import {
|
|
15328
|
+
getConnector
|
|
15329
|
+
} from "@agor/core/gateway";
|
|
15330
|
+
import {
|
|
15331
|
+
GATEWAY_REDACTED_SENTINEL,
|
|
15332
|
+
GATEWAY_SENSITIVE_CONFIG_FIELDS,
|
|
15333
|
+
hasMinimumRole as hasMinimumRole2,
|
|
15334
|
+
ROLES as ROLES2
|
|
15335
|
+
} from "@agor/core/types";
|
|
15336
|
+
var configSchema = external_exports.record(external_exports.string(), external_exports.unknown()).describe(
|
|
15337
|
+
"Platform-specific gateway configuration. Secrets are stored encrypted and returned redacted. Prefer env/template references for shared credentials where the connector supports them."
|
|
15338
|
+
);
|
|
15339
|
+
var outboundTargetSchema = external_exports.string().trim().regex(
|
|
15340
|
+
/^(channel:[^:\s]+|channel_name:[^\s]+|#[^\s]+|(?:email:|user_email:)?[^@\s]+@[^@\s]+\.[^@\s]+)$/
|
|
15341
|
+
).describe(
|
|
15342
|
+
"Slack outbound target for v0: channel:C123, #project-updates, channel_name:project-updates, or user@example.com. Thread targets are intentionally not supported."
|
|
15343
|
+
);
|
|
15344
|
+
var envVarSchema = external_exports.strictObject({
|
|
15345
|
+
key: mcpRequiredString("agenticConfig.envVars[].key", "Environment variable name"),
|
|
15346
|
+
value: mcpRequiredString(
|
|
15347
|
+
"agenticConfig.envVars[].value",
|
|
15348
|
+
`Environment variable value. Prefer references/templates over raw secrets. Existing redacted values may be passed as '${GATEWAY_REDACTED_SENTINEL}' on update to preserve them.`
|
|
15349
|
+
),
|
|
15350
|
+
forceOverride: external_exports.boolean().optional().describe("When true, channel value wins over user env vars. Defaults to false.")
|
|
15351
|
+
});
|
|
15352
|
+
var agenticConfigSchema = external_exports.strictObject({
|
|
15353
|
+
agent: external_exports.enum(["claude-code", "claude-code-cli", "codex", "gemini", "opencode", "copilot", "cursor"]).describe("Agent used for sessions created from this gateway channel."),
|
|
15354
|
+
permissionMode: external_exports.enum([
|
|
15355
|
+
"default",
|
|
15356
|
+
"acceptEdits",
|
|
15357
|
+
"bypassPermissions",
|
|
15358
|
+
"plan",
|
|
15359
|
+
"dontAsk",
|
|
15360
|
+
"autoEdit",
|
|
15361
|
+
"yolo",
|
|
15362
|
+
"ask",
|
|
15363
|
+
"auto",
|
|
15364
|
+
"on-failure",
|
|
15365
|
+
"allow-all"
|
|
15366
|
+
]).optional().describe("Permission mode for spawned sessions."),
|
|
15367
|
+
modelConfig: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("Agent model configuration."),
|
|
15368
|
+
mcpServerIds: external_exports.array(external_exports.string().min(1)).optional().describe("MCP server IDs to attach to gateway-created sessions."),
|
|
15369
|
+
codexSandboxMode: external_exports.enum(["read-only", "workspace-write", "danger-full-access"]).optional().describe("Codex sandbox mode for Codex gateway sessions."),
|
|
15370
|
+
codexApprovalPolicy: external_exports.enum(["untrusted", "on-failure", "on-request", "never"]).optional().describe("Codex approval policy for Codex gateway sessions."),
|
|
15371
|
+
codexNetworkAccess: external_exports.boolean().optional().describe("Allow Codex network access."),
|
|
15372
|
+
envVars: external_exports.array(envVarSchema).optional().describe("Gateway-level env vars. Values are redacted in responses.")
|
|
15373
|
+
}).describe("Agent/session defaults for conversations created through this gateway channel.");
|
|
15374
|
+
var gatewayChannelCreateSchema = external_exports.strictObject({
|
|
15375
|
+
name: mcpRequiredString("name", 'Human-readable channel name, e.g. "Engineering Slack".'),
|
|
15376
|
+
channelType: external_exports.enum(["slack", "github", "teams", "discord", "whatsapp", "telegram"]).default("slack").describe("Gateway platform type. Current active connectors are slack, github, and teams."),
|
|
15377
|
+
targetBranchId: mcpRequiredId(
|
|
15378
|
+
"targetBranchId",
|
|
15379
|
+
"Branch",
|
|
15380
|
+
"Branch/worktree ID that this gateway channel prompts."
|
|
15381
|
+
),
|
|
15382
|
+
agorUserId: mcpOptionalId(
|
|
15383
|
+
"agorUserId",
|
|
15384
|
+
"User",
|
|
15385
|
+
"Agor user ID whose identity is used when platform-user alignment is disabled."
|
|
15386
|
+
),
|
|
15387
|
+
enabled: external_exports.boolean().optional().describe("Whether the channel is active. Defaults to true."),
|
|
15388
|
+
config: configSchema,
|
|
15389
|
+
agenticConfig: agenticConfigSchema.optional()
|
|
15390
|
+
}).superRefine((value, issue2) => {
|
|
15391
|
+
const config2 = value.config ?? {};
|
|
15392
|
+
if (value.channelType === "slack") {
|
|
15393
|
+
if (!config2.bot_token) {
|
|
15394
|
+
issue2.addIssue({
|
|
15395
|
+
code: "custom",
|
|
15396
|
+
path: ["config", "bot_token"],
|
|
15397
|
+
message: "config.bot_token is required for Slack. Prefer a bot token stored outside the transcript when possible."
|
|
15398
|
+
});
|
|
15399
|
+
}
|
|
15400
|
+
if (config2.connection_mode === "socket" && !config2.app_token) {
|
|
15401
|
+
issue2.addIssue({
|
|
15402
|
+
code: "custom",
|
|
15403
|
+
path: ["config", "app_token"],
|
|
15404
|
+
message: "config.app_token is required for Slack Socket Mode."
|
|
15405
|
+
});
|
|
15406
|
+
}
|
|
15407
|
+
}
|
|
15408
|
+
if (value.channelType === "github") {
|
|
15409
|
+
for (const field of ["app_id", "private_key", "installation_id", "watch_repos"]) {
|
|
15410
|
+
if (!config2[field]) {
|
|
15411
|
+
issue2.addIssue({
|
|
15412
|
+
code: "custom",
|
|
15413
|
+
path: ["config", field],
|
|
15414
|
+
message: `config.${field} is required for GitHub gateway channels.`
|
|
15415
|
+
});
|
|
15416
|
+
}
|
|
15417
|
+
}
|
|
15418
|
+
}
|
|
15419
|
+
if (value.channelType === "teams") {
|
|
15420
|
+
for (const field of ["app_id", "app_password"]) {
|
|
15421
|
+
if (!config2[field]) {
|
|
15422
|
+
issue2.addIssue({
|
|
15423
|
+
code: "custom",
|
|
15424
|
+
path: ["config", field],
|
|
15425
|
+
message: `config.${field} is required for Teams gateway channels.`
|
|
15426
|
+
});
|
|
15427
|
+
}
|
|
15428
|
+
}
|
|
15429
|
+
}
|
|
15430
|
+
});
|
|
15431
|
+
var slackThreadHistorySchema = external_exports.strictObject({
|
|
15432
|
+
sessionId: mcpOptionalId(
|
|
15433
|
+
"sessionId",
|
|
15434
|
+
"Session",
|
|
15435
|
+
"Preferred: resolve the Slack thread mapping from an accessible Agor session ID (UUIDv7 or short ID). If provided, gatewayChannelId/threadId are ignored."
|
|
15436
|
+
),
|
|
15437
|
+
gatewayChannelId: mcpOptionalId(
|
|
15438
|
+
"gatewayChannelId",
|
|
15439
|
+
"Gateway channel",
|
|
15440
|
+
"Explicit Slack gateway channel ID (UUIDv7 or short ID). Required when sessionId is omitted."
|
|
15441
|
+
),
|
|
15442
|
+
threadId: mcpOptionalNonEmptyString(
|
|
15443
|
+
"threadId",
|
|
15444
|
+
"Explicit Slack thread ID in Agor gateway format, e.g. C123-171234.000100. Required when sessionId is omitted."
|
|
15445
|
+
),
|
|
15446
|
+
oldestTs: mcpOptionalNonEmptyString(
|
|
15447
|
+
"oldestTs",
|
|
15448
|
+
"Optional Slack oldest timestamp bound, e.g. 171234.000100."
|
|
15449
|
+
),
|
|
15450
|
+
latestTs: mcpOptionalNonEmptyString(
|
|
15451
|
+
"latestTs",
|
|
15452
|
+
"Optional Slack latest timestamp bound, e.g. 171235.000200."
|
|
15453
|
+
),
|
|
15454
|
+
inclusive: external_exports.boolean().optional().describe("Whether Slack should include messages exactly at oldest/latest bounds."),
|
|
15455
|
+
limit: mcpLimit(50).describe("Maximum Slack messages to request (default: 50, max: 200)."),
|
|
15456
|
+
includeBotMessages: external_exports.boolean().optional().describe("Include Slack bot messages in the returned history. Defaults to false."),
|
|
15457
|
+
format: external_exports.enum(["messages", "markdown"]).optional().describe(
|
|
15458
|
+
'Response body format. "messages" returns normalized JSON; "markdown" returns a transcript string.'
|
|
15459
|
+
)
|
|
15460
|
+
}).superRefine((value, issue2) => {
|
|
15461
|
+
if (value.sessionId) return;
|
|
15462
|
+
if (!value.gatewayChannelId) {
|
|
15463
|
+
issue2.addIssue({
|
|
15464
|
+
code: "custom",
|
|
15465
|
+
path: ["gatewayChannelId"],
|
|
15466
|
+
message: "gatewayChannelId is required when sessionId is omitted."
|
|
15467
|
+
});
|
|
15468
|
+
}
|
|
15469
|
+
if (!value.threadId) {
|
|
15470
|
+
issue2.addIssue({
|
|
15471
|
+
code: "custom",
|
|
15472
|
+
path: ["threadId"],
|
|
15473
|
+
message: "threadId is required when sessionId is omitted."
|
|
15474
|
+
});
|
|
15475
|
+
}
|
|
15476
|
+
});
|
|
15477
|
+
var gatewayChannelUpdateSchema = external_exports.strictObject({
|
|
15478
|
+
gatewayChannelId: mcpRequiredId(
|
|
15479
|
+
"gatewayChannelId",
|
|
15480
|
+
"Gateway channel",
|
|
15481
|
+
"Gateway channel ID (UUIDv7 or short ID)"
|
|
15482
|
+
),
|
|
15483
|
+
name: mcpOptionalNonEmptyString("name", "New human-readable channel name."),
|
|
15484
|
+
channelType: external_exports.enum(["slack", "github", "teams", "discord", "whatsapp", "telegram"]).optional().describe("Gateway platform type. Changing this should include compatible config."),
|
|
15485
|
+
targetBranchId: mcpOptionalId("targetBranchId", "Branch", "New target branch/worktree ID."),
|
|
15486
|
+
agorUserId: mcpOptionalId("agorUserId", "User", "New run-as Agor user ID."),
|
|
15487
|
+
enabled: external_exports.boolean().optional().describe("Enable/disable the channel."),
|
|
15488
|
+
config: configSchema.optional().describe(
|
|
15489
|
+
`Partial platform config to merge. Send '${GATEWAY_REDACTED_SENTINEL}' or omit sensitive fields to preserve existing secrets; send a new value to rotate.`
|
|
15490
|
+
),
|
|
15491
|
+
agenticConfig: agenticConfigSchema.nullable().optional().describe("Replace agent/session defaults. null clears the gateway agentic config.")
|
|
15492
|
+
});
|
|
15493
|
+
|
|
15298
15494
|
// src/mcp/tools/knowledge.ts
|
|
15299
15495
|
import { createHash, randomUUID } from "crypto";
|
|
15300
15496
|
import fs2 from "fs";
|
|
15301
15497
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
15302
15498
|
import path3 from "path";
|
|
15303
|
-
import { BranchRepository as
|
|
15499
|
+
import { BranchRepository as BranchRepository4, KnowledgeNamespaceRepository as KnowledgeNamespaceRepository2 } from "@agor/core/db";
|
|
15304
15500
|
import { NotFound as NotFound2 } from "@agor/core/feathers";
|
|
15305
15501
|
import {
|
|
15306
15502
|
buildKnowledgeDocumentUri,
|
|
@@ -15326,14 +15522,14 @@ import { unified } from "unified";
|
|
|
15326
15522
|
|
|
15327
15523
|
// src/services/assistant-knowledge.ts
|
|
15328
15524
|
import {
|
|
15329
|
-
BranchRepository as
|
|
15525
|
+
BranchRepository as BranchRepository3,
|
|
15330
15526
|
KnowledgeNamespaceRepository,
|
|
15331
15527
|
shortId as shortId3
|
|
15332
15528
|
} from "@agor/core/db";
|
|
15333
15529
|
import { getAssistantConfig, isAssistant } from "@agor/core/types";
|
|
15334
15530
|
|
|
15335
15531
|
// src/services/knowledge-access.ts
|
|
15336
|
-
import { hasMinimumRole as
|
|
15532
|
+
import { hasMinimumRole as hasMinimumRole3, ROLES as ROLES3 } from "@agor/core/types";
|
|
15337
15533
|
|
|
15338
15534
|
// src/utils/branch-workspace-path.ts
|
|
15339
15535
|
import fs from "fs";
|
|
@@ -15475,6 +15671,261 @@ var KnowledgeNodeRefSchema = external_exports.object(
|
|
|
15475
15671
|
"Reference to an existing or creatable knowledge graph node. Prefer nodeId or uri; use typed IDs for links to Agor core objects."
|
|
15476
15672
|
);
|
|
15477
15673
|
|
|
15674
|
+
// src/mcp/tools/mcp-servers.ts
|
|
15675
|
+
import {
|
|
15676
|
+
isReservedMCPCustomHeaderName,
|
|
15677
|
+
isValidMCPHeaderName
|
|
15678
|
+
} from "@agor/core/tools/mcp/http-headers";
|
|
15679
|
+
var mcpNameSchema = external_exports.string({
|
|
15680
|
+
error: 'name is required and must be a string. Example: { "name": "context7" }'
|
|
15681
|
+
}).regex(
|
|
15682
|
+
/^[a-z][a-z0-9_-]{0,63}$/,
|
|
15683
|
+
'name must start with a lowercase letter and contain only lowercase letters, digits, "_" or "-" (max 64 chars).'
|
|
15684
|
+
).describe('Stable internal ID, e.g. "context7", "github", "datadog". Cannot be changed later.');
|
|
15685
|
+
var stringMapSchema = external_exports.record(external_exports.string(), external_exports.string()).describe(
|
|
15686
|
+
"JSON object of string keys/values. Values may use templates like {{ user.env.API_TOKEN }}."
|
|
15687
|
+
);
|
|
15688
|
+
var mcpAuthInputSchema = external_exports.strictObject({
|
|
15689
|
+
type: external_exports.enum(["none", "bearer", "jwt", "oauth"]).describe(
|
|
15690
|
+
"Authentication mode. OAuth tip: start with { type: 'oauth' } plus the MCP server URL; only add endpoint/client fields if discovery/DCR fails."
|
|
15691
|
+
),
|
|
15692
|
+
token: mcpOptionalString(
|
|
15693
|
+
"auth.token",
|
|
15694
|
+
"Bearer token. Prefer {{ user.env.MCP_TOKEN }} templates; raw secrets will be stored redacted but are still visible in this MCP call transcript."
|
|
15695
|
+
),
|
|
15696
|
+
api_url: mcpOptionalString("auth.api_url", "JWT auth API URL."),
|
|
15697
|
+
api_token: mcpOptionalString(
|
|
15698
|
+
"auth.api_token",
|
|
15699
|
+
"JWT API token. Prefer {{ user.env.JWT_TOKEN }} templates."
|
|
15700
|
+
),
|
|
15701
|
+
api_secret: mcpOptionalString(
|
|
15702
|
+
"auth.api_secret",
|
|
15703
|
+
"JWT API secret. Prefer {{ user.env.JWT_SECRET }} templates."
|
|
15704
|
+
),
|
|
15705
|
+
oauth_authorization_url: mcpOptionalString(
|
|
15706
|
+
"auth.oauth_authorization_url",
|
|
15707
|
+
"Optional OAuth authorization endpoint override. Leave blank for discovery."
|
|
15708
|
+
),
|
|
15709
|
+
oauth_token_url: mcpOptionalString(
|
|
15710
|
+
"auth.oauth_token_url",
|
|
15711
|
+
"Optional OAuth token endpoint override. Leave blank for discovery."
|
|
15712
|
+
),
|
|
15713
|
+
oauth_client_id: mcpOptionalString(
|
|
15714
|
+
"auth.oauth_client_id",
|
|
15715
|
+
"Optional OAuth client ID for providers that require a pre-registered app. Leave blank for Dynamic Client Registration where supported."
|
|
15716
|
+
),
|
|
15717
|
+
oauth_client_secret: mcpOptionalString(
|
|
15718
|
+
"auth.oauth_client_secret",
|
|
15719
|
+
"Optional OAuth client secret. Prefer {{ user.env.OAUTH_CLIENT_SECRET }} templates; raw secrets are not returned by this tool."
|
|
15720
|
+
),
|
|
15721
|
+
oauth_scope: mcpOptionalString("auth.oauth_scope", "Optional OAuth scopes, space-separated."),
|
|
15722
|
+
oauth_grant_type: external_exports.enum(["client_credentials", "authorization_code"]).optional().describe(
|
|
15723
|
+
"OAuth grant type hint. Defaults to 'client_credentials' for legacy token testing; browser OAuth uses authorization code with PKCE."
|
|
15724
|
+
),
|
|
15725
|
+
oauth_mode: external_exports.enum(["per_user", "shared"]).optional().describe("OAuth token ownership. Defaults to 'per_user' (recommended)."),
|
|
15726
|
+
insecure: external_exports.boolean().optional().describe("Allow insecure auth behavior if supported.")
|
|
15727
|
+
}).superRefine((auth, issue2) => {
|
|
15728
|
+
if (auth.type === "bearer" && !auth.token) {
|
|
15729
|
+
issue2.addIssue({
|
|
15730
|
+
code: "custom",
|
|
15731
|
+
path: ["token"],
|
|
15732
|
+
message: "auth.token is required when auth.type is 'bearer'."
|
|
15733
|
+
});
|
|
15734
|
+
}
|
|
15735
|
+
const fieldsByType = {
|
|
15736
|
+
none: [],
|
|
15737
|
+
bearer: ["token"],
|
|
15738
|
+
jwt: ["api_url", "api_token", "api_secret"],
|
|
15739
|
+
oauth: [
|
|
15740
|
+
"oauth_authorization_url",
|
|
15741
|
+
"oauth_token_url",
|
|
15742
|
+
"oauth_client_id",
|
|
15743
|
+
"oauth_client_secret",
|
|
15744
|
+
"oauth_scope",
|
|
15745
|
+
"oauth_grant_type",
|
|
15746
|
+
"oauth_mode",
|
|
15747
|
+
"insecure"
|
|
15748
|
+
]
|
|
15749
|
+
};
|
|
15750
|
+
const allowed = /* @__PURE__ */ new Set(["type", ...fieldsByType[auth.type]]);
|
|
15751
|
+
for (const key of Object.keys(auth)) {
|
|
15752
|
+
if (!allowed.has(key)) {
|
|
15753
|
+
issue2.addIssue({
|
|
15754
|
+
code: "custom",
|
|
15755
|
+
path: [key],
|
|
15756
|
+
message: `auth.${key} does not apply when auth.type is '${auth.type}'.`
|
|
15757
|
+
});
|
|
15758
|
+
}
|
|
15759
|
+
}
|
|
15760
|
+
if (auth.type === "jwt") {
|
|
15761
|
+
for (const field of ["api_url", "api_token", "api_secret"]) {
|
|
15762
|
+
if (!auth[field]) {
|
|
15763
|
+
issue2.addIssue({
|
|
15764
|
+
code: "custom",
|
|
15765
|
+
path: [field],
|
|
15766
|
+
message: `auth.${field} is required when auth.type is 'jwt'.`
|
|
15767
|
+
});
|
|
15768
|
+
}
|
|
15769
|
+
}
|
|
15770
|
+
}
|
|
15771
|
+
}).describe(
|
|
15772
|
+
"Auth config. Common OAuth path: { type: 'oauth' } plus url; leave OAuth URLs/client fields blank first so metadata discovery/DCR can do the work."
|
|
15773
|
+
);
|
|
15774
|
+
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' }.");
|
|
15775
|
+
var mcpServerCreateSchema = external_exports.strictObject({
|
|
15776
|
+
name: mcpNameSchema,
|
|
15777
|
+
displayName: mcpOptionalNonEmptyString(
|
|
15778
|
+
"displayName",
|
|
15779
|
+
'Human-friendly display name, e.g. "Context7 MCP".'
|
|
15780
|
+
),
|
|
15781
|
+
description: mcpOptionalString("description", "Optional description."),
|
|
15782
|
+
transport: external_exports.enum(["stdio", "http", "sse"]).optional().describe(
|
|
15783
|
+
"Transport. Defaults to 'http' when url is provided, otherwise 'stdio'. Most remote OAuth MCP servers use 'http'."
|
|
15784
|
+
),
|
|
15785
|
+
url: mcpOptionalString(
|
|
15786
|
+
"url",
|
|
15787
|
+
"Remote MCP server URL for http/sse transports. Supports templates like {{ user.env.MCP_URL }}."
|
|
15788
|
+
),
|
|
15789
|
+
command: mcpOptionalString("command", 'Local command for stdio transport, e.g. "npx".'),
|
|
15790
|
+
args: external_exports.array(external_exports.string()).optional().describe(
|
|
15791
|
+
'Arguments for stdio command, e.g. ["-y", "@modelcontextprotocol/server-filesystem"].'
|
|
15792
|
+
),
|
|
15793
|
+
headers: stringMapSchema.optional().describe(
|
|
15794
|
+
"Custom HTTP headers for http/sse transports. Do not include Authorization; use auth instead. Prefer templates for secret values."
|
|
15795
|
+
),
|
|
15796
|
+
env: stringMapSchema.optional().describe(
|
|
15797
|
+
"Environment variables for the MCP process/config. Prefer {{ user.env.VAR }} templates for secrets."
|
|
15798
|
+
),
|
|
15799
|
+
auth: mcpAuthInputSchema.optional(),
|
|
15800
|
+
scope: external_exports.enum(["global", "session"]).optional().describe(
|
|
15801
|
+
"Scope. Defaults to 'global' so it appears in agor_mcp_servers_list. 'session' is only for explicit session attachment workflows."
|
|
15802
|
+
),
|
|
15803
|
+
enabled: external_exports.boolean().optional().describe("Whether the server is enabled. Defaults to true."),
|
|
15804
|
+
attachToCurrentSession: external_exports.boolean().optional().describe(
|
|
15805
|
+
`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.`
|
|
15806
|
+
),
|
|
15807
|
+
attachToSessionId: mcpOptionalId(
|
|
15808
|
+
"attachToSessionId",
|
|
15809
|
+
"Session",
|
|
15810
|
+
"Optional session ID (UUIDv7 or short ID) to attach after creating. Overrides attachToCurrentSession."
|
|
15811
|
+
)
|
|
15812
|
+
}).superRefine((value, issue2) => validateMcpServerConfig(value, issue2, false));
|
|
15813
|
+
var mcpServerUpdateSchema = external_exports.strictObject({
|
|
15814
|
+
mcpServerId: mcpRequiredId(
|
|
15815
|
+
"mcpServerId",
|
|
15816
|
+
"MCP server",
|
|
15817
|
+
"MCP server ID to update (UUIDv7 or short ID)"
|
|
15818
|
+
),
|
|
15819
|
+
displayName: mcpOptionalNonEmptyString("displayName", "New human-friendly display name."),
|
|
15820
|
+
description: mcpOptionalString(
|
|
15821
|
+
"description",
|
|
15822
|
+
"New description. Pass an empty string to clear."
|
|
15823
|
+
),
|
|
15824
|
+
transport: external_exports.enum(["stdio", "http", "sse"]).optional().describe("Transport to set."),
|
|
15825
|
+
url: mcpOptionalString("url", "Remote MCP URL for http/sse transports."),
|
|
15826
|
+
command: mcpOptionalString("command", "Local command for stdio transport."),
|
|
15827
|
+
args: external_exports.array(external_exports.string()).optional().describe("Arguments for stdio command."),
|
|
15828
|
+
headers: stringMapSchema.optional().describe(
|
|
15829
|
+
"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."
|
|
15830
|
+
),
|
|
15831
|
+
env: stringMapSchema.optional().describe("Replace environment variables."),
|
|
15832
|
+
auth: mcpAuthInputSchema.optional().describe(
|
|
15833
|
+
"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."
|
|
15834
|
+
),
|
|
15835
|
+
scope: external_exports.enum(["global", "session"]).optional().describe("Scope to set."),
|
|
15836
|
+
enabled: external_exports.boolean().optional().describe("Enabled flag."),
|
|
15837
|
+
toolPermissions: toolPermissionsSchema.optional()
|
|
15838
|
+
}).superRefine((value, issue2) => validateMcpServerConfig(value, issue2, true));
|
|
15839
|
+
function validateHeaders(headers, issue2) {
|
|
15840
|
+
if (!headers) return;
|
|
15841
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
15842
|
+
const name = key.trim();
|
|
15843
|
+
if (!name) {
|
|
15844
|
+
issue2.addIssue({
|
|
15845
|
+
code: "custom",
|
|
15846
|
+
path: ["headers", key],
|
|
15847
|
+
message: "Header names cannot be empty."
|
|
15848
|
+
});
|
|
15849
|
+
} else if (!isValidMCPHeaderName(name)) {
|
|
15850
|
+
issue2.addIssue({
|
|
15851
|
+
code: "custom",
|
|
15852
|
+
path: ["headers", key],
|
|
15853
|
+
message: `Invalid HTTP header name: ${key}`
|
|
15854
|
+
});
|
|
15855
|
+
} else if (isReservedMCPCustomHeaderName(name)) {
|
|
15856
|
+
issue2.addIssue({
|
|
15857
|
+
code: "custom",
|
|
15858
|
+
path: ["headers", key],
|
|
15859
|
+
message: `Header ${name} is reserved; configure Authorization through auth instead.`
|
|
15860
|
+
});
|
|
15861
|
+
}
|
|
15862
|
+
if (typeof value !== "string") {
|
|
15863
|
+
issue2.addIssue({
|
|
15864
|
+
code: "custom",
|
|
15865
|
+
path: ["headers", key],
|
|
15866
|
+
message: "Header values must be strings."
|
|
15867
|
+
});
|
|
15868
|
+
}
|
|
15869
|
+
}
|
|
15870
|
+
}
|
|
15871
|
+
function validateMcpServerConfig(value, issue2, partial2) {
|
|
15872
|
+
const transport = value.transport ?? (value.url ? "http" : "stdio");
|
|
15873
|
+
validateHeaders(value.headers, issue2);
|
|
15874
|
+
if (!partial2 || value.transport !== void 0 || value.url !== void 0 || value.command !== void 0) {
|
|
15875
|
+
if (transport === "stdio") {
|
|
15876
|
+
if (!partial2 && !value.command) {
|
|
15877
|
+
issue2.addIssue({
|
|
15878
|
+
code: "custom",
|
|
15879
|
+
path: ["command"],
|
|
15880
|
+
message: "command is required for stdio transport."
|
|
15881
|
+
});
|
|
15882
|
+
}
|
|
15883
|
+
if (value.url) {
|
|
15884
|
+
issue2.addIssue({
|
|
15885
|
+
code: "custom",
|
|
15886
|
+
path: ["url"],
|
|
15887
|
+
message: "url only applies to http/sse transports, not stdio."
|
|
15888
|
+
});
|
|
15889
|
+
}
|
|
15890
|
+
if (value.headers) {
|
|
15891
|
+
issue2.addIssue({
|
|
15892
|
+
code: "custom",
|
|
15893
|
+
path: ["headers"],
|
|
15894
|
+
message: "headers only apply to http/sse transports, not stdio."
|
|
15895
|
+
});
|
|
15896
|
+
}
|
|
15897
|
+
if (value.auth && value.auth.type !== "none") {
|
|
15898
|
+
issue2.addIssue({
|
|
15899
|
+
code: "custom",
|
|
15900
|
+
path: ["auth", "type"],
|
|
15901
|
+
message: "Authentication config only applies to http/sse transports."
|
|
15902
|
+
});
|
|
15903
|
+
}
|
|
15904
|
+
} else if (!partial2 && !value.url) {
|
|
15905
|
+
issue2.addIssue({
|
|
15906
|
+
code: "custom",
|
|
15907
|
+
path: ["url"],
|
|
15908
|
+
message: `url is required for ${transport} transport.`
|
|
15909
|
+
});
|
|
15910
|
+
} else {
|
|
15911
|
+
if (value.command) {
|
|
15912
|
+
issue2.addIssue({
|
|
15913
|
+
code: "custom",
|
|
15914
|
+
path: ["command"],
|
|
15915
|
+
message: "command only applies to stdio transport, not http/sse."
|
|
15916
|
+
});
|
|
15917
|
+
}
|
|
15918
|
+
if (value.args && value.args.length > 0) {
|
|
15919
|
+
issue2.addIssue({
|
|
15920
|
+
code: "custom",
|
|
15921
|
+
path: ["args"],
|
|
15922
|
+
message: "args only apply to stdio transport, not http/sse."
|
|
15923
|
+
});
|
|
15924
|
+
}
|
|
15925
|
+
}
|
|
15926
|
+
}
|
|
15927
|
+
}
|
|
15928
|
+
|
|
15478
15929
|
// src/mcp/tools/messages.ts
|
|
15479
15930
|
import { isBranchRbacEnabled } from "@agor/core/config";
|
|
15480
15931
|
import {
|
|
@@ -15482,13 +15933,15 @@ import {
|
|
|
15482
15933
|
asc,
|
|
15483
15934
|
desc,
|
|
15484
15935
|
eq,
|
|
15485
|
-
|
|
15936
|
+
gte,
|
|
15937
|
+
lte,
|
|
15486
15938
|
messages as messagesTable,
|
|
15487
15939
|
or,
|
|
15488
|
-
SessionRepository as SessionRepository2,
|
|
15489
15940
|
select,
|
|
15490
|
-
sql
|
|
15941
|
+
sql,
|
|
15942
|
+
visibleSessionReferenceAccessExists
|
|
15491
15943
|
} from "@agor/core/db";
|
|
15944
|
+
var MAX_CROSS_SESSION_SEARCH_WINDOW_MS = 31 * 24 * 60 * 60 * 1e3;
|
|
15492
15945
|
|
|
15493
15946
|
// src/mcp/tools/proxies.ts
|
|
15494
15947
|
import { getBaseUrl, loadConfig, resolveProxies } from "@agor/core/config";
|
|
@@ -15503,7 +15956,7 @@ var agenticToolConfigSchema = external_exports.object({
|
|
|
15503
15956
|
model_config: external_exports.object({
|
|
15504
15957
|
mode: external_exports.enum(["alias", "exact"]).optional(),
|
|
15505
15958
|
model: mcpOptionalString("model_config.model", "Model name override."),
|
|
15506
|
-
effort: external_exports.enum(["low", "medium", "high", "max"]).optional(),
|
|
15959
|
+
effort: external_exports.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
|
|
15507
15960
|
advisorModel: mcpOptionalString(
|
|
15508
15961
|
"model_config.advisorModel",
|
|
15509
15962
|
"Claude Code advisor model override (e.g. 'opus', 'sonnet', 'fable')."
|
|
@@ -15519,7 +15972,7 @@ var agenticToolConfigSchema = external_exports.object({
|
|
|
15519
15972
|
|
|
15520
15973
|
// src/mcp/tools/sessions.ts
|
|
15521
15974
|
import {
|
|
15522
|
-
BranchRepository as
|
|
15975
|
+
BranchRepository as BranchRepository5,
|
|
15523
15976
|
SessionRelationshipRepository,
|
|
15524
15977
|
shortId as shortId4
|
|
15525
15978
|
} from "@agor/core/db";
|
|
@@ -15542,6 +15995,7 @@ import {
|
|
|
15542
15995
|
} from "@agor/core/types";
|
|
15543
15996
|
init_branch_inspect();
|
|
15544
15997
|
init_executor_read_impersonation();
|
|
15998
|
+
init_spawn_executor();
|
|
15545
15999
|
var modelConfigObjectSchema = external_exports.object({
|
|
15546
16000
|
mode: external_exports.enum(["alias", "exact"]).optional().describe("Model selection mode (default: 'alias')"),
|
|
15547
16001
|
// .min(1): reject empty-string model explicitly so callers don't silently
|
|
@@ -15550,7 +16004,7 @@ var modelConfigObjectSchema = external_exports.object({
|
|
|
15550
16004
|
"modelConfig.model",
|
|
15551
16005
|
"Model identifier (e.g. 'claude-opus-4-6', 'claude-sonnet-4-6')"
|
|
15552
16006
|
),
|
|
15553
|
-
effort: external_exports.enum(["low", "medium", "high", "max"]).optional().describe("Reasoning effort level (default: high)"),
|
|
16007
|
+
effort: external_exports.enum(["low", "medium", "high", "xhigh", "max"]).optional().describe("Reasoning effort level (default: high)"),
|
|
15554
16008
|
advisorModel: mcpOptionalString(
|
|
15555
16009
|
"modelConfig.advisorModel",
|
|
15556
16010
|
"Claude Code advisor model override (e.g. 'opus', 'sonnet', 'fable', or a full model ID)."
|
|
@@ -15571,7 +16025,7 @@ var modelConfigInputSchema = external_exports.union([
|
|
|
15571
16025
|
);
|
|
15572
16026
|
|
|
15573
16027
|
// src/mcp/tools/users.ts
|
|
15574
|
-
import { ROLES as
|
|
16028
|
+
import { ROLES as ROLES4 } from "@agor/core/types";
|
|
15575
16029
|
|
|
15576
16030
|
// src/mcp/tools/widgets.ts
|
|
15577
16031
|
import { MessageRole as MessageRole2 } from "@agor/core/types";
|
|
@@ -15584,9 +16038,20 @@ import { MessageRole } from "@agor/core/types";
|
|
|
15584
16038
|
import { EXECUTING_TASK_STATUSES, isTaskExecuting } from "@agor/core/types";
|
|
15585
16039
|
|
|
15586
16040
|
// src/widgets/env-vars/index.ts
|
|
15587
|
-
import {
|
|
16041
|
+
import {
|
|
16042
|
+
ENV_VAR_CONSTRAINTS,
|
|
16043
|
+
isEnvVarAllowed,
|
|
16044
|
+
validateEnvVar
|
|
16045
|
+
} from "@agor/core/config";
|
|
16046
|
+
import { SessionEnvSelectionRepository } from "@agor/core/db";
|
|
15588
16047
|
import { BadRequest } from "@agor/core/feathers";
|
|
15589
16048
|
var ENV_VAR_NAME_REGEX = ENV_VAR_CONSTRAINTS.NAME_PATTERN;
|
|
16049
|
+
var envVarFieldMetadataSchema = external_exports.object({
|
|
16050
|
+
description: external_exports.string().max(200).optional(),
|
|
16051
|
+
placeholder: external_exports.string().max(120).optional(),
|
|
16052
|
+
format_hint: external_exports.string().max(80).optional(),
|
|
16053
|
+
input_type: external_exports.enum(["password", "text", "textarea"]).default("password").optional()
|
|
16054
|
+
}).strict();
|
|
15590
16055
|
var envVarsParamsSchema = external_exports.object({
|
|
15591
16056
|
names: external_exports.array(external_exports.string().regex(ENV_VAR_NAME_REGEX)).min(1).max(10).refine((names) => new Set(names).size === names.length, {
|
|
15592
16057
|
message: "Env var names must be unique"
|
|
@@ -15594,18 +16059,56 @@ var envVarsParamsSchema = external_exports.object({
|
|
|
15594
16059
|
reason: external_exports.string().min(1).max(200).describe(
|
|
15595
16060
|
"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."
|
|
15596
16061
|
),
|
|
16062
|
+
variable_metadata: external_exports.record(external_exports.string().regex(ENV_VAR_NAME_REGEX), envVarFieldMetadataSchema).optional().describe(
|
|
16063
|
+
"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."
|
|
16064
|
+
),
|
|
15597
16065
|
auto_resume: external_exports.boolean().default(true).describe(
|
|
15598
16066
|
"When true (default), a system-authored prompt is auto-queued back into the agent on submit/dismiss."
|
|
15599
16067
|
)
|
|
16068
|
+
}).superRefine((params, ctx) => {
|
|
16069
|
+
const requested = new Set(params.names);
|
|
16070
|
+
for (const key of Object.keys(params.variable_metadata ?? {})) {
|
|
16071
|
+
if (!requested.has(key)) {
|
|
16072
|
+
ctx.addIssue({
|
|
16073
|
+
code: external_exports.ZodIssueCode.custom,
|
|
16074
|
+
path: ["variable_metadata", key],
|
|
16075
|
+
message: `Metadata key ${key} must match a requested env var name`
|
|
16076
|
+
});
|
|
16077
|
+
}
|
|
16078
|
+
}
|
|
15600
16079
|
});
|
|
15601
16080
|
var envVarsSubmitSchema = external_exports.object({
|
|
15602
16081
|
values: external_exports.record(
|
|
15603
16082
|
external_exports.string().regex(ENV_VAR_NAME_REGEX),
|
|
15604
16083
|
external_exports.string().min(1).max(ENV_VAR_CONSTRAINTS.MAX_VALUE_LENGTH)
|
|
15605
|
-
).
|
|
15606
|
-
|
|
15607
|
-
}),
|
|
16084
|
+
).default({}),
|
|
16085
|
+
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."),
|
|
15608
16086
|
scope: external_exports.enum(["global", "session"])
|
|
16087
|
+
}).superRefine((submit, ctx) => {
|
|
16088
|
+
const valueNames = Object.keys(submit.values);
|
|
16089
|
+
const existingNames = submit.use_existing;
|
|
16090
|
+
const total = valueNames.length + existingNames.length;
|
|
16091
|
+
if (total < 1 || total > 10) {
|
|
16092
|
+
ctx.addIssue({
|
|
16093
|
+
code: external_exports.ZodIssueCode.custom,
|
|
16094
|
+
message: "Must submit between 1 and 10 env vars"
|
|
16095
|
+
});
|
|
16096
|
+
}
|
|
16097
|
+
const duplicates = existingNames.filter((name) => valueNames.includes(name));
|
|
16098
|
+
for (const name of duplicates) {
|
|
16099
|
+
ctx.addIssue({
|
|
16100
|
+
code: external_exports.ZodIssueCode.custom,
|
|
16101
|
+
path: ["use_existing"],
|
|
16102
|
+
message: `Cannot both submit and use existing value for ${name}`
|
|
16103
|
+
});
|
|
16104
|
+
}
|
|
16105
|
+
if (new Set(existingNames).size !== existingNames.length) {
|
|
16106
|
+
ctx.addIssue({
|
|
16107
|
+
code: external_exports.ZodIssueCode.custom,
|
|
16108
|
+
path: ["use_existing"],
|
|
16109
|
+
message: "use_existing names must be unique"
|
|
16110
|
+
});
|
|
16111
|
+
}
|
|
15609
16112
|
});
|
|
15610
16113
|
|
|
15611
16114
|
// src/mcp/server.ts
|
|
@@ -15720,6 +16223,13 @@ function notesPreview(notes, maxLength = 200) {
|
|
|
15720
16223
|
if (singleLine.length <= maxLength) return singleLine;
|
|
15721
16224
|
return `${singleLine.slice(0, maxLength - 1)}\u2026`;
|
|
15722
16225
|
}
|
|
16226
|
+
async function shouldScopeAssistantDiscoveryToUser(ctx) {
|
|
16227
|
+
if (!isBranchRbacEnabled2()) return false;
|
|
16228
|
+
if (ctx.authenticatedUser?._isServiceAccount) return false;
|
|
16229
|
+
const config2 = await loadConfig2();
|
|
16230
|
+
const allowSuperadmin = config2.execution?.allow_superadmin === true;
|
|
16231
|
+
return !isSuperAdmin(ctx.authenticatedUser?.role, allowSuperadmin);
|
|
16232
|
+
}
|
|
15723
16233
|
async function findAllArchivedBranchesForCleanup(ctx, baseQuery) {
|
|
15724
16234
|
const branches = [];
|
|
15725
16235
|
let skip = 0;
|
|
@@ -16020,7 +16530,7 @@ function registerBranchTools(server, ctx) {
|
|
|
16020
16530
|
const variant = coerceString(args.variant);
|
|
16021
16531
|
if (variant) assertValidVariant(repo, variant);
|
|
16022
16532
|
if (autoSuffix) {
|
|
16023
|
-
const branchRepo = new
|
|
16533
|
+
const branchRepo = new BranchRepository6(ctx.db);
|
|
16024
16534
|
const activeNames = await branchRepo.getActiveNamesByRepo(repoId);
|
|
16025
16535
|
const existingNames = new Set(activeNames);
|
|
16026
16536
|
if (existingNames.has(branchName)) {
|
|
@@ -16092,7 +16602,7 @@ function registerBranchTools(server, ctx) {
|
|
|
16092
16602
|
server.registerTool(
|
|
16093
16603
|
"agor_branches_update",
|
|
16094
16604
|
{
|
|
16095
|
-
description: "Update metadata for an existing branch (issue/PR URLs, notes, board placement, custom context, RBAC permissions, owners)",
|
|
16605
|
+
description: "Update metadata for an existing branch (issue/PR URLs, notes, board placement, attention state, custom context, RBAC permissions, owners)",
|
|
16096
16606
|
annotations: { idempotentHint: true },
|
|
16097
16607
|
inputSchema: external_exports.object({
|
|
16098
16608
|
branchId: mcpOptionalId(
|
|
@@ -16114,6 +16624,9 @@ function registerBranchTools(server, ctx) {
|
|
|
16114
16624
|
mcpServerIds: external_exports.array(mcpRequiredId("mcpServerIds[]", "MCP server", "MCP server ID")).nullable().optional().describe(
|
|
16115
16625
|
"Default MCP server IDs for new sessions in this branch. Sessions inherit these unless they explicitly specify their own. Pass null to clear."
|
|
16116
16626
|
),
|
|
16627
|
+
needsAttention: external_exports.boolean({ error: "needsAttention must be a boolean when provided." }).optional().describe(
|
|
16628
|
+
"Branch/card attention highlight state. Pass true to mark the branch as needing attention, or false to clear it."
|
|
16629
|
+
),
|
|
16117
16630
|
// RBAC fields (optional, safe to ignore for single-user setups)
|
|
16118
16631
|
othersCan: external_exports.enum(BRANCH_PERMISSION_LEVELS2).optional().describe(
|
|
16119
16632
|
`App-layer permission for non-owner users. "none" = no access, "view" = read-only, "session" = can create & prompt own sessions, "prompt" = can prompt ANY session (including other users'), "all" = full access. Always effective regardless of Unix isolation mode. Single-user setups can ignore this.`
|
|
@@ -16178,6 +16691,10 @@ function registerBranchTools(server, ctx) {
|
|
|
16178
16691
|
fieldsProvided++;
|
|
16179
16692
|
updates.mcp_server_ids = args.mcpServerIds === null ? [] : await Promise.all(args.mcpServerIds.map((id) => resolveMcpServerId(ctx, id)));
|
|
16180
16693
|
}
|
|
16694
|
+
if (args.needsAttention !== void 0) {
|
|
16695
|
+
fieldsProvided++;
|
|
16696
|
+
updates.needs_attention = args.needsAttention;
|
|
16697
|
+
}
|
|
16181
16698
|
if (args.othersCan !== void 0) {
|
|
16182
16699
|
fieldsProvided++;
|
|
16183
16700
|
updates.others_can = args.othersCan;
|
|
@@ -16279,11 +16796,21 @@ function registerBranchTools(server, ctx) {
|
|
|
16279
16796
|
"triggerTemplate and targetSessionId cannot be used when zoneId is null; clearing a zone pin does not run zone triggers."
|
|
16280
16797
|
);
|
|
16281
16798
|
}
|
|
16282
|
-
const
|
|
16799
|
+
const targetSession = rawTargetSessionId ? await ctx.app.service("sessions").get(rawTargetSessionId, ctx.baseServiceParams) : void 0;
|
|
16800
|
+
const targetSessionId = targetSession?.session_id;
|
|
16283
16801
|
console.log(
|
|
16284
16802
|
zoneId === null ? `\u{1F4CD} MCP clearing zone pin for branch ${shortId6(branchId)}` : `\u{1F4CD} MCP pinning branch ${shortId6(branchId)} to zone ${zoneId}`
|
|
16285
16803
|
);
|
|
16286
16804
|
const branch = await ctx.app.service("branches").get(branchId, ctx.baseServiceParams);
|
|
16805
|
+
if (triggerTemplate && targetSession && targetSession.branch_id !== branch.branch_id) {
|
|
16806
|
+
throw new Error(
|
|
16807
|
+
`targetSessionId ${shortId6(targetSession.session_id)} belongs to branch ${shortId6(
|
|
16808
|
+
targetSession.branch_id
|
|
16809
|
+
)}, but agor_branches_set_zone is moving branch ${shortId6(
|
|
16810
|
+
branch.branch_id
|
|
16811
|
+
)}. Use a session in the moved branch or create a branch-local session first.`
|
|
16812
|
+
);
|
|
16813
|
+
}
|
|
16287
16814
|
const boardObjectsService = ctx.app.service("board-objects");
|
|
16288
16815
|
if (zoneId === null) {
|
|
16289
16816
|
const boardObject2 = await boardObjectsService.findByBranchId(
|
|
@@ -16347,12 +16874,6 @@ function registerBranchTools(server, ctx) {
|
|
|
16347
16874
|
console.log(`\u{1F3AF} Triggering zone prompt template for session ${shortId6(targetSessionId)}`);
|
|
16348
16875
|
const { renderTemplate: renderTemplate2 } = await import("@agor/core/templates/handlebars-helpers");
|
|
16349
16876
|
const { buildZoneTriggerContext: buildZoneTriggerContext2 } = await import("@agor/core/templates/zone-trigger-context");
|
|
16350
|
-
let targetSession;
|
|
16351
|
-
try {
|
|
16352
|
-
targetSession = await ctx.app.service("sessions").get(targetSessionId, ctx.baseServiceParams);
|
|
16353
|
-
} catch {
|
|
16354
|
-
targetSession = void 0;
|
|
16355
|
-
}
|
|
16356
16877
|
const templateContext = buildZoneTriggerContext2({
|
|
16357
16878
|
branch,
|
|
16358
16879
|
board,
|
|
@@ -16552,11 +17073,15 @@ function registerBranchTools(server, ctx) {
|
|
|
16552
17073
|
})
|
|
16553
17074
|
},
|
|
16554
17075
|
async (args) => {
|
|
16555
|
-
const
|
|
16556
|
-
|
|
16557
|
-
const
|
|
16558
|
-
const
|
|
16559
|
-
|
|
17076
|
+
const limit = args.limit || 200;
|
|
17077
|
+
const repoId = args.repoId ? await resolveRepoId(ctx, args.repoId) : void 0;
|
|
17078
|
+
const branchRepo = new BranchRepository6(ctx.db);
|
|
17079
|
+
const assistants = await branchRepo.findAssistantBranches({
|
|
17080
|
+
archived: false,
|
|
17081
|
+
...repoId ? { repo_id: repoId } : {},
|
|
17082
|
+
...await shouldScopeAssistantDiscoveryToUser(ctx) ? { userId: ctx.userId } : {},
|
|
17083
|
+
limit
|
|
17084
|
+
});
|
|
16560
17085
|
const shaped = assistants.map((w) => {
|
|
16561
17086
|
const config2 = getAssistantConfig3(w);
|
|
16562
17087
|
return {
|