You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ready to implement. Spec: .specs/sdk/per-tool-capture.md (committed in #78). The spec is the source of truth; the comments below are review history.
Task
withYavio() gains per-tool overrides of the capture flags, merged over the global capture config, so a tool with sensitive input can stay on the proxy instead of being registered outside it:
Why: registering outside the proxy is the only option today, and it loses the tool_call event and silently turns yavio.conversion() / track() / step() / identify() into no-ops — createYavioContext() has no fallback store. Measured on Commerce for Agents: 46 conversions from a proxied tool, 0 from the unwrapped booking tool, no warning anywhere.
Decisions (final — these supersede anything in the review comments)
Reuse YAVIO-1105 (SDK.CONTEXT_INJECTION_UNAVAILABLE, already defined and unused) for the warn-once. Do not mint a new code. Its catalog text in .specs/07_error-catalog.md is wrong ("will lack traceId and sessionId") and must be corrected to say the event is dropped.
intent: false is a third controller state, not just "ineligible": never advertise context, never capture it, but still strip it when a client sends one from a cached schema — otherwise a strict Zod schema rejects the call.
Client meta stays coupled to inputValues deliberately. Decoupling would silently start collecting subject_id/locale/country_code for existing integrators who set inputValues: false as their privacy posture. That is a collection expansion needing its own opt-in decision, not a refactor.
Docs: 02-sdk/02-tracking-api.mdx currently documents the silent drop as intended and must change too, not only the README.
Acceptance
ToolCaptureOverride + WithYavioOptions.tools + .yaviorc.jsontools (no env-var form)
resolveToolCapture(name) applied in both interceptors (tool() and registerTool(), MCP SDK and Skybridge conventions)
inputValues:false drops input_keys/input_types/input_values and client meta, on success and throw
intent:false third state, incl. the strict-schema strip test
Warn-once YAVIO-1105 + corrected catalog text
Tests per the spec's Tests section (config, proxy, intent integration, context)
README + docs pages updated
Independent of #75; both target @yavio/sdk 0.4.0. Additive, no behaviour change without tools.
Follow-up once shipped: migrate Commerce for Agents (book-contract onto the proxy with the override, drop the "unwrapped server" invariant, verify with scripts/analytics-funnel.mjs --book — conversion present, PII grep 0 hits).
Ready to implement. Spec:
.specs/sdk/per-tool-capture.md(committed in #78). The spec is the source of truth; the comments below are review history.Task
withYavio()gains per-tool overrides of the capture flags, merged over the globalcaptureconfig, so a tool with sensitive input can stay on the proxy instead of being registered outside it:Why: registering outside the proxy is the only option today, and it loses the
tool_callevent and silently turnsyavio.conversion()/track()/step()/identify()into no-ops —createYavioContext()has no fallback store. Measured on Commerce for Agents: 46 conversions from a proxied tool, 0 from the unwrapped booking tool, no warning anywhere.Decisions (final — these supersede anything in the review comments)
YAVIO-1105(SDK.CONTEXT_INJECTION_UNAVAILABLE, already defined and unused) for the warn-once. Do not mint a new code. Its catalog text in.specs/07_error-catalog.mdis wrong ("will lack traceId and sessionId") and must be corrected to say the event is dropped.intent: falseis a third controller state, not just "ineligible": never advertisecontext, never capture it, but still strip it when a client sends one from a cached schema — otherwise a strict Zod schema rejects the call.outputValues: false, keepstatusanderror_categorybut drop the result-derivederror_message. That text is output, and a handler echoing "postal code 12345 invalid" would leak the very input the override exists to hide. The thrown-path message stays (developer-written).inputValuesdeliberately. Decoupling would silently start collectingsubject_id/locale/country_codefor existing integrators who setinputValues: falseas their privacy posture. That is a collection expansion needing its own opt-in decision, not a refactor.02-sdk/02-tracking-api.mdxcurrently documents the silent drop as intended and must change too, not only the README.Acceptance
ToolCaptureOverride+WithYavioOptions.tools+.yaviorc.jsontools(no env-var form)resolveToolCapture(name)applied in both interceptors (tool()andregisterTool(), MCP SDK and Skybridge conventions)inputValues:falsedrops input_keys/input_types/input_values and client meta, on success and throwintent:falsethird state, incl. the strict-schema strip testYAVIO-1105+ corrected catalog textIndependent of #75; both target @yavio/sdk 0.4.0. Additive, no behaviour change without
tools.Follow-up once shipped: migrate Commerce for Agents (
book-contractonto the proxy with the override, drop the "unwrapped server" invariant, verify withscripts/analytics-funnel.mjs --book— conversion present, PII grep 0 hits).