@saadnvd1/agent-os 0.3.664 → 0.3.671

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/app/api/audits/[kind]/[id]/route.test.ts +2 -2
  2. package/app/api/mcp-auth/callback/route.test.ts +42 -0
  3. package/app/api/mcp-auth/callback/route.ts +56 -0
  4. package/app/api/projects/init/route.test.ts +2 -4
  5. package/app/api/sessions/[id]/mcp-auth/route.test.ts +86 -0
  6. package/app/api/sessions/[id]/mcp-auth/route.ts +58 -0
  7. package/app/api/shares/route.test.ts +3 -4
  8. package/app/api/workspaces/[id]/route.ts +9 -1
  9. package/app/api/worktree-sweep/route.test.ts +21 -0
  10. package/app/api/worktree-sweep/route.ts +24 -4
  11. package/components/Chat/ChatPanel.tsx +6 -3
  12. package/components/Chat/McpServers.tsx +61 -24
  13. package/components/Chat/McpSignIn.tsx +122 -0
  14. package/components/Chat/session.ts +8 -0
  15. package/components/Health/SweepRuns.tsx +1 -0
  16. package/components/Workspaces/WorkspaceSettings.tsx +6 -0
  17. package/data/chat/mcpAuth.ts +42 -0
  18. package/data/workspaces/index.ts +6 -0
  19. package/lib/chat/driver.ts +24 -2
  20. package/lib/chat/drivers/claude-approvals.ts +7 -0
  21. package/lib/chat/drivers/claude-mcp-auth.ts +82 -0
  22. package/lib/chat/drivers/claude.ts +7 -0
  23. package/lib/chat/events.ts +12 -0
  24. package/lib/chat/mcp-auth.ts +193 -0
  25. package/lib/chat/registry.ts +2 -0
  26. package/lib/chat/runner.ts +18 -0
  27. package/lib/chat/worker/client.ts +35 -1
  28. package/lib/chat/worker/host.ts +9 -0
  29. package/lib/chat/worker/main.ts +1 -1
  30. package/lib/chat/worker/mcp-auth.ts +119 -0
  31. package/lib/chat/worker/protocol.ts +19 -0
  32. package/lib/db/migrations/20261018T1730_mcp_sign_ins.ts +22 -0
  33. package/lib/db/migrations/20261018T2100_orch_full_access.ts +16 -0
  34. package/lib/db/types.ts +3 -0
  35. package/lib/done/testing.ts +2 -2
  36. package/lib/env-setup.ts +8 -1
  37. package/lib/health/boots.ts +2 -8
  38. package/lib/orchestrator/armed.test-helpers.ts +3 -2
  39. package/lib/orchestrator/brief.ts +14 -9
  40. package/lib/orchestrator/external-gates.ts +62 -1
  41. package/lib/orchestrator/full-access.ts +21 -0
  42. package/lib/orchestrator/quick.ts +47 -4
  43. package/lib/orchestrator/serve.ts +11 -2
  44. package/lib/orchestrator/shell-guard.ts +23 -1
  45. package/lib/orchestrator/signoff.test-helpers.ts +3 -2
  46. package/lib/orchestrator/sweep-arm.ts +180 -0
  47. package/lib/orchestrator/tool-names.ts +4 -1
  48. package/lib/orchestrator/tool-schemas.ts +33 -1
  49. package/lib/orchestrator/tools.ts +6 -2
  50. package/lib/orchestrator/write-guard.ts +34 -7
  51. package/lib/project-config/brief.ts +3 -1
  52. package/lib/project-config/database.ts +6 -0
  53. package/lib/project-config/index.ts +108 -21
  54. package/lib/project-config/schema.ts +10 -4
  55. package/lib/project-config/session.ts +9 -6
  56. package/lib/security/net.ts +7 -4
  57. package/lib/tasks/move-testing.ts +2 -2
  58. package/lib/test-temp.ts +30 -0
  59. package/lib/workspaces.ts +6 -2
  60. package/lib/worktree-sweep/caches.ts +6 -0
  61. package/lib/worktree-sweep/extras.ts +16 -8
  62. package/lib/worktree-sweep/report.ts +1 -0
  63. package/lib/worktree-sweep/settings.ts +2 -2
  64. package/lib/worktree-sweep/testTemp.ts +113 -0
  65. package/lib/worktree-sweep/types.ts +2 -0
  66. package/package.json +1 -1
  67. package/scripts/autodeploy.test.ts +2 -2
  68. package/scripts/check-bundle.test.ts +2 -2
  69. package/scripts/hooks/banned-terms.test.ts +3 -2
  70. package/scripts/hooks/staged-secrets.test.ts +2 -2
  71. package/scripts/lib/build-swap.test.ts +2 -3
  72. package/scripts/lib/wsl.test.ts +2 -3
  73. package/scripts/update-run.test.ts +2 -2
