@wowok/agent-mcp 3.1.2 → 3.1.4
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/config-audit.spec.d.ts +1 -0
- package/dist/config/config-audit.spec.js +1 -0
- package/dist/config/exposure.d.ts +108 -0
- package/dist/config/exposure.js +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +1 -1
- package/dist/config/judgment.d.ts +1228 -0
- package/dist/config/judgment.js +1 -0
- package/dist/config/judgment.spec.d.ts +1 -0
- package/dist/config/judgment.spec.js +1 -0
- package/dist/config/rule-engine.d.ts +299 -0
- package/dist/config/rule-engine.js +1 -0
- package/dist/config/rule-engine.spec.d.ts +1 -0
- package/dist/config/rule-engine.spec.js +1 -0
- package/dist/config/runtime.js +1 -1
- package/dist/config/severity.d.ts +7 -0
- package/dist/config/severity.js +1 -0
- package/dist/customer/index.d.ts +3 -9
- package/dist/customer/index.js +1 -1
- package/dist/customer/industry-risks.d.ts +3 -17
- package/dist/customer/industry-risks.js +1 -1
- package/dist/customer/order-monitor.d.ts +3 -1
- package/dist/customer/order-monitor.js +1 -1
- package/dist/customer/types.d.ts +1 -165
- package/dist/customer/types.js +1 -1
- package/dist/customer/user-preferences.d.ts +0 -49
- package/dist/customer/user-preferences.js +1 -1
- package/dist/evaluation/acceptance.d.ts +1 -0
- package/dist/evaluation/acceptance.js +1 -1
- package/dist/evaluation/arbitration-game.js +1 -1
- package/dist/evaluation/architecture.spec.d.ts +1 -0
- package/dist/evaluation/architecture.spec.js +1 -0
- package/dist/evaluation/builtins/demand-match.js +1 -1
- package/dist/evaluation/builtins/graph-service.d.ts +16 -0
- package/dist/evaluation/builtins/graph-service.js +1 -0
- package/dist/evaluation/builtins/graph-service.spec.d.ts +1 -0
- package/dist/evaluation/builtins/graph-service.spec.js +1 -0
- package/dist/evaluation/builtins/index.d.ts +1 -1
- package/dist/evaluation/builtins/index.js +1 -1
- package/dist/evaluation/builtins/purity.spec.d.ts +1 -0
- package/dist/evaluation/builtins/purity.spec.js +1 -0
- package/dist/evaluation/engine.js +1 -1
- package/dist/evaluation/facets/catalog.d.ts +19 -0
- package/dist/evaluation/facets/catalog.js +1 -0
- package/dist/evaluation/game-strategy.d.ts +2 -2
- package/dist/evaluation/game-strategy.js +1 -1
- package/dist/evaluation/guard-scan.d.ts +10 -0
- package/dist/evaluation/guard-scan.js +1 -0
- package/dist/evaluation/match-operation.d.ts +2 -2
- package/dist/evaluation/match-operation.js +1 -1
- package/dist/evaluation/standards.d.ts +9 -0
- package/dist/evaluation/standards.js +1 -0
- package/dist/evaluation/standards.spec.d.ts +1 -0
- package/dist/evaluation/standards.spec.js +1 -0
- package/dist/evaluation/types.d.ts +11 -1
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/extensions/business-modules.js +1 -1
- package/dist/extensions/custom-registry-file.js +1 -1
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/index.js +1 -1
- package/dist/extensions/industry-audit.spec.d.ts +1 -0
- package/dist/extensions/industry-audit.spec.js +1 -0
- package/dist/extensions/industry-layers.d.ts +14 -5
- package/dist/extensions/industry-layers.js +1 -1
- package/dist/extensions/industry-pack.d.ts +2 -0
- package/dist/extensions/industry-pack.js +1 -1
- package/dist/extensions/mode-evaluator.js +1 -1
- package/dist/extensions/modes.js +1 -1
- package/dist/graph/onchain/analyze.d.ts +16 -1
- package/dist/graph/onchain/analyze.js +1 -1
- package/dist/graph/onchain/analyze.spec.js +1 -1
- package/dist/graph/onchain/dataplane.d.ts +1 -1
- package/dist/graph/onchain/dataplane.js +1 -1
- package/dist/graph/onchain/edge-batch.spec.d.ts +1 -0
- package/dist/graph/onchain/edge-batch.spec.js +1 -0
- package/dist/graph/onchain/edge-schema.d.ts +11 -2
- package/dist/graph/onchain/edge-schema.js +1 -1
- package/dist/graph/onchain/entity-profile.spec.d.ts +1 -0
- package/dist/graph/onchain/entity-profile.spec.js +1 -0
- package/dist/graph/onchain/event-history.spec.d.ts +1 -0
- package/dist/graph/onchain/event-history.spec.js +1 -0
- package/dist/graph/onchain/expand.js +1 -1
- package/dist/graph/onchain/exploration.d.ts +28 -0
- package/dist/graph/onchain/exploration.js +1 -0
- package/dist/graph/onchain/exploration.spec.d.ts +1 -0
- package/dist/graph/onchain/exploration.spec.js +1 -0
- package/dist/graph/onchain/exposure.d.ts +18 -0
- package/dist/graph/onchain/exposure.js +1 -0
- package/dist/graph/onchain/exposure.spec.d.ts +1 -0
- package/dist/graph/onchain/exposure.spec.js +1 -0
- package/dist/graph/onchain/extract-deep.spec.d.ts +1 -0
- package/dist/graph/onchain/extract-deep.spec.js +1 -0
- package/dist/graph/onchain/extract.d.ts +11 -3
- package/dist/graph/onchain/extract.js +1 -1
- package/dist/graph/onchain/facet-projection.d.ts +99 -0
- package/dist/graph/onchain/facet-projection.js +1 -0
- package/dist/graph/onchain/facet-projection.spec.d.ts +1 -0
- package/dist/graph/onchain/facet-projection.spec.js +1 -0
- package/dist/graph/onchain/facts.d.ts +103 -0
- package/dist/graph/onchain/facts.js +1 -0
- package/dist/graph/onchain/facts.spec.d.ts +1 -0
- package/dist/graph/onchain/facts.spec.js +1 -0
- package/dist/graph/onchain/field-manifest.d.ts +29 -0
- package/dist/graph/onchain/field-manifest.js +1 -0
- package/dist/graph/onchain/field-manifest.spec.d.ts +1 -0
- package/dist/graph/onchain/field-manifest.spec.js +1 -0
- package/dist/graph/onchain/fixtures.d.ts +80 -0
- package/dist/graph/onchain/fixtures.js +1 -0
- package/dist/graph/onchain/fixtures.spec.d.ts +1 -0
- package/dist/graph/onchain/fixtures.spec.js +1 -0
- package/dist/graph/onchain/graph-policy.spec.d.ts +1 -0
- package/dist/graph/onchain/graph-policy.spec.js +1 -0
- package/dist/graph/onchain/index.d.ts +14 -2
- package/dist/graph/onchain/index.js +1 -1
- package/dist/graph/onchain/interest.js +1 -1
- package/dist/graph/onchain/interest.spec.js +1 -1
- package/dist/graph/onchain/label-lint.spec.d.ts +1 -0
- package/dist/graph/onchain/label-lint.spec.js +1 -0
- package/dist/graph/onchain/names.d.ts +23 -0
- package/dist/graph/onchain/names.js +1 -0
- package/dist/graph/onchain/names.spec.d.ts +1 -0
- package/dist/graph/onchain/names.spec.js +1 -0
- package/dist/graph/onchain/onchain.spec.js +1 -1
- package/dist/graph/onchain/policy.d.ts +8 -0
- package/dist/graph/onchain/policy.js +1 -0
- package/dist/graph/onchain/proposal-graph.d.ts +11 -0
- package/dist/graph/onchain/proposal-graph.js +1 -0
- package/dist/graph/onchain/proposal-graph.spec.d.ts +1 -0
- package/dist/graph/onchain/proposal-graph.spec.js +1 -0
- package/dist/graph/onchain/sdk-batch.d.ts +5 -1
- package/dist/graph/onchain/sdk-batch.js +1 -1
- package/dist/graph/onchain/strategy.d.ts +16 -0
- package/dist/graph/onchain/strategy.js +1 -1
- package/dist/graph/onchain/strategy.spec.js +1 -1
- package/dist/graph/onchain/synthesis.d.ts +20 -0
- package/dist/graph/onchain/synthesis.js +1 -0
- package/dist/graph/onchain/synthesis.spec.d.ts +1 -0
- package/dist/graph/onchain/synthesis.spec.js +1 -0
- package/dist/graph/onchain/table-ledger.spec.d.ts +1 -0
- package/dist/graph/onchain/table-ledger.spec.js +1 -0
- package/dist/graph/onchain/types.d.ts +57 -7
- package/dist/graph/onchain/viewport.d.ts +1 -0
- package/dist/graph/onchain/viewport.js +1 -1
- package/dist/harness/index.d.ts +1 -5
- package/dist/harness/index.js +1 -1
- package/dist/harness/verify.d.ts +6 -1
- package/dist/harness/verify.js +1 -1
- package/dist/index.js +1 -1
- package/dist/keeper/keeper.spec.js +1 -1
- package/dist/knowledge/alloc-audit-policy.spec.d.ts +1 -0
- package/dist/knowledge/alloc-audit-policy.spec.js +1 -0
- package/dist/knowledge/allocation-ledger.js +1 -1
- package/dist/knowledge/allocation-puzzle.d.ts +1 -1
- package/dist/knowledge/allocation-puzzle.js +1 -1
- package/dist/knowledge/allocation-risk.d.ts +4 -3
- package/dist/knowledge/allocation-risk.js +1 -1
- package/dist/knowledge/allocation-templates.js +1 -1
- package/dist/knowledge/arb-risk.d.ts +6 -6
- package/dist/knowledge/arb-risk.js +1 -1
- package/dist/knowledge/arbitration-ledger.d.ts +4 -4
- package/dist/knowledge/arbitration-ledger.js +1 -1
- package/dist/knowledge/arbitration-puzzle.d.ts +1 -1
- package/dist/knowledge/arbitration-puzzle.js +1 -1
- package/dist/knowledge/arbitration-risk.d.ts +4 -3
- package/dist/knowledge/arbitration-risk.js +1 -1
- package/dist/knowledge/arbitration-templates.js +1 -1
- package/dist/knowledge/baselines/guard-lint-baseline.spec.d.ts +1 -0
- package/dist/knowledge/baselines/guard-lint-baseline.spec.js +1 -0
- package/dist/knowledge/baselines/judgment-baselines.json +289 -0
- package/dist/knowledge/baselines/risk-baselines.spec.d.ts +1 -0
- package/dist/knowledge/baselines/risk-baselines.spec.js +1 -0
- package/dist/knowledge/baselines/risk-cases.d.ts +8 -0
- package/dist/knowledge/baselines/risk-cases.js +1 -0
- package/dist/knowledge/baselines/rules/alloc_audit.json +290 -0
- package/dist/knowledge/baselines/rules/allocation.json +492 -0
- package/dist/knowledge/baselines/rules/arb.json +155 -0
- package/dist/knowledge/baselines/rules/arbitration.json +366 -0
- package/dist/knowledge/baselines/rules/bridge.json +197 -0
- package/dist/knowledge/baselines/rules/contact.json +152 -0
- package/dist/knowledge/baselines/rules/demand.json +158 -0
- package/dist/knowledge/baselines/rules/graph.json +453 -0
- package/dist/knowledge/baselines/rules/guard.json +981 -0
- package/dist/knowledge/baselines/rules/machine.json +706 -0
- package/dist/knowledge/baselines/rules/order.json +549 -0
- package/dist/knowledge/baselines/rules/payment.json +205 -0
- package/dist/knowledge/baselines/rules/permission.json +330 -0
- package/dist/knowledge/baselines/rules/personal.json +139 -0
- package/dist/knowledge/baselines/rules/progress.json +346 -0
- package/dist/knowledge/baselines/rules/proof.json +158 -0
- package/dist/knowledge/baselines/rules/registrar.json +159 -0
- package/dist/knowledge/baselines/rules/repository.json +244 -0
- package/dist/knowledge/baselines/rules/resource.json +117 -0
- package/dist/knowledge/baselines/rules/reward.json +471 -0
- package/dist/knowledge/baselines/rules/service.json +595 -0
- package/dist/knowledge/baselines/rules/treasury.json +440 -0
- package/dist/knowledge/baselines/rules/util.json +101 -0
- package/dist/knowledge/bridge-risk.d.ts +6 -6
- package/dist/knowledge/bridge-risk.js +1 -1
- package/dist/knowledge/builtin-templates.d.ts +26 -0
- package/dist/knowledge/builtin-templates.js +1 -0
- package/dist/knowledge/contact-risk.d.ts +6 -6
- package/dist/knowledge/contact-risk.js +1 -1
- package/dist/knowledge/contract-invariants.d.ts +1 -0
- package/dist/knowledge/contract-invariants.js +1 -1
- package/dist/knowledge/demand-risk.d.ts +6 -6
- package/dist/knowledge/demand-risk.js +1 -1
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/facts-sync.spec.d.ts +1 -0
- package/dist/knowledge/facts-sync.spec.js +1 -0
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-eval.d.ts +15 -0
- package/dist/knowledge/guard-eval.js +1 -0
- package/dist/knowledge/guard-eval.spec.d.ts +1 -0
- package/dist/knowledge/guard-eval.spec.js +1 -0
- package/dist/knowledge/guard-field-cognition.d.ts +1 -1
- package/dist/knowledge/guard-field-cognition.js +1 -1
- package/dist/knowledge/guard-ledger.js +1 -1
- package/dist/knowledge/guard-lint.d.ts +1 -1
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-risk.d.ts +7 -19
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/guard-translation.js +1 -1
- package/dist/knowledge/index.d.ts +51 -45
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/industry-rule-node.d.ts +7 -0
- package/dist/knowledge/industry-rule-node.js +1 -0
- package/dist/knowledge/industry-strategy.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/machine-ledger.js +1 -1
- package/dist/knowledge/machine-risk.d.ts +4 -7
- package/dist/knowledge/machine-risk.js +1 -1
- package/dist/knowledge/machine-templates.js +1 -1
- package/dist/knowledge/machine-translation.js +1 -1
- package/dist/knowledge/migration-preflight.js +1 -1
- package/dist/knowledge/operation-dictionary.js +1 -1
- package/dist/knowledge/order-ledger.js +1 -1
- package/dist/knowledge/order-puzzle.d.ts +3 -3
- package/dist/knowledge/order-puzzle.js +1 -1
- package/dist/knowledge/order-risk.d.ts +7 -12
- package/dist/knowledge/order-risk.js +1 -1
- package/dist/knowledge/order-templates.js +1 -1
- package/dist/knowledge/passport-ledger.js +1 -1
- package/dist/knowledge/passport-templates.js +1 -1
- package/dist/knowledge/payment-risk.d.ts +8 -7
- package/dist/knowledge/payment-risk.js +1 -1
- package/dist/knowledge/payment-tracker.js +1 -1
- package/dist/knowledge/permission-ledger.js +1 -1
- package/dist/knowledge/permission-puzzle.d.ts +12 -12
- package/dist/knowledge/permission-puzzle.js +1 -1
- package/dist/knowledge/permission-risk.d.ts +4 -10
- package/dist/knowledge/permission-risk.js +1 -1
- package/dist/knowledge/permission-templates.js +1 -1
- package/dist/knowledge/personal-risk.d.ts +6 -6
- package/dist/knowledge/personal-risk.js +1 -1
- package/dist/knowledge/progress-ledger.js +1 -1
- package/dist/knowledge/progress-puzzle.d.ts +2 -2
- package/dist/knowledge/progress-puzzle.js +1 -1
- package/dist/knowledge/progress-risk.d.ts +4 -3
- package/dist/knowledge/progress-risk.js +1 -1
- package/dist/knowledge/progress-templates.js +1 -1
- package/dist/knowledge/proof-risk.d.ts +6 -6
- package/dist/knowledge/proof-risk.js +1 -1
- package/dist/knowledge/puzzle-projections.d.ts +11 -0
- package/dist/knowledge/puzzle-projections.js +1 -0
- package/dist/knowledge/recipient-constraint.d.ts +20 -1
- package/dist/knowledge/recipient-constraint.js +1 -1
- package/dist/knowledge/registrar-risk.d.ts +6 -6
- package/dist/knowledge/registrar-risk.js +1 -1
- package/dist/knowledge/repository-risk.d.ts +7 -7
- package/dist/knowledge/repository-risk.js +1 -1
- package/dist/knowledge/resource-risk.d.ts +6 -6
- package/dist/knowledge/resource-risk.js +1 -1
- package/dist/knowledge/reward-ledger.d.ts +1 -1
- package/dist/knowledge/reward-ledger.js +1 -1
- package/dist/knowledge/reward-puzzle.d.ts +2 -2
- package/dist/knowledge/reward-puzzle.js +1 -1
- package/dist/knowledge/reward-risk.d.ts +5 -6
- package/dist/knowledge/reward-risk.js +1 -1
- package/dist/knowledge/rule-node-analyzers.d.ts +43 -0
- package/dist/knowledge/rule-node-analyzers.js +1 -0
- package/dist/knowledge/rule-node-analyzers.spec.d.ts +1 -0
- package/dist/knowledge/rule-node-analyzers.spec.js +1 -0
- package/dist/knowledge/rule-outcome.d.ts +5 -0
- package/dist/knowledge/rule-outcome.js +1 -0
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/scenario-modes.d.ts +2 -2
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/scenario-topology.js +1 -1
- package/dist/knowledge/service-allocator-audit-node.js +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/service-puzzle.d.ts +2 -2
- package/dist/knowledge/service-puzzle.js +1 -1
- package/dist/knowledge/service-risk-node.js +1 -1
- package/dist/knowledge/service-risk.d.ts +4 -4
- package/dist/knowledge/service-risk.js +1 -1
- package/dist/knowledge/service-templates.js +1 -1
- package/dist/knowledge/strategy-manuals.d.ts +1 -1
- package/dist/knowledge/strategy-manuals.js +1 -1
- package/dist/knowledge/template-loader.d.ts +84 -0
- package/dist/knowledge/template-loader.js +1 -0
- package/dist/knowledge/template-loader.spec.d.ts +1 -0
- package/dist/knowledge/template-loader.spec.js +1 -0
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.d.ts +17 -0
- package/dist/knowledge/template-scanner.js +1 -0
- package/dist/knowledge/template-scanner.spec.d.ts +1 -0
- package/dist/knowledge/template-scanner.spec.js +1 -0
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/treasury-ledger.d.ts +1 -1
- package/dist/knowledge/treasury-ledger.js +1 -1
- package/dist/knowledge/treasury-puzzle.d.ts +3 -3
- package/dist/knowledge/treasury-puzzle.js +1 -1
- package/dist/knowledge/treasury-risk.d.ts +6 -4
- package/dist/knowledge/treasury-risk.js +1 -1
- package/dist/knowledge/treasury-templates.js +1 -1
- package/dist/knowledge/util-risk.d.ts +6 -6
- package/dist/knowledge/util-risk.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +4 -0
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/knowledge/workspace-lists.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/participation/arbitrator-interest.js +1 -1
- package/dist/participation/radar-core.js +1 -1
- package/dist/persona/analyzer.js +1 -1
- package/dist/persona/bridge.js +1 -1
- package/dist/persona/facet-profile.d.ts +33 -0
- package/dist/persona/facet-profile.js +1 -0
- package/dist/persona/index.js +1 -1
- package/dist/persona/model.d.ts +2 -1
- package/dist/persona/model.js +1 -1
- package/dist/persona/persona-audit.spec.d.ts +1 -0
- package/dist/persona/persona-audit.spec.js +1 -0
- package/dist/persona/topology-focus.d.ts +2 -2
- package/dist/persona/topology-focus.js +1 -1
- package/dist/persona/types.d.ts +14 -0
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/facet-money.d.ts +33 -0
- package/dist/playbooks/service-build/facet-money.js +1 -0
- package/dist/playbooks/service-build/facet-money.spec.d.ts +1 -0
- package/dist/playbooks/service-build/facet-money.spec.js +1 -0
- package/dist/playbooks/service-build/machine-panorama.d.ts +20 -0
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +2 -2
- package/dist/playbooks/service-build/migration-planner.d.ts +43 -0
- package/dist/playbooks/service-build/migration-planner.js +1 -0
- package/dist/playbooks/service-build/object-panorama.d.ts +65 -24
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/pipeline-actions.d.ts +3 -3
- package/dist/playbooks/service-build/pipeline-actions.js +1 -1
- package/dist/playbooks/service-build/reverse-mapping.d.ts +1 -0
- package/dist/playbooks/service-build/reverse-mapping.js +1 -1
- package/dist/playbooks/service-build/risk-aggregator.d.ts +4 -2
- package/dist/playbooks/service-build/risk-aggregator.js +1 -1
- package/dist/playbooks/service-build/semantic-graph.js +1 -1
- package/dist/playbooks/service-build/service-panorama.d.ts +56 -9
- package/dist/playbooks/service-build/service-panorama.js +1 -1
- package/dist/playbooks/service-build/topology-evaluation.spec.d.ts +1 -0
- package/dist/playbooks/service-build/topology-evaluation.spec.js +1 -0
- package/dist/playbooks/service-build/topology-query.d.ts +13 -2
- package/dist/playbooks/service-build/topology-query.js +1 -1
- package/dist/playbooks/service-build/workflow-design-assessment.d.ts +2 -2
- package/dist/playbooks/service-build/workflow-design-assessment.js +1 -1
- package/dist/relationship/registry.js +1 -1
- package/dist/review/arb.d.ts +0 -2
- package/dist/review/arb.js +1 -1
- package/dist/review/machine.js +1 -1
- package/dist/review/order.d.ts +0 -1
- package/dist/review/order.js +1 -1
- package/dist/review/service.js +1 -1
- package/dist/review/types.d.ts +7 -0
- package/dist/role/profiles.js +1 -1
- package/dist/rules.d.ts +1 -2
- package/dist/rules.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +207 -0
- package/dist/schema/benchmark-migration/index.js +1 -0
- package/dist/schema/call/allocation.d.ts +1 -1
- package/dist/schema/call/allocation.js +1 -1
- package/dist/schema/call/arbitration.d.ts +1 -1
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +3374 -670
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/contact.d.ts +1 -1
- package/dist/schema/call/demand.d.ts +1 -1
- package/dist/schema/call/guard.d.ts +3 -3
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +5 -5
- package/dist/schema/call/order.d.ts +3 -3
- package/dist/schema/call/payment.js +1 -1
- package/dist/schema/call/permission-handler.d.ts +1 -1
- package/dist/schema/call/permission-handler.js +1 -1
- package/dist/schema/call/permission.d.ts +16 -16
- package/dist/schema/call/permission.js +1 -1
- package/dist/schema/call/personal.d.ts +8 -8
- package/dist/schema/call/personal.js +1 -1
- package/dist/schema/call/progress.d.ts +3 -3
- package/dist/schema/call/receipt.d.ts +28 -0
- package/dist/schema/call/receipt.js +1 -0
- package/dist/schema/call/repository.d.ts +11 -11
- package/dist/schema/call/repository.js +1 -1
- package/dist/schema/call/reward.d.ts +1 -1
- package/dist/schema/call/semantic-customer-advice.spec.d.ts +1 -0
- package/dist/schema/call/semantic-customer-advice.spec.js +1 -0
- package/dist/schema/call/semantic.d.ts +5 -2
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +7 -7
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/call/treasury.d.ts +1 -1
- package/dist/schema/call/treasury.js +1 -1
- package/dist/schema/common/index.d.ts +6 -6
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/config/index.d.ts +50 -1
- package/dist/schema/config/index.js +1 -1
- package/dist/schema/evaluation/index.d.ts +307 -213
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/goal/index.d.ts +6 -6
- package/dist/schema/goal/planning.d.ts +17 -17
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +1 -1
- package/dist/schema/interaction/index.d.ts +1 -1
- package/dist/schema/keeper/index.d.ts +1 -1
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +26 -26
- package/dist/schema/operations.d.ts +59 -43
- package/dist/schema/operations.js +1 -1
- package/dist/schema/persona/index.d.ts +4732 -24
- package/dist/schema/persona/index.js +1 -1
- package/dist/schema/query/bi.d.ts +830 -10
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +44 -44
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/workflow/index.d.ts +1 -1
- package/dist/schema/workspace/index.d.ts +2 -2
- package/dist/schema-query-impl/index.d.ts +9 -0
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +1 -1
- package/dist/schemas/benchmark_migration_operation.output.json +793 -0
- package/dist/schemas/benchmark_migration_operation.schema.json +83 -0
- package/dist/schemas/bridge_operation.output.json +1 -1
- package/dist/schemas/bridge_operation.schema.json +5 -5
- package/dist/schemas/config_operation.output.json +252 -0
- package/dist/schemas/config_operation.schema.json +21 -1
- package/dist/schemas/evaluation_operation.output.json +702 -162
- package/dist/schemas/evaluation_operation.schema.json +0 -429
- package/dist/schemas/goal_operation.schema.json +8 -8
- package/dist/schemas/guard2file.schema.json +1 -1
- package/dist/schemas/index.json +7 -7
- package/dist/schemas/keeper_operation.output.json +1 -1
- package/dist/schemas/local_history_operation.output.json +1 -1
- package/dist/schemas/local_info_operation.output.json +1 -1
- package/dist/schemas/local_mark_operation.output.json +1 -1
- package/dist/schemas/machineNode2file.schema.json +1 -1
- package/dist/schemas/messenger_operation.output.json +1 -1
- package/dist/schemas/messenger_operation.schema.json +24 -12
- package/dist/schemas/monitor_events.output.json +1 -1
- package/dist/schemas/monitor_subscription.output.json +1 -1
- package/dist/schemas/onchain_events.output.json +2 -2
- package/dist/schemas/onchain_operations.output.json +6359 -3724
- package/dist/schemas/onchain_operations.schema.json +191 -141
- package/dist/schemas/onchain_operations_allocation.schema.json +13 -11
- package/dist/schemas/onchain_operations_arbitration.schema.json +10 -8
- package/dist/schemas/onchain_operations_contact.schema.json +7 -5
- package/dist/schemas/onchain_operations_demand.schema.json +7 -5
- package/dist/schemas/onchain_operations_gen_passport.schema.json +5 -3
- package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_guard.schema.json +5 -3
- package/dist/schemas/onchain_operations_machine.schema.json +22 -18
- package/dist/schemas/onchain_operations_order.schema.json +11 -7
- package/dist/schemas/onchain_operations_payment.schema.json +3 -3
- package/dist/schemas/onchain_operations_permission.schema.json +19 -11
- package/dist/schemas/onchain_operations_personal.schema.json +16 -10
- package/dist/schemas/onchain_operations_progress.schema.json +11 -7
- package/dist/schemas/onchain_operations_proof.schema.json +5 -3
- package/dist/schemas/onchain_operations_repository.schema.json +12 -8
- package/dist/schemas/onchain_operations_reward.schema.json +11 -9
- package/dist/schemas/onchain_operations_service.schema.json +28 -22
- package/dist/schemas/onchain_operations_treasury.schema.json +13 -11
- package/dist/schemas/onchain_table_data.output.json +88 -88
- package/dist/schemas/persona_operation.output.json +15875 -1
- package/dist/schemas/persona_operation.schema.json +3056 -478
- package/dist/schemas/query_toolkit.output.json +1325 -212
- package/dist/schemas/query_toolkit.schema.json +60 -2
- package/dist/schemas/workflow_operation.schema.json +4 -2
- package/dist/strategy/metrics.js +1 -1
- package/dist/strategy/scorecard.js +1 -1
- package/dist/tools/handlers/benchmark-migration.d.ts +2 -0
- package/dist/tools/handlers/benchmark-migration.js +1 -0
- package/dist/tools/handlers/bridge.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/dispatch-expectations.d.ts +3 -0
- package/dist/tools/handlers/dispatch-expectations.js +1 -0
- package/dist/tools/handlers/evaluation.js +1 -1
- package/dist/tools/handlers/industry-pack.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/schema-query.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/move-fn-index.gen.d.ts +3 -0
- package/dist/tools/move-fn-index.gen.js +1 -0
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/config.js +1 -1
- package/dist/tools/registry/evaluation.d.ts +2 -0
- package/dist/tools/registry/evaluation.js +1 -0
- package/dist/tools/registry/onchain.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/sanitize-output.d.ts +3 -0
- package/dist/tools/sanitize-output.js +1 -0
- package/dist/tools/sanitize-output.spec.d.ts +1 -0
- package/dist/tools/sanitize-output.spec.js +1 -0
- package/dist/tools/shared.d.ts +0 -1
- package/dist/tools/shared.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +9 -3
- package/dist/customer/customer-advice.d.ts +0 -32
- package/dist/customer/customer-advice.js +0 -1
- package/dist/customer/info-puzzle.d.ts +0 -146
- package/dist/customer/info-puzzle.js +0 -1
- package/dist/customer/order-strategy.d.ts +0 -17
- package/dist/customer/order-strategy.js +0 -1
- package/dist/customer/preorder-compare.d.ts +0 -24
- package/dist/customer/preorder-compare.js +0 -1
- package/dist/customer/reminder-system.d.ts +0 -42
- package/dist/customer/reminder-system.js +0 -1
- package/dist/customer/risk-assessment.d.ts +0 -13
- package/dist/customer/risk-assessment.js +0 -1
- package/dist/evaluation/builtins/service-risk.d.ts +0 -7
- package/dist/evaluation/builtins/service-risk.js +0 -1
- package/dist/knowledge/trust-metrics.d.ts +0 -66
- package/dist/knowledge/trust-metrics.js +0 -1
- package/dist/schema/trust/index.d.ts +0 -334
- package/dist/schema/trust/index.js +0 -1
- package/dist/schemas/trust_score.output.json +0 -847
- package/dist/schemas/trust_score.schema.json +0 -364
- package/dist/tools/handlers/trust.d.ts +0 -16
- package/dist/tools/handlers/trust.js +0 -1
- package/dist/tools/registry/trust.d.ts +0 -2
- package/dist/tools/registry/trust.js +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"comment": "Resource rule pack (R-RESOURCE) — declarative form of the retired in-code Resource risk rules. Facts are produced by the kernel extractor (resource-risk.ts, bound to the on-chain tag limit); rules only reference fact names. Levels/wording can be retuned per rule and rules can be disabled (enabled=false, trace left) via the judgment document — factory rules can never be deleted or invented here.",
|
|
3
|
+
"facts": {
|
|
4
|
+
"expects_resource_permission": "The caller relies on Resource enforcing its own permission checks (it associates none — access control is delegated to the calling module).",
|
|
5
|
+
"expects_tag_events": "The caller expects tag mutations to emit on-chain events (tag operations emit none — indexers must poll).",
|
|
6
|
+
"tags_count": "Raw tag count for a single object, passed through for evidence text.",
|
|
7
|
+
"tags_count_over_limit": "True when tags_count is provided and meets or exceeds the chain tag limit (the on-chain abort boundary).",
|
|
8
|
+
"is_destroy": "The caller is invoking the irreversible destroy operation.",
|
|
9
|
+
"tag_set_return_ignored": "The caller discards the bool result of the tag-set operation (the 'already exists' signal).",
|
|
10
|
+
"references_dead_switch": "The caller references the fully commented-out (dead) switch function of the Move layer.",
|
|
11
|
+
"max_tags_count": "KERNEL CONSTANT — maximum tag entries a single object's tag vector may hold (the on-chain abort boundary)."
|
|
12
|
+
},
|
|
13
|
+
"rules": [
|
|
14
|
+
{
|
|
15
|
+
"rule_id": "R-RESOURCE-01",
|
|
16
|
+
"dimension": "permission",
|
|
17
|
+
"trigger": "caller relies on Resource enforcing its own permission checks",
|
|
18
|
+
"cases": [
|
|
19
|
+
{
|
|
20
|
+
"when": { "field": "expects_resource_permission", "op": "eq", "value": true },
|
|
21
|
+
"level": "low",
|
|
22
|
+
"title": "Resource has no Permission — relies entirely on caller-side gating",
|
|
23
|
+
"description": "Resource does not associate with a Permission object. All functions are public(package) (new/destroy/transfer) or public (tag set/unset, object tag add/remove, object removal) — there is no on-chain permission check. Access control is delegated to the calling module (Personal, Entity). A caller that forgets to enforce its own permission check would let any address mutate tags.",
|
|
24
|
+
"scenario": "Personal/Entity forgets to gate object-tag additions behind its own permission check",
|
|
25
|
+
"mitigation": "Callers (Personal, Entity) MUST enforce their own permission checks before invoking Resource functions. Audit the call sites in Personal/Entity to confirm gating.",
|
|
26
|
+
"evidence": "expects_resource_permission=true (Resource has none)",
|
|
27
|
+
"stakeholders": ["owner", "caller"]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"rule_id": "R-RESOURCE-02",
|
|
33
|
+
"dimension": "semantic",
|
|
34
|
+
"trigger": "caller expects tag mutations to emit events",
|
|
35
|
+
"cases": [
|
|
36
|
+
{
|
|
37
|
+
"when": { "field": "expects_tag_events", "op": "eq", "value": true },
|
|
38
|
+
"level": "medium",
|
|
39
|
+
"title": "Tag mutations emit no events — external indexers must poll",
|
|
40
|
+
"description": "Object-tag additions, object-tag removals, and whole-object removals do not emit events. External indexers cannot rely on an event stream to track tag changes; they must poll the ParentTable field. This complicates real-time notification and consistency.",
|
|
41
|
+
"scenario": "Indexer expects a TagAddedEvent but none is emitted; UI fails to refresh",
|
|
42
|
+
"mitigation": "External indexers should poll Resource.table on a cadence. Do not build critical UX on tag event streams until events are added in a future version.",
|
|
43
|
+
"evidence": "expects_tag_events=true (no events emitted)",
|
|
44
|
+
"stakeholders": ["owner", "caller"]
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"rule_id": "R-RESOURCE-03",
|
|
50
|
+
"dimension": "structural",
|
|
51
|
+
"trigger": "tag count meets or exceeds the chain tag limit",
|
|
52
|
+
"cases": [
|
|
53
|
+
{
|
|
54
|
+
"when": { "field": "tags_count_over_limit", "op": "eq", "value": true },
|
|
55
|
+
"level": "low",
|
|
56
|
+
"title": "MAX_TAGS_COUNT=${max_tags_count} permissive — storage cost",
|
|
57
|
+
"description": "A single object's AddressTag.tags vector may hold up to MAX_TAGS_COUNT=${max_tags_count} entries. The limit aborts with E_TAGS_COUNT_EXCEEDED (1) only at the boundary. 100 tags per object is generous; loading all tags on every read increases gas and storage cost.",
|
|
58
|
+
"scenario": "Caller adds 100 tags to a single object",
|
|
59
|
+
"mitigation": "Business layer should self-limit tag count well below 100. For heavy tagging, shard across multiple Resource objects or store bulk tags off-chain.",
|
|
60
|
+
"evidence": "tags_count=${tags_count}, limit=${max_tags_count}",
|
|
61
|
+
"stakeholders": ["owner"]
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"rule_id": "R-RESOURCE-04",
|
|
67
|
+
"dimension": "lifecycle",
|
|
68
|
+
"trigger": "destroy is being invoked",
|
|
69
|
+
"cases": [
|
|
70
|
+
{
|
|
71
|
+
"when": { "field": "is_destroy", "op": "eq", "value": true },
|
|
72
|
+
"level": "low",
|
|
73
|
+
"title": "destroy is irreversible — no recovery mechanism",
|
|
74
|
+
"description": "Resource.destroy(resource) deletes the object and its ParentTable in place. There is no archive, no event, and no rollback. Once destroyed, the object ID is permanently invalid and all tags are lost.",
|
|
75
|
+
"scenario": "Caller destroys a Resource that is still referenced by Personal/Entity",
|
|
76
|
+
"mitigation": "Confirm no live references exist before calling destroy. SDK should refuse to destroy a Resource whose owner address is still referenced by Personal.mark or Entity.resource.",
|
|
77
|
+
"evidence": "is_destroy=true (irreversible)",
|
|
78
|
+
"stakeholders": ["owner"]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"rule_id": "R-RESOURCE-05",
|
|
84
|
+
"dimension": "semantic",
|
|
85
|
+
"trigger": "tag-set bool return value is ignored by the caller",
|
|
86
|
+
"cases": [
|
|
87
|
+
{
|
|
88
|
+
"when": { "field": "tag_set_return_ignored", "op": "eq", "value": true },
|
|
89
|
+
"level": "medium",
|
|
90
|
+
"title": "Setting a tag returns bool — SDK may ignore the 'already exists' signal",
|
|
91
|
+
"description": "Setting a tag on an object returns bool: true if a new tag was added, false if the tag already existed. If the SDK ignores the return value, callers cannot distinguish 'newly added' from 'duplicate silently skipped'. This masks intent and complicates idempotency reasoning.",
|
|
92
|
+
"scenario": "SDK treats the tag-set result as void; caller assumes tag was added when it was a duplicate",
|
|
93
|
+
"mitigation": "SDK should expose the tag-set bool return value to the caller. UI should show 'tag already existed' when false is returned.",
|
|
94
|
+
"evidence": "tag_set_return_ignored=true (duplicate not surfaced)",
|
|
95
|
+
"stakeholders": ["caller"]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"rule_id": "R-RESOURCE-06",
|
|
101
|
+
"dimension": "semantic",
|
|
102
|
+
"trigger": "caller references the commented-out switch function",
|
|
103
|
+
"cases": [
|
|
104
|
+
{
|
|
105
|
+
"when": { "field": "references_dead_switch", "op": "eq", "value": true },
|
|
106
|
+
"level": "low",
|
|
107
|
+
"title": "Commented-out switch function — feature may be intended",
|
|
108
|
+
"description": "The module contains a switch function that is fully commented out. The intended behavior is unclear — it may be a planned feature (e.g. bulk tag operations) that was disabled. Referencing it as if it were live would silently fail.",
|
|
109
|
+
"scenario": "Developer reads the commented switch and assumes it is callable",
|
|
110
|
+
"mitigation": "Confirm with the package maintainers whether the switch should be enabled or removed. Do not reference it in SDK or MCP code.",
|
|
111
|
+
"evidence": "references_dead_switch=true (commented out in Move)",
|
|
112
|
+
"stakeholders": ["system"]
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
{
|
|
2
|
+
"comment": "Reward rule pack (R-R) — declarative form of the retired in-code Reward risk rules. Facts are produced by the kernel extractor (reward-risk.ts, bound to the Reward Guard/record caps and the Guard constructor table); rules only reference fact names. Array walks (guard_add scans, first-offender picks, intent keyword matching) are sunk into the extractor; R-R-4-01 is a catalog stub (the retired check always returned null) kept silent via a never-true condition, and R-R-7-01 carries two cases for the deposit-dependent level branch. Levels/wording can be retuned per rule and rules can be disabled (enabled=false, trace left) via the judgment document — factory rules can never be deleted or invented here.",
|
|
3
|
+
"facts": {
|
|
4
|
+
"claim": "Guard address being claimed against (ctx.claim).",
|
|
5
|
+
"guard_add_count": "Number of entries in ctx.guard_add (undefined when absent).",
|
|
6
|
+
"guard_current": "Current on-chain guard count (ctx.current_guard_count, default 0).",
|
|
7
|
+
"guard_total": "guard_current + guard_add_count — the would-be total after the batch (only when guard_add is non-empty).",
|
|
8
|
+
"guard_count_would_exceed": "guard_add is non-empty and guard_total would exceed MAX_GUARD_COUNT_REWARD (chain-limit comparison sunk into the extractor).",
|
|
9
|
+
"guard_batch_over_limit": "guard_add alone exceeds MAX_GUARD_COUNT_REWARD (schema-level batch overflow).",
|
|
10
|
+
"max_guard_count": "KERNEL CONSTANT — guards per Reward cap (MAX_GUARD_COUNT_REWARD).",
|
|
11
|
+
"record_count": "Per-recipient record count (ctx.current_record_count_for_recipient, default 0).",
|
|
12
|
+
"record_count_at_limit": "record_count has reached MAX_RECORD_COUNT_REWARD (chain-limit comparison sunk into the extractor).",
|
|
13
|
+
"max_record_count": "KERNEL CONSTANT — records per recipient cap (MAX_RECORD_COUNT_REWARD).",
|
|
14
|
+
"first_non_address_identifier_index": "First-offender — index into guard_add of the first entry whose GuardIdentifier recipient is not address-typed (absent when none).",
|
|
15
|
+
"first_non_address_identifier_id": "The offending GuardIdentifier value.",
|
|
16
|
+
"first_non_u64_amount_index": "First-offender — index into guard_add of the first entry whose amount is a GuardU64Identifier but whose identifier is not u64-typed (absent when none).",
|
|
17
|
+
"first_non_u64_amount_id": "The offending amount identifier value.",
|
|
18
|
+
"first_non_u64_amount_value_type": "Resolved passport submission value type for the offending identifier ('unknown' when unresolved).",
|
|
19
|
+
"first_incompatible_store_from_id_index": "First-offender — index into guard_add of the first entry with store_from_id set that is incompatible with its guard (absent when none).",
|
|
20
|
+
"first_incompatible_store_from_id_guard": "The offending guard address.",
|
|
21
|
+
"first_incompatible_store_from_id_value": "The offending store_from_id value.",
|
|
22
|
+
"first_invalid_pairing_index": "First-offender — index into guard_add of the first entry with no matching Guard constructor (absent when none).",
|
|
23
|
+
"first_invalid_pairing_recipient": "Rendered recipient type of the invalid pairing ('undefined' when unrecognized).",
|
|
24
|
+
"first_invalid_pairing_amount": "Rendered amount type of the invalid pairing.",
|
|
25
|
+
"guard_identifier_recipients_display": "All guard_add guard addresses whose recipient is a GuardIdentifier slot, ', '-joined — empty when there are none.",
|
|
26
|
+
"owner_receive_set": "ctx.owner_receive is non-null (permission-156 drain path in play).",
|
|
27
|
+
"new_lock_time": "Requested guard_not_added_expiration_time (ctx.guard_expiration_time, emitted when not undefined).",
|
|
28
|
+
"current_clock": "Current on-chain clock ms (ctx.current_clock_ms, emitted when present).",
|
|
29
|
+
"guard_lock_exceeds_year": "The requested guard-addition time-lock sits more than one year (365d) in the future (comparison sunk into the extractor).",
|
|
30
|
+
"balance_is_zero": "A claim is in play, balance and guard-count context are present, and the current balance parses to zero (BigInt comparison sunk into the extractor).",
|
|
31
|
+
"lock_until": "Live guard_not_added_expiration_time (ctx.current_guard_not_added_expiration_time, emitted when non-null).",
|
|
32
|
+
"guard_add_blocked_by_lock": "guard_add is non-empty, the time-lock is Some, and clock <= lock_until (E_GUARD_LOCKED_TIME comparison sunk into the extractor).",
|
|
33
|
+
"lock_time_in_past": "The requested guard-addition time-lock is not null and sits at or before the current clock (E_GUARD_LOCKED_TIME_INVALID comparison sunk into the extractor).",
|
|
34
|
+
"known_guards_display": "Live Reward guard addresses (ctx.target_guard_addresses), ','-joined — empty for an empty list.",
|
|
35
|
+
"claim_guard_not_in_targets": "The claimed guard is absent from ctx.target_guard_addresses (membership comparison sunk into the extractor).",
|
|
36
|
+
"reward_type": "The Reward's T coin type string (ctx.reward_type).",
|
|
37
|
+
"coin_type": "Coin type passed by coin_add (ctx.coin_add.coin_type).",
|
|
38
|
+
"coin_type_mismatch": "coin_add is present with reward_type and its coin type differs from the Reward's T.",
|
|
39
|
+
"payment_token_type": "Token type carried by receive's Payment (ctx.receive.token_type).",
|
|
40
|
+
"payment_token_mismatch": "receive is present with reward_type and its token type differs from the Reward's T.",
|
|
41
|
+
"intent_display": "user_intent_phrases joined and lowercased — the rendered intent text (emitted when phrases are non-empty).",
|
|
42
|
+
"expected_progress_state": "Progress state baked into the Guard table (ctx.guard_expected_progress_state).",
|
|
43
|
+
"praise_intent_wrong_node": "Intent matches a praise keyword, the Machine supports the wonder pattern, and the Guard checks a non-wonder node (keyword matching sunk into the extractor).",
|
|
44
|
+
"wonder_node_without_praise_intent": "Guard checks the wonder node but the intent text matches no praise keyword (keyword matching sunk into the extractor).",
|
|
45
|
+
"has_deposit": "The operation deposits (coin_add or receive present).",
|
|
46
|
+
"recovery_gap_present": "A deposit or guard_add is in play and no entry carries the owner recovery signature (Signer recipient + GuardU64Identifier amount) — detection sunk into the extractor.",
|
|
47
|
+
"always_true": "Extractor sentinel — unconditionally true; marks catalog stubs (via eq false) and documentation."
|
|
48
|
+
},
|
|
49
|
+
"rules": [
|
|
50
|
+
{
|
|
51
|
+
"rule_id": "R-R-1-01",
|
|
52
|
+
"dimension": "structural",
|
|
53
|
+
"trigger": "guard_add would exceed MAX_GUARD_COUNT_REWARD (200)",
|
|
54
|
+
"cases": [
|
|
55
|
+
{
|
|
56
|
+
"when": { "all": [
|
|
57
|
+
{ "field": "guard_add_count", "op": "truthy" },
|
|
58
|
+
{ "field": "guard_count_would_exceed", "op": "eq", "value": true }
|
|
59
|
+
] },
|
|
60
|
+
"level": "high",
|
|
61
|
+
"title": "guard_add would exceed MAX_GUARD_COUNT_REWARD",
|
|
62
|
+
"description": "Reward has ${guard_current} guards, adding ${guard_add_count} would total ${guard_total}, exceeds MAX_GUARD_COUNT_REWARD ${max_guard_count}. Move aborts with E_GUARD_COUNT_EXCEEDED (3).",
|
|
63
|
+
"scenario": "Adding too many guards to a single Reward (e.g. milestone reward with > 200 recipients)",
|
|
64
|
+
"mitigation": "Split into multiple Reward objects, or use GuardIdentifier recipient to handle multiple recipients with a single guard.",
|
|
65
|
+
"evidence": "current=${guard_current}, add=${guard_add_count}",
|
|
66
|
+
"stakeholders": ["owner", "service_provider"]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"rule_id": "R-R-1-02",
|
|
72
|
+
"dimension": "structural",
|
|
73
|
+
"trigger": "claim would push recipient record count to MAX_RECORD_COUNT_REWARD (5200)",
|
|
74
|
+
"cases": [
|
|
75
|
+
{
|
|
76
|
+
"when": { "all": [
|
|
77
|
+
{ "field": "claim", "op": "truthy" },
|
|
78
|
+
{ "field": "record_count_at_limit", "op": "eq", "value": true }
|
|
79
|
+
] },
|
|
80
|
+
"level": "high",
|
|
81
|
+
"title": "claim blocked — recipient record count at limit",
|
|
82
|
+
"description": "Recipient already has ${record_count} records, at MAX_RECORD_COUNT_REWARD ${max_record_count}. Next claim will abort with E_RECORD_COUNT_EXCEEDED (8). The recipient can no longer claim from this Reward.",
|
|
83
|
+
"scenario": "High-frequency claimer hits the 5200-record ceiling (e.g. cashback on every micro-order)",
|
|
84
|
+
"mitigation": "Owner can create a new Reward for the same recipient, OR redesign the Guard to batch claims (larger amount per claim).",
|
|
85
|
+
"evidence": "recipient_records=${record_count}",
|
|
86
|
+
"stakeholders": ["claimer"]
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"rule_id": "R-R-1-03",
|
|
92
|
+
"dimension": "structural",
|
|
93
|
+
"trigger": "guard_add batch size > MAX_GUARD_COUNT_REWARD (200) — schema-level overflow",
|
|
94
|
+
"cases": [
|
|
95
|
+
{
|
|
96
|
+
"when": { "all": [
|
|
97
|
+
{ "field": "guard_add_count", "op": "truthy" },
|
|
98
|
+
{ "field": "guard_batch_over_limit", "op": "eq", "value": true }
|
|
99
|
+
] },
|
|
100
|
+
"level": "critical",
|
|
101
|
+
"title": "guard_add batch exceeds absolute limit",
|
|
102
|
+
"description": "Single guard_add call tries to add ${guard_add_count} guards in one transaction, exceeds MAX_GUARD_COUNT_REWARD ${max_guard_count}. SDK rejects this in operate().",
|
|
103
|
+
"scenario": "Bulk guard addition without splitting transactions",
|
|
104
|
+
"mitigation": "Split into multiple transactions, each ≤ ${max_guard_count} new guards.",
|
|
105
|
+
"evidence": "batch_size=${guard_add_count}",
|
|
106
|
+
"stakeholders": ["owner"]
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"rule_id": "R-R-2-01",
|
|
112
|
+
"dimension": "semantic",
|
|
113
|
+
"trigger": "guard_add with GuardIdentifier recipient where identifier type is not address",
|
|
114
|
+
"cases": [
|
|
115
|
+
{
|
|
116
|
+
"when": { "field": "first_non_address_identifier_index", "op": "present" },
|
|
117
|
+
"level": "high",
|
|
118
|
+
"title": "guard_add[${first_non_address_identifier_index}]: recipient GuardIdentifier ${first_non_address_identifier_id} is not address-typed",
|
|
119
|
+
"description": "RewardGuard constructor requires the recipient identifier to be address-typed. If the identifier type is not address, Move aborts with E_RECIPIENT_IDENTIFIER_NOT_ADDRESS (4).",
|
|
120
|
+
"scenario": "Misconfigured Guard — recipient identifier is u64/bool instead of address",
|
|
121
|
+
"mitigation": "Use a Guard with an address-typed identifier for recipient, OR switch to Entity/Signer recipient.",
|
|
122
|
+
"evidence": "guard_add[${first_non_address_identifier_index}].recipient.GuardIdentifier=${first_non_address_identifier_id}, is_address=false",
|
|
123
|
+
"stakeholders": ["owner"]
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"rule_id": "R-R-2-02",
|
|
129
|
+
"dimension": "semantic",
|
|
130
|
+
"trigger": "guard_add with GuardU64Identifier amount where identifier type is not u64",
|
|
131
|
+
"cases": [
|
|
132
|
+
{
|
|
133
|
+
"when": { "field": "first_non_u64_amount_index", "op": "present" },
|
|
134
|
+
"level": "high",
|
|
135
|
+
"title": "guard_add[${first_non_u64_amount_index}]: amount GuardU64Identifier ${first_non_u64_amount_id} is not u64-typed",
|
|
136
|
+
"description": "RewardGuard constructor resolves the guard's submission value type for the amount identifier; if None or ≠ TYPE_U64, Move aborts with E_AMOUNT_NOT_U64 (5).",
|
|
137
|
+
"scenario": "Misconfigured Guard — amount identifier is not u64-typed",
|
|
138
|
+
"mitigation": "Use a Guard with a u64-typed identifier for amount, OR switch to Fixed amount.",
|
|
139
|
+
"evidence": "guard_add[${first_non_u64_amount_index}].amount.value=${first_non_u64_amount_id}, value_type=${first_non_u64_amount_value_type}",
|
|
140
|
+
"stakeholders": ["owner"]
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"rule_id": "R-R-2-03",
|
|
146
|
+
"dimension": "semantic",
|
|
147
|
+
"trigger": "guard_add with store_from_id set but identifier is not number/address compatible",
|
|
148
|
+
"cases": [
|
|
149
|
+
{
|
|
150
|
+
"when": { "field": "first_incompatible_store_from_id_index", "op": "present" },
|
|
151
|
+
"level": "medium",
|
|
152
|
+
"title": "guard_add[${first_incompatible_store_from_id_index}]: store_from_id incompatible with guard",
|
|
153
|
+
"description": "RewardGuard constructor with store_from_id=Some requires the identifier to be number- or address-compatible. If the identifier type is not number or address, Move aborts with E_STORE_FROM_ID_NOT_COMPATIBLE (12).",
|
|
154
|
+
"scenario": "Misconfigured Guard — store_from_id points to a non-address/non-number identifier",
|
|
155
|
+
"mitigation": "Use a compatible identifier, OR drop store_from_id (set to null) if cross-reference is not needed.",
|
|
156
|
+
"evidence": "guard=${first_incompatible_store_from_id_guard}, store_from_id=${first_incompatible_store_from_id_value}",
|
|
157
|
+
"stakeholders": ["owner"]
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"rule_id": "R-R-2-04",
|
|
163
|
+
"dimension": "semantic",
|
|
164
|
+
"trigger": "guard_add with invalid Recipient × Amount pairing (no matching constructor)",
|
|
165
|
+
"cases": [
|
|
166
|
+
{
|
|
167
|
+
"when": { "field": "first_invalid_pairing_index", "op": "present" },
|
|
168
|
+
"level": "high",
|
|
169
|
+
"title": "guard_add[${first_invalid_pairing_index}]: invalid Recipient × Amount pairing",
|
|
170
|
+
"description": "recipient=${first_invalid_pairing_recipient}, amount=${first_invalid_pairing_amount} — no matching Move constructor. The SDK reward-guard binding will W_ERROR with \"Invalid recipient or amount type combination\".",
|
|
171
|
+
"scenario": "Schema validation bypassed or stale client",
|
|
172
|
+
"mitigation": "Use one of the 6 valid pairings: Guard, Entity, or Signer recipient — each with a u8 or u64 amount identifier.",
|
|
173
|
+
"evidence": "recipient=${first_invalid_pairing_recipient}, amount=${first_invalid_pairing_amount}",
|
|
174
|
+
"stakeholders": ["owner"]
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"rule_id": "R-R-2-05",
|
|
180
|
+
"dimension": "semantic",
|
|
181
|
+
"trigger": "guard_add with a GuardIdentifier recipient slot — the payout address is only as safe as the Guard predicate; owner security due diligence",
|
|
182
|
+
"cases": [
|
|
183
|
+
{
|
|
184
|
+
"when": { "field": "guard_identifier_recipients_display", "op": "truthy" },
|
|
185
|
+
"level": "medium",
|
|
186
|
+
"title": "Claim payout address comes from a submission slot — verify the Guard predicate constrains it",
|
|
187
|
+
"description": "For guard_add entry ${guard_identifier_recipients_display}, the claim recipient is Recipient::GuardIdentifier: claim() reads the payout address from the claim-time passport submission, and claim() itself needs no Permission. Whether that address is legitimate is decided entirely inside the Guard predicate — a guard whose predicate passes without constraining the recipient slot lets any passing party fill the slot with their own address and claim the pool. This is legal by design (the slot CAN be constrained by the predicate), so the safety duty is the configurer's, not the runtime's.",
|
|
188
|
+
"scenario": "Owner mounts a claim Guard whose root does not bind the submitted recipient (e.g., no Signer/entity constraint)",
|
|
189
|
+
"mitigation": "1) Review the full Guard definition and confirm the predicate constrains the recipient identifier (e.g., compare it to Signer or to an intended entity address). 2) If the payout should be a fixed party, use an Entity recipient; if it should be the caller, use Signer — neither depends on a submitted slot. 3) Regress on testnet: a claim to an address the predicate does not authorize must be rejected by the guard.",
|
|
190
|
+
"evidence": "guard_add with GuardIdentifier recipient: [${guard_identifier_recipients_display}]",
|
|
191
|
+
"stakeholders": ["owner", "service_provider"],
|
|
192
|
+
"exposure": {
|
|
193
|
+
"loss_parties": [
|
|
194
|
+
{ "role": "merchant", "basis": "The reward pool is the merchant's deposited budget; a claim Guard that passes without constraining the recipient slot lets the pool drain to arbitrary addresses instead of the intended recipients." }
|
|
195
|
+
],
|
|
196
|
+
"gain_paths": [
|
|
197
|
+
{
|
|
198
|
+
"role": "neutral",
|
|
199
|
+
"path": "A passing party fills the claim-time submission slot with their own address and claims from the pool.",
|
|
200
|
+
"viability": "conditional",
|
|
201
|
+
"gate": "Executes only if the Guard predicate fails to bind the submitted recipient — audit the full Guard definition to confirm or block the path."
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"rule_id": "R-R-3-01",
|
|
210
|
+
"dimension": "permission",
|
|
211
|
+
"trigger": "claim attempted without permission context — claim is passport-driven",
|
|
212
|
+
"cases": [
|
|
213
|
+
{
|
|
214
|
+
"when": { "field": "claim", "op": "truthy" },
|
|
215
|
+
"level": "medium",
|
|
216
|
+
"title": "claim is permission-free — anyone with a valid Passport can claim",
|
|
217
|
+
"description": "Claiming does NOT assert any permission index. Eligibility is determined entirely by the Guard verification (the passport guard-result check). If the Guard is too permissive, funds can be drained by anyone.",
|
|
218
|
+
"scenario": "Loose Guard allows unauthorized claims (e.g. time-only Guard without service binding)",
|
|
219
|
+
"mitigation": "1) Use Guards that bind to specific Service/Order context. 2) Set expiration_time. 3) Monitor balance and refill only what's needed.",
|
|
220
|
+
"evidence": "claim=${claim}",
|
|
221
|
+
"stakeholders": ["owner", "service_provider"]
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"rule_id": "R-R-3-02",
|
|
227
|
+
"dimension": "permission",
|
|
228
|
+
"trigger": "owner_receive (156) — broad blast radius, owner can drain balance",
|
|
229
|
+
"cases": [
|
|
230
|
+
{
|
|
231
|
+
"when": { "field": "owner_receive_set", "op": "eq", "value": true },
|
|
232
|
+
"level": "high",
|
|
233
|
+
"title": "owner_receive drains balance to Permission owner",
|
|
234
|
+
"description": "owner_receive (permission 156) unwraps Receiving<K> / CoinWrapper<K> and forwards to Permission owner. If 156 is granted too broadly, any 156-holder can sweep receivables. (Note: owner_receive does NOT directly drain balance — only Receiving<K> envelopes sent to the Reward's id.)",
|
|
235
|
+
"scenario": "Compromised 156-holder sweeps receivables before owner",
|
|
236
|
+
"mitigation": "1) Grant 156 only to the Permission owner address. 2) Reconcile Receiving<K> inflows vs owner_receive events.",
|
|
237
|
+
"evidence": "owner_receive set",
|
|
238
|
+
"stakeholders": ["owner", "service_provider"],
|
|
239
|
+
"exposure": {
|
|
240
|
+
"loss_parties": [
|
|
241
|
+
{ "role": "merchant", "basis": "Receivables sent to the Reward can be extracted from it by any holder of the drain permission at a time of their choosing, ahead of the owner's own reconciliation." }
|
|
242
|
+
],
|
|
243
|
+
"gain_paths": [
|
|
244
|
+
{
|
|
245
|
+
"role": "collaborator",
|
|
246
|
+
"path": "A 156-holder triggers the unwrap-and-forward drain, extracting Receiving envelopes sent to the Reward out to the Permission owner.",
|
|
247
|
+
"viability": "conditional",
|
|
248
|
+
"gate": "The unconfirmed condition is the grant being broader than the owner address; the triggering holder profits only when they control the Permission owner identity the funds route to."
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"rule_id": "R-R-3-03",
|
|
257
|
+
"dimension": "permission",
|
|
258
|
+
"trigger": "Guard-addition time-lock update (155) — can permanently lock guard additions",
|
|
259
|
+
"cases": [
|
|
260
|
+
{
|
|
261
|
+
"when": { "field": "guard_lock_exceeds_year", "op": "eq", "value": true },
|
|
262
|
+
"level": "medium",
|
|
263
|
+
"title": "The guard-addition time-lock freezes guard additions for > 1 year",
|
|
264
|
+
"description": "Setting guard_not_added_expiration_time to ${new_lock_time} (> 1 year from now) effectively freezes the guard list. While this is sometimes intentional (milestone rewards), it cannot be undone without setting a new time (which itself requires 155 permission).",
|
|
265
|
+
"scenario": "Operator sets excessively long lock period by mistake",
|
|
266
|
+
"mitigation": "Confirm intent. If wrong, set the guard-addition time-lock again with a shorter time (must be ≥ current clock per E_GUARD_LOCKED_TIME_NOT_INCREASING).",
|
|
267
|
+
"evidence": "lock_until=${new_lock_time}, clock=${current_clock}",
|
|
268
|
+
"stakeholders": ["owner"]
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"rule_id": "R-R-4-01",
|
|
274
|
+
"dimension": "lifecycle",
|
|
275
|
+
"trigger": "claim on guard with expiration_time < now (E_GUARD_EXPIRED) — catalog stub: the retired check could not inspect guard expiry without a query and always returned null",
|
|
276
|
+
"cases": [
|
|
277
|
+
{
|
|
278
|
+
"when": { "field": "always_true", "op": "eq", "value": false },
|
|
279
|
+
"level": "info",
|
|
280
|
+
"title": "claim on guard with expiration_time < now (E_GUARD_EXPIRED)",
|
|
281
|
+
"description": "Catalog stub — the retired check surfaced no finding: the guard's expiration cannot be inspected at this layer without a query. Retained for catalog completeness; the condition is never satisfiable.",
|
|
282
|
+
"stakeholders": ["claimer"]
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"rule_id": "R-R-4-02",
|
|
288
|
+
"dimension": "lifecycle",
|
|
289
|
+
"trigger": "claim: balance < amount (E_INSUFFICIENT_BALANCE)",
|
|
290
|
+
"cases": [
|
|
291
|
+
{
|
|
292
|
+
"when": { "all": [
|
|
293
|
+
{ "field": "claim", "op": "truthy" },
|
|
294
|
+
{ "field": "balance_is_zero", "op": "eq", "value": true }
|
|
295
|
+
] },
|
|
296
|
+
"level": "high",
|
|
297
|
+
"title": "claim on Reward with zero balance",
|
|
298
|
+
"description": "Reward balance is 0. Any claim will abort with E_INSUFFICIENT_BALANCE (6). Owner must coin_add (153) or receive (154) to replenish.",
|
|
299
|
+
"scenario": "Marketing campaign budget exhausted but guards remain active",
|
|
300
|
+
"mitigation": "1) Owner: coin_add to replenish. 2) Owner: guard_remove_expired + lock guard additions via the time-lock to deactivate. 3) Claimer: wait for replenishment.",
|
|
301
|
+
"evidence": "balance=0",
|
|
302
|
+
"stakeholders": ["claimer", "owner"]
|
|
303
|
+
}
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"rule_id": "R-R-4-03",
|
|
308
|
+
"dimension": "lifecycle",
|
|
309
|
+
"trigger": "guard_add while guard_not_added_expiration_time is Some and clock ≤ expiration (E_GUARD_LOCKED_TIME)",
|
|
310
|
+
"cases": [
|
|
311
|
+
{
|
|
312
|
+
"when": { "all": [
|
|
313
|
+
{ "field": "guard_add_count", "op": "truthy" },
|
|
314
|
+
{ "field": "guard_add_blocked_by_lock", "op": "eq", "value": true }
|
|
315
|
+
] },
|
|
316
|
+
"level": "high",
|
|
317
|
+
"title": "guard_add blocked by time-lock (guard_not_added_expiration_time)",
|
|
318
|
+
"description": "guard_not_added_expiration_time is Some(${lock_until}), clock is ${current_clock}. Move asserts clock > expiration_time (E_GUARD_LOCKED_TIME = 10).",
|
|
319
|
+
"scenario": "Trying to add guards during a flash sale lock period",
|
|
320
|
+
"mitigation": "1) Wait until clock > expiration_time. 2) Use the 155-permission time-lock update to extend the lock (cannot shorten below current clock).",
|
|
321
|
+
"evidence": "lock_until=${lock_until}, clock=${current_clock}",
|
|
322
|
+
"stakeholders": ["owner"]
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"rule_id": "R-R-4-04",
|
|
328
|
+
"dimension": "lifecycle",
|
|
329
|
+
"trigger": "Guard-addition time-lock regression (new time < current clock)",
|
|
330
|
+
"cases": [
|
|
331
|
+
{
|
|
332
|
+
"when": { "field": "lock_time_in_past", "op": "eq", "value": true },
|
|
333
|
+
"level": "high",
|
|
334
|
+
"title": "Guard-addition time-lock: new time must be in the future",
|
|
335
|
+
"description": "New guard_not_added_expiration_time = ${new_lock_time} ≤ clock ${current_clock}. Move aborts with E_GUARD_LOCKED_TIME_INVALID (11).",
|
|
336
|
+
"scenario": "Operator sets lock time in the past by mistake",
|
|
337
|
+
"mitigation": "Set guard_expiration_time to a value > ${current_clock} (current clock).",
|
|
338
|
+
"evidence": "new_time=${new_lock_time}, clock=${current_clock}",
|
|
339
|
+
"stakeholders": ["owner"]
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"rule_id": "R-R-5-01",
|
|
345
|
+
"dimension": "cross_object",
|
|
346
|
+
"trigger": "claim: guard not found in self.guards (E_GUARD_NOT_FOUND)",
|
|
347
|
+
"cases": [
|
|
348
|
+
{
|
|
349
|
+
"when": { "field": "claim_guard_not_in_targets", "op": "eq", "value": true },
|
|
350
|
+
"level": "high",
|
|
351
|
+
"title": "claim: supplied guard not in Reward.guards",
|
|
352
|
+
"description": "Guard ${claim} is not in the Reward's guard list. Move iterates self.guards and aborts with E_GUARD_NOT_FOUND (7) if no match.",
|
|
353
|
+
"scenario": "Claimer uses the wrong Guard object (typo or wrong Service)",
|
|
354
|
+
"mitigation": "1) Verify the Guard address via query ObjectReward. 2) Ensure the Guard was added via guard_add (152).",
|
|
355
|
+
"evidence": "claim_guard=${claim}, known_guards=${known_guards_display}",
|
|
356
|
+
"stakeholders": ["claimer"]
|
|
357
|
+
}
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"rule_id": "R-R-5-02",
|
|
362
|
+
"dimension": "cross_object",
|
|
363
|
+
"trigger": "coin_add: coin type T mismatch with Reward<T>",
|
|
364
|
+
"cases": [
|
|
365
|
+
{
|
|
366
|
+
"when": { "field": "coin_type_mismatch", "op": "eq", "value": true },
|
|
367
|
+
"level": "critical",
|
|
368
|
+
"title": "coin_add: coin type T mismatch",
|
|
369
|
+
"description": "Reward is Reward<${reward_type}> but coin_add passes Coin<${coin_type}>. Move type-system mismatch; SDK W_ERROR in operate().",
|
|
370
|
+
"scenario": "Operator tries to deposit wrong coin type (e.g. USDC into a WOW Reward)",
|
|
371
|
+
"mitigation": "Use Coin<${reward_type}> for coin_add.",
|
|
372
|
+
"evidence": "reward_type=${reward_type}, coin_type=${coin_type}",
|
|
373
|
+
"stakeholders": ["owner"]
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"rule_id": "R-R-5-03",
|
|
379
|
+
"dimension": "cross_object",
|
|
380
|
+
"trigger": "receive: Payment<T> type mismatch with Reward<T>",
|
|
381
|
+
"cases": [
|
|
382
|
+
{
|
|
383
|
+
"when": { "field": "payment_token_mismatch", "op": "eq", "value": true },
|
|
384
|
+
"level": "critical",
|
|
385
|
+
"title": "receive: Payment token_type mismatch",
|
|
386
|
+
"description": "Reward is Reward<${reward_type}> but receive's Payment<CoinWrapper<${payment_token_type}>>. SDK W_ERROR in operate().",
|
|
387
|
+
"scenario": "Operator tries to receive wrong-token Payment",
|
|
388
|
+
"mitigation": "Use Payment<${reward_type}> for receive.",
|
|
389
|
+
"evidence": "reward_type=${reward_type}, payment_token=${payment_token_type}",
|
|
390
|
+
"stakeholders": ["owner"]
|
|
391
|
+
}
|
|
392
|
+
]
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"rule_id": "R-R-6-01",
|
|
396
|
+
"dimension": "business_semantic",
|
|
397
|
+
"trigger": "intent mentions praise/positive-review but Guard checks non-wonder progress node",
|
|
398
|
+
"cases": [
|
|
399
|
+
{
|
|
400
|
+
"when": { "field": "praise_intent_wrong_node", "op": "eq", "value": true },
|
|
401
|
+
"level": "high",
|
|
402
|
+
"title": "Guard checks progress==\"${expected_progress_state}\" but intent indicates praise reward (wonder node)",
|
|
403
|
+
"description": "User intent mentions praise/positive-review/wonder, which maps to the 'wonder' progress node (customer gives positive review AFTER service completion). But the Guard's table bakes expected state=\"${expected_progress_state}\", allowing reward claim at the wrong lifecycle stage. This violates the business semantics: \"praise reward\" should only be claimable AFTER the customer advances to the 'wonder' node, not before. Guard is immutable — fixing this requires creating a new Guard + Reward pair.",
|
|
404
|
+
"scenario": "Designer builds Guard checking 'completed' instead of 'wonder' for a praise reward",
|
|
405
|
+
"mitigation": "Set the Guard table's expected progress state to 'wonder' (the positive-review node). The correct pattern: ordered → in_service → completed → wonder (praise) triggers reward claim. Reference: reward-templates.ts wonder_praise template.",
|
|
406
|
+
"evidence": "intent=\"${intent_display}\", expected_state=\"${expected_progress_state}\", expected_wonder=true",
|
|
407
|
+
"stakeholders": ["owner", "service_provider", "claimer"]
|
|
408
|
+
}
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"rule_id": "R-R-6-02",
|
|
413
|
+
"dimension": "business_semantic",
|
|
414
|
+
"trigger": "Guard checks wonder node but intent does not mention praise",
|
|
415
|
+
"cases": [
|
|
416
|
+
{
|
|
417
|
+
"when": { "field": "wonder_node_without_praise_intent", "op": "eq", "value": true },
|
|
418
|
+
"level": "medium",
|
|
419
|
+
"title": "Guard checks wonder node but intent does not mention praise",
|
|
420
|
+
"description": "Guard's expected progress state is \"wonder\" (positive-review node), but the user intent does not mention any praise/positive-review keyword. This may be a copy-paste from a wonder_praise template without adjusting the Guard for the actual business semantics. If this is a general feedback reward (wonder_feedback), this is fine. Otherwise, verify the node choice.",
|
|
421
|
+
"scenario": "Designer copies wonder_praise template but actually wants a completion-based reward",
|
|
422
|
+
"mitigation": "Verify: if intent is praise reward, add 'praise/positive review' to description. If intent is completion-based reward, change Guard to check 'completed' node.",
|
|
423
|
+
"evidence": "expected_state=\"wonder\", intent=\"${intent_display}\" (no praise keyword)",
|
|
424
|
+
"stakeholders": ["owner"]
|
|
425
|
+
}
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"rule_id": "R-R-7-01",
|
|
430
|
+
"dimension": "fund_recovery",
|
|
431
|
+
"trigger": "coin_add/receive (deposit) or guard_add without an owner fund-recovery escape guard",
|
|
432
|
+
"cases": [
|
|
433
|
+
{
|
|
434
|
+
"when": { "all": [
|
|
435
|
+
{ "field": "recovery_gap_present", "op": "eq", "value": true },
|
|
436
|
+
{ "field": "has_deposit", "op": "eq", "value": true }
|
|
437
|
+
] },
|
|
438
|
+
"level": "medium",
|
|
439
|
+
"title": "No owner fund-recovery escape guard on this Reward",
|
|
440
|
+
"description": "claim() is the ONLY exit from the Reward's balance field, and none of the guards being configured is an owner escape hatch — any unclaimed remainder stays locked forever. Note: owner_receive (op 156) does NOT help here: it only extracts objects the Reward RECEIVED via transfer (Receiving<CoinWrapper<K>> or NFT-like objects) to the Permission owner and never touches balance; receive (op 154) is what joins payments into balance. This is a configuration gap, not a contract defect.",
|
|
441
|
+
"scenario": "A marketing Reward is fully consumed by guards, the campaign ends with a residual balance, and the merchant has no guard that lets them reclaim it.",
|
|
442
|
+
"mitigation": "Add an escape guard alongside the other guards: (1) Guard: logic_and(logic_equal(query(1002 permission.owner [permission_address]), Signer), logic_greater_equal(Clock, <unlock_time>)) — verifies the tx sender is the live Permission owner, with the Clock comparison acting as the lock period (e.g. 30 days); (2) RewardGuard entry: recipient=Signer, amount=GuardU64Identifier(u8 submission mark), expiration_time=unlock_time + claim window (or None) — remember the contract asserts clock <= expiration_time, i.e. expiration is the last claimable moment, not the unlock moment; (3) after unlock the owner claims by submitting the full remaining balance to recover 100%.",
|
|
443
|
+
"evidence": "deposit=${has_deposit}, guard_add=${guard_add_count}, escape=false (no entry with Signer recipient + GuardU64Identifier amount)",
|
|
444
|
+
"stakeholders": ["owner"],
|
|
445
|
+
"exposure": {
|
|
446
|
+
"loss_parties": [
|
|
447
|
+
{ "role": "merchant", "basis": "Unclaimed reward remainder stays locked in the balance field forever — the merchant's deposited budget is unrecoverable." }
|
|
448
|
+
],
|
|
449
|
+
"gain_paths": []
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"when": { "field": "recovery_gap_present", "op": "eq", "value": true },
|
|
454
|
+
"level": "low",
|
|
455
|
+
"title": "No owner fund-recovery escape guard on this Reward",
|
|
456
|
+
"description": "claim() is the ONLY exit from the Reward's balance field, and none of the guards being configured is an owner escape hatch — any unclaimed remainder stays locked forever. Note: owner_receive (op 156) does NOT help here: it only extracts objects the Reward RECEIVED via transfer (Receiving<CoinWrapper<K>> or NFT-like objects) to the Permission owner and never touches balance; receive (op 154) is what joins payments into balance. This is a configuration gap, not a contract defect.",
|
|
457
|
+
"scenario": "A marketing Reward is fully consumed by guards, the campaign ends with a residual balance, and the merchant has no guard that lets them reclaim it.",
|
|
458
|
+
"mitigation": "Add an escape guard alongside the other guards: (1) Guard: logic_and(logic_equal(query(1002 permission.owner [permission_address]), Signer), logic_greater_equal(Clock, <unlock_time>)) — verifies the tx sender is the live Permission owner, with the Clock comparison acting as the lock period (e.g. 30 days); (2) RewardGuard entry: recipient=Signer, amount=GuardU64Identifier(u8 submission mark), expiration_time=unlock_time + claim window (or None) — remember the contract asserts clock <= expiration_time, i.e. expiration is the last claimable moment, not the unlock moment; (3) after unlock the owner claims by submitting the full remaining balance to recover 100%.",
|
|
459
|
+
"evidence": "deposit=${has_deposit}, guard_add=${guard_add_count}, escape=false (no entry with Signer recipient + GuardU64Identifier amount)",
|
|
460
|
+
"stakeholders": ["owner"],
|
|
461
|
+
"exposure": {
|
|
462
|
+
"loss_parties": [
|
|
463
|
+
{ "role": "merchant", "basis": "Unclaimed reward remainder stays locked in the balance field forever — the merchant's deposited budget is unrecoverable." }
|
|
464
|
+
],
|
|
465
|
+
"gain_paths": []
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
]
|
|
469
|
+
}
|
|
470
|
+
]
|
|
471
|
+
}
|