Versioned outbound privacy/compatibility profiles for Hermes, OpenClaw and Agent Zero #72

Open
opened 2026-09-12 19:54:49 +00:00 by nsaspy · 2 comments
Owner

Goal

Use llm-log as an observation and normalization proxy to characterize client/harness traffic and produce deterministic, versioned outbound privacy/compatibility profiles.

Explicit user requirement — 2026-09-12

Hermes, OpenClaw and Agent Zero must be able to select the same OpenCode-style outbound profile for Z.ai or another configured provider. This is an applied egress profile feature, not only passive capture/diff. Agent Zero remains a general-purpose agent: do not replace its system prompt or tool catalogue with coding-only assumptions.

Provider-wide rate limiting is the highest priority and must remain independent of source harness and outbound profile. Changing a profile, user agent or provider route alias must not create fresh capacity for a shared upstream quota.

Profile contract

  • Separate source harness, outbound wire profile, provider/protocol adapter and admission/quota group.
  • Profiles are operator-controlled, versioned and explicitly selected; no per-request arbitrary header injection or client-controlled quota group.
  • Support transparent, metadata-minimizing and OpenCode-style profiles. OpenCode profiles must pin an observed/source-verified version rather than inventing a current version.
  • Normalize allowed application identity headers and strip configured identifying metadata (SDK/harness version, local session IDs, host/user tags, tracing fields) without logging credentials.
  • Preserve authorization, provider-required authentication/version headers, model selection, request body, prompts, tool names/arguments/results, message order and streaming semantics unless a separately specified, tested protocol adapter requires a transformation.
  • Header names are case-insensitive. Reject CR/LF and invalid header names/values. Profile rules cannot override transport framing, routing authority or credentials.
  • Local provenance records source harness and applied profile/version separately; public/downstream traffic need not contain source-harness labels.
  • No claim of full anonymization or indistinguishability: a header profile does not reproduce TLS fingerprints, request bodies, tool schemas, timing or authenticated account identity. Report these as unverified surfaces rather than claiming conformance.

Observation/capture scope

  • Capture sanitized request/response metadata for selected harnesses.
  • Record HTTP method/path, stable and varying headers, request body schema/defaults, SSE framing, tool schemas, tool-result serialization, retry/cancel behavior and concurrency patterns.
  • Redact credentials and sensitive prompt/content by default.
  • Produce deterministic diffs between Hermes, OpenClaw, Agent Zero, OpenCode and native traffic.
  • Version fixtures so observed wire contracts can be reproduced and regression-tested.

Deliverables

  • Typed profile schema and validation.
  • Operator config plus outbound transport integration.
  • Capture/export commands and sanitized fixtures.
  • Deterministic diff output.
  • Regression tests for parsing, application, header injection rejection, original-request immutability, authentication/tool preservation and shared rate limits across profiles.

Acceptance matrix

Run each supported source harness through the same profile toward fake Z.ai and generic-provider upstreams. Assert identical configured application identity headers, no leaked configured metadata, unchanged bodies/authentication, preserved stream behavior and a single shared configured admission/rate budget. Separately verify real-client/provider conformance before marking a captured profile verified.

Depends on #70 / PR #74 for bounded admission. #72 remains client retry cooperation; #73 remains opt-in queue-status SSE. First implementation may cover the typed header-only profile foundation, but must not close this entire issue before capture/diff and end-to-end conformance exist.

