Skip to content

feat(server): forward per-prompt actor receipts - #25

Open
alexanderkreidich wants to merge 2 commits into
appx-org:mainfrom
alexanderkreidich:fix/request-attribution-receipt
Open

feat(server): forward per-prompt actor receipts#25
alexanderkreidich wants to merge 2 commits into
appx-org:mainfrom
alexanderkreidich:fix/request-attribution-receipt

Conversation

@alexanderkreidich

Copy link
Copy Markdown

Summary

  • accept an optional opaque actor receipt on session prompt requests
  • associate receipts with the exact delivered user message, including queued steering prompts
  • inject the active receipt into provider metadata after project extensions
  • remove stale or request-forged receipt metadata when no trusted receipt is active

Why

Gateways that authenticate end users need a trusted way to carry per-prompt attribution through agent-server to an OpenAI-compatible model proxy. The receipt remains opaque to agent-server; verification stays at the gateway's model proxy boundary.

Safety

  • receipts are not added to prompt text, transcripts, SSE events, or tool environments
  • concurrent sessions retain independent attribution
  • steering switches attribution only when Pi delivers the queued user message
  • rejected prompts and disposed sessions clear queued state

Validation

  • npm test --workspace @appx-org/agent-server
  • npm run typecheck --workspace @appx-org/agent-server
  • Biome checks for changed files
  • git diff --check

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