From 61ae9700f2bc3169358a77031ca883dfa6aa896d Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sun, 15 Nov 2026 19:09:38 -0800 Subject: [PATCH] refactor: organize shared foundation modules by owner (#42914) --- .../actions/prepare-native-runtime/action.yml | 2 +- .../workflows/ci-cache-warmup-platforms.yml | 2 +- .github/workflows/ci-cache-warmup.yml | 2 +- .github/workflows/pr.yml | 2 +- config/main-sync-fs-baseline.txt | 2 +- config/reliability-gates.jsonc | 18 +- .../zip-extractor-command.test.mjs | 2 +- .../macos/mac-build-compatibility.cjs | 2 +- .../verify-packaged-daemon-entry.cjs | 2 +- .../install-electron-package-binary.mjs | 2 +- .../update-node-runtime-pin.mjs | 2 +- .../renderer-quadratic-scan-benchmark.mjs | 4 +- .../benchmark-explorer-dotfile-filter.mjs | 2 +- .../transport/ssh-watch-fanout-benchmark.mjs | 2 +- .../release-javascript-artifact.mjs | 2 +- .../source-routing/pr-code-change-scope.mjs | 4 +- .../agent-history-session-card.ts | 2 +- .../automation-setup-preparation.ts | 2 +- .../use-automation-setup-consent.ts | 2 +- .../attachments/mobile-clipboard-image.ts | 2 +- .../markdown/mobile-markdown-file-link.ts | 2 +- .../markdown/mobile-markdown-image-source.ts | 2 +- .../use-host-worktree-delete.ts | 4 +- .../creation/modal/NewWorktreeModal.tsx | 2 +- .../runtime/new-workspace-reply-schema.ts | 2 +- .../use-new-workspace-create-submit.ts | 2 +- .../use-new-workspace-runtime-context.ts | 2 +- .../creation/setup-hook-trust.ts | 4 +- .../composer-linked-work-item.ts | 2 +- .../source-selection/smart-source-fan-out.ts | 4 +- .../smart-source-paste-intent.ts | 2 +- .../smart-source-search-requests.ts | 4 +- .../use-mobile-composer-source.ts | 4 +- .../use-smart-workspace-source.ts | 2 +- .../platform/pdf-viewing/native-pdf-view.ts | 2 +- .../use-mobile-native-chat-markdown-links.ts | 2 +- ...mobile-native-chat-markdown-image-block.ts | 2 +- .../review/creation/mobile-pr-create-draft.ts | 2 +- .../MobileDiffReviewRangeSheet.tsx | 2 +- .../MobileDiffReviewScreenView.tsx | 2 +- ...use-mobile-pr-polling-revalidation.test.ts | 2 +- .../pull-request/use-mobile-pr-polling.ts | 2 +- ...bile-source-control-settings-operations.ts | 2 +- .../hosted-review/gitlab-check-summary.ts | 2 +- ...bile-tasks-workspace-and-project-state.tsx | 2 +- mobile/src/tasks/screen-state/task-queries.ts | 2 +- ...use-mobile-tasks-provider-load-actions.tsx | 2 +- .../use-mobile-tasks-task-list-loading.tsx | 2 +- ...-mobile-tasks-workspace-source-effects.tsx | 2 +- .../use-mobile-tasks-workspace-ssh-state.tsx | 2 +- src/cli/arguments/args.ts | 2 +- src/cli/files/file.ts | 5 +- src/cli/hosts/vm.ts | 4 +- src/cli/plugins/dev-watch/plugin-dev-watch.ts | 2 +- src/cli/specs/agent-launch.ts | 2 +- src/cli/specs/automations.ts | 2 +- src/cli/specs/browser-advanced.ts | 2 +- src/cli/specs/browser-basic.ts | 2 +- src/cli/specs/chat.ts | 2 +- src/cli/specs/computer.ts | 2 +- src/cli/specs/connector.ts | 2 +- src/cli/specs/core.ts | 2 +- src/cli/specs/diagnostics.ts | 2 +- src/cli/specs/emulator.ts | 2 +- src/cli/specs/environment.ts | 2 +- src/cli/specs/file.ts | 2 +- src/cli/specs/jira.ts | 2 +- src/cli/specs/linear-mcp.ts | 2 +- src/cli/specs/linear.ts | 2 +- src/cli/specs/orchestration-gate-specs.ts | 2 +- src/cli/specs/orchestration-worker-specs.ts | 2 +- src/cli/specs/orchestration.ts | 2 +- src/cli/specs/pair.ts | 2 +- src/cli/specs/plugin-dev-request.ts | 2 +- src/cli/specs/plugin-install.ts | 2 +- src/cli/specs/plugin-view.ts | 2 +- src/cli/specs/plugin.ts | 2 +- src/cli/specs/ports.ts | 2 +- src/cli/specs/project.ts | 2 +- src/cli/specs/reference.ts | 2 +- src/cli/specs/repo.ts | 2 +- src/cli/specs/search.ts | 2 +- src/cli/specs/skills.ts | 2 +- src/cli/specs/speech.ts | 2 +- src/cli/specs/terminal-close.ts | 2 +- src/cli/specs/terminal-daemon.ts | 2 +- src/cli/specs/terminal-send.ts | 2 +- src/cli/specs/terminal-set-pane-title.ts | 2 +- src/cli/specs/workspace-cleanup.ts | 2 +- src/cli/specs/worktree-create.ts | 2 +- src/cli/specs/worktree-set.ts | 2 +- src/cli/workspace-ports/ports.ts | 2 +- .../caller-cwd-containment.ts | 4 +- .../wsl-caller-path-selector.ts | 2 +- .../workspaces/workspace-cleanup-format.ts | 2 +- .../configuration/hooks-json-read.ts | 2 +- .../scope/session-search-scope-paths.ts | 2 +- .../storage/session-search-file-records.ts | 2 +- .../deletion/session-delete-target.ts | 2 +- src/main/ai-vault/deletion/session-delete.ts | 2 +- .../discovery/agent-session-directories.ts | 2 +- .../session-scanner-agent-sources.ts | 4 +- .../discovery/session-scanner-roots.ts | 2 +- .../claude/claude-project-dir-encoding.ts | 2 +- .../kimi/session-scanner-kimi-paths.ts | 2 +- .../openclaw/openclaw-session-layout.ts | 2 +- ...scanner-opencode-sqlite-process-framing.ts | 2 +- .../scope/session-scope-real-paths.ts | 2 +- .../structured-session-ownership.ts | 2 +- .../transcripts/local-log-tail-reader.test.ts | 2 +- .../transcripts/local-log-tail-reader.ts | 2 +- .../external-automation-owner-guard.ts | 2 +- .../scoped-external-automations.ts | 2 +- src/main/bitbucket/credential-connection.ts | 4 +- src/main/bitbucket/credential-store.ts | 2 +- .../doc-preview-grant-registry.ts | 2 +- ...browser-route-partition-pending-deletes.ts | 2 +- .../profiles/claude-profile-paths.ts | 2 +- .../routing/claude-observed-config-dirs.ts | 2 +- .../setup/claude-profile-prompt-history.ts | 2 +- .../setup/claude-profile-provisioning.ts | 2 +- .../profiles/setup/claude-profile-sharing.ts | 2 +- .../claude-usage/transcript-file-discovery.ts | 2 +- .../hooks/claude-profile-hook-target.ts | 2 +- .../theme-sync/claude-code-theme-ownership.ts | 2 +- .../theme-sync/claude-code-theme-sync.ts | 2 +- .../claude-provider-session-rename.ts | 2 +- .../codex-account-registration.ts | 2 +- .../credentials/codex-account-identity.ts | 2 +- .../codex-credential-absence-grace.ts | 2 +- .../managed-codex-auth-readiness.ts | 2 +- .../managed-homes/codex-config-mirror.ts | 2 +- .../codex-managed-home-lifecycle.ts | 2 +- .../host-codex-managed-home-ownership.ts | 2 +- .../runtime-home-service-auth-core.ts | 2 +- .../runtime-home-service-home-routing.ts | 2 +- .../routing/runtime-home-service-launch.ts | 2 +- .../runtime-home-service-managed-home.ts | 4 +- src/main/codex-cli/codex-home-process-lock.ts | 2 +- .../codex-session-file-discovery.ts | 2 +- .../configuration/codex-path-observation.ts | 2 +- .../homes/codex-pane-account-registry.ts | 2 +- .../homes/codex-pane-launch-account.ts | 2 +- .../settings/config-settings-baseline.ts | 2 +- .../backfill/codex-session-backfill-audit.ts | 2 +- .../backfill/codex-session-backfill-marker.ts | 2 +- .../bridges/codex-account-session-bridge.ts | 2 +- .../bridges/wsl-codex-session-bridge.ts | 2 +- .../index/codex-account-session-index-heal.ts | 2 +- .../index/codex-session-index-heal-state.ts | 2 +- .../index/codex-state-db-backfill-recovery.ts | 2 +- .../resume/codex-ai-vault-session-resume.ts | 2 +- .../resume/codex-legacy-session-resume.ts | 2 +- .../resume/codex-session-resume-home.ts | 2 +- ...codex-session-resume-launch-preparation.ts | 2 +- .../rollouts/codex-rollout-item-projection.ts | 2 +- .../rollouts/codex-session-link-pass.ts | 4 +- .../codex-hook-launch-preparation.ts | 2 +- .../codex-launch-preparation-inputs.ts | 2 +- .../codex-hook-retired-commands.ts | 2 +- .../catalog/codex-skill-sources-stamp.ts | 2 +- .../codex-mcp-enabled-write.ts | 2 +- .../codex-provider-session-rename.ts | 2 +- .../codex-session-account-usage.ts | 2 +- .../trust/grants/codex-trust-grant-ledger.ts | 2 +- .../trust/hooks/codex-hook-hash-lookup.ts | 2 +- .../trust/hooks/codex-hook-trust-memo.ts | 2 +- .../codex/trust/hooks/hook-trust-promotion.ts | 2 +- .../toml/codex-trust-config-mutation-queue.ts | 2 +- .../integration-credential-file.ts | 2 +- .../integration-token-file-cache.ts | 2 +- .../daemon/admission/host-terminal-policy.ts | 2 +- .../daemon-appimage-generation-launch.ts | 2 +- .../linux/daemon-appimage-launch.ts | 2 +- .../spawn-file-child-processes.ts | 2 +- .../spawn-file-foreground-process.ts | 2 +- .../daemon-bash-shell-ready-rcfile.ts | 2 +- src/main/dsh/dsh-hook-packages.ts | 2 +- src/main/dsh/hook-service.ts | 2 +- src/main/editor/format-editor-text.ts | 2 +- .../emulator/serve-sim-helper-processes.ts | 2 +- .../environment-doctor-setup.ts | 2 +- .../shell-recipe-driver.ts | 2 +- src/main/ephemeral-vm/recipe-runner.test.ts | 2 +- src/main/ephemeral-vm/resume-integrity.ts | 2 +- .../runtime-recipe-timeouts.test.ts | 2 +- src/main/ephemeral-vm/runtime-service.test.ts | 2 +- src/main/ephemeral-vm/runtime-service.ts | 2 +- .../filesystem/file-content-observation.ts | 2 +- src/main/filesystem/host-tree-removal.ts | 2 +- .../filesystem/owned-temp-staging-root.ts | 2 +- .../git-worktree-mutation-state.ts | 2 +- .../host-routing/missing-git-spawn-cwd.ts | 2 +- .../process-capture/exec-file-capture.ts | 2 +- .../objects/local-git-object-quarantine.ts | 2 +- .../maintenance/local-repo-ref-maintenance.ts | 2 +- .../maintenance/pack-refs-lock-ownership.ts | 2 +- .../repo-pack-index-maintenance.ts | 2 +- .../refs/maintenance/repo-pack-index-state.ts | 2 +- .../repo-ref-maintenance-real-git.test.ts | 2 +- .../remotes/review-head-remote-identity.ts | 2 +- .../repositories/cloning/repo-clone-path.ts | 2 +- .../repositories/discovery/repo-detection.ts | 4 +- .../discovery/repo-git-marker-scan.ts | 4 +- .../drive-checkout-suspect-paths.ts | 2 +- .../drive-checkout-suspect-status.ts | 2 +- .../git/worktrees/catalog/worktree-listing.ts | 2 +- .../catalog/worktree-path-comparison.ts | 2 +- .../git/worktrees/checkout/branch-switch.ts | 2 +- .../creation/worktree-base-refresh.ts | 2 +- .../creation/worktree-preparation-lock.ts | 2 +- .../removal/worktree-at-risk-local-files.ts | 4 +- .../github/accounts/github-project-account.ts | 2 +- .../github/api/gh-error-classification.ts | 4 +- src/main/github/client/check/get-pr-checks.ts | 2 +- .../client/check/pr-checks-last-outcome.ts | 2 +- .../github/client/check/rerun-pr-checks.ts | 5 +- src/main/github/client/client-test-mocks.ts | 2 +- .../client/create/add-pr-review-comment.ts | 5 +- .../detect/repository-merge-metadata.ts | 2 +- .../client/list/work-item-list-request.ts | 2 +- .../github/client/list/work-item-pages.ts | 2 +- src/main/github/client/merge/merge-pr.ts | 2 +- src/main/github/client/merge/pr-auto-merge.ts | 2 +- src/main/github/client/update/pr-details.ts | 5 +- src/main/github/client/update/pr-ready.ts | 5 +- src/main/github/client/update/pr-reviewers.ts | 2 +- src/main/github/client/update/pr-state.ts | 7 +- src/main/github/issues/issue-comment.ts | 5 +- src/main/github/issues/issue-create.ts | 4 +- src/main/github/issues/issue-update.ts | 9 +- src/main/github/issues/issues.ts | 2 +- .../refresh/hosted-pr-read-jobs.ts | 2 +- .../refresh/pr-auto-refresh-cadence-sync.ts | 2 +- .../refresh/pr-refresh-candidate-policy.ts | 2 +- ...fresh-coordinator-alias-coalescing.test.ts | 3 +- ...h-coordinator-auto-refresh-cadence.test.ts | 320 -------------- ...refresh-coordinator-local-delivery.test.ts | 63 +-- ...pr-refresh-coordinator-restoration.test.ts | 226 +--------- .../refresh/pr-refresh-coordinator.ts | 2 +- .../pull-requests/refresh/pr-refresh-queue.ts | 2 +- .../refresh/pr-refresh-retry-state.ts | 2 +- .../refresh/pr-refresh-watch-jobs.ts | 2 +- .../stacks/github-pr-stack-async-merge.ts | 2 +- .../start-points/pr-head-tracking-ref.ts | 2 +- .../start-points/pr-start-point-wsl-gate.ts | 2 +- .../start-points/pr-start-point.test.ts | 2 +- .../start-points/pr-start-point.ts | 4 +- .../start-points/review-head-remote.ts | 2 +- .../gitlab/issues/gitlab-issue-queries.ts | 13 +- src/main/gitlab/issues/issue-update.ts | 9 +- .../merge-requests/merge-request-list.ts | 2 +- .../merge-requests/merge-request-lookup.ts | 2 +- .../merge-request-review-mutations.ts | 7 +- .../merge-request-state-mutations.ts | 2 +- .../merge-requests/merge-request-update.ts | 7 +- .../merge-requests/mr-discussion-notes.ts | 2 +- .../gitlab/merge-requests/mr-file-diffs.ts | 2 +- .../merge-requests/mr-head-tracking-ref.ts | 2 +- .../mr-reviewers-and-approvals.ts | 5 +- .../gitlab/pipelines/pipeline-job-graph.ts | 2 +- .../pipelines/pipeline-job-mutations.ts | 7 +- .../gitlab-assignable-user-mapping.ts | 2 +- .../gitlab/projects/gitlab-project-recents.ts | 2 +- .../project-label-and-member-lookup.ts | 2 +- .../gitlab/projects/project-ref-parser.ts | 2 +- .../requests/gitlab-auth-and-rate-limit.ts | 2 +- .../gitlab/requests/gitlab-preload-args.ts | 2 +- .../requests/gitlab-response-mapping.ts | 7 +- .../requests/glab-error-classification.ts | 4 +- .../gitlab/work-items/work-item-details.ts | 2 +- .../gitlab/work-items/work-item-queries.ts | 4 +- .../ipc/ai-vault/ai-vault-subagent-list.ts | 2 +- src/main/ipc/automations.ts | 2 +- src/main/ipc/ephemeral-vm-recipe-context.ts | 2 +- .../access/filesystem-allowed-roots.test.ts | 6 +- .../access/filesystem-allowed-roots.ts | 2 +- .../access/filesystem-path-containment.ts | 2 +- .../watchers/filesystem-watcher-paths.ts | 2 +- .../watchers/local-watcher-event-observers.ts | 2 +- src/main/ipc/folder-repo-git-upgrade.ts | 2 +- src/main/ipc/linear/issue-handlers.ts | 2 +- src/main/ipc/local-log-tail.ts | 2 +- src/main/ipc/pty/host-env/codex-home.ts | 2 +- .../ipc/pty/host-env/fresh-spawn-routing.ts | 2 +- src/main/ipc/pty/spawn-startup-target.ts | 2 +- src/main/ipc/repos/local-repo-registration.ts | 2 +- .../ipc/repos/nested-repo-import-handler.ts | 2 +- src/main/ipc/repos/nested-repo-scan-ipc.ts | 2 +- src/main/ipc/repos/repo-creation-handlers.ts | 2 +- src/main/ipc/source-control/bitbucket.ts | 2 +- .../source-control/github-account-handlers.ts | 2 +- .../github-issue-mutation-handlers.ts | 2 +- .../github-pr-mutation-handlers.ts | 2 +- .../github-work-item-handlers.ts | 2 +- .../source-control/gitlab-issue-handlers.ts | 2 +- .../gitlab-merge-request-mutation-handlers.ts | 5 +- .../gitlab-merge-request-query-handlers.ts | 2 +- src/main/ipc/worktree-logic.ts | 12 +- src/main/ipc/worktrees-test-fixtures.ts | 2 +- .../create/register-review-base-handlers.ts | 2 +- .../worktree-base-directory-event-filter.ts | 2 +- .../worktree-base-directory-marker-poller.ts | 2 +- .../worktree-base-directory-watch-targets.ts | 2 +- .../creation/worktree-common-git-directory.ts | 2 +- .../creation/worktree-head-identity-scope.ts | 2 +- .../git/worktree-git-status-ref-watch.ts | 2 +- ...itative-local-worktree-metadata-pruning.ts | 2 +- .../removal/execute-worktree-removal.ts | 2 +- src/main/jira/jira-issue-search.ts | 2 +- src/main/kimi/hook-service.ts | 2 +- src/main/kiro/hook-service.ts | 2 +- src/main/kiro/hook-settings.ts | 2 +- src/main/kiro/standalone-hook-settings.ts | 2 +- .../collections/linear-collection-models.ts | 2 +- .../linear/issues/linear-issue-listing.ts | 2 +- .../linear/issues/linear-issue-lookups.ts | 2 +- .../linear/issues/linear-issue-mutations.ts | 2 +- .../issues/linear-issue-query-support.ts | 2 +- .../orcad-migration-repository-link.ts | 2 +- .../linking/orcad-server-folder-workspaces.ts | 2 +- src/main/muse/hook-config-json.ts | 2 +- .../agent-session-attachment-claims.ts | 2 +- .../agent-session-attachment-sweep.ts | 2 +- .../adopted-transcript-source.ts | 2 +- .../options/at-rest-command-catalog.ts | 2 +- ...-agent-session-usage-limit-account-hold.ts | 2 +- .../codex-adoption-preparation.ts | 2 +- .../native-chat-scratch-folder-migration.ts | 2 +- .../native-chat-visuals-sweep.ts | 2 +- .../managed-runtime-installation.ts | 2 +- .../managed-runtime-release-install.ts | 2 +- .../node-runtime/managed-runtime-release.ts | 2 +- .../node-runtime/runtime-archive-download.ts | 4 +- .../opencode-root-model-overlay.ts | 2 +- src/main/opencode/opencode-private-server.ts | 4 +- .../text-tasks/opencode-text-task-events.ts | 2 +- .../text-tasks/opencode-text-task-input.ts | 2 +- .../opencode-text-task-server-ready.ts | 2 +- .../opencode/text-tasks/opencode-text-task.ts | 2 +- .../wsl/opencode-wsl-text-task-entry.ts | 2 +- .../text-tasks/wsl/opencode-wsl-text-task.ts | 2 +- .../profile-project-worktree-identity.ts | 2 +- .../electron/electron-sidecar-profile.ts | 2 +- .../terminal-settings-migrations.ts | 2 +- .../loaded-state-adaptation.ts | 2 +- .../prepare-loaded-profile-settings.ts | 2 +- .../catalog-commit/orcad-catalog-records.ts | 2 +- .../orcad-staged-catalog-claims.ts | 2 +- .../profile-state-write-transaction.ts | 2 +- .../writer/profile-state-writer-errors.ts | 2 +- .../folder-scope-migration.ts | 2 +- ...missing-local-worktree-metadata-pruning.ts | 2 +- ...istence-folder-scan-project-groups.test.ts | 2 +- .../worktree-metadata-normalization.ts | 2 +- .../plugin-approved-vm-recipes.ts | 2 +- .../plugin-vm-recipe-registry.ts | 2 +- .../workers/host-api/plugin-agent-history.ts | 2 +- .../ports/darwin-process-metadata.test.ts | 2 +- src/main/ports/darwin-process-metadata.ts | 2 +- .../local-workspace-platform-port-scanner.ts | 2 +- src/main/ports/port-scan-command-execution.ts | 2 +- .../folder-workspace-path-status.ts | 2 +- .../nested-repo-import-target.ts | 2 +- src/main/project-groups/nested-repo-import.ts | 2 +- .../provider-executable-missing.ts | 2 +- .../foreground/agent-process-batch.ts | 2 +- .../local-pty-shell-ready-bash-rcfile.ts | 2 +- src/main/providers/pty/worktree-ownership.ts | 2 +- .../shell-launch/windows/shell-args.ts | 2 +- .../working-directory/process-cwd.ts | 2 +- .../pty-master-foreground-observation.ts | 2 +- .../zsh-startup-wrapper-builder.ts | 2 +- .../claude/claude-oauth-credentials.ts | 2 +- .../ripgrep/bundled-ripgrep-text-search.ts | 2 +- .../agent-session-launch-directory.ts | 2 +- .../structured-agent-account-home.ts | 4 +- .../installation/usage-limit-account-usage.ts | 2 +- .../settings/runtime-client-settings.ts | 2 +- .../files/paths/runtime-relative-paths.ts | 2 +- .../files/watch/file-watcher-leases.ts | 2 +- .../files/watch/windows-runtime-watch-pool.ts | 2 +- .../git/branch-switch-agent-blocker.ts | 2 +- .../git/runtime-branch-switch-host.ts | 2 +- .../runtime-github-issue-comment-commands.ts | 2 +- ...runtime-github-review-mutation-commands.ts | 2 +- ...b-review-query-commands-checks-cap.test.ts | 33 +- .../github/runtime-github-worktree-base.ts | 2 +- .../gitlab/runtime-gitlab-fork-mr-base.ts | 4 +- .../runtime-gitlab-mutation-commands.ts | 2 +- .../gitlab/runtime-gitlab-query-commands.ts | 2 +- .../gitlab/runtime-gitlab-worktree-base.ts | 4 +- .../linear/runtime-linear-context-commands.ts | 2 +- .../runtime-linear-save-fields-commands.ts | 2 +- .../runtime-linear-task-fields-commands.ts | 2 +- .../runtime-linear-team-write-commands.ts | 2 +- .../orca-runtime-test-mocks/setup.spec.ts | 4 +- .../gitlab-and-pr-bases-part-02.spec.ts | 2 +- .../orca-runtime-test-lifecycle.spec.ts | 2 +- ...ository-project-operations-part-02.spec.ts | 2 +- .../runtime-test-module-registration.spec.ts | 4 +- .../configured-worker-agent-selector.ts | 4 +- .../runtime-nested-repo-import.ts | 2 +- .../runtime-project-group-controller.ts | 2 +- .../runtime-repository-hooks-commands.ts | 9 +- ...repository-registration-controller.test.ts | 15 +- .../agent-launch-worktree-creation.ts | 2 +- .../managed-runtime-install.ts | 2 +- .../structured-agent-session-account-usage.ts | 2 +- .../rpc/methods/workspaces/worktree.ts | 2 +- .../terminal/input/pty-write-host-platform.ts | 2 +- .../launch/claude-agent-teams-shim-env.ts | 2 +- .../launch/wsl-host-agent-terminal-launch.ts | 2 +- .../output/terminal-derived-agent-facts.ts | 2 +- .../runtime/terminal/terminal-file-path.ts | 2 +- .../terminal/terminal-path-resolver.ts | 5 +- .../runtime-workspace-catalog-events.ts | 2 +- .../catalog/runtime-worktree-path-identity.ts | 2 +- .../stale-worktree-registration-preflight.ts | 2 +- .../workspaces/catalog/workspace-catalog.ts | 2 +- .../runtime-worktree-summary-paths.ts | 2 +- .../references/runtime-reference-catalog.ts | 2 +- .../source-control/forge-review-mappers.ts | 2 +- .../hosted-review-branch-cache.ts | 2 +- .../sqlite/row-cache/legacy-json-source.ts | 2 +- .../legacy-relay/cli/legacy-relay-cli-args.ts | 2 +- src/main/star-nag/app-star-source.ts | 2 +- .../startup/cli-launch/cli-launch-redirect.ts | 2 +- .../source-control-local-generation.ts | 2 +- .../copilot-unavailable-model-retry.ts | 2 +- .../models/commit-message-model-discovery.ts | 2 +- .../policies/source-control-kimi-policy.ts | 2 +- .../policies/source-control-policy-probe.ts | 2 +- .../source-control-read-only-policy.ts | 2 +- .../pull-request-context.ts | 4 +- .../pull-request-remote-ref-probes.ts | 2 +- .../clipboard-remote-file-staging.ts | 2 +- .../create-source-setup-hooks.ts | 4 +- .../created-worktree-setup-trust.ts | 6 +- .../workspace-hooks/effective-hook-config.ts | 4 +- src/main/workspace-hooks/hooks.ts | 6 +- .../workspace-hooks/setup-hook-env-vars.ts | 2 +- .../workspace-hooks/worktree-runner-script.ts | 2 +- .../catalog/folder-repo-git-conversion.ts | 2 +- .../catalog/project-realpath-identity.ts | 2 +- .../catalog/provisioned-root-checkout.ts | 2 +- .../worktree-owner-path-equivalence.ts | 2 +- .../catalog/worktree-path-comparison-key.ts | 2 +- .../worktree-create-preparation-claim.ts | 2 +- .../worktree-create-preparation-pool.ts | 2 +- .../worktree-create-preparation.ts | 2 +- .../project-runtime-git-router.ts | 2 +- .../worktree-retirement-discovery.ts | 2 +- .../removal/watcher-removal-gate.ts | 2 +- .../removal/worktree-orphan-gitdir-proof.ts | 2 +- .../removal/worktree-removal-home-guard.ts | 2 +- .../wsl-drive-unc-identity-rewrite.ts | 2 +- .../wsl/filesystem/wsl-drive-unc-mounts.ts | 2 +- .../filesystem/wsl-drive-unc-project-scope.ts | 2 +- src/main/zcode/hook-config-json.ts | 2 +- src/preload/api/agent-hooks/agent-hook-api.ts | 2 +- src/preload/api/automations/automation-api.ts | 2 +- .../api/automations/automations-bridge.ts | 2 +- .../api/cloud-workspaces/ephemeral-vm-api.ts | 2 +- src/preload/api/filesystem/filesystem-api.ts | 2 +- src/preload/api/filesystem/fs-bridge.ts | 2 +- .../gh-bridge-mutations-and-projects.ts | 2 +- .../gh-bridge-pull-requests-and-work-items.ts | 2 +- .../api/github/github-pull-request-api.ts | 2 +- .../api/github/github-work-item-api.ts | 2 +- src/preload/api/gitlab/gitlab-api.ts | 4 +- src/preload/api/gitlab/gitlab.ts | 2 +- .../api/hosted-review/bitbucket-bridge.ts | 2 +- .../api/hosted-review/hosted-review-api.ts | 2 +- src/preload/api/work-items/linear-api.ts | 2 +- .../use-visible-review-refresh-reporting.ts | 2 +- .../src/components/GitLabItemDialog.test.tsx | 2 +- .../authoring/AutomationEditorDialog.tsx | 2 +- .../AutomationEditorSettingsSidebar.tsx | 2 +- .../AutomationSetupDecisionField.tsx | 2 +- .../authoring/automation-setup-decision.ts | 7 +- .../use-automations-page-setup-state.ts | 2 +- .../external-automation-scope-client.ts | 2 +- .../external-automation-scope-gating.ts | 2 +- .../use-automations-page-local-state.ts | 2 +- .../describe-page/browser-artifact-upload.ts | 2 +- .../doc-preview-artifact-share.tsx | 2 +- .../components/cmd-j/task-search-results.ts | 2 +- .../editor/autosave/editor-autosave.ts | 2 +- .../editor-non-utf8-autosave-pause.ts | 2 +- .../actions/check-annotation-path.ts | 2 +- .../actions/check-run-details-tab.ts | 2 +- .../use-combined-diff-section-revalidation.ts | 2 +- .../editor-deleted-file-reload.ts | 2 +- .../editor-external-watch-path-index.ts | 2 +- .../editor-self-write-registry.ts | 2 +- .../file-drop/editor-dropped-file-open.ts | 2 +- .../editor-path-move-inflight.ts | 2 +- .../git-graph-workspace-navigation.ts | 2 +- .../log-tail/local-log-tail-decoder.test.ts | 2 +- .../log-tail/local-log-tail-decoder.ts | 2 +- .../loading/log-tail/useLocalLogTail.ts | 2 +- .../links/markdown-preview-link-actions.ts | 2 +- .../links/markdown-preview-source-routing.ts | 2 +- .../render-tree/MarkdownPreviewSizeGate.tsx | 2 +- .../use-markdown-document-watch-refresh.ts | 2 +- .../link-routing/markdown-internal-links.ts | 2 +- .../link-routing/markdown-preview-links.ts | 2 +- .../panel/EditorMarkdownFileSurface.tsx | 2 +- .../PluginBytesCustomEditorSurface.tsx | 2 +- .../rich-markdown-clipboard-link-target.ts | 2 +- .../review/useRichMarkdownReviewData.ts | 2 +- .../setup/FeatureWallSetupWorkflowActions.tsx | 2 +- .../components/gitlab-item-dialog-parts.tsx | 2 +- .../gitlab-conversation-tab.tsx | 2 +- .../gitlab-description-tab.tsx | 2 +- .../gitlab-item-dialog/gitlab-files-tab.tsx | 2 +- .../gitlab-item-dialog-types.ts | 2 +- .../gitlab-item-dialog-view.tsx | 2 +- .../gitlab-pipeline-tab.tsx | 2 +- .../use-gitlab-details-editing.ts | 2 +- .../use-gitlab-item-dialog-effects.ts | 2 +- .../use-gitlab-item-dialog-state.ts | 5 +- .../use-gitlab-pipeline-actions.ts | 2 +- .../use-gitlab-primary-actions.ts | 2 +- .../use-gitlab-review-actions.ts | 2 +- .../gitlab/gitlab-rate-limit-display.tsx | 2 +- .../bitbucket-credentials-dialog.tsx | 2 +- .../bitbucket-integration-card.tsx | 2 +- .../linear-project-view-surfaces.tsx | 2 +- .../managed-runtime-install-card.ts | 2 +- .../managed-runtime-install-view.ts | 2 +- .../use-managed-runtime-install-card.ts | 2 +- .../host-access/NativeChatInstallSlot.tsx | 2 +- .../new-workspace-composer-card-props.ts | 6 +- .../smart-workspace-name-field-model.ts | 2 +- .../run-target/run-target-options.ts | 2 +- .../setup/WorkspaceSetupSection.tsx | 4 +- .../setup/workspace-setup-section-model.ts | 2 +- .../SmartWorkspaceSourceResultList.tsx | 2 +- .../use-smart-workspace-gitlab-search.ts | 2 +- .../use-smart-workspace-secondary-searches.ts | 2 +- .../use-work-item-source-state.ts | 2 +- .../components/quick-open-nested-worktrees.ts | 2 +- .../accounts/ai-vault-account-binding.ts | 2 +- .../ai-vault-account-work-test-fixture.ts | 2 +- .../accounts/ai-vault-native-account-index.ts | 2 +- .../accounts/ai-vault-saved-account-index.ts | 2 +- .../scope/ai-vault-session-projects.ts | 2 +- .../ai-vault-session-resume-in-chat.ts | 2 +- .../ai-vault-subagent-expansion.tsx | 2 +- .../use-checks-panel-comment-resolution.tsx | 2 +- .../use-checks-panel-controller-state.tsx | 2 +- .../presentation/check-run-details.tsx | 2 +- .../refresh/checks-panel-terminal-worktree.ts | 2 +- .../use-checks-detail-timer-cadence.test.tsx | 409 ------------------ .../refresh/use-checks-detail-timer.ts | 2 +- .../refresh/use-checks-list-state.tsx | 2 +- .../review-data/gitlab-review-client.ts | 2 +- .../file-search-include-pattern.ts | 2 +- .../mutations/file-explorer-batch-deletion.ts | 2 +- .../navigation/file-explorer-display-root.ts | 2 +- .../navigation/file-explorer-paths.ts | 2 +- .../tree/file-explorer-dir-pages.ts | 2 +- .../tree/file-explorer-entries.ts | 2 +- .../file-explorer-name-filter-projection.ts | 2 +- .../use-file-explorer-tree-load-effects.ts | 2 +- .../watching/file-explorer-watch-path.ts | 2 +- .../watching/file-explorer-watch-reconcile.ts | 2 +- .../file-explorer-watch-refresh-scheduler.ts | 2 +- .../file-explorer-watcher-reconcile.ts | 2 +- .../watching/useFileExplorerWatch.ts | 2 +- .../ai/source-control-recovery-admission.ts | 2 +- .../branches/branch-picker-rows.ts | 2 +- .../sync/git-status-file-watch-refresh.ts | 2 +- .../sync/git-status-push-signal-refresh.ts | 2 +- .../sync/git-status-signal-attribution.ts | 2 +- .../navigation/settings-project-list.ts | 2 +- .../use-settings-repo-scroll-effects.ts | 2 +- .../settings/page/use-settings-store-model.ts | 2 +- .../settings/repository/RepositoryPane.tsx | 5 +- .../hooks/RepositoryHookPolicySettings.tsx | 2 +- .../hooks/RepositoryHooksSection.tsx | 4 +- .../hooks/RepositoryHooksYamlStatus.tsx | 2 +- .../hooks/repository-hook-settings-draft.ts | 2 +- .../use-repository-hook-settings-draft.ts | 2 +- .../repository/mcp/McpConfigSection.tsx | 2 +- .../source-control/PRAutoRefreshControl.tsx | 2 +- .../PRAutoRefreshSetting.fixture.tsx | 2 +- .../source-control/PRAutoRefreshSetting.tsx | 2 +- .../source-control/pr-auto-refresh-search.ts | 2 +- .../recipes/EphemeralVmRecipeRow.tsx | 2 +- .../workspace-cleanup-activity-list.tsx | 2 +- .../workspace-cleanup-rule-change-dialog.tsx | 2 +- .../workspace-cleanup-rule-rows.tsx | 2 +- .../workspace-cleanup-settings-status.tsx | 2 +- .../sidebar/OrcaYamlTrustDialog.tsx | 2 +- .../project-added-default-checkout.ts | 2 +- .../nested-import/AddRepoNestedImportStep.tsx | 2 +- .../deletion/DeleteNestedWorktreesDialog.tsx | 2 +- .../delete-worktree-dirty-change-counts.ts | 2 +- .../detach-worktree-delete-children.ts | 2 +- .../deletion/worktree-delete-execution.ts | 2 +- .../workspace-reference-refresh-targets.ts | 2 +- .../folder-workspace-source-selection.ts | 2 +- .../dialog/HiddenWorktreeRecoveryList.tsx | 2 +- .../sources/WorktreeVisibilitySourceList.tsx | 2 +- .../ImportedWorktreesVisibilityLine.tsx | 2 +- .../rows/project-group-folder-refresh.ts | 2 +- .../components/sidebar/wsl-host-offer-move.ts | 2 +- .../WorkspaceSpaceCompactPanel.tsx | 2 +- .../workspace-space-decision-hover-card.tsx | 2 +- .../workspace-space-breakdown-list.tsx | 2 +- .../workspace-space-manager-overview.tsx | 2 +- .../overview/workspace-space-treemap.tsx | 2 +- .../table/workspace-space-worktree-row.tsx | 2 +- .../workspace-space-manager-toolbar.tsx | 2 +- .../tab-bar/open-tab-entry-dedupe.ts | 2 +- .../components/tab-bar/tab-bar-item-model.ts | 2 +- .../github/issue-status/StatusCell.tsx | 2 +- .../task-page-github-status-actions.ts | 2 +- .../github/use-task-page-github-detail.ts | 2 +- .../gitlab/use-task-page-gitlab-loading.ts | 2 +- .../task-page/linear/issues/IssueBoard.tsx | 2 +- .../use-task-page-linear-list-effects.ts | 2 +- .../task-page/task-page-localized-options.tsx | 2 +- .../task-page/task-page-source-context.tsx | 2 +- .../task-page/use-task-page-provider-state.ts | 2 +- .../use-task-page-workspace-actions.ts | 2 +- .../host-files/terminal-file-path-mapping.ts | 2 +- .../file-drop/terminal-drop-local-wsl.ts | 2 +- .../file-drop/terminal-drop-worktree-path.ts | 2 +- .../links/terminal-osc-link-routing.ts | 2 +- .../pane-launch-agent-candidate.ts | 2 +- .../terminal-startup-command-classifier.ts | 2 +- .../workspace-cleanup-row-list.tsx | 2 +- .../workspace-cleanup-ancestor-skips.ts | 2 +- .../typing-latency/diagnostic-summary.ts | 2 +- .../src/hooks/composer-branch-selection.ts | 2 +- .../composer-state/async-composer-state.ts | 5 +- .../src/hooks/composer-state/async-model.ts | 5 +- .../composer-state/attachment-drop-state.ts | 2 +- .../branch-start-point-actions.ts | 2 +- .../composer-state/composer-source-model.ts | 2 +- .../composer-state/derived-composer-state.ts | 2 +- .../src/hooks/composer-state/derived-model.ts | 7 +- .../folder-submit-orchestration.ts | 2 +- .../gitlab-provider-selection.ts | 2 +- .../linked-item-lookup-effects.ts | 2 +- .../composer-state/provider-runtime-sync.ts | 5 +- .../composer-state/provider-sync-model.ts | 5 +- .../quick-submit-preparation.ts | 2 +- .../composer-state/runtime-target-model.ts | 2 +- .../composer-state/setup-policy-decisions.ts | 2 +- .../composer-state/source-identity-actions.ts | 2 +- .../source-selection-decisions.ts | 2 +- .../composer-state/use-project-group-setup.ts | 4 +- ...tor-external-watch-event-reconciliation.ts | 2 +- .../editor-external-watch-local-roots.ts | 2 +- .../editor-external-watch-symlink-folders.ts | 2 +- .../editor-external-watch-target-rows.ts | 2 +- .../ssh-managed-server-state-effects.ts | 2 +- .../installed-agent-skill-verdict.ts | 2 +- .../src/hooks/useEditorExternalWatch.ts | 2 +- .../src/hooks/useEphemeralVmRecipeOptions.ts | 2 +- .../src/hooks/worktree-head-identity-apply.ts | 2 +- .../launch/inventory/host-chat-program.ts | 2 +- .../resume/agent-resume-launch-target.ts | 2 +- .../ai-vault-session-resume-preparation.ts | 2 +- .../cookies/browser-cookie-import-toast.ts | 2 +- .../src/lib/clipboard/clipboard-file-path.ts | 2 +- .../execute-open-editor-path-move.ts | 2 +- .../remap-open-editor-tabs-for-path-change.ts | 2 +- .../documents/markdown-document-templates.ts | 2 +- .../src/lib/files/drop/workspace-file-drag.ts | 2 +- .../files/search/quick-open-file-history.ts | 2 +- .../src/lib/path-display/path-head-elision.ts | 2 +- src/renderer/src/lib/path.ts | 2 +- .../paths/git-path-decoration.ts | 5 +- .../remote/bitbucket-connect-error-copy.ts | 2 +- .../remote/code-host-error-copy.ts | 4 +- .../review/github-pr-start-point.ts | 2 +- .../gitlab/gitlab-work-item-source-lookup.ts | 2 +- .../linear/linear-issue-url-lookup.ts | 2 +- .../work-items/linear/linear-read-error.ts | 2 +- .../work-items/task-repo-source-context.ts | 2 +- .../creation/project-host-workspace-target.ts | 2 +- .../setup/workspace-setup-preparation.ts | 9 +- .../creation/setup/workspace-setup-trust.ts | 2 +- .../ownership/connection-owner-resolution.ts | 2 +- .../paths/folder-workspace-path-status.ts | 2 +- .../wsl-move-renderer-store-keys.ts | 2 +- .../runtime-chat-scratch-file-address.ts | 2 +- .../imports/runtime-file-upload-client.ts | 4 +- .../mutations/runtime-file-bytes-write.ts | 2 +- .../mutations/runtime-file-mutation-client.ts | 2 +- .../src/runtime/files/runtime-file-routing.ts | 2 +- .../managed-runtime-install-status.ts | 2 +- .../use-managed-runtime-install.ts | 2 +- .../linear/runtime-linear-issue-client.ts | 2 +- .../configuration/mcp-config-inspection.ts | 2 +- .../repo-hooks/ensure-hooks-confirmed.ts | 10 +- .../repo-hooks/runtime-hooks-client.ts | 2 +- .../runtime/repo-hooks/setup-script-prompt.ts | 4 +- .../runtime/repo-hooks/setup-script-status.ts | 2 +- .../repo-hooks/vm-recipe-trust-content.ts | 2 +- .../gitlab-job-trace-client.ts | 2 +- .../references/runtime-repo-client.ts | 2 +- .../folder-workspaces/folder-path-status.ts | 2 +- .../src/store/github/cache/cache-model.ts | 2 +- .../src/store/github/github-slice-contract.ts | 2 +- .../pr-auto-refresh-cadence-observer.ts | 2 +- ...-host-pr-auto-refresh-cadence-sync.test.ts | 23 +- .../remote-host-pr-auto-refresh-cadence.ts | 2 +- .../work-items/work-item-aggregate-actions.ts | 2 +- .../editor/buffers/editor-buffer-identity.ts | 2 +- .../editor/explorer/explorer-dir-state.ts | 2 +- .../slices/editor/file-ids/editor-file-ids.ts | 2 +- .../refresh/owning-host-cadence-replan.ts | 2 +- ...le-hosted-review-refresh-scheduler.test.ts | 218 +--------- ...visible-hosted-review-refresh-scheduler.ts | 2 +- .../visible-hosted-review-refresh-targets.ts | 2 +- .../jira/jira-collection-read-actions.ts | 2 +- .../slices/jira/jira-issue-read-actions.ts | 2 +- .../src/store/slices/linear/linear-cache.ts | 2 +- .../linear-custom-view-detail-actions.ts | 2 +- .../linear/linear-custom-view-list-actions.ts | 2 +- .../linear-custom-view-project-actions.ts | 2 +- .../linear/linear-issue-detail-actions.ts | 2 +- .../linear/linear-issue-list-actions.ts | 2 +- .../linear/linear-project-detail-actions.ts | 2 +- .../linear/linear-project-list-actions.ts | 2 +- .../linear/linear-slice-connection-actions.ts | 2 +- .../slices/linear/linear-team-actions.ts | 2 +- .../slices/ui/ui-slice-contract-contextual.ts | 4 +- .../store/slices/ui/ui-slice-contract-core.ts | 2 +- .../ui/ui-slice-hydration-sanitizers.ts | 2 +- .../store/slices/ui/ui-slice-trust-actions.ts | 2 +- .../slices/ui/workspace-navigation-history.ts | 2 +- .../tabs/recently-closed-terminal-tabs.ts | 2 +- .../web-preference-normalization.ts | 2 +- .../web/preload-api/web-repositories-api.ts | 2 +- .../web-runtime-worktree-catalog.ts | 2 +- .../opencode-session-correlation.ts | 2 +- .../providers/grok/grok-session-paths.ts | 2 +- .../agent-launch/catalog/pi-agent-kind.ts | 5 +- .../agent-launch/catalog/tui-agent-config.ts | 2 +- .../choices/agent-choice-settings.ts | 2 +- .../environment}/kiro-home.ts | 2 +- .../installation}/managed-runtime-install.ts | 0 .../permissions/workspace-pretrust-scope.ts | 2 +- .../startup/agent-command-line-intent.test.ts | 2 +- .../startup/agent-command-line-intent.ts | 2 +- .../startup/agent-command-plan.ts | 2 +- .../startup/agent-launch-runtime.ts | 2 +- .../startup/automation-extra-agent-args.ts | 2 +- .../startup/opencode-launch-command.ts | 2 +- .../startup/setup-agent-startup-policy.ts | 2 +- .../startup/setup-runner-command.ts | 2 +- .../startup/tui-agent-resume-startup.ts | 2 +- .../launch/agent-session-option-agent-args.ts | 2 +- .../presentation/agent-row-primary-text.ts | 2 +- .../process/agent-process-recognition.ts | 2 +- .../process/opencode-headless-command.ts | 4 +- .../resume/ai-vault-resume-startup.ts | 2 +- .../scanning/ai-vault-scope-cwd-match.ts | 2 +- .../ai-vault/scanning/ai-vault-scope-paths.ts | 5 +- .../scanning/ai-vault-session-cwd-aliases.ts | 2 +- .../ai-vault-session-cwd-candidates.ts | 2 +- .../ai-vault-session-filters.ts | 2 +- .../ai-vault-session-log-resource.ts | 2 +- .../ai-vault-session-worktree.ts | 2 +- .../{ => archives}/zip-extractor-command.ts | 0 .../external-automation-jobs-file.ts | 4 +- .../external}/external-automation-scope.ts | 6 +- .../history/automation-session-reuse.ts | 2 +- .../launch/automation-setup-decision.ts | 2 +- .../{ => bitbucket}/bitbucket-credentials.ts | 2 +- .../annotations/browser-annotation-output.ts | 2 +- .../workspaces/browser-page-doc-location.ts | 2 +- src/shared/{ => cli}/cli-argument-boundary.ts | 0 .../{ => cli}/command-option-occurrence.ts | 0 src/shared/{ => cli}/orca-cli-command-name.ts | 2 +- .../{ => collections}/updated-at-order.ts | 0 src/shared/constants.ts | 2 +- .../doc-preview-file-access.ts | 2 +- .../notebooks/notebook-venv-location.ts | 2 +- .../editor/views/editor-tab-view-types.ts | 2 +- src/shared/{ => errors}/classified-error.ts | 0 .../definitive-filesystem-absence.ts | 0 .../{ => errors}/storage-capacity-error.ts | 0 .../absolute-dir-override.ts | 0 .../cross-platform-path.test.ts | 0 .../{ => file-access}/cross-platform-path.ts | 2 +- .../{ => file-access}/real-path-sync.ts | 0 .../runtime-workspace-file-owner.ts | 2 +- .../local-log-tail-types.ts | 0 .../{ => file-import}/drop-staging-ignore.ts | 0 .../file-listing/markdown-document-paths.ts | 2 +- src/shared/file-search/text-search-paths.ts | 2 +- .../watch-root-capacity-refusal.ts | 0 src/shared/folder-workspace-hooks.ts | 2 +- .../folder-workspace-execution-host.ts | 2 +- .../folder-workspace-source-repos.ts | 2 +- src/shared/git/commands/git-ssh-policy-env.ts | 2 +- .../maintenance}/loose-ref-count.test.ts | 24 +- .../{ => git/maintenance}/loose-ref-count.ts | 0 .../maintenance}/packed-refs-lock-gate.ts | 0 .../git/maintenance/repo-ref-maintenance.ts | 4 +- .../git/objects/git-object-quarantine.ts | 4 +- .../{ => git/remotes}/preferred-git-remote.ts | 0 .../{ => git/status}/generated-code-path.ts | 0 .../git/status/git-branch-line-total.ts | 4 +- src/shared/{ => git/status}/test-code-path.ts | 0 .../checks/checks-detail-polling-policy.ts | 2 +- .../github/projects/project-request-types.ts | 2 +- .../repositories}/gh-star-source.ts | 0 .../work-items/work-item-page-errors.ts | 2 +- .../github/work-items/work-item-types.ts | 2 +- src/shared/{ => gitlab}/gitlab-projects.ts | 0 src/shared/{ => gitlab}/gitlab-types.ts | 8 +- src/shared/global-settings-base.ts | 2 +- src/shared/global-settings-types.ts | 2 +- .../mcp-config-inspection-limits.ts | 2 +- .../configuration}/mcp-config.test.ts | 2 +- .../{ => mcp/configuration}/mcp-config.ts | 2 - .../configuration}/mcp-server-inspection.ts | 0 .../input/composer/agent-image-paste.ts | 2 +- .../native-chat/native-chat-href-routing.ts | 2 +- .../native-chat/native-chat-image-label.ts | 2 +- .../tools/native-chat-edit-model.ts | 2 +- .../tools/native-chat-tool-output.ts | 2 +- .../tools/native-chat-tool-viewed-images.ts | 2 +- .../native-chat-generated-image-answers.ts | 2 +- .../composer-branch-selection.ts | 4 +- .../smart-workspace-source-results.ts | 2 +- .../smart-workspace-url-source-results.ts | 2 +- src/shared/orca-cli-invocations.ts | 5 +- src/shared/persisted-ui-state-types.ts | 2 +- .../artifacts/plugin-vm-recipe-artifact.ts | 4 +- .../lsof-nonblocking-args.ts | 0 .../search-subprocess-lines.test.ts | 0 .../search-subprocess-lines.ts | 0 .../subprocess-stdin-write.ts | 0 .../project/groups/project-group-hooks.ts | 8 +- .../project/groups/project-group-types.ts | 2 +- src/shared/project/project-types.ts | 2 +- src/shared/quick-open/quick-open-filter.ts | 5 +- .../quick-open/quick-open-query-target.ts | 2 +- .../quick-open-recent-candidates.ts | 2 +- .../ephemeral-vm-failure-copy.ts | 2 +- .../ephemeral-vm-recipe-checkout-mode.test.ts | 2 +- .../ephemeral-vm-recipe-checkout-mode.ts | 2 +- .../ephemeral-vm-recipe-doctor.ts | 2 +- .../ephemeral-vm-recipe-lifecycle-payload.ts | 2 +- .../ephemeral-vm-recipe-repo-url.ts | 2 +- .../ephemeral-vm-recipe-runner.ts | 2 +- .../ephemeral-vm-recipe-step.ts | 5 +- .../ephemeral-vm-recipe-timeouts.ts | 2 +- .../ephemeral-vm-workspace-owner.ts | 2 +- .../pending-vm-checkouts.ts | 2 +- .../local-build-compatibility-contract.json | 0 .../protocol/host-runtime-capabilities.ts | 2 +- src/shared/repository/repo-types.ts | 2 +- .../client-ui/client-settings-params.ts | 2 +- .../handled-wire-discriminant.ts | 0 .../integration-credential-errors.ts | 0 .../owned-private-directory.ts | 0 .../command-token-scanner.ts | 0 .../nvm-default-alias.test.ts | 5 +- .../{ => shell/launch}/command-environment.ts | 2 +- .../{ => shell/launch}/orca-cli-shell-path.ts | 0 .../shell/launch/terminal-startup-cwd.ts | 2 +- .../sections/project-section-grouping.ts | 2 +- src/shared/sidebar-list/sorting/smart-sort.ts | 2 +- .../commit-message-generation-options.ts | 2 +- .../ai/generation/commit-message-plan.ts | 2 +- .../ai/generation/commit-message-prompt.ts | 2 +- .../commit-message-recipe-options.ts | 2 +- .../generation}/review-draft-context-error.ts | 0 .../source-control-ai-argument-flags.ts | 2 +- .../auto-rename-branch-from-work-settings.ts | 2 +- .../checks/gitlab/gitlab-job-log-excerpt.ts | 2 +- .../checks/gitlab/gitlab-pipeline-checks.ts | 2 +- .../code-host-failure-copy.ts | 2 +- .../hosted-review/hosted-review-refs.test.ts | 2 +- .../hosted-review}/review-refresh-policy.ts | 4 +- .../listing/source-control-tree.ts | 2 +- .../schemas/telemetry-app-event-schemas.ts | 2 +- src/shared/terminal/input/image-path-paste.ts | 2 +- .../links/terminal-markdown-file-links.ts | 2 +- .../links/terminal-osc-link-target.ts | 2 +- .../native-process/shell-process-readiness.ts | 2 +- .../launch/opencode-generation-command.ts | 2 +- src/shared/text/emoji-shortcode-catalog.ts | 6 + src/shared/{ => text}/format-bytes.ts | 0 .../{ => work-items}/issue-mutation-types.ts | 0 src/shared/work-items/work-item-empty-page.ts | 2 +- .../terminal-session-state-save-failure.ts | 2 +- .../hooks}/hook-command-source-policy.ts | 2 +- .../hooks}/orca-hook-setup-config.test.ts | 0 .../hooks}/orca-hook-setup-config.ts | 2 +- .../hooks}/orca-hook-trust-entries.ts | 2 +- .../orca-yaml-alias-bounds.test.ts | 0 .../orca-yaml-bounds.test.ts | 0 .../orca-yaml-file-limit.ts | 2 +- .../orca-yaml-hook-types.ts | 0 .../orca-yaml-merge-expansion.ts | 0 src/shared/{ => workspace-setup}/orca-yaml.ts | 4 +- .../setup-script-import-parsers.ts | 4 +- .../base-refs}/base-ref-search-result.ts | 2 +- .../creation}/cli-workspace-provenance.ts | 4 +- src/shared/worktree/creation/launch-types.ts | 2 +- .../review-head-tracking-ref.ts | 0 .../review-start-point-failure-copy.ts | 0 src/shared/worktree/id.ts | 2 +- src/shared/worktree/meta-types.ts | 2 +- .../metadata/display-name-provenance.ts | 2 +- .../paths/configured-worktree-base-path.ts | 2 +- .../worktree/paths/workspace-dir-input.ts | 2 +- src/shared/worktree/types.ts | 2 +- .../visibility/agent-scratch-worktrees.ts | 2 +- .../visibility/external-worktree-inbox.ts | 2 +- .../external-worktree-visibility.ts | 2 +- src/shared/worktree/visibility/ownership.ts | 2 +- .../worktree/visibility/visibility-sources.ts | 2 +- .../wsl-drive-unc-renderer-store-keys.ts | 2 +- ...github-pr-hosted-receipt-loop.unit.test.ts | 122 ------ .../github-url-smart-input-transition.spec.ts | 2 +- tests/e2e/linear-private-images.spec.ts | 2 +- ...pr-auto-refresh-setting-order.unit.test.ts | 4 +- 931 files changed, 1103 insertions(+), 2423 deletions(-) delete mode 100644 src/main/github/pull-requests/refresh/pr-refresh-coordinator-auto-refresh-cadence.test.ts delete mode 100644 src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-detail-timer-cadence.test.tsx rename src/shared/{ => agent-launch/environment}/kiro-home.ts (79%) rename src/shared/{ => agent-launch/installation}/managed-runtime-install.ts (100%) rename src/shared/{ => archives}/zip-extractor-command.ts (100%) rename src/shared/{ => automations/external}/external-automation-jobs-file.ts (94%) rename src/shared/{ => automations/external}/external-automation-scope.ts (95%) rename src/shared/{ => bitbucket}/bitbucket-credentials.ts (95%) rename src/shared/{ => cli}/cli-argument-boundary.ts (100%) rename src/shared/{ => cli}/command-option-occurrence.ts (100%) rename src/shared/{ => cli}/orca-cli-command-name.ts (88%) rename src/shared/{ => collections}/updated-at-order.ts (100%) rename src/shared/{ => errors}/classified-error.ts (100%) rename src/shared/{ => errors}/definitive-filesystem-absence.ts (100%) rename src/shared/{ => errors}/storage-capacity-error.ts (100%) rename src/shared/{ => file-access}/absolute-dir-override.ts (100%) rename src/shared/{ => file-access}/cross-platform-path.test.ts (100%) rename src/shared/{ => file-access}/cross-platform-path.ts (99%) rename src/shared/{ => file-access}/real-path-sync.ts (100%) rename src/shared/{ => file-content}/local-log-tail-types.ts (100%) rename src/shared/{ => file-import}/drop-staging-ignore.ts (100%) rename src/shared/{ => file-watch}/watch-root-capacity-refusal.ts (100%) rename src/shared/{ => git/maintenance}/loose-ref-count.test.ts (73%) rename src/shared/{ => git/maintenance}/loose-ref-count.ts (100%) rename src/shared/{ => git/maintenance}/packed-refs-lock-gate.ts (100%) rename src/shared/{ => git/remotes}/preferred-git-remote.ts (100%) rename src/shared/{ => git/status}/generated-code-path.ts (100%) rename src/shared/{ => git/status}/test-code-path.ts (100%) rename src/shared/{ => github/repositories}/gh-star-source.ts (100%) rename src/shared/{ => gitlab}/gitlab-projects.ts (100%) rename src/shared/{ => gitlab}/gitlab-types.ts (97%) rename src/shared/{ => mcp/configuration}/mcp-config-inspection-limits.ts (95%) rename src/shared/{ => mcp/configuration}/mcp-config.test.ts (99%) rename src/shared/{ => mcp/configuration}/mcp-config.ts (99%) rename src/shared/{ => mcp/configuration}/mcp-server-inspection.ts (100%) rename src/shared/{ => new-workspace}/composer-branch-selection.ts (97%) rename src/shared/{ => process-observation}/lsof-nonblocking-args.ts (100%) rename src/shared/{ => process-streams}/search-subprocess-lines.test.ts (100%) rename src/shared/{ => process-streams}/search-subprocess-lines.ts (100%) rename src/shared/{ => process-streams}/subprocess-stdin-write.ts (100%) rename src/shared/{ => remote-runtime/orcad-distribution}/local-build-compatibility-contract.json (100%) rename src/shared/{ => rpc-contract}/handled-wire-discriminant.ts (100%) rename src/shared/{ => secure-storage}/integration-credential-errors.ts (100%) rename src/shared/{ => secure-storage}/owned-private-directory.ts (100%) rename src/shared/{ => shell/command-resolution}/command-token-scanner.ts (100%) rename src/shared/{ => shell/command-resolution}/nvm-default-alias.test.ts (96%) rename src/shared/{ => shell/launch}/command-environment.ts (93%) rename src/shared/{ => shell/launch}/orca-cli-shell-path.ts (100%) rename src/shared/{ => source-control/ai/generation}/review-draft-context-error.ts (100%) rename src/shared/{ => source-control/ai/settings}/auto-rename-branch-from-work-settings.ts (91%) rename src/shared/{ => source-control}/code-host-failure-copy.ts (98%) rename src/shared/{ => source-control/hosted-review}/review-refresh-policy.ts (97%) rename src/shared/{ => text}/format-bytes.ts (100%) rename src/shared/{ => work-items}/issue-mutation-types.ts (100%) rename src/shared/{ => workspace-setup/hooks}/hook-command-source-policy.ts (83%) rename src/shared/{ => workspace-setup/hooks}/orca-hook-setup-config.test.ts (100%) rename src/shared/{ => workspace-setup/hooks}/orca-hook-setup-config.ts (97%) rename src/shared/{ => workspace-setup/hooks}/orca-hook-trust-entries.ts (98%) rename src/shared/{ => workspace-setup}/orca-yaml-alias-bounds.test.ts (100%) rename src/shared/{ => workspace-setup}/orca-yaml-bounds.test.ts (100%) rename src/shared/{ => workspace-setup}/orca-yaml-file-limit.ts (92%) rename src/shared/{ => workspace-setup}/orca-yaml-hook-types.ts (100%) rename src/shared/{ => workspace-setup}/orca-yaml-merge-expansion.ts (100%) rename src/shared/{ => workspace-setup}/orca-yaml.ts (97%) rename src/shared/{ => worktree/base-refs}/base-ref-search-result.ts (92%) rename src/shared/{ => worktree/creation}/cli-workspace-provenance.ts (84%) rename src/shared/{ => worktree/hosted-review}/review-head-tracking-ref.ts (100%) rename src/shared/{ => worktree/hosted-review}/review-start-point-failure-copy.ts (100%) diff --git a/.github/actions/prepare-native-runtime/action.yml b/.github/actions/prepare-native-runtime/action.yml index 8b9891fed5c..86549f5d2a2 100644 --- a/.github/actions/prepare-native-runtime/action.yml +++ b/.github/actions/prepare-native-runtime/action.yml @@ -54,7 +54,7 @@ runs: env: NATIVE_RUNTIME: ${{ inputs.native-runtime }} NODE_VERSION: ${{ inputs.node-version }} - NATIVE_SOURCE_HASH: ${{ hashFiles('.npmrc', 'config/pnpmfile.cjs', '.github/actions/prepare-native-runtime/action.yml', 'config/scripts/native-build/node-addons/ensure-native-runtime.mjs', 'config/scripts/native-build/windows/initialize-windows-native-toolchain.mjs', 'config/scripts/native-build/windows/capture-windows-native-environment.cmd', 'config/scripts/native-build/node-addons/rebuild-native-deps.mjs', 'config/scripts/native-build/node-addons/node-pty-job-ownership.cjs', 'config/scripts/native-build/windows/windows-pe-machine.cjs', 'config/scripts/native-build/windows/windows-process-tree-gyp-rebuild.mjs', 'config/scripts/native-build/windows/windows-process-tree-creation-time.cjs', 'config/scripts/electron-installation/platform-layout/install-electron-package-binary.mjs', 'config/scripts/electron-installation/platform-layout/electron-platform-path.mjs', 'config/scripts/zip-extractor-command.mjs', 'src/shared/zip-extractor-command.ts', 'config/scripts/electron-installation/shared-dist-cache/shared-electron-dist-cache.mjs', 'config/scripts/artifact-storage/reflink-copy/space-sharing-copy.mjs', 'config/scripts/artifact-storage/atomic-publication/shared-tree-publish.mjs', 'config/scripts/native-build/node-addons/native-build-entry.cjs', 'config/scripts/native-build/node-addons/native-build-entry-probe.cjs', 'config/scripts/native-build/node-addons/shared-native-build.mjs', 'config/scripts/orcad-distribution/prebuilds/orcad-prebuild-node-gyp.mjs', 'config/scripts/native-build/windows/msbuild-file-tracking.mjs', 'config/scripts/native-build/node-addons/native-dependency-lock-digest.mjs', 'config/patches/node-pty@1.1.0.patch', 'config/patches/@vscode__windows-process-tree@0.8.0.patch', 'native/windows-notifications/src/addon.cc', 'native/windows-notifications/binding.gyp', 'native/windows-notifications/package.json', 'native/windows-notifications/index.js', 'native/windows-registry/src/addon.cc', 'native/windows-registry/binding.gyp', 'native/windows-registry/package.json', 'native/windows-registry/index.js', 'native/windows-security/src/addon.cc', 'native/windows-security/src/isolated-spawn.cc', 'native/windows-security/src/isolated-spawn.h', 'native/windows-security/binding.gyp', 'native/windows-security/package.json', 'native/windows-security/index.js') }} + NATIVE_SOURCE_HASH: ${{ hashFiles('.npmrc', 'config/pnpmfile.cjs', '.github/actions/prepare-native-runtime/action.yml', 'config/scripts/native-build/node-addons/ensure-native-runtime.mjs', 'config/scripts/native-build/windows/initialize-windows-native-toolchain.mjs', 'config/scripts/native-build/windows/capture-windows-native-environment.cmd', 'config/scripts/native-build/node-addons/rebuild-native-deps.mjs', 'config/scripts/native-build/node-addons/node-pty-job-ownership.cjs', 'config/scripts/native-build/windows/windows-pe-machine.cjs', 'config/scripts/native-build/windows/windows-process-tree-gyp-rebuild.mjs', 'config/scripts/native-build/windows/windows-process-tree-creation-time.cjs', 'config/scripts/electron-installation/platform-layout/install-electron-package-binary.mjs', 'config/scripts/electron-installation/platform-layout/electron-platform-path.mjs', 'config/scripts/zip-extractor-command.mjs', 'src/shared/archives/zip-extractor-command.ts', 'config/scripts/electron-installation/shared-dist-cache/shared-electron-dist-cache.mjs', 'config/scripts/artifact-storage/reflink-copy/space-sharing-copy.mjs', 'config/scripts/artifact-storage/atomic-publication/shared-tree-publish.mjs', 'config/scripts/native-build/node-addons/native-build-entry.cjs', 'config/scripts/native-build/node-addons/native-build-entry-probe.cjs', 'config/scripts/native-build/node-addons/shared-native-build.mjs', 'config/scripts/orcad-distribution/prebuilds/orcad-prebuild-node-gyp.mjs', 'config/scripts/native-build/windows/msbuild-file-tracking.mjs', 'config/scripts/native-build/node-addons/native-dependency-lock-digest.mjs', 'config/patches/node-pty@1.1.0.patch', 'config/patches/@vscode__windows-process-tree@0.8.0.patch', 'native/windows-notifications/src/addon.cc', 'native/windows-notifications/binding.gyp', 'native/windows-notifications/package.json', 'native/windows-notifications/index.js', 'native/windows-registry/src/addon.cc', 'native/windows-registry/binding.gyp', 'native/windows-registry/package.json', 'native/windows-registry/index.js', 'native/windows-security/src/addon.cc', 'native/windows-security/src/isolated-spawn.cc', 'native/windows-security/src/isolated-spawn.h', 'native/windows-security/binding.gyp', 'native/windows-security/package.json', 'native/windows-security/index.js') }} run: | scope="${ImageOS:-$RUNNER_OS}" if [ -r /etc/os-release ]; then diff --git a/.github/workflows/ci-cache-warmup-platforms.yml b/.github/workflows/ci-cache-warmup-platforms.yml index 376eab01ae4..a8dabb1c3e1 100644 --- a/.github/workflows/ci-cache-warmup-platforms.yml +++ b/.github/workflows/ci-cache-warmup-platforms.yml @@ -51,7 +51,7 @@ on: - 'config/scripts/electron-installation/platform-layout/install-electron-package-binary.mjs' - 'config/scripts/electron-installation/platform-layout/electron-platform-path.mjs' - 'config/scripts/zip-extractor-command.mjs' - - 'src/shared/zip-extractor-command.ts' + - 'src/shared/archives/zip-extractor-command.ts' - 'config/scripts/electron-installation/shared-dist-cache/shared-electron-dist-cache.mjs' - 'config/scripts/artifact-storage/reflink-copy/space-sharing-copy.mjs' - 'config/patches/**' diff --git a/.github/workflows/ci-cache-warmup.yml b/.github/workflows/ci-cache-warmup.yml index 0c43fc28574..c000196aeb8 100644 --- a/.github/workflows/ci-cache-warmup.yml +++ b/.github/workflows/ci-cache-warmup.yml @@ -41,7 +41,7 @@ on: - 'config/scripts/electron-installation/platform-layout/install-electron-package-binary.mjs' - 'config/scripts/electron-installation/platform-layout/electron-platform-path.mjs' - 'config/scripts/zip-extractor-command.mjs' - - 'src/shared/zip-extractor-command.ts' + - 'src/shared/archives/zip-extractor-command.ts' - 'config/scripts/electron-installation/shared-dist-cache/shared-electron-dist-cache.mjs' - 'config/scripts/artifact-storage/reflink-copy/space-sharing-copy.mjs' - 'config/patches/**' diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4a709fa8afa..13764ea11f4 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -422,7 +422,7 @@ jobs: src/shared/remote-runtime/ephemeral-vm-store/ephemeral-vm-runtime-rollback-projection.ts \ src/shared/remote-runtime/ephemeral-vm-store/ephemeral-vm-runtimes.ts \ src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipes.ts \ - src/shared/orca-yaml-hook-types.ts \ + src/shared/workspace-setup/orca-yaml-hook-types.ts \ config/scripts/runtime-verification/ephemeral-store/run-ephemeral-vm-runtime-store-rollback-repro.mjs \ config/scripts/runtime-verification/ephemeral-store/ephemeral-vm-runtime-store-cross-version.test.ts \ src/main/ephemeral-vm/runtime-service.ts \ diff --git a/config/main-sync-fs-baseline.txt b/config/main-sync-fs-baseline.txt index 32044607970..02c1106398e 100644 --- a/config/main-sync-fs-baseline.txt +++ b/config/main-sync-fs-baseline.txt @@ -597,7 +597,7 @@ 1 src/shared/agent-launch/plugins/opencode/opencode-tui-plugin-install.ts 2 src/shared/remote-runtime/orcad-distribution/orcad-build-identity.ts 1 src/shared/plugins/declarative/testing/orca-testing.ts -2 src/shared/real-path-sync.ts +2 src/shared/file-access/real-path-sync.ts 1 src/shared/remote-runtime/e2ee/node/remote-runtime-e2ee-v2-host-latch.ts 1 src/shared/remote-runtime/host-store/runtime-e2ee-keypair-file.ts 1 src/shared/remote-runtime/host-store/runtime-environment-store-records.ts diff --git a/config/reliability-gates.jsonc b/config/reliability-gates.jsonc index 64ef396e1a2..f460221a997 100644 --- a/config/reliability-gates.jsonc +++ b/config/reliability-gates.jsonc @@ -11968,13 +11968,13 @@ "invariant": "Local runtime and SSH relay roots share one watcher child per host process while healthy and use at most four quarantine children after shard failure; native desktop, paired-runtime, and direct WSL snapshot children consume the same process-wide eight-child reservation and retry transient exhaustion without permanently disabling a root. Cancellation remains owned by its child generation and settles only after acknowledgement or bounded physical exit; paired-web retains cleanup ownership and can cancel before readiness even while capacity is exhausted, retries a failed unwatch after already-resolved or late physical exit without duplicating stream termination, replacements never overlap a still-retiring generation, and aborted or timed-out callers detach immediately even while queued behind same-root relay teardown. Destructive local and SSH cleanup holds one containment-aware watcher/terminal removal fence through descendant watcher and PTY physical exit plus parent Git/filesystem deletion; daemon and relay kill requests retain ownership until the actual subprocess exit callback or an equivalent positive dead-PID proof and propagate rejected signals or a bounded failure otherwise. A crash-fused shared shard moves affected roots into the bounded quarantine pool, a second fused quarantine ends those watch lifetimes, interrupted setup emits overflow after recovery, metadata work stays bounded, and the SSH relay, PTYs, Git, and other filesystem operations never load the watcher native addon or share its fault boundary.", "oracle": "Audit5896 removes only the paired-settings.spec and dispatch-mailbox-delivery.spec import lines from their retained runtime/mailbox drivers. Those imported suites and alarms are intentionally retired, without equivalent replacement. Driver selectors remain; unchanged dated receipts retain original scope and do not establish a new whole-gate import-closure pass. Complete prior account retained verbatim: Audit5896 retires the whole promise-settlement-waiters suite, intentionally losing its Promise ordering/abandon cleanup alarms. Remaining selectors are not equivalent replacement coverage; unrelated dated receipts retain original scope. No fresh whole-gate validation is claimed. Complete prior account retained verbatim: Shared primitives layout deliberately retires the promise waiter actual-timeout/supplied-result/internal waiter-count/timer-count callback. The already-aborted ownership-abandon callback survives at its moved concurrency test path. No equivalent timeout detachment/timer-cleanup alarm or fresh validation of the reduced/moved source is claimed. All13 dated build/resource/fault-harness receipts remain exact and retain only their original scopes. Previous account (verbatim; historical where it concerns changed source): Audit5648/source5643 retires complete suites and their exact active selectors/assertion references. Intentionally lose watcher registry release-before-listen wakeup, one-released-slot reservation ordering, event flush blocked-active/overflow delivery and close-settlement alarms. No equivalent replacement, fresh execution or native/remote/platform evidence is claimed. Complete original selector/assertion fields and historical scopes remain in knownGaps. Prior account (verbatim): Audit4368 intentionally drops seven mocked teardown cases: duplicate single-chat rollback, forced stuck-close warning/retirement, post-close-throw exit acceptance, mixed live/unconfirmed wording, exact serial-close budget work, missing runtime selector success and runtime-sweep rejection. Four structured-session and three PTY teardown cases remain; no replacement or fresh native/process/remote proof is claimed. Historical assertion anchors and receipts are not refreshed by this source-only reduction. Audit4362 intentionally deletes the imported stale-waiter retry and manually assembled OSC9999 mobile-republish cases, plus the mocked missing-worktree cleanup suite (4 authored / 5 finite cases in three suites). Lost alarms include repeated unread worker_done pointers, working-to-waiting mobile status publication, missing-worktree filtering, and scoped daemon shutdown with unrelated duplicate identities. No replacement coverage or new platform proof is claimed. Audit4358 intentionally removes six whole mocked daemon subprocess suites and two extra pre-listener replay variants (18 authored / 20 finite cases). Lost alarms include cancel-during-cwd-validation, root agent startup refusal, output/exit before ConPTY publication, fresh/delayed/unavailable foreground confirmation, cache/decision separation, detached/no-tty child evidence and synthetic agent authorization. The retained lifecycle case checks data and exit replay after handle creation, not startup-time publication or alternate listener order. The retained native Windows Git Bash workflow and host cold-restore seed check have separate scopes. No equivalent replacement or fresh gate execution is claimed. Earlier notes and dated receipts retain their original scope. Audit4351 removes the physical-exit timeout/retry and kill-failure/retry local-PTY shutdown cases. The retained shutdown case proves pending ownership until the injected node-pty exit callback only. These two narrow error-path alarms are intentionally lost; retained commands still select the reduced suite. No equivalent replacement or fresh runtime execution is claimed. Earlier notes and dated receipts retain their original scopes. Audit3832 deliberately retires76 authored/79 finite cases:75 runtime compatibility cases/78 finite cases across14 fragments, plus one localization extractor default-flag case. Three whole runtime fragments are deleted;27 authored/30 finite cases remain across the reviewed sources. This gate retains only its own selected scope; no equivalent replacement or fresh runtime/native/remote evidence is claimed. Runtime component A: Audit3828 composes3822 with independent3824: deliberately retires49 authored/52 finite cases from seven compatibility fragments, leaving15 authored/18 finite cases and deleting two entire fragments. Accepted losses: positive folder-worker recovery/materialization and reveal deadline; persisted-key normalization and legacy split/group/focus projection; fixed stale CAS refusal; occupied/alias/restored/preallocated terminal-handle variants; fixed OpenCode/Cursor/Claude/Codex/Antigravity classification, readiness, title and management examples; direct private-map browser authority projections; browser-focus and OMP title projection; already-aborted claim cleanup. Additional3824 loss: src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status-part-02.spec.ts :: does not poll a wrapper foreground for a speculative CLI prompt send :: Speculative retryForegroundWrappers:false check must return false on a wrapper after one foreground read, without polling the supplied later codex response. These real bounded alarms are deliberately retired for low marginal value. Retained callbacks are unchanged and provide only their own bounded scope, not equivalent replacement. Historical receipts do not validate reduced callbacks. No fresh runtime/native/SSH/WSL/phone/browser evidence or full transitive closure is claimed. Runtime component B: Audit3834 deliberately retires26 authored/26 finite cases from seven fresh compatibility fragments, leaving10/10 and deleting the one-case saved-binding reattachment fragment. Original position58 is excluded: its existing substantive3578 KEEP7 review remains historical, with no fresh credit. Accepted losses: fixed hook/provider-session identities and stale metadata refusal; decorative/pre-title foreground ordering variants; saved-binding surface reattachment; saved-row exit ghost removal and silent activation selection; unsupported headless wake; positive pending materialization/group projections; per-caller navigation selection; positive SSH hydration/read partition; laptop mobile publication/buffer and background/pending/status projections; abnormal/unregistered SSH grace, normal-exit refusal, persisted SSH hydration, positive serve reattachment, pending-agent launch arguments and direct seeded running-launch admission guard. These are real bounded alarms deliberately retired for low marginal value. Retained cases preserve their own distinct deferred foreground coalescing, usable handle continuity, stale inventory refresh, concurrent browser snapshot preservation, renderer graph fencing, caller dedup isolation, SSH partition writes, runtime split lifetime, independent relay-ready publication, lease admission/state/expiry. The direct running-launch no-spawn guard alarm is deliberately retired; no remaining owning-launch refusal coverage is claimed. Historical runs do not validate reduced callbacks. No equivalent replacement, runtime/native/SSH/WSL/phone/browser result or full transitive closure is claimed. Additional extractor loss: config/scripts/localization/source-extraction/audit-localization-native-dialogs.test.mjs :: does not change the existing renderer scan by default :: Default options must omit the five native-only fields in this supplied snippet. No equivalent replacement is claimed. Historical prior account (preserved verbatim): Audit3814 deliberately retires60 authored/60 finite cases:53runtime compatibility cases,4native XCTest methods and3Python clipboard methods, including the entire StableElementIndexes suite. Clipboard cuts retire the one-over-cap sample, incoming-offer destruction trace and sequential20-copy replay; actual wire, FD/pipe, startup and Xvfb/GTK boundaries remain without equivalent replacement claims. Accepted losses include narrow terminal-send payload/provider projections, legacy and direct no-op/error permutations, timing/work-count examples, private state/title/activity projections and fixture-driven readiness examples, individually enumerated below. These include real bounded production alarms consciously retired for marginal value; retained failed writes, duplicate submission, stale capture, transcript/ring and allocation fences are not equivalent replacements. No fresh native/remote/browser execution or complete transitive closure is claimed. Earlier dated receipts and raw selectors remain historical accounts of prior callback sets. Audit3806 deliberately retires40 authored/40 finite runtime compatibility cases, including the terminal-side-effect-facts-part03 headless-snapshots-part02 and agent-status-and-waits-part03 fragments, plus20 scalar Swift precondition sites. Lost runtime alarms include status/title/attention projection examples, simple renderer/headless frame restoration and status waiting outcomes detailed in the accepted-loss ledger. Swift cuts retire duplicate generation-map/schema/navigation/bridge and notification-wrapper assertions; no standalone native program is deleted. These include real bounded production alarms consciously retired for marginal value. Retained races, pending writes/reflow, namespace and waiter ownership are not equivalent replacements. No fresh native/remote/browser execution or full transitive closure is claimed. Earlier dated receipts and raw selectors remain historical accounts of prior callback sets. Audit3798 deliberately retires21 authored/24 finite compatibility cases, including the entire SSH-worktree-lifecycle and repository-project-operations fragments. Accepted losses include navigation-only settings acknowledgement, browser session cleanup and host preservation projections, window positive/policy-state examples, terminal recovery/reload and no-incarnation remint examples, terminal listing compatibility/malformed IDs, directory browse/sort/Windows path smoke, SSH create refusal/manual lineage, recursive parent-folder creation and fork/origin/avatar/icon projections. Real bounded production alarms are consciously retired for marginal value; retained authority races, cleanup/clone ownership, pending waiters, nested-folder and scan invalidation cases are not equivalent replacements. No fresh native/remote/browser execution or full transitive closure is claimed. Earlier dated receipts and raw selectors remain historical accounts of prior callback sets. Audit3788 retires10 authored/11 expanded cases across six changed drivers, including the entire screencast pending-frame-retry and usage-source-cache-streaming suites. Deliberate losses are false-refused last-frame retry/once-only delivery, ordinary stable-pane reattachment, cleared-chat Dispatch completion, terminal-declared chat-caller refusal, at-rest worker liveness projection, nested depth/cap policy, small unsigned6/sealed7 plain-format and verified-bit examples, generic malformed-ISIZE footer refusal examples, and synthetic10k/100k chunk-size/work-count budgets in gzip and general cache I/O. These include real state/disk/RPC outcomes consciously retired for marginal value; retained E2EE-backlog, receipt/custody/uncertain-ack, integrity/migration and staging-cleanup cases are not equivalent replacements. The footer test did not prove early rejection or bounded allocation; staging cleanup did not seed unrelated files. No replacement or fresh native/remote/performance execution is claimed. Earlier raw selectors and dated receipts remain historical. Audit3779 retires17 authored/17 expanded registrations across six changed drivers, including the entire shared-Codex-home and prompt-telemetry suites. Accepted losses are shared-home wrapper noninterference/opt-out preservation, mocked metric count/provenance filters, SSH activity labeling/clearing and handover idle timing, VM ownership/capability/status projections and asleep-worktree refusal, a link-only external conversation replay sample, and two narrow input-credit noninterference/expiry examples. Retain the direct exact-tab/single-use input-credit case. These bounded real disk/state/routing alarms are intentionally retired for marginal value without equivalent replacement or fresh execution claims; earlier receipts remain historical. Audit3772 retires18 authored/27 expanded cases, including whole Codex service opt-out, RPC capability-parser, creator-provenance, short-ciphertext and readiness-null suites. Accepted losses include service ledger/symlink/mode cleanup, user TOML substring preservation, old-hash cleanup, description pass-through, malformed-file/pending-hash examples, coordinator write/probe counts, capability array bounds, positive creator projections, early short-payload refusal and readiness helper null shape. Two redundant Codex exit-cause rows are also retired; Pi shares their direct-idle path only in this empty-output immediate-exit fixture, and future agent-config drift coverage is lost. Real bounded filesystem/parser/runtime alarms are deliberately retired for marginal value; no equivalent replacements or fresh execution are claimed. Earlier receipts retain their historical scope. Audits3754/3755 intentionally remove9 authored/9 finite registrations: the entire one-case usage-source-cache-streaming.test.ts driver and8 cases from the surviving computer-action-validation.test.ts driver. This gate retains an unfiltered root Vitest command; UNIT_INCLUDE admits both source paths. Accepted losses are the real encoder output chunk-size/work-count alarm on repetitive10k/100k ownership payloads through a mocked durable sink, plus CLI diagnostic precedence, fractional window-id rejection, action-call-site window-target exclusivity, plain-text click-count recovery copy, incomplete click/drag targeting, mouse/modifier/direction allowlist samples and inline/stdin text exclusivity. These CLI cases exercise real argument/handler validation before mocked runtime calls; they are deliberately retired for marginal value, not declared tautologies. Retained cache I/O and CLI cases are not equivalent replacements for these alarms. Existing historical raw receipts remain unchanged and do not validate the deleted or reduced drivers. No fresh execution claim is made. Audits3758/3763 intentionally remove9 authored/11 finite registrations from6 changed drivers, including the entire pane-title-notification, window-linear-notices and worktree-card-lifecycle-effects suites. This gate retains an unfiltered root Vitest command admitting these paths. Accepted losses are same-account linked-row success-notice fanout, sidebar-switch channel forwarding, Linear-only notification forwarding/non-terminal-consumer selection/closed-window detach, destroyed-window refusal and first-send-failure suspension through the pane-title adapter, the100-card synthetic focus/poll absence sample, stored-source local folder badge refresh, unobserved-row badge refusal, and immediate reposChanged lineage invalidation. These exercise real owners with controlled ports; they are retired for marginal value, without equivalent replacement claims. The no-badge-work fixture does not seed its title-promised collection-only cache. Preserved historical receipts do not validate deleted or reduced drivers; no fresh execution is claimed. Audit3759 retires the entire one-case Tailwind compiler/scanner smoke. Accept loss of the direct CSS production/test/spec source-exclusion and rescan alarm; no replacement or current execution is claimed. Audit3752 independently approves audit3749: retire five authored/five finite watcher-process registrations, retaining18 raw-exact registrations. Accept loss of healthy shared-pool joint recovery, last-pending-failure idle retirement/respawn, late VITEST fallback release, missing-entry fail-closed selection and independent-supervisor fuse locality alarms. These are real bounded host-policy alarms intentionally retired for low marginal value; no equivalent replacement is asserted. Remaining driver selections exercise controlled FakeChild supervisor lifecycle, cancellation, physical-exit fencing, recovery and fuse behavior. This source review supplies no fresh native/process/platform/remote/SSH execution; historical receipts retain original source and selector scopes. Previous oracle (preserved verbatim): Audits3738/3742/3743/3744 intentionally remove15 authored/21 finite registrations from six surviving drivers, with no equivalent replacement or fresh execution claim. This gate retains an unfiltered root Vitest command. Current UNIT_INCLUDE admits the partial push-service, metadata-dialog and two config/scripts browser drivers:10 authored/16 finite removals. Accepted losses: actual retry30s/60s progression and register bucket/refill wiring, explicit seven-day lease arithmetic (its notification lacked seq/epoch and never reached send), equal-name edit latch/save payload, real image/font/meta-refresh/form/popup browser refusal controls, and broad rich-markdown bridge/command/edit-select smoke. Actual production state, callback routing and browser enforcement run in these cases; these alarms are deliberately retired on marginal value. All drivers and selectors survive. Existing unrelated receipts remain historical evidence for their unchanged selectors, not proof of the reduced cases. Audit3732 removes 2 authored/3 finite registrations from two partial suites: nominal custom/Kimi local naming success and deferred context usage row presentation. Real losses: custom/Kimi successful extraction through conversation-name sanitization and agentLabel composition; separate ordered counted/deferred lists and exact percentage/token formatting. No replacement or equivalent coverage claimed. Retain 11 authored/13 finite raw-exact registrations for bounded naming instruction/refusal/cancellation, menu dismissal focus ownership and hover/composer Escape/timer cleanup. Source-only bounded value review, no runtime/CI/native/remote/mobile/folder workspace or global completion credit. Previous oracle (preserved verbatim): Audit3733 removes2authored/2finite terminal input checks: fixed custom-cap error/secret fixture and three-emoji cap5refusal whose6UTF16units already trip length fast guard (no UTF8-dependent boundary). Accept exact non-disclosure/oversized-refusal alarm losses; no replacement/equivalence claim. Retain13/13scalar/pending input, OSC state and cron DST/cadence outcomes after bounded material reads. Source-only zero runtime/novelty credit; original historical reasons preserved. Previous oracle (preserved verbatim): Audit3729 removes1authored/3finite by deleting whole CLI runtime pairing advisory-close suite. Accept losing post-real-close injected EIO preservation of native/script/unreadable pairing, env identity/preservation and exact close/release assertions; no actual failed-close leak or replacement coverage claimed. Two retained URL grammar/identity suites11authored16finite raw unchanged. Bounded source/owner/caller value review, zero novelty/runtime credit; other seven3724deferred closures remain. Historical receipts preserve original limits. Previous oracle (preserved verbatim): Audit3724 removes3authored/3finite checks by deleting two whole suites: TUI clear burst-size singleton and terminal-file-URL target two-case wrapper suite. Deliberate losses: derived widest burst<64byte alarm, UNC authority+line-column anchor composition, and malformed-percent null refusal. Real production algorithms execute in those tests; no mocked-output tautology, equivalent replacement, actual Claude/file-navigation delivery or universal safety-irrelevance claim. TUI58byte bound and URI examples have low marginal value as standalone suites. Actual1262/1264/1742KEEP superseded explicitly. Remaining14drivers83authored136finite raw unchanged. Bounded source-only review; ten closures deferred, four bounded keep judgments repeated with zero new semantic-frontier credit. No runtime/CI/native/remote/mobile/folder/global completion claim; historical receipts retain original scope. Previous oracle (preserved verbatim): Audit3723 removes 4 authored/4 finite registrations in two whole suites: keybinding cache freeze/token spellings and host-dependent Orca command name examples. Real losses include returned-object freeze, repeated Mod+P key, Space/PageDown/NumpadSubtract mapping, unknown/empty/prototype-token rejection, and headless Linux versus Windows-server/WSL command choice. No equivalent or replacement coverage claimed. Retain 12 authored/21 finite raw-exact registrations exercising generated scaffold validation, artifact failures, shipped editor/hook/worker/panel tests, actual generated typing compilation, independent CLI root routing and intent-name precedence. Source-only bounded audit; no runtime, CI, native, remote, mobile, folder workspace or global completion credit. Previous oracle (preserved verbatim): Audit3720 removes17authored/23finite checks: whole main catalog-date adapter2 and shared date-helper7, seven renderer nominal ranking/cap/no-date/composition cases, and one browser registration expanding to seven forced-container/DOM-child boundary cases. Deliberate real losses: community oldest-date UTC forwarding, official/undated omission, date sorting/window/invalid/future/skew/clamp and default/override cap; nominal ranking/cap and combined Featured/Newly-added outputs; real CSS459/460,719/720,1055/1056breakpoint, five-card partial-row and720px two-card first-row alarms. Browser cases really measure rendered geometry but force width/remove DOM children; no fake-pixel or tautology rationale. No replacement/equivalent coverage claimed. Retain14authored/19finite raw-exact registrations across4drivers: adversarial featured category/order/tie and installability, date order/window selection, actual PluginManager failure/escaping/duplicate-card suppression, real browser viewport/odd-count geometry/phone catalog visibility, syntax ingress/depth/include/printability and68dlong-bracket auto-close fill-in. No tests/browser/native/UI/provider/remote/mobile/folder/CI/global execution or completion credit. Previous oracle (preserved verbatim): Audit3717 removes6 authored/6finite checks in two whole thin-adapter/presentation suites. Deliberate real losses: ordinary recipe repository-URL withholding and provisioned-root credential scrubbing/forwarding; repository label lockstep suffix expansion, host-scoped map identity/collision grouping, Windows crosshost paths and WSL distro suffixes. Actual provision options, label/sort consumers and host/scrubber delegates inspected; no replacement/equivalence claim. Retain40 authored/84finite registrations raw exact in14 drivers with bounded owner/context review. Prior KEEP superseded for removed suites; no runtime/CI/provider/browser/native/mobile/remote/folder/global completion credit. Previous oracle (preserved verbatim): Audit3714 removes8 authored/39finite checks: whole CLI selector-recovery, task display-text and ANSI grammar suites plus two name joiner/blank tables. Deliberate real losses: selector flag/value/identity and mutation recovery merge/serialization; exact task suffix, transcript fallback, input immutability, cache reuse and edited blocks; independent failed-escape/resumption and OSC/DCS/BEL/ST/C1/nested/unfinished stripping outputs; meaningful-language joiner preservation and invisible/blank-name rejection. These are real bounded alarms, removed as narrow supplied-error examples, helper/token inventories and repeated internal-work fixtures. Prior2936,1195/1196,1214/1215 and1082 KEEP superseded; no replacement or equivalent coverage claimed. Keep9authored/9finite raw-exact registrations in5surviving drivers: screenshot export/failure filesystem behavior, CLI local tree query, event-local reply provenance, vault role-sensitive content and four hostile/UTF16/dangling/tag-name regressions. No native/UI/provider/remote/mobile/folder/runtime/CI/global completion credit. Previous oracle (preserved verbatim): Audit3711 retires2authored/4finite cases by deleting whole clipboard-image-temp-file signature-to-name inventory (HEIC/TIFF/unrecognised bytes) and workspace-last-active switch-on supplied visit/reason singleton, plus its now-orphan test fixture. This intentionally loses real generated-filename suffix/extensionless alarms and real newer-visit archived7day versus inactive30day filtering/older-visit identity alarms. Filesystem writing and production reason pruning really execute; no equivalent replacement or universal absence of safety relevance is claimed. The clipboard test does not inspect written bytes, native delivery or decode; the visit test supplies candidate/timestamps and does not exercise persisted visit routing or actual removal.20authored/20finite cases remain unchanged across4bounded Git/sidecar/removal drivers. No new runner/test/module evaluation or runtime result; historical notes and receipts remain historical. Previous oracle (preserved verbatim): Audit3707 removes10 authored/11finite checks: three whole renderer adapter/assembled-stage suites and two native projection cases. Deliberate losses: plugin URL/ref/default-version/local-path and unsafe credential refusal forwarding; real Task hook/store A→B→A late-save/list/count fences, owner disappearance, legacy-host convergence, query/history/eviction and same-ID host history; native child append ordered-ID/replacement and compound fallback/order/optimistic-admission/child-turn/duplicate/shrink/revision alarms. These are real bounded alarms; removal follows thin adapter, manually assembled Task pipeline and repetitive fixture value judgment, with no replacement or equivalent coverage claim. Prior1179/1182,1220/1221 and1885 KEEP superseded as applicable. Keep36 authored/38finite registrations raw exact across13 surviving drivers. No runtime/CI/provider/browser/native/mobile/remote/folder/global completion credit. Previous oracle (preserved verbatim): Audit3706 removes7authored/7potential cases from3renderer sources: whole usage-label3case and130000-distinct-day usage-overview singleton suites, plus3SSH grouping/ordinary-range examples. Retain11authored/11potential cases across6drivers in this bounded selection; no equivalent replacement or fresh runtime result. Existing bare root-unit commands admit this selection statically; prior command/receipt strings remain historical. Audit3706 intentionally retires first/second-order usage-group label collision alarms; equal50%-weekly bucket versus derived-weekly selection identity and Gemini wk label alarm;130000distinct-day aggregation no-spread-crash/max/intensity alarm; legacy absent-source SSH grouping and ordinary reverse-select/selected-target deselect range alarms. Actual label ambiguity and pathological-input crash are accepted losses. Distinct-day fixture spans~356years; no hard producer/date bound is claimed. Retained filtered-anchor/grouped-order guards do not replace removed deselection/reverse-range/legacy-group coverage. No native SSH, mounted renderer, live provider, remote/folder/mobile end-to-end or current runtime pass was obtained. Previous oracle (preserved verbatim): Audit3699 removes4 authored/4finite checks, including one whole xterm copy-policy suite and one root/group CLI help case. Deliberate losses: direct copy-chord admission for platform, selection, Kitty mode, defaultPrevented, logical/physical key and key phase; command-group disclosure and group help routing including claude-teams early return without RuntimeClient construction. These are real bounded policy/wiring alarms; no replacement or equivalent coverage claimed. Retain14 authored/19finite raw-exact registrations across6 drivers: unsafe CLI refusal, Claude model event carry and disk reconstruction/OSC-first case, attachment ownership/upload lifetime and mixed BMP file-reference/PNG-chip delivery, actual SQLite authority/admission/mutation, and Electron geometry/hit-testing. No runtime, CI, native-key delivery, external provider, mobile, remote, folder or global completion credit. Previous oracle (preserved verbatim): Audit3692 removes5 authored/5finite marginal Codex checks: unrelated login URL without notice; ordinary per-account launch resource/config materialization; no-retained-pane skip; preservation of a previously owed full scan through actual preparation and pending-marker update (no actual history scan/settlement); ordinary later-config refresh. Accept these exact branch/wiring alarms as deliberate losses without replacement. Retain32 authored/34finite raw callbacks/registrations/table bytes exact across14suites, including credential/admission refusal, grace/reset readiness, filesystem ownership, commit-dependent queue state, streaming/host trust, path canonicalization and private-state preservation. All14whole suites challenged without keeper quota; no whole deletion warranted on current concrete signals. No runtime/CI/native WSL/remote/mobile/folder/global completion credit Previous oracle (preserved verbatim): Audit3691 removes two complete runtime-home routing singleton suites (2 authored/2 finite): catalog wrapper mirror login-copy and passive transcript-lookup filesystem noncreation. Exact accepted losses are recorded in knownGaps; no replacement or equivalent coverage claimed. Audit3691: no dedicated alarm remains in the deleted sources for post-launch system login import through prepareHostCodexHomeForReadOnlyAppServer, or for repeated missing-transcript lookups leaving removed Codex account/runtime directories absent and userData entries unchanged. Ownership-marker read avoidance was never independently measured. No real catalog probe, provider, native Windows or crash was validated by those fixtures. Previous oracle (preserved verbatim): Audit3686 current Claude profile/account review removes5 authored/5 finite cases: whole structured-auth diagnostic-label suite3 and Windows-only command suite1 whose advertised cache alarm is ineffective because cache lifetime is per invocation; remove duplicate setup namespace-link refusal1 at wrapper layer. All5 exact historical KEEP are consciously superseded. Retain49 authored/50 finite unchanged, including filesystem privacy/recovery, route identity and concurrency, built worker/helper, legacy WSL alias compatibility and sign-in handoff. These are deliberate coverage losses without replacement. No runtime/CI/native WSL/macOS Keychain, remote/mobile/folder or global completion credit. Explicit accepted real losses: unknown-account host fallback and mixed-version/WSL-only structured auth diagnostic labels; Windows-only sentinel ENOENT-to-friendly-error translation plus fresh-call successful dispatch smoke; setup catch-to-refused wrapper and no-write outcome for a namespace symlink. The command case does not discriminate removal of its per-invocation noncache guard; it still supplies the error-translation alarm, which is intentionally retired. No replacement/equivalence promise. Previous oracle (preserved verbatim): Audit3680 removes eleven authored/eleven finite unit cases across four files, including entire launch setup row projection, structured legacy-model metadata, and legacy classifier suites. Accept loss of exact row partition/start selection, Codex supersession/default/unknown and Claude alias/suffix folding examples, other-agent exemption, getter/cache read budgets, same-array per-agent cache isolation, replaced-catalog metadata, and tracked-only model exclusion from structured and PTY legacy inventories. These are real narrow policy/metadata alarms intentionally retired without equivalent replacements. Retain real menu collapse/reopen in dropdown/select, AI picker cancel/accept and stale-effort filing, IME carry/gesture/frame transitions, and typed-flip versus held-dispatch fencing. No production or shared fixtures change. No dead timing entry exists for the three deleted drivers; retained timing keys stay unchanged. Static source-value review only; no project import, test runner, native/app execution or runtime validation established. Earlier receipts retain historical scope. Previous oracle (preserved verbatim): Audit3678 current-source reassessment removes20 authored/24 finite root-unit cases across7 retained test sources; all10 selected current drivers80 authored/93 finite were read, leaving60 authored/69 finite unchanged. Removed alarms are the in-memory WAL PRAGMA constant, ordinary latest-dispatch/gate-creation inventories, self-reported-failure and explicit-terminal retry policy rows, SSH/unsupported-provider output fallback labels, legacy typing no-op/retain-before-report/manual scheduling rows, exited output status and copied resume-session metadata, incomplete inventory deferral/reset cascade inventory, and nominal release/active-state/corrupt external history/stopped-abandoned outcome/generic close-exception rows. These are intentional coverage losses, not replaced alarms. Retained source includes actual SQLite rollback/custody, mutable transcript/deletion and saved-copy compatibility, cursor mutation, clear lineage, auto-release timing/restart/admission and concurrent recovery seams. Historical KEEP decisions are consciously superseded where stated in decisions.json. Source-only evidence; no runtime, CI, native, provider, remote, mobile/folder or global completion credit. Previous oracle (preserved verbatim): Audit3672 renewed by3676 removes four authored/four finite cases from federation-output.test.ts: nominal show/read routing and terminal-fallback projection; initial archive-table SELECT failure returning retained/no-close; simulated old-peer read/fleet/refusal and method inventory; and absent archive-release capability refusing release. These actual compatibility/guard alarms are intentionally lost without equivalent replacement; the dropped-table case never reaches capture or commit. Current selected frontier9 becomes5: retain actual temporary transcript parsing/path omission, current no-transcript release/unavailable-output/restart/replay regression, and three home deadline/stop nonmutation cases. Prior held-capture case was already removed upstream and receives no new removal credit; prior redacted snapshot archive behavior was rewritten upstream and is not claimed retained here. The surviving driver timing entry stays. Static review/private composition only; no actual peer/network/native/platform or fresh runtime validation. Previous oracle (preserved verbatim): Audit3671 removes14 authored/32 finite root-unit cases, including the whole WSL move-handler refusal suite, WSL preload object-presence suite and internal gate spelling truth table. Also retire the weak withheld-command non-array shape assertion, static serve-only Add/capability/mock-remove example, grammar scope equality and basic configuration/payload schema roundtrips. Genuine wrong-window/malformed-request/gate-before-work, exact gate spellings/platform/argv precedence, static serve-only routing, declaration mismatch and empty grammar/pair admission alarms are consciously lost without replacement; prior KEEP decisions are reconsidered. Seven unchanged authored/finite root-unit cases retain real image/provider/line budgets, live policy transition/capability broadcast, grammar resource/reference traversal and strict-versus-tolerant literal salvage. Source-value evidence only; no runner/compiler/build/app/native/provider/remote/mobile/folder validation or historical fault claim. Previous oracle (preserved verbatim): Audit3663 renews approved3644/3645/3648/amended3651 at privatec1ef: remove10authored/26finite across7changedtestpaths,4whole drivers; retain23authored/24finite including actualcmdkStrictMode defaultcursor race. Retire version1.5.0/1.5.1→shrinksImages capability threshold and launch-to-prompt wiring alarm. Surviving prompt tests explicitly supply capability and do not replace wiring coverage. Retire resolved-before-personOnly precedence; hook-gone/live-dialog guidance; stale-incarnation versus live-looking dialog classification; delayed/clipped warning extraction and wait-for-paint wiring; 3row setting/personOnly approve/deny/disclaimer suggestion composition;13row setting/reason/person/coordinator admission, close/mail attribution, terminal delivery/refusal/preanswered/personOnly/dropped-allow handler propagation alarms. Real state/access/SQLite effects occur; these genuine losses are accepted, not mocked-away. Retire full command extraction from serialized JSON in worker receipt and nontruncation alarm; no rendering, actual worker approval or native shell proof. Retire2row extra-source first/last order and controlled default cursor projection, plus generic open-palette livefolder add/remove render alarm. Explicitly supersede rawexact297KEEP refresh. Keep actualcmdk/StrictMode default cursor race driver; no default-suite loss claim. No equivalent replacement asserted. Retained queue/commit/retryownership/filebudget, terminalfreshness/provenance/competing-answer, RPC DB-effect, qualifiedfolder/runtimehandoff and lingering-reopen cases have distinct scope. Audit3675 preserves the upstream revised unreported-approval close regression, its escalation helper and adapted survivors. Source-only static renewal; no runner/compiler/app/native/remote/CI claim. Upstream41390host-owned approvalwatch/report lifetime reviewed separately; no new lifetime test removed. Preserve all earlier metadata/evidence. Audit3634: Remove five authored/five finite cases, including the complete structured chat terminal-refusal, terminal-plus-agent worker-start validation, and canonical Git common-directory parser suites. Also remove the gh free-text -R argument projection case. Consciously supersede prior KEEP decisions and accept chat-versus-stale redirect classification, real RPC refusal-before-SQLite-Dispatch, old-Git echoed-option relative-path parsing, WSL execution-space resolution, and free-text preservation/bare-repo qualification alarms. These are genuine narrow alarms, intentionally retired without equivalent replacements. Retain real Git stdin/EOF delivery, bound-account host admission, naming environment/account precedence, upload iterator cancellation and remote path confinement. Shared fixtures and production code remain. Remove only the dead canonical-repo-key timing entry. Static source-value evidence only; all prior evidence retains historical scope. Audit3636: Remove the entire maintenance opportunity internal-count driver (one authored/two finite cases), the mocked remote worker start-card argument case (one/one), and the follow-up heading mapping table (one/two). Root-unit discovery loses three authored/five finite cases. Independently remove four Python native screenshot methods/five statically enumerated subTest scenarios: grim argv/stub payload, failure-code mapping, X11 mocked capture payload, and capability flags. The Python lane is verify:computer-native and is not root Vitest. Accept loss of exact native command/projection and exception/capability alarms, ready-only card publication arguments/agent forwarding, and serialized follow-up heading mapping; no equivalent replacement is claimed. Retain actual ownership/mail/queue/reopen transitions, remote lost-response fencing and first-result settlement, filesystem/maintenance admission and successor progress, wrong-region screenshot refusal and Sway geometry. The whole-deleted new driver has no timing key; this component requires no timing cleanup. No production changes. Static source-value review only; no project import, runner, app, native desktop or runtime validation established. All prior evidence retains historical scope. Audit3629 removes two singleton parser suites: WSL Claude plugin metadata out-of-range index rejection and Git checkout unlink-warning path extraction. Their real range-refusal and quoted-path extraction alarms are intentionally lost without replacement; no WSL execution, checkout recovery or equivalent remaining coverage is claimed. Audit3630 removes the sole orphan automation availability test (1 authored/1 finite). Its real policy kind, orphan precondition, delete/toggle enablement and run/edit refusal alarms are intentionally lost. The test did not dispatch an action, enforce a server generation fence or observe a remote mutation. No equivalent replacement, actual renderer/transport execution or new platform/provider evidence is claimed. Previous account (preserved verbatim): Audit3628: remove the entire one-authored/one-finite RepositoryRemoveProjectSection happy-dom suite. Accept losing the local zero-to-one-terminal stale-count revalidation alarm: first confirmation defers the removal callback and second confirmation invokes it after the count snapshot updates. The test never asserts updated warning text/count, actual terminal creation or removal/PTY teardown, host/scope routing, cancellation or folder/mobile behavior. No equivalent replacement or end-to-end warning-before-teardown proof asserted. Static evidence only; historical receipts retain original scope. Audit3624: Remove one authored/five finite positive Gemini identity table from the Claude/Gemini title collision driver. The real normalization, legacy label and explicit title evidence owners execute, so ordinary Gemini marker/name/wrapper recognition and normalized-label composition alarms are consciously retired without equivalent replacement; these five supplied title-to-literal identity examples have low marginal value. Preserve the six-row Claude task-text collision oracle, whose unrelated CLI mentions must not rebrand or destructively normalize titles. The other audited drivers preserve real permission-mode session transitions, prompt secret/fence/bounds defenses, JSON-to-Ask option/preview preservation, and optional GitLab failure summary/trace composition. Root-unit discovery loses one authored/five finite cases; no whole driver or timing key is removed. No actual terminal stream, UI routing, application/native or runtime execution established; all prior evidence retains historical scope. Audit3618: Remove three authored/three finite browser reload cases, including the complete renderer reload-actions suite. Agent bridge fake did-fail-load plus permanently supplied manager error projects description/code into a rejection. Renderer seeded empty metadata projects a saved URL into plain webview src; its earlier not-ready case projects a live-id/throwing fake reload into absence of a loading patch. Real queue/wait/error/cache/classifier/hook code executes, but these narrow supplied-state and exception-to-callback wirings have low marginal value; no rerender, lifecycle, actual cache generation/retirement or guest commit is asserted. Explicitly supersede audit1822 not-ready KEEP and preliminary3617 cross-module retain opinion, accepting offline-reload failure reporting, empty guest to saved URL routing, native-reload bypass and premature-loading/stranded-state alarms without replacement. Retain distinct main cancellation queue progression and absent queued side-effect dispatch. Root-unit discovery loses three/three. No Electron guest, network failure, restored navigation/commit, app/native focus or runtime execution established; earlier evidence retains its historical scope. Audit3614: Remove thirty-one authored/thirty-nine finite potential cases across CLI format and argument drivers, including three whole suites: search-result/status sanitation sites, Linear issue/list/warning sanitation sites, and quote-stripped JSON diagnostic secret non-echo. Those real formatter/guard transformations execute on supplied strings; intentionally retire their field-specific CSI/OSC/C1/newline/bell and diagnostic secrecy alarms as low-value caller/output inventories, without replacement. Also retire twenty-one search registrations/twenty-four finite cases covering minimal positional request/default omission, exhaustive all-flags request projection, nominal named query/index routes, repeated syntax/agent examples, enum/agent/path-count/timestamp/numeric/cursor admission examples, unknown/browser flag examples and postcommand last-wins projections; retire one parser sentinel-only case. Keep actual ambiguity, conflicting index request, precommand/crosscommand scoping, variadic reference parsing and missing-repeatable-value controls, without claiming equivalent coverage. Root-unit discovery loses all twenty-nine/thirty-seven. No CLI/RPC/terminal/PowerShell/host/schema/runtime execution is established by this source-only audit; earlier evidence retains its historical scope. Audit3613: remove six authored/six finite callbacks, including whole reviewer-display oversize-input and explorer-root record-filter suites, plus plugin family-emoji/invisible-only-name and pool legacy-name/urgent-countdown samples. Accept losing oversized-input empty-result/no-split, malformed-record/prototype-sensitive-key/nonstring filtering, exact ZWJ family preservation, invisible-only name refusal, no-group old-host full-name preservation, and80/79/null-reset countdown composition alarms. No equivalent replacement asserted. Retained strict/runtime sanitization, SVG parser, mobile focus recovery and collision/tie cases have different scopes. Static evidence only; historical receipts retain original scope. Audit3609: Remove the complete pnpm CLI invocation literal-selection suite (eleven authored/nineteen finite potential cases), with no replacement claimed. Root-unit discovery loses JavaScript-versus-native command selection, npm/npx executable rejection, Windows cmd/bat casing and shell selection, non-Windows cmd behavior, native PNPM_HOME flat/bin preference, explicit-path priority, relative-home rejection, missing-native fallback and non-Windows home-probe refusal alarms. The suite called the real resolver with independently expected objects, but exercised no pnpm/node/cmd process, installed native executable or real filesystem probe. Earlier KEEP decisions are consciously superseded by accepting these narrow branch and probe-inventory alarms as low value. Real symlink entry, Git signing isolation, Bun filesystem/Node child normalization and compiler scheduling/continuation tests remain distinct tests, not equivalent coverage. No runner, compiler, app, platform or remote execution was performed in this source-only audit. Earlier evidence retains its historical scope. Audit3608: remove five authored/five finite callbacks, including whole owner-slug and remote favicon URL suites and two repository-label projections. Lose five owner acceptance samples, eleven negative owner samples plus nonstring refusal, six host-local icon refusal samples, legacy-SSH same-path label-map cardinality, and explicit runtime ownership over stale legacy metadata at label level. These are accepted narrow grammar/presentation alarms with no equivalent replacement claimed. Retained binary parser, React recovery and label grouping/platform cases do not replace these losses. Static evidence only; historical receipts retain their original scope. Audit3606 adopts the enhanced3604/3605 icon cuts: nine authored/nine finite cases removed, including the whole tray-attention-icon suite. Retires the no-encoder oversized-upload null sample, missing-ID/request-order sample, encoder-null PNG-prefix fallback, SVG/404 rejection samples, transparent amber-dot placement and half-alpha white-tint sample, exact small fetched-byte passthrough, host-qualified image-key inventory and constant-encoder large-upload projection. These specific admission, formatting and bitmap alarms are intentionally lost without equivalent replacements. Retained queue/cache, bounded fetch and Dock lifecycle checks do not establish actual raster decoding, native image conversion or rendered appearance. Historical receipts below are preserved evidence for earlier test sets, not fresh validation of this reduced selection. Audit3601 scope: remove the whole custom-sound happy-path IPC suite and one custom-label/multiline notification formatting example (2 authored/2 finite). Intentionally lose configured .ogg selection, exact byte/MIME success wiring, successful dispatch for the formatting fixture, custom-label whitespace/title normalization and assistant-body whitespace/180-character-cap alarms. Retain prompt-exclusion, persisted qualified dismissal/restart, theme ownership/restore and Ghostty precedence/collision cases; none replaces the retired sound/formatting alarms. No actual playback, native delivery, phone/network, cross-platform or new runtime evidence is claimed; historical execution keeps its original scope. Audit3598: Remove seven authored/nine finite literal-table potential test registrations across workflow routing, Claude cold-start and real-zsh preexec drivers. Root-unit discovery loses six authored/six finite: three test-local workflow parser fixtures, the five-positive/three-negative explicit command-paint route inventory, a boot-banner-before-composer sample and an already-painted bare-title positive sample. The separately selected shell_contracts live-shell driver loses one authored/three finite raw-capture paint-only cases across three hook configurations; its real-wrapper launch-order, four rechunkings (twelve finite) and runtime-wait replay remain, without claiming equivalent replacement. Intentionally lose those parser, exact routing-list, banner, post-paint subscription and native-read-boundary paint alarms. Retained workflow/UNIT_EXCLUDE/classifier cross-source routing checks and readiness-race-to-writer timing are distinct bounded alarms. No runner, real shell, PTY, app, native focus, remote delivery, cross-platform execution or full-feature correctness is established by this source-only audit. Earlier evidence retains its historical scope. Audit3597 scope: remove two renderer-hang-capture examples (2 authored/2 finite): an invalid repeated-token oversized reducer fixture and a shorter unanswered-request fixture. Intentionally lose the direct truncated flag/sanitized frame fixture and request-pending status/zero-sample alarms. Retain window-death/stale-result exclusion, generation reconciliation, and baseline-publication cancellation lifecycles; they are not equivalent bound, redaction or pending-status replacements. Historical execution retains its original source scope; no new runtime evidence is claimed. Audit3591: Retire the whole one-case background journal-producer attribution suite and the fabricated malformed-details-block case (two authored/two finite cases). Intentionally lose the fixed own-task versus output/foreign-task attribution examples across flat/message row shapes, missing-root classification, and direct unbalanced/detailsish fabricated-block rejection alarms. Retained parser sibling/depth and editor navigation tests do not replace these alarms. No equivalent replacement or fresh runtime, transport, persistence, native focus or rendered UI validation is claimed. Earlier dated text and evidence retain their historical scopes. Audit3592: Retire the whole three-case shared agent smart-key resolver suite, explicitly superseding its Audit3238/3237 keep decisions. Intentionally lose literal permission-versus-question classification, longest-question digit selection, Codex async-question opener/digit/Enter/skip mapping, and unsupported-agent/state/prompt refusal examples. These were real parser/selection and literal-byte alarms; they did not exercise terminal delivery or timing. No equivalent replacement or fresh runtime, native TUI, mobile, remote or performance validation is claimed. Earlier dated text and evidence retain their historical scopes. Audit3587/3588: Retire six authored/fourteen finite cases, including the whole WSL stopped-notice and connecting-status selector suites. Intentionally lose direct WSL retry connection field/target/ready-epoch/null-guard examples, connecting/reconnecting distro and absent-state selector samples, and stopped/connecting notice text/button/data-attribute examples. Retained host-ready retry and content-loader/reload lifecycles do not replace these alarms. No equivalent replacement or fresh runtime, native WSL, remote, rendered UI or performance validation is claimed. Earlier dated text and evidence retain their historical scopes. Audit3580: Retire the whole one-case runtime host environment prototype/subclass suite. Intentionally lose the exact configured lower-case Windows Claude home to account-identity normalization and host-account override precedence alarm previously retained by Audit3129. No equivalent replacement or fresh runtime validation is claimed. Earlier dated keep statements below describe their historical source scope; the current suite is removed. Audit3563 scope: retire the whole Kiro OSC/hook identity suite and the OpenCode2 identity-only case; reduce Codex cached startup child-retirement and missing-session-ID tables to one case each (2 authored/4 finite removals). Intentionally lose Kiro alias/session continuity, OpenCode2 completed OSC identity continuity, cached replacement without relay-generation restart, and missing-previous-ID context-preservation alarms. Remaining provider, remote compatibility, persistence and cross-session pollution cases are not equivalent replacements. Also remove the private Codex roster-size assertion while retaining public child-absence checks. Historical evidence retains its original source scope; no new execution or transferred pass validates these reductions. Audit3553/3559 current scope: delete worktrees-delete-pty-teardown.test.ts and worktrees-issue-command-overrides.test.ts entirely and remove three cases from worktrees-orphan-directory-cleanup.test.ts (6 authored/6 finite removals). Intentionally retire typed unserved-SSH create/delete admission, exact-name collision/error-token, proven-orphan no-force confirmation, standalone .git-directory refusal, and SSH-owned local-path preservation alarms. Retain only actual authorized orphan deletion and no-marker notes-file preservation; they are not equivalent replacements. The no-marker fixture resolves the default getRepos owner, so it does not prove temporary owner-repo binding. Git/Store/PTY/notifications are mocked; no physical process stop, durable metadata, real SSH delivery or native UI proof is claimed. Unchanged historical oracle, coverage, evidenceRuns and escaped receipts retain their original scopes only; no fresh execution or transferred pass validates the reduced sources. Audit3492 composes ROOT-approved75(AUTHOR3475/PEER3476 and AUTHOR3485/PEER3481, including five-field clarification and zero-credit selector3483) plus123(AUTHOR3486/PEER3487 reconciled FINAL3491, including peer case10:3 and9:0 wording clarifications). It intentionally removes198 authored registrations/232 finite literal-table potential registrations across70 changed JS/TS test sources, including45 whole suites;87 authored/90 finite potential registrations remain across95 reviewed JS/TS bodies. One mobile native-suspension manual recipe and the now-unreferenced GitLab mock fixture helper are separately removed with zero registration credit. Static literal table potential is not execution. No equivalent replacement, fresh runtime result or merge credit is claimed. Earlier135 complete dated receipts, all raw gaps and full prior98/161/history notes retain their exact scopes and bytes. The additional123 retirement accepts loss of mocked GitLab request/error/identity/classification inventories; basic Linear migration and metadata discovery; simulated OpenCode key failed-save retention/retry/log redaction; analytics identity-flush smoke that did not prove ordering; AppImage static entry guards and empty-staging cleanup; GPU/process/minidump breadcrumb/annotation shapes and weak redaction oracles; namespace/status/foreign-launcher ownership guards and persistence roundtrips; profile transfer field projections; worker hook/screen/incarnation/result admission/classification guards; and source-coupled CLI transaction fixtures. Privileged publication failure injection was a false-positive: its mkdir regex missed -m 700 and outer rejection accepted an inner assertion before any shell ran. The identity-flush case awaited identity after flush and could pass despite early flush. Retained actual negative-token cache recovery, SQL filter-before-LIMIT open approval, unreadable-root FTS preservation/degradation, latest-connect-wins persistence, worker stop-debt settlement, unmodified same-inode foreign-content transaction, explicit incomplete-pagination error, FTS own-message snippet association, filter-before-route result and bounded-search truncation honesty are distinct bounded outcomes, not replacements for retired alarms. Case9:0 checks both roots before chmod but only mounted-session/degraded-root after chmod. Entire extraction-root suite is removed; no retained extraction cleanup is claimed. Removing the manual iOS foreground-stall shell script loses its unique real native-suspension recipe; timer tests do not replace it. First-match PIDs, indefinite waiting, broad success matching and absent trap cleanup made that diagnostic brittle and able to leave a desktop stopped. The current Windows operational driver remains byte-exact, preserving already-merged removal of orcad-convert and orcad-cli-convert selectors and the retained cmd/powershell/managed CLI lanes. The package skill-sharing release selector loses only the exact already-retired skills-suite token; no extra test credit. Included approved75 retirement account follows (historical proposal labels identify provenance; final198 counts above control): Audit3488 composes ROOT-approved source49(AUTHOR3485/PEER3481, including its immutable five-field clarification) and source26(AUTHOR3475/PEER3476): intentionally removes75 authored registrations/87 finite potential registrations across35 changed sources, including25 whole suites;35 authored/36 finite potential registrations remain in the combined reviewed scopes. Literal table potential counts are not executions. This source-only reduction has no equivalent replacement, fresh runtime result or merge credit. Root unit discovery deliberately loses entire message-row filtering/chunk reconstruction, discussion-pagination rejection passthrough, Linear bearer/stack redaction, new-profile telemetry/default/existing-JSON no-op, WSL user-trigger routing, terminal-delivery refusal, native-chat worker-approval UI, followup-paste routing, live-surface tombstone refusal, activity-bar hydration, fabricated approval-caller policy, child-PATH transformation and branch-review URL/identity suites. It also loses cache roundtrip/mode/fingerprint/fallback/no-op samples; GPU field-shape privacy examples; older auth-probe failure retention; orphan SQLite-sidecar/future-schema admission; usage tie/duplicate/composite-key examples; allocation-name sanitizer/unknown-prefix examples; real worker-and-backup preflight wrapper smoke; and JSONL descriptor-loop truncation. The discussion page contained id-only discussions without notes, so its rejection did not prove a nonempty notes-prefix oracle. The preflight did launch actual worker/backup entrypoints with production internal self-validation; removing its revision/version wrapper deliberately retires that real-entry smoke alarm. The skipped-prefix JSONL keeper rewrites/grows after collecting the suffix and before final validation, not concurrently during parsing. Retained queue rejection/recovery and held/drain mechanisms, recorder nonsettling-provider deadline, corrupt authoritative-DB refusal, legacy cache split migration, merge-added-row indexing, external-frame redaction, and pinned JSONL read/verification/mutation checks are bounded concrete oracles, not equivalent replacements for retired alarms. The full cloud relay cohort/ceiling/control suite is separately removed from the relay package runner, outside root unit discovery; no cloud runtime result is claimed. The Python computer-use benchmark remains unchanged tooling with zero authored/removal credit; no native benchmark trial ran. The package skill-sharing release selector drops only the exact already-deleted skills-suite token, with zero additional removal credit. Prior dated receipts, raw gaps, and complete earlier161/98/history notes remain exactly at their original scopes; no changed-source historical receipt becomes fresh reduced-suite evidence. Included approved26 alarm account: Broad root-unit discovery loses entire ref-label string, hostile/malformed CSV-link rendering, Codex filename-discovery, mocked paged-preview postscan mutation, usage path-containment, real symlink-ancestor, Codex skip RPC, local/remote inference routing, width-preference, and synthetic workspace-document input suites. It also loses the hand-assembled sorted CSV edit example, connect-time JPEG seed and invalid AVCC guard samples, and eight-record/64KiB detector boundary cases. The symlink suite exercised actual kernel traversal; its lost ancestor alarm could omit supplemental local editor watches and leave content stale, not bypass authorization. Retained linked stream cancellation, preview-only save fence, failed-flush dirty-draft preservation, clipboard byte/edit preservation, fragmented AVCC parsing and independent quoted-CSV interpretation checks do not replace these deliberately retired alarms. The stream fixture uses an in-memory source and does not establish actual fd cleanup; editor save endpoints are synthetic, browser events are synthetic, and no native focus, actual remote delivery, real disk write, cross-platform execution or interoperability is claimed. Earlier complete dated receipts, raw known gaps and previous notes are historical evidence at their original source/selector scope, not fresh evidence for this reduced suite. Audit3438 composes ROOT-adopted3434/independent3436: intentionally removes60 authored/62 potential expanded cases across16 sources, deleting9 whole suites. Eight authored/eight potential cases remain; delete the102line unused ACP fixture and57line unused teardown helper with zero test credit. No equivalent replacement or fresh execution is claimed. Broad unit discovery loses ACP model-catalog fixtures, resume-record projections, dashboard mock payload/state cases, mobile folder/launch/session examples and dictionary pipeline rows. Selected E2E removals also retire auto-conversion and golden-core journeys and one Windows CLI conversion registration. Retain ACP reply text across a resumed subagent, both VAD checks, focused tab send ownership, async focus ownership in happy-dom, the question-skip journey, the original managed Windows CLI lifecycle journey and dictionary substitution. These checks do not replace the removed alarms. Audit3470 composes ROOT-approved AUTHOR3466/PEER3467 source proposal: intentionally removes38 authored registrations/59 finite potential expansions, including8 whole registering suites, retaining13 authored registrations/18 finite potential expansions. The sole dead shell-recipe caller cleanup has zero additional test credit. No equivalent replacement, fresh runtime or merge credit is claimed. Broad root-unit discovery loses process-import boundary, Korean/Japanese locale policy, worker-reset, mobile agent-history/queued-message and median-summary suites, plus packaged mobile-manifest, worker-pool fixture, HTML preview, mobile shell and terminal samples. The environment-provider contract and its sole shell-recipe caller are deleted. Separate cross-version-wire discovery loses the large byte-budget fresh-snapshot/replay sample while retaining independent live same-revision note publication; the retained terminal stale-refresh and dirty HTML draft persistence checks do not replace removed alarms. The source4 unused start/stop fixture hooks are removed; its retained nested failed-import test remains byte-exact with its own lifecycle. Unchanged SVG preview and Git-resolution registrations stay intact. Root balanced CI excludes the cross-version directory, which has a separate job; unbalanced root discovery can include its parent. No native app/device, actual remote, released-pair interoperability or cross-platform execution result is claimed. Audit3468 accepted source proposal AUTHOR3462/PEER3463, composed privately by audit3469: removes62 authored registrations/95 finite potential expansions, including5 whole suites, retaining25 authored registrations/29 finite potential expansions. ROOT approved source value; no equivalent replacement, fresh runtime or merge credit is claimed. Broad root-unit discovery loses the profile-state worker smoke, worker-agent views and three search discovery suites, plus samples from node-server qualification, skill-bundle generation, CLI hooks/profile/recovery/offline admission, permission-hook holds and search indexing. The separate Cloud relay runner loses one relay blackbox sample; unchanged mobile native-chat and dependent-transcript drivers remain. Retained source callback/table/ancestor/fixture bytes bind to the sealed candidate. No physical-device, mixed-version, remote, cross-platform or app execution result is claimed. Audit3460 final-v2 composes accepted AUTHOR3454/PEER3455 on actual post263 main: intentionally removes99 authored/106 potential expanded cases across16 selected drivers, including7 whole suites, retaining24 authored/26 potential cases. No equivalent replacement or fresh runtime is claimed. Broad root-unit discovery loses whole cross-client workspace-sync, terminal-preview, picker-skill-hint and close-routing suites plus reduced worker-stop, remote-owned-record, scanner, mobile-bundle and daemon-health samples. Separate E2E discovery also loses the paired mobile/desktop mirror journey and two unit drivers. Retained callback/table/outer-loop/guard bytes are exact; retained checks do not replace the removed alarms. No app, native device, mixed-version, remote or cross-platform execution result is claimed. Audit3456 composes ROOT-adopted3449/independent3450: intentionally removes62 authored/82 potential expanded cases from16 selected drivers, including7 whole suites, while13 authored/13 potential cases remain. Delete the unused48line legacy workspace-session JSON fixture with zero test credit. These are source-only reductions without equivalent replacement or fresh runtime claims. Broad unit discovery intentionally loses whole trust-dialog observer, background-turn notifications, redirected session refusal, typed-agent identity, chat-tab lifetime-cost, model-manager and mobile diff-review controller suites, plus individual persistence, synthetic composition, pairing, manifest and subprocess samples. Retain deferred snapshot dirty-domain persistence, two direct editor ownership cases, stream counter-domain distinction, two persisted pairing identity cases, parser entrypoint asymmetry, dictation retry and process-group timeout; paired restart and packaged old-binary/corrupt-profile journeys remain in their E2E driver scope. Retained checks do not replace removed alarms. No fresh execution, native IME/microphone, real authentication, mixed-version/platform or performance result is claimed. Audit3451 composes ROOT-adopted3444/independent3445: intentionally removes101 authored registrations across16 reviewed sources, deleting7 whole suites and reducing8; one reviewed source is unchanged. Fresh main has123 authored registrations before and22 after because an upstream direct-child shell regression remains verbatim with zero removal credit. Registered removals are100+7*S and explicit-active removals99+7*S, where S is the unprobed count0..3 of admitted bash/zsh/fish shells. No equivalent replacement or fresh execution is claimed. Broad unit discovery loses extra stream lifecycle/forwarding examples, unreadable-store/cache projections, orchestration presentation/benchmark cases, remote-owned routing matrices, mobile legacy navigation and model-catalog listing/cache examples. Whole suites retire renderer client-event projections, manually assembled structured-session reader ownership, mobile prompt presentation, renderer AI-vault resume commands, mobile Jira URL lookup, composer retention and mobile folder source-repository queries. Retained checks preserve original stream/store/orchestration/routing/navigation/catalog cases and shell behavior, including the upstream direct-child case. No real provider, native desktop or mobile acceptance is established by this reduction. Audit3446 composes ROOT-adopted3441/independent3442: intentionally removes100 authored registrations/119 potential expanded cases (118 conditional-active before platform gates) across16 sources, retaining11 authored/13 expanded cases and deleting6 whole suites. Two parent registrar import/call cleanups and the unused68line CLI recording fixture carry zero test credit. No equivalent replacement or fresh execution is claimed. Broad unit and mobile discovery loses interrupt/wake registrars, task storage/session-close/account snapshot hooks, permission tables, copy/preference/model-discovery/composer examples, launch placement examples, VM projections and extra mobile-history scenarios. Retained checks cover abandoned versus dispatched fork uncertainty; /fast dispatch supersession; discovery lock release after exit; stale-send draft preservation; OSC status lifetime; future-version file preservation; launch cancellation before/during dispatch on both layout owners; mobile resume addressability before hooks; and recipe snapshot cleanup after plugin removal. The paired browser-link Electron source is unchanged. Terminal launch seams, mobile roles-only history and injected provider results do not establish native terminal destruction, transcript text fidelity or real remote provider cleanup. Audit3437 composes ROOT-adopted3431/independent3432: intentionally removes127 authored/174 potential expanded cases across12 sources, deleting7 whole suites and one267line unused helper without test credit. Retain8 authored/13 potential cases. No equivalent replacement or fresh execution is claimed. Broad unit discovery loses reduced or deleted relay, coordinator mail, recovery watchdog, automation observer, launch picker, folder PTY, profile restart, web migration, retirement, pointer delivery, agent-row and run-bound mailbox examples. Retained checks cover relay hello/payload and SIGTERM drain, coordinator pending-check and clear-to-Run continuity, profile persistence, the full six-row web merge table and real run-bound delivery waiter. These do not replace removed alarms. Audit3429 composes root-adopted3426/independent3427: intentionally removes168 authored/205 potential expanded cases across16 semantic sources, deleting11 whole suites and one304line unused assertion helper. Five authored/five potential cases remain; the duplicate500k graph row is dropped while its50k row and callback remain. No equivalent replacement or fresh execution is claimed. Broad unit discovery loses the adopted migration/recovery/federation/rich-draft/paste/automation/mobile/catalog examples. Keep server-edit preservation during migration, native supervised cancellation holding the agent home until physical stop, pagehide lost-text preservation, graph old-result WRAPPER WeakRef collection with50k rows, and mobile React render isolation. The WeakRef does not prove all commit objects are collectible or a memory budget. Audit3425 composes root-adopted3420/independent3421: intentionally removes83 authored/112 potential expanded registrations across13 semantic sources, deleting7 whole conventional suites and1 registering helper;7 authored/10 potential expanded cases remain. No equivalent replacement or fresh execution is claimed. Broad unit discovery loses the adopted mock orchestration, refusal, restart and storage examples. Retain unchanged two-phase real-WSL deployment/survival, the reduced idle-release holder proof without restart/first-output measurement, real worker stop/release cleanup barrier rows, physical Git branch-preservation rows, and SSH disconnected-close proof. Other SSH and CLI variants and WSL telemetry/warmup churn are intentionally removed. Audit3417 composes root-adopted3415v2/independent3416v2: intentionally removes117authored/173potential expanded registrations from12semantic sources, deleting4whole conventional suites and3registration modules and retaining4authored/5expanded cases, without equivalent replacement or fresh execution. Broad root-unit discovery loses naming/title/queued-host fixtures, main-window focus-shortcut and attach-services mock orchestration, Git Bash console-capacity fake process inventories, most real-Git preparation/locking variants and Claude/Codex catch-up examples. Keep lifetime rejected-writer followed by late termination proof and autonomous real-checkout cleanup; two-row real-Git rollback after a real move preserving a replacement/admin marker or revoked permission; a live translator write during a held transcript read fencing stale Claude history append; and Codex expected-item revision rejection before a historical writer shim. Codex driver registers retained bounds exactly once with original inputs; bounds does not prove modern writer persistence. Accepted changed-lock preflight sentinel and omitted-parent routing losses are not replaced. Audit3413 composes root-adopted3405/independent3406 and3409/independent3410: intentionally removes337 authored registrations/363potential expanded cases from13sources, retaining31authored/32potential cases and deleting one whole clipboard suite, without equivalent replacement or fresh execution. Broad root-unit discovery loses35WSL examples,22STT examples,22shared-server-banner examples,18clipboard-handler examples (whole suite deleted),14VM lifecycle examples and16commit-message cancellation examples. Retain4WSL and7STT mocked connector/worker cases,1rendered stale-banner refusal,2VM guard/failed-compensation cases and1late-stream ownership cancellation case; real WSL/microphone/remote-provider proof is not established. Separately discovered e2e-unit drivers lose13cross-version-wire local cases and15mobile active-publication cases, keeping same-process disk-reopen/new-host cursor content/epoch/sequence outcomes and a host/renderer-snapshot selection and inventory revision race respectively. Imported released stop-note scenarios remain unchanged and receive no duplicate credit. Cloud suites are outside root UNIT_INCLUDE. Audit3403 composes root-adopted3393/3394,3400/3401 and3398/3399: intentionally retires167 authored registrations/196 potential expanded cases across93 whole suites without equivalent replacement or fresh execution. Retained65 registrations/79 potential cases include one conditional missing-input failure sentinel; potential counts are not executions. Historical notes and complete dated receipts retain their exact original scopes. The retained runtime registration driver loses three complete imported fragments: changed-working-label title facts and suppressed-frame tracked snapshots; refusing SSH GitLab MR-base lookup before local Git/glab calls; and missing folder-workspace path creation/update refusal before spawn/store mutation. These alarms are intentionally lost. Other imported fragments and separately rooted dated receipts are unchanged; they are not equivalent replacement coverage. The broad root-unit command loses the UNIT_INCLUDE src/ subset of retired examples; mobile is outside UNIT_INCLUDE. Other lost alarms are recorded by the adopted per-case source reviews. Audit3390 composes root-adopted3382/independent3383 and3386/independent3387 and3388/independent3389: intentionally retires216 authored registrations/230 expanded cases in42 whole authored suites plus5 zero-case registration drivers, without equivalent replacement. Lost local alarms include fake PTY identity/routing/startup/replay/mode/title/mouse/IME/scroll matrices, broad startup identity and file-open wiring, mock mailbox title recovery, mobile row parity and whole-v-selective save parity. Retained24 registrations/26 expanded cases in22 suites preserve actual xterm Windows buffer/wrap/scroll, typed TOML scalar, real Promise cancellation/settlement, HTTP Codex scanner/projector semantics, durable recovery admission/newer-schema bytes, federation completion/ACK/SQLite atomicity and failed stale-run-write versus imported durable history. Additional retained clock-domain scheduling, durable freeze/ACK/checkpoint ordering, ABA dirty intent, SQL atomicity, folder-domain retier/last-note deletion, scrollback durable no-sync staging, PanelBridge subscriber lifetime and reserved-send publication preserve narrower concrete behaviors. Current finite owner drift assessed in bounded defining bodies; retained callback bytes unchanged. Historical notes and complete dated receipts keep their original exact scopes. No new execution, equivalent replacement, native focus/device/pixel, live remote or global mixed-version guarantee is claimed. Audit3381 composes root-adopted3376/independent3377 and3379/independent3380: intentionally retires436 authored registrations/670 expanded cases, including79 whole suites and12877 test lines, without equivalent replacement. Lost alarms include scheduling, account/host/status/filter/format inventories, microphone/image cleanup, title/bell/capability lifecycle routing, access/impersonation/outcome matrices, paste/input resend/ledger/retention, stale completions/reload containment, trust-read failure and popup OAuth/security/geometry vectors. Retained30 registrations/34expanded cases in22 suites preserve narrower SQLite TEMP/TZ/WAL, HTTP transcript root resume, mobile original-index Choose/Submit, child environment/Git lock expiry, stale ACK/PTY lifetime/peer fairness/durable replay/output ordering, actual DOM paste/editor focus, DEC2026 conservation, filesystem rollback, owned buffer lifetime, actual OSC parser/tracker handback, POSIX Python UTF8/fallback, durable trust concurrency/version, OpenSSH verdicts and hidden Chromium POST/route lifecycle. Mocked boundaries limit claims. Current bounded defining-owner reads preserve the retained oracles; captured identities are not full transitive semantic review. Both component blind pins authenticated before exchange; final reconciliation and explicit postpin3380reason correction supplement control, without retroactive blind claims. Root unit command excludes mobile and separately admitted Electron probes; use existing respective runners. No fresh execution, native focus/device/pixel UI, live SSH/remote, equivalent replacement or broad mixed-version/cross-platform validation is claimed. Prior dated receipts retain exact original scopes. Audit3375 composes root-adopted3370/independent3371 and3373/independent3374: intentionally retires79 authored registrations/84 expanded cases, including39 whole suites, without equivalent replacement. Lost alarms include federation field/parser inventories; Claude rejected-key precedence, credential clone redaction, managed-versus-user hook preservation and CLI defaults; setting/status/activity projections, mocked SSH/notification/reveal/Linear refusal, fake-clock reconnect and noise; image-fold artifact visibility, paste eligibility, setup trust, scripted ACP error-to-journal publication and ligature cache tuple aliasing; plus supplied folder-runner uniqueness, mobile host-overlay/credential/update/preference races, status/markup/title/keyed-row projections, subscriber cleanup, cancellation/close/refusal/link-issue and mirror suppression alarms. Retained3373 merger contiguity, dual-clock overdue-resume exactly-once, rejected-paste IPC sink and annotation schema roundtrip remain bounded. Retained actual HTTP/OSC status composition, destructive sibling-filesystem isolation, external contrast invariant and fixture CSS pixel intervention remain narrower. Original reviewed87authored/92expanded become9/9; current OpenCode suite adds two preserved upstream cases and the synthetic-title suite gained one Cursor policy mock-call case, independently reviewed for removal in root3378; current90/95 become11/11. That Cursor suppression/ready-frame regression alarm is intentionally lost; it does not observe native title ownership or tab flicker. For3370 only the peer was independently blind, with author exposure explicit;3373/3374 both blind pins were verified. This broad root unit command selects the reduced root unit suite; UNIT_INCLUDE excludes mobile tests, which require the existing mobile runner; retained Playwright component-pixel spec uses its separate existing headless fixture runner and is not validated by the broad unit command. No fresh execution, actual agent/shell/provider, OS material/focus, historical import equivalence, mobile, mixed-version or cross-platform evidence is claimed. All dated receipts retain their original scope. Audit3368 composes root-adopted3363/3364 and3367/3369: intentionally retires181 authored registrations/196 expanded cases, including28 whole suites, without equivalent replacement. Lost alarms include hibernation attention/liveness/backoff/sequential teardown and inventory, host launch compatibility/legacy/Kimi/resource cleanup, terminal recovery parser/pause/quarantine/remount, window-visibility omission-fence lifetime, launch-option rendered Start, sleeping-resume saved recipe/WSL quoting/cancellation, plus removed project/window/input variants. Additional tiny-suite losses include sentence/label/field/default inventories, credential omission, Windows argument/environment mapping, URI decoding, diagnostics, provider classification and fake-clock callback/parser examples. Retained ten registrations/twelve expanded cases include two literal Unicode Mn/Cf zero-width range guards in the actual character-range algorithm and protect narrower delayed editor bytes/destructive ownership, mounted hidden collision repair, ten transport epochs, duplicate-command refusal, caller timeout typing, executor unknown-opener refusal and failed-chunk user bytes. This broad unit command selects the reduced suite; no fresh runtime, real provider/network/PTY, filesystem restart, native UI, historical import equivalence, mobile, mixed-version or cross-platform validation is claimed. Unrelated dated receipts retain their original scope. Audit3362 composes root-adopted3358/independent3360: intentionally retires129 authored registrations/140 expanded cases, including four whole suites, without equivalent replacement. Lost alarms include supplied orphan-adoption retry/malformed inventory/cancellation; fake-terminal replay parser/wedge/disposal callbacks; all-host catalog metadata and Windows preferences; host keepalive/protocol/stale/settings failures; and removed exact-stop/suppression, source save lifetime, diff-note queue, rename/editor close, input flood/chunk refusal/limits, purge and creation examples. Retained18 registrations/21 expanded cases protect narrower ownership, generation, dirty-state, queue convergence, encoding and attachment-lease outcomes. No replacement or keeper quota claim. This broad unit command selects the reduced suite; no fresh execution, historical import equivalence, real provider/network/SSH/PTY/xterm parser, disk restart, native UI, mobile, mixed-version or cross-platform validation is claimed. Unrelated dated receipts retain their original scope. Audit3359 composes root-adopted source3355/independent3356: intentionally retires130 authored registrations/139 expanded cases, including eight whole suites, without equivalent replacement. Lost alarms include strict create naming/capability/legacy payloads; supplied transport host replacement, deadline reattach, create-handoff and split activation; agent-session fork/clipboard/platform flags; shutdown cleared-scrollback/unmounted bindings; simulator host-collision/selection/shutdown; and removed editor, catalog, mutation, launch and status examples. Retained12 adverse-ordering/state-consequence cases are narrower and do not replace all removed alarms. Two queue absences receive zero removal credit. This broad unit command selects the reduced suite; no fresh execution, historical import equivalence, real provider/network/SSH/PTY, filesystem restart, native UI, mobile, mixed-version or cross-platform validation is claimed. Unrelated dated receipts retain their original scope. Audit3349 composes adopted batches3343,3345 and refreshed3354: intentionally retires234 authored registrations/294 expanded cases, including13 whole suites, without equivalent replacement. Lost alarms include supplied terminal reconnect/replacement/typeahead/mirror/result and snapshot examples; synthetic render-desync persistence/recovery; worktree listing/owner/catalog/lineage/removal and activation/creation examples; host-scoped PR and task-record projections; editor diff/status/comment and UI send-target examples; automation observation/wake, supplied sleep/deadline clock and native-chat completion/notification/relaunch samples; held-tab layout and cleanup/progress guard examples. Retained adverse-ordering and wire-boundary cases are narrower and do not replace all removed alarms. The already-upstream visibility-resume deletion receives zero new removal credit. This broad unit command selects the reduced suite; no fresh execution, historical import equivalence, real provider/network/SSH, native process/power/GPU, rendered UI, mobile, mixed-version or cross-platform validation is claimed. Unrelated dated receipts retain their original scope. Audit3342 composes adopted source batches3333/3334,3336/3337 and3340/3341: intentionally retires180 authored registrations/263 expanded cases, including seven whole suites, without equivalent replacement. Lost alarms include corrupt editor hydration; mobile editor/diff publication and privacy projections; stale-resubscribe routing; model-picker projection/refetch/retry/fallback; editor check-details and frame property inventories; latched-pane cleanup/quiescence; client create replay identity/options/compatibility; and removed owner, async routing, terminal and layout examples. Retained definitions do not replace these alarms. This broad root unit command selects the reduced suite; no fresh execution, historical source/import equivalence, real provider/network/SSH, rendered UI, durability restart, mobile, mixed-version or cross-platform validation is claimed. Unrelated dated receipts keep their original scope. Audit3335 composes adopted source unions3327/3328 and3330/3332: intentionally retires100 authored registrations/123 expanded cases, including ten whole suites, without equivalent replacement. Lost alarms include seeded host persistence/contention and stale-host cleanup; browser snapshot assembly; mocked wake/DPR callbacks and frame budgets; preflight projections; palette authority/cache suppression, URL intent and saved-title cross-repo collisions; metadata coverage/set patch and dropdown assembly; and removed terminal, worktree, review-refresh and owner-routing examples. Retained definitions do not replace these alarms. This broad root unit command selects the reduced suite; no fresh execution, historical source/import equivalence, real provider/network/SSH, rendered UI/GPU/focus, durability restart, mobile, mixed-version or cross-platform validation is claimed. Unrelated dated receipts retain only their original scope. Audit 3318 composes adopted sources 3310, 3313 and 3317: intentionally retires 71 authored declarations and 102 expanded cases, including whole terminal-detach agent-retention, seeded batch/single open-files equivalence, shallow context-menu shortcut-badge, mocked active-workspace delete-dispatch, workspace session hydration, SSH target cleanup, editor session hydration and worktree terminal purge suites. Lost alarms include chained transfer alias and immediate close/exit retention; batch/single divergence, survivor/selection/map preservation and input nonmutation across 400 imperative seeds (one registered case); disconnected pending-handle retry, authoritative absences/close-record shortcut/older-host absence and published-presence/unpublished-frame examples; published empty host-graph omission to pane exit; legacy search ranking/exclusion fallback; provider request upgrade/dedupe/finalizer ownership; asynchronous PR suppression/primary-change and same-number different-repository URL rejection. Deletion routing loses host/instance qualification, paired and legacy mapping, folder ownership, active-versus-hover/menu-row selection, ambiguity, modal/editable/creation/view/main/deleting/missing guards and shortcut advertisement. Unchanged real keyboard/hover/confirmation/catalog E2E remains narrower, not an equivalent replacement. Additional losses include scripted old-host disk/UTF-8/noop/baseline and landed/unlanded lost-reply/replacement-retry outcomes; ordinary/repeated healthy-link reattach; cross-owner terminal/chat binding; oversized replay permanent-unavailable classification; floating reveal keyboard ownership/close/disable/listener disposal; naming/retained-turn/Sleep/error/close/reject status tables; SSH membership prune/new-target-only reads and environment/local bucket isolation; same-frame receipt capacity and positive bare/headless publisher readmission. These actual regression alarms are deliberately lost; no fresh gate, provider, rendered, mobile, mixed-version, cross-platform, soak or measured-budget validation is claimed. Audit 3312 composes adopted sources 3302 and 3308: deliberately retires 33 authored declarations and 36 expanded cases, including the whole backend startup-focus, active-browser IPC-close-routing, remote-browser-creation and agent-terminal-presence suites. Intentionally lost alarms cover distinct six-pane reconnect handles; SSH host label/Connect callback, unhydrated visit cleanup, repo cache aliases and hidden worktree/tab/PTY cleanup; adopted-agent startup focus and viewer navigation/reuse; staged, pageless, source, stale and orphan browser-close routing; web local-materialization refusal, desktop incapable-host fallback, failed/thrown remote creation and paired-web sign-in refusal; BOM/NUL and remote/local custom-editor byte-read examples; immediate folder activation and unread clearing; and batching idle/coalescing, accumulated byte ceiling, leading-edge-disabled, standalone synchronous oversize rejection, validation yield, deferred pending-tail order and both viewport-clear examples. The newly reintroduced agent-terminal-presence suite also loses actual terminal-status membership positive and nonterminal-status callback suppression alarms, including the recent 40916 guard regression; the older different 2133 presence-suite history remains historical and receives zero duplicate removal credit. These real regression alarms are intentionally lost. The unchanged survivors provide narrower coverage, with no equivalent replacement or fresh gate, provider, rendered, remote/mobile, mixed-version, cross-platform, soak or measured-budget validation claimed. Audit 3301 combines adopted source batches 3296 and 3299: retire 27 authored declarations and 36 expanded scenarios, including six whole suites. Intentionally lost alarms cover failed-verification/recovery/restart counters and mocked hosting/toast; early overlapping pane-read scheduling/count; unreadable removal listing draft guard; bulk-purge remote-qualified and raw-local guard maps; initial-snapshot blank/mode/oversize/printable/fresh-spawn callback and replay examples; fallback mobile file close and ordinary MRU; default queue overload/drain; seeded browser-page reuse and supplied missing-page URL recreation; ambiguous sleep/hibernation owner refusal and untouched bindings/origins; ordinary selection/activity/fallback priority; skip-remote success and retained hints; supplied structured-chat unsent retention and scoped removal draft eviction; caller-chat focus precedence; open/draft PR cache eviction and merged-head fallback result inventories. Retained adverse-ordering and ownership cases are narrower and do not establish equivalent replacements. No fresh runtime, native, physical provider, cross-platform, mobile or mixed-version evidence is claimed. Audit 3292 combines adopted 3285/3287/3289/3293 removals: 40 authored declarations and 47 expanded scenarios, including whole frame-editor-view, ambiguous remote-delete-refusal, unverifiable-host subscription and editor-close cleanup suites. The previously reviewed dock-badge suite was already removed upstream in PR 40895 and receives zero new removal credit. Intentionally retired alarms include background browser selection and last-tab landing; main startup fallback, SSH project cleanup/survivor routing, exact-PR contradiction/saved-push positives, replay/sidecar rollback and wrapped remote error normalization; records/snapshot missing-diff hydration, ambiguous folder-owner delete refusal, focus no-op notifications, nested editor context-only cache check, pending broadcast-first status and ordinary four-confirmation aggregation; preview-source frontmatter pruning, approved local/runtime agent dispatch, non-GitHub legacy PR cache invalidation, stale merged-head transient-error fallback, empty-queue immediate query reply and unverified-to-concrete preflight risk. Additional intentionally retired alarms are injected host subscription/unsubscribe counts, synthetic editor reveal/draft/fallback/scoped close, ambiguous unread refusals and hidden mark/read roundtrip, immediate connect backoff/noError, positive mirrored evidence-clock renewal, supplied VM failure/success projections and git-local/folder-SSH wake permutations. Remaining temporal/ownership cases are narrower; no equivalent replacement or fresh execution is claimed. Audit 3283 removes 20 authored declarations and 31 expanded scenarios, including two whole suites. Retired alarms cover PR refresh-state pruning, shared runtime subscription cleanup and store isolation, language content-change routing and older completion ownership, ordinary panel retry-timer cleanup and pending loading, four hosted-review lifetime permutations, mocked terminal creation error/order wiring, five sleep-inventory variants with pending-frame-only assertions, palette fallback/composite highlights, Windows/UNC encoded-editor input rows, mixed-repository partial failure counts, title setters and generated-title bypass/replacement, five window-close coordinator delegation/guard/finally branches, and ambiguous-old-record frame reveal. These regression checks are intentionally lost under the test-value audit; retained cases are not equivalent replacements. Prior coverage notes and receipts remain historical. Audit 3273 removes 14 authored declarations and 19 expanded scenarios across four whole suites and eight partial suites. Retired alarms cover saved-local cancellation/layout ownership, ambiguous-owner warning reset, folder attachment routing, VM false-capability bypass, abandoned reveal warmup cleanup and viewport claim deduplication/rearming, quiet unrelated remote-removal refusal, startup-command one-shot consumption, repository/floating recovery-ledger rows, fake-React pinned-scroll intent, split-ratio state identity/subscriber suppression and fractional change, cross-host project-group join refusal, three PR request-lifetime permutations, upstream-status preservation on error, and unresolved Git-owner refusal. These regression checks are intentionally lost under the test-value audit; retained scenarios are not equivalent replacements. Historical coverage receipts remain historical, including gate35 subscriber claims. Audit 3256 removes these specific alarms from the broad root unit commands: skill dialog active-share selection, close and pending-share handoff; simple keyed-record deletion; marker live-region insertion, simple landing and nine baseline policy examples; General search/control navigation inventory; orphan-count cache bootstrap; seven Codex code classifications and HTTP 429 warning mapping; two skill unread-root verdict examples; peer-mail payload and conversation-ID rejection; and the GitHub organization TABLE text-field optimistic rollback/failed-envelope example. These include real behaviors; retained tests do not provide equivalent coverage for every removed scenario. Mobile losses are recorded separately and are not coverage of these root commands. Audit3246 retires NewRowsMarker reveal/no-repeat and pane-scoped beforeinput checks; skill-owner option availability/count/dedup/order; six styled Input/Textarea IME forwarding rows; the static Codex/OpenCode smart-key inventory; tab-map AST ratchet diagnostic fixtures; child-roster work-budget and retained-aggregate alarms; malformed persisted floating-cwd fallback/no-crash/empty exact-root checks; the unanswered-host empty-list discriminator; the direct invalidated-cache commit-false assertion; one redundant digit-keyup IME row; cached non-supported Claude title-generator rows; and the duplicate late naming-result singleton. These root broad commands lose those specific alarms without equivalent replacement. Distinct retained owner/state checks have their own bounded claims; the real scheduler still rejects stale response data, while the direct false-return alarm is retired. Audit3231 retires supported-host restore-pane key mapping, closed/open creation-sidebar toggle visibility, unrelated scope-error/null classification and quick-submit reveal/no-create checks. These broad commands lose those real narrow alarms; no replacement coverage is claimed. Audit3219 removes the synthetic Cmd+J extra-source suite; this broad command no longer checks its match/tie placement and selection, announced count, empty-query cap, or workspace hiding with retained recent tabs. No replacement coverage is claimed. Audit3209 composes approved sources3202/3206: deliberately retires seven authored/expanded cases in four whole suites without equivalent replacement. Work-item queries lose real GitHub/GitLab oversized ASCII secret-prefix empty-query and whitespace-before-trim refusal alarms; inputs share the imported size bound and exercise only its fast length branch, with no multibyte or actual provider/exposure guarantee. Skill sharing loses complete/partial managed-bundle and destination-ambiguity association checks plus three negative origin/path/scheme admission examples; these do not establish uploaded contents, arbitrary-URL fetching, authorization or execution. Retain exact originless-project direct-link fallback, cloud-delete confirmation, bundled-target repair/owner isolation and explicit Windows-host preference over stale WSL suites. Rejected3201 runtime-preference removal is excluded. No real cloud/network/host/disk, mobile or mixed-version execution validation is claimed. Audit3200 composes approved source3194: deliberately retires thirteen authored registrations/twenty-seven expanded cases in six whole automation host/list policy suites without equivalent replacement. Real RPC category/retryability and wrapped-timeout recognition, unscoped-failure/scoped-success health evidence precedence, exact-ID create selectors and per-run workspace omission, paired-web local/SSH/absent host catalog routing, incompatible/removed/unhydrated/offline execution health, runtime-before-nested-SSH recovery dispatch, and no-owned-focus/successor/foreign-list focus policy alarms are consciously lost. Retain exact20line orphan allow/refuse/precondition and exact90line cross-host same-ID search suites. No retry-timer/fence lifecycle, actual reconnect/network/write delivery, native focus, mobile/mixed-version runtime or disk persistence coverage is claimed. Audit3191 combines approved source3182/3187/3188: deliberately retires thirteen authored Vitest registrations and fifteen expanded cases, including five whole suites, without equivalent replacement. Attachment intake loses real portal/native-capture terminal interception and unowned-container refusal, immediate child-only committed availability/claim-ref negotiation and delivery, and direct-target over stable focused/background composer routing through disable/re-enable/remount and independent question focus. Exact destination/cache/draft and final-stat owner/workspace/File-release suites remain; they do not replace Surface recipient routing. Automation authoring loses destination runtime catalog membership, local/direct-SSH exclusion of paired-runtime repos, unknown-runtime empty catalog, logical project/host/setup/repo/path context payload, and missing/nonready setup refusal; these were genuine direct helper alarms, while exact schedule transformation, legacy schedule and setup-decision suites remain. Agent picker loses setup-chat/terminal/missing-installer/unsupported-or-unknown-host row projection samples and the ordinary unsearched menu variant; the entire original26-line resume recipe suite remains, including reported bypass versus default/absent permission modes, as does the exact search-result menu callback with its fixtures, model/effort commits and staged Arguments reopen outcome. Rejected predecessor3180 full recipe deletion is excluded. No actual native drag/cursor/focus/IME, upload bytes or disk/restart persistence, full automation save/scheduler/runtime transport, real resume-process flags/environment delivery, or native menu/rendered layout validation is claimed. Audit3178 combines source3169/3170/3175: deliberately retires eight authored units (six Vitest cases and two imperative custom relay scenarios), including two whole suites, without equivalent replacement. Voice Section loses per-model pending-delete isolation across interleaved A/B completion and the two-success refresh-call alarm; exact VoicePane delayed key-clear/newer enabled-toggle merge remains and does not replace row deletion coverage. Speech loses dedicated rating-scale/inclusive-ceiling, unsupported-versus-unmeasured, explicit/system-language precedence/locale alias, accuracy versus fast named/default/best-measured selection, and unmeasured/no-match examples; exact offered-user-pick versus retired-selection case and its fixture remain. Relay loses legacy ping-delivery count/liveness sampled before the silence deadline and grouped malformed Bearer/host-ID 401/429 routing checks; twelve real Worker/DurableObject/shipped-client scenarios remain, not equivalent replacement for those narrow alarms. Six prior speech cases are not all deleted: approved successor3175 keeps the original user-choice case. No actual credential/file persistence, native/GPU/engine/download delivery, production assignment policy or deployed-runtime validation is claimed by this reduction. Audit3165 combines source3160/3162: deliberately retires six authored/expanded cases across three whole suites without equivalent replacement. Launch/status losses: observed React-render pending/resuming coordination across settings and deferred offer read; stale-offer reread suppressing dialog reopen; held-local-chat recovery visibility with new-chat preferences off; disabled-local admission avoiding offer RPC despite an injected but unconsumed paired-tab fixture; and run-only lost-reply uncertainty reachability until direct viewed-run retirement. Launch probe does not prove arbitrary synchronous-store atomicity, the paired fixture is not remote runtime enrollment, and the status case directly marks viewed state rather than rendering the summary. Crew-hook losses: old-host method_not_found cache persists across party changes but is released by independently supplied connection generation/verified pairing status or pairing revision, with actual frame publication and teardown. These are real narrow coordination, admission, uncertainty and mixed-version cache alarms consciously lost. Exact web verified-runtime writer handoff guard remains; it does not replace those alarms or prove live host/native/mobile delivery. Audit3156 combines3147/3150/3152/3153/3154: deliberately retires39authored/40expanded native-chat recovery cases, eight whole suites and two orphan test-support files without equivalent replacement. Lost alarms: lost-reply unconfirmed reconciliation, skipped rows/counts and missed-frame repair, unknown/pending outcome and omitted-failure-list compatibility, uncertain history after dismissal, retry/refusal/dismiss lifecycle, hidden/consumed picker ownership, result-tree keyboard focus/disclosure and all-skipped retirement; unconfirmed-over-conflict guidance and failed-chat changes despite older host timestamps; nearest-listed ancestor/cyclic forest shape, descendant membership, host ordering/missing-host local fallback; skipped/readiness/admission counts, provisional skip/progress monotonicity, early per-chat verdicts with batch pending protection, older-host waiting, start-slot/delivery distinction, retry-over-failure and unknown-after-withdrawal attention; remote snooze/reconnect/reoffer, unseen mixed summary through open/close, watched completion retirement, new success beside old failure, failed-reread mixed-result preservation, filter/collapse completion resets, retry summary replacement and current-offer/history selection; cross-host workspace identity, rendered cyclic reachability, nested tri-state/toggle propagation, project eligibility isolation and collapse preserving selection. Exact fallback-list completion barrier, batched verdict/cleanup retention, stale-read versus dismissal publication race, and requested-but-never-rendered finished-run retirement remain; they do not replace retired alarms. Audit3146 combines source reviews3132/3133/3135/3138/3143: intentionally retire20authored/31expanded cases without equivalent replacement. Provider-session losses: structured-native terminal-resume exclusion, metadata-less completed identity, new-turn completion clearing, Pi provider-only/periodic/manual promotion, changed-transcript launch-config isolation, Pi/omp/prime-agent completed-session remote/manual-shutdown promotion, and quit/done precedence over heartbeat. Side-thread/question losses: finished-pane acquisition, hidden title/recap states, local/relay/relay-done conversation takeover with prompt/session/child resets, plain-message abandonment, compaction/session replacement and completion resets. Codex startup losses: incoming-owner cached child replacement, old-relay foreign live-session correction, completed foreign-root turn-fact permutations. Transcript losses: real temporary-JSONL partial sibling/final-child completion, unlabelled child attribution, compact cached replay preservation and100/1000completed-child roster retention/release. Compiler-ratchet losses: valid-line uncompiled-list parser grammar examples and injected-existence stale-path filtering; these did not exercise actual filesystem canonicalization or build exclusion. These are real lifecycle, ownership, replay, liveness and retention alarms, including recent#40246 regressions, deliberately lost. Retained conditional record replacement, clockless root/SSH owner isolation, persisted main-thread fork rejection, partial/final question-answer lifetime, cached-roster/missing-ID/live HTTP/durable startup boundaries and restarted-relay refusal/acceptance do not replace those losses. No native/SSH/WSL execution or equivalent coverage is claimed. Audit3128 scoped coverage reduction: Audit3121 removes VoiceDictationLanguageSetting.test.tsx (Spanish-to-es callback and unsupported-model Korean option presence) and voice-speech-model-rows.test.ts (provider/language-order/retired-on-disk list policy); these real narrow alarms are deliberately retired without replacement. VoiceSpeechModelSection per-model concurrent deletion remains unchanged. Audit3122 removes the direct absolute/parent-segment sparse-directory exception-type sample and the five-row IPC sparse-preset error-code/non-save table (two authored/six expanded cases). Those real typed-validation and IPC refusal/error-code alarms are deliberately retired. Keep both real symlink/junction floating-directory trust cases and the minimal RPC structured validation-reason serialization case. The RPC case does not replace IPC save/refusal behavior, typed normalization for both path inputs, actual Git sparse checkout or rendered localization. No equivalent replacement or fresh test/runtime/platform/remote/performance validation is claimed. Audit3124 removes ExperimentalPane.test.tsx (ordinary Pet switch callback), WorkspaceDirectorySetting.test.tsx (padded absolute saved-path normalization/no-write blur), and repository-search.perf.test.ts (navigation/selected-pane builder-call policy, fixture cardinality/nonempty entries and renamed project keyword inclusion). These real narrow alarms are retired without replacement; RepositoryPane.search.test.tsx search-to-sparse-editor request remains unchanged. Audit3129: resolver Windows case-insensitive and POSIX case-sensitive configured-env composition plus mocked-base launch-preflight Windows composition are intentionally no longer checked by the two deleted suites. No equivalent coverage claimed. Keep runtime-structured-agent-host-env.test.ts unchanged: configured Windows Claude-home account identity and host-account precedence remain checked. Audit3114 incorporates source3101: retire three structured Claude child-environment wrapper cases covering inherited stamp isolation/default and explicit entrypoint, Windows SDK-key canonicalization/default/duplicate-key order, and configured lookup/final environment/config-dir conjunction. Keep direct auth/session sanitation and Windows-versus-Linux overlay checks, actual executable lookup from supplied inherited PATH, native Windows child environment delivery, and stale option-mutation fencing. These are not equivalent replacements for the retired wrapper alarms. No fresh test/runtime, real login-shell probe, Claude SDK startup, remote/mixed-version, UI or performance result is claimed. Audit3114 incorporates source3105: retire 17 authored/20 expanded daemon launch-note cases, including the entire two-case SessionLaunchNote suite. Deliberately lose split-marker carry across same-token re-arm, stale-token retirement refusal, foreground tri-state and serial settlement, omitted-note/no-incarnation mixed-version policy, sticky retirement, first-incarnation/replacement launch preservation and held-launch precedence. Keep only the unchanged unresolved foreground-read race against a later finished attach. Supplied notes/foreground and runtime calls do not establish actual daemon/main restart, SSH, native Windows observation, mobile UI, equivalent replacement or fresh runtime/performance validation. Audit3114 incorporates source3109: retire six authored/35 expanded pricing cases: 21 accepted model-name examples, 10 unsupported/future-model fail-closed examples, malformed TTL clamp, unknown-model estimate refusal, flat-model long-context disregard and oversized long-context clamp. Keep mixed five-minute/one-hour write allocation and short/all-long/mixed long-context allocation with original fixed oracles. Real parser/refusal/bounds alarms are knowingly lost without equivalent replacement; retained tests do not validate provider rates, actual billing or request threshold classification. Preserve the archived usage-scan-append source-freeze receipt without transferring historical execution/performance credit. No fresh runtime result is claimed. Audit3108 source-only reduction (3094/3095/3100): retire 27 authored/30 expanded cases, including complete markdown view-state, file-preview link-open and CLI agent-server-route suites, without replacement. Deliberate losses include preview visibility/reference lifetime and same-path owners; SSH stat, directory/missing-target, explicit-null owner, nonmarkdown line/column, local URI routing, remote-to-client guard and same-file reuse; document-preview source-owner/folder/reuse routing, stable grant location and outside-workspace POSIX/Windows request projection; and verified remote CLI send/check refusal, suggested --on argv/copy, shell no-probe bypass, unverified-launch admission and older-peer refusal. Retain two markdown source-runtime/qualified-reveal alarms, one stale grant-rejection fence and two remote read/mutation evidence policies, with original callbacks. Final last-wins reveal did not prove transient cancellation; CLI prerequisite did not prove no real send, and envelope tests do not execute server refusal. No fresh runtime, rendered UI, actual file/SSH/paired transport, authorization, mixed-version or performance result is claimed. Audit3096 source-only reduction (3087/3088): retire 69 authored/76 expanded cases, including complete recovery-portals and reconnect-banner suites. Intentionally lose dead/default TUI replay, generated alternate-frame style composition, reset/mode/dimension and legacy missing-mode-boundary alarms, UI notice/action/reveal policies, and isolated recovery lifecycle variants, without equivalent replacement. Retained registrations and callbacks are unchanged; headless cells are not pixels, and no fresh runtime, host, SSH, WSL, rendered-app or performance result is claimed. Audit3086 source-only reduction (3079/3080/3081): intentionally retire 93 authored/100 expanded mock-boundary cases, including the complete spawn-errors and SSH reconnect overlay suites, without replacement. Retired alarms include spawn classification/ownership, reply ceilings and renderer-write failure recovery, disconnect/detach fencing branches, authority facts, and overlay retry/visibility wiring. Retained callbacks are unchanged; no fresh execution, real PTY/SSH, rendered UI, or performance result is claimed. Audit2432: The broad unit command loses the isolated BranchPicker open-change notification sample. Its unique true/false callback alarm is intentionally retired; reopening/status-refresh behavior was not exercised. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2425: The broad unit command loses the workspace-copy-status supplied readError forwarding sample. It did not exercise the branch-switch blocking promised by its title. This alarm is intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2417: The broad unit command loses two ordinary clean Git cherry-pick/revert success samples and two terminal startup foreground-read work-budget samples. These unique alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2412: The broad unit command loses the whole six-case fake-React-hook scroll-anchor suite, two generic draft-retention samples, a simple new-agent order sample, a real history-publication batching-count sample, an unmounted handoff abort/timer sample and three basic WSL preview/error samples. These alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2404: The broad unit command loses the standalone share-name lookup 503 propagation suite, initial deletion placement-kind sample, direct changed-mtime stale sample, first-pass rollback existence example and abandoned-preparation directory sample. These exact alarms are intentionally retired without equivalent replacement or fresh validation of the reduced selector. Audit2397 review amendment: The broad unit command loses three standalone suites, two partial-case definitions and two URL table rows across package/download/placement tests. Keep initial wrong-port authorization, modified independent-copy digest refusal and abort-after-begin cancellation dispatch. The remaining alarms are deliberately retired; no equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2393 current-parent refresh2401: Remove the basic skill-install service alias sample and original public managed-remove receiptless refusal case. Preserve the upstream request ownership suite and transaction interruption coverage. No equivalent complete replacement or fresh validation of the reduced selector is claimed. Audit2389: The broad unit command loses the missing-preview suite, plain-global destination sample and prepublished-receipt recovery example. No equivalent replacement or fresh validation of the reduced selector is claimed. Audit2385: The broad unit command loses four authored walker/staging/protocol examples (six expanded cases); no equivalent replacement or fresh validation is claimed for the reduced suite. Audit2383: The unscoped Vitest command no longer includes the removed Antigravity catalogue suite; its exact provider-root/owner example has no equivalent replacement or fresh validation claim. Audit2377/2381: The unscoped Vitest command includes the reduced bundled-skill and native-discovery suites; the eight removed backup/legacy/catalogue/symlink/SSH-builder examples have no replacement-equivalence or fresh validation claim here. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Historical prior account (preserved verbatim): Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/runtime/files/watching/runtime-file-client-watch.test.ts: delivers remote file changes to listeners for the same worktree. src/main/runtime/orca-runtime.test.ts: ordinary registration cleanup removes only await import('./orca-runtime-tests/mobile-session-tabs-part-14.spec'). src/main/runtime/orca-runtime-tests/terminal-side-effect-facts-part-03.spec.ts: arms the stale-title timer for a seeded working title; arms the Command Code scrape from the noted spawn command; prefers the tracked title over a stale renderer lastTitle in the hydration seed; writes recent output into the current runtime output map; uses a later title handler replacement with the runtime receiver; calls the current injected listener with the runtime receiver; keeps optional reconciliation lazy after its callback is removed. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-14.spec.ts: lists them, so a paired client can mirror a migrated editor; closes one by retiring it from the host session; keeps an unsaved draft unless the close is forced; shares aggregate work but leaves a replacement pending promise alone; lets a targeted refresh finish while an aggregate refresh waits; refuses a close when the store lacks %s before the guard; keeps a later missing %s on the original caught failure path. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Exact retired assertionRefs, preserved as historical objects only: {\n \"file\": \"src/renderer/src/runtime/files/watching/runtime-file-client-watch.test.ts\",\n \"assertions\": [\n \"terminal watcher error and setup failure evict the shared entry before retrying callbacks run\",\n \"an old stream end cannot evict the replacement stream, which still delivers to its listener\",\n \"two same-worktree listeners share a synthetic subscription until the final stop unsubscribes and sends unwatch\"\n ]\n } Historical prior account (preserved verbatim): Audit1973: Delete the standalone mocked watcher cleanup suite and its entire sole-file prospective command. Retire the removed file-command transport-abort alias; preserve the independent cancellation suite and final-overflow/error/end cleanup callback, and13 unrelated receipt objects. Whole original changed dated receipts are retired, never narrowed or transferred. This metadata review claims no fresh execution, equivalent replacement, provider/PTY, live remote/mobile, rendered, cross-platform, soak or measured-budget result. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Partial runtime files-watch suite retains controlled Windows close-event waiting, shared-client survival, late physical-exit ownership/deadline cleanup and shutdown joining. Its combined Windows close/deadline/late-exit alias remains backed by unchanged callbacks. Retire native-error-close, pre-publication setup ownership and failed-delete rearm aliases; associated delegation, failure forwarding, removal routing and recovery examples are lost. These tests inject watch/subscription seams and do not observe an actual native watcher or physical process. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Partial runtime watcher-host suite loses mocked option/event/overflow/resubscription forwarding, supplied teardown-error propagation, aborted-signal/no-call and private ten-thousand-waiter-count inventories. Retire the 10,000-caller bound and failed-recovery-subscriber-ending assertion aliases. Keep same-root owner cancellation, pre-ready replacement, held root-close join, stale-generation recovery delivery and initial failed-root ownership mappings backed by retained real-host callbacks with injected subscription/error/physical-exit promises. No actual native watcher, process termination or resource bound was observed. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1683 retires changed-source assertion and execution scope without equivalent replacement coverage. Existing unchanged-selector receipts remain scoped to their original sources. Historical prior-source oracle: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Fill the global watcher-child reservation, require native desktop, paired-runtime, and WSL setup to retain typed transient capacity and retry after one serialized release, then cancel pending desktop and paired-client watches and require no retry. Hold one live anchor while aborting 10,000 callers at the capacity, quarantine-assignment, runtime-root, relay-setup, and SSH-registration layers; require exactly one explicit waiter and one base-promise reaction to remain, then zero after settlement. Hold an old relay unsubscribe, queue one same-root setup leader and one anchor, then abort 10,000 joiners; require every cancellation to settle before teardown releases, exactly one anchor waiter, and only one later physical install. Advance the former paired-web callback deadline while capacity remains full, require cancellation ownership to stay live, publish the server token before ready, and require files.unwatch to abort setup before a later slot release can install a native root. Reject the first ready-watch unwatch with a physical-exit promise, resolve that exit later, and require a fresh physical unwatch attempt, registry release, and exactly one stream end. Fill one healthy shared child with multiple roots, map a standard SSH repository's base, Git common directory, and worktree roots to one relay supervisor, then inject IPC disconnect-before-exit, queued and active cancellation, operations during termination, kill-without-exit, repeated unkillable generations, initial and recovery timeouts, and shard failure. During local and SSH deletion, attempt a late terminal spawn whose worktree identity and cwd name different roots, enumerate a non-prefix remote PTY by authoritative worktree ownership, withhold daemon/relay exit callbacks, make attach positively prove a concurrent-shutdown PID dead, and make the provider unavailable; require every acquired admission to roll back on rejection, dead-PID proof to settle physical exit before reaping, timeout to retain ownership, and Git/filesystem deletion never to start. Require bounded watcher process count, physical-exit settlement, healthy-root recovery, stale-generation rejection, overflow plus later events, and fail-closed destructive cleanup. Verify relay build hashes and remote install probes require both relay.js and relay-watcher.js. Launch the built relay with a real PTY and Parcel watch, kill only the watcher child, and require the same relay PID and PTY to answer before a replacement child delivers overflow and a post-crash event.", "commands": [ - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watchers/filesystem-watcher.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/main/runtime/rpc/methods/files/files-watch-cancellation.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/providers/local-pty/local-pty-provider-shutdown.test.ts src/main/daemon/providers/adapter/testing/daemon-pty-adapter.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts --reporter=dot", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watchers/filesystem-watcher.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/main/runtime/rpc/methods/files/files-watch-cancellation.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/providers/local-pty/local-pty-provider-shutdown.test.ts src/main/daemon/providers/adapter/testing/daemon-pty-adapter.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts --reporter=dot", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watchers/filesystem-watcher.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/providers/local-pty/local-pty-provider-shutdown.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts --reporter=dot", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/providers/local-pty/local-pty-provider-shutdown.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/providers/local-pty/local-pty-provider-shutdown.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/cross-platform-path.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watchers/filesystem-watcher.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/main/runtime/rpc/methods/files/files-watch-cancellation.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/file-access/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/providers/local-pty/local-pty-provider-shutdown.test.ts src/main/daemon/providers/adapter/testing/daemon-pty-adapter.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts --reporter=dot", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watchers/filesystem-watcher.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-supervisor-capacity.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/main/runtime/rpc/methods/files/files-watch-cancellation.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/file-access/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/providers/local-pty/local-pty-provider-shutdown.test.ts src/main/daemon/providers/adapter/testing/daemon-pty-adapter.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts --reporter=dot", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watchers/filesystem-watcher.test.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/file-access/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/providers/local-pty/local-pty-provider-shutdown.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts --reporter=dot", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/file-access/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/providers/local-pty/local-pty-provider-shutdown.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/file-access/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/providers/local-pty/local-pty-provider-shutdown.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/file-access/cross-platform-path.test.ts src/main/ipc/pty/pty-spawn-cwd-fallback.test.ts src/main/daemon/terminal-host/testing/terminal-host.test.ts src/main/daemon/terminal-host/testing/terminal-host-session-reaping-leak.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/filesystem/watcher-process/parcel-watcher-process.test.ts src/main/ipc/filesystem/watcher-process/supervision/parcel-watcher-disconnect-termination.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-local-unsubscribe.test.ts src/main/ipc/filesystem/watchers/filesystem-watcher-wsl.test.ts src/main/ipc/worktrees-orphan-directory-cleanup.test.ts src/main/ipc/worktrees-remove-preflight.test.ts src/main/workspaces/removal/watcher-removal-gate.test.ts src/main/runtime/files/watch/orca-runtime-files-watch.test.ts src/main/runtime/workspaces/removal/worktree-teardown.test.ts src/main/runtime/construction/orca-runtime.test.ts src/main/runtime/rpc/methods/files/files.test.ts src/renderer/src/web/web-runtime-client.test.ts src/shared/file-access/cross-platform-path.test.ts", "pnpm run build:electron-vite", "node config/scripts/diagnostics/runtime-watchers/runtime-file-watcher-resource-probe.mjs", "node config/scripts/diagnostics/runtime-watchers/runtime-file-watcher-fault-harness.mjs", @@ -12002,7 +12002,7 @@ "src/main/runtime/rpc/methods/files/files.test.ts", "src/main/runtime/rpc/methods/files/files-watch-cancellation.test.ts", "src/renderer/src/web/web-runtime-client.test.ts", - "src/shared/cross-platform-path.test.ts", + "src/shared/file-access/cross-platform-path.test.ts", "config/scripts/diagnostics/runtime-watchers/runtime-file-watcher-fault-harness.mjs", "config/scripts/diagnostics/runtime-watchers/runtime-file-watcher-resource-probe.mjs" ], @@ -12079,7 +12079,7 @@ ] }, { - "file": "src/shared/cross-platform-path.test.ts", + "file": "src/shared/file-access/cross-platform-path.test.ts", "assertions": [ "POSIX literal backslashes preserve containment and relative identity", "Windows drive and UNC roots enforce containment", diff --git a/config/scripts/archives/platform-command/zip-extractor-command.test.mjs b/config/scripts/archives/platform-command/zip-extractor-command.test.mjs index c555261cab7..961d9e09817 100644 --- a/config/scripts/archives/platform-command/zip-extractor-command.test.mjs +++ b/config/scripts/archives/platform-command/zip-extractor-command.test.mjs @@ -3,7 +3,7 @@ import { tmpdir } from 'node:os' import { join } from 'node:path' import { afterEach, describe, expect, it } from 'vitest' import { runProcessSync } from '@orca/process-host' -import { getZipExtractorCommand } from '../../../../src/shared/zip-extractor-command.ts' +import { getZipExtractorCommand } from '../../../../src/shared/archives/zip-extractor-command.ts' const directories = [] afterEach(() => { diff --git a/config/scripts/desktop-distribution/macos/mac-build-compatibility.cjs b/config/scripts/desktop-distribution/macos/mac-build-compatibility.cjs index 7bdfceccc0a..d6d429f0f5d 100644 --- a/config/scripts/desktop-distribution/macos/mac-build-compatibility.cjs +++ b/config/scripts/desktop-distribution/macos/mac-build-compatibility.cjs @@ -1,6 +1,6 @@ const { writeFileSync } = require('node:fs') const { join } = require('node:path') -const compatibilityContract = require('../../../../src/shared/local-build-compatibility-contract.json') +const compatibilityContract = require('../../../../src/shared/remote-runtime/orcad-distribution/local-build-compatibility-contract.json') const MAC_BUILD_COMPATIBILITY_FILENAME = 'orca-local-build.json' diff --git a/config/scripts/desktop-distribution/runtime-verification/verify-packaged-daemon-entry.cjs b/config/scripts/desktop-distribution/runtime-verification/verify-packaged-daemon-entry.cjs index dfef71717d9..7264ee894e1 100644 --- a/config/scripts/desktop-distribution/runtime-verification/verify-packaged-daemon-entry.cjs +++ b/config/scripts/desktop-distribution/runtime-verification/verify-packaged-daemon-entry.cjs @@ -10,7 +10,7 @@ const { } = require('../../macos/terminal-host-bundle/macos-terminal-host-bundle.cjs') const { daemonProtocolVersion -} = require('../../../../src/shared/local-build-compatibility-contract.json') +} = require('../../../../src/shared/remote-runtime/orcad-distribution/local-build-compatibility-contract.json') // Require exact asar-unpacked daemon entry on every platform; missing path indicates layout regression and must not silently skip. function assertPackagedDaemonEntryExists(resourcesDir) { diff --git a/config/scripts/electron-installation/platform-layout/install-electron-package-binary.mjs b/config/scripts/electron-installation/platform-layout/install-electron-package-binary.mjs index ed9323b7d71..d12eaad026c 100644 --- a/config/scripts/electron-installation/platform-layout/install-electron-package-binary.mjs +++ b/config/scripts/electron-installation/platform-layout/install-electron-package-binary.mjs @@ -16,7 +16,7 @@ import { createRequire } from 'node:module' import { platform as osPlatform, tmpdir } from 'node:os' import { join, resolve } from 'node:path' import { getElectronPlatformPath } from './electron-platform-path.mjs' -import { getZipExtractorCommand } from '../../../../src/shared/zip-extractor-command.ts' +import { getZipExtractorCommand } from '../../../../src/shared/archives/zip-extractor-command.ts' import { isSharedPackageDir } from '../../native-build/node-addons/native-build-entry.cjs' import { shareElectronDistFromCache, diff --git a/config/scripts/node-runtime/archive-identity/update-node-runtime-pin.mjs b/config/scripts/node-runtime/archive-identity/update-node-runtime-pin.mjs index 90cadc72053..e825d9f9ee9 100644 --- a/config/scripts/node-runtime/archive-identity/update-node-runtime-pin.mjs +++ b/config/scripts/node-runtime/archive-identity/update-node-runtime-pin.mjs @@ -30,7 +30,7 @@ import { runProcessSync } from '@orca/process-host' import { getTarProgram, getZipExtractorCommand -} from '../../../../src/shared/zip-extractor-command.ts' +} from '../../../../src/shared/archives/zip-extractor-command.ts' const root = resolve(import.meta.dirname, '../../../..') const PIN_FILE = join(root, 'src/shared/node-runtime/node-runtime-pin.ts') diff --git a/config/scripts/performance/renderer-markdown/renderer-quadratic-scan-benchmark.mjs b/config/scripts/performance/renderer-markdown/renderer-quadratic-scan-benchmark.mjs index a0fe05263f8..ea08773e0cc 100644 --- a/config/scripts/performance/renderer-markdown/renderer-quadratic-scan-benchmark.mjs +++ b/config/scripts/performance/renderer-markdown/renderer-quadratic-scan-benchmark.mjs @@ -141,7 +141,9 @@ const importShared = (relativePath) => const { buildSourceControlTree } = await importShared( 'source-control/listing/source-control-tree.ts' ) -const { normalizeRelativePath, splitPathSegments } = await importShared('cross-platform-path.ts') +const { normalizeRelativePath, splitPathSegments } = await importShared( + 'file-access/cross-platform-path.ts' +) const { compareFileNames } = await importShared('file-name-sort.ts') const changedEntries = Array.from({ length: CHANGED_FILES }, (_, index) => ({ diff --git a/config/scripts/performance/renderer-projection/benchmark-explorer-dotfile-filter.mjs b/config/scripts/performance/renderer-projection/benchmark-explorer-dotfile-filter.mjs index c836debe2db..de93a6233b5 100644 --- a/config/scripts/performance/renderer-projection/benchmark-explorer-dotfile-filter.mjs +++ b/config/scripts/performance/renderer-projection/benchmark-explorer-dotfile-filter.mjs @@ -33,7 +33,7 @@ export { createNameFilteredFileExplorerProjection } from './src/renderer/src/com name: 'baseline-dotfile-predicate', setup(builder) { builder.onResolve({ filter: /^(?:\.\.\/)+shared\/cross-platform-path$/ }, () => ({ - path: resolve('src/shared/cross-platform-path.ts') + path: resolve('src/shared/file-access/cross-platform-path.ts') })) builder.onLoad({ filter: /file-explorer-entries\.ts$/ }, () => ({ contents: baseline, diff --git a/config/scripts/performance/transport/ssh-watch-fanout-benchmark.mjs b/config/scripts/performance/transport/ssh-watch-fanout-benchmark.mjs index 2f563d4e4aa..e4929e5d2a5 100644 --- a/config/scripts/performance/transport/ssh-watch-fanout-benchmark.mjs +++ b/config/scripts/performance/transport/ssh-watch-fanout-benchmark.mjs @@ -26,7 +26,7 @@ const { normalizeRuntimePathForComparison, isPathInsideOrEqual, createNormalizedPathInsideOrEqualMatcher -} = await jiti.import('../../../../src/shared/cross-platform-path.ts') +} = await jiti.import('../../../../src/shared/file-access/cross-platform-path.ts') // Historical per-pair normalization model. function routeBefore(roots, events, sink) { diff --git a/config/scripts/release/javascript-artifacts/release-javascript-artifact.mjs b/config/scripts/release/javascript-artifacts/release-javascript-artifact.mjs index cbf30513ef2..d1ba58240e8 100644 --- a/config/scripts/release/javascript-artifacts/release-javascript-artifact.mjs +++ b/config/scripts/release/javascript-artifacts/release-javascript-artifact.mjs @@ -16,7 +16,7 @@ import { runProcessSync } from '@orca/process-host' import { describeProcessFailure } from '../../tool-invocation/process-failure-message.mjs' import { isDirectInvocation } from '../../tool-invocation/script-entry-detection.mjs' import { DESKTOP_RC_TAG, DESKTOP_STABLE_TAG } from '../versioning/release-tag-patterns.mjs' -import { getTarProgram } from '../../../../src/shared/zip-extractor-command.ts' +import { getTarProgram } from '../../../../src/shared/archives/zip-extractor-command.ts' const REQUIRED_FILES = [ 'cli/index.js', diff --git a/config/scripts/workflow/source-routing/pr-code-change-scope.mjs b/config/scripts/workflow/source-routing/pr-code-change-scope.mjs index 2fd64e552c2..fa15fc1f655 100644 --- a/config/scripts/workflow/source-routing/pr-code-change-scope.mjs +++ b/config/scripts/workflow/source-routing/pr-code-change-scope.mjs @@ -74,7 +74,7 @@ const GIT_COMPAT_PREFIXES = [ '.github/actions/prepare-git-compatibility/', 'src/shared/terminal/pty/lifecycle/git-bash-console-capacity', 'src/shared/git/', - 'src/shared/review-head-tracking-ref', + 'src/shared/worktree/hosted-review/review-head-tracking-ref', 'src/shared/worktree/base-refs/local-base-branch-fast-forward', 'src/main/git/', 'config/scripts/git-binary-compatibility' @@ -333,7 +333,7 @@ const NATIVE_CACHE_FILES = new Set([ 'config/scripts/electron-installation/platform-layout/install-electron-package-binary.mjs', 'config/scripts/electron-installation/platform-layout/electron-platform-path.mjs', 'config/scripts/zip-extractor-command.mjs', - 'src/shared/zip-extractor-command.ts', + 'src/shared/archives/zip-extractor-command.ts', 'config/scripts/artifact-storage/reflink-copy/space-sharing-copy.mjs', 'config/scripts/native-build/node-addons/native-dependency-lock-digest.mjs', 'config/scripts/orcad-distribution/prebuilds/orcad-prebuild-node-gyp.mjs', diff --git a/mobile/src/agent-history/agent-history-session-card.ts b/mobile/src/agent-history/agent-history-session-card.ts index 5e46cb38735..c8bdc437cc7 100644 --- a/mobile/src/agent-history/agent-history-session-card.ts +++ b/mobile/src/agent-history/agent-history-session-card.ts @@ -1,4 +1,4 @@ -import { isPathInsideOrEqual } from '../../../src/shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../src/shared/file-access/cross-platform-path' import { latestSessionConversationTurn } from '../../../src/shared/ai-vault/session-display/ai-vault-session-display' import { aiVaultAgentLabel, diff --git a/mobile/src/automations/automation-setup-preparation.ts b/mobile/src/automations/automation-setup-preparation.ts index 2f6439c5773..e8d031dfc72 100644 --- a/mobile/src/automations/automation-setup-preparation.ts +++ b/mobile/src/automations/automation-setup-preparation.ts @@ -1,7 +1,7 @@ import { parseExecutionHostId, type ExecutionHostId } from '../../../src/shared/execution-host' import { findAutomationRepo } from '../../../src/shared/automations/ownership/automation-repo-target' import { getAutomationSetupDefaultDecision } from '../../../src/shared/automations/launch/automation-setup-decision' -import type { PersistedTrustedOrcaHooks } from '../../../src/shared/orca-yaml-hook-types' +import type { PersistedTrustedOrcaHooks } from '../../../src/shared/workspace-setup/orca-yaml-hook-types' import { newWorkspaceSetupHooksRead, newWorkspaceUiStateRead diff --git a/mobile/src/automations/use-automation-setup-consent.ts b/mobile/src/automations/use-automation-setup-consent.ts index 7d7814ae5aa..57bfd4692d2 100644 --- a/mobile/src/automations/use-automation-setup-consent.ts +++ b/mobile/src/automations/use-automation-setup-consent.ts @@ -1,7 +1,7 @@ import { parseExecutionHostId, type ExecutionHostId } from '../../../src/shared/execution-host' import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react' import type { ComponentProps } from 'react' -import type { PersistedTrustedOrcaHooks } from '../../../src/shared/orca-yaml-hook-types' +import type { PersistedTrustedOrcaHooks } from '../../../src/shared/workspace-setup/orca-yaml-hook-types' import type { OrcaHookTrustDrawer, OrcaHookTrustPrompt diff --git a/mobile/src/files/attachments/mobile-clipboard-image.ts b/mobile/src/files/attachments/mobile-clipboard-image.ts index 92d42fdebf3..9e77b15b1aa 100644 --- a/mobile/src/files/attachments/mobile-clipboard-image.ts +++ b/mobile/src/files/attachments/mobile-clipboard-image.ts @@ -1,4 +1,4 @@ -import { isWindowsAbsolutePathLike } from '../../../../src/shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../src/shared/file-access/cross-platform-path' import { formatImageDropPasteText } from '../../../../src/shared/terminal/input/image-path-paste' import { formatAgentImagePath } from '../../../../src/shared/native-chat/input/composer/agent-image-paste' import { MOBILE_CLIPBOARD_IMAGE_UPLOAD_CHUNK_BASE64_CHARS } from './mobile-clipboard-image-upload-chunk' diff --git a/mobile/src/files/markdown/mobile-markdown-file-link.ts b/mobile/src/files/markdown/mobile-markdown-file-link.ts index 586e10f5dad..a9beb6f8dd6 100644 --- a/mobile/src/files/markdown/mobile-markdown-file-link.ts +++ b/mobile/src/files/markdown/mobile-markdown-file-link.ts @@ -2,7 +2,7 @@ import { isWindowsAbsolutePathLike, relativePathInsideRoot, resolveRuntimePath -} from '../../../../src/shared/cross-platform-path' +} from '../../../../src/shared/file-access/cross-platform-path' import { splitFilePathLineSuffix } from '../../components/markdown/links/markdown-file-path-detection' import { createMobileFilePreviewHref, diff --git a/mobile/src/files/markdown/mobile-markdown-image-source.ts b/mobile/src/files/markdown/mobile-markdown-image-source.ts index f8d8d8f9286..46959db2642 100644 --- a/mobile/src/files/markdown/mobile-markdown-image-source.ts +++ b/mobile/src/files/markdown/mobile-markdown-image-source.ts @@ -2,7 +2,7 @@ import { isWindowsAbsolutePathLike, relativePathInsideRoot, resolveRuntimePath -} from '../../../../src/shared/cross-platform-path' +} from '../../../../src/shared/file-access/cross-platform-path' import { routeMarkdownHref } from '../../components/markdown/links/markdown-href-routing' import type { MobileFilePreviewRpcSender } from '../preview/mobile-file-preview-operations' import { loadMobileFilePreview } from '../preview/mobile-file-preview-request' diff --git a/mobile/src/host-screen/workspace-actions/use-host-worktree-delete.ts b/mobile/src/host-screen/workspace-actions/use-host-worktree-delete.ts index e019eed305d..66cbf66de2e 100644 --- a/mobile/src/host-screen/workspace-actions/use-host-worktree-delete.ts +++ b/mobile/src/host-screen/workspace-actions/use-host-worktree-delete.ts @@ -1,9 +1,9 @@ import { useCallback, useRef, useState } from 'react' -import type { PersistedTrustedOrcaHooks } from '../../../../src/shared/orca-yaml-hook-types' +import type { PersistedTrustedOrcaHooks } from '../../../../src/shared/workspace-setup/orca-yaml-hook-types' import { ARCHIVE_HOOK_FAILED_REMOVAL_CODE } from '../../../../src/shared/worktree/removal/archive-hook-removal-gate' import type { OrcaHookTrustPrompt } from '../../components/hook-trust/OrcaHookTrustDrawer' import { newWorkspaceUiStateRead } from '../../new-workspace/creation/runtime/new-workspace-operations' -import { canUseRepoWideTrust } from '../../../../src/shared/orca-hook-trust-entries' +import { canUseRepoWideTrust } from '../../../../src/shared/workspace-setup/hooks/orca-hook-trust-entries' import { persistOrcaHookTrustApproval, wasOrcaHookPreviouslyApproved diff --git a/mobile/src/new-workspace/creation/modal/NewWorktreeModal.tsx b/mobile/src/new-workspace/creation/modal/NewWorktreeModal.tsx index cd4c154e57b..6a2084ecd30 100644 --- a/mobile/src/new-workspace/creation/modal/NewWorktreeModal.tsx +++ b/mobile/src/new-workspace/creation/modal/NewWorktreeModal.tsx @@ -1,6 +1,6 @@ import { useEffect, useMemo, useRef, useState } from 'react' import { Keyboard } from 'react-native' -import { getComposerRepoWorktreeBranches } from '../../../../../src/shared/composer-branch-selection' +import { getComposerRepoWorktreeBranches } from '../../../../../src/shared/new-workspace/composer-branch-selection' import { getRepoExecutionHostId, parseExecutionHostId diff --git a/mobile/src/new-workspace/creation/runtime/new-workspace-reply-schema.ts b/mobile/src/new-workspace/creation/runtime/new-workspace-reply-schema.ts index ee057d8833f..2ef0a9583c7 100644 --- a/mobile/src/new-workspace/creation/runtime/new-workspace-reply-schema.ts +++ b/mobile/src/new-workspace/creation/runtime/new-workspace-reply-schema.ts @@ -1,5 +1,5 @@ import * as z from 'zod' -import type { SetupRunPolicy } from '../../../../../src/shared/orca-yaml-hook-types' +import type { SetupRunPolicy } from '../../../../../src/shared/workspace-setup/orca-yaml-hook-types' import { hostUnionArms, salvagedOptional, diff --git a/mobile/src/new-workspace/creation/runtime/use-new-workspace-create-submit.ts b/mobile/src/new-workspace/creation/runtime/use-new-workspace-create-submit.ts index 90b1242cfe7..701462338d2 100644 --- a/mobile/src/new-workspace/creation/runtime/use-new-workspace-create-submit.ts +++ b/mobile/src/new-workspace/creation/runtime/use-new-workspace-create-submit.ts @@ -1,6 +1,6 @@ import { settingsRead } from '../../../settings/mobile-settings-read-operations' import { useRef, useState, type Dispatch, type SetStateAction } from 'react' -import type { PersistedTrustedOrcaHooks } from '../../../../../src/shared/orca-yaml-hook-types' +import type { PersistedTrustedOrcaHooks } from '../../../../../src/shared/workspace-setup/orca-yaml-hook-types' import type { RetiredNameRegistry } from '../../../../../src/shared/worktree/naming/retired-name-registry' import type { RpcClient } from '../../../transport/rpc/rpc-client-contract' import { folderCreateBusyMessage, uncertainCreateMessage } from './new-workspace-create-copy' diff --git a/mobile/src/new-workspace/creation/runtime/use-new-workspace-runtime-context.ts b/mobile/src/new-workspace/creation/runtime/use-new-workspace-runtime-context.ts index 1e418d54600..80d32da3e6f 100644 --- a/mobile/src/new-workspace/creation/runtime/use-new-workspace-runtime-context.ts +++ b/mobile/src/new-workspace/creation/runtime/use-new-workspace-runtime-context.ts @@ -1,6 +1,6 @@ import { optionalSettingsRead } from '../../../settings/mobile-settings-read-operations' import { useCallback, useEffect, useState } from 'react' -import type { PersistedTrustedOrcaHooks } from '../../../../../src/shared/orca-yaml-hook-types' +import type { PersistedTrustedOrcaHooks } from '../../../../../src/shared/workspace-setup/orca-yaml-hook-types' import type { RpcAcceptedResult } from '../../../transport/rpc/rpc-accepted-result' import type { RpcClient } from '../../../transport/rpc/rpc-client-contract' import type { RpcResponse } from '../../../transport/rpc/rpc-wire-types' diff --git a/mobile/src/new-workspace/creation/setup-hook-trust.ts b/mobile/src/new-workspace/creation/setup-hook-trust.ts index 68fd9d3c00b..4fa73de8692 100644 --- a/mobile/src/new-workspace/creation/setup-hook-trust.ts +++ b/mobile/src/new-workspace/creation/setup-hook-trust.ts @@ -1,10 +1,10 @@ -import type { PersistedTrustedOrcaHooks } from '../../../../src/shared/orca-yaml-hook-types' +import type { PersistedTrustedOrcaHooks } from '../../../../src/shared/workspace-setup/orca-yaml-hook-types' import { canUseRepoWideTrust, type OrcaHookTrustKind, withOrcaHookRepoAlwaysTrusted, withOrcaHookScriptConfirmed -} from '../../../../src/shared/orca-hook-trust-entries' +} from '../../../../src/shared/workspace-setup/hooks/orca-hook-trust-entries' import type { RpcClient } from '../../transport/rpc/rpc-client-contract' import { taskUiStateWrite } from '../../tasks/screen-state/mobile-task-runtime-operations' diff --git a/mobile/src/new-workspace/source-selection/composer-linked-work-item.ts b/mobile/src/new-workspace/source-selection/composer-linked-work-item.ts index 9fb06d36ed4..9c4622a60ce 100644 --- a/mobile/src/new-workspace/source-selection/composer-linked-work-item.ts +++ b/mobile/src/new-workspace/source-selection/composer-linked-work-item.ts @@ -11,7 +11,7 @@ import { } from '../../../../src/shared/new-workspace/workspace-source' type JiraIssueSource = Pick -import { resolveComposerBranchPick as resolveSharedComposerBranchPick } from '../../../../src/shared/composer-branch-selection' +import { resolveComposerBranchPick as resolveSharedComposerBranchPick } from '../../../../src/shared/new-workspace/composer-branch-selection' import type { MobileComposerCreateSelection, SmartNameSelection diff --git a/mobile/src/new-workspace/source-selection/smart-source-fan-out.ts b/mobile/src/new-workspace/source-selection/smart-source-fan-out.ts index a9f8f4180b6..595cd43235e 100644 --- a/mobile/src/new-workspace/source-selection/smart-source-fan-out.ts +++ b/mobile/src/new-workspace/source-selection/smart-source-fan-out.ts @@ -1,6 +1,6 @@ -import { linearIssueReadFailureMessage } from '../../../../src/shared/integration-credential-errors' +import { linearIssueReadFailureMessage } from '../../../../src/shared/secure-storage/integration-credential-errors' import type { GitHubWorkItem } from '../../../../src/shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../src/shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../src/shared/gitlab/gitlab-types' import type { LinearIssue } from '../../../../src/shared/linear/issue-types' import type { BaseRefSearchResult } from '../../../../src/shared/repository/repo-types' import { diff --git a/mobile/src/new-workspace/source-selection/smart-source-paste-intent.ts b/mobile/src/new-workspace/source-selection/smart-source-paste-intent.ts index 16ebcfd0652..6f7d0bbe479 100644 --- a/mobile/src/new-workspace/source-selection/smart-source-paste-intent.ts +++ b/mobile/src/new-workspace/source-selection/smart-source-paste-intent.ts @@ -1,5 +1,5 @@ import type { GitHubWorkItem } from '../../../../src/shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../src/shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../src/shared/gitlab/gitlab-types' import { normalizeGitHubLinkQuery } from '../../../../src/shared/new-workspace/github-links' import { parseGitHubIssueOrPRLink, diff --git a/mobile/src/new-workspace/source-selection/smart-source-search-requests.ts b/mobile/src/new-workspace/source-selection/smart-source-search-requests.ts index 344451d832d..0fe61928c4b 100644 --- a/mobile/src/new-workspace/source-selection/smart-source-search-requests.ts +++ b/mobile/src/new-workspace/source-selection/smart-source-search-requests.ts @@ -1,6 +1,6 @@ -import { legacyBaseRefSearchResult } from '../../../../src/shared/base-ref-search-result' +import { legacyBaseRefSearchResult } from '../../../../src/shared/worktree/base-refs/base-ref-search-result' import type { GitHubWorkItem } from '../../../../src/shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../src/shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../src/shared/gitlab/gitlab-types' import type { LinearIssue } from '../../../../src/shared/linear/issue-types' import type { BaseRefSearchResult } from '../../../../src/shared/repository/repo-types' import type { RpcClient } from '../../transport/rpc/rpc-client-contract' diff --git a/mobile/src/new-workspace/source-selection/use-mobile-composer-source.ts b/mobile/src/new-workspace/source-selection/use-mobile-composer-source.ts index d160f997839..c521b2dbe2d 100644 --- a/mobile/src/new-workspace/source-selection/use-mobile-composer-source.ts +++ b/mobile/src/new-workspace/source-selection/use-mobile-composer-source.ts @@ -1,8 +1,8 @@ import { useCallback, useMemo, useRef, useState } from 'react' import type { GitHubWorkItem } from '../../../../src/shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../src/shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../src/shared/gitlab/gitlab-types' import type { LinearIssue } from '../../../../src/shared/linear/issue-types' -import { resolveComposerManualBranchNameChange } from '../../../../src/shared/composer-branch-selection' +import { resolveComposerManualBranchNameChange } from '../../../../src/shared/new-workspace/composer-branch-selection' import { resolveGitHubWorkItemIdentity } from '../../../../src/shared/new-workspace/github-work-item-identity' import { getForkPushWarning } from '../../../../src/shared/new-workspace/fork-push-warning' import type { RpcClient } from '../../transport/rpc/rpc-client-contract' diff --git a/mobile/src/new-workspace/source-selection/use-smart-workspace-source.ts b/mobile/src/new-workspace/source-selection/use-smart-workspace-source.ts index 88c896a914c..f496de59282 100644 --- a/mobile/src/new-workspace/source-selection/use-smart-workspace-source.ts +++ b/mobile/src/new-workspace/source-selection/use-smart-workspace-source.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import type { GitHubWorkItem } from '../../../../src/shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../src/shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../src/shared/gitlab/gitlab-types' import { buildSmartWorkspaceSourceRows, getSmartWorkspaceEmptyHint, diff --git a/mobile/src/platform/pdf-viewing/native-pdf-view.ts b/mobile/src/platform/pdf-viewing/native-pdf-view.ts index 7451e67646b..d78d7e337dc 100644 --- a/mobile/src/platform/pdf-viewing/native-pdf-view.ts +++ b/mobile/src/platform/pdf-viewing/native-pdf-view.ts @@ -3,7 +3,7 @@ import { Platform } from 'react-native' import { File as FsFile } from 'expo-file-system' import { useFocusEffect, useNavigation } from 'expo-router' import { presentPdf } from '../../../modules/orca-mobile-web-shell/src/index' -import { getRuntimePathBasename } from '../../../../src/shared/cross-platform-path' +import { getRuntimePathBasename } from '../../../../src/shared/file-access/cross-platform-path' import { PDF_MIME_TYPE } from '../../files/media/mobile-file-media' import { downloadMobileFileMedia, diff --git a/mobile/src/session/native-chat/links/use-mobile-native-chat-markdown-links.ts b/mobile/src/session/native-chat/links/use-mobile-native-chat-markdown-links.ts index 0be79b85658..5a8305b32f0 100644 --- a/mobile/src/session/native-chat/links/use-mobile-native-chat-markdown-links.ts +++ b/mobile/src/session/native-chat/links/use-mobile-native-chat-markdown-links.ts @@ -1,6 +1,6 @@ import { useEffect, useMemo, useState } from 'react' import * as z from 'zod' -import { relativePathInsideRoot } from '../../../../../src/shared/cross-platform-path' +import { relativePathInsideRoot } from '../../../../../src/shared/file-access/cross-platform-path' import { githubReferenceRepo, type GitHubRepoReference diff --git a/mobile/src/session/native-chat/transcript/message-content/mobile-native-chat-markdown-image-block.ts b/mobile/src/session/native-chat/transcript/message-content/mobile-native-chat-markdown-image-block.ts index b5b1007486d..09535cd2cef 100644 --- a/mobile/src/session/native-chat/transcript/message-content/mobile-native-chat-markdown-image-block.ts +++ b/mobile/src/session/native-chat/transcript/message-content/mobile-native-chat-markdown-image-block.ts @@ -1,6 +1,6 @@ import type { NativeChatImageRefBlock } from '../../../../../../src/shared/native-chat/native-chat-types' import { routeNativeChatHref } from '../../../../../../src/shared/native-chat/native-chat-href-routing' -import { isRuntimePathAbsolute } from '../../../../../../src/shared/cross-platform-path' +import { isRuntimePathAbsolute } from '../../../../../../src/shared/file-access/cross-platform-path' import { isRasterImagePath } from '../../../../../../src/shared/file-preview/file-preview-kind' import { isKnownRasterImageMimeType } from '../../../../../../src/shared/file-preview/raster-image-preview-limits' import { isSvgFilePath } from '../../../../../../src/shared/file-preview/svg-document' diff --git a/mobile/src/source-control/review/creation/mobile-pr-create-draft.ts b/mobile/src/source-control/review/creation/mobile-pr-create-draft.ts index 1693db56c26..407ccb2a851 100644 --- a/mobile/src/source-control/review/creation/mobile-pr-create-draft.ts +++ b/mobile/src/source-control/review/creation/mobile-pr-create-draft.ts @@ -1,4 +1,4 @@ -import { legacyBaseRefSearchResult } from '../../../../../src/shared/base-ref-search-result' +import { legacyBaseRefSearchResult } from '../../../../../src/shared/worktree/base-refs/base-ref-search-result' import { translate } from '../../../i18n/mobile-i18n' import { refusedRpcMessageOrFallback } from '../../../transport/rpc/rpc-refusal-message' import type { UnvalidatedRpcRequestPort } from '../../../transport/rpc/unvalidated-rpc-request-port' diff --git a/mobile/src/source-control/review/diff-screen/MobileDiffReviewRangeSheet.tsx b/mobile/src/source-control/review/diff-screen/MobileDiffReviewRangeSheet.tsx index 2ca3be4fbd8..2aa4e2d1f18 100644 --- a/mobile/src/source-control/review/diff-screen/MobileDiffReviewRangeSheet.tsx +++ b/mobile/src/source-control/review/diff-screen/MobileDiffReviewRangeSheet.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react' import { KeyboardAvoidingView, Pressable, Text, View } from 'react-native' import { Sparkles } from 'lucide-react-native' -import { getRuntimePathBasename } from '../../../../../src/shared/cross-platform-path' +import { getRuntimePathBasename } from '../../../../../src/shared/file-access/cross-platform-path' import { tuiAgentDisplayName } from '../../../../../src/shared/agent-launch/catalog/tui-agent-display-names' import { useMobileTranslation } from '../../../i18n/use-mobile-translation' import { hostOs } from '../../../platform/host-os' diff --git a/mobile/src/source-control/review/diff-screen/MobileDiffReviewScreenView.tsx b/mobile/src/source-control/review/diff-screen/MobileDiffReviewScreenView.tsx index 1003b7b5dfa..86f1898fd38 100644 --- a/mobile/src/source-control/review/diff-screen/MobileDiffReviewScreenView.tsx +++ b/mobile/src/source-control/review/diff-screen/MobileDiffReviewScreenView.tsx @@ -23,7 +23,7 @@ import { shouldShowTrigger } from '../pull-request/mobile-pr-sidebar-presentation' import { mobileDiffReviewPositionLabel } from '../diff-state/mobile-diff-review-screen-model' -import { getRuntimePathBasename } from '../../../../../src/shared/cross-platform-path' +import { getRuntimePathBasename } from '../../../../../src/shared/file-access/cross-platform-path' import { mobileDiffReviewStyles as styles } from './mobile-diff-review-screen-styles' import { useMobileColorScheme } from '../../../theme/use-mobile-color-scheme' import type { HostConnectionInputs } from '../../../transport/connection/client-context-connection-metrics' diff --git a/mobile/src/source-control/review/pull-request/use-mobile-pr-polling-revalidation.test.ts b/mobile/src/source-control/review/pull-request/use-mobile-pr-polling-revalidation.test.ts index 1290449d94d..15eaddb3fee 100644 --- a/mobile/src/source-control/review/pull-request/use-mobile-pr-polling-revalidation.test.ts +++ b/mobile/src/source-control/review/pull-request/use-mobile-pr-polling-revalidation.test.ts @@ -3,7 +3,7 @@ import { environmentManager, QueryClientProvider, type QueryClient } from '@tans import { act, create } from 'react-test-renderer' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import type { PRInfo } from '../../../../../src/shared/github/pull-requests/pull-request-types' -import type { PRAutoRefreshCadence } from '../../../../../src/shared/review-refresh-policy' +import type { PRAutoRefreshCadence } from '../../../../../src/shared/source-control/hosted-review/review-refresh-policy' import { createOrcaQueryClient } from '../../../query/orca-query-client' import { hostQueryKey } from '../../../query/host-query-key' import type { RpcResponse } from '../../../transport/rpc/rpc-wire-types' diff --git a/mobile/src/source-control/review/pull-request/use-mobile-pr-polling.ts b/mobile/src/source-control/review/pull-request/use-mobile-pr-polling.ts index 0bec7c86914..ed4588f1aa1 100644 --- a/mobile/src/source-control/review/pull-request/use-mobile-pr-polling.ts +++ b/mobile/src/source-control/review/pull-request/use-mobile-pr-polling.ts @@ -6,7 +6,7 @@ import { } from '../../../../../src/shared/github/checks/checks-detail-polling-policy' import type { PRCheckDetail } from '../../../../../src/shared/github/checks/check-types' import type { PRInfo } from '../../../../../src/shared/github/pull-requests/pull-request-types' -import type { PRAutoRefreshCadence } from '../../../../../src/shared/review-refresh-policy' +import type { PRAutoRefreshCadence } from '../../../../../src/shared/source-control/hosted-review/review-refresh-policy' import { useHostQuery } from '../../../query/host-query' import { NO_SOURCE_CONTROL_SETTINGS_INPUT, diff --git a/mobile/src/source-control/settings/mobile-source-control-settings-operations.ts b/mobile/src/source-control/settings/mobile-source-control-settings-operations.ts index 92481acfa24..986d3f8bd27 100644 --- a/mobile/src/source-control/settings/mobile-source-control-settings-operations.ts +++ b/mobile/src/source-control/settings/mobile-source-control-settings-operations.ts @@ -6,7 +6,7 @@ import { settingsMember, settingsField } from '../../settings/mobile-settings-pr import { normalizePRAutoRefreshCadence, type PRAutoRefreshCadence -} from '../../../../src/shared/review-refresh-policy' +} from '../../../../src/shared/source-control/hosted-review/review-refresh-policy' export type MobileSourceControlSettings = { groupOrder: SourceControlGroupOrder diff --git a/mobile/src/tasks/hosted-review/gitlab-check-summary.ts b/mobile/src/tasks/hosted-review/gitlab-check-summary.ts index b72bf8e61fd..5a385a678aa 100644 --- a/mobile/src/tasks/hosted-review/gitlab-check-summary.ts +++ b/mobile/src/tasks/hosted-review/gitlab-check-summary.ts @@ -4,7 +4,7 @@ import { } from '../../../../src/shared/source-control/checks/gitlab/gitlab-pipeline-checks' import { summarizeProviderChecks } from '../../../../src/shared/source-control/checks/provider-check-summary' import type { ProviderCheckSummary } from '../../../../src/shared/github/pull-requests/pull-request-types' -import type { GitLabPipeline } from '../../../../src/shared/gitlab-types' +import type { GitLabPipeline } from '../../../../src/shared/gitlab/gitlab-types' type GitLabPipelineJobLike = { status: string; allowFailure?: boolean } diff --git a/mobile/src/tasks/project-board/use-mobile-tasks-workspace-and-project-state.tsx b/mobile/src/tasks/project-board/use-mobile-tasks-workspace-and-project-state.tsx index 461a36e0251..9179a6978b1 100644 --- a/mobile/src/tasks/project-board/use-mobile-tasks-workspace-and-project-state.tsx +++ b/mobile/src/tasks/project-board/use-mobile-tasks-workspace-and-project-state.tsx @@ -11,7 +11,7 @@ import type { GitHubProjectViewSummary } from './github-project-reference' import type { GitHubProjectIdentity as GitHubProjectRef } from '../../../../src/shared/github/projects/project-identity' -import type { PersistedTrustedOrcaHooks } from '../../../../src/shared/orca-yaml-hook-types' +import type { PersistedTrustedOrcaHooks } from '../../../../src/shared/workspace-setup/orca-yaml-hook-types' import type { SparsePreset } from '../../../../src/shared/worktree/create-types' import type { WorkspaceAgentChoice } from '../../new-workspace/creation/workspace-agent-selection' import type { diff --git a/mobile/src/tasks/screen-state/task-queries.ts b/mobile/src/tasks/screen-state/task-queries.ts index b267e7ea0f3..b1eca1eb422 100644 --- a/mobile/src/tasks/screen-state/task-queries.ts +++ b/mobile/src/tasks/screen-state/task-queries.ts @@ -1,5 +1,5 @@ import { hashKey, type QueryClient } from '@tanstack/react-query' -import type { PersistedTrustedOrcaHooks } from '../../../../src/shared/orca-yaml-hook-types' +import type { PersistedTrustedOrcaHooks } from '../../../../src/shared/workspace-setup/orca-yaml-hook-types' import { defineHostQuery, readHostQueryLive } from '../../query/host-query' import { hostQueryKey, type HostQueryParams } from '../../query/host-query-key' import { holdsRestoredHostQueryData } from '../../query/host-query-persistence' diff --git a/mobile/src/tasks/task-list/use-mobile-tasks-provider-load-actions.tsx b/mobile/src/tasks/task-list/use-mobile-tasks-provider-load-actions.tsx index 9803c3ebda6..c57eca56c56 100644 --- a/mobile/src/tasks/task-list/use-mobile-tasks-provider-load-actions.tsx +++ b/mobile/src/tasks/task-list/use-mobile-tasks-provider-load-actions.tsx @@ -1,4 +1,4 @@ -import type { ClassifiedError } from '../../../../src/shared/classified-error' +import type { ClassifiedError } from '../../../../src/shared/errors/classified-error' import { getWorkItemPageErrorTypes } from '../../../../src/shared/github/work-items/work-item-page-errors' import type { RuntimeHydrationModel } from '../screen-state/use-mobile-tasks-runtime-hydration' import { diff --git a/mobile/src/tasks/task-list/use-mobile-tasks-task-list-loading.tsx b/mobile/src/tasks/task-list/use-mobile-tasks-task-list-loading.tsx index 0efec69b57b..59935c10872 100644 --- a/mobile/src/tasks/task-list/use-mobile-tasks-task-list-loading.tsx +++ b/mobile/src/tasks/task-list/use-mobile-tasks-task-list-loading.tsx @@ -1,5 +1,5 @@ import { useQueryClient } from '@tanstack/react-query' -import { linearIssueReadFailureMessage } from '../../../../src/shared/integration-credential-errors' +import { linearIssueReadFailureMessage } from '../../../../src/shared/secure-storage/integration-credential-errors' import type { ProviderLoadActionsModel } from './use-mobile-tasks-provider-load-actions' import { isHostedTaskRepo } from '../repositories/hosted-repo-selection' import { useCallback, useEffect, useLayoutEffect, useRef } from 'react' diff --git a/mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-source-effects.tsx b/mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-source-effects.tsx index 663733436cc..457141b6742 100644 --- a/mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-source-effects.tsx +++ b/mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-source-effects.tsx @@ -1,4 +1,4 @@ -import { legacyBaseRefSearchResult } from '../../../../src/shared/base-ref-search-result' +import { legacyBaseRefSearchResult } from '../../../../src/shared/worktree/base-refs/base-ref-search-result' import type { WorkspaceCreateProjectionModel } from '../project-board/use-mobile-tasks-workspace-create-projection' import type { SparsePreset } from '../../../../src/shared/worktree/create-types' import { useEffect } from 'react' diff --git a/mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-ssh-state.tsx b/mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-ssh-state.tsx index 49f7e597054..1b8dc7b5219 100644 --- a/mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-ssh-state.tsx +++ b/mobile/src/tasks/workspace-creation/use-mobile-tasks-workspace-ssh-state.tsx @@ -1,6 +1,6 @@ import type { WorkspaceSparseActionsModel } from './use-mobile-tasks-workspace-sparse-actions' import { taskRepoClient } from '../repositories/task-repo-host-routing' -import { getDefaultSetupDecision } from '../../../../src/shared/orca-hook-setup-config' +import { getDefaultSetupDecision } from '../../../../src/shared/workspace-setup/hooks/orca-hook-setup-config' import { normalizeSetupHookTrust, readRepoHooksSetupCommand diff --git a/src/cli/arguments/args.ts b/src/cli/arguments/args.ts index 5f30af9963b..0fe7a07dd3a 100644 --- a/src/cli/arguments/args.ts +++ b/src/cli/arguments/args.ts @@ -7,7 +7,7 @@ import { CLI_GLOBAL_FLAGS, CLI_GLOBAL_VALUE_FLAGS, findCliCommandIndex -} from '../../shared/cli-argument-boundary' +} from '../../shared/cli/cli-argument-boundary' export type ParsedArgs = { commandPath: string[] diff --git a/src/cli/files/file.ts b/src/cli/files/file.ts index 69ec4906983..3c17e6aabd1 100644 --- a/src/cli/files/file.ts +++ b/src/cli/files/file.ts @@ -3,7 +3,10 @@ import type { GitStatusEntry, GitStatusResult } from '../../shared/git/status/gi import type { RuntimeFileOpenResult } from '../../shared/file-access/runtime-editor-file-open' import type { RuntimeWorktreeRecord } from '../../shared/worktree/catalog/runtime-worktree-contracts' import type { RuntimeNavigationTarget } from '../../shared/remote-runtime/session-graph/runtime-navigation' -import { isRuntimePathAbsolute, relativePathInsideRoot } from '../../shared/cross-platform-path' +import { + isRuntimePathAbsolute, + relativePathInsideRoot +} from '../../shared/file-access/cross-platform-path' import { isWslUncPath, parseWslUncPath, toWindowsWslPath } from '../../shared/file-access/wsl-paths' import type { CommandHandler, HandlerContext } from '../dispatch/dispatch' import { getOptionalStringFlag, getRequiredStringFlag } from '../arguments/flags' diff --git a/src/cli/hosts/vm.ts b/src/cli/hosts/vm.ts index b2263049bc3..6dac63326a9 100644 --- a/src/cli/hosts/vm.ts +++ b/src/cli/hosts/vm.ts @@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs' import { join } from 'node:path' import type { CommandHandler } from '../dispatch/dispatch' import { RuntimeClientError } from '../runtime/connection/types' -import { parseOrcaYaml } from '../../shared/orca-yaml' +import { parseOrcaYaml } from '../../shared/workspace-setup/orca-yaml' import { getEphemeralVmRecipeResultProjectRoot, type EphemeralVmRecipeDoctorCheck, @@ -16,7 +16,7 @@ import { runEphemeralVmRecipeCleanup, runEphemeralVmRecipeStart } from '../../shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-runner' -import type { OrcaVmRecipe } from '../../shared/orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../shared/workspace-setup/orca-yaml-hook-types' export const VM_HANDLERS: Record = { 'vm recipe doctor': async ({ flags, cwd, json }) => { diff --git a/src/cli/plugins/dev-watch/plugin-dev-watch.ts b/src/cli/plugins/dev-watch/plugin-dev-watch.ts index 7b183d9a509..45cd5f1a9a9 100644 --- a/src/cli/plugins/dev-watch/plugin-dev-watch.ts +++ b/src/cli/plugins/dev-watch/plugin-dev-watch.ts @@ -6,7 +6,7 @@ import { onPluginDevWatchInterrupt, waitUnlessAborted } from './plugin-dev-watch import { RuntimeClientError, RuntimeRpcFailureError } from '../../runtime/connection/types' import { writeStdoutLine } from '../../output/stdout-line' import type { PluginHostListEntry } from '../../../shared/plugins/plugin-list-entry' -import { CLI_BOOLEAN_FLAGS } from '../../../shared/cli-argument-boundary' +import { CLI_BOOLEAN_FLAGS } from '../../../shared/cli/cli-argument-boundary' import { checkPluginDevFolder } from './plugin-dev-watch-check' import { pluginDevWatchConfirmFor } from './plugin-dev-watch-approval' import { pluginDevWatchShotPanel, type PluginDevWatchShotHost } from './plugin-dev-watch-shot' diff --git a/src/cli/specs/agent-launch.ts b/src/cli/specs/agent-launch.ts index 55a94cf0999..5923ca18d06 100644 --- a/src/cli/specs/agent-launch.ts +++ b/src/cli/specs/agent-launch.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const AGENT_LAUNCH_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/automations.ts b/src/cli/specs/automations.ts index 7eaffd671d6..960465afbcc 100644 --- a/src/cli/specs/automations.ts +++ b/src/cli/specs/automations.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' const AUTOMATION_TARGET_FLAGS = [ 'repo', diff --git a/src/cli/specs/browser-advanced.ts b/src/cli/specs/browser-advanced.ts index 63d3dd66dba..3ba43d8ebba 100644 --- a/src/cli/specs/browser-advanced.ts +++ b/src/cli/specs/browser-advanced.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' import { withBrowserPageTarget } from './browser-page-target' export const BROWSER_ADVANCED_COMMAND_SPECS: CommandSpec[] = withBrowserPageTarget([ diff --git a/src/cli/specs/browser-basic.ts b/src/cli/specs/browser-basic.ts index 6bba2d15ef6..4d078ad2da6 100644 --- a/src/cli/specs/browser-basic.ts +++ b/src/cli/specs/browser-basic.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' import { withBrowserPageTarget } from './browser-page-target' import { BROWSER_WAIT_DEFAULT_TIMEOUT_MS } from '../../shared/browser/automation/browser-wait-timeout' diff --git a/src/cli/specs/chat.ts b/src/cli/specs/chat.ts index 6793d785e59..8ef1716b282 100644 --- a/src/cli/specs/chat.ts +++ b/src/cli/specs/chat.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const CHAT_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/computer.ts b/src/cli/specs/computer.ts index 8815dd19926..c204b98f32d 100644 --- a/src/cli/specs/computer.ts +++ b/src/cli/specs/computer.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' import { COMPUTER_WAIT_DEFAULT_TIMEOUT_MS, COMPUTER_WAIT_MAX_TIMEOUT_MS diff --git a/src/cli/specs/connector.ts b/src/cli/specs/connector.ts index 66c8c11fd3e..54ec0c67e2e 100644 --- a/src/cli/specs/connector.ts +++ b/src/cli/specs/connector.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' const CONNECTOR_NOTES = [ 'Development only: drives the connector seam as a `dev` conversation, without Orca Cloud. The host refuses it unless its experimentalConnectors setting is on.', diff --git a/src/cli/specs/core.ts b/src/cli/specs/core.ts index e2a94c78054..560459e0fe1 100644 --- a/src/cli/specs/core.ts +++ b/src/cli/specs/core.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' import { WORKTREE_LISTING_SCOPE_NOTES } from './worktree-listing-scope-notes' import { WORKTREE_CREATE_COMMAND_SPEC } from './worktree-create' import { WORKTREE_SET_COMMAND_SPEC } from './worktree-set' diff --git a/src/cli/specs/diagnostics.ts b/src/cli/specs/diagnostics.ts index 810538e0832..800db10827f 100644 --- a/src/cli/specs/diagnostics.ts +++ b/src/cli/specs/diagnostics.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const DIAGNOSTICS_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/emulator.ts b/src/cli/specs/emulator.ts index a08c1a0e3bc..2e5752964a8 100644 --- a/src/cli/specs/emulator.ts +++ b/src/cli/specs/emulator.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const EMULATOR_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/environment.ts b/src/cli/specs/environment.ts index b2db0124550..b9a925cb48b 100644 --- a/src/cli/specs/environment.ts +++ b/src/cli/specs/environment.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' import { LOCAL_COMMAND_FLAGS } from '../arguments/args' export const ENVIRONMENT_COMMAND_SPECS: CommandSpec[] = [ diff --git a/src/cli/specs/file.ts b/src/cli/specs/file.ts index 8e264e58b64..08d8cafc880 100644 --- a/src/cli/specs/file.ts +++ b/src/cli/specs/file.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const FILE_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/jira.ts b/src/cli/specs/jira.ts index c2ee60615d4..54f07326c7c 100644 --- a/src/cli/specs/jira.ts +++ b/src/cli/specs/jira.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' const SITE_FLAGS = [...GLOBAL_FLAGS, 'site'] diff --git a/src/cli/specs/linear-mcp.ts b/src/cli/specs/linear-mcp.ts index 2940277c41a..bdfb41e7cae 100644 --- a/src/cli/specs/linear-mcp.ts +++ b/src/cli/specs/linear-mcp.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const LINEAR_MCP_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/linear.ts b/src/cli/specs/linear.ts index 536e9e89cd6..f735c4224fa 100644 --- a/src/cli/specs/linear.ts +++ b/src/cli/specs/linear.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' import { LINEAR_MCP_COMMAND_SPECS } from './linear-mcp' export const LINEAR_COMMAND_SPECS: CommandSpec[] = [ diff --git a/src/cli/specs/orchestration-gate-specs.ts b/src/cli/specs/orchestration-gate-specs.ts index 9dd0927ad1d..0c30e723505 100644 --- a/src/cli/specs/orchestration-gate-specs.ts +++ b/src/cli/specs/orchestration-gate-specs.ts @@ -1,4 +1,4 @@ -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' import type { CommandSpec } from '../discovery/command-spec' export const ORCHESTRATION_GATE_COMMAND_SPECS: CommandSpec[] = [ diff --git a/src/cli/specs/orchestration-worker-specs.ts b/src/cli/specs/orchestration-worker-specs.ts index b6acdc2b7aa..5cb9a592ffa 100644 --- a/src/cli/specs/orchestration-worker-specs.ts +++ b/src/cli/specs/orchestration-worker-specs.ts @@ -1,4 +1,4 @@ -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' import type { CommandSpec } from '../discovery/command-spec' export const ORCHESTRATION_WORKER_COMMAND_SPECS: CommandSpec[] = [ diff --git a/src/cli/specs/orchestration.ts b/src/cli/specs/orchestration.ts index b8c90a1434d..9a3fe56237a 100644 --- a/src/cli/specs/orchestration.ts +++ b/src/cli/specs/orchestration.ts @@ -1,4 +1,4 @@ -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' import type { CommandSpec } from '../discovery/command-spec' import { ORCHESTRATION_GATE_COMMAND_SPECS } from './orchestration-gate-specs' import { ORCHESTRATION_WORKER_COMMAND_SPECS } from './orchestration-worker-specs' diff --git a/src/cli/specs/pair.ts b/src/cli/specs/pair.ts index 11ece28965a..fcdb641df7a 100644 --- a/src/cli/specs/pair.ts +++ b/src/cli/specs/pair.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const PAIR_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/plugin-dev-request.ts b/src/cli/specs/plugin-dev-request.ts index 85baeaaa395..91ce74dff3f 100644 --- a/src/cli/specs/plugin-dev-request.ts +++ b/src/cli/specs/plugin-dev-request.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' /** `orca plugin dev hook`; listed in PLUGIN_RUNTIME_COMMAND_SPECS. */ export const PLUGIN_DEV_HOOK_COMMAND_SPEC: CommandSpec = { diff --git a/src/cli/specs/plugin-install.ts b/src/cli/specs/plugin-install.ts index 6c950b6df36..1b044a1f78f 100644 --- a/src/cli/specs/plugin-install.ts +++ b/src/cli/specs/plugin-install.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' const EXIT_CODES_NOTE = 'Exit codes: 0 ok, 1 error, 3 approval is needed (approval_required or approval_stale).' diff --git a/src/cli/specs/plugin-view.ts b/src/cli/specs/plugin-view.ts index f045197c2a6..3b1f750435e 100644 --- a/src/cli/specs/plugin-view.ts +++ b/src/cli/specs/plugin-view.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' /** Showing and capturing a plugin's UI in the Orca desktop app, so an agent can see what it built. */ export const PLUGIN_VIEW_COMMAND_SPECS: CommandSpec[] = [ diff --git a/src/cli/specs/plugin.ts b/src/cli/specs/plugin.ts index 111943048b5..77adc061814 100644 --- a/src/cli/specs/plugin.ts +++ b/src/cli/specs/plugin.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' import { LOCAL_COMMAND_FLAGS } from '../arguments/args' import { PLUGIN_TEMPLATE_NAMES } from '../plugins/authoring/plugin-template-names' import { PLUGIN_DEV_HOOK_COMMAND_SPEC, PLUGIN_DEV_REQUEST_COMMAND_SPEC } from './plugin-dev-request' diff --git a/src/cli/specs/ports.ts b/src/cli/specs/ports.ts index 6f9037f365b..43d0a03624b 100644 --- a/src/cli/specs/ports.ts +++ b/src/cli/specs/ports.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const PORTS_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/project.ts b/src/cli/specs/project.ts index de1a1b1491c..6eb2cef3ac3 100644 --- a/src/cli/specs/project.ts +++ b/src/cli/specs/project.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const PROJECT_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/reference.ts b/src/cli/specs/reference.ts index 034521f254a..c23cd9f1a14 100644 --- a/src/cli/specs/reference.ts +++ b/src/cli/specs/reference.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const REFERENCE_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/repo.ts b/src/cli/specs/repo.ts index 0df097b36a9..d04b7435d5e 100644 --- a/src/cli/specs/repo.ts +++ b/src/cli/specs/repo.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const REPO_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/search.ts b/src/cli/specs/search.ts index 77ff5676c0f..a8ca867077a 100644 --- a/src/cli/specs/search.ts +++ b/src/cli/specs/search.ts @@ -1,4 +1,4 @@ -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' import type { CommandSpec } from '../discovery/command-spec' // Status is a flag because a subcommand would collide with searching for the word "status". diff --git a/src/cli/specs/skills.ts b/src/cli/specs/skills.ts index 6ee1cd4e2b4..9245428ab88 100644 --- a/src/cli/specs/skills.ts +++ b/src/cli/specs/skills.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const SKILL_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/speech.ts b/src/cli/specs/speech.ts index ed0054f06b9..cacdb2680d6 100644 --- a/src/cli/specs/speech.ts +++ b/src/cli/specs/speech.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const SPEECH_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/terminal-close.ts b/src/cli/specs/terminal-close.ts index bbb9bdfbbd5..7e4b68bb043 100644 --- a/src/cli/specs/terminal-close.ts +++ b/src/cli/specs/terminal-close.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const TERMINAL_CLOSE_COMMAND_SPEC: CommandSpec = { path: ['terminal', 'close'], diff --git a/src/cli/specs/terminal-daemon.ts b/src/cli/specs/terminal-daemon.ts index 2db6eeb1bab..19d39b9c10a 100644 --- a/src/cli/specs/terminal-daemon.ts +++ b/src/cli/specs/terminal-daemon.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const TERMINAL_DAEMON_COMMAND_SPECS: CommandSpec[] = [ { diff --git a/src/cli/specs/terminal-send.ts b/src/cli/specs/terminal-send.ts index 4d49d2c2d00..e9c6675f007 100644 --- a/src/cli/specs/terminal-send.ts +++ b/src/cli/specs/terminal-send.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const TERMINAL_SEND_COMMAND_SPEC: CommandSpec = { path: ['terminal', 'send'], diff --git a/src/cli/specs/terminal-set-pane-title.ts b/src/cli/specs/terminal-set-pane-title.ts index de429d036fd..7be40accd44 100644 --- a/src/cli/specs/terminal-set-pane-title.ts +++ b/src/cli/specs/terminal-set-pane-title.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const TERMINAL_SET_PANE_TITLE_COMMAND_SPEC: CommandSpec = { path: ['terminal', 'set-pane-title'], diff --git a/src/cli/specs/workspace-cleanup.ts b/src/cli/specs/workspace-cleanup.ts index 344986df8fb..359a694f246 100644 --- a/src/cli/specs/workspace-cleanup.ts +++ b/src/cli/specs/workspace-cleanup.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' const HOST_NOTE = 'Runs on the Orca that owns the repos: this computer by default, or a paired server with --environment or --pairing-code. Rules are set in Orca settings; these commands never change them.' diff --git a/src/cli/specs/worktree-create.ts b/src/cli/specs/worktree-create.ts index 0cefd4810d7..1506da43d62 100644 --- a/src/cli/specs/worktree-create.ts +++ b/src/cli/specs/worktree-create.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const WORKTREE_CREATE_COMMAND_SPEC: CommandSpec = { path: ['worktree', 'create'], diff --git a/src/cli/specs/worktree-set.ts b/src/cli/specs/worktree-set.ts index 1722cc4c0e0..775c0e5d503 100644 --- a/src/cli/specs/worktree-set.ts +++ b/src/cli/specs/worktree-set.ts @@ -1,5 +1,5 @@ import type { CommandSpec } from '../discovery/command-spec' -import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli-argument-boundary' +import { CLI_GLOBAL_FLAGS as GLOBAL_FLAGS } from '../../shared/cli/cli-argument-boundary' export const WORKTREE_SET_COMMAND_SPEC: CommandSpec = { path: ['worktree', 'set'], diff --git a/src/cli/workspace-ports/ports.ts b/src/cli/workspace-ports/ports.ts index 9e77d67271a..429beeef070 100644 --- a/src/cli/workspace-ports/ports.ts +++ b/src/cli/workspace-ports/ports.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../shared/file-access/cross-platform-path' import type { FolderWorkspace } from '../../shared/folder-workspaces/folder-workspace-types' import type { RuntimeStatus } from '../../shared/remote-runtime/session-graph/runtime-session-contracts' import type { RuntimeWorktreeRecord } from '../../shared/worktree/catalog/runtime-worktree-contracts' diff --git a/src/cli/workspace-selection/caller-cwd-containment.ts b/src/cli/workspace-selection/caller-cwd-containment.ts index d3c0fcd148d..53b7fb1b401 100644 --- a/src/cli/workspace-selection/caller-cwd-containment.ts +++ b/src/cli/workspace-selection/caller-cwd-containment.ts @@ -2,9 +2,9 @@ import { resolve as resolvePath } from 'node:path' import { isPathInsideOrEqual, normalizeRuntimePathForComparison -} from '../../shared/cross-platform-path' +} from '../../shared/file-access/cross-platform-path' import { LOCAL_EXECUTION_HOST_ID, type ExecutionHostId } from '../../shared/execution-host' -import { resolveRealPathSync } from '../../shared/real-path-sync' +import { resolveRealPathSync } from '../../shared/file-access/real-path-sync' // One CLI process is one command, so the folder prefilter and ranking share each resolution. const realPaths = new Map() diff --git a/src/cli/workspace-selection/wsl-caller-path-selector.ts b/src/cli/workspace-selection/wsl-caller-path-selector.ts index 81727a2ea68..5fa153303be 100644 --- a/src/cli/workspace-selection/wsl-caller-path-selector.ts +++ b/src/cli/workspace-selection/wsl-caller-path-selector.ts @@ -3,7 +3,7 @@ import type { RuntimeWorktreeListResult } from '../../shared/worktree/catalog/ru import { isWslUncPathForCallerLinuxPath, isWslUncPathForLinuxMountedPath -} from '../../shared/cross-platform-path' +} from '../../shared/file-access/cross-platform-path' import { parseWslUncPath } from '../../shared/file-access/wsl-paths' import type { RuntimeClient } from '../runtime/client' import { RuntimeClientError, RuntimeRpcFailureError } from '../runtime/connection/types' diff --git a/src/cli/workspaces/workspace-cleanup-format.ts b/src/cli/workspaces/workspace-cleanup-format.ts index 6b51c538614..a77e3365fa7 100644 --- a/src/cli/workspaces/workspace-cleanup-format.ts +++ b/src/cli/workspaces/workspace-cleanup-format.ts @@ -1,4 +1,4 @@ -import { formatBytes } from '../../shared/format-bytes' +import { formatBytes } from '../../shared/text/format-bytes' import { terminalSafeLine } from '../../shared/terminal/output/terminal-safe-text' import type { WorkspaceCleanupEvaluation, diff --git a/src/main/agent-hooks/installation/configuration/hooks-json-read.ts b/src/main/agent-hooks/installation/configuration/hooks-json-read.ts index 210e63a928c..c14846d3e53 100644 --- a/src/main/agent-hooks/installation/configuration/hooks-json-read.ts +++ b/src/main/agent-hooks/installation/configuration/hooks-json-read.ts @@ -1,6 +1,6 @@ import { readObservedFileSync as readFileSync } from '../../../filesystem/file-content-observation' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import type { HooksConfig } from './hook-config-schema' export function isPlainObject(value: unknown): value is Record { diff --git a/src/main/ai-vault-search/scope/session-search-scope-paths.ts b/src/main/ai-vault-search/scope/session-search-scope-paths.ts index f44f4ed0b4b..51d82d3b16d 100644 --- a/src/main/ai-vault-search/scope/session-search-scope-paths.ts +++ b/src/main/ai-vault-search/scope/session-search-scope-paths.ts @@ -4,7 +4,7 @@ import { isRuntimePathAbsolute, normalizeRuntimePathForComparison, resolveRuntimePath -} from '../../../shared/cross-platform-path' +} from '../../../shared/file-access/cross-platform-path' import { isFolderRepo } from '../../../shared/repository/repo-kind' import { resolveConfiguredWorktreeBasePaths } from '../../../shared/worktree/paths/configured-worktree-base-path' import { buildKnownOrcaWorkspaceLayouts } from '../../../shared/worktree/visibility/ownership' diff --git a/src/main/ai-vault-search/storage/session-search-file-records.ts b/src/main/ai-vault-search/storage/session-search-file-records.ts index ef8b3f115a7..175d08e2e70 100644 --- a/src/main/ai-vault-search/storage/session-search-file-records.ts +++ b/src/main/ai-vault-search/storage/session-search-file-records.ts @@ -4,7 +4,7 @@ import type { TranscriptSessionIdentity } from '../../ai-vault/transcripts/sessi import type { SessionFileCandidate } from '../../ai-vault/session-scanner-types' import type SyncDatabase from '../../sqlite/sync-database' import { EMPTY_CONTENT_HASH, type SessionContentHash } from './session-search-content-hash' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' /** Use the sidebar’s path normalization so indexed cwd keys join its folder groups. */ export function cwdKey(cwd: string | null): string | null { diff --git a/src/main/ai-vault/deletion/session-delete-target.ts b/src/main/ai-vault/deletion/session-delete-target.ts index 3efb816883f..08a9e07d5f4 100644 --- a/src/main/ai-vault/deletion/session-delete-target.ts +++ b/src/main/ai-vault/deletion/session-delete-target.ts @@ -13,7 +13,7 @@ import { normalizeExecutionHostId, type ExecutionHostId } from '../../../shared/execution-host' -import { isPathInsideOrEqual } from '../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../shared/file-access/cross-platform-path' import { AI_VAULT_AGENT_SOURCES, sessionRowRootDirs diff --git a/src/main/ai-vault/deletion/session-delete.ts b/src/main/ai-vault/deletion/session-delete.ts index 14711cac51c..6ccd382d592 100644 --- a/src/main/ai-vault/deletion/session-delete.ts +++ b/src/main/ai-vault/deletion/session-delete.ts @@ -3,7 +3,7 @@ import type { AiVaultDeleteSessionResult, AiVaultSessionDeleteRemoval } from '../../../shared/ai-vault/contracts/ai-vault-session-deletion' -import { isPathInsideOrEqual } from '../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../shared/file-access/cross-platform-path' import { validateAiVaultSessionDeleteTarget, type ValidateAiVaultSessionDeleteTargetArgs diff --git a/src/main/ai-vault/discovery/agent-session-directories.ts b/src/main/ai-vault/discovery/agent-session-directories.ts index 51b12529528..e4213fb9eea 100644 --- a/src/main/ai-vault/discovery/agent-session-directories.ts +++ b/src/main/ai-vault/discovery/agent-session-directories.ts @@ -1,6 +1,6 @@ import { homedir } from 'node:os' import { basename, join } from 'node:path' -import { resolveAbsoluteDirOverride } from '../../../shared/absolute-dir-override' +import { resolveAbsoluteDirOverride } from '../../../shared/file-access/absolute-dir-override' // Accept Pi/OMP home, agent, or sessions paths. export function normalizeAgentSessionsDir( diff --git a/src/main/ai-vault/discovery/session-scanner-agent-sources.ts b/src/main/ai-vault/discovery/session-scanner-agent-sources.ts index 16f2d88e7c9..f829547b888 100644 --- a/src/main/ai-vault/discovery/session-scanner-agent-sources.ts +++ b/src/main/ai-vault/discovery/session-scanner-agent-sources.ts @@ -1,11 +1,11 @@ import { homedir } from 'node:os' import { basename, dirname, join } from 'node:path' import { pathSegments } from './session-file-discovery' -import { resolveAbsoluteDirOverride } from '../../../shared/absolute-dir-override' +import { resolveAbsoluteDirOverride } from '../../../shared/file-access/absolute-dir-override' import type { AiVaultAgent } from '../../../shared/ai-vault/contracts/ai-vault-types' import type { AiVaultDeletableAgent } from '../../../shared/ai-vault/contracts/ai-vault-session-deletion' import { resolveGrokSessionsDir } from '../../../shared/agent-hook-listener/providers/grok/grok-session-paths' -import { resolveKiroHomeDir } from '../../../shared/kiro-home' +import { resolveKiroHomeDir } from '../../../shared/agent-launch/environment/kiro-home' import { uniqueCodexSessionsDirs } from '../scanners/codex/session-scanner-codex-paths' import { clineMessagesPathForMetadata, diff --git a/src/main/ai-vault/discovery/session-scanner-roots.ts b/src/main/ai-vault/discovery/session-scanner-roots.ts index 929c953ff56..e0b38b95bcd 100644 --- a/src/main/ai-vault/discovery/session-scanner-roots.ts +++ b/src/main/ai-vault/discovery/session-scanner-roots.ts @@ -1,7 +1,7 @@ import { claudeProfileHistoryDirs } from '../../claude-accounts/profiles/routing/claude-profile-installed-router' import { homedir } from 'node:os' import { join } from 'node:path' -import { resolveAbsoluteDirOverride } from '../../../shared/absolute-dir-override' +import { resolveAbsoluteDirOverride } from '../../../shared/file-access/absolute-dir-override' import { WSL_CODEX_RUNTIME_HOME_SEGMENTS } from '../../pty/shell-startup/codex-home-wsl-env' import { ompProfileSessionsDirs, resolveOmpSessionsDir } from '../scanners/omp/omp-session-root' diff --git a/src/main/ai-vault/scanners/claude/claude-project-dir-encoding.ts b/src/main/ai-vault/scanners/claude/claude-project-dir-encoding.ts index 7d6025ebd0f..8358ab3578d 100644 --- a/src/main/ai-vault/scanners/claude/claude-project-dir-encoding.ts +++ b/src/main/ai-vault/scanners/claude/claude-project-dir-encoding.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathSeparators } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathSeparators } from '../../../../shared/file-access/cross-platform-path' /** Encode case-preserving raw paths and NFC variants; comparison keys lose Windows case and macOS can supply NFD. */ export function encodeClaudeProjectPaths(pathValue: string): string[] { diff --git a/src/main/ai-vault/scanners/kimi/session-scanner-kimi-paths.ts b/src/main/ai-vault/scanners/kimi/session-scanner-kimi-paths.ts index 29cd75b529d..de7887ff29a 100644 --- a/src/main/ai-vault/scanners/kimi/session-scanner-kimi-paths.ts +++ b/src/main/ai-vault/scanners/kimi/session-scanner-kimi-paths.ts @@ -5,7 +5,7 @@ import { import { homedir } from 'node:os' import { basename, dirname, join } from 'node:path' import { createInterface } from 'node:readline' -import { resolveAbsoluteDirOverride } from '../../../../shared/absolute-dir-override' +import { resolveAbsoluteDirOverride } from '../../../../shared/file-access/absolute-dir-override' import { openTranscriptReadStream, wslGatedStat diff --git a/src/main/ai-vault/scanners/openclaw/openclaw-session-layout.ts b/src/main/ai-vault/scanners/openclaw/openclaw-session-layout.ts index bdd515a85ae..5141df3a3bf 100644 --- a/src/main/ai-vault/scanners/openclaw/openclaw-session-layout.ts +++ b/src/main/ai-vault/scanners/openclaw/openclaw-session-layout.ts @@ -1,6 +1,6 @@ import { homedir } from 'node:os' import { basename, join } from 'node:path' -import { resolveAbsoluteDirOverride } from '../../../../shared/absolute-dir-override' +import { resolveAbsoluteDirOverride } from '../../../../shared/file-access/absolute-dir-override' import type { AiVaultAgentSource } from '../../discovery/session-scanner-agent-sources' import { pathSegments } from '../../discovery/session-file-discovery' diff --git a/src/main/ai-vault/scanners/opencode/reader-transport/session-scanner-opencode-sqlite-process-framing.ts b/src/main/ai-vault/scanners/opencode/reader-transport/session-scanner-opencode-sqlite-process-framing.ts index 98c1db63794..1e88cc5844c 100644 --- a/src/main/ai-vault/scanners/opencode/reader-transport/session-scanner-opencode-sqlite-process-framing.ts +++ b/src/main/ai-vault/scanners/opencode/reader-transport/session-scanner-opencode-sqlite-process-framing.ts @@ -1,4 +1,4 @@ -import { SearchSubprocessLineAccumulator } from '../../../../../shared/search-subprocess-lines' +import { SearchSubprocessLineAccumulator } from '../../../../../shared/process-streams/search-subprocess-lines' export const OPENCODE_SQLITE_REQUEST_MAX_BYTES = 1024 * 1024 export const OPENCODE_SQLITE_RESPONSE_MAX_BYTES = 32 * 1024 * 1024 diff --git a/src/main/ai-vault/scope/session-scope-real-paths.ts b/src/main/ai-vault/scope/session-scope-real-paths.ts index 2d5510d7f8b..af5972676e9 100644 --- a/src/main/ai-vault/scope/session-scope-real-paths.ts +++ b/src/main/ai-vault/scope/session-scope-real-paths.ts @@ -7,7 +7,7 @@ import type { import { normalizeRuntimePathForComparison, relativePathInsideRoot -} from '../../../shared/cross-platform-path' +} from '../../../shared/file-access/cross-platform-path' import { sessionFileExecutionNamespace } from '../../../shared/ai-vault/scanning/ai-vault-scope-cwd-match' import { parseWslUncPath } from '../../../shared/file-access/wsl-paths' diff --git a/src/main/ai-vault/structured-sessions/structured-session-ownership.ts b/src/main/ai-vault/structured-sessions/structured-session-ownership.ts index 1460ba11742..acd258be96b 100644 --- a/src/main/ai-vault/structured-sessions/structured-session-ownership.ts +++ b/src/main/ai-vault/structured-sessions/structured-session-ownership.ts @@ -8,7 +8,7 @@ import { } from '../../../shared/agent-session/lifecycle/accounts/agent-session-account-home' import { acquiredAgentSessionAccount } from '../../../shared/agent-session/lifecycle/accounts/agent-session-acquired-account' import { CLAUDE_STRUCTURED_AGENT } from '../../claude/structured/claude-structured-agent-definition' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { resolveOrcaManagedCodexHomePath } from '../../codex/configuration/homes/codex-home-paths' import { agentSessionOwnerObservationIsLive } from '../../../shared/agent-session/lifecycle/leases/agent-session-lease-adjudication' import { defaultAgentChatLabel } from '../../../shared/agent-session/agent-session-chat-label' diff --git a/src/main/ai-vault/transcripts/local-log-tail-reader.test.ts b/src/main/ai-vault/transcripts/local-log-tail-reader.test.ts index 64d34c8edd1..1a7579445b0 100644 --- a/src/main/ai-vault/transcripts/local-log-tail-reader.test.ts +++ b/src/main/ai-vault/transcripts/local-log-tail-reader.test.ts @@ -2,7 +2,7 @@ import { mkdtemp, rename, rm, truncate, writeFile } from 'node:fs/promises' import { join } from 'node:path' import { tmpdir } from 'node:os' import { afterEach, describe, expect, it } from 'vitest' -import { LOCAL_LOG_TAIL_CHUNK_BYTES } from '../../../shared/local-log-tail-types' +import { LOCAL_LOG_TAIL_CHUNK_BYTES } from '../../../shared/file-content/local-log-tail-types' import { readLocalLogTailRange } from './local-log-tail-reader' const tempPaths: string[] = [] diff --git a/src/main/ai-vault/transcripts/local-log-tail-reader.ts b/src/main/ai-vault/transcripts/local-log-tail-reader.ts index 86b1eb2636b..4c4ef9d84d1 100644 --- a/src/main/ai-vault/transcripts/local-log-tail-reader.ts +++ b/src/main/ai-vault/transcripts/local-log-tail-reader.ts @@ -3,7 +3,7 @@ import { LOCAL_READ_OPEN_FLAGS } from '../../ipc/filesystem/local-regular-file-r import { LOCAL_LOG_TAIL_CHUNK_BYTES, type LocalLogTailReadResult -} from '../../../shared/local-log-tail-types' +} from '../../../shared/file-content/local-log-tail-types' export function localLogFileIdentity(stats: { dev: number diff --git a/src/main/automations/external-managers/external-automation-owner-guard.ts b/src/main/automations/external-managers/external-automation-owner-guard.ts index cd34625cb72..0d913c0deb1 100644 --- a/src/main/automations/external-managers/external-automation-owner-guard.ts +++ b/src/main/automations/external-managers/external-automation-owner-guard.ts @@ -9,7 +9,7 @@ import { externalAutomationTargetRemovedError, isExternalAutomationProvider, type ScopedExternalAutomationRequest -} from '../../../shared/external-automation-scope' +} from '../../../shared/automations/external/external-automation-scope' import { ownerKey } from '../../../shared/automations/ownership/automation-owner-key' import { sanitizeSshTargetGeneration } from '../../../shared/remote-runtime/ssh/ssh-target-generation' import type { diff --git a/src/main/automations/external-managers/scoped-external-automations.ts b/src/main/automations/external-managers/scoped-external-automations.ts index 1d5e4931a71..aa7cfe267f6 100644 --- a/src/main/automations/external-managers/scoped-external-automations.ts +++ b/src/main/automations/external-managers/scoped-external-automations.ts @@ -2,7 +2,7 @@ import type { ScopedExternalAutomationRequest, ScopedExternalManagerActionRequest, ScopedExternalManagerListRequest -} from '../../../shared/external-automation-scope' +} from '../../../shared/automations/external/external-automation-scope' import { resolveExternalAutomationScope, type DesktopSshTargetRegistry, diff --git a/src/main/bitbucket/credential-connection.ts b/src/main/bitbucket/credential-connection.ts index b3ecbe6fdb1..32b273046e8 100644 --- a/src/main/bitbucket/credential-connection.ts +++ b/src/main/bitbucket/credential-connection.ts @@ -17,8 +17,8 @@ import type { BitbucketConnectArgs, BitbucketConnectResult, BitbucketConnectionStatus -} from '../../shared/bitbucket-credentials' -import { bitbucketConnectFailure } from '../../shared/bitbucket-credentials' +} from '../../shared/bitbucket/bitbucket-credentials' +import { bitbucketConnectFailure } from '../../shared/bitbucket/bitbucket-credentials' export type { BitbucketConnectArgs, BitbucketConnectResult, BitbucketConnectionStatus } diff --git a/src/main/bitbucket/credential-store.ts b/src/main/bitbucket/credential-store.ts index 3dd8f6c0d7d..889a2c8832d 100644 --- a/src/main/bitbucket/credential-store.ts +++ b/src/main/bitbucket/credential-store.ts @@ -8,7 +8,7 @@ import { writeCredentialFileAtomic, writeEncryptedCredential } from '../credentials/integration-credential-file' -import type { BitbucketAuthMode } from '../../shared/bitbucket-credentials' +import type { BitbucketAuthMode } from '../../shared/bitbucket/bitbucket-credentials' import { readCredentialFileProtection } from '../credentials/credential-file-protection' import type { SecretAtRestProtection } from '../../shared/secure-storage/secret-at-rest-protection' diff --git a/src/main/browser/document-preview/doc-preview-grant-registry.ts b/src/main/browser/document-preview/doc-preview-grant-registry.ts index 133f477cccf..822ede014da 100644 --- a/src/main/browser/document-preview/doc-preview-grant-registry.ts +++ b/src/main/browser/document-preview/doc-preview-grant-registry.ts @@ -1,6 +1,6 @@ import { randomBytes } from 'node:crypto' import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../shared/file-access/cross-platform-path' import { parseDocPreviewUrl } from '../../../shared/document-preview/doc-preview-scheme' export type DocPreviewOwner = diff --git a/src/main/browser/routing/partitions/browser-route-partition-pending-deletes.ts b/src/main/browser/routing/partitions/browser-route-partition-pending-deletes.ts index 196060e1710..156c928e408 100644 --- a/src/main/browser/routing/partitions/browser-route-partition-pending-deletes.ts +++ b/src/main/browser/routing/partitions/browser-route-partition-pending-deletes.ts @@ -8,7 +8,7 @@ import { dirname, join, resolve } from 'node:path' import { normalizeRuntimePathForComparison, relativePathInsideRoot -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' const PENDING_DELETES_FILE_NAME = 'browser-route-partition-pending-deletes.json' diff --git a/src/main/claude-accounts/profiles/claude-profile-paths.ts b/src/main/claude-accounts/profiles/claude-profile-paths.ts index df27ed19447..9717aacf114 100644 --- a/src/main/claude-accounts/profiles/claude-profile-paths.ts +++ b/src/main/claude-accounts/profiles/claude-profile-paths.ts @@ -5,7 +5,7 @@ import { CLAUDE_INJECTED_CONFIG_DIR_ENV, CLAUDE_USER_CONFIG_DIR_ENV } from '../../../shared/agent-accounts/claude/claude-profile-routing' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import type { ExecutionHostId } from '../../../shared/execution-host' import { writeFileAtomically } from '../../filesystem/atomic-file-publication' import { ClaudeProfileSurfaceError } from './claude-profile-report' diff --git a/src/main/claude-accounts/profiles/routing/claude-observed-config-dirs.ts b/src/main/claude-accounts/profiles/routing/claude-observed-config-dirs.ts index c78d5b3ee50..2d567ed8df0 100644 --- a/src/main/claude-accounts/profiles/routing/claude-observed-config-dirs.ts +++ b/src/main/claude-accounts/profiles/routing/claude-observed-config-dirs.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'node:fs' import { basename, dirname, isAbsolute, resolve } from 'node:path' -import { resolveAbsoluteDirOverride } from '../../../../shared/absolute-dir-override' +import { resolveAbsoluteDirOverride } from '../../../../shared/file-access/absolute-dir-override' import type { GlobalSettings } from '../../../../shared/global-settings-types' import { writeFileAtomically } from '../../../filesystem/atomic-file-publication' import { isDirectory } from '../claude-profile-homes' diff --git a/src/main/claude-accounts/profiles/setup/claude-profile-prompt-history.ts b/src/main/claude-accounts/profiles/setup/claude-profile-prompt-history.ts index 33bf88b88b7..1a58f07b2e0 100644 --- a/src/main/claude-accounts/profiles/setup/claude-profile-prompt-history.ts +++ b/src/main/claude-accounts/profiles/setup/claude-profile-prompt-history.ts @@ -16,7 +16,7 @@ import { type Stats } from 'node:fs' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { writeFileAtomically } from '../../../filesystem/atomic-file-publication' import { renameFileWithWindowsRetry } from '../../../../shared/file-write/windows-retry-file-operations' import { diff --git a/src/main/claude-accounts/profiles/setup/claude-profile-provisioning.ts b/src/main/claude-accounts/profiles/setup/claude-profile-provisioning.ts index b02cd2fb031..4da320493f9 100644 --- a/src/main/claude-accounts/profiles/setup/claude-profile-provisioning.ts +++ b/src/main/claude-accounts/profiles/setup/claude-profile-provisioning.ts @@ -1,7 +1,7 @@ import { randomUUID } from 'node:crypto' import { existsSync, readdirSync, rmSync, statSync, writeFileSync } from 'node:fs' import { dirname, join, resolve } from 'node:path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { resolveClaudeGlobalConfigFile, updateClaudeGlobalConfig diff --git a/src/main/claude-accounts/profiles/setup/claude-profile-sharing.ts b/src/main/claude-accounts/profiles/setup/claude-profile-sharing.ts index 8a942b2e9cf..24828798589 100644 --- a/src/main/claude-accounts/profiles/setup/claude-profile-sharing.ts +++ b/src/main/claude-accounts/profiles/setup/claude-profile-sharing.ts @@ -10,7 +10,7 @@ import { unlinkSync } from 'node:fs' import { dirname } from 'node:path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { writeFileAtomically } from '../../../filesystem/atomic-file-publication' import type { ClaudeProfileSurfaceOutcome } from '../claude-profile-report' diff --git a/src/main/claude-usage/transcript-file-discovery.ts b/src/main/claude-usage/transcript-file-discovery.ts index a39ec5535ae..9079c71906a 100644 --- a/src/main/claude-usage/transcript-file-discovery.ts +++ b/src/main/claude-usage/transcript-file-discovery.ts @@ -2,7 +2,7 @@ import { claudeProfileHistoryDirs } from '../claude-accounts/profiles/routing/cl import { homedir } from 'node:os' import { join } from 'node:path' import { readdir } from 'node:fs/promises' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' const CLAUDE_PROJECTS_DIR = join(homedir(), '.claude', 'projects') const CLAUDE_TRANSCRIPTS_DIR = join(homedir(), '.claude', 'transcripts') diff --git a/src/main/claude/hooks/claude-profile-hook-target.ts b/src/main/claude/hooks/claude-profile-hook-target.ts index c868576cc07..54e62146879 100644 --- a/src/main/claude/hooks/claude-profile-hook-target.ts +++ b/src/main/claude/hooks/claude-profile-hook-target.ts @@ -1,7 +1,7 @@ import { statSync } from 'node:fs' import { dirname, resolve } from 'node:path' import type { AgentHookInstallStatus } from '../../../shared/agent-hook-listener/configuration/agent-hook-types' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { getConfigPath, type ClaudeCompatibleHookSettings } from './hook-settings' function sameFile(left: string, right: string): boolean { diff --git a/src/main/claude/theme-sync/claude-code-theme-ownership.ts b/src/main/claude/theme-sync/claude-code-theme-ownership.ts index 7c173455db6..6d87471a659 100644 --- a/src/main/claude/theme-sync/claude-code-theme-ownership.ts +++ b/src/main/claude/theme-sync/claude-code-theme-ownership.ts @@ -1,7 +1,7 @@ import { readFile } from 'node:fs/promises' import { homedir } from 'node:os' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { isPlainObject, parseHooksJsonText diff --git a/src/main/claude/theme-sync/claude-code-theme-sync.ts b/src/main/claude/theme-sync/claude-code-theme-sync.ts index e79c56586ec..2d6362f4e9f 100644 --- a/src/main/claude/theme-sync/claude-code-theme-sync.ts +++ b/src/main/claude/theme-sync/claude-code-theme-sync.ts @@ -1,7 +1,7 @@ import { randomUUID } from 'node:crypto' import { mkdir, readFile, realpath, rename, rm, stat, writeFile } from 'node:fs/promises' import { dirname, join } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { readHooksJson } from '../../agent-hooks/installation/configuration/hooks-json-read' import { writeHooksJson } from '../../agent-hooks/installation/configuration/hooks-json-write' import { defaultClaudeConfigDir } from '../structured/launch/claude-config-dir-pin' diff --git a/src/main/claude/transcripts/claude-provider-session-rename.ts b/src/main/claude/transcripts/claude-provider-session-rename.ts index 5276737cb47..775d75b5440 100644 --- a/src/main/claude/transcripts/claude-provider-session-rename.ts +++ b/src/main/claude/transcripts/claude-provider-session-rename.ts @@ -1,7 +1,7 @@ import type { SessionStoreEntry } from '@anthropic-ai/claude-agent-sdk' import { appendFile, open } from 'node:fs/promises' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { wslGatedReaddir, wslGatedStat diff --git a/src/main/codex-accounts/account-management/codex-account-registration.ts b/src/main/codex-accounts/account-management/codex-account-registration.ts index 55c57e2ddc6..e132f024815 100644 --- a/src/main/codex-accounts/account-management/codex-account-registration.ts +++ b/src/main/codex-accounts/account-management/codex-account-registration.ts @@ -1,7 +1,7 @@ import { randomUUID } from 'node:crypto' import { copyFileSync, mkdirSync, rmSync } from 'node:fs' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { WINDOWS_RM_MAX_RETRIES, WINDOWS_RM_RETRY_DELAY_MS diff --git a/src/main/codex-accounts/credentials/codex-account-identity.ts b/src/main/codex-accounts/credentials/codex-account-identity.ts index 4b9d6b2fc0e..bc5191d62d7 100644 --- a/src/main/codex-accounts/credentials/codex-account-identity.ts +++ b/src/main/codex-accounts/credentials/codex-account-identity.ts @@ -1,7 +1,7 @@ import { readFileSync } from 'node:fs' import { homedir } from 'node:os' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import type { CodexSystemDefaultIdentity } from '../../../shared/agent-accounts/managed-account-types' import { readCodexAuthIdentity, diff --git a/src/main/codex-accounts/credentials/codex-credential-absence-grace.ts b/src/main/codex-accounts/credentials/codex-credential-absence-grace.ts index c7ea4e5dd6c..026fd0f7ed2 100644 --- a/src/main/codex-accounts/credentials/codex-credential-absence-grace.ts +++ b/src/main/codex-accounts/credentials/codex-credential-absence-grace.ts @@ -1,6 +1,6 @@ import { existsSync } from 'node:fs' import { dirname } from 'node:path' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { readStoredCodexCredentialState, type StoredCodexCredentialState diff --git a/src/main/codex-accounts/credentials/managed-codex-auth-readiness.ts b/src/main/codex-accounts/credentials/managed-codex-auth-readiness.ts index 01e79e2f867..883fa9d30cc 100644 --- a/src/main/codex-accounts/credentials/managed-codex-auth-readiness.ts +++ b/src/main/codex-accounts/credentials/managed-codex-auth-readiness.ts @@ -1,7 +1,7 @@ import { readFileSync } from 'node:fs' import { join } from 'node:path' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import type { GlobalSettings } from '../../../shared/global-settings-types' import type { CodexAccountSelectionTarget } from '../../../shared/agent-accounts/codex/codex-selection-lane' diff --git a/src/main/codex-accounts/managed-homes/codex-config-mirror.ts b/src/main/codex-accounts/managed-homes/codex-config-mirror.ts index 1513e3e76a8..751662d1294 100644 --- a/src/main/codex-accounts/managed-homes/codex-config-mirror.ts +++ b/src/main/codex-accounts/managed-homes/codex-config-mirror.ts @@ -1,7 +1,7 @@ import { existsSync, readFileSync } from 'node:fs' import { homedir } from 'node:os' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { createIntegrationStateFileCache } from '../../credentials/integration-state-file-cache' import { parseWslUncPath, toWindowsWslPath } from '../../../shared/file-access/wsl-paths' import { diff --git a/src/main/codex-accounts/managed-homes/codex-managed-home-lifecycle.ts b/src/main/codex-accounts/managed-homes/codex-managed-home-lifecycle.ts index f7a921b21bb..3b3b8975225 100644 --- a/src/main/codex-accounts/managed-homes/codex-managed-home-lifecycle.ts +++ b/src/main/codex-accounts/managed-homes/codex-managed-home-lifecycle.ts @@ -1,6 +1,6 @@ import { mkdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs' import { dirname, join, resolve, sep } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { WINDOWS_RM_MAX_RETRIES, WINDOWS_RM_RETRY_DELAY_MS diff --git a/src/main/codex-accounts/managed-homes/host-codex-managed-home-ownership.ts b/src/main/codex-accounts/managed-homes/host-codex-managed-home-ownership.ts index 23b433bc65a..813a736dee5 100644 --- a/src/main/codex-accounts/managed-homes/host-codex-managed-home-ownership.ts +++ b/src/main/codex-accounts/managed-homes/host-codex-managed-home-ownership.ts @@ -1,6 +1,6 @@ import { lstatSync, readFileSync, realpathSync, statSync } from 'node:fs' import { isAbsolute, join, relative, resolve, sep } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' type HostCodexManagedHomeOwnershipOptions = { candidatePath: string diff --git a/src/main/codex-accounts/runtime-home/credentials/runtime-home-service-auth-core.ts b/src/main/codex-accounts/runtime-home/credentials/runtime-home-service-auth-core.ts index 48220ce9bdd..520b3dedd0a 100644 --- a/src/main/codex-accounts/runtime-home/credentials/runtime-home-service-auth-core.ts +++ b/src/main/codex-accounts/runtime-home/credentials/runtime-home-service-auth-core.ts @@ -1,6 +1,6 @@ import { existsSync, chmodSync, readFileSync, rmSync } from 'node:fs' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { getSystemCodexHomePath } from '../../../codex/configuration/homes/codex-home-paths' import { writeFileAtomically, diff --git a/src/main/codex-accounts/runtime-home/routing/runtime-home-service-home-routing.ts b/src/main/codex-accounts/runtime-home/routing/runtime-home-service-home-routing.ts index cb6de319a11..5a580d0ccb7 100644 --- a/src/main/codex-accounts/runtime-home/routing/runtime-home-service-home-routing.ts +++ b/src/main/codex-accounts/runtime-home/routing/runtime-home-service-home-routing.ts @@ -4,7 +4,7 @@ import { toLinuxPath, toWindowsWslUncPath } from '../../../../shared/file-access/wsl-paths' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { getDefaultWslDistro, getWslHome } from '../../../wsl/discovery/distro-catalog' import { getCachedWslHome } from '../../../wsl/discovery/wsl-home-cache' import { isWslDistroRunning } from '../../../wsl/discovery/wsl-background-distro-gate' diff --git a/src/main/codex-accounts/runtime-home/routing/runtime-home-service-launch.ts b/src/main/codex-accounts/runtime-home/routing/runtime-home-service-launch.ts index b47d6738e5a..0be2b424cb1 100644 --- a/src/main/codex-accounts/runtime-home/routing/runtime-home-service-launch.ts +++ b/src/main/codex-accounts/runtime-home/routing/runtime-home-service-launch.ts @@ -8,7 +8,7 @@ import { syncSystemCodexResourcesIntoManagedHome } from '../../../codex/configuration/homes/codex-home-paths' import { syncSystemConfigIntoManagedCodexHome } from '../../../codex/configuration/settings/codex-config-mirror' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { normalizeCodexRuntimeSelection } from '../../account-management/runtime-selection' import type { CodexAccountSelectionTarget } from '../../../../shared/agent-accounts/codex/codex-selection-lane' import { hasCustomCodexHomeOverrideForLaunch } from '../../../codex/configuration/homes/codex-real-home-path' diff --git a/src/main/codex-accounts/runtime-home/routing/runtime-home-service-managed-home.ts b/src/main/codex-accounts/runtime-home/routing/runtime-home-service-managed-home.ts index eda944627d4..438781c299d 100644 --- a/src/main/codex-accounts/runtime-home/routing/runtime-home-service-managed-home.ts +++ b/src/main/codex-accounts/runtime-home/routing/runtime-home-service-managed-home.ts @@ -1,6 +1,6 @@ import { statSync } from 'node:fs' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { syncSystemCodexResourcesIntoManagedHome, getSystemCodexHomePath, @@ -14,7 +14,7 @@ import { resolveWslCodexSessionSourceHome } from '../../../codex/history/rollouts/codex-session-source-home' import { parseWslUncPath } from '../../../../shared/file-access/wsl-paths' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { normalizeCodexRuntimeSelection } from '../../account-management/runtime-selection' import { resolveHostCodexManagedHomeVerdict, diff --git a/src/main/codex-cli/codex-home-process-lock.ts b/src/main/codex-cli/codex-home-process-lock.ts index 6f80a1ee61f..9e12939cbc9 100644 --- a/src/main/codex-cli/codex-home-process-lock.ts +++ b/src/main/codex-cli/codex-home-process-lock.ts @@ -1,6 +1,6 @@ import { homedir } from 'node:os' import { join } from 'node:path' -import { normalizeRuntimePathForComparison } from '../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../shared/file-access/cross-platform-path' // Serialize Orca-owned spawns per home to prevent refresh-token rotation races; terminals are exempt. const lockTails = new Map>() diff --git a/src/main/codex-usage/codex-session-file-discovery.ts b/src/main/codex-usage/codex-session-file-discovery.ts index 62c47e98f3f..e1be6991ebf 100644 --- a/src/main/codex-usage/codex-session-file-discovery.ts +++ b/src/main/codex-usage/codex-session-file-discovery.ts @@ -8,7 +8,7 @@ import { import { getCodexAccountHomeSessionDirectories } from '../codex/history/rollouts/codex-account-home-discovery' import { getLegacyCopiedCodexSessionBridgeScanPreference } from '../codex/history/bridges/codex-session-bridge' import { normalizeFsPath } from '../usage/worktree-attribution/usage-path-comparison' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' const YIELD_EVERY_DISCOVERY_ENTRIES = 100 diff --git a/src/main/codex/configuration/codex-path-observation.ts b/src/main/codex/configuration/codex-path-observation.ts index 55483f55a30..38b5b18ba9c 100644 --- a/src/main/codex/configuration/codex-path-observation.ts +++ b/src/main/codex/configuration/codex-path-observation.ts @@ -1,5 +1,5 @@ import { statSync, type Stats } from 'node:fs' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { readAgentStateFileSync } from './agent-state-file-reader' // Distinguish unreadable from absent before mutations; existsSync collapses both to false. diff --git a/src/main/codex/configuration/homes/codex-pane-account-registry.ts b/src/main/codex/configuration/homes/codex-pane-account-registry.ts index 6aeaa29fec5..257d0b7757a 100644 --- a/src/main/codex/configuration/homes/codex-pane-account-registry.ts +++ b/src/main/codex/configuration/homes/codex-pane-account-registry.ts @@ -1,5 +1,5 @@ import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { dirname, join } from 'node:path' import { getOrcaUserDataPath } from './codex-home-paths' import { CodexPaneAccountRegistryMutations } from './codex-pane-account-registry-mutations' diff --git a/src/main/codex/configuration/homes/codex-pane-launch-account.ts b/src/main/codex/configuration/homes/codex-pane-launch-account.ts index 82f74735de5..193dcd8705b 100644 --- a/src/main/codex/configuration/homes/codex-pane-launch-account.ts +++ b/src/main/codex/configuration/homes/codex-pane-launch-account.ts @@ -1,5 +1,5 @@ import type { GlobalSettings } from '../../../../shared/global-settings-types' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { parseWslUncPath } from '../../../../shared/file-access/wsl-paths' import { getCodexSelectionTargetForAccount, diff --git a/src/main/codex/configuration/settings/config-settings-baseline.ts b/src/main/codex/configuration/settings/config-settings-baseline.ts index 08a15672f49..0c587b71ffa 100644 --- a/src/main/codex/configuration/settings/config-settings-baseline.ts +++ b/src/main/codex/configuration/settings/config-settings-baseline.ts @@ -1,5 +1,5 @@ import { writeFileSync } from 'node:fs' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { JsonTextStructureCapacityError } from '../../../../shared/json-stream/json-text-structure-limit' import { NodeFileReadTooLargeError } from '../../../../shared/file-content/node-bounded-file-reader' import { join } from 'node:path' diff --git a/src/main/codex/history/backfill/codex-session-backfill-audit.ts b/src/main/codex/history/backfill/codex-session-backfill-audit.ts index 203dd259d50..1fda8a627fd 100644 --- a/src/main/codex/history/backfill/codex-session-backfill-audit.ts +++ b/src/main/codex/history/backfill/codex-session-backfill-audit.ts @@ -2,7 +2,7 @@ import { createHash, randomUUID } from 'node:crypto' import type { Stats } from 'node:fs' import { appendFile, mkdir } from 'node:fs/promises' import { dirname } from 'node:path' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { streamCodexSessionLedgerRecords } from '../rollouts/codex-session-ledger-stream' import type { CodexSessionBackfillSummary } from './codex-session-backfill-types' diff --git a/src/main/codex/history/backfill/codex-session-backfill-marker.ts b/src/main/codex/history/backfill/codex-session-backfill-marker.ts index 97a14b7e738..d299cf3c4f6 100644 --- a/src/main/codex/history/backfill/codex-session-backfill-marker.ts +++ b/src/main/codex/history/backfill/codex-session-backfill-marker.ts @@ -1,6 +1,6 @@ import { mkdirSync, readFileSync, rmSync } from 'node:fs' import { dirname } from 'node:path' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { writeFileAtomically } from '../../../filesystem/atomic-file-publication' import { expandCodexSessionBackfillDatesThroughToday, diff --git a/src/main/codex/history/bridges/codex-account-session-bridge.ts b/src/main/codex/history/bridges/codex-account-session-bridge.ts index 99522f7ae8a..bdb90d8da52 100644 --- a/src/main/codex/history/bridges/codex-account-session-bridge.ts +++ b/src/main/codex/history/bridges/codex-account-session-bridge.ts @@ -1,5 +1,5 @@ import { join } from 'node:path' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { createCodexAccountStateDb, healCodexAccountSessionIndex diff --git a/src/main/codex/history/bridges/wsl-codex-session-bridge.ts b/src/main/codex/history/bridges/wsl-codex-session-bridge.ts index 67bf1afdee4..1f746843b56 100644 --- a/src/main/codex/history/bridges/wsl-codex-session-bridge.ts +++ b/src/main/codex/history/bridges/wsl-codex-session-bridge.ts @@ -1,5 +1,5 @@ import { posix as pathPosix } from 'node:path' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { parseWslUncPath } from '../../../../shared/file-access/wsl-paths' import { runWslProcess } from '../../../wsl/execution/wsl-runner' import { assertWslUncPathRunning } from '../../../wsl/filesystem/wsl-unc-access-gate' diff --git a/src/main/codex/history/index/codex-account-session-index-heal.ts b/src/main/codex/history/index/codex-account-session-index-heal.ts index b509ca7eee1..19d9fd4a1c5 100644 --- a/src/main/codex/history/index/codex-account-session-index-heal.ts +++ b/src/main/codex/history/index/codex-account-session-index-heal.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { isCodexAppServerUnsupportedError, runCodexAppServerSession diff --git a/src/main/codex/history/index/codex-session-index-heal-state.ts b/src/main/codex/history/index/codex-session-index-heal-state.ts index 5a043e41de8..fd0635c1e9a 100644 --- a/src/main/codex/history/index/codex-session-index-heal-state.ts +++ b/src/main/codex/history/index/codex-session-index-heal-state.ts @@ -3,7 +3,7 @@ import { dirname } from 'node:path' import { isPathInsideOrEqual, normalizeRuntimePathForComparison -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' import { writeFileAtomically } from '../../../filesystem/atomic-file-publication' import { streamCodexSessionLedgerRecords } from '../rollouts/codex-session-ledger-stream' diff --git a/src/main/codex/history/index/codex-state-db-backfill-recovery.ts b/src/main/codex/history/index/codex-state-db-backfill-recovery.ts index d2613b54e0a..854eefbba37 100644 --- a/src/main/codex/history/index/codex-state-db-backfill-recovery.ts +++ b/src/main/codex/history/index/codex-state-db-backfill-recovery.ts @@ -1,7 +1,7 @@ import { createHash } from 'node:crypto' import { join } from 'node:path' import { setTimeout as delay } from 'node:timers/promises' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { parseWslUncPath } from '../../../../shared/file-access/wsl-paths' import { withManagedHookInstallLock } from '../../../agent-hooks/installation/locking/managed-hook-install-lock' import { readManagedHookHostIdentity } from '../../../agent-hooks/installation/locking/managed-hook-owner-identity' diff --git a/src/main/codex/history/resume/codex-ai-vault-session-resume.ts b/src/main/codex/history/resume/codex-ai-vault-session-resume.ts index 471dbda7b4c..46b8156c27d 100644 --- a/src/main/codex/history/resume/codex-ai-vault-session-resume.ts +++ b/src/main/codex/history/resume/codex-ai-vault-session-resume.ts @@ -2,7 +2,7 @@ import type { AiVaultPrepareSessionResumeArgs, AiVaultPrepareSessionResumeResult } from '../../../../shared/ai-vault/resume/ai-vault-resume-preparation' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { LOCAL_EXECUTION_HOST_ID } from '../../../../shared/execution-host' import { parseWslUncPath } from '../../../../shared/file-access/wsl-paths' import type { CodexRuntimeHomeService } from '../../../codex-accounts/runtime-home-service' diff --git a/src/main/codex/history/resume/codex-legacy-session-resume.ts b/src/main/codex/history/resume/codex-legacy-session-resume.ts index 9ed8a34576d..69bc41d969d 100644 --- a/src/main/codex/history/resume/codex-legacy-session-resume.ts +++ b/src/main/codex/history/resume/codex-legacy-session-resume.ts @@ -9,7 +9,7 @@ import { isPerAccountManagedCodexHome } from '../../../../shared/ai-vault/resume/ai-vault-resume-preparation' import { LOCAL_EXECUTION_HOST_ID } from '../../../../shared/execution-host' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { parseWslUncPath } from '../../../../shared/file-access/wsl-paths' import { appendCodexSessionHealAuditRecord, diff --git a/src/main/codex/history/resume/codex-session-resume-home.ts b/src/main/codex/history/resume/codex-session-resume-home.ts index aca334454cd..f818adbf142 100644 --- a/src/main/codex/history/resume/codex-session-resume-home.ts +++ b/src/main/codex/history/resume/codex-session-resume-home.ts @@ -4,7 +4,7 @@ import { getRuntimePathBasename, normalizeRuntimePathForComparison, relativePathInsideRoot -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' import { listCodexSessionRolloutFilesIncrementally } from '../rollouts/codex-session-file-listing' import { ManagedCodexHomeTemporarilyUnavailableError } from '../../../codex-accounts/managed-homes/host-codex-managed-home-ownership' diff --git a/src/main/codex/history/resume/codex-session-resume-launch-preparation.ts b/src/main/codex/history/resume/codex-session-resume-launch-preparation.ts index cdecde8492d..60a0ca26236 100644 --- a/src/main/codex/history/resume/codex-session-resume-launch-preparation.ts +++ b/src/main/codex/history/resume/codex-session-resume-launch-preparation.ts @@ -18,7 +18,7 @@ import { getOrcaManagedCodexHomePath, getSystemCodexHomePath } from '../../configuration/homes/codex-home-paths' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import type { CodexRuntimeHomeService } from '../../../codex-accounts/runtime-home-service' import type { GlobalSettings } from '../../../../shared/global-settings-types' diff --git a/src/main/codex/history/rollouts/codex-rollout-item-projection.ts b/src/main/codex/history/rollouts/codex-rollout-item-projection.ts index a6f4faffb63..ec2c7cfa397 100644 --- a/src/main/codex/history/rollouts/codex-rollout-item-projection.ts +++ b/src/main/codex/history/rollouts/codex-rollout-item-projection.ts @@ -1,6 +1,6 @@ import { readRecord, readString } from '../../app-server/codex-item-field-readers' import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import type { CodexThreadItem } from '../../structured/items/codex-thread-item-identity' import { fileUriToFilesystemPath, diff --git a/src/main/codex/history/rollouts/codex-session-link-pass.ts b/src/main/codex/history/rollouts/codex-session-link-pass.ts index 63fb42635a3..56f6d22726e 100644 --- a/src/main/codex/history/rollouts/codex-session-link-pass.ts +++ b/src/main/codex/history/rollouts/codex-session-link-pass.ts @@ -2,8 +2,8 @@ import type { Dirent } from 'node:fs' import { lstat, mkdir, readdir, rmdir, stat } from 'node:fs/promises' import { dirname, join } from 'node:path' import { setImmediate as yieldToEventLoop } from 'node:timers/promises' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { parseCodexRolloutThreadId } from '../index/codex-session-index-heal-state' import { isCodexSessionRolloutFileName } from './codex-session-file-listing' import { linkCodexSessionFileAsync } from './codex-session-link' diff --git a/src/main/codex/hooks/installation/codex-hook-launch-preparation.ts b/src/main/codex/hooks/installation/codex-hook-launch-preparation.ts index c6ecd552880..7c3f0913473 100644 --- a/src/main/codex/hooks/installation/codex-hook-launch-preparation.ts +++ b/src/main/codex/hooks/installation/codex-hook-launch-preparation.ts @@ -1,5 +1,5 @@ import type { AgentHookInstallStatus } from '../../../../shared/agent-hook-listener/configuration/agent-hook-types' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { dedupeInFlightRun } from '../../../runtime/concurrency/in-flight-run-dedupe' import { getManagedScriptPath } from '../definitions/codex-hook-definition' import { buildCodexHookCommand as getManagedCommand } from '../definitions/codex-hook-command-form' diff --git a/src/main/codex/hooks/installation/codex-launch-preparation-inputs.ts b/src/main/codex/hooks/installation/codex-launch-preparation-inputs.ts index 848d790aa98..d46772e1aac 100644 --- a/src/main/codex/hooks/installation/codex-launch-preparation-inputs.ts +++ b/src/main/codex/hooks/installation/codex-launch-preparation-inputs.ts @@ -1,6 +1,6 @@ import { lstat, readlink, realpath, stat } from 'node:fs/promises' import { basename, dirname, join } from 'node:path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { readNodeFileWithinLimit } from '../../../../shared/file-content/node-bounded-file-reader' import { getGuardedOperationHeldPath } from '../../../filesystem/atomic-file-publication' import { diff --git a/src/main/codex/hooks/reconciliation/codex-hook-retired-commands.ts b/src/main/codex/hooks/reconciliation/codex-hook-retired-commands.ts index b869b7c74fe..b6c5c4af85b 100644 --- a/src/main/codex/hooks/reconciliation/codex-hook-retired-commands.ts +++ b/src/main/codex/hooks/reconciliation/codex-hook-retired-commands.ts @@ -1,5 +1,5 @@ import { posix, win32 } from 'node:path' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { getManagedScriptPath } from '../definitions/codex-hook-definition' // Enumerate retired forms to avoid deleting live hooks shared with other builds. diff --git a/src/main/codex/structured/catalog/codex-skill-sources-stamp.ts b/src/main/codex/structured/catalog/codex-skill-sources-stamp.ts index d1e89a0ef41..4f6f19376ac 100644 --- a/src/main/codex/structured/catalog/codex-skill-sources-stamp.ts +++ b/src/main/codex/structured/catalog/codex-skill-sources-stamp.ts @@ -11,7 +11,7 @@ import { import { readCopiedResourceSource } from '../../configuration/homes/codex-managed-home-resource-copy-marker' import { parse as parseToml } from 'smol-toml' import { waitForPromiseWithSignal } from '../../../../shared/concurrency/abort-signal-reason' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' // Mirrors Codex's skill walk (codex-rs ext/skills loader: MAX_SCAN_DEPTH). const CODEX_SKILL_SCAN_DEPTH = 6 diff --git a/src/main/codex/structured/session-lifecycle/codex-mcp-enabled-write.ts b/src/main/codex/structured/session-lifecycle/codex-mcp-enabled-write.ts index 13c3ccfd7ac..a08c4240d3d 100644 --- a/src/main/codex/structured/session-lifecycle/codex-mcp-enabled-write.ts +++ b/src/main/codex/structured/session-lifecycle/codex-mcp-enabled-write.ts @@ -1,5 +1,5 @@ import { join } from 'node:path' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { observeAgentStateFile } from '../../configuration/codex-path-observation' import { getSystemCodexHomePath } from '../../configuration/homes/codex-home-paths' import { observeCodexSettingsBaseline } from '../../configuration/settings/config-settings-baseline' diff --git a/src/main/codex/structured/session-lifecycle/codex-provider-session-rename.ts b/src/main/codex/structured/session-lifecycle/codex-provider-session-rename.ts index 23b2988fa86..eb7e878d9b7 100644 --- a/src/main/codex/structured/session-lifecycle/codex-provider-session-rename.ts +++ b/src/main/codex/structured/session-lifecycle/codex-provider-session-rename.ts @@ -6,7 +6,7 @@ import { } from '../../app-server/codex-app-server-session' import { stat } from 'node:fs/promises' import { resolve } from 'node:path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { agentSessionPinnedLaunchDirectory } from '../../../runtime/agent-session/records/agent-session-record-launch-directory' import { resolveHiddenProbeCwd } from '../../../lib/hidden-probe-cwd' import { isNativeLocalLocation as supportsCodexStructuredLocation } from '../../../../shared/execution-host' diff --git a/src/main/codex/structured/session-lifecycle/codex-session-account-usage.ts b/src/main/codex/structured/session-lifecycle/codex-session-account-usage.ts index 78d5640629c..8637d053c68 100644 --- a/src/main/codex/structured/session-lifecycle/codex-session-account-usage.ts +++ b/src/main/codex/structured/session-lifecycle/codex-session-account-usage.ts @@ -1,6 +1,6 @@ import { requireLegacyAgentSessionAccountHome } from '../../../../shared/agent-session/lifecycle/accounts/agent-session-account-home' import type { CodexAppServerRpc } from '../../app-server/codex-app-server-session' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { resolveCodexHomeProcessLockKey, withCodexHomeProcessLock diff --git a/src/main/codex/trust/grants/codex-trust-grant-ledger.ts b/src/main/codex/trust/grants/codex-trust-grant-ledger.ts index fc933e863ae..ad3ed4c8b6f 100644 --- a/src/main/codex/trust/grants/codex-trust-grant-ledger.ts +++ b/src/main/codex/trust/grants/codex-trust-grant-ledger.ts @@ -1,5 +1,5 @@ import { mkdirSync, readFileSync, writeFileSync } from 'node:fs' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { dirname, join } from 'node:path' import { resolveOrcaManagedCodexHomePath } from '../../configuration/homes/codex-home-paths' import '../toml/config-toml-trust' diff --git a/src/main/codex/trust/hooks/codex-hook-hash-lookup.ts b/src/main/codex/trust/hooks/codex-hook-hash-lookup.ts index 8e204bc46eb..b1be1e33b3b 100644 --- a/src/main/codex/trust/hooks/codex-hook-hash-lookup.ts +++ b/src/main/codex/trust/hooks/codex-hook-hash-lookup.ts @@ -17,7 +17,7 @@ import { readMemoizedCodexHookAnswer, readMemoizedVersionAnswer } from './codex-hook-trust-memo' -import { normalizeRuntimePathForComparison as codexBinaryKey } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison as codexBinaryKey } from '../../../../shared/file-access/cross-platform-path' // Cold hash derivation must not delay launches beyond this bound. export const CODEX_HOOK_LAUNCH_WAIT_MS = 3_000 diff --git a/src/main/codex/trust/hooks/codex-hook-trust-memo.ts b/src/main/codex/trust/hooks/codex-hook-trust-memo.ts index ec82d787499..3251c348975 100644 --- a/src/main/codex/trust/hooks/codex-hook-trust-memo.ts +++ b/src/main/codex/trust/hooks/codex-hook-trust-memo.ts @@ -1,7 +1,7 @@ import { readFileSync } from 'node:fs' import { join } from 'node:path' import { isDeepStrictEqual } from 'node:util' -import { normalizeRuntimePathForComparison as codexBinaryKey } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison as codexBinaryKey } from '../../../../shared/file-access/cross-platform-path' import { writeFileAtomically } from '../../../filesystem/atomic-file-publication' import { isPlainObject } from '../../../agent-hooks/installation/configuration/hooks-json-read' import { getOrcaUserDataPath } from '../../configuration/homes/codex-home-paths' diff --git a/src/main/codex/trust/hooks/hook-trust-promotion.ts b/src/main/codex/trust/hooks/hook-trust-promotion.ts index 28652f47ce8..2581a1cf195 100644 --- a/src/main/codex/trust/hooks/hook-trust-promotion.ts +++ b/src/main/codex/trust/hooks/hook-trust-promotion.ts @@ -5,7 +5,7 @@ import { } from '../../../filesystem/file-content-observation' import { writeFileSync } from 'node:fs' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { createManagedCommandMatcher } from '../../../agent-hooks/installation/commands/managed-hook-command-matching' import type { HookDefinition } from '../../../agent-hooks/installation/configuration/hook-config-schema' import { readHooksJson } from '../../../agent-hooks/installation/configuration/hooks-json-read' diff --git a/src/main/codex/trust/toml/codex-trust-config-mutation-queue.ts b/src/main/codex/trust/toml/codex-trust-config-mutation-queue.ts index af9db381f39..3f54bbdf04a 100644 --- a/src/main/codex/trust/toml/codex-trust-config-mutation-queue.ts +++ b/src/main/codex/trust/toml/codex-trust-config-mutation-queue.ts @@ -1,5 +1,5 @@ import { AsyncLocalStorage } from 'node:async_hooks' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' const tailByTomlPath = new Map>() // Preserve lane ownership across awaits so nested installer calls cannot deadlock. diff --git a/src/main/credentials/integration-credential-file.ts b/src/main/credentials/integration-credential-file.ts index 250f803a37a..d14f578b6f6 100644 --- a/src/main/credentials/integration-credential-file.ts +++ b/src/main/credentials/integration-credential-file.ts @@ -15,7 +15,7 @@ import { writeRestrictedWindowsFile } from '../../shared/secure-storage/secure-p import { credentialDecryptionMessage, type IntegrationCredentialService -} from '../../shared/integration-credential-errors' +} from '../../shared/secure-storage/integration-credential-errors' // Empty files mean no saved credential; keep status consistent with token reads. export function credentialFileHasContent(path: string): boolean { diff --git a/src/main/credentials/integration-token-file-cache.ts b/src/main/credentials/integration-token-file-cache.ts index b625afdbd1a..6d049c8f9f4 100644 --- a/src/main/credentials/integration-token-file-cache.ts +++ b/src/main/credentials/integration-token-file-cache.ts @@ -1,5 +1,5 @@ import { readFileSync } from 'node:fs' -import type { IntegrationCredentialService } from '../../shared/integration-credential-errors' +import type { IntegrationCredentialService } from '../../shared/secure-storage/integration-credential-errors' import { CredentialDecryptionError, credentialFileHasContent, diff --git a/src/main/daemon/admission/host-terminal-policy.ts b/src/main/daemon/admission/host-terminal-policy.ts index cf3bef4c137..5067b974b9e 100644 --- a/src/main/daemon/admission/host-terminal-policy.ts +++ b/src/main/daemon/admission/host-terminal-policy.ts @@ -11,7 +11,7 @@ import { type TerminalLimitStatus } from '../../../shared/terminal/runtime-policy/terminal-limit-policy' import { profileStateAccessMachineIdentity } from '../../persistence/profile-state/access/profile-state-access-identity' -import { isSafeOwnedDirectory } from '../../../shared/owned-private-directory' +import { isSafeOwnedDirectory } from '../../../shared/secure-storage/owned-private-directory' import { awaitDaemonValueWithinCallerDeadline } from '../launch/daemon-request-deadline' import { DEFAULT_MAX_HOST_TERMINALS, resolveMaxHostTerminals } from './host-terminal-ledger' import { SystemPtyLimit } from './system-pty-limit' diff --git a/src/main/daemon/executable-host/linux/daemon-appimage-generation-launch.ts b/src/main/daemon/executable-host/linux/daemon-appimage-generation-launch.ts index 7a15ced55c0..2ad5298d280 100644 --- a/src/main/daemon/executable-host/linux/daemon-appimage-generation-launch.ts +++ b/src/main/daemon/executable-host/linux/daemon-appimage-generation-launch.ts @@ -1,7 +1,7 @@ // Prefer an extracted generation: FUSE teardown cannot invalidate its mapped daemon pages. import { existsSync, readFileSync } from 'node:fs' import { join } from 'node:path' -import { relativePathInsideRoot } from '../../../../shared/cross-platform-path' +import { relativePathInsideRoot } from '../../../../shared/file-access/cross-platform-path' import { APPIMAGE_NODE_RUNTIME_SEGMENTS } from '../../../../shared/desktop-distribution/appimage/appimage-node-runtime' import { resolveAppImageRuntimeIdentity } from '../../../updater/linux-package/appimage-runtime-identity' import { diff --git a/src/main/daemon/executable-host/linux/daemon-appimage-launch.ts b/src/main/daemon/executable-host/linux/daemon-appimage-launch.ts index aabe29e138a..75629269288 100644 --- a/src/main/daemon/executable-host/linux/daemon-appimage-launch.ts +++ b/src/main/daemon/executable-host/linux/daemon-appimage-launch.ts @@ -1,7 +1,7 @@ // Launch APPIMAGE to give the daemon its own FUSE mount; the window's mount dies with its runtime. import { readFileSync } from 'node:fs' import { join } from 'node:path' -import { relativePathInsideRoot } from '../../../../shared/cross-platform-path' +import { relativePathInsideRoot } from '../../../../shared/file-access/cross-platform-path' import { resolveAppImageRuntimeIdentity } from '../../../updater/linux-package/appimage-runtime-identity' import type { DurableDaemonScopeCommand } from '../../process-scopes/daemon-cgroup-scope' import { envWithoutAppImageRuntime } from '../../../pty/shell-startup/appimage-terminal-env' diff --git a/src/main/daemon/pty-subprocess/spawn-file-child-processes.ts b/src/main/daemon/pty-subprocess/spawn-file-child-processes.ts index cecee78a23d..668827d6f9a 100644 --- a/src/main/daemon/pty-subprocess/spawn-file-child-processes.ts +++ b/src/main/daemon/pty-subprocess/spawn-file-child-processes.ts @@ -2,7 +2,7 @@ import type { IPty } from 'node-pty' import { getCommandTokenPathBasename, getFirstCommandToken -} from '../../../shared/command-token-scanner' +} from '../../../shared/shell/command-resolution/command-token-scanner' import { collectDescendantsFromIndex, getProcessTableIndex diff --git a/src/main/daemon/pty-subprocess/spawn-file-foreground-process.ts b/src/main/daemon/pty-subprocess/spawn-file-foreground-process.ts index 5cfb2ce505d..c00280a1e50 100644 --- a/src/main/daemon/pty-subprocess/spawn-file-foreground-process.ts +++ b/src/main/daemon/pty-subprocess/spawn-file-foreground-process.ts @@ -12,7 +12,7 @@ import { isShellProcess } from '../../../shared/agent-status/process/shell-proce import { getCommandTokenPathBasename, getFirstCommandToken -} from '../../../shared/command-token-scanner' +} from '../../../shared/shell/command-resolution/command-token-scanner' import { collectDescendantsFromIndex, getProcessTableIndex diff --git a/src/main/daemon/shell-readiness/daemon-bash-shell-ready-rcfile.ts b/src/main/daemon/shell-readiness/daemon-bash-shell-ready-rcfile.ts index 592afc82f8c..29f048d8ce9 100644 --- a/src/main/daemon/shell-readiness/daemon-bash-shell-ready-rcfile.ts +++ b/src/main/daemon/shell-readiness/daemon-bash-shell-ready-rcfile.ts @@ -1,5 +1,5 @@ import { getPosixOmpShellWrapper } from '../../pty/shell-startup/omp-shell-wrapper' -import { ORCA_CLI_POSIX_PATH_RESTORE } from '../../../shared/orca-cli-shell-path' +import { ORCA_CLI_POSIX_PATH_RESTORE } from '../../../shared/shell/launch/orca-cli-shell-path' import { MANAGED_DATA_ACCOUNT_POSIX_RESTORE } from '../../../shared/shell/launch/agents/managed-data-account-shell' import { getPosixCodexShellLaunchPreflight } from '../../../shared/shell/launch/agents/codex-shell-function' import { getPosixClaudeShellFunction } from '../../../shared/shell/launch/agents/claude-shell-function' diff --git a/src/main/dsh/dsh-hook-packages.ts b/src/main/dsh/dsh-hook-packages.ts index d43097c7ec5..0cc2d60a06a 100644 --- a/src/main/dsh/dsh-hook-packages.ts +++ b/src/main/dsh/dsh-hook-packages.ts @@ -1,7 +1,7 @@ import { existsSync, readdirSync } from 'node:fs' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' /** The package Orca's patch row names; DSH imports it from each profile. */ export const DSH_HOOK_EXECUTOR_PACKAGE = '@deepseek-ai/dsh-hooks-claude-code' diff --git a/src/main/dsh/hook-service.ts b/src/main/dsh/hook-service.ts index e36fcf4198a..5f1bcd43bef 100644 --- a/src/main/dsh/hook-service.ts +++ b/src/main/dsh/hook-service.ts @@ -6,7 +6,7 @@ import type { AgentHookInstallState, AgentHookInstallStatus } from '../../shared/agent-hook-listener/configuration/agent-hook-types' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' import { buildWindowsAgentHookCurlPostCommand } from '../agent-hooks/installation/commands/windows-agent-hook-post-command' import { writeHooksJson } from '../agent-hooks/installation/configuration/hooks-json-write' import { writeManagedScript } from '../agent-hooks/installation/scripts/managed-hook-script-write' diff --git a/src/main/editor/format-editor-text.ts b/src/main/editor/format-editor-text.ts index 4629c5fa478..47bd9da9384 100644 --- a/src/main/editor/format-editor-text.ts +++ b/src/main/editor/format-editor-text.ts @@ -7,7 +7,7 @@ import { type EditorFormatResult } from '../../shared/editor/formatting/editor-formatter' import { getRepoExecutionHostId } from '../../shared/execution-host' -import { isPathInsideOrEqual } from '../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../shared/file-access/cross-platform-path' import type { RuntimeStore } from '../runtime/construction/runtime-store-contract' import type { RuntimeFileExplorerPath } from '../runtime/files/file-target' import { isENOENT } from '../ipc/filesystem/access/filesystem-path-containment' diff --git a/src/main/emulator/serve-sim-helper-processes.ts b/src/main/emulator/serve-sim-helper-processes.ts index faeab43b570..ff656d8e0e9 100644 --- a/src/main/emulator/serve-sim-helper-processes.ts +++ b/src/main/emulator/serve-sim-helper-processes.ts @@ -1,6 +1,6 @@ import { execFile } from 'node:child_process' import { platform } from 'node:os' -import { commandContainsToken } from '../../shared/command-token-scanner' +import { commandContainsToken } from '../../shared/shell/command-resolution/command-token-scanner' import { iterateProcessOutputLines } from '../../shared/process-observation/process-output-field-scanner' import { PS_MAX_BUFFER_BYTES } from '../../shared/process-observation/tables/process-table-snapshot' diff --git a/src/main/environment-doctor/environment-doctor-setup.ts b/src/main/environment-doctor/environment-doctor-setup.ts index 34a8ffc22ff..d2d903506f7 100644 --- a/src/main/environment-doctor/environment-doctor-setup.ts +++ b/src/main/environment-doctor/environment-doctor-setup.ts @@ -1,5 +1,5 @@ import type { EnvironmentDoctorCheck } from '../../shared/workspace-setup/environment-doctor/environment-doctor-types' -import { parseOrcaYaml } from '../../shared/orca-yaml' +import { parseOrcaYaml } from '../../shared/workspace-setup/orca-yaml' import { check, PROBE_TIMEOUT_MS, diff --git a/src/main/environment-providers/shell-recipe-driver.ts b/src/main/environment-providers/shell-recipe-driver.ts index e328d71fa71..81fc87bafe2 100644 --- a/src/main/environment-providers/shell-recipe-driver.ts +++ b/src/main/environment-providers/shell-recipe-driver.ts @@ -1,7 +1,7 @@ // orca.yaml environment recipes and plugin VM recipes as an environment provider: each lifecycle // call runs the recipe's shell step, exactly as the runtime service did before the driver seam. import { z } from 'zod' -import type { OrcaVmRecipe } from '../../shared/orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../shared/workspace-setup/orca-yaml-hook-types' import { EphemeralVmRecipeResultSchema, type EphemeralVmRecipeResult, diff --git a/src/main/ephemeral-vm/recipe-runner.test.ts b/src/main/ephemeral-vm/recipe-runner.test.ts index 803b89e8dd2..2c76d5fdb10 100644 --- a/src/main/ephemeral-vm/recipe-runner.test.ts +++ b/src/main/ephemeral-vm/recipe-runner.test.ts @@ -13,7 +13,7 @@ import { runEphemeralVmRecipeStart, runEphemeralVmRecipeSuspend } from '../../shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-runner' -import type { OrcaVmRecipe } from '../../shared/orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../shared/workspace-setup/orca-yaml-hook-types' const tmpRoots: string[] = [] diff --git a/src/main/ephemeral-vm/resume-integrity.ts b/src/main/ephemeral-vm/resume-integrity.ts index 443e42c0d63..2ad08898123 100644 --- a/src/main/ephemeral-vm/resume-integrity.ts +++ b/src/main/ephemeral-vm/resume-integrity.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../shared/file-access/cross-platform-path' import { getEphemeralVmRecipeResultCheckoutMode, getEphemeralVmRecipeResultConnection, diff --git a/src/main/ephemeral-vm/runtime-recipe-timeouts.test.ts b/src/main/ephemeral-vm/runtime-recipe-timeouts.test.ts index a88e5408379..e0e3291c66d 100644 --- a/src/main/ephemeral-vm/runtime-recipe-timeouts.test.ts +++ b/src/main/ephemeral-vm/runtime-recipe-timeouts.test.ts @@ -8,7 +8,7 @@ import { encodePairingOffer } from '../../shared/remote-runtime/pairing/pairing' import { PAIRING_OFFER_VERSION } from '../../shared/remote-runtime/pairing/mobile-relay-pairing-offer' import { getEphemeralVmRuntimeStorePath } from '../../shared/remote-runtime/ephemeral-vm-store/ephemeral-vm-runtime-store' import { RollbackEphemeralVmRuntimeStoreSchema } from '../../shared/remote-runtime/ephemeral-vm-store/ephemeral-vm-runtimes' -import type { OrcaVmRecipe } from '../../shared/orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../shared/workspace-setup/orca-yaml-hook-types' import type { Store } from '../persistence/loading-store/store' import { provisionEphemeralVmRuntime } from './runtime-service' import { getRuntimeRecipeContext } from '../ipc/ephemeral-vm-recipe-context' diff --git a/src/main/ephemeral-vm/runtime-service.test.ts b/src/main/ephemeral-vm/runtime-service.test.ts index ee6ae2834c2..a46e1b61016 100644 --- a/src/main/ephemeral-vm/runtime-service.test.ts +++ b/src/main/ephemeral-vm/runtime-service.test.ts @@ -12,7 +12,7 @@ import { import { getEphemeralVmRuntimeFeatureStorePath } from '../../shared/remote-runtime/ephemeral-vm-store/ephemeral-vm-runtime-feature-store' import { cleanupEphemeralVmRuntime, provisionEphemeralVmRuntime } from './runtime-service' import { stopEphemeralVmRuntimeCleanup } from './runtime-cleanup-control' -import type { OrcaVmRecipe } from '../../shared/orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../shared/workspace-setup/orca-yaml-hook-types' const tempDirs: string[] = [] diff --git a/src/main/ephemeral-vm/runtime-service.ts b/src/main/ephemeral-vm/runtime-service.ts index 497e2d33494..8f018bacd84 100644 --- a/src/main/ephemeral-vm/runtime-service.ts +++ b/src/main/ephemeral-vm/runtime-service.ts @@ -1,4 +1,4 @@ -import type { OrcaVmRecipe } from '../../shared/orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../shared/workspace-setup/orca-yaml-hook-types' import { listEphemeralVmRuntimes, updateEphemeralVmRuntimeStatus diff --git a/src/main/filesystem/file-content-observation.ts b/src/main/filesystem/file-content-observation.ts index 9458e67bcfc..d241d16898b 100644 --- a/src/main/filesystem/file-content-observation.ts +++ b/src/main/filesystem/file-content-observation.ts @@ -2,7 +2,7 @@ import { AsyncLocalStorage } from 'node:async_hooks' import { createHash } from 'node:crypto' import { existsSync, readFileSync } from 'node:fs' import { resolve } from 'node:path' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' export type ObservedFileContent = { digest: string | null diff --git a/src/main/filesystem/host-tree-removal.ts b/src/main/filesystem/host-tree-removal.ts index 75083473736..50c9d8ba01f 100644 --- a/src/main/filesystem/host-tree-removal.ts +++ b/src/main/filesystem/host-tree-removal.ts @@ -4,7 +4,7 @@ import { getErrorCode } from '../git/worktrees/worktree-operation-options' import { unregisteredFolderRefusal } from '../../shared/worktree/removal/removal' import { join, win32 } from 'node:path' import { lstat, readdir, rm, rmdir, unlink } from './asar-transparent-fs' -import { isWindowsAbsolutePathLike } from '../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../shared/file-access/cross-platform-path' import { isWslUncPath } from '../../shared/file-access/wsl-paths' import { stripWin32LongPathPrefix } from '../../shared/file-access/windows-path-access' import { removeTree } from '../../shared/file-write/windows-transient-lock-removal' diff --git a/src/main/filesystem/owned-temp-staging-root.ts b/src/main/filesystem/owned-temp-staging-root.ts index 80fb9857218..983de78c8b9 100644 --- a/src/main/filesystem/owned-temp-staging-root.ts +++ b/src/main/filesystem/owned-temp-staging-root.ts @@ -1,5 +1,5 @@ import type { Dir } from 'node:fs' -import { isSafeOwnedDirectory } from '../../shared/owned-private-directory' +import { isSafeOwnedDirectory } from '../../shared/secure-storage/owned-private-directory' import { lstat, mkdir, opendir } from 'node:fs/promises' import { dirname, join, resolve } from 'node:path' diff --git a/src/main/git/command-runner/git-worktree-mutation-state.ts b/src/main/git/command-runner/git-worktree-mutation-state.ts index 14e0329320b..6de69685fda 100644 --- a/src/main/git/command-runner/git-worktree-mutation-state.ts +++ b/src/main/git/command-runner/git-worktree-mutation-state.ts @@ -4,7 +4,7 @@ import { classifyGitCommand, findGitSubcommandIndex } from '../../../shared/git/commands/git-command-classification' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { resolveWorktreeHostPath } from '../../../shared/git/metadata/git-metadata-path' import { resolveGitFetchHeadCommand } from '../../../shared/git/fetch/git-fetch-head-lock' import { resolveGitDir } from '../source-control/resolve-git-dir' diff --git a/src/main/git/command-runner/host-routing/missing-git-spawn-cwd.ts b/src/main/git/command-runner/host-routing/missing-git-spawn-cwd.ts index 7526d94ab67..83fdfdf6cd7 100644 --- a/src/main/git/command-runner/host-routing/missing-git-spawn-cwd.ts +++ b/src/main/git/command-runner/host-routing/missing-git-spawn-cwd.ts @@ -1,5 +1,5 @@ import { stat } from 'node:fs/promises' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { waitForPromiseWithSignal } from '../../../../shared/concurrency/abort-signal-reason' import { isMissingCommandBinaryError } from '../process-capture/exec-error' diff --git a/src/main/git/command-runner/process-capture/exec-file-capture.ts b/src/main/git/command-runner/process-capture/exec-file-capture.ts index d2732810118..de60f61f486 100644 --- a/src/main/git/command-runner/process-capture/exec-file-capture.ts +++ b/src/main/git/command-runner/process-capture/exec-file-capture.ts @@ -1,6 +1,6 @@ import { execFile, type ChildProcess, type ExecFileOptions } from 'node:child_process' import { recordSubprocessSpawn } from '../../../diagnostics/main-thread-churn-probe' -import { endSubprocessStdin } from '../../../../shared/subprocess-stdin-write' +import { endSubprocessStdin } from '../../../../shared/process-streams/subprocess-stdin-write' import { createPosixGroupTermination } from '@orca/process-host/posix-group-termination' import { nativeExecutableResolver } from '@orca/process-host/native-executable-resolution' import { spawnNativeProcess } from '@orca/process-host/native-process-spawn' diff --git a/src/main/git/objects/local-git-object-quarantine.ts b/src/main/git/objects/local-git-object-quarantine.ts index ea25699dad0..ce09b2f577f 100644 --- a/src/main/git/objects/local-git-object-quarantine.ts +++ b/src/main/git/objects/local-git-object-quarantine.ts @@ -1,4 +1,4 @@ -import { isWindowsAbsolutePathLike } from '../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../shared/file-access/cross-platform-path' import type { GitAdmissionTier } from '../../../shared/rpc-contract/source-control/git-admission-tier-params' import { createGitObjectQuarantine, diff --git a/src/main/git/refs/maintenance/local-repo-ref-maintenance.ts b/src/main/git/refs/maintenance/local-repo-ref-maintenance.ts index 1fa9eac6617..d2cf4866173 100644 --- a/src/main/git/refs/maintenance/local-repo-ref-maintenance.ts +++ b/src/main/git/refs/maintenance/local-repo-ref-maintenance.ts @@ -1,5 +1,5 @@ import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { RepoRefMaintenance } from '../../../../shared/git/maintenance/repo-ref-maintenance' import { PACK_REFS_ARGS, diff --git a/src/main/git/refs/maintenance/pack-refs-lock-ownership.ts b/src/main/git/refs/maintenance/pack-refs-lock-ownership.ts index bf092e2c663..903803bc722 100644 --- a/src/main/git/refs/maintenance/pack-refs-lock-ownership.ts +++ b/src/main/git/refs/maintenance/pack-refs-lock-ownership.ts @@ -1,6 +1,6 @@ import { readFile, rm, stat, writeFile } from 'node:fs/promises' import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { PACK_REFS_TIMEOUT_MS, PACKED_REFS_LOCK_POLL_MS diff --git a/src/main/git/refs/maintenance/repo-pack-index-maintenance.ts b/src/main/git/refs/maintenance/repo-pack-index-maintenance.ts index dbe5a5d3079..c784869c3cd 100644 --- a/src/main/git/refs/maintenance/repo-pack-index-maintenance.ts +++ b/src/main/git/refs/maintenance/repo-pack-index-maintenance.ts @@ -1,6 +1,6 @@ import { posix, win32 } from 'node:path' import { BoundedMap } from '../../../../shared/collections/bounded-map' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import type { PackIndexMaintenanceOutcome } from '../../../../shared/git/maintenance/repo-pack-index-maintenance-policy' import type { RefMaintenanceSpan } from '../../../../shared/git/maintenance/repo-ref-maintenance-policy' import { probeRepoPackIndexDirectory, readRepoPackDirectoryStamp } from './repo-pack-index-state' diff --git a/src/main/git/refs/maintenance/repo-pack-index-state.ts b/src/main/git/refs/maintenance/repo-pack-index-state.ts index 0fc147b1d9f..79857686cdf 100644 --- a/src/main/git/refs/maintenance/repo-pack-index-state.ts +++ b/src/main/git/refs/maintenance/repo-pack-index-state.ts @@ -1,6 +1,6 @@ import { open, opendir, stat } from 'node:fs/promises' import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' export const PACK_INDEX_PROBE_ENTRY_LIMIT = 65_536 export const PACK_INDEX_PROBE_TIMEOUT_MS = 1_000 diff --git a/src/main/git/refs/maintenance/repo-ref-maintenance-real-git.test.ts b/src/main/git/refs/maintenance/repo-ref-maintenance-real-git.test.ts index 020034a80cf..5bf160fe3e3 100644 --- a/src/main/git/refs/maintenance/repo-ref-maintenance-real-git.test.ts +++ b/src/main/git/refs/maintenance/repo-ref-maintenance-real-git.test.ts @@ -3,7 +3,7 @@ import { cp, mkdir, mkdtemp, readFile, readdir, rm, writeFile } from 'node:fs/pr import { tmpdir } from 'node:os' import { join } from 'node:path' import { afterAll, afterEach, beforeAll, describe, expect, it } from 'vitest' -import { countLooseRefs } from '../../../../shared/loose-ref-count' +import { countLooseRefs } from '../../../../shared/git/maintenance/loose-ref-count' import { RepoRefMaintenance } from '../../../../shared/git/maintenance/repo-ref-maintenance' import { _resetLocalRepoRefMaintenanceForTests, diff --git a/src/main/git/remotes/review-head-remote-identity.ts b/src/main/git/remotes/review-head-remote-identity.ts index 5b267a9b1ea..ca7c960b45f 100644 --- a/src/main/git/remotes/review-head-remote-identity.ts +++ b/src/main/git/remotes/review-head-remote-identity.ts @@ -1,5 +1,5 @@ import { gitExecFileAsync } from '../command-runner/git-exec-file' -import { reviewHeadRemoteRefComponent } from '../../../shared/review-head-tracking-ref' +import { reviewHeadRemoteRefComponent } from '../../../shared/worktree/hosted-review/review-head-tracking-ref' type LocalGitExecOptions = { cwd: string diff --git a/src/main/git/repositories/cloning/repo-clone-path.ts b/src/main/git/repositories/cloning/repo-clone-path.ts index cdb6867acda..306b4339936 100644 --- a/src/main/git/repositories/cloning/repo-clone-path.ts +++ b/src/main/git/repositories/cloning/repo-clone-path.ts @@ -5,7 +5,7 @@ import { isWindowsAbsolutePathLike, normalizeRuntimePathForComparison, normalizeRuntimePathSeparators -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' import { resolveCreatePathAlias } from '../../../workspaces/creation/worktree-create-in-flight' export type ClaimedCloneTarget = { diff --git a/src/main/git/repositories/discovery/repo-detection.ts b/src/main/git/repositories/discovery/repo-detection.ts index 513fa371406..b47641a2216 100644 --- a/src/main/git/repositories/discovery/repo-detection.ts +++ b/src/main/git/repositories/discovery/repo-detection.ts @@ -1,9 +1,9 @@ import { existsSync, statSync } from 'node:fs' import { basename, dirname, resolve } from 'node:path' -import { normalizeRuntimePathSeparators } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathSeparators } from '../../../../shared/file-access/cross-platform-path' import { parseWslUncPath, toWindowsWslPath } from '../../../../shared/file-access/wsl-paths' import { scanGitMarkerSync } from './repo-git-marker-scan' -import { resolveRealPathSync } from '../../../../shared/real-path-sync' +import { resolveRealPathSync } from '../../../../shared/file-access/real-path-sync' import { gitRepoOutput, runGitRepoCommands, diff --git a/src/main/git/repositories/discovery/repo-git-marker-scan.ts b/src/main/git/repositories/discovery/repo-git-marker-scan.ts index 3b6dffd8e77..8a36e03031d 100644 --- a/src/main/git/repositories/discovery/repo-git-marker-scan.ts +++ b/src/main/git/repositories/discovery/repo-git-marker-scan.ts @@ -1,7 +1,7 @@ import { readFileSync, realpathSync, statSync } from 'node:fs' -import { resolveRealPathSync } from '../../../../shared/real-path-sync' +import { resolveRealPathSync } from '../../../../shared/file-access/real-path-sync' import { dirname, isAbsolute, join, relative } from 'node:path' -import { normalizeRuntimePathSeparators } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathSeparators } from '../../../../shared/file-access/cross-platform-path' import { resolveGitMetadataPath } from '../../../../shared/git/metadata/git-metadata-path' import { parseGitdirMarkerPayload } from '../../../../shared/git/metadata/gitdir-marker-payload' diff --git a/src/main/git/source-control/drive-checkout/drive-checkout-suspect-paths.ts b/src/main/git/source-control/drive-checkout/drive-checkout-suspect-paths.ts index a88799829a9..aea6b01b735 100644 --- a/src/main/git/source-control/drive-checkout/drive-checkout-suspect-paths.ts +++ b/src/main/git/source-control/drive-checkout/drive-checkout-suspect-paths.ts @@ -1,5 +1,5 @@ import * as path from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' // Minimal checkStat can miss same-size writes preserving whole-second mtime; recheck watcher paths with default stat. diff --git a/src/main/git/source-control/drive-checkout/drive-checkout-suspect-status.ts b/src/main/git/source-control/drive-checkout/drive-checkout-suspect-status.ts index 04422e1ca71..deb87e099ee 100644 --- a/src/main/git/source-control/drive-checkout/drive-checkout-suspect-status.ts +++ b/src/main/git/source-control/drive-checkout/drive-checkout-suspect-status.ts @@ -2,7 +2,7 @@ import * as path from 'node:path' import { lstat } from 'node:fs/promises' import type { GitStatusEntry } from '../../../../shared/git/status/git-status-types' import { StatusPorcelainParser } from '../../../../shared/git/status/git-status-porcelain-parser' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { mapWithConcurrency } from '../../../../shared/concurrency/map-with-concurrency' import { findCoveringLocalWatchRoot, diff --git a/src/main/git/worktrees/catalog/worktree-listing.ts b/src/main/git/worktrees/catalog/worktree-listing.ts index d55a391221a..895a60afdfc 100644 --- a/src/main/git/worktrees/catalog/worktree-listing.ts +++ b/src/main/git/worktrees/catalog/worktree-listing.ts @@ -4,7 +4,7 @@ import { } from '../../../../shared/concurrency/abort-signal-reason' import { readFile, realpath, stat } from 'node:fs/promises' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { resolveGitMetadataPath } from '../../../../shared/git/metadata/git-metadata-path' import { parseGitdirMarkerPayload } from '../../../../shared/git/metadata/gitdir-marker-payload' import { isWorktreeCreatePreparation } from '../../../../shared/worktree/creation/create-preparation' diff --git a/src/main/git/worktrees/catalog/worktree-path-comparison.ts b/src/main/git/worktrees/catalog/worktree-path-comparison.ts index 4c31bb33b8e..b4c9aeb02fa 100644 --- a/src/main/git/worktrees/catalog/worktree-path-comparison.ts +++ b/src/main/git/worktrees/catalog/worktree-path-comparison.ts @@ -1,5 +1,5 @@ import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { foldWslUncPathCaseInsensitiveParts } from '../../../../shared/file-access/wsl-paths' import type { GitWorktreeExecOptions } from '../worktree-operation-options' import { translateWslOutputPaths } from '../../command-runner/host-routing/wsl-path-translation' diff --git a/src/main/git/worktrees/checkout/branch-switch.ts b/src/main/git/worktrees/checkout/branch-switch.ts index db28f6e3cd0..564f1e216a3 100644 --- a/src/main/git/worktrees/checkout/branch-switch.ts +++ b/src/main/git/worktrees/checkout/branch-switch.ts @@ -12,7 +12,7 @@ import { import { access } from 'node:fs/promises' import * as path from 'node:path' import type { GitStatusResult } from '../../../../shared/git/status/git-status-types' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { isGitWorktreeMutationInFlight } from '../../command-runner/git-worktree-mutation-state' import { resolveGitDir } from '../../source-control/resolve-git-dir' import { diff --git a/src/main/git/worktrees/creation/worktree-base-refresh.ts b/src/main/git/worktrees/creation/worktree-base-refresh.ts index 312d7593b62..01c33a25043 100644 --- a/src/main/git/worktrees/creation/worktree-base-refresh.ts +++ b/src/main/git/worktrees/creation/worktree-base-refresh.ts @@ -4,7 +4,7 @@ import type { LocalBaseRefRefreshResult, LocalBaseRefUpdateSuggestion } from '../../../../shared/worktree/base-refs/base-ref-drift-types' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { createCoalescingKeyedRunner } from '../../../../shared/concurrency/coalescing-keyed-runner' import { parseWorktreeList } from '../../../../shared/git/worktrees/git-worktree-porcelain-parser' import { diff --git a/src/main/git/worktrees/creation/worktree-preparation-lock.ts b/src/main/git/worktrees/creation/worktree-preparation-lock.ts index 1650e2b742f..7b28ae8c855 100644 --- a/src/main/git/worktrees/creation/worktree-preparation-lock.ts +++ b/src/main/git/worktrees/creation/worktree-preparation-lock.ts @@ -2,7 +2,7 @@ import { canonicalWorktreePath } from '../catalog/worktree-path-comparison' import type { WorktreePreparationOperation } from './worktree-preparation-operation' import { readFile, realpath, unlink, writeFile } from 'node:fs/promises' import { dirname, posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { resolveGitMetadataPath, type GitMetadataPathOptions diff --git a/src/main/git/worktrees/removal/worktree-at-risk-local-files.ts b/src/main/git/worktrees/removal/worktree-at-risk-local-files.ts index e21de23d5b6..a90d9fc879c 100644 --- a/src/main/git/worktrees/removal/worktree-at-risk-local-files.ts +++ b/src/main/git/worktrees/removal/worktree-at-risk-local-files.ts @@ -1,7 +1,7 @@ import { lstat, opendir, readFile, realpath, stat } from 'node:fs/promises' import { join } from 'node:path' -import { isPathInsideOrEqual } from '../../../../shared/cross-platform-path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isPathInsideOrEqual } from '../../../../shared/file-access/cross-platform-path' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { abortSignalWithTimeout } from '../../../lib/abort-signal-with-timeout' import type { WorktreeAtRiskLocalFiles } from '../../../../shared/worktree/removal/at-risk-local-files' import { gitOptionalLocksDisabledEnv } from '../../command-runner/git-environment/git-process-env' diff --git a/src/main/github/accounts/github-project-account.ts b/src/main/github/accounts/github-project-account.ts index 9592a844a6f..9c208718238 100644 --- a/src/main/github/accounts/github-project-account.ts +++ b/src/main/github/accounts/github-project-account.ts @@ -1,5 +1,5 @@ import type { Repo } from '../../../shared/repository/repo-types' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { getConnectionExecutionHostId, type ExecutionHostId } from '../../../shared/execution-host' import { normalizeGhAccountBinding } from '../../../shared/github/accounts/account-binding' import { isGitRepoKind } from '../../../shared/repository/repo-kind' diff --git a/src/main/github/api/gh-error-classification.ts b/src/main/github/api/gh-error-classification.ts index ab1a21fbd15..361d3b7c9c9 100644 --- a/src/main/github/api/gh-error-classification.ts +++ b/src/main/github/api/gh-error-classification.ts @@ -1,5 +1,5 @@ -import type { ClassifiedError } from '../../../shared/classified-error' -import { classifiedCodeHostError as classified } from '../../../shared/code-host-failure-copy' +import type { ClassifiedError } from '../../../shared/errors/classified-error' +import { classifiedCodeHostError as classified } from '../../../shared/source-control/code-host-failure-copy' export function classifyGhError(stderr: string): ClassifiedError { const s = stderr.toLowerCase() diff --git a/src/main/github/client/check/get-pr-checks.ts b/src/main/github/client/check/get-pr-checks.ts index 5fecd1ee389..81979a23de9 100644 --- a/src/main/github/client/check/get-pr-checks.ts +++ b/src/main/github/client/check/get-pr-checks.ts @@ -1,5 +1,5 @@ import { normalizePRCheckHeadSha } from '../../../../shared/github/checks/pr-check-head' -import { getPRAutoRefreshCadence } from '../../../../shared/review-refresh-policy' +import { getPRAutoRefreshCadence } from '../../../../shared/source-control/hosted-review/review-refresh-policy' import { withGitHubRepoExecution, type LocalGitExecOptions diff --git a/src/main/github/client/check/pr-checks-last-outcome.ts b/src/main/github/client/check/pr-checks-last-outcome.ts index 08b3667aa4a..49fd47a6af0 100644 --- a/src/main/github/client/check/pr-checks-last-outcome.ts +++ b/src/main/github/client/check/pr-checks-last-outcome.ts @@ -4,7 +4,7 @@ import { getRepoExecutionHostId } from '../../../../shared/execution-host' import { reviewRefreshIntervalMs, type PRAutoRefreshCadence -} from '../../../../shared/review-refresh-policy' +} from '../../../../shared/source-control/hosted-review/review-refresh-policy' import { hostedReviewRepoScope, scopeGeneration diff --git a/src/main/github/client/check/rerun-pr-checks.ts b/src/main/github/client/check/rerun-pr-checks.ts index 98e7994d200..aae06dfae77 100644 --- a/src/main/github/client/check/rerun-pr-checks.ts +++ b/src/main/github/client/check/rerun-pr-checks.ts @@ -13,7 +13,10 @@ import { resolveGitHubRepoExecution } from '../../repositories/github-api-reposi import type { GitHubRepositoryIdentity as GitHubApiRepository } from '../../../../shared/github/repositories/repository-identity' import { getPRChecks } from './get-pr-checks' import { parseActionsRunId } from './check-detail-field-mapping' -import { codeHostFailure, classifiedFailure } from '../../../../shared/code-host-failure-copy' +import { + codeHostFailure, + classifiedFailure +} from '../../../../shared/source-control/code-host-failure-copy' export async function rerunPRChecks( repoPath: string, prNumber: number, diff --git a/src/main/github/client/client-test-mocks.ts b/src/main/github/client/client-test-mocks.ts index d6e1b1667e8..34913b2564d 100644 --- a/src/main/github/client/client-test-mocks.ts +++ b/src/main/github/client/client-test-mocks.ts @@ -1,6 +1,6 @@ import type * as GithubApiRepositoryRemoteProbeModule from '../repositories/github-api-repository-remote-probe' import { vi, type Mock } from 'vitest' -import type { ClassifiedError } from '../../../shared/classified-error' +import type { ClassifiedError } from '../../../shared/errors/classified-error' import type { GitHubRepositoryIdentity as GitHubOwnerRepo } from '../../../shared/github/repositories/repository-identity' import type * as GithubApiRepositoryModule from '../repositories/github-api-repository' import type * as GitHubEnterpriseRepositoryModule from '../repositories/github-enterprise-repository' diff --git a/src/main/github/client/create/add-pr-review-comment.ts b/src/main/github/client/create/add-pr-review-comment.ts index e359a3a5b6f..75cc183f92d 100644 --- a/src/main/github/client/create/add-pr-review-comment.ts +++ b/src/main/github/client/create/add-pr-review-comment.ts @@ -10,7 +10,10 @@ import type { LocalGitExecOptions } from '../../repositories/github-repository-i import { resolveGitHubRepoExecution } from '../../repositories/github-api-repository' import type { GitHubRepositoryIdentity as GitHubApiRepository } from '../../../../shared/github/repositories/repository-identity' import { mapReviewCommentResponse } from './../map/review-comment-response' -import { codeHostFailure, classifiedFailure } from '../../../../shared/code-host-failure-copy' +import { + codeHostFailure, + classifiedFailure +} from '../../../../shared/source-control/code-host-failure-copy' export async function addPRReviewComment( args: GitHubPRReviewCommentInput & { connectionId?: string | null diff --git a/src/main/github/client/detect/repository-merge-metadata.ts b/src/main/github/client/detect/repository-merge-metadata.ts index 9078027fef4..a6ee8a6fc56 100644 --- a/src/main/github/client/detect/repository-merge-metadata.ts +++ b/src/main/github/client/detect/repository-merge-metadata.ts @@ -1,6 +1,6 @@ import { posix, win32 } from 'node:path' import { normalizeGitHubPRMergeMethodSettings } from '../../../../shared/github/pull-requests/merge/pull-request-merge-methods' -import { mergeCommandEnvironment } from '../../../../shared/command-environment' +import { mergeCommandEnvironment } from '../../../../shared/shell/launch/command-environment' import { ghExecFileAsync } from '../../../git/command-runner/hosted-cli/gh-exec-file' import { githubHostExecOptions } from '../../repositories/github-repository-host' import type { GitHubRepositoryIdentity as GitHubApiRepository } from '../../../../shared/github/repositories/repository-identity' diff --git a/src/main/github/client/list/work-item-list-request.ts b/src/main/github/client/list/work-item-list-request.ts index a40d6f4cea8..0d68a8263e8 100644 --- a/src/main/github/client/list/work-item-list-request.ts +++ b/src/main/github/client/list/work-item-list-request.ts @@ -1,4 +1,4 @@ -import type { ClassifiedError } from '../../../../shared/classified-error' +import type { ClassifiedError } from '../../../../shared/errors/classified-error' import type { IssueSourcePreference } from '../../../../shared/repository/repo-types' import type { ParsedTaskQuery } from '../../../../shared/work-items/task-query' import { GITHUB_WORK_ITEMS_SSH_REMOTE_REQUIRED_MESSAGE } from '../../../../shared/github/work-items/work-item-ssh-error' diff --git a/src/main/github/client/list/work-item-pages.ts b/src/main/github/client/list/work-item-pages.ts index 05a78d2c8bd..8d7f80d36f0 100644 --- a/src/main/github/client/list/work-item-pages.ts +++ b/src/main/github/client/list/work-item-pages.ts @@ -1,4 +1,4 @@ -import type { ClassifiedError } from '../../../../shared/classified-error' +import type { ClassifiedError } from '../../../../shared/errors/classified-error' import { classifyGitHubUnavailable } from '../../../../shared/github/api/api-availability' import { parseTaskQuery, type ParsedTaskQuery } from '../../../../shared/work-items/task-query' import { sortWorkItemsByNumber } from '../../../../shared/work-items/work-item-order' diff --git a/src/main/github/client/merge/merge-pr.ts b/src/main/github/client/merge/merge-pr.ts index 12d28d225e7..1d5a0c2d008 100644 --- a/src/main/github/client/merge/merge-pr.ts +++ b/src/main/github/client/merge/merge-pr.ts @@ -12,7 +12,7 @@ import { detectRepositoryMergeMetadata } from './../detect/repository-merge-meta import type { PullRequestLookupData } from './../lookup/pull-request-lookup-data' import { getRestPRByNumber, getPRByNumber } from './../lookup/pr-number-lookup' import { STACK_METADATA_UNAVAILABLE_ERROR } from './../lookup/pr-stack-summary-cache' -import { codeHostFailure } from '../../../../shared/code-host-failure-copy' +import { codeHostFailure } from '../../../../shared/source-control/code-host-failure-copy' export async function mergePR( repoPath: string, prNumber: number, diff --git a/src/main/github/client/merge/pr-auto-merge.ts b/src/main/github/client/merge/pr-auto-merge.ts index 54b3e7db082..2798c97d1fa 100644 --- a/src/main/github/client/merge/pr-auto-merge.ts +++ b/src/main/github/client/merge/pr-auto-merge.ts @@ -14,7 +14,7 @@ import { classifiedFailure, codeHostFailure, type CodeHostFailure -} from '../../../../shared/code-host-failure-copy' +} from '../../../../shared/source-control/code-host-failure-copy' export const PR_AUTO_MERGE_IDENTITY_JSON_FIELDS = 'id,headRefOid,baseRefName' export const GITHUB_AUTO_MERGE_METHODS: Record = diff --git a/src/main/github/client/update/pr-details.ts b/src/main/github/client/update/pr-details.ts index 99b4e899ed5..a5a3ec4bfea 100644 --- a/src/main/github/client/update/pr-details.ts +++ b/src/main/github/client/update/pr-details.ts @@ -8,7 +8,10 @@ import { type GitHubRepoExecOptions } from '../../repositories/github-api-repository' import type { GitHubRepositoryIdentity as GitHubApiRepository } from '../../../../shared/github/repositories/repository-identity' -import { codeHostFailure, classifiedFailure } from '../../../../shared/code-host-failure-copy' +import { + codeHostFailure, + classifiedFailure +} from '../../../../shared/source-control/code-host-failure-copy' async function patchPullRequest( repository: GitHubApiRepository, diff --git a/src/main/github/client/update/pr-ready.ts b/src/main/github/client/update/pr-ready.ts index 1c33e389039..68dabafeeab 100644 --- a/src/main/github/client/update/pr-ready.ts +++ b/src/main/github/client/update/pr-ready.ts @@ -5,7 +5,10 @@ import { ghExecFileAsync } from '../../../git/command-runner/hosted-cli/gh-exec- import type { LocalGitExecOptions } from '../../repositories/github-repository-identity' import { resolveGitHubRepoExecution } from '../../repositories/github-api-repository' import type { GitHubRepositoryIdentity as GitHubApiRepository } from '../../../../shared/github/repositories/repository-identity' -import { codeHostFailure, classifiedFailure } from '../../../../shared/code-host-failure-copy' +import { + codeHostFailure, + classifiedFailure +} from '../../../../shared/source-control/code-host-failure-copy' export function markPRReadyForReview( repoPath: string, diff --git a/src/main/github/client/update/pr-reviewers.ts b/src/main/github/client/update/pr-reviewers.ts index aafba3a26f1..bb5fcac40df 100644 --- a/src/main/github/client/update/pr-reviewers.ts +++ b/src/main/github/client/update/pr-reviewers.ts @@ -4,7 +4,7 @@ import { acquire, release } from '../../execution/github-operation-slots' import type { LocalGitExecOptions } from '../../repositories/github-repository-identity' import { resolveGitHubRepoExecution } from '../../repositories/github-api-repository' import type { GitHubRepositoryIdentity as GitHubApiRepository } from '../../../../shared/github/repositories/repository-identity' -import { codeHostFailure } from '../../../../shared/code-host-failure-copy' +import { codeHostFailure } from '../../../../shared/source-control/code-host-failure-copy' function reviewerUpdateArgs( repository: GitHubApiRepository, diff --git a/src/main/github/client/update/pr-state.ts b/src/main/github/client/update/pr-state.ts index 866502b9a75..ded6311f0c5 100644 --- a/src/main/github/client/update/pr-state.ts +++ b/src/main/github/client/update/pr-state.ts @@ -1,12 +1,15 @@ import { invalidateReviewLookupsAfterPRMutation } from '../../pull-requests/refresh/pr-mutation-review-invalidation' -import type { GitHubPullRequestStateUpdate } from '../../../../shared/issue-mutation-types' +import type { GitHubPullRequestStateUpdate } from '../../../../shared/work-items/issue-mutation-types' import { ghExecFileAsync } from '../../../git/command-runner/hosted-cli/gh-exec-file' import { acquire, release } from '../../execution/github-operation-slots' import { classifyPullRequestUpdateError } from '../../api/gh-error-classification' import type { LocalGitExecOptions } from '../../repositories/github-repository-identity' import { resolveGitHubRepoExecution } from '../../repositories/github-api-repository' import type { GitHubRepositoryIdentity as GitHubApiRepository } from '../../../../shared/github/repositories/repository-identity' -import { codeHostFailure, classifiedFailure } from '../../../../shared/code-host-failure-copy' +import { + codeHostFailure, + classifiedFailure +} from '../../../../shared/source-control/code-host-failure-copy' export async function updatePRState( repoPath: string, prNumber: number, diff --git a/src/main/github/issues/issue-comment.ts b/src/main/github/issues/issue-comment.ts index 30e69889c16..36ec8ad0620 100644 --- a/src/main/github/issues/issue-comment.ts +++ b/src/main/github/issues/issue-comment.ts @@ -10,7 +10,10 @@ import { import { acquire, release } from '../execution/github-operation-slots' import { classifyGhError } from '../api/gh-error-classification' import { ghExecFileAsync } from '../../git/command-runner/hosted-cli/gh-exec-file' -import { codeHostFailure, classifiedFailure } from '../../../shared/code-host-failure-copy' +import { + codeHostFailure, + classifiedFailure +} from '../../../shared/source-control/code-host-failure-copy' // An explicit target keeps replies bound to the conversation; otherwise use the selected source. export async function addIssueComment( diff --git a/src/main/github/issues/issue-create.ts b/src/main/github/issues/issue-create.ts index 90844457719..62ddea1e33c 100644 --- a/src/main/github/issues/issue-create.ts +++ b/src/main/github/issues/issue-create.ts @@ -1,7 +1,7 @@ import type { GitHubCreateIssueFields, GitHubCreateIssueResult -} from '../../../shared/issue-mutation-types' +} from '../../../shared/work-items/issue-mutation-types' import type { IssueSourcePreference } from '../../../shared/repository/repo-types' import type { LocalGitExecOptions } from '../repositories/github-repository-identity' import { @@ -11,7 +11,7 @@ import { import { acquire, release } from '../execution/github-operation-slots' import { extractExecError } from '../../git/command-runner/process-capture/exec-error' import { ghExecFileAsync } from '../../git/command-runner/hosted-cli/gh-exec-file' -import { codeHostFailure } from '../../../shared/code-host-failure-copy' +import { codeHostFailure } from '../../../shared/source-control/code-host-failure-copy' function githubIssueErrorMessage(error: unknown): string { const { stderr, stdout } = extractExecError(error) diff --git a/src/main/github/issues/issue-update.ts b/src/main/github/issues/issue-update.ts index fd26c81bc7f..f286e720744 100644 --- a/src/main/github/issues/issue-update.ts +++ b/src/main/github/issues/issue-update.ts @@ -1,4 +1,4 @@ -import type { GitHubIssueUpdate } from '../../../shared/issue-mutation-types' +import type { GitHubIssueUpdate } from '../../../shared/work-items/issue-mutation-types' import type { IssueSourcePreference } from '../../../shared/repository/repo-types' import type { LocalGitExecOptions } from '../repositories/github-repository-identity' import { @@ -9,8 +9,11 @@ import type { GitHubRepositoryIdentity as GitHubApiRepository } from '../../../s import { acquire, release } from '../execution/github-operation-slots' import { classifyGhError } from '../api/gh-error-classification' import { ghExecFileAsync } from '../../git/command-runner/hosted-cli/gh-exec-file' -import { codeHostFailure, combinedClassifiedFailure } from '../../../shared/code-host-failure-copy' -import type { ClassifiedError } from '../../../shared/classified-error' +import { + codeHostFailure, + combinedClassifiedFailure +} from '../../../shared/source-control/code-host-failure-copy' +import type { ClassifiedError } from '../../../shared/errors/classified-error' import { githubBodyImageUrls, githubBodyMediaHeaders } from '../attachments/body-image-urls' export async function updateIssue( diff --git a/src/main/github/issues/issues.ts b/src/main/github/issues/issues.ts index af518a58b7a..fbe3363eef1 100644 --- a/src/main/github/issues/issues.ts +++ b/src/main/github/issues/issues.ts @@ -1,4 +1,4 @@ -import type { ClassifiedError } from '../../../shared/classified-error' +import type { ClassifiedError } from '../../../shared/errors/classified-error' import type { GitHubRepositoryIdentity as GitHubOwnerRepo } from '../../../shared/github/repositories/repository-identity' import type { IssueInfo } from '../../../shared/github/pull-requests/pull-request-types' import type { IssueSourcePreference } from '../../../shared/repository/repo-types' diff --git a/src/main/github/pull-requests/refresh/hosted-pr-read-jobs.ts b/src/main/github/pull-requests/refresh/hosted-pr-read-jobs.ts index f233a76d56c..77122fc700c 100644 --- a/src/main/github/pull-requests/refresh/hosted-pr-read-jobs.ts +++ b/src/main/github/pull-requests/refresh/hosted-pr-read-jobs.ts @@ -3,7 +3,7 @@ import type { PRRefreshOutcome, PRSnapshotReply } from '../../../../shared/github/pull-requests/refresh/pull-request-refresh-types' -import { getPRAutoRefreshCadence } from '../../../../shared/review-refresh-policy' +import { getPRAutoRefreshCadence } from '../../../../shared/source-control/hosted-review/review-refresh-policy' import { freshTimedPROutcome } from './pr-refresh-candidate-policy' import type { PreparedPRBranchRead } from '../../client/lookup/pr-for-branch-outcome' import { deliverablePRBranchOutcome } from '../../client/lookup/pr-branch-read-resources' diff --git a/src/main/github/pull-requests/refresh/pr-auto-refresh-cadence-sync.ts b/src/main/github/pull-requests/refresh/pr-auto-refresh-cadence-sync.ts index 0ed05a3a86d..9b824b95554 100644 --- a/src/main/github/pull-requests/refresh/pr-auto-refresh-cadence-sync.ts +++ b/src/main/github/pull-requests/refresh/pr-auto-refresh-cadence-sync.ts @@ -2,7 +2,7 @@ import type { RuntimeStore } from '../../../runtime/construction/runtime-store-c import { getPRAutoRefreshCadence, setPRAutoRefreshCadence -} from '../../../../shared/review-refresh-policy' +} from '../../../../shared/source-control/hosted-review/review-refresh-policy' import { retimePRRefreshesForCadence } from './pr-refresh-coordinator' /** Apply this host's PR auto-refresh setting to every main-process poller, now and on change. diff --git a/src/main/github/pull-requests/refresh/pr-refresh-candidate-policy.ts b/src/main/github/pull-requests/refresh/pr-refresh-candidate-policy.ts index 16b189de5a2..1d730bf3357 100644 --- a/src/main/github/pull-requests/refresh/pr-refresh-candidate-policy.ts +++ b/src/main/github/pull-requests/refresh/pr-refresh-candidate-policy.ts @@ -4,7 +4,7 @@ import { reviewRefreshIntervalMs, scaleReviewRefreshInterval, type PRAutoRefreshCadence -} from '../../../../shared/review-refresh-policy' +} from '../../../../shared/source-control/hosted-review/review-refresh-policy' import type { GitHubPRRefreshAlias, GitHubPRRefreshCandidate, diff --git a/src/main/github/pull-requests/refresh/pr-refresh-coordinator-alias-coalescing.test.ts b/src/main/github/pull-requests/refresh/pr-refresh-coordinator-alias-coalescing.test.ts index b4f8ab31b3c..5d15d59ee60 100644 --- a/src/main/github/pull-requests/refresh/pr-refresh-coordinator-alias-coalescing.test.ts +++ b/src/main/github/pull-requests/refresh/pr-refresh-coordinator-alias-coalescing.test.ts @@ -204,7 +204,8 @@ describe('pr-refresh-coordinator', () => { }) it('delivers a newly shown alias while automatic timers are off', async () => { - const policy = await import('../../../../shared/review-refresh-policy') + const policy = + await import('../../../../shared/source-control/hosted-review/review-refresh-policy') policy.setPRAutoRefreshCadence('off') const { reportVisiblePRRefreshCandidates } = await import('./pr-refresh-coordinator') getPRForBranchOutcomeMock.mockImplementation(async () => ({ diff --git a/src/main/github/pull-requests/refresh/pr-refresh-coordinator-auto-refresh-cadence.test.ts b/src/main/github/pull-requests/refresh/pr-refresh-coordinator-auto-refresh-cadence.test.ts deleted file mode 100644 index a41253dcd3a..00000000000 --- a/src/main/github/pull-requests/refresh/pr-refresh-coordinator-auto-refresh-cadence.test.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' - -const { coordinatorMocks, moduleMocks } = await vi.hoisted(async () => { - const moduleMocks = await import('./pr-refresh-coordinator-test-mocks') - return { coordinatorMocks: moduleMocks.createPRRefreshCoordinatorMocks(), moduleMocks } -}) - -vi.mock('./pr-refresh-renderer-port', () => moduleMocks.rendererPortModuleMock(coordinatorMocks)) -vi.mock('../../client/lookup/pr-for-branch-outcome', () => - moduleMocks.clientModuleMock(coordinatorMocks) -) -vi.mock('../../repositories/github-api-repository-remote-probe', () => ({ - getOriginGitHubApiRepository: coordinatorMocks.getOriginGitHubApiRepositoryMock -})) -vi.mock('../../api/rate-limit', () => moduleMocks.rateLimitModuleMock(coordinatorMocks)) - -import { makeCandidate, makePR } from './pr-refresh-coordinator-test-harness' - -const { getPRForBranchOutcomeMock } = coordinatorMocks - -async function loadCoordinatorWithCadence(cadence: string) { - // resetModules gives each test fresh module state; set the cadence on that same instance. - const policy = await import('../../../../shared/review-refresh-policy') - policy.setPRAutoRefreshCadence(cadence) - return { policy, coordinator: await import('./pr-refresh-coordinator') } -} - -describe('pr-refresh-coordinator auto-refresh cadence', () => { - beforeEach(() => { - moduleMocks.resetPRRefreshCoordinatorMocks(coordinatorMocks) - vi.setSystemTime(1_000) - getPRForBranchOutcomeMock.mockImplementation(async () => ({ - kind: 'found', - pr: makePR({ checksStatus: 'pending' }), - fetchedAt: Date.now() - })) - }) - - afterEach(() => { - vi.useRealTimers() - }) - - it('keeps the two-minute visible follow-up by default', async () => { - const { coordinator } = await loadCoordinatorWithCadence('default') - coordinator.reportVisiblePRRefreshCandidates([makeCandidate()], 1, 1) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - await vi.advanceTimersByTimeAsync(2 * 60_000 + 1_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - }) - - it('stretches visible follow-ups to ten minutes when reduced', async () => { - const { coordinator } = await loadCoordinatorWithCadence('reduced') - coordinator.reportVisiblePRRefreshCandidates([makeCandidate()], 1, 1) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - await vi.advanceTimersByTimeAsync(9 * 60_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(60_000 + 1_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - }) - - it('reads a newly visible PR once and then stops timed reads when off', async () => { - const { coordinator } = await loadCoordinatorWithCadence('off') - coordinator.reportVisiblePRRefreshCandidates([makeCandidate()], 1, 1) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - await vi.advanceTimersByTimeAsync(24 * 60 * 60_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - }) - - it('still reads at once on selection when off', async () => { - const { coordinator } = await loadCoordinatorWithCadence('off') - coordinator.enqueuePRRefresh( - makeCandidate({ - cachedFetchedAt: Date.now(), - cachedHasPR: true, - cachedPRState: 'open', - cachedChecksStatus: 'pending' - }), - 'active', - 80 - ) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - }) - - it('does not retry a failed visible read on a timer when off', async () => { - const { coordinator } = await loadCoordinatorWithCadence('off') - getPRForBranchOutcomeMock.mockImplementation(async () => ({ - kind: 'upstream-error', - errorType: 'unknown', - message: 'offline', - fetchedAt: Date.now() - })) - coordinator.reportVisiblePRRefreshCandidates([makeCandidate()], 1, 1) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - await vi.advanceTimersByTimeAsync(60 * 60_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - // Selecting the workspace still reads at once. - coordinator.enqueuePRRefresh(makeCandidate(), 'active', 80) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - }) - - it('retries a failed visible read no sooner than the stretched interval when reduced', async () => { - const { coordinator } = await loadCoordinatorWithCadence('reduced') - getPRForBranchOutcomeMock.mockImplementation(async () => ({ - kind: 'upstream-error', - errorType: 'unknown', - message: 'offline', - fetchedAt: Date.now() - })) - coordinator.reportVisiblePRRefreshCandidates([makeCandidate()], 1, 1) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(9 * 60_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(60_000 + 1_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - }) - - it('drops a queued follow-up when the cadence changes to off, and resumes on Default without a new report', async () => { - const { policy, coordinator } = await loadCoordinatorWithCadence('default') - coordinator.reportVisiblePRRefreshCandidates([makeCandidate()], 1, 1) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - policy.setPRAutoRefreshCadence('off') - coordinator.retimePRRefreshesForCadence() - await vi.advanceTimersByTimeAsync(60 * 60_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - policy.setPRAutoRefreshCadence('default') - coordinator.retimePRRefreshesForCadence() - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - }) - - it('drops an error retry that was already queued when the cadence changes to off, and restores it on Default', async () => { - const { policy, coordinator } = await loadCoordinatorWithCadence('default') - getPRForBranchOutcomeMock.mockImplementation(async () => ({ - kind: 'upstream-error', - errorType: 'unknown', - message: 'offline', - fetchedAt: Date.now() - })) - coordinator.reportVisiblePRRefreshCandidates([makeCandidate()], 1, 1) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - // A routine report (another workspace selected) still shows it as the same request. - await vi.advanceTimersByTimeAsync(4_000) - coordinator.reportVisiblePRRefreshCandidates([makeCandidate()], 2, 1) - - policy.setPRAutoRefreshCadence('off') - coordinator.retimePRRefreshesForCadence() - await vi.advanceTimersByTimeAsync(60 * 60_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - // Selecting the workspace still reads at once. - coordinator.enqueuePRRefresh(makeCandidate(), 'active', 80) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - - // Back on Default the failed row is retried on its own, once its retry time has passed. - policy.setPRAutoRefreshCadence('default') - coordinator.retimePRRefreshesForCadence() - await vi.advanceTimersByTimeAsync(5 * 60_000) - expect(getPRForBranchOutcomeMock.mock.calls.length).toBeGreaterThan(2) - }) - - it('restores a failed row’s own retry from its failure time and count, which the next Off retires again', async () => { - const { policy, coordinator } = await loadCoordinatorWithCadence('default') - const failure = async () => ({ - kind: 'upstream-error', - errorType: 'unknown', - message: 'offline', - fetchedAt: Date.now() - }) - getPRForBranchOutcomeMock.mockImplementation(failure) - // Fails at 1 s; Default would retry it at 121 s. - coordinator.reportVisiblePRRefreshCandidates([makeCandidate()], 1, 1) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - const switchTo = async (cadence: 'default' | 'off', at: number) => { - await vi.advanceTimersByTimeAsync(at - Date.now()) - policy.setPRAutoRefreshCadence(cadence) - coordinator.retimePRRefreshesForCadence() - } - await switchTo('off', 1_500) - await switchTo('default', 2_000) - await switchTo('off', 3_000) - // Restored early: the retry still runs at 121 s, not later from the restoration. - await switchTo('default', 100_000) - await vi.advanceTimersByTimeAsync(120_999 - Date.now()) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(1) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - - // That retry fails as the second real failure, so the next one is due at 241 s; a count that - // restoration had raised would push it to 361 s or later. - getPRForBranchOutcomeMock.mockImplementation(async () => ({ - kind: 'found', - pr: makePR({ checksStatus: 'pending' }), - fetchedAt: Date.now() - })) - await vi.advanceTimersByTimeAsync(240_999 - Date.now()) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - await vi.advanceTimersByTimeAsync(1) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(3) - expect(coordinatorMocks.sendToTrustedUIRendererMock.mock.calls.at(-1)?.[1]).toMatchObject({ - outcome: { kind: 'found' } - }) - }) - - it('moves an already queued error retry to the stretched interval when the cadence changes to reduced', async () => { - const { policy, coordinator } = await loadCoordinatorWithCadence('default') - getPRForBranchOutcomeMock.mockImplementation(async () => ({ - kind: 'upstream-error', - errorType: 'unknown', - message: 'offline', - fetchedAt: Date.now() - })) - coordinator.reportVisiblePRRefreshCandidates([makeCandidate()], 1, 1) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - policy.setPRAutoRefreshCadence('reduced') - coordinator.retimePRRefreshesForCadence() - await vi.advanceTimersByTimeAsync(9 * 60_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(60_000 + 1_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - }) - - it('moves an already queued error retry back to the default interval when the cadence returns to default', async () => { - const { policy, coordinator } = await loadCoordinatorWithCadence('minimal') - getPRForBranchOutcomeMock.mockImplementation(async () => ({ - kind: 'upstream-error', - errorType: 'unknown', - message: 'offline', - fetchedAt: Date.now() - })) - coordinator.reportVisiblePRRefreshCandidates([makeCandidate()], 1, 1) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - policy.setPRAutoRefreshCadence('default') - coordinator.retimePRRefreshesForCadence() - await vi.advanceTimersByTimeAsync(60_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(60_000 + 1_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - }) - - describe('foreground exposure under a stretched cadence', () => { - const openPR = { - cachedHasPR: true, - cachedPRState: 'open', - cachedChecksStatus: 'pending' - } as const - - it('reads the selected PR at once when it comes to the foreground, then follows the stretched interval', async () => { - const { coordinator } = await loadCoordinatorWithCadence('reduced') - const fetchedAt = Date.now() - 30_000 - const selected = makeCandidate({ ...openPR, isSelected: true, cachedFetchedAt: fetchedAt }) - coordinator.reportVisiblePRRefreshCandidates([selected], 1, 1) - await vi.advanceTimersByTimeAsync(90_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(0) - - // What the renderer sends for the selected workspace when it comes to the foreground: the - // data is two minutes old, past Default's minute but well inside Reduced's five. - coordinator.enqueuePRRefresh(selected, 'visible', 80, 1) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - await vi.advanceTimersByTimeAsync(5 * 60_000 - 2_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(3_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - }) - - it('reads a re-shown row whose data is older than the Default interval', async () => { - const { coordinator } = await loadCoordinatorWithCadence('reduced') - coordinator.reportVisiblePRRefreshCandidates( - [makeCandidate({ ...openPR, cachedFetchedAt: Date.now() - 3 * 60_000 })], - 1, - 1 - ) - await vi.advanceTimersByTimeAsync(0) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - - // The timed read after it follows the stretched (10 min) interval. - await vi.advanceTimersByTimeAsync(9 * 60_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(60_000 + 1_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(2) - }) - - it('leaves a re-shown row alone while its data is newer than the Default interval', async () => { - const { coordinator } = await loadCoordinatorWithCadence('reduced') - coordinator.reportVisiblePRRefreshCandidates( - [makeCandidate({ ...openPR, cachedFetchedAt: Date.now() - 60_000 })], - 1, - 1 - ) - await vi.advanceTimersByTimeAsync(8 * 60_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(0) - await vi.advanceTimersByTimeAsync(60_000 + 1_000) - expect(getPRForBranchOutcomeMock).toHaveBeenCalledTimes(1) - }) - }) -}) diff --git a/src/main/github/pull-requests/refresh/pr-refresh-coordinator-local-delivery.test.ts b/src/main/github/pull-requests/refresh/pr-refresh-coordinator-local-delivery.test.ts index e4b8e9cc55c..afc98bc4039 100644 --- a/src/main/github/pull-requests/refresh/pr-refresh-coordinator-local-delivery.test.ts +++ b/src/main/github/pull-requests/refresh/pr-refresh-coordinator-local-delivery.test.ts @@ -401,7 +401,8 @@ it.each([ ] as const)( 'a newer read’s rate limit that lands %s holds the row until its retry, then the row recovers', async (_label, failsAt, full, reduced) => { - const policy = await import('../../../../shared/review-refresh-policy') + const policy = + await import('../../../../shared/source-control/hosted-review/review-refresh-policy') const { coordinator, lookup, directRead } = await load() const { hostedReviewOptionArgs } = await import('./pr-refresh-candidate-policy') const holds = full ? await fillExactCache(lookup) : [] @@ -524,7 +525,8 @@ it('a return a newer read replaced waits out that read’s rate limit, then read it.each(['queued', 'the refresh action'] as const)( 'under Off, an active read a newer read replaced (%s) still shows that newer read, with no read of its own', async (route) => { - const policy = await import('../../../../shared/review-refresh-policy') + const policy = + await import('../../../../shared/source-control/hosted-review/review-refresh-policy') policy.setPRAutoRefreshCadence('off') const { coordinator, directRead } = await load() const cacheKey = 'repo-1::target' @@ -591,60 +593,3 @@ it.each(['queued', 'the refresh action'] as const)( expect(reads()).toBe(2) } ) - -it.each(['its last window', 'one of two windows showing it'] as const)( - 'a kept wake waiting for quota when %s closes starts no read after the newer read succeeded', - async (closed) => { - const { coordinator, directRead } = await load() - const resources = await import('../../client/lookup/pr-branch-read-resources') - coordinatorMocks.getAllWebContentsMock.mockReturnValue([ - { id: 1, isDestroyed: () => false }, - { id: 2, isDestroyed: () => false } - ]) - const own = Promise.withResolvers() - provider.resolve.mockImplementationOnce(() => own.promise) - coordinator.reportVisiblePRRefreshCandidates([target], 1, 1) - if (closed === 'one of two windows showing it') { - coordinator.reportVisiblePRRefreshCandidates([target], 1, 2) - } - await vi.advanceTimersByTimeAsync(4_000) - const newer = Promise.withResolvers() - provider.resolve.mockImplementationOnce(() => newer.promise) - const paired = directRead() - await vi.advanceTimersByTimeAsync(1_000) - own.resolve({ kind: 'no-pr', fetchedAt: Date.now() }) - await vi.advanceTimersByTimeAsync(0) - // The kept demand is taken at 11 s and waits for quota. - const gateChecks = provider.gate.mock.calls.length - const quota = Promise.withResolvers() - provider.gate.mockReturnValueOnce(quota.promise) - await vi.advanceTimersByTimeAsync(11_000 - Date.now()) - expect(provider.gate.mock.calls.length).toBe(gateChecks + 1) - // The newer read succeeds at 12 s; window 1 closes at 13 s; quota answers at 14 s. - await vi.advanceTimersByTimeAsync(1_000) - newer.resolve(found('newer')) - await paired - await vi.advanceTimersByTimeAsync(1_000) - coordinator.clearVisiblePRRefreshWindow(1) - await vi.advanceTimersByTimeAsync(1_000) - quota.resolve(null) - await vi.advanceTimersByTimeAsync(0) - expect(reads()).toBe(2) - expect(provider.gate.mock.calls.length).toBe(gateChecks + 1) - expect(coordinator._getPRRefreshErrorBackoffCountForTests()).toBe(0) - expect(resources._prBranchReadResourceCountForTests()).toBe(0) - provider.resolve.mockImplementation(async () => found('changed')) - if (closed === 'its last window') { - // No row wants it any more: nothing was queued again, and nothing reads later. - expect(coordinator._getPRRefreshQueueSizeForTests()).toBe(0) - await vi.advanceTimersByTimeAsync(60 * 60_000) - expect(reads()).toBe(2) - } else { - // Window 2 still shows the row: its ordinary follow-up reads two minutes after the newer read. - await vi.advanceTimersByTimeAsync(131_999 - Date.now()) - expect(reads()).toBe(2) - await vi.advanceTimersByTimeAsync(1) - expect(reads()).toBe(3) - } - } -) diff --git a/src/main/github/pull-requests/refresh/pr-refresh-coordinator-restoration.test.ts b/src/main/github/pull-requests/refresh/pr-refresh-coordinator-restoration.test.ts index e949513cda7..743359b5252 100644 --- a/src/main/github/pull-requests/refresh/pr-refresh-coordinator-restoration.test.ts +++ b/src/main/github/pull-requests/refresh/pr-refresh-coordinator-restoration.test.ts @@ -61,7 +61,8 @@ const deliveredTo = (branch: string) => ?.outcome.pr?.title async function load() { - const policy = await import('../../../../shared/review-refresh-policy') + const policy = + await import('../../../../shared/source-control/hosted-review/review-refresh-policy') const coordinator = await import('./pr-refresh-coordinator') const lookup = await import('../../client/lookup/pr-for-branch-outcome') const resources = await import('../../client/lookup/pr-branch-read-resources') @@ -106,36 +107,6 @@ async function load() { return { coordinator, lookup, switchTo, fillExactCache, directRead, claims } } -it('restores a failure the full exact cache could not keep as its own retry, which Off retires again', async () => { - const { coordinator, switchTo, fillExactCache, claims } = await load() - const holds = await fillExactCache() - provider.resolve.mockImplementation(async () => failed()) - const target = makeCandidate({ branch: 'target', currentHeadOid: 'head-sha' }) - // Fails at 1 s with no exact entry; Default would retry it at 121 s. - coordinator.reportVisiblePRRefreshCandidates([target], 1, 1) - await vi.advanceTimersByTimeAsync(0) - expect(readsOf('target')).toBe(1) - for (const release of holds) { - release() - } - - await switchTo('off', 1_500) - await switchTo('default', 2_000) - await switchTo('off', 3_000) - await vi.advanceTimersByTimeAsync(130_000 - Date.now()) - expect(readsOf('target')).toBe(1) - - provider.resolve.mockImplementation(async () => found('recovered')) - await switchTo('default', Date.now()) - await vi.advanceTimersByTimeAsync(0) - expect(readsOf('target')).toBe(2) - expect(coordinatorMocks.sendToTrustedUIRendererMock.mock.calls.at(-1)?.[1]).toMatchObject({ - outcome: { pr: { title: 'recovered' } } - }) - // Recovery released the failure's claim on its request. - expect(claims()).toBe(0) -}) - it.each(['succeeded', 'failed'] as const)( 'a cadence turned back on reads once for every shown worktree of a PR whose last read %s', async (last) => { @@ -217,45 +188,6 @@ it.each(['default', 'off'] as const)( } ) -it.each(['default', 'off'] as const)( - 'a newer read starting retires a failure already settled, its retry and its claim (%s)', - async (cadence) => { - const { coordinator, lookup, switchTo, fillExactCache, directRead, claims } = await load() - const { hostedReviewOptionArgs } = await import('./pr-refresh-candidate-policy') - await fillExactCache() - const target = makeCandidate({ branch: 'target', currentHeadOid: 'head-sha' }) - const running = Promise.withResolvers() - provider.resolve.mockImplementationOnce(() => running.promise) - coordinator.reportVisiblePRRefreshCandidates([target], 1, 1) - await vi.advanceTimersByTimeAsync(0) - // Another reader of the same request joins the running read: it starts nothing, so the failure - // stays that read's, with its retry at 121 s. - const joined = lookup.getPRForBranchOutcome( - '/repo', - 'target', - null, - null, - null, - hostedReviewOptionArgs(target, 'visible')[0] ?? {} - ) - await vi.advanceTimersByTimeAsync(0) - running.resolve(failed()) - expect(await joined).toMatchObject({ kind: 'upstream-error' }) - await vi.advanceTimersByTimeAsync(0) - expect(readsOf('target')).toBe(1) - expect(claims()).toBe(1) - if (cadence === 'off') { - await switchTo('off', 2_000) - expect(claims()).toBe(1) - } - await vi.advanceTimersByTimeAsync(61_000 - Date.now()) - provider.resolve.mockImplementationOnce(async () => found('newer')) - await directRead(target) - expect(claims()).toBe(0) - await expectNextAutomaticRead(cadence, 181_000, switchTo) - } -) - it.each(['HEAD', 'scope'] as const)( 'a parked failure is not restored once the row is another request (%s)', async (change) => { @@ -339,46 +271,6 @@ it.each(['automatic', 'reported again', 'shown again'] as const)( } ) -it.each(['off', 'reduced'] as const)( - 'a restored follow-up that waited for quota starts only when %s still gives it', - async (cadence) => { - const { coordinator, lookup, switchTo } = await load() - const x = makeCandidate({ branch: 'x', currentHeadOid: 'head-sha' }) - coordinator.reportVisiblePRRefreshCandidates([x], 1, 1) - await vi.advanceTimersByTimeAsync(0) - await switchTo('off', 2_000) - // Other reads push X's exact answer out of the bounded cache, so none can stand in for a start. - for (let other = 0; other < 256; other += 1) { - await lookup.getPRForBranchOutcome('/repo', `other-${other}`, null, null, null, { - currentHeadOid: 'head-sha' - }) - } - await vi.advanceTimersByTimeAsync(200_000 - Date.now()) - const quota = Promise.withResolvers() - provider.gate.mockReturnValueOnce(quota.promise) - await switchTo('default', 200_000) - await vi.advanceTimersByTimeAsync(0) - expect(provider.gate).toHaveBeenCalled() - await switchTo(cadence, 201_000) - provider.resolve.mockImplementation(async () => found('changed')) - if (cadence === 'off') { - quota.resolve(null) - await vi.advanceTimersByTimeAsync(60 * 60_000) - expect(readsOf('x')).toBe(1) - return - } - // Reduced puts X's next read five intervals after its data (1 s + 600 s); a shorter learned - // pause does not bring it forward. - await vi.advanceTimersByTimeAsync(1_000) - quota.resolve(300_000) - await vi.advanceTimersByTimeAsync(600_999 - Date.now()) - expect(readsOf('x')).toBe(1) - await vi.advanceTimersByTimeAsync(1) - expect(readsOf('x')).toBe(2) - expect(deliveredTo('x')).toBe('changed') - } -) - /** Opens these renderer windows; a closed one reports destroyed before any cleanup for it runs. */ function openWindows(...ids: number[]): (id: number) => void { const closed = new Set() @@ -391,71 +283,6 @@ function openWindows(...ids: number[]): (id: number) => void { const row = (branch: string) => makeCandidate({ branch, worktreeId: `wt-${branch}`, cacheKey: `/repo::${branch}` }) -it('a parked failure releases its claim once no window shows its row, however that demand ends', async () => { - const { coordinator, switchTo, claims } = await load() - const close = openWindows(1, 2, 3) - provider.resolve.mockImplementation(async () => failed()) - coordinator.reportVisiblePRRefreshCandidates([row('a'), row('shared'), row('removed')], 1, 1) - coordinator.reportVisiblePRRefreshCandidates([row('shared')], 1, 2) - await vi.advanceTimersByTimeAsync(30_000) - expect([readsOf('a'), readsOf('shared'), readsOf('removed')]).toEqual([1, 1, 1]) - // Off leaves no queued work; each failure keeps its claim while its row is shown. - await switchTo('off', 31_000) - expect(coordinator._getPRRefreshQueueSizeForTests()).toBe(0) - expect(claims()).toBe(3) - - // A removed workspace's row has no queued alias to prune, yet its demand ends. - coordinator.pruneWorktreePRRefreshAliases('wt-removed') - expect(claims()).toBe(2) - // Window 1 is already destroyed when its close cleanup runs; window 2 still shows the shared row. - close(1) - coordinator.clearVisiblePRRefreshWindow(1) - expect(claims()).toBe(1) - // Window 2 closes with no cleanup of its own; the next report, from window 3, prunes it. - close(2) - coordinator.reportVisiblePRRefreshCandidates([], 1, 3) - expect(claims()).toBe(0) - expect(coordinator._getPRRefreshErrorBackoffCountForTests()).toBe(0) -}) - -it.each([750, 7_500])( - 'a report from another window does no bookkeeping over %i unchanged rows, and its dropped row releases', - async (count) => { - const { coordinator, claims } = await load() - const { PRRefreshVisibility } = await import('./pr-refresh-visibility') - const { PRRefreshRetryState } = await import('./pr-refresh-retry-state') - openWindows(1, 2) - provider.resolve.mockImplementation(async () => failed()) - coordinator.reportVisiblePRRefreshCandidates([row('b')], 1, 2) - await vi.advanceTimersByTimeAsync(0) - expect(claims()).toBe(1) - coordinator.reportVisiblePRRefreshCandidates( - Array.from({ length: count }, (_, index) => row(`a-${index}`)), - 1, - 1 - ) - const memberships = vi.spyOn(PRRefreshVisibility.prototype, 'has') - const releases = vi.spyOn(PRRefreshRetryState.prototype, 'releaseFailure') - const rendererChecks = coordinatorMocks.webContentsFromIdMock - const work = (report: () => void) => { - for (const counter of [memberships, releases, rendererChecks]) { - counter.mockClear() - } - report() - return [memberships, releases, rendererChecks].map((counter) => counter.mock.calls.length) - } - // Row membership checks, failure releases and renderer checks: one prune of the two windows per - // report, and only B's dropped row is checked and released. - expect(work(() => coordinator.reportVisiblePRRefreshCandidates([row('b')], 2, 2))).toEqual([ - 0, 0, 2 - ]) - expect(work(() => coordinator.reportVisiblePRRefreshCandidates([], 1, 2))).toEqual([0, 0, 2]) - expect(work(() => coordinator.reportVisiblePRRefreshCandidates([], 3, 2))).toEqual([1, 1, 2]) - expect(claims()).toBe(0) - expect(coordinator._getPRRefreshErrorBackoffCountForTests()).toBe(0) - } -) - it('a drain that finds every queued row’s window closed ends quietly; a row still shown reads on', async () => { const { coordinator, claims } = await load() const close = openWindows(1, 2) @@ -565,55 +392,6 @@ it('an action that waited for quota keeps its turn when another worktree of its expect([deliveredTo('x'), deliveredTo('y')]).toEqual(['pushed', 'pushed']) }) -it.each(['its read', 'its failure', 'an earlier head’s read'] as const)( - 'a queued watch planned from %s follows a cadence change from that same anchor', - async (anchor) => { - const { coordinator, switchTo } = await load() - const headReads = vi.fn(async () => Date.now()) - coordinator.setPRWatchJobHooks({ isWatched: () => true, readHeadChecks: headReads }) - if (anchor === 'its failure') { - provider.resolve.mockImplementation(async () => failed()) - } - const watched = makeCandidate({ branch: 'watched', linkedPRNumber: 12 }) - const job = - anchor === 'an earlier head’s read' - ? { prKey: 'github.com/acme/repo#12', headSha: 'old-head' } - : { prKey: 'github.com/acme/repo#12' } - const watchReads = () => - anchor === 'an earlier head’s read' ? headReads.mock.calls.length : readsOf('watched') - await switchTo('minimal', 1_000) - coordinator.schedulePRWatchRead(job, watched, 1_000) - await vi.advanceTimersByTimeAsync(0) - expect(watchReads()).toBe(1) - // Minimal put the next read at 1 201 s; Default, set at 2 s, puts it at 121 s from the same read. - await switchTo('default', 2_000) - await vi.advanceTimersByTimeAsync(120_999 - Date.now()) - expect(watchReads()).toBe(1) - await vi.advanceTimersByTimeAsync(1) - expect(watchReads()).toBe(2) - } -) - -it('a watch that waited for quota while Off slowed it to Minimal reads at the Minimal time', async () => { - const { coordinator, switchTo } = await load() - coordinator.setPRWatchJobHooks({ isWatched: () => true, readHeadChecks: async () => null }) - const watched = makeCandidate({ branch: 'watched', linkedPRNumber: 12 }) - coordinator.schedulePRWatchRead({ prKey: 'github.com/acme/repo#12' }, watched, 1_000) - await vi.advanceTimersByTimeAsync(0) - // Due at 121 s on Default; quota is still being checked when Off (Minimal for watches) arrives. - await vi.advanceTimersByTimeAsync(121_000 - Date.now() - 1) - const quota = Promise.withResolvers() - provider.gate.mockReturnValueOnce(quota.promise) - await vi.advanceTimersByTimeAsync(1) - expect(provider.gate).toHaveBeenLastCalledWith(watched, true) - await switchTo('off', 121_500) - quota.resolve(null) - await vi.advanceTimersByTimeAsync(1_200_999 - Date.now()) - expect(readsOf('watched')).toBe(1) - await vi.advanceTimersByTimeAsync(1) - expect(readsOf('watched')).toBe(2) -}) - it('retiming an old HEAD failure cannot delay the newer HEAD return under Off', async () => { const { coordinator, switchTo } = await load() const target = makeCandidate({ branch: 'target', linkedPRNumber: 7, currentHeadOid: 'head-a' }) diff --git a/src/main/github/pull-requests/refresh/pr-refresh-coordinator.ts b/src/main/github/pull-requests/refresh/pr-refresh-coordinator.ts index 67561fe755f..698cd1db404 100644 --- a/src/main/github/pull-requests/refresh/pr-refresh-coordinator.ts +++ b/src/main/github/pull-requests/refresh/pr-refresh-coordinator.ts @@ -32,7 +32,7 @@ import { import { PRRefreshRetryState } from './pr-refresh-retry-state' import { PRRefreshVisibility } from './pr-refresh-visibility' import { refreshPRPolicyContext } from '../../client/lookup/pr-quiet-policy-evidence' -import { getPRAutoRefreshCadence } from '../../../../shared/review-refresh-policy' +import { getPRAutoRefreshCadence } from '../../../../shared/source-control/hosted-review/review-refresh-policy' import { deliverablePRBranchOutcome, setPRBranchReadCompletion, diff --git a/src/main/github/pull-requests/refresh/pr-refresh-queue.ts b/src/main/github/pull-requests/refresh/pr-refresh-queue.ts index 7d99031b699..71edb4cf3c2 100644 --- a/src/main/github/pull-requests/refresh/pr-refresh-queue.ts +++ b/src/main/github/pull-requests/refresh/pr-refresh-queue.ts @@ -1,4 +1,4 @@ -import { REVIEW_REFRESH_COOLDOWN_MS } from '../../../../shared/review-refresh-policy' +import { REVIEW_REFRESH_COOLDOWN_MS } from '../../../../shared/source-control/hosted-review/review-refresh-policy' import type { HostedPRReadJob } from './hosted-pr-read-jobs' import type { PRWatchPlan } from './pr-refresh-watch-jobs' import type { diff --git a/src/main/github/pull-requests/refresh/pr-refresh-retry-state.ts b/src/main/github/pull-requests/refresh/pr-refresh-retry-state.ts index 6780faef5a4..11516a15b21 100644 --- a/src/main/github/pull-requests/refresh/pr-refresh-retry-state.ts +++ b/src/main/github/pull-requests/refresh/pr-refresh-retry-state.ts @@ -6,7 +6,7 @@ import { lookupBackoffDelayMs } from '../../../source-control/hosted-review-refr import { getPRAutoRefreshCadence, type PRAutoRefreshCadence -} from '../../../../shared/review-refresh-policy' +} from '../../../../shared/source-control/hosted-review/review-refresh-policy' import { aliasFromCandidate, refreshIntervalForCandidate, diff --git a/src/main/github/pull-requests/refresh/pr-refresh-watch-jobs.ts b/src/main/github/pull-requests/refresh/pr-refresh-watch-jobs.ts index 354c4b83fa1..90de87062c1 100644 --- a/src/main/github/pull-requests/refresh/pr-refresh-watch-jobs.ts +++ b/src/main/github/pull-requests/refresh/pr-refresh-watch-jobs.ts @@ -10,7 +10,7 @@ import { reviewRefreshIntervalMs, scaleReviewRefreshInterval, type PRAutoRefreshCadence -} from '../../../../shared/review-refresh-policy' +} from '../../../../shared/source-control/hosted-review/review-refresh-policy' import type { PRRefreshQueue, PRRefreshQueueEntry } from './pr-refresh-queue' import type { PRRefreshRetryState } from './pr-refresh-retry-state' diff --git a/src/main/github/pull-requests/stacks/github-pr-stack-async-merge.ts b/src/main/github/pull-requests/stacks/github-pr-stack-async-merge.ts index 5d91a577ee8..f943fef89ba 100644 --- a/src/main/github/pull-requests/stacks/github-pr-stack-async-merge.ts +++ b/src/main/github/pull-requests/stacks/github-pr-stack-async-merge.ts @@ -4,7 +4,7 @@ import { acquire, release } from '../../execution/github-operation-slots' import { githubHostExecOptions } from '../../repositories/github-repository-host' import type { GitHubRepositoryIdentity as GitHubApiRepository } from '../../../../shared/github/repositories/repository-identity' import type { GitHubRepoExecOptions } from '../../repositories/github-api-repository' -import { codeHostFailure } from '../../../../shared/code-host-failure-copy' +import { codeHostFailure } from '../../../../shared/source-control/code-host-failure-copy' const POLL_INTERVAL_MS = 1_000 const MAX_POLLS = 180 diff --git a/src/main/github/pull-requests/start-points/pr-head-tracking-ref.ts b/src/main/github/pull-requests/start-points/pr-head-tracking-ref.ts index b2aafecf43b..9c369e29892 100644 --- a/src/main/github/pull-requests/start-points/pr-head-tracking-ref.ts +++ b/src/main/github/pull-requests/start-points/pr-head-tracking-ref.ts @@ -4,7 +4,7 @@ import { isSafeReviewHeadFetchRemote, isValidReviewHeadNumber, REVIEW_HEAD_FETCH_TIMEOUT_MS -} from '../../../../shared/review-head-tracking-ref' +} from '../../../../shared/worktree/hosted-review/review-head-tracking-ref' import { getReviewHeadRemoteComponent } from '../../../git/remotes/review-head-remote-identity' import { SSH_GIT_RECONNECT_MESSAGE, diff --git a/src/main/github/pull-requests/start-points/pr-start-point-wsl-gate.ts b/src/main/github/pull-requests/start-points/pr-start-point-wsl-gate.ts index dc90b377bbf..0ce56194f57 100644 --- a/src/main/github/pull-requests/start-points/pr-start-point-wsl-gate.ts +++ b/src/main/github/pull-requests/start-points/pr-start-point-wsl-gate.ts @@ -1,5 +1,5 @@ import { wslDistroStoppedMessage } from '../../../../shared/remote-runtime/wsl-hosts/wsl-distro-not-running-refusal' -import type { ReviewStartPointFailure } from '../../../../shared/review-start-point-failure-copy' +import type { ReviewStartPointFailure } from '../../../../shared/worktree/hosted-review/review-start-point-failure-copy' import { guardWslUncPathAccess, WslDistroStoppedError, diff --git a/src/main/github/pull-requests/start-points/pr-start-point.test.ts b/src/main/github/pull-requests/start-points/pr-start-point.test.ts index 0284bf81769..00c25d09b29 100644 --- a/src/main/github/pull-requests/start-points/pr-start-point.test.ts +++ b/src/main/github/pull-requests/start-points/pr-start-point.test.ts @@ -14,7 +14,7 @@ vi.mock('../../client/fetch/get-work-item', () => ({ })) import { resolveGitHubPrStartPoint } from './pr-start-point' -import { reviewHeadRemoteRefComponent } from '../../../../shared/review-head-tracking-ref' +import { reviewHeadRemoteRefComponent } from '../../../../shared/worktree/hosted-review/review-head-tracking-ref' const ORIGIN_URL = 'git@github.com:acme/orca.git' const ORIGIN_COMPONENT = reviewHeadRemoteRefComponent('origin', ORIGIN_URL) diff --git a/src/main/github/pull-requests/start-points/pr-start-point.ts b/src/main/github/pull-requests/start-points/pr-start-point.ts index 2e151039fd3..4c769ebb5ab 100644 --- a/src/main/github/pull-requests/start-points/pr-start-point.ts +++ b/src/main/github/pull-requests/start-points/pr-start-point.ts @@ -10,8 +10,8 @@ import { getWorkItem } from '../../client/fetch/get-work-item' import { githubPullRequestHeadLocalRef, reviewHeadRemoteRefComponent -} from '../../../../shared/review-head-tracking-ref' -import { reviewStartPointFailure } from '../../../../shared/review-start-point-failure-copy' +} from '../../../../shared/worktree/hosted-review/review-head-tracking-ref' +import { reviewStartPointFailure } from '../../../../shared/worktree/hosted-review/review-start-point-failure-copy' type GitExec = (args: string[]) => Promise<{ stdout: string; stderr: string }> diff --git a/src/main/github/pull-requests/start-points/review-head-remote.ts b/src/main/github/pull-requests/start-points/review-head-remote.ts index 478587c8316..65a29a0480d 100644 --- a/src/main/github/pull-requests/start-points/review-head-remote.ts +++ b/src/main/github/pull-requests/start-points/review-head-remote.ts @@ -1,6 +1,6 @@ import type { IssueSourcePreference } from '../../../../shared/repository/repo-types' import type { GhAccountBinding } from '../../../../shared/github/accounts/account-binding' -import { pickPreferredGitRemote } from '../../../../shared/preferred-git-remote' +import { pickPreferredGitRemote } from '../../../../shared/git/remotes/preferred-git-remote' import { getDefaultRemote } from '../../../git/remotes/repo-remote-queries' import { getGitHubApiRepositoryForRemote } from '../../repositories/github-api-repository-remote-probe' diff --git a/src/main/gitlab/issues/gitlab-issue-queries.ts b/src/main/gitlab/issues/gitlab-issue-queries.ts index ca225d73a56..f7b3c738d41 100644 --- a/src/main/gitlab/issues/gitlab-issue-queries.ts +++ b/src/main/gitlab/issues/gitlab-issue-queries.ts @@ -1,5 +1,9 @@ -import type { ClassifiedError } from '../../../shared/classified-error' -import type { GitLabCommentResult, GitLabIssueInfo, MRComment } from '../../../shared/gitlab-types' +import type { ClassifiedError } from '../../../shared/errors/classified-error' +import type { + GitLabCommentResult, + GitLabIssueInfo, + MRComment +} from '../../../shared/gitlab/gitlab-types' import type { IssueSourcePreference } from '../../../shared/repository/repo-types' import { mapGitLabIssueInfo } from '../requests/gitlab-response-mapping' // prettier-ignore @@ -13,7 +17,10 @@ import { parseGlabJsonList, parseGlabPaginationHeader } from '../requests/glab-a import type { ProjectRef } from '../projects/project-ref-parser' import { encodedProject } from '../projects/project-path-encoding' import { isTaskRepositoryIneligible } from '../../git/remotes/task-repository-eligibility' -import { codeHostFailure, classifiedFailure } from '../../../shared/code-host-failure-copy' +import { + codeHostFailure, + classifiedFailure +} from '../../../shared/source-control/code-host-failure-copy' // Distinguish a confirmed empty list from fetch failure. export type IssueListResult = { diff --git a/src/main/gitlab/issues/issue-update.ts b/src/main/gitlab/issues/issue-update.ts index 42babd49fab..af15ed8c179 100644 --- a/src/main/gitlab/issues/issue-update.ts +++ b/src/main/gitlab/issues/issue-update.ts @@ -1,4 +1,4 @@ -import type { GitLabIssueUpdate } from '../../../shared/gitlab-types' +import type { GitLabIssueUpdate } from '../../../shared/gitlab/gitlab-types' import type { IssueSourcePreference } from '../../../shared/repository/repo-types' import { acquire, release } from '../requests/glab-request-admission' import { classifyGlabError } from '../requests/glab-error-classification' @@ -12,8 +12,11 @@ import { import { resolveIssueSource } from './gitlab-issue-source-resolution' import type { ProjectRef } from '../projects/project-ref-parser' import { encodedProject } from '../projects/project-path-encoding' -import { codeHostFailure, combinedClassifiedFailure } from '../../../shared/code-host-failure-copy' -import type { ClassifiedError } from '../../../shared/classified-error' +import { + codeHostFailure, + combinedClassifiedFailure +} from '../../../shared/source-control/code-host-failure-copy' +import type { ClassifiedError } from '../../../shared/errors/classified-error' /** Mutate the preference-selected project so equal origin/upstream issue numbers cannot retarget edits. */ export async function updateIssue( diff --git a/src/main/gitlab/merge-requests/merge-request-list.ts b/src/main/gitlab/merge-requests/merge-request-list.ts index 98abc481961..7c4359a1d75 100644 --- a/src/main/gitlab/merge-requests/merge-request-list.ts +++ b/src/main/gitlab/merge-requests/merge-request-list.ts @@ -2,7 +2,7 @@ import type { GitLabMRInvolvement, ListMergeRequestsResult, MRListState -} from '../../../shared/gitlab-types' +} from '../../../shared/gitlab/gitlab-types' import type { IssueSourcePreference } from '../../../shared/repository/repo-types' import { mapMRToWorkItem } from '../requests/gitlab-response-mapping' import { acquire, glabApiWithHeaders, release } from '../requests/glab-request-admission' diff --git a/src/main/gitlab/merge-requests/merge-request-lookup.ts b/src/main/gitlab/merge-requests/merge-request-lookup.ts index bb946ecc0e6..2bbc429e01b 100644 --- a/src/main/gitlab/merge-requests/merge-request-lookup.ts +++ b/src/main/gitlab/merge-requests/merge-request-lookup.ts @@ -12,7 +12,7 @@ import { } from '../../source-control/repo-default-branch' import { extractExecError } from '../../git/command-runner/process-capture/exec-error' import { classifyGlabError } from '../requests/glab-error-classification' -import type { MRInfo } from '../../../shared/gitlab-types' +import type { MRInfo } from '../../../shared/gitlab/gitlab-types' import { derivePipelineStatus, mapMRInfo } from '../requests/gitlab-response-mapping' import { acquire, release } from '../requests/glab-request-admission' import { getGlabKnownHosts } from '../projects/gitlab-known-host-probe' diff --git a/src/main/gitlab/merge-requests/merge-request-review-mutations.ts b/src/main/gitlab/merge-requests/merge-request-review-mutations.ts index 908ed0e9a13..5a6b8b1e979 100644 --- a/src/main/gitlab/merge-requests/merge-request-review-mutations.ts +++ b/src/main/gitlab/merge-requests/merge-request-review-mutations.ts @@ -4,7 +4,7 @@ import type { GitLabMRInlineCommentInput, GitLabMRReviewersUpdateResult, MRComment -} from '../../../shared/gitlab-types' +} from '../../../shared/gitlab/gitlab-types' import type { IssueSourcePreference } from '../../../shared/repository/repo-types' import { acquire, release } from '../requests/glab-request-admission' import { classifyGlabError } from '../requests/glab-error-classification' @@ -14,7 +14,10 @@ import type { LocalGitExecOptions } from '../projects/gitlab-known-host-probe' import type { ProjectRef } from '../projects/project-ref-parser' import { encodedProject } from '../projects/project-path-encoding' import { withProjectRef } from './merge-request-project-resolution' -import { codeHostFailure, classifiedFailure } from '../../../shared/code-host-failure-copy' +import { + codeHostFailure, + classifiedFailure +} from '../../../shared/source-control/code-host-failure-copy' export async function addMRComment( repoPath: string, diff --git a/src/main/gitlab/merge-requests/merge-request-state-mutations.ts b/src/main/gitlab/merge-requests/merge-request-state-mutations.ts index 6ba5e0fe754..63a71f225a7 100644 --- a/src/main/gitlab/merge-requests/merge-request-state-mutations.ts +++ b/src/main/gitlab/merge-requests/merge-request-state-mutations.ts @@ -5,7 +5,7 @@ import { glabExecFileAsync } from '../../git/command-runner/hosted-cli/glab-exec import type { LocalGitExecOptions } from '../projects/gitlab-known-host-probe' import type { ProjectRef } from '../projects/project-ref-parser' import { withProjectRef } from './merge-request-project-resolution' -import { codeHostFailure } from '../../../shared/code-host-failure-copy' +import { codeHostFailure } from '../../../shared/source-control/code-host-failure-copy' import { invalidateReviewLookupsAfterPRMutation } from '../../github/pull-requests/refresh/pr-mutation-review-invalidation' // Why: glab's MRCheckErrors refuses a no-op close/reopen with these fixed texts; every other diff --git a/src/main/gitlab/merge-requests/merge-request-update.ts b/src/main/gitlab/merge-requests/merge-request-update.ts index 2acf374d1a2..82fc8681a75 100644 --- a/src/main/gitlab/merge-requests/merge-request-update.ts +++ b/src/main/gitlab/merge-requests/merge-request-update.ts @@ -1,5 +1,5 @@ import type { IssueSourcePreference } from '../../../shared/repository/repo-types' -import type { GitLabMRUpdate } from '../../../shared/gitlab-types' +import type { GitLabMRUpdate } from '../../../shared/gitlab/gitlab-types' import { acquire, release } from '../requests/glab-request-admission' import { classifyGlabError } from '../requests/glab-error-classification' import { glabHostnameArgs, glabRepoExecOptions } from '../projects/gitlab-project-ref-resolution' @@ -10,7 +10,10 @@ import { encodedProject } from '../projects/project-path-encoding' import { stripGitLabDraftTitlePrefix } from './merge-request-draft-title' import { withProjectRef } from './merge-request-project-resolution' import { tryMarkMRReady } from './merge-request-ready' -import { codeHostFailure, classifiedFailure } from '../../../shared/code-host-failure-copy' +import { + codeHostFailure, + classifiedFailure +} from '../../../shared/source-control/code-host-failure-copy' import { invalidateReviewLookupsAfterPRMutation } from '../../github/pull-requests/refresh/pr-mutation-review-invalidation' export async function updateMR( diff --git a/src/main/gitlab/merge-requests/mr-discussion-notes.ts b/src/main/gitlab/merge-requests/mr-discussion-notes.ts index d8998b36740..0843fb645c7 100644 --- a/src/main/gitlab/merge-requests/mr-discussion-notes.ts +++ b/src/main/gitlab/merge-requests/mr-discussion-notes.ts @@ -1,5 +1,5 @@ import { fetchAllGitLabPages } from '../requests/gitlab-paginated-list' -import type { MRComment } from '../../../shared/gitlab-types' +import type { MRComment } from '../../../shared/gitlab/gitlab-types' import { viewerAuthorship } from '../../source-control/comment-viewer-authorship' import { readGlabViewer } from '../requests/gitlab-auth-and-rate-limit' import { encodedProject } from '../projects/project-path-encoding' diff --git a/src/main/gitlab/merge-requests/mr-file-diffs.ts b/src/main/gitlab/merge-requests/mr-file-diffs.ts index 56525f3f2e6..6c7ab7c8587 100644 --- a/src/main/gitlab/merge-requests/mr-file-diffs.ts +++ b/src/main/gitlab/merge-requests/mr-file-diffs.ts @@ -1,4 +1,4 @@ -import type { GitLabMRFile } from '../../../shared/gitlab-types' +import type { GitLabMRFile } from '../../../shared/gitlab/gitlab-types' import { encodedProject } from '../projects/project-path-encoding' import { glabHostnameArgs, glabRepoExecOptions } from '../projects/gitlab-project-ref-resolution' import { glabExecFileAsync } from '../../git/command-runner/hosted-cli/glab-exec-file' diff --git a/src/main/gitlab/merge-requests/mr-head-tracking-ref.ts b/src/main/gitlab/merge-requests/mr-head-tracking-ref.ts index 16c26a13903..4af59199b7b 100644 --- a/src/main/gitlab/merge-requests/mr-head-tracking-ref.ts +++ b/src/main/gitlab/merge-requests/mr-head-tracking-ref.ts @@ -3,7 +3,7 @@ import { isSafeReviewHeadFetchRemote, isValidReviewHeadNumber, REVIEW_HEAD_FETCH_TIMEOUT_MS -} from '../../../shared/review-head-tracking-ref' +} from '../../../shared/worktree/hosted-review/review-head-tracking-ref' import { gitExecFileAsync } from '../../git/command-runner/git-exec-file' import { getReviewHeadRemoteComponent } from '../../git/remotes/review-head-remote-identity' import { diff --git a/src/main/gitlab/merge-requests/mr-reviewers-and-approvals.ts b/src/main/gitlab/merge-requests/mr-reviewers-and-approvals.ts index 92790a7cdff..33f15b5c7a9 100644 --- a/src/main/gitlab/merge-requests/mr-reviewers-and-approvals.ts +++ b/src/main/gitlab/merge-requests/mr-reviewers-and-approvals.ts @@ -1,4 +1,7 @@ -import type { GitLabAssignableUser, GitLabMRApprovalState } from '../../../shared/gitlab-types' +import type { + GitLabAssignableUser, + GitLabMRApprovalState +} from '../../../shared/gitlab/gitlab-types' import { mapGitLabUser, type GitLabRawUser } from '../projects/gitlab-assignable-user-mapping' import { encodedProject } from '../projects/project-path-encoding' import { glabHostnameArgs, glabRepoExecOptions } from '../projects/gitlab-project-ref-resolution' diff --git a/src/main/gitlab/pipelines/pipeline-job-graph.ts b/src/main/gitlab/pipelines/pipeline-job-graph.ts index 802d6f83ea3..c30aec23f14 100644 --- a/src/main/gitlab/pipelines/pipeline-job-graph.ts +++ b/src/main/gitlab/pipelines/pipeline-job-graph.ts @@ -1,4 +1,4 @@ -import type { GitLabPipelineJob } from '../../../shared/gitlab-types' +import type { GitLabPipelineJob } from '../../../shared/gitlab/gitlab-types' import { encodedProject } from '../projects/project-path-encoding' import { gitLabRunTimes } from './gitlab-run-times' import { diff --git a/src/main/gitlab/pipelines/pipeline-job-mutations.ts b/src/main/gitlab/pipelines/pipeline-job-mutations.ts index 667b9465161..90c108ce23d 100644 --- a/src/main/gitlab/pipelines/pipeline-job-mutations.ts +++ b/src/main/gitlab/pipelines/pipeline-job-mutations.ts @@ -2,7 +2,7 @@ import type { GitLabJobTraceResult, GitLabPipelineJob, GitLabRetryJobResult -} from '../../../shared/gitlab-types' +} from '../../../shared/gitlab/gitlab-types' import type { IssueSourcePreference } from '../../../shared/repository/repo-types' import { acquire, release } from '../requests/glab-request-admission' import { @@ -17,7 +17,10 @@ import type { ProjectRef } from '../projects/project-ref-parser' import { encodedProject } from '../projects/project-path-encoding' import { gitLabRunTimes } from './gitlab-run-times' import { withProjectRef } from '../merge-requests/merge-request-project-resolution' -import { codeHostFailure, classifiedFailure } from '../../../shared/code-host-failure-copy' +import { + codeHostFailure, + classifiedFailure +} from '../../../shared/source-control/code-host-failure-copy' // Large traces need more than the runner default; the renderer also bounds the call. const JOB_TRACE_EXEC_TIMEOUT_MS = 60_000 diff --git a/src/main/gitlab/projects/gitlab-assignable-user-mapping.ts b/src/main/gitlab/projects/gitlab-assignable-user-mapping.ts index dd9c3b9a2e8..a3fd7de2db6 100644 --- a/src/main/gitlab/projects/gitlab-assignable-user-mapping.ts +++ b/src/main/gitlab/projects/gitlab-assignable-user-mapping.ts @@ -1,4 +1,4 @@ -import type { GitLabAssignableUser } from '../../../shared/gitlab-types' +import type { GitLabAssignableUser } from '../../../shared/gitlab/gitlab-types' export type GitLabRawUser = { id?: number diff --git a/src/main/gitlab/projects/gitlab-project-recents.ts b/src/main/gitlab/projects/gitlab-project-recents.ts index 12a826c9be7..3de34555b71 100644 --- a/src/main/gitlab/projects/gitlab-project-recents.ts +++ b/src/main/gitlab/projects/gitlab-project-recents.ts @@ -1,5 +1,5 @@ import type { GlobalSettings } from '../../../shared/global-settings-types' -import { computeNextGitLabRecents } from '../../../shared/gitlab-projects' +import { computeNextGitLabRecents } from '../../../shared/gitlab/gitlab-projects' export type GitLabProjectRecentsStore = { getSettings(): Pick diff --git a/src/main/gitlab/projects/project-label-and-member-lookup.ts b/src/main/gitlab/projects/project-label-and-member-lookup.ts index 53bf0d50c4a..d64700eaf45 100644 --- a/src/main/gitlab/projects/project-label-and-member-lookup.ts +++ b/src/main/gitlab/projects/project-label-and-member-lookup.ts @@ -1,4 +1,4 @@ -import type { GitLabAssignableUser } from '../../../shared/gitlab-types' +import type { GitLabAssignableUser } from '../../../shared/gitlab/gitlab-types' import type { IssueSourcePreference } from '../../../shared/repository/repo-types' import { mapGitLabUser, type GitLabRawUser } from './gitlab-assignable-user-mapping' import { acquire, release } from '../requests/glab-request-admission' diff --git a/src/main/gitlab/projects/project-ref-parser.ts b/src/main/gitlab/projects/project-ref-parser.ts index e4cfbb5c1ea..fb96344d1b5 100644 --- a/src/main/gitlab/projects/project-ref-parser.ts +++ b/src/main/gitlab/projects/project-ref-parser.ts @@ -1,4 +1,4 @@ -import type { GitLabProjectRef } from '../../../shared/gitlab-types' +import type { GitLabProjectRef } from '../../../shared/gitlab/gitlab-types' import { normalizeGitLabRemoteHost } from '../../../shared/git/remotes/git-remote-host-alias' import { getPublicForgeProviderForHost } from '../../../shared/git/remotes/public-forge-host' diff --git a/src/main/gitlab/requests/gitlab-auth-and-rate-limit.ts b/src/main/gitlab/requests/gitlab-auth-and-rate-limit.ts index 7d99f333642..0462a04a3af 100644 --- a/src/main/gitlab/requests/gitlab-auth-and-rate-limit.ts +++ b/src/main/gitlab/requests/gitlab-auth-and-rate-limit.ts @@ -3,7 +3,7 @@ import type { GitLabAuthDiagnostic, GitLabRateLimitSnapshot, GitLabViewer -} from '../../../shared/gitlab-types' +} from '../../../shared/gitlab/gitlab-types' import { acquire, glabApiWithHeaders, release } from './glab-request-admission' import { glabExecFileAsync } from '../../git/command-runner/hosted-cli/glab-exec-file' import { diff --git a/src/main/gitlab/requests/gitlab-preload-args.ts b/src/main/gitlab/requests/gitlab-preload-args.ts index 52c80760ca7..074547ad656 100644 --- a/src/main/gitlab/requests/gitlab-preload-args.ts +++ b/src/main/gitlab/requests/gitlab-preload-args.ts @@ -1,4 +1,4 @@ -import type { GitLabMRInvolvement, MRListState } from '../../../shared/gitlab-types' +import type { GitLabMRInvolvement, MRListState } from '../../../shared/gitlab/gitlab-types' export type GitLabIssueListState = 'opened' | 'closed' | 'all' diff --git a/src/main/gitlab/requests/gitlab-response-mapping.ts b/src/main/gitlab/requests/gitlab-response-mapping.ts index 578b255d175..ea12ecfabe8 100644 --- a/src/main/gitlab/requests/gitlab-response-mapping.ts +++ b/src/main/gitlab/requests/gitlab-response-mapping.ts @@ -1,6 +1,11 @@ import { gitLabPipelineJobOutcome } from '../../../shared/source-control/checks/gitlab/gitlab-pipeline-checks' import type { CheckStatus } from '../../../shared/github/pull-requests/pull-request-types' -import type { GitLabIssueInfo, GitLabWorkItem, MRInfo, MRState } from '../../../shared/gitlab-types' +import type { + GitLabIssueInfo, + GitLabWorkItem, + MRInfo, + MRState +} from '../../../shared/gitlab/gitlab-types' import { summarizeProviderChecks } from '../../../shared/source-control/checks/provider-check-summary' diff --git a/src/main/gitlab/requests/glab-error-classification.ts b/src/main/gitlab/requests/glab-error-classification.ts index 65079faf265..34c99d2d4b0 100644 --- a/src/main/gitlab/requests/glab-error-classification.ts +++ b/src/main/gitlab/requests/glab-error-classification.ts @@ -1,5 +1,5 @@ -import type { ClassifiedError } from '../../../shared/classified-error' -import { classifiedCodeHostError as classified } from '../../../shared/code-host-failure-copy' +import type { ClassifiedError } from '../../../shared/errors/classified-error' +import { classifiedCodeHostError as classified } from '../../../shared/source-control/code-host-failure-copy' import { GlabNonListResponseError } from './glab-api-response' export function classifyGlabError(stderr: string): ClassifiedError { diff --git a/src/main/gitlab/work-items/work-item-details.ts b/src/main/gitlab/work-items/work-item-details.ts index 70bcac53374..5e6d1b8f2d3 100644 --- a/src/main/gitlab/work-items/work-item-details.ts +++ b/src/main/gitlab/work-items/work-item-details.ts @@ -2,7 +2,7 @@ import type { GitLabAssignableUser, GitLabWorkItem, GitLabWorkItemDetails -} from '../../../shared/gitlab-types' +} from '../../../shared/gitlab/gitlab-types' import type { IssueSourcePreference } from '../../../shared/repository/repo-types' import { derivePipelineStatus, diff --git a/src/main/gitlab/work-items/work-item-queries.ts b/src/main/gitlab/work-items/work-item-queries.ts index 09ca1e99ca8..aace65aad2b 100644 --- a/src/main/gitlab/work-items/work-item-queries.ts +++ b/src/main/gitlab/work-items/work-item-queries.ts @@ -1,10 +1,10 @@ -import type { ClassifiedError } from '../../../shared/classified-error' +import type { ClassifiedError } from '../../../shared/errors/classified-error' import type { GitLabPagedResult, GitLabTodo, GitLabWorkItem, MRListState -} from '../../../shared/gitlab-types' +} from '../../../shared/gitlab/gitlab-types' import type { IssueSourcePreference } from '../../../shared/repository/repo-types' import { mapIssueToWorkItem, mapMRToWorkItem } from '../requests/gitlab-response-mapping' import { acquire, release } from '../requests/glab-request-admission' diff --git a/src/main/ipc/ai-vault/ai-vault-subagent-list.ts b/src/main/ipc/ai-vault/ai-vault-subagent-list.ts index 6e9f43493c2..d314a18c647 100644 --- a/src/main/ipc/ai-vault/ai-vault-subagent-list.ts +++ b/src/main/ipc/ai-vault/ai-vault-subagent-list.ts @@ -3,7 +3,7 @@ import { getAiVaultWslHomeDirs } from '../../ai-vault/discovery/ai-vault-scan-ro import { listAiVaultSubagentSessionsInBackground } from '../../ai-vault/scan-service/session-scanner-background' import { claudeProjectsRootDirs } from '../../ai-vault/discovery/session-scanner-roots' import { sessionRowRootDirs } from '../../ai-vault/discovery/session-scanner-agent-sources' -import { isPathInsideOrEqual } from '../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../shared/file-access/cross-platform-path' import { LOCAL_EXECUTION_HOST_ID } from '../../../shared/execution-host' import type { AiVaultSubagentListArgs, diff --git a/src/main/ipc/automations.ts b/src/main/ipc/automations.ts index 940ffda2e95..40f0b3c574f 100644 --- a/src/main/ipc/automations.ts +++ b/src/main/ipc/automations.ts @@ -14,7 +14,7 @@ import type { AutomationOwnerRef } from '../../shared/automations/ownership/auto import type { ScopedExternalManagerActionRequest, ScopedExternalManagerListRequest -} from '../../shared/external-automation-scope' +} from '../../shared/automations/external/external-automation-scope' /** Refuse uncaptured owners instead of using the active host; malformed input remains a plain Error, not an ownership conflict. */ function requireCapturedOwner( diff --git a/src/main/ipc/ephemeral-vm-recipe-context.ts b/src/main/ipc/ephemeral-vm-recipe-context.ts index 5201da558a8..600505c140d 100644 --- a/src/main/ipc/ephemeral-vm-recipe-context.ts +++ b/src/main/ipc/ephemeral-vm-recipe-context.ts @@ -4,7 +4,7 @@ import type { EphemeralVmRecipeDoctorResult } from '../../shared/remote-runtime/ import { listEphemeralVmRuntimes } from '../../shared/remote-runtime/ephemeral-vm-store/ephemeral-vm-runtime-store' import type { EphemeralVmRuntimeRecord } from '../../shared/remote-runtime/ephemeral-vm-store/ephemeral-vm-runtimes' import { isFolderRepo, isGitRepoKind } from '../../shared/repository/repo-kind' -import type { OrcaVmRecipe } from '../../shared/orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../shared/workspace-setup/orca-yaml-hook-types' import { EphemeralVmFailureError, ephemeralVmFailure, diff --git a/src/main/ipc/filesystem/access/filesystem-allowed-roots.test.ts b/src/main/ipc/filesystem/access/filesystem-allowed-roots.test.ts index ad55987ff50..873478b23c6 100644 --- a/src/main/ipc/filesystem/access/filesystem-allowed-roots.test.ts +++ b/src/main/ipc/filesystem/access/filesystem-allowed-roots.test.ts @@ -10,7 +10,7 @@ import { buildProjectGroupChildIndex, getProjectGroupSubtreeIds } from '../../../../shared/project/groups/project-groups' -import type * as CrossPlatformPathModule from '../../../../shared/cross-platform-path' +import type * as CrossPlatformPathModule from '../../../../shared/file-access/cross-platform-path' import type { FolderWorkspace } from '../../../../shared/folder-workspaces/folder-workspace-types' import type { ProjectGroup } from '../../../../shared/project/groups/project-group-types' import type { Project } from '../../../../shared/project/project-types' @@ -36,9 +36,9 @@ vi.mock('../../../../shared/project/groups/project-groups', async () => { } }) -vi.mock('../../../../shared/cross-platform-path', async () => { +vi.mock('../../../../shared/file-access/cross-platform-path', async () => { const actual = await vi.importActual( - '../../../../shared/cross-platform-path' + '../../../../shared/file-access/cross-platform-path' ) return { ...actual, isPathInsideOrEqual: vi.fn(actual.isPathInsideOrEqual) } }) diff --git a/src/main/ipc/filesystem/access/filesystem-allowed-roots.ts b/src/main/ipc/filesystem/access/filesystem-allowed-roots.ts index 6438d5b0049..1eb083c74b2 100644 --- a/src/main/ipc/filesystem/access/filesystem-allowed-roots.ts +++ b/src/main/ipc/filesystem/access/filesystem-allowed-roots.ts @@ -4,7 +4,7 @@ import { computeWorkspaceRootWithin, getWorktreePathSettings } from '../../workt import { wslHomeUnlessStopped } from '../../../wsl/discovery/wsl-home-unless-stopped' import { getWorktreeMirrorDistroForRuntime } from '../../../workspaces/execution-host/project-runtime-git-options' import { resolveLocalProjectRuntimesForRepos } from '../../../workspaces/execution-host/local-project-runtime-resolution' -import { isPathInsideOrEqual } from '../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../shared/file-access/cross-platform-path' import { buildProjectGroupChildIndex, collectProjectGroupSubtreeIds, diff --git a/src/main/ipc/filesystem/access/filesystem-path-containment.ts b/src/main/ipc/filesystem/access/filesystem-path-containment.ts index 4ff1bbc5b08..6c724b46abf 100644 --- a/src/main/ipc/filesystem/access/filesystem-path-containment.ts +++ b/src/main/ipc/filesystem/access/filesystem-path-containment.ts @@ -1,7 +1,7 @@ import { resolve, relative, isAbsolute, sep, dirname } from 'node:path' import { statSync } from 'node:fs' import { realpathAcrossWslDriveMount } from '../../../wsl/filesystem/wsl-unc-drive-fs-path' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' /** Check native-path containment; accept Unicode-equivalent spellings only after proving filesystem identity. */ export function isDescendantOrEqual(resolvedTarget: string, resolvedBase: string): boolean { diff --git a/src/main/ipc/filesystem/watchers/filesystem-watcher-paths.ts b/src/main/ipc/filesystem/watchers/filesystem-watcher-paths.ts index a70a8f864be..7ad5fb175e5 100644 --- a/src/main/ipc/filesystem/watchers/filesystem-watcher-paths.ts +++ b/src/main/ipc/filesystem/watchers/filesystem-watcher-paths.ts @@ -2,7 +2,7 @@ import * as path from 'node:path' import { isWindowsAbsolutePathLike, normalizeRuntimePathForComparison -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' function normalizeWatcherRootPath(rootPath: string): string { let resolved = isWindowsAbsolutePathLike(rootPath) diff --git a/src/main/ipc/filesystem/watchers/local-watcher-event-observers.ts b/src/main/ipc/filesystem/watchers/local-watcher-event-observers.ts index 3071c39a84e..fb054b128d8 100644 --- a/src/main/ipc/filesystem/watchers/local-watcher-event-observers.ts +++ b/src/main/ipc/filesystem/watchers/local-watcher-event-observers.ts @@ -1,6 +1,6 @@ import * as path from 'node:path' import type { Event as WatcherEvent } from '@parcel/watcher' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { watcherLifecycleState } from './filesystem-watcher-lifecycle-state' import { getLocalWatcherRoot } from './filesystem-watcher-paths' import type { WatchedRoot } from './filesystem-watcher-wsl' diff --git a/src/main/ipc/folder-repo-git-upgrade.ts b/src/main/ipc/folder-repo-git-upgrade.ts index 863d1b88151..cef77fd2bf6 100644 --- a/src/main/ipc/folder-repo-git-upgrade.ts +++ b/src/main/ipc/folder-repo-git-upgrade.ts @@ -6,7 +6,7 @@ import type { Store } from '../persistence/loading-store/store' import { getRepoExecutionHostId, LOCAL_EXECUTION_HOST_ID } from '../../shared/execution-host' import { isFolderRepo } from '../../shared/repository/repo-kind' import { findExtraFolderWorkspaceIds } from '../workspaces/catalog/folder-workspace-meta-presence' -import { normalizeRuntimePathForComparison } from '../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../shared/file-access/cross-platform-path' import { isWslUncPath } from '../../shared/file-access/wsl-paths' import { resolveFolderToGitConversion } from '../workspaces/catalog/folder-repo-git-conversion' import { prepareLocalWorktreeRootForRepo } from '../workspaces/creation/worktree-root-preparation' diff --git a/src/main/ipc/linear/issue-handlers.ts b/src/main/ipc/linear/issue-handlers.ts index 8e2d5686054..a5bf66b0d69 100644 --- a/src/main/ipc/linear/issue-handlers.ts +++ b/src/main/ipc/linear/issue-handlers.ts @@ -6,7 +6,7 @@ import { addIssueComment, getIssueComments } from '../../linear/issues/linear-is import { normalizeWorkspaceId, normalizeWorkspaceSelection } from './ipc-args' import { clampLinearIssueListLimit } from '../../../shared/linear/issue-read-limits' import { optionalParsedLinearIssueAttributeFilter } from '../../../shared/linear/issue-attribute-filter' -import type { LinearIssueUpdate } from '../../../shared/issue-mutation-types' +import type { LinearIssueUpdate } from '../../../shared/work-items/issue-mutation-types' import type { LinearWorkspaceSelection } from '../../../shared/linear/workspace-types' const VALID_FILTERS = new Set(['assigned', 'created', 'all', 'completed']) diff --git a/src/main/ipc/local-log-tail.ts b/src/main/ipc/local-log-tail.ts index 090c64251ff..26d5fb3d2ce 100644 --- a/src/main/ipc/local-log-tail.ts +++ b/src/main/ipc/local-log-tail.ts @@ -5,7 +5,7 @@ import type { LocalLogTailReadArgs, LocalLogTailReadResult, LocalLogTailWatchArgs -} from '../../shared/local-log-tail-types' +} from '../../shared/file-content/local-log-tail-types' import { readLocalLogTailRange } from '../ai-vault/transcripts/local-log-tail-reader' import type { Store } from '../persistence/loading-store/store' import { resolveUserNamedRegularFile } from './filesystem/access/local-file-access-resolution' diff --git a/src/main/ipc/pty/host-env/codex-home.ts b/src/main/ipc/pty/host-env/codex-home.ts index bb87618f494..b66c58aebc1 100644 --- a/src/main/ipc/pty/host-env/codex-home.ts +++ b/src/main/ipc/pty/host-env/codex-home.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import type { GlobalSettings } from '../../../../shared/global-settings-types' import { isCodexHomeAuthReadyForLaunch, diff --git a/src/main/ipc/pty/host-env/fresh-spawn-routing.ts b/src/main/ipc/pty/host-env/fresh-spawn-routing.ts index d5d4bf71e33..756abc5f267 100644 --- a/src/main/ipc/pty/host-env/fresh-spawn-routing.ts +++ b/src/main/ipc/pty/host-env/fresh-spawn-routing.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { splitWorktreeIdForFilesystem } from '../../../../shared/worktree/id' import type { IPtyProvider } from '../../../providers/pty/provider-contract' import { beginTerminalInstall } from '../../../workspaces/removal/watcher-removal-gate' diff --git a/src/main/ipc/pty/spawn-startup-target.ts b/src/main/ipc/pty/spawn-startup-target.ts index bb6b9c5b300..b3be70cb31d 100644 --- a/src/main/ipc/pty/spawn-startup-target.ts +++ b/src/main/ipc/pty/spawn-startup-target.ts @@ -24,7 +24,7 @@ import { holdPassiveRestoreOfStoppedWslDistro, wslHoldReadAnchor as wslHoldReadAnchorNow } from '../../daemon/providers/wsl/daemon-wsl-passive-restore-hold' -import { msysDrivePathToWindows } from '../../../shared/cross-platform-path' +import { msysDrivePathToWindows } from '../../../shared/file-access/cross-platform-path' import { wslUncDirectoryExistsAsync } from '../../wsl/filesystem/unc-path-access' import { getCodexSelectionTargetForPty } from './host-env/codex-home' import { probeLocalStartupCwdDirectory } from './host-env/startup-cwd-directory-exists' diff --git a/src/main/ipc/repos/local-repo-registration.ts b/src/main/ipc/repos/local-repo-registration.ts index 1ea549a2571..5372f8fe228 100644 --- a/src/main/ipc/repos/local-repo-registration.ts +++ b/src/main/ipc/repos/local-repo-registration.ts @@ -1,7 +1,7 @@ import type { Store } from '../../persistence/loading-store/store' import type { Repo } from '../../../shared/repository/repo-types' import { isFolderRepo } from '../../../shared/repository/repo-kind' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { awaitWindowsHostGitEnvironmentReady } from '../../git/command-runner/host-routing/windows-host-git-environment' import { inspectGitRepoForRegistrationAsync, diff --git a/src/main/ipc/repos/nested-repo-import-handler.ts b/src/main/ipc/repos/nested-repo-import-handler.ts index 37fe9c73540..8f79b0cbfe1 100644 --- a/src/main/ipc/repos/nested-repo-import-handler.ts +++ b/src/main/ipc/repos/nested-repo-import-handler.ts @@ -6,7 +6,7 @@ import type { Repo } from '../../../shared/repository/repo-types' import type { RepositoryMetadataOwner } from '../../workspaces/catalog/imported-folder-project-link' import type { ProjectGroupImportResult } from '../../../shared/project/groups/project-group-types' import { DEFAULT_REPO_BADGE_COLOR } from '../../../shared/constants' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { awaitWindowsHostGitEnvironmentReady } from '../../git/command-runner/host-routing/windows-host-git-environment' import { isGitRepoAsync } from '../../git/repositories/discovery/repo-detection' import { getRepoName } from '../../git/repositories/repository-name' diff --git a/src/main/ipc/repos/nested-repo-scan-ipc.ts b/src/main/ipc/repos/nested-repo-scan-ipc.ts index bc3d38a86d2..2109eefccb2 100644 --- a/src/main/ipc/repos/nested-repo-scan-ipc.ts +++ b/src/main/ipc/repos/nested-repo-scan-ipc.ts @@ -2,7 +2,7 @@ import type { IpcMainInvokeEvent } from 'electron' import { isAbsolute } from 'node:path' import type { z } from 'zod' import type { NestedRepoScanResult } from '../../../shared/project/groups/project-group-types' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { awaitWindowsHostGitEnvironmentReady } from '../../git/command-runner/host-routing/windows-host-git-environment' import { scanNestedRepos } from '../../project-groups/nested-repo-discovery' import type { ProjectGroupScanNestedArgs } from './repo-ipc-arg-schemas' diff --git a/src/main/ipc/repos/repo-creation-handlers.ts b/src/main/ipc/repos/repo-creation-handlers.ts index f3c21522218..ad98cc70d4f 100644 --- a/src/main/ipc/repos/repo-creation-handlers.ts +++ b/src/main/ipc/repos/repo-creation-handlers.ts @@ -7,7 +7,7 @@ import type { Store } from '../../persistence/loading-store/store' import type { Repo } from '../../../shared/repository/repo-types' import type { RepositoryMetadataOwner } from '../../workspaces/catalog/imported-folder-project-link' import { DEFAULT_REPO_BADGE_COLOR, getDefaultWorkspaceDir } from '../../../shared/constants' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { getRepoExecutionHostId, LOCAL_EXECUTION_HOST_ID } from '../../../shared/execution-host' import { getEffectiveHostSetting } from '../../../shared/execution-host/host-setting-overrides' import { probeGitAvailability } from '../../git/command-runner/host-routing/git-availability' diff --git a/src/main/ipc/source-control/bitbucket.ts b/src/main/ipc/source-control/bitbucket.ts index 6a01fdd7662..039fdd113a6 100644 --- a/src/main/ipc/source-control/bitbucket.ts +++ b/src/main/ipc/source-control/bitbucket.ts @@ -11,7 +11,7 @@ import { type BitbucketConnectResult, type BitbucketConnectionStatus, bitbucketConnectFailure -} from '../../../shared/bitbucket-credentials' +} from '../../../shared/bitbucket/bitbucket-credentials' function optionalString(value: unknown): string | null { return typeof value === 'string' ? value : null diff --git a/src/main/ipc/source-control/github-account-handlers.ts b/src/main/ipc/source-control/github-account-handlers.ts index 57bba84d257..248b464d5ee 100644 --- a/src/main/ipc/source-control/github-account-handlers.ts +++ b/src/main/ipc/source-control/github-account-handlers.ts @@ -1,5 +1,5 @@ import { ipcMain } from 'electron' -import { appStarSourceSchema } from '../../../shared/gh-star-source' +import { appStarSourceSchema } from '../../../shared/github/repositories/gh-star-source' import { resolveGhAccountRequiredHost } from '../../github/accounts/account-binding-required-host' import { diagnoseGhAuth } from '../../github/accounts/auth-diagnose' import { checkOrcaStarred, starOrca } from '../../github/client/fetch/orca-star' diff --git a/src/main/ipc/source-control/github-issue-mutation-handlers.ts b/src/main/ipc/source-control/github-issue-mutation-handlers.ts index e8fa1096445..e15a454a720 100644 --- a/src/main/ipc/source-control/github-issue-mutation-handlers.ts +++ b/src/main/ipc/source-control/github-issue-mutation-handlers.ts @@ -2,7 +2,7 @@ import type { GhAccountBinding } from '../../../shared/github/accounts/account-b import { OptionalGhAccountExpectation } from '../../../shared/rpc-contract/github/github-repo-target-params' import { ipcMain } from 'electron' import type { GitHubRepositoryIdentity as GitHubOwnerRepo } from '../../../shared/github/repositories/repository-identity' -import type { GitHubIssueUpdate } from '../../../shared/issue-mutation-types' +import type { GitHubIssueUpdate } from '../../../shared/work-items/issue-mutation-types' import type { TaskSourceContext } from '../../../shared/work-items/task-source-context' import { addIssueComment } from '../../github/issues/issue-comment' import { listAssignableUsers, listLabels } from '../../github/issues/issue-field-options' diff --git a/src/main/ipc/source-control/github-pr-mutation-handlers.ts b/src/main/ipc/source-control/github-pr-mutation-handlers.ts index b7407b358d5..c0485c92589 100644 --- a/src/main/ipc/source-control/github-pr-mutation-handlers.ts +++ b/src/main/ipc/source-control/github-pr-mutation-handlers.ts @@ -1,6 +1,6 @@ import { ipcMain } from 'electron' import type { GitHubRepositoryIdentity as GitHubOwnerRepo } from '../../../shared/github/repositories/repository-identity' -import type { GitHubPullRequestStateUpdate } from '../../../shared/issue-mutation-types' +import type { GitHubPullRequestStateUpdate } from '../../../shared/work-items/issue-mutation-types' import { markPRReadyForReview } from '../../github/client/update/pr-ready' import { mergePR } from '../../github/client/merge/merge-pr' import { removePRReviewers, requestPRReviewers } from '../../github/client/update/pr-reviewers' diff --git a/src/main/ipc/source-control/github-work-item-handlers.ts b/src/main/ipc/source-control/github-work-item-handlers.ts index a571777cded..062e0a445f1 100644 --- a/src/main/ipc/source-control/github-work-item-handlers.ts +++ b/src/main/ipc/source-control/github-work-item-handlers.ts @@ -3,7 +3,7 @@ import { OptionalGhAccountExpectation } from '../../../shared/rpc-contract/githu import { ipcMain } from 'electron' import type { GitHubRepositoryIdentity as GitHubOwnerRepo } from '../../../shared/github/repositories/repository-identity' import type { GitHubPRFile } from '../../../shared/github/pull-requests/pull-request-types' -import type { GitHubCreateIssueFields } from '../../../shared/issue-mutation-types' +import type { GitHubCreateIssueFields } from '../../../shared/work-items/issue-mutation-types' import type { TaskSourceContext } from '../../../shared/work-items/task-source-context' import { countWorkItems } from '../../github/client/list/count-work-items' import { createIssue } from '../../github/issues/issue-create' diff --git a/src/main/ipc/source-control/gitlab-issue-handlers.ts b/src/main/ipc/source-control/gitlab-issue-handlers.ts index 122ef953738..df0e3be3cbc 100644 --- a/src/main/ipc/source-control/gitlab-issue-handlers.ts +++ b/src/main/ipc/source-control/gitlab-issue-handlers.ts @@ -1,5 +1,5 @@ import { ipcMain } from 'electron' -import type { GitLabIssueUpdate, GitLabWorkItem } from '../../../shared/gitlab-types' +import type { GitLabIssueUpdate, GitLabWorkItem } from '../../../shared/gitlab/gitlab-types' import type { TaskSourceContext } from '../../../shared/work-items/task-source-context' import type { Store } from '../../persistence/loading-store/store' import { diff --git a/src/main/ipc/source-control/gitlab-merge-request-mutation-handlers.ts b/src/main/ipc/source-control/gitlab-merge-request-mutation-handlers.ts index f6d706a9668..cfd7d02c3d9 100644 --- a/src/main/ipc/source-control/gitlab-merge-request-mutation-handlers.ts +++ b/src/main/ipc/source-control/gitlab-merge-request-mutation-handlers.ts @@ -1,5 +1,8 @@ import { ipcMain } from 'electron' -import type { GitLabMRInlineCommentInput, GitLabMRUpdate } from '../../../shared/gitlab-types' +import type { + GitLabMRInlineCommentInput, + GitLabMRUpdate +} from '../../../shared/gitlab/gitlab-types' import type { TaskSourceContext } from '../../../shared/work-items/task-source-context' import type { Store } from '../../persistence/loading-store/store' import { diff --git a/src/main/ipc/source-control/gitlab-merge-request-query-handlers.ts b/src/main/ipc/source-control/gitlab-merge-request-query-handlers.ts index ba30bb7104b..73bd8a3d31b 100644 --- a/src/main/ipc/source-control/gitlab-merge-request-query-handlers.ts +++ b/src/main/ipc/source-control/gitlab-merge-request-query-handlers.ts @@ -1,7 +1,7 @@ import { ipcMain } from 'electron' import type { TaskSourceContext } from '../../../shared/work-items/task-source-context' import type { Store } from '../../persistence/loading-store/store' -import type { GitLabMRInvolvement } from '../../../shared/gitlab-types' +import type { GitLabMRInvolvement } from '../../../shared/gitlab/gitlab-types' import { normalizeGitLabMRInvolvement, normalizeGitLabMRListState, diff --git a/src/main/ipc/worktree-logic.ts b/src/main/ipc/worktree-logic.ts index 115bb2bdc97..95b8b26cc74 100644 --- a/src/main/ipc/worktree-logic.ts +++ b/src/main/ipc/worktree-logic.ts @@ -1,10 +1,14 @@ import { resolve, relative, isAbsolute, posix, sep, win32 } from 'node:path' import type { GlobalSettings, OrcaWorkspaceLayout } from '../../shared/global-settings-types' import type { Repo } from '../../shared/repository/repo-types' -import { isWindowsAbsolutePathLike, resolveRuntimePath } from '../../shared/cross-platform-path' +import { + isWindowsAbsolutePathLike, + resolveRuntimePath +} from '../../shared/file-access/cross-platform-path' import { isWslUncPath, resolveWslRepoWorktreeBasePath } from '../../shared/file-access/wsl-paths' import { splitWorktreeId } from '../../shared/worktree/id' import { + containsEmoji, replaceKnownEmojiWithShortcodes, setEmojiShortcodeDatasetLoader } from '../../shared/text/emoji-shortcode-catalog' @@ -41,12 +45,6 @@ export function sanitizeWorktreeName(input: string): string { return sanitized } -function containsEmoji(input: string): boolean { - return /[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\u20e3]/u.test( - input - ) -} - export function ensurePathWithinWorkspace(targetPath: string, workspaceDir: string): string { const resolvedWorkspaceDir = resolve(workspaceDir) const resolvedTargetPath = resolve(targetPath) diff --git a/src/main/ipc/worktrees-test-fixtures.ts b/src/main/ipc/worktrees-test-fixtures.ts index ada00b1d670..f11975dab2e 100644 --- a/src/main/ipc/worktrees-test-fixtures.ts +++ b/src/main/ipc/worktrees-test-fixtures.ts @@ -1,5 +1,5 @@ import type { DetectedWorktreeListResult, GitWorktreeInfo } from '../../shared/worktree/types' -import { reviewHeadRemoteRefComponent } from '../../shared/review-head-tracking-ref' +import { reviewHeadRemoteRefComponent } from '../../shared/worktree/hosted-review/review-head-tracking-ref' import { listWorktreesMock, setPlatform } from './worktrees-test-module-mocks' import { store } from './worktrees-test-ipc-surface' diff --git a/src/main/ipc/worktrees/create/register-review-base-handlers.ts b/src/main/ipc/worktrees/create/register-review-base-handlers.ts index 2c53e165649..f0f9cb0069b 100644 --- a/src/main/ipc/worktrees/create/register-review-base-handlers.ts +++ b/src/main/ipc/worktrees/create/register-review-base-handlers.ts @@ -20,7 +20,7 @@ import { resolveGitHubPrStartPoint } from '../../../github/pull-requests/start-p import { resolvePrStartPointUnlessWslStopped } from '../../../github/pull-requests/start-points/pr-start-point-wsl-gate' import { resolveGitHubReviewHeadRemote } from '../../../github/pull-requests/start-points/review-head-remote' import type { WorktreeIpcContext } from '../worktree-ipc-context' -import { reviewStartPointFailure } from '../../../../shared/review-start-point-failure-copy' +import { reviewStartPointFailure } from '../../../../shared/worktree/hosted-review/review-start-point-failure-copy' export function registerReviewBaseHandlers(context: WorktreeIpcContext): void { const { store, runtime } = context diff --git a/src/main/ipc/worktrees/creation/worktree-base-directory-event-filter.ts b/src/main/ipc/worktrees/creation/worktree-base-directory-event-filter.ts index 79dac56d2a5..8088e0ced41 100644 --- a/src/main/ipc/worktrees/creation/worktree-base-directory-event-filter.ts +++ b/src/main/ipc/worktrees/creation/worktree-base-directory-event-filter.ts @@ -1,7 +1,7 @@ import { normalizeRuntimePathForComparison, relativePathInsideRoot -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' import { EMPTY_HEAD_IDENTITY_SCOPE, FULL_HEAD_IDENTITY_SCOPE, diff --git a/src/main/ipc/worktrees/creation/worktree-base-directory-marker-poller.ts b/src/main/ipc/worktrees/creation/worktree-base-directory-marker-poller.ts index 1296a6161b7..36ae9e978e2 100644 --- a/src/main/ipc/worktrees/creation/worktree-base-directory-marker-poller.ts +++ b/src/main/ipc/worktrees/creation/worktree-base-directory-marker-poller.ts @@ -1,7 +1,7 @@ import { readdir, stat } from 'node:fs/promises' import type { Dirent } from 'node:fs' import { join } from 'node:path' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { forEachWithConcurrency } from '../../../../shared/concurrency/map-with-concurrency' import type { WorktreeBaseRepoWatchConfig, diff --git a/src/main/ipc/worktrees/creation/worktree-base-directory-watch-targets.ts b/src/main/ipc/worktrees/creation/worktree-base-directory-watch-targets.ts index da2e94ffbeb..ca2414db2bc 100644 --- a/src/main/ipc/worktrees/creation/worktree-base-directory-watch-targets.ts +++ b/src/main/ipc/worktrees/creation/worktree-base-directory-watch-targets.ts @@ -8,7 +8,7 @@ import { isFolderRepo } from '../../../../shared/repository/repo-kind' import { getRuntimePathBasename, normalizeRuntimePathForComparison -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' import { isWslUncPath } from '../../../../shared/file-access/wsl-paths' import { mapWithConcurrency } from '../../../../shared/concurrency/map-with-concurrency' import { getWorktreeMirrorDistro } from '../../../workspaces/execution-host/project-runtime-git-options' diff --git a/src/main/ipc/worktrees/creation/worktree-common-git-directory.ts b/src/main/ipc/worktrees/creation/worktree-common-git-directory.ts index fa7ba9a3d33..7079b3bfd6e 100644 --- a/src/main/ipc/worktrees/creation/worktree-common-git-directory.ts +++ b/src/main/ipc/worktrees/creation/worktree-common-git-directory.ts @@ -4,7 +4,7 @@ import { getRuntimePathBasename, normalizeRuntimePathSeparators, resolveRuntimePath -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' function runtimeDirname(pathValue: string): string { const normalized = normalizeRuntimePathSeparators(pathValue).replace(/\/+$/, '') diff --git a/src/main/ipc/worktrees/creation/worktree-head-identity-scope.ts b/src/main/ipc/worktrees/creation/worktree-head-identity-scope.ts index 2b15b4ce590..e06f6adc1e0 100644 --- a/src/main/ipc/worktrees/creation/worktree-head-identity-scope.ts +++ b/src/main/ipc/worktrees/creation/worktree-head-identity-scope.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' // Missing scope means unknown and requires a full read; only proven narrowing may skip metadata. diff --git a/src/main/ipc/worktrees/git/worktree-git-status-ref-watch.ts b/src/main/ipc/worktrees/git/worktree-git-status-ref-watch.ts index e56484d5609..e26f0d1c22b 100644 --- a/src/main/ipc/worktrees/git/worktree-git-status-ref-watch.ts +++ b/src/main/ipc/worktrees/git/worktree-git-status-ref-watch.ts @@ -1,4 +1,4 @@ -import { resolveRuntimePath } from '../../../../shared/cross-platform-path' +import { resolveRuntimePath } from '../../../../shared/file-access/cross-platform-path' import { isSafeGitStatusUpstreamRef } from '../../../../shared/git/status/git-status-upstream-ref' import { getRepoIdFromWorktreeId } from '../../../../shared/worktree/id' import { diff --git a/src/main/ipc/worktrees/listing/authoritative-local-worktree-metadata-pruning.ts b/src/main/ipc/worktrees/listing/authoritative-local-worktree-metadata-pruning.ts index 148d3d6bb88..0f24b4f6b64 100644 --- a/src/main/ipc/worktrees/listing/authoritative-local-worktree-metadata-pruning.ts +++ b/src/main/ipc/worktrees/listing/authoritative-local-worktree-metadata-pruning.ts @@ -1,5 +1,5 @@ import { getRepoExecutionHostId, LOCAL_EXECUTION_HOST_ID } from '../../../../shared/execution-host' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { isFolderRepo } from '../../../../shared/repository/repo-kind' import type { Repo } from '../../../../shared/repository/repo-types' import { diff --git a/src/main/ipc/worktrees/removal/execute-worktree-removal.ts b/src/main/ipc/worktrees/removal/execute-worktree-removal.ts index 722325b846e..20ad645dff0 100644 --- a/src/main/ipc/worktrees/removal/execute-worktree-removal.ts +++ b/src/main/ipc/worktrees/removal/execute-worktree-removal.ts @@ -4,7 +4,7 @@ import type { RemoveWorktreeResult } from '../../../../shared/worktree/create-ty import { assertRemovalHostMatchesRepoRow } from '../repo-host-ownership' import { isFolderRepo } from '../../../../shared/repository/repo-kind' import { assertWorktreeUnlockedForRemoval } from '../../../../shared/worktree/removal/removal' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { getLocalProjectWorktreeGitOptions } from '../../../workspaces/execution-host/project-runtime-git-options' import { listWorktreesStrict as listGitWorktreesStrict } from '../../../git/worktrees/catalog/worktree-listing' import { diff --git a/src/main/jira/jira-issue-search.ts b/src/main/jira/jira-issue-search.ts index ccf3a9f18c3..05420765cc6 100644 --- a/src/main/jira/jira-issue-search.ts +++ b/src/main/jira/jira-issue-search.ts @@ -1,4 +1,4 @@ -import { sortByUpdatedAtDescending } from '../../shared/updated-at-order' +import { sortByUpdatedAtDescending } from '../../shared/collections/updated-at-order' import type { JiraIssue, JiraIssueFilter, diff --git a/src/main/kimi/hook-service.ts b/src/main/kimi/hook-service.ts index c039cdc0920..cdcac35d5e6 100644 --- a/src/main/kimi/hook-service.ts +++ b/src/main/kimi/hook-service.ts @@ -17,7 +17,7 @@ import type { AgentHookInstallState, AgentHookInstallStatus } from '../../shared/agent-hook-listener/configuration/agent-hook-types' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' import { buildWindowsAgentHookCurlPostCommand } from '../agent-hooks/installation/commands/windows-agent-hook-post-command' import { createManagedCommandMatcher } from '../agent-hooks/installation/commands/managed-hook-command-matching' import { getSharedManagedScriptPath } from '../agent-hooks/installation/scripts/managed-hook-script-path' diff --git a/src/main/kiro/hook-service.ts b/src/main/kiro/hook-service.ts index ad62f8c3be8..382357defee 100644 --- a/src/main/kiro/hook-service.ts +++ b/src/main/kiro/hook-service.ts @@ -6,7 +6,7 @@ import type { AgentHookInstallState, AgentHookInstallStatus } from '../../shared/agent-hook-listener/configuration/agent-hook-types' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' import { buildWindowsAgentHookCurlPostCommand } from '../agent-hooks/installation/commands/windows-agent-hook-post-command' import { isPlainObject } from '../agent-hooks/installation/configuration/hooks-json-read' import { writeHooksJson } from '../agent-hooks/installation/configuration/hooks-json-write' diff --git a/src/main/kiro/hook-settings.ts b/src/main/kiro/hook-settings.ts index 9af41894665..bbb171b1d7a 100644 --- a/src/main/kiro/hook-settings.ts +++ b/src/main/kiro/hook-settings.ts @@ -1,5 +1,5 @@ import { join, posix as pathPosix } from 'node:path' -import { resolveKiroHomeDir } from '../../shared/kiro-home' +import { resolveKiroHomeDir } from '../../shared/agent-launch/environment/kiro-home' import { createManagedCommandMatcher, hookDefinitionHasManagedCommand, diff --git a/src/main/kiro/standalone-hook-settings.ts b/src/main/kiro/standalone-hook-settings.ts index b1f78964147..492303cdcd8 100644 --- a/src/main/kiro/standalone-hook-settings.ts +++ b/src/main/kiro/standalone-hook-settings.ts @@ -1,5 +1,5 @@ import { join, posix as pathPosix } from 'node:path' -import { resolveKiroHomeDir } from '../../shared/kiro-home' +import { resolveKiroHomeDir } from '../../shared/agent-launch/environment/kiro-home' import { isPlainObject } from '../agent-hooks/installation/configuration/hooks-json-read' import { buildKiroListHook, diff --git a/src/main/linear/collections/linear-collection-models.ts b/src/main/linear/collections/linear-collection-models.ts index 96133039687..d3d12d25a60 100644 --- a/src/main/linear/collections/linear-collection-models.ts +++ b/src/main/linear/collections/linear-collection-models.ts @@ -1,4 +1,4 @@ -import { LINEAR_AUTHENTICATION_ERROR } from '../../../shared/integration-credential-errors' +import { LINEAR_AUTHENTICATION_ERROR } from '../../../shared/secure-storage/integration-credential-errors' import type { LinearIssue } from '../../../shared/linear/issue-types' import type { LinearCustomViewModel, diff --git a/src/main/linear/issues/linear-issue-listing.ts b/src/main/linear/issues/linear-issue-listing.ts index d84bad029dc..dc76199eb24 100644 --- a/src/main/linear/issues/linear-issue-listing.ts +++ b/src/main/linear/issues/linear-issue-listing.ts @@ -1,4 +1,4 @@ -import { LINEAR_AUTHENTICATION_ERROR } from '../../../shared/integration-credential-errors' +import { LINEAR_AUTHENTICATION_ERROR } from '../../../shared/secure-storage/integration-credential-errors' import type { LinearIssue } from '../../../shared/linear/issue-types' import type { LinearCollectionResult, diff --git a/src/main/linear/issues/linear-issue-lookups.ts b/src/main/linear/issues/linear-issue-lookups.ts index 7a36e129df7..92103e3fff7 100644 --- a/src/main/linear/issues/linear-issue-lookups.ts +++ b/src/main/linear/issues/linear-issue-lookups.ts @@ -1,7 +1,7 @@ import { LINEAR_AUTHENTICATION_ERROR, isIntegrationCredentialDecryptionError -} from '../../../shared/integration-credential-errors' +} from '../../../shared/secure-storage/integration-credential-errors' import type { LinearIssue } from '../../../shared/linear/issue-types' import type { LinearWorkspaceSelection } from '../../../shared/linear/workspace-types' import { acquire, release } from '../requests/linear-request-concurrency' diff --git a/src/main/linear/issues/linear-issue-mutations.ts b/src/main/linear/issues/linear-issue-mutations.ts index 8d38606d64f..af391f1e42f 100644 --- a/src/main/linear/issues/linear-issue-mutations.ts +++ b/src/main/linear/issues/linear-issue-mutations.ts @@ -1,6 +1,6 @@ import { taskProviderFailure } from '../../../shared/work-items/task-provider-failure' import type { LinearClient } from '@linear/sdk' -import type { LinearIssueUpdate } from '../../../shared/issue-mutation-types' +import type { LinearIssueUpdate } from '../../../shared/work-items/issue-mutation-types' import { acquire, release } from '../requests/linear-request-concurrency' import { clearToken } from '../accounts/linear-token-store' import { getClients, isAuthError } from '../accounts/linear-account-client' diff --git a/src/main/linear/issues/linear-issue-query-support.ts b/src/main/linear/issues/linear-issue-query-support.ts index e63a27436f4..3d32edb44b7 100644 --- a/src/main/linear/issues/linear-issue-query-support.ts +++ b/src/main/linear/issues/linear-issue-query-support.ts @@ -1,4 +1,4 @@ -import { sortByUpdatedAtDescending } from '../../../shared/updated-at-order' +import { sortByUpdatedAtDescending } from '../../../shared/collections/updated-at-order' import type { LinearIssue } from '../../../shared/linear/issue-types' import type { LinearWorkspaceSelection } from '../../../shared/linear/workspace-types' import { LINEAR_ISSUE_API_PAGE_SIZE_MAX } from '../../../shared/linear/issue-read-limits' diff --git a/src/main/managed-server/migration/linking/orcad-migration-repository-link.ts b/src/main/managed-server/migration/linking/orcad-migration-repository-link.ts index cbe20743114..13ca5f2fb60 100644 --- a/src/main/managed-server/migration/linking/orcad-migration-repository-link.ts +++ b/src/main/managed-server/migration/linking/orcad-migration-repository-link.ts @@ -1,7 +1,7 @@ import { getAutomationRunRepoId } from '../../../../shared/automations/history/automation-run-identity' import type { Automation } from '../../../../shared/automations/automation-definition' import type { FolderWorkspace } from '../../../../shared/folder-workspaces/folder-workspace-types' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { isRepoOnCatalogHost } from '../../../../shared/execution-host' import type { OrcadMigrationSourceCutover } from '../../../../shared/orcad-migration/orcad-migration-source-cutover' import type { SshManagedServerLinkedProject } from '../../../../shared/remote-runtime/ssh/ssh-types' diff --git a/src/main/managed-server/migration/linking/orcad-server-folder-workspaces.ts b/src/main/managed-server/migration/linking/orcad-server-folder-workspaces.ts index 8beeceb08a4..3c6017024da 100644 --- a/src/main/managed-server/migration/linking/orcad-server-folder-workspaces.ts +++ b/src/main/managed-server/migration/linking/orcad-server-folder-workspaces.ts @@ -1,5 +1,5 @@ import { z } from 'zod' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { resolveFolderWorkspaceHost, type FolderHostCatalog diff --git a/src/main/muse/hook-config-json.ts b/src/main/muse/hook-config-json.ts index cc32c7f86e0..83cd8bea0f1 100644 --- a/src/main/muse/hook-config-json.ts +++ b/src/main/muse/hook-config-json.ts @@ -1,5 +1,5 @@ import { readFileSync } from 'node:fs' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' import { applyEdits, modify, parse as parseJsonc, type ParseError } from 'jsonc-parser' import { isPlainObject } from '../agent-hooks/installation/configuration/hooks-json-read' diff --git a/src/main/native-chat/agent-session-attachments/agent-session-attachment-claims.ts b/src/main/native-chat/agent-session-attachments/agent-session-attachment-claims.ts index 7499bd46265..0e24f695eab 100644 --- a/src/main/native-chat/agent-session-attachments/agent-session-attachment-claims.ts +++ b/src/main/native-chat/agent-session-attachments/agent-session-attachment-claims.ts @@ -2,7 +2,7 @@ import { lstatSync, readdirSync } from 'node:fs' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import type Database from '../../sqlite/sync-database' import type { AgentJournalMessageItem } from '../../../shared/agent-session/journal/agent-session-journal-types' import { diff --git a/src/main/native-chat/agent-session-attachments/agent-session-attachment-sweep.ts b/src/main/native-chat/agent-session-attachments/agent-session-attachment-sweep.ts index 3d1aa05bf5e..37fef066dda 100644 --- a/src/main/native-chat/agent-session-attachments/agent-session-attachment-sweep.ts +++ b/src/main/native-chat/agent-session-attachments/agent-session-attachment-sweep.ts @@ -3,7 +3,7 @@ import { readdir, stat } from 'node:fs/promises' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { AGENT_SESSION_ATTACHMENT_PART_FILE } from './agent-session-attachment-references' import { removeQuietly, type AgentSessionAttachmentStore } from './agent-session-attachment-store' diff --git a/src/main/native-chat/agent-session-journal/history-import/adopted-transcript-source.ts b/src/main/native-chat/agent-session-journal/history-import/adopted-transcript-source.ts index e965fd814a9..825fda0167f 100644 --- a/src/main/native-chat/agent-session-journal/history-import/adopted-transcript-source.ts +++ b/src/main/native-chat/agent-session-journal/history-import/adopted-transcript-source.ts @@ -1,7 +1,7 @@ import { dirname, join } from 'node:path' import { sessionIdFromFileName } from '../../../ai-vault/parsing/session-scanner-accumulator' import type { AgentType } from '../../../../shared/agent-status/contracts/agent-status-types' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { readNodeFileWithinLimit } from '../../../../shared/file-content/node-bounded-file-reader' import { extractString } from '../../../../shared/text/trimmed-string' import { parseJsonObject } from '../../../ai-vault/parsing/session-json-object' diff --git a/src/main/native-chat/agent-session-wire/options/at-rest-command-catalog.ts b/src/main/native-chat/agent-session-wire/options/at-rest-command-catalog.ts index 47a8297d5ff..66ef9228214 100644 --- a/src/main/native-chat/agent-session-wire/options/at-rest-command-catalog.ts +++ b/src/main/native-chat/agent-session-wire/options/at-rest-command-catalog.ts @@ -9,7 +9,7 @@ import type { } from './structured-agent-session-at-rest-commands' import { atRestCommandContextReady } from './at-rest-command-context' import { stat } from 'node:fs/promises' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { waitForPromiseWithSignal } from '../../../../shared/concurrency/abort-signal-reason' import { type AtRestCommandStamp, diff --git a/src/main/native-chat/agent-session-wire/recovery/structured-agent-session-usage-limit-account-hold.ts b/src/main/native-chat/agent-session-wire/recovery/structured-agent-session-usage-limit-account-hold.ts index ce554f2e60e..5d6c6253294 100644 --- a/src/main/native-chat/agent-session-wire/recovery/structured-agent-session-usage-limit-account-hold.ts +++ b/src/main/native-chat/agent-session-wire/recovery/structured-agent-session-usage-limit-account-hold.ts @@ -14,7 +14,7 @@ import { isLegacyAgentSessionAccountHome, type AgentSessionAccountHome } from '../../../../shared/agent-session/lifecycle/accounts/agent-session-account-home' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { usageLimitContinueIdentity as identity } from './structured-agent-session-usage-limit-chain' /** The polled usage of the account a chat continues on, as the host attributes it. */ diff --git a/src/main/native-chat/conversation-adoption/codex-adoption-preparation.ts b/src/main/native-chat/conversation-adoption/codex-adoption-preparation.ts index 8ad18e45668..51979e03257 100644 --- a/src/main/native-chat/conversation-adoption/codex-adoption-preparation.ts +++ b/src/main/native-chat/conversation-adoption/codex-adoption-preparation.ts @@ -8,7 +8,7 @@ import type { NativeCodexResumePreparation } from '../../codex/history/resume/co import { getSystemCodexHomePath } from '../../codex/configuration/homes/codex-home-paths' import type { StructuredAgentSessionAdoption } from './structured-agent-session-history-adoption' import { admitTranscriptPath } from '../transcript-discovery/transcript-path-admission' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' export async function prepareCodexAdoption( source: StructuredAgentSessionAdoption, diff --git a/src/main/native-chat/conversation-files/native-chat-scratch-folder-migration.ts b/src/main/native-chat/conversation-files/native-chat-scratch-folder-migration.ts index baab3168329..13575e5e714 100644 --- a/src/main/native-chat/conversation-files/native-chat-scratch-folder-migration.ts +++ b/src/main/native-chat/conversation-files/native-chat-scratch-folder-migration.ts @@ -4,7 +4,7 @@ import { constants } from 'node:fs' import { copyFile, lstat, mkdir, mkdtemp, readdir, rename, rmdir, unlink } from 'node:fs/promises' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import type { StructuredAgentSessionLogger } from '../agent-session-wire/host/structured-agent-session-logger' import { isNativeChatScratchFolderName, diff --git a/src/main/native-chat/conversation-files/native-chat-visuals-sweep.ts b/src/main/native-chat/conversation-files/native-chat-visuals-sweep.ts index 24114698e18..473878ef76e 100644 --- a/src/main/native-chat/conversation-files/native-chat-visuals-sweep.ts +++ b/src/main/native-chat/conversation-files/native-chat-visuals-sweep.ts @@ -4,7 +4,7 @@ import type { Dirent } from 'node:fs' import { lstat, readdir, rm } from 'node:fs/promises' import { join } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { yieldToEventLoop } from '../../../shared/concurrency/event-loop-yield' import type { StructuredAgentSessionLogger } from '../agent-session-wire/host/structured-agent-session-logger' import { diff --git a/src/main/node-runtime/managed-runtime-installation.ts b/src/main/node-runtime/managed-runtime-installation.ts index 70e43c594d3..9378d1724bf 100644 --- a/src/main/node-runtime/managed-runtime-installation.ts +++ b/src/main/node-runtime/managed-runtime-installation.ts @@ -6,7 +6,7 @@ import { rm } from 'node:fs/promises' import type { ManagedRuntimeInstallState, ManagedRuntimeOperation -} from '../../shared/managed-runtime-install' +} from '../../shared/agent-launch/installation/managed-runtime-install' import type { MainHttpClient } from '../network/http-client' import { RevisionedState } from '../runtime/events/revisioned-state' import { diff --git a/src/main/node-runtime/managed-runtime-release-install.ts b/src/main/node-runtime/managed-runtime-release-install.ts index 386f344af83..682d6f0b4f1 100644 --- a/src/main/node-runtime/managed-runtime-release-install.ts +++ b/src/main/node-runtime/managed-runtime-release-install.ts @@ -9,7 +9,7 @@ import { sanitizeAgentFailureDetail, stripAnsiControlSequences } from '../../shared/source-control/ai/generation/commit-message-agent-output' -import type { ManagedRuntimeOperation } from '../../shared/managed-runtime-install' +import type { ManagedRuntimeOperation } from '../../shared/agent-launch/installation/managed-runtime-install' import { getMainHttpClient, type MainHttpClient } from '../network/http-client' import { redactString } from '../observability/redactor' import { diff --git a/src/main/node-runtime/managed-runtime-release.ts b/src/main/node-runtime/managed-runtime-release.ts index a359bba90df..0b164a66367 100644 --- a/src/main/node-runtime/managed-runtime-release.ts +++ b/src/main/node-runtime/managed-runtime-release.ts @@ -4,7 +4,7 @@ import { lstatSync, readFileSync, readdirSync, realpathSync, statSync } from 'no import { readdir, rm, writeFile } from 'node:fs/promises' import { basename, dirname, join } from 'node:path' import { z } from 'zod' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' import type { ProviderProcessExit } from '../provider-process/managed-provider-process' export type ManagedRuntimePin = { diff --git a/src/main/node-runtime/runtime-archive-download.ts b/src/main/node-runtime/runtime-archive-download.ts index d0615b85a2c..8990ee970f9 100644 --- a/src/main/node-runtime/runtime-archive-download.ts +++ b/src/main/node-runtime/runtime-archive-download.ts @@ -3,8 +3,8 @@ import { open, rm } from 'node:fs/promises' import { runProcess } from '@orca/process-host' import type { ProcessResult } from '@orca/process-host/process-spec' import { waitForPromiseWithSignal } from '../../shared/concurrency/abort-signal-reason' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' -import { getZipExtractorCommand } from '../../shared/zip-extractor-command' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' +import { getZipExtractorCommand } from '../../shared/archives/zip-extractor-command' import type { MainHttpClient } from '../network/http-client' import { isRetryableDownloadError, type HttpStatusError } from '../network/transient-download-error' import type { PinnedRuntimeArchive, PinnedRuntimeExecutable } from './pinned-runtime-materializer' diff --git a/src/main/opencode/model-launch/opencode-root-model-overlay.ts b/src/main/opencode/model-launch/opencode-root-model-overlay.ts index f765dbbc260..2715bf14cd2 100644 --- a/src/main/opencode/model-launch/opencode-root-model-overlay.ts +++ b/src/main/opencode/model-launch/opencode-root-model-overlay.ts @@ -1,4 +1,4 @@ -import { getCommandTokenPathBasename } from '../../../shared/command-token-scanner' +import { getCommandTokenPathBasename } from '../../../shared/shell/command-resolution/command-token-scanner' import { quoteStartupArg, tokenizeStartupCommand, diff --git a/src/main/opencode/opencode-private-server.ts b/src/main/opencode/opencode-private-server.ts index 46464c49524..674406a3667 100644 --- a/src/main/opencode/opencode-private-server.ts +++ b/src/main/opencode/opencode-private-server.ts @@ -1,8 +1,8 @@ import { readFileSync } from 'node:fs' import { homedir } from 'node:os' import { join } from 'node:path' -import { findOptionOccurrence } from '../../shared/command-option-occurrence' -import { getCommandTokenPathBasename } from '../../shared/command-token-scanner' +import { findOptionOccurrence } from '../../shared/cli/command-option-occurrence' +import { getCommandTokenPathBasename } from '../../shared/shell/command-resolution/command-token-scanner' import { MANAGED_DATA_ACCOUNT_RESUME_ENV } from '../../shared/agent-launch/environment/managed-data-account-resume' import { findOpenCodeRunCommand } from '../../shared/agent-status/process/opencode-headless-command' import { diff --git a/src/main/opencode/text-tasks/opencode-text-task-events.ts b/src/main/opencode/text-tasks/opencode-text-task-events.ts index 79550f67e4a..4fd305d9c66 100644 --- a/src/main/opencode/text-tasks/opencode-text-task-events.ts +++ b/src/main/opencode/text-tasks/opencode-text-task-events.ts @@ -1,5 +1,5 @@ import { z } from 'zod' -import { SearchSubprocessLineAccumulator } from '../../../shared/search-subprocess-lines' +import { SearchSubprocessLineAccumulator } from '../../../shared/process-streams/search-subprocess-lines' import { MAX_SOURCE_CONTROL_AGENT_OUTPUT_BYTES } from '../../text-generation/execution/source-control-generation-limits' import type { createOpenCodeTextTaskHttp } from './opencode-text-task-http' import { openCodeTextTaskUrl } from './opencode-text-task-http' diff --git a/src/main/opencode/text-tasks/opencode-text-task-input.ts b/src/main/opencode/text-tasks/opencode-text-task-input.ts index 7dababa82de..4753a4ec7f6 100644 --- a/src/main/opencode/text-tasks/opencode-text-task-input.ts +++ b/src/main/opencode/text-tasks/opencode-text-task-input.ts @@ -1,4 +1,4 @@ -import { findOptionOccurrence } from '../../../shared/command-option-occurrence' +import { findOptionOccurrence } from '../../../shared/cli/command-option-occurrence' import { stat } from 'node:fs/promises' import { prepareV1File, prepareV2File } from './opencode-text-task-files' import path from 'node:path' diff --git a/src/main/opencode/text-tasks/opencode-text-task-server-ready.ts b/src/main/opencode/text-tasks/opencode-text-task-server-ready.ts index a66f022bb33..b4a5f5d04d5 100644 --- a/src/main/opencode/text-tasks/opencode-text-task-server-ready.ts +++ b/src/main/opencode/text-tasks/opencode-text-task-server-ready.ts @@ -1,5 +1,5 @@ import { z } from 'zod' -import { SearchSubprocessLineAccumulator } from '../../../shared/search-subprocess-lines' +import { SearchSubprocessLineAccumulator } from '../../../shared/process-streams/search-subprocess-lines' import { waitForPromiseWithSignal } from '../../../shared/concurrency/abort-signal-reason' import { MAX_SOURCE_CONTROL_AGENT_OUTPUT_BYTES } from '../../text-generation/execution/source-control-generation-limits' import type { SpawnedSourceControlAgentProcess } from '../../text-generation/source-control-text-generation-types' diff --git a/src/main/opencode/text-tasks/opencode-text-task.ts b/src/main/opencode/text-tasks/opencode-text-task.ts index 0b51e3024bb..6d0d51bb163 100644 --- a/src/main/opencode/text-tasks/opencode-text-task.ts +++ b/src/main/opencode/text-tasks/opencode-text-task.ts @@ -1,4 +1,4 @@ -import { mergeCommandEnvironment } from '../../../shared/command-environment' +import { mergeCommandEnvironment } from '../../../shared/shell/launch/command-environment' import { textGenerationFailure } from '../../../shared/text-generation-failure-copy' import { cleanAgentAnswer } from '../../text-generation/failures/source-control-agent-failure' import { wslDistroForCommand } from '../../../shared/file-access/wsl-paths' diff --git a/src/main/opencode/text-tasks/wsl/opencode-wsl-text-task-entry.ts b/src/main/opencode/text-tasks/wsl/opencode-wsl-text-task-entry.ts index 3b8a7bf7f3f..2c568672f3b 100644 --- a/src/main/opencode/text-tasks/wsl/opencode-wsl-text-task-entry.ts +++ b/src/main/opencode/text-tasks/wsl/opencode-wsl-text-task-entry.ts @@ -1,5 +1,5 @@ import { z } from 'zod' -import { SearchSubprocessLineAccumulator } from '../../../../shared/search-subprocess-lines' +import { SearchSubprocessLineAccumulator } from '../../../../shared/process-streams/search-subprocess-lines' import { killSourceControlAgentProcess } from '../../../text-generation/execution/source-control-agent-termination' import { spawnSupervisedAgent } from '../../../text-generation/execution/source-control-supervised-agent-spawn' import { diff --git a/src/main/opencode/text-tasks/wsl/opencode-wsl-text-task.ts b/src/main/opencode/text-tasks/wsl/opencode-wsl-text-task.ts index 6dbde2457ec..abbbc1d3e34 100644 --- a/src/main/opencode/text-tasks/wsl/opencode-wsl-text-task.ts +++ b/src/main/opencode/text-tasks/wsl/opencode-wsl-text-task.ts @@ -4,7 +4,7 @@ import { join } from 'node:path' import { getAppEnvironment } from '../../../../shared/app-lifecycle/app-environment' import { waitForPromiseWithSignal } from '../../../../shared/concurrency/abort-signal-reason' import { OPENCODE_WSL_TEXT_TASK_FILENAME } from '../../../../shared/remote-runtime/orcad-distribution/remote-bundle-artifacts' -import { SearchSubprocessLineAccumulator } from '../../../../shared/search-subprocess-lines' +import { SearchSubprocessLineAccumulator } from '../../../../shared/process-streams/search-subprocess-lines' import { relayBundleCandidates } from '../../../wsl/execution/relay-bundle-paths' import { ensureWslPinnedRuntime } from '../../../wsl/execution/wsl-pinned-runtime' import { runWslProcess, type WslSpec } from '../../../wsl/execution/wsl-runner' diff --git a/src/main/orca-profiles/project-transfer/profile-project-worktree-identity.ts b/src/main/orca-profiles/project-transfer/profile-project-worktree-identity.ts index 77ffd7bf829..d5cce12f121 100644 --- a/src/main/orca-profiles/project-transfer/profile-project-worktree-identity.ts +++ b/src/main/orca-profiles/project-transfer/profile-project-worktree-identity.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { getRepoExecutionHostId } from '../../../shared/execution-host' import type { Repo } from '../../../shared/repository/repo-types' diff --git a/src/main/orcad/browser-providers/electron/electron-sidecar-profile.ts b/src/main/orcad/browser-providers/electron/electron-sidecar-profile.ts index 89adf9c739f..8aa0fe8c42a 100644 --- a/src/main/orcad/browser-providers/electron/electron-sidecar-profile.ts +++ b/src/main/orcad/browser-providers/electron/electron-sidecar-profile.ts @@ -3,7 +3,7 @@ import { tmpdir } from 'node:os' import { basename, join } from 'node:path' import { setTimeout as delay } from 'node:timers/promises' import { z } from 'zod' -import { isSafeOwnedDirectory } from '../../../../shared/owned-private-directory' +import { isSafeOwnedDirectory } from '../../../../shared/secure-storage/owned-private-directory' import { isProcessAlive } from '../../../../shared/remote-runtime/serve-supervisor/serve-bundle-coordination' import { removeTree } from '../../../../shared/file-write/windows-transient-lock-removal' import { isDirectChild } from '../../../filesystem/owned-temp-staging-root' diff --git a/src/main/persistence/applying-settings/terminal-settings-migrations.ts b/src/main/persistence/applying-settings/terminal-settings-migrations.ts index de75428d2d0..10085bce96b 100644 --- a/src/main/persistence/applying-settings/terminal-settings-migrations.ts +++ b/src/main/persistence/applying-settings/terminal-settings-migrations.ts @@ -1,6 +1,6 @@ import { homedir } from 'node:os' import type { GlobalSettings, OrcaWorkspaceLayout } from '../../../shared/global-settings-types' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { legacyTerminalScrollbackBytesToRows, normalizeDesktopTerminalScrollbackRows diff --git a/src/main/persistence/loading-store/profile-loading/loaded-state-adaptation.ts b/src/main/persistence/loading-store/profile-loading/loaded-state-adaptation.ts index 03b9fe87491..d7316ff93da 100644 --- a/src/main/persistence/loading-store/profile-loading/loaded-state-adaptation.ts +++ b/src/main/persistence/loading-store/profile-loading/loaded-state-adaptation.ts @@ -1,5 +1,5 @@ import { isFolderRepo } from '../../../../shared/repository/repo-kind' -import { isPathInsideOrEqual } from '../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../shared/file-access/cross-platform-path' import { createProjectGroup } from '../../../../shared/project/groups/project-groups' import { createNestedProjectGroupResolver } from '../../../project-groups/nested-repo-import' diff --git a/src/main/persistence/loading-store/profile-loading/prepare-loaded-profile-settings.ts b/src/main/persistence/loading-store/profile-loading/prepare-loaded-profile-settings.ts index dd57f7af90e..29f9331638c 100644 --- a/src/main/persistence/loading-store/profile-loading/prepare-loaded-profile-settings.ts +++ b/src/main/persistence/loading-store/profile-loading/prepare-loaded-profile-settings.ts @@ -3,7 +3,7 @@ import type { PersistedState } from '../../../../shared/persisted-state-types' import type { ProjectGroup } from '../../../../shared/project/groups/project-group-types' import { deriveGlobalWindowsRuntimeDefaultFromLegacySettings } from '../../../../shared/execution-host/project-runtime-legacy-migration' import { normalizeTaskProviderSettings } from '../../../../shared/work-items/task-providers' -import { normalizeAutoRenameBranchFromWorkDefaultOn } from '../../../../shared/auto-rename-branch-from-work-settings' +import { normalizeAutoRenameBranchFromWorkDefaultOn } from '../../../../shared/source-control/ai/settings/auto-rename-branch-from-work-settings' import { normalizePluginSystemEnabledDefaultOn } from '../../../../shared/plugins/plugin-system-settings' import { migrateNestedWorkerMaxDepthDefault } from '../../../../shared/orchestration/workers/nested-worker-depth' import { diff --git a/src/main/persistence/migrating-orcad-catalog/catalog-commit/orcad-catalog-records.ts b/src/main/persistence/migrating-orcad-catalog/catalog-commit/orcad-catalog-records.ts index 9ef112e753d..e084e59f563 100644 --- a/src/main/persistence/migrating-orcad-catalog/catalog-commit/orcad-catalog-records.ts +++ b/src/main/persistence/migrating-orcad-catalog/catalog-commit/orcad-catalog-records.ts @@ -6,7 +6,7 @@ import { } from '../../../../shared/orcad-migration/orcad-migration-manifest' import type { ProjectGroup } from '../../../../shared/project/groups/project-group-types' import type { Repo } from '../../../../shared/repository/repo-types' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { isRepoOnCatalogHost } from '../../../../shared/execution-host' import { assertOrcadMigrationStagedCatalogClaims } from './orcad-staged-catalog-claims' import { diff --git a/src/main/persistence/migrating-orcad-catalog/catalog-commit/orcad-staged-catalog-claims.ts b/src/main/persistence/migrating-orcad-catalog/catalog-commit/orcad-staged-catalog-claims.ts index ba838850634..a006bf38039 100644 --- a/src/main/persistence/migrating-orcad-catalog/catalog-commit/orcad-staged-catalog-claims.ts +++ b/src/main/persistence/migrating-orcad-catalog/catalog-commit/orcad-staged-catalog-claims.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import type { OrcadMigrationManifest, OrcadMigrationStagedCatalog diff --git a/src/main/persistence/profile-state/database/profile-state-write-transaction.ts b/src/main/persistence/profile-state/database/profile-state-write-transaction.ts index ec9e165848a..84a8093c404 100644 --- a/src/main/persistence/profile-state/database/profile-state-write-transaction.ts +++ b/src/main/persistence/profile-state/database/profile-state-write-transaction.ts @@ -1,5 +1,5 @@ import type Database from '../../../sqlite/sync-database' -import { storageCapacityErrorCode } from '../../../../shared/storage-capacity-error' +import { storageCapacityErrorCode } from '../../../../shared/errors/storage-capacity-error' export class ProfileStateIndeterminateWriteError extends Error { readonly code = 'profile-state-write-indeterminate' as const diff --git a/src/main/persistence/profile-state/writer/profile-state-writer-errors.ts b/src/main/persistence/profile-state/writer/profile-state-writer-errors.ts index f60b8243e61..809eae2d318 100644 --- a/src/main/persistence/profile-state/writer/profile-state-writer-errors.ts +++ b/src/main/persistence/profile-state/writer/profile-state-writer-errors.ts @@ -1,4 +1,4 @@ -import { storageCapacityErrorCode } from '../../../../shared/storage-capacity-error' +import { storageCapacityErrorCode } from '../../../../shared/errors/storage-capacity-error' import { ProfileStateDocumentCorruptionError, ProfileStateRevisionConflictError diff --git a/src/main/persistence/restoring-sessions/folder-scope-migration.ts b/src/main/persistence/restoring-sessions/folder-scope-migration.ts index 00a870335c8..b7eb522b900 100644 --- a/src/main/persistence/restoring-sessions/folder-scope-migration.ts +++ b/src/main/persistence/restoring-sessions/folder-scope-migration.ts @@ -1,7 +1,7 @@ import type { PersistedState } from '../../../shared/persisted-state-types' import type { ProjectGroup } from '../../../shared/project/groups/project-group-types' import type { Repo } from '../../../shared/repository/repo-types' -import { isPathInsideOrEqual } from '../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../shared/file-access/cross-platform-path' import { getProjectGroupSubtreeIds } from '../../../shared/project/groups/project-groups' export function inferFolderScopeConnectionIdForMigration(args: { diff --git a/src/main/persistence/tracking-repos/missing-local-worktree-metadata-pruning.ts b/src/main/persistence/tracking-repos/missing-local-worktree-metadata-pruning.ts index 2f235f11dcd..1435dc5b220 100644 --- a/src/main/persistence/tracking-repos/missing-local-worktree-metadata-pruning.ts +++ b/src/main/persistence/tracking-repos/missing-local-worktree-metadata-pruning.ts @@ -1,4 +1,4 @@ -import { isWindowsAbsolutePathLike } from '../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../shared/file-access/cross-platform-path' import { getRepoExecutionHostId, LOCAL_EXECUTION_HOST_ID } from '../../../shared/execution-host' import type { PersistedState } from '../../../shared/persisted-state-types' import { getRepoKind } from '../../../shared/repository/repo-kind' diff --git a/src/main/persistence/tracking-repos/persistence-folder-scan-project-groups.test.ts b/src/main/persistence/tracking-repos/persistence-folder-scan-project-groups.test.ts index 9f9a4e2fe53..dce62776984 100644 --- a/src/main/persistence/tracking-repos/persistence-folder-scan-project-groups.test.ts +++ b/src/main/persistence/tracking-repos/persistence-folder-scan-project-groups.test.ts @@ -11,7 +11,7 @@ import { writeDataFile } from '../persistence-test-harness' -import { normalizeRuntimePathSeparators } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathSeparators } from '../../../shared/file-access/cross-platform-path' vi.mock('electron', () => ({ app: { diff --git a/src/main/persistence/tracking-repos/worktree-metadata-normalization.ts b/src/main/persistence/tracking-repos/worktree-metadata-normalization.ts index c2180fab5d4..54cbb4c4408 100644 --- a/src/main/persistence/tracking-repos/worktree-metadata-normalization.ts +++ b/src/main/persistence/tracking-repos/worktree-metadata-normalization.ts @@ -2,7 +2,7 @@ import { existsSync } from 'node:fs' import { isAbsolute } from 'node:path' import { getRepoExecutionHostId, LOCAL_EXECUTION_HOST_ID } from '../../../shared/execution-host' import { FOLDER_WORKSPACE_INSTANCE_SEPARATOR } from '../../../shared/worktree/id' -import { isWindowsAbsolutePathLike } from '../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../shared/file-access/cross-platform-path' import { isWslUncPath } from '../../../shared/file-access/wsl-paths' import { worktreeWorkspaceKey } from '../../../shared/workspace/identity/workspace-scope' import { diff --git a/src/main/plugins/contributions/plugin-approved-vm-recipes.ts b/src/main/plugins/contributions/plugin-approved-vm-recipes.ts index 0eb819f2aae..43b2101ca9a 100644 --- a/src/main/plugins/contributions/plugin-approved-vm-recipes.ts +++ b/src/main/plugins/contributions/plugin-approved-vm-recipes.ts @@ -1,4 +1,4 @@ -import type { OrcaVmRecipe } from '../../../shared/orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../../shared/workspace-setup/orca-yaml-hook-types' import type { PluginService } from '../plugin-service' export async function getApprovedPluginVmRecipes( diff --git a/src/main/plugins/contributions/plugin-vm-recipe-registry.ts b/src/main/plugins/contributions/plugin-vm-recipe-registry.ts index ddda5244ef8..85711624d16 100644 --- a/src/main/plugins/contributions/plugin-vm-recipe-registry.ts +++ b/src/main/plugins/contributions/plugin-vm-recipe-registry.ts @@ -1,4 +1,4 @@ -import type { OrcaVmRecipe } from '../../../shared/orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../../shared/workspace-setup/orca-yaml-hook-types' import { parsePluginVmRecipeArtifact } from '../../../shared/plugins/artifacts/plugin-vm-recipe-artifact' import { PLUGIN_VM_RECIPE_MAX_BYTES } from '../artifacts/plugin-artifact-validation' import { readContainedPluginArtifactText } from '../artifacts/plugin-contained-artifact' diff --git a/src/main/plugins/workers/host-api/plugin-agent-history.ts b/src/main/plugins/workers/host-api/plugin-agent-history.ts index 92caa92ce66..95437b04293 100644 --- a/src/main/plugins/workers/host-api/plugin-agent-history.ts +++ b/src/main/plugins/workers/host-api/plugin-agent-history.ts @@ -3,7 +3,7 @@ import { aiVaultSessionInScope, createAiVaultScopeCwdMatcher } from '../../../../shared/ai-vault/scanning/ai-vault-scope-cwd-match' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { LOCAL_EXECUTION_HOST_ID } from '../../../../shared/execution-host' import { PLUGIN_AGENT_SESSION_LIST_LIMIT } from '../../../../shared/plugins/workers/plugin-host-api-agent-history' import { parseWorkspaceKey } from '../../../../shared/workspace/identity/workspace-scope' diff --git a/src/main/ports/darwin-process-metadata.test.ts b/src/main/ports/darwin-process-metadata.test.ts index 4f7f14c2e75..49e247b2765 100644 --- a/src/main/ports/darwin-process-metadata.test.ts +++ b/src/main/ports/darwin-process-metadata.test.ts @@ -7,7 +7,7 @@ import { runPortScanCommandInProcess } from './port-scan-command-execution' import { scanWorkspacePorts } from './local-workspace-port-scanner' import { killWorkspacePort } from './workspace-port-ownership' import { resetWorkspacePortScanTimeoutBackoffForTests } from './local-workspace-port-scan-state' -import { LSOF_NONBLOCKING_ARGS } from '../../shared/lsof-nonblocking-args' +import { LSOF_NONBLOCKING_ARGS } from '../../shared/process-observation/lsof-nonblocking-args' const spawnMock = vi.hoisted(() => vi.fn()) vi.mock('@orca/process-host', () => ({ spawnProcess: spawnMock })) diff --git a/src/main/ports/darwin-process-metadata.ts b/src/main/ports/darwin-process-metadata.ts index 0685360c3a3..c099a089082 100644 --- a/src/main/ports/darwin-process-metadata.ts +++ b/src/main/ports/darwin-process-metadata.ts @@ -1,4 +1,4 @@ -import { LSOF_NONBLOCKING_ARGS } from '../../shared/lsof-nonblocking-args' +import { LSOF_NONBLOCKING_ARGS } from '../../shared/process-observation/lsof-nonblocking-args' import { runPortScanCommand } from './port-scan-command-client' import type { ProcessMetadata } from './local-workspace-port-scan-state' diff --git a/src/main/ports/local-workspace-platform-port-scanner.ts b/src/main/ports/local-workspace-platform-port-scanner.ts index 6a9bde7dd10..9a39c58970b 100644 --- a/src/main/ports/local-workspace-platform-port-scanner.ts +++ b/src/main/ports/local-workspace-platform-port-scanner.ts @@ -1,5 +1,5 @@ import { readFile, readdir, readlink } from 'node:fs/promises' -import { LSOF_NONBLOCKING_ARGS } from '../../shared/lsof-nonblocking-args' +import { LSOF_NONBLOCKING_ARGS } from '../../shared/process-observation/lsof-nonblocking-args' import { getProcessOutputFields } from '../../shared/process-observation/process-output-field-scanner' import { readWindowsProcessTable } from '../windows/windows-process-table' import { runPortScanCommand } from './port-scan-command-client' diff --git a/src/main/ports/port-scan-command-execution.ts b/src/main/ports/port-scan-command-execution.ts index 8aa796428a6..0b91c3ab781 100644 --- a/src/main/ports/port-scan-command-execution.ts +++ b/src/main/ports/port-scan-command-execution.ts @@ -1,7 +1,7 @@ import { execFile, type ChildProcess } from 'node:child_process' import { closeSync } from 'node:fs' import { spawnProcess } from '@orca/process-host' -import { LSOF_NONBLOCKING_ARGS } from '../../shared/lsof-nonblocking-args' +import { LSOF_NONBLOCKING_ARGS } from '../../shared/process-observation/lsof-nonblocking-args' import { DarwinNetstatListeners } from './darwin-netstat-listeners' import { openDarwinPortScanLock } from './darwin-port-scan-lock' import { diff --git a/src/main/project-groups/folder-workspace-path-status.ts b/src/main/project-groups/folder-workspace-path-status.ts index f539d249a53..37660634a13 100644 --- a/src/main/project-groups/folder-workspace-path-status.ts +++ b/src/main/project-groups/folder-workspace-path-status.ts @@ -1,7 +1,7 @@ import { resolveQualifiedFolderWorkspaceResult } from '../../shared/folder-workspaces/folder-workspace-execution-host' import { parseExecutionHostId, type ExecutionHostId } from '../../shared/execution-host' import { stat as statLocalPath } from 'node:fs/promises' -import { isPathInsideOrEqual } from '../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../shared/file-access/cross-platform-path' import type { FolderWorkspacePathStatus, FolderWorkspacePathStatusRequest diff --git a/src/main/project-groups/nested-repo-import-target.ts b/src/main/project-groups/nested-repo-import-target.ts index 9f4a36bd8d9..334154955e1 100644 --- a/src/main/project-groups/nested-repo-import-target.ts +++ b/src/main/project-groups/nested-repo-import-target.ts @@ -1,5 +1,5 @@ import type { GitWorktreeInfo } from '../../shared/worktree/types' -import { normalizeRuntimePathForComparison } from '../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../shared/file-access/cross-platform-path' import { listWorktreeGraph } from '../git/worktrees/catalog/worktree-scan-cache' export type NestedRepoImportTargetResolver = { diff --git a/src/main/project-groups/nested-repo-import.ts b/src/main/project-groups/nested-repo-import.ts index 835ee97d49d..0d3b1989bb6 100644 --- a/src/main/project-groups/nested-repo-import.ts +++ b/src/main/project-groups/nested-repo-import.ts @@ -10,7 +10,7 @@ import { normalizeRuntimePathForComparison, relativePathInsideRoot, resolveRuntimePath -} from '../../shared/cross-platform-path' +} from '../../shared/file-access/cross-platform-path' type CreateGroupInput = { name: string diff --git a/src/main/provider-process/provider-executable-missing.ts b/src/main/provider-process/provider-executable-missing.ts index 68623446d90..4eb49d39509 100644 --- a/src/main/provider-process/provider-executable-missing.ts +++ b/src/main/provider-process/provider-executable-missing.ts @@ -1,6 +1,6 @@ import { existsSync, statSync } from 'node:fs' import { isAbsolute } from 'node:path' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' import { findInErrorChain } from './provider-error-chain' /** What a spawn's ENOENT proves absent: the provider's executable or the folder it ran in. */ diff --git a/src/main/providers/foreground/agent-process-batch.ts b/src/main/providers/foreground/agent-process-batch.ts index f9609295a9f..29636919dd9 100644 --- a/src/main/providers/foreground/agent-process-batch.ts +++ b/src/main/providers/foreground/agent-process-batch.ts @@ -2,7 +2,7 @@ import { isAgentForegroundWrapperProcess, isExpectedAgentProcess } from '../../../shared/agent-status/process/agent-process-recognition' -import { getFirstCommandToken } from '../../../shared/command-token-scanner' +import { getFirstCommandToken } from '../../../shared/shell/command-resolution/command-token-scanner' import { resolveOuterWrapperForegroundProcess } from '../../../shared/agent-status/process/foreground-wrapper-agent' import { selectForegroundProcessCandidate } from '../../../shared/agent-status/process/foreground-process-selection' import type { diff --git a/src/main/providers/local-pty/local-pty-shell-ready-bash-rcfile.ts b/src/main/providers/local-pty/local-pty-shell-ready-bash-rcfile.ts index 406956d72a2..29c2d2d8d45 100644 --- a/src/main/providers/local-pty/local-pty-shell-ready-bash-rcfile.ts +++ b/src/main/providers/local-pty/local-pty-shell-ready-bash-rcfile.ts @@ -1,6 +1,6 @@ /** Bash has one --rcfile wrapper, so login startup, OSC hooks and readiness share this file. */ import { BASH_PROMPT_COMMAND_COMPOSITION_BLOCK } from '../../pty/shell-startup/bash-prompt-command-composition' -import { ORCA_CLI_POSIX_PATH_RESTORE } from '../../../shared/orca-cli-shell-path' +import { ORCA_CLI_POSIX_PATH_RESTORE } from '../../../shared/shell/launch/orca-cli-shell-path' import { MANAGED_DATA_ACCOUNT_POSIX_RESTORE } from '../../../shared/shell/launch/agents/managed-data-account-shell' import { WSL_MANAGED_CLI_PATH_RESTORE } from '../../wsl/execution/wsl-managed-cli-path-restore' import { getPosixOmpShellWrapper } from '../../pty/shell-startup/omp-shell-wrapper' diff --git a/src/main/providers/pty/worktree-ownership.ts b/src/main/providers/pty/worktree-ownership.ts index ce2b4e1a972..41d1f869362 100644 --- a/src/main/providers/pty/worktree-ownership.ts +++ b/src/main/providers/pty/worktree-ownership.ts @@ -1,4 +1,4 @@ -import { isPathInsideOrEqual } from '../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../shared/file-access/cross-platform-path' import { splitWorktreeId, splitWorktreeIdForFilesystem } from '../../../shared/worktree/id' import type { PtyProcessInfo } from './process-info' diff --git a/src/main/providers/shell-launch/windows/shell-args.ts b/src/main/providers/shell-launch/windows/shell-args.ts index 3267ffd9148..4756649224a 100644 --- a/src/main/providers/shell-launch/windows/shell-args.ts +++ b/src/main/providers/shell-launch/windows/shell-args.ts @@ -2,7 +2,7 @@ import { win32 as pathWin32 } from 'node:path' import { isWindowsGitBashShellPath } from '../../../pty/shell-startup/git-bash' import { parseWslPath } from '../../../wsl/filesystem/unc-path-access' import { toLinuxPath, toWindowsWslPath } from '../../../../shared/file-access/wsl-paths' -import { msysDrivePathToWindows } from '../../../../shared/cross-platform-path' +import { msysDrivePathToWindows } from '../../../../shared/file-access/cross-platform-path' import { buildWslExecArgs, buildWslInteractiveLoginShellCommand diff --git a/src/main/providers/working-directory/process-cwd.ts b/src/main/providers/working-directory/process-cwd.ts index 9fbe5cc6ef7..441e039318b 100644 --- a/src/main/providers/working-directory/process-cwd.ts +++ b/src/main/providers/working-directory/process-cwd.ts @@ -1,6 +1,6 @@ import { execFile as execFileCb } from 'node:child_process' import { readlink } from 'node:fs/promises' -import { LSOF_NONBLOCKING_ARGS } from '../../../shared/lsof-nonblocking-args' +import { LSOF_NONBLOCKING_ARGS } from '../../../shared/process-observation/lsof-nonblocking-args' import { readLibprocProcessFilePath } from '../../../shared/process-observation/darwin/libproc-addon' // Coalesce/cache per-PID cwd reads briefly so rapid pane actions cannot accumulate lsof subprocesses. diff --git a/src/main/pty/process-retirement/pty-master-foreground-observation.ts b/src/main/pty/process-retirement/pty-master-foreground-observation.ts index d9c7a379da5..b853adfc3f6 100644 --- a/src/main/pty/process-retirement/pty-master-foreground-observation.ts +++ b/src/main/pty/process-retirement/pty-master-foreground-observation.ts @@ -2,7 +2,7 @@ import type { PtyForegroundGroupReader } from '../../../shared/terminal/pty/ingr import { getCommandTokenPathBasename, getFirstCommandToken -} from '../../../shared/command-token-scanner' +} from '../../../shared/shell/command-resolution/command-token-scanner' import { recognizeAgentProcessFromCommandLine } from '../../../shared/agent-status/process/agent-process-recognition' import { selectForegroundProcessCandidate } from '../../../shared/agent-status/process/foreground-process-selection' import { resolveOuterWrapperForegroundProcess } from '../../../shared/agent-status/process/foreground-wrapper-agent' diff --git a/src/main/pty/shell-startup/zsh-startup-wrapper-builder.ts b/src/main/pty/shell-startup/zsh-startup-wrapper-builder.ts index 8d5ac457c48..314539c7d31 100644 --- a/src/main/pty/shell-startup/zsh-startup-wrapper-builder.ts +++ b/src/main/pty/shell-startup/zsh-startup-wrapper-builder.ts @@ -1,4 +1,4 @@ -import { ORCA_CLI_POSIX_PATH_RESTORE } from '../../../shared/orca-cli-shell-path' +import { ORCA_CLI_POSIX_PATH_RESTORE } from '../../../shared/shell/launch/orca-cli-shell-path' import { MANAGED_DATA_ACCOUNT_POSIX_RESTORE } from '../../../shared/shell/launch/agents/managed-data-account-shell' /** Restore ZDOTDIR before user startup; define functions first so .zshenv emulation cannot change their parsing. */ import { getPosixOmpShellWrapper } from './omp-shell-wrapper' diff --git a/src/main/rate-limits/providers/claude/claude-oauth-credentials.ts b/src/main/rate-limits/providers/claude/claude-oauth-credentials.ts index 727cee43b38..4f4163a51bd 100644 --- a/src/main/rate-limits/providers/claude/claude-oauth-credentials.ts +++ b/src/main/rate-limits/providers/claude/claude-oauth-credentials.ts @@ -2,7 +2,7 @@ import { readFile } from 'node:fs/promises' import { homedir } from 'node:os' import path from 'node:path' import { z } from 'zod' -import { isDefinitiveAbsence } from '../../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../../shared/errors/definitive-filesystem-absence' import { readActiveClaudeKeychainCredentialsStrict } from '../../../claude-accounts/runtime-auth/keychain' import type { ClaudeRuntimeAuthPreparation } from '../../../claude-accounts/runtime-auth/runtime-auth-types' import { readUserClaudeConfigDir } from '../../../claude-accounts/profiles/claude-profile-paths' diff --git a/src/main/ripgrep/bundled-ripgrep-text-search.ts b/src/main/ripgrep/bundled-ripgrep-text-search.ts index a466fba9679..708bd7cda96 100644 --- a/src/main/ripgrep/bundled-ripgrep-text-search.ts +++ b/src/main/ripgrep/bundled-ripgrep-text-search.ts @@ -1,7 +1,7 @@ import type { ChildProcess } from 'node:child_process' import type { SearchOptions, SearchResult } from '../../shared/file-search/code-search-types' import { RipgrepSearchDiagnostics } from '../../shared/ripgrep/ripgrep-search-diagnostics' -import { SearchSubprocessLineAccumulator } from '../../shared/search-subprocess-lines' +import { SearchSubprocessLineAccumulator } from '../../shared/process-streams/search-subprocess-lines' import { throwIfSignalAborted, abortSignalReason diff --git a/src/main/runtime/agent-session/agent-session-launch-directory.ts b/src/main/runtime/agent-session/agent-session-launch-directory.ts index 0ac77bebfb9..778fe414df3 100644 --- a/src/main/runtime/agent-session/agent-session-launch-directory.ts +++ b/src/main/runtime/agent-session/agent-session-launch-directory.ts @@ -1,6 +1,6 @@ import { stat } from 'node:fs/promises' import type { AgentSessionRecord } from '../../../shared/agent-session/lifecycle/agent-session-record' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { AgentSessionPreSpawnError } from '../../native-chat/agent-session-wire/providers/structured-agent-session-adapter-errors' import type { AgentSessionRecordStore } from './records/agent-session-record-store' import { agentSessionPinnedLaunchDirectory } from './records/agent-session-record-launch-directory' diff --git a/src/main/runtime/agent-session/environment/structured-agent-account-home.ts b/src/main/runtime/agent-session/environment/structured-agent-account-home.ts index 10dd8071c33..9404f3d06e1 100644 --- a/src/main/runtime/agent-session/environment/structured-agent-account-home.ts +++ b/src/main/runtime/agent-session/environment/structured-agent-account-home.ts @@ -1,6 +1,6 @@ import type { AgentSessionAccountKind } from '../../../../shared/agent-session/agent-session-availability' import type { GlobalSettings } from '../../../../shared/global-settings-types' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { getClaudeProfileRouter } from '../../../claude-accounts/profiles/routing/claude-profile-installed-router' import { claudeRoutedHomeAsync } from '../../../claude-accounts/profiles/routing/claude-profile-routed-home' import { normalizeCodexRuntimeSelection } from '../../../codex-accounts/account-management/runtime-selection' @@ -8,7 +8,7 @@ import { resolveOrcaManagedCodexHomePath, getSystemCodexHomePath } from '../../../codex/configuration/homes/codex-home-paths' -import { resolveAbsoluteDirOverride } from '../../../../shared/absolute-dir-override' +import { resolveAbsoluteDirOverride } from '../../../../shared/file-access/absolute-dir-override' import { homedir } from 'node:os' import { join } from 'node:path' diff --git a/src/main/runtime/agent-session/installation/usage-limit-account-usage.ts b/src/main/runtime/agent-session/installation/usage-limit-account-usage.ts index dd0c632347e..590db780dda 100644 --- a/src/main/runtime/agent-session/installation/usage-limit-account-usage.ts +++ b/src/main/runtime/agent-session/installation/usage-limit-account-usage.ts @@ -2,7 +2,7 @@ import { agentSessionAccountHomePath } from '../../../../shared/agent-session/li import { realpath } from 'node:fs/promises' import { homedir } from 'node:os' import { join, resolve } from 'node:path' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import type { GlobalSettings } from '../../../../shared/global-settings-types' import { nativeChatShellEnvironmentPolicy } from '../../../../shared/native-chat/native-chat-shell-environment' import { createStructuredAgentEnvironmentResolvers } from '../environment/structured-agent-shell-environment' diff --git a/src/main/runtime/client/settings/runtime-client-settings.ts b/src/main/runtime/client/settings/runtime-client-settings.ts index f0ca343e159..421187885e7 100644 --- a/src/main/runtime/client/settings/runtime-client-settings.ts +++ b/src/main/runtime/client/settings/runtime-client-settings.ts @@ -26,7 +26,7 @@ import { applyAgentStatusHooksEnabled } from '../../../agent-hooks/installation/ import { isWslHostOrcadProcess } from '../../../ipc/wsl-guest-windows-drive-path' import { isAgentStatusHooksEnabledForAgent } from '../../../../shared/agent-hook-listener/configuration/agent-status-hooks-setting' import type { RuntimeStore } from '../../construction/runtime-store-contract' -import { normalizePRAutoRefreshCadence } from '../../../../shared/review-refresh-policy' +import { normalizePRAutoRefreshCadence } from '../../../../shared/source-control/hosted-review/review-refresh-policy' import { agentLaunchSettingsMutationUpdates, projectAgentLaunchSettings, diff --git a/src/main/runtime/files/paths/runtime-relative-paths.ts b/src/main/runtime/files/paths/runtime-relative-paths.ts index b7c9eb9aab3..8e14a9bbc1d 100644 --- a/src/main/runtime/files/paths/runtime-relative-paths.ts +++ b/src/main/runtime/files/paths/runtime-relative-paths.ts @@ -1,5 +1,5 @@ import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' export function joinWorktreeRelativePath(rootPath: string, relativePath: string): string { const normalizedRelativePath = isWindowsAbsolutePathLike(rootPath) diff --git a/src/main/runtime/files/watch/file-watcher-leases.ts b/src/main/runtime/files/watch/file-watcher-leases.ts index 96acda145b5..0be0ece4bfd 100644 --- a/src/main/runtime/files/watch/file-watcher-leases.ts +++ b/src/main/runtime/files/watch/file-watcher-leases.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { isWatcherProcessFailure } from '../../../ipc/filesystem/watcher-process/parcel-watcher-process-failure' const pendingRuntimeFileWatcherUnsubscribes = new Set>() diff --git a/src/main/runtime/files/watch/windows-runtime-watch-pool.ts b/src/main/runtime/files/watch/windows-runtime-watch-pool.ts index 43b4f31b7cb..998e948047e 100644 --- a/src/main/runtime/files/watch/windows-runtime-watch-pool.ts +++ b/src/main/runtime/files/watch/windows-runtime-watch-pool.ts @@ -3,7 +3,7 @@ import { throwIfSignalAborted, waitForPromiseWithSignal } from '../../../../shared/concurrency/abort-signal-reason' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { isWatcherProcessFailure } from '../../../ipc/filesystem/watcher-process/parcel-watcher-process-failure' import { watchWindowsRuntimeFileExplorer } from './windows-file-watch' diff --git a/src/main/runtime/integrations/git/branch-switch-agent-blocker.ts b/src/main/runtime/integrations/git/branch-switch-agent-blocker.ts index 9450906af5c..1ac5b3c73ba 100644 --- a/src/main/runtime/integrations/git/branch-switch-agent-blocker.ts +++ b/src/main/runtime/integrations/git/branch-switch-agent-blocker.ts @@ -2,7 +2,7 @@ import type { AgentStatusIpcPayload } from '../../../../shared/agent-status/cont import { isFreshNonDoneAgentStatus } from '../../../../shared/agent-status/contracts/agent-status-freshness' import type { AgentProcessVerdict } from '../../../../shared/agent-status/process/agent-process-presence' import { formatAgentTypeLabel } from '../../../../shared/agent-status/presentation/agent-type-label' -import { isPathInsideOrEqual } from '../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../shared/file-access/cross-platform-path' import { isLocalHookConnectionId } from '../../../../shared/agent-hook-listener/transport/wsl-hook-relay-contract' export type AgentSwitchRow = Pick< diff --git a/src/main/runtime/integrations/git/runtime-branch-switch-host.ts b/src/main/runtime/integrations/git/runtime-branch-switch-host.ts index 3f59a7331e0..38c6331cb75 100644 --- a/src/main/runtime/integrations/git/runtime-branch-switch-host.ts +++ b/src/main/runtime/integrations/git/runtime-branch-switch-host.ts @@ -10,7 +10,7 @@ import { isWslMoveWorktreeBlocked } from '../../../persistence/moving-wsl-projec import { worktreeRowTarget } from '../../../persistence/host-qualified-worktree-meta' import type { RuntimeStore } from '../../construction/runtime-store-contract' import { findAgentSwitchBlocker, type AgentSwitchRow } from './branch-switch-agent-blocker' -import { isPathInsideOrEqual } from '../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../shared/file-access/cross-platform-path' import type { RuntimeGitCommandHost } from './runtime-git-command-target' type ConnectedPty = { ptyId: string; worktreeId: string; connected: boolean } diff --git a/src/main/runtime/integrations/github/runtime-github-issue-comment-commands.ts b/src/main/runtime/integrations/github/runtime-github-issue-comment-commands.ts index 0e9eb6a2c1f..574f30d993d 100644 --- a/src/main/runtime/integrations/github/runtime-github-issue-comment-commands.ts +++ b/src/main/runtime/integrations/github/runtime-github-issue-comment-commands.ts @@ -2,7 +2,7 @@ import '../../../github/api/rate-limit' import type { GitHubCreateIssueFields, GitHubIssueUpdate -} from '../../../../shared/issue-mutation-types' +} from '../../../../shared/work-items/issue-mutation-types' import type { GitHubRepositoryIdentity as GitHubOwnerRepo } from '../../../../shared/github/repositories/repository-identity' import type { GitHubPRReviewCommentInput } from '../../../../shared/github/comments/comment-types' import type { Repo } from '../../../../shared/repository/repo-types' diff --git a/src/main/runtime/integrations/github/runtime-github-review-mutation-commands.ts b/src/main/runtime/integrations/github/runtime-github-review-mutation-commands.ts index 9001738081a..9b8b964a213 100644 --- a/src/main/runtime/integrations/github/runtime-github-review-mutation-commands.ts +++ b/src/main/runtime/integrations/github/runtime-github-review-mutation-commands.ts @@ -1,6 +1,6 @@ import type { GhAccountBinding } from '../../../../shared/github/accounts/account-binding' import type { GitHubRepositoryIdentity as GitHubOwnerRepo } from '../../../../shared/github/repositories/repository-identity' -import type { GitHubPullRequestStateUpdate } from '../../../../shared/issue-mutation-types' +import type { GitHubPullRequestStateUpdate } from '../../../../shared/work-items/issue-mutation-types' import type { GitHubReactionContent } from '../../../../shared/github/comments/comment-types' import type { Repo } from '../../../../shared/repository/repo-types' import type { LocalProjectGhExecOptions } from '../../../workspaces/execution-host/project-runtime-git-options' diff --git a/src/main/runtime/integrations/github/runtime-github-review-query-commands-checks-cap.test.ts b/src/main/runtime/integrations/github/runtime-github-review-query-commands-checks-cap.test.ts index b58ad8c788c..b077f372f49 100644 --- a/src/main/runtime/integrations/github/runtime-github-review-query-commands-checks-cap.test.ts +++ b/src/main/runtime/integrations/github/runtime-github-review-query-commands-checks-cap.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import type { Repo } from '../../../../shared/repository/repo-types' -import { setPRAutoRefreshCadence } from '../../../../shared/review-refresh-policy' +import { setPRAutoRefreshCadence } from '../../../../shared/source-control/hosted-review/review-refresh-policy' import { _prChecksResultCountForTests, _resetPacedPRChecksForTests @@ -242,37 +242,6 @@ describe('github.prChecks: one checks result per PR head, read on the host’s c expect(_prChecksResultCountForTests().running).toBe(0) }) - it('keeps at most 256 completed answers while every one of them is being read again, and a new manual read still works', async () => { - const heads = Array.from({ length: 256 }, (_, head) => `cached-head-${head}`) - for (const head of heads) { - const cached = read({}, head) - await vi.waitFor(() => expect(provider.calls).toHaveLength(1), { interval: 1 }) - provider.calls.shift()!.answer(head) - await cached - } - // All 256 are read again at once; only four gh commands may run at a time, the rest wait for - // a command slot while their reads are already live. - const rereads = heads.map((head) => read({ noCache: true }, head)) - await vi.waitFor(() => expect(provider.calls).toHaveLength(4), { interval: 1 }) - expect(_prChecksResultCountForTests()).toEqual({ completed: 256, running: 256 }) - - // A new manual read of another PR head waits its turn for a slot behind them, then reads. - const fresh = read({ noCache: true, userRefresh: true }, 'new-head') - let answered = 0 - while (answered < heads.length + 1) { - await vi.waitFor(() => expect(provider.calls.length).toBeGreaterThan(0), { interval: 1 }) - const admitted = provider.calls.splice(0) - expect(admitted.length).toBeLessThanOrEqual(4) - for (const call of admitted) { - call.answer(answered === heads.length ? 'new' : 'reread') - answered += 1 - } - } - expect(await names(fresh)).toEqual(['new']) - await Promise.all(rereads) - expect(_prChecksResultCountForTests()).toEqual({ completed: 256, running: 0 }) - }) - it('a read after a PR mutation starts its own provider read instead of joining one from before it', async () => { setPRAutoRefreshCadence('off') const beforeMutation = timed() diff --git a/src/main/runtime/integrations/github/runtime-github-worktree-base.ts b/src/main/runtime/integrations/github/runtime-github-worktree-base.ts index fec67200ec5..79ca53877f4 100644 --- a/src/main/runtime/integrations/github/runtime-github-worktree-base.ts +++ b/src/main/runtime/integrations/github/runtime-github-worktree-base.ts @@ -15,7 +15,7 @@ import { import { isFolderRepo } from '../../../../shared/repository/repo-kind' import { requireRepoLocalGitRoute } from '../../../workspaces/execution-host/repo-execution-host' import type { ProjectRuntimeResolutionStore } from '../../../workspaces/execution-host/local-project-runtime-resolution' -import { reviewStartPointFailure } from '../../../../shared/review-start-point-failure-copy' +import { reviewStartPointFailure } from '../../../../shared/worktree/hosted-review/review-start-point-failure-copy' export type RuntimeGitHubWorktreeBaseArgs = { repoSelector: string diff --git a/src/main/runtime/integrations/gitlab/runtime-gitlab-fork-mr-base.ts b/src/main/runtime/integrations/gitlab/runtime-gitlab-fork-mr-base.ts index d1d93fe3934..6b7fa9a04bd 100644 --- a/src/main/runtime/integrations/gitlab/runtime-gitlab-fork-mr-base.ts +++ b/src/main/runtime/integrations/gitlab/runtime-gitlab-fork-mr-base.ts @@ -2,10 +2,10 @@ import type { Repo } from '../../../../shared/repository/repo-types' import { gitlabMergeRequestHeadLocalRef, reviewHeadRemoteRefComponent -} from '../../../../shared/review-head-tracking-ref' +} from '../../../../shared/worktree/hosted-review/review-head-tracking-ref' import { isTransientReviewHeadFetchError } from '../../../git/remotes/fetch-error-classification' import { fetchGitLabMergeRequestHeadRef } from '../../../gitlab/merge-requests/mr-head-tracking-ref' -import { reviewStartPointFailure } from '../../../../shared/review-start-point-failure-copy' +import { reviewStartPointFailure } from '../../../../shared/worktree/hosted-review/review-start-point-failure-copy' type GitExec = (args: string[]) => Promise<{ stdout: string }> export async function resolveRuntimeGitLabForkMrBase(args: { diff --git a/src/main/runtime/integrations/gitlab/runtime-gitlab-mutation-commands.ts b/src/main/runtime/integrations/gitlab/runtime-gitlab-mutation-commands.ts index 50c89639f17..d8ba87198c2 100644 --- a/src/main/runtime/integrations/gitlab/runtime-gitlab-mutation-commands.ts +++ b/src/main/runtime/integrations/gitlab/runtime-gitlab-mutation-commands.ts @@ -3,7 +3,7 @@ import type { GitLabMRInlineCommentInput, GitLabMRUpdate, GitLabProjectRef -} from '../../../../shared/gitlab-types' +} from '../../../../shared/gitlab/gitlab-types' import type { Repo } from '../../../../shared/repository/repo-types' import { addIssueComment, createIssue } from '../../../gitlab/issues/gitlab-issue-queries' import { diff --git a/src/main/runtime/integrations/gitlab/runtime-gitlab-query-commands.ts b/src/main/runtime/integrations/gitlab/runtime-gitlab-query-commands.ts index e7b05e7639c..316046e3234 100644 --- a/src/main/runtime/integrations/gitlab/runtime-gitlab-query-commands.ts +++ b/src/main/runtime/integrations/gitlab/runtime-gitlab-query-commands.ts @@ -3,7 +3,7 @@ import type { GitLabProjectRef, GitLabWorkItem, MRListState -} from '../../../../shared/gitlab-types' +} from '../../../../shared/gitlab/gitlab-types' import type { Repo } from '../../../../shared/repository/repo-types' import { diagnoseAuth, getRateLimit } from '../../../gitlab/requests/gitlab-auth-and-rate-limit' import { diff --git a/src/main/runtime/integrations/gitlab/runtime-gitlab-worktree-base.ts b/src/main/runtime/integrations/gitlab/runtime-gitlab-worktree-base.ts index 1943123c94c..c43819861d2 100644 --- a/src/main/runtime/integrations/gitlab/runtime-gitlab-worktree-base.ts +++ b/src/main/runtime/integrations/gitlab/runtime-gitlab-worktree-base.ts @@ -4,7 +4,7 @@ import { isFolderRepo } from '../../../../shared/repository/repo-kind' import { requireRepoLocalGitRoute } from '../../../workspaces/execution-host/repo-execution-host' import { fetchCompareBaseRefWithLocalFallback } from '../../../git/remotes/compare-base-ref-fetch' import { gitExecFileAsync } from '../../../git/command-runner/git-exec-file' -import { REVIEW_HEAD_FETCH_TIMEOUT_MS } from '../../../../shared/review-head-tracking-ref' +import { REVIEW_HEAD_FETCH_TIMEOUT_MS } from '../../../../shared/worktree/hosted-review/review-head-tracking-ref' import { getProjectRefForRemote } from '../../../gitlab/projects/gitlab-project-ref-resolution' import { getWorkItemByProjectRef } from '../../../gitlab/work-items/work-item-queries' import { getGlabKnownHosts } from '../../../gitlab/projects/gitlab-known-host-probe' @@ -15,7 +15,7 @@ import { import type { ProjectRuntimeResolutionStore } from '../../../workspaces/execution-host/local-project-runtime-resolution' import { resolveRuntimeGitLabForkMrBase } from './runtime-gitlab-fork-mr-base' import { resolveRuntimeGitLabIssueSourceRemote } from './runtime-gitlab-issue-source-remote' -import { reviewStartPointFailure } from '../../../../shared/review-start-point-failure-copy' +import { reviewStartPointFailure } from '../../../../shared/worktree/hosted-review/review-start-point-failure-copy' import { resolvePrStartPointUnlessWslStopped } from '../../../github/pull-requests/start-points/pr-start-point-wsl-gate' export type RuntimeGitLabWorktreeBaseArgs = { diff --git a/src/main/runtime/integrations/linear/runtime-linear-context-commands.ts b/src/main/runtime/integrations/linear/runtime-linear-context-commands.ts index 0c50ee57432..9c16825f5dd 100644 --- a/src/main/runtime/integrations/linear/runtime-linear-context-commands.ts +++ b/src/main/runtime/integrations/linear/runtime-linear-context-commands.ts @@ -6,7 +6,7 @@ import { } from '../../../linear/issues/linear-issue-mutations' import { getIssue as getLinearIssue } from '../../../linear/issues/linear-issue-lookups' import { listIssues as listLinearIssues } from '../../../linear/issues/linear-issue-listing' -import type { LinearIssueUpdate } from '../../../../shared/issue-mutation-types' +import type { LinearIssueUpdate } from '../../../../shared/work-items/issue-mutation-types' import type { LinearWorkspaceSelection } from '../../../../shared/linear/workspace-types' import type { LinearListFilter } from '../../../linear/issues/linear-issue-listing' import type { LinearIssueListOptions } from '../../../linear/issues/linear-issue-query-documents' diff --git a/src/main/runtime/integrations/linear/runtime-linear-save-fields-commands.ts b/src/main/runtime/integrations/linear/runtime-linear-save-fields-commands.ts index 77a9a11b6c8..bb83e432a7d 100644 --- a/src/main/runtime/integrations/linear/runtime-linear-save-fields-commands.ts +++ b/src/main/runtime/integrations/linear/runtime-linear-save-fields-commands.ts @@ -1,5 +1,5 @@ import type { getIssueByUuidForAgent as getLinearIssueByUuidForAgent } from '../../../linear/issues/linear-issue-lookups' -import type { LinearIssueUpdate } from '../../../../shared/issue-mutation-types' +import type { LinearIssueUpdate } from '../../../../shared/work-items/issue-mutation-types' import type { LinearCreateFieldIntent } from './linear-create-field-intent' import { sameStringSet } from './linear-label-id-equality' import { linearError } from '../../../linear/issues/context/linear-access-errors' diff --git a/src/main/runtime/integrations/linear/runtime-linear-task-fields-commands.ts b/src/main/runtime/integrations/linear/runtime-linear-task-fields-commands.ts index 0312ba9c5e6..f61b2edd217 100644 --- a/src/main/runtime/integrations/linear/runtime-linear-task-fields-commands.ts +++ b/src/main/runtime/integrations/linear/runtime-linear-task-fields-commands.ts @@ -11,7 +11,7 @@ import type { LinearSaveIssueRequest, LinearCurrentIssueContextHints } from '../../../../shared/linear/agent-access' -import type { LinearIssueUpdate } from '../../../../shared/issue-mutation-types' +import type { LinearIssueUpdate } from '../../../../shared/work-items/issue-mutation-types' import type { LinearAgentWriteTarget } from './linear-agent-write-target' import { RuntimeLinearLabelWriteCommands } from './runtime-linear-label-write-commands' diff --git a/src/main/runtime/integrations/linear/runtime-linear-team-write-commands.ts b/src/main/runtime/integrations/linear/runtime-linear-team-write-commands.ts index 66b344b51eb..621ec4cb77d 100644 --- a/src/main/runtime/integrations/linear/runtime-linear-team-write-commands.ts +++ b/src/main/runtime/integrations/linear/runtime-linear-team-write-commands.ts @@ -1,5 +1,5 @@ import { resolve } from 'node:path' -import { isPathInsideOrEqual } from '../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../shared/file-access/cross-platform-path' import { getStatus as getLinearStatus } from '../../../linear/accounts/linear-account-client' import { listTeamsOrThrow as listLinearTeamsOrThrow } from '../../../linear/teams/linear-team-queries' import { diff --git a/src/main/runtime/orca-runtime-test-mocks/setup.spec.ts b/src/main/runtime/orca-runtime-test-mocks/setup.spec.ts index 44106d170c9..8f69047064a 100644 --- a/src/main/runtime/orca-runtime-test-mocks/setup.spec.ts +++ b/src/main/runtime/orca-runtime-test-mocks/setup.spec.ts @@ -7,7 +7,7 @@ import type * as GitUsernameModule from '../../git/repositories/git-username' import './repo-creation.spec' import type * as WslUncAccessGateModule from '../../wsl/filesystem/wsl-unc-access-gate' import type * as FilesystemPathContainmentModule from '../../ipc/filesystem/access/filesystem-path-containment' -import { reviewHeadRemoteRefComponent } from '../../../shared/review-head-tracking-ref' +import { reviewHeadRemoteRefComponent } from '../../../shared/worktree/hosted-review/review-head-tracking-ref' export const ORIGIN_REMOTE_URL = 'git@example.com:group/repo.git' export const ORIGIN_HEAD_COMPONENT = reviewHeadRemoteRefComponent('origin', ORIGIN_REMOTE_URL) @@ -291,7 +291,7 @@ vi.mock('../../agent-launch/trust/agent-trust-presets', () => ({ })) const parseOrcaYamlMock = vi.hoisted(() => vi.fn().mockReturnValue(null)) -vi.mock('../../../shared/orca-yaml', async (importOriginal) => ({ +vi.mock('../../../shared/workspace-setup/orca-yaml', async (importOriginal) => ({ ...(await importOriginal>()), parseOrcaYaml: parseOrcaYamlMock })) diff --git a/src/main/runtime/orca-runtime-tests/gitlab-and-pr-bases-part-02.spec.ts b/src/main/runtime/orca-runtime-tests/gitlab-and-pr-bases-part-02.spec.ts index 7278f32f4a0..62304051419 100644 --- a/src/main/runtime/orca-runtime-tests/gitlab-and-pr-bases-part-02.spec.ts +++ b/src/main/runtime/orca-runtime-tests/gitlab-and-pr-bases-part-02.spec.ts @@ -9,7 +9,7 @@ import { getPullRequestPushTargetMock } from '../orca-runtime-test-mocks/setup.spec' import { OrcaRuntimeService } from '../orca-runtime' -import '../../../shared/review-head-tracking-ref' +import '../../../shared/worktree/hosted-review/review-head-tracking-ref' import { TEST_REPO_ID, TEST_REPO_PATH, store } from './orca-runtime-test-fixtures.spec' describe('OrcaRuntimeService', () => { diff --git a/src/main/runtime/orca-runtime-tests/orca-runtime-test-lifecycle.spec.ts b/src/main/runtime/orca-runtime-tests/orca-runtime-test-lifecycle.spec.ts index f39fee39101..b5f5a0db42b 100644 --- a/src/main/runtime/orca-runtime-tests/orca-runtime-test-lifecycle.spec.ts +++ b/src/main/runtime/orca-runtime-tests/orca-runtime-test-lifecycle.spec.ts @@ -113,7 +113,7 @@ import { listWorktrees, listWorktreesSharedStrict } from '../../git/worktrees/catalog/worktree-scan-cache' -import { parseOrcaYaml } from '../../../shared/orca-yaml' +import { parseOrcaYaml } from '../../../shared/workspace-setup/orca-yaml' import { removeWorktree } from '../../git/worktrees/removal/worktree-removal' import { setRuntimeBrowserCommandsFactory, diff --git a/src/main/runtime/orca-runtime-tests/repository-project-operations-part-02.spec.ts b/src/main/runtime/orca-runtime-tests/repository-project-operations-part-02.spec.ts index 634007d4e6d..193c6f0914b 100644 --- a/src/main/runtime/orca-runtime-tests/repository-project-operations-part-02.spec.ts +++ b/src/main/runtime/orca-runtime-tests/repository-project-operations-part-02.spec.ts @@ -16,7 +16,7 @@ import 'node:fs' import '../../../shared/project/host-setup/project-host-setup-projection' import { tmpdir } from 'node:os' import { createRuntime, store } from './orca-runtime-test-fixtures.spec' -import '../../../shared/cross-platform-path' +import '../../../shared/file-access/cross-platform-path' // Clone and create register resolved paths (macOS tmpdir is a /var symlink). async function mkdtempReal(prefix: string): Promise { diff --git a/src/main/runtime/orca-runtime-tests/runtime-test-module-registration.spec.ts b/src/main/runtime/orca-runtime-tests/runtime-test-module-registration.spec.ts index efe736ab9fc..7ff59a649b7 100644 --- a/src/main/runtime/orca-runtime-tests/runtime-test-module-registration.spec.ts +++ b/src/main/runtime/orca-runtime-tests/runtime-test-module-registration.spec.ts @@ -16,7 +16,7 @@ import 'node:os' import 'node:path' import 'electron' import '../../../shared/agent-status/contracts/agent-status-freshness' -import '../../../shared/review-head-tracking-ref' +import '../../../shared/worktree/hosted-review/review-head-tracking-ref' import '../../../shared/agent-status/title/agent-title-status' import '../../../shared/agent-status/title/osc-title-extraction' import '../../git/worktrees/creation/worktree-sparse-add' @@ -29,7 +29,7 @@ import '../workspaces/removal/worktree-teardown' import '../workspaces/removal/worktree-teardown-deadline' import '../../git/source-control/submodules/submodule-paths' import '../../workspace-hooks/hooks' -import '../../../shared/orca-yaml' +import '../../../shared/workspace-setup/orca-yaml' import '../../workspace-hooks/worktree-runner-script' import '../../workspace-hooks/effective-hook-config' import '../../git/repositories/repository-name' diff --git a/src/main/runtime/orchestration/workers/launch/configured-worker-agent-selector.ts b/src/main/runtime/orchestration/workers/launch/configured-worker-agent-selector.ts index b94a749ed76..25b34d88b21 100644 --- a/src/main/runtime/orchestration/workers/launch/configured-worker-agent-selector.ts +++ b/src/main/runtime/orchestration/workers/launch/configured-worker-agent-selector.ts @@ -1,5 +1,5 @@ -import { extractLeadingEnvAssignments } from '../../../../../shared/command-environment' -import { getCommandTokenPathBasename } from '../../../../../shared/command-token-scanner' +import { extractLeadingEnvAssignments } from '../../../../../shared/shell/launch/command-environment' +import { getCommandTokenPathBasename } from '../../../../../shared/shell/command-resolution/command-token-scanner' import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent' import { isTuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent-config' import { diff --git a/src/main/runtime/repositories/runtime-nested-repo-import.ts b/src/main/runtime/repositories/runtime-nested-repo-import.ts index d372471980a..17e8180ee3a 100644 --- a/src/main/runtime/repositories/runtime-nested-repo-import.ts +++ b/src/main/runtime/repositories/runtime-nested-repo-import.ts @@ -2,7 +2,7 @@ import { randomUUID } from 'node:crypto' import { realpath } from 'node:fs/promises' import { isAbsolute } from 'node:path' import { DEFAULT_REPO_BADGE_COLOR } from '../../../shared/repository/appearance/repo-badge-color' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import type { NestedRepoScanResult, ProjectGroupImportMode, diff --git a/src/main/runtime/repositories/runtime-project-group-controller.ts b/src/main/runtime/repositories/runtime-project-group-controller.ts index a8eae137d71..ae6f830e7f4 100644 --- a/src/main/runtime/repositories/runtime-project-group-controller.ts +++ b/src/main/runtime/repositories/runtime-project-group-controller.ts @@ -6,7 +6,7 @@ export type { RuntimeProjectGroupDependencies } from './runtime-project-group-co import { projectGroupHookOwner } from '../../../shared/workspace-setup/hooks/workspace-hook-owner' import { RuntimeRepositoryHooksCommands } from './runtime-repository-hooks-commands' import { getEffectiveSetupRunPolicy } from '../../workspace-hooks/effective-hook-config' -import { getSetupConfig } from '../../../shared/orca-hook-setup-config' +import { getSetupConfig } from '../../../shared/workspace-setup/hooks/orca-hook-setup-config' import type { FolderWorkspaceCreateResult } from '../../../shared/folder-workspaces/folder-workspace-create' import type { RuntimeGroupFolderCreateInput } from '../workspaces/creation/runtime-group-folder-setup' import { refuseWslHostWindowsDrivePath } from '../terminal/launch/wsl-host-windows-drive-guard' diff --git a/src/main/runtime/repositories/runtime-repository-hooks-commands.ts b/src/main/runtime/repositories/runtime-repository-hooks-commands.ts index 05ef85aeac2..5b8fa030a60 100644 --- a/src/main/runtime/repositories/runtime-repository-hooks-commands.ts +++ b/src/main/runtime/repositories/runtime-repository-hooks-commands.ts @@ -4,7 +4,7 @@ import { windowsFsPath } from '../../wsl/filesystem/wsl-unc-drive-fs-path' import { readFile } from 'node:fs/promises' import type { WorkspaceHookOwner } from '../../../shared/workspace-setup/hooks/workspace-hook-owner' import type { Repo } from '../../../shared/repository/repo-types' -import type { OrcaHooks } from '../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../shared/workspace-setup/orca-yaml-hook-types' import { getEffectiveHooks, hasHooksFile, @@ -12,8 +12,11 @@ import { loadHooks } from '../../workspace-hooks/hooks' import { getEffectiveSetupRunPolicy } from '../../workspace-hooks/effective-hook-config' -import { resolveHookCommandSourcePolicy } from '../../../shared/hook-command-source-policy' -import { getSetupConfig, getSetupTrustContent } from '../../../shared/orca-hook-setup-config' +import { resolveHookCommandSourcePolicy } from '../../../shared/workspace-setup/hooks/hook-command-source-policy' +import { + getSetupConfig, + getSetupTrustContent +} from '../../../shared/workspace-setup/hooks/orca-hook-setup-config' import { isENOENT } from '../../ipc/filesystem/access/filesystem-path-containment' import { isFolderRepo } from '../../../shared/repository/repo-kind' import { inspectSetupScriptImportCandidates } from '../../../shared/workspace-setup/setup-script-imports' diff --git a/src/main/runtime/repositories/runtime-repository-registration-controller.test.ts b/src/main/runtime/repositories/runtime-repository-registration-controller.test.ts index f2020a01e60..ef9413784b9 100644 --- a/src/main/runtime/repositories/runtime-repository-registration-controller.test.ts +++ b/src/main/runtime/repositories/runtime-repository-registration-controller.test.ts @@ -3,7 +3,7 @@ import { mkdir, mkdtemp, realpath, rm, symlink } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join } from 'node:path' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import '../../../shared/file-access/cross-platform-path' import type { Repo } from '../../../shared/repository/repo-types' import { RuntimeRepositoryRegistrationController } from './runtime-repository-registration-controller' import { partialRuntimeStore } from '../orca-runtime-tests/runtime-store-partial-fixture' @@ -137,19 +137,6 @@ describe('RuntimeRepositoryRegistrationController.add stores the checkout git li await rm(root, { recursive: true, force: true }) }) - it('stores the toplevel when a subdirectory of a git checkout is added', async () => { - const repoPath = join(root, 'mono') - await mkdir(join(repoPath, 'pkg', 'web'), { recursive: true }) - gitInit(repoPath) - const { controller } = createController() - - const added = await controller.add(join(repoPath, 'pkg', 'web'), 'git') - - expect(normalizeRuntimePathForComparison(added.path)).toBe( - normalizeRuntimePathForComparison(repoPath) - ) - }) - it.skipIf(process.platform === 'win32')( 'keeps a literal backslash in a POSIX checkout name', async () => { diff --git a/src/main/runtime/rpc/methods/agent-launch/agent-launch-worktree-creation.ts b/src/main/runtime/rpc/methods/agent-launch/agent-launch-worktree-creation.ts index fa4cd170b9a..0319d1f305a 100644 --- a/src/main/runtime/rpc/methods/agent-launch/agent-launch-worktree-creation.ts +++ b/src/main/runtime/rpc/methods/agent-launch/agent-launch-worktree-creation.ts @@ -3,7 +3,7 @@ import type { RuntimeTerminalCreate } from '../../../../../shared/terminal/runti * The executor chooses; setup, default tabs, provenance and lineage use the normal create path. */ import { callerLaunchSource } from '../../../../agent-launch/agent-started-telemetry' -import { buildCliWorkspaceProvenance } from '../../../../../shared/cli-workspace-provenance' +import { buildCliWorkspaceProvenance } from '../../../../../shared/worktree/creation/cli-workspace-provenance' import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent' import type { OrcaRuntimeService } from '../../../orca-runtime' import { diff --git a/src/main/runtime/rpc/methods/host-management/managed-runtime-install.ts b/src/main/runtime/rpc/methods/host-management/managed-runtime-install.ts index 4c60382e787..0c3abef514d 100644 --- a/src/main/runtime/rpc/methods/host-management/managed-runtime-install.ts +++ b/src/main/runtime/rpc/methods/host-management/managed-runtime-install.ts @@ -13,7 +13,7 @@ import { isAgentSessionPreSpawnError } from '../../../../native-chat/agent-sessi import { getProfileUserDataPath } from '../../../../orca-profiles/profile-storage-paths' import { stopStructuredAgentChats } from '../../../agent-session/lifecycle/structured-agent-chat-stop' import { resolveHostStructuredAgentLaunchEnvironment } from '../../../agent-session/launch/structured-agent-launch-support' -import { isPathInsideOrEqual } from '../../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../../shared/file-access/cross-platform-path' import { defineMethod, defineStreamingMethod } from '../../core' import { bindStructuredAgentSessionStream } from '../structured-sessions/subscriptions/structured-agent-session-status-stream' diff --git a/src/main/runtime/rpc/methods/structured-sessions/catalog/structured-agent-session-account-usage.ts b/src/main/runtime/rpc/methods/structured-sessions/catalog/structured-agent-session-account-usage.ts index 1d63b2374b6..911654b34c8 100644 --- a/src/main/runtime/rpc/methods/structured-sessions/catalog/structured-agent-session-account-usage.ts +++ b/src/main/runtime/rpc/methods/structured-sessions/catalog/structured-agent-session-account-usage.ts @@ -6,7 +6,7 @@ import type { AgentSessionRecord } from '../../../../../../shared/agent-session/ import type { GlobalSettings } from '../../../../../../shared/global-settings-types' import { requireLegacyAgentSessionAccountHome } from '../../../../../../shared/agent-session/lifecycle/accounts/agent-session-account-home' import type { RateLimitState } from '../../../../../../shared/agent-usage/rate-limits/rate-limit-types' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import { buildCodexResetCreditExpectedScope } from '../../../../../../shared/agent-accounts/codex/codex-reset-credit-scope' import { getManagedAccountDisplayName } from '../../../../../../shared/agent-accounts/managed-account-display-names' import { getSystemCodexHomePath } from '../../../../../codex/configuration/homes/codex-home-paths' diff --git a/src/main/runtime/rpc/methods/workspaces/worktree.ts b/src/main/runtime/rpc/methods/workspaces/worktree.ts index 6a8ae09a87c..f13ab57b020 100644 --- a/src/main/runtime/rpc/methods/workspaces/worktree.ts +++ b/src/main/runtime/rpc/methods/workspaces/worktree.ts @@ -9,7 +9,7 @@ import { import { getLocalWorktreeCatalogVersion } from '../../../../workspaces/catalog/local-worktree-scan-generation' import { getExplicitWorktreeIdSelector } from '../../../workspaces/catalog/runtime-worktree-selection' import { splitWorktreeId } from '../../../../../shared/worktree/id' -import { buildCliWorkspaceProvenance } from '../../../../../shared/cli-workspace-provenance' +import { buildCliWorkspaceProvenance } from '../../../../../shared/worktree/creation/cli-workspace-provenance' import { createWorktreeWithStartupAgent } from '../../../../agent-launch/startup-agent-worktree-create' import { defineMethod } from '../../core' import { buildManagedWorktreeCreateArgs, worktreeCreateRepoSelector } from './worktree-create-args' diff --git a/src/main/runtime/terminal/input/pty-write-host-platform.ts b/src/main/runtime/terminal/input/pty-write-host-platform.ts index 9e7038d8c7a..eb6def495c7 100644 --- a/src/main/runtime/terminal/input/pty-write-host-platform.ts +++ b/src/main/runtime/terminal/input/pty-write-host-platform.ts @@ -1,6 +1,6 @@ import { getRegisteredSshState } from '../../../ssh/targets/ssh-target-registry' import { splitWorktreeIdForFilesystem } from '../../../../shared/worktree/id' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import type { RuntimePtyWorktreeRecord } from '../records/runtime-terminal-state-records' /** Use the PTY transport host: WSL ingests through Windows ConPTY, while SSH uses remote node-pty. */ diff --git a/src/main/runtime/terminal/launch/claude-agent-teams-shim-env.ts b/src/main/runtime/terminal/launch/claude-agent-teams-shim-env.ts index 8d8ea34c82d..ef8917f430c 100644 --- a/src/main/runtime/terminal/launch/claude-agent-teams-shim-env.ts +++ b/src/main/runtime/terminal/launch/claude-agent-teams-shim-env.ts @@ -12,7 +12,7 @@ import { getAppEnvironment, hasAppEnvironment } from '../../../../shared/app-lifecycle/app-environment' -import { getOrcaCliCommandNameForPlatform } from '../../../../shared/orca-cli-command-name' +import { getOrcaCliCommandNameForPlatform } from '../../../../shared/cli/orca-cli-command-name' import { getBundledLauncherPath } from '../../../cli/packaged-assets/bundled-cli-launcher-path' import { resolvePathEnvKey } from '../../../pty/environment/windows-path-segment-merge' diff --git a/src/main/runtime/terminal/launch/wsl-host-agent-terminal-launch.ts b/src/main/runtime/terminal/launch/wsl-host-agent-terminal-launch.ts index 0c5c69135bf..556ff31b48d 100644 --- a/src/main/runtime/terminal/launch/wsl-host-agent-terminal-launch.ts +++ b/src/main/runtime/terminal/launch/wsl-host-agent-terminal-launch.ts @@ -10,7 +10,7 @@ import { getTuiAgentLaunchCommand, TUI_AGENT_CONFIG } from '../../../../shared/agent-launch/catalog/tui-agent-config' -import { getOrcaCliCommandNameForPlatform } from '../../../../shared/orca-cli-command-name' +import { getOrcaCliCommandNameForPlatform } from '../../../../shared/cli/orca-cli-command-name' import { hasExplicitTuiLaunchCommand } from '../../../../shared/agent-launch/startup/tui-agent-launch-command-override' import { quoteStartupArg, diff --git a/src/main/runtime/terminal/output/terminal-derived-agent-facts.ts b/src/main/runtime/terminal/output/terminal-derived-agent-facts.ts index f870d417436..1b15d6b85d8 100644 --- a/src/main/runtime/terminal/output/terminal-derived-agent-facts.ts +++ b/src/main/runtime/terminal/output/terminal-derived-agent-facts.ts @@ -8,7 +8,7 @@ import { } from '../../../daemon/emulation/osc7-uri-extraction' import { parseFileUriPathParts } from '../../../daemon/emulation/osc7-file-uri' import { splitWorktreeIdForFilesystem } from '../../../../shared/worktree/id' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import type { ProcessedAgentStatusChunk } from '../../../../shared/agent-status/transport/agent-status-osc' import { mapExplicitAgentStateToRuntimeTerminalStatus } from '../../workspaces/process-listing/runtime-worktree-status-projection' import { programStatusStateOutlivesProgram } from '../../../../shared/program-status/protocol' diff --git a/src/main/runtime/terminal/terminal-file-path.ts b/src/main/runtime/terminal/terminal-file-path.ts index fcdee6804cd..e37030d7883 100644 --- a/src/main/runtime/terminal/terminal-file-path.ts +++ b/src/main/runtime/terminal/terminal-file-path.ts @@ -2,7 +2,7 @@ import { isRuntimePathAbsolute, isWindowsAbsolutePathLike, resolveRuntimePath -} from '../../../shared/cross-platform-path' +} from '../../../shared/file-access/cross-platform-path' import { parseWslPath } from '../../wsl/filesystem/unc-path-access' import { toWindowsWslPath } from '../../../shared/file-access/wsl-paths' diff --git a/src/main/runtime/terminal/terminal-path-resolver.ts b/src/main/runtime/terminal/terminal-path-resolver.ts index 901b6c972e4..e31aefea3b5 100644 --- a/src/main/runtime/terminal/terminal-path-resolver.ts +++ b/src/main/runtime/terminal/terminal-path-resolver.ts @@ -1,7 +1,10 @@ import type { RuntimeNativeChatFileContext } from '../../../shared/native-chat/native-chat-file-context' import type { RuntimeTerminalPathResolution } from '../../../shared/terminal/runtime-terminal-file-path' import { parseWslPath } from '../../wsl/filesystem/unc-path-access' -import { relativePathInsideRoot, resolveRuntimePath } from '../../../shared/cross-platform-path' +import { + relativePathInsideRoot, + resolveRuntimePath +} from '../../../shared/file-access/cross-platform-path' import { homedir } from 'node:os' import { resolveTerminalAbsolutePath } from './terminal-file-path' import { requireRuntimeFileProvider, runtimeFileRouteForTarget } from '../files/file-target' diff --git a/src/main/runtime/workspaces/catalog/runtime-workspace-catalog-events.ts b/src/main/runtime/workspaces/catalog/runtime-workspace-catalog-events.ts index 26eda032206..c6c91ce0234 100644 --- a/src/main/runtime/workspaces/catalog/runtime-workspace-catalog-events.ts +++ b/src/main/runtime/workspaces/catalog/runtime-workspace-catalog-events.ts @@ -1,6 +1,6 @@ import { getRepoRoutingConnectionId } from '../../../../shared/execution-host' import type { Repo } from '../../../../shared/repository/repo-types' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { composeWorktreeId } from '../../../../shared/worktree/id' import type { PullRequestChange } from '../../../github/pull-requests/refresh/pull-request-changed-events' import { OrcaRuntimeWithGetStatus } from '../../hosts/runtime-status' diff --git a/src/main/runtime/workspaces/catalog/runtime-worktree-path-identity.ts b/src/main/runtime/workspaces/catalog/runtime-worktree-path-identity.ts index 07e641a7e99..d8467d6dcc6 100644 --- a/src/main/runtime/workspaces/catalog/runtime-worktree-path-identity.ts +++ b/src/main/runtime/workspaces/catalog/runtime-worktree-path-identity.ts @@ -4,7 +4,7 @@ import type { GitWorktreeInfo, Worktree } from '../../../../shared/worktree/type import { isPathInsideOrEqual, normalizeRuntimePathForComparison -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' import { parsePtySessionId } from '../../../../shared/terminal/pty/lifecycle/pty-session-id-format' import { splitWorktreeId, diff --git a/src/main/runtime/workspaces/catalog/stale-worktree-registration-preflight.ts b/src/main/runtime/workspaces/catalog/stale-worktree-registration-preflight.ts index a2a9f4e5c38..1de15cf7c81 100644 --- a/src/main/runtime/workspaces/catalog/stale-worktree-registration-preflight.ts +++ b/src/main/runtime/workspaces/catalog/stale-worktree-registration-preflight.ts @@ -5,7 +5,7 @@ import { assertWorktreeUnlockedForRemoval } from '../../../../shared/worktree/re import { formatWorktreeRemovalError } from '../../../ipc/worktree-logic' import { usesNativeWindowsRemoval } from '../../../git/worktrees/removal/windows-worktree-removal' import { isPrunableGitFileWorktree } from '../../../workspaces/removal/worktree-prunable-git-file' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { isLocalRuntimeWorktreePathMissing } from './runtime-worktree-filesystem' export async function isStaleLocalWorktreeRegistration( diff --git a/src/main/runtime/workspaces/catalog/workspace-catalog.ts b/src/main/runtime/workspaces/catalog/workspace-catalog.ts index f045bfc8748..c93bcd93fc8 100644 --- a/src/main/runtime/workspaces/catalog/workspace-catalog.ts +++ b/src/main/runtime/workspaces/catalog/workspace-catalog.ts @@ -2,7 +2,7 @@ import { OrcaRuntimeWithReadKittyFile } from '../../files/paths/orca-runtime-rea import type { RuntimeWorkspaceRepoScanRefresh } from './workspace-repo-scan-refresh' import type { ResolvedWorktree } from './runtime-worktree-path-identity' import { splitWorktreeIdForFilesystem } from '../../../../shared/worktree/id' -import { isPathInsideOrEqual } from '../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../shared/file-access/cross-platform-path' import type { ResolvedWorktreeSnapshot } from './runtime-resolved-worktree-cache' import { createRepoRowExecutionHostLookup } from '../../../../shared/execution-host/worktree-execution-host-resolution' diff --git a/src/main/runtime/workspaces/process-listing/runtime-worktree-summary-paths.ts b/src/main/runtime/workspaces/process-listing/runtime-worktree-summary-paths.ts index 5b028d73658..c4833b2f9db 100644 --- a/src/main/runtime/workspaces/process-listing/runtime-worktree-summary-paths.ts +++ b/src/main/runtime/workspaces/process-listing/runtime-worktree-summary-paths.ts @@ -1,5 +1,5 @@ import type { RuntimeWorktreePsSummary } from '../../../../shared/worktree/catalog/runtime-worktree-contracts' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { worktreePathComparisonKey } from '../../../workspaces/catalog/worktree-path-comparison-key' import { parseRuntimeWorktreeId } from '../catalog/runtime-worktree-path-identity' import { diff --git a/src/main/runtime/workspaces/references/runtime-reference-catalog.ts b/src/main/runtime/workspaces/references/runtime-reference-catalog.ts index 229a7dcd731..28378b69d8c 100644 --- a/src/main/runtime/workspaces/references/runtime-reference-catalog.ts +++ b/src/main/runtime/workspaces/references/runtime-reference-catalog.ts @@ -20,7 +20,7 @@ import { isPathInsideOrEqual, isWslUncPathForCallerLinuxPath, isWslUncPathForLinuxMountedPath -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' import { parseWslUncPath } from '../../../../shared/file-access/wsl-paths' import { branchSelectorMatches, runtimePathsEqual } from '../catalog/runtime-worktree-path-identity' diff --git a/src/main/source-control/forge-review-mappers.ts b/src/main/source-control/forge-review-mappers.ts index be4598a8070..0e43c26975a 100644 --- a/src/main/source-control/forge-review-mappers.ts +++ b/src/main/source-control/forge-review-mappers.ts @@ -1,7 +1,7 @@ import type { HostedReviewInfo } from '../../shared/source-control/hosted-review/hosted-review-contracts' import { hostedReviewInfoFromGitHubPRInfo } from '../../shared/source-control/hosted-review/hosted-review-github' import type { PRInfo } from '../../shared/github/pull-requests/pull-request-types' -import type { MRInfo } from '../../shared/gitlab-types' +import type { MRInfo } from '../../shared/gitlab/gitlab-types' import type { AzureDevOpsPullRequestInfo } from '../azure-devops/pull-request-mappers' import type { BitbucketPullRequestInfo } from '../bitbucket/pull-request-mappers' import type { GiteaPullRequestInfo } from '../gitea/pull-request-mappers' diff --git a/src/main/source-control/hosted-review-branch-cache.ts b/src/main/source-control/hosted-review-branch-cache.ts index 825c9e81624..fd2a0443d7e 100644 --- a/src/main/source-control/hosted-review-branch-cache.ts +++ b/src/main/source-control/hosted-review-branch-cache.ts @@ -46,7 +46,7 @@ import { noteFailure } from './hosted-review-lookup-backoff' import { observeProviderRead } from './hosted-review-provider-read' -import { scaleReviewRefreshInterval } from '../../shared/review-refresh-policy' +import { scaleReviewRefreshInterval } from '../../shared/source-control/hosted-review/review-refresh-policy' import { ACTIVE_REFRESH_INTERVAL_MS, HOSTED_REVIEW_LOOKUP_DEADLINE_MS, diff --git a/src/main/sqlite/row-cache/legacy-json-source.ts b/src/main/sqlite/row-cache/legacy-json-source.ts index 7c5e4e2b7c6..8decc3b1a82 100644 --- a/src/main/sqlite/row-cache/legacy-json-source.ts +++ b/src/main/sqlite/row-cache/legacy-json-source.ts @@ -1,6 +1,6 @@ import { createHash } from 'node:crypto' import { readFileSync, rmSync } from 'node:fs' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' /** A JSON file an older build may have written, before its rows moved into SQLite. */ export type LegacyJsonSource = diff --git a/src/main/ssh/legacy-relay/cli/legacy-relay-cli-args.ts b/src/main/ssh/legacy-relay/cli/legacy-relay-cli-args.ts index 9bff2cf70ca..2bea4816600 100644 --- a/src/main/ssh/legacy-relay/cli/legacy-relay-cli-args.ts +++ b/src/main/ssh/legacy-relay/cli/legacy-relay-cli-args.ts @@ -2,7 +2,7 @@ * Reads the argv an older relay forwards for one `orca` command run in its terminal. * COMPAT(legacy-relay-bridge): revisit 2027-01-15. */ -import { CLI_BOOLEAN_FLAGS } from '../../../../shared/cli-argument-boundary' +import { CLI_BOOLEAN_FLAGS } from '../../../../shared/cli/cli-argument-boundary' import { isOrchestrationRetryRequestId, RETRY_REQUEST_ID_GUIDANCE diff --git a/src/main/star-nag/app-star-source.ts b/src/main/star-nag/app-star-source.ts index 1923d115588..dbaf581bd6c 100644 --- a/src/main/star-nag/app-star-source.ts +++ b/src/main/star-nag/app-star-source.ts @@ -1,4 +1,4 @@ -import type { AppStarSource } from '../../shared/gh-star-source' +import type { AppStarSource } from '../../shared/github/repositories/gh-star-source' import type { StarNagPromptSource } from '../../shared/telemetry/star-nag-telemetry' export function getStarNagAppStarSource(source: StarNagPromptSource): AppStarSource { diff --git a/src/main/startup/cli-launch/cli-launch-redirect.ts b/src/main/startup/cli-launch/cli-launch-redirect.ts index 04b3ed517a0..3b1d44d50f1 100644 --- a/src/main/startup/cli-launch/cli-launch-redirect.ts +++ b/src/main/startup/cli-launch/cli-launch-redirect.ts @@ -1,7 +1,7 @@ import { existsSync } from 'node:fs' import { posix, resolve, win32 } from 'node:path' import { runProcessSync } from '@orca/process-host' -import { CLI_BOOLEAN_FLAGS, findCliCommandIndex } from '../../../shared/cli-argument-boundary' +import { CLI_BOOLEAN_FLAGS, findCliCommandIndex } from '../../../shared/cli/cli-argument-boundary' import { ELECTRON_NO_SANDBOX_REQUEST_ENV } from '../../../shared/app-lifecycle/launch/electron-no-sandbox-request' import { CLI_COMMAND_NAMES } from './cli-command-names' import { reexecHeadlessServeOnX11IfNeeded } from '../serve-launch/headless-serve-x11-reexec' diff --git a/src/main/text-generation/execution/source-control-local-generation.ts b/src/main/text-generation/execution/source-control-local-generation.ts index 9ef580718ab..dad81ca0a69 100644 --- a/src/main/text-generation/execution/source-control-local-generation.ts +++ b/src/main/text-generation/execution/source-control-local-generation.ts @@ -1,5 +1,5 @@ import { wslDistroForCommand } from '../../../shared/file-access/wsl-paths' -import { mergeCommandEnvironment } from '../../../shared/command-environment' +import { mergeCommandEnvironment } from '../../../shared/shell/launch/command-environment' import type { CommitMessagePlan } from '../../../shared/source-control/ai/generation/commit-message-plan' import { resolveCodexHomeProcessLockKeyForSpawnEnv, diff --git a/src/main/text-generation/failures/copilot-unavailable-model-retry.ts b/src/main/text-generation/failures/copilot-unavailable-model-retry.ts index 79411500e2d..f82b49eee80 100644 --- a/src/main/text-generation/failures/copilot-unavailable-model-retry.ts +++ b/src/main/text-generation/failures/copilot-unavailable-model-retry.ts @@ -1,4 +1,4 @@ -import { findOptionOccurrence } from '../../../shared/command-option-occurrence' +import { findOptionOccurrence } from '../../../shared/cli/command-option-occurrence' import type { CommitMessagePlan } from '../../../shared/source-control/ai/generation/commit-message-plan' import { escapeRegex } from '../../../shared/text/regex-escaping' import type { AgentGenerationFailureOutput } from './agent-failure-output' diff --git a/src/main/text-generation/models/commit-message-model-discovery.ts b/src/main/text-generation/models/commit-message-model-discovery.ts index 485cebc6e26..81500927fdb 100644 --- a/src/main/text-generation/models/commit-message-model-discovery.ts +++ b/src/main/text-generation/models/commit-message-model-discovery.ts @@ -1,5 +1,5 @@ import { isMissingProviderExecutable } from '../../provider-process/provider-executable-missing' -import { mergeCommandEnvironment } from '../../../shared/command-environment' +import { mergeCommandEnvironment } from '../../../shared/shell/launch/command-environment' import type { CommandTemplateBackslash } from '../../../shared/source-control/ai/generation/commit-message-prompt' import { getAgentModelProbeSpec, diff --git a/src/main/text-generation/policies/source-control-kimi-policy.ts b/src/main/text-generation/policies/source-control-kimi-policy.ts index c64f2d18f96..fad9b7304c8 100644 --- a/src/main/text-generation/policies/source-control-kimi-policy.ts +++ b/src/main/text-generation/policies/source-control-kimi-policy.ts @@ -1,6 +1,6 @@ import { parse as parseYaml, stringify as stringifyYaml } from 'yaml' import { z } from 'zod' -import { findOptionOccurrence } from '../../../shared/command-option-occurrence' +import { findOptionOccurrence } from '../../../shared/cli/command-option-occurrence' import { compactRecipeOptions, KIMI_VALUE_OPTIONS diff --git a/src/main/text-generation/policies/source-control-policy-probe.ts b/src/main/text-generation/policies/source-control-policy-probe.ts index c59c1fb7d42..f622e962a7c 100644 --- a/src/main/text-generation/policies/source-control-policy-probe.ts +++ b/src/main/text-generation/policies/source-control-policy-probe.ts @@ -1,5 +1,5 @@ import { abortSignalReason } from '../../../shared/concurrency/abort-signal-reason' -import { mergeCommandEnvironment } from '../../../shared/command-environment' +import { mergeCommandEnvironment } from '../../../shared/shell/launch/command-environment' import type { CommitMessagePlan } from '../../../shared/source-control/ai/generation/commit-message-plan' import { killSourceControlAgentProcess } from '../execution/source-control-agent-termination' import { MAX_SOURCE_CONTROL_AGENT_OUTPUT_BYTES } from '../execution/source-control-generation-limits' diff --git a/src/main/text-generation/policies/source-control-read-only-policy.ts b/src/main/text-generation/policies/source-control-read-only-policy.ts index 36e23615a25..13f332c59e0 100644 --- a/src/main/text-generation/policies/source-control-read-only-policy.ts +++ b/src/main/text-generation/policies/source-control-read-only-policy.ts @@ -4,7 +4,7 @@ import path from 'node:path' import { prepareKimiTextTaskPolicy } from './source-control-kimi-policy' import { parse as parseJson, type ParseError } from 'jsonc-parser' import { z } from 'zod' -import { findOptionOccurrence } from '../../../shared/command-option-occurrence' +import { findOptionOccurrence } from '../../../shared/cli/command-option-occurrence' import { compactRecipeOptions, KIMI_VALUE_OPTIONS diff --git a/src/main/text-generation/pull-request-context/pull-request-context.ts b/src/main/text-generation/pull-request-context/pull-request-context.ts index 152d97d772e..7ff9ad0fd62 100644 --- a/src/main/text-generation/pull-request-context/pull-request-context.ts +++ b/src/main/text-generation/pull-request-context/pull-request-context.ts @@ -1,7 +1,7 @@ import type { PullRequestDraftContext } from '../../../shared/source-control/ai/generation/pull-request-generation' import { isSafeGitRefName } from '../../../shared/git/status/git-status-upstream-ref' -import { isSafeReviewHeadFetchRemote } from '../../../shared/review-head-tracking-ref' -import { ReviewDraftContextError } from '../../../shared/review-draft-context-error' +import { isSafeReviewHeadFetchRemote } from '../../../shared/worktree/hosted-review/review-head-tracking-ref' +import { ReviewDraftContextError } from '../../../shared/source-control/ai/generation/review-draft-context-error' import { canQueryRemoteBaseRefs, getPullRequestRemoteRefState, diff --git a/src/main/text-generation/pull-request-context/pull-request-remote-ref-probes.ts b/src/main/text-generation/pull-request-context/pull-request-remote-ref-probes.ts index af5680f1b94..677e9993237 100644 --- a/src/main/text-generation/pull-request-context/pull-request-remote-ref-probes.ts +++ b/src/main/text-generation/pull-request-context/pull-request-remote-ref-probes.ts @@ -1,6 +1,6 @@ import { isSafeGitRefName } from '../../../shared/git/status/git-status-upstream-ref' import { isRemoteHeadRef } from '../../../shared/source-control/hosted-review/hosted-review-refs' -import { isSafeReviewHeadFetchRemote } from '../../../shared/review-head-tracking-ref' +import { isSafeReviewHeadFetchRemote } from '../../../shared/worktree/hosted-review/review-head-tracking-ref' import { probeExactRefsViaForEachRef, type ExactRefProbeExecOptions diff --git a/src/main/window/clipboard/clipboard-remote-file-staging.ts b/src/main/window/clipboard/clipboard-remote-file-staging.ts index 114f5f8272a..19f71fcc0bd 100644 --- a/src/main/window/clipboard/clipboard-remote-file-staging.ts +++ b/src/main/window/clipboard/clipboard-remote-file-staging.ts @@ -8,7 +8,7 @@ import { removeOwnedDirectory, sweepExpiredOwnedDirectories } from '../../filesystem/owned-temp-staging-root' -import { isSafeOwnedDirectory } from '../../../shared/owned-private-directory' +import { isSafeOwnedDirectory } from '../../../shared/secure-storage/owned-private-directory' const REMOTE_CLIPBOARD_STAGING_ROOT_NAME = 'orca-clipboard-files' const REMOTE_CLIPBOARD_LEGACY_PREFIX = 'orca-clipboard-file-' diff --git a/src/main/workspace-hooks/create-source-setup-hooks.ts b/src/main/workspace-hooks/create-source-setup-hooks.ts index d8a874af493..8dbfe7d4f65 100644 --- a/src/main/workspace-hooks/create-source-setup-hooks.ts +++ b/src/main/workspace-hooks/create-source-setup-hooks.ts @@ -1,6 +1,6 @@ import type { Repo } from '../../shared/repository/repo-types' -import type { OrcaHooks } from '../../shared/orca-yaml-hook-types' -import { parseOrcaYaml } from '../../shared/orca-yaml' +import type { OrcaHooks } from '../../shared/workspace-setup/orca-yaml-hook-types' +import { parseOrcaYaml } from '../../shared/workspace-setup/orca-yaml' import { scopeHooksToRepoKind } from '../../shared/folder-workspace-hooks' import { isFolderRepo } from '../../shared/repository/repo-kind' import { resolveWorktreeAddBaseRef } from '../../shared/worktree/base-refs/base-ref' diff --git a/src/main/workspace-hooks/created-worktree-setup-trust.ts b/src/main/workspace-hooks/created-worktree-setup-trust.ts index e81220a5770..a05ad76bd94 100644 --- a/src/main/workspace-hooks/created-worktree-setup-trust.ts +++ b/src/main/workspace-hooks/created-worktree-setup-trust.ts @@ -1,7 +1,7 @@ import { createHash } from 'node:crypto' -import { resolveHookCommandSourcePolicy } from '../../shared/hook-command-source-policy' -import { getSetupTrustContent } from '../../shared/orca-hook-setup-config' -import type { OrcaHooks } from '../../shared/orca-yaml-hook-types' +import { resolveHookCommandSourcePolicy } from '../../shared/workspace-setup/hooks/hook-command-source-policy' +import { getSetupTrustContent } from '../../shared/workspace-setup/hooks/orca-hook-setup-config' +import type { OrcaHooks } from '../../shared/workspace-setup/orca-yaml-hook-types' import type { WorkspaceHookOwner } from '../../shared/workspace-setup/hooks/workspace-hook-owner' import type { SetupDecision, SetupTrustMismatch } from '../../shared/worktree/create-types' import type { ApprovedSetupHashes } from '../../shared/worktree/creation/approved-setup-hashes' diff --git a/src/main/workspace-hooks/effective-hook-config.ts b/src/main/workspace-hooks/effective-hook-config.ts index bbe85b381ac..a53a2ffe55b 100644 --- a/src/main/workspace-hooks/effective-hook-config.ts +++ b/src/main/workspace-hooks/effective-hook-config.ts @@ -1,10 +1,10 @@ import { getDefaultRepoHookSettings } from '../../shared/constants' -import { resolveHookCommandSourcePolicy } from '../../shared/hook-command-source-policy' +import { resolveHookCommandSourcePolicy } from '../../shared/workspace-setup/hooks/hook-command-source-policy' import type { HookCommandSourcePolicy, OrcaHooks, SetupRunPolicy -} from '../../shared/orca-yaml-hook-types' +} from '../../shared/workspace-setup/orca-yaml-hook-types' import type { WorkspaceHookOwner } from '../../shared/workspace-setup/hooks/workspace-hook-owner' import type { SetupDecision } from '../../shared/worktree/create-types' import type { WorktreeDefaultTabsLaunch } from '../../shared/worktree/creation/launch-types' diff --git a/src/main/workspace-hooks/hooks.ts b/src/main/workspace-hooks/hooks.ts index 7ec1e146035..1383c990653 100644 --- a/src/main/workspace-hooks/hooks.ts +++ b/src/main/workspace-hooks/hooks.ts @@ -1,7 +1,7 @@ import { readFileSync, existsSync } from 'node:fs' import { join } from 'node:path' -import { parseOrcaYaml } from '../../shared/orca-yaml' -import { resolveHookCommandSourcePolicy } from '../../shared/hook-command-source-policy' +import { parseOrcaYaml } from '../../shared/workspace-setup/orca-yaml' +import { resolveHookCommandSourcePolicy } from '../../shared/workspace-setup/hooks/hook-command-source-policy' import { getEffectiveHooksFromConfig } from './effective-hook-config' import { getHookRuntimeTarget, getHookWslContext } from './hook-runtime-target' import { getSetupEnvVars, type HookWorkspaceIdentity } from './setup-hook-env-vars' @@ -13,7 +13,7 @@ import { toLinuxPath } from '../../shared/file-access/wsl-paths' import { runWslProcess } from '../wsl/execution/wsl-runner' import { windowsFsPath } from '../wsl/filesystem/wsl-unc-drive-fs-path' import type { HookRuntimeTarget } from './hook-runtime-target' -import type { OrcaHooks } from '../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../shared/workspace-setup/orca-yaml-hook-types' import type { WorkspaceHookOwner } from '../../shared/workspace-setup/hooks/workspace-hook-owner' import type { ProjectExecutionRuntimeResolution } from '../../shared/execution-host/project-execution-runtime' import { spawn } from 'node:child_process' diff --git a/src/main/workspace-hooks/setup-hook-env-vars.ts b/src/main/workspace-hooks/setup-hook-env-vars.ts index b1583ee5865..c814a81c07b 100644 --- a/src/main/workspace-hooks/setup-hook-env-vars.ts +++ b/src/main/workspace-hooks/setup-hook-env-vars.ts @@ -1,4 +1,4 @@ -import { getRuntimePathBasename } from '../../shared/cross-platform-path' +import { getRuntimePathBasename } from '../../shared/file-access/cross-platform-path' import { TERMINAL_GIT_CREDENTIAL_GUARD_POLICY_ENV } from '../../shared/shell/launch/terminal-git-credential-guard' import type { WorkspaceHookOwner } from '../../shared/workspace-setup/hooks/workspace-hook-owner' import { isFolderRepo } from '../../shared/repository/repo-kind' diff --git a/src/main/workspace-hooks/worktree-runner-script.ts b/src/main/workspace-hooks/worktree-runner-script.ts index 7793e6341e9..216d1c79dbd 100644 --- a/src/main/workspace-hooks/worktree-runner-script.ts +++ b/src/main/workspace-hooks/worktree-runner-script.ts @@ -33,7 +33,7 @@ import { buildPosixRunnerScript, buildWindowsRunnerScript } from './setup-runner import type { WorkspaceHookOwner } from '../../shared/workspace-setup/hooks/workspace-hook-owner' import type { WorktreeSetupLaunch } from '../../shared/worktree/creation/launch-types' -import type { SetupAgentStartupPolicy } from '../../shared/orca-yaml-hook-types' +import type { SetupAgentStartupPolicy } from '../../shared/workspace-setup/orca-yaml-hook-types' import type { ProjectExecutionRuntimeResolution } from '../../shared/execution-host/project-execution-runtime' type SetupRunnerShellSettings = Record | undefined diff --git a/src/main/workspaces/catalog/folder-repo-git-conversion.ts b/src/main/workspaces/catalog/folder-repo-git-conversion.ts index 02aa92034ed..24075b67ce6 100644 --- a/src/main/workspaces/catalog/folder-repo-git-conversion.ts +++ b/src/main/workspaces/catalog/folder-repo-git-conversion.ts @@ -11,7 +11,7 @@ import { } from '../../../shared/execution-host' import type { Store } from '../../persistence/loading-store/store' import { isFolderRepo } from '../../../shared/repository/repo-kind' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { getGitRepoRootAsync, isGitRepoAsync diff --git a/src/main/workspaces/catalog/project-realpath-identity.ts b/src/main/workspaces/catalog/project-realpath-identity.ts index 27c2523b8cf..2d1d227c110 100644 --- a/src/main/workspaces/catalog/project-realpath-identity.ts +++ b/src/main/workspaces/catalog/project-realpath-identity.ts @@ -1,5 +1,5 @@ import { realpath } from 'node:fs/promises' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' async function realpathKey(path: string): Promise { try { diff --git a/src/main/workspaces/catalog/provisioned-root-checkout.ts b/src/main/workspaces/catalog/provisioned-root-checkout.ts index 733cb11e086..37594d6a688 100644 --- a/src/main/workspaces/catalog/provisioned-root-checkout.ts +++ b/src/main/workspaces/catalog/provisioned-root-checkout.ts @@ -9,7 +9,7 @@ import type { } from '../../../shared/worktree/lineage-types' import type { WorktreeMeta } from '../../../shared/worktree/meta-types' import type { AutomationWorkspaceProvenance, GitWorktreeInfo } from '../../../shared/worktree/types' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { getProjectHostSetupWorktreeMeta } from '../../../shared/project/host-setup/project-host-setup-lookup' import { isTuiAgent } from '../../../shared/agent-launch/catalog/tui-agent-config' import { getWorktreeCreationLayout } from '../../ipc/worktree-logic' diff --git a/src/main/workspaces/catalog/worktree-owner-path-equivalence.ts b/src/main/workspaces/catalog/worktree-owner-path-equivalence.ts index a4eb15b34e0..4ba23ed73a1 100644 --- a/src/main/workspaces/catalog/worktree-owner-path-equivalence.ts +++ b/src/main/workspaces/catalog/worktree-owner-path-equivalence.ts @@ -1,5 +1,5 @@ import { type posix, win32 } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import type { WorktreeProofAccess } from '../removal/worktree-orphan-gitdir-proof' type PathOps = typeof posix diff --git a/src/main/workspaces/catalog/worktree-path-comparison-key.ts b/src/main/workspaces/catalog/worktree-path-comparison-key.ts index 0301653c45b..1e4fb29232c 100644 --- a/src/main/workspaces/catalog/worktree-path-comparison-key.ts +++ b/src/main/workspaces/catalog/worktree-path-comparison-key.ts @@ -1,5 +1,5 @@ import { win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../shared/file-access/cross-platform-path' import { canonicalWorktreePath, looksLikePosixAbsolutePath diff --git a/src/main/workspaces/creation/preparation/worktree-create-preparation-claim.ts b/src/main/workspaces/creation/preparation/worktree-create-preparation-claim.ts index bc78c135452..6153d8946d6 100644 --- a/src/main/workspaces/creation/preparation/worktree-create-preparation-claim.ts +++ b/src/main/workspaces/creation/preparation/worktree-create-preparation-claim.ts @@ -1,5 +1,5 @@ import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { worktreeBaseRefFamily } from '../../../../shared/worktree/base-refs/base-ref' import type { PreparedCheckoutMissReason } from '../../../../shared/worktree/creation/create-timing-vocabulary' diff --git a/src/main/workspaces/creation/preparation/worktree-create-preparation-pool.ts b/src/main/workspaces/creation/preparation/worktree-create-preparation-pool.ts index 93b7c701997..2f83750bb78 100644 --- a/src/main/workspaces/creation/preparation/worktree-create-preparation-pool.ts +++ b/src/main/workspaces/creation/preparation/worktree-create-preparation-pool.ts @@ -10,7 +10,7 @@ import { worktreePreparationGit } from '../../../git/worktrees/creation/worktree import { randomUUID } from 'node:crypto' import { mkdir } from 'node:fs/promises' import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { WORKTREE_CREATE_PREPARATION_DIRECTORY, createWorktreePreparationLockReason diff --git a/src/main/workspaces/creation/preparation/worktree-create-preparation.ts b/src/main/workspaces/creation/preparation/worktree-create-preparation.ts index 6e21ae25d5a..0988c7facca 100644 --- a/src/main/workspaces/creation/preparation/worktree-create-preparation.ts +++ b/src/main/workspaces/creation/preparation/worktree-create-preparation.ts @@ -10,7 +10,7 @@ import { posix, win32 } from 'node:path' import type { ProjectRuntimeResolutionStore } from '../../execution-host/local-project-runtime-resolution' import type { Repo } from '../../../../shared/repository/repo-types' import { isFolderRepo } from '../../../../shared/repository/repo-kind' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import type { PreparedCheckoutMissReason, PreparedCheckoutOrigin, diff --git a/src/main/workspaces/execution-host/project-runtime-git-router.ts b/src/main/workspaces/execution-host/project-runtime-git-router.ts index ef4a082a7dc..26e2d12d6b1 100644 --- a/src/main/workspaces/execution-host/project-runtime-git-router.ts +++ b/src/main/workspaces/execution-host/project-runtime-git-router.ts @@ -8,7 +8,7 @@ */ import { win32 } from 'node:path' import { readFileSync, realpathSync, statSync } from 'node:fs' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { getRepoExecutionHostId, LOCAL_EXECUTION_HOST_ID } from '../../../shared/execution-host' import { resolveProjectExecutionRuntime } from '../../../shared/execution-host/project-execution-runtime' import type { GlobalSettings } from '../../../shared/global-settings-types' diff --git a/src/main/workspaces/removal/retirement/worktree-retirement-discovery.ts b/src/main/workspaces/removal/retirement/worktree-retirement-discovery.ts index 03cea1da257..f0993e79d16 100644 --- a/src/main/workspaces/removal/retirement/worktree-retirement-discovery.ts +++ b/src/main/workspaces/removal/retirement/worktree-retirement-discovery.ts @@ -2,7 +2,7 @@ import { claudeProfileHistoryDirs } from '../../../claude-accounts/profiles/rout import { homedir } from 'node:os' import { join } from 'node:path' import { isWslUncPath, parseWslUncPath } from '../../../../shared/file-access/wsl-paths' -import { relativePathInsideRoot } from '../../../../shared/cross-platform-path' +import { relativePathInsideRoot } from '../../../../shared/file-access/cross-platform-path' import { claudeProjectBucketNameBelowScope, mayBeHashedClaudeProjectBucketName diff --git a/src/main/workspaces/removal/watcher-removal-gate.ts b/src/main/workspaces/removal/watcher-removal-gate.ts index dd7eecdcb24..482918c84af 100644 --- a/src/main/workspaces/removal/watcher-removal-gate.ts +++ b/src/main/workspaces/removal/watcher-removal-gate.ts @@ -2,7 +2,7 @@ import { canonicalWorktreePath } from '../../git/worktrees/catalog/worktree-path import { isPathInsideOrEqual, normalizeRuntimePathForComparison -} from '../../../shared/cross-platform-path' +} from '../../../shared/file-access/cross-platform-path' import { TERMINAL_REMOVAL_IN_PROGRESS_MESSAGE, WATCHER_REMOVAL_IN_PROGRESS_MESSAGE diff --git a/src/main/workspaces/removal/worktree-orphan-gitdir-proof.ts b/src/main/workspaces/removal/worktree-orphan-gitdir-proof.ts index 1fa2de8f1a6..0f20ae7e70a 100644 --- a/src/main/workspaces/removal/worktree-orphan-gitdir-proof.ts +++ b/src/main/workspaces/removal/worktree-orphan-gitdir-proof.ts @@ -1,5 +1,5 @@ import type { posix } from 'node:path' -import { isDefinitiveAbsence } from '../../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../../shared/errors/definitive-filesystem-absence' import { resolveGitCommonDirectory } from '../../../shared/git/metadata/git-common-directory' import { areResolvedPathsEqual, diff --git a/src/main/workspaces/removal/worktree-removal-home-guard.ts b/src/main/workspaces/removal/worktree-removal-home-guard.ts index 8189a25f865..71aceea0471 100644 --- a/src/main/workspaces/removal/worktree-removal-home-guard.ts +++ b/src/main/workspaces/removal/worktree-removal-home-guard.ts @@ -2,7 +2,7 @@ import { homedir } from 'node:os' import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../shared/file-access/cross-platform-path' import { parseWslUncPath, toWindowsWslDrivePath } from '../../../shared/file-access/wsl-paths' export type PathOps = typeof posix diff --git a/src/main/wsl/filesystem/wsl-drive-unc-identity-rewrite.ts b/src/main/wsl/filesystem/wsl-drive-unc-identity-rewrite.ts index 49850e90db7..faa87b78702 100644 --- a/src/main/wsl/filesystem/wsl-drive-unc-identity-rewrite.ts +++ b/src/main/wsl/filesystem/wsl-drive-unc-identity-rewrite.ts @@ -5,7 +5,7 @@ * ids are rebuilt by the export's composite rewriters; user text is never touched. */ import { isDeepStrictEqual } from 'node:util' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { LOCAL_EXECUTION_HOST_ID, parseExecutionHostId } from '../../../shared/execution-host' import { PTY_SESSION_ID_SEPARATOR, diff --git a/src/main/wsl/filesystem/wsl-drive-unc-mounts.ts b/src/main/wsl/filesystem/wsl-drive-unc-mounts.ts index df51b9d6a9f..77560a94b7e 100644 --- a/src/main/wsl/filesystem/wsl-drive-unc-mounts.ts +++ b/src/main/wsl/filesystem/wsl-drive-unc-mounts.ts @@ -5,7 +5,7 @@ import { posix } from 'node:path' import { runProcess } from '@orca/process-host' import { buildPosixStdoutFence } from '../../../shared/shell/launch/posix-stdout-fence' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { buildWslExecArgs } from '../../../shared/shell/wsl/wsl-login-shell-command' import { wslUncPathToLinux } from '../../../shared/file-access/wsl-paths' import { parseWindowsDriveMountInfo, type WindowsDriveMount } from './wsl-guest-drive-mountinfo' diff --git a/src/main/wsl/filesystem/wsl-drive-unc-project-scope.ts b/src/main/wsl/filesystem/wsl-drive-unc-project-scope.ts index 98c44e54966..04ac67cb946 100644 --- a/src/main/wsl/filesystem/wsl-drive-unc-project-scope.ts +++ b/src/main/wsl/filesystem/wsl-drive-unc-project-scope.ts @@ -8,7 +8,7 @@ import { resolveFolderWorkspaceHost } from '../../../shared/folder-workspaces/fo import type { FolderWorkspace } from '../../../shared/folder-workspaces/folder-workspace-types' import type { ProjectGroup } from '../../../shared/project/groups/project-group-types' import type { Repo } from '../../../shared/repository/repo-types' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import { rewriteWorktreeIdPath } from '../../../shared/worktree/id' import { wslUncDrivePathToWindows } from '../../../shared/file-access/wsl-paths' diff --git a/src/main/zcode/hook-config-json.ts b/src/main/zcode/hook-config-json.ts index 28db782e71b..8f8ce21504c 100644 --- a/src/main/zcode/hook-config-json.ts +++ b/src/main/zcode/hook-config-json.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'node:fs' import { applyEdits, modify, parse as parseJsonc, type ParseError } from 'jsonc-parser' -import { isDefinitiveAbsence } from '../../shared/definitive-filesystem-absence' +import { isDefinitiveAbsence } from '../../shared/errors/definitive-filesystem-absence' import { isPlainObject } from '../agent-hooks/installation/configuration/hooks-json-read' import { isZCodeHooksEnabled, readZCodeEventMap, type ZCodeConfig } from './hook-settings' diff --git a/src/preload/api/agent-hooks/agent-hook-api.ts b/src/preload/api/agent-hooks/agent-hook-api.ts index 2aa5c83398e..0bc6f523e07 100644 --- a/src/preload/api/agent-hooks/agent-hook-api.ts +++ b/src/preload/api/agent-hooks/agent-hook-api.ts @@ -1,4 +1,4 @@ -import type { OrcaHooks } from '../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../shared/workspace-setup/orca-yaml-hook-types' import type { ExecutionHostId } from '../../../shared/execution-host' import type { SetupScriptImportCandidate } from '../../../shared/workspace-setup/setup-script-imports' import type { SetupHooksCreateSource } from '../../../shared/worktree/setup-hooks-create-source' diff --git a/src/preload/api/automations/automation-api.ts b/src/preload/api/automations/automation-api.ts index baf03d56aa6..a563fde1ba0 100644 --- a/src/preload/api/automations/automation-api.ts +++ b/src/preload/api/automations/automation-api.ts @@ -4,7 +4,7 @@ import type { AutomationOwnerRef } from '../../../shared/automations/ownership/a import type { ScopedExternalManagerActionRequest, ScopedExternalManagerListRequest -} from '../../../shared/external-automation-scope' +} from '../../../shared/automations/external/external-automation-scope' import type { AutomationsChangedPayload } from '../../../shared/remote-runtime/session-graph/runtime-client-events' export type ExternalAutomationManagerResult = { diff --git a/src/preload/api/automations/automations-bridge.ts b/src/preload/api/automations/automations-bridge.ts index b50ba8282cd..599a8ac815f 100644 --- a/src/preload/api/automations/automations-bridge.ts +++ b/src/preload/api/automations/automations-bridge.ts @@ -6,7 +6,7 @@ import type { AutomationOwnerRef } from '../../../shared/automations/ownership/a import type { ScopedExternalManagerActionRequest, ScopedExternalManagerListRequest -} from '../../../shared/external-automation-scope' +} from '../../../shared/automations/external/external-automation-scope' import type { AutomationsChangedPayload } from '../../../shared/remote-runtime/session-graph/runtime-client-events' export const automationsApi = { diff --git a/src/preload/api/cloud-workspaces/ephemeral-vm-api.ts b/src/preload/api/cloud-workspaces/ephemeral-vm-api.ts index d51b2c8beaf..d02c423fb05 100644 --- a/src/preload/api/cloud-workspaces/ephemeral-vm-api.ts +++ b/src/preload/api/cloud-workspaces/ephemeral-vm-api.ts @@ -1,4 +1,4 @@ -import type { OrcaHooks } from '../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../shared/workspace-setup/orca-yaml-hook-types' import type { PublicKnownRuntimeEnvironment } from '../../../shared/remote-runtime/host-catalog/runtime-environments' import type { EphemeralVmRecipeDoctorResult } from '../../../shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipes' import type { EphemeralVmRecipeResultWarning } from '../../../shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-diagnostics' diff --git a/src/preload/api/filesystem/filesystem-api.ts b/src/preload/api/filesystem/filesystem-api.ts index 28fa0a97d4d..27c232910e3 100644 --- a/src/preload/api/filesystem/filesystem-api.ts +++ b/src/preload/api/filesystem/filesystem-api.ts @@ -18,7 +18,7 @@ import type { LocalLogTailReadArgs, LocalLogTailReadResult, LocalLogTailWatchArgs -} from '../../../shared/local-log-tail-types' +} from '../../../shared/file-content/local-log-tail-types' import type { SshMutationExpectation } from '../../../shared/remote-runtime/ssh/ssh-types' import type { LocalFileAccess } from '../../../shared/file-access/local-file-access' import type { RemoteFilePreviewAddress } from '../../../shared/file-preview/remote-file-preview-address' diff --git a/src/preload/api/filesystem/fs-bridge.ts b/src/preload/api/filesystem/fs-bridge.ts index 8948eb617ae..8f8f838779c 100644 --- a/src/preload/api/filesystem/fs-bridge.ts +++ b/src/preload/api/filesystem/fs-bridge.ts @@ -31,7 +31,7 @@ import type { LocalLogTailReadArgs, LocalLogTailReadResult, LocalLogTailWatchArgs -} from '../../../shared/local-log-tail-types' +} from '../../../shared/file-content/local-log-tail-types' import type { PreloadApi } from '../../api-types' export const fsApi = { diff --git a/src/preload/api/github/gh-bridge-mutations-and-projects.ts b/src/preload/api/github/gh-bridge-mutations-and-projects.ts index 9059845c61e..b764d0f606a 100644 --- a/src/preload/api/github/gh-bridge-mutations-and-projects.ts +++ b/src/preload/api/github/gh-bridge-mutations-and-projects.ts @@ -40,7 +40,7 @@ import type { UpdatePullRequestBySlugArgs, UpdateProjectItemFieldArgs } from '../../../shared/github/projects/project-request-types' -import type { AppStarSource } from '../../../shared/gh-star-source' +import type { AppStarSource } from '../../../shared/github/repositories/gh-star-source' import type { PreloadApi } from '../../api-types' export const ghMutationsAndProjectsApi = { diff --git a/src/preload/api/github/gh-bridge-pull-requests-and-work-items.ts b/src/preload/api/github/gh-bridge-pull-requests-and-work-items.ts index 84eecda2534..9f6abc17281 100644 --- a/src/preload/api/github/gh-bridge-pull-requests-and-work-items.ts +++ b/src/preload/api/github/gh-bridge-pull-requests-and-work-items.ts @@ -11,7 +11,7 @@ import type { GitHubWorkItem, ListWorkItemsResult } from '../../../shared/github/work-items/work-item-types' -import type { GitHubCreateIssueResult } from '../../../shared/issue-mutation-types' +import type { GitHubCreateIssueResult } from '../../../shared/work-items/issue-mutation-types' import type { TaskSourceContext } from '../../../shared/work-items/task-source-context' import type { PreloadApi } from '../../api-types' diff --git a/src/preload/api/github/github-pull-request-api.ts b/src/preload/api/github/github-pull-request-api.ts index 0a56df1cf50..76be69939aa 100644 --- a/src/preload/api/github/github-pull-request-api.ts +++ b/src/preload/api/github/github-pull-request-api.ts @@ -1,5 +1,5 @@ import type { GhAccountBinding } from '../../../shared/github/accounts/account-binding' -import type { AppStarSource } from '../../../shared/gh-star-source' +import type { AppStarSource } from '../../../shared/github/repositories/gh-star-source' import type { GhAuthDiagnostic } from '../../../shared/github/accounts/auth-types' import type { TaskSourceContext } from '../../../shared/work-items/task-source-context' import type { PRCheckDetail, PRCheckRunDetails } from '../../../shared/github/checks/check-types' diff --git a/src/preload/api/github/github-work-item-api.ts b/src/preload/api/github/github-work-item-api.ts index e0ea5d23000..9fe92caa198 100644 --- a/src/preload/api/github/github-work-item-api.ts +++ b/src/preload/api/github/github-work-item-api.ts @@ -44,7 +44,7 @@ import type { import type { GitHubCreateIssueResult, GitHubIssueUpdate -} from '../../../shared/issue-mutation-types' +} from '../../../shared/work-items/issue-mutation-types' export type GitHubRepoSelectorArgs = { repoOwnerExecutionHostId?: string diff --git a/src/preload/api/gitlab/gitlab-api.ts b/src/preload/api/gitlab/gitlab-api.ts index c0380696f34..45eef421bff 100644 --- a/src/preload/api/gitlab/gitlab-api.ts +++ b/src/preload/api/gitlab/gitlab-api.ts @@ -1,5 +1,5 @@ import type { TaskSourceContext } from '../../../shared/work-items/task-source-context' -import type { ClassifiedError } from '../../../shared/classified-error' +import type { ClassifiedError } from '../../../shared/errors/classified-error' import type { GetGitLabRateLimitResult, GitLabAssignableUser, @@ -22,7 +22,7 @@ import type { ListMergeRequestsResult, MRInfo, MRListState -} from '../../../shared/gitlab-types' +} from '../../../shared/gitlab/gitlab-types' export type GitLabRepoSelectorArgs = { repoPath: string diff --git a/src/preload/api/gitlab/gitlab.ts b/src/preload/api/gitlab/gitlab.ts index 3ca2c858a9c..6aa2c359b48 100644 --- a/src/preload/api/gitlab/gitlab.ts +++ b/src/preload/api/gitlab/gitlab.ts @@ -1,5 +1,5 @@ import { ipcRenderer } from 'electron' -import type { GitLabMRInvolvement } from '../../../shared/gitlab-types' +import type { GitLabMRInvolvement } from '../../../shared/gitlab/gitlab-types' import type { TaskSourceContext } from '../../../shared/work-items/task-source-context' type GitLabRepoSelectorArgs = { diff --git a/src/preload/api/hosted-review/bitbucket-bridge.ts b/src/preload/api/hosted-review/bitbucket-bridge.ts index cf8138b9fa7..039db26c063 100644 --- a/src/preload/api/hosted-review/bitbucket-bridge.ts +++ b/src/preload/api/hosted-review/bitbucket-bridge.ts @@ -1,6 +1,6 @@ import { ipcRenderer } from 'electron' import type { PreloadApi } from '../../api-types' -import type { BitbucketConnectResult } from '../../../shared/bitbucket-credentials' +import type { BitbucketConnectResult } from '../../../shared/bitbucket/bitbucket-credentials' export const bitbucketApi = { connect: (args: { diff --git a/src/preload/api/hosted-review/hosted-review-api.ts b/src/preload/api/hosted-review/hosted-review-api.ts index a166bb0dfbf..82cf0ad1678 100644 --- a/src/preload/api/hosted-review/hosted-review-api.ts +++ b/src/preload/api/hosted-review/hosted-review-api.ts @@ -2,7 +2,7 @@ import type { BitbucketConnectArgs, BitbucketConnectResult, BitbucketConnectionStatus -} from '../../../shared/bitbucket-credentials' +} from '../../../shared/bitbucket/bitbucket-credentials' import type { CreateHostedReviewArgs, CreateHostedReviewResult, diff --git a/src/preload/api/work-items/linear-api.ts b/src/preload/api/work-items/linear-api.ts index 8aef8b05cf9..4b60fc07993 100644 --- a/src/preload/api/work-items/linear-api.ts +++ b/src/preload/api/work-items/linear-api.ts @@ -1,6 +1,6 @@ import type { RuntimeClientEvent } from '../../../shared/remote-runtime/session-graph/runtime-client-events' import type { LinearIssueAttributeFilter } from '../../../shared/linear/issue-attribute-filter' -import type { LinearIssueUpdate } from '../../../shared/issue-mutation-types' +import type { LinearIssueUpdate } from '../../../shared/work-items/issue-mutation-types' import type { LinearComment, LinearIssue } from '../../../shared/linear/issue-types' import type { LinearCustomViewModel, diff --git a/src/renderer/src/app-shell/use-visible-review-refresh-reporting.ts b/src/renderer/src/app-shell/use-visible-review-refresh-reporting.ts index 8115df6a38d..d9d863373dd 100644 --- a/src/renderer/src/app-shell/use-visible-review-refresh-reporting.ts +++ b/src/renderer/src/app-shell/use-visible-review-refresh-reporting.ts @@ -7,7 +7,7 @@ import { getHostedReviewCacheKey } from '../store/slices/hosted-review/hosted-re import { getVisibleHostedReviewWorkspaces } from '../store/slices/hosted-review/refresh/visible-hosted-review-refresh-targets' import { shouldCoordinateVisibleGitHubReview } from '../store/slices/hosted-review/refresh/visible-hosted-review-refresh-ownership' import { getPRRefreshRuntimeRepoTarget } from '../store/github/repositories/repository-routing' -import { reviewForegroundFreshnessMs } from '../../../shared/review-refresh-policy' +import { reviewForegroundFreshnessMs } from '../../../shared/source-control/hosted-review/review-refresh-policy' import { selectDetectedWorktreesByRepo, selectWorktreesByRepo diff --git a/src/renderer/src/components/GitLabItemDialog.test.tsx b/src/renderer/src/components/GitLabItemDialog.test.tsx index 1f9c3b90364..873c61c5d15 100644 --- a/src/renderer/src/components/GitLabItemDialog.test.tsx +++ b/src/renderer/src/components/GitLabItemDialog.test.tsx @@ -2,7 +2,7 @@ import { cleanup, render, screen, waitFor } from '@testing-library/react' import { afterEach, describe, expect, it, vi } from 'vitest' -import type { GitLabWorkItem, GitLabWorkItemDetails } from '../../../shared/gitlab-types' +import type { GitLabWorkItem, GitLabWorkItemDetails } from '../../../shared/gitlab/gitlab-types' import type { TaskSourceContext } from '../../../shared/work-items/task-source-context' import GitLabItemDialog from './GitLabItemDialog' diff --git a/src/renderer/src/components/automations/authoring/AutomationEditorDialog.tsx b/src/renderer/src/components/automations/authoring/AutomationEditorDialog.tsx index 886c4d57815..c1952ea4052 100644 --- a/src/renderer/src/components/automations/authoring/AutomationEditorDialog.tsx +++ b/src/renderer/src/components/automations/authoring/AutomationEditorDialog.tsx @@ -21,7 +21,7 @@ import type { AutomationWorkspaceMode } from '../../../../../shared/automations/automation-definition' import type { GlobalSettings } from '../../../../../shared/global-settings-types' -import type { OrcaHooks } from '../../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { ProjectHostSetup } from '../../../../../shared/project/project-types' import type { Repo } from '../../../../../shared/repository/repo-types' import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent' diff --git a/src/renderer/src/components/automations/authoring/AutomationEditorSettingsSidebar.tsx b/src/renderer/src/components/automations/authoring/AutomationEditorSettingsSidebar.tsx index 8b4c9824bd9..2857e62d3f1 100644 --- a/src/renderer/src/components/automations/authoring/AutomationEditorSettingsSidebar.tsx +++ b/src/renderer/src/components/automations/authoring/AutomationEditorSettingsSidebar.tsx @@ -4,7 +4,7 @@ import type { ProspectiveWorkspace } from '@/lib/agent-session/launch/routing/ag import { useTranslate } from '@/i18n/use-translate' import { isValidAutomationSchedule } from '../../../../../shared/automations/scheduling/automation-schedule-parsing' import type { GlobalSettings } from '../../../../../shared/global-settings-types' -import type { OrcaHooks } from '../../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { ProjectHostSetup } from '../../../../../shared/project/project-types' import type { Repo } from '../../../../../shared/repository/repo-types' import type { Worktree } from '../../../../../shared/worktree/types' diff --git a/src/renderer/src/components/automations/authoring/AutomationSetupDecisionField.tsx b/src/renderer/src/components/automations/authoring/AutomationSetupDecisionField.tsx index 91436cebcf2..5f914818ce3 100644 --- a/src/renderer/src/components/automations/authoring/AutomationSetupDecisionField.tsx +++ b/src/renderer/src/components/automations/authoring/AutomationSetupDecisionField.tsx @@ -5,7 +5,7 @@ import { cn } from '@/lib/class-names' import { useTranslate } from '@/i18n/use-translate' import { getVisibleAutomationSetupDecision } from './automation-setup-decision' import type { AutomationDraft } from './AutomationEditorDialog' -import type { OrcaHooks } from '../../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { ProjectHostSetup } from '../../../../../shared/project/project-types' import type { Repo } from '../../../../../shared/repository/repo-types' diff --git a/src/renderer/src/components/automations/authoring/automation-setup-decision.ts b/src/renderer/src/components/automations/authoring/automation-setup-decision.ts index 31f5763d89f..4cf5225dfb9 100644 --- a/src/renderer/src/components/automations/authoring/automation-setup-decision.ts +++ b/src/renderer/src/components/automations/authoring/automation-setup-decision.ts @@ -1,13 +1,16 @@ import { getAutomationSetupDefaultDecision } from '../../../../../shared/automations/launch/automation-setup-decision' import type { AutomationWorkspaceMode } from '../../../../../shared/automations/automation-definition' -import type { OrcaHooks, SetupRunPolicy } from '../../../../../shared/orca-yaml-hook-types' +import type { + OrcaHooks, + SetupRunPolicy +} from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { ProjectHostSetup } from '../../../../../shared/project/project-types' import type { Repo } from '../../../../../shared/repository/repo-types' import type { SetupDecision } from '../../../../../shared/worktree/create-types' import { findAutomationRepo } from '../../../../../shared/automations/ownership/automation-repo-target' import { getRepoExecutionHostId } from '../../../../../shared/execution-host' -import { getSetupConfig } from '../../../../../shared/orca-hook-setup-config' +import { getSetupConfig } from '../../../../../shared/workspace-setup/hooks/orca-hook-setup-config' type AutomationSetupSource = { setupScript: string diff --git a/src/renderer/src/components/automations/authoring/use-automations-page-setup-state.ts b/src/renderer/src/components/automations/authoring/use-automations-page-setup-state.ts index 3165a7fc94c..077bd9da2b5 100644 --- a/src/renderer/src/components/automations/authoring/use-automations-page-setup-state.ts +++ b/src/renderer/src/components/automations/authoring/use-automations-page-setup-state.ts @@ -1,5 +1,5 @@ import { useCallback, useMemo } from 'react' -import type { OrcaHooks } from '../../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import { checkRuntimeHooks } from '@/runtime/repo-hooks/runtime-hooks-client' import type { AutomationDraft } from './AutomationEditorDialog' import { diff --git a/src/renderer/src/components/automations/external/external-automation-scope-client.ts b/src/renderer/src/components/automations/external/external-automation-scope-client.ts index b98661be8b2..b56421e4d4d 100644 --- a/src/renderer/src/components/automations/external/external-automation-scope-client.ts +++ b/src/renderer/src/components/automations/external/external-automation-scope-client.ts @@ -6,7 +6,7 @@ import type { ExternalAutomationProvider } from '../../../../../shared/automations/external/external-automation' import type { AutomationOwnerRef } from '../../../../../shared/automations/ownership/automation-owner-ref' -import { EXTERNAL_AUTOMATION_PROVIDERS } from '../../../../../shared/external-automation-scope' +import { EXTERNAL_AUTOMATION_PROVIDERS } from '../../../../../shared/automations/external/external-automation-scope' import type { AutomationHostCatalogEntry } from '../hosts/automation-host-catalog-types' import { resolveExternalAutomationScopeGate } from './external-automation-scope-gating' diff --git a/src/renderer/src/components/automations/external/external-automation-scope-gating.ts b/src/renderer/src/components/automations/external/external-automation-scope-gating.ts index 300b86aa86a..a3848ff8587 100644 --- a/src/renderer/src/components/automations/external/external-automation-scope-gating.ts +++ b/src/renderer/src/components/automations/external/external-automation-scope-gating.ts @@ -3,7 +3,7 @@ import { EXTERNAL_AUTOMATION_SCOPE_CODES, type ExternalAutomationScopeCode -} from '../../../../../shared/external-automation-scope' +} from '../../../../../shared/automations/external/external-automation-scope' import type { AutomationOwnerRef } from '../../../../../shared/automations/ownership/automation-owner-ref' import type { AutomationHostCatalogEntry } from '../hosts/automation-host-catalog-types' import type { AutomationHostFilterResolution } from '../hosts/automation-host-filter-resolution' diff --git a/src/renderer/src/components/automations/use-automations-page-local-state.ts b/src/renderer/src/components/automations/use-automations-page-local-state.ts index 65011a2c169..f13133028fb 100644 --- a/src/renderer/src/components/automations/use-automations-page-local-state.ts +++ b/src/renderer/src/components/automations/use-automations-page-local-state.ts @@ -4,7 +4,7 @@ import type { ExternalAutomationJob, ExternalAutomationManager } from '../../../../shared/automations/external/external-automation' -import type { OrcaHooks } from '../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../shared/workspace-setup/orca-yaml-hook-types' import { useContextualTour } from '@/components/contextual-tours/use-contextual-tour' import type { AutomationDraft } from './authoring/AutomationEditorDialog' import { AUTOMATION_DEFAULT_TIME } from './authoring/automation-draft-model' diff --git a/src/renderer/src/components/browser-pane/describe-page/browser-artifact-upload.ts b/src/renderer/src/components/browser-pane/describe-page/browser-artifact-upload.ts index 8d7dbc300f3..1f0500f4dc4 100644 --- a/src/renderer/src/components/browser-pane/describe-page/browser-artifact-upload.ts +++ b/src/renderer/src/components/browser-pane/describe-page/browser-artifact-upload.ts @@ -1,6 +1,6 @@ import type { ArtifactWriteRequest } from '../../../../../shared/artifacts/artifacts' import { ARTIFACT_MAX_CONTENT_BYTES } from '../../../../../shared/artifacts/artifacts' -import { getRuntimePathBasename } from '../../../../../shared/cross-platform-path' +import { getRuntimePathBasename } from '../../../../../shared/file-access/cross-platform-path' import { ArtifactPublishPreparationError } from '@/components/artifacts/artifact-publish-flow' import { canonicalArtifactFilePath, diff --git a/src/renderer/src/components/browser-pane/workspace-doc/doc-preview-artifact-share.tsx b/src/renderer/src/components/browser-pane/workspace-doc/doc-preview-artifact-share.tsx index ce4ab640896..23e3f7d5184 100644 --- a/src/renderer/src/components/browser-pane/workspace-doc/doc-preview-artifact-share.tsx +++ b/src/renderer/src/components/browser-pane/workspace-doc/doc-preview-artifact-share.tsx @@ -19,7 +19,7 @@ import { isWindowsAbsolutePathLike, normalizeRuntimePathForComparison, relativePathInsideRoot -} from '../../../../../shared/cross-platform-path' +} from '../../../../../shared/file-access/cross-platform-path' import type { RuntimeFilePreviewResult } from '../../../../../shared/file-content/runtime-file-read' import { acquireTerminalArtifactGrant, diff --git a/src/renderer/src/components/cmd-j/task-search-results.ts b/src/renderer/src/components/cmd-j/task-search-results.ts index b673e94a50f..8ee23293e95 100644 --- a/src/renderer/src/components/cmd-j/task-search-results.ts +++ b/src/renderer/src/components/cmd-j/task-search-results.ts @@ -1,5 +1,5 @@ import type { GitHubWorkItem } from '../../../../shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import type { JiraIssue } from '../../../../shared/jira/jira-types' import type { LinearIssue } from '../../../../shared/linear/issue-types' import { diff --git a/src/renderer/src/components/editor/autosave/editor-autosave.ts b/src/renderer/src/components/editor/autosave/editor-autosave.ts index 0d09179ff5d..ba3bdde3498 100644 --- a/src/renderer/src/components/editor/autosave/editor-autosave.ts +++ b/src/renderer/src/components/editor/autosave/editor-autosave.ts @@ -1,5 +1,5 @@ import { joinPath } from '@/lib/path' -import { areLocalWindowsWslPathAliases } from '../../../../../shared/cross-platform-path' +import { areLocalWindowsWslPathAliases } from '../../../../../shared/file-access/cross-platform-path' import { externalChangePathKeyFor } from '@/store/slices/editor/buffers/editor-buffer-identity' import { isLocalWindowsDesktopClient } from '@/app-shell/chrome/desktop-window-chrome' import { diff --git a/src/renderer/src/components/editor/autosave/editor-non-utf8-autosave-pause.ts b/src/renderer/src/components/editor/autosave/editor-non-utf8-autosave-pause.ts index b372053093d..005c7471b04 100644 --- a/src/renderer/src/components/editor/autosave/editor-non-utf8-autosave-pause.ts +++ b/src/renderer/src/components/editor/autosave/editor-non-utf8-autosave-pause.ts @@ -1,7 +1,7 @@ import { toast } from 'sonner' import { translate } from '@/i18n/i18n' import { basename } from '@/lib/path' -import { normalizeRuntimePathForComparison as normalizeAbsolutePathForComparison } from '../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison as normalizeAbsolutePathForComparison } from '../../../../../shared/file-access/cross-platform-path' import type { OpenFile } from '@/store/slices/editor/types/open-file' type PausedFile = Pick diff --git a/src/renderer/src/components/editor/check-details/actions/check-annotation-path.ts b/src/renderer/src/components/editor/check-details/actions/check-annotation-path.ts index 98420538af3..0d4e55e1de8 100644 --- a/src/renderer/src/components/editor/check-details/actions/check-annotation-path.ts +++ b/src/renderer/src/components/editor/check-details/actions/check-annotation-path.ts @@ -2,7 +2,7 @@ import type { PRCheckAnnotation } from '../../../../../../shared/github/checks/c import { relativePathInsideRoot, resolveRuntimePath -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' const WORKFLOW_PSEUDO_ANNOTATION_PATH = '.github' diff --git a/src/renderer/src/components/editor/check-details/actions/check-run-details-tab.ts b/src/renderer/src/components/editor/check-details/actions/check-run-details-tab.ts index e4f7c4e1827..d88d6a46121 100644 --- a/src/renderer/src/components/editor/check-details/actions/check-run-details-tab.ts +++ b/src/renderer/src/components/editor/check-details/actions/check-run-details-tab.ts @@ -1,4 +1,4 @@ -import type { GitLabProjectRef } from '../../../../../../shared/gitlab-types' +import type { GitLabProjectRef } from '../../../../../../shared/gitlab/gitlab-types' import type { OpenCheckRunDetailsState } from '../../../../../../shared/editor/views/editor-tab-view-types' import type { PRCheckDetail } from '../../../../../../shared/github/checks/check-types' import type { GitHubRepositoryIdentity } from '../../../../../../shared/github/repositories/repository-identity' diff --git a/src/renderer/src/components/editor/combined-diff/load-sections/use-combined-diff-section-revalidation.ts b/src/renderer/src/components/editor/combined-diff/load-sections/use-combined-diff-section-revalidation.ts index 632396fccd9..68470458ff4 100644 --- a/src/renderer/src/components/editor/combined-diff/load-sections/use-combined-diff-section-revalidation.ts +++ b/src/renderer/src/components/editor/combined-diff/load-sections/use-combined-diff-section-revalidation.ts @@ -6,7 +6,7 @@ import { type EditorPathMutationTarget } from '../../autosave/editor-autosave' import { ORCA_WORKTREE_FILE_CHANGE_EVENT } from '@/hooks/worktree-file-change-event' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import { buildCombinedGitStatusSnapshot } from '../resolve-changes/combined-diff-git-status-signature' import { getCombinedDiffFileTreeSectionKey, diff --git a/src/renderer/src/components/editor/external-changes/editor-deleted-file-reload.ts b/src/renderer/src/components/editor/external-changes/editor-deleted-file-reload.ts index ce09f8a2fbb..fcb68f05720 100644 --- a/src/renderer/src/components/editor/external-changes/editor-deleted-file-reload.ts +++ b/src/renderer/src/components/editor/external-changes/editor-deleted-file-reload.ts @@ -5,7 +5,7 @@ import { WORKTREE_OWNER_NOT_READY_ERROR } from '../loading/editor-panel-content- import type { Dispatch, SetStateAction } from 'react' import { useAppStore } from '@/store/index' import type { OpenFile } from '@/store/slices/editor/types/open-file' -import { normalizeRuntimePathForComparison } from '../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../shared/file-access/cross-platform-path' import type { FileContent } from '../loading/editor-panel-content-types' // IPC/RPC preserve fs syscall/path text; match through the last quote because filenames can contain apostrophes. diff --git a/src/renderer/src/components/editor/external-changes/editor-external-watch-path-index.ts b/src/renderer/src/components/editor/external-changes/editor-external-watch-path-index.ts index 28d52a8b5f2..54b93f94b5b 100644 --- a/src/renderer/src/components/editor/external-changes/editor-external-watch-path-index.ts +++ b/src/renderer/src/components/editor/external-changes/editor-external-watch-path-index.ts @@ -8,7 +8,7 @@ import { getLocalWindowsWslPathIdentity, normalizeRuntimePathForComparison, type LocalWindowsWslPathIdentity -} from '../../../../../shared/cross-platform-path' +} from '../../../../../shared/file-access/cross-platform-path' type WatchScope = { worktreeId: string diff --git a/src/renderer/src/components/editor/external-changes/editor-self-write-registry.ts b/src/renderer/src/components/editor/external-changes/editor-self-write-registry.ts index 7b70fbd942d..e6d1dca7b93 100644 --- a/src/renderer/src/components/editor/external-changes/editor-self-write-registry.ts +++ b/src/renderer/src/components/editor/external-changes/editor-self-write-registry.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison as normalizeAbsolutePathForComparison } from '../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison as normalizeAbsolutePathForComparison } from '../../../../../shared/file-access/cross-platform-path' import { MAX_TIMER_DELAY_MS } from '../../../../../shared/concurrency/timer-delay' // Self-write echoes can reload TipTap, resetting selection and dropping typing; bound owner/path stamps so later external edits remain visible. diff --git a/src/renderer/src/components/editor/file-drop/editor-dropped-file-open.ts b/src/renderer/src/components/editor/file-drop/editor-dropped-file-open.ts index 6c09084df16..018fcb33d8d 100644 --- a/src/renderer/src/components/editor/file-drop/editor-dropped-file-open.ts +++ b/src/renderer/src/components/editor/file-drop/editor-dropped-file-open.ts @@ -14,7 +14,7 @@ import { describeSharedDropFailureReason } from '@/lib/files/drop/drop-skip-reas import { captureWorktreeSshMutationExpectation } from '@/runtime/hosts/ssh/ssh-mutation-expectation' import { statUserOpenedPath } from '@/lib/files/access/user-opened-local-path' import { FLOATING_TERMINAL_WORKTREE_ID } from '../../../../../shared/constants' -import { DROP_STAGING_RELATIVE_DIR } from '../../../../../shared/drop-staging-ignore' +import { DROP_STAGING_RELATIVE_DIR } from '../../../../../shared/file-import/drop-staging-ignore' import { openDocumentInFloatingWorkspace } from '@/components/floating-terminal/workspace/open-document-in-floating-workspace' import { requireRuntimeTargetForFileOwner } from '@/lib/files/access/file-owner-runtime-target' import { parseExecutionHostId } from '../../../../../shared/execution-host' diff --git a/src/renderer/src/components/editor/file-ownership/editor-path-move-inflight.ts b/src/renderer/src/components/editor/file-ownership/editor-path-move-inflight.ts index ca75f8321c8..09e643cdb7d 100644 --- a/src/renderer/src/components/editor/file-ownership/editor-path-move-inflight.ts +++ b/src/renderer/src/components/editor/file-ownership/editor-path-move-inflight.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison as normalizeAbsolutePathForComparison } from '../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison as normalizeAbsolutePathForComparison } from '../../../../../shared/file-access/cross-platform-path' // Track source-root delete echoes until rename and rekey settle, without a TTL that could race slow SSH moves. The coordinator verifies destinations. diff --git a/src/renderer/src/components/editor/git-graph/git-graph-workspace-navigation.ts b/src/renderer/src/components/editor/git-graph/git-graph-workspace-navigation.ts index c76462fcf12..91a97bf2a8e 100644 --- a/src/renderer/src/components/editor/git-graph/git-graph-workspace-navigation.ts +++ b/src/renderer/src/components/editor/git-graph/git-graph-workspace-navigation.ts @@ -1,6 +1,6 @@ import { toast } from 'sonner' import { translate } from '@/i18n/i18n' -import { normalizeRuntimePathForComparison } from '../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../shared/file-access/cross-platform-path' import { getWorktreeExecutionHostId } from '../../../../../shared/execution-host' import { findIndexedRepoOwnerForHost } from '@/lib/workspace/ownership/repo-owner-index' import { selectWorktreesByRepo } from '@/store/workspaces/catalog/workspace-record-fields' diff --git a/src/renderer/src/components/editor/loading/log-tail/local-log-tail-decoder.test.ts b/src/renderer/src/components/editor/loading/log-tail/local-log-tail-decoder.test.ts index 3337bbe3878..2e7ce3637bd 100644 --- a/src/renderer/src/components/editor/loading/log-tail/local-log-tail-decoder.test.ts +++ b/src/renderer/src/components/editor/loading/log-tail/local-log-tail-decoder.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { LocalLogTailReadResult } from '../../../../../../shared/local-log-tail-types' +import type { LocalLogTailReadResult } from '../../../../../../shared/file-content/local-log-tail-types' import { LocalLogTailDecoder } from './local-log-tail-decoder' const IDENTITY = '1:2:3' diff --git a/src/renderer/src/components/editor/loading/log-tail/local-log-tail-decoder.ts b/src/renderer/src/components/editor/loading/log-tail/local-log-tail-decoder.ts index e9828f9d093..025d6f49a1a 100644 --- a/src/renderer/src/components/editor/loading/log-tail/local-log-tail-decoder.ts +++ b/src/renderer/src/components/editor/loading/log-tail/local-log-tail-decoder.ts @@ -1,4 +1,4 @@ -import type { LocalLogTailReadResult } from '../../../../../../shared/local-log-tail-types' +import type { LocalLogTailReadResult } from '../../../../../../shared/file-content/local-log-tail-types' import { decodeBase64Bytes } from '@/lib/base64-bytes' export const LOCAL_LOG_TAIL_MAX_BYTES = 50 * 1024 * 1024 diff --git a/src/renderer/src/components/editor/loading/log-tail/useLocalLogTail.ts b/src/renderer/src/components/editor/loading/log-tail/useLocalLogTail.ts index 2fe42cd4378..2ebd0227d4f 100644 --- a/src/renderer/src/components/editor/loading/log-tail/useLocalLogTail.ts +++ b/src/renderer/src/components/editor/loading/log-tail/useLocalLogTail.ts @@ -1,5 +1,5 @@ import { useCallback, useEffect, useRef, type Dispatch, type SetStateAction } from 'react' -import type { LocalLogTailChangedPayload } from '../../../../../../shared/local-log-tail-types' +import type { LocalLogTailChangedPayload } from '../../../../../../shared/file-content/local-log-tail-types' import type { OpenFile } from '@/store/slices/editor/types/open-file' import type { FileContent } from '../editor-panel-content-types' import { LocalLogTailDecoder } from './local-log-tail-decoder' diff --git a/src/renderer/src/components/editor/markdown-preview/links/markdown-preview-link-actions.ts b/src/renderer/src/components/editor/markdown-preview/links/markdown-preview-link-actions.ts index 2bd4b5ad11c..2737b9999d1 100644 --- a/src/renderer/src/components/editor/markdown-preview/links/markdown-preview-link-actions.ts +++ b/src/renderer/src/components/editor/markdown-preview/links/markdown-preview-link-actions.ts @@ -12,7 +12,7 @@ import { requireRuntimeTargetForFileOwner } from '@/lib/files/access/file-owner- import { statRuntimePath } from '@/runtime/files/metadata/runtime-file-metadata-client' import { useAppStore } from '@/store/index' import { scheduleEditorLineReveal } from '@/store/slices/editor/focus/editor-focus-reveal' -import { relativePathInsideRoot } from '../../../../../../shared/cross-platform-path' +import { relativePathInsideRoot } from '../../../../../../shared/file-access/cross-platform-path' import { openMarkdownExternalUrl } from '../../markdown/link-routing/markdown-external-url-open' import { resolveMarkdownLinkTarget } from '../../markdown/link-routing/markdown-internal-links' import { diff --git a/src/renderer/src/components/editor/markdown-preview/links/markdown-preview-source-routing.ts b/src/renderer/src/components/editor/markdown-preview/links/markdown-preview-source-routing.ts index c64a01d60b5..67b487c65b5 100644 --- a/src/renderer/src/components/editor/markdown-preview/links/markdown-preview-source-routing.ts +++ b/src/renderer/src/components/editor/markdown-preview/links/markdown-preview-source-routing.ts @@ -2,7 +2,7 @@ import { getConnectionIdForFile } from '@/lib/workspace/ownership/connection-con import type { HttpLinkSourceOwner } from '@/lib/browser/navigation/http-link-routing' import { dirname } from '@/lib/path' import { findFirstIndexedWorktree } from '@/lib/workspace/ownership/worktree-runtime-owner-index' -import { relativePathInsideRoot } from '../../../../../../shared/cross-platform-path' +import { relativePathInsideRoot } from '../../../../../../shared/file-access/cross-platform-path' import type { Worktree } from '../../../../../../shared/worktree/types' import type { MarkdownPreviewSourceOpenFile } from '../render-tree/markdown-preview-types' diff --git a/src/renderer/src/components/editor/markdown-preview/render-tree/MarkdownPreviewSizeGate.tsx b/src/renderer/src/components/editor/markdown-preview/render-tree/MarkdownPreviewSizeGate.tsx index 746a02e143d..415c78a1383 100644 --- a/src/renderer/src/components/editor/markdown-preview/render-tree/MarkdownPreviewSizeGate.tsx +++ b/src/renderer/src/components/editor/markdown-preview/render-tree/MarkdownPreviewSizeGate.tsx @@ -2,7 +2,7 @@ import { useTranslate } from '@/i18n/use-translate' import { isClipboardTextByteLengthOverLimit } from '../../../../../../shared/clipboard/clipboard-text' import { LARGE_MARKDOWN_PREVIEW_MAX_BYTES } from '../document-worker/markdown-preview-document-types' import '../../../status-bar/workspace-storage/workspace-space-format' -import { formatBytes } from '../../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../../shared/text/format-bytes' export function MarkdownPreviewSizeGate({ content, diff --git a/src/renderer/src/components/editor/markdown/documents/use-markdown-document-watch-refresh.ts b/src/renderer/src/components/editor/markdown/documents/use-markdown-document-watch-refresh.ts index e755fcc22d1..6293d102620 100644 --- a/src/renderer/src/components/editor/markdown/documents/use-markdown-document-watch-refresh.ts +++ b/src/renderer/src/components/editor/markdown/documents/use-markdown-document-watch-refresh.ts @@ -3,7 +3,7 @@ import type { FsChangedPayload } from '../../../../../../shared/file-watch/files import { normalizeRuntimePathForComparison, relativePathInsideRoot -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' import { ORCA_WORKTREE_FILE_CHANGE_EVENT } from '@/hooks/worktree-file-change-event' import { hasMarkdownExtension } from '../link-routing/markdown-internal-links' import { MARKDOWN_DOCUMENT_LIST_JOIN_WINDOW_MS } from './markdown-document-list-request' diff --git a/src/renderer/src/components/editor/markdown/link-routing/markdown-internal-links.ts b/src/renderer/src/components/editor/markdown/link-routing/markdown-internal-links.ts index f644e1131e4..407c2686131 100644 --- a/src/renderer/src/components/editor/markdown/link-routing/markdown-internal-links.ts +++ b/src/renderer/src/components/editor/markdown/link-routing/markdown-internal-links.ts @@ -6,7 +6,7 @@ import { import { isWindowsAbsolutePathLike, relativePathInsideRoot -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' // Share classification across preview, rich-editor and link-bubble activation; see docs/markdown-internal-link-opening-design.md. diff --git a/src/renderer/src/components/editor/markdown/link-routing/markdown-preview-links.ts b/src/renderer/src/components/editor/markdown/link-routing/markdown-preview-links.ts index e0111c59557..fa0303967ba 100644 --- a/src/renderer/src/components/editor/markdown/link-routing/markdown-preview-links.ts +++ b/src/renderer/src/components/editor/markdown/link-routing/markdown-preview-links.ts @@ -3,7 +3,7 @@ import { filesystemPathToFileUri, fileUriToFilesystemPath } from '../../../../../../shared/file-links/file-uri-path' -import { isWindowsAbsolutePathLike } from '../../../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../../../shared/file-access/cross-platform-path' import type { HttpLinkSourceOwner } from '@/lib/browser/navigation/http-link-routing' import type { OpenHttpLinkOptions } from '@/lib/browser/navigation/http-link-destinations' diff --git a/src/renderer/src/components/editor/panel/EditorMarkdownFileSurface.tsx b/src/renderer/src/components/editor/panel/EditorMarkdownFileSurface.tsx index f0853820c3e..93668da4774 100644 --- a/src/renderer/src/components/editor/panel/EditorMarkdownFileSurface.tsx +++ b/src/renderer/src/components/editor/panel/EditorMarkdownFileSurface.tsx @@ -3,7 +3,7 @@ import { useAppStore } from '@/store/index' import type { MarkdownViewMode, OpenFile } from '@/store/slices/editor/types/open-file' import { Button } from '@/components/ui/button' import { RICH_MARKDOWN_MAX_SIZE_BYTES } from '../../../../../shared/constants' -import { formatBytes } from '../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../shared/text/format-bytes' import { MarkdownPreview, RichMarkdownEditor } from '../editor-lazy-views' import { extractFrontMatter, diff --git a/src/renderer/src/components/editor/plugin-editors/PluginBytesCustomEditorSurface.tsx b/src/renderer/src/components/editor/plugin-editors/PluginBytesCustomEditorSurface.tsx index e22b1607f6e..19b5e64a0dd 100644 --- a/src/renderer/src/components/editor/plugin-editors/PluginBytesCustomEditorSurface.tsx +++ b/src/renderer/src/components/editor/plugin-editors/PluginBytesCustomEditorSurface.tsx @@ -6,7 +6,7 @@ import type { ActivePluginCustomEditor } from '@/store/plugins/file-editors/plug import { CUSTOM_EDITOR_DOCUMENT_MAX_BYTES } from '../../../../../shared/plugins/frames/plugin-custom-editor-bridge' import { matchPluginFile } from '../../../../../shared/plugins/contributions/plugin-file-match' import { fileTypeOfPath } from '../../../../../shared/plugins/contributions/plugin-file-type' -import { formatBytes } from '../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../shared/text/format-bytes' import { Button } from '../../ui/button' import type { OpenFile } from '@/store/slices/editor/types/open-file' import type { FileContent } from '../loading/editor-panel-content-types' diff --git a/src/renderer/src/components/editor/rich-markdown/clipboard/rich-markdown-clipboard-link-target.ts b/src/renderer/src/components/editor/rich-markdown/clipboard/rich-markdown-clipboard-link-target.ts index 745aa23fd6f..67214cf4962 100644 --- a/src/renderer/src/components/editor/rich-markdown/clipboard/rich-markdown-clipboard-link-target.ts +++ b/src/renderer/src/components/editor/rich-markdown/clipboard/rich-markdown-clipboard-link-target.ts @@ -2,7 +2,7 @@ import { isCaseInsensitiveRuntimeRoot, isWindowsAbsolutePathLike, relativePathInsideRoot -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' import { fileUriToFilesystemPath, filesystemPathToFileUri diff --git a/src/renderer/src/components/editor/rich-markdown/review/useRichMarkdownReviewData.ts b/src/renderer/src/components/editor/rich-markdown/review/useRichMarkdownReviewData.ts index 41cf3658722..199865a4740 100644 --- a/src/renderer/src/components/editor/rich-markdown/review/useRichMarkdownReviewData.ts +++ b/src/renderer/src/components/editor/rich-markdown/review/useRichMarkdownReviewData.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react' import { getRelativePathInsideRoot } from '@/lib/path' -import { normalizeRelativePath } from '../../../../../../shared/cross-platform-path' +import { normalizeRelativePath } from '../../../../../../shared/file-access/cross-platform-path' import { isMarkdownComment } from '@/lib/source-control/review/comments/diff-comment-compat' import { formatMarkdownReviewNotes, diff --git a/src/renderer/src/components/feature-wall/setup/FeatureWallSetupWorkflowActions.tsx b/src/renderer/src/components/feature-wall/setup/FeatureWallSetupWorkflowActions.tsx index 927d2c5f3ab..e1c317593e0 100644 --- a/src/renderer/src/components/feature-wall/setup/FeatureWallSetupWorkflowActions.tsx +++ b/src/renderer/src/components/feature-wall/setup/FeatureWallSetupWorkflowActions.tsx @@ -7,7 +7,7 @@ import { useAppStore } from '@/store/index' import { useAllWorktrees } from '@/store/slices/worktrees/listing/use-worktree-catalog' import { getDefaultRepoHookSettings } from '../../../../../shared/constants' import { isGitRepoKind } from '../../../../../shared/repository/repo-kind' -import type { RepoHookSettings } from '../../../../../shared/orca-yaml-hook-types' +import type { RepoHookSettings } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { Repo } from '../../../../../shared/repository/repo-types' import type { Worktree } from '../../../../../shared/worktree/types' import { getRepositoryLocalCommandsSectionId } from '../../settings/repository/repository-settings-targets' diff --git a/src/renderer/src/components/gitlab-item-dialog-parts.tsx b/src/renderer/src/components/gitlab-item-dialog-parts.tsx index 94a9f635c1b..d3d57e59f54 100644 --- a/src/renderer/src/components/gitlab-item-dialog-parts.tsx +++ b/src/renderer/src/components/gitlab-item-dialog-parts.tsx @@ -11,7 +11,7 @@ import type { GitLabPipelineJob, GitLabWorkItem, MRComment -} from '../../../shared/gitlab-types' +} from '../../../shared/gitlab/gitlab-types' import { openAppHttpLink } from '@/lib/browser/navigation/app-http-link-open' export type JobTraceState = { diff --git a/src/renderer/src/components/gitlab-item-dialog/gitlab-conversation-tab.tsx b/src/renderer/src/components/gitlab-item-dialog/gitlab-conversation-tab.tsx index c71a208c731..dc2dfe3786d 100644 --- a/src/renderer/src/components/gitlab-item-dialog/gitlab-conversation-tab.tsx +++ b/src/renderer/src/components/gitlab-item-dialog/gitlab-conversation-tab.tsx @@ -1,7 +1,7 @@ import { LoaderCircle } from 'lucide-react' import { TabsContent } from '@/components/ui/tabs' import { useTranslate } from '@/i18n/use-translate' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import { CommentCard } from '../gitlab-item-dialog-parts' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' import type { GitLabReviewActions } from './use-gitlab-review-actions' diff --git a/src/renderer/src/components/gitlab-item-dialog/gitlab-description-tab.tsx b/src/renderer/src/components/gitlab-item-dialog/gitlab-description-tab.tsx index 7702dbf6630..8f785077574 100644 --- a/src/renderer/src/components/gitlab-item-dialog/gitlab-description-tab.tsx +++ b/src/renderer/src/components/gitlab-item-dialog/gitlab-description-tab.tsx @@ -5,7 +5,7 @@ import { TabsContent } from '@/components/ui/tabs' import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' import { cn } from '@/lib/class-names' -import type { GitLabMRApprovalState, GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabMRApprovalState, GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import { dedupeGitLabUsers, gitLabUserKey, diff --git a/src/renderer/src/components/gitlab-item-dialog/gitlab-files-tab.tsx b/src/renderer/src/components/gitlab-item-dialog/gitlab-files-tab.tsx index 4bf55161799..4c5b020e18c 100644 --- a/src/renderer/src/components/gitlab-item-dialog/gitlab-files-tab.tsx +++ b/src/renderer/src/components/gitlab-item-dialog/gitlab-files-tab.tsx @@ -3,7 +3,7 @@ import { Button } from '@/components/ui/button' import { TabsContent } from '@/components/ui/tabs' import { useTranslate } from '@/i18n/use-translate' import { hasBoundedCommentBodyText } from '@/lib/source-control/review/comments/comment-body-submit-state' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' import type { GitLabReviewActions } from './use-gitlab-review-actions' diff --git a/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-types.ts b/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-types.ts index 02052c4695a..238e3fcfae7 100644 --- a/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-types.ts +++ b/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-types.ts @@ -1,4 +1,4 @@ -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import type { TaskSourceContext } from '../../../../shared/work-items/task-source-context' export type GitLabItemDialogProps = { diff --git a/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-view.tsx b/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-view.tsx index 0ed915bcb3f..da59d48df91 100644 --- a/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-view.tsx +++ b/src/renderer/src/components/gitlab-item-dialog/gitlab-item-dialog-view.tsx @@ -13,7 +13,7 @@ import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs' import { useTranslate } from '@/i18n/use-translate' import { hasBoundedCommentBodyText } from '@/lib/source-control/review/comments/comment-body-submit-state' import { isScreenSubmitShortcut } from '@/lib/keyboard/screen-submit-shortcut' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import { normalizeGitLabLabels, StateBadge } from '../gitlab-item-dialog-parts' import { GitLabConversationTab } from './gitlab-conversation-tab' import { GitLabDescriptionTab } from './gitlab-description-tab' diff --git a/src/renderer/src/components/gitlab-item-dialog/gitlab-pipeline-tab.tsx b/src/renderer/src/components/gitlab-item-dialog/gitlab-pipeline-tab.tsx index 21c25db3f5b..002993a9866 100644 --- a/src/renderer/src/components/gitlab-item-dialog/gitlab-pipeline-tab.tsx +++ b/src/renderer/src/components/gitlab-item-dialog/gitlab-pipeline-tab.tsx @@ -1,7 +1,7 @@ import { CircleDashed, ExternalLink, LoaderCircle } from 'lucide-react' import { TabsContent } from '@/components/ui/tabs' import { useTranslate } from '@/i18n/use-translate' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import { PipelineJobRow } from '../gitlab-item-dialog-parts' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' import type { GitLabPipelineActions } from './use-gitlab-pipeline-actions' diff --git a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-details-editing.ts b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-details-editing.ts index 1c0c77dfa85..e52d4a2d511 100644 --- a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-details-editing.ts +++ b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-details-editing.ts @@ -3,7 +3,7 @@ import { useCallback } from 'react' import { toast } from 'sonner' import { translate } from '@/i18n/i18n' import { useAppStore } from '@/store' -import type { GitLabMRUpdate, GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabMRUpdate, GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import { formatGitLabLabelDraft, normalizeGitLabLabels, diff --git a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-item-dialog-effects.ts b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-item-dialog-effects.ts index b5089bda11a..03ffbc159cf 100644 --- a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-item-dialog-effects.ts +++ b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-item-dialog-effects.ts @@ -1,7 +1,7 @@ import { translate } from '@/i18n/i18n' import { gitLabApiFor } from '@/runtime/repository-gitlab/gitlab-owner-api' import { useEffect } from 'react' -import type { GitLabWorkItem, GitLabWorkItemDetails } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem, GitLabWorkItemDetails } from '../../../../shared/gitlab/gitlab-types' import type { GitLabDialogRepoSelector } from './gitlab-item-dialog-types' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' diff --git a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-item-dialog-state.ts b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-item-dialog-state.ts index 37f061ccb74..49515a2aae8 100644 --- a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-item-dialog-state.ts +++ b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-item-dialog-state.ts @@ -1,6 +1,9 @@ import { useCallback, useLayoutEffect, useRef, useState } from 'react' import { useMountedRef } from '@/hooks/useMountedRef' -import type { GitLabAssignableUser, GitLabWorkItemDetails } from '../../../../shared/gitlab-types' +import type { + GitLabAssignableUser, + GitLabWorkItemDetails +} from '../../../../shared/gitlab/gitlab-types' import type { JobTraceState } from '../gitlab-item-dialog-parts' export function useGitLabItemDialogState(itemId: string | null, detailsOwner: string | null) { diff --git a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-pipeline-actions.ts b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-pipeline-actions.ts index 74399d9933f..dced9f879a8 100644 --- a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-pipeline-actions.ts +++ b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-pipeline-actions.ts @@ -2,7 +2,7 @@ import { gitLabApiFor } from '@/runtime/repository-gitlab/gitlab-owner-api' import { useCallback } from 'react' import { toast } from 'sonner' import { translate } from '@/i18n/i18n' -import type { GitLabPipelineJob, GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabPipelineJob, GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import { showGitLabMutationError } from '../gitlab-item-dialog-parts' import type { GitLabDialogRepoSelector } from './gitlab-item-dialog-types' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' diff --git a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-primary-actions.ts b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-primary-actions.ts index b59f1288ddc..2c33c2c3250 100644 --- a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-primary-actions.ts +++ b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-primary-actions.ts @@ -4,7 +4,7 @@ import { toast } from 'sonner' import { getCommentBodySubmitState } from '@/lib/source-control/review/comments/comment-body-submit-state' import { translate } from '@/i18n/i18n' import { useAppStore } from '@/store' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import { showGitLabMutationError } from '../gitlab-item-dialog-parts' import type { GitLabDialogRepoSelector } from './gitlab-item-dialog-types' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' diff --git a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-review-actions.ts b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-review-actions.ts index 3cf5276d92b..6448deb1f5d 100644 --- a/src/renderer/src/components/gitlab-item-dialog/use-gitlab-review-actions.ts +++ b/src/renderer/src/components/gitlab-item-dialog/use-gitlab-review-actions.ts @@ -4,7 +4,7 @@ import { toast } from 'sonner' import { getCommentBodySubmitState } from '@/lib/source-control/review/comments/comment-body-submit-state' import { translate } from '@/i18n/i18n' import { useAppStore } from '@/store' -import type { GitLabAssignableUser, GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabAssignableUser, GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import { dedupeGitLabUsers, showGitLabMutationError } from '../gitlab-item-dialog-parts' import type { GitLabDialogRepoSelector } from './gitlab-item-dialog-types' import type { GitLabItemDialogState } from './use-gitlab-item-dialog-state' diff --git a/src/renderer/src/components/gitlab/gitlab-rate-limit-display.tsx b/src/renderer/src/components/gitlab/gitlab-rate-limit-display.tsx index 58f17c7bc85..2a4681134f4 100644 --- a/src/renderer/src/components/gitlab/gitlab-rate-limit-display.tsx +++ b/src/renderer/src/components/gitlab/gitlab-rate-limit-display.tsx @@ -9,7 +9,7 @@ import { isWslDistroNotRunningRefusal } from '../../../../shared/remote-runtime/ import type { GetGitLabRateLimitResult, GitLabRateLimitSnapshot -} from '../../../../shared/gitlab-types' +} from '../../../../shared/gitlab/gitlab-types' import { getProviderRateLimitScope } from '@/components/provider-accounts/provider-account-scope' import { ProviderHostScopeControl } from '@/components/provider-accounts/ProviderHostScopeControl' import { translate } from '@/i18n/i18n' diff --git a/src/renderer/src/components/integrations/source-control/bitbucket-credentials-dialog.tsx b/src/renderer/src/components/integrations/source-control/bitbucket-credentials-dialog.tsx index 1a8088651bf..b4047033e7d 100644 --- a/src/renderer/src/components/integrations/source-control/bitbucket-credentials-dialog.tsx +++ b/src/renderer/src/components/integrations/source-control/bitbucket-credentials-dialog.tsx @@ -1,6 +1,6 @@ import { useEffectEvent, useId, useLayoutEffect, useRef, useState } from 'react' import { ExternalLink, LoaderCircle, Lock } from 'lucide-react' -import type { BitbucketAuthMode } from '../../../../../shared/bitbucket-credentials' +import type { BitbucketAuthMode } from '../../../../../shared/bitbucket/bitbucket-credentials' import { useAppStore } from '@/store/index' import { useMountedRef } from '@/hooks/useMountedRef' import { Button } from '@/components/ui/button' diff --git a/src/renderer/src/components/integrations/source-control/bitbucket-integration-card.tsx b/src/renderer/src/components/integrations/source-control/bitbucket-integration-card.tsx index 9b7f5bc62b0..63950efe94e 100644 --- a/src/renderer/src/components/integrations/source-control/bitbucket-integration-card.tsx +++ b/src/renderer/src/components/integrations/source-control/bitbucket-integration-card.tsx @@ -1,7 +1,7 @@ import { UnsealedCredentialNotice } from '../../provider-accounts/UnsealedCredentialNotice' import { useCallback, useEffect, useRef, useState } from 'react' import { ExternalLink, GitPullRequestArrow, LoaderCircle, Unlink } from 'lucide-react' -import type { BitbucketConnectionStatus } from '../../../../../shared/bitbucket-credentials' +import type { BitbucketConnectionStatus } from '../../../../../shared/bitbucket/bitbucket-credentials' import { Button } from '@/components/ui/button' import { useMountedRef } from '@/hooks/useMountedRef' import { readIpcErrorMessage } from '@/runtime/errors/ipc-error' diff --git a/src/renderer/src/components/linear-project-view-surfaces.tsx b/src/renderer/src/components/linear-project-view-surfaces.tsx index 4d694145030..e25cb2e6b95 100644 --- a/src/renderer/src/components/linear-project-view-surfaces.tsx +++ b/src/renderer/src/components/linear-project-view-surfaces.tsx @@ -13,7 +13,7 @@ import type { LinearProjectSummary } from '../../../shared/linear/project-types' import type { LinearWorkspaceError } from '../../../shared/linear/workspace-types' -import { isIntegrationCredentialDecryptionError } from '../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../shared/secure-storage/integration-credential-errors' import { LinearCustomViewTableContent, type LinearCustomViewTableContentProps diff --git a/src/renderer/src/components/managed-runtime/managed-runtime-install-card.ts b/src/renderer/src/components/managed-runtime/managed-runtime-install-card.ts index d6e015dd855..e89a7bc017b 100644 --- a/src/renderer/src/components/managed-runtime/managed-runtime-install-card.ts +++ b/src/renderer/src/components/managed-runtime/managed-runtime-install-card.ts @@ -3,7 +3,7 @@ import type { Translate } from '@/i18n/use-translate' import type { ManagedRuntimeInstallState, ManagedRuntimeOperation -} from '../../../../shared/managed-runtime-install' +} from '../../../../shared/agent-launch/installation/managed-runtime-install' import { megabytes, type ManagedRuntimeInstallAction } from './managed-runtime-install-view' /** Hero fills an empty chat pane; strip sits above the composer. Both render the same host snapshot. */ diff --git a/src/renderer/src/components/managed-runtime/managed-runtime-install-view.ts b/src/renderer/src/components/managed-runtime/managed-runtime-install-view.ts index 96a6433f74a..1f4e4522219 100644 --- a/src/renderer/src/components/managed-runtime/managed-runtime-install-view.ts +++ b/src/renderer/src/components/managed-runtime/managed-runtime-install-view.ts @@ -1,6 +1,6 @@ import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' -import type { ManagedRuntimeInstallState } from '../../../../shared/managed-runtime-install' +import type { ManagedRuntimeInstallState } from '../../../../shared/agent-launch/installation/managed-runtime-install' import type { ManagedRuntimeInstallSnapshot } from '@/runtime/hosts/installation/managed-runtime-install-status' export type ManagedRuntimeInstallAction = diff --git a/src/renderer/src/components/managed-runtime/use-managed-runtime-install-card.ts b/src/renderer/src/components/managed-runtime/use-managed-runtime-install-card.ts index c70a95ecf31..9b0ab9b2bfb 100644 --- a/src/renderer/src/components/managed-runtime/use-managed-runtime-install-card.ts +++ b/src/renderer/src/components/managed-runtime/use-managed-runtime-install-card.ts @@ -5,7 +5,7 @@ import { installManagedRuntime } from '@/runtime/hosts/installation/managed-runtime-install-status' import type { ManagedRuntimeInstallObservation } from '@/runtime/hosts/installation/use-managed-runtime-install' -import type { ManagedRuntimeInstallState } from '../../../../shared/managed-runtime-install' +import type { ManagedRuntimeInstallState } from '../../../../shared/agent-launch/installation/managed-runtime-install' import { managedRuntimeInstallCard, type ManagedRuntimeInstallCard, diff --git a/src/renderer/src/components/native-chat/host-access/NativeChatInstallSlot.tsx b/src/renderer/src/components/native-chat/host-access/NativeChatInstallSlot.tsx index 2ca6de43ffb..15f0d758973 100644 --- a/src/renderer/src/components/native-chat/host-access/NativeChatInstallSlot.tsx +++ b/src/renderer/src/components/native-chat/host-access/NativeChatInstallSlot.tsx @@ -8,7 +8,7 @@ import { useManagedRuntimeInstall, type ManagedRuntimeInstallObservation } from '@/runtime/hosts/installation/use-managed-runtime-install' -import type { ManagedRuntimeInstallState } from '../../../../../shared/managed-runtime-install' +import type { ManagedRuntimeInstallState } from '../../../../../shared/agent-launch/installation/managed-runtime-install' import { NativeChatInstallStrip } from './NativeChatInstallStrip' import { NativeChatSignInStrip, diff --git a/src/renderer/src/components/new-workspace/composer/new-workspace-composer-card-props.ts b/src/renderer/src/components/new-workspace/composer/new-workspace-composer-card-props.ts index e49fb5695be..4cf9bfd2a9e 100644 --- a/src/renderer/src/components/new-workspace/composer/new-workspace-composer-card-props.ts +++ b/src/renderer/src/components/new-workspace/composer/new-workspace-composer-card-props.ts @@ -7,16 +7,16 @@ import type { ComposerAgentRows } from '@/hooks/composer-state/composer-agent-ro import type RepoCombobox from '@/components/repo/RepoCombobox' import type { NewWorkspaceProjectOption } from '@/lib/workspace/creation/new-workspace-project-options' import type { ProjectHostSetupOption } from '@/lib/workspace/creation/project-host-setup-options' -import type { SetupConfig } from '../../../../../shared/orca-hook-setup-config' +import type { SetupConfig } from '../../../../../shared/workspace-setup/hooks/orca-hook-setup-config' import type { WorkspaceCreateErrorDisplay } from '@/lib/workspace/creation/workspace-create-error-format' import type { SmartNameMode } from '../../../../../shared/new-workspace/smart-workspace-source-results' import type { SmartWorkspaceNameSelection } from '@/components/new-workspace/name-field/smart-workspace-name-field-model' import type { GitHubWorkItem } from '../../../../../shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../../shared/gitlab/gitlab-types' import type { JiraIssue } from '../../../../../shared/jira/jira-types' import type { LinearIssue } from '../../../../../shared/linear/issue-types' -import type { SetupAgentStartupPolicy } from '../../../../../shared/orca-yaml-hook-types' +import type { SetupAgentStartupPolicy } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { SparsePreset } from '../../../../../shared/worktree/create-types' import type { SshConnectionStatus } from '../../../../../shared/remote-runtime/ssh/ssh-types' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' diff --git a/src/renderer/src/components/new-workspace/name-field/smart-workspace-name-field-model.ts b/src/renderer/src/components/new-workspace/name-field/smart-workspace-name-field-model.ts index d28205ab834..6bc704a6488 100644 --- a/src/renderer/src/components/new-workspace/name-field/smart-workspace-name-field-model.ts +++ b/src/renderer/src/components/new-workspace/name-field/smart-workspace-name-field-model.ts @@ -2,7 +2,7 @@ import type React from 'react' import type { useAppStore } from '@/store' import type { parseGitHubIssueOrPRLink } from '../../../../../shared/github/repositories/links' import type { GitHubWorkItem } from '../../../../../shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../../shared/gitlab/gitlab-types' import type { JiraIssue, JiraSite } from '../../../../../shared/jira/jira-types' import type { LinearIssue } from '../../../../../shared/linear/issue-types' import type { BaseRefSearchResult } from '../../../../../shared/repository/repo-types' diff --git a/src/renderer/src/components/new-workspace/run-target/run-target-options.ts b/src/renderer/src/components/new-workspace/run-target/run-target-options.ts index 0c4008c64e6..9734489c6db 100644 --- a/src/renderer/src/components/new-workspace/run-target/run-target-options.ts +++ b/src/renderer/src/components/new-workspace/run-target/run-target-options.ts @@ -1,4 +1,4 @@ -import type { OrcaHooks } from '../../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import { getProjectHostSetupSelectionKey, type NeedsSetupProjectHostOption, diff --git a/src/renderer/src/components/new-workspace/setup/WorkspaceSetupSection.tsx b/src/renderer/src/components/new-workspace/setup/WorkspaceSetupSection.tsx index c374a167ac2..b6c8c499f75 100644 --- a/src/renderer/src/components/new-workspace/setup/WorkspaceSetupSection.tsx +++ b/src/renderer/src/components/new-workspace/setup/WorkspaceSetupSection.tsx @@ -1,7 +1,7 @@ import type { ReactNode } from 'react' -import type { SetupConfig } from '../../../../../shared/orca-hook-setup-config' +import type { SetupConfig } from '../../../../../shared/workspace-setup/hooks/orca-hook-setup-config' import type { SetupDecision } from '../../../../../shared/worktree/create-types' -import type { SetupAgentStartupPolicy } from '../../../../../shared/orca-yaml-hook-types' +import type { SetupAgentStartupPolicy } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import { Switch } from '@/components/ui/switch' import { Button } from '@/components/ui/button' import { cn } from '@/lib/class-names' diff --git a/src/renderer/src/components/new-workspace/setup/workspace-setup-section-model.ts b/src/renderer/src/components/new-workspace/setup/workspace-setup-section-model.ts index 1ac8ad68a1f..c580e2bd2b9 100644 --- a/src/renderer/src/components/new-workspace/setup/workspace-setup-section-model.ts +++ b/src/renderer/src/components/new-workspace/setup/workspace-setup-section-model.ts @@ -1,4 +1,4 @@ -import type { SetupConfig } from '../../../../../shared/orca-hook-setup-config' +import type { SetupConfig } from '../../../../../shared/workspace-setup/hooks/orca-hook-setup-config' export type WorkspaceSetupKindCopy = { configLabel: string diff --git a/src/renderer/src/components/new-workspace/source-search/SmartWorkspaceSourceResultList.tsx b/src/renderer/src/components/new-workspace/source-search/SmartWorkspaceSourceResultList.tsx index a2ade66aeef..a6eee0ab38f 100644 --- a/src/renderer/src/components/new-workspace/source-search/SmartWorkspaceSourceResultList.tsx +++ b/src/renderer/src/components/new-workspace/source-search/SmartWorkspaceSourceResultList.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import { Button } from '@/components/ui/button' import { CommandGroup, CommandItem, CommandList } from '@/components/ui/command' import { useTranslate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/new-workspace/source-search/use-smart-workspace-gitlab-search.ts b/src/renderer/src/components/new-workspace/source-search/use-smart-workspace-gitlab-search.ts index 55fca23aff7..8e8ff073fd9 100644 --- a/src/renderer/src/components/new-workspace/source-search/use-smart-workspace-gitlab-search.ts +++ b/src/renderer/src/components/new-workspace/source-search/use-smart-workspace-gitlab-search.ts @@ -4,7 +4,7 @@ import { lookupGitLabWorkItemByPathForSource } from '@/lib/work-items/gitlab/gitlab-work-item-source-lookup' import { parseGitLabIssueOrMRLink } from '../../../../../shared/new-workspace/gitlab-links' -import type { GitLabWorkItem } from '../../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../../shared/gitlab/gitlab-types' import { RESULT_LIMIT } from '../name-field/smart-workspace-name-field-model' import type { useWorkItemSourceFoundation } from './use-work-item-source-foundation' diff --git a/src/renderer/src/components/new-workspace/source-search/use-smart-workspace-secondary-searches.ts b/src/renderer/src/components/new-workspace/source-search/use-smart-workspace-secondary-searches.ts index c871451e331..548b40a661b 100644 --- a/src/renderer/src/components/new-workspace/source-search/use-smart-workspace-secondary-searches.ts +++ b/src/renderer/src/components/new-workspace/source-search/use-smart-workspace-secondary-searches.ts @@ -14,7 +14,7 @@ import { searchRuntimeRepoBaseRefDetails } from '@/runtime/source-control/refere import { lookupLinearIssueUrl } from '@/lib/work-items/linear/linear-issue-url-lookup' import { searchJiraIssuesByKeyOrText } from '@/components/jira-key-or-text-search' import { linearWorkspaceScopeSignature } from '../../../../../shared/linear/workspace-types' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import { getSmartWorkspaceLinearSearchQuery } from '../../../../../shared/new-workspace/smart-workspace-linear-intent' import { RESULT_LIMIT } from '../name-field/smart-workspace-name-field-model' import { restrictJiraQueryToProject } from '../../../../../shared/jira/jira-project-reference' diff --git a/src/renderer/src/components/new-workspace/source-search/use-work-item-source-state.ts b/src/renderer/src/components/new-workspace/source-search/use-work-item-source-state.ts index 586fb2a5c38..7dee4e1eb7d 100644 --- a/src/renderer/src/components/new-workspace/source-search/use-work-item-source-state.ts +++ b/src/renderer/src/components/new-workspace/source-search/use-work-item-source-state.ts @@ -2,7 +2,7 @@ import { useGitHubTaskItems } from '@/hooks/useGitHubTaskItems' import { useRef, useState } from 'react' import type { RepoSlug } from '../../../../../shared/github/repositories/links' import type { GitHubWorkItem } from '../../../../../shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../../shared/gitlab/gitlab-types' import type { JiraIssue } from '../../../../../shared/jira/jira-types' import type { BaseRefSearchResult } from '../../../../../shared/repository/repo-types' import type { SmartNameMode } from '../../../../../shared/new-workspace/smart-workspace-source-results' diff --git a/src/renderer/src/components/quick-open-nested-worktrees.ts b/src/renderer/src/components/quick-open-nested-worktrees.ts index d95f19c9097..91dd3303e9e 100644 --- a/src/renderer/src/components/quick-open-nested-worktrees.ts +++ b/src/renderer/src/components/quick-open-nested-worktrees.ts @@ -1,5 +1,5 @@ import type { Worktree } from '../../../shared/worktree/types' -import { isWindowsAbsolutePathLike } from '../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../shared/file-access/cross-platform-path' export function isNestedWorktreePath(parentPath: string, childPath: string): boolean { const windowsPath = isWindowsAbsolutePathLike(parentPath) diff --git a/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-account-binding.ts b/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-account-binding.ts index 96a1df4f9bd..bce28185c18 100644 --- a/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-account-binding.ts +++ b/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-account-binding.ts @@ -1,6 +1,6 @@ import type { AiVaultSession } from '../../../../../../shared/ai-vault/contracts/ai-vault-types' import { isLegacyAgentSessionAccountHome } from '../../../../../../shared/agent-session/lifecycle/accounts/agent-session-account-home' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import { LOCAL_EXECUTION_HOST_ID } from '../../../../../../shared/execution-host' import { translate } from '@/i18n/i18n' diff --git a/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-account-work-test-fixture.ts b/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-account-work-test-fixture.ts index 53e91f8f770..03539a0ab63 100644 --- a/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-account-work-test-fixture.ts +++ b/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-account-work-test-fixture.ts @@ -1,5 +1,5 @@ import { vi } from 'vitest' -import * as paths from '../../../../../../shared/cross-platform-path' +import * as paths from '../../../../../../shared/file-access/cross-platform-path' import * as equality from '../../../../../../shared/collections/structural-value-equality' import * as labels from '@/lib/provider-accounts/codex-account-display-label' import * as native from './ai-vault-native-account-index' diff --git a/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-native-account-index.ts b/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-native-account-index.ts index 45c6f791c01..497eca780ae 100644 --- a/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-native-account-index.ts +++ b/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-native-account-index.ts @@ -2,7 +2,7 @@ import type { ClaudeManagedAccountSummary, CodexManagedAccountSummary } from '../../../../../../shared/agent-accounts/managed-account-types' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import type { ProviderAccountsSnapshot } from '@/runtime/provider-accounts/observations/runtime-provider-accounts-client' import { accountRuntimeScope, type NativeAccountBinding } from './ai-vault-account-binding' import { diff --git a/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-saved-account-index.ts b/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-saved-account-index.ts index e3e2d2e7f03..cbd7197c889 100644 --- a/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-saved-account-index.ts +++ b/src/renderer/src/components/right-sidebar/ai-vault/accounts/ai-vault-saved-account-index.ts @@ -1,5 +1,5 @@ import type { GlobalSettings } from '../../../../../../shared/global-settings-types' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import { structuralValuesEqual } from '../../../../../../shared/collections/structural-value-equality' import { normalizeCodexAccountEmail } from '@/lib/provider-accounts/codex-account-display-label' import { accountRuntimeScope } from './ai-vault-account-binding' diff --git a/src/renderer/src/components/right-sidebar/ai-vault/scope/ai-vault-session-projects.ts b/src/renderer/src/components/right-sidebar/ai-vault/scope/ai-vault-session-projects.ts index 8174ec3b746..21418f994a0 100644 --- a/src/renderer/src/components/right-sidebar/ai-vault/scope/ai-vault-session-projects.ts +++ b/src/renderer/src/components/right-sidebar/ai-vault/scope/ai-vault-session-projects.ts @@ -12,7 +12,7 @@ import type { AiVaultSession } from '../../../../../../shared/ai-vault/contracts import type { ProjectHostSetup } from '../../../../../../shared/project/project-types' import type { Repo } from '../../../../../../shared/repository/repo-types' import type { Worktree } from '../../../../../../shared/worktree/types' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import { aiVaultSessionProjectCwdKey, matchAiVaultSessionCwdCandidates diff --git a/src/renderer/src/components/right-sidebar/ai-vault/session-actions/ai-vault-session-resume-in-chat.ts b/src/renderer/src/components/right-sidebar/ai-vault/session-actions/ai-vault-session-resume-in-chat.ts index fc367d6cdd7..7bc3dc5fec8 100644 --- a/src/renderer/src/components/right-sidebar/ai-vault/session-actions/ai-vault-session-resume-in-chat.ts +++ b/src/renderer/src/components/right-sidebar/ai-vault/session-actions/ai-vault-session-resume-in-chat.ts @@ -2,7 +2,7 @@ import { isAntigravityReferenceSession } from '../../../../../../shared/agent-se // Native resume requires provider conversation lookup, unlike terminal resume's PTY-hosting gate. import { isWslStoredAiVaultSessionFile } from '../../../../../../shared/ai-vault/resume/ai-vault-resume-target' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import { parseRoutableExecutionHostId } from '../../../../../../shared/execution-host' import { adoptsCliConversations } from '../../../../../../shared/agent-session/view/structured-agent-cli-conversation-adoption' import { diff --git a/src/renderer/src/components/right-sidebar/ai-vault/session-list/ai-vault-subagent-expansion.tsx b/src/renderer/src/components/right-sidebar/ai-vault/session-list/ai-vault-subagent-expansion.tsx index 328f33b18ae..75fe0225f11 100644 --- a/src/renderer/src/components/right-sidebar/ai-vault/session-list/ai-vault-subagent-expansion.tsx +++ b/src/renderer/src/components/right-sidebar/ai-vault/session-list/ai-vault-subagent-expansion.tsx @@ -1,6 +1,6 @@ import { createContext, useContext, useMemo, useState, type ReactNode } from 'react' import type { AiVaultSession } from '../../../../../../shared/ai-vault/contracts/ai-vault-types' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' type Expansion = { expanded: ReadonlySet diff --git a/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-resolution.tsx b/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-resolution.tsx index d3f378d90ac..1da31cd3487 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-resolution.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/comments/use-checks-panel-comment-resolution.tsx @@ -23,7 +23,7 @@ import { isReviewThreadResolutionInFlight } from '@/store/github/review-threads/ import { worktreeLaunchWorkspace } from '@/lib/agent-session/launch/routing/agent-launch-route-input' import { codeHostErrorText } from '@/lib/source-control/remote/code-host-error-copy' import { errorMessage } from '../../../../../../shared/errors/error-message' -import type { GitLabDiscussionResolveResult } from '../../../../../../shared/gitlab-types' +import type { GitLabDiscussionResolveResult } from '../../../../../../shared/gitlab/gitlab-types' type ChecksPanelCommentResolutionInput = Pick< ChecksPanelControllerState, diff --git a/src/renderer/src/components/right-sidebar/checks-panel/panel/use-checks-panel-controller-state.tsx b/src/renderer/src/components/right-sidebar/checks-panel/panel/use-checks-panel-controller-state.tsx index fe209a7a97a..d136c54fbc8 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/panel/use-checks-panel-controller-state.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/panel/use-checks-panel-controller-state.tsx @@ -23,7 +23,7 @@ import type { import type { PRCheckDetail } from '../../../../../../shared/github/checks/check-types' import type { PRComment } from '../../../../../../shared/github/comments/comment-types' import type { PRRefreshErrorType } from '../../../../../../shared/github/pull-requests/refresh/pull-request-refresh-types' -import type { GitLabProjectRef } from '../../../../../../shared/gitlab-types' +import type { GitLabProjectRef } from '../../../../../../shared/gitlab/gitlab-types' import type { PRCommentsListSelectionClearRequest } from '../comments/pr-comments-list-selection' import { buildChecksPanelGitStatusContextKey, diff --git a/src/renderer/src/components/right-sidebar/checks-panel/presentation/check-run-details.tsx b/src/renderer/src/components/right-sidebar/checks-panel/presentation/check-run-details.tsx index 53ebd424e25..92fcb77b6b4 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/presentation/check-run-details.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/presentation/check-run-details.tsx @@ -4,7 +4,7 @@ import { Button } from '@/components/ui/button' import CommentMarkdown from '@/components/sidebar/CommentMarkdown' import { cn } from '@/lib/class-names' import { useAppStore } from '@/store/index' -import type { GitLabProjectRef } from '../../../../../../shared/gitlab-types' +import type { GitLabProjectRef } from '../../../../../../shared/gitlab/gitlab-types' import type { PRCheckDetail } from '../../../../../../shared/github/checks/check-types' import type { GitHubRepositoryIdentity } from '../../../../../../shared/github/repositories/repository-identity' import { CheckJobLogTail } from '../logs/check-job-log-tail' diff --git a/src/renderer/src/components/right-sidebar/checks-panel/refresh/checks-panel-terminal-worktree.ts b/src/renderer/src/components/right-sidebar/checks-panel/refresh/checks-panel-terminal-worktree.ts index d9e9671a0b4..3b0ef71d7b7 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/refresh/checks-panel-terminal-worktree.ts +++ b/src/renderer/src/components/right-sidebar/checks-panel/refresh/checks-panel-terminal-worktree.ts @@ -4,7 +4,7 @@ import { createNormalizedPathInsideOrEqualMatcher, isRuntimePathAbsolute, normalizeRuntimePathForComparison -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' import type { TerminalLayoutSnapshot } from '../../../../../../shared/workspace-layout/terminal-tab-types' import type { Worktree } from '../../../../../../shared/worktree/types' diff --git a/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-detail-timer-cadence.test.tsx b/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-detail-timer-cadence.test.tsx deleted file mode 100644 index 04799da82cd..00000000000 --- a/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-detail-timer-cadence.test.tsx +++ /dev/null @@ -1,409 +0,0 @@ -// @vitest-environment happy-dom -import { act, cleanup, renderHook } from '@testing-library/react' -import { useRef } from 'react' -import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { ChecksDetailPollingPolicy } from '../../../../../../shared/github/checks/checks-detail-polling-policy' -import { - _resetPRAutoRefreshCadencesForTests, - setPRAutoRefreshCadence, - setPRAutoRefreshCadenceForHost -} from '../../../../../../shared/review-refresh-policy' -import { createModel } from './checks-panel-polling-test-model' -import type { ChecksPanelPollingInput } from './use-checks-panel-polling' - -vi.mock('@/store/github/refresh/remote-host-pr-auto-refresh-cadence', async () => { - const policy = await import('../../../../../../shared/review-refresh-policy') - return { - hostPRAutoRefreshCadence: (environmentId: string | null) => - policy.getPRAutoRefreshCadenceForHost(environmentId) - } -}) -vi.mock('@/store/github/repositories/repository-routing', () => ({ - getPRRefreshOwnerRuntimeEnvironmentId: (candidate: { executionHostId?: string | null }) => - candidate.executionHostId?.startsWith('runtime:') - ? candidate.executionHostId.slice('runtime:'.length) - : null -})) - -import { useChecksDetailTimer } from './use-checks-detail-timer' -import { RuntimeRpcCallQueuePool } from '../../../../../../shared/remote-runtime/rpc/runtime-rpc-call-queue' - -describe('checks detail timer follows PR auto-refresh cadence changes while mounted', () => { - beforeEach(() => { - vi.useFakeTimers() - vi.setSystemTime(1_000_000) - Object.defineProperty(document, 'visibilityState', { configurable: true, value: 'visible' }) - }) - afterEach(() => { - cleanup() - vi.useRealTimers() - _resetPRAutoRefreshCadencesForTests() - }) - - function mount( - executionHostId?: `runtime:${string}`, - pr: Partial> = {}, - fetchImpl: (options?: { background?: boolean }) => Promise = async () => {}, - gitlab = false - ) { - const overrides: Partial = {} - if (Object.keys(pr).length > 0) { - overrides.pr = { ...createModel().pr!, ...pr } - } - if (executionHostId) { - overrides.repo = { - id: 'repo-1', - path: '/workspace/repo', - displayName: 'Repo', - badgeColor: '', - addedAt: 1, - executionHostId - } - } - const model = createModel(overrides) - if (gitlab) { - model.activeGitLabReview = { - provider: 'gitlab', - number: 42, - title: 'Review', - state: 'open', - url: '', - status: 'pending', - updatedAt: '', - mergeable: 'UNKNOWN' - } - } - const fetchChecks = vi.fn(fetchImpl) - const fetchGitLabDetails = vi.fn(async () => {}) - const rendered = renderHook(() => { - const modelRef = useRef(model) - const policyRef = useRef(new ChecksDetailPollingPolicy()) - useChecksDetailTimer({ - model, - modelRef, - policyRef, - requestIdentity: 'same-pr', - fetchChecks, - fetchGitLabDetails - }) - }) - return { ...rendered, fetchChecks, fetchGitLabDetails, model } - } - - it('starts polling again when off becomes default, without another event', async () => { - setPRAutoRefreshCadence('off') - const { fetchChecks } = mount() - await act(async () => { - await vi.advanceTimersByTimeAsync(0) - }) - expect(fetchChecks).toHaveBeenCalledTimes(1) - await act(async () => { - await vi.advanceTimersByTimeAsync(5 * 60_000) - }) - expect(fetchChecks).toHaveBeenCalledTimes(1) - - await act(async () => { - setPRAutoRefreshCadence('default') - await vi.advanceTimersByTimeAsync(0) - }) - // Five minutes since the last read: the pending backoff (60 s) is long overdue, so it reads now. - expect(fetchChecks).toHaveBeenCalledTimes(2) - }) - - it('disarms an armed poll when default becomes off', async () => { - const { fetchChecks } = mount() - await act(async () => { - await vi.advanceTimersByTimeAsync(0) - }) - expect(fetchChecks).toHaveBeenCalledTimes(1) - await act(async () => { - setPRAutoRefreshCadence('off') - await vi.advanceTimersByTimeAsync(60 * 60_000) - }) - expect(fetchChecks).toHaveBeenCalledTimes(1) - }) - - it('polls a paired host’s PR by that host’s cadence, not this app’s', async () => { - setPRAutoRefreshCadence('off') - setPRAutoRefreshCadenceForHost('env-1', 'default') - const { fetchChecks } = mount('runtime:env-1') - await act(async () => { - await vi.advanceTimersByTimeAsync(0) - }) - expect(fetchChecks).toHaveBeenCalledTimes(1) - await act(async () => { - await vi.advanceTimersByTimeAsync(60_000 + 1_000) - }) - expect(fetchChecks).toHaveBeenCalledTimes(2) - // A timer tick on a paired host is a background read the host may pace. - expect(fetchChecks).toHaveBeenLastCalledWith({ force: false, background: true }) - }) - - async function focusWindow(): Promise { - await act(async () => { - window.dispatchEvent(new Event('focus')) - await vi.advanceTimersByTimeAsync(0) - }) - } - - it('reads fresh checks when the window regains focus while off, without a visibility change', async () => { - setPRAutoRefreshCadence('off') - const { fetchChecks } = mount() - await act(async () => { - await vi.advanceTimersByTimeAsync(0) - }) - expect(fetchChecks).toHaveBeenCalledTimes(1) - await act(async () => { - await vi.advanceTimersByTimeAsync(5 * 60_000) - }) - await focusWindow() - expect(fetchChecks).toHaveBeenCalledTimes(2) - // A focus read is the user looking: the host must not pace it. - expect(fetchChecks).toHaveBeenLastCalledWith({ force: true }) - // Focus starts no timer while off. - await act(async () => { - await vi.advanceTimersByTimeAsync(60 * 60_000) - }) - expect(fetchChecks).toHaveBeenCalledTimes(2) - }) - - it('does not re-read on focus while off within the minute after the last read', async () => { - setPRAutoRefreshCadence('off') - const { fetchChecks } = mount() - await act(async () => { - await vi.advanceTimersByTimeAsync(30_000) - }) - await focusWindow() - expect(fetchChecks).toHaveBeenCalledTimes(1) - }) - - it('does not re-read settled checks on focus while off', async () => { - setPRAutoRefreshCadence('off') - const { fetchChecks } = mount(undefined, { state: 'merged', checksStatus: 'success' }) - await act(async () => { - await vi.advanceTimersByTimeAsync(0) - }) - expect(fetchChecks).toHaveBeenCalledTimes(1) - await act(async () => { - await vi.advanceTimersByTimeAsync(5 * 60_000) - }) - await focusWindow() - expect(fetchChecks).toHaveBeenCalledTimes(1) - }) - - it('reads at once when the window returns under reduced, then follows the stretched interval', async () => { - setPRAutoRefreshCadence('reduced') - const { fetchChecks } = mount() - await act(async () => { - await vi.advanceTimersByTimeAsync(0) - }) - expect(fetchChecks).toHaveBeenCalledTimes(1) - await act(async () => { - await vi.advanceTimersByTimeAsync(2 * 60_000) - }) - expect(fetchChecks).toHaveBeenCalledTimes(1) - await focusWindow() - expect(fetchChecks).toHaveBeenCalledTimes(2) - // The return is the user looking: the host must not pace it. - expect(fetchChecks).toHaveBeenLastCalledWith({ force: true }) - - await act(async () => { - await vi.advanceTimersByTimeAsync(5 * 60_000 - 2_000) - }) - expect(fetchChecks).toHaveBeenCalledTimes(2) - await act(async () => { - await vi.advanceTimersByTimeAsync(3_000) - }) - expect(fetchChecks).toHaveBeenCalledTimes(3) - expect(fetchChecks).toHaveBeenLastCalledWith({ force: false, background: true }) - }) - - it('does not re-read on a return under reduced within the Default interval', async () => { - setPRAutoRefreshCadence('reduced') - const { fetchChecks } = mount() - await act(async () => { - await vi.advanceTimersByTimeAsync(30_000) - }) - await focusWindow() - expect(fetchChecks).toHaveBeenCalledTimes(1) - }) - - it('keeps the stopped-distro guard on a GitLab focus return', async () => { - setPRAutoRefreshCadence('reduced') - const { fetchGitLabDetails } = mount(undefined, {}, undefined, true) - await act(async () => { - await vi.advanceTimersByTimeAsync(120_000) - }) - await focusWindow() - expect(fetchGitLabDetails).toHaveBeenLastCalledWith({ background: true }) - }) - - // Three finite waves of eight ordinary calls (21 s each after their - // own admission) hold the checks read about 63 s before it is sent. - it.each(['background', 'fresh', 'reopen', 'fresh-reopen'] as const)( - 'satisfies a return while a %s checks read waits for admission', - async (arm) => { - setPRAutoRefreshCadenceForHost('env-1', 'reduced') - const pool = new RuntimeRpcCallQueuePool() - type Observation = { observedAt: number; by: string } - type Operation = { - id: number - background: boolean - issuedAt: number - admittedAt?: number - completedAt?: number - returned?: Observation - } - const operations: Operation[] = [] - const blockers: { queuedAt: number; admittedAt?: number; doneAt?: number }[] = [] - const pending: Promise[] = [] - let hostRead: Observation | null = null - let visible: Observation | null = null - const saturate = () => { - // ast-grep-ignore: test-no-polling-loop-tsx -- Fixed fake-clock operations fill the real RPC admission pool. - for (let call = 0; call < 24; call += 1) { - const blocker: (typeof blockers)[number] = { queuedAt: Date.now() } - blockers.push(blocker) - pending.push( - pool.enqueue('env-1', 'files.read', async () => { - blocker.admittedAt = Date.now() - // ast-grep-ignore: test-no-real-time-wait-tsx -- Fake-clock provider time holds the real admission slot. - await new Promise((resolve) => setTimeout(resolve, 21_000)) - blocker.doneAt = Date.now() - }) - ) - } - } - const fetchImpl = async (options: { background?: boolean } = {}) => { - const operation: Operation = { - id: operations.length, - background: options.background === true, - issuedAt: Date.now() - } - operations.push(operation) - const answered = pool.enqueue( - 'env-1', - 'github.prChecks', - async () => { - operation.admittedAt = Date.now() - // ast-grep-ignore: test-no-real-time-wait-tsx -- Fake-clock provider completion preserves the tested response ordering. - await new Promise((resolve) => setTimeout(resolve, 2_000)) - const paced = - operation.background && - hostRead !== null && - Date.now() - hostRead.observedAt < 300_000 - if (!paced) { - hostRead = { observedAt: Date.now(), by: `operation ${operation.id}` } - } - operation.completedAt = Date.now() - operation.returned = hostRead! - return hostRead! - }, - 0, - undefined, - operation.background ? { reason: 'swr' } : {} - ) - pending.push(answered) - visible = await answered - } - let original: Operation - let panel: ReturnType | undefined - if (arm === 'fresh' || arm === 'fresh-reopen') { - // The lane is full before the panel opens: the opening (fresh) read itself waits. - saturate() - panel = mount('runtime:env-1', {}, fetchImpl) - await act(async () => { - await vi.advanceTimersByTimeAsync(0) - }) - original = operations[0]! - hostRead = { observedAt: original.issuedAt - 50_000, by: 'another reader' } - } else { - panel = mount('runtime:env-1', {}, fetchImpl) - await act(async () => { - await vi.advanceTimersByTimeAsync(2_100) - }) - // Reduced, open and pending: the next timer read is about 300 s after the first completed. - // The lane fills one second before it; then the tick is awaited. - await act(async () => { - await vi.advanceTimersByTimeAsync(operations[0]!.completedAt! + 299_000 - Date.now()) - }) - expect(operations.length, 'no timer read before the lane fills').toBe(1) - saturate() - for (let step = 0; step < 50 && operations.length === 1; step += 1) { - await act(async () => { - await vi.advanceTimersByTimeAsync(100) - }) - } - original = operations[1]! - // Another reader of the same head filled the host's paced read 50 s before this one. - hostRead = { observedAt: original.issuedAt - 50_000, by: 'another reader' } - } - const A = original.issuedAt - // The window comes back 61 s after the original read was issued: past Default's 60 s age. - await act(async () => { - await vi.advanceTimersByTimeAsync(A + 61_000 - Date.now()) - }) - const focusAt = Date.now() - if (arm === 'reopen' || arm === 'fresh-reopen') { - await act(async () => { - panel!.model.isPanelVisible = false - panel!.rerender() - }) - await act(async () => { - panel!.model.isPanelVisible = true - panel!.rerender() - }) - } - if (arm === 'background' || arm === 'fresh') { - await act(async () => { - window.dispatchEvent(new Event('focus')) - await vi.advanceTimersByTimeAsync(0) - }) - } - const afterFocus = operations.length - // Admission about 63 s after issue, answer 2 s later; then 10 s more, well before the next tick. - await act(async () => { - await vi.advanceTimersByTimeAsync(A + 75_000 - Date.now()) - }) - await Promise.all(pending) - const evidence = JSON.stringify({ arm, A, focusAt, operations, blockers, visible }, null, 1) - expect(original.background, `original intent\n${evidence}`).toBe( - arm === 'background' || arm === 'reopen' - ) - expect(focusAt - A, `focus at A + 61 s\n${evidence}`).toBe(61_000) - expect(afterFocus, `the return found the original in flight\n${evidence}`).toBe( - operations.indexOf(original) + 1 - ) - expect( - original.admittedAt! - A >= 61_000, - `held before send past the return\n${evidence}` - ).toBe(true) - expect( - original.completedAt! > focusAt, - `original completed after the return\n${evidence}` - ).toBe(true) - const later = operations.slice(operations.indexOf(original) + 1) - if (arm === 'background' || arm === 'reopen') { - expect( - original.returned, - `original returned the paced read observed at A - 50 s\n${evidence}` - ).toEqual({ observedAt: A - 50_000, by: 'another reader' }) - // The qualifying return stays owed after that stale completion, as - // exactly one fresh read, and its fresh observation is what the checks show. - expect( - later.map((operation) => operation.background), - `exactly one owed fresh read\n${evidence}` - ).toEqual([false]) - expect( - visible!.observedAt >= focusAt && visible!.by === `operation ${later[0]?.id}`, - `the fresh read's observation is shown\n${evidence}` - ).toBe(true) - } else { - // Control: the original fresh completion satisfies the return; no duplicate trailing read. - expect(original.returned!.observedAt >= focusAt, `fresh answer\n${evidence}`).toBe(true) - expect(visible, `fresh answer shown\n${evidence}`).toEqual(original.returned) - expect(later, `no duplicate read\n${evidence}`).toEqual([]) - } - } - ) -}) diff --git a/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-detail-timer.ts b/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-detail-timer.ts index 3d860f2a21c..1eba879fed8 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-detail-timer.ts +++ b/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-detail-timer.ts @@ -3,7 +3,7 @@ import { REVIEW_REFRESH_COOLDOWN_MS, subscribePRAutoRefreshCadence, type PRAutoRefreshCadence -} from '../../../../../../shared/review-refresh-policy' +} from '../../../../../../shared/source-control/hosted-review/review-refresh-policy' import { installWindowVisibilityTimeoutPoller } from '@/lib/window-activity/window-visibility-timeout-poller' import { getPRRefreshOwnerRuntimeEnvironmentId } from '@/store/github/repositories/repository-routing' import { hostPRAutoRefreshCadence } from '@/store/github/refresh/remote-host-pr-auto-refresh-cadence' diff --git a/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-list-state.tsx b/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-list-state.tsx index 10800ce097d..7314d185bfc 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-list-state.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/refresh/use-checks-list-state.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react' import { useAppStore } from '@/store/index' import { useActiveWorktree } from '@/store/workspaces/selection/use-selected-worktree' -import type { GitLabProjectRef } from '../../../../../../shared/gitlab-types' +import type { GitLabProjectRef } from '../../../../../../shared/gitlab/gitlab-types' import type { PRCheckDetail, PRCheckRunDetails diff --git a/src/renderer/src/components/right-sidebar/checks-panel/review-data/gitlab-review-client.ts b/src/renderer/src/components/right-sidebar/checks-panel/review-data/gitlab-review-client.ts index a25996caa15..c18422671f0 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/review-data/gitlab-review-client.ts +++ b/src/renderer/src/components/right-sidebar/checks-panel/review-data/gitlab-review-client.ts @@ -2,7 +2,7 @@ import type { PRComment } from '../../../../../../shared/github/comments/comment import type { GitLabDiscussionResolveResult, GitLabWorkItemDetails -} from '../../../../../../shared/gitlab-types' +} from '../../../../../../shared/gitlab/gitlab-types' import { gitLabApiFor } from '@/runtime/repository-gitlab/gitlab-owner-api' import type { HostedReviewInfo as ChecksPanelReview } from '../../../../../../shared/source-control/hosted-review/hosted-review-contracts' diff --git a/src/renderer/src/components/right-sidebar/file-explorer/content-search/file-search-include-pattern.ts b/src/renderer/src/components/right-sidebar/file-explorer/content-search/file-search-include-pattern.ts index 3e656ba2930..3b0fff13e28 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/content-search/file-search-include-pattern.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/content-search/file-search-include-pattern.ts @@ -1,4 +1,4 @@ -import { normalizeRelativePath } from '../../../../../../shared/cross-platform-path' +import { normalizeRelativePath } from '../../../../../../shared/file-access/cross-platform-path' const SEARCH_GLOB_LITERAL_META = new Set(['\\', '*', '?', '[', ']', '{', '}', '!', ',']) diff --git a/src/renderer/src/components/right-sidebar/file-explorer/mutations/file-explorer-batch-deletion.ts b/src/renderer/src/components/right-sidebar/file-explorer/mutations/file-explorer-batch-deletion.ts index 6f24433749a..f9b9d6e1b90 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/mutations/file-explorer-batch-deletion.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/mutations/file-explorer-batch-deletion.ts @@ -1,7 +1,7 @@ import { createNormalizedPathInsideOrEqualMatcher, normalizeRuntimePathForComparison -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' import type { TreeNode } from '../tree/file-explorer-types' // Delete selected ancestors only; separate descendant requests would race missing paths and report spurious errors. diff --git a/src/renderer/src/components/right-sidebar/file-explorer/navigation/file-explorer-display-root.ts b/src/renderer/src/components/right-sidebar/file-explorer/navigation/file-explorer-display-root.ts index 5b612aae347..adb37f9a4d5 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/navigation/file-explorer-display-root.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/navigation/file-explorer-display-root.ts @@ -2,7 +2,7 @@ import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' import { getRelativePathInsideRoot, joinPath } from '@/lib/path' import { FILE_EXPLORER_FULL_ROOT } from '../../../../../../shared/file-listing/file-explorer-display-root' -import { splitPathSegments } from '../../../../../../shared/cross-platform-path' +import { splitPathSegments } from '../../../../../../shared/file-access/cross-platform-path' export type ExplorerRootOption = { value: string; label: string } diff --git a/src/renderer/src/components/right-sidebar/file-explorer/navigation/file-explorer-paths.ts b/src/renderer/src/components/right-sidebar/file-explorer/navigation/file-explorer-paths.ts index 6177681ccb3..0a88ea2fa75 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/navigation/file-explorer-paths.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/navigation/file-explorer-paths.ts @@ -3,7 +3,7 @@ import { isPathInsideOrEqual, relativePathInsideRoot, splitPathSegments -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' import { shouldIncludeFileExplorerEntry } from '../tree/file-explorer-entries' export function isPathEqualOrDescendant(candidatePath: string, targetPath: string): boolean { diff --git a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-dir-pages.ts b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-dir-pages.ts index 585f5c2a159..9299f2e6051 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-dir-pages.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-dir-pages.ts @@ -7,7 +7,7 @@ import { readFileExplorerDirectory, type FileExplorerDirectoryListing } from './file-explorer-directory-listing' -import { splitPathSegments } from '../../../../../../shared/cross-platform-path' +import { splitPathSegments } from '../../../../../../shared/file-access/cross-platform-path' import { dirname } from '@/lib/path' import type { FileExplorerRowProjection } from './file-explorer-row-projection' import { describeFileExplorerReadError } from '../panel/file-explorer-read-error' diff --git a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-entries.ts b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-entries.ts index fc40d830218..88d9572d4c6 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-entries.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-entries.ts @@ -1,5 +1,5 @@ import type { DirEntry } from '../../../../../../shared/file-listing/directory-entry' -import { splitPathSegments } from '../../../../../../shared/cross-platform-path' +import { splitPathSegments } from '../../../../../../shared/file-access/cross-platform-path' export function shouldIncludeFileExplorerEntry(entry: DirEntry): boolean { return entry.name !== '.git' && entry.name !== 'node_modules' diff --git a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.ts b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.ts index 7db4e428f49..6ff654230b3 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/tree/file-explorer-name-filter-projection.ts @@ -2,7 +2,7 @@ import { getRelativePathInsideRoot, joinPath } from '@/lib/path' import { normalizeRelativePath, splitPathSegments -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' import { compareFileNames } from '../../../../../../shared/file-listing/file-name-sort' import { FILE_NAME_FILTER_QUERY_MAX_BYTES, diff --git a/src/renderer/src/components/right-sidebar/file-explorer/tree/use-file-explorer-tree-load-effects.ts b/src/renderer/src/components/right-sidebar/file-explorer/tree/use-file-explorer-tree-load-effects.ts index 960980d0db4..bc154cdd776 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/tree/use-file-explorer-tree-load-effects.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/tree/use-file-explorer-tree-load-effects.ts @@ -5,7 +5,7 @@ import { shouldResetFileExplorerForVisibleWorktree } from '../navigation/file-ex import { decideExpandedDirLoad } from '../watching/file-explorer-stale-dir-cache' import { clearFileExplorerUndoHistory } from '../mutations/fileExplorerUndoRedo' import type { DirCache } from './file-explorer-types' -import { splitPathSegments } from '../../../../../../shared/cross-platform-path' +import { splitPathSegments } from '../../../../../../shared/file-access/cross-platform-path' import { takeRecentWorkspaceSwitchWake } from '@/lib/workspace/activation/workspace-switch-user-act' import { runtimeEnvironmentIdOrLocalUnlessTwin } from '@/lib/workspace/ownership/worktree-runtime-owner' import { subscribeRuntimeHostContactRegained } from '@/runtime/hosts/connections/runtime-host-contact-regained' diff --git a/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-path.ts b/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-path.ts index 13b7142df11..329db119227 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-path.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-path.ts @@ -4,7 +4,7 @@ import { isWindowsAbsolutePathLike, normalizeRuntimePathForComparison, relativePathInsideRoot -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' export function normalizeExplorerAbsolutePath(path: string): string { return path === '/' || /^[A-Za-z]:[\\/]$/.test(path) diff --git a/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-reconcile.ts b/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-reconcile.ts index 8284ed08cb0..cce381769ef 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-reconcile.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-reconcile.ts @@ -4,7 +4,7 @@ import type { DirCache, TreeNode } from '../tree/file-explorer-types' import { isPathInsideOrEqual, normalizeRuntimePathForComparison -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' import { purgeDirCacheSubtrees, purgeExpandedDirsSubtrees, diff --git a/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-refresh-scheduler.ts b/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-refresh-scheduler.ts index 309eed7548e..6a97a07aa74 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-refresh-scheduler.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watch-refresh-scheduler.ts @@ -1,5 +1,5 @@ import type { FileExplorerTreeRefreshOutcome } from '../tree/file-explorer-types' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import { forEachWithConcurrency } from '../../../../../../shared/concurrency/map-with-concurrency' export type FileExplorerWatchRefreshScheduler = { diff --git a/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watcher-reconcile.ts b/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watcher-reconcile.ts index 513814289ad..a5682cde98a 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watcher-reconcile.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/watching/file-explorer-watcher-reconcile.ts @@ -2,7 +2,7 @@ import type { Dispatch, SetStateAction } from 'react' import type { DirCache } from '../tree/file-explorer-types' import { isPathEqualOrDescendant } from '../navigation/file-explorer-paths' import { useAppStore } from '@/store/index' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' // dirCache is component-local; accept its setter without coupling the watch effect to Zustand (design §5.2). diff --git a/src/renderer/src/components/right-sidebar/file-explorer/watching/useFileExplorerWatch.ts b/src/renderer/src/components/right-sidebar/file-explorer/watching/useFileExplorerWatch.ts index 901c130d11c..8e56d2e8dd3 100644 --- a/src/renderer/src/components/right-sidebar/file-explorer/watching/useFileExplorerWatch.ts +++ b/src/renderer/src/components/right-sidebar/file-explorer/watching/useFileExplorerWatch.ts @@ -15,7 +15,7 @@ import { isWorktreeCatchUpPayload, ORCA_WORKTREE_FILE_CHANGE_EVENT } from '@/hooks/worktree-file-change-event' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import { getFileExplorerOperationOwner, getFileExplorerOperationOwnerFromState, diff --git a/src/renderer/src/components/right-sidebar/source-control/ai/source-control-recovery-admission.ts b/src/renderer/src/components/right-sidebar/source-control/ai/source-control-recovery-admission.ts index e2f7a50bfb8..30ba2caa585 100644 --- a/src/renderer/src/components/right-sidebar/source-control/ai/source-control-recovery-admission.ts +++ b/src/renderer/src/components/right-sidebar/source-control/ai/source-control-recovery-admission.ts @@ -2,7 +2,7 @@ import { toast } from 'sonner' import { translate } from '@/i18n/i18n' import { getRuntimeGitMutationInFlight } from '@/runtime/source-control/git/runtime-git-status-client' import type { RuntimeGitContext } from '@/runtime/source-control/git/runtime-git-client-context' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' export function sourceControlRecoveryScopeKey(context: RuntimeGitContext): string { return JSON.stringify([ diff --git a/src/renderer/src/components/right-sidebar/source-control/branches/branch-picker-rows.ts b/src/renderer/src/components/right-sidebar/source-control/branches/branch-picker-rows.ts index 7b8e5f5e7cd..efc4c0d8c6c 100644 --- a/src/renderer/src/components/right-sidebar/source-control/branches/branch-picker-rows.ts +++ b/src/renderer/src/components/right-sidebar/source-control/branches/branch-picker-rows.ts @@ -4,7 +4,7 @@ import type { } from '../../../../../../shared/worktree/catalog/runtime-worktree-contracts' import type { BranchSwitchTarget } from '../../../../../../shared/git/branch-switch-target' import { isBranchNameValid } from '../../../../../../shared/git/branch-switch-target' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import type { ExecutionHostId } from '../../../../../../shared/execution-host' export const LOCAL_BRANCH_WINDOW = 50 diff --git a/src/renderer/src/components/right-sidebar/source-control/sync/git-status-file-watch-refresh.ts b/src/renderer/src/components/right-sidebar/source-control/sync/git-status-file-watch-refresh.ts index bca5e2ae357..3a8aebdfb6c 100644 --- a/src/renderer/src/components/right-sidebar/source-control/sync/git-status-file-watch-refresh.ts +++ b/src/renderer/src/components/right-sidebar/source-control/sync/git-status-file-watch-refresh.ts @@ -6,7 +6,7 @@ import { runtimeEnvironmentIdOrLocalUnlessTwin } from '@/lib/workspace/ownership import { normalizeRuntimePathForComparison, relativePathInsideRoot -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' import type { FsChangedPayload } from '../../../../../../shared/file-watch/filesystem-change-event' import type { ActiveRightSidebarTab, diff --git a/src/renderer/src/components/right-sidebar/source-control/sync/git-status-push-signal-refresh.ts b/src/renderer/src/components/right-sidebar/source-control/sync/git-status-push-signal-refresh.ts index e2caee2e37f..e856c65ca65 100644 --- a/src/renderer/src/components/right-sidebar/source-control/sync/git-status-push-signal-refresh.ts +++ b/src/renderer/src/components/right-sidebar/source-control/sync/git-status-push-signal-refresh.ts @@ -7,7 +7,7 @@ import { type TerminalCommandFinishedEventDetail } from '@/hooks/terminal-command-finished-event' import type { GitStatusMetadataChangedEvent } from '../../../../../../shared/worktree/types' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import { gitStatusSignalRecipientTest } from './git-status-signal-attribution' type UseGitStatusPushSignalRefreshParams = { diff --git a/src/renderer/src/components/right-sidebar/source-control/sync/git-status-signal-attribution.ts b/src/renderer/src/components/right-sidebar/source-control/sync/git-status-signal-attribution.ts index 70f04ea7c24..4f2ef0a7100 100644 --- a/src/renderer/src/components/right-sidebar/source-control/sync/git-status-signal-attribution.ts +++ b/src/renderer/src/components/right-sidebar/source-control/sync/git-status-signal-attribution.ts @@ -1,5 +1,5 @@ import type { GitStatusMetadataChangedEvent } from '../../../../../../shared/worktree/types' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' const REFRESH_EVERY_OBSERVER = (): boolean => true diff --git a/src/renderer/src/components/settings/navigation/settings-project-list.ts b/src/renderer/src/components/settings/navigation/settings-project-list.ts index 98c2f5f7a32..4002684f02a 100644 --- a/src/renderer/src/components/settings/navigation/settings-project-list.ts +++ b/src/renderer/src/components/settings/navigation/settings-project-list.ts @@ -7,7 +7,7 @@ import { } from '../../../../../shared/execution-host' import { projectHostSetupProjectionFromRepos } from '../../../../../shared/project/host-setup/project-host-setup-projection' import { getRepoHostIdentityForParts } from '../../../../../shared/repository/repo-host-identity' -import { normalizeRuntimePathForComparison } from '../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../shared/file-access/cross-platform-path' import { buildProjectGroupingIndex, isCheckoutScopedProjectSetup, diff --git a/src/renderer/src/components/settings/navigation/use-settings-repo-scroll-effects.ts b/src/renderer/src/components/settings/navigation/use-settings-repo-scroll-effects.ts index 0dfb90ddd8d..a4b57058a82 100644 --- a/src/renderer/src/components/settings/navigation/use-settings-repo-scroll-effects.ts +++ b/src/renderer/src/components/settings/navigation/use-settings-repo-scroll-effects.ts @@ -6,7 +6,7 @@ import { import { cancelSettingsListReveal } from '../section-layout/settings-list-scroll' import { resolveGeneralSubPage } from '../general/general-sub-pages' import { useEffect, useRef, useState } from 'react' -import type { OrcaHooks } from '../../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import { getRepoExecutionHostId } from '../../../../../shared/execution-host' import { checkRuntimeHooks } from '@/runtime/repo-hooks/runtime-hooks-client' import { getRepoHostIdentity } from '../../../../../shared/repository/repo-host-identity' diff --git a/src/renderer/src/components/settings/page/use-settings-store-model.ts b/src/renderer/src/components/settings/page/use-settings-store-model.ts index 032814d4b3d..ee94f6e1c03 100644 --- a/src/renderer/src/components/settings/page/use-settings-store-model.ts +++ b/src/renderer/src/components/settings/page/use-settings-store-model.ts @@ -1,7 +1,7 @@ import { useSupportedGroupHookSettings } from '@/hooks/use-supported-group-hook-settings' import type { GeneralSubPage } from '../general/general-sub-pages' import { useCallback, useMemo, useState } from 'react' -import type { OrcaHooks } from '../../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { ProjectHostSetup } from '../../../../../shared/project/project-types' import { DEFAULT_APP_FONT_FAMILY } from '../../../../../shared/constants' import { useAppStore } from '../../../store/index' diff --git a/src/renderer/src/components/settings/repository/RepositoryPane.tsx b/src/renderer/src/components/settings/repository/RepositoryPane.tsx index e533e557c1d..2908027d8ed 100644 --- a/src/renderer/src/components/settings/repository/RepositoryPane.tsx +++ b/src/renderer/src/components/settings/repository/RepositoryPane.tsx @@ -1,5 +1,8 @@ import { useCallback, useRef, useState } from 'react' -import type { OrcaHooks, RepoHookSettings } from '../../../../../shared/orca-yaml-hook-types' +import type { + OrcaHooks, + RepoHookSettings +} from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { Project, ProjectHostSetup, diff --git a/src/renderer/src/components/settings/repository/hooks/RepositoryHookPolicySettings.tsx b/src/renderer/src/components/settings/repository/hooks/RepositoryHookPolicySettings.tsx index dd328dc807b..a86a4f53286 100644 --- a/src/renderer/src/components/settings/repository/hooks/RepositoryHookPolicySettings.tsx +++ b/src/renderer/src/components/settings/repository/hooks/RepositoryHookPolicySettings.tsx @@ -4,7 +4,7 @@ import type { OrcaHooks, SetupAgentStartupPolicy, SetupRunPolicy -} from '../../../../../../shared/orca-yaml-hook-types' +} from '../../../../../../shared/workspace-setup/orca-yaml-hook-types' import { Trans } from 'react-i18next' import { i18n, translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/settings/repository/hooks/RepositoryHooksSection.tsx b/src/renderer/src/components/settings/repository/hooks/RepositoryHooksSection.tsx index deeecbb9239..fef6d1f38e8 100644 --- a/src/renderer/src/components/settings/repository/hooks/RepositoryHooksSection.tsx +++ b/src/renderer/src/components/settings/repository/hooks/RepositoryHooksSection.tsx @@ -6,13 +6,13 @@ import type { RepoHookSettings, SetupAgentStartupPolicy, SetupRunPolicy -} from '../../../../../../shared/orca-yaml-hook-types' +} from '../../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { WorkspaceHookOwner } from '../../../../../../shared/workspace-setup/hooks/workspace-hook-owner' import { Button } from '@/components/ui/button' import type { Repo } from '../../../../../../shared/repository/repo-types' import { getRepoExecutionHostId } from '../../../../../../shared/execution-host' import { isFolderRepo } from '../../../../../../shared/repository/repo-kind' -import { resolveHookCommandSourcePolicy } from '../../../../../../shared/hook-command-source-policy' +import { resolveHookCommandSourcePolicy } from '../../../../../../shared/workspace-setup/hooks/hook-command-source-policy' import { useAppStore } from '@/store/index' import { useTranslate } from '@/i18n/use-translate' import { SearchableSetting } from '../../section-layout/SearchableSetting' diff --git a/src/renderer/src/components/settings/repository/hooks/RepositoryHooksYamlStatus.tsx b/src/renderer/src/components/settings/repository/hooks/RepositoryHooksYamlStatus.tsx index b9893ad0bde..0b3aa32d143 100644 --- a/src/renderer/src/components/settings/repository/hooks/RepositoryHooksYamlStatus.tsx +++ b/src/renderer/src/components/settings/repository/hooks/RepositoryHooksYamlStatus.tsx @@ -1,6 +1,6 @@ import { AlertTriangle, ChevronRight } from 'lucide-react' import { Trans } from 'react-i18next' -import type { OrcaHooks } from '../../../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../../../shared/workspace-setup/orca-yaml-hook-types' import { Button } from '../../../ui/button' import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../../../ui/collapsible' import { i18n, translate } from '@/i18n/i18n' diff --git a/src/renderer/src/components/settings/repository/hooks/repository-hook-settings-draft.ts b/src/renderer/src/components/settings/repository/hooks/repository-hook-settings-draft.ts index 5236be6e5df..b72e1b3c4dd 100644 --- a/src/renderer/src/components/settings/repository/hooks/repository-hook-settings-draft.ts +++ b/src/renderer/src/components/settings/repository/hooks/repository-hook-settings-draft.ts @@ -2,7 +2,7 @@ import type { HookCommandSourcePolicy, OrcaHooks, RepoHookSettings -} from '../../../../../../shared/orca-yaml-hook-types' +} from '../../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { Repo } from '../../../../../../shared/repository/repo-types' import { DEFAULT_REPO_HOOK_SETTINGS } from './repository-hook-defaults' import { translate } from '@/i18n/i18n' diff --git a/src/renderer/src/components/settings/repository/hooks/use-repository-hook-settings-draft.ts b/src/renderer/src/components/settings/repository/hooks/use-repository-hook-settings-draft.ts index ddd04942f69..cfe8517c6bc 100644 --- a/src/renderer/src/components/settings/repository/hooks/use-repository-hook-settings-draft.ts +++ b/src/renderer/src/components/settings/repository/hooks/use-repository-hook-settings-draft.ts @@ -1,5 +1,5 @@ import { useCallback, useEffect, useRef, useState } from 'react' -import type { RepoHookSettings } from '../../../../../../shared/orca-yaml-hook-types' +import type { RepoHookSettings } from '../../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { Repo } from '../../../../../../shared/repository/repo-types' import { areHookSettingsDraftsEqual, diff --git a/src/renderer/src/components/settings/repository/mcp/McpConfigSection.tsx b/src/renderer/src/components/settings/repository/mcp/McpConfigSection.tsx index a583d7384da..95084a35b2d 100644 --- a/src/renderer/src/components/settings/repository/mcp/McpConfigSection.tsx +++ b/src/renderer/src/components/settings/repository/mcp/McpConfigSection.tsx @@ -14,7 +14,7 @@ import { inspectMcpConfigContent, MCP_CONFIG_CANDIDATES, MCP_STARTER_CONFIG -} from '../../../../../../shared/mcp-config' +} from '../../../../../../shared/mcp/configuration/mcp-config' import { useAppStore } from '../../../../store/index' import { selectRuntimeAwareSshStatus } from '../../../../store/slices/ssh/runtime-environment-ssh-selectors' import { diff --git a/src/renderer/src/components/settings/source-control/PRAutoRefreshControl.tsx b/src/renderer/src/components/settings/source-control/PRAutoRefreshControl.tsx index 265d3e724d0..930ad81ae4a 100644 --- a/src/renderer/src/components/settings/source-control/PRAutoRefreshControl.tsx +++ b/src/renderer/src/components/settings/source-control/PRAutoRefreshControl.tsx @@ -1,7 +1,7 @@ import { useId } from 'react' import { Info } from 'lucide-react' import { Button } from '@/components/ui/button' -import type { PRAutoRefreshCadence } from '../../../../../shared/review-refresh-policy' +import type { PRAutoRefreshCadence } from '../../../../../shared/source-control/hosted-review/review-refresh-policy' import { useTranslate } from '@/i18n/use-translate' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { SearchableSetting } from '../section-layout/SearchableSetting' diff --git a/src/renderer/src/components/settings/source-control/PRAutoRefreshSetting.fixture.tsx b/src/renderer/src/components/settings/source-control/PRAutoRefreshSetting.fixture.tsx index 444809e6180..7eb4592804a 100644 --- a/src/renderer/src/components/settings/source-control/PRAutoRefreshSetting.fixture.tsx +++ b/src/renderer/src/components/settings/source-control/PRAutoRefreshSetting.fixture.tsx @@ -2,7 +2,7 @@ import { useState, type ReactNode } from 'react' import { setPRAutoRefreshCadenceForHost, type PRAutoRefreshCadence -} from '../../../../../shared/review-refresh-policy' +} from '../../../../../shared/source-control/hosted-review/review-refresh-policy' import { useHostPRAutoRefreshCadence } from '@/store/github/refresh/remote-host-pr-auto-refresh-cadence' import { defineFixture } from '../../../component-fixtures/component-fixture' import { PRAutoRefreshControl } from './PRAutoRefreshControl' diff --git a/src/renderer/src/components/settings/source-control/PRAutoRefreshSetting.tsx b/src/renderer/src/components/settings/source-control/PRAutoRefreshSetting.tsx index 1ead24ae4fc..f964df32fa8 100644 --- a/src/renderer/src/components/settings/source-control/PRAutoRefreshSetting.tsx +++ b/src/renderer/src/components/settings/source-control/PRAutoRefreshSetting.tsx @@ -5,7 +5,7 @@ import type { RuntimeClientTarget } from '../../../../../shared/remote-runtime/h import { normalizePRAutoRefreshCadence, type PRAutoRefreshCadence -} from '../../../../../shared/review-refresh-policy' +} from '../../../../../shared/source-control/hosted-review/review-refresh-policy' import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' import { runtimeTargetEnvironmentId } from '@/runtime/rpc/targets/runtime-client-target' import { useAppStateValue } from '@/store/retained-views/app-state-view' diff --git a/src/renderer/src/components/settings/source-control/pr-auto-refresh-search.ts b/src/renderer/src/components/settings/source-control/pr-auto-refresh-search.ts index d4109ba404b..50293f7a272 100644 --- a/src/renderer/src/components/settings/source-control/pr-auto-refresh-search.ts +++ b/src/renderer/src/components/settings/source-control/pr-auto-refresh-search.ts @@ -1,6 +1,6 @@ import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' -import type { PRAutoRefreshCadence } from '../../../../../shared/review-refresh-policy' +import type { PRAutoRefreshCadence } from '../../../../../shared/source-control/hosted-review/review-refresh-policy' import { matchesSettingsSearch } from '../search/settings-search' export const PR_AUTO_REFRESH_KEYWORDS = [ diff --git a/src/renderer/src/components/settings/virtual-machines/recipes/EphemeralVmRecipeRow.tsx b/src/renderer/src/components/settings/virtual-machines/recipes/EphemeralVmRecipeRow.tsx index 2d152126679..e6fcdb0f1e2 100644 --- a/src/renderer/src/components/settings/virtual-machines/recipes/EphemeralVmRecipeRow.tsx +++ b/src/renderer/src/components/settings/virtual-machines/recipes/EphemeralVmRecipeRow.tsx @@ -1,6 +1,6 @@ import { KeyRound, Play } from 'lucide-react' import type React from 'react' -import type { OrcaHooks } from '../../../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../../../shared/workspace-setup/orca-yaml-hook-types' import { isRecipeEnvNamePassed } from '../../../../../../shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-env' import { Button } from '../../../ui/button' import { useTranslate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-activity-list.tsx b/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-activity-list.tsx index 53f028c7cc5..9395188a4a0 100644 --- a/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-activity-list.tsx +++ b/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-activity-list.tsx @@ -20,7 +20,7 @@ import { } from 'lucide-react' import { useTranslate } from '@/i18n/use-translate' import { uiDateTimeFormat } from '@/i18n/ui-intl-formatters' -import { formatBytes } from '../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../shared/text/format-bytes' import type { WorkspaceCleanupRun, WorkspaceCleanupRunRow diff --git a/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-rule-change-dialog.tsx b/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-rule-change-dialog.tsx index bbd1a136780..a779ec37bcf 100644 --- a/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-rule-change-dialog.tsx +++ b/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-rule-change-dialog.tsx @@ -1,7 +1,7 @@ import { useState } from 'react' import { useTranslate } from '@/i18n/use-translate' import { cn } from '@/lib/class-names' -import { formatBytes } from '../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../shared/text/format-bytes' import type { WorkspaceCleanupPreviewRow } from '../../../../../shared/workspace-cleanup/workspace-cleanup-run' import { Button } from '../../ui/button' import { Checkbox } from '../../ui/checkbox' diff --git a/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-rule-rows.tsx b/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-rule-rows.tsx index d9c4d33ca12..fd514ca22a7 100644 --- a/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-rule-rows.tsx +++ b/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-rule-rows.tsx @@ -1,7 +1,7 @@ import { useState } from 'react' import { useTranslate } from '@/i18n/use-translate' import { useAppStateValue } from '@/store/retained-views/app-state-view' -import { formatBytes } from '../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../shared/text/format-bytes' import { WORKSPACE_ARCHIVE_SUPPORTED, WORKSPACE_CLEANUP_POLICY_MAX_DAYS, diff --git a/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-settings-status.tsx b/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-settings-status.tsx index 04e8faab843..8c502fae53d 100644 --- a/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-settings-status.tsx +++ b/src/renderer/src/components/settings/workspace-cleanup/workspace-cleanup-settings-status.tsx @@ -1,7 +1,7 @@ import { useTranslate, type Translate } from '@/i18n/use-translate' import { formatUiRelativeTime } from '@/i18n/relative-time-format' import { useAppStore } from '@/store' -import { formatBytes } from '../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../shared/text/format-bytes' import type { WorkspaceCleanupReport } from '../../../../../shared/workspace-cleanup/workspace-cleanup-run' import { Button } from '../../ui/button' import { SearchableSetting } from '../section-layout/SearchableSetting' diff --git a/src/renderer/src/components/sidebar/OrcaYamlTrustDialog.tsx b/src/renderer/src/components/sidebar/OrcaYamlTrustDialog.tsx index 6648d6eea73..4032e221f06 100644 --- a/src/renderer/src/components/sidebar/OrcaYamlTrustDialog.tsx +++ b/src/renderer/src/components/sidebar/OrcaYamlTrustDialog.tsx @@ -9,7 +9,7 @@ import { } from '@/components/ui/dialog' import { Button } from '@/components/ui/button' import { useAppStore } from '@/store' -import type { OrcaHookTrustKind } from '../../../../shared/orca-hook-trust-entries' +import type { OrcaHookTrustKind } from '../../../../shared/workspace-setup/hooks/orca-hook-trust-entries' import { Trans } from 'react-i18next' import { i18n, translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/sidebar/project-admission/completion/project-added-default-checkout.ts b/src/renderer/src/components/sidebar/project-admission/completion/project-added-default-checkout.ts index 5f5f9c2676c..b18b8988881 100644 --- a/src/renderer/src/components/sidebar/project-admission/completion/project-added-default-checkout.ts +++ b/src/renderer/src/components/sidebar/project-admission/completion/project-added-default-checkout.ts @@ -4,7 +4,7 @@ import { track } from '@/diagnostics/telemetry/telemetry' import type { AddRepoDefaultCheckoutHandoffSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { EventProps } from '../../../../../../shared/telemetry/telemetry-event-classification' import type { DetectedWorktreeListResult, Worktree } from '../../../../../../shared/worktree/types' -import { relativePathInsideRoot } from '../../../../../../shared/cross-platform-path' +import { relativePathInsideRoot } from '../../../../../../shared/file-access/cross-platform-path' import { markOnboardingProjectAdded } from '@/components/onboarding/onboarding-project-checklist' import { finalizeImportedRepoAfterSkip } from './add-repo-skip-finalization' import { parseExecutionHostId, type ExecutionHostId } from '../../../../../../shared/execution-host' diff --git a/src/renderer/src/components/sidebar/project-admission/nested-import/AddRepoNestedImportStep.tsx b/src/renderer/src/components/sidebar/project-admission/nested-import/AddRepoNestedImportStep.tsx index 1fe45d74c19..04e5d1a0eb7 100644 --- a/src/renderer/src/components/sidebar/project-admission/nested-import/AddRepoNestedImportStep.tsx +++ b/src/renderer/src/components/sidebar/project-admission/nested-import/AddRepoNestedImportStep.tsx @@ -8,7 +8,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip import { NestedRepoChecklist } from '@/components/repo/NestedRepoChecklist' import type { NestedRepoScanResult } from '../../../../../../shared/project/groups/project-group-types' import { NestedRepoScanLimitNotice } from '../../../repo/NestedRepoScanLimitNotice' -import { getRuntimePathBasename } from '../../../../../../shared/cross-platform-path' +import { getRuntimePathBasename } from '../../../../../../shared/file-access/cross-platform-path' import { useTranslate } from '@/i18n/use-translate' type AddRepoNestedImportStepProps = { diff --git a/src/renderer/src/components/sidebar/workspace-actions/deletion/DeleteNestedWorktreesDialog.tsx b/src/renderer/src/components/sidebar/workspace-actions/deletion/DeleteNestedWorktreesDialog.tsx index b44d0bbe39d..d1bd77032c2 100644 --- a/src/renderer/src/components/sidebar/workspace-actions/deletion/DeleteNestedWorktreesDialog.tsx +++ b/src/renderer/src/components/sidebar/workspace-actions/deletion/DeleteNestedWorktreesDialog.tsx @@ -13,7 +13,7 @@ import { import { ScrollArea } from '@/components/ui/scroll-area' import { getIndexedAllWorktrees } from '@/store/slices/worktrees/listing/worktree-catalog-index' import { getWorktreeOnHostFromState } from '@/store/workspaces/selection/worktree-on-host-selector' -import { isPathInsideOrEqual } from '../../../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../../../shared/file-access/cross-platform-path' import { RemovalUnsavedFilesNotice } from './RemovalUnsavedFilesNotice' import { confirmUnsavedDiscard } from '@/store/slices/worktrees/teardown/removed-workspace-unsaved-files' import { useAppStore } from '@/store' diff --git a/src/renderer/src/components/sidebar/workspace-actions/deletion/delete-worktree-dirty-change-counts.ts b/src/renderer/src/components/sidebar/workspace-actions/deletion/delete-worktree-dirty-change-counts.ts index 2a48ccc7845..3488b79077c 100644 --- a/src/renderer/src/components/sidebar/workspace-actions/deletion/delete-worktree-dirty-change-counts.ts +++ b/src/renderer/src/components/sidebar/workspace-actions/deletion/delete-worktree-dirty-change-counts.ts @@ -6,7 +6,7 @@ import type { import type { Worktree } from '../../../../../../shared/worktree/types' import { getWorktreeHostIdentity } from '../../../../../../shared/worktree/host-qualified-identity' import type { WorktreeDeleteState } from '../../../../store/slices/worktrees/teardown/worktree-delete-state-types' -import { normalizeRelativePath } from '../../../../../../shared/cross-platform-path' +import { normalizeRelativePath } from '../../../../../../shared/file-access/cross-platform-path' import { buildStatusMap } from '../../../../lib/source-control/paths/git-path-decoration' import { isFolderWorkspaceDelete } from './delete-worktree-dialog-copy' import { getDeleteStateForWorktreeHost } from './worktree-delete-state-host-match' diff --git a/src/renderer/src/components/sidebar/workspace-actions/deletion/detach-worktree-delete-children.ts b/src/renderer/src/components/sidebar/workspace-actions/deletion/detach-worktree-delete-children.ts index 27714db27aa..c80e69baa0a 100644 --- a/src/renderer/src/components/sidebar/workspace-actions/deletion/detach-worktree-delete-children.ts +++ b/src/renderer/src/components/sidebar/workspace-actions/deletion/detach-worktree-delete-children.ts @@ -1,6 +1,6 @@ import type { AppState } from '@/store/types' import { forEachWithConcurrency } from '../../../../../../shared/concurrency/map-with-concurrency' -import { isPathInsideOrEqual } from '../../../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../../../shared/file-access/cross-platform-path' import { getWorktreeHostIdentity } from '../../../../../../shared/worktree/host-qualified-identity' import type { Worktree } from '../../../../../../shared/worktree/types' diff --git a/src/renderer/src/components/sidebar/workspace-actions/deletion/worktree-delete-execution.ts b/src/renderer/src/components/sidebar/workspace-actions/deletion/worktree-delete-execution.ts index 7bdc90d8625..582847dea12 100644 --- a/src/renderer/src/components/sidebar/workspace-actions/deletion/worktree-delete-execution.ts +++ b/src/renderer/src/components/sidebar/workspace-actions/deletion/worktree-delete-execution.ts @@ -3,7 +3,7 @@ import { getWorktreeOnHostFromState } from '@/store/workspaces/selection/worktre import { isPathInsideOrEqual, normalizeRuntimePathForComparison -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' import type { Worktree } from '../../../../../../shared/worktree/types' import { LOCAL_EXECUTION_HOST_ID } from '../../../../../../shared/execution-host' import { diff --git a/src/renderer/src/components/sidebar/workspace-card/review/workspace-reference-refresh-targets.ts b/src/renderer/src/components/sidebar/workspace-card/review/workspace-reference-refresh-targets.ts index f6ef696e1b5..505e0ffb006 100644 --- a/src/renderer/src/components/sidebar/workspace-card/review/workspace-reference-refresh-targets.ts +++ b/src/renderer/src/components/sidebar/workspace-card/review/workspace-reference-refresh-targets.ts @@ -3,7 +3,7 @@ import { useAppStore } from '@/store' import { getVisibleHostedReviewWorkspaces } from '@/store/slices/hosted-review/refresh/visible-hosted-review-refresh-targets' import { getHostedReviewCacheKey } from '@/store/slices/hosted-review/hosted-review-cache-identity' import type { VisibleHostedReviewRefreshTarget } from '@/store/slices/hosted-review/refresh/visible-hosted-review-refresh-scheduler' -import { reviewRefreshIntervalMs } from '../../../../../../shared/review-refresh-policy' +import { reviewRefreshIntervalMs } from '../../../../../../shared/source-control/hosted-review/review-refresh-policy' import { getPRRefreshOwnerRuntimeEnvironmentId } from '@/store/github/repositories/repository-routing' import { hostPRAutoRefreshCadence } from '@/store/github/refresh/remote-host-pr-auto-refresh-cadence' import { withTimeout } from '../../../../../../shared/concurrency/promise-timeout-fallback' diff --git a/src/renderer/src/components/sidebar/workspace-creation/folder/folder-workspace-source-selection.ts b/src/renderer/src/components/sidebar/workspace-creation/folder/folder-workspace-source-selection.ts index f2d5b2c894a..b6645479c85 100644 --- a/src/renderer/src/components/sidebar/workspace-creation/folder/folder-workspace-source-selection.ts +++ b/src/renderer/src/components/sidebar/workspace-creation/folder/folder-workspace-source-selection.ts @@ -6,7 +6,7 @@ import { getWorkspaceSourceProvider, shouldApplyWorkspaceSourceAutoName } from '../../../../../../shared/new-workspace/workspace-source' -import '../../../../../../shared/cross-platform-path' +import '../../../../../../shared/file-access/cross-platform-path' import '../../../../../../shared/execution-host' import '../../../../../../shared/project/groups/project-groups' import '../../../../../../shared/repository/repo-kind' diff --git a/src/renderer/src/components/sidebar/workspace-visibility/dialog/HiddenWorktreeRecoveryList.tsx b/src/renderer/src/components/sidebar/workspace-visibility/dialog/HiddenWorktreeRecoveryList.tsx index 65f468b95e7..04f39ac33df 100644 --- a/src/renderer/src/components/sidebar/workspace-visibility/dialog/HiddenWorktreeRecoveryList.tsx +++ b/src/renderer/src/components/sidebar/workspace-visibility/dialog/HiddenWorktreeRecoveryList.tsx @@ -10,7 +10,7 @@ import { getHiddenImportableExternalWorktrees, getVisibleNonOrcaWorktrees } from '../../../../../../shared/worktree/visibility/external-worktree-inbox' -import { relativePathInsideRoot } from '../../../../../../shared/cross-platform-path' +import { relativePathInsideRoot } from '../../../../../../shared/file-access/cross-platform-path' type Props = { repo: Repo diff --git a/src/renderer/src/components/sidebar/workspace-visibility/sources/WorktreeVisibilitySourceList.tsx b/src/renderer/src/components/sidebar/workspace-visibility/sources/WorktreeVisibilitySourceList.tsx index ebe408946ba..61dc7f2ab52 100644 --- a/src/renderer/src/components/sidebar/workspace-visibility/sources/WorktreeVisibilitySourceList.tsx +++ b/src/renderer/src/components/sidebar/workspace-visibility/sources/WorktreeVisibilitySourceList.tsx @@ -28,7 +28,7 @@ import { effectiveExternalWorktreeVisibility, isLegacyRepoForExternalWorktreeVisibility } from '../../../../../../shared/worktree/visibility/external-worktree-visibility' -import { getRuntimePathBasename } from '../../../../../../shared/cross-platform-path' +import { getRuntimePathBasename } from '../../../../../../shared/file-access/cross-platform-path' import { getWorktreeVisibilityOverrideNotice, getWorktreeVisibilitySourceNote, diff --git a/src/renderer/src/components/sidebar/worktree-list/listing/ImportedWorktreesVisibilityLine.tsx b/src/renderer/src/components/sidebar/worktree-list/listing/ImportedWorktreesVisibilityLine.tsx index 9e9d0b1403c..f95fb882500 100644 --- a/src/renderer/src/components/sidebar/worktree-list/listing/ImportedWorktreesVisibilityLine.tsx +++ b/src/renderer/src/components/sidebar/worktree-list/listing/ImportedWorktreesVisibilityLine.tsx @@ -7,7 +7,7 @@ import { cn } from '@/lib/class-names' import NoticeHostGlyph from '../rows/NoticeHostGlyph' import type { ExecutionHostId } from '../../../../../../shared/execution-host' import { getExternalWorktreeParentPath } from '../../../../../../shared/worktree/visibility/external-worktree-visibility' -import { normalizeRuntimePathForComparison } from '../../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../../shared/file-access/cross-platform-path' import { useTranslate } from '@/i18n/use-translate' export type ImportedWorktreeVisibilityPreview = { diff --git a/src/renderer/src/components/sidebar/worktree-list/rows/project-group-folder-refresh.ts b/src/renderer/src/components/sidebar/worktree-list/rows/project-group-folder-refresh.ts index 563b9c7432c..fe5b707d05b 100644 --- a/src/renderer/src/components/sidebar/worktree-list/rows/project-group-folder-refresh.ts +++ b/src/renderer/src/components/sidebar/worktree-list/rows/project-group-folder-refresh.ts @@ -8,7 +8,7 @@ import { import { isPathInsideOrEqual, normalizeRuntimePathForComparison -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' import type { ProjectGroup } from '../../../../../../shared/project/groups/project-group-types' import type { Repo } from '../../../../../../shared/repository/repo-types' import '@/store/project-groups/project-group-owner-routing' diff --git a/src/renderer/src/components/sidebar/wsl-host-offer-move.ts b/src/renderer/src/components/sidebar/wsl-host-offer-move.ts index 25000a4db41..69f819944c0 100644 --- a/src/renderer/src/components/sidebar/wsl-host-offer-move.ts +++ b/src/renderer/src/components/sidebar/wsl-host-offer-move.ts @@ -5,7 +5,7 @@ import { selectFolderWorkspaces } from '@/store/workspaces/catalog/workspace-rec import { isPathInsideOrEqual, normalizeRuntimePathForComparison -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' import type { WslMoveRowRef } from '../../../../shared/wsl-move/wsl-move-driver-types' import { openWslMoveDialogFor } from '../wsl-move/wsl-move-entry' import type { WslHostOffer } from './wsl-host-offer-actions' diff --git a/src/renderer/src/components/status-bar/workspace-storage/WorkspaceSpaceCompactPanel.tsx b/src/renderer/src/components/status-bar/workspace-storage/WorkspaceSpaceCompactPanel.tsx index cddde004cb3..b75e03cca8a 100644 --- a/src/renderer/src/components/status-bar/workspace-storage/WorkspaceSpaceCompactPanel.tsx +++ b/src/renderer/src/components/status-bar/workspace-storage/WorkspaceSpaceCompactPanel.tsx @@ -8,7 +8,7 @@ import { getWorkspaceSpaceScanningFallbackLabel, getWorkspaceSpaceScanTimeLabel } from './workspace-space-format' -import { formatBytes } from '../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../shared/text/format-bytes' import { useIntlLocale, useTranslate } from '@/i18n/use-translate' export function WorkspaceSpaceCompactPanel({ diff --git a/src/renderer/src/components/status-bar/workspace-storage/decisions/workspace-space-decision-hover-card.tsx b/src/renderer/src/components/status-bar/workspace-storage/decisions/workspace-space-decision-hover-card.tsx index 378530f7d3d..d8e043d3435 100644 --- a/src/renderer/src/components/status-bar/workspace-storage/decisions/workspace-space-decision-hover-card.tsx +++ b/src/renderer/src/components/status-bar/workspace-storage/decisions/workspace-space-decision-hover-card.tsx @@ -12,7 +12,7 @@ import { cn } from '@/lib/class-names' import { Button } from '../../../ui/button' import { HoverCardContent } from '../../../ui/hover-card' import { getWorkspaceSpaceBranchLabel } from '../workspace-space-format' -import { formatBytes } from '../../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../../shared/text/format-bytes' import { useTranslate } from '@/i18n/use-translate' import type { WorkspaceDecisionDetails } from './workspace-space-decision-details' import type { WorkspaceGitRefreshState } from '../manager/workspace-space-manager-state-types' diff --git a/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-breakdown-list.tsx b/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-breakdown-list.tsx index b1532a72611..0c350886988 100644 --- a/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-breakdown-list.tsx +++ b/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-breakdown-list.tsx @@ -5,7 +5,7 @@ import type { } from '../../../../../../shared/workspace-disk-space/workspace-space-types' import type { ExecutionHostId } from '../../../../../../shared/execution-host' import { formatCompactCount } from '../workspace-space-format' -import { formatBytes } from '../../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../../shared/text/format-bytes' import { getLargestWorkspaceSpaceItemSize } from '../manager/workspace-space-presentation' import { useTranslate } from '@/i18n/use-translate' import { diff --git a/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-manager-overview.tsx b/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-manager-overview.tsx index cbccdda560f..dc9e0abf501 100644 --- a/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-manager-overview.tsx +++ b/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-manager-overview.tsx @@ -2,7 +2,7 @@ import { AlertTriangle, HardDrive, Loader2, RefreshCw, X } from 'lucide-react' import { Button } from '../../../ui/button' import { Popover, PopoverContent, PopoverTrigger } from '../../../ui/popover' import { getWorkspaceSpaceScanningFallbackLabel } from '../workspace-space-format' -import { formatBytes } from '../../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../../shared/text/format-bytes' import { useTranslate } from '@/i18n/use-translate' import { Metric, UpdatedMetric } from './workspace-space-metrics' import { WorkspaceSpaceTreemap } from './workspace-space-treemap' diff --git a/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-treemap.tsx b/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-treemap.tsx index f54bd70f208..f7e1dc7d254 100644 --- a/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-treemap.tsx +++ b/src/renderer/src/components/status-bar/workspace-storage/overview/workspace-space-treemap.tsx @@ -3,7 +3,7 @@ import { Loader2, ZoomIn, ZoomOut } from 'lucide-react' import type { WorkspaceSpaceWorktree } from '../../../../../../shared/workspace-disk-space/workspace-space-types' import { cn } from '@/lib/class-names' import { Button } from '../../../ui/button' -import { formatBytes } from '../../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../../shared/text/format-bytes' import { buildTreemapLayout, type TreemapRect } from './workspace-space-layout' import { getWorkspaceSpaceWorktreeIdentity } from '../manager/workspace-space-delete-selection' import { useTranslate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/status-bar/workspace-storage/table/workspace-space-worktree-row.tsx b/src/renderer/src/components/status-bar/workspace-storage/table/workspace-space-worktree-row.tsx index 012d8fac082..881458458e9 100644 --- a/src/renderer/src/components/status-bar/workspace-storage/table/workspace-space-worktree-row.tsx +++ b/src/renderer/src/components/status-bar/workspace-storage/table/workspace-space-worktree-row.tsx @@ -15,7 +15,7 @@ import { getWorkspaceSpaceBranchLabel, getWorkspaceSpaceScanDateTimeLabel } from '../workspace-space-format' -import { formatBytes } from '../../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../../shared/text/format-bytes' import { isWorkspaceSpaceRowReadyToDelete } from '../manager/workspace-space-presentation' import { useIntlLocale, useTranslate } from '@/i18n/use-translate' import type { WorkspaceDecisionDetails } from '../decisions/workspace-space-decision-details' diff --git a/src/renderer/src/components/status-bar/workspace-storage/workspace-space-manager-toolbar.tsx b/src/renderer/src/components/status-bar/workspace-storage/workspace-space-manager-toolbar.tsx index fc3abbe2223..a2a8ff0ef9a 100644 --- a/src/renderer/src/components/status-bar/workspace-storage/workspace-space-manager-toolbar.tsx +++ b/src/renderer/src/components/status-bar/workspace-storage/workspace-space-manager-toolbar.tsx @@ -2,7 +2,7 @@ import { Check, Trash2 } from 'lucide-react' import { Button } from '../../ui/button' import { Input } from '../../ui/input' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../../ui/select' -import { formatBytes } from '../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../shared/text/format-bytes' import { useTranslate } from '@/i18n/use-translate' import type { WorkspaceSpaceSortKey } from './manager/workspace-space-presentation' import type { useWorkspaceSpaceManagerPanel } from './manager/use-workspace-space-manager-panel' diff --git a/src/renderer/src/components/tab-bar/open-tab-entry-dedupe.ts b/src/renderer/src/components/tab-bar/open-tab-entry-dedupe.ts index 4c9c6b804b7..401eb65b1b2 100644 --- a/src/renderer/src/components/tab-bar/open-tab-entry-dedupe.ts +++ b/src/renderer/src/components/tab-bar/open-tab-entry-dedupe.ts @@ -3,7 +3,7 @@ import { normalizeRelativePath, isCaseInsensitiveRuntimeRoot -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' import { normalizeBrowserHistoryUrl } from '../../../../shared/workspace-session/workspace-session-browser-history' import type { OpenTabSearchResult } from './open-tab-search' import type { BrowserHistoryOmniboxRow } from './tab-create-entry-active-option' diff --git a/src/renderer/src/components/tab-bar/tab-bar-item-model.ts b/src/renderer/src/components/tab-bar/tab-bar-item-model.ts index 27869c7bb18..6c0c57f53b1 100644 --- a/src/renderer/src/components/tab-bar/tab-bar-item-model.ts +++ b/src/renderer/src/components/tab-bar/tab-bar-item-model.ts @@ -8,7 +8,7 @@ import type { Tab, WorkspaceVisibleTabType } from '../../../../shared/tab-types' import type { TerminalTab } from '../../../../shared/workspace-layout/terminal-tab-types' import { resolveTerminalTabTitle } from '../../../../shared/tab-title-resolution' import type { OpenFile } from '../../store/slices/editor/types/open-file' -import { normalizeRelativePath } from '../../../../shared/cross-platform-path' +import { normalizeRelativePath } from '../../../../shared/file-access/cross-platform-path' import { isVirtualEditorFile } from '@/store/slices/editor/tabs/editor-tab-content-type' import { tabItemLabel } from './tab-bar-item-label' import type { DropIndicator } from './drop-indicator' diff --git a/src/renderer/src/components/task-page/github/issue-status/StatusCell.tsx b/src/renderer/src/components/task-page/github/issue-status/StatusCell.tsx index f20a88a5284..e663ac2c7be 100644 --- a/src/renderer/src/components/task-page/github/issue-status/StatusCell.tsx +++ b/src/renderer/src/components/task-page/github/issue-status/StatusCell.tsx @@ -1,5 +1,5 @@ import type { GitHubWorkItem } from '../../../../../../shared/github/work-items/work-item-types' -import type { GitHubIssueUpdate } from '../../../../../../shared/issue-mutation-types' +import type { GitHubIssueUpdate } from '../../../../../../shared/work-items/issue-mutation-types' import type { Repo } from '../../../../../../shared/repository/repo-types' import type { TaskSourceContext } from '../../../../../../shared/work-items/task-source-context' import React, { useState, useMemo, useCallback } from 'react' diff --git a/src/renderer/src/components/task-page/github/issue-status/task-page-github-status-actions.ts b/src/renderer/src/components/task-page/github/issue-status/task-page-github-status-actions.ts index e565281a0c1..d010377a816 100644 --- a/src/renderer/src/components/task-page/github/issue-status/task-page-github-status-actions.ts +++ b/src/renderer/src/components/task-page/github/issue-status/task-page-github-status-actions.ts @@ -2,7 +2,7 @@ import type { GitHubWorkItem } from '../../../../../../shared/github/work-items/ import type { GitHubIssueCloseReason, GitHubIssueUpdate -} from '../../../../../../shared/issue-mutation-types' +} from '../../../../../../shared/work-items/issue-mutation-types' export type TaskPageGitHubCloseAction = | { stateReason: Exclude } diff --git a/src/renderer/src/components/task-page/github/use-task-page-github-detail.ts b/src/renderer/src/components/task-page/github/use-task-page-github-detail.ts index 64e273c77ce..df011920e02 100644 --- a/src/renderer/src/components/task-page/github/use-task-page-github-detail.ts +++ b/src/renderer/src/components/task-page/github/use-task-page-github-detail.ts @@ -8,7 +8,7 @@ import { stripRepoQualifiers } from '../../../../../shared/work-items/task-query import { createTaskPageDialogWorkItemReader } from '@/components/task-page/task-page-dialog-work-item' import { useTaskPageWorkItemsCacheSelection } from './cache/use-task-page-work-items-cache-selection' import type { GitHubWorkItem } from '../../../../../shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../../shared/gitlab/gitlab-types' import { getTaskPageRepoSourceContext } from '../../../lib/work-items/task-repo-source-context' import { startGitHubListScrollRestore } from './listing/task-page-github-list-scroll-restore' diff --git a/src/renderer/src/components/task-page/gitlab/use-task-page-gitlab-loading.ts b/src/renderer/src/components/task-page/gitlab/use-task-page-gitlab-loading.ts index f6b35b5961c..957ad175f52 100644 --- a/src/renderer/src/components/task-page/gitlab/use-task-page-gitlab-loading.ts +++ b/src/renderer/src/components/task-page/gitlab/use-task-page-gitlab-loading.ts @@ -10,7 +10,7 @@ import { mapSettledWithConcurrency } from '../../../../../shared/concurrency/map import type { Repo } from '../../../../../shared/repository/repo-types' import { getRepoExecutionHostId } from '../../../../../shared/execution-host' import type { GitLabDialogRepoSelector } from '../../gitlab-item-dialog/gitlab-item-dialog-types' -import type { GitLabWorkItem, GitLabTodo } from '../../../../../shared/gitlab-types' +import type { GitLabWorkItem, GitLabTodo } from '../../../../../shared/gitlab/gitlab-types' import { getTaskPageRepoSourceContext } from '../../../lib/work-items/task-repo-source-context' import { isGitLabIssueFilter, isGitLabMRFilter } from '../task-page-source-context' diff --git a/src/renderer/src/components/task-page/linear/issues/IssueBoard.tsx b/src/renderer/src/components/task-page/linear/issues/IssueBoard.tsx index 00ec7c55584..01504c14337 100644 --- a/src/renderer/src/components/task-page/linear/issues/IssueBoard.tsx +++ b/src/renderer/src/components/task-page/linear/issues/IssueBoard.tsx @@ -6,7 +6,7 @@ import { } from './task-page-linear-issue-empty-state' import { Button } from '@/components/ui/button' import { LinearIcon } from '@/components/task-page/task-page-localized-options' -import { isIntegrationCredentialDecryptionError } from '../../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../../shared/secure-storage/integration-credential-errors' import { clampLinearIssueListLimit, LINEAR_ISSUE_LIST_MAX diff --git a/src/renderer/src/components/task-page/linear/issues/use-task-page-linear-list-effects.ts b/src/renderer/src/components/task-page/linear/issues/use-task-page-linear-list-effects.ts index d83f0060065..61de14c2bcd 100644 --- a/src/renderer/src/components/task-page/linear/issues/use-task-page-linear-list-effects.ts +++ b/src/renderer/src/components/task-page/linear/issues/use-task-page-linear-list-effects.ts @@ -7,7 +7,7 @@ import type { LinearCollectionResult } from '../../../../../../shared/linear/wor import { taskProviderErrorText } from '@/lib/work-items/task-provider-error-copy' import type { TaskPageGlobalEffectsModel } from '../../use-task-page-global-effects' import { useEffect } from 'react' -import { isIntegrationCredentialDecryptionError } from '../../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../../shared/secure-storage/integration-credential-errors' import { saveLinearIssueView } from '../../../linear-issue-view-storage' import { serializeLinearIssueViewResumeState } from '../../../../../../shared/linear/issue-view-resume-state' import { clampLinearIssueListLimit } from '../../../../../../shared/linear/issue-read-limits' diff --git a/src/renderer/src/components/task-page/task-page-localized-options.tsx b/src/renderer/src/components/task-page/task-page-localized-options.tsx index 7113f309372..07aa302f14b 100644 --- a/src/renderer/src/components/task-page/task-page-localized-options.tsx +++ b/src/renderer/src/components/task-page/task-page-localized-options.tsx @@ -15,7 +15,7 @@ import { type LinearViewMode } from '../../../../shared/linear/issue-view-resume-state' import { getTaskPresetQuery } from '../../../../shared/work-items/task-preset-query' -import type { GitLabMRInvolvement } from '../../../../shared/gitlab-types' +import type { GitLabMRInvolvement } from '../../../../shared/gitlab/gitlab-types' import type { GitHubPRStateChip, GitHubPRWhoChip } from './github/listing/task-page-pr-chips' import type { TaskProvider } from '../../../../shared/work-items/task-providers' import type { TaskViewPresetId } from '../../../../shared/ui-chrome-types' diff --git a/src/renderer/src/components/task-page/task-page-source-context.tsx b/src/renderer/src/components/task-page/task-page-source-context.tsx index 3944ff4cf28..171c22b5cf2 100644 --- a/src/renderer/src/components/task-page/task-page-source-context.tsx +++ b/src/renderer/src/components/task-page/task-page-source-context.tsx @@ -9,7 +9,7 @@ import type { GitLabIssueFilter } from '@/components/task-page/task-page-localized-options' import type { GitHubWorkItem } from '../../../../shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import type { JiraIssue } from '../../../../shared/jira/jira-types' import type { Repo } from '../../../../shared/repository/repo-types' import type { TaskPageRepoCacheRowInput } from './task-page-cache-selectors' diff --git a/src/renderer/src/components/task-page/use-task-page-provider-state.ts b/src/renderer/src/components/task-page/use-task-page-provider-state.ts index 4983f174509..f391b46c883 100644 --- a/src/renderer/src/components/task-page/use-task-page-provider-state.ts +++ b/src/renderer/src/components/task-page/use-task-page-provider-state.ts @@ -9,7 +9,7 @@ import type { GitLabMRInvolvement, GitLabWorkItem, GitLabTodo -} from '../../../../shared/gitlab-types' +} from '../../../../shared/gitlab/gitlab-types' import { getRepoBackedTaskEmptyState } from './task-page-empty-state' import { isGitLabIssueFilter, isGitLabMRFilter } from './task-page-source-context' export function useTaskPageProviderState(model: TaskPageSourceAvailabilityModel) { diff --git a/src/renderer/src/components/task-page/use-task-page-workspace-actions.ts b/src/renderer/src/components/task-page/use-task-page-workspace-actions.ts index e853d7a7eda..d3cdf0c5e2d 100644 --- a/src/renderer/src/components/task-page/use-task-page-workspace-actions.ts +++ b/src/renderer/src/components/task-page/use-task-page-workspace-actions.ts @@ -1,7 +1,7 @@ import type { TaskPageSearchActionsModel } from './use-task-page-search-actions' import { useCallback } from 'react' import type { GitHubWorkItem } from '../../../../shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import type { LinkedWorkItemSummary } from '@/lib/workspace/creation/new-workspace' import { useAppStore } from '@/store' import { getWorkItemRepo } from '@/lib/work-items/work-item-repo-row' diff --git a/src/renderer/src/components/terminal-pane/host-files/terminal-file-path-mapping.ts b/src/renderer/src/components/terminal-pane/host-files/terminal-file-path-mapping.ts index f22106d7e52..e4ca703aec3 100644 --- a/src/renderer/src/components/terminal-pane/host-files/terminal-file-path-mapping.ts +++ b/src/renderer/src/components/terminal-pane/host-files/terminal-file-path-mapping.ts @@ -9,7 +9,7 @@ import { getRuntimeTargetForWorktreeOwner } from '@/lib/files/access/file-owner- import type { RuntimeFileOperationArgs } from '@/runtime/files/runtime-file-client-types' import { parseExecutionHostId } from '../../../../../shared/execution-host' import { parseWslUncPath, toWindowsWslPath } from '../../../../../shared/file-access/wsl-paths' -import { msysDrivePathToWindows } from '../../../../../shared/cross-platform-path' +import { msysDrivePathToWindows } from '../../../../../shared/file-access/cross-platform-path' import { terminalFileSourceHost } from '../links/files/terminal-worktree-path-link' export type TerminalFileContext = RuntimeFileOperationArgs & { diff --git a/src/renderer/src/components/terminal-pane/input/file-drop/terminal-drop-local-wsl.ts b/src/renderer/src/components/terminal-pane/input/file-drop/terminal-drop-local-wsl.ts index c4a571e5344..17a3c7a1088 100644 --- a/src/renderer/src/components/terminal-pane/input/file-drop/terminal-drop-local-wsl.ts +++ b/src/renderer/src/components/terminal-pane/input/file-drop/terminal-drop-local-wsl.ts @@ -1,6 +1,6 @@ import { getLocalProjectExecutionRuntimeContext } from '@/runtime/hosts/preflight/local-preflight-context' import { CLIENT_PLATFORM } from '@/lib/workspace/creation/new-workspace' -import { isWindowsAbsolutePathLike } from '../../../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../../../shared/file-access/cross-platform-path' import { parseWslUncPath } from '../../../../../../shared/file-access/wsl-paths' import type { useAppStore } from '@/store/index' diff --git a/src/renderer/src/components/terminal-pane/input/file-drop/terminal-drop-worktree-path.ts b/src/renderer/src/components/terminal-pane/input/file-drop/terminal-drop-worktree-path.ts index cc7bbc749ac..e49650fa089 100644 --- a/src/renderer/src/components/terminal-pane/input/file-drop/terminal-drop-worktree-path.ts +++ b/src/renderer/src/components/terminal-pane/input/file-drop/terminal-drop-worktree-path.ts @@ -5,7 +5,7 @@ import { toRuntimeExecutionHostId, type ExecutionHostId } from '../../../../../../shared/execution-host' -import { DROP_STAGING_RELATIVE_DIR } from '../../../../../../shared/drop-staging-ignore' +import { DROP_STAGING_RELATIVE_DIR } from '../../../../../../shared/file-import/drop-staging-ignore' import { resolveExactWorktreeRoute } from '@/lib/workspace/ownership/worktree-owner-route' import { isTerminalDropWindowsPathLike } from '../../../../../../shared/terminal/input/image-path-paste' diff --git a/src/renderer/src/components/terminal-pane/links/terminal-osc-link-routing.ts b/src/renderer/src/components/terminal-pane/links/terminal-osc-link-routing.ts index 3a279f7ebcc..3d268cbd7ae 100644 --- a/src/renderer/src/components/terminal-pane/links/terminal-osc-link-routing.ts +++ b/src/renderer/src/components/terminal-pane/links/terminal-osc-link-routing.ts @@ -3,7 +3,7 @@ import type { HttpLinkRoutingPreferenceRequester as TerminalLinkRoutingPreferenceRequester } from '@/lib/browser/navigation/http-link-destinations' import { resolveFileLinkPath } from './files/terminal-file-link-target' -import { isWindowsAbsolutePathLike } from '../../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../../shared/file-access/cross-platform-path' import type { LinkHandlerDeps } from './files/terminal-link-handlers' import { classifyTerminalOscLinkTarget } from '../../../../../shared/terminal/links/terminal-osc-link-target' import { isTerminalOwnedLinkGesture } from './gestures/terminal-link-activation' diff --git a/src/renderer/src/components/terminal-pane/pty-connection/agent-identity/pane-launch-agent-candidate.ts b/src/renderer/src/components/terminal-pane/pty-connection/agent-identity/pane-launch-agent-candidate.ts index 8b33f6f4268..f67131a8144 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection/agent-identity/pane-launch-agent-candidate.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection/agent-identity/pane-launch-agent-candidate.ts @@ -1,7 +1,7 @@ import { isTuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent-config' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' import { recognizeAgentLaunchCommand } from '../../../../../../shared/agent-launch/startup/agent-command-line-intent' -import { COMMAND_TOKEN_SCAN_MAX_CHARS } from '../../../../../../shared/command-token-scanner' +import { COMMAND_TOKEN_SCAN_MAX_CHARS } from '../../../../../../shared/shell/command-resolution/command-token-scanner' /** The store slice the launch-agent ladder reads. */ export type PaneLaunchAgentStoreSlice = { diff --git a/src/renderer/src/components/terminal-pane/pty-connection/startup/terminal-startup-command-classifier.ts b/src/renderer/src/components/terminal-pane/pty-connection/startup/terminal-startup-command-classifier.ts index a9a84088e83..4392dba2af1 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection/startup/terminal-startup-command-classifier.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection/startup/terminal-startup-command-classifier.ts @@ -2,7 +2,7 @@ import { getTuiAgentDetectCommands, TUI_AGENT_CONFIG } from '../../../../../../shared/agent-launch/catalog/tui-agent-config' -import { getCommandTokenPathBasename } from '../../../../../../shared/command-token-scanner' +import { getCommandTokenPathBasename } from '../../../../../../shared/shell/command-resolution/command-token-scanner' import { getAgentLaunchCommandToken } from '../../../../../../shared/agent-launch/startup/agent-command-line-intent' const TERMINAL_STARTUP_COMMAND_EXTENSION_RE = /\.(?:exe|cmd|bat|ps1)$/i diff --git a/src/renderer/src/components/workspace-cleanup/candidate-list/workspace-cleanup-row-list.tsx b/src/renderer/src/components/workspace-cleanup/candidate-list/workspace-cleanup-row-list.tsx index 93b5aaec867..0cf0624d8e3 100644 --- a/src/renderer/src/components/workspace-cleanup/candidate-list/workspace-cleanup-row-list.tsx +++ b/src/renderer/src/components/workspace-cleanup/candidate-list/workspace-cleanup-row-list.tsx @@ -2,7 +2,7 @@ import React, { useMemo } from 'react' import { useAppStore } from '@/store' import { useTranslate } from '@/i18n/use-translate' import type { WorkspaceCleanupCandidate } from '../../../../../shared/workspace-cleanup/workspace-cleanup' -import { formatBytes } from '../../../../../shared/format-bytes' +import { formatBytes } from '../../../../../shared/text/format-bytes' import { CandidateRow, type WorkspaceCleanupDeletionPhase } from './workspace-cleanup-candidate-row' import { WorkspaceCleanupCandidateList } from './workspace-cleanup-candidate-list' import { WorkspaceCleanupEmptyState } from '../dialog/workspace-cleanup-dialog-notices' diff --git a/src/renderer/src/components/workspace-cleanup/removal/settlement/workspace-cleanup-ancestor-skips.ts b/src/renderer/src/components/workspace-cleanup/removal/settlement/workspace-cleanup-ancestor-skips.ts index fca1bcb04b1..eb2d71a4917 100644 --- a/src/renderer/src/components/workspace-cleanup/removal/settlement/workspace-cleanup-ancestor-skips.ts +++ b/src/renderer/src/components/workspace-cleanup/removal/settlement/workspace-cleanup-ancestor-skips.ts @@ -2,7 +2,7 @@ import type { WorkspaceCleanupCandidate } from '../../../../../../shared/workspa import { isPathInsideOrEqual, normalizeRuntimePathForComparison -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' import type { WorkspaceCleanupFailure } from '@/store/slices/workspace-cleanup/workspace-cleanup-removal' import { translate } from '@/i18n/i18n' import { getWorkspaceCleanupCandidateHostId } from '../../../../../../shared/workspace-cleanup/workspace-cleanup-host-identity' diff --git a/src/renderer/src/diagnostics/typing-latency/diagnostic-summary.ts b/src/renderer/src/diagnostics/typing-latency/diagnostic-summary.ts index fde0625697f..ad866f65469 100644 --- a/src/renderer/src/diagnostics/typing-latency/diagnostic-summary.ts +++ b/src/renderer/src/diagnostics/typing-latency/diagnostic-summary.ts @@ -2,7 +2,7 @@ import { isWindowsAbsolutePathLike, normalizeRuntimePathForComparison -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' import { LOCAL_EXECUTION_HOST_ID } from '../../../../shared/execution-host' import { getRendererAppPlatform } from '../../app-shell/platform/renderer-app-platform' diff --git a/src/renderer/src/hooks/composer-branch-selection.ts b/src/renderer/src/hooks/composer-branch-selection.ts index 935c1689e84..506820dd92e 100644 --- a/src/renderer/src/hooks/composer-branch-selection.ts +++ b/src/renderer/src/hooks/composer-branch-selection.ts @@ -9,4 +9,4 @@ export { resolveComposerReuseOverride, type ComposerBranchPick, type ComposerBranchSelection -} from '../../../shared/composer-branch-selection' +} from '../../../shared/new-workspace/composer-branch-selection' diff --git a/src/renderer/src/hooks/composer-state/async-composer-state.ts b/src/renderer/src/hooks/composer-state/async-composer-state.ts index 547f1b8d427..a9fb34ee8cf 100644 --- a/src/renderer/src/hooks/composer-state/async-composer-state.ts +++ b/src/renderer/src/hooks/composer-state/async-composer-state.ts @@ -23,7 +23,10 @@ type ComposerAsyncStateInput = Pick< > import { useState, useRef, useEffect, useCallback } from 'react' -import type { OrcaHooks, SetupAgentStartupPolicy } from '../../../../shared/orca-yaml-hook-types' +import type { + OrcaHooks, + SetupAgentStartupPolicy +} from '../../../../shared/workspace-setup/orca-yaml-hook-types' import type { IssueCommandReadResult } from '@/runtime/repo-hooks/runtime-hooks-client' import type { WorkspaceCreateErrorDisplay } from '@/lib/workspace/creation/workspace-create-error-format' import type { GitHubWorkItem } from '../../../../shared/github/work-items/work-item-types' diff --git a/src/renderer/src/hooks/composer-state/async-model.ts b/src/renderer/src/hooks/composer-state/async-model.ts index 4da3d9ecbcd..1e9187a6c4d 100644 --- a/src/renderer/src/hooks/composer-state/async-model.ts +++ b/src/renderer/src/hooks/composer-state/async-model.ts @@ -1,7 +1,10 @@ import type * as React from 'react' import type { RefObject } from 'react' import type { GitHubWorkItem } from '../../../../shared/github/work-items/work-item-types' -import type { OrcaHooks, SetupAgentStartupPolicy } from '../../../../shared/orca-yaml-hook-types' +import type { + OrcaHooks, + SetupAgentStartupPolicy +} from '../../../../shared/workspace-setup/orca-yaml-hook-types' import type { GitHubRepositoryIdentity } from '../../../../shared/github/repositories/repository-identity' import type { WorkspaceCreateErrorDisplay } from '@/lib/workspace/creation/workspace-create-error-format' import type { IssueCommandReadResult } from '@/runtime/repo-hooks/runtime-hooks-client' diff --git a/src/renderer/src/hooks/composer-state/attachment-drop-state.ts b/src/renderer/src/hooks/composer-state/attachment-drop-state.ts index 4fd520ddec3..e236a813391 100644 --- a/src/renderer/src/hooks/composer-state/attachment-drop-state.ts +++ b/src/renderer/src/hooks/composer-state/attachment-drop-state.ts @@ -2,7 +2,7 @@ import { useCallback } from 'react' import { toast } from 'sonner' import { translate } from '@/i18n/i18n' import { joinPath } from '@/lib/path' -import { DROP_STAGING_RELATIVE_DIR } from '../../../../shared/drop-staging-ignore' +import { DROP_STAGING_RELATIVE_DIR } from '../../../../shared/file-import/drop-staging-ignore' import { captureDirectSshMutationExpectation } from '@/runtime/hosts/ssh/ssh-mutation-expectation' import { useAppStore } from '@/store/index' import { importExternalPathsToRuntime } from '@/runtime/files/imports/runtime-file-import-client' diff --git a/src/renderer/src/hooks/composer-state/branch-start-point-actions.ts b/src/renderer/src/hooks/composer-state/branch-start-point-actions.ts index 08e235b78cd..e12de4eea78 100644 --- a/src/renderer/src/hooks/composer-state/branch-start-point-actions.ts +++ b/src/renderer/src/hooks/composer-state/branch-start-point-actions.ts @@ -35,7 +35,7 @@ import type { SparsePreset } from '../../../../shared/worktree/create-types' import type { GitHubWorkItem } from '../../../../shared/github/work-items/work-item-types' import type { GitPushTarget } from '../../../../shared/worktree/types' import { resolveGitHubWorkItemIdentity } from '../../../../shared/new-workspace/github-work-item-identity' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' export function useBranchStartPointActions(input: BranchStartPointActionsInput) { const { diff --git a/src/renderer/src/hooks/composer-state/composer-source-model.ts b/src/renderer/src/hooks/composer-state/composer-source-model.ts index cd6d1339fcc..9d258d74aae 100644 --- a/src/renderer/src/hooks/composer-state/composer-source-model.ts +++ b/src/renderer/src/hooks/composer-state/composer-source-model.ts @@ -1,4 +1,4 @@ -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import type { GitHubWorkItem } from '../../../../shared/github/work-items/work-item-types' import type { GitPushTarget } from '../../../../shared/worktree/types' import type { JiraIssue } from '../../../../shared/jira/jira-types' diff --git a/src/renderer/src/hooks/composer-state/derived-composer-state.ts b/src/renderer/src/hooks/composer-state/derived-composer-state.ts index 68a2c152f13..df8dd22eefa 100644 --- a/src/renderer/src/hooks/composer-state/derived-composer-state.ts +++ b/src/renderer/src/hooks/composer-state/derived-composer-state.ts @@ -20,7 +20,7 @@ import { DEFAULT_ISSUE_COMMAND_TEMPLATE, renderIssueCommandTemplate } from '@/lib/workspace/creation/new-workspace' -import { getSetupConfig } from '../../../../shared/orca-hook-setup-config' +import { getSetupConfig } from '../../../../shared/workspace-setup/hooks/orca-hook-setup-config' import { deriveWorkspaceSetupState } from '@/lib/workspace/creation/setup/workspace-setup-preparation' import type { SparsePreset } from '../../../../shared/worktree/create-types' import { useRetiredWorktreeNames } from '@/hooks/useRetiredWorktreeNames' diff --git a/src/renderer/src/hooks/composer-state/derived-model.ts b/src/renderer/src/hooks/composer-state/derived-model.ts index 4ab04190699..30ca485ef89 100644 --- a/src/renderer/src/hooks/composer-state/derived-model.ts +++ b/src/renderer/src/hooks/composer-state/derived-model.ts @@ -1,11 +1,14 @@ import type { useProjectGroupSetup } from './use-project-group-setup' import type { FolderSetupSupport } from '@/lib/workspace/creation/setup/folder-setup-support' import type { GitHubWorkItem } from '../../../../shared/github/work-items/work-item-types' -import type { OrcaHooks, SetupRunPolicy } from '../../../../shared/orca-yaml-hook-types' +import type { + OrcaHooks, + SetupRunPolicy +} from '../../../../shared/workspace-setup/orca-yaml-hook-types' import type { SparsePreset } from '../../../../shared/worktree/create-types' import type { RetiredNameRegistry } from '../../../../shared/worktree/naming/retired-name-registry' import type { GitHubLinkQuery } from '../../../../shared/new-workspace/github-links' -import type { SetupConfig } from '../../../../shared/orca-hook-setup-config' +import type { SetupConfig } from '../../../../shared/workspace-setup/hooks/orca-hook-setup-config' export type ComposerDerivedModel = { groupSetup: ReturnType diff --git a/src/renderer/src/hooks/composer-state/folder-submit-orchestration.ts b/src/renderer/src/hooks/composer-state/folder-submit-orchestration.ts index b7f5b85537b..3079deb44ad 100644 --- a/src/renderer/src/hooks/composer-state/folder-submit-orchestration.ts +++ b/src/renderer/src/hooks/composer-state/folder-submit-orchestration.ts @@ -4,7 +4,7 @@ import { PROJECT_GROUP_FOLDER_SETUP_RUNTIME_CAPABILITY } from '../../../../share import { resolveFolderSetupSupported } from '@/lib/workspace/creation/setup/folder-setup-support' import { checkRuntimeGroupHooks } from '@/runtime/repo-hooks/runtime-hooks-client' import { deriveWorkspaceSetupState } from '@/lib/workspace/creation/setup/workspace-setup-preparation' -import { getSetupConfig } from '../../../../shared/orca-hook-setup-config' +import { getSetupConfig } from '../../../../shared/workspace-setup/hooks/orca-hook-setup-config' import { confirmWorkspaceSetupDecision } from '@/lib/workspace/creation/setup/workspace-setup-trust' import { useAppStore } from '@/store' import type { QuickSubmitOptions } from './quick-creation-request' diff --git a/src/renderer/src/hooks/composer-state/gitlab-provider-selection.ts b/src/renderer/src/hooks/composer-state/gitlab-provider-selection.ts index 42daef17ccd..173a317c917 100644 --- a/src/renderer/src/hooks/composer-state/gitlab-provider-selection.ts +++ b/src/renderer/src/hooks/composer-state/gitlab-provider-selection.ts @@ -29,7 +29,7 @@ type GitLabProviderSelectionInput = Pick< > import { useCallback } from 'react' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import '@/components/sidebar/workspace-creation/folder/folder-workspace-source-repos' import { buildGitLabWorkspaceSource as toGitLabLinkedWorkItem, diff --git a/src/renderer/src/hooks/composer-state/linked-item-lookup-effects.ts b/src/renderer/src/hooks/composer-state/linked-item-lookup-effects.ts index 4ae21cd18f1..3ebc84ff47e 100644 --- a/src/renderer/src/hooks/composer-state/linked-item-lookup-effects.ts +++ b/src/renderer/src/hooks/composer-state/linked-item-lookup-effects.ts @@ -29,7 +29,7 @@ type LinkedItemLookupEffectsInput = Pick< import { canUseRepoBackedComposerSources } from '@/lib/workspace/creation/new-workspace-ssh-gate' import { useEffect } from 'react' import { PER_REPO_FETCH_LIMIT } from '../../../../shared/work-items/work-item-pagination' -import { getDefaultSetupDecision } from '../../../../shared/orca-hook-setup-config' +import { getDefaultSetupDecision } from '../../../../shared/workspace-setup/hooks/orca-hook-setup-config' import type { GitHubWorkItem } from '../../../../shared/github/work-items/work-item-types' import { lookupGitHubWorkItemByOwnerRepoForSource, diff --git a/src/renderer/src/hooks/composer-state/provider-runtime-sync.ts b/src/renderer/src/hooks/composer-state/provider-runtime-sync.ts index 9ba855f16be..2b09541a20f 100644 --- a/src/renderer/src/hooks/composer-state/provider-runtime-sync.ts +++ b/src/renderer/src/hooks/composer-state/provider-runtime-sync.ts @@ -21,7 +21,10 @@ export type ComposerProviderRuntimeSyncInput = Pick< > import { useEffect, useCallback, useRef } from 'react' -import type { SetupAgentStartupPolicy, OrcaHooks } from '../../../../shared/orca-yaml-hook-types' +import type { + SetupAgentStartupPolicy, + OrcaHooks +} from '../../../../shared/workspace-setup/orca-yaml-hook-types' import { useAppStore } from '@/store' import { isGitRepoKind } from '../../../../shared/repository/repo-kind' import { toast } from 'sonner' diff --git a/src/renderer/src/hooks/composer-state/provider-sync-model.ts b/src/renderer/src/hooks/composer-state/provider-sync-model.ts index 352a21d6501..9f666b2fb89 100644 --- a/src/renderer/src/hooks/composer-state/provider-sync-model.ts +++ b/src/renderer/src/hooks/composer-state/provider-sync-model.ts @@ -1,5 +1,8 @@ import type { RefObject } from 'react' -import type { OrcaHooks, SetupAgentStartupPolicy } from '../../../../shared/orca-yaml-hook-types' +import type { + OrcaHooks, + SetupAgentStartupPolicy +} from '../../../../shared/workspace-setup/orca-yaml-hook-types' import type { HookCheckResult } from '@/runtime/repo-hooks/runtime-hooks-client' export type ComposerProviderSyncModel = { diff --git a/src/renderer/src/hooks/composer-state/quick-submit-preparation.ts b/src/renderer/src/hooks/composer-state/quick-submit-preparation.ts index 1f4b196a37b..c9c8047060d 100644 --- a/src/renderer/src/hooks/composer-state/quick-submit-preparation.ts +++ b/src/renderer/src/hooks/composer-state/quick-submit-preparation.ts @@ -4,7 +4,7 @@ import { useCallback } from 'react' import { settleComposerSubmit } from '@/lib/workspace/creation/composer-submit-cancellation' import { getWorkspaceSourceProvider } from '../../../../shared/new-workspace/workspace-source' import { canUseIssueCommandForLinkedItemProvider } from '@/lib/workspace/creation/new-workspace' -import { getSetupConfig } from '../../../../shared/orca-hook-setup-config' +import { getSetupConfig } from '../../../../shared/workspace-setup/hooks/orca-hook-setup-config' import { deriveWorkspaceSetupState, readWorkspaceSetupInspection, diff --git a/src/renderer/src/hooks/composer-state/runtime-target-model.ts b/src/renderer/src/hooks/composer-state/runtime-target-model.ts index 4cf6cab4b44..4a069d38ff1 100644 --- a/src/renderer/src/hooks/composer-state/runtime-target-model.ts +++ b/src/renderer/src/hooks/composer-state/runtime-target-model.ts @@ -7,7 +7,7 @@ import type { SshConnectionStatus } from '../../../../shared/remote-runtime/ssh/ssh-types' import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent' -import type { OrcaVmRecipe } from '../../../../shared/orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../../../shared/workspace-setup/orca-yaml-hook-types' import type { AgentStartupShell } from '../../../../shared/agent-launch/startup/tui-agent-startup-shell' import type { ExecutionHostPlatformFact } from '@/runtime/hosts/platform/execution-host-platform-fact' import type { NewWorkspaceProjectOption } from '@/lib/workspace/creation/new-workspace-project-options' diff --git a/src/renderer/src/hooks/composer-state/setup-policy-decisions.ts b/src/renderer/src/hooks/composer-state/setup-policy-decisions.ts index bf36239e5cc..51e1713ee80 100644 --- a/src/renderer/src/hooks/composer-state/setup-policy-decisions.ts +++ b/src/renderer/src/hooks/composer-state/setup-policy-decisions.ts @@ -2,7 +2,7 @@ import { getDefaultRepoHookSettings } from '../../../../shared/constants' import type { RepoHookSettings, SetupAgentStartupPolicy -} from '../../../../shared/orca-yaml-hook-types' +} from '../../../../shared/workspace-setup/orca-yaml-hook-types' export function getRepoSetupAgentStartupPolicy(repo?: { hookSettings?: Pick diff --git a/src/renderer/src/hooks/composer-state/source-identity-actions.ts b/src/renderer/src/hooks/composer-state/source-identity-actions.ts index 4403e2dfa9a..85de718b042 100644 --- a/src/renderer/src/hooks/composer-state/source-identity-actions.ts +++ b/src/renderer/src/hooks/composer-state/source-identity-actions.ts @@ -34,7 +34,7 @@ type SourceIdentityActionsInput = Pick< > import { useCallback } from 'react' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import '@/lib/workspace/creation/new-workspace' import { getLinkedWorkItemSuggestedName, diff --git a/src/renderer/src/hooks/composer-state/source-selection-decisions.ts b/src/renderer/src/hooks/composer-state/source-selection-decisions.ts index 8e182195439..2a2e7243b48 100644 --- a/src/renderer/src/hooks/composer-state/source-selection-decisions.ts +++ b/src/renderer/src/hooks/composer-state/source-selection-decisions.ts @@ -1,6 +1,6 @@ import type { GitHubPrStartPoint, GitPushTarget } from '../../../../shared/worktree/types' import type { GitHubWorkItem } from '../../../../shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../shared/gitlab/gitlab-types' import { getWorkspaceSourceProvider } from '../../../../shared/new-workspace/workspace-source' import type { LinkedWorkItemSummary } from '@/lib/workspace/creation/new-workspace' import type { SmartGitHubSubmitResolution } from '@/lib/work-items/github/smart-github-submit' diff --git a/src/renderer/src/hooks/composer-state/use-project-group-setup.ts b/src/renderer/src/hooks/composer-state/use-project-group-setup.ts index 446dfec3bad..b92ec2b4b39 100644 --- a/src/renderer/src/hooks/composer-state/use-project-group-setup.ts +++ b/src/renderer/src/hooks/composer-state/use-project-group-setup.ts @@ -1,8 +1,8 @@ import { useEffect, useRef, useState, type Dispatch, type SetStateAction } from 'react' import type { ProjectGroup } from '../../../../shared/project/groups/project-group-types' import type { GroupHookCheckResult } from '../../../../shared/project/groups/project-group-hooks' -import type { SetupAgentStartupPolicy } from '../../../../shared/orca-yaml-hook-types' -import { getSetupConfig } from '../../../../shared/orca-hook-setup-config' +import type { SetupAgentStartupPolicy } from '../../../../shared/workspace-setup/orca-yaml-hook-types' +import { getSetupConfig } from '../../../../shared/workspace-setup/hooks/orca-hook-setup-config' import { getRepoExecutionHostId } from '../../../../shared/execution-host' import { projectGroupHookOwner } from '../../../../shared/workspace-setup/hooks/workspace-hook-owner' import { PROJECT_GROUP_FOLDER_SETUP_RUNTIME_CAPABILITY } from '../../../../shared/remote-runtime/protocol/worktree-runtime-capabilities' diff --git a/src/renderer/src/hooks/editor-external-watch-event-reconciliation.ts b/src/renderer/src/hooks/editor-external-watch-event-reconciliation.ts index 3ffa7b37f0a..bf105d6cdd5 100644 --- a/src/renderer/src/hooks/editor-external-watch-event-reconciliation.ts +++ b/src/renderer/src/hooks/editor-external-watch-event-reconciliation.ts @@ -8,7 +8,7 @@ import { hasActiveEditorPathMoves, isActiveMoveSourcePath } from '@/components/editor/file-ownership/editor-path-move-inflight' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import type { FsChangedPayload } from '../../../shared/file-watch/filesystem-change-event' import { ORCA_WORKTREE_FILE_CHANGE_EVENT, diff --git a/src/renderer/src/hooks/editor-external-watch-local-roots.ts b/src/renderer/src/hooks/editor-external-watch-local-roots.ts index 0b2ed484efa..aa9398265ef 100644 --- a/src/renderer/src/hooks/editor-external-watch-local-roots.ts +++ b/src/renderer/src/hooks/editor-external-watch-local-roots.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' export type WatchRootArgs = { worktreePath: string; connectionId: string | undefined } diff --git a/src/renderer/src/hooks/editor-external-watch-symlink-folders.ts b/src/renderer/src/hooks/editor-external-watch-symlink-folders.ts index 6d7c68020cd..a19460ea9d4 100644 --- a/src/renderer/src/hooks/editor-external-watch-symlink-folders.ts +++ b/src/renderer/src/hooks/editor-external-watch-symlink-folders.ts @@ -4,7 +4,7 @@ import { isVirtualEditorFile } from '@/store/slices/editor/tabs/editor-tab-conte import { normalizeRuntimePathForComparison, relativePathInsideRoot -} from '../../../shared/cross-platform-path' +} from '../../../shared/file-access/cross-platform-path' import { getEditorExternalWatchTargetKey, getOpenFileRuntimeOwner, diff --git a/src/renderer/src/hooks/editor-external-watch-target-rows.ts b/src/renderer/src/hooks/editor-external-watch-target-rows.ts index 7d572627b5f..167c2966457 100644 --- a/src/renderer/src/hooks/editor-external-watch-target-rows.ts +++ b/src/renderer/src/hooks/editor-external-watch-target-rows.ts @@ -1,6 +1,6 @@ import type { AppState } from '@/store/types' import type { ExecutionHostOwnerRow } from '../../../shared/execution-host/worktree-execution-host-resolution' -import { isWindowsAbsolutePathLike } from '../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../shared/file-access/cross-platform-path' import { isLocalExecutionHost, parseExecutionHostId, diff --git a/src/renderer/src/hooks/ipc-events/ssh-managed-server-state-effects.ts b/src/renderer/src/hooks/ipc-events/ssh-managed-server-state-effects.ts index 907bb442fc2..d33220c2481 100644 --- a/src/renderer/src/hooks/ipc-events/ssh-managed-server-state-effects.ts +++ b/src/renderer/src/hooks/ipc-events/ssh-managed-server-state-effects.ts @@ -2,7 +2,7 @@ import type { SshConnectionState, SshManagedServerLinkedProject } from '../../../../shared/remote-runtime/ssh/ssh-types' -import { normalizeRuntimePathForComparison } from '../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../shared/file-access/cross-platform-path' import { splitWorktreeId } from '../../../../shared/worktree/id' import { parseWorkspaceKey } from '../../../../shared/workspace/identity/workspace-scope' import type { Repo } from '../../../../shared/repository/repo-types' diff --git a/src/renderer/src/hooks/skills/discovery/installed-agent-skill-verdict.ts b/src/renderer/src/hooks/skills/discovery/installed-agent-skill-verdict.ts index dc6a558c673..6aef703b820 100644 --- a/src/renderer/src/hooks/skills/discovery/installed-agent-skill-verdict.ts +++ b/src/renderer/src/hooks/skills/discovery/installed-agent-skill-verdict.ts @@ -1,4 +1,4 @@ -import { relativePathInsideRoot } from '../../../../../shared/cross-platform-path' +import { relativePathInsideRoot } from '../../../../../shared/file-access/cross-platform-path' import type { DiscoveredSkill, SkillDiscoverySource, diff --git a/src/renderer/src/hooks/useEditorExternalWatch.ts b/src/renderer/src/hooks/useEditorExternalWatch.ts index 0857454aced..123bd63aac9 100644 --- a/src/renderer/src/hooks/useEditorExternalWatch.ts +++ b/src/renderer/src/hooks/useEditorExternalWatch.ts @@ -2,7 +2,7 @@ import { useSourceControlWatchConsumers } from './source-control-watch-consumers import { useCallback, useEffect, useRef, useState } from 'react' import { useAppStore } from '@/store' import { subscribeEditorRuntimeFileWatch } from './editor-runtime-file-watch' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' import type { FsChangedPayload } from '../../../shared/file-watch/filesystem-change-event' import { getEditorExternalWatchTargetKey, diff --git a/src/renderer/src/hooks/useEphemeralVmRecipeOptions.ts b/src/renderer/src/hooks/useEphemeralVmRecipeOptions.ts index 6a844aebf00..5a920185596 100644 --- a/src/renderer/src/hooks/useEphemeralVmRecipeOptions.ts +++ b/src/renderer/src/hooks/useEphemeralVmRecipeOptions.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useRef, useState } from 'react' import { LOCAL_EXECUTION_HOST_ID, type ExecutionHostId } from '../../../shared/execution-host' -import type { OrcaVmRecipe } from '../../../shared/orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../../shared/workspace-setup/orca-yaml-hook-types' import type { EphemeralVmFailure } from '../../../shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-failure-copy' import { ephemeralVmErrorText } from '@/runtime/ephemeral-vm/ephemeral-vm-error-copy' import { useUiLanguageRevision } from '@/i18n/use-ui-language-revision' diff --git a/src/renderer/src/hooks/worktree-head-identity-apply.ts b/src/renderer/src/hooks/worktree-head-identity-apply.ts index ba0293ece6e..02e6b800b3e 100644 --- a/src/renderer/src/hooks/worktree-head-identity-apply.ts +++ b/src/renderer/src/hooks/worktree-head-identity-apply.ts @@ -1,6 +1,6 @@ import type { Worktree, WorktreeHeadIdentity } from '../../../shared/worktree/types' import { LOCAL_EXECUTION_HOST_ID, type ExecutionHostId } from '../../../shared/execution-host' -import { normalizeRuntimePathForComparison } from '../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../shared/file-access/cross-platform-path' export type WorktreeHeadIdentityApplyDeps = { getWorktreesForRepo: (repoId: string) => Worktree[] | undefined diff --git a/src/renderer/src/lib/agent-session/launch/inventory/host-chat-program.ts b/src/renderer/src/lib/agent-session/launch/inventory/host-chat-program.ts index 7578a88e033..26c59b9b23f 100644 --- a/src/renderer/src/lib/agent-session/launch/inventory/host-chat-program.ts +++ b/src/renderer/src/lib/agent-session/launch/inventory/host-chat-program.ts @@ -1,6 +1,6 @@ import { nativeChatPreferenceFor } from '../../../../../../shared/agent-launch/choices/structured-native-chat-launch-route' import { parseExecutionHostId } from '../../../../../../shared/execution-host' -import { MANAGED_RUNTIME_INSTALL_RUNTIME_CAPABILITY as INSTALL } from '../../../../../../shared/managed-runtime-install' +import { MANAGED_RUNTIME_INSTALL_RUNTIME_CAPABILITY as INSTALL } from '../../../../../../shared/agent-launch/installation/managed-runtime-install' import { STRUCTURED_AGENT_SESSION_REGISTERED_AGENTS_RUNTIME_CAPABILITY as CATALOG, STRUCTURED_AGENT_SESSION_AVAILABILITY_RUNTIME_CAPABILITY as AVAILABILITY diff --git a/src/renderer/src/lib/agent-session/resume/agent-resume-launch-target.ts b/src/renderer/src/lib/agent-session/resume/agent-resume-launch-target.ts index e8f9c7e93c4..792101a0060 100644 --- a/src/renderer/src/lib/agent-session/resume/agent-resume-launch-target.ts +++ b/src/renderer/src/lib/agent-session/resume/agent-resume-launch-target.ts @@ -3,7 +3,7 @@ import { REMOTE_RUNTIME_PTY_HONOURS_TAB_SHELL_OVERRIDE } from '@/components/term import { parseExecutionHostId } from '../../../../../shared/execution-host' import { lastVerifiedRuntimeStatus } from '../../../../../shared/remote-runtime/host-status/runtime-host-status' import { isWslUncPath } from '../../../../../shared/file-access/wsl-paths' -import { isWindowsAbsolutePathLike } from '../../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../../shared/file-access/cross-platform-path' import { resolveHostAgentStartupShell } from '../../../../../shared/shell/launch/windows-terminal-shell' import type { AppState } from '@/store/types' import type { ProjectExecutionRuntimeResolution } from '../../../../../shared/execution-host/project-execution-runtime' diff --git a/src/renderer/src/lib/agent-session/resume/history/ai-vault-session-resume-preparation.ts b/src/renderer/src/lib/agent-session/resume/history/ai-vault-session-resume-preparation.ts index 847c778bec8..20c17dcf9eb 100644 --- a/src/renderer/src/lib/agent-session/resume/history/ai-vault-session-resume-preparation.ts +++ b/src/renderer/src/lib/agent-session/resume/history/ai-vault-session-resume-preparation.ts @@ -23,7 +23,7 @@ import { browseRuntimeServerDirectory } from '@/runtime/files/reads/runtime-serv import { RuntimeRpcCallError } from '@/runtime/rpc/calls/runtime-rpc-result' import { getRuntimeEnvironmentRevision } from '@/runtime/rpc/environment-revisions/runtime-environment-revision' import type { FilesystemPathFlavor } from '../../../../../../shared/file-access/filesystem-path-flavor' -import { isWindowsAbsolutePathLike } from '../../../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../../../shared/file-access/cross-platform-path' import { readIpcErrorMessage } from '../../../../runtime/errors/ipc-error' import type { AiVaultResumeCommandSession } from '../../../../../../shared/ai-vault/resume/ai-vault-resume-startup' import { agentForksThroughChat } from '../../../../../../shared/agent-launch/startup/agent-resume-argv' diff --git a/src/renderer/src/lib/browser/cookies/browser-cookie-import-toast.ts b/src/renderer/src/lib/browser/cookies/browser-cookie-import-toast.ts index 8f6fbf4227e..5c3b21f08b5 100644 --- a/src/renderer/src/lib/browser/cookies/browser-cookie-import-toast.ts +++ b/src/renderer/src/lib/browser/cookies/browser-cookie-import-toast.ts @@ -1,6 +1,6 @@ import { toast } from 'sonner' import type { BrowserCookieImportSummary } from '../../../../../shared/browser/workspaces/browser-workspace-types' -import { isHandledWireDiscriminant } from '../../../../../shared/handled-wire-discriminant' +import { isHandledWireDiscriminant } from '../../../../../shared/rpc-contract/handled-wire-discriminant' import { translate } from '@/i18n/i18n' type CookieImportWarning = NonNullable diff --git a/src/renderer/src/lib/clipboard/clipboard-file-path.ts b/src/renderer/src/lib/clipboard/clipboard-file-path.ts index 9e1cf2d6696..da4c51e3777 100644 --- a/src/renderer/src/lib/clipboard/clipboard-file-path.ts +++ b/src/renderer/src/lib/clipboard/clipboard-file-path.ts @@ -1,4 +1,4 @@ -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' import { isLocalPathOpenBlocked, type LocalPathOpenOwner diff --git a/src/renderer/src/lib/editor/file-operations/execute-open-editor-path-move.ts b/src/renderer/src/lib/editor/file-operations/execute-open-editor-path-move.ts index 723c15746ff..fd6608b6e23 100644 --- a/src/renderer/src/lib/editor/file-operations/execute-open-editor-path-move.ts +++ b/src/renderer/src/lib/editor/file-operations/execute-open-editor-path-move.ts @@ -7,7 +7,7 @@ import { settleEditorPathMove } from '@/components/editor/file-ownership/editor-path-move-inflight' import { remapOpenEditorTabsForPathChange } from '@/lib/editor/file-operations/remap-open-editor-tabs-for-path-change' -import { isPathInsideOrEqual } from '../../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../../shared/file-access/cross-platform-path' import { verifyLatchedMoveDestinations } from '@/hooks/useEditorExternalWatch' import { notifyHostOfMirroredEditorClose } from '@/runtime/web-session-tabs-sync/closing/close-mirrored-editor-tab' import { runtimeEnvironmentIdOrLocalUnlessTwin } from '@/lib/workspace/ownership/worktree-runtime-owner' diff --git a/src/renderer/src/lib/editor/file-operations/remap-open-editor-tabs-for-path-change.ts b/src/renderer/src/lib/editor/file-operations/remap-open-editor-tabs-for-path-change.ts index acbd0a16775..a81a6b9653c 100644 --- a/src/renderer/src/lib/editor/file-operations/remap-open-editor-tabs-for-path-change.ts +++ b/src/renderer/src/lib/editor/file-operations/remap-open-editor-tabs-for-path-change.ts @@ -19,7 +19,7 @@ import { isWindowsAbsolutePathLike, normalizeRuntimePathSeparators, relativePathInsideRoot -} from '../../../../../shared/cross-platform-path' +} from '../../../../../shared/file-access/cross-platform-path' import { FLOATING_TERMINAL_WORKTREE_ID } from '../../../../../shared/constants' // Share flavor-aware containment so Windows/UNC/WSL case/separator variants retarget instead of stranding tabs on renamed paths. diff --git a/src/renderer/src/lib/editor/markdown/documents/markdown-document-templates.ts b/src/renderer/src/lib/editor/markdown/documents/markdown-document-templates.ts index 9ae6970489e..268fd608b1a 100644 --- a/src/renderer/src/lib/editor/markdown/documents/markdown-document-templates.ts +++ b/src/renderer/src/lib/editor/markdown/documents/markdown-document-templates.ts @@ -5,7 +5,7 @@ import { readRuntimeDirectory } from '@/runtime/files/reads/runtime-directory-re import { readRuntimeFileContent } from '@/runtime/files/reads/runtime-file-read-client' import { runtimePathExists } from '@/runtime/files/metadata/runtime-file-metadata-client' import { basename, joinPath } from '../../../path' -import { normalizeRelativePath } from '../../../../../../shared/cross-platform-path' +import { normalizeRelativePath } from '../../../../../../shared/file-access/cross-platform-path' const MARKDOWN_TEMPLATE_ROOT = '.orca/templates' const MARKDOWN_TEMPLATE_MAX_DEPTH = 8 diff --git a/src/renderer/src/lib/files/drop/workspace-file-drag.ts b/src/renderer/src/lib/files/drop/workspace-file-drag.ts index f363a50de07..78b5b8087a8 100644 --- a/src/renderer/src/lib/files/drop/workspace-file-drag.ts +++ b/src/renderer/src/lib/files/drop/workspace-file-drag.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../shared/file-access/cross-platform-path' import { NATIVE_FILE_DROP_MAX_PATH_BYTES, NATIVE_FILE_DROP_MAX_PATHS, diff --git a/src/renderer/src/lib/files/search/quick-open-file-history.ts b/src/renderer/src/lib/files/search/quick-open-file-history.ts index 594ac81c299..d963ffd736c 100644 --- a/src/renderer/src/lib/files/search/quick-open-file-history.ts +++ b/src/renderer/src/lib/files/search/quick-open-file-history.ts @@ -2,7 +2,7 @@ import { useSyncExternalStore } from 'react' import { useAppStore } from '@/store/index' import type { AppState } from '@/store/types' import type { OpenFile } from '@/store/slices/editor/types/open-file' -import { normalizeRuntimePathForComparison } from '../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../shared/file-access/cross-platform-path' import { resolveWorktreeOperationRoute } from '../../workspace/ownership/worktree-operation-route' const STORAGE_KEY = 'orca.quick-open-history.v1' diff --git a/src/renderer/src/lib/path-display/path-head-elision.ts b/src/renderer/src/lib/path-display/path-head-elision.ts index cd184ce6161..206e97d386d 100644 --- a/src/renderer/src/lib/path-display/path-head-elision.ts +++ b/src/renderer/src/lib/path-display/path-head-elision.ts @@ -1,5 +1,5 @@ import type { MatchRange } from '../../../../shared/palette-match/normalized-text' -import { isWindowsAbsolutePathLike } from '../../../../shared/cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../../shared/file-access/cross-platform-path' export type PathHeadElisionSplit = { head: string diff --git a/src/renderer/src/lib/path.ts b/src/renderer/src/lib/path.ts index afacb9ed9f0..db61bc330c6 100644 --- a/src/renderer/src/lib/path.ts +++ b/src/renderer/src/lib/path.ts @@ -1,7 +1,7 @@ import { isWindowsAbsolutePathLike, relativePathInsideRoot -} from '../../../shared/cross-platform-path' +} from '../../../shared/file-access/cross-platform-path' function stripTrailingSeparators(path: string): string { return path.replace(/[\\/]+$/, '') diff --git a/src/renderer/src/lib/source-control/paths/git-path-decoration.ts b/src/renderer/src/lib/source-control/paths/git-path-decoration.ts index 08ebb89e157..6dae9458f3c 100644 --- a/src/renderer/src/lib/source-control/paths/git-path-decoration.ts +++ b/src/renderer/src/lib/source-control/paths/git-path-decoration.ts @@ -3,7 +3,10 @@ import type { GitStatusEntry } from '../../../../../shared/git/status/git-status-types' import { joinPath } from '@/lib/path' -import { normalizeRelativePath, splitPathSegments } from '../../../../../shared/cross-platform-path' +import { + normalizeRelativePath, + splitPathSegments +} from '../../../../../shared/file-access/cross-platform-path' export const STATUS_COLORS: Record = { modified: 'var(--git-decoration-modified)', diff --git a/src/renderer/src/lib/source-control/remote/bitbucket-connect-error-copy.ts b/src/renderer/src/lib/source-control/remote/bitbucket-connect-error-copy.ts index 68f71afc2c1..53f9db529d3 100644 --- a/src/renderer/src/lib/source-control/remote/bitbucket-connect-error-copy.ts +++ b/src/renderer/src/lib/source-control/remote/bitbucket-connect-error-copy.ts @@ -2,7 +2,7 @@ import { translate } from '@/i18n/i18n' import { BITBUCKET_CONNECT_FAILURE_COPY as EN, type BitbucketConnectFailureCode -} from '../../../../../shared/bitbucket-credentials' +} from '../../../../../shared/bitbucket/bitbucket-credentials' const COPY: Record string> = { invalidInput: () => translate('codeHost.bitbucketConnect.invalidInput', EN.invalidInput), diff --git a/src/renderer/src/lib/source-control/remote/code-host-error-copy.ts b/src/renderer/src/lib/source-control/remote/code-host-error-copy.ts index 1879b0e089f..b387a0c79c2 100644 --- a/src/renderer/src/lib/source-control/remote/code-host-error-copy.ts +++ b/src/renderer/src/lib/source-control/remote/code-host-error-copy.ts @@ -2,11 +2,11 @@ import { translate } from '@/i18n/i18n' import { CODE_HOST_FAILURE_COPY as EN, type CodeHostFailureCode -} from '../../../../../shared/code-host-failure-copy' +} from '../../../../../shared/source-control/code-host-failure-copy' import { REVIEW_START_POINT_FAILURE_COPY as START_EN, type ReviewStartPointFailureCode -} from '../../../../../shared/review-start-point-failure-copy' +} from '../../../../../shared/worktree/hosted-review/review-start-point-failure-copy' // null = required detail missing; caller shows the host's English `error`. const COPY: Record string | null> = { diff --git a/src/renderer/src/lib/source-control/review/github-pr-start-point.ts b/src/renderer/src/lib/source-control/review/github-pr-start-point.ts index d5249e82a62..6be12ddb60e 100644 --- a/src/renderer/src/lib/source-control/review/github-pr-start-point.ts +++ b/src/renderer/src/lib/source-control/review/github-pr-start-point.ts @@ -1,7 +1,7 @@ import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' import type { RuntimeClientTarget } from '../../../../../shared/remote-runtime/host-catalog/runtime-client-target' import type { GitHubPrStartPoint } from '../../../../../shared/worktree/types' -import type { ReviewStartPointFailure } from '../../../../../shared/review-start-point-failure-copy' +import type { ReviewStartPointFailure } from '../../../../../shared/worktree/hosted-review/review-start-point-failure-copy' import { reviewStartPointErrorText } from '@/lib/source-control/remote/code-host-error-copy' export type GitHubPrStartPointInput = { diff --git a/src/renderer/src/lib/work-items/gitlab/gitlab-work-item-source-lookup.ts b/src/renderer/src/lib/work-items/gitlab/gitlab-work-item-source-lookup.ts index 3f7344dbc7e..c2899ce0c30 100644 --- a/src/renderer/src/lib/work-items/gitlab/gitlab-work-item-source-lookup.ts +++ b/src/renderer/src/lib/work-items/gitlab/gitlab-work-item-source-lookup.ts @@ -1,4 +1,4 @@ -import type { GitLabPagedResult, GitLabWorkItem } from '../../../../../shared/gitlab-types' +import type { GitLabPagedResult, GitLabWorkItem } from '../../../../../shared/gitlab/gitlab-types' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import { gitLabApiFor } from '@/runtime/repository-gitlab/gitlab-owner-api' diff --git a/src/renderer/src/lib/work-items/linear/linear-issue-url-lookup.ts b/src/renderer/src/lib/work-items/linear/linear-issue-url-lookup.ts index db8a70d2302..921638fa8d7 100644 --- a/src/renderer/src/lib/work-items/linear/linear-issue-url-lookup.ts +++ b/src/renderer/src/lib/work-items/linear/linear-issue-url-lookup.ts @@ -2,7 +2,7 @@ import { linearStatus } from '@/runtime/linear/runtime-linear-client' import { credentialDecryptionMessage, isIntegrationCredentialDecryptionError -} from '../../../../../shared/integration-credential-errors' +} from '../../../../../shared/secure-storage/integration-credential-errors' import { findLinearIssueWorkspaceLookupIds, isLinearIssueUrlResolutionMatch, diff --git a/src/renderer/src/lib/work-items/linear/linear-read-error.ts b/src/renderer/src/lib/work-items/linear/linear-read-error.ts index d40bb2c573c..635075f7249 100644 --- a/src/renderer/src/lib/work-items/linear/linear-read-error.ts +++ b/src/renderer/src/lib/work-items/linear/linear-read-error.ts @@ -5,7 +5,7 @@ import type { Translate } from '@/i18n/use-translate' import { credentialDecryptionMessage, isIntegrationCredentialDecryptionError -} from '../../../../../shared/integration-credential-errors' +} from '../../../../../shared/secure-storage/integration-credential-errors' import { isLinearIssueAttributeFilterUnsupportedError } from '@/runtime/linear/runtime-linear-client' export function linearIssueReadError(error: unknown, t: Translate = translate): string { diff --git a/src/renderer/src/lib/work-items/task-repo-source-context.ts b/src/renderer/src/lib/work-items/task-repo-source-context.ts index ece8b2938db..246bc62fcaa 100644 --- a/src/renderer/src/lib/work-items/task-repo-source-context.ts +++ b/src/renderer/src/lib/work-items/task-repo-source-context.ts @@ -1,5 +1,5 @@ import type { Repo } from '../../../../shared/repository/repo-types' -import type { GitLabProjectRef } from '../../../../shared/gitlab-types' +import type { GitLabProjectRef } from '../../../../shared/gitlab/gitlab-types' import { normalizeTaskSourceContext, type TaskSourceContext diff --git a/src/renderer/src/lib/workspace/creation/project-host-workspace-target.ts b/src/renderer/src/lib/workspace/creation/project-host-workspace-target.ts index bf52a82f035..37551f3ec2a 100644 --- a/src/renderer/src/lib/workspace/creation/project-host-workspace-target.ts +++ b/src/renderer/src/lib/workspace/creation/project-host-workspace-target.ts @@ -13,7 +13,7 @@ import type { Repo } from '../../../../../shared/repository/repo-types' import './new-workspace-composer-repo' import { resolveNewWorkspaceDialogRepoId } from '../../../../../shared/new-workspace-dialog-repo' import { findSoleHostCopy } from '../../../../../shared/worktree/host-qualified-identity' -import { normalizeRuntimePathForComparison } from '../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../shared/file-access/cross-platform-path' export type WorkspaceCreationTarget = { projectId: string diff --git a/src/renderer/src/lib/workspace/creation/setup/workspace-setup-preparation.ts b/src/renderer/src/lib/workspace/creation/setup/workspace-setup-preparation.ts index 46e58911394..e302100fb76 100644 --- a/src/renderer/src/lib/workspace/creation/setup/workspace-setup-preparation.ts +++ b/src/renderer/src/lib/workspace/creation/setup/workspace-setup-preparation.ts @@ -1,14 +1,17 @@ import type { HookCheckResult } from '@/runtime/repo-hooks/runtime-hooks-client' import { checkRuntimeHooks } from '@/runtime/repo-hooks/runtime-hooks-client' import type { ExecutionHostId } from '../../../../../../shared/execution-host' -import type { OrcaHooks, RepoHookSettings } from '../../../../../../shared/orca-yaml-hook-types' +import type { + OrcaHooks, + RepoHookSettings +} from '../../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { SetupDecision } from '../../../../../../shared/worktree/create-types' -import { resolveHookCommandSourcePolicy } from '../../../../../../shared/hook-command-source-policy' +import { resolveHookCommandSourcePolicy } from '../../../../../../shared/workspace-setup/hooks/hook-command-source-policy' import { getSetupConfig, getDefaultSetupDecision, type SetupConfig -} from '../../../../../../shared/orca-hook-setup-config' +} from '../../../../../../shared/workspace-setup/hooks/orca-hook-setup-config' import { settleComposerSubmit } from '../composer-submit-cancellation' type SetupRepo = { hookSettings?: RepoHookSettings } diff --git a/src/renderer/src/lib/workspace/creation/setup/workspace-setup-trust.ts b/src/renderer/src/lib/workspace/creation/setup/workspace-setup-trust.ts index cc0627c2c21..f04f956618b 100644 --- a/src/renderer/src/lib/workspace/creation/setup/workspace-setup-trust.ts +++ b/src/renderer/src/lib/workspace/creation/setup/workspace-setup-trust.ts @@ -10,7 +10,7 @@ import { import { isFolderRepo } from '../../../../../../shared/repository/repo-kind' import type { SetupDecision } from '../../../../../../shared/worktree/create-types' import type { ApprovedSetupHashes } from '../../../../../../shared/worktree/creation/approved-setup-hashes' -import { approvedOrcaHookContentHashes } from '../../../../../../shared/orca-hook-trust-entries' +import { approvedOrcaHookContentHashes } from '../../../../../../shared/workspace-setup/hooks/orca-hook-trust-entries' import { ensureHooksApproved } from '../../../../runtime/repo-hooks/ensure-hooks-confirmed' import { settleComposerSubmit } from '../composer-submit-cancellation' import type { SetupHooksCreateSource } from '../../../../../../shared/worktree/setup-hooks-create-source' diff --git a/src/renderer/src/lib/workspace/ownership/connection-owner-resolution.ts b/src/renderer/src/lib/workspace/ownership/connection-owner-resolution.ts index 74e317a02d4..62dc832475a 100644 --- a/src/renderer/src/lib/workspace/ownership/connection-owner-resolution.ts +++ b/src/renderer/src/lib/workspace/ownership/connection-owner-resolution.ts @@ -13,7 +13,7 @@ import { parseWorkspaceKey } from '../../../../../shared/workspace/identity/work import { isPathInsideOrEqual, normalizeRuntimePathForComparison -} from '../../../../../shared/cross-platform-path' +} from '../../../../../shared/file-access/cross-platform-path' import { getFolderWorkspaceConnectionId } from './folder-workspace-connection' import { findFolderWorkspaceCandidateRepos } from '../../../../../shared/folder-workspaces/folder-workspace-execution-host' import { diff --git a/src/renderer/src/lib/workspace/paths/folder-workspace-path-status.ts b/src/renderer/src/lib/workspace/paths/folder-workspace-path-status.ts index 76597314203..fe11b2caa46 100644 --- a/src/renderer/src/lib/workspace/paths/folder-workspace-path-status.ts +++ b/src/renderer/src/lib/workspace/paths/folder-workspace-path-status.ts @@ -6,7 +6,7 @@ import type { FolderWorkspacePathStatus, FolderWorkspacePathStatusReason } from '../../../../../shared/folder-workspaces/folder-workspace-path-status' -import { isHandledWireDiscriminant } from '../../../../../shared/handled-wire-discriminant' +import { isHandledWireDiscriminant } from '../../../../../shared/rpc-contract/handled-wire-discriminant' // Guard unknown RPC reasons at runtime; union-keyed records make newly known reasons fail typecheck here and in both switches. const HANDLED_PATH_STATUS_REASONS: Record = { diff --git a/src/renderer/src/lib/workspace/persistence/wsl-move-renderer-store-keys.ts b/src/renderer/src/lib/workspace/persistence/wsl-move-renderer-store-keys.ts index 92113dba5cc..78fade26822 100644 --- a/src/renderer/src/lib/workspace/persistence/wsl-move-renderer-store-keys.ts +++ b/src/renderer/src/lib/workspace/persistence/wsl-move-renderer-store-keys.ts @@ -3,7 +3,7 @@ * is not one: another host's, another distro's, or a project the move did not take. */ import { LOCAL_EXECUTION_HOST_ID } from '../../../../../shared/execution-host' -import { normalizeRuntimePathForComparison } from '../../../../../shared/cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../../../shared/file-access/cross-platform-path' import type { PythonEnvironment } from '../../../../../shared/editor/notebooks/notebook-kernel-types' import type { WslMoveRendererRewriteScope } from '../../../../../shared/wsl-move/wsl-move-renderer-rewrite-scope' diff --git a/src/renderer/src/runtime/files/addressing/runtime-chat-scratch-file-address.ts b/src/renderer/src/runtime/files/addressing/runtime-chat-scratch-file-address.ts index 6398df35f33..39ce1b04bd5 100644 --- a/src/renderer/src/runtime/files/addressing/runtime-chat-scratch-file-address.ts +++ b/src/renderer/src/runtime/files/addressing/runtime-chat-scratch-file-address.ts @@ -1,4 +1,4 @@ -import { relativePathInsideRoot } from '../../../../../shared/cross-platform-path' +import { relativePathInsideRoot } from '../../../../../shared/file-access/cross-platform-path' // `/chat-scratch/<32 hex>/`, spelled with the host's own separators. const CHAT_SCRATCH_FILE = /^(.+?[\\/]chat-scratch[\\/][0-9a-f]{32})[\\/].+$/ diff --git a/src/renderer/src/runtime/files/imports/runtime-file-upload-client.ts b/src/renderer/src/runtime/files/imports/runtime-file-upload-client.ts index f985f6e7583..67ed573d985 100644 --- a/src/renderer/src/runtime/files/imports/runtime-file-upload-client.ts +++ b/src/renderer/src/runtime/files/imports/runtime-file-upload-client.ts @@ -1,11 +1,11 @@ import { extractIpcErrorMessage } from '@/runtime/errors/ipc-error' import { joinPath } from '@/lib/path' -import { normalizeRelativePath } from '../../../../../shared/cross-platform-path' +import { normalizeRelativePath } from '../../../../../shared/file-access/cross-platform-path' import type { StagedRuntimeUploadFileIdentity } from '../../../../../shared/file-import/runtime-upload-staging-contract' import { DROP_STAGING_GITIGNORE_CONTENT, DROP_STAGING_RELATIVE_DIR -} from '../../../../../shared/drop-staging-ignore' +} from '../../../../../shared/file-import/drop-staging-ignore' import type { RuntimeFileOperationArgs } from '../runtime-file-client-types' import { callRuntimeFileImportMutation, diff --git a/src/renderer/src/runtime/files/mutations/runtime-file-bytes-write.ts b/src/renderer/src/runtime/files/mutations/runtime-file-bytes-write.ts index 0d894dc652a..75ee9de0bad 100644 --- a/src/renderer/src/runtime/files/mutations/runtime-file-bytes-write.ts +++ b/src/renderer/src/runtime/files/mutations/runtime-file-bytes-write.ts @@ -1,5 +1,5 @@ import { encodeBase64Bytes } from '@/lib/base64-bytes' -import { normalizeRelativePath } from '../../../../../shared/cross-platform-path' +import { normalizeRelativePath } from '../../../../../shared/file-access/cross-platform-path' import { FILE_BYTES_SAVE_UPDATE_REQUIRED_MESSAGE, FILE_BYTES_WRITE_CHUNK_BYTES, diff --git a/src/renderer/src/runtime/files/mutations/runtime-file-mutation-client.ts b/src/renderer/src/runtime/files/mutations/runtime-file-mutation-client.ts index 09d27e20c93..dbe2e66df10 100644 --- a/src/renderer/src/runtime/files/mutations/runtime-file-mutation-client.ts +++ b/src/renderer/src/runtime/files/mutations/runtime-file-mutation-client.ts @@ -1,4 +1,4 @@ -import { normalizeRelativePath } from '../../../../../shared/cross-platform-path' +import { normalizeRelativePath } from '../../../../../shared/file-access/cross-platform-path' import type { RuntimeFileOperationArgs } from '../runtime-file-client-types' import { diff --git a/src/renderer/src/runtime/files/runtime-file-routing.ts b/src/renderer/src/runtime/files/runtime-file-routing.ts index b9f03711e7d..d645947f9ae 100644 --- a/src/renderer/src/runtime/files/runtime-file-routing.ts +++ b/src/renderer/src/runtime/files/runtime-file-routing.ts @@ -2,7 +2,7 @@ import { isWindowsAbsolutePathLike, relativePathInsideRoot, normalizeRelativePath -} from '../../../../shared/cross-platform-path' +} from '../../../../shared/file-access/cross-platform-path' import type { RuntimeClientTarget } from '../../../../shared/remote-runtime/host-catalog/runtime-client-target' import { toRuntimeWorktreeSelector } from '../rpc/targets/runtime-worktree-selector' import type { RuntimeFileOperationArgs } from './runtime-file-client-types' diff --git a/src/renderer/src/runtime/hosts/installation/managed-runtime-install-status.ts b/src/renderer/src/runtime/hosts/installation/managed-runtime-install-status.ts index fb1b69bcac4..c2abf49ebd6 100644 --- a/src/renderer/src/runtime/hosts/installation/managed-runtime-install-status.ts +++ b/src/renderer/src/runtime/hosts/installation/managed-runtime-install-status.ts @@ -1,4 +1,4 @@ -import type { ManagedRuntimeInstallState } from '../../../../../shared/managed-runtime-install' +import type { ManagedRuntimeInstallState } from '../../../../../shared/agent-launch/installation/managed-runtime-install' import type { RuntimeClientTarget } from '../../../../../shared/remote-runtime/host-catalog/runtime-client-target' import { createRevisionedHostStateStore, diff --git a/src/renderer/src/runtime/hosts/installation/use-managed-runtime-install.ts b/src/renderer/src/runtime/hosts/installation/use-managed-runtime-install.ts index 8a0fc223d34..5cb60d7145e 100644 --- a/src/renderer/src/runtime/hosts/installation/use-managed-runtime-install.ts +++ b/src/renderer/src/runtime/hosts/installation/use-managed-runtime-install.ts @@ -12,7 +12,7 @@ import { import { MANAGED_RUNTIME_INSTALL_RUNTIME_CAPABILITY, MANAGED_RUNTIME_REMOVE_RUNTIME_CAPABILITY -} from '../../../../../shared/managed-runtime-install' +} from '../../../../../shared/agent-launch/installation/managed-runtime-install' import { lastVerifiedRuntimeStatus } from '../../../../../shared/remote-runtime/host-status/runtime-host-status' import type { RuntimeClientTarget } from '../../../../../shared/remote-runtime/host-catalog/runtime-client-target' import { diff --git a/src/renderer/src/runtime/linear/runtime-linear-issue-client.ts b/src/renderer/src/runtime/linear/runtime-linear-issue-client.ts index 165acdaf38b..0cb2fed8252 100644 --- a/src/renderer/src/runtime/linear/runtime-linear-issue-client.ts +++ b/src/renderer/src/runtime/linear/runtime-linear-issue-client.ts @@ -1,4 +1,4 @@ -import type { LinearIssueUpdate } from '../../../../shared/issue-mutation-types' +import type { LinearIssueUpdate } from '../../../../shared/work-items/issue-mutation-types' import type { LinearComment, LinearIssue } from '../../../../shared/linear/issue-types' import { callRuntimeRpc } from '../rpc/calls/runtime-rpc-call' import { diff --git a/src/renderer/src/runtime/mcp/configuration/mcp-config-inspection.ts b/src/renderer/src/runtime/mcp/configuration/mcp-config-inspection.ts index 4e836843572..38274d43c94 100644 --- a/src/renderer/src/runtime/mcp/configuration/mcp-config-inspection.ts +++ b/src/renderer/src/runtime/mcp/configuration/mcp-config-inspection.ts @@ -7,7 +7,7 @@ import { selectExistingMcpConfigCandidates, type McpConfigDirectoryEntry, type McpConfigInspection -} from '../../../../../shared/mcp-config' +} from '../../../../../shared/mcp/configuration/mcp-config' import { joinPath } from '../../../lib/path' import { extractIpcErrorMessage } from '../../errors/ipc-error' diff --git a/src/renderer/src/runtime/repo-hooks/ensure-hooks-confirmed.ts b/src/renderer/src/runtime/repo-hooks/ensure-hooks-confirmed.ts index 97f8e424084..022113e87c3 100644 --- a/src/renderer/src/runtime/repo-hooks/ensure-hooks-confirmed.ts +++ b/src/renderer/src/runtime/repo-hooks/ensure-hooks-confirmed.ts @@ -1,15 +1,15 @@ import { findHookRepo, hookRepoOwnerHostId } from './hook-owner-resolution' import { projectGroupHookTrustKey } from '../../../../shared/workspace-setup/hooks/workspace-hook-owner' import type { AppState } from '@/store/types' -import type { OrcaHooks } from '../../../../shared/orca-yaml-hook-types' -import { resolveHookCommandSourcePolicy } from '../../../../shared/hook-command-source-policy' -import { getSetupTrustContent } from '../../../../shared/orca-hook-setup-config' +import type { OrcaHooks } from '../../../../shared/workspace-setup/orca-yaml-hook-types' +import { resolveHookCommandSourcePolicy } from '../../../../shared/workspace-setup/hooks/hook-command-source-policy' +import { getSetupTrustContent } from '../../../../shared/workspace-setup/hooks/orca-hook-setup-config' import { canUseRepoWideTrust, isOrcaHookContentApproved -} from '../../../../shared/orca-hook-trust-entries' +} from '../../../../shared/workspace-setup/hooks/orca-hook-trust-entries' import { hashOrcaHookScript } from './orca-hook-trust' -import type { OrcaHookTrustKind } from '../../../../shared/orca-hook-trust-entries' +import type { OrcaHookTrustKind } from '../../../../shared/workspace-setup/hooks/orca-hook-trust-entries' import { getVmRecipeTrustContent } from './vm-recipe-trust-content' import type { SetupHooksCreateSource } from '../../../../shared/worktree/setup-hooks-create-source' import { getIssueCommandTrustContent, isUserOwnedIssueCommand } from './issue-command-trust-content' diff --git a/src/renderer/src/runtime/repo-hooks/runtime-hooks-client.ts b/src/renderer/src/runtime/repo-hooks/runtime-hooks-client.ts index 97012017f21..d0b670fca9d 100644 --- a/src/renderer/src/runtime/repo-hooks/runtime-hooks-client.ts +++ b/src/renderer/src/runtime/repo-hooks/runtime-hooks-client.ts @@ -1,5 +1,5 @@ import type { GroupHookCheckResult } from '../../../../shared/project/groups/project-group-hooks' -import type { OrcaHooks } from '../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../shared/workspace-setup/orca-yaml-hook-types' import type { ExecutionHostId } from '../../../../shared/execution-host' import type { SetupScriptImportCandidate } from '../../../../shared/workspace-setup/setup-script-imports' import { callRuntimeRpc } from '../rpc/calls/runtime-rpc-call' diff --git a/src/renderer/src/runtime/repo-hooks/setup-script-prompt.ts b/src/renderer/src/runtime/repo-hooks/setup-script-prompt.ts index e783a6011b3..f76e10a848f 100644 --- a/src/renderer/src/runtime/repo-hooks/setup-script-prompt.ts +++ b/src/renderer/src/runtime/repo-hooks/setup-script-prompt.ts @@ -1,7 +1,7 @@ import { getDefaultRepoHookSettings } from '../../../../shared/constants' -import { resolveHookCommandSourcePolicy } from '../../../../shared/hook-command-source-policy' +import { resolveHookCommandSourcePolicy } from '../../../../shared/workspace-setup/hooks/hook-command-source-policy' import type { SetupScriptImportCandidate } from '../../../../shared/workspace-setup/setup-script-imports' -import type { RepoHookSettings } from '../../../../shared/orca-yaml-hook-types' +import type { RepoHookSettings } from '../../../../shared/workspace-setup/orca-yaml-hook-types' import type { Repo } from '../../../../shared/repository/repo-types' import type { HookCheckResult } from '@/runtime/repo-hooks/runtime-hooks-client' import { isRuntimeScopeForbiddenError } from '@/runtime/rpc/calls/runtime-rpc-result' diff --git a/src/renderer/src/runtime/repo-hooks/setup-script-status.ts b/src/renderer/src/runtime/repo-hooks/setup-script-status.ts index ea04dbf3362..d762149432a 100644 --- a/src/renderer/src/runtime/repo-hooks/setup-script-status.ts +++ b/src/renderer/src/runtime/repo-hooks/setup-script-status.ts @@ -1,4 +1,4 @@ -import { resolveHookCommandSourcePolicy } from '../../../../shared/hook-command-source-policy' +import { resolveHookCommandSourcePolicy } from '../../../../shared/workspace-setup/hooks/hook-command-source-policy' import type { Repo } from '../../../../shared/repository/repo-types' import type { HookCheckResult } from '@/runtime/repo-hooks/runtime-hooks-client' diff --git a/src/renderer/src/runtime/repo-hooks/vm-recipe-trust-content.ts b/src/renderer/src/runtime/repo-hooks/vm-recipe-trust-content.ts index 90d4d4807c5..6f9f2e6859b 100644 --- a/src/renderer/src/runtime/repo-hooks/vm-recipe-trust-content.ts +++ b/src/renderer/src/runtime/repo-hooks/vm-recipe-trust-content.ts @@ -1,4 +1,4 @@ -import type { OrcaHooks } from '../../../../shared/orca-yaml-hook-types' +import type { OrcaHooks } from '../../../../shared/workspace-setup/orca-yaml-hook-types' /** The environment recipe commands a vmRecipe trust approval covers. */ export function getVmRecipeTrustContent(yamlHooks: OrcaHooks | null): string { diff --git a/src/renderer/src/runtime/repository-gitlab/gitlab-job-trace-client.ts b/src/renderer/src/runtime/repository-gitlab/gitlab-job-trace-client.ts index 8634e15d2a2..0d3e1dca16e 100644 --- a/src/renderer/src/runtime/repository-gitlab/gitlab-job-trace-client.ts +++ b/src/renderer/src/runtime/repository-gitlab/gitlab-job-trace-client.ts @@ -3,7 +3,7 @@ import { gitLabJobCanHaveTrace, gitLabJobTraceToCheckRunDetails } from '../../../../shared/source-control/checks/gitlab/gitlab-job-trace-check-details' -import type { GitLabProjectRef } from '../../../../shared/gitlab-types' +import type { GitLabProjectRef } from '../../../../shared/gitlab/gitlab-types' import type { PRCheckDetail, PRCheckRunDetails } from '../../../../shared/github/checks/check-types' import { gitLabApiFor, JOB_TRACE_TIMEOUT_MS } from './gitlab-owner-api' import { withGitLabIpcTimeout } from './gitlab-ipc-timeout' diff --git a/src/renderer/src/runtime/source-control/references/runtime-repo-client.ts b/src/renderer/src/runtime/source-control/references/runtime-repo-client.ts index 2577ebb31f1..8658ffa0506 100644 --- a/src/renderer/src/runtime/source-control/references/runtime-repo-client.ts +++ b/src/renderer/src/runtime/source-control/references/runtime-repo-client.ts @@ -1,5 +1,5 @@ import type { BaseRefSearchResult } from '../../../../../shared/repository/repo-types' -import { legacyBaseRefSearchResult } from '../../../../../shared/base-ref-search-result' +import { legacyBaseRefSearchResult } from '../../../../../shared/worktree/base-refs/base-ref-search-result' import { callRuntimeRpc } from '../../rpc/calls/runtime-rpc-call' import { ipcOrRuntimeTargetForHostId } from '../../rpc/targets/runtime-client-target' import type { RuntimeClientTarget } from '../../../../../shared/remote-runtime/host-catalog/runtime-client-target' diff --git a/src/renderer/src/store/folder-workspaces/folder-path-status.ts b/src/renderer/src/store/folder-workspaces/folder-path-status.ts index 2bce4d400ea..b9ef23111dd 100644 --- a/src/renderer/src/store/folder-workspaces/folder-path-status.ts +++ b/src/renderer/src/store/folder-workspaces/folder-path-status.ts @@ -6,7 +6,7 @@ import { } from '../../../../shared/folder-workspaces/folder-workspace-path-status' import { getProjectGroupSubtreeIds } from '../../../../shared/project/groups/project-groups' -import { isPathInsideOrEqual } from '../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../shared/file-access/cross-platform-path' import { getRepoExecutionHostId, type ExecutionHostId } from '../../../../shared/execution-host' import type { FolderWorkspacePathStatusCacheEntry, diff --git a/src/renderer/src/store/github/cache/cache-model.ts b/src/renderer/src/store/github/cache/cache-model.ts index d3b6d0bcf0e..0721dc0bc36 100644 --- a/src/renderer/src/store/github/cache/cache-model.ts +++ b/src/renderer/src/store/github/cache/cache-model.ts @@ -1,4 +1,4 @@ -import type { ClassifiedError } from '../../../../../shared/classified-error' +import type { ClassifiedError } from '../../../../../shared/errors/classified-error' import type { GitHubRepositoryIdentity as GitHubOwnerRepo } from '../../../../../shared/github/repositories/repository-identity' import type { GitHubPRRefreshAlias } from '../../../../../shared/github/pull-requests/refresh/pull-request-refresh-types' import type { GitHubProjectViewError } from '../../../../../shared/github/projects/project-result-types' diff --git a/src/renderer/src/store/github/github-slice-contract.ts b/src/renderer/src/store/github/github-slice-contract.ts index c12155d459f..b90bb04e701 100644 --- a/src/renderer/src/store/github/github-slice-contract.ts +++ b/src/renderer/src/store/github/github-slice-contract.ts @@ -1,6 +1,6 @@ import type { GitHubSourceCollections } from './sources/source-collections' import type { GitHubTaskRecordCache } from './task-records/task-record-cache' -import type { ClassifiedError } from '../../../../shared/classified-error' +import type { ClassifiedError } from '../../../../shared/errors/classified-error' import type { PRCheckDetail, PRCheckRunDetails } from '../../../../shared/github/checks/check-types' import type { GitHubCommentResult, diff --git a/src/renderer/src/store/github/refresh/pr-auto-refresh-cadence-observer.ts b/src/renderer/src/store/github/refresh/pr-auto-refresh-cadence-observer.ts index 3ea6746fb66..65d47a6fd24 100644 --- a/src/renderer/src/store/github/refresh/pr-auto-refresh-cadence-observer.ts +++ b/src/renderer/src/store/github/refresh/pr-auto-refresh-cadence-observer.ts @@ -1,5 +1,5 @@ import type { GlobalSettings } from '../../../../../shared/global-settings-types' -import { setPRAutoRefreshCadence } from '../../../../../shared/review-refresh-policy' +import { setPRAutoRefreshCadence } from '../../../../../shared/source-control/hosted-review/review-refresh-policy' type CadenceState = { settings: Pick | null } diff --git a/src/renderer/src/store/github/refresh/remote-host-pr-auto-refresh-cadence-sync.test.ts b/src/renderer/src/store/github/refresh/remote-host-pr-auto-refresh-cadence-sync.test.ts index 4438a0e94b0..5bb933e9a98 100644 --- a/src/renderer/src/store/github/refresh/remote-host-pr-auto-refresh-cadence-sync.test.ts +++ b/src/renderer/src/store/github/refresh/remote-host-pr-auto-refresh-cadence-sync.test.ts @@ -3,7 +3,7 @@ import { _resetPRAutoRefreshCadencesForTests, getKnownPRAutoRefreshCadenceForHost, getPRAutoRefreshCadenceForHost -} from '../../../../../shared/review-refresh-policy' +} from '../../../../../shared/source-control/hosted-review/review-refresh-policy' import type { AppState } from '../../types' const regained = vi.hoisted(() => ({ listeners: new Map void>() })) @@ -89,19 +89,6 @@ describe('remote host PR auto-refresh cadence sync', () => { stop() }) - it('does not ask a host it has no contact with', async () => { - const reader = vi.fn(async () => ({ prAutoRefresh: 'off' })) - const host = store({ - runtimeEnvironments: [environment('env-2')], - runtimeStatusByEnvironmentId: new Map() - }) - const stop = installRemoteHostPRAutoRefreshCadenceSync(host, reader) - await flush() - expect(reader).not.toHaveBeenCalled() - expect(getPRAutoRefreshCadenceForHost('env-2')).toBe('default') - stop() - }) - it('keeps the last known value when a read fails, and a change during a read is re-read once', async () => { let calls = 0 const reader = vi.fn(async () => { @@ -255,12 +242,4 @@ describe('remote host PR auto-refresh cadence sync', () => { expect(hostLacksPRAutoRefresh('env-old')).toBe(false) expect(getPRAutoRefreshCadenceForHost('env-old')).toBe('reduced') }) - - it('does not call a host that has not answered, or whose read failed, an older host', async () => { - expect(hostLacksPRAutoRefresh('env-new')).toBe(false) - await readHostPRAutoRefreshCadence('env-new', async () => { - throw new Error('offline') - }) - expect(hostLacksPRAutoRefresh('env-new')).toBe(false) - }) }) diff --git a/src/renderer/src/store/github/refresh/remote-host-pr-auto-refresh-cadence.ts b/src/renderer/src/store/github/refresh/remote-host-pr-auto-refresh-cadence.ts index 93d6d361c8c..52b17097f01 100644 --- a/src/renderer/src/store/github/refresh/remote-host-pr-auto-refresh-cadence.ts +++ b/src/renderer/src/store/github/refresh/remote-host-pr-auto-refresh-cadence.ts @@ -5,7 +5,7 @@ import { setPRAutoRefreshCadenceForHost, subscribePRAutoRefreshCadence, type PRAutoRefreshCadence -} from '../../../../../shared/review-refresh-policy' +} from '../../../../../shared/source-control/hosted-review/review-refresh-policy' // Why no store or RPC imports here: store slice code reads these; the reads and host-contact // subscriptions that feed them live in remote-host-pr-auto-refresh-cadence-sync.ts. diff --git a/src/renderer/src/store/github/work-items/work-item-aggregate-actions.ts b/src/renderer/src/store/github/work-items/work-item-aggregate-actions.ts index 28db5239cbb..afd6fd7b804 100644 --- a/src/renderer/src/store/github/work-items/work-item-aggregate-actions.ts +++ b/src/renderer/src/store/github/work-items/work-item-aggregate-actions.ts @@ -3,7 +3,7 @@ import { getWorkItemPageErrorTypes } from '../../../../../shared/github/work-ite import type { StateCreator } from 'zustand' import type { AppState } from '../../types' import type { GitHubSlice } from '../github-slice-contract' -import type { ClassifiedError } from '../../../../../shared/classified-error' +import type { ClassifiedError } from '../../../../../shared/errors/classified-error' import type { GitHubWorkItem } from '../../../../../shared/github/work-items/work-item-types' import { isGitHubWorkItemsSshRemoteRequiredError } from '../../../../../shared/github/work-items/work-item-ssh-error' import { sortWorkItemsByNumber } from '../../../../../shared/work-items/work-item-order' diff --git a/src/renderer/src/store/slices/editor/buffers/editor-buffer-identity.ts b/src/renderer/src/store/slices/editor/buffers/editor-buffer-identity.ts index 812fa432b15..6b0cd9112c8 100644 --- a/src/renderer/src/store/slices/editor/buffers/editor-buffer-identity.ts +++ b/src/renderer/src/store/slices/editor/buffers/editor-buffer-identity.ts @@ -7,7 +7,7 @@ import { parseExecutionHostId } from '../../../../../../shared/execution-host' import { isCaseInsensitiveRuntimeRoot, normalizeRuntimePathSeparators -} from '../../../../../../shared/cross-platform-path' +} from '../../../../../../shared/file-access/cross-platform-path' /** The physical file an edit tab shows. Renderer-local; the workspace is never part of it. */ export type EditorBufferIdentity = { diff --git a/src/renderer/src/store/slices/editor/explorer/explorer-dir-state.ts b/src/renderer/src/store/slices/editor/explorer/explorer-dir-state.ts index 1d91e7dd7dd..f8fe0a75817 100644 --- a/src/renderer/src/store/slices/editor/explorer/explorer-dir-state.ts +++ b/src/renderer/src/store/slices/editor/explorer/explorer-dir-state.ts @@ -1,5 +1,5 @@ import type { EditorGet, EditorSet } from '../types/editor-set-get' -import { isPathInsideOrEqual } from '../../../../../../shared/cross-platform-path' +import { isPathInsideOrEqual } from '../../../../../../shared/file-access/cross-platform-path' export type ExplorerDirState = { expandedDirs: Record> diff --git a/src/renderer/src/store/slices/editor/file-ids/editor-file-ids.ts b/src/renderer/src/store/slices/editor/file-ids/editor-file-ids.ts index 77b79266a6e..07cda8aacd1 100644 --- a/src/renderer/src/store/slices/editor/file-ids/editor-file-ids.ts +++ b/src/renderer/src/store/slices/editor/file-ids/editor-file-ids.ts @@ -3,7 +3,7 @@ import type { EditorSlice } from '../types/editor-slice' import type { EditorOpenTargetOptions, OpenFile } from '../types/open-file' import type { DiffSource } from '../../../../../../shared/editor/views/editor-tab-view-types' import { toSshExecutionHostId } from '../../../../../../shared/execution-host' -import { areLocalWindowsWslPathAliases } from '../../../../../../shared/cross-platform-path' +import { areLocalWindowsWslPathAliases } from '../../../../../../shared/file-access/cross-platform-path' import { getConnectionIdForFileFromState } from '@/lib/workspace/ownership/connection-owner-resolution' import { isLocalWindowsDesktopClient } from '@/app-shell/chrome/desktop-window-chrome' import { FLOATING_TERMINAL_WORKTREE_ID } from '../../../../../../shared/constants' diff --git a/src/renderer/src/store/slices/hosted-review/refresh/owning-host-cadence-replan.ts b/src/renderer/src/store/slices/hosted-review/refresh/owning-host-cadence-replan.ts index e50dec3b469..be488bced9d 100644 --- a/src/renderer/src/store/slices/hosted-review/refresh/owning-host-cadence-replan.ts +++ b/src/renderer/src/store/slices/hosted-review/refresh/owning-host-cadence-replan.ts @@ -3,7 +3,7 @@ import { scaleReviewRefreshInterval, subscribePRAutoRefreshCadence, type PRAutoRefreshCadence -} from '../../../../../../shared/review-refresh-policy' +} from '../../../../../../shared/source-control/hosted-review/review-refresh-policy' import type { VisibleHostedReviewRefreshTarget } from './visible-hosted-review-refresh-scheduler' /** Which host's cadence governs a visible target, and what that cadence is. */ diff --git a/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-scheduler.test.ts b/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-scheduler.test.ts index ef2eea05d5e..0250795ecda 100644 --- a/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-scheduler.test.ts +++ b/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-scheduler.test.ts @@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { _resetPRAutoRefreshCadencesForTests, setPRAutoRefreshCadenceForHost -} from '../../../../../../shared/review-refresh-policy' +} from '../../../../../../shared/source-control/hosted-review/review-refresh-policy' import { createVisibleHostedReviewRefreshScheduler, type VisibleHostedReviewRefreshTarget @@ -45,26 +45,6 @@ describe('visible hosted review scheduler', () => { vi.useRealTimers() }) - it('retrieves a deferred completion with an ordinary timer read and resets on a head change', async () => { - const refresh = vi.fn(async () => ({ succeeded: true, retryAfterMs: 10_000 })) - const row = target({ fetchedAt: Date.now() - 120_000, refresh }) - const scheduler = setup([row]) - await vi.advanceTimersByTimeAsync(0) - expect(refresh.mock.calls[0]).toEqual([true, expect.any(AbortSignal), 'discovery']) - await vi.advanceTimersByTimeAsync(10_000) - expect(refresh.mock.calls[1]).toEqual([false, expect.any(AbortSignal), 'timer']) - scheduler.update([{ ...row, revision: 'new-head|' }]) - await vi.advanceTimersByTimeAsync(10_000) - expect(refresh.mock.calls[2]).toEqual([true, expect.any(AbortSignal), 'discovery']) - }) - - it('keeps successful same-age cache replies on the normal interval without a receipt', async () => { - const refresh = vi.fn(async () => ({ succeeded: true })) - setup([target({ fetchedAt: Date.now() - 120_000, refresh })]) - await vi.advanceTimersByTimeAsync(120_000) - expect(refresh.mock.calls[1]).toEqual([false, expect.any(AbortSignal), 'timer']) - }) - it.each(['remove', 'hide', 'dispose'])( 'aborts abandoned demand on %s without releasing native work early', async (action) => { @@ -101,202 +81,6 @@ describe('visible hosted review scheduler', () => { } } ) - - it('does not retry a failed read on a timer when the owning host’s cadence is off', async () => { - const refresh = vi.fn(async () => false) - setup([target({ fetchedAt: null, intervalMs: null, cadence: 'off', selected: true, refresh })]) - await vi.advanceTimersByTimeAsync(0) - expect(refresh).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(60 * 60_000) - expect(refresh).toHaveBeenCalledTimes(1) - }) - - it('arms no receipt retry under off, including for a reply that lands after off was chosen', async () => { - let finish!: (result: { succeeded: boolean; retryAfterMs: number }) => void - const refresh = vi.fn( - () => - new Promise<{ succeeded: boolean; retryAfterMs: number }>((resolve) => (finish = resolve)) - ) - const row = target({ fetchedAt: Date.now() - 120_000, cadence: 'default', refresh }) - const scheduler = setup([row]) - await vi.advanceTimersByTimeAsync(0) - scheduler.update([{ ...row, cadence: 'off', intervalMs: null }]) - finish({ succeeded: true, retryAfterMs: 10_000 }) - await vi.advanceTimersByTimeAsync(60 * 60_000) - expect(refresh).toHaveBeenCalledTimes(1) - }) - - describe('a cadence change reconciles a retry armed after a failure', () => { - it('drops a queued error retry when the owning host’s cadence becomes off', async () => { - const refresh = vi.fn(async () => false) - const row = target({ fetchedAt: null, intervalMs: 60_000, cadence: 'default', refresh }) - const scheduler = setup([row]) - await vi.advanceTimersByTimeAsync(0) - expect(refresh).toHaveBeenCalledTimes(1) - scheduler.update([{ ...row, cadence: 'off', intervalMs: null }]) - await vi.advanceTimersByTimeAsync(60 * 60_000) - expect(refresh).toHaveBeenCalledTimes(1) - }) - - it('re-times a queued error retry to a stretched cadence', async () => { - const refresh = vi.fn(async () => false) - const row = target({ fetchedAt: null, intervalMs: 60_000, cadence: 'default', refresh }) - const scheduler = setup([row]) - await vi.advanceTimersByTimeAsync(0) - expect(refresh).toHaveBeenCalledTimes(1) - scheduler.update([{ ...row, cadence: 'reduced', intervalMs: 5 * 60_000 }]) - await vi.advanceTimersByTimeAsync(4 * 60_000) - expect(refresh).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(60_000) - expect(refresh).toHaveBeenCalledTimes(2) - }) - - it('arms a retry for a read that failed under off once the cadence is enabled again', async () => { - const refresh = vi.fn(async () => false) - const row = target({ fetchedAt: null, intervalMs: null, cadence: 'off', refresh }) - const scheduler = setup([row]) - await vi.advanceTimersByTimeAsync(0) - expect(refresh).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(10 * 60_000) - expect(refresh).toHaveBeenCalledTimes(1) - scheduler.update([{ ...row, cadence: 'default', intervalMs: 60_000 }]) - await vi.advanceTimersByTimeAsync(0) - expect(refresh).toHaveBeenCalledTimes(2) - }) - }) - - describe('window return under a stretched or stopped cadence', () => { - it('reads once the Default interval has passed, then waits the stretched interval', async () => { - const row = target({ - fetchedAt: Date.now(), - intervalMs: 5 * 60_000, - foregroundIntervalMs: 60_000, - cadence: 'reduced', - selected: true - }) - const scheduler = setup([row]) - scheduler.setVisible(false) - await vi.advanceTimersByTimeAsync(30_000) - scheduler.setVisible(true) - await vi.advanceTimersByTimeAsync(0) - expect(row.refresh).not.toHaveBeenCalled() - - scheduler.setVisible(false) - await vi.advanceTimersByTimeAsync(90_000) - scheduler.setVisible(true) - await vi.advanceTimersByTimeAsync(0) - expect(row.refresh).toHaveBeenCalledWith(true, expect.any(AbortSignal), 'discovery') - await vi.advanceTimersByTimeAsync(5 * 60_000 - 1_000) - expect(row.refresh).toHaveBeenCalledTimes(1) - await vi.advanceTimersByTimeAsync(1_000) - expect(row.refresh).toHaveBeenLastCalledWith(false, expect.any(AbortSignal), 'timer') - }) - - it('never re-reads a no-PR row on return faster than Default would under off', async () => { - const noPR = target({ intervalMs: null, foregroundIntervalMs: 15 * 60_000, cadence: 'off' }) - const scheduler = setup([noPR]) - for (let returns = 0; returns < 10; returns += 1) { - scheduler.setVisible(false) - await vi.advanceTimersByTimeAsync(70_000) - scheduler.setVisible(true) - await vi.advanceTimersByTimeAsync(0) - } - expect(noPR.refresh).not.toHaveBeenCalled() - await vi.advanceTimersByTimeAsync(4 * 60_000) - scheduler.setVisible(false) - scheduler.setVisible(true) - await vi.advanceTimersByTimeAsync(0) - expect(noPR.refresh).toHaveBeenCalledWith(true, expect.any(AbortSignal), 'discovery') - }) - }) - - describe('a read that failed under a stretched cadence', () => { - // Minimal: the failure's automatic retry is 600 s out; Default would retry it after 60 s. - const failing = () => - target({ - fetchedAt: null, - intervalMs: 600_000, - foregroundIntervalMs: 60_000, - cadence: 'minimal', - selected: true, - refresh: vi.fn(async () => false) - }) - - it('does not hold back the next HEAD', async () => { - const row = failing() - const scheduler = setup([row]) - await vi.advanceTimersByTimeAsync(60_000) - expect(row.refresh).toHaveBeenCalledTimes(1) - scheduler.update([{ ...row, revision: 'new-head|' }]) - await vi.advanceTimersByTimeAsync(0) - expect(row.refresh).toHaveBeenCalledTimes(2) - expect(row.refresh).toHaveBeenLastCalledWith(true, expect.any(AbortSignal), 'discovery') - }) - - it('reads on a return once Default would, not before', async () => { - const row = failing() - const scheduler = setup([row]) - await vi.advanceTimersByTimeAsync(0) - scheduler.setVisible(false) - await vi.advanceTimersByTimeAsync(30_000) - scheduler.setVisible(true) - await vi.advanceTimersByTimeAsync(0) - expect(row.refresh).toHaveBeenCalledTimes(1) - scheduler.setVisible(false) - await vi.advanceTimersByTimeAsync(32_000) - scheduler.setVisible(true) - await vi.advanceTimersByTimeAsync(0) - expect(row.refresh).toHaveBeenCalledTimes(2) - expect(row.refresh).toHaveBeenLastCalledWith(true, expect.any(AbortSignal), 'discovery') - }) - }) - - it('reads a row newly shown in a visible window once Default would, else on its own interval', async () => { - const scheduler = setup([]) - // Reduced reads every 300 s; Default every 60 s. One row's data is 120 s old, the other's 30 s. - const row = (key: string, ageMs: number) => - target({ - key, - fetchedAt: Date.now() - ageMs, - intervalMs: 300_000, - foregroundIntervalMs: 60_000, - cadence: 'reduced', - selected: true - }) - const old = row('old', 120_000) - const young = row('young', 30_000) - scheduler.update([old, young]) - await vi.advanceTimersByTimeAsync(0) - expect(old.refresh).toHaveBeenCalledWith(true, expect.any(AbortSignal), 'discovery') - expect(young.refresh).not.toHaveBeenCalled() - await vi.advanceTimersByTimeAsync(270_000) - expect(young.refresh).toHaveBeenCalledWith(false, expect.any(AbortSignal), 'timer') - }) -}) - -it('limits refocus discovery to opted-in open GitHub rows and the existing stopped interval', async () => { - vi.useFakeTimers() - vi.setSystemTime(1_000_000) - const github = target({ - key: 'github', - fetchedAt: Date.now(), - intervalMs: 120_000, - refreshOnForeground: true - }) - const closed = target({ key: 'closed', fetchedAt: Date.now(), intervalMs: 900_000 }) - const other = target({ key: 'other', fetchedAt: Date.now(), intervalMs: 120_000 }) - const stopped = target({ key: 'stopped', fetchedAt: Date.now(), intervalMs: null }) - const scheduler = setup([github, closed, other, stopped]) - scheduler.setVisible(false) - await vi.advanceTimersByTimeAsync(130_000) - scheduler.setVisible(true) - await vi.advanceTimersByTimeAsync(0) - expect(github.refresh).toHaveBeenCalledWith(true, expect.any(AbortSignal), 'discovery') - expect(stopped.refresh).toHaveBeenCalledWith(true, expect.any(AbortSignal), 'discovery') - expect(closed.refresh).not.toHaveBeenCalled() - expect(other.refresh).toHaveBeenCalledWith(false, expect.any(AbortSignal), 'timer') - scheduler.dispose() - vi.useRealTimers() }) describe('replanning on a host’s cadence change', () => { diff --git a/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-scheduler.ts b/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-scheduler.ts index 7c7df5eed0f..85740aa255a 100644 --- a/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-scheduler.ts +++ b/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-scheduler.ts @@ -1,4 +1,4 @@ -import { REVIEW_REFRESH_COOLDOWN_MS } from '../../../../../../shared/review-refresh-policy' +import { REVIEW_REFRESH_COOLDOWN_MS } from '../../../../../../shared/source-control/hosted-review/review-refresh-policy' import type { OwningHostCadence } from './owning-host-cadence-replan' export type VisibleHostedReviewRefreshTarget = { diff --git a/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-targets.ts b/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-targets.ts index e91dcb24d12..6fbd290f952 100644 --- a/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-targets.ts +++ b/src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-targets.ts @@ -6,7 +6,7 @@ import { getSettingsFocusedExecutionHostId, parseExecutionHostId } from '../../../../../../shared/execution-host' -import { reviewRefreshIntervalMs } from '../../../../../../shared/review-refresh-policy' +import { reviewRefreshIntervalMs } from '../../../../../../shared/source-control/hosted-review/review-refresh-policy' import { buildPRRefreshCandidate, findWorktreeReviewOwner, diff --git a/src/renderer/src/store/slices/jira/jira-collection-read-actions.ts b/src/renderer/src/store/slices/jira/jira-collection-read-actions.ts index a2f0f01fe54..aa58efaf210 100644 --- a/src/renderer/src/store/slices/jira/jira-collection-read-actions.ts +++ b/src/renderer/src/store/slices/jira/jira-collection-read-actions.ts @@ -1,7 +1,7 @@ import { normalizeJiraStatusSelection } from '../../../../../shared/jira/jira-quick-filters' import { jiraListIssuesForTarget, jiraSearchIssues } from '@/runtime/jira/runtime-jira-client' import { rowLessSourceTarget } from '@/runtime/hosts/selection/default-creation-host' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import type { JiraIssue, JiraSiteSelection } from '../../../../../shared/jira/jira-types' import type { JiraSlice, JiraSliceGet, JiraSliceSet } from './jira-slice-contract' import { diff --git a/src/renderer/src/store/slices/jira/jira-issue-read-actions.ts b/src/renderer/src/store/slices/jira/jira-issue-read-actions.ts index ee5433d34e7..4a05bd8fed5 100644 --- a/src/renderer/src/store/slices/jira/jira-issue-read-actions.ts +++ b/src/renderer/src/store/slices/jira/jira-issue-read-actions.ts @@ -1,6 +1,6 @@ import { jiraGetIssue } from '@/runtime/jira/runtime-jira-client' import { jiraLookupIssueSummary } from '@/runtime/jira/runtime-jira-summary-client' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import type { JiraIssue } from '../../../../../shared/jira/jira-types' import type { JiraSlice, JiraSliceGet, JiraSliceSet } from './jira-slice-contract' import { diff --git a/src/renderer/src/store/slices/linear/linear-cache.ts b/src/renderer/src/store/slices/linear/linear-cache.ts index 6c80354d385..86a1e463b11 100644 --- a/src/renderer/src/store/slices/linear/linear-cache.ts +++ b/src/renderer/src/store/slices/linear/linear-cache.ts @@ -1,5 +1,5 @@ import type { LinearIssueData } from './linear-issue-read' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import { RuntimeRpcCallError } from '@/runtime/rpc/calls/runtime-rpc-result' import { rowLessSourceTarget, diff --git a/src/renderer/src/store/slices/linear/linear-custom-view-detail-actions.ts b/src/renderer/src/store/slices/linear/linear-custom-view-detail-actions.ts index f1af5529cf8..5fefbf3ef12 100644 --- a/src/renderer/src/store/slices/linear/linear-custom-view-detail-actions.ts +++ b/src/renderer/src/store/slices/linear/linear-custom-view-detail-actions.ts @@ -8,7 +8,7 @@ import type { LinearSliceGet, LinearSliceSet } from './linear-slice-contract' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import { linearGetCustomView } from '@/runtime/linear/runtime-linear-project-client' import { evictStaleEntries, diff --git a/src/renderer/src/store/slices/linear/linear-custom-view-list-actions.ts b/src/renderer/src/store/slices/linear/linear-custom-view-list-actions.ts index e50913d2290..dc9f58ddce0 100644 --- a/src/renderer/src/store/slices/linear/linear-custom-view-list-actions.ts +++ b/src/renderer/src/store/slices/linear/linear-custom-view-list-actions.ts @@ -8,7 +8,7 @@ import type { LinearSliceGet, LinearSliceSet } from './linear-slice-contract' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import { linearListCustomViews } from '@/runtime/linear/runtime-linear-project-client' import { collectionWithWorkspaceError, diff --git a/src/renderer/src/store/slices/linear/linear-custom-view-project-actions.ts b/src/renderer/src/store/slices/linear/linear-custom-view-project-actions.ts index db7ac022021..395563cf1e8 100644 --- a/src/renderer/src/store/slices/linear/linear-custom-view-project-actions.ts +++ b/src/renderer/src/store/slices/linear/linear-custom-view-project-actions.ts @@ -5,7 +5,7 @@ import type { LinearSliceGet, LinearSliceSet } from './linear-slice-contract' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import { linearListCustomViewProjects } from '@/runtime/linear/runtime-linear-project-client' import { collectionWithWorkspaceError, diff --git a/src/renderer/src/store/slices/linear/linear-issue-detail-actions.ts b/src/renderer/src/store/slices/linear/linear-issue-detail-actions.ts index 106f5586788..ce329472e5b 100644 --- a/src/renderer/src/store/slices/linear/linear-issue-detail-actions.ts +++ b/src/renderer/src/store/slices/linear/linear-issue-detail-actions.ts @@ -3,7 +3,7 @@ import type { LinearSlice, LinearSliceGet, LinearSliceSet } from './linear-slice import { credentialDecryptionMessage, isIntegrationCredentialDecryptionError -} from '../../../../../shared/integration-credential-errors' +} from '../../../../../shared/secure-storage/integration-credential-errors' import { linearGetIssue } from '@/runtime/linear/runtime-linear-issue-client' import { inflightIssueRequests } from './linear-slice-request-state' import { diff --git a/src/renderer/src/store/slices/linear/linear-issue-list-actions.ts b/src/renderer/src/store/slices/linear/linear-issue-list-actions.ts index 1a9913b3fa7..fdb2479d340 100644 --- a/src/renderer/src/store/slices/linear/linear-issue-list-actions.ts +++ b/src/renderer/src/store/slices/linear/linear-issue-list-actions.ts @@ -10,7 +10,7 @@ import { clampLinearIssueListLimit } from '../../../../../shared/linear/issue-re import { credentialDecryptionMessage, isIntegrationCredentialDecryptionError -} from '../../../../../shared/integration-credential-errors' +} from '../../../../../shared/secure-storage/integration-credential-errors' import { linearListIssues, linearSearchIssues } from '@/runtime/linear/runtime-linear-client' import { evictStaleEntries, diff --git a/src/renderer/src/store/slices/linear/linear-project-detail-actions.ts b/src/renderer/src/store/slices/linear/linear-project-detail-actions.ts index ed8366ef8b8..e7762bd0678 100644 --- a/src/renderer/src/store/slices/linear/linear-project-detail-actions.ts +++ b/src/renderer/src/store/slices/linear/linear-project-detail-actions.ts @@ -5,7 +5,7 @@ import type { LinearSliceGet, LinearSliceSet } from './linear-slice-contract' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import { linearGetProject } from '@/runtime/linear/runtime-linear-project-client' import { evictStaleEntries, diff --git a/src/renderer/src/store/slices/linear/linear-project-list-actions.ts b/src/renderer/src/store/slices/linear/linear-project-list-actions.ts index 9b6118cd8aa..71f61b8473b 100644 --- a/src/renderer/src/store/slices/linear/linear-project-list-actions.ts +++ b/src/renderer/src/store/slices/linear/linear-project-list-actions.ts @@ -5,7 +5,7 @@ import type { LinearSliceGet, LinearSliceSet } from './linear-slice-contract' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import { linearListProjects } from '@/runtime/linear/runtime-linear-project-client' import { collectionWithWorkspaceError, diff --git a/src/renderer/src/store/slices/linear/linear-slice-connection-actions.ts b/src/renderer/src/store/slices/linear/linear-slice-connection-actions.ts index 176ac37782f..7e8e515a063 100644 --- a/src/renderer/src/store/slices/linear/linear-slice-connection-actions.ts +++ b/src/renderer/src/store/slices/linear/linear-slice-connection-actions.ts @@ -13,7 +13,7 @@ import { getLinearStatusReadGeneration } from './linear-slice-request-state' import { looksLikeAuthError } from './linear-cache' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import './linear-issue-read' import { detachLinearIssuePublication } from './linear-issue-write-publication' import { getLinearReadScope, isCurrentLinearRuntimeContext } from './linear-slice-scope' diff --git a/src/renderer/src/store/slices/linear/linear-team-actions.ts b/src/renderer/src/store/slices/linear/linear-team-actions.ts index df09966ae71..1c16089d008 100644 --- a/src/renderer/src/store/slices/linear/linear-team-actions.ts +++ b/src/renderer/src/store/slices/linear/linear-team-actions.ts @@ -5,7 +5,7 @@ import type { LinearSliceGet, LinearSliceSet } from './linear-slice-contract' -import { isIntegrationCredentialDecryptionError } from '../../../../../shared/integration-credential-errors' +import { isIntegrationCredentialDecryptionError } from '../../../../../shared/secure-storage/integration-credential-errors' import { linearListTeams } from '@/runtime/linear/runtime-linear-project-client' import { evictStaleEntries, diff --git a/src/renderer/src/store/slices/ui/ui-slice-contract-contextual.ts b/src/renderer/src/store/slices/ui/ui-slice-contract-contextual.ts index 2f475e3d0c0..bd491c13f8f 100644 --- a/src/renderer/src/store/slices/ui/ui-slice-contract-contextual.ts +++ b/src/renderer/src/store/slices/ui/ui-slice-contract-contextual.ts @@ -1,4 +1,4 @@ -import type { PersistedTrustedOrcaHooks } from '../../../../../shared/orca-yaml-hook-types' +import type { PersistedTrustedOrcaHooks } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { FeatureInteractionId } from '../../../../../shared/feature-education/interactions/feature-interaction-catalog' import type { FeatureInteractionState } from '../../../../../shared/feature-education/interactions/feature-interactions' import type { @@ -7,7 +7,7 @@ import type { } from '../../../../../shared/feature-education/feature-tips' import type { ChatUiLaunchTipVariant } from '../../../../../shared/native-chat/chat-ui-launch-tip-audience' import type { ContextualTourId } from '../../../../../shared/feature-education/contextual-tours/contextual-tours' -import type { OrcaHookTrustKind } from '../../../../../shared/orca-hook-trust-entries' +import type { OrcaHookTrustKind } from '../../../../../shared/workspace-setup/hooks/orca-hook-trust-entries' import type { SettingsNavigationTarget } from '../../../components/settings/navigation/settings-navigation-types' import type { ExecutionHostId } from '../../../../../shared/execution-host' diff --git a/src/renderer/src/store/slices/ui/ui-slice-contract-core.ts b/src/renderer/src/store/slices/ui/ui-slice-contract-core.ts index 5f8c2e11b1b..7f4342d3a48 100644 --- a/src/renderer/src/store/slices/ui/ui-slice-contract-core.ts +++ b/src/renderer/src/store/slices/ui/ui-slice-contract-core.ts @@ -5,7 +5,7 @@ import type { import type { StateCreator } from 'zustand' import type { AppState } from '../../types' import type { GitHubWorkItem } from '../../../../../shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../../shared/gitlab/gitlab-types' import type { JiraIssue } from '../../../../../shared/jira/jira-types' import type { LinearIssue } from '../../../../../shared/linear/issue-types' import type { TaskProvider } from '../../../../../shared/work-items/task-providers' diff --git a/src/renderer/src/store/slices/ui/ui-slice-hydration-sanitizers.ts b/src/renderer/src/store/slices/ui/ui-slice-hydration-sanitizers.ts index a1a6ae8101d..96a0a6bc137 100644 --- a/src/renderer/src/store/slices/ui/ui-slice-hydration-sanitizers.ts +++ b/src/renderer/src/store/slices/ui/ui-slice-hydration-sanitizers.ts @@ -1,7 +1,7 @@ import { isProjectGroupHookTrustKey } from '../../../../../shared/workspace-setup/hooks/workspace-hook-owner' import { normalizeExplorerDisplayRootByWorktree } from '../../../../../shared/file-listing/file-explorer-display-root' import type { AppState } from '../../types' -import type { PersistedTrustedOrcaHooks } from '../../../../../shared/orca-yaml-hook-types' +import type { PersistedTrustedOrcaHooks } from '../../../../../shared/workspace-setup/orca-yaml-hook-types' import type { PersistedUIState } from '../../../../../shared/persisted-ui-state-types' import type { ActivityBarPosition, diff --git a/src/renderer/src/store/slices/ui/ui-slice-trust-actions.ts b/src/renderer/src/store/slices/ui/ui-slice-trust-actions.ts index 61abe4c46bd..d0cb760188b 100644 --- a/src/renderer/src/store/slices/ui/ui-slice-trust-actions.ts +++ b/src/renderer/src/store/slices/ui/ui-slice-trust-actions.ts @@ -3,7 +3,7 @@ import { getSetupScriptPromptDismissalKey } from '../../../runtime/repo-hooks/se import { withOrcaHookRepoAlwaysTrusted, withOrcaHookScriptConfirmed -} from '../../../../../shared/orca-hook-trust-entries' +} from '../../../../../shared/workspace-setup/hooks/orca-hook-trust-entries' export function createUiTrustActions(set: UISliceSet, _get: UISliceGet): Partial { return { diff --git a/src/renderer/src/store/slices/ui/workspace-navigation-history.ts b/src/renderer/src/store/slices/ui/workspace-navigation-history.ts index 0cb13df8ace..5b2d35cbad2 100644 --- a/src/renderer/src/store/slices/ui/workspace-navigation-history.ts +++ b/src/renderer/src/store/slices/ui/workspace-navigation-history.ts @@ -4,7 +4,7 @@ import { findFirstIndexedWorktree } from '../../../lib/workspace/ownership/workt import type { GitHubWorkItem } from '../../../../../shared/github/work-items/work-item-types' import type { JiraIssue } from '../../../../../shared/jira/jira-types' import type { LinearIssue } from '../../../../../shared/linear/issue-types' -import type { GitLabWorkItem } from '../../../../../shared/gitlab-types' +import type { GitLabWorkItem } from '../../../../../shared/gitlab/gitlab-types' import { getTaskSourceCacheScope, type TaskSourceContext diff --git a/src/renderer/src/store/terminals/tabs/recently-closed-terminal-tabs.ts b/src/renderer/src/store/terminals/tabs/recently-closed-terminal-tabs.ts index 2800ebad978..a6644d8beb0 100644 --- a/src/renderer/src/store/terminals/tabs/recently-closed-terminal-tabs.ts +++ b/src/renderer/src/store/terminals/tabs/recently-closed-terminal-tabs.ts @@ -4,7 +4,7 @@ import { runtimeEnvironmentIdForWorkspaceOwner } from '@/lib/workspace/ownership import { isWindowsAbsolutePathLike, relativePathInsideRoot -} from '../../../../../shared/cross-platform-path' +} from '../../../../../shared/file-access/cross-platform-path' import { restoreRecentlyClosedTabPosition, type RecentlyClosedTabPosition diff --git a/src/renderer/src/web/preload-api/web-preference-normalization.ts b/src/renderer/src/web/preload-api/web-preference-normalization.ts index 3cecb30134b..985595a5e29 100644 --- a/src/renderer/src/web/preload-api/web-preference-normalization.ts +++ b/src/renderer/src/web/preload-api/web-preference-normalization.ts @@ -9,7 +9,7 @@ import { normalizeAgentDefaultSurface, carriedChatUiLaunchSettings } from '../../../../shared/native-chat/native-chat-providers' -import { normalizeAutoRenameBranchFromWorkDefaultOn } from '../../../../shared/auto-rename-branch-from-work-settings' +import { normalizeAutoRenameBranchFromWorkDefaultOn } from '../../../../shared/source-control/ai/settings/auto-rename-branch-from-work-settings' import { getDefaultSettings, normalizeAgentActivityDisplayMode } from '../../../../shared/constants' import { normalizeWorktreeCardProperties } from '../../../../shared/worktree/row-display/card-properties' import { diff --git a/src/renderer/src/web/preload-api/web-repositories-api.ts b/src/renderer/src/web/preload-api/web-repositories-api.ts index dbb92d98e90..420578ebbaa 100644 --- a/src/renderer/src/web/preload-api/web-repositories-api.ts +++ b/src/renderer/src/web/preload-api/web-repositories-api.ts @@ -1,5 +1,5 @@ import type { PreloadApi } from '../../../../preload/api-types' -import { legacyBaseRefSearchResult } from '../../../../shared/base-ref-search-result' +import { legacyBaseRefSearchResult } from '../../../../shared/worktree/base-refs/base-ref-search-result' import type { CloneTargetCheck } from '../../../../shared/git/clone/clone-target-check' import type { Repo } from '../../../../shared/repository/repo-types' import { getDefaultCreateProjectParent } from '@/components/sidebar/project-admission/create/create-project-defaults' diff --git a/src/renderer/src/web/preload-api/web-runtime-worktree-catalog.ts b/src/renderer/src/web/preload-api/web-runtime-worktree-catalog.ts index 41d940e8722..f6ec2f22225 100644 --- a/src/renderer/src/web/preload-api/web-runtime-worktree-catalog.ts +++ b/src/renderer/src/web/preload-api/web-runtime-worktree-catalog.ts @@ -1,4 +1,4 @@ -import { relativePathInsideRoot } from '../../../../shared/cross-platform-path' +import { relativePathInsideRoot } from '../../../../shared/file-access/cross-platform-path' import { toRuntimeExecutionHostId } from '../../../../shared/execution-host' import type { Repo } from '../../../../shared/repository/repo-types' import type { DetectedWorktreeListResult, Worktree } from '../../../../shared/worktree/types' diff --git a/src/shared/agent-hook-listener/opencode-session-correlation.ts b/src/shared/agent-hook-listener/opencode-session-correlation.ts index 283c1649454..9442e2c5eef 100644 --- a/src/shared/agent-hook-listener/opencode-session-correlation.ts +++ b/src/shared/agent-hook-listener/opencode-session-correlation.ts @@ -38,7 +38,7 @@ export type SessionOwnership = { /** Allow for stamp skew between the process table and the session store. */ export const OPENCODE_CREATE_SKEW_MS = 2 * 60 * 1000 -import { normalizeRuntimePathForComparison } from '../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../file-access/cross-platform-path' /** Fold only macOS /tmp, /var and /etc aliases; stripping every /private prefix would merge distinct roots. */ function foldMacOsPrivateAlias(directory: string): string { diff --git a/src/shared/agent-hook-listener/providers/grok/grok-session-paths.ts b/src/shared/agent-hook-listener/providers/grok/grok-session-paths.ts index 80a5f5c790b..143262b2281 100644 --- a/src/shared/agent-hook-listener/providers/grok/grok-session-paths.ts +++ b/src/shared/agent-hook-listener/providers/grok/grok-session-paths.ts @@ -4,7 +4,7 @@ import { homedir } from 'node:os' import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path' import { blake3 } from '@noble/hashes/blake3' import { bytesToHex } from '@noble/hashes/utils' -import { resolveAbsoluteDirOverride } from '../../../absolute-dir-override' +import { resolveAbsoluteDirOverride } from '../../../file-access/absolute-dir-override' import { GrokSessionPathLookupQueue, type GrokSessionPathScanner diff --git a/src/shared/agent-launch/catalog/pi-agent-kind.ts b/src/shared/agent-launch/catalog/pi-agent-kind.ts index e2c593aeebd..e8fca381ae4 100644 --- a/src/shared/agent-launch/catalog/pi-agent-kind.ts +++ b/src/shared/agent-launch/catalog/pi-agent-kind.ts @@ -1,6 +1,9 @@ import { isFreshOmpLaunchCommand } from '../startup/omp-fresh-launch' import { TUI_AGENT_CONFIG } from './tui-agent-config' -import { getCommandTokenPathBasename, getFirstCommandToken } from '../../command-token-scanner' +import { + getCommandTokenPathBasename, + getFirstCommandToken +} from '../../shell/command-resolution/command-token-scanner' import { extractAgentLaunchCommand } from '../startup/agent-command-line-intent' /** Pi-compatible agents share PI_CODING_AGENT_DIR and extension APIs but have separate user directories. diff --git a/src/shared/agent-launch/catalog/tui-agent-config.ts b/src/shared/agent-launch/catalog/tui-agent-config.ts index c8ffc0c38b6..c954fd59725 100644 --- a/src/shared/agent-launch/catalog/tui-agent-config.ts +++ b/src/shared/agent-launch/catalog/tui-agent-config.ts @@ -2,7 +2,7 @@ import type { TuiAgent } from './tui-agent' import { getOrcaCliCommandNameForPlatform, skipsLinuxOrcaCliRename -} from '../../orca-cli-command-name' +} from '../../cli/orca-cli-command-name' import type { TuiAgentConfig, TuiAgentConfigSource } from './tui-agent-config-types' function resolveTuiAgentConfig(source: TuiAgentConfigSource): TuiAgentConfig { diff --git a/src/shared/agent-launch/choices/agent-choice-settings.ts b/src/shared/agent-launch/choices/agent-choice-settings.ts index f66674c4727..b792e7aa898 100644 --- a/src/shared/agent-launch/choices/agent-choice-settings.ts +++ b/src/shared/agent-launch/choices/agent-choice-settings.ts @@ -1,4 +1,4 @@ -import { findOptionOccurrence } from '../../command-option-occurrence' +import { findOptionOccurrence } from '../../cli/command-option-occurrence' import { agentRequiredValueOptions, removeAgentArgOption diff --git a/src/shared/kiro-home.ts b/src/shared/agent-launch/environment/kiro-home.ts similarity index 79% rename from src/shared/kiro-home.ts rename to src/shared/agent-launch/environment/kiro-home.ts index 2ee6bdb46ad..d339598a278 100644 --- a/src/shared/kiro-home.ts +++ b/src/shared/agent-launch/environment/kiro-home.ts @@ -1,6 +1,6 @@ import { homedir } from 'node:os' import { join } from 'node:path' -import { resolveAbsoluteDirOverride } from './absolute-dir-override' +import { resolveAbsoluteDirOverride } from '../../file-access/absolute-dir-override' /** Kiro CLI's config root: `$KIRO_HOME` replaces `~/.kiro` outright (verified on kiro-cli 2.28). */ export function resolveKiroHomeDir(env: NodeJS.ProcessEnv = process.env): string { diff --git a/src/shared/managed-runtime-install.ts b/src/shared/agent-launch/installation/managed-runtime-install.ts similarity index 100% rename from src/shared/managed-runtime-install.ts rename to src/shared/agent-launch/installation/managed-runtime-install.ts diff --git a/src/shared/agent-launch/permissions/workspace-pretrust-scope.ts b/src/shared/agent-launch/permissions/workspace-pretrust-scope.ts index 87195fdf83f..d5590ff57ab 100644 --- a/src/shared/agent-launch/permissions/workspace-pretrust-scope.ts +++ b/src/shared/agent-launch/permissions/workspace-pretrust-scope.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../file-access/cross-platform-path' /** Drive, UNC share, WSL distro or POSIX root, as `normalizeRuntimePathForComparison` spells it. */ const FILESYSTEM_ROOT_KEY = /^(?:\/|[a-z]:\/?|\/\/[^/]+(?:\/[^/]+)?)$/i diff --git a/src/shared/agent-launch/startup/agent-command-line-intent.test.ts b/src/shared/agent-launch/startup/agent-command-line-intent.test.ts index a51fee56447..5a20452601e 100644 --- a/src/shared/agent-launch/startup/agent-command-line-intent.test.ts +++ b/src/shared/agent-launch/startup/agent-command-line-intent.test.ts @@ -1,7 +1,7 @@ import { expect, it } from 'vitest' import { extractAgentLaunchCommand, recognizeAgentLaunchCommand } from './agent-command-line-intent' import { recognizeAgentProcessFromCommandLine } from '../../agent-status/process/agent-process-recognition' -import { COMMAND_TOKEN_SCAN_MAX_CHARS } from '../../command-token-scanner' +import { COMMAND_TOKEN_SCAN_MAX_CHARS } from '../../shell/command-resolution/command-token-scanner' it.each([ ['sleep 30 && claude', 'claude'], diff --git a/src/shared/agent-launch/startup/agent-command-line-intent.ts b/src/shared/agent-launch/startup/agent-command-line-intent.ts index 7b31e741a1b..d3550cf5b64 100644 --- a/src/shared/agent-launch/startup/agent-command-line-intent.ts +++ b/src/shared/agent-launch/startup/agent-command-line-intent.ts @@ -2,7 +2,7 @@ import { COMMAND_TOKEN_SCAN_MAX_CHARS, getCommandTokenPathBasename, getFirstCommandToken -} from '../../command-token-scanner' +} from '../../shell/command-resolution/command-token-scanner' import { recognizeAgentProcessFromCommandLine, type RecognizedAgentProcess diff --git a/src/shared/agent-launch/startup/agent-command-plan.ts b/src/shared/agent-launch/startup/agent-command-plan.ts index 95b7829904c..e4b8f5b4b69 100644 --- a/src/shared/agent-launch/startup/agent-command-plan.ts +++ b/src/shared/agent-launch/startup/agent-command-plan.ts @@ -1,4 +1,4 @@ -import { extractLeadingEnvAssignments } from '../../command-environment' +import { extractLeadingEnvAssignments } from '../../shell/launch/command-environment' import { tokenizeCustomCommandTemplate, type CommandTemplateBackslash diff --git a/src/shared/agent-launch/startup/agent-launch-runtime.ts b/src/shared/agent-launch/startup/agent-launch-runtime.ts index aa44cba14d9..f6e2bfc1367 100644 --- a/src/shared/agent-launch/startup/agent-launch-runtime.ts +++ b/src/shared/agent-launch/startup/agent-launch-runtime.ts @@ -1,5 +1,5 @@ import type { ProjectExecutionRuntimeResolution } from '../../execution-host/project-execution-runtime' -import { isWindowsAbsolutePathLike } from '../../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../file-access/cross-platform-path' import type { LocalWindowsTerminalRuntimeOptions } from '../../shell/launch/local-windows-terminal-runtime' import { resolveStartupShell, type AgentStartupShell } from './tui-agent-startup-shell' import { resolveLocalWindowsAgentStartupShell } from '../../shell/launch/windows-terminal-shell' diff --git a/src/shared/agent-launch/startup/automation-extra-agent-args.ts b/src/shared/agent-launch/startup/automation-extra-agent-args.ts index 5481d803c8a..aedb405f20e 100644 --- a/src/shared/agent-launch/startup/automation-extra-agent-args.ts +++ b/src/shared/agent-launch/startup/automation-extra-agent-args.ts @@ -4,7 +4,7 @@ import { } from '../../agent-session/options/launch/agent-session-option-agent-args' import { getAgentSessionOptionLaunchCatalog } from '../../agent-session/options/agent-session-option-catalog' import { PI_THINKING_LEVELS } from '../../agent-session/options/reconciliation/structured-agent-session-effective-effort' -import { findOptionOccurrence } from '../../command-option-occurrence' +import { findOptionOccurrence } from '../../cli/command-option-occurrence' import { quoteStartupArg, tokenizeStartupCommand, diff --git a/src/shared/agent-launch/startup/opencode-launch-command.ts b/src/shared/agent-launch/startup/opencode-launch-command.ts index 85b5188580c..4ba1e9f72f8 100644 --- a/src/shared/agent-launch/startup/opencode-launch-command.ts +++ b/src/shared/agent-launch/startup/opencode-launch-command.ts @@ -1,6 +1,6 @@ import type { TuiAgent } from '../catalog/tui-agent' import { getAgentLaunchExecutableName } from './agent-command-line-intent' -import { findOptionOccurrence } from '../../command-option-occurrence' +import { findOptionOccurrence } from '../../cli/command-option-occurrence' export class OpenCodeCopyServerRouteError extends Error { constructor() { diff --git a/src/shared/agent-launch/startup/setup-agent-startup-policy.ts b/src/shared/agent-launch/startup/setup-agent-startup-policy.ts index b77e4c2cf8c..ad1e515a6b5 100644 --- a/src/shared/agent-launch/startup/setup-agent-startup-policy.ts +++ b/src/shared/agent-launch/startup/setup-agent-startup-policy.ts @@ -1,4 +1,4 @@ -import type { SetupAgentStartupPolicy } from '../../orca-yaml-hook-types' +import type { SetupAgentStartupPolicy } from '../../workspace-setup/orca-yaml-hook-types' // Existing repos launch setup/agents in parallel unless user/project config requires sequencing. export const DEFAULT_SETUP_AGENT_STARTUP_POLICY: SetupAgentStartupPolicy = 'start-immediately' diff --git a/src/shared/agent-launch/startup/setup-runner-command.ts b/src/shared/agent-launch/startup/setup-runner-command.ts index b21648ad727..36523c45f49 100644 --- a/src/shared/agent-launch/startup/setup-runner-command.ts +++ b/src/shared/agent-launch/startup/setup-runner-command.ts @@ -2,7 +2,7 @@ import { quoteCmdDoubleQuoted, quotePosixShellUnlessPlainNoAt } from '../../shell/launch/shell-argument-quoting' -import { isWindowsAbsolutePathLike } from '../../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../file-access/cross-platform-path' import { buildWindowsCmdRunnerDelayedLaunchCommand, windowsRunnerPathNeedsCmdGuard diff --git a/src/shared/agent-launch/startup/tui-agent-resume-startup.ts b/src/shared/agent-launch/startup/tui-agent-resume-startup.ts index 22daf924dcf..45648c1648b 100644 --- a/src/shared/agent-launch/startup/tui-agent-resume-startup.ts +++ b/src/shared/agent-launch/startup/tui-agent-resume-startup.ts @@ -12,7 +12,7 @@ import { TUI_AGENT_CONFIG } from '../catalog/tui-agent-config' import type { TuiAgent } from '../catalog/tui-agent' import { buildAgentResumeLaunchCommand } from './agent-resume-launch-command' import { buildAiVaultResumeShellCommand } from '../../ai-vault/resume/ai-vault-resume-command' -import { normalizeRuntimePathForComparison } from '../../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../file-access/cross-platform-path' import { parseWslUncPath } from '../../file-access/wsl-paths' import { dropRecordedAgentPermissionArgs } from '../permissions/tui-agent-permission-lift' diff --git a/src/shared/agent-session/options/launch/agent-session-option-agent-args.ts b/src/shared/agent-session/options/launch/agent-session-option-agent-args.ts index b047e389547..22608d7e5a1 100644 --- a/src/shared/agent-session/options/launch/agent-session-option-agent-args.ts +++ b/src/shared/agent-session/options/launch/agent-session-option-agent-args.ts @@ -1,4 +1,4 @@ -import { findOptionOccurrence } from '../../../command-option-occurrence' +import { findOptionOccurrence } from '../../../cli/command-option-occurrence' import type { AgentType } from '../../../agent-status/contracts/agent-status-types' // Required values consume dash-leading text; boolean and optional-valued options are excluded. diff --git a/src/shared/agent-status/presentation/agent-row-primary-text.ts b/src/shared/agent-status/presentation/agent-row-primary-text.ts index 6e225072d54..524b242e71b 100644 --- a/src/shared/agent-status/presentation/agent-row-primary-text.ts +++ b/src/shared/agent-status/presentation/agent-row-primary-text.ts @@ -1,5 +1,5 @@ import type { AgentStatusEntry } from '../contracts/agent-status-types' -import { getRuntimePathBasename } from '../../cross-platform-path' +import { getRuntimePathBasename } from '../../file-access/cross-platform-path' import { findOrcaDispatchPreambleStart, findOrcaDispatchTaskMarkerIndex, diff --git a/src/shared/agent-status/process/agent-process-recognition.ts b/src/shared/agent-status/process/agent-process-recognition.ts index 7789f0190b9..9177c82dff7 100644 --- a/src/shared/agent-status/process/agent-process-recognition.ts +++ b/src/shared/agent-status/process/agent-process-recognition.ts @@ -9,7 +9,7 @@ import type { AgentType } from '../contracts/agent-status-types' import type { TerminalAgent } from '../identity/terminal-agent' import type { TuiAgent } from '../../agent-launch/catalog/tui-agent' import { filterHeadlessOneShotAgentCommand } from './agent-headless-command' -import { getFirstCommandToken } from '../../command-token-scanner' +import { getFirstCommandToken } from '../../shell/command-resolution/command-token-scanner' import { comparablePath, findInterpreterEntrypointToken, diff --git a/src/shared/agent-status/process/opencode-headless-command.ts b/src/shared/agent-status/process/opencode-headless-command.ts index 15e1effd63a..925d875a390 100644 --- a/src/shared/agent-status/process/opencode-headless-command.ts +++ b/src/shared/agent-status/process/opencode-headless-command.ts @@ -1,5 +1,5 @@ -import { extractLeadingEnvAssignments } from '../../command-environment' -import { getCommandTokenPathBasename } from '../../command-token-scanner' +import { extractLeadingEnvAssignments } from '../../shell/launch/command-environment' +import { getCommandTokenPathBasename } from '../../shell/command-resolution/command-token-scanner' import type { AgentStartupShell } from '../../agent-launch/startup/tui-agent-startup-shell' const RUN_VALUE_FLAGS = new Set([ diff --git a/src/shared/ai-vault/resume/ai-vault-resume-startup.ts b/src/shared/ai-vault/resume/ai-vault-resume-startup.ts index 467985c167a..0864b64d474 100644 --- a/src/shared/ai-vault/resume/ai-vault-resume-startup.ts +++ b/src/shared/ai-vault/resume/ai-vault-resume-startup.ts @@ -30,7 +30,7 @@ import { isTuiAgent, TUI_AGENT_CONFIG } from '../../agent-launch/catalog/tui-agent-config' -import { findOptionOccurrence } from '../../command-option-occurrence' +import { findOptionOccurrence } from '../../cli/command-option-occurrence' import { assertOpenCodeCopyUsesLocalStore } from '../../agent-launch/startup/opencode-launch-command' import { CLI_CONVERSATION_ADOPTING_AGENTS } from '../../agent-session/view/structured-agent-cli-conversation-adoption' import type { GlobalSettings } from '../../global-settings-types' diff --git a/src/shared/ai-vault/scanning/ai-vault-scope-cwd-match.ts b/src/shared/ai-vault/scanning/ai-vault-scope-cwd-match.ts index 36d63cbd4d7..7f93cb17684 100644 --- a/src/shared/ai-vault/scanning/ai-vault-scope-cwd-match.ts +++ b/src/shared/ai-vault/scanning/ai-vault-scope-cwd-match.ts @@ -1,7 +1,7 @@ import { createNormalizedPathInsideOrEqualMatcher, normalizeRuntimePathForComparison -} from '../../cross-platform-path' +} from '../../file-access/cross-platform-path' import { parseWslUncPath, toWindowsWslPath } from '../../file-access/wsl-paths' import type { AiVaultSession } from '../contracts/ai-vault-types' diff --git a/src/shared/ai-vault/scanning/ai-vault-scope-paths.ts b/src/shared/ai-vault/scanning/ai-vault-scope-paths.ts index bf647e36010..da0328dba3c 100644 --- a/src/shared/ai-vault/scanning/ai-vault-scope-paths.ts +++ b/src/shared/ai-vault/scanning/ai-vault-scope-paths.ts @@ -1,4 +1,7 @@ -import { isRuntimePathAbsolute, normalizeRuntimePathForComparison } from '../../cross-platform-path' +import { + isRuntimePathAbsolute, + normalizeRuntimePathForComparison +} from '../../file-access/cross-platform-path' import type { ProjectHostSetupProjection } from '../../project/host-setup/project-host-setup-projection' import type { ProjectHostSetup } from '../../project/project-types' import type { AiVaultScope } from '../contracts/ai-vault-types' diff --git a/src/shared/ai-vault/scanning/ai-vault-session-cwd-aliases.ts b/src/shared/ai-vault/scanning/ai-vault-session-cwd-aliases.ts index b10f62318c7..02627605ca4 100644 --- a/src/shared/ai-vault/scanning/ai-vault-session-cwd-aliases.ts +++ b/src/shared/ai-vault/scanning/ai-vault-session-cwd-aliases.ts @@ -1,6 +1,6 @@ import type { AiVaultSession } from '../contracts/ai-vault-types' import { sessionFileExecutionNamespace } from './ai-vault-scope-cwd-match' -import { normalizeRuntimePathForComparison } from '../../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../file-access/cross-platform-path' import { normalizeExecutionHostId } from '../../execution-host' /** A relationship or provider id alone does not prove that two rows recorded the same directory. */ diff --git a/src/shared/ai-vault/scanning/ai-vault-session-cwd-candidates.ts b/src/shared/ai-vault/scanning/ai-vault-session-cwd-candidates.ts index ee701b042e1..4b024975f39 100644 --- a/src/shared/ai-vault/scanning/ai-vault-session-cwd-candidates.ts +++ b/src/shared/ai-vault/scanning/ai-vault-session-cwd-candidates.ts @@ -1,6 +1,6 @@ import { sessionFileExecutionNamespace } from './ai-vault-scope-cwd-match' import type { AiVaultSession } from '../contracts/ai-vault-types' -import { normalizeRuntimePathForComparison } from '../../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../file-access/cross-platform-path' type CwdCandidate = { normalizedPath: string diff --git a/src/shared/ai-vault/session-display/ai-vault-session-filters.ts b/src/shared/ai-vault/session-display/ai-vault-session-filters.ts index 5d5592a1b18..84d56dd2001 100644 --- a/src/shared/ai-vault/session-display/ai-vault-session-filters.ts +++ b/src/shared/ai-vault/session-display/ai-vault-session-filters.ts @@ -2,7 +2,7 @@ import { normalizeRuntimePathForComparison, normalizeRuntimePathSeparators -} from '../../cross-platform-path' +} from '../../file-access/cross-platform-path' import { isClipboardTextByteLengthOverLimit } from '../../clipboard/clipboard-text' import { splitAiVaultSearchQuery } from '../search/ai-vault-search-query-operators' import { diff --git a/src/shared/ai-vault/session-display/ai-vault-session-log-resource.ts b/src/shared/ai-vault/session-display/ai-vault-session-log-resource.ts index 8351e9d4edf..e248582a166 100644 --- a/src/shared/ai-vault/session-display/ai-vault-session-log-resource.ts +++ b/src/shared/ai-vault/session-display/ai-vault-session-log-resource.ts @@ -1,5 +1,5 @@ import type { AiVaultAgent, AiVaultSession } from '../contracts/ai-vault-types' -import { getRuntimePathBasename } from '../../cross-platform-path' +import { getRuntimePathBasename } from '../../file-access/cross-platform-path' export function clineMessagesPathForMetadata(filePath: string): string { return filePath.endsWith('.json') ? `${filePath.slice(0, -'.json'.length)}.messages.json` : '' diff --git a/src/shared/ai-vault/session-display/ai-vault-session-worktree.ts b/src/shared/ai-vault/session-display/ai-vault-session-worktree.ts index 82a27b1a61c..4d9619f5472 100644 --- a/src/shared/ai-vault/session-display/ai-vault-session-worktree.ts +++ b/src/shared/ai-vault/session-display/ai-vault-session-worktree.ts @@ -13,7 +13,7 @@ import { isRuntimePathAbsolute, normalizeRuntimePathForComparison, normalizeRuntimePathSeparators -} from '../../cross-platform-path' +} from '../../file-access/cross-platform-path' import type { AiVaultSession } from '../contracts/ai-vault-types' import type { Worktree } from '../../worktree/types' import { matchAiVaultSessionCwdCandidates } from '../scanning/ai-vault-session-cwd-candidates' diff --git a/src/shared/zip-extractor-command.ts b/src/shared/archives/zip-extractor-command.ts similarity index 100% rename from src/shared/zip-extractor-command.ts rename to src/shared/archives/zip-extractor-command.ts diff --git a/src/shared/external-automation-jobs-file.ts b/src/shared/automations/external/external-automation-jobs-file.ts similarity index 94% rename from src/shared/external-automation-jobs-file.ts rename to src/shared/automations/external/external-automation-jobs-file.ts index 89d49d1be4a..ecb965133c2 100644 --- a/src/shared/external-automation-jobs-file.ts +++ b/src/shared/automations/external/external-automation-jobs-file.ts @@ -1,11 +1,11 @@ import { NodeFileReadTooLargeError, readNodeFileWithinLimit -} from './file-content/node-bounded-file-reader' +} from '../../file-content/node-bounded-file-reader' import { assertJsonTextStructureWithinLimits, type JsonTextStructureLimits -} from './json-stream/json-text-structure-limit' +} from '../../json-stream/json-text-structure-limit' export const EXTERNAL_AUTOMATION_JOBS_FILE_MAX_BYTES = 8 * 1024 * 1024 export const EXTERNAL_AUTOMATION_JOBS_MAX_ENTRIES = 10_000 diff --git a/src/shared/external-automation-scope.ts b/src/shared/automations/external/external-automation-scope.ts similarity index 95% rename from src/shared/external-automation-scope.ts rename to src/shared/automations/external/external-automation-scope.ts index 7e93cfdba44..f5c4b1209c4 100644 --- a/src/shared/external-automation-scope.ts +++ b/src/shared/automations/external/external-automation-scope.ts @@ -4,13 +4,13 @@ import { AUTOMATION_OWNER_CONFLICT_CODES, AutomationOwnerConflictError -} from './automations/ownership/automation-owner-conflict' -import type { AutomationOwnerRef } from './automations/ownership/automation-owner-ref' +} from '../ownership/automation-owner-conflict' +import type { AutomationOwnerRef } from '../ownership/automation-owner-ref' import type { ExternalAutomationAction, ExternalAutomationProvider, ExternalAutomationTarget -} from './automations/external/external-automation' +} from './external-automation' export const EXTERNAL_AUTOMATION_PROVIDERS = [ 'openclaw' diff --git a/src/shared/automations/history/automation-session-reuse.ts b/src/shared/automations/history/automation-session-reuse.ts index 87943963ccc..1f63f429eca 100644 --- a/src/shared/automations/history/automation-session-reuse.ts +++ b/src/shared/automations/history/automation-session-reuse.ts @@ -4,7 +4,7 @@ import type { AutomationRun } from './automation-run' import type { TuiAgent } from '../../agent-launch/catalog/tui-agent' import type { WorkspaceRunContext } from '../../work-items/task-source-context' import { parseExecutionHostId } from '../../execution-host' -import { normalizeRuntimePathForComparison } from '../../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../file-access/cross-platform-path' export type AutomationSessionTarget = Pick & { runtimeEnvironmentId?: string | null diff --git a/src/shared/automations/launch/automation-setup-decision.ts b/src/shared/automations/launch/automation-setup-decision.ts index 0bd33e01252..6a96caefb4a 100644 --- a/src/shared/automations/launch/automation-setup-decision.ts +++ b/src/shared/automations/launch/automation-setup-decision.ts @@ -1,4 +1,4 @@ -import type { SetupRunPolicy } from '../../orca-yaml-hook-types' +import type { SetupRunPolicy } from '../../workspace-setup/orca-yaml-hook-types' import type { SetupDecision } from '../../worktree/create-types' export function getAutomationSetupDefaultDecision( diff --git a/src/shared/bitbucket-credentials.ts b/src/shared/bitbucket/bitbucket-credentials.ts similarity index 95% rename from src/shared/bitbucket-credentials.ts rename to src/shared/bitbucket/bitbucket-credentials.ts index f7e82ba15c8..1b2718191ef 100644 --- a/src/shared/bitbucket-credentials.ts +++ b/src/shared/bitbucket/bitbucket-credentials.ts @@ -1,4 +1,4 @@ -import type { SecretAtRestProtection } from './secure-storage/secret-at-rest-protection' +import type { SecretAtRestProtection } from '../secure-storage/secret-at-rest-protection' export type BitbucketAuthMode = 'token' | 'basic' // Offer Disconnect only for in-app stored credentials. diff --git a/src/shared/browser/annotations/browser-annotation-output.ts b/src/shared/browser/annotations/browser-annotation-output.ts index 742943aa1f5..0c5f9d0f04c 100644 --- a/src/shared/browser/annotations/browser-annotation-output.ts +++ b/src/shared/browser/annotations/browser-annotation-output.ts @@ -3,7 +3,7 @@ import type { BrowserGrabPayload, BrowserPageAnnotation } from '../element-grab/browser-grab-types' -import { isWindowsAbsolutePathLike } from '../../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../file-access/cross-platform-path' function formatPageHeading(payload: BrowserGrabPayload): string { // Document previews report a file path; `C:\` would otherwise parse as a URL scheme. diff --git a/src/shared/browser/workspaces/browser-page-doc-location.ts b/src/shared/browser/workspaces/browser-page-doc-location.ts index aabfc31e538..6ac06447c92 100644 --- a/src/shared/browser/workspaces/browser-page-doc-location.ts +++ b/src/shared/browser/workspaces/browser-page-doc-location.ts @@ -1,5 +1,5 @@ import type { BrowserPageDocLocation } from './browser-workspace-types' -import { relativePathInsideRoot, resolveRuntimePath } from '../../cross-platform-path' +import { relativePathInsideRoot, resolveRuntimePath } from '../../file-access/cross-platform-path' /** Compare fields: mirrors rebuild object identity on every page update, which would otherwise republish unchanged workspace tabs. */ export function browserPageDocLocationsEqual( diff --git a/src/shared/cli-argument-boundary.ts b/src/shared/cli/cli-argument-boundary.ts similarity index 100% rename from src/shared/cli-argument-boundary.ts rename to src/shared/cli/cli-argument-boundary.ts diff --git a/src/shared/command-option-occurrence.ts b/src/shared/cli/command-option-occurrence.ts similarity index 100% rename from src/shared/command-option-occurrence.ts rename to src/shared/cli/command-option-occurrence.ts diff --git a/src/shared/orca-cli-command-name.ts b/src/shared/cli/orca-cli-command-name.ts similarity index 88% rename from src/shared/orca-cli-command-name.ts rename to src/shared/cli/orca-cli-command-name.ts index 246047c8972..0a5ccca08d7 100644 --- a/src/shared/orca-cli-command-name.ts +++ b/src/shared/cli/orca-cli-command-name.ts @@ -1,4 +1,4 @@ -import { getAppEnvironment, hasAppEnvironment } from './app-lifecycle/app-environment' +import { getAppEnvironment, hasAppEnvironment } from '../app-lifecycle/app-environment' export function getOrcaCliCommandNameForPlatform(platform: NodeJS.Platform): string { if (platform === 'linux') { diff --git a/src/shared/updated-at-order.ts b/src/shared/collections/updated-at-order.ts similarity index 100% rename from src/shared/updated-at-order.ts rename to src/shared/collections/updated-at-order.ts diff --git a/src/shared/constants.ts b/src/shared/constants.ts index 0da7834c34a..5fedcc1577b 100644 --- a/src/shared/constants.ts +++ b/src/shared/constants.ts @@ -1,5 +1,5 @@ import type { GlobalSettings } from './global-settings-types' -import type { RepoHookSettings } from './orca-yaml-hook-types' +import type { RepoHookSettings } from './workspace-setup/orca-yaml-hook-types' import type { PersistedState } from './persisted-state-types' import type { PersistedUIState } from './persisted-ui-state-types' import type { AgentActivityDisplayMode } from './ui-chrome-types' diff --git a/src/shared/document-preview/doc-preview-file-access.ts b/src/shared/document-preview/doc-preview-file-access.ts index b82d82c1a72..e243656ffdb 100644 --- a/src/shared/document-preview/doc-preview-file-access.ts +++ b/src/shared/document-preview/doc-preview-file-access.ts @@ -2,7 +2,7 @@ import { constants, type Stats } from 'node:fs' import { open, realpath, stat, type FileHandle } from 'node:fs/promises' import { extname } from 'node:path' import { isBinaryBuffer } from '../file-preview/binary-buffer' -import { isPathInsideOrEqual } from '../cross-platform-path' +import { isPathInsideOrEqual } from '../file-access/cross-platform-path' import { IMAGE_FILE_MIME_TYPES } from '../file-preview/image-mime-types' import { FONT_FILE_MIME_TYPES } from '../file-preview/font-file-extensions' import type { RuntimeFileReadChunkResult } from '../file-content/runtime-file-read' diff --git a/src/shared/editor/notebooks/notebook-venv-location.ts b/src/shared/editor/notebooks/notebook-venv-location.ts index b8be0496340..aa22dc00451 100644 --- a/src/shared/editor/notebooks/notebook-venv-location.ts +++ b/src/shared/editor/notebooks/notebook-venv-location.ts @@ -1,4 +1,4 @@ -import { isPathInsideOrEqual } from '../../cross-platform-path' +import { isPathInsideOrEqual } from '../../file-access/cross-platform-path' /** Where a notebook's new `.venv` goes: the workspace root when the notebook is inside it, else beside it. */ export function notebookVenvParent(notebookPath: string, rootPath: string | null): string { diff --git a/src/shared/editor/views/editor-tab-view-types.ts b/src/shared/editor/views/editor-tab-view-types.ts index af9924525d4..c033b467cb7 100644 --- a/src/shared/editor/views/editor-tab-view-types.ts +++ b/src/shared/editor/views/editor-tab-view-types.ts @@ -11,7 +11,7 @@ import type { GitConflictStatusSource, GitStatusEntry } from '../../git/status/git-status-types' -import type { GitLabProjectRef } from '../../gitlab-types' +import type { GitLabProjectRef } from '../../gitlab/gitlab-types' import type { PRCheckDetail, PRCheckRunDetails } from '../../github/checks/check-types' import type { GitHubRepositoryIdentity } from '../../github/repositories/repository-identity' diff --git a/src/shared/classified-error.ts b/src/shared/errors/classified-error.ts similarity index 100% rename from src/shared/classified-error.ts rename to src/shared/errors/classified-error.ts diff --git a/src/shared/definitive-filesystem-absence.ts b/src/shared/errors/definitive-filesystem-absence.ts similarity index 100% rename from src/shared/definitive-filesystem-absence.ts rename to src/shared/errors/definitive-filesystem-absence.ts diff --git a/src/shared/storage-capacity-error.ts b/src/shared/errors/storage-capacity-error.ts similarity index 100% rename from src/shared/storage-capacity-error.ts rename to src/shared/errors/storage-capacity-error.ts diff --git a/src/shared/absolute-dir-override.ts b/src/shared/file-access/absolute-dir-override.ts similarity index 100% rename from src/shared/absolute-dir-override.ts rename to src/shared/file-access/absolute-dir-override.ts diff --git a/src/shared/cross-platform-path.test.ts b/src/shared/file-access/cross-platform-path.test.ts similarity index 100% rename from src/shared/cross-platform-path.test.ts rename to src/shared/file-access/cross-platform-path.test.ts diff --git a/src/shared/cross-platform-path.ts b/src/shared/file-access/cross-platform-path.ts similarity index 99% rename from src/shared/cross-platform-path.ts rename to src/shared/file-access/cross-platform-path.ts index 65283dc2c79..7968a682c43 100644 --- a/src/shared/cross-platform-path.ts +++ b/src/shared/file-access/cross-platform-path.ts @@ -1,4 +1,4 @@ -import { isWslUncPath, parseWslUncPath, toWindowsWslPath } from './file-access/wsl-paths' +import { isWslUncPath, parseWslUncPath, toWindowsWslPath } from './wsl-paths' const SLASH_CHAR_CODE = '/'.charCodeAt(0) diff --git a/src/shared/real-path-sync.ts b/src/shared/file-access/real-path-sync.ts similarity index 100% rename from src/shared/real-path-sync.ts rename to src/shared/file-access/real-path-sync.ts diff --git a/src/shared/file-access/runtime-workspace-file-owner.ts b/src/shared/file-access/runtime-workspace-file-owner.ts index ee6fe325122..dc397b300ea 100644 --- a/src/shared/file-access/runtime-workspace-file-owner.ts +++ b/src/shared/file-access/runtime-workspace-file-owner.ts @@ -1,5 +1,5 @@ import type { ExecutionHostId } from '../execution-host' -import { normalizeRuntimePathForComparison, relativePathInsideRoot } from '../cross-platform-path' +import { normalizeRuntimePathForComparison, relativePathInsideRoot } from './cross-platform-path' export type RuntimeWorkspaceFileRoot = { workspaceId: string diff --git a/src/shared/local-log-tail-types.ts b/src/shared/file-content/local-log-tail-types.ts similarity index 100% rename from src/shared/local-log-tail-types.ts rename to src/shared/file-content/local-log-tail-types.ts diff --git a/src/shared/drop-staging-ignore.ts b/src/shared/file-import/drop-staging-ignore.ts similarity index 100% rename from src/shared/drop-staging-ignore.ts rename to src/shared/file-import/drop-staging-ignore.ts diff --git a/src/shared/file-listing/markdown-document-paths.ts b/src/shared/file-listing/markdown-document-paths.ts index 0a5ad584203..21953ca5b58 100644 --- a/src/shared/file-listing/markdown-document-paths.ts +++ b/src/shared/file-listing/markdown-document-paths.ts @@ -2,7 +2,7 @@ import { createMarkdownDocumentListingBudget, retainMarkdownDocument } from './markdown-document-listing-limits' -import { isWindowsAbsolutePathLike } from '../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../file-access/cross-platform-path' import { normalizeRelativePath } from '../file-search/text-search-paths' import { basename as pathBasename, extname, isAbsolute, posix, relative, resolve } from 'node:path' import type { FileDocument, MarkdownDocument } from './file-document' diff --git a/src/shared/file-search/text-search-paths.ts b/src/shared/file-search/text-search-paths.ts index 583abc868a6..85382f3f175 100644 --- a/src/shared/file-search/text-search-paths.ts +++ b/src/shared/file-search/text-search-paths.ts @@ -1,5 +1,5 @@ import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../file-access/cross-platform-path' function pathFlavor(rootPath: string): typeof posix | typeof win32 { if (isWindowsAbsolutePathLike(rootPath)) { diff --git a/src/shared/watch-root-capacity-refusal.ts b/src/shared/file-watch/watch-root-capacity-refusal.ts similarity index 100% rename from src/shared/watch-root-capacity-refusal.ts rename to src/shared/file-watch/watch-root-capacity-refusal.ts diff --git a/src/shared/folder-workspace-hooks.ts b/src/shared/folder-workspace-hooks.ts index 9e466533194..e036c7161b7 100644 --- a/src/shared/folder-workspace-hooks.ts +++ b/src/shared/folder-workspace-hooks.ts @@ -1,4 +1,4 @@ -import type { OrcaHooks } from './orca-yaml-hook-types' +import type { OrcaHooks } from './workspace-setup/orca-yaml-hook-types' import type { Repo } from './repository/repo-types' import { isFolderRepo } from './repository/repo-kind' diff --git a/src/shared/folder-workspaces/folder-workspace-execution-host.ts b/src/shared/folder-workspaces/folder-workspace-execution-host.ts index cf4cb4fb4a3..0f47613ee32 100644 --- a/src/shared/folder-workspaces/folder-workspace-execution-host.ts +++ b/src/shared/folder-workspaces/folder-workspace-execution-host.ts @@ -4,7 +4,7 @@ import type { FolderWorkspace } from './folder-workspace-types' import type { ProjectGroup } from '../project/groups/project-group-types' import type { Repo } from '../repository/repo-types' -import { isPathInsideOrEqual } from '../cross-platform-path' +import { isPathInsideOrEqual } from '../file-access/cross-platform-path' import { getProjectGroupSubtreeIds } from '../project/groups/project-groups' import { getRepoExecutionHostId, diff --git a/src/shared/folder-workspaces/folder-workspace-source-repos.ts b/src/shared/folder-workspaces/folder-workspace-source-repos.ts index 34725c0e46f..17e221ae599 100644 --- a/src/shared/folder-workspaces/folder-workspace-source-repos.ts +++ b/src/shared/folder-workspaces/folder-workspace-source-repos.ts @@ -1,4 +1,4 @@ -import { isPathInsideOrEqual } from '../cross-platform-path' +import { isPathInsideOrEqual } from '../file-access/cross-platform-path' import { getConnectionExecutionHostId, getRepoExecutionHostId, diff --git a/src/shared/git/commands/git-ssh-policy-env.ts b/src/shared/git/commands/git-ssh-policy-env.ts index 347644a0730..0f254408389 100644 --- a/src/shared/git/commands/git-ssh-policy-env.ts +++ b/src/shared/git/commands/git-ssh-policy-env.ts @@ -1,4 +1,4 @@ -import { isWindowsAbsolutePathLike } from '../../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../file-access/cross-platform-path' import { quotePosixShell } from '../../shell/launch/shell-argument-quoting' export type GitSshPolicyMode = diff --git a/src/shared/loose-ref-count.test.ts b/src/shared/git/maintenance/loose-ref-count.test.ts similarity index 73% rename from src/shared/loose-ref-count.test.ts rename to src/shared/git/maintenance/loose-ref-count.test.ts index 1a3247b9698..83f645ede5e 100644 --- a/src/shared/loose-ref-count.test.ts +++ b/src/shared/git/maintenance/loose-ref-count.test.ts @@ -1,28 +1,7 @@ import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join } from 'node:path' -import { afterEach, describe, expect, it, vi } from 'vitest' - -// Wrap real reads to measure walk concurrency. -const readdirCalls = vi.hoisted(() => ({ outstanding: 0, peak: 0, count: 0 })) - -vi.mock('node:fs/promises', async (importOriginal) => { - const actual = await importOriginal>() - const realReaddir = actual.readdir as (...args: unknown[]) => Promise - return { - ...actual, - readdir: async (...args: unknown[]) => { - readdirCalls.outstanding += 1 - readdirCalls.count += 1 - readdirCalls.peak = Math.max(readdirCalls.peak, readdirCalls.outstanding) - try { - return await realReaddir(...args) - } finally { - readdirCalls.outstanding -= 1 - } - } - } -}) +import { afterEach, describe, expect, it } from 'vitest' import { countLooseRefs } from './loose-ref-count' @@ -44,7 +23,6 @@ async function makeRefsTree(counts: Record): Promise { } afterEach(async () => { - vi.restoreAllMocks() await Promise.all(roots.splice(0).map((root) => rm(root, { recursive: true, force: true }))) }) diff --git a/src/shared/loose-ref-count.ts b/src/shared/git/maintenance/loose-ref-count.ts similarity index 100% rename from src/shared/loose-ref-count.ts rename to src/shared/git/maintenance/loose-ref-count.ts diff --git a/src/shared/packed-refs-lock-gate.ts b/src/shared/git/maintenance/packed-refs-lock-gate.ts similarity index 100% rename from src/shared/packed-refs-lock-gate.ts rename to src/shared/git/maintenance/packed-refs-lock-gate.ts diff --git a/src/shared/git/maintenance/repo-ref-maintenance.ts b/src/shared/git/maintenance/repo-ref-maintenance.ts index 3f5247f3877..d3833a05ab5 100644 --- a/src/shared/git/maintenance/repo-ref-maintenance.ts +++ b/src/shared/git/maintenance/repo-ref-maintenance.ts @@ -1,5 +1,5 @@ -import { countLooseRefs } from '../../loose-ref-count' -import { PackedRefsLockGate } from '../../packed-refs-lock-gate' +import { countLooseRefs } from './loose-ref-count' +import { PackedRefsLockGate } from './packed-refs-lock-gate' import { RepoMaintenanceSchedule } from './repo-maintenance-schedule' import { LOOSE_REF_PACK_THRESHOLD, diff --git a/src/shared/git/objects/git-object-quarantine.ts b/src/shared/git/objects/git-object-quarantine.ts index cf836ca3956..759257250f5 100644 --- a/src/shared/git/objects/git-object-quarantine.ts +++ b/src/shared/git/objects/git-object-quarantine.ts @@ -1,7 +1,7 @@ import { lstat, mkdtemp, readdir, rename, stat } from 'node:fs/promises' import { posix, win32 } from 'node:path' -import { isWindowsAbsolutePathLike } from '../../cross-platform-path' -import { isDefinitiveAbsence } from '../../definitive-filesystem-absence' +import { isWindowsAbsolutePathLike } from '../../file-access/cross-platform-path' +import { isDefinitiveAbsence } from '../../errors/definitive-filesystem-absence' import { removeTree } from '../../file-write/windows-transient-lock-removal' /** Run throwaway merge-tree object writes in a scratch store; alternates retain access to real objects without leaving unreachable loose objects. */ diff --git a/src/shared/preferred-git-remote.ts b/src/shared/git/remotes/preferred-git-remote.ts similarity index 100% rename from src/shared/preferred-git-remote.ts rename to src/shared/git/remotes/preferred-git-remote.ts diff --git a/src/shared/generated-code-path.ts b/src/shared/git/status/generated-code-path.ts similarity index 100% rename from src/shared/generated-code-path.ts rename to src/shared/git/status/generated-code-path.ts diff --git a/src/shared/git/status/git-branch-line-total.ts b/src/shared/git/status/git-branch-line-total.ts index 2a7a0dd5e82..ac0a73fda95 100644 --- a/src/shared/git/status/git-branch-line-total.ts +++ b/src/shared/git/status/git-branch-line-total.ts @@ -5,8 +5,8 @@ import { parseNumstat, type GitLineStats } from './git-uncommitted-line-stats' -import { isGeneratedCodePath } from '../../generated-code-path' -import { isTestCodePath } from '../../test-code-path' +import { isGeneratedCodePath } from './generated-code-path' +import { isTestCodePath } from './test-code-path' // Bound large base-to-worktree diffs over SSH; failures invalidate totals instead of publishing partial values. export const GIT_BRANCH_LINE_TOTAL_TIMEOUT_MS = 15_000 diff --git a/src/shared/test-code-path.ts b/src/shared/git/status/test-code-path.ts similarity index 100% rename from src/shared/test-code-path.ts rename to src/shared/git/status/test-code-path.ts diff --git a/src/shared/github/checks/checks-detail-polling-policy.ts b/src/shared/github/checks/checks-detail-polling-policy.ts index b57bbb32c5f..1a73933c1c9 100644 --- a/src/shared/github/checks/checks-detail-polling-policy.ts +++ b/src/shared/github/checks/checks-detail-polling-policy.ts @@ -6,7 +6,7 @@ import { reviewRefreshIntervalMs, scaleReviewRefreshInterval, type PRAutoRefreshCadence -} from '../../review-refresh-policy' +} from '../../source-control/hosted-review/review-refresh-policy' export function detailedChecksStatus(checks: readonly PRCheckDetail[]): CheckStatus | undefined { if (checks.length === 0) { diff --git a/src/shared/github/projects/project-request-types.ts b/src/shared/github/projects/project-request-types.ts index 6b8bc04405b..158da1c2936 100644 --- a/src/shared/github/projects/project-request-types.ts +++ b/src/shared/github/projects/project-request-types.ts @@ -1,6 +1,6 @@ // Keep Project request payloads separate from ProjectV2 domain shapes so renderer domain imports do not pull IPC arguments. import type { GitHubProjectFieldMutationValue, GitHubProjectOwnerType } from './project-types' -import type { GitHubIssueUpdate } from '../../issue-mutation-types' +import type { GitHubIssueUpdate } from '../../work-items/issue-mutation-types' /** Set by a click: it may start the stopped WSL distro gh lives in (E9). Loads that also run * unprompted (mount effects, restore) leave it unset. Local IPC only. */ diff --git a/src/shared/gh-star-source.ts b/src/shared/github/repositories/gh-star-source.ts similarity index 100% rename from src/shared/gh-star-source.ts rename to src/shared/github/repositories/gh-star-source.ts diff --git a/src/shared/github/work-items/work-item-page-errors.ts b/src/shared/github/work-items/work-item-page-errors.ts index 6da1a161f31..1ed24ba036e 100644 --- a/src/shared/github/work-items/work-item-page-errors.ts +++ b/src/shared/github/work-items/work-item-page-errors.ts @@ -1,4 +1,4 @@ -import type { ClassifiedError } from '../../classified-error' +import type { ClassifiedError } from '../../errors/classified-error' import { GITHUB_SEARCH_RESULT_WINDOW_ERROR_PATTERN } from './work-items-query-bounds' export function getWorkItemPageErrorTypes(errors: unknown): ClassifiedError['type'][] { diff --git a/src/shared/github/work-items/work-item-types.ts b/src/shared/github/work-items/work-item-types.ts index 23c8c9ada5b..5f01c7169b2 100644 --- a/src/shared/github/work-items/work-item-types.ts +++ b/src/shared/github/work-items/work-item-types.ts @@ -1,4 +1,4 @@ -import type { ClassifiedError } from '../../classified-error' +import type { ClassifiedError } from '../../errors/classified-error' import type { ExecutionHostId } from '../../execution-host' import type { PRCheckDetail } from '../checks/check-types' import type { GitHubIssueTimelineItem, PRComment } from '../comments/comment-types' diff --git a/src/shared/gitlab-projects.ts b/src/shared/gitlab/gitlab-projects.ts similarity index 100% rename from src/shared/gitlab-projects.ts rename to src/shared/gitlab/gitlab-projects.ts diff --git a/src/shared/gitlab-types.ts b/src/shared/gitlab/gitlab-types.ts similarity index 97% rename from src/shared/gitlab-types.ts rename to src/shared/gitlab/gitlab-types.ts index 111b2d9e2f4..a18ec8f3827 100644 --- a/src/shared/gitlab-types.ts +++ b/src/shared/gitlab/gitlab-types.ts @@ -1,12 +1,12 @@ /** GitLab-specific types re-export through ./types for import compatibility. */ -import type { ClassifiedError } from './classified-error' -import type { ExecutionHostId } from './execution-host' +import type { ClassifiedError } from '../errors/classified-error' +import type { ExecutionHostId } from '../execution-host' import type { CheckStatus, PRConflictSummary, ProviderCheckSummary -} from './github/pull-requests/pull-request-types' -import type { HostedReviewDecision } from './source-control/hosted-review/hosted-review-contracts' +} from '../github/pull-requests/pull-request-types' +import type { HostedReviewDecision } from '../source-control/hosted-review/hosted-review-contracts' // Why: flat owner/repo is inadequate — projects nest (`group/subgroup/project`) and self-hosted hosts must travel with the path for URL/glab targeting. export type GitLabProjectRef = { host: string; path: string } diff --git a/src/shared/global-settings-base.ts b/src/shared/global-settings-base.ts index 558bbdc48b7..2111815f0ae 100644 --- a/src/shared/global-settings-base.ts +++ b/src/shared/global-settings-base.ts @@ -26,7 +26,7 @@ import type { SshRemoteControlSettings } from './remote-runtime/ssh/ssh-remote-c import type { AgentWorkspaceTrustSettings } from './agent-launch/permissions/agent-workspace-trust-decision' import type { KeybindingGlobalSettings } from './keybindings/global-settings' import type { WorkspaceCleanupPolicySettings } from './workspace-cleanup/workspace-cleanup-policy' -import type { PRAutoRefreshSettings } from './review-refresh-policy' +import type { PRAutoRefreshSettings } from './source-control/hosted-review/review-refresh-policy' import type { ManagedAccountNameSettings } from './agent-accounts/managed-account-display-names' /** Settings groups owned by their feature modules and composed into GlobalSettings. */ diff --git a/src/shared/global-settings-types.ts b/src/shared/global-settings-types.ts index 02b874dae4f..cc8a9491b4d 100644 --- a/src/shared/global-settings-types.ts +++ b/src/shared/global-settings-types.ts @@ -7,7 +7,7 @@ import type { OrcaWorkspaceLayout } from './orca-workspace-layout' import type { GitHubProjectSettings } from './github/projects/project-types' import type { VoiceSettings } from './speech/speech-types' import type { AiVaultSearchSettings } from './ai-vault/search/ai-vault-search-settings' -import type { GitLabProjectSettings } from './gitlab-types' +import type { GitLabProjectSettings } from './gitlab/gitlab-types' import type { TaskProvider } from './work-items/task-providers' import type { AppIconId } from './app-lifecycle/identity/app-icon' import type { SourceControlAiSettings } from './source-control/ai/settings/source-control-ai-settings-types' diff --git a/src/shared/mcp-config-inspection-limits.ts b/src/shared/mcp/configuration/mcp-config-inspection-limits.ts similarity index 95% rename from src/shared/mcp-config-inspection-limits.ts rename to src/shared/mcp/configuration/mcp-config-inspection-limits.ts index 6ed73071a28..3ac52262c50 100644 --- a/src/shared/mcp-config-inspection-limits.ts +++ b/src/shared/mcp/configuration/mcp-config-inspection-limits.ts @@ -1,4 +1,4 @@ -import { measureUtf8ByteLength } from './text/utf8-byte-limits' +import { measureUtf8ByteLength } from '../../text/utf8-byte-limits' export const MCP_CONFIG_INSPECTION_MAX_BYTES = 256 * 1024 export const MCP_CONFIG_INSPECTION_MAX_CODE_UNITS = 256 * 1024 diff --git a/src/shared/mcp-config.test.ts b/src/shared/mcp/configuration/mcp-config.test.ts similarity index 99% rename from src/shared/mcp-config.test.ts rename to src/shared/mcp/configuration/mcp-config.test.ts index 4d9e0cf047a..bfa371a2330 100644 --- a/src/shared/mcp-config.test.ts +++ b/src/shared/mcp/configuration/mcp-config.test.ts @@ -2,9 +2,9 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { canInspectLocalMcpConfigRoot, inspectMcpConfigContent, - maskMcpEnv, MCP_CONFIG_CANDIDATES } from './mcp-config' +import { maskMcpEnv } from './mcp-server-inspection' import { MCP_CONFIG_INSPECTION_MAX_BYTES, MCP_CONFIG_INSPECTION_MAX_ENV_FIELDS, diff --git a/src/shared/mcp-config.ts b/src/shared/mcp/configuration/mcp-config.ts similarity index 99% rename from src/shared/mcp-config.ts rename to src/shared/mcp/configuration/mcp-config.ts index 09fbc6d3865..2ae69ab0869 100644 --- a/src/shared/mcp-config.ts +++ b/src/shared/mcp/configuration/mcp-config.ts @@ -5,8 +5,6 @@ import { } from './mcp-config-inspection-limits' import { summarizeMcpServer } from './mcp-server-inspection' -export { maskMcpEnv } from './mcp-server-inspection' - export type McpConfigFormat = 'workspace' | 'cursor' | 'claude' export type McpConfigCandidate = { diff --git a/src/shared/mcp-server-inspection.ts b/src/shared/mcp/configuration/mcp-server-inspection.ts similarity index 100% rename from src/shared/mcp-server-inspection.ts rename to src/shared/mcp/configuration/mcp-server-inspection.ts diff --git a/src/shared/native-chat/input/composer/agent-image-paste.ts b/src/shared/native-chat/input/composer/agent-image-paste.ts index af005c0c15a..88ccfd016ae 100644 --- a/src/shared/native-chat/input/composer/agent-image-paste.ts +++ b/src/shared/native-chat/input/composer/agent-image-paste.ts @@ -2,7 +2,7 @@ import { imagePasteWritesFollowedByText, separateImagePasteFromFollowingText } from '../../../terminal/input/image-paste-following-text' -import { isWindowsAbsolutePathLike } from '../../../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../../file-access/cross-platform-path' import { filesystemPathToFileUri } from '../../../file-links/file-uri-path' // Whether raw-path paste is verified to create an attachment; others use file references. diff --git a/src/shared/native-chat/native-chat-href-routing.ts b/src/shared/native-chat/native-chat-href-routing.ts index cbb5ad8e3c0..b0cc3005f5b 100644 --- a/src/shared/native-chat/native-chat-href-routing.ts +++ b/src/shared/native-chat/native-chat-href-routing.ts @@ -1,4 +1,4 @@ -import { isWindowsAbsolutePathLike } from '../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../file-access/cross-platform-path' import { fileUriToFilesystemPath } from '../file-links/file-uri-path' export type NativeChatHrefRoute = diff --git a/src/shared/native-chat/native-chat-image-label.ts b/src/shared/native-chat/native-chat-image-label.ts index 72f4254b75a..417f1b324f0 100644 --- a/src/shared/native-chat/native-chat-image-label.ts +++ b/src/shared/native-chat/native-chat-image-label.ts @@ -1,5 +1,5 @@ import { AGENT_SESSION_PASTED_IMAGE_SUFFIX_SOURCE } from '../agent-session/agent-session-attachments' -import { getRuntimePathBasename } from '../cross-platform-path' +import { getRuntimePathBasename } from '../file-access/cross-platform-path' import type { NativeChatImageRefBlock } from './native-chat-types' export type NativeChatImageLabelCopy = { diff --git a/src/shared/native-chat/tools/native-chat-edit-model.ts b/src/shared/native-chat/tools/native-chat-edit-model.ts index 11865e67269..ff092f079db 100644 --- a/src/shared/native-chat/tools/native-chat-edit-model.ts +++ b/src/shared/native-chat/tools/native-chat-edit-model.ts @@ -1,4 +1,4 @@ -import { getRuntimePathBasename } from '../../cross-platform-path' +import { getRuntimePathBasename } from '../../file-access/cross-platform-path' /** Per-side diff rows: del lacks new number, add lacks old. gap marks skipped regions so concatenated snippets do not imply continuity. */ export type NativeChatEditLineKind = 'context' | 'add' | 'del' | 'gap' diff --git a/src/shared/native-chat/tools/native-chat-tool-output.ts b/src/shared/native-chat/tools/native-chat-tool-output.ts index 0b132de1c97..b3bab8f69d8 100644 --- a/src/shared/native-chat/tools/native-chat-tool-output.ts +++ b/src/shared/native-chat/tools/native-chat-tool-output.ts @@ -2,7 +2,7 @@ import type { AgentJournalBoundedPayload, AgentJournalItemBody } from '../../agent-session/journal/agent-session-journal-types' -import { formatBytes } from '../../format-bytes' +import { formatBytes } from '../../text/format-bytes' import type { NativeChatToolResultBlock } from '../native-chat-types' import { MAX_TOOL_DETAIL_LENGTH } from './native-chat-tool-summary' diff --git a/src/shared/native-chat/tools/native-chat-tool-viewed-images.ts b/src/shared/native-chat/tools/native-chat-tool-viewed-images.ts index 4f136e38264..a4cab782969 100644 --- a/src/shared/native-chat/tools/native-chat-tool-viewed-images.ts +++ b/src/shared/native-chat/tools/native-chat-tool-viewed-images.ts @@ -1,4 +1,4 @@ -import { isRuntimePathAbsolute } from '../../cross-platform-path' +import { isRuntimePathAbsolute } from '../../file-access/cross-platform-path' import { isRasterImagePath } from '../../file-preview/file-preview-kind' import { isToolCallBlock, diff --git a/src/shared/native-chat/transcript/images/native-chat-generated-image-answers.ts b/src/shared/native-chat/transcript/images/native-chat-generated-image-answers.ts index e6f8e1f760d..93b8642dd01 100644 --- a/src/shared/native-chat/transcript/images/native-chat-generated-image-answers.ts +++ b/src/shared/native-chat/transcript/images/native-chat-generated-image-answers.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../../file-access/cross-platform-path' import { routeNativeChatHref } from '../../native-chat-href-routing' import { isGeneratedImageOperation, diff --git a/src/shared/composer-branch-selection.ts b/src/shared/new-workspace/composer-branch-selection.ts similarity index 97% rename from src/shared/composer-branch-selection.ts rename to src/shared/new-workspace/composer-branch-selection.ts index 85aebca0feb..ed648bf24d9 100644 --- a/src/shared/composer-branch-selection.ts +++ b/src/shared/new-workspace/composer-branch-selection.ts @@ -1,5 +1,5 @@ -import type { GitPushTarget } from './worktree/types' -import { branchRefLabel } from './git/refs/branch-ref-label' +import type { GitPushTarget } from '../worktree/types' +import { branchRefLabel } from '../git/refs/branch-ref-label' export type ComposerBranchSelection = { baseBranch: string diff --git a/src/shared/new-workspace/smart-workspace-source-results.ts b/src/shared/new-workspace/smart-workspace-source-results.ts index bd22148f1ad..de280e55fc0 100644 --- a/src/shared/new-workspace/smart-workspace-source-results.ts +++ b/src/shared/new-workspace/smart-workspace-source-results.ts @@ -1,5 +1,5 @@ import type { GitHubWorkItem } from '../github/work-items/work-item-types' -import type { GitLabWorkItem } from '../gitlab-types' +import type { GitLabWorkItem } from '../gitlab/gitlab-types' import type { JiraIssue } from '../jira/jira-types' import type { LinearIssue } from '../linear/issue-types' import type { LinearCollectionResult } from '../linear/workspace-types' diff --git a/src/shared/new-workspace/smart-workspace-url-source-results.ts b/src/shared/new-workspace/smart-workspace-url-source-results.ts index 1bfbcb42598..83e41c5c79d 100644 --- a/src/shared/new-workspace/smart-workspace-url-source-results.ts +++ b/src/shared/new-workspace/smart-workspace-url-source-results.ts @@ -1,7 +1,7 @@ import { parseGitHubIssueOrPRLink, type GitHubIssueOrPRLink } from '../github/repositories/links' import { githubRepoIdentityKey } from '../github/repositories/repository-identity-key' import type { GitHubWorkItem } from '../github/work-items/work-item-types' -import type { GitLabWorkItem } from '../gitlab-types' +import type { GitLabWorkItem } from '../gitlab/gitlab-types' import type { LinearIssue } from '../linear/issue-types' import { parseGitLabIssueOrMRLink } from './gitlab-links' import { diff --git a/src/shared/orca-cli-invocations.ts b/src/shared/orca-cli-invocations.ts index 1ade154ce11..cf141c39d1d 100644 --- a/src/shared/orca-cli-invocations.ts +++ b/src/shared/orca-cli-invocations.ts @@ -1,4 +1,7 @@ -import { COMMAND_TOKEN_SCAN_MAX_CHARS, getCommandTokenPathBasename } from './command-token-scanner' +import { + COMMAND_TOKEN_SCAN_MAX_CHARS, + getCommandTokenPathBasename +} from './shell/command-resolution/command-token-scanner' import { tokenizeCommandLine } from './agent-status/process/agent-command-line-entrypoint' // The published launcher names per platform, plus the dev build's. diff --git a/src/shared/persisted-ui-state-types.ts b/src/shared/persisted-ui-state-types.ts index 1d419a219b7..ca7ee832be4 100644 --- a/src/shared/persisted-ui-state-types.ts +++ b/src/shared/persisted-ui-state-types.ts @@ -10,7 +10,7 @@ import type { FeatureInteractionState } from './feature-education/interactions/f import type { UsagePercentageDisplay } from './agent-usage/display/usage-percentage-display' import type { StatusBarUsageMode } from './status-bar/status-bar-usage-mode' import type { StatusBarUsageFormat } from './status-bar/status-bar-usage-format' -import type { PersistedTrustedOrcaHooks } from './orca-yaml-hook-types' +import type { PersistedTrustedOrcaHooks } from './workspace-setup/orca-yaml-hook-types' import type { CustomPet } from './pets/pet-types' import type { ActivityGroupBy, diff --git a/src/shared/plugins/artifacts/plugin-vm-recipe-artifact.ts b/src/shared/plugins/artifacts/plugin-vm-recipe-artifact.ts index 8f6c26aae91..14b35749e07 100644 --- a/src/shared/plugins/artifacts/plugin-vm-recipe-artifact.ts +++ b/src/shared/plugins/artifacts/plugin-vm-recipe-artifact.ts @@ -1,6 +1,6 @@ import { z } from 'zod' -import { ORCA_VM_RECIPE_ID_PATTERN, ORCA_VM_RECIPE_ID_RULE } from '../../orca-yaml' -import type { OrcaVmRecipe } from '../../orca-yaml-hook-types' +import { ORCA_VM_RECIPE_ID_PATTERN, ORCA_VM_RECIPE_ID_RULE } from '../../workspace-setup/orca-yaml' +import type { OrcaVmRecipe } from '../../workspace-setup/orca-yaml-hook-types' const recipeCommandSchema = z .string() diff --git a/src/shared/lsof-nonblocking-args.ts b/src/shared/process-observation/lsof-nonblocking-args.ts similarity index 100% rename from src/shared/lsof-nonblocking-args.ts rename to src/shared/process-observation/lsof-nonblocking-args.ts diff --git a/src/shared/search-subprocess-lines.test.ts b/src/shared/process-streams/search-subprocess-lines.test.ts similarity index 100% rename from src/shared/search-subprocess-lines.test.ts rename to src/shared/process-streams/search-subprocess-lines.test.ts diff --git a/src/shared/search-subprocess-lines.ts b/src/shared/process-streams/search-subprocess-lines.ts similarity index 100% rename from src/shared/search-subprocess-lines.ts rename to src/shared/process-streams/search-subprocess-lines.ts diff --git a/src/shared/subprocess-stdin-write.ts b/src/shared/process-streams/subprocess-stdin-write.ts similarity index 100% rename from src/shared/subprocess-stdin-write.ts rename to src/shared/process-streams/subprocess-stdin-write.ts diff --git a/src/shared/project/groups/project-group-hooks.ts b/src/shared/project/groups/project-group-hooks.ts index 719e94d6b22..91ec52dc2fb 100644 --- a/src/shared/project/groups/project-group-hooks.ts +++ b/src/shared/project/groups/project-group-hooks.ts @@ -1,5 +1,9 @@ -import type { OrcaHooks, RepoHookSettings, SetupRunPolicy } from '../../orca-yaml-hook-types' -import type { SetupConfig } from '../../orca-hook-setup-config' +import type { + OrcaHooks, + RepoHookSettings, + SetupRunPolicy +} from '../../workspace-setup/orca-yaml-hook-types' +import type { SetupConfig } from '../../workspace-setup/hooks/orca-hook-setup-config' export type GroupHookCheckResult = { status?: 'ok' | 'error' hasHooks: boolean diff --git a/src/shared/project/groups/project-group-types.ts b/src/shared/project/groups/project-group-types.ts index d5d04ca6eb5..4dddce19e85 100644 --- a/src/shared/project/groups/project-group-types.ts +++ b/src/shared/project/groups/project-group-types.ts @@ -1,4 +1,4 @@ -import type { RepoHookSettings } from '../../orca-yaml-hook-types' +import type { RepoHookSettings } from '../../workspace-setup/orca-yaml-hook-types' export type ProjectGroupCreatedFrom = 'manual' | 'folder-scan' | 'migration' export type ProjectGroup = { diff --git a/src/shared/project/project-types.ts b/src/shared/project/project-types.ts index c1929b0124b..3d6e6c677ad 100644 --- a/src/shared/project/project-types.ts +++ b/src/shared/project/project-types.ts @@ -2,7 +2,7 @@ import type { ExecutionHostId } from '../execution-host' import type { RepoIcon } from '../repository/appearance/repo-icon' import type { GitRemoteIdentity } from '../git/remotes/git-remote-identity' import type { LocalWindowsRuntimePreference } from '../execution-host/project-runtime-preference' -import type { RepoHookSettings } from '../orca-yaml-hook-types' +import type { RepoHookSettings } from '../workspace-setup/orca-yaml-hook-types' import type { RepoSourceControlAiOverrides } from '../source-control/ai/settings/source-control-ai-settings-types' import type { Repo, RepoKind } from '../repository/repo-types' import type { ProjectHostSetupTarget } from './host-setup/project-host-setup-target' diff --git a/src/shared/quick-open/quick-open-filter.ts b/src/shared/quick-open/quick-open-filter.ts index b067f719831..1bae1cefcb7 100644 --- a/src/shared/quick-open/quick-open-filter.ts +++ b/src/shared/quick-open/quick-open-filter.ts @@ -1,6 +1,9 @@ /** Pure listing policy shared by main/SSH relay to keep pruning, exclusions and limits aligned; callers own I/O and path translation * (docs/design/share-quick-open-file-listing.md). */ -import { isWindowsAbsolutePathLike, relativePathInsideRoot } from '../cross-platform-path' +import { + isWindowsAbsolutePathLike, + relativePathInsideRoot +} from '../file-access/cross-platform-path' // Blocklist (not allowlist) keeps novel dotfiles discoverable; entries here are tool-generated // caches/state, never hand-edited. Do NOT add user-authored dotdirs (.config, .ssh, .github) — users open files there. diff --git a/src/shared/quick-open/quick-open-query-target.ts b/src/shared/quick-open/quick-open-query-target.ts index 3d7cc92f97c..9bd42b6bad3 100644 --- a/src/shared/quick-open/quick-open-query-target.ts +++ b/src/shared/quick-open/quick-open-query-target.ts @@ -1,4 +1,4 @@ -import { isWindowsAbsolutePathLike } from '../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../file-access/cross-platform-path' import { isQuickOpenQueryTooLarge } from './quick-open-path-search' export type QuickOpenQueryTarget = { pathQuery: string; line?: number; column?: number } diff --git a/src/shared/quick-open/quick-open-recent-candidates.ts b/src/shared/quick-open/quick-open-recent-candidates.ts index cecb4bf993d..964902ab336 100644 --- a/src/shared/quick-open/quick-open-recent-candidates.ts +++ b/src/shared/quick-open/quick-open-recent-candidates.ts @@ -1,4 +1,4 @@ -import { isWindowsAbsolutePathLike } from '../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../file-access/cross-platform-path' import { isClipboardTextByteLengthOverLimit } from '../clipboard/clipboard-text' export const QUICK_OPEN_RECENT_CANDIDATE_LIMIT = 100 diff --git a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-failure-copy.ts b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-failure-copy.ts index 807072109a3..4511587c415 100644 --- a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-failure-copy.ts +++ b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-failure-copy.ts @@ -1,4 +1,4 @@ -import type { OrcaVmRecipeLifecycleMode } from '../../orca-yaml-hook-types' +import type { OrcaVmRecipeLifecycleMode } from '../../workspace-setup/orca-yaml-hook-types' import { formatEphemeralVmRecipeTimeout } from './ephemeral-vm-recipe-timeouts' // One English table for ephemeral VM failures: main builds the wire/persisted English, the renderer translates by code. diff --git a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-checkout-mode.test.ts b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-checkout-mode.test.ts index 2568a48e899..d5eebf8d6b7 100644 --- a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-checkout-mode.test.ts +++ b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-checkout-mode.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import { getEphemeralVmRecipeCheckoutModeFailure } from './ephemeral-vm-recipe-checkout-mode' -import type { OrcaVmRecipe } from '../../orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../workspace-setup/orca-yaml-hook-types' const defaultRecipe: OrcaVmRecipe = { id: 'cloud-sandbox', diff --git a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-checkout-mode.ts b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-checkout-mode.ts index b6d3da2c412..225de9e8c16 100644 --- a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-checkout-mode.ts +++ b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-checkout-mode.ts @@ -1,6 +1,6 @@ import { getEphemeralVmRecipeResultCheckoutMode } from './ephemeral-vm-recipes' import type { EphemeralVmRecipeResult } from './ephemeral-vm-recipes' -import type { OrcaVmRecipe } from '../../orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../workspace-setup/orca-yaml-hook-types' import { ephemeralVmFailure, type EphemeralVmFailure } from './ephemeral-vm-failure-copy' export function getEphemeralVmRecipeResultSchemaVersion(recipe: OrcaVmRecipe): 1 | 2 { diff --git a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-doctor.ts b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-doctor.ts index 95afa73fcaa..1e8f35b36d8 100644 --- a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-doctor.ts +++ b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-doctor.ts @@ -4,7 +4,7 @@ import type { EphemeralVmRecipeDoctorCheck, EphemeralVmRecipeDoctorResult } from './ephemeral-vm-recipes' -import type { OrcaVmRecipe } from '../../orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../workspace-setup/orca-yaml-hook-types' export function doctorEphemeralVmRecipe(args: { repoPath: string diff --git a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-lifecycle-payload.ts b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-lifecycle-payload.ts index ed08a734056..9a32b200820 100644 --- a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-lifecycle-payload.ts +++ b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-lifecycle-payload.ts @@ -1,7 +1,7 @@ import type { EphemeralVmRecipeResult } from './ephemeral-vm-recipes' import type { EphemeralVmRecipeContext } from './ephemeral-vm-recipe-runner' import { quoteShellToken } from './ephemeral-vm-recipe-process' -import type { OrcaVmRecipe } from '../../orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../workspace-setup/orca-yaml-hook-types' export type EphemeralVmRecipeLifecycleMode = 'suspend' | 'resume' | 'destroy' diff --git a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-repo-url.ts b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-repo-url.ts index 4ee0fc8eab3..5a3097c588d 100644 --- a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-repo-url.ts +++ b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-repo-url.ts @@ -1,5 +1,5 @@ import { stripCredentialsFromMessage } from '../../git/remotes/git-remote-error' -import type { OrcaVmRecipe } from '../../orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../workspace-setup/orca-yaml-hook-types' export function getProvisionedRootRecipeRepoUrl( checkoutMode: OrcaVmRecipe['checkoutMode'], diff --git a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-runner.ts b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-runner.ts index 49999962e18..dd846d99815 100644 --- a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-runner.ts +++ b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-runner.ts @@ -1,7 +1,7 @@ import type { spawn } from 'node:child_process' import { randomUUID } from 'node:crypto' import { statSync } from 'node:fs' -import type { OrcaVmRecipe } from '../../orca-yaml-hook-types' +import type { OrcaVmRecipe } from '../../workspace-setup/orca-yaml-hook-types' import { parseEphemeralVmRecipeResult, type EphemeralVmRecipeResult } from './ephemeral-vm-recipes' import { getEphemeralVmRecipeCheckoutModeFailure } from './ephemeral-vm-recipe-checkout-mode' import { pickEphemeralVmFailureCode, type EphemeralVmFailure } from './ephemeral-vm-failure-copy' diff --git a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-step.ts b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-step.ts index 9f523c3ed62..2066e9e49bd 100644 --- a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-step.ts +++ b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-step.ts @@ -1,4 +1,7 @@ -import type { OrcaVmRecipe, OrcaVmRecipeLifecycleMode } from '../../orca-yaml-hook-types' +import type { + OrcaVmRecipe, + OrcaVmRecipeLifecycleMode +} from '../../workspace-setup/orca-yaml-hook-types' import type { EphemeralVmRecipeContext, EphemeralVmRecipeStartArgs diff --git a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-timeouts.ts b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-timeouts.ts index ecdb55470da..fed4009df63 100644 --- a/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-timeouts.ts +++ b/src/shared/remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-timeouts.ts @@ -2,7 +2,7 @@ import type { OrcaVmRecipe, OrcaVmRecipeLifecycleMode, OrcaVmRecipeTimeoutSeconds -} from '../../orca-yaml-hook-types' +} from '../../workspace-setup/orca-yaml-hook-types' const LIFECYCLE_MODES: readonly OrcaVmRecipeLifecycleMode[] = [ 'create', diff --git a/src/shared/remote-runtime/ephemeral-vm-store/ephemeral-vm-workspace-owner.ts b/src/shared/remote-runtime/ephemeral-vm-store/ephemeral-vm-workspace-owner.ts index 8a04fb14f89..09f192213c8 100644 --- a/src/shared/remote-runtime/ephemeral-vm-store/ephemeral-vm-workspace-owner.ts +++ b/src/shared/remote-runtime/ephemeral-vm-store/ephemeral-vm-workspace-owner.ts @@ -1,5 +1,5 @@ import { splitWorktreeId } from '../../worktree/id' -import { normalizeRuntimePathForComparison } from '../../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../file-access/cross-platform-path' import { getEphemeralVmRecipeResultCheckoutMode, getEphemeralVmRecipeResultProjectRoot diff --git a/src/shared/remote-runtime/ephemeral-vm-store/pending-vm-checkouts.ts b/src/shared/remote-runtime/ephemeral-vm-store/pending-vm-checkouts.ts index 539d1c070ba..2d388915f21 100644 --- a/src/shared/remote-runtime/ephemeral-vm-store/pending-vm-checkouts.ts +++ b/src/shared/remote-runtime/ephemeral-vm-store/pending-vm-checkouts.ts @@ -1,5 +1,5 @@ import * as z from 'zod' -import { normalizeRuntimePathForComparison } from '../../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../file-access/cross-platform-path' /** A VM's primary checkout, registered on its host before the create that owns it finishes. */ export type PendingVmCheckout = { repoId: string; path: string } diff --git a/src/shared/local-build-compatibility-contract.json b/src/shared/remote-runtime/orcad-distribution/local-build-compatibility-contract.json similarity index 100% rename from src/shared/local-build-compatibility-contract.json rename to src/shared/remote-runtime/orcad-distribution/local-build-compatibility-contract.json diff --git a/src/shared/remote-runtime/protocol/host-runtime-capabilities.ts b/src/shared/remote-runtime/protocol/host-runtime-capabilities.ts index cdf4404f1be..19351221773 100644 --- a/src/shared/remote-runtime/protocol/host-runtime-capabilities.ts +++ b/src/shared/remote-runtime/protocol/host-runtime-capabilities.ts @@ -1,7 +1,7 @@ import { MANAGED_RUNTIME_INSTALL_RUNTIME_CAPABILITY, MANAGED_RUNTIME_REMOVE_RUNTIME_CAPABILITY -} from '../../managed-runtime-install' +} from '../../agent-launch/installation/managed-runtime-install' import { REMOTE_SERVER_UPDATE_CAPABILITY } from '../host-catalog/remote-server-update' import { SSH_TARGET_MANAGEMENT_RUNTIME_CAPABILITY } from '../ssh/ssh-target-management' import { ENVIRONMENT_DOCTOR_RUNTIME_CAPABILITY } from '../../workspace-setup/environment-doctor/environment-doctor-runtime' diff --git a/src/shared/repository/repo-types.ts b/src/shared/repository/repo-types.ts index 0438833bb98..15ff1c81dc7 100644 --- a/src/shared/repository/repo-types.ts +++ b/src/shared/repository/repo-types.ts @@ -2,7 +2,7 @@ import type { DictationTerm } from '../speech/dictation/dictation-dictionary' import type { RepoIcon } from './appearance/repo-icon' import type { GhAccountBinding } from '../github/accounts/account-binding' import type { GitHubRepositoryIdentity } from '../github/repositories/repository-identity' -import type { RepoHookSettings } from '../orca-yaml-hook-types' +import type { RepoHookSettings } from '../workspace-setup/orca-yaml-hook-types' import type { ForkSyncMode } from '../git/remotes/git-fork-sync' import type { GitRemoteIdentity } from '../git/remotes/git-remote-identity' import type { RepoSourceControlAiOverrides } from '../source-control/ai/settings/source-control-ai-settings-types' diff --git a/src/shared/rpc-contract/client-ui/client-settings-params.ts b/src/shared/rpc-contract/client-ui/client-settings-params.ts index 21d85641f94..28baef010dc 100644 --- a/src/shared/rpc-contract/client-ui/client-settings-params.ts +++ b/src/shared/rpc-contract/client-ui/client-settings-params.ts @@ -12,7 +12,7 @@ import { normalizePRBotAuthorOverrides } from '../../source-control/review-comme import { WorktreeVisibilityDefaultsUpdate } from '../workspaces/worktree-visibility-defaults-params' import { WorkspaceCleanupRulesParam } from '../workspace-cleanup/workspace-cleanup-policy-params' import { AGENT_CHAT_PERMISSION_MODES } from '../../agent-launch/permissions/agent-chat-permission-mode' -import { PR_AUTO_REFRESH_CADENCES } from '../../review-refresh-policy' +import { PR_AUTO_REFRESH_CADENCES } from '../../source-control/hosted-review/review-refresh-policy' export const TaskProviderParam = z.custom(isTaskProvider, { message: 'Unknown task provider' diff --git a/src/shared/handled-wire-discriminant.ts b/src/shared/rpc-contract/handled-wire-discriminant.ts similarity index 100% rename from src/shared/handled-wire-discriminant.ts rename to src/shared/rpc-contract/handled-wire-discriminant.ts diff --git a/src/shared/integration-credential-errors.ts b/src/shared/secure-storage/integration-credential-errors.ts similarity index 100% rename from src/shared/integration-credential-errors.ts rename to src/shared/secure-storage/integration-credential-errors.ts diff --git a/src/shared/owned-private-directory.ts b/src/shared/secure-storage/owned-private-directory.ts similarity index 100% rename from src/shared/owned-private-directory.ts rename to src/shared/secure-storage/owned-private-directory.ts diff --git a/src/shared/command-token-scanner.ts b/src/shared/shell/command-resolution/command-token-scanner.ts similarity index 100% rename from src/shared/command-token-scanner.ts rename to src/shared/shell/command-resolution/command-token-scanner.ts diff --git a/src/shared/nvm-default-alias.test.ts b/src/shared/shell/command-resolution/nvm-default-alias.test.ts similarity index 96% rename from src/shared/nvm-default-alias.test.ts rename to src/shared/shell/command-resolution/nvm-default-alias.test.ts index 72853464971..d4cc4680e4d 100644 --- a/src/shared/nvm-default-alias.test.ts +++ b/src/shared/shell/command-resolution/nvm-default-alias.test.ts @@ -2,10 +2,7 @@ import { chmodSync, mkdirSync, mkdtempSync, writeFileSync } from 'node:fs' import { tmpdir } from 'node:os' import { join } from 'node:path' import { describe, expect, it } from 'vitest' -import { - getVersionManagerBinPaths, - resolveCliCommand -} from './shell/command-resolution/node-cli-command-resolution' +import { getVersionManagerBinPaths, resolveCliCommand } from './node-cli-command-resolution' /** Default Node seeds fallback when login probing times out or omits nvm. Newest-first hid CLIs installed under the default (#10932). */ function makeNvmHome(options: { diff --git a/src/shared/command-environment.ts b/src/shared/shell/launch/command-environment.ts similarity index 93% rename from src/shared/command-environment.ts rename to src/shared/shell/launch/command-environment.ts index 60d15dcf87e..92d6b6990d4 100644 --- a/src/shared/command-environment.ts +++ b/src/shared/shell/launch/command-environment.ts @@ -1,4 +1,4 @@ -import { processEnvWithoutAgentSession } from './agent-launch/startup/parent-agent-session-env' +import { processEnvWithoutAgentSession } from '../../agent-launch/startup/parent-agent-session-env' /** Leading assignments are data, never shell expressions. */ export function extractLeadingEnvAssignments(tokens: string[]): { diff --git a/src/shared/orca-cli-shell-path.ts b/src/shared/shell/launch/orca-cli-shell-path.ts similarity index 100% rename from src/shared/orca-cli-shell-path.ts rename to src/shared/shell/launch/orca-cli-shell-path.ts diff --git a/src/shared/shell/launch/terminal-startup-cwd.ts b/src/shared/shell/launch/terminal-startup-cwd.ts index 9a77c2084fa..981fbb1185f 100644 --- a/src/shared/shell/launch/terminal-startup-cwd.ts +++ b/src/shared/shell/launch/terminal-startup-cwd.ts @@ -3,7 +3,7 @@ import { isWslUncPathForCallerLinuxPath, normalizeRuntimePathForComparison, resolveRuntimePath -} from '../../cross-platform-path' +} from '../../file-access/cross-platform-path' import { parseWorkspaceKey } from '../../workspace/identity/workspace-scope' import { parseWslUncPath } from '../../file-access/wsl-paths' import { splitWorktreeIdForFilesystem } from '../../worktree/id' diff --git a/src/shared/sidebar-list/sections/project-section-grouping.ts b/src/shared/sidebar-list/sections/project-section-grouping.ts index 1307521a725..45b35ef9611 100644 --- a/src/shared/sidebar-list/sections/project-section-grouping.ts +++ b/src/shared/sidebar-list/sections/project-section-grouping.ts @@ -9,7 +9,7 @@ import { parseWslUncPath } from '../../file-access/wsl-paths' import { isWindowsAbsolutePathLike, normalizeRuntimePathForComparison -} from '../../cross-platform-path' +} from '../../file-access/cross-platform-path' /** The project fields grouping reads. */ export type ProjectSectionProject = Pick diff --git a/src/shared/sidebar-list/sorting/smart-sort.ts b/src/shared/sidebar-list/sorting/smart-sort.ts index 96b2c6c80e7..1b017de5efa 100644 --- a/src/shared/sidebar-list/sorting/smart-sort.ts +++ b/src/shared/sidebar-list/sorting/smart-sort.ts @@ -4,7 +4,7 @@ import type { TerminalLayoutSnapshot, TerminalTab } from '../../workspace-layout import type { Worktree } from '../../worktree/types' import type { MigrationUnsupportedPtyEntry } from '../../agent-status/contracts/agent-status-ipc-payload' import { tabHasLivePty } from '../../tab-has-live-pty' -import { getRuntimePathBasename } from '../../cross-platform-path' +import { getRuntimePathBasename } from '../../file-access/cross-platform-path' import { buildWorkspaceRowComparator, recentActivityWithCreateGrace, diff --git a/src/shared/source-control/ai/generation/commit-message-generation-options.ts b/src/shared/source-control/ai/generation/commit-message-generation-options.ts index 5e707add865..a3623ef85f1 100644 --- a/src/shared/source-control/ai/generation/commit-message-generation-options.ts +++ b/src/shared/source-control/ai/generation/commit-message-generation-options.ts @@ -1,4 +1,4 @@ -import { findOptionOccurrence } from '../../../command-option-occurrence' +import { findOptionOccurrence } from '../../../cli/command-option-occurrence' import { tokenizeCustomCommandTemplate, type CommandTemplateBackslash diff --git a/src/shared/source-control/ai/generation/commit-message-plan.ts b/src/shared/source-control/ai/generation/commit-message-plan.ts index aaec1caf508..ad0185ba92c 100644 --- a/src/shared/source-control/ai/generation/commit-message-plan.ts +++ b/src/shared/source-control/ai/generation/commit-message-plan.ts @@ -2,7 +2,7 @@ import { textGenerationFailure, type TextGenerationFailureFields } from '../../../text-generation-failure-copy' -import { findOptionOccurrence } from '../../../command-option-occurrence' +import { findOptionOccurrence } from '../../../cli/command-option-occurrence' import { planAgentBinary } from '../../../agent-launch/startup/agent-command-plan' import type { CommandTemplateBackslash } from './commit-message-prompt' diff --git a/src/shared/source-control/ai/generation/commit-message-prompt.ts b/src/shared/source-control/ai/generation/commit-message-prompt.ts index f6c8ead8260..db384faa2dc 100644 --- a/src/shared/source-control/ai/generation/commit-message-prompt.ts +++ b/src/shared/source-control/ai/generation/commit-message-prompt.ts @@ -1,4 +1,4 @@ -import { extractLeadingEnvAssignments } from '../../../command-environment' +import { extractLeadingEnvAssignments } from '../../../shell/launch/command-environment' // Share prompt wording between renderer preview/tests and main generation. const COMMIT_MESSAGE_BASE_PROMPT = `You are generating a single git commit message. diff --git a/src/shared/source-control/ai/generation/commit-message-recipe-options.ts b/src/shared/source-control/ai/generation/commit-message-recipe-options.ts index b22e4d42ce1..c2f288b0343 100644 --- a/src/shared/source-control/ai/generation/commit-message-recipe-options.ts +++ b/src/shared/source-control/ai/generation/commit-message-recipe-options.ts @@ -1,4 +1,4 @@ -import { findOptionOccurrence } from '../../../command-option-occurrence' +import { findOptionOccurrence } from '../../../cli/command-option-occurrence' import { compactRecipeOptions, findRecipeOption } from './commit-message-generation-options' export function taskPolicyRecipeArgs(agent: string, args: string[]): string[] { diff --git a/src/shared/review-draft-context-error.ts b/src/shared/source-control/ai/generation/review-draft-context-error.ts similarity index 100% rename from src/shared/review-draft-context-error.ts rename to src/shared/source-control/ai/generation/review-draft-context-error.ts diff --git a/src/shared/source-control/ai/recipes/source-control-ai-argument-flags.ts b/src/shared/source-control/ai/recipes/source-control-ai-argument-flags.ts index a1e1c1ccfbf..e15593a7c97 100644 --- a/src/shared/source-control/ai/recipes/source-control-ai-argument-flags.ts +++ b/src/shared/source-control/ai/recipes/source-control-ai-argument-flags.ts @@ -1,5 +1,5 @@ import type { CommitMessageAgentSpec } from '../generation/commit-message-agent-spec' -import { findOptionOccurrence } from '../../../command-option-occurrence' +import { findOptionOccurrence } from '../../../cli/command-option-occurrence' import { agentRequiredValueOptions } from '../../../agent-session/options/launch/agent-session-option-agent-args' import { KIMI_VALUE_OPTIONS } from '../generation/commit-message-generation-options' import { diff --git a/src/shared/auto-rename-branch-from-work-settings.ts b/src/shared/source-control/ai/settings/auto-rename-branch-from-work-settings.ts similarity index 91% rename from src/shared/auto-rename-branch-from-work-settings.ts rename to src/shared/source-control/ai/settings/auto-rename-branch-from-work-settings.ts index 1df72fbf105..cf3703823df 100644 --- a/src/shared/auto-rename-branch-from-work-settings.ts +++ b/src/shared/source-control/ai/settings/auto-rename-branch-from-work-settings.ts @@ -1,4 +1,4 @@ -import type { GlobalSettings } from './global-settings-types' +import type { GlobalSettings } from '../../../global-settings-types' type AutoRenameBranchFromWorkSettings = Pick< GlobalSettings, diff --git a/src/shared/source-control/checks/gitlab/gitlab-job-log-excerpt.ts b/src/shared/source-control/checks/gitlab/gitlab-job-log-excerpt.ts index 234cdfac572..ac8a0d886a2 100644 --- a/src/shared/source-control/checks/gitlab/gitlab-job-log-excerpt.ts +++ b/src/shared/source-control/checks/gitlab/gitlab-job-log-excerpt.ts @@ -1,6 +1,6 @@ import { stripAnsiEscapeSequences } from '../../../terminal/protocol/escape/ansi-escape-sequences' import { sliceCheckLogTail } from '../logs/check-job-log-tail-slice' -import type { GitLabJobTraceResult } from '../../../gitlab-types' +import type { GitLabJobTraceResult } from '../../../gitlab/gitlab-types' // GitLab wraps collapsible sections in `section_start::\r0K`; // strip only through the CR so the human-readable header on the same line survives. diff --git a/src/shared/source-control/checks/gitlab/gitlab-pipeline-checks.ts b/src/shared/source-control/checks/gitlab/gitlab-pipeline-checks.ts index 2ff62564000..5b82a20ca3e 100644 --- a/src/shared/source-control/checks/gitlab/gitlab-pipeline-checks.ts +++ b/src/shared/source-control/checks/gitlab/gitlab-pipeline-checks.ts @@ -1,4 +1,4 @@ -import type { GitLabPipeline, GitLabPipelineJob } from '../../../gitlab-types' +import type { GitLabPipeline, GitLabPipelineJob } from '../../../gitlab/gitlab-types' import type { PRCheckDetail } from '../../../github/checks/check-types' import type { CheckStatus } from '../../../github/pull-requests/pull-request-types' import { checkRunTimes } from '../pr-check-time' diff --git a/src/shared/code-host-failure-copy.ts b/src/shared/source-control/code-host-failure-copy.ts similarity index 98% rename from src/shared/code-host-failure-copy.ts rename to src/shared/source-control/code-host-failure-copy.ts index cf1343ecc2c..58794cdc6e1 100644 --- a/src/shared/code-host-failure-copy.ts +++ b/src/shared/source-control/code-host-failure-copy.ts @@ -1,4 +1,4 @@ -import type { ClassifiedError } from './classified-error' +import type { ClassifiedError } from '../errors/classified-error' // One English table for GitHub/GitLab operation failures: main builds the wire `error`, the renderer translates by code. export const CODE_HOST_FAILURE_COPY = { diff --git a/src/shared/source-control/hosted-review/hosted-review-refs.test.ts b/src/shared/source-control/hosted-review/hosted-review-refs.test.ts index f790bc58659..dc9186a2a42 100644 --- a/src/shared/source-control/hosted-review/hosted-review-refs.test.ts +++ b/src/shared/source-control/hosted-review/hosted-review-refs.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import { isRemoteHeadRef, normalizeCreateReviewBaseSearchResults } from './hosted-review-refs' -import { legacyBaseRefSearchResult } from '../../base-ref-search-result' +import { legacyBaseRefSearchResult } from '../../worktree/base-refs/base-ref-search-result' it('normalizes old-server refs-only replies before treating provider details as authoritative', () => { expect( diff --git a/src/shared/review-refresh-policy.ts b/src/shared/source-control/hosted-review/review-refresh-policy.ts similarity index 97% rename from src/shared/review-refresh-policy.ts rename to src/shared/source-control/hosted-review/review-refresh-policy.ts index a5ae5816042..c90c45d8336 100644 --- a/src/shared/review-refresh-policy.ts +++ b/src/shared/source-control/hosted-review/review-refresh-policy.ts @@ -1,5 +1,5 @@ -import type { HostedReviewState } from './source-control/hosted-review/hosted-review-contracts' -import type { CheckStatus } from './github/pull-requests/pull-request-types' +import type { HostedReviewState } from './hosted-review-contracts' +import type { CheckStatus } from '../../github/pull-requests/pull-request-types' export const REVIEW_REFRESH_COOLDOWN_MS = 10_000 export const CLOSED_REVIEW_REFRESH_INTERVAL_MS = 15 * 60_000 diff --git a/src/shared/source-control/listing/source-control-tree.ts b/src/shared/source-control/listing/source-control-tree.ts index 5bee4fd8c10..33a55a537fa 100644 --- a/src/shared/source-control/listing/source-control-tree.ts +++ b/src/shared/source-control/listing/source-control-tree.ts @@ -1,4 +1,4 @@ -import { normalizeRelativePath, splitPathSegments } from '../../cross-platform-path' +import { normalizeRelativePath, splitPathSegments } from '../../file-access/cross-platform-path' import type { GitStagingArea, GitStatusEntry } from '../../git/status/git-status-types' import { compareFileNames } from '../../file-listing/file-name-sort' import { compareGitStatusEntries } from '../../git/status/git-status-sort' diff --git a/src/shared/telemetry/schemas/telemetry-app-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-app-event-schemas.ts index 8e50d627488..37276dbf745 100644 --- a/src/shared/telemetry/schemas/telemetry-app-event-schemas.ts +++ b/src/shared/telemetry/schemas/telemetry-app-event-schemas.ts @@ -1,5 +1,5 @@ import { z } from 'zod' -import { appStarSourceSchema } from '../../gh-star-source' +import { appStarSourceSchema } from '../../github/repositories/gh-star-source' import { FEATURE_INTERACTION_CATEGORIES, getFeatureInteractionCategory diff --git a/src/shared/terminal/input/image-path-paste.ts b/src/shared/terminal/input/image-path-paste.ts index 8313ed01d92..93412e738e7 100644 --- a/src/shared/terminal/input/image-path-paste.ts +++ b/src/shared/terminal/input/image-path-paste.ts @@ -1,4 +1,4 @@ -import { isWindowsAbsolutePathLike } from '../../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../file-access/cross-platform-path' import { IMAGE_FILE_EXTENSIONS } from '../../file-preview/image-mime-types' import { shellEscapePath } from '../../shell/launch/shell-path-quoting' import { isWslUncPath } from '../../file-access/wsl-paths' diff --git a/src/shared/terminal/links/terminal-markdown-file-links.ts b/src/shared/terminal/links/terminal-markdown-file-links.ts index 46be856dc44..2a8830663ad 100644 --- a/src/shared/terminal/links/terminal-markdown-file-links.ts +++ b/src/shared/terminal/links/terminal-markdown-file-links.ts @@ -1,4 +1,4 @@ -import { isWindowsAbsolutePathLike } from '../../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../file-access/cross-platform-path' import { routeNativeChatHref } from '../../native-chat/native-chat-href-routing' import { parseExplicitFileLinkTarget } from '../../file-links/explicit-file-link-target' import { detectTerminalFileUriLinks } from './terminal-file-uri-link' diff --git a/src/shared/terminal/links/terminal-osc-link-target.ts b/src/shared/terminal/links/terminal-osc-link-target.ts index 9fc7d106a6b..d75c8410661 100644 --- a/src/shared/terminal/links/terminal-osc-link-target.ts +++ b/src/shared/terminal/links/terminal-osc-link-target.ts @@ -1,4 +1,4 @@ -import { isWindowsAbsolutePathLike } from '../../cross-platform-path' +import { isWindowsAbsolutePathLike } from '../../file-access/cross-platform-path' import { resolveTerminalFileUrlTarget, type TerminalFileUrlTarget diff --git a/src/shared/terminal/pty/native-process/shell-process-readiness.ts b/src/shared/terminal/pty/native-process/shell-process-readiness.ts index 64823e38508..c5caedb2720 100644 --- a/src/shared/terminal/pty/native-process/shell-process-readiness.ts +++ b/src/shared/terminal/pty/native-process/shell-process-readiness.ts @@ -4,7 +4,7 @@ import { access, readlink, realpath, stat } from 'node:fs/promises' import { delimiter, isAbsolute, resolve } from 'node:path' import { promisify } from 'node:util' import { runProcess } from '@orca/process-host' -import { LSOF_NONBLOCKING_ARGS } from '../../../lsof-nonblocking-args' +import { LSOF_NONBLOCKING_ARGS } from '../../../process-observation/lsof-nonblocking-args' import { readLibprocProcessFilePath } from '../../../process-observation/darwin/libproc-addon' import { readPsStdoutInProcess } from '../../../process-observation/darwin/libproc-process-table' import { PS_MAX_BUFFER_BYTES } from '../../../process-observation/tables/process-table-snapshot' diff --git a/src/shared/text-generation/launch/opencode-generation-command.ts b/src/shared/text-generation/launch/opencode-generation-command.ts index 2edf13b02d8..eeb5b0a4a72 100644 --- a/src/shared/text-generation/launch/opencode-generation-command.ts +++ b/src/shared/text-generation/launch/opencode-generation-command.ts @@ -1,4 +1,4 @@ -import { findOptionOccurrence } from '../../command-option-occurrence' +import { findOptionOccurrence } from '../../cli/command-option-occurrence' import type { CommitMessagePlan } from '../../source-control/ai/generation/commit-message-plan' export function isDirectOpenCodeGenerationCommand(binary: string, prefixArgs: string[]): boolean { diff --git a/src/shared/text/emoji-shortcode-catalog.ts b/src/shared/text/emoji-shortcode-catalog.ts index d29f6849bbe..26e52ce78f7 100644 --- a/src/shared/text/emoji-shortcode-catalog.ts +++ b/src/shared/text/emoji-shortcode-catalog.ts @@ -94,3 +94,9 @@ function hexcodeToEmoji(hexcode: string): string { .map((codepoint) => String.fromCodePoint(Number.parseInt(codepoint, 16))) .join('') } + +export function containsEmoji(input: string): boolean { + return /[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\u20e3]/u.test( + input + ) +} diff --git a/src/shared/format-bytes.ts b/src/shared/text/format-bytes.ts similarity index 100% rename from src/shared/format-bytes.ts rename to src/shared/text/format-bytes.ts diff --git a/src/shared/issue-mutation-types.ts b/src/shared/work-items/issue-mutation-types.ts similarity index 100% rename from src/shared/issue-mutation-types.ts rename to src/shared/work-items/issue-mutation-types.ts diff --git a/src/shared/work-items/work-item-empty-page.ts b/src/shared/work-items/work-item-empty-page.ts index 60fbf0fe243..fea58f9b017 100644 --- a/src/shared/work-items/work-item-empty-page.ts +++ b/src/shared/work-items/work-item-empty-page.ts @@ -1,4 +1,4 @@ -import type { ClassifiedError } from '../classified-error' +import type { ClassifiedError } from '../errors/classified-error' export type EmptyPageOutcome = { reason: 'window-unreachable' | 'load-failed' | 'end-of-data' diff --git a/src/shared/workspace-session/terminal-session-state-save-failure.ts b/src/shared/workspace-session/terminal-session-state-save-failure.ts index 48bc232d090..d4d24549bb2 100644 --- a/src/shared/workspace-session/terminal-session-state-save-failure.ts +++ b/src/shared/workspace-session/terminal-session-state-save-failure.ts @@ -1,4 +1,4 @@ -import { storageCapacityErrorCode } from '../storage-capacity-error' +import { storageCapacityErrorCode } from '../errors/storage-capacity-error' export const TERMINAL_SESSION_STATE_SAVE_FAILED_CODE = 'ORCA_TERMINAL_SESSION_STATE_SAVE_FAILED' diff --git a/src/shared/hook-command-source-policy.ts b/src/shared/workspace-setup/hooks/hook-command-source-policy.ts similarity index 83% rename from src/shared/hook-command-source-policy.ts rename to src/shared/workspace-setup/hooks/hook-command-source-policy.ts index 1299a91f447..264892ea739 100644 --- a/src/shared/hook-command-source-policy.ts +++ b/src/shared/workspace-setup/hooks/hook-command-source-policy.ts @@ -1,4 +1,4 @@ -import type { HookCommandSourcePolicy } from './orca-yaml-hook-types' +import type { HookCommandSourcePolicy } from '../orca-yaml-hook-types' export function resolveHookCommandSourcePolicy( policy: unknown, diff --git a/src/shared/orca-hook-setup-config.test.ts b/src/shared/workspace-setup/hooks/orca-hook-setup-config.test.ts similarity index 100% rename from src/shared/orca-hook-setup-config.test.ts rename to src/shared/workspace-setup/hooks/orca-hook-setup-config.test.ts diff --git a/src/shared/orca-hook-setup-config.ts b/src/shared/workspace-setup/hooks/orca-hook-setup-config.ts similarity index 97% rename from src/shared/orca-hook-setup-config.ts rename to src/shared/workspace-setup/hooks/orca-hook-setup-config.ts index a9b0ca830dc..92faa22d186 100644 --- a/src/shared/orca-hook-setup-config.ts +++ b/src/shared/workspace-setup/hooks/orca-hook-setup-config.ts @@ -1,5 +1,5 @@ import { resolveHookCommandSourcePolicy } from './hook-command-source-policy' -import type { OrcaHooks, SetupRunPolicy } from './orca-yaml-hook-types' +import type { OrcaHooks, SetupRunPolicy } from '../orca-yaml-hook-types' export type SetupConfig = { source: 'yaml' | 'local' | 'both' diff --git a/src/shared/orca-hook-trust-entries.ts b/src/shared/workspace-setup/hooks/orca-hook-trust-entries.ts similarity index 98% rename from src/shared/orca-hook-trust-entries.ts rename to src/shared/workspace-setup/hooks/orca-hook-trust-entries.ts index 9fbed51b2cb..34940086854 100644 --- a/src/shared/orca-hook-trust-entries.ts +++ b/src/shared/workspace-setup/hooks/orca-hook-trust-entries.ts @@ -1,7 +1,7 @@ import type { PersistedTrustedOrcaHookRepo, PersistedTrustedOrcaHooks -} from './orca-yaml-hook-types' +} from '../orca-yaml-hook-types' export type OrcaHookTrustKind = Exclude diff --git a/src/shared/orca-yaml-alias-bounds.test.ts b/src/shared/workspace-setup/orca-yaml-alias-bounds.test.ts similarity index 100% rename from src/shared/orca-yaml-alias-bounds.test.ts rename to src/shared/workspace-setup/orca-yaml-alias-bounds.test.ts diff --git a/src/shared/orca-yaml-bounds.test.ts b/src/shared/workspace-setup/orca-yaml-bounds.test.ts similarity index 100% rename from src/shared/orca-yaml-bounds.test.ts rename to src/shared/workspace-setup/orca-yaml-bounds.test.ts diff --git a/src/shared/orca-yaml-file-limit.ts b/src/shared/workspace-setup/orca-yaml-file-limit.ts similarity index 92% rename from src/shared/orca-yaml-file-limit.ts rename to src/shared/workspace-setup/orca-yaml-file-limit.ts index 578e98fb653..8e2fde79859 100644 --- a/src/shared/orca-yaml-file-limit.ts +++ b/src/shared/workspace-setup/orca-yaml-file-limit.ts @@ -1,4 +1,4 @@ -import { measureUtf8ByteLength } from './text/utf8-byte-limits' +import { measureUtf8ByteLength } from '../text/utf8-byte-limits' export const MAX_ORCA_YAML_BYTES = 256 * 1024 export const MAX_ORCA_YAML_CODE_UNITS = 256 * 1024 diff --git a/src/shared/orca-yaml-hook-types.ts b/src/shared/workspace-setup/orca-yaml-hook-types.ts similarity index 100% rename from src/shared/orca-yaml-hook-types.ts rename to src/shared/workspace-setup/orca-yaml-hook-types.ts diff --git a/src/shared/orca-yaml-merge-expansion.ts b/src/shared/workspace-setup/orca-yaml-merge-expansion.ts similarity index 100% rename from src/shared/orca-yaml-merge-expansion.ts rename to src/shared/workspace-setup/orca-yaml-merge-expansion.ts diff --git a/src/shared/orca-yaml.ts b/src/shared/workspace-setup/orca-yaml.ts similarity index 97% rename from src/shared/orca-yaml.ts rename to src/shared/workspace-setup/orca-yaml.ts index cd09f6b6e20..305bdf22ad6 100644 --- a/src/shared/orca-yaml.ts +++ b/src/shared/workspace-setup/orca-yaml.ts @@ -12,8 +12,8 @@ import { MAX_ORCA_YAML_ALIAS_COUNT, MAX_ORCA_YAML_COLLECTION_ENTRIES } from './orca-yaml-file-limit' -import { parseEphemeralVmRecipeTimeoutSeconds } from './remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-timeouts' -import { parseRecipePassEnv } from './remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-env' +import { parseEphemeralVmRecipeTimeoutSeconds } from '../remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-timeouts' +import { parseRecipePassEnv } from '../remote-runtime/ephemeral-vm-recipes/ephemeral-vm-recipe-env' function asRecord(value: unknown): Record | null { return value !== null && typeof value === 'object' && !Array.isArray(value) diff --git a/src/shared/workspace-setup/setup-script-import-parsers.ts b/src/shared/workspace-setup/setup-script-import-parsers.ts index 783a342ada4..2cb50e5a64d 100644 --- a/src/shared/workspace-setup/setup-script-import-parsers.ts +++ b/src/shared/workspace-setup/setup-script-import-parsers.ts @@ -1,8 +1,8 @@ import { parse as parseJsonc, type ParseError } from 'jsonc-parser' import { parse as parseToml } from 'smol-toml' import { parseDocument } from 'yaml' -import { MAX_ORCA_YAML_ALIAS_COUNT } from '../orca-yaml-file-limit' -import { isOrcaYamlConversionWithinLimit } from '../orca-yaml-merge-expansion' +import { MAX_ORCA_YAML_ALIAS_COUNT } from './orca-yaml-file-limit' +import { isOrcaYamlConversionWithinLimit } from './orca-yaml-merge-expansion' // Data-only parsers: imports never evaluate repo content, they only read values out of it. diff --git a/src/shared/base-ref-search-result.ts b/src/shared/worktree/base-refs/base-ref-search-result.ts similarity index 92% rename from src/shared/base-ref-search-result.ts rename to src/shared/worktree/base-refs/base-ref-search-result.ts index 194cdf1e491..811252313c0 100644 --- a/src/shared/base-ref-search-result.ts +++ b/src/shared/worktree/base-refs/base-ref-search-result.ts @@ -1,4 +1,4 @@ -import type { BaseRefSearchResult } from './repository/repo-types' +import type { BaseRefSearchResult } from '../../repository/repo-types' const LEGACY_REMOTE_REF_PREFIXES = ['origin/', 'upstream/'] diff --git a/src/shared/cli-workspace-provenance.ts b/src/shared/worktree/creation/cli-workspace-provenance.ts similarity index 84% rename from src/shared/cli-workspace-provenance.ts rename to src/shared/worktree/creation/cli-workspace-provenance.ts index 24b072d8e80..18c6d5f2875 100644 --- a/src/shared/cli-workspace-provenance.ts +++ b/src/shared/worktree/creation/cli-workspace-provenance.ts @@ -1,5 +1,5 @@ -import type { TuiAgent } from './agent-launch/catalog/tui-agent' -import type { CliWorkspaceProvenance } from './worktree/types' +import type { TuiAgent } from '../../agent-launch/catalog/tui-agent' +import type { CliWorkspaceProvenance } from '../types' /** CLI create context is descriptive; host-stamped createdAt prevents skewed client clocks changing sort order. */ export type CliWorkspaceProvenanceRequest = { diff --git a/src/shared/worktree/creation/launch-types.ts b/src/shared/worktree/creation/launch-types.ts index fb502db3491..3a6c397d39c 100644 --- a/src/shared/worktree/creation/launch-types.ts +++ b/src/shared/worktree/creation/launch-types.ts @@ -6,7 +6,7 @@ import type { } from '../../telemetry/schemas/telemetry-property-schemas' import type { SleepingAgentLaunchConfig } from '../../agent-session/lifecycle/agent-session-resume' import type { SetupRunnerShell } from '../../agent-launch/startup/setup-runner-command' -import type { OrcaDefaultTabTemplate } from '../../orca-yaml-hook-types' +import type { OrcaDefaultTabTemplate } from '../../workspace-setup/orca-yaml-hook-types' import type { TuiAgent } from '../../agent-launch/catalog/tui-agent' export type WorktreeSetupLaunch = { diff --git a/src/shared/review-head-tracking-ref.ts b/src/shared/worktree/hosted-review/review-head-tracking-ref.ts similarity index 100% rename from src/shared/review-head-tracking-ref.ts rename to src/shared/worktree/hosted-review/review-head-tracking-ref.ts diff --git a/src/shared/review-start-point-failure-copy.ts b/src/shared/worktree/hosted-review/review-start-point-failure-copy.ts similarity index 100% rename from src/shared/review-start-point-failure-copy.ts rename to src/shared/worktree/hosted-review/review-start-point-failure-copy.ts diff --git a/src/shared/worktree/id.ts b/src/shared/worktree/id.ts index f10beb54a53..ea3f59cf8dd 100644 --- a/src/shared/worktree/id.ts +++ b/src/shared/worktree/id.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../file-access/cross-platform-path' import { WORKTREE_ID_SEPARATOR } from '../terminal/pty/lifecycle/pty-session-id-format' import type { Repo } from '../repository/repo-types' diff --git a/src/shared/worktree/meta-types.ts b/src/shared/worktree/meta-types.ts index ae97e685333..8b1618540a8 100644 --- a/src/shared/worktree/meta-types.ts +++ b/src/shared/worktree/meta-types.ts @@ -1,6 +1,6 @@ import type { ExecutionHostId } from '../execution-host' import type { TaskSourceContext } from '../work-items/task-source-context' -import type { EphemeralVmCheckoutMode } from '../orca-yaml-hook-types' +import type { EphemeralVmCheckoutMode } from '../workspace-setup/orca-yaml-hook-types' import type { AutomationWorkspaceProvenance, CliWorkspaceProvenance, diff --git a/src/shared/worktree/metadata/display-name-provenance.ts b/src/shared/worktree/metadata/display-name-provenance.ts index 36621e5d7c3..6883c3edf7e 100644 --- a/src/shared/worktree/metadata/display-name-provenance.ts +++ b/src/shared/worktree/metadata/display-name-provenance.ts @@ -1,4 +1,4 @@ -import { getRuntimePathBasename } from '../../cross-platform-path' +import { getRuntimePathBasename } from '../../file-access/cross-platform-path' /** A rename with text pins the label; empty text returns it to automatic (branch-derived). */ export function displayNameUpdatePinsLabel(displayName: string | undefined): boolean { diff --git a/src/shared/worktree/paths/configured-worktree-base-path.ts b/src/shared/worktree/paths/configured-worktree-base-path.ts index 1f41f3a7488..d90bcc9f28c 100644 --- a/src/shared/worktree/paths/configured-worktree-base-path.ts +++ b/src/shared/worktree/paths/configured-worktree-base-path.ts @@ -3,7 +3,7 @@ import { isWindowsAbsolutePathLike, normalizeRuntimePathSeparators, resolveRuntimePath -} from '../../cross-platform-path' +} from '../../file-access/cross-platform-path' import type { Repo } from '../../repository/repo-types' import { resolveWslRepoWorktreeBasePath } from '../../file-access/wsl-paths' diff --git a/src/shared/worktree/paths/workspace-dir-input.ts b/src/shared/worktree/paths/workspace-dir-input.ts index d175994979a..b0e69303fa0 100644 --- a/src/shared/worktree/paths/workspace-dir-input.ts +++ b/src/shared/worktree/paths/workspace-dir-input.ts @@ -1,4 +1,4 @@ -import { isRuntimePathAbsolute } from '../../cross-platform-path' +import { isRuntimePathAbsolute } from '../../file-access/cross-platform-path' /** Leading whitespace before an absolute or home path makes readers resolve it inside every repo (STA-14308). */ export function normalizeWorkspaceDirInput(value: string, isWindowsHost: boolean): string { diff --git a/src/shared/worktree/types.ts b/src/shared/worktree/types.ts index 511adcc3657..f4dd6350218 100644 --- a/src/shared/worktree/types.ts +++ b/src/shared/worktree/types.ts @@ -4,7 +4,7 @@ import type { AutomationExecutionTargetType } from '../automations/automation-de import type { TaskSourceContext } from '../work-items/task-source-context' import type { TuiAgent } from '../agent-launch/catalog/tui-agent' import type { DiffComment, MobileDiffReviewState } from '../file-review/diff-comment-types' -import type { EphemeralVmCheckoutMode } from '../orca-yaml-hook-types' +import type { EphemeralVmCheckoutMode } from '../workspace-setup/orca-yaml-hook-types' import type { BuiltInWorktreeVisibilitySourceId } from '../repository/repo-types' import type { WorktreeIdentity } from './identity' import type { WorktreeScanFailureKind } from './catalog/worktree-scan-failure' diff --git a/src/shared/worktree/visibility/agent-scratch-worktrees.ts b/src/shared/worktree/visibility/agent-scratch-worktrees.ts index d08bf452bf6..4002c7f5578 100644 --- a/src/shared/worktree/visibility/agent-scratch-worktrees.ts +++ b/src/shared/worktree/visibility/agent-scratch-worktrees.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../file-access/cross-platform-path' import { createWorktreeVisibilitySourceMatcher, type WorktreeVisibilitySourceMatcher diff --git a/src/shared/worktree/visibility/external-worktree-inbox.ts b/src/shared/worktree/visibility/external-worktree-inbox.ts index 5d17eed9751..8be1c6bb7f6 100644 --- a/src/shared/worktree/visibility/external-worktree-inbox.ts +++ b/src/shared/worktree/visibility/external-worktree-inbox.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathForComparison } from '../../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../../file-access/cross-platform-path' import type { WorktreeVisibilityDefaults, Repo } from '../../repository/repo-types' import type { DetectedWorktree, DetectedWorktreeListResult } from '../types' import { diff --git a/src/shared/worktree/visibility/external-worktree-visibility.ts b/src/shared/worktree/visibility/external-worktree-visibility.ts index 0d4f800829d..ec28a81abd3 100644 --- a/src/shared/worktree/visibility/external-worktree-visibility.ts +++ b/src/shared/worktree/visibility/external-worktree-visibility.ts @@ -1,4 +1,4 @@ -import { normalizeRuntimePathSeparators } from '../../cross-platform-path' +import { normalizeRuntimePathSeparators } from '../../file-access/cross-platform-path' import { normalizeCustomWorktreeVisibilitySources, normalizeWorktreeVisibilitySourcePreferences diff --git a/src/shared/worktree/visibility/ownership.ts b/src/shared/worktree/visibility/ownership.ts index 58215a967cb..4b7989d050d 100644 --- a/src/shared/worktree/visibility/ownership.ts +++ b/src/shared/worktree/visibility/ownership.ts @@ -1,7 +1,7 @@ import { normalizeRuntimePathForComparison, relativePathInsideRoot -} from '../../cross-platform-path' +} from '../../file-access/cross-platform-path' import { parseWslUncPath } from '../../file-access/wsl-paths' import { isRuntimePathAbsoluteForRepo, diff --git a/src/shared/worktree/visibility/visibility-sources.ts b/src/shared/worktree/visibility/visibility-sources.ts index 6888a5899ca..c8114befadb 100644 --- a/src/shared/worktree/visibility/visibility-sources.ts +++ b/src/shared/worktree/visibility/visibility-sources.ts @@ -2,7 +2,7 @@ import { createNormalizedPathInsideOrEqualMatcher, isRuntimePathAbsolute, normalizeRuntimePathForComparison -} from '../../cross-platform-path' +} from '../../file-access/cross-platform-path' import type { BuiltInWorktreeVisibilitySourceId, CustomWorktreeVisibilitySource, diff --git a/src/shared/wsl-move/wsl-drive-unc-renderer-store-keys.ts b/src/shared/wsl-move/wsl-drive-unc-renderer-store-keys.ts index 19b41c031d2..8450f6ef7a8 100644 --- a/src/shared/wsl-move/wsl-drive-unc-renderer-store-keys.ts +++ b/src/shared/wsl-move/wsl-drive-unc-renderer-store-keys.ts @@ -3,7 +3,7 @@ * the entry is not one. Same stores and key shapes as the WSL move's renderer rewrite * (renderer/src/lib/wsl-move-renderer-store-keys.ts), but the project stays on this computer. */ -import { normalizeRuntimePathForComparison } from '../cross-platform-path' +import { normalizeRuntimePathForComparison } from '../file-access/cross-platform-path' import { LOCAL_EXECUTION_HOST_ID } from '../execution-host' import type { PythonEnvironment } from '../editor/notebooks/notebook-kernel-types' import { wslUncDrivePathToWindows } from '../file-access/wsl-paths' diff --git a/tests/e2e/github-pr-hosted-receipt-loop.unit.test.ts b/tests/e2e/github-pr-hosted-receipt-loop.unit.test.ts index 53d8b1e320f..24610ba73a5 100644 --- a/tests/e2e/github-pr-hosted-receipt-loop.unit.test.ts +++ b/tests/e2e/github-pr-hosted-receipt-loop.unit.test.ts @@ -282,125 +282,3 @@ it('applies data-bearing retry replies to both clients and sends selection after } } }) - -it('holds a return under Minimal until the host’s real Retry-After on the request, then reads once', async () => { - const { - createTestStore, - makePRRefreshWorktree, - resetRemoteRuntimeMocks, - runtimeEnvironmentCall - } = await import('../../src/renderer/src/store/github/github-slice-test-harness') - const { getVisibleHostedReviewRefreshTargets } = - await import('../../src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-targets') - const { createVisibleHostedReviewRefreshScheduler } = - await import('../../src/renderer/src/store/slices/hosted-review/refresh/visible-hosted-review-refresh-scheduler') - const { PrForBranch } = - await import('../../src/shared/rpc-contract/github/github-pull-request-params') - const policy = await import('../../src/shared/review-refresh-policy') - const coordinator = - await import('../../src/main/github/pull-requests/refresh/pr-refresh-coordinator') - const seed = await commands.getRepoPRForBranch( - 'repo', - 'held', - 12, - null, - false, - 'head-a', - 'active' - ) - if (!('kind' in seed) || seed.kind !== 'found') { - throw new Error('expected the initial PR') - } - resetRemoteRuntimeMocks() - const store = createTestStore() - store.setState({ - repos: [ - { - id: 'repo', - path: '/repo', - kind: 'git', - executionHostId: 'runtime:env-1', - displayName: 'repo', - badgeColor: 'blue', - addedAt: 0 - } - ], - worktreesByRepo: { - repo: [ - makePRRefreshWorktree({ - id: 'held-worktree', - repoId: 'repo', - branch: 'held', - head: 'head-a', - linkedPR: 12, - hostId: 'runtime:env-1', - runtimeOwnerEnvironmentId: 'env-1' - }) - ] - }, - detectedWorktreesByRepo: {}, - activeWorktreeId: 'held-worktree', - activeWorkspaceExecutionHostId: 'runtime:env-1', - visibleReviewWorktreeIds: ['held-worktree'], - prCache: { 'runtime:env-1::repo::held': { data: seed.pr, fetchedAt: 1_000 } } - }) - // The host runs Minimal: its timer reads every 600 s, Default would every 60 s. - policy.setPRAutoRefreshCadenceForHost('env-1', 'minimal') - const reasons: string[] = [] - runtimeEnvironmentCall.mockImplementation(async (args) => { - if (args.method !== 'github.prForBranch') { - throw new Error('unexpected fixture RPC') - } - reasons.push(PrForBranch.parse(args.params).reason ?? 'missing') - return { id: 'rpc', ok: true, result: await rpcRead(args.params) } - }) - const observed: string[] = [] - const removeObserver = coordinator.addPRRefreshOutcomeObserver((_candidate, outcome) => - observed.push(outcome.kind) - ) - const scheduler = createVisibleHostedReviewRefreshScheduler() - const update = () => - scheduler.update(getVisibleHostedReviewRefreshTargets(store.getState(), store.getState)) - const unsubscribe = store.subscribe(update) - try { - // Shown at 61 s with data a Default interval old, it is read at once; GitHub answers with a - // secondary rate limit and a 300 s Retry-After, while the primary quota stays healthy. - await vi.advanceTimersByTimeAsync(60_000) - expect(getVisibleHostedReviewRefreshTargets(store.getState(), store.getState)).toMatchObject([ - { selected: true, cadence: 'minimal', intervalMs: 600_000, foregroundIntervalMs: 60_000 } - ]) - mocks.resolve.mockRejectedValueOnce( - Object.assign(new Error('gh: HTTP 429'), { - stderr: 'HTTP 429: You have exceeded a secondary rate limit.\nRetry-After: 300' - }) - ) - update() - scheduler.setVisible(true) - await vi.advanceTimersByTimeAsync(0) - expect(reasons).toEqual(['active']) - expect(mocks.resolve).toHaveBeenCalledTimes(2) - const observedAfterFailure = observed.length - - // Hidden, then back at 122 s: Default would retry the failure from 121 s, but the host holds - // this request until 361 s, so neither the return nor anything else reads it sooner. - scheduler.setVisible(false) - await vi.advanceTimersByTimeAsync(61_000) - scheduler.setVisible(true) - await vi.advanceTimersByTimeAsync(0) - expect(reasons).toEqual(['active']) - await vi.advanceTimersByTimeAsync(238_999) - expect(reasons).toEqual(['active']) - expect(mocks.resolve).toHaveBeenCalledTimes(2) - expect(observed).toHaveLength(observedAfterFailure) - - // The owed return reads once, as soon as the hold ends. - await vi.advanceTimersByTimeAsync(1) - expect(reasons).toEqual(['active', 'active']) - expect(mocks.resolve).toHaveBeenCalledTimes(3) - } finally { - removeObserver() - unsubscribe() - scheduler.dispose() - policy._resetPRAutoRefreshCadencesForTests() - } -}) diff --git a/tests/e2e/github-url-smart-input-transition.spec.ts b/tests/e2e/github-url-smart-input-transition.spec.ts index 1ff3a56000f..9995652a928 100644 --- a/tests/e2e/github-url-smart-input-transition.spec.ts +++ b/tests/e2e/github-url-smart-input-transition.spec.ts @@ -1,7 +1,7 @@ import { openSidebarWorkspaceComposer } from './helpers/sidebar-project-dialog' import type { ElectronApplication, Locator, Page } from '@stablyai/playwright-test' import type { GitHubWorkItem } from '../../src/shared/github/work-items/work-item-types' -import type { GitLabWorkItem } from '../../src/shared/gitlab-types' +import type { GitLabWorkItem } from '../../src/shared/gitlab/gitlab-types' import { test, expect } from './helpers/orca-app' import { waitForActiveWorktree, waitForSessionReady } from './helpers/store' diff --git a/tests/e2e/linear-private-images.spec.ts b/tests/e2e/linear-private-images.spec.ts index a593f6a82c5..a9dd89cbb40 100644 --- a/tests/e2e/linear-private-images.spec.ts +++ b/tests/e2e/linear-private-images.spec.ts @@ -3,7 +3,7 @@ import { join } from 'node:path' import type { ElectronApplication, Page } from '@stablyai/playwright-test' import { test, expect } from './helpers/orca-app' import type { LinearIssue } from '../../src/shared/linear/issue-types' -import type { LinearIssueUpdate } from '../../src/shared/issue-mutation-types' +import type { LinearIssueUpdate } from '../../src/shared/work-items/issue-mutation-types' declare global { var __linearImageSaved: LinearIssueUpdate[] | undefined diff --git a/tests/e2e/pr-auto-refresh-setting-order.unit.test.ts b/tests/e2e/pr-auto-refresh-setting-order.unit.test.ts index 842a1b32d49..b689dab3906 100644 --- a/tests/e2e/pr-auto-refresh-setting-order.unit.test.ts +++ b/tests/e2e/pr-auto-refresh-setting-order.unit.test.ts @@ -62,7 +62,7 @@ afterEach(async () => { act(() => root.unmount()) document.body.replaceChildren() const { _resetPRAutoRefreshCadencesForTests } = - await import('../../src/shared/review-refresh-policy') + await import('../../src/shared/source-control/hosted-review/review-refresh-policy') const { _resetHostPRAutoRefreshCadenceGenerationsForTests } = await import('../../src/renderer/src/store/github/refresh/remote-host-pr-auto-refresh-cadence') _resetPRAutoRefreshCadencesForTests() @@ -139,7 +139,7 @@ it('converges after a real late write response revokes a later settings event re const { _hostPRAutoRefreshReadsInFlightForTests } = await import('../../src/renderer/src/store/github/refresh/remote-host-pr-auto-refresh-cadence-sync') const { getKnownPRAutoRefreshCadenceForHost } = - await import('../../src/shared/review-refresh-policy') + await import('../../src/shared/source-control/hosted-review/review-refresh-policy') const { PRAutoRefreshSetting } = await import('../../src/renderer/src/components/settings/source-control/PRAutoRefreshSetting') const subscription = await subscribeRuntimeClientEvents('env-a', () => {})