@@ -2,15 +2,14 @@ import { spawnSync } from "node:child_process";
2
2
  import {
3
3
  existsSync,
4
4
  mkdirSync,
5
- mkdtempSync,
6
5
  readFileSync,
7
6
  rmSync,
8
7
  utimesSync,
9
8
  writeFileSync,
10
9
  } from "node:fs";
11
- import { tmpdir } from "node:os";
12
10
  import { join } from "node:path";
13
11
  import { afterEach, beforeEach, describe, expect, it } from "vitest";
12
+ import { tempDir } from "@/lib/test-temp";
14
13
 
15
14
  const LIB = join(import.meta.dirname, "build-swap.sh");
16
15
 
@@ -41,7 +40,7 @@ const BUILD = `
41
40
  `;
42
41
 
43
42
  beforeEach(() => {
44
- dir = mkdtempSync(join(tmpdir(), "build-swap-"));
43
+ dir = tempDir("build-swap-");
45
44
  mkdirSync(join(dir, ".next/cache/turbopack"), { recursive: true });
46
45
  writeFileSync(join(dir, ".next/BUILD_ID"), "old\n");
47
46
  writeFileSync(join(dir, ".next/cache/turbopack/db"), "cache\n");
@@ -3,15 +3,14 @@ import {
3
3
  chmodSync,
4
4
  existsSync,
5
5
  mkdirSync,
6
- mkdtempSync,
7
6
  readFileSync,
8
7
  rmSync,
9
8
  symlinkSync,
10
9
  writeFileSync,
11
10
  } from "node:fs";
12
- import { tmpdir } from "node:os";
13
11
  import { join } from "node:path";
14
12
  import { afterEach, beforeEach, describe, expect, it } from "vitest";
13
+ import { tempDir } from "@/lib/test-temp";
15
14
 
16
15
  // The installer's WSL paths, run on any OS: `uname`, `ps`, the browser
17
16
  // openers and the package managers are fakes, and the kernel release is a
@@ -60,7 +59,7 @@ function run(
60
59
  }
61
60
 
62
61
  beforeEach(() => {
63
- dir = mkdtempSync(join(tmpdir(), "aos-wsl-"));
62
+ dir = tempDir("aos-wsl-");
64
63
  mkdirSync(join(dir, "bin"));
65
64
  for (const tool of TOOLS) {
66
65
  const real = ["/usr/bin", "/bin"]
@@ -1,16 +1,16 @@
1
1
  import { execFile } from "child_process";
2
2
  import fs from "fs";
3
- import os from "os";
4
3
  import path from "path";
5
4
  import { promisify } from "util";
6
5
  import { afterEach, beforeEach, describe, expect, it } from "vitest";
6
+ import { tempDir } from "@/lib/test-temp";
7
7
 
8
8
  const exec = promisify(execFile);
9
9
  const runner = path.join(__dirname, "update-run.mjs");
10
10
 
11
11
  let dir: string;
12
12
  beforeEach(() => {
13
- dir = fs.mkdtempSync(path.join(os.tmpdir(), "aos-runner-"));
13
+ dir = tempDir("aos-runner-");
14
14
  fs.writeFileSync(
15
15
  path.join(dir, "state.json"),
16
16
  JSON.stringify({ id: "r1", phase: "starting", from: "a" })