Skip to content

feat(kap-server): advertise transcript prompt entities in /meta capabilities - #3246

Closed
wbxl2000 wants to merge 1 commit into
mainfrom
feat/transcript-prompts-capability
Closed

feat(kap-server): advertise transcript prompt entities in /meta capabilities#3246
wbxl2000 wants to merge 1 commit into
mainfrom
feat/transcript-prompts-capability

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Problem

Clients driving the main transcript from the transcript protocol (kimi-code-app #279 onward) need the daemon's prompt entities (live prompt.upsert ops + the prompts field of the transcript read) to reconcile their optimistic user bubbles. That capability only exists since #3102 — older daemons never broadcast prompt entities, so a new client connected to an old daemon renders every sent message twice for the whole turn.

The app's migration plan explicitly decided not to build old-daemon fallbacks — but to surface the skew loudly instead of silently misbehaving. That requires the daemon to advertise the capability so clients can detect its absence.

Change

Add transcript_prompts: true to the capabilities object of GET /api/v1/meta (route + wire schema). The flag is additive: older clients ignore unknown capability keys.

A client that requires prompt entities can then warn clearly ("server too old") when the key is absent, instead of showing duplicated messages.

Tests

  • New case in packages/kap-server/test/meta.test.ts asserting the capability is advertised.
  • pnpm --filter @moonshot-ai/kap-server typecheck, repo check-no-comments, and oxlint on the touched packages all pass.

No changeset: internal protocol surface, not user-perceivable per the gen-changesets rules.

@changeset-bot

changeset-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d0bd09a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Aug 25, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@d0bd09a
npx https://pkg.pr.new/@moonshot-ai/kimi-code@d0bd09a

commit: d0bd09a

@wbxl2000

Copy link
Copy Markdown
Collaborator Author

Superseded by the general version-skew approach: instead of per-feature capability flags, prevent the skew from occurring (dev loop now rebuilds+restarts the embedded server on daemon source changes) and, for external servers, detect it generically via build identity rather than one flag per contract.

@wbxl2000 wbxl2000 closed this Aug 25, 2026
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