feat: add typed agent progress events#92
Conversation
Co-authored-by: Cad from Arca <cad@arcabot.ai>
|
Exact-head proof for
Land-ready. Not merged. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 068ce38bf1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| kind: "commentary" | "lifecycle" | "thinking" | "tool"; | ||
| text?: string; | ||
| title?: string; | ||
| tool_name?: string; |
There was a problem hiding this comment.
Keep progress line types aligned with supported frames
When SDK users publish the progress frames already supported elsewhere in the app, this new public type rejects them: AgentProgress.svelte renders line kinds like plan, patch, and command_output, and the HTTP agent-progress tests still send line.toolName, but AgentProgressLine only allows four kinds and only the snake_case tool_name. Fresh object literals using those supported shapes now fail to type-check through publishEphemeral, so integrations cannot use the typed SDK for existing progress updates without casts.
Useful? React with 👍 / 👎.
Summary
agent.progressto the OpenAPI event enum and regenerate SDK declarationsContributor credit: this extracts the generic SDK value surfaced by @arcabotai in #78. The commit retains Cad's co-author credit; the Unreleased changelog thanks @arcabotai.
Proof
pnpm --filter @clickclack/sdk-ts typecheck && pnpm build:sdk— passed, including positive and negative type-contract assertions.pnpm check && pnpm coverage && pnpm audit --audit-level=high && govulncheck ./...— passed; 85.4% coverage; no known JavaScript or Go vulnerabilities.pnpm test:e2e— 98 passed in 43.8s.presence.changedreturned 202; a bot-tokenagent.progressframe with one channel target returned 202. Observed:{"ownerKind":"human","presenceType":"presence.changed","presenceTargetless":true,"progressType":"agent.progress","progressChannelBound":true,"progressTurn":"live-turn-1"}.Not merged.