@wowok/agent-mcp 3.0.5 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -20
- package/dist/customer/account-events.js +1 -1
- package/dist/graph/onchain/dataplane.d.ts +2 -2
- package/dist/graph/onchain/edge-schema.js +1 -1
- package/dist/graph/onchain/expand.js +1 -1
- package/dist/graph/onchain/onchain.spec.js +1 -1
- package/dist/graph/onchain/sdk-batch.d.ts +7 -1
- package/dist/graph/onchain/sdk-batch.js +1 -1
- package/dist/graph/onchain/sdk-dataplane.d.ts +6 -3
- package/dist/graph/onchain/sdk-dataplane.js +1 -1
- package/dist/graph/onchain/types.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/knowledge/account-marks.js +1 -1
- package/dist/knowledge/allocation-risk.js +1 -1
- package/dist/knowledge/allocation-templates.js +1 -1
- package/dist/knowledge/goal-completion.d.ts +12 -0
- package/dist/knowledge/goal-completion.js +1 -1
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/index.d.ts +4 -0
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/migration-preflight.js +1 -1
- package/dist/knowledge/payment-tracker.d.ts +63 -0
- package/dist/knowledge/payment-tracker.js +1 -0
- package/dist/knowledge/recipient-constraint.d.ts +160 -0
- package/dist/knowledge/recipient-constraint.js +1 -0
- package/dist/knowledge/safety-rules.d.ts +1 -1
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/knowledge/workspace-lists.d.ts +4 -0
- package/dist/knowledge/workspace-lists.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/participation/arbitrator-interest.d.ts +2 -0
- package/dist/participation/arbitrator-interest.js +1 -1
- package/dist/participation/collaborator-interest.d.ts +2 -0
- package/dist/participation/collaborator-interest.js +1 -1
- package/dist/participation/customer-interest.d.ts +2 -0
- package/dist/participation/customer-interest.js +1 -1
- package/dist/participation/merchant-interest.d.ts +2 -0
- package/dist/participation/merchant-interest.js +1 -1
- package/dist/participation/supplier-interest.d.ts +2 -0
- package/dist/participation/supplier-interest.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/context-assembly.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +7 -0
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/pipeline-actions.d.ts +2 -2
- package/dist/playbooks/service-build/pipeline-actions.js +1 -1
- package/dist/playbooks/service-build/relationship-profile.js +1 -1
- package/dist/playbooks/service-build/risk-aggregator.js +1 -1
- package/dist/playbooks/service-build/topology-query.js +1 -1
- package/dist/relationship/derivation.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/call/allocation.js +1 -1
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +6 -6
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/evaluation/index.d.ts +4 -4
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/goal/index.d.ts +21 -21
- package/dist/schema/goal/planning.d.ts +6 -6
- package/dist/schema/industry-pack/index.d.ts +6 -6
- package/dist/schema/industry-pack/modes.d.ts +6 -6
- package/dist/schema/intent-radar/index.d.ts +16 -16
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +110 -8
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +37 -29
- package/dist/schema/operations.js +1 -1
- package/dist/schema/persona/index.d.ts +155 -155
- package/dist/schema/query/bi.d.ts +26 -26
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +15 -12
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-query/index.d.ts +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/strategy-review/index.d.ts +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/bridge_operation.schema.json +14 -14
- package/dist/schemas/evaluation_operation.schema.json +7 -7
- package/dist/schemas/guard2file.schema.json +3 -3
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/local_history_operation.schema.json +1 -1
- package/dist/schemas/machineNode2file.schema.json +3 -3
- package/dist/schemas/messenger_operation.output.json +266 -38
- package/dist/schemas/messenger_operation.schema.json +27 -3
- package/dist/schemas/onchain_events.schema.json +1 -1
- package/dist/schemas/onchain_operations.schema.json +75 -77
- package/dist/schemas/onchain_operations_allocation.schema.json +6 -6
- package/dist/schemas/onchain_operations_arbitration.schema.json +3 -3
- package/dist/schemas/onchain_operations_contact.schema.json +3 -3
- package/dist/schemas/onchain_operations_demand.schema.json +3 -3
- package/dist/schemas/onchain_operations_gen_passport.schema.json +3 -3
- package/dist/schemas/onchain_operations_gen_proof.schema.json +3 -3
- package/dist/schemas/onchain_operations_guard.schema.json +4 -4
- package/dist/schemas/onchain_operations_machine.schema.json +11 -11
- package/dist/schemas/onchain_operations_order.schema.json +3 -3
- package/dist/schemas/onchain_operations_payment.schema.json +4 -4
- package/dist/schemas/onchain_operations_permission.schema.json +3 -3
- package/dist/schemas/onchain_operations_personal.schema.json +3 -3
- package/dist/schemas/onchain_operations_progress.schema.json +3 -3
- package/dist/schemas/onchain_operations_proof.schema.json +3 -3
- package/dist/schemas/onchain_operations_repository.schema.json +3 -3
- package/dist/schemas/onchain_operations_reward.schema.json +3 -3
- package/dist/schemas/onchain_operations_service.schema.json +9 -11
- package/dist/schemas/onchain_operations_treasury.schema.json +5 -5
- package/dist/schemas/onchain_table_data.output.json +14 -14
- package/dist/schemas/query_toolkit.output.json +38 -13
- package/dist/schemas/query_toolkit.schema.json +39 -11
- package/dist/strategy/collectors.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/evaluation.js +1 -1
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/permission.js +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/strategy-review.js +1 -1
- package/dist/tools/handlers/workflow.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/registry/onchain.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/rules-hook.d.ts +2 -0
- package/dist/tools/rules-hook.js +1 -1
- package/dist/tools/shared.js +1 -1
- package/package.json +2 -2
|
@@ -752,11 +752,9 @@
|
|
|
752
752
|
"discount_type": {
|
|
753
753
|
"anyOf": [
|
|
754
754
|
{
|
|
755
|
-
"type": "
|
|
756
|
-
"
|
|
757
|
-
|
|
758
|
-
"FIXED"
|
|
759
|
-
]
|
|
755
|
+
"type": "integer",
|
|
756
|
+
"minimum": 0,
|
|
757
|
+
"maximum": 1
|
|
760
758
|
},
|
|
761
759
|
{}
|
|
762
760
|
],
|
|
@@ -861,7 +859,7 @@
|
|
|
861
859
|
}
|
|
862
860
|
},
|
|
863
861
|
"order_allocators": {
|
|
864
|
-
"description": "Order fund allocator. Max 100 allocators (MAX_ALLOCATOR_COUNT). Each allocator has a guard (first matching guard wins) and a sharing list. Set to null to clear. ⚠️ PERMANENTLY IMMUTABLE after publish: order_allocators can ONLY be set BEFORE publish=true (Move service.move:503: assert!(!self.bPublished, E_ALREADY_PUBLISHED)). After publish, the ONLY way to change allocation rules is to create a NEW Service object. There is NO pause+lock exception for order_allocators (unlike arbitrations/rewards which have time-lock removal). PRE-PUBLISH CHECKLIST: verify all guard names resolve, all sharing amounts are correct, threshold is set, and recipient types (Entity/Signer/GuardIdentifier) are intended before calling publish=true. GuardIdentifier sharing mode: {who: {GuardIdentifier: <u8>}, sharing: <rate>, mode: 'Rate'} — resolves recipient from Guard table submission at allocation time (
|
|
862
|
+
"description": "Order fund allocator. Max 100 allocators (MAX_ALLOCATOR_COUNT). Each allocator has a guard (first matching guard wins) and a sharing list. Set to null to clear. ⚠️ PERMANENTLY IMMUTABLE after publish: order_allocators can ONLY be set BEFORE publish=true (Move service.move:503: assert!(!self.bPublished, E_ALREADY_PUBLISHED)). After publish, the ONLY way to change allocation rules is to create a NEW Service object. There is NO pause+lock exception for order_allocators (unlike arbitrations/rewards which have time-lock removal). PRE-PUBLISH CHECKLIST: verify all guard names resolve, all sharing amounts are correct, threshold is set, and recipient types (Entity/Signer/GuardIdentifier) are intended before calling publish=true. GuardIdentifier sharing mode: {who: {GuardIdentifier: <u8>}, sharing: <rate>, mode: 'Rate'} — resolves recipient from the Guard table submission at allocation time. Canonical order pattern: the recipient slot is the single submitted Order (constrained by the Guard — service binding, qualifying node, signer==order.owner); funds land at that order object and are receivable only by its owner (object receipt = owner receipt). Safety is determined by constraint sufficiency — run the recipient constraint audit before publish. Fixed recipients should use {who:{Entity:...}}; unbound Signer recipients are a CRITICAL theft risk. MULTI-CALL ALLOCATION: Allocation.alloc() can be called MULTIPLE times (no consumed flag in contract). Use Amount mode (not Surplus) for recurring allocations — Surplus calls balance::withdraw_all which drains the balance. For monthly payment scenarios, create multiple Allocators with time-based Guards + Amount mode sharing items.",
|
|
865
863
|
"anyOf": [
|
|
866
864
|
{
|
|
867
865
|
"type": "object",
|
|
@@ -990,7 +988,7 @@
|
|
|
990
988
|
"additionalProperties": false,
|
|
991
989
|
"description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate items second, Surplus last."
|
|
992
990
|
},
|
|
993
|
-
"description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
|
|
991
|
+
"description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. RECIPIENT SEMANTICS: the Guard constrains what each submission slot may be; a recipient's safety follows from the sufficiency of those constraints (run the recipient constraint audit). Canonical order pattern: recipient = the single submitted Order — funds land at that object and are receivable only by its owner. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
|
|
994
992
|
},
|
|
995
993
|
"fix": {
|
|
996
994
|
"description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract during `allocator_add` — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation.",
|
|
@@ -1120,7 +1118,7 @@
|
|
|
1120
1118
|
"type": "object",
|
|
1121
1119
|
"properties": {
|
|
1122
1120
|
"for_object": {
|
|
1123
|
-
"description": "
|
|
1121
|
+
"description": "Object this distribution belongs to (e.g. the order for a per-order allocation, recorded at creation). Auditors can query it to see the distribution's business context.",
|
|
1124
1122
|
"anyOf": [
|
|
1125
1123
|
{
|
|
1126
1124
|
"type": "string"
|
|
@@ -1423,13 +1421,13 @@
|
|
|
1423
1421
|
"type": "boolean"
|
|
1424
1422
|
},
|
|
1425
1423
|
"network": {
|
|
1424
|
+
"description": "Omit in client/chat contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
|
|
1426
1425
|
"type": "string",
|
|
1427
1426
|
"enum": [
|
|
1428
1427
|
"localnet",
|
|
1429
1428
|
"testnet",
|
|
1430
1429
|
"mainnet"
|
|
1431
|
-
]
|
|
1432
|
-
"description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Recreate all objects on the target network via onchain_operations with env.network=target_network, then re-register the LocalMark names."
|
|
1430
|
+
]
|
|
1433
1431
|
},
|
|
1434
1432
|
"referrer": {
|
|
1435
1433
|
"description": "Referrer ID. If the user is using the network for the first time, the referrer ID will be recorded (also applied when the SDK auto-registers the sender in the global Entity table).",
|
|
@@ -1482,7 +1480,7 @@
|
|
|
1482
1480
|
"schema_strict_mode"
|
|
1483
1481
|
],
|
|
1484
1482
|
"additionalProperties": false,
|
|
1485
|
-
"description": "IMPORTANT: Execution environment includes: account for signing operations, network selection (
|
|
1483
|
+
"description": "IMPORTANT: Execution environment includes: account for signing operations, network selection (testnet | localnet | mainnet), additional Guard permissions, and more. Used to specify context information during the call. If account is not specified, the default account (\"\") will be used. NOTE: by default the SDK auto-registers the sender in the global Entity table when absent (first business transaction; the account receives an owned Resource object). Set no_auto_register=true only on explicit user request."
|
|
1486
1484
|
},
|
|
1487
1485
|
"submission": {
|
|
1488
1486
|
"type": "object",
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
"type": "object",
|
|
233
233
|
"properties": {
|
|
234
234
|
"for_object": {
|
|
235
|
-
"description": "
|
|
235
|
+
"description": "Object this distribution belongs to (e.g. the order for a per-order allocation, recorded at creation). Auditors can query it to see the distribution's business context.",
|
|
236
236
|
"anyOf": [
|
|
237
237
|
{
|
|
238
238
|
"type": "string"
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
"type": "object",
|
|
372
372
|
"properties": {
|
|
373
373
|
"for_object": {
|
|
374
|
-
"description": "
|
|
374
|
+
"description": "Object this distribution belongs to (e.g. the order for a per-order allocation, recorded at creation). Auditors can query it to see the distribution's business context.",
|
|
375
375
|
"anyOf": [
|
|
376
376
|
{
|
|
377
377
|
"type": "string"
|
|
@@ -904,13 +904,13 @@
|
|
|
904
904
|
"type": "boolean"
|
|
905
905
|
},
|
|
906
906
|
"network": {
|
|
907
|
+
"description": "Omit in client/chat contexts — the runtime stamps the user's CURRENT network (the client's UI selection). Standalone MCP/CLI: omit to use the current network; set ONLY when the user explicitly names a different network (a mismatch pauses for user confirmation). Never guess or hardcode a network.",
|
|
907
908
|
"type": "string",
|
|
908
909
|
"enum": [
|
|
909
910
|
"localnet",
|
|
910
911
|
"testnet",
|
|
911
912
|
"mainnet"
|
|
912
|
-
]
|
|
913
|
-
"description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Recreate all objects on the target network via onchain_operations with env.network=target_network, then re-register the LocalMark names."
|
|
913
|
+
]
|
|
914
914
|
},
|
|
915
915
|
"referrer": {
|
|
916
916
|
"description": "Referrer ID. If the user is using the network for the first time, the referrer ID will be recorded (also applied when the SDK auto-registers the sender in the global Entity table).",
|
|
@@ -963,7 +963,7 @@
|
|
|
963
963
|
"schema_strict_mode"
|
|
964
964
|
],
|
|
965
965
|
"additionalProperties": false,
|
|
966
|
-
"description": "IMPORTANT: Execution environment includes: account for signing operations, network selection (
|
|
966
|
+
"description": "IMPORTANT: Execution environment includes: account for signing operations, network selection (testnet | localnet | mainnet), additional Guard permissions, and more. Used to specify context information during the call. If account is not specified, the default account (\"\") will be used. NOTE: by default the SDK auto-registers the sender in the global Entity table when absent (first business transaction; the account receives an owned Resource object). Set no_auto_register=true only on explicit user request."
|
|
967
967
|
},
|
|
968
968
|
"submission": {
|
|
969
969
|
"type": "object",
|
|
@@ -7698,7 +7698,7 @@
|
|
|
7698
7698
|
"description": "Forward weight — the contribution this forward makes toward its Pair's threshold. ⚠️ SINGLE-OPERATOR LOCK: a forward contributes its weight AT MOST ONCE. It is locked by the first operator that accomplishes it (progress.move session_accomplish_imp); a second operator re-executing the same accomplished forward aborts E_NOT_THE_HOLDER. Therefore multi-operator cooperation (threshold > 1) needs one DISTINCT forward per contributing operator (e.g. threshold 2 → begin_a + begin_b, each weight 1) — never reuse one forward."
|
|
7699
7699
|
},
|
|
7700
7700
|
"guard": {
|
|
7701
|
-
"description": "Guard reference for this forward. Accepts TWO formats:\n• STRING (preferred): \"my_guard_name\" — the Guard's name or address as a plain string.\n• OBJECT (only when retained_submission is needed): {guard: \"my_guard_name\", retained_submission: [1,2,3]}.\nFOLLOW THE SCHEMA FIELD STRUCTURE: A Guard reference is fundamentally a STRING (the Guard object's name or address). Provide a string when you only need to reference a Guard — do NOT wrap a bare string in an object structure. The OBJECT form {guard: \"...\", retained_submission: [...]} exists ONLY to carry additional `retained_submission` data alongside the string reference; inside the object, the `guard` field is STILL a string. In short: string-in for a string reference, object-in only when you need to pass extra data.\nCOGNITIVE PRINCIPLE: Guard validation ALWAYS occurs BEFORE the forward operation. A Guard that queries state of the SAME Progress object this forward operates on (e.g. progress.current) will see the PRE-transition value (source node), NOT the target node. If the Guard checks progress.current == target_node, it will ALWAYS FAIL. Querying a DIFFERENT Progress object (cross-machine) is safe and reasonable — that progress is not modified by this forward. For target-node verification after transition, bind the Guard to the Allocator instead (allocation.alloc runs AFTER the state transition completes).\n⚠️ T1 LOSSY POINT (B-3): WoWok has NO on-chain cron. A business phrase like 'after N days, auto-X' is NOT an automatic trigger — it decomposes into (1) a time_guard that checks elapsed time, and (2) an OFF-CHAIN keeper that must submit the forward when the guard passes. Configuring a time_guard WITHOUT a keeper means nothing ever fires.",
|
|
7701
|
+
"description": "Guard reference for this forward. Accepts TWO formats:\n• STRING (preferred): \"my_guard_name\" — the Guard's name or address as a plain string.\n• OBJECT (only when retained_submission is needed): {guard: \"my_guard_name\", retained_submission: [1,2,3]}.\nFOLLOW THE SCHEMA FIELD STRUCTURE: A Guard reference is fundamentally a STRING (the Guard object's name or address). Provide a string when you only need to reference a Guard — do NOT wrap a bare string in an object structure. The OBJECT form {guard: \"...\", retained_submission: [...]} exists ONLY to carry additional `retained_submission` data alongside the string reference; inside the object, the `guard` field is STILL a string. In short: string-in for a string reference, object-in only when you need to pass extra data.\nCOGNITIVE PRINCIPLE: Guard validation ALWAYS occurs BEFORE the forward operation. A Guard that queries state of the SAME Progress object this forward operates on (e.g. progress.current) will see the PRE-transition value (source node), NOT the target node. If the Guard checks progress.current == target_node, it will ALWAYS FAIL. Querying a DIFFERENT Progress object (cross-machine) is safe and reasonable — that progress is not modified by this forward. For target-node verification after transition, bind the Guard to the Allocator instead (allocation.alloc runs AFTER the state transition completes).\n⚠️ T1 LOSSY POINT (B-3): WoWok has NO on-chain cron. A business phrase like 'after N days, auto-X' is NOT an automatic trigger — it decomposes into (1) a time_guard that checks elapsed time, and (2) an OFF-CHAIN keeper that must submit the forward when the guard passes. Configuring a time_guard WITHOUT a keeper means nothing ever fires.\nRETAINED_SUBMISSION: a non-empty retained_submission does NOT relax Guard verification — the forward's Guard is always validated first. The list only selects which of the caller's already-verified submissions are persisted into the Progress history (see the guard field above).",
|
|
7702
7702
|
"anyOf": [
|
|
7703
7703
|
{
|
|
7704
7704
|
"anyOf": [
|
|
@@ -7710,7 +7710,7 @@
|
|
|
7710
7710
|
"description": "Guard object name or address (string). Example: 'my_attendance_guard' or '0x1234...'"
|
|
7711
7711
|
},
|
|
7712
7712
|
"retained_submission": {
|
|
7713
|
-
"description": "
|
|
7713
|
+
"description": "Guard table identifiers whose verified values are persisted into the Progress history when the forward is accomplished. The Guard is ALWAYS fully verified first (regardless of this list): the forward cannot complete unless the Passport carries a passing result for it. After verification, exactly the caller's submissions for the listed identifiers are copied into history (passport::submissions_get) as Guard-verified facts; empty array (default) records nothing. Use it for audit and downstream queries, never as a way to relax Guard conditions.",
|
|
7714
7714
|
"anyOf": [
|
|
7715
7715
|
{
|
|
7716
7716
|
"type": "array",
|
|
@@ -8498,7 +8498,7 @@
|
|
|
8498
8498
|
"additionalProperties": false,
|
|
8499
8499
|
"description": "Guard submission"
|
|
8500
8500
|
},
|
|
8501
|
-
"description": "
|
|
8501
|
+
"description": "Values persisted into the Progress history when this forward was accomplished. PROVENANCE: when the Machine forward lists retained_submission identifiers, the Guard is STILL fully verified first — the forward cannot complete without a passing Guard result. After verification, exactly the caller's submissions for the listed identifiers are copied here as Guard-verified facts (see MachineForwardGuardSchema)."
|
|
8502
8502
|
},
|
|
8503
8503
|
"msg": {
|
|
8504
8504
|
"type": "string",
|
|
@@ -9113,7 +9113,7 @@
|
|
|
9113
9113
|
"mainnet",
|
|
9114
9114
|
"localnet"
|
|
9115
9115
|
],
|
|
9116
|
-
"description": "Network for the query. Defaults to '
|
|
9116
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9117
9117
|
}
|
|
9118
9118
|
},
|
|
9119
9119
|
"required": [
|
|
@@ -9140,7 +9140,7 @@
|
|
|
9140
9140
|
"mainnet",
|
|
9141
9141
|
"localnet"
|
|
9142
9142
|
],
|
|
9143
|
-
"description": "Network for the query. Defaults to '
|
|
9143
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9144
9144
|
}
|
|
9145
9145
|
},
|
|
9146
9146
|
"required": [
|
|
@@ -9167,7 +9167,7 @@
|
|
|
9167
9167
|
"mainnet",
|
|
9168
9168
|
"localnet"
|
|
9169
9169
|
],
|
|
9170
|
-
"description": "Network for the query. Defaults to '
|
|
9170
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9171
9171
|
}
|
|
9172
9172
|
},
|
|
9173
9173
|
"required": [
|
|
@@ -9194,7 +9194,7 @@
|
|
|
9194
9194
|
"mainnet",
|
|
9195
9195
|
"localnet"
|
|
9196
9196
|
],
|
|
9197
|
-
"description": "Network for the query. Defaults to '
|
|
9197
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9198
9198
|
}
|
|
9199
9199
|
},
|
|
9200
9200
|
"required": [
|
|
@@ -9228,7 +9228,7 @@
|
|
|
9228
9228
|
"mainnet",
|
|
9229
9229
|
"localnet"
|
|
9230
9230
|
],
|
|
9231
|
-
"description": "Network for the query. Defaults to '
|
|
9231
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9232
9232
|
},
|
|
9233
9233
|
"context_depth": {
|
|
9234
9234
|
"description": "BFS recursion depth for dependency expansion in assemble_context (default 0 = no expansion). When >0, the assembly recursively queries objects referenced by the center objects (permission, guard, machine, service, repositories, etc.) up to the given depth, using the same address-field extraction rules as extractAddressFields. Each level issues one batched query_objects call (≤50 IDs per batch). Cycles are detected and skipped via a visited set. Discovered dependencies are returned in `dependencies` (edge metadata) and `dependency_objects` (full object states). Recommended: 1–2 for most use cases; 3+ may pull large subgraphs (use context_include to constrain).",
|
|
@@ -9271,7 +9271,7 @@
|
|
|
9271
9271
|
"mainnet",
|
|
9272
9272
|
"localnet"
|
|
9273
9273
|
],
|
|
9274
|
-
"description": "Network for the query. Defaults to '
|
|
9274
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9275
9275
|
},
|
|
9276
9276
|
"reverse_order_amount": {
|
|
9277
9277
|
"description": "Escrowed order amount (smallest-unit string) for reverse_map — included in the report summary as the concrete escrow mention.",
|
|
@@ -9368,7 +9368,7 @@
|
|
|
9368
9368
|
"mainnet",
|
|
9369
9369
|
"localnet"
|
|
9370
9370
|
],
|
|
9371
|
-
"description": "Network for the query. Defaults to '
|
|
9371
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9372
9372
|
}
|
|
9373
9373
|
},
|
|
9374
9374
|
"required": [
|
|
@@ -9413,7 +9413,7 @@
|
|
|
9413
9413
|
"mainnet",
|
|
9414
9414
|
"localnet"
|
|
9415
9415
|
],
|
|
9416
|
-
"description": "Network for the query. Defaults to '
|
|
9416
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9417
9417
|
}
|
|
9418
9418
|
},
|
|
9419
9419
|
"required": [
|
|
@@ -9458,7 +9458,7 @@
|
|
|
9458
9458
|
"mainnet",
|
|
9459
9459
|
"localnet"
|
|
9460
9460
|
],
|
|
9461
|
-
"description": "Network for the query. Defaults to '
|
|
9461
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9462
9462
|
},
|
|
9463
9463
|
"account": {
|
|
9464
9464
|
"description": "Scope the aggregation to ONE account address (the client's current account). Omit to aggregate across ALL local accounts.",
|
|
@@ -9493,7 +9493,7 @@
|
|
|
9493
9493
|
"mainnet",
|
|
9494
9494
|
"localnet"
|
|
9495
9495
|
],
|
|
9496
|
-
"description": "Network for the query. Defaults to '
|
|
9496
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9497
9497
|
},
|
|
9498
9498
|
"account": {
|
|
9499
9499
|
"description": "Scope to ONE account address (the client's current account). Omit to merge across ALL local accounts.",
|
|
@@ -9569,7 +9569,7 @@
|
|
|
9569
9569
|
"mainnet",
|
|
9570
9570
|
"localnet"
|
|
9571
9571
|
],
|
|
9572
|
-
"description": "Network for the query. Defaults to '
|
|
9572
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
9573
9573
|
},
|
|
9574
9574
|
"intent": {
|
|
9575
9575
|
"description": "SEMANTIC exploration strategy (G3) — what this topology call is trying to establish. Deterministically shapes the edge whitelist, per-family depth caps and budget: full_map=complete structural map; order_health=order lifecycle+completion+disputes; fund_flow=payments+allocation waterfall+guard-gated splits; workflow=Machine node graphs+transitions+progress; counterparty=who is on the other side (buyer/seller/agents/operators); reputation=votes+arbitration record+contacts; permission=permission groups+bindings+entity tables; supply_chain=multi-leg allocation/sub-order settlement; arbitration=dispute cases+voters; demand_match=demand presenters+guards+rewards. When omitted, defaults come from the persona system (role default intents < account persona preference), then industry templates; every applied layer is reported in result.strategy.trace.",
|
|
@@ -2618,7 +2618,7 @@
|
|
|
2618
2618
|
"additionalProperties": false,
|
|
2619
2619
|
"description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate items second, Surplus last."
|
|
2620
2620
|
},
|
|
2621
|
-
"description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
|
|
2621
|
+
"description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. RECIPIENT SEMANTICS: the Guard constrains what each submission slot may be; a recipient's safety follows from the sufficiency of those constraints (run the recipient constraint audit). Canonical order pattern: recipient = the single submitted Order — funds land at that object and are receivable only by its owner. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
|
|
2622
2622
|
},
|
|
2623
2623
|
"fix": {
|
|
2624
2624
|
"description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract during `allocator_add` — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation.",
|
|
@@ -3841,7 +3841,7 @@
|
|
|
3841
3841
|
"additionalProperties": false,
|
|
3842
3842
|
"description": "Guard submission"
|
|
3843
3843
|
},
|
|
3844
|
-
"description": "
|
|
3844
|
+
"description": "Values persisted into the Progress history when this forward was accomplished. PROVENANCE: when the Machine forward lists retained_submission identifiers, the Guard is STILL fully verified first — the forward cannot complete without a passing Guard result. After verification, exactly the caller's submissions for the listed identifiers are copied here as Guard-verified facts (see MachineForwardGuardSchema)."
|
|
3845
3845
|
},
|
|
3846
3846
|
"msg": {
|
|
3847
3847
|
"type": "string",
|
|
@@ -4890,7 +4890,7 @@
|
|
|
4890
4890
|
"additionalProperties": false,
|
|
4891
4891
|
"description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate items second, Surplus last."
|
|
4892
4892
|
},
|
|
4893
|
-
"description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
|
|
4893
|
+
"description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. RECIPIENT SEMANTICS: the Guard constrains what each submission slot may be; a recipient's safety follows from the sufficiency of those constraints (run the recipient constraint audit). Canonical order pattern: recipient = the single submitted Order — funds land at that object and are receivable only by its owner. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
|
|
4894
4894
|
},
|
|
4895
4895
|
"fix": {
|
|
4896
4896
|
"description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract during `allocator_add` — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation.",
|
|
@@ -4948,7 +4948,7 @@
|
|
|
4948
4948
|
"type": "object",
|
|
4949
4949
|
"properties": {
|
|
4950
4950
|
"for_object": {
|
|
4951
|
-
"description": "
|
|
4951
|
+
"description": "Object this distribution belongs to (e.g. the order for a per-order allocation, recorded at creation). Auditors can query it to see the distribution's business context.",
|
|
4952
4952
|
"anyOf": [
|
|
4953
4953
|
{
|
|
4954
4954
|
"type": "string"
|
|
@@ -7169,7 +7169,7 @@
|
|
|
7169
7169
|
"type": "object",
|
|
7170
7170
|
"properties": {
|
|
7171
7171
|
"for_object": {
|
|
7172
|
-
"description": "
|
|
7172
|
+
"description": "Object this distribution belongs to (e.g. the order for a per-order allocation, recorded at creation). Auditors can query it to see the distribution's business context.",
|
|
7173
7173
|
"anyOf": [
|
|
7174
7174
|
{
|
|
7175
7175
|
"type": "string"
|
|
@@ -9240,11 +9240,9 @@
|
|
|
9240
9240
|
"discount_type": {
|
|
9241
9241
|
"anyOf": [
|
|
9242
9242
|
{
|
|
9243
|
-
"type": "
|
|
9244
|
-
"
|
|
9245
|
-
|
|
9246
|
-
"FIXED"
|
|
9247
|
-
]
|
|
9243
|
+
"type": "integer",
|
|
9244
|
+
"minimum": 0,
|
|
9245
|
+
"maximum": 1
|
|
9248
9246
|
},
|
|
9249
9247
|
{}
|
|
9250
9248
|
],
|
|
@@ -14221,7 +14219,7 @@
|
|
|
14221
14219
|
"description": "Forward weight — the contribution this forward makes toward its Pair's threshold. ⚠️ SINGLE-OPERATOR LOCK: a forward contributes its weight AT MOST ONCE. It is locked by the first operator that accomplishes it (progress.move session_accomplish_imp); a second operator re-executing the same accomplished forward aborts E_NOT_THE_HOLDER. Therefore multi-operator cooperation (threshold > 1) needs one DISTINCT forward per contributing operator (e.g. threshold 2 → begin_a + begin_b, each weight 1) — never reuse one forward."
|
|
14222
14220
|
},
|
|
14223
14221
|
"guard": {
|
|
14224
|
-
"description": "Guard reference for this forward. Accepts TWO formats:\n• STRING (preferred): \"my_guard_name\" — the Guard's name or address as a plain string.\n• OBJECT (only when retained_submission is needed): {guard: \"my_guard_name\", retained_submission: [1,2,3]}.\nFOLLOW THE SCHEMA FIELD STRUCTURE: A Guard reference is fundamentally a STRING (the Guard object's name or address). Provide a string when you only need to reference a Guard — do NOT wrap a bare string in an object structure. The OBJECT form {guard: \"...\", retained_submission: [...]} exists ONLY to carry additional `retained_submission` data alongside the string reference; inside the object, the `guard` field is STILL a string. In short: string-in for a string reference, object-in only when you need to pass extra data.\nCOGNITIVE PRINCIPLE: Guard validation ALWAYS occurs BEFORE the forward operation. A Guard that queries state of the SAME Progress object this forward operates on (e.g. progress.current) will see the PRE-transition value (source node), NOT the target node. If the Guard checks progress.current == target_node, it will ALWAYS FAIL. Querying a DIFFERENT Progress object (cross-machine) is safe and reasonable — that progress is not modified by this forward. For target-node verification after transition, bind the Guard to the Allocator instead (allocation.alloc runs AFTER the state transition completes).\n⚠️ T1 LOSSY POINT (B-3): WoWok has NO on-chain cron. A business phrase like 'after N days, auto-X' is NOT an automatic trigger — it decomposes into (1) a time_guard that checks elapsed time, and (2) an OFF-CHAIN keeper that must submit the forward when the guard passes. Configuring a time_guard WITHOUT a keeper means nothing ever fires.",
|
|
14222
|
+
"description": "Guard reference for this forward. Accepts TWO formats:\n• STRING (preferred): \"my_guard_name\" — the Guard's name or address as a plain string.\n• OBJECT (only when retained_submission is needed): {guard: \"my_guard_name\", retained_submission: [1,2,3]}.\nFOLLOW THE SCHEMA FIELD STRUCTURE: A Guard reference is fundamentally a STRING (the Guard object's name or address). Provide a string when you only need to reference a Guard — do NOT wrap a bare string in an object structure. The OBJECT form {guard: \"...\", retained_submission: [...]} exists ONLY to carry additional `retained_submission` data alongside the string reference; inside the object, the `guard` field is STILL a string. In short: string-in for a string reference, object-in only when you need to pass extra data.\nCOGNITIVE PRINCIPLE: Guard validation ALWAYS occurs BEFORE the forward operation. A Guard that queries state of the SAME Progress object this forward operates on (e.g. progress.current) will see the PRE-transition value (source node), NOT the target node. If the Guard checks progress.current == target_node, it will ALWAYS FAIL. Querying a DIFFERENT Progress object (cross-machine) is safe and reasonable — that progress is not modified by this forward. For target-node verification after transition, bind the Guard to the Allocator instead (allocation.alloc runs AFTER the state transition completes).\n⚠️ T1 LOSSY POINT (B-3): WoWok has NO on-chain cron. A business phrase like 'after N days, auto-X' is NOT an automatic trigger — it decomposes into (1) a time_guard that checks elapsed time, and (2) an OFF-CHAIN keeper that must submit the forward when the guard passes. Configuring a time_guard WITHOUT a keeper means nothing ever fires.\nRETAINED_SUBMISSION: a non-empty retained_submission does NOT relax Guard verification — the forward's Guard is always validated first. The list only selects which of the caller's already-verified submissions are persisted into the Progress history (see the guard field above).",
|
|
14225
14223
|
"anyOf": [
|
|
14226
14224
|
{
|
|
14227
14225
|
"anyOf": [
|
|
@@ -14233,7 +14231,7 @@
|
|
|
14233
14231
|
"description": "Guard object name or address (string). Example: 'my_attendance_guard' or '0x1234...'"
|
|
14234
14232
|
},
|
|
14235
14233
|
"retained_submission": {
|
|
14236
|
-
"description": "
|
|
14234
|
+
"description": "Guard table identifiers whose verified values are persisted into the Progress history when the forward is accomplished. The Guard is ALWAYS fully verified first (regardless of this list): the forward cannot complete unless the Passport carries a passing result for it. After verification, exactly the caller's submissions for the listed identifiers are copied into history (passport::submissions_get) as Guard-verified facts; empty array (default) records nothing. Use it for audit and downstream queries, never as a way to relax Guard conditions.",
|
|
14237
14235
|
"anyOf": [
|
|
14238
14236
|
{
|
|
14239
14237
|
"type": "array",
|
|
@@ -15021,7 +15019,7 @@
|
|
|
15021
15019
|
"additionalProperties": false,
|
|
15022
15020
|
"description": "Guard submission"
|
|
15023
15021
|
},
|
|
15024
|
-
"description": "
|
|
15022
|
+
"description": "Values persisted into the Progress history when this forward was accomplished. PROVENANCE: when the Machine forward lists retained_submission identifiers, the Guard is STILL fully verified first — the forward cannot complete without a passing Guard result. After verification, exactly the caller's submissions for the listed identifiers are copied here as Guard-verified facts (see MachineForwardGuardSchema)."
|
|
15025
15023
|
},
|
|
15026
15024
|
"msg": {
|
|
15027
15025
|
"type": "string",
|
|
@@ -15722,6 +15720,33 @@
|
|
|
15722
15720
|
],
|
|
15723
15721
|
"additionalProperties": false
|
|
15724
15722
|
},
|
|
15723
|
+
{
|
|
15724
|
+
"type": "object",
|
|
15725
|
+
"properties": {
|
|
15726
|
+
"query_type": {
|
|
15727
|
+
"type": "string",
|
|
15728
|
+
"const": "onchain_block"
|
|
15729
|
+
},
|
|
15730
|
+
"result": {
|
|
15731
|
+
"anyOf": [
|
|
15732
|
+
{
|
|
15733
|
+
"type": "object",
|
|
15734
|
+
"propertyNames": {
|
|
15735
|
+
"type": "string"
|
|
15736
|
+
},
|
|
15737
|
+
"additionalProperties": {},
|
|
15738
|
+
"description": "RAW fullnode checkpoint summary, verbatim (no semantic shaping)"
|
|
15739
|
+
},
|
|
15740
|
+
{}
|
|
15741
|
+
]
|
|
15742
|
+
}
|
|
15743
|
+
},
|
|
15744
|
+
"required": [
|
|
15745
|
+
"query_type",
|
|
15746
|
+
"result"
|
|
15747
|
+
],
|
|
15748
|
+
"additionalProperties": false
|
|
15749
|
+
},
|
|
15725
15750
|
{
|
|
15726
15751
|
"type": "object",
|
|
15727
15752
|
"properties": {
|
|
@@ -513,6 +513,34 @@
|
|
|
513
513
|
"additionalProperties": false,
|
|
514
514
|
"description": "Verify what a specific transaction did on-chain — the 'OperationProof' primitive. After executing any operation, call this with the returned digest to confirm: status (success/failed), object changes (created/mutated/deleted), balance changes, gas used, and events. Essential for the 5-step loop's Verify step. Returns: TransactionDetail | undefined"
|
|
515
515
|
},
|
|
516
|
+
{
|
|
517
|
+
"type": "object",
|
|
518
|
+
"properties": {
|
|
519
|
+
"query_type": {
|
|
520
|
+
"type": "string",
|
|
521
|
+
"const": "onchain_block"
|
|
522
|
+
},
|
|
523
|
+
"block": {
|
|
524
|
+
"type": "string",
|
|
525
|
+
"description": "Checkpoint sequence number (e.g. \"12345\") or checkpoint digest. A checkpoint (block) is the chain's unit of finalization — use it to answer 'what happened at block N', look up block time/transaction count, or place a transaction in the global order (checkpoint sequences appear in onchain_transaction/onchain_object_history results)."
|
|
526
|
+
},
|
|
527
|
+
"network": {
|
|
528
|
+
"description": "Network to query: 'mainnet' or 'testnet'. If omitted, the SDK's current default network is used (check via wowok_buildin_info info='current network'); the response echoes the resolved network so results can never be misattributed.",
|
|
529
|
+
"type": "string",
|
|
530
|
+
"enum": [
|
|
531
|
+
"localnet",
|
|
532
|
+
"testnet",
|
|
533
|
+
"mainnet"
|
|
534
|
+
]
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
"required": [
|
|
538
|
+
"query_type",
|
|
539
|
+
"block"
|
|
540
|
+
],
|
|
541
|
+
"additionalProperties": false,
|
|
542
|
+
"description": "Query ONE checkpoint (block) by sequence number or digest — returns the RAW fullnode checkpoint summary VERBATIM (no semantic shaping): sequence, digest, timestampMs, transaction count, epoch bindings, networkTransactions, endOfEpoch data when present. Checkpoints are immutable, so the value is authoritative forever. Distinct from onchain_transaction (per-tx proof) — use this for block-level facts. Returns: raw checkpoint summary object | undefined"
|
|
543
|
+
},
|
|
516
544
|
{
|
|
517
545
|
"type": "object",
|
|
518
546
|
"properties": {
|
|
@@ -937,7 +965,7 @@
|
|
|
937
965
|
"mainnet",
|
|
938
966
|
"localnet"
|
|
939
967
|
],
|
|
940
|
-
"description": "Network for the query. Defaults to '
|
|
968
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
941
969
|
}
|
|
942
970
|
},
|
|
943
971
|
"required": [
|
|
@@ -964,7 +992,7 @@
|
|
|
964
992
|
"mainnet",
|
|
965
993
|
"localnet"
|
|
966
994
|
],
|
|
967
|
-
"description": "Network for the query. Defaults to '
|
|
995
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
968
996
|
}
|
|
969
997
|
},
|
|
970
998
|
"required": [
|
|
@@ -991,7 +1019,7 @@
|
|
|
991
1019
|
"mainnet",
|
|
992
1020
|
"localnet"
|
|
993
1021
|
],
|
|
994
|
-
"description": "Network for the query. Defaults to '
|
|
1022
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
995
1023
|
}
|
|
996
1024
|
},
|
|
997
1025
|
"required": [
|
|
@@ -1018,7 +1046,7 @@
|
|
|
1018
1046
|
"mainnet",
|
|
1019
1047
|
"localnet"
|
|
1020
1048
|
],
|
|
1021
|
-
"description": "Network for the query. Defaults to '
|
|
1049
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
1022
1050
|
}
|
|
1023
1051
|
},
|
|
1024
1052
|
"required": [
|
|
@@ -1052,7 +1080,7 @@
|
|
|
1052
1080
|
"mainnet",
|
|
1053
1081
|
"localnet"
|
|
1054
1082
|
],
|
|
1055
|
-
"description": "Network for the query. Defaults to '
|
|
1083
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
1056
1084
|
},
|
|
1057
1085
|
"context_depth": {
|
|
1058
1086
|
"description": "BFS recursion depth for dependency expansion in assemble_context (default 0 = no expansion). When >0, the assembly recursively queries objects referenced by the center objects (permission, guard, machine, service, repositories, etc.) up to the given depth, using the same address-field extraction rules as extractAddressFields. Each level issues one batched query_objects call (≤50 IDs per batch). Cycles are detected and skipped via a visited set. Discovered dependencies are returned in `dependencies` (edge metadata) and `dependency_objects` (full object states). Recommended: 1–2 for most use cases; 3+ may pull large subgraphs (use context_include to constrain).",
|
|
@@ -1095,7 +1123,7 @@
|
|
|
1095
1123
|
"mainnet",
|
|
1096
1124
|
"localnet"
|
|
1097
1125
|
],
|
|
1098
|
-
"description": "Network for the query. Defaults to '
|
|
1126
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
1099
1127
|
},
|
|
1100
1128
|
"reverse_order_amount": {
|
|
1101
1129
|
"description": "Escrowed order amount (smallest-unit string) for reverse_map — included in the report summary as the concrete escrow mention.",
|
|
@@ -1192,7 +1220,7 @@
|
|
|
1192
1220
|
"mainnet",
|
|
1193
1221
|
"localnet"
|
|
1194
1222
|
],
|
|
1195
|
-
"description": "Network for the query. Defaults to '
|
|
1223
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
1196
1224
|
}
|
|
1197
1225
|
},
|
|
1198
1226
|
"required": [
|
|
@@ -1237,7 +1265,7 @@
|
|
|
1237
1265
|
"mainnet",
|
|
1238
1266
|
"localnet"
|
|
1239
1267
|
],
|
|
1240
|
-
"description": "Network for the query. Defaults to '
|
|
1268
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
1241
1269
|
}
|
|
1242
1270
|
},
|
|
1243
1271
|
"required": [
|
|
@@ -1282,7 +1310,7 @@
|
|
|
1282
1310
|
"mainnet",
|
|
1283
1311
|
"localnet"
|
|
1284
1312
|
],
|
|
1285
|
-
"description": "Network for the query. Defaults to '
|
|
1313
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
1286
1314
|
},
|
|
1287
1315
|
"account": {
|
|
1288
1316
|
"description": "Scope the aggregation to ONE account address (the client's current account). Omit to aggregate across ALL local accounts.",
|
|
@@ -1317,7 +1345,7 @@
|
|
|
1317
1345
|
"mainnet",
|
|
1318
1346
|
"localnet"
|
|
1319
1347
|
],
|
|
1320
|
-
"description": "Network for the query. Defaults to '
|
|
1348
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
1321
1349
|
},
|
|
1322
1350
|
"account": {
|
|
1323
1351
|
"description": "Scope to ONE account address (the client's current account). Omit to merge across ALL local accounts.",
|
|
@@ -1393,7 +1421,7 @@
|
|
|
1393
1421
|
"mainnet",
|
|
1394
1422
|
"localnet"
|
|
1395
1423
|
],
|
|
1396
|
-
"description": "Network for the query. Defaults to '
|
|
1424
|
+
"description": "Network for the query. Defaults to the user's CURRENT network (client UI selection / authority config) when omitted. 'localnet' is for internal test use against a local fullnode."
|
|
1397
1425
|
},
|
|
1398
1426
|
"intent": {
|
|
1399
1427
|
"description": "SEMANTIC exploration strategy (G3) — what this topology call is trying to establish. Deterministically shapes the edge whitelist, per-family depth caps and budget: full_map=complete structural map; order_health=order lifecycle+completion+disputes; fund_flow=payments+allocation waterfall+guard-gated splits; workflow=Machine node graphs+transitions+progress; counterparty=who is on the other side (buyer/seller/agents/operators); reputation=votes+arbitration record+contacts; permission=permission groups+bindings+entity tables; supply_chain=multi-leg allocation/sub-order settlement; arbitration=dispute cases+voters; demand_match=demand presenters+guards+rewards. When omitted, defaults come from the persona system (role default intents < account persona preference), then industry templates; every applied layer is reported in result.strategy.trace.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SdkDataPlane,expandTopology,orderCompletionInGraph}from'../graph/onchain/index.js';import{computeOrderFlow,computeMarketMetrics}from'../knowledge/market-metrics.js';import{computeJourneyFunnel,buildCustomerRelationships}from'../knowledge/market-operations.js';import{enumerateServices}from'../knowledge/jsonrpc-enum.js';import{assessArbitration}from'../evaluation/builtins/arbitration-score.js';import{runAccountEventWatchers}from'../customer/account-events.js';import{STRATEGY_METRIC_CATALOG}from'./metrics.js';const COMPLETED_RE=/completed|closed|finished|done/i;function toCustomerOrders(a){return a['map'](b=>({'id':b['id'],'customer':b['customer'],'time':b['time'],'disputed':b['disputed']??![]}));}const INDUSTRY_DISCOVERY_TERMS={'education':['education','tutor','course','class','learning','培训','课'],'rental':['rental','rent','lease','租'],'freelance':['freelance','agency','studio','consulting','design'],'subscription':['subscription','membership','member','订阅'],'travel':['travel','tour','trip','游'],'retail':['shop','store','retail','boutique','商城','店']};function discoveryTermsFor(a){const b=a['discovery_terms']??INDUSTRY_DISCOVERY_TERMS[a['industry']]??[a['industry']];return b['length']?b:[a['industry']];}const SHOP_ORDER_WINDOW_DEFAULT=0x64,MAX_PERMISSIONS_RESOLVED=0xa,MAX_SERVICES_RESOLVED=0x14,MAX_MACHINE_NODES=0xc8;export async function resolveShopOrderEvidence(a){const b=a['network']??'
|
|
1
|
+
import{Config}from'@wowok/wowok/w/local';import{SdkDataPlane,expandTopology,orderCompletionInGraph}from'../graph/onchain/index.js';import{computeOrderFlow,computeMarketMetrics}from'../knowledge/market-metrics.js';import{computeJourneyFunnel,buildCustomerRelationships}from'../knowledge/market-operations.js';import{enumerateServices}from'../knowledge/jsonrpc-enum.js';import{assessArbitration}from'../evaluation/builtins/arbitration-score.js';import{runAccountEventWatchers}from'../customer/account-events.js';import{STRATEGY_METRIC_CATALOG}from'./metrics.js';const COMPLETED_RE=/completed|closed|finished|done/i;function toCustomerOrders(a){return a['map'](b=>({'id':b['id'],'customer':b['customer'],'time':b['time'],'disputed':b['disputed']??![]}));}const INDUSTRY_DISCOVERY_TERMS={'education':['education','tutor','course','class','learning','培训','课'],'rental':['rental','rent','lease','租'],'freelance':['freelance','agency','studio','consulting','design'],'subscription':['subscription','membership','member','订阅'],'travel':['travel','tour','trip','游'],'retail':['shop','store','retail','boutique','商城','店']};function discoveryTermsFor(a){const b=a['discovery_terms']??INDUSTRY_DISCOVERY_TERMS[a['industry']]??[a['industry']];return b['length']?b:[a['industry']];}const SHOP_ORDER_WINDOW_DEFAULT=0x64,MAX_PERMISSIONS_RESOLVED=0xa,MAX_SERVICES_RESOLVED=0x14,MAX_MACHINE_NODES=0xc8;export async function resolveShopOrderEvidence(a){const b=a['network']??await Config['Instance']()['network_get'](),c=Math['max'](0x1,a['limit']??SHOP_ORDER_WINDOW_DEFAULT),d=new SdkDataPlane(b,{'noCache':a['no_cache']}),f=await expandTopology(d,{'network':b,'seed':a['account'],'budget':{'maxDepth':0x4,'maxNodes':0x4b0,'maxFanoutPerNode':c,'maxRpcs':0x64,'perKindCaps':{'eoa.permission':MAX_PERMISSIONS_RESOLVED,'permission.core_binding':MAX_SERVICES_RESOLVED,'service.order':c,'machine.node':MAX_MACHINE_NODES}},'edges':{'schemas':['eoa.permission','permission.core_binding','service.order','order.machine','order.progress'],'tableEdges':['machine.node']}}),g=new Set();for(const i of f['edges']){if(i['schema']!=='permission.core_binding')continue;if(f['nodes']['get'](i['to']['toLowerCase']())?.['objectType']==='Service')g['add'](i['to']['toLowerCase']());}if(g['size']===0x0&&f['gaps']['length']>0x0)throw new Error('shop\x20topology\x20unreadable\x20for\x20'+a['account']+':\x20'+f['gaps']['slice'](0x0,0x3)['join'](';\x20'));const h=[];for(const j of f['edges']){if(j['schema']!=='service.order'||!g['has'](j['from']['toLowerCase']()))continue;const k=f['nodes']['get'](j['to']['toLowerCase']());if(k?.['objectType']!=='Order'||!k['raw'])continue;const l=k['raw']['data']??k['raw'];h['push']({'id':j['to'],'customer':String(l['builder']??''),'time':Number(BigInt(l['time']??0x0)),'disputed':Array['isArray'](l['dispute'])&&l['dispute']['length']>0x0,'status':orderCompletionInGraph(f,j['to'])['status']});}return h['sort']((m,n)=>n['time']-m['time']),{'orders':h['slice'](0x0,c),'service_count':g['size'],'observed_total':h['length'],'truncated':h['length']>c,'unknown_workflow':h['filter'](m=>m['status']==='unknown')['length']};}const marketOperationsFetcher={'id':'market_operations',async 'fetch'(a){const b={},c=a['orders']??[];if(c['length']===0x0)return b;const d=c['filter'](i=>i['status']?COMPLETED_RE['test'](i['status']):![])['length'],e=computeJourneyFunnel({'due_diligence':a['due_diligence']??0x0,'orders':c['length'],'completed':d,'reviews':a['reviews_count']??0x0});b['order_count']=e['orders'],b['completed_count']=e['completed'],b['completion_rate']=e['order_completion_rate'];if(e['due_diligence']>0x0)b['dd_to_order_rate']=e['dd_to_order_rate'];const f=buildCustomerRelationships(toCustomerOrders(c)),g=f['filter'](i=>i['order_count']>=0x2)['length'];b['repeat_customer_rate']=f['length']>0x0?g/f['length']:0x0;const h=c['filter'](i=>i['disputed'])['length'];return b['dispute_rate']=h/c['length'],b;}},orderFlowFetcher={'id':'order_flow',async 'fetch'(a){const b=a['network']??await Config['Instance']()['network_get'](),c=await computeOrderFlow(b,{'noCache':a['no_cache'],'maxPages':Math['max'](0x1,Math['ceil']((a['limit']??0x64)/0x32))}),d=c['gmv_by_coin']['filter'](f=>f['coin']!=='unknown');let e;if(d['length']===0x1&&c['unclassified_orders']===0x0){const f=BigInt(d[0x0]['amount']);e=f<=BigInt(Number['MAX_SAFE_INTEGER'])?Number(f):{'note':'exact\x20'+d[0x0]['coin']+'\x20GMV\x20'+d[0x0]['amount']+'\x20base\x20units\x20exceeds\x202^53'};}else{const g=c['gmv_by_coin']['map'](h=>h['coin']+'='+h['amount']+'\x20('+h['orders']+'\x20orders)')['join'](';\x20');e={'note':'order\x20volume\x20spans\x20multiple/unresolved\x20coin\x20types\x20and\x20cannot\x20be\x20summed\x20into\x20one\x20GMV\x20'+('('+c['window']+');\x20per-coin\x20base-unit\x20volume:\x20'+(g||'none'))};}return{'market_recent_orders':c['order_count'],'market_recent_gmv':e};}},marketMetricsFetcher={'id':'market_metrics',async 'fetch'(a){const b=a['network']??await Config['Instance']()['network_get'](),c=await computeMarketMetrics(b,a['no_cache']),d={'market_active_services':c['active_services']};if(c['supply_demand_ratio']!==null)d['supply_demand_ratio']=c['supply_demand_ratio'];return d;}},discoverServicesFetcher={'id':'discover_services',async 'fetch'(a){const b=discoveryTermsFor(a)['map'](g=>g['toLowerCase']()),c=a['network']??await Config['Instance']()['network_get'](),d=await enumerateServices(c,{'max_objects':a['limit']??0xc8,'no_cache':a['no_cache']}),e=d['services']['filter'](g=>{const h=((g['name']??'')+'\x20'+(g['json']?.['description']??'')+'\x20'+(g['json']?.['category']??''))['toLowerCase']();return b['some'](i=>h['includes'](i));}),f={'category_enumerated_count':d['total_enumerated']};return f['competitor_count']=e['length']>0x0?e['length']:{'note':'no\x20enumerated\x20service\x20matched\x20the\x20discovery\x20terms;\x20category\x20density\x20reported\x20as\x20category_enumerated_count'},f;}},arbitrationScoreFetcher={'id':'arbitration_score',async 'fetch'(a){const b={};if(!a['arbitration_object'])return b;const c=await assessArbitration({'arbitration':{'object':a['arbitration_object']}});return b['arbitration_trust_score']=c['combined'],b;}},accountEventsFetcher={'id':'account_events',async 'fetch'(a){const b=await runAccountEventWatchers({'account':a['account'],'network':a['network']??await Config['Instance']()['network_get'](),'order_history':(a['orders']??[])['map'](c=>({'id':c['id'],'status':c['status']??''}))});return{'open_attention_count':b['length']};}};export const DEFAULT_METRIC_FETCHERS=[marketOperationsFetcher,orderFlowFetcher,marketMetricsFetcher,discoverServicesFetcher,arbitrationScoreFetcher,accountEventsFetcher];export async function collectScorecard(a,b={}){const c=b['fetchers']??DEFAULT_METRIC_FETCHERS,d=new Set(b['metricIds']??STRATEGY_METRIC_CATALOG['map'](n=>n['id'])),e=Date['now'](),f=[],g=[],h=[],i=new Map();for(const m of STRATEGY_METRIC_CATALOG){if(!d['has'](m['id']))continue;const n=i['get'](m['source'])??[];n['push']({'id':m['id']}),i['set'](m['source'],n);}let j=a;const k=['market_operations','account_events'];if(!a['orders']&&k['some'](o=>i['has'](o)))try{const o=b['resolveOrders']??(q=>resolveShopOrderEvidence(q)['then'](s=>s['orders'])),p=await o(a);p['length']>0x0&&(j={...a,'orders':p});}catch{}await Promise['all']([...i['entries']()]['map'](async([q,r])=>{const s=c['find'](v=>v['id']===q);let t={},u=null;if(!s)u='no\x20fetcher\x20registered\x20for\x20source\x20\x27'+q+'\x27';else try{t=await s['fetch'](j);}catch(v){u=v['message'];}for(const w of r){const x=t[w['id']],y=typeof x==='number'?x:x?.['value'],z=typeof x==='number'?undefined:x?.['note'];if(u)f['push']({'id':w['id'],'source':q,'status':'error','note':u,'collected_at':e}),h['push']({'id':w['id'],'error':u});else typeof y==='number'&&Number['isFinite'](y)?f['push']({'id':w['id'],'source':q,'status':'ok','value':y,'note':z,'collected_at':e}):(f['push']({'id':w['id'],'source':q,'status':'unavailable','note':z,'collected_at':e}),g['push'](w['id']));}}));const l=new Map(STRATEGY_METRIC_CATALOG['map']((q,r)=>[q['id'],r]));return f['sort']((q,r)=>(l['get'](q['id'])??0x0)-(l['get'](r['id'])??0x0)),{'account':a['account'],'industry':a['industry'],'network':a['network']??await Config['Instance']()['network_get'](),'collected_at':e,'metrics':f,'unavailable':g,'errors':h};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{listServices,getServiceInfo,toggle as
|
|
1
|
+
import{listServices,getServiceInfo,toggle as a358a,setEnabled as a358b,reset as a358c}from'../../config/index.js';import{strictParse}from'../../schema/index.js';import{ConfigOperationInputSchema}from'../../schema/config/index.js';export async function handleConfigOperation(a){const b=strictParse(ConfigOperationInputSchema,a,'config_operation\x20input'),{action:c,service:d}=b;let e;switch(c){case'list':e={'action':'list','services':listServices()};break;case'toggle':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20toggle');const f=d,g=getServiceInfo(f);if(!g)throw new Error('Unknown\x20service:\x20'+f+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');if(f==='confirm_gate'&&g['enabled'])throw new Error('confirm_gate\x20cannot\x20be\x20disabled\x20at\x20runtime.\x20'+'Set\x20WOWOK_CONFIRM_GATE=0\x20in\x20the\x20server\x20environment\x20and\x20restart\x20if\x20you\x20really\x20want\x20it\x20off.');const h=a358a(f);e={'action':'toggle','service':f,'enabled':h,'reminder':g['reminder']};break;}case'disable':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20disable');const i=d,j=getServiceInfo(i);if(!j)throw new Error('Unknown\x20service:\x20'+i+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');if(i==='confirm_gate')throw new Error('confirm_gate\x20cannot\x20be\x20disabled\x20at\x20runtime.\x20'+'Set\x20WOWOK_CONFIRM_GATE=0\x20in\x20the\x20server\x20environment\x20and\x20restart\x20if\x20you\x20really\x20want\x20it\x20off.');a358b(i,![]),e={'action':'disable','service':i,'enabled':![],'reminder':j['reminder']};break;}case'enable':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20enable');const k=d,l=getServiceInfo(k);if(!l)throw new Error('Unknown\x20service:\x20'+k+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');a358b(k,!![]),e={'action':'enable','service':k,'enabled':!![],'reminder':l['reminder']};break;}case'reset':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20reset');const m=d,n=getServiceInfo(m);if(!n)throw new Error('Unknown\x20service:\x20'+m+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');a358c(m),e={'action':'reset','service':m,'enabled':getServiceInfo(m)?.['enabled'],'reminder':n['reminder'],'reset':!![]};break;}case'info':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20info');const o=d,p=getServiceInfo(o);if(!p)throw new Error('Unknown\x20service:\x20'+o+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');e={'action':'info',...p};break;}default:throw new Error('Unknown\x20config_operation\x20action:\x20'+String(c));}return{'content':[{'type':'text','text':JSON['stringify']({'result':e})}],'structuredContent':{'result':e}};}
|