@wowok/agent-mcp 3.0.2 → 3.0.3
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/LICENSE +0 -3
- package/dist/harness/recover.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/knowledge/account-marks.js +1 -1
- package/dist/knowledge/arbitration-risk.js +1 -1
- package/dist/knowledge/flywheel-loop.d.ts +4 -52
- package/dist/knowledge/flywheel-loop.js +1 -1
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/index.d.ts +2 -225
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/machine-risk.js +1 -1
- package/dist/knowledge/machine-translation.js +1 -1
- package/dist/knowledge/onchain-constants.js +1 -1
- package/dist/knowledge/order-ledger.d.ts +2 -2
- package/dist/knowledge/order-ledger.js +1 -1
- package/dist/knowledge/order-puzzle.d.ts +4 -4
- package/dist/knowledge/order-puzzle.js +1 -1
- package/dist/knowledge/order-risk.d.ts +1 -0
- package/dist/knowledge/order-risk.js +1 -1
- package/dist/knowledge/order-templates.d.ts +1 -1
- package/dist/knowledge/order-templates.js +1 -1
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/service-risk.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/workspace-lists.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/context-assembly.d.ts +3 -1
- package/dist/playbooks/service-build/context-assembly.js +1 -1
- package/dist/playbooks/service-build/machine-nodes.d.ts +2 -0
- package/dist/playbooks/service-build/machine-nodes.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.d.ts +7 -0
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/review/machine.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/call/base.d.ts +12 -3
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +4 -0
- package/dist/schema/call/bridge.js +1 -1
- package/dist/schema/call/error-codes.d.ts +2 -0
- package/dist/schema/call/error-codes.js +1 -0
- package/dist/schema/call/guard.d.ts +4 -4
- package/dist/schema/call/semantic.d.ts +9 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/goal/index.d.ts +3 -3
- package/dist/schema/goal/planning.d.ts +2 -2
- package/dist/schema/industry-pack/index.d.ts +4 -4
- package/dist/schema/industry-pack/modes.d.ts +4 -4
- package/dist/schema/local/index.d.ts +558 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +25 -25
- package/dist/schema/operations.d.ts +1 -1
- package/dist/schema/persona/index.d.ts +2 -2
- package/dist/schema/query/bi.d.ts +0 -4
- package/dist/schema/query/bi.js +1 -1
- 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/trust/index.d.ts +3 -3
- package/dist/schema/workspace/index.d.ts +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +4 -0
- package/dist/schemas/bridge_operation.output.json +4 -0
- package/dist/schemas/index.json +7 -1
- package/dist/schemas/local_history_operation.output.json +1458 -0
- package/dist/schemas/local_history_operation.schema.json +105 -0
- package/dist/schemas/local_info_operation.output.json +4 -0
- package/dist/schemas/local_mark_operation.output.json +4 -0
- package/dist/schemas/onchain_operations.output.json +4 -1
- package/dist/schemas/onchain_operations.schema.json +30 -10
- package/dist/schemas/onchain_operations_guard.schema.json +30 -10
- package/dist/schemas/query_toolkit.output.json +17 -16
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/local.d.ts +1 -0
- package/dist/tools/handlers/local.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/registry/local.js +1 -1
- package/dist/tools/shared.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +2 -2
- package/dist/knowledge/allocation-confirm.d.ts +0 -115
- package/dist/knowledge/allocation-confirm.js +0 -1
- package/dist/knowledge/allocation-context.d.ts +0 -58
- package/dist/knowledge/allocation-context.js +0 -1
- package/dist/knowledge/allocation-translation.d.ts +0 -72
- package/dist/knowledge/allocation-translation.js +0 -1
- package/dist/knowledge/arb-confirm.d.ts +0 -28
- package/dist/knowledge/arb-confirm.js +0 -1
- package/dist/knowledge/arb-translation.d.ts +0 -48
- package/dist/knowledge/arb-translation.js +0 -1
- package/dist/knowledge/arbitration-confirm.d.ts +0 -135
- package/dist/knowledge/arbitration-confirm.js +0 -1
- package/dist/knowledge/arbitration-context.d.ts +0 -81
- package/dist/knowledge/arbitration-context.js +0 -1
- package/dist/knowledge/arbitration-translation.d.ts +0 -91
- package/dist/knowledge/arbitration-translation.js +0 -1
- package/dist/knowledge/bridge-confirm.d.ts +0 -26
- package/dist/knowledge/bridge-confirm.js +0 -1
- package/dist/knowledge/bridge-translation.d.ts +0 -37
- package/dist/knowledge/bridge-translation.js +0 -1
- package/dist/knowledge/contact-confirm.d.ts +0 -27
- package/dist/knowledge/contact-confirm.js +0 -1
- package/dist/knowledge/contact-translation.d.ts +0 -39
- package/dist/knowledge/contact-translation.js +0 -1
- package/dist/knowledge/demand-confirm.d.ts +0 -32
- package/dist/knowledge/demand-confirm.js +0 -1
- package/dist/knowledge/demand-context.d.ts +0 -17
- package/dist/knowledge/demand-context.js +0 -1
- package/dist/knowledge/demand-ledger.d.ts +0 -26
- package/dist/knowledge/demand-ledger.js +0 -1
- package/dist/knowledge/demand-puzzle.d.ts +0 -29
- package/dist/knowledge/demand-puzzle.js +0 -1
- package/dist/knowledge/demand-templates.d.ts +0 -12
- package/dist/knowledge/demand-templates.js +0 -1
- package/dist/knowledge/demand-translation.d.ts +0 -55
- package/dist/knowledge/demand-translation.js +0 -1
- package/dist/knowledge/examples-scanner-cli.d.ts +0 -1
- package/dist/knowledge/examples-scanner-cli.js +0 -1
- package/dist/knowledge/examples-scanner.d.ts +0 -121
- package/dist/knowledge/examples-scanner.js +0 -1
- package/dist/knowledge/glossary.d.ts +0 -18
- package/dist/knowledge/glossary.js +0 -1
- package/dist/knowledge/guard-bytecode-spec.d.ts +0 -82
- package/dist/knowledge/guard-bytecode-spec.js +0 -1
- package/dist/knowledge/guard-confirm.d.ts +0 -86
- package/dist/knowledge/guard-confirm.js +0 -1
- package/dist/knowledge/immutability.d.ts +0 -11
- package/dist/knowledge/immutability.js +0 -1
- package/dist/knowledge/machine-confirm.d.ts +0 -102
- package/dist/knowledge/machine-confirm.js +0 -1
- package/dist/knowledge/machine-context.d.ts +0 -160
- package/dist/knowledge/machine-context.js +0 -1
- package/dist/knowledge/machine-render.d.ts +0 -41
- package/dist/knowledge/machine-render.js +0 -1
- package/dist/knowledge/mcp-schema-audit-cli.d.ts +0 -1
- package/dist/knowledge/mcp-schema-audit-cli.js +0 -1
- package/dist/knowledge/mcp-schema-audit.d.ts +0 -91
- package/dist/knowledge/mcp-schema-audit.js +0 -1
- package/dist/knowledge/messenger-guard-guidance.d.ts +0 -17
- package/dist/knowledge/messenger-guard-guidance.js +0 -1
- package/dist/knowledge/order-confirm.d.ts +0 -115
- package/dist/knowledge/order-confirm.js +0 -1
- package/dist/knowledge/order-context.d.ts +0 -66
- package/dist/knowledge/order-context.js +0 -1
- package/dist/knowledge/order-translation.d.ts +0 -78
- package/dist/knowledge/order-translation.js +0 -1
- package/dist/knowledge/overrides-loader.d.ts +0 -13
- package/dist/knowledge/overrides-loader.js +0 -1
- package/dist/knowledge/passport-confirm.d.ts +0 -130
- package/dist/knowledge/passport-confirm.js +0 -1
- package/dist/knowledge/passport-context.d.ts +0 -59
- package/dist/knowledge/passport-context.js +0 -1
- package/dist/knowledge/passport-puzzle.d.ts +0 -108
- package/dist/knowledge/passport-puzzle.js +0 -1
- package/dist/knowledge/passport-risk.d.ts +0 -70
- package/dist/knowledge/passport-risk.js +0 -1
- package/dist/knowledge/passport-translation.d.ts +0 -68
- package/dist/knowledge/passport-translation.js +0 -1
- package/dist/knowledge/payment-confirm.d.ts +0 -26
- package/dist/knowledge/payment-confirm.js +0 -1
- package/dist/knowledge/payment-translation.d.ts +0 -37
- package/dist/knowledge/payment-translation.js +0 -1
- package/dist/knowledge/permission-confirm.d.ts +0 -110
- package/dist/knowledge/permission-confirm.js +0 -1
- package/dist/knowledge/permission-context.d.ts +0 -69
- package/dist/knowledge/permission-context.js +0 -1
- package/dist/knowledge/permission-translation.d.ts +0 -57
- package/dist/knowledge/permission-translation.js +0 -1
- package/dist/knowledge/personal-confirm.d.ts +0 -29
- package/dist/knowledge/personal-confirm.js +0 -1
- package/dist/knowledge/personal-translation.d.ts +0 -37
- package/dist/knowledge/personal-translation.js +0 -1
- package/dist/knowledge/process-model.d.ts +0 -14
- package/dist/knowledge/process-model.js +0 -1
- package/dist/knowledge/progress-confirm.d.ts +0 -108
- package/dist/knowledge/progress-confirm.js +0 -1
- package/dist/knowledge/progress-context.d.ts +0 -123
- package/dist/knowledge/progress-context.js +0 -1
- package/dist/knowledge/progress-translation.d.ts +0 -52
- package/dist/knowledge/progress-translation.js +0 -1
- package/dist/knowledge/proof-confirm.d.ts +0 -31
- package/dist/knowledge/proof-confirm.js +0 -1
- package/dist/knowledge/proof-context.d.ts +0 -17
- package/dist/knowledge/proof-context.js +0 -1
- package/dist/knowledge/proof-ledger.d.ts +0 -34
- package/dist/knowledge/proof-ledger.js +0 -1
- package/dist/knowledge/proof-puzzle.d.ts +0 -35
- package/dist/knowledge/proof-puzzle.js +0 -1
- package/dist/knowledge/proof-templates.d.ts +0 -22
- package/dist/knowledge/proof-templates.js +0 -1
- package/dist/knowledge/proof-translation.d.ts +0 -52
- package/dist/knowledge/proof-translation.js +0 -1
- package/dist/knowledge/registrar-confirm.d.ts +0 -26
- package/dist/knowledge/registrar-confirm.js +0 -1
- package/dist/knowledge/registrar-translation.d.ts +0 -37
- package/dist/knowledge/registrar-translation.js +0 -1
- package/dist/knowledge/repository-confirm.d.ts +0 -40
- package/dist/knowledge/repository-confirm.js +0 -1
- package/dist/knowledge/repository-context.d.ts +0 -12
- package/dist/knowledge/repository-context.js +0 -1
- package/dist/knowledge/repository-ledger.d.ts +0 -25
- package/dist/knowledge/repository-ledger.js +0 -1
- package/dist/knowledge/repository-puzzle.d.ts +0 -30
- package/dist/knowledge/repository-puzzle.js +0 -1
- package/dist/knowledge/repository-templates.d.ts +0 -14
- package/dist/knowledge/repository-templates.js +0 -1
- package/dist/knowledge/repository-translation.d.ts +0 -58
- package/dist/knowledge/repository-translation.js +0 -1
- package/dist/knowledge/resource-confirm.d.ts +0 -25
- package/dist/knowledge/resource-confirm.js +0 -1
- package/dist/knowledge/resource-translation.d.ts +0 -37
- package/dist/knowledge/resource-translation.js +0 -1
- package/dist/knowledge/reward-confirm.d.ts +0 -116
- package/dist/knowledge/reward-confirm.js +0 -1
- package/dist/knowledge/reward-context.d.ts +0 -127
- package/dist/knowledge/reward-context.js +0 -1
- package/dist/knowledge/reward-translation.d.ts +0 -58
- package/dist/knowledge/reward-translation.js +0 -1
- package/dist/knowledge/service-confirm.d.ts +0 -161
- package/dist/knowledge/service-confirm.js +0 -1
- package/dist/knowledge/service-context.d.ts +0 -66
- package/dist/knowledge/service-context.js +0 -1
- package/dist/knowledge/service-translation.d.ts +0 -103
- package/dist/knowledge/service-translation.js +0 -1
- package/dist/knowledge/treasury-confirm.d.ts +0 -133
- package/dist/knowledge/treasury-confirm.js +0 -1
- package/dist/knowledge/treasury-context.d.ts +0 -64
- package/dist/knowledge/treasury-context.js +0 -1
- package/dist/knowledge/treasury-translation.d.ts +0 -78
- package/dist/knowledge/treasury-translation.js +0 -1
- package/dist/knowledge/util-confirm.d.ts +0 -24
- package/dist/knowledge/util-confirm.js +0 -1
- package/dist/knowledge/util-translation.d.ts +0 -39
- package/dist/knowledge/util-translation.js +0 -1
- package/dist/loop-engineering/aggregate.d.ts +0 -50
- package/dist/loop-engineering/aggregate.js +0 -1
- package/dist/loop-engineering/context-collect.d.ts +0 -7
- package/dist/loop-engineering/context-collect.js +0 -1
- package/dist/loop-engineering/diagnose.d.ts +0 -22
- package/dist/loop-engineering/diagnose.js +0 -1
- package/dist/loop-engineering/improve.d.ts +0 -55
- package/dist/loop-engineering/improve.js +0 -1
- package/dist/loop-engineering/index.d.ts +0 -4
- package/dist/loop-engineering/index.js +0 -1
- package/dist/loop-engineering/pipeline.d.ts +0 -17
- package/dist/loop-engineering/pipeline.js +0 -1
- package/dist/schema/utils/object-type-utils.d.ts +0 -12
- package/dist/schema/utils/object-type-utils.js +0 -1
- package/dist/telemetry/index.d.ts +0 -19
- package/dist/telemetry/index.js +0 -1
- package/dist/telemetry/redact.d.ts +0 -2
- package/dist/telemetry/redact.js +0 -1
- package/dist/telemetry/storage.d.ts +0 -8
- package/dist/telemetry/storage.js +0 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://wowok.net/schemas/local_history_operation.json",
|
|
4
|
+
"title": "Local History Operations",
|
|
5
|
+
"description": "Local visit-history operations. Exactly one operation type (add/remove/clear) may be specified as a NESTED field; omit all fields to list history (newest first). Example: {add: {op:'add', data:[...]}} — NOT flat {op:'add', data:[...]}.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"add": {
|
|
9
|
+
"description": "Record one or more object visits (upsert by key)",
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"op": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"const": "add",
|
|
15
|
+
"description": "Operation type: add history visits"
|
|
16
|
+
},
|
|
17
|
+
"data": {
|
|
18
|
+
"minItems": 1,
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"key": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1,
|
|
26
|
+
"description": "Stable identity key of the visited object"
|
|
27
|
+
},
|
|
28
|
+
"objType": {
|
|
29
|
+
"description": "Object type tag for detail visits (short form, e.g. 'Machine')",
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"address": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Canonical 0x address of the visited object"
|
|
35
|
+
},
|
|
36
|
+
"network": {
|
|
37
|
+
"description": "Network of the visit; resolved to the config default when omitted",
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"ts": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": -9007199254740991,
|
|
43
|
+
"maximum": 9007199254740991,
|
|
44
|
+
"description": "Visit timestamp (ms epoch)"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"key",
|
|
49
|
+
"address",
|
|
50
|
+
"ts"
|
|
51
|
+
],
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"description": "One history visit (identity-only; display names are resolved live)"
|
|
54
|
+
},
|
|
55
|
+
"description": "Array of visits to record (at least 1 item)"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": [
|
|
59
|
+
"op",
|
|
60
|
+
"data"
|
|
61
|
+
],
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
},
|
|
64
|
+
"remove": {
|
|
65
|
+
"description": "Remove history entries by key",
|
|
66
|
+
"type": "object",
|
|
67
|
+
"properties": {
|
|
68
|
+
"op": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"const": "remove",
|
|
71
|
+
"description": "Operation type: remove history entries"
|
|
72
|
+
},
|
|
73
|
+
"keys": {
|
|
74
|
+
"minItems": 1,
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
"description": "Array of history entry keys to remove"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"op",
|
|
84
|
+
"keys"
|
|
85
|
+
],
|
|
86
|
+
"additionalProperties": false
|
|
87
|
+
},
|
|
88
|
+
"clear": {
|
|
89
|
+
"description": "Remove all history entries",
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"op": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"const": "clear",
|
|
95
|
+
"description": "Operation type: clear all history"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"required": [
|
|
99
|
+
"op"
|
|
100
|
+
],
|
|
101
|
+
"additionalProperties": false
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
}
|
|
@@ -54,8 +54,12 @@
|
|
|
54
54
|
"guard_rejected",
|
|
55
55
|
"state_conflict",
|
|
56
56
|
"insufficient_balance",
|
|
57
|
+
"stock_exhausted",
|
|
58
|
+
"sale_suspended",
|
|
59
|
+
"discount_invalid",
|
|
57
60
|
"object_not_found",
|
|
58
61
|
"permission_denied",
|
|
62
|
+
"time_lock_not_elapsed",
|
|
59
63
|
"immutable_violation",
|
|
60
64
|
"network_error",
|
|
61
65
|
"rate_limit",
|
|
@@ -131,8 +131,12 @@
|
|
|
131
131
|
"guard_rejected",
|
|
132
132
|
"state_conflict",
|
|
133
133
|
"insufficient_balance",
|
|
134
|
+
"stock_exhausted",
|
|
135
|
+
"sale_suspended",
|
|
136
|
+
"discount_invalid",
|
|
134
137
|
"object_not_found",
|
|
135
138
|
"permission_denied",
|
|
139
|
+
"time_lock_not_elapsed",
|
|
136
140
|
"immutable_violation",
|
|
137
141
|
"network_error",
|
|
138
142
|
"rate_limit",
|
|
@@ -2586,13 +2586,16 @@
|
|
|
2586
2586
|
"description": "Human-readable error message from the chain or SDK. Relation: enriched via enrichMoveError before classification. Example: 'Insufficient balance for gas'"
|
|
2587
2587
|
},
|
|
2588
2588
|
"error_code": {
|
|
2589
|
-
"description": "Error classification for programmatic recovery. Constraint: enum
|
|
2589
|
+
"description": "Error classification for programmatic recovery. Constraint: enum values single-sourced from error-codes.ts (must match ErrorCode in semantic.ts). Relation: drives Recover Loop strategy selection. Example: 'insufficient_balance'",
|
|
2590
2590
|
"type": "string",
|
|
2591
2591
|
"enum": [
|
|
2592
2592
|
"invalid_parameter",
|
|
2593
2593
|
"guard_rejected",
|
|
2594
2594
|
"state_conflict",
|
|
2595
2595
|
"insufficient_balance",
|
|
2596
|
+
"stock_exhausted",
|
|
2597
|
+
"sale_suspended",
|
|
2598
|
+
"discount_invalid",
|
|
2596
2599
|
"object_not_found",
|
|
2597
2600
|
"permission_denied",
|
|
2598
2601
|
"time_lock_not_elapsed",
|
|
@@ -14321,11 +14321,13 @@
|
|
|
14321
14321
|
"const": "vec_contains_bool"
|
|
14322
14322
|
},
|
|
14323
14323
|
"nodes": {
|
|
14324
|
+
"minItems": 2,
|
|
14325
|
+
"maxItems": 8,
|
|
14324
14326
|
"type": "array",
|
|
14325
14327
|
"items": {
|
|
14326
14328
|
"$ref": "#/definitions/__schema2"
|
|
14327
14329
|
},
|
|
14328
|
-
"description": "
|
|
14330
|
+
"description": "First node must be VecBool (ValueType=9) or Value (ValueType=19), remaining nodes must be Bool (ValueType=0) or Value (ValueType=19)."
|
|
14329
14331
|
}
|
|
14330
14332
|
},
|
|
14331
14333
|
"required": [
|
|
@@ -14343,11 +14345,13 @@
|
|
|
14343
14345
|
"const": "vec_contains_address"
|
|
14344
14346
|
},
|
|
14345
14347
|
"nodes": {
|
|
14348
|
+
"minItems": 2,
|
|
14349
|
+
"maxItems": 8,
|
|
14346
14350
|
"type": "array",
|
|
14347
14351
|
"items": {
|
|
14348
14352
|
"$ref": "#/definitions/__schema2"
|
|
14349
14353
|
},
|
|
14350
|
-
"description": "
|
|
14354
|
+
"description": "First node must be VecAddress (ValueType=10) or Value (ValueType=19), remaining nodes must be Address (ValueType=1) or Value (ValueType=19)."
|
|
14351
14355
|
}
|
|
14352
14356
|
},
|
|
14353
14357
|
"required": [
|
|
@@ -14365,11 +14369,13 @@
|
|
|
14365
14369
|
"const": "vec_contains_string"
|
|
14366
14370
|
},
|
|
14367
14371
|
"nodes": {
|
|
14372
|
+
"minItems": 2,
|
|
14373
|
+
"maxItems": 8,
|
|
14368
14374
|
"type": "array",
|
|
14369
14375
|
"items": {
|
|
14370
14376
|
"$ref": "#/definitions/__schema2"
|
|
14371
14377
|
},
|
|
14372
|
-
"description": "
|
|
14378
|
+
"description": "First node must be VecString (ValueType=11) or Value (ValueType=19), remaining nodes must be String (ValueType=2) or Value (ValueType=19)."
|
|
14373
14379
|
}
|
|
14374
14380
|
},
|
|
14375
14381
|
"required": [
|
|
@@ -14387,11 +14393,13 @@
|
|
|
14387
14393
|
"const": "vec_contains_string_nocase"
|
|
14388
14394
|
},
|
|
14389
14395
|
"nodes": {
|
|
14396
|
+
"minItems": 2,
|
|
14397
|
+
"maxItems": 8,
|
|
14390
14398
|
"type": "array",
|
|
14391
14399
|
"items": {
|
|
14392
14400
|
"$ref": "#/definitions/__schema2"
|
|
14393
14401
|
},
|
|
14394
|
-
"description": "
|
|
14402
|
+
"description": "First node must be VecString (ValueType=11) or Value (ValueType=19), remaining nodes must be String (ValueType=2) or Value (ValueType=19)."
|
|
14395
14403
|
}
|
|
14396
14404
|
},
|
|
14397
14405
|
"required": [
|
|
@@ -14409,11 +14417,13 @@
|
|
|
14409
14417
|
"const": "vec_contains_number"
|
|
14410
14418
|
},
|
|
14411
14419
|
"nodes": {
|
|
14420
|
+
"minItems": 2,
|
|
14421
|
+
"maxItems": 8,
|
|
14412
14422
|
"type": "array",
|
|
14413
14423
|
"items": {
|
|
14414
14424
|
"$ref": "#/definitions/__schema2"
|
|
14415
14425
|
},
|
|
14416
|
-
"description": "
|
|
14426
|
+
"description": "First node must be VecU8 (12), VecU16 (13), VecU32 (14), VecU64 (15), VecU128 (16), VecU256 (17) or Value (ValueType=19), remaining nodes must be U8 (3), U16 (4), U32 (5), U64 (6), U128 (7), U256 (8) or Value (ValueType=19)."
|
|
14417
14427
|
}
|
|
14418
14428
|
},
|
|
14419
14429
|
"required": [
|
|
@@ -21385,11 +21395,13 @@
|
|
|
21385
21395
|
"const": "vec_contains_bool"
|
|
21386
21396
|
},
|
|
21387
21397
|
"nodes": {
|
|
21398
|
+
"minItems": 2,
|
|
21399
|
+
"maxItems": 8,
|
|
21388
21400
|
"type": "array",
|
|
21389
21401
|
"items": {
|
|
21390
21402
|
"$ref": "#/definitions/__schema2"
|
|
21391
21403
|
},
|
|
21392
|
-
"description": "
|
|
21404
|
+
"description": "First node must be VecBool (ValueType=9) or Value (ValueType=19), remaining nodes must be Bool (ValueType=0) or Value (ValueType=19)."
|
|
21393
21405
|
}
|
|
21394
21406
|
},
|
|
21395
21407
|
"required": [
|
|
@@ -21407,11 +21419,13 @@
|
|
|
21407
21419
|
"const": "vec_contains_address"
|
|
21408
21420
|
},
|
|
21409
21421
|
"nodes": {
|
|
21422
|
+
"minItems": 2,
|
|
21423
|
+
"maxItems": 8,
|
|
21410
21424
|
"type": "array",
|
|
21411
21425
|
"items": {
|
|
21412
21426
|
"$ref": "#/definitions/__schema2"
|
|
21413
21427
|
},
|
|
21414
|
-
"description": "
|
|
21428
|
+
"description": "First node must be VecAddress (ValueType=10) or Value (ValueType=19), remaining nodes must be Address (ValueType=1) or Value (ValueType=19)."
|
|
21415
21429
|
}
|
|
21416
21430
|
},
|
|
21417
21431
|
"required": [
|
|
@@ -21429,11 +21443,13 @@
|
|
|
21429
21443
|
"const": "vec_contains_string"
|
|
21430
21444
|
},
|
|
21431
21445
|
"nodes": {
|
|
21446
|
+
"minItems": 2,
|
|
21447
|
+
"maxItems": 8,
|
|
21432
21448
|
"type": "array",
|
|
21433
21449
|
"items": {
|
|
21434
21450
|
"$ref": "#/definitions/__schema2"
|
|
21435
21451
|
},
|
|
21436
|
-
"description": "
|
|
21452
|
+
"description": "First node must be VecString (ValueType=11) or Value (ValueType=19), remaining nodes must be String (ValueType=2) or Value (ValueType=19)."
|
|
21437
21453
|
}
|
|
21438
21454
|
},
|
|
21439
21455
|
"required": [
|
|
@@ -21451,11 +21467,13 @@
|
|
|
21451
21467
|
"const": "vec_contains_string_nocase"
|
|
21452
21468
|
},
|
|
21453
21469
|
"nodes": {
|
|
21470
|
+
"minItems": 2,
|
|
21471
|
+
"maxItems": 8,
|
|
21454
21472
|
"type": "array",
|
|
21455
21473
|
"items": {
|
|
21456
21474
|
"$ref": "#/definitions/__schema2"
|
|
21457
21475
|
},
|
|
21458
|
-
"description": "
|
|
21476
|
+
"description": "First node must be VecString (ValueType=11) or Value (ValueType=19), remaining nodes must be String (ValueType=2) or Value (ValueType=19)."
|
|
21459
21477
|
}
|
|
21460
21478
|
},
|
|
21461
21479
|
"required": [
|
|
@@ -21473,11 +21491,13 @@
|
|
|
21473
21491
|
"const": "vec_contains_number"
|
|
21474
21492
|
},
|
|
21475
21493
|
"nodes": {
|
|
21494
|
+
"minItems": 2,
|
|
21495
|
+
"maxItems": 8,
|
|
21476
21496
|
"type": "array",
|
|
21477
21497
|
"items": {
|
|
21478
21498
|
"$ref": "#/definitions/__schema2"
|
|
21479
21499
|
},
|
|
21480
|
-
"description": "
|
|
21500
|
+
"description": "First node must be VecU8 (12), VecU16 (13), VecU32 (14), VecU64 (15), VecU128 (16), VecU256 (17) or Value (ValueType=19), remaining nodes must be U8 (3), U16 (4), U32 (5), U64 (6), U128 (7), U256 (8) or Value (ValueType=19)."
|
|
21481
21501
|
}
|
|
21482
21502
|
},
|
|
21483
21503
|
"required": [
|
|
@@ -1285,11 +1285,13 @@
|
|
|
1285
1285
|
"const": "vec_contains_bool"
|
|
1286
1286
|
},
|
|
1287
1287
|
"nodes": {
|
|
1288
|
+
"minItems": 2,
|
|
1289
|
+
"maxItems": 8,
|
|
1288
1290
|
"type": "array",
|
|
1289
1291
|
"items": {
|
|
1290
1292
|
"$ref": "#/definitions/__schema0"
|
|
1291
1293
|
},
|
|
1292
|
-
"description": "
|
|
1294
|
+
"description": "First node must be VecBool (ValueType=9) or Value (ValueType=19), remaining nodes must be Bool (ValueType=0) or Value (ValueType=19)."
|
|
1293
1295
|
}
|
|
1294
1296
|
},
|
|
1295
1297
|
"required": [
|
|
@@ -1307,11 +1309,13 @@
|
|
|
1307
1309
|
"const": "vec_contains_address"
|
|
1308
1310
|
},
|
|
1309
1311
|
"nodes": {
|
|
1312
|
+
"minItems": 2,
|
|
1313
|
+
"maxItems": 8,
|
|
1310
1314
|
"type": "array",
|
|
1311
1315
|
"items": {
|
|
1312
1316
|
"$ref": "#/definitions/__schema0"
|
|
1313
1317
|
},
|
|
1314
|
-
"description": "
|
|
1318
|
+
"description": "First node must be VecAddress (ValueType=10) or Value (ValueType=19), remaining nodes must be Address (ValueType=1) or Value (ValueType=19)."
|
|
1315
1319
|
}
|
|
1316
1320
|
},
|
|
1317
1321
|
"required": [
|
|
@@ -1329,11 +1333,13 @@
|
|
|
1329
1333
|
"const": "vec_contains_string"
|
|
1330
1334
|
},
|
|
1331
1335
|
"nodes": {
|
|
1336
|
+
"minItems": 2,
|
|
1337
|
+
"maxItems": 8,
|
|
1332
1338
|
"type": "array",
|
|
1333
1339
|
"items": {
|
|
1334
1340
|
"$ref": "#/definitions/__schema0"
|
|
1335
1341
|
},
|
|
1336
|
-
"description": "
|
|
1342
|
+
"description": "First node must be VecString (ValueType=11) or Value (ValueType=19), remaining nodes must be String (ValueType=2) or Value (ValueType=19)."
|
|
1337
1343
|
}
|
|
1338
1344
|
},
|
|
1339
1345
|
"required": [
|
|
@@ -1351,11 +1357,13 @@
|
|
|
1351
1357
|
"const": "vec_contains_string_nocase"
|
|
1352
1358
|
},
|
|
1353
1359
|
"nodes": {
|
|
1360
|
+
"minItems": 2,
|
|
1361
|
+
"maxItems": 8,
|
|
1354
1362
|
"type": "array",
|
|
1355
1363
|
"items": {
|
|
1356
1364
|
"$ref": "#/definitions/__schema0"
|
|
1357
1365
|
},
|
|
1358
|
-
"description": "
|
|
1366
|
+
"description": "First node must be VecString (ValueType=11) or Value (ValueType=19), remaining nodes must be String (ValueType=2) or Value (ValueType=19)."
|
|
1359
1367
|
}
|
|
1360
1368
|
},
|
|
1361
1369
|
"required": [
|
|
@@ -1373,11 +1381,13 @@
|
|
|
1373
1381
|
"const": "vec_contains_number"
|
|
1374
1382
|
},
|
|
1375
1383
|
"nodes": {
|
|
1384
|
+
"minItems": 2,
|
|
1385
|
+
"maxItems": 8,
|
|
1376
1386
|
"type": "array",
|
|
1377
1387
|
"items": {
|
|
1378
1388
|
"$ref": "#/definitions/__schema0"
|
|
1379
1389
|
},
|
|
1380
|
-
"description": "
|
|
1390
|
+
"description": "First node must be VecU8 (12), VecU16 (13), VecU32 (14), VecU64 (15), VecU128 (16), VecU256 (17) or Value (ValueType=19), remaining nodes must be U8 (3), U16 (4), U32 (5), U64 (6), U128 (7), U256 (8) or Value (ValueType=19)."
|
|
1381
1391
|
}
|
|
1382
1392
|
},
|
|
1383
1393
|
"required": [
|
|
@@ -3259,11 +3269,13 @@
|
|
|
3259
3269
|
"const": "vec_contains_bool"
|
|
3260
3270
|
},
|
|
3261
3271
|
"nodes": {
|
|
3272
|
+
"minItems": 2,
|
|
3273
|
+
"maxItems": 8,
|
|
3262
3274
|
"type": "array",
|
|
3263
3275
|
"items": {
|
|
3264
3276
|
"$ref": "#/definitions/__schema0"
|
|
3265
3277
|
},
|
|
3266
|
-
"description": "
|
|
3278
|
+
"description": "First node must be VecBool (ValueType=9) or Value (ValueType=19), remaining nodes must be Bool (ValueType=0) or Value (ValueType=19)."
|
|
3267
3279
|
}
|
|
3268
3280
|
},
|
|
3269
3281
|
"required": [
|
|
@@ -3281,11 +3293,13 @@
|
|
|
3281
3293
|
"const": "vec_contains_address"
|
|
3282
3294
|
},
|
|
3283
3295
|
"nodes": {
|
|
3296
|
+
"minItems": 2,
|
|
3297
|
+
"maxItems": 8,
|
|
3284
3298
|
"type": "array",
|
|
3285
3299
|
"items": {
|
|
3286
3300
|
"$ref": "#/definitions/__schema0"
|
|
3287
3301
|
},
|
|
3288
|
-
"description": "
|
|
3302
|
+
"description": "First node must be VecAddress (ValueType=10) or Value (ValueType=19), remaining nodes must be Address (ValueType=1) or Value (ValueType=19)."
|
|
3289
3303
|
}
|
|
3290
3304
|
},
|
|
3291
3305
|
"required": [
|
|
@@ -3303,11 +3317,13 @@
|
|
|
3303
3317
|
"const": "vec_contains_string"
|
|
3304
3318
|
},
|
|
3305
3319
|
"nodes": {
|
|
3320
|
+
"minItems": 2,
|
|
3321
|
+
"maxItems": 8,
|
|
3306
3322
|
"type": "array",
|
|
3307
3323
|
"items": {
|
|
3308
3324
|
"$ref": "#/definitions/__schema0"
|
|
3309
3325
|
},
|
|
3310
|
-
"description": "
|
|
3326
|
+
"description": "First node must be VecString (ValueType=11) or Value (ValueType=19), remaining nodes must be String (ValueType=2) or Value (ValueType=19)."
|
|
3311
3327
|
}
|
|
3312
3328
|
},
|
|
3313
3329
|
"required": [
|
|
@@ -3325,11 +3341,13 @@
|
|
|
3325
3341
|
"const": "vec_contains_string_nocase"
|
|
3326
3342
|
},
|
|
3327
3343
|
"nodes": {
|
|
3344
|
+
"minItems": 2,
|
|
3345
|
+
"maxItems": 8,
|
|
3328
3346
|
"type": "array",
|
|
3329
3347
|
"items": {
|
|
3330
3348
|
"$ref": "#/definitions/__schema0"
|
|
3331
3349
|
},
|
|
3332
|
-
"description": "
|
|
3350
|
+
"description": "First node must be VecString (ValueType=11) or Value (ValueType=19), remaining nodes must be String (ValueType=2) or Value (ValueType=19)."
|
|
3333
3351
|
}
|
|
3334
3352
|
},
|
|
3335
3353
|
"required": [
|
|
@@ -3347,11 +3365,13 @@
|
|
|
3347
3365
|
"const": "vec_contains_number"
|
|
3348
3366
|
},
|
|
3349
3367
|
"nodes": {
|
|
3368
|
+
"minItems": 2,
|
|
3369
|
+
"maxItems": 8,
|
|
3350
3370
|
"type": "array",
|
|
3351
3371
|
"items": {
|
|
3352
3372
|
"$ref": "#/definitions/__schema0"
|
|
3353
3373
|
},
|
|
3354
|
-
"description": "
|
|
3374
|
+
"description": "First node must be VecU8 (12), VecU16 (13), VecU32 (14), VecU64 (15), VecU128 (16), VecU256 (17) or Value (ValueType=19), remaining nodes must be U8 (3), U16 (4), U32 (5), U64 (6), U128 (7), U256 (8) or Value (ValueType=19)."
|
|
3355
3375
|
}
|
|
3356
3376
|
},
|
|
3357
3377
|
"required": [
|
|
@@ -16287,25 +16287,16 @@
|
|
|
16287
16287
|
"description": "Suggested next action: use onchain_transaction to verify a specific past tx, or proceed with onchain_operations to modify state, or re-call assemble_context after state changes."
|
|
16288
16288
|
},
|
|
16289
16289
|
"flywheel_collected": {
|
|
16290
|
-
"description": "
|
|
16290
|
+
"description": "Experience-layer collection result. Non-blocking — may be undefined if collection fails. When present, the assembled context has been fed back into the experience layer for future pattern matching.",
|
|
16291
16291
|
"type": "object",
|
|
16292
16292
|
"properties": {
|
|
16293
16293
|
"signature_recorded": {
|
|
16294
16294
|
"type": "boolean",
|
|
16295
16295
|
"description": "Whether the experience signature was recorded in the real-time experience layer."
|
|
16296
|
-
},
|
|
16297
|
-
"proposal_created": {
|
|
16298
|
-
"type": "boolean",
|
|
16299
|
-
"description": "Whether an improvement proposal was created for the offline distillation flywheel."
|
|
16300
|
-
},
|
|
16301
|
-
"proposal_id": {
|
|
16302
|
-
"description": "The proposal ID, if created.",
|
|
16303
|
-
"type": "string"
|
|
16304
16296
|
}
|
|
16305
16297
|
},
|
|
16306
16298
|
"required": [
|
|
16307
|
-
"signature_recorded"
|
|
16308
|
-
"proposal_created"
|
|
16299
|
+
"signature_recorded"
|
|
16309
16300
|
],
|
|
16310
16301
|
"additionalProperties": false
|
|
16311
16302
|
}
|
|
@@ -20710,6 +20701,8 @@
|
|
|
20710
20701
|
"const": "vec_contains_bool"
|
|
20711
20702
|
},
|
|
20712
20703
|
"nodes": {
|
|
20704
|
+
"minItems": 2,
|
|
20705
|
+
"maxItems": 8,
|
|
20713
20706
|
"type": "array",
|
|
20714
20707
|
"items": {
|
|
20715
20708
|
"description": "Guard node: represents an operation instruction in Guard. Each node returns a value of a specific type, computed from its child nodes or context.",
|
|
@@ -20719,7 +20712,7 @@
|
|
|
20719
20712
|
}
|
|
20720
20713
|
]
|
|
20721
20714
|
},
|
|
20722
|
-
"description": "
|
|
20715
|
+
"description": "First node must be VecBool (ValueType=9) or Value (ValueType=19), remaining nodes must be Bool (ValueType=0) or Value (ValueType=19)."
|
|
20723
20716
|
}
|
|
20724
20717
|
},
|
|
20725
20718
|
"required": [
|
|
@@ -20737,6 +20730,8 @@
|
|
|
20737
20730
|
"const": "vec_contains_address"
|
|
20738
20731
|
},
|
|
20739
20732
|
"nodes": {
|
|
20733
|
+
"minItems": 2,
|
|
20734
|
+
"maxItems": 8,
|
|
20740
20735
|
"type": "array",
|
|
20741
20736
|
"items": {
|
|
20742
20737
|
"description": "Guard node: represents an operation instruction in Guard. Each node returns a value of a specific type, computed from its child nodes or context.",
|
|
@@ -20746,7 +20741,7 @@
|
|
|
20746
20741
|
}
|
|
20747
20742
|
]
|
|
20748
20743
|
},
|
|
20749
|
-
"description": "
|
|
20744
|
+
"description": "First node must be VecAddress (ValueType=10) or Value (ValueType=19), remaining nodes must be Address (ValueType=1) or Value (ValueType=19)."
|
|
20750
20745
|
}
|
|
20751
20746
|
},
|
|
20752
20747
|
"required": [
|
|
@@ -20764,6 +20759,8 @@
|
|
|
20764
20759
|
"const": "vec_contains_string"
|
|
20765
20760
|
},
|
|
20766
20761
|
"nodes": {
|
|
20762
|
+
"minItems": 2,
|
|
20763
|
+
"maxItems": 8,
|
|
20767
20764
|
"type": "array",
|
|
20768
20765
|
"items": {
|
|
20769
20766
|
"description": "Guard node: represents an operation instruction in Guard. Each node returns a value of a specific type, computed from its child nodes or context.",
|
|
@@ -20773,7 +20770,7 @@
|
|
|
20773
20770
|
}
|
|
20774
20771
|
]
|
|
20775
20772
|
},
|
|
20776
|
-
"description": "
|
|
20773
|
+
"description": "First node must be VecString (ValueType=11) or Value (ValueType=19), remaining nodes must be String (ValueType=2) or Value (ValueType=19)."
|
|
20777
20774
|
}
|
|
20778
20775
|
},
|
|
20779
20776
|
"required": [
|
|
@@ -20791,6 +20788,8 @@
|
|
|
20791
20788
|
"const": "vec_contains_string_nocase"
|
|
20792
20789
|
},
|
|
20793
20790
|
"nodes": {
|
|
20791
|
+
"minItems": 2,
|
|
20792
|
+
"maxItems": 8,
|
|
20794
20793
|
"type": "array",
|
|
20795
20794
|
"items": {
|
|
20796
20795
|
"description": "Guard node: represents an operation instruction in Guard. Each node returns a value of a specific type, computed from its child nodes or context.",
|
|
@@ -20800,7 +20799,7 @@
|
|
|
20800
20799
|
}
|
|
20801
20800
|
]
|
|
20802
20801
|
},
|
|
20803
|
-
"description": "
|
|
20802
|
+
"description": "First node must be VecString (ValueType=11) or Value (ValueType=19), remaining nodes must be String (ValueType=2) or Value (ValueType=19)."
|
|
20804
20803
|
}
|
|
20805
20804
|
},
|
|
20806
20805
|
"required": [
|
|
@@ -20818,6 +20817,8 @@
|
|
|
20818
20817
|
"const": "vec_contains_number"
|
|
20819
20818
|
},
|
|
20820
20819
|
"nodes": {
|
|
20820
|
+
"minItems": 2,
|
|
20821
|
+
"maxItems": 8,
|
|
20821
20822
|
"type": "array",
|
|
20822
20823
|
"items": {
|
|
20823
20824
|
"description": "Guard node: represents an operation instruction in Guard. Each node returns a value of a specific type, computed from its child nodes or context.",
|
|
@@ -20827,7 +20828,7 @@
|
|
|
20827
20828
|
}
|
|
20828
20829
|
]
|
|
20829
20830
|
},
|
|
20830
|
-
"description": "
|
|
20831
|
+
"description": "First node must be VecU8 (12), VecU16 (13), VecU32 (14), VecU64 (15), VecU128 (16), VecU256 (17) or Value (ValueType=19), remaining nodes must be U8 (3), U16 (4), U32 (5), U64 (6), U128 (7), U256 (8) or Value (ValueType=19)."
|
|
20831
20832
|
}
|
|
20832
20833
|
},
|
|
20833
20834
|
"required": [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{listServices,getServiceInfo,toggle as
|
|
1
|
+
import{listServices,getServiceInfo,toggle as a315a,setEnabled as a315b,reset as a315c}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=a315a(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.');a315b(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.');a315b(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.');a315c(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}};}
|
|
@@ -2,3 +2,4 @@ import type { ToolDispatchResult } from "../types.js";
|
|
|
2
2
|
export declare const handleAccountOperation: (args: unknown) => Promise<ToolDispatchResult>;
|
|
3
3
|
export declare const handleMarkOperation: (args: unknown) => Promise<ToolDispatchResult>;
|
|
4
4
|
export declare const handleInfoOperation: (args: unknown) => Promise<ToolDispatchResult>;
|
|
5
|
+
export declare const handleHistoryOperation: (args: unknown) => Promise<ToolDispatchResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wrapLocalHandler}from'../shared.js';import{withFaucetRetry}from'../retry.js';import{strictParse}from'../../schema/index.js';import{AccountOperationSchema,LocalMarkOperationSchema,LocalInfoOperationSchema}from'../../schema/index.js';import{account_operation,local_mark_operation,local_info_operation,GasTokenType}from'@wowok/wowok';import{parseAmount,generateFundConfirmation,generateSkillsHint}from'../../knowledge/fund-layer.js';import{buildDataSemantic}from'../../schema/call/semantic.js';function deriveOpType(a,b){for(const c of Object['keys'](b)){if(b[c]!==undefined)return a+'_'+String(c);}return a+'_unknown';}function accountError(a,b){return{'content':[{'type':'text','text':'Error:\x20'+a}],'structuredContent':{'result':{'status':'error','error':a},'semantic':buildDataSemantic(undefined,b,!![],a)}};}function buildAccountContext(a){return{'operation_type':deriveOpType('account',a),'data':a};}async function fundProcessTransfer(a){const b=a['token_type']??GasTokenType;try{const c=await parseAmount(a['amount'],b,a['network']);return{'parsed':c};}catch(d){return{'error':d instanceof Error?d['message']:String(d)};}}export const handleAccountOperation=async a=>{let b;try{b=strictParse(AccountOperationSchema,a,'account_operation\x20input');}catch(d){return accountError('Parameter\x20validation\x20failed:\x20'+(d?.['message']??String(d)));}const c=buildAccountContext(b);if(b['transfer']!==undefined){const f=b['transfer'],{parsed:g,error:h}=await fundProcessTransfer(f);if(h||!g)return accountError(h??'Amount\x20parsing\x20failed',c);if(f['confirmed']!==!![]){const
|
|
1
|
+
import{wrapLocalHandler}from'../shared.js';import{withFaucetRetry}from'../retry.js';import{strictParse}from'../../schema/index.js';import{AccountOperationSchema,LocalMarkOperationSchema,LocalInfoOperationSchema,LocalHistoryOperationSchema}from'../../schema/index.js';import{account_operation,local_mark_operation,local_info_operation,local_history_operation,GasTokenType,isFundApprovalExempt}from'@wowok/wowok';import{parseAmount,generateFundConfirmation,generateSkillsHint}from'../../knowledge/fund-layer.js';import{buildDataSemantic}from'../../schema/call/semantic.js';function deriveOpType(a,b){for(const c of Object['keys'](b)){if(b[c]!==undefined)return a+'_'+String(c);}return a+'_unknown';}function accountError(a,b){return{'content':[{'type':'text','text':'Error:\x20'+a}],'structuredContent':{'result':{'status':'error','error':a},'semantic':buildDataSemantic(undefined,b,!![],a)}};}function buildAccountContext(a){return{'operation_type':deriveOpType('account',a),'data':a};}async function fundProcessTransfer(a){const b=a['token_type']??GasTokenType;try{const c=await parseAmount(a['amount'],b,a['network']);return{'parsed':c};}catch(d){return{'error':d instanceof Error?d['message']:String(d)};}}export const handleAccountOperation=async a=>{let b;try{b=strictParse(AccountOperationSchema,a,'account_operation\x20input');}catch(d){return accountError('Parameter\x20validation\x20failed:\x20'+(d?.['message']??String(d)));}const c=buildAccountContext(b);if(b['transfer']!==undefined){const f=b['transfer'],{parsed:g,error:h}=await fundProcessTransfer(f);if(h||!g)return accountError(h??'Amount\x20parsing\x20failed',c);const i=isFundApprovalExempt(f['network'],f['token_type']??GasTokenType,g['smallestUnit']['toString']());if(!i&&f['confirmed']!==!![]){const k=generateFundConfirmation([{'path':'transfer.amount','displayAmount':g['displayAmount'],'tokenType':g['tokenType'],'tokenSymbol':g['tokenSymbol'],'decimals':g['decimals'],'smallestUnit':g['smallestUnit']['toString'](),'verified':g['verified'],'source':g['source'],'converted':g['converted'],'context':'Account\x20token\x20transfer'}],[]),l=generateSkillsHint(k),m=[k['message'],'','Recipient:\x20'+(f['name_or_address_to']??'(default\x20account)'),'Sender:\x20'+(f['name_or_address_from']??'(default\x20account)'),l??'','The\x20transfer\x20was\x20NOT\x20executed.\x20If\x20the\x20user\x20consents,\x20re-call\x20with\x20the\x20SAME\x20parameters\x20plus\x20transfer.confirmed=true.']['filter'](n=>n!=='')['join']('\x0a');return{'content':[{'type':'text','text':m}],'structuredContent':{'result':{'status':'pending_confirmation','operation':'account_transfer','message':m,'rule_id':'account_transfer_fund_movement'},'semantic':{...buildDataSemantic(undefined,c,!![],'pending\x20user\x20confirmation'),'summary':'Token\x20transfer\x20blocked\x20pending\x20user\x20confirmation.\x20Re-call\x20with\x20transfer.confirmed=true\x20to\x20proceed.'}}};}const j={...b,'transfer':{...f,'amount':g['smallestUnit']['toString']()}};delete j['transfer']['confirmed'];try{const n=await withFaucetRetry(account_operation)(j);return{'content':[{'type':'text','text':JSON['stringify'](n)}],'structuredContent':{'result':{'status':'success','data':n},'semantic':buildDataSemantic(n,c)}};}catch(o){const p=o instanceof Error?o['message']:String(o);return accountError(p,c);}}try{const q=await withFaucetRetry(account_operation)(b);return{'content':[{'type':'text','text':JSON['stringify'](q)}],'structuredContent':{'result':{'status':'success','data':q},'semantic':buildDataSemantic(q,c)}};}catch(r){const s=r instanceof Error?r['message']:String(r);return accountError(s,c);}};export const handleMarkOperation=wrapLocalHandler({'schema':LocalMarkOperationSchema,'operationFn':local_mark_operation,'parseLabel':'local_mark_operation\x20input','buildContext':a=>{const b={'operation_type':deriveOpType('mark',a),'data':a},c=a;return c['add']&&Array['isArray'](c['add']['data'])&&c['add']['data']['length']>0x0&&(b['pre_warnings']=['Cross-network\x20consistency\x20(FIX-011):\x20LocalMark\x20names\x20are\x20scoped\x20per\x20network.\x20'+'When\x20creating\x20marks\x20for\x20the\x20same\x20logical\x20object\x20on\x20different\x20networks\x20'+'(e.g.\x20testnet\x20and\x20mainnet),\x20use\x20the\x20SAME\x20name\x20value\x20to\x20keep\x20name-based\x20'+'references\x20portable.\x20Before\x20creating\x20a\x20mark\x20on\x20mainnet,\x20consider\x20querying\x20'+'testnet\x20via\x20query_local\x20with\x20network=\x27testnet\x27\x20to\x20check\x20for\x20an\x20existing\x20'+'same-named\x20mark\x20and\x20replicate\x20it.']),b;}});export const handleInfoOperation=wrapLocalHandler({'schema':LocalInfoOperationSchema,'operationFn':local_info_operation,'parseLabel':'local_info_operation\x20input','buildContext':a=>({'operation_type':deriveOpType('local_info',a),'data':a})});export const handleHistoryOperation=wrapLocalHandler({'schema':LocalHistoryOperationSchema,'operationFn':local_history_operation,'parseLabel':'local_history_operation\x20input','buildContext':a=>({'operation_type':deriveOpType('local_history',a),'data':a})});
|