Skip to content

feat: add typed agent progress events#92

Merged
steipete merged 3 commits into
mainfrom
feat/agent-progress-sdk-types
Jul 17, 2026
Merged

feat: add typed agent progress events#92
steipete merged 3 commits into
mainfrom
feat/agent-progress-sdk-types

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • export typed agent-progress line and payload contracts from the TypeScript SDK
  • make the ephemeral input union match server behavior: typing and progress require exactly one target; presence may remain workspace-wide or targeted
  • add agent.progress to the OpenAPI event enum and regenerate SDK declarations
  • add compile-time accepted/rejected input-shape coverage and integration docs

Contributor 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.
  • Real built server plus built SDK: targetless presence.changed returned 202; a bot-token agent.progress frame with one channel target returned 202. Observed: {"ownerKind":"human","presenceType":"presence.changed","presenceTargetless":true,"progressType":"agent.progress","progressChannelBound":true,"progressTurn":"live-turn-1"}.
  • AutoReview local and exact branch review — clean; no accepted/actionable findings.

Not merged.

Co-authored-by: Cad from Arca <cad@arcabot.ai>
@steipete

Copy link
Copy Markdown
Contributor Author

Exact-head proof for 068ce38bf1e93e8caec8090dcbc573fb4a48bf45:

  • pnpm --filter @clickclack/sdk-ts typecheck && pnpm build:sdk — passed, including positive and negative compile-time assertions for targetless presence, targeted typing/progress, dual targets, missing progress targets, and missing progress lines.
  • 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.
  • go build -o /private/tmp/clickclack-progress-live ./apps/api/cmd/clickclack, then the real binary with a disposable SQLite database and node /private/tmp/clickclack-progress-live.mjs against the built SDK — targetless workspace presence and targeted bot progress both returned 202. Observed: {"ownerKind":"human","presenceType":"presence.changed","presenceTargetless":true,"progressType":"agent.progress","progressChannelBound":true,"progressTurn":"live-turn-1"}.
  • AutoReview local and exact branch review — clean; no accepted/actionable findings.
  • Hosted exact-head CI — all seven jobs passed: Go, TypeScript, Playwright E2E, Docker Image, Linux Desktop, macOS Desktop, Windows Desktop.

Land-ready. Not merged.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +408 to +411
kind: "commentary" | "lifecycle" | "thinking" | "tool";
text?: string;
title?: string;
tool_name?: string;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@steipete
steipete merged commit 064a46f into main Jul 17, 2026
7 checks passed
@steipete
steipete deleted the feat/agent-progress-sdk-types branch July 17, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant