@wowok/agent-mcp 2.4.3 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/runtime.d.ts +4 -0
- package/dist/config/runtime.js +29 -5
- package/dist/harness/auto-escalation.d.ts +27 -0
- package/dist/harness/auto-escalation.js +68 -0
- package/dist/index.js +21 -0
- package/dist/knowledge/allocation-confirm.d.ts +115 -0
- package/dist/knowledge/allocation-confirm.js +534 -0
- package/dist/knowledge/allocation-context.d.ts +58 -0
- package/dist/knowledge/allocation-context.js +249 -0
- package/dist/knowledge/allocation-ledger.d.ts +67 -0
- package/dist/knowledge/allocation-ledger.js +463 -0
- package/dist/knowledge/allocation-puzzle.d.ts +135 -0
- package/dist/knowledge/allocation-puzzle.js +298 -0
- package/dist/knowledge/allocation-risk.d.ts +78 -0
- package/dist/knowledge/allocation-risk.js +568 -0
- package/dist/knowledge/allocation-templates.d.ts +38 -0
- package/dist/knowledge/allocation-templates.js +970 -0
- package/dist/knowledge/allocation-translation.d.ts +72 -0
- package/dist/knowledge/allocation-translation.js +585 -0
- package/dist/knowledge/arb-risk.d.ts +37 -0
- package/dist/knowledge/arb-risk.js +210 -0
- package/dist/knowledge/arbitration-confirm.d.ts +135 -0
- package/dist/knowledge/arbitration-confirm.js +559 -0
- package/dist/knowledge/arbitration-context.d.ts +81 -0
- package/dist/knowledge/arbitration-context.js +505 -0
- package/dist/knowledge/arbitration-ledger.d.ts +62 -0
- package/dist/knowledge/arbitration-ledger.js +521 -0
- package/dist/knowledge/arbitration-puzzle.d.ts +84 -0
- package/dist/knowledge/arbitration-puzzle.js +304 -0
- package/dist/knowledge/arbitration-risk.d.ts +112 -0
- package/dist/knowledge/arbitration-risk.js +433 -0
- package/dist/knowledge/arbitration-templates.d.ts +38 -0
- package/dist/knowledge/arbitration-templates.js +276 -0
- package/dist/knowledge/arbitration-translation.d.ts +91 -0
- package/dist/knowledge/arbitration-translation.js +487 -0
- package/dist/knowledge/bridge-risk.d.ts +36 -0
- package/dist/knowledge/bridge-risk.js +263 -0
- package/dist/knowledge/contact-risk.d.ts +32 -0
- package/dist/knowledge/contact-risk.js +200 -0
- package/dist/knowledge/demand-confirm.d.ts +32 -0
- package/dist/knowledge/demand-confirm.js +206 -0
- package/dist/knowledge/demand-risk.d.ts +30 -0
- package/dist/knowledge/demand-risk.js +240 -0
- package/dist/knowledge/demand-translation.d.ts +55 -0
- package/dist/knowledge/demand-translation.js +354 -0
- package/dist/knowledge/deployment-scanner.d.ts +63 -0
- package/dist/knowledge/deployment-scanner.js +762 -0
- package/dist/knowledge/examples-scanner-cli.d.ts +1 -0
- package/dist/knowledge/examples-scanner-cli.js +26 -0
- package/dist/knowledge/examples-scanner.d.ts +121 -0
- package/dist/knowledge/examples-scanner.js +825 -0
- package/dist/knowledge/flywheel-loop.d.ts +3 -0
- package/dist/knowledge/flywheel-loop.js +32 -3
- package/dist/knowledge/glossary.js +3 -1
- package/dist/knowledge/guard-confirm.d.ts +86 -0
- package/dist/knowledge/guard-confirm.js +406 -0
- package/dist/knowledge/guard-context.d.ts +56 -0
- package/dist/knowledge/guard-context.js +287 -0
- package/dist/knowledge/guard-design-patterns.d.ts +37 -0
- package/dist/knowledge/guard-design-patterns.js +257 -0
- package/dist/knowledge/guard-puzzle.js +3 -2
- package/dist/knowledge/guard-risk.d.ts +1 -1
- package/dist/knowledge/guard-risk.js +12 -14
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/guard-translation.js +6 -5
- package/dist/knowledge/index.d.ts +342 -0
- package/dist/knowledge/index.js +344 -0
- package/dist/knowledge/machine-confirm.d.ts +102 -0
- package/dist/knowledge/machine-confirm.js +559 -0
- package/dist/knowledge/machine-context.d.ts +160 -0
- package/dist/knowledge/machine-context.js +812 -0
- package/dist/knowledge/machine-ledger.d.ts +41 -0
- package/dist/knowledge/machine-ledger.js +315 -0
- package/dist/knowledge/machine-puzzle.d.ts +206 -0
- package/dist/knowledge/machine-puzzle.js +494 -0
- package/dist/knowledge/machine-risk.d.ts +75 -0
- package/dist/knowledge/machine-risk.js +644 -0
- package/dist/knowledge/machine-templates.d.ts +92 -0
- package/dist/knowledge/machine-templates.js +1592 -0
- package/dist/knowledge/machine-topology.d.ts +57 -0
- package/dist/knowledge/machine-topology.js +234 -0
- package/dist/knowledge/machine-translation.d.ts +96 -0
- package/dist/knowledge/machine-translation.js +513 -0
- package/dist/knowledge/mcp-schema-audit-cli.d.ts +1 -0
- package/dist/knowledge/mcp-schema-audit-cli.js +45 -0
- package/dist/knowledge/mcp-schema-audit.d.ts +90 -0
- package/dist/knowledge/mcp-schema-audit.js +772 -0
- package/dist/knowledge/onchain-constants.d.ts +4 -0
- package/dist/knowledge/onchain-constants.js +35 -0
- package/dist/knowledge/order-confirm.d.ts +115 -0
- package/dist/knowledge/order-confirm.js +573 -0
- package/dist/knowledge/order-context.d.ts +66 -0
- package/dist/knowledge/order-context.js +390 -0
- package/dist/knowledge/order-ledger.d.ts +69 -0
- package/dist/knowledge/order-ledger.js +341 -0
- package/dist/knowledge/order-puzzle.d.ts +159 -0
- package/dist/knowledge/order-puzzle.js +255 -0
- package/dist/knowledge/order-risk.d.ts +66 -0
- package/dist/knowledge/order-risk.js +653 -0
- package/dist/knowledge/order-templates.d.ts +50 -0
- package/dist/knowledge/order-templates.js +368 -0
- package/dist/knowledge/order-translation.d.ts +78 -0
- package/dist/knowledge/order-translation.js +550 -0
- package/dist/knowledge/passport-confirm.d.ts +130 -0
- package/dist/knowledge/passport-confirm.js +531 -0
- package/dist/knowledge/passport-context.d.ts +59 -0
- package/dist/knowledge/passport-context.js +306 -0
- package/dist/knowledge/passport-ledger.d.ts +48 -0
- package/dist/knowledge/passport-ledger.js +282 -0
- package/dist/knowledge/passport-puzzle.d.ts +108 -0
- package/dist/knowledge/passport-puzzle.js +333 -0
- package/dist/knowledge/passport-risk.d.ts +70 -0
- package/dist/knowledge/passport-risk.js +450 -0
- package/dist/knowledge/passport-templates.d.ts +40 -0
- package/dist/knowledge/passport-templates.js +568 -0
- package/dist/knowledge/passport-translation.d.ts +68 -0
- package/dist/knowledge/passport-translation.js +516 -0
- package/dist/knowledge/payment-risk.d.ts +33 -0
- package/dist/knowledge/payment-risk.js +182 -0
- package/dist/knowledge/permission-confirm.d.ts +110 -0
- package/dist/knowledge/permission-confirm.js +426 -0
- package/dist/knowledge/permission-context.d.ts +58 -0
- package/dist/knowledge/permission-context.js +224 -0
- package/dist/knowledge/permission-ledger.d.ts +38 -0
- package/dist/knowledge/permission-ledger.js +403 -0
- package/dist/knowledge/permission-puzzle.d.ts +122 -0
- package/dist/knowledge/permission-puzzle.js +173 -0
- package/dist/knowledge/permission-risk.d.ts +76 -0
- package/dist/knowledge/permission-risk.js +411 -0
- package/dist/knowledge/permission-templates.d.ts +38 -0
- package/dist/knowledge/permission-templates.js +234 -0
- package/dist/knowledge/permission-translation.d.ts +57 -0
- package/dist/knowledge/permission-translation.js +350 -0
- package/dist/knowledge/personal-risk.d.ts +36 -0
- package/dist/knowledge/personal-risk.js +212 -0
- package/dist/knowledge/progress-confirm.d.ts +108 -0
- package/dist/knowledge/progress-confirm.js +456 -0
- package/dist/knowledge/progress-context.d.ts +123 -0
- package/dist/knowledge/progress-context.js +452 -0
- package/dist/knowledge/progress-ledger.d.ts +63 -0
- package/dist/knowledge/progress-ledger.js +327 -0
- package/dist/knowledge/progress-puzzle.d.ts +82 -0
- package/dist/knowledge/progress-puzzle.js +219 -0
- package/dist/knowledge/progress-risk.d.ts +74 -0
- package/dist/knowledge/progress-risk.js +461 -0
- package/dist/knowledge/progress-templates.d.ts +38 -0
- package/dist/knowledge/progress-templates.js +228 -0
- package/dist/knowledge/progress-translation.d.ts +52 -0
- package/dist/knowledge/progress-translation.js +401 -0
- package/dist/knowledge/proof-confirm.d.ts +31 -0
- package/dist/knowledge/proof-confirm.js +187 -0
- package/dist/knowledge/proof-risk.d.ts +33 -0
- package/dist/knowledge/proof-risk.js +207 -0
- package/dist/knowledge/proof-translation.d.ts +52 -0
- package/dist/knowledge/proof-translation.js +283 -0
- package/dist/knowledge/registrar-risk.d.ts +34 -0
- package/dist/knowledge/registrar-risk.js +217 -0
- package/dist/knowledge/repository-confirm.d.ts +36 -0
- package/dist/knowledge/repository-confirm.js +242 -0
- package/dist/knowledge/repository-risk.d.ts +40 -0
- package/dist/knowledge/repository-risk.js +312 -0
- package/dist/knowledge/repository-translation.d.ts +58 -0
- package/dist/knowledge/repository-translation.js +422 -0
- package/dist/knowledge/resource-risk.d.ts +32 -0
- package/dist/knowledge/resource-risk.js +157 -0
- package/dist/knowledge/reward-confirm.d.ts +113 -0
- package/dist/knowledge/reward-confirm.js +496 -0
- package/dist/knowledge/reward-context.d.ts +127 -0
- package/dist/knowledge/reward-context.js +504 -0
- package/dist/knowledge/reward-ledger.d.ts +96 -0
- package/dist/knowledge/reward-ledger.js +502 -0
- package/dist/knowledge/reward-puzzle.d.ts +97 -0
- package/dist/knowledge/reward-puzzle.js +288 -0
- package/dist/knowledge/reward-risk.d.ts +84 -0
- package/dist/knowledge/reward-risk.js +545 -0
- package/dist/knowledge/reward-translation.d.ts +58 -0
- package/dist/knowledge/reward-translation.js +501 -0
- package/dist/knowledge/safety-rules.js +11 -3
- package/dist/knowledge/scenario-modes.d.ts +53 -0
- package/dist/knowledge/scenario-modes.js +302 -0
- package/dist/knowledge/service-confirm.d.ts +152 -0
- package/dist/knowledge/service-confirm.js +699 -0
- package/dist/knowledge/service-context.d.ts +66 -0
- package/dist/knowledge/service-context.js +403 -0
- package/dist/knowledge/service-ledger.d.ts +71 -0
- package/dist/knowledge/service-ledger.js +609 -0
- package/dist/knowledge/service-puzzle.d.ts +158 -0
- package/dist/knowledge/service-puzzle.js +236 -0
- package/dist/knowledge/service-risk.d.ts +108 -0
- package/dist/knowledge/service-risk.js +615 -0
- package/dist/knowledge/service-templates.d.ts +39 -0
- package/dist/knowledge/service-templates.js +418 -0
- package/dist/knowledge/service-translation.d.ts +103 -0
- package/dist/knowledge/service-translation.js +622 -0
- package/dist/knowledge/tools-reference.d.ts +17 -0
- package/dist/knowledge/tools-reference.js +151 -0
- package/dist/knowledge/treasury-confirm.d.ts +133 -0
- package/dist/knowledge/treasury-confirm.js +512 -0
- package/dist/knowledge/treasury-context.d.ts +64 -0
- package/dist/knowledge/treasury-context.js +363 -0
- package/dist/knowledge/treasury-ledger.d.ts +42 -0
- package/dist/knowledge/treasury-ledger.js +300 -0
- package/dist/knowledge/treasury-puzzle.d.ts +163 -0
- package/dist/knowledge/treasury-puzzle.js +216 -0
- package/dist/knowledge/treasury-risk.d.ts +86 -0
- package/dist/knowledge/treasury-risk.js +440 -0
- package/dist/knowledge/treasury-templates.d.ts +38 -0
- package/dist/knowledge/treasury-templates.js +316 -0
- package/dist/knowledge/treasury-translation.d.ts +78 -0
- package/dist/knowledge/treasury-translation.js +498 -0
- package/dist/knowledge/util-risk.d.ts +30 -0
- package/dist/knowledge/util-risk.js +135 -0
- package/dist/project/business-puzzle.d.ts +47 -0
- package/dist/project/business-puzzle.js +372 -0
- package/dist/project/deployment-doc.d.ts +61 -0
- package/dist/project/deployment-doc.js +432 -0
- package/dist/project/risk-aggregator.d.ts +50 -0
- package/dist/project/risk-aggregator.js +280 -0
- package/dist/project/substep-trace.d.ts +130 -0
- package/dist/project/substep-trace.js +332 -0
- package/dist/schema/call/allocation.d.ts +34 -34
- package/dist/schema/call/arbitration.d.ts +141 -141
- package/dist/schema/call/base.d.ts +386 -386
- package/dist/schema/call/base.js +3 -3
- package/dist/schema/call/bridge-handler.d.ts +5 -2
- package/dist/schema/call/bridge.d.ts +159 -159
- package/dist/schema/call/contact.d.ts +110 -110
- package/dist/schema/call/demand.d.ts +76 -76
- package/dist/schema/call/handler.d.ts +2 -3
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +58 -58
- package/dist/schema/call/order.d.ts +98 -110
- package/dist/schema/call/permission-handler.d.ts +5 -0
- package/dist/schema/call/permission-handler.js +54 -0
- package/dist/schema/call/permission.d.ts +108 -108
- package/dist/schema/call/personal.d.ts +14 -14
- package/dist/schema/call/progress.d.ts +57 -72
- package/dist/schema/call/progress.js +7 -4
- package/dist/schema/call/proof.d.ts +18 -18
- package/dist/schema/call/proof.js +12 -7
- package/dist/schema/call/repository.d.ts +154 -154
- package/dist/schema/call/reward.d.ts +55 -55
- package/dist/schema/call/service.d.ts +231 -231
- package/dist/schema/call/treasury.d.ts +93 -93
- package/dist/schema/config/index.d.ts +178 -5
- package/dist/schema/config/index.js +52 -1
- package/dist/schema/local/index.d.ts +3554 -836
- package/dist/schema/local/index.js +2 -1
- package/dist/schema/messenger/index.d.ts +162 -162
- package/dist/schema/operations.d.ts +1058 -1074
- package/dist/schema/operations.js +7 -1
- package/dist/schema/project/index.d.ts +1412 -6
- package/dist/schema/project/index.js +441 -3
- package/dist/schema/query/index.d.ts +672 -672
- package/dist/schema/schema-query/index.d.ts +23 -3
- package/dist/schema/schema-query/index.js +13 -2
- package/dist/schema/sync-layer4.d.ts +21 -0
- package/dist/schema/sync-layer4.js +261 -0
- package/dist/schema/trust/index.d.ts +26 -26
- package/dist/schemas/account_operation.output.json +718 -0
- package/dist/schemas/config_operation.output.json +173 -0
- package/dist/schemas/index.json +9 -1
- package/dist/schemas/local_info_operation.output.json +718 -0
- package/dist/schemas/local_mark_operation.output.json +718 -0
- package/dist/schemas/onchain_operations.output.json +3 -2
- package/dist/schemas/onchain_operations.schema.json +1809 -336
- package/dist/schemas/onchain_operations_allocation.schema.json +2 -1
- package/dist/schemas/onchain_operations_arbitration.schema.json +2 -1
- package/dist/schemas/onchain_operations_contact.schema.json +2 -1
- package/dist/schemas/onchain_operations_demand.schema.json +2 -1
- package/dist/schemas/onchain_operations_gen_passport.schema.json +878 -872
- package/dist/schemas/onchain_operations_gen_proof.schema.json +273 -0
- package/dist/schemas/onchain_operations_guard.schema.json +578 -579
- package/dist/schemas/onchain_operations_machine.schema.json +2 -1
- package/dist/schemas/onchain_operations_order.schema.json +13 -9
- package/dist/schemas/onchain_operations_payment.schema.json +0 -514
- package/dist/schemas/onchain_operations_permission.schema.json +0 -514
- package/dist/schemas/onchain_operations_personal.schema.json +0 -514
- package/dist/schemas/onchain_operations_progress.schema.json +14 -10
- package/dist/schemas/onchain_operations_proof.schema.json +699 -0
- package/dist/schemas/onchain_operations_repository.schema.json +2 -1
- package/dist/schemas/onchain_operations_reward.schema.json +2 -1
- package/dist/schemas/onchain_operations_service.schema.json +2 -1
- package/dist/schemas/onchain_operations_treasury.schema.json +2 -1
- package/dist/schemas/onchain_table_data.schema.json +32 -1
- package/dist/schemas/project_operation.output.json +918 -0
- package/dist/schemas/project_operation.schema.json +474 -3
- package/dist/schemas/query_toolkit.output.json +14906 -6
- package/dist/schemas/schema_query.output.json +38 -1
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/tools/handlers/config.d.ts +1 -1
- package/dist/tools/handlers/config.js +21 -18
- package/dist/tools/handlers/file-export.d.ts +2 -2
- package/dist/tools/handlers/local.d.ts +3 -30
- package/dist/tools/handlers/local.js +14 -3
- package/dist/tools/handlers/messenger.d.ts +1 -1
- package/dist/tools/handlers/messenger.js +2 -1
- package/dist/tools/handlers/onchain.d.ts +1 -1
- package/dist/tools/handlers/onchain.js +24 -22
- package/dist/tools/handlers/project.d.ts +1 -1
- package/dist/tools/handlers/project.js +262 -18
- package/dist/tools/handlers/query.d.ts +4 -4
- package/dist/tools/handlers/schema-query.d.ts +1 -1
- package/dist/tools/handlers/schema-query.js +21 -20
- package/dist/tools/handlers/trust.d.ts +1 -1
- package/dist/tools/handlers/trust.js +2 -2
- package/dist/tools/handlers/wip.d.ts +1 -1
- package/dist/tools/handlers/wip.js +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +96 -25
- package/dist/tools/rules-hook.d.ts +1 -1
- package/dist/tools/rules-hook.js +3 -2
- package/dist/tools/shared.d.ts +13 -22
- package/dist/tools/types.d.ts +5 -5
- package/dist/tools/wrap.d.ts +10 -2
- package/dist/tools/wrap.js +212 -0
- package/package.json +3 -3
|
@@ -234,7 +234,7 @@ const REENTRANCY_SPECS = [
|
|
|
234
234
|
},
|
|
235
235
|
{
|
|
236
236
|
sceneId: "service_order_allocators_guard",
|
|
237
|
-
level: "
|
|
237
|
+
level: "low",
|
|
238
238
|
existsPrimitives: [1568],
|
|
239
239
|
countPrimitives: [],
|
|
240
240
|
addressPrimitives: [1569],
|
|
@@ -247,7 +247,7 @@ const REENTRANCY_SPECS = [
|
|
|
247
247
|
},
|
|
248
248
|
{
|
|
249
249
|
sceneId: "service_buy_guard",
|
|
250
|
-
level: "
|
|
250
|
+
level: "low",
|
|
251
251
|
existsPrimitives: [],
|
|
252
252
|
countPrimitives: [],
|
|
253
253
|
addressPrimitives: [],
|
|
@@ -259,7 +259,7 @@ const REENTRANCY_SPECS = [
|
|
|
259
259
|
},
|
|
260
260
|
{
|
|
261
261
|
sceneId: "repository_write_guard",
|
|
262
|
-
level: "
|
|
262
|
+
level: "low",
|
|
263
263
|
existsPrimitives: [1166],
|
|
264
264
|
countPrimitives: [],
|
|
265
265
|
addressPrimitives: [],
|
|
@@ -269,7 +269,7 @@ const REENTRANCY_SPECS = [
|
|
|
269
269
|
},
|
|
270
270
|
{
|
|
271
271
|
sceneId: "gen_passport_guard",
|
|
272
|
-
level: "
|
|
272
|
+
level: "low",
|
|
273
273
|
existsPrimitives: [],
|
|
274
274
|
countPrimitives: [],
|
|
275
275
|
addressPrimitives: [],
|
|
@@ -484,7 +484,7 @@ const RISK_RULES = [
|
|
|
484
484
|
return {
|
|
485
485
|
id: "R-C1-02",
|
|
486
486
|
data_source_class: "type1_onchain_constant",
|
|
487
|
-
level: wrong ? "medium" : "
|
|
487
|
+
level: wrong ? "medium" : "low",
|
|
488
488
|
category: "data_source_trust",
|
|
489
489
|
title: wrong
|
|
490
490
|
? "EntityRegistrar/EntityLinker system address name annotation suspected to be wrong"
|
|
@@ -762,7 +762,7 @@ const RISK_RULES = [
|
|
|
762
762
|
return {
|
|
763
763
|
id: "R-C3-01",
|
|
764
764
|
data_source_class: "type3_submitted_object",
|
|
765
|
-
level: "
|
|
765
|
+
level: "low",
|
|
766
766
|
category: "submission_forgery",
|
|
767
767
|
title: "Submitted data is indirectly bound via context(Signer) (confirm the binding direction is correct)",
|
|
768
768
|
description: "Guard accepts runtime-submitted data, and the root subtree contains a context(Signer) check, " +
|
|
@@ -1110,7 +1110,7 @@ const RISK_RULES = [
|
|
|
1110
1110
|
return {
|
|
1111
1111
|
id: "R-C4-03",
|
|
1112
1112
|
data_source_class: "type4_system_context",
|
|
1113
|
-
level: "
|
|
1113
|
+
level: "low",
|
|
1114
1114
|
category: "system_context_risk",
|
|
1115
1115
|
title: "Guard uses context(Guard) self-reference (rare scenario, needs special explanation)",
|
|
1116
1116
|
description: "Guard contains a context(Guard) node. Guard is a Type4 system context, " +
|
|
@@ -1146,7 +1146,7 @@ const RISK_RULES = [
|
|
|
1146
1146
|
return {
|
|
1147
1147
|
id: "R-C4-04",
|
|
1148
1148
|
data_source_class: "type4_system_context",
|
|
1149
|
-
level: "
|
|
1149
|
+
level: "low",
|
|
1150
1150
|
category: "system_context_risk",
|
|
1151
1151
|
title: "Level 1 strict single-identity Signer binding — convenience trade-off (consider Level 2/3 alternatives)",
|
|
1152
1152
|
description: `Guard uses logic_equal[context(Signer), identifier[${entry.identifier}](fixed address)] — only the address "${entry.value}" can pass.\n` +
|
|
@@ -1415,7 +1415,7 @@ const RISK_RULES = [
|
|
|
1415
1415
|
return {
|
|
1416
1416
|
id: "R-X1-08",
|
|
1417
1417
|
data_source_class: "cross_type",
|
|
1418
|
-
level: "
|
|
1418
|
+
level: "low",
|
|
1419
1419
|
category: "binding_risk",
|
|
1420
1420
|
title: `Guard is bound to immutable ${ctx.scene.host_object} (cannot be modified after publish)`,
|
|
1421
1421
|
description: `After ${ctx.scene.host_object} is published, ${ctx.scene.binding_field} cannot be modified.` +
|
|
@@ -1650,7 +1650,7 @@ const RISK_RULES = [
|
|
|
1650
1650
|
data_source_class: "cross_type",
|
|
1651
1651
|
level,
|
|
1652
1652
|
category: "logic_gap",
|
|
1653
|
-
title: level === "
|
|
1653
|
+
title: level === "low"
|
|
1654
1654
|
? `Reentrancy reminder: ${spec.sceneId} has no anti-reentrancy primitive (LOW risk)`
|
|
1655
1655
|
: `Reentrancy risk: ${spec.sceneId} has NO anti-reentrancy protection (${level.toUpperCase()})`,
|
|
1656
1656
|
description: `Scene: ${spec.sceneId}\n` +
|
|
@@ -1665,7 +1665,7 @@ const RISK_RULES = [
|
|
|
1665
1665
|
? "IMPACT: Without protection, the system can be abused (multiple dispute cases, arbitration harassment). Strongly recommended to add protection.\n\n"
|
|
1666
1666
|
: "IMPACT: Low by default; only relevant if business intent requires single-action enforcement. Review the rationale above.\n\n"),
|
|
1667
1667
|
affected_stakeholders: stakeholders,
|
|
1668
|
-
scenario: level === "
|
|
1668
|
+
scenario: level === "low"
|
|
1669
1669
|
? `${spec.sceneId} lacks anti-reentrancy primitive; may or may not be needed depending on business intent`
|
|
1670
1670
|
: `${spec.sceneId} lacks anti-reentrancy primitive; same Signer can repeatedly trigger the side effect`,
|
|
1671
1671
|
mitigation: spec.mitigation,
|
|
@@ -1734,9 +1734,7 @@ function getOverallRiskLevel(risks) {
|
|
|
1734
1734
|
return "high";
|
|
1735
1735
|
if (risks.some((r) => r.level === "medium"))
|
|
1736
1736
|
return "medium";
|
|
1737
|
-
|
|
1738
|
-
return "low";
|
|
1739
|
-
return "info";
|
|
1737
|
+
return "low";
|
|
1740
1738
|
}
|
|
1741
1739
|
function generateStakeholderAdvice(risks, scene) {
|
|
1742
1740
|
const advice = {};
|
|
@@ -346,7 +346,7 @@ export const GUARD_TEMPLATES = [
|
|
|
346
346
|
applicable_industries: ["ecommerce", "logistics", "service", "privacy delivery"],
|
|
347
347
|
relevant_risks: ["R-C3-01", "R-C3-05", "R-X1-12"],
|
|
348
348
|
creation_notes: [
|
|
349
|
-
"STRICT MODE (this template): verifier submits Proof + Order addresses. Three conditions: Signer==proof.signer (submitter accountability), proof.time>order.time (freshness), order.service==service (project binding). No content verification — only submission responsibility ('
|
|
349
|
+
"STRICT MODE (this template): verifier submits Proof + Order addresses. Three conditions: Signer==proof.signer (submitter accountability), proof.time>order.time (freshness), order.service==service (project binding). No content verification — only submission responsibility ('beneficiary bears burden of proof' principle).",
|
|
350
350
|
"BROAD MODE ALTERNATIVE: use P15 retained_submission with a String submission (the Merkle Root) and verify calc_string_length == 66 (0x prefix + 64 hex chars). Broad mode trusts the submitter's honesty; the counterparty can dispute by checking their own Messenger conversation. Broad mode is suitable when the Guard is mainly an arbitration basis, not a fund-flow gate.",
|
|
351
351
|
"Guard table supports MULTIPLE b_submission=true Address identifiers (no submission count limit) — this template uses two: Proof (identifier 0) and Order (identifier 1).",
|
|
352
352
|
"submitChainProof(env, peerAddress, description?) sets Proof.about = peerAddress (the counterparty's address). Pass the order_id as a string in the description parameter to associate the Proof with an order (e.g. description: 'order:0x123...').",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MAX_SUBMISSION_SIZE_PASSPORT } from "@wowok/wowok";
|
|
1
2
|
export const SEMANTIC_TO_SCHEMA_RULES = [
|
|
2
3
|
{
|
|
3
4
|
id: "P02",
|
|
@@ -523,7 +524,7 @@ export const SEMANTIC_TO_SCHEMA_RULES = [
|
|
|
523
524
|
"The submitted object address should be bound to Signer (query the signer/owner field of the submitted object to validate ownership)",
|
|
524
525
|
"Submitted numeric values should have range checks (>= min, <= max)",
|
|
525
526
|
"Total table size must not exceed 40000 bytes",
|
|
526
|
-
|
|
527
|
+
`Total submission bytes must not exceed ${MAX_SUBMISSION_SIZE_PASSPORT}`,
|
|
527
528
|
],
|
|
528
529
|
example: {
|
|
529
530
|
root: {
|
|
@@ -1000,12 +1001,12 @@ export const GUARD_CONSTRAINT_RULES = [
|
|
|
1000
1001
|
},
|
|
1001
1002
|
{
|
|
1002
1003
|
id: "RUN_SUB_03",
|
|
1003
|
-
name:
|
|
1004
|
-
description:
|
|
1004
|
+
name: `submission total bytes ≤ MAX_SUBMISSION_SIZE_PASSPORT (${MAX_SUBMISSION_SIZE_PASSPORT})`,
|
|
1005
|
+
description: `The total bytes of all data submitted at runtime must not exceed ${MAX_SUBMISSION_SIZE_PASSPORT}`,
|
|
1005
1006
|
category: "table",
|
|
1006
1007
|
phase: "runtime",
|
|
1007
|
-
validation_logic:
|
|
1008
|
-
failure_message:
|
|
1008
|
+
validation_logic: `total_submission_bytes <= ${MAX_SUBMISSION_SIZE_PASSPORT}`,
|
|
1009
|
+
failure_message: `Submission exceeds MAX_SUBMISSION_SIZE_PASSPORT (${MAX_SUBMISSION_SIZE_PASSPORT} bytes)`,
|
|
1009
1010
|
verification_location: "Move verify L252",
|
|
1010
1011
|
},
|
|
1011
1012
|
{
|