a2a-Market-Order-State-Machine
/install a2a-market-order-state-machine
a2a-Market Order State Machine
Define the canonical order lifecycle and transition guard framework.
Current status: first-release scaffold for early protocol compatibility.
Scope
- Model order states from creation to completion/cancelation.
- Enforce legal transitions with guard checks and side effects.
- Integrate payment and reputation triggers into state changes.
Suggested Project Layout
app/domain/order/order_state.pyapp/domain/order/order_aggregate.pyapp/application/usecases/transition_order.pyapp/application/services/order_event_publisher.py
Minimum Contracts (MVP P0)
create_order(intent_id, accepted_quote_id)initializes order inCREATED.transition(order_id, action, actor, payload)validates and applies state move.get_order_timeline(order_id)returns ordered transition history.recover_pending_orders(now_ts)handles timeout and stuck states.
Base States
CREATEDNEGOTIATINGPAYMENT_PENDINGPAIDFULFILLINGCOMPLETEDCANCELEDFAILED
Events
- Emit
ORDER_CREATEDat initialization. - Emit
ORDER_COMPLETEDwhen terminal success is reached. - Emit reputation update trigger after completion/cancel resolution.
Implementation Backlog
- Add compensation transitions for partial fulfillment failures.
- Add deterministic replay from event store snapshots.
Runtime Implementation
- Status: implemented in local runtime package.
- Primary code paths:
runtime/src/domain/order-state-machine.js- Validation: covered by
runtime/testsandnpm testinruntime/.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install a2a-market-order-state-machine - After installation, invoke the skill by name or use
/a2a-market-order-state-machine - Provide required inputs per the skill's parameter spec and get structured output
What is a2a-Market-Order-State-Machine?
Define order lifecycle states, transition guards, and recovery paths for A2A transactions. Use when implementing order orchestration from quote acceptance th... It is an AI Agent Skill for Claude Code / OpenClaw, with 206 downloads so far.
How do I install a2a-Market-Order-State-Machine?
Run "/install a2a-market-order-state-machine" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is a2a-Market-Order-State-Machine free?
Yes, a2a-Market-Order-State-Machine is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does a2a-Market-Order-State-Machine support?
a2a-Market-Order-State-Machine is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created a2a-Market-Order-State-Machine?
It is built and maintained by luoqianchenguni-max (@luoqianchenguni-max); the current version is v0.2.0.