Skip to content

fix(server): identify agent calls with the machine's formae client id - #38

Open
JeroenSoeters wants to merge 2 commits into
mainfrom
docs/user-query-key
Open

fix(server): identify agent calls with the machine's formae client id#38
JeroenSoeters wants to merge 2 commits into
mainfrom
docs/user-query-key

Conversation

@JeroenSoeters

@JeroenSoeters JeroenSoeters commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Agent calls now identify themselves with the machine's real formae client id instead of a shared literal: a new internal/clientid resolver reads ~/.pel/formae/cli_client_id (the id the formae CLI persists), validates it as a single header-safe token, and caches it for the process lifetime. When the file is missing or invalid it falls back to the previous "formae-mcp" literal, uncached, so a later call picks up the file once it exists; a command never fails because of identity plumbing. The resolver never executes a binary.
  • All six command call sites (apply, destroy, destroy-by-query, cancel, command status, list) send the resolved id as Client-ID; client:me from this server now means "this machine, shared with the CLI" when the id file exists.
  • Documents formae's new user: command-query key in every hand-maintained copy of the grammar (tool description, input schema, query-syntax resource): user:me rides the bearer token and means the human; a UUID or KSUID value matches the subject id; anything else matches the display name.

@JeroenSoeters JeroenSoeters changed the title docs(tools): document the user query key fix(server): identify agent calls with the machine's formae client id Aug 26, 2026
@JeroenSoeters
JeroenSoeters marked this pull request as draft August 26, 2026 16:51
@JeroenSoeters

Copy link
Copy Markdown
Contributor Author

Held until the next formae release ships: the query-key documentation in this PR describes the user: key, which agents released before that do not parse. The client-id change has no release dependency and can be split out if it is needed sooner.

@JeroenSoeters
JeroenSoeters marked this pull request as ready for review August 26, 2026 17:08
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