Skip to content

feat: add apply_scenario() and validate_scenario() to AxmeClient#30

Merged
George-iam merged 4 commits intomainfrom
feat/apply-scenario-20260310
Mar 13, 2026
Merged

feat: add apply_scenario() and validate_scenario() to AxmeClient#30
George-iam merged 4 commits intomainfrom
feat/apply-scenario-20260310

Conversation

@George-iam
Copy link
Contributor

Summary

  • apply_scenario(bundle, *, idempotency_key, trace_id) — submits a ScenarioBundle to POST /v1/scenarios/bundle; provisions agents, compiles workflow, creates intent atomically
  • validate_scenario(bundle, *, trace_id) — dry-run validation via POST /v1/scenarios/validate

Part of the Durable Workflow Plan, Group 5-C.

Test plan

  • apply_scenario calls POST /v1/scenarios/bundle with correct body
  • idempotency_key is forwarded as both header and body field
  • validate_scenario calls POST /v1/scenarios/validate retryable=True

Made with Cursor

apply_scenario() submits a ScenarioBundle to POST /v1/scenarios/bundle
in one atomic call — provisions agents, compiles the workflow, and
creates the intent.

validate_scenario() performs a dry-run via POST /v1/scenarios/validate
without creating any resources.

Made-with: Cursor
Implements GET /v1/agents/{address}/intents/stream SSE consumer in AxmeClient.
Adds _iter_agent_intents_stream private helper, updates _is_terminal_intent_event
to include TIMED_OUT status, and adds 11 comprehensive tests covering SSE parsing,
scheme stripping, cursor advancement across reconnects, timeout, and auth errors.

Made-with: Cursor
@George-iam George-iam merged commit 8a13e12 into main Mar 13, 2026
1 check passed
@George-iam George-iam deleted the feat/apply-scenario-20260310 branch March 13, 2026 10: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.

1 participant