feat(compact): rename wire strategy 'truncate' to 'trim-tool-results' (PRI-1825)
## Summary
The RPC strategy enum at `ent/session/compact` accepted `'truncate'` and dispatched it to the `trim-tool-results` registry strategy. The wire name actively misled callers — the strategy doesn't drop messages, it trims TOOL_RESULT text blocks to 3 lines. Rename the wire enum to match the internal strategy ID.
- Updates `EntSessionCompactParamsSchema` in `@lace/ent-protocol`
- Updates the dispatch + default in `session-operations.ts`
- Updates the two tests that hardcoded the wire name (`agent-process.e2e`, `session-operations.compact-budget`)
- Hard rename, no back-compat alias (pre-release v1, internal protocol)
[Linear: PRI-1825](https://linear.app/prime-radiant/issue/PRI-1825)
## Coordination
Paired sen-core-v2 PR: https://github.com/prime-radiant-inc/sen-core-v2/pull/1
**Deploy order: merge this lace PR first, deploy lace, then merge the sen-core PR.** The sen-core caller currently passes `strategy: 'truncate'`; that call returns `InvalidParams` from the moment this PR lands until the sen-core PR is deployed. For Ada, this is a brief window during the rolling upgrade only.
## Test plan
- [x] `npm run typecheck --workspace=packages/ent-protocol`
- [x] `npm run typecheck --workspace=packages/agent`
- [x] `npm run build --workspace=packages/agent`
- [x] `npx vitest run src/rpc src/compaction` (59 passed)
- [x] `npx vitest run src/__tests__/agent-process.e2e.test.ts -t "compact"` (2 passed)
- [ ] Verify after deploy: `ent/session/compact { strategy: 'trim-tool-results' }` succeeds on Ada
合并状态:未合并 2 条评论