@wowok/agent-mcp 3.0.0 → 3.0.2
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/communication/evidence.d.ts +6 -0
- package/dist/communication/evidence.js +1 -0
- package/dist/evaluation/acceptance.d.ts +24 -0
- package/dist/evaluation/acceptance.js +1 -0
- package/dist/evaluation/builtins/demand-match.d.ts +3 -2
- package/dist/evaluation/builtins/demand-match.js +1 -1
- package/dist/evaluation/builtins/service-risk.d.ts +2 -1
- package/dist/evaluation/builtins/service-risk.js +1 -1
- package/dist/evaluation/index.d.ts +1 -0
- package/dist/evaluation/index.js +1 -1
- package/dist/evaluation/match-operation.d.ts +14 -0
- package/dist/evaluation/match-operation.js +1 -0
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/extensions/modes.js +1 -1
- package/dist/goal/GoalClassifier.js +1 -1
- package/dist/goal/GoalEngine.d.ts +8 -0
- package/dist/goal/GoalEngine.js +1 -1
- package/dist/goal/types.d.ts +1 -1
- package/dist/harness/auto-escalation.d.ts +0 -12
- package/dist/harness/auto-escalation.js +1 -1
- package/dist/harness/index.d.ts +1 -14
- package/dist/harness/index.js +1 -1
- package/dist/harness/types.d.ts +0 -38
- package/dist/intent/types.d.ts +1 -1
- package/dist/intent/types.js +1 -1
- package/dist/keeper/KeeperScan.d.ts +39 -0
- package/dist/keeper/KeeperScan.js +1 -0
- package/dist/keeper/KeeperStore.d.ts +43 -0
- package/dist/keeper/KeeperStore.js +1 -0
- package/dist/keeper/detectors.d.ts +23 -0
- package/dist/keeper/detectors.js +1 -0
- package/dist/keeper/keeper.spec.d.ts +1 -0
- package/dist/keeper/keeper.spec.js +1 -0
- package/dist/keeper/types.d.ts +65 -0
- package/dist/keeper/types.js +1 -0
- package/dist/knowledge/demand-risk.js +1 -1
- package/dist/knowledge/event-semantics.d.ts +3 -0
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/event-semantics.spec.d.ts +1 -0
- package/dist/knowledge/event-semantics.spec.js +1 -0
- package/dist/knowledge/evidence-review.d.ts +23 -0
- package/dist/knowledge/evidence-review.js +1 -1
- package/dist/knowledge/examples-scanner-cli.js +1 -1
- package/dist/knowledge/examples-scanner.js +1 -1
- package/dist/knowledge/guard-bytecode-spec.d.ts +82 -0
- package/dist/knowledge/guard-bytecode-spec.js +1 -0
- package/dist/knowledge/guard-design-patterns.d.ts +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/index.d.ts +10 -6
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/mcp-schema-audit-cli.js +1 -1
- package/dist/knowledge/mcp-schema-audit.js +1 -1
- package/dist/knowledge/migration-preflight.d.ts +27 -0
- package/dist/knowledge/migration-preflight.js +1 -0
- package/dist/knowledge/scenario-modes.d.ts +1 -1
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +20 -0
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/MonitorLoop.d.ts +1 -0
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/monitor/ScopeResolver.js +1 -1
- package/dist/monitor/SuggestionBridge.d.ts +1 -1
- package/dist/monitor/SuggestionBridge.js +1 -1
- package/dist/monitor/SuggestionBridge.spec.d.ts +1 -0
- package/dist/monitor/SuggestionBridge.spec.js +1 -0
- package/dist/monitor/normalize.js +1 -1
- package/dist/monitor/types.d.ts +0 -1
- package/dist/monitor/types.js +1 -1
- package/dist/participation/employee-kpi.d.ts +12 -0
- package/dist/participation/employee-kpi.js +1 -1
- package/dist/participation/employee-kpi.spec.d.ts +1 -0
- package/dist/participation/employee-kpi.spec.js +1 -0
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/mode-actions.d.ts +19 -6
- package/dist/playbooks/service-build/mode-actions.js +1 -1
- package/dist/playbooks/service-build/relationship-profile.js +1 -1
- package/dist/relationship/derivation.d.ts +6 -0
- package/dist/relationship/derivation.js +1 -1
- package/dist/relationship/derivation.spec.d.ts +1 -0
- package/dist/relationship/derivation.spec.js +1 -0
- package/dist/role/index.d.ts +2 -2
- package/dist/role/index.js +1 -1
- package/dist/role/model.d.ts +2 -1
- package/dist/role/model.js +1 -1
- package/dist/role/types.d.ts +5 -0
- package/dist/rules.d.ts +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/employee/index.d.ts +61 -1
- package/dist/schema/employee/index.js +1 -1
- package/dist/schema/evaluation/index.d.ts +70 -5
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +43 -7
- package/dist/schema/industry-pack/modes.d.ts +42 -6
- package/dist/schema/industry-pack/modes.js +1 -1
- package/dist/schema/intent-radar/index.d.ts +3 -0
- package/dist/schema/intent-radar/index.js +1 -1
- package/dist/schema/keeper/index.d.ts +475 -0
- package/dist/schema/keeper/index.js +1 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +2 -0
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +34 -0
- package/dist/schema/query/bi.d.ts +188 -0
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +48 -48
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-query/index.d.ts +2 -11
- package/dist/schema/schema-query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/utils/skills-recommendation.js +1 -1
- package/dist/schema/watch/index.d.ts +4 -0
- package/dist/schema/watch/index.js +1 -1
- package/dist/schema-query-impl/index.d.ts +33 -14
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/employee_operation.output.json +100 -0
- package/dist/schemas/employee_operation.schema.json +148 -5
- package/dist/schemas/evaluation_operation.output.json +135 -9
- package/dist/schemas/evaluation_operation.schema.json +176 -7
- package/dist/schemas/index.json +7 -1
- package/dist/schemas/industry_pack_operation.output.json +158 -32
- package/dist/schemas/intent_radar.output.json +2 -0
- package/dist/schemas/intent_radar.schema.json +1 -0
- package/dist/schemas/keeper_operation.output.json +1274 -0
- package/dist/schemas/keeper_operation.schema.json +359 -0
- package/dist/schemas/messenger_operation.schema.json +8 -0
- package/dist/schemas/onchain_events.output.json +55 -11
- package/dist/schemas/onchain_events.schema.json +4 -0
- package/dist/schemas/onchain_table_data.output.json +59 -0
- package/dist/schemas/query_toolkit.output.json +428 -0
- package/dist/schemas/query_toolkit.schema.json +59 -0
- package/dist/schemas/schema_query.output.json +1 -64
- package/dist/schemas/schema_query.schema.json +18 -3
- package/dist/schemas/watch_operation.output.json +21 -1
- package/dist/task/playbook.js +1 -1
- package/dist/task/types.d.ts +1 -1
- package/dist/tools/handlers/bridge.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/employee.d.ts +6 -0
- package/dist/tools/handlers/employee.js +1 -1
- package/dist/tools/handlers/employee.spec.d.ts +1 -0
- package/dist/tools/handlers/employee.spec.js +1 -0
- package/dist/tools/handlers/evaluation.js +1 -1
- package/dist/tools/handlers/evaluation.spec.d.ts +1 -0
- package/dist/tools/handlers/evaluation.spec.js +1 -0
- package/dist/tools/handlers/intent-radar.js +1 -1
- package/dist/tools/handlers/keeper.d.ts +12 -0
- package/dist/tools/handlers/keeper.js +1 -0
- package/dist/tools/handlers/messenger.js +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/watch.js +1 -1
- package/dist/tools/handlers/workflow.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/registry/agent.d.ts +2 -0
- package/dist/tools/registry/agent.js +1 -0
- package/dist/tools/registry/bridge.d.ts +2 -0
- package/dist/tools/registry/bridge.js +1 -0
- package/dist/tools/registry/business.d.ts +2 -0
- package/dist/tools/registry/business.js +1 -0
- package/dist/tools/registry/config.d.ts +2 -0
- package/dist/tools/registry/config.js +1 -0
- package/dist/tools/registry/files.d.ts +2 -0
- package/dist/tools/registry/files.js +1 -0
- package/dist/tools/registry/identity.d.ts +2 -0
- package/dist/tools/registry/identity.js +1 -0
- package/dist/tools/registry/local.d.ts +2 -0
- package/dist/tools/registry/local.js +1 -0
- package/dist/tools/registry/messenger.d.ts +2 -0
- package/dist/tools/registry/messenger.js +1 -0
- package/dist/tools/registry/monitor.d.ts +2 -0
- package/dist/tools/registry/monitor.js +1 -0
- package/dist/tools/registry/onchain.d.ts +2 -0
- package/dist/tools/registry/onchain.js +1 -0
- package/dist/tools/registry/query.d.ts +2 -0
- package/dist/tools/registry/query.js +1 -0
- package/dist/tools/registry/trust.d.ts +2 -0
- package/dist/tools/registry/trust.js +1 -0
- package/dist/tools/shared.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +2 -2
- package/dist/examples/arbitration-dispute-create.json +0 -41
- package/dist/examples/arbitration-vote-weighted.json +0 -35
- package/dist/examples/arbitration-voting-guard-add.json +0 -38
- package/dist/examples/demand-present-service.json +0 -33
- package/dist/examples/education-contact-create.json +0 -40
- package/dist/examples/freelance-contact-create.json +0 -40
- package/dist/examples/gen-passport-verify-guard.json +0 -48
- package/dist/examples/guard-template-balance-check.json +0 -59
- package/dist/examples/guard-template-time-lock.json +0 -60
- package/dist/examples/insurance-guard-claim-timelock.json +0 -75
- package/dist/examples/insurance-guard-withdraw-allocation.json +0 -96
- package/dist/examples/insurance-machine-create.json +0 -75
- package/dist/examples/insurance-service-allocators.json +0 -55
- package/dist/examples/machine-multisig-threshold.json +0 -87
- package/dist/examples/machine-publish.json +0 -30
- package/dist/examples/machine-template-7node-rental.json +0 -119
- package/dist/examples/payment-scenario-bound.json +0 -45
- package/dist/examples/rental-ziroom-machine-create.json +0 -148
- package/dist/examples/rental-ziroom-permission-create.json +0 -41
- package/dist/examples/rental-ziroom-service-create.json +0 -36
- package/dist/examples/retail-adv-guard-customer-win-create.json +0 -80
- package/dist/examples/retail-adv-guard-messenger-proof-create.json +0 -65
- package/dist/examples/retail-adv-guard-reward-timeout-create.json +0 -92
- package/dist/examples/retail-adv-reward-guard-add.json +0 -51
- package/dist/examples/retail-myshop-allocation-activate.json +0 -55
- package/dist/examples/retail-myshop-arbitration-create.json +0 -40
- package/dist/examples/retail-myshop-contact-create.json +0 -43
- package/dist/examples/retail-myshop-order-create.json +0 -56
- package/dist/examples/retail-myshop-progress-operate.json +0 -38
- package/dist/examples/retail-myshop-reward-create.json +0 -35
- package/dist/examples/retail-myshop-service-create.json +0 -38
- package/dist/examples/retail-myshop-service-customer-required.json +0 -31
- package/dist/examples/service-discount-issue.json +0 -46
- package/dist/examples/subscription-contact-create.json +0 -40
- package/dist/examples/threebody-guard-create.json +0 -56
- package/dist/examples/threebody-machine-create.json +0 -71
- package/dist/examples/threebody-permission-create.json +0 -38
- package/dist/examples/threebody-service-allocators.json +0 -48
- package/dist/examples/travel-guard-time-lock.json +0 -69
- package/dist/examples/travel-guard-weather-oracle.json +0 -70
- package/dist/examples/travel-machine-create.json +0 -135
- package/dist/examples/travel-repository-create.json +0 -47
- package/dist/examples/travel-service-create.json +0 -34
- package/dist/examples/travel-treasury-create.json +0 -34
- package/dist/examples/treasury-deposit.json +0 -37
- package/dist/examples/treasury-withdraw.json +0 -38
- package/dist/harness/plan.d.ts +0 -33
- package/dist/harness/plan.js +0 -1
- package/dist/knowledge/demand-matching.d.ts +0 -29
- package/dist/knowledge/demand-matching.js +0 -1
- package/dist/knowledge/guard-context.d.ts +0 -56
- package/dist/knowledge/guard-context.js +0 -1
- package/dist/knowledge/guard-migration.d.ts +0 -48
- package/dist/knowledge/guard-migration.js +0 -1
- package/dist/schemas/guard-node-schema.json +0 -1000
- package/dist/task/stage-gate.d.ts +0 -22
- package/dist/task/stage-gate.js +0 -1
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Reward: Bind Claim Guards with store_from_id (double-claim protection) — Wonderful / Lost / Shipping-Timeout",
|
|
3
|
-
"description": "Attach three claim Guards to an existing Reward pool in one call. Each entry pairs a Guard with a Fixed amount, recipient {Signer:'signer'}, and store_from_id: 0 — the value at Guard-table identifier 0 (the order address) is recorded per claim, enabling query_reward_record_exists-based double-claim protection. This is the bind step of the circular-reference pattern: (1) create empty Reward, (2) create Guards referencing the Reward by name, (3) guard_add binds them.",
|
|
4
|
-
"tags": ["reward", "guard_add", "claim", "double-claim-protection", "circular-reference", "retail"],
|
|
5
|
-
"industry": "retail",
|
|
6
|
-
"operation_type": "reward",
|
|
7
|
-
"source": "docs/examples/MyShop_Advanced — schema-validated, not chain-verified",
|
|
8
|
-
"verified": false,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "reward",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": "myshop_reward_v2",
|
|
15
|
-
"guard_add": [
|
|
16
|
-
{
|
|
17
|
-
"guard": "reward_wonderful_v2",
|
|
18
|
-
"recipient": { "Signer": "signer" },
|
|
19
|
-
"amount": { "type": "Fixed", "value": "10000" },
|
|
20
|
-
"store_from_id": 0
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"guard": "reward_lost_v2",
|
|
24
|
-
"recipient": { "Signer": "signer" },
|
|
25
|
-
"amount": { "type": "Fixed", "value": "20000" },
|
|
26
|
-
"store_from_id": 0
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"guard": "reward_shipping_timeout_v2",
|
|
30
|
-
"recipient": { "Signer": "signer" },
|
|
31
|
-
"amount": { "type": "Fixed", "value": "20000" },
|
|
32
|
-
"store_from_id": 0
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"env": {
|
|
37
|
-
"network": "testnet",
|
|
38
|
-
"no_cache": true
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"notes": [
|
|
42
|
-
"Schema-verified against CallReward_DataSchema (call/reward.ts, strict): 'object' as STRING = operate on existing Reward (object form would CREATE). guard_add items validated against RewardGuardSchema (query/index.ts): {guard: NameOrAddress, recipient: RecipientSchema, amount: AmountSchema, expiration_time?, store_from_id?}.",
|
|
43
|
-
"recipient {Signer:'signer'} matches RecipientSchema's z.object({Signer: z.literal('signer')}) branch — the literal string 'signer' is required. Safe here because each claim Guard binds Signer == query(order.owner) (Level-2 dynamic binding), so funds always reach the order's rightful owner.",
|
|
44
|
-
"amount {type:'Fixed', value} — AmountSchema discriminated union ('Fixed' | 'GuardU64Identifier'). Values converted from the doc's numbers to STRINGS per smallest-unit convention (BalanceTypeSchema accepts both; string preserves precision). 10000/20000 are SYMBOLIC test values (0.00001/0.00002 WOW at 9 decimals) — far below gas; production should use e.g. '20000000000' (20 WOW) or display format '20WOW'.",
|
|
45
|
-
"store_from_id: 0 means the Guard-table identifier-0 value (the submitted order address) is stored with each claim record — the claim Guards' query_reward_record_exists(where.storeFromId={identifier:0}) then rejects repeat claims for the same order. GuardIdentifierSchema range 0-255.",
|
|
46
|
-
"Prerequisites (circular-reference order, DOC): (1) Reward 'myshop_reward_v2' created EMPTY; (2) the three Guards created (they reference the Reward by name in their tables); (3) THIS guard_add call binds them. Afterwards fund the pool via coin_add — claims fail on insufficient balance.",
|
|
47
|
-
"Optional lock: set guard_expiration_time (ms, or null to remove) to freeze the Guard list — after that point no new Guards/fund rules can be added.",
|
|
48
|
-
"Desensitization: doc ran on mainnet as myshop_merchant — network switched to testnet, account omitted; all object references are local marks; no personal data or real 0x addresses.",
|
|
49
|
-
"Claim flow after binding: customer calls reward.claim = '<guard_name>' with a submission carrying the Guard's b_submission identifiers (order address, plus progress address for the timeout guard)."
|
|
50
|
-
]
|
|
51
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Activate Allocation via Guard Verification (MyShop Retail)",
|
|
3
|
-
"description": "Activate a pending MyShop Allocation by verifying the withdraw Guard with alloc_by_guard, passing the Order address as a runtime submission. On Guard pass, funds are distributed per the allocator's sharing rules.",
|
|
4
|
-
"tags": ["allocation", "alloc_by_guard", "submission", "withdraw", "retail"],
|
|
5
|
-
"industry": "retail",
|
|
6
|
-
"operation_type": "allocation",
|
|
7
|
-
"source": "MyShop verified deployment walkthrough (docs/examples/MyShop) — adapted to current schema",
|
|
8
|
-
"verified": true,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "allocation",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": "myshop_test_allocation",
|
|
15
|
-
"alloc_by_guard": "myshop_withdraw_guard"
|
|
16
|
-
},
|
|
17
|
-
"submission": {
|
|
18
|
-
"type": "submission",
|
|
19
|
-
"guard": [
|
|
20
|
-
{
|
|
21
|
-
"object": "myshop_withdraw_guard",
|
|
22
|
-
"impack": true
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"submission": [
|
|
26
|
-
{
|
|
27
|
-
"guard": "myshop_withdraw_guard",
|
|
28
|
-
"submission": [
|
|
29
|
-
{
|
|
30
|
-
"identifier": 0,
|
|
31
|
-
"b_submission": true,
|
|
32
|
-
"value_type": "Address",
|
|
33
|
-
"value": "myshop_order_v1",
|
|
34
|
-
"name": "order_address"
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
"env": {
|
|
41
|
-
"network": "testnet",
|
|
42
|
-
"no_cache": true,
|
|
43
|
-
"confirmed": true
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"notes": [
|
|
47
|
-
"alloc_by_guard and the submission guard entries accept the Guard's LOCAL MARK NAME — the SDK resolves non-address values via LocalMark.get_address (allocation.ts L122-136), so names and 0x addresses both work. This example uses names (desensitization repair 2026-07-30: the original walkthrough recorded truncated real addresses, which are neither valid schema IDs nor reproducible).",
|
|
48
|
-
"submission sits at the request ROOT level — sibling of data/env (mirrored here as call.submission), NOT inside data.data. Shape (SubmissionCallSchema): {type:'submission', guard:[{object, impack}], submission:[{guard, submission:[GuardTableItem...]}]}, one submission entry per Guard in the guard array.",
|
|
49
|
-
"impack flag (per schema): whether this Guard's verification result participates in the final logic. true = the Guard must PASS for the allocation to execute; false = the Guard is still checked but does not block the operation.",
|
|
50
|
-
"b_submission:true table items are runtime values supplied by the caller at Guard trigger time (e.g. the order address to release funds for) — the static 'value' stored in the Guard definition is ignored and the value here is used instead.",
|
|
51
|
-
"After activation distributes funds per the allocator sharing rules, the merchant withdraws Service-side receipts via: {operation_type:'service', data:{object:'myshop_service_v2', owner_receive:'recently'}} (MyShop step 7.2).",
|
|
52
|
-
"object as a STRING targets an EXISTING Allocation (CallAllocation_OperateSchema). Allocation objects are normally created automatically by order payments through the Service's order_allocators config, then activated per allocator Guard.",
|
|
53
|
-
"Adaptations from doc: network changed mainnet->testnet; payload otherwise matches current schema (no drift found)."
|
|
54
|
-
]
|
|
55
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Arbitration with Independent Permission (MyShop Retail)",
|
|
3
|
-
"description": "Create an Arbitration object for MyShop retail order dispute resolution, using an independent Permission (myshop_arbitration_permission) separate from the Service's permission, with dispute fee, description, and location.",
|
|
4
|
-
"tags": ["arbitration", "dispute", "retail", "permission"],
|
|
5
|
-
"industry": "retail",
|
|
6
|
-
"operation_type": "arbitration",
|
|
7
|
-
"source": "MyShop verified deployment walkthrough (docs/examples/MyShop) — adapted to current schema",
|
|
8
|
-
"verified": true,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "arbitration",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": {
|
|
15
|
-
"name": "myshop_arbitration_v2",
|
|
16
|
-
"type_parameter": "0x2::wow::WOW",
|
|
17
|
-
"permission": "myshop_arbitration_permission",
|
|
18
|
-
"tags": ["ecommerce", "dispute", "toys"],
|
|
19
|
-
"onChain": false,
|
|
20
|
-
"replaceExistName": true
|
|
21
|
-
},
|
|
22
|
-
"description": "Arbitration system for MyShop toy store disputes",
|
|
23
|
-
"location": "Online arbitration system",
|
|
24
|
-
"fee": 5000000
|
|
25
|
-
},
|
|
26
|
-
"env": {
|
|
27
|
-
"network": "testnet",
|
|
28
|
-
"no_cache": true,
|
|
29
|
-
"confirmed": true
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"notes": [
|
|
33
|
-
"CRITICAL FIX vs original doc: the walkthrough used permission 'myshop_permission_v2' — the SAME permission as the Service. This is now blocked at the contract layer: service.move arbitration_add_imp asserts arbitration.permission != service.permission and aborts with E_ARBITRATION_PERMISSION_CONFLICT (code 33), because a Service owner controlling its own Arbitration breaks dispute fairness. An Arbitration MUST use an independent Permission (here 'myshop_arbitration_permission').",
|
|
34
|
-
"New Arbitration objects are created PAUSED (bPaused=true) and cannot accept disputes until unpaused. Follow-up call after creation: {operation_type:'arbitration', data:{object:'myshop_arbitration_v2', pause:false}} (object as STRING references the existing object).",
|
|
35
|
-
"fee is in the SMALLEST unit of the type_parameter token: 5000000 = 0.005 WOW (WOW has 9 decimals). BalanceTypeSchema also accepts numeric strings for values above 2^53.",
|
|
36
|
-
"name/type_parameter/permission live INSIDE 'object' (TypeNamedObjectWithPermissionSchema), not at the data root. permission may reference an existing Permission by name/address (as here) or create a new one inline.",
|
|
37
|
-
"onChain:false keeps the local mark private (not published on-chain); replaceExistName:true force-rebinds the name if already taken — use deliberately, it unbinds the name from its previous object.",
|
|
38
|
-
"Adaptations from doc: permission renamed to an independent Permission (contract fix above), network changed mainnet->testnet, replaceExistName added for re-runnability."
|
|
39
|
-
]
|
|
40
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create After-Sales Contact Object (MyShop Retail)",
|
|
3
|
-
"description": "Create a named Contact object with a Permission reference and an initial IM entry pointing at the merchant's after-sales support account",
|
|
4
|
-
"tags": ["contact", "messenger", "ims", "retail"],
|
|
5
|
-
"industry": "retail",
|
|
6
|
-
"operation_type": "contact",
|
|
7
|
-
"source": "MyShop verified deployment walkthrough (docs/examples/MyShop) — adapted to current schema",
|
|
8
|
-
"verified": true,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "contact",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": {
|
|
15
|
-
"name": "myshop_aftersales_contact_v2",
|
|
16
|
-
"permission": "myshop_permission_v2",
|
|
17
|
-
"replaceExistName": true
|
|
18
|
-
},
|
|
19
|
-
"description": "MyShop after-sales support contact - we're here to help with orders, shipping, and returns",
|
|
20
|
-
"ims": {
|
|
21
|
-
"op": "add",
|
|
22
|
-
"im": [
|
|
23
|
-
{
|
|
24
|
-
"at": "myshop_merchant",
|
|
25
|
-
"description": "Primary after-sales support representative"
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"env": {
|
|
31
|
-
"network": "testnet",
|
|
32
|
-
"no_cache": true,
|
|
33
|
-
"confirmed": true
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"notes": [
|
|
37
|
-
"ims.im[].at accepts an ACCOUNT NAME (resolved to the account's address at transaction build time) or a full 0x address directly — 'myshop_merchant' here is an account name, not a messenger name.",
|
|
38
|
-
"ims is an op discriminated union, never a bare array: {op:'add', im:[{at, description?}...]} / {op:'set', im:[...]} replaces the whole list / {op:'remove', im:[...]} takes plain names-or-addresses (NOT {at, description} entries) / {op:'clear'} empties the list.",
|
|
39
|
-
"'object' uses the OBJECT creation form {name, permission, replaceExistName} — 'name' goes INSIDE 'object', and 'permission' references the pre-created myshop_permission_v2 (or inline-create a new Permission, or omit for an auto-created unnamed one). To operate an existing Contact, pass a string name/ID instead.",
|
|
40
|
-
"Bind this Contact to a Service via the service call's 'um' field so customers can reach after-sales support; Messenger communication itself is end-to-end encrypted and never stored on-chain.",
|
|
41
|
-
"Adapted from the doc's mainnet env to testnet + no_cache; env.account omitted because Contact creation is not bound to a specific signer — any account can create it."
|
|
42
|
-
]
|
|
43
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Order with Named Order/Progress/Allocation (MyShop Retail)",
|
|
3
|
-
"description": "Customer purchases a product from a published Service via order_new: buy.items + total_pay, while simultaneously naming the newly created Order, Progress, and Allocation objects so later steps can reference them by name",
|
|
4
|
-
"tags": ["order", "order_new", "retail", "buy", "named_objects"],
|
|
5
|
-
"industry": "retail",
|
|
6
|
-
"operation_type": "service",
|
|
7
|
-
"source": "MyShop verified deployment walkthrough (docs/examples/MyShop) — adapted to current schema",
|
|
8
|
-
"verified": true,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "service",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": "myshop_service_v2",
|
|
15
|
-
"order_new": {
|
|
16
|
-
"buy": {
|
|
17
|
-
"items": [
|
|
18
|
-
{
|
|
19
|
-
"name": "Play Purse Set 35PCS",
|
|
20
|
-
"stock": 1,
|
|
21
|
-
"wip_hash": "03c18561efa8faf4d75480eb1f732c4a46ffde95599e92eca06167785fc07a5b"
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"total_pay": {
|
|
25
|
-
"balance": 50000000
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"namedNewOrder": {
|
|
29
|
-
"name": "myshop_test_order",
|
|
30
|
-
"replaceExistName": true
|
|
31
|
-
},
|
|
32
|
-
"namedNewProgress": {
|
|
33
|
-
"name": "myshop_test_progress",
|
|
34
|
-
"replaceExistName": true
|
|
35
|
-
},
|
|
36
|
-
"namedNewAllocation": {
|
|
37
|
-
"name": "myshop_test_allocation",
|
|
38
|
-
"replaceExistName": true
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"env": {
|
|
43
|
-
"account": "myshop_customer",
|
|
44
|
-
"network": "testnet",
|
|
45
|
-
"no_cache": true,
|
|
46
|
-
"confirmed": true
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"notes": [
|
|
50
|
-
"A single order_new call creates THREE objects at once — Order, Progress, and Allocation — and namedNewOrder / namedNewProgress / namedNewAllocation name all three in the same call, so subsequent steps (progress operate, alloc_by_guard) can reference them by name instead of raw on-chain addresses. All three are optional but strongly RECOMMENDED.",
|
|
51
|
-
"buy.items[].wip_hash is a dispute-prevention mechanism: the on-chain contract compares it against the Service's current sale.wip_hash to ensure the product WIP file was not swapped between browse time and purchase time. Capture it from the Service query result right before ordering. Empty string \"\" only verifies WIP file integrity without comparing to a specific hash — NOT recommended for real purchases.",
|
|
52
|
-
"total_pay.balance is denominated in the SMALLEST unit of the Service's type_parameter token — WOW has 9 decimals, so 50000000 = 0.05 WOW. Alternative format: {coin: '<coin_object_id_or_name>'} to pay with a specific Coin object.",
|
|
53
|
-
"'object' is a STRING here (reference to an existing, published Service), not the object-creation form. order_new is an optional field of the service call, alongside sales / order_allocators / buy_guard / etc.",
|
|
54
|
-
"env.account is the customer and is CRITICAL here: the signer pays total_pay and becomes the Order owner. Adapted from the doc's mainnet env to testnet + no_cache per example conventions."
|
|
55
|
-
]
|
|
56
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Advance Order Progress via Forward (MyShop Retail)",
|
|
3
|
-
"description": "Merchant advances an order's Progress from the empty initial node to the 'Order Confirmation' node using the 'Confirm Order' forward — the canonical progress operate shape",
|
|
4
|
-
"tags": ["progress", "operate", "forward", "retail", "workflow"],
|
|
5
|
-
"industry": "retail",
|
|
6
|
-
"operation_type": "progress",
|
|
7
|
-
"source": "MyShop verified deployment walkthrough (docs/examples/MyShop) — adapted to current schema",
|
|
8
|
-
"verified": true,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "progress",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": "myshop_test_progress",
|
|
15
|
-
"operate": {
|
|
16
|
-
"operation": {
|
|
17
|
-
"next_node_name": "Order Confirmation",
|
|
18
|
-
"forward": "Confirm Order"
|
|
19
|
-
},
|
|
20
|
-
"op": "next",
|
|
21
|
-
"message": "Order confirmed by merchant"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"env": {
|
|
25
|
-
"account": "myshop_merchant",
|
|
26
|
-
"network": "testnet",
|
|
27
|
-
"no_cache": true,
|
|
28
|
-
"confirmed": true
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"notes": [
|
|
32
|
-
"Orders are created sitting at the EMPTY initial node \"\" — the first operate call transitions from \"\" to the first real workflow node, so next_node_name names the TARGET node, not the current one.",
|
|
33
|
-
"next_node_name + forward must TOGETHER match a Pair (prior_node → next_node) defined in the Service's published Machine, with 'forward' naming the specific forward on that pair. A mismatched node or forward name fails on-chain; the launcher's permission/guard for that forward is also enforced by the Machine.",
|
|
34
|
-
"SCHEMA ADAPTATION (schema wins): the walkthrough used the legacy form {hold: false}; the current canonical schema uses the op enum — hold:false maps to op:'next' (the MCP layer still auto-migrates hold:boolean via preprocess, but new code should use op directly). op semantics: 'next' = advance/accomplish the forward; 'hold' = set hold to BLOCK the forward; 'unhold' = self-release your own hold (no 224 permission needed); 'adminUnhold' = force-release a hold via permission 224 (PROGRESS_UNHOLD).",
|
|
35
|
-
"This is the canonical progress operate shape: {object, operate: {operation: {next_node_name, forward}, op, message?}} — 'object' is the Progress object name/address (here the namedNewProgress name from order creation).",
|
|
36
|
-
"env.account is the merchant and is CRITICAL here: launching the 'Confirm Order' forward requires the merchant-side permission configured on the Machine node. Adapted from the doc's mainnet env to testnet + no_cache per example conventions."
|
|
37
|
-
]
|
|
38
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Reward Pool Object (MyShop Retail)",
|
|
3
|
-
"description": "Create an empty Reward object for MyShop service-quality rewards and compensation. The Reward is later referenced by claim Guards that prevent double-claiming, and funded via coin_add.",
|
|
4
|
-
"tags": ["reward", "claim", "retail"],
|
|
5
|
-
"industry": "retail",
|
|
6
|
-
"operation_type": "reward",
|
|
7
|
-
"source": "MyShop verified deployment walkthrough (docs/examples/MyShop_Advanced) — adapted to current schema",
|
|
8
|
-
"verified": true,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "reward",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": {
|
|
15
|
-
"name": "myshop_reward_v2",
|
|
16
|
-
"type_parameter": "0x2::wow::WOW",
|
|
17
|
-
"permission": "myshop_perm_v2",
|
|
18
|
-
"replaceExistName": true
|
|
19
|
-
},
|
|
20
|
-
"description": "MyShop reward pool for wonderful service and compensation"
|
|
21
|
-
},
|
|
22
|
-
"env": {
|
|
23
|
-
"network": "testnet",
|
|
24
|
-
"no_cache": true,
|
|
25
|
-
"confirmed": true
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"notes": [
|
|
29
|
-
"Create the Reward EMPTY first (no coin_add, no guard_add): claim Guards are then built to reference this Reward object and use the query_reward_record_exists query instruction for double-claim protection — the Reward object must exist before the Guards that query it can be created.",
|
|
30
|
-
"Reward MAY share the Service's Permission (here myshop_perm_v2) for unified governance — service.move reward_add_imp has NO permission-conflict check. This is the opposite of Arbitration, which MUST use an independent Permission (E_ARBITRATION_PERMISSION_CONFLICT).",
|
|
31
|
-
"Adaptation: the doc omitted type_parameter — schema-valid because TokenTypeWithDefaultSchema defaults to '0x2::wow::WOW'; shown explicitly here for clarity.",
|
|
32
|
-
"Fund the pool later with coin_add; claimants trigger distribution by passing their claim Guard address in the 'claim' field. guard_add registers which Guards may claim from this Reward.",
|
|
33
|
-
"name/permission live INSIDE 'object' (TypeNamedObjectWithPermissionSchema). replaceExistName:true force-rebinds the local name if already taken — use deliberately."
|
|
34
|
-
]
|
|
35
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Retail Service DRAFT (MyShop E-Commerce)",
|
|
3
|
-
"description": "Step 3 of the 12-step deploy plan: create the MyShop retail Service object in DRAFT (unpublished) with only its identity — name, permission, payment token type, description, and location. Machine binding, sales (WIP), order_allocators, Contact (um), and publish are each separate later steps and are intentionally NOT bundled here.",
|
|
4
|
-
"tags": ["service", "retail", "ecommerce", "draft", "create", "12-step"],
|
|
5
|
-
"industry": "retail",
|
|
6
|
-
"operation_type": "service",
|
|
7
|
-
"source": "myshop deployment walkthrough (docs/examples/MyShop) — adapted to the 12-step plan + testnet (DRAFT only, schema-validated, not chain-verified)",
|
|
8
|
-
"verified": false,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "service",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": {
|
|
15
|
-
"name": "myshop_service_v2",
|
|
16
|
-
"type_parameter": "0x2::wow::WOW",
|
|
17
|
-
"permission": "myshop_permission_v2",
|
|
18
|
-
"tags": ["ecommerce", "toys", "store"],
|
|
19
|
-
"onChain": false,
|
|
20
|
-
"replaceExistName": true
|
|
21
|
-
},
|
|
22
|
-
"description": "MyShop - Top quality toys for children",
|
|
23
|
-
"location": "Online Store"
|
|
24
|
-
},
|
|
25
|
-
"env": {
|
|
26
|
-
"account": "myshop_merchant",
|
|
27
|
-
"network": "testnet",
|
|
28
|
-
"no_cache": true
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"notes": [
|
|
32
|
-
"12-STEP PLAN alignment: this file is ONE step (Step 3 Service DRAFT). The full order is Account → Permission → Service DRAFT → Machine → Guard → Machine publish → Sales(WIP) → Treasury(optional) → order_allocators → Contact(um) → Arbitration → Service publish. Do NOT bundle machine/sales/order_allocators/um/publish into the create call.",
|
|
33
|
-
"object uses the OBJECT form of TypeNamedObjectWithPermissionSchema: name/permission/type_parameter go INSIDE object; description and location are top-level Service fields. No publish:true here — the Service stays unpublished until Step 12.",
|
|
34
|
-
"Physical-goods services SHOULD declare customer_required (e.g. name/phone/shipping_address) so the buyer's delivery info is captured. Per the SDK-enforced HARD LINKAGE, customer_required must be set TOGETHER with a Contact bound as um (the private info is delivered only through the Contact's end-to-end encrypted Messenger). Therefore customer_required is NOT set in this DRAFT — it is set together with um in the Contact step (see retail-myshop-contact-create.json, then bind um + customer_required in one update).",
|
|
35
|
-
"permission references the pre-created myshop_permission_v2 (Step 2); type_parameter '0x2::wow::WOW' sets the payment token (WOW, 9 decimals). onChain:false keeps the local name private (not published on-chain).",
|
|
36
|
-
"machine, order_allocators, and arbitrations become immutable after publish — set them in their own pre-publish steps, not here."
|
|
37
|
-
]
|
|
38
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Bind Contact (um) + customer_required Together (MyShop Retail)",
|
|
3
|
-
"description": "Contact step (12-step plan): set the Service's customer_required labels and bind its Contact (um) in ONE operation. The SDK enforces the HARD LINKAGE — customer_required without um is rejected, because the buyer's private information (name/phone/shipping_address) is delivered only through the Contact's end-to-end encrypted Messenger.",
|
|
4
|
-
"tags": ["service", "customer_required", "um", "contact", "messenger", "retail", "hard-linkage", "12-step"],
|
|
5
|
-
"industry": "retail",
|
|
6
|
-
"operation_type": "service",
|
|
7
|
-
"source": "adapted to the 12-step plan + SDK customer_required⟶um hard linkage (schema-validated, not chain-verified)",
|
|
8
|
-
"verified": false,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "service",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": "myshop_service_v2",
|
|
15
|
-
"customer_required": ["name", "phone", "shipping_address"],
|
|
16
|
-
"um": "myshop_aftersales_contact_v2"
|
|
17
|
-
},
|
|
18
|
-
"env": {
|
|
19
|
-
"account": "myshop_merchant",
|
|
20
|
-
"network": "testnet",
|
|
21
|
-
"no_cache": true
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"notes": [
|
|
25
|
-
"HARD LINKAGE (SDK-enforced, service.ts checkCustomerRequiredNeedsUm): customer_required and um MUST be set together. The buyer's private info is delivered via end-to-end encrypted Messenger, which routes to the Contact bound as um — without um there is no channel and the SDK rejects the call with InvalidParam.",
|
|
26
|
-
"object is the STRING form (existing unpublished service); customer_required is an array of info labels (NotEmptyNameSchema); um is the Contact name/ID created in the Contact step (see retail-myshop-contact-create.json).",
|
|
27
|
-
"ORDER FLOW: after a customer places an order on this Service, they MUST send each customer_required field to this Contact's Messenger (messenger_operation → send_message) and obtain an explicit confirmation reply; the resulting Contact ID or WTS Proof can be recorded on the Order via OrderNewSchema.order_required_info.",
|
|
28
|
-
"customer_required and um remain MUTABLE after publish (L3 in the immutability matrix), but for physical goods set them BEFORE publish so customers get the right flow from day one.",
|
|
29
|
-
"The referenced Contact (myshop_aftersales_contact_v2) must exist and have an ims[] entry pointing at the merchant's Messenger account (account name, not messenger name)."
|
|
30
|
-
]
|
|
31
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Issue Discount Coupons to Customers (Service)",
|
|
3
|
-
"description": "Issue 100 transferable=false 10%-off RATES discount coupons named summer_2026_10pct for myshop_service_v2, targeted at a specific customer, valid until end of 2026.",
|
|
4
|
-
"tags": ["service", "discount", "coupon", "marketing", "retail"],
|
|
5
|
-
"industry": "retail",
|
|
6
|
-
"operation_type": "service",
|
|
7
|
-
"source": "constructed under T-09 authorization; grounded in DiscountSchema + DiscountTypeSchema + service.ts SDK — schema-validated, not chain-verified",
|
|
8
|
-
"verified": false,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "service",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": "myshop_service_v2",
|
|
15
|
-
"discount": {
|
|
16
|
-
"name": "summer_2026_10pct",
|
|
17
|
-
"discount_type": "RATES",
|
|
18
|
-
"discount_value": 1000,
|
|
19
|
-
"benchmark": 100000000,
|
|
20
|
-
"time_ms_start": 1782864000000,
|
|
21
|
-
"time_ms_end": 1798761599000,
|
|
22
|
-
"count": 100,
|
|
23
|
-
"recipient": {
|
|
24
|
-
"entities": [
|
|
25
|
-
{ "name_or_address": "alice" }
|
|
26
|
-
],
|
|
27
|
-
"check_all_founded": false
|
|
28
|
-
},
|
|
29
|
-
"transferable": false
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"env": {
|
|
33
|
-
"network": "testnet",
|
|
34
|
-
"no_cache": true,
|
|
35
|
-
"confirmed": true
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"notes": [
|
|
39
|
-
"discount_type 'RATES' means discount_value is a RATIO in ten-thousandths: 1000 = 1000/10000 = 10% off. 'FIXED' (numeric 1) means discount_value is a fixed deduction in the token's smallest unit. String form ('RATES'/'FIXED') is recommended over numeric 0/1.",
|
|
40
|
-
"benchmark (optional): the discount only applies when the order amount EXCEEDS this value (smallest unit; 100000000 = 0.1 WOW). Omit for unconditional discounts.",
|
|
41
|
-
"time_ms_start/time_ms_end are Unix MILLISECONDS (not seconds). time_ms_end is REQUIRED; time_ms_start optional (starts immediately if omitted). 1782864000000 = 2026-07-01T00:00:00Z, 1798761599000 = 2026-12-31T15:59:59Z.",
|
|
42
|
-
"count = total usage count across all issued coupon objects; recipient.entities lists the receiving accounts (object form {name_or_address}); check_all_founded:false tolerates unresolved names instead of aborting.",
|
|
43
|
-
"transferable:false locks the coupon to the recipient (cannot be sold/gifted). Each issued coupon is a separate on-chain Discount object owned by the recipient; customers attach it at order time via order_new buy.discount (discount object ID or name).",
|
|
44
|
-
"Cleanup: issued discounts can be destroyed later via discount_destroy: ['<discount_object_id_or_name>']. Issuing discounts is an L3 operation on a live Service — no pause required."
|
|
45
|
-
]
|
|
46
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Subscription Contact Object",
|
|
3
|
-
"description": "Create a named Contact object for a subscription service, with a Permission reference and an IM entry pointing at the support account",
|
|
4
|
-
"tags": ["contact", "messenger", "ims", "subscription"],
|
|
5
|
-
"industry": "subscription",
|
|
6
|
-
"operation_type": "contact",
|
|
7
|
-
"source": "Template-generated from K2 industry defaults (not chain-verified)",
|
|
8
|
-
"verified": false,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "contact",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": {
|
|
15
|
-
"name": "subscription_contact",
|
|
16
|
-
"permission": "subscription_permission",
|
|
17
|
-
"replaceExistName": true
|
|
18
|
-
},
|
|
19
|
-
"description": "Subscription support contact — manage your plan, pause, or cancel anytime",
|
|
20
|
-
"ims": {
|
|
21
|
-
"op": "add",
|
|
22
|
-
"im": [
|
|
23
|
-
{
|
|
24
|
-
"at": "subscription_support",
|
|
25
|
-
"description": "Primary support account"
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"env": {
|
|
31
|
-
"network": "testnet",
|
|
32
|
-
"no_cache": true,
|
|
33
|
-
"confirmed": true
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"notes": [
|
|
37
|
-
"Bind this Contact to the subscription Service via the service call's 'um' field.",
|
|
38
|
-
"Subscription billing should use charge_guard_signer (explicit user signature per period)."
|
|
39
|
-
]
|
|
40
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Signer-Identity Buy Guard — Strict Single-Identity Binding (ThreeBody Signature)",
|
|
3
|
-
"description": "Guard that passes only when the transaction signer equals the fixed author address stored in the Guard table (logic_equal[context(Signer), identifier(0)]). Bound as Service buy_guard so only the author can purchase the signature service — Level 1 strict single-identity binding.",
|
|
4
|
-
"tags": ["guard", "buy_guard", "signer-identity", "signature", "allowlist"],
|
|
5
|
-
"industry": "general",
|
|
6
|
-
"operation_type": "guard",
|
|
7
|
-
"source": "docs/examples/ThreeBody_Signature — schema-validated, not chain-verified",
|
|
8
|
-
"verified": false,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "guard",
|
|
13
|
-
"data": {
|
|
14
|
-
"namedNew": {
|
|
15
|
-
"name": "threebody_buy_guard",
|
|
16
|
-
"tags": ["signature", "buy-guard", "level1-strict"],
|
|
17
|
-
"replaceExistName": true
|
|
18
|
-
},
|
|
19
|
-
"description": "Verify buyer is the service author (signer_author). Only the author can purchase this signature service. LEVEL 1 strict single-identity binding: the author role is permanently tied to one address; if the address is lost/rotated, rebuild the Guard and re-bind Service.buy_guard.",
|
|
20
|
-
"table": [
|
|
21
|
-
{
|
|
22
|
-
"identifier": 0,
|
|
23
|
-
"b_submission": false,
|
|
24
|
-
"value_type": "Address",
|
|
25
|
-
"value": "signer_author",
|
|
26
|
-
"name": "Author address"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"root": {
|
|
30
|
-
"type": "logic_equal",
|
|
31
|
-
"nodes": [
|
|
32
|
-
{
|
|
33
|
-
"type": "context",
|
|
34
|
-
"context": "Signer"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"type": "identifier",
|
|
38
|
-
"identifier": 0
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"env": {
|
|
44
|
-
"account": "signer_author",
|
|
45
|
-
"network": "testnet",
|
|
46
|
-
"confirmed": true
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"notes": [
|
|
50
|
-
"Verified against CallGuard_DataSchema (schema/call/guard.ts): namedNew/description/table/root are the strict top-level fields; table items match GuardTableItemBaseSchema strict shape {identifier, b_submission, value_type, value, name} (common/index.ts) — value_type 'Address' string form accepted by ValueTypeUserSchema.",
|
|
51
|
-
"Root must return Bool: logic_equal is in the allowed root list (CallGuard_RootSchema refine). context node uses enum ['Signer'|'Clock'|'Guard'] (GuardNodeSchema, query/index.ts); identifier node references table identifier 0.",
|
|
52
|
-
"The Address table value uses a LOCAL-MARK account name ('signer_author'), resolved to an address at transaction build time — this also breaks the Guard<->Service circular dependency (bind by name, publish later).",
|
|
53
|
-
"Guard is IMMUTABLE once created: the whitelist cannot be tampered with, but a lost/rotated author address requires building a new Guard and re-binding buy_guard (documented lock-in trade-off, R-C4-04).",
|
|
54
|
-
"DESENSITIZED: doc account 'three_body_author' -> 'signer_author'; guard renamed to local mark 'threebody_buy_guard'."
|
|
55
|
-
]
|
|
56
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Signature-Approval Machine DRAFT (ThreeBody Signature)",
|
|
3
|
-
"description": "Step 4 of the 12-step deploy plan: create the two-node signing workflow 'Book Delivered -> Signature Completed' in DRAFT (unpublished). Each forward is gated by its own permissionIndex (1000/1001), so only accounts granted that index in the Permission object can advance that stage. Publish is a separate later step (machine-publish.json) — do NOT bundle publish here.",
|
|
4
|
-
"tags": ["machine", "multisig", "signature", "approval-gate", "permissionIndex", "draft", "12-step"],
|
|
5
|
-
"industry": "general",
|
|
6
|
-
"operation_type": "machine",
|
|
7
|
-
"source": "docs/examples/ThreeBody_Signature — adapted to the 12-step plan (DRAFT only, schema-validated, not chain-verified)",
|
|
8
|
-
"verified": false,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "machine",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": {
|
|
15
|
-
"name": "threebody_machine",
|
|
16
|
-
"permission": "threebody_permission",
|
|
17
|
-
"replaceExistName": true
|
|
18
|
-
},
|
|
19
|
-
"description": "Signature service workflow: Book Delivered -> Signature Completed",
|
|
20
|
-
"node": {
|
|
21
|
-
"op": "add",
|
|
22
|
-
"nodes": [
|
|
23
|
-
{
|
|
24
|
-
"name": "Book Delivered",
|
|
25
|
-
"pairs": [
|
|
26
|
-
{
|
|
27
|
-
"prev_node": "",
|
|
28
|
-
"threshold": 0,
|
|
29
|
-
"forwards": [
|
|
30
|
-
{
|
|
31
|
-
"name": "Confirm Delivery",
|
|
32
|
-
"permissionIndex": 1000,
|
|
33
|
-
"weight": 1
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"name": "Signature Completed",
|
|
41
|
-
"pairs": [
|
|
42
|
-
{
|
|
43
|
-
"prev_node": "Book Delivered",
|
|
44
|
-
"threshold": 1,
|
|
45
|
-
"forwards": [
|
|
46
|
-
{
|
|
47
|
-
"name": "Complete Signature",
|
|
48
|
-
"permissionIndex": 1001,
|
|
49
|
-
"weight": 1
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"env": {
|
|
59
|
-
"account": "signer_author",
|
|
60
|
-
"network": "testnet"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"notes": [
|
|
64
|
-
"12-STEP PLAN alignment: this is ONE step (Step 4 Machine DRAFT). Do NOT bundle publish:true here — publish is Step 6 (see machine-publish.json). The 12-step order is Service DRAFT → Machine (nodes/forwards) → Guard → bind Guards → Machine publish.",
|
|
65
|
-
"Shapes verified against MachineNodeSchema / MachineNodePairSchema / MachineForwardSchema (schema/query/index.ts) + CallMachine_DataSchema (schema/call/machine.ts). Forwards use camelCase permissionIndex (namedOperator is the alternative); the schema-level one-of refine requires namedOperator OR permissionIndex on every forward.",
|
|
66
|
-
"Entry-forward invariant satisfied: pair with prev_node='' has >=1 forward (FIX-002). The FIX-02 publish-time entry-forward refine will also pass when this DRAFT is later published — 'Confirm Delivery' covers both.",
|
|
67
|
-
"Threshold semantics: pair 1 threshold 0 is exempt (single-forward pair — one signature advances). Pair 2 threshold 1 equals the summed weight of its single forward. MULTI-SIG EXTENSION: add more forwards {permissionIndex or namedOperator, weight} to the pair and set threshold > 1 — the node only advances once accumulated signature weight >= threshold (e.g. 2-of-3 approvers).",
|
|
68
|
-
"This is a DRAFT (no publish:true). Once published, nodes/pairs/forwards become irreversibly locked and env.confirmed:true is required at publish time.",
|
|
69
|
-
"DESENSITIZED: doc account 'three_body_author' -> 'signer_author'; objects renamed to local marks 'threebody_machine' / 'threebody_permission'."
|
|
70
|
-
]
|
|
71
|
-
}
|