@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,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Permission with Role Indexes for Signing Workflow (ThreeBody Signature)",
|
|
3
|
-
"description": "Permission object for a signature/approval service: grants the author account user-defined indexes 1000-1009 (1000 gates the 'Confirm Delivery' forward, 1001 gates the 'Complete Signature' forward, 1002-1009 reserved) plus built-in index 306 (SERVICE_MACHINE) for binding the Machine to the Service.",
|
|
4
|
-
"tags": ["permission", "multisig", "signature", "role-index", "approval-workflow"],
|
|
5
|
-
"industry": "general",
|
|
6
|
-
"operation_type": "permission",
|
|
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": "permission",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": {
|
|
15
|
-
"name": "threebody_permission",
|
|
16
|
-
"replaceExistName": true
|
|
17
|
-
},
|
|
18
|
-
"description": "Permission for ThreeBody signature service (multi-role signing workflow)",
|
|
19
|
-
"table": {
|
|
20
|
-
"op": "add perm by entity",
|
|
21
|
-
"entity": { "name_or_address": "signer_author" },
|
|
22
|
-
"index": [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 306]
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"env": {
|
|
26
|
-
"account": "signer_author",
|
|
27
|
-
"network": "testnet",
|
|
28
|
-
"confirmed": true
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"notes": [
|
|
32
|
-
"Shape verified against CallPermission_DataSchema (schema/call/permission.ts): 'add perm by entity' = TablePermByEntitySchema {entity: AccountOrMark_AddressSchema, index: PermissionIndexTypeSchema[]} — entity-centric grant of MANY indexes to ONE account.",
|
|
33
|
-
"Index validity (PermissionIndexTypeSchema, schema/query/index.ts): user-defined indexes must be 1000-65535; 306 is built-in SERVICE_MACHINE (authorizes binding a Machine to a Service).",
|
|
34
|
-
"Multi-signer pattern: grant DIFFERENT forward indexes to DIFFERENT signer accounts (e.g. 'add perm by index' {index: 1000, entity: [signer_a, signer_b]}) so each Machine forward is gated to its own approver set; the creator is auto-admin and bypasses per-index checks, so these grants only bite for non-admin operators.",
|
|
35
|
-
"DESENSITIZED: doc account 'three_body_author' -> 'signer_author' (generic role name); object renamed to local-mark 'threebody_permission'.",
|
|
36
|
-
"replaceExistName: true triggers ConfirmGate — env.confirmed: true is required or the call blocks with pending_confirmation."
|
|
37
|
-
]
|
|
38
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Configure Order Allocators with Entity-Treasury Recipient (ThreeBody Signature)",
|
|
3
|
-
"description": "Pre-publish Service configuration step (12-step plan: order_allocators): 100% of completed-order funds route to the fixed Treasury object via an allocator Guard that verifies order.service == this service. Entity(treasury) recipient makes the fund flow caller-independent (no Signer binding needed).",
|
|
4
|
-
"tags": ["service", "order_allocators", "treasury-first", "allocation", "guard", "signature"],
|
|
5
|
-
"industry": "general",
|
|
6
|
-
"operation_type": "service",
|
|
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": "service",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": "threebody_signature_service",
|
|
15
|
-
"order_allocators": {
|
|
16
|
-
"description": "Signature service fund allocation - 100% to author Treasury",
|
|
17
|
-
"threshold": 0,
|
|
18
|
-
"allocators": [
|
|
19
|
-
{
|
|
20
|
-
"guard": "threebody_allocator_guard",
|
|
21
|
-
"sharing": [
|
|
22
|
-
{
|
|
23
|
-
"who": {
|
|
24
|
-
"Entity": { "name_or_address": "threebody_treasury" }
|
|
25
|
-
},
|
|
26
|
-
"sharing": 10000,
|
|
27
|
-
"mode": "Rate"
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"env": {
|
|
35
|
-
"account": "signer_author",
|
|
36
|
-
"network": "testnet"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"notes": [
|
|
40
|
-
"Verified against CallService_DataSchema (schema/call/service.ts): order_allocators matches AllocatorsSchema (query/index.ts) {description, threshold, allocators[]}; sharing items match AllocationSharingSchema {who: RecipientSchema, sharing, mode}.",
|
|
41
|
-
"Recipient form: {Entity: {name_or_address: 'threebody_treasury'}} — Entity is an OBJECT with name_or_address, NOT a bare string (RecipientSchema). Funds flow to the fixed Treasury regardless of who triggers allocation (R-C3-06 safe); the referenced allocator Guard separately verifies order.service == this service (R-C3-05).",
|
|
42
|
-
"Rate mode: sharing 10000 = 100% (basis points); Rate items in one allocator must sum to 10000 when no Surplus item exists. threshold 0 allows allocation of any balance.",
|
|
43
|
-
"ORDER_ALLOCATORS IS PERMANENTLY IMMUTABLE AFTER PUBLISH (service.move:503) — this call must run BEFORE publish:true; the Service must also be unpublished when the machine field was bound earlier.",
|
|
44
|
-
"Prerequisite objects (created by separate calls, not shown): 'threebody_signature_service' (service, unpublished), 'threebody_allocator_guard' (guard: logic_equal[query order.service, identifier(service)]), 'threebody_treasury' (treasury sharing this service's permission).",
|
|
45
|
-
"HARD LINKAGE: if this Service also declares customer_required (private info the buyer must send), it MUST set customer_required TOGETHER with a Contact bound via `um` (same operation, in a pre-publish step) — the SDK rejects customer_required without um because the buyer's private info is delivered only through the Contact's end-to-end encrypted Messenger.",
|
|
46
|
-
"DESENSITIZED: doc account 'three_body_author' -> 'signer_author'; objects renamed to local marks ('threebody_signature_service', 'threebody_treasury', 'threebody_allocator_guard')."
|
|
47
|
-
]
|
|
48
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Time-Lock Guard via Order-Witness Progress Query (Travel)",
|
|
3
|
-
"description": "Create a Guard that enforces a relative time-lock before order completion: passes only when the on-chain Clock exceeds the order's Progress current-node entry timestamp plus a fixed duration. The runtime submission is the ORDER id, transparently converted to its Progress via convert_witness='OrderProgress'.",
|
|
4
|
-
"tags": ["guard", "travel", "time-lock", "clock", "witness", "OrderProgress", "forward-guard"],
|
|
5
|
-
"industry": "travel",
|
|
6
|
-
"operation_type": "guard",
|
|
7
|
-
"source": "docs/examples/Travel — 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": "travel_complete_guard",
|
|
16
|
-
"tags": ["travel", "time-lock", "complete"],
|
|
17
|
-
"replaceExistName": true
|
|
18
|
-
},
|
|
19
|
-
"description": "Time-lock guard for travel order completion. Requires current clock > progress.current_time + 1000ms.",
|
|
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": 1000,
|
|
32
|
-
"name": "Time-lock duration in ms"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"root": {
|
|
36
|
-
"type": "logic_as_u256_greater",
|
|
37
|
-
"nodes": [
|
|
38
|
-
{"type": "context", "context": "Clock"},
|
|
39
|
-
{
|
|
40
|
-
"type": "calc_number_add",
|
|
41
|
-
"nodes": [
|
|
42
|
-
{
|
|
43
|
-
"type": "query",
|
|
44
|
-
"query": "progress.current_time",
|
|
45
|
-
"object": {"identifier": 0, "convert_witness": "OrderProgress"},
|
|
46
|
-
"parameters": []
|
|
47
|
-
},
|
|
48
|
-
{"type": "identifier", "identifier": 1}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"env": {
|
|
55
|
-
"account": "travel_provider",
|
|
56
|
-
"network": "testnet",
|
|
57
|
-
"no_cache": true,
|
|
58
|
-
"confirmed": true
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"notes": [
|
|
62
|
-
"Order-witness time-lock pattern: the Guard table receives the ORDER id at runtime (identifier 0, b_submission:true), and the query node converts it to the order's associated Progress object via convert_witness='OrderProgress' (WitnessTypeSchema, id 100) before reading progress.current_time (query id 1272, returns U64 ms — the current-node entry timestamp). Root is logic_as_u256_greater[context Clock, calc_number_add[current_time, duration]] — i.e. now > entry_time + lock_duration. Root returns Bool via a logic_as_u256_* comparison, satisfying CallGuard_RootSchema.",
|
|
63
|
-
"Node-shape check (query/index.ts GuardNodeSchema, strict): context node {type:'context', context:'Clock'} — Clock returns the current on-chain timestamp (U64 ms); calc_number_add carries a 'nodes' array and returns U256; the query node carries query + object{identifier, convert_witness?} + optional parameters ([] here — progress.current_time takes no parameters). All field names verified against the discriminated union members.",
|
|
64
|
-
"Difference from the sibling library example guard-template-time-lock.json: the template submits the PROGRESS address directly and compares current_time >= an ABSOLUTE deadline stored in the table. This travel variant instead submits the ORDER id (witness conversion), uses a Clock context node, and enforces a RELATIVE duration (entry_time + delta) — use this form when the caller naturally holds the Order id and the lock is 'wait N ms after entering the node' rather than 'wait until date D'.",
|
|
65
|
-
"duration value 1000 (ms, 1 second) is TEST-ONLY so the example can complete immediately; production should use hours/days (e.g. 28800000 = 8h). The duration is static (b_submission:false) so it cannot be manipulated per-trigger.",
|
|
66
|
-
"Bound to the Machine's complete_trip forward (see sibling travel-machine-create example). Because Forward.guard verifies BEFORE the transition, current_time is still the entry timestamp of the CURRENT node (Ice Scooting) — exactly the intended anchor. Guards are immutable once created.",
|
|
67
|
-
"Desensitization: doc payload already uses generic local-mark names only (travel_provider, travel_complete_guard); no real personal data or raw 0x object addresses present — nothing replaced."
|
|
68
|
-
]
|
|
69
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Weather Oracle Guard via Repository Quote (Travel)",
|
|
3
|
-
"description": "Create a Guard that passes only when a weather record EXISTS for the submitted activity date: root query 'repository.data has' on the weather Repository with the runtime-submitted UTC-midnight timestamp converted via convert_number_address. Bound to the Machine's go_ice_scooting forward to gate weather-dependent activities.",
|
|
4
|
-
"tags": ["guard", "travel", "weather", "oracle", "repository", "query", "forward-guard"],
|
|
5
|
-
"industry": "travel",
|
|
6
|
-
"operation_type": "guard",
|
|
7
|
-
"source": "docs/examples/Travel — 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": "weather_check_guard",
|
|
16
|
-
"tags": ["weather", "check", "travel"],
|
|
17
|
-
"replaceExistName": true
|
|
18
|
-
},
|
|
19
|
-
"description": "Weather check guard for ice scooting activity. Checks if weather data exists for the activity date.",
|
|
20
|
-
"table": [
|
|
21
|
-
{
|
|
22
|
-
"identifier": 0,
|
|
23
|
-
"b_submission": false,
|
|
24
|
-
"value_type": "Address",
|
|
25
|
-
"value": "weather_repo",
|
|
26
|
-
"name": "Weather Repository address"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"identifier": 1,
|
|
30
|
-
"b_submission": false,
|
|
31
|
-
"value_type": "String",
|
|
32
|
-
"value": "Condition",
|
|
33
|
-
"name": "Repository policy name"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"identifier": 2,
|
|
37
|
-
"b_submission": true,
|
|
38
|
-
"value_type": "U64",
|
|
39
|
-
"name": "Activity date timestamp (submitted at runtime)"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"root": {
|
|
43
|
-
"type": "query",
|
|
44
|
-
"query": "repository.data has",
|
|
45
|
-
"object": {"identifier": 0},
|
|
46
|
-
"parameters": [
|
|
47
|
-
{"type": "identifier", "identifier": 1},
|
|
48
|
-
{
|
|
49
|
-
"type": "convert_number_address",
|
|
50
|
-
"node": {"type": "identifier", "identifier": 2}
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"env": {
|
|
56
|
-
"account": "travel_provider",
|
|
57
|
-
"network": "testnet",
|
|
58
|
-
"no_cache": true,
|
|
59
|
-
"confirmed": true
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"notes": [
|
|
63
|
-
"Weather-oracle-via-Repository pattern: an external data provider (weather_provider account) publishes timestamp-keyed records into a Repository policy ('Condition'); this Guard quotes that Repository at workflow-runtime to prove a record exists for the activity date before allowing the Ice Scooting forward. This is the canonical way to oracle off-chain data into a Machine transition without trusting the caller.",
|
|
64
|
-
"Query signature check (ts-sdk packages/wowok guard-ins.ts, id 1166 'repository.data has'): parameters [String policyName, Address dataId], returns Bool — so it is a valid ROOT node (call/guard.ts CallGuard_RootSchema refine allows 'query' roots only for Bool-returning queries). Parameter 2 must be Address type: the U64 timestamp is wrapped in convert_number_address (GuardNodeSchema {type:'convert_number_address', node}) to produce the data-id key the Repository uses.",
|
|
65
|
-
"Table check (common/index.ts GuardTableItemBaseSchema, strict — only identifier/b_submission/value_type/value/name): identifiers 0-1 are static (b_submission:false, value fixed at creation — note identifier 0 holds the Repository by local-mark NAME 'weather_repo', resolved to an address at build time; the repo name must be resolvable by THIS account, which is why the doc sets onChain:true on weather_repo for cross-account resolution). Identifier 2 is b_submission:true with NO value — supplied per-trigger via the top-level submission field when operating the Progress forward.",
|
|
66
|
-
"Timestamp alignment contract: Repository data is keyed by the exact numeric id written by the data provider; the activity_date submitted at Guard trigger time must EXACTLY equal that id (doc aligns both to UTC 00:00:00 via Math.floor(now/86400000)*86400000). A mismatch makes the query return false and the Guard fails. This Guard checks EXISTENCE only — it does not compare the weather value ('sunny' vs 'rainy'); value-based rejection would require the 'repository.data' query plus a comparison node.",
|
|
67
|
-
"Guards are IMMUTABLE once created — create before binding into the Machine forward (see sibling travel-machine-create example).",
|
|
68
|
-
"Desensitization: doc payload already uses generic local-mark names only (travel_provider, weather_repo, weather_check_guard); no real personal data or raw 0x object addresses present — nothing replaced."
|
|
69
|
-
]
|
|
70
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Multi-Segment Travel Machine DRAFT with Forward Guards",
|
|
3
|
-
"description": "Step 4 of the 12-step deploy plan: create a 5-node Iceland travel workflow Machine in DRAFT (unpublished): (init) -> Buy Insurance -> SPA -> Ice Scooting -> Complete/Cancel. Three forwards are gated by Guards: weather oracle check (go_ice_scooting), time-lock (complete_trip), and always-pass cancel (cancel_trip). Publish is a separate later step (machine-publish.json).",
|
|
4
|
-
"tags": ["machine", "travel", "workflow", "forward-guard", "multi-node", "draft", "12-step"],
|
|
5
|
-
"industry": "travel",
|
|
6
|
-
"operation_type": "machine",
|
|
7
|
-
"source": "docs/examples/Travel — 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": "travel_machine",
|
|
16
|
-
"permission": "travel_permission",
|
|
17
|
-
"replaceExistName": true
|
|
18
|
-
},
|
|
19
|
-
"description": "Iceland travel service workflow: (init) -> Buy Insurance -> SPA -> Ice Scooting -> Complete/Cancel",
|
|
20
|
-
"node": {
|
|
21
|
-
"op": "add",
|
|
22
|
-
"bReplace": true,
|
|
23
|
-
"nodes": [
|
|
24
|
-
{
|
|
25
|
-
"name": "Buy Insurance",
|
|
26
|
-
"pairs": [
|
|
27
|
-
{
|
|
28
|
-
"prev_node": "",
|
|
29
|
-
"threshold": 1,
|
|
30
|
-
"forwards": [
|
|
31
|
-
{
|
|
32
|
-
"name": "buy_insurance",
|
|
33
|
-
"weight": 1,
|
|
34
|
-
"permissionIndex": 1000
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "SPA",
|
|
42
|
-
"pairs": [
|
|
43
|
-
{
|
|
44
|
-
"prev_node": "Buy Insurance",
|
|
45
|
-
"threshold": 1,
|
|
46
|
-
"forwards": [
|
|
47
|
-
{
|
|
48
|
-
"name": "go_spa",
|
|
49
|
-
"weight": 1,
|
|
50
|
-
"permissionIndex": 1001
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"name": "Ice Scooting",
|
|
58
|
-
"pairs": [
|
|
59
|
-
{
|
|
60
|
-
"prev_node": "SPA",
|
|
61
|
-
"threshold": 1,
|
|
62
|
-
"forwards": [
|
|
63
|
-
{
|
|
64
|
-
"name": "go_ice_scooting",
|
|
65
|
-
"weight": 1,
|
|
66
|
-
"permissionIndex": 1004,
|
|
67
|
-
"guard": {
|
|
68
|
-
"guard": "weather_check_guard",
|
|
69
|
-
"retained_submission": []
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
]
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"name": "Complete",
|
|
78
|
-
"pairs": [
|
|
79
|
-
{
|
|
80
|
-
"prev_node": "Ice Scooting",
|
|
81
|
-
"threshold": 1,
|
|
82
|
-
"forwards": [
|
|
83
|
-
{
|
|
84
|
-
"name": "complete_trip",
|
|
85
|
-
"weight": 1,
|
|
86
|
-
"permissionIndex": 1002,
|
|
87
|
-
"guard": {
|
|
88
|
-
"guard": "travel_complete_guard",
|
|
89
|
-
"retained_submission": []
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
]
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"name": "Cancel",
|
|
98
|
-
"pairs": [
|
|
99
|
-
{
|
|
100
|
-
"prev_node": "Ice Scooting",
|
|
101
|
-
"threshold": 1,
|
|
102
|
-
"forwards": [
|
|
103
|
-
{
|
|
104
|
-
"name": "cancel_trip",
|
|
105
|
-
"weight": 1,
|
|
106
|
-
"permissionIndex": 1003,
|
|
107
|
-
"guard": {
|
|
108
|
-
"guard": "travel_cancel_guard",
|
|
109
|
-
"retained_submission": []
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
]
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
"env": {
|
|
120
|
-
"account": "travel_provider",
|
|
121
|
-
"network": "testnet",
|
|
122
|
-
"no_cache": true
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
"notes": [
|
|
126
|
-
"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.",
|
|
127
|
-
"Multi-segment workflow pattern: 5 nodes form a linear chain with a terminal fork — Ice Scooting has TWO outgoing paths (complete_trip -> Complete, cancel_trip -> Cancel), each guarded differently. Demonstrates per-forward Guard binding (Forward.guard) combined with per-forward permissionIndex, the canonical way to put conditional gates on workflow transitions.",
|
|
128
|
-
"Schema check (call/machine.ts CallMachine_DataSchema, strict): 'object' uses the OBJECT form of WithPermissionObjectSchema (NamedObjectWithPermissionSchema — name, permission, replaceExistName); node uses NodeSchema op='add' with bReplace:true + nodes array; publish omitted → DRAFT. The FIX-02 entry-forward refine (applied at publish time) is satisfied because the 'Buy Insurance' pair has prev_node='' with a non-empty forwards list (FIX-002).",
|
|
129
|
-
"Pair/forward semantics (query/index.ts MachineNodePairSchema): forwards describe INCOMING transitions — the forward in a node's pair (prev_node='X') is the action that advances Progress FROM X INTO this node. Field is 'prev_node' (NOT 'prior_node' — that name only appears in the separate 'add forward'/'remove forward' ops). threshold is per-pair; weight sums across the pair's forwards must reach threshold to advance.",
|
|
130
|
-
"Forward check (query/index.ts MachineForwardSchema, strict — only name/namedOperator/permissionIndex/weight/guard allowed): every forward provides permissionIndex (1000-1004), satisfying the one-of namedOperator/permissionIndex refine (namedOperator:'' is the order-owner wildcard alternative). Guarded forwards use the OBJECT guard form {guard: '<name>', retained_submission: []} (MachineForwardGuardSchema); a plain string shorthand 'guard': '<name>' is also accepted via preprocess when no retained_submission is needed.",
|
|
131
|
-
"Guard evaluation order: Forward.guard verifies BEFORE the transition executes, so a forward Guard querying THIS progress's progress.current sees the SOURCE node, not the target. Here weather_check_guard queries an external Repository (safe) and travel_complete_guard queries time-lock data (safe); neither checks progress.current == target, which would always fail.",
|
|
132
|
-
"This is a DRAFT (no publish:true). Once published, nodes are irreversibly frozen and env.confirmed:true is required at publish time. Only published Machines can bind to a Service (service.machine). Guards referenced by name (weather_check_guard, travel_complete_guard, travel_cancel_guard) and the Permission (travel_permission, with indexes 1000-1004 granted to the operator) must exist BEFORE publish — see the sibling travel-guard-weather-oracle / travel-guard-time-lock examples and Travel doc Steps 1/3.",
|
|
133
|
-
"Desensitization: doc payload already uses generic local-mark names only (travel_provider, travel_machine, travel_permission, guard names); no real personal data, phone numbers, or raw 0x object addresses present — nothing replaced."
|
|
134
|
-
]
|
|
135
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Data Repository with Write Policy (Travel)",
|
|
3
|
-
"description": "Create an on-chain Repository (weather_repo) with a 'Condition' policy defining write rules (write_guard, id_from, value_type) for travel weather data shared across accounts",
|
|
4
|
-
"tags": ["repository", "policies", "write_guard", "travel", "data"],
|
|
5
|
-
"industry": "travel",
|
|
6
|
-
"operation_type": "repository",
|
|
7
|
-
"source": "Travel verified deployment walkthrough (docs/examples/Travel) — adapted to current schema",
|
|
8
|
-
"verified": true,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "repository",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": {
|
|
15
|
-
"name": "weather_repo",
|
|
16
|
-
"permission": "weather_permission",
|
|
17
|
-
"replaceExistName": true,
|
|
18
|
-
"onChain": true
|
|
19
|
-
},
|
|
20
|
-
"description": "Weather data repository for Iceland travel activities",
|
|
21
|
-
"policies": {
|
|
22
|
-
"op": "add",
|
|
23
|
-
"policy": [
|
|
24
|
-
{
|
|
25
|
-
"name": "Condition",
|
|
26
|
-
"description": "Weather condition policy for activity dates",
|
|
27
|
-
"write_guard": [],
|
|
28
|
-
"id_from": "None",
|
|
29
|
-
"value_type": "String"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"env": {
|
|
35
|
-
"network": "testnet",
|
|
36
|
-
"no_cache": true,
|
|
37
|
-
"confirmed": true
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"notes": [
|
|
41
|
-
"onChain:true is REQUIRED here for cross-account name resolution: weather_repo is created by the weather_provider account, but its name is later referenced in a Guard table by the travel_provider account. Without onChain:true the name is stored LOCALLY ONLY on the creator's device (private) and cannot be resolved by any other account; with onChain:true the name is published on-chain and becomes publicly visible/resolvable.",
|
|
42
|
-
"write_guard semantics: the schema is z.array(PolicyWriteGuardSchema) with no minimum length, so an EMPTY array is valid and means NO Guard verification is required to write data under this policy — writes are gated only by the Repository's Permission. Non-empty entries must be PolicyWriteGuard OBJECTS {guard, id_from_submission?, data_from_submission?}, never bare guard-name strings.",
|
|
43
|
-
"id_from 'None' means the writer MUST specify the data ID explicitly on every write (IdFromSchema accepts 0/1/2 or 'None'/'Clock'/'Signer', case-insensitive). 'Clock' makes the data ID the current on-chain timestamp; 'Signer' makes it the writer's address.",
|
|
44
|
-
"policies is an op discriminated union: {op:'add'|'set', policy:[PolicyRule...]} | {op:'remove', policy:[name strings...]} | {op:'clear'} — never a bare array. PolicyRule requires name, description, write_guard, id_from, value_type (quote_guard is optional; value_type 'String' is a valid ValueTypeSchema literal).",
|
|
45
|
-
"Doc payload validated against current CallRepository_DataSchema with no drift; only restructured from the raw MCP envelope (data.operation_type/data.data) into the example-library call shape. The verified walkthrough executed this call with env.account='weather_provider' (a different account than travel_provider, which is exactly why onChain:true matters)."
|
|
46
|
-
]
|
|
47
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Travel Service DRAFT (Iceland)",
|
|
3
|
-
"description": "Step 3 of the 12-step deploy plan: create the Iceland travel Service object in DRAFT (unpublished) with only its identity — name, permission, and description. Machine binding, sales (WIP), Arbitration binding, order_allocators (tiered waterfall), and publish are each separate later steps and are intentionally NOT bundled here.",
|
|
4
|
-
"tags": ["service", "travel", "draft", "create", "12-step"],
|
|
5
|
-
"industry": "travel",
|
|
6
|
-
"operation_type": "service",
|
|
7
|
-
"source": "docs/examples/Travel — 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": "service",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": {
|
|
15
|
-
"name": "travel_service",
|
|
16
|
-
"permission": "travel_permission",
|
|
17
|
-
"replaceExistName": true
|
|
18
|
-
},
|
|
19
|
-
"description": "Iceland travel service: Blue Lagoon SPA + Glacier Ice Scooting."
|
|
20
|
-
},
|
|
21
|
-
"env": {
|
|
22
|
-
"account": "travel_provider",
|
|
23
|
-
"network": "testnet",
|
|
24
|
-
"no_cache": true
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"notes": [
|
|
28
|
-
"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/arbitrations/order_allocators/publish into the create call.",
|
|
29
|
-
"object uses the OBJECT form of TypedPermissionObjectSchema (type_parameter omitted → WOW default '0x2::wow::WOW'); description is a top-level Service field. No publish:true here — the Service stays unpublished until Step 12.",
|
|
30
|
-
"machine and order_allocators are PERMANENTLY LOCKED once publish=true executes (service.move assert!(!bPublished)) — set them in their own pre-publish steps, not in this DRAFT.",
|
|
31
|
-
"arbitrations binding requires a Permission DIFFERENT from the Service's (E_ARBITRATION_PERMISSION_CONFLICT) — create a dedicated travel_arbitration Permission first, then bind the Arbitration in the Arbitration step (Step 11), not here.",
|
|
32
|
-
"Travel is a PHYSICAL/service scenario; if it declares customer_required, set it together with a Contact bound as um (hard linkage) in the Contact step."
|
|
33
|
-
]
|
|
34
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Create Treasury for Merchant Revenue (Travel)",
|
|
3
|
-
"description": "Create a Treasury (travel_treasury) holding WOW tokens to aggregate travel service merchant revenue, sharing the Service's permission for unified governance",
|
|
4
|
-
"tags": ["treasury", "fund", "travel", "revenue"],
|
|
5
|
-
"industry": "travel",
|
|
6
|
-
"operation_type": "treasury",
|
|
7
|
-
"source": "Travel verified deployment walkthrough (docs/examples/Travel) — adapted to current schema",
|
|
8
|
-
"verified": true,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "treasury",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": {
|
|
15
|
-
"name": "travel_treasury",
|
|
16
|
-
"type_parameter": "0x2::wow::WOW",
|
|
17
|
-
"permission": "travel_permission",
|
|
18
|
-
"replaceExistName": true
|
|
19
|
-
},
|
|
20
|
-
"description": "Treasury for aggregating travel service merchant revenue. Uses the same Permission as the Service (travel_permission) for consistency — a single permission organization governs both fund collection and service operations."
|
|
21
|
-
},
|
|
22
|
-
"env": {
|
|
23
|
-
"network": "testnet",
|
|
24
|
-
"no_cache": true,
|
|
25
|
-
"confirmed": true
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"notes": [
|
|
29
|
-
"Treasury-First rule: merchant revenue flows to a Treasury object. The Treasury aggregates public funds in one fixed place, which makes Service allocator guards inherently safe — allocated funds always flow to the fixed treasury address, never to an arbitrary recipient, so guard logic cannot be abused to redirect money.",
|
|
30
|
-
"A Treasury MAY share the Service's Permission (travel_permission here) so one permission organization governs both fund collection and service operations. This is the opposite of Arbitration, which MUST NOT share the Service's Permission (arbitration needs independent governance to stay neutral between merchant and customer).",
|
|
31
|
-
"type_parameter determines the token type the Treasury holds and pays out (format {address}::{module}::{struct}). Use '0x2::wow::WOW' for WOW (the schema default, set explicitly here for clarity); it must match the Service's type_parameter so order payments can flow into this Treasury.",
|
|
32
|
-
"Doc payload validated against current CallTreasury_DataSchema with no drift: 'object' uses the OBJECT form of TypedPermissionObjectSchema (TypeNamedObjectWithPermissionSchema — name, type_parameter, permission, replaceExistName all valid); only restructured from the raw MCP envelope (data.operation_type/data.data) into the example-library call shape. The verified walkthrough executed this call with env.account='travel_provider'."
|
|
33
|
-
]
|
|
34
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Deposit Revenue into Treasury",
|
|
3
|
-
"description": "Deposit 1 WOW of service revenue into travel_treasury via Permission, recording the payment with a remark and naming the generated Payment object.",
|
|
4
|
-
"tags": ["treasury", "deposit", "fund", "travel"],
|
|
5
|
-
"industry": "travel",
|
|
6
|
-
"operation_type": "treasury",
|
|
7
|
-
"source": "constructed under T-09 authorization; grounded in DepositSchema + treasury.ts SDK — schema-validated, not chain-verified",
|
|
8
|
-
"verified": false,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "treasury",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": "travel_treasury",
|
|
15
|
-
"deposit": {
|
|
16
|
-
"coin": { "balance": 1000000000 },
|
|
17
|
-
"payment_info": {
|
|
18
|
-
"remark": "Service revenue settlement 2026-07",
|
|
19
|
-
"index": 0
|
|
20
|
-
},
|
|
21
|
-
"namedNewPayment": { "name": "travel_deposit_payment_v1" }
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"env": {
|
|
25
|
-
"network": "testnet",
|
|
26
|
-
"no_cache": true,
|
|
27
|
-
"confirmed": true
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"notes": [
|
|
31
|
-
"coin uses CoinParam: {balance: <amount>} pulls that amount from the signer's wallet (1000000000 = 1 WOW, 9 decimals); alternatively {coin: '<coin_object_id_or_name>'} deposits a specific Coin object.",
|
|
32
|
-
"Two deposit paths: via PERMISSION (default, as here — caller must hold the Treasury's deposit operation permission) or via EXTERNAL GUARD (set by_external_deposit_guard to a Guard name/address; the amount may then be bounded by the Guard table value at the identifier configured in external_deposit_guard).",
|
|
33
|
-
"payment_info (PaymentInfoSchema): remark + index are REQUIRED; index is the payment-record sequence number used later by fees_transfer-style operations to reference this payment. for_object/for_guard are optional scenario bindings (see payment-scenario-bound example).",
|
|
34
|
-
"namedNewPayment names the Payment object auto-generated by the deposit — recommended so the fund flow is auditable by name in later queries.",
|
|
35
|
-
"Token type is fixed by the Treasury's type_parameter (0x2::wow::WOW here); the deposited coin must match."
|
|
36
|
-
]
|
|
37
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Withdraw Fixed Amount from Treasury",
|
|
3
|
-
"description": "Withdraw 0.5 WOW from travel_treasury to the provider account via Permission (fixed-amount path), recording the payout as a named Payment.",
|
|
4
|
-
"tags": ["treasury", "withdraw", "payout", "travel"],
|
|
5
|
-
"industry": "travel",
|
|
6
|
-
"operation_type": "treasury",
|
|
7
|
-
"source": "constructed under T-09 authorization; grounded in WithdrawSchema + treasury.ts SDK — schema-validated, not chain-verified",
|
|
8
|
-
"verified": false,
|
|
9
|
-
"network": "testnet",
|
|
10
|
-
"call": {
|
|
11
|
-
"tool": "onchain_operations",
|
|
12
|
-
"operation_type": "treasury",
|
|
13
|
-
"data": {
|
|
14
|
-
"object": "travel_treasury",
|
|
15
|
-
"withdraw": {
|
|
16
|
-
"amount": { "fixed": 500000000 },
|
|
17
|
-
"recipient": { "name_or_address": "travel_provider" },
|
|
18
|
-
"payment_info": {
|
|
19
|
-
"remark": "Monthly provider payout 2026-07",
|
|
20
|
-
"index": 1
|
|
21
|
-
},
|
|
22
|
-
"namedNewPayment": { "name": "travel_withdraw_payment_v1" }
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"env": {
|
|
26
|
-
"network": "testnet",
|
|
27
|
-
"no_cache": true,
|
|
28
|
-
"confirmed": true
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"notes": [
|
|
32
|
-
"amount is a UNION: {fixed: <amount>} = fixed withdrawal via PERMISSION only (500000000 = 0.5 WOW); {by_external_withdraw_guard: '<guard>'} = Guard-verified withdrawal where the amount comes from the Guard table value at the identifier configured in external_withdraw_guard. The two paths are mutually exclusive.",
|
|
33
|
-
"recipient is AccountOrMark_Address OBJECT form {name_or_address: 'travel_provider'} — resolves the local account/mark to an address. A bare string is NOT accepted here (unlike NameOrAddress fields); wrap it in the object.",
|
|
34
|
-
"payment_info.remark and payment_info.index are REQUIRED (PaymentInfoSchema). Keep index unique per payment for clean audit trails.",
|
|
35
|
-
"namedNewPayment names the Payment object generated by the withdrawal for later audit reference.",
|
|
36
|
-
"The Treasury must hold sufficient balance of its type_parameter token; withdrawal via Permission requires the caller to hold the Treasury's withdraw operation permission."
|
|
37
|
-
]
|
|
38
|
-
}
|
package/dist/harness/plan.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { ODG, ScenarioTemplate } from "./types.js";
|
|
2
|
-
import type { SemanticObjectGraph } from "../playbooks/service-build/semantic-graph.js";
|
|
3
|
-
export declare const SCENARIO_REGISTRY: ScenarioTemplate[];
|
|
4
|
-
export interface IntentClassification {
|
|
5
|
-
scenario: string;
|
|
6
|
-
matched_keywords: string[];
|
|
7
|
-
confidence: number;
|
|
8
|
-
fallback: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare function classifyIntent(userInput: string): IntentClassification;
|
|
11
|
-
export declare function generateODG(userInput: string, taskId?: string): ODG;
|
|
12
|
-
export declare function generateODGFromSemanticGraph(graph: SemanticObjectGraph, taskId?: string): ODG;
|
|
13
|
-
export interface DecisionPoint {
|
|
14
|
-
round: string;
|
|
15
|
-
question: string;
|
|
16
|
-
options: string[];
|
|
17
|
-
default?: string;
|
|
18
|
-
}
|
|
19
|
-
export declare function identifyDecisionPoints(odg: ODG): DecisionPoint[];
|
|
20
|
-
export declare function detectCycles(odg: ODG): string[] | null;
|
|
21
|
-
export interface MigrationDecision {
|
|
22
|
-
round: string;
|
|
23
|
-
question: string;
|
|
24
|
-
options: string[];
|
|
25
|
-
default?: string;
|
|
26
|
-
note?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface MigrationDecisionOptions {
|
|
29
|
-
from_network?: "testnet";
|
|
30
|
-
to_network?: "mainnet";
|
|
31
|
-
current_payment_token?: string;
|
|
32
|
-
}
|
|
33
|
-
export declare function identifyMigrationDecisions(options?: MigrationDecisionOptions): MigrationDecision[];
|