Commit Graph

540 Commits

Author SHA1 Message Date
Mohamed Boudra
fca2776e61 refactor(server): extract agent attention notification policy
What changed:
- Extracted client/push attention decision rules from websocket-server into a dedicated agent-attention-policy module.
- Replaced websocket-server inline branch logic with calls to computeShouldNotifyClient and computeShouldSendPush.
- Added deterministic unit tests that cover each notification branch and push suppression rule.

Why:
- The websocket server carried dense policy branching mixed with transport/session concerns.
- Pulling policy into a focused module lowers logic density and makes future changes safer without altering behavior.
- Direct unit tests provide confidence for future edits without requiring websocket wiring.

Notes for next agent:
- This commit intentionally preserves existing behavior and only restructures policy ownership.
- If attention behavior needs product changes, update tests in agent-attention-policy.test.ts first.
- websocket-server.relay-reconnect.test.ts still covers transport/session reconnection behavior separately.
2026-02-14 09:13:15 +07:00
Mohamed Boudra
ccaeb3de21 refactor(server): split daemon client transport helpers into module
Reasoning:\n- daemon-client.ts had transport construction, ws adapter, relay e2ee wrapper, encoding helpers, and core client behavior mixed in one class file.\n- extracted transport/encoding concerns to a dedicated module to reduce logic density and tighten boundaries while preserving runtime behavior.\n\nAccomplishments:\n- added packages/server/src/client/daemon-client-transport.ts with websocket transport factory, relay e2ee transport wrapper, and transport utility helpers.\n- kept daemon-client public transport type exports stable by re-exporting types from the new module.\n- removed duplicated helper implementations from daemon-client.ts and replaced them with imports.\n- added focused tests in packages/server/src/client/daemon-client-transport.test.ts for websocket adapter behavior and helper normalization/encoding paths.\n- validated with @getpaseo/server typecheck and targeted daemon-client test suite.\n\nChallenges / handoff notes for next agent:\n- daemon-client.ts is still large and retains agent config resolution + high-level RPC orchestration concerns; next safe split is request/response waiter coordination or terminal stream buffering into dedicated modules.\n- a pre-existing unrelated workspace modification remains in scripts/codex-refactor-loop.sh and was intentionally left untouched.
2026-02-14 09:01:01 +07:00
Mohamed Boudra
8e5d2805c1 refactor(server): centralize correlated RPC response matching in daemon client
What changed:
- Added a private sendCorrelatedRequest helper in daemon-client to centralize requestId-correlated response selection.
- Migrated a large contiguous set of RPC methods to the helper: checkout/worktree/branch operations, file explorer/token/icon, provider+speech+commands RPCs, wait_for_finish, and terminal list/create/subscribe/kill/attach/detach.
- Preserved existing behavior including special-case filtering for checkout subscriptionId.

Reasoning:
- daemon-client had repeated type+requestId matching blocks across many methods, increasing maintenance cost and decision-point sprawl.
- This refactor keeps transport behavior unchanged while reducing duplicated control flow and making future RPC additions less error-prone.

Verification:
- npm run -w packages/server test -- src/client/daemon-client.test.ts
- npm run -w packages/server typecheck
- npm run typecheck