## Goal Use llm-log as an observation and normalization proxy to characterize client/harness traffic and produce deterministic, versioned outbound privacy/compatibility profiles. ## Explicit user requirement — 2026-09-12 Hermes, OpenClaw and Agent Zero must be able to select the same OpenCode-style outbound profile for Z.ai or another configured provider. This is an applied egress profile feature, not only passive capture/diff. Agent Zero remains a general-purpose agent: do not replace its system prompt or tool catalogue with coding-only assumptions. Provider-wide rate limiting is the highest priority and must remain independent of source harness and outbound profile. Changing a profile, user agent or provider route alias must not create fresh capacity for a shared upstream quota. ## Profile contract - Separate source harness, outbound wire profile, provider/protocol adapter and admission/quota group. - Profiles are operator-controlled, versioned and explicitly selected; no per-request arbitrary header injection or client-controlled quota group. - Support transparent, metadata-minimizing and OpenCode-style profiles. OpenCode profiles must pin an observed/source-verified version rather than inventing a current version. - Normalize allowed application identity headers and strip configured identifying metadata (SDK/harness version, local session IDs, host/user tags, tracing fields) without logging credentials. - Preserve authorization, provider-required authentication/version headers, model selection, request body, prompts, tool names/arguments/results, message order and streaming semantics unless a separately specified, tested protocol adapter requires a transformation. - Header names are case-insensitive. Reject CR/LF and invalid header names/values. Profile rules cannot override transport framing, routing authority or credentials. - Local provenance records source harness and applied profile/version separately; public/downstream traffic need not contain source-harness labels. - No claim of full anonymization or indistinguishability: a header profile does not reproduce TLS fingerprints, request bodies, tool schemas, timing or authenticated account identity. Report these as unverified surfaces rather than claiming conformance. ## Observation/capture scope - Capture sanitized request/response metadata for selected harnesses. - Record HTTP method/path, stable and varying headers, request body schema/defaults, SSE framing, tool schemas, tool-result serialization, retry/cancel behavior and concurrency patterns. - Redact credentials and sensitive prompt/content by default. - Produce deterministic diffs between Hermes, OpenClaw, Agent Zero, OpenCode and native traffic. - Version fixtures so observed wire contracts can be reproduced and regression-tested. ## Deliverables - Typed profile schema and validation. - Operator config plus outbound transport integration. - Capture/export commands and sanitized fixtures. - Deterministic diff output. - Regression tests for parsing, application, header injection rejection, original-request immutability, authentication/tool preservation and shared rate limits across profiles. ## Acceptance matrix Run each supported source harness through the same profile toward fake Z.ai and generic-provider upstreams. Assert identical configured application identity headers, no leaked configured metadata, unchanged bodies/authentication, preserved stream behavior and a single shared configured admission/rate budget. Separately verify real-client/provider conformance before marking a captured profile verified. Depends on #70 / PR #74 for bounded admission. #72 remains client retry cooperation; #73 remains opt-in queue-status SSE. First implementation may cover the typed header-only profile foundation, but must not close this entire issue before capture/diff and end-to-end conformance exist.
nsaspy changed title from Capture and diff harness wire profiles through llm-log to Versioned outbound privacy/compatibility profiles for Hermes, OpenClaw and Agent Zero 2026-09-12 23:06:23 +00:00
Author
Owner

September 12 user requirement: Agent Zero should present the configured OpenCode identity/wire profile upstream, not merely be labeled "compatible" in the UI. Implement a trusted, pinned outbound profile from sanitized observed OpenCode traffic; preserve original Agent Zero provenance separately. Profile must cover the observed headers/request/tool/stream contract, not just assume User-Agent alone reproduces OpenCode. No claim of provider acceptance until a live conformance test.

Rate limiting is the highest-priority dependency. #75 / PR #76 add shared admission groups above client presentation. Native, Agent Zero and OpenCode-facing aliases for the same quota must map to the same configured group; incoming headers/client names cannot select quota ownership. Do not rotate identities, credentials or groups in response to 429. Keep capture fixtures/redaction and profile rewriting separate from admission policy.

September 12 user requirement: Agent Zero should present the configured OpenCode identity/wire profile upstream, not merely be labeled "compatible" in the UI. Implement a trusted, pinned outbound profile from sanitized observed OpenCode traffic; preserve original Agent Zero provenance separately. Profile must cover the observed headers/request/tool/stream contract, not just assume User-Agent alone reproduces OpenCode. No claim of provider acceptance until a live conformance test. Rate limiting is the highest-priority dependency. #75 / PR #76 add shared admission groups above client presentation. Native, Agent Zero and OpenCode-facing aliases for the same quota must map to the same configured group; incoming headers/client names cannot select quota ownership. Do not rotate identities, credentials or groups in response to 429. Keep capture fixtures/redaction and profile rewriting separate from admission policy.
Author
Owner

Current architecture follow-up is tracked in #105. Do not merge the stale Common Lisp transport profile stack into current main; Python owns HTTP/SSE/WebSocket transport now. The OpenCode-style egress profile must be implemented on that path and remain independent of the shared quota group in #104.

Current architecture follow-up is tracked in #105. Do not merge the stale Common Lisp transport profile stack into current main; Python owns HTTP/SSE/WebSocket transport now. The OpenCode-style egress profile must be implemented on that path and remain independent of the shared quota group in #104.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/llm-log#72
No description provided.