Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Merge main into feat/harness-updates

0xken15b742db551856
diff --cc cli/package.json
index 83fece5ac,f6b019cd7..4bfcc1fb0
--- a/cli/package.json
+++ b/cli/package.json
@@@ -12,7 -12,8 +12,9 @@@
"typecheck": "tsc --noEmit",
"start": "node dist/cli.js",
"test": "vitest run",
+ "test:dsh-updates": "vitest run --config vitest.dsh-updates.config.ts",
+ "test:sharing": "vitest run src/sharing --coverage --coverage.include='src/sharing/**' --coverage.thresholds.lines=100 --coverage.thresholds.statements=100 --coverage.thresholds.branches=100 --coverage.thresholds.functions=100",
+ "test:sharing-e2e": "tsx scripts/share-harness-e2e.ts",
"test:remote-viewers": "vitest run --config vitest.viewer.config.ts",
"test:cursor-e2e": "RUN_CURSOR_E2E=1 vitest run src/engines/cursor/localE2e.spec.ts",
"test:tmux-real": "RUN_REAL_TMUX_DISCOVERY=1 vitest run src/lib/tmuxAgentDiscovery.real.spec.ts --reporter=verbose",
diff --cc cli/src/cli.ts
index c4e65903d,c06f8020e..33d77d649
--- a/cli/src/cli.ts
+++ b/cli/src/cli.ts
@@@ -1,5 -1,8 +1,9 @@@
#!/usr/bin/env node
+import { mutateDsh } from './dsh/service.js'
+ import { HarnessShareOwner } from './sharing/owner.js'
+ import { HarnessGrantStore } from './sharing/grants.js'
+ import { HarnessShareRelay, type SharedMachineReference } from './sharing/relay.js'
+ import { SharedViewerPool } from './sharing/viewer.js'
import { fingerprint as e2eeCoreFingerprint, b64d as e2eeCoreDecode } from './lib/e2ee/core.js'
import { AutonomousDeviceDirect } from './lib/autonomous-device/direct.js'
/**
diff --cc desktop/lib/terminal/terminal_session.dart
index 55ac0c626,305c3e987..de04b765f
--- a/desktop/lib/terminal/terminal_session.dart
+++ b/desktop/lib/terminal/terminal_session.dart
@@@ -79,11 -79,8 +79,12 @@@ class TerminalSession extends ChangeNot
final TerminalFrameSender send;
final TerminalBinarySender sendBinary;
final Duration resyncTimeout;
+ final bool readOnly;
+ /// Lets input batching tests hold the clock inside the four-millisecond window under host load.
+ @visibleForTesting
+ DateTime Function() inputClockForTest = DateTime.now;
+
/// Forces a fresh transport dial (see `WsConn.forceReconnect`) — called once when the very first
/// `terminal_open` never gets a `terminal_ready` back within [resyncTimeout]. Covers the relay
/// going stale silently (the relayed machine's own Harness process restarted, dropping its E2EE