diff --git a/.github/workflows/adhoc-mac-build.yml b/.github/workflows/adhoc-mac-build.yml index 0391563de52..2587f5a659a 100644 --- a/.github/workflows/adhoc-mac-build.yml +++ b/.github/workflows/adhoc-mac-build.yml @@ -404,7 +404,7 @@ jobs: sparse-checkout: | config/scripts/desktop-distribution/macos/adhoc-mac-manifests.mjs config/scripts/desktop-distribution/macos/gate-mac-update-manifests.mjs - src/shared/macos-darwin-floor.ts + src/shared/updater/requirements/macos-darwin-floor.ts sparse-checkout-cone-mode: false persist-credentials: false diff --git a/config/legacy-relay-compat-tags-baseline.txt b/config/legacy-relay-compat-tags-baseline.txt index 1205054d81f..9745e8602e5 100644 --- a/config/legacy-relay-compat-tags-baseline.txt +++ b/config/legacy-relay-compat-tags-baseline.txt @@ -25,7 +25,7 @@ src/renderer/src/hooks/ipc-events/ssh-managed-server-state-effects.ts src/renderer/src/store/terminals/retirement/legacy-relay-bridged-tab-close.ts src/shared/legacy-relay-bridge-contract.ts src/shared/remote-runtime/ssh/ssh-types.ts -src/shared/telemetry-ssh-host-server-event-schemas.ts +src/shared/telemetry/schemas/telemetry-ssh-host-server-event-schemas.ts tests/e2e/cross-version-wire/legacy-relay-bridge.unit.test.ts tests/e2e/cross-version-wire/released-relay-daemon.ts tests/e2e/cross-version-wire/released-relay-transport.ts diff --git a/config/scripts/assets/feature-wall/check-feature-wall-assets.mjs b/config/scripts/assets/feature-wall/check-feature-wall-assets.mjs index bef0e386c5d..88f2dc114d1 100644 --- a/config/scripts/assets/feature-wall/check-feature-wall-assets.mjs +++ b/config/scripts/assets/feature-wall/check-feature-wall-assets.mjs @@ -4,7 +4,7 @@ import path from 'node:path' import { FEATURE_WALL_TILES, isFeatureWallMediaTile -} from '../../../../src/shared/feature-wall-tiles.ts' +} from '../../../../src/shared/feature-education/explore/feature-wall-tiles.ts' const __dirname = import.meta.dirname const ROOT = path.join(__dirname, '../../..', '..') diff --git a/config/scripts/assets/feature-wall/vendor-feature-wall-assets.mjs b/config/scripts/assets/feature-wall/vendor-feature-wall-assets.mjs index 07941a7ed66..63c821bc544 100644 --- a/config/scripts/assets/feature-wall/vendor-feature-wall-assets.mjs +++ b/config/scripts/assets/feature-wall/vendor-feature-wall-assets.mjs @@ -4,7 +4,7 @@ import { spawnSync } from 'node:child_process' import { homedir, tmpdir } from 'node:os' import path from 'node:path' import { runProcessSync } from '@orca/process-host' -import { FEATURE_WALL_TILES } from '../../../../src/shared/feature-wall-tiles.ts' +import { FEATURE_WALL_TILES } from '../../../../src/shared/feature-education/explore/feature-wall-tiles.ts' import { verifyLosslessFeatureWallMedia } from './verify-feature-wall-lossless-media.mjs' const __dirname = import.meta.dirname diff --git a/config/scripts/assets/feature-wall/verify-feature-wall-lossless-media.mjs b/config/scripts/assets/feature-wall/verify-feature-wall-lossless-media.mjs index 5e25adc5001..54d5f445b4c 100644 --- a/config/scripts/assets/feature-wall/verify-feature-wall-lossless-media.mjs +++ b/config/scripts/assets/feature-wall/verify-feature-wall-lossless-media.mjs @@ -8,7 +8,7 @@ import { runProcessSync } from '@orca/process-host' import { FEATURE_WALL_TILES, isFeatureWallMediaTile -} from '../../../../src/shared/feature-wall-tiles.ts' +} from '../../../../src/shared/feature-education/explore/feature-wall-tiles.ts' const ROOT = path.resolve(import.meta.dirname, '../../..', '..') const ASSET_DIR = 'resources/onboarding/feature-wall' diff --git a/config/scripts/ci/unit-selection/dependency-graph/ci-unit-input-ownership.json b/config/scripts/ci/unit-selection/dependency-graph/ci-unit-input-ownership.json index b4934fc5624..55f18c86b37 100644 --- a/config/scripts/ci/unit-selection/dependency-graph/ci-unit-input-ownership.json +++ b/config/scripts/ci/unit-selection/dependency-graph/ci-unit-input-ownership.json @@ -103,7 +103,7 @@ "emptyEnv": [], "reason": "Reviewed URL/data projection only; no indirect repository reads. The entire local source closure and dependency/runtime context are fingerprinted.", "contextSha256": "3c069468bcb4a681493c94dad98bc2e4d2d56d0cbf641e797684fa307922d9e1", - "sourceClosureSha256": "621e920d69528ad4e9d3976ef3ca4821a162b8130830ca0e182711ac0e3b6aa2" + "sourceClosureSha256": "38b77f62aefd7dd361825a98cf2fa9cfac1924c72d9e2a5f21d427e54381c04e" }, { "file": "src/main/daemon/emulation/testing/serialize-grid-transcript-replay.test.ts", diff --git a/config/scripts/desktop-distribution/macos/gate-mac-update-manifests.mjs b/config/scripts/desktop-distribution/macos/gate-mac-update-manifests.mjs index 740be1d6322..86e4c71bf02 100644 --- a/config/scripts/desktop-distribution/macos/gate-mac-update-manifests.mjs +++ b/config/scripts/desktop-distribution/macos/gate-mac-update-manifests.mjs @@ -5,7 +5,7 @@ import { execFileSync } from 'node:child_process' import { readdirSync, readFileSync, writeFileSync } from 'node:fs' import { join, resolve } from 'node:path' -import { darwinVersionForMacos } from '../../../../src/shared/macos-darwin-floor.ts' +import { darwinVersionForMacos } from '../../../../src/shared/updater/requirements/macos-darwin-floor.ts' export function withMinimumSystemVersion(manifest, darwinVersion) { const lines = manifest diff --git a/config/scripts/diagnostics/runtime-lifecycle/remote-shared-control-retirement-probe.ts b/config/scripts/diagnostics/runtime-lifecycle/remote-shared-control-retirement-probe.ts index 2b369f489ab..2f32b69dd8d 100644 --- a/config/scripts/diagnostics/runtime-lifecycle/remote-shared-control-retirement-probe.ts +++ b/config/scripts/diagnostics/runtime-lifecycle/remote-shared-control-retirement-probe.ts @@ -6,7 +6,7 @@ import { resolveEnvironment, resolveEnvironmentPairingOffer } from '../../../../src/shared/remote-runtime/host-store/runtime-environment-store' -import type { MemorySnapshot } from '../../../../src/shared/process-stats-types' +import type { MemorySnapshot } from '../../../../src/shared/diagnostics/process-stats-types' import type { RuntimeStatus } from '../../../../src/shared/remote-runtime/session-graph/runtime-session-contracts' async function main(): Promise { diff --git a/config/scripts/workflow/source-routing/pr-wsl-e2e-source-routes.mjs b/config/scripts/workflow/source-routing/pr-wsl-e2e-source-routes.mjs index 45090505483..b44b7c4a1b8 100644 --- a/config/scripts/workflow/source-routing/pr-wsl-e2e-source-routes.mjs +++ b/config/scripts/workflow/source-routing/pr-wsl-e2e-source-routes.mjs @@ -34,7 +34,7 @@ export const PR_WSL_E2E_SOURCE_ROUTES = [ ], matches: (file) => isProductSource(file) && - /^(?:config\/scripts\/(?:runtime-verification\/participation\/)?(?:verify-wsl-e2e-participation|verify-wsl-no-background-boot-participation|verify-playwright-participation)\.mjs$|config\/scripts\/(?:runtime-verification\/participation\/)?runtime-verification\/participation\/verify-playwright-participation\.mjs$|src\/main\/(?:wsl[/-]|pty\/.*wsl|providers\/wsl)|src\/shared\/(?:wsl-|windows-terminal-shell|shell\/launch\/shell-argument-quoting)|src\/renderer\/src\/.*(?:terminal-paste|pty-paste)|tests\/e2e\/(?:golden-tab-bar-agent-launch\.spec|terminal-windows-shell-paste-ownership\.spec|terminal-inline-images-windows\.spec|wsl-bridge-no-background-boot\.spec|helpers\/(?:wsl-golden-stub-agent|golden-stub-agent))|\.github\/(?:actions\/setup-wsl-test-runtime\/|workflows\/windows-wsl-e2e\.yml))/.test( + /^(?:config\/scripts\/(?:runtime-verification\/participation\/)?(?:verify-wsl-e2e-participation|verify-wsl-no-background-boot-participation|verify-playwright-participation)\.mjs$|config\/scripts\/(?:runtime-verification\/participation\/)?runtime-verification\/participation\/verify-playwright-participation\.mjs$|src\/main\/(?:wsl[/-]|pty\/.*wsl|providers\/wsl)|src\/shared\/(?:wsl-|shell\/launch\/(?:windows-terminal-shell|shell-argument-quoting))|src\/renderer\/src\/.*(?:terminal-paste|pty-paste)|tests\/e2e\/(?:golden-tab-bar-agent-launch\.spec|terminal-windows-shell-paste-ownership\.spec|terminal-inline-images-windows\.spec|wsl-bridge-no-background-boot\.spec|helpers\/(?:wsl-golden-stub-agent|golden-stub-agent))|\.github\/(?:actions\/setup-wsl-test-runtime\/|workflows\/windows-wsl-e2e\.yml))/.test( file ) } diff --git a/mobile/src/agent-history/ai-vault-resume-launch.ts b/mobile/src/agent-history/ai-vault-resume-launch.ts index b2deab394fc..36285bb63de 100644 --- a/mobile/src/agent-history/ai-vault-resume-launch.ts +++ b/mobile/src/agent-history/ai-vault-resume-launch.ts @@ -14,7 +14,7 @@ import { import { isTuiAgent } from '../../../src/shared/agent-launch/catalog/tui-agent-config' import type { TuiAgent } from '../../../src/shared/agent-launch/catalog/tui-agent' import { parseWslUncPath } from '../../../src/shared/file-access/wsl-paths' -import { resolveWindowsShellStartupFamily } from '../../../src/shared/windows-terminal-shell' +import { resolveWindowsShellStartupFamily } from '../../../src/shared/shell/launch/windows-terminal-shell' import { RESUME_RPC_TIMEOUT_MS } from './ai-vault-resume-preparation' import type { UnvalidatedRpcRequestPort } from '../transport/rpc/unvalidated-rpc-request-port' import { interpretOrThrowRefusalMessage } from '../transport/rpc/rpc-refusal-message' diff --git a/mobile/src/diagnostics/native-render-log.ts b/mobile/src/diagnostics/native-render-log.ts index 62d40cf6d13..8e8467584fe 100644 --- a/mobile/src/diagnostics/native-render-log.ts +++ b/mobile/src/diagnostics/native-render-log.ts @@ -1,4 +1,4 @@ -import { sanitizeCrashReportString } from '../../../src/shared/crash-report-redaction' +import { sanitizeCrashReportString } from '../../../src/shared/crash-reporting/crash-report-redaction' import { captureBridgeError } from '../mobile-web-shell/bridge/protocol/bridge-error-capture' import { connectionLogStore } from './connection/persisted-connection-log-store' diff --git a/src/cli/diagnostics/diagnostics.ts b/src/cli/diagnostics/diagnostics.ts index a5d62f885f1..db5b283dbb9 100644 --- a/src/cli/diagnostics/diagnostics.ts +++ b/src/cli/diagnostics/diagnostics.ts @@ -1,4 +1,4 @@ -import type { MemorySnapshot } from '../../shared/process-stats-types' +import type { MemorySnapshot } from '../../shared/diagnostics/process-stats-types' import type { CommandHandler } from '../dispatch/dispatch' import { formatMemorySnapshot } from './memory-snapshot-format' import { printResult } from '../output/command-result-output' diff --git a/src/cli/diagnostics/memory-snapshot-format.ts b/src/cli/diagnostics/memory-snapshot-format.ts index ef7516b2228..9f9324843f5 100644 --- a/src/cli/diagnostics/memory-snapshot-format.ts +++ b/src/cli/diagnostics/memory-snapshot-format.ts @@ -1,4 +1,4 @@ -import type { MemorySnapshot, WorktreeMemory } from '../../shared/process-stats-types' +import type { MemorySnapshot, WorktreeMemory } from '../../shared/diagnostics/process-stats-types' export function formatMemorySnapshot(snapshot: MemorySnapshot): string { const topWorktrees = [...snapshot.worktrees].sort((a, b) => b.memory - a.memory).slice(0, 10) diff --git a/src/cli/orchestration/recovery/orchestration-mutation-recovery.ts b/src/cli/orchestration/recovery/orchestration-mutation-recovery.ts index ee1efa9a664..6505488be11 100644 --- a/src/cli/orchestration/recovery/orchestration-mutation-recovery.ts +++ b/src/cli/orchestration/recovery/orchestration-mutation-recovery.ts @@ -6,7 +6,7 @@ import { } from './orchestration-recovery-command' import { quoteWindowsCmdArgument } from '@orca/process-host/windows-command-line' import { quotePowerShellNativeArgument } from '../../../shared/powershell-native-argument' -import { resolveWindowsShellStartupFamily } from '../../../shared/windows-terminal-shell' +import { resolveWindowsShellStartupFamily } from '../../../shared/shell/launch/windows-terminal-shell' import type { AgentStartupShell } from '../../../shared/agent-launch/startup/tui-agent-startup-shell' export function orchestrationMutationRecoveryError( diff --git a/src/cli/terminals/terminal.ts b/src/cli/terminals/terminal.ts index fffd34f8e86..187dd7d57e7 100644 --- a/src/cli/terminals/terminal.ts +++ b/src/cli/terminals/terminal.ts @@ -37,7 +37,7 @@ import { RuntimeClientError } from '../runtime/connection/types' import { isSupportedWindowsShellOverride, listSupportedWindowsShellOverrides -} from '../../shared/windows-terminal-shell' +} from '../../shared/shell/launch/windows-terminal-shell' import '../../shared/protocol-version' import { TERMINAL_CREATE_SHELL_SELECTION_RUNTIME_CAPABILITY, diff --git a/src/main/agent-hooks/installation/install-telemetry.ts b/src/main/agent-hooks/installation/install-telemetry.ts index b64fa1fce86..1a4ebe877cb 100644 --- a/src/main/agent-hooks/installation/install-telemetry.ts +++ b/src/main/agent-hooks/installation/install-telemetry.ts @@ -1,5 +1,5 @@ import { errnoCodeOrUnknown } from '../../../shared/errno-code' -import type { HookInstallAgent } from '../../../shared/telemetry-daemon-event-schemas' +import type { HookInstallAgent } from '../../../shared/telemetry/schemas/telemetry-daemon-event-schemas' import { track } from '../../telemetry/client' export function recordManagedHookInstallFailure(agent: HookInstallAgent, error: unknown): void { diff --git a/src/main/agent-hooks/installation/managed-agent-hook-registry.ts b/src/main/agent-hooks/installation/managed-agent-hook-registry.ts index 91feaeae5d8..e4328a35479 100644 --- a/src/main/agent-hooks/installation/managed-agent-hook-registry.ts +++ b/src/main/agent-hooks/installation/managed-agent-hook-registry.ts @@ -2,7 +2,7 @@ import { codebuddyHookService } from '../../codebuddy/hook-service' import { qwenCodeHookService } from '../../qwen-code/hook-service' import { qoderCnHookService, qoderHookService } from '../../qoder/hook-service' import type { AgentHookInstallStatus } from '../../../shared/agent-hook-listener/configuration/agent-hook-types' -import type { HookInstallAgent } from '../../../shared/telemetry-daemon-event-schemas' +import type { HookInstallAgent } from '../../../shared/telemetry/schemas/telemetry-daemon-event-schemas' import { ampHookService } from '../../amp/hook-service' import { antigravityHookService } from '../../antigravity/hook-service' import { claudeHookService } from '../../claude/hook-service' diff --git a/src/main/agent-hooks/server/server-agent-identities.ts b/src/main/agent-hooks/server/server-agent-identities.ts index 24e6b2810e4..c6e20e86623 100644 --- a/src/main/agent-hooks/server/server-agent-identities.ts +++ b/src/main/agent-hooks/server/server-agent-identities.ts @@ -61,6 +61,11 @@ export abstract class AgentHookServerAgentIdentities extends AgentHookServerStat * transition effect or enriched subscriber runs again. */ protected abstract publishAgentIdentityProjection(row: EnrichedAgentHookEventPayload): void + protected abstract replaceTranscriptPollRow( + previous: EnrichedAgentHookEventPayload, + next: EnrichedAgentHookEventPayload + ): void + /** A committed answer, or the end of the authority that gave one, re-stamps the current rows * on its key and republishes each as a projection: status, clocks and order stay as they are. */ private publishSettledAgentIdentities(settled: SettledAgentIdentityPlace[]): void { @@ -97,6 +102,7 @@ export abstract class AgentHookServerAgentIdentities extends AgentHookServerStat AGENT_STATUS_2A_CURRENT_PRODUCER_MODE ) ) { + this.replaceTranscriptPollRow(row, next) projections.push(next) } } diff --git a/src/main/agent-hooks/server/server-constants.ts b/src/main/agent-hooks/server/server-constants.ts index 3e0d3f17737..638222a2889 100644 --- a/src/main/agent-hooks/server/server-constants.ts +++ b/src/main/agent-hooks/server/server-constants.ts @@ -1,4 +1,7 @@ -import { AGENT_KIND_VALUES, type AgentKind } from '../../../shared/telemetry-events' +import { + AGENT_KIND_VALUES, + type AgentKind +} from '../../../shared/telemetry/schemas/telemetry-property-schemas' export const ASSISTANT_MESSAGE_RETRY_ATTEMPTS = 5 export const ASSISTANT_MESSAGE_RETRY_MS = 50 diff --git a/src/main/agent-hooks/server/server-status-identity.ts b/src/main/agent-hooks/server/server-status-identity.ts index b2c7863613d..b3ad2f2ff23 100644 --- a/src/main/agent-hooks/server/server-status-identity.ts +++ b/src/main/agent-hooks/server/server-status-identity.ts @@ -1,4 +1,4 @@ -import type { AgentKind } from '../../../shared/telemetry-events' +import type { AgentKind } from '../../../shared/telemetry/schemas/telemetry-property-schemas' import { publishedOrcaSessionId } from '../identity/pane-agent-identities' import { getAgentResumeArgv } from '../../../shared/agent-launch/startup/agent-resume-argv' import type { AgentProviderSessionMetadata } from '../../../shared/agent-session/lifecycle/agent-session-resume' diff --git a/src/main/agent-hooks/server/server-status-retries.ts b/src/main/agent-hooks/server/server-status-retries.ts index 8486042e4e9..2be94a6e38b 100644 --- a/src/main/agent-hooks/server/server-status-retries.ts +++ b/src/main/agent-hooks/server/server-status-retries.ts @@ -107,6 +107,16 @@ export abstract class AgentHookServerStatusRetries extends AgentHookServerStatus this.claudeHelperKills.clear(paneKey) } + protected replaceTranscriptPollRow( + previous: EnrichedAgentHookEventPayload, + next: EnrichedAgentHookEventPayload + ): void { + const poll = this.transcriptPollScheduler.peek(previous.paneKey) + if (poll?.original === previous && next.paneKey === previous.paneKey) { + poll.original = next + } + } + protected scheduleTranscriptPoll( source: AgentHookSource, body: unknown, diff --git a/src/main/agent-hooks/server/server-types.ts b/src/main/agent-hooks/server/server-types.ts index f538246b821..f78b0871607 100644 --- a/src/main/agent-hooks/server/server-types.ts +++ b/src/main/agent-hooks/server/server-types.ts @@ -6,7 +6,7 @@ import type { AgentHookEventPayload } from '../../../shared/agent-hook-listener/ import type { AgentStatusClearIpcPayload } from '../../../shared/agent-status/contracts/agent-status-ipc-payload' import type { AgentStatusState } from '../../../shared/agent-status/contracts/agent-status-types' import type { AgentStatusObservation } from '../../../shared/agent-status/contracts/agent-status-observation' -import type { AgentKind } from '../../../shared/telemetry-events' +import type { AgentKind } from '../../../shared/telemetry/schemas/telemetry-property-schemas' import type { LegacyPaneKeyAliasEntry } from '../../../shared/persisted-state-types' import type { CodexRemoteRosterAuthority } from '../../../shared/agent-hook-listener/providers/codex/codex-state' import type { AgentHookSource } from '../../../shared/agent-hook-listener/transport/agent-hook-relay' diff --git a/src/main/agent-launch/agent-started-telemetry.ts b/src/main/agent-launch/agent-started-telemetry.ts index e1a3c6cf14c..b773f9cb58b 100644 --- a/src/main/agent-launch/agent-started-telemetry.ts +++ b/src/main/agent-launch/agent-started-telemetry.ts @@ -1,7 +1,7 @@ /** Accept newer clients’ launch-source labels as unknown rather than blocking the launch. */ import { tuiAgentToAgentKind } from '../../shared/agent-status/identity/agent-kind' -import { launchSourceSchema } from '../../shared/telemetry-property-schemas' +import { launchSourceSchema } from '../../shared/telemetry/schemas/telemetry-property-schemas' import type { TuiAgent } from '../../shared/agent-launch/catalog/tui-agent' import type { WorktreeStartupLaunch } from '../../shared/worktree/creation/launch-types' diff --git a/src/main/backend-desktop/backend-desktop-capabilities.ts b/src/main/backend-desktop/backend-desktop-capabilities.ts index 22080046761..07a297f902c 100644 --- a/src/main/backend-desktop/backend-desktop-capabilities.ts +++ b/src/main/backend-desktop/backend-desktop-capabilities.ts @@ -1,7 +1,7 @@ import { BrowserWindow, type WebContents, type WebFrameMain } from 'electron' import { join } from 'node:path' import { pathToFileURL } from 'node:url' -import { agentTokenUsageSchema } from '../../shared/telemetry-agent-token-usage-schema' +import { agentTokenUsageSchema } from '../../shared/telemetry/schemas/telemetry-agent-token-usage-schema' import { claudeProfileTranscriptDirs } from '../claude-usage/transcript-file-discovery' import { loadKnownUsageWorktreesByRepo } from '../usage/worktree-attribution/usage-worktree-metadata' import { isTelemetryEnabled, track } from '../telemetry/client' diff --git a/src/main/backend/backend-entry.ts b/src/main/backend/backend-entry.ts index cc3fab148bf..6cc9025ed9d 100644 --- a/src/main/backend/backend-entry.ts +++ b/src/main/backend/backend-entry.ts @@ -6,7 +6,7 @@ import { } from '../../shared/backend/backend-service-contract' import { BackendPortRpc } from '../../shared/backend/backend-port-rpc' import { setAppEnvironment } from '../../shared/app-environment' -import { agentTokenUsageSchema } from '../../shared/telemetry-agent-token-usage-schema' +import { agentTokenUsageSchema } from '../../shared/telemetry/schemas/telemetry-agent-token-usage-schema' import { backendMessagePort, type BackendNativePort } from './backend-message-port' import { createDesktopBackendEnvironment } from './node-service-environment' import { BackendServiceLifetime, activateBackendServices } from './service-composition' diff --git a/src/main/crash-reporting/breadcrumbs/crash-breadcrumb-store.ts b/src/main/crash-reporting/breadcrumbs/crash-breadcrumb-store.ts index 34beb87429c..2927a5ec5d9 100644 --- a/src/main/crash-reporting/breadcrumbs/crash-breadcrumb-store.ts +++ b/src/main/crash-reporting/breadcrumbs/crash-breadcrumb-store.ts @@ -1,11 +1,11 @@ import { sanitizeCrashReportBreadcrumbs, sanitizeCrashReportDetails -} from '../../../shared/crash-report-redaction' +} from '../../../shared/crash-reporting/crash-report-redaction' import type { CrashReportBreadcrumbData, CrashReportBreadcrumb -} from '../../../shared/crash-reporting' +} from '../../../shared/crash-reporting/crash-reporting' const MAX_BREADCRUMBS = 30 const MAX_RETAINED_BREADCRUMBS = 10 diff --git a/src/main/crash-reporting/breadcrumbs/durable-crash-breadcrumb.ts b/src/main/crash-reporting/breadcrumbs/durable-crash-breadcrumb.ts index 8645be8ab0d..f48e4619cce 100644 --- a/src/main/crash-reporting/breadcrumbs/durable-crash-breadcrumb.ts +++ b/src/main/crash-reporting/breadcrumbs/durable-crash-breadcrumb.ts @@ -1,8 +1,8 @@ import { sanitizeCrashReportDetails, sanitizeCrashReportString -} from '../../../shared/crash-report-redaction' -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +} from '../../../shared/crash-reporting/crash-report-redaction' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import { flushActiveSink, startSpan } from '../../observability/tracer' import { recordCoalescedCrashBreadcrumb, recordCrashBreadcrumb } from './crash-breadcrumb-store' import { getMainProcessLifecycleIdentity } from '../process-exits/main-process-lifecycle-identity' diff --git a/src/main/crash-reporting/capture/gpu-crash-diagnostics.ts b/src/main/crash-reporting/capture/gpu-crash-diagnostics.ts index 25378c18cad..e96d1cd7900 100644 --- a/src/main/crash-reporting/capture/gpu-crash-diagnostics.ts +++ b/src/main/crash-reporting/capture/gpu-crash-diagnostics.ts @@ -1,4 +1,4 @@ -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' type GpuInfoLevel = 'basic' | 'complete' const DEFAULT_GPU_CRASH_DIAGNOSTICS_WAIT_MS = 1_000 diff --git a/src/main/crash-reporting/memory/pre-gone-host-memory.ts b/src/main/crash-reporting/memory/pre-gone-host-memory.ts index c06c31c434b..d26fbe004c0 100644 --- a/src/main/crash-reporting/memory/pre-gone-host-memory.ts +++ b/src/main/crash-reporting/memory/pre-gone-host-memory.ts @@ -1,4 +1,4 @@ -import type { CrashReportDetailValue } from '../../../shared/crash-reporting' +import type { CrashReportDetailValue } from '../../../shared/crash-reporting/crash-reporting' import { readSwapVolumeFreeSpace } from './swap-volume-free-space' import { getSystemMemoryDetails, diff --git a/src/main/crash-reporting/memory/renderer-heap-allocation-profile.ts b/src/main/crash-reporting/memory/renderer-heap-allocation-profile.ts index 2fd412f59fc..fdc9f7f1158 100644 --- a/src/main/crash-reporting/memory/renderer-heap-allocation-profile.ts +++ b/src/main/crash-reporting/memory/renderer-heap-allocation-profile.ts @@ -1,5 +1,5 @@ import type { WebContents } from 'electron' -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import { RENDERER_HEAP_ALLOCATION_PROFILE_BREADCRUMB, recordCrashBreadcrumb diff --git a/src/main/crash-reporting/memory/renderer-heap-allocation-sites.ts b/src/main/crash-reporting/memory/renderer-heap-allocation-sites.ts index 98aa4c8cccf..6bbcb4387ef 100644 --- a/src/main/crash-reporting/memory/renderer-heap-allocation-sites.ts +++ b/src/main/crash-reporting/memory/renderer-heap-allocation-sites.ts @@ -1,4 +1,4 @@ -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' const MAX_SITES = 12 const MAX_STACK_FRAMES = 4 diff --git a/src/main/crash-reporting/memory/system-memory-details.ts b/src/main/crash-reporting/memory/system-memory-details.ts index 8f663ea9b29..29722709043 100644 --- a/src/main/crash-reporting/memory/system-memory-details.ts +++ b/src/main/crash-reporting/memory/system-memory-details.ts @@ -1,4 +1,4 @@ -import type { CrashReportDetailValue } from '../../../shared/crash-reporting' +import type { CrashReportDetailValue } from '../../../shared/crash-reporting/crash-reporting' import type { SwapVolumeFreeSpace } from './swap-volume-free-space' // Post-exit memory can look healthier; pre-gone samples retain earlier pressure evidence. diff --git a/src/main/crash-reporting/process-exits/process-gone-diagnostics.ts b/src/main/crash-reporting/process-exits/process-gone-diagnostics.ts index ecc8cbc81d6..4078ec9ff12 100644 --- a/src/main/crash-reporting/process-exits/process-gone-diagnostics.ts +++ b/src/main/crash-reporting/process-exits/process-gone-diagnostics.ts @@ -1,6 +1,6 @@ import { app } from 'electron' -import { sanitizeCrashReportDetails } from '../../../shared/crash-report-redaction' -import type { CrashReportDetailValue } from '../../../shared/crash-reporting' +import { sanitizeCrashReportDetails } from '../../../shared/crash-reporting/crash-report-redaction' +import type { CrashReportDetailValue } from '../../../shared/crash-reporting/crash-reporting' import { getSystemMemoryDetails, memoryKBFieldMB } from '../memory/system-memory-details' import { getStartupRtPrioOutcome, diff --git a/src/main/crash-reporting/process-exits/process-gone-recorder.ts b/src/main/crash-reporting/process-exits/process-gone-recorder.ts index 1ed3845cfe5..88a854f1fea 100644 --- a/src/main/crash-reporting/process-exits/process-gone-recorder.ts +++ b/src/main/crash-reporting/process-exits/process-gone-recorder.ts @@ -1,13 +1,16 @@ import os from 'node:os' import { app } from 'electron' -import { isCrashReportReason } from '../../../shared/crash-reporting' -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import { isCrashReportReason } from '../../../shared/crash-reporting/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import { sanitizeCrashReportDetails, sanitizeCrashReportString -} from '../../../shared/crash-report-redaction' -import { decodePosixWaitStatus, describePosixWaitStatus } from '../../../shared/posix-wait-status' -import { rendererCrashBreadcrumbOrigin } from '../../../shared/crash-breadcrumb-origin' +} from '../../../shared/crash-reporting/crash-report-redaction' +import { + decodePosixWaitStatus, + describePosixWaitStatus +} from '../../../shared/crash-reporting/posix-wait-status' +import { rendererCrashBreadcrumbOrigin } from '../../../shared/crash-reporting/crash-breadcrumb-origin' import type { CrashReportStore } from '../reports/crash-report-store' import { getCrashBreadcrumbSnapshot } from '../breadcrumbs/crash-breadcrumb-store' import { @@ -26,11 +29,8 @@ import { } from './process-gone-classification' import { buildProcessGoneCrashDetails } from './process-gone-diagnostics' import { buildSuppressedProcessGoneBreadcrumbData } from './suppressed-process-gone-breadcrumb' -import { - getProcessGoneDedupeKey, - processGoneDedupe, - type ProcessGoneDedupe -} from './process-gone-dedupe' +import { getProcessGoneDedupeKey, processGoneDedupe } from './process-gone-dedupe' +import type { ProcessGoneDedupe } from './process-gone-dedupe' import { findSiblingChildDeaths, siblingProcessDeathDetails diff --git a/src/main/crash-reporting/process-exits/process-gone-sibling-attribution.ts b/src/main/crash-reporting/process-exits/process-gone-sibling-attribution.ts index 44367a12f26..8f5b87ce502 100644 --- a/src/main/crash-reporting/process-exits/process-gone-sibling-attribution.ts +++ b/src/main/crash-reporting/process-exits/process-gone-sibling-attribution.ts @@ -1,7 +1,7 @@ import type { CrashReportBreadcrumbData, CrashReportDetailValue -} from '../../../shared/crash-reporting' +} from '../../../shared/crash-reporting/crash-reporting' import { recordCoalescedDurableCrashBreadcrumb, recordDurableCrashBreadcrumb diff --git a/src/main/crash-reporting/process-exits/process-gone-sibling-correlation.ts b/src/main/crash-reporting/process-exits/process-gone-sibling-correlation.ts index b9eafc67fca..2389e7b077d 100644 --- a/src/main/crash-reporting/process-exits/process-gone-sibling-correlation.ts +++ b/src/main/crash-reporting/process-exits/process-gone-sibling-correlation.ts @@ -1,4 +1,4 @@ -import type { CrashReportDetailValue } from '../../../shared/crash-reporting' +import type { CrashReportDetailValue } from '../../../shared/crash-reporting/crash-reporting' // Correlation is timing evidence only; never use it to discard a renderer crash report. diff --git a/src/main/crash-reporting/process-exits/self-initiated-tree-kill-log.ts b/src/main/crash-reporting/process-exits/self-initiated-tree-kill-log.ts index aac79b43917..1852918e73c 100644 --- a/src/main/crash-reporting/process-exits/self-initiated-tree-kill-log.ts +++ b/src/main/crash-reporting/process-exits/self-initiated-tree-kill-log.ts @@ -1,4 +1,4 @@ -import type { CrashReportDetailValue } from '../../../shared/crash-reporting' +import type { CrashReportDetailValue } from '../../../shared/crash-reporting/crash-reporting' import type { ProcessTreeKillScope } from '@orca/process-host/process-tree-kill-gate' import { recordCoalescedDurableCrashBreadcrumb } from '../breadcrumbs/durable-crash-breadcrumb' diff --git a/src/main/crash-reporting/process-exits/suppressed-process-gone-breadcrumb.ts b/src/main/crash-reporting/process-exits/suppressed-process-gone-breadcrumb.ts index 5aa7e0c7d1b..c2ef7482fe8 100644 --- a/src/main/crash-reporting/process-exits/suppressed-process-gone-breadcrumb.ts +++ b/src/main/crash-reporting/process-exits/suppressed-process-gone-breadcrumb.ts @@ -1,4 +1,4 @@ -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import type { ExpectedTeardownScope } from './process-gone-classification' function safeString(value: unknown): string | undefined { diff --git a/src/main/crash-reporting/recovery/low-commit-oom-recovery-gate.ts b/src/main/crash-reporting/recovery/low-commit-oom-recovery-gate.ts index e635bf57b41..c9d8549ab36 100644 --- a/src/main/crash-reporting/recovery/low-commit-oom-recovery-gate.ts +++ b/src/main/crash-reporting/recovery/low-commit-oom-recovery-gate.ts @@ -1,4 +1,4 @@ -import type { CrashReportDetailValue } from '../../../shared/crash-reporting' +import type { CrashReportDetailValue } from '../../../shared/crash-reporting/crash-reporting' import { preGoneSystemMemoryDetails } from '../memory/pre-gone-host-memory' import { getSystemMemoryDetails, SYSTEM_MEMORY_KEY_PREFIX } from '../memory/system-memory-details' diff --git a/src/main/crash-reporting/reports/crash-feedback-diagnostic-bundle.ts b/src/main/crash-reporting/reports/crash-feedback-diagnostic-bundle.ts index 5b5a05b2172..6e654a2d15e 100644 --- a/src/main/crash-reporting/reports/crash-feedback-diagnostic-bundle.ts +++ b/src/main/crash-reporting/reports/crash-feedback-diagnostic-bundle.ts @@ -1,11 +1,11 @@ import os from 'node:os' import { app } from 'electron' -import { sanitizeCrashReportString } from '../../../shared/crash-report-redaction' -import type { CrashReportDiagnosticBundle } from '../../../shared/crash-reporting-diagnostic-bundle' +import { sanitizeCrashReportString } from '../../../shared/crash-reporting/crash-report-redaction' +import type { CrashReportDiagnosticBundle } from '../../../shared/crash-reporting/crash-reporting-diagnostic-bundle' import { collectDiagnosticBundle, getDiagnosticsStatus } from '../../observability/index' import { resolveDiagnosticOrcaChannel } from '../../observability/diagnostic-upload-endpoint' import type { FeedbackDiagnosticBundleAttachment } from '../../ipc/feedback-request' -import type { FeedbackSubmitResult } from '../../../shared/feedback-submit-contract' +import type { FeedbackSubmitResult } from '../../../shared/feedback/feedback-submit-contract' const CRASH_REPORT_LOG_LOOKBACK_MINUTES = 3 * 24 * 60 diff --git a/src/main/crash-reporting/reports/crash-report-copy-text.ts b/src/main/crash-reporting/reports/crash-report-copy-text.ts index a23bbfd1314..e917e0f4a40 100644 --- a/src/main/crash-reporting/reports/crash-report-copy-text.ts +++ b/src/main/crash-reporting/reports/crash-report-copy-text.ts @@ -1,5 +1,5 @@ -import { sanitizeCrashReportString } from '../../../shared/crash-report-redaction' -import type { CrashReportCopySubmissionFailure } from '../../../shared/crash-reporting' +import { sanitizeCrashReportString } from '../../../shared/crash-reporting/crash-report-redaction' +import type { CrashReportCopySubmissionFailure } from '../../../shared/crash-reporting/crash-reporting' function sanitizedNonEmptyString(value: unknown): string | null { if (typeof value !== 'string') { diff --git a/src/main/crash-reporting/reports/crash-report-store.test.ts b/src/main/crash-reporting/reports/crash-report-store.test.ts index 92fd1b40b93..a922457ca6f 100644 --- a/src/main/crash-reporting/reports/crash-report-store.test.ts +++ b/src/main/crash-reporting/reports/crash-report-store.test.ts @@ -13,7 +13,7 @@ vi.mock('../../windows/windows-directory-acl', async (importOriginal) => { }) import { CrashReportStore } from './crash-report-store' -import type { CrashReportCreateInput } from '../../../shared/crash-reporting' +import type { CrashReportCreateInput } from '../../../shared/crash-reporting/crash-reporting' const tempDirs: string[] = [] diff --git a/src/main/crash-reporting/reports/crash-report-store.ts b/src/main/crash-reporting/reports/crash-report-store.ts index ad6d26b14b7..d9147a5619c 100644 --- a/src/main/crash-reporting/reports/crash-report-store.ts +++ b/src/main/crash-reporting/reports/crash-report-store.ts @@ -10,11 +10,11 @@ import { type CrashReportCreateInput, type CrashReportRecord, type CrashReportStatus -} from '../../../shared/crash-reporting' +} from '../../../shared/crash-reporting/crash-reporting' import { sanitizeCrashReportBreadcrumbs, sanitizeCrashReportDetails -} from '../../../shared/crash-report-redaction' +} from '../../../shared/crash-reporting/crash-report-redaction' const MAX_REPORTS = 5 const RELATED_CRASH_WINDOW_MS = 5_000 diff --git a/src/main/daemon/executable-host/macos/daemon-mac-code-identity.ts b/src/main/daemon/executable-host/macos/daemon-mac-code-identity.ts index c9a2eb448eb..5d74a57aca7 100644 --- a/src/main/daemon/executable-host/macos/daemon-mac-code-identity.ts +++ b/src/main/daemon/executable-host/macos/daemon-mac-code-identity.ts @@ -2,7 +2,7 @@ // where a running pid's executable lives now. An unresolved image alone does not prove denial. import { runProcess } from '@orca/process-host' -import type { DaemonCodeIdentity } from '../../../../shared/daemon-adoption-telemetry' +import type { DaemonCodeIdentity } from '../../../../shared/telemetry/daemon-adoption-telemetry' const CODESIGN_TIMEOUT_MS = 3_000 diff --git a/src/main/daemon/launch/daemon-out-of-process-launcher.ts b/src/main/daemon/launch/daemon-out-of-process-launcher.ts index 790da15cc41..4ad0199cbf8 100644 --- a/src/main/daemon/launch/daemon-out-of-process-launcher.ts +++ b/src/main/daemon/launch/daemon-out-of-process-launcher.ts @@ -1,7 +1,7 @@ import { randomUUID } from 'node:crypto' import { getAppEnvironment } from '../../../shared/app-environment' import { childProcessHasExited } from '@orca/process-host/process-tree-termination' -import type { DaemonReplaceReason } from '../../../shared/daemon-lifecycle-telemetry' +import type { DaemonReplaceReason } from '../../../shared/telemetry/daemon-lifecycle-telemetry' import { DaemonClient } from '../transport/client/daemon-client' import { DaemonEndpointOwnershipError, diff --git a/src/main/daemon/launch/daemon-replacement-preflight.ts b/src/main/daemon/launch/daemon-replacement-preflight.ts index 00f73fbd977..c440beee2f4 100644 --- a/src/main/daemon/launch/daemon-replacement-preflight.ts +++ b/src/main/daemon/launch/daemon-replacement-preflight.ts @@ -1,5 +1,5 @@ import { getAppEnvironment } from '../../../shared/app-environment' -import type { DaemonReplaceReason } from '../../../shared/daemon-lifecycle-telemetry' +import type { DaemonReplaceReason } from '../../../shared/telemetry/daemon-lifecycle-telemetry' import { migrateLegacyDaemonScope } from '../process-scopes/daemon-cgroup-scope' import { isDaemonStaleForCurrentBundle } from './daemon-bundle-staleness' import { DaemonEndpointOwnershipError } from './daemon-endpoint-adoption' diff --git a/src/main/daemon/observability/daemon-adoption-telemetry-event.ts b/src/main/daemon/observability/daemon-adoption-telemetry-event.ts index 04995addb96..1a70faf0d02 100644 --- a/src/main/daemon/observability/daemon-adoption-telemetry-event.ts +++ b/src/main/daemon/observability/daemon-adoption-telemetry-event.ts @@ -8,9 +8,9 @@ import { classifyDaemonSpawnerPath, isMacTccFolderClass, type DaemonSpawnerPathClass -} from '../../../shared/daemon-adoption-telemetry' -import { bucketDaemonLiveSessionCount } from '../../../shared/daemon-lifecycle-telemetry' -import type { EventProps } from '../../../shared/telemetry-events' +} from '../../../shared/telemetry/daemon-adoption-telemetry' +import { bucketDaemonLiveSessionCount } from '../../../shared/telemetry/daemon-lifecycle-telemetry' +import type { EventProps } from '../../../shared/telemetry/telemetry-event-classification' import { track } from '../../telemetry/client' import { readDaemonPidRecord } from '../endpoint/identity/daemon-endpoint-incarnation' import { getDaemonMacCodeIdentity } from '../executable-host/macos/daemon-mac-code-identity' diff --git a/src/main/daemon/observability/daemon-async-io-telemetry-event.ts b/src/main/daemon/observability/daemon-async-io-telemetry-event.ts index 1570776df8a..08c000d1ea2 100644 --- a/src/main/daemon/observability/daemon-async-io-telemetry-event.ts +++ b/src/main/daemon/observability/daemon-async-io-telemetry-event.ts @@ -1,9 +1,9 @@ // Telemetry must never fail a health read, so every error stops here. import { getAppEnvironment } from '../../../shared/app-environment' -import { classifyDaemonAppVersionMatch } from '../../../shared/daemon-adoption-telemetry' +import { classifyDaemonAppVersionMatch } from '../../../shared/telemetry/daemon-adoption-telemetry' import type { DaemonAsyncIoHealth } from '../../../shared/daemon-async-io-health' -import type { DAEMON_ASYNC_IO_STALL_DURATION_BUCKETS } from '../../../shared/telemetry-daemon-event-schemas' +import type { DAEMON_ASYNC_IO_STALL_DURATION_BUCKETS } from '../../../shared/telemetry/schemas/telemetry-daemon-event-schemas' import { track } from '../../telemetry/client' import type { DaemonEndpointIdentity } from '../protocol/daemon-hello-protocol' diff --git a/src/main/daemon/observability/daemon-audit-eligibility-event.ts b/src/main/daemon/observability/daemon-audit-eligibility-event.ts index 2fe11ed858a..bae671907df 100644 --- a/src/main/daemon/observability/daemon-audit-eligibility-event.ts +++ b/src/main/daemon/observability/daemon-audit-eligibility-event.ts @@ -1,6 +1,6 @@ import { createHash } from 'node:crypto' import { track } from '../../telemetry/client' -import type { EventProps } from '../../../shared/telemetry-events' +import type { EventProps } from '../../../shared/telemetry/telemetry-event-classification' import type { DaemonAuditObservation } from './daemon-audit-classifier' import { PROTOCOL_VERSION } from '../protocol/daemon-protocol-version' diff --git a/src/main/daemon/observability/daemon-lifecycle-event.ts b/src/main/daemon/observability/daemon-lifecycle-event.ts index 64088762f5d..7cbd81674ee 100644 --- a/src/main/daemon/observability/daemon-lifecycle-event.ts +++ b/src/main/daemon/observability/daemon-lifecycle-event.ts @@ -2,7 +2,7 @@ import { bucketDaemonLiveSessionCount, type DaemonReplaceReason, type DaemonRetireReason -} from '../../../shared/daemon-lifecycle-telemetry' +} from '../../../shared/telemetry/daemon-lifecycle-telemetry' import { track } from '../../telemetry/client' function trackQuietly(props: Parameters>[1]): void { diff --git a/src/main/daemon/permissions/daemon-folder-access-mismatch.ts b/src/main/daemon/permissions/daemon-folder-access-mismatch.ts index 6e8efb0ec46..72fff7d572c 100644 --- a/src/main/daemon/permissions/daemon-folder-access-mismatch.ts +++ b/src/main/daemon/permissions/daemon-folder-access-mismatch.ts @@ -5,8 +5,8 @@ import { homedir } from 'node:os' import { classifyDaemonPtyCwd, type DaemonPtyCwdClass -} from '../../../shared/daemon-adoption-telemetry' -import type { EventProps } from '../../../shared/telemetry-events' +} from '../../../shared/telemetry/daemon-adoption-telemetry' +import type { EventProps } from '../../../shared/telemetry/telemetry-event-classification' import { track } from '../../telemetry/client' import { probeFolderAccessForFreshDaemon, diff --git a/src/main/daemon/permissions/daemon-folder-access-reset.ts b/src/main/daemon/permissions/daemon-folder-access-reset.ts index 25e3a3cd0d1..1441032d5de 100644 --- a/src/main/daemon/permissions/daemon-folder-access-reset.ts +++ b/src/main/daemon/permissions/daemon-folder-access-reset.ts @@ -6,8 +6,8 @@ import { isMacTccFolderClass, type DaemonPtyCwdClass, type MacTccFolderClass -} from '../../../shared/daemon-adoption-telemetry' -import type { EventProps } from '../../../shared/telemetry-events' +} from '../../../shared/telemetry/daemon-adoption-telemetry' +import type { EventProps } from '../../../shared/telemetry/telemetry-event-classification' import { readMacosBundleId, resetMacosTccPermission } from '../../macos-permissions/macos-tcc-reset' import { enumerateDirectoryOnce } from './directory-enumeration-probe' import { track } from '../../telemetry/client' diff --git a/src/main/daemon/permissions/tcc-denial-capture.ts b/src/main/daemon/permissions/tcc-denial-capture.ts index 61b824005cf..4f6fefdd231 100644 --- a/src/main/daemon/permissions/tcc-denial-capture.ts +++ b/src/main/daemon/permissions/tcc-denial-capture.ts @@ -3,7 +3,7 @@ import { homedir } from 'node:os' import { runProcess } from '@orca/process-host' import { join } from 'node:path' -import type { MacTccFolderClass } from '../../../shared/daemon-adoption-telemetry' +import type { MacTccFolderClass } from '../../../shared/telemetry/daemon-adoption-telemetry' import { bucketElapsed, bucketGoodReadCount, @@ -13,7 +13,7 @@ import { } from '../../../shared/daemon-tcc-denial-capture' import { LOCAL_BUILD_COMPATIBILITY_CONTRACT } from '../../../shared/remote-runtime/orcad-distribution/local-build-compatibility-contract' import type { DeveloperPermissionStatus } from '../../../shared/developer-permissions-types' -import type { EventProps } from '../../../shared/telemetry-events' +import type { EventProps } from '../../../shared/telemetry/telemetry-event-classification' import { msSinceWakeSignal } from '../../power/wake-signal-clock' import { isTelemetryEnabled, track } from '../../telemetry/client' import { inspectMacProcessCodeIdentity } from '../executable-host/macos/daemon-mac-code-identity' diff --git a/src/main/daemon/permissions/tcc-denial-folder-state.ts b/src/main/daemon/permissions/tcc-denial-folder-state.ts index f7cb28213e8..4294a0e8437 100644 --- a/src/main/daemon/permissions/tcc-denial-folder-state.ts +++ b/src/main/daemon/permissions/tcc-denial-folder-state.ts @@ -2,7 +2,7 @@ import { realpath } from 'node:fs/promises' import type { runProcess } from '@orca/process-host' -import type { MacTccFolderClass } from '../../../shared/daemon-adoption-telemetry' +import type { MacTccFolderClass } from '../../../shared/telemetry/daemon-adoption-telemetry' import type { FolderFlag, IcloudManaged, diff --git a/src/main/daemon/permissions/tcc-denial-log-verdict.ts b/src/main/daemon/permissions/tcc-denial-log-verdict.ts index 8ea9f65354f..7eb4c6e20db 100644 --- a/src/main/daemon/permissions/tcc-denial-log-verdict.ts +++ b/src/main/daemon/permissions/tcc-denial-log-verdict.ts @@ -2,7 +2,7 @@ import type { runProcess } from '@orca/process-host' import { z } from 'zod' -import type { MacTccFolderClass } from '../../../shared/daemon-adoption-telemetry' +import type { MacTccFolderClass } from '../../../shared/telemetry/daemon-adoption-telemetry' import type { TccAsked, TccAuthReason, diff --git a/src/main/daemon/pty-subprocess/shell-launch-plan.ts b/src/main/daemon/pty-subprocess/shell-launch-plan.ts index d5c7627589b..06de9700069 100644 --- a/src/main/daemon/pty-subprocess/shell-launch-plan.ts +++ b/src/main/daemon/pty-subprocess/shell-launch-plan.ts @@ -43,7 +43,7 @@ import { CLAUDE_INJECTED_CONFIG_DIR_ENV, CLAUDE_PROFILE_POINTER_ENV } from '../../../shared/claude-profile-routing' -import { WINDOWS_GIT_BASH_SHELL } from '../../../shared/windows-terminal-shell' +import { WINDOWS_GIT_BASH_SHELL } from '../../../shared/shell/launch/windows-terminal-shell' import { getShellLaunchConfig, resolvePtyShellPath } from '../shell-readiness/shell-ready' import { resolveWslSessionContext } from './wsl-session-context' import { finalizeDaemonPtyEnvironment, rescrubDaemonPtyEnvironment } from './spawn-environment' 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 b20284e57be..e84e5c459a5 100644 --- a/src/main/daemon/pty-subprocess/spawn-file-foreground-process.ts +++ b/src/main/daemon/pty-subprocess/spawn-file-foreground-process.ts @@ -23,7 +23,7 @@ import { getFreshProcessTableSnapshot, getProcessTableSnapshot } from '../../../shared/process-table-snapshot-reader' -import { selectForegroundProcessCandidate } from '../../../shared/foreground-process-selection' +import { selectForegroundProcessCandidate } from '../../../shared/agent-status/process/foreground-process-selection' import { resolveOuterWrapperForegroundProcess } from '../../../shared/agent-status/process/foreground-wrapper-agent' import { recognizeAgentProcess } from '../../../shared/agent-status/process/agent-process-recognition' import { diff --git a/src/main/daemon/pty-subprocess/testing/agent-foreground-process-git-bash.win32.test.ts b/src/main/daemon/pty-subprocess/testing/agent-foreground-process-git-bash.win32.test.ts index 35691e9686f..4592a751bdd 100644 --- a/src/main/daemon/pty-subprocess/testing/agent-foreground-process-git-bash.win32.test.ts +++ b/src/main/daemon/pty-subprocess/testing/agent-foreground-process-git-bash.win32.test.ts @@ -3,7 +3,7 @@ import { tmpdir } from 'node:os' import { join } from 'node:path' import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest' import { removeTreeSync } from '../../../../shared/windows-transient-lock-removal' -import { WINDOWS_GIT_BASH_SHELL } from '../../../../shared/windows-terminal-shell' +import { WINDOWS_GIT_BASH_SHELL } from '../../../../shared/shell/launch/windows-terminal-shell' import { confirmPtyShellForeground } from '../pty-shell-foreground-confirmation' import { createPtyShellLaunchPlan, type PtyShellLaunchPlan } from '../shell-launch-plan' import { spawnNativeDaemonPty } from '../native-pty-spawn' diff --git a/src/main/daemon/terminal-host/terminal-host-process-inspection.ts b/src/main/daemon/terminal-host/terminal-host-process-inspection.ts index 669596550ce..8e203a74668 100644 --- a/src/main/daemon/terminal-host/terminal-host-process-inspection.ts +++ b/src/main/daemon/terminal-host/terminal-host-process-inspection.ts @@ -4,7 +4,7 @@ import { getInspectableTerminalHostSession } from './terminal-host-session-acces import { isShellProcess } from '../../../shared/agent-status/process/shell-process-detection' import { recognizeAgentProcess } from '../../../shared/agent-status/process/agent-process-recognition' import type { PtyChildProcessVerdict } from '../../../shared/terminal/pty/lifecycle/terminal-process-inspection' -import type { RemoteForegroundEvidence } from '../../../shared/foreground-process-evidence' +import type { RemoteForegroundEvidence } from '../../../shared/terminal/pty/foreground/foreground-process-evidence' import { getCheapProcessTableSnapshot } from '../../../shared/cheap-process-table-snapshot-reader' import { getStrictProcessTableSnapshotWithAge } from '../../../shared/process-table-snapshot-reader' import { resolveRemoteForegroundEvidence } from '../../providers/foreground/agent-process-batch' diff --git a/src/main/daemon/terminal-host/terminal-host-steady-state-anchor.ts b/src/main/daemon/terminal-host/terminal-host-steady-state-anchor.ts index 8919c476ee1..67cdcee2a76 100644 --- a/src/main/daemon/terminal-host/terminal-host-steady-state-anchor.ts +++ b/src/main/daemon/terminal-host/terminal-host-steady-state-anchor.ts @@ -1,5 +1,5 @@ import { recognizeAgentProcess } from '../../../shared/agent-status/process/agent-process-recognition' -import type { RemoteForegroundEvidence } from '../../../shared/foreground-process-evidence' +import type { RemoteForegroundEvidence } from '../../../shared/terminal/pty/foreground/foreground-process-evidence' import { buildPaneProcessFingerprint } from '../../providers/foreground/posix-pane-fingerprint' import type { Session } from '../sessions/session' diff --git a/src/main/hang-watchdog/hang-capture-details.ts b/src/main/hang-watchdog/hang-capture-details.ts index 7a4a0237376..0770e0a6dca 100644 --- a/src/main/hang-watchdog/hang-capture-details.ts +++ b/src/main/hang-watchdog/hang-capture-details.ts @@ -1,4 +1,4 @@ -import type { CrashReportBreadcrumbData } from '../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../shared/crash-reporting/crash-reporting' import type { HangStacks } from './hang-stacks' export function hangCaptureDetails( diff --git a/src/main/hang-watchdog/hang-incident-snapshot.ts b/src/main/hang-watchdog/hang-incident-snapshot.ts index 76c20ced683..db2ab134e01 100644 --- a/src/main/hang-watchdog/hang-incident-snapshot.ts +++ b/src/main/hang-watchdog/hang-incident-snapshot.ts @@ -1,6 +1,6 @@ import { closeSync, fstatSync, openSync, readSync } from 'node:fs' import { freemem, loadavg, totalmem } from 'node:os' -import { sanitizeCrashReportString } from '../../shared/crash-report-redaction' +import { sanitizeCrashReportString } from '../../shared/crash-reporting/crash-report-redaction' import { redactString } from '../observability/redactor' import type { CompletedHangContext, HangMachineSnapshot } from './hang-observations' diff --git a/src/main/hang-watchdog/hang-stacks.ts b/src/main/hang-watchdog/hang-stacks.ts index 58b136c26bd..4d64d18b1a2 100644 --- a/src/main/hang-watchdog/hang-stacks.ts +++ b/src/main/hang-watchdog/hang-stacks.ts @@ -1,4 +1,4 @@ -import { sanitizeCrashReportString } from '../../shared/crash-report-redaction' +import { sanitizeCrashReportString } from '../../shared/crash-reporting/crash-report-redaction' import { redactString } from '../observability/redactor' export type HangFrame = { name: string; module: string; line?: number; column?: number } diff --git a/src/main/hang-watchdog/native-hang-artifact.test.ts b/src/main/hang-watchdog/native-hang-artifact.test.ts index c69d2084a64..cd557c2edae 100644 --- a/src/main/hang-watchdog/native-hang-artifact.test.ts +++ b/src/main/hang-watchdog/native-hang-artifact.test.ts @@ -12,7 +12,7 @@ import { } from './native-hang-capture-store' import { sanitizeNativeHangReport, type NativeHangArtifact } from './native-hang-report' import { readPreviousNativeHangTelemetry } from './previous-native-hang-telemetry' -import { mainThreadHangDetectedSchema } from '../../shared/telemetry-daemon-event-schemas' +import { mainThreadHangDetectedSchema } from '../../shared/telemetry/schemas/telemetry-daemon-event-schemas' import { getLatestPendingReport } from '../ipc/crash-reporting/crash-reporting-sendable-reports' import { collectBundle } from '../observability/bundle' diff --git a/src/main/hang-watchdog/native-hang-report.ts b/src/main/hang-watchdog/native-hang-report.ts index 1b75d578146..967e16fef45 100644 --- a/src/main/hang-watchdog/native-hang-report.ts +++ b/src/main/hang-watchdog/native-hang-report.ts @@ -1,5 +1,5 @@ import { basename } from 'node:path/posix' -import { sanitizeCrashReportString } from '../../shared/crash-report-redaction' +import { sanitizeCrashReportString } from '../../shared/crash-reporting/crash-report-redaction' import { redactString } from '../observability/redactor' export const MAX_NATIVE_HANG_REPORT_BYTES = 2 * 1024 * 1024 diff --git a/src/main/hang-watchdog/previous-hang-detection.ts b/src/main/hang-watchdog/previous-hang-detection.ts index 8def03b0f7f..82da7086526 100644 --- a/src/main/hang-watchdog/previous-hang-detection.ts +++ b/src/main/hang-watchdog/previous-hang-detection.ts @@ -1,6 +1,6 @@ import { preservePreviousRendererHangs, reportPreviousRendererHangs } from './renderer-hang-records' import { rmSync } from 'node:fs' -import type { CrashReportBreadcrumbData } from '../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../shared/crash-reporting/crash-reporting' import { resolveObservabilityConsent } from '../observability' import { hasActiveTraceSink } from '../observability/tracer' import { recordDurableCrashBreadcrumb } from '../crash-reporting/breadcrumbs/durable-crash-breadcrumb' diff --git a/src/main/hang-watchdog/previous-native-hang-telemetry.ts b/src/main/hang-watchdog/previous-native-hang-telemetry.ts index e90532c2525..ce3e20889e6 100644 --- a/src/main/hang-watchdog/previous-native-hang-telemetry.ts +++ b/src/main/hang-watchdog/previous-native-hang-telemetry.ts @@ -1,4 +1,4 @@ -import type { EventProps } from '../../shared/telemetry-events' +import type { EventProps } from '../../shared/telemetry/telemetry-event-classification' import type { HangDetectionMarker } from './hang-detection-marker' import { listNativeHangCaptures, diff --git a/src/main/ipc/crash-reporting/crash-reporting-renderer-breadcrumbs.ts b/src/main/ipc/crash-reporting/crash-reporting-renderer-breadcrumbs.ts index 26622d96501..1ef21eb8cd3 100644 --- a/src/main/ipc/crash-reporting/crash-reporting-renderer-breadcrumbs.ts +++ b/src/main/ipc/crash-reporting/crash-reporting-renderer-breadcrumbs.ts @@ -1,8 +1,8 @@ -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import { sanitizeCrashReportDetails, sanitizeCrashReportString -} from '../../../shared/crash-report-redaction' +} from '../../../shared/crash-reporting/crash-report-redaction' import { recordCoalescedCrashBreadcrumb, recordCrashBreadcrumb diff --git a/src/main/ipc/crash-reporting/crash-reporting-renderer-error-report.ts b/src/main/ipc/crash-reporting/crash-reporting-renderer-error-report.ts index 37fde1f327e..c0aa765660b 100644 --- a/src/main/ipc/crash-reporting/crash-reporting-renderer-error-report.ts +++ b/src/main/ipc/crash-reporting/crash-reporting-renderer-error-report.ts @@ -3,15 +3,15 @@ import { app } from 'electron' import type { ReactErrorBoundaryReportArgs, ReactErrorBoundaryReportResult -} from '../../../shared/crash-reporting' +} from '../../../shared/crash-reporting/crash-reporting' import { CRASH_REPORT_ATTRIBUTION_DETAIL_KEY, CRASH_REPORT_ATTRIBUTION_NOTE_DETAIL_KEY, UNRELIABLE_BOUNDARY_ATTRIBUTION, UNRELIABLE_BOUNDARY_ATTRIBUTION_NOTE -} from '../../../shared/react-update-depth-attribution' +} from '../../../shared/crash-reporting/react-update-depth-attribution' import type { CrashReportStore } from '../../crash-reporting/reports/crash-report-store' -import { rendererCrashBreadcrumbOrigin } from '../../../shared/crash-breadcrumb-origin' +import { rendererCrashBreadcrumbOrigin } from '../../../shared/crash-reporting/crash-breadcrumb-origin' import { getCrashBreadcrumbSnapshot } from '../../crash-reporting/breadcrumbs/crash-breadcrumb-store' export const recentRendererErrorReportKeys = new Map() diff --git a/src/main/ipc/crash-reporting/crash-reporting-submission.ts b/src/main/ipc/crash-reporting/crash-reporting-submission.ts index 559a0bd311f..8be01e6ccbd 100644 --- a/src/main/ipc/crash-reporting/crash-reporting-submission.ts +++ b/src/main/ipc/crash-reporting/crash-reporting-submission.ts @@ -1,12 +1,12 @@ import os from 'node:os' import { app } from 'electron' -import type { CrashReportDiagnosticBundle } from '../../../shared/crash-reporting-diagnostic-bundle' +import type { CrashReportDiagnosticBundle } from '../../../shared/crash-reporting/crash-reporting-diagnostic-bundle' import { type CrashReportSubmitArgs, type CrashReportSubmitResult, formatCrashReportText, formatUncapturedCrashReportText -} from '../../../shared/crash-reporting' +} from '../../../shared/crash-reporting/crash-reporting' import { submitFeedback } from '../feedback' import type { CrashReportStore } from '../../crash-reporting/reports/crash-report-store' import { diff --git a/src/main/ipc/crash-reporting/crash-reporting.ts b/src/main/ipc/crash-reporting/crash-reporting.ts index cd1cfc5ce82..7c421612007 100644 --- a/src/main/ipc/crash-reporting/crash-reporting.ts +++ b/src/main/ipc/crash-reporting/crash-reporting.ts @@ -6,9 +6,9 @@ import { type CrashReportCopyDiagnosticsArgs, type CrashReportSubmitArgs, formatCrashReportText -} from '../../../shared/crash-reporting' +} from '../../../shared/crash-reporting/crash-reporting' import type { CrashReportStore } from '../../crash-reporting/reports/crash-report-store' -import { rendererCrashBreadcrumbOrigin } from '../../../shared/crash-breadcrumb-origin' +import { rendererCrashBreadcrumbOrigin } from '../../../shared/crash-reporting/crash-breadcrumb-origin' import { assertClipboardTextWriteWithinLimit, isClipboardTextWriteTooLargeError diff --git a/src/main/ipc/diagnostics.ts b/src/main/ipc/diagnostics.ts index fa9c841d311..17cdc550ea6 100644 --- a/src/main/ipc/diagnostics.ts +++ b/src/main/ipc/diagnostics.ts @@ -12,7 +12,7 @@ import { type DiagnosticsStatus } from '../observability' import { translateMain } from '../i18n/main-i18n' -import { diagnosticsBundleFailure } from '../../shared/diagnostics-bundle-failure-copy' +import { diagnosticsBundleFailure } from '../../shared/diagnostics/bundles/diagnostics-bundle-failure-copy' import type { CollectedBundle } from '../observability/bundle' import type { UploadBundleResult } from '../observability/diagnostic-bundle-upload' import { diff --git a/src/main/ipc/feedback-image-attachments.test.ts b/src/main/ipc/feedback-image-attachments.test.ts index 4abbf257ca6..7b3b1eb1ed0 100644 --- a/src/main/ipc/feedback-image-attachments.test.ts +++ b/src/main/ipc/feedback-image-attachments.test.ts @@ -1,9 +1,4 @@ import { describe, expect, it } from 'vitest' -import { - MAX_FEEDBACK_IMAGE_BYTES, - MAX_FEEDBACK_IMAGE_COUNT, - MAX_FEEDBACK_IMAGE_TOTAL_BYTES -} from '../../shared/feedback-image-limits' import { appendFeedbackImagesToFormData, isSupportedFeedbackImageContentType, @@ -40,14 +35,6 @@ describe('appendFeedbackImagesToFormData', () => { }) describe('validateFeedbackImages', () => { - it('rejects more than the supported count', () => { - expect( - validateFeedbackImages( - Array.from({ length: MAX_FEEDBACK_IMAGE_COUNT + 1 }, () => image('image/png')) - ) - ).toBe(`Attach ${MAX_FEEDBACK_IMAGE_COUNT} images or fewer.`) - }) - it('rejects malformed attachment collections and byte payloads', () => { expect(validateFeedbackImages('image/png')).toBe('Image attachments must be a list.') expect(validateFeedbackImages([null])).toBe('Invalid image attachment.') @@ -59,30 +46,4 @@ describe('validateFeedbackImages', () => { it('rejects an empty attachment', () => { expect(validateFeedbackImages([image('image/png', 0)])).toBe('Image attachment is empty.') }) - - it('rejects an attachment over the byte cap', () => { - expect(validateFeedbackImages([image('image/png', MAX_FEEDBACK_IMAGE_BYTES + 1)])).toBe( - `Each image must be ${MAX_FEEDBACK_IMAGE_BYTES} bytes or fewer.` - ) - }) - - it('accepts a set that totals exactly the attachment budget', () => { - const quarter = MAX_FEEDBACK_IMAGE_TOTAL_BYTES / MAX_FEEDBACK_IMAGE_COUNT - expect( - validateFeedbackImages( - Array.from({ length: MAX_FEEDBACK_IMAGE_COUNT }, () => image('image/png', quarter)) - ) - ).toBeNull() - }) - - it('rejects a set over the total byte budget even when each image fits', () => { - const half = MAX_FEEDBACK_IMAGE_TOTAL_BYTES / 2 - expect( - validateFeedbackImages([ - image('image/png', half), - image('image/png', half), - image('image/png', 1) - ]) - ).toBe(`Image attachments must total ${MAX_FEEDBACK_IMAGE_TOTAL_BYTES} bytes or fewer.`) - }) }) diff --git a/src/main/ipc/feedback-image-attachments.ts b/src/main/ipc/feedback-image-attachments.ts index 6e48c4e96c7..e456d9a55ea 100644 --- a/src/main/ipc/feedback-image-attachments.ts +++ b/src/main/ipc/feedback-image-attachments.ts @@ -3,8 +3,8 @@ import { MAX_FEEDBACK_IMAGE_BYTES, MAX_FEEDBACK_IMAGE_COUNT, MAX_FEEDBACK_IMAGE_TOTAL_BYTES -} from '../../shared/feedback-image-limits' -import type { FeedbackImageAttachment } from '../../shared/feedback-submit-contract' +} from '../../shared/feedback/feedback-image-limits' +import type { FeedbackImageAttachment } from '../../shared/feedback/feedback-submit-contract' // Match the server allow-list; Slack selects rendering by filename extension. const FEEDBACK_IMAGE_EXTENSIONS: Record = { diff --git a/src/main/ipc/feedback-request.ts b/src/main/ipc/feedback-request.ts index 0a756c9f663..e2c015d9fa4 100644 --- a/src/main/ipc/feedback-request.ts +++ b/src/main/ipc/feedback-request.ts @@ -3,7 +3,7 @@ import { appendFeedbackImagesToFormData } from './feedback-image-attachments' import type { FeedbackImageAttachment, FeedbackRequestFailure -} from '../../shared/feedback-submit-contract' +} from '../../shared/feedback/feedback-submit-contract' // Main-process HTTP avoids CORS preflights rejected by feedback when packaged renderers use file origins. export const FEEDBACK_API_URL = 'https://orca.dev/v1/feedback' diff --git a/src/main/ipc/feedback.ts b/src/main/ipc/feedback.ts index b7c8193c007..b5fdcb19121 100644 --- a/src/main/ipc/feedback.ts +++ b/src/main/ipc/feedback.ts @@ -6,7 +6,7 @@ import type { FeedbackRequestFailure, FeedbackSubmitArgs, FeedbackSubmitResult -} from '../../shared/feedback-submit-contract' +} from '../../shared/feedback/feedback-submit-contract' import { errorFailure, FEEDBACK_API_URL, diff --git a/src/main/ipc/macos-symbolic-hotkeys-probe.ts b/src/main/ipc/macos-symbolic-hotkeys-probe.ts index 802c4393603..b3e8da53e76 100644 --- a/src/main/ipc/macos-symbolic-hotkeys-probe.ts +++ b/src/main/ipc/macos-symbolic-hotkeys-probe.ts @@ -2,7 +2,7 @@ import { ipcMain } from 'electron' import { capturedDigitRowChordsFromSymbolicHotkeysJson, type MacCapturedDigitRowChord -} from '../../shared/macos-symbolic-hotkeys' +} from '../../shared/keybindings/macos-symbolic-hotkeys' // Export live preferences; the plist may be stale. const MAC_SYMBOLIC_HOTKEYS_JSON_COMMAND = [ diff --git a/src/main/ipc/memory.ts b/src/main/ipc/memory.ts index 8bf6348d93a..ebde166877b 100644 --- a/src/main/ipc/memory.ts +++ b/src/main/ipc/memory.ts @@ -1,5 +1,5 @@ import { BrowserWindow, ipcMain } from 'electron' -import type { MemorySnapshot } from '../../shared/process-stats-types' +import type { MemorySnapshot } from '../../shared/diagnostics/process-stats-types' import type { Store } from '../persistence/loading-store/store' import { collectMemorySnapshot } from '../memory/collector' diff --git a/src/main/ipc/onboarding.ts b/src/main/ipc/onboarding.ts index f379805b4e0..846a226a1ae 100644 --- a/src/main/ipc/onboarding.ts +++ b/src/main/ipc/onboarding.ts @@ -1,7 +1,7 @@ import { ipcMain } from 'electron' import { sanitizeOnboardingUpdate } from '../persistence/applying-settings/onboarding-normalization' import type { Store } from '../persistence/loading-store/store' -import type { OnboardingState } from '../../shared/onboarding-state-types' +import type { OnboardingState } from '../../shared/onboarding/onboarding-state-types' import type { ChatUiLaunchTipVariant } from '../../shared/native-chat/chat-ui-launch-tip-audience' import { isChatUiLaunchTipDeferredForConsent } from '../telemetry/chat-ui-launch-tip-cohort' diff --git a/src/main/ipc/pty/ipc/spawn-qoder-command.ts b/src/main/ipc/pty/ipc/spawn-qoder-command.ts index 0fc6f062490..ccfe4b74339 100644 --- a/src/main/ipc/pty/ipc/spawn-qoder-command.ts +++ b/src/main/ipc/pty/ipc/spawn-qoder-command.ts @@ -1,6 +1,6 @@ import { resolveQoderTerminalCommand } from '../../../runtime/terminal/launch/qoder-terminal-command-resolution' import { resolveStartupShell } from '../../../../shared/agent-launch/startup/tui-agent-startup-shell' -import { resolveLocalWindowsAgentStartupShell } from '../../../../shared/windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../../../shared/shell/launch/windows-terminal-shell' import type { PtyIpcSpawnState } from './spawn-state' export async function preparePtyIpcQoderCommand(ctx: PtyIpcSpawnState): Promise { diff --git a/src/main/ipc/pty/pane/spawn-telemetry.ts b/src/main/ipc/pty/pane/spawn-telemetry.ts index 4b3eba5466e..9b0008912bd 100644 --- a/src/main/ipc/pty/pane/spawn-telemetry.ts +++ b/src/main/ipc/pty/pane/spawn-telemetry.ts @@ -4,7 +4,7 @@ import { agentKindSchema, launchSourceSchema, requestKindSchema -} from '../../../../shared/telemetry-events' +} from '../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { PtySpawnIpcArgs } from '../ipc/spawn-types' export function recordAgentStartTelemetry( diff --git a/src/main/ipc/pty/spawn-execute-failure.ts b/src/main/ipc/pty/spawn-execute-failure.ts index 70a15f9d3a4..7534ec14055 100644 --- a/src/main/ipc/pty/spawn-execute-failure.ts +++ b/src/main/ipc/pty/spawn-execute-failure.ts @@ -4,7 +4,7 @@ import type { OrcaRuntimeService } from '../../runtime/orca-runtime' import { classifyError } from '../../telemetry/classify-error' import { track } from '../../telemetry/client' import { getCohortAtEmit } from '../../telemetry/cohort-classifier' -import { agentKindSchema } from '../../../shared/telemetry-events' +import { agentKindSchema } from '../../../shared/telemetry/schemas/telemetry-property-schemas' import { normalizeNodePtySpawnError } from './provider/liveness' import { restoreProvisionalPtySize, type PtySpawnSizeSeed } from './spawn-options-assembly' import { clearProviderPtyState } from './provider/state-cleanup' diff --git a/src/main/ipc/pty/spawn-options-assembly.ts b/src/main/ipc/pty/spawn-options-assembly.ts index 383ebb560d0..7889de6cdc5 100644 --- a/src/main/ipc/pty/spawn-options-assembly.ts +++ b/src/main/ipc/pty/spawn-options-assembly.ts @@ -1,6 +1,6 @@ import { withClaudeAgentViewPlugin } from '../../../shared/agent-hook-listener/providers/claude/view/claude-agent-view-launch' import { resolveStartupShell } from '../../../shared/agent-launch/startup/tui-agent-startup-shell' -import { resolveLocalWindowsAgentStartupShell } from '../../../shared/windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../../shared/shell/launch/windows-terminal-shell' import { getAppEnvironment } from '../../../shared/app-environment' import type { GlobalSettings } from '../../../shared/global-settings-types' import { isTuiAgent } from '../../../shared/agent-launch/catalog/tui-agent-config' diff --git a/src/main/ipc/readdir-error-diagnostics.ts b/src/main/ipc/readdir-error-diagnostics.ts index d6ba9e6320e..6a57469c7d6 100644 --- a/src/main/ipc/readdir-error-diagnostics.ts +++ b/src/main/ipc/readdir-error-diagnostics.ts @@ -1,4 +1,4 @@ -import type { CrashReportBreadcrumbData } from '../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../shared/crash-reporting/crash-reporting' export type ReadDirThrowSite = 'ssh-provider' | 'authorize' | 'readdir' diff --git a/src/main/ipc/repos/repo-added-telemetry.ts b/src/main/ipc/repos/repo-added-telemetry.ts index 220e2fea6e8..851c2752689 100644 --- a/src/main/ipc/repos/repo-added-telemetry.ts +++ b/src/main/ipc/repos/repo-added-telemetry.ts @@ -1,4 +1,4 @@ -import type { RepoMethod } from '../../../shared/telemetry-events' +import type { RepoMethod } from '../../../shared/telemetry/schemas/telemetry-property-schemas' import { track } from '../../telemetry/client' import { getCohortAtEmit } from '../../telemetry/cohort-classifier' diff --git a/src/main/ipc/settings.ts b/src/main/ipc/settings.ts index c5e0e22e37c..479eb8d85b7 100644 --- a/src/main/ipc/settings.ts +++ b/src/main/ipc/settings.ts @@ -11,7 +11,10 @@ import { setMainUiLanguage } from '../i18n/main-i18n' import { rebuildAppMenu } from '../menu/register-app-menu' import { rebuildSystemTrayMenu } from '../tray/system-tray' import { track } from '../telemetry/client' -import { SETTINGS_CHANGED_WHITELIST, type SettingsChangedKey } from '../../shared/telemetry-events' +import { + SETTINGS_CHANGED_WHITELIST, + type SettingsChangedKey +} from '../../shared/telemetry/schemas/telemetry-property-schemas' import type { AgentAwakeService } from '../power/agent-awake-service' import { sanitizeFloatingWorkspaceDirectorySetting } from './floating-workspace-directory' import { applyAgentStatusHooksEnabled } from '../agent-hooks/installation/managed-agent-hook-controls' diff --git a/src/main/ipc/telemetry.ts b/src/main/ipc/telemetry.ts index 77c9e272d80..5e69f4d1a1e 100644 --- a/src/main/ipc/telemetry.ts +++ b/src/main/ipc/telemetry.ts @@ -18,9 +18,12 @@ import { getCohortAtEmit } from '../telemetry/cohort-classifier' import { getOnboardingCohortAtEmit } from '../telemetry/onboarding-cohort-classifier' import { resolveConsent, type ConsentState } from '../telemetry/consent' import type { Store } from '../persistence/loading-store/store' -import { isCohortExtendedEvent, isOnboardingEvent } from '../../shared/telemetry-events' -import type { EventName, OptInVia } from '../../shared/telemetry-events' -import type { EventProps } from '../../shared/telemetry-event-classification' +import { + isCohortExtendedEvent, + isOnboardingEvent +} from '../../shared/telemetry/telemetry-event-classification' +import type { EventName, EventProps } from '../../shared/telemetry/telemetry-event-classification' +import type { OptInVia } from '../../shared/telemetry/schemas/telemetry-property-schemas' // Derive consent provenance synchronously from pre-mutation settings. let storeRef: Store | null = null diff --git a/src/main/ipc/terminal-startup-color-query-replies.ts b/src/main/ipc/terminal-startup-color-query-replies.ts index fb58a895b05..a7387a0e076 100644 --- a/src/main/ipc/terminal-startup-color-query-replies.ts +++ b/src/main/ipc/terminal-startup-color-query-replies.ts @@ -2,7 +2,7 @@ import { parsePtyStartupIngressIntent } from '../../shared/terminal/pty/ingress/ import { normalizeColorQueryReplyColors } from '../../shared/terminal/pty/ingress/pty-owner-color-query-colors' import { recognizeAgentLaunchCommand } from '../../shared/agent-launch/startup/agent-command-line-intent' import { isTuiAgent } from '../../shared/agent-launch/catalog/tui-agent-config' -import { agentKindSchema } from '../../shared/telemetry-events' +import { agentKindSchema } from '../../shared/telemetry/schemas/telemetry-property-schemas' import type { SleepingAgentLaunchConfig } from '../../shared/agent-session/lifecycle/agent-session-resume' function isAgentLaunch(args: { diff --git a/src/main/ipc/ui.ts b/src/main/ipc/ui.ts index 0f47f802993..6885e32a2ff 100644 --- a/src/main/ipc/ui.ts +++ b/src/main/ipc/ui.ts @@ -8,7 +8,7 @@ import { JiraSavedFilterMutationParam } from '../../shared/rpc-contract/jira/jir import { BrowserWindow, ipcMain, webContents, type WebContents } from 'electron' import type { Store } from '../persistence/loading-store/store' import type { PersistedUIState } from '../../shared/persisted-ui-state-types' -import { isFeatureInteractionId } from '../../shared/feature-interactions' +import { isFeatureInteractionId } from '../../shared/feature-education/interactions/feature-interactions' import { isWslMoveWindowWriteHeld } from '../persistence/moving-wsl-projects/quiescence/wsl-move-window-write-hold' import { isTrustedMainRendererSender } from './main-renderer-sender-trust' diff --git a/src/main/ipc/workspace-create-error-classifier.ts b/src/main/ipc/workspace-create-error-classifier.ts index 453bf8a23ba..4da408c119c 100644 --- a/src/main/ipc/workspace-create-error-classifier.ts +++ b/src/main/ipc/workspace-create-error-classifier.ts @@ -1,6 +1,6 @@ // Emit only error-class enums, never interpolated paths or branch names; keep reviewed matches narrow and unknown otherwise. -import type { WorkspaceCreateErrorClass } from '../../shared/telemetry-events' +import type { WorkspaceCreateErrorClass } from '../../shared/telemetry/schemas/telemetry-property-schemas' export function classifyWorkspaceCreateError(error: unknown): WorkspaceCreateErrorClass { const text = (error instanceof Error ? error.message : '').toLowerCase() diff --git a/src/main/ipc/worktrees/create/register-worktree-create-handlers.ts b/src/main/ipc/worktrees/create/register-worktree-create-handlers.ts index 0a71ff7829a..739fafb8fe7 100644 --- a/src/main/ipc/worktrees/create/register-worktree-create-handlers.ts +++ b/src/main/ipc/worktrees/create/register-worktree-create-handlers.ts @@ -12,7 +12,8 @@ import { addWorktreeCreatePhaseAttributes, withWorktreeSpan } from '../../../observability/instrumentation' -import { workspaceSourceSchema, type WorkspaceSource } from '../../../../shared/telemetry-events' +import { workspaceSourceSchema } from '../../../../shared/telemetry/schemas/telemetry-property-schemas' +import type { WorkspaceSource } from '../../../../shared/workspace-source' import { isFolderRepo } from '../../../../shared/repo-kind' import { createLocalWorktree, notifyWorktreesChanged } from '../../worktree-remote' diff --git a/src/main/macos-update-requirement/macos-upgrade-support.ts b/src/main/macos-update-requirement/macos-upgrade-support.ts index eb2e7588803..89b45d02a9c 100644 --- a/src/main/macos-update-requirement/macos-upgrade-support.ts +++ b/src/main/macos-update-requirement/macos-upgrade-support.ts @@ -1,6 +1,9 @@ import { app } from 'electron' import { runProcess } from '@orca/process-host' -import { isVenturaRequirement, type MacosUpgradeSupport } from '../../shared/macos-upgrade-support' +import { + isVenturaRequirement, + type MacosUpgradeSupport +} from '../../shared/updater/requirements/macos-upgrade-support' // Ventura's Intel model boundaries: https://support.apple.com/en-us/102861. const VENTURA_INTEL_MODELS = { diff --git a/src/main/memory/collector.ts b/src/main/memory/collector.ts index 8a005962b3a..11d7a52d285 100644 --- a/src/main/memory/collector.ts +++ b/src/main/memory/collector.ts @@ -8,7 +8,7 @@ import type { SessionMemory, UsageValues, WorktreeMemory -} from '../../shared/process-stats-types' +} from '../../shared/diagnostics/process-stats-types' import { ORPHAN_WORKTREE_ID } from '../../shared/constants' import { listRegisteredPtys } from './pty-registry' import { enumerateWindowsProcessResources } from './windows-process-resource-collector' diff --git a/src/main/memory/host-memory.ts b/src/main/memory/host-memory.ts index cba7498cced..f7b189e1682 100644 --- a/src/main/memory/host-memory.ts +++ b/src/main/memory/host-memory.ts @@ -2,7 +2,10 @@ import { runProcess } from '@orca/process-host' import { readFile } from 'node:fs/promises' import os from 'node:os' import path from 'node:path' -import type { HostAvailableMemorySource, HostMemory } from '../../shared/process-stats-types' +import type { + HostAvailableMemorySource, + HostMemory +} from '../../shared/diagnostics/process-stats-types' const MEMORY_PRESSURE_TIMEOUT_MS = 1_000 const MEMORY_PRESSURE_MAX_BUFFER = 64 * 1024 diff --git a/src/main/memory/memory-snapshot-buckets.ts b/src/main/memory/memory-snapshot-buckets.ts index 4d8510f6f43..e3bbffbfe8e 100644 --- a/src/main/memory/memory-snapshot-buckets.ts +++ b/src/main/memory/memory-snapshot-buckets.ts @@ -1,6 +1,6 @@ import { basename } from 'node:path' import { splitWorktreeIdForFilesystem } from '../../shared/worktree/id' -import type { SessionMemory } from '../../shared/process-stats-types' +import type { SessionMemory } from '../../shared/diagnostics/process-stats-types' import type { Store } from '../persistence/loading-store/store' import { parseWorkspaceKey } from '../../shared/workspace-scope' import { folderWorkspaceToWorktree } from '../../shared/folder-workspaces/folder-workspace-worktree' diff --git a/src/main/memory/memory-snapshot-values.ts b/src/main/memory/memory-snapshot-values.ts index 154303aecb8..3b857a69526 100644 --- a/src/main/memory/memory-snapshot-values.ts +++ b/src/main/memory/memory-snapshot-values.ts @@ -1,4 +1,7 @@ -import type { MemorySnapshot, ProcessCommitMetric } from '../../shared/process-stats-types' +import type { + MemorySnapshot, + ProcessCommitMetric +} from '../../shared/diagnostics/process-stats-types' import { fallbackHostMemory } from './host-memory' import { getProcessMemoryMetric } from './process-memory-metric' diff --git a/src/main/memory/process-index.ts b/src/main/memory/process-index.ts index 1fdf9df5f28..86588a104c7 100644 --- a/src/main/memory/process-index.ts +++ b/src/main/memory/process-index.ts @@ -1,4 +1,4 @@ -import type { ProcessMemoryMetric } from '../../shared/process-stats-types' +import type { ProcessMemoryMetric } from '../../shared/diagnostics/process-stats-types' import { getProcessOutputFields, iterateProcessOutputLines diff --git a/src/main/memory/process-memory-metric.ts b/src/main/memory/process-memory-metric.ts index 49d9fded195..faebc5e26af 100644 --- a/src/main/memory/process-memory-metric.ts +++ b/src/main/memory/process-memory-metric.ts @@ -1,5 +1,5 @@ import os from 'node:os' -import type { ProcessMemoryMetric } from '../../shared/process-stats-types' +import type { ProcessMemoryMetric } from '../../shared/diagnostics/process-stats-types' export function getProcessMemoryMetric( platform: NodeJS.Platform = os.platform() diff --git a/src/main/native-chat/agent-launch/structured-agent-configured-args.ts b/src/main/native-chat/agent-launch/structured-agent-configured-args.ts index 9e8971943c0..93feda6af83 100644 --- a/src/main/native-chat/agent-launch/structured-agent-configured-args.ts +++ b/src/main/native-chat/agent-launch/structured-agent-configured-args.ts @@ -6,7 +6,7 @@ import { type AgentLaunchProfileSettings } from '../../../shared/agent-launch/choices/tui-agent-launch-defaults' import { tokenizeStartupCommand } from '../../../shared/agent-launch/startup/tui-agent-startup-shell' -import { resolveLocalWindowsAgentStartupShell } from '../../../shared/windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../../shared/shell/launch/windows-terminal-shell' /** Match terminal argument grouping before filtering provider-owned flags. */ export function structuredAgentConfiguredArgs( diff --git a/src/main/native-chat/agent-model-catalog/agent-model-catalog-script-entry.ts b/src/main/native-chat/agent-model-catalog/agent-model-catalog-script-entry.ts index cfb6a4be997..19e03940b57 100644 --- a/src/main/native-chat/agent-model-catalog/agent-model-catalog-script-entry.ts +++ b/src/main/native-chat/agent-model-catalog/agent-model-catalog-script-entry.ts @@ -1,4 +1,4 @@ -import { NODE_INTERPRETER_OPTIONS_WITH_VALUE } from '../../../shared/node-interpreter-options' +import { NODE_INTERPRETER_OPTIONS_WITH_VALUE } from '../../../shared/agent-status/process/node-interpreter-options' const NODE_FLAGS = new Set([ '--no-warnings', diff --git a/src/main/persistence/applying-settings/feature-interaction-recording.ts b/src/main/persistence/applying-settings/feature-interaction-recording.ts index 9bc970c8dfb..b9f740fe17f 100644 --- a/src/main/persistence/applying-settings/feature-interaction-recording.ts +++ b/src/main/persistence/applying-settings/feature-interaction-recording.ts @@ -1,12 +1,14 @@ import type { PersistedState } from '../../../shared/persisted-state-types' import { compareFeatureInteractionUsageBuckets, - getFeatureInteractionCategory, - getFeatureInteractionUsageBucket, + getFeatureInteractionUsageBucket +} from '../../../shared/feature-education/interactions/feature-interaction-usage-buckets' +import { getFeatureInteractionCategory } from '../../../shared/feature-education/interactions/feature-interaction-categories' +import { normalizeFeatureInteractions, - normalizeFeatureInteractionTelemetryBuckets, - type FeatureInteractionId -} from '../../../shared/feature-interactions' + normalizeFeatureInteractionTelemetryBuckets +} from '../../../shared/feature-education/interactions/feature-interactions' +import type { FeatureInteractionId } from '../../../shared/feature-education/interactions/feature-interaction-catalog' import { track } from '../../telemetry/client' import { getCohortAtEmit } from '../../telemetry/cohort-classifier' diff --git a/src/main/persistence/applying-settings/onboarding-normalization.ts b/src/main/persistence/applying-settings/onboarding-normalization.ts index d0c40c4e1e2..2349da5d3ec 100644 --- a/src/main/persistence/applying-settings/onboarding-normalization.ts +++ b/src/main/persistence/applying-settings/onboarding-normalization.ts @@ -2,7 +2,7 @@ import type { OnboardingChecklistState, OnboardingOutcome, OnboardingState -} from '../../../shared/onboarding-state-types' +} from '../../../shared/onboarding/onboarding-state-types' import type { NotificationSettings } from '../../../shared/notification-settings-types' import type { PersistedState } from '../../../shared/persisted-state-types' import { getDefaultNotificationSettings } from '../../../shared/notification-settings-defaults' @@ -11,7 +11,7 @@ import { getDefaultOnboardingState, ONBOARDING_FINAL_STEP, ONBOARDING_FLOW_VERSION -} from '../../../shared/onboarding-defaults' +} from '../../../shared/onboarding/onboarding-defaults' export function normalizeNotificationSettings(value: unknown): NotificationSettings { const defaults = getDefaultNotificationSettings() diff --git a/src/main/persistence/applying-settings/ui-interaction-merge.ts b/src/main/persistence/applying-settings/ui-interaction-merge.ts index 8c1eca8e8c7..021e70480d2 100644 --- a/src/main/persistence/applying-settings/ui-interaction-merge.ts +++ b/src/main/persistence/applying-settings/ui-interaction-merge.ts @@ -1,8 +1,8 @@ import type { PersistedState } from '../../../shared/persisted-state-types' import type { WorkspaceLineage } from '../../../shared/worktree/lineage-types' -import { normalizeFeatureInteractions } from '../../../shared/feature-interactions' -import { normalizeContextualTourIds } from '../../../shared/contextual-tours' -import { normalizeFeatureTipIds } from '../../../shared/feature-tips' +import { normalizeFeatureInteractions } from '../../../shared/feature-education/interactions/feature-interactions' +import { normalizeContextualTourIds } from '../../../shared/feature-education/contextual-tours/contextual-tours' +import { normalizeFeatureTipIds } from '../../../shared/feature-education/feature-tips' import { type WorkspaceKey, isWorkspaceKey } from '../../../shared/workspace-scope' export function mergeFeatureInteractions( diff --git a/src/main/persistence/applying-settings/ui-state-read.ts b/src/main/persistence/applying-settings/ui-state-read.ts index 0d4eed7796f..1ead0cdb153 100644 --- a/src/main/persistence/applying-settings/ui-state-read.ts +++ b/src/main/persistence/applying-settings/ui-state-read.ts @@ -19,9 +19,9 @@ import { } from '../../../shared/execution-host' import { normalizeManualRepoOrder } from '../../../shared/manual-repo-order' import { normalizeBrowserPageZoomLevel } from '../../../shared/browser/site-settings/browser-page-zoom' -import { normalizeFeatureTipIds } from '../../../shared/feature-tips' -import { normalizeContextualTourIds } from '../../../shared/contextual-tours' -import { normalizeFeatureInteractions } from '../../../shared/feature-interactions' +import { normalizeFeatureTipIds } from '../../../shared/feature-education/feature-tips' +import { normalizeContextualTourIds } from '../../../shared/feature-education/contextual-tours/contextual-tours' +import { normalizeFeatureInteractions } from '../../../shared/feature-education/interactions/feature-interactions' import { normalizeGroupBy, normalizeProjectOrderBy, diff --git a/src/main/persistence/applying-settings/ui-state-update.ts b/src/main/persistence/applying-settings/ui-state-update.ts index 7011b23678b..44f92a0ca45 100644 --- a/src/main/persistence/applying-settings/ui-state-update.ts +++ b/src/main/persistence/applying-settings/ui-state-update.ts @@ -21,9 +21,9 @@ import { import { workspaceHostScopeForVisibleHosts } from '../../../shared/workspace-view/workspace-host-visibility' import { normalizeManualRepoOrder } from '../../../shared/manual-repo-order' import { normalizeBrowserPageZoomLevel } from '../../../shared/browser/site-settings/browser-page-zoom' -import { normalizeFeatureTipIds } from '../../../shared/feature-tips' -import { normalizeContextualTourIds } from '../../../shared/contextual-tours' -import { normalizeFeatureInteractions } from '../../../shared/feature-interactions' +import { normalizeFeatureTipIds } from '../../../shared/feature-education/feature-tips' +import { normalizeContextualTourIds } from '../../../shared/feature-education/contextual-tours/contextual-tours' +import { normalizeFeatureInteractions } from '../../../shared/feature-education/interactions/feature-interactions' import { mergeWorkspaceCleanupUIState } from '../../../shared/workspace-cleanup/workspace-cleanup-ui-state' import { persistedUIValuesEqual } from '../../../shared/persisted-ui-equality' import { diff --git a/src/main/persistence/loading-store/profile-loading/normalize-loaded-profile-state.ts b/src/main/persistence/loading-store/profile-loading/normalize-loaded-profile-state.ts index 3de7273f2a7..6cc222c3328 100644 --- a/src/main/persistence/loading-store/profile-loading/normalize-loaded-profile-state.ts +++ b/src/main/persistence/loading-store/profile-loading/normalize-loaded-profile-state.ts @@ -1,6 +1,6 @@ import { normalizePersistedMobileClientTabSelections } from '../../../runtime/client/navigation/client-session-tab-selection-persistence' import type { SshRemotePtyLease } from '../../../../shared/remote-runtime/ssh/ssh-types' -import { normalizeFeatureInteractionTelemetryBuckets } from '../../../../shared/feature-interactions' +import { normalizeFeatureInteractionTelemetryBuckets } from '../../../../shared/feature-education/interactions/feature-interactions' import { normalizeFolderWorkspaceDiffComments } from '../../../workspaces/catalog/folder-workspace-diff-comments' import { normalizeFolderWorkspaces } from '../../../../shared/folder-workspaces/folder-workspaces' import { normalizeOrcadMigrationEvictedReceipts } from '../../../../shared/orcad-migration/orcad-migration-evicted-receipts' diff --git a/src/main/persistence/loading-store/profile-loading/normalize-loaded-ui-state.ts b/src/main/persistence/loading-store/profile-loading/normalize-loaded-ui-state.ts index 6f8d328d320..e1570eea32a 100644 --- a/src/main/persistence/loading-store/profile-loading/normalize-loaded-ui-state.ts +++ b/src/main/persistence/loading-store/profile-loading/normalize-loaded-ui-state.ts @@ -23,7 +23,7 @@ import { resolveSetupGuideSidebarDismissedOnLoad } from '../../applying-settings/onboarding-normalization' import type { PersistedState } from '../../../../shared/persisted-state-types' -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' export function normalizeLoadedUiState( parsed: PersistedState, diff --git a/src/main/persistence/loading-store/profile-preferences/profile-preferences.ts b/src/main/persistence/loading-store/profile-preferences/profile-preferences.ts index 0b6b17f52a7..29e0960a3c0 100644 --- a/src/main/persistence/loading-store/profile-preferences/profile-preferences.ts +++ b/src/main/persistence/loading-store/profile-preferences/profile-preferences.ts @@ -1,12 +1,12 @@ -import { normalizeFeatureTipIds } from '../../../../shared/feature-tips' +import { normalizeFeatureTipIds } from '../../../../shared/feature-education/feature-tips' import type { GlobalSettings } from '../../../../shared/global-settings-types' import { retireAtRestCommandSettings } from '../../../native-chat/agent-session-wire/options/at-rest-command-context' import { createAgentModelCatalogSettingsExpiry } from '../../../native-chat/agent-model-catalog/agent-model-catalog-account-expiry' import { agentModelCatalogStore } from '../../../native-chat/agent-model-catalog/agent-model-catalog-store' -import type { OnboardingChecklistState } from '../../../../shared/onboarding-state-types' +import type { OnboardingChecklistState } from '../../../../shared/onboarding/onboarding-state-types' import type { PersistedState } from '../../../../shared/persisted-state-types' -import { getDefaultOnboardingState } from '../../../../shared/onboarding-defaults' -import type { FeatureInteractionId } from '../../../../shared/feature-interaction-catalog' +import { getDefaultOnboardingState } from '../../../../shared/onboarding/onboarding-defaults' +import type { FeatureInteractionId } from '../../../../shared/feature-education/interactions/feature-interaction-catalog' import { chatUiLaunchTipVariant, parseChatUiLaunchTipAudience, diff --git a/src/main/persistence/profile-state/writer/profile-state-writer-diagnostics.ts b/src/main/persistence/profile-state/writer/profile-state-writer-diagnostics.ts index f450cd838ab..66afa84aa92 100644 --- a/src/main/persistence/profile-state/writer/profile-state-writer-diagnostics.ts +++ b/src/main/persistence/profile-state/writer/profile-state-writer-diagnostics.ts @@ -1,4 +1,4 @@ -import type { CrashReportBreadcrumbData } from '../../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../../shared/crash-reporting/crash-reporting' import { recordCoalescedDurableCrashBreadcrumb, recordDurableCrashBreadcrumb diff --git a/src/main/providers/foreground/agent-process-batch.ts b/src/main/providers/foreground/agent-process-batch.ts index 0faaffee2a9..2117d669b95 100644 --- a/src/main/providers/foreground/agent-process-batch.ts +++ b/src/main/providers/foreground/agent-process-batch.ts @@ -4,11 +4,11 @@ import { } from '../../../shared/agent-status/process/agent-process-recognition' import { getFirstCommandToken } from '../../../shared/command-token-scanner' import { resolveOuterWrapperForegroundProcess } from '../../../shared/agent-status/process/foreground-wrapper-agent' -import { selectForegroundProcessCandidate } from '../../../shared/foreground-process-selection' +import { selectForegroundProcessCandidate } from '../../../shared/agent-status/process/foreground-process-selection' import type { ForegroundProcessEvidence, RemoteForegroundEvidence -} from '../../../shared/foreground-process-evidence' +} from '../../../shared/terminal/pty/foreground/foreground-process-evidence' import { buildProcessTableIndex, lookupProcessTableIndex, diff --git a/src/main/providers/foreground/agent-process.ts b/src/main/providers/foreground/agent-process.ts index 7df5ee559dc..ef578379249 100644 --- a/src/main/providers/foreground/agent-process.ts +++ b/src/main/providers/foreground/agent-process.ts @@ -19,7 +19,7 @@ import { isShellProcess } from '../../../shared/agent-status/process/shell-proce import { selectForegroundProcessCandidate, type SelectedForegroundProcess -} from '../../../shared/foreground-process-selection' +} from '../../../shared/agent-status/process/foreground-process-selection' import { isWindowsShellAloneInJob } from './windows/shell-alone-in-job' import { readWindowsProcessIdentityTableFresh, diff --git a/src/main/providers/foreground/remote-evidence.ts b/src/main/providers/foreground/remote-evidence.ts index a94e2d0286d..4a5fe410b96 100644 --- a/src/main/providers/foreground/remote-evidence.ts +++ b/src/main/providers/foreground/remote-evidence.ts @@ -4,7 +4,7 @@ import type { PosixFence, RemoteForegroundEvidence, WindowsFence -} from '../../../shared/foreground-process-evidence' +} from '../../../shared/terminal/pty/foreground/foreground-process-evidence' import { buildProcessTableIndex, type ProcessTableIndex } from '../../../shared/process-table-index' import type { ProcessTableRow } from '../../../shared/process-table-snapshot' import type { diff --git a/src/main/providers/local-pty/local-pty-launch-plan.ts b/src/main/providers/local-pty/local-pty-launch-plan.ts index fa1bd9471cf..5442bf8d5b3 100644 --- a/src/main/providers/local-pty/local-pty-launch-plan.ts +++ b/src/main/providers/local-pty/local-pty-launch-plan.ts @@ -1,6 +1,6 @@ import { win32 as pathWin32 } from 'node:path' import { recognizeAgentProcessFromCommandLine } from '../../../shared/agent-status/process/agent-process-recognition' -import { WINDOWS_GIT_BASH_SHELL } from '../../../shared/windows-terminal-shell' +import { WINDOWS_GIT_BASH_SHELL } from '../../../shared/shell/launch/windows-terminal-shell' import { resolveWindowsGitBashShellPath } from '../../pty/shell-startup/git-bash' import { resolveUnixPaneShellPath } from '../../daemon/shell-readiness/shell-ready' import { getDefaultWslDistro } from '../../wsl/discovery/distro-catalog' diff --git a/src/main/providers/pty/process-info.ts b/src/main/providers/pty/process-info.ts index 919b60167ce..55639bdb01b 100644 --- a/src/main/providers/pty/process-info.ts +++ b/src/main/providers/pty/process-info.ts @@ -1,6 +1,6 @@ import type { AgentSessionOwnerBinding } from '../../../shared/agent-session/agent-session-host-authority' import type { PtyIncarnationId } from '../../../shared/terminal/pty/lifecycle/pty-incarnation' -import type { ForegroundProcessEvidence } from '../../../shared/foreground-process-evidence' +import type { ForegroundProcessEvidence } from '../../../shared/terminal/pty/foreground/foreground-process-evidence' import type { WslGuestRoot } from '../../../shared/shell/wsl/wsl-guest-root-marker' export type PtyProcessInfo = { diff --git a/src/main/providers/pty/process-list-admission.ts b/src/main/providers/pty/process-list-admission.ts index 5a6840647b3..d1b021477f4 100644 --- a/src/main/providers/pty/process-list-admission.ts +++ b/src/main/providers/pty/process-list-admission.ts @@ -5,7 +5,7 @@ import { isPtyIncarnationId } from '../../../shared/terminal/pty/lifecycle/pty-i import { cloneForegroundProcessEvidence, isForegroundProcessEvidence -} from '../../../shared/foreground-process-evidence' +} from '../../../shared/terminal/pty/foreground/foreground-process-evidence' import type { PtyProcessInfo } from './process-info' import { readWslGuestRoot } from '../../../shared/shell/wsl/wsl-guest-root-marker' 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 63068d82459..73715b6a5b0 100644 --- a/src/main/pty/process-retirement/pty-master-foreground-observation.ts +++ b/src/main/pty/process-retirement/pty-master-foreground-observation.ts @@ -4,7 +4,7 @@ import { getFirstCommandToken } from '../../../shared/command-token-scanner' import { recognizeAgentProcessFromCommandLine } from '../../../shared/agent-status/process/agent-process-recognition' -import { selectForegroundProcessCandidate } from '../../../shared/foreground-process-selection' +import { selectForegroundProcessCandidate } from '../../../shared/agent-status/process/foreground-process-selection' import { resolveOuterWrapperForegroundProcess } from '../../../shared/agent-status/process/foreground-wrapper-agent' import { unreadableArgvName, type ProcessTableRow } from '../../../shared/process-table-snapshot' import { isShellProcess } from '../../../shared/agent-status/process/shell-process-detection' diff --git a/src/main/pty/shell-startup/codex-no-daemon-launch-command.ts b/src/main/pty/shell-startup/codex-no-daemon-launch-command.ts index c9197fc7e09..2ed205832fd 100644 --- a/src/main/pty/shell-startup/codex-no-daemon-launch-command.ts +++ b/src/main/pty/shell-startup/codex-no-daemon-launch-command.ts @@ -1,7 +1,7 @@ import { isAbsolute, win32 as pathWin32 } from 'node:path' import { runProcess } from '@orca/process-host' import { tokenizeStartupCommand } from '../../../shared/agent-launch/startup/tui-agent-startup-shell' -import { resolveLocalWindowsAgentStartupShell } from '../../../shared/windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../../shared/shell/launch/windows-terminal-shell' import { resolveCommandOnLocalPath } from '../../ipc/command-path/command-path-resolver' import { CODEX_NO_DAEMON_SKIP_ARGS } from '../../../shared/shell/launch/agents/codex-shell-function' diff --git a/src/main/pty/shell-startup/git-bash.ts b/src/main/pty/shell-startup/git-bash.ts index cb5f0349e6d..43514ade2c5 100644 --- a/src/main/pty/shell-startup/git-bash.ts +++ b/src/main/pty/shell-startup/git-bash.ts @@ -1,6 +1,6 @@ import { existsSync } from 'node:fs' import { win32 as pathWin32 } from 'node:path' -import { WINDOWS_GIT_BASH_SHELL } from '../../../shared/windows-terminal-shell' +import { WINDOWS_GIT_BASH_SHELL } from '../../../shared/shell/launch/windows-terminal-shell' type GitBashPathOptions = { env?: NodeJS.ProcessEnv diff --git a/src/main/runtime/client/events/runtime-notifier-contract.ts b/src/main/runtime/client/events/runtime-notifier-contract.ts index ea35ddf4300..7c9373eedc0 100644 --- a/src/main/runtime/client/events/runtime-notifier-contract.ts +++ b/src/main/runtime/client/events/runtime-notifier-contract.ts @@ -13,7 +13,7 @@ import type { AgentLaunchTabViewerRule, AgentLaunchTabPublishRequest } from '../../../../shared/agent-launch/contracts/agent-launch-tab-publication' -import type { TerminalPaneSplitSource } from '../../../../shared/feature-education-telemetry' +import type { TerminalPaneSplitSource } from '../../../../shared/feature-education/feature-education-telemetry' import type { TerminalRevealIdentity } from '../../../../shared/workspace-layout/terminal-surfaces/terminal-reveal-identity' import type { TerminalPaneRevealTarget } from '../../../../shared/workspace-layout/terminal-surfaces/terminal-pane-reveal' import type { diff --git a/src/main/runtime/client/runtime-client-state.ts b/src/main/runtime/client/runtime-client-state.ts index d8e3036681a..297696e84b1 100644 --- a/src/main/runtime/client/runtime-client-state.ts +++ b/src/main/runtime/client/runtime-client-state.ts @@ -14,7 +14,7 @@ import { } from '../../../shared/execution-host' import type { IPtyProvider } from '../../providers/pty/provider-contract' import { killAllProcessesForWorktree } from '../workspaces/removal/worktree-teardown' -import type { MemorySnapshot, StatsSummary } from '../../../shared/process-stats-types' +import type { MemorySnapshot, StatsSummary } from '../../../shared/diagnostics/process-stats-types' import { collectMemorySnapshot } from '../../memory/collector' import type { PersistedUIState } from '../../../shared/persisted-ui-state-types' import { isDeepStrictEqual } from 'node:util' @@ -22,7 +22,7 @@ import type { AgentListPublication, AgentPaneActivityChange } from '../../../shared/agent-status/presentation/agent-list-status' -import type { FeatureInteractionId } from '../../../shared/feature-interaction-catalog' +import type { FeatureInteractionId } from '../../../shared/feature-education/interactions/feature-interaction-catalog' import type { RuntimeClientSettingsUpdate } from './settings/runtime-client-settings-shape' import type { AgentLaunchSettingsMutation } from '../../../shared/agent-launch/choices/agent-launch-settings' import type { TerminalQuickCommand } from '../../../shared/terminal/quick-commands/terminal-quick-command-types' diff --git a/src/main/runtime/rpc/dispatch/dispatcher-streaming-feature-emitter.ts b/src/main/runtime/rpc/dispatch/dispatcher-streaming-feature-emitter.ts index 6da446e476d..54cda813992 100644 --- a/src/main/runtime/rpc/dispatch/dispatcher-streaming-feature-emitter.ts +++ b/src/main/runtime/rpc/dispatch/dispatcher-streaming-feature-emitter.ts @@ -1,4 +1,4 @@ -import type { FeatureInteractionId } from '../../../../shared/feature-interaction-catalog' +import type { FeatureInteractionId } from '../../../../shared/feature-education/interactions/feature-interaction-catalog' import type { OrcaRuntimeService } from '../../orca-runtime' import type { RpcEnvelopeMeta, RpcRequest, RpcResponse } from '../core' import { successResponse } from '../responses/rpc-response' diff --git a/src/main/runtime/rpc/dispatch/runtime-feature-interaction.ts b/src/main/runtime/rpc/dispatch/runtime-feature-interaction.ts index a9257377d45..e1674ecda15 100644 --- a/src/main/runtime/rpc/dispatch/runtime-feature-interaction.ts +++ b/src/main/runtime/rpc/dispatch/runtime-feature-interaction.ts @@ -1,4 +1,4 @@ -import type { FeatureInteractionId } from '../../../../shared/feature-interaction-catalog' +import type { FeatureInteractionId } from '../../../../shared/feature-education/interactions/feature-interaction-catalog' import { isBrowserPaneUiRuntimeRpcParams } from '../../../../shared/remote-runtime/rpc/runtime-rpc-feature-interaction-source' import type { OrcaRuntimeService } from '../../orca-runtime' diff --git a/src/main/runtime/rpc/mobile/e2ee/mobile-e2ee-outbound-admission.ts b/src/main/runtime/rpc/mobile/e2ee/mobile-e2ee-outbound-admission.ts index e90b2a514f5..29289cf27bf 100644 --- a/src/main/runtime/rpc/mobile/e2ee/mobile-e2ee-outbound-admission.ts +++ b/src/main/runtime/rpc/mobile/e2ee/mobile-e2ee-outbound-admission.ts @@ -11,7 +11,7 @@ import type { MobileE2EEOutboundMemoryBudget, MobileE2EEOutboundSocketMemory } from './mobile-e2ee-outbound-memory-budget' -import type { EventProps } from '../../../../../shared/telemetry-event-classification' +import type { EventProps } from '../../../../../shared/telemetry/telemetry-event-classification' import { track } from '../../../../telemetry/client' export type MobileE2EEOutboundBudgetEmitter = EventProps<'remote_outbound_budget_close'>['emitter'] diff --git a/src/main/runtime/rpc/server/pairing/network/windows-mobile-firewall.ts b/src/main/runtime/rpc/server/pairing/network/windows-mobile-firewall.ts index 9925319579f..68739f1724b 100644 --- a/src/main/runtime/rpc/server/pairing/network/windows-mobile-firewall.ts +++ b/src/main/runtime/rpc/server/pairing/network/windows-mobile-firewall.ts @@ -4,7 +4,7 @@ import type { WindowsMobileFirewallRepairResult, WindowsMobileFirewallStatus, WindowsNetworkCategory -} from '../../../../../../shared/windows-mobile-firewall' +} from '../../../../../../shared/remote-runtime/pairing/windows-mobile-firewall' import { quotePowerShellLiteral } from '../../../../../../shared/powershell-native-argument' import { hasSufficientWindowsFirewallRemoteScope } from './windows-firewall-remote-scope' diff --git a/src/main/runtime/rpc/server/runtime-rpc-startup-failure.ts b/src/main/runtime/rpc/server/runtime-rpc-startup-failure.ts index 4f079f9b7fb..3504ad3110e 100644 --- a/src/main/runtime/rpc/server/runtime-rpc-startup-failure.ts +++ b/src/main/runtime/rpc/server/runtime-rpc-startup-failure.ts @@ -1,6 +1,6 @@ import { dialog, type BrowserWindow, type MessageBoxOptions } from 'electron' -import type { RuntimeRpcStartErrorClass } from '../../../../shared/telemetry-daemon-event-schemas' +import type { RuntimeRpcStartErrorClass } from '../../../../shared/telemetry/schemas/telemetry-daemon-event-schemas' import { translateMain } from '../../../i18n/main-i18n' import { track } from '../../../telemetry/client' import { waitForWindowToShow } from '../../../window/visibility/wait-for-window-to-show' diff --git a/src/main/runtime/terminal/launch/terminal-split-surface.ts b/src/main/runtime/terminal/launch/terminal-split-surface.ts index c03319bfcf6..429c99576aa 100644 --- a/src/main/runtime/terminal/launch/terminal-split-surface.ts +++ b/src/main/runtime/terminal/launch/terminal-split-surface.ts @@ -1,6 +1,6 @@ import { OrcaRuntimeWithSplitTerminal } from './terminal-split' import type { RuntimePtyWorktreeRecord } from '../records/runtime-terminal-state-records' -import type { TerminalPaneSplitSource } from '../../../../shared/feature-education-telemetry' +import type { TerminalPaneSplitSource } from '../../../../shared/feature-education/feature-education-telemetry' import type { RuntimeTerminalSplit } from '../../../../shared/terminal/runtime/runtime-terminal-contracts' import { makePaneKey, parsePaneKey } from '../../../../shared/workspace-layout/stable-pane-id' import { diff --git a/src/main/runtime/terminal/launch/terminal-split.ts b/src/main/runtime/terminal/launch/terminal-split.ts index 9c8c9e040a8..c7ffff94e38 100644 --- a/src/main/runtime/terminal/launch/terminal-split.ts +++ b/src/main/runtime/terminal/launch/terminal-split.ts @@ -2,7 +2,7 @@ import type { TerminalSplitOptions } from './terminal-split-surface' import type { SplitPaneInMainOptions, SplitPaneSource } from './terminal-split-in-main' import type { RuntimePtyWorktreeRecord } from '../records/runtime-terminal-state-records' import { OrcaRuntimeWithStopExplicitlyClosedTabPtys } from '../../session-tabs/explicit-terminal-close-stops' -import type { TerminalPaneSplitSource } from '../../../../shared/feature-education-telemetry' +import type { TerminalPaneSplitSource } from '../../../../shared/feature-education/feature-education-telemetry' import type { RuntimeTerminalSplit } from '../../../../shared/terminal/runtime/runtime-terminal-contracts' import { randomUUID } from 'node:crypto' import { diff --git a/src/main/runtime/terminal/output/opencode-run-lifetime-status.ts b/src/main/runtime/terminal/output/opencode-run-lifetime-status.ts index d1ef775acd4..0ea72851f95 100644 --- a/src/main/runtime/terminal/output/opencode-run-lifetime-status.ts +++ b/src/main/runtime/terminal/output/opencode-run-lifetime-status.ts @@ -4,7 +4,7 @@ import { normalizeAgentStatusPayload, type ParsedAgentStatusPayload } from '../../../../shared/agent-status/contracts/agent-status-types' -import { FOREGROUND_COMMAND_READS } from '../../../../shared/foreground-command-settle' +import { FOREGROUND_COMMAND_READS } from '../../../../shared/terminal/pty/foreground/foreground-command-settle' import { isOpenCodeRunCommand } from '../../../../shared/agent-status/process/opencode-headless-command' import { isShellProcess } from '../../../../shared/agent-status/process/shell-process-detection' diff --git a/src/main/runtime/terminal/wait/launched-agent-exit-watch.ts b/src/main/runtime/terminal/wait/launched-agent-exit-watch.ts index 967025b09c4..c33daef0215 100644 --- a/src/main/runtime/terminal/wait/launched-agent-exit-watch.ts +++ b/src/main/runtime/terminal/wait/launched-agent-exit-watch.ts @@ -1,4 +1,4 @@ -import { FOREGROUND_COMMAND_READS } from '../../../../shared/foreground-command-settle' +import { FOREGROUND_COMMAND_READS } from '../../../../shared/terminal/pty/foreground/foreground-command-settle' import { createOsc133CommandFinishedScanner } from '../../../../shared/terminal/output/terminal-osc133-command-finished' import { terminalSafe } from '../../../../shared/terminal/output/terminal-safe-text' import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent' diff --git a/src/main/runtime/terminal/wait/launched-agent-foreground.test.ts b/src/main/runtime/terminal/wait/launched-agent-foreground.test.ts index 52cc515b705..bf2941d1e71 100644 --- a/src/main/runtime/terminal/wait/launched-agent-foreground.test.ts +++ b/src/main/runtime/terminal/wait/launched-agent-foreground.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import type { RemoteForegroundEvidence } from '../../../../shared/foreground-process-evidence' +import type { RemoteForegroundEvidence } from '../../../../shared/terminal/pty/foreground/foreground-process-evidence' import type { ProcessTableRow } from '../../../../shared/process-table-snapshot' import type * as TerminalForegroundGroup from '../../../pty/process-retirement/terminal-process-rows' diff --git a/src/main/runtime/terminal/wait/terminal-interactive-wait.ts b/src/main/runtime/terminal/wait/terminal-interactive-wait.ts index f6e818cfc27..7b471df39fb 100644 --- a/src/main/runtime/terminal/wait/terminal-interactive-wait.ts +++ b/src/main/runtime/terminal/wait/terminal-interactive-wait.ts @@ -29,7 +29,7 @@ import { selectExactWorkerProviderSession } from '../../orchestration/workers/tr import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent' import { isTuiAgentEnabled } from '../../../../shared/agent-launch/catalog/tui-agent-selection' import { OrchestrationError } from '../../orchestration/orchestration-error' -import { resolveLocalWindowsAgentStartupShell } from '../../../../shared/windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../../../shared/shell/launch/windows-terminal-shell' import { resolveStartupShell, type AgentStartupShell diff --git a/src/main/ssh/host-server/ssh-host-server-telemetry.ts b/src/main/ssh/host-server/ssh-host-server-telemetry.ts index 2f7419f4245..bdcdd40d905 100644 --- a/src/main/ssh/host-server/ssh-host-server-telemetry.ts +++ b/src/main/ssh/host-server/ssh-host-server-telemetry.ts @@ -1,10 +1,10 @@ /** Narrow raw connect/setup codes to fixed enums; unknowns become other, never host/user strings. */ -import type { EventProps } from '../../../shared/telemetry-event-classification' +import type { EventProps } from '../../../shared/telemetry/telemetry-event-classification' import { SSH_HOST_SERVER_FAILURE_VALUES, SSH_HOST_SERVER_REASON_VALUES, SSH_HOST_SERVER_REFUSAL_VALUES -} from '../../../shared/telemetry-ssh-host-server-event-schemas' +} from '../../../shared/telemetry/schemas/telemetry-ssh-host-server-event-schemas' import { track } from '../../telemetry/client' import type { HostServerConnectEvent } from './ssh-host-server-connect-events' import type { SshHostPlatformFacts } from '../remote-host/ssh-host-platform-memo' diff --git a/src/main/ssh/legacy-relay/bridge/legacy-relay-bridge-registry.ts b/src/main/ssh/legacy-relay/bridge/legacy-relay-bridge-registry.ts index 52253424ae9..391af3c7fe1 100644 --- a/src/main/ssh/legacy-relay/bridge/legacy-relay-bridge-registry.ts +++ b/src/main/ssh/legacy-relay/bridge/legacy-relay-bridge-registry.ts @@ -2,7 +2,7 @@ * Every SSH target's legacy relay bridge, and the one seam the rest of main calls. * COMPAT(legacy-relay-bridge): revisit 2027-01-15. */ -import type { EventProps } from '../../../../shared/telemetry-event-classification' +import type { EventProps } from '../../../../shared/telemetry/telemetry-event-classification' import type { LegacyRelayBridgeAttachResult, LegacyRelayBridgeCloseResult, diff --git a/src/main/ssh/legacy-relay/bridge/legacy-relay-daily-activity.ts b/src/main/ssh/legacy-relay/bridge/legacy-relay-daily-activity.ts index def11748949..bb983ab2568 100644 --- a/src/main/ssh/legacy-relay/bridge/legacy-relay-daily-activity.ts +++ b/src/main/ssh/legacy-relay/bridge/legacy-relay-daily-activity.ts @@ -1,5 +1,5 @@ /** Report active bridging once per target per UTC day to measure relay retirement. COMPAT(legacy-relay-bridge): revisit 2027-01-15. */ -import type { EventProps } from '../../../../shared/telemetry-event-classification' +import type { EventProps } from '../../../../shared/telemetry/telemetry-event-classification' type TerminalsBucket = EventProps<'ssh_host_server_legacy_relay_bridge'>['terminals'] type ActivityReport = (targetId: string, phase: 'active', terminals: number) => void diff --git a/src/main/star-nag/agent-value-moment.ts b/src/main/star-nag/agent-value-moment.ts index 5171860b9dc..56bfd6e80fe 100644 --- a/src/main/star-nag/agent-value-moment.ts +++ b/src/main/star-nag/agent-value-moment.ts @@ -1,7 +1,7 @@ import { app } from 'electron' import { checkOrcaStarred } from '../github/client/fetch/orca-star' import type { Store } from '../persistence/loading-store/store' -import type { StarNagPromptMode } from '../../shared/star-nag-telemetry' +import type { StarNagPromptMode } from '../../shared/telemetry/star-nag-telemetry' export type AgentValueMomentPreparation = | { status: 'ready'; mode: StarNagPromptMode } diff --git a/src/main/star-nag/app-star-source.ts b/src/main/star-nag/app-star-source.ts index 45f27a7cc7f..1923d115588 100644 --- a/src/main/star-nag/app-star-source.ts +++ b/src/main/star-nag/app-star-source.ts @@ -1,5 +1,5 @@ import type { AppStarSource } from '../../shared/gh-star-source' -import type { StarNagPromptSource } from '../../shared/star-nag-telemetry' +import type { StarNagPromptSource } from '../../shared/telemetry/star-nag-telemetry' export function getStarNagAppStarSource(source: StarNagPromptSource): AppStarSource { if (source === 'agent_value_moment' || source === 'onboarding_completed') { diff --git a/src/main/star-nag/console-events.ts b/src/main/star-nag/console-events.ts index 6278fa5eee9..1b553ee15eb 100644 --- a/src/main/star-nag/console-events.ts +++ b/src/main/star-nag/console-events.ts @@ -1,6 +1,6 @@ import { app } from 'electron' import { STAR_NAG_INITIAL_THRESHOLD } from '../../shared/constants' -import type { StarNagPromptSource } from '../../shared/star-nag-telemetry' +import type { StarNagPromptSource } from '../../shared/telemetry/star-nag-telemetry' import type { Store } from '../persistence/loading-store/store' import type { StatsCollector } from '../stats/collector' diff --git a/src/main/star-nag/prompt-context.ts b/src/main/star-nag/prompt-context.ts index 13ac56a6cf4..10034277906 100644 --- a/src/main/star-nag/prompt-context.ts +++ b/src/main/star-nag/prompt-context.ts @@ -3,7 +3,7 @@ import { bucketStarNagAgentsSinceBaseline, type StarNagPromptMode, type StarNagPromptSource -} from '../../shared/star-nag-telemetry' +} from '../../shared/telemetry/star-nag-telemetry' import type { Store } from '../persistence/loading-store/store' import type { StatsCollector } from '../stats/collector' import { getCohortAtEmit } from '../telemetry/cohort-classifier' diff --git a/src/main/star-nag/prompt-session-telemetry.ts b/src/main/star-nag/prompt-session-telemetry.ts index 43b8b9a96c2..8e7b1e4cd6e 100644 --- a/src/main/star-nag/prompt-session-telemetry.ts +++ b/src/main/star-nag/prompt-session-telemetry.ts @@ -1,5 +1,5 @@ -import type { StarNagOutcome, StarNagPromptMode } from '../../shared/star-nag-telemetry' -import type { EventProps } from '../../shared/telemetry-events' +import type { StarNagOutcome, StarNagPromptMode } from '../../shared/telemetry/star-nag-telemetry' +import type { EventProps } from '../../shared/telemetry/telemetry-event-classification' import { track } from '../telemetry/client' export type StarNagPromptContext = Omit< diff --git a/src/main/star-nag/service.ts b/src/main/star-nag/service.ts index ab076140f36..4f20e7714dd 100644 --- a/src/main/star-nag/service.ts +++ b/src/main/star-nag/service.ts @@ -8,7 +8,7 @@ import type { StarNagOutcome, StarNagPromptMode, StarNagPromptSource -} from '../../shared/star-nag-telemetry' +} from '../../shared/telemetry/star-nag-telemetry' import { type StarNagPromptSession, trackStarNagSessionOutcome } from './prompt-session-telemetry' import { createStarNagPromptContext } from './prompt-context' import { logStarNagConsoleEvent } from './console-events' diff --git a/src/main/startup/profile-startup/dev-education-suppression.ts b/src/main/startup/profile-startup/dev-education-suppression.ts index aebcfd1204b..54984a369a3 100644 --- a/src/main/startup/profile-startup/dev-education-suppression.ts +++ b/src/main/startup/profile-startup/dev-education-suppression.ts @@ -1,8 +1,11 @@ -import { ONBOARDING_FINAL_STEP, ONBOARDING_FLOW_VERSION } from '../../../shared/onboarding-defaults' -import { CONTEXTUAL_TOUR_IDS } from '../../../shared/contextual-tours' -import { FEATURE_INTERACTION_IDS } from '../../../shared/feature-interaction-catalog' -import type { FeatureInteractionState } from '../../../shared/feature-interactions' -import { FEATURE_TIP_SEEN_IDS } from '../../../shared/feature-tips' +import { + ONBOARDING_FINAL_STEP, + ONBOARDING_FLOW_VERSION +} from '../../../shared/onboarding/onboarding-defaults' +import { CONTEXTUAL_TOUR_IDS } from '../../../shared/feature-education/contextual-tours/contextual-tours' +import { FEATURE_INTERACTION_IDS } from '../../../shared/feature-education/interactions/feature-interaction-catalog' +import type { FeatureInteractionState } from '../../../shared/feature-education/interactions/feature-interactions' +import { FEATURE_TIP_SEEN_IDS } from '../../../shared/feature-education/feature-tips' import type { PersistedUIState } from '../../../shared/persisted-ui-state-types' import type { Store } from '../../persistence/loading-store/store' diff --git a/src/main/startup/quit/app-relaunch.ts b/src/main/startup/quit/app-relaunch.ts index 1b535b3d7b2..539552a568f 100644 --- a/src/main/startup/quit/app-relaunch.ts +++ b/src/main/startup/quit/app-relaunch.ts @@ -1,5 +1,5 @@ import { app } from 'electron' -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import { recordDurableCrashBreadcrumb } from '../../crash-reporting/breadcrumbs/durable-crash-breadcrumb' import { runWithLaunchPath } from '../shell-environment/hydrate-shell-path' import { getWindowsAdministratorRelaunchOptions } from '../../windows/windows-administrator-restart' diff --git a/src/main/startup/shell-environment/hydrate-shell-path.ts b/src/main/startup/shell-environment/hydrate-shell-path.ts index b155adca4a2..dee58261390 100644 --- a/src/main/startup/shell-environment/hydrate-shell-path.ts +++ b/src/main/startup/shell-environment/hydrate-shell-path.ts @@ -3,7 +3,7 @@ import { delimiter, win32 as pathWin32 } from 'node:path' import { spawnProcess } from '@orca/process-host' import { stripAnsiEscapeSequences } from '../../../shared/ansi-escape-sequences' import type { ShellHydrationFailureReason } from '../../../shared/shell/launch/shell-path-hydration-types' -import { resolveWindowsShellStartupFamily } from '../../../shared/windows-terminal-shell' +import { resolveWindowsShellStartupFamily } from '../../../shared/shell/launch/windows-terminal-shell' import { SHELL_PATH_DELIMITER as DELIMITER, shellPathProbe } from './shell-path-probe' import { WindowsShellPathOwnership, createWindowsPathKey } from './windows-shell-path-ownership' import { bindShellProbeLifetime } from './shell-probe-lifetime' diff --git a/src/main/startup/shell-environment/login-shell-environment.ts b/src/main/startup/shell-environment/login-shell-environment.ts index 6620ea5e687..b837114d913 100644 --- a/src/main/startup/shell-environment/login-shell-environment.ts +++ b/src/main/startup/shell-environment/login-shell-environment.ts @@ -1,7 +1,7 @@ import { createHash } from 'node:crypto' import { win32 as pathWin32 } from 'node:path' import { spawnProcess } from '@orca/process-host' -import { resolveWindowsShellStartupFamily } from '../../../shared/windows-terminal-shell' +import { resolveWindowsShellStartupFamily } from '../../../shared/shell/launch/windows-terminal-shell' import { resolveProfileLoadingFallbackShell, resolveProfileLoadingShell diff --git a/src/main/startup/shell-environment/shell-path-probe.ts b/src/main/startup/shell-environment/shell-path-probe.ts index e88a9610e16..943f426f34b 100644 --- a/src/main/startup/shell-environment/shell-path-probe.ts +++ b/src/main/startup/shell-environment/shell-path-probe.ts @@ -1,5 +1,5 @@ import { delimiter, win32 as pathWin32 } from 'node:path' -import { resolveWindowsShellStartupFamily } from '../../../shared/windows-terminal-shell' +import { resolveWindowsShellStartupFamily } from '../../../shared/shell/launch/windows-terminal-shell' export const SHELL_PATH_DELIMITER = '__ORCA_SHELL_PATH__' diff --git a/src/main/startup/windows-install-permissions/windows-install-dir-acl-probe.ts b/src/main/startup/windows-install-permissions/windows-install-dir-acl-probe.ts index debdabdf867..2ee41790ecd 100644 --- a/src/main/startup/windows-install-permissions/windows-install-dir-acl-probe.ts +++ b/src/main/startup/windows-install-permissions/windows-install-dir-acl-probe.ts @@ -1,7 +1,7 @@ import { existsSync } from 'node:fs' import { dirname, join } from 'node:path' -import { sanitizeCrashReportString } from '../../../shared/crash-report-redaction' -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import { sanitizeCrashReportString } from '../../../shared/crash-reporting/crash-report-redaction' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import { recordDurableCrashBreadcrumb } from '../../crash-reporting/breadcrumbs/durable-crash-breadcrumb' import { loadWindowsSecurity } from '../../../shared/windows-security-addon' import type { WindowsDacl } from '@orca/windows-security' diff --git a/src/main/startup/windows-install-permissions/windows-install-dir-acl-recovery.test.ts b/src/main/startup/windows-install-permissions/windows-install-dir-acl-recovery.test.ts index 6342e219380..d0886cfac76 100644 --- a/src/main/startup/windows-install-permissions/windows-install-dir-acl-recovery.test.ts +++ b/src/main/startup/windows-install-permissions/windows-install-dir-acl-recovery.test.ts @@ -4,7 +4,7 @@ import { join } from 'node:path' import { afterEach, beforeEach, describe, expect, it } from 'vitest' import { resetWindowsSecurityLoadForTests } from '../../../shared/windows-security-addon' -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import { readActiveGpuFallbackMarker, writeGpuFallbackMarker diff --git a/src/main/startup/windows-install-permissions/windows-install-dir-acl-recovery.ts b/src/main/startup/windows-install-permissions/windows-install-dir-acl-recovery.ts index 13a334aaa1a..f1e61d5ecfb 100644 --- a/src/main/startup/windows-install-permissions/windows-install-dir-acl-recovery.ts +++ b/src/main/startup/windows-install-permissions/windows-install-dir-acl-recovery.ts @@ -1,6 +1,6 @@ // @protected-copy import { dirname } from 'node:path' -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import { translateMain } from '../../i18n/main-i18n' import { logStartupMilestone } from '../diagnostics/startup-diagnostics' import { diff --git a/src/main/startup/windows-install-permissions/windows-install-dir-acl-repair.win32.test.ts b/src/main/startup/windows-install-permissions/windows-install-dir-acl-repair.win32.test.ts index 3e1cc65c824..3f1d410ebec 100644 --- a/src/main/startup/windows-install-permissions/windows-install-dir-acl-repair.win32.test.ts +++ b/src/main/startup/windows-install-permissions/windows-install-dir-acl-repair.win32.test.ts @@ -2,7 +2,7 @@ import { mkdirSync, mkdtempSync, writeFileSync } from 'node:fs' import { tmpdir } from 'node:os' import { join } from 'node:path' import { afterAll, beforeAll, describe, expect, it } from 'vitest' -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import { removeTreeSync } from '../../../shared/windows-transient-lock-removal' import { loadWindowsSecurity, diff --git a/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-grant.ts b/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-grant.ts index 03ece70478a..2b66bb3c78c 100644 --- a/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-grant.ts +++ b/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-grant.ts @@ -1,6 +1,6 @@ import { readdirSync, type Dirent } from 'node:fs' import { join } from 'node:path' -import { sanitizeCrashReportString } from '../../../shared/crash-report-redaction' +import { sanitizeCrashReportString } from '../../../shared/crash-reporting/crash-report-redaction' import { loadWindowsSecurity, WINDOWS_FILE_READ_EXECUTE, diff --git a/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-repair.test.ts b/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-repair.test.ts index 6f90533862f..720789b4a93 100644 --- a/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-repair.test.ts +++ b/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-repair.test.ts @@ -15,7 +15,7 @@ vi.mock('@orca/process-host', () => ({ runProcessSync: runProcessSyncMock })) -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import { repairWindowsInstallDirPackageAcl, resetWindowsInstallDirAclRepairForTest, diff --git a/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-repair.ts b/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-repair.ts index 8329a51f836..8f457967c6f 100644 --- a/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-repair.ts +++ b/src/main/startup/windows-install-permissions/windows-install-dir-package-acl-repair.ts @@ -1,7 +1,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs' import { dirname, join } from 'node:path' -import { sanitizeCrashReportString } from '../../../shared/crash-report-redaction' -import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting' +import { sanitizeCrashReportString } from '../../../shared/crash-reporting/crash-report-redaction' +import type { CrashReportBreadcrumbData } from '../../../shared/crash-reporting/crash-reporting' import { recordDurableCrashBreadcrumb } from '../../crash-reporting/breadcrumbs/durable-crash-breadcrumb' import { installDirPackageGrants, diff --git a/src/main/stats/collector.ts b/src/main/stats/collector.ts index 9fc1d2a97e2..c826334e4fe 100644 --- a/src/main/stats/collector.ts +++ b/src/main/stats/collector.ts @@ -1,6 +1,6 @@ import { join } from 'node:path' import { getAppEnvironment } from '../../shared/app-environment' -import type { StatsSummary } from '../../shared/process-stats-types' +import type { StatsSummary } from '../../shared/diagnostics/process-stats-types' import type { StatsEvent, StatsAggregates, StatsFile } from './types' import { loadStatsFile, STATS_SCHEMA_VERSION } from './stats-file-loader' import { AtomicSnapshotWriter } from '../persistence/atomic-snapshot-writer' diff --git a/src/main/telemetry/burst-cap.ts b/src/main/telemetry/burst-cap.ts index 9758afdb1ab..b9df68d8151 100644 --- a/src/main/telemetry/burst-cap.ts +++ b/src/main/telemetry/burst-cap.ts @@ -1,6 +1,7 @@ // Per-event refill caps runaway producers; non-refilling session/consent ceilings bound aggregate volume. Reset per telemetry session and warn once per bucket so overflow cannot flood stderr. -import { eventSchemas, type EventName } from '../../shared/telemetry-events' +import { eventSchemas } from '../../shared/telemetry/telemetry-event-registry' +import type { EventName } from '../../shared/telemetry/telemetry-event-classification' import { isProtectedMilestoneEvent } from './event-sampling' const PER_EVENT_DEFAULT_CAPACITY = 30 diff --git a/src/main/telemetry/chat-ui-launch-tip-cohort.ts b/src/main/telemetry/chat-ui-launch-tip-cohort.ts index 69da98779bc..53e8cf6cca8 100644 --- a/src/main/telemetry/chat-ui-launch-tip-cohort.ts +++ b/src/main/telemetry/chat-ui-launch-tip-cohort.ts @@ -1,7 +1,7 @@ import type { Store } from '../persistence/loading-store/store' import { resolveConsent } from './consent' -import { getFeatureTipSeenId } from '../../shared/feature-tips' -import type { ChatUiLaunchTipCohort } from '../../shared/telemetry-settings-types' +import { getFeatureTipSeenId } from '../../shared/feature-education/feature-tips' +import type { ChatUiLaunchTipCohort } from '../../shared/telemetry/telemetry-settings-types' export type { ChatUiLaunchTipCohort } diff --git a/src/main/telemetry/classify-error.ts b/src/main/telemetry/classify-error.ts index 55e01b8e584..65bffa9553f 100644 --- a/src/main/telemetry/classify-error.ts +++ b/src/main/telemetry/classify-error.ts @@ -1,6 +1,6 @@ // Send closed error_class enums only, never raw messages/stacks; add new buckets when unknown volume warrants call-site review. -import type { ErrorClass } from '../../shared/telemetry-events' +import type { ErrorClass } from '../../shared/telemetry/schemas/telemetry-property-schemas' export type ClassifiedError = { error_class: ErrorClass diff --git a/src/main/telemetry/client-daemon-audit-sampling.test.ts b/src/main/telemetry/client-daemon-audit-sampling.test.ts index 5d6cf235d3f..c8378183672 100644 --- a/src/main/telemetry/client-daemon-audit-sampling.test.ts +++ b/src/main/telemetry/client-daemon-audit-sampling.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { eventSchemas } from '../../shared/telemetry-events' +import { eventSchemas } from '../../shared/telemetry/telemetry-event-registry' import { recordAuthenticatedInventory, type DaemonAuditContext diff --git a/src/main/telemetry/client-prompt-sampling.test.ts b/src/main/telemetry/client-prompt-sampling.test.ts index a406f223e2b..8da878fa8c0 100644 --- a/src/main/telemetry/client-prompt-sampling.test.ts +++ b/src/main/telemetry/client-prompt-sampling.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import type { EventProps } from '../../shared/telemetry-events' +import type { EventProps } from '../../shared/telemetry/telemetry-event-classification' import { track } from './client' import { BASE_COMMON, diff --git a/src/main/telemetry/client-protected-milestones.test.ts b/src/main/telemetry/client-protected-milestones.test.ts index 954c93ca98b..157c170a9e8 100644 --- a/src/main/telemetry/client-protected-milestones.test.ts +++ b/src/main/telemetry/client-protected-milestones.test.ts @@ -1,6 +1,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import type { GlobalSettings } from '../../shared/global-settings-types' -import type { EventProps } from '../../shared/telemetry-events' +import type { EventProps } from '../../shared/telemetry/telemetry-event-classification' import { _enableTransportForTests, track } from './client' import { BASE_COMMON, diff --git a/src/main/telemetry/client-test-harness.ts b/src/main/telemetry/client-test-harness.ts index 1312e7c5cd7..7537ecc9a0a 100644 --- a/src/main/telemetry/client-test-harness.ts +++ b/src/main/telemetry/client-test-harness.ts @@ -1,6 +1,6 @@ import type { PostHog } from 'posthog-node' import { vi } from 'vitest' -import type { CommonProps } from '../../shared/telemetry-events' +import type { CommonProps } from '../../shared/telemetry/telemetry-event-classification' import type { GlobalSettings } from '../../shared/global-settings-types' import type { Store } from '../persistence/loading-store/store' import { diff --git a/src/main/telemetry/client.ts b/src/main/telemetry/client.ts index 2a9417355bb..2cc6654b278 100644 --- a/src/main/telemetry/client.ts +++ b/src/main/telemetry/client.ts @@ -2,8 +2,9 @@ import { randomUUID } from 'node:crypto' import type { PostHog } from 'posthog-node' -import type { CommonProps, EventName, EventProps, OptInVia } from '../../shared/telemetry-events' -import type { AgentDashboardSurface } from '../../shared/telemetry-agent-dashboard-event-schemas' +import type * as events from '../../shared/telemetry/telemetry-event-classification' +import type { OptInVia } from '../../shared/telemetry/schemas/telemetry-property-schemas' +import type { AgentDashboardSurface } from '../../shared/telemetry/schemas/telemetry-agent-dashboard-event-schemas' import type { Store } from '../persistence/loading-store/store' import { consumeBurstToken, resetBurstCapsForSession } from './burst-cap' import { telemetryEventSampleRate } from './event-sampling' @@ -38,7 +39,7 @@ const IS_OFFICIAL_BUILD: boolean = let posthog: PostHog | null = null let sessionId: string | null = null -let commonProps: CommonProps | null = null +let commonProps: events.CommonProps | null = null let shuttingDown = false let storeRef: Store | null = null @@ -132,7 +133,7 @@ export function hasTrackedAgentDashboardActiveToday(props: unknown): boolean { ) } -export function track(name: N, props: EventProps): boolean { +export function track(name: N, props: events.EventProps): boolean { if (!testTransportEnabled && (!IS_OFFICIAL_BUILD || !TELEMETRY_ENABLED)) { return false } @@ -235,7 +236,7 @@ export function track(name: N, props: EventProps): boole return true } -function enqueueCapture(name: EventName, props: CaptureProperties): void { +function enqueueCapture(name: events.EventName, props: CaptureProperties): void { if (!commonProps) { throw new Error('telemetry common props missing') } @@ -346,7 +347,7 @@ export function _setPostHogClientForTests(client: PostHog | null): void { posthog = client } -export function _setCommonPropsForTests(props: CommonProps | null): void { +export function _setCommonPropsForTests(props: events.CommonProps | null): void { commonProps = props } diff --git a/src/main/telemetry/consent.ts b/src/main/telemetry/consent.ts index a690120b4ca..56f2d28154f 100644 --- a/src/main/telemetry/consent.ts +++ b/src/main/telemetry/consent.ts @@ -1,7 +1,7 @@ // Centralize runtime consent precedence. Environment/CI overrides never mutate persisted preference, so removing them restores user intent. import type { GlobalSettings } from '../../shared/global-settings-types' -import type { TelemetryConsentState } from '../../shared/telemetry-consent-types' +import type { TelemetryConsentState } from '../../shared/telemetry/telemetry-consent-types' // Retain pending-banner vs explicit-disabled reasons for UI; shared types cross IPC while this re-export preserves main callers. export type ConsentState = TelemetryConsentState diff --git a/src/main/telemetry/event-sampling.ts b/src/main/telemetry/event-sampling.ts index 2c866e465aa..aa11444ba50 100644 --- a/src/main/telemetry/event-sampling.ts +++ b/src/main/telemetry/event-sampling.ts @@ -1,4 +1,4 @@ -import type { EventName } from '../../shared/telemetry-events' +import type { EventName } from '../../shared/telemetry/telemetry-event-classification' // Low-volume protected milestones: never sampled and exempt from the shared session ceiling. const PROTECTED_MILESTONE_EVENTS: ReadonlySet = new Set([ diff --git a/src/main/telemetry/experiment-cohort-props.ts b/src/main/telemetry/experiment-cohort-props.ts index e8a68d517d0..632ec6c9077 100644 --- a/src/main/telemetry/experiment-cohort-props.ts +++ b/src/main/telemetry/experiment-cohort-props.ts @@ -1,4 +1,4 @@ -import type { CommonProps } from '../../shared/telemetry-events' +import type { CommonProps } from '../../shared/telemetry/telemetry-event-classification' import type { Store } from '../persistence/loading-store/store' import { ensureChatUiLaunchTipCohort } from './chat-ui-launch-tip-cohort' diff --git a/src/main/telemetry/native-chat-prompt-submissions.ts b/src/main/telemetry/native-chat-prompt-submissions.ts index 6b0115feb7f..1657eb34a6a 100644 --- a/src/main/telemetry/native-chat-prompt-submissions.ts +++ b/src/main/telemetry/native-chat-prompt-submissions.ts @@ -1,6 +1,6 @@ import { tuiAgentToAgentKind } from '../../shared/agent-status/identity/agent-kind' import { isTuiAgent } from '../../shared/agent-launch/catalog/tui-agent-config' -import type { EventProps } from '../../shared/telemetry-events' +import type { EventProps } from '../../shared/telemetry/telemetry-event-classification' import type { JournalWriterCommit } from '../native-chat/agent-session-journal/journal-writer-changes' import type { AgentSessionJournal } from '../native-chat/agent-session-journal/journal-store' import { recordStructuredChatPromptAccepted } from './structured-chat-dispatch' diff --git a/src/main/telemetry/onboarding-cohort-classifier.ts b/src/main/telemetry/onboarding-cohort-classifier.ts index b649287c135..395e641649f 100644 --- a/src/main/telemetry/onboarding-cohort-classifier.ts +++ b/src/main/telemetry/onboarding-cohort-classifier.ts @@ -1,7 +1,7 @@ // Known limitation: live completion shares upgrade-backfill shape, so dashboards forward-fill cohort from _started (onboarding-telemetry-extensions.md §2). TODO: add a migration sentinel. Failed/uninitialized reads omit the optional cohort rather than break telemetry. -import { ONBOARDING_FINAL_STEP } from '../../shared/onboarding-defaults' -import type { OnboardingCohort } from '../../shared/telemetry-events' +import { ONBOARDING_FINAL_STEP } from '../../shared/onboarding/onboarding-defaults' +import type { OnboardingCohort } from '../../shared/telemetry/telemetry-event-classification' import type { Store } from '../persistence/loading-store/store' let storeRef: Store | null = null diff --git a/src/main/telemetry/opt-out-capture.ts b/src/main/telemetry/opt-out-capture.ts index c98ab22e216..934ede0374a 100644 --- a/src/main/telemetry/opt-out-capture.ts +++ b/src/main/telemetry/opt-out-capture.ts @@ -1,6 +1,7 @@ import { randomUUID } from 'node:crypto' import type { PostHog } from 'posthog-node' -import type { CommonProps, OptInVia } from '../../shared/telemetry-events' +import type { CommonProps } from '../../shared/telemetry/telemetry-event-classification' +import type { OptInVia } from '../../shared/telemetry/schemas/telemetry-property-schemas' import { consumeBurstToken } from './burst-cap' import { waitForCaptureEnqueue } from './posthog-transport' import { validate } from './validator' diff --git a/src/main/telemetry/plugin-install-telemetry.test.ts b/src/main/telemetry/plugin-install-telemetry.test.ts index ed2871575ad..2f45bdb6ccb 100644 --- a/src/main/telemetry/plugin-install-telemetry.test.ts +++ b/src/main/telemetry/plugin-install-telemetry.test.ts @@ -1,5 +1,5 @@ import { beforeEach, describe, expect, it, vi } from 'vitest' -import { eventSchemas } from '../../shared/telemetry-events' +import { eventSchemas } from '../../shared/telemetry/telemetry-event-registry' import { pluginInstallKind, pluginTelemetryCatalog, diff --git a/src/main/telemetry/plugin-install-telemetry.ts b/src/main/telemetry/plugin-install-telemetry.ts index e0555a6b78f..08f3deb6652 100644 --- a/src/main/telemetry/plugin-install-telemetry.ts +++ b/src/main/telemetry/plugin-install-telemetry.ts @@ -7,7 +7,7 @@ import { isOfficialMarketplaceGitSource, isSameGitRepository } from '../../shared/plugins/catalog/plugin-marketplace' -import type { EventProps } from '../../shared/telemetry-events' +import type { EventProps } from '../../shared/telemetry/telemetry-event-classification' import { track } from './client' export type PluginInstallTelemetryProps = EventProps<'plugin_installed'> diff --git a/src/main/telemetry/posthog-transport.ts b/src/main/telemetry/posthog-transport.ts index 1fc61f4570e..58aa81b7bd0 100644 --- a/src/main/telemetry/posthog-transport.ts +++ b/src/main/telemetry/posthog-transport.ts @@ -2,7 +2,7 @@ import { arch as osArch, platform as osPlatform, release as osRelease } from 'no import type * as PostHogSdk from 'posthog-node' import { getAppEnvironment } from '../../shared/app-environment' import { getMainHttpClient } from '../network/http-client' -import type { CommonProps, EventName } from '../../shared/telemetry-events' +import type { CommonProps, EventName } from '../../shared/telemetry/telemetry-event-classification' import type { ConsentState } from './consent' const OPT_OUT_CAPTURE_ENQUEUE_TIMEOUT_MS = 1_000 diff --git a/src/main/telemetry/protected-milestones.ts b/src/main/telemetry/protected-milestones.ts index 94a11f47bfd..1db38b47ae4 100644 --- a/src/main/telemetry/protected-milestones.ts +++ b/src/main/telemetry/protected-milestones.ts @@ -3,13 +3,14 @@ // debounced settings save (a crash before that save can re-emit after restart), so dashboards dedupe per install_id. import type { GlobalSettings } from '../../shared/global-settings-types' -import { utcDayIndex } from '../../shared/telemetry-day' -import { eventSchemas, type EventName, type EventProps } from '../../shared/telemetry-events' +import { utcDayIndex } from '../../shared/telemetry/telemetry-day' +import { eventSchemas } from '../../shared/telemetry/telemetry-event-registry' +import type { EventName, EventProps } from '../../shared/telemetry/telemetry-event-classification' import type { FirstAgentInteractionSource, MeaningfulActivityTrigger -} from '../../shared/telemetry-protected-milestone-schemas' -import type { TelemetrySettings } from '../../shared/telemetry-settings-types' +} from '../../shared/telemetry/schemas/telemetry-protected-milestone-schemas' +import type { TelemetrySettings } from '../../shared/telemetry/telemetry-settings-types' import type { Store } from '../persistence/loading-store/store' import { consumeBurstToken } from './burst-cap' import { validate } from './validator' diff --git a/src/main/telemetry/structured-chat-dispatch.ts b/src/main/telemetry/structured-chat-dispatch.ts index 6ec47bd0a2d..8edcd83ed89 100644 --- a/src/main/telemetry/structured-chat-dispatch.ts +++ b/src/main/telemetry/structured-chat-dispatch.ts @@ -6,9 +6,9 @@ import type { StructuredChatPromptTelemetryEvent, StructuredChatTelemetryEvent } from '../../shared/agent-session/requests/structured-chat-dispatch-telemetry' -import { agentKindSchema } from '../../shared/telemetry-property-schemas' +import { agentKindSchema } from '../../shared/telemetry/schemas/telemetry-property-schemas' import { isTelemetryInitialized, track } from './client' -import type { EventProps } from '../../shared/telemetry-events' +import type { EventProps } from '../../shared/telemetry/telemetry-event-classification' type TelemetryListener = (event: StructuredChatTelemetryEvent, callerKey: string) => void const remoteListeners = new Set() diff --git a/src/main/telemetry/validator.ts b/src/main/telemetry/validator.ts index a9ac83906b8..2d189d3e8f5 100644 --- a/src/main/telemetry/validator.ts +++ b/src/main/telemetry/validator.ts @@ -2,10 +2,10 @@ import { commonPropsSchema, - eventSchemas, type EventName, type EventProps -} from '../../shared/telemetry-events' +} from '../../shared/telemetry/telemetry-event-classification' +import { eventSchemas } from '../../shared/telemetry/telemetry-event-registry' export type ValidationResult = | { ok: true; props: EventProps } diff --git a/src/main/telemetry/wsl-move-orchestrator-telemetry.ts b/src/main/telemetry/wsl-move-orchestrator-telemetry.ts index 779c9c84d18..4d4e6452b2c 100644 --- a/src/main/telemetry/wsl-move-orchestrator-telemetry.ts +++ b/src/main/telemetry/wsl-move-orchestrator-telemetry.ts @@ -2,8 +2,8 @@ * The move orchestrator's telemetry (D3a): one enum-only row each time a distro's state changes, * so the rollout can see how many moves wait on busy terminals, back off or park, and why. */ -import type { EventProps } from '../../shared/telemetry-events' -import { WSL_MOVE_REFUSAL_VALUES } from '../../shared/telemetry-wsl-move-event-schemas' +import type { EventProps } from '../../shared/telemetry/telemetry-event-classification' +import { WSL_MOVE_REFUSAL_VALUES } from '../../shared/telemetry/schemas/telemetry-wsl-move-event-schemas' import type { WslMovePreview, WslMoveResult } from '../../shared/wsl-move/wsl-move-driver-types' import type { WslMoveOrchestratorParkReason, diff --git a/src/main/telemetry/wsl-move-telemetry.ts b/src/main/telemetry/wsl-move-telemetry.ts index f279bc8ff97..ec29595cac9 100644 --- a/src/main/telemetry/wsl-move-telemetry.ts +++ b/src/main/telemetry/wsl-move-telemetry.ts @@ -3,11 +3,11 @@ * waiting for its host, with the phase it reached, a reason code and duration and size buckets. * Every raw code is narrowed onto the schema's enums here; nothing a user or host named leaves. */ -import type { EventProps } from '../../shared/telemetry-event-classification' +import type { EventProps } from '../../shared/telemetry/telemetry-event-classification' import { WSL_MOVE_REFUSAL_VALUES, WSL_MOVE_RESET_REASON_VALUES -} from '../../shared/telemetry-wsl-move-event-schemas' +} from '../../shared/telemetry/schemas/telemetry-wsl-move-event-schemas' import type { WslMoveRefusalCode, WslMoveResult } from '../../shared/wsl-move/wsl-move-driver-types' import type { WslMoveCutoverPhase } from '../../shared/wsl-move/wsl-move-cutover' import type { WslMoveDriverDeps } from '../persistence/moving-wsl-projects/execution/wsl-move-driver-ports' diff --git a/src/main/telemetry/wsl-move-undo-telemetry.ts b/src/main/telemetry/wsl-move-undo-telemetry.ts index d8039f8f14f..6b23ed79465 100644 --- a/src/main/telemetry/wsl-move-undo-telemetry.ts +++ b/src/main/telemetry/wsl-move-undo-telemetry.ts @@ -2,8 +2,8 @@ * Undo telemetry for a WSL move ("use this project here again"): one enum-only row per request * that got past the gate, with how it ended and a duration bucket. Nothing a user or host named leaves. */ -import type { EventProps } from '../../shared/telemetry-events' -import { WSL_MOVE_UNDO_OUTCOME_VALUES } from '../../shared/telemetry-wsl-move-event-schemas' +import type { EventProps } from '../../shared/telemetry/telemetry-event-classification' +import { WSL_MOVE_UNDO_OUTCOME_VALUES } from '../../shared/telemetry/schemas/telemetry-wsl-move-event-schemas' import type { WslMoveUseLocallyResult } from '../../shared/wsl-move/wsl-moved-project' import { track } from './client' import { durationBucket } from './wsl-move-telemetry' diff --git a/src/main/telemetry/wsl-usage-snapshot.ts b/src/main/telemetry/wsl-usage-snapshot.ts index 20fca1f6c19..3bff2f09b89 100644 --- a/src/main/telemetry/wsl-usage-snapshot.ts +++ b/src/main/telemetry/wsl-usage-snapshot.ts @@ -10,7 +10,7 @@ import { isDrvfsLinuxPath, parseWslUncPath } from '../../shared/file-access/wsl- import { bucketWslUsageCount, type WslUsageSnapshotProps -} from '../../shared/telemetry-wsl-usage-event-schemas' +} from '../../shared/telemetry/schemas/telemetry-wsl-usage-event-schemas' export type WslUsageProjectLocation = 'distro_fs' | 'windows_drive' diff --git a/src/main/updater/releases/updater-system-requirement.ts b/src/main/updater/releases/updater-system-requirement.ts index 6299ef045f5..2575cb776b0 100644 --- a/src/main/updater/releases/updater-system-requirement.ts +++ b/src/main/updater/releases/updater-system-requirement.ts @@ -1,7 +1,7 @@ import { release } from 'node:os' import type { UpdateInfo } from 'electron-updater' import type { UnsupportedSystemUpdate } from '../../../shared/update-status-types' -import { macosVersionForDarwinFloor } from '../../../shared/macos-darwin-floor' +import { macosVersionForDarwinFloor } from '../../../shared/updater/requirements/macos-darwin-floor' import { compareVersions } from './updater-fallback' function darwinParts(version: string): number[] | null { diff --git a/src/main/updater/updater-lifecycle-diagnostics.ts b/src/main/updater/updater-lifecycle-diagnostics.ts index 4bb340c383d..fe853e0d946 100644 --- a/src/main/updater/updater-lifecycle-diagnostics.ts +++ b/src/main/updater/updater-lifecycle-diagnostics.ts @@ -1,4 +1,4 @@ -import type { CrashReportBreadcrumbData } from '../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../shared/crash-reporting/crash-reporting' import { recordDurableCrashBreadcrumb } from '../crash-reporting/breadcrumbs/durable-crash-breadcrumb' export function recordUpdaterLifecycle( diff --git a/src/main/usage/provider-lifecycle/usage-provider-store-contract.ts b/src/main/usage/provider-lifecycle/usage-provider-store-contract.ts index 184e3ef0d54..fad2fafaeea 100644 --- a/src/main/usage/provider-lifecycle/usage-provider-store-contract.ts +++ b/src/main/usage/provider-lifecycle/usage-provider-store-contract.ts @@ -1,5 +1,5 @@ import type { AgentTokenSession } from '../reporting/token-usage/agent-token-usage' -import type { AgentTokenUsage } from '../../../shared/telemetry-agent-token-usage-schema' +import type { AgentTokenUsage } from '../../../shared/telemetry/schemas/telemetry-agent-token-usage-schema' import type { UsageScanWorktreeRef } from './usage-provider-contract' import type { UsageCacheSplitRequest, diff --git a/src/main/usage/reporting/token-usage/agent-token-usage-reporter.ts b/src/main/usage/reporting/token-usage/agent-token-usage-reporter.ts index b0bc656652b..9a9e5fc2588 100644 --- a/src/main/usage/reporting/token-usage/agent-token-usage-reporter.ts +++ b/src/main/usage/reporting/token-usage/agent-token-usage-reporter.ts @@ -4,7 +4,7 @@ import { agentTokenCountsSchema, agentTokenUsageSchema, type AgentTokenUsage -} from '../../../../shared/telemetry-agent-token-usage-schema' +} from '../../../../shared/telemetry/schemas/telemetry-agent-token-usage-schema' import type { UsageTelemetryHost } from '../../usage-store-host' import { UsageCacheSnapshotWriter } from '../../cache/usage-cache-snapshot-writer' import type { AgentTokenSession } from './agent-token-usage' diff --git a/src/main/usage/reporting/token-usage/agent-token-usage.ts b/src/main/usage/reporting/token-usage/agent-token-usage.ts index e49a19fda68..3be08d729ec 100644 --- a/src/main/usage/reporting/token-usage/agent-token-usage.ts +++ b/src/main/usage/reporting/token-usage/agent-token-usage.ts @@ -1,4 +1,4 @@ -import type { AgentTokenCounts } from '../../../../shared/telemetry-agent-token-usage-schema' +import type { AgentTokenCounts } from '../../../../shared/telemetry/schemas/telemetry-agent-token-usage-schema' import type { ClaudeUsageSession } from '../../../claude-usage/types' import type { CodexUsageSession } from '../../../codex-usage/types' import type { OpenCodeUsageSession } from '../../../opencode-usage/types' diff --git a/src/main/usage/usage-store-host.ts b/src/main/usage/usage-store-host.ts index b717713fa1d..7c1e35acae0 100644 --- a/src/main/usage/usage-store-host.ts +++ b/src/main/usage/usage-store-host.ts @@ -1,4 +1,4 @@ -import type { AgentTokenUsage } from '../../shared/telemetry-agent-token-usage-schema' +import type { AgentTokenUsage } from '../../shared/telemetry/schemas/telemetry-agent-token-usage-schema' import type { UsageWorktreeRef } from './worktree-attribution/usage-worktree-metadata' export type UsageWorktreeCatalog = { diff --git a/src/main/window/main-window/main-window-focus-lifecycle.ts b/src/main/window/main-window/main-window-focus-lifecycle.ts index c14f19d2b31..42a4f40ed56 100644 --- a/src/main/window/main-window/main-window-focus-lifecycle.ts +++ b/src/main/window/main-window/main-window-focus-lifecycle.ts @@ -1,5 +1,5 @@ import { ipcMain, type BrowserWindow } from 'electron' -import { isCrashReportReason } from '../../../shared/crash-reporting' +import { isCrashReportReason } from '../../../shared/crash-reporting/crash-reporting' import { plainTextContextMenuTargetChannel, richMarkdownContextMenuTargetChannel, diff --git a/src/main/workspace-hooks/worktree-runner-script.ts b/src/main/workspace-hooks/worktree-runner-script.ts index 084148700cb..1227d0b1f9d 100644 --- a/src/main/workspace-hooks/worktree-runner-script.ts +++ b/src/main/workspace-hooks/worktree-runner-script.ts @@ -6,7 +6,7 @@ import { type SetupRunnerShell } from '../../shared/agent-launch/startup/setup-runner-command' import { scriptDeclaresPosixShell } from '../../shared/workspace-setup/setup-script-shebang' -import { resolveWindowsShellStartupFamily } from '../../shared/windows-terminal-shell' +import { resolveWindowsShellStartupFamily } from '../../shared/shell/launch/windows-terminal-shell' import { resolveWindowsGitBashShellPath } from '../pty/shell-startup/git-bash' import { gitExecFileAsync } from '../git/command-runner/git-exec-file' import { withRepositoryGitCause } from '../git/repository-git-cause' diff --git a/src/main/workspaces/creation/workspace-create-event-fields.ts b/src/main/workspaces/creation/workspace-create-event-fields.ts index bb41c089f19..e892b711803 100644 --- a/src/main/workspaces/creation/workspace-create-event-fields.ts +++ b/src/main/workspaces/creation/workspace-create-event-fields.ts @@ -10,7 +10,7 @@ import type { WORKTREE_COUNT_BUCKETS, workspaceCreateFailedProperties, workspaceCreatedTimingProperties -} from '../../../shared/telemetry-workspace-create-schemas' +} from '../../../shared/telemetry/schemas/telemetry-workspace-create-schemas' import type { WorktreeCreateTimingRecorder } from './worktree-create-timing' import type { WorktreeCreateConcurrency } from './worktree-create-concurrency' import type { CreateEventRepoFacts } from '../../git/worktrees/creation/create-event-repo-probe' diff --git a/src/main/workspaces/creation/workspace-create-telemetry.ts b/src/main/workspaces/creation/workspace-create-telemetry.ts index 913e56723ad..d85bcbc9e44 100644 --- a/src/main/workspaces/creation/workspace-create-telemetry.ts +++ b/src/main/workspaces/creation/workspace-create-telemetry.ts @@ -1,7 +1,7 @@ import type { WorktreeCreateTiming } from '../../../shared/worktree/create-types' import type { WorkspaceCreateEntryPoint } from '../../../shared/worktree/creation/create-timing-vocabulary' -import { workspaceSourceSchema } from '../../../shared/telemetry-property-schemas' -import type { EventProps } from '../../../shared/telemetry-event-classification' +import { workspaceSourceSchema } from '../../../shared/telemetry/schemas/telemetry-property-schemas' +import type { EventProps } from '../../../shared/telemetry/telemetry-event-classification' import type { WorkspaceSource } from '../../../shared/workspace-source' import { isTelemetryEnabled, track } from '../../telemetry/client' import { getCohortAtEmit } from '../../telemetry/cohort-classifier' diff --git a/src/preload/api/app-api.ts b/src/preload/api/app-api.ts index 7666eab0328..3418cfc6fae 100644 --- a/src/preload/api/app-api.ts +++ b/src/preload/api/app-api.ts @@ -1,14 +1,14 @@ import type { UiLanguageDetection } from '../../shared/ui-locale' import type { WindowMaterial } from '../../shared/window-material' import type { AppIdentity } from '../../shared/app-identity' -import type { MacosUpgradeSupport } from '../../shared/macos-upgrade-support' +import type { MacosUpgradeSupport } from '../../shared/updater/requirements/macos-upgrade-support' import type { E2EConfig } from '../../shared/e2e-config' import type { ExecutionHostId } from '../../shared/execution-host' import type { WriteTerminalRenderDesyncEvidenceArgs, WriteTerminalRenderDesyncEvidenceResult } from '../../shared/terminal/diagnostics/terminal-render-desync-evidence' -import type { MacCapturedDigitRowChord } from '../../shared/macos-symbolic-hotkeys' +import type { MacCapturedDigitRowChord } from '../../shared/keybindings/macos-symbolic-hotkeys' import type { MarkdownDocument } from '../../shared/file-listing/file-document' import type { PersistedUIState } from '../../shared/persisted-ui-state-types' import type { FloatingTerminalCwdRequest } from '../../shared/ui-chrome-types' diff --git a/src/preload/api/app-bridge.ts b/src/preload/api/app-bridge.ts index ea97521d5a3..136b65d2530 100644 --- a/src/preload/api/app-bridge.ts +++ b/src/preload/api/app-bridge.ts @@ -1,8 +1,8 @@ import { ipcRenderer } from 'electron' import type { AppIdentity } from '../../shared/app-identity' -import type { MacosUpgradeSupport } from '../../shared/macos-upgrade-support' +import type { MacosUpgradeSupport } from '../../shared/updater/requirements/macos-upgrade-support' import type { FloatingTerminalCwdRequest } from '../../shared/ui-chrome-types' -import type { MacCapturedDigitRowChord } from '../../shared/macos-symbolic-hotkeys' +import type { MacCapturedDigitRowChord } from '../../shared/keybindings/macos-symbolic-hotkeys' import type { MarkdownDocument } from '../../shared/file-listing/file-document' import type { WriteTerminalRenderDesyncEvidenceArgs } from '../../shared/terminal/diagnostics/terminal-render-desync-evidence' import { diff --git a/src/preload/api/diagnostics/crash-report-api.ts b/src/preload/api/diagnostics/crash-report-api.ts index 461581d568c..a3ce3059a3a 100644 --- a/src/preload/api/diagnostics/crash-report-api.ts +++ b/src/preload/api/diagnostics/crash-report-api.ts @@ -6,13 +6,13 @@ import type { CrashReportSubmitResult, ReactErrorBoundaryReportArgs, ReactErrorBoundaryReportResult -} from '../../../shared/crash-reporting' +} from '../../../shared/crash-reporting/crash-reporting' import type { FeedbackSubmitArgs, FeedbackSubmitResult -} from '../../../shared/feedback-submit-contract' -import type { RendererHeapStatistics } from '../../../shared/renderer-heap-statistics' -import type { RendererProcessMemory } from '../../../shared/renderer-process-memory' +} from '../../../shared/feedback/feedback-submit-contract' +import type { RendererHeapStatistics } from '../../../shared/crash-reporting/renderer-heap-statistics' +import type { RendererProcessMemory } from '../../../shared/crash-reporting/renderer-process-memory' export type CrashReportsApi = { getLatestPending: () => Promise diff --git a/src/preload/api/diagnostics/crash-reports-bridge.ts b/src/preload/api/diagnostics/crash-reports-bridge.ts index c847b9c7f8a..e2207f1bcc1 100644 --- a/src/preload/api/diagnostics/crash-reports-bridge.ts +++ b/src/preload/api/diagnostics/crash-reports-bridge.ts @@ -6,9 +6,9 @@ import type { CrashReportSubmitResult, ReactErrorBoundaryReportArgs, ReactErrorBoundaryReportResult -} from '../../../shared/crash-reporting' -import type { RendererHeapStatistics } from '../../../shared/renderer-heap-statistics' -import type { RendererProcessMemory } from '../../../shared/renderer-process-memory' +} from '../../../shared/crash-reporting/crash-reporting' +import type { RendererHeapStatistics } from '../../../shared/crash-reporting/renderer-heap-statistics' +import type { RendererProcessMemory } from '../../../shared/crash-reporting/renderer-process-memory' import { readRendererHeapStatistics } from '../../renderer/diagnostics/renderer-heap-statistics-reader' import { readRendererProcessMemory } from '../../renderer/diagnostics/renderer-process-memory-reader' import type { PreloadApi } from '../../api-types' diff --git a/src/preload/api/diagnostics/feedback-bridge.ts b/src/preload/api/diagnostics/feedback-bridge.ts index 3829b24fefa..9b1e99837f2 100644 --- a/src/preload/api/diagnostics/feedback-bridge.ts +++ b/src/preload/api/diagnostics/feedback-bridge.ts @@ -3,7 +3,7 @@ import type { PreloadApi } from '../../api-types' import type { FeedbackSubmitArgs, FeedbackSubmitResult -} from '../../../shared/feedback-submit-contract' +} from '../../../shared/feedback/feedback-submit-contract' export const feedbackApi = { submit: (args: FeedbackSubmitArgs): Promise => diff --git a/src/preload/api/diagnostics/memory-bridge.ts b/src/preload/api/diagnostics/memory-bridge.ts index 353557c78ed..e40261a0302 100644 --- a/src/preload/api/diagnostics/memory-bridge.ts +++ b/src/preload/api/diagnostics/memory-bridge.ts @@ -1,5 +1,5 @@ import { ipcRenderer } from 'electron' -import type { MemorySnapshot } from '../../../shared/process-stats-types' +import type { MemorySnapshot } from '../../../shared/diagnostics/process-stats-types' import type { PreloadApi } from '../../api-types' import type { ResourceViewAdmission } from '../../../shared/resource-view-admission' diff --git a/src/preload/api/diagnostics/telemetry-api.ts b/src/preload/api/diagnostics/telemetry-api.ts index 15ad48c7e8f..5ce77f2af7d 100644 --- a/src/preload/api/diagnostics/telemetry-api.ts +++ b/src/preload/api/diagnostics/telemetry-api.ts @@ -1,7 +1,7 @@ import type { BrowserExtensionsBannerAssignmentReply } from '../../../shared/browser/extensions/browser-extensions-banner' import type { ResourceViewAdmission } from '../../../shared/resource-view-admission' -import type { TelemetryConsentState } from '../../../shared/telemetry-consent-types' -import type { MemorySnapshot, StatsSummary } from '../../../shared/process-stats-types' +import type { TelemetryConsentState } from '../../../shared/telemetry/telemetry-consent-types' +import type { MemorySnapshot, StatsSummary } from '../../../shared/diagnostics/process-stats-types' export type StatsApi = { getSummary: () => Promise diff --git a/src/preload/api/onboarding/onboarding-api.ts b/src/preload/api/onboarding/onboarding-api.ts index 36eb0d7be5a..ec69b4dba32 100644 --- a/src/preload/api/onboarding/onboarding-api.ts +++ b/src/preload/api/onboarding/onboarding-api.ts @@ -1,5 +1,5 @@ import type { ChatUiLaunchTipVariant } from '../../../shared/native-chat/chat-ui-launch-tip-audience' -import type { OnboardingState } from '../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../shared/onboarding/onboarding-state-types' export type OnboardingApi = { get: () => Promise diff --git a/src/preload/api/onboarding/onboarding-bridge.ts b/src/preload/api/onboarding/onboarding-bridge.ts index 6e4c25f0dcf..cb0a790571f 100644 --- a/src/preload/api/onboarding/onboarding-bridge.ts +++ b/src/preload/api/onboarding/onboarding-bridge.ts @@ -1,6 +1,6 @@ import { ipcRenderer } from 'electron' import type { ChatUiLaunchTipVariant } from '../../../shared/native-chat/chat-ui-launch-tip-audience' -import type { OnboardingState } from '../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../shared/onboarding/onboarding-state-types' import type { PreloadApi } from '../../api-types' export const onboardingApi = { diff --git a/src/preload/api/terminal/pty-api.ts b/src/preload/api/terminal/pty-api.ts index 3b7feec286e..b22414759cd 100644 --- a/src/preload/api/terminal/pty-api.ts +++ b/src/preload/api/terminal/pty-api.ts @@ -34,7 +34,7 @@ import type { AgentKind, LaunchSource, RequestKind -} from '../../../shared/telemetry-property-schemas' +} from '../../../shared/telemetry/schemas/telemetry-property-schemas' import type { TerminalSideEffectBatch } from '../../../shared/terminal/output/terminal-side-effect-facts' import type { TerminalViewAttributes } from '../../../shared/terminal/protocol/queries/terminal-view-attributes' import type { TuiAgent } from '../../../shared/agent-launch/catalog/tui-agent' diff --git a/src/preload/api/terminal/pty-bridge-session-control.ts b/src/preload/api/terminal/pty-bridge-session-control.ts index f2b55ec381a..bdfb4ea5969 100644 --- a/src/preload/api/terminal/pty-bridge-session-control.ts +++ b/src/preload/api/terminal/pty-bridge-session-control.ts @@ -35,7 +35,7 @@ import type { AgentKind, LaunchSource, RequestKind -} from '../../../shared/telemetry-property-schemas' +} from '../../../shared/telemetry/schemas/telemetry-property-schemas' import type { PreloadApi } from '../../api-types' import type { TerminalPanePlacement } from '../../../shared/workspace-layout/terminal-topology/terminal-pane-placement' import type { AgentPaneLaunchRequest } from '../../../shared/agent-launch/contracts/agent-pane-launch-request' diff --git a/src/preload/api/terminal/pty-management-api.ts b/src/preload/api/terminal/pty-management-api.ts index ae0324cd599..bef8c8ea533 100644 --- a/src/preload/api/terminal/pty-management-api.ts +++ b/src/preload/api/terminal/pty-management-api.ts @@ -1,4 +1,4 @@ -import type { DaemonPtyCwdClass } from '../../../shared/daemon-adoption-telemetry' +import type { DaemonPtyCwdClass } from '../../../shared/telemetry/daemon-adoption-telemetry' import type { DaemonAsyncIoStatus } from '../../../shared/daemon-async-io-health' // Mirrors DaemonSessionInfo; preload cannot import main-only daemon protocol types. diff --git a/src/preload/api/window-ui/ui-bridge-terminal-and-session-tabs.ts b/src/preload/api/window-ui/ui-bridge-terminal-and-session-tabs.ts index daef6c87272..4dcb47be771 100644 --- a/src/preload/api/window-ui/ui-bridge-terminal-and-session-tabs.ts +++ b/src/preload/api/window-ui/ui-bridge-terminal-and-session-tabs.ts @@ -3,7 +3,7 @@ import type { RuntimeFileOpenPosition } from '../../../shared/file-access/runtime-editor-file-open' import { ipcRenderer } from 'electron' -import type { TerminalPaneSplitSource } from '../../../shared/feature-education-telemetry' +import type { TerminalPaneSplitSource } from '../../../shared/feature-education/feature-education-telemetry' import type { TerminalTabCreateReply } from '../../../shared/workspace-layout/terminal-surfaces/terminal-reveal-identity' import type { AgentLaunchTabPublishReply, diff --git a/src/preload/api/window-ui/ui-command-event-api.ts b/src/preload/api/window-ui/ui-command-event-api.ts index c63397aa87e..56e39c37c7a 100644 --- a/src/preload/api/window-ui/ui-command-event-api.ts +++ b/src/preload/api/window-ui/ui-command-event-api.ts @@ -41,7 +41,7 @@ import type { WorktreeSetupLaunch, WorktreeStartupLaunch } from '../../../shared/worktree/creation/launch-types' -import type { FeatureInteractionId } from '../../../shared/feature-interaction-catalog' +import type { FeatureInteractionId } from '../../../shared/feature-education/interactions/feature-interaction-catalog' import type { KeybindingActionId } from '../../../shared/keybindings/types' import type { BrowserFindSource } from '../../../shared/browser/guest-lifecycle/browser-find-source' import type { @@ -54,7 +54,7 @@ import type { AgentProviderSessionMetadata, SleepingAgentLaunchConfig } from '../../../shared/agent-session/lifecycle/agent-session-resume' -import type { TerminalPaneSplitSource } from '../../../shared/feature-education-telemetry' +import type { TerminalPaneSplitSource } from '../../../shared/feature-education/feature-education-telemetry' import type { RuntimeMobileSessionTabMove } from '../../../shared/remote-runtime/session-graph/runtime-session-contracts' import type { RuntimeTerminalCreateRequestPayload, diff --git a/src/preload/renderer/diagnostics/renderer-heap-statistics-reader.ts b/src/preload/renderer/diagnostics/renderer-heap-statistics-reader.ts index 9126e041574..a64ffc56493 100644 --- a/src/preload/renderer/diagnostics/renderer-heap-statistics-reader.ts +++ b/src/preload/renderer/diagnostics/renderer-heap-statistics-reader.ts @@ -1,4 +1,4 @@ -import type { RendererHeapStatistics } from '../../../shared/renderer-heap-statistics' +import type { RendererHeapStatistics } from '../../../shared/crash-reporting/renderer-heap-statistics' type HeapStatisticsSource = Pick diff --git a/src/preload/renderer/diagnostics/renderer-process-memory-reader.ts b/src/preload/renderer/diagnostics/renderer-process-memory-reader.ts index 01dbb1e2414..9f93089d429 100644 --- a/src/preload/renderer/diagnostics/renderer-process-memory-reader.ts +++ b/src/preload/renderer/diagnostics/renderer-process-memory-reader.ts @@ -1,4 +1,4 @@ -import type { RendererProcessMemory } from '../../../shared/renderer-process-memory' +import type { RendererProcessMemory } from '../../../shared/crash-reporting/renderer-process-memory' type ProcessMemorySource = Pick diff --git a/src/renderer/src/app-shell/use-app-startup-hydration.ts b/src/renderer/src/app-shell/use-app-startup-hydration.ts index 5ee1e528e83..e794238a517 100644 --- a/src/renderer/src/app-shell/use-app-startup-hydration.ts +++ b/src/renderer/src/app-shell/use-app-startup-hydration.ts @@ -45,7 +45,7 @@ import { finishStartupWorktreeHydration, refreshStartupWorktrees } from '../startup/startup-worktree-refresh' -import type { OnboardingState } from '../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../shared/onboarding/onboarding-state-types' /** Hydrate settings/UI/catalog/session, reconnect and restore terminals before unlocking saves. Failure boots in degraded no-save mode to protect disk state. */ export function useAppStartupHydration(onOnboardingLoaded: (state: OnboardingState) => void): void { diff --git a/src/renderer/src/app-shell/use-onboarding-and-feature-tips.ts b/src/renderer/src/app-shell/use-onboarding-and-feature-tips.ts index 7f8ef1f0d9d..40e34fdfdb7 100644 --- a/src/renderer/src/app-shell/use-onboarding-and-feature-tips.ts +++ b/src/renderer/src/app-shell/use-onboarding-and-feature-tips.ts @@ -15,7 +15,7 @@ import { } from '../components/feature-tips/feature-tip-telemetry' import { useAppStore } from '../store/index' import { isWebClientLocation } from './platform/web-client-location' -import type { OnboardingState } from '../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../shared/onboarding/onboarding-state-types' export type OnboardingGate = ReturnType diff --git a/src/renderer/src/components/browser-pane/use-browser-extensions-tour.ts b/src/renderer/src/components/browser-pane/use-browser-extensions-tour.ts index 2c9c5999482..68c6205fdf0 100644 --- a/src/renderer/src/components/browser-pane/use-browser-extensions-tour.ts +++ b/src/renderer/src/components/browser-pane/use-browser-extensions-tour.ts @@ -1,8 +1,8 @@ import { useEffect, useState } from 'react' import { useAppStore } from '@/store/index' import { isContextualTourSessionConsumed } from '@/store/slices/ui/ui-slice-tour-actions' -import type { ContextualTourId } from '../../../../shared/contextual-tours' -import type { FeatureInteractionState } from '../../../../shared/feature-interactions' +import type { ContextualTourId } from '../../../../shared/feature-education/contextual-tours/contextual-tours' +import type { FeatureInteractionState } from '../../../../shared/feature-education/interactions/feature-interactions' import { activeBrowserExtensionsBanner, type BrowserExtensionsBannerAssignmentReply diff --git a/src/renderer/src/components/contextual-tours/ContextualTourControl.tsx b/src/renderer/src/components/contextual-tours/ContextualTourControl.tsx index b68ff3a22c3..63e66db19fb 100644 --- a/src/renderer/src/components/contextual-tours/ContextualTourControl.tsx +++ b/src/renderer/src/components/contextual-tours/ContextualTourControl.tsx @@ -3,7 +3,7 @@ import { Code2, Highlighter, KeyRound, Languages, Pipette, Puzzle, ShieldCheck } import { cn } from '@/lib/class-names' import { Switch } from '@/components/ui/switch' import { useAppStore } from '@/store' -import type { ContextualTourStepControl } from '../../../../shared/contextual-tours' +import type { ContextualTourStepControl } from '../../../../shared/feature-education/contextual-tours/contextual-tours' import { CONTEXTUAL_TOUR_ENABLE_AUTO_WORKSPACE_NAME_EVENT } from './contextual-tour-composer-events' import { useTranslate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/contextual-tours/ContextualTourOverlay.tsx b/src/renderer/src/components/contextual-tours/ContextualTourOverlay.tsx index d4e98b8114c..21b7dff7f34 100644 --- a/src/renderer/src/components/contextual-tours/ContextualTourOverlay.tsx +++ b/src/renderer/src/components/contextual-tours/ContextualTourOverlay.tsx @@ -1,15 +1,15 @@ import { toast } from 'sonner' import { useTranslate } from '@/i18n/use-translate' import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type JSX } from 'react' -import { hasUndoneContextualTourAction } from '../../../../shared/contextual-tour-action-steps' +import { hasUndoneContextualTourAction } from '../../../../shared/feature-education/contextual-tours/contextual-tour-action-steps' import { useAppStore } from '@/store/index' import { runActiveNativeChatSplit } from '@/components/native-chat/pane/routing/native-chat-layout-actions' import { getContextualTour, type ContextualTourId, type ContextualTourStepAction -} from '../../../../shared/contextual-tours' -import type { ContextualTourOutcome } from '../../../../shared/feature-education-telemetry' +} from '../../../../shared/feature-education/contextual-tours/contextual-tours' +import type { ContextualTourOutcome } from '../../../../shared/feature-education/feature-education-telemetry' import { trackContextualTourOutcome, trackContextualTourShown diff --git a/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.fixture.tsx b/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.fixture.tsx index b78b42b7c12..f800de751d3 100644 --- a/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.fixture.tsx +++ b/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.fixture.tsx @@ -2,7 +2,7 @@ import { useLayoutEffect, useRef, useState, type JSX } from 'react' import { Import, MoreHorizontal } from 'lucide-react' import { Button } from '@/components/ui/button' import { defineFixture } from '../../component-fixtures/component-fixture' -import { getContextualTour } from '../../../../shared/contextual-tours' +import { getContextualTour } from '../../../../shared/feature-education/contextual-tours/contextual-tours' import type { BrowserExtensionsBanner } from '../../../../shared/browser/extensions/browser-extensions-banner' import { withBrowserExtensionsBannerLook } from './browser-extensions-banner-look' import { diff --git a/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.tsx b/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.tsx index 8c31e3f9804..b6e39657e37 100644 --- a/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.tsx +++ b/src/renderer/src/components/contextual-tours/ContextualTourOverlaySurface.tsx @@ -19,7 +19,7 @@ import { type ContextualTourStepPlacement, type ContextualTourStepControl, type ContextualTourStepAction -} from '../../../../shared/contextual-tours' +} from '../../../../shared/feature-education/contextual-tours/contextual-tours' import { ContextualTourArrow } from './ContextualTourArrow' import { ContextualTourControl } from './ContextualTourControl' import { ContextualTourProgressDots } from './ContextualTourProgressDots' diff --git a/src/renderer/src/components/contextual-tours/agent-sessions-tour-new-tab.ts b/src/renderer/src/components/contextual-tours/agent-sessions-tour-new-tab.ts index 7dae569f32f..d2658d178b9 100644 --- a/src/renderer/src/components/contextual-tours/agent-sessions-tour-new-tab.ts +++ b/src/renderer/src/components/contextual-tours/agent-sessions-tour-new-tab.ts @@ -1,5 +1,5 @@ import { useAppStore } from '@/store' -import { getContextualTour } from '../../../../shared/contextual-tours' +import { getContextualTour } from '../../../../shared/feature-education/contextual-tours/contextual-tours' /** Finish after the + menu closes so the next lesson follows the selected tab. */ export function advanceAgentSessionsTourPastNewTab(): void { diff --git a/src/renderer/src/components/contextual-tours/browser-extensions-banner-look.ts b/src/renderer/src/components/contextual-tours/browser-extensions-banner-look.ts index be4b41bcfaa..8f30b00dd35 100644 --- a/src/renderer/src/components/contextual-tours/browser-extensions-banner-look.ts +++ b/src/renderer/src/components/contextual-tours/browser-extensions-banner-look.ts @@ -8,7 +8,7 @@ import { import type { ContextualTourId, ContextualTourStepActionKind -} from '../../../../shared/contextual-tours' +} from '../../../../shared/feature-education/contextual-tours/contextual-tours' import { trackBrowserExtensionsBannerAction } from '@/diagnostics/telemetry/browser-extensions-telemetry' import type { ActiveTourRenderState } from './ContextualTourOverlaySurface' diff --git a/src/renderer/src/components/contextual-tours/contextual-tour-floating-position.ts b/src/renderer/src/components/contextual-tours/contextual-tour-floating-position.ts index 53192a85103..49f4d80d6be 100644 --- a/src/renderer/src/components/contextual-tours/contextual-tour-floating-position.ts +++ b/src/renderer/src/components/contextual-tours/contextual-tour-floating-position.ts @@ -9,7 +9,7 @@ import { type Placement } from '@floating-ui/dom' import type { CSSProperties } from 'react' -import type { ContextualTourStepPlacement } from '../../../../shared/contextual-tours' +import type { ContextualTourStepPlacement } from '../../../../shared/feature-education/contextual-tours/contextual-tours' export type ContextualTourPanelPlacement = 'top' | 'right' | 'bottom' | 'left' diff --git a/src/renderer/src/components/contextual-tours/contextual-tour-gate.ts b/src/renderer/src/components/contextual-tours/contextual-tour-gate.ts index 0e29757b02d..c9c35ffc25b 100644 --- a/src/renderer/src/components/contextual-tours/contextual-tour-gate.ts +++ b/src/renderer/src/components/contextual-tours/contextual-tour-gate.ts @@ -1,4 +1,7 @@ -import type { ContextualTour, ContextualTourStep } from '../../../../shared/contextual-tours' +import type { + ContextualTour, + ContextualTourStep +} from '../../../../shared/feature-education/contextual-tours/contextual-tours' export type ContextualTourTarget = { element: Element diff --git a/src/renderer/src/components/contextual-tours/contextual-tour-overlay-measurement.ts b/src/renderer/src/components/contextual-tours/contextual-tour-overlay-measurement.ts index 7f5af63d658..4c64a0fd7f2 100644 --- a/src/renderer/src/components/contextual-tours/contextual-tour-overlay-measurement.ts +++ b/src/renderer/src/components/contextual-tours/contextual-tour-overlay-measurement.ts @@ -3,8 +3,8 @@ import type { ContextualTour, ContextualTourId, ContextualTourStepAction -} from '../../../../shared/contextual-tours' -import type { ContextualTourOutcome } from '../../../../shared/feature-education-telemetry' +} from '../../../../shared/feature-education/contextual-tours/contextual-tours' +import type { ContextualTourOutcome } from '../../../../shared/feature-education/feature-education-telemetry' import { useAppStore } from '@/store' import { getContextualTourOutcomeStepTotal, diff --git a/src/renderer/src/components/contextual-tours/contextual-tour-step-actions.ts b/src/renderer/src/components/contextual-tours/contextual-tour-step-actions.ts index 0b6f0e439bd..b386d79b5d8 100644 --- a/src/renderer/src/components/contextual-tours/contextual-tour-step-actions.ts +++ b/src/renderer/src/components/contextual-tours/contextual-tour-step-actions.ts @@ -1,4 +1,4 @@ -import type { ContextualTourStepAction } from '../../../../shared/contextual-tours' +import type { ContextualTourStepAction } from '../../../../shared/feature-education/contextual-tours/contextual-tours' import type { RequestActiveTerminalPaneSplitDetail } from '@/constants/terminal' import { trackBrowserExtensionsWebStoreOpened } from '@/diagnostics/telemetry/browser-extensions-telemetry' diff --git a/src/renderer/src/components/contextual-tours/contextual-tour-step-copy.ts b/src/renderer/src/components/contextual-tours/contextual-tour-step-copy.ts index ca61378474d..bdea257faa3 100644 --- a/src/renderer/src/components/contextual-tours/contextual-tour-step-copy.ts +++ b/src/renderer/src/components/contextual-tours/contextual-tour-step-copy.ts @@ -1,6 +1,6 @@ import { translate } from '@/i18n/i18n' import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' -import type { ContextualTourStepId } from '../../../../shared/contextual-tours' +import type { ContextualTourStepId } from '../../../../shared/feature-education/contextual-tours/contextual-tours' export type LocalizedContextualTourStepCopy = { title: string diff --git a/src/renderer/src/components/contextual-tours/request-contextual-tour-when-ready.ts b/src/renderer/src/components/contextual-tours/request-contextual-tour-when-ready.ts index 2ced0ad88b9..250faa46ef8 100644 --- a/src/renderer/src/components/contextual-tours/request-contextual-tour-when-ready.ts +++ b/src/renderer/src/components/contextual-tours/request-contextual-tour-when-ready.ts @@ -1,4 +1,4 @@ -import type { ContextualTourId } from '../../../../shared/contextual-tours' +import type { ContextualTourId } from '../../../../shared/feature-education/contextual-tours/contextual-tours' import { useAppStore } from '@/store' type RequestContextualTourWhenReadyArgs = { diff --git a/src/renderer/src/components/contextual-tours/use-contextual-tour-focus.ts b/src/renderer/src/components/contextual-tours/use-contextual-tour-focus.ts index 79a6b4fbb5e..0798bd46aa7 100644 --- a/src/renderer/src/components/contextual-tours/use-contextual-tour-focus.ts +++ b/src/renderer/src/components/contextual-tours/use-contextual-tour-focus.ts @@ -1,7 +1,10 @@ import { hasVisibleOverlay } from '@/lib/overlay-interaction/visible-overlay' -import { hasContextualTourActionStep } from '../../../../shared/contextual-tour-action-steps' +import { hasContextualTourActionStep } from '../../../../shared/feature-education/contextual-tours/contextual-tour-action-steps' import { useEffect, useRef, type RefObject } from 'react' -import { getContextualTour, type ContextualTourId } from '../../../../shared/contextual-tours' +import { + getContextualTour, + type ContextualTourId +} from '../../../../shared/feature-education/contextual-tours/contextual-tours' import { getContextualTourFocusableElements } from './ContextualTourOverlaySurface' // Moves focus into a newly shown tour step and gives it back when the tour ends. diff --git a/src/renderer/src/components/contextual-tours/use-contextual-tour.ts b/src/renderer/src/components/contextual-tours/use-contextual-tour.ts index b40ee05f4bb..d98b87b2aa6 100644 --- a/src/renderer/src/components/contextual-tours/use-contextual-tour.ts +++ b/src/renderer/src/components/contextual-tours/use-contextual-tour.ts @@ -1,9 +1,9 @@ import { useEffect, useRef } from 'react' -import type { ContextualTourId } from '../../../../shared/contextual-tours' +import type { ContextualTourId } from '../../../../shared/feature-education/contextual-tours/contextual-tours' import { hasFeatureInteraction, type FeatureInteractionState -} from '../../../../shared/feature-interactions' +} from '../../../../shared/feature-education/interactions/feature-interactions' import { useAppStore } from '@/store' import { isContextualTourSessionConsumed, diff --git a/src/renderer/src/components/contextual-tours/workspace-creation-tour-handoff.ts b/src/renderer/src/components/contextual-tours/workspace-creation-tour-handoff.ts index 16412de6ed1..6c6e410942a 100644 --- a/src/renderer/src/components/contextual-tours/workspace-creation-tour-handoff.ts +++ b/src/renderer/src/components/contextual-tours/workspace-creation-tour-handoff.ts @@ -1,5 +1,5 @@ import { useAppStore } from '@/store' -import { getContextualTour } from '../../../../shared/contextual-tours' +import { getContextualTour } from '../../../../shared/feature-education/contextual-tours/contextual-tours' import { requestContextualTourWhenReady } from './request-contextual-tour-when-ready' export function openWorkspaceCreationComposerWithTourHandoff(): void { diff --git a/src/renderer/src/components/crash-report/CrashReportDialog.tsx b/src/renderer/src/components/crash-report/CrashReportDialog.tsx index ecd1d071327..69ab9c1f79b 100644 --- a/src/renderer/src/components/crash-report/CrashReportDialog.tsx +++ b/src/renderer/src/components/crash-report/CrashReportDialog.tsx @@ -5,7 +5,7 @@ import { REACT_ERROR_BOUNDARY_REPORT_AVAILABLE_EVENT, takePendingReactErrorBoundaryReport } from '@/diagnostics/crash-reporting/react-error-boundary-reporting' -import type { CrashReportRecord } from '../../../../shared/crash-reporting' +import type { CrashReportRecord } from '../../../../shared/crash-reporting/crash-reporting' const CrashReportDialogSurface = lazy(() => import('./CrashReportDialogSurface').then((module) => ({ diff --git a/src/renderer/src/components/crash-report/CrashReportDialogSurface.test.tsx b/src/renderer/src/components/crash-report/CrashReportDialogSurface.test.tsx index fd0a6acecb9..6a410528999 100644 --- a/src/renderer/src/components/crash-report/CrashReportDialogSurface.test.tsx +++ b/src/renderer/src/components/crash-report/CrashReportDialogSurface.test.tsx @@ -2,7 +2,7 @@ import { act, cleanup, fireEvent, render, screen } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' -import type { CrashReportRecord } from '../../../../shared/crash-reporting' +import type { CrashReportRecord } from '../../../../shared/crash-reporting/crash-reporting' import { CrashReportDialogSurface } from './CrashReportDialogSurface' vi.mock('sonner', () => ({ diff --git a/src/renderer/src/components/crash-report/CrashReportDialogSurface.tsx b/src/renderer/src/components/crash-report/CrashReportDialogSurface.tsx index cd8170220a1..e9bc4904ef7 100644 --- a/src/renderer/src/components/crash-report/CrashReportDialogSurface.tsx +++ b/src/renderer/src/components/crash-report/CrashReportDialogSurface.tsx @@ -16,9 +16,9 @@ import { useMountedRef } from '@/hooks/useMountedRef' import { formatCrashReportText, MAX_USER_NOTES_LENGTH, - type CrashReportDiagnosticBundle, type CrashReportRecord -} from '../../../../shared/crash-reporting' +} from '../../../../shared/crash-reporting/crash-reporting' +import type { CrashReportDiagnosticBundle } from '../../../../shared/crash-reporting/crash-reporting-diagnostic-bundle' import type { GitHubViewer } from '../../../../shared/github/pull-requests/pull-request-types' import { useIntlLocale, useTranslate } from '@/i18n/use-translate' import { diff --git a/src/renderer/src/components/crash-report/crash-report-dialog-copy.ts b/src/renderer/src/components/crash-report/crash-report-dialog-copy.ts index fceb7d8019b..ed66987ab49 100644 --- a/src/renderer/src/components/crash-report/crash-report-dialog-copy.ts +++ b/src/renderer/src/components/crash-report/crash-report-dialog-copy.ts @@ -1,7 +1,7 @@ import { isReactErrorBoundaryReport, type CrashReportRecord -} from '../../../../shared/crash-reporting' +} from '../../../../shared/crash-reporting/crash-reporting' import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/crash-report/crash-report-submit-notice.ts b/src/renderer/src/components/crash-report/crash-report-submit-notice.ts index 5fa9cbb7201..d220740498c 100644 --- a/src/renderer/src/components/crash-report/crash-report-submit-notice.ts +++ b/src/renderer/src/components/crash-report/crash-report-submit-notice.ts @@ -1,10 +1,10 @@ import { translate } from '@/i18n/i18n' -import { - sanitizeCrashReportString, - type CrashReportCopySubmissionFailure, - type CrashReportDiagnosticBundle, - type CrashReportSubmitResult -} from '../../../../shared/crash-reporting' +import { sanitizeCrashReportString } from '../../../../shared/crash-reporting/crash-report-redaction' +import type { + CrashReportCopySubmissionFailure, + CrashReportSubmitResult +} from '../../../../shared/crash-reporting/crash-reporting' +import type { CrashReportDiagnosticBundle } from '../../../../shared/crash-reporting/crash-reporting-diagnostic-bundle' export const CRASH_REPORT_SUBMIT_FAILURE_TOAST_ID = 'crash-report-submit-failure' diff --git a/src/renderer/src/components/crash-report/use-crash-report-copy.ts b/src/renderer/src/components/crash-report/use-crash-report-copy.ts index 456a2f5aa1c..9efb5ab9e8f 100644 --- a/src/renderer/src/components/crash-report/use-crash-report-copy.ts +++ b/src/renderer/src/components/crash-report/use-crash-report-copy.ts @@ -4,7 +4,7 @@ import { translate } from '@/i18n/i18n' import type { CrashReportCopySubmissionFailure, CrashReportRecord -} from '../../../../shared/crash-reporting' +} from '../../../../shared/crash-reporting/crash-reporting' export const CRASH_REPORT_COPY_FAILURE_TOAST_ID = 'crash-report-copy-failure' diff --git a/src/renderer/src/components/dashboard/board/use-agent-dashboard-telemetry.ts b/src/renderer/src/components/dashboard/board/use-agent-dashboard-telemetry.ts index 61d6f293dcf..624760afe89 100644 --- a/src/renderer/src/components/dashboard/board/use-agent-dashboard-telemetry.ts +++ b/src/renderer/src/components/dashboard/board/use-agent-dashboard-telemetry.ts @@ -1,5 +1,5 @@ import { useEffect } from 'react' -import type { AgentDashboardSurface } from '../../../../../shared/telemetry-agent-dashboard-event-schemas' +import type { AgentDashboardSurface } from '../../../../../shared/telemetry/schemas/telemetry-agent-dashboard-event-schemas' import { getConsentState, track, trackWithResult } from '@/diagnostics/telemetry/telemetry' import { installWindowVisibilityInterval } from '@/lib/window-activity/window-visibility-interval' import { useAppStore } from '@/store/index' diff --git a/src/renderer/src/components/editor/review-note-delivery/ReviewNotesSendMenuContent.tsx b/src/renderer/src/components/editor/review-note-delivery/ReviewNotesSendMenuContent.tsx index 0bd8e83bb6f..5958ca8c1c5 100644 --- a/src/renderer/src/components/editor/review-note-delivery/ReviewNotesSendMenuContent.tsx +++ b/src/renderer/src/components/editor/review-note-delivery/ReviewNotesSendMenuContent.tsx @@ -48,7 +48,7 @@ import { lastEnteredDoneAt } from '@/components/dashboard/rows/agent-finished-ti import { useWorktreeAgentRows } from '@/components/sidebar/workspace-card/activity/useWorktreeAgentRows' import { useAgentRowConversationName } from '@/components/dashboard/rows/use-agent-row-conversation-name' import { getAgentRowPrimaryText } from '../../../../../shared/agent-status/presentation/agent-row-primary-text' -import type { LaunchSource } from '../../../../../shared/telemetry-property-schemas' +import type { LaunchSource } from '../../../../../shared/telemetry/schemas/telemetry-property-schemas' import { agentRowDisplayDotState } from '@/lib/agent-status/presentation/agent-row-dot-state' import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/error-boundaries/RecoverableRenderErrorBoundary.tsx b/src/renderer/src/components/error-boundaries/RecoverableRenderErrorBoundary.tsx index c994bce2b7c..3119ab2f5be 100644 --- a/src/renderer/src/components/error-boundaries/RecoverableRenderErrorBoundary.tsx +++ b/src/renderer/src/components/error-boundaries/RecoverableRenderErrorBoundary.tsx @@ -4,7 +4,7 @@ import { Button } from '@/components/ui/button' import { cn } from '@/lib/class-names' import { isLazyChunkLoadError } from '@/app-shell/startup/lazy-with-retry' import { reportReactErrorBoundaryCrash } from '@/diagnostics/crash-reporting/react-error-boundary-reporting' -import type { ReactErrorBoundaryReportArgs } from '../../../../shared/crash-reporting' +import type { ReactErrorBoundaryReportArgs } from '../../../../shared/crash-reporting/crash-reporting' import { translate } from '@/i18n/i18n' type BoundaryFallbackArgs = { diff --git a/src/renderer/src/components/feature-tips/ChatUiHereCornerCard.tsx b/src/renderer/src/components/feature-tips/ChatUiHereCornerCard.tsx index 08e84eae8e4..f2595d1a068 100644 --- a/src/renderer/src/components/feature-tips/ChatUiHereCornerCard.tsx +++ b/src/renderer/src/components/feature-tips/ChatUiHereCornerCard.tsx @@ -1,6 +1,6 @@ import { useEffect, useRef, useState, type JSX, type MouseEvent } from 'react' import { X } from 'lucide-react' -import { FEATURE_TIPS } from '../../../../shared/feature-tips' +import { FEATURE_TIPS } from '../../../../shared/feature-education/feature-tips' import { Button } from '@/components/ui/button' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { useMountedRef } from '@/hooks/useMountedRef' diff --git a/src/renderer/src/components/feature-tips/ChatUiHereTipDialog.fixture.tsx b/src/renderer/src/components/feature-tips/ChatUiHereTipDialog.fixture.tsx index 537cb75b878..4f16c123233 100644 --- a/src/renderer/src/components/feature-tips/ChatUiHereTipDialog.fixture.tsx +++ b/src/renderer/src/components/feature-tips/ChatUiHereTipDialog.fixture.tsx @@ -1,4 +1,4 @@ -import { FEATURE_TIPS } from '../../../../shared/feature-tips' +import { FEATURE_TIPS } from '../../../../shared/feature-education/feature-tips' import { defineFixture } from '../../component-fixtures/component-fixture' import { ChatUiHereTipDialog } from './ChatUiHereTipDialog' diff --git a/src/renderer/src/components/feature-tips/ChatUiHereTipDialog.tsx b/src/renderer/src/components/feature-tips/ChatUiHereTipDialog.tsx index eb431588056..05915fbf6f8 100644 --- a/src/renderer/src/components/feature-tips/ChatUiHereTipDialog.tsx +++ b/src/renderer/src/components/feature-tips/ChatUiHereTipDialog.tsx @@ -1,5 +1,5 @@ import { useRef, type JSX } from 'react' -import type { FeatureTip } from '../../../../shared/feature-tips' +import type { FeatureTip } from '../../../../shared/feature-education/feature-tips' import { DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { useTranslate } from '@/i18n/use-translate' import { ChatUiHereFeatureTipVisual } from './ChatUiHereFeatureTipVisual' diff --git a/src/renderer/src/components/feature-tips/CliSetupTipDialog.tsx b/src/renderer/src/components/feature-tips/CliSetupTipDialog.tsx index c592d0dac18..d15808252aa 100644 --- a/src/renderer/src/components/feature-tips/CliSetupTipDialog.tsx +++ b/src/renderer/src/components/feature-tips/CliSetupTipDialog.tsx @@ -1,5 +1,5 @@ import type { JSX, ReactNode } from 'react' -import type { FeatureTip } from '../../../../shared/feature-tips' +import type { FeatureTip } from '../../../../shared/feature-education/feature-tips' import { Button } from '@/components/ui/button' import { Dialog, diff --git a/src/renderer/src/components/feature-tips/CmdJPaletteTipDialog.tsx b/src/renderer/src/components/feature-tips/CmdJPaletteTipDialog.tsx index 23ad8b44137..1d39a604e18 100644 --- a/src/renderer/src/components/feature-tips/CmdJPaletteTipDialog.tsx +++ b/src/renderer/src/components/feature-tips/CmdJPaletteTipDialog.tsx @@ -1,5 +1,5 @@ import type { JSX } from 'react' -import type { FeatureTip } from '../../../../shared/feature-tips' +import type { FeatureTip } from '../../../../shared/feature-education/feature-tips' import { DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { formatShortcutLabel, useShortcutLabel } from '@/hooks/useShortcutLabel' import { CmdJPaletteFeatureTipVisual } from './CmdJPaletteFeatureTipVisual' diff --git a/src/renderer/src/components/feature-tips/FeatureTipActions.tsx b/src/renderer/src/components/feature-tips/FeatureTipActions.tsx index 70fd4fb4430..085b86c251c 100644 --- a/src/renderer/src/components/feature-tips/FeatureTipActions.tsx +++ b/src/renderer/src/components/feature-tips/FeatureTipActions.tsx @@ -1,6 +1,9 @@ import type { JSX, MouseEventHandler, Ref } from 'react' import { Loader2 } from 'lucide-react' -import type { FeatureTip, FeatureTipAction } from '../../../../shared/feature-tips' +import type { + FeatureTip, + FeatureTipAction +} from '../../../../shared/feature-education/feature-tips' import { Button } from '@/components/ui/button' import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/feature-tips/SessionSearchTipDialog.tsx b/src/renderer/src/components/feature-tips/SessionSearchTipDialog.tsx index 21de52052fb..4759183e20c 100644 --- a/src/renderer/src/components/feature-tips/SessionSearchTipDialog.tsx +++ b/src/renderer/src/components/feature-tips/SessionSearchTipDialog.tsx @@ -1,6 +1,6 @@ import { useRef, type JSX } from 'react' import type { AiVaultSearchStatus } from '../../../../shared/ai-vault/search/ai-vault-search-types' -import type { FeatureTip } from '../../../../shared/feature-tips' +import type { FeatureTip } from '../../../../shared/feature-education/feature-tips' import { sessionSearchStatusDetails, sessionSearchStatusMessage diff --git a/src/renderer/src/components/feature-tips/VoiceDictationTipDialog.tsx b/src/renderer/src/components/feature-tips/VoiceDictationTipDialog.tsx index 5e323039b29..485e91dac53 100644 --- a/src/renderer/src/components/feature-tips/VoiceDictationTipDialog.tsx +++ b/src/renderer/src/components/feature-tips/VoiceDictationTipDialog.tsx @@ -1,5 +1,5 @@ import { useRef, type JSX } from 'react' -import type { FeatureTip } from '../../../../shared/feature-tips' +import type { FeatureTip } from '../../../../shared/feature-education/feature-tips' import { ShortcutKeyCombo } from '@/components/ShortcutKeyCombo' import { DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { useShortcutKeyDetails } from '@/hooks/useShortcutLabel' diff --git a/src/renderer/src/components/feature-tips/feature-tip-copy.ts b/src/renderer/src/components/feature-tips/feature-tip-copy.ts index 770d61d5dd5..358a3c8b4e4 100644 --- a/src/renderer/src/components/feature-tips/feature-tip-copy.ts +++ b/src/renderer/src/components/feature-tips/feature-tip-copy.ts @@ -1,4 +1,4 @@ -import type { FeatureTip, FeatureTipId } from '../../../../shared/feature-tips' +import type { FeatureTip, FeatureTipId } from '../../../../shared/feature-education/feature-tips' import { translate } from '@/i18n/i18n' const FEATURE_TIP_COPY: Record< diff --git a/src/renderer/src/components/feature-tips/feature-tip-localized-copy.ts b/src/renderer/src/components/feature-tips/feature-tip-localized-copy.ts index 9daa26eb6c5..cf73d5e6a8f 100644 --- a/src/renderer/src/components/feature-tips/feature-tip-localized-copy.ts +++ b/src/renderer/src/components/feature-tips/feature-tip-localized-copy.ts @@ -1,4 +1,4 @@ -import type { FeatureTip, FeatureTipId } from '../../../../shared/feature-tips' +import type { FeatureTip, FeatureTipId } from '../../../../shared/feature-education/feature-tips' import { translate } from '@/i18n/i18n' import { createLocalizedCatalog } from '@/i18n/localized-catalog' diff --git a/src/renderer/src/components/feature-tips/feature-tip-modal-state.ts b/src/renderer/src/components/feature-tips/feature-tip-modal-state.ts index 87778e895e6..7d5f0bc4348 100644 --- a/src/renderer/src/components/feature-tips/feature-tip-modal-state.ts +++ b/src/renderer/src/components/feature-tips/feature-tip-modal-state.ts @@ -1,10 +1,10 @@ -import type { FeatureInteractionState } from '../../../../shared/feature-interactions' +import type { FeatureInteractionState } from '../../../../shared/feature-education/interactions/feature-interactions' import { FEATURE_TIPS, isFeatureTipId, type FeatureTip, type FeatureTipSeenId -} from '../../../../shared/feature-tips' +} from '../../../../shared/feature-education/feature-tips' import type { ChatUiLaunchTipVariant } from '../../../../shared/native-chat/chat-ui-launch-tip-audience' import { getPendingFeatureTips, type FeatureTipSettings } from './feature-tip-startup-gate' diff --git a/src/renderer/src/components/feature-tips/feature-tip-startup-gate.ts b/src/renderer/src/components/feature-tips/feature-tip-startup-gate.ts index 6cbc677b4bb..0fe1de387c7 100644 --- a/src/renderer/src/components/feature-tips/feature-tip-startup-gate.ts +++ b/src/renderer/src/components/feature-tips/feature-tip-startup-gate.ts @@ -4,13 +4,13 @@ import { type FeatureTip, type FeatureTipId, type FeatureTipSeenId -} from '../../../../shared/feature-tips' +} from '../../../../shared/feature-education/feature-tips' import { resolveAiVaultSearchSettings } from '../../../../shared/ai-vault/search/ai-vault-search-settings' import type { CliInstallStatus } from '../../../../shared/cli-install-types' -import type { FeatureInteractionState } from '../../../../shared/feature-interactions' +import type { FeatureInteractionState } from '../../../../shared/feature-education/interactions/feature-interactions' import type { GlobalSettings } from '../../../../shared/global-settings-types' import type { ChatUiLaunchTipVariant } from '../../../../shared/native-chat/chat-ui-launch-tip-audience' -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' import { shouldShowOnboarding } from '../onboarding/should-show-onboarding' export type FeatureTipsAppOpenDecision = diff --git a/src/renderer/src/components/feature-tips/feature-tip-telemetry.ts b/src/renderer/src/components/feature-tips/feature-tip-telemetry.ts index 25921171304..e45ad4c7cb6 100644 --- a/src/renderer/src/components/feature-tips/feature-tip-telemetry.ts +++ b/src/renderer/src/components/feature-tips/feature-tip-telemetry.ts @@ -1,7 +1,7 @@ import { normalizeAgentDefaultSurface } from '../../../../shared/native-chat/native-chat-providers' -import { isChatUiLaunchTipTargeted } from '../../../../shared/feature-tips' +import { isChatUiLaunchTipTargeted } from '../../../../shared/feature-education/feature-tips' import { track } from '@/diagnostics/telemetry/telemetry' -import type { EventProps } from '../../../../shared/telemetry-events' +import type { EventProps } from '../../../../shared/telemetry/telemetry-event-classification' import type { ChatUiLaunchTipVariant } from '../../../../shared/native-chat/chat-ui-launch-tip-audience' import type { GlobalSettings } from '../../../../shared/global-settings-types' diff --git a/src/renderer/src/components/feature-wall/FeatureWallTourSurface.tsx b/src/renderer/src/components/feature-wall/FeatureWallTourSurface.tsx index 28c48d78439..773f2541ed6 100644 --- a/src/renderer/src/components/feature-wall/FeatureWallTourSurface.tsx +++ b/src/renderer/src/components/feature-wall/FeatureWallTourSurface.tsx @@ -7,12 +7,15 @@ import { getFeatureWallMediaTile, type FeatureWallWorkflow, type FeatureWallWorkflowId -} from '../../../../shared/feature-wall-workflows' -import { getAgentsSteps, type AgentsStepId } from '../../../../shared/agents-orchestration-steps' -import { getWorkbenchSteps, type WorkbenchStepId } from '../../../../shared/workbench-steps' -import { getReviewSteps, type ReviewStepId } from '../../../../shared/review-steps' -import type { FeatureWallOpenSourceTelemetry } from '../../../../shared/telemetry-property-schemas' -import type { FeatureWallTourDepthSummary } from '../../../../shared/feature-wall-tour-depth' +} from '../../../../shared/feature-education/explore/feature-wall-workflows' +import { getAgentsSteps } from '../../../../shared/feature-education/explore/agents-orchestration-steps' +import type { AgentsStepId } from '../../../../shared/feature-education/explore/agents-orchestration-steps' +import { getWorkbenchSteps } from '../../../../shared/feature-education/explore/workbench-steps' +import type { WorkbenchStepId } from '../../../../shared/feature-education/explore/workbench-steps' +import { getReviewSteps } from '../../../../shared/feature-education/explore/review-steps' +import type { ReviewStepId } from '../../../../shared/feature-education/explore/review-steps' +import type { FeatureWallOpenSourceTelemetry } from '../../../../shared/telemetry/schemas/telemetry-property-schemas' +import type { FeatureWallTourDepthSummary } from '../../../../shared/feature-education/explore/feature-wall-tour-depth' import { track } from '@/diagnostics/telemetry/telemetry' import { useAppStore } from '@/store/index' import { useFeatureWallTourSkills } from './tour/use-feature-wall-tour-skills' diff --git a/src/renderer/src/components/feature-wall/agents-orchestration/AgentsOrchestrationVisual.tsx b/src/renderer/src/components/feature-wall/agents-orchestration/AgentsOrchestrationVisual.tsx index cc77a4b2256..9db5d5da466 100644 --- a/src/renderer/src/components/feature-wall/agents-orchestration/AgentsOrchestrationVisual.tsx +++ b/src/renderer/src/components/feature-wall/agents-orchestration/AgentsOrchestrationVisual.tsx @@ -1,6 +1,6 @@ import type { JSX } from 'react' import { cn } from '@/lib/class-names' -import type { AgentsStepId } from '../../../../../shared/agents-orchestration-steps' +import type { AgentsStepId } from '../../../../../shared/feature-education/explore/agents-orchestration-steps' import { StatusesPage } from './StatusesPage' import { UsagePage } from './UsagePage' import { OrchestrationPage } from './OrchestrationPage' diff --git a/src/renderer/src/components/feature-wall/completion/feature-wall-completion-persistence.ts b/src/renderer/src/components/feature-wall/completion/feature-wall-completion-persistence.ts index 5bda1b2dda2..cb4909ba06d 100644 --- a/src/renderer/src/components/feature-wall/completion/feature-wall-completion-persistence.ts +++ b/src/renderer/src/components/feature-wall/completion/feature-wall-completion-persistence.ts @@ -1,10 +1,10 @@ -import type { AgentsStepId } from '../../../../../shared/agents-orchestration-steps' +import type { AgentsStepId } from '../../../../../shared/feature-education/explore/agents-orchestration-steps' import { FEATURE_WALL_WORKFLOW_IDS, type FeatureWallWorkflowId -} from '../../../../../shared/feature-wall-workflows' -import type { ReviewStepId } from '../../../../../shared/review-steps' -import type { WorkbenchStepId } from '../../../../../shared/workbench-steps' +} from '../../../../../shared/feature-education/explore/feature-wall-workflows' +import type { ReviewStepId } from '../../../../../shared/feature-education/explore/review-steps' +import type { WorkbenchStepId } from '../../../../../shared/feature-education/explore/workbench-steps' const PERSISTED_WORKFLOW_IDS = new Set(FEATURE_WALL_WORKFLOW_IDS) const VISITED_WORKFLOWS_STORAGE_KEY = 'orca.featureWall.visitedWorkflows.v1' diff --git a/src/renderer/src/components/feature-wall/completion/feature-wall-completion-progress.ts b/src/renderer/src/components/feature-wall/completion/feature-wall-completion-progress.ts index ac979b4d0c9..5709a967679 100644 --- a/src/renderer/src/components/feature-wall/completion/feature-wall-completion-progress.ts +++ b/src/renderer/src/components/feature-wall/completion/feature-wall-completion-progress.ts @@ -1,7 +1,7 @@ -import type { AgentsStepId } from '../../../../../shared/agents-orchestration-steps' -import type { FeatureWallWorkflowId } from '../../../../../shared/feature-wall-workflows' -import type { ReviewStepId } from '../../../../../shared/review-steps' -import type { WorkbenchStepId } from '../../../../../shared/workbench-steps' +import type { AgentsStepId } from '../../../../../shared/feature-education/explore/agents-orchestration-steps' +import type { FeatureWallWorkflowId } from '../../../../../shared/feature-education/explore/feature-wall-workflows' +import type { ReviewStepId } from '../../../../../shared/feature-education/explore/review-steps' +import type { WorkbenchStepId } from '../../../../../shared/feature-education/explore/workbench-steps' export const FEATURE_WALL_AGENT_STEP_IDS: readonly AgentsStepId[] = [ 'statuses', diff --git a/src/renderer/src/components/feature-wall/completion/use-feature-wall-completion.ts b/src/renderer/src/components/feature-wall/completion/use-feature-wall-completion.ts index 6fd881b5861..c28239389d0 100644 --- a/src/renderer/src/components/feature-wall/completion/use-feature-wall-completion.ts +++ b/src/renderer/src/components/feature-wall/completion/use-feature-wall-completion.ts @@ -1,9 +1,9 @@ import { useCallback, useEffect, useMemo, useState } from 'react' -import type { FeatureWallWorkflowId } from '../../../../../shared/feature-wall-workflows' -import type { AgentsStepId } from '../../../../../shared/agents-orchestration-steps' -import type { WorkbenchStepId } from '../../../../../shared/workbench-steps' -import type { ReviewStepId } from '../../../../../shared/review-steps' -import type { FeatureWallTourDepthSummary } from '../../../../../shared/feature-wall-tour-depth' +import type { FeatureWallWorkflowId } from '../../../../../shared/feature-education/explore/feature-wall-workflows' +import type { AgentsStepId } from '../../../../../shared/feature-education/explore/agents-orchestration-steps' +import type { WorkbenchStepId } from '../../../../../shared/feature-education/explore/workbench-steps' +import type { ReviewStepId } from '../../../../../shared/feature-education/explore/review-steps' +import type { FeatureWallTourDepthSummary } from '../../../../../shared/feature-education/explore/feature-wall-tour-depth' import { getCommitMessageAgentCapability, isCustomAgentId, diff --git a/src/renderer/src/components/feature-wall/completion/use-feature-wall-session-depth.ts b/src/renderer/src/components/feature-wall/completion/use-feature-wall-session-depth.ts index b210988d44a..b4f41a17531 100644 --- a/src/renderer/src/components/feature-wall/completion/use-feature-wall-session-depth.ts +++ b/src/renderer/src/components/feature-wall/completion/use-feature-wall-session-depth.ts @@ -1,10 +1,10 @@ import { useCallback, useEffect, useRef } from 'react' -import type { AgentsStepId } from '../../../../../shared/agents-orchestration-steps' -import type { FeatureWallWorkflowId } from '../../../../../shared/feature-wall-workflows' -import type { FeatureWallTourDepthSummary } from '../../../../../shared/feature-wall-tour-depth' -import { buildFeatureWallTourDepthSummary } from '../../../../../shared/feature-wall-tour-depth' -import type { ReviewStepId } from '../../../../../shared/review-steps' -import type { WorkbenchStepId } from '../../../../../shared/workbench-steps' +import type { AgentsStepId } from '../../../../../shared/feature-education/explore/agents-orchestration-steps' +import type { FeatureWallWorkflowId } from '../../../../../shared/feature-education/explore/feature-wall-workflows' +import type { FeatureWallTourDepthSummary } from '../../../../../shared/feature-education/explore/feature-wall-tour-depth' +import { buildFeatureWallTourDepthSummary } from '../../../../../shared/feature-education/explore/feature-wall-tour-depth' +import type { ReviewStepId } from '../../../../../shared/feature-education/explore/review-steps' +import type { WorkbenchStepId } from '../../../../../shared/feature-education/explore/workbench-steps' import { getFeatureWallCompletionProgress } from './feature-wall-completion-progress' type FeatureWallSessionDepthInput = { diff --git a/src/renderer/src/components/feature-wall/completion/use-persisted-feature-wall-completion.ts b/src/renderer/src/components/feature-wall/completion/use-persisted-feature-wall-completion.ts index 0892fc79117..69326590cca 100644 --- a/src/renderer/src/components/feature-wall/completion/use-persisted-feature-wall-completion.ts +++ b/src/renderer/src/components/feature-wall/completion/use-persisted-feature-wall-completion.ts @@ -1,9 +1,9 @@ import { useCallback, useState } from 'react' import type { Dispatch, SetStateAction } from 'react' -import type { AgentsStepId } from '../../../../../shared/agents-orchestration-steps' -import type { FeatureWallWorkflowId } from '../../../../../shared/feature-wall-workflows' -import type { ReviewStepId } from '../../../../../shared/review-steps' -import type { WorkbenchStepId } from '../../../../../shared/workbench-steps' +import type { AgentsStepId } from '../../../../../shared/feature-education/explore/agents-orchestration-steps' +import type { FeatureWallWorkflowId } from '../../../../../shared/feature-education/explore/feature-wall-workflows' +import type { ReviewStepId } from '../../../../../shared/feature-education/explore/review-steps' +import type { WorkbenchStepId } from '../../../../../shared/feature-education/explore/workbench-steps' import { persistCompletedAgentStep, persistCompletedReviewStep, diff --git a/src/renderer/src/components/feature-wall/review-storyboard/ReviewAnimatedVisual.tsx b/src/renderer/src/components/feature-wall/review-storyboard/ReviewAnimatedVisual.tsx index 02e4d8f7ad0..72c63ce9d53 100644 --- a/src/renderer/src/components/feature-wall/review-storyboard/ReviewAnimatedVisual.tsx +++ b/src/renderer/src/components/feature-wall/review-storyboard/ReviewAnimatedVisual.tsx @@ -1,5 +1,5 @@ import type { JSX } from 'react' -import type { ReviewStepId } from '../../../../../shared/review-steps' +import type { ReviewStepId } from '../../../../../shared/feature-education/explore/review-steps' import { PANEL_HEIGHT, PANEL_WIDTH } from './review-migration-scenario' import { ReviewNotesAnimatedVisual } from './ReviewNotesAnimatedVisual' import { ReviewPRViewAnimatedVisual } from './ReviewPRViewAnimatedVisual' diff --git a/src/renderer/src/components/feature-wall/setup/FeatureWallSetupChecklist.tsx b/src/renderer/src/components/feature-wall/setup/FeatureWallSetupChecklist.tsx index bd0883fe45c..6dba7a1a57a 100644 --- a/src/renderer/src/components/feature-wall/setup/FeatureWallSetupChecklist.tsx +++ b/src/renderer/src/components/feature-wall/setup/FeatureWallSetupChecklist.tsx @@ -3,8 +3,8 @@ import { Check } from 'lucide-react' import type { FeatureWallSetupStep, FeatureWallSetupStepId -} from '../../../../../shared/feature-wall-setup-steps' -import { getFeatureWallSetupStepsForSection } from '../../../../../shared/feature-wall-setup-steps' +} from '../../../../../shared/feature-education/explore/feature-wall-setup-steps' +import { getFeatureWallSetupStepsForSection } from '../../../../../shared/feature-education/explore/feature-wall-setup-steps' import { cn } from '@/lib/class-names' import { useScrollEdgeFades } from '@/lib/list-interaction/use-scroll-edge-fades' import type { FeatureWallSetupProgress } from './feature-wall-setup-progress' diff --git a/src/renderer/src/components/feature-wall/setup/feature-wall-setup-checklist-localized-copy.ts b/src/renderer/src/components/feature-wall/setup/feature-wall-setup-checklist-localized-copy.ts index 8986117373f..d75300f9b8a 100644 --- a/src/renderer/src/components/feature-wall/setup/feature-wall-setup-checklist-localized-copy.ts +++ b/src/renderer/src/components/feature-wall/setup/feature-wall-setup-checklist-localized-copy.ts @@ -1,7 +1,7 @@ import type { FeatureWallSetupStep, FeatureWallSetupStepId -} from '../../../../../shared/feature-wall-setup-steps' +} from '../../../../../shared/feature-education/explore/feature-wall-setup-steps' import { translate } from '@/i18n/i18n' import { createLocalizedCatalog } from '@/i18n/localized-catalog' diff --git a/src/renderer/src/components/feature-wall/setup/feature-wall-setup-progress.ts b/src/renderer/src/components/feature-wall/setup/feature-wall-setup-progress.ts index b8882e8849c..c3388485927 100644 --- a/src/renderer/src/components/feature-wall/setup/feature-wall-setup-progress.ts +++ b/src/renderer/src/components/feature-wall/setup/feature-wall-setup-progress.ts @@ -1,9 +1,9 @@ -import type { FeatureInteractionState } from '../../../../../shared/feature-interactions' -import { hasFeatureInteraction } from '../../../../../shared/feature-interactions' +import type { FeatureInteractionState } from '../../../../../shared/feature-education/interactions/feature-interactions' +import { hasFeatureInteraction } from '../../../../../shared/feature-education/interactions/feature-interactions' import { FEATURE_WALL_SETUP_STEPS, type FeatureWallSetupStepId -} from '../../../../../shared/feature-wall-setup-steps' +} from '../../../../../shared/feature-education/explore/feature-wall-setup-steps' import type { GlobalSettings } from '../../../../../shared/global-settings-types' import type { Worktree } from '../../../../../shared/worktree/types' import { selectWorktreesByRepo } from '../../../store/workspaces/catalog/workspace-record-fields' diff --git a/src/renderer/src/components/feature-wall/setup/integrations/use-feature-wall-task-source-presentation.ts b/src/renderer/src/components/feature-wall/setup/integrations/use-feature-wall-task-source-presentation.ts index 2619c68163b..2491a45e0a1 100644 --- a/src/renderer/src/components/feature-wall/setup/integrations/use-feature-wall-task-source-presentation.ts +++ b/src/renderer/src/components/feature-wall/setup/integrations/use-feature-wall-task-source-presentation.ts @@ -3,7 +3,7 @@ import { useAppStore } from '@/store/index' import { getLocalPreflightContext } from '@/runtime/hosts/preflight/local-preflight-context' import { getProviderRuntimeContextKey } from '@/runtime/hosts/observations/provider-runtime-context' import { deriveIntegrationConnectionStatus } from './use-integration-connection-status' -import type { FeatureWallWorkflow } from '../../../../../../shared/feature-wall-workflows' +import type { FeatureWallWorkflow } from '../../../../../../shared/feature-education/explore/feature-wall-workflows' import { localPreflightContextKey } from '../../../../runtime/hosts/preflight/local-preflight-context-key' export type FeatureWallTaskSourcePresentation = { diff --git a/src/renderer/src/components/feature-wall/tour/FeatureWallBody.tsx b/src/renderer/src/components/feature-wall/tour/FeatureWallBody.tsx index 3607aeee12f..29bd210118c 100644 --- a/src/renderer/src/components/feature-wall/tour/FeatureWallBody.tsx +++ b/src/renderer/src/components/feature-wall/tour/FeatureWallBody.tsx @@ -1,9 +1,9 @@ import type { JSX } from 'react' -import type { FeatureWallWorkflow } from '../../../../../shared/feature-wall-workflows' -import type { FeatureWallOpenSourceTelemetry } from '../../../../../shared/telemetry-property-schemas' -import type { AgentsStep } from '../../../../../shared/agents-orchestration-steps' -import type { WorkbenchStep } from '../../../../../shared/workbench-steps' -import type { ReviewStep } from '../../../../../shared/review-steps' +import type { FeatureWallWorkflow } from '../../../../../shared/feature-education/explore/feature-wall-workflows' +import type { FeatureWallOpenSourceTelemetry } from '../../../../../shared/telemetry/schemas/telemetry-property-schemas' +import type { AgentsStep } from '../../../../../shared/feature-education/explore/agents-orchestration-steps' +import type { WorkbenchStep } from '../../../../../shared/feature-education/explore/workbench-steps' +import type { ReviewStep } from '../../../../../shared/feature-education/explore/review-steps' import type { GlobalSettings } from '../../../../../shared/global-settings-types' import type { InstalledAgentSkillState } from '@/hooks/skills/discovery/useInstalledAgentSkills' import { cn } from '@/lib/class-names' diff --git a/src/renderer/src/components/feature-wall/tour/FeatureWallPreview.tsx b/src/renderer/src/components/feature-wall/tour/FeatureWallPreview.tsx index b80faf716fa..0f33bb04d4f 100644 --- a/src/renderer/src/components/feature-wall/tour/FeatureWallPreview.tsx +++ b/src/renderer/src/components/feature-wall/tour/FeatureWallPreview.tsx @@ -4,8 +4,8 @@ import { ChevronRight } from 'lucide-react' import { getFeatureWallMediaTile, type FeatureWallWorkflow -} from '../../../../../shared/feature-wall-workflows' -import type { FeatureWallOpenSourceTelemetry } from '../../../../../shared/telemetry-property-schemas' +} from '../../../../../shared/feature-education/explore/feature-wall-workflows' +import type { FeatureWallOpenSourceTelemetry } from '../../../../../shared/telemetry/schemas/telemetry-property-schemas' import { track } from '@/diagnostics/telemetry/telemetry' import { useTranslate } from '@/i18n/use-translate' import { getLocalizedFeatureWallTileTitle } from './feature-wall-tour-localized-copy' diff --git a/src/renderer/src/components/feature-wall/tour/FeatureWallRail.tsx b/src/renderer/src/components/feature-wall/tour/FeatureWallRail.tsx index 5d5cf164e45..3d8bf1308eb 100644 --- a/src/renderer/src/components/feature-wall/tour/FeatureWallRail.tsx +++ b/src/renderer/src/components/feature-wall/tour/FeatureWallRail.tsx @@ -4,10 +4,19 @@ import { FEATURE_WALL_WORKFLOWS, type FeatureWallWorkflow, type FeatureWallWorkflowId -} from '../../../../../shared/feature-wall-workflows' -import type { AgentsStep, AgentsStepId } from '../../../../../shared/agents-orchestration-steps' -import type { WorkbenchStep, WorkbenchStepId } from '../../../../../shared/workbench-steps' -import type { ReviewStep, ReviewStepId } from '../../../../../shared/review-steps' +} from '../../../../../shared/feature-education/explore/feature-wall-workflows' +import type { + AgentsStep, + AgentsStepId +} from '../../../../../shared/feature-education/explore/agents-orchestration-steps' +import type { + WorkbenchStep, + WorkbenchStepId +} from '../../../../../shared/feature-education/explore/workbench-steps' +import type { + ReviewStep, + ReviewStepId +} from '../../../../../shared/feature-education/explore/review-steps' import { cn } from '@/lib/class-names' import { useTranslate } from '@/i18n/use-translate' import { diff --git a/src/renderer/src/components/feature-wall/tour/FeatureWallTourPanel.tsx b/src/renderer/src/components/feature-wall/tour/FeatureWallTourPanel.tsx index ea207220aeb..11a22b2c689 100644 --- a/src/renderer/src/components/feature-wall/tour/FeatureWallTourPanel.tsx +++ b/src/renderer/src/components/feature-wall/tour/FeatureWallTourPanel.tsx @@ -1,13 +1,22 @@ import type { JSX, KeyboardEvent, MutableRefObject, ReactNode } from 'react' -import type { AgentsStep, AgentsStepId } from '../../../../../shared/agents-orchestration-steps' +import type { + AgentsStep, + AgentsStepId +} from '../../../../../shared/feature-education/explore/agents-orchestration-steps' import type { FeatureWallWorkflow, FeatureWallWorkflowId -} from '../../../../../shared/feature-wall-workflows' -import type { ReviewStep, ReviewStepId } from '../../../../../shared/review-steps' -import type { FeatureWallOpenSourceTelemetry } from '../../../../../shared/telemetry-property-schemas' +} from '../../../../../shared/feature-education/explore/feature-wall-workflows' +import type { + ReviewStep, + ReviewStepId +} from '../../../../../shared/feature-education/explore/review-steps' +import type { FeatureWallOpenSourceTelemetry } from '../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { GlobalSettings } from '../../../../../shared/global-settings-types' -import type { WorkbenchStep, WorkbenchStepId } from '../../../../../shared/workbench-steps' +import type { + WorkbenchStep, + WorkbenchStepId +} from '../../../../../shared/feature-education/explore/workbench-steps' import type { InstalledAgentSkillState } from '@/hooks/skills/discovery/useInstalledAgentSkills' import { cn } from '@/lib/class-names' import type { FeatureWallCompletionState } from '../completion/use-feature-wall-completion' diff --git a/src/renderer/src/components/feature-wall/tour/feature-wall-active-step-copy.ts b/src/renderer/src/components/feature-wall/tour/feature-wall-active-step-copy.ts index 1990c869afc..cdd5bc546fe 100644 --- a/src/renderer/src/components/feature-wall/tour/feature-wall-active-step-copy.ts +++ b/src/renderer/src/components/feature-wall/tour/feature-wall-active-step-copy.ts @@ -1,6 +1,6 @@ -import type { AgentsStep } from '../../../../../shared/agents-orchestration-steps' -import type { ReviewStep } from '../../../../../shared/review-steps' -import type { WorkbenchStep } from '../../../../../shared/workbench-steps' +import type { AgentsStep } from '../../../../../shared/feature-education/explore/agents-orchestration-steps' +import type { ReviewStep } from '../../../../../shared/feature-education/explore/review-steps' +import type { WorkbenchStep } from '../../../../../shared/feature-education/explore/workbench-steps' import type { FeatureWallActiveStepCopy } from './FeatureWallTourPanel' import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/feature-wall/tour/feature-wall-open-source.ts b/src/renderer/src/components/feature-wall/tour/feature-wall-open-source.ts index ad43b39e122..9fe1f154258 100644 --- a/src/renderer/src/components/feature-wall/tour/feature-wall-open-source.ts +++ b/src/renderer/src/components/feature-wall/tour/feature-wall-open-source.ts @@ -1,4 +1,4 @@ -import type { FeatureWallOpenSourceTelemetry } from '../../../../../shared/telemetry-property-schemas' +import type { FeatureWallOpenSourceTelemetry } from '../../../../../shared/telemetry/schemas/telemetry-property-schemas' export function getFeatureWallOpenSource( modalData: Record diff --git a/src/renderer/src/components/feature-wall/tour/feature-wall-tour-localized-copy.ts b/src/renderer/src/components/feature-wall/tour/feature-wall-tour-localized-copy.ts index 9fda148b368..cd07b5c3280 100644 --- a/src/renderer/src/components/feature-wall/tour/feature-wall-tour-localized-copy.ts +++ b/src/renderer/src/components/feature-wall/tour/feature-wall-tour-localized-copy.ts @@ -1,8 +1,8 @@ -import type { AgentsStepId } from '../../../../../shared/agents-orchestration-steps' -import type { FeatureWallMediaTileId } from '../../../../../shared/feature-wall-tiles' -import type { FeatureWallWorkflowId } from '../../../../../shared/feature-wall-workflows' -import type { ReviewStepId } from '../../../../../shared/review-steps' -import type { WorkbenchStepId } from '../../../../../shared/workbench-steps' +import type { AgentsStepId } from '../../../../../shared/feature-education/explore/agents-orchestration-steps' +import type { FeatureWallMediaTileId } from '../../../../../shared/feature-education/explore/feature-wall-tiles' +import type { FeatureWallWorkflowId } from '../../../../../shared/feature-education/explore/feature-wall-workflows' +import type { ReviewStepId } from '../../../../../shared/feature-education/explore/review-steps' +import type { WorkbenchStepId } from '../../../../../shared/feature-education/explore/workbench-steps' import { translate } from '@/i18n/i18n' import { createLocalizedCatalog } from '@/i18n/localized-catalog' diff --git a/src/renderer/src/components/feature-wall/tour/use-feature-wall-tour-rail-keydown.ts b/src/renderer/src/components/feature-wall/tour/use-feature-wall-tour-rail-keydown.ts index 1c642c3a386..5b9dd897d67 100644 --- a/src/renderer/src/components/feature-wall/tour/use-feature-wall-tour-rail-keydown.ts +++ b/src/renderer/src/components/feature-wall/tour/use-feature-wall-tour-rail-keydown.ts @@ -3,7 +3,7 @@ import type { KeyboardEvent, RefObject } from 'react' import { FEATURE_WALL_WORKFLOWS, type FeatureWallWorkflow -} from '../../../../../shared/feature-wall-workflows' +} from '../../../../../shared/feature-education/explore/feature-wall-workflows' import { getFeatureWallRailNavigationTarget, type FeatureWallRailNavigationKey diff --git a/src/renderer/src/components/feature-wall/tour/use-feature-wall-tour-telemetry.ts b/src/renderer/src/components/feature-wall/tour/use-feature-wall-tour-telemetry.ts index 039138e7365..da12bd9f1fa 100644 --- a/src/renderer/src/components/feature-wall/tour/use-feature-wall-tour-telemetry.ts +++ b/src/renderer/src/components/feature-wall/tour/use-feature-wall-tour-telemetry.ts @@ -1,11 +1,11 @@ import { useCallback, useEffect, useRef } from 'react' -import { FEATURE_WALL_MAX_DWELL_MS } from '../../../../../shared/feature-wall-telemetry' +import { FEATURE_WALL_MAX_DWELL_MS } from '../../../../../shared/feature-education/explore/feature-wall-telemetry' import type { FeatureWallExitAction, FeatureWallTourDepthSummary -} from '../../../../../shared/feature-wall-tour-depth' -import type { EventProps } from '../../../../../shared/telemetry-event-classification' -import type { FeatureWallOpenSourceTelemetry } from '../../../../../shared/telemetry-property-schemas' +} from '../../../../../shared/feature-education/explore/feature-wall-tour-depth' +import type { EventProps } from '../../../../../shared/telemetry/telemetry-event-classification' +import type { FeatureWallOpenSourceTelemetry } from '../../../../../shared/telemetry/schemas/telemetry-property-schemas' import { track } from '@/diagnostics/telemetry/telemetry' export type FeatureWallTourTelemetryState = { diff --git a/src/renderer/src/components/floating-terminal/workspace/floating-workspace-tour-interaction-snapshot.ts b/src/renderer/src/components/floating-terminal/workspace/floating-workspace-tour-interaction-snapshot.ts index 29423a0b5a0..e35d64054a7 100644 --- a/src/renderer/src/components/floating-terminal/workspace/floating-workspace-tour-interaction-snapshot.ts +++ b/src/renderer/src/components/floating-terminal/workspace/floating-workspace-tour-interaction-snapshot.ts @@ -1,7 +1,7 @@ import { hasFeatureInteraction, type FeatureInteractionState -} from '../../../../../shared/feature-interactions' +} from '../../../../../shared/feature-education/interactions/feature-interactions' export type FloatingWorkspaceTourInteractionSnapshot = { wasPreviouslyInteracted?: boolean diff --git a/src/renderer/src/components/macos-update-requirement/MacosUpdateRequirementDialog.tsx b/src/renderer/src/components/macos-update-requirement/MacosUpdateRequirementDialog.tsx index df856cec4da..f129adeea49 100644 --- a/src/renderer/src/components/macos-update-requirement/MacosUpdateRequirementDialog.tsx +++ b/src/renderer/src/components/macos-update-requirement/MacosUpdateRequirementDialog.tsx @@ -3,7 +3,7 @@ import { ArrowUpRight, ChevronDown } from 'lucide-react' import { isVenturaRequirement, type MacosUpgradeSupport -} from '../../../../shared/macos-upgrade-support' +} from '../../../../shared/updater/requirements/macos-upgrade-support' import type { UnsupportedSystemUpdate } from '../../../../shared/update-status-types' import { Button } from '@/components/ui/button' import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible' diff --git a/src/renderer/src/components/macos-update-requirement/MacosUpdateRequirementNotice.tsx b/src/renderer/src/components/macos-update-requirement/MacosUpdateRequirementNotice.tsx index cf0edc88569..6b72af15f00 100644 --- a/src/renderer/src/components/macos-update-requirement/MacosUpdateRequirementNotice.tsx +++ b/src/renderer/src/components/macos-update-requirement/MacosUpdateRequirementNotice.tsx @@ -1,5 +1,5 @@ import { useEffect, useState, type JSX } from 'react' -import type { MacosUpgradeSupport } from '../../../../shared/macos-upgrade-support' +import type { MacosUpgradeSupport } from '../../../../shared/updater/requirements/macos-upgrade-support' import type { UnsupportedSystemUpdate } from '../../../../shared/update-status-types' import { openAppHttpLink } from '@/lib/browser/navigation/app-http-link-open' import { useAppStore } from '@/store' diff --git a/src/renderer/src/components/mobile/WindowsFirewallNotice.tsx b/src/renderer/src/components/mobile/WindowsFirewallNotice.tsx index 8b65a3f89af..9c43b719987 100644 --- a/src/renderer/src/components/mobile/WindowsFirewallNotice.tsx +++ b/src/renderer/src/components/mobile/WindowsFirewallNotice.tsx @@ -1,7 +1,7 @@ import { useCallback, useEffect, useRef, useState } from 'react' import { CircleAlert, Loader2, ShieldCheck } from 'lucide-react' import { toast } from 'sonner' -import type { WindowsMobileFirewallStatus } from '../../../../shared/windows-mobile-firewall' +import type { WindowsMobileFirewallStatus } from '../../../../shared/remote-runtime/pairing/windows-mobile-firewall' import { useMountedRef } from '../../hooks/useMountedRef' import { useTranslate } from '../../i18n/use-translate' import { Button } from '../ui/button' diff --git a/src/renderer/src/components/native-chat/host-access/native-chat-host-setup.ts b/src/renderer/src/components/native-chat/host-access/native-chat-host-setup.ts index 34c46a8a825..da8e298b026 100644 --- a/src/renderer/src/components/native-chat/host-access/native-chat-host-setup.ts +++ b/src/renderer/src/components/native-chat/host-access/native-chat-host-setup.ts @@ -14,7 +14,7 @@ import { import type { AgentSessionAccountKind } from '../../../../../shared/agent-session/agent-session-availability' import type { RuntimeClientTarget } from '../../../../../shared/remote-runtime/host-catalog/runtime-client-target' import { lastVerifiedRuntimeStatus } from '../../../../../shared/remote-runtime/host-status/runtime-host-status' -import { resolveHostAgentStartupShell } from '../../../../../shared/windows-terminal-shell' +import { resolveHostAgentStartupShell } from '../../../../../shared/shell/launch/windows-terminal-shell' import { useNativeChatHostCommandTerminal, type NativeChatHostCommandTerminal diff --git a/src/renderer/src/components/native-chat/selection-quotes/add-to-chat-point-menu.ts b/src/renderer/src/components/native-chat/selection-quotes/add-to-chat-point-menu.ts index 020e0cef776..fbb97b2ec59 100644 --- a/src/renderer/src/components/native-chat/selection-quotes/add-to-chat-point-menu.ts +++ b/src/renderer/src/components/native-chat/selection-quotes/add-to-chat-point-menu.ts @@ -1,6 +1,6 @@ // Which Add to chat target list is open at a screen point; kept apart from the menu so editors // can open it without loading the menu's components. -import type { LaunchSource } from '../../../../../shared/telemetry-property-schemas' +import type { LaunchSource } from '../../../../../shared/telemetry/schemas/telemetry-property-schemas' export type AddToChatSource = { worktreeId: string; quote: string; launchSource: LaunchSource } diff --git a/src/renderer/src/components/native-chat/telemetry/native-chat-telemetry.ts b/src/renderer/src/components/native-chat/telemetry/native-chat-telemetry.ts index 4e871eca17b..4c19ffbfacc 100644 --- a/src/renderer/src/components/native-chat/telemetry/native-chat-telemetry.ts +++ b/src/renderer/src/components/native-chat/telemetry/native-chat-telemetry.ts @@ -2,7 +2,7 @@ import { track } from '../../../diagnostics/telemetry/telemetry' import { tuiAgentToAgentKind } from '../../../../../shared/agent-status/identity/agent-kind' -import type { NativeChatRuntime } from '../../../../../shared/telemetry-native-feature-event-schemas' +import type { NativeChatRuntime } from '../../../../../shared/telemetry/schemas/telemetry-native-feature-event-schemas' import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent' /** Accept broad chat identities and narrow unknowns to telemetry other; callers need no unsafe TuiAgent cast. */ diff --git a/src/renderer/src/components/onboarding/OnboardingFlow.tsx b/src/renderer/src/components/onboarding/OnboardingFlow.tsx index f0254da849f..d7ba8bb99ef 100644 --- a/src/renderer/src/components/onboarding/OnboardingFlow.tsx +++ b/src/renderer/src/components/onboarding/OnboardingFlow.tsx @@ -7,7 +7,7 @@ import { isScreenSubmitShortcut } from '@/lib/keyboard/screen-submit-shortcut' import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip' -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' import { AgentStep } from './AgentStep' import { ThemeStep } from './ThemeStep' import { NotificationStep } from './NotificationStep' diff --git a/src/renderer/src/components/onboarding/ThemeStep.tsx b/src/renderer/src/components/onboarding/ThemeStep.tsx index 241141df873..66e6bbc3d47 100644 --- a/src/renderer/src/components/onboarding/ThemeStep.tsx +++ b/src/renderer/src/components/onboarding/ThemeStep.tsx @@ -16,7 +16,7 @@ import type { TerminalConfigImportPreview } from '../../../../shared/terminal/ap import { getSystemPrefersDark } from '@/lib/terminal/appearance/terminal-theme' import { useSystemPrefersDark } from '@/hooks/theme/use-system-prefers-dark' import type { GlobalSettings } from '../../../../shared/global-settings-types' -import type { DiscoveryStatusEmitted } from '../../../../shared/onboarding-state-types' +import type { DiscoveryStatusEmitted } from '../../../../shared/onboarding/onboarding-state-types' import type { ThemeLook, ThemeLookBase } from './onboarding-theme-looks' type ThemeStepProps = { diff --git a/src/renderer/src/components/onboarding/WindowsTerminalStep.tsx b/src/renderer/src/components/onboarding/WindowsTerminalStep.tsx index 2a8a34b84f4..669b9789e3d 100644 --- a/src/renderer/src/components/onboarding/WindowsTerminalStep.tsx +++ b/src/renderer/src/components/onboarding/WindowsTerminalStep.tsx @@ -1,7 +1,7 @@ import { Check } from 'lucide-react' import { useCallback, useState } from 'react' -import type { BuiltInWindowsTerminalShell } from '../../../../shared/windows-terminal-shell' -import { WINDOWS_GIT_BASH_SHELL } from '../../../../shared/windows-terminal-shell' +import type { BuiltInWindowsTerminalShell } from '../../../../shared/shell/launch/windows-terminal-shell' +import { WINDOWS_GIT_BASH_SHELL } from '../../../../shared/shell/launch/windows-terminal-shell' import type { GlobalSettings } from '../../../../shared/global-settings-types' import { cn } from '@/lib/class-names' import { useWindowsTerminalCapabilities } from '@/runtime/hosts/capabilities/windows-terminal-capabilities' diff --git a/src/renderer/src/components/onboarding/agent-picked-payload.ts b/src/renderer/src/components/onboarding/agent-picked-payload.ts index 3b6b612c1f2..4006b7ef428 100644 --- a/src/renderer/src/components/onboarding/agent-picked-payload.ts +++ b/src/renderer/src/components/onboarding/agent-picked-payload.ts @@ -1,6 +1,6 @@ import '@/diagnostics/telemetry/telemetry' import { tuiAgentToAgentKind } from '../../../../shared/agent-status/identity/agent-kind' -import type { EventProps } from '../../../../shared/telemetry-events' +import type { EventProps } from '../../../../shared/telemetry/telemetry-event-classification' import type { PathSource, ShellHydrationFailureReason diff --git a/src/renderer/src/components/onboarding/onboarding-feature-setup.ts b/src/renderer/src/components/onboarding/onboarding-feature-setup.ts index 35751f6c3aa..04a93b22dcf 100644 --- a/src/renderer/src/components/onboarding/onboarding-feature-setup.ts +++ b/src/renderer/src/components/onboarding/onboarding-feature-setup.ts @@ -15,7 +15,7 @@ import { ORCHESTRATION_SETUP_DISMISSED_STORAGE_KEY, notifyOrchestrationSetupStateChanged } from '@/components/orchestration/setup/orchestration-setup-state' -import type { EventProps } from '../../../../shared/telemetry-event-classification' +import type { EventProps } from '../../../../shared/telemetry/telemetry-event-classification' import type { BundledSkillInstallState } from '@/hooks/skills/installation/use-bundled-skill-install' export type OnboardingFeatureSetupId = diff --git a/src/renderer/src/components/onboarding/onboarding-flow-state.ts b/src/renderer/src/components/onboarding/onboarding-flow-state.ts index d3fcd704880..de2baba6149 100644 --- a/src/renderer/src/components/onboarding/onboarding-flow-state.ts +++ b/src/renderer/src/components/onboarding/onboarding-flow-state.ts @@ -4,10 +4,10 @@ import { translate } from '@/i18n/i18n' import { ONBOARDING_FINAL_STEP, ONBOARDING_FLOW_VERSION -} from '../../../../shared/onboarding-defaults' -import type { EventProps } from '../../../../shared/telemetry-events' +} from '../../../../shared/onboarding/onboarding-defaults' +import type { EventProps } from '../../../../shared/telemetry/telemetry-event-classification' import type { GlobalSettings } from '../../../../shared/global-settings-types' -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent' import { STEPS, type AgentSurface } from './use-onboarding-flow-types' import type { ThemeLookSettings } from './onboarding-theme-look-settings' diff --git a/src/renderer/src/components/onboarding/onboarding-folder-agent-launch.ts b/src/renderer/src/components/onboarding/onboarding-folder-agent-launch.ts index a1869b93d6c..ae24c2efd49 100644 --- a/src/renderer/src/components/onboarding/onboarding-folder-agent-launch.ts +++ b/src/renderer/src/components/onboarding/onboarding-folder-agent-launch.ts @@ -1,7 +1,7 @@ import { ensureAgentLaunchPreferences } from '@/runtime/agent-launch-settings/use-host-agent-launch-preferences' import type { AgentLaunchPreferences } from '@/runtime/agent-launch-settings/host-agent-launch-preferences-resource' import type { ExecutionHostId } from '../../../../shared/execution-host' -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent' import type { useAppStore } from '@/store/index' import { diff --git a/src/renderer/src/components/onboarding/onboarding-folder-agent-startup.ts b/src/renderer/src/components/onboarding/onboarding-folder-agent-startup.ts index 331169497b7..cd257a4930e 100644 --- a/src/renderer/src/components/onboarding/onboarding-folder-agent-startup.ts +++ b/src/renderer/src/components/onboarding/onboarding-folder-agent-startup.ts @@ -7,7 +7,7 @@ import type { AgentStartedTelemetry } from '@/lib/workspace/creation/worktree-st import type { StartupCommandDelivery } from '../../../../shared/agent-launch/startup/codex-startup-delivery' import type { SleepingAgentLaunchConfig } from '../../../../shared/agent-session/lifecycle/agent-session-resume' import type { GlobalSettings } from '../../../../shared/global-settings-types' -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' import type { AgentStartupShell } from '../../../../shared/agent-launch/startup/tui-agent-startup-shell' import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent' diff --git a/src/renderer/src/components/onboarding/onboarding-project-checklist.ts b/src/renderer/src/components/onboarding/onboarding-project-checklist.ts index 9dfa4f493b5..1b7eeb775cc 100644 --- a/src/renderer/src/components/onboarding/onboarding-project-checklist.ts +++ b/src/renderer/src/components/onboarding/onboarding-project-checklist.ts @@ -1,5 +1,5 @@ import { track } from '@/diagnostics/telemetry/telemetry' -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' export type OnboardingProjectChecklistItem = 'addedRepo' | 'addedFolder' diff --git a/src/renderer/src/components/onboarding/should-show-onboarding.ts b/src/renderer/src/components/onboarding/should-show-onboarding.ts index bed6f2ca12a..16ff25c61f1 100644 --- a/src/renderer/src/components/onboarding/should-show-onboarding.ts +++ b/src/renderer/src/components/onboarding/should-show-onboarding.ts @@ -1,4 +1,4 @@ -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' // Keep the visibility gate separate so App can lazy-load the flow without eagerly importing its chunk. export function shouldShowOnboarding(onboarding: OnboardingState | null): boolean { diff --git a/src/renderer/src/components/onboarding/show-onboarding-event.ts b/src/renderer/src/components/onboarding/show-onboarding-event.ts index 67ceee78b70..7c94230db7d 100644 --- a/src/renderer/src/components/onboarding/show-onboarding-event.ts +++ b/src/renderer/src/components/onboarding/show-onboarding-event.ts @@ -1,4 +1,4 @@ -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' const ONBOARDING_REOPENED_EVENT = 'orca:onboarding-reopened' diff --git a/src/renderer/src/components/onboarding/use-onboarding-flow-actions.ts b/src/renderer/src/components/onboarding/use-onboarding-flow-actions.ts index 07a32a90217..8b2d35ebf14 100644 --- a/src/renderer/src/components/onboarding/use-onboarding-flow-actions.ts +++ b/src/renderer/src/components/onboarding/use-onboarding-flow-actions.ts @@ -6,9 +6,9 @@ import { translate } from '@/i18n/i18n' import { useAppStore } from '@/store/index' import { getExecutionHostIdForWorktree } from '@/lib/workspace/ownership/worktree-runtime-owner' import { launchOnboardingCompletionAgent } from './onboarding-completion-agent-launch' -import { ONBOARDING_FINAL_STEP } from '../../../../shared/onboarding-defaults' +import { ONBOARDING_FINAL_STEP } from '../../../../shared/onboarding/onboarding-defaults' import type { GlobalSettings } from '../../../../shared/global-settings-types' -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent' import { buildWindowsTerminalSnapshotPayload } from './windows-terminal-onboarding-telemetry' import { persistStep, type PersistCurrentStepResult } from './use-onboarding-flow-persistence' diff --git a/src/renderer/src/components/onboarding/use-onboarding-flow-persistence.ts b/src/renderer/src/components/onboarding/use-onboarding-flow-persistence.ts index acacace43b6..44cca374370 100644 --- a/src/renderer/src/components/onboarding/use-onboarding-flow-persistence.ts +++ b/src/renderer/src/components/onboarding/use-onboarding-flow-persistence.ts @@ -6,10 +6,10 @@ import { useAppStore } from '@/store/index' import { ONBOARDING_FINAL_STEP, ONBOARDING_FLOW_VERSION -} from '../../../../shared/onboarding-defaults' -import type { EventProps } from '../../../../shared/telemetry-events' +} from '../../../../shared/onboarding/onboarding-defaults' +import type { EventProps } from '../../../../shared/telemetry/telemetry-event-classification' import type { GlobalSettings } from '../../../../shared/global-settings-types' -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent' import { applyAllAgentsPermission } from '../../../../shared/agent-launch/permissions/tui-agent-permission-choice' import type { AgentChatPermissionMode } from '../../../../shared/agent-launch/permissions/agent-chat-permission-mode' diff --git a/src/renderer/src/components/onboarding/use-onboarding-flow-telemetry.ts b/src/renderer/src/components/onboarding/use-onboarding-flow-telemetry.ts index e98ce6bd3bd..d27f07f58a3 100644 --- a/src/renderer/src/components/onboarding/use-onboarding-flow-telemetry.ts +++ b/src/renderer/src/components/onboarding/use-onboarding-flow-telemetry.ts @@ -1,9 +1,9 @@ import { useCallback, useEffect, useRef, useState } from 'react' import { applyDocumentTheme } from '@/app-shell/appearance/document-theme' import { track } from '@/diagnostics/telemetry/telemetry' -import { ONBOARDING_FINAL_STEP } from '../../../../shared/onboarding-defaults' +import { ONBOARDING_FINAL_STEP } from '../../../../shared/onboarding/onboarding-defaults' import type { GlobalSettings } from '../../../../shared/global-settings-types' -import type { EventProps } from '../../../../shared/telemetry-events' +import type { EventProps } from '../../../../shared/telemetry/telemetry-event-classification' import type { AppState } from '@/store/types' import { getGitHubTaskSourceStatus, diff --git a/src/renderer/src/components/onboarding/use-onboarding-flow.ts b/src/renderer/src/components/onboarding/use-onboarding-flow.ts index 674cfcacaa5..07e9c592af1 100644 --- a/src/renderer/src/components/onboarding/use-onboarding-flow.ts +++ b/src/renderer/src/components/onboarding/use-onboarding-flow.ts @@ -8,7 +8,7 @@ import { resolvePaintedTheme } from '@/app-shell/appearance/terminal-app-theme' import { track } from '@/diagnostics/telemetry/telemetry' import { buildAgentPickedPayload } from './agent-picked-payload' import type { GlobalSettings } from '../../../../shared/global-settings-types' -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent' import { STEPS, stepIndexAfterCompletedStep } from './use-onboarding-flow-types' import { useOnboardingAgentSurface } from './use-onboarding-agent-surface' diff --git a/src/renderer/src/components/onboarding/windows-terminal-onboarding-telemetry.ts b/src/renderer/src/components/onboarding/windows-terminal-onboarding-telemetry.ts index bf1a0b044bc..b8ffeff0995 100644 --- a/src/renderer/src/components/onboarding/windows-terminal-onboarding-telemetry.ts +++ b/src/renderer/src/components/onboarding/windows-terminal-onboarding-telemetry.ts @@ -1,5 +1,5 @@ -import { WINDOWS_GIT_BASH_SHELL } from '../../../../shared/windows-terminal-shell' -import type { EventProps } from '../../../../shared/telemetry-events' +import { WINDOWS_GIT_BASH_SHELL } from '../../../../shared/shell/launch/windows-terminal-shell' +import type { EventProps } from '../../../../shared/telemetry/telemetry-event-classification' import type { GlobalSettings } from '../../../../shared/global-settings-types' type WindowsTerminalSnapshot = EventProps<'onboarding_windows_terminal_snapshot'> diff --git a/src/renderer/src/components/right-sidebar/checks-panel/refresh/checks-panel-pr-refresh-breadcrumb.ts b/src/renderer/src/components/right-sidebar/checks-panel/refresh/checks-panel-pr-refresh-breadcrumb.ts index 6e7adacd645..5734e796407 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/refresh/checks-panel-pr-refresh-breadcrumb.ts +++ b/src/renderer/src/components/right-sidebar/checks-panel/refresh/checks-panel-pr-refresh-breadcrumb.ts @@ -7,7 +7,7 @@ import { import type { CrashReportBreadcrumbData, CrashReportDetailValue -} from '../../../../../../shared/crash-reporting' +} from '../../../../../../shared/crash-reporting/crash-reporting' import type { HostedReviewProvider } from '../../../../../../shared/source-control/hosted-review/hosted-review-contracts' type ChecksPanelPRRefreshBreadcrumbEvent = 'start' | 'done' | 'stale_cleared' diff --git a/src/renderer/src/components/right-sidebar/source-control/ai/SourceControlAgentActionDialog.tsx b/src/renderer/src/components/right-sidebar/source-control/ai/SourceControlAgentActionDialog.tsx index e2fcf90dc7f..c631a773002 100644 --- a/src/renderer/src/components/right-sidebar/source-control/ai/SourceControlAgentActionDialog.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/ai/SourceControlAgentActionDialog.tsx @@ -14,7 +14,7 @@ import type { } from '../../../../../../shared/source-control/ai/recipes/source-control-ai-actions' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' import type { RunSourceControlAgentActionStartArgs } from './runSourceControlAgentActionStart' -import type { LaunchSource } from '../../../../../../shared/telemetry-events' +import type { LaunchSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { SourceControlAiWriteTarget } from '../../../../../../shared/source-control/ai/settings/source-control-ai-recipe-save' import { SourceControlAgentActionDialogForm } from './SourceControlAgentActionDialogForm' import { useSourceControlAgentActionDialog } from './useSourceControlAgentActionDialog' diff --git a/src/renderer/src/components/right-sidebar/source-control/ai/runSourceControlAgentActionStart.ts b/src/renderer/src/components/right-sidebar/source-control/ai/runSourceControlAgentActionStart.ts index e4efe3b41dc..a806b9b07ea 100644 --- a/src/renderer/src/components/right-sidebar/source-control/ai/runSourceControlAgentActionStart.ts +++ b/src/renderer/src/components/right-sidebar/source-control/ai/runSourceControlAgentActionStart.ts @@ -19,7 +19,7 @@ import type { RuntimeGitContext } from '@/runtime/source-control/git/runtime-git import type { Repo } from '../../../../../../shared/repo-types' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' import type { AgentLaunchChoice } from '@/lib/agent-session/launch/routing/agent-menu-selection' -import type { LaunchSource } from '../../../../../../shared/telemetry-property-schemas' +import type { LaunchSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import { normalizeSourceControlActionRecipe, type SourceControlActionRecipe, diff --git a/src/renderer/src/components/right-sidebar/source-control/ai/useSourceControlAgentActionStart.ts b/src/renderer/src/components/right-sidebar/source-control/ai/useSourceControlAgentActionStart.ts index d49687e9fb3..3362e594d28 100644 --- a/src/renderer/src/components/right-sidebar/source-control/ai/useSourceControlAgentActionStart.ts +++ b/src/renderer/src/components/right-sidebar/source-control/ai/useSourceControlAgentActionStart.ts @@ -4,7 +4,7 @@ import type { SelectedSourceControlActionRecipe } from '../../../../../../shared import type { AgentLaunchPreferences } from '@/runtime/agent-launch-settings/host-agent-launch-preferences-resource' import { useCallback, useEffect, useRef, useState } from 'react' import type { RuntimeGitContext } from '@/runtime/source-control/git/runtime-git-client-context' -import type { LaunchSource } from '../../../../../../shared/telemetry-events' +import type { LaunchSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { SourceControlLaunchActionId, SourceControlActionRecipe diff --git a/src/renderer/src/components/right-sidebar/source-control/panel/source-control-fix-split-button.tsx b/src/renderer/src/components/right-sidebar/source-control/panel/source-control-fix-split-button.tsx index c79c3c5dd2d..5748e7b10cb 100644 --- a/src/renderer/src/components/right-sidebar/source-control/panel/source-control-fix-split-button.tsx +++ b/src/renderer/src/components/right-sidebar/source-control/panel/source-control-fix-split-button.tsx @@ -14,7 +14,7 @@ import type { SourceControlLaunchActionId } from '../../../../../../shared/source-control/ai/recipes/source-control-ai-actions' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' -import type { LaunchSource } from '../../../../../../shared/telemetry-events' +import type { LaunchSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { SourceControlAiWriteTarget } from '../../../../../../shared/source-control/ai/settings/source-control-ai-recipe-save' import { useTranslate } from '@/i18n/use-translate' import { SourceControlAgentActionDialog } from '../ai/SourceControlAgentActionDialog' diff --git a/src/renderer/src/components/settings/accounts/accounts-pane-account-actions.ts b/src/renderer/src/components/settings/accounts/accounts-pane-account-actions.ts index bfe541e54b4..b1964770f74 100644 --- a/src/renderer/src/components/settings/accounts/accounts-pane-account-actions.ts +++ b/src/renderer/src/components/settings/accounts/accounts-pane-account-actions.ts @@ -1,7 +1,7 @@ import type { Dispatch, SetStateAction } from 'react' import type { GlobalSettings } from '../../../../../shared/global-settings-types' import type { RuntimeClientTarget } from '../../../../../shared/remote-runtime/host-catalog/runtime-client-target' -import type { FeatureInteractionId } from '../../../../../shared/feature-interaction-catalog' +import type { FeatureInteractionId } from '../../../../../shared/feature-education/interactions/feature-interaction-catalog' import type { ClaudeRateLimitAccountsState, CodexRateLimitAccountsState diff --git a/src/renderer/src/components/settings/accounts/accounts-pane-types.ts b/src/renderer/src/components/settings/accounts/accounts-pane-types.ts index 5163e233903..2ad4bf01e78 100644 --- a/src/renderer/src/components/settings/accounts/accounts-pane-types.ts +++ b/src/renderer/src/components/settings/accounts/accounts-pane-types.ts @@ -9,7 +9,7 @@ import type { RateLimitRuntimeTarget } from '../../../../../shared/rate-limit-types' import type { CodexConfigSyncStatus } from '../../../../../shared/codex-config-sync-types' -import type { FeatureInteractionId } from '../../../../../shared/feature-interaction-catalog' +import type { FeatureInteractionId } from '../../../../../shared/feature-education/interactions/feature-interaction-catalog' import type { ProviderAccountRuntimeView } from '../../provider-accounts/provider-account-visibility' import type { RuntimeClientTarget } from '../../../../../shared/remote-runtime/host-catalog/runtime-client-target' import type { SettingsHostScope } from '../host-scope/settings-host-scope' diff --git a/src/renderer/src/components/settings/accounts/usage/MiniMaxAccountsSection.tsx b/src/renderer/src/components/settings/accounts/usage/MiniMaxAccountsSection.tsx index dfeb9391c8a..305bcdc3f2e 100644 --- a/src/renderer/src/components/settings/accounts/usage/MiniMaxAccountsSection.tsx +++ b/src/renderer/src/components/settings/accounts/usage/MiniMaxAccountsSection.tsx @@ -1,7 +1,7 @@ import { ExternalLink, ShieldCheck } from 'lucide-react' import { useTranslate } from '@/i18n/use-translate' import { cn } from '@/lib/class-names' -import type { FeatureInteractionId } from '../../../../../../shared/feature-interaction-catalog' +import type { FeatureInteractionId } from '../../../../../../shared/feature-education/interactions/feature-interaction-catalog' import type { ProviderRateLimits } from '../../../../../../shared/rate-limit-types' import { Label } from '../../../ui/label' import { MiniMaxIcon } from '../../../status-bar/accounts/provider-icons' diff --git a/src/renderer/src/components/settings/accounts/usage/accounts-pane-minimax-actions.ts b/src/renderer/src/components/settings/accounts/usage/accounts-pane-minimax-actions.ts index 58780dd2b62..7ab0b04c691 100644 --- a/src/renderer/src/components/settings/accounts/usage/accounts-pane-minimax-actions.ts +++ b/src/renderer/src/components/settings/accounts/usage/accounts-pane-minimax-actions.ts @@ -1,5 +1,5 @@ import type { Dispatch, SetStateAction } from 'react' -import type { FeatureInteractionId } from '../../../../../../shared/feature-interaction-catalog' +import type { FeatureInteractionId } from '../../../../../../shared/feature-education/interactions/feature-interaction-catalog' import type { MiniMaxCredentialsStatus } from '../../../../../../shared/minimax-credentials-status' import type { RuntimeClientTarget } from '../../../../../../shared/remote-runtime/host-catalog/runtime-client-target' import { toast } from 'sonner' diff --git a/src/renderer/src/components/settings/appearance/AppearanceWindowSidebarSection.tsx b/src/renderer/src/components/settings/appearance/AppearanceWindowSidebarSection.tsx index 21357ce48ef..ef369e5c14a 100644 --- a/src/renderer/src/components/settings/appearance/AppearanceWindowSidebarSection.tsx +++ b/src/renderer/src/components/settings/appearance/AppearanceWindowSidebarSection.tsx @@ -2,7 +2,7 @@ import type React from 'react' import type { GlobalSettings } from '../../../../../shared/global-settings-types' import type { StatusBarItem } from '../../../../../shared/ui-chrome-types' -import type { FeatureInteractionId } from '../../../../../shared/feature-interaction-catalog' +import type { FeatureInteractionId } from '../../../../../shared/feature-education/interactions/feature-interaction-catalog' import { SearchableSetting } from '../section-layout/SearchableSetting' import { SettingsGroupDisclosure } from '../section-layout/SettingsGroupDisclosure' import { SettingsGroupNestedRows, SettingsGroupSubsection } from '../section-layout/SettingsGroup' diff --git a/src/renderer/src/components/settings/privacy/PrivacyPane.tsx b/src/renderer/src/components/settings/privacy/PrivacyPane.tsx index 211f6b9219c..f4c4a7b7dd3 100644 --- a/src/renderer/src/components/settings/privacy/PrivacyPane.tsx +++ b/src/renderer/src/components/settings/privacy/PrivacyPane.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react' import { ShieldCheck } from 'lucide-react' import { useMountedRef } from '@/hooks/useMountedRef' import type { GlobalSettings } from '../../../../../shared/global-settings-types' -import type { TelemetryConsentState } from '../../../../../shared/telemetry-consent-types' +import type { TelemetryConsentState } from '../../../../../shared/telemetry/telemetry-consent-types' import { Label } from '../../ui/label' import { Switch } from '../../ui/switch' import { diff --git a/src/renderer/src/components/settings/privacy/diagnostics-bundle-error-copy.ts b/src/renderer/src/components/settings/privacy/diagnostics-bundle-error-copy.ts index 9953a5b20ce..3c5a366c773 100644 --- a/src/renderer/src/components/settings/privacy/diagnostics-bundle-error-copy.ts +++ b/src/renderer/src/components/settings/privacy/diagnostics-bundle-error-copy.ts @@ -3,7 +3,7 @@ import { displayIpcErrorMessage } from '@/runtime/errors/ipc-error' import { DIAGNOSTICS_BUNDLE_FAILURE_COPY as EN, type DiagnosticsBundleFailureCode -} from '../../../../../shared/diagnostics-bundle-failure-copy' +} from '../../../../../shared/diagnostics/bundles/diagnostics-bundle-failure-copy' const COPY: Record string> = { creatingDisabled: () => diff --git a/src/renderer/src/components/settings/setup-guide/SettingsSetupGuidePane.tsx b/src/renderer/src/components/settings/setup-guide/SettingsSetupGuidePane.tsx index a5fa67b5bc9..c864ef529ac 100644 --- a/src/renderer/src/components/settings/setup-guide/SettingsSetupGuidePane.tsx +++ b/src/renderer/src/components/settings/setup-guide/SettingsSetupGuidePane.tsx @@ -2,8 +2,8 @@ import { useMemo, useState } from 'react' import { getFeatureWallSetupSteps, getFirstIncompleteFeatureWallSetupStepId -} from '../../../../../shared/feature-wall-setup-steps' -import type { FeatureWallSetupStepId } from '../../../../../shared/feature-wall-setup-steps' +} from '../../../../../shared/feature-education/explore/feature-wall-setup-steps' +import type { FeatureWallSetupStepId } from '../../../../../shared/feature-education/explore/feature-wall-setup-steps' import { FeatureWallSetupChecklist } from '../../feature-wall/setup/FeatureWallSetupChecklist' import { useSetupGuideProgress } from '../../setup-guide/use-setup-guide-progress' diff --git a/src/renderer/src/components/settings/setup-guide/settings-setup-guide-progress.ts b/src/renderer/src/components/settings/setup-guide/settings-setup-guide-progress.ts index 4c4625d946e..b4b32884352 100644 --- a/src/renderer/src/components/settings/setup-guide/settings-setup-guide-progress.ts +++ b/src/renderer/src/components/settings/setup-guide/settings-setup-guide-progress.ts @@ -3,7 +3,7 @@ import { FEATURE_WALL_SETUP_STEPS, getFirstIncompleteFeatureWallSetupStepId, type FeatureWallSetupStepId -} from '../../../../../shared/feature-wall-setup-steps' +} from '../../../../../shared/feature-education/explore/feature-wall-setup-steps' import { useSetupGuideProgress } from '../../setup-guide/use-setup-guide-progress' export type SettingsSetupGuideProgress = { diff --git a/src/renderer/src/components/settings/shortcuts/shortcut-definition-catalog.ts b/src/renderer/src/components/settings/shortcuts/shortcut-definition-catalog.ts index d6e22000e51..2f31593675b 100644 --- a/src/renderer/src/components/settings/shortcuts/shortcut-definition-catalog.ts +++ b/src/renderer/src/components/settings/shortcuts/shortcut-definition-catalog.ts @@ -10,7 +10,7 @@ import type { import { findMacSystemHotkeyConflicts, type MacCapturedDigitChord -} from '../../../../../shared/macos-symbolic-hotkeys' +} from '../../../../../shared/keybindings/macos-symbolic-hotkeys' import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent' import type { ActivePluginCommand } from '@/store/plugins/catalog/plugin-contribution-catalog' import { buildPluginCommandKeybindingDefinitions } from '@/lib/plugins/commands/plugin-command-keybindings' diff --git a/src/renderer/src/components/settings/shortcuts/use-mac-captured-digit-chords.ts b/src/renderer/src/components/settings/shortcuts/use-mac-captured-digit-chords.ts index 791aa842d77..0b5ab991ce9 100644 --- a/src/renderer/src/components/settings/shortcuts/use-mac-captured-digit-chords.ts +++ b/src/renderer/src/components/settings/shortcuts/use-mac-captured-digit-chords.ts @@ -3,7 +3,7 @@ import { resolveCapturedDigitChordsForLayout, type MacCapturedDigitChord, type MacCapturedDigitRowChord -} from '../../../../../shared/macos-symbolic-hotkeys' +} from '../../../../../shared/keybindings/macos-symbolic-hotkeys' import type { LayoutMapLike } from '@/lib/keyboard-layout/detect-option-as-alt' import { normalizeLayoutBaseCharacter } from '@/lib/keyboard-layout/layout-base-character' diff --git a/src/renderer/src/components/settings/terminal/platform/TerminalWindowsShellSection.tsx b/src/renderer/src/components/settings/terminal/platform/TerminalWindowsShellSection.tsx index 5601a9dd3d9..b367c0443b7 100644 --- a/src/renderer/src/components/settings/terminal/platform/TerminalWindowsShellSection.tsx +++ b/src/renderer/src/components/settings/terminal/platform/TerminalWindowsShellSection.tsx @@ -1,5 +1,5 @@ import type { GlobalSettings } from '../../../../../../shared/global-settings-types' -import { WINDOWS_GIT_BASH_SHELL } from '../../../../../../shared/windows-terminal-shell' +import { WINDOWS_GIT_BASH_SHELL } from '../../../../../../shared/shell/launch/windows-terminal-shell' import { SettingsRow, SettingsSegmentedControl } from '../../form-controls/SettingsFormControls' import { SearchableSetting } from '../../section-layout/SearchableSetting' import { useTranslate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/settings/voice/voice-dictation-toggle.ts b/src/renderer/src/components/settings/voice/voice-dictation-toggle.ts index 90848edc5b0..c5d9eab43ae 100644 --- a/src/renderer/src/components/settings/voice/voice-dictation-toggle.ts +++ b/src/renderer/src/components/settings/voice/voice-dictation-toggle.ts @@ -1,5 +1,5 @@ import type { DeveloperPermissionRequestResult } from '../../../../../shared/developer-permissions-types' -import type { FeatureTipId } from '../../../../../shared/feature-tips' +import type { FeatureTipId } from '../../../../../shared/feature-education/feature-tips' import type { VoiceSettings } from '../../../../../shared/speech/speech-types' import { toast } from 'sonner' import { translate } from '@/i18n/i18n' diff --git a/src/renderer/src/components/setup-guide/SetupGuideModal.tsx b/src/renderer/src/components/setup-guide/SetupGuideModal.tsx index d4718181966..f90ddd4cf78 100644 --- a/src/renderer/src/components/setup-guide/SetupGuideModal.tsx +++ b/src/renderer/src/components/setup-guide/SetupGuideModal.tsx @@ -3,8 +3,8 @@ import { FEATURE_WALL_SETUP_STEP_IDS, getFirstIncompleteFeatureWallSetupStepId, getFeatureWallSetupSteps -} from '../../../../shared/feature-wall-setup-steps' -import type { FeatureWallSetupStepId } from '../../../../shared/feature-wall-setup-steps' +} from '../../../../shared/feature-education/explore/feature-wall-setup-steps' +import type { FeatureWallSetupStepId } from '../../../../shared/feature-education/explore/feature-wall-setup-steps' import { Dialog, DialogContent, diff --git a/src/renderer/src/components/setup-guide/setup-guide-browser-milestone-progress.ts b/src/renderer/src/components/setup-guide/setup-guide-browser-milestone-progress.ts index 31f55698d6e..5bfbeeb4591 100644 --- a/src/renderer/src/components/setup-guide/setup-guide-browser-milestone-progress.ts +++ b/src/renderer/src/components/setup-guide/setup-guide-browser-milestone-progress.ts @@ -3,7 +3,7 @@ import { useAppStore } from '@/store/index' import { FEATURE_WALL_SETUP_STEPS, type FeatureWallSetupStepId -} from '../../../../shared/feature-wall-setup-steps' +} from '../../../../shared/feature-education/explore/feature-wall-setup-steps' import type { FeatureWallSetupProgress } from '../feature-wall/setup/feature-wall-setup-progress' export function useSetupGuideBrowserMilestoneProgress( diff --git a/src/renderer/src/components/setup-guide/use-setup-guide-telemetry.ts b/src/renderer/src/components/setup-guide/use-setup-guide-telemetry.ts index 617fefaca74..36ae8fbcef4 100644 --- a/src/renderer/src/components/setup-guide/use-setup-guide-telemetry.ts +++ b/src/renderer/src/components/setup-guide/use-setup-guide-telemetry.ts @@ -4,8 +4,8 @@ import { getFirstIncompleteFeatureWallSetupStepId, getFeatureWallSetupSteps, type FeatureWallSetupStepId -} from '../../../../shared/feature-wall-setup-steps' -import type { SetupGuideSource } from '../../../../shared/feature-education-telemetry' +} from '../../../../shared/feature-education/explore/feature-wall-setup-steps' +import type { SetupGuideSource } from '../../../../shared/feature-education/feature-education-telemetry' import type { FeatureWallSetupProgress } from '../feature-wall/setup/feature-wall-setup-progress' import { persistEmittedSetupGuideStepId, diff --git a/src/renderer/src/components/shared/MacFolderAccessFixDialog.tsx b/src/renderer/src/components/shared/MacFolderAccessFixDialog.tsx index 300d37997b3..51bc042c51f 100644 --- a/src/renderer/src/components/shared/MacFolderAccessFixDialog.tsx +++ b/src/renderer/src/components/shared/MacFolderAccessFixDialog.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useState } from 'react' import { CircleCheck, CircleDashed, LoaderCircle } from 'lucide-react' import type { PtyManagementFolderAccessMismatch } from '../../../../preload/api/terminal/pty-management-api' -import { isMacTccFolderClass } from '../../../../shared/daemon-adoption-telemetry' +import { isMacTccFolderClass } from '../../../../shared/telemetry/daemon-adoption-telemetry' import { useMountedRef } from '@/hooks/useMountedRef' import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/shared/mac-folder-access-folder-name.ts b/src/renderer/src/components/shared/mac-folder-access-folder-name.ts index f469a0b1ce8..f1168abc309 100644 --- a/src/renderer/src/components/shared/mac-folder-access-folder-name.ts +++ b/src/renderer/src/components/shared/mac-folder-access-folder-name.ts @@ -1,4 +1,4 @@ -import type { DaemonPtyCwdClass } from '../../../../shared/daemon-adoption-telemetry' +import type { DaemonPtyCwdClass } from '../../../../shared/telemetry/daemon-adoption-telemetry' import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/sidebar/SetupGuideSidebarEntry.tsx b/src/renderer/src/components/sidebar/SetupGuideSidebarEntry.tsx index efe735fbaff..1453b024904 100644 --- a/src/renderer/src/components/sidebar/SetupGuideSidebarEntry.tsx +++ b/src/renderer/src/components/sidebar/SetupGuideSidebarEntry.tsx @@ -12,7 +12,7 @@ import { import { getFirstIncompleteFeatureWallSetupStepId, type FeatureWallSetupStepId -} from '../../../../shared/feature-wall-setup-steps' +} from '../../../../shared/feature-education/explore/feature-wall-setup-steps' import type { FeatureWallSetupProgress } from '../feature-wall/setup/feature-wall-setup-progress' import { SetupGuideProgressRing } from '../setup-guide/SetupGuideProgressRing' import { useSetupGuideProgress } from '../setup-guide/use-setup-guide-progress' diff --git a/src/renderer/src/components/sidebar/SidebarToolbar.tsx b/src/renderer/src/components/sidebar/SidebarToolbar.tsx index ca55a74416b..6f03dec4c18 100644 --- a/src/renderer/src/components/sidebar/SidebarToolbar.tsx +++ b/src/renderer/src/components/sidebar/SidebarToolbar.tsx @@ -7,7 +7,7 @@ import { ScrollToCurrentWorkspaceToolbarButton } from './worktree-list/navigatio import { SidebarSettingsHelpMenu } from './SidebarSettingsHelpMenu' import { useTranslate } from '@/i18n/use-translate' import { useAppStore } from '@/store' -import { hasFeatureInteraction } from '../../../../shared/feature-interactions' +import { hasFeatureInteraction } from '../../../../shared/feature-education/interactions/feature-interactions' const WORKSPACE_BOARD_MOVED_HINT_STORAGE_KEY = 'orca.workspaceBoardMovedHintSeen.v1' const WORKSPACE_BOARD_MOVED_HINT_DURATION_MS = 12000 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 35838b00b5c..5f5f9c2676c 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 @@ -1,10 +1,8 @@ import { useAppStore } from '@/store/index' import { activateAndRevealWorktree } from '@/lib/workspace/activation/worktree-activation' import { track } from '@/diagnostics/telemetry/telemetry' -import type { - AddRepoDefaultCheckoutHandoffSource, - EventProps -} from '../../../../../../shared/telemetry-events' +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 { markOnboardingProjectAdded } from '@/components/onboarding/onboarding-project-checklist' diff --git a/src/renderer/src/components/sidebar/project-admission/completion/use-complete-git-repo-add.ts b/src/renderer/src/components/sidebar/project-admission/completion/use-complete-git-repo-add.ts index ccbd16871f7..001fcc7eec6 100644 --- a/src/renderer/src/components/sidebar/project-admission/completion/use-complete-git-repo-add.ts +++ b/src/renderer/src/components/sidebar/project-admission/completion/use-complete-git-repo-add.ts @@ -1,7 +1,7 @@ import { useCallback, useRef } from 'react' import { useAppStore } from '@/store/index' import { track } from '@/diagnostics/telemetry/telemetry' -import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry-events' +import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import { buildAddRepoExistingWorkspacesTelemetry, shouldTrackAddRepoExistingWorkspacesDetected diff --git a/src/renderer/src/components/sidebar/project-admission/dialog/add-repo-existing-workspaces-telemetry.ts b/src/renderer/src/components/sidebar/project-admission/dialog/add-repo-existing-workspaces-telemetry.ts index 682fb5f4f62..e94d9f75485 100644 --- a/src/renderer/src/components/sidebar/project-admission/dialog/add-repo-existing-workspaces-telemetry.ts +++ b/src/renderer/src/components/sidebar/project-admission/dialog/add-repo-existing-workspaces-telemetry.ts @@ -1,5 +1,5 @@ -import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry-events' -import type { EventProps } from '../../../../../../shared/telemetry-event-classification' +import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' +import type { EventProps } from '../../../../../../shared/telemetry/telemetry-event-classification' import type { Worktree } from '../../../../../../shared/worktree/types' import { compareWorktreeDisplayName } from '@/lib/workspace/display/worktree-display-name-order' diff --git a/src/renderer/src/components/sidebar/project-admission/dialog/add-repo-local-path-batch.ts b/src/renderer/src/components/sidebar/project-admission/dialog/add-repo-local-path-batch.ts index db5388dc9a2..92c90958c40 100644 --- a/src/renderer/src/components/sidebar/project-admission/dialog/add-repo-local-path-batch.ts +++ b/src/renderer/src/components/sidebar/project-admission/dialog/add-repo-local-path-batch.ts @@ -1,7 +1,7 @@ import { useEffect, type RefObject } from 'react' import { toast } from 'sonner' import { isGitRepoKind } from '../../../../../../shared/repo-kind' -import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry-events' +import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { ExecutionHostId } from '../../../../../../shared/execution-host' import type { Repo } from '../../../../../../shared/repo-types' import { showSkippedBatchFoldersToast } from '../completion/add-repo-skipped-folders-toast' diff --git a/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoCloneFlow.ts b/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoCloneFlow.ts index 520b37243b1..f5826732f8b 100644 --- a/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoCloneFlow.ts +++ b/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoCloneFlow.ts @@ -1,7 +1,7 @@ import { useCallback, useEffect, useRef, useState, type Dispatch, type SetStateAction } from 'react' import { toast } from 'sonner' import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' -import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry-events' +import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { Repo } from '../../../../../../shared/repo-types' import { getCloneDestinationAutoFill } from '../create/clone-defaults' import type { AddRepoDialogStep } from './add-repo-dialog-types' diff --git a/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoLocalFolderFlow.ts b/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoLocalFolderFlow.ts index 3e7aa41acc2..6ce70276e50 100644 --- a/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoLocalFolderFlow.ts +++ b/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoLocalFolderFlow.ts @@ -5,8 +5,8 @@ import { isGitRepoKind } from '../../../../../../shared/repo-kind' import { buildNestedRepoScanTelemetry, createNestedRepoTelemetryAttemptId -} from '../../../../../../shared/nested-repo-telemetry' -import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry-events' +} from '../../../../../../shared/telemetry/nested-repo-telemetry' +import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { WorktreeFetchOptions } from '@/store/slices/worktrees/listing/worktree-fetch-options' import type { RepoSlice } from '@/store/repos/repo-state' import type { AppState } from '@/store/types' diff --git a/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoServerPathFlow.ts b/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoServerPathFlow.ts index f4b3cb0a203..3845d78e44b 100644 --- a/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoServerPathFlow.ts +++ b/src/renderer/src/components/sidebar/project-admission/dialog/useAddRepoServerPathFlow.ts @@ -5,8 +5,8 @@ import { buildNestedRepoScanTelemetry, createNestedRepoTelemetryAttemptId, type NestedRepoTelemetryRuntimeKind -} from '../../../../../../shared/nested-repo-telemetry' -import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry-events' +} from '../../../../../../shared/telemetry/nested-repo-telemetry' +import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { NestedRepoScanResult } from '../../../../../../shared/project-group-types' import type { Repo } from '../../../../../../shared/repo-types' import type { WorktreeFetchOptions } from '@/store/slices/worktrees/listing/worktree-fetch-options' diff --git a/src/renderer/src/components/sidebar/project-admission/host-selection/AddRepoWslHostOffer.tsx b/src/renderer/src/components/sidebar/project-admission/host-selection/AddRepoWslHostOffer.tsx index b0da34f5a4e..9910252b76a 100644 --- a/src/renderer/src/components/sidebar/project-admission/host-selection/AddRepoWslHostOffer.tsx +++ b/src/renderer/src/components/sidebar/project-admission/host-selection/AddRepoWslHostOffer.tsx @@ -5,7 +5,7 @@ import { useTranslate } from '@/i18n/use-translate' import { readIpcErrorDetail } from '@/runtime/errors/ipc-error' import { addOnThisComputerLabel } from '@/lib/workspace/creation/wsl-host-windows-drive-refusal-toast' import { useAppStore } from '@/store/index' -import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry-events' +import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import { addWslHostDistro } from '../../host-admission/wsl/add-wsl-host-distro' import { wslHostAddRefusalMessage } from '../../wsl-host-failure-text' import { diff --git a/src/renderer/src/components/sidebar/project-admission/host-selection/use-add-repo-windows-drive-refusal.tsx b/src/renderer/src/components/sidebar/project-admission/host-selection/use-add-repo-windows-drive-refusal.tsx index 71a0228587c..f29b6d23c25 100644 --- a/src/renderer/src/components/sidebar/project-admission/host-selection/use-add-repo-windows-drive-refusal.tsx +++ b/src/renderer/src/components/sidebar/project-admission/host-selection/use-add-repo-windows-drive-refusal.tsx @@ -4,7 +4,7 @@ import { type ExecutionHostId } from '../../../../../../shared/execution-host' import type { WslHostWindowsDriveRefusal } from '../../../../../../shared/remote-runtime/wsl-hosts/wsl-host-windows-drive-refusal' -import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry-events' +import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import { isWindowsDesktopClient } from '@/lib/files/os-open/windows-path-access' import type { AddRepoDialogStep } from '../dialog/add-repo-dialog-types' import { AddRepoWindowsDriveNotice } from './AddRepoWindowsDriveNotice' diff --git a/src/renderer/src/components/sidebar/project-admission/host-selection/use-add-repo-wsl-host-offer.tsx b/src/renderer/src/components/sidebar/project-admission/host-selection/use-add-repo-wsl-host-offer.tsx index d790f6f77e3..199c890ad4c 100644 --- a/src/renderer/src/components/sidebar/project-admission/host-selection/use-add-repo-wsl-host-offer.tsx +++ b/src/renderer/src/components/sidebar/project-admission/host-selection/use-add-repo-wsl-host-offer.tsx @@ -4,7 +4,7 @@ import { LOCAL_EXECUTION_HOST_ID, type ExecutionHostId } from '../../../../../../shared/execution-host' -import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry-events' +import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import { AddRepoWslHostOffer } from './AddRepoWslHostOffer' import { AddRepoExistingWslHostOffer } from './AddRepoExistingWslHostOffer' import type { DroppedHostPath } from './add-repo-wsl-host-folder-picker' diff --git a/src/renderer/src/components/sidebar/project-admission/nested-import/track-nested-folder-open.ts b/src/renderer/src/components/sidebar/project-admission/nested-import/track-nested-folder-open.ts index bcb7b115fa9..3a7554cdd24 100644 --- a/src/renderer/src/components/sidebar/project-admission/nested-import/track-nested-folder-open.ts +++ b/src/renderer/src/components/sidebar/project-admission/nested-import/track-nested-folder-open.ts @@ -2,7 +2,7 @@ import { track } from '@/diagnostics/telemetry/telemetry' import { buildNestedRepoImportActionTelemetry, type NestedRepoTelemetryRuntimeKind -} from '../../../../../../shared/nested-repo-telemetry' +} from '../../../../../../shared/telemetry/nested-repo-telemetry' import type { NestedRepoScanResult } from '../../../../../../shared/project-group-types' export function trackNestedFolderOpen(args: { diff --git a/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedImportFlow.ts b/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedImportFlow.ts index c5d1e8ade27..bda0afe3aaa 100644 --- a/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedImportFlow.ts +++ b/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedImportFlow.ts @@ -8,8 +8,8 @@ import { buildNestedRepoImportResultTelemetry, shouldEmitNestedRepoImportSubmitTelemetry, type NestedRepoTelemetryRuntimeKind -} from '../../../../../../shared/nested-repo-telemetry' -import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry-events' +} from '../../../../../../shared/telemetry/nested-repo-telemetry' +import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { NestedRepoScanResult, ProjectGroupImportResult diff --git a/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedReviewController.ts b/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedReviewController.ts index 545626e6f52..9e682f080e1 100644 --- a/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedReviewController.ts +++ b/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedReviewController.ts @@ -1,5 +1,5 @@ import type { Dispatch, SetStateAction } from 'react' -import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry-events' +import type { AddRepoExistingWorkspaceSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { ProjectGroupImportResult } from '../../../../../../shared/project-group-types' import type { WorktreeFetchOptions } from '@/store/slices/worktrees/listing/worktree-fetch-options' import { useAddRepoNestedImportFlow } from './useAddRepoNestedImportFlow' diff --git a/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedReviewState.ts b/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedReviewState.ts index 758e8d4b1ae..386ec7a7944 100644 --- a/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedReviewState.ts +++ b/src/renderer/src/components/sidebar/project-admission/nested-import/useAddRepoNestedReviewState.ts @@ -1,5 +1,5 @@ import { useCallback, useRef, useState, type Dispatch, type SetStateAction } from 'react' -import type { NestedRepoTelemetryRuntimeKind } from '../../../../../../shared/nested-repo-telemetry' +import type { NestedRepoTelemetryRuntimeKind } from '../../../../../../shared/telemetry/nested-repo-telemetry' import type { NestedRepoScanResult } from '../../../../../../shared/project-group-types' import { defaultProjectGroupNameForPath, diff --git a/src/renderer/src/components/sidebar/sidebar-feedback/SidebarFeedbackDialog.tsx b/src/renderer/src/components/sidebar/sidebar-feedback/SidebarFeedbackDialog.tsx index 402c474191e..ea438db8d89 100644 --- a/src/renderer/src/components/sidebar/sidebar-feedback/SidebarFeedbackDialog.tsx +++ b/src/renderer/src/components/sidebar/sidebar-feedback/SidebarFeedbackDialog.tsx @@ -20,7 +20,7 @@ import { hasAttachableFeedbackImage } from '@/components/sidebar/sidebar-feedback/feedback-image-attachments' import { stripClientEnvironmentFooter } from '../../../../../shared/client-environment-info' -import { FEEDBACK_PAYLOAD_TOO_LARGE_STATUS } from '../../../../../shared/feedback-image-limits' +import { FEEDBACK_PAYLOAD_TOO_LARGE_STATUS } from '../../../../../shared/feedback/feedback-image-limits' import { SidebarFeedbackImageAttachments } from './SidebarFeedbackImageAttachments' import { useSidebarFeedbackEnvironmentPrefill } from './use-sidebar-feedback-environment-prefill' import { useSidebarFeedbackImages } from './use-sidebar-feedback-images' diff --git a/src/renderer/src/components/sidebar/sidebar-feedback/SidebarFeedbackImageAttachments.tsx b/src/renderer/src/components/sidebar/sidebar-feedback/SidebarFeedbackImageAttachments.tsx index 54bd78d59d7..5d5a2184eed 100644 --- a/src/renderer/src/components/sidebar/sidebar-feedback/SidebarFeedbackImageAttachments.tsx +++ b/src/renderer/src/components/sidebar/sidebar-feedback/SidebarFeedbackImageAttachments.tsx @@ -11,7 +11,7 @@ import { import { MAX_FEEDBACK_IMAGE_COUNT, MAX_FEEDBACK_IMAGE_TOTAL_BYTES -} from '../../../../../shared/feedback-image-limits' +} from '../../../../../shared/feedback/feedback-image-limits' // Delay progress hints to avoid flashing during fast unshrunk reads. const PREPARING_HINT_DELAY_MS = 250 diff --git a/src/renderer/src/components/sidebar/sidebar-feedback/feedback-image-attachments.ts b/src/renderer/src/components/sidebar/sidebar-feedback/feedback-image-attachments.ts index 23c8e59aec9..1d27c909f17 100644 --- a/src/renderer/src/components/sidebar/sidebar-feedback/feedback-image-attachments.ts +++ b/src/renderer/src/components/sidebar/sidebar-feedback/feedback-image-attachments.ts @@ -9,7 +9,7 @@ import { MAX_FEEDBACK_IMAGE_BYTES, MAX_FEEDBACK_IMAGE_COUNT, MAX_FEEDBACK_IMAGE_TOTAL_BYTES -} from '../../../../../shared/feedback-image-limits' +} from '../../../../../shared/feedback/feedback-image-limits' import { shrinkFeedbackImage } from './feedback-image-shrink' export const SUPPORTED_FEEDBACK_IMAGE_TYPES = [ diff --git a/src/renderer/src/components/sidebar/workspace-creation/folder/folder-workspace-composer-submit-input.ts b/src/renderer/src/components/sidebar/workspace-creation/folder/folder-workspace-composer-submit-input.ts index 708fb322093..f184e7971e2 100644 --- a/src/renderer/src/components/sidebar/workspace-creation/folder/folder-workspace-composer-submit-input.ts +++ b/src/renderer/src/components/sidebar/workspace-creation/folder/folder-workspace-composer-submit-input.ts @@ -4,7 +4,7 @@ import type { AgentStartupSettings } from '../../../../../../shared/agent-launch import type { AgentLaunchInputViews } from '../../../../../../shared/agent-launch/choices/agent-launch-choices' import type { ProjectGroup } from '../../../../../../shared/project-group-types' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' -import type { LaunchSource } from '../../../../../../shared/telemetry-events' +import type { LaunchSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { TaskSourceContext } from '../../../../../../shared/work-items/task-source-context' import type { diff --git a/src/renderer/src/components/sidebar/worktree-list/controls/use-projects-collapse-all-announcement.ts b/src/renderer/src/components/sidebar/worktree-list/controls/use-projects-collapse-all-announcement.ts index 5ec600dbd40..5cfc1c1e514 100644 --- a/src/renderer/src/components/sidebar/worktree-list/controls/use-projects-collapse-all-announcement.ts +++ b/src/renderer/src/components/sidebar/worktree-list/controls/use-projects-collapse-all-announcement.ts @@ -1,7 +1,7 @@ import { useCallback, useEffect } from 'react' import { useAppStore } from '@/store' import { isContextualTourSessionConsumed } from '@/store/slices/ui/ui-slice-tour-actions' -import { hasFeatureInteraction } from '../../../../../../shared/feature-interactions' +import { hasFeatureInteraction } from '../../../../../../shared/feature-education/interactions/feature-interactions' import { isProjectSectionGroupKey } from '../../../../../../shared/sidebar-list/sections/group-keys' const TOUR_ID = 'projects-collapse-all' diff --git a/src/renderer/src/components/sidebar/wsl-host-offer-actions.ts b/src/renderer/src/components/sidebar/wsl-host-offer-actions.ts index b8c948f9947..439b4c13703 100644 --- a/src/renderer/src/components/sidebar/wsl-host-offer-actions.ts +++ b/src/renderer/src/components/sidebar/wsl-host-offer-actions.ts @@ -1,4 +1,4 @@ -import type { AddRepoExistingWorkspaceSource } from '../../../../shared/telemetry-events' +import type { AddRepoExistingWorkspaceSource } from '../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { GlobalSettings } from '../../../../shared/global-settings-types' import type { WslHostAddResult } from '../../../../shared/remote-runtime/wsl-hosts/wsl-host-types' diff --git a/src/renderer/src/components/status-bar/host-connections/runtime-host-resources.ts b/src/renderer/src/components/status-bar/host-connections/runtime-host-resources.ts index 68806176563..d4f90d8efd3 100644 --- a/src/renderer/src/components/status-bar/host-connections/runtime-host-resources.ts +++ b/src/renderer/src/components/status-bar/host-connections/runtime-host-resources.ts @@ -4,7 +4,10 @@ import { parseExecutionHostId, toRuntimeExecutionHostId } from '../../../../../shared/execution-host' -import type { SessionMemory, WorktreeMemory } from '../../../../../shared/process-stats-types' +import type { + SessionMemory, + WorktreeMemory +} from '../../../../../shared/diagnostics/process-stats-types' import type { RuntimeHostResourceSample } from '../resources/workspace-attribution/resource-usage-merge-types' export type RuntimeHostResourceResult = diff --git a/src/renderer/src/components/status-bar/resources/popover/resource-memory-metric-copy.ts b/src/renderer/src/components/status-bar/resources/popover/resource-memory-metric-copy.ts index 2d72a8b6b14..79348b44e0a 100644 --- a/src/renderer/src/components/status-bar/resources/popover/resource-memory-metric-copy.ts +++ b/src/renderer/src/components/status-bar/resources/popover/resource-memory-metric-copy.ts @@ -1,4 +1,4 @@ -import type { ProcessMemoryMetric } from '../../../../../../shared/process-stats-types' +import type { ProcessMemoryMetric } from '../../../../../../shared/diagnostics/process-stats-types' import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' diff --git a/src/renderer/src/components/status-bar/resources/popover/resource-usage-metrics.tsx b/src/renderer/src/components/status-bar/resources/popover/resource-usage-metrics.tsx index 36cd5367370..5d7ef01b309 100644 --- a/src/renderer/src/components/status-bar/resources/popover/resource-usage-metrics.tsx +++ b/src/renderer/src/components/status-bar/resources/popover/resource-usage-metrics.tsx @@ -2,7 +2,10 @@ import React, { memo, useMemo } from 'react' import { ChevronDown, ChevronRight } from 'lucide-react' import { cn } from '@/lib/class-names' import { useTranslate } from '@/i18n/use-translate' -import type { AppMemory, UsageValues } from '../../../../../../shared/process-stats-types' +import type { + AppMemory, + UsageValues +} from '../../../../../../shared/diagnostics/process-stats-types' import type { Metric } from '../workspace-attribution/resource-usage-merge-types' export const METRIC_COLUMNS_CLS = 'flex items-center shrink-0 tabular-nums' diff --git a/src/renderer/src/components/status-bar/resources/popover/resource-usage-popover-body.tsx b/src/renderer/src/components/status-bar/resources/popover/resource-usage-popover-body.tsx index c84e919849e..cfaa6c48259 100644 --- a/src/renderer/src/components/status-bar/resources/popover/resource-usage-popover-body.tsx +++ b/src/renderer/src/components/status-bar/resources/popover/resource-usage-popover-body.tsx @@ -3,7 +3,7 @@ import { ChevronRight } from 'lucide-react' import { cn } from '@/lib/class-names' import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' -import type { MemorySnapshot } from '../../../../../../shared/process-stats-types' +import type { MemorySnapshot } from '../../../../../../shared/diagnostics/process-stats-types' import type { UnifiedProjectGroup, UnifiedSessionRow diff --git a/src/renderer/src/components/status-bar/resources/popover/resource-usage-popover-summary.fixture.tsx b/src/renderer/src/components/status-bar/resources/popover/resource-usage-popover-summary.fixture.tsx index 7c44324a16e..d81e1a65f3e 100644 --- a/src/renderer/src/components/status-bar/resources/popover/resource-usage-popover-summary.fixture.tsx +++ b/src/renderer/src/components/status-bar/resources/popover/resource-usage-popover-summary.fixture.tsx @@ -1,7 +1,7 @@ import { defineFixture } from '../../../../component-fixtures/component-fixture' import { renderResourceUsageSummary } from './resource-usage-popover-summary' import { ResourceUsageStatusSegment } from '../ResourceUsageStatusSegment' -import type { MemorySnapshot } from '../../../../../../shared/process-stats-types' +import type { MemorySnapshot } from '../../../../../../shared/diagnostics/process-stats-types' import { getResourceMemoryMetricCopy, getResourceCommitMetricCopy diff --git a/src/renderer/src/components/status-bar/resources/use-resource-usage-derived-model.ts b/src/renderer/src/components/status-bar/resources/use-resource-usage-derived-model.ts index 62e3b5b5b43..62059a4ea3e 100644 --- a/src/renderer/src/components/status-bar/resources/use-resource-usage-derived-model.ts +++ b/src/renderer/src/components/status-bar/resources/use-resource-usage-derived-model.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react' import type { AppState } from '../../../store/types' -import type { MemorySnapshot } from '../../../../../shared/process-stats-types' +import type { MemorySnapshot } from '../../../../../shared/diagnostics/process-stats-types' import type { Worktree } from '../../../../../shared/worktree/types' import { getRepoExecutionHostId, parseExecutionHostId } from '../../../../../shared/execution-host' import { mergeSnapshotAndSessions } from './workspace-attribution/merge-snapshot-and-sessions' diff --git a/src/renderer/src/components/status-bar/resources/workspace-attribution/merge-snapshot-and-sessions.ts b/src/renderer/src/components/status-bar/resources/workspace-attribution/merge-snapshot-and-sessions.ts index db4544ca2d1..64a870bfcef 100644 --- a/src/renderer/src/components/status-bar/resources/workspace-attribution/merge-snapshot-and-sessions.ts +++ b/src/renderer/src/components/status-bar/resources/workspace-attribution/merge-snapshot-and-sessions.ts @@ -1,6 +1,9 @@ /** Merge local/paired-host samples and daemon sessions by project/workspace; unsampled metrics are null and paired rows are read-only. */ -import type { MemorySnapshot, WorktreeMemory } from '../../../../../../shared/process-stats-types' +import type { + MemorySnapshot, + WorktreeMemory +} from '../../../../../../shared/diagnostics/process-stats-types' import { parsePtySessionId } from '../../../../../../shared/terminal/pty/lifecycle/pty-session-id-format' import { getRepoIdFromWorktreeId } from '../../../../../../shared/worktree/id' import type { diff --git a/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-session-labels.ts b/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-session-labels.ts index 657c59f0667..46eefc609c4 100644 --- a/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-session-labels.ts +++ b/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-session-labels.ts @@ -1,4 +1,4 @@ -import type { SessionMemory } from '../../../../../../shared/process-stats-types' +import type { SessionMemory } from '../../../../../../shared/diagnostics/process-stats-types' import { parsePaneKey as parseStablePaneKey } from '../../../../../../shared/workspace-layout/stable-pane-id' import { getWorktreePathBasenameFromId } from '../../../../../../shared/worktree/id' import { translate } from '@/i18n/i18n' diff --git a/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-usage-folder-merge.test.ts b/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-usage-folder-merge.test.ts index b693ef3694c..f26c446e101 100644 --- a/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-usage-folder-merge.test.ts +++ b/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-usage-folder-merge.test.ts @@ -1,5 +1,8 @@ import { describe, expect, it } from 'vitest' -import type { MemorySnapshot, WorktreeMemory } from '../../../../../../shared/process-stats-types' +import type { + MemorySnapshot, + WorktreeMemory +} from '../../../../../../shared/diagnostics/process-stats-types' import type { Worktree } from '../../../../../../shared/worktree/types' import type { MergeContext } from './resource-usage-merge-types' import { mergeSnapshotAndSessions } from './merge-snapshot-and-sessions' diff --git a/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-usage-merge-types.ts b/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-usage-merge-types.ts index 8278f651588..c87c9fb07a5 100644 --- a/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-usage-merge-types.ts +++ b/src/renderer/src/components/status-bar/resources/workspace-attribution/resource-usage-merge-types.ts @@ -1,5 +1,5 @@ import type { BrowserWorkspace } from '../../../../../../shared/browser/workspaces/browser-workspace-types' -import type { WorktreeMemory } from '../../../../../../shared/process-stats-types' +import type { WorktreeMemory } from '../../../../../../shared/diagnostics/process-stats-types' import type { TerminalLayoutSnapshot, TerminalTab diff --git a/src/renderer/src/components/tab-bar/QuickLaunchButton.tsx b/src/renderer/src/components/tab-bar/QuickLaunchButton.tsx index 2e4a5e20d0a..ba38e105add 100644 --- a/src/renderer/src/components/tab-bar/QuickLaunchButton.tsx +++ b/src/renderer/src/components/tab-bar/QuickLaunchButton.tsx @@ -32,7 +32,7 @@ import { useOptionalShortcutLabel } from '@/hooks/useShortcutLabel' import { useAgentMenuShortcutLabels } from './agent-menu-shortcut-labels' import type { AgentPickerInventorySource } from '../agent/use-agent-launch-picker-inventory' import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent' -import type { LaunchSource } from '../../../../shared/telemetry-events' +import type { LaunchSource } from '../../../../shared/telemetry/schemas/telemetry-property-schemas' import { translate } from '@/i18n/i18n' import { useTranslate } from '@/i18n/use-translate' import { useUiLanguageRevision } from '@/i18n/use-ui-language-revision' diff --git a/src/renderer/src/components/tab-bar/shell-icons.tsx b/src/renderer/src/components/tab-bar/shell-icons.tsx index b3a376525ea..565e41fbc8f 100644 --- a/src/renderer/src/components/tab-bar/shell-icons.tsx +++ b/src/renderer/src/components/tab-bar/shell-icons.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { WINDOWS_GIT_BASH_SHELL } from '../../../../shared/windows-terminal-shell' +import { WINDOWS_GIT_BASH_SHELL } from '../../../../shared/shell/launch/windows-terminal-shell' import { useTranslate } from '@/i18n/use-translate' import gitForWindowsLogoUrl from '../../../../../resources/gwindows_logo.svg?url' diff --git a/src/renderer/src/components/tab-bar/tab-bar-windows-shell-options.ts b/src/renderer/src/components/tab-bar/tab-bar-windows-shell-options.ts index 0baca66c0c1..0d3a74ba4f0 100644 --- a/src/renderer/src/components/tab-bar/tab-bar-windows-shell-options.ts +++ b/src/renderer/src/components/tab-bar/tab-bar-windows-shell-options.ts @@ -1,5 +1,5 @@ -import type { BuiltInWindowsTerminalShell } from '../../../../shared/windows-terminal-shell' -import { WINDOWS_GIT_BASH_SHELL } from '../../../../shared/windows-terminal-shell' +import type { BuiltInWindowsTerminalShell } from '../../../../shared/shell/launch/windows-terminal-shell' +import { WINDOWS_GIT_BASH_SHELL } from '../../../../shared/shell/launch/windows-terminal-shell' import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' import type { getProjectRuntimeShellMenuMode } from './use-tab-bar-runtime-model' diff --git a/src/renderer/src/components/tab-bar/tab-create-menu-options.ts b/src/renderer/src/components/tab-bar/tab-create-menu-options.ts index 3d882dc2999..3160b3e0a52 100644 --- a/src/renderer/src/components/tab-bar/tab-create-menu-options.ts +++ b/src/renderer/src/components/tab-bar/tab-create-menu-options.ts @@ -1,7 +1,7 @@ import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' import { normalizeMatchQuery, scoreQueryTokens } from './query-token-match' -import type { BuiltInWindowsTerminalShell } from '../../../../shared/windows-terminal-shell' +import type { BuiltInWindowsTerminalShell } from '../../../../shared/shell/launch/windows-terminal-shell' import { isClipboardTextByteLengthOverLimit } from '../../../../shared/clipboard-text' export type TabCreateMenuOptionKind = diff --git a/src/renderer/src/components/tab-bar/windows-shell-launch.ts b/src/renderer/src/components/tab-bar/windows-shell-launch.ts index 4697064468c..600df5a45d0 100644 --- a/src/renderer/src/components/tab-bar/windows-shell-launch.ts +++ b/src/renderer/src/components/tab-bar/windows-shell-launch.ts @@ -1,4 +1,4 @@ -import type { BuiltInWindowsTerminalShell } from '../../../../shared/windows-terminal-shell' +import type { BuiltInWindowsTerminalShell } from '../../../../shared/shell/launch/windows-terminal-shell' export function resolveWindowsShellLaunchTarget( shell: BuiltInWindowsTerminalShell, diff --git a/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-completion.ts b/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-completion.ts index 22d84636669..7c93b86b22a 100644 --- a/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-completion.ts +++ b/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-completion.ts @@ -1,6 +1,6 @@ import { trackTerminalPaneSplit } from '@/diagnostics/telemetry/feature-education-telemetry' import { useAppStore } from '@/store/index' -import type { TerminalPaneSplitSource } from '../../../../../../shared/feature-education-telemetry' +import type { TerminalPaneSplitSource } from '../../../../../../shared/feature-education/feature-education-telemetry' export type TerminalPaneSplitCompletion = { source: TerminalPaneSplitSource diff --git a/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-in-main.ts b/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-in-main.ts index e3eeb63cf11..321d089be37 100644 --- a/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-in-main.ts +++ b/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-in-main.ts @@ -1,5 +1,5 @@ // Main writes/starts splits under the window pane ID; frame reconciliation draws and attaches its terminal. -import type { TerminalPaneSplitSource } from '../../../../../../shared/feature-education-telemetry' +import type { TerminalPaneSplitSource } from '../../../../../../shared/feature-education/feature-education-telemetry' import { runtimeEnvironmentIdUnlessTwin } from '@/lib/workspace/ownership/resolve-owner' import { mintStablePaneId } from '@/lib/pane-manager/pane-layout/mint-stable-pane-id' import { refusalActsAsToday } from '@/runtime/workspace-layout/commands/layout-apply-send' diff --git a/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-with-inherited-cwd.ts b/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-with-inherited-cwd.ts index 577eebdb748..c29ee112322 100644 --- a/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-with-inherited-cwd.ts +++ b/src/renderer/src/components/terminal-pane/layout/split/terminal-pane-split-with-inherited-cwd.ts @@ -1,4 +1,4 @@ -import type { TerminalPaneSplitSource } from '../../../../../../shared/feature-education-telemetry' +import type { TerminalPaneSplitSource } from '../../../../../../shared/feature-education/feature-education-telemetry' import type { ManagedPane } from '@/lib/pane-manager/pane-manager-types' import type { PaneManager } from '@/lib/pane-manager/pane-manager' import { splitWebRuntimeTerminal } from '@/runtime/hosted-terminals/actions/web-runtime-terminal-split' diff --git a/src/renderer/src/components/terminal-pane/parking/verdict/terminal-park-verdict-flip-telemetry.ts b/src/renderer/src/components/terminal-pane/parking/verdict/terminal-park-verdict-flip-telemetry.ts index 3b227f7edb0..da4c878e01b 100644 --- a/src/renderer/src/components/terminal-pane/parking/verdict/terminal-park-verdict-flip-telemetry.ts +++ b/src/renderer/src/components/terminal-pane/parking/verdict/terminal-park-verdict-flip-telemetry.ts @@ -1,6 +1,6 @@ /** Damp rendered park oscillation by retaining panes: bursts threaten React #185, sustained flips repeatedly remount/replay. This bounds churn without fixing its unknown driver; apply pins to all rendered tabs, including non-cold-park drivers. Retention force-park bypasses sustained pins, never burst protection. */ import { recordRendererCrashBreadcrumb } from '@/diagnostics/crash-reporting/crash-breadcrumb-recorder' -import { REACT_NESTED_UPDATE_LIMIT } from '../../../../../../shared/react-update-depth-attribution' +import { REACT_NESTED_UPDATE_LIMIT } from '../../../../../../shared/crash-reporting/react-update-depth-attribution' export const TERMINAL_TAB_PARK_FLIP_WINDOW_MS = 60_000 /** Flips per window that no sane park policy should reach. */ diff --git a/src/renderer/src/components/terminal-pane/pty-connection/agent-identity/foreground-process/pane-foreground-agent-tracker.ts b/src/renderer/src/components/terminal-pane/pty-connection/agent-identity/foreground-process/pane-foreground-agent-tracker.ts index 019bc9ac319..71f29e3367c 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection/agent-identity/foreground-process/pane-foreground-agent-tracker.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection/agent-identity/foreground-process/pane-foreground-agent-tracker.ts @@ -7,7 +7,7 @@ import { resolveCompatibleAgentTypeForOwner } from '../../../../../../../shared/ import { isShellProcess } from '../../../../../../../shared/agent-status/process/shell-process-detection' import type { TerminalAgent } from '../../../../../../../shared/agent-status/identity/terminal-agent' import { createPaneForegroundProcessReader } from './pane-foreground-process-reader' -import { FOREGROUND_COMMAND_READS } from '../../../../../../../shared/foreground-command-settle' +import { FOREGROUND_COMMAND_READS } from '../../../../../../../shared/terminal/pty/foreground/foreground-command-settle' import type { ForegroundReadReason, PaneForegroundAgentTrackerDeps diff --git a/src/renderer/src/components/terminal-pane/pty-connection/startup/pty-pane-startup.ts b/src/renderer/src/components/terminal-pane/pty-connection/startup/pty-pane-startup.ts index cda3849bd5e..0423f5a1c72 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection/startup/pty-pane-startup.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection/startup/pty-pane-startup.ts @@ -1,5 +1,5 @@ import type { FreshWorkspaceAgentLaunch } from '@/lib/workspace/creation/worktree-startup-payload' -import type { EventProps } from '../../../../../../shared/telemetry-event-classification' +import type { EventProps } from '../../../../../../shared/telemetry/telemetry-event-classification' import type { StartupCommandDelivery } from '../../../../../../shared/agent-launch/startup/codex-startup-delivery' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' import type { diff --git a/src/renderer/src/components/terminal-pane/pty-transport/pty-transport-types.ts b/src/renderer/src/components/terminal-pane/pty-transport/pty-transport-types.ts index 869a0274fc9..9495712f591 100644 --- a/src/renderer/src/components/terminal-pane/pty-transport/pty-transport-types.ts +++ b/src/renderer/src/components/terminal-pane/pty-transport/pty-transport-types.ts @@ -18,7 +18,7 @@ import type { } from '../../../../../shared/agent-session/agent-session-host-authority' import type { StartupCommandDelivery } from '../../../../../shared/agent-launch/startup/codex-startup-delivery' import type { ProjectExecutionRuntimeResolution } from '../../../../../shared/execution-host/project-execution-runtime' -import type { EventProps } from '../../../../../shared/telemetry-event-classification' +import type { EventProps } from '../../../../../shared/telemetry/telemetry-event-classification' import type { TerminalInputKind } from '../../../../../shared/terminal/input/terminal-input-kind' import type { TerminalOscColorQueryReplyColors } from '../../../../../shared/terminal/protocol/queries/terminal-osc-color-reply' import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent' diff --git a/src/renderer/src/components/use-terminal-workspace-projection.ts b/src/renderer/src/components/use-terminal-workspace-projection.ts index 1741c084eb6..b17041b908a 100644 --- a/src/renderer/src/components/use-terminal-workspace-projection.ts +++ b/src/renderer/src/components/use-terminal-workspace-projection.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useMemo } from 'react' import { useAppStore } from '../store' -import { hasFeatureInteraction } from '../../../shared/feature-interactions' +import { hasFeatureInteraction } from '../../../shared/feature-education/interactions/feature-interactions' import { setForegroundTerminalTabIds } from '@/components/terminal-pane/parking/retention/foreground-terminal-tabs' import { useClientHostedBrowserRows } from '@/runtime/browser/client-hosting/client-hosted-browser-row-state' import { useTerminalProviderSnapshotCapability } from './terminal/use-terminal-provider-snapshot-capability' diff --git a/src/renderer/src/constants/terminal.ts b/src/renderer/src/constants/terminal.ts index 8dde47fee8b..7b3dbf5f188 100644 --- a/src/renderer/src/constants/terminal.ts +++ b/src/renderer/src/constants/terminal.ts @@ -1,4 +1,4 @@ -import type { TerminalPaneSplitSource } from '../../../shared/feature-education-telemetry' +import type { TerminalPaneSplitSource } from '../../../shared/feature-education/feature-education-telemetry' import type { TerminalTabCloseIntent } from '@/components/terminal/terminal-tab-close-intent' export const TOGGLE_TERMINAL_PANE_EXPAND_EVENT = 'orca-toggle-terminal-pane-expand' diff --git a/src/renderer/src/diagnostics/crash-reporting/crash-breadcrumb-data.ts b/src/renderer/src/diagnostics/crash-reporting/crash-breadcrumb-data.ts index 519b6010370..415df699fdb 100644 --- a/src/renderer/src/diagnostics/crash-reporting/crash-breadcrumb-data.ts +++ b/src/renderer/src/diagnostics/crash-reporting/crash-breadcrumb-data.ts @@ -2,7 +2,7 @@ import type { CrashReportBreadcrumbData, CrashReportDetailValue -} from '../../../../shared/crash-reporting' +} from '../../../../shared/crash-reporting/crash-reporting' const BYTES_PER_MEGABYTE = 1024 * 1024 diff --git a/src/renderer/src/diagnostics/crash-reporting/crash-breadcrumb-recorder.ts b/src/renderer/src/diagnostics/crash-reporting/crash-breadcrumb-recorder.ts index a449ed48ffd..ef4ef6a951c 100644 --- a/src/renderer/src/diagnostics/crash-reporting/crash-breadcrumb-recorder.ts +++ b/src/renderer/src/diagnostics/crash-reporting/crash-breadcrumb-recorder.ts @@ -1,4 +1,4 @@ -import type { CrashReportBreadcrumbData } from '../../../../shared/crash-reporting' +import type { CrashReportBreadcrumbData } from '../../../../shared/crash-reporting/crash-reporting' // Keep free of value imports/import.meta: Playwright collection reaches terminal constants but cannot load crash-diagnostics and its webview chain. diff --git a/src/renderer/src/diagnostics/crash-reporting/react-error-boundary-reporting.ts b/src/renderer/src/diagnostics/crash-reporting/react-error-boundary-reporting.ts index 2a6218d869f..4dd7ec85a88 100644 --- a/src/renderer/src/diagnostics/crash-reporting/react-error-boundary-reporting.ts +++ b/src/renderer/src/diagnostics/crash-reporting/react-error-boundary-reporting.ts @@ -2,8 +2,8 @@ import type React from 'react' import type { CrashReportRecord, ReactErrorBoundaryReportArgs -} from '../../../../shared/crash-reporting' -import { getReactErrorBoundaryAttribution } from '../../../../shared/react-update-depth-attribution' +} from '../../../../shared/crash-reporting/crash-reporting' +import { getReactErrorBoundaryAttribution } from '../../../../shared/crash-reporting/react-update-depth-attribution' type RendererErrorContext = Pick< ReactErrorBoundaryReportArgs, diff --git a/src/renderer/src/diagnostics/memory/renderer-memory-sampling.ts b/src/renderer/src/diagnostics/memory/renderer-memory-sampling.ts index ccecda0b49c..b030bfbaf1a 100644 --- a/src/renderer/src/diagnostics/memory/renderer-memory-sampling.ts +++ b/src/renderer/src/diagnostics/memory/renderer-memory-sampling.ts @@ -1,6 +1,6 @@ /** Emit periodic renderer_memory samples and one-shot renderer_memory_highwater subsystem censuses. */ -import type { CrashReportDetailValue } from '../../../../shared/crash-reporting' -import type { RendererProcessMemory } from '../../../../shared/renderer-process-memory' +import type { CrashReportDetailValue } from '../../../../shared/crash-reporting/crash-reporting' +import type { RendererProcessMemory } from '../../../../shared/crash-reporting/renderer-process-memory' import { getBrowserWebviewMemoryProfile, type BrowserWebviewMemoryProfile diff --git a/src/renderer/src/diagnostics/react-commits/react-commit-cascade-store-write-samples.ts b/src/renderer/src/diagnostics/react-commits/react-commit-cascade-store-write-samples.ts index 41a74adce4a..b543d59ab73 100644 --- a/src/renderer/src/diagnostics/react-commits/react-commit-cascade-store-write-samples.ts +++ b/src/renderer/src/diagnostics/react-commits/react-commit-cascade-store-write-samples.ts @@ -1,4 +1,4 @@ -/** Sample the writes driving suspected cascades; React #185’s reported fiber is often a bystander. Unarmed writes read only a flag, per-cascade capture is capped, and formatting waits until reporting (shared/react-update-depth-attribution.ts). */ +/** Sample the writes driving suspected cascades; React #185’s reported fiber is often a bystander. Unarmed writes read only a flag, per-cascade capture is capped, and formatting waits until reporting (shared/crash-reporting/react-update-depth-attribution.ts). */ /** * Read on every store write, so it is a plain field load on a shared object diff --git a/src/renderer/src/diagnostics/react-commits/react-commit-cascade-telemetry.ts b/src/renderer/src/diagnostics/react-commits/react-commit-cascade-telemetry.ts index ce251f9494b..02826c77a91 100644 --- a/src/renderer/src/diagnostics/react-commits/react-commit-cascade-telemetry.ts +++ b/src/renderer/src/diagnostics/react-commits/react-commit-cascade-telemetry.ts @@ -8,7 +8,7 @@ import { } from '@/diagnostics/react-commits/react-commit-cascade-store-write-samples' import { readStoreListenerCount } from '@/store/diagnostics/store-listener-census' import type { RendererSurface } from '@/diagnostics/memory/renderer-memory-sampling' -import { REACT_NESTED_UPDATE_LIMIT } from '../../../../shared/react-update-depth-attribution' +import { REACT_NESTED_UPDATE_LIMIT } from '../../../../shared/crash-reporting/react-update-depth-attribution' export const REACT_COMMIT_CASCADE_BREADCRUMB = 'react_commit_cascade' diff --git a/src/renderer/src/diagnostics/telemetry/browser-extensions-telemetry.ts b/src/renderer/src/diagnostics/telemetry/browser-extensions-telemetry.ts index 36e448c6b4b..6228eba5817 100644 --- a/src/renderer/src/diagnostics/telemetry/browser-extensions-telemetry.ts +++ b/src/renderer/src/diagnostics/telemetry/browser-extensions-telemetry.ts @@ -1,4 +1,4 @@ -import type { EventProps } from '../../../../shared/telemetry-events' +import type { EventProps } from '../../../../shared/telemetry/telemetry-event-classification' import { track } from './telemetry' export function trackBrowserExtensionsBannerAction( diff --git a/src/renderer/src/diagnostics/telemetry/feature-education-telemetry.ts b/src/renderer/src/diagnostics/telemetry/feature-education-telemetry.ts index 4a48ea6e7c4..2049deed903 100644 --- a/src/renderer/src/diagnostics/telemetry/feature-education-telemetry.ts +++ b/src/renderer/src/diagnostics/telemetry/feature-education-telemetry.ts @@ -1,5 +1,8 @@ -import type { ContextualTourId } from '../../../../shared/contextual-tours' -import type { EventName, EventProps } from '../../../../shared/telemetry-events' +import type { ContextualTourId } from '../../../../shared/feature-education/contextual-tours/contextual-tours' +import type { + EventName, + EventProps +} from '../../../../shared/telemetry/telemetry-event-classification' import { normalizeFeatureEducationSource, normalizeSetupGuideSource, @@ -7,12 +10,12 @@ import { type SetupGuideCloseOutcome, type SetupGuideSource, type TerminalPaneSplitSource -} from '../../../../shared/feature-education-telemetry' +} from '../../../../shared/feature-education/feature-education-telemetry' import { getFeatureWallSetupSectionId, isFeatureWallSetupStepId, type FeatureWallSetupStepId -} from '../../../../shared/feature-wall-setup-steps' +} from '../../../../shared/feature-education/explore/feature-wall-setup-steps' import { track } from './telemetry' const SETUP_GUIDE_TELEMETRY_COMPLETED_STEPS_STORAGE_KEY = diff --git a/src/renderer/src/diagnostics/telemetry/telemetry.ts b/src/renderer/src/diagnostics/telemetry/telemetry.ts index be5a1143d06..3cb892efbb4 100644 --- a/src/renderer/src/diagnostics/telemetry/telemetry.ts +++ b/src/renderer/src/diagnostics/telemetry/telemetry.ts @@ -1,9 +1,12 @@ // Typed renderer-side wrapper around the preload bridge: gives call sites EventMap type safety, while main stays the single validator. // Security invariant: the renderer bundles no PostHog SDK — the sole client lives in main, off the renderer's attack surface. -import type { EventName, EventProps } from '../../../../shared/telemetry-events' -import type { TelemetryConsentState } from '../../../../shared/telemetry-consent-types' -import { utcDayIndex } from '../../../../shared/telemetry-day' +import type { + EventName, + EventProps +} from '../../../../shared/telemetry/telemetry-event-classification' +import type { TelemetryConsentState } from '../../../../shared/telemetry/telemetry-consent-types' +import { utcDayIndex } from '../../../../shared/telemetry/telemetry-day' import '../../../../shared/agent-status/identity/agent-kind' diff --git a/src/renderer/src/lib/agent-session/context/agent-session-continuation.ts b/src/renderer/src/lib/agent-session/context/agent-session-continuation.ts index e1100171d55..70f53c89cf4 100644 --- a/src/renderer/src/lib/agent-session/context/agent-session-continuation.ts +++ b/src/renderer/src/lib/agent-session/context/agent-session-continuation.ts @@ -1,6 +1,6 @@ import { splitOpenCodeSqliteCandidate } from '../../../../../shared/agent-session/lifecycle/provider-handles/opencode-sqlite-session-path' import { buildBoundedSessionTranscript } from '@/lib/agent-session/context/agent-session-fork-context' -import type { LaunchSource } from '../../../../../shared/telemetry-property-schemas' +import type { LaunchSource } from '../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent' export type AgentSessionContinuationContextMode = 'focused' | 'full' diff --git a/src/renderer/src/lib/agent-session/launch/continuation/launch-agent-session-continuation.ts b/src/renderer/src/lib/agent-session/launch/continuation/launch-agent-session-continuation.ts index 9b5c6f827a3..bed75de8f8f 100644 --- a/src/renderer/src/lib/agent-session/launch/continuation/launch-agent-session-continuation.ts +++ b/src/renderer/src/lib/agent-session/launch/continuation/launch-agent-session-continuation.ts @@ -12,7 +12,7 @@ import { import { agentChoicePending } from '../inventory/host-chat-program' import { worktreeLaunchWorkspace } from '../routing/agent-launch-route-input' import { isTuiAgentEnabled } from '../../../../../../shared/agent-launch/catalog/tui-agent-selection' -import type { LaunchSource } from '../../../../../../shared/telemetry-property-schemas' +import type { LaunchSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' import { adoptAgentSessionLaunchVerdict, diff --git a/src/renderer/src/lib/agent-session/launch/new-tab/launch-agent-in-new-tab-args.ts b/src/renderer/src/lib/agent-session/launch/new-tab/launch-agent-in-new-tab-args.ts index ebdbc150b50..31494cb246f 100644 --- a/src/renderer/src/lib/agent-session/launch/new-tab/launch-agent-in-new-tab-args.ts +++ b/src/renderer/src/lib/agent-session/launch/new-tab/launch-agent-in-new-tab-args.ts @@ -1,6 +1,6 @@ import type { AgentSessionLaunchRequest } from '@/lib/agent-session/launch/routing/agent-session-launch-plan' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' -import type { LaunchSource } from '../../../../../../shared/telemetry-property-schemas' +import type { LaunchSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { ExecutionHostId } from '../../../../../../shared/execution-host' import type { StructuredLaunchTerminal } from '@/lib/agent-session/launch/structured-agent-session-launch-admission' import type { LaunchAgentInNewTabRequest } from '@/lib/agent-session/launch/new-tab/launch-agent-in-new-tab-host-agents' diff --git a/src/renderer/src/lib/agent-session/launch/new-tab/launch-agent-web-host-tab.ts b/src/renderer/src/lib/agent-session/launch/new-tab/launch-agent-web-host-tab.ts index 852812d26eb..269e2e26159 100644 --- a/src/renderer/src/lib/agent-session/launch/new-tab/launch-agent-web-host-tab.ts +++ b/src/renderer/src/lib/agent-session/launch/new-tab/launch-agent-web-host-tab.ts @@ -5,7 +5,7 @@ import { lastVerifiedRuntimeStatus } from '../../../../../../shared/remote-runti import { resolveAgentStartupPlanInputs } from '../../../../../../shared/agent-launch/startup/agent-startup-plan-inputs' import { sourceControlActionAgentArgs } from '../../../../../../shared/source-control/ai/recipes/source-control-action-launch-preferences' import { readLaunchPermissionChoice } from '../../../../../../shared/agent-launch/permissions/tui-agent-permission-choice' -import { resolveHostAgentStartupShell } from '../../../../../../shared/windows-terminal-shell' +import { resolveHostAgentStartupShell } from '../../../../../../shared/shell/launch/windows-terminal-shell' import type { AgentLaunchChoices } from '../../../../../../shared/agent-launch/choices/agent-launch-choices' import { structuredAgentLabel } from '../structured-agent-session-launch-label' import type { SessionOptionValue } from '../../../../../../shared/native-chat/input/native-chat-session-options' diff --git a/src/renderer/src/lib/agent-session/launch/pane/agent-launch-through-host.ts b/src/renderer/src/lib/agent-session/launch/pane/agent-launch-through-host.ts index e6553adf2c1..baddea63470 100644 --- a/src/renderer/src/lib/agent-session/launch/pane/agent-launch-through-host.ts +++ b/src/renderer/src/lib/agent-session/launch/pane/agent-launch-through-host.ts @@ -8,7 +8,7 @@ import { rememberAgentLaunchPanePrompt } from '@/lib/agent-session/launch/pane/a import { awaitAgentLaunchPaneStart } from '@/lib/agent-session/launch/pane/agent-launch-pane-start' import { seedNativeChatAppliedSessionOptions } from '../../../../../../shared/native-chat/input/session-options/native-chat-session-option-cache' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' -import type { LaunchSource } from '../../../../../../shared/telemetry-property-schemas' +import type { LaunchSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { Tab } from '../../../../../../shared/tab-types' import type { SessionOptionValue } from '../../../../../../shared/native-chat/input/native-chat-session-options' diff --git a/src/renderer/src/lib/agent-session/launch/prompt/launch-agent-startup-prompt-plan.ts b/src/renderer/src/lib/agent-session/launch/prompt/launch-agent-startup-prompt-plan.ts index 7d447a2f68a..8e8a6236cc6 100644 --- a/src/renderer/src/lib/agent-session/launch/prompt/launch-agent-startup-prompt-plan.ts +++ b/src/renderer/src/lib/agent-session/launch/prompt/launch-agent-startup-prompt-plan.ts @@ -1,4 +1,4 @@ -import { resolveHostAgentStartupShell } from '../../../../../../shared/windows-terminal-shell' +import { resolveHostAgentStartupShell } from '../../../../../../shared/shell/launch/windows-terminal-shell' import type { AgentStartupShell } from '../../../../../../shared/agent-launch/startup/tui-agent-startup-shell' import { TUI_AGENT_CONFIG } from '../../../../../../shared/agent-launch/catalog/tui-agent-config' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' diff --git a/src/renderer/src/lib/agent-session/launch/routing/paired-agent-launch-inputs.ts b/src/renderer/src/lib/agent-session/launch/routing/paired-agent-launch-inputs.ts index 774b7966c7a..9157059fa21 100644 --- a/src/renderer/src/lib/agent-session/launch/routing/paired-agent-launch-inputs.ts +++ b/src/renderer/src/lib/agent-session/launch/routing/paired-agent-launch-inputs.ts @@ -24,7 +24,7 @@ import { tokenizeStartupCommand, type AgentStartupShell } from '../../../../../../shared/agent-launch/startup/tui-agent-startup-shell' -import { resolveHostAgentStartupShell } from '../../../../../../shared/windows-terminal-shell' +import { resolveHostAgentStartupShell } from '../../../../../../shared/shell/launch/windows-terminal-shell' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' import type { SessionOptionValue } from '../../../../../../shared/native-chat/input/native-chat-session-options' 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 6b3fc2cf6c3..e8f9c7e93c4 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 @@ -4,7 +4,7 @@ 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 { resolveHostAgentStartupShell } from '../../../../../shared/windows-terminal-shell' +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' import type { AgentStartupShell } from '../../../../../shared/agent-launch/startup/tui-agent-startup-shell' diff --git a/src/renderer/src/lib/agent-session/resume/history/ai-vault-resume-shell.ts b/src/renderer/src/lib/agent-session/resume/history/ai-vault-resume-shell.ts index 23d6af0ead7..4387b2eb97e 100644 --- a/src/renderer/src/lib/agent-session/resume/history/ai-vault-resume-shell.ts +++ b/src/renderer/src/lib/agent-session/resume/history/ai-vault-resume-shell.ts @@ -5,7 +5,7 @@ import { getAiVaultResumeWorkspaceExecutionHostId } from './ai-vault-resume-targ import { LOCAL_EXECUTION_HOST_ID } from '../../../../../../shared/execution-host' import { CLIENT_PLATFORM } from '@/lib/workspace/creation/new-workspace' import { resolveLocalWindowsTerminalShellOverrideForTab } from '../../../../../../shared/shell/launch/local-windows-terminal-runtime' -import { resolveWindowsShellStartupFamily } from '../../../../../../shared/windows-terminal-shell' +import { resolveWindowsShellStartupFamily } from '../../../../../../shared/shell/launch/windows-terminal-shell' import { resolveStartupShell } from '../../../../../../shared/agent-launch/startup/tui-agent-startup-shell' import type { AgentStartupShell } from '../../../../../../shared/agent-launch/startup/tui-agent-startup-shell' import { parseWorkspaceKey } from '../../../../../../shared/workspace-scope' diff --git a/src/renderer/src/lib/agent-status/aggregation/worktree-agent-status.ts b/src/renderer/src/lib/agent-status/aggregation/worktree-agent-status.ts index 1f5ee3ebaf2..9c2112a0d3c 100644 --- a/src/renderer/src/lib/agent-status/aggregation/worktree-agent-status.ts +++ b/src/renderer/src/lib/agent-status/aggregation/worktree-agent-status.ts @@ -9,7 +9,7 @@ import { tabHasLivePty } from '../../../../../shared/tab-has-live-pty' import type { WorktreeStatus } from '../../../../../shared/worktree-status-rollup' import { tuiAgentToAgentKind } from '../../../../../shared/agent-status/identity/agent-kind' import { agentTypeToIconAgent } from '../../../../../shared/agent-status/presentation/agent-type-icon-agent' -import type { AgentKind } from '../../../../../shared/telemetry-property-schemas' +import type { AgentKind } from '../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { AgentStatus } from '../../../../../shared/agent-status/title/agent-title-core' import { detectAgentStatusFromTitle } from '../../../../../shared/agent-status/title/agent-title-status' diff --git a/src/renderer/src/lib/skills/runtime/project-skill-runtime.ts b/src/renderer/src/lib/skills/runtime/project-skill-runtime.ts index 9a58d5a6a50..a8b38427198 100644 --- a/src/renderer/src/lib/skills/runtime/project-skill-runtime.ts +++ b/src/renderer/src/lib/skills/runtime/project-skill-runtime.ts @@ -2,7 +2,7 @@ import type { ProjectExecutionRuntimeResolution } from '../../../../../shared/execution-host/project-execution-runtime' import type { SkillDiscoveryTarget } from '../../../../../shared/skills/discovery/skills' import type { GlobalSettings } from '../../../../../shared/global-settings-types' -import { resolveWindowsShellStartupFamily } from '../../../../../shared/windows-terminal-shell' +import { resolveWindowsShellStartupFamily } from '../../../../../shared/shell/launch/windows-terminal-shell' import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' diff --git a/src/renderer/src/lib/skills/runtime/skill-runtime-command.ts b/src/renderer/src/lib/skills/runtime/skill-runtime-command.ts index b3ba50dacd1..770023df33e 100644 --- a/src/renderer/src/lib/skills/runtime/skill-runtime-command.ts +++ b/src/renderer/src/lib/skills/runtime/skill-runtime-command.ts @@ -8,7 +8,7 @@ import { } from '../../../../../shared/powershell-native-argument' import { buildWslLoginShellCommand } from '../../../../../shared/shell/wsl/wsl-login-shell-command' import { isWslShellName } from '../../../../../shared/shell/launch/local-windows-terminal-runtime' -import { resolveWindowsShellStartupFamily } from '../../../../../shared/windows-terminal-shell' +import { resolveWindowsShellStartupFamily } from '../../../../../shared/shell/launch/windows-terminal-shell' import { useAppStore } from '@/store/index' import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' diff --git a/src/renderer/src/lib/source-control/ai/source-control-agent-action-launch-check.ts b/src/renderer/src/lib/source-control/ai/source-control-agent-action-launch-check.ts index 201f6776578..69903cba0d6 100644 --- a/src/renderer/src/lib/source-control/ai/source-control-agent-action-launch-check.ts +++ b/src/renderer/src/lib/source-control/ai/source-control-agent-action-launch-check.ts @@ -4,7 +4,7 @@ import { CLIENT_PLATFORM } from '@/lib/workspace/creation/new-workspace' import { isTuiAgentEnabled } from '../../../../../shared/agent-launch/catalog/tui-agent-selection' import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent' import { translate } from '@/i18n/i18n' -import { resolveLocalWindowsAgentStartupShell } from '../../../../../shared/windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../../../../shared/shell/launch/windows-terminal-shell' /** Validate user-fixable agent/arguments/input; the host’s agent.launch owns prompt delivery, never predictions here. */ export type SourceControlLaunchCheckResult = { ok: true } | { ok: false; error: string } diff --git a/src/renderer/src/lib/source-control/checks/fix-checks-agent-launch-request.ts b/src/renderer/src/lib/source-control/checks/fix-checks-agent-launch-request.ts index 17163c26403..b06ce7a3311 100644 --- a/src/renderer/src/lib/source-control/checks/fix-checks-agent-launch-request.ts +++ b/src/renderer/src/lib/source-control/checks/fix-checks-agent-launch-request.ts @@ -1,6 +1,6 @@ import type { GitHubWorkItem } from '../../../../../shared/github/work-items/work-item-types' import type { WorkspaceSource as WorkspaceCreateTelemetrySource } from '../../../../../shared/workspace-source' -import type { LaunchSource } from '../../../../../shared/telemetry-property-schemas' +import type { LaunchSource } from '../../../../../shared/telemetry/schemas/telemetry-property-schemas' export type StartFixChecksAgentArgs = { repoId: string diff --git a/src/renderer/src/lib/workspace/creation/work-item/launch-work-item-direct-agent.ts b/src/renderer/src/lib/workspace/creation/work-item/launch-work-item-direct-agent.ts index 63193a3b096..7cc95ce5403 100644 --- a/src/renderer/src/lib/workspace/creation/work-item/launch-work-item-direct-agent.ts +++ b/src/renderer/src/lib/workspace/creation/work-item/launch-work-item-direct-agent.ts @@ -12,7 +12,7 @@ import { type AgentStartupPlan } from '../../../../../../shared/agent-launch/startup/tui-agent-startup' import type { SleepingAgentLaunchConfig } from '../../../../../../shared/agent-session/lifecycle/agent-session-resume' -import type { LaunchSource } from '../../../../../../shared/telemetry-property-schemas' +import type { LaunchSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { StartupCommandDelivery } from '../../../../../../shared/agent-launch/startup/codex-startup-delivery' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' import type { AgentStartupShell } from '../../../../../../shared/agent-launch/startup/tui-agent-startup-shell' diff --git a/src/renderer/src/lib/workspace/creation/work-item/launch-work-item-direct-types.ts b/src/renderer/src/lib/workspace/creation/work-item/launch-work-item-direct-types.ts index 7a29cb75e82..f2d065b3a4a 100644 --- a/src/renderer/src/lib/workspace/creation/work-item/launch-work-item-direct-types.ts +++ b/src/renderer/src/lib/workspace/creation/work-item/launch-work-item-direct-types.ts @@ -4,7 +4,7 @@ import type { LinkedWorkItemContext } from '@/lib/work-items/linked-work-item-co import type { TaskProvider } from '../../../../../../shared/work-items/task-providers' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' import type { WorkspaceSource as WorkspaceCreateTelemetrySource } from '../../../../../../shared/workspace-source' -import type { LaunchSource } from '../../../../../../shared/telemetry-property-schemas' +import type { LaunchSource } from '../../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { AgentLaunchChoice } from '@/lib/agent-session/launch/routing/agent-menu-selection' import type { AgentSessionLaunchRequest } from '../../../agent-session/launch/routing/agent-session-launch-plan' diff --git a/src/renderer/src/lib/workspace/creation/worktree-startup-payload.ts b/src/renderer/src/lib/workspace/creation/worktree-startup-payload.ts index 9dca2895509..a9c43b7f06b 100644 --- a/src/renderer/src/lib/workspace/creation/worktree-startup-payload.ts +++ b/src/renderer/src/lib/workspace/creation/worktree-startup-payload.ts @@ -1,6 +1,6 @@ import type { LaunchAgentStartupPromptPlan } from '@/lib/agent-session/launch/prompt/launch-agent-startup-prompt-plan' import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent' -import type { EventProps } from '../../../../../shared/telemetry-event-classification' +import type { EventProps } from '../../../../../shared/telemetry/telemetry-event-classification' import type { StartupCommandDelivery } from '../../../../../shared/agent-launch/startup/codex-startup-delivery' import type { AgentProviderSessionMetadata, diff --git a/src/renderer/src/runtime/hosted-terminals/actions/web-runtime-terminal-split.ts b/src/renderer/src/runtime/hosted-terminals/actions/web-runtime-terminal-split.ts index 9e308d50901..31ca96266fa 100644 --- a/src/renderer/src/runtime/hosted-terminals/actions/web-runtime-terminal-split.ts +++ b/src/renderer/src/runtime/hosted-terminals/actions/web-runtime-terminal-split.ts @@ -1,5 +1,5 @@ import { toast } from 'sonner' -import type { TerminalPaneSplitSource } from '../../../../../shared/feature-education-telemetry' +import type { TerminalPaneSplitSource } from '../../../../../shared/feature-education/feature-education-telemetry' import type { RuntimeRpcResponse } from '../../../../../shared/remote-runtime/rpc/runtime-rpc-envelope' import type { RuntimeTerminalSplit } from '../../../../../shared/terminal/runtime/runtime-terminal-contracts' import { unwrapRuntimeRpcResult } from '../../rpc/calls/runtime-rpc-result' diff --git a/src/renderer/src/runtime/hosted-terminals/inspection/runtime-terminal-inspection.test.ts b/src/renderer/src/runtime/hosted-terminals/inspection/runtime-terminal-inspection.test.ts index c60d5fbe5fd..eff1b2b8bf0 100644 --- a/src/renderer/src/runtime/hosted-terminals/inspection/runtime-terminal-inspection.test.ts +++ b/src/renderer/src/runtime/hosted-terminals/inspection/runtime-terminal-inspection.test.ts @@ -1,129 +1,29 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { sendRuntimePtyInput } from '../input/runtime-terminal-input-send' -import { recordRuntimeTerminalInputForPtyId } from '../input/runtime-terminal-input-recording' import { sendRuntimePtyInputVerified } from '../input/runtime-terminal-verified-input' -import { - createCompatibleRuntimeStatusResponseIfNeeded, - type RuntimeEnvironmentCallRequest -} from '../../rpc/testing/runtime-compatibility-test-fixture' -import { clearRuntimeCompatibilityCache as clearRuntimeCompatibilityCacheForTests } from '../../rpc/compatibility/runtime-compatibility-cache' -import { useAppStore } from '../../../store/index' -import type { RemoteForegroundEvidence } from '../../../../../shared/foreground-process-evidence' - -const LEAF_ID = '11111111-1111-4111-8111-111111111111' function makeByteOversizedTerminalInput(): string { return '😀'.repeat(4_194_305) } -function liveEvidence(ptyId: string, processName = 'bash'): RemoteForegroundEvidence { - return { - authorityGeneration: 'authority-1', - observationEpoch: 1, - capturedAgeMs: 0, - ptyId, - ptyIncarnationId: 'incarnation-1', - verdict: 'live', - processName, - fence: { - platform: 'posix', - shellPid: 1, - shellStartTime: '1', - tty: '/dev/pts/1', - foregroundPgid: 1 - } - } -} - describe('runtime terminal owner routing', () => { - const runtimeCall = vi.fn() - const runtimeTransportCall = vi.fn() const localWrite = vi.fn() const localWriteAccepted = vi.fn() - const localInspect = vi.fn() afterEach(() => { vi.restoreAllMocks() }) beforeEach(() => { - clearRuntimeCompatibilityCacheForTests() vi.clearAllMocks() - runtimeCall.mockResolvedValue({ - ok: true, - result: { - process: { - foregroundProcess: 'bash', - hasChildProcesses: true, - foregroundProcessEvidence: liveEvidence('terminal-1') - } - }, - _meta: { runtimeId: 'runtime-1' } - }) - runtimeTransportCall.mockImplementation((args: RuntimeEnvironmentCallRequest) => { - return createCompatibleRuntimeStatusResponseIfNeeded(args) ?? runtimeCall(args) - }) vi.stubGlobal('window', { api: { - runtimeEnvironments: { call: runtimeTransportCall }, pty: { write: localWrite, - writeAccepted: localWriteAccepted, - inspectProcess: localInspect + writeAccepted: localWriteAccepted } } }) - useAppStore.setState({ - settings: { experimentalAgentHibernation: true } as never, - terminalLayoutsByTabId: {}, - lastTerminalInputAtByPaneKey: {} - }) - }) - - it('attributes a delayed runtime acknowledgement to the current layout owner', async () => { - vi.spyOn(Date, 'now').mockReturnValue(456_000) - const pendingSend = Promise.withResolvers<{ - ok: true - result: { send: { handle: string; accepted: true; bytesWritten: number } } - _meta: { runtimeId: string } - }>() - runtimeCall.mockReturnValue(pendingSend.promise) - useAppStore.setState({ - terminalLayoutsByTabId: { - 'tab-1': { - root: { type: 'leaf', leafId: LEAF_ID }, - activeLeafId: LEAF_ID, - expandedLeafId: null, - ptyIdsByLeafId: { [LEAF_ID]: 'remote:env-1@@terminal-1' } - } - } - }) - recordRuntimeTerminalInputForPtyId('remote:env-1@@terminal-1', 123) - useAppStore.setState({ lastTerminalInputAtByPaneKey: {} }) - - expect(sendRuntimePtyInput('remote:env-1@@terminal-1', 'x', 'driving')).toBe(true) - const nextLeafId = '22222222-2222-4222-8222-222222222222' - useAppStore.setState({ - terminalLayoutsByTabId: { - 'tab-2': { - root: { type: 'leaf', leafId: nextLeafId }, - activeLeafId: nextLeafId, - expandedLeafId: null, - ptyIdsByLeafId: { [nextLeafId]: 'remote:env-1@@terminal-1' } - } - } - }) - pendingSend.resolve({ - ok: true, - result: { send: { handle: 'terminal-1', accepted: true, bytesWritten: 1 } }, - _meta: { runtimeId: 'runtime-1' } - }) - - await vi.waitFor(() => { - expect(useAppStore.getState().lastTerminalInputAtByPaneKey).toEqual({ - 'tab-2:22222222-2222-4222-8222-222222222222': 456_000 - }) - }) }) it('drops byte-oversized fire-and-forget input after deferred validation', async () => { diff --git a/src/renderer/src/runtime/hosts/platform/execution-host-facts.ts b/src/renderer/src/runtime/hosts/platform/execution-host-facts.ts index 2322c07f436..f4d7f06a622 100644 --- a/src/renderer/src/runtime/hosts/platform/execution-host-facts.ts +++ b/src/renderer/src/runtime/hosts/platform/execution-host-facts.ts @@ -2,7 +2,7 @@ import { getRepoExecutionHostId, parseExecutionHostId } from '../../../../../sha import type { ParsedExecutionHost, ExecutionHostId } from '../../../../../shared/execution-host' import { lastVerifiedRuntimeStatus } from '../../../../../shared/remote-runtime/host-status/runtime-host-status' import { runtimeHostContactForEntry } from '../../../../../shared/remote-runtime/host-status/runtime-host-contact' -import { resolveHostAgentStartupShell } from '../../../../../shared/windows-terminal-shell' +import { resolveHostAgentStartupShell } from '../../../../../shared/shell/launch/windows-terminal-shell' import { isWslUncPath } from '../../../../../shared/file-access/wsl-paths' import { getConnectionIdForWorktreeCopy, diff --git a/src/renderer/src/store/slices/process-stats/memory.ts b/src/renderer/src/store/slices/process-stats/memory.ts index d299600461d..ff7e467e0b0 100644 --- a/src/renderer/src/store/slices/process-stats/memory.ts +++ b/src/renderer/src/store/slices/process-stats/memory.ts @@ -1,6 +1,6 @@ import type { StateCreator } from 'zustand' import type { AppState } from '../../types' -import type { MemorySnapshot } from '../../../../../shared/process-stats-types' +import type { MemorySnapshot } from '../../../../../shared/diagnostics/process-stats-types' export type MemorySlice = { memorySnapshot: MemorySnapshot | null diff --git a/src/renderer/src/store/slices/process-stats/stats.ts b/src/renderer/src/store/slices/process-stats/stats.ts index 21c557616d4..44614095726 100644 --- a/src/renderer/src/store/slices/process-stats/stats.ts +++ b/src/renderer/src/store/slices/process-stats/stats.ts @@ -1,6 +1,6 @@ import type { StateCreator } from 'zustand' import type { AppState } from '../../types' -import type { StatsSummary } from '../../../../../shared/process-stats-types' +import type { StatsSummary } from '../../../../../shared/diagnostics/process-stats-types' export type StatsSlice = { statsSummary: StatsSummary | null diff --git a/src/renderer/src/store/slices/ui/ui-slice-contextual-tour-progression.ts b/src/renderer/src/store/slices/ui/ui-slice-contextual-tour-progression.ts index b0146d82943..d2e878e25c3 100644 --- a/src/renderer/src/store/slices/ui/ui-slice-contextual-tour-progression.ts +++ b/src/renderer/src/store/slices/ui/ui-slice-contextual-tour-progression.ts @@ -1,6 +1,6 @@ import type { AppState } from '../../types' -import type { FeatureInteractionId } from '../../../../../shared/feature-interactions' -import { getContextualTour } from '../../../../../shared/contextual-tours' +import type { FeatureInteractionId } from '../../../../../shared/feature-education/interactions/feature-interaction-catalog' +import { getContextualTour } from '../../../../../shared/feature-education/contextual-tours/contextual-tours' import { isPausedActionTour } from './ui-slice-tour-actions' import { getNextVisibleContextualTourStepIndex, 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 82603abbd89..2f475e3d0c0 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,11 +1,12 @@ import type { PersistedTrustedOrcaHooks } from '../../../../../shared/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 { - FeatureInteractionId, - FeatureInteractionState -} from '../../../../../shared/feature-interactions' -import type { FeatureTipId, FeatureTipSeenId } from '../../../../../shared/feature-tips' + FeatureTipId, + FeatureTipSeenId +} from '../../../../../shared/feature-education/feature-tips' import type { ChatUiLaunchTipVariant } from '../../../../../shared/native-chat/chat-ui-launch-tip-audience' -import type { ContextualTourId } from '../../../../../shared/contextual-tours' +import type { ContextualTourId } from '../../../../../shared/feature-education/contextual-tours/contextual-tours' import type { OrcaHookTrustKind } from '../../../../../shared/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 d50c1e07bbd..5f8c2e11b1b 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 @@ -10,7 +10,7 @@ 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' import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent' -import type { LaunchSource } from '../../../../../shared/telemetry-events' +import type { LaunchSource } from '../../../../../shared/telemetry/schemas/telemetry-property-schemas' import type { TaskSourceContext } from '../../../../../shared/work-items/task-source-context' import type { ExecutionHostId } from '../../../../../shared/execution-host' import type { TaskResumeState, TopLevelView } from '../../../../../shared/ui-chrome-types' diff --git a/src/renderer/src/store/slices/ui/ui-slice-feature-actions.ts b/src/renderer/src/store/slices/ui/ui-slice-feature-actions.ts index a2a473cc278..cd707ee025d 100644 --- a/src/renderer/src/store/slices/ui/ui-slice-feature-actions.ts +++ b/src/renderer/src/store/slices/ui/ui-slice-feature-actions.ts @@ -4,9 +4,9 @@ import { mergeContextualTourSeenIds } from './ui-slice-hydration-values' import { getContextualTourProgressionForFeatureInteraction } from './ui-slice-contextual-tour-progression' -import { getContextualTourStepIndex } from '../../../../../shared/contextual-tours' -import type { FeatureInteractionState } from '../../../../../shared/feature-interactions' -import { getFeatureTipSeenId } from '../../../../../shared/feature-tips' +import { getContextualTourStepIndex } from '../../../../../shared/feature-education/contextual-tours/contextual-tours' +import type { FeatureInteractionState } from '../../../../../shared/feature-education/interactions/feature-interactions' +import { getFeatureTipSeenId } from '../../../../../shared/feature-education/feature-tips' export function createUiFeatureActions(set: UISliceSet, get: UISliceGet): Partial { return { diff --git a/src/renderer/src/store/slices/ui/ui-slice-hydration-actions.ts b/src/renderer/src/store/slices/ui/ui-slice-hydration-actions.ts index 6540648d40a..728737965e5 100644 --- a/src/renderer/src/store/slices/ui/ui-slice-hydration-actions.ts +++ b/src/renderer/src/store/slices/ui/ui-slice-hydration-actions.ts @@ -12,9 +12,9 @@ import { normalizeExecutionHostOrder, normalizeVisibleExecutionHostIds } from '../../../../../shared/execution-host' -import { normalizeFeatureInteractions } from '../../../../../shared/feature-interactions' -import { normalizeContextualTourIds } from '../../../../../shared/contextual-tours' -import { normalizeFeatureTipIds } from '../../../../../shared/feature-tips' +import { normalizeFeatureInteractions } from '../../../../../shared/feature-education/interactions/feature-interactions' +import { normalizeContextualTourIds } from '../../../../../shared/feature-education/contextual-tours/contextual-tours' +import { normalizeFeatureTipIds } from '../../../../../shared/feature-education/feature-tips' import { DEFAULT_HIDE_SLEEPING_WORKSPACES, normalizeAgentActivityDisplayMode diff --git a/src/renderer/src/store/slices/ui/ui-slice-hydration-values.ts b/src/renderer/src/store/slices/ui/ui-slice-hydration-values.ts index 5b891d59b01..4509e564794 100644 --- a/src/renderer/src/store/slices/ui/ui-slice-hydration-values.ts +++ b/src/renderer/src/store/slices/ui/ui-slice-hydration-values.ts @@ -1,9 +1,9 @@ import type { PersistedUIState } from '../../../../../shared/persisted-ui-state-types' import type { TaskResumeState, TaskViewPresetId } from '../../../../../shared/ui-chrome-types' -import type { FeatureInteractionState } from '../../../../../shared/feature-interactions' -import type { ContextualTourId } from '../../../../../shared/contextual-tours' -import { normalizeFeatureInteractions } from '../../../../../shared/feature-interactions' -import { normalizeContextualTourIds } from '../../../../../shared/contextual-tours' +import type { FeatureInteractionState } from '../../../../../shared/feature-education/interactions/feature-interactions' +import type { ContextualTourId } from '../../../../../shared/feature-education/contextual-tours/contextual-tours' +import { normalizeFeatureInteractions } from '../../../../../shared/feature-education/interactions/feature-interactions' +import { normalizeContextualTourIds } from '../../../../../shared/feature-education/contextual-tours/contextual-tours' import type { UISlice } from './ui-slice-contract' import { sanitizeAcknowledgedAgentsByPaneKey, diff --git a/src/renderer/src/store/slices/ui/ui-slice-task-actions.ts b/src/renderer/src/store/slices/ui/ui-slice-task-actions.ts index 28382dd4322..951781b316e 100644 --- a/src/renderer/src/store/slices/ui/ui-slice-task-actions.ts +++ b/src/renderer/src/store/slices/ui/ui-slice-task-actions.ts @@ -1,6 +1,6 @@ import type { UISlice, UISliceGet, UISliceSet } from './ui-slice-contract' import { findPrevLiveNonTaskStackHistoryIndex } from './workspace-navigation-history' -import { hasFeatureInteraction } from '../../../../../shared/feature-interactions' +import { hasFeatureInteraction } from '../../../../../shared/feature-education/interactions/feature-interactions' import { normalizeVisibleTaskProviders, restoreAvailableDefaultTaskProvider, diff --git a/src/renderer/src/store/slices/ui/ui-slice-tour-actions.ts b/src/renderer/src/store/slices/ui/ui-slice-tour-actions.ts index b7c225d5096..09618bcde16 100644 --- a/src/renderer/src/store/slices/ui/ui-slice-tour-actions.ts +++ b/src/renderer/src/store/slices/ui/ui-slice-tour-actions.ts @@ -2,19 +2,19 @@ import type { UISlice, UISliceGet, UISliceSet } from './ui-slice-contract' import { hasContextualTourActionStep, isContextualTourStepDone -} from '../../../../../shared/contextual-tour-action-steps' +} from '../../../../../shared/feature-education/contextual-tours/contextual-tour-action-steps' import { getContextualTour, type ContextualTourId, getContextualTourStepIndex -} from '../../../../../shared/contextual-tours' +} from '../../../../../shared/feature-education/contextual-tours/contextual-tours' import { getContextualTourRequestDecision, hasContextualTourTarget, getNextVisibleContextualTourStepIndex, getPreviousVisibleContextualTourStepIndex } from '../../../components/contextual-tours/contextual-tour-gate' -import { hasFeatureInteraction } from '../../../../../shared/feature-interactions' +import { hasFeatureInteraction } from '../../../../../shared/feature-education/interactions/feature-interactions' // An unfinished action tour waits for the user to act, so it sits outside the one-tour-per-session // limit: it neither blocks other tours nor is blocked by them until it is seen (final tip shown or closed). diff --git a/src/renderer/src/store/terminals/tabs/creation/terminal-workspace-routing.ts b/src/renderer/src/store/terminals/tabs/creation/terminal-workspace-routing.ts index 8d43c960b2d..0ed1bc39e1f 100644 --- a/src/renderer/src/store/terminals/tabs/creation/terminal-workspace-routing.ts +++ b/src/renderer/src/store/terminals/tabs/creation/terminal-workspace-routing.ts @@ -4,7 +4,7 @@ import { getRepoIdFromWorktreeId } from '../../../../../../shared/worktree/id' import { isWslUncPath } from '../../../../../../shared/file-access/wsl-paths' import type { ProjectExecutionRuntimeResolution } from '../../../../../../shared/execution-host/project-execution-runtime' import { resolveLocalWindowsTerminalShellOverrideForTab } from '../../../../../../shared/shell/launch/local-windows-terminal-runtime' -import { WINDOWS_GIT_BASH_SHELL } from '../../../../../../shared/windows-terminal-shell' +import { WINDOWS_GIT_BASH_SHELL } from '../../../../../../shared/shell/launch/windows-terminal-shell' import { getFolderWorkspaceConnectionId } from '@/lib/workspace/ownership/folder-workspace-connection' import { getIndexedRepoMap } from '../../../repos/repository-catalog-index' import { getIndexedWorktreeMap } from '../../../slices/worktrees/listing/worktree-catalog-index' diff --git a/src/renderer/src/store/terminals/tabs/creation/window-tab-start-in-main.ts b/src/renderer/src/store/terminals/tabs/creation/window-tab-start-in-main.ts index 01b5f13aa12..f4f6252ad2e 100644 --- a/src/renderer/src/store/terminals/tabs/creation/window-tab-start-in-main.ts +++ b/src/renderer/src/store/terminals/tabs/creation/window-tab-start-in-main.ts @@ -5,7 +5,7 @@ import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' import { makePaneKey } from '../../../../../../shared/workspace-layout/stable-pane-id' import { collectLeafIds } from '../../../../../../shared/workspace-layout/terminal-topology/terminal-pane-layout-tree' import type { TerminalTab } from '../../../../../../shared/workspace-layout/terminal-tab-types' -import { isSupportedWindowsShellOverride } from '../../../../../../shared/windows-terminal-shell' +import { isSupportedWindowsShellOverride } from '../../../../../../shared/shell/launch/windows-terminal-shell' import type { AppState } from '../../../types' import type { TerminalPaneStart } from '../../terminal-state' import { getRemoteConnectionIdForWorktree, worktreeUsesWslPath } from './terminal-workspace-routing' diff --git a/src/renderer/src/web/preload-api/web-memory-api.ts b/src/renderer/src/web/preload-api/web-memory-api.ts index a99fc7ccfa7..fa8c1278eb6 100644 --- a/src/renderer/src/web/preload-api/web-memory-api.ts +++ b/src/renderer/src/web/preload-api/web-memory-api.ts @@ -1,4 +1,4 @@ -import type { MemorySnapshot } from '../../../../shared/process-stats-types' +import type { MemorySnapshot } from '../../../../shared/diagnostics/process-stats-types' import { getBrowserPlatform } from './web-storage' export function createEmptyMemorySnapshot(): MemorySnapshot { diff --git a/src/renderer/src/web/preload-api/web-onboarding-api.ts b/src/renderer/src/web/preload-api/web-onboarding-api.ts index ac72c2cb144..71872ec85ea 100644 --- a/src/renderer/src/web/preload-api/web-onboarding-api.ts +++ b/src/renderer/src/web/preload-api/web-onboarding-api.ts @@ -2,8 +2,8 @@ import type { PreloadApi } from '../../../../preload/api-types' import { ONBOARDING_FLOW_VERSION, getDefaultOnboardingState -} from '../../../../shared/onboarding-defaults' -import type { OnboardingState } from '../../../../shared/onboarding-state-types' +} from '../../../../shared/onboarding/onboarding-defaults' +import type { OnboardingState } from '../../../../shared/onboarding/onboarding-state-types' import { ONBOARDING_STORAGE_KEY, readJson, writeJson } from './web-storage' export function getStoredOnboarding(): OnboardingState { 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 73e3894d5a7..ad9af7be15d 100644 --- a/src/renderer/src/web/preload-api/web-preference-normalization.ts +++ b/src/renderer/src/web/preload-api/web-preference-normalization.ts @@ -15,13 +15,13 @@ import { normalizeWorktreeCardProperties } from '../../../../shared/worktree/row import { normalizeContextualTourIds, type ContextualTourId -} from '../../../../shared/contextual-tours' +} from '../../../../shared/feature-education/contextual-tours/contextual-tours' import { normalizeFeatureInteractions, - type FeatureInteractionId, type FeatureInteractionState -} from '../../../../shared/feature-interactions' +} from '../../../../shared/feature-education/interactions/feature-interactions' +import type { FeatureInteractionId } from '../../../../shared/feature-education/interactions/feature-interaction-catalog' import type { GlobalSettings } from '../../../../shared/global-settings-types' import type { diff --git a/src/renderer/src/web/preload-api/web-ui-api.ts b/src/renderer/src/web/preload-api/web-ui-api.ts index 988e57a9c73..3267ba626e2 100644 --- a/src/renderer/src/web/preload-api/web-ui-api.ts +++ b/src/renderer/src/web/preload-api/web-ui-api.ts @@ -5,8 +5,8 @@ import { createWebJiraFilterStateApi } from './web-jira-filter-state-api' import type { PreloadApi } from '../../../../preload/api-types' import { assertClipboardTextWithinLimitWithYield } from '../../../../shared/clipboard-text' import type { ReadClipboardTextOptions } from '../../../../shared/clipboard-text' -import { normalizeFeatureInteractions } from '../../../../shared/feature-interactions' -import type { FeatureInteractionId } from '../../../../shared/feature-interactions' +import { normalizeFeatureInteractions } from '../../../../shared/feature-education/interactions/feature-interactions' +import type { FeatureInteractionId } from '../../../../shared/feature-education/interactions/feature-interaction-catalog' import { omitPairingLocalUiFields } from '../../../../shared/remote-runtime/pairing/pairing-local-ui-fields' import type { PairedUiState } from '../../../../shared/remote-runtime/pairing/pairing-local-ui-fields' import { diff --git a/src/renderer/src/web/web-preload-api-ui.test.ts b/src/renderer/src/web/web-preload-api-ui.test.ts index d6bd50dd9d0..9893eb42f01 100644 --- a/src/renderer/src/web/web-preload-api-ui.test.ts +++ b/src/renderer/src/web/web-preload-api-ui.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import type { FeatureInteractionState } from '../../../shared/feature-interactions' +import type { FeatureInteractionState } from '../../../shared/feature-education/interactions/feature-interactions' import type { RuntimeRpcResponse } from '../../../shared/remote-runtime/rpc/runtime-rpc-envelope' import { diff --git a/src/renderer/src/web/web-preload-api.ts b/src/renderer/src/web/web-preload-api.ts index 46104103775..f86de71eb2c 100644 --- a/src/renderer/src/web/web-preload-api.ts +++ b/src/renderer/src/web/web-preload-api.ts @@ -1,5 +1,5 @@ import type { PreloadApi } from '../../../preload/api-types' -import type { StatsSummary } from '../../../shared/process-stats-types' +import type { StatsSummary } from '../../../shared/diagnostics/process-stats-types' import { createWebE2EApi } from './preload-api/web-e2e-api' import { createClaudeAccountsApi, diff --git a/src/shared/agent-launch/choices/agent-launch-permission-updates.ts b/src/shared/agent-launch/choices/agent-launch-permission-updates.ts index c1a144c6438..48bd2e1a987 100644 --- a/src/shared/agent-launch/choices/agent-launch-permission-updates.ts +++ b/src/shared/agent-launch/choices/agent-launch-permission-updates.ts @@ -1,4 +1,4 @@ -import { resolveLocalWindowsAgentStartupShell } from '../../windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../shell/launch/windows-terminal-shell' import { resolveStartupShell } from '../startup/tui-agent-startup-shell' import { agentLaunchChoiceUpdates } from './agent-launch-choice-updates' import { diff --git a/src/shared/agent-launch/choices/agent-launch-settings.ts b/src/shared/agent-launch/choices/agent-launch-settings.ts index ef4ee924750..8fd326b7997 100644 --- a/src/shared/agent-launch/choices/agent-launch-settings.ts +++ b/src/shared/agent-launch/choices/agent-launch-settings.ts @@ -1,4 +1,4 @@ -import { resolveLocalWindowsAgentStartupShell } from '../../windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../shell/launch/windows-terminal-shell' import { resolveStartupShell } from '../startup/tui-agent-startup-shell' import { agentPermissionHostPlatform } from '../permissions/agent-permission-env' import { isTuiAgent } from '../catalog/tui-agent-config' diff --git a/src/shared/agent-launch/choices/tui-agent-launch-defaults.ts b/src/shared/agent-launch/choices/tui-agent-launch-defaults.ts index bdf7433bd22..0314206e10a 100644 --- a/src/shared/agent-launch/choices/tui-agent-launch-defaults.ts +++ b/src/shared/agent-launch/choices/tui-agent-launch-defaults.ts @@ -22,7 +22,7 @@ import { type AgentStartupShell } from '../startup/tui-agent-startup-shell' import type { TuiAgent } from '../catalog/tui-agent' -import { resolveLocalWindowsAgentStartupShell } from '../../windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../shell/launch/windows-terminal-shell' const UNSUPPORTED_TUI_AGENT_ARGS: Partial> = { opencode: ['--dangerously-skip-permissions'], diff --git a/src/shared/agent-launch/startup/agent-launch-runtime.ts b/src/shared/agent-launch/startup/agent-launch-runtime.ts index 3ad622053f0..aa44cba14d9 100644 --- a/src/shared/agent-launch/startup/agent-launch-runtime.ts +++ b/src/shared/agent-launch/startup/agent-launch-runtime.ts @@ -2,7 +2,7 @@ import type { ProjectExecutionRuntimeResolution } from '../../execution-host/pro import { isWindowsAbsolutePathLike } from '../../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 '../../windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../shell/launch/windows-terminal-shell' import { isWslUncPath } from '../../file-access/wsl-paths' /** Resolve command platform and actual PTY shell once on the execution host; in-memory only. */ diff --git a/src/shared/agent-launch/startup/agent-startup-plan-inputs-baseline-test-fixture.ts b/src/shared/agent-launch/startup/agent-startup-plan-inputs-baseline-test-fixture.ts index cf9a43e3974..2e9c77bb649 100644 --- a/src/shared/agent-launch/startup/agent-startup-plan-inputs-baseline-test-fixture.ts +++ b/src/shared/agent-launch/startup/agent-startup-plan-inputs-baseline-test-fixture.ts @@ -9,7 +9,7 @@ import { } from '../choices/tui-agent-launch-defaults' import { resolveStartupShell, type AgentStartupShell } from './tui-agent-startup-shell' import { hasExtraAgentArgs, mergeExtraAgentArgs } from './automation-extra-agent-args' -import { resolveLocalWindowsAgentStartupShell } from '../../windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../shell/launch/windows-terminal-shell' export function resolveBaselineAgentStartupPlanInputs(args: { agent: TuiAgent diff --git a/src/shared/agent-launch/startup/agent-startup-plan-inputs.ts b/src/shared/agent-launch/startup/agent-startup-plan-inputs.ts index 87fb5354277..0673491cba9 100644 --- a/src/shared/agent-launch/startup/agent-startup-plan-inputs.ts +++ b/src/shared/agent-launch/startup/agent-startup-plan-inputs.ts @@ -7,7 +7,7 @@ import { } from '../choices/tui-agent-launch-defaults' import { resolveStartupShell, type AgentStartupShell } from './tui-agent-startup-shell' import { terminalSessionOptionInputs } from './tui-agent-launch-command' -import { resolveLocalWindowsAgentStartupShell } from '../../windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../shell/launch/windows-terminal-shell' /** The settings slice a launch reads; hosts pass their whole `GlobalSettings` row. */ export type AgentStartupSettings = Partial< diff --git a/src/shared/agent-session/requests/structured-chat-dispatch-telemetry.ts b/src/shared/agent-session/requests/structured-chat-dispatch-telemetry.ts index bd95b05122f..72474000dcb 100644 --- a/src/shared/agent-session/requests/structured-chat-dispatch-telemetry.ts +++ b/src/shared/agent-session/requests/structured-chat-dispatch-telemetry.ts @@ -1,4 +1,4 @@ -import type { AgentKind } from '../../telemetry-property-schemas' +import type { AgentKind } from '../../telemetry/schemas/telemetry-property-schemas' export const STRUCTURED_CHAT_START_TELEMETRY_CLIENT_CAPABILITY = 'structured-chat-start-telemetry-v1' diff --git a/src/shared/agent-status/identity/agent-kind.ts b/src/shared/agent-status/identity/agent-kind.ts index d17b1995562..36dd6cc3320 100644 --- a/src/shared/agent-status/identity/agent-kind.ts +++ b/src/shared/agent-status/identity/agent-kind.ts @@ -1,6 +1,6 @@ // Share exhaustive launch-to-telemetry mapping between renderer and main so new agents retain distinct attribution. -import type { AgentKind } from '../../telemetry-property-schemas' +import type { AgentKind } from '../../telemetry/schemas/telemetry-property-schemas' import type { TuiAgent } from '../../agent-launch/catalog/tui-agent' type ConcreteAgentKind = Exclude diff --git a/src/shared/agent-status/process/agent-command-line-entrypoint.ts b/src/shared/agent-status/process/agent-command-line-entrypoint.ts index bd5d7035cd7..8aaae8efcc1 100644 --- a/src/shared/agent-status/process/agent-command-line-entrypoint.ts +++ b/src/shared/agent-status/process/agent-command-line-entrypoint.ts @@ -1,5 +1,5 @@ /** Resolve the entrypoint within interpreter argv separately from recognizing which agent it names. */ -import { NODE_INTERPRETER_OPTIONS_WITH_VALUE } from '../../node-interpreter-options' +import { NODE_INTERPRETER_OPTIONS_WITH_VALUE } from './node-interpreter-options' const PROCESS_EXTENSION_RE = /\.(?:exe|cmd|bat|ps1)$/i diff --git a/src/shared/foreground-process-selection.test.ts b/src/shared/agent-status/process/foreground-process-selection.test.ts similarity index 100% rename from src/shared/foreground-process-selection.test.ts rename to src/shared/agent-status/process/foreground-process-selection.test.ts diff --git a/src/shared/foreground-process-selection.ts b/src/shared/agent-status/process/foreground-process-selection.ts similarity index 98% rename from src/shared/foreground-process-selection.ts rename to src/shared/agent-status/process/foreground-process-selection.ts index 4dc0db33c06..0b077eb4648 100644 --- a/src/shared/foreground-process-selection.ts +++ b/src/shared/agent-status/process/foreground-process-selection.ts @@ -1,7 +1,7 @@ import { recognizeAgentProcessFromCommandLine, type RecognizedAgentProcess -} from './agent-status/process/agent-process-recognition' +} from './agent-process-recognition' export type ForegroundProcessCandidate = { pid: number diff --git a/src/shared/node-interpreter-options.ts b/src/shared/agent-status/process/node-interpreter-options.ts similarity index 100% rename from src/shared/node-interpreter-options.ts rename to src/shared/agent-status/process/node-interpreter-options.ts diff --git a/src/shared/browser/extensions/browser-extension-discovery-tour.ts b/src/shared/browser/extensions/browser-extension-discovery-tour.ts index 1d296b64487..67707487f35 100644 --- a/src/shared/browser/extensions/browser-extension-discovery-tour.ts +++ b/src/shared/browser/extensions/browser-extension-discovery-tour.ts @@ -1,4 +1,4 @@ -import type { ContextualTour } from '../../contextual-tours' +import type { ContextualTour } from '../../feature-education/contextual-tours/contextual-tours' export const BROWSER_EXTENSION_DISCOVERY_TOUR = { id: 'browser-extensions', diff --git a/src/shared/constants.ts b/src/shared/constants.ts index 757a4f3a076..05a844c4491 100644 --- a/src/shared/constants.ts +++ b/src/shared/constants.ts @@ -19,7 +19,7 @@ import { buildDefaultSettings } from './default-global-settings' import { DEFAULT_SETUP_AGENT_STARTUP_POLICY } from './agent-launch/startup/setup-agent-startup-policy' import { DEFAULT_BROWSER_PAGE_ZOOM_LEVEL } from './browser/site-settings/browser-page-zoom' import { getDefaultNotificationSettings } from './notification-settings-defaults' -import { getDefaultOnboardingState } from './onboarding-defaults' +import { getDefaultOnboardingState } from './onboarding/onboarding-defaults' import { defaultTerminalFontFamily, defaultTerminalFontWeight, diff --git a/src/shared/crash-breadcrumb-origin.ts b/src/shared/crash-reporting/crash-breadcrumb-origin.ts similarity index 100% rename from src/shared/crash-breadcrumb-origin.ts rename to src/shared/crash-reporting/crash-breadcrumb-origin.ts diff --git a/src/shared/crash-report-attribution-lines.ts b/src/shared/crash-reporting/crash-report-attribution-lines.ts similarity index 100% rename from src/shared/crash-report-attribution-lines.ts rename to src/shared/crash-reporting/crash-report-attribution-lines.ts diff --git a/src/shared/crash-report-exit-code.ts b/src/shared/crash-reporting/crash-report-exit-code.ts similarity index 100% rename from src/shared/crash-report-exit-code.ts rename to src/shared/crash-reporting/crash-report-exit-code.ts diff --git a/src/shared/crash-report-redaction.ts b/src/shared/crash-reporting/crash-report-redaction.ts similarity index 100% rename from src/shared/crash-report-redaction.ts rename to src/shared/crash-reporting/crash-report-redaction.ts diff --git a/src/shared/crash-report-signature-lines.ts b/src/shared/crash-reporting/crash-report-signature-lines.ts similarity index 100% rename from src/shared/crash-report-signature-lines.ts rename to src/shared/crash-reporting/crash-report-signature-lines.ts diff --git a/src/shared/crash-reporting-diagnostic-bundle.ts b/src/shared/crash-reporting/crash-reporting-diagnostic-bundle.ts similarity index 100% rename from src/shared/crash-reporting-diagnostic-bundle.ts rename to src/shared/crash-reporting/crash-reporting-diagnostic-bundle.ts diff --git a/src/shared/crash-reporting.test.ts b/src/shared/crash-reporting/crash-reporting.test.ts similarity index 96% rename from src/shared/crash-reporting.test.ts rename to src/shared/crash-reporting/crash-reporting.test.ts index 078da5f3317..22e9d906268 100644 --- a/src/shared/crash-reporting.test.ts +++ b/src/shared/crash-reporting/crash-reporting.test.ts @@ -1,9 +1,6 @@ import { describe, expect, it } from 'vitest' -import { - formatCrashReportText, - sanitizeCrashReportString, - type CrashReportRecord -} from './crash-reporting' +import { formatCrashReportText, type CrashReportRecord } from './crash-reporting' +import { sanitizeCrashReportString } from './crash-report-redaction' function notesReport(overrides: Partial = {}): CrashReportRecord { return { diff --git a/src/shared/crash-reporting.ts b/src/shared/crash-reporting/crash-reporting.ts similarity index 97% rename from src/shared/crash-reporting.ts rename to src/shared/crash-reporting/crash-reporting.ts index 8ea00213585..b9cdc9d51b9 100644 --- a/src/shared/crash-reporting.ts +++ b/src/shared/crash-reporting/crash-reporting.ts @@ -8,14 +8,6 @@ import { appendBoundaryAttributionLines } from './crash-report-attribution-lines import type { CrashReportAttribution } from './react-update-depth-attribution' import { sanitizeCrashReportString } from './crash-report-redaction' -export { - sanitizeCrashReportBreadcrumbs, - sanitizeCrashReportDetails, - sanitizeCrashReportString -} from './crash-report-redaction' - -export type { CrashReportDiagnosticBundle } from './crash-reporting-diagnostic-bundle' - export type CrashReportStatus = 'pending' | 'sent' | 'dismissed' export type CrashReportSource = 'renderer' | 'child' diff --git a/src/shared/posix-wait-status.ts b/src/shared/crash-reporting/posix-wait-status.ts similarity index 100% rename from src/shared/posix-wait-status.ts rename to src/shared/crash-reporting/posix-wait-status.ts diff --git a/src/shared/react-update-depth-attribution.ts b/src/shared/crash-reporting/react-update-depth-attribution.ts similarity index 100% rename from src/shared/react-update-depth-attribution.ts rename to src/shared/crash-reporting/react-update-depth-attribution.ts diff --git a/src/shared/renderer-heap-statistics.ts b/src/shared/crash-reporting/renderer-heap-statistics.ts similarity index 100% rename from src/shared/renderer-heap-statistics.ts rename to src/shared/crash-reporting/renderer-heap-statistics.ts diff --git a/src/shared/renderer-process-memory.ts b/src/shared/crash-reporting/renderer-process-memory.ts similarity index 100% rename from src/shared/renderer-process-memory.ts rename to src/shared/crash-reporting/renderer-process-memory.ts diff --git a/src/shared/diagnostics-bundle-failure-copy.ts b/src/shared/diagnostics/bundles/diagnostics-bundle-failure-copy.ts similarity index 100% rename from src/shared/diagnostics-bundle-failure-copy.ts rename to src/shared/diagnostics/bundles/diagnostics-bundle-failure-copy.ts diff --git a/src/shared/process-stats-types.ts b/src/shared/diagnostics/process-stats-types.ts similarity index 100% rename from src/shared/process-stats-types.ts rename to src/shared/diagnostics/process-stats-types.ts diff --git a/src/shared/contextual-tour-action-steps.ts b/src/shared/feature-education/contextual-tours/contextual-tour-action-steps.ts similarity index 90% rename from src/shared/contextual-tour-action-steps.ts rename to src/shared/feature-education/contextual-tours/contextual-tour-action-steps.ts index 12228cba4d9..32342de2919 100644 --- a/src/shared/contextual-tour-action-steps.ts +++ b/src/shared/feature-education/contextual-tours/contextual-tour-action-steps.ts @@ -1,4 +1,7 @@ -import { hasFeatureInteraction, type FeatureInteractionState } from './feature-interactions' +import { + hasFeatureInteraction, + type FeatureInteractionState +} from '../interactions/feature-interactions' import type { ContextualTour, ContextualTourStep } from './contextual-tours' // A step that waits for a user action is done only once that action succeeded, never when it is shown. diff --git a/src/shared/contextual-tours.ts b/src/shared/feature-education/contextual-tours/contextual-tours.ts similarity index 98% rename from src/shared/contextual-tours.ts rename to src/shared/feature-education/contextual-tours/contextual-tours.ts index 55030f778bd..a8ea7ab6e04 100644 --- a/src/shared/contextual-tours.ts +++ b/src/shared/feature-education/contextual-tours/contextual-tours.ts @@ -1,5 +1,5 @@ -import { BROWSER_EXTENSION_DISCOVERY_TOUR } from './browser/extensions/browser-extension-discovery-tour' -import type { FeatureInteractionId } from './feature-interactions' +import { BROWSER_EXTENSION_DISCOVERY_TOUR } from '../../browser/extensions/browser-extension-discovery-tour' +import type { FeatureInteractionId } from '../interactions/feature-interaction-catalog' export type ContextualTourId = | 'workspace-board' diff --git a/src/shared/agents-orchestration-steps.ts b/src/shared/feature-education/explore/agents-orchestration-steps.ts similarity index 100% rename from src/shared/agents-orchestration-steps.ts rename to src/shared/feature-education/explore/agents-orchestration-steps.ts diff --git a/src/shared/feature-wall-setup-steps.ts b/src/shared/feature-education/explore/feature-wall-setup-steps.ts similarity index 100% rename from src/shared/feature-wall-setup-steps.ts rename to src/shared/feature-education/explore/feature-wall-setup-steps.ts diff --git a/src/shared/feature-wall-telemetry.ts b/src/shared/feature-education/explore/feature-wall-telemetry.ts similarity index 100% rename from src/shared/feature-wall-telemetry.ts rename to src/shared/feature-education/explore/feature-wall-telemetry.ts diff --git a/src/shared/feature-wall-tiles.ts b/src/shared/feature-education/explore/feature-wall-tiles.ts similarity index 100% rename from src/shared/feature-wall-tiles.ts rename to src/shared/feature-education/explore/feature-wall-tiles.ts diff --git a/src/shared/feature-wall-tour-depth.ts b/src/shared/feature-education/explore/feature-wall-tour-depth.ts similarity index 100% rename from src/shared/feature-wall-tour-depth.ts rename to src/shared/feature-education/explore/feature-wall-tour-depth.ts diff --git a/src/shared/feature-wall-workflows.ts b/src/shared/feature-education/explore/feature-wall-workflows.ts similarity index 100% rename from src/shared/feature-wall-workflows.ts rename to src/shared/feature-education/explore/feature-wall-workflows.ts diff --git a/src/shared/review-steps.ts b/src/shared/feature-education/explore/review-steps.ts similarity index 100% rename from src/shared/review-steps.ts rename to src/shared/feature-education/explore/review-steps.ts diff --git a/src/shared/workbench-steps.ts b/src/shared/feature-education/explore/workbench-steps.ts similarity index 100% rename from src/shared/workbench-steps.ts rename to src/shared/feature-education/explore/workbench-steps.ts diff --git a/src/shared/feature-education-telemetry.ts b/src/shared/feature-education/feature-education-telemetry.ts similarity index 96% rename from src/shared/feature-education-telemetry.ts rename to src/shared/feature-education/feature-education-telemetry.ts index 9fb248f9936..1868c219fd1 100644 --- a/src/shared/feature-education-telemetry.ts +++ b/src/shared/feature-education/feature-education-telemetry.ts @@ -1,4 +1,4 @@ -import type { ContextualTourId } from './contextual-tours' +import type { ContextualTourId } from './contextual-tours/contextual-tours' export const FEATURE_EDUCATION_CONTEXTUAL_TOUR_IDS = [ 'workspace-board', diff --git a/src/shared/feature-tips.ts b/src/shared/feature-education/feature-tips.ts similarity index 97% rename from src/shared/feature-tips.ts rename to src/shared/feature-education/feature-tips.ts index e58d794234e..74de25aca72 100644 --- a/src/shared/feature-tips.ts +++ b/src/shared/feature-education/feature-tips.ts @@ -1,9 +1,9 @@ import { hasFeatureInteraction, - type FeatureInteractionId, type FeatureInteractionState -} from './feature-interactions' -import type { TelemetrySettings } from './telemetry-settings-types' +} from './interactions/feature-interactions' +import type { FeatureInteractionId } from './interactions/feature-interaction-catalog' +import type { TelemetrySettings } from '../telemetry/telemetry-settings-types' export type FeatureTipId = | 'chat-ui-here' diff --git a/src/shared/feature-interaction-catalog.ts b/src/shared/feature-education/interactions/feature-interaction-catalog.ts similarity index 100% rename from src/shared/feature-interaction-catalog.ts rename to src/shared/feature-education/interactions/feature-interaction-catalog.ts diff --git a/src/shared/feature-interaction-categories.ts b/src/shared/feature-education/interactions/feature-interaction-categories.ts similarity index 100% rename from src/shared/feature-interaction-categories.ts rename to src/shared/feature-education/interactions/feature-interaction-categories.ts diff --git a/src/shared/feature-interaction-usage-buckets.ts b/src/shared/feature-education/interactions/feature-interaction-usage-buckets.ts similarity index 100% rename from src/shared/feature-interaction-usage-buckets.ts rename to src/shared/feature-education/interactions/feature-interaction-usage-buckets.ts diff --git a/src/shared/feature-interactions.ts b/src/shared/feature-education/interactions/feature-interactions.ts similarity index 80% rename from src/shared/feature-interactions.ts rename to src/shared/feature-education/interactions/feature-interactions.ts index 8366131e717..ad65b4f9482 100644 --- a/src/shared/feature-interactions.ts +++ b/src/shared/feature-education/interactions/feature-interactions.ts @@ -4,27 +4,6 @@ import { type FeatureInteractionUsageBucket } from './feature-interaction-usage-buckets' -export { - FEATURE_INTERACTIONS, - FEATURE_INTERACTION_IDS, - type FeatureInteractionDefinition, - type FeatureInteractionId -} from './feature-interaction-catalog' -export { - FEATURE_INTERACTION_CATEGORIES, - FEATURE_INTERACTION_CATEGORY_BY_ID, - getFeatureInteractionCategory, - type FeatureInteractionCategory -} from './feature-interaction-categories' -export { - compareFeatureInteractionUsageBuckets, - FEATURE_INTERACTION_USAGE_BUCKETS, - FEATURE_INTERACTION_USAGE_BUCKET_SPECS, - getFeatureInteractionUsageBucket, - isFeatureInteractionUsageBucket, - type FeatureInteractionUsageBucket -} from './feature-interaction-usage-buckets' - export type FeatureInteractionRecord = { /** Unix timestamp in milliseconds for the first local interaction. */ firstInteractedAt: number diff --git a/src/shared/feedback-image-limits.ts b/src/shared/feedback/feedback-image-limits.ts similarity index 100% rename from src/shared/feedback-image-limits.ts rename to src/shared/feedback/feedback-image-limits.ts diff --git a/src/shared/feedback-submit-contract.ts b/src/shared/feedback/feedback-submit-contract.ts similarity index 100% rename from src/shared/feedback-submit-contract.ts rename to src/shared/feedback/feedback-submit-contract.ts diff --git a/src/shared/global-settings-types.ts b/src/shared/global-settings-types.ts index 684ac7f0f07..4c2e0ab83dd 100644 --- a/src/shared/global-settings-types.ts +++ b/src/shared/global-settings-types.ts @@ -1,5 +1,5 @@ import type { AgentLaunchChoices } from './agent-launch/choices/agent-launch-choices' -import type { TelemetrySettings } from './telemetry-settings-types' +import type { TelemetrySettings } from './telemetry/telemetry-settings-types' import type { BrowserProfileScope } from './browser/profiles/browser-profile-scope' import type { GlobalSettingsBase } from './global-settings-base' import type { ExecutionHostId } from './execution-host' diff --git a/src/shared/macos-symbolic-hotkeys.ts b/src/shared/keybindings/macos-symbolic-hotkeys.ts similarity index 95% rename from src/shared/macos-symbolic-hotkeys.ts rename to src/shared/keybindings/macos-symbolic-hotkeys.ts index 096ede1f2a0..ac894a07442 100644 --- a/src/shared/macos-symbolic-hotkeys.ts +++ b/src/shared/keybindings/macos-symbolic-hotkeys.ts @@ -1,11 +1,7 @@ -import { - getEffectiveKeybindingsForDefinition, - getKeybindingConflictIdentity, - isDigitIndexActionId, - type KeybindingActionId, - type KeybindingDefinition, - type KeybindingOverrides -} from './keybindings' +import { getEffectiveKeybindingsForDefinition } from './effective' +import { getKeybindingConflictIdentity } from './matching-key' +import { isDigitIndexActionId } from './definitions' +import type { KeybindingActionId, KeybindingDefinition, KeybindingOverrides } from './types' export type MacDigitRowCode = | 'Digit1' diff --git a/src/shared/onboarding-defaults.ts b/src/shared/onboarding/onboarding-defaults.ts similarity index 100% rename from src/shared/onboarding-defaults.ts rename to src/shared/onboarding/onboarding-defaults.ts diff --git a/src/shared/onboarding-state-types.ts b/src/shared/onboarding/onboarding-state-types.ts similarity index 100% rename from src/shared/onboarding-state-types.ts rename to src/shared/onboarding/onboarding-state-types.ts diff --git a/src/shared/persisted-state-types.ts b/src/shared/persisted-state-types.ts index 8ca280451d3..62ad186a610 100644 --- a/src/shared/persisted-state-types.ts +++ b/src/shared/persisted-state-types.ts @@ -8,7 +8,7 @@ import type { import type { Automation } from './automations/automation-definition' import type { AutomationRun } from './automations/history/automation-run' import type { MigrationUnsupportedPtyEntry } from './agent-status/contracts/agent-status-ipc-payload' -import type { FeatureInteractionTelemetryBucketState } from './feature-interactions' +import type { FeatureInteractionTelemetryBucketState } from './feature-education/interactions/feature-interactions' import type { CodexResetCreditAttemptLedger } from './codex-reset-credit-attempt-ledger' import type { ChatUiLaunchTipAudience } from './native-chat/chat-ui-launch-tip-audience' import type { DiffComment } from './diff-comment-types' @@ -16,7 +16,7 @@ import type { FolderWorkspace } from './folder-workspaces/folder-workspace-types import type { WorkspaceKey } from './workspace-scope' import type { GlobalSettings } from './global-settings-types' import type { IssueInfo, PRInfo } from './github/pull-requests/pull-request-types' -import type { OnboardingState } from './onboarding-state-types' +import type { OnboardingState } from './onboarding/onboarding-state-types' import type { PersistedUIState } from './persisted-ui-state-types' import type { ProjectGroup } from './project-group-types' import type { RemoteLayoutSnapshot } from './remote-runtime/session-graph/remote-layout-snapshot' diff --git a/src/shared/persisted-ui-state-types.ts b/src/shared/persisted-ui-state-types.ts index 533b46cff0b..94f5b6987f0 100644 --- a/src/shared/persisted-ui-state-types.ts +++ b/src/shared/persisted-ui-state-types.ts @@ -4,9 +4,9 @@ import type { BrowserDevToolsDockLayout } from './browser/devtools/browser-devto import type { JiraSavedFilterState } from './jira/jira-saved-filters' import type { ReleaseChannel } from './release-channel' import type { WorkspaceCleanupUIState } from './workspace-cleanup/workspace-cleanup' -import type { FeatureTipSeenId } from './feature-tips' -import type { ContextualTourId } from './contextual-tours' -import type { FeatureInteractionState } from './feature-interactions' +import type { FeatureTipSeenId } from './feature-education/feature-tips' +import type { ContextualTourId } from './feature-education/contextual-tours/contextual-tours' +import type { FeatureInteractionState } from './feature-education/interactions/feature-interactions' import type { UsagePercentageDisplay } from './usage-percentage-display' import type { StatusBarUsageMode } from './status-bar-usage-mode' import type { StatusBarUsageFormat } from './status-bar-usage-format' diff --git a/src/shared/windows-mobile-firewall.ts b/src/shared/remote-runtime/pairing/windows-mobile-firewall.ts similarity index 100% rename from src/shared/windows-mobile-firewall.ts rename to src/shared/remote-runtime/pairing/windows-mobile-firewall.ts diff --git a/src/shared/rpc-contract/client-ui/client-ui-params.ts b/src/shared/rpc-contract/client-ui/client-ui-params.ts index 99ccbb4e55b..87e0a1be2b4 100644 --- a/src/shared/rpc-contract/client-ui/client-ui-params.ts +++ b/src/shared/rpc-contract/client-ui/client-ui-params.ts @@ -1,13 +1,13 @@ import { GitHistoryRefName } from '../source-control/git-params' import { z } from 'zod' -import { isFeatureTipSeenId } from '../../feature-tips' +import { isFeatureTipSeenId } from '../../feature-education/feature-tips' import { WORKTREE_CARD_PROPERTIES, normalizeWorktreeCardProperties } from '../../worktree/row-display/card-properties' import { isPluginPanelTabKey } from '../../plugins/frames/plugin-tab-key' -import { isFeatureInteractionId } from '../../feature-interactions' -import type { FeatureInteractionId } from '../../feature-interaction-catalog' +import { isFeatureInteractionId } from '../../feature-education/interactions/feature-interactions' +import type { FeatureInteractionId } from '../../feature-education/interactions/feature-interaction-catalog' import { ACTIVITY_GROUP_BY_VALUES, THREAD_READ_FILTER_VALUES diff --git a/src/shared/rpc-contract/terminal/terminal-unary-params.ts b/src/shared/rpc-contract/terminal/terminal-unary-params.ts index bdcaa2f8acd..31bfaf72e3e 100644 --- a/src/shared/rpc-contract/terminal/terminal-unary-params.ts +++ b/src/shared/rpc-contract/terminal/terminal-unary-params.ts @@ -7,8 +7,8 @@ import { canonicalizeWindowsShellOverride, isSupportedWindowsShellOverride, listSupportedWindowsShellOverrides -} from '../../windows-terminal-shell' -import { TERMINAL_PANE_SPLIT_SOURCES } from '../../feature-education-telemetry' +} from '../../shell/launch/windows-terminal-shell' +import { TERMINAL_PANE_SPLIT_SOURCES } from '../../feature-education/feature-education-telemetry' import { OptionalExecutionHostId } from '../workspaces/worktree-params' import { AGENT_STATUS_INTERACTIVE_PROMPT_MAX_LENGTH } from '../../agent-status/contracts/agent-status-types' diff --git a/src/shared/rpc-contract/workspaces/worktree-create-params.ts b/src/shared/rpc-contract/workspaces/worktree-create-params.ts index e5f3b095c27..56872a63846 100644 --- a/src/shared/rpc-contract/workspaces/worktree-create-params.ts +++ b/src/shared/rpc-contract/workspaces/worktree-create-params.ts @@ -2,7 +2,7 @@ import { z } from 'zod' import { WorkspaceAttachmentsSchema } from '../../workspace-attachments/workspace-attachment-schema' import { WorkspaceLinkedItemSchema } from '../../workspace-attachments/workspace-linked-item-schema' import { TaskSourceContextSchema } from '../../work-items/task-source-context-schema' -import { workspaceSourceSchema } from '../../telemetry-property-schemas' +import { workspaceSourceSchema } from '../../telemetry/schemas/telemetry-property-schemas' import { RUNTIME_NAVIGATION_TARGETS } from '../../remote-runtime/session-graph/runtime-navigation' import { sleepingAgentLaunchConfigSchema } from '../../workspace-session/workspace-session-sleeping-agents' import { isTuiAgent } from '../../agent-launch/catalog/tui-agent-config' diff --git a/src/shared/windows-terminal-shell.ts b/src/shared/shell/launch/windows-terminal-shell.ts similarity index 97% rename from src/shared/windows-terminal-shell.ts rename to src/shared/shell/launch/windows-terminal-shell.ts index 9a462c14633..a409e801528 100644 --- a/src/shared/windows-terminal-shell.ts +++ b/src/shared/shell/launch/windows-terminal-shell.ts @@ -1,4 +1,4 @@ -import type { AgentStartupShell } from './agent-launch/startup/tui-agent-startup-shell' +import type { AgentStartupShell } from '../../agent-launch/startup/tui-agent-startup-shell' export const WINDOWS_GIT_BASH_SHELL = 'git-bash' diff --git a/src/shared/telemetry-events.ts b/src/shared/telemetry-events.ts deleted file mode 100644 index bf03e4eaf96..00000000000 --- a/src/shared/telemetry-events.ts +++ /dev/null @@ -1,67 +0,0 @@ -// Infer event types from the runtime schema registry to prevent drift; strict objects reject extra keys and strings have explicit caps. - -export { - AGENT_KIND_VALUES, - SETTINGS_CHANGED_WHITELIST, - addRepoDefaultCheckoutHandoffReasonSchema, - addRepoDefaultCheckoutHandoffResultSchema, - addRepoDefaultCheckoutHandoffSourceSchema, - addRepoExistingWorkspaceSourceSchema, - addRepoSetupStepActionSchema, - agentKindSchema, - errorClassSchema, - featureWallExitActionSchema, - featureWallOpenSourceSchema, - featureWallTileIdSchema, - featureWallTourDepthStepSchema, - featureWallWorkflowIdSchema, - launchSourceSchema, - optInViaSchema, - repoMethodSchema, - requestKindSchema, - settingsChangedKeySchema, - setupScriptImportProviderSchema, - workspaceCreateErrorClassSchema, - workspaceSourceSchema -} from './telemetry-property-schemas' -export type { - AddRepoDefaultCheckoutHandoffSource, - AddRepoExistingWorkspaceSource, - AgentKind, - ErrorClass, - FeatureWallOpenSourceTelemetry, - LaunchSource, - OptInVia, - RepoMethod, - RequestKind, - SettingsChangedKey, - WorkspaceCreateErrorClass, - WorkspaceSource -} from './telemetry-property-schemas' - -export { - featureInteractionCategorySchema, - featureInteractionIdSchema, - featureInteractionUsageBucketSchema, - featureInteractionUsageBucketSourceSchema -} from './telemetry-app-event-schemas' -export { - hookInstallAgentSchema, - profileStateAuthoritySelectedSchema, - runtimeRpcStartErrorClassSchema -} from './telemetry-daemon-event-schemas' -export type { HookInstallAgent, RuntimeRpcStartErrorClass } from './telemetry-daemon-event-schemas' -export type { NativeChatRuntime } from './telemetry-native-feature-event-schemas' -export { eventSchemas } from './telemetry-event-registry' -export { - commonPropsSchema, - isCohortExtendedEvent, - isOnboardingEvent -} from './telemetry-event-classification' -export type { - CommonProps, - EventMap, - EventName, - EventProps, - OnboardingCohort -} from './telemetry-event-classification' diff --git a/src/shared/daemon-adoption-telemetry.ts b/src/shared/telemetry/daemon-adoption-telemetry.ts similarity index 100% rename from src/shared/daemon-adoption-telemetry.ts rename to src/shared/telemetry/daemon-adoption-telemetry.ts diff --git a/src/shared/daemon-lifecycle-telemetry.ts b/src/shared/telemetry/daemon-lifecycle-telemetry.ts similarity index 100% rename from src/shared/daemon-lifecycle-telemetry.ts rename to src/shared/telemetry/daemon-lifecycle-telemetry.ts diff --git a/src/shared/nested-repo-telemetry.test.ts b/src/shared/telemetry/nested-repo-telemetry.test.ts similarity index 100% rename from src/shared/nested-repo-telemetry.test.ts rename to src/shared/telemetry/nested-repo-telemetry.test.ts diff --git a/src/shared/nested-repo-telemetry.ts b/src/shared/telemetry/nested-repo-telemetry.ts similarity index 98% rename from src/shared/nested-repo-telemetry.ts rename to src/shared/telemetry/nested-repo-telemetry.ts index 48ac131cebf..06d68968777 100644 --- a/src/shared/nested-repo-telemetry.ts +++ b/src/shared/telemetry/nested-repo-telemetry.ts @@ -2,8 +2,8 @@ import type { NestedRepoScanResult, ProjectGroupImportMode, ProjectGroupImportResult -} from './project-group-types' -import { createNonSecureContextUuid } from './non-secure-context-uuid' +} from '../project-group-types' +import { createNonSecureContextUuid } from '../non-secure-context-uuid' export const NESTED_REPO_TELEMETRY_MAX_REPO_COUNT = 500 diff --git a/src/shared/telemetry-agent-dashboard-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-agent-dashboard-event-schemas.ts similarity index 100% rename from src/shared/telemetry-agent-dashboard-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-agent-dashboard-event-schemas.ts diff --git a/src/shared/telemetry-agent-token-usage-schema.ts b/src/shared/telemetry/schemas/telemetry-agent-token-usage-schema.ts similarity index 100% rename from src/shared/telemetry-agent-token-usage-schema.ts rename to src/shared/telemetry/schemas/telemetry-agent-token-usage-schema.ts diff --git a/src/shared/telemetry-app-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-app-event-schemas.ts similarity index 91% rename from src/shared/telemetry-app-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-app-event-schemas.ts index ef960afb176..8e50d627488 100644 --- a/src/shared/telemetry-app-event-schemas.ts +++ b/src/shared/telemetry/schemas/telemetry-app-event-schemas.ts @@ -1,17 +1,17 @@ import { z } from 'zod' -import { appStarSourceSchema } from './gh-star-source' +import { appStarSourceSchema } from '../../gh-star-source' import { FEATURE_INTERACTION_CATEGORIES, - FEATURE_INTERACTION_IDS, - FEATURE_INTERACTION_USAGE_BUCKETS, getFeatureInteractionCategory -} from './feature-interactions' +} from '../../feature-education/interactions/feature-interaction-categories' +import { FEATURE_INTERACTION_IDS } from '../../feature-education/interactions/feature-interaction-catalog' +import { FEATURE_INTERACTION_USAGE_BUCKETS } from '../../feature-education/interactions/feature-interaction-usage-buckets' import { starNagAgentBucketSchema, starNagOutcomeSchema, starNagPromptModeSchema, starNagPromptSourceSchema -} from './star-nag-telemetry' +} from '../star-nag-telemetry' import { agentKindSchema, errorClassSchema, diff --git a/src/shared/telemetry-daemon-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-daemon-event-schemas.ts similarity index 97% rename from src/shared/telemetry-daemon-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-daemon-event-schemas.ts index 23ce7358a08..fa0a71049a3 100644 --- a/src/shared/telemetry-daemon-event-schemas.ts +++ b/src/shared/telemetry/schemas/telemetry-daemon-event-schemas.ts @@ -1,12 +1,12 @@ import { z } from 'zod' -import { AGENT_HOOK_TARGETS } from './agent-hook-listener/configuration/agent-hook-types' -import { ERRNO_CODE_PATTERN } from './errno-code' +import { AGENT_HOOK_TARGETS } from '../../agent-hook-listener/configuration/agent-hook-types' +import { ERRNO_CODE_PATTERN } from '../../errno-code' import { DAEMON_LIFECYCLE_SESSION_BUCKETS, DAEMON_LIFECYCLE_TRANSITIONS, DAEMON_REPLACE_REASONS, DAEMON_RETIRE_REASONS -} from './daemon-lifecycle-telemetry' +} from '../daemon-lifecycle-telemetry' import { DAEMON_AUDIT_GENERATION_ROLE_VALUES, DAEMON_AUDIT_PROCESS_REASON_VALUES, @@ -14,7 +14,7 @@ import { DAEMON_AUDIT_STATE_VALUES, DAEMON_AUDIT_TRIGGER_VALUES, DAEMON_EVIDENCE_SOURCE_VALUES -} from './daemon-audit-eligibility' +} from '../../daemon-audit-eligibility' import { DAEMON_ADOPTED_APP_VERSION_MATCH, DAEMON_CODE_IDENTITY_VALUES, @@ -22,7 +22,7 @@ import { DAEMON_SPAWNER_PATH_CLASSES, DAEMON_TCC_ATTRIBUTION_VALUES, MAC_TCC_FOLDER_CLASSES -} from './daemon-adoption-telemetry' +} from '../daemon-adoption-telemetry' import { ELAPSED_BUCKETS, FOLDER_FLAG_VALUES, @@ -41,7 +41,7 @@ import { TCC_SERVICE_VALUES, VOLUME_TYPE_VALUES, YES_NO_VALUES -} from './daemon-tcc-denial-capture' +} from '../../daemon-tcc-denial-capture' import { errorClassSchema, settingsChangedKeySchema } from './telemetry-property-schemas' // Enum-only start-failure signals diagnose fleet outages without sending raw stderr (v1.4.129-rc.1). diff --git a/src/shared/telemetry-feature-education-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-feature-education-event-schemas.ts similarity index 96% rename from src/shared/telemetry-feature-education-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-feature-education-event-schemas.ts index 72a7c76bb93..30ff45ca5ff 100644 --- a/src/shared/telemetry-feature-education-event-schemas.ts +++ b/src/shared/telemetry/schemas/telemetry-feature-education-event-schemas.ts @@ -6,8 +6,8 @@ import { SETUP_GUIDE_CLOSE_OUTCOMES, SETUP_GUIDE_SOURCES, TERMINAL_PANE_SPLIT_SOURCES -} from './feature-education-telemetry' -import { FEATURE_WALL_SETUP_STEP_IDS } from './feature-wall-setup-steps' +} from '../../feature-education/feature-education-telemetry' +import { FEATURE_WALL_SETUP_STEP_IDS } from '../../feature-education/explore/feature-wall-setup-steps' export const featureEducationSourceSchema = z.enum(FEATURE_EDUCATION_SOURCES) export const featureEducationContextualTourIdSchema = z.enum(FEATURE_EDUCATION_CONTEXTUAL_TOUR_IDS) diff --git a/src/shared/telemetry-native-feature-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-native-feature-event-schemas.ts similarity index 98% rename from src/shared/telemetry-native-feature-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-native-feature-event-schemas.ts index 23eb38c3833..baabeec06de 100644 --- a/src/shared/telemetry-native-feature-event-schemas.ts +++ b/src/shared/telemetry/schemas/telemetry-native-feature-event-schemas.ts @@ -1,5 +1,5 @@ import { z } from 'zod' -import { FEATURE_WALL_MAX_DWELL_MS } from './feature-wall-telemetry' +import { FEATURE_WALL_MAX_DWELL_MS } from '../../feature-education/explore/feature-wall-telemetry' import { nthRepoAddedSchema } from './telemetry-app-event-schemas' import { agentKindSchema, diff --git a/src/shared/telemetry-onboarding-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-onboarding-event-schemas.ts similarity index 97% rename from src/shared/telemetry-onboarding-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-onboarding-event-schemas.ts index f9971466a42..709e9eab56d 100644 --- a/src/shared/telemetry-onboarding-event-schemas.ts +++ b/src/shared/telemetry/schemas/telemetry-onboarding-event-schemas.ts @@ -1,10 +1,10 @@ import { z } from 'zod' -import { FEATURE_WALL_MAX_DWELL_MS } from './feature-wall-telemetry' -import type { DiscoveryStatusEmitted } from './onboarding-state-types' +import { FEATURE_WALL_MAX_DWELL_MS } from '../../feature-education/explore/feature-wall-telemetry' +import type { DiscoveryStatusEmitted } from '../../onboarding/onboarding-state-types' import type { PathSource, ShellHydrationFailureReason -} from './shell/launch/shell-path-hydration-types' +} from '../../shell/launch/shell-path-hydration-types' import { agentKindSchema, featureWallTourDepthStepSchema } from './telemetry-property-schemas' import { cohortSchema, diff --git a/src/shared/telemetry-onboarding-foundation-schemas.ts b/src/shared/telemetry/schemas/telemetry-onboarding-foundation-schemas.ts similarity index 97% rename from src/shared/telemetry-onboarding-foundation-schemas.ts rename to src/shared/telemetry/schemas/telemetry-onboarding-foundation-schemas.ts index f26db348e69..8672ff0590e 100644 --- a/src/shared/telemetry-onboarding-foundation-schemas.ts +++ b/src/shared/telemetry/schemas/telemetry-onboarding-foundation-schemas.ts @@ -1,5 +1,5 @@ import { z } from 'zod' -import type { OnboardingChecklistState } from './onboarding-state-types' +import type { OnboardingChecklistState } from '../../onboarding/onboarding-state-types' // Activation telemetry excludes raw paths, repo names, URLs and errors; retain legacy seven-step payload compatibility. export const ONBOARDING_TELEMETRY_LEGACY_MAX_STEP = 7 diff --git a/src/shared/telemetry-onboarding-language-schemas.ts b/src/shared/telemetry/schemas/telemetry-onboarding-language-schemas.ts similarity index 100% rename from src/shared/telemetry-onboarding-language-schemas.ts rename to src/shared/telemetry/schemas/telemetry-onboarding-language-schemas.ts diff --git a/src/shared/telemetry-plugin-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-plugin-event-schemas.ts similarity index 92% rename from src/shared/telemetry-plugin-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-plugin-event-schemas.ts index 03b2a4b6361..e074c158836 100644 --- a/src/shared/telemetry-plugin-event-schemas.ts +++ b/src/shared/telemetry/schemas/telemetry-plugin-event-schemas.ts @@ -1,5 +1,5 @@ import { z } from 'zod' -import { isQualifiedPluginKey } from './plugins/frames/plugin-tab-key' +import { isQualifiedPluginKey } from '../../plugins/frames/plugin-tab-key' // Why only these two: both catalogs are public, so a key from them names nothing private. // Private catalogs, git URLs, local folders and dev plugins never report. diff --git a/src/shared/telemetry-property-schemas.ts b/src/shared/telemetry/schemas/telemetry-property-schemas.ts similarity index 93% rename from src/shared/telemetry-property-schemas.ts rename to src/shared/telemetry/schemas/telemetry-property-schemas.ts index 78ec3093374..e110d6c3690 100644 --- a/src/shared/telemetry-property-schemas.ts +++ b/src/shared/telemetry/schemas/telemetry-property-schemas.ts @@ -1,8 +1,11 @@ import { z } from 'zod' -import { FEATURE_WALL_EXIT_ACTIONS, FEATURE_WALL_TOUR_DEPTH_STEPS } from './feature-wall-tour-depth' -import { SETUP_SCRIPT_IMPORT_PROVIDERS } from './workspace-setup/setup-script-import-providers' -import { WORKSPACE_SOURCE_VALUES, type WorkspaceSource } from './workspace-source' -import type { GlobalSettings } from './global-settings-types' +import { + FEATURE_WALL_EXIT_ACTIONS, + FEATURE_WALL_TOUR_DEPTH_STEPS +} from '../../feature-education/explore/feature-wall-tour-depth' +import { SETUP_SCRIPT_IMPORT_PROVIDERS } from '../../workspace-setup/setup-script-import-providers' +import { WORKSPACE_SOURCE_VALUES } from '../../workspace-source' +import type { GlobalSettings } from '../../global-settings-types' // Wire names use product names (claude-code for the claude CLI); tuiAgentToAgentKind maps unknowns to other. export const AGENT_KIND_VALUES = [ @@ -121,7 +124,6 @@ export const workspaceCreateErrorClassSchema = z.enum([ export type WorkspaceCreateErrorClass = z.infer export const workspaceSourceSchema = z.enum(WORKSPACE_SOURCE_VALUES) -export type { WorkspaceSource } export const launchSourceSchema = z.enum([ 'command_palette', diff --git a/src/shared/telemetry-protected-milestone-schemas.ts b/src/shared/telemetry/schemas/telemetry-protected-milestone-schemas.ts similarity index 100% rename from src/shared/telemetry-protected-milestone-schemas.ts rename to src/shared/telemetry/schemas/telemetry-protected-milestone-schemas.ts diff --git a/src/shared/telemetry-repository-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-repository-event-schemas.ts similarity index 99% rename from src/shared/telemetry-repository-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-repository-event-schemas.ts index 6155765d08f..4f40f371259 100644 --- a/src/shared/telemetry-repository-event-schemas.ts +++ b/src/shared/telemetry/schemas/telemetry-repository-event-schemas.ts @@ -8,7 +8,7 @@ import { NESTED_REPO_TELEMETRY_RUNTIME_KINDS, NESTED_REPO_TELEMETRY_SURFACES, bucketNestedRepoTelemetryCount -} from './nested-repo-telemetry' +} from '../nested-repo-telemetry' import { nthRepoAddedSchema } from './telemetry-app-event-schemas' import { workspaceCreateFailedProperties } from './telemetry-workspace-create-schemas' import { diff --git a/src/shared/telemetry-ssh-host-server-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-ssh-host-server-event-schemas.ts similarity index 100% rename from src/shared/telemetry-ssh-host-server-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-ssh-host-server-event-schemas.ts diff --git a/src/shared/telemetry-ssh-runtime-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-ssh-runtime-event-schemas.ts similarity index 100% rename from src/shared/telemetry-ssh-runtime-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-ssh-runtime-event-schemas.ts diff --git a/src/shared/telemetry-workspace-create-schemas.ts b/src/shared/telemetry/schemas/telemetry-workspace-create-schemas.ts similarity index 98% rename from src/shared/telemetry-workspace-create-schemas.ts rename to src/shared/telemetry/schemas/telemetry-workspace-create-schemas.ts index d458f42dc96..5990e129bf5 100644 --- a/src/shared/telemetry-workspace-create-schemas.ts +++ b/src/shared/telemetry/schemas/telemetry-workspace-create-schemas.ts @@ -7,7 +7,7 @@ import { WORKTREE_CREATE_EXECUTION_HOSTS, WORKTREE_CREATE_PHASES, type WorktreeCreatePhase -} from './worktree/creation/create-timing-vocabulary' +} from '../../worktree/creation/create-timing-vocabulary' // Numbers and closed enums exclude repo-identifying paths/branches/refs/errors. Fields are optional for folder workspaces and untimed creates. diff --git a/src/shared/telemetry-wsl-move-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-wsl-move-event-schemas.ts similarity index 100% rename from src/shared/telemetry-wsl-move-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-wsl-move-event-schemas.ts diff --git a/src/shared/telemetry-wsl-usage-event-schemas.ts b/src/shared/telemetry/schemas/telemetry-wsl-usage-event-schemas.ts similarity index 100% rename from src/shared/telemetry-wsl-usage-event-schemas.ts rename to src/shared/telemetry/schemas/telemetry-wsl-usage-event-schemas.ts diff --git a/src/shared/star-nag-telemetry.ts b/src/shared/telemetry/star-nag-telemetry.ts similarity index 100% rename from src/shared/star-nag-telemetry.ts rename to src/shared/telemetry/star-nag-telemetry.ts diff --git a/src/shared/telemetry-consent-types.ts b/src/shared/telemetry/telemetry-consent-types.ts similarity index 100% rename from src/shared/telemetry-consent-types.ts rename to src/shared/telemetry/telemetry-consent-types.ts diff --git a/src/shared/telemetry-day.ts b/src/shared/telemetry/telemetry-day.ts similarity index 100% rename from src/shared/telemetry-day.ts rename to src/shared/telemetry/telemetry-day.ts diff --git a/src/shared/telemetry-event-classification.ts b/src/shared/telemetry/telemetry-event-classification.ts similarity index 98% rename from src/shared/telemetry-event-classification.ts rename to src/shared/telemetry/telemetry-event-classification.ts index 1e525b9e68f..a839359c9b9 100644 --- a/src/shared/telemetry-event-classification.ts +++ b/src/shared/telemetry/telemetry-event-classification.ts @@ -1,7 +1,7 @@ import { z } from 'zod' import { eventSchemas } from './telemetry-event-registry' -import type { cohortSchema } from './telemetry-onboarding-foundation-schemas' +import type { cohortSchema } from './schemas/telemetry-onboarding-foundation-schemas' export type EventMap = { [N in keyof typeof eventSchemas]: z.infer<(typeof eventSchemas)[N]> } export type EventName = keyof EventMap diff --git a/src/shared/telemetry-event-registry.ts b/src/shared/telemetry/telemetry-event-registry.ts similarity index 90% rename from src/shared/telemetry-event-registry.ts rename to src/shared/telemetry/telemetry-event-registry.ts index 1150647e40b..ed406efc538 100644 --- a/src/shared/telemetry-event-registry.ts +++ b/src/shared/telemetry/telemetry-event-registry.ts @@ -2,13 +2,13 @@ import { onboardingLanguagePickerOpenedSchema, onboardingLanguageChangedSchema, onboardingLanguageRequestedSchema -} from './telemetry-onboarding-language-schemas' -import { agentTokenUsageSchema } from './telemetry-agent-token-usage-schema' +} from './schemas/telemetry-onboarding-language-schemas' +import { agentTokenUsageSchema } from './schemas/telemetry-agent-token-usage-schema' import { agentDashboardActiveSchema, agentDashboardEnabledSchema, agentDashboardOpenedSchema -} from './telemetry-agent-dashboard-event-schemas' +} from './schemas/telemetry-agent-dashboard-event-schemas' import { agentErrorSchema, agentPromptSentSchema, @@ -19,7 +19,7 @@ import { repoAddedSchema, starNagOutcomeEventSchema, workspaceCreatedSchema -} from './telemetry-app-event-schemas' +} from './schemas/telemetry-app-event-schemas' import { agentHookInstallFailedSchema, agentHookTransportBlockedSchema, @@ -38,7 +38,7 @@ import { remoteOutboundBudgetCloseSchema, runtimeRpcStartFailedSchema, settingsChangedSchema -} from './telemetry-daemon-event-schemas' +} from './schemas/telemetry-daemon-event-schemas' import { contextualTourOutcomeSchema, contextualTourShownSchema, @@ -49,7 +49,7 @@ import { setupGuideStepCompletedSchema, terminalPaneSplitSchema, toastActionOverModalSchema -} from './telemetry-feature-education-event-schemas' +} from './schemas/telemetry-feature-education-event-schemas' import { chatUiFeatureTipActionSchema, chatUiFeatureTipExposureSchema, @@ -76,7 +76,7 @@ import { orcaCliFeatureTipShownSchema, telemetryOptedInSchema, telemetryOptedOutSchema -} from './telemetry-native-feature-event-schemas' +} from './schemas/telemetry-native-feature-event-schemas' import { activationChecklistItemCompletedSchema, onboardingAgentPickedSchema, @@ -98,7 +98,7 @@ import { onboardingTaskSourcesSnapshotSchema, onboardingTourOutcomeEventSchema, onboardingWindowsTerminalSnapshotSchema -} from './telemetry-onboarding-event-schemas' +} from './schemas/telemetry-onboarding-event-schemas' import { addRepoDefaultCheckoutHandoffSchema, addRepoExistingWorkspacesDetectedSchema, @@ -109,27 +109,27 @@ import { setupScriptPromptActionSchema, setupScriptPromptShownSchema, workspaceCreateFailedSchema -} from './telemetry-repository-event-schemas' -import { pluginInstalledSchema } from './telemetry-plugin-event-schemas' -import { browserExtensionsEventSchemas } from './browser/extensions/browser-extensions-banner' +} from './schemas/telemetry-repository-event-schemas' +import { pluginInstalledSchema } from './schemas/telemetry-plugin-event-schemas' +import { browserExtensionsEventSchemas } from '../browser/extensions/browser-extensions-banner' import { firstAgentInteractionSchema, meaningfulActivityDaySchema -} from './telemetry-protected-milestone-schemas' -import { sshRemoteRuntimeResolvedSchema } from './telemetry-ssh-runtime-event-schemas' -import { wslUsageSnapshotSchema } from './telemetry-wsl-usage-event-schemas' +} from './schemas/telemetry-protected-milestone-schemas' +import { sshRemoteRuntimeResolvedSchema } from './schemas/telemetry-ssh-runtime-event-schemas' +import { wslUsageSnapshotSchema } from './schemas/telemetry-wsl-usage-event-schemas' import { sshHostServerConversionSchema, sshHostServerDecidedSchema, sshHostServerDeployFailedSchema, sshHostServerMoveSchema, sshHostServerLegacyRelayBridgeSchema -} from './telemetry-ssh-host-server-event-schemas' +} from './schemas/telemetry-ssh-host-server-event-schemas' import { wslMoveOrchestratorSchema, wslMoveUndoSchema, wslMoveSchema -} from './telemetry-wsl-move-event-schemas' +} from './schemas/telemetry-wsl-move-event-schemas' // Breaking payload changes require a new event name to keep historical rows distinguishable; optional additions are safe. export const eventSchemas = { diff --git a/src/shared/telemetry-settings-types.ts b/src/shared/telemetry/telemetry-settings-types.ts similarity index 87% rename from src/shared/telemetry-settings-types.ts rename to src/shared/telemetry/telemetry-settings-types.ts index 12a671b0c1f..1573b13f7e5 100644 --- a/src/shared/telemetry-settings-types.ts +++ b/src/shared/telemetry/telemetry-settings-types.ts @@ -1,6 +1,6 @@ -import type { BrowserExtensionsBannerAssignment } from './browser/extensions/browser-extensions-banner' -import type { AgentDashboardSurface } from './telemetry-agent-dashboard-event-schemas' -import type { MilestoneInstallCohort } from './telemetry-protected-milestone-schemas' +import type { BrowserExtensionsBannerAssignment } from '../browser/extensions/browser-extensions-banner' +import type { AgentDashboardSurface } from './schemas/telemetry-agent-dashboard-event-schemas' +import type { MilestoneInstallCohort } from './schemas/telemetry-protected-milestone-schemas' export type ChatUiLaunchTipTargeting = | { mode: 'all' } diff --git a/src/shared/foreground-command-settle.ts b/src/shared/terminal/pty/foreground/foreground-command-settle.ts similarity index 100% rename from src/shared/foreground-command-settle.ts rename to src/shared/terminal/pty/foreground/foreground-command-settle.ts diff --git a/src/shared/foreground-process-evidence.ts b/src/shared/terminal/pty/foreground/foreground-process-evidence.ts similarity index 100% rename from src/shared/foreground-process-evidence.ts rename to src/shared/terminal/pty/foreground/foreground-process-evidence.ts diff --git a/src/shared/terminal/pty/foreground/remote-foreground-evidence-admission.ts b/src/shared/terminal/pty/foreground/remote-foreground-evidence-admission.ts index 6c9dd1f372d..e04a155b90a 100644 --- a/src/shared/terminal/pty/foreground/remote-foreground-evidence-admission.ts +++ b/src/shared/terminal/pty/foreground/remote-foreground-evidence-admission.ts @@ -1,7 +1,7 @@ import { isRemoteForegroundEvidence, type RemoteForegroundEvidence -} from '../../../foreground-process-evidence' +} from './foreground-process-evidence' /** Maximum host-observation age accepted by a renderer foreground sample. */ export const REMOTE_FOREGROUND_EVIDENCE_MAX_AGE_MS = 2_000 diff --git a/src/shared/terminal/pty/foreground/remote-foreground-evidence.test.ts b/src/shared/terminal/pty/foreground/remote-foreground-evidence.test.ts index c93dd63e7ea..b7fd3e1bd65 100644 --- a/src/shared/terminal/pty/foreground/remote-foreground-evidence.test.ts +++ b/src/shared/terminal/pty/foreground/remote-foreground-evidence.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { isRemoteForegroundEvidence } from '../../../foreground-process-evidence' +import { isRemoteForegroundEvidence } from './foreground-process-evidence' import { admitRemoteForegroundEvidence, REMOTE_FOREGROUND_EVIDENCE_MAX_AGE_MS @@ -80,18 +80,6 @@ describe('remote foreground evidence contract', () => { ) ).not.toBeNull() }) - - it.each([ - ['host-measured', REMOTE_FOREGROUND_EVIDENCE_MAX_AGE_MS + 1, 0], - ['client-measured', 0, REMOTE_FOREGROUND_EVIDENCE_MAX_AGE_MS + 1] - ])('refuses one step past the %s boundary', (_label, capturedAgeMs, receiveDelay) => { - expect( - admitRemoteForegroundEvidence( - { ...live, capturedAgeMs }, - { ...admission, receivedAtMonotonic: receiveDelay } - ) - ).toBeNull() - }) }) it('rejects delayed observations from a previously accepted host generation', () => { diff --git a/src/shared/terminal/pty/lifecycle/terminal-process-inspection.ts b/src/shared/terminal/pty/lifecycle/terminal-process-inspection.ts index 7dde54d4864..9e26afaf021 100644 --- a/src/shared/terminal/pty/lifecycle/terminal-process-inspection.ts +++ b/src/shared/terminal/pty/lifecycle/terminal-process-inspection.ts @@ -1,5 +1,5 @@ import type { TerminalForegroundObservation } from './terminal-foreground-observation' -import type { RemoteForegroundEvidence } from '../../../foreground-process-evidence' +import type { RemoteForegroundEvidence } from '../foreground/foreground-process-evidence' /** Keep unverifiable distinct from no-children; legacy booleans collapsed failed inspection and Windows relay defaults into false, bypassing close guards. */ export type PtyChildProcessVerdict = 'children' | 'no-children' | 'unverifiable' diff --git a/src/shared/macos-darwin-floor.test.ts b/src/shared/updater/requirements/macos-darwin-floor.test.ts similarity index 100% rename from src/shared/macos-darwin-floor.test.ts rename to src/shared/updater/requirements/macos-darwin-floor.test.ts diff --git a/src/shared/macos-darwin-floor.ts b/src/shared/updater/requirements/macos-darwin-floor.ts similarity index 100% rename from src/shared/macos-darwin-floor.ts rename to src/shared/updater/requirements/macos-darwin-floor.ts diff --git a/src/shared/macos-upgrade-support.ts b/src/shared/updater/requirements/macos-upgrade-support.ts similarity index 100% rename from src/shared/macos-upgrade-support.ts rename to src/shared/updater/requirements/macos-upgrade-support.ts diff --git a/src/shared/workspace-setup/setup-script-telemetry.ts b/src/shared/workspace-setup/setup-script-telemetry.ts index 594d9ff6572..2fc21142472 100644 --- a/src/shared/workspace-setup/setup-script-telemetry.ts +++ b/src/shared/workspace-setup/setup-script-telemetry.ts @@ -1,4 +1,4 @@ -import type { EventProps } from '../telemetry-event-classification' +import type { EventProps } from '../telemetry/telemetry-event-classification' import type { SetupScriptImportCandidate } from './setup-script-imports' type SetupScriptPromptTelemetry = Omit, 'nth_repo_added'> diff --git a/src/shared/worktree/creation/launch-types.ts b/src/shared/worktree/creation/launch-types.ts index c3bdb8a4c62..fb502db3491 100644 --- a/src/shared/worktree/creation/launch-types.ts +++ b/src/shared/worktree/creation/launch-types.ts @@ -1,5 +1,9 @@ import type { StartupCommandDelivery } from '../../agent-launch/startup/codex-startup-delivery' -import type { AgentKind, LaunchSource, RequestKind } from '../../telemetry-property-schemas' +import type { + AgentKind, + LaunchSource, + RequestKind +} 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' diff --git a/tests/e2e/add-project-error-toast-stacking.spec.ts b/tests/e2e/add-project-error-toast-stacking.spec.ts index 2851a658abd..b3994cb85b2 100644 --- a/tests/e2e/add-project-error-toast-stacking.spec.ts +++ b/tests/e2e/add-project-error-toast-stacking.spec.ts @@ -1,6 +1,6 @@ import path from 'node:path' import type { ElectronApplication, Locator, Page, TestInfo } from '@stablyai/playwright-test' -import { eventSchemas } from '../../src/shared/telemetry-events' +import { eventSchemas } from '../../src/shared/telemetry/telemetry-event-registry' import { test, expect } from './helpers/orca-app' import { createRuntimeDesktopPairingOffer, diff --git a/tests/e2e/codex-ctrl-c-status.spec.ts b/tests/e2e/codex-ctrl-c-status.spec.ts index b7f6e7c1530..e7f7c41c783 100644 --- a/tests/e2e/codex-ctrl-c-status.spec.ts +++ b/tests/e2e/codex-ctrl-c-status.spec.ts @@ -5,7 +5,7 @@ import { buildShellCommandFromArgv, resolveStartupShell } from '../../src/shared/agent-launch/startup/tui-agent-startup-shell' -import { resolveLocalWindowsAgentStartupShell } from '../../src/shared/windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../src/shared/shell/launch/windows-terminal-shell' import { test, expect } from './helpers/orca-app' import { emitCodexHookStatus, readHookEndpoint } from './helpers/agent-hook-endpoint' import { ensureTerminalVisible, waitForActiveWorktree, waitForSessionReady } from './helpers/store' diff --git a/tests/e2e/golden-tab-bar-agent-launch.spec.ts b/tests/e2e/golden-tab-bar-agent-launch.spec.ts index d8501c0a668..aa26973814e 100644 --- a/tests/e2e/golden-tab-bar-agent-launch.spec.ts +++ b/tests/e2e/golden-tab-bar-agent-launch.spec.ts @@ -15,7 +15,7 @@ import { } from './helpers/wsl-golden-stub-agent' import { ensureTerminalVisible, waitForActiveWorktree, waitForSessionReady } from './helpers/store' import { getTerminalContent } from './helpers/terminal' -import type { BuiltInWindowsTerminalShell } from '../../src/shared/windows-terminal-shell' +import type { BuiltInWindowsTerminalShell } from '../../src/shared/shell/launch/windows-terminal-shell' // Covers the Windows-only tab-bar launch path that the default-shell test misses. diff --git a/tests/e2e/helpers/e2e-completed-onboarding-profile.ts b/tests/e2e/helpers/e2e-completed-onboarding-profile.ts index 92f8b6ed19b..f0af3d689a6 100644 --- a/tests/e2e/helpers/e2e-completed-onboarding-profile.ts +++ b/tests/e2e/helpers/e2e-completed-onboarding-profile.ts @@ -1,9 +1,9 @@ import { ONBOARDING_FINAL_STEP, ONBOARDING_FLOW_VERSION -} from '../../../src/shared/onboarding-defaults' -import { FEATURE_INTERACTION_IDS } from '../../../src/shared/feature-interactions' -import { FEATURE_TIP_IDS } from '../../../src/shared/feature-tips' +} from '../../../src/shared/onboarding/onboarding-defaults' +import { FEATURE_INTERACTION_IDS } from '../../../src/shared/feature-education/interactions/feature-interaction-catalog' +import { FEATURE_TIP_IDS } from '../../../src/shared/feature-education/feature-tips' const SEEN_FIRST_RUN_CONTEXTUAL_TOUR_IDS = [ 'workspace-board', diff --git a/tests/e2e/helpers/fake-agent-command-override.ts b/tests/e2e/helpers/fake-agent-command-override.ts index b307a693789..1e90b174a2e 100644 --- a/tests/e2e/helpers/fake-agent-command-override.ts +++ b/tests/e2e/helpers/fake-agent-command-override.ts @@ -2,7 +2,7 @@ import { quoteStartupArg, resolveStartupShell } from '../../../src/shared/agent-launch/startup/tui-agent-startup-shell' -import { resolveLocalWindowsAgentStartupShell } from '../../../src/shared/windows-terminal-shell' +import { resolveLocalWindowsAgentStartupShell } from '../../../src/shared/shell/launch/windows-terminal-shell' /** Specs must apply this through `updateSettings`; the override below is quoted for it. */ export const FAKE_AGENT_WINDOWS_SHELL = 'powershell.exe' diff --git a/tests/e2e/helpers/golden-stub-agent.ts b/tests/e2e/helpers/golden-stub-agent.ts index 393b244cf8f..e60e37b5862 100644 --- a/tests/e2e/helpers/golden-stub-agent.ts +++ b/tests/e2e/helpers/golden-stub-agent.ts @@ -2,7 +2,7 @@ import path from 'node:path' import type { Page } from '@stablyai/playwright-test' import { expect } from '@stablyai/playwright-test' import { focusActiveTerminalInput, waitForTerminalOutput } from './terminal' -import type { BuiltInWindowsTerminalShell } from '../../../src/shared/windows-terminal-shell' +import type { BuiltInWindowsTerminalShell } from '../../../src/shared/shell/launch/windows-terminal-shell' export const GOLDEN_STUB_READY_MARKER = 'GOLDEN_STUB_AGENT_READY' export const GOLDEN_STUB_EXIT_MARKER = 'GOLDEN_STUB_AGENT_EXITED' diff --git a/tests/e2e/helpers/paired-electron-client.ts b/tests/e2e/helpers/paired-electron-client.ts index 03aa93e4f4a..070a0f239f1 100644 --- a/tests/e2e/helpers/paired-electron-client.ts +++ b/tests/e2e/helpers/paired-electron-client.ts @@ -9,7 +9,7 @@ import { type TestInfo } from '@stablyai/playwright-test' -import type { ContextualTourId } from '../../../src/shared/contextual-tours' +import type { ContextualTourId } from '../../../src/shared/feature-education/contextual-tours/contextual-tours' import { getE2ECompletedOnboardingProfile } from './e2e-completed-onboarding-profile' import { getOrcaElectronLaunchArgs } from './electron-launch-args' import { cleanupE2EDaemons, closeElectronAppForE2E } from './electron-process-shutdown' diff --git a/tests/e2e/terminal-windows-shell-paste-ownership.spec.ts b/tests/e2e/terminal-windows-shell-paste-ownership.spec.ts index 5c19a06b546..69193384670 100644 --- a/tests/e2e/terminal-windows-shell-paste-ownership.spec.ts +++ b/tests/e2e/terminal-windows-shell-paste-ownership.spec.ts @@ -3,7 +3,7 @@ import { execFileSync } from 'node:child_process' import { rmSync, writeFileSync } from 'node:fs' import path from 'node:path' import type { Page } from '@stablyai/playwright-test' -import type { WINDOWS_GIT_BASH_SHELL } from '../../src/shared/windows-terminal-shell' +import type { WINDOWS_GIT_BASH_SHELL } from '../../src/shared/shell/launch/windows-terminal-shell' import { test, expect } from './helpers/orca-app' import { focusActiveTerminalInput,