agor-live 0.22.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/admin/add-to-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/add-to-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/add-to-branch-group.js +133 -33
- package/dist/cli/commands/admin/create-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/create-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/create-branch-group.js +132 -38
- package/dist/cli/commands/admin/create-symlink.d.ts +2 -14
- package/dist/cli/commands/admin/create-symlink.d.ts.map +1 -1
- package/dist/cli/commands/admin/create-symlink.js +138 -61
- package/dist/cli/commands/admin/delete-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/delete-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/delete-branch-group.js +132 -28
- package/dist/cli/commands/admin/delete-user.d.ts +2 -13
- package/dist/cli/commands/admin/delete-user.d.ts.map +1 -1
- package/dist/cli/commands/admin/delete-user.js +132 -38
- package/dist/cli/commands/admin/ensure-user.d.ts +2 -14
- package/dist/cli/commands/admin/ensure-user.d.ts.map +1 -1
- package/dist/cli/commands/admin/ensure-user.js +131 -46
- package/dist/cli/commands/admin/remove-from-branch-group.d.ts +2 -13
- package/dist/cli/commands/admin/remove-from-branch-group.d.ts.map +1 -1
- package/dist/cli/commands/admin/remove-from-branch-group.js +133 -33
- package/dist/cli/commands/admin/remove-symlink.d.ts +2 -14
- package/dist/cli/commands/admin/remove-symlink.d.ts.map +1 -1
- package/dist/cli/commands/admin/remove-symlink.js +136 -49
- package/dist/cli/commands/admin/scrub-git-remotes.d.ts +2 -2
- package/dist/cli/commands/admin/scrub-git-remotes.d.ts.map +1 -1
- package/dist/cli/commands/admin/scrub-git-remotes.js +128 -86
- package/dist/cli/commands/admin/sync-user-symlinks.d.ts +2 -14
- package/dist/cli/commands/admin/sync-user-symlinks.d.ts.map +1 -1
- package/dist/cli/commands/admin/sync-user-symlinks.js +132 -43
- package/dist/cli/commands/auth/whoami.d.ts.map +1 -1
- package/dist/cli/commands/auth/whoami.js +2 -1
- package/dist/cli/commands/branch/env/request.test.d.ts +2 -0
- package/dist/cli/commands/branch/env/request.test.d.ts.map +1 -0
- package/dist/cli/commands/branch/env/request.test.js +17723 -0
- package/dist/cli/commands/branch/env/restart.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/restart.js +7 -1
- package/dist/cli/commands/branch/env/start.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/start.js +7 -1
- package/dist/cli/commands/branch/env/stop.d.ts.map +1 -1
- package/dist/cli/commands/branch/env/stop.js +7 -1
- package/dist/cli/commands/daemon/status.d.ts.map +1 -1
- package/dist/cli/commands/daemon/status.js +2 -1
- package/dist/cli/commands/init.d.ts +6 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +140 -2
- package/dist/cli/commands/local/add-to-branch-group.d.ts +13 -0
- package/dist/cli/commands/local/add-to-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/add-to-branch-group.js +37 -0
- package/dist/cli/commands/local/create-branch-group.d.ts +12 -0
- package/dist/cli/commands/local/create-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/create-branch-group.js +35 -0
- package/dist/cli/commands/local/create-symlink.d.ts +14 -0
- package/dist/cli/commands/local/create-symlink.d.ts.map +1 -0
- package/dist/cli/commands/local/create-symlink.js +45 -0
- package/dist/cli/commands/{daemon → local/daemon}/sync.d.ts +1 -1
- package/dist/cli/commands/local/daemon/sync.d.ts.map +1 -0
- package/dist/cli/commands/{daemon → local/daemon}/sync.js +7 -6
- package/dist/cli/commands/local/delete-branch-group.d.ts +12 -0
- package/dist/cli/commands/local/delete-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/delete-branch-group.js +35 -0
- package/dist/cli/commands/local/delete-user.d.ts +12 -0
- package/dist/cli/commands/local/delete-user.d.ts.map +1 -0
- package/dist/cli/commands/local/delete-user.js +36 -0
- package/dist/cli/commands/local/ensure-user.d.ts +12 -0
- package/dist/cli/commands/local/ensure-user.d.ts.map +1 -0
- package/dist/cli/commands/local/ensure-user.js +41 -0
- package/dist/cli/commands/local/remove-from-branch-group.d.ts +13 -0
- package/dist/cli/commands/local/remove-from-branch-group.d.ts.map +1 -0
- package/dist/cli/commands/local/remove-from-branch-group.js +37 -0
- package/dist/cli/commands/local/remove-symlink.d.ts +13 -0
- package/dist/cli/commands/local/remove-symlink.d.ts.map +1 -0
- package/dist/cli/commands/local/remove-symlink.js +39 -0
- package/dist/cli/commands/local/scrub-git-remotes.d.ts +9 -0
- package/dist/cli/commands/local/scrub-git-remotes.d.ts.map +1 -0
- package/dist/cli/commands/local/scrub-git-remotes.js +23 -0
- package/dist/cli/commands/{admin → local}/sync-unix.d.ts.map +1 -1
- package/dist/cli/commands/{admin → local}/sync-unix.js +3 -3
- package/dist/cli/commands/local/sync-user-symlinks.d.ts +12 -0
- package/dist/cli/commands/local/sync-user-symlinks.d.ts.map +1 -0
- package/dist/cli/commands/local/sync-user-symlinks.js +37 -0
- package/dist/cli/commands/telemetry/index.d.ts +7 -0
- package/dist/cli/commands/telemetry/index.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/index.js +40 -0
- package/dist/cli/commands/telemetry/off.d.ts +6 -0
- package/dist/cli/commands/telemetry/off.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/off.js +35 -0
- package/dist/cli/commands/telemetry/on.d.ts +6 -0
- package/dist/cli/commands/telemetry/on.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/on.js +37 -0
- package/dist/cli/commands/telemetry/test.d.ts +6 -0
- package/dist/cli/commands/telemetry/test.d.ts.map +1 -0
- package/dist/cli/commands/telemetry/test.js +56 -0
- package/dist/cli/commands/user/create-admin.d.ts.map +1 -1
- package/dist/cli/commands/user/create-admin.js +81 -72
- package/dist/cli/commands/user/list.d.ts.map +1 -1
- package/dist/cli/commands/user/list.js +1 -0
- package/dist/cli/commands/whoami.js +2 -1
- package/dist/cli/lib/branch-environment-action.d.ts +21 -0
- package/dist/cli/lib/branch-environment-action.d.ts.map +1 -0
- package/dist/cli/lib/branch-environment-action.js +8 -0
- package/dist/core/api/index.cjs +7 -2
- package/dist/core/api/index.d.ts +13 -4
- package/dist/core/api/index.d.ts.map +1 -1
- package/dist/core/api/index.js +7 -2
- package/dist/core/claude/index.cjs +482 -77
- package/dist/core/claude/index.js +479 -76
- package/dist/core/claude-cli/index.cjs +11 -0
- package/dist/core/claude-cli/index.js +11 -0
- package/dist/core/claude-cli/pricing.d.ts.map +1 -1
- package/dist/core/client/index.cjs +35 -7
- package/dist/core/client/index.js +32 -7
- package/dist/core/config/browser.cjs +3 -5
- package/dist/core/config/browser.js +3 -5
- package/dist/core/config/config-manager.d.ts +33 -13
- package/dist/core/config/config-manager.d.ts.map +1 -1
- package/dist/core/config/index.cjs +4259 -4527
- package/dist/core/config/index.d.ts +1 -0
- package/dist/core/config/index.d.ts.map +1 -1
- package/dist/core/config/index.js +4295 -4583
- package/dist/core/config/key-resolver.d.ts.map +1 -1
- package/dist/core/config/multitenancy.d.ts +33 -0
- package/dist/core/config/multitenancy.d.ts.map +1 -0
- package/dist/core/config/security-resolver.d.ts +1 -0
- package/dist/core/config/security-resolver.d.ts.map +1 -1
- package/dist/core/config/types.d.ts +67 -4
- package/dist/core/config/types.d.ts.map +1 -1
- package/dist/core/db/client.d.ts +34 -2
- package/dist/core/db/client.d.ts.map +1 -1
- package/dist/core/db/database-wrapper.d.ts.map +1 -1
- package/dist/core/db/first-run-bootstrap.d.ts.map +1 -1
- package/dist/core/db/index.cjs +2422 -1084
- package/dist/core/db/index.d.ts +2 -1
- package/dist/core/db/index.d.ts.map +1 -1
- package/dist/core/db/index.js +2162 -852
- package/dist/core/db/migrate.d.ts.map +1 -1
- package/dist/core/db/repositories/artifacts.d.ts +27 -2
- package/dist/core/db/repositories/artifacts.d.ts.map +1 -1
- package/dist/core/db/repositories/base.d.ts +18 -0
- package/dist/core/db/repositories/base.d.ts.map +1 -1
- package/dist/core/db/repositories/board-comments.d.ts +17 -1
- package/dist/core/db/repositories/board-comments.d.ts.map +1 -1
- package/dist/core/db/repositories/board-objects.d.ts.map +1 -1
- package/dist/core/db/repositories/boards.d.ts +28 -4
- package/dist/core/db/repositories/boards.d.ts.map +1 -1
- package/dist/core/db/repositories/branch-access.d.ts +32 -0
- package/dist/core/db/repositories/branch-access.d.ts.map +1 -1
- package/dist/core/db/repositories/branches.d.ts +41 -1
- package/dist/core/db/repositories/branches.d.ts.map +1 -1
- package/dist/core/db/repositories/cards.d.ts +15 -1
- package/dist/core/db/repositories/cards.d.ts.map +1 -1
- package/dist/core/db/repositories/gateway-channels.d.ts.map +1 -1
- package/dist/core/db/repositories/gateway-outbound-messages.d.ts +19 -0
- package/dist/core/db/repositories/gateway-outbound-messages.d.ts.map +1 -0
- package/dist/core/db/repositories/index.d.ts +2 -0
- package/dist/core/db/repositories/index.d.ts.map +1 -1
- package/dist/core/db/repositories/messages.d.ts +9 -2
- package/dist/core/db/repositories/messages.d.ts.map +1 -1
- package/dist/core/db/repositories/repos.d.ts.map +1 -1
- package/dist/core/db/repositories/schedules.d.ts +12 -1
- package/dist/core/db/repositories/schedules.d.ts.map +1 -1
- package/dist/core/db/repositories/sessions.d.ts +49 -5
- package/dist/core/db/repositories/sessions.d.ts.map +1 -1
- package/dist/core/db/repositories/tasks.d.ts +7 -2
- package/dist/core/db/repositories/tasks.d.ts.map +1 -1
- package/dist/core/db/repositories/user-api-keys.d.ts +10 -1
- package/dist/core/db/repositories/user-api-keys.d.ts.map +1 -1
- package/dist/core/db/repositories/users.d.ts +8 -8
- package/dist/core/db/repositories/users.d.ts.map +1 -1
- package/dist/core/db/schema.d.ts +1460 -38
- package/dist/core/db/schema.d.ts.map +1 -1
- package/dist/core/db/schema.postgres.d.ts +1082 -37
- package/dist/core/db/schema.postgres.d.ts.map +1 -1
- package/dist/core/db/schema.sqlite.d.ts +397 -1
- package/dist/core/db/schema.sqlite.d.ts.map +1 -1
- package/dist/core/db/tenant-context.d.ts +26 -0
- package/dist/core/db/tenant-context.d.ts.map +1 -0
- package/dist/core/db/tenant-scope.d.ts +31 -0
- package/dist/core/db/tenant-scope.d.ts.map +1 -0
- package/dist/core/db/user-utils.d.ts +2 -2
- package/dist/core/db/user-utils.d.ts.map +1 -1
- package/dist/core/drizzle/postgres/0052_gateway_outbound_messages.sql +45 -0
- package/dist/core/drizzle/postgres/0053_user_token_invalidation.sql +1 -0
- package/dist/core/drizzle/postgres/0054_app_level_multitenancy.sql +219 -0
- package/dist/core/drizzle/postgres/0055_app_level_multitenancy_rls.sql +411 -0
- package/dist/core/drizzle/postgres/0056_composite_indexes.sql +15 -0
- package/dist/core/drizzle/postgres/0057_message_timestamp_indexes.sql +3 -0
- package/dist/core/drizzle/postgres/meta/_journal.json +42 -0
- package/dist/core/drizzle/sqlite/0061_gateway_outbound_messages.sql +38 -0
- package/dist/core/drizzle/sqlite/0062_user_token_invalidation.sql +1 -0
- package/dist/core/drizzle/sqlite/0063_composite_indexes.sql +10 -0
- package/dist/core/drizzle/sqlite/0064_message_timestamp_indexes.sql +2 -0
- package/dist/core/drizzle/sqlite/meta/_journal.json +28 -0
- package/dist/core/environment/render-snapshot.cjs +1 -4
- package/dist/core/environment/render-snapshot.js +1 -4
- package/dist/core/environment/webhook.cjs +1 -4
- package/dist/core/environment/webhook.js +1 -4
- package/dist/core/gateway/connector.d.ts +10 -1
- package/dist/core/gateway/connector.d.ts.map +1 -1
- package/dist/core/gateway/connectors/slack-manifest.cjs +108 -0
- package/dist/core/gateway/connectors/slack-manifest.d.ts +85 -0
- package/dist/core/gateway/connectors/slack-manifest.d.ts.map +1 -0
- package/dist/core/gateway/connectors/slack-manifest.js +81 -0
- package/dist/core/gateway/connectors/slack.d.ts +101 -4
- package/dist/core/gateway/connectors/slack.d.ts.map +1 -1
- package/dist/core/gateway/index.cjs +495 -29
- package/dist/core/gateway/index.d.ts +4 -1
- package/dist/core/gateway/index.d.ts.map +1 -1
- package/dist/core/gateway/index.js +490 -28
- package/dist/core/gateway/system-message.d.ts.map +1 -1
- package/dist/core/git/exec.cjs +24 -0
- package/dist/core/git/exec.d.ts +6 -4
- package/dist/core/git/exec.d.ts.map +1 -1
- package/dist/core/git/exec.js +2 -0
- package/dist/core/git/index.cjs +3 -1363
- package/dist/core/git/index.d.ts +4 -614
- package/dist/core/git/index.d.ts.map +1 -1
- package/dist/core/git/index.js +1 -1304
- package/dist/core/git/pure.cjs +24 -0
- package/dist/core/git/pure.d.ts +2 -27
- package/dist/core/git/pure.d.ts.map +1 -1
- package/dist/core/git/pure.js +2 -0
- package/dist/core/index.cjs +11137 -10604
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +11673 -10630
- package/dist/core/lib/feathers-validation.cjs +6 -1
- package/dist/core/lib/feathers-validation.d.ts +1 -0
- package/dist/core/lib/feathers-validation.d.ts.map +1 -1
- package/dist/core/lib/feathers-validation.js +6 -1
- package/dist/core/local-actions/git-remotes.d.ts +7 -0
- package/dist/core/local-actions/git-remotes.d.ts.map +1 -0
- package/dist/core/local-actions/index.cjs +7941 -0
- package/dist/core/local-actions/index.d.ts +6 -0
- package/dist/core/local-actions/index.d.ts.map +1 -0
- package/dist/core/local-actions/index.js +7943 -0
- package/dist/core/local-actions/symlinks.d.ts +20 -0
- package/dist/core/local-actions/symlinks.d.ts.map +1 -0
- package/dist/core/local-actions/types.d.ts +14 -0
- package/dist/core/local-actions/types.d.ts.map +1 -0
- package/dist/core/local-actions/unix-groups.d.ts +16 -0
- package/dist/core/local-actions/unix-groups.d.ts.map +1 -0
- package/dist/core/local-actions/unix-users.d.ts +12 -0
- package/dist/core/local-actions/unix-users.d.ts.map +1 -0
- package/dist/core/mcp/index.cjs +352 -25
- package/dist/core/mcp/index.js +351 -24
- package/dist/core/models/browser.cjs +148 -25
- package/dist/core/models/browser.js +144 -25
- package/dist/core/models/claude.d.ts +2 -2
- package/dist/core/models/claude.d.ts.map +1 -1
- package/dist/core/models/codex.d.ts +205 -21
- package/dist/core/models/codex.d.ts.map +1 -1
- package/dist/core/models/index.cjs +148 -25
- package/dist/core/models/index.js +144 -25
- package/dist/core/package.json +24 -0
- package/dist/core/seed/demo-fixtures.d.ts +87 -0
- package/dist/core/seed/demo-fixtures.d.ts.map +1 -0
- package/dist/core/seed/dev-fixtures.d.ts.map +1 -1
- package/dist/core/seed/index.cjs +8410 -5504
- package/dist/core/seed/index.d.ts +1 -0
- package/dist/core/seed/index.d.ts.map +1 -1
- package/dist/core/seed/index.js +8434 -5533
- package/dist/core/sessions/index.cjs +110 -24
- package/dist/core/sessions/index.js +110 -24
- package/dist/core/telemetry/index.cjs +361 -0
- package/dist/core/telemetry/index.d.ts +5 -0
- package/dist/core/telemetry/index.d.ts.map +1 -0
- package/dist/core/telemetry/index.js +315 -0
- package/dist/core/telemetry/logger.d.ts +44 -0
- package/dist/core/telemetry/logger.d.ts.map +1 -0
- package/dist/core/telemetry/model-normalization.d.ts +3 -0
- package/dist/core/telemetry/model-normalization.d.ts.map +1 -0
- package/dist/core/telemetry/types.d.ts +47 -0
- package/dist/core/telemetry/types.d.ts.map +1 -0
- package/dist/core/telemetry/version.d.ts +9 -0
- package/dist/core/telemetry/version.d.ts.map +1 -0
- package/dist/core/templates/agor-system-prompt.md +1 -0
- package/dist/core/tools/mcp/oauth-refresh.cjs +532 -102
- package/dist/core/tools/mcp/oauth-refresh.js +530 -103
- package/dist/core/types/board.d.ts +2 -0
- package/dist/core/types/board.d.ts.map +1 -1
- package/dist/core/types/branch.d.ts +13 -0
- package/dist/core/types/branch.d.ts.map +1 -1
- package/dist/core/types/config-services.d.ts.map +1 -1
- package/dist/core/types/feathers.d.ts +6 -0
- package/dist/core/types/feathers.d.ts.map +1 -1
- package/dist/core/types/gateway.d.ts +76 -1
- package/dist/core/types/gateway.d.ts.map +1 -1
- package/dist/core/types/index.cjs +25 -0
- package/dist/core/types/index.d.ts +1 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/index.js +22 -0
- package/dist/core/types/schedule.d.ts +4 -3
- package/dist/core/types/schedule.d.ts.map +1 -1
- package/dist/core/types/session.d.ts +7 -1
- package/dist/core/types/session.d.ts.map +1 -1
- package/dist/core/types/tenant.d.ts +15 -0
- package/dist/core/types/tenant.d.ts.map +1 -0
- package/dist/core/types/user.d.ts +61 -0
- package/dist/core/types/user.d.ts.map +1 -1
- package/dist/core/unix/index.cjs +1056 -674
- package/dist/core/unix/index.js +1003 -623
- package/dist/core/utils/emoji-shortcodes.d.ts +13 -0
- package/dist/core/utils/emoji-shortcodes.d.ts.map +1 -0
- package/dist/core/yaml/index.cjs +8 -8
- package/dist/core/yaml/index.d.ts +1 -1
- package/dist/core/yaml/index.d.ts.map +1 -1
- package/dist/core/yaml/index.js +7 -7
- package/dist/daemon/adapters/drizzle.d.ts +26 -4
- package/dist/daemon/adapters/drizzle.d.ts.map +1 -1
- package/dist/daemon/adapters/drizzle.js +68 -7
- package/dist/daemon/auth/api-key-strategy.js +1 -1
- package/dist/daemon/auth/executor-runtime-scope.d.ts.map +1 -1
- package/dist/daemon/auth/executor-runtime-scope.js +19 -5
- package/dist/daemon/auth/launch-auth.d.ts +5 -4
- package/dist/daemon/auth/launch-auth.d.ts.map +1 -1
- package/dist/daemon/auth/launch-auth.js +123 -39
- package/dist/daemon/auth/refresh-token-service.d.ts +22 -0
- package/dist/daemon/auth/refresh-token-service.d.ts.map +1 -0
- package/dist/daemon/auth/refresh-token-service.js +133 -0
- package/dist/daemon/auth/runtime-tokens.d.ts +3 -1
- package/dist/daemon/auth/runtime-tokens.d.ts.map +1 -1
- package/dist/daemon/auth/runtime-tokens.js +17 -4
- package/dist/daemon/auth/service-jwt-strategy.d.ts +2 -1
- package/dist/daemon/auth/service-jwt-strategy.d.ts.map +1 -1
- package/dist/daemon/auth/service-jwt-strategy.js +127 -1
- package/dist/daemon/auth/token-invalidation.d.ts +11 -0
- package/dist/daemon/auth/token-invalidation.d.ts.map +1 -0
- package/dist/daemon/auth/token-invalidation.js +38 -0
- package/dist/daemon/auth/user-redaction.d.ts +12 -0
- package/dist/daemon/auth/user-redaction.d.ts.map +1 -0
- package/dist/daemon/auth/user-redaction.js +13 -0
- package/dist/daemon/declarations.d.ts +4 -4
- package/dist/daemon/declarations.d.ts.map +1 -1
- package/dist/daemon/hooks/gateway-route.d.ts.map +1 -1
- package/dist/daemon/hooks/gateway-route.js +23 -13
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +7234 -2866
- package/dist/daemon/knowledge/pgvector.d.ts +3 -3
- package/dist/daemon/knowledge/pgvector.d.ts.map +1 -1
- package/dist/daemon/knowledge/pgvector.js +24 -0
- package/dist/daemon/knowledge/units.d.ts +2 -2
- package/dist/daemon/knowledge/units.d.ts.map +1 -1
- package/dist/daemon/main.js +7234 -2866
- package/dist/daemon/mcp/server.d.ts +3 -3
- package/dist/daemon/mcp/server.d.ts.map +1 -1
- package/dist/daemon/mcp/server.js +1467 -71
- package/dist/daemon/mcp/tokens.d.ts +2 -2
- package/dist/daemon/mcp/tokens.d.ts.map +1 -1
- package/dist/daemon/mcp/tokens.js +5 -1
- package/dist/daemon/mcp/tool-registry.d.ts.map +1 -1
- package/dist/daemon/mcp/tool-registry.js +1 -0
- package/dist/daemon/mcp/tools/analytics.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/analytics.js +548 -23
- package/dist/daemon/mcp/tools/artifacts.js +510 -19
- package/dist/daemon/mcp/tools/boards.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/boards.js +517 -20
- package/dist/daemon/mcp/tools/branches.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/branches.js +574 -49
- package/dist/daemon/mcp/tools/card-types.js +508 -17
- package/dist/daemon/mcp/tools/cards.js +508 -17
- package/dist/daemon/mcp/tools/environment.js +516 -17
- package/dist/daemon/mcp/tools/gateway-channels.d.ts +4 -0
- package/dist/daemon/mcp/tools/gateway-channels.d.ts.map +1 -0
- package/dist/daemon/mcp/tools/gateway-channels.js +16035 -0
- package/dist/daemon/mcp/tools/knowledge.js +508 -17
- package/dist/daemon/mcp/tools/mcp-servers.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/mcp-servers.js +843 -17
- package/dist/daemon/mcp/tools/messages.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/messages.js +568 -31
- package/dist/daemon/mcp/tools/proxies.js +518 -19
- package/dist/daemon/mcp/tools/repos.js +508 -17
- package/dist/daemon/mcp/tools/schedules.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/schedules.js +511 -18
- package/dist/daemon/mcp/tools/search.js +508 -17
- package/dist/daemon/mcp/tools/sessions.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/sessions.js +521 -23
- package/dist/daemon/mcp/tools/tasks.js +508 -17
- package/dist/daemon/mcp/tools/users.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/users.js +527 -22
- package/dist/daemon/mcp/tools/widgets.d.ts.map +1 -1
- package/dist/daemon/mcp/tools/widgets.js +536 -18
- package/dist/daemon/register-hooks.d.ts +3 -2
- package/dist/daemon/register-hooks.d.ts.map +1 -1
- package/dist/daemon/register-hooks.js +894 -582
- package/dist/daemon/register-routes.d.ts +3 -2
- package/dist/daemon/register-routes.d.ts.map +1 -1
- package/dist/daemon/register-routes.js +2715 -816
- package/dist/daemon/register-services.d.ts +2 -2
- package/dist/daemon/register-services.d.ts.map +1 -1
- package/dist/daemon/register-services.js +2445 -633
- package/dist/daemon/services/artifacts.d.ts +34 -6
- package/dist/daemon/services/artifacts.d.ts.map +1 -1
- package/dist/daemon/services/artifacts.js +109 -8
- package/dist/daemon/services/assistant-knowledge.d.ts +2 -2
- package/dist/daemon/services/assistant-knowledge.d.ts.map +1 -1
- package/dist/daemon/services/board-comments.d.ts +8 -5
- package/dist/daemon/services/board-comments.d.ts.map +1 -1
- package/dist/daemon/services/board-comments.js +78 -13
- package/dist/daemon/services/board-objects.d.ts +8 -5
- package/dist/daemon/services/board-objects.d.ts.map +1 -1
- package/dist/daemon/services/board-objects.js +14 -4
- package/dist/daemon/services/boards.d.ts +34 -5
- package/dist/daemon/services/boards.d.ts.map +1 -1
- package/dist/daemon/services/boards.js +116 -8
- package/dist/daemon/services/branch-owners.d.ts +3 -1
- package/dist/daemon/services/branch-owners.d.ts.map +1 -1
- package/dist/daemon/services/branch-owners.js +31 -4
- package/dist/daemon/services/branches.d.ts +31 -8
- package/dist/daemon/services/branches.d.ts.map +1 -1
- package/dist/daemon/services/branches.js +242 -35
- package/dist/daemon/services/card-types.d.ts +3 -3
- package/dist/daemon/services/card-types.d.ts.map +1 -1
- package/dist/daemon/services/card-types.js +68 -7
- package/dist/daemon/services/cards.d.ts +19 -4
- package/dist/daemon/services/cards.d.ts.map +1 -1
- package/dist/daemon/services/cards.js +92 -8
- package/dist/daemon/services/check-auth.d.ts +2 -2
- package/dist/daemon/services/check-auth.d.ts.map +1 -1
- package/dist/daemon/services/claude-cli-integration.d.ts +4 -1
- package/dist/daemon/services/claude-cli-integration.d.ts.map +1 -1
- package/dist/daemon/services/claude-cli-integration.js +117 -65
- package/dist/daemon/services/claude-models.d.ts +3 -3
- package/dist/daemon/services/claude-models.d.ts.map +1 -1
- package/dist/daemon/services/claude-models.js +383 -272
- package/dist/daemon/services/config.d.ts +12 -4
- package/dist/daemon/services/config.d.ts.map +1 -1
- package/dist/daemon/services/config.js +39 -3
- package/dist/daemon/services/copilot-models.d.ts +3 -3
- package/dist/daemon/services/copilot-models.d.ts.map +1 -1
- package/dist/daemon/services/cursor-models.d.ts +3 -3
- package/dist/daemon/services/cursor-models.d.ts.map +1 -1
- package/dist/daemon/services/files.d.ts +3 -3
- package/dist/daemon/services/files.d.ts.map +1 -1
- package/dist/daemon/services/files.js +24 -5
- package/dist/daemon/services/gateway-channels-test.d.ts +24 -0
- package/dist/daemon/services/gateway-channels-test.d.ts.map +1 -0
- package/dist/daemon/services/gateway-channels-test.js +66 -0
- package/dist/daemon/services/gateway-channels.d.ts +3 -3
- package/dist/daemon/services/gateway-channels.d.ts.map +1 -1
- package/dist/daemon/services/gateway-channels.js +68 -7
- package/dist/daemon/services/gateway.d.ts +48 -3
- package/dist/daemon/services/gateway.d.ts.map +1 -1
- package/dist/daemon/services/gateway.js +606 -60
- package/dist/daemon/services/github-app-setup.d.ts +3 -3
- package/dist/daemon/services/github-app-setup.d.ts.map +1 -1
- package/dist/daemon/services/groups.d.ts +5 -5
- package/dist/daemon/services/groups.d.ts.map +1 -1
- package/dist/daemon/services/health-monitor.d.ts +34 -2
- package/dist/daemon/services/health-monitor.d.ts.map +1 -1
- package/dist/daemon/services/health-monitor.js +145 -23
- package/dist/daemon/services/knowledge-document-edits.d.ts +3 -3
- package/dist/daemon/services/knowledge-document-edits.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-documents.d.ts +3 -3
- package/dist/daemon/services/knowledge-documents.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-documents.js +92 -7
- package/dist/daemon/services/knowledge-embedding-indexer.d.ts +7 -2
- package/dist/daemon/services/knowledge-embedding-indexer.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-embedding-indexer.js +37 -3
- package/dist/daemon/services/knowledge-graph.d.ts +3 -3
- package/dist/daemon/services/knowledge-graph.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-indexing.d.ts +3 -3
- package/dist/daemon/services/knowledge-indexing.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-namespaces.d.ts +3 -3
- package/dist/daemon/services/knowledge-namespaces.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-namespaces.js +72 -8
- package/dist/daemon/services/knowledge-reindex.d.ts +3 -3
- package/dist/daemon/services/knowledge-reindex.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-reindex.js +28 -1
- package/dist/daemon/services/knowledge-search.d.ts +3 -3
- package/dist/daemon/services/knowledge-search.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-settings.d.ts +3 -3
- package/dist/daemon/services/knowledge-settings.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-settings.js +24 -0
- package/dist/daemon/services/knowledge-versions.d.ts +3 -3
- package/dist/daemon/services/knowledge-versions.d.ts.map +1 -1
- package/dist/daemon/services/knowledge-versions.js +68 -7
- package/dist/daemon/services/leaderboard.d.ts +14 -6
- package/dist/daemon/services/leaderboard.d.ts.map +1 -1
- package/dist/daemon/services/leaderboard.js +74 -15
- package/dist/daemon/services/local-actions.d.ts +13 -0
- package/dist/daemon/services/local-actions.d.ts.map +1 -0
- package/dist/daemon/services/local-actions.js +120 -0
- package/dist/daemon/services/mcp-servers.d.ts +3 -3
- package/dist/daemon/services/mcp-servers.d.ts.map +1 -1
- package/dist/daemon/services/mcp-servers.js +68 -7
- package/dist/daemon/services/messages.d.ts +10 -6
- package/dist/daemon/services/messages.d.ts.map +1 -1
- package/dist/daemon/services/messages.js +87 -7
- package/dist/daemon/services/repos.d.ts +6 -6
- package/dist/daemon/services/repos.d.ts.map +1 -1
- package/dist/daemon/services/repos.js +131 -32
- package/dist/daemon/services/scheduler.d.ts +23 -27
- package/dist/daemon/services/scheduler.d.ts.map +1 -1
- package/dist/daemon/services/scheduler.js +55 -28
- package/dist/daemon/services/schedules.d.ts +3 -3
- package/dist/daemon/services/schedules.d.ts.map +1 -1
- package/dist/daemon/services/schedules.js +68 -7
- package/dist/daemon/services/session-env-selections.d.ts +3 -3
- package/dist/daemon/services/session-env-selections.d.ts.map +1 -1
- package/dist/daemon/services/session-mcp-servers.d.ts +3 -3
- package/dist/daemon/services/session-mcp-servers.d.ts.map +1 -1
- package/dist/daemon/services/session-token-service.d.ts.map +1 -1
- package/dist/daemon/services/session-token-service.js +3 -0
- package/dist/daemon/services/sessions.d.ts +9 -5
- package/dist/daemon/services/sessions.d.ts.map +1 -1
- package/dist/daemon/services/sessions.js +143 -10
- package/dist/daemon/services/tasks.d.ts +11 -5
- package/dist/daemon/services/tasks.d.ts.map +1 -1
- package/dist/daemon/services/tasks.js +199 -39
- package/dist/daemon/services/terminals.d.ts +21 -3
- package/dist/daemon/services/terminals.d.ts.map +1 -1
- package/dist/daemon/services/terminals.js +81 -25
- package/dist/daemon/services/thread-session-map.d.ts +3 -3
- package/dist/daemon/services/thread-session-map.d.ts.map +1 -1
- package/dist/daemon/services/thread-session-map.js +68 -7
- package/dist/daemon/services/user-avatar-sync.d.ts +21 -0
- package/dist/daemon/services/user-avatar-sync.d.ts.map +1 -0
- package/dist/daemon/services/user-avatar-sync.js +267 -0
- package/dist/daemon/services/users.d.ts +29 -9
- package/dist/daemon/services/users.d.ts.map +1 -1
- package/dist/daemon/services/users.js +383 -30
- package/dist/daemon/services/zone-trigger.d.ts.map +1 -1
- package/dist/daemon/services/zone-trigger.js +17 -4
- package/dist/daemon/setup/build-info.d.ts +1 -1
- package/dist/daemon/setup/build-info.d.ts.map +1 -1
- package/dist/daemon/setup/build-info.js +5 -1
- package/dist/daemon/setup/database.d.ts +8 -3
- package/dist/daemon/setup/database.d.ts.map +1 -1
- package/dist/daemon/setup/database.js +26 -6
- package/dist/daemon/setup/first-run-admin.d.ts +2 -2
- package/dist/daemon/setup/first-run-admin.d.ts.map +1 -1
- package/dist/daemon/setup/index.js +97 -17
- package/dist/daemon/setup/socketio.d.ts +10 -1
- package/dist/daemon/setup/socketio.d.ts.map +1 -1
- package/dist/daemon/setup/socketio.js +68 -10
- package/dist/daemon/startup.d.ts +13 -2
- package/dist/daemon/startup.d.ts.map +1 -1
- package/dist/daemon/startup.js +348 -86
- package/dist/daemon/utils/append-system-message.d.ts +2 -2
- package/dist/daemon/utils/append-system-message.d.ts.map +1 -1
- package/dist/daemon/utils/apply-session-config-defaults.d.ts.map +1 -1
- package/dist/daemon/utils/apply-session-config-defaults.js +12 -1
- package/dist/daemon/utils/authorization.d.ts +3 -1
- package/dist/daemon/utils/authorization.d.ts.map +1 -1
- package/dist/daemon/utils/authorization.js +21 -6
- package/dist/daemon/utils/branch-authorization.d.ts +30 -0
- package/dist/daemon/utils/branch-authorization.d.ts.map +1 -1
- package/dist/daemon/utils/branch-authorization.js +63 -5
- package/dist/daemon/utils/branch-inspect.d.ts +1 -0
- package/dist/daemon/utils/branch-inspect.d.ts.map +1 -1
- package/dist/daemon/utils/branch-inspect.js +11 -3
- package/dist/daemon/utils/executor-read-impersonation.d.ts +2 -2
- package/dist/daemon/utils/executor-read-impersonation.d.ts.map +1 -1
- package/dist/daemon/utils/git-impersonation.d.ts +10 -10
- package/dist/daemon/utils/git-impersonation.d.ts.map +1 -1
- package/dist/daemon/utils/git-remote-credential-scan.d.ts +3 -3
- package/dist/daemon/utils/git-remote-credential-scan.d.ts.map +1 -1
- package/dist/daemon/utils/git-remote-credential-scan.js +6 -2
- package/dist/daemon/utils/mcp-token-authorization.d.ts +18 -13
- package/dist/daemon/utils/mcp-token-authorization.d.ts.map +1 -1
- package/dist/daemon/utils/mcp-token-authorization.js +11 -5
- package/dist/daemon/utils/open-source-telemetry-config.d.ts +6 -0
- package/dist/daemon/utils/open-source-telemetry-config.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-config.js +21 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.d.ts +7 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-heartbeat.js +15 -0
- package/dist/daemon/utils/open-source-telemetry-usage.d.ts +9 -0
- package/dist/daemon/utils/open-source-telemetry-usage.d.ts.map +1 -0
- package/dist/daemon/utils/open-source-telemetry-usage.js +121 -0
- package/dist/daemon/utils/realign-repo-origin.d.ts +3 -3
- package/dist/daemon/utils/realign-repo-origin.d.ts.map +1 -1
- package/dist/daemon/utils/realign-repo-origin.js +47 -16
- package/dist/daemon/utils/realtime-publish.d.ts +2 -0
- package/dist/daemon/utils/realtime-publish.d.ts.map +1 -1
- package/dist/daemon/utils/realtime-publish.js +51 -10
- package/dist/daemon/utils/session-state-hooks.d.ts +3 -3
- package/dist/daemon/utils/session-state-hooks.d.ts.map +1 -1
- package/dist/daemon/utils/session-turn-lock.d.ts +8 -1
- package/dist/daemon/utils/session-turn-lock.d.ts.map +1 -1
- package/dist/daemon/utils/session-turn-lock.js +25 -2
- package/dist/daemon/utils/spawn-executor.d.ts +23 -1
- package/dist/daemon/utils/spawn-executor.d.ts.map +1 -1
- package/dist/daemon/utils/spawn-executor.js +34 -4
- package/dist/daemon/utils/tenant-db-scope.d.ts +20 -0
- package/dist/daemon/utils/tenant-db-scope.d.ts.map +1 -0
- package/dist/daemon/utils/tenant-db-scope.js +114 -0
- package/dist/daemon/utils/unix-group-init.d.ts +3 -3
- package/dist/daemon/utils/unix-group-init.d.ts.map +1 -1
- package/dist/daemon/utils/upload.d.ts +6 -9
- package/dist/daemon/utils/upload.d.ts.map +1 -1
- package/dist/daemon/utils/upload.js +30 -37
- package/dist/daemon/widgets/env-vars/index.d.ts +26 -1
- package/dist/daemon/widgets/env-vars/index.d.ts.map +1 -1
- package/dist/daemon/widgets/env-vars/index.js +145 -21
- package/dist/daemon/widgets/index.js +137 -21
- package/dist/executor/commands/environment.d.ts.map +1 -1
- package/dist/executor/commands/environment.js +9 -5
- package/dist/executor/commands/git.js +1 -1
- package/dist/executor/git/index.d.ts +8 -0
- package/dist/executor/git/index.d.ts.map +1 -0
- package/dist/executor/git/index.js +7 -0
- package/dist/executor/handlers/sdk/base-executor.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/base-executor.js +4 -1
- package/dist/executor/handlers/sdk/git-safe-directory.d.ts.map +1 -1
- package/dist/executor/handlers/sdk/git-safe-directory.js +1 -1
- package/dist/executor/sdk-handlers/base/diff-enrichment.js +1 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts +6 -10
- package/dist/executor/sdk-handlers/codex/codex-tool.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/codex-tool.js +12 -15
- package/dist/executor/sdk-handlers/codex/normalizer.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/normalizer.js +11 -1
- package/dist/executor/sdk-handlers/codex/pricing/litellm-openai-model-prices.json +3663 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.d.ts +31 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.d.ts.map +1 -0
- package/dist/executor/sdk-handlers/codex/pricing/litellm-pricing.js +46 -0
- package/dist/executor/sdk-handlers/codex/prompt-service.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/prompt-service.js +61 -6
- package/dist/executor/sdk-handlers/codex/usage.d.ts +14 -23
- package/dist/executor/sdk-handlers/codex/usage.d.ts.map +1 -1
- package/dist/executor/sdk-handlers/codex/usage.js +18 -33
- package/dist/executor/services/feathers-client.js +5 -5
- package/dist/git/index.cjs +1101 -0
- package/dist/git/index.d.ts +533 -0
- package/dist/git/index.d.ts.map +1 -0
- package/dist/git/index.js +1022 -0
- package/dist/git/package.json +21 -0
- package/dist/git/pure.cjs +185 -0
- package/dist/git/pure.d.ts +39 -0
- package/dist/git/pure.d.ts.map +1 -0
- package/dist/git/pure.js +139 -0
- package/dist/ui/assets/AgorEmojiPickerInner-DQjr8M3_.js +1 -0
- package/dist/ui/assets/App-hJtcOxHv.js +5 -0
- package/dist/ui/assets/App-hJtcOxHv.js.gz +0 -0
- package/dist/ui/assets/AppNode-BhuMpn8O.js +1 -0
- package/dist/ui/assets/AppNode-BhuMpn8O.js.gz +0 -0
- package/dist/ui/assets/ArtifactConsentModal-oMMzRn8L.js +1 -0
- package/dist/ui/assets/ArtifactConsentModal-oMMzRn8L.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-B3wT8t8f.js +9 -0
- package/dist/ui/assets/ArtifactFullscreenPage-B3wT8t8f.js.gz +0 -0
- package/dist/ui/assets/ArtifactNode-BzQcrwFS.js +9 -0
- package/dist/ui/assets/ArtifactNode-BzQcrwFS.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-Dau-V_30.js +19 -0
- package/dist/ui/assets/AutocompleteTextarea-Dau-V_30.js.gz +0 -0
- package/dist/ui/assets/BoardObjectNodes-DdKWv_ZT.js +34 -0
- package/dist/ui/assets/BoardObjectNodes-DdKWv_ZT.js.gz +0 -0
- package/dist/ui/assets/CodeEditor.inner-Cuj6RuLL.js +7 -0
- package/dist/ui/assets/CodeEditor.inner-Cuj6RuLL.js.gz +0 -0
- package/dist/ui/assets/ConversationView-9-3ma1u-.js +1 -0
- package/dist/ui/assets/ConversationView-9-3ma1u-.js.gz +0 -0
- package/dist/ui/assets/EmbeddedTerminal-Lx5I9EOJ.js +2 -0
- package/dist/ui/assets/EmbeddedTerminal-Lx5I9EOJ.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-Dz8YAMYC.js +24 -0
- package/dist/ui/assets/KnowledgePage-Dz8YAMYC.js.gz +0 -0
- package/dist/ui/assets/{MarketingScreenshotPage-zv5RUCuV.js → MarketingScreenshotPage-CmDPBHOl.js} +2 -2
- package/dist/ui/assets/MarketingScreenshotPage-CmDPBHOl.js.gz +0 -0
- package/dist/ui/assets/MobileApp-BpgSG_gz.js +1 -0
- package/dist/ui/assets/MobileApp-BpgSG_gz.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-B6_mtlxK.js +13 -0
- package/dist/ui/assets/SessionCanvas-B6_mtlxK.js.gz +0 -0
- package/dist/ui/assets/{SessionCanvas-mEmYGZhC.css → SessionCanvas-Bh7Yg5dZ.css} +1 -1
- package/dist/ui/assets/SessionCanvas-Bh7Yg5dZ.css.gz +0 -0
- package/dist/ui/assets/{StreamdownDemoPage-wzWaqWwr.js → StreamdownDemoPage-okKKR2QH.js} +2 -2
- package/dist/ui/assets/StreamdownDemoPage-okKKR2QH.js.gz +0 -0
- package/dist/ui/assets/TerminalModal-D9jMGZXv.js +2 -0
- package/dist/ui/assets/TerminalModal-D9jMGZXv.js.gz +0 -0
- package/dist/ui/assets/ThemeSwitcher-D9HgT37l.js +1 -0
- package/dist/ui/assets/ThemeSwitcher-D9HgT37l.js.gz +0 -0
- package/dist/ui/assets/ThemedSyntaxHighlighter.inner-C1FdIHn0.js +1 -0
- package/dist/ui/assets/{antd-CfbbHJOz.js → antd-DT5ackd0.js} +5 -5
- package/dist/ui/assets/{antd-CfbbHJOz.js.gz → antd-DT5ackd0.js.gz} +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-DMnxkQRZ.js +1 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-DwTJGGoj.js +36 -0
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-DwTJGGoj.js.gz +0 -0
- package/dist/ui/assets/{blockDiagram-VD42YOAC-BhZaEN19.js → blockDiagram-VD42YOAC-Dh1_TVW2.js} +4 -4
- package/dist/ui/assets/blockDiagram-VD42YOAC-Dh1_TVW2.js.gz +0 -0
- package/dist/ui/assets/{c4Diagram-YG6GDRKO-Dk_UH-sY.js → c4Diagram-YG6GDRKO-B1e96AcB.js} +2 -2
- package/dist/ui/assets/c4Diagram-YG6GDRKO-B1e96AcB.js.gz +0 -0
- package/dist/ui/assets/channel-Jv4dT4S5.js +1 -0
- package/dist/ui/assets/{chunk-4BX2VUAB-XprbG2TG.js → chunk-4BX2VUAB-BODpCjJx.js} +1 -1
- package/dist/ui/assets/chunk-55IACEB6-lJXvUquf.js +1 -0
- package/dist/ui/assets/{chunk-ABZYJK2D-BJcrryHK.js → chunk-ABZYJK2D-DCTXWSzV.js} +3 -3
- package/dist/ui/assets/chunk-ABZYJK2D-DCTXWSzV.js.gz +0 -0
- package/dist/ui/assets/{chunk-AGHRB4JF-DvxmfbM0.js → chunk-AGHRB4JF-CbNphBjE.js} +1 -1
- package/dist/ui/assets/chunk-AGHRB4JF-CbNphBjE.js.gz +0 -0
- package/dist/ui/assets/{chunk-ATLVNIR6-DbeJ0OrR.js → chunk-ATLVNIR6-rWg3qxof.js} +1 -1
- package/dist/ui/assets/chunk-ATLVNIR6-rWg3qxof.js.gz +0 -0
- package/dist/ui/assets/{chunk-B4BG7PRW-C53q2ggf.js → chunk-B4BG7PRW-CgtLCbpE.js} +3 -3
- package/dist/ui/assets/chunk-B4BG7PRW-CgtLCbpE.js.gz +0 -0
- package/dist/ui/assets/{chunk-CVBHYZKI-B3EBSlb3.js → chunk-CVBHYZKI-DTL6Zgr0.js} +1 -1
- package/dist/ui/assets/{chunk-DI55MBZ5-vIyNEQN-.js → chunk-DI55MBZ5-Dwvx2Kva.js} +1 -1
- package/dist/ui/assets/chunk-DI55MBZ5-Dwvx2Kva.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-DHyaqTsP.js +1 -0
- package/dist/ui/assets/{chunk-FMBD7UC4-rddmfK-Z.js → chunk-FMBD7UC4-BogA_9CV.js} +1 -1
- package/dist/ui/assets/{chunk-HN2XXSSU-Dttqcg3b.js → chunk-HN2XXSSU-2blQO3Gb.js} +1 -1
- package/dist/ui/assets/chunk-HN2XXSSU-2blQO3Gb.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-Cr1rmOui.js +11 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-Cr1rmOui.js.gz +0 -0
- package/dist/ui/assets/{chunk-JZLCHNYA-EUmx2y4H.js → chunk-JZLCHNYA-BsgZ79Fa.js} +5 -5
- package/dist/ui/assets/chunk-JZLCHNYA-BsgZ79Fa.js.gz +0 -0
- package/dist/ui/assets/{chunk-MI3HLSF2-65n9Mkyc.js → chunk-MI3HLSF2-dwYeUy5S.js} +1 -1
- package/dist/ui/assets/chunk-MI3HLSF2-dwYeUy5S.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-DEMgSRVe.js +2 -0
- package/dist/ui/assets/chunk-N4CR4FBY-DEMgSRVe.js.gz +0 -0
- package/dist/ui/assets/{chunk-QN33PNHL-DsRKK6NR.js → chunk-QN33PNHL-DxdIDCAa.js} +1 -1
- package/dist/ui/assets/{chunk-QXUST7PY-BCYnMiS3.js → chunk-QXUST7PY-BCK2V0i-.js} +2 -2
- package/dist/ui/assets/chunk-QXUST7PY-BCK2V0i-.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-CALjGrEE.js +1 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-GP3zIxrB.js +2 -0
- package/dist/ui/assets/chunk-S3R3BYOJ-GP3zIxrB.js.gz +0 -0
- package/dist/ui/assets/{chunk-TZMSLE5B-BuQUQcTr.js → chunk-TZMSLE5B-dX5RaM6g.js} +1 -1
- package/dist/ui/assets/chunk-TZMSLE5B-dX5RaM6g.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-C3_RVP70.js +1 -0
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-C3_RVP70.js +1 -0
- package/dist/ui/assets/constants-GjIDNVyt.js +1 -0
- package/dist/ui/assets/{cose-bilkent-S5V4N54A-CnPB3ARO.js → cose-bilkent-S5V4N54A-Dx0BJVDl.js} +1 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-Dx0BJVDl.js.gz +0 -0
- package/dist/ui/assets/{dagre-6UL2VRFP-DhS-k_Se.js → dagre-6UL2VRFP-DiQSUxqN.js} +1 -1
- package/dist/ui/assets/dagre-6UL2VRFP-DiQSUxqN.js.gz +0 -0
- package/dist/ui/assets/{dagre-KgLoHEuy.js → dagre-Bekd9Vdj.js} +1 -1
- package/dist/ui/assets/dagre-Bekd9Vdj.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-DtJnDQjc.js +24 -0
- package/dist/ui/assets/diagram-PSM6KHXK-DtJnDQjc.js.gz +0 -0
- package/dist/ui/assets/{diagram-QEK2KX5R-BPCitvbo.js → diagram-QEK2KX5R-CobkCRdj.js} +1 -1
- package/dist/ui/assets/diagram-QEK2KX5R-CobkCRdj.js.gz +0 -0
- package/dist/ui/assets/{diagram-S2PKOQOG-NW4uK6sx.js → diagram-S2PKOQOG-DHEZYivc.js} +1 -1
- package/dist/ui/assets/diagram-S2PKOQOG-DHEZYivc.js.gz +0 -0
- package/dist/ui/assets/editor-DQIG-JYZ.js +43 -0
- package/dist/ui/assets/editor-DQIG-JYZ.js.gz +0 -0
- package/dist/ui/assets/emoji-B0hLmSLZ.js +3 -0
- package/dist/ui/assets/emoji-B0hLmSLZ.js.gz +0 -0
- package/dist/ui/assets/{erDiagram-Q2GNP2WA-me1fboaf.js → erDiagram-Q2GNP2WA-BVNeTZPQ.js} +2 -2
- package/dist/ui/assets/erDiagram-Q2GNP2WA-BVNeTZPQ.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-C73VFdyk.js +162 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-C73VFdyk.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-B_RosuD1.js +267 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-B_RosuD1.js.gz +0 -0
- package/dist/ui/assets/{gitGraph-F6HP7TQM-CfFE_uAC.js → gitGraph-F6HP7TQM-DMFIqn4h.js} +1 -1
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-hxbgwNA1.js +65 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-hxbgwNA1.js.gz +0 -0
- package/dist/ui/assets/index-DTz1Dif6.js +64 -0
- package/dist/ui/assets/index-DTz1Dif6.js.gz +0 -0
- package/dist/ui/assets/{index-DxuPq13l.css → index-qkT7Qqm2.css} +1 -1
- package/dist/ui/assets/index-qkT7Qqm2.css.gz +0 -0
- package/dist/ui/assets/{info-NVLQJR56-i_xHYg3f.js → info-NVLQJR56-DZ3K-w48.js} +1 -1
- package/dist/ui/assets/{infoDiagram-ER5ION4S-2NL93b78.js → infoDiagram-ER5ION4S-CxnBJQu6.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-XKPGCS4Q-CZF-2DHU.js → journeyDiagram-XKPGCS4Q-CHYNj-f8.js} +3 -3
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CHYNj-f8.js.gz +0 -0
- package/dist/ui/assets/{kanban-definition-3W4ZIXB7-CfvJIOny.js → kanban-definition-3W4ZIXB7-DQPCCsj2.js} +1 -1
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-DQPCCsj2.js.gz +0 -0
- package/dist/ui/assets/{line-DDv8kOJk.js → line-DBRjKmfa.js} +1 -1
- package/dist/ui/assets/{linear-Daef-l29.js → linear-DFao5Wyp.js} +1 -1
- package/dist/ui/assets/linear-DFao5Wyp.js.gz +0 -0
- package/dist/ui/assets/{mermaid-parser.core-CdK9QgYV.js → mermaid-parser.core-DYCfacHj.js} +2 -2
- package/dist/ui/assets/mermaid-parser.core-DYCfacHj.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-C6xGFSdE.js +11 -0
- package/dist/ui/assets/mermaid.core-C6xGFSdE.js.gz +0 -0
- package/dist/ui/assets/{mindmap-definition-VGOIOE7T-Cb3QMflX.js → mindmap-definition-VGOIOE7T-L3Pw-YM7.js} +1 -1
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-L3Pw-YM7.js.gz +0 -0
- package/dist/ui/assets/{packet-BFZMPI3H-Bm2uwz4i.js → packet-BFZMPI3H-CpL6iNoa.js} +1 -1
- package/dist/ui/assets/{particles-DsJFOarW.js → particles-CT8hcJOA.js} +1 -1
- package/dist/ui/assets/particles-CT8hcJOA.js.gz +0 -0
- package/dist/ui/assets/{pie-7BOR55EZ-5i17tVnF.js → pie-7BOR55EZ-hTqChbTo.js} +1 -1
- package/dist/ui/assets/{pieDiagram-ADFJNKIX-BxIwQWvw.js → pieDiagram-ADFJNKIX-Bf4Nou75.js} +1 -1
- package/dist/ui/assets/pieDiagram-ADFJNKIX-Bf4Nou75.js.gz +0 -0
- package/dist/ui/assets/{quadrantDiagram-AYHSOK5B-B5HPe4ga.js → quadrantDiagram-AYHSOK5B-DpjUTLB1.js} +3 -3
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-DpjUTLB1.js.gz +0 -0
- package/dist/ui/assets/{radar-NHE76QYJ-BTn-tq0k.js → radar-NHE76QYJ-myy7OENC.js} +1 -1
- package/dist/ui/assets/reactflow-Cubtnk8i.js +2 -0
- package/dist/ui/assets/reactflow-Cubtnk8i.js.gz +0 -0
- package/dist/ui/assets/{requirementDiagram-UZGBJVZJ-YfI6llkX.js → requirementDiagram-UZGBJVZJ-Bfrfh-0-.js} +1 -1
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-Bfrfh-0-.js.gz +0 -0
- package/dist/ui/assets/{sandpack-D7koO5op.js → sandpack-C58bwfIS.js} +38 -38
- package/dist/ui/assets/sandpack-C58bwfIS.js.gz +0 -0
- package/dist/ui/assets/sandpackDefaults-Bkga8XAE.js +1 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-ClZAZ6va.js +10 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-ClZAZ6va.js.gz +0 -0
- package/dist/ui/assets/{sequenceDiagram-WL72ISMW-DAe4Um17.js → sequenceDiagram-WL72ISMW-CNgly63p.js} +6 -6
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-CNgly63p.js.gz +0 -0
- package/dist/ui/assets/src-DAeyG22O.js +34 -0
- package/dist/ui/assets/src-DAeyG22O.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BrEAoDpE.js +1 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-BrEAoDpE.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-BNL52_oN.js +1 -0
- package/dist/ui/assets/streamdown-BdAVfkeF.js +521 -0
- package/dist/ui/assets/streamdown-BdAVfkeF.js.gz +0 -0
- package/dist/ui/assets/syntax-BOfTnQiy.js +9 -0
- package/dist/ui/assets/syntax-BOfTnQiy.js.gz +0 -0
- package/dist/ui/assets/{timeline-definition-IT6M3QCI-D6P5txjT.js → timeline-definition-IT6M3QCI-CaRH3k4l.js} +16 -16
- package/dist/ui/assets/timeline-definition-IT6M3QCI-CaRH3k4l.js.gz +0 -0
- package/dist/ui/assets/{treemap-KMMF4GRG-Bitm3gy4.js → treemap-KMMF4GRG-CUaLOV_B.js} +1 -1
- package/dist/ui/assets/{useUserLocalStorage-Ckb8HsIw.js → useUserLocalStorage-C8sgXgXR.js} +1 -1
- package/dist/ui/assets/useUserLocalStorage-C8sgXgXR.js.gz +0 -0
- package/dist/ui/assets/{xychartDiagram-PRI3JC2R-CsybjUbd.js → xychartDiagram-PRI3JC2R-BlhkI9T_.js} +1 -1
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-BlhkI9T_.js.gz +0 -0
- package/dist/ui/index.html +10 -11
- package/dist/ui/index.html.gz +0 -0
- package/package.json +6 -5
- package/scripts/postinstall.js +27 -19
- package/dist/cli/commands/daemon/sync.d.ts.map +0 -1
- package/dist/ui/assets/App-DcEY8Ota.js +0 -3
- package/dist/ui/assets/App-DcEY8Ota.js.gz +0 -0
- package/dist/ui/assets/ArtifactConsentModal-CiCbK9iv.js +0 -1
- package/dist/ui/assets/ArtifactConsentModal-CiCbK9iv.js.gz +0 -0
- package/dist/ui/assets/ArtifactFullscreenPage-CfsTEGKd.js +0 -9
- package/dist/ui/assets/ArtifactFullscreenPage-CfsTEGKd.js.gz +0 -0
- package/dist/ui/assets/AutocompleteTextarea-BAFFH_5e.js +0 -18
- package/dist/ui/assets/AutocompleteTextarea-BAFFH_5e.js.gz +0 -0
- package/dist/ui/assets/BoardObjectNodes-D-O6bZIG.js +0 -34
- package/dist/ui/assets/BoardObjectNodes-D-O6bZIG.js.gz +0 -0
- package/dist/ui/assets/CodeEditor.inner-DBgsP4tn.js +0 -8
- package/dist/ui/assets/CodeEditor.inner-DBgsP4tn.js.gz +0 -0
- package/dist/ui/assets/ConversationView-CUWR0gR6.js +0 -1
- package/dist/ui/assets/ConversationView-CUWR0gR6.js.gz +0 -0
- package/dist/ui/assets/KnowledgePage-B2bzlXfn.js +0 -24
- package/dist/ui/assets/KnowledgePage-B2bzlXfn.js.gz +0 -0
- package/dist/ui/assets/MarketingScreenshotPage-zv5RUCuV.js.gz +0 -0
- package/dist/ui/assets/MobileApp-VgVnsnsN.js +0 -1
- package/dist/ui/assets/MobileApp-VgVnsnsN.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-f1-1Gbcw.js +0 -20
- package/dist/ui/assets/SessionCanvas-f1-1Gbcw.js.gz +0 -0
- package/dist/ui/assets/SessionCanvas-mEmYGZhC.css.gz +0 -0
- package/dist/ui/assets/StreamdownDemoPage-wzWaqWwr.js.gz +0 -0
- package/dist/ui/assets/ThemeSwitcher-Dly2y9pi.js +0 -1
- package/dist/ui/assets/ThemeSwitcher-Dly2y9pi.js.gz +0 -0
- package/dist/ui/assets/architecture-U656AL7Q-CykGFbQU.js +0 -1
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-C8HXAenz.js +0 -36
- package/dist/ui/assets/architectureDiagram-VXUJARFQ-C8HXAenz.js.gz +0 -0
- package/dist/ui/assets/blockDiagram-VD42YOAC-BhZaEN19.js.gz +0 -0
- package/dist/ui/assets/c4Diagram-YG6GDRKO-Dk_UH-sY.js.gz +0 -0
- package/dist/ui/assets/channel-D6_nUWlW.js +0 -1
- package/dist/ui/assets/chunk-55IACEB6-ByzqIgSb.js +0 -1
- package/dist/ui/assets/chunk-ABZYJK2D-BJcrryHK.js.gz +0 -0
- package/dist/ui/assets/chunk-AGHRB4JF-DvxmfbM0.js.gz +0 -0
- package/dist/ui/assets/chunk-ATLVNIR6-DbeJ0OrR.js.gz +0 -0
- package/dist/ui/assets/chunk-B4BG7PRW-C53q2ggf.js.gz +0 -0
- package/dist/ui/assets/chunk-DI55MBZ5-vIyNEQN-.js.gz +0 -0
- package/dist/ui/assets/chunk-EXTU4WIE-B3ObkuOm.js +0 -1
- package/dist/ui/assets/chunk-HN2XXSSU-Dttqcg3b.js.gz +0 -0
- package/dist/ui/assets/chunk-JA3XYJ7Z-DbNDev3D.js +0 -11
- package/dist/ui/assets/chunk-JA3XYJ7Z-DbNDev3D.js.gz +0 -0
- package/dist/ui/assets/chunk-JZLCHNYA-EUmx2y4H.js.gz +0 -0
- package/dist/ui/assets/chunk-MI3HLSF2-65n9Mkyc.js.gz +0 -0
- package/dist/ui/assets/chunk-N4CR4FBY-mv5koXqW.js +0 -2
- package/dist/ui/assets/chunk-N4CR4FBY-mv5koXqW.js.gz +0 -0
- package/dist/ui/assets/chunk-QXUST7PY-BCYnMiS3.js.gz +0 -0
- package/dist/ui/assets/chunk-QZHKN3VN-HucAw4xW.js +0 -1
- package/dist/ui/assets/chunk-S3R3BYOJ-CWMEa9Dc.js +0 -2
- package/dist/ui/assets/chunk-S3R3BYOJ-CWMEa9Dc.js.gz +0 -0
- package/dist/ui/assets/chunk-TZMSLE5B-BuQUQcTr.js.gz +0 -0
- package/dist/ui/assets/classDiagram-2ON5EDUG-CUT3rPTB.js +0 -1
- package/dist/ui/assets/classDiagram-v2-WZHVMYZB-CUT3rPTB.js +0 -1
- package/dist/ui/assets/cose-bilkent-S5V4N54A-CnPB3ARO.js.gz +0 -0
- package/dist/ui/assets/dagre-6UL2VRFP-DhS-k_Se.js.gz +0 -0
- package/dist/ui/assets/dagre-KgLoHEuy.js.gz +0 -0
- package/dist/ui/assets/diagram-PSM6KHXK-BZg3MJmb.js +0 -24
- package/dist/ui/assets/diagram-PSM6KHXK-BZg3MJmb.js.gz +0 -0
- package/dist/ui/assets/diagram-QEK2KX5R-BPCitvbo.js.gz +0 -0
- package/dist/ui/assets/diagram-S2PKOQOG-NW4uK6sx.js.gz +0 -0
- package/dist/ui/assets/editor-CzFWIUw2.js +0 -39
- package/dist/ui/assets/editor-CzFWIUw2.js.gz +0 -0
- package/dist/ui/assets/emoji-Dkz4Zzv_.js +0 -3
- package/dist/ui/assets/emoji-Dkz4Zzv_.js.gz +0 -0
- package/dist/ui/assets/erDiagram-Q2GNP2WA-me1fboaf.js.gz +0 -0
- package/dist/ui/assets/flowDiagram-NV44I4VS-DzE8dGsh.js +0 -162
- package/dist/ui/assets/flowDiagram-NV44I4VS-DzE8dGsh.js.gz +0 -0
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-CFQD09Mi.js +0 -267
- package/dist/ui/assets/ganttDiagram-LVOFAZNH-CFQD09Mi.js.gz +0 -0
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-CaVoxU4C.js +0 -65
- package/dist/ui/assets/gitGraphDiagram-NY62KEGX-CaVoxU4C.js.gz +0 -0
- package/dist/ui/assets/index-BN5_Qq7R.js +0 -324
- package/dist/ui/assets/index-BN5_Qq7R.js.gz +0 -0
- package/dist/ui/assets/index-DxuPq13l.css.gz +0 -0
- package/dist/ui/assets/journeyDiagram-XKPGCS4Q-CZF-2DHU.js.gz +0 -0
- package/dist/ui/assets/kanban-definition-3W4ZIXB7-CfvJIOny.js.gz +0 -0
- package/dist/ui/assets/katex-CamJ39w1.js +0 -257
- package/dist/ui/assets/katex-CamJ39w1.js.gz +0 -0
- package/dist/ui/assets/linear-Daef-l29.js.gz +0 -0
- package/dist/ui/assets/mermaid-parser.core-CdK9QgYV.js.gz +0 -0
- package/dist/ui/assets/mermaid.core-D6GS9mU-.js +0 -11
- package/dist/ui/assets/mermaid.core-D6GS9mU-.js.gz +0 -0
- package/dist/ui/assets/message-SqLqNYcv.js +0 -36
- package/dist/ui/assets/message-SqLqNYcv.js.gz +0 -0
- package/dist/ui/assets/mindmap-definition-VGOIOE7T-Cb3QMflX.js.gz +0 -0
- package/dist/ui/assets/particles-DsJFOarW.js.gz +0 -0
- package/dist/ui/assets/pieDiagram-ADFJNKIX-BxIwQWvw.js.gz +0 -0
- package/dist/ui/assets/quadrantDiagram-AYHSOK5B-B5HPe4ga.js.gz +0 -0
- package/dist/ui/assets/reactflow-Bf74ngoo.js +0 -2
- package/dist/ui/assets/reactflow-Bf74ngoo.js.gz +0 -0
- package/dist/ui/assets/requirementDiagram-UZGBJVZJ-YfI6llkX.js.gz +0 -0
- package/dist/ui/assets/sandpack-D7koO5op.js.gz +0 -0
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DOk_B10B.js +0 -10
- package/dist/ui/assets/sankeyDiagram-TZEHDZUN-DOk_B10B.js.gz +0 -0
- package/dist/ui/assets/sequenceDiagram-WL72ISMW-DAe4Um17.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-CCesDu_C.js +0 -1
- package/dist/ui/assets/stateDiagram-FKZM4ZOC-CCesDu_C.js.gz +0 -0
- package/dist/ui/assets/stateDiagram-v2-4FDKWEC3-CMlIrsoO.js +0 -1
- package/dist/ui/assets/syntax-C-M-8jOU.js +0 -10
- package/dist/ui/assets/syntax-C-M-8jOU.js.gz +0 -0
- package/dist/ui/assets/theme-BQZdiqwv.js +0 -1
- package/dist/ui/assets/timeline-definition-IT6M3QCI-D6P5txjT.js.gz +0 -0
- package/dist/ui/assets/useUserLocalStorage-Ckb8HsIw.js.gz +0 -0
- package/dist/ui/assets/xychartDiagram-PRI3JC2R-CsybjUbd.js.gz +0 -0
- /package/dist/cli/commands/{admin → local}/sync-unix.d.ts +0 -0
package/dist/core/git/index.js
CHANGED
|
@@ -1,1305 +1,2 @@
|
|
|
1
1
|
// src/git/index.ts
|
|
2
|
-
|
|
3
|
-
import { mkdir, readFile, stat, writeFile } from "fs/promises";
|
|
4
|
-
import { basename, dirname, isAbsolute, join, resolve } from "path";
|
|
5
|
-
import { simpleGit } from "simple-git";
|
|
6
|
-
|
|
7
|
-
// src/config/config-manager.ts
|
|
8
|
-
import { readFileSync, statSync } from "fs";
|
|
9
|
-
import fs from "fs/promises";
|
|
10
|
-
import os from "os";
|
|
11
|
-
import path from "path";
|
|
12
|
-
import yaml from "js-yaml";
|
|
13
|
-
|
|
14
|
-
// src/config/analytics-defaults.ts
|
|
15
|
-
function getDefaultAnalyticsConfig() {
|
|
16
|
-
return {
|
|
17
|
-
enabled: false,
|
|
18
|
-
client: {
|
|
19
|
-
app: "agor-daemon",
|
|
20
|
-
version: "dev",
|
|
21
|
-
debug: false
|
|
22
|
-
},
|
|
23
|
-
filters: {
|
|
24
|
-
exclude_events: []
|
|
25
|
-
},
|
|
26
|
-
plugins: [
|
|
27
|
-
{
|
|
28
|
-
type: "stdout",
|
|
29
|
-
enabled: false,
|
|
30
|
-
options: {
|
|
31
|
-
pretty: false
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
type: "http_batch",
|
|
36
|
-
enabled: false,
|
|
37
|
-
options: {
|
|
38
|
-
url: null,
|
|
39
|
-
flush_interval_ms: 1e3,
|
|
40
|
-
max_batch_size: 50,
|
|
41
|
-
timeout_ms: 3e3,
|
|
42
|
-
headers: {}
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
type: "module",
|
|
47
|
-
enabled: false,
|
|
48
|
-
options: {
|
|
49
|
-
module_path: null,
|
|
50
|
-
export_name: "createAnalyticsPlugin",
|
|
51
|
-
plugin_options: {}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// src/config/constants.ts
|
|
59
|
-
var DAEMON = {
|
|
60
|
-
/**
|
|
61
|
-
* Default daemon port
|
|
62
|
-
*/
|
|
63
|
-
DEFAULT_PORT: 3030,
|
|
64
|
-
/**
|
|
65
|
-
* Default daemon host
|
|
66
|
-
*/
|
|
67
|
-
DEFAULT_HOST: "localhost"
|
|
68
|
-
};
|
|
69
|
-
var MCP_TOKEN = {
|
|
70
|
-
/**
|
|
71
|
-
* Default lifetime for internal MCP session tokens in milliseconds.
|
|
72
|
-
* Keep short to bound the blast radius of a leaked token — there is no
|
|
73
|
-
* revocation mechanism; `exp` is the only backstop.
|
|
74
|
-
*/
|
|
75
|
-
DEFAULT_EXPIRATION_MS: 24 * 60 * 60 * 1e3
|
|
76
|
-
// 24 hours
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
// src/config/executor-heartbeat.ts
|
|
80
|
-
var EXECUTOR_HEARTBEAT_DEFAULT_INTERVAL_MS = 1e4;
|
|
81
|
-
var EXECUTOR_HEARTBEAT_MIN_STALE_AFTER_MS = 3e4;
|
|
82
|
-
var EXECUTOR_HEARTBEAT_DEFAULT_CALLBACK_TIMEOUT_MS = 3e3;
|
|
83
|
-
function positiveIntegerOrDefault(value, fallback) {
|
|
84
|
-
return typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.floor(value) : fallback;
|
|
85
|
-
}
|
|
86
|
-
function resolveExecutorHeartbeatConfig(execution) {
|
|
87
|
-
const raw = execution?.executor_heartbeat;
|
|
88
|
-
const intervalMs = positiveIntegerOrDefault(
|
|
89
|
-
raw?.interval_ms,
|
|
90
|
-
EXECUTOR_HEARTBEAT_DEFAULT_INTERVAL_MS
|
|
91
|
-
);
|
|
92
|
-
const staleAfterMs = positiveIntegerOrDefault(
|
|
93
|
-
raw?.stale_after_ms,
|
|
94
|
-
Math.max(3 * intervalMs, EXECUTOR_HEARTBEAT_MIN_STALE_AFTER_MS)
|
|
95
|
-
);
|
|
96
|
-
const timeoutMs = positiveIntegerOrDefault(
|
|
97
|
-
raw?.callback?.timeout_ms,
|
|
98
|
-
EXECUTOR_HEARTBEAT_DEFAULT_CALLBACK_TIMEOUT_MS
|
|
99
|
-
);
|
|
100
|
-
return {
|
|
101
|
-
// Default enabled: the heartbeat is a lightweight task-row timestamp patch,
|
|
102
|
-
// and callback execution remains opt-in via command_template.
|
|
103
|
-
enabled: raw?.enabled ?? true,
|
|
104
|
-
interval_ms: intervalMs,
|
|
105
|
-
stale_after_ms: staleAfterMs,
|
|
106
|
-
callback: {
|
|
107
|
-
command_template: raw?.callback?.command_template ?? null,
|
|
108
|
-
timeout_ms: timeoutMs
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// src/config/config-manager.ts
|
|
114
|
-
var NO_FILE = -1;
|
|
115
|
-
var NO_FILE_KEY = { mtimeMs: NO_FILE, size: 0 };
|
|
116
|
-
var cachedEntry = null;
|
|
117
|
-
function cacheKeyMatches(a, b) {
|
|
118
|
-
return a.mtimeMs === b.mtimeMs && a.size === b.size;
|
|
119
|
-
}
|
|
120
|
-
function statCacheKey(configPath) {
|
|
121
|
-
try {
|
|
122
|
-
const stat2 = statSync(configPath);
|
|
123
|
-
return { mtimeMs: stat2.mtimeMs, size: stat2.size };
|
|
124
|
-
} catch (error) {
|
|
125
|
-
if (error.code === "ENOENT") {
|
|
126
|
-
return NO_FILE_KEY;
|
|
127
|
-
}
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
function readCachedConfig(configPath) {
|
|
132
|
-
if (cachedEntry === null || cachedEntry.path !== configPath) {
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
const currentKey = statCacheKey(configPath);
|
|
136
|
-
if (currentKey === null || !cacheKeyMatches(currentKey, cachedEntry.key)) {
|
|
137
|
-
return null;
|
|
138
|
-
}
|
|
139
|
-
return structuredClone(cachedEntry.config);
|
|
140
|
-
}
|
|
141
|
-
function writeCachedConfig(configPath, config, key) {
|
|
142
|
-
cachedEntry = { path: configPath, config: structuredClone(config), key };
|
|
143
|
-
}
|
|
144
|
-
function parseAndValidateConfig(content) {
|
|
145
|
-
const parsed = yaml.load(content);
|
|
146
|
-
const finalConfig = parsed || {};
|
|
147
|
-
validateConfig(finalConfig);
|
|
148
|
-
return finalConfig;
|
|
149
|
-
}
|
|
150
|
-
function getAgorHome() {
|
|
151
|
-
return path.join(os.homedir(), ".agor");
|
|
152
|
-
}
|
|
153
|
-
function getConfigPath() {
|
|
154
|
-
return path.join(getAgorHome(), "config.yaml");
|
|
155
|
-
}
|
|
156
|
-
function validateConfig(config) {
|
|
157
|
-
const mode = config.execution?.unix_user_mode;
|
|
158
|
-
if (mode === "opportunistic") {
|
|
159
|
-
throw new Error(
|
|
160
|
-
`Config error: 'opportunistic' unix_user_mode has been deprecated.
|
|
161
|
-
Please update your config to use one of:
|
|
162
|
-
- 'insulated': Filesystem isolation via Unix groups (recommended)
|
|
163
|
-
- 'strict': Full process impersonation required
|
|
164
|
-
|
|
165
|
-
To update: agor config set execution.unix_user_mode insulated`
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
const managedEnvExecutionMode = config.execution?.managed_envs_execution_mode;
|
|
169
|
-
if (managedEnvExecutionMode !== void 0 && managedEnvExecutionMode !== "hybrid" && managedEnvExecutionMode !== "webhook-only") {
|
|
170
|
-
throw new Error(
|
|
171
|
-
`Config error: execution.managed_envs_execution_mode must be one of: hybrid, webhook-only`
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
validateOptionalHttpUrl(
|
|
175
|
-
config.external_launch,
|
|
176
|
-
"login_redirect_url",
|
|
177
|
-
"external_launch.login_redirect_url"
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
function validateOptionalHttpUrl(container, key, configPath) {
|
|
181
|
-
if (!container || container[key] === void 0) return;
|
|
182
|
-
const raw = container[key];
|
|
183
|
-
if (typeof raw !== "string") {
|
|
184
|
-
throw new Error(`Config error: ${configPath} must be an HTTP(S) URL string`);
|
|
185
|
-
}
|
|
186
|
-
container[key] = validateHttpUrlString(raw, configPath);
|
|
187
|
-
}
|
|
188
|
-
function validateHttpUrlString(url, label, options = {}) {
|
|
189
|
-
const trimmed = options.stripTrailingSlash ? url.trim().replace(/\/$/, "") : url.trim();
|
|
190
|
-
if (!trimmed.startsWith("http://") && !trimmed.startsWith("https://")) {
|
|
191
|
-
throw new Error(`Invalid ${label}: "${url}". Must start with http:// or https://`);
|
|
192
|
-
}
|
|
193
|
-
let parsed;
|
|
194
|
-
try {
|
|
195
|
-
parsed = new URL(trimmed);
|
|
196
|
-
} catch {
|
|
197
|
-
throw new Error(`Invalid ${label} format: "${url}". Must be a valid HTTP(S) URL.`);
|
|
198
|
-
}
|
|
199
|
-
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
200
|
-
throw new Error(`Invalid ${label}: "${url}". Must use http:// or https://`);
|
|
201
|
-
}
|
|
202
|
-
return trimmed;
|
|
203
|
-
}
|
|
204
|
-
function getDefaultConfig() {
|
|
205
|
-
return {
|
|
206
|
-
defaults: {
|
|
207
|
-
board: "main",
|
|
208
|
-
agent: "claude-code"
|
|
209
|
-
},
|
|
210
|
-
display: {
|
|
211
|
-
tableStyle: "unicode",
|
|
212
|
-
colorOutput: true
|
|
213
|
-
},
|
|
214
|
-
daemon: {
|
|
215
|
-
port: DAEMON.DEFAULT_PORT,
|
|
216
|
-
host: DAEMON.DEFAULT_HOST,
|
|
217
|
-
mcpEnabled: true
|
|
218
|
-
// Default: Enable built-in MCP server
|
|
219
|
-
},
|
|
220
|
-
ui: {
|
|
221
|
-
port: 5173,
|
|
222
|
-
host: "localhost"
|
|
223
|
-
},
|
|
224
|
-
execution: {
|
|
225
|
-
session_token_expiration_ms: 864e5,
|
|
226
|
-
// 24 hours
|
|
227
|
-
session_token_max_uses: 1,
|
|
228
|
-
// Single-use tokens
|
|
229
|
-
mcp_token_expiration_ms: MCP_TOKEN.DEFAULT_EXPIRATION_MS,
|
|
230
|
-
sync_unix_passwords: true,
|
|
231
|
-
// Default: sync passwords to Unix
|
|
232
|
-
executor_heartbeat: resolveExecutorHeartbeatConfig()
|
|
233
|
-
},
|
|
234
|
-
analytics: getDefaultAnalyticsConfig()
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
function expandHomePath(input) {
|
|
238
|
-
if (!input) {
|
|
239
|
-
return input;
|
|
240
|
-
}
|
|
241
|
-
if (input.startsWith("~/")) {
|
|
242
|
-
return path.join(os.homedir(), input.slice(2));
|
|
243
|
-
}
|
|
244
|
-
return input;
|
|
245
|
-
}
|
|
246
|
-
function loadConfigSync() {
|
|
247
|
-
const configPath = getConfigPath();
|
|
248
|
-
const cached = readCachedConfig(configPath);
|
|
249
|
-
if (cached !== null) {
|
|
250
|
-
return cached;
|
|
251
|
-
}
|
|
252
|
-
let beforeKey;
|
|
253
|
-
let content;
|
|
254
|
-
let afterKey;
|
|
255
|
-
try {
|
|
256
|
-
beforeKey = statCacheKey(configPath);
|
|
257
|
-
if (beforeKey?.mtimeMs === NO_FILE) {
|
|
258
|
-
const defaults = getDefaultConfig();
|
|
259
|
-
writeCachedConfig(configPath, defaults, NO_FILE_KEY);
|
|
260
|
-
return defaults;
|
|
261
|
-
}
|
|
262
|
-
content = readFileSync(configPath, "utf-8");
|
|
263
|
-
afterKey = statCacheKey(configPath);
|
|
264
|
-
} catch (error) {
|
|
265
|
-
if (error.code === "ENOENT") {
|
|
266
|
-
const defaults = getDefaultConfig();
|
|
267
|
-
writeCachedConfig(configPath, defaults, NO_FILE_KEY);
|
|
268
|
-
return defaults;
|
|
269
|
-
}
|
|
270
|
-
throw new Error(
|
|
271
|
-
`Failed to load config: ${error instanceof Error ? error.message : String(error)}`
|
|
272
|
-
);
|
|
273
|
-
}
|
|
274
|
-
let finalConfig;
|
|
275
|
-
try {
|
|
276
|
-
finalConfig = parseAndValidateConfig(content);
|
|
277
|
-
} catch (error) {
|
|
278
|
-
throw new Error(
|
|
279
|
-
`Failed to load config: ${error instanceof Error ? error.message : String(error)}`
|
|
280
|
-
);
|
|
281
|
-
}
|
|
282
|
-
if (beforeKey !== null && afterKey !== null && cacheKeyMatches(beforeKey, afterKey)) {
|
|
283
|
-
writeCachedConfig(configPath, finalConfig, beforeKey);
|
|
284
|
-
}
|
|
285
|
-
return finalConfig;
|
|
286
|
-
}
|
|
287
|
-
function getDataHome() {
|
|
288
|
-
if (process.env.AGOR_DATA_HOME) {
|
|
289
|
-
return expandHomePath(process.env.AGOR_DATA_HOME);
|
|
290
|
-
}
|
|
291
|
-
try {
|
|
292
|
-
const config = loadConfigSync();
|
|
293
|
-
if (config.paths?.data_home) {
|
|
294
|
-
return expandHomePath(config.paths.data_home);
|
|
295
|
-
}
|
|
296
|
-
} catch {
|
|
297
|
-
}
|
|
298
|
-
return getAgorHome();
|
|
299
|
-
}
|
|
300
|
-
function getReposDir() {
|
|
301
|
-
return path.join(getDataHome(), "repos");
|
|
302
|
-
}
|
|
303
|
-
function getBranchesDir() {
|
|
304
|
-
return path.join(getDataHome(), "worktrees");
|
|
305
|
-
}
|
|
306
|
-
function getBranchPath(repoSlug, branchName) {
|
|
307
|
-
return path.join(getBranchesDir(), repoSlug, branchName);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// src/unix/run-as-user.ts
|
|
311
|
-
import { execSync as execSync2 } from "child_process";
|
|
312
|
-
|
|
313
|
-
// src/unix/user-manager.ts
|
|
314
|
-
import { execSync } from "child_process";
|
|
315
|
-
|
|
316
|
-
// src/lib/ids.ts
|
|
317
|
-
import { randomBytes } from "crypto";
|
|
318
|
-
import { v7 as uuidv7 } from "uuid";
|
|
319
|
-
|
|
320
|
-
// src/unix/run-as-user.ts
|
|
321
|
-
function escapeShellArg(arg) {
|
|
322
|
-
return `'${arg.replace(/'/g, "'\\''")}'`;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
// src/utils/url.ts
|
|
326
|
-
function redactUrlUserinfo(input) {
|
|
327
|
-
return input.replace(
|
|
328
|
-
/([A-Za-z][A-Za-z0-9+.-]*:\/\/)([^/?#\s]*@)([^/?#\s]+)/g,
|
|
329
|
-
(_match, prefix, _userinfo, host) => `${prefix}<redacted>@${host}`
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
function httpUrlHasUserinfo(rawUrl) {
|
|
333
|
-
if (!/^https?:\/\//i.test(rawUrl)) return false;
|
|
334
|
-
try {
|
|
335
|
-
const parsed = new URL(rawUrl);
|
|
336
|
-
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return false;
|
|
337
|
-
return parsed.username.length > 0 || parsed.password.length > 0;
|
|
338
|
-
} catch {
|
|
339
|
-
return /^https?:\/\/[^/?#\s]*@[^/?#\s]+/i.test(rawUrl);
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
function stripHttpUrlUserinfo(rawUrl) {
|
|
343
|
-
if (!/^https?:\/\//i.test(rawUrl)) return rawUrl;
|
|
344
|
-
try {
|
|
345
|
-
const parsed = new URL(rawUrl);
|
|
346
|
-
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return rawUrl;
|
|
347
|
-
if (parsed.username || parsed.password) {
|
|
348
|
-
parsed.username = "";
|
|
349
|
-
parsed.password = "";
|
|
350
|
-
return parsed.toString();
|
|
351
|
-
}
|
|
352
|
-
return rawUrl;
|
|
353
|
-
} catch {
|
|
354
|
-
return rawUrl.replace(/^(https?:\/\/)([^/?#\s]*@)([^/?#\s]+)/i, "$1$3");
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
// src/git/index.ts
|
|
359
|
-
async function validateGitRef(ref) {
|
|
360
|
-
await validateNamespacedGitRef(ref, "heads", "Invalid git ref");
|
|
361
|
-
}
|
|
362
|
-
async function validateNamespacedGitRef(ref, namespace, errorPrefix) {
|
|
363
|
-
if (typeof ref !== "string") {
|
|
364
|
-
throw new Error(`${errorPrefix}: expected string, got ${typeof ref}`);
|
|
365
|
-
}
|
|
366
|
-
if (ref.length === 0) {
|
|
367
|
-
throw new Error(`${errorPrefix}: empty string`);
|
|
368
|
-
}
|
|
369
|
-
if (ref.startsWith("-")) {
|
|
370
|
-
throw new Error(
|
|
371
|
-
`${errorPrefix}: refs starting with '-' are rejected to prevent option injection`
|
|
372
|
-
);
|
|
373
|
-
}
|
|
374
|
-
if (/[\s\0]/.test(ref)) {
|
|
375
|
-
throw new Error(`${errorPrefix}: contains whitespace, newline, or NUL byte`);
|
|
376
|
-
}
|
|
377
|
-
const { git } = createGit();
|
|
378
|
-
try {
|
|
379
|
-
await git.raw(["check-ref-format", `refs/${namespace}/${ref}`]);
|
|
380
|
-
} catch {
|
|
381
|
-
throw new Error(`${errorPrefix}: rejected by git check-ref-format: ${ref}`);
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
var cachedGitBinary;
|
|
385
|
-
function getGitBinary() {
|
|
386
|
-
if (cachedGitBinary !== void 0) return cachedGitBinary;
|
|
387
|
-
const commonPaths = [
|
|
388
|
-
"/opt/homebrew/bin/git",
|
|
389
|
-
// Homebrew on Apple Silicon
|
|
390
|
-
"/usr/local/bin/git",
|
|
391
|
-
// Homebrew on Intel
|
|
392
|
-
"/usr/bin/git"
|
|
393
|
-
// System git (Docker and Linux)
|
|
394
|
-
];
|
|
395
|
-
for (const path2 of commonPaths) {
|
|
396
|
-
if (existsSync(path2)) {
|
|
397
|
-
cachedGitBinary = path2;
|
|
398
|
-
return path2;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
cachedGitBinary = "git";
|
|
402
|
-
return cachedGitBinary;
|
|
403
|
-
}
|
|
404
|
-
function isLikelyGitToken(token) {
|
|
405
|
-
return /^[A-Za-z0-9_-]{20,255}$/.test(token);
|
|
406
|
-
}
|
|
407
|
-
function buildWorktreeAddArgs(params) {
|
|
408
|
-
const { branchPath, ref, createBranch: createBranch2, sourceBranch, refType, fetchSucceeded } = params;
|
|
409
|
-
const optionArgs = [];
|
|
410
|
-
const positionalArgs = [branchPath];
|
|
411
|
-
if (createBranch2) {
|
|
412
|
-
optionArgs.push("-b", ref);
|
|
413
|
-
if (sourceBranch) {
|
|
414
|
-
if (refType === "tag") {
|
|
415
|
-
positionalArgs.push(sourceBranch);
|
|
416
|
-
} else {
|
|
417
|
-
const baseRef = fetchSucceeded ? `origin/${sourceBranch}` : sourceBranch;
|
|
418
|
-
positionalArgs.push(baseRef);
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
} else {
|
|
422
|
-
positionalArgs.push(ref);
|
|
423
|
-
}
|
|
424
|
-
return ["worktree", "add", ...optionArgs, "--", ...positionalArgs];
|
|
425
|
-
}
|
|
426
|
-
var DEFAULT_AUTH_HEADER_HOST = "github.com";
|
|
427
|
-
function parseHostFromGitUrl(url) {
|
|
428
|
-
if (typeof url !== "string" || url.length === 0) return void 0;
|
|
429
|
-
if (/^(?:https?|ssh):\/\//.test(url)) {
|
|
430
|
-
try {
|
|
431
|
-
return new URL(url).hostname || void 0;
|
|
432
|
-
} catch {
|
|
433
|
-
return void 0;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
return url.match(/^(?:[^@\s:]+@)?([^/:\s]+):(?!\/)/)?.[1];
|
|
437
|
-
}
|
|
438
|
-
function gitUrlHasUserinfo(rawUrl) {
|
|
439
|
-
return httpUrlHasUserinfo(rawUrl);
|
|
440
|
-
}
|
|
441
|
-
function redactGitUrlCredentials(rawUrl) {
|
|
442
|
-
if (!/^[A-Za-z][A-Za-z0-9+.-]*:\/\//.test(rawUrl)) return rawUrl;
|
|
443
|
-
return redactUrlUserinfo(rawUrl);
|
|
444
|
-
}
|
|
445
|
-
function stripGitUrlCredentials(rawUrl) {
|
|
446
|
-
return stripHttpUrlUserinfo(rawUrl);
|
|
447
|
-
}
|
|
448
|
-
function parseGitdirPointer(raw) {
|
|
449
|
-
const match = raw.match(/^gitdir:\s*(.+?)\s*$/m);
|
|
450
|
-
return match?.[1];
|
|
451
|
-
}
|
|
452
|
-
async function findGitConfigPaths(repoPath) {
|
|
453
|
-
const dotGit = join(repoPath, ".git");
|
|
454
|
-
const paths = /* @__PURE__ */ new Set();
|
|
455
|
-
let dotGitStat;
|
|
456
|
-
try {
|
|
457
|
-
dotGitStat = await stat(dotGit);
|
|
458
|
-
} catch {
|
|
459
|
-
return [];
|
|
460
|
-
}
|
|
461
|
-
if (dotGitStat.isDirectory()) {
|
|
462
|
-
paths.add(join(dotGit, "config"));
|
|
463
|
-
} else if (dotGitStat.isFile()) {
|
|
464
|
-
const pointer = parseGitdirPointer(await readFile(dotGit, "utf8"));
|
|
465
|
-
if (pointer) {
|
|
466
|
-
const gitDir = isAbsolute(pointer) ? pointer : resolve(repoPath, pointer);
|
|
467
|
-
paths.add(join(gitDir, "config"));
|
|
468
|
-
paths.add(join(gitDir, "config.worktree"));
|
|
469
|
-
try {
|
|
470
|
-
const commonDirRaw = (await readFile(join(gitDir, "commondir"), "utf8")).trim();
|
|
471
|
-
if (commonDirRaw) {
|
|
472
|
-
const commonDir = isAbsolute(commonDirRaw) ? commonDirRaw : resolve(gitDir, commonDirRaw);
|
|
473
|
-
paths.add(join(commonDir, "config"));
|
|
474
|
-
}
|
|
475
|
-
} catch {
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
const existing = [];
|
|
480
|
-
for (const candidate of paths) {
|
|
481
|
-
try {
|
|
482
|
-
const candidateStat = await stat(candidate);
|
|
483
|
-
if (candidateStat.isFile()) existing.push(candidate);
|
|
484
|
-
} catch {
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
return existing;
|
|
488
|
-
}
|
|
489
|
-
function parseRemoteSection(line) {
|
|
490
|
-
const match = line.match(/^\s*\[remote\s+"((?:\\.|[^"])*)"\]\s*(?:[#;].*)?$/);
|
|
491
|
-
return match?.[1]?.replace(/\\"/g, '"');
|
|
492
|
-
}
|
|
493
|
-
function scrubGitConfigText(configPath, text, writeChanges) {
|
|
494
|
-
const lines = text.split("\n");
|
|
495
|
-
const findings = [];
|
|
496
|
-
let currentRemote;
|
|
497
|
-
let changed = false;
|
|
498
|
-
const nextLines = lines.map((line) => {
|
|
499
|
-
const remote = parseRemoteSection(line);
|
|
500
|
-
if (remote !== void 0) {
|
|
501
|
-
currentRemote = remote;
|
|
502
|
-
return line;
|
|
503
|
-
}
|
|
504
|
-
if (/^\s*\[/.test(line)) {
|
|
505
|
-
currentRemote = void 0;
|
|
506
|
-
return line;
|
|
507
|
-
}
|
|
508
|
-
if (!currentRemote) return line;
|
|
509
|
-
const match = line.match(/^(\s*)(url|pushurl)(\s*=\s*)(.*?)(\r?)$/i);
|
|
510
|
-
if (!match) return line;
|
|
511
|
-
const [, indent, rawKey, sep, rawValue, cr] = match;
|
|
512
|
-
const value = rawValue.trim();
|
|
513
|
-
if (!gitUrlHasUserinfo(value)) return line;
|
|
514
|
-
const key = rawKey.toLowerCase();
|
|
515
|
-
const sanitizedUrl = stripGitUrlCredentials(value);
|
|
516
|
-
findings.push({
|
|
517
|
-
configPath,
|
|
518
|
-
remote: currentRemote,
|
|
519
|
-
key,
|
|
520
|
-
redactedUrl: redactGitUrlCredentials(value),
|
|
521
|
-
sanitizedUrl
|
|
522
|
-
});
|
|
523
|
-
changed = true;
|
|
524
|
-
return writeChanges ? `${indent}${rawKey}${sep}${sanitizedUrl}${cr}` : line;
|
|
525
|
-
});
|
|
526
|
-
return { text: nextLines.join("\n"), findings, changed };
|
|
527
|
-
}
|
|
528
|
-
async function scanGitConfigRemoteCredentials(repoPath) {
|
|
529
|
-
const configPaths = await findGitConfigPaths(repoPath);
|
|
530
|
-
const findings = [];
|
|
531
|
-
for (const configPath of configPaths) {
|
|
532
|
-
const text = await readFile(configPath, "utf8");
|
|
533
|
-
findings.push(...scrubGitConfigText(configPath, text, false).findings);
|
|
534
|
-
}
|
|
535
|
-
return { repoPath, configPaths, findings };
|
|
536
|
-
}
|
|
537
|
-
async function scrubGitConfigRemoteCredentials(repoPath) {
|
|
538
|
-
const configPaths = await findGitConfigPaths(repoPath);
|
|
539
|
-
const findings = [];
|
|
540
|
-
let changed = false;
|
|
541
|
-
for (const configPath of configPaths) {
|
|
542
|
-
const text = await readFile(configPath, "utf8");
|
|
543
|
-
const result = scrubGitConfigText(configPath, text, true);
|
|
544
|
-
findings.push(...result.findings);
|
|
545
|
-
if (result.changed) {
|
|
546
|
-
await writeFile(configPath, result.text, "utf8");
|
|
547
|
-
changed = true;
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
return { repoPath, configPaths, findings, changed };
|
|
551
|
-
}
|
|
552
|
-
async function resolveAuthHost(repoPath) {
|
|
553
|
-
try {
|
|
554
|
-
const origin = await getRemoteUrl(repoPath, "origin");
|
|
555
|
-
if (origin) {
|
|
556
|
-
const host = parseHostFromGitUrl(origin);
|
|
557
|
-
if (host) return host;
|
|
558
|
-
}
|
|
559
|
-
} catch {
|
|
560
|
-
}
|
|
561
|
-
console.warn(
|
|
562
|
-
`\u{1F511} Could not derive auth host from origin in ${repoPath}; falling back to ${DEFAULT_AUTH_HEADER_HOST}. If this repo lives on GitHub Enterprise or a self-hosted forge, the auth header will be ineffective.`
|
|
563
|
-
);
|
|
564
|
-
return DEFAULT_AUTH_HEADER_HOST;
|
|
565
|
-
}
|
|
566
|
-
function buildGitConfigEnv(entries) {
|
|
567
|
-
if (entries.length === 0) return {};
|
|
568
|
-
const out = {
|
|
569
|
-
GIT_CONFIG_COUNT: String(entries.length)
|
|
570
|
-
};
|
|
571
|
-
for (let i = 0; i < entries.length; i++) {
|
|
572
|
-
const [key, value] = entries[i];
|
|
573
|
-
out[`GIT_CONFIG_KEY_${i}`] = key;
|
|
574
|
-
out[`GIT_CONFIG_VALUE_${i}`] = value;
|
|
575
|
-
}
|
|
576
|
-
return out;
|
|
577
|
-
}
|
|
578
|
-
function buildGitConfigParameters(pairs) {
|
|
579
|
-
return pairs.map((p) => p.trim()).filter((p) => p.length > 0).map((p) => escapeShellArg(p)).join(" ");
|
|
580
|
-
}
|
|
581
|
-
function buildAuthHeaderEnv(token, host = DEFAULT_AUTH_HEADER_HOST) {
|
|
582
|
-
if (!token) return [];
|
|
583
|
-
if (!isLikelyGitToken(token)) {
|
|
584
|
-
console.warn(
|
|
585
|
-
"\u{1F511} Skipping http.extraheader: token does not match expected shape. Tokens must match /^[A-Za-z0-9_-]{20,255}$/. Re-save the token to enable the auth header."
|
|
586
|
-
);
|
|
587
|
-
return [];
|
|
588
|
-
}
|
|
589
|
-
const credential = Buffer.from(`x-access-token:${token}`, "utf8").toString("base64");
|
|
590
|
-
const key = `http.https://${host}/.extraheader`;
|
|
591
|
-
return [[key, `Authorization: Basic ${credential}`]];
|
|
592
|
-
}
|
|
593
|
-
function categorizeGitError(stderr) {
|
|
594
|
-
const s = stderr.toLowerCase();
|
|
595
|
-
if (s.includes("authentication failed") || s.includes("could not read username") || s.includes("could not read password") || s.includes("terminal prompts disabled") || s.includes("fatal: authentication") || s.includes("http basic") || s.includes("403 forbidden") || s.includes("permission denied (publickey)")) {
|
|
596
|
-
return "auth_failed";
|
|
597
|
-
}
|
|
598
|
-
if (s.includes("repository not found") || s.includes("not found") || s.includes("does not exist") || s.includes("404")) {
|
|
599
|
-
return "not_found";
|
|
600
|
-
}
|
|
601
|
-
if (s.includes("could not resolve host") || s.includes("connection refused") || s.includes("connection timed out") || s.includes("operation timed out") || s.includes("network is unreachable") || s.includes("network error")) {
|
|
602
|
-
return "network";
|
|
603
|
-
}
|
|
604
|
-
return "unknown";
|
|
605
|
-
}
|
|
606
|
-
function redactGitEnv(env) {
|
|
607
|
-
const out = {};
|
|
608
|
-
for (const [key, raw] of Object.entries(env)) {
|
|
609
|
-
if (raw === void 0) continue;
|
|
610
|
-
const isConfigValue = /^GIT_CONFIG_VALUE_\d+$/.test(key);
|
|
611
|
-
const looksLikeAuth = /authorization:/i.test(raw);
|
|
612
|
-
out[key] = isConfigValue && looksLikeAuth ? "<redacted>" : raw;
|
|
613
|
-
}
|
|
614
|
-
return out;
|
|
615
|
-
}
|
|
616
|
-
function createGit(baseDir, env, authHost) {
|
|
617
|
-
const gitBinary = getGitBinary();
|
|
618
|
-
const config = [];
|
|
619
|
-
const rawToken = env?.GITHUB_TOKEN ?? env?.GH_TOKEN;
|
|
620
|
-
const authConfigEntries = buildAuthHeaderEnv(rawToken, authHost ?? DEFAULT_AUTH_HEADER_HOST);
|
|
621
|
-
let spawnEnv;
|
|
622
|
-
if (env || authConfigEntries.length > 0) {
|
|
623
|
-
spawnEnv = {
|
|
624
|
-
...process.env,
|
|
625
|
-
...env ?? {},
|
|
626
|
-
// Inheritance kill (GLOBAL only): ignore the daemon user's
|
|
627
|
-
// ~/.gitconfig. /etc/gitconfig is intentionally NOT killed — it is
|
|
628
|
-
// admin-policy territory (CA bundles, proxies). See block comment.
|
|
629
|
-
GIT_CONFIG_GLOBAL: "/dev/null",
|
|
630
|
-
// Fail fast instead of blocking on an interactive credential prompt
|
|
631
|
-
// (which would hang the daemon).
|
|
632
|
-
GIT_TERMINAL_PROMPT: "0",
|
|
633
|
-
// Inject http.extraheader (and any future server-constructed config)
|
|
634
|
-
// via the env-var protocol so it never lands on argv.
|
|
635
|
-
...buildGitConfigEnv(authConfigEntries)
|
|
636
|
-
};
|
|
637
|
-
}
|
|
638
|
-
const git = simpleGit({
|
|
639
|
-
baseDir,
|
|
640
|
-
binary: gitBinary,
|
|
641
|
-
config,
|
|
642
|
-
unsafe: {
|
|
643
|
-
// simple-git's scanner blocks spawning when these env vars / config keys
|
|
644
|
-
// are present. We own the daemon env (in strict mode it's the user's own
|
|
645
|
-
// env) and inject GIT_CONFIG_* ourselves — opting in here mirrors what a
|
|
646
|
-
// direct `git` invocation on the same machine does.
|
|
647
|
-
allowUnsafeSshCommand: true,
|
|
648
|
-
allowUnsafeConfigPaths: true,
|
|
649
|
-
allowUnsafeConfigEnvCount: true,
|
|
650
|
-
allowUnsafeEditor: true,
|
|
651
|
-
allowUnsafeAskPass: true,
|
|
652
|
-
allowUnsafePager: true,
|
|
653
|
-
allowUnsafeGitProxy: true,
|
|
654
|
-
allowUnsafeTemplateDir: true,
|
|
655
|
-
allowUnsafeDiffExternal: true
|
|
656
|
-
}
|
|
657
|
-
});
|
|
658
|
-
if (spawnEnv) {
|
|
659
|
-
git.env(spawnEnv);
|
|
660
|
-
}
|
|
661
|
-
return { git };
|
|
662
|
-
}
|
|
663
|
-
function createGitForRemote(remoteUrl, env) {
|
|
664
|
-
return createGit(void 0, env, parseHostFromGitUrl(remoteUrl));
|
|
665
|
-
}
|
|
666
|
-
async function addSafeDirectoryBestEffort(path2, logPrefix) {
|
|
667
|
-
const prefix = logPrefix ? `${logPrefix} ` : "";
|
|
668
|
-
try {
|
|
669
|
-
const { git } = createGit(path2);
|
|
670
|
-
await git.addConfig("safe.directory", path2, true, "global");
|
|
671
|
-
console.log(`${prefix}\u2705 Added ${path2} to git safe.directory`);
|
|
672
|
-
} catch (error) {
|
|
673
|
-
console.warn(
|
|
674
|
-
`${prefix}\u26A0\uFE0F Failed to add ${path2} to safe.directory:`,
|
|
675
|
-
error instanceof Error ? error.message : String(error)
|
|
676
|
-
);
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
function extractRepoName(url) {
|
|
680
|
-
const match = url.match(/\/([^/]+?)(?:\.git)?$/);
|
|
681
|
-
if (!match) {
|
|
682
|
-
throw new Error(`Could not extract repo name from URL: ${url}`);
|
|
683
|
-
}
|
|
684
|
-
return match[1];
|
|
685
|
-
}
|
|
686
|
-
async function cloneRepo(options) {
|
|
687
|
-
const cloneUrl = stripGitUrlCredentials(options.url);
|
|
688
|
-
if (cloneUrl !== options.url) {
|
|
689
|
-
console.warn(
|
|
690
|
-
`\u{1F512} Stripped credentials from clone URL before use: ${redactGitUrlCredentials(options.url)}`
|
|
691
|
-
);
|
|
692
|
-
}
|
|
693
|
-
const repoName = extractRepoName(cloneUrl);
|
|
694
|
-
const reposDir = getReposDir();
|
|
695
|
-
const targetPath = options.targetDir || join(reposDir, repoName);
|
|
696
|
-
await mkdir(dirname(targetPath), { recursive: true });
|
|
697
|
-
if (existsSync(targetPath)) {
|
|
698
|
-
const isValid = await isGitRepo(targetPath);
|
|
699
|
-
if (isValid) {
|
|
700
|
-
await scrubGitConfigRemoteCredentials(targetPath);
|
|
701
|
-
console.log(`Repository already exists at ${targetPath}, using existing clone`);
|
|
702
|
-
const existingGit = createGit(targetPath, options.env, parseHostFromGitUrl(cloneUrl)).git;
|
|
703
|
-
if (options.branch) {
|
|
704
|
-
const branches = await existingGit.branch();
|
|
705
|
-
if (branches.current !== options.branch) {
|
|
706
|
-
try {
|
|
707
|
-
await existingGit.fetch(["origin", options.branch]);
|
|
708
|
-
} catch (err) {
|
|
709
|
-
throw new Error(
|
|
710
|
-
`Existing clone at ${targetPath} is on branch '${branches.current}'; failed to fetch '${options.branch}' from origin: ${err instanceof Error ? err.message : String(err)}`
|
|
711
|
-
);
|
|
712
|
-
}
|
|
713
|
-
try {
|
|
714
|
-
await existingGit.checkout(options.branch);
|
|
715
|
-
} catch (err) {
|
|
716
|
-
throw new Error(
|
|
717
|
-
`Existing clone at ${targetPath} is on branch '${branches.current}'; failed to switch to pinned '${options.branch}': ${err instanceof Error ? err.message : String(err)}`
|
|
718
|
-
);
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
return {
|
|
722
|
-
path: targetPath,
|
|
723
|
-
repoName,
|
|
724
|
-
defaultBranch: options.branch
|
|
725
|
-
};
|
|
726
|
-
}
|
|
727
|
-
const defaultBranch2 = await getDefaultBranch(targetPath);
|
|
728
|
-
return {
|
|
729
|
-
path: targetPath,
|
|
730
|
-
repoName,
|
|
731
|
-
defaultBranch: defaultBranch2
|
|
732
|
-
};
|
|
733
|
-
} else {
|
|
734
|
-
throw new Error(
|
|
735
|
-
`Directory exists but is not a valid git repository: ${targetPath}
|
|
736
|
-
Please delete this directory manually and try again.`
|
|
737
|
-
);
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
const { git } = createGitForRemote(cloneUrl, options.env);
|
|
741
|
-
if (options.onProgress) {
|
|
742
|
-
git.outputHandler((_command, _stdout, _stderr) => {
|
|
743
|
-
});
|
|
744
|
-
}
|
|
745
|
-
const cloneArgs = [];
|
|
746
|
-
if (options.bare) cloneArgs.push("--bare");
|
|
747
|
-
if (options.branch) cloneArgs.push("--branch", options.branch);
|
|
748
|
-
console.log(
|
|
749
|
-
`Cloning ${redactGitUrlCredentials(cloneUrl)} to ${targetPath}${options.branch ? ` (branch: ${options.branch})` : ""}...`
|
|
750
|
-
);
|
|
751
|
-
await git.clone(cloneUrl, targetPath, cloneArgs);
|
|
752
|
-
await scrubGitConfigRemoteCredentials(targetPath);
|
|
753
|
-
const defaultBranch = options.branch ?? await getDefaultBranch(targetPath);
|
|
754
|
-
return {
|
|
755
|
-
path: targetPath,
|
|
756
|
-
repoName,
|
|
757
|
-
defaultBranch
|
|
758
|
-
};
|
|
759
|
-
}
|
|
760
|
-
async function isValidGitRepo(path2) {
|
|
761
|
-
try {
|
|
762
|
-
const stats = await stat(path2);
|
|
763
|
-
if (!stats.isDirectory()) {
|
|
764
|
-
return false;
|
|
765
|
-
}
|
|
766
|
-
const { git } = createGit(path2);
|
|
767
|
-
await git.revparse(["--git-dir"]);
|
|
768
|
-
return true;
|
|
769
|
-
} catch {
|
|
770
|
-
return false;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
async function isGitRepo(path2) {
|
|
774
|
-
return isValidGitRepo(path2);
|
|
775
|
-
}
|
|
776
|
-
async function getCurrentBranch(repoPath) {
|
|
777
|
-
const { git } = createGit(repoPath);
|
|
778
|
-
const status = await git.status();
|
|
779
|
-
return status.current || "";
|
|
780
|
-
}
|
|
781
|
-
async function getDefaultBranch(repoPath, remote = "origin") {
|
|
782
|
-
const { git } = createGit(repoPath);
|
|
783
|
-
try {
|
|
784
|
-
const result = await git.raw(["symbolic-ref", `refs/remotes/${remote}/HEAD`]);
|
|
785
|
-
const match = result.trim().match(/refs\/remotes\/[^/]+\/(.+)/);
|
|
786
|
-
if (match?.[1]) {
|
|
787
|
-
return match[1];
|
|
788
|
-
}
|
|
789
|
-
} catch {
|
|
790
|
-
}
|
|
791
|
-
try {
|
|
792
|
-
const branches = await git.branch();
|
|
793
|
-
return branches.current || "main";
|
|
794
|
-
} catch {
|
|
795
|
-
return "main";
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
async function getCurrentSha(repoPath) {
|
|
799
|
-
const { git } = createGit(repoPath);
|
|
800
|
-
const log = await git.log({ maxCount: 1 });
|
|
801
|
-
return log.latest?.hash || "";
|
|
802
|
-
}
|
|
803
|
-
async function isClean(repoPath) {
|
|
804
|
-
const { git } = createGit(repoPath);
|
|
805
|
-
const status = await git.status();
|
|
806
|
-
return status.isClean();
|
|
807
|
-
}
|
|
808
|
-
async function getRemoteUrl(repoPath, remote = "origin") {
|
|
809
|
-
try {
|
|
810
|
-
const { git } = createGit(repoPath);
|
|
811
|
-
const remotes = await git.getRemotes(true);
|
|
812
|
-
const remoteObj = remotes.find((r) => r.name === remote);
|
|
813
|
-
return remoteObj?.refs.fetch ? stripGitUrlCredentials(remoteObj.refs.fetch) : null;
|
|
814
|
-
} catch {
|
|
815
|
-
return null;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
async function ensureGitRemoteUrl(repoPath, remoteName, expectedUrl, env) {
|
|
819
|
-
const { git } = createGit(repoPath, env);
|
|
820
|
-
const safeExpectedUrl = stripGitUrlCredentials(expectedUrl);
|
|
821
|
-
const configKey = `remote.${remoteName}.url`;
|
|
822
|
-
let currentUrls;
|
|
823
|
-
try {
|
|
824
|
-
const raw = await git.raw(["config", "--get-all", configKey]);
|
|
825
|
-
currentUrls = raw.split("\n").map((s) => s.trim()).filter((s) => s.length > 0);
|
|
826
|
-
} catch {
|
|
827
|
-
return { changed: false, previousUrl: void 0 };
|
|
828
|
-
}
|
|
829
|
-
if (currentUrls.length === 0) {
|
|
830
|
-
return { changed: false, previousUrl: void 0 };
|
|
831
|
-
}
|
|
832
|
-
if (currentUrls.length === 1 && currentUrls[0] === safeExpectedUrl) {
|
|
833
|
-
return { changed: false, previousUrl: currentUrls[0] };
|
|
834
|
-
}
|
|
835
|
-
await git.raw(["config", "--replace-all", configKey, safeExpectedUrl]);
|
|
836
|
-
return { changed: true, previousUrl: currentUrls.join("\n") };
|
|
837
|
-
}
|
|
838
|
-
async function createBranch(repoPath, branchPath, ref, createBranch2 = false, pullLatest = true, sourceBranch, env, refType) {
|
|
839
|
-
console.log("\u{1F50D} createBranch called with:", {
|
|
840
|
-
repoPath,
|
|
841
|
-
branchPath,
|
|
842
|
-
ref,
|
|
843
|
-
createBranch: createBranch2,
|
|
844
|
-
pullLatest,
|
|
845
|
-
sourceBranch,
|
|
846
|
-
refType
|
|
847
|
-
});
|
|
848
|
-
if (!repoPath) {
|
|
849
|
-
throw new Error("repoPath is required but was null/undefined");
|
|
850
|
-
}
|
|
851
|
-
const scrubResult = await scrubGitConfigRemoteCredentials(repoPath);
|
|
852
|
-
if (scrubResult.findings.length > 0) {
|
|
853
|
-
console.warn(
|
|
854
|
-
`\u{1F512} Scrubbed ${scrubResult.findings.length} credential-bearing git remote URL(s) from ${scrubResult.configPaths.length} git config file(s) before creating a worktree branch.`
|
|
855
|
-
);
|
|
856
|
-
}
|
|
857
|
-
if (existsSync(branchPath)) {
|
|
858
|
-
throw new Error(
|
|
859
|
-
`Target directory '${branchPath}' already exists on disk. This usually means an archived or partially-cleaned branch still occupies this path. Please choose a different name or clean up the existing directory.`
|
|
860
|
-
);
|
|
861
|
-
}
|
|
862
|
-
await validateGitRef(ref);
|
|
863
|
-
if (sourceBranch !== void 0) {
|
|
864
|
-
await validateGitRef(sourceBranch);
|
|
865
|
-
}
|
|
866
|
-
const hasToken = !!(env?.GITHUB_TOKEN ?? env?.GH_TOKEN);
|
|
867
|
-
const authHost = hasToken ? await resolveAuthHost(repoPath) : void 0;
|
|
868
|
-
const { git } = createGit(repoPath, env, authHost);
|
|
869
|
-
let fetchSucceeded = false;
|
|
870
|
-
if (pullLatest) {
|
|
871
|
-
try {
|
|
872
|
-
const fetchArgs = refType === "tag" ? ["origin", "--tags"] : ["origin"];
|
|
873
|
-
await git.fetch(fetchArgs);
|
|
874
|
-
fetchSucceeded = true;
|
|
875
|
-
console.log("\u2705 Fetched latest from origin");
|
|
876
|
-
if (!createBranch2 && refType !== "tag") {
|
|
877
|
-
try {
|
|
878
|
-
const branches = await git.branch();
|
|
879
|
-
const localBranchExists = branches.all.includes(ref);
|
|
880
|
-
if (localBranchExists) {
|
|
881
|
-
const remoteBranches = await git.branch(["-r"]);
|
|
882
|
-
const remoteBranchExists = remoteBranches.all.includes(`origin/${ref}`);
|
|
883
|
-
if (remoteBranchExists) {
|
|
884
|
-
await git.raw(["branch", "-f", ref, `origin/${ref}`]);
|
|
885
|
-
console.log(`\u2705 Updated local ${ref} to match origin/${ref}`);
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
} catch (error) {
|
|
889
|
-
console.warn(
|
|
890
|
-
`\u26A0\uFE0F Failed to update local ${ref} branch:`,
|
|
891
|
-
error instanceof Error ? error.message : String(error)
|
|
892
|
-
);
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
} catch (error) {
|
|
896
|
-
console.warn(
|
|
897
|
-
"\u26A0\uFE0F Failed to fetch from origin (will use local refs):",
|
|
898
|
-
error instanceof Error ? error.message : String(error)
|
|
899
|
-
);
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
const worktreeAddArgs = buildWorktreeAddArgs({
|
|
903
|
-
branchPath,
|
|
904
|
-
ref,
|
|
905
|
-
createBranch: createBranch2,
|
|
906
|
-
sourceBranch,
|
|
907
|
-
refType,
|
|
908
|
-
fetchSucceeded
|
|
909
|
-
});
|
|
910
|
-
if (createBranch2 && sourceBranch && refType === "tag") {
|
|
911
|
-
console.log(`\u{1F4CC} Creating branch '${ref}' from tag '${sourceBranch}'`);
|
|
912
|
-
}
|
|
913
|
-
try {
|
|
914
|
-
await git.raw(worktreeAddArgs);
|
|
915
|
-
} catch (error) {
|
|
916
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
917
|
-
if (createBranch2 && errorMessage.includes("already exists")) {
|
|
918
|
-
console.warn(
|
|
919
|
-
`\u26A0\uFE0F Branch '${ref}' already exists. Checking if it's orphaned (stale from a deleted branch)...`
|
|
920
|
-
);
|
|
921
|
-
const worktrees = await listGitWorktrees(repoPath);
|
|
922
|
-
const branchInUse = worktrees.some((wt) => wt.ref === ref);
|
|
923
|
-
if (branchInUse) {
|
|
924
|
-
throw new Error(
|
|
925
|
-
`A branch named '${ref}' already exists and is in use by another branch. Please choose a different name.`
|
|
926
|
-
);
|
|
927
|
-
}
|
|
928
|
-
console.log(`\u{1F9F9} Deleting orphaned branch '${ref}' and retrying branch creation...`);
|
|
929
|
-
await git.raw(["branch", "-D", ref]);
|
|
930
|
-
await git.raw(worktreeAddArgs);
|
|
931
|
-
console.log(`\u2705 Successfully created branch after cleaning up stale branch '${ref}'`);
|
|
932
|
-
} else {
|
|
933
|
-
throw error;
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
await addSafeDirectoryBestEffort(branchPath);
|
|
937
|
-
}
|
|
938
|
-
async function assertRemoteRefVisibleForClone(options) {
|
|
939
|
-
const remoteUrl = stripGitUrlCredentials(options.remoteUrl);
|
|
940
|
-
const refType = options.refType ?? "branch";
|
|
941
|
-
const ref = options.ref;
|
|
942
|
-
if (!remoteUrl) {
|
|
943
|
-
throw new Error("remoteUrl is required");
|
|
944
|
-
}
|
|
945
|
-
if (refType === "branch") {
|
|
946
|
-
await validateGitRef(ref);
|
|
947
|
-
} else {
|
|
948
|
-
await validateNamespacedGitRef(ref, "tags", "Invalid git tag ref");
|
|
949
|
-
}
|
|
950
|
-
const { git } = createGitForRemote(remoteUrl, options.env);
|
|
951
|
-
const namespace = refType === "tag" ? "refs/tags" : "refs/heads";
|
|
952
|
-
let output;
|
|
953
|
-
try {
|
|
954
|
-
output = await git.listRemote([
|
|
955
|
-
refType === "tag" ? "--tags" : "--heads",
|
|
956
|
-
remoteUrl,
|
|
957
|
-
`${namespace}/${ref}`
|
|
958
|
-
]);
|
|
959
|
-
} catch (error) {
|
|
960
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
961
|
-
throw new Error(
|
|
962
|
-
`Cannot validate clone-mode ${refType} '${ref}' against remote ${redactGitUrlCredentials(remoteUrl)}: ${message}`
|
|
963
|
-
);
|
|
964
|
-
}
|
|
965
|
-
if (output.trim().length === 0) {
|
|
966
|
-
throw new Error(
|
|
967
|
-
`Clone mode cannot clone local-only or missing ${refType} '${ref}' because it is not visible on the remote ${redactGitUrlCredentials(remoteUrl)}. Push '${ref}' to origin, choose a remote ${refType}, or use storage_mode='worktree' if it is enabled.`
|
|
968
|
-
);
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
async function createBranchAsClone(options) {
|
|
972
|
-
const { targetPath, ref, newBranchName, depth, referencePath, env } = options;
|
|
973
|
-
const remoteUrl = stripGitUrlCredentials(options.remoteUrl);
|
|
974
|
-
const singleBranch = options.singleBranch ?? true;
|
|
975
|
-
if (!remoteUrl) {
|
|
976
|
-
throw new Error("remoteUrl is required");
|
|
977
|
-
}
|
|
978
|
-
if (remoteUrl !== options.remoteUrl) {
|
|
979
|
-
console.warn(
|
|
980
|
-
`\u{1F512} Stripped credentials from clone-mode remote URL before use: ${redactGitUrlCredentials(options.remoteUrl)}`
|
|
981
|
-
);
|
|
982
|
-
}
|
|
983
|
-
if (!targetPath) {
|
|
984
|
-
throw new Error("targetPath is required");
|
|
985
|
-
}
|
|
986
|
-
await validateGitRef(ref);
|
|
987
|
-
if (newBranchName !== void 0) {
|
|
988
|
-
await validateGitRef(newBranchName);
|
|
989
|
-
}
|
|
990
|
-
if (depth !== void 0 && (!Number.isInteger(depth) || depth <= 0)) {
|
|
991
|
-
throw new Error(`Invalid clone depth: expected positive integer, got ${depth}`);
|
|
992
|
-
}
|
|
993
|
-
if (existsSync(targetPath)) {
|
|
994
|
-
throw new Error(
|
|
995
|
-
`Target directory '${targetPath}' already exists. Refusing to clone over existing contents \u2014 pick a different path or remove the directory first.`
|
|
996
|
-
);
|
|
997
|
-
}
|
|
998
|
-
let useReference = false;
|
|
999
|
-
if (referencePath) {
|
|
1000
|
-
if (existsSync(referencePath)) {
|
|
1001
|
-
useReference = true;
|
|
1002
|
-
} else {
|
|
1003
|
-
console.log(
|
|
1004
|
-
`[createBranchAsClone] referencePath '${referencePath}' not present on this filesystem \u2014 falling back to a full clone without --reference.`
|
|
1005
|
-
);
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
const { git } = createGitForRemote(remoteUrl, env);
|
|
1009
|
-
const cloneArgs = ["--branch", ref];
|
|
1010
|
-
if (singleBranch) cloneArgs.push("--single-branch");
|
|
1011
|
-
if (depth !== void 0) cloneArgs.push("--depth", String(depth));
|
|
1012
|
-
if (useReference && referencePath) cloneArgs.push("--reference", referencePath);
|
|
1013
|
-
console.log(
|
|
1014
|
-
`[createBranchAsClone] Cloning ${redactGitUrlCredentials(remoteUrl)} \u2192 ${targetPath} (ref=${ref}${newBranchName ? `, newBranch=${newBranchName}` : ""}, depth=${depth ?? "full"}, singleBranch=${singleBranch}, reference=${useReference ? referencePath : "none"})`
|
|
1015
|
-
);
|
|
1016
|
-
await git.clone(remoteUrl, targetPath, cloneArgs);
|
|
1017
|
-
await scrubGitConfigRemoteCredentials(targetPath);
|
|
1018
|
-
let finalRef = ref;
|
|
1019
|
-
if (newBranchName) {
|
|
1020
|
-
console.log(
|
|
1021
|
-
`[createBranchAsClone] Creating local branch '${newBranchName}' off cloned '${ref}'`
|
|
1022
|
-
);
|
|
1023
|
-
const { git: cloneGit } = createGit(targetPath, env);
|
|
1024
|
-
await cloneGit.checkoutLocalBranch(newBranchName);
|
|
1025
|
-
finalRef = newBranchName;
|
|
1026
|
-
}
|
|
1027
|
-
await addSafeDirectoryBestEffort(targetPath, "[createBranchAsClone]");
|
|
1028
|
-
return { path: targetPath, ref: finalRef };
|
|
1029
|
-
}
|
|
1030
|
-
async function restoreBranchFilesystem(repoPath, branchPath, ref, baseRef, env) {
|
|
1031
|
-
await validateGitRef(ref);
|
|
1032
|
-
await validateGitRef(baseRef);
|
|
1033
|
-
const scrubResult = await scrubGitConfigRemoteCredentials(repoPath);
|
|
1034
|
-
if (scrubResult.findings.length > 0) {
|
|
1035
|
-
console.warn(
|
|
1036
|
-
`[restoreBranch] Scrubbed ${scrubResult.findings.length} credential-bearing git remote URL(s) before restore.`
|
|
1037
|
-
);
|
|
1038
|
-
}
|
|
1039
|
-
const hasToken = !!(env?.GITHUB_TOKEN ?? env?.GH_TOKEN);
|
|
1040
|
-
const authHost = hasToken ? await resolveAuthHost(repoPath) : void 0;
|
|
1041
|
-
const { git } = createGit(repoPath, env, authHost);
|
|
1042
|
-
try {
|
|
1043
|
-
await git.fetch(["origin"]);
|
|
1044
|
-
console.log(`[restoreBranch] Fetched latest from origin`);
|
|
1045
|
-
} catch (error) {
|
|
1046
|
-
console.warn(
|
|
1047
|
-
`[restoreBranch] Failed to fetch from origin (will use local refs):`,
|
|
1048
|
-
error instanceof Error ? error.message : String(error)
|
|
1049
|
-
);
|
|
1050
|
-
}
|
|
1051
|
-
let branchExistsOnRemote = false;
|
|
1052
|
-
try {
|
|
1053
|
-
const lsRemoteOutput = await git.listRemote(["--heads", "origin", ref]);
|
|
1054
|
-
branchExistsOnRemote = lsRemoteOutput.trim().length > 0;
|
|
1055
|
-
} catch {
|
|
1056
|
-
try {
|
|
1057
|
-
const branches = await git.branch(["-r"]);
|
|
1058
|
-
branchExistsOnRemote = branches.all.includes(`origin/${ref}`);
|
|
1059
|
-
} catch {
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
try {
|
|
1063
|
-
if (branchExistsOnRemote) {
|
|
1064
|
-
console.log(`[restoreBranch] Branch '${ref}' found on remote, checking out`);
|
|
1065
|
-
await createBranch(repoPath, branchPath, ref, false, true, void 0, env);
|
|
1066
|
-
return { success: true, strategy: "checkout" };
|
|
1067
|
-
}
|
|
1068
|
-
console.log(`[restoreBranch] Branch '${ref}' not on remote, creating from base '${baseRef}'`);
|
|
1069
|
-
await createBranch(repoPath, branchPath, ref, true, true, baseRef, env);
|
|
1070
|
-
return { success: true, strategy: "create" };
|
|
1071
|
-
} catch (error) {
|
|
1072
|
-
const msg = error instanceof Error ? error.message : String(error);
|
|
1073
|
-
console.error(`[restoreBranch] Failed to restore branch: ${msg}`);
|
|
1074
|
-
return {
|
|
1075
|
-
success: false,
|
|
1076
|
-
strategy: branchExistsOnRemote ? "checkout" : "create",
|
|
1077
|
-
error: msg
|
|
1078
|
-
};
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
async function listGitWorktrees(repoPath) {
|
|
1082
|
-
const { git } = createGit(repoPath);
|
|
1083
|
-
const output = await git.raw(["worktree", "list", "--porcelain"]);
|
|
1084
|
-
const worktrees = [];
|
|
1085
|
-
const lines = output.split("\n");
|
|
1086
|
-
let current = {};
|
|
1087
|
-
for (const line of lines) {
|
|
1088
|
-
if (line.startsWith("worktree ")) {
|
|
1089
|
-
current.path = line.substring(9);
|
|
1090
|
-
current.name = basename(current.path);
|
|
1091
|
-
} else if (line.startsWith("HEAD ")) {
|
|
1092
|
-
current.sha = line.substring(5);
|
|
1093
|
-
} else if (line.startsWith("branch ")) {
|
|
1094
|
-
current.ref = line.substring(7).replace("refs/heads/", "");
|
|
1095
|
-
current.detached = false;
|
|
1096
|
-
} else if (line.startsWith("detached")) {
|
|
1097
|
-
current.detached = true;
|
|
1098
|
-
} else if (line === "") {
|
|
1099
|
-
if (current.path && current.sha) {
|
|
1100
|
-
worktrees.push(current);
|
|
1101
|
-
}
|
|
1102
|
-
current = {};
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
if (current.path && current.sha) {
|
|
1106
|
-
worktrees.push(current);
|
|
1107
|
-
}
|
|
1108
|
-
return worktrees;
|
|
1109
|
-
}
|
|
1110
|
-
async function removeGitWorktree(repoPath, branchName) {
|
|
1111
|
-
const { git } = createGit(repoPath);
|
|
1112
|
-
await git.raw(["worktree", "remove", "--force", branchName]);
|
|
1113
|
-
}
|
|
1114
|
-
async function cleanBranch(branchPath, fixOwnership = true) {
|
|
1115
|
-
const { git } = createGit(branchPath);
|
|
1116
|
-
const dryRunResult = await git.clean("fdxn");
|
|
1117
|
-
const filesRemoved = Array.isArray(dryRunResult.files) ? dryRunResult.files.length : 0;
|
|
1118
|
-
if (fixOwnership) {
|
|
1119
|
-
try {
|
|
1120
|
-
const { execSync: execSync3 } = await import("child_process");
|
|
1121
|
-
const { existsSync: existsSync2 } = await import("fs");
|
|
1122
|
-
const os2 = await import("os");
|
|
1123
|
-
if (!existsSync2(branchPath)) {
|
|
1124
|
-
throw new Error(`Branch path does not exist: ${branchPath}`);
|
|
1125
|
-
}
|
|
1126
|
-
const currentUser = os2.userInfo().username;
|
|
1127
|
-
try {
|
|
1128
|
-
const escapedPath = branchPath.replace(/'/g, "'\\''");
|
|
1129
|
-
execSync3(`sudo -n chown -R ${currentUser}: '${escapedPath}'`, {
|
|
1130
|
-
stdio: "pipe",
|
|
1131
|
-
encoding: "utf-8"
|
|
1132
|
-
});
|
|
1133
|
-
console.log(`[git.clean] Fixed ownership to ${currentUser} before clean`);
|
|
1134
|
-
} catch (_chownError) {
|
|
1135
|
-
console.warn(
|
|
1136
|
-
"[git.clean] Could not fix ownership (sudo not configured), continuing anyway"
|
|
1137
|
-
);
|
|
1138
|
-
}
|
|
1139
|
-
} catch (error) {
|
|
1140
|
-
console.warn("[git.clean] Error fixing ownership, continuing with clean:", error);
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
try {
|
|
1144
|
-
await git.clean("fdx");
|
|
1145
|
-
} catch (error) {
|
|
1146
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
1147
|
-
const isWarningsOnly = errorMessage.includes("warning:") && errorMessage.includes("failed to remove");
|
|
1148
|
-
if (!isWarningsOnly) {
|
|
1149
|
-
throw error;
|
|
1150
|
-
}
|
|
1151
|
-
console.warn(
|
|
1152
|
-
"[git.clean] Completed with warnings (some files could not be removed):",
|
|
1153
|
-
errorMessage
|
|
1154
|
-
);
|
|
1155
|
-
}
|
|
1156
|
-
return { filesRemoved };
|
|
1157
|
-
}
|
|
1158
|
-
async function pruneGitWorktrees(repoPath) {
|
|
1159
|
-
const { git } = createGit(repoPath);
|
|
1160
|
-
await git.raw(["worktree", "prune"]);
|
|
1161
|
-
}
|
|
1162
|
-
async function hasRemoteBranch(repoPath, branchName, remote = "origin") {
|
|
1163
|
-
const { git } = createGit(repoPath);
|
|
1164
|
-
const branches = await git.branch(["-r"]);
|
|
1165
|
-
return branches.all.includes(`${remote}/${branchName}`);
|
|
1166
|
-
}
|
|
1167
|
-
async function getRemoteBranches(repoPath, remote = "origin") {
|
|
1168
|
-
const { git } = createGit(repoPath);
|
|
1169
|
-
const branches = await git.branch(["-r"]);
|
|
1170
|
-
return branches.all.filter((b) => b.startsWith(`${remote}/`)).map((b) => b.replace(`${remote}/`, ""));
|
|
1171
|
-
}
|
|
1172
|
-
async function getGitState(repoPath) {
|
|
1173
|
-
try {
|
|
1174
|
-
if (!await isGitRepo(repoPath)) {
|
|
1175
|
-
console.warn(`[getGitState] Not a git repo: ${repoPath}`);
|
|
1176
|
-
return "unknown";
|
|
1177
|
-
}
|
|
1178
|
-
const sha = await getCurrentSha(repoPath);
|
|
1179
|
-
if (!sha) {
|
|
1180
|
-
try {
|
|
1181
|
-
const { git } = createGit(repoPath);
|
|
1182
|
-
const headSha = await git.revparse(["HEAD"]);
|
|
1183
|
-
if (headSha) {
|
|
1184
|
-
const clean2 = await isClean(repoPath);
|
|
1185
|
-
const trimmed = headSha.trim();
|
|
1186
|
-
console.log(
|
|
1187
|
-
`[getGitState] git.log() returned no SHA but rev-parse HEAD succeeded: ${trimmed.substring(0, 8)} (${repoPath})`
|
|
1188
|
-
);
|
|
1189
|
-
return clean2 ? trimmed : `${trimmed}-dirty`;
|
|
1190
|
-
}
|
|
1191
|
-
} catch (revParseError) {
|
|
1192
|
-
console.warn(
|
|
1193
|
-
`[getGitState] Both git.log() and rev-parse HEAD failed for ${repoPath}:`,
|
|
1194
|
-
revParseError
|
|
1195
|
-
);
|
|
1196
|
-
}
|
|
1197
|
-
console.warn(
|
|
1198
|
-
`[getGitState] Could not determine SHA for ${repoPath} (git log returned empty)`
|
|
1199
|
-
);
|
|
1200
|
-
return "unknown";
|
|
1201
|
-
}
|
|
1202
|
-
const clean = await isClean(repoPath);
|
|
1203
|
-
return clean ? sha : `${sha}-dirty`;
|
|
1204
|
-
} catch (error) {
|
|
1205
|
-
console.warn(`[getGitState] Failed for ${repoPath}:`, error);
|
|
1206
|
-
return "unknown";
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
async function deleteRepoDirectory(repoPath) {
|
|
1210
|
-
const { rm } = await import("fs/promises");
|
|
1211
|
-
const { realpathSync, existsSync: existsSync2 } = await import("fs");
|
|
1212
|
-
const { resolve: resolve2, relative } = await import("path");
|
|
1213
|
-
const reposDir = getReposDir();
|
|
1214
|
-
const resolvedReposDir = realpathSync(reposDir);
|
|
1215
|
-
const resolvedRepoPath = existsSync2(repoPath) ? realpathSync(repoPath) : resolve2(realpathSync(resolve2(repoPath, "..")), resolve2(repoPath).split("/").pop());
|
|
1216
|
-
const relativePath = relative(resolvedReposDir, resolvedRepoPath);
|
|
1217
|
-
if (relativePath.startsWith("..") || resolve2(relativePath) === relativePath) {
|
|
1218
|
-
throw new Error(
|
|
1219
|
-
`Safety check failed: Repository path must be inside ${reposDir}. Got: ${repoPath}`
|
|
1220
|
-
);
|
|
1221
|
-
}
|
|
1222
|
-
if (resolvedRepoPath === resolvedReposDir || relativePath === "") {
|
|
1223
|
-
throw new Error("Cannot delete the repos directory itself");
|
|
1224
|
-
}
|
|
1225
|
-
await rm(resolvedRepoPath, { recursive: true, force: true });
|
|
1226
|
-
}
|
|
1227
|
-
async function deleteBranchDirectory(branchPath) {
|
|
1228
|
-
const { rm } = await import("fs/promises");
|
|
1229
|
-
const { realpathSync, existsSync: existsSync2 } = await import("fs");
|
|
1230
|
-
const { resolve: resolve2, relative } = await import("path");
|
|
1231
|
-
const branchesDir = getBranchesDir();
|
|
1232
|
-
const resolvedBranchesDir = realpathSync(branchesDir);
|
|
1233
|
-
const resolvedBranchPath = existsSync2(branchPath) ? realpathSync(branchPath) : resolve2(realpathSync(resolve2(branchPath, "..")), resolve2(branchPath).split("/").pop());
|
|
1234
|
-
const relativePath = relative(resolvedBranchesDir, resolvedBranchPath);
|
|
1235
|
-
if (relativePath.startsWith("..") || resolve2(relativePath) === relativePath) {
|
|
1236
|
-
throw new Error(
|
|
1237
|
-
`Safety check failed: Branch path must be inside ${branchesDir}. Got: ${branchPath}`
|
|
1238
|
-
);
|
|
1239
|
-
}
|
|
1240
|
-
if (resolvedBranchPath === resolvedBranchesDir || relativePath === "") {
|
|
1241
|
-
throw new Error("Cannot delete the branches directory itself");
|
|
1242
|
-
}
|
|
1243
|
-
await rm(resolvedBranchPath, { recursive: true, force: true });
|
|
1244
|
-
}
|
|
1245
|
-
async function deleteBranch(repoPath, branchName) {
|
|
1246
|
-
await validateGitRef(branchName);
|
|
1247
|
-
const { git } = createGit(repoPath);
|
|
1248
|
-
try {
|
|
1249
|
-
await git.raw(["branch", "-D", branchName]);
|
|
1250
|
-
return true;
|
|
1251
|
-
} catch (error) {
|
|
1252
|
-
const msg = error instanceof Error ? error.message : String(error);
|
|
1253
|
-
if (msg.includes("not found")) {
|
|
1254
|
-
return false;
|
|
1255
|
-
}
|
|
1256
|
-
throw error;
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
export {
|
|
1260
|
-
addSafeDirectoryBestEffort,
|
|
1261
|
-
assertRemoteRefVisibleForClone,
|
|
1262
|
-
buildAuthHeaderEnv,
|
|
1263
|
-
buildGitConfigEnv,
|
|
1264
|
-
buildGitConfigParameters,
|
|
1265
|
-
buildWorktreeAddArgs,
|
|
1266
|
-
categorizeGitError,
|
|
1267
|
-
cleanBranch,
|
|
1268
|
-
cloneRepo,
|
|
1269
|
-
createBranch,
|
|
1270
|
-
createBranchAsClone,
|
|
1271
|
-
createGit,
|
|
1272
|
-
createGitForRemote,
|
|
1273
|
-
deleteBranch,
|
|
1274
|
-
deleteBranchDirectory,
|
|
1275
|
-
deleteRepoDirectory,
|
|
1276
|
-
ensureGitRemoteUrl,
|
|
1277
|
-
extractRepoName,
|
|
1278
|
-
getBranchPath,
|
|
1279
|
-
getBranchesDir,
|
|
1280
|
-
getCurrentBranch,
|
|
1281
|
-
getCurrentSha,
|
|
1282
|
-
getDefaultBranch,
|
|
1283
|
-
getGitState,
|
|
1284
|
-
getRemoteBranches,
|
|
1285
|
-
getRemoteUrl,
|
|
1286
|
-
getReposDir,
|
|
1287
|
-
gitUrlHasUserinfo,
|
|
1288
|
-
hasRemoteBranch,
|
|
1289
|
-
isClean,
|
|
1290
|
-
isGitRepo,
|
|
1291
|
-
isLikelyGitToken,
|
|
1292
|
-
isValidGitRepo,
|
|
1293
|
-
listGitWorktrees,
|
|
1294
|
-
parseHostFromGitUrl,
|
|
1295
|
-
pruneGitWorktrees,
|
|
1296
|
-
redactGitEnv,
|
|
1297
|
-
redactGitUrlCredentials,
|
|
1298
|
-
removeGitWorktree,
|
|
1299
|
-
restoreBranchFilesystem,
|
|
1300
|
-
scanGitConfigRemoteCredentials,
|
|
1301
|
-
scrubGitConfigRemoteCredentials,
|
|
1302
|
-
simpleGit,
|
|
1303
|
-
stripGitUrlCredentials,
|
|
1304
|
-
validateGitRef
|
|
1305
|
-
};
|
|
2
|
+
export * from "@agor/git";
|