Skip to content

feat(intent): op=method contract — nil_intent can express workflow actions#65

Open
Basheirkh wants to merge 1 commit into
mainfrom
feat/intent-method-contract
Open

feat(intent): op=method contract — nil_intent can express workflow actions#65
Basheirkh wants to merge 1 commit into
mainfrom
feat/intent-method-contract

Conversation

@Basheirkh

Copy link
Copy Markdown
Contributor

Summary

Extends the nil_intent write contract so the single payload covers workflow methods (post an invoice, validate a picking, confirm an order), not just CRUD — completing the model-facing surface for Odoo full coverage.

  • Change gains method + params (used when op="method").
  • OP_TO_RESOURCE["method"] = "resource.method" → the adapter's generic, allow-list-governed (default-deny) method spine. No per-action verb needed.

Scope / honesty

Contract readiness only. The kernel resolver does reads today; the write-execution provider that consumes change (CRUD and method) over propose→commit is the intent-unification phase (PLAN-intent-unification-and-durability, kept local). This PR makes the contract complete so that provider — and the already-shipped Odoo adapter resource.method (PR odoo#10/#11) — line up the moment it lands.

Backward-compatible: new fields default-empty; reads unchanged.

Test plan

  • pytest tests/ -k "intent or router" — green
  • New test_change_contract_supports_method_op

…tions

Extend the intent write contract so the single nil_intent payload covers workflow methods (post an
invoice, validate a picking, confirm an order), not just CRUD:

- Change gains `method` + `params` (for op="method").
- OP_TO_RESOURCE["method"] = "resource.method" — maps to the adapter's generic, allow-list-governed
  (default-deny) method spine, so no per-action verb is needed.

Contract readiness only: the write-execution provider that consumes `change` (CRUD and method) over
propose→commit is the intent-unification phase. Reads are unchanged. Backward-compatible (new fields
default-empty). Adapter side (odoo resource.method + per-(model,method) allow-list) already shipped.
@Basheirkh Basheirkh force-pushed the feat/intent-method-contract branch from 2b571c0 to 2023143 Compare June 26, 2026 19:15
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