mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
refactor: organize shared telemetry, education and platform contracts (#42713)
* refactor: organize shared telemetry, education and platform contracts * fix(agent-status): retain transcript polling when agent IDs resolve
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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, '../../..', '..')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -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<void> {
|
||||
|
||||
@@ -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
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type {
|
||||
CrashReportBreadcrumbData,
|
||||
CrashReportDetailValue
|
||||
} from '../../../shared/crash-reporting'
|
||||
} from '../../../shared/crash-reporting/crash-reporting'
|
||||
import {
|
||||
recordCoalescedDurableCrashBreadcrumb,
|
||||
recordDurableCrashBreadcrumb
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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') {
|
||||
|
||||
@@ -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[] = []
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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<typeof track<'daemon_lifecycle'>>[1]): void {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<string, number>()
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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.`)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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<string, string> = {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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<void> {
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: {
|
||||
|
||||
+1
-1
@@ -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'
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ProcessMemoryMetric } from '../../shared/process-stats-types'
|
||||
import type { ProcessMemoryMetric } from '../../shared/diagnostics/process-stats-types'
|
||||
import {
|
||||
getProcessOutputFields,
|
||||
iterateProcessOutputLines
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user