fix(remote): download trace and perf captures only to client-chosen or generated paths

Merged
TH
15m ago
+176-40

Summary

The client never writes a downloaded trace or perf artifact to a path the daemon echoes in artifact.localPath. A remote daemon controls that value. Output goes to the command's own --out, else to a locally named trace-<uuid> or perf-<uuid> in cwd. A daemon-supplied name never sets the suffix: .log, .json, .tar.gz, .perfetto-trace, .perf.data, .hprof or .memgraph comes from the local command and capture kind. start --out X no longer carries over to a stop in another process. Docs: website/docs/docs/remote-proxy.md. The wire ledger digest for resolveMaterializedArtifactPath and its compatibility acknowledgement are updated (client-only change).

Before / after

Before: trace stop and perf ... stop wrote to the daemon-echoed localPath, so ../../etc/x or an absolute path worked.
After: that branch is gone. stop takes its own --out.

Validation

Head 8442c27f90; CI pending.
pnpm exec vitest run --project unit-core packages/remote/src/__tests__/daemon-artifacts-capture.test.ts: 27 passed. With the production file reverted to 0.22, 2 hostile-localPath tests fail. The suffix trace case fails without the suffix. wire-compat.test.ts covers the ledger.
Production delta versus 0.22: +41 / -28 (69 lines) in packages/remote/src/daemon-artifacts.ts.
No unresolved risk known.