Notes for next agent:
- There are still many non-migrated sendRequest callsites in daemon-client (notably agent lifecycle/interaction and some status-typed selectors) that can be moved to the same helper in follow-up refactors.
- I hit TS generic narrowing limits while extracting the helper and solved it via a constrained correlated message type + explicit payload narrowing cast; behavior remains covered by existing daemon-client tests.
2026-02-14 08:46:38 +07:00
Mohamed Boudra
b8f6115465 Merge pull request #29 from getpaseo/voice/background-downloading
Decouple onboarding from voice model downloads and gate unavailable voice starts
2026-02-14 01:04:06 +07:00
Mohamed Boudra
8169134ac3 refactor timeline loading to cursor-based fetch API 2026-02-14 01:03:36 +07:00
Mohamed Boudra
cf8393407e refactor(session): simplify voice readiness gating flow 2026-02-14 00:57:02 +07:00
Mohamed Boudra
c5d7fa52b4 refactor(server): centralize speech provider resolver typing 2026-02-14 00:44:08 +07:00
Mohamed Boudra
cfd061a86d feat(voice): background local model downloads with runtime gating 2026-02-13 23:23:28 +07:00
Mohamed Boudra
67620569ab fix(server): avoid recursive checkout diff watches on linux 2026-02-13 09:30:35 +00:00
Mohamed Boudra
69f851aa14 Update files 2026-02-13 09:09:39 +00:00
Mohamed Boudra
b64fa4ca93 feat(dictation): add adaptive finish timeout with server-provided budget 2026-02-13 10:15:44 +07:00
Mohamed Boudra
bf432b3d3a feat: add relay reconnect with grace period and branch suggestions 2026-02-13 09:46:40 +07:00
Mohamed Boudra
837d0fb387 feat: improve Claude agent model normalization and tool mapping 2026-02-13 00:00:57 +07:00
Mohamed Boudra
734cf7af20 chore: script release tag push and trim daemon log noise 2026-02-12 19:05:51 +07:00
Mohamed Boudra
6f6677fc7a chore(release): cut 0.1.3 and add release playbook 2026-02-12 18:22:33 +07:00
Mohamed Boudra
972895d855 Reduce daemon startup noise and normalize tool-call mappers 2026-02-12 18:16:36 +07:00
Mohamed Boudra
50acf2dd44 Merge branch 'feature/cli-output-schema' 2026-02-12 18:04:41 +07:00
Mohamed Boudra
cb2e4aacfe feat(cli): add --output-schema flag for structured agent output 2026-02-12 18:04:39 +07:00
Mohamed Boudra
117bbfe2f4 feat: add provider availability detection and normalize legacy "default" model IDs 2026-02-12 18:04:21 +07:00
Mohamed Boudra
8bdd083512 Merge branch 'main' of github.com:getpaseo/paseo 2026-02-12 18:04:13 +07:00
Mohamed Boudra
f79468b793 Refactor Claude/Codex tool-call parsing to provider-local Zod passes (#25)
* refactor claude/codex tool call parsing to provider-local zod passes

* tighten provider tool-call schemas and remove alias probing

* refactor provider tool-call mappers to strict two-pass zod flow

* test: lock opencode mapper against cross-provider speak normalization

* refactor: enforce schema-only two-pass tool-call normalization
2026-02-12 19:02:11 +08:00
Mohamed Boudra
018edef3bb feat: add onboarding command and migrate git diff to checkout API 2026-02-12 17:00:35 +07:00
Mohamed Boudra
fba7c73c8b feat(cli): add agent update command for name and labels 2026-02-12 14:15:33 +07:00
Mohamed Boudra
3319c2d40c Fix dev runner entry and sherpa TTS initialization 2026-02-12 14:05:46 +07:00
Mohamed Boudra
00be27c9cc chore: bump workspace versions to 0.1.2 2026-02-11 14:39:30 +07:00
Mohamed Boudra
7e924e208a chore: sync internal workspace deps for 0.1.1 2026-02-11 14:37:41 +07:00
Mohamed Boudra
5181d715bf chore: bump workspace versions to 0.1.1 2026-02-11 14:34:36 +07:00
Mohamed Boudra
a6f60091f2 Push-driven checkout diff subscriptions for changes sidebar (#24)
* Implement push-driven checkout diff subscriptions

* Remove legacy checkout diff polling RPC

* Fix checkout diff watcher coverage and fallback refresh
2026-02-11 14:11:00 +08:00
Mohamed Boudra
17c44d5879 Exclude test-only server artifacts from published dist 2026-02-11 12:44:41 +07:00
Mohamed Boudra
a57c907013 Default paseo to start daemon and seed first-run config 2026-02-11 12:41:17 +07:00
Mohamed Boudra
a09a6ca1b3 Fix chunked assistant finalText assembly 2026-02-11 12:12:58 +07:00
Mohamed Boudra
29855e07e9 feat: add provider runtime launcher settings for agent CLIs 2026-02-11 11:45:55 +07:00
Mohamed Boudra
0d60588431 Update files 2026-02-11 11:04:49 +07:00
Mohamed Boudra
002c09681d Add worktree destroy lifecycle commands (#23) 2026-02-11 09:04:53 +07:00
Mohamed Boudra
ec7ea4b55a Update files 2026-02-10 16:26:51 +07:00
Mohamed Boudra
7e5537bcc5 Update files 2026-02-10 13:43:07 +07:00
Mohamed Boudra
ade4fb2e45 Update files 2026-02-10 11:43:07 +07:00
Mohamed Boudra
7001928f4f Update files 2026-02-10 10:50:54 +07:00
Mohamed Boudra
7a21a5cce1 Update files 2026-02-09 21:26:12 +07:00
Mohamed Boudra
7ec3f2d3cf refactor tool-call detail contract for unknown tools 2026-02-09 16:50:04 +07:00
Mohamed Boudra
9db8a1d08c Merge branch 'enhance-agent-fetch-sidebar' 2026-02-09 15:45:33 +07:00
Mohamed Boudra
1810ace233 feat: add project-grouped agent fetch with checkout-lite placement 2026-02-09 15:44:58 +07:00
Mohamed Boudra
4fa8859d14 Stabilize agent history sync after app backgrounding 2026-02-09 15:44:29 +07:00
Mohamed Boudra
8403ece4ed Merge branch 'investigate-agents-enonent' 2026-02-09 13:33:49 +07:00
Mohamed Boudra
5c89ae52ce Update files 2026-02-09 13:33:40 +07:00
Mohamed Boudra
015c0d7772 Merge branch 'main' into investigate/ui-network-responsive 2026-02-09 13:30:20 +07:00
Mohamed Boudra
e75325ca29 Fix checkout diff stalls on untracked binary artifacts 2026-02-09 13:29:41 +07:00
Mohamed Boudra
9718e50840 Update files 2026-02-09 13:28:25 +07:00
Mohamed Boudra
52a2fa71de Update files 2026-02-09 13:17:28 +07:00
Mohamed Boudra
62c0a69ae9 Merge branch 'investigate/ui-network-responsive' into main 2026-02-09 12:25:57 +07:00