Skip to content

feat(spec): sync protocol and public API schemas with Cloud implementation#27

Merged
George-iam merged 3 commits intomainfrom
feat/participant-model-spec-20260313
Mar 13, 2026
Merged

feat(spec): sync protocol and public API schemas with Cloud implementation#27
George-iam merged 3 commits intomainfrom
feat/participant-model-spec-20260313

Conversation

@George-iam
Copy link
Contributor

Summary

  • Protocol: add TIMED_OUT status to intent.lifecycle.v1 and intent.event.v1; add 5 new event types (intent.timed_out, intent.reminder, intent.escalated, intent.delivery_failed, intent.human_task_assigned) — syncing spec with Cloud (PR #73)
  • Intents: from_agent → optional (deprecated, auto-derived from API key per D-022/Phase 3); add durability fields (deadline_at, remind_*, escalate_to, max_delivery_attempts, human_task) to create request; expose same fields in get response with pending_with object
  • ScenarioBundle: WorkflowStepSpec.tool_id no longer required; add runtime_type (built-in primitives: human_approval, timeout, reminder, delay, escalation, notification) + runtime_config; enrich HumanTaskSpec with task_type, allowed_outcomes, required_comment, assignees, evidence_required
  • Service accounts: add agent_address and display_name to create response (per B2B Core v2 Phase 2)
  • New schemas: api.agents.list.response.v1, api.agents.get.response.v1 (GET /v1/agents), api.tasks.list.response.v1 (GET /v1/me/tasks human inbox)
  • Tests: 76 new contract tests + fix scripts/__init__.py; 77 total pass

Test plan

  • PYTHONPATH=. python -m pytest tests/ -v → 77 passed, 0 failed
  • All JSON schemas parse without errors
  • All $id values are unique across the schema tree

Made with Cursor

Adds two new public-API schemas:
- api.scenarios.bundle.request.v1.json: full ScenarioBundle definition
  covering agents, humans, workflow steps (with retry, human_task,
  reminders, escalation, deadlines) and intent submission settings.
- api.scenarios.bundle.response.v1.json: response from POST /v1/scenarios/bundle
  including intent_id, status, pending_with, resolved agents, and
  workflow_compile_id.

These schemas are the canonical contract for the durable scenario
execution feature described in DURABLE_WORKFLOW_PLAN.md.

Made-with: Cursor
…ation

Protocol (schemas/protocol/):
- intent.lifecycle.v1: add TIMED_OUT to status enum
- intent.event.v1: add TIMED_OUT to status; add 5 new event_type values
  (intent.timed_out, intent.reminder, intent.escalated,
   intent.delivery_failed, intent.human_task_assigned)

Public API (schemas/public_api/):
- api.intents.create.request.v1: from_agent → optional (deprecated,
  auto-derived from API key); add deadline_at, remind_*, escalate_to,
  max_delivery_attempts, human_task durability fields
- api.intents.create.response.v1: add TIMED_OUT to status enum
- api.intents.get.response.v1: add TIMED_OUT; add durability fields
  (deadline_at, remind_*, remind_count, escalate_to, delivery_attempt,
   max_delivery_attempts, human_task, pending_with) to intent object
- api.scenarios.bundle.request.v1: WorkflowStepSpec.tool_id no longer
  required; add runtime_type enum (human_approval, timeout, reminder,
  delay, escalation, notification) + runtime_config; enrich HumanTaskSpec
  with task_type, allowed_outcomes, required_comment, assignees,
  evidence_required
- api.service_accounts.create.response.v1: add agent_address and
  display_name fields to service_account object

New schemas:
- api.agents.list.response.v1: GET /v1/agents response
- api.agents.get.response.v1: GET /v1/agents/{address} response
- api.tasks.list.response.v1: GET /v1/me/tasks response (human inbox)

Tests:
- tests/test_schema_contracts.py: 76 contract tests across 11 groups
  covering all changes; all 77 tests pass (76 new + 1 existing)
- Fix scripts/__init__.py missing to allow pytest to import validate_schemas

Made-with: Cursor
@George-iam George-iam merged commit e03b394 into main Mar 13, 2026
1 check passed
@George-iam George-iam deleted the feat/participant-model-spec-20260313 branch March 13, 2026 08:19
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