agor-live 0.22.0 → 0.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/admin/add-to-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/add-to-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/add-to-branch-group.js +133 -33
- package/dist/cli/commands/admin/create-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/create-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/create-branch-group.js +132 -38
- package/dist/cli/commands/admin/create-symlink.d.ts +2 -14
- package/dist/cli/commands/admin/create-symlink.d.ts.map +1 -1
- package/dist/cli/commands/admin/create-symlink.js +138 -61
- package/dist/cli/commands/admin/delete-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/delete-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/delete-branch-group.js +132 -28
- package/dist/cli/commands/admin/delete-user.d.ts +2 -13
- package/dist/cli/commands/admin/delete-user.d.ts.map +1 -1
- package/dist/cli/commands/admin/delete-user.js +132 -38
- package/dist/cli/commands/admin/ensure-user.d.ts +2 -14
- package/dist/cli/commands/admin/ensure-user.d.ts.map +1 -1
- package/dist/cli/commands/admin/ensure-user.js +131 -46
- package/dist/cli/commands/admin/remove-from-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/remove-from-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/remove-from-branch-group.js +133 -33
- package/dist/cli/commands/admin/remove-symlink.d.ts +2 -14
- package/dist/cli/commands/admin/remove-symlink.d.ts.map +1 -1
- package/dist/cli/commands/admin/remove-symlink.js +136 -49
- package/dist/cli/commands/admin/scrub-git-remotes.d.ts +2 -2
- package/dist/cli/commands/admin/scrub-git-remotes.d.ts.map +1 -1
- package/dist/cli/commands/admin/scrub-git-remotes.js +128 -86
- package/dist/cli/commands/admin/sync-user-symlinks.d.ts +2 -14
- package/dist/cli/commands/admin/sync-user-symlinks.d.ts.map +1 -1
- package/dist/cli/commands/admin/sync-user-symlinks.js +132 -43
- package/dist/cli/commands/auth/whoami.d.ts.map +1 -1
- package/dist/cli/commands/auth/whoami.js +2 -1
- package/dist/cli/commands/branch/env/request.test.d.ts +2 -0
- package/dist/cli/commands/branch/env/request.test.d.ts.map +1 -0
- package/dist/cli/commands/branch/env/request.test.js +17723 -0
- package/dist/cli/commands/branch/env/restart.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/restart.js +7 -1
- package/dist/cli/commands/branch/env/start.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/start.js +7 -1
- package/dist/cli/commands/branch/env/stop.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/stop.js +7 -1
- package/dist/cli/commands/daemon/status.d.ts.map +1 -1
- package/dist/cli/commands/daemon/status.js +2 -1
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +140 -2
- package/dist/cli/commands/local/add-to-branch-group.d.ts +13 -0
- package/dist/cli/commands/local/add-to-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/add-to-branch-group.js +37 -0
- package/dist/cli/commands/local/create-branch-group.d.ts +12 -0
- package/dist/cli/commands/local/create-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/create-branch-group.js +35 -0
- package/dist/cli/commands/local/create-symlink.d.ts +14 -0
- package/dist/cli/commands/local/create-symlink.d.ts.map +1 -0
- package/dist/cli/commands/local/create-symlink.js +45 -0
- package/dist/cli/commands/{daemon → local/daemon}/sync.d.ts +1 -1
- package/dist/cli/commands/local/daemon/sync.d.ts.map +1 -0
- package/dist/cli/commands/{daemon → local/daemon}/sync.js +7 -6
- package/dist/cli/commands/local/delete-branch-group.d.ts +12 -0
- package/dist/cli/commands/local/delete-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/delete-branch-group.js +35 -0
- package/dist/cli/commands/local/delete-user.d.ts +12 -0
- package/dist/cli/commands/local/delete-user.d.ts.map +1 -0
- package/dist/cli/commands/local/delete-user.js +36 -0
- package/dist/cli/commands/local/ensure-user.d.ts +12 -0
- package/dist/cli/commands/local/ensure-user.d.ts.map +1 -0
- package/dist/cli/commands/local/ensure-user.js +41 -0
- package/dist/cli/commands/local/remove-from-branch-group.d.ts +13 -0
- package/dist/cli/commands/local/remove-from-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/remove-from-branch-group.js +37 -0
- package/dist/cli/commands/local/remove-symlink.d.ts +13 -0
- package/dist/cli/commands/local/remove-symlink.d.ts.map +1 -0
- package/dist/cli/commands/local/remove-symlink.js +39 -0
- package/dist/cli/commands/local/scrub-git-remotes.d.ts +9 -0
- package/dist/cli/commands/local/scrub-git-remotes.d.ts.map +1 -0
- package/dist/cli/commands/local/scrub-git-remotes.js +23 -0
- package/dist/cli/commands/{admin → local}/sync-unix.d.ts.map +1 -1
- package/dist/cli/commands/{admin → local}/sync-unix.js +3 -3
- package/dist/cli/commands/local/sync-user-symlinks.d.ts +12 -0
- package/dist/cli/commands/local/sync-user-symlinks.d.ts.map +1 -0
- package/dist/cli/commands/local/sync-user-symlinks.js +37 -0
- package/dist/cli/commands/telemetry/index.d.ts +7 -0
- package/dist/cli/commands/telemetry/index.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/index.js +40 -0
- package/dist/cli/commands/telemetry/off.d.ts +6 -0
- package/dist/cli/commands/telemetry/off.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/off.js +35 -0
- package/dist/cli/commands/telemetry/on.d.ts +6 -0
- package/dist/cli/commands/telemetry/on.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/on.js +37 -0
- package/dist/cli/commands/telemetry/test.d.ts +6 -0
- package/dist/cli/commands/telemetry/test.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/test.js +56 -0
- package/dist/cli/commands/user/create-admin.d.ts.map +1 -1
- package/dist/cli/commands/user/create-admin.js +81 -72
- package/dist/cli/commands/user/list.d.ts.map +1 -1
- package/dist/cli/commands/user/list.js +1 -0
- package/dist/cli/commands/whoami.js +2 -1
- package/dist/cli/lib/branch-environment-action.d.ts +21 -0
- package/dist/cli/lib/branch-environment-action.d.ts.map +1 -0
- package/dist/cli/lib/branch-environment-action.js +8 -0
- package/dist/core/api/index.cjs +7 -2
- package/dist/core/api/index.d.ts +13 -4
- package/dist/core/api/index.d.ts.map +1 -1
- package/dist/core/api/index.js +7 -2
- package/dist/core/claude/index.cjs +518 -89
- package/dist/core/claude/index.js +515 -88
- package/dist/core/claude-cli/index.cjs +24 -0
- package/dist/core/claude-cli/index.js +24 -0
- package/dist/core/claude-cli/pricing.d.ts.map +1 -1
- package/dist/core/client/index.cjs +52 -7
- package/dist/core/client/index.js +48 -7
- package/dist/core/config/browser.cjs +3 -5
- package/dist/core/config/browser.js +3 -5
- package/dist/core/config/config-manager.d.ts +33 -13
- package/dist/core/config/config-manager.d.ts.map +1 -1
- package/dist/core/config/index.cjs +4259 -4527
- package/dist/core/config/index.d.ts +1 -0
- package/dist/core/config/index.d.ts.map +1 -1
- package/dist/core/config/index.js +4295 -4583
- package/dist/core/config/key-resolver.d.ts.map +1 -1
- package/dist/core/config/multitenancy.d.ts +33 -0
- package/dist/core/config/multitenancy.d.ts.map +1 -0
- package/dist/core/config/security-resolver.d.ts +1 -0
- package/dist/core/config/security-resolver.d.ts.map +1 -1
- package/dist/core/config/types.d.ts +67 -4
- package/dist/core/config/types.d.ts.map +1 -1
- package/dist/core/db/client.d.ts +34 -2
- package/dist/core/db/client.d.ts.map +1 -1
- package/dist/core/db/database-wrapper.d.ts.map +1 -1
- package/dist/core/db/first-run-bootstrap.d.ts.map +1 -1
- package/dist/core/db/index.cjs +2767 -1232
- package/dist/core/db/index.d.ts +2 -1
- package/dist/core/db/index.d.ts.map +1 -1
- package/dist/core/db/index.js +2601 -1094
- package/dist/core/db/migrate.d.ts.map +1 -1
- package/dist/core/db/repositories/artifacts.d.ts +27 -2
- package/dist/core/db/repositories/artifacts.d.ts.map +1 -1
- package/dist/core/db/repositories/base.d.ts +18 -0
- package/dist/core/db/repositories/base.d.ts.map +1 -1
- package/dist/core/db/repositories/board-comments.d.ts +17 -1
- package/dist/core/db/repositories/board-comments.d.ts.map +1 -1
- package/dist/core/db/repositories/board-objects.d.ts.map +1 -1
- package/dist/core/db/repositories/boards.d.ts +54 -3
- package/dist/core/db/repositories/boards.d.ts.map +1 -1
- package/dist/core/db/repositories/branch-access.d.ts +32 -0
- package/dist/core/db/repositories/branch-access.d.ts.map +1 -1
- package/dist/core/db/repositories/branches.d.ts +52 -2
- package/dist/core/db/repositories/branches.d.ts.map +1 -1
- package/dist/core/db/repositories/cards.d.ts +15 -1
- package/dist/core/db/repositories/cards.d.ts.map +1 -1
- package/dist/core/db/repositories/gateway-channels.d.ts +9 -0
- package/dist/core/db/repositories/gateway-channels.d.ts.map +1 -1
- package/dist/core/db/repositories/gateway-outbound-messages.d.ts +19 -0
- package/dist/core/db/repositories/gateway-outbound-messages.d.ts.map +1 -0
- package/dist/core/db/repositories/index.d.ts +2 -0
- package/dist/core/db/repositories/index.d.ts.map +1 -1
- package/dist/core/db/repositories/messages.d.ts +9 -2
- package/dist/core/db/repositories/messages.d.ts.map +1 -1
- package/dist/core/db/repositories/repos.d.ts.map +1 -1
- package/dist/core/db/repositories/schedules.d.ts +12 -1
- package/dist/core/db/repositories/schedules.d.ts.map +1 -1
- package/dist/core/db/repositories/sessions.d.ts +56 -5
- package/dist/core/db/repositories/sessions.d.ts.map +1 -1
- package/dist/core/db/repositories/tasks.d.ts +7 -2
- package/dist/core/db/repositories/tasks.d.ts.map +1 -1
- package/dist/core/db/repositories/user-api-keys.d.ts +10 -1
- package/dist/core/db/repositories/user-api-keys.d.ts.map +1 -1
- package/dist/core/db/repositories/users.d.ts +8 -8
- package/dist/core/db/repositories/users.d.ts.map +1 -1
- package/dist/core/db/schema.d.ts +1460 -38
- package/dist/core/db/schema.d.ts.map +1 -1
- package/dist/core/db/schema.postgres.d.ts +1082 -37
- package/dist/core/db/schema.postgres.d.ts.map +1 -1
- package/dist/core/db/schema.sqlite.d.ts +397 -1
- package/dist/core/db/schema.sqlite.d.ts.map +1 -1
- package/dist/core/db/tenant-context.d.ts +26 -0
- package/dist/core/db/tenant-context.d.ts.map +1 -0
- package/dist/core/db/tenant-scope.d.ts +31 -0
- package/dist/core/db/tenant-scope.d.ts.map +1 -0
- package/dist/core/db/user-utils.d.ts +2 -2
- package/dist/core/db/user-utils.d.ts.map +1 -1
- package/dist/core/drizzle/postgres/0052_gateway_outbound_messages.sql +45 -0
- package/dist/core/drizzle/postgres/0053_user_token_invalidation.sql +1 -0
- package/dist/core/drizzle/postgres/0054_app_level_multitenancy.sql +219 -0
- package/dist/core/drizzle/postgres/0055_app_level_multitenancy_rls.sql +411 -0
- package/dist/core/drizzle/postgres/0056_composite_indexes.sql +15 -0
- package/dist/core/drizzle/postgres/0057_message_timestamp_indexes.sql +3 -0
- package/dist/core/drizzle/postgres/meta/_journal.json +42 -0
- package/dist/core/drizzle/sqlite/0061_gateway_outbound_messages.sql +38 -0
- package/dist/core/drizzle/sqlite/0062_user_token_invalidation.sql +1 -0
- package/dist/core/drizzle/sqlite/0063_composite_indexes.sql +10 -0
- package/dist/core/drizzle/sqlite/0064_message_timestamp_indexes.sql +2 -0
- package/dist/core/drizzle/sqlite/meta/_journal.json +28 -0
- package/dist/core/environment/render-snapshot.cjs +7 -6
- package/dist/core/environment/render-snapshot.d.ts +2 -0
- package/dist/core/environment/render-snapshot.d.ts.map +1 -1
- package/dist/core/environment/render-snapshot.js +7 -6
- package/dist/core/environment/variable-resolver.cjs +3 -1
- package/dist/core/environment/variable-resolver.js +3 -1
- package/dist/core/environment/webhook.cjs +1 -4
- package/dist/core/environment/webhook.js +1 -4
- package/dist/core/gateway/connector.d.ts +10 -1
- package/dist/core/gateway/connector.d.ts.map +1 -1
- package/dist/core/gateway/connectors/slack-manifest.cjs +108 -0
- package/dist/core/gateway/connectors/slack-manifest.d.ts +85 -0
- package/dist/core/gateway/connectors/slack-manifest.d.ts.map +1 -0
- package/dist/core/gateway/connectors/slack-manifest.js +81 -0
- package/dist/core/gateway/connectors/slack.d.ts +101 -4
- package/dist/core/gateway/connectors/slack.d.ts.map +1 -1
- package/dist/core/gateway/index.cjs +495 -29
- package/dist/core/gateway/index.d.ts +4 -1
- package/dist/core/gateway/index.d.ts.map +1 -1
- package/dist/core/gateway/index.js +490 -28
- package/dist/core/gateway/system-message.d.ts.map +1 -1
- package/dist/core/git/exec.cjs +24 -0
- package/dist/core/git/exec.d.ts +6 -4
- package/dist/core/git/exec.d.ts.map +1 -1
- package/dist/core/git/exec.js +2 -0
- package/dist/core/git/index.cjs +3 -1363
- package/dist/core/git/index.d.ts +4 -614
- package/dist/core/git/index.d.ts.map +1 -1
- package/dist/core/git/index.js +1 -1304
- package/dist/core/git/pure.cjs +24 -0
- package/dist/core/git/pure.d.ts +2 -27
- package/dist/core/git/pure.d.ts.map +1 -1
- package/dist/core/git/pure.js +2 -0
- package/dist/core/index.cjs +11563 -10832
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +12203 -10962
- package/dist/core/lib/feathers-validation.cjs +9 -1
- package/dist/core/lib/feathers-validation.d.ts +2 -0
- package/dist/core/lib/feathers-validation.d.ts.map +1 -1
- package/dist/core/lib/feathers-validation.js +9 -1
- package/dist/core/local-actions/git-remotes.d.ts +7 -0
- package/dist/core/local-actions/git-remotes.d.ts.map +1 -0
- package/dist/core/local-actions/index.cjs +8008 -0
- package/dist/core/local-actions/index.d.ts +6 -0
- package/dist/core/local-actions/index.d.ts.map +1 -0
- package/dist/core/local-actions/index.js +8010 -0
- package/dist/core/local-actions/symlinks.d.ts +20 -0
- package/dist/core/local-actions/symlinks.d.ts.map +1 -0
- package/dist/core/local-actions/types.d.ts +14 -0
- package/dist/core/local-actions/types.d.ts.map +1 -0
- package/dist/core/local-actions/unix-groups.d.ts +16 -0
- package/dist/core/local-actions/unix-groups.d.ts.map +1 -0
- package/dist/core/local-actions/unix-users.d.ts +12 -0
- package/dist/core/local-actions/unix-users.d.ts.map +1 -0
- package/dist/core/mcp/index.cjs +373 -28
- package/dist/core/mcp/index.d.ts +1 -1
- package/dist/core/mcp/index.d.ts.map +1 -1
- package/dist/core/mcp/index.js +369 -27
- package/dist/core/mcp/template-patterns.d.ts +15 -0
- package/dist/core/mcp/template-patterns.d.ts.map +1 -0
- package/dist/core/mcp/template-resolver.d.ts +13 -0
- package/dist/core/mcp/template-resolver.d.ts.map +1 -1
- package/dist/core/models/browser.cjs +154 -25
- package/dist/core/models/browser.js +150 -25
- package/dist/core/models/claude.d.ts +2 -2
- package/dist/core/models/claude.d.ts.map +1 -1
- package/dist/core/models/codex.d.ts +205 -21
- package/dist/core/models/codex.d.ts.map +1 -1
- package/dist/core/models/index.cjs +154 -25
- package/dist/core/models/index.js +150 -25
- package/dist/core/package.json +24 -0
- package/dist/core/seed/demo-fixtures.d.ts +87 -0
- package/dist/core/seed/demo-fixtures.d.ts.map +1 -0
- package/dist/core/seed/dev-fixtures.d.ts.map +1 -1
- package/dist/core/seed/index.cjs +8569 -5519
- package/dist/core/seed/index.d.ts +1 -0
- package/dist/core/seed/index.d.ts.map +1 -1
- package/dist/core/seed/index.js +8580 -5535
- package/dist/core/sessions/index.cjs +110 -24
- package/dist/core/sessions/index.js +110 -24
- package/dist/core/telemetry/index.cjs +361 -0
- package/dist/core/telemetry/index.d.ts +5 -0
- package/dist/core/telemetry/index.d.ts.map +1 -0
- package/dist/core/telemetry/index.js +315 -0
- package/dist/core/telemetry/logger.d.ts +44 -0
- package/dist/core/telemetry/logger.d.ts.map +1 -0
- package/dist/core/telemetry/model-normalization.d.ts +3 -0
- package/dist/core/telemetry/model-normalization.d.ts.map +1 -0
- package/dist/core/telemetry/types.d.ts +47 -0
- package/dist/core/telemetry/types.d.ts.map +1 -0
- package/dist/core/telemetry/version.d.ts +9 -0
- package/dist/core/telemetry/version.d.ts.map +1 -0
- package/dist/core/templates/agor-system-prompt.md +1 -0
- package/dist/core/templates/handlebars-helpers.cjs +3 -1
- package/dist/core/templates/handlebars-helpers.d.ts +5 -0
- package/dist/core/templates/handlebars-helpers.d.ts.map +1 -1
- package/dist/core/templates/handlebars-helpers.js +3 -1
- package/dist/core/tools/mcp/auth-secrets.cjs +3460 -3
- package/dist/core/tools/mcp/auth-secrets.d.ts.map +1 -1
- package/dist/core/tools/mcp/auth-secrets.js +3477 -3
- package/dist/core/tools/mcp/http-headers.cjs +17 -1
- package/dist/core/tools/mcp/http-headers.d.ts.map +1 -1
- package/dist/core/tools/mcp/http-headers.js +15 -1
- package/dist/core/tools/mcp/oauth-refresh.cjs +568 -114
- package/dist/core/tools/mcp/oauth-refresh.js +566 -115
- package/dist/core/types/board.d.ts +14 -0
- package/dist/core/types/board.d.ts.map +1 -1
- package/dist/core/types/branch.d.ts +13 -0
- package/dist/core/types/branch.d.ts.map +1 -1
- package/dist/core/types/config-services.d.ts.map +1 -1
- package/dist/core/types/feathers.d.ts +6 -0
- package/dist/core/types/feathers.d.ts.map +1 -1
- package/dist/core/types/gateway.d.ts +90 -1
- package/dist/core/types/gateway.d.ts.map +1 -1
- package/dist/core/types/index.cjs +42 -0
- package/dist/core/types/index.d.ts +1 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/index.js +38 -0
- package/dist/core/types/schedule.d.ts +4 -3
- package/dist/core/types/schedule.d.ts.map +1 -1
- package/dist/core/types/session.d.ts +7 -1
- package/dist/core/types/session.d.ts.map +1 -1
- package/dist/core/types/tenant.d.ts +15 -0
- package/dist/core/types/tenant.d.ts.map +1 -0
- package/dist/core/types/user.d.ts +61 -0
- package/dist/core/types/user.d.ts.map +1 -1
- package/dist/core/unix/index.cjs +1123 -674
- package/dist/core/unix/index.js +1071 -624
- package/dist/core/utils/emoji-shortcodes.d.ts +13 -0
- package/dist/core/utils/emoji-shortcodes.d.ts.map +1 -0
- package/dist/core/yaml/index.cjs +8 -8
- package/dist/core/yaml/index.d.ts +1 -1
- package/dist/core/yaml/index.d.ts.map +1 -1
- package/dist/core/yaml/index.js +7 -7
- package/dist/daemon/adapters/drizzle.d.ts +26 -4
- package/dist/daemon/adapters/drizzle.d.ts.map +1 -1
- package/dist/daemon/adapters/drizzle.js +68 -7
- package/dist/daemon/auth/api-key-strategy.js +1 -1
- package/dist/daemon/auth/executor-runtime-scope.d.ts.map +1 -1
- package/dist/daemon/auth/executor-runtime-scope.js +34 -6
- package/dist/daemon/auth/executor-session-token.d.ts +15 -0
- package/dist/daemon/auth/executor-session-token.d.ts.map +1 -0
- package/dist/daemon/auth/executor-session-token.js +17 -0
- package/dist/daemon/auth/issue-browser-tokens-hook.d.ts +24 -0
- package/dist/daemon/auth/issue-browser-tokens-hook.d.ts.map +1 -0
- package/dist/daemon/auth/issue-browser-tokens-hook.js +95 -0
- package/dist/daemon/auth/launch-auth.d.ts +5 -4
- package/dist/daemon/auth/launch-auth.d.ts.map +1 -1
- package/dist/daemon/auth/launch-auth.js +123 -39
- package/dist/daemon/auth/refresh-token-service.d.ts +22 -0
- package/dist/daemon/auth/refresh-token-service.d.ts.map +1 -0
- package/dist/daemon/auth/refresh-token-service.js +133 -0
- package/dist/daemon/auth/runtime-tokens.d.ts +3 -1
- package/dist/daemon/auth/runtime-tokens.d.ts.map +1 -1
- package/dist/daemon/auth/runtime-tokens.js +17 -4
- package/dist/daemon/auth/service-jwt-strategy.d.ts +2 -1
- package/dist/daemon/auth/service-jwt-strategy.d.ts.map +1 -1
- package/dist/daemon/auth/service-jwt-strategy.js +141 -3
- package/dist/daemon/auth/token-invalidation.d.ts +11 -0
- package/dist/daemon/auth/token-invalidation.d.ts.map +1 -0
- package/dist/daemon/auth/token-invalidation.js +38 -0
- package/dist/daemon/auth/user-redaction.d.ts +12 -0
- package/dist/daemon/auth/user-redaction.d.ts.map +1 -0
- package/dist/daemon/auth/user-redaction.js +13 -0
- package/dist/daemon/declarations.d.ts +5 -4
- package/dist/daemon/declarations.d.ts.map +1 -1
- package/dist/daemon/hooks/gateway-route.d.ts.map +1 -1
- package/dist/daemon/hooks/gateway-route.js +23 -13
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +8271 -2956
- package/dist/daemon/knowledge/pgvector.d.ts +3 -3
- package/dist/daemon/knowledge/pgvector.d.ts.map +1 -1
- package/dist/daemon/knowledge/pgvector.js +24 -0
- package/dist/daemon/knowledge/units.d.ts +2 -2
- package/dist/daemon/knowledge/units.d.ts.map +1 -1
- package/dist/daemon/main.js +8271 -2956
- package/dist/daemon/mcp/server.d.ts +3 -3
- package/dist/daemon/mcp/server.d.ts.map +1 -1
- package/dist/daemon/mcp/server.js +1740 -81
- package/dist/daemon/mcp/tokens.d.ts +2 -2
- package/dist/daemon/mcp/tokens.d.ts.map +1 -1
- package/dist/daemon/mcp/tokens.js +5 -1
- package/dist/daemon/mcp/tool-registry.d.ts.map +1 -1
- package/dist/daemon/mcp/tool-registry.js +1 -0
- package/dist/daemon/mcp/tools/analytics.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/analytics.js +598 -24
- package/dist/daemon/mcp/tools/artifacts.js +560 -20
- package/dist/daemon/mcp/tools/boards.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/boards.js +567 -21
- package/dist/daemon/mcp/tools/branches.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/branches.js +624 -50
- package/dist/daemon/mcp/tools/card-types.js +558 -18
- package/dist/daemon/mcp/tools/cards.js +558 -18
- package/dist/daemon/mcp/tools/environment.js +566 -18
- package/dist/daemon/mcp/tools/gateway-channels.d.ts +4 -0
- package/dist/daemon/mcp/tools/gateway-channels.d.ts.map +1 -0
- package/dist/daemon/mcp/tools/gateway-channels.js +16187 -0
- package/dist/daemon/mcp/tools/knowledge.js +558 -18
- package/dist/daemon/mcp/tools/mcp-servers.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/mcp-servers.js +893 -18
- package/dist/daemon/mcp/tools/messages.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/messages.js +618 -32
- package/dist/daemon/mcp/tools/proxies.js +568 -20
- package/dist/daemon/mcp/tools/repos.js +558 -18
- package/dist/daemon/mcp/tools/schedules.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/schedules.js +561 -19
- package/dist/daemon/mcp/tools/search.js +558 -18
- package/dist/daemon/mcp/tools/sessions.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/sessions.js +571 -24
- package/dist/daemon/mcp/tools/tasks.js +558 -18
- package/dist/daemon/mcp/tools/users.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/users.js +577 -23
- package/dist/daemon/mcp/tools/widgets.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/widgets.js +759 -83
- package/dist/daemon/oauth-auth-helpers.d.ts +35 -0
- package/dist/daemon/oauth-auth-helpers.d.ts.map +1 -0
- package/dist/daemon/oauth-auth-helpers.js +14 -0
- package/dist/daemon/register-hooks.d.ts +4 -2
- package/dist/daemon/register-hooks.d.ts.map +1 -1
- package/dist/daemon/register-hooks.js +1158 -595
- package/dist/daemon/register-routes.d.ts +3 -2
- package/dist/daemon/register-routes.d.ts.map +1 -1
- package/dist/daemon/register-routes.js +3161 -812
- package/dist/daemon/register-services.d.ts +2 -2
- package/dist/daemon/register-services.d.ts.map +1 -1
- package/dist/daemon/register-services.js +2782 -739
- package/dist/daemon/services/artifacts.d.ts +34 -6
- package/dist/daemon/services/artifacts.d.ts.map +1 -1
- package/dist/daemon/services/artifacts.js +109 -8
- package/dist/daemon/services/assistant-knowledge.d.ts +2 -2
- package/dist/daemon/services/assistant-knowledge.d.ts.map +1 -1
- package/dist/daemon/services/board-comments.d.ts +8 -5
- package/dist/daemon/services/board-comments.d.ts.map +1 -1
- package/dist/daemon/services/board-comments.js +78 -13
- package/dist/daemon/services/board-objects.d.ts +8 -5
- package/dist/daemon/services/board-objects.d.ts.map +1 -1
- package/dist/daemon/services/board-objects.js +14 -4
- package/dist/daemon/services/boards.d.ts +39 -5
- package/dist/daemon/services/boards.d.ts.map +1 -1
- package/dist/daemon/services/boards.js +123 -8
- package/dist/daemon/services/branch-owners.d.ts +3 -1
- package/dist/daemon/services/branch-owners.d.ts.map +1 -1
- package/dist/daemon/services/branch-owners.js +31 -4
- package/dist/daemon/services/branches.d.ts +31 -8
- package/dist/daemon/services/branches.d.ts.map +1 -1
- package/dist/daemon/services/branches.js +272 -36
- package/dist/daemon/services/card-types.d.ts +3 -3
- package/dist/daemon/services/card-types.d.ts.map +1 -1
- package/dist/daemon/services/card-types.js +68 -7
- package/dist/daemon/services/cards.d.ts +19 -4
- package/dist/daemon/services/cards.d.ts.map +1 -1
- package/dist/daemon/services/cards.js +92 -8
- package/dist/daemon/services/check-auth.d.ts +2 -2
- package/dist/daemon/services/check-auth.d.ts.map +1 -1
- package/dist/daemon/services/claude-cli-integration.d.ts +4 -1
- package/dist/daemon/services/claude-cli-integration.d.ts.map +1 -1
- package/dist/daemon/services/claude-cli-integration.js +117 -65
- package/dist/daemon/services/claude-models.d.ts +3 -3
- package/dist/daemon/services/claude-models.d.ts.map +1 -1
- package/dist/daemon/services/claude-models.js +387 -273
- package/dist/daemon/services/config.d.ts +12 -4
- package/dist/daemon/services/config.d.ts.map +1 -1
- package/dist/daemon/services/config.js +39 -3
- package/dist/daemon/services/copilot-models.d.ts +3 -3
- package/dist/daemon/services/copilot-models.d.ts.map +1 -1
- package/dist/daemon/services/cursor-models.d.ts +3 -3
- package/dist/daemon/services/cursor-models.d.ts.map +1 -1
- package/dist/daemon/services/files.d.ts +3 -3
- package/dist/daemon/services/files.d.ts.map +1 -1
- package/dist/daemon/services/files.js +24 -5
- package/dist/daemon/services/gateway-channels-test.d.ts +24 -0
- package/dist/daemon/services/gateway-channels-test.d.ts.map +1 -0
- package/dist/daemon/services/gateway-channels-test.js +66 -0
- package/dist/daemon/services/gateway-channels.d.ts +3 -3
- package/dist/daemon/services/gateway-channels.d.ts.map +1 -1
- package/dist/daemon/services/gateway-channels.js +68 -7
- package/dist/daemon/services/gateway.d.ts +63 -3
- package/dist/daemon/services/gateway.d.ts.map +1 -1
- package/dist/daemon/services/gateway.js +640 -60
- package/dist/daemon/services/github-app-setup.d.ts +3 -3
- package/dist/daemon/services/github-app-setup.d.ts.map +1 -1
- package/dist/daemon/services/groups.d.ts +5 -5
- package/dist/daemon/services/groups.d.ts.map +1 -1
- package/dist/daemon/services/health-monitor.d.ts +34 -2
- package/dist/daemon/services/health-monitor.d.ts.map +1 -1
- package/dist/daemon/services/health-monitor.js +155 -30
- package/dist/daemon/services/knowledge-document-edits.d.ts +3 -3
- package/dist/daemon/services/knowledge-document-edits.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-documents.d.ts +3 -3
- package/dist/daemon/services/knowledge-documents.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-documents.js +92 -7
- package/dist/daemon/services/knowledge-embedding-indexer.d.ts +7 -2
- package/dist/daemon/services/knowledge-embedding-indexer.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-embedding-indexer.js +37 -3
- package/dist/daemon/services/knowledge-graph.d.ts +3 -3
- package/dist/daemon/services/knowledge-graph.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-indexing.d.ts +3 -3
- package/dist/daemon/services/knowledge-indexing.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-namespaces.d.ts +3 -3
- package/dist/daemon/services/knowledge-namespaces.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-namespaces.js +72 -8
- package/dist/daemon/services/knowledge-reindex.d.ts +3 -3
- package/dist/daemon/services/knowledge-reindex.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-reindex.js +28 -1
- package/dist/daemon/services/knowledge-search.d.ts +3 -3
- package/dist/daemon/services/knowledge-search.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-settings.d.ts +3 -3
- package/dist/daemon/services/knowledge-settings.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-settings.js +24 -0
- package/dist/daemon/services/knowledge-versions.d.ts +3 -3
- package/dist/daemon/services/knowledge-versions.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-versions.js +68 -7
- package/dist/daemon/services/leaderboard.d.ts +14 -6
- package/dist/daemon/services/leaderboard.d.ts.map +1 -1
- package/dist/daemon/services/leaderboard.js +74 -15
- package/dist/daemon/services/local-actions.d.ts +13 -0
- package/dist/daemon/services/local-actions.d.ts.map +1 -0
- package/dist/daemon/services/local-actions.js +120 -0
- package/dist/daemon/services/mcp-servers.d.ts +3 -3
- package/dist/daemon/services/mcp-servers.d.ts.map +1 -1
- package/dist/daemon/services/mcp-servers.js +68 -7
- package/dist/daemon/services/messages.d.ts +10 -6
- package/dist/daemon/services/messages.d.ts.map +1 -1
- package/dist/daemon/services/messages.js +87 -7
- package/dist/daemon/services/repos.d.ts +6 -6
- package/dist/daemon/services/repos.d.ts.map +1 -1
- package/dist/daemon/services/repos.js +131 -32
- package/dist/daemon/services/scheduler.d.ts +23 -27
- package/dist/daemon/services/scheduler.d.ts.map +1 -1
- package/dist/daemon/services/scheduler.js +55 -28
- package/dist/daemon/services/schedules.d.ts +3 -3
- package/dist/daemon/services/schedules.d.ts.map +1 -1
- package/dist/daemon/services/schedules.js +68 -7
- package/dist/daemon/services/session-env-selections.d.ts +3 -3
- package/dist/daemon/services/session-env-selections.d.ts.map +1 -1
- package/dist/daemon/services/session-mcp-servers.d.ts +3 -3
- package/dist/daemon/services/session-mcp-servers.d.ts.map +1 -1
- package/dist/daemon/services/session-streams.d.ts +29 -0
- package/dist/daemon/services/session-streams.d.ts.map +1 -0
- package/dist/daemon/services/session-streams.js +84 -0
- package/dist/daemon/services/session-token-service.d.ts.map +1 -1
- package/dist/daemon/services/session-token-service.js +11 -4
- package/dist/daemon/services/sessions.d.ts +9 -5
- package/dist/daemon/services/sessions.d.ts.map +1 -1
- package/dist/daemon/services/sessions.js +143 -10
- package/dist/daemon/services/tasks.d.ts +11 -5
- package/dist/daemon/services/tasks.d.ts.map +1 -1
- package/dist/daemon/services/tasks.js +199 -39
- package/dist/daemon/services/terminals.d.ts +21 -3
- package/dist/daemon/services/terminals.d.ts.map +1 -1
- package/dist/daemon/services/terminals.js +81 -25
- package/dist/daemon/services/thread-session-map.d.ts +3 -3
- package/dist/daemon/services/thread-session-map.d.ts.map +1 -1
- package/dist/daemon/services/thread-session-map.js +68 -7
- package/dist/daemon/services/user-avatar-sync.d.ts +21 -0
- package/dist/daemon/services/user-avatar-sync.d.ts.map +1 -0
- package/dist/daemon/services/user-avatar-sync.js +267 -0
- package/dist/daemon/services/users.d.ts +29 -9
- package/dist/daemon/services/users.d.ts.map +1 -1
- package/dist/daemon/services/users.js +383 -30
- package/dist/daemon/services/zone-trigger.d.ts.map +1 -1
- package/dist/daemon/services/zone-trigger.js +17 -4
- package/dist/daemon/setup/build-info.d.ts +1 -1
- package/dist/daemon/setup/build-info.d.ts.map +1 -1
- package/dist/daemon/setup/build-info.js +5 -1
- package/dist/daemon/setup/database.d.ts +8 -3
- package/dist/daemon/setup/database.d.ts.map +1 -1
- package/dist/daemon/setup/database.js +26 -6
- package/dist/daemon/setup/first-run-admin.d.ts +2 -2
- package/dist/daemon/setup/first-run-admin.d.ts.map +1 -1
- package/dist/daemon/setup/index.js +137 -25
- package/dist/daemon/setup/socketio.d.ts +10 -1
- package/dist/daemon/setup/socketio.d.ts.map +1 -1
- package/dist/daemon/setup/socketio.js +108 -18
- package/dist/daemon/startup.d.ts +13 -2
- package/dist/daemon/startup.d.ts.map +1 -1
- package/dist/daemon/startup.js +377 -94
- package/dist/daemon/utils/append-system-message.d.ts +2 -2
- package/dist/daemon/utils/append-system-message.d.ts.map +1 -1
- package/dist/daemon/utils/apply-session-config-defaults.d.ts.map +1 -1
- package/dist/daemon/utils/apply-session-config-defaults.js +12 -1
- package/dist/daemon/utils/authorization.d.ts +3 -1
- package/dist/daemon/utils/authorization.d.ts.map +1 -1
- package/dist/daemon/utils/authorization.js +36 -7
- package/dist/daemon/utils/branch-authorization.d.ts +30 -0
- package/dist/daemon/utils/branch-authorization.d.ts.map +1 -1
- package/dist/daemon/utils/branch-authorization.js +63 -5
- package/dist/daemon/utils/branch-inspect.d.ts +1 -0
- package/dist/daemon/utils/branch-inspect.d.ts.map +1 -1
- package/dist/daemon/utils/branch-inspect.js +11 -3
- package/dist/daemon/utils/emit-service-event.d.ts +56 -0
- package/dist/daemon/utils/emit-service-event.d.ts.map +1 -0
- package/dist/daemon/utils/emit-service-event.js +23 -0
- package/dist/daemon/utils/executor-read-impersonation.d.ts +2 -2
- package/dist/daemon/utils/executor-read-impersonation.d.ts.map +1 -1
- package/dist/daemon/utils/git-impersonation.d.ts +10 -10
- package/dist/daemon/utils/git-impersonation.d.ts.map +1 -1
- package/dist/daemon/utils/git-remote-credential-scan.d.ts +3 -3
- package/dist/daemon/utils/git-remote-credential-scan.d.ts.map +1 -1
- package/dist/daemon/utils/git-remote-credential-scan.js +6 -2
- package/dist/daemon/utils/mcp-header-secrets.d.ts +3 -5
- package/dist/daemon/utils/mcp-header-secrets.d.ts.map +1 -1
- package/dist/daemon/utils/mcp-header-secrets.js +31 -2
- package/dist/daemon/utils/mcp-token-authorization.d.ts +18 -13
- package/dist/daemon/utils/mcp-token-authorization.d.ts.map +1 -1
- package/dist/daemon/utils/mcp-token-authorization.js +11 -5
- package/dist/daemon/utils/open-source-telemetry-config.d.ts +6 -0
- package/dist/daemon/utils/open-source-telemetry-config.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-config.js +21 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.d.ts +7 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.js +15 -0
- package/dist/daemon/utils/open-source-telemetry-usage.d.ts +9 -0
- package/dist/daemon/utils/open-source-telemetry-usage.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-usage.js +121 -0
- package/dist/daemon/utils/realign-repo-origin.d.ts +3 -3
- package/dist/daemon/utils/realign-repo-origin.d.ts.map +1 -1
- package/dist/daemon/utils/realign-repo-origin.js +47 -16
- package/dist/daemon/utils/realtime-access-cache.d.ts +9 -0
- package/dist/daemon/utils/realtime-access-cache.d.ts.map +1 -1
- package/dist/daemon/utils/realtime-access-cache.js +24 -0
- package/dist/daemon/utils/realtime-publish.d.ts +26 -0
- package/dist/daemon/utils/realtime-publish.d.ts.map +1 -1
- package/dist/daemon/utils/realtime-publish.js +171 -12
- package/dist/daemon/utils/session-queue-tenant-scope.d.ts +24 -0
- package/dist/daemon/utils/session-queue-tenant-scope.d.ts.map +1 -0
- package/dist/daemon/utils/session-queue-tenant-scope.js +133 -0
- package/dist/daemon/utils/session-state-hooks.d.ts +3 -3
- package/dist/daemon/utils/session-state-hooks.d.ts.map +1 -1
- package/dist/daemon/utils/session-turn-lock.d.ts +8 -1
- package/dist/daemon/utils/session-turn-lock.d.ts.map +1 -1
- package/dist/daemon/utils/session-turn-lock.js +25 -2
- package/dist/daemon/utils/spawn-executor.d.ts +23 -1
- package/dist/daemon/utils/spawn-executor.d.ts.map +1 -1
- package/dist/daemon/utils/spawn-executor.js +34 -4
- package/dist/daemon/utils/tenant-db-scope.d.ts +20 -0
- package/dist/daemon/utils/tenant-db-scope.d.ts.map +1 -0
- package/dist/daemon/utils/tenant-db-scope.js +114 -0
- package/dist/daemon/utils/unix-group-init.d.ts +3 -3
- package/dist/daemon/utils/unix-group-init.d.ts.map +1 -1
- package/dist/daemon/utils/upload.d.ts +6 -9
- package/dist/daemon/utils/upload.d.ts.map +1 -1
- package/dist/daemon/utils/upload.js +30 -37
- package/dist/daemon/widgets/env-vars/index.d.ts +26 -1
- package/dist/daemon/widgets/env-vars/index.d.ts.map +1 -1
- package/dist/daemon/widgets/env-vars/index.js +145 -21
- package/dist/daemon/widgets/gateway-token/index.d.ts +114 -0
- package/dist/daemon/widgets/gateway-token/index.d.ts.map +1 -0
- package/dist/daemon/widgets/gateway-token/index.js +14711 -0
- package/dist/daemon/widgets/index.d.ts.map +1 -1
- package/dist/daemon/widgets/index.js +327 -37
- package/dist/daemon/widgets/registry.d.ts +7 -0
- package/dist/daemon/widgets/registry.d.ts.map +1 -1
- package/dist/daemon/widgets/submissions.js +12 -9
- package/dist/executor/commands/environment.d.ts.map +1 -1
- package/dist/executor/commands/environment.js +9 -5
- package/dist/executor/commands/git.d.ts.map +1 -1
- package/dist/executor/commands/git.js +3 -1
- package/dist/executor/db/feathers-repositories.d.ts +19 -1
- package/dist/executor/db/feathers-repositories.d.ts.map +1 -1
- package/dist/executor/db/feathers-repositories.js +31 -1
- package/dist/executor/git/index.d.ts +8 -0
- package/dist/executor/git/index.d.ts.map +1 -0
- package/dist/executor/git/index.js +7 -0
- package/dist/executor/handlers/sdk/base-executor.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/base-executor.js +4 -1
- package/dist/executor/handlers/sdk/claude.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/claude.js +1 -1
- package/dist/executor/handlers/sdk/codex.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/codex.js +1 -1
- package/dist/executor/handlers/sdk/copilot.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/copilot.js +1 -1
- package/dist/executor/handlers/sdk/cursor.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/cursor.js +1 -0
- package/dist/executor/handlers/sdk/gemini.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/gemini.js +1 -1
- package/dist/executor/handlers/sdk/git-safe-directory.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/git-safe-directory.js +1 -1
- package/dist/executor/handlers/sdk/opencode.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/opencode.js +1 -1
- package/dist/executor/payload-types.d.ts +5 -5
- package/dist/executor/sdk-handlers/base/diff-enrichment.js +1 -1
- package/dist/executor/sdk-handlers/base/mcp-scoping.d.ts +8 -1
- package/dist/executor/sdk-handlers/base/mcp-scoping.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/base/mcp-scoping.js +58 -6
- package/dist/executor/sdk-handlers/claude/claude-tool.d.ts +2 -2
- package/dist/executor/sdk-handlers/claude/claude-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/claude-tool.js +2 -2
- package/dist/executor/sdk-handlers/claude/prompt-service.d.ts +13 -3
- package/dist/executor/sdk-handlers/claude/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/prompt-service.js +16 -3
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts +2 -1
- package/dist/executor/sdk-handlers/claude/query-builder.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/claude/query-builder.js +2 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts +8 -12
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.js +14 -17
- package/dist/executor/sdk-handlers/codex/normalizer.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/normalizer.js +11 -1
- package/dist/executor/sdk-handlers/codex/pricing/litellm-openai-model-prices.json +3663 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.d.ts +31 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.d.ts.map +1 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.js +46 -0
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts +3 -2
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.js +131 -12
- package/dist/executor/sdk-handlers/codex/usage.d.ts +14 -23
- package/dist/executor/sdk-handlers/codex/usage.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/usage.js +18 -33
- package/dist/executor/sdk-handlers/copilot/copilot-tool.d.ts +2 -2
- package/dist/executor/sdk-handlers/copilot/copilot-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/copilot/copilot-tool.js +2 -2
- package/dist/executor/sdk-handlers/copilot/prompt-service.d.ts +3 -2
- package/dist/executor/sdk-handlers/copilot/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/copilot/prompt-service.js +4 -1
- package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts +2 -2
- package/dist/executor/sdk-handlers/gemini/gemini-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/gemini-tool.js +2 -2
- package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts +3 -2
- package/dist/executor/sdk-handlers/gemini/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/gemini/prompt-service.js +4 -1
- package/dist/executor/sdk-handlers/opencode/opencode-tool.d.ts +3 -2
- package/dist/executor/sdk-handlers/opencode/opencode-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/opencode/opencode-tool.js +4 -1
- package/dist/executor/services/feathers-client.d.ts.map +1 -1
- package/dist/executor/services/feathers-client.js +124 -25
- package/dist/git/index.cjs +1101 -0
- package/dist/git/index.d.ts +533 -0
- package/dist/git/index.d.ts.map +1 -0
- package/dist/git/index.js +1022 -0
- package/dist/git/package.json +21 -0
- package/dist/git/pure.cjs +185 -0
- package/dist/git/pure.d.ts +39 -0
- package/dist/git/pure.d.ts.map +1 -0
- package/dist/git/pure.js +139 -0
- package/dist/ui/assets/AgorEmojiPickerInner-leeNywMc.js +1 -0
- package/dist/ui/assets/App-Dpl4Cc0U.js +4 -0
- package/dist/ui/assets/App-Dpl4Cc0U.js.gz +0 -0
- package/dist/ui/assets/AppNode-wN3UZlFK.js +1 -0
- package/dist/ui/assets/AppNode-wN3UZlFK.js.gz +0 -0
- package/dist/ui/assets/ArtifactConsentModal-DjzXcP_L.js +1 -0
- package/dist/ui/assets/ArtifactConsentModal-DjzXcP_L.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-B3b_EZ0F.js +9 -0
- package/dist/ui/assets/ArtifactFullscreenPage-B3b_EZ0F.js.gz +0 -0
- package/dist/ui/assets/ArtifactNode-DISy2T-6.js +9 -0
- package/dist/ui/assets/ArtifactNode-DISy2T-6.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-DUpsoEGr.js +19 -0
- package/dist/ui/assets/AutocompleteTextarea-DUpsoEGr.js.gz +0 -0
- package/dist/ui/assets/BoardObjectNodes-BakeGpIX.js +34 -0
- package/dist/ui/assets/BoardObjectNodes-BakeGpIX.js.gz +0 -0
- package/dist/ui/assets/CodeEditor.inner-HmSdTLW5.js +7 -0
- package/dist/ui/assets/CodeEditor.inner-HmSdTLW5.js.gz +0 -0
- package/dist/ui/assets/ConversationView-mWaA-B1f.js +1 -0
- package/dist/ui/assets/ConversationView-mWaA-B1f.js.gz +0 -0
- package/dist/ui/assets/EmbeddedTerminal-NNoyPA81.js +2 -0
- package/dist/ui/assets/EmbeddedTerminal-NNoyPA81.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-CkxVnRvz.js +24 -0
- package/dist/ui/assets/KnowledgePage-CkxVnRvz.js.gz +0 -0
- package/dist/ui/assets/{MarketingScreenshotPage-zv5RUCuV.js → MarketingScreenshotPage-B86Gs8jx.js} +2 -2
- package/dist/ui/assets/MarketingScreenshotPage-B86Gs8jx.js.gz +0 -0
- package/dist/ui/assets/MobileApp-BPs-SXvz.js +1 -0
- package/dist/ui/assets/MobileApp-BPs-SXvz.js.gz +0 -0
- package/dist/ui/assets/{SessionCanvas-mEmYGZhC.css → SessionCanvas-Bh7Yg5dZ.css} +1 -1
- package/dist/ui/assets/SessionCanvas-Bh7Yg5dZ.css.gz +0 -0
- package/dist/ui/assets/SessionCanvas-xVfDoEtz.js +13 -0
- package/dist/ui/assets/SessionCanvas-xVfDoEtz.js.gz +0 -0
- package/dist/ui/assets/{StreamdownDemoPage-wzWaqWwr.js → StreamdownDemoPage-CvWLzVsv.js} +2 -2
- package/dist/ui/assets/StreamdownDemoPage-CvWLzVsv.js.gz +0 -0
- package/dist/ui/assets/TerminalModal-ExOgsuOP.js +2 -0
- package/dist/ui/assets/TerminalModal-ExOgsuOP.js.gz +0 -0
- package/dist/ui/assets/ThemeSwitcher-Cgyp5ruu.js +1 -0
- package/dist/ui/assets/ThemeSwitcher-Cgyp5ruu.js.gz +0 -0
- package/dist/ui/assets/ThemedSyntaxHighlighter.inner-rpCN9S6K.js +1 -0
- package/dist/ui/assets/{antd-CfbbHJOz.js → antd-BCqimh1J.js} +5 -5
- package/dist/ui/assets/{antd-CfbbHJOz.js.gz → antd-BCqimh1J.js.gz} +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-BxSQIjrE.js +1 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-pDpGHSqT.js +36 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-pDpGHSqT.js.gz +0 -0
- package/dist/ui/assets/{blockDiagram-VD42YOAC-BhZaEN19.js → blockDiagram-VD42YOAC-uP8JTJpK.js} +4 -4
- package/dist/ui/assets/blockDiagram-VD42YOAC-uP8JTJpK.js.gz +0 -0
- package/dist/ui/assets/{c4Diagram-YG6GDRKO-Dk_UH-sY.js → c4Diagram-YG6GDRKO-qQe72Mm7.js} +2 -2
- package/dist/ui/assets/c4Diagram-YG6GDRKO-qQe72Mm7.js.gz +0 -0
- package/dist/ui/assets/channel-CoUBs6Zn.js +1 -0
- package/dist/ui/assets/{chunk-4BX2VUAB-XprbG2TG.js → chunk-4BX2VUAB-sz-YE8Nt.js} +1 -1
- package/dist/ui/assets/chunk-4ZMWKKQ3-3oKtfWXp.js +3 -0
- package/dist/ui/assets/chunk-4ZMWKKQ3-3oKtfWXp.js.gz +0 -0
- package/dist/ui/assets/chunk-55IACEB6-BS04dgKF.js +1 -0
- package/dist/ui/assets/{chunk-ABZYJK2D-BJcrryHK.js → chunk-ABZYJK2D-t3Gkphds.js} +3 -3
- package/dist/ui/assets/chunk-ABZYJK2D-t3Gkphds.js.gz +0 -0
- package/dist/ui/assets/{chunk-AGHRB4JF-DvxmfbM0.js → chunk-AGHRB4JF-D_QmWxbY.js} +1 -1
- package/dist/ui/assets/chunk-AGHRB4JF-D_QmWxbY.js.gz +0 -0
- package/dist/ui/assets/{chunk-ATLVNIR6-DbeJ0OrR.js → chunk-ATLVNIR6-Bmg7-Ufz.js} +1 -1
- package/dist/ui/assets/chunk-ATLVNIR6-Bmg7-Ufz.js.gz +0 -0
- package/dist/ui/assets/{chunk-B4BG7PRW-C53q2ggf.js → chunk-B4BG7PRW-dnSEE1u-.js} +3 -3
- package/dist/ui/assets/chunk-B4BG7PRW-dnSEE1u-.js.gz +0 -0
- package/dist/ui/assets/{chunk-CVBHYZKI-B3EBSlb3.js → chunk-CVBHYZKI-BStaYnF0.js} +1 -1
- package/dist/ui/assets/{chunk-DI55MBZ5-vIyNEQN-.js → chunk-DI55MBZ5-28dvx6o3.js} +1 -1
- package/dist/ui/assets/chunk-DI55MBZ5-28dvx6o3.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-X-FURkEh.js +1 -0
- package/dist/ui/assets/{chunk-FMBD7UC4-rddmfK-Z.js → chunk-FMBD7UC4-C_63gC9S.js} +1 -1
- package/dist/ui/assets/{chunk-HN2XXSSU-Dttqcg3b.js → chunk-HN2XXSSU-UFD374KI.js} +1 -1
- package/dist/ui/assets/chunk-HN2XXSSU-UFD374KI.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-B60hLNeR.js +11 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-B60hLNeR.js.gz +0 -0
- package/dist/ui/assets/{chunk-JZLCHNYA-EUmx2y4H.js → chunk-JZLCHNYA-ButC6pwN.js} +5 -5
- package/dist/ui/assets/chunk-JZLCHNYA-ButC6pwN.js.gz +0 -0
- package/dist/ui/assets/{chunk-MI3HLSF2-65n9Mkyc.js → chunk-MI3HLSF2-BivYzoSV.js} +1 -1
- package/dist/ui/assets/chunk-MI3HLSF2-BivYzoSV.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-mVWzo5wJ.js +2 -0
- package/dist/ui/assets/chunk-N4CR4FBY-mVWzo5wJ.js.gz +0 -0
- package/dist/ui/assets/{chunk-QN33PNHL-DsRKK6NR.js → chunk-QN33PNHL-tXtHZpaG.js} +1 -1
- package/dist/ui/assets/{chunk-QXUST7PY-BCYnMiS3.js → chunk-QXUST7PY-DATib_Vv.js} +2 -2
- package/dist/ui/assets/chunk-QXUST7PY-DATib_Vv.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-y6l249e5.js +1 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-BEtfmflI.js +2 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-BEtfmflI.js.gz +0 -0
- package/dist/ui/assets/{chunk-TZMSLE5B-BuQUQcTr.js → chunk-TZMSLE5B-BY1ZtogK.js} +1 -1
- package/dist/ui/assets/chunk-TZMSLE5B-BY1ZtogK.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-BYvq-uPY.js +1 -0
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-BYvq-uPY.js +1 -0
- package/dist/ui/assets/constants-CYzQKfD1.js +1 -0
- package/dist/ui/assets/{cose-bilkent-S5V4N54A-CnPB3ARO.js → cose-bilkent-S5V4N54A-DPvYrqGG.js} +1 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-DPvYrqGG.js.gz +0 -0
- package/dist/ui/assets/{dagre-6UL2VRFP-DhS-k_Se.js → dagre-6UL2VRFP-D800J6qb.js} +1 -1
- package/dist/ui/assets/dagre-6UL2VRFP-D800J6qb.js.gz +0 -0
- package/dist/ui/assets/{dagre-KgLoHEuy.js → dagre-TNc4wezg.js} +1 -1
- package/dist/ui/assets/dagre-TNc4wezg.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-CGdP9F-X.js +24 -0
- package/dist/ui/assets/diagram-PSM6KHXK-CGdP9F-X.js.gz +0 -0
- package/dist/ui/assets/{diagram-QEK2KX5R-BPCitvbo.js → diagram-QEK2KX5R-BD5lOCe5.js} +1 -1
- package/dist/ui/assets/diagram-QEK2KX5R-BD5lOCe5.js.gz +0 -0
- package/dist/ui/assets/{diagram-S2PKOQOG-NW4uK6sx.js → diagram-S2PKOQOG-cp3l22vN.js} +1 -1
- package/dist/ui/assets/diagram-S2PKOQOG-cp3l22vN.js.gz +0 -0
- package/dist/ui/assets/editor-Cr0W5BQI.js +39 -0
- package/dist/ui/assets/editor-Cr0W5BQI.js.gz +0 -0
- package/dist/ui/assets/emoji-Bv3m24sO.js +3 -0
- package/dist/ui/assets/emoji-Bv3m24sO.js.gz +0 -0
- package/dist/ui/assets/{erDiagram-Q2GNP2WA-me1fboaf.js → erDiagram-Q2GNP2WA-CQSXRgqr.js} +2 -2
- package/dist/ui/assets/erDiagram-Q2GNP2WA-CQSXRgqr.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-CKcKpkph.js +162 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-CKcKpkph.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-DlAHzXO5.js +267 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-DlAHzXO5.js.gz +0 -0
- package/dist/ui/assets/{gitGraph-F6HP7TQM-CfFE_uAC.js → gitGraph-F6HP7TQM-DeuXy4B1.js} +1 -1
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-aB-AI4Vq.js +65 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-aB-AI4Vq.js.gz +0 -0
- package/dist/ui/assets/index-B-qHc0o5.js +63 -0
- package/dist/ui/assets/index-B-qHc0o5.js.gz +0 -0
- package/dist/ui/assets/{index-DxuPq13l.css → index-qkT7Qqm2.css} +1 -1
- package/dist/ui/assets/index-qkT7Qqm2.css.gz +0 -0
- package/dist/ui/assets/{info-NVLQJR56-i_xHYg3f.js → info-NVLQJR56-B9PG7xsc.js} +1 -1
- package/dist/ui/assets/{infoDiagram-ER5ION4S-2NL93b78.js → infoDiagram-ER5ION4S-C5Wpoqim.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-XKPGCS4Q-CZF-2DHU.js → journeyDiagram-XKPGCS4Q-CHLziqfS.js} +3 -3
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CHLziqfS.js.gz +0 -0
- package/dist/ui/assets/{kanban-definition-3W4ZIXB7-CfvJIOny.js → kanban-definition-3W4ZIXB7-Dq7GzQE_.js} +1 -1
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-Dq7GzQE_.js.gz +0 -0
- package/dist/ui/assets/{line-DDv8kOJk.js → line-DHKNg83I.js} +1 -1
- package/dist/ui/assets/{linear-Daef-l29.js → linear-BvUfn0I8.js} +1 -1
- package/dist/ui/assets/linear-BvUfn0I8.js.gz +0 -0
- package/dist/ui/assets/{mermaid-parser.core-CdK9QgYV.js → mermaid-parser.core-C6d9tKoo.js} +2 -2
- package/dist/ui/assets/mermaid-parser.core-C6d9tKoo.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-CxE5KezR.js +11 -0
- package/dist/ui/assets/mermaid.core-CxE5KezR.js.gz +0 -0
- package/dist/ui/assets/{mindmap-definition-VGOIOE7T-Cb3QMflX.js → mindmap-definition-VGOIOE7T-DmPoQ48w.js} +1 -1
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-DmPoQ48w.js.gz +0 -0
- package/dist/ui/assets/{packet-BFZMPI3H-Bm2uwz4i.js → packet-BFZMPI3H-JZEkVZxU.js} +1 -1
- package/dist/ui/assets/{particles-DsJFOarW.js → particles-CxMmUw86.js} +1 -1
- package/dist/ui/assets/particles-CxMmUw86.js.gz +0 -0
- package/dist/ui/assets/{pie-7BOR55EZ-5i17tVnF.js → pie-7BOR55EZ-_1II5pYQ.js} +1 -1
- package/dist/ui/assets/{pieDiagram-ADFJNKIX-BxIwQWvw.js → pieDiagram-ADFJNKIX-DrNkH33i.js} +1 -1
- package/dist/ui/assets/pieDiagram-ADFJNKIX-DrNkH33i.js.gz +0 -0
- package/dist/ui/assets/{quadrantDiagram-AYHSOK5B-B5HPe4ga.js → quadrantDiagram-AYHSOK5B-DOpC-HEF.js} +3 -3
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-DOpC-HEF.js.gz +0 -0
- package/dist/ui/assets/{radar-NHE76QYJ-BTn-tq0k.js → radar-NHE76QYJ-DDmqhzEZ.js} +1 -1
- package/dist/ui/assets/reactflow-D98uPOMq.js +2 -0
- package/dist/ui/assets/reactflow-D98uPOMq.js.gz +0 -0
- package/dist/ui/assets/{requirementDiagram-UZGBJVZJ-YfI6llkX.js → requirementDiagram-UZGBJVZJ-Bzx0iEPP.js} +1 -1
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-Bzx0iEPP.js.gz +0 -0
- package/dist/ui/assets/{sandpack-D7koO5op.js → sandpack-059Z4UWP.js} +38 -38
- package/dist/ui/assets/sandpack-059Z4UWP.js.gz +0 -0
- package/dist/ui/assets/sandpackDefaults-CPMNDsw7.js +1 -0
- package/dist/ui/assets/sandpackDefaults-CPMNDsw7.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-Do9pvfDv.js +10 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-Do9pvfDv.js.gz +0 -0
- package/dist/ui/assets/{sequenceDiagram-WL72ISMW-DAe4Um17.js → sequenceDiagram-WL72ISMW-CN8neUTA.js} +6 -6
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-CN8neUTA.js.gz +0 -0
- package/dist/ui/assets/src-DEbsv3pp.js +34 -0
- package/dist/ui/assets/src-DEbsv3pp.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BluWJi8n.js +1 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BluWJi8n.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-DeyqBMDR.js +1 -0
- package/dist/ui/assets/streamdown-BT1twtFc.js +521 -0
- package/dist/ui/assets/streamdown-BT1twtFc.js.gz +0 -0
- package/dist/ui/assets/syntax-CBu6nLfm.js +9 -0
- package/dist/ui/assets/syntax-CBu6nLfm.js.gz +0 -0
- package/dist/ui/assets/{timeline-definition-IT6M3QCI-D6P5txjT.js → timeline-definition-IT6M3QCI-WdUNkiRj.js} +16 -16
- package/dist/ui/assets/timeline-definition-IT6M3QCI-WdUNkiRj.js.gz +0 -0
- package/dist/ui/assets/{treemap-KMMF4GRG-Bitm3gy4.js → treemap-KMMF4GRG-CoriU4Jl.js} +1 -1
- package/dist/ui/assets/{useUserLocalStorage-Ckb8HsIw.js → useUserLocalStorage-GidNiOPC.js} +1 -1
- package/dist/ui/assets/useUserLocalStorage-GidNiOPC.js.gz +0 -0
- package/dist/ui/assets/{xychartDiagram-PRI3JC2R-CsybjUbd.js → xychartDiagram-PRI3JC2R-CgBAKNt2.js} +1 -1
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-CgBAKNt2.js.gz +0 -0
- package/dist/ui/index.html +11 -11
- package/dist/ui/index.html.gz +0 -0
- package/package.json +6 -5
- package/scripts/postinstall.js +27 -19
- package/dist/cli/commands/daemon/sync.d.ts.map +0 -1
- package/dist/ui/assets/App-DcEY8Ota.js +0 -3
- package/dist/ui/assets/App-DcEY8Ota.js.gz +0 -0
- package/dist/ui/assets/ArtifactConsentModal-CiCbK9iv.js +0 -1
- package/dist/ui/assets/ArtifactConsentModal-CiCbK9iv.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-CfsTEGKd.js +0 -9
- package/dist/ui/assets/ArtifactFullscreenPage-CfsTEGKd.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-BAFFH_5e.js +0 -18
- package/dist/ui/assets/AutocompleteTextarea-BAFFH_5e.js.gz +0 -0
- package/dist/ui/assets/BoardObjectNodes-D-O6bZIG.js +0 -34
- package/dist/ui/assets/BoardObjectNodes-D-O6bZIG.js.gz +0 -0
- package/dist/ui/assets/CodeEditor.inner-DBgsP4tn.js +0 -8
- package/dist/ui/assets/CodeEditor.inner-DBgsP4tn.js.gz +0 -0
- package/dist/ui/assets/ConversationView-CUWR0gR6.js +0 -1
- package/dist/ui/assets/ConversationView-CUWR0gR6.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-B2bzlXfn.js +0 -24
- package/dist/ui/assets/KnowledgePage-B2bzlXfn.js.gz +0 -0
- package/dist/ui/assets/MarketingScreenshotPage-zv5RUCuV.js.gz +0 -0
- package/dist/ui/assets/MobileApp-VgVnsnsN.js +0 -1
- package/dist/ui/assets/MobileApp-VgVnsnsN.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-f1-1Gbcw.js +0 -20
- package/dist/ui/assets/SessionCanvas-f1-1Gbcw.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-mEmYGZhC.css.gz +0 -0
- package/dist/ui/assets/StreamdownDemoPage-wzWaqWwr.js.gz +0 -0
- package/dist/ui/assets/ThemeSwitcher-Dly2y9pi.js +0 -1
- package/dist/ui/assets/ThemeSwitcher-Dly2y9pi.js.gz +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-CykGFbQU.js +0 -1
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-C8HXAenz.js +0 -36
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-C8HXAenz.js.gz +0 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-BhZaEN19.js.gz +0 -0
- package/dist/ui/assets/c4Diagram-YG6GDRKO-Dk_UH-sY.js.gz +0 -0
- package/dist/ui/assets/channel-D6_nUWlW.js +0 -1
- package/dist/ui/assets/chunk-55IACEB6-ByzqIgSb.js +0 -1
- package/dist/ui/assets/chunk-ABZYJK2D-BJcrryHK.js.gz +0 -0
- package/dist/ui/assets/chunk-AGHRB4JF-DvxmfbM0.js.gz +0 -0
- package/dist/ui/assets/chunk-ATLVNIR6-DbeJ0OrR.js.gz +0 -0
- package/dist/ui/assets/chunk-B4BG7PRW-C53q2ggf.js.gz +0 -0
- package/dist/ui/assets/chunk-DI55MBZ5-vIyNEQN-.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-B3ObkuOm.js +0 -1
- package/dist/ui/assets/chunk-HN2XXSSU-Dttqcg3b.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-DbNDev3D.js +0 -11
- package/dist/ui/assets/chunk-JA3XYJ7Z-DbNDev3D.js.gz +0 -0
- package/dist/ui/assets/chunk-JZLCHNYA-EUmx2y4H.js.gz +0 -0
- package/dist/ui/assets/chunk-MI3HLSF2-65n9Mkyc.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-mv5koXqW.js +0 -2
- package/dist/ui/assets/chunk-N4CR4FBY-mv5koXqW.js.gz +0 -0
- package/dist/ui/assets/chunk-QXUST7PY-BCYnMiS3.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-HucAw4xW.js +0 -1
- package/dist/ui/assets/chunk-S3R3BYOJ-CWMEa9Dc.js +0 -2
- package/dist/ui/assets/chunk-S3R3BYOJ-CWMEa9Dc.js.gz +0 -0
- package/dist/ui/assets/chunk-TZMSLE5B-BuQUQcTr.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-CUT3rPTB.js +0 -1
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-CUT3rPTB.js +0 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-CnPB3ARO.js.gz +0 -0
- package/dist/ui/assets/dagre-6UL2VRFP-DhS-k_Se.js.gz +0 -0
- package/dist/ui/assets/dagre-KgLoHEuy.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-BZg3MJmb.js +0 -24
- package/dist/ui/assets/diagram-PSM6KHXK-BZg3MJmb.js.gz +0 -0
- package/dist/ui/assets/diagram-QEK2KX5R-BPCitvbo.js.gz +0 -0
- package/dist/ui/assets/diagram-S2PKOQOG-NW4uK6sx.js.gz +0 -0
- package/dist/ui/assets/editor-CzFWIUw2.js +0 -39
- package/dist/ui/assets/editor-CzFWIUw2.js.gz +0 -0
- package/dist/ui/assets/emoji-Dkz4Zzv_.js +0 -3
- package/dist/ui/assets/emoji-Dkz4Zzv_.js.gz +0 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-me1fboaf.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-DzE8dGsh.js +0 -162
- package/dist/ui/assets/flowDiagram-NV44I4VS-DzE8dGsh.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-CFQD09Mi.js +0 -267
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-CFQD09Mi.js.gz +0 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-CaVoxU4C.js +0 -65
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-CaVoxU4C.js.gz +0 -0
- package/dist/ui/assets/index-BN5_Qq7R.js +0 -324
- package/dist/ui/assets/index-BN5_Qq7R.js.gz +0 -0
- package/dist/ui/assets/index-DxuPq13l.css.gz +0 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CZF-2DHU.js.gz +0 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-CfvJIOny.js.gz +0 -0
- package/dist/ui/assets/katex-CamJ39w1.js +0 -257
- package/dist/ui/assets/katex-CamJ39w1.js.gz +0 -0
- package/dist/ui/assets/linear-Daef-l29.js.gz +0 -0
- package/dist/ui/assets/mermaid-parser.core-CdK9QgYV.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-D6GS9mU-.js +0 -11
- package/dist/ui/assets/mermaid.core-D6GS9mU-.js.gz +0 -0
- package/dist/ui/assets/message-SqLqNYcv.js +0 -36
- package/dist/ui/assets/message-SqLqNYcv.js.gz +0 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-Cb3QMflX.js.gz +0 -0
- package/dist/ui/assets/particles-DsJFOarW.js.gz +0 -0
- package/dist/ui/assets/pieDiagram-ADFJNKIX-BxIwQWvw.js.gz +0 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-B5HPe4ga.js.gz +0 -0
- package/dist/ui/assets/reactflow-Bf74ngoo.js +0 -2
- package/dist/ui/assets/reactflow-Bf74ngoo.js.gz +0 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-YfI6llkX.js.gz +0 -0
- package/dist/ui/assets/sandpack-D7koO5op.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DOk_B10B.js +0 -10
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DOk_B10B.js.gz +0 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-DAe4Um17.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-CCesDu_C.js +0 -1
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-CCesDu_C.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-CMlIrsoO.js +0 -1
- package/dist/ui/assets/syntax-C-M-8jOU.js +0 -10
- package/dist/ui/assets/syntax-C-M-8jOU.js.gz +0 -0
- package/dist/ui/assets/theme-BQZdiqwv.js +0 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-D6P5txjT.js.gz +0 -0
- package/dist/ui/assets/useUserLocalStorage-Ckb8HsIw.js.gz +0 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-CsybjUbd.js.gz +0 -0
- /package/dist/cli/commands/{admin → local}/sync-unix.d.ts +0 -0
|
@@ -65,70 +65,7 @@ var init_executor_read_impersonation = __esm({
|
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
// src/mcp/tools/widgets.ts
|
|
68
|
-
import { MessageRole as MessageRole2 } from "@agor/core/types";
|
|
69
|
-
|
|
70
|
-
// src/utils/append-system-message.ts
|
|
71
|
-
import { generateId, SessionRepository } from "@agor/core/db";
|
|
72
|
-
import { MessageRole } from "@agor/core/types";
|
|
73
|
-
async function appendSystemMessage(opts) {
|
|
74
|
-
const {
|
|
75
|
-
app,
|
|
76
|
-
db,
|
|
77
|
-
sessionId,
|
|
78
|
-
taskId,
|
|
79
|
-
content,
|
|
80
|
-
contentPreview,
|
|
81
|
-
type = "system",
|
|
82
|
-
role = MessageRole.SYSTEM,
|
|
83
|
-
metadata,
|
|
84
|
-
params
|
|
85
|
-
} = opts;
|
|
86
|
-
const index = await new SessionRepository(db).countMessages(sessionId);
|
|
87
|
-
const preview = contentPreview ?? (typeof content === "string" ? content.substring(0, 200) : "");
|
|
88
|
-
const message = {
|
|
89
|
-
message_id: generateId(),
|
|
90
|
-
session_id: sessionId,
|
|
91
|
-
task_id: taskId,
|
|
92
|
-
type,
|
|
93
|
-
role,
|
|
94
|
-
index,
|
|
95
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
96
|
-
content_preview: preview,
|
|
97
|
-
content,
|
|
98
|
-
...metadata ? { metadata } : {}
|
|
99
|
-
};
|
|
100
|
-
const created = await app.service("messages").create(message, params ?? {});
|
|
101
|
-
return created;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// src/utils/session-tasks.ts
|
|
105
|
-
import { EXECUTING_TASK_STATUSES, isTaskExecuting } from "@agor/core/types";
|
|
106
|
-
function recencyKey(t) {
|
|
107
|
-
return new Date(t.started_at || t.created_at).getTime();
|
|
108
|
-
}
|
|
109
|
-
async function findTasksForSession(app, sessionId, params) {
|
|
110
|
-
const result = await app.service("tasks").find({
|
|
111
|
-
...params ?? {},
|
|
112
|
-
// Merge defensively: spread params first, then force session_id so a
|
|
113
|
-
// caller-supplied params.query can never silently overwrite the filter.
|
|
114
|
-
query: {
|
|
115
|
-
...params?.query,
|
|
116
|
-
session_id: sessionId,
|
|
117
|
-
$limit: params?.query?.$limit ?? 1e3
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
const tasks = Array.isArray(result) ? result : result.data;
|
|
121
|
-
return [...tasks].sort((a, b) => recencyKey(b) - recencyKey(a));
|
|
122
|
-
}
|
|
123
|
-
async function findHostTaskForSession(app, sessionId, params) {
|
|
124
|
-
const all = await findTasksForSession(app, sessionId, params);
|
|
125
|
-
if (all.length === 0) return void 0;
|
|
126
|
-
return all.find((t) => isTaskExecuting(t)) ?? all[0];
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// src/widgets/env-vars/index.ts
|
|
130
|
-
import { ENV_VAR_CONSTRAINTS, isEnvVarAllowed, validateEnvVar } from "@agor/core/config";
|
|
131
|
-
import { BadRequest } from "@agor/core/feathers";
|
|
68
|
+
import { getRequiredSecretFields as getRequiredSecretFields2, hasMinimumRole as hasMinimumRole5, MessageRole as MessageRole2, ROLES as ROLES6 } from "@agor/core/types";
|
|
132
69
|
|
|
133
70
|
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
134
71
|
var external_exports = {};
|
|
@@ -14644,8 +14581,98 @@ function date4(params) {
|
|
|
14644
14581
|
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
14645
14582
|
config(en_default());
|
|
14646
14583
|
|
|
14584
|
+
// src/utils/append-system-message.ts
|
|
14585
|
+
import { generateId, SessionRepository } from "@agor/core/db";
|
|
14586
|
+
import { MessageRole } from "@agor/core/types";
|
|
14587
|
+
async function appendSystemMessage(opts) {
|
|
14588
|
+
const {
|
|
14589
|
+
app,
|
|
14590
|
+
db,
|
|
14591
|
+
sessionId,
|
|
14592
|
+
taskId,
|
|
14593
|
+
content,
|
|
14594
|
+
contentPreview,
|
|
14595
|
+
type = "system",
|
|
14596
|
+
role = MessageRole.SYSTEM,
|
|
14597
|
+
metadata,
|
|
14598
|
+
params
|
|
14599
|
+
} = opts;
|
|
14600
|
+
const index = await new SessionRepository(db).countMessages(sessionId);
|
|
14601
|
+
const preview = contentPreview ?? (typeof content === "string" ? content.substring(0, 200) : "");
|
|
14602
|
+
const message = {
|
|
14603
|
+
message_id: generateId(),
|
|
14604
|
+
session_id: sessionId,
|
|
14605
|
+
task_id: taskId,
|
|
14606
|
+
type,
|
|
14607
|
+
role,
|
|
14608
|
+
index,
|
|
14609
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
14610
|
+
content_preview: preview,
|
|
14611
|
+
content,
|
|
14612
|
+
...metadata ? { metadata } : {}
|
|
14613
|
+
};
|
|
14614
|
+
const created = await app.service("messages").create(message, params ?? {});
|
|
14615
|
+
return created;
|
|
14616
|
+
}
|
|
14617
|
+
|
|
14618
|
+
// src/utils/session-tasks.ts
|
|
14619
|
+
import { EXECUTING_TASK_STATUSES, isTaskExecuting } from "@agor/core/types";
|
|
14620
|
+
function recencyKey(t) {
|
|
14621
|
+
return new Date(t.started_at || t.created_at).getTime();
|
|
14622
|
+
}
|
|
14623
|
+
async function findTasksForSession(app, sessionId, params) {
|
|
14624
|
+
const result = await app.service("tasks").find({
|
|
14625
|
+
...params ?? {},
|
|
14626
|
+
// Merge defensively: spread params first, then force session_id so a
|
|
14627
|
+
// caller-supplied params.query can never silently overwrite the filter.
|
|
14628
|
+
query: {
|
|
14629
|
+
...params?.query,
|
|
14630
|
+
session_id: sessionId,
|
|
14631
|
+
$limit: params?.query?.$limit ?? 1e3
|
|
14632
|
+
}
|
|
14633
|
+
});
|
|
14634
|
+
const tasks = Array.isArray(result) ? result : result.data;
|
|
14635
|
+
return [...tasks].sort((a, b) => recencyKey(b) - recencyKey(a));
|
|
14636
|
+
}
|
|
14637
|
+
async function findHostTaskForSession(app, sessionId, params) {
|
|
14638
|
+
const all = await findTasksForSession(app, sessionId, params);
|
|
14639
|
+
if (all.length === 0) return void 0;
|
|
14640
|
+
return all.find((t) => isTaskExecuting(t)) ?? all[0];
|
|
14641
|
+
}
|
|
14642
|
+
|
|
14647
14643
|
// src/widgets/env-vars/index.ts
|
|
14644
|
+
import {
|
|
14645
|
+
ENV_VAR_CONSTRAINTS,
|
|
14646
|
+
isEnvVarAllowed,
|
|
14647
|
+
validateEnvVar
|
|
14648
|
+
} from "@agor/core/config";
|
|
14649
|
+
import { SessionEnvSelectionRepository } from "@agor/core/db";
|
|
14650
|
+
import { BadRequest } from "@agor/core/feathers";
|
|
14648
14651
|
var ENV_VAR_NAME_REGEX = ENV_VAR_CONSTRAINTS.NAME_PATTERN;
|
|
14652
|
+
function orderedEnvVarNames(names) {
|
|
14653
|
+
return [...names].sort();
|
|
14654
|
+
}
|
|
14655
|
+
var envVarFieldMetadataSchema = external_exports.object({
|
|
14656
|
+
description: external_exports.string().max(200).optional(),
|
|
14657
|
+
placeholder: external_exports.string().max(120).optional(),
|
|
14658
|
+
format_hint: external_exports.string().max(80).optional(),
|
|
14659
|
+
input_type: external_exports.enum(["password", "text", "textarea"]).default("password").optional()
|
|
14660
|
+
}).strict();
|
|
14661
|
+
function orderedRecord(record2) {
|
|
14662
|
+
if (!record2) return void 0;
|
|
14663
|
+
const out = {};
|
|
14664
|
+
for (const key of orderedEnvVarNames(Object.keys(record2))) {
|
|
14665
|
+
out[key] = record2[key];
|
|
14666
|
+
}
|
|
14667
|
+
return out;
|
|
14668
|
+
}
|
|
14669
|
+
function normalizeEnvVarsParams(params) {
|
|
14670
|
+
return {
|
|
14671
|
+
...params,
|
|
14672
|
+
names: orderedEnvVarNames(params.names),
|
|
14673
|
+
variable_metadata: orderedRecord(params.variable_metadata)
|
|
14674
|
+
};
|
|
14675
|
+
}
|
|
14649
14676
|
var envVarsParamsSchema = external_exports.object({
|
|
14650
14677
|
names: external_exports.array(external_exports.string().regex(ENV_VAR_NAME_REGEX)).min(1).max(10).refine((names) => new Set(names).size === names.length, {
|
|
14651
14678
|
message: "Env var names must be unique"
|
|
@@ -14653,20 +14680,90 @@ var envVarsParamsSchema = external_exports.object({
|
|
|
14653
14680
|
reason: external_exports.string().min(1).max(200).describe(
|
|
14654
14681
|
"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."
|
|
14655
14682
|
),
|
|
14683
|
+
variable_metadata: external_exports.record(external_exports.string().regex(ENV_VAR_NAME_REGEX), envVarFieldMetadataSchema).optional().describe(
|
|
14684
|
+
"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."
|
|
14685
|
+
),
|
|
14656
14686
|
auto_resume: external_exports.boolean().default(true).describe(
|
|
14657
14687
|
"When true (default), a system-authored prompt is auto-queued back into the agent on submit/dismiss."
|
|
14658
14688
|
)
|
|
14689
|
+
}).superRefine((params, ctx) => {
|
|
14690
|
+
const requested = new Set(params.names);
|
|
14691
|
+
for (const key of Object.keys(params.variable_metadata ?? {})) {
|
|
14692
|
+
if (!requested.has(key)) {
|
|
14693
|
+
ctx.addIssue({
|
|
14694
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14695
|
+
path: ["variable_metadata", key],
|
|
14696
|
+
message: `Metadata key ${key} must match a requested env var name`
|
|
14697
|
+
});
|
|
14698
|
+
}
|
|
14699
|
+
}
|
|
14659
14700
|
});
|
|
14660
14701
|
var envVarsSubmitSchema = external_exports.object({
|
|
14661
14702
|
values: external_exports.record(
|
|
14662
14703
|
external_exports.string().regex(ENV_VAR_NAME_REGEX),
|
|
14663
14704
|
external_exports.string().min(1).max(ENV_VAR_CONSTRAINTS.MAX_VALUE_LENGTH)
|
|
14664
|
-
).
|
|
14665
|
-
|
|
14666
|
-
}),
|
|
14705
|
+
).default({}),
|
|
14706
|
+
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."),
|
|
14667
14707
|
scope: external_exports.enum(["global", "session"])
|
|
14708
|
+
}).superRefine((submit, ctx) => {
|
|
14709
|
+
const valueNames = Object.keys(submit.values);
|
|
14710
|
+
const existingNames = submit.use_existing;
|
|
14711
|
+
const total = valueNames.length + existingNames.length;
|
|
14712
|
+
if (total < 1 || total > 10) {
|
|
14713
|
+
ctx.addIssue({
|
|
14714
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14715
|
+
message: "Must submit between 1 and 10 env vars"
|
|
14716
|
+
});
|
|
14717
|
+
}
|
|
14718
|
+
const duplicates = existingNames.filter((name) => valueNames.includes(name));
|
|
14719
|
+
for (const name of duplicates) {
|
|
14720
|
+
ctx.addIssue({
|
|
14721
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14722
|
+
path: ["use_existing"],
|
|
14723
|
+
message: `Cannot both submit and use existing value for ${name}`
|
|
14724
|
+
});
|
|
14725
|
+
}
|
|
14726
|
+
if (new Set(existingNames).size !== existingNames.length) {
|
|
14727
|
+
ctx.addIssue({
|
|
14728
|
+
code: external_exports.ZodIssueCode.custom,
|
|
14729
|
+
path: ["use_existing"],
|
|
14730
|
+
message: "use_existing names must be unique"
|
|
14731
|
+
});
|
|
14732
|
+
}
|
|
14668
14733
|
});
|
|
14669
14734
|
|
|
14735
|
+
// src/widgets/gateway-token/index.ts
|
|
14736
|
+
import { Forbidden } from "@agor/core/feathers";
|
|
14737
|
+
import {
|
|
14738
|
+
GATEWAY_SENSITIVE_CONFIG_FIELDS,
|
|
14739
|
+
hasMinimumRole,
|
|
14740
|
+
ROLES
|
|
14741
|
+
} from "@agor/core/types";
|
|
14742
|
+
var SUPPORTED_CHANNEL_TYPES = [
|
|
14743
|
+
"slack",
|
|
14744
|
+
"github",
|
|
14745
|
+
"teams"
|
|
14746
|
+
];
|
|
14747
|
+
function isSupportedGatewayTokenChannelType(channelType) {
|
|
14748
|
+
return SUPPORTED_CHANNEL_TYPES.includes(channelType);
|
|
14749
|
+
}
|
|
14750
|
+
var MAX_TOKEN_LENGTH = 8192;
|
|
14751
|
+
var gatewayTokenParamsSchema = external_exports.object({
|
|
14752
|
+
gatewayChannelId: external_exports.string().min(1).describe("Gateway channel whose credentials are being set."),
|
|
14753
|
+
channelType: external_exports.enum(["slack", "discord", "whatsapp", "telegram", "github", "teams"]).describe("Platform type of the channel; drives per-field placeholders."),
|
|
14754
|
+
channelName: external_exports.string().min(1).max(200).describe("Human-readable channel name for the form heading and prompts."),
|
|
14755
|
+
fields: external_exports.array(external_exports.enum(GATEWAY_SENSITIVE_CONFIG_FIELDS)).min(1).max(GATEWAY_SENSITIVE_CONFIG_FIELDS.length).refine((fields) => new Set(fields).size === fields.length, {
|
|
14756
|
+
message: "Token field names must be unique"
|
|
14757
|
+
}).describe("Secret config field names to collect (subset of the sensitive fields)."),
|
|
14758
|
+
reason: external_exports.string().min(1).max(200).describe("One sentence explaining why the tokens are needed. Renders as a muted line.")
|
|
14759
|
+
}).strict();
|
|
14760
|
+
var gatewayTokenSubmitSchema = external_exports.object({
|
|
14761
|
+
tokens: external_exports.partialRecord(
|
|
14762
|
+
external_exports.enum(GATEWAY_SENSITIVE_CONFIG_FIELDS),
|
|
14763
|
+
external_exports.string().min(1).max(MAX_TOKEN_LENGTH)
|
|
14764
|
+
).describe("Map of sensitive field name \u2192 credential value.")
|
|
14765
|
+
}).strict();
|
|
14766
|
+
|
|
14670
14767
|
// src/mcp/server.ts
|
|
14671
14768
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
14672
14769
|
import { shortId as shortId6, UserApiKeysRepository } from "@agor/core/db";
|
|
@@ -14678,7 +14775,11 @@ import { ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
|
14678
14775
|
|
|
14679
14776
|
// src/mcp/tokens.ts
|
|
14680
14777
|
import { MCP_TOKEN } from "@agor/core/config";
|
|
14681
|
-
import {
|
|
14778
|
+
import {
|
|
14779
|
+
generateId as generateId2,
|
|
14780
|
+
SessionRepository as SessionRepository2,
|
|
14781
|
+
shortId
|
|
14782
|
+
} from "@agor/core/db";
|
|
14682
14783
|
import {
|
|
14683
14784
|
MCP_TOKEN_AUDIENCE,
|
|
14684
14785
|
MCP_TOKEN_ISSUER
|
|
@@ -14699,6 +14800,7 @@ var DOMAIN_DESCRIPTIONS = {
|
|
|
14699
14800
|
users: "User accounts, profiles, preferences, and administration",
|
|
14700
14801
|
analytics: "Usage and cost tracking leaderboard",
|
|
14701
14802
|
"mcp-servers": "External MCP server configuration and OAuth management",
|
|
14803
|
+
gateway: "Gateway channels for Slack, GitHub, Teams, and other message integrations",
|
|
14702
14804
|
proxies: "Configured HTTP proxies for third-party APIs (Shortcut, Linear, Jira, etc.)",
|
|
14703
14805
|
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",
|
|
14704
14806
|
knowledge: "DB-backed markdown knowledge documents, version history, search, and graph links",
|
|
@@ -14722,6 +14824,11 @@ function mcpOptionalString(fieldName, description) {
|
|
|
14722
14824
|
error: `${fieldName} must be a string when provided.`
|
|
14723
14825
|
}).optional().describe(description);
|
|
14724
14826
|
}
|
|
14827
|
+
function mcpOptionalNonEmptyString(fieldName, description) {
|
|
14828
|
+
return external_exports.string({
|
|
14829
|
+
error: `${fieldName} must be a string when provided.`
|
|
14830
|
+
}).min(1, `${fieldName} cannot be empty when provided.`).optional().describe(description);
|
|
14831
|
+
}
|
|
14725
14832
|
function mcpOptionalNonBlankString(fieldName, description) {
|
|
14726
14833
|
return external_exports.string({
|
|
14727
14834
|
error: `${fieldName} must be a string when provided.`
|
|
@@ -14742,6 +14849,14 @@ function mcpRequiredPositiveInt(fieldName, description) {
|
|
|
14742
14849
|
error: `${fieldName} is required and must be a positive integer.`
|
|
14743
14850
|
}).int(`${fieldName} must be an integer.`).positive(`${fieldName} must be greater than 0.`).describe(description);
|
|
14744
14851
|
}
|
|
14852
|
+
function mcpOptionalPositiveInt(fieldName, description) {
|
|
14853
|
+
return external_exports.number({
|
|
14854
|
+
error: `${fieldName} must be a positive integer when provided.`
|
|
14855
|
+
}).int(`${fieldName} must be an integer.`).positive(`${fieldName} must be greater than 0.`).optional().describe(description);
|
|
14856
|
+
}
|
|
14857
|
+
function mcpLimit(defaultValue = 50) {
|
|
14858
|
+
return mcpOptionalPositiveInt("limit", `Maximum number of results (default: ${defaultValue})`);
|
|
14859
|
+
}
|
|
14745
14860
|
|
|
14746
14861
|
// src/mcp/tools/artifacts.ts
|
|
14747
14862
|
import path from "path";
|
|
@@ -14750,8 +14865,8 @@ import { NotFoundError } from "@agor/core/utils/errors";
|
|
|
14750
14865
|
|
|
14751
14866
|
// src/utils/branch-authorization.ts
|
|
14752
14867
|
import { shortId as shortId2 } from "@agor/core/db";
|
|
14753
|
-
import { Forbidden, NotAuthenticated, NotFound } from "@agor/core/feathers";
|
|
14754
|
-
import { BRANCH_PERMISSION_LEVELS, hasMinimumRole, ROLES } from "@agor/core/types";
|
|
14868
|
+
import { Forbidden as Forbidden2, NotAuthenticated, NotFound } from "@agor/core/feathers";
|
|
14869
|
+
import { BRANCH_PERMISSION_LEVELS, hasMinimumRole as hasMinimumRole2, ROLES as ROLES2 } from "@agor/core/types";
|
|
14755
14870
|
var PERMISSION_RANK = Object.fromEntries(
|
|
14756
14871
|
BRANCH_PERMISSION_LEVELS.map((level, i) => [level, i - 1])
|
|
14757
14872
|
);
|
|
@@ -14801,7 +14916,7 @@ var AgorRuntimeSchema = external_exports.object({
|
|
|
14801
14916
|
|
|
14802
14917
|
// src/mcp/tools/branches.ts
|
|
14803
14918
|
import { existsSync } from "fs";
|
|
14804
|
-
import { isBranchRbacEnabled } from "@agor/core/config";
|
|
14919
|
+
import { isBranchRbacEnabled, loadConfig } from "@agor/core/config";
|
|
14805
14920
|
import { BranchRepository as BranchRepository2, shortId as shortId3 } from "@agor/core/db";
|
|
14806
14921
|
import { BRANCH_PERMISSION_LEVELS as BRANCH_PERMISSION_LEVELS2, getAssistantConfig, isAssistant } from "@agor/core/types";
|
|
14807
14922
|
import { computeZoneRelativePosition } from "@agor/core/utils/board-placement";
|
|
@@ -14810,12 +14925,211 @@ import { normalizeOptionalHttpUrl } from "@agor/core/utils/url";
|
|
|
14810
14925
|
// src/mcp/tools/cards.ts
|
|
14811
14926
|
import { BoardObjectRepository } from "@agor/core/db";
|
|
14812
14927
|
|
|
14928
|
+
// src/mcp/tools/gateway-channels.ts
|
|
14929
|
+
import {
|
|
14930
|
+
BranchRepository as BranchRepository3,
|
|
14931
|
+
GatewayChannelRepository,
|
|
14932
|
+
SessionRepository as SessionRepository3,
|
|
14933
|
+
ThreadSessionMapRepository
|
|
14934
|
+
} from "@agor/core/db";
|
|
14935
|
+
import {
|
|
14936
|
+
buildSlackManifest,
|
|
14937
|
+
getConnector,
|
|
14938
|
+
requiredBotEvents,
|
|
14939
|
+
requiredBotScopes
|
|
14940
|
+
} from "@agor/core/gateway";
|
|
14941
|
+
import {
|
|
14942
|
+
GATEWAY_REDACTED_SENTINEL,
|
|
14943
|
+
GATEWAY_SENSITIVE_CONFIG_FIELDS as GATEWAY_SENSITIVE_CONFIG_FIELDS2,
|
|
14944
|
+
getRequiredSecretFields,
|
|
14945
|
+
hasMinimumRole as hasMinimumRole3,
|
|
14946
|
+
ROLES as ROLES3
|
|
14947
|
+
} from "@agor/core/types";
|
|
14948
|
+
var configSchema = external_exports.record(external_exports.string(), external_exports.unknown()).describe(
|
|
14949
|
+
"Platform-specific gateway configuration. Secrets are stored encrypted and returned redacted. Prefer env/template references for shared credentials where the connector supports them."
|
|
14950
|
+
);
|
|
14951
|
+
var outboundTargetSchema = external_exports.string().trim().regex(
|
|
14952
|
+
/^(channel:[^:\s]+|channel_name:[^\s]+|#[^\s]+|(?:email:|user_email:)?[^@\s]+@[^@\s]+\.[^@\s]+)$/
|
|
14953
|
+
).describe(
|
|
14954
|
+
"Slack outbound target for v0: channel:C123, #project-updates, channel_name:project-updates, or user@example.com. Thread targets are intentionally not supported."
|
|
14955
|
+
);
|
|
14956
|
+
var envVarSchema = external_exports.strictObject({
|
|
14957
|
+
key: mcpRequiredString("agenticConfig.envVars[].key", "Environment variable name"),
|
|
14958
|
+
value: mcpRequiredString(
|
|
14959
|
+
"agenticConfig.envVars[].value",
|
|
14960
|
+
`Environment variable value. Prefer references/templates over raw secrets. Existing redacted values may be passed as '${GATEWAY_REDACTED_SENTINEL}' on update to preserve them.`
|
|
14961
|
+
),
|
|
14962
|
+
forceOverride: external_exports.boolean().optional().describe("When true, channel value wins over user env vars. Defaults to false.")
|
|
14963
|
+
});
|
|
14964
|
+
var agenticConfigSchema = external_exports.strictObject({
|
|
14965
|
+
agent: external_exports.enum(["claude-code", "claude-code-cli", "codex", "gemini", "opencode", "copilot", "cursor"]).describe("Agent used for sessions created from this gateway channel."),
|
|
14966
|
+
permissionMode: external_exports.enum([
|
|
14967
|
+
"default",
|
|
14968
|
+
"acceptEdits",
|
|
14969
|
+
"bypassPermissions",
|
|
14970
|
+
"plan",
|
|
14971
|
+
"dontAsk",
|
|
14972
|
+
"autoEdit",
|
|
14973
|
+
"yolo",
|
|
14974
|
+
"ask",
|
|
14975
|
+
"auto",
|
|
14976
|
+
"on-failure",
|
|
14977
|
+
"allow-all"
|
|
14978
|
+
]).optional().describe("Permission mode for spawned sessions."),
|
|
14979
|
+
modelConfig: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("Agent model configuration."),
|
|
14980
|
+
mcpServerIds: external_exports.array(external_exports.string().min(1)).optional().describe("MCP server IDs to attach to gateway-created sessions."),
|
|
14981
|
+
codexSandboxMode: external_exports.enum(["read-only", "workspace-write", "danger-full-access"]).optional().describe("Codex sandbox mode for Codex gateway sessions."),
|
|
14982
|
+
codexApprovalPolicy: external_exports.enum(["untrusted", "on-failure", "on-request", "never"]).optional().describe("Codex approval policy for Codex gateway sessions."),
|
|
14983
|
+
codexNetworkAccess: external_exports.boolean().optional().describe("Allow Codex network access."),
|
|
14984
|
+
envVars: external_exports.array(envVarSchema).optional().describe("Gateway-level env vars. Values are redacted in responses.")
|
|
14985
|
+
}).describe("Agent/session defaults for conversations created through this gateway channel.");
|
|
14986
|
+
var gatewayChannelCreateSchema = external_exports.strictObject({
|
|
14987
|
+
name: mcpRequiredString("name", 'Human-readable channel name, e.g. "Engineering Slack".'),
|
|
14988
|
+
channelType: external_exports.enum(["slack", "github", "teams", "discord", "whatsapp", "telegram"]).default("slack").describe("Gateway platform type. Current active connectors are slack, github, and teams."),
|
|
14989
|
+
targetBranchId: mcpRequiredId(
|
|
14990
|
+
"targetBranchId",
|
|
14991
|
+
"Branch",
|
|
14992
|
+
"Branch/worktree ID that this gateway channel prompts."
|
|
14993
|
+
),
|
|
14994
|
+
agorUserId: mcpOptionalId(
|
|
14995
|
+
"agorUserId",
|
|
14996
|
+
"User",
|
|
14997
|
+
"Agor user ID whose identity is used when platform-user alignment is disabled."
|
|
14998
|
+
),
|
|
14999
|
+
enabled: external_exports.boolean().optional().describe("Whether the channel is active. Defaults to true."),
|
|
15000
|
+
config: configSchema,
|
|
15001
|
+
agenticConfig: agenticConfigSchema.optional()
|
|
15002
|
+
}).superRefine((value, issue2) => {
|
|
15003
|
+
const config2 = value.config ?? {};
|
|
15004
|
+
if (value.enabled !== false) {
|
|
15005
|
+
const requiredSecretMessages = {
|
|
15006
|
+
bot_token: "config.bot_token is required for Slack. Prefer a bot token stored outside the transcript when possible.",
|
|
15007
|
+
app_token: "config.app_token is required for Slack Socket Mode.",
|
|
15008
|
+
private_key: "config.private_key is required for GitHub gateway channels.",
|
|
15009
|
+
app_password: "config.app_password is required for Teams gateway channels."
|
|
15010
|
+
};
|
|
15011
|
+
for (const field of getRequiredSecretFields(value.channelType, config2)) {
|
|
15012
|
+
if (!config2[field]) {
|
|
15013
|
+
issue2.addIssue({
|
|
15014
|
+
code: "custom",
|
|
15015
|
+
path: ["config", field],
|
|
15016
|
+
message: requiredSecretMessages[field] ?? `config.${field} is required for ${value.channelType} gateway channels.`
|
|
15017
|
+
});
|
|
15018
|
+
}
|
|
15019
|
+
}
|
|
15020
|
+
}
|
|
15021
|
+
if (value.channelType === "github") {
|
|
15022
|
+
for (const field of ["app_id", "installation_id", "watch_repos"]) {
|
|
15023
|
+
if (!config2[field]) {
|
|
15024
|
+
issue2.addIssue({
|
|
15025
|
+
code: "custom",
|
|
15026
|
+
path: ["config", field],
|
|
15027
|
+
message: `config.${field} is required for GitHub gateway channels.`
|
|
15028
|
+
});
|
|
15029
|
+
}
|
|
15030
|
+
}
|
|
15031
|
+
}
|
|
15032
|
+
if (value.channelType === "teams" && !config2.app_id) {
|
|
15033
|
+
issue2.addIssue({
|
|
15034
|
+
code: "custom",
|
|
15035
|
+
path: ["config", "app_id"],
|
|
15036
|
+
message: "config.app_id is required for Teams gateway channels."
|
|
15037
|
+
});
|
|
15038
|
+
}
|
|
15039
|
+
if (value.channelType === "slack" && config2.align_slack_users !== true && !value.agorUserId) {
|
|
15040
|
+
issue2.addIssue({
|
|
15041
|
+
code: "custom",
|
|
15042
|
+
path: ["agorUserId"],
|
|
15043
|
+
message: "Run-as-selected-user needs agorUserId \u2014 set config.align_slack_users:true to align by email, or pass agorUserId."
|
|
15044
|
+
});
|
|
15045
|
+
}
|
|
15046
|
+
});
|
|
15047
|
+
var slackThreadHistorySchema = external_exports.strictObject({
|
|
15048
|
+
sessionId: mcpOptionalId(
|
|
15049
|
+
"sessionId",
|
|
15050
|
+
"Session",
|
|
15051
|
+
"Preferred: resolve the Slack thread mapping from an accessible Agor session ID (UUIDv7 or short ID). If provided, gatewayChannelId/threadId are ignored."
|
|
15052
|
+
),
|
|
15053
|
+
gatewayChannelId: mcpOptionalId(
|
|
15054
|
+
"gatewayChannelId",
|
|
15055
|
+
"Gateway channel",
|
|
15056
|
+
"Explicit Slack gateway channel ID (UUIDv7 or short ID). Required when sessionId is omitted."
|
|
15057
|
+
),
|
|
15058
|
+
threadId: mcpOptionalNonEmptyString(
|
|
15059
|
+
"threadId",
|
|
15060
|
+
"Explicit Slack thread ID in Agor gateway format, e.g. C123-171234.000100. Required when sessionId is omitted."
|
|
15061
|
+
),
|
|
15062
|
+
oldestTs: mcpOptionalNonEmptyString(
|
|
15063
|
+
"oldestTs",
|
|
15064
|
+
"Optional Slack oldest timestamp bound, e.g. 171234.000100."
|
|
15065
|
+
),
|
|
15066
|
+
latestTs: mcpOptionalNonEmptyString(
|
|
15067
|
+
"latestTs",
|
|
15068
|
+
"Optional Slack latest timestamp bound, e.g. 171235.000200."
|
|
15069
|
+
),
|
|
15070
|
+
inclusive: external_exports.boolean().optional().describe("Whether Slack should include messages exactly at oldest/latest bounds."),
|
|
15071
|
+
limit: mcpLimit(50).describe("Maximum Slack messages to request (default: 50, max: 200)."),
|
|
15072
|
+
includeBotMessages: external_exports.boolean().optional().describe("Include Slack bot messages in the returned history. Defaults to false."),
|
|
15073
|
+
format: external_exports.enum(["messages", "markdown"]).optional().describe(
|
|
15074
|
+
'Response body format. "messages" returns normalized JSON; "markdown" returns a transcript string.'
|
|
15075
|
+
)
|
|
15076
|
+
}).superRefine((value, issue2) => {
|
|
15077
|
+
if (value.sessionId) return;
|
|
15078
|
+
if (!value.gatewayChannelId) {
|
|
15079
|
+
issue2.addIssue({
|
|
15080
|
+
code: "custom",
|
|
15081
|
+
path: ["gatewayChannelId"],
|
|
15082
|
+
message: "gatewayChannelId is required when sessionId is omitted."
|
|
15083
|
+
});
|
|
15084
|
+
}
|
|
15085
|
+
if (!value.threadId) {
|
|
15086
|
+
issue2.addIssue({
|
|
15087
|
+
code: "custom",
|
|
15088
|
+
path: ["threadId"],
|
|
15089
|
+
message: "threadId is required when sessionId is omitted."
|
|
15090
|
+
});
|
|
15091
|
+
}
|
|
15092
|
+
});
|
|
15093
|
+
var gatewayChannelUpdateSchema = external_exports.strictObject({
|
|
15094
|
+
gatewayChannelId: mcpRequiredId(
|
|
15095
|
+
"gatewayChannelId",
|
|
15096
|
+
"Gateway channel",
|
|
15097
|
+
"Gateway channel ID (UUIDv7 or short ID)"
|
|
15098
|
+
),
|
|
15099
|
+
name: mcpOptionalNonEmptyString("name", "New human-readable channel name."),
|
|
15100
|
+
channelType: external_exports.enum(["slack", "github", "teams", "discord", "whatsapp", "telegram"]).optional().describe("Gateway platform type. Changing this should include compatible config."),
|
|
15101
|
+
targetBranchId: mcpOptionalId("targetBranchId", "Branch", "New target branch/worktree ID."),
|
|
15102
|
+
agorUserId: mcpOptionalId("agorUserId", "User", "New run-as Agor user ID."),
|
|
15103
|
+
enabled: external_exports.boolean().optional().describe("Enable/disable the channel."),
|
|
15104
|
+
config: configSchema.optional().describe(
|
|
15105
|
+
`Partial platform config to merge. Send '${GATEWAY_REDACTED_SENTINEL}' or omit sensitive fields to preserve existing secrets; send a new value to rotate.`
|
|
15106
|
+
),
|
|
15107
|
+
agenticConfig: agenticConfigSchema.nullable().optional().describe("Replace agent/session defaults. null clears the gateway agentic config.")
|
|
15108
|
+
});
|
|
15109
|
+
var slackManifestGenerateSchema = external_exports.strictObject({
|
|
15110
|
+
appName: mcpRequiredString("appName", 'Slack app display name, e.g. "Agor".'),
|
|
15111
|
+
botDisplayName: mcpOptionalNonEmptyString(
|
|
15112
|
+
"botDisplayName",
|
|
15113
|
+
"Bot user display name. Defaults to appName."
|
|
15114
|
+
),
|
|
15115
|
+
publicChannels: external_exports.boolean().default(false).describe("Listen in public channels (#channel) via @mention."),
|
|
15116
|
+
privateChannels: external_exports.boolean().default(false).describe("Listen in private channels (groups) via @mention."),
|
|
15117
|
+
groupDms: external_exports.boolean().default(false).describe("Listen in group DMs (multi-person IMs) via @mention."),
|
|
15118
|
+
alignUsers: external_exports.boolean().default(true).describe(
|
|
15119
|
+
"Resolve Slack user email \u2192 Agor user (adds the users:read.email scope). Defaults to true: each Slack user runs as their matched Agor account and unmatched users are rejected, so no fixed run-as user is needed. Set false to run every message as one fixed Agor user (then pass agorUserId to agor_gateway_channels_create)."
|
|
15120
|
+
),
|
|
15121
|
+
outbound: external_exports.boolean().default(false).describe("Proactive outbound: post to channels by name and DM users by email."),
|
|
15122
|
+
restrictToChannelIds: external_exports.array(external_exports.string().min(1)).optional().describe(
|
|
15123
|
+
"Slack channel ID whitelist. Maps to config.allowed_channel_ids when you call agor_gateway_channels_create; it does NOT change the manifest scopes or events."
|
|
15124
|
+
)
|
|
15125
|
+
});
|
|
15126
|
+
|
|
14813
15127
|
// src/mcp/tools/knowledge.ts
|
|
14814
15128
|
import { createHash, randomUUID } from "crypto";
|
|
14815
15129
|
import fs2 from "fs";
|
|
14816
15130
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
14817
15131
|
import path3 from "path";
|
|
14818
|
-
import { BranchRepository as
|
|
15132
|
+
import { BranchRepository as BranchRepository5, KnowledgeNamespaceRepository as KnowledgeNamespaceRepository2 } from "@agor/core/db";
|
|
14819
15133
|
import { NotFound as NotFound2 } from "@agor/core/feathers";
|
|
14820
15134
|
import {
|
|
14821
15135
|
buildKnowledgeDocumentUri,
|
|
@@ -14841,14 +15155,14 @@ import { unified } from "unified";
|
|
|
14841
15155
|
|
|
14842
15156
|
// src/services/assistant-knowledge.ts
|
|
14843
15157
|
import {
|
|
14844
|
-
BranchRepository as
|
|
15158
|
+
BranchRepository as BranchRepository4,
|
|
14845
15159
|
KnowledgeNamespaceRepository,
|
|
14846
15160
|
shortId as shortId4
|
|
14847
15161
|
} from "@agor/core/db";
|
|
14848
15162
|
import { getAssistantConfig as getAssistantConfig2, isAssistant as isAssistant2 } from "@agor/core/types";
|
|
14849
15163
|
|
|
14850
15164
|
// src/services/knowledge-access.ts
|
|
14851
|
-
import { hasMinimumRole as
|
|
15165
|
+
import { hasMinimumRole as hasMinimumRole4, ROLES as ROLES4 } from "@agor/core/types";
|
|
14852
15166
|
|
|
14853
15167
|
// src/utils/branch-workspace-path.ts
|
|
14854
15168
|
import fs from "fs";
|
|
@@ -14990,6 +15304,261 @@ var KnowledgeNodeRefSchema = external_exports.object(
|
|
|
14990
15304
|
"Reference to an existing or creatable knowledge graph node. Prefer nodeId or uri; use typed IDs for links to Agor core objects."
|
|
14991
15305
|
);
|
|
14992
15306
|
|
|
15307
|
+
// src/mcp/tools/mcp-servers.ts
|
|
15308
|
+
import {
|
|
15309
|
+
isReservedMCPCustomHeaderName,
|
|
15310
|
+
isValidMCPHeaderName
|
|
15311
|
+
} from "@agor/core/tools/mcp/http-headers";
|
|
15312
|
+
var mcpNameSchema = external_exports.string({
|
|
15313
|
+
error: 'name is required and must be a string. Example: { "name": "context7" }'
|
|
15314
|
+
}).regex(
|
|
15315
|
+
/^[a-z][a-z0-9_-]{0,63}$/,
|
|
15316
|
+
'name must start with a lowercase letter and contain only lowercase letters, digits, "_" or "-" (max 64 chars).'
|
|
15317
|
+
).describe('Stable internal ID, e.g. "context7", "github", "datadog". Cannot be changed later.');
|
|
15318
|
+
var stringMapSchema = external_exports.record(external_exports.string(), external_exports.string()).describe(
|
|
15319
|
+
"JSON object of string keys/values. Values may use templates like {{ user.env.API_TOKEN }}."
|
|
15320
|
+
);
|
|
15321
|
+
var mcpAuthInputSchema = external_exports.strictObject({
|
|
15322
|
+
type: external_exports.enum(["none", "bearer", "jwt", "oauth"]).describe(
|
|
15323
|
+
"Authentication mode. OAuth tip: start with { type: 'oauth' } plus the MCP server URL; only add endpoint/client fields if discovery/DCR fails."
|
|
15324
|
+
),
|
|
15325
|
+
token: mcpOptionalString(
|
|
15326
|
+
"auth.token",
|
|
15327
|
+
"Bearer token. Prefer {{ user.env.MCP_TOKEN }} templates; raw secrets will be stored redacted but are still visible in this MCP call transcript."
|
|
15328
|
+
),
|
|
15329
|
+
api_url: mcpOptionalString("auth.api_url", "JWT auth API URL."),
|
|
15330
|
+
api_token: mcpOptionalString(
|
|
15331
|
+
"auth.api_token",
|
|
15332
|
+
"JWT API token. Prefer {{ user.env.JWT_TOKEN }} templates."
|
|
15333
|
+
),
|
|
15334
|
+
api_secret: mcpOptionalString(
|
|
15335
|
+
"auth.api_secret",
|
|
15336
|
+
"JWT API secret. Prefer {{ user.env.JWT_SECRET }} templates."
|
|
15337
|
+
),
|
|
15338
|
+
oauth_authorization_url: mcpOptionalString(
|
|
15339
|
+
"auth.oauth_authorization_url",
|
|
15340
|
+
"Optional OAuth authorization endpoint override. Leave blank for discovery."
|
|
15341
|
+
),
|
|
15342
|
+
oauth_token_url: mcpOptionalString(
|
|
15343
|
+
"auth.oauth_token_url",
|
|
15344
|
+
"Optional OAuth token endpoint override. Leave blank for discovery."
|
|
15345
|
+
),
|
|
15346
|
+
oauth_client_id: mcpOptionalString(
|
|
15347
|
+
"auth.oauth_client_id",
|
|
15348
|
+
"Optional OAuth client ID for providers that require a pre-registered app. Leave blank for Dynamic Client Registration where supported."
|
|
15349
|
+
),
|
|
15350
|
+
oauth_client_secret: mcpOptionalString(
|
|
15351
|
+
"auth.oauth_client_secret",
|
|
15352
|
+
"Optional OAuth client secret. Prefer {{ user.env.OAUTH_CLIENT_SECRET }} templates; raw secrets are not returned by this tool."
|
|
15353
|
+
),
|
|
15354
|
+
oauth_scope: mcpOptionalString("auth.oauth_scope", "Optional OAuth scopes, space-separated."),
|
|
15355
|
+
oauth_grant_type: external_exports.enum(["client_credentials", "authorization_code"]).optional().describe(
|
|
15356
|
+
"OAuth grant type hint. Defaults to 'client_credentials' for legacy token testing; browser OAuth uses authorization code with PKCE."
|
|
15357
|
+
),
|
|
15358
|
+
oauth_mode: external_exports.enum(["per_user", "shared"]).optional().describe("OAuth token ownership. Defaults to 'per_user' (recommended)."),
|
|
15359
|
+
insecure: external_exports.boolean().optional().describe("Allow insecure auth behavior if supported.")
|
|
15360
|
+
}).superRefine((auth, issue2) => {
|
|
15361
|
+
if (auth.type === "bearer" && !auth.token) {
|
|
15362
|
+
issue2.addIssue({
|
|
15363
|
+
code: "custom",
|
|
15364
|
+
path: ["token"],
|
|
15365
|
+
message: "auth.token is required when auth.type is 'bearer'."
|
|
15366
|
+
});
|
|
15367
|
+
}
|
|
15368
|
+
const fieldsByType = {
|
|
15369
|
+
none: [],
|
|
15370
|
+
bearer: ["token"],
|
|
15371
|
+
jwt: ["api_url", "api_token", "api_secret"],
|
|
15372
|
+
oauth: [
|
|
15373
|
+
"oauth_authorization_url",
|
|
15374
|
+
"oauth_token_url",
|
|
15375
|
+
"oauth_client_id",
|
|
15376
|
+
"oauth_client_secret",
|
|
15377
|
+
"oauth_scope",
|
|
15378
|
+
"oauth_grant_type",
|
|
15379
|
+
"oauth_mode",
|
|
15380
|
+
"insecure"
|
|
15381
|
+
]
|
|
15382
|
+
};
|
|
15383
|
+
const allowed = /* @__PURE__ */ new Set(["type", ...fieldsByType[auth.type]]);
|
|
15384
|
+
for (const key of Object.keys(auth)) {
|
|
15385
|
+
if (!allowed.has(key)) {
|
|
15386
|
+
issue2.addIssue({
|
|
15387
|
+
code: "custom",
|
|
15388
|
+
path: [key],
|
|
15389
|
+
message: `auth.${key} does not apply when auth.type is '${auth.type}'.`
|
|
15390
|
+
});
|
|
15391
|
+
}
|
|
15392
|
+
}
|
|
15393
|
+
if (auth.type === "jwt") {
|
|
15394
|
+
for (const field of ["api_url", "api_token", "api_secret"]) {
|
|
15395
|
+
if (!auth[field]) {
|
|
15396
|
+
issue2.addIssue({
|
|
15397
|
+
code: "custom",
|
|
15398
|
+
path: [field],
|
|
15399
|
+
message: `auth.${field} is required when auth.type is 'jwt'.`
|
|
15400
|
+
});
|
|
15401
|
+
}
|
|
15402
|
+
}
|
|
15403
|
+
}
|
|
15404
|
+
}).describe(
|
|
15405
|
+
"Auth config. Common OAuth path: { type: 'oauth' } plus url; leave OAuth URLs/client fields blank first so metadata discovery/DCR can do the work."
|
|
15406
|
+
);
|
|
15407
|
+
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' }.");
|
|
15408
|
+
var mcpServerCreateSchema = external_exports.strictObject({
|
|
15409
|
+
name: mcpNameSchema,
|
|
15410
|
+
displayName: mcpOptionalNonEmptyString(
|
|
15411
|
+
"displayName",
|
|
15412
|
+
'Human-friendly display name, e.g. "Context7 MCP".'
|
|
15413
|
+
),
|
|
15414
|
+
description: mcpOptionalString("description", "Optional description."),
|
|
15415
|
+
transport: external_exports.enum(["stdio", "http", "sse"]).optional().describe(
|
|
15416
|
+
"Transport. Defaults to 'http' when url is provided, otherwise 'stdio'. Most remote OAuth MCP servers use 'http'."
|
|
15417
|
+
),
|
|
15418
|
+
url: mcpOptionalString(
|
|
15419
|
+
"url",
|
|
15420
|
+
"Remote MCP server URL for http/sse transports. Supports templates like {{ user.env.MCP_URL }}."
|
|
15421
|
+
),
|
|
15422
|
+
command: mcpOptionalString("command", 'Local command for stdio transport, e.g. "npx".'),
|
|
15423
|
+
args: external_exports.array(external_exports.string()).optional().describe(
|
|
15424
|
+
'Arguments for stdio command, e.g. ["-y", "@modelcontextprotocol/server-filesystem"].'
|
|
15425
|
+
),
|
|
15426
|
+
headers: stringMapSchema.optional().describe(
|
|
15427
|
+
"Custom HTTP headers for http/sse transports. Do not include Authorization; use auth instead. Prefer templates for secret values."
|
|
15428
|
+
),
|
|
15429
|
+
env: stringMapSchema.optional().describe(
|
|
15430
|
+
"Environment variables for the MCP process/config. Prefer {{ user.env.VAR }} templates for secrets."
|
|
15431
|
+
),
|
|
15432
|
+
auth: mcpAuthInputSchema.optional(),
|
|
15433
|
+
scope: external_exports.enum(["global", "session"]).optional().describe(
|
|
15434
|
+
"Scope. Defaults to 'global' so it appears in agor_mcp_servers_list. 'session' is only for explicit session attachment workflows."
|
|
15435
|
+
),
|
|
15436
|
+
enabled: external_exports.boolean().optional().describe("Whether the server is enabled. Defaults to true."),
|
|
15437
|
+
attachToCurrentSession: external_exports.boolean().optional().describe(
|
|
15438
|
+
`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.`
|
|
15439
|
+
),
|
|
15440
|
+
attachToSessionId: mcpOptionalId(
|
|
15441
|
+
"attachToSessionId",
|
|
15442
|
+
"Session",
|
|
15443
|
+
"Optional session ID (UUIDv7 or short ID) to attach after creating. Overrides attachToCurrentSession."
|
|
15444
|
+
)
|
|
15445
|
+
}).superRefine((value, issue2) => validateMcpServerConfig(value, issue2, false));
|
|
15446
|
+
var mcpServerUpdateSchema = external_exports.strictObject({
|
|
15447
|
+
mcpServerId: mcpRequiredId(
|
|
15448
|
+
"mcpServerId",
|
|
15449
|
+
"MCP server",
|
|
15450
|
+
"MCP server ID to update (UUIDv7 or short ID)"
|
|
15451
|
+
),
|
|
15452
|
+
displayName: mcpOptionalNonEmptyString("displayName", "New human-friendly display name."),
|
|
15453
|
+
description: mcpOptionalString(
|
|
15454
|
+
"description",
|
|
15455
|
+
"New description. Pass an empty string to clear."
|
|
15456
|
+
),
|
|
15457
|
+
transport: external_exports.enum(["stdio", "http", "sse"]).optional().describe("Transport to set."),
|
|
15458
|
+
url: mcpOptionalString("url", "Remote MCP URL for http/sse transports."),
|
|
15459
|
+
command: mcpOptionalString("command", "Local command for stdio transport."),
|
|
15460
|
+
args: external_exports.array(external_exports.string()).optional().describe("Arguments for stdio command."),
|
|
15461
|
+
headers: stringMapSchema.optional().describe(
|
|
15462
|
+
"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."
|
|
15463
|
+
),
|
|
15464
|
+
env: stringMapSchema.optional().describe("Replace environment variables."),
|
|
15465
|
+
auth: mcpAuthInputSchema.optional().describe(
|
|
15466
|
+
"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."
|
|
15467
|
+
),
|
|
15468
|
+
scope: external_exports.enum(["global", "session"]).optional().describe("Scope to set."),
|
|
15469
|
+
enabled: external_exports.boolean().optional().describe("Enabled flag."),
|
|
15470
|
+
toolPermissions: toolPermissionsSchema.optional()
|
|
15471
|
+
}).superRefine((value, issue2) => validateMcpServerConfig(value, issue2, true));
|
|
15472
|
+
function validateHeaders(headers, issue2) {
|
|
15473
|
+
if (!headers) return;
|
|
15474
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
15475
|
+
const name = key.trim();
|
|
15476
|
+
if (!name) {
|
|
15477
|
+
issue2.addIssue({
|
|
15478
|
+
code: "custom",
|
|
15479
|
+
path: ["headers", key],
|
|
15480
|
+
message: "Header names cannot be empty."
|
|
15481
|
+
});
|
|
15482
|
+
} else if (!isValidMCPHeaderName(name)) {
|
|
15483
|
+
issue2.addIssue({
|
|
15484
|
+
code: "custom",
|
|
15485
|
+
path: ["headers", key],
|
|
15486
|
+
message: `Invalid HTTP header name: ${key}`
|
|
15487
|
+
});
|
|
15488
|
+
} else if (isReservedMCPCustomHeaderName(name)) {
|
|
15489
|
+
issue2.addIssue({
|
|
15490
|
+
code: "custom",
|
|
15491
|
+
path: ["headers", key],
|
|
15492
|
+
message: `Header ${name} is reserved; configure Authorization through auth instead.`
|
|
15493
|
+
});
|
|
15494
|
+
}
|
|
15495
|
+
if (typeof value !== "string") {
|
|
15496
|
+
issue2.addIssue({
|
|
15497
|
+
code: "custom",
|
|
15498
|
+
path: ["headers", key],
|
|
15499
|
+
message: "Header values must be strings."
|
|
15500
|
+
});
|
|
15501
|
+
}
|
|
15502
|
+
}
|
|
15503
|
+
}
|
|
15504
|
+
function validateMcpServerConfig(value, issue2, partial2) {
|
|
15505
|
+
const transport = value.transport ?? (value.url ? "http" : "stdio");
|
|
15506
|
+
validateHeaders(value.headers, issue2);
|
|
15507
|
+
if (!partial2 || value.transport !== void 0 || value.url !== void 0 || value.command !== void 0) {
|
|
15508
|
+
if (transport === "stdio") {
|
|
15509
|
+
if (!partial2 && !value.command) {
|
|
15510
|
+
issue2.addIssue({
|
|
15511
|
+
code: "custom",
|
|
15512
|
+
path: ["command"],
|
|
15513
|
+
message: "command is required for stdio transport."
|
|
15514
|
+
});
|
|
15515
|
+
}
|
|
15516
|
+
if (value.url) {
|
|
15517
|
+
issue2.addIssue({
|
|
15518
|
+
code: "custom",
|
|
15519
|
+
path: ["url"],
|
|
15520
|
+
message: "url only applies to http/sse transports, not stdio."
|
|
15521
|
+
});
|
|
15522
|
+
}
|
|
15523
|
+
if (value.headers) {
|
|
15524
|
+
issue2.addIssue({
|
|
15525
|
+
code: "custom",
|
|
15526
|
+
path: ["headers"],
|
|
15527
|
+
message: "headers only apply to http/sse transports, not stdio."
|
|
15528
|
+
});
|
|
15529
|
+
}
|
|
15530
|
+
if (value.auth && value.auth.type !== "none") {
|
|
15531
|
+
issue2.addIssue({
|
|
15532
|
+
code: "custom",
|
|
15533
|
+
path: ["auth", "type"],
|
|
15534
|
+
message: "Authentication config only applies to http/sse transports."
|
|
15535
|
+
});
|
|
15536
|
+
}
|
|
15537
|
+
} else if (!partial2 && !value.url) {
|
|
15538
|
+
issue2.addIssue({
|
|
15539
|
+
code: "custom",
|
|
15540
|
+
path: ["url"],
|
|
15541
|
+
message: `url is required for ${transport} transport.`
|
|
15542
|
+
});
|
|
15543
|
+
} else {
|
|
15544
|
+
if (value.command) {
|
|
15545
|
+
issue2.addIssue({
|
|
15546
|
+
code: "custom",
|
|
15547
|
+
path: ["command"],
|
|
15548
|
+
message: "command only applies to stdio transport, not http/sse."
|
|
15549
|
+
});
|
|
15550
|
+
}
|
|
15551
|
+
if (value.args && value.args.length > 0) {
|
|
15552
|
+
issue2.addIssue({
|
|
15553
|
+
code: "custom",
|
|
15554
|
+
path: ["args"],
|
|
15555
|
+
message: "args only apply to stdio transport, not http/sse."
|
|
15556
|
+
});
|
|
15557
|
+
}
|
|
15558
|
+
}
|
|
15559
|
+
}
|
|
15560
|
+
}
|
|
15561
|
+
|
|
14993
15562
|
// src/mcp/tools/messages.ts
|
|
14994
15563
|
import { isBranchRbacEnabled as isBranchRbacEnabled2 } from "@agor/core/config";
|
|
14995
15564
|
import {
|
|
@@ -14997,16 +15566,18 @@ import {
|
|
|
14997
15566
|
asc,
|
|
14998
15567
|
desc,
|
|
14999
15568
|
eq,
|
|
15000
|
-
|
|
15569
|
+
gte,
|
|
15570
|
+
lte,
|
|
15001
15571
|
messages as messagesTable,
|
|
15002
15572
|
or,
|
|
15003
|
-
SessionRepository as SessionRepository3,
|
|
15004
15573
|
select,
|
|
15005
|
-
sql
|
|
15574
|
+
sql,
|
|
15575
|
+
visibleSessionReferenceAccessExists
|
|
15006
15576
|
} from "@agor/core/db";
|
|
15577
|
+
var MAX_CROSS_SESSION_SEARCH_WINDOW_MS = 31 * 24 * 60 * 60 * 1e3;
|
|
15007
15578
|
|
|
15008
15579
|
// src/mcp/tools/proxies.ts
|
|
15009
|
-
import { getBaseUrl, loadConfig, resolveProxies } from "@agor/core/config";
|
|
15580
|
+
import { getBaseUrl, loadConfig as loadConfig2, resolveProxies } from "@agor/core/config";
|
|
15010
15581
|
|
|
15011
15582
|
// src/mcp/tools/repos.ts
|
|
15012
15583
|
import { extractSlugFromUrl, isValidGitUrl, isValidSlug } from "@agor/core/config";
|
|
@@ -15018,7 +15589,7 @@ var agenticToolConfigSchema = external_exports.object({
|
|
|
15018
15589
|
model_config: external_exports.object({
|
|
15019
15590
|
mode: external_exports.enum(["alias", "exact"]).optional(),
|
|
15020
15591
|
model: mcpOptionalString("model_config.model", "Model name override."),
|
|
15021
|
-
effort: external_exports.enum(["low", "medium", "high", "max"]).optional(),
|
|
15592
|
+
effort: external_exports.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
|
|
15022
15593
|
advisorModel: mcpOptionalString(
|
|
15023
15594
|
"model_config.advisorModel",
|
|
15024
15595
|
"Claude Code advisor model override (e.g. 'opus', 'sonnet', 'fable')."
|
|
@@ -15034,7 +15605,7 @@ var agenticToolConfigSchema = external_exports.object({
|
|
|
15034
15605
|
|
|
15035
15606
|
// src/mcp/tools/sessions.ts
|
|
15036
15607
|
import {
|
|
15037
|
-
BranchRepository as
|
|
15608
|
+
BranchRepository as BranchRepository6,
|
|
15038
15609
|
SessionRelationshipRepository,
|
|
15039
15610
|
shortId as shortId5
|
|
15040
15611
|
} from "@agor/core/db";
|
|
@@ -15057,6 +15628,7 @@ import {
|
|
|
15057
15628
|
} from "@agor/core/types";
|
|
15058
15629
|
init_branch_inspect();
|
|
15059
15630
|
init_executor_read_impersonation();
|
|
15631
|
+
init_spawn_executor();
|
|
15060
15632
|
var modelConfigObjectSchema = external_exports.object({
|
|
15061
15633
|
mode: external_exports.enum(["alias", "exact"]).optional().describe("Model selection mode (default: 'alias')"),
|
|
15062
15634
|
// .min(1): reject empty-string model explicitly so callers don't silently
|
|
@@ -15065,7 +15637,7 @@ var modelConfigObjectSchema = external_exports.object({
|
|
|
15065
15637
|
"modelConfig.model",
|
|
15066
15638
|
"Model identifier (e.g. 'claude-opus-4-6', 'claude-sonnet-4-6')"
|
|
15067
15639
|
),
|
|
15068
|
-
effort: external_exports.enum(["low", "medium", "high", "max"]).optional().describe("Reasoning effort level (default: high)"),
|
|
15640
|
+
effort: external_exports.enum(["low", "medium", "high", "xhigh", "max"]).optional().describe("Reasoning effort level (default: high)"),
|
|
15069
15641
|
advisorModel: mcpOptionalString(
|
|
15070
15642
|
"modelConfig.advisorModel",
|
|
15071
15643
|
"Claude Code advisor model override (e.g. 'opus', 'sonnet', 'fable', or a full model ID)."
|
|
@@ -15086,7 +15658,7 @@ var modelConfigInputSchema = external_exports.union([
|
|
|
15086
15658
|
);
|
|
15087
15659
|
|
|
15088
15660
|
// src/mcp/tools/users.ts
|
|
15089
|
-
import { ROLES as
|
|
15661
|
+
import { ROLES as ROLES5 } from "@agor/core/types";
|
|
15090
15662
|
|
|
15091
15663
|
// src/mcp/server.ts
|
|
15092
15664
|
var DEBUG_MCP_REQUESTS = process.env.AGOR_DEBUG_MCP_REQUESTS === "1" || process.env.DEBUG?.includes("mcp-requests");
|
|
@@ -15133,6 +15705,11 @@ Continue or fork an existing session:
|
|
|
15133
15705
|
Discover tools: search domains/summaries \u2192 get details for one tool \u2192 execute`;
|
|
15134
15706
|
|
|
15135
15707
|
// src/mcp/tools/widgets.ts
|
|
15708
|
+
function requireAdmin(ctx, action) {
|
|
15709
|
+
if (!hasMinimumRole5(ctx.authenticatedUser?.role, ROLES6.ADMIN)) {
|
|
15710
|
+
throw new Error(`Access denied: admin role required to ${action}`);
|
|
15711
|
+
}
|
|
15712
|
+
}
|
|
15136
15713
|
function widgetContentPreview(params) {
|
|
15137
15714
|
const list = params.names.join(", ");
|
|
15138
15715
|
return params.names.length === 1 ? `Please provide ${list}: ${params.reason}` : `Please provide ${list}: ${params.reason}`;
|
|
@@ -15156,10 +15733,11 @@ function registerWidgetTools(server, ctx) {
|
|
|
15156
15733
|
async (args) => {
|
|
15157
15734
|
if (!ctx.sessionId) return sessionContextRequiredResult();
|
|
15158
15735
|
const currentSessionId = ctx.sessionId;
|
|
15159
|
-
const
|
|
15736
|
+
const toolParams = normalizeEnvVarsParams(envVarsParamsSchema.parse(args));
|
|
15160
15737
|
const session = await ctx.app.service("sessions").get(currentSessionId, ctx.baseServiceParams);
|
|
15161
15738
|
const sessionCreatorId = session.created_by;
|
|
15162
15739
|
const creator = await ctx.app.service("users").get(sessionCreatorId, ctx.baseServiceParams);
|
|
15740
|
+
const params = toolParams;
|
|
15163
15741
|
const presentEverywhere = allNamesPresentInScope(
|
|
15164
15742
|
creator.env_vars,
|
|
15165
15743
|
params.names,
|
|
@@ -15250,6 +15828,104 @@ function registerWidgetTools(server, ctx) {
|
|
|
15250
15828
|
return textResult({ widget_id: widgetId, status: "requested" });
|
|
15251
15829
|
}
|
|
15252
15830
|
);
|
|
15831
|
+
server.registerTool(
|
|
15832
|
+
"agor_widgets_request_gateway_token",
|
|
15833
|
+
{
|
|
15834
|
+
description: "Ask an admin to securely provide a gateway channel's platform tokens (Slack bot/app tokens, GitHub private key, Teams app password) via a compact form that appears at the end of your message, so setup finishes without anyone pasting xoxb-/xapp- tokens into chat. FIRE-AND-FORGET: the widget renders inline at the end of your turn; end your turn after calling. You will receive a user-role message when it is resolved. Token values never enter your context \u2014 only the channel identity and field NAMES do. Admin-only: a non-admin agent cannot mint this widget. Keep `reason` to ONE short sentence (\u2264200 chars).",
|
|
15835
|
+
annotations: { destructiveHint: false, openWorldHint: false },
|
|
15836
|
+
inputSchema: external_exports.object({
|
|
15837
|
+
gatewayChannelId: external_exports.string().min(1).describe("Gateway channel ID (UUIDv7 or short ID) whose tokens are being set."),
|
|
15838
|
+
reason: external_exports.string().max(200).optional().describe("One short sentence explaining why the tokens are needed.")
|
|
15839
|
+
})
|
|
15840
|
+
},
|
|
15841
|
+
async (args) => {
|
|
15842
|
+
if (!ctx.sessionId) return sessionContextRequiredResult();
|
|
15843
|
+
const currentSessionId = ctx.sessionId;
|
|
15844
|
+
requireAdmin(ctx, "set gateway channel tokens");
|
|
15845
|
+
const channel = await ctx.app.service("gateway-channels").get(args.gatewayChannelId, ctx.baseServiceParams);
|
|
15846
|
+
const channelType = channel.channel_type;
|
|
15847
|
+
if (!isSupportedGatewayTokenChannelType(channelType)) {
|
|
15848
|
+
throw new Error(
|
|
15849
|
+
`Gateway channel type "${channelType}" does not support token entry via this widget.`
|
|
15850
|
+
);
|
|
15851
|
+
}
|
|
15852
|
+
const fields = getRequiredSecretFields2(channelType, channel.config);
|
|
15853
|
+
if (fields.length === 0) {
|
|
15854
|
+
throw new Error(
|
|
15855
|
+
`Gateway channel "${channel.name}" has no required secret fields to collect.`
|
|
15856
|
+
);
|
|
15857
|
+
}
|
|
15858
|
+
const params = gatewayTokenParamsSchema.parse({
|
|
15859
|
+
gatewayChannelId: channel.id,
|
|
15860
|
+
channelType,
|
|
15861
|
+
channelName: channel.name,
|
|
15862
|
+
fields,
|
|
15863
|
+
reason: args.reason ?? `Provide the ${channelType} credentials to finish connecting "${channel.name}".`
|
|
15864
|
+
});
|
|
15865
|
+
const requestedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
15866
|
+
const baseWidgetMeta = {
|
|
15867
|
+
widget_type: "gateway_token",
|
|
15868
|
+
schema_version: 1,
|
|
15869
|
+
params,
|
|
15870
|
+
status: "pending",
|
|
15871
|
+
requested_at: requestedAt,
|
|
15872
|
+
auto_resume: true
|
|
15873
|
+
};
|
|
15874
|
+
const hostTask = await findHostTaskForSession(
|
|
15875
|
+
ctx.app,
|
|
15876
|
+
currentSessionId,
|
|
15877
|
+
ctx.baseServiceParams
|
|
15878
|
+
);
|
|
15879
|
+
const hostTaskId = hostTask?.task_id;
|
|
15880
|
+
const created = await appendSystemMessage({
|
|
15881
|
+
app: ctx.app,
|
|
15882
|
+
db: ctx.db,
|
|
15883
|
+
sessionId: currentSessionId,
|
|
15884
|
+
taskId: hostTaskId,
|
|
15885
|
+
content: `Please provide the ${channelType} tokens for "${channel.name}": ${params.reason}`,
|
|
15886
|
+
contentPreview: `Widget: gateway_token (${channel.name})`,
|
|
15887
|
+
type: "widget_request",
|
|
15888
|
+
role: MessageRole2.SYSTEM,
|
|
15889
|
+
metadata: {
|
|
15890
|
+
widget: {
|
|
15891
|
+
...baseWidgetMeta,
|
|
15892
|
+
widget_id: "pending"
|
|
15893
|
+
}
|
|
15894
|
+
}
|
|
15895
|
+
});
|
|
15896
|
+
const widgetId = created.message_id;
|
|
15897
|
+
if (hostTask?.message_range) {
|
|
15898
|
+
try {
|
|
15899
|
+
await ctx.app.service("tasks").patch(
|
|
15900
|
+
hostTask.task_id,
|
|
15901
|
+
{
|
|
15902
|
+
message_range: {
|
|
15903
|
+
start_index: hostTask.message_range.start_index,
|
|
15904
|
+
end_index: created.index
|
|
15905
|
+
}
|
|
15906
|
+
},
|
|
15907
|
+
ctx.baseServiceParams
|
|
15908
|
+
);
|
|
15909
|
+
} catch (err) {
|
|
15910
|
+
console.warn(
|
|
15911
|
+
`[widgets] failed to extend task.message_range for widget ${widgetId}:`,
|
|
15912
|
+
err
|
|
15913
|
+
);
|
|
15914
|
+
}
|
|
15915
|
+
}
|
|
15916
|
+
await ctx.app.service("messages").patch(
|
|
15917
|
+
widgetId,
|
|
15918
|
+
{
|
|
15919
|
+
metadata: {
|
|
15920
|
+
...created.metadata ?? {},
|
|
15921
|
+
widget: { ...baseWidgetMeta, widget_id: widgetId }
|
|
15922
|
+
}
|
|
15923
|
+
},
|
|
15924
|
+
ctx.baseServiceParams
|
|
15925
|
+
);
|
|
15926
|
+
return textResult({ widget_id: widgetId, status: "requested" });
|
|
15927
|
+
}
|
|
15928
|
+
);
|
|
15253
15929
|
}
|
|
15254
15930
|
export {
|
|
15255
15931
|
registerWidgetTools
|