@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,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Generate Passport from Guard Verification (KYC Credential)",
|
|
3
|
-
"description": "End-to-end gen_passport: verify a KYC-level Guard with runtime submission data and mint an immutable on-chain Passport credential for the signer.",
|
|
4
|
-
"tags": ["passport", "guard", "kyc", "credential", "gen_passport"],
|
|
5
|
-
"industry": "general",
|
|
6
|
-
"operation_type": "gen_passport",
|
|
7
|
-
"source": "constructed under T-09 authorization; grounded in CallGenPassport_InputSchema + SDK gen_passport — schema-validated, not chain-verified",
|
|
8
|
-
"verified": false,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "gen_passport",
|
|
13
|
-
"guard": ["kyc_level_guard"],
|
|
14
|
-
"info": {
|
|
15
|
-
"type": "submission",
|
|
16
|
-
"guard": [
|
|
17
|
-
{ "object": "kyc_level_guard", "impack": true }
|
|
18
|
-
],
|
|
19
|
-
"submission": [
|
|
20
|
-
{
|
|
21
|
-
"guard": "kyc_level_guard",
|
|
22
|
-
"submission": [
|
|
23
|
-
{
|
|
24
|
-
"identifier": 0,
|
|
25
|
-
"b_submission": true,
|
|
26
|
-
"value_type": "U64",
|
|
27
|
-
"value": 1000,
|
|
28
|
-
"name": ""
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"env": {
|
|
35
|
-
"network": "testnet",
|
|
36
|
-
"no_cache": true,
|
|
37
|
-
"confirmed": true
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"notes": [
|
|
41
|
-
"UNIQUE SHAPE: gen_passport has NO 'data' field — 'guard' is a TOP-LEVEL sibling of operation_type (string or string[] of Guard names/addresses). Do not wrap parameters inside a data object.",
|
|
42
|
-
"info is optional. When omitted, the SDK reuses submissions already recorded on the Guard (from a prior verification). Provide info when the Guard has b_submission=true table items whose values must be supplied at verification time — as here (identifier 0, a U64 KYC score).",
|
|
43
|
-
"info structure = SubmissionCallSchema: {type:'submission', guard:[{object, impack}], submission:[{guard, submission:[GuardTableItem...]}]}. impack:true means this Guard's result counts in the Passport's final AND result.",
|
|
44
|
-
"Each submission entry mirrors the Guard's table definition: identifier must match the table item being filled, value_type must match its declared type ('U64' string form accepted alongside numeric 6), and b_submission entries carry the runtime value.",
|
|
45
|
-
"The resulting Passport object records per-Guard results, the final AND result, signer, and timestamp (ObjectPassportSchema). It is the credential consumed by vote_with_voting_guard, alloc_by_guard, and buy flows that require Guard verification.",
|
|
46
|
-
"PREREQUISITE: 'kyc_level_guard' must already exist (created via operation_type:'guard') with a table item identifier:0, value_type U64, b_submission:true. Multiple Guards can be verified in one call by passing an array and one submission entry per Guard."
|
|
47
|
-
]
|
|
48
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Guard Template: Minimum Order Amount Validation",
|
|
3
|
-
"description": "Guard that passes only when the Order's paid amount meets a minimum threshold. Bind to an Allocator (fund release) or a Machine forward to gate high-value transitions.",
|
|
4
|
-
"tags": ["guard", "template", "balance", "amount", "validation"],
|
|
5
|
-
"industry": "general",
|
|
6
|
-
"operation_type": "guard",
|
|
7
|
-
"source": "template",
|
|
8
|
-
"verified": true,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "guard",
|
|
13
|
-
"data": {
|
|
14
|
-
"namedNew": {
|
|
15
|
-
"name": "balance_check_guard"
|
|
16
|
-
},
|
|
17
|
-
"description": "Passes when order.amount >= min_amount (table identifier 1).",
|
|
18
|
-
"table": [
|
|
19
|
-
{
|
|
20
|
-
"identifier": 0,
|
|
21
|
-
"b_submission": true,
|
|
22
|
-
"value_type": "Address",
|
|
23
|
-
"name": "order"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"identifier": 1,
|
|
27
|
-
"b_submission": false,
|
|
28
|
-
"value_type": "U64",
|
|
29
|
-
"value": "1000000000",
|
|
30
|
-
"name": "min_amount"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"root": {
|
|
34
|
-
"type": "logic_as_u256_greater_or_equal",
|
|
35
|
-
"nodes": [
|
|
36
|
-
{
|
|
37
|
-
"type": "query",
|
|
38
|
-
"query": "order.amount",
|
|
39
|
-
"object": { "identifier": 0 }
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "identifier",
|
|
43
|
-
"identifier": 1
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"env": {
|
|
49
|
-
"network": "testnet"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"notes": [
|
|
53
|
-
"order.amount (id 1561) returns the TOTAL amount paid for the order (U64, smallest unit). Do NOT confuse with the order's residual escrow balance.",
|
|
54
|
-
"Root MUST return Bool — logic_as_u256_greater_or_equal compares the first node (query result) against all subsequent nodes (threshold from the table).",
|
|
55
|
-
"The threshold (identifier 1) is fixed at Guard creation (b_submission=false); the Order address is submitted per trigger (identifier 0, b_submission=true).",
|
|
56
|
-
"Amounts use the token's smallest unit: 1000000000 = 1 WOW (9 decimals).",
|
|
57
|
-
"Use for minimum payment validation, deposit threshold checks, or gating Allocator release on order value."
|
|
58
|
-
]
|
|
59
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Guard Template: Time-Lock Validation",
|
|
3
|
-
"description": "Guard that passes only after the Progress object's current-node entry timestamp reaches a deadline (e.g., rental period elapsed, escrow release timing). Bind to a Machine forward or an Allocator to gate time-locked transitions.",
|
|
4
|
-
"tags": ["guard", "template", "time-lock", "validation"],
|
|
5
|
-
"industry": "general",
|
|
6
|
-
"operation_type": "guard",
|
|
7
|
-
"source": "template",
|
|
8
|
-
"verified": true,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "guard",
|
|
13
|
-
"data": {
|
|
14
|
-
"namedNew": {
|
|
15
|
-
"name": "time_lock_guard",
|
|
16
|
-
"tags": ["template", "time-lock"]
|
|
17
|
-
},
|
|
18
|
-
"description": "Passes when progress.current_time >= release_after_ms (table identifier 1).",
|
|
19
|
-
"table": [
|
|
20
|
-
{
|
|
21
|
-
"identifier": 0,
|
|
22
|
-
"b_submission": true,
|
|
23
|
-
"value_type": "Address",
|
|
24
|
-
"name": "progress"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"identifier": 1,
|
|
28
|
-
"b_submission": false,
|
|
29
|
-
"value_type": "U64",
|
|
30
|
-
"value": "1735689600000",
|
|
31
|
-
"name": "release_after_ms"
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"root": {
|
|
35
|
-
"type": "logic_as_u256_greater_or_equal",
|
|
36
|
-
"nodes": [
|
|
37
|
-
{
|
|
38
|
-
"type": "query",
|
|
39
|
-
"query": "progress.current_time",
|
|
40
|
-
"object": { "identifier": 0 }
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"type": "identifier",
|
|
44
|
-
"identifier": 1
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"env": {
|
|
50
|
-
"network": "testnet"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"notes": [
|
|
54
|
-
"Root MUST return Bool: comparison/logic nodes (logic_*, logic_as_u256_*) qualify; a bare query returning U64 does NOT.",
|
|
55
|
-
"Comparison nodes carry a 'nodes' array (first node compared against all subsequent). Query nodes carry 'query' (instruction id or name) + 'object' (Guard-table identifier of the queried object). Identifier nodes carry 'identifier' (Guard-table index).",
|
|
56
|
-
"progress.current_time (id 1272) returns the current-node entry timestamp in milliseconds (U64) — compare against a deadline stored in the table (identifier 1, b_submission=false so it is fixed at creation).",
|
|
57
|
-
"The Progress address is submitted at trigger time (identifier 0, b_submission=true) — the caller supplies it via submissions[].",
|
|
58
|
-
"Use for rental period expiry, escrow release timing, etc."
|
|
59
|
-
]
|
|
60
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Time-Lock Claim Completion Guard (Insurance)",
|
|
3
|
-
"description": "Create a Guard that enforces a time-lock on insurance claim completion: the on-chain clock must be later than the order Progress's current-node entry time plus a lock duration. The submitted Order ID is converted to its Progress via convert_witness=\"OrderProgress\" to query progress.current_time.",
|
|
4
|
-
"tags": ["guard", "insurance", "time-lock", "claim", "convert_witness"],
|
|
5
|
-
"industry": "insurance",
|
|
6
|
-
"operation_type": "guard",
|
|
7
|
-
"source": "docs/examples/Insurance — 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": "insurance_complete_guard_v1",
|
|
16
|
-
"tags": ["insurance", "time-lock", "complete"],
|
|
17
|
-
"replaceExistName": true
|
|
18
|
-
},
|
|
19
|
-
"description": "Time-lock guard for insurance claim completion. Requires current clock > progress.current_time + 10000ms (10 seconds for TESTING; in production set to a reasonable duration like 8 hours). Progress is accessed via Order with convert_witness=\"OrderProgress\" (100).",
|
|
20
|
-
"table": [
|
|
21
|
-
{
|
|
22
|
-
"identifier": 0,
|
|
23
|
-
"b_submission": true,
|
|
24
|
-
"value_type": "Address",
|
|
25
|
-
"name": "Order ID (submitted at runtime)"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"identifier": 1,
|
|
29
|
-
"b_submission": false,
|
|
30
|
-
"value_type": "U64",
|
|
31
|
-
"value": 10000
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"root": {
|
|
35
|
-
"type": "logic_as_u256_greater",
|
|
36
|
-
"nodes": [
|
|
37
|
-
{
|
|
38
|
-
"type": "context",
|
|
39
|
-
"context": "Clock"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "calc_number_add",
|
|
43
|
-
"nodes": [
|
|
44
|
-
{
|
|
45
|
-
"type": "query",
|
|
46
|
-
"query": "progress.current_time",
|
|
47
|
-
"object": {
|
|
48
|
-
"identifier": 0,
|
|
49
|
-
"convert_witness": "OrderProgress"
|
|
50
|
-
},
|
|
51
|
-
"parameters": []
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"type": "identifier",
|
|
55
|
-
"identifier": 1
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"env": {
|
|
63
|
-
"account": "insurance_provider_v1",
|
|
64
|
-
"network": "testnet"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"notes": [
|
|
68
|
-
"Unique pattern vs the existing guard-template-time-lock.json: that template queries progress.current_time on a Progress submitted DIRECTLY; this insurance Guard submits the ORDER and uses convert_witness='OrderProgress' (WitnessType 100) to hop from Order to its associated Progress before querying — the canonical claim-eligibility pattern when only the Order ID is available at trigger time.",
|
|
69
|
-
"Schema check (call/guard.ts CallGuard_DataSchema + query/index.ts GuardNodeSchema): root type 'logic_as_u256_greater' is in the Bool-returning allowed list; 'context' node uses context enum 'Clock'; 'calc_number_add' wraps the U64 query + identifier so the comparison operands are numeric; query node carries object {identifier, convert_witness} and optional parameters [] (may be omitted for parameter-less queries).",
|
|
70
|
-
"convert_witness 'OrderProgress' validated against WitnessTypeSchema (query/index.ts L736-746): string name form, 'Type' prefix optional, case-insensitive.",
|
|
71
|
-
"Table validated against GuardTableItemBaseSchema (common/index.ts L365-399): identifier 0 is b_submission=true (runtime-submitted Order address, 'value' omitted); identifier 1 is b_submission=false with value_type 'U64' and numeric value 10000. No 'object_type' field (output-only, rejected on input).",
|
|
72
|
-
"10000 ms (10 s) is a TESTING lock duration; production should use e.g. 8 hours (28800000 ms).",
|
|
73
|
-
"Desensitization: doc payload already uses generic local-mark names (insurance_provider_v1, insurance_complete_guard_v1) and contains no real personal names/phones/addresses; nothing further to replace."
|
|
74
|
-
]
|
|
75
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Withdraw Guard for Order Allocation (Insurance, Project-Bound)",
|
|
3
|
-
"description": "Create a withdraw Guard for merchant fund collection after an insurance order completes. The Guard requires the submitted Order to be at the 'Complete' node (via convert_witness OrderProgress) AND to belong to this specific Service (project binding, preventing cross-service order theft). Bind it to a Service order_allocators entry.",
|
|
4
|
-
"tags": ["guard", "insurance", "withdraw", "allocation", "project-binding"],
|
|
5
|
-
"industry": "insurance",
|
|
6
|
-
"operation_type": "guard",
|
|
7
|
-
"source": "docs/examples/Insurance — 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": "insurance_withdraw_guard_treasury_v1",
|
|
16
|
-
"tags": ["insurance", "withdraw", "treasury"],
|
|
17
|
-
"replaceExistName": true
|
|
18
|
-
},
|
|
19
|
-
"description": "Allow fund allocation to Treasury after order is completed. RISK ELIMINATION: order must be at Complete node AND belong to insurance_service_v1 (prevents cross-service theft). Funds flow to fixed Treasury Entity (safe — no Signer binding needed).",
|
|
20
|
-
"table": [
|
|
21
|
-
{
|
|
22
|
-
"identifier": 0,
|
|
23
|
-
"b_submission": true,
|
|
24
|
-
"value_type": "Address",
|
|
25
|
-
"name": "order_id (Order object submitted at runtime)"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"identifier": 1,
|
|
29
|
-
"b_submission": false,
|
|
30
|
-
"value_type": "String",
|
|
31
|
-
"value": "Complete",
|
|
32
|
-
"name": "Expected Complete node name (case-sensitive)"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"identifier": 2,
|
|
36
|
-
"b_submission": false,
|
|
37
|
-
"value_type": "Address",
|
|
38
|
-
"value": "insurance_service_v1",
|
|
39
|
-
"name": "Expected service address (prevents cross-service fund theft)"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"root": {
|
|
43
|
-
"type": "logic_and",
|
|
44
|
-
"nodes": [
|
|
45
|
-
{
|
|
46
|
-
"type": "logic_equal",
|
|
47
|
-
"nodes": [
|
|
48
|
-
{
|
|
49
|
-
"type": "query",
|
|
50
|
-
"query": "progress.current",
|
|
51
|
-
"object": {
|
|
52
|
-
"identifier": 0,
|
|
53
|
-
"convert_witness": "OrderProgress"
|
|
54
|
-
},
|
|
55
|
-
"parameters": []
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"type": "identifier",
|
|
59
|
-
"identifier": 1
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"type": "logic_equal",
|
|
65
|
-
"nodes": [
|
|
66
|
-
{
|
|
67
|
-
"type": "query",
|
|
68
|
-
"query": "order.service",
|
|
69
|
-
"object": {
|
|
70
|
-
"identifier": 0
|
|
71
|
-
},
|
|
72
|
-
"parameters": []
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"type": "identifier",
|
|
76
|
-
"identifier": 2
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"env": {
|
|
84
|
-
"account": "insurance_provider_v1",
|
|
85
|
-
"network": "testnet"
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
"notes": [
|
|
89
|
-
"Withdraw-guard pattern the library previously lacked: logic_and of (1) workflow-state check — progress.current == 'Complete' via Order + convert_witness='OrderProgress' — and (2) project binding — order.service == insurance_service_v1 — so a completed Order from ANOTHER Service cannot be submitted to trigger this Service's allocation.",
|
|
90
|
-
"CIRCULAR-REFERENCE WORKFLOW (DOC-01): the Guard's static table stores the Service as a LocalMark NAME ('insurance_service_v1', identifier 2, value_type Address). The name must resolve at transaction build time, so create the Service FIRST (unpublished), then this Guard, then update the Service with order_allocators + publish. GuardTableItemBaseSchema explicitly allows a LocalMark name as an Address value (resolved at evaluation/build time).",
|
|
91
|
-
"Schema check (call/guard.ts + query/index.ts GuardNodeSchema): root 'logic_and' has exactly 2 children (min 2 enforced); both children are Bool-returning 'logic_equal' nodes; query nodes use parameter-less queries progress.current / order.service with optional parameters [].",
|
|
92
|
-
"Doc creates TWO such Guards (treasury + personal collection) with identical logic but different names/descriptions, because allocators require unique Guard addresses. Only the Treasury variant is extracted here; to use the personal-collection approach, duplicate with namedNew.name 'insurance_withdraw_guard_personal_v1' and adjust tags/description.",
|
|
93
|
-
"The node name comparison is CASE-SENSITIVE ('Complete' != 'complete') — the table value must exactly match the Machine node name.",
|
|
94
|
-
"Desensitization: doc payload already uses generic local-mark names only (insurance_provider_v1, insurance_service_v1, insurance_withdraw_guard_treasury_v1); no real personal data present, nothing replaced."
|
|
95
|
-
]
|
|
96
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Insurance Claim Machine DRAFT (Start -> Complete)",
|
|
3
|
-
"description": "Step 4 of the 12-step deploy plan: create the two-node insurance claim workflow Machine in DRAFT (unpublished): entry forward 'start_claim' into Start (permissionIndex 1000), and 'complete_claim' from Start into Complete (permissionIndex 1001) gated by the time-lock Guard insurance_complete_guard_v1. Publish is a separate later step (machine-publish.json).",
|
|
4
|
-
"tags": ["machine", "insurance", "claim", "workflow", "draft", "12-step"],
|
|
5
|
-
"industry": "insurance",
|
|
6
|
-
"operation_type": "machine",
|
|
7
|
-
"source": "docs/examples/Insurance — 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": "insurance_machine_v1",
|
|
16
|
-
"permission": "insurance_permission_v1",
|
|
17
|
-
"replaceExistName": true
|
|
18
|
-
},
|
|
19
|
-
"description": "Insurance claim processing workflow: Start -> Complete (with time-lock guard)",
|
|
20
|
-
"node": {
|
|
21
|
-
"op": "add",
|
|
22
|
-
"nodes": [
|
|
23
|
-
{
|
|
24
|
-
"name": "Start",
|
|
25
|
-
"pairs": [
|
|
26
|
-
{
|
|
27
|
-
"prev_node": "",
|
|
28
|
-
"threshold": 0,
|
|
29
|
-
"forwards": [
|
|
30
|
-
{
|
|
31
|
-
"name": "start_claim",
|
|
32
|
-
"permissionIndex": 1000,
|
|
33
|
-
"weight": 1
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"name": "Complete",
|
|
41
|
-
"pairs": [
|
|
42
|
-
{
|
|
43
|
-
"prev_node": "Start",
|
|
44
|
-
"threshold": 1,
|
|
45
|
-
"forwards": [
|
|
46
|
-
{
|
|
47
|
-
"name": "complete_claim",
|
|
48
|
-
"permissionIndex": 1001,
|
|
49
|
-
"weight": 1,
|
|
50
|
-
"guard": {
|
|
51
|
-
"guard": "insurance_complete_guard_v1"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"env": {
|
|
62
|
-
"account": "insurance_provider_v1",
|
|
63
|
-
"network": "testnet"
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"notes": [
|
|
67
|
-
"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.",
|
|
68
|
-
"Insurance-claim Machine pattern: a minimal two-node Start -> Complete workflow where the completion forward is gated by a time-lock Guard. This creates the Machine in DRAFT (nodes remain editable until publish).",
|
|
69
|
-
"Schema check (call/machine.ts CallMachine_DataSchema): 'object' uses the OBJECT form of WithPermissionObjectSchema (NamedObjectWithPermissionSchema — name, permission, replaceExistName); node uses NodeSchema op='add' with nodes array; publish omitted → DRAFT. The FIX-02 entry-forward refine (applied at publish time) is satisfied because the Start pair has prev_node='' with at least one forward (FIX-002 also requires the initial pair to have a non-empty forwards list).",
|
|
70
|
-
"Forward check (query/index.ts MachineForwardSchema): every forward provides permissionIndex (1000/1001) satisfying the one-of namedOperator/permissionIndex rule; the Complete forward uses the OBJECT guard form {guard: 'insurance_complete_guard_v1'} (MachineForwardGuardSchema; a plain string shorthand is also accepted via preprocess).",
|
|
71
|
-
"The referenced Guard (insurance_complete_guard_v1) and Permission (insurance_permission_v1, with indexes 1000/1001 granted to the operator) must exist before publish — see the sibling insurance-guard-claim-timelock example and the Insurance doc Steps 1/3.",
|
|
72
|
-
"PREREQUISITE for advancing claims: the Permission must grant index 1000 (start_claim) and 1001 (complete_claim) to the operating account, otherwise progress advancement aborts with MoveAbort code 7.",
|
|
73
|
-
"Desensitization: doc payload already uses generic local-mark names only (insurance_provider_v1, insurance_machine_v1, insurance_permission_v1); no real personal data present, nothing replaced."
|
|
74
|
-
]
|
|
75
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Configure Order Allocators (Insurance, Entity-Sharing)",
|
|
3
|
-
"description": "Pre-publish Service configuration step (12-step plan: order_allocators). Update the unpublished insurance Service with two alternative order_allocators (Treasury collection and personal collection, first-match-wins) whose sharing recipients are FIXED Entity addresses — the fund-theft-safe pattern. Publish is a SEPARATE later step (Step 12) and is intentionally NOT bundled here.",
|
|
4
|
-
"tags": ["service", "insurance", "order_allocators", "entity-sharing", "12-step"],
|
|
5
|
-
"industry": "insurance",
|
|
6
|
-
"operation_type": "service",
|
|
7
|
-
"source": "docs/examples/Insurance — adapted to the 12-step plan (allocators 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": "insurance_service_v1",
|
|
15
|
-
"order_allocators": {
|
|
16
|
-
"description": "Insurance order revenue allocation — 2 alternative merchant collection approaches (first-match-wins means only the first passing allocator executes)",
|
|
17
|
-
"threshold": 0,
|
|
18
|
-
"allocators": [
|
|
19
|
-
{
|
|
20
|
-
"guard": "insurance_withdraw_guard_treasury_v1",
|
|
21
|
-
"sharing": [
|
|
22
|
-
{
|
|
23
|
-
"who": { "Entity": { "name_or_address": "insurance_treasury_v1" } },
|
|
24
|
-
"sharing": 10000,
|
|
25
|
-
"mode": "Rate"
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"guard": "insurance_withdraw_guard_personal_v1",
|
|
31
|
-
"sharing": [
|
|
32
|
-
{
|
|
33
|
-
"who": { "Entity": { "name_or_address": "insurance_provider_v1" } },
|
|
34
|
-
"sharing": 10000,
|
|
35
|
-
"mode": "Rate"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"env": {
|
|
43
|
-
"account": "insurance_provider_v1",
|
|
44
|
-
"network": "testnet"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"notes": [
|
|
48
|
-
"12-STEP PLAN alignment: this file is ONE step (Step 9 order_allocators). Do NOT bundle publish:true here — publish is Step 12. order_allocators is PERMANENTLY IMMUTABLE after publish (service.move E_ALREADY_PUBLISHED), so it MUST be set in this pre-publish step.",
|
|
49
|
-
"Fund-safety pattern: who = {Entity: {name_or_address: ...}} pins the recipient to a FIXED address (Treasury object or provider account) resolved via LocalMark at build time. Even if the withdraw Guard were bypassed, funds still flow to the fixed Entity — the caller cannot redirect them. NEVER use {Signer: 'signer'} for merchant collection.",
|
|
50
|
-
"first-match-wins: the TWO allocators illustrate 2 alternative collection designs (Treasury vs personal); only the FIRST allocator whose Guard passes executes. In production pick ONE and delete the other. Each allocator's Guard must be a UNIQUE Guard object.",
|
|
51
|
-
"Schema check (call/service.ts CallService_DataSchema + query/index.ts AllocatorsSchema/AllocatorSchema/AllocationSharingSchema/RecipientSchema): object is the STRING form (existing service); order_allocators = {description, threshold, allocators[]} with per-allocator {guard: NameOrAddress, sharing: [{who: {Entity: {name_or_address}}, sharing, mode}]}; mode 'Rate' with a single sharing of 10000 satisfies the Rate-sum == 10000 (basis points, 100%) rule with no Surplus item; threshold 0 allows any balance.",
|
|
52
|
-
"PREREQUISITES (created by separate calls, not shown): insurance_service_v1 (unpublished, with machine + sales), both withdraw Guards, and insurance_treasury_v1; Machine published. If this Service declares customer_required, it must also bind a Contact via um (hard linkage) — see the Contact step.",
|
|
53
|
-
"Desensitization: generic local-mark names only (insurance_service_v1, insurance_treasury_v1, insurance_provider_v1, insurance_withdraw_guard_*_v1); no real personal data present."
|
|
54
|
-
]
|
|
55
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Machine Template: 2-of-3 Multi-Sig Approval Workflow (threshold > 1)",
|
|
3
|
-
"description": "Four-node workflow where the 'approved' node requires cumulative weight 2 from three distinct approver forwards (permissionIndex 1001/1002/1003, weight 1 each) — the on-chain multi-signature approval pattern.",
|
|
4
|
-
"tags": ["machine", "template", "multisig", "threshold", "approval", "governance"],
|
|
5
|
-
"industry": "general",
|
|
6
|
-
"operation_type": "machine",
|
|
7
|
-
"source": "constructed under T-09 authorization; grounded in MachineNodePairSchema threshold + MachineForwardSchema weight — 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": "multisig_approval_machine"
|
|
16
|
-
},
|
|
17
|
-
"node": {
|
|
18
|
-
"op": "add",
|
|
19
|
-
"bReplace": true,
|
|
20
|
-
"nodes": [
|
|
21
|
-
{
|
|
22
|
-
"name": "submitted",
|
|
23
|
-
"pairs": [
|
|
24
|
-
{
|
|
25
|
-
"prev_node": "",
|
|
26
|
-
"threshold": 1,
|
|
27
|
-
"forwards": [
|
|
28
|
-
{ "name": "Submit", "weight": 1, "namedOperator": "" }
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"name": "under_review",
|
|
35
|
-
"pairs": [
|
|
36
|
-
{
|
|
37
|
-
"prev_node": "submitted",
|
|
38
|
-
"threshold": 1,
|
|
39
|
-
"forwards": [
|
|
40
|
-
{ "name": "Start Review", "weight": 1, "permissionIndex": 1000 }
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"name": "approved",
|
|
47
|
-
"pairs": [
|
|
48
|
-
{
|
|
49
|
-
"prev_node": "under_review",
|
|
50
|
-
"threshold": 2,
|
|
51
|
-
"forwards": [
|
|
52
|
-
{ "name": "Approve Alice", "weight": 1, "permissionIndex": 1001 },
|
|
53
|
-
{ "name": "Approve Bob", "weight": 1, "permissionIndex": 1002 },
|
|
54
|
-
{ "name": "Approve Carol", "weight": 1, "permissionIndex": 1003 }
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"name": "completed",
|
|
61
|
-
"pairs": [
|
|
62
|
-
{
|
|
63
|
-
"prev_node": "approved",
|
|
64
|
-
"threshold": 1,
|
|
65
|
-
"forwards": [
|
|
66
|
-
{ "name": "Finalize", "weight": 1, "permissionIndex": 1000 }
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"env": {
|
|
75
|
-
"network": "testnet"
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"notes": [
|
|
79
|
-
"MULTI-SIG MECHANICS: pair threshold=2 means Progress advances from 'under_review' to 'approved' only when the CUMULATIVE weight of completed DISTINCT forwards on that pair reaches 2. Each of the three approver forwards contributes weight 1, so any 2 of the 3 approvers must act — a 2-of-3 signature scheme.",
|
|
80
|
-
"Each approver calls progress operate with their OWN forward name (e.g. 'Approve Alice'). The same forward cannot be double-counted; distinct forwards by the same operator would still count separately, so map each forward to a distinct permissionIndex (1001/1002/1003 = three approver roles in the Permission table).",
|
|
81
|
-
"⚠️ SINGLE-OPERATOR LOCK (E_NOT_THE_HOLDER): each forward is locked by the FIRST operator that accomplishes it — a second operator re-executing the same accomplished forward aborts E_NOT_THE_HOLDER, and the weight is counted only ONCE. This is exactly why a threshold-N transition needs N DISTINCT forwards (here 2-of-3): each of the three approver forwards can be executed by exactly one person. Do NOT try to have several people 'all execute Approve Alice' — it will abort for everyone after the first.",
|
|
82
|
-
"threshold semantics (MachineNodePairSchema): 'If total Forward weight is greater than or equal to threshold, node advancement is triggered.' Weighted variants are possible — e.g. give a senior approver weight 2 so they can approve alone (threshold 2 met by one forward).",
|
|
83
|
-
"Entry-node rule: 'submitted' has prev_node='' with at least one forward (schema-enforced FIX-002). namedOperator='' = order owner; permissionIndex references Permission table entries.",
|
|
84
|
-
"Compare with machine-template-7node-rental.json where every pair uses threshold 1 (single-signature sequential flow).",
|
|
85
|
-
"This Machine is a TEMPLATE object: bind it to a Service and each order gets a Progress instance whose multi-sig approvals are tracked per order."
|
|
86
|
-
]
|
|
87
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Publish a Machine (Freeze Workflow)",
|
|
3
|
-
"description": "Step 6 of the 12-step deploy plan: publish an existing DRAFT Machine to make its nodes/forwards immutable. This is a single-concept operation — create the Machine in DRAFT first (see *-machine-create.json), then bind Guards to forwards, then publish. Replace 'my_machine' with your Machine's name.",
|
|
4
|
-
"tags": ["machine", "publish", "freeze", "immutable", "12-step"],
|
|
5
|
-
"industry": "general",
|
|
6
|
-
"operation_type": "machine",
|
|
7
|
-
"source": "12-step deploy plan (Step 6 Machine publish) — 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": "my_machine",
|
|
15
|
-
"publish": true
|
|
16
|
-
},
|
|
17
|
-
"env": {
|
|
18
|
-
"account": "service_provider",
|
|
19
|
-
"network": "testnet",
|
|
20
|
-
"confirmed": true
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"notes": [
|
|
24
|
-
"12-STEP PLAN alignment: this is ONE step (Step 6 Machine publish). Create the Machine in DRAFT first (Step 4), then create/bind Guards to forwards (Step 5), THEN publish here. Publishing is IRREVERSIBLE — nodes/pairs/forwards become permanently frozen.",
|
|
25
|
-
"object is the STRING form (existing DRAFT Machine name/ID). publish:true is the only data field needed — node/progress_new/description are NOT re-specified.",
|
|
26
|
-
"env.confirmed:true is REQUIRED (ConfirmGate) because publish is irreversible.",
|
|
27
|
-
"FIX-02: publish:true validates that the on-chain nodes contain at least one entry forward (prev_node=''), else the Machine would be stuck at Progress current=''.",
|
|
28
|
-
"Only a PUBLISHED Machine can be bound to a Service (service.machine asserts bPublished). Publish the Machine BEFORE the Service's machine-binding step."
|
|
29
|
-
]
|
|
30
|
-
}
|