Build the rule engine shell for stake lock lifecycle in A2A transactions.
Current status: registration-first scaffold with explicit policy points.
app/domain/rules/stake_rules.py
app/application/services/stake_service.py
app/infrastructure/db/stake_repository.py
app/infrastructure/tasks/stake_timeout_worker.py
freeze_stake(node_id, intent_id, amount) returns lock record.
release_stake(lock_id, reason) closes lock and restores available stake.
slash_stake(lock_id, reason, evidence) applies penalty and emits incident log.
evaluate_timeout_locks(now_ts) handles automatic release/slash decisions.
NEGOTIATION_STARTED when stake lock is confirmed.
runtime/src/domain/stake-policy.js
runtime/tests and npm test in runtime/.
共 1 个版本