@kaitranntt/ccs 8.4.0-dev.10 → 8.4.0-dev.11
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/auth/profile-registry.d.ts.map +1 -1
- package/dist/auth/profile-registry.js +13 -12
- package/dist/auth/profile-registry.js.map +1 -1
- package/dist/cliproxy/accounts/account-safety.d.ts.map +1 -1
- package/dist/cliproxy/accounts/account-safety.js +56 -56
- package/dist/cliproxy/accounts/account-safety.js.map +1 -1
- package/dist/cliproxy/auth/antigravity-responsibility.d.ts.map +1 -1
- package/dist/cliproxy/auth/antigravity-responsibility.js +15 -15
- package/dist/cliproxy/auth/antigravity-responsibility.js.map +1 -1
- package/dist/cliproxy/auth/auth-token-manager.d.ts.map +1 -1
- package/dist/cliproxy/auth/auth-token-manager.js +2 -1
- package/dist/cliproxy/auth/auth-token-manager.js.map +1 -1
- package/dist/cliproxy/auth/auth-types.d.ts.map +1 -1
- package/dist/cliproxy/auth/auth-types.js +3 -2
- package/dist/cliproxy/auth/auth-types.js.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -1
- package/dist/cliproxy/auth/oauth-handler.js +6 -5
- package/dist/cliproxy/auth/oauth-handler.js.map +1 -1
- package/dist/cliproxy/auth/provider-refreshers/index.d.ts.map +1 -1
- package/dist/cliproxy/auth/provider-refreshers/index.js +2 -1
- package/dist/cliproxy/auth/provider-refreshers/index.js.map +1 -1
- package/dist/cliproxy/config/model-config.d.ts.map +1 -1
- package/dist/cliproxy/config/model-config.js +32 -32
- package/dist/cliproxy/config/model-config.js.map +1 -1
- package/dist/cliproxy/executor/arg-parser.d.ts.map +1 -1
- package/dist/cliproxy/executor/arg-parser.js +26 -26
- package/dist/cliproxy/executor/arg-parser.js.map +1 -1
- package/dist/cliproxy/executor/auth-coordinator.d.ts.map +1 -1
- package/dist/cliproxy/executor/auth-coordinator.js +15 -14
- package/dist/cliproxy/executor/auth-coordinator.js.map +1 -1
- package/dist/cliproxy/executor/index.d.ts.map +1 -1
- package/dist/cliproxy/executor/index.js +17 -13
- package/dist/cliproxy/executor/index.js.map +1 -1
- package/dist/cliproxy/executor/lifecycle-manager.d.ts.map +1 -1
- package/dist/cliproxy/executor/lifecycle-manager.js +18 -16
- package/dist/cliproxy/executor/lifecycle-manager.js.map +1 -1
- package/dist/cliproxy/executor/model-warnings.d.ts.map +1 -1
- package/dist/cliproxy/executor/model-warnings.js +24 -13
- package/dist/cliproxy/executor/model-warnings.js.map +1 -1
- package/dist/cliproxy/executor/retry-handler.d.ts.map +1 -1
- package/dist/cliproxy/executor/retry-handler.js +13 -11
- package/dist/cliproxy/executor/retry-handler.js.map +1 -1
- package/dist/cliproxy/executor/session-bridge.d.ts.map +1 -1
- package/dist/cliproxy/executor/session-bridge.js +18 -10
- package/dist/cliproxy/executor/session-bridge.js.map +1 -1
- package/dist/cliproxy/management/remote-token-uploader.d.ts.map +1 -1
- package/dist/cliproxy/management/remote-token-uploader.js +11 -11
- package/dist/cliproxy/management/remote-token-uploader.js.map +1 -1
- package/dist/cliproxy/proxy/https-tunnel-proxy.d.ts +5 -1
- package/dist/cliproxy/proxy/https-tunnel-proxy.d.ts.map +1 -1
- package/dist/cliproxy/proxy/https-tunnel-proxy.js +22 -10
- package/dist/cliproxy/proxy/https-tunnel-proxy.js.map +1 -1
- package/dist/cliproxy/proxy/tool-sanitization-proxy.d.ts +0 -12
- package/dist/cliproxy/proxy/tool-sanitization-proxy.d.ts.map +1 -1
- package/dist/cliproxy/proxy/tool-sanitization-proxy.js +42 -72
- package/dist/cliproxy/proxy/tool-sanitization-proxy.js.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher/account-quota-fetcher.d.ts +21 -0
- package/dist/cliproxy/quota/quota-fetcher/account-quota-fetcher.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/account-quota-fetcher.js +154 -0
- package/dist/cliproxy/quota/quota-fetcher/account-quota-fetcher.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/all-accounts-fetcher.d.ts +35 -0
- package/dist/cliproxy/quota/quota-fetcher/all-accounts-fetcher.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/all-accounts-fetcher.js +98 -0
- package/dist/cliproxy/quota/quota-fetcher/all-accounts-fetcher.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/auth-file-reader.d.ts +22 -0
- package/dist/cliproxy/quota/quota-fetcher/auth-file-reader.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/auth-file-reader.js +111 -0
- package/dist/cliproxy/quota/quota-fetcher/auth-file-reader.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/available-models-fetcher.d.ts +17 -0
- package/dist/cliproxy/quota/quota-fetcher/available-models-fetcher.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/available-models-fetcher.js +85 -0
- package/dist/cliproxy/quota/quota-fetcher/available-models-fetcher.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/constants.d.ts +25 -0
- package/dist/cliproxy/quota/quota-fetcher/constants.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/constants.js +31 -0
- package/dist/cliproxy/quota/quota-fetcher/constants.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/http-client.d.ts +29 -0
- package/dist/cliproxy/quota/quota-fetcher/http-client.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/http-client.js +199 -0
- package/dist/cliproxy/quota/quota-fetcher/http-client.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/project-lookup.d.ts +16 -0
- package/dist/cliproxy/quota/quota-fetcher/project-lookup.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/project-lookup.js +89 -0
- package/dist/cliproxy/quota/quota-fetcher/project-lookup.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/status-classifier.d.ts +29 -0
- package/dist/cliproxy/quota/quota-fetcher/status-classifier.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/status-classifier.js +168 -0
- package/dist/cliproxy/quota/quota-fetcher/status-classifier.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/types.d.ts +165 -0
- package/dist/cliproxy/quota/quota-fetcher/types.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher/types.js +9 -0
- package/dist/cliproxy/quota/quota-fetcher/types.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-claude.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-claude.js +14 -3
- package/dist/cliproxy/quota/quota-fetcher-claude.js.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-codex.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-codex.js +36 -9
- package/dist/cliproxy/quota/quota-fetcher-codex.js.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/auth-file-discovery.d.ts +26 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/auth-file-discovery.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/auth-file-discovery.js +132 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/auth-file-discovery.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/bucket-building.d.ts +23 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/bucket-building.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/bucket-building.js +54 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/bucket-building.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/constants.d.ts +26 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/constants.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/constants.js +29 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/constants.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/error-parsing.d.ts +61 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/error-parsing.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/error-parsing.js +259 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/error-parsing.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/index.d.ts +20 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/index.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/index.js +38 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/index.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/managed-request.d.ts +82 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/managed-request.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/managed-request.js +263 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/managed-request.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/quota-fetcher.d.ts +46 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/quota-fetcher.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/quota-fetcher.js +188 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/quota-fetcher.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/shared-utils.d.ts +35 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/shared-utils.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/shared-utils.js +65 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/shared-utils.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/supplementary-metadata.d.ts +37 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/supplementary-metadata.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/supplementary-metadata.js +117 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/supplementary-metadata.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/token-parsing.d.ts +31 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/token-parsing.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/token-parsing.js +77 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/token-parsing.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/types.d.ts +114 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/types.d.ts.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/types.js +10 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli/types.js.map +1 -0
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli.d.ts +13 -58
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli.js +20 -819
- package/dist/cliproxy/quota/quota-fetcher-gemini-cli.js.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-ghcp.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher-ghcp.js +19 -4
- package/dist/cliproxy/quota/quota-fetcher-ghcp.js.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher.d.ts +12 -108
- package/dist/cliproxy/quota/quota-fetcher.d.ts.map +1 -1
- package/dist/cliproxy/quota/quota-fetcher.js +23 -766
- package/dist/cliproxy/quota/quota-fetcher.js.map +1 -1
- package/dist/cliproxy/routing/routing-strategy.d.ts.map +1 -1
- package/dist/cliproxy/routing/routing-strategy.js +11 -3
- package/dist/cliproxy/routing/routing-strategy.js.map +1 -1
- package/dist/commands/cliproxy/quota-subcommand/claude-window-helpers.d.ts +26 -0
- package/dist/commands/cliproxy/quota-subcommand/claude-window-helpers.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/claude-window-helpers.js +82 -0
- package/dist/commands/cliproxy/quota-subcommand/claude-window-helpers.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/codex-window-helpers.d.ts +41 -0
- package/dist/commands/cliproxy/quota-subcommand/codex-window-helpers.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/codex-window-helpers.js +202 -0
- package/dist/commands/cliproxy/quota-subcommand/codex-window-helpers.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/format-helpers.d.ts +32 -0
- package/dist/commands/cliproxy/quota-subcommand/format-helpers.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/format-helpers.js +90 -0
- package/dist/commands/cliproxy/quota-subcommand/format-helpers.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/handlers.d.ts +25 -0
- package/dist/commands/cliproxy/quota-subcommand/handlers.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/handlers.js +245 -0
- package/dist/commands/cliproxy/quota-subcommand/handlers.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/profile-args.d.ts +10 -0
- package/dist/commands/cliproxy/quota-subcommand/profile-args.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/profile-args.js +37 -0
- package/dist/commands/cliproxy/quota-subcommand/profile-args.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/provider-runtime.d.ts +12 -0
- package/dist/commands/cliproxy/quota-subcommand/provider-runtime.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/provider-runtime.js +64 -0
- package/dist/commands/cliproxy/quota-subcommand/provider-runtime.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/quota-failure-display.d.ts +27 -0
- package/dist/commands/cliproxy/quota-subcommand/quota-failure-display.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/quota-failure-display.js +74 -0
- package/dist/commands/cliproxy/quota-subcommand/quota-failure-display.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/antigravity.d.ts +10 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/antigravity.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/antigravity.js +46 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/antigravity.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/claude.d.ts +14 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/claude.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/claude.js +68 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/claude.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/codex.d.ts +14 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/codex.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/codex.js +82 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/codex.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/gemini-cli.d.ts +14 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/gemini-cli.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/gemini-cli.js +61 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/gemini-cli.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/ghcp.d.ts +13 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/ghcp.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/ghcp.js +63 -0
- package/dist/commands/cliproxy/quota-subcommand/sections/ghcp.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/test-exports.d.ts +19 -0
- package/dist/commands/cliproxy/quota-subcommand/test-exports.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/test-exports.js +22 -0
- package/dist/commands/cliproxy/quota-subcommand/test-exports.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/types.d.ts +42 -0
- package/dist/commands/cliproxy/quota-subcommand/types.d.ts.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand/types.js +9 -0
- package/dist/commands/cliproxy/quota-subcommand/types.js.map +1 -0
- package/dist/commands/cliproxy/quota-subcommand.d.ts +14 -36
- package/dist/commands/cliproxy/quota-subcommand.d.ts.map +1 -1
- package/dist/commands/cliproxy/quota-subcommand.js +21 -872
- package/dist/commands/cliproxy/quota-subcommand.js.map +1 -1
- package/dist/commands/persist-command/arg-parsing.d.ts +14 -0
- package/dist/commands/persist-command/arg-parsing.d.ts.map +1 -0
- package/dist/commands/persist-command/arg-parsing.js +84 -0
- package/dist/commands/persist-command/arg-parsing.js.map +1 -0
- package/dist/commands/persist-command/backup-rotation.d.ts +23 -0
- package/dist/commands/persist-command/backup-rotation.d.ts.map +1 -0
- package/dist/commands/persist-command/backup-rotation.js +260 -0
- package/dist/commands/persist-command/backup-rotation.js.map +1 -0
- package/dist/commands/persist-command/handler.d.ts +10 -0
- package/dist/commands/persist-command/handler.d.ts.map +1 -0
- package/dist/commands/persist-command/handler.js +267 -0
- package/dist/commands/persist-command/handler.js.map +1 -0
- package/dist/commands/persist-command/help.d.ts +9 -0
- package/dist/commands/persist-command/help.d.ts.map +1 -0
- package/dist/commands/persist-command/help.js +86 -0
- package/dist/commands/persist-command/help.js.map +1 -0
- package/dist/commands/persist-command/receipt.d.ts +13 -0
- package/dist/commands/persist-command/receipt.d.ts.map +1 -0
- package/dist/commands/persist-command/receipt.js +102 -0
- package/dist/commands/persist-command/receipt.js.map +1 -0
- package/dist/commands/persist-command/secret-detection.d.ts +11 -0
- package/dist/commands/persist-command/secret-detection.d.ts.map +1 -0
- package/dist/commands/persist-command/secret-detection.js +54 -0
- package/dist/commands/persist-command/secret-detection.js.map +1 -0
- package/dist/commands/persist-command/secure-file.d.ts +21 -0
- package/dist/commands/persist-command/secure-file.d.ts.map +1 -0
- package/dist/commands/persist-command/secure-file.js +231 -0
- package/dist/commands/persist-command/secure-file.js.map +1 -0
- package/dist/commands/persist-command/types.d.ts +42 -0
- package/dist/commands/persist-command/types.d.ts.map +1 -0
- package/dist/commands/persist-command/types.js +34 -0
- package/dist/commands/persist-command/types.js.map +1 -0
- package/dist/commands/persist-command.d.ts +7 -2
- package/dist/commands/persist-command.d.ts.map +1 -1
- package/dist/commands/persist-command.js +17 -933
- package/dist/commands/persist-command.js.map +1 -1
- package/dist/copilot/copilot-executor.js +25 -25
- package/dist/copilot/copilot-executor.js.map +1 -1
- package/dist/cursor/cursor-daemon-entry.d.ts.map +1 -1
- package/dist/cursor/cursor-daemon-entry.js +34 -9
- package/dist/cursor/cursor-daemon-entry.js.map +1 -1
- package/dist/cursor/cursor-daemon.d.ts.map +1 -1
- package/dist/cursor/cursor-daemon.js +1 -0
- package/dist/cursor/cursor-daemon.js.map +1 -1
- package/dist/cursor/cursor-profile-executor.d.ts.map +1 -1
- package/dist/cursor/cursor-profile-executor.js +18 -17
- package/dist/cursor/cursor-profile-executor.js.map +1 -1
- package/dist/delegation/delegation-handler.d.ts.map +1 -1
- package/dist/delegation/delegation-handler.js +29 -23
- package/dist/delegation/delegation-handler.js.map +1 -1
- package/dist/delegation/headless-executor.d.ts +1 -0
- package/dist/delegation/headless-executor.d.ts.map +1 -1
- package/dist/delegation/headless-executor.js +35 -14
- package/dist/delegation/headless-executor.js.map +1 -1
- package/dist/delegation/session-manager.d.ts.map +1 -1
- package/dist/delegation/session-manager.js +12 -4
- package/dist/delegation/session-manager.js.map +1 -1
- package/dist/dispatcher/cli-argument-parser.d.ts +1 -1
- package/dist/dispatcher/cli-argument-parser.d.ts.map +1 -1
- package/dist/dispatcher/cli-argument-parser.js +24 -23
- package/dist/dispatcher/cli-argument-parser.js.map +1 -1
- package/dist/dispatcher/flows/cliproxy-flow.d.ts.map +1 -1
- package/dist/dispatcher/flows/cliproxy-flow.js +12 -11
- package/dist/dispatcher/flows/cliproxy-flow.js.map +1 -1
- package/dist/dispatcher/flows/settings-flow.d.ts.map +1 -1
- package/dist/dispatcher/flows/settings-flow.js +27 -27
- package/dist/dispatcher/flows/settings-flow.js.map +1 -1
- package/dist/dispatcher/profile-resolver.d.ts.map +1 -1
- package/dist/dispatcher/profile-resolver.js +16 -16
- package/dist/dispatcher/profile-resolver.js.map +1 -1
- package/dist/docker/supervisord-lifecycle.d.ts.map +1 -1
- package/dist/docker/supervisord-lifecycle.js +5 -1
- package/dist/docker/supervisord-lifecycle.js.map +1 -1
- package/dist/errors/error-types.d.ts +26 -22
- package/dist/errors/error-types.d.ts.map +1 -1
- package/dist/errors/error-types.js +15 -12
- package/dist/errors/error-types.js.map +1 -1
- package/dist/errors/exit-codes.d.ts +20 -13
- package/dist/errors/exit-codes.d.ts.map +1 -1
- package/dist/errors/exit-codes.js +32 -28
- package/dist/errors/exit-codes.js.map +1 -1
- package/dist/glmt/delta-accumulator.d.ts +1 -0
- package/dist/glmt/delta-accumulator.d.ts.map +1 -1
- package/dist/glmt/delta-accumulator.js +12 -4
- package/dist/glmt/delta-accumulator.js.map +1 -1
- package/dist/glmt/glmt-proxy.d.ts.map +1 -1
- package/dist/glmt/glmt-proxy.js +39 -10
- package/dist/glmt/glmt-proxy.js.map +1 -1
- package/dist/glmt/glmt-transformer.d.ts.map +1 -1
- package/dist/glmt/glmt-transformer.js +1 -4
- package/dist/glmt/glmt-transformer.js.map +1 -1
- package/dist/glmt/pipeline/request-transformer.d.ts.map +1 -1
- package/dist/glmt/pipeline/request-transformer.js +5 -1
- package/dist/glmt/pipeline/request-transformer.js.map +1 -1
- package/dist/glmt/pipeline/response-builder.d.ts.map +1 -1
- package/dist/glmt/pipeline/response-builder.js +7 -3
- package/dist/glmt/pipeline/response-builder.js.map +1 -1
- package/dist/glmt/pipeline/stream-parser.d.ts.map +1 -1
- package/dist/glmt/pipeline/stream-parser.js +11 -5
- package/dist/glmt/pipeline/stream-parser.js.map +1 -1
- package/dist/glmt/pipeline/tool-call-handler.d.ts.map +1 -1
- package/dist/glmt/pipeline/tool-call-handler.js +7 -1
- package/dist/glmt/pipeline/tool-call-handler.js.map +1 -1
- package/dist/glmt/sse-parser.d.ts +1 -0
- package/dist/glmt/sse-parser.d.ts.map +1 -1
- package/dist/glmt/sse-parser.js +7 -3
- package/dist/glmt/sse-parser.js.map +1 -1
- package/dist/management/shared-manager/fs-helpers.d.ts +69 -0
- package/dist/management/shared-manager/fs-helpers.d.ts.map +1 -0
- package/dist/management/shared-manager/fs-helpers.js +241 -0
- package/dist/management/shared-manager/fs-helpers.js.map +1 -0
- package/dist/management/shared-manager/migrations.d.ts +21 -0
- package/dist/management/shared-manager/migrations.d.ts.map +1 -0
- package/dist/management/shared-manager/migrations.js +187 -0
- package/dist/management/shared-manager/migrations.js.map +1 -0
- package/dist/management/shared-manager/orchestrator.d.ts +87 -0
- package/dist/management/shared-manager/orchestrator.d.ts.map +1 -0
- package/dist/management/shared-manager/orchestrator.js +161 -0
- package/dist/management/shared-manager/orchestrator.js.map +1 -0
- package/dist/management/shared-manager/plugin-layout-internals.d.ts +42 -0
- package/dist/management/shared-manager/plugin-layout-internals.d.ts.map +1 -0
- package/dist/management/shared-manager/plugin-layout-internals.js +192 -0
- package/dist/management/shared-manager/plugin-layout-internals.js.map +1 -0
- package/dist/management/shared-manager/plugin-metadata-normalizer.d.ts +53 -0
- package/dist/management/shared-manager/plugin-metadata-normalizer.d.ts.map +1 -0
- package/dist/management/shared-manager/plugin-metadata-normalizer.js +253 -0
- package/dist/management/shared-manager/plugin-metadata-normalizer.js.map +1 -0
- package/dist/management/shared-manager/project-context-sync.d.ts +36 -0
- package/dist/management/shared-manager/project-context-sync.d.ts.map +1 -0
- package/dist/management/shared-manager/project-context-sync.js +204 -0
- package/dist/management/shared-manager/project-context-sync.js.map +1 -0
- package/dist/management/shared-manager/project-memory-sync.d.ts +21 -0
- package/dist/management/shared-manager/project-memory-sync.d.ts.map +1 -0
- package/dist/management/shared-manager/project-memory-sync.js +113 -0
- package/dist/management/shared-manager/project-memory-sync.js.map +1 -0
- package/dist/management/shared-manager/shared-dir-linker.d.ts +41 -0
- package/dist/management/shared-manager/shared-dir-linker.d.ts.map +1 -0
- package/dist/management/shared-manager/shared-dir-linker.js +227 -0
- package/dist/management/shared-manager/shared-dir-linker.js.map +1 -0
- package/dist/management/shared-manager/symlink-helpers.d.ts +61 -0
- package/dist/management/shared-manager/symlink-helpers.d.ts.map +1 -0
- package/dist/management/shared-manager/symlink-helpers.js +243 -0
- package/dist/management/shared-manager/symlink-helpers.js.map +1 -0
- package/dist/management/shared-manager/types.d.ts +45 -0
- package/dist/management/shared-manager/types.d.ts.map +1 -0
- package/dist/management/shared-manager/types.js +57 -0
- package/dist/management/shared-manager/types.js.map +1 -0
- package/dist/management/shared-manager.d.ts +13 -160
- package/dist/management/shared-manager.d.ts.map +1 -1
- package/dist/management/shared-manager.js +18 -1294
- package/dist/management/shared-manager.js.map +1 -1
- package/dist/proxy/proxy-daemon-entry.js +1 -1
- package/dist/proxy/proxy-daemon-entry.js.map +1 -1
- package/dist/proxy/transformers/sse-stream-transformer.d.ts.map +1 -1
- package/dist/proxy/transformers/sse-stream-transformer.js +12 -17
- package/dist/proxy/transformers/sse-stream-transformer.js.map +1 -1
- package/dist/services/logging/index.d.ts +1 -1
- package/dist/services/logging/index.d.ts.map +1 -1
- package/dist/services/logging/index.js +6 -1
- package/dist/services/logging/index.js.map +1 -1
- package/dist/services/logging/log-context.d.ts +27 -2
- package/dist/services/logging/log-context.d.ts.map +1 -1
- package/dist/services/logging/log-context.js +43 -4
- package/dist/services/logging/log-context.js.map +1 -1
- package/dist/services/logging/log-redaction.d.ts +9 -0
- package/dist/services/logging/log-redaction.d.ts.map +1 -1
- package/dist/services/logging/log-redaction.js +31 -3
- package/dist/services/logging/log-redaction.js.map +1 -1
- package/dist/services/logging/logger.js +2 -2
- package/dist/services/logging/logger.js.map +1 -1
- package/dist/targets/codex-adapter.d.ts.map +1 -1
- package/dist/targets/codex-adapter.js +11 -10
- package/dist/targets/codex-adapter.js.map +1 -1
- package/dist/targets/droid-adapter.d.ts.map +1 -1
- package/dist/targets/droid-adapter.js +12 -12
- package/dist/targets/droid-adapter.js.map +1 -1
- package/dist/utils/image-analysis/mcp-installer.d.ts.map +1 -1
- package/dist/utils/image-analysis/mcp-installer.js +16 -13
- package/dist/utils/image-analysis/mcp-installer.js.map +1 -1
- package/dist/utils/websearch/mcp-installer.d.ts.map +1 -1
- package/dist/utils/websearch/mcp-installer.js +14 -12
- package/dist/utils/websearch/mcp-installer.js.map +1 -1
- package/dist/web-server/middleware/request-logging-middleware.d.ts.map +1 -1
- package/dist/web-server/middleware/request-logging-middleware.js +14 -9
- package/dist/web-server/middleware/request-logging-middleware.js.map +1 -1
- package/dist/web-server/routes/bar-routes.d.ts.map +1 -1
- package/dist/web-server/routes/bar-routes.js +11 -2
- package/dist/web-server/routes/bar-routes.js.map +1 -1
- package/dist/web-server/routes/claude-extension-routes.d.ts.map +1 -1
- package/dist/web-server/routes/claude-extension-routes.js +3 -2
- package/dist/web-server/routes/claude-extension-routes.js.map +1 -1
- package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-auth-routes.js +6 -4
- package/dist/web-server/routes/cliproxy-auth-routes.js.map +1 -1
- package/dist/web-server/routes/cliproxy-stats-routes/config-routes.d.ts +16 -0
- package/dist/web-server/routes/cliproxy-stats-routes/config-routes.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/config-routes.js +219 -0
- package/dist/web-server/routes/cliproxy-stats-routes/config-routes.js.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/error-log-routes.d.ts +12 -0
- package/dist/web-server/routes/cliproxy-stats-routes/error-log-routes.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/error-log-routes.js +153 -0
- package/dist/web-server/routes/cliproxy-stats-routes/error-log-routes.js.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/quota-helpers.d.ts +19 -0
- package/dist/web-server/routes/cliproxy-stats-routes/quota-helpers.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/quota-helpers.js +38 -0
- package/dist/web-server/routes/cliproxy-stats-routes/quota-helpers.js.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/quota-routes.d.ts +13 -0
- package/dist/web-server/routes/cliproxy-stats-routes/quota-routes.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/quota-routes.js +195 -0
- package/dist/web-server/routes/cliproxy-stats-routes/quota-routes.js.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/restart-route.d.ts +17 -0
- package/dist/web-server/routes/cliproxy-stats-routes/restart-route.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/restart-route.js +34 -0
- package/dist/web-server/routes/cliproxy-stats-routes/restart-route.js.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/router.d.ts +10 -0
- package/dist/web-server/routes/cliproxy-stats-routes/router.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/router.js +245 -0
- package/dist/web-server/routes/cliproxy-stats-routes/router.js.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/shared.d.ts +35 -0
- package/dist/web-server/routes/cliproxy-stats-routes/shared.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/shared.js +59 -0
- package/dist/web-server/routes/cliproxy-stats-routes/shared.js.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/version-helpers.d.ts +44 -0
- package/dist/web-server/routes/cliproxy-stats-routes/version-helpers.d.ts.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes/version-helpers.js +66 -0
- package/dist/web-server/routes/cliproxy-stats-routes/version-helpers.js.map +1 -0
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts +16 -57
- package/dist/web-server/routes/cliproxy-stats-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-stats-routes.js +25 -926
- package/dist/web-server/routes/cliproxy-stats-routes.js.map +1 -1
- package/dist/web-server/routes/cliproxy-sync-routes.d.ts.map +1 -1
- package/dist/web-server/routes/cliproxy-sync-routes.js +9 -2
- package/dist/web-server/routes/cliproxy-sync-routes.js.map +1 -1
- package/dist/web-server/routes/copilot-settings-routes.d.ts.map +1 -1
- package/dist/web-server/routes/copilot-settings-routes.js +2 -1
- package/dist/web-server/routes/copilot-settings-routes.js.map +1 -1
- package/dist/web-server/routes/image-analysis-routes.d.ts.map +1 -1
- package/dist/web-server/routes/image-analysis-routes.js +2 -1
- package/dist/web-server/routes/image-analysis-routes.js.map +1 -1
- package/dist/web-server/routes/persist-routes.d.ts.map +1 -1
- package/dist/web-server/routes/persist-routes.js +8 -1
- package/dist/web-server/routes/persist-routes.js.map +1 -1
- package/dist/web-server/routes/proxy-routes.d.ts.map +1 -1
- package/dist/web-server/routes/proxy-routes.js +33 -5
- package/dist/web-server/routes/proxy-routes.js.map +1 -1
- package/dist/web-server/routes/route-helpers.d.ts.map +1 -1
- package/dist/web-server/routes/route-helpers.js +10 -6
- package/dist/web-server/routes/route-helpers.js.map +1 -1
- package/dist/web-server/routes/settings-routes.d.ts.map +1 -1
- package/dist/web-server/routes/settings-routes.js +7 -6
- package/dist/web-server/routes/settings-routes.js.map +1 -1
- package/dist/web-server/usage/aggregator.d.ts.map +1 -1
- package/dist/web-server/usage/aggregator.js +8 -8
- package/dist/web-server/usage/aggregator.js.map +1 -1
- package/dist/web-server/usage/handlers.d.ts.map +1 -1
- package/dist/web-server/usage/handlers.js +1 -1
- package/dist/web-server/usage/handlers.js.map +1 -1
- package/package.json +1 -1
- package/scripts/ci-parity-gate.sh +31 -0
- package/scripts/generate-throw-error-baseline.js +103 -0
- package/scripts/hardening-inventory.js +62 -4
- package/scripts/maintainability-metrics.js +356 -0
package/dist/glmt/sse-parser.js
CHANGED
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
exports.SSEParser = void 0;
|
|
21
|
+
const logging_1 = require("../services/logging");
|
|
21
22
|
class SSEParser {
|
|
22
23
|
constructor(options = {}) {
|
|
24
|
+
this.logger = (0, logging_1.createLogger)('glmt:sse-parser');
|
|
23
25
|
this.buffer = '';
|
|
24
26
|
this.eventCount = 0;
|
|
25
27
|
this.maxBufferSize = options.maxBufferSize || 1024 * 1024; // 1MB default
|
|
@@ -91,9 +93,11 @@ class SSEParser {
|
|
|
91
93
|
events.push({ ...currentEvent });
|
|
92
94
|
}
|
|
93
95
|
catch (e) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
this.logger.warn('sse.malformed_json', 'Malformed JSON event in SSE stream', {
|
|
97
|
+
err: e instanceof Error ? { name: e.name, message: e.message } : { message: String(e) },
|
|
98
|
+
dataPreview: data.substring(0, 100),
|
|
99
|
+
eventIndex: this.eventCount,
|
|
100
|
+
});
|
|
97
101
|
if (this.throwOnMalformedJson) {
|
|
98
102
|
throw new Error(`Malformed SSE JSON event: ${e.message}`);
|
|
99
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sse-parser.js","sourceRoot":"","sources":["../../src/glmt/sse-parser.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;GAeG;;;
|
|
1
|
+
{"version":3,"file":"sse-parser.js","sourceRoot":"","sources":["../../src/glmt/sse-parser.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;GAeG;;;AAEH,iDAAmD;AAenD,MAAa,SAAS;IAQpB,YAAY,UAA4B,EAAE;QAFzB,WAAM,GAAG,IAAA,sBAAY,EAAC,iBAAiB,CAAC,CAAC;QAGxD,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,IAAI,GAAG,IAAI,CAAC,CAAC,cAAc;QACzE,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,KAAK,IAAI,CAAC;QAClE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,KAAsB;QAC1B,IAAI,eAAe,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAEvC,IA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,IAAI,CAAC,UAAU,EAAE,CAAC;gBAClB,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC;gBACrC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;YACnC,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,oCAAoC,EAAE;oBAC3E,GAAG,EAAE,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE;oBACvF,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;oBACnC,UAAU,EAAE,IAAI,CAAC,UAAU;iBAC5B,CAAC,CAAC;gBACH,IAAI,IAAI,CAAC,oBAAoB,EAAE,CAAC;oBAC9B,MAAM,IAAI,KAAK,CAAC,6BAA8B,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC;gBACvE,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;CACF;AA/GD,8BA+GC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SharedManager - low-level filesystem helpers.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from the original monolithic shared-manager.ts. All functions
|
|
5
|
+
* here are pure with respect to SharedManager instance state: they take
|
|
6
|
+
* explicit paths and return values, never reading from `this`.
|
|
7
|
+
*
|
|
8
|
+
* Keeping these isolated lets the orchestrator class focus on coordination
|
|
9
|
+
* and makes each helper independently testable.
|
|
10
|
+
*/
|
|
11
|
+
/// <reference types="node" />
|
|
12
|
+
import * as fs from 'fs';
|
|
13
|
+
import type { SharedItem } from './types';
|
|
14
|
+
/**
|
|
15
|
+
* Return canonical realpath for a path. Falls back to the lexical resolve
|
|
16
|
+
* when realpath fails (e.g. path does not exist).
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveCanonicalPath(targetPath: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Case-insensitive on Windows, case-sensitive elsewhere. Returns true when
|
|
21
|
+
* candidatePath === rootPath or candidatePath is a descendant of rootPath.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isPathWithinDirectory(candidatePath: string, rootPath: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Resolve a symlink to its absolute target and compare against an expected
|
|
26
|
+
* target. Synchronous variant used during detach/remove flows.
|
|
27
|
+
*/
|
|
28
|
+
export declare function symlinkPointsTo(linkPath: string, expectedTarget: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Remove an existing path, using the type hint to disambiguate between
|
|
31
|
+
* a file and a directory when lstat fails to give a clear signal.
|
|
32
|
+
*/
|
|
33
|
+
export declare function removeExistingPath(targetPath: string, typeHint: SharedItem['type']): void;
|
|
34
|
+
/**
|
|
35
|
+
* Recursively copy a directory tree as a fallback when symlinks are not
|
|
36
|
+
* available (notably Windows without Developer Mode). Creates the source
|
|
37
|
+
* directory as an empty dir if it does not exist.
|
|
38
|
+
*/
|
|
39
|
+
export declare function copyDirectoryFallback(src: string, dest: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Move a directory, falling back to recursive copy+remove across devices.
|
|
42
|
+
*/
|
|
43
|
+
export declare function moveDirectory(src: string, dest: string): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Promise-based access() existence check.
|
|
46
|
+
*/
|
|
47
|
+
export declare function pathExists(targetPath: string): Promise<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Ensure a directory exists with restrictive permissions.
|
|
50
|
+
*/
|
|
51
|
+
export declare function ensureDirectory(targetPath: string): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Promise-based lstat, returning null for ENOENT.
|
|
54
|
+
*/
|
|
55
|
+
export declare function getLstat(targetPath: string): Promise<fs.Stats | null>;
|
|
56
|
+
/**
|
|
57
|
+
* Sync lstat, returning null for ENOENT.
|
|
58
|
+
*/
|
|
59
|
+
export declare function getLstatSync(targetPath: string): fs.Stats | null;
|
|
60
|
+
/**
|
|
61
|
+
* Compare two files byte-for-byte. Returns false on any IO error.
|
|
62
|
+
*/
|
|
63
|
+
export declare function fileContentsEqual(fileA: string, fileB: string): Promise<boolean>;
|
|
64
|
+
/**
|
|
65
|
+
* Build a non-destructive conflict copy path of the form
|
|
66
|
+
* "<target>.migrated-from-<instance>[-N]".
|
|
67
|
+
*/
|
|
68
|
+
export declare function getConflictCopyPath(existingTargetPath: string, instanceName: string): Promise<string>;
|
|
69
|
+
//# sourceMappingURL=fs-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs-helpers.d.ts","sourceRoot":"","sources":["../../../src/management/shared-manager/fs-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAM/D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAWtF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAQjF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAyBzF;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAsBrE;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAY5E;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOrE;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEvE;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,CAS3E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,EAAE,CAAC,KAAK,GAAG,IAAI,CAShE;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAetF;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,kBAAkB,EAAE,MAAM,EAC1B,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC,CAYjB"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SharedManager - low-level filesystem helpers.
|
|
4
|
+
*
|
|
5
|
+
* Extracted from the original monolithic shared-manager.ts. All functions
|
|
6
|
+
* here are pure with respect to SharedManager instance state: they take
|
|
7
|
+
* explicit paths and return values, never reading from `this`.
|
|
8
|
+
*
|
|
9
|
+
* Keeping these isolated lets the orchestrator class focus on coordination
|
|
10
|
+
* and makes each helper independently testable.
|
|
11
|
+
*/
|
|
12
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17
|
+
}
|
|
18
|
+
Object.defineProperty(o, k2, desc);
|
|
19
|
+
}) : (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
o[k2] = m[k];
|
|
22
|
+
}));
|
|
23
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
24
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
25
|
+
}) : function(o, v) {
|
|
26
|
+
o["default"] = v;
|
|
27
|
+
});
|
|
28
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getConflictCopyPath = exports.fileContentsEqual = exports.getLstatSync = exports.getLstat = exports.ensureDirectory = exports.pathExists = exports.moveDirectory = exports.copyDirectoryFallback = exports.removeExistingPath = exports.symlinkPointsTo = exports.isPathWithinDirectory = exports.resolveCanonicalPath = void 0;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
/**
|
|
40
|
+
* Return canonical realpath for a path. Falls back to the lexical resolve
|
|
41
|
+
* when realpath fails (e.g. path does not exist).
|
|
42
|
+
*/
|
|
43
|
+
function resolveCanonicalPath(targetPath) {
|
|
44
|
+
try {
|
|
45
|
+
return fs.realpathSync.native(targetPath);
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return path.resolve(targetPath);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.resolveCanonicalPath = resolveCanonicalPath;
|
|
52
|
+
/**
|
|
53
|
+
* Case-insensitive on Windows, case-sensitive elsewhere. Returns true when
|
|
54
|
+
* candidatePath === rootPath or candidatePath is a descendant of rootPath.
|
|
55
|
+
*/
|
|
56
|
+
function isPathWithinDirectory(candidatePath, rootPath) {
|
|
57
|
+
const normalizeForCompare = (inputPath) => {
|
|
58
|
+
const resolved = path.resolve(inputPath);
|
|
59
|
+
return process.platform === 'win32' ? resolved.toLowerCase() : resolved;
|
|
60
|
+
};
|
|
61
|
+
const normalizedCandidate = normalizeForCompare(candidatePath);
|
|
62
|
+
const normalizedRoot = normalizeForCompare(rootPath);
|
|
63
|
+
const relative = path.relative(normalizedRoot, normalizedCandidate);
|
|
64
|
+
return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
|
|
65
|
+
}
|
|
66
|
+
exports.isPathWithinDirectory = isPathWithinDirectory;
|
|
67
|
+
/**
|
|
68
|
+
* Resolve a symlink to its absolute target and compare against an expected
|
|
69
|
+
* target. Synchronous variant used during detach/remove flows.
|
|
70
|
+
*/
|
|
71
|
+
function symlinkPointsTo(linkPath, expectedTarget) {
|
|
72
|
+
try {
|
|
73
|
+
const currentTarget = fs.readlinkSync(linkPath);
|
|
74
|
+
const resolvedCurrentTarget = path.resolve(path.dirname(linkPath), currentTarget);
|
|
75
|
+
return resolveCanonicalPath(resolvedCurrentTarget) === resolveCanonicalPath(expectedTarget);
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.symlinkPointsTo = symlinkPointsTo;
|
|
82
|
+
/**
|
|
83
|
+
* Remove an existing path, using the type hint to disambiguate between
|
|
84
|
+
* a file and a directory when lstat fails to give a clear signal.
|
|
85
|
+
*/
|
|
86
|
+
function removeExistingPath(targetPath, typeHint) {
|
|
87
|
+
try {
|
|
88
|
+
const stats = fs.lstatSync(targetPath);
|
|
89
|
+
if (stats.isDirectory() && !stats.isSymbolicLink()) {
|
|
90
|
+
fs.rmSync(targetPath, { recursive: true, force: true });
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (stats.isSymbolicLink() || typeHint === 'file') {
|
|
94
|
+
fs.unlinkSync(targetPath);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
fs.rmSync(targetPath, { recursive: true, force: true });
|
|
98
|
+
}
|
|
99
|
+
catch (err) {
|
|
100
|
+
if (err.code === 'ENOENT') {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (typeHint === 'directory') {
|
|
104
|
+
fs.rmSync(targetPath, { recursive: true, force: true });
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
fs.rmSync(targetPath, { force: true });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.removeExistingPath = removeExistingPath;
|
|
112
|
+
/**
|
|
113
|
+
* Recursively copy a directory tree as a fallback when symlinks are not
|
|
114
|
+
* available (notably Windows without Developer Mode). Creates the source
|
|
115
|
+
* directory as an empty dir if it does not exist.
|
|
116
|
+
*/
|
|
117
|
+
function copyDirectoryFallback(src, dest) {
|
|
118
|
+
if (!fs.existsSync(src)) {
|
|
119
|
+
fs.mkdirSync(src, { recursive: true, mode: 0o700 });
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (!fs.existsSync(dest)) {
|
|
123
|
+
fs.mkdirSync(dest, { recursive: true, mode: 0o700 });
|
|
124
|
+
}
|
|
125
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
126
|
+
for (const entry of entries) {
|
|
127
|
+
const srcPath = path.join(src, entry.name);
|
|
128
|
+
const destPath = path.join(dest, entry.name);
|
|
129
|
+
if (entry.isDirectory()) {
|
|
130
|
+
copyDirectoryFallback(srcPath, destPath);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
fs.copyFileSync(srcPath, destPath);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.copyDirectoryFallback = copyDirectoryFallback;
|
|
138
|
+
/**
|
|
139
|
+
* Move a directory, falling back to recursive copy+remove across devices.
|
|
140
|
+
*/
|
|
141
|
+
async function moveDirectory(src, dest) {
|
|
142
|
+
try {
|
|
143
|
+
await fs.promises.rename(src, dest);
|
|
144
|
+
}
|
|
145
|
+
catch (err) {
|
|
146
|
+
const error = err;
|
|
147
|
+
if (error.code !== 'EXDEV') {
|
|
148
|
+
throw err;
|
|
149
|
+
}
|
|
150
|
+
await fs.promises.cp(src, dest, { recursive: true });
|
|
151
|
+
await fs.promises.rm(src, { recursive: true, force: true });
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
exports.moveDirectory = moveDirectory;
|
|
155
|
+
/**
|
|
156
|
+
* Promise-based access() existence check.
|
|
157
|
+
*/
|
|
158
|
+
async function pathExists(targetPath) {
|
|
159
|
+
try {
|
|
160
|
+
await fs.promises.access(targetPath);
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
catch (_err) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
exports.pathExists = pathExists;
|
|
168
|
+
/**
|
|
169
|
+
* Ensure a directory exists with restrictive permissions.
|
|
170
|
+
*/
|
|
171
|
+
async function ensureDirectory(targetPath) {
|
|
172
|
+
await fs.promises.mkdir(targetPath, { recursive: true, mode: 0o700 });
|
|
173
|
+
}
|
|
174
|
+
exports.ensureDirectory = ensureDirectory;
|
|
175
|
+
/**
|
|
176
|
+
* Promise-based lstat, returning null for ENOENT.
|
|
177
|
+
*/
|
|
178
|
+
async function getLstat(targetPath) {
|
|
179
|
+
try {
|
|
180
|
+
return await fs.promises.lstat(targetPath);
|
|
181
|
+
}
|
|
182
|
+
catch (err) {
|
|
183
|
+
if (err.code === 'ENOENT') {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
throw err;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
exports.getLstat = getLstat;
|
|
190
|
+
/**
|
|
191
|
+
* Sync lstat, returning null for ENOENT.
|
|
192
|
+
*/
|
|
193
|
+
function getLstatSync(targetPath) {
|
|
194
|
+
try {
|
|
195
|
+
return fs.lstatSync(targetPath);
|
|
196
|
+
}
|
|
197
|
+
catch (err) {
|
|
198
|
+
if (err.code === 'ENOENT') {
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
throw err;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
exports.getLstatSync = getLstatSync;
|
|
205
|
+
/**
|
|
206
|
+
* Compare two files byte-for-byte. Returns false on any IO error.
|
|
207
|
+
*/
|
|
208
|
+
async function fileContentsEqual(fileA, fileB) {
|
|
209
|
+
try {
|
|
210
|
+
const [statA, statB] = await Promise.all([fs.promises.stat(fileA), fs.promises.stat(fileB)]);
|
|
211
|
+
if (statA.size !== statB.size) {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
const [contentA, contentB] = await Promise.all([
|
|
215
|
+
fs.promises.readFile(fileA),
|
|
216
|
+
fs.promises.readFile(fileB),
|
|
217
|
+
]);
|
|
218
|
+
return contentA.equals(contentB);
|
|
219
|
+
}
|
|
220
|
+
catch (_err) {
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
exports.fileContentsEqual = fileContentsEqual;
|
|
225
|
+
/**
|
|
226
|
+
* Build a non-destructive conflict copy path of the form
|
|
227
|
+
* "<target>.migrated-from-<instance>[-N]".
|
|
228
|
+
*/
|
|
229
|
+
async function getConflictCopyPath(existingTargetPath, instanceName) {
|
|
230
|
+
const safeInstanceName = instanceName.replace(/[^a-zA-Z0-9_-]/g, '-').toLowerCase();
|
|
231
|
+
const baseSuffix = `.migrated-from-${safeInstanceName}`;
|
|
232
|
+
let candidate = `${existingTargetPath}${baseSuffix}`;
|
|
233
|
+
let sequence = 1;
|
|
234
|
+
while (await pathExists(candidate)) {
|
|
235
|
+
candidate = `${existingTargetPath}${baseSuffix}-${sequence}`;
|
|
236
|
+
sequence++;
|
|
237
|
+
}
|
|
238
|
+
return candidate;
|
|
239
|
+
}
|
|
240
|
+
exports.getConflictCopyPath = getConflictCopyPath;
|
|
241
|
+
//# sourceMappingURL=fs-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs-helpers.js","sourceRoot":"","sources":["../../../src/management/shared-manager/fs-helpers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAG7B;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,UAAkB;IACrD,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAND,oDAMC;AAED;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,aAAqB,EAAE,QAAgB;IAC3E,MAAM,mBAAmB,GAAG,CAAC,SAAiB,EAAU,EAAE;QACxD,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACzC,OAAO,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC1E,CAAC,CAAC;IAEF,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,aAAa,CAAC,CAAC;IAC/D,MAAM,cAAc,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACrD,MAA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CAAC,KAAK,CAAC;YAC3B,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;SAC5B,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,IAAI,EAAE,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAfD,8CAeC;AAED;;;GAGG;AACI,KAAK,UAAU,mBAAmB,CACvC,kBAA0B,EAC1B,YAAoB;IAEpB,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;IACpF,MAAM,UAAU,GAAG,kBAAkB,gBAAgB,EAAE,CAAC;IAExD,IAAI,SAAS,GAAG,GAAG,kBAAkB,GAAG,UAAU,EAAE,CAAC;IACrD,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,OAAO,MAAM,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACnC,SAAS,GAAG,GAAG,kBAAkB,GAAG,UAAU,IAAI,QAAQ,EAAE,CAAC;QAC7D,QAAQ,EAAE,CAAC;IACb,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAfD,kDAeC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SharedManager - one-shot upgrade migrations.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from the original monolithic shared-manager.ts. These run once
|
|
5
|
+
* on upgrade to reconcile older on-disk layouts into the current symlink
|
|
6
|
+
* based architecture.
|
|
7
|
+
*/
|
|
8
|
+
import { type LinkerRoots } from './shared-dir-linker';
|
|
9
|
+
/**
|
|
10
|
+
* Migrate from v3.1.1 (copied data in ~/.ccs/shared/) to v3.2.0 (symlinks
|
|
11
|
+
* to ~/.claude/). Runs once on upgrade; exits early when the shared
|
|
12
|
+
* commands directory is already a symlink.
|
|
13
|
+
*/
|
|
14
|
+
export declare function migrateFromV311(roots: LinkerRoots): void;
|
|
15
|
+
/**
|
|
16
|
+
* Migrate existing instances from isolated to shared settings.json (v4.4+).
|
|
17
|
+
* Backs up each instance's pre-existing settings.json before replacing it
|
|
18
|
+
* with a symlink to the shared settings.json.
|
|
19
|
+
*/
|
|
20
|
+
export declare function migrateToSharedSettings(roots: LinkerRoots): void;
|
|
21
|
+
//# sourceMappingURL=migrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../src/management/shared-manager/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,qBAAqB,CAAC;AAG7B;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAoFxD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAkEhE"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SharedManager - one-shot upgrade migrations.
|
|
4
|
+
*
|
|
5
|
+
* Extracted from the original monolithic shared-manager.ts. These run once
|
|
6
|
+
* on upgrade to reconcile older on-disk layouts into the current symlink
|
|
7
|
+
* based architecture.
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.migrateToSharedSettings = exports.migrateFromV311 = void 0;
|
|
34
|
+
const fs = __importStar(require("fs"));
|
|
35
|
+
const path = __importStar(require("path"));
|
|
36
|
+
const ui_1 = require("../../utils/ui");
|
|
37
|
+
const instance_directory_1 = require("../instance-directory");
|
|
38
|
+
const shared_dir_linker_1 = require("./shared-dir-linker");
|
|
39
|
+
const types_1 = require("./types");
|
|
40
|
+
/**
|
|
41
|
+
* Migrate from v3.1.1 (copied data in ~/.ccs/shared/) to v3.2.0 (symlinks
|
|
42
|
+
* to ~/.claude/). Runs once on upgrade; exits early when the shared
|
|
43
|
+
* commands directory is already a symlink.
|
|
44
|
+
*/
|
|
45
|
+
function migrateFromV311(roots) {
|
|
46
|
+
const sharedDir = roots.sharedDir;
|
|
47
|
+
const claudeDir = roots.claudeDir;
|
|
48
|
+
const commandsPath = path.join(sharedDir, 'commands');
|
|
49
|
+
if (fs.existsSync(commandsPath)) {
|
|
50
|
+
try {
|
|
51
|
+
if (fs.lstatSync(commandsPath).isSymbolicLink()) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch (_err) {
|
|
56
|
+
// Continue with migration
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
console.log((0, ui_1.info)('Migrating from v3.1.1 to v3.2.0...'));
|
|
60
|
+
if (!fs.existsSync(claudeDir)) {
|
|
61
|
+
fs.mkdirSync(claudeDir, { recursive: true, mode: 0o700 });
|
|
62
|
+
}
|
|
63
|
+
for (const item of types_1.SHARED_ITEMS) {
|
|
64
|
+
const sharedPath = path.join(sharedDir, item.name);
|
|
65
|
+
const claudePath = path.join(claudeDir, item.name);
|
|
66
|
+
if (!fs.existsSync(sharedPath))
|
|
67
|
+
continue;
|
|
68
|
+
try {
|
|
69
|
+
const stats = fs.lstatSync(sharedPath);
|
|
70
|
+
if (item.type === 'directory' && stats.isDirectory()) {
|
|
71
|
+
if (!fs.existsSync(claudePath)) {
|
|
72
|
+
fs.mkdirSync(claudePath, { recursive: true, mode: 0o700 });
|
|
73
|
+
}
|
|
74
|
+
const entries = fs.readdirSync(sharedPath, { withFileTypes: true });
|
|
75
|
+
let copied = 0;
|
|
76
|
+
for (const entry of entries) {
|
|
77
|
+
const src = path.join(sharedPath, entry.name);
|
|
78
|
+
const dest = path.join(claudePath, entry.name);
|
|
79
|
+
if (fs.existsSync(dest))
|
|
80
|
+
continue;
|
|
81
|
+
if (entry.isDirectory()) {
|
|
82
|
+
fs.cpSync(src, dest, { recursive: true });
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
fs.copyFileSync(src, dest);
|
|
86
|
+
}
|
|
87
|
+
copied++;
|
|
88
|
+
}
|
|
89
|
+
if (copied > 0) {
|
|
90
|
+
console.log((0, ui_1.ok)(`Migrated ${copied} ${item.name} to ~/.claude/${item.name}`));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else if (item.type === 'file' && stats.isFile()) {
|
|
94
|
+
if (!fs.existsSync(claudePath)) {
|
|
95
|
+
fs.copyFileSync(sharedPath, claudePath);
|
|
96
|
+
console.log((0, ui_1.ok)(`Migrated ${item.name} to ~/.claude/${item.name}`));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (_err) {
|
|
101
|
+
console.log((0, ui_1.warn)(`Failed to migrate ${item.name}: ${_err.message}`));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
(0, shared_dir_linker_1.ensureSharedDirectories)(roots);
|
|
105
|
+
if (fs.existsSync(roots.instancesDir)) {
|
|
106
|
+
try {
|
|
107
|
+
for (const instance of (0, instance_directory_1.listAccountInstanceNames)(roots.instancesDir)) {
|
|
108
|
+
const instancePath = path.join(roots.instancesDir, instance);
|
|
109
|
+
try {
|
|
110
|
+
(0, shared_dir_linker_1.linkSharedDirectories)(roots, instancePath);
|
|
111
|
+
}
|
|
112
|
+
catch (_err) {
|
|
113
|
+
console.log((0, ui_1.warn)(`Failed to update instance ${instance}: ${_err.message}`));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch (_err) {
|
|
118
|
+
// No instances to update
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
console.log((0, ui_1.ok)('Migration to v3.2.0 complete'));
|
|
122
|
+
}
|
|
123
|
+
exports.migrateFromV311 = migrateFromV311;
|
|
124
|
+
/**
|
|
125
|
+
* Migrate existing instances from isolated to shared settings.json (v4.4+).
|
|
126
|
+
* Backs up each instance's pre-existing settings.json before replacing it
|
|
127
|
+
* with a symlink to the shared settings.json.
|
|
128
|
+
*/
|
|
129
|
+
function migrateToSharedSettings(roots) {
|
|
130
|
+
const claudeDir = roots.claudeDir;
|
|
131
|
+
const sharedDir = roots.sharedDir;
|
|
132
|
+
const instancesDir = roots.instancesDir;
|
|
133
|
+
console.log((0, ui_1.info)('Migrating instances to shared settings.json...'));
|
|
134
|
+
const claudeSettings = path.join(claudeDir, 'settings.json');
|
|
135
|
+
if (!fs.existsSync(claudeSettings)) {
|
|
136
|
+
fs.writeFileSync(claudeSettings, JSON.stringify({}, null, 2), 'utf8');
|
|
137
|
+
console.log((0, ui_1.info)('Created ~/.claude/settings.json'));
|
|
138
|
+
}
|
|
139
|
+
(0, shared_dir_linker_1.ensureSharedDirectories)(roots);
|
|
140
|
+
if (!fs.existsSync(instancesDir)) {
|
|
141
|
+
console.log((0, ui_1.info)('No instances to migrate'));
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const instances = (0, instance_directory_1.listAccountInstanceNames)(instancesDir);
|
|
145
|
+
let migrated = 0;
|
|
146
|
+
let skipped = 0;
|
|
147
|
+
for (const instance of instances) {
|
|
148
|
+
const instancePath = path.join(instancesDir, instance);
|
|
149
|
+
const instanceSettings = path.join(instancePath, 'settings.json');
|
|
150
|
+
try {
|
|
151
|
+
if (fs.existsSync(instanceSettings)) {
|
|
152
|
+
const stats = fs.lstatSync(instanceSettings);
|
|
153
|
+
if (stats.isSymbolicLink()) {
|
|
154
|
+
skipped++;
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
const backup = instanceSettings + '.pre-shared-migration';
|
|
158
|
+
if (!fs.existsSync(backup)) {
|
|
159
|
+
fs.copyFileSync(instanceSettings, backup);
|
|
160
|
+
console.log((0, ui_1.info)(`Backed up ${instance}/settings.json`));
|
|
161
|
+
}
|
|
162
|
+
fs.unlinkSync(instanceSettings);
|
|
163
|
+
}
|
|
164
|
+
const sharedSettings = path.join(sharedDir, 'settings.json');
|
|
165
|
+
try {
|
|
166
|
+
fs.symlinkSync(sharedSettings, instanceSettings, 'file');
|
|
167
|
+
migrated++;
|
|
168
|
+
}
|
|
169
|
+
catch (_err) {
|
|
170
|
+
if (process.platform === 'win32') {
|
|
171
|
+
fs.copyFileSync(sharedSettings, instanceSettings);
|
|
172
|
+
console.log((0, ui_1.warn)(`Symlink failed for ${instance}, copied instead`));
|
|
173
|
+
migrated++;
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
throw _err;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
catch (_err) {
|
|
181
|
+
console.log((0, ui_1.warn)(`Failed to migrate ${instance}: ${_err.message}`));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
console.log((0, ui_1.ok)(`Migrated ${migrated} instance(s), skipped ${skipped}`));
|
|
185
|
+
}
|
|
186
|
+
exports.migrateToSharedSettings = migrateToSharedSettings;
|
|
187
|
+
//# sourceMappingURL=migrations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../../src/management/shared-manager/migrations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAE7B,uCAAgD;AAChD,8DAAiE;AACjE,2DAI6B;AAC7B,mCAAuC;AAEvC;;;;GAIG;AACH,SAAgB,eAAe,CAAC,KAAkB;IAChD,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IAClC,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IAElC,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACtD,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,IAAI,CAAC;YACH,IAAI,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC;gBAChD,OAAO;YACT,CAAC;QACH,CAAC;QAAC,OAAO,IAAI,EAAE,CAAC;YACd,0BAA0B;QAC5B,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,IAAA,SAAI,EAAC,oCAAoC,CAAC,CAAC,CAAC;IAExD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,oBAAY,EAAE,CAAC;QAChC,MAAM,UAAU,GAAG,IA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