Skip to content

Status, 11 October 2026: the accepted operation shape, from decision 004; not implemented. The machine contract is contracts/module/operations.json: the resources, their writable fields and capabilities, and JSON Schema with examples for every operation; bun run contracts:check validates it against protocol.yaml's envelope and neutral model. Standalone, generated from it: JSON Schema · request and response examples. Module Protocol 1 keeps the transport, the envelope, signing, pairing, store.describe and the neutral model; the operations on this page replace its catalog.* and price.apply, and the contract files follow in the next change. Nothing here runs yet: the API and the OpenCart 3 module still speak the old operations until iteration 6 in PLAN.md lands.

Operation shape: resources, verbs and intent tools ​

Every operation between the Store Deputy API and a platform driver has one of four shapes, and every tool the agent sees is named after an intent. The point is that a new platform implements the same four verbs for the resources it supports and declares what it has, while the agent's tools, the owner's approval and the ledger stay the same.

Agentfy agent ──MCP tool (intent)──▶ Store Deputy API ──<resource>.<verb>──▶ driver ──▶ shop
                                     change engine                           module in the shop,
                                     approval, ledger                        or a connector for a hosted platform

Driver primitives ​

A driver is the module installed in a shop (OpenCart 3, OpenCart 4, a WooCommerce plugin, PrestaShop) or a connector on the Store Deputy side for a platform that has no module (Shopify). Both expose the same operations, named <resource>.<verb>, resource in the singular.

VerbParamsResult
searchidentifiers { type, value } or the resource's narrow criteriaevery match for every input, in request order; never picks one
getids (1 to maxIdsPerRead), include (for a product: ["variants"], needs variant.read; ["texts"], accepted)items, missing
listcursor, limit (at most maxPageSize), updatedSince; product.list also include (["variants"], needs variant.read)items, nextCursor (null on the last page)
query (proposed)filters[{ type, value }], sort, order (asc/desc), page, limit (at most maxPageSize)items, itemCount, page, pageCount
applyitems[{ id, expected, set }] (1 to maxItemsPerWrite)one outcome per item, in order

The envelope, HMAC signing in both directions, "every answer from the driver is HTTP 200", the error codes and the data model are those of Module Protocol 1 and do not change.

query: filters, sorting and pages (proposed) ​

Proposed on 16 October 2026, not accepted and not implemented by any module or by the API. The first operation is category.query; it awaits review by Yevhen Kariakin before other resources get one.

search resolves identifiers (one result per input) and list walks everything with a cursor. query answers a question with conditions — "disabled categories under Kitchen, newest first" — in one numbered page with the total, using the shop's own database.

ParamValues
filtersa list of { type, value }, like search identifiers. For categories: name (word by word: the name must contain every word of the value, in any order, case-insensitively; % _ * literal, so a module on SQL LIKE escapes them), status (enabled/disabled), parentId (direct children; null for top level only), storefrontId, createdAt and updatedAt (a range { "from": …, "to": … } in UTC, both ends inclusive, either end optional but not both)
sortname, status, createdAt, updatedAt; left out: by id ascending. Ties are always broken by id in the same direction
orderasc (default) or desc
page, limitpage from 1; limit 1–500, at most maxPageSize, default 100
json
{ "filters": [ { "type": "status", "value": "disabled" }, { "type": "parentId", "value": "18" } ],
  "sort": "createdAt", "order": "desc", "page": 1, "limit": 100 }

The answer is items (categories with id, name, parentId, status, storefrontIds, createdAt, updatedAt, extensions; the two dates are null on a platform that keeps none, such as WooCommerce, and such a category never matches a date range), itemCount, page and pageCount = ⌈itemCount / limit⌉.

  • Filters of different types combine with AND, several of the same type with OR (two storefrontId filters: shown on either; two createdAt ranges: created in either period).
  • A range keeps from ≤ value ≤ to; for a whole day or month, to is its last second (2026-03-31T23:59:59Z). The shop stores local times, so the module converts them to UTC before comparing.
  • An unknown filter type, sort or order, a value of the wrong kind, page 0, a range with neither end or with from after to answer invalid_params. A page past pageCount is an empty items, not an error.
  • A page is a position, not a bookmark: a change between two requests can skip or repeat an item. A complete pass uses list.
  • Proved by the conformance cases EV-QUERY-01 to EV-QUERY-04 on the reference module only.

product.query ​

The same filters, sort, order, page and limit, plus include as in product.list (["variants"], needs variant.read); the answer is items in the shape of product.get (with createdAt; with variants when include asks), itemCount, page, pageCount.

