Skip to content

refactor: consolidate daemon errors - #1496

Merged
thymikee merged 1 commit into
mainfrom
agent/consolidate-daemon-errors
Jul 30, 2026
Merged

refactor: consolidate daemon errors#1496
thymikee merged 1 commit into
mainfrom
agent/consolidate-daemon-errors

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Consolidate daemon-wire error conversion with the kernel error API. Daemon errors now have one canonical owner, while the existing contracts type surface remains compatible.

Validation

Not run locally at the requester’s direction; CI will validate this follow-up PR.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.88 MB 1.88 MB +15 B
JS gzip 605.4 kB 605.2 kB -198 B
npm tarball 724.1 kB 723.9 kB -200 B
npm unpacked 2.53 MB 2.53 MB -183 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.7 ms 26.6 ms -0.1 ms
CLI --help 56.3 ms 59.0 ms +2.7 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/agent-device-client.js -167 B -90 B
dist/src/session.js 0 B -56 B
dist/src/runtime.js 0 B -45 B
dist/src/internal/daemon.js +5 B -39 B
dist/src/runner-client.js 0 B -20 B

@thymikee
thymikee force-pushed the agent/consolidate-daemon-errors branch from 94657b8 to a0e20cf Compare July 30, 2026 10:20
@thymikee

Copy link
Copy Markdown
Member Author

Exact head a0e20cf is not ready because it breaks the released contracts façade. The root package exports ./contracts through src/sdk/contracts.ts, and this patch removes that file's DaemonError re-export. Existing consumers of import type { DaemonError } from agent-device/contracts`` will stop typechecking, contrary to the compatibility claim. Keep the canonical owner and conversion in @agent-device/kernel/errors, but re-export `DaemonError` from `src/sdk/contracts.ts` and add a public-surface regression assertion. The internal consolidation and wire-field preservation otherwise look sound, and exact-head CI is green.

@thymikee
thymikee force-pushed the agent/consolidate-daemon-errors branch from a0e20cf to aab0dfa Compare July 30, 2026 11:05
@thymikee

Copy link
Copy Markdown
Member Author

Addressed in aab0dfa: agent-device/contracts again re-exports DaemonError directly from the canonical @agent-device/kernel/errors module, while @agent-device/kernel/contracts no longer re-exports it. Added a public-facade type regression assertion.

@thymikee

Copy link
Copy Markdown
Member Author

Clean re-review at aab0dfa4. The released agent-device/contracts façade again exports DaemonError from its canonical kernel-errors owner, and the new public-facade type assertion pins that compatibility contract. Internal daemon-error rehydration still preserves the full wire shape, and the removed client helper has no remaining route. All completed exact-head checks are green; iOS Smoke is still in progress, so CI completion remains the merge condition.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jul 30, 2026
@thymikee
thymikee merged commit 47540f1 into main Jul 30, 2026
30 checks passed
@thymikee
thymikee deleted the agent/consolidate-daemon-errors branch July 30, 2026 11:34
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-30 11:35 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant