@wowok/agent-mcp 2.7.0 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/index.js +1 -1
- package/dist/config/runtime.js +1 -238
- package/dist/customer/customer-advice.js +1 -130
- package/dist/customer/index.js +1 -11
- package/dist/customer/industry-risks.js +1 -438
- package/dist/customer/info-puzzle.js +1 -681
- package/dist/customer/order-monitor.js +1 -328
- package/dist/customer/order-strategy.js +1 -373
- package/dist/customer/post-purchase.js +1 -351
- package/dist/customer/preorder-compare.js +1 -34
- package/dist/customer/reminder-system.js +1 -316
- package/dist/customer/risk-assessment.d.ts +5 -1
- package/dist/customer/risk-assessment.js +1 -397
- package/dist/customer/types.js +1 -13
- package/dist/customer/user-preferences.js +1 -460
- package/dist/evaluation/arbitration-game.d.ts +23 -0
- package/dist/evaluation/arbitration-game.js +1 -0
- package/dist/evaluation/builtins/demand-match.d.ts +15 -0
- package/dist/evaluation/builtins/demand-match.js +1 -0
- package/dist/evaluation/builtins/index.d.ts +3 -0
- package/dist/evaluation/builtins/index.js +1 -0
- package/dist/evaluation/builtins/service-risk.d.ts +6 -0
- package/dist/evaluation/builtins/service-risk.js +1 -0
- package/dist/evaluation/capability.d.ts +50 -0
- package/dist/evaluation/capability.js +1 -0
- package/dist/evaluation/composer.d.ts +13 -0
- package/dist/evaluation/composer.js +1 -0
- package/dist/evaluation/engine.d.ts +18 -0
- package/dist/evaluation/engine.js +1 -0
- package/dist/evaluation/extract.d.ts +30 -0
- package/dist/evaluation/extract.js +1 -0
- package/dist/evaluation/game-strategy.d.ts +27 -0
- package/dist/evaluation/game-strategy.js +1 -0
- package/dist/evaluation/gap.d.ts +2 -0
- package/dist/evaluation/gap.js +1 -0
- package/dist/evaluation/index.d.ts +12 -0
- package/dist/evaluation/index.js +1 -0
- package/dist/evaluation/node-game.d.ts +62 -0
- package/dist/evaluation/node-game.js +1 -0
- package/dist/evaluation/region.d.ts +10 -0
- package/dist/evaluation/region.js +1 -0
- package/dist/evaluation/types.d.ts +77 -0
- package/dist/evaluation/types.js +1 -0
- package/dist/evaluation/user-injection.d.ts +6 -0
- package/dist/evaluation/user-injection.js +1 -0
- package/dist/examples/education-contact-create.json +40 -0
- package/dist/examples/freelance-contact-create.json +40 -0
- package/dist/examples/insurance-machine-create.json +1 -1
- package/dist/examples/insurance-service-allocators.json +1 -1
- package/dist/examples/machine-publish.json +1 -1
- package/dist/examples/rental-ziroom-service-create.json +1 -1
- package/dist/examples/retail-adv-guard-messenger-proof-create.json +1 -1
- package/dist/examples/retail-myshop-service-create.json +1 -1
- package/dist/examples/retail-myshop-service-customer-required.json +1 -1
- package/dist/examples/subscription-contact-create.json +40 -0
- package/dist/examples/threebody-machine-create.json +1 -1
- package/dist/examples/travel-machine-create.json +1 -1
- package/dist/examples/travel-service-create.json +1 -1
- package/dist/experience/experience-reuse.js +1 -103
- package/dist/experience/index.js +1 -5
- package/dist/experience/intent-distill.js +1 -83
- package/dist/experience/realtime-feedback.js +1 -94
- package/dist/experience/types.js +1 -1
- package/dist/experience/user-profile.js +1 -171
- package/dist/extensions/business-modules.js +1 -287
- package/dist/extensions/capability-manifest.js +1 -781
- package/dist/extensions/constraint-registry.js +1 -198
- package/dist/extensions/index.js +1 -6
- package/dist/extensions/metric-registry.js +1 -257
- package/dist/extensions/mode-evaluator.js +1 -170
- package/dist/extensions/modes.js +1 -499
- package/dist/extensions/registry.js +1 -717
- package/dist/extensions/types.js +1 -1
- package/dist/harness/auto-escalation.js +1 -68
- package/dist/harness/checkpoint.js +1 -129
- package/dist/harness/index.js +1 -78
- package/dist/harness/plan.js +1 -276
- package/dist/harness/recover.js +1 -139
- package/dist/harness/types.js +1 -1
- package/dist/harness/verify.js +1 -237
- package/dist/index.js +1 -273
- package/dist/intent/enrich.d.ts +1 -0
- package/dist/intent/enrich.js +1 -0
- package/dist/intent/index.d.ts +23 -0
- package/dist/intent/index.js +1 -0
- package/dist/intent/matcher.d.ts +2 -0
- package/dist/intent/matcher.js +1 -0
- package/dist/intent/store.d.ts +19 -0
- package/dist/intent/store.js +1 -0
- package/dist/intent/types.d.ts +33 -0
- package/dist/intent/types.js +1 -0
- package/dist/knowledge/acquisition-flywheel.js +1 -192
- package/dist/knowledge/allocation-confirm.js +1 -534
- package/dist/knowledge/allocation-context.js +1 -249
- package/dist/knowledge/allocation-ledger.js +1 -463
- package/dist/knowledge/allocation-puzzle.js +1 -298
- package/dist/knowledge/allocation-risk.js +1 -568
- package/dist/knowledge/allocation-templates.js +1 -970
- package/dist/knowledge/allocation-translation.js +1 -585
- package/dist/knowledge/arb-risk.js +1 -210
- package/dist/knowledge/arbitration-confirm.js +1 -559
- package/dist/knowledge/arbitration-context.js +1 -505
- package/dist/knowledge/arbitration-ledger.js +1 -521
- package/dist/knowledge/arbitration-puzzle.js +1 -304
- package/dist/knowledge/arbitration-risk.js +1 -433
- package/dist/knowledge/arbitration-templates.js +1 -276
- package/dist/knowledge/arbitration-translation.js +1 -487
- package/dist/knowledge/arbitration-trust.js +1 -117
- package/dist/knowledge/audit-rules.js +1 -141
- package/dist/knowledge/bridge-risk.js +1 -263
- package/dist/knowledge/contact-risk.js +1 -200
- package/dist/knowledge/contact-templates.d.ts +27 -0
- package/dist/knowledge/contact-templates.js +1 -0
- package/dist/knowledge/demand-confirm.js +1 -206
- package/dist/knowledge/demand-matching.js +1 -132
- package/dist/knowledge/demand-risk.js +1 -240
- package/dist/knowledge/demand-translation.js +1 -354
- package/dist/knowledge/deployment-scanner.js +1 -823
- package/dist/knowledge/dynamic-pricing.js +1 -87
- package/dist/knowledge/examples-scanner-cli.js +1 -26
- package/dist/knowledge/examples-scanner.js +1 -825
- package/dist/knowledge/flywheel-loop.js +1 -404
- package/dist/knowledge/fund-layer.js +1 -973
- package/dist/knowledge/glossary.js +1 -211
- package/dist/knowledge/guard-confirm.js +1 -406
- package/dist/knowledge/guard-context.js +1 -287
- package/dist/knowledge/guard-design-patterns.js +1 -360
- package/dist/knowledge/guard-ledger.js +1 -260
- package/dist/knowledge/guard-lint.js +1 -670
- package/dist/knowledge/guard-migration.js +1 -228
- package/dist/knowledge/guard-puzzle.js +1 -805
- package/dist/knowledge/guard-render.js +1 -700
- package/dist/knowledge/guard-risk.js +1 -1879
- package/dist/knowledge/guard-submission-prompt.js +1 -171
- package/dist/knowledge/guard-templates.js +1 -1105
- package/dist/knowledge/guard-translation.js +1 -1119
- package/dist/knowledge/index.js +1 -436
- package/dist/knowledge/industry-evolution.js +1 -323
- package/dist/knowledge/industry-generalizer.js +1 -381
- package/dist/knowledge/industry-registry.js +1 -174
- package/dist/knowledge/intent-metrics.d.ts +4 -3
- package/dist/knowledge/intent-metrics.js +1 -566
- package/dist/knowledge/machine-confirm.js +1 -559
- package/dist/knowledge/machine-context.js +1 -833
- package/dist/knowledge/machine-ledger.js +1 -338
- package/dist/knowledge/machine-puzzle.js +1 -494
- package/dist/knowledge/machine-render.js +1 -565
- package/dist/knowledge/machine-risk.js +1 -670
- package/dist/knowledge/machine-templates.js +1 -1597
- package/dist/knowledge/machine-topology.js +1 -234
- package/dist/knowledge/machine-translation.js +1 -513
- package/dist/knowledge/mcp-schema-audit-cli.js +1 -45
- package/dist/knowledge/mcp-schema-audit.d.ts +1 -1
- package/dist/knowledge/mcp-schema-audit.js +1 -773
- package/dist/knowledge/onchain-constants.js +1 -35
- package/dist/knowledge/order-confirm.js +1 -573
- package/dist/knowledge/order-context.js +1 -390
- package/dist/knowledge/order-ledger.js +1 -341
- package/dist/knowledge/order-puzzle.js +1 -255
- package/dist/knowledge/order-risk.js +1 -653
- package/dist/knowledge/order-templates.js +1 -368
- package/dist/knowledge/order-translation.js +1 -550
- package/dist/knowledge/overrides-loader.js +1 -65
- package/dist/knowledge/passport-confirm.js +1 -531
- package/dist/knowledge/passport-context.js +1 -306
- package/dist/knowledge/passport-ledger.js +1 -282
- package/dist/knowledge/passport-puzzle.js +1 -333
- package/dist/knowledge/passport-risk.js +1 -450
- package/dist/knowledge/passport-templates.js +1 -568
- package/dist/knowledge/passport-translation.js +1 -516
- package/dist/knowledge/payment-risk.js +1 -249
- package/dist/knowledge/permission-confirm.js +1 -426
- package/dist/knowledge/permission-context.js +1 -224
- package/dist/knowledge/permission-ledger.js +1 -403
- package/dist/knowledge/permission-puzzle.js +1 -173
- package/dist/knowledge/permission-risk.js +1 -411
- package/dist/knowledge/permission-templates.js +1 -234
- package/dist/knowledge/permission-translation.js +1 -350
- package/dist/knowledge/personal-risk.js +1 -212
- package/dist/knowledge/process-model.js +1 -160
- package/dist/knowledge/progress-confirm.js +1 -456
- package/dist/knowledge/progress-context.js +1 -452
- package/dist/knowledge/progress-ledger.js +1 -330
- package/dist/knowledge/progress-puzzle.js +1 -219
- package/dist/knowledge/progress-risk.js +1 -461
- package/dist/knowledge/progress-templates.js +1 -228
- package/dist/knowledge/progress-translation.js +1 -405
- package/dist/knowledge/proof-confirm.js +1 -187
- package/dist/knowledge/proof-risk.js +1 -207
- package/dist/knowledge/proof-translation.js +1 -283
- package/dist/knowledge/registrar-risk.js +1 -217
- package/dist/knowledge/repository-confirm.js +1 -286
- package/dist/knowledge/repository-risk.js +1 -373
- package/dist/knowledge/repository-translation.js +1 -445
- package/dist/knowledge/reputation-rules.js +1 -99
- package/dist/knowledge/resource-risk.js +1 -157
- package/dist/knowledge/reward-confirm.js +1 -526
- package/dist/knowledge/reward-context.js +1 -504
- package/dist/knowledge/reward-ledger.js +1 -502
- package/dist/knowledge/reward-puzzle.js +1 -300
- package/dist/knowledge/reward-risk.js +1 -627
- package/dist/knowledge/reward-templates.js +1 -197
- package/dist/knowledge/reward-translation.js +1 -501
- package/dist/knowledge/safety-rules.js +1 -404
- package/dist/knowledge/scenario-modes.js +1 -321
- package/dist/knowledge/service-confirm.js +1 -807
- package/dist/knowledge/service-context.js +1 -403
- package/dist/knowledge/service-ledger.js +1 -609
- package/dist/knowledge/service-puzzle.js +1 -236
- package/dist/knowledge/service-risk.js +1 -615
- package/dist/knowledge/service-templates.js +1 -456
- package/dist/knowledge/service-translation.js +1 -622
- package/dist/knowledge/template-registry.d.ts +1 -1
- package/dist/knowledge/template-registry.js +1 -341
- package/dist/knowledge/tool-constraints.js +1 -195
- package/dist/knowledge/tools-reference.js +1 -155
- package/dist/knowledge/treasury-confirm.js +1 -512
- package/dist/knowledge/treasury-context.js +1 -363
- package/dist/knowledge/treasury-ledger.js +1 -300
- package/dist/knowledge/treasury-puzzle.js +1 -216
- package/dist/knowledge/treasury-risk.js +1 -440
- package/dist/knowledge/treasury-templates.js +1 -358
- package/dist/knowledge/treasury-translation.js +1 -498
- package/dist/knowledge/trust-metrics.js +1 -198
- package/dist/knowledge/util-risk.js +1 -135
- package/dist/loop-engineering/aggregate.js +1 -132
- package/dist/loop-engineering/context-collect.js +1 -83
- package/dist/loop-engineering/diagnose.js +1 -273
- package/dist/loop-engineering/improve.js +1 -405
- package/dist/loop-engineering/index.js +1 -4
- package/dist/loop-engineering/pipeline.js +1 -56
- package/dist/mode-market/index.js +1 -3
- package/dist/mode-market/registry.js +1 -124
- package/dist/mode-market/review.js +1 -214
- package/dist/mode-market/submission.js +1 -85
- package/dist/participation/collaborator-interest.d.ts +23 -0
- package/dist/participation/collaborator-interest.js +1 -0
- package/dist/participation/customer-interest.d.ts +25 -0
- package/dist/participation/customer-interest.js +1 -0
- package/dist/participation/merchant-interest.js +1 -100
- package/dist/participation/radar-core.d.ts +13 -3
- package/dist/participation/radar-core.js +1 -269
- package/dist/participation/supplier-interest.d.ts +25 -0
- package/dist/participation/supplier-interest.js +1 -0
- package/dist/persona/analyzer.d.ts +16 -0
- package/dist/persona/analyzer.js +1 -0
- package/dist/persona/bridge.d.ts +5 -0
- package/dist/persona/bridge.js +1 -0
- package/dist/persona/defaults.d.ts +4 -0
- package/dist/persona/defaults.js +1 -0
- package/dist/persona/experience-bridge.d.ts +3 -0
- package/dist/persona/experience-bridge.js +1 -0
- package/dist/persona/index.d.ts +18 -0
- package/dist/persona/index.js +1 -0
- package/dist/persona/model.d.ts +7 -0
- package/dist/persona/model.js +1 -0
- package/dist/persona/store.d.ts +19 -0
- package/dist/persona/store.js +1 -0
- package/dist/persona/types.d.ts +45 -0
- package/dist/persona/types.js +1 -0
- package/dist/project/business-puzzle.js +1 -383
- package/dist/project/context-assembly.js +1 -254
- package/dist/project/deployment-bridge.js +1 -120
- package/dist/project/deployment-doc.js +1 -1126
- package/dist/project/edit-planner.js +1 -1342
- package/dist/project/evaluation.js +1 -2011
- package/dist/project/game-theory.js +1 -177
- package/dist/project/graph-builder.js +1 -656
- package/dist/project/graph.js +1 -340
- package/dist/project/handlers.d.ts +5 -0
- package/dist/project/handlers.js +1 -1762
- package/dist/project/index.d.ts +1 -0
- package/dist/project/index.js +1 -301
- package/dist/project/intent-analyzer.js +1 -149
- package/dist/project/machine-nodes.js +1 -36
- package/dist/project/merchant-guide.js +1 -264
- package/dist/project/migration.js +1 -125
- package/dist/project/mode-actions.js +1 -309
- package/dist/project/namespace.js +1 -206
- package/dist/project/participation-radar.js +1 -428
- package/dist/project/pipeline-actions.js +1 -109
- package/dist/project/project-store.js +1 -422
- package/dist/project/query.js +1 -153
- package/dist/project/reverse-mapping.d.ts +34 -0
- package/dist/project/reverse-mapping.js +1 -0
- package/dist/project/risk-aggregator.js +1 -295
- package/dist/project/rollback-policy.js +1 -290
- package/dist/project/semantic-assembler.js +1 -345
- package/dist/project/semantic-graph.js +1 -245
- package/dist/project/stage-gate.js +1 -369
- package/dist/project/substep-trace.js +1 -332
- package/dist/project/task-tracker.js +1 -78
- package/dist/role/derivation.d.ts +18 -0
- package/dist/role/derivation.js +1 -0
- package/dist/role/index.d.ts +5 -0
- package/dist/role/index.js +1 -0
- package/dist/role/model.d.ts +8 -0
- package/dist/role/model.js +1 -0
- package/dist/role/resolution.d.ts +11 -0
- package/dist/role/resolution.js +1 -0
- package/dist/role/types.d.ts +11 -0
- package/dist/role/types.js +1 -0
- package/dist/rules.d.ts +2 -0
- package/dist/rules.js +1 -9
- package/dist/safety/confirm-gate.js +1 -88
- package/dist/safety/index.js +1 -3
- package/dist/safety/preview.js +1 -52
- package/dist/schema/call/allocation.js +1 -34
- package/dist/schema/call/arbitration.js +1 -113
- package/dist/schema/call/base.d.ts +15 -15
- package/dist/schema/call/base.js +1 -370
- package/dist/schema/call/bridge-handler.js +1 -265
- package/dist/schema/call/bridge.d.ts +7 -7
- package/dist/schema/call/bridge.js +1 -458
- package/dist/schema/call/contact.js +1 -37
- package/dist/schema/call/demand.js +1 -47
- package/dist/schema/call/guard.js +1 -161
- package/dist/schema/call/handler.js +1 -322
- package/dist/schema/call/index.js +1 -20
- package/dist/schema/call/machine.js +1 -193
- package/dist/schema/call/order.js +1 -35
- package/dist/schema/call/payment.js +1 -37
- package/dist/schema/call/permission-handler.js +1 -54
- package/dist/schema/call/permission.js +1 -105
- package/dist/schema/call/personal.js +1 -78
- package/dist/schema/call/progress.js +1 -47
- package/dist/schema/call/proof.js +1 -33
- package/dist/schema/call/repository.js +1 -77
- package/dist/schema/call/reward.js +1 -30
- package/dist/schema/call/semantic.js +1 -1657
- package/dist/schema/call/service.js +1 -178
- package/dist/schema/call/treasury.js +1 -71
- package/dist/schema/common/index.js +1 -407
- package/dist/schema/config/index.js +1 -68
- package/dist/schema/evaluation/index.d.ts +4436 -0
- package/dist/schema/evaluation/index.js +1 -0
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.js +1 -13
- package/dist/schema/intent-radar/index.d.ts +284 -0
- package/dist/schema/intent-radar/index.js +1 -0
- package/dist/schema/local/index.d.ts +21 -21
- package/dist/schema/local/index.js +1 -927
- package/dist/schema/local/wip.js +1 -187
- package/dist/schema/messenger/index.d.ts +7 -7
- package/dist/schema/messenger/index.js +1 -475
- package/dist/schema/operations.d.ts +7 -7
- package/dist/schema/operations.js +1 -520
- package/dist/schema/persona/index.d.ts +1985 -0
- package/dist/schema/persona/index.js +1 -0
- package/dist/schema/project/index.d.ts +96 -50
- package/dist/schema/project/index.js +1 -2057
- package/dist/schema/query/index.d.ts +423 -7
- package/dist/schema/query/index.js +1 -1640
- package/dist/schema/schema-query/index.js +1 -104
- package/dist/schema/schema-version.js +1 -76
- package/dist/schema/sync-layer4.d.ts +1 -1
- package/dist/schema/sync-layer4.js +1 -282
- package/dist/schema/task-status.d.ts +168 -0
- package/dist/schema/task-status.js +1 -0
- package/dist/schema/trust/index.js +1 -314
- package/dist/schema/utils/guard-parser.js +1 -419
- package/dist/schema/utils/guard-query-utils.js +1 -46
- package/dist/schema/utils/node-parser.js +1 -369
- package/dist/schema/utils/object-type-utils.js +1 -35
- package/dist/schema/utils/permission-index-utils.js +1 -7
- package/dist/schema/utils/permission-machine-check.js +1 -121
- package/dist/schema/utils/skills-recommendation.js +1 -77
- package/dist/schema-query/index.js +1 -810
- package/dist/schemas/account_operation.output.json +5 -2
- package/dist/schemas/bridge_operation.output.json +5 -2
- package/dist/schemas/evaluation_operation.output.json +782 -0
- package/dist/schemas/evaluation_operation.schema.json +990 -0
- package/dist/schemas/index.json +25 -1
- package/dist/schemas/intent_radar.output.json +232 -0
- package/dist/schemas/intent_radar.schema.json +138 -0
- package/dist/schemas/local_info_operation.output.json +5 -2
- package/dist/schemas/local_mark_operation.output.json +5 -2
- package/dist/schemas/messenger_operation.output.json +5 -2
- package/dist/schemas/onchain_events.output.json +5 -2
- package/dist/schemas/onchain_operations.output.json +5 -2
- package/dist/schemas/onchain_operations.schema.json +6 -6
- package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
- package/dist/schemas/onchain_operations_machine.schema.json +2 -2
- package/dist/schemas/onchain_operations_service.schema.json +3 -3
- package/dist/schemas/onchain_table_data.output.json +6 -3
- package/dist/schemas/persona_operation.output.json +392 -0
- package/dist/schemas/persona_operation.schema.json +250 -0
- package/dist/schemas/project_operation.output.json +28 -8
- package/dist/schemas/query_task_status.output.json +115 -0
- package/dist/schemas/query_task_status.schema.json +24 -0
- package/dist/schemas/query_toolkit.output.json +9 -6
- package/dist/schemas/trust_score.schema.json +1 -1
- package/dist/schemas/wowok_buildin_info.output.json +132 -0
- package/dist/schemas/wowok_buildin_info.schema.json +14 -0
- package/dist/telemetry/index.js +1 -112
- package/dist/telemetry/redact.js +1 -23
- package/dist/telemetry/storage.js +1 -80
- package/dist/tools/handlers/bridge.js +1 -1
- package/dist/tools/handlers/config.js +1 -74
- package/dist/tools/handlers/evaluation.d.ts +2 -0
- package/dist/tools/handlers/evaluation.js +1 -0
- package/dist/tools/handlers/file-export.js +1 -90
- package/dist/tools/handlers/intent-radar.d.ts +2 -0
- package/dist/tools/handlers/intent-radar.js +1 -0
- package/dist/tools/handlers/local.js +1 -53
- package/dist/tools/handlers/messenger.js +1 -188
- package/dist/tools/handlers/onchain.js +1 -1082
- package/dist/tools/handlers/persona.d.ts +4 -0
- package/dist/tools/handlers/persona.js +1 -0
- package/dist/tools/handlers/project.js +1 -211
- package/dist/tools/handlers/query.js +1 -434
- package/dist/tools/handlers/schema-query.js +1 -176
- package/dist/tools/handlers/task-status.d.ts +0 -168
- package/dist/tools/handlers/task-status.js +1 -55
- package/dist/tools/handlers/trust.js +1 -380
- package/dist/tools/handlers/wip.js +1 -90
- package/dist/tools/index.js +1 -1306
- package/dist/tools/retry.js +1 -85
- package/dist/tools/rules-hook.js +1 -23
- package/dist/tools/shared.js +1 -130
- package/dist/tools/types.js +1 -1
- package/dist/tools/upgrade-check.d.ts +19 -0
- package/dist/tools/upgrade-check.js +1 -0
- package/dist/tools/wip-deploy-assist.d.ts +1 -1
- package/dist/tools/wip-deploy-assist.js +1 -278
- package/dist/tools/wrap.js +1 -500
- package/package.json +5 -3
|
@@ -1,212 +1 @@
|
|
|
1
|
-
import { MAX_ADDRESS_COUNT, MAX_RECORD_COUNT_REGISTRAR, MAX_RECORD_LENGTH, MAX_TAGS_COUNT, } from "@wowok/wowok";
|
|
2
|
-
function detectSensitiveInformation(entries) {
|
|
3
|
-
const hits = [];
|
|
4
|
-
for (const e of entries) {
|
|
5
|
-
const v = typeof e.value === "string" ? e.value : String(e.value ?? "");
|
|
6
|
-
const lower = v.toLowerCase();
|
|
7
|
-
if (/^\+?\d{10,15}$/.test(v))
|
|
8
|
-
hits.push(`${e.name}=phone-like`);
|
|
9
|
-
if (/[^\s@]+@[^\s@]+\.[^\s@]+/.test(v))
|
|
10
|
-
hits.push(`${e.name}=email-like`);
|
|
11
|
-
if (/^(0x)?[0-9a-fA-F]{64}$/.test(v))
|
|
12
|
-
hits.push(`${e.name}=private-key-like`);
|
|
13
|
-
if (/^([a-z]{3,8}\s){11,23}[a-z]{3,8}$/.test(v.trim()))
|
|
14
|
-
hits.push(`${e.name}=mnemonic-like`);
|
|
15
|
-
if (/private[_-]?key|secret|mnemonic|seed/i.test(e.name))
|
|
16
|
-
hits.push(`${e.name}=secret-named`);
|
|
17
|
-
void lower;
|
|
18
|
-
}
|
|
19
|
-
return hits;
|
|
20
|
-
}
|
|
21
|
-
const R_PE_01 = {
|
|
22
|
-
rule: {
|
|
23
|
-
id: "R-PERSONAL-01",
|
|
24
|
-
level: "HIGH",
|
|
25
|
-
category: "semantic",
|
|
26
|
-
title: "Sensitive information leakage — on-chain data is permanent",
|
|
27
|
-
description: "information is stored via Entity.info_add as on-chain Records. The schema description " +
|
|
28
|
-
"warns 'NEVER: phone, address, private keys' but the Move layer does not validate " +
|
|
29
|
-
"content. Once a phone number, physical address, email, or private key is written " +
|
|
30
|
-
"on-chain, it is permanent and publicly readable — there is no delete (info_remove " +
|
|
31
|
-
"only removes the named entry from the user's record; the data remains in the " +
|
|
32
|
-
"transaction history).",
|
|
33
|
-
affected_stakeholders: ["user"],
|
|
34
|
-
scenario: "User adds information {name: 'phone', value: '+8613800000000'}; number is public forever",
|
|
35
|
-
mitigation: "MCP schema description MUST warn. AI agents MUST re-confirm before adding any " +
|
|
36
|
-
"information entry. Business layer should run a sensitive-data regex (phone/email/" +
|
|
37
|
-
"private-key/mnemonic) and reject matches. Use the 'local' tool for private data.",
|
|
38
|
-
auto_fixable: false,
|
|
39
|
-
},
|
|
40
|
-
check: (ctx) => {
|
|
41
|
-
if (!ctx.information_entries || ctx.information_entries.length === 0)
|
|
42
|
-
return null;
|
|
43
|
-
const hits = detectSensitiveInformation(ctx.information_entries);
|
|
44
|
-
if (hits.length === 0)
|
|
45
|
-
return null;
|
|
46
|
-
return { ...R_PE_01.rule, evidence: `sensitive patterns: ${hits.join("; ")}` };
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
const R_PE_02 = {
|
|
50
|
-
rule: {
|
|
51
|
-
id: "R-PERSONAL-02",
|
|
52
|
-
level: "MEDIUM",
|
|
53
|
-
category: "lifecycle",
|
|
54
|
-
title: "mark destroy is irreversible — identity mark permanently lost",
|
|
55
|
-
description: "The 'destroy' mark op permanently deletes the Resource object backing the user's " +
|
|
56
|
-
"identity mark. There is no archive, no event, and no rollback. After destroy, the " +
|
|
57
|
-
"user has no on-chain identity mark until they create a new one, and any external " +
|
|
58
|
-
"system keyed on the old Resource address breaks.",
|
|
59
|
-
affected_stakeholders: ["user", "consumer"],
|
|
60
|
-
scenario: "User destroys their mark; downstream services keyed on the old Resource address fail",
|
|
61
|
-
mitigation: "Require explicit confirmation before destroy. SDK should refuse destroy if any " +
|
|
62
|
-
"live consumer still references the mark. Provide a 'replace' alternative that " +
|
|
63
|
-
"swaps the underlying Resource without losing continuity.",
|
|
64
|
-
auto_fixable: false,
|
|
65
|
-
},
|
|
66
|
-
check: (ctx) => {
|
|
67
|
-
if (!ctx.is_mark_destroy)
|
|
68
|
-
return null;
|
|
69
|
-
return { ...R_PE_02.rule, evidence: "is_mark_destroy=true (irreversible)" };
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
const R_PE_03 = {
|
|
73
|
-
rule: {
|
|
74
|
-
id: "R-PERSONAL-03",
|
|
75
|
-
level: "MEDIUM",
|
|
76
|
-
category: "semantic",
|
|
77
|
-
title: "referrer chain can be abused to fabricate trust signals",
|
|
78
|
-
description: "When registering, a user may specify any referrer address. There is no on-chain " +
|
|
79
|
-
"verification that the referrer actually invited the user. A sybil attacker can " +
|
|
80
|
-
"register many accounts chained to a reputable address, fabricating an affiliation " +
|
|
81
|
-
"to borrow trust. The Registrar records referrer but does not validate consent.",
|
|
82
|
-
affected_stakeholders: ["user", "consumer"],
|
|
83
|
-
scenario: "Attacker registers 100 accounts all citing a reputable merchant as referrer",
|
|
84
|
-
mitigation: "Business layer should treat referrer as a self-attested hint, not a verified trust " +
|
|
85
|
-
"signal. Audit referrer chains off-chain; require the referrer to co-sign if used for " +
|
|
86
|
-
"trust scoring.",
|
|
87
|
-
auto_fixable: false,
|
|
88
|
-
},
|
|
89
|
-
check: (ctx) => {
|
|
90
|
-
if (!ctx.has_referrer)
|
|
91
|
-
return null;
|
|
92
|
-
return { ...R_PE_03.rule, evidence: "has_referrer=true (self-attested, unverified)" };
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
const R_PE_04 = {
|
|
96
|
-
rule: {
|
|
97
|
-
id: "R-PERSONAL-04",
|
|
98
|
-
level: "LOW",
|
|
99
|
-
category: "structural",
|
|
100
|
-
title: `information inherits MAX_RECORD_COUNT_REGISTRAR=${MAX_RECORD_COUNT_REGISTRAR} — permissive`,
|
|
101
|
-
description: `Personal does not define its own record cap; it inherits Entity's ` +
|
|
102
|
-
`MAX_RECORD_COUNT_REGISTRAR=${MAX_RECORD_COUNT_REGISTRAR} (registrar.move) and ` +
|
|
103
|
-
`MAX_RECORD_LENGTH=${MAX_RECORD_LENGTH} per record. ${MAX_RECORD_COUNT_REGISTRAR} records ` +
|
|
104
|
-
`per user is generous and can bloat on-chain storage if users add many entries. ` +
|
|
105
|
-
`MAX_ADDRESS_COUNT=${MAX_ADDRESS_COUNT} and MAX_TAGS_COUNT=${MAX_TAGS_COUNT} also apply via Entity/Resource.`,
|
|
106
|
-
affected_stakeholders: ["user", "system"],
|
|
107
|
-
scenario: "User adds 1000 information entries; Entity record storage is heavy and slow to read",
|
|
108
|
-
mitigation: "Business layer should self-limit information count (e.g. ≤50). For bulk profile data, " +
|
|
109
|
-
"store off-chain and reference via a Repository or Proof.",
|
|
110
|
-
auto_fixable: false,
|
|
111
|
-
},
|
|
112
|
-
check: (ctx) => {
|
|
113
|
-
if (ctx.information_count === undefined)
|
|
114
|
-
return null;
|
|
115
|
-
if (ctx.information_count < MAX_RECORD_COUNT_REGISTRAR)
|
|
116
|
-
return null;
|
|
117
|
-
return {
|
|
118
|
-
...R_PE_04.rule,
|
|
119
|
-
evidence: `information_count=${ctx.information_count}, limit=${MAX_RECORD_COUNT_REGISTRAR}`,
|
|
120
|
-
};
|
|
121
|
-
},
|
|
122
|
-
};
|
|
123
|
-
const R_PE_05 = {
|
|
124
|
-
rule: {
|
|
125
|
-
id: "R-PERSONAL-05",
|
|
126
|
-
level: "MEDIUM",
|
|
127
|
-
category: "lifecycle",
|
|
128
|
-
title: "mark transfer loses identity mark at the source address",
|
|
129
|
-
description: "The 'transfer' mark op moves the Resource backing the identity mark to a new address. " +
|
|
130
|
-
"After transfer, the source address has no mark — any service that keyed identity on " +
|
|
131
|
-
"the source address loses the binding. There is no automatic forwarding stub left behind.",
|
|
132
|
-
affected_stakeholders: ["user", "consumer"],
|
|
133
|
-
scenario: "User transfers mark to a new wallet; old-wallet-based logins all break",
|
|
134
|
-
mitigation: "Surface a 'transfer will detach the mark from this address' warning. Consumers should " +
|
|
135
|
-
"track marks by Resource address, not by user address. Provide a migration window " +
|
|
136
|
-
"where both addresses are valid.",
|
|
137
|
-
auto_fixable: false,
|
|
138
|
-
},
|
|
139
|
-
check: (ctx) => {
|
|
140
|
-
if (!ctx.is_mark_transfer)
|
|
141
|
-
return null;
|
|
142
|
-
return { ...R_PE_05.rule, evidence: "is_mark_transfer=true (source loses mark)" };
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
const R_PE_06 = {
|
|
146
|
-
rule: {
|
|
147
|
-
id: "R-PERSONAL-06",
|
|
148
|
-
level: "LOW",
|
|
149
|
-
category: "cross_object",
|
|
150
|
-
title: "Personal has no dedicated Move struct — depends entirely on Entity + Resource",
|
|
151
|
-
description: "Personal is an SDK-layer construct: there is no personal.move. The SDK composes " +
|
|
152
|
-
"Entity (information/description) and Resource (mark) on behalf of the user. Any " +
|
|
153
|
-
"breaking change in Entity or Resource directly affects Personal. The MCP layer " +
|
|
154
|
-
"cannot fix Personal bugs without touching Entity/Resource.",
|
|
155
|
-
affected_stakeholders: ["system"],
|
|
156
|
-
scenario: "Entity schema changes; Personal.information silently breaks",
|
|
157
|
-
mitigation: "Track Entity and Resource changelogs as first-order dependencies of Personal. Add " +
|
|
158
|
-
"integration tests that exercise Personal flows whenever Entity/Resource change.",
|
|
159
|
-
auto_fixable: false,
|
|
160
|
-
},
|
|
161
|
-
check: (ctx) => {
|
|
162
|
-
if (!ctx.expects_dedicated_move_struct)
|
|
163
|
-
return null;
|
|
164
|
-
return { ...R_PE_06.rule, evidence: "expects_dedicated_move_struct=true (none exists)" };
|
|
165
|
-
},
|
|
166
|
-
};
|
|
167
|
-
const R_PE_07 = {
|
|
168
|
-
rule: {
|
|
169
|
-
id: "R-PERSONAL-07",
|
|
170
|
-
level: "MEDIUM",
|
|
171
|
-
category: "lifecycle",
|
|
172
|
-
title: "Singleton assumption — if violated, multiple Personal instances conflict",
|
|
173
|
-
description: "Personal assumes each account has exactly one Entity record (and one Resource mark). " +
|
|
174
|
-
"The Move layer enforces this via entity_register's idempotency (returns the existing " +
|
|
175
|
-
"Resource for already-registered users). But if the SDK ever bypasses entity_register " +
|
|
176
|
-
"and creates duplicates (e.g. via entity_register_with_resource_forced), downstream " +
|
|
177
|
-
"code that assumes a singleton would see inconsistent state.",
|
|
178
|
-
affected_stakeholders: ["user", "consumer"],
|
|
179
|
-
scenario: "SDK calls entity_register_with_resource_forced; user now has two Resource marks",
|
|
180
|
-
mitigation: "SDK MUST enforce the singleton invariant: refuse to call entity_register_with_resource_forced " +
|
|
181
|
-
"unless the user explicitly opts in. Document that forced re-registration invalidates " +
|
|
182
|
-
"the old Resource address.",
|
|
183
|
-
auto_fixable: false,
|
|
184
|
-
},
|
|
185
|
-
check: (ctx) => {
|
|
186
|
-
if (ctx.singleton_enforced)
|
|
187
|
-
return null;
|
|
188
|
-
return { ...R_PE_07.rule, evidence: "singleton_enforced=false (needs SDK guard)" };
|
|
189
|
-
},
|
|
190
|
-
};
|
|
191
|
-
export const PERSONAL_RISK_RULES = [
|
|
192
|
-
R_PE_01,
|
|
193
|
-
R_PE_02,
|
|
194
|
-
R_PE_03,
|
|
195
|
-
R_PE_04,
|
|
196
|
-
R_PE_05,
|
|
197
|
-
R_PE_06,
|
|
198
|
-
R_PE_07,
|
|
199
|
-
];
|
|
200
|
-
export const PERSONAL_RISK_VERSION = "1.0.0";
|
|
201
|
-
export function checkPersonalRisks(ctx) {
|
|
202
|
-
const risks = [];
|
|
203
|
-
for (const rule of PERSONAL_RISK_RULES) {
|
|
204
|
-
const r = rule.check(ctx);
|
|
205
|
-
if (r)
|
|
206
|
-
risks.push(r);
|
|
207
|
-
}
|
|
208
|
-
return risks;
|
|
209
|
-
}
|
|
210
|
-
export function getPersonalRiskById(id) {
|
|
211
|
-
return PERSONAL_RISK_RULES.find(r => r.rule.id === id)?.rule;
|
|
212
|
-
}
|
|
1
|
+
import{MAX_ADDRESS_COUNT,MAX_RECORD_COUNT_REGISTRAR,MAX_RECORD_LENGTH,MAX_TAGS_COUNT}from'@wowok/wowok';function detectSensitiveInformation(a){const b=[];for(const c of a){const d=typeof c['value']==='string'?c['value']:String(c['value']??''),f=d['toLowerCase']();if(/^\+?\d{10,15}$/['test'](d))b['push'](c['name']+'=phone-like');if(/[^\s@]+@[^\s@]+\.[^\s@]+/['test'](d))b['push'](c['name']+'=email-like');if(/^(0x)?[0-9a-fA-F]{64}$/['test'](d))b['push'](c['name']+'=private-key-like');if(/^([a-z]{3,8}\s){11,23}[a-z]{3,8}$/['test'](d['trim']()))b['push'](c['name']+'=mnemonic-like');if(/private[_-]?key|secret|mnemonic|seed/i['test'](c['name']))b['push'](c['name']+'=secret-named');void f;}return b;}const R_PE_01={'rule':{'id':'R-PERSONAL-01','level':'HIGH','category':'semantic','title':'Sensitive\x20information\x20leakage\x20—\x20on-chain\x20data\x20is\x20permanent','description':'information\x20is\x20stored\x20via\x20Entity.info_add\x20as\x20on-chain\x20Records.\x20The\x20schema\x20description\x20'+'warns\x20\x27NEVER:\x20phone,\x20address,\x20private\x20keys\x27\x20but\x20the\x20Move\x20layer\x20does\x20not\x20validate\x20'+'content.\x20Once\x20a\x20phone\x20number,\x20physical\x20address,\x20email,\x20or\x20private\x20key\x20is\x20written\x20'+'on-chain,\x20it\x20is\x20permanent\x20and\x20publicly\x20readable\x20—\x20there\x20is\x20no\x20delete\x20(info_remove\x20'+'only\x20removes\x20the\x20named\x20entry\x20from\x20the\x20user\x27s\x20record;\x20the\x20data\x20remains\x20in\x20the\x20'+'transaction\x20history).','affected_stakeholders':['user'],'scenario':'User\x20adds\x20information\x20{name:\x20\x27phone\x27,\x20value:\x20\x27+8613800000000\x27};\x20number\x20is\x20public\x20forever','mitigation':'MCP\x20schema\x20description\x20MUST\x20warn.\x20AI\x20agents\x20MUST\x20re-confirm\x20before\x20adding\x20any\x20'+'information\x20entry.\x20Business\x20layer\x20should\x20run\x20a\x20sensitive-data\x20regex\x20(phone/email/'+'private-key/mnemonic)\x20and\x20reject\x20matches.\x20Use\x20the\x20\x27local\x27\x20tool\x20for\x20private\x20data.','auto_fixable':![]},'check':a=>{if(!a['information_entries']||a['information_entries']['length']===0x0)return null;const b=detectSensitiveInformation(a['information_entries']);if(b['length']===0x0)return null;return{...R_PE_01['rule'],'evidence':'sensitive\x20patterns:\x20'+b['join'](';\x20')};}},R_PE_02={'rule':{'id':'R-PERSONAL-02','level':'MEDIUM','category':'lifecycle','title':'mark\x20destroy\x20is\x20irreversible\x20—\x20identity\x20mark\x20permanently\x20lost','description':'The\x20\x27destroy\x27\x20mark\x20op\x20permanently\x20deletes\x20the\x20Resource\x20object\x20backing\x20the\x20user\x27s\x20'+'identity\x20mark.\x20There\x20is\x20no\x20archive,\x20no\x20event,\x20and\x20no\x20rollback.\x20After\x20destroy,\x20the\x20'+'user\x20has\x20no\x20on-chain\x20identity\x20mark\x20until\x20they\x20create\x20a\x20new\x20one,\x20and\x20any\x20external\x20'+'system\x20keyed\x20on\x20the\x20old\x20Resource\x20address\x20breaks.','affected_stakeholders':['user','consumer'],'scenario':'User\x20destroys\x20their\x20mark;\x20downstream\x20services\x20keyed\x20on\x20the\x20old\x20Resource\x20address\x20fail','mitigation':'Require\x20explicit\x20confirmation\x20before\x20destroy.\x20SDK\x20should\x20refuse\x20destroy\x20if\x20any\x20'+'live\x20consumer\x20still\x20references\x20the\x20mark.\x20Provide\x20a\x20\x27replace\x27\x20alternative\x20that\x20'+'swaps\x20the\x20underlying\x20Resource\x20without\x20losing\x20continuity.','auto_fixable':![]},'check':a=>{if(!a['is_mark_destroy'])return null;return{...R_PE_02['rule'],'evidence':'is_mark_destroy=true\x20(irreversible)'};}},R_PE_03={'rule':{'id':'R-PERSONAL-03','level':'MEDIUM','category':'semantic','title':'referrer\x20chain\x20can\x20be\x20abused\x20to\x20fabricate\x20trust\x20signals','description':'When\x20registering,\x20a\x20user\x20may\x20specify\x20any\x20referrer\x20address.\x20There\x20is\x20no\x20on-chain\x20'+'verification\x20that\x20the\x20referrer\x20actually\x20invited\x20the\x20user.\x20A\x20sybil\x20attacker\x20can\x20'+'register\x20many\x20accounts\x20chained\x20to\x20a\x20reputable\x20address,\x20fabricating\x20an\x20affiliation\x20'+'to\x20borrow\x20trust.\x20The\x20Registrar\x20records\x20referrer\x20but\x20does\x20not\x20validate\x20consent.','affected_stakeholders':['user','consumer'],'scenario':'Attacker\x20registers\x20100\x20accounts\x20all\x20citing\x20a\x20reputable\x20merchant\x20as\x20referrer','mitigation':'Business\x20layer\x20should\x20treat\x20referrer\x20as\x20a\x20self-attested\x20hint,\x20not\x20a\x20verified\x20trust\x20'+'signal.\x20Audit\x20referrer\x20chains\x20off-chain;\x20require\x20the\x20referrer\x20to\x20co-sign\x20if\x20used\x20for\x20'+'trust\x20scoring.','auto_fixable':![]},'check':a=>{if(!a['has_referrer'])return null;return{...R_PE_03['rule'],'evidence':'has_referrer=true\x20(self-attested,\x20unverified)'};}},R_PE_04={'rule':{'id':'R-PERSONAL-04','level':'LOW','category':'structural','title':'information\x20inherits\x20MAX_RECORD_COUNT_REGISTRAR='+MAX_RECORD_COUNT_REGISTRAR+'\x20—\x20permissive','description':'Personal\x20does\x20not\x20define\x20its\x20own\x20record\x20cap;\x20it\x20inherits\x20Entity\x27s\x20'+('MAX_RECORD_COUNT_REGISTRAR='+MAX_RECORD_COUNT_REGISTRAR+'\x20(registrar.move)\x20and\x20')+('MAX_RECORD_LENGTH='+MAX_RECORD_LENGTH+'\x20per\x20record.\x20'+MAX_RECORD_COUNT_REGISTRAR+'\x20records\x20')+'per\x20user\x20is\x20generous\x20and\x20can\x20bloat\x20on-chain\x20storage\x20if\x20users\x20add\x20many\x20entries.\x20'+('MAX_ADDRESS_COUNT='+MAX_ADDRESS_COUNT+'\x20and\x20MAX_TAGS_COUNT='+MAX_TAGS_COUNT+'\x20also\x20apply\x20via\x20Entity/Resource.'),'affected_stakeholders':['user','system'],'scenario':'User\x20adds\x201000\x20information\x20entries;\x20Entity\x20record\x20storage\x20is\x20heavy\x20and\x20slow\x20to\x20read','mitigation':'Business\x20layer\x20should\x20self-limit\x20information\x20count\x20(e.g.\x20≤50).\x20For\x20bulk\x20profile\x20data,\x20'+'store\x20off-chain\x20and\x20reference\x20via\x20a\x20Repository\x20or\x20Proof.','auto_fixable':![]},'check':a=>{if(a['information_count']===undefined)return null;if(a['information_count']<MAX_RECORD_COUNT_REGISTRAR)return null;return{...R_PE_04['rule'],'evidence':'information_count='+a['information_count']+',\x20limit='+MAX_RECORD_COUNT_REGISTRAR};}},R_PE_05={'rule':{'id':'R-PERSONAL-05','level':'MEDIUM','category':'lifecycle','title':'mark\x20transfer\x20loses\x20identity\x20mark\x20at\x20the\x20source\x20address','description':'The\x20\x27transfer\x27\x20mark\x20op\x20moves\x20the\x20Resource\x20backing\x20the\x20identity\x20mark\x20to\x20a\x20new\x20address.\x20'+'After\x20transfer,\x20the\x20source\x20address\x20has\x20no\x20mark\x20—\x20any\x20service\x20that\x20keyed\x20identity\x20on\x20'+'the\x20source\x20address\x20loses\x20the\x20binding.\x20There\x20is\x20no\x20automatic\x20forwarding\x20stub\x20left\x20behind.','affected_stakeholders':['user','consumer'],'scenario':'User\x20transfers\x20mark\x20to\x20a\x20new\x20wallet;\x20old-wallet-based\x20logins\x20all\x20break','mitigation':'Surface\x20a\x20\x27transfer\x20will\x20detach\x20the\x20mark\x20from\x20this\x20address\x27\x20warning.\x20Consumers\x20should\x20'+'track\x20marks\x20by\x20Resource\x20address,\x20not\x20by\x20user\x20address.\x20Provide\x20a\x20migration\x20window\x20'+'where\x20both\x20addresses\x20are\x20valid.','auto_fixable':![]},'check':a=>{if(!a['is_mark_transfer'])return null;return{...R_PE_05['rule'],'evidence':'is_mark_transfer=true\x20(source\x20loses\x20mark)'};}},R_PE_06={'rule':{'id':'R-PERSONAL-06','level':'LOW','category':'cross_object','title':'Personal\x20has\x20no\x20dedicated\x20Move\x20struct\x20—\x20depends\x20entirely\x20on\x20Entity\x20+\x20Resource','description':'Personal\x20is\x20an\x20SDK-layer\x20construct:\x20there\x20is\x20no\x20personal.move.\x20The\x20SDK\x20composes\x20'+'Entity\x20(information/description)\x20and\x20Resource\x20(mark)\x20on\x20behalf\x20of\x20the\x20user.\x20Any\x20'+'breaking\x20change\x20in\x20Entity\x20or\x20Resource\x20directly\x20affects\x20Personal.\x20The\x20MCP\x20layer\x20'+'cannot\x20fix\x20Personal\x20bugs\x20without\x20touching\x20Entity/Resource.','affected_stakeholders':['system'],'scenario':'Entity\x20schema\x20changes;\x20Personal.information\x20silently\x20breaks','mitigation':'Track\x20Entity\x20and\x20Resource\x20changelogs\x20as\x20first-order\x20dependencies\x20of\x20Personal.\x20Add\x20'+'integration\x20tests\x20that\x20exercise\x20Personal\x20flows\x20whenever\x20Entity/Resource\x20change.','auto_fixable':![]},'check':a=>{if(!a['expects_dedicated_move_struct'])return null;return{...R_PE_06['rule'],'evidence':'expects_dedicated_move_struct=true\x20(none\x20exists)'};}},R_PE_07={'rule':{'id':'R-PERSONAL-07','level':'MEDIUM','category':'lifecycle','title':'Singleton\x20assumption\x20—\x20if\x20violated,\x20multiple\x20Personal\x20instances\x20conflict','description':'Personal\x20assumes\x20each\x20account\x20has\x20exactly\x20one\x20Entity\x20record\x20(and\x20one\x20Resource\x20mark).\x20'+'The\x20Move\x20layer\x20enforces\x20this\x20via\x20entity_register\x27s\x20idempotency\x20(returns\x20the\x20existing\x20'+'Resource\x20for\x20already-registered\x20users).\x20But\x20if\x20the\x20SDK\x20ever\x20bypasses\x20entity_register\x20'+'and\x20creates\x20duplicates\x20(e.g.\x20via\x20entity_register_with_resource_forced),\x20downstream\x20'+'code\x20that\x20assumes\x20a\x20singleton\x20would\x20see\x20inconsistent\x20state.','affected_stakeholders':['user','consumer'],'scenario':'SDK\x20calls\x20entity_register_with_resource_forced;\x20user\x20now\x20has\x20two\x20Resource\x20marks','mitigation':'SDK\x20MUST\x20enforce\x20the\x20singleton\x20invariant:\x20refuse\x20to\x20call\x20entity_register_with_resource_forced\x20'+'unless\x20the\x20user\x20explicitly\x20opts\x20in.\x20Document\x20that\x20forced\x20re-registration\x20invalidates\x20'+'the\x20old\x20Resource\x20address.','auto_fixable':![]},'check':a=>{if(a['singleton_enforced'])return null;return{...R_PE_07['rule'],'evidence':'singleton_enforced=false\x20(needs\x20SDK\x20guard)'};}};export const PERSONAL_RISK_RULES=[R_PE_01,R_PE_02,R_PE_03,R_PE_04,R_PE_05,R_PE_06,R_PE_07];export const PERSONAL_RISK_VERSION='1.0.0';export function checkPersonalRisks(a){const b=[];for(const c of PERSONAL_RISK_RULES){const d=c['check'](a);if(d)b['push'](d);}return b;}export function getPersonalRiskById(a){return PERSONAL_RISK_RULES['find'](b=>b['rule']['id']===a)?.['rule'];}
|
|
@@ -1,160 +1 @@
|
|
|
1
|
-
export const PERMISSION_TYPES = [
|
|
2
|
-
{
|
|
3
|
-
name: "Permission",
|
|
4
|
-
scope: "organization",
|
|
5
|
-
definedOn: "Permission Object (standalone on-chain object, referenced by service/machine/etc.)",
|
|
6
|
-
controls: "Who can modify the bound object's settings, publish it, manage its funds, etc.",
|
|
7
|
-
grantedBy: "The object's creator (owner) or anyone the creator delegates to",
|
|
8
|
-
example: "A shop owner creates a Permission allowing only their staff to modify the Service's price.",
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
name: "NamedOperator",
|
|
12
|
-
scope: "order",
|
|
13
|
-
definedOn: "Per-order (specified in the order creation/modification by the service)",
|
|
14
|
-
controls: "Who can operate on a specific order: advance progress, settle, refund, etc.",
|
|
15
|
-
grantedBy: "The service (via its order_allocators or explicit named operators)",
|
|
16
|
-
example: "A delivery service assigns Alice as the NamedOperator for order #123 — only Alice can mark it delivered.",
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: "OrderHolder",
|
|
20
|
-
scope: "order_holder",
|
|
21
|
-
definedOn: "Per-order (the '' empty string address = the order's current holder)",
|
|
22
|
-
controls: "Who currently holds the order and can perform holder-specific actions (accept, reject, pay)",
|
|
23
|
-
grantedBy: "Implicitly assigned when an order is created or transferred",
|
|
24
|
-
example: "Bob places an order — he becomes the OrderHolder. He can accept delivery or request arbitration.",
|
|
25
|
-
},
|
|
26
|
-
];
|
|
27
|
-
export const GAME_ELEMENTS = [
|
|
28
|
-
{
|
|
29
|
-
id: 1, type: "player", name: "Merchant vs Customer",
|
|
30
|
-
description: "The basic participants of the game: the merchant providing the service and the customer purchasing the service.",
|
|
31
|
-
wowokApplication: "Service creator (merchant) and Order creator (customer).",
|
|
32
|
-
onChainMechanism: "Service + Order objects, each with an independent on-chain address.",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: 2, type: "player", name: "Arbitrator",
|
|
36
|
-
description: "Third-party arbitrators participate in the dispute resolution game.",
|
|
37
|
-
wowokApplication: "NamedOperator of the Arb object, designated by the Service.",
|
|
38
|
-
onChainMechanism: "Arbitration object + NamedOperator permission.",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: 3, type: "strategy", name: "Cooperation vs Deception",
|
|
42
|
-
description: "The merchant can choose honest fulfillment (cooperation) or fraud (deception). The customer can choose to trust or refuse.",
|
|
43
|
-
wowokApplication: "Merchant ships vs doesn't ship; customer pays vs refuses to pay.",
|
|
44
|
-
onChainMechanism: "Progress node advancement + immutable on-chain state.",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: 4, type: "payoff", name: "Fulfillment payoff vs Fraud payoff",
|
|
48
|
-
description: "Honest fulfillment yields sustained income + reputation; fraud yields one-time income but loses reputation and compensation fund.",
|
|
49
|
-
wowokApplication: "compensation_fund as economic penalty for fraud; repeat business as long-term payoff for cooperation.",
|
|
50
|
-
onChainMechanism: "Service.compensation_fund + Treasury locked funds.",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: 5, type: "utility", name: "Reputation utility",
|
|
54
|
-
description: "Merchant's total utility = immediate income + reputation-discounted future income - expected penalty.",
|
|
55
|
-
wowokApplication: "Merchants with high reputation scores get more orders (Demand matching priority).",
|
|
56
|
-
onChainMechanism: "ReviewRepository (on-chain public reviews) + Demand matching engine.",
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: 6, type: "equilibrium", name: "Nash equilibrium: mutual cooperation",
|
|
60
|
-
description: "When penalties are large enough and reputation is important enough, the strategy profile of mutual cooperation becomes a Nash equilibrium.",
|
|
61
|
-
wowokApplication: "compensation_fund large enough + immutable on-chain reputation -> cooperation becomes the optimal strategy.",
|
|
62
|
-
onChainMechanism: "Guard verifies compensation_fund amount + ReviewRepository public.",
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
id: 7, type: "information", name: "Incomplete information",
|
|
66
|
-
description: "Customers don't fully understand the merchant's service quality; merchants don't fully understand the customer's payment capacity.",
|
|
67
|
-
wowokApplication: "Service.description + Guard verification as signals; customer wallet balance is queryable on-chain.",
|
|
68
|
-
onChainMechanism: "Guard + Personal object + on-chain transaction history.",
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
id: 8, type: "sequence", name: "Sequential game",
|
|
72
|
-
description: "Customer places order and pays first, merchant fulfills later — this is a typical sequential game.",
|
|
73
|
-
wowokApplication: "Order creation -> Progress advancement -> Acceptance/Arbitration.",
|
|
74
|
-
onChainMechanism: "Machine node sequence + Progress state machine.",
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
id: 9, type: "repetition", name: "Repeated game",
|
|
78
|
-
description: "Merchants and customers may transact multiple times; repeated games make cooperation strategies superior.",
|
|
79
|
-
wowokApplication: "Customer repeat purchases + Demand matching prioritizes high-reputation merchants.",
|
|
80
|
-
onChainMechanism: "ReviewRepository accumulates reviews + Demand matching engine.",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
id: 10, type: "commitment", name: "Compensation fund commitment",
|
|
84
|
-
description: "Merchants make a credible commitment by locking compensation_fund, reducing customers' risk perception.",
|
|
85
|
-
wowokApplication: "Service.compensation_fund locks funds; customers can claim compensation in case of fraud.",
|
|
86
|
-
onChainMechanism: "Treasury object + Guard verifies amount + withdrawal rules.",
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
id: 11, type: "punishment", name: "Compensation fund penalty",
|
|
90
|
-
description: "When a merchant commits fraud, the compensation fund is transferred to the customer, constituting economic punishment.",
|
|
91
|
-
wowokApplication: "Arbitration verdict -> compensation_fund withdrawal -> customer receives compensation.",
|
|
92
|
-
onChainMechanism: "Arbitration verdict + Treasury withdrawal rules.",
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
id: 12, type: "reward", name: "Reward marketing incentive",
|
|
96
|
-
description: "Merchants issue rewards via Reward objects, incentivizing customer behavior (first order, referral, loyalty).",
|
|
97
|
-
wowokApplication: "Reward object + Guard verifies claim conditions (e.g., completed first order).",
|
|
98
|
-
onChainMechanism: "Reward object + Guard claim conditions + Allocation distribution.",
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
id: 13, type: "reputation", name: "On-chain public reputation",
|
|
102
|
-
description: "All transactions and reviews are recorded on-chain, forming an immutable reputation system.",
|
|
103
|
-
wowokApplication: "ReviewRepository stores like/dislike/review tags, queryable on-chain.",
|
|
104
|
-
onChainMechanism: "Repository object + Guard anti-spam + address-keyed review records.",
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
id: 14, type: "signaling", name: "Quality signal",
|
|
108
|
-
description: "Merchants send quality signals via Guard verification, compensation_fund amount, and Machine transparency.",
|
|
109
|
-
wowokApplication: "buy_guard verification -> signal; compensation_fund amount -> signal; Machine public -> signal.",
|
|
110
|
-
onChainMechanism: "Guard + Treasury + Machine object's on-chain public data.",
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
id: 15, type: "screening", name: "Customer screening",
|
|
114
|
-
description: "Merchants screen customers via Guard (e.g., verify identity, credit score, wallet balance).",
|
|
115
|
-
wowokApplication: "Service.buy_guard verifies customer eligibility.",
|
|
116
|
-
onChainMechanism: "Guard object + gen_passport verifies credentials.",
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
id: 16, type: "bargaining", name: "Price bargaining",
|
|
120
|
-
description: "Customers and merchants can bargain via Messenger; the final price is submitted via Demand.",
|
|
121
|
-
wowokApplication: "Messenger encrypted communication -> Demand submits demand with reward.",
|
|
122
|
-
onChainMechanism: "Contact + Messenger + Demand objects.",
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
id: 17, type: "auction", name: "Demand bidding",
|
|
126
|
-
description: "Multiple service providers can compete for the same Demand, forming a bidding mechanism.",
|
|
127
|
-
wowokApplication: "Demand publishes demand -> multiple Services submit proposals -> customer chooses.",
|
|
128
|
-
onChainMechanism: "Demand object + order creation + Progress advancement.",
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
id: 18, type: "mechanism", name: "Mechanism design",
|
|
132
|
-
description: "WoWok's overall architecture is mechanism design: incentivizing cooperation and punishing fraud via on-chain rules.",
|
|
133
|
-
wowokApplication: "compensation_fund + Arbitration + ReviewRepository combine to form a trust mechanism.",
|
|
134
|
-
onChainMechanism: "Move contract-level object composition + Guard verification + immutability.",
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
id: 19, type: "constraint", name: "Fund constraint",
|
|
138
|
-
description: "compensation_fund and Reward fund locks constitute economic constraints, limiting the merchant's incentive to commit fraud.",
|
|
139
|
-
wowokApplication: "Fund lock > fraud payoff -> cooperation is the rational choice.",
|
|
140
|
-
onChainMechanism: "Treasury + Allocation fund lock.",
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
id: 20, type: "cooperation", name: "Supply chain collaboration",
|
|
144
|
-
description: "Multiple merchants combine via Machine to form a supply chain, cooperating to fulfill complex orders (sub-orders).",
|
|
145
|
-
wowokApplication: "Service's order_allocators supports multi-supplier allocation; Machine node forwards combine.",
|
|
146
|
-
onChainMechanism: "Allocation + Machine Forward + Progress cross-object composition.",
|
|
147
|
-
},
|
|
148
|
-
];
|
|
149
|
-
const PERMISSION_INDEX = new Map(PERMISSION_TYPES.map((p) => [p.name, p]));
|
|
150
|
-
const GAME_ELEMENT_INDEX = new Map(GAME_ELEMENTS.map((g) => [g.id, g]));
|
|
151
|
-
export function getPermissionType(name) {
|
|
152
|
-
return PERMISSION_INDEX.get(name);
|
|
153
|
-
}
|
|
154
|
-
export function getGameElement(id) {
|
|
155
|
-
return GAME_ELEMENT_INDEX.get(id);
|
|
156
|
-
}
|
|
157
|
-
export function getGameElementsByType(type) {
|
|
158
|
-
return GAME_ELEMENTS.filter((g) => g.type === type);
|
|
159
|
-
}
|
|
160
|
-
export const PROCESS_MODEL_VERSION = 1;
|
|
1
|
+
export const PERMISSION_TYPES=[{'name':'Permission','scope':'organization','definedOn':'Permission\x20Object\x20(standalone\x20on-chain\x20object,\x20referenced\x20by\x20service/machine/etc.)','controls':'Who\x20can\x20modify\x20the\x20bound\x20object\x27s\x20settings,\x20publish\x20it,\x20manage\x20its\x20funds,\x20etc.','grantedBy':'The\x20object\x27s\x20creator\x20(owner)\x20or\x20anyone\x20the\x20creator\x20delegates\x20to','example':'A\x20shop\x20owner\x20creates\x20a\x20Permission\x20allowing\x20only\x20their\x20staff\x20to\x20modify\x20the\x20Service\x27s\x20price.'},{'name':'NamedOperator','scope':'order','definedOn':'Per-order\x20(specified\x20in\x20the\x20order\x20creation/modification\x20by\x20the\x20service)','controls':'Who\x20can\x20operate\x20on\x20a\x20specific\x20order:\x20advance\x20progress,\x20settle,\x20refund,\x20etc.','grantedBy':'The\x20service\x20(via\x20its\x20order_allocators\x20or\x20explicit\x20named\x20operators)','example':'A\x20delivery\x20service\x20assigns\x20Alice\x20as\x20the\x20NamedOperator\x20for\x20order\x20#123\x20—\x20only\x20Alice\x20can\x20mark\x20it\x20delivered.'},{'name':'OrderHolder','scope':'order_holder','definedOn':'Per-order\x20(the\x20\x27\x27\x20empty\x20string\x20address\x20=\x20the\x20order\x27s\x20current\x20holder)','controls':'Who\x20currently\x20holds\x20the\x20order\x20and\x20can\x20perform\x20holder-specific\x20actions\x20(accept,\x20reject,\x20pay)','grantedBy':'Implicitly\x20assigned\x20when\x20an\x20order\x20is\x20created\x20or\x20transferred','example':'Bob\x20places\x20an\x20order\x20—\x20he\x20becomes\x20the\x20OrderHolder.\x20He\x20can\x20accept\x20delivery\x20or\x20request\x20arbitration.'}];export const GAME_ELEMENTS=[{'id':0x1,'type':'player','name':'Merchant\x20vs\x20Customer','description':'The\x20basic\x20participants\x20of\x20the\x20game:\x20the\x20merchant\x20providing\x20the\x20service\x20and\x20the\x20customer\x20purchasing\x20the\x20service.','wowokApplication':'Service\x20creator\x20(merchant)\x20and\x20Order\x20creator\x20(customer).','onChainMechanism':'Service\x20+\x20Order\x20objects,\x20each\x20with\x20an\x20independent\x20on-chain\x20address.'},{'id':0x2,'type':'player','name':'Arbitrator','description':'Third-party\x20arbitrators\x20participate\x20in\x20the\x20dispute\x20resolution\x20game.','wowokApplication':'NamedOperator\x20of\x20the\x20Arb\x20object,\x20designated\x20by\x20the\x20Service.','onChainMechanism':'Arbitration\x20object\x20+\x20NamedOperator\x20permission.'},{'id':0x3,'type':'strategy','name':'Cooperation\x20vs\x20Deception','description':'The\x20merchant\x20can\x20choose\x20honest\x20fulfillment\x20(cooperation)\x20or\x20fraud\x20(deception).\x20The\x20customer\x20can\x20choose\x20to\x20trust\x20or\x20refuse.','wowokApplication':'Merchant\x20ships\x20vs\x20doesn\x27t\x20ship;\x20customer\x20pays\x20vs\x20refuses\x20to\x20pay.','onChainMechanism':'Progress\x20node\x20advancement\x20+\x20immutable\x20on-chain\x20state.'},{'id':0x4,'type':'payoff','name':'Fulfillment\x20payoff\x20vs\x20Fraud\x20payoff','description':'Honest\x20fulfillment\x20yields\x20sustained\x20income\x20+\x20reputation;\x20fraud\x20yields\x20one-time\x20income\x20but\x20loses\x20reputation\x20and\x20compensation\x20fund.','wowokApplication':'compensation_fund\x20as\x20economic\x20penalty\x20for\x20fraud;\x20repeat\x20business\x20as\x20long-term\x20payoff\x20for\x20cooperation.','onChainMechanism':'Service.compensation_fund\x20+\x20Treasury\x20locked\x20funds.'},{'id':0x5,'type':'utility','name':'Reputation\x20utility','description':'Merchant\x27s\x20total\x20utility\x20=\x20immediate\x20income\x20+\x20reputation-discounted\x20future\x20income\x20-\x20expected\x20penalty.','wowokApplication':'Merchants\x20with\x20high\x20reputation\x20scores\x20get\x20more\x20orders\x20(Demand\x20matching\x20priority).','onChainMechanism':'ReviewRepository\x20(on-chain\x20public\x20reviews)\x20+\x20Demand\x20matching\x20engine.'},{'id':0x6,'type':'equilibrium','name':'Nash\x20equilibrium:\x20mutual\x20cooperation','description':'When\x20penalties\x20are\x20large\x20enough\x20and\x20reputation\x20is\x20important\x20enough,\x20the\x20strategy\x20profile\x20of\x20mutual\x20cooperation\x20becomes\x20a\x20Nash\x20equilibrium.','wowokApplication':'compensation_fund\x20large\x20enough\x20+\x20immutable\x20on-chain\x20reputation\x20->\x20cooperation\x20becomes\x20the\x20optimal\x20strategy.','onChainMechanism':'Guard\x20verifies\x20compensation_fund\x20amount\x20+\x20ReviewRepository\x20public.'},{'id':0x7,'type':'information','name':'Incomplete\x20information','description':'Customers\x20don\x27t\x20fully\x20understand\x20the\x20merchant\x27s\x20service\x20quality;\x20merchants\x20don\x27t\x20fully\x20understand\x20the\x20customer\x27s\x20payment\x20capacity.','wowokApplication':'Service.description\x20+\x20Guard\x20verification\x20as\x20signals;\x20customer\x20wallet\x20balance\x20is\x20queryable\x20on-chain.','onChainMechanism':'Guard\x20+\x20Personal\x20object\x20+\x20on-chain\x20transaction\x20history.'},{'id':0x8,'type':'sequence','name':'Sequential\x20game','description':'Customer\x20places\x20order\x20and\x20pays\x20first,\x20merchant\x20fulfills\x20later\x20—\x20this\x20is\x20a\x20typical\x20sequential\x20game.','wowokApplication':'Order\x20creation\x20->\x20Progress\x20advancement\x20->\x20Acceptance/Arbitration.','onChainMechanism':'Machine\x20node\x20sequence\x20+\x20Progress\x20state\x20machine.'},{'id':0x9,'type':'repetition','name':'Repeated\x20game','description':'Merchants\x20and\x20customers\x20may\x20transact\x20multiple\x20times;\x20repeated\x20games\x20make\x20cooperation\x20strategies\x20superior.','wowokApplication':'Customer\x20repeat\x20purchases\x20+\x20Demand\x20matching\x20prioritizes\x20high-reputation\x20merchants.','onChainMechanism':'ReviewRepository\x20accumulates\x20reviews\x20+\x20Demand\x20matching\x20engine.'},{'id':0xa,'type':'commitment','name':'Compensation\x20fund\x20commitment','description':'Merchants\x20make\x20a\x20credible\x20commitment\x20by\x20locking\x20compensation_fund,\x20reducing\x20customers\x27\x20risk\x20perception.','wowokApplication':'Service.compensation_fund\x20locks\x20funds;\x20customers\x20can\x20claim\x20compensation\x20in\x20case\x20of\x20fraud.','onChainMechanism':'Treasury\x20object\x20+\x20Guard\x20verifies\x20amount\x20+\x20withdrawal\x20rules.'},{'id':0xb,'type':'punishment','name':'Compensation\x20fund\x20penalty','description':'When\x20a\x20merchant\x20commits\x20fraud,\x20the\x20compensation\x20fund\x20is\x20transferred\x20to\x20the\x20customer,\x20constituting\x20economic\x20punishment.','wowokApplication':'Arbitration\x20verdict\x20->\x20compensation_fund\x20withdrawal\x20->\x20customer\x20receives\x20compensation.','onChainMechanism':'Arbitration\x20verdict\x20+\x20Treasury\x20withdrawal\x20rules.'},{'id':0xc,'type':'reward','name':'Reward\x20marketing\x20incentive','description':'Merchants\x20issue\x20rewards\x20via\x20Reward\x20objects,\x20incentivizing\x20customer\x20behavior\x20(first\x20order,\x20referral,\x20loyalty).','wowokApplication':'Reward\x20object\x20+\x20Guard\x20verifies\x20claim\x20conditions\x20(e.g.,\x20completed\x20first\x20order).','onChainMechanism':'Reward\x20object\x20+\x20Guard\x20claim\x20conditions\x20+\x20Allocation\x20distribution.'},{'id':0xd,'type':'reputation','name':'On-chain\x20public\x20reputation','description':'All\x20transactions\x20and\x20reviews\x20are\x20recorded\x20on-chain,\x20forming\x20an\x20immutable\x20reputation\x20system.','wowokApplication':'ReviewRepository\x20stores\x20like/dislike/review\x20tags,\x20queryable\x20on-chain.','onChainMechanism':'Repository\x20object\x20+\x20Guard\x20anti-spam\x20+\x20address-keyed\x20review\x20records.'},{'id':0xe,'type':'signaling','name':'Quality\x20signal','description':'Merchants\x20send\x20quality\x20signals\x20via\x20Guard\x20verification,\x20compensation_fund\x20amount,\x20and\x20Machine\x20transparency.','wowokApplication':'buy_guard\x20verification\x20->\x20signal;\x20compensation_fund\x20amount\x20->\x20signal;\x20Machine\x20public\x20->\x20signal.','onChainMechanism':'Guard\x20+\x20Treasury\x20+\x20Machine\x20object\x27s\x20on-chain\x20public\x20data.'},{'id':0xf,'type':'screening','name':'Customer\x20screening','description':'Merchants\x20screen\x20customers\x20via\x20Guard\x20(e.g.,\x20verify\x20identity,\x20credit\x20score,\x20wallet\x20balance).','wowokApplication':'Service.buy_guard\x20verifies\x20customer\x20eligibility.','onChainMechanism':'Guard\x20object\x20+\x20gen_passport\x20verifies\x20credentials.'},{'id':0x10,'type':'bargaining','name':'Price\x20bargaining','description':'Customers\x20and\x20merchants\x20can\x20bargain\x20via\x20Messenger;\x20the\x20final\x20price\x20is\x20submitted\x20via\x20Demand.','wowokApplication':'Messenger\x20encrypted\x20communication\x20->\x20Demand\x20submits\x20demand\x20with\x20reward.','onChainMechanism':'Contact\x20+\x20Messenger\x20+\x20Demand\x20objects.'},{'id':0x11,'type':'auction','name':'Demand\x20bidding','description':'Multiple\x20service\x20providers\x20can\x20compete\x20for\x20the\x20same\x20Demand,\x20forming\x20a\x20bidding\x20mechanism.','wowokApplication':'Demand\x20publishes\x20demand\x20->\x20multiple\x20Services\x20submit\x20proposals\x20->\x20customer\x20chooses.','onChainMechanism':'Demand\x20object\x20+\x20order\x20creation\x20+\x20Progress\x20advancement.'},{'id':0x12,'type':'mechanism','name':'Mechanism\x20design','description':'WoWok\x27s\x20overall\x20architecture\x20is\x20mechanism\x20design:\x20incentivizing\x20cooperation\x20and\x20punishing\x20fraud\x20via\x20on-chain\x20rules.','wowokApplication':'compensation_fund\x20+\x20Arbitration\x20+\x20ReviewRepository\x20combine\x20to\x20form\x20a\x20trust\x20mechanism.','onChainMechanism':'Move\x20contract-level\x20object\x20composition\x20+\x20Guard\x20verification\x20+\x20immutability.'},{'id':0x13,'type':'constraint','name':'Fund\x20constraint','description':'compensation_fund\x20and\x20Reward\x20fund\x20locks\x20constitute\x20economic\x20constraints,\x20limiting\x20the\x20merchant\x27s\x20incentive\x20to\x20commit\x20fraud.','wowokApplication':'Fund\x20lock\x20>\x20fraud\x20payoff\x20->\x20cooperation\x20is\x20the\x20rational\x20choice.','onChainMechanism':'Treasury\x20+\x20Allocation\x20fund\x20lock.'},{'id':0x14,'type':'cooperation','name':'Supply\x20chain\x20collaboration','description':'Multiple\x20merchants\x20combine\x20via\x20Machine\x20to\x20form\x20a\x20supply\x20chain,\x20cooperating\x20to\x20fulfill\x20complex\x20orders\x20(sub-orders).','wowokApplication':'Service\x27s\x20order_allocators\x20supports\x20multi-supplier\x20allocation;\x20Machine\x20node\x20forwards\x20combine.','onChainMechanism':'Allocation\x20+\x20Machine\x20Forward\x20+\x20Progress\x20cross-object\x20composition.'}];const PERMISSION_INDEX=new Map(PERMISSION_TYPES['map'](a=>[a['name'],a])),GAME_ELEMENT_INDEX=new Map(GAME_ELEMENTS['map'](a=>[a['id'],a]));export function getPermissionType(a){return PERMISSION_INDEX['get'](a);}export function getGameElement(a){return GAME_ELEMENT_INDEX['get'](a);}export function getGameElementsByType(a){return GAME_ELEMENTS['filter'](b=>b['type']===a);}export const PROCESS_MODEL_VERSION=0x1;
|