Skip to content

fix(schemas)!: rename SI context→intent, adopt core context echo (#2774) - #2791

Merged
bokelley merged 2 commits into
mainfrom
bokelley/si-context-to-intent
Apr 22, 2026
Merged

fix(schemas)!: rename SI context→intent, adopt core context echo (#2774)#2791
bokelley merged 2 commits into
mainfrom
bokelley/si-context-to-intent

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

  • Breaking (SI, experimental): On si_get_offering and si_initiate_session requests, the natural-language user-intent field is renamed from context (string) to intent (string).
  • context on these requests now refers to the universal opaque-echo object (/schemas/core/context.json), matching every other AdCP subprotocol.
  • si_terminate_session already conformed (used context: $ref /schemas/core/context.json) and is unchanged.

Why

context was redefined locally on three SI request schemas as a typed string with protocol-parsed semantic meaning. That collided with the universal context object — the "opaque correlation data echoed unchanged" contract that every other subprotocol relies on. Buyers and SDK generators who trusted the universal contract were mis-typing SI payloads. Surfaced by the sample_request schema lint in #2768.

Field name chosen after expert protocol review: intent over handoff because si_get_offering is pre-session and anonymous — there's no session to "hand off" yet. intent is endpoint-neutral and already matches the descriptions the docs used three times.

Closes #2774.

Cascade

  • 2 schema source files (the rename + adding context: $ref)
  • 2 storyboard YAMLs (sample_requests; also replaced the misleading "Nova EV launch — targeting environmentally conscious drivers" campaign-brief string with an actual host-side user-intent description)
  • 1 regenerated allowlist (only stale type@/context:string entries removed)
  • 8 docs: specification.mdx (normative requirements list), implementing-si-agents.mdx (MCP tool example + prose), networks.mdx (leg-mapping table), si-chat-protocol.mdx, tasks/{index,si_get_offering,si_initiate_session}.mdx, skills/adcp-si/SKILL.md
  • 1 changeset: "adcontextprotocol": minor (experimental-surface carve-out per docs/reference/experimental-status)

What's NOT in this PR (intentional)

  • Internal Addie siAgentService.initiateSession({context}) still uses context as its internal param name. It's a local service (not an AdCP wire call) that writes to DB column initial_context, so the rename doesn't cascade. Follow-up refactor if we want full Addie-internal consistency.

Test plan

  • test:schemas — 7 passing
  • test:examples — 31 passing
  • test:composed — 21 passing
  • test:storyboard-sample-request-schema — 7 passing (allowlist shrunk, no new drift)
  • test:storyboard-{scoping,branch-sets,contradictions,context-entity,auth-shape,test-kits} — all passing
  • test:docs-nav — 15 passing
  • test:server-unit — 1699 passing (34 skipped, unrelated)
  • test:unit (precommit) — 631 passing
  • typecheck (precommit) — clean
  • Mintlify link-check (pre-push) — clean

🤖 Generated with Claude Code

bokelley and others added 2 commits April 21, 2026 22:00
si_get_offering and si_initiate_session redefined `context` as a string
carrying user intent, which collided with the universal
/schemas/core/context.json opaque-echo contract used by every other
AdCP subprotocol. Rename the string field to `intent` on both requests
and add context: $ref /schemas/core/context.json so SI inherits the
universal echo semantics. si_terminate_session already conformed and is
unchanged.

Docs cascade through tasks/*, specification, networks, implementing-si-
agents, si-chat-protocol, tasks/index, and the adcp-si SKILL. Storyboard
sample_requests updated; allowlist regenerated (only stale
type@/context:string entries removed). Changeset notes breaking on an
experimental surface (minor under the experimental carve-out in
docs/reference/experimental-status).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ation-context section

Per expert review follow-ups on #2791:
- SKILL.md documented `intent` on all SI tasks but silently omitted the
  new `context` opaque-echo object. Agents reading the skill were missing
  half the schema change. Added `context` field bullets to
  si_initiate_session, si_get_offering, and si_terminate_session.
- The `context-sessions` link in si_initiate_session.mdx landed at the
  top of a page about context_id/task_id identifiers. Anchored it to
  #application-context-context so readers looking for the opaque-echo
  semantics find them directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley
bokelley merged commit 1bc03ff into main Apr 22, 2026
17 checks passed
@bokelley
bokelley deleted the bokelley/si-context-to-intent branch April 22, 2026 02:24
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.

Schema: context field collision — SI schemas redefine core context as string with semantic meaning

1 participant