Pulse/cmd
rcourtman 76832797f4 Pin the MCP adapter's write path through tools/call
Slice 51's existing tools/call test only covered GET (no body),
so the body-argument extraction, JSON marshaling, Content-Type
header, and path-placeholder substitution working together for
PUT/POST capabilities went untested. If an agent calls
set_operator_state via MCP and the body doesn't make it through
correctly, the substrate would silently swallow the agent's
data and emit a "successful" response.

Three new tests fill the gap:

  - SendsPutBodyForWriteCapabilities exercises the canonical
    write path against a fake Pulse: PUT method, substituted path,
    bearer token header, application/json Content-Type, the body
    fields round-tripping through JSON marshaling, the upstream
    response surfacing in the MCP content block with isError=false,
    and server-populated attribution (setBy) reaching the agent.

  - TopLevelArgsMakeUpRequestBody pins the flexibility on the
    body argument: agents that pass body fields at the top level
    of arguments (no nested "body" key) get them collected into
    the upstream request body. This is the shape MCP clients tend
    to generate when they read the input schema as "object with
    these fields"; the bridge accepts both.

  - TopLevelArgsExcludesPathPlaceholders pins the disambiguation
    rule for the case both shapes overlap: when arguments include
    both a path placeholder and body fields at the top level,
    the placeholder goes ONLY in the URL, never duplicated into
    the body. Drift here would let canonicalId leak into a PUT
    body the server doesn't expect, which currently doesn't
    break Pulse but would break any future server that validates
    body fields against a stricter schema.

Test-only addition; no production code changed.
2026-05-10 14:45:04 +01:00
..
agent-probe Add cmd/agent-probe — worked example consuming the agent substrate 2026-05-09 22:28:00 +01:00
eval feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
hashpw feat: remove Enterprise badges, simplify Pro upgrade prompts 2026-01-09 16:51:08 +00:00
pulse Support enterprise mobile approval proof backend 2026-03-29 21:52:18 +01:00
pulse-agent Harden root agent service defaults 2026-05-05 13:03:13 +01:00
pulse-control-plane Record iOS mobile readiness proof 2026-04-26 12:10:16 +01:00
pulse-mcp Pin the MCP adapter's write path through tools/call 2026-05-10 14:45:04 +01:00