feat(spec): sync protocol and public API schemas with Cloud implementation#27
Merged
George-iam merged 3 commits intomainfrom Mar 13, 2026
Merged
Conversation
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
…ios/apply endpoint 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TIMED_OUTstatus tointent.lifecycle.v1andintent.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)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 withpending_withobjectWorkflowStepSpec.tool_idno longer required; addruntime_type(built-in primitives:human_approval,timeout,reminder,delay,escalation,notification) +runtime_config; enrichHumanTaskSpecwithtask_type,allowed_outcomes,required_comment,assignees,evidence_requiredagent_addressanddisplay_nameto create response (per B2B Core v2 Phase 2)api.agents.list.response.v1,api.agents.get.response.v1(GET /v1/agents),api.tasks.list.response.v1(GET /v1/me/tasks human inbox)scripts/__init__.py; 77 total passTest plan
PYTHONPATH=. python -m pytest tests/ -v→ 77 passed, 0 failed$idvalues are unique across the schema treeMade with Cursor