mirror of
https://github.com/stablyai/orca.git
synced 2026-09-30 16:02:56 +00:00
* fix(agent-trust): write per-user trust under the home the launched agent reads The Cursor, Copilot, Qoder and Antigravity writers and the local Codex config list resolved ~ with os.homedir() at write time, so any test that reached them wrote into the developer's real ~/.codex, ~/.cursor, ~/.copilot or ~/.gemini. Each writer now takes the home, derived once from the launch env (HOME, or USERPROFILE on Windows, else this host's home) by launchedAgentHome, which the SSH relay already used. * test: give tests that wrote the real agent or Orca home a temp one The structured Codex adoption replay pre-trusted /repos/workspace-1 in the real ~/.codex/config.toml; it now runs with a temp HOME and userData. The Codex session-resume and WSL hook tests created Orca's managed Codex home under the live userData, and the Claude Agent Teams tests wrote their tmux shim into ~/.orca; each now runs against a temp userData or HOME. * test: fail any unit test that writes the real agent or Orca home A vitest setup file wraps the node:fs mutating calls and refuses a target under the account's real ~/.codex, ~/.claude(.json), ~/.orca, ~/.cursor, ~/.copilot, ~/.gemini, ~/.qoder or Orca userData, found through os.userInfo() so a test that swaps HOME cannot hide it. The refusal is recorded and rethrown after the test, since trust writers swallow errors. Reads are untouched. It stands down only while an opted-in real-agent suite's own switch is set. It also unsets what an Orca terminal exports toward the live app (userData, Codex and Claude homes, and the Codex launch preflight CLI, which a shell test would otherwise run), so a local run matches CI. * test: type the guarded fs call from its narrowed original
23 lines
750 B
JSON
23 lines
750 B
JSON
{
|
|
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json",
|
|
"include": [
|
|
"../electron.vite.config.*",
|
|
"./build-plugins/**/*",
|
|
"./scripts/vitest-host-ports-setup.ts",
|
|
"./scripts/vitest-caller-identity-env-setup.ts",
|
|
"./scripts/vitest-real-agent-home-write-guard.ts",
|
|
"../src/main/**/*",
|
|
"../src/renderer/src/lib/skill-freshness-display-status.ts",
|
|
"../src/renderer/src/components/native-chat/native-chat-resolution-receipt.ts",
|
|
"../src/renderer/src/components/native-chat/structured-agent-question-projection.ts",
|
|
"../src/preload/**/*",
|
|
"../src/shared/**/*",
|
|
"../src/relay/**/*",
|
|
"../src/types/**/*"
|
|
],
|
|
"compilerOptions": {
|
|
"composite": true,
|
|
"types": ["electron-vite/node"]
|
|
}
|
|
}
|