@wowok/agent-mcp 3.1.6 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/exposure.d.ts +10 -10
- package/dist/config/judgment.d.ts +25 -25
- package/dist/config/rule-engine.d.ts +25 -25
- package/dist/customer/user-preferences.d.ts +2 -2
- package/dist/evaluation/arbitration-game.js +1 -1
- package/dist/evaluation/capability.d.ts +1 -1
- package/dist/evaluation/extract.js +1 -1
- package/dist/evaluation/match-operation.js +1 -1
- package/dist/extensions/industry-pack.d.ts +3 -2
- package/dist/extensions/industry-pack.js +1 -1
- package/dist/extensions/modes.js +1 -1
- package/dist/extensions/registry.js +1 -1
- package/dist/extensions/types.d.ts +1 -0
- package/dist/graph/onchain/analyze.js +1 -1
- package/dist/graph/onchain/analyze.spec.js +1 -1
- package/dist/graph/onchain/edge-schema.js +1 -1
- package/dist/graph/onchain/extract.js +1 -1
- package/dist/graph/onchain/field-manifest.js +1 -1
- package/dist/graph/onchain/project-relationship.js +1 -1
- package/dist/graph/onchain/types.d.ts +1 -1
- package/dist/harness/recover.js +1 -1
- package/dist/keeper/KeeperScan.d.ts +2 -1
- package/dist/keeper/KeeperScan.js +1 -1
- package/dist/keeper/detectors.d.ts +9 -0
- package/dist/keeper/detectors.js +1 -1
- package/dist/keeper/keeper.spec.js +1 -1
- package/dist/keeper/types.d.ts +1 -1
- package/dist/keeper/types.js +1 -1
- package/dist/knowledge/allocation-ledger.d.ts +4 -1
- package/dist/knowledge/allocation-ledger.js +1 -1
- package/dist/knowledge/allocation-puzzle.d.ts +2 -0
- package/dist/knowledge/allocation-puzzle.js +1 -1
- package/dist/knowledge/allocation-risk.d.ts +1 -1
- package/dist/knowledge/allocation-risk.js +1 -1
- package/dist/knowledge/arb-risk.d.ts +3 -1
- package/dist/knowledge/arb-risk.js +1 -1
- package/dist/knowledge/arbitration-ledger.js +1 -1
- package/dist/knowledge/arbitration-risk.js +1 -1
- package/dist/knowledge/arbitration-templates.d.ts +1 -0
- package/dist/knowledge/arbitration-templates.js +1 -1
- package/dist/knowledge/audit-rules.d.ts +13 -2
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/rules/allocation.json +50 -1
- package/dist/knowledge/baselines/rules/arb.json +20 -1
- package/dist/knowledge/baselines/rules/arbitration.json +27 -0
- package/dist/knowledge/baselines/rules/guard.json +75 -2
- package/dist/knowledge/baselines/rules/machine.json +38 -13
- package/dist/knowledge/baselines/rules/order.json +2 -2
- package/dist/knowledge/builtin-templates.d.ts +3 -1
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/fund-layer.js +1 -1
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-anchor-reach.d.ts +19 -0
- package/dist/knowledge/guard-anchor-reach.js +1 -0
- package/dist/knowledge/guard-bindings.js +1 -1
- package/dist/knowledge/guard-design-patterns.d.ts +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-ledger.js +1 -1
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-render.d.ts +6 -0
- package/dist/knowledge/guard-render.js +1 -1
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-submission-prompt.d.ts +6 -0
- package/dist/knowledge/guard-submission-prompt.js +1 -1
- package/dist/knowledge/guard-templates.d.ts +1 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/index.d.ts +4 -4
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-generalizer.js +1 -1
- package/dist/knowledge/industry-registry.d.ts +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/machine-ledger.js +1 -1
- package/dist/knowledge/machine-risk.js +1 -1
- package/dist/knowledge/machine-templates.js +1 -1
- package/dist/knowledge/order-ledger.js +1 -1
- package/dist/knowledge/order-templates.js +1 -1
- package/dist/knowledge/permission-ledger.js +1 -1
- package/dist/knowledge/release-sentinel.d.ts +12 -0
- package/dist/knowledge/release-sentinel.js +1 -0
- package/dist/knowledge/repository-write-semantics.d.ts +27 -0
- package/dist/knowledge/repository-write-semantics.js +1 -0
- package/dist/knowledge/rule-node-analyzers.d.ts +6 -0
- package/dist/knowledge/rule-node-analyzers.js +1 -1
- package/dist/knowledge/safety-rules.d.ts +5 -1
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/scenario-modes.d.ts +10 -1
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/service-allocation-semantics.d.ts +36 -0
- package/dist/knowledge/service-allocation-semantics.js +1 -0
- package/dist/knowledge/strategy-manuals.d.ts +3 -5
- package/dist/knowledge/strategy-manuals.js +1 -1
- package/dist/knowledge/template-loader.d.ts +28 -12
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +26 -0
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/participation/allocation-advice.d.ts +38 -0
- package/dist/participation/allocation-advice.js +1 -0
- package/dist/participation/radar-core.d.ts +2 -0
- package/dist/persona/types.d.ts +3 -2
- package/dist/persona/types.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/intent-analyzer.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +70 -63
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/migration-planner.js +1 -1
- package/dist/playbooks/service-build/mode-actions.d.ts +5 -0
- package/dist/playbooks/service-build/mode-actions.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/semantic-graph.d.ts +1 -0
- package/dist/playbooks/service-build/semantic-graph.js +1 -1
- package/dist/playbooks/service-build/service-quote.d.ts +2 -0
- package/dist/playbooks/service-build/service-quote.js +1 -0
- package/dist/relationship/derivation.d.ts +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +30 -8
- package/dist/schema/benchmark-migration/index.js +1 -1
- package/dist/schema/call/allocation.d.ts +6 -3
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +4 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +1 -0
- package/dist/schema/call/error-codes.d.ts +1 -1
- package/dist/schema/call/error-codes.js +1 -1
- package/dist/schema/call/guard.d.ts +8 -8
- package/dist/schema/call/machine.d.ts +56 -0
- package/dist/schema/call/machine.js +1 -1
- package/dist/schema/call/order.js +1 -1
- package/dist/schema/call/payment.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +84 -22
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/common/tokentype-short-probe.spec.js +1 -0
- package/dist/schema/evaluation/index.d.ts +8 -80
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/goal/index.d.ts +9 -42
- package/dist/schema/goal/planning.d.ts +25 -60
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/intent-radar/index.d.ts +2 -20
- package/dist/schema/intent-radar/index.js +1 -1
- package/dist/schema/interaction/index.d.ts +1 -1
- package/dist/schema/keeper/index.d.ts +3 -0
- package/dist/schema/keeper/index.js +1 -1
- package/dist/schema/local/index.d.ts +8 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/local/wip.d.ts +73 -0
- package/dist/schema/local/wip.js +1 -1
- package/dist/schema/operations.d.ts +92 -14
- package/dist/schema/operations.js +1 -1
- package/dist/schema/persona/index.d.ts +279 -384
- package/dist/schema/persona/index.js +1 -1
- package/dist/schema/query/bi.d.ts +149 -10
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +38 -19
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-query/index.d.ts +4 -4
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/watch/index.d.ts +2 -2
- package/dist/schema-query-impl/index.d.ts +1 -0
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +3 -2
- package/dist/schemas/benchmark_migration_operation.output.json +116 -2
- package/dist/schemas/benchmark_migration_operation.schema.json +2 -10
- package/dist/schemas/bridge_operation.output.json +3 -2
- package/dist/schemas/evaluation_operation.schema.json +7 -70
- package/dist/schemas/goal_operation.schema.json +6 -39
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/intent_radar.output.json +4 -20
- package/dist/schemas/keeper_operation.output.json +2 -2
- package/dist/schemas/keeper_operation.schema.json +9 -4
- package/dist/schemas/local_history_operation.output.json +3 -2
- package/dist/schemas/local_info_operation.output.json +3 -2
- package/dist/schemas/local_mark_operation.output.json +3 -2
- package/dist/schemas/messenger_operation.output.json +2 -2
- package/dist/schemas/monitor_events.output.json +2 -2
- package/dist/schemas/monitor_subscription.output.json +2 -2
- package/dist/schemas/onchain_events.output.json +2 -2
- package/dist/schemas/onchain_operations.output.json +7 -6
- package/dist/schemas/onchain_operations.schema.json +227 -54
- package/dist/schemas/onchain_operations_allocation.schema.json +11 -10
- package/dist/schemas/onchain_operations_arbitration.schema.json +13 -13
- package/dist/schemas/onchain_operations_machine.schema.json +27 -5
- package/dist/schemas/onchain_operations_order.schema.json +1 -1
- package/dist/schemas/onchain_operations_payment.schema.json +2 -2
- package/dist/schemas/onchain_operations_reward.schema.json +1 -1
- package/dist/schemas/onchain_operations_service.schema.json +171 -21
- package/dist/schemas/onchain_operations_treasury.schema.json +1 -1
- package/dist/schemas/onchain_table_data.output.json +57 -4
- package/dist/schemas/persona_operation.output.json +11 -88
- package/dist/schemas/persona_operation.schema.json +4 -32
- package/dist/schemas/query_toolkit.output.json +320 -22
- package/dist/schemas/query_toolkit.schema.json +53 -0
- package/dist/schemas/wip_file.output.json +221 -0
- package/dist/schemas/wip_file.schema.json +125 -0
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/dispatch-expectations.spec.js +1 -1
- package/dist/tools/handlers/keeper.d.ts +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/schema-query.js +1 -1
- package/dist/tools/handlers/wip-upload.d.ts +22 -0
- package/dist/tools/handlers/wip-upload.js +1 -0
- package/dist/tools/handlers/wip.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/move-fn-index.gen.js +1 -1
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/files.js +1 -1
- package/dist/tools/wip-deploy-assist.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +2 -2
- package/dist/knowledge/alloc-audit-policy.spec.js +0 -1
- package/dist/knowledge/event-semantics.spec.d.ts +0 -1
- package/dist/knowledge/event-semantics.spec.js +0 -1
- package/dist/knowledge/facts-sync.spec.d.ts +0 -1
- package/dist/knowledge/facts-sync.spec.js +0 -1
- package/dist/knowledge/guard-design-patterns.spec.d.ts +0 -1
- package/dist/knowledge/guard-design-patterns.spec.js +0 -1
- package/dist/knowledge/guard-eval.spec.d.ts +0 -1
- package/dist/knowledge/guard-eval.spec.js +0 -1
- package/dist/knowledge/rule-node-analyzers.spec.d.ts +0 -1
- package/dist/knowledge/rule-node-analyzers.spec.js +0 -1
- package/dist/knowledge/safety-rules.extract-amount.spec.d.ts +0 -1
- package/dist/knowledge/safety-rules.extract-amount.spec.js +0 -1
- package/dist/knowledge/template-loader.spec.d.ts +0 -1
- package/dist/knowledge/template-loader.spec.js +0 -1
- package/dist/knowledge/template-scanner.spec.d.ts +0 -1
- package/dist/knowledge/template-scanner.spec.js +0 -1
- /package/dist/{knowledge/alloc-audit-policy.spec.d.ts → schema/common/tokentype-short-probe.spec.d.ts} +0 -0
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"type": "string",
|
|
111
111
|
"description": "Name of the product or service to purchase"
|
|
112
112
|
},
|
|
113
|
-
"
|
|
113
|
+
"quantity": {
|
|
114
114
|
"anyOf": [
|
|
115
115
|
{
|
|
116
116
|
"type": "number"
|
|
@@ -119,16 +119,17 @@
|
|
|
119
119
|
"type": "string"
|
|
120
120
|
}
|
|
121
121
|
],
|
|
122
|
-
"description": "
|
|
122
|
+
"description": "⚠️ PURCHASE QUANTITY, NOT inventory. This is the number of units you are buying; the on-chain order total = sale.price x this value. Do NOT put the product's available stock here — inventory is the separate `stock` field on the Service's sales list. To buy one unit, set quantity: 1. (Legacy callers may still send this as `stock`; it is accepted and treated identically as the purchase quantity.)"
|
|
123
123
|
},
|
|
124
124
|
"wip_hash": {
|
|
125
|
-
"
|
|
126
|
-
"description": "WIP file hash of the item.
|
|
125
|
+
"default": "",
|
|
126
|
+
"description": "WIP file hash of the item. OMIT this field (or pass empty string \"\") to AUTO-FILL it from the bound Service sale's wip_hash — the on-chain quote then verifies the WIP file matches that hash (E_WIP_HASH_NOT_MATCH on mismatch), so buyers do NOT need to copy any hash value. Only pass an explicit hash when pinning a value seen earlier: that protects against a legitimate merchant WIP update between viewing the product and placing the order.",
|
|
127
|
+
"type": "string"
|
|
127
128
|
}
|
|
128
129
|
},
|
|
129
130
|
"required": [
|
|
130
131
|
"name",
|
|
131
|
-
"
|
|
132
|
+
"quantity",
|
|
132
133
|
"wip_hash"
|
|
133
134
|
],
|
|
134
135
|
"additionalProperties": false
|
|
@@ -163,7 +164,7 @@
|
|
|
163
164
|
"properties": {
|
|
164
165
|
"coin": {
|
|
165
166
|
"type": "string",
|
|
166
|
-
"description": "Coin object ID or name(local mark).
|
|
167
|
+
"description": "Coin object ID or name(local mark). WHOLE-COIN TRANSFER: the ENTIRE Coin object is moved to the recipient — the 'amount' is NOT taken from it (testnet lesson: passing your main gas coin transfers its full balance, leaving you unable to pay for anything). Use only for coins whose whole balance is exactly what you intend to send; prefer {balance: <smallest-unit number>} for partial amounts."
|
|
167
168
|
}
|
|
168
169
|
},
|
|
169
170
|
"required": [
|
|
@@ -247,7 +248,7 @@
|
|
|
247
248
|
"additionalProperties": false
|
|
248
249
|
},
|
|
249
250
|
"namedNewOrder": {
|
|
250
|
-
"description": "RECOMMENDED: Set a local name for the newly created Order object. Without this, the Order is only referenceable by its on-chain address. Example: {name: 'my_order_v1'} allows subsequent operations to use 'my_order_v1' instead of the address.",
|
|
251
|
+
"description": "RECOMMENDED: Set a local name for the newly created Order object. Without this, the Order is only referenceable by its on-chain address. Example: {name: 'my_order_v1'} allows subsequent operations to use 'my_order_v1' instead of the address. PLACEMENT: this field MUST be inside data.order_new (it is an OrderNew field) — putting namedNewOrder at the data root fails schema validation with 'Unrecognized key'. MIGRATION TIP: for batch/migration order creation, always auto-generate readable names (e.g. '<source>_<service>_<seq>' like 'upwork_svc_v1_0001') — unnamed orders (head.name = null) are only address-referenceable, which breaks downstream queries, displays and audits (E-8).",
|
|
251
252
|
"type": "object",
|
|
252
253
|
"properties": {
|
|
253
254
|
"name": {
|
|
@@ -377,7 +378,7 @@
|
|
|
377
378
|
"type": "string"
|
|
378
379
|
}
|
|
379
380
|
],
|
|
380
|
-
"description": "Current REMAINING stock of the product or service. Each order DECREMENTS it by the ordered quantity (a buy aborts when the remaining stock is lower than the ordered quantity). Writing this field SETS the remaining stock to the given value — it is NOT added to it. To
|
|
381
|
+
"description": "Current REMAINING stock of the product or service. Each order DECREMENTS it by the ordered quantity (a buy aborts when the remaining stock is lower than the ordered quantity). Writing this field SETS the remaining stock to the given value — it is NOT added to it. To change one product without resending the whole list, use the per-item sales ops on onchain_operations service: stock_add / stock_reduce (deltas), price_add / price_reduce (deltas), sale_suspension (suspend/resume one product)."
|
|
381
382
|
},
|
|
382
383
|
"suspension": {
|
|
383
384
|
"type": "boolean",
|
|
@@ -448,7 +449,7 @@
|
|
|
448
449
|
"type": "string"
|
|
449
450
|
}
|
|
450
451
|
],
|
|
451
|
-
"description": "Current REMAINING stock of the product or service. Each order DECREMENTS it by the ordered quantity (a buy aborts when the remaining stock is lower than the ordered quantity). Writing this field SETS the remaining stock to the given value — it is NOT added to it. To
|
|
452
|
+
"description": "Current REMAINING stock of the product or service. Each order DECREMENTS it by the ordered quantity (a buy aborts when the remaining stock is lower than the ordered quantity). Writing this field SETS the remaining stock to the given value — it is NOT added to it. To change one product without resending the whole list, use the per-item sales ops on onchain_operations service: stock_add / stock_reduce (deltas), price_add / price_reduce (deltas), sale_suspension (suspend/resume one product)."
|
|
452
453
|
},
|
|
453
454
|
"suspension": {
|
|
454
455
|
"type": "boolean",
|
|
@@ -481,7 +482,7 @@
|
|
|
481
482
|
"sales"
|
|
482
483
|
],
|
|
483
484
|
"additionalProperties": false,
|
|
484
|
-
"description": "Replaces the ENTIRE sales list: every product NOT included is REMOVED from the Service (its stock and wip binding go with it
|
|
485
|
+
"description": "Replaces the ENTIRE sales list: every product NOT included is REMOVED from the Service (its stock and wip binding go with it). To change ONE product, prefer the per-item ops (price_add / price_reduce / stock_add / stock_reduce / sale_suspension) over re-sending the full list; with op:set you MUST resend ALL unchanged products too. Removal is immediate and cannot be undone."
|
|
485
486
|
},
|
|
486
487
|
{
|
|
487
488
|
"type": "object",
|
|
@@ -518,6 +519,154 @@
|
|
|
518
519
|
],
|
|
519
520
|
"additionalProperties": false,
|
|
520
521
|
"description": "Clear all sales products or services."
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"type": "object",
|
|
525
|
+
"properties": {
|
|
526
|
+
"op": {
|
|
527
|
+
"type": "string",
|
|
528
|
+
"const": "price_add"
|
|
529
|
+
},
|
|
530
|
+
"sale_name": {
|
|
531
|
+
"type": "string",
|
|
532
|
+
"description": "Name of the product to update"
|
|
533
|
+
},
|
|
534
|
+
"value": {
|
|
535
|
+
"anyOf": [
|
|
536
|
+
{
|
|
537
|
+
"type": "number"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"type": "string"
|
|
541
|
+
}
|
|
542
|
+
],
|
|
543
|
+
"description": "Price INCREASE delta in the Service token's smallest units (e.g. 100000000 = +0.1 WOW). Added to the current price (on-chain saturating add). NOT the new absolute price."
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
"required": [
|
|
547
|
+
"op",
|
|
548
|
+
"sale_name",
|
|
549
|
+
"value"
|
|
550
|
+
],
|
|
551
|
+
"additionalProperties": false,
|
|
552
|
+
"description": "Raise one product's price by a delta. Only the named product is touched; an unknown sale_name is silently ignored on-chain (verify with query_toolkit afterwards)."
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"type": "object",
|
|
556
|
+
"properties": {
|
|
557
|
+
"op": {
|
|
558
|
+
"type": "string",
|
|
559
|
+
"const": "price_reduce"
|
|
560
|
+
},
|
|
561
|
+
"sale_name": {
|
|
562
|
+
"type": "string",
|
|
563
|
+
"description": "Name of the product to update"
|
|
564
|
+
},
|
|
565
|
+
"value": {
|
|
566
|
+
"anyOf": [
|
|
567
|
+
{
|
|
568
|
+
"type": "number"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"type": "string"
|
|
572
|
+
}
|
|
573
|
+
],
|
|
574
|
+
"description": "Price DECREASE delta in the Service token's smallest units (e.g. 100000000 = -0.1 WOW). If the delta exceeds the current price, the price clamps to 0. NOT the new absolute price."
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
"required": [
|
|
578
|
+
"op",
|
|
579
|
+
"sale_name",
|
|
580
|
+
"value"
|
|
581
|
+
],
|
|
582
|
+
"additionalProperties": false,
|
|
583
|
+
"description": "Lower one product's price by a delta. Only the named product is touched; an unknown sale_name is silently ignored on-chain (verify with query_toolkit afterwards)."
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"type": "object",
|
|
587
|
+
"properties": {
|
|
588
|
+
"op": {
|
|
589
|
+
"type": "string",
|
|
590
|
+
"const": "stock_add"
|
|
591
|
+
},
|
|
592
|
+
"sale_name": {
|
|
593
|
+
"type": "string",
|
|
594
|
+
"description": "Name of the product to update"
|
|
595
|
+
},
|
|
596
|
+
"value": {
|
|
597
|
+
"anyOf": [
|
|
598
|
+
{
|
|
599
|
+
"type": "number"
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"type": "string"
|
|
603
|
+
}
|
|
604
|
+
],
|
|
605
|
+
"description": "Stock INCREASE delta (a unit COUNT, not money), e.g. 50 = +50 units."
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
"required": [
|
|
609
|
+
"op",
|
|
610
|
+
"sale_name",
|
|
611
|
+
"value"
|
|
612
|
+
],
|
|
613
|
+
"additionalProperties": false,
|
|
614
|
+
"description": "Restock one product by a delta. Only the named product is touched; an unknown sale_name is silently ignored on-chain (verify with query_toolkit afterwards)."
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"type": "object",
|
|
618
|
+
"properties": {
|
|
619
|
+
"op": {
|
|
620
|
+
"type": "string",
|
|
621
|
+
"const": "stock_reduce"
|
|
622
|
+
},
|
|
623
|
+
"sale_name": {
|
|
624
|
+
"type": "string",
|
|
625
|
+
"description": "Name of the product to update"
|
|
626
|
+
},
|
|
627
|
+
"value": {
|
|
628
|
+
"anyOf": [
|
|
629
|
+
{
|
|
630
|
+
"type": "number"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"type": "string"
|
|
634
|
+
}
|
|
635
|
+
],
|
|
636
|
+
"description": "Stock DECREASE delta (a unit COUNT, not money), e.g. 10 = -10 units. If the delta exceeds current stock, the stock clamps to 0 (product becomes unsellable)."
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"required": [
|
|
640
|
+
"op",
|
|
641
|
+
"sale_name",
|
|
642
|
+
"value"
|
|
643
|
+
],
|
|
644
|
+
"additionalProperties": false,
|
|
645
|
+
"description": "Reduce one product's stock by a delta (e.g. write-off damaged units). Only the named product is touched; an unknown sale_name is silently ignored on-chain."
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"type": "object",
|
|
649
|
+
"properties": {
|
|
650
|
+
"op": {
|
|
651
|
+
"type": "string",
|
|
652
|
+
"const": "sale_suspension"
|
|
653
|
+
},
|
|
654
|
+
"sale_name": {
|
|
655
|
+
"type": "string",
|
|
656
|
+
"description": "Name of the product to suspend or resume"
|
|
657
|
+
},
|
|
658
|
+
"suspension": {
|
|
659
|
+
"type": "boolean",
|
|
660
|
+
"description": "true = suspend the product (buy/quote abort with E_SALE_SUSPENDED); false = resume selling."
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
"required": [
|
|
664
|
+
"op",
|
|
665
|
+
"sale_name",
|
|
666
|
+
"suspension"
|
|
667
|
+
],
|
|
668
|
+
"additionalProperties": false,
|
|
669
|
+
"description": "Suspend or resume ONE product without removing it (keeps price/stock/WIP binding). The Amazon-style 'out of stock / listing inactive' state. Only the named product is touched; an unknown sale_name is silently ignored on-chain (verify with query_toolkit afterwards)."
|
|
521
670
|
}
|
|
522
671
|
]
|
|
523
672
|
},
|
|
@@ -967,7 +1116,7 @@
|
|
|
967
1116
|
"type": "string"
|
|
968
1117
|
}
|
|
969
1118
|
],
|
|
970
|
-
"description": "Allocation value. SEMANTICS DEPEND ON `mode`:\n• mode='Amount': absolute amount in smallest unit (e.g., '750000000' for 0.75 WOW, '250000000' for 0.25 WOW). Allocated first; sum of Amount items cached as `fix`.\n• mode='Rate': basis-points rate, 10000 = 100% (e.g., '7500' for 75%, '2500' for 25%). When no Surplus in same Allocator, sum MUST == 10000; when Surplus present, sum MUST <= 10000.\n• mode='Surplus': IGNORED (contract forces to 0). Set to '0' for clarity. Receives remaining balance after Amount + Rate allocations.\n⚠️ T1 LOSSY POINT (B-2): the value is PRE-CONFIGURED and STATIC. A continuous/conditional amount (e.g. 'pay exactly the assessed loss amount') CANNOT be expressed — there is no runtime formula field. Model variable payouts as (a) a fixed-tier Allocator list guarded by distinct Guards, or (b) an Amount with a `max` cap — both are finite configurations, not free-form formulas."
|
|
1119
|
+
"description": "Allocation value. SEMANTICS DEPEND ON `mode`:\n• mode='Amount': absolute amount in smallest unit (e.g., '750000000' for 0.75 WOW, '250000000' for 0.25 WOW). Allocated first; sum of Amount items cached as `fix`.\n• mode='Rate' (NET): basis-points rate off the post-fix base (balance - fix, or max - fix), 10000 = 100% (e.g., '7500' for 75%, '2500' for 25%). When no Surplus in same Allocator, sum MUST == 10000; when Surplus present, sum MUST <= 10000.\n• mode='RateGross': basis-points rate off the FULL pool (balance) or the `max` cap — the fixed Amount total is NOT subtracted, 10000 = 100%. sum MUST <= 10000 (and, with `max` set, fix×10000 + sum×max <= max×10000). Cannot be mixed with mode='Rate' in the same Allocator while a fixed Amount total is present.\n• mode='Surplus': IGNORED (contract forces to 0). Set to '0' for clarity. Receives remaining balance after Amount + Rate/RateGross allocations.\n⚠️ T1 LOSSY POINT (B-2): the value is PRE-CONFIGURED and STATIC. A continuous/conditional amount (e.g. 'pay exactly the assessed loss amount') CANNOT be expressed — there is no runtime formula field. Model variable payouts as (a) a fixed-tier Allocator list guarded by distinct Guards, or (b) an Amount with a `max` cap — both are finite configurations, not free-form formulas."
|
|
971
1120
|
},
|
|
972
1121
|
"mode": {
|
|
973
1122
|
"anyOf": [
|
|
@@ -976,12 +1125,13 @@
|
|
|
976
1125
|
"enum": [
|
|
977
1126
|
"Amount",
|
|
978
1127
|
"Rate",
|
|
979
|
-
"Surplus"
|
|
1128
|
+
"Surplus",
|
|
1129
|
+
"RateGross"
|
|
980
1130
|
]
|
|
981
1131
|
},
|
|
982
1132
|
{}
|
|
983
1133
|
],
|
|
984
|
-
"description": "Allocation mode — determines how the `sharing` field is interpreted.
|
|
1134
|
+
"description": "Allocation mode — determines how the `sharing` field is interpreted. Four modes can be used individually OR combined within a single Allocator; when combined, allocation order is strictly: Amount first, then Rate/RateGross, then Surplus. Understanding these modes allows modeling almost any fund distribution pattern.\n• Amount (0): `sharing` is a FIXED amount in smallest unit (e.g., '750000000' = 0.75 WOW). Allocated FIRST; sum of all Amount items is cached as `fix` by the contract. Validation: when no Rate and no Surplus items exist, sum of Amount items must be >= allocators.threshold (EAMOUNT_BELOW_THRESHOLD=12); when `max` is set, sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13).\n• Rate (1): `sharing` is a NET basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance - fix (or max - fix if `max` is set) — the cached fixed Amount total IS subtracted. Validation: when no Surplus items exist, sum of all Rate items must be EXACTLY 10000 (ERATE_NOT_10000=4); when Surplus items exist, sum of all Rate items must be <= 10000 (ERATE_EXCEEDS_10000=6).\n• RateGross (3): `sharing` is a GROSS basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance (the full pool) or the `max` cap when set — the fixed Amount total is NOT subtracted, so fixed Amount entries and percentage-of-total rates coexist exactly. Validation: sum of all RateGross items must be <= 10000 (ERATE_EXCEEDS_10000=6); when `max` is set, fix×10000 + sum(rate)×max <= max×10000 must hold (6); with no `max` and a fixed total > 0, sum of RateGross items must be < 10000 (6). RateGross cannot be mixed with NET Rate entries in the same Allocator while a fixed Amount total is present (EMIXED_RATE_BASES=17).\n• Surplus (2): `sharing` is IGNORED (contract forces it to 0). Allocated LAST; receives the remaining balance after Amount + Rate allocations. Validation: MAX ONE Surplus item per Allocator (EMULTIPLE_SURPLUS=5). When Surplus exists, Rate sum constraint relaxes from == 10000 to <= 10000.\nALLOCATION ORDER (strict): Amount items (fixed, cached as fix) → Rate/RateGross items → Surplus item (remaining).\nRECOMMENDATION: Use Amount mode for known fixed amounts (clearer, no sum constraint). Use Rate mode for proportional splits off the post-fix remainder (requires sum == 10000 unless Surplus present). Use RateGross mode for a percentage of the FULL pool/`max` that must coexist with fixed Amount entries. Use Surplus to capture remainder (e.g., platform fee + host gets rest). Accepts string ('Amount'/'Rate'/'Surplus'/'RateGross', recommended) or number (0/1/2/3)."
|
|
985
1135
|
}
|
|
986
1136
|
},
|
|
987
1137
|
"required": [
|
|
@@ -990,12 +1140,12 @@
|
|
|
990
1140
|
"mode"
|
|
991
1141
|
],
|
|
992
1142
|
"additionalProperties": false,
|
|
993
|
-
"description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate items second, Surplus last."
|
|
1143
|
+
"description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate/RateGross items second, Surplus last."
|
|
994
1144
|
},
|
|
995
|
-
"description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. RECIPIENT SEMANTICS: the Guard constrains what each submission slot may be; a recipient's safety follows from the sufficiency of those constraints (run the recipient constraint audit). Canonical order pattern: recipient = the single submitted Order — funds land at that object and are receivable only by its owner. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
|
|
1145
|
+
"description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate/RateGross + Surplus) within the same Allocator. RECIPIENT SEMANTICS: the Guard constrains what each submission slot may be; a recipient's safety follows from the sufficiency of those constraints (run the recipient constraint audit). Canonical order pattern: recipient = the single submitted Order — funds land at that object and are receivable only by its owner. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix; RateGross proportional to the full pool) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; NET Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); RateGross sum must <= 10000 (never mixed with NET Rate while a fixed total is present); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
|
|
996
1146
|
},
|
|
997
1147
|
"fix": {
|
|
998
|
-
"description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract when the allocator is added — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation.",
|
|
1148
|
+
"description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract when the allocator is added — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for NET Rate allocation (RateGross ignores fix and uses the full pool/`max`).",
|
|
999
1149
|
"anyOf": [
|
|
1000
1150
|
{
|
|
1001
1151
|
"type": "number"
|
|
@@ -1006,7 +1156,7 @@
|
|
|
1006
1156
|
]
|
|
1007
1157
|
},
|
|
1008
1158
|
"max": {
|
|
1009
|
-
"description": "Maximum allocation cap (OPTIONAL — omit the field or set to null to disable the cap; do NOT set to 0 as that means a cap of zero). Passed through to the contract as Option<u64> when the allocator is added: when null/omitted the contract treats it as `none` (no cap); when set, the contract enforces it. Has THREE effects when set:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: total_rates = max - fix
|
|
1159
|
+
"description": "Maximum allocation cap (OPTIONAL — omit the field or set to null to disable the cap; do NOT set to 0 as that means a cap of zero). Passed through to the contract as Option<u64> when the allocator is added: when null/omitted the contract treats it as `none` (no cap); when set, the contract enforces it. Has THREE effects when set:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: NET Rate total_rates = max - fix; RateGross total_rates = max (fix NOT subtracted)\n3. Surplus execution: surplus_amount = max - alloced_amount (instead of balance - alloced_amount)\nUse when you want to cap total allocation regardless of Order balance (e.g., cap payout to declared amount). SDK pre-validates Amount sum <= max at build time to give actionable error messages before on-chain abort.",
|
|
1010
1160
|
"anyOf": [
|
|
1011
1161
|
{
|
|
1012
1162
|
"anyOf": [
|
|
@@ -1030,7 +1180,7 @@
|
|
|
1030
1180
|
"sharing"
|
|
1031
1181
|
],
|
|
1032
1182
|
"additionalProperties": false,
|
|
1033
|
-
"description": "Fund allocator — a complete allocation strategy triggered by a Guard. Contains a sharing[] array where items can mix Amount/Rate/Surplus modes. When the Guard passes, the contract allocates funds in strict order: Amount → Rate → Surplus."
|
|
1183
|
+
"description": "Fund allocator — a complete allocation strategy triggered by a Guard. Contains a sharing[] array where items can mix Amount/Rate/RateGross/Surplus modes. When the Guard passes, the contract allocates funds in strict order: Amount → Rate/RateGross → Surplus."
|
|
1034
1184
|
},
|
|
1035
1185
|
"description": "Fund allocator list. Each allocator is evaluated in order; the FIRST allocator whose Guard passes wins. This enables mutually exclusive allocation paths (e.g., 3 allocators for 3 forward paths: refund / damage-deduct / arbitrate)."
|
|
1036
1186
|
}
|
|
@@ -1041,7 +1191,7 @@
|
|
|
1041
1191
|
"allocators"
|
|
1042
1192
|
],
|
|
1043
1193
|
"additionalProperties": false,
|
|
1044
|
-
"description": "Fund allocator list — the top-level allocation configuration attached to an Order. Contains a threshold and a list of Allocators. When funds arrive at the Order, the first Allocator whose Guard passes executes its sharing[] in strict order: Amount → Rate → Surplus. MULTI-TIER ALLOCATION (DOC-04): Each Order binds ONE Allocators template (set on Service.order_allocators before publish). For multi-tier distribution (e.g., customer→agency→suppliers), use a two-phase approach: (1) Tier-1 Allocators on the customer's Order (allocates to agency + refund fund); (2) Tier-2 Allocators on a NEW Order created by the agency (allocates agency's received funds to suppliers). Each tier's Rate-mode sharing[] must independently sum to 10000 (or <= 10000 with Surplus)."
|
|
1194
|
+
"description": "Fund allocator list — the top-level allocation configuration attached to an Order. Contains a threshold and a list of Allocators. When funds arrive at the Order, the first Allocator whose Guard passes executes its sharing[] in strict order: Amount → Rate/RateGross → Surplus. MULTI-TIER ALLOCATION (DOC-04): Each Order binds ONE Allocators template (set on Service.order_allocators before publish). For multi-tier distribution (e.g., customer→agency→suppliers), use a two-phase approach: (1) Tier-1 Allocators on the customer's Order (allocates to agency + refund fund); (2) Tier-2 Allocators on a NEW Order created by the agency (allocates agency's received funds to suppliers). Each tier's NET Rate-mode sharing[] must independently sum to 10000 (or <= 10000 with Surplus); RateGross-mode sharing[] must sum to <= 10000."
|
|
1045
1195
|
},
|
|
1046
1196
|
{
|
|
1047
1197
|
"type": "null"
|
|
@@ -1089,7 +1239,7 @@
|
|
|
1089
1239
|
"properties": {
|
|
1090
1240
|
"coin": {
|
|
1091
1241
|
"type": "string",
|
|
1092
|
-
"description": "Coin object ID or name(local mark).
|
|
1242
|
+
"description": "Coin object ID or name(local mark). WHOLE-COIN TRANSFER: the ENTIRE Coin object is moved to the recipient — the 'amount' is NOT taken from it (testnet lesson: passing your main gas coin transfers its full balance, leaving you unable to pay for anything). Use only for coins whose whole balance is exactly what you intend to send; prefer {balance: <smallest-unit number>} for partial amounts."
|
|
1093
1243
|
}
|
|
1094
1244
|
},
|
|
1095
1245
|
"required": [
|
|
@@ -1420,7 +1570,7 @@
|
|
|
1420
1570
|
"type": "boolean"
|
|
1421
1571
|
},
|
|
1422
1572
|
"publish": {
|
|
1423
|
-
"description": "Whether to publish the Service. After publishing, customers can place orders. VERIFIED against Move source + SDK (4-level immutability matrix):\n L1 — PERMANENTLY LOCKED after publish (assert!(!bPublished), no pause+lock exception):\n • machine (workflow template)\n • order_allocators (fund distribution rules)\n L2 — TIME-LOCKED after publish (unpublished-state check — requires pause + setting_lock_duration elapsed):\n • arbitrations remove/clear (dispute resolution objects)\n • rewards remove/clear (reward objects)\n • compensation_fund_withdraw (withdraw ALL funds)\n L3 — REMAIN MUTABLE after publish (no SDK check, no Move check):\n • arbitrations add, rewards add (no assert — can add after publish)\n • buy_guard, sales, discount, description, location, pause, repositories,\n • compensation_fund_add, setting_lock_duration_add, customer_required, um (Contact)\nThese 2 L1-LOCKED fields (machine/order_allocators) MUST be set BEFORE publish=true.\narbitrations/rewards can be ADDED after publish but remove/clear requires pause+lock.\n\n⚠️ COMPENSATION_FUND + ARBITRATION LINKAGE:\n At publish time, if compensation_fund > 0, Arbitration MUST be bound:\n if (balance::value(&self.compensation_fund) > 0) {\n assert!(arbitration_count > 0, E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND);\n }\n The MCP handler enforces this as a HARD PRE-CHECK: if publish=true AND compensation_fund_add is set in the same call AND arbitrations is empty, the call is REJECTED before submission. If compensation_fund was deposited in a prior call, a SOFT WARNING is issued.\n\nSCHEMA-03 / P0-01 fix — DEPLOYMENT WORKFLOW (two-phase, avoids circular dependency):\n Phase 1 — CREATE (no publish): object={name:'my-service', type_parameter, permission} + machine + order_allocators + arbitrations.\n NOTE: buy_guard can use a LocalMark NAME (not address) to break the Guard→Service circular dependency.\n The name is resolved to an address at transaction build time.\n Phase 2 — PUBLISH: object='my-service' (string ref) + publish=true.\n All L1-LOCKED fields must be set in Phase 1; Phase 2 only flips the publish flag.\n Post-publish updates: buy_guard, sales, description, repositories (add), rewards (add), arbitrations (add), etc.",
|
|
1573
|
+
"description": "Whether to publish the Service. After publishing, customers can place orders. ⚠️ PRE-PUBLISH EVALUATION (mandatory, stop-node fund-exit coverage): service.allocators MUST cover EVERY stop node of the bound Machine — every node where an order can rest (terminal nodes AND waiting states: review windows, handovers, open disputes) needs BOTH a withdrawal (release) AND a refund allocation rule, and each mapping guard must be satisfiable in BOTH directions. An uncovered stop node strands escrowed funds permanently (order_allocators is L1-immutable). Review-gated release is a TIME VARIANT inside ONE exit guard ('reviewed OR unreviewed after T'), never parallel outgoing edges (race deadlock). See pattern.fund_flow_stop_node_coverage + rules R-M5-03 / R-M5-09. VERIFIED against Move source + SDK (4-level immutability matrix):\n L1 — PERMANENTLY LOCKED after publish (assert!(!bPublished), no pause+lock exception):\n • machine (workflow template)\n • order_allocators (fund distribution rules)\n L2 — TIME-LOCKED after publish (unpublished-state check — requires pause + setting_lock_duration elapsed):\n • arbitrations remove/clear (dispute resolution objects)\n • rewards remove/clear (reward objects)\n • compensation_fund_withdraw (withdraw ALL funds)\n L3 — REMAIN MUTABLE after publish (no SDK check, no Move check):\n • arbitrations add, rewards add (no assert — can add after publish)\n • buy_guard, sales, discount, description, location, pause, repositories,\n • compensation_fund_add, setting_lock_duration_add, customer_required, um (Contact)\nThese 2 L1-LOCKED fields (machine/order_allocators) MUST be set BEFORE publish=true.\narbitrations/rewards can be ADDED after publish but remove/clear requires pause+lock.\n\n⚠️ COMPENSATION_FUND + ARBITRATION LINKAGE:\n At publish time, if compensation_fund > 0, Arbitration MUST be bound:\n if (balance::value(&self.compensation_fund) > 0) {\n assert!(arbitration_count > 0, E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND);\n }\n The MCP handler enforces this as a HARD PRE-CHECK: if publish=true AND compensation_fund_add is set in the same call AND arbitrations is empty, the call is REJECTED before submission. If compensation_fund was deposited in a prior call, a SOFT WARNING is issued.\n\nSCHEMA-03 / P0-01 fix — DEPLOYMENT WORKFLOW (two-phase, avoids circular dependency):\n Phase 1 — CREATE (no publish): object={name:'my-service', type_parameter, permission} + machine + order_allocators + arbitrations.\n NOTE: buy_guard can use a LocalMark NAME (not address) to break the Guard→Service circular dependency.\n The name is resolved to an address at transaction build time.\n Phase 2 — PUBLISH: object='my-service' (string ref) + publish=true.\n All L1-LOCKED fields must be set in Phase 1; Phase 2 only flips the publish flag.\n Post-publish updates: buy_guard, sales, description, repositories (add), rewards (add), arbitrations (add), etc.",
|
|
1424
1574
|
"type": "boolean"
|
|
1425
1575
|
}
|
|
1426
1576
|
},
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
"properties": {
|
|
214
214
|
"coin": {
|
|
215
215
|
"type": "string",
|
|
216
|
-
"description": "Coin object ID or name(local mark).
|
|
216
|
+
"description": "Coin object ID or name(local mark). WHOLE-COIN TRANSFER: the ENTIRE Coin object is moved to the recipient — the 'amount' is NOT taken from it (testnet lesson: passing your main gas coin transfers its full balance, leaving you unable to pay for anything). Use only for coins whose whole balance is exactly what you intend to send; prefer {balance: <smallest-unit number>} for partial amounts."
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
"required": [
|
|
@@ -2904,7 +2904,7 @@
|
|
|
2904
2904
|
"type": "null"
|
|
2905
2905
|
}
|
|
2906
2906
|
],
|
|
2907
|
-
"description": "Buyer-
|
|
2907
|
+
"description": "Buyer-recorded credential (order.required_info): the merchant's IM user address resolved from the Service's Contact (zero cost) or an on-chain WTS Proof object id (embeds the IM address + last-message timestamp); null when not submitted"
|
|
2908
2908
|
},
|
|
2909
2909
|
"progress_next": {
|
|
2910
2910
|
"anyOf": [
|
|
@@ -7600,7 +7600,7 @@
|
|
|
7600
7600
|
"description": "Forward name"
|
|
7601
7601
|
},
|
|
7602
7602
|
"namedOperator": {
|
|
7603
|
-
"description": "Forward operation permission 1: Namespace (one of the two must be specified); recommended if Progress object operators are different (e.g., different delivery personnel for different orders).",
|
|
7603
|
+
"description": "Forward operation permission 1: Namespace (one of the two must be specified); recommended if Progress object operators are different (e.g., different delivery personnel for different orders). SPECIAL CASE: an EMPTY string ('') on an order-bound forward resolves to the ORDER PAYER — the buyer of the order can advance it (progress::IsNamedOperator treats an empty name + order as the order's own operator). Use '' for buyer-side actions (delivery confirmation, review, return request, pre-ship cancel) instead of binding a merchant-only permission index, which aborts E_PERMISSION_DENIED for the buyer.",
|
|
7604
7604
|
"anyOf": [
|
|
7605
7605
|
{
|
|
7606
7606
|
"type": "string"
|
|
@@ -9062,6 +9062,59 @@
|
|
|
9062
9062
|
"additionalProperties": false,
|
|
9063
9063
|
"description": "ONE-CALL full business-intelligence context of an on-chain Service (K3 22 / Business Service tab): base data + machine workflow graph + buy_guard/permission/allocator guards + related objects + supply chain + deterministic BusinessReport + recent orders. Every section degrades gracefully — failures are reported in `data_gaps`. Read-only."
|
|
9064
9064
|
},
|
|
9065
|
+
{
|
|
9066
|
+
"type": "object",
|
|
9067
|
+
"properties": {
|
|
9068
|
+
"query_type": {
|
|
9069
|
+
"type": "string",
|
|
9070
|
+
"const": "service_quote"
|
|
9071
|
+
},
|
|
9072
|
+
"service_address": {
|
|
9073
|
+
"type": "string",
|
|
9074
|
+
"description": "On-chain Service object address (or LocalMark name). Required when query_type='service_quote'."
|
|
9075
|
+
},
|
|
9076
|
+
"items": {
|
|
9077
|
+
"description": "Basket to quote. Omit to quote EVERY sale with quantity 1 (the floor basket — order quantity is chosen at buy time, so per-unit prices are the authoritative input).",
|
|
9078
|
+
"type": "array",
|
|
9079
|
+
"items": {
|
|
9080
|
+
"type": "object",
|
|
9081
|
+
"properties": {
|
|
9082
|
+
"name": {
|
|
9083
|
+
"type": "string",
|
|
9084
|
+
"description": "Sale name exactly as configured on the Service."
|
|
9085
|
+
},
|
|
9086
|
+
"quantity": {
|
|
9087
|
+
"default": 1,
|
|
9088
|
+
"description": "Units of this item in the basket (default 1).",
|
|
9089
|
+
"type": "integer",
|
|
9090
|
+
"exclusiveMinimum": 0,
|
|
9091
|
+
"maximum": 10000
|
|
9092
|
+
}
|
|
9093
|
+
},
|
|
9094
|
+
"required": [
|
|
9095
|
+
"name",
|
|
9096
|
+
"quantity"
|
|
9097
|
+
],
|
|
9098
|
+
"additionalProperties": false
|
|
9099
|
+
}
|
|
9100
|
+
},
|
|
9101
|
+
"context_network": {
|
|
9102
|
+
"type": "string",
|
|
9103
|
+
"enum": [
|
|
9104
|
+
"testnet",
|
|
9105
|
+
"mainnet",
|
|
9106
|
+
"localnet"
|
|
9107
|
+
],
|
|
9108
|
+
"description": "Network for the query — equivalent to the `network` parameter (prefer `network`). Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9109
|
+
}
|
|
9110
|
+
},
|
|
9111
|
+
"required": [
|
|
9112
|
+
"query_type",
|
|
9113
|
+
"service_address"
|
|
9114
|
+
],
|
|
9115
|
+
"additionalProperties": false,
|
|
9116
|
+
"description": "READ-ONLY pre-purchase quote of a Service (finding 3.6 — order_new total_pay pre-check): per-item unit price × quantity, the basket total that order_new.buy.total_pay.balance must exactly equal (the on-chain buy aborts on any drift), and the order_allocators fee-split preview (sharing rows of the FIRST allocator — the normal payout path; guards select per-case allocators such as refund/damage, so the live split depends on which guard passes). Mirrors the on-chain price×quantity semantics WITHOUT calling quote on-chain and NEVER submits a transaction. Amounts are payment-token smallest units plus a human display when the token precision resolves."
|
|
9117
|
+
},
|
|
9065
9118
|
{
|
|
9066
9119
|
"type": "object",
|
|
9067
9120
|
"properties": {
|
|
@@ -10643,7 +10696,7 @@
|
|
|
10643
10696
|
"description": "Business meaning of advancing to this node. Example: 'Guide starts the day service'"
|
|
10644
10697
|
},
|
|
10645
10698
|
"gains": {
|
|
10646
|
-
"description": "Gains for the caller if this option is chosen (K3 Game G1 gain separation). Example: ['Settlement
|
|
10699
|
+
"description": "Gains for the caller if this option is chosen (K3 Game G1 gain separation). Example: ['Settlement unlocked — funds releasable to provider via an explicit allocation step']",
|
|
10647
10700
|
"type": "array",
|
|
10648
10701
|
"items": {
|
|
10649
10702
|
"type": "string"
|
|
@@ -10890,7 +10943,7 @@
|
|
|
10890
10943
|
"description": "Business meaning of advancing to this node. Example: 'Guide starts the day service'"
|
|
10891
10944
|
},
|
|
10892
10945
|
"gains": {
|
|
10893
|
-
"description": "Gains for the caller if this option is chosen (K3 Game G1 gain separation). Example: ['Settlement
|
|
10946
|
+
"description": "Gains for the caller if this option is chosen (K3 Game G1 gain separation). Example: ['Settlement unlocked — funds releasable to provider via an explicit allocation step']",
|
|
10894
10947
|
"type": "array",
|
|
10895
10948
|
"items": {
|
|
10896
10949
|
"type": "string"
|
|
@@ -44,14 +44,7 @@
|
|
|
44
44
|
"type": "array",
|
|
45
45
|
"items": {
|
|
46
46
|
"type": "string",
|
|
47
|
-
"
|
|
48
|
-
"freelance",
|
|
49
|
-
"rental",
|
|
50
|
-
"education",
|
|
51
|
-
"travel",
|
|
52
|
-
"subscription",
|
|
53
|
-
"retail"
|
|
54
|
-
]
|
|
47
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
55
48
|
}
|
|
56
49
|
},
|
|
57
50
|
"layer": {
|
|
@@ -3083,14 +3076,7 @@
|
|
|
3083
3076
|
"type": "array",
|
|
3084
3077
|
"items": {
|
|
3085
3078
|
"type": "string",
|
|
3086
|
-
"
|
|
3087
|
-
"freelance",
|
|
3088
|
-
"rental",
|
|
3089
|
-
"education",
|
|
3090
|
-
"travel",
|
|
3091
|
-
"subscription",
|
|
3092
|
-
"retail"
|
|
3093
|
-
]
|
|
3079
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
3094
3080
|
}
|
|
3095
3081
|
},
|
|
3096
3082
|
"long_term": {
|
|
@@ -8809,14 +8795,7 @@
|
|
|
8809
8795
|
"type": "array",
|
|
8810
8796
|
"items": {
|
|
8811
8797
|
"type": "string",
|
|
8812
|
-
"
|
|
8813
|
-
"freelance",
|
|
8814
|
-
"rental",
|
|
8815
|
-
"education",
|
|
8816
|
-
"travel",
|
|
8817
|
-
"subscription",
|
|
8818
|
-
"retail"
|
|
8819
|
-
]
|
|
8798
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
8820
8799
|
}
|
|
8821
8800
|
},
|
|
8822
8801
|
"long_term": {
|
|
@@ -14548,14 +14527,7 @@
|
|
|
14548
14527
|
"type": "array",
|
|
14549
14528
|
"items": {
|
|
14550
14529
|
"type": "string",
|
|
14551
|
-
"
|
|
14552
|
-
"freelance",
|
|
14553
|
-
"rental",
|
|
14554
|
-
"education",
|
|
14555
|
-
"travel",
|
|
14556
|
-
"subscription",
|
|
14557
|
-
"retail"
|
|
14558
|
-
]
|
|
14530
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
14559
14531
|
}
|
|
14560
14532
|
},
|
|
14561
14533
|
"long_term": {
|
|
@@ -20276,14 +20248,7 @@
|
|
|
20276
20248
|
"type": "array",
|
|
20277
20249
|
"items": {
|
|
20278
20250
|
"type": "string",
|
|
20279
|
-
"
|
|
20280
|
-
"freelance",
|
|
20281
|
-
"rental",
|
|
20282
|
-
"education",
|
|
20283
|
-
"travel",
|
|
20284
|
-
"subscription",
|
|
20285
|
-
"retail"
|
|
20286
|
-
]
|
|
20251
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
20287
20252
|
}
|
|
20288
20253
|
},
|
|
20289
20254
|
"preferences": {
|
|
@@ -20386,14 +20351,7 @@
|
|
|
20386
20351
|
"type": "array",
|
|
20387
20352
|
"items": {
|
|
20388
20353
|
"type": "string",
|
|
20389
|
-
"
|
|
20390
|
-
"freelance",
|
|
20391
|
-
"rental",
|
|
20392
|
-
"education",
|
|
20393
|
-
"travel",
|
|
20394
|
-
"subscription",
|
|
20395
|
-
"retail"
|
|
20396
|
-
]
|
|
20354
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
20397
20355
|
}
|
|
20398
20356
|
},
|
|
20399
20357
|
"long_term": {
|
|
@@ -26106,14 +26064,7 @@
|
|
|
26106
26064
|
"type": "array",
|
|
26107
26065
|
"items": {
|
|
26108
26066
|
"type": "string",
|
|
26109
|
-
"
|
|
26110
|
-
"freelance",
|
|
26111
|
-
"rental",
|
|
26112
|
-
"education",
|
|
26113
|
-
"travel",
|
|
26114
|
-
"subscription",
|
|
26115
|
-
"retail"
|
|
26116
|
-
]
|
|
26067
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
26117
26068
|
}
|
|
26118
26069
|
},
|
|
26119
26070
|
"layer": {
|
|
@@ -29058,14 +29009,7 @@
|
|
|
29058
29009
|
"type": "array",
|
|
29059
29010
|
"items": {
|
|
29060
29011
|
"type": "string",
|
|
29061
|
-
"
|
|
29062
|
-
"freelance",
|
|
29063
|
-
"rental",
|
|
29064
|
-
"education",
|
|
29065
|
-
"travel",
|
|
29066
|
-
"subscription",
|
|
29067
|
-
"retail"
|
|
29068
|
-
]
|
|
29012
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
29069
29013
|
}
|
|
29070
29014
|
},
|
|
29071
29015
|
"long_term": {
|
|
@@ -37611,14 +37555,7 @@
|
|
|
37611
37555
|
"type": "array",
|
|
37612
37556
|
"items": {
|
|
37613
37557
|
"type": "string",
|
|
37614
|
-
"
|
|
37615
|
-
"freelance",
|
|
37616
|
-
"rental",
|
|
37617
|
-
"education",
|
|
37618
|
-
"travel",
|
|
37619
|
-
"subscription",
|
|
37620
|
-
"retail"
|
|
37621
|
-
]
|
|
37558
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
37622
37559
|
}
|
|
37623
37560
|
},
|
|
37624
37561
|
"layer": {
|
|
@@ -40542,14 +40479,7 @@
|
|
|
40542
40479
|
"type": "array",
|
|
40543
40480
|
"items": {
|
|
40544
40481
|
"type": "string",
|
|
40545
|
-
"
|
|
40546
|
-
"freelance",
|
|
40547
|
-
"rental",
|
|
40548
|
-
"education",
|
|
40549
|
-
"travel",
|
|
40550
|
-
"subscription",
|
|
40551
|
-
"retail"
|
|
40552
|
-
]
|
|
40482
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
40553
40483
|
}
|
|
40554
40484
|
},
|
|
40555
40485
|
"long_term": {
|
|
@@ -46262,14 +46192,7 @@
|
|
|
46262
46192
|
"type": "array",
|
|
46263
46193
|
"items": {
|
|
46264
46194
|
"type": "string",
|
|
46265
|
-
"
|
|
46266
|
-
"freelance",
|
|
46267
|
-
"rental",
|
|
46268
|
-
"education",
|
|
46269
|
-
"travel",
|
|
46270
|
-
"subscription",
|
|
46271
|
-
"retail"
|
|
46272
|
-
]
|
|
46195
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
46273
46196
|
}
|
|
46274
46197
|
},
|
|
46275
46198
|
"layer": {
|