FilterValue
code, sku, mpnequals, both sides trimmed and case-folded, like search identifiers
nameword by word, as for categories
statusenabled / disabled
quantity{ "min": 1, "max": 10 }, integers, both ends inclusive; a product without a quantity never matches
price{ "min": "10", "max": "50" }, the base price in the store currency, both ends inclusive; price rules are not applied
storefrontId, categoryIdoffered on that storefront; in that category itself (not its subcategories)
manufacturerIdof that manufacturer; null for products without one
createdAt, updatedAt{ "from": …, "to": … } in UTC, both ends inclusive

sort: code, sku, mpn, name, status, quantity, price, rating, manufacturer (by the manufacturer's name, not its id), createdAt, updatedAt. A missing value (a product without reviews has no rating, one without a manufacturer no manufacturer) comes first in asc and last in desc. Proved by EV-QUERY-05 to EV-QUERY-08 on the reference module only.

What a module supports is declared. In store.describe, a query capability lists the sorts and filter types the module supports: { "name": "product.query", "version": 1, "sorts": ["name", "price", "rating"], "filters": ["name", "status", "price"] }. A value the contract names but the module did not declare answers capability_unavailable; a value the contract does not name answers invalid_params.

order.query ​

Filters customerName (word by word in the buyer's full name as the order stores it, first and last name joined by a space), customerEmail (contains), customerTelephone (contains, digits only), orderStatusId, total ({ min, max }, the stored value, not × currencyRate), createdAt and updatedAt ({ from, to }). Sorts id, number, customerName, orderStatus (by the status's name, not its id), total, createdAt, updatedAt. The answer is items in the shape of order.get, itemCount, page, pageCount. Without an orderStatusId filter, abandoned orders (OpenCart's missing orders, status 0) are left out; orderStatusId "0" — the string, not null — returns them, and they carry status.kind abandoned and status.name null. Only order.query hides them, being a screen for people; order.get, order.search and order.list return them like any other order, since a request by identifier and a complete walk never hide anything. Proved by EV-QUERY-13 on the reference module only.

manufacturer.query ​

filters with one type, name (word by word; several name filters combine with OR), sort name (left out: by id), order, page, limit. The answer is items ({ id, name, extensions? }, as manufacturer.get returns them), itemCount, page, pageCount. A manufacturer carries no dates: most platforms keep none, so manufacturer.get, list and query have no updatedAt, and manufacturer.list takes no updatedSince. Proved by EV-QUERY-09 on the reference module only.

coupon.query ​

Proposed on 23 October 2026, not accepted. A coupon is { id, code, name, status, discount, usage, startsAt, endsAt, createdAt, updatedAt, extensions? }. discount is { kind, value, minimumTotal, freeShipping }: kind percent, fixed_order (an amount off the order), fixed_item (an amount off each eligible item) or other; value with four places, a percentage for percent, otherwise an amount in the store currency; minimumTotal the order total the coupon needs, or null. usage is { limitTotal, limitPerCustomer, used }, null for no limit. Restrictions to products, categories or customers stay platform data in extensions. Filters name (word by word), code (whole, trimmed and case-folded), status, kind, freeShipping, activeAt (the coupon applies at that moment: startsAt is null or not after it and endsAt is null or after it; status is a separate filter), and startsAt, endsAt and createdAt ({ from, to }, as in every other query; a coupon without that date never matches, so coupons expiring this week are endsAt from now to a week ahead). Sorts name, code, status, startsAt, endsAt, createdAt, used. The answer is items in the shape of coupon.get, itemCount, page, pageCount. OpenCart keeps no coupon modification time: its module answers updatedAt null and declares no updatedAt filter or sort.

Customers and their addresses (proposed) ​

Proposed on 17 October 2026, pending the founder's and Yevhen Kariakin's agreement; not implemented. A customer carries id, email, telephone, firstName, lastName, status, createdAt, updatedAt (both may be null), addressIds and defaultAddressId. Telephone identifies a customer like email, so it is always there and customer.search finds by it, comparing digits only.

The addresses themselves are personal data beyond identification and come only from customerAddress.get, with the store team's permission in Store Deputy: the module always declares customerAddress.read and has no address setting of its own, and the API offers customerAddress.get only while an owner or admin has turned on the agent's "Customer addresses" permission on the store page, and only to the team's owners and admins. There is no customerAddress.search or customerAddress.list. An order's payment and shipping addresses follow the same rule: the order carries neither, and orderPaymentAddress.get and orderShippingAddress.get return them by the order's id, opened by the same permission. A customer also carries customerGroupId; the groups themselves are customerGroup (search, get, list, query), each { id, name }, with query taking a name filter and a name sort like manufacturer.query (EV-QUERY-10). Resource names are camelCase, as fields are.

customer.query takes the filters name (word by word in the full name, firstName and lastName joined by a space), email (contains), telephone (contains, digits only), customerGroupId, status, createdAt and updatedAt ({ from, to }), and the sorts name (the full name), email, telephone, customerGroup (by the group's name, not its id), status, createdAt, updatedAt. OpenCart keeps no customer modification time, so its module declares neither the updatedAt filter nor the updatedAt sort (EV-QUERY-11). An address is { id, customerId, firstName, lastName, company, address1, address2, city, postcode, country, countryCode, zone, zoneCode }. Everything a module answers reaches the language model behind the agent, which is why addresses sit behind that permission; passwords, payment data, tokens and IP addresses never cross the interface.

Rules of apply, the same for every resource ​

  • set may name only fields in the resource's writable list (below); expected must contain every field that set contains, with the value the API read before the plan was approved.
  • Items are independent and the batch is not atomic. Each item ends in exactly one outcome:
OutcomeFieldsMeaning
appliedbefore, after, event (fired, skipped, failed)written and read back as set
conflictcurrentthe field was not expected; nothing written
not_foundthe resource (or that variant of it) does not exist
rejectedreasoninvalid item, expected equal to set, a product with variantPricing: variants and no variant id
failedreason, after where knownnothing confirmed; the API reconciles by reading the resource again
  • Where the platform allows it the driver makes one conditional statement per item (OpenCart: UPDATE … WHERE id = :id AND price = :expected). Where it does not (Shopify Admin API, WooCommerce REST), the driver reads, compares and writes, and declares the capability with conditional: emulated.
  • After an applied item the driver triggers the platform's own "saved" notification where the platform allows it from where the module runs, so listening extensions hear the change as if the owner pressed Save; it clears the platform cache after the batch. Where it cannot (OpenCart 3: the module's endpoint lives in the storefront and cannot reach the admin product-save listeners), the item answers event: skipped and the manifest warns product_edit_listener for each listening extension; Store Deputy tells the owner on the receipt which extensions were not notified. event is informational: applied is proven by the read-back, not by the event.
  • The driver keeps no journal, takes no idempotency key, approval reference or chat context. Idempotency, the ledger and reconciliation after an unclear answer are the API's (writes and recovery).

First resources and writable fields ​

Resourcesearch byWritable fields in apply
productid, code, sku, gtin, mpnprice, status, stock.quantity, storefrontIds, texts (accepted)
variantid, code, sku, gtin, mpnprice, status, stock.quantity
optionValueid, label (exact), parentId (every value of a product)stock.quantity, tracked (accepted)
categoryid, nameparentId, status
manufacturerid, name(read only at first)
orderid, number, customerEmailstatus
orderStatusid, name(read only; Order.status.id names one)
orderPaymentAddress, orderShippingAddress— (get only, by the order's id)(read only; only with the owner's permission)
customerid, email, telephone (digits only)(read only at first)
customerGroupid, name(read only)
customerAddress— (get only, by the ids a customer carries)(read only; only with the owner's permission)
couponid, codestatus
review— (get, list, query; no search)status (proposed)
returnRequest— (get, list, query)(read only; proposed)
returnStatus, returnReasonid, name(read only; ReturnRequest.status.id and reason.id name one; proposed)

Further resources from the scenario matrix are added by the same rule and never with a new verb. Creation and deletion are not apply. Creation, with its own idempotency rule, is accepted for four resources; deletion gains no authority from the matrix and is not offered.

Option values: stock kept per value of a product's option ​

Accepted 11 November 2026 by Yevhen Kariakin (Jira STOR-138). Implemented by the OpenCart 3 and 4 modules since version 1.6.0 (STOR-139, Artem Belikov, 21 November 2026), proven on the local test shops and the conformance suite only, not on a real store. The modules keep the product's own stock as OpenCart holds it and do not apply the sum rule below: it was questioned on 12 November 2026 and is open (STOR-139). In OpenCart 3, and in OpenCart 4 on a product without variants, stock is often kept on the value of a product's option ("T-shirt, red, L: 3 pcs"). That value is not a variant (no SKU, price or status of its own), so it is a resource of its own beside variant, not a field of the product.

  • Read. include: ["options"] on product.get, product.list and product.query adds a flat Product.optionValues: [{ id, parentId, label, stock: { quantity, tracked }, priceDelta? }]. The id is opaque; the label is built by the module in the shop's default language; tracked is OpenCart's subtract flag. The platform's option-and-value taxonomy does not leak. optionValue.get reads by id, optionValue.search finds by id, exact label or parentId. Capability optionValue.read; without it capability_unavailable.
  • Write. optionValue.apply takes items[{ id, expected, set }] over stock.quantity (optionValue.write.stock) and tracked (optionValue.write.tracked), compare-and-set with the result of variant.apply. Writing priceDelta is a later proposal; optionValue.write.price is not declared.
  • Product stock. When a product's stock lives on option values (variantPricing: options and tracked option values), Product.stock.quantity is the sum of their tracked quantities, computed by the module; product.apply on its stock is rejected with field_not_writable. The agent uses option_stock_change_propose for such a product.

Variants: read as variants, written per variant ​

Proposed 22 November 2026 by Artem Belikov (Jira STOR-118), answering the questions of 11 November. Implemented by the OpenCart 4 module since version 1.7.0, on the admin and the storefront endpoint, proven on the local test shops, the conformance suite and the module's storefront test only, not on a real store. Yevhen Kariakin has not confirmed it yet.

  • One record, one resource. A variant is read only as a variant: variant.get, variant.search, include: ["variants"] and a variant match of product.search. product.list and product.query never return it as a product and do not count it in itemCount; product.get answers its id in missing, product.apply with not_found. Where the platform keeps a variant as a product of its own (OpenCart 4, Magento), the module leaves those rows out.
  • The parent's price. product.apply on price of a product with variantPricing: variants is rejected / variant_required only when the product has no price of its own (Product.price is null: WooCommerce, Shopify). Where the parent has one and is bought itself (OpenCart 4: the master), the price is written as for any product; the variants' prices are not touched.
  • Inherited fields. Where saving the parent in the admin copies its fields into the variants except those a variant keeps as its own (OpenCart 4: the variant's per-field switch, the override column), variant.apply marks every field it writes as the variant's own, as the switch does, so the next save of the parent does not overwrite the change. From then on a change to that field of the parent no longer reaches the variant. A field the platform never copies (OpenCart 4: the quantity) is not marked.
  • Change time. A write to a variant moves its updatedAt and its product's: Product.updatedAt is never earlier than any of its variants', so product.list with updatedSince finds the product.
  • Storefront. The storefront endpoint follows the same rule for the shopper: storefront.product.* never returns a variant as a product; storefront.variant.get, storefront.variant.search and include: ["variants"] read it as this shopper sees it, only while the storefront shows the variant and its parent. A cart or order line of a variant names the parent in productId and the variant in variantId. storefront.cart.add with variantId puts the variant itself into the cart, at its own price, with the values of the parent's options that make it the variant fixed (another value for such an option is option_invalid); OpenCart 4's own cart page does so from 4.1.0.4 and put the master into the cart before.

What customers write: order notes, reviews and return requests (proposed) ​

Proposed 18 November 2026 by Yevhen Kariakin. Not accepted. No module and no API implements it: every operation is to_implement and not called by the API, and no module answers any of them yet. The OpenCart columns named below are the proposer's reading of OpenCart 3 and 4 and have not been checked against the modules or a running shop. It lets the Store Assistant read what customers write to a shop and moderate product reviews. The contract is contracts/module/operations.json (customer_messages, rules.customerMessages).

  • The customer's order note. Order.customerComment (string | null, optional, read only) is the note the buyer typed at checkout (OpenCart: order.comment). It is not history[].comment, which holds the team's and the system's notes.
  • Reviews. The resource review has id, productId, authorName (as the author gave it), customerId (null for a guest), rating (1 to 5), text, status and createdAt, updatedAt (OpenCart: review). review.get (by ids), review.list (paged, updatedSince) and review.query (filters productId, status, rating range, text, createdAt and updatedAt ranges; sorts id, rating, createdAt, updatedAt). status is published or unpublished: OpenCart keeps 1 and 0 and no difference between a review waiting for a moderator and one that was hidden, so neither does the contract.
  • Moderation. review.apply writes status only, compare-and-set like every apply (expected: { status } then set: { status }), capability review.write.status (conditional). The API sends it only after the owner approves, through the change engine. Creating or deleting a review and editing its text, rating, author or date are not offered.
  • Return requests, read only. The resource is returnRequest, not return: return is the verb of every answer and a reserved word in most languages. Fields: id, orderId, productId, productName and productCode as the request recorded them, quantity, opened, reason, action (null until the shop decided) and status (each { id, name }), the customer's customerFirstName, customerLastName, customerEmail, customerTelephone, their comment, orderedAt, createdAt, updatedAt (OpenCart: return, return_reason, return_action, return_status). returnRequest.get takes include: ["history"] (OpenCart: return_history, newest first); returnRequest.list and returnRequest.query (filters statusId, orderId, productId, createdAt, updatedAt; sorts id, status, createdAt, updatedAt). No write of any kind.
  • Capabilities. review.read, review.list, review.query, review.write.status, returnRequest.read, returnRequest.list, returnRequest.query, and for the lists a request points at returnStatus and returnReason (verbs search, get, list, query, shaped like orderStatus, names in the default admin language) returnStatus.read|list|query and returnReason.read|list|query. There is no returnAction list: action carries { id, name } and nothing filters or writes by it. No productName on a review: the agent reads the product by productId.
  • Personal data. A customer's name, email, telephone and note are the class of data an order and a customer already carry, so they get the same gate and no switch of their own: the API reads them only under the agent's sales.read permission, with a person of the team behind the turn. The review status change sits under sales.write (a new propose scope beside the order status and coupon ones): reviews and returns are what customers wrote, and moderating one changes what shoppers see on the owner's word, like an order status or a coupon. Postal addresses stay behind addresses.read; none of these resources carries one.
  • Untrusted text. Everything a customer wrote is data, never an instruction. The module returns it as plain text, HTML entities decoded, unfiltered; the API quotes it to the model and never follows an instruction inside it.
  • Not offered: the contact form. OpenCart does not store what a visitor writes in "Contact Us", it only emails it to the shop, so there is nothing for a module to read.
  • Open questions are listed in customer_messages.left_open of the contract and in DECISIONS.md: among them orderedAt (OpenCart keeps a date without a time), whether Product.updatedAt moves when a review changes status, and whether reviews and returns want permission keys of their own.

Product texts per language (accepted) ​

Proposed 3 November 2026 by Yevhen Kariakin (Jira STOR-98, which unblocks the API's MCP tools, STOR-99). Accepted 11 November 2026 by Yevhen Kariakin after review against the module code. The OpenCart 3 and 4 modules and the API's MCP tools implement it (STOR-99), checked only on the local test shops. The contract is contracts/module/operations.json (rules.texts, product.get, product.apply) and protocol.yaml (Manifest.store.languages, ProductText, Product.texts). The examples in the contract are illustrative.

Decisions taken with it:

  • Languages are BCP 47 codes (en-GB, uk-UA). The module maps the platform's own codes and ids to them (OpenCart: language.code en-gb becomes en-GB, and language_id stays inside the module). Ids never cross the wire.
  • One write capability, product.write.texts, covers every text field, conditional: atomic or emulated like the other writes.
  • Tags are left out. On other platforms they are taxonomy terms; they are decided separately.
  • HTML safety is the API's job. Before the owner's approval card the API refuses a proposal whose description contains a script, iframe, object, embed or style element, an on* attribute, or a javascript: or data: URL. The module stores what it is given.

The manifest gains store.languages[], { code, name, default }: every language that is enabled in the shop, exactly one default (the language the admin works in, the one Product.name is read in). A disabled language is not listed, so the agent never fills texts buyers cannot see; a write to it is rejected / unknown_language. The field is optional in the schema so that a module written before this proposal stays valid and still passes the conformance suite; a module that declares product.write.texts must carry it, and without it include: ["texts"] is capability_unavailable.

Reading. product.get with include: ["texts"] adds texts to each product: an object with one key per manifest language, each a ProductText (name, description as HTML, metaTitle, metaDescription, metaKeywords; every field a string or null for a field the platform does not keep) or null when the product has no row for that language. It is covered by product.read; there is no separate read capability. list and query never carry texts (descriptions are large). Entities are decoded as the storefront would render the source (OpenCart stores them with htmlspecialchars; the module decodes on read and encodes on write).

Texts of customer groups and names of order statuses (proposed 9 November 2026 by Artem Belikov, STOR-98, with the product texts; accepted 11 November 2026 by Yevhen Kariakin; categories have all their texts per language under decision 008, Category.texts). customerGroup.get and orderStatus.get take include: ["texts"] and add texts: one key per manifest language, for a customer group { name, description } ($defs.CustomerGroupTexts, the description as plain text), for an order status { name } ($defs.NameTexts), or null where the row has none in that language. Read only: these texts are not written. The entity's own name, like Product.name, is in the manifest's default language, the language of the shop's admin panel; a name filter or search matches that language only, as the admin panel's own lists do (OpenCart's product list filters by the admin language's name), so an agent searches by name in that language. Implemented in the OpenCart 3 and 4 modules (STOR-98), checked only on the local test shops.

Writing. texts is a writable field of product: an object keyed by language code, each value a partial ProductText (at least one field). Compare and set run per language and per field. In expected, null for a language means "no row yet". If any compared value differs, the item is a conflict whose current holds the compared languages and fields, and nothing is written for the item (the price in the same item too). Creating a missing row needs name in set, otherwise rejected / invalid_item. A code that is not in the manifest is rejected / unknown_language (a new reason). A value longer than the platform stores (OpenCart 3: 255 characters for name and the meta fields, 65 535 bytes for the description; taken from the platform's schema, not measured here) is rejected / invalid_item, never truncated. before and after carry exactly the written languages and fields.

Descriptions are large and a request may not exceed maxBodyBytes (262 144), so the API splits a batch of text changes by bytes, not only by maxItemsPerWrite.

jsonc
// product.get { "ids": ["42"], "include": ["texts"] } -> items[0].texts
{ "en-GB": { "name": "Example kettle", "description": "<p>A 1.7 litre kettle.</p>",
             "metaTitle": "Example kettle | Example Store", "metaDescription": "", "metaKeywords": "" },
  "uk-UA": null }

// manifest: store.languages
[ { "code": "en-GB", "name": "English", "default": true },
  { "code": "uk-UA", "name": "Українська", "default": false } ]

// product.apply item: change one field, create the missing Ukrainian row
{ "id": "42", "expected": { "texts": { "en-GB": { "name": "Example kettle" }, "uk-UA": null } },
  "set":      { "texts": { "en-GB": { "name": "Example kettle 1.7 l" },
                           "uk-UA": { "name": "Чайник Example" } } } }

Creating records and editing more fields ​

Accepted at a call on 9 November 2026 (Jira STOR-119, decision 008; as Yevhen Kariakin reports it, with the founder and Artem Belikov). Not implemented: no module and no API sends or answers it yet; every operation is to_implement. The contract text is in the main blocks of contracts/module/operations.json (verb create, the capabilities, rules.create, rules.history) and protocol.yaml (store.taxClasses, the product details); the questions the call left open are listed in the decision.

  • <resource>.create (capability <resource>.create) for product, category, manufacturer and coupon: items[{ idempotencyKey, set }], no expected. The same key and the same content return the same record (replayed: true); the same key with other content is rejected / idempotency_key_reused. The module keeps the key, a hash of the content and the record's id (proposed retention: 30 days, the module owner's answer of 13 November 2026, to be confirmed). A created item answers id and after, the whole record in the neutral model, which the API reads back again as a receipt.
  • Created disabled. A product, category and coupon are created with status off and there is no status in a create set; enabling is the existing *.write.status, with its own approval.
  • Errors are rejected with reason, field and conflictingId: invalid_item, unknown_reference (an id or unit the shop lacks), duplicate (SEO keyword, coupon code), idempotency_key_reused, field_not_writable, unknown_language. Not allowed while paused.
  • New fields for apply, each its own <resource>.write.<field>: product code, sku, mpn, gtin, manufacturerId, categoryIds, weight, dimensions, taxClassId, minQuantity, availableAt, seoKeywords, specials, discounts; category texts, seoKeywords, sortOrder; manufacturer name, seoKeywords, sortOrder; coupon code, name, discount, usage, startsAt, endsAt, productIds, categoryIds, loggedInOnly; customer status, customerGroupId, firstName, lastName, telephone, email; order history.
  • order.write.history is an append guarded by expected.history.lastEntryId (the newest entry's id), so it stays a compare-and-set: a retry reads the history and needs no key. A tracking number goes in the comment; no tracking field is assumed.
  • Not offered: customer.create, customerGroup.create, order.create, deletion, product attributes and options (own proposal), images (STOR-127; proposed 11 November 2026 in decision 009, not accepted, not implemented: the module downloads the file from a one-time link on the Store Deputy API and never deletes an image file).

Pictures of products and categories (promoted for implementation) ​

Proposed 11 November 2026 in decision 009 (Jira STOR-127, STOR-128); the contract text was promoted into the main blocks of operations.json on 20 November 2026 by Yevhen Kariakin, as to_implement, so that the modules could be built. The founder and Artem Belikov have not accepted the decision. Pictures are fields of apply, not a new verb, and they keep { id, expected, set }:

  • Reads. product.get and category.get take include: ["images"] (covered by product.read and category.read; not on list or query) and add Product.image, Product.images (display order) and Category.image, each { path, url } ($defs.Image). The path is the stable value, relative to the shop's image folder; the url is only for display.
  • Writes. image and images of a product (capabilities product.write.image and product.write.images) and image of a category (category.write.image). expected holds { path } or null (a list of paths); set holds a source: { path } (a picture already in the shop; a gallery path the product already holds) or { upload: { url, sha256, size, mediaType } } (a new picture), null to remove, and for images the whole new list in order.
  • The module pulls. The signed request carries a one-time link on the Store Deputy API, never the bytes. The module downloads only from the origin it was built with (api_url), over HTTPS (HTTP in a development build), follows no redirect, stops reading at size, checks the SHA-256 and the content by its first bytes and header (jpeg, png, gif; webp only where the shop makes thumbnails of it), refuses more than 10000 pixels a side or 25 megapixels, and saves the file in its own folder image/catalog/storedeputy/ under a name it makes from the SHA-256. Nothing from the request becomes a file name.
  • Never deletes. Removing, replacing and a conflict only change assignments; no file is deleted.
  • Answers. rejected: image_checksum_mismatch, image_type_invalid, image_too_large, unknown_reference, invalid_item; failed and retryable with a fresh link: image_download_failed. A link that is not on the module's own API is invalid_params. The optional limits imageMediaTypes and maxImageBytes of store.describe say what an upload may be.
  • Proved by the conformance scenarios image.* (the reference module and the local OpenCart 3 and 4 test shops) and by the API's end-to-end test on the OpenCart 3 test shop. Not on a real store.

Capabilities ​

Declared in store.describe, per resource and per writable field:

CapabilityCovers
<resource>.readsearch and get
<resource>.listlist
<resource>.queryquery, with the sorts and filters it supports
<resource>.write.<field>apply on that field; carries conditional: atomic or emulated

Each capability has a version. A tool is offered to the agent only when every capability it needs is declared by the driver and the employee's grant allows it; a call to a tool that is not offered is refused by the server.

What the manifest declares ​

store.describe (Module Protocol 1) returns the manifest. Two parts of it belong to this page and are defined in protocol.yaml as CapabilityDeclaration and Limits:

Manifest fieldShapeRule
capabilities[]{ name, version, conditional?, sorts?, filters? }name is one of the names above; conditional is present exactly on writes and says atomic or emulated by the rule below. A module declares only what it has built and tested; the OpenCart 3 module does not declare variant.* at all. A <resource>.query capability also carries sorts and filters, the values it supports
limitsmaxIdsPerRead, maxItemsPerWrite, timeBudgetMs, maxBodyBytes, maxPageSizeAll five are required. maxBodyBytes repeats the transport limit (262 144); maxPageSize is the largest limit a list accepts (at most 500); a read that cannot finish within timeBudgetMs answers limit_exceeded, never a truncated result
store.languages[] (accepted){ code, name, default }Optional; every enabled language, one default; required of a module that declares product.write.texts (texts)

Illustrative declarations are in the contract as capability_examples: a full OpenCart module, a module on nontransactional tables (conditional: emulated), a Shopify driver.

Rules every module follows ​

Taken from the Module JSON 1.0 proposal on 9 October 2026 by Yevhen's decision, recorded as rules in contracts/module/operations.json and validated by contracts:check. They change no operation shape; they fix how a module behaves around it, the same on every platform.

RuleWhat the module does
Strict envelopeReads at most maxBodyBytes (262 144 in the first version) and answers limit_exceeded, signed, without parsing the rest. A duplicated JSON key, a field in the envelope other than protocol, id, op and params, or a field in params the operation's schema does not name is refused with invalid_params before dispatch; nothing is dropped silently
Limits in the manifeststore.describe declares maxBodyBytes and maxPageSize next to Protocol 1's maxIdsPerRead, maxItemsPerWrite and timeBudgetMs. timeBudgetMs is what the proposal called maxExecutionMs: a read that cannot finish within it answers limit_exceeded, never a truncated result presented as complete
How conditional is decidedatomic only when every table the write touches uses a transactional engine (InnoDB) and the write is one statement or one transaction; otherwise emulated, and the API verifies by reading back. Checked at install and at every store.describe. A module never converts the merchant's tables. OpenCart 3 installations commonly keep MyISAM tables, so an OpenCart module may well declare emulated
Identifier matchingcode, sku and mpn compare equal after both sides are trimmed and case-folded, gtin after Protocol 1's normalization, id exactly. The comparison is implemented explicitly in the adapter and never inherited from the column's collation, so two platforms answer the same. %, _ and * are literal. Free-text search in a name is not a driver operation: it runs in the API, which scans product.list live (decision 007)
EvidenceFourteen conformance cases EV-* that every module proves, from an oversized body and a duplicated key to a tampered cursor, one product on two storefronts, a nontransactional table and Pause. They join the STOR-27 conformance suite

The complete list is in the contract: JSON Schema, under x-rules.

Agent tools ​

The agent never sees a resource, a field or an expected value. It sees three families of tools, names with letters, digits and underscores only.

FamilyExamplesWhat the API does
Readscatalog_find_products, catalog_get_products, catalog_query_products; later orders_find, orders_getsearch, get, list, plus filtering, sorting and counting in the API
Proposals, one per intentprice_change_propose; since 2 November 2026 product_stock_change_propose, product_status_change_propose, product_storefronts_change_propose, product_texts_change_propose (3 November 2026, STOR-99), variant_price_change_propose, variant_stock_change_propose, variant_status_change_propose, category_status_change_propose, category_parent_change_propose, order_status_change_propose, coupon_status_change_proposeexpands the selection, reads expected from the shop, builds a plan, waits for the owner
Statuschange_status (since 2 November 2026; price_change_status remains for prices)reads the plan and its receipt from the ledger; the shop is not contacted

Reads are expressive and bounded ​

An Agentfy turn allows at most eight model round-trips, and nothing between the Store Deputy MCP and the model limits the size of a tool result (the numbers are in decision 004). Two rules follow:

  • catalog_query_products takes structured filters (status, category, price range, stock range, text in the name, changed since, sort, limit) and does the work in one call. The API answers it live, with no copy of the catalog (decision 007, proposed): it scans product.list page by page, filters in the API, reads at most 25 pages per question and says partial: true beyond that. Every answer says when the store was read (read_at), how many products matched (total) and how many the scan examined (scanned). A category filter includes the products of its subcategories unless include_subcategories is false (the API finds them with category.query, at most ten levels and 500 categories) and the answer says subcategories_included; a word search without a category also lists the categories whose name matches (matching_categories). catalog_find_by_kind does both for "a kind of product" in one call. The shopper side sends the new categorySubtreeId filter of storefront.product.query only to a storefront whose module declared it (decision 012); checked only against fakes.
  • Every read tool returns compact rows with only the fields needed for a decision (id, name, code, price, stock, status), at most 50 by default, with total and whether more exist. The full product shape comes only from catalog_get_products by explicit ids, at most 50.

Proposals take a selection and a rule ​

A proposal tool accepts either explicit items with new values, or a selection (the same filter catalog_query_products takes) with an adjustment: a percentage, a fixed amount, a rounding rule. The API expands the selection into items, reads each item's current value as expected, computes the new values and stores the plan. The agent can propose a change for two thousand products having seen fifty rows and a count; the owner sees every item in the approval card. Arithmetic never happens in the model.

One change engine ​

The STOR-5 price-change slice (PriceChange, PriceChangeVersion, PriceChangeJob, the actionHash) is generalized into Change, ChangeVersion, ChangeJob with items { resource, id, expected, set } plus display fields. The lifecycle is unchanged. Done on 12 October 2026 (iteration 6, step B4, api/src/slices/operations/change/): items name resource, id and field, a change has an intent that fixes them, and price_change (product.price) is the only intent so far; tested with fake modules only.

propose ──▶ version ──▶ owner approves on the site ──▶ job (24 h) ──▶ <resource>.apply in batches
                                                                       ──▶ <resource>.get read-back ──▶ reconcile ──▶ receipt

Every proposal tool is a facade over this service: it validates its arguments and fixes which field it changes; everything else is shared. The approved job is executed by the API's background worker, not by the agent: there is no apply tool, and the agent sees the outcome through the status tool (decision of 11 October 2026, DECISIONS.md). A timeout or an unsigned answer is "unknown", never "failed"; the API re-reads the items and classifies each as applied, not applied or conflict, exactly as in reconciliation. A conflict needs a new approval.

From a scenario to operations ​

A scenario maps to a tool or part of one; the tool to a workflow service in the API; the service to primitive calls. Scenario ids attach to tools and services, never to driver operations.

ScenarioToolDriver primitives
PRODUCTS-01 find by SKUcatalog_find_productsproduct.search, product.get
PRODUCTS-02 disabled, low-stock, cheap productscatalog_query_products, filter in the APIproduct.list
PRODUCTS-04 audit missing fieldsa computation in the APIproduct.list
PRODUCTS-07 disable productsproduct_status_change_proposeproduct.get, then product.apply { status }
CATEGORIES-03 move a categorycategory_parent_change_proposecategory.get, category.apply { parentId }
PRICES-01 change a priceprice_change_proposeproduct.get, product.apply { price }

How it is proved ​

  • Contract. bun run contracts:check enforces it: every operation is <resource>.<verb>; every set has an expected on the same field; writable fields are in the resource's list; capability names are <resource>.read, <resource>.list or <resource>.write.<field>; the manifest's capabilities and limits in protocol.yaml are the shapes this page needs; the operations this shape replaced stay removed; fixtures for every resource validate. Done.
  • Module. The OpenCart 3 module proves product.apply for price and for status on both test shops with the event witness. The second field is the evidence that the generalization works and is not a rename.
  • API. The change slice is tested with the fake module for two intents.
  • Neutrality. A contract fixture with variantPricing: variants and conditional: emulated checks that the shape fits Shopify and WooCommerce. This is a schema check, not an integration.

None of this exists today. The OpenCart 3 module answers catalog.search, catalog.get and price.apply in the old OpenCart-shaped fields, has no catalog.list, and the API does not send price.apply.