@wowok/agent-mcp 3.4.3 → 3.4.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/.build-stamp.json +3 -3
- package/dist/build-stamp.js +1 -0
- package/dist/chain-semantics/composition-truth.js +1 -1
- package/dist/chain-semantics/eval-order.js +1 -1
- package/dist/chain-semantics/freeze-map.js +1 -1
- package/dist/chain-semantics/fund-flow.js +1 -1
- package/dist/chain-semantics/object-graph.js +1 -1
- package/dist/composition/audit.js +1 -1
- package/dist/composition/compile.js +1 -1
- package/dist/composition/emit-phases.js +1 -1
- package/dist/composition/generate.js +1 -1
- package/dist/composition/guard-fill.js +1 -1
- package/dist/composition/input-normalize.js +1 -1
- package/dist/composition/materialize.js +1 -1
- package/dist/composition/mode-gates.js +1 -1
- package/dist/composition/plan.js +1 -1
- package/dist/composition/product-card.js +1 -1
- package/dist/composition/shape-expand.js +1 -0
- package/dist/config/judgment.js +1 -1
- package/dist/config/template-params.js +1 -1
- package/dist/data/sync/cdc.js +1 -1
- package/dist/data/sync/graphql-source.js +1 -1
- package/dist/evaluation/engine.js +1 -1
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/graph/onchain/expand.js +1 -1
- package/dist/graph/onchain/exposure.js +1 -1
- package/dist/graph/onchain/sdk-batch.js +1 -1
- package/dist/harness/entry-ignite-selfheal.js +1 -0
- package/dist/harness/forward-leg-preflight.js +1 -0
- package/dist/harness/recover.js +1 -1
- package/dist/keeper/detectors.js +1 -1
- package/dist/knowledge/allocator-rail-verifier.js +1 -1
- package/dist/knowledge/arb-operation-face.js +1 -0
- package/dist/knowledge/arbitration-rail-verifier.js +1 -1
- package/dist/knowledge/arbitration-templates.js +1 -1
- package/dist/knowledge/audit-rules.d.ts +15 -0
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/rules/alloc_audit.json.good +310 -0
- package/dist/knowledge/baselines/rules/allocation.json.good +568 -0
- package/dist/knowledge/baselines/rules/arb.json.good +174 -0
- package/dist/knowledge/baselines/rules/arbitration.json.good +393 -0
- package/dist/knowledge/baselines/rules/bridge.json.good +197 -0
- package/dist/knowledge/baselines/rules/contact.json.good +152 -0
- package/dist/knowledge/baselines/rules/demand.json.good +158 -0
- package/dist/knowledge/baselines/rules/graph.json.good +534 -0
- package/dist/knowledge/baselines/rules/guard.json +18 -5
- package/dist/knowledge/baselines/rules/guard.json.good +1192 -0
- package/dist/knowledge/baselines/rules/machine.json.good +734 -0
- package/dist/knowledge/baselines/rules/oracle.json +1 -1
- package/dist/knowledge/baselines/rules/oracle.json.good +120 -0
- package/dist/knowledge/baselines/rules/order.json.good +549 -0
- package/dist/knowledge/baselines/rules/payment.json.good +205 -0
- package/dist/knowledge/baselines/rules/permission.json.good +330 -0
- package/dist/knowledge/baselines/rules/personal.json.good +139 -0
- package/dist/knowledge/baselines/rules/plan.json +343 -1
- package/dist/knowledge/baselines/rules/plan.json.good +1187 -0
- package/dist/knowledge/baselines/rules/progress.json.good +364 -0
- package/dist/knowledge/baselines/rules/proof.json.good +158 -0
- package/dist/knowledge/baselines/rules/registrar.json.good +159 -0
- package/dist/knowledge/baselines/rules/repository.json.good +244 -0
- package/dist/knowledge/baselines/rules/resource.json.good +117 -0
- package/dist/knowledge/baselines/rules/reward.json +10 -10
- package/dist/knowledge/baselines/rules/reward.json.good +586 -0
- package/dist/knowledge/baselines/rules/service.json.good +595 -0
- package/dist/knowledge/baselines/rules/treasury.json.good +440 -0
- package/dist/knowledge/baselines/rules/util.json.good +101 -0
- package/dist/knowledge/builtin-templates.d.ts +13 -1
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/chain-query-registry.js +1 -1
- package/dist/knowledge/discount-threshold.js +1 -1
- package/dist/knowledge/fee-param-bindings.js +1 -1
- package/dist/knowledge/fund-layer.d.ts +2 -0
- package/dist/knowledge/fund-layer.js +1 -1
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-binding-table.js +1 -1
- package/dist/knowledge/guard-binding-verifier.js +1 -1
- package/dist/knowledge/guard-create-preflight.js +1 -0
- package/dist/knowledge/guard-field-cognition.js +1 -1
- package/dist/knowledge/guard-host-context.js +1 -1
- package/dist/knowledge/guard-leg-eval.js +1 -0
- package/dist/knowledge/guard-node-gates.js +1 -1
- package/dist/knowledge/guard-puzzle.js +1 -1
- package/dist/knowledge/guard-quality.js +1 -0
- package/dist/knowledge/guard-render.js +1 -1
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-semantic-walk.js +1 -0
- package/dist/knowledge/guard-templates.d.ts +1 -0
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/guard-translation.js +1 -1
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/param-schema.js +1 -1
- package/dist/knowledge/param-tiers.js +1 -1
- package/dist/knowledge/path-oracle/coverage.js +1 -1
- package/dist/knowledge/path-oracle/index.js +1 -1
- package/dist/knowledge/path-oracle/products/airbnb.js +1 -0
- package/dist/knowledge/path-oracle/products/algora.js +1 -0
- package/dist/knowledge/path-oracle/products/alibaba-1688.js +1 -0
- package/dist/knowledge/path-oracle/products/amazon.js +1 -0
- package/dist/knowledge/path-oracle/products/beatstars.js +1 -0
- package/dist/knowledge/path-oracle/products/booking-com.js +1 -0
- package/dist/knowledge/path-oracle/products/contra.js +1 -0
- package/dist/knowledge/path-oracle/products/costco.js +1 -0
- package/dist/knowledge/path-oracle/products/coursera.js +1 -0
- package/dist/knowledge/path-oracle/products/duoduo-maicai.js +1 -0
- package/dist/knowledge/path-oracle/products/etsy.js +1 -0
- package/dist/knowledge/path-oracle/products/food-delivery.js +1 -1
- package/dist/knowledge/path-oracle/products/gamefound.js +1 -0
- package/dist/knowledge/path-oracle/products/gofundme.js +1 -0
- package/dist/knowledge/path-oracle/products/hackerone.js +1 -0
- package/dist/knowledge/path-oracle/products/kickstarter.js +1 -0
- package/dist/knowledge/path-oracle/products/klook.js +1 -0
- package/dist/knowledge/path-oracle/products/ninety-nine-designs.js +1 -0
- package/dist/knowledge/path-oracle/products/onlyfans.js +1 -0
- package/dist/knowledge/path-oracle/products/patreon.js +1 -0
- package/dist/knowledge/path-oracle/products/pinduoduo-kuaituantuan.js +1 -0
- package/dist/knowledge/path-oracle/products/royalty-exchange.js +1 -0
- package/dist/knowledge/path-oracle/products/shansong.js +1 -0
- package/dist/knowledge/path-oracle/products/taobao-presale.js +1 -0
- package/dist/knowledge/path-oracle/products/upwork-catalog.js +1 -0
- package/dist/knowledge/path-oracle/products/upwork.js +1 -0
- package/dist/knowledge/path-oracle/products/yuanfudao.js +1 -0
- package/dist/knowledge/path-oracle/products/ziroom.js +1 -0
- package/dist/knowledge/pattern-resolutions.js +1 -1
- package/dist/knowledge/product-detail-source.js +1 -1
- package/dist/knowledge/product-doc-b5.js +1 -1
- package/dist/knowledge/product-doc-facets.js +1 -0
- package/dist/knowledge/projection.js +1 -1
- package/dist/knowledge/publish-gate.js +1 -1
- package/dist/knowledge/publish-surface-contract.js +1 -1
- package/dist/knowledge/recipient-constraint.d.ts +20 -0
- package/dist/knowledge/recipient-constraint.js +1 -1
- package/dist/knowledge/rule-declaration-types.d.ts +13 -0
- package/dist/knowledge/rule-declaration-types.js +1 -0
- package/dist/knowledge/rule-declarations.js +1 -0
- package/dist/knowledge/scenario-modes.d.ts +6 -0
- package/dist/knowledge/scenario-topology.js +1 -1
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-prose.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- 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/relationship-profile.js +1 -1
- package/dist/playbooks/service-build/service-panorama.js +1 -1
- package/dist/playbooks/service-build/service-quote.js +1 -1
- package/dist/review/index.js +1 -1
- package/dist/review/service.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +9 -0
- package/dist/schema/benchmark-migration/index.js +1 -1
- package/dist/schema/call/arbitration.d.ts +8 -0
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +8 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +2 -0
- package/dist/schema/call/error-codes.d.ts +1 -1
- package/dist/schema/call/error-codes.js +1 -1
- package/dist/schema/call/handler.d.ts +2 -1
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/order.d.ts +10 -0
- package/dist/schema/call/permission-handler.js +1 -1
- package/dist/schema/call/permission.js +1 -1
- package/dist/schema/call/progress.d.ts +15 -0
- package/dist/schema/call/progress.js +1 -1
- package/dist/schema/call/receipt.d.ts +1 -0
- package/dist/schema/call/receipt.js +1 -1
- package/dist/schema/call/repository.d.ts +12 -0
- package/dist/schema/call/repository.js +1 -1
- package/dist/schema/call/reward.js +1 -1
- package/dist/schema/call/semantic.d.ts +1 -0
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +5 -3
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/envelope-unify.js +1 -1
- package/dist/schema/goal/index.d.ts +23 -0
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +2 -2
- package/dist/schema/local/index.d.ts +20 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/local/wip.d.ts +4 -0
- package/dist/schema/local/wip.js +1 -1
- package/dist/schema/messenger/index.d.ts +5 -0
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +944 -1
- package/dist/schema/operations.js +1 -1
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +5 -5
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/workspace/index.d.ts +2 -2
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.schema.json +1 -257
- package/dist/schemas/ask_user.schema.json +1 -78
- package/dist/schemas/benchmark_migration_operation.schema.json +1 -626
- package/dist/schemas/bridge_operation.schema.json +1 -1069
- package/dist/schemas/config_operation.schema.json +1 -82
- package/dist/schemas/employee_operation.schema.json +1 -319
- package/dist/schemas/evaluation_operation.schema.json +1 -3932
- package/dist/schemas/goal_operation.schema.json +1 -1650
- package/dist/schemas/guard2file.schema.json +1 -137
- package/dist/schemas/index.json +1 -285
- package/dist/schemas/industry_pack_operation.schema.json +1 -582
- package/dist/schemas/intent_radar.schema.json +1 -155
- package/dist/schemas/keeper_operation.schema.json +1 -364
- package/dist/schemas/local_cache_operation.schema.json +1 -116
- package/dist/schemas/local_history_operation.schema.json +1 -105
- package/dist/schemas/local_info_operation.schema.json +1 -140
- package/dist/schemas/local_mark_operation.schema.json +1 -124
- package/dist/schemas/machineNode2file.schema.json +1 -137
- package/dist/schemas/messenger_operation.schema.json +1 -2068
- package/dist/schemas/monitor_events.schema.json +1 -87
- package/dist/schemas/monitor_subscription.schema.json +1 -327
- package/dist/schemas/onchain_events.schema.json +1 -207
- package/dist/schemas/onchain_operations.schema.json +1 -28699
- package/dist/schemas/onchain_operations_allocation.schema.json +1 -1376
- package/dist/schemas/onchain_operations_arbitration.schema.json +1 -1355
- package/dist/schemas/onchain_operations_contact.schema.json +1 -988
- package/dist/schemas/onchain_operations_demand.schema.json +1 -1146
- package/dist/schemas/onchain_operations_gen_passport.schema.json +1 -663
- package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -180
- package/dist/schemas/onchain_operations_guard.schema.json +1 -8518
- package/dist/schemas/onchain_operations_machine.schema.json +1 -1879
- package/dist/schemas/onchain_operations_order.schema.json +1 -1121
- package/dist/schemas/onchain_operations_payment.schema.json +1 -316
- package/dist/schemas/onchain_operations_permission.schema.json +1 -1036
- package/dist/schemas/onchain_operations_personal.schema.json +1 -1463
- package/dist/schemas/onchain_operations_progress.schema.json +1 -1041
- package/dist/schemas/onchain_operations_proof.schema.json +1 -750
- package/dist/schemas/onchain_operations_repository.schema.json +1 -2046
- package/dist/schemas/onchain_operations_reward.schema.json +1 -1286
- package/dist/schemas/onchain_operations_service.schema.json +1 -2602
- package/dist/schemas/onchain_operations_treasury.schema.json +1 -1527
- package/dist/schemas/onchain_table_data.schema.json +1 -1146
- package/dist/schemas/permission_operation.schema.json +1 -43
- package/dist/schemas/persona_operation.schema.json +1 -10424
- package/dist/schemas/query_toolkit.schema.json +1 -1867
- package/dist/schemas/schema_query.schema.json +1 -116
- package/dist/schemas/service_clone_operation.schema.json +1 -49
- package/dist/schemas/settle_sweep.schema.json +1 -0
- package/dist/schemas/strategy_review_operation.schema.json +1 -66
- package/dist/schemas/verify_guard_dry_run.schema.json +1 -0
- package/dist/schemas/watch_operation.schema.json +1 -145
- package/dist/schemas/wip_file.schema.json +1 -299
- package/dist/schemas/workflow_operation.schema.json +1 -722
- package/dist/schemas/workspace_operation.schema.json +1 -104
- package/dist/schemas/wowok_buildin_info.schema.json +1 -758
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/entry-edge-recipe.js +1 -1
- package/dist/tools/handlers/file-export.js +1 -1
- package/dist/tools/handlers/local.js +1 -1
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/pending-settlement-recipe.js +1 -0
- package/dist/tools/handlers/plan-recovery.js +1 -0
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/repository-row-id.js +1 -0
- package/dist/tools/handlers/review-chain.js +1 -1
- package/dist/tools/handlers/settle-sweep.js +1 -0
- package/dist/tools/handlers/stale-build-check.js +1 -1
- package/dist/tools/handlers/submission-assembly.js +1 -1
- package/dist/tools/handlers/verify-guard-dry-run.js +1 -0
- package/dist/tools/handlers/wip-upload.js +1 -1
- package/dist/tools/index.d.ts +3 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/move-fn-index.gen.js +1 -1
- package/dist/tools/publish-gate-state.js +1 -1
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/onchain.js +1 -1
- package/dist/tools/shared.js +1 -1
- package/dist/tools/types.d.ts +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +11 -4
- package/dist/chain-semantics/composition-truth.d.ts +0 -102
- package/dist/chain-semantics/eval-order.d.ts +0 -17
- package/dist/chain-semantics/field-capability.d.ts +0 -11
- package/dist/chain-semantics/freeze-map.d.ts +0 -11
- package/dist/chain-semantics/fund-flow.d.ts +0 -10
- package/dist/chain-semantics/guard-verbs.d.ts +0 -22
- package/dist/chain-semantics/index.d.ts +0 -12
- package/dist/chain-semantics/object-graph.d.ts +0 -18
- package/dist/communication/evidence.d.ts +0 -6
- package/dist/communication/message-cursors.d.ts +0 -35
- package/dist/communication/proof-reuse.d.ts +0 -9
- package/dist/communication/wts-attestation.d.ts +0 -39
- package/dist/composition/audit.d.ts +0 -15
- package/dist/composition/blueprint-view.d.ts +0 -63
- package/dist/composition/compile.d.ts +0 -83
- package/dist/composition/emit-phases.d.ts +0 -234
- package/dist/composition/generate.d.ts +0 -40
- package/dist/composition/guard-fill.d.ts +0 -52
- package/dist/composition/inflight.d.ts +0 -86
- package/dist/composition/input-normalize.d.ts +0 -15
- package/dist/composition/materialize.d.ts +0 -78
- package/dist/composition/mode-gates.d.ts +0 -35
- package/dist/composition/param-disclosure.d.ts +0 -61
- package/dist/composition/plan-retry-ledger.d.ts +0 -37
- package/dist/composition/plan.d.ts +0 -121
- package/dist/composition/product-card.d.ts +0 -94
- package/dist/composition/reflux.d.ts +0 -28
- package/dist/composition/supply-chain-emit.d.ts +0 -46
- package/dist/config/config-audit.spec.d.ts +0 -1
- package/dist/config/config-audit.spec.js +0 -1
- package/dist/config/config-warnings.d.ts +0 -2
- package/dist/config/index.d.ts +0 -4
- package/dist/config/judgment.spec.d.ts +0 -1
- package/dist/config/judgment.spec.js +0 -1
- package/dist/config/match-policy-file.d.ts +0 -34
- package/dist/config/match-policy-file.spec.d.ts +0 -1
- package/dist/config/match-policy-file.spec.js +0 -1
- package/dist/config/rule-engine.spec.d.ts +0 -1
- package/dist/config/rule-engine.spec.js +0 -1
- package/dist/config/runtime.d.ts +0 -29
- package/dist/config/store-policy.d.ts +0 -14
- package/dist/config/store-policy.spec.d.ts +0 -1
- package/dist/config/store-policy.spec.js +0 -1
- package/dist/config/template-params.d.ts +0 -42
- package/dist/config/template-params.spec.d.ts +0 -1
- package/dist/config/template-params.spec.js +0 -1
- package/dist/customer/account-events.d.ts +0 -32
- package/dist/data/api/api.spec.d.ts +0 -1
- package/dist/data/api/api.spec.js +0 -1
- package/dist/data/api/cli.d.ts +0 -1
- package/dist/data/api/head.d.ts +0 -16
- package/dist/data/api/head.spec.d.ts +0 -1
- package/dist/data/api/head.spec.js +0 -1
- package/dist/data/api/index.d.ts +0 -2
- package/dist/data/api/match.d.ts +0 -69
- package/dist/data/api/match.spec.d.ts +0 -1
- package/dist/data/api/match.spec.js +0 -1
- package/dist/data/api/server.d.ts +0 -13
- package/dist/data/projection/cli.d.ts +0 -1
- package/dist/data/projection/edges.d.ts +0 -8
- package/dist/data/projection/edges.spec.d.ts +0 -1
- package/dist/data/projection/edges.spec.js +0 -1
- package/dist/data/projection/facets.d.ts +0 -18
- package/dist/data/projection/facets.spec.d.ts +0 -1
- package/dist/data/projection/facets.spec.js +0 -1
- package/dist/data/projection/facts.d.ts +0 -40
- package/dist/data/projection/index.d.ts +0 -6
- package/dist/data/projection/project.d.ts +0 -10
- package/dist/data/projection/projection.spec.d.ts +0 -1
- package/dist/data/projection/projection.spec.js +0 -1
- package/dist/data/projection/schema.d.ts +0 -1
- package/dist/data/projection/store.d.ts +0 -51
- package/dist/data/projection/types.d.ts +0 -169
- package/dist/data/sync/cdc.d.ts +0 -33
- package/dist/data/sync/cdc.spec.d.ts +0 -1
- package/dist/data/sync/cdc.spec.js +0 -1
- package/dist/data/sync/graphql-source.d.ts +0 -16
- package/dist/data/sync/index.d.ts +0 -5
- package/dist/data/sync/reconciler.d.ts +0 -14
- package/dist/data/sync/reconciler.spec.d.ts +0 -1
- package/dist/data/sync/reconciler.spec.js +0 -1
- package/dist/data/sync/schema.d.ts +0 -1
- package/dist/data/sync/store.d.ts +0 -24
- package/dist/data/sync/sync.spec.d.ts +0 -1
- package/dist/data/sync/sync.spec.js +0 -1
- package/dist/data/sync/synchronizer.d.ts +0 -10
- package/dist/data/sync/types.d.ts +0 -164
- package/dist/evaluation/acceptance.d.ts +0 -33
- package/dist/evaluation/architecture.spec.d.ts +0 -1
- package/dist/evaluation/architecture.spec.js +0 -1
- package/dist/evaluation/builtins/arbitration-score.d.ts +0 -42
- package/dist/evaluation/builtins/demand-match.d.ts +0 -16
- package/dist/evaluation/builtins/graph-service.spec.d.ts +0 -1
- package/dist/evaluation/builtins/graph-service.spec.js +0 -1
- package/dist/evaluation/builtins/index.d.ts +0 -4
- package/dist/evaluation/builtins/purity.spec.d.ts +0 -1
- package/dist/evaluation/builtins/purity.spec.js +0 -1
- package/dist/evaluation/composer.d.ts +0 -38
- package/dist/evaluation/facets/catalog.d.ts +0 -19
- package/dist/evaluation/gap.d.ts +0 -2
- package/dist/evaluation/guard-scan.d.ts +0 -10
- package/dist/evaluation/index.d.ts +0 -14
- package/dist/evaluation/injection.d.ts +0 -6
- package/dist/evaluation/location-match.d.ts +0 -42
- package/dist/evaluation/match-operation.d.ts +0 -23
- package/dist/evaluation/match-policy-resolver.d.ts +0 -9
- package/dist/evaluation/match-policy.spec.d.ts +0 -1
- package/dist/evaluation/match-policy.spec.js +0 -1
- package/dist/evaluation/path-reasoning.d.ts +0 -37
- package/dist/evaluation/standards.d.ts +0 -11
- package/dist/evaluation/standards.spec.d.ts +0 -1
- package/dist/evaluation/standards.spec.js +0 -1
- package/dist/evaluation/structured-lines.d.ts +0 -8
- package/dist/evaluation/user-injection.d.ts +0 -6
- package/dist/experience/experience-reuse.d.ts +0 -10
- package/dist/experience/index.d.ts +0 -7
- package/dist/experience/persistence-config.d.ts +0 -6
- package/dist/experience/persistence.d.ts +0 -21
- package/dist/experience/realtime-feedback.d.ts +0 -5
- package/dist/experience/user-profile.d.ts +0 -25
- package/dist/extensions/capability.d.ts +0 -91
- package/dist/extensions/industry-audit.spec.d.ts +0 -1
- package/dist/extensions/industry-audit.spec.js +0 -1
- package/dist/goal/GoalClassifier.d.ts +0 -17
- package/dist/goal/GoalEngine.d.ts +0 -175
- package/dist/goal/GoalStore.d.ts +0 -27
- package/dist/goal/next-steps.d.ts +0 -12
- package/dist/goal/plan-approval.d.ts +0 -5
- package/dist/goal/pursue.d.ts +0 -18
- package/dist/graph/base.d.ts +0 -8
- package/dist/graph/onchain/analyze.d.ts +0 -59
- package/dist/graph/onchain/analyze.spec.d.ts +0 -1
- package/dist/graph/onchain/analyze.spec.js +0 -1
- package/dist/graph/onchain/anti-cheat.d.ts +0 -69
- package/dist/graph/onchain/anti-cheat.spec.d.ts +0 -1
- package/dist/graph/onchain/anti-cheat.spec.js +0 -1
- package/dist/graph/onchain/dataplane.d.ts +0 -44
- package/dist/graph/onchain/edge-batch.spec.d.ts +0 -1
- package/dist/graph/onchain/edge-batch.spec.js +0 -1
- package/dist/graph/onchain/edge-schema.d.ts +0 -69
- package/dist/graph/onchain/entity-profile.spec.d.ts +0 -1
- package/dist/graph/onchain/entity-profile.spec.js +0 -1
- package/dist/graph/onchain/event-history.spec.d.ts +0 -1
- package/dist/graph/onchain/event-history.spec.js +0 -1
- package/dist/graph/onchain/expand.d.ts +0 -4
- package/dist/graph/onchain/exploration.d.ts +0 -28
- package/dist/graph/onchain/exploration.spec.d.ts +0 -1
- package/dist/graph/onchain/exploration.spec.js +0 -1
- package/dist/graph/onchain/exposure.d.ts +0 -18
- package/dist/graph/onchain/exposure.spec.d.ts +0 -1
- package/dist/graph/onchain/exposure.spec.js +0 -1
- package/dist/graph/onchain/extract-deep.spec.d.ts +0 -1
- package/dist/graph/onchain/extract-deep.spec.js +0 -1
- package/dist/graph/onchain/extract.d.ts +0 -29
- package/dist/graph/onchain/facet-projection.d.ts +0 -99
- package/dist/graph/onchain/facet-projection.spec.d.ts +0 -1
- package/dist/graph/onchain/facet-projection.spec.js +0 -1
- package/dist/graph/onchain/facts.spec.d.ts +0 -1
- package/dist/graph/onchain/facts.spec.js +0 -1
- package/dist/graph/onchain/field-manifest.d.ts +0 -29
- package/dist/graph/onchain/field-manifest.spec.d.ts +0 -1
- package/dist/graph/onchain/field-manifest.spec.js +0 -1
- package/dist/graph/onchain/fixtures.d.ts +0 -80
- package/dist/graph/onchain/fixtures.spec.d.ts +0 -1
- package/dist/graph/onchain/fixtures.spec.js +0 -1
- package/dist/graph/onchain/graph-policy.spec.d.ts +0 -1
- package/dist/graph/onchain/graph-policy.spec.js +0 -1
- package/dist/graph/onchain/index.d.ts +0 -29
- package/dist/graph/onchain/interest.d.ts +0 -10
- package/dist/graph/onchain/interest.spec.d.ts +0 -1
- package/dist/graph/onchain/interest.spec.js +0 -1
- package/dist/graph/onchain/label-lint.spec.d.ts +0 -1
- package/dist/graph/onchain/label-lint.spec.js +0 -1
- package/dist/graph/onchain/names.d.ts +0 -23
- package/dist/graph/onchain/names.spec.d.ts +0 -1
- package/dist/graph/onchain/names.spec.js +0 -1
- package/dist/graph/onchain/object-held-receipts.d.ts +0 -20
- package/dist/graph/onchain/object-held-receipts.spec.d.ts +0 -1
- package/dist/graph/onchain/object-held-receipts.spec.js +0 -1
- package/dist/graph/onchain/onchain.spec.d.ts +0 -1
- package/dist/graph/onchain/onchain.spec.js +0 -1
- package/dist/graph/onchain/policy.d.ts +0 -8
- package/dist/graph/onchain/project-relationship.d.ts +0 -3
- package/dist/graph/onchain/proposal-graph.d.ts +0 -11
- package/dist/graph/onchain/proposal-graph.spec.d.ts +0 -1
- package/dist/graph/onchain/proposal-graph.spec.js +0 -1
- package/dist/graph/onchain/sdk-batch.d.ts +0 -129
- package/dist/graph/onchain/sdk-dataplane.d.ts +0 -44
- package/dist/graph/onchain/strategy.spec.d.ts +0 -1
- package/dist/graph/onchain/strategy.spec.js +0 -1
- package/dist/graph/onchain/synthesis.d.ts +0 -20
- package/dist/graph/onchain/synthesis.spec.d.ts +0 -1
- package/dist/graph/onchain/synthesis.spec.js +0 -1
- package/dist/graph/onchain/table-ledger.spec.d.ts +0 -1
- package/dist/graph/onchain/table-ledger.spec.js +0 -1
- package/dist/graph/onchain/viewport.d.ts +0 -6
- package/dist/harness/auto-escalation.d.ts +0 -15
- package/dist/intent/enrich.d.ts +0 -1
- package/dist/intent/index.d.ts +0 -23
- package/dist/intent/matcher.d.ts +0 -2
- package/dist/intent/store.d.ts +0 -19
- package/dist/intent/types.d.ts +0 -32
- package/dist/keeper/KeeperScan.d.ts +0 -41
- package/dist/keeper/KeeperStore.d.ts +0 -43
- package/dist/keeper/detectors.d.ts +0 -42
- package/dist/keeper/keeper.spec.d.ts +0 -1
- package/dist/keeper/keeper.spec.js +0 -1
- package/dist/keeper/types.d.ts +0 -67
- package/dist/knowledge/account-marks.d.ts +0 -36
- package/dist/knowledge/allocation-ledger.d.ts +0 -75
- package/dist/knowledge/allocation-puzzle.d.ts +0 -138
- package/dist/knowledge/allocation-risk.d.ts +0 -82
- package/dist/knowledge/allocation-templates.d.ts +0 -38
- package/dist/knowledge/allocator-rail-verifier.d.ts +0 -59
- package/dist/knowledge/anti-cheat.d.ts +0 -2
- package/dist/knowledge/arb-fund-facts.d.ts +0 -51
- package/dist/knowledge/arb-risk.d.ts +0 -39
- package/dist/knowledge/arbitration-puzzle.d.ts +0 -84
- package/dist/knowledge/arbitration-rail-verifier.d.ts +0 -35
- package/dist/knowledge/arbitration-risk.d.ts +0 -114
- package/dist/knowledge/arbitration-templates.d.ts +0 -39
- package/dist/knowledge/arbitration-venue-order.d.ts +0 -25
- package/dist/knowledge/baselines/guard-lint-baseline.spec.d.ts +0 -1
- package/dist/knowledge/baselines/guard-lint-baseline.spec.js +0 -1
- package/dist/knowledge/baselines/risk-baselines.spec.d.ts +0 -1
- package/dist/knowledge/baselines/risk-baselines.spec.js +0 -1
- package/dist/knowledge/baselines/risk-cases.d.ts +0 -8
- package/dist/knowledge/baselines/semantic-facts.d.ts +0 -12
- package/dist/knowledge/bridge-risk.d.ts +0 -36
- package/dist/knowledge/catalog-facts.d.ts +0 -4
- package/dist/knowledge/chain-query-registry.d.ts +0 -14
- package/dist/knowledge/commission-landing.d.ts +0 -26
- package/dist/knowledge/component-schema.d.ts +0 -64
- package/dist/knowledge/contact-risk.d.ts +0 -32
- package/dist/knowledge/contact-templates.d.ts +0 -26
- package/dist/knowledge/contract-invariants.d.ts +0 -54
- package/dist/knowledge/demand-risk.d.ts +0 -30
- package/dist/knowledge/discount-threshold.d.ts +0 -26
- package/dist/knowledge/dynamic-pricing.d.ts +0 -29
- package/dist/knowledge/entity-recipient-guard.d.ts +0 -21
- package/dist/knowledge/event-semantics.d.ts +0 -23
- package/dist/knowledge/evidence-review.d.ts +0 -35
- package/dist/knowledge/fee-param-bindings.d.ts +0 -28
- package/dist/knowledge/flywheel-loop.d.ts +0 -41
- package/dist/knowledge/game-scenarios.d.ts +0 -21
- package/dist/knowledge/getting-started.d.ts +0 -37
- package/dist/knowledge/goal-completion.d.ts +0 -31
- package/dist/knowledge/guard-anchor-reach.d.ts +0 -19
- package/dist/knowledge/guard-binding-table.d.ts +0 -52
- package/dist/knowledge/guard-binding-verifier.d.ts +0 -37
- package/dist/knowledge/guard-bindings.d.ts +0 -21
- package/dist/knowledge/guard-blueprint.d.ts +0 -68
- package/dist/knowledge/guard-design-patterns.d.ts +0 -38
- package/dist/knowledge/guard-eval.d.ts +0 -15
- package/dist/knowledge/guard-field-cognition.d.ts +0 -48
- package/dist/knowledge/guard-host-context.d.ts +0 -24
- package/dist/knowledge/guard-ledger.d.ts +0 -19
- package/dist/knowledge/guard-leg-map.d.ts +0 -5
- package/dist/knowledge/guard-lint.d.ts +0 -79
- package/dist/knowledge/guard-node-gates.d.ts +0 -9
- package/dist/knowledge/guard-puzzle.d.ts +0 -188
- package/dist/knowledge/guard-render.d.ts +0 -71
- package/dist/knowledge/guard-risk.d.ts +0 -71
- package/dist/knowledge/guard-submission-brief.d.ts +0 -94
- package/dist/knowledge/guard-submission-prompt.d.ts +0 -63
- package/dist/knowledge/guard-translation.d.ts +0 -58
- package/dist/knowledge/index.d.ts +0 -299
- package/dist/knowledge/industry-evolution.d.ts +0 -82
- package/dist/knowledge/industry-generalizer.d.ts +0 -63
- package/dist/knowledge/industry-rule-node.d.ts +0 -7
- package/dist/knowledge/industry-strategy.d.ts +0 -91
- package/dist/knowledge/intent-metrics.d.ts +0 -43
- package/dist/knowledge/jsonrpc-enum.d.ts +0 -102
- package/dist/knowledge/knob-docs.d.ts +0 -5
- package/dist/knowledge/machine-fork-watch.d.ts +0 -9
- package/dist/knowledge/machine-ledger.d.ts +0 -42
- package/dist/knowledge/machine-puzzle.d.ts +0 -206
- package/dist/knowledge/machine-risk.d.ts +0 -72
- package/dist/knowledge/machine-templates.d.ts +0 -92
- package/dist/knowledge/machine-topology.d.ts +0 -116
- package/dist/knowledge/machine-translation.d.ts +0 -96
- package/dist/knowledge/market-metrics.d.ts +0 -34
- package/dist/knowledge/market-operations.d.ts +0 -46
- package/dist/knowledge/migration-preflight.d.ts +0 -27
- package/dist/knowledge/object-dependency.d.ts +0 -31
- package/dist/knowledge/operation-dictionary.d.ts +0 -18
- package/dist/knowledge/order-ledger.d.ts +0 -69
- package/dist/knowledge/order-puzzle.d.ts +0 -162
- package/dist/knowledge/order-risk.d.ts +0 -62
- package/dist/knowledge/order-templates.d.ts +0 -50
- package/dist/knowledge/param-schema.d.ts +0 -93
- package/dist/knowledge/param-tiers.d.ts +0 -27
- package/dist/knowledge/passport-ledger.d.ts +0 -60
- package/dist/knowledge/passport-templates.d.ts +0 -40
- package/dist/knowledge/path-oracle/coverage.d.ts +0 -16
- package/dist/knowledge/path-oracle/index.d.ts +0 -5
- package/dist/knowledge/path-oracle/products/food-delivery.d.ts +0 -2
- package/dist/knowledge/path-oracle/schema.d.ts +0 -188
- package/dist/knowledge/pattern-resolutions.d.ts +0 -110
- package/dist/knowledge/payment-risk.d.ts +0 -38
- package/dist/knowledge/payment-tracker.d.ts +0 -63
- package/dist/knowledge/permission-ledger.d.ts +0 -49
- package/dist/knowledge/permission-puzzle.d.ts +0 -122
- package/dist/knowledge/permission-risk.d.ts +0 -70
- package/dist/knowledge/permission-templates.d.ts +0 -38
- package/dist/knowledge/personal-risk.d.ts +0 -36
- package/dist/knowledge/product-detail-source.d.ts +0 -37
- package/dist/knowledge/product-doc-b5.d.ts +0 -16
- package/dist/knowledge/progress-ledger.d.ts +0 -63
- package/dist/knowledge/progress-puzzle.d.ts +0 -82
- package/dist/knowledge/progress-risk.d.ts +0 -75
- package/dist/knowledge/progress-templates.d.ts +0 -38
- package/dist/knowledge/projection.d.ts +0 -54
- package/dist/knowledge/projection.spec.d.ts +0 -1
- package/dist/knowledge/projection.spec.js +0 -1
- package/dist/knowledge/proof-risk.d.ts +0 -33
- package/dist/knowledge/protocol-facts.d.ts +0 -17
- package/dist/knowledge/publish-gate.d.ts +0 -20
- package/dist/knowledge/publish-readiness.d.ts +0 -25
- package/dist/knowledge/publish-surface-contract.d.ts +0 -16
- package/dist/knowledge/puzzle-projections.d.ts +0 -11
- package/dist/knowledge/rail-exit-satisfiability.d.ts +0 -25
- package/dist/knowledge/registrar-risk.d.ts +0 -34
- package/dist/knowledge/release-sentinel.d.ts +0 -12
- package/dist/knowledge/repository-risk.d.ts +0 -46
- package/dist/knowledge/repository-write-semantics.d.ts +0 -27
- package/dist/knowledge/reputation-rules.d.ts +0 -36
- package/dist/knowledge/requirement-families.d.ts +0 -13
- package/dist/knowledge/resource-risk.d.ts +0 -32
- package/dist/knowledge/reward-ledger.d.ts +0 -97
- package/dist/knowledge/reward-puzzle.d.ts +0 -98
- package/dist/knowledge/reward-risk.d.ts +0 -86
- package/dist/knowledge/reward-templates.d.ts +0 -25
- package/dist/knowledge/rule-node-analyzers.d.ts +0 -49
- package/dist/knowledge/rule-outcome.d.ts +0 -5
- package/dist/knowledge/scenario-topology.d.ts +0 -48
- package/dist/knowledge/semantic-ir.d.ts +0 -136
- package/dist/knowledge/service-allocation-semantics.d.ts +0 -36
- package/dist/knowledge/service-allocator-audit-node.d.ts +0 -3
- package/dist/knowledge/service-ledger.d.ts +0 -87
- package/dist/knowledge/service-puzzle.d.ts +0 -158
- package/dist/knowledge/service-risk-node.d.ts +0 -3
- package/dist/knowledge/service-risk.d.ts +0 -110
- package/dist/knowledge/service-templates.d.ts +0 -41
- package/dist/knowledge/settlement-semantics.d.ts +0 -1
- package/dist/knowledge/strategy-manuals.d.ts +0 -15
- package/dist/knowledge/supply-chain.d.ts +0 -35
- package/dist/knowledge/template-index.d.ts +0 -19
- package/dist/knowledge/template-loader.d.ts +0 -425
- package/dist/knowledge/template-nav.d.ts +0 -9
- package/dist/knowledge/template-prose.d.ts +0 -50
- package/dist/knowledge/template-registry.d.ts +0 -48
- package/dist/knowledge/template-scanner.d.ts +0 -158
- package/dist/knowledge/template-test-profiles.d.ts +0 -17
- package/dist/knowledge/template-validation.d.ts +0 -3
- package/dist/knowledge/tools-reference.d.ts +0 -17
- package/dist/knowledge/treasury-ledger.d.ts +0 -42
- package/dist/knowledge/treasury-puzzle.d.ts +0 -163
- package/dist/knowledge/treasury-risk.d.ts +0 -88
- package/dist/knowledge/treasury-templates.d.ts +0 -38
- package/dist/knowledge/universal-template.d.ts +0 -22
- package/dist/knowledge/util-risk.d.ts +0 -30
- package/dist/knowledge/workflow-guidance.d.ts +0 -194
- package/dist/knowledge/workspace-lists.d.ts +0 -61
- package/dist/monitor/SuggestionBridge.spec.d.ts +0 -1
- package/dist/monitor/SuggestionBridge.spec.js +0 -1
- package/dist/participation/arbitrator-interest.d.ts +0 -22
- package/dist/participation/demander-interest.d.ts +0 -23
- package/dist/participation/employee-kpi.d.ts +0 -37
- package/dist/participation/employee-kpi.spec.d.ts +0 -1
- package/dist/participation/employee-kpi.spec.js +0 -1
- package/dist/participation/employee-store.d.ts +0 -16
- package/dist/participation/game-context.d.ts +0 -25
- package/dist/participation/index.d.ts +0 -2
- package/dist/participation/node-action-advisor.d.ts +0 -68
- package/dist/participation/time-window.d.ts +0 -48
- package/dist/persona/facet-profile.d.ts +0 -33
- package/dist/persona/persona-audit.spec.d.ts +0 -1
- package/dist/persona/persona-audit.spec.js +0 -1
- package/dist/playbooks/service-build/business-puzzle.d.ts +0 -48
- package/dist/playbooks/service-build/context-assembly.d.ts +0 -32
- package/dist/playbooks/service-build/facet-money.d.ts +0 -33
- package/dist/playbooks/service-build/facet-money.spec.d.ts +0 -1
- package/dist/playbooks/service-build/facet-money.spec.js +0 -1
- package/dist/playbooks/service-build/game-theory.d.ts +0 -47
- package/dist/playbooks/service-build/index.d.ts +0 -15
- package/dist/playbooks/service-build/intent-analyzer.d.ts +0 -72
- package/dist/playbooks/service-build/machine-nodes.d.ts +0 -27
- package/dist/playbooks/service-build/machine-panorama.d.ts +0 -71
- package/dist/playbooks/service-build/merchant-guide.d.ts +0 -382
- package/dist/playbooks/service-build/migration-planner.d.ts +0 -61
- package/dist/playbooks/service-build/mode-actions.d.ts +0 -260
- package/dist/playbooks/service-build/object-panorama.d.ts +0 -317
- package/dist/playbooks/service-build/object-type.d.ts +0 -1
- package/dist/playbooks/service-build/participation-radar.d.ts +0 -20
- package/dist/playbooks/service-build/pipeline-actions.d.ts +0 -108
- package/dist/playbooks/service-build/process.d.ts +0 -6
- package/dist/playbooks/service-build/relationship-profile.d.ts +0 -3
- package/dist/playbooks/service-build/reverse-mapping-nk4.spec.d.ts +0 -1
- package/dist/playbooks/service-build/reverse-mapping-nk4.spec.js +0 -1
- package/dist/playbooks/service-build/reverse-mapping-refund-p0-5.spec.d.ts +0 -1
- package/dist/playbooks/service-build/reverse-mapping-refund-p0-5.spec.js +0 -1
- package/dist/playbooks/service-build/reverse-mapping.d.ts +0 -66
- package/dist/playbooks/service-build/risk-aggregator.d.ts +0 -59
- package/dist/playbooks/service-build/service-panorama.d.ts +0 -229
- package/dist/playbooks/service-build/service-quote.d.ts +0 -2
- package/dist/playbooks/service-build/service-quote.spec.d.ts +0 -1
- package/dist/playbooks/service-build/service-quote.spec.js +0 -1
- package/dist/playbooks/service-build/topology-evaluation.spec.d.ts +0 -1
- package/dist/playbooks/service-build/topology-evaluation.spec.js +0 -1
- package/dist/playbooks/service-build/topology-query.d.ts +0 -25
- package/dist/playbooks/service-build/workflow-design-assessment.d.ts +0 -33
- package/dist/relationship/derivation.d.ts +0 -95
- package/dist/relationship/derivation.spec.d.ts +0 -1
- package/dist/relationship/derivation.spec.js +0 -1
- package/dist/relationship/incentive.d.ts +0 -38
- package/dist/relationship/index.d.ts +0 -4
- package/dist/relationship/registry.d.ts +0 -13
- package/dist/relationship/types.d.ts +0 -45
- package/dist/review/arb.d.ts +0 -4
- package/dist/review/demand.d.ts +0 -3
- package/dist/review/index.d.ts +0 -3
- package/dist/review/machine.d.ts +0 -3
- package/dist/review/order.d.ts +0 -8
- package/dist/review/progress.d.ts +0 -3
- package/dist/review/repository.d.ts +0 -3
- package/dist/review/service.d.ts +0 -5
- package/dist/review/types.d.ts +0 -163
- package/dist/role/derivation.d.ts +0 -35
- package/dist/role/index.d.ts +0 -6
- package/dist/role/intent.d.ts +0 -23
- package/dist/role/model.d.ts +0 -9
- package/dist/role/profiles.d.ts +0 -26
- package/dist/role/resolution.d.ts +0 -27
- package/dist/runtime/instance-registry.d.ts +0 -14
- package/dist/safety/index.d.ts +0 -3
- package/dist/schema/call/permission-handler.d.ts +0 -5
- package/dist/schema/call/semantic-customer-advice.spec.d.ts +0 -1
- package/dist/schema/call/semantic-customer-advice.spec.js +0 -1
- package/dist/schema/common/tokentype-short-probe.spec.d.ts +0 -1
- package/dist/schema/common/tokentype-short-probe.spec.js +0 -1
- package/dist/schema/envelope-unify.d.ts +0 -5
- package/dist/schema/goal/planning.d.ts +0 -742
- package/dist/schema/industry-pack/modes.d.ts +0 -447
- package/dist/schema/query/bi.d.ts +0 -3369
- package/dist/schema/utils/guard-query-utils.d.ts +0 -18
- package/dist/schema/utils/permission-index-utils.d.ts +0 -2
- package/dist/schema/utils/skills-recommendation.d.ts +0 -2
- package/dist/schema-query-impl/index.d.ts +0 -83
- package/dist/schemas/account_operation.output.json +0 -3869
- package/dist/schemas/ask_user.output.json +0 -54
- package/dist/schemas/benchmark_migration_operation.output.json +0 -1669
- package/dist/schemas/bridge_operation.output.json +0 -1548
- package/dist/schemas/config_operation.output.json +0 -896
- package/dist/schemas/employee_operation.output.json +0 -307
- package/dist/schemas/evaluation_operation.output.json +0 -4716
- package/dist/schemas/guard2file.output.json +0 -83
- package/dist/schemas/industry_pack_operation.output.json +0 -2985
- package/dist/schemas/intent_radar.output.json +0 -326
- package/dist/schemas/keeper_operation.output.json +0 -1441
- package/dist/schemas/local_cache_operation.output.json +0 -1718
- package/dist/schemas/local_history_operation.output.json +0 -1644
- package/dist/schemas/local_info_operation.output.json +0 -1530
- package/dist/schemas/local_mark_operation.output.json +0 -1622
- package/dist/schemas/machineNode2file.output.json +0 -88
- package/dist/schemas/messenger_operation.output.json +0 -4692
- package/dist/schemas/monitor_events.output.json +0 -1602
- package/dist/schemas/monitor_subscription.output.json +0 -1629
- package/dist/schemas/onchain_events.output.json +0 -4053
- package/dist/schemas/onchain_operations.output.json +0 -7788
- package/dist/schemas/onchain_table_data.output.json +0 -11868
- package/dist/schemas/permission_operation.output.json +0 -205
- package/dist/schemas/persona_operation.output.json +0 -64612
- package/dist/schemas/query_toolkit.output.json +0 -28302
- package/dist/schemas/schema_query.output.json +0 -81
- package/dist/schemas/service_clone_operation.output.json +0 -247
- package/dist/schemas/strategy_review_operation.output.json +0 -532
- package/dist/schemas/watch_operation.output.json +0 -930
- package/dist/schemas/wip_file.output.json +0 -360
- package/dist/schemas/workflow_operation.output.json +0 -422
- package/dist/schemas/workspace_operation.output.json +0 -477
- package/dist/schemas/wowok_buildin_info.output.json +0 -2477
- package/dist/strategy/collectors.d.ts +0 -66
- package/dist/strategy/collectors.spec.d.ts +0 -1
- package/dist/strategy/collectors.spec.js +0 -1
- package/dist/strategy/index.d.ts +0 -5
- package/dist/strategy/metrics.d.ts +0 -20
- package/dist/strategy/review.d.ts +0 -48
- package/dist/strategy/scorecard.d.ts +0 -32
- package/dist/strategy/store.d.ts +0 -26
- package/dist/task/ProcessStore.d.ts +0 -98
- package/dist/task/playbook.d.ts +0 -11
- package/dist/task/substep-trace.d.ts +0 -91
- package/dist/tools/build-fingerprint.d.ts +0 -28
- package/dist/tools/error-catalog.d.ts +0 -17
- package/dist/tools/handlers/ask-user.d.ts +0 -3
- package/dist/tools/handlers/benchmark-migration.d.ts +0 -121
- package/dist/tools/handlers/bridge.d.ts +0 -8
- package/dist/tools/handlers/config.d.ts +0 -2
- package/dist/tools/handlers/dispatch-expectations.d.ts +0 -2
- package/dist/tools/handlers/dispatch-expectations.spec.d.ts +0 -1
- package/dist/tools/handlers/dispatch-expectations.spec.js +0 -1
- package/dist/tools/handlers/employee.d.ts +0 -8
- package/dist/tools/handlers/employee.spec.d.ts +0 -1
- package/dist/tools/handlers/employee.spec.js +0 -1
- package/dist/tools/handlers/entry-edge-recipe.d.ts +0 -101
- package/dist/tools/handlers/escrow-deficit.d.ts +0 -10
- package/dist/tools/handlers/evaluation.d.ts +0 -2
- package/dist/tools/handlers/evaluation.spec.d.ts +0 -1
- package/dist/tools/handlers/evaluation.spec.js +0 -1
- package/dist/tools/handlers/file-export.d.ts +0 -3
- package/dist/tools/handlers/fund-rail-recipe.d.ts +0 -10
- package/dist/tools/handlers/goal.d.ts +0 -4
- package/dist/tools/handlers/industry-pack.d.ts +0 -3
- package/dist/tools/handlers/intent-radar.d.ts +0 -2
- package/dist/tools/handlers/keeper.d.ts +0 -12
- package/dist/tools/handlers/local.d.ts +0 -6
- package/dist/tools/handlers/mark-namespace.d.ts +0 -30
- package/dist/tools/handlers/messenger.d.ts +0 -24
- package/dist/tools/handlers/monitor.d.ts +0 -26
- package/dist/tools/handlers/name-resolution.d.ts +0 -4
- package/dist/tools/handlers/name-resolution.spec.d.ts +0 -1
- package/dist/tools/handlers/name-resolution.spec.js +0 -1
- package/dist/tools/handlers/network.d.ts +0 -1
- package/dist/tools/handlers/onchain-name-registration.d.ts +0 -49
- package/dist/tools/handlers/onchain-name-registration.spec.d.ts +0 -1
- package/dist/tools/handlers/onchain-name-registration.spec.js +0 -1
- package/dist/tools/handlers/onchain.d.ts +0 -132
- package/dist/tools/handlers/permission.d.ts +0 -2
- package/dist/tools/handlers/persona.d.ts +0 -4
- package/dist/tools/handlers/publish-binding-echo.d.ts +0 -22
- package/dist/tools/handlers/review-chain.d.ts +0 -19
- package/dist/tools/handlers/schema-query.d.ts +0 -2
- package/dist/tools/handlers/service-clone.d.ts +0 -20
- package/dist/tools/handlers/stale-build-check.d.ts +0 -9
- package/dist/tools/handlers/strategy-review.d.ts +0 -2
- package/dist/tools/handlers/submission-assembly.d.ts +0 -55
- package/dist/tools/handlers/watch.d.ts +0 -2
- package/dist/tools/handlers/winner-derivation.d.ts +0 -20
- package/dist/tools/handlers/wip-upload.d.ts +0 -22
- package/dist/tools/handlers/wip.d.ts +0 -2
- package/dist/tools/handlers/workflow.d.ts +0 -2
- package/dist/tools/handlers/workspace.d.ts +0 -4
- package/dist/tools/move-fn-index.gen.d.ts +0 -3
- package/dist/tools/publish-gate-state.d.ts +0 -5
- package/dist/tools/registry/agent.d.ts +0 -2
- package/dist/tools/registry/bridge.d.ts +0 -2
- package/dist/tools/registry/business.d.ts +0 -2
- package/dist/tools/registry/config.d.ts +0 -2
- package/dist/tools/registry/evaluation.d.ts +0 -2
- package/dist/tools/registry/files.d.ts +0 -2
- package/dist/tools/registry/identity.d.ts +0 -2
- package/dist/tools/registry/interaction.d.ts +0 -2
- package/dist/tools/registry/local.d.ts +0 -2
- package/dist/tools/registry/messenger.d.ts +0 -2
- package/dist/tools/registry/monitor.d.ts +0 -2
- package/dist/tools/registry/onchain.d.ts +0 -2
- package/dist/tools/registry/query.d.ts +0 -2
- package/dist/tools/retry.d.ts +0 -8
- package/dist/tools/rules-hook.d.ts +0 -5
- package/dist/tools/runtime-health.d.ts +0 -10
- package/dist/tools/sanitize-description-roundtrip.spec.d.ts +0 -1
- package/dist/tools/sanitize-description-roundtrip.spec.js +0 -1
- package/dist/tools/sanitize-output.d.ts +0 -4
- package/dist/tools/sanitize-output.spec.d.ts +0 -1
- package/dist/tools/sanitize-output.spec.js +0 -1
- package/dist/tools/shared.d.ts +0 -20
- package/dist/tools/transport-integrity.d.ts +0 -7
- package/dist/tools/upgrade-check.d.ts +0 -75
- package/dist/tools/wip-deploy-assist.d.ts +0 -34
- package/dist/tools/wip-verify-ledger.d.ts +0 -16
- package/dist/tools/wrap.d.ts +0 -45
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PUBLISH_SURFACE_CONTRACT_VERSION='1.3.0';export const PUBLISH_SURFACE_CONTRACT=[{'id':'MC-TOPOLOGY-01','gate':'auditMachineNodes','faces':['machine_publish'],'enforcement':'always','defect_class':'R-M1-11\x20dispute\x20nodes\x20on-Machine\x20/\x20MC-C-04\x20missing\x20entry\x20pair\x20/\x20operator\x20sanity\x20on\x20effective\x20node\x20set\x20(inline\x20AND\x20by-reference)','origin':'R-M1-11,\x20MC-C-04;\x20F-001\x20effective-state\x20fix','wired_in':'wrap'},{'id':'MC-CLOSURE-01','gate':'closureFindings','faces':['machine_publish'],'enforcement':'always','defect_class':'publish\x20closure\x20findings\x20on\x20machine\x20graph\x20(unreachable/terminal\x20anomalies)','origin':'PG-CLOSURE-01\x20(gf32)','wired_in':'wrap'},{'id':'MC-TASKBIND-01','gate':'lintForwardGuardsTaskBinding','faces':['machine_publish'],'enforcement':'always','defect_class':'forward\x20guards\x20with\x20task-row\x20binding\x20gaps\x20—\x20unauthorized\x20dual-rail\x20advance','origin':'gfm31\x20P05\x20(1000/1002\x20unauthorized\x20dual-track,\x20chain-rejected\x20within\x20minutes)','wired_in':'wrap'},{'id':'MC-REVIEWLOCK-01','gate':'lintForwardReviewLocks','faces':['machine_publish'],'enforcement':'always','defect_class':'review-window\x20forward\x20locks\x20missing/mispinned','origin':'proactive\x20consolidation','wired_in':'wrap'},{'id':'MC-ARBRAIL-01','gate':'lintForwardArbRulingRails','faces':['machine_publish'],'enforcement':'always','defect_class':'an\x20arbitration\x20OUTCOME\x20that\x20cannot\x20move\x20the\x20order,\x20judged\x20on\x20the\x20frozen\x20graph\x20by\x20QUERY\x20SEMANTICS\x20(never\x20template_id\x20or\x20node\x20name):\x20ARB_RULING_PRESENCE_ONLY\x20/\x20ARB_RULING_STATUS_GATE\x20block;\x20ARB_RULING_VENUE_UNBOUND\x20/\x20ARB_RULING_ZERO_EXIT\x20warn;\x20ARB_RULING_ONE_SIDED\x20discloses','origin':'publish-face\x20twin\x20of\x20the\x20scan-only\x20R-DIR-01/02\x20+\x20R-ARB-ZERO-EXIT,\x20which\x20classify\x20by\x20template_id\x20and\x20semantic_role\x20—\x20neither\x20survives\x20to\x20the\x20chain,\x20so\x20a\x20hand-composed\x20store\x20never\x20saw\x20them\x20(the\x20same\x20gap\x20that\x20made\x20SV-RAILPAIR-01\x20unconditional).\x20Severity\x20per\x20measurement\x20over\x20v170:\x20presence-only\x20and\x20arb.status\x20are\x200/16\x20arbitration\x20archetypes\x20(blockable);\x20won-only\x20is\x208/16\x20and\x20the\x20only\x202\x20ruling-only\x20waypoints\x20are\x20declared-final\x20post-settlement\x20re-routers\x20whose\x20drained-escrow\x20exemption\x20is\x20NOT\x20statically\x20decidable\x20at\x20publish\x20(disclose/warn\x20only)','wired_in':'wrap'},{'id':'MC-TIMEPROFILE-01','gate':'lintForwardGuardsTimeProfile','faces':['machine_publish'],'enforcement':'always','defect_class':'forward\x20guard\x20time-profile\x20contradictions\x20(timeout\x20vs\x20window).\x20NAMED\x20DEGRADE\x20(N8\x20ktt6\x20F-14\x20re-carving\x202026-11-04):\x20env.window_profile=\x27test\x27\x20downgrades\x20the\x20numeric\x20violations\x20to\x20loud\x20disclosures\x20for\x20a\x20DISPOSABLE\x20trial\x20run\x20—\x20but\x20a\x20test-profile\x20publish\x20on\x20an\x20explicit\x20real\x20network\x20(testnet/mainnet)\x20is\x20BLOCKED\x20on\x20every\x20face\x20in\x20the\x20harness\x20pre-publish\x20hook','origin':'R7-01\x20family','wired_in':'wrap'},{'id':'MC-SVCCONST-01','gate':'lintForwardGuardServiceConstants','faces':['machine_publish'],'enforcement':'always','defect_class':'guard\x20pinned\x20to\x20wrong-shop\x20Service\x20constant\x20slot\x20—\x20order\x20strands\x20(guard\x20creation\x20module\x20conflict\x20on-chain)','origin':'P0-3\x20mtb-tn-261030','wired_in':'wrap'},{'id':'MC-BINDSEM-01','gate':'lintGuardBindingSemantics','faces':['machine_publish','service_publish','guard_binding'],'enforcement':'always','defect_class':'per-host\x20guard\x20binding\x20semantics\x20—\x20drain\x20surface\x20/\x20T10\x20hijack\x20binds\x20(MF_SLOT_IDENTITY_ANCHOR\x20family)','origin':'ruling\x202026-10-31\x20(G2)','wired_in':'wrap'},{'id':'MC-TASKBIND-PRE-01','gate':'lintMachineTaskBindingPreflight','faces':['machine_publish'],'enforcement':'always','defect_class':'machine-side\x20task\x20binding\x20preflight\x20(order/task\x20row\x20anchors\x20resolvable)','origin':'K4R\x20claimed_by\x20ordering\x20leg\x20batch','wired_in':'wrap'},{'id':'MC-SVCCONST-REF-01','gate':'lintMachineGuardServiceConstants','faces':['machine_publish','service_publish'],'enforcement':'always','defect_class':'by-reference\x20machine\x20publish:\x20guard\x20constants\x20pinned\x20to\x20foreign\x20Service','origin':'P0-3\x20residual\x20(machine\x20ref\x20publish\x20face)','wired_in':'wrap'},{'id':'MC-EVIDENCE-01','gate':'lintForwardGuardEvidenceMarkers','faces':['machine_publish'],'enforcement':'always','defect_class':'forward\x20guard\x20evidence\x20markers\x20(proof/event\x20anchors)\x20malformed','origin':'proactive\x20consolidation','wired_in':'wrap'},{'id':'SV-PERMAUTH-01','gate':'checkPermissionAuthorization','faces':['service_publish'],'enforcement':'strict_audit_only','defect_class':'IMMUT-002\x20—\x20custom\x20permission\x20index\x20grants\x20unauthorized\x20writers\x20(immutable\x20after\x20publish)','origin':'IMMUT-002\x20(OUTAGE\x20vs\x20EVIDENCE\x20degrade)','wired_in':'wrap'},{'id':'SV-WIPBIND-01','gate':'lintSalesWipBindings','faces':['service_publish'],'enforcement':'always','defect_class':'sales\x20payload\x20WIP\x20bindings\x20dangling\x20(price/stock\x20refs\x20unresolvable)','origin':'TPL-P1-04/05\x20family','wired_in':'wrap'},{'id':'SV-ALLOCGUARD-01','gate':'lintAllocatorGuards','faces':['service_publish'],'enforcement':'always','defect_class':'allocator-bound\x20guard\x20roots\x20unresolvable\x20/\x20fund-safety\x20contradiction\x20(chain-grounded).\x20Its\x20R-TIME-PROFILE\x20leg\x20shares\x20the\x20MC-TIMEPROFILE-01\x20named\x20degrade\x20(env.window_profile=\x27test\x27;\x20real-network\x20formal\x20publish\x20still\x20BLOCKS)','origin':'allocator-rail-verifier\x20publish\x20face\x20(ledger\x20rule\x208\x20authority)','wired_in':'wrap'},{'id':'SV-ESCROWEXIT-01','gate':'lintServiceEscrowExitCoverage','faces':['service_publish'],'enforcement':'always','defect_class':'R-ESCROW-LEAF\x20—\x20terminal\x20node\x20with\x20NO\x20drain\x20entry\x20exists\x20→\x20escrow\x20strands\x20(1.0\x20WOW实证)','origin':'R-ESCROW-LEAF\x20(4R-05)','wired_in':'wrap'},{'id':'SV-RAILEXIT-01','gate':'verifyRailExitSatisfiability','faces':['service_publish'],'enforcement':'always','defect_class':'the\x20SATISFIABILITY\x20half\x20of\x20R-ESCROW-LEAF\x20—\x20a\x20terminal\x20whose\x20rails\x20all\x20pin\x20the\x20right\x20node\x20yet\x20none\x20can\x20ever\x20FIRE,\x20so\x20the\x20escrow\x20strands\x20while\x20SV-ESCROWEXIT-01\x20reports\x20green:\x20RAIL_EXIT_WINDOW_CLOSED\x20(a\x20monotone-closing\x20clock\x20leg\x20in\x20an\x20unavoidable\x20position\x20—\x20draining\x20escrow\x20through\x20a\x20rail\x20is\x20an\x20explicit\x20call\x20needing\x20a\x20same-tx\x20passport,\x20so\x20once\x20the\x20window\x20shuts\x20no\x20signer\x20can\x20produce\x20one,\x20and\x20the\x20pool\x20is\x20append-only\x20with\x20no\x20drain\x20backdoor)\x20/\x20RAIL_EXIT_ARB_GATED\x20(an\x20unavoidable\x20arb.*\x20read,\x20which\x20returns\x20W_OBJECT_NOT_FOUND\x20and\x20ABORTS\x20the\x20whole\x20tx\x20rather\x20than\x20evaluating\x20false,\x20so\x20the\x20never-disputed\x20majority\x20has\x20no\x20exit)','origin':'R-ESCROW-LEAF\x20upgrade\x20(task\x20③,\x202026-11-04).\x20Severity\x20per\x20two-layer\x20measurement\x20over\x20v170:\x20LAYER\x20A\x20—\x20of\x20127\x20declared\x20rail\x20keys,\x2078\x20resolve\x20to\x20a\x20concrete\x20body\x20through\x20the\x20compiler\x27s\x20own\x20default-resolution\x20chain\x20and\x20ZERO\x20trips\x20either\x20code;\x20LAYER\x20B\x20is\x20resolution-independent\x20and\x20carries\x20the\x20argument\x20—\x20pattern.time_window_upper_bound\x20(the\x20closing\x20design)\x20is\x20bound\x20to\x20machine_forward\x20ONLY\x20across\x20all\x2030\x20archetypes,\x20exactly\x20as\x20its\x20own\x20`host`\x20field\x20declares,\x20and\x20no\x20arb-reading\x20tpl_*\x20is\x20bound\x20to\x20any\x20rail.\x20A\x20hit\x20therefore\x20means\x20the\x20payload\x20diverged\x20from\x20every\x20shipped\x20archetype.\x20Doctrine\x20source:\x20pattern.time_window_upper_bound\x27s\x20EXPIRY\x20SEMANTICS\x20note\x20—\x20\x27an\x20expired\x20window\x20only\x20fails\x20the\x20FORWARD\x20it\x20gates\x20…\x20pair\x20with\x20a\x20machine\x20expiry\x20node\x20or\x20an\x20allocator\x20recover\x20rail\x20for\x20the\x20post-window\x20fund\x20path\x27;\x20a\x20closing\x20leg\x20ON\x20the\x20fund\x20rail\x20is\x20that\x20pairing\x20inverted','wired_in':'wrap'},{'id':'SV-ARBNEUTRAL-01','gate':'checkArbitrationNeutrality','faces':['service_publish'],'enforcement':'strict_audit_only','defect_class':'R2-04\x20—\x20arbitrator-neutral\x20object\x20bound\x20as\x20merchant-biased\x20referee\x20(degraded\x20read\x20degrades\x20verdict)','origin':'R2-04\x20(OUTAGE\x20vs\x20EVIDENCE\x20degrade)','wired_in':'wrap'},{'id':'SV-RAILPAIR-01','gate':'lintAllocatorRailPairing','faces':['service_publish'],'enforcement':'always','defect_class':'H1B-03\x20—\x20symbolic\x20rail\x20verification\x20over\x20the\x20allocator\x20guards\x20(RAIL_TERMINAL_UNCOVERED\x20/\x20RAIL_AWARD_EXIT_MISSING\x20/\x20RAIL_CLAIMED_BY_LEG\x20/\x20RAIL_NO_CALLER_IDENTITY_BOUND\x20/\x20RAIL_DEAD_LITERAL).\x20UNCONDITIONAL\x20since\x202026-11-04\x20(was\x20arbitration-scoped),\x20fed\x20a\x20TOPOLOGY-DERIVED\x20node\x20matrix\x20via\x20chainNodeRailMatrix\x20—\x20the\x20chain\x20stores\x20no\x20semantic\x20role,\x20so\x20the\x20former\x20bare\x20{name}\x20rows\x20left\x20`terminals`\x20empty\x20and\x20RAIL_TERMINAL_UNCOVERED\x20could\x20never\x20fire\x20on\x20a\x20publish\x20payload\x20—\x20and,\x20from\x20the\x20same\x20day,\x20fed\x20the\x20SERVICE\x27S\x20EFFECTIVE\x20ON-CHAIN\x20BINDING:\x20a\x20publish-by-reference\x20(staged)\x20call\x20carries\x20neither\x20allocators\x20nor\x20a\x20machine\x20because\x20both\x20were\x20bound\x20in\x20earlier\x20calls,\x20so\x20the\x20payload-only\x20read\x20returned\x20silent\x20on\x20exactly\x20the\x20hand-compose\x20flow\x20this\x20incident\x20class\x20lives\x20in.\x20`serviceRef`\x20now\x20resolves\x20the\x20Service\x20object\x20once\x20and\x20its\x20`order_allocators`/`machine`\x20backfill\x20both\x20gaps\x20(same\x20move\x20as\x20the\x20R-ESCROW-LEAF\x20cure);\x20an\x20unresolvable\x20ref\x20is\x20graded\x20by\x20face\x20—\x20a\x20FAILED\x20read\x20blocks\x20only\x20the\x20strict\x20dry_run\x20audit\x20and\x20warns\x20on\x20the\x20formal\x20publish\x20(OUTAGE\x20vs\x20EVIDENCE),\x20a\x20read\x20that\x20resolved\x20NO\x20Service\x20object\x20warns\x20on\x20both','origin':'H1B-03\x20(1.0\x20WOW\x20stranded);\x20scope+matrix\x20cure\x202026-11-04\x20(publish\x20face\x20was\x20strictly\x20weaker\x20than\x20the\x20compile\x20face,\x20which\x20runs\x20the\x20same\x20verifier\x20on\x20every\x20archetype);\x20staged-binding\x20cure\x202026-11-04\x20(the\x20\x27UNCONDITIONAL\x27\x20claim\x20was\x20false\x20for\x20publish-by-reference\x20until\x20the\x20on-chain\x20binding\x20became\x20the\x20fallback\x20source)\x20—\x20landing\x20risk\x20measured\x20over\x20the\x20catalog\x20before\x20enabling:\x2030\x20archetypes\x20/\x20119\x20resolved\x20rails\x20/\x200\x20publish-face\x20criticals,\x2083\x20info\x20receipts\x20(builtin-allocator-rails.spec.ts\x20invariant\x20(d)),\x20plus\x20the\x20matrix\x20half\x20in\x20publish-rail-matrix.spec.ts','wired_in':'wrap'},{'id':'SV-ECHO-01','gate':'echoServicePublishBindings','faces':['service_publish'],'enforcement':'always','defect_class':'et21\x20ISS-015\x20—\x20last-chance\x20binding\x20echo:\x20every\x20named\x20binding\x20this\x20payload\x20will\x20freeze\x20(machine\x20/\x20order_allocators\x20guards\x20+\x20Entity\x20recipients\x20/\x20order_allocators_append\x20/\x20arbitrations\x20/\x20rewards\x20/\x20object.permission)\x20is\x20resolved\x20name\x20→\x20address\x20→\x20on-chain\x20object\x20type\x20through\x20the\x20namespace-aware\x20LocalMark\x20resolver.\x20An\x20UNRESOLVABLE\x20local\x20name\x20or\x20a\x20resolved\x20type\x20that\x20does\x20not\x20match\x20the\x20slot\x20(expected\x20Entity\x20payee\x20resolving\x20to\x20a\x20Guard)\x20BLOCKS\x20the\x20FORMAL\x20publish\x20—\x20order_allocators\x20is\x20append-only\x20after\x20publish\x20(the\x20allocator\x20table\x20can\x20never\x20be\x20edited\x20once\x20the\x20service\x20is\x20live),\x20so\x20a\x20mis-bound\x20payee\x20is\x20permanently\x20wrong;\x20the\x20dry_run\x20strict\x20audit\x20echoes\x20WITHOUT\x20blocking\x20(the\x20formal\x20dispatch\x20is\x20the\x20irreversible\x20step).\x20Cross-build\x20bare-name\x20collision\x20advisories\x20ride\x20the\x20same\x20resolver\x20(LocalMark\x20write-path\x20namespace,\x20same\x20slice)','origin':'et21\x20ISS-015\x20(publish-face\x20audit\x20ledger\x20P0#4;\x20binding-manifest\x20echo\x20first\x20slice,\x202026-11-04)','wired_in':'wrap'},{'id':'AUTH-COMPILE-01','gate':'checkAllocatorRails','faces':['service_publish','machine_publish'],'enforcement':'always','defect_class':'compile.ts\x20rail\x20blockers\x20—\x20RAIL_TERMINAL_UNCOVERED\x20/\x20RAIL_CLAIMED_BY_LEG\x20/\x20RAIL_NO_CALLER_IDENTITY_BOUND\x20/\x20REFUND_GATE_POLARITY_MIX\x20(template/DSL\x20path)','origin':'allocator-rail-verifier\x20(compile-time\x20authority)','wired_in':'compile'},{'id':'AUTH-AUDITRULES-01','gate':'audit_machine_bound','faces':['service_publish'],'enforcement':'advisory','defect_class':'audit-rules\x20catalog\x20—\x20machine\x20bound\x20/\x20dangling\x20deps\x20/\x20repo\x20integrity\x20caller\x20legs\x20(aggregate_risks\x20face,\x20wowok-auditor\x20consumer)','origin':'audit-rules.ts\x20catalog','wired_in':'audit-rules'},{'id':'SV-REFUNDSAT-01','gate':'checkRefundRecipientSatisfiability','faces':['service_publish'],'enforcement':'always','defect_class':'T10-10\x20—\x20a\x20refund\x20guard\x20pinning\x20its\x20recipient\x20identifier\x20to\x20context(Signer)\x20is\x20unsatisfiable\x20against\x20the\x20order-anchored\x20escrow,\x20so\x20order\x20funds\x20strand\x20permanently\x20once\x20the\x20allocators\x20lock\x20(fail-soft\x20to\x20advisory\x20on\x20fetch\x20error)','origin':'T10-10\x20(GuardIdentifier\x20x\x20for_object\x20x\x20Guard-equality\x20triple)','wired_in':'onchain'},{'id':'SV-ARBDECOR-01','gate':'checkArbitrationsBeforePublish','faces':['service_publish'],'enforcement':'always','defect_class':'decorative\x20dispute\x20path\x20—\x20a\x20bound\x20Arbitration\x20whose\x20voting_guard\x20roster\x20leaves\x20the\x20arb-side\x20admin\x20as\x20the\x20only\x20voter\x20AND\x20the\x20judge\x20(R-ARB-VOTE-LOCK\x20concentration);\x20fail-soft\x20to\x20advisory\x20on\x20resolution/query\x20error','origin':'R-ARB-VOTE-LOCK','wired_in':'onchain'},{'id':'SV-RECIPIENT-01','gate':'checkEntityRecipientGate','faces':['service_publish'],'enforcement':'always','defect_class':'R-RECIPIENT-03\x20—\x20a\x20blank/omitted\x20allocator\x20recipient\x20resolves\x20to\x20the\x20DEFAULT\x20LOCAL\x20ACCOUNT,\x20silently\x20routing\x20customer\x20escrow\x20to\x20the\x20builder;\x20blocks\x20rather\x20than\x20warns\x20because\x20order_allocators\x20is\x20L1-immutable\x20after\x20publish\x20(the\x20same\x20gate\x20also\x20covers\x20allocation.allocators)','origin':'R-RECIPIENT-03\x20(direct-sales\x20Entity\x20recipient)','wired_in':'onchain'},{'id':'SV-ALLOCPLAN-01','gate':'checkOrderAllocatorsPrePublish','faces':['service_publish'],'enforcement':'always','defect_class':'R-A-1\x20allocator-plan\x20structural\x20family\x20+\x20R-A-2-03\x20duplicate\x20guards\x20—\x20the\x20subset\x20decidable\x20without\x20Guard\x20table/root\x20evidence\x20blocks;\x20everything\x20else\x20degrades\x20to\x20a\x20warning,\x20and\x20an\x20internal\x20error\x20never\x20blocks\x20(the\x20gate\x20must\x20not\x20become\x20a\x20new\x20failure\x20mode)','origin':'R-A-1\x20/\x20R-A-2-03','wired_in':'onchain'},{'id':'SV-WIPNET-01','gate':'checkSalesWipNetworkDeployment','faces':['service_publish'],'enforcement':'always','defect_class':'a\x20localnet-only\x20WIP\x20is\x20unreachable\x20from\x20testnet/mainnet\x20machines,\x20so\x20every\x20order\x20fails\x20100%\x20—\x20hard-blocked\x20on\x20those\x20networks,\x20advisory\x20on\x20localnet','origin':'WIP-B\x20network\x20calibration','wired_in':'onchain'},{'id':'SV-ZEROPRICE-01','gate':'checkSalesZeroPrice','faces':['service_publish'],'enforcement':'always','defect_class':'F-BS-76\x20—\x20sale()\x20has\x20no\x20price\x20floor\x20so\x20price\x200\x20lists\x20fine,\x20then\x20NOBODY\x20can\x20ever\x20buy\x20it\x20(client\x20zero-total\x20gate\x20and\x20the\x20on-chain\x20zero-total\x20abort\x20both\x20refuse);\x20discovery\x20cost\x20one\x20run\x201\x20679\x20440\x20gas\x20to\x20add\x20and\x20787\x20124\x20to\x20remove','origin':'F-BS-76\x20(bs-mn-261022)','wired_in':'onchain'},{'id':'SV-UMIMS-01','gate':'checkUmContactHasIm','faces':['service_publish'],'enforcement':'always','defect_class':'an\x20empty\x20Contact\x20ims\x20vector\x20leaves\x20pre-order\x20negotiation,\x20customer_required\x20private-info\x20delivery\x20and\x20post-sale\x20support\x20with\x20NO\x20channel\x20—\x20Messenger\x20routes\x20to\x20ims\x20members,\x20so\x20the\x20store\x20publishes\x20unreachable','origin':'on-chain\x20contact\x20ims\x20routing','wired_in':'onchain'},{'id':'SV-AUDITCAT-01','gate':'auditService','faces':['service_publish'],'enforcement':'advisory','defect_class':'audit-rules\x20service\x20catalog\x20(SKIP_RULES-filtered)\x20—\x20NOTE:\x20an\x20`error`-severity\x20finding\x20is\x20pushed\x20as\x20an\x20[AUDIT\x20ERROR]\x20constraintWarning\x20and\x20does\x20NOT\x20block,\x20so\x20the\x20catalog\x27s\x20own\x20severity\x20scale\x20is\x20cosmetic\x20on\x20this\x20face','origin':'audit-rules.ts\x20catalog','wired_in':'onchain'},{'id':'MC-PERMISS-01','gate':'checkMachinePermissionBeforePublish','faces':['machine_publish'],'enforcement':'advisory','defect_class':'a\x20forward\x27s\x20permissionIndex\x20with\x20no\x20entity\x20granted\x20on\x20the\x20bound\x20Permission\x20—\x20the\x20edge\x20is\x20unadvanceable\x20by\x20anyone\x20(advisory\x20because\x20a\x20new\x20Permission\x20may\x20be\x20granted\x20after\x20publish)','origin':'permission-index\x20grant\x20coverage','wired_in':'onchain'},{'id':'MC-ORPHANGUARD-01','gate':'lintMachineGuardBindings','faces':['machine_publish'],'enforcement':'advisory','defect_class':'F-29\x20—\x20the\x20session\x20created\x20Guard\x20object(s)\x20but\x20the\x20publishable\x20graph\x20binds\x20ZERO\x20of\x20them\x20on\x20any\x20forward\x20(the\x20silent-drop\x20shape:\x20$ref\x20pre-evaluated\x20to\x20undefined,\x20JSON.stringify\x20drops\x20the\x20key,\x20publish\x20succeeds,\x20edges\x20freeze\x20unguarded)','origin':'F-29\x20(tv8-tn-261030)','wired_in':'onchain'},{'id':'MC-ANCHORREACH-01','gate':'checkGuardAnchorReachability','faces':['machine_publish'],'enforcement':'advisory','defect_class':'a\x20guard\x20time-anchor\x20that\x20no\x20reachable\x20node\x20ever\x20establishes\x20makes\x20its\x20window\x20unsatisfiable\x20—\x20the\x20guard\x20can\x20never\x20pass,\x20so\x20the\x20rail\x20it\x20gates\x20is\x20dead\x20(Dijkstra\x20over\x20the\x20anchor\x20x\x20node\x20profile)','origin':'guard-anchor-reach.ts','wired_in':'onchain'},{'id':'GD-NODEGATE-01','gate':'lintGuardNodeGates','faces':['guard_binding'],'enforcement':'advisory','defect_class':'guard\x20node-gate\x20advisory\x20on\x20the\x20guard\x20create/update\x20face\x20—\x20a\x20node\x20pin\x20that\x20the\x20intended\x20host\x20machine\x20never\x20enters','origin':'guard\x20node-gate\x20parse\x20(parseGuardNodeGates)','wired_in':'onchain'},{'id':'GD-REWARDONCE-01','gate':'checkRewardOnceArming','faces':['guard_binding'],'enforcement':'advisory','defect_class':'a\x20funded\x20Reward\x20pool\x20whose\x20mounted\x20guard\x20carries\x20no\x20once-stamp\x20is\x20replayable,\x20and\x20the\x20bsw4\x20F-11\x20window-delay\x20advisory\x20rides\x20the\x20same\x20sweep;\x20reward\x20guard_add\x20is\x20a\x20bind\x20face\x20per\x20isGuardBindingOperation','origin':'bsw4\x20F-11\x20/\x20reward\x20replay\x20stamp','wired_in':'onchain'},{'id':'GD-REWARDEVID-01','gate':'verifyRewardEvidenceBindings','faces':['guard_binding'],'enforcement':'advisory','defect_class':'reward\x20evidence\x20bindings\x20that\x20the\x20deployed\x20package\x20drops\x20on\x20read-back\x20—\x20fail-soft,\x20never\x20masks\x20the\x20operation\x27s\x20own\x20outcome','origin':'reward\x20evidence\x20read-back','wired_in':'onchain'}];export const PUBLISH_SURFACE_EXEMPT_GATES={'checkAllocatorRails':'compile-face\x20authority\x20(template\x20path);\x20invoked\x20by\x20the\x20compile\x20pipeline,\x20registered\x20as\x20AUTH-COMPILE-01','auditRepoIntegrityAndCallerLegs':'plan-level\x20repo\x20integrity\x20(plan\x20build\x20face,\x20not\x20the\x20dispatch\x20publish\x20gate)','checkForeignServicePins':'plan-level\x20foreign\x20pin\x20disclosure\x20(plan\x20build\x20face)','checkDaysUnitSlots':'compile\x20normalization\x20check\x20(plan\x20build\x20face)','checkWindowTruncation':'compile\x20normalization\x20check\x20(plan\x20build\x20face)','dropEmptyVecGuards':'compile\x20normalization\x20step\x20(not\x20a\x20gate)','checkProjectStage':'project\x20tool\x20stage\x20hint\x20(wip_file/project\x20face,\x20not\x20publish)','lintAllocatorGuardSet':'internal\x20helper\x20behind\x20lintAllocatorGuards\x20and\x20the\x20pre-buy\x20screening\x20gate','lintTaskBindingAdvisories':'internal\x20helper\x20behind\x20the\x20task-binding\x20advisory\x20family\x20(protocol\x20254)','lintGuard':'guard-lint\x20module\x20entry\x20invoked\x20INSIDE\x20composing\x20lints,\x20not\x20a\x20publish\x20gate\x20itself','lintReviewLockedTerminals':'internal\x20helper\x20behind\x20lintForwardReviewLocks','verifyAllocatorRails':'internal\x20helper\x20behind\x20lintAllocatorRailPairing\x20(single-source\x20verifier\x20core)','verifyArbitrationRulingRails':'internal\x20helper\x20behind\x20lintForwardArbRulingRails\x20(single-source\x20ruling-rail\x20verifier\x20core)','verifyCollectedGuardBindings':'internal\x20helper\x20behind\x20lintGuardBindingSemantics\x20(batch\x20collection)','verifyGuardBinding':'internal\x20helper\x20behind\x20verifyCollectedGuardBindings\x20(single\x20host)','auditGuardRelies':'internal\x20helper\x20inside\x20verifyCollectedGuardBindings\x20(guard-relies\x20audit)','checkEntityRecipients':'internal\x20helper\x20behind\x20checkEntityRecipientGate\x20(registered\x20as\x20SV-RECIPIENT-01)','checkArbitrationVenueOrder':'Arbitration\x20CREATION\x20face\x20(venue\x20ordering\x20findings\x20at\x20arb\x20build),\x20not\x20a\x20Service/Machine\x20publish\x20gate','checkClientSchemaCompatibility':'client\x20schema-version\x20negotiation\x20(schema\x20layer),\x20not\x20a\x20publish\x20gate','checkDiscountFloorBeforeIssue':'discount\x20ISSUANCE\x20face\x20—\x20judged\x20when\x20a\x20discount\x20is\x20created,\x20not\x20at\x20publish','checkDiscountThresholdBeforeBuy':'BUY\x20face\x20—\x20the\x20pre_buy\x20gate\x20(wrap.ts\x20runPreBuyChecks)\x20owns\x20purchase-time\x20screening','verifyGuardFailureLegs':'runtime\x20E_VERIFY_FAILED\x20diagnosis\x20(leg-by-leg\x20replay\x20of\x20a\x20FAILED\x20guard\x20submission),\x20not\x20a\x20pre-publish\x20gate','verifyOrderNewLanded':'post-transaction\x20read-back\x20of\x20an\x20order_new\x20landing,\x20not\x20a\x20pre-publish\x20gate'};export function gatesForFace(a){return PUBLISH_SURFACE_CONTRACT['filter'](b=>b['faces']['includes'](a));}export function blockingGatesForFace(a){return gatesForFace(a)['filter'](b=>b['enforcement']==='always');}
|
|
1
|
+
export const PUBLISH_SURFACE_CONTRACT_VERSION='1.5.0';export const PUBLISH_SURFACE_CONTRACT=[{'id':'MC-TOPOLOGY-01','gate':'auditMachineNodes','faces':['machine_publish'],'enforcement':'always','defect_class':'R-M1-11\x20dispute\x20nodes\x20on-Machine\x20/\x20MC-C-04\x20missing\x20entry\x20pair\x20/\x20operator\x20sanity\x20on\x20effective\x20node\x20set\x20(inline\x20AND\x20by-reference)','origin':'R-M1-11,\x20MC-C-04;\x20F-001\x20effective-state\x20fix','wired_in':'wrap'},{'id':'MC-CLOSURE-01','gate':'closureFindings','faces':['machine_publish'],'enforcement':'always','defect_class':'publish\x20closure\x20findings\x20on\x20machine\x20graph\x20(unreachable/terminal\x20anomalies)','origin':'PG-CLOSURE-01\x20(gf32)','wired_in':'wrap'},{'id':'MC-TASKBIND-01','gate':'lintForwardGuardsTaskBinding','faces':['machine_publish'],'enforcement':'always','defect_class':'forward\x20guards\x20with\x20task-row\x20binding\x20gaps\x20—\x20unauthorized\x20dual-rail\x20advance','origin':'gfm31\x20P05\x20(1000/1002\x20unauthorized\x20dual-track,\x20chain-rejected\x20within\x20minutes)','wired_in':'wrap'},{'id':'MC-REVIEWLOCK-01','gate':'lintForwardReviewLocks','faces':['machine_publish'],'enforcement':'always','defect_class':'review-window\x20forward\x20locks\x20missing/mispinned','origin':'proactive\x20consolidation','wired_in':'wrap'},{'id':'MC-ARBRAIL-01','gate':'lintForwardArbRulingRails','faces':['machine_publish'],'enforcement':'always','defect_class':'an\x20arbitration\x20OUTCOME\x20that\x20cannot\x20move\x20the\x20order,\x20judged\x20on\x20the\x20frozen\x20graph\x20by\x20QUERY\x20SEMANTICS\x20(never\x20template_id\x20or\x20node\x20name):\x20ARB_RULING_PRESENCE_ONLY\x20/\x20ARB_RULING_STATUS_GATE\x20block;\x20ARB_RULING_VENUE_UNBOUND\x20/\x20ARB_RULING_ZERO_EXIT\x20warn;\x20ARB_RULING_ONE_SIDED\x20discloses','origin':'publish-face\x20twin\x20of\x20the\x20scan-only\x20R-DIR-01/02\x20+\x20R-ARB-ZERO-EXIT,\x20which\x20classify\x20by\x20template_id\x20and\x20semantic_role\x20—\x20neither\x20survives\x20to\x20the\x20chain,\x20so\x20a\x20hand-composed\x20store\x20never\x20saw\x20them\x20(the\x20same\x20gap\x20that\x20made\x20SV-RAILPAIR-01\x20unconditional).\x20Severity\x20per\x20measurement\x20over\x20v170:\x20presence-only\x20and\x20arb.status\x20are\x200/16\x20arbitration\x20archetypes\x20(blockable);\x20won-only\x20is\x208/16\x20and\x20the\x20only\x202\x20ruling-only\x20waypoints\x20are\x20declared-final\x20post-settlement\x20re-routers\x20whose\x20drained-escrow\x20exemption\x20is\x20NOT\x20statically\x20decidable\x20at\x20publish\x20(disclose/warn\x20only)','wired_in':'wrap'},{'id':'MC-TIMEPROFILE-01','gate':'lintForwardGuardsTimeProfile','faces':['machine_publish'],'enforcement':'always','defect_class':'forward\x20guard\x20time-profile\x20contradictions\x20(timeout\x20vs\x20window).\x20NAMED\x20DEGRADE\x20(N8\x20ktt6\x20F-14\x20re-carving\x202026-11-04):\x20env.window_profile=\x27test\x27\x20downgrades\x20the\x20numeric\x20violations\x20to\x20loud\x20disclosures\x20for\x20a\x20DISPOSABLE\x20trial\x20run\x20—\x20but\x20a\x20test-profile\x20publish\x20on\x20an\x20explicit\x20real\x20network\x20(testnet/mainnet)\x20is\x20BLOCKED\x20on\x20every\x20face\x20in\x20the\x20harness\x20pre-publish\x20hook','origin':'R7-01\x20family','wired_in':'wrap'},{'id':'MC-SVCCONST-01','gate':'lintForwardGuardServiceConstants','faces':['machine_publish'],'enforcement':'always','defect_class':'guard\x20pinned\x20to\x20wrong-shop\x20Service\x20constant\x20slot\x20—\x20order\x20strands\x20(guard\x20creation\x20module\x20conflict\x20on-chain)','origin':'P0-3\x20mtb-tn-261030','wired_in':'wrap'},{'id':'MC-BINDSEM-01','gate':'lintGuardBindingSemantics','faces':['machine_publish','service_publish','guard_binding'],'enforcement':'always','defect_class':'per-host\x20guard\x20binding\x20semantics\x20—\x20drain\x20surface\x20/\x20T10\x20hijack\x20binds\x20(MF_SLOT_IDENTITY_ANCHOR\x20family)','origin':'ruling\x202026-10-31\x20(G2)','wired_in':'wrap'},{'id':'GSEM-WALK-01','gate':'lintGuardSemanticWalk','faces':['machine_publish','service_publish','guard_binding'],'enforcement':'always','defect_class':'guard-tree\x20SEMANTICS\x20that\x20shape\x20lints\x20pass\x20but\x20the\x20chain\x20trips\x20at\x20verify\x20time:\x20unknown\x20or\x20arity-mismatched\x20queries\x20(CHAIN_QUERY_REGISTRY\x20truth),\x20operand-type\x20vs\x20query-return-type\x20mismatches\x20(zr9x\x20F-34\x20Value-row\x20numeric\x20compare\x20→\x20MovePrimitiveRuntimeError),\x20query\x20object\x20pinned\x20to\x20a\x20wrong-typed\x20/\x20untagged\x20/\x20undeclared\x20/\x20empty\x20slot\x20(abnb\x20F-25\x20resource-absence\x20family,\x20zr9x\x20F-42\x20stale\x20pin),\x20undeclared\x20identifier\x20slots,\x20certain-true\x20whole-tree\x20folds\x20(zr9x\x20F-13\x20always-true\x20voting\x20leg\x20—\x20on\x20arb/voting\x20guards\x20a\x20TRUST\x20defect)\x20and\x20certain-false\x20folds\x20(zr9x\x20F-35\x20CLOSES=0),\x20and\x20static\x20repository-row\x20reads\x20whose\x20producer\x20is\x20unproven\x20(loud\x20UNVERIFIED,\x20zr9x\x20F-36)','origin':'user\x20directive\x20⑤\x202026-11-05\x20—\x20machine\x20publish\x20/\x20service\x20publish\x20/\x20guard\x20binding\x20evaluated\x20guard\x20SHAPE\x20only;\x20semantics\x20surfaced\x20solely\x20as\x20runtime\x20MovePrimitiveRuntimeError.\x20Single-authority\x20predicates\x20reused\x20from\x20guard-risk.ts\x20(foldCertainOutcome,\x20QUERY_TYPE_ALIASES,\x20rootReferencedIdentifiers);\x20call\x20site\x20=\x20shared\x20binding\x20verifier\x20verifyCollectedGuardBindings\x20(findings\x20ride\x20the\x20binding\x20gate\x27s\x20result;\x20this\x20entry\x20is\x20the\x20registry\x20citation)','wired_in':'wrap'},{'id':'MC-TASKBIND-PRE-01','gate':'lintMachineTaskBindingPreflight','faces':['machine_publish'],'enforcement':'always','defect_class':'machine-side\x20task\x20binding\x20preflight\x20(order/task\x20row\x20anchors\x20resolvable)','origin':'K4R\x20claimed_by\x20ordering\x20leg\x20batch','wired_in':'wrap'},{'id':'MC-SVCCONST-REF-01','gate':'lintMachineGuardServiceConstants','faces':['machine_publish','service_publish'],'enforcement':'always','defect_class':'by-reference\x20machine\x20publish:\x20guard\x20constants\x20pinned\x20to\x20foreign\x20Service','origin':'P0-3\x20residual\x20(machine\x20ref\x20publish\x20face)','wired_in':'wrap'},{'id':'MC-EVIDENCE-01','gate':'lintForwardGuardEvidenceMarkers','faces':['machine_publish'],'enforcement':'always','defect_class':'forward\x20guard\x20evidence\x20markers\x20(proof/event\x20anchors)\x20malformed','origin':'proactive\x20consolidation','wired_in':'wrap'},{'id':'SV-PERMAUTH-01','gate':'checkPermissionAuthorization','faces':['service_publish'],'enforcement':'strict_audit_only','defect_class':'IMMUT-002\x20—\x20custom\x20permission\x20index\x20grants\x20unauthorized\x20writers\x20(immutable\x20after\x20publish)','origin':'IMMUT-002\x20(OUTAGE\x20vs\x20EVIDENCE\x20degrade)','wired_in':'wrap'},{'id':'SV-WIPBIND-01','gate':'lintSalesWipBindings','faces':['service_publish'],'enforcement':'always','defect_class':'sales\x20payload\x20WIP\x20bindings\x20dangling\x20(price/stock\x20refs\x20unresolvable)','origin':'TPL-P1-04/05\x20family','wired_in':'wrap'},{'id':'SV-ALLOCGUARD-01','gate':'lintAllocatorGuards','faces':['service_publish'],'enforcement':'always','defect_class':'allocator-bound\x20guard\x20roots\x20unresolvable\x20/\x20fund-safety\x20contradiction\x20(chain-grounded).\x20Its\x20R-TIME-PROFILE\x20leg\x20shares\x20the\x20MC-TIMEPROFILE-01\x20named\x20degrade\x20(env.window_profile=\x27test\x27;\x20real-network\x20formal\x20publish\x20still\x20BLOCKS)','origin':'allocator-rail-verifier\x20publish\x20face\x20(ledger\x20rule\x208\x20authority)','wired_in':'wrap'},{'id':'SV-ESCROWEXIT-01','gate':'lintServiceEscrowExitCoverage','faces':['service_publish'],'enforcement':'always','defect_class':'R-ESCROW-LEAF\x20—\x20terminal\x20node\x20with\x20NO\x20drain\x20entry\x20exists\x20→\x20escrow\x20strands\x20(1.0\x20WOW实证)','origin':'R-ESCROW-LEAF\x20(4R-05)','wired_in':'wrap'},{'id':'SV-RAILEXIT-01','gate':'verifyRailExitSatisfiability','faces':['service_publish'],'enforcement':'always','defect_class':'the\x20SATISFIABILITY\x20half\x20of\x20R-ESCROW-LEAF\x20—\x20a\x20terminal\x20whose\x20rails\x20all\x20pin\x20the\x20right\x20node\x20yet\x20none\x20can\x20ever\x20FIRE,\x20so\x20the\x20escrow\x20strands\x20while\x20SV-ESCROWEXIT-01\x20reports\x20green:\x20RAIL_EXIT_WINDOW_CLOSED\x20(a\x20monotone-closing\x20clock\x20leg\x20in\x20an\x20unavoidable\x20position\x20—\x20draining\x20escrow\x20through\x20a\x20rail\x20is\x20an\x20explicit\x20call\x20needing\x20a\x20same-tx\x20passport,\x20so\x20once\x20the\x20window\x20shuts\x20no\x20signer\x20can\x20produce\x20one,\x20and\x20the\x20pool\x20is\x20append-only\x20with\x20no\x20drain\x20backdoor)\x20/\x20RAIL_EXIT_ARB_GATED\x20(an\x20unavoidable\x20arb.*\x20read,\x20which\x20returns\x20W_OBJECT_NOT_FOUND\x20and\x20ABORTS\x20the\x20whole\x20tx\x20rather\x20than\x20evaluating\x20false,\x20so\x20the\x20never-disputed\x20majority\x20has\x20no\x20exit)','origin':'R-ESCROW-LEAF\x20upgrade\x20(task\x20③,\x202026-11-04).\x20Severity\x20per\x20two-layer\x20measurement\x20over\x20v170:\x20LAYER\x20A\x20—\x20of\x20127\x20declared\x20rail\x20keys,\x2078\x20resolve\x20to\x20a\x20concrete\x20body\x20through\x20the\x20compiler\x27s\x20own\x20default-resolution\x20chain\x20and\x20ZERO\x20trips\x20either\x20code;\x20LAYER\x20B\x20is\x20resolution-independent\x20and\x20carries\x20the\x20argument\x20—\x20pattern.time_window_upper_bound\x20(the\x20closing\x20design)\x20is\x20bound\x20to\x20machine_forward\x20ONLY\x20across\x20all\x2030\x20archetypes,\x20exactly\x20as\x20its\x20own\x20`host`\x20field\x20declares,\x20and\x20no\x20arb-reading\x20tpl_*\x20is\x20bound\x20to\x20any\x20rail.\x20A\x20hit\x20therefore\x20means\x20the\x20payload\x20diverged\x20from\x20every\x20shipped\x20archetype.\x20Doctrine\x20source:\x20pattern.time_window_upper_bound\x27s\x20EXPIRY\x20SEMANTICS\x20note\x20—\x20\x27an\x20expired\x20window\x20only\x20fails\x20the\x20FORWARD\x20it\x20gates\x20…\x20pair\x20with\x20a\x20machine\x20expiry\x20node\x20or\x20an\x20allocator\x20recover\x20rail\x20for\x20the\x20post-window\x20fund\x20path\x27;\x20a\x20closing\x20leg\x20ON\x20the\x20fund\x20rail\x20is\x20that\x20pairing\x20inverted','wired_in':'wrap'},{'id':'SV-ARBNEUTRAL-01','gate':'checkArbitrationNeutrality','faces':['service_publish'],'enforcement':'strict_audit_only','defect_class':'R2-04\x20—\x20arbitrator-neutral\x20object\x20bound\x20as\x20merchant-biased\x20referee\x20(degraded\x20read\x20degrades\x20verdict)','origin':'R2-04\x20(OUTAGE\x20vs\x20EVIDENCE\x20degrade)','wired_in':'wrap'},{'id':'SV-RAILPAIR-01','gate':'lintAllocatorRailPairing','faces':['service_publish'],'enforcement':'always','defect_class':'H1B-03\x20—\x20symbolic\x20rail\x20verification\x20over\x20the\x20allocator\x20guards\x20(RAIL_TERMINAL_UNCOVERED\x20/\x20RAIL_AWARD_EXIT_MISSING\x20/\x20RAIL_CLAIMED_BY_LEG\x20/\x20RAIL_NO_CALLER_IDENTITY_BOUND\x20/\x20RAIL_DEAD_LITERAL).\x20UNCONDITIONAL\x20since\x202026-11-04\x20(was\x20arbitration-scoped),\x20fed\x20a\x20TOPOLOGY-DERIVED\x20node\x20matrix\x20via\x20chainNodeRailMatrix\x20—\x20the\x20chain\x20stores\x20no\x20semantic\x20role,\x20so\x20the\x20former\x20bare\x20{name}\x20rows\x20left\x20`terminals`\x20empty\x20and\x20RAIL_TERMINAL_UNCOVERED\x20could\x20never\x20fire\x20on\x20a\x20publish\x20payload\x20—\x20and,\x20from\x20the\x20same\x20day,\x20fed\x20the\x20SERVICE\x27S\x20EFFECTIVE\x20ON-CHAIN\x20BINDING:\x20a\x20publish-by-reference\x20(staged)\x20call\x20carries\x20neither\x20allocators\x20nor\x20a\x20machine\x20because\x20both\x20were\x20bound\x20in\x20earlier\x20calls,\x20so\x20the\x20payload-only\x20read\x20returned\x20silent\x20on\x20exactly\x20the\x20hand-compose\x20flow\x20this\x20incident\x20class\x20lives\x20in.\x20`serviceRef`\x20now\x20resolves\x20the\x20Service\x20object\x20once\x20and\x20its\x20`order_allocators`/`machine`\x20backfill\x20both\x20gaps\x20(same\x20move\x20as\x20the\x20R-ESCROW-LEAF\x20cure);\x20an\x20unresolvable\x20ref\x20is\x20graded\x20by\x20face\x20—\x20a\x20FAILED\x20read\x20blocks\x20only\x20the\x20strict\x20dry_run\x20audit\x20and\x20warns\x20on\x20the\x20formal\x20publish\x20(OUTAGE\x20vs\x20EVIDENCE),\x20a\x20read\x20that\x20resolved\x20NO\x20Service\x20object\x20warns\x20on\x20both','origin':'H1B-03\x20(1.0\x20WOW\x20stranded);\x20scope+matrix\x20cure\x202026-11-04\x20(publish\x20face\x20was\x20strictly\x20weaker\x20than\x20the\x20compile\x20face,\x20which\x20runs\x20the\x20same\x20verifier\x20on\x20every\x20archetype);\x20staged-binding\x20cure\x202026-11-04\x20(the\x20\x27UNCONDITIONAL\x27\x20claim\x20was\x20false\x20for\x20publish-by-reference\x20until\x20the\x20on-chain\x20binding\x20became\x20the\x20fallback\x20source)\x20—\x20landing\x20risk\x20measured\x20over\x20the\x20catalog\x20before\x20enabling:\x2030\x20archetypes\x20/\x20119\x20resolved\x20rails\x20/\x200\x20publish-face\x20criticals,\x2083\x20info\x20receipts\x20(builtin-allocator-rails.spec.ts\x20invariant\x20(d)),\x20plus\x20the\x20matrix\x20half\x20in\x20publish-rail-matrix.spec.ts','wired_in':'wrap'},{'id':'SV-ECHO-01','gate':'echoServicePublishBindings','faces':['service_publish'],'enforcement':'always','defect_class':'et21\x20ISS-015\x20—\x20last-chance\x20binding\x20echo:\x20every\x20named\x20binding\x20this\x20payload\x20will\x20freeze\x20(machine\x20/\x20order_allocators\x20guards\x20+\x20Entity\x20recipients\x20/\x20order_allocators_append\x20/\x20arbitrations\x20/\x20rewards\x20/\x20object.permission)\x20is\x20resolved\x20name\x20→\x20address\x20→\x20on-chain\x20object\x20type\x20through\x20the\x20namespace-aware\x20LocalMark\x20resolver.\x20An\x20UNRESOLVABLE\x20local\x20name\x20or\x20a\x20resolved\x20type\x20that\x20does\x20not\x20match\x20the\x20slot\x20(expected\x20Entity\x20payee\x20resolving\x20to\x20a\x20Guard)\x20BLOCKS\x20the\x20FORMAL\x20publish\x20—\x20order_allocators\x20is\x20append-only\x20after\x20publish\x20(the\x20allocator\x20table\x20can\x20never\x20be\x20edited\x20once\x20the\x20service\x20is\x20live),\x20so\x20a\x20mis-bound\x20payee\x20is\x20permanently\x20wrong;\x20the\x20dry_run\x20strict\x20audit\x20echoes\x20WITHOUT\x20blocking\x20(the\x20formal\x20dispatch\x20is\x20the\x20irreversible\x20step).\x20Cross-build\x20bare-name\x20collision\x20advisories\x20ride\x20the\x20same\x20resolver\x20(LocalMark\x20write-path\x20namespace,\x20same\x20slice)','origin':'et21\x20ISS-015\x20(publish-face\x20audit\x20ledger\x20P0#4;\x20binding-manifest\x20echo\x20first\x20slice,\x202026-11-04)','wired_in':'wrap'},{'id':'AUTH-COMPILE-01','gate':'checkAllocatorRails','faces':['service_publish','machine_publish'],'enforcement':'always','defect_class':'compile.ts\x20rail\x20blockers\x20—\x20RAIL_TERMINAL_UNCOVERED\x20/\x20RAIL_CLAIMED_BY_LEG\x20/\x20RAIL_NO_CALLER_IDENTITY_BOUND\x20/\x20REFUND_GATE_POLARITY_MIX\x20(template/DSL\x20path)','origin':'allocator-rail-verifier\x20(compile-time\x20authority)','wired_in':'compile'},{'id':'AUTH-AUDITRULES-01','gate':'audit_machine_bound','faces':['service_publish'],'enforcement':'advisory','defect_class':'audit-rules\x20catalog\x20—\x20machine\x20bound\x20/\x20dangling\x20deps\x20/\x20repo\x20integrity\x20caller\x20legs\x20(aggregate_risks\x20face,\x20wowok-auditor\x20consumer)','origin':'audit-rules.ts\x20catalog','wired_in':'audit-rules'},{'id':'SV-REFUNDSAT-01','gate':'checkRefundRecipientSatisfiability','faces':['service_publish'],'enforcement':'always','defect_class':'T10-10\x20—\x20a\x20refund\x20guard\x20pinning\x20its\x20recipient\x20identifier\x20to\x20context(Signer)\x20is\x20unsatisfiable\x20against\x20the\x20order-anchored\x20escrow,\x20so\x20order\x20funds\x20strand\x20permanently\x20once\x20the\x20allocators\x20lock\x20(fail-soft\x20to\x20advisory\x20on\x20fetch\x20error)','origin':'T10-10\x20(GuardIdentifier\x20x\x20for_object\x20x\x20Guard-equality\x20triple)','wired_in':'onchain'},{'id':'SV-ARBDECOR-01','gate':'checkArbitrationsBeforePublish','faces':['service_publish'],'enforcement':'always','defect_class':'decorative\x20dispute\x20path\x20—\x20a\x20bound\x20Arbitration\x20whose\x20voting_guard\x20roster\x20leaves\x20the\x20arb-side\x20admin\x20as\x20the\x20only\x20voter\x20AND\x20the\x20judge\x20(R-ARB-VOTE-LOCK\x20concentration);\x20fail-soft\x20to\x20advisory\x20on\x20resolution/query\x20error','origin':'R-ARB-VOTE-LOCK','wired_in':'onchain'},{'id':'SV-ARB-VENUE-WHITELIST-01','gate':'lintArbVenueWhitelist','faces':['service_publish'],'enforcement':'always','defect_class':'arb\x20venue\x20whitelist\x20violation\x20—\x20a\x20service\x20binding\x20an\x20arbitration\x20whose\x20venue\x20address\x20is\x20not\x20in\x20the\x20operator\x27s\x20declared\x20arb_venues\x20(or\x20an\x20unconstrained\x20venue\x20on\x20a\x20strict\x20profile):\x20the\x20venue\x20is\x20the\x20immutable-bind\x20refund-rail\x20counterparty\x20(bind\x20only\x20before\x20first\x20publish),\x20so\x20a\x20wrong\x20venue\x20is\x20an\x20IMMUT-002-class\x20lock-in;\x20unbound\x20services\x20and\x20undefined\x20whitelists\x20skip\x20silently\x20(nothing\x20to\x20compare)','origin':'R-ARB-VENUE-WHITELIST\x20(ktt2/duoduo-maicai\x202026-11-09\x20joint\x20triage\x20—\x20scanner\x20rule\x20R-ARB-VENUE-WHITELIST\x27s\x20publish-face\x20twin)','wired_in':'wrap'},{'id':'SV-RECIPIENT-01','gate':'checkEntityRecipientGate','faces':['service_publish'],'enforcement':'always','defect_class':'R-RECIPIENT-03\x20—\x20a\x20blank/omitted\x20allocator\x20recipient\x20resolves\x20to\x20the\x20DEFAULT\x20LOCAL\x20ACCOUNT,\x20silently\x20routing\x20customer\x20escrow\x20to\x20the\x20builder;\x20blocks\x20rather\x20than\x20warns\x20because\x20order_allocators\x20is\x20L1-immutable\x20after\x20publish\x20(the\x20same\x20gate\x20also\x20covers\x20allocation.allocators)','origin':'R-RECIPIENT-03\x20(direct-sales\x20Entity\x20recipient)','wired_in':'onchain'},{'id':'SV-ALLOCPLAN-01','gate':'checkOrderAllocatorsPrePublish','faces':['service_publish'],'enforcement':'always','defect_class':'R-A-1\x20allocator-plan\x20structural\x20family\x20+\x20R-A-2-03\x20duplicate\x20guards\x20—\x20the\x20subset\x20decidable\x20without\x20Guard\x20table/root\x20evidence\x20blocks;\x20everything\x20else\x20degrades\x20to\x20a\x20warning,\x20and\x20an\x20internal\x20error\x20never\x20blocks\x20(the\x20gate\x20must\x20not\x20become\x20a\x20new\x20failure\x20mode)','origin':'R-A-1\x20/\x20R-A-2-03','wired_in':'onchain'},{'id':'SV-WIPNET-01','gate':'checkSalesWipNetworkDeployment','faces':['service_publish'],'enforcement':'always','defect_class':'a\x20localnet-only\x20WIP\x20is\x20unreachable\x20from\x20testnet/mainnet\x20machines,\x20so\x20every\x20order\x20fails\x20100%\x20—\x20hard-blocked\x20on\x20those\x20networks,\x20advisory\x20on\x20localnet','origin':'WIP-B\x20network\x20calibration','wired_in':'onchain'},{'id':'SV-ZEROPRICE-01','gate':'checkSalesZeroPrice','faces':['service_publish'],'enforcement':'always','defect_class':'F-BS-76\x20—\x20sale()\x20has\x20no\x20price\x20floor\x20so\x20price\x200\x20lists\x20fine,\x20then\x20NOBODY\x20can\x20ever\x20buy\x20it\x20(client\x20zero-total\x20gate\x20and\x20the\x20on-chain\x20zero-total\x20abort\x20both\x20refuse);\x20discovery\x20cost\x20one\x20run\x201\x20679\x20440\x20gas\x20to\x20add\x20and\x20787\x20124\x20to\x20remove','origin':'F-BS-76\x20(bs-mn-261022)','wired_in':'onchain'},{'id':'SV-UMIMS-01','gate':'checkUmContactHasIm','faces':['service_publish'],'enforcement':'always','defect_class':'an\x20empty\x20Contact\x20ims\x20vector\x20leaves\x20pre-order\x20negotiation,\x20customer_required\x20private-info\x20delivery\x20and\x20post-sale\x20support\x20with\x20NO\x20channel\x20—\x20Messenger\x20routes\x20to\x20ims\x20members,\x20so\x20the\x20store\x20publishes\x20unreachable','origin':'on-chain\x20contact\x20ims\x20routing','wired_in':'onchain'},{'id':'SV-AUDITCAT-01','gate':'auditService','faces':['service_publish'],'enforcement':'advisory','defect_class':'audit-rules\x20service\x20catalog\x20(SKIP_RULES-filtered)\x20—\x20NOTE:\x20an\x20`error`-severity\x20finding\x20is\x20pushed\x20as\x20an\x20[AUDIT\x20ERROR]\x20constraintWarning\x20and\x20does\x20NOT\x20block,\x20so\x20the\x20catalog\x27s\x20own\x20severity\x20scale\x20is\x20cosmetic\x20on\x20this\x20face','origin':'audit-rules.ts\x20catalog','wired_in':'onchain'},{'id':'MC-PERMISS-01','gate':'checkMachinePermissionBeforePublish','faces':['machine_publish'],'enforcement':'advisory','defect_class':'a\x20forward\x27s\x20permissionIndex\x20with\x20no\x20entity\x20granted\x20on\x20the\x20bound\x20Permission\x20—\x20the\x20edge\x20is\x20unadvanceable\x20by\x20anyone\x20(advisory\x20because\x20a\x20new\x20Permission\x20may\x20be\x20granted\x20after\x20publish)','origin':'permission-index\x20grant\x20coverage','wired_in':'onchain'},{'id':'MC-ORPHANGUARD-01','gate':'lintMachineGuardBindings','faces':['machine_publish'],'enforcement':'advisory','defect_class':'F-29\x20—\x20the\x20session\x20created\x20Guard\x20object(s)\x20but\x20the\x20publishable\x20graph\x20binds\x20ZERO\x20of\x20them\x20on\x20any\x20forward\x20(the\x20silent-drop\x20shape:\x20$ref\x20pre-evaluated\x20to\x20undefined,\x20JSON.stringify\x20drops\x20the\x20key,\x20publish\x20succeeds,\x20edges\x20freeze\x20unguarded)','origin':'F-29\x20(tv8-tn-261030)','wired_in':'onchain'},{'id':'MC-ANCHORREACH-01','gate':'checkGuardAnchorReachability','faces':['machine_publish'],'enforcement':'advisory','defect_class':'a\x20guard\x20time-anchor\x20that\x20no\x20reachable\x20node\x20ever\x20establishes\x20makes\x20its\x20window\x20unsatisfiable\x20—\x20the\x20guard\x20can\x20never\x20pass,\x20so\x20the\x20rail\x20it\x20gates\x20is\x20dead\x20(Dijkstra\x20over\x20the\x20anchor\x20x\x20node\x20profile)','origin':'guard-anchor-reach.ts','wired_in':'onchain'},{'id':'GD-NODEGATE-01','gate':'lintGuardNodeGates','faces':['guard_binding'],'enforcement':'advisory','defect_class':'guard\x20node-gate\x20advisory\x20on\x20the\x20guard\x20create/update\x20face\x20—\x20a\x20node\x20pin\x20that\x20the\x20intended\x20host\x20machine\x20never\x20enters','origin':'guard\x20node-gate\x20parse\x20(parseGuardNodeGates)','wired_in':'onchain'},{'id':'GD-REWARDONCE-01','gate':'checkRewardOnceArming','faces':['guard_binding'],'enforcement':'advisory','defect_class':'a\x20funded\x20Reward\x20pool\x20whose\x20mounted\x20guard\x20carries\x20no\x20once-stamp\x20is\x20replayable,\x20and\x20the\x20bsw4\x20F-11\x20window-delay\x20advisory\x20rides\x20the\x20same\x20sweep;\x20reward\x20guard_add\x20is\x20a\x20bind\x20face\x20per\x20isGuardBindingOperation','origin':'bsw4\x20F-11\x20/\x20reward\x20replay\x20stamp','wired_in':'onchain'},{'id':'GD-REWARDEVID-01','gate':'verifyRewardEvidenceBindings','faces':['guard_binding'],'enforcement':'advisory','defect_class':'reward\x20evidence\x20bindings\x20that\x20the\x20deployed\x20package\x20drops\x20on\x20read-back\x20—\x20fail-soft,\x20never\x20masks\x20the\x20operation\x27s\x20own\x20outcome','origin':'reward\x20evidence\x20read-back','wired_in':'onchain'},{'id':'SV-REWARDDEADLOCK-01','gate':'lintRewardClaimNodeGateDeadlock','faces':['service_publish'],'enforcement':'always','defect_class':'a\x20pre-funded\x20reward\x27s\x20claim\x20guard\x20pins\x20equality\x20node\x20gates\x20that\x20exclude\x20every\x20reachable\x20evidence-marker\x20node\x20on\x20the\x20same\x20lifecycle\x20branch\x20—\x20the\x20claim\x20either\x20pays\x20without\x20evidence\x20or\x20aborts\x207\x20after\x20the\x20forward\x20(guards\x20are\x20immutable,\x20the\x20binding\x20freezes\x20at\x20publish;\x20machine-graph-unreadable\x20degrades\x20to\x20warning,\x20never\x20guesses)','origin':'O18\x20incident\x20/\x20F-MTW-12\x20(reward-deadlock\x20lint,\x20guard-node-gates.ts)','wired_in':'wrap'}];export const PUBLISH_SURFACE_EXEMPT_GATES={'checkAllocatorRails':'compile-face\x20authority\x20(template\x20path);\x20invoked\x20by\x20the\x20compile\x20pipeline,\x20registered\x20as\x20AUTH-COMPILE-01','auditRepoIntegrityAndCallerLegs':'plan-level\x20repo\x20integrity\x20(plan\x20build\x20face,\x20not\x20the\x20dispatch\x20publish\x20gate)','checkForeignServicePins':'plan-level\x20foreign\x20pin\x20disclosure\x20(plan\x20build\x20face)','checkDaysUnitSlots':'compile\x20normalization\x20check\x20(plan\x20build\x20face)','checkWindowTruncation':'compile\x20normalization\x20check\x20(plan\x20build\x20face)','dropEmptyVecGuards':'compile\x20normalization\x20step\x20(not\x20a\x20gate)','checkProjectStage':'project\x20tool\x20stage\x20hint\x20(wip_file/project\x20face,\x20not\x20publish)','lintAllocatorGuardSet':'internal\x20helper\x20behind\x20lintAllocatorGuards\x20and\x20the\x20pre-buy\x20screening\x20gate','lintTaskBindingAdvisories':'internal\x20helper\x20behind\x20the\x20task-binding\x20advisory\x20family\x20(protocol\x20254)','lintGuard':'guard-lint\x20module\x20entry\x20invoked\x20INSIDE\x20composing\x20lints,\x20not\x20a\x20publish\x20gate\x20itself','lintReviewLockedTerminals':'internal\x20helper\x20behind\x20lintForwardReviewLocks','verifyAllocatorRails':'internal\x20helper\x20behind\x20lintAllocatorRailPairing\x20(single-source\x20verifier\x20core)','verifyArbitrationRulingRails':'internal\x20helper\x20behind\x20lintForwardArbRulingRails\x20(single-source\x20ruling-rail\x20verifier\x20core)','verifyCollectedGuardBindings':'internal\x20helper\x20behind\x20lintGuardBindingSemantics\x20(batch\x20collection)','verifyGuardBinding':'internal\x20helper\x20behind\x20verifyCollectedGuardBindings\x20(single\x20host)','auditGuardRelies':'internal\x20helper\x20inside\x20verifyCollectedGuardBindings\x20(guard-relies\x20audit)','checkEntityRecipients':'internal\x20helper\x20behind\x20checkEntityRecipientGate\x20(registered\x20as\x20SV-RECIPIENT-01)','checkArbitrationVenueOrder':'Arbitration\x20CREATION\x20face\x20(venue\x20ordering\x20findings\x20at\x20arb\x20build),\x20not\x20a\x20Service/Machine\x20publish\x20gate','checkClientSchemaCompatibility':'client\x20schema-version\x20negotiation\x20(schema\x20layer),\x20not\x20a\x20publish\x20gate','checkDiscountFloorBeforeIssue':'discount\x20ISSUANCE\x20face\x20—\x20judged\x20when\x20a\x20discount\x20is\x20created,\x20not\x20at\x20publish','checkDiscountThresholdBeforeBuy':'BUY\x20face\x20—\x20the\x20pre_buy\x20gate\x20(wrap.ts\x20runPreBuyChecks)\x20owns\x20purchase-time\x20screening','verifyGuardFailureLegs':'runtime\x20E_VERIFY_FAILED\x20diagnosis\x20(leg-by-leg\x20replay\x20of\x20a\x20FAILED\x20guard\x20submission),\x20not\x20a\x20pre-publish\x20gate','verifyOrderNewLanded':'post-transaction\x20read-back\x20of\x20an\x20order_new\x20landing,\x20not\x20a\x20pre-publish\x20gate'};export function gatesForFace(a){return PUBLISH_SURFACE_CONTRACT['filter'](b=>b['faces']['includes'](a));}export function blockingGatesForFace(a){return gatesForFace(a)['filter'](b=>b['enforcement']==='always');}
|
|
@@ -136,6 +136,26 @@ export type DualPayoutTrack = {
|
|
|
136
136
|
track: "unknown";
|
|
137
137
|
};
|
|
138
138
|
export declare function classifyDualPayoutTrack(allocators: unknown, guardAddr?: string): DualPayoutTrack;
|
|
139
|
+
export interface RailRecipientSet {
|
|
140
|
+
entityAddresses: string[];
|
|
141
|
+
paysSigner: boolean;
|
|
142
|
+
paysSubmission: boolean;
|
|
143
|
+
readable: boolean;
|
|
144
|
+
}
|
|
145
|
+
export declare function collectRailRecipientSet(allocators: unknown, guardAddr?: string): RailRecipientSet;
|
|
146
|
+
export type CallerEligibilityVerdict = {
|
|
147
|
+
eligible: true;
|
|
148
|
+
basis: string;
|
|
149
|
+
} | {
|
|
150
|
+
eligible: false;
|
|
151
|
+
basis: string;
|
|
152
|
+
};
|
|
153
|
+
export declare function judgeCallerEligibility(input: {
|
|
154
|
+
caller?: string;
|
|
155
|
+
rail: RailRecipientSet;
|
|
156
|
+
orderOwner?: string;
|
|
157
|
+
staffAddresses?: Iterable<string>;
|
|
158
|
+
}): CallerEligibilityVerdict;
|
|
139
159
|
export declare const RECIPIENT_CONSTRAINT_VERSION = "1.2.0";
|
|
140
160
|
export declare function analyzeRecipientConstraints(input: RecipientConstraintInput): RecipientConstraintAudit;
|
|
141
161
|
export declare function derivePayoffFromSharing(sharing: Array<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ValueType}from'@wowok/wowok';import{getGuardQueryByIdOrName}from'../schema/utils/guard-query-utils.js';function asNode(a){if(typeof a!=='object'||a===null)return null;const b=a['type'];return typeof b==='string'?a:null;}function queryMeta(a){if(typeof a!=='number'&&typeof a!=='string')return null;const b=getGuardQueryByIdOrName(a);return b?{'id':b['id'],'name':b['name']}:null;}function childNodes(a){const b=[];if(Array['isArray'](a['nodes']))a['nodes']['forEach'](d=>{const e=asNode(d);if(e)b['push'](e);});if(asNode(a['node']))b['push'](asNode(a['node']));return[a['nodeLeft'],a['nodeRight']]['forEach'](d=>{const e=asNode(d);if(e)b['push'](e);}),b;}export function classifyRecipient(a){if(typeof a!=='object'||a===null)return null;const b=a;if(typeof b['Entity']==='string')return{'kind':'entity','address':b['Entity']};const c=b['Entity'];if(c&&typeof c==='object'&&typeof c['name_or_address']==='string')return{'kind':'entity','address':c['name_or_address']};if(b['Signer']==='signer'||b['Signer']===!![])return{'kind':'signer'};if(typeof b['GuardIdentifier']==='number')return{'kind':'submission','identifier':b['GuardIdentifier']};return null;}export function classifyDualPayoutTrack(a,b){let c=[];if(Array['isArray'](a))c=a;else{if(a&&typeof a==='object'){const f=a['allocators'];if(Array['isArray'](f))c=f;}}const d=[];for(const h of c){if(b){const j=h?.['guard'];if(typeof j!=='string'||j['toLowerCase']()!==b['toLowerCase']())continue;}const i=h?.['sharing'];if(Array['isArray'](i))d['push'](...i);}if(d['length']===0x0)return{'track':'unknown'};const e=[];for(const k of d){const l=k?.['who'],m=classifyRecipient(typeof l==='string'?l==='Signer'?{'Signer':!![]}:{'Entity':l}:l);if(!m||m['kind']==='signer')return{'track':'unknown'};if(m['kind']==='submission')return{'track':'order-directed'};e['push'](m['address']);}return{'track':'entity-directed','recipients':e};}function leafInfo(a,b){if(a['type']==='context'&&typeof a['context']==='string'){if(a['context']==='Signer')return{'kind':'signer'};if(a['context']==='Clock')return{'kind':'clock'};}if(a['type']==='query'){const c=queryMeta(a['query']),d=a['object'];if(c&&d&&typeof d['identifier']==='number')return{'kind':'query','query_name':c['name'],'query_id':c['id'],'object_identifier':d['identifier'],'convert_witness':d['convert_witness']};}if(a['type']==='identifier'){const e=typeof a['identifier']==='number'?a['identifier']:-0x1,f=b['find'](g=>g['identifier']===e);if(f){const g=typeof f['value']==='string'?f['value']:undefined,h=normalizeValueType(f['value_type']);if(h===ValueType['Address'])return{'kind':'static_address','value':g};if(h===ValueType['String'])return{'kind':'static_string','value':g};}}return{'kind':'other'};}function comparisonLeaves(a,b){if(a['type']==='logic_equal'){const c=childNodes(a)['map'](d=>flattenLeaf(d,b));return c;}return[];}function flattenLeaf(a,b){if(a['type']==='logic_not'){const d=childNodes(a)[0x0];return d?flattenLeaf(d,b):{'kind':'other'};}return leafInfo(a,b);}function isOrderProgressWitness(a){if(a===0x64)return!![];return typeof a==='string'&&a['toLowerCase']()['includes']('orderprogress');}function describe(a){switch(a){case'service_binding':return'Submitted\x20object\x20must\x20belong\x20to\x20the\x20expected\x20service';case'progress_node_state':return'Submitted\x20order\x20must\x20be\x20at\x20a\x20qualifying\x20workflow\x20node';case'signer_is_submitted_object_owner':return'Caller\x20must\x20be\x20the\x20owner\x20of\x20the\x20submitted\x20object';case'signer_authorized_entity':return'Caller\x20must\x20equal\x20a\x20fixed\x20authorized\x20address';case'signer_permission_member':return'Caller\x20must\x20satisfy\x20a\x20Permission\x20membership\x20rule';case'time_lock':return'Current\x20time\x20must\x20satisfy\x20the\x20time-lock';case'repository_crosscheck':return'Repository\x20data\x20must\x20satisfy\x20the\x20cross-check';default:return'Other\x20guard\x20constraint';}}function extractConstraints(a,b){const c=[],d=new Set(),e=h=>{const i=h['code']+':'+(h['slot']??'-');!d['has'](i)&&(d['add'](i),c['push'](h));},f=(h,i)=>({'path':h,'queries':i}),g=(h,i)=>{const j=comparisonLeaves(h,b);if(j['length']>=0x2){const k=j['find'](r=>r['kind']==='signer'),l=j['find'](r=>r['kind']==='query'&&r['query_name']==='order.owner'),m=j['find'](r=>r['kind']==='query'&&r['query_name']==='order.service'),n=j['find'](r=>r['kind']==='query'&&r['query_name']==='progress.current'),o=j['find'](r=>r['kind']==='static_address'),p=j['find'](r=>r['kind']==='static_string');k&&l&&e({'code':'signer_is_submitted_object_owner','slot':l['object_identifier'],'description':describe('signer_is_submitted_object_owner'),'caller_constraint':!![],'evidence':f(i,['Signer','order.owner'])});k&&o&&e({'code':'signer_authorized_entity','description':describe('signer_authorized_entity'),'caller_constraint':!![],'evidence':f(i,['Signer'])});m&&o&&e({'code':'service_binding','slot':m['object_identifier'],'description':describe('service_binding'),'caller_constraint':![],'evidence':f(i,['order.service'])});if(n&&p){const r=n['object_identifier'];isOrderProgressWitness(n['convert_witness'])&&e({'code':'progress_node_state','slot':r,'description':describe('progress_node_state'),'caller_constraint':![],'evidence':f(i,['progress.current'])});}}if(h['type']['startsWith']('logic_as_u256')||h['type']==='calc_number_add'){const s=[h,...childNodes(h)]['map'](t=>flattenLeaf(t,b));if(s['some'](t=>t['kind']==='clock')&&s['some'](t=>t['kind']==='query'&&(t['query_name']==='progress.current_time'||t['query_name']==='progress.session.forward.time'))){const t=s['find'](u=>u['kind']==='query');e({'code':'time_lock','slot':t['object_identifier'],'description':describe('time_lock'),'caller_constraint':![],'evidence':f(i,['Clock',t['query_name']])});}}if(h['type']==='query'){const u=queryMeta(h['query']);if(u&&u['name']['startsWith']('repository.')){const v=h['object'];e({'code':'repository_crosscheck','slot':v?.['identifier'],'description':describe('repository_crosscheck'),'caller_constraint':![],'evidence':f(i,[u['name']])});}}childNodes(h)['forEach']((w,x)=>g(w,i+'/'+x));};return g(a,'/root'),c;}function findSessionQueries(a){const b=[],c=(d,e)=>{if(d['type']==='query'){const f=queryMeta(d['query']);if(f&&(f['id']===0x4f6||f['id']===0x4f7))b['push'](e);}childNodes(d)['forEach']((g,h)=>c(g,e+'/'+h));};return c(a,'/root'),b;}function collectSlotUsages(a){const b=[],c=(d,e)=>{if(d['type']==='query'){const f=queryMeta(d['query']),g=d['object'];f&&g&&typeof g['identifier']==='number'&&b['push']({'slot':g['identifier'],'path':e,'query_id':f['id'],'query_name':f['name'],...g['convert_witness']!==undefined?{'convert_witness':g['convert_witness']}:{}});}childNodes(d)['forEach']((h,j)=>c(h,e+'/'+j));};return c(a,'/root'),b;}function deriveReceiptRight(a,b){const c=b['find'](e=>e['code']==='progress_node_state'&&e['slot']===a),d=b['find'](e=>e['code']==='signer_is_submitted_object_owner'&&e['slot']===a);if(c||d)return{'object_type':'order','receive_entry':'owner-side\x20extraction\x20on\x20the\x20order','guarantee':'Delivered\x20funds\x20are\x20owned\x20by\x20the\x20submitted\x20Order;\x20only\x20its\x20current\x20owner\x20can\x20'+'extract\x20them\x20(&mut\x20Order\x20input),\x20and\x20coins\x20transfer\x20to\x20that\x20owner.'};return undefined;}function deriveBeneficialOwner(a,b){switch(a['kind']){case'entity':return'Fixed\x20entity\x20'+a['address'];case'signer':return'Transaction\x20caller\x20(Signer)\x20—\x20direct\x20wallet';case'submission':return b?'Owner\x20of\x20the\x20submitted\x20object\x20at\x20table['+a['identifier']+']\x20(object\x20receipt\x20=\x20owner\x20receipt)':'Address\x20submitted\x20at\x20table['+a['identifier']+']\x20(caller-provided)';}}function buildSlotModels(a,b,c,d){const e=[...new Set(c['map'](f=>f['spec'])['filter'](f=>f['kind']==='submission')['map'](f=>f['identifier']))];return e['map'](f=>{const g=a['find'](p=>p['identifier']===f),h=g?normalizeValueType(g['value_type']):undefined,i=h===ValueType['Address'],j=b['filter'](p=>p['slot']===f),k=c['filter'](p=>p['spec']['kind']==='submission'&&p['spec']['identifier']===f)['map'](p=>p['mode']??'Unknown'),l=d['filter'](p=>p['slot']===undefined||p['slot']===f),m=deriveReceiptRight(f,d),n=l['some'](p=>p['code']==='service_binding'||p['code']==='repository_crosscheck'||p['code']==='signer_permission_member'),o=[];if(h!==undefined&&!i)o['push']('RC-FIND-07');if(!n)o['push']('RC-FIND-02');if(m?.['object_type']==='order')o['push']('RC-FIND-03');return{'identifier':f,'externally_submitted':g?.['b_submission']??!![],...h!==undefined?{'declared_value_type':h}:{},'is_address':i,'usages':j,'recipient_modes':k,'constraints':l,...m?{'receipt':m}:{},'beneficial_owner':deriveBeneficialOwner({'kind':'submission','identifier':f},m),'assessment':{'address_typed':i,'scope_bound':n,'object_receipt':m?.['object_type']==='order'},'findings':o};});}function buildSlotFinding(a,b,c){const d=a['identifier'];switch(b){case'RC-FIND-07':return{'code':b,'severity':'medium','title':'Submission\x20slot\x20'+d+'\x20is\x20not\x20address-typed','explanation':'GuardIdentifier\x20recipients\x20require\x20an\x20address-typed\x20table\x20entry\x20'+'(enforced\x20at\x20allocator\x20registration\x20/\x20ERECIPIENT_IDENTIFIER_NOT_ADDRESS).','evidence_paths':c,'mitigation':'Set\x20the\x20slot\x20value_type\x20to\x20Address,\x20or\x20use\x20an\x20Entity\x20recipient.','unavoidable':![]};case'RC-FIND-02':return{'code':b,'severity':'high','title':'Submission\x20slot\x20'+d+'\x20has\x20no\x20scope\x20binding','explanation':'Nothing\x20constrains\x20which\x20submitted\x20objects/addresses\x20qualify:\x20no\x20'+'service\x20binding,\x20repository\x20cross-check\x20or\x20permission\x20membership.\x20A\x20caller\x20'+'can\x20submit\x20arbitrary\x20qualifying-by-other-conditions\x20inputs.','evidence_paths':c,'mitigation':'Add\x20a\x20constraint\x20binding\x20the\x20slot\x20(e.g.\x20order.service\x20==\x20host\x20service).','unavoidable':![]};case'RC-FIND-03':return{'code':b,'severity':'medium','title':'Cross-allocation\x20settlement\x20residual','explanation':'The\x20submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20Allocation\x20being\x20settled\x20'+'(alloc\x20is\x20permissionless\x20and\x20allocation\x20context\x20is\x20not\x20a\x20Guard\x20input).\x20A\x20'+'caller\x20owning\x20ANY\x20qualifying\x20order\x20can\x20settle\x20OTHER\x20allocations;\x20funds\x20land\x20'+'at\x20the\x20submitted\x20order\x20and\x20are\x20receivable\x20by\x20its\x20owner.\x20Destination\x20is\x20safe\x20'+'(an\x20order\x20owner),\x20allocation\x20choice\x20is\x20the\x20residual.','evidence_paths':c,'mitigation':'Pick\x20ONE\x20resolution\x20and\x20record\x20it\x20in\x20the\x20service\x20description:\x20'+'(1)\x20competition\x20semantics\x20—\x20declare\x20that\x20any\x20qualifying\x20order\x20may\x20settle\x20'+'this\x20allocation\x20and\x20cap\x20the\x20exposure\x20(sharing\x20threshold\x20/\x20max\x20amount);\x20'+'(2)\x20Entity\x20routing\x20—\x20use\x20a\x20fixed\x20Entity\x20(treasury)\x20recipient,\x20the\x20only\x20'+'exclusive\x20choice\x20on\x20the\x20automatic\x20order_allocators\x20route\x20(trust\x20shifts\x20to\x20'+'the\x20entity\x20operator);\x20'+'(3)\x20per-order\x20pinned\x20Guards\x20—\x20abandon\x20automatic\x20order_allocators\x20and\x20attach\x20'+'a\x20per-order\x20Guard\x20pinning\x20the\x20order\x20id\x20(order.owner\x20==\x20constant),\x20the\x20'+'trustless\x20exclusive\x20route.','unavoidable':!![],'resolution_required':!![]};default:return{'code':b,'severity':'low','title':'Slot\x20'+d+'\x20finding\x20'+b,'explanation':'','evidence_paths':c,'mitigation':'','unavoidable':![]};}}function buildFindings(a,b){const c=[];let d=![],e=![];for(const f of b){const g=f['recipients']['flatMap'](h=>h['constraints'])['filter'](h=>h['caller_constraint']);if(g['length']>0x0)d=!![];if(f['slots']['some'](h=>h['assessment']['scope_bound']))e=!![];for(const h of f['recipients']){const i=h['constraints']['map'](j=>j['evidence']['path']);h['spec']['kind']==='signer'&&g['length']===0x0&&c['push']({'code':'RC-FIND-01','severity':'critical','title':'Signer\x20recipient\x20without\x20caller\x20constraint\x20—\x20fund\x20theft','explanation':'Funds\x20are\x20delivered\x20directly\x20to\x20the\x20transaction\x20caller,\x20but\x20the\x20Guard\x20'+'does\x20not\x20bind\x20the\x20Signer\x20to\x20an\x20authorized\x20identity.\x20Anyone\x20who\x20satisfies\x20the\x20'+'other\x20conditions\x20steals\x20the\x20funds.','evidence_paths':i,'mitigation':'Bind\x20the\x20Signer\x20(signer==order.owner\x20or\x20signer==fixed\x20address),\x20or\x20change\x20'+'the\x20recipient\x20to\x20an\x20Entity\x20/\x20submitted\x20object\x20slot.','unavoidable':![]});}for(const j of f['slots']){const k=j['constraints']['map'](l=>l['evidence']['path']);for(const l of j['findings']){c['push'](buildSlotFinding(j,l,k));}}a['trigger_source']==='service_order_allocators'&&f['recipients']['length']>0x0&&!f['recipients']['some'](m=>m['spec']['kind']==='submission')&&c['push']({'code':'RC-FIND-09','severity':'low','title':'Allocator\x20Guard\x20'+f['guard']+'\x20has\x20no\x20GuardIdentifier\x20sharing\x20row\x20—\x20bound\x20to\x20no\x20particular\x20order','explanation':'Every\x20sharing\x20row\x20is\x20a\x20fixed\x20recipient\x20(Entity/Signer),\x20which\x20resolves\x20no\x20'+'submission.\x20The\x20Guard\x20therefore\x20cannot\x20read\x20the\x20paying\x20order\x20(order.*\x20queries\x20have\x20'+'no\x20binding\x20target),\x20and\x20the\x20allocation\x20pays\x20the\x20same\x20fixed\x20destinations\x20for\x20EVERY\x20order.\x20'+'This\x20is\x20often\x20intended\x20—\x20confirm\x20it\x20is.','evidence_paths':[],'mitigation':'If\x20the\x20Guard\x20should\x20distinguish\x20orders,\x20add\x20a\x20zero-share\x20{GuardIdentifier:\x200}\x20'+'anchor\x20row\x20(Rate\x200)\x20so\x20the\x20Identifier\x20slot\x20resolves\x20to\x20the\x20paying\x20order\x20'+'(pattern.allocator_order_anchor).\x20If\x20fixed-pay\x20is\x20intended,\x20no\x20action.','unavoidable':![]});}a['trigger_source']==='standalone'&&!d&&c['push']({'code':'RC-FIND-04','severity':'high','title':'Standalone\x20allocation\x20without\x20issuer\x20identity\x20constraint','explanation':'Standalone\x20allocations\x20have\x20no\x20Service/Arbitration\x20access-control\x20layer.\x20'+'Without\x20a\x20Signer/permission\x20binding\x20in\x20the\x20Guard,\x20anyone\x20can\x20trigger\x20distribution.','evidence_paths':[],'mitigation':'Bind\x20the\x20issuer\x20(Signer==owner/admin)\x20or\x20move\x20the\x20allocation\x20into\x20a\x20Service.','unavoidable':![]});c['push']({'code':'RC-FIND-06','severity':'low','title':'Permissionless\x20alloc\x20—\x20forced\x20settlement\x20timing','explanation':'Once\x20the\x20Guard\x27s\x20conditions\x20are\x20satisfiable,\x20anyone\x20can\x20trigger\x20settlement\x20of\x20an\x20'+'order\x27s\x20allocation.\x20With\x20Entity/object\x20recipients\x20this\x20affects\x20timing\x20only,\x20not\x20destination.','evidence_paths':[],'mitigation':'Monitor\x20settlements;\x20constrain\x20time-sensitivity\x20via\x20Guard\x20conditions.','unavoidable':!![]});for(const [m,n]of Object['entries'](a['guards']??{})){const o=asNode(n['root']);if(!o)continue;for(const q of findSessionQueries(o)){c['push']({'code':'RC-FIND-05','severity':'medium','title':'Guard\x20'+m+'\x20uses\x20session-only\x20query\x20at\x20'+q,'explanation':'Queries\x201270/1271\x20read\x20the\x20active\x20session;\x20after\x20the\x20session\x20migrates\x20to\x20'+'history\x20the\x20query\x20aborts\x20(W_FIELD_NOT_FOUND)\x20and\x20the\x20Guard\x20permanently\x20fails.','evidence_paths':[q],'mitigation':'Use\x20progress.current_time\x20(1272)\x20or\x20history\x20queries\x20(1274-1280).','unavoidable':![]});}}for(const [s,t]of Object['entries'](a['guards']??{})){const u=(t['relies']??[])['filter'](v=>typeof v==='string'&&v);if(u['length']===0x0)continue;c['push']({'code':'RC-FIND-08','severity':'low','title':'Guard\x20'+s+'\x20relies\x20on\x20'+u['length']+'\x20sub-guard(s)\x20—\x20not\x20credited\x20by\x20this\x20audit','explanation':'Guard\x20composition\x20(relies,\x20one\x20level,\x20≤4,\x20'+((t['relies_logic_and']===![]?'OR':'AND')+'-logic)\x20may\x20carry\x20the\x20scope/signer\x20')+'constraints\x20in\x20the\x20relied\x20sub-guards.\x20This\x20audit\x20evaluates\x20only\x20the\x20guard\x27s\x20own\x20root:\x20'+'sub-guard\x20constraints\x20are\x20NOT\x20credited,\x20so\x20scope-binding\x20gaps\x20(RC-FIND-02)\x20may\x20be\x20'+'over-reported\x20and\x20sub-guard-only\x20conditions\x20stay\x20unverified.','evidence_paths':u,'mitigation':'Resolve\x20the\x20relied\x20sub-guards\x20and\x20verify\x20their\x20constraints\x20manually,\x20or\x20re-run\x20'+'with\x20the\x20sub-guard\x20defs\x20included\x20(read-side\x20resolvers\x20attach\x20them\x20automatically).','unavoidable':![]});}if(!e&&a['trigger_source']==='service_order_allocators'){}return c;}function buildPayoff(a,b){const c=a['recipients']['some'](h=>h['constraints']['some'](i=>i['caller_constraint'])),d=c?'Caller\x20must\x20satisfy\x20the\x20Guard\x27s\x20Signer/identity\x20binding':b==='standalone'?'Any\x20caller\x20(no\x20identity\x20binding)':'Any\x20caller\x20who\x20satisfies\x20the\x20Guard\x27s\x20object/state\x20conditions',e=a['recipients']['map'](h=>h['beneficial_owner'])['join'](';\x20')||'(none)',f={},g=a['recipients']['some'](h=>h['spec']['kind']==='signer'&&!c);return f['caller']=g?'gains':c?'conditional':'neutral',f['provider']=a['recipients']['some'](h=>h['spec']['kind']==='entity')?'gains':'conditional',f['customer']=a['recipients']['some'](h=>h['receipt']?.['object_type']==='order')?'conditional':'neutral',f['system']='neutral',{'caller_eligibility':d,'beneficial_recipient':e,'positions':f};}export const RECIPIENT_CONSTRAINT_VERSION='1.2.0';export function analyzeRecipientConstraints(a){const b=a['allocators']['map'](h=>{const i=a['guards']?.[h['guard']],j=asNode(i?.['root']),k=i?.['table']??[],l=j?extractConstraints(j,k):[],m=j?collectSlotUsages(j):[],n=h['sharing']['map'](q=>{const r=classifyRecipient(q['who']);if(!r)return{'spec':{'kind':'entity','address':'(unclassifiable)'},'constraints':l,'beneficial_owner':'Unclassifiable\x20recipient\x20—\x20check\x20allocator\x20config'};const t=r['kind']==='submission'?r['identifier']:undefined,u=t!==undefined?k['find'](w=>w['identifier']===t):undefined,v=t!==undefined?deriveReceiptRight(t,l):undefined;return{'spec':r,'slot_value_type':u?normalizeValueType(u['value_type']):undefined,'constraints':t!==undefined?l['filter'](w=>w['slot']===undefined||w['slot']===t):l,'receipt':v,'beneficial_owner':deriveBeneficialOwner(r,v)};}),o=buildSlotModels(k,m,h['sharing']['map'](q=>({'spec':classifyRecipient(q['who'])??{'kind':'entity','address':'(unclassifiable)'},'mode':q['mode']})),l),p={'guard':h['guard'],'recipients':n,'slots':o,'payoff':{'caller_eligibility':'','beneficial_recipient':'','positions':{}}};return p['payoff']=buildPayoff(p,a['trigger_source']),p;}),c=buildFindings(a,b),d=c['some'](h=>h['severity']==='critical')?'critical':c['some'](h=>h['severity']==='high')?'high':c['some'](h=>h['severity']==='medium')?'medium':'low',e=!c['some'](h=>h['code']==='RC-FIND-01'),f=c['some'](h=>h['resolution_required']),g=[{'code':'RC-FIND-03','title':'Cross-allocation\x20settlement','detail':'Submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20settled\x20allocation;\x20destination\x20stays\x20at\x20an\x20order\x20owner.'},{'code':'RC-FIND-06','title':'Forced\x20settlement\x20timing','detail':'alloc\x20is\x20permissionless;\x20settlement\x20can\x20be\x20triggered\x20by\x20anyone\x20once\x20conditions\x20hold.'},{'code':'RC-RES-01','title':'Published\x20immutability','detail':'order_allocators,\x20Machine\x20and\x20Guards\x20are\x20immutable\x20after\x20publish.'},{'code':'RC-RES-03','title':'Off-chain\x20arbitration\x20backstop','detail':'No\x20on-chain\x20clawback;\x20post-incident\x20recovery\x20relies\x20on\x20arbitration.'}];return{'version':RECIPIENT_CONSTRAINT_VERSION,'scope':{'trigger_source':a['trigger_source'],'host_service':a['host_service'],'allocation':a['allocation']},'allocators':b,'findings':c,'unavoidable':g,'safe_destination':e,'resolution_required':f,'overall':d,'summary':'Analyzed\x20'+b['length']+'\x20allocator(s):\x20'+c['filter'](h=>!h['unavoidable'])['length']+'\x20actionable,\x20'+(c['filter'](h=>h['unavoidable'])['length']+'\x20structural\x20finding(s).\x20Safe\x20destination:\x20'+e+'.')+(''+(f?'\x20Resolution\x20REQUIRED:\x20at\x20least\x20one\x20residual\x20demands\x20an\x20explicit\x20design\x20decision\x20before\x20publish.':''))};}export function derivePayoffFromSharing(a,b,c){const d=asNode(c?.['root']),e=c?.['table']??[],f=d?extractConstraints(d,e):[],g=a['map'](i=>{const j=classifyRecipient(i['who'])??{'kind':'entity','address':'(unclassifiable)'},k=j['kind']==='submission'?j['identifier']:undefined,l=k!==undefined?e['find'](n=>n['identifier']===k):undefined,m=k!==undefined?deriveReceiptRight(k,f):undefined;return{'spec':j,'slot_value_type':l?normalizeValueType(l['value_type']):undefined,'constraints':k!==undefined?f['filter'](n=>n['slot']===undefined||n['slot']===k):f,'receipt':m,'beneficial_owner':deriveBeneficialOwner(j,m)};}),h={'guard':'','recipients':g,'slots':[],'payoff':{'caller_eligibility':'','beneficial_recipient':'','positions':{}}};return buildPayoff(h,b);}function normalizeValueType(a){if(typeof a==='number')return a;const b={'bool':ValueType['Bool'],'address':ValueType['Address'],'string':ValueType['String'],'u64':ValueType['U64'],'u256':ValueType['U256']};return b[a['toLowerCase']()];}export function isUnboundSignerTheft(a){return a['recipient_is_signer']&&!a['caller_identity_constrained'];}export function canonicalDoctrine(a){switch(a){case'RC-FIND-01':return{'severity':'critical','title':'Signer\x20recipient\x20without\x20caller\x20constraint\x20—\x20fund\x20theft','mitigation':'Bind\x20the\x20Signer\x20(signer==order.owner\x20or\x20signer==fixed\x20address),\x20or\x20change\x20'+'the\x20recipient\x20to\x20an\x20Entity\x20/\x20submitted\x20object\x20slot.'};case'RC-FIND-03':return{'severity':'medium','title':'Cross-allocation\x20settlement\x20residual','mitigation':'Pick\x20ONE\x20resolution\x20and\x20record\x20it\x20in\x20the\x20service\x20description:\x20'+'(1)\x20competition\x20semantics\x20with\x20capped\x20exposure\x20(threshold\x20/\x20max\x20amount);\x20'+'(2)\x20Entity\x20routing\x20(treasury)\x20—\x20the\x20only\x20exclusive\x20choice\x20on\x20the\x20automatic\x20'+'order_allocators\x20route;\x20'+'(3)\x20per-order\x20pinned\x20Guards\x20(order.owner\x20==\x20constant)\x20—\x20the\x20trustless\x20'+'exclusive\x20route.','resolution_required':!![]};case'RC-FIND-06':return{'severity':'low','title':'Permissionless\x20alloc\x20—\x20forced\x20settlement\x20timing','mitigation':'Monitor\x20settlements;\x20constrain\x20time-sensitivity\x20via\x20Guard\x20conditions.'};}}export const RECIPIENT_DESIGN_OPTIONS=[{'id':'entity','move_recipient':'Recipient::Entity(address)','semantics':'Funds\x20flow\x20to\x20a\x20fixed\x20address\x20(a\x20constrained\x20user\x20account\x20/\x20treasury).\x20'+'Destination\x20never\x20depends\x20on\x20the\x20caller.','required_constraints':['The\x20address\x20is\x20chosen\x20at\x20design\x20time\x20and\x20recorded\x20in\x20the\x20allocator\x20table.']},{'id':'submitted_object','move_recipient':'Recipient::GuardIdentifier(u8)','semantics':'Funds\x20flow\x20to\x20the\x20object\x20submitted\x20under\x20protocol\x20context\x20(e.g.\x20the\x20order\x20being\x20settled).\x20'+'Receivable\x20only\x20by\x20that\x20object\x27s\x20owner\x20—\x20object\x20receipt\x20=\x20owner\x20receipt.','required_constraints':['The\x20Guard\x20binds\x20the\x20submission\x27s\x20scope\x20(which\x20query/object\x20type\x20the\x20slot\x20carries).','The\x20slot\x27s\x20table\x20value\x20type\x20is\x20address\x20(enforced\x20at\x20allocator\x20registration).'],'finding_if_unmet':'RC-FIND-02\x20/\x20RC-FIND-07'},{'id':'signer','move_recipient':'Recipient::Signer','semantics':'Funds\x20flow\x20to\x20the\x20caller\x20who\x20executes\x20the\x20permissionless\x20alloc.\x20'+'Safe\x20only\x20when\x20the\x20Guard\x20proves\x20exactly\x20who\x20the\x20caller\x20may\x20be.','required_constraints':['The\x20Guard\x20constrains\x20the\x20Signer\x20identity\x20(signer\x20==\x20a\x20fixed\x20address\x20or\x20a\x20derived\x20legitimate\x20owner).'],'finding_if_unmet':'RC-FIND-01'},{'id':'constrained_submission','move_recipient':'Recipient::GuardIdentifier(u8)','semantics':'Funds\x20flow\x20to\x20an\x20object\x20address\x20supplied\x20by\x20the\x20signer,\x20but\x20the\x20Guard\x20constrains\x20'+'both\x20the\x20submission\x20scope\x20and\x20the\x20signer\x27s\x20relation\x20to\x20it\x20(e.g.\x20the\x20signer\x20owns\x20the\x20submitted\x20order).','required_constraints':['The\x20Guard\x20binds\x20the\x20submission\x27s\x20scope\x20(object/query\x20type).','The\x20Guard\x20binds\x20the\x20signer\x20to\x20the\x20submitted\x20object.','The\x20slot\x27s\x20table\x20value\x20type\x20is\x20address\x20(enforced\x20at\x20allocator\x20registration).'],'finding_if_unmet':'RC-FIND-01\x20/\x20RC-FIND-02\x20/\x20RC-FIND-07'}];export function recipientDesignGuidance(){return RECIPIENT_DESIGN_OPTIONS;}export const OBJECT_DRIVEABILITY=[{'object_type':'order','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20order','owner-side\x20object\x20extraction\x20from\x20the\x20order'],'anyone_drivable':!![],'funds_settle_to':'order.owner','rationale':'Order\x20is\x20a\x20shared\x20object\x20and\x20extraction\x20has\x20no\x20signer\x20gate;\x20'+'Receiving\x20is\x20restricted\x20to\x20objects\x20actually\x20delivered\x20to\x20that\x20order,\x20and\x20coins\x20settle\x20to\x20its\x20owner.'},{'object_type':'permission','receive_entries':['owner-side\x20coin\x20extraction\x20via\x20the\x20permission\x20object','owner-side\x20object\x20extraction\x20via\x20the\x20permission\x20object'],'anyone_drivable':!![],'funds_settle_to':'permission.owner','rationale':'Permission\x20is\x20the\x20final\x20authority;\x20anyone\x20can\x20drive\x20extraction\x20of\x20funds\x20sent\x20to\x20its\x20address,\x20but\x20the\x20destination\x20is\x20its\x20owner.'},{'object_type':'service','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20service','owner-side\x20object\x20extraction\x20from\x20the\x20service'],'anyone_drivable':![],'permission_index':0x13f,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20319);\x20members\x20drive,\x20value\x20settles\x20to\x20the\x20organization\x20owner.'},{'object_type':'treasury','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20treasury','owner-side\x20object\x20extraction\x20from\x20the\x20treasury'],'anyone_drivable':![],'permission_index':0x101,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20257).'},{'object_type':'arbitration','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20arbitration','owner-side\x20object\x20extraction\x20from\x20the\x20arbitration'],'anyone_drivable':![],'permission_index':0x16f,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20367).'},{'object_type':'machine','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20machine','owner-side\x20object\x20extraction\x20from\x20the\x20machine'],'anyone_drivable':![],'permission_index':0xcf,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20207).'},{'object_type':'progress','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20progress','owner-side\x20object\x20extraction\x20from\x20the\x20progress'],'anyone_drivable':![],'permission_index':0xe1,'funds_settle_to':'machine\x27s\x20permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20225),\x20scoped\x20to\x20the\x20Machine\x20permission.'},{'object_type':'demand','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20demand','owner-side\x20object\x20extraction\x20from\x20the\x20demand'],'anyone_drivable':![],'permission_index':0x197,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20407).'},{'object_type':'contact','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20contact','owner-side\x20object\x20extraction\x20from\x20the\x20contact'],'anyone_drivable':![],'permission_index':0x1c6,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20454).'}];export function driveabilityOf(a){return OBJECT_DRIVEABILITY['find'](b=>b['object_type']===a);}function rewardRecipientKind(a){if(typeof a==='string'){const e=a['toLowerCase']();if(e==='signer')return{'kind':'signer'};return{'kind':'entity'};}if(typeof a!=='object'||a===null)return{'kind':'entity'};const b=a,c=f=>typeof b[f]==='number'?b[f]:undefined,d=c('GuardIdentifier')??c('guard_identifier')??c('identifier');if(d!==undefined)return{'kind':'submission','slot':d};if(b['Signer']!==undefined||b['signer']!==undefined)return{'kind':'signer'};return{'kind':'entity'};}const SLOT_BINDING_CODES=new Set(['service_binding','progress_node_state','signer_is_submitted_object_owner','repository_crosscheck','signer_permission_member']);export function analyzeRewardClaimGuard(a){const {kind:b,slot:c}=rewardRecipientKind(a['recipient']),d={'entry_index':a['entry_index'],'guard':a['guard'],'recipient_kind':b,...c!==undefined?{'recipient_slot':c}:{},'guard_resolved':![],'constraint_codes':[],'recipient_slot_usages':0x0,'caller_identity_constrained':![],'viability':'unverifiable','reason':'Guard\x20table/root\x20not\x20fetched\x20with\x20the\x20topology\x20—\x20the\x20deciding\x20predicate\x20is\x20outside\x20the\x20evidence;\x20the\x20owner\x20must\x20disclose\x20the\x20full\x20guard\x20definitions.'},e=asNode(a['guard_def']?.['root']);if(!e)return d;const f=a['guard_def']?.['table']??[],g=extractConstraints(e,f);d['guard_resolved']=!![],d['constraint_codes']=g['map'](k=>k['code']),d['caller_identity_constrained']=g['some'](k=>k['caller_constraint']);if(b==='entity')return d['viability']='blocked',d['reason']='Payout\x20address\x20is\x20fixed\x20at\x20guard\x20registration\x20(Entity\x20recipient);\x20the\x20claim\x20path\x20cannot\x20redirect\x20it.',d;if(b==='signer')return d['caller_identity_constrained']?(d['viability']='blocked',d['reason']='Recipient\x20is\x20the\x20caller\x20(Signer)\x20but\x20the\x20guard\x20binds\x20the\x20caller\x20identity\x20—\x20only\x20the\x20authorized\x20party\x20can\x20claim.'):(d['viability']='viable',d['reason']='Recipient\x20is\x20the\x20caller\x20(Signer)\x20with\x20no\x20identity\x20binding\x20—\x20anyone\x20satisfying\x20the\x20remaining\x20conditions\x20claims\x20to\x20their\x20own\x20address.'),d;const h=c??-0x1,i=collectSlotUsages(e)['filter'](k=>k['slot']===h);d['recipient_slot_usages']=i['length'];const j=g['filter'](k=>k['slot']===h&&SLOT_BINDING_CODES['has'](k['code']));if(j['length']>0x0)d['viability']='blocked',d['reason']='Submitted\x20address\x20is\x20constrained\x20inside\x20the\x20guard\x20('+j['map'](k=>k['code'])['join'](',\x20')+')\x20—\x20a\x20passerby\x20cannot\x20fill\x20the\x20slot\x20with\x20an\x20arbitrary\x20address.';else i['length']>0x0?(d['viability']='conditional',d['reason']='The\x20guard\x20reads\x20the\x20submitted\x20slot\x20('+i['length']+'\x20query\x20usage(s))\x20but\x20no\x20recognized\x20scope/equality\x20constraint\x20was\x20matched\x20—\x20manual\x20predicate\x20review\x20required.'):(d['viability']='viable',d['reason']='No\x20guard\x20query\x20consumes\x20the\x20submitted\x20slot\x20—\x20the\x20predicate\x20cannot\x20constrain\x20the\x20payout\x20address;\x20any\x20passing\x20party\x20claims\x20to\x20their\x20own\x20address.');return d;}
|
|
1
|
+
import{ValueType}from'@wowok/wowok';import{getGuardQueryByIdOrName}from'../schema/utils/guard-query-utils.js';function asNode(a){if(typeof a!=='object'||a===null)return null;const b=a['type'];return typeof b==='string'?a:null;}function queryMeta(a){if(typeof a!=='number'&&typeof a!=='string')return null;const b=getGuardQueryByIdOrName(a);return b?{'id':b['id'],'name':b['name']}:null;}function childNodes(a){const b=[];if(Array['isArray'](a['nodes']))a['nodes']['forEach'](d=>{const e=asNode(d);if(e)b['push'](e);});if(asNode(a['node']))b['push'](asNode(a['node']));return[a['nodeLeft'],a['nodeRight']]['forEach'](d=>{const e=asNode(d);if(e)b['push'](e);}),b;}export function classifyRecipient(a){if(typeof a!=='object'||a===null)return null;const b=a;if(typeof b['Entity']==='string')return{'kind':'entity','address':b['Entity']};const c=b['Entity'];if(c&&typeof c==='object'&&typeof c['name_or_address']==='string')return{'kind':'entity','address':c['name_or_address']};if(b['Signer']==='signer'||b['Signer']===!![])return{'kind':'signer'};if(typeof b['GuardIdentifier']==='number')return{'kind':'submission','identifier':b['GuardIdentifier']};return null;}export function classifyDualPayoutTrack(a,b){let c=[];if(Array['isArray'](a))c=a;else{if(a&&typeof a==='object'){const f=a['allocators'];if(Array['isArray'](f))c=f;}}const d=[];for(const h of c){if(b){const j=h?.['guard'];if(typeof j!=='string'||j['toLowerCase']()!==b['toLowerCase']())continue;}const i=h?.['sharing'];if(Array['isArray'](i))d['push'](...i);}if(d['length']===0x0)return{'track':'unknown'};const e=[];for(const k of d){const l=k?.['who'],m=classifyRecipient(typeof l==='string'?l==='Signer'?{'Signer':!![]}:{'Entity':l}:l);if(!m||m['kind']==='signer')return{'track':'unknown'};if(m['kind']==='submission')return{'track':'order-directed'};e['push'](m['address']);}return{'track':'entity-directed','recipients':e};}export function collectRailRecipientSet(a,b){let c=[];if(Array['isArray'](a))c=a;else{if(a&&typeof a==='object'){const f=a['allocators'];if(Array['isArray'](f))c=f;}}const d={'entityAddresses':[],'paysSigner':![],'paysSubmission':![],'readable':![]};let e=![];for(const h of c){if(b){const j=h?.['guard'];if(typeof j!=='string'||j['toLowerCase']()!==b['toLowerCase']())continue;}const i=h?.['sharing'];if(!Array['isArray'](i))continue;for(const k of i){const l=k?.['who'],m=classifyRecipient(typeof l==='string'?l==='Signer'?{'Signer':!![]}:{'Entity':l}:l);if(!m)continue;e=!![];if(m['kind']==='entity')d['entityAddresses']['push'](m['address']);else{if(m['kind']==='signer')d['paysSigner']=!![];else d['paysSubmission']=!![];}}}return d['readable']=e,d;}export function judgeCallerEligibility(a){const {caller:b,rail:c}=a;if(!b)return{'eligible':!![],'basis':'caller_unresolved_fail_open'};if(!c['readable'])return{'eligible':!![],'basis':'rail_unreadable_fail_open'};if(c['paysSigner'])return{'eligible':!![],'basis':'signer_rail_pays_caller'};const d=(e,f)=>typeof f==='string'&&e['toLowerCase']()===f['toLowerCase']();if(c['entityAddresses']['some'](e=>d(e,b)))return{'eligible':!![],'basis':'rail_entity_recipient'};if(d(b,a['orderOwner']))return{'eligible':!![],'basis':'order_owner'};for(const e of a['staffAddresses']??[]){if(d(e,b))return{'eligible':!![],'basis':'staff_or_permission_entity'};}return{'eligible':![],'basis':'outsider_trigger'};}function leafInfo(a,b){if(a['type']==='context'&&typeof a['context']==='string'){if(a['context']==='Signer')return{'kind':'signer'};if(a['context']==='Clock')return{'kind':'clock'};}if(a['type']==='query'){const c=queryMeta(a['query']),d=a['object'];if(c&&d&&typeof d['identifier']==='number')return{'kind':'query','query_name':c['name'],'query_id':c['id'],'object_identifier':d['identifier'],'convert_witness':d['convert_witness']};}if(a['type']==='identifier'){const e=typeof a['identifier']==='number'?a['identifier']:-0x1,f=b['find'](g=>g['identifier']===e);if(f){const g=typeof f['value']==='string'?f['value']:undefined,h=normalizeValueType(f['value_type']);if(h===ValueType['Address'])return{'kind':'static_address','value':g};if(h===ValueType['String'])return{'kind':'static_string','value':g};}}return{'kind':'other'};}function comparisonLeaves(a,b){if(a['type']==='logic_equal'){const c=childNodes(a)['map'](d=>flattenLeaf(d,b));return c;}return[];}function flattenLeaf(a,b){if(a['type']==='logic_not'){const d=childNodes(a)[0x0];return d?flattenLeaf(d,b):{'kind':'other'};}return leafInfo(a,b);}function isOrderProgressWitness(a){if(a===0x64)return!![];return typeof a==='string'&&a['toLowerCase']()['includes']('orderprogress');}function describe(a){switch(a){case'service_binding':return'Submitted\x20object\x20must\x20belong\x20to\x20the\x20expected\x20service';case'progress_node_state':return'Submitted\x20order\x20must\x20be\x20at\x20a\x20qualifying\x20workflow\x20node';case'signer_is_submitted_object_owner':return'Caller\x20must\x20be\x20the\x20owner\x20of\x20the\x20submitted\x20object';case'signer_authorized_entity':return'Caller\x20must\x20equal\x20a\x20fixed\x20authorized\x20address';case'signer_permission_member':return'Caller\x20must\x20satisfy\x20a\x20Permission\x20membership\x20rule';case'time_lock':return'Current\x20time\x20must\x20satisfy\x20the\x20time-lock';case'repository_crosscheck':return'Repository\x20data\x20must\x20satisfy\x20the\x20cross-check';default:return'Other\x20guard\x20constraint';}}function extractConstraints(a,b){const c=[],d=new Set(),e=h=>{const i=h['code']+':'+(h['slot']??'-');!d['has'](i)&&(d['add'](i),c['push'](h));},f=(h,i)=>({'path':h,'queries':i}),g=(h,i)=>{const j=comparisonLeaves(h,b);if(j['length']>=0x2){const k=j['find'](r=>r['kind']==='signer'),l=j['find'](r=>r['kind']==='query'&&r['query_name']==='order.owner'),m=j['find'](r=>r['kind']==='query'&&r['query_name']==='order.service'),n=j['find'](r=>r['kind']==='query'&&r['query_name']==='progress.current'),o=j['find'](r=>r['kind']==='static_address'),p=j['find'](r=>r['kind']==='static_string');k&&l&&e({'code':'signer_is_submitted_object_owner','slot':l['object_identifier'],'description':describe('signer_is_submitted_object_owner'),'caller_constraint':!![],'evidence':f(i,['Signer','order.owner'])});k&&o&&e({'code':'signer_authorized_entity','description':describe('signer_authorized_entity'),'caller_constraint':!![],'evidence':f(i,['Signer'])});m&&o&&e({'code':'service_binding','slot':m['object_identifier'],'description':describe('service_binding'),'caller_constraint':![],'evidence':f(i,['order.service'])});if(n&&p){const r=n['object_identifier'];isOrderProgressWitness(n['convert_witness'])&&e({'code':'progress_node_state','slot':r,'description':describe('progress_node_state'),'caller_constraint':![],'evidence':f(i,['progress.current'])});}}if(h['type']['startsWith']('logic_as_u256')||h['type']==='calc_number_add'){const s=[h,...childNodes(h)]['map'](t=>flattenLeaf(t,b));if(s['some'](t=>t['kind']==='clock')&&s['some'](t=>t['kind']==='query'&&(t['query_name']==='progress.current_time'||t['query_name']==='progress.session.forward.time'))){const t=s['find'](u=>u['kind']==='query');e({'code':'time_lock','slot':t['object_identifier'],'description':describe('time_lock'),'caller_constraint':![],'evidence':f(i,['Clock',t['query_name']])});}}if(h['type']==='query'){const u=queryMeta(h['query']);if(u&&u['name']['startsWith']('repository.')){const v=h['object'];e({'code':'repository_crosscheck','slot':v?.['identifier'],'description':describe('repository_crosscheck'),'caller_constraint':![],'evidence':f(i,[u['name']])});}}childNodes(h)['forEach']((w,x)=>g(w,i+'/'+x));};return g(a,'/root'),c;}function findSessionQueries(a){const b=[],c=(d,e)=>{if(d['type']==='query'){const f=queryMeta(d['query']);if(f&&(f['id']===0x4f6||f['id']===0x4f7))b['push'](e);}childNodes(d)['forEach']((g,h)=>c(g,e+'/'+h));};return c(a,'/root'),b;}function collectSlotUsages(a){const b=[],c=(d,e)=>{if(d['type']==='query'){const f=queryMeta(d['query']),g=d['object'];f&&g&&typeof g['identifier']==='number'&&b['push']({'slot':g['identifier'],'path':e,'query_id':f['id'],'query_name':f['name'],...g['convert_witness']!==undefined?{'convert_witness':g['convert_witness']}:{}});}childNodes(d)['forEach']((h,j)=>c(h,e+'/'+j));};return c(a,'/root'),b;}function deriveReceiptRight(a,b){const c=b['find'](e=>e['code']==='progress_node_state'&&e['slot']===a),d=b['find'](e=>e['code']==='signer_is_submitted_object_owner'&&e['slot']===a);if(c||d)return{'object_type':'order','receive_entry':'owner-side\x20extraction\x20on\x20the\x20order','guarantee':'Delivered\x20funds\x20are\x20owned\x20by\x20the\x20submitted\x20Order;\x20only\x20its\x20current\x20owner\x20can\x20'+'extract\x20them\x20(&mut\x20Order\x20input),\x20and\x20coins\x20transfer\x20to\x20that\x20owner.'};return undefined;}function deriveBeneficialOwner(a,b){switch(a['kind']){case'entity':return'Fixed\x20entity\x20'+a['address'];case'signer':return'Transaction\x20caller\x20(Signer)\x20—\x20direct\x20wallet';case'submission':return b?'Owner\x20of\x20the\x20submitted\x20object\x20at\x20table['+a['identifier']+']\x20(object\x20receipt\x20=\x20owner\x20receipt)':'Address\x20submitted\x20at\x20table['+a['identifier']+']\x20(caller-provided)';}}function buildSlotModels(a,b,c,d){const e=[...new Set(c['map'](f=>f['spec'])['filter'](f=>f['kind']==='submission')['map'](f=>f['identifier']))];return e['map'](f=>{const g=a['find'](p=>p['identifier']===f),h=g?normalizeValueType(g['value_type']):undefined,i=h===ValueType['Address'],j=b['filter'](p=>p['slot']===f),k=c['filter'](p=>p['spec']['kind']==='submission'&&p['spec']['identifier']===f)['map'](p=>p['mode']??'Unknown'),l=d['filter'](p=>p['slot']===undefined||p['slot']===f),m=deriveReceiptRight(f,d),n=l['some'](p=>p['code']==='service_binding'||p['code']==='repository_crosscheck'||p['code']==='signer_permission_member'),o=[];if(h!==undefined&&!i)o['push']('RC-FIND-07');if(!n)o['push']('RC-FIND-02');if(m?.['object_type']==='order')o['push']('RC-FIND-03');return{'identifier':f,'externally_submitted':g?.['b_submission']??!![],...h!==undefined?{'declared_value_type':h}:{},'is_address':i,'usages':j,'recipient_modes':k,'constraints':l,...m?{'receipt':m}:{},'beneficial_owner':deriveBeneficialOwner({'kind':'submission','identifier':f},m),'assessment':{'address_typed':i,'scope_bound':n,'object_receipt':m?.['object_type']==='order'},'findings':o};});}function buildSlotFinding(a,b,c){const d=a['identifier'];switch(b){case'RC-FIND-07':return{'code':b,'severity':'medium','title':'Submission\x20slot\x20'+d+'\x20is\x20not\x20address-typed','explanation':'GuardIdentifier\x20recipients\x20require\x20an\x20address-typed\x20table\x20entry\x20'+'(enforced\x20at\x20allocator\x20registration\x20/\x20ERECIPIENT_IDENTIFIER_NOT_ADDRESS).','evidence_paths':c,'mitigation':'Set\x20the\x20slot\x20value_type\x20to\x20Address,\x20or\x20use\x20an\x20Entity\x20recipient.','unavoidable':![]};case'RC-FIND-02':return{'code':b,'severity':'high','title':'Submission\x20slot\x20'+d+'\x20has\x20no\x20scope\x20binding','explanation':'Nothing\x20constrains\x20which\x20submitted\x20objects/addresses\x20qualify:\x20no\x20'+'service\x20binding,\x20repository\x20cross-check\x20or\x20permission\x20membership.\x20A\x20caller\x20'+'can\x20submit\x20arbitrary\x20qualifying-by-other-conditions\x20inputs.','evidence_paths':c,'mitigation':'Add\x20a\x20constraint\x20binding\x20the\x20slot\x20(e.g.\x20order.service\x20==\x20host\x20service).','unavoidable':![]};case'RC-FIND-03':return{'code':b,'severity':'medium','title':'Cross-allocation\x20settlement\x20residual','explanation':'The\x20submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20Allocation\x20being\x20settled\x20'+'(alloc\x20is\x20permissionless\x20and\x20allocation\x20context\x20is\x20not\x20a\x20Guard\x20input).\x20A\x20'+'caller\x20owning\x20ANY\x20qualifying\x20order\x20can\x20settle\x20OTHER\x20allocations;\x20funds\x20land\x20'+'at\x20the\x20submitted\x20order\x20and\x20are\x20receivable\x20by\x20its\x20owner.\x20Destination\x20is\x20safe\x20'+'(an\x20order\x20owner),\x20allocation\x20choice\x20is\x20the\x20residual.','evidence_paths':c,'mitigation':'Pick\x20ONE\x20resolution\x20and\x20record\x20it\x20in\x20the\x20service\x20description:\x20'+'(1)\x20competition\x20semantics\x20—\x20declare\x20that\x20any\x20qualifying\x20order\x20may\x20settle\x20'+'this\x20allocation\x20and\x20cap\x20the\x20exposure\x20(sharing\x20threshold\x20/\x20max\x20amount);\x20'+'(2)\x20Entity\x20routing\x20—\x20use\x20a\x20fixed\x20Entity\x20(treasury)\x20recipient,\x20the\x20only\x20'+'exclusive\x20choice\x20on\x20the\x20automatic\x20order_allocators\x20route\x20(trust\x20shifts\x20to\x20'+'the\x20entity\x20operator);\x20'+'(3)\x20per-order\x20pinned\x20Guards\x20—\x20abandon\x20automatic\x20order_allocators\x20and\x20attach\x20'+'a\x20per-order\x20Guard\x20pinning\x20the\x20order\x20id\x20(order.owner\x20==\x20constant),\x20the\x20'+'trustless\x20exclusive\x20route.','unavoidable':!![],'resolution_required':!![]};default:return{'code':b,'severity':'low','title':'Slot\x20'+d+'\x20finding\x20'+b,'explanation':'','evidence_paths':c,'mitigation':'','unavoidable':![]};}}function buildFindings(a,b){const c=[];let d=![],e=![];for(const f of b){const g=f['recipients']['flatMap'](h=>h['constraints'])['filter'](h=>h['caller_constraint']);if(g['length']>0x0)d=!![];if(f['slots']['some'](h=>h['assessment']['scope_bound']))e=!![];for(const h of f['recipients']){const i=h['constraints']['map'](j=>j['evidence']['path']);h['spec']['kind']==='signer'&&g['length']===0x0&&c['push']({'code':'RC-FIND-01','severity':'critical','title':'Signer\x20recipient\x20without\x20caller\x20constraint\x20—\x20fund\x20theft','explanation':'Funds\x20are\x20delivered\x20directly\x20to\x20the\x20transaction\x20caller,\x20but\x20the\x20Guard\x20'+'does\x20not\x20bind\x20the\x20Signer\x20to\x20an\x20authorized\x20identity.\x20Anyone\x20who\x20satisfies\x20the\x20'+'other\x20conditions\x20steals\x20the\x20funds.','evidence_paths':i,'mitigation':'Bind\x20the\x20Signer\x20(signer==order.owner\x20or\x20signer==fixed\x20address),\x20or\x20change\x20'+'the\x20recipient\x20to\x20an\x20Entity\x20/\x20submitted\x20object\x20slot.','unavoidable':![]});}for(const j of f['slots']){const k=j['constraints']['map'](l=>l['evidence']['path']);for(const l of j['findings']){c['push'](buildSlotFinding(j,l,k));}}a['trigger_source']==='service_order_allocators'&&f['recipients']['length']>0x0&&!f['recipients']['some'](m=>m['spec']['kind']==='submission')&&c['push']({'code':'RC-FIND-09','severity':'low','title':'Allocator\x20Guard\x20'+f['guard']+'\x20has\x20no\x20GuardIdentifier\x20sharing\x20row\x20—\x20bound\x20to\x20no\x20particular\x20order','explanation':'Every\x20sharing\x20row\x20is\x20a\x20fixed\x20recipient\x20(Entity/Signer),\x20which\x20resolves\x20no\x20'+'submission.\x20The\x20Guard\x20therefore\x20cannot\x20read\x20the\x20paying\x20order\x20(order.*\x20queries\x20have\x20'+'no\x20binding\x20target),\x20and\x20the\x20allocation\x20pays\x20the\x20same\x20fixed\x20destinations\x20for\x20EVERY\x20order.\x20'+'This\x20is\x20often\x20intended\x20—\x20confirm\x20it\x20is.','evidence_paths':[],'mitigation':'If\x20the\x20Guard\x20should\x20distinguish\x20orders,\x20add\x20a\x20zero-share\x20{GuardIdentifier:\x200}\x20'+'anchor\x20row\x20(Rate\x200)\x20so\x20the\x20Identifier\x20slot\x20resolves\x20to\x20the\x20paying\x20order\x20'+'(pattern.allocator_order_anchor).\x20If\x20fixed-pay\x20is\x20intended,\x20no\x20action.','unavoidable':![]});}a['trigger_source']==='standalone'&&!d&&c['push']({'code':'RC-FIND-04','severity':'high','title':'Standalone\x20allocation\x20without\x20issuer\x20identity\x20constraint','explanation':'Standalone\x20allocations\x20have\x20no\x20Service/Arbitration\x20access-control\x20layer.\x20'+'Without\x20a\x20Signer/permission\x20binding\x20in\x20the\x20Guard,\x20anyone\x20can\x20trigger\x20distribution.','evidence_paths':[],'mitigation':'Bind\x20the\x20issuer\x20(Signer==owner/admin)\x20or\x20move\x20the\x20allocation\x20into\x20a\x20Service.','unavoidable':![]});c['push']({'code':'RC-FIND-06','severity':'low','title':'Permissionless\x20alloc\x20—\x20forced\x20settlement\x20timing','explanation':'Once\x20the\x20Guard\x27s\x20conditions\x20are\x20satisfiable,\x20anyone\x20can\x20trigger\x20settlement\x20of\x20an\x20'+'order\x27s\x20allocation.\x20With\x20Entity/object\x20recipients\x20this\x20affects\x20timing\x20only,\x20not\x20destination.','evidence_paths':[],'mitigation':'Monitor\x20settlements;\x20constrain\x20time-sensitivity\x20via\x20Guard\x20conditions.','unavoidable':!![]});for(const [m,n]of Object['entries'](a['guards']??{})){const o=asNode(n['root']);if(!o)continue;for(const q of findSessionQueries(o)){c['push']({'code':'RC-FIND-05','severity':'medium','title':'Guard\x20'+m+'\x20uses\x20session-only\x20query\x20at\x20'+q,'explanation':'Queries\x201270/1271\x20read\x20the\x20active\x20session;\x20after\x20the\x20session\x20migrates\x20to\x20'+'history\x20the\x20query\x20aborts\x20(W_FIELD_NOT_FOUND)\x20and\x20the\x20Guard\x20permanently\x20fails.','evidence_paths':[q],'mitigation':'Use\x20progress.current_time\x20(1272)\x20or\x20history\x20queries\x20(1274-1280).','unavoidable':![]});}}for(const [s,t]of Object['entries'](a['guards']??{})){const u=(t['relies']??[])['filter'](v=>typeof v==='string'&&v);if(u['length']===0x0)continue;c['push']({'code':'RC-FIND-08','severity':'low','title':'Guard\x20'+s+'\x20relies\x20on\x20'+u['length']+'\x20sub-guard(s)\x20—\x20not\x20credited\x20by\x20this\x20audit','explanation':'Guard\x20composition\x20(relies,\x20one\x20level,\x20≤4,\x20'+((t['relies_logic_and']===![]?'OR':'AND')+'-logic)\x20may\x20carry\x20the\x20scope/signer\x20')+'constraints\x20in\x20the\x20relied\x20sub-guards.\x20This\x20audit\x20evaluates\x20only\x20the\x20guard\x27s\x20own\x20root:\x20'+'sub-guard\x20constraints\x20are\x20NOT\x20credited,\x20so\x20scope-binding\x20gaps\x20(RC-FIND-02)\x20may\x20be\x20'+'over-reported\x20and\x20sub-guard-only\x20conditions\x20stay\x20unverified.','evidence_paths':u,'mitigation':'Resolve\x20the\x20relied\x20sub-guards\x20and\x20verify\x20their\x20constraints\x20manually,\x20or\x20re-run\x20'+'with\x20the\x20sub-guard\x20defs\x20included\x20(read-side\x20resolvers\x20attach\x20them\x20automatically).','unavoidable':![]});}if(!e&&a['trigger_source']==='service_order_allocators'){}return c;}function buildPayoff(a,b){const c=a['recipients']['some'](h=>h['constraints']['some'](i=>i['caller_constraint'])),d=c?'Caller\x20must\x20satisfy\x20the\x20Guard\x27s\x20Signer/identity\x20binding':b==='standalone'?'Any\x20caller\x20(no\x20identity\x20binding)':'Any\x20caller\x20who\x20satisfies\x20the\x20Guard\x27s\x20object/state\x20conditions',e=a['recipients']['map'](h=>h['beneficial_owner'])['join'](';\x20')||'(none)',f={},g=a['recipients']['some'](h=>h['spec']['kind']==='signer'&&!c);return f['caller']=g?'gains':c?'conditional':'neutral',f['provider']=a['recipients']['some'](h=>h['spec']['kind']==='entity')?'gains':'conditional',f['customer']=a['recipients']['some'](h=>h['receipt']?.['object_type']==='order')?'conditional':'neutral',f['system']='neutral',{'caller_eligibility':d,'beneficial_recipient':e,'positions':f};}export const RECIPIENT_CONSTRAINT_VERSION='1.2.0';export function analyzeRecipientConstraints(a){const b=a['allocators']['map'](h=>{const i=a['guards']?.[h['guard']],j=asNode(i?.['root']),k=i?.['table']??[],l=j?extractConstraints(j,k):[],m=j?collectSlotUsages(j):[],n=h['sharing']['map'](q=>{const r=classifyRecipient(q['who']);if(!r)return{'spec':{'kind':'entity','address':'(unclassifiable)'},'constraints':l,'beneficial_owner':'Unclassifiable\x20recipient\x20—\x20check\x20allocator\x20config'};const t=r['kind']==='submission'?r['identifier']:undefined,u=t!==undefined?k['find'](w=>w['identifier']===t):undefined,v=t!==undefined?deriveReceiptRight(t,l):undefined;return{'spec':r,'slot_value_type':u?normalizeValueType(u['value_type']):undefined,'constraints':t!==undefined?l['filter'](w=>w['slot']===undefined||w['slot']===t):l,'receipt':v,'beneficial_owner':deriveBeneficialOwner(r,v)};}),o=buildSlotModels(k,m,h['sharing']['map'](q=>({'spec':classifyRecipient(q['who'])??{'kind':'entity','address':'(unclassifiable)'},'mode':q['mode']})),l),p={'guard':h['guard'],'recipients':n,'slots':o,'payoff':{'caller_eligibility':'','beneficial_recipient':'','positions':{}}};return p['payoff']=buildPayoff(p,a['trigger_source']),p;}),c=buildFindings(a,b),d=c['some'](h=>h['severity']==='critical')?'critical':c['some'](h=>h['severity']==='high')?'high':c['some'](h=>h['severity']==='medium')?'medium':'low',e=!c['some'](h=>h['code']==='RC-FIND-01'),f=c['some'](h=>h['resolution_required']),g=[{'code':'RC-FIND-03','title':'Cross-allocation\x20settlement','detail':'Submitted\x20order\x20is\x20not\x20bound\x20to\x20the\x20settled\x20allocation;\x20destination\x20stays\x20at\x20an\x20order\x20owner.'},{'code':'RC-FIND-06','title':'Forced\x20settlement\x20timing','detail':'alloc\x20is\x20permissionless;\x20settlement\x20can\x20be\x20triggered\x20by\x20anyone\x20once\x20conditions\x20hold.'},{'code':'RC-RES-01','title':'Published\x20immutability','detail':'order_allocators,\x20Machine\x20and\x20Guards\x20are\x20immutable\x20after\x20publish.'},{'code':'RC-RES-03','title':'Off-chain\x20arbitration\x20backstop','detail':'No\x20on-chain\x20clawback;\x20post-incident\x20recovery\x20relies\x20on\x20arbitration.'}];return{'version':RECIPIENT_CONSTRAINT_VERSION,'scope':{'trigger_source':a['trigger_source'],'host_service':a['host_service'],'allocation':a['allocation']},'allocators':b,'findings':c,'unavoidable':g,'safe_destination':e,'resolution_required':f,'overall':d,'summary':'Analyzed\x20'+b['length']+'\x20allocator(s):\x20'+c['filter'](h=>!h['unavoidable'])['length']+'\x20actionable,\x20'+(c['filter'](h=>h['unavoidable'])['length']+'\x20structural\x20finding(s).\x20Safe\x20destination:\x20'+e+'.')+(''+(f?'\x20Resolution\x20REQUIRED:\x20at\x20least\x20one\x20residual\x20demands\x20an\x20explicit\x20design\x20decision\x20before\x20publish.':''))};}export function derivePayoffFromSharing(a,b,c){const d=asNode(c?.['root']),e=c?.['table']??[],f=d?extractConstraints(d,e):[],g=a['map'](i=>{const j=classifyRecipient(i['who'])??{'kind':'entity','address':'(unclassifiable)'},k=j['kind']==='submission'?j['identifier']:undefined,l=k!==undefined?e['find'](n=>n['identifier']===k):undefined,m=k!==undefined?deriveReceiptRight(k,f):undefined;return{'spec':j,'slot_value_type':l?normalizeValueType(l['value_type']):undefined,'constraints':k!==undefined?f['filter'](n=>n['slot']===undefined||n['slot']===k):f,'receipt':m,'beneficial_owner':deriveBeneficialOwner(j,m)};}),h={'guard':'','recipients':g,'slots':[],'payoff':{'caller_eligibility':'','beneficial_recipient':'','positions':{}}};return buildPayoff(h,b);}function normalizeValueType(a){if(typeof a==='number')return a;const b={'bool':ValueType['Bool'],'address':ValueType['Address'],'string':ValueType['String'],'u64':ValueType['U64'],'u256':ValueType['U256']};return b[a['toLowerCase']()];}export function isUnboundSignerTheft(a){return a['recipient_is_signer']&&!a['caller_identity_constrained'];}export function canonicalDoctrine(a){switch(a){case'RC-FIND-01':return{'severity':'critical','title':'Signer\x20recipient\x20without\x20caller\x20constraint\x20—\x20fund\x20theft','mitigation':'Bind\x20the\x20Signer\x20(signer==order.owner\x20or\x20signer==fixed\x20address),\x20or\x20change\x20'+'the\x20recipient\x20to\x20an\x20Entity\x20/\x20submitted\x20object\x20slot.'};case'RC-FIND-03':return{'severity':'medium','title':'Cross-allocation\x20settlement\x20residual','mitigation':'Pick\x20ONE\x20resolution\x20and\x20record\x20it\x20in\x20the\x20service\x20description:\x20'+'(1)\x20competition\x20semantics\x20with\x20capped\x20exposure\x20(threshold\x20/\x20max\x20amount);\x20'+'(2)\x20Entity\x20routing\x20(treasury)\x20—\x20the\x20only\x20exclusive\x20choice\x20on\x20the\x20automatic\x20'+'order_allocators\x20route;\x20'+'(3)\x20per-order\x20pinned\x20Guards\x20(order.owner\x20==\x20constant)\x20—\x20the\x20trustless\x20'+'exclusive\x20route.','resolution_required':!![]};case'RC-FIND-06':return{'severity':'low','title':'Permissionless\x20alloc\x20—\x20forced\x20settlement\x20timing','mitigation':'Monitor\x20settlements;\x20constrain\x20time-sensitivity\x20via\x20Guard\x20conditions.'};}}export const RECIPIENT_DESIGN_OPTIONS=[{'id':'entity','move_recipient':'Recipient::Entity(address)','semantics':'Funds\x20flow\x20to\x20a\x20fixed\x20address\x20(a\x20constrained\x20user\x20account\x20/\x20treasury).\x20'+'Destination\x20never\x20depends\x20on\x20the\x20caller.','required_constraints':['The\x20address\x20is\x20chosen\x20at\x20design\x20time\x20and\x20recorded\x20in\x20the\x20allocator\x20table.']},{'id':'submitted_object','move_recipient':'Recipient::GuardIdentifier(u8)','semantics':'Funds\x20flow\x20to\x20the\x20object\x20submitted\x20under\x20protocol\x20context\x20(e.g.\x20the\x20order\x20being\x20settled).\x20'+'Receivable\x20only\x20by\x20that\x20object\x27s\x20owner\x20—\x20object\x20receipt\x20=\x20owner\x20receipt.','required_constraints':['The\x20Guard\x20binds\x20the\x20submission\x27s\x20scope\x20(which\x20query/object\x20type\x20the\x20slot\x20carries).','The\x20slot\x27s\x20table\x20value\x20type\x20is\x20address\x20(enforced\x20at\x20allocator\x20registration).'],'finding_if_unmet':'RC-FIND-02\x20/\x20RC-FIND-07'},{'id':'signer','move_recipient':'Recipient::Signer','semantics':'Funds\x20flow\x20to\x20the\x20caller\x20who\x20executes\x20the\x20permissionless\x20alloc.\x20'+'Safe\x20only\x20when\x20the\x20Guard\x20proves\x20exactly\x20who\x20the\x20caller\x20may\x20be.','required_constraints':['The\x20Guard\x20constrains\x20the\x20Signer\x20identity\x20(signer\x20==\x20a\x20fixed\x20address\x20or\x20a\x20derived\x20legitimate\x20owner).'],'finding_if_unmet':'RC-FIND-01'},{'id':'constrained_submission','move_recipient':'Recipient::GuardIdentifier(u8)','semantics':'Funds\x20flow\x20to\x20an\x20object\x20address\x20supplied\x20by\x20the\x20signer,\x20but\x20the\x20Guard\x20constrains\x20'+'both\x20the\x20submission\x20scope\x20and\x20the\x20signer\x27s\x20relation\x20to\x20it\x20(e.g.\x20the\x20signer\x20owns\x20the\x20submitted\x20order).','required_constraints':['The\x20Guard\x20binds\x20the\x20submission\x27s\x20scope\x20(object/query\x20type).','The\x20Guard\x20binds\x20the\x20signer\x20to\x20the\x20submitted\x20object.','The\x20slot\x27s\x20table\x20value\x20type\x20is\x20address\x20(enforced\x20at\x20allocator\x20registration).'],'finding_if_unmet':'RC-FIND-01\x20/\x20RC-FIND-02\x20/\x20RC-FIND-07'}];export function recipientDesignGuidance(){return RECIPIENT_DESIGN_OPTIONS;}export const OBJECT_DRIVEABILITY=[{'object_type':'order','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20order','owner-side\x20object\x20extraction\x20from\x20the\x20order'],'anyone_drivable':!![],'funds_settle_to':'order.owner','rationale':'Order\x20is\x20a\x20shared\x20object\x20and\x20extraction\x20has\x20no\x20signer\x20gate;\x20'+'Receiving\x20is\x20restricted\x20to\x20objects\x20actually\x20delivered\x20to\x20that\x20order,\x20and\x20coins\x20settle\x20to\x20its\x20owner.'},{'object_type':'permission','receive_entries':['owner-side\x20coin\x20extraction\x20via\x20the\x20permission\x20object','owner-side\x20object\x20extraction\x20via\x20the\x20permission\x20object'],'anyone_drivable':!![],'funds_settle_to':'permission.owner','rationale':'Permission\x20is\x20the\x20final\x20authority;\x20anyone\x20can\x20drive\x20extraction\x20of\x20funds\x20sent\x20to\x20its\x20address,\x20but\x20the\x20destination\x20is\x20its\x20owner.'},{'object_type':'service','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20service','owner-side\x20object\x20extraction\x20from\x20the\x20service'],'anyone_drivable':![],'permission_index':0x13f,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20319);\x20members\x20drive,\x20value\x20settles\x20to\x20the\x20organization\x20owner.'},{'object_type':'treasury','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20treasury','owner-side\x20object\x20extraction\x20from\x20the\x20treasury'],'anyone_drivable':![],'permission_index':0x101,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20257).'},{'object_type':'arbitration','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20arbitration','owner-side\x20object\x20extraction\x20from\x20the\x20arbitration'],'anyone_drivable':![],'permission_index':0x16f,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20367).'},{'object_type':'machine','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20machine','owner-side\x20object\x20extraction\x20from\x20the\x20machine'],'anyone_drivable':![],'permission_index':0xcf,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20207).'},{'object_type':'progress','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20progress','owner-side\x20object\x20extraction\x20from\x20the\x20progress'],'anyone_drivable':![],'permission_index':0xe1,'funds_settle_to':'machine\x27s\x20permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20225),\x20scoped\x20to\x20the\x20Machine\x20permission.'},{'object_type':'demand','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20demand','owner-side\x20object\x20extraction\x20from\x20the\x20demand'],'anyone_drivable':![],'permission_index':0x197,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20407).'},{'object_type':'contact','receive_entries':['owner-side\x20coin\x20extraction\x20from\x20the\x20contact','owner-side\x20object\x20extraction\x20from\x20the\x20contact'],'anyone_drivable':![],'permission_index':0x1c6,'funds_settle_to':'permission.owner','rationale':'Business\x20permission\x20gate\x20(index\x20454).'}];export function driveabilityOf(a){return OBJECT_DRIVEABILITY['find'](b=>b['object_type']===a);}function rewardRecipientKind(a){if(typeof a==='string'){const e=a['toLowerCase']();if(e==='signer')return{'kind':'signer'};return{'kind':'entity'};}if(typeof a!=='object'||a===null)return{'kind':'entity'};const b=a,c=f=>typeof b[f]==='number'?b[f]:undefined,d=c('GuardIdentifier')??c('guard_identifier')??c('identifier');if(d!==undefined)return{'kind':'submission','slot':d};if(b['Signer']!==undefined||b['signer']!==undefined)return{'kind':'signer'};return{'kind':'entity'};}const SLOT_BINDING_CODES=new Set(['service_binding','progress_node_state','signer_is_submitted_object_owner','repository_crosscheck','signer_permission_member']);export function analyzeRewardClaimGuard(a){const {kind:b,slot:c}=rewardRecipientKind(a['recipient']),d={'entry_index':a['entry_index'],'guard':a['guard'],'recipient_kind':b,...c!==undefined?{'recipient_slot':c}:{},'guard_resolved':![],'constraint_codes':[],'recipient_slot_usages':0x0,'caller_identity_constrained':![],'viability':'unverifiable','reason':'Guard\x20table/root\x20not\x20fetched\x20with\x20the\x20topology\x20—\x20the\x20deciding\x20predicate\x20is\x20outside\x20the\x20evidence;\x20the\x20owner\x20must\x20disclose\x20the\x20full\x20guard\x20definitions.'},e=asNode(a['guard_def']?.['root']);if(!e)return d;const f=a['guard_def']?.['table']??[],g=extractConstraints(e,f);d['guard_resolved']=!![],d['constraint_codes']=g['map'](k=>k['code']),d['caller_identity_constrained']=g['some'](k=>k['caller_constraint']);if(b==='entity')return d['viability']='blocked',d['reason']='Payout\x20address\x20is\x20fixed\x20at\x20guard\x20registration\x20(Entity\x20recipient);\x20the\x20claim\x20path\x20cannot\x20redirect\x20it.',d;if(b==='signer')return d['caller_identity_constrained']?(d['viability']='blocked',d['reason']='Recipient\x20is\x20the\x20caller\x20(Signer)\x20but\x20the\x20guard\x20binds\x20the\x20caller\x20identity\x20—\x20only\x20the\x20authorized\x20party\x20can\x20claim.'):(d['viability']='viable',d['reason']='Recipient\x20is\x20the\x20caller\x20(Signer)\x20with\x20no\x20identity\x20binding\x20—\x20anyone\x20satisfying\x20the\x20remaining\x20conditions\x20claims\x20to\x20their\x20own\x20address.'),d;const h=c??-0x1,i=collectSlotUsages(e)['filter'](k=>k['slot']===h);d['recipient_slot_usages']=i['length'];const j=g['filter'](k=>k['slot']===h&&SLOT_BINDING_CODES['has'](k['code']));if(j['length']>0x0)d['viability']='blocked',d['reason']='Submitted\x20address\x20is\x20constrained\x20inside\x20the\x20guard\x20('+j['map'](k=>k['code'])['join'](',\x20')+')\x20—\x20a\x20passerby\x20cannot\x20fill\x20the\x20slot\x20with\x20an\x20arbitrary\x20address.';else i['length']>0x0?(d['viability']='conditional',d['reason']='The\x20guard\x20reads\x20the\x20submitted\x20slot\x20('+i['length']+'\x20query\x20usage(s))\x20but\x20no\x20recognized\x20scope/equality\x20constraint\x20was\x20matched\x20—\x20manual\x20predicate\x20review\x20required.'):(d['viability']='viable',d['reason']='No\x20guard\x20query\x20consumes\x20the\x20submitted\x20slot\x20—\x20the\x20predicate\x20cannot\x20constrain\x20the\x20payout\x20address;\x20any\x20passing\x20party\x20claims\x20to\x20their\x20own\x20address.');return d;}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type RuleBindingKind = "machine_node" | "machine_edge" | "guard" | "allocator_row" | "fee_param" | "keeper_duty" | "time_anchor" | "conditional_guard" | "off_chain";
|
|
2
|
+
export interface RuleBinding {
|
|
3
|
+
kind: RuleBindingKind;
|
|
4
|
+
ref: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RuleDeclaration {
|
|
7
|
+
id: string;
|
|
8
|
+
rule: string;
|
|
9
|
+
binding?: RuleBinding;
|
|
10
|
+
status?: "expressible" | "unexpressible";
|
|
11
|
+
unexpressible_ref?: string;
|
|
12
|
+
note?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const SECTIONS=['supply_rules','labor_rules','incentive_rules','ops_kpis'];export const RULE_SECTIONS=SECTIONS;const ID_PATTERN=/^[a-z0-9-]+$/,GAP_ID_PATTERN=/^U-\d+[ab]?$/,MIN_RULE_LENGTH=0xf;function resolveBinding(a,b,c){const d=a['machine_shape']['map'](g=>({'node':g,'seg':g['segment']}))['filter'](g=>g['seg']!==undefined)['map'](({node:g})=>{const h=g['name']['indexOf']('{i}');return{'prefix':g['name']['slice'](0x0,h),'suffix':g['name']['slice'](h+0x3),'node':g};})['filter'](g=>g['prefix']['length']>0x0),e=g=>{for(const h of d){if(!g['startsWith'](h['prefix'])||!g['endsWith'](h['suffix']))continue;const i=g['slice'](h['prefix']['length'],g['length']-h['suffix']['length']);if(/^\d+$/['test'](i)&&Number(i)>=0x1)return{'prefix':h['prefix'],'index':Number(i),'node':h['node']};}return null;},f=g=>e(g)!==null;switch(b){case'machine_node':{const g=a['machine_shape']['map'](h=>h['name']);if(g['includes'](c)||f(c))return null;return'no\x20machine_shape\x20node\x20named\x20\x27'+c+'\x27';}case'machine_edge':{const h=c['indexOf']('->');if(h<=0x0||h===c['length']-0x2)return'machine_edge\x20ref\x20\x27'+c+'\x27\x20must\x20be\x20\x22prev->node\x22';const i=c['slice'](0x0,h),j=c['slice'](h+0x2),k=a['machine_shape']['find'](o=>o['name']===j);if(!k&&!f(j))return'no\x20machine_shape\x20node\x20named\x20\x27'+j+'\x27';const l=e(j);if(l!==null){if(l['index']>0x1){const p=''+l['prefix']+(l['index']-0x1)+j['slice'](l['prefix']['length']+String(l['index'])['length']);return i===p?null:'no\x20edge\x20\x27'+i+'\x27\x20->\x20'+j+'\x20in\x20machine_shape\x20(segment\x20instance\x20chain)';}const n=l['node']['from']??[],o=n['some'](q=>typeof q==='string'?q===i:q['prev']===i);return o?null:'no\x20edge\x20\x27'+i+'\x27\x20->\x20'+j+'\x20in\x20machine_shape';}const m=(k['from']??[])['some'](q=>{const r=typeof q==='string'?q:q['prev']??'';if(r===i)return!![];const s=/^\{(.+?)(?:\.(?:all|last|first|\d+))?\}$/['exec'](r);if(s===null)return![];const u=s[0x1];return a['machine_shape']['some'](v=>{const w=v['segment'];if(w?.['id']!==u)return![];const x=v['name']['indexOf']('{i}');if(x<0x0)return![];const y=v['name']['slice'](0x0,x),z=v['name']['slice'](x+0x3);return i['startsWith'](y)&&i['endsWith'](z)&&/^\d+$/['test'](i['slice'](y['length'],i['length']-z['length']));});});return m?null:'no\x20edge\x20\x27'+i+'\x27\x20->\x20'+j+'\x20in\x20machine_shape';}case'guard':{const q=a['guards']['map'](r=>r['key'])['filter'](r=>r!==undefined);return q['includes'](c)?null:'no\x20guards[]\x20entry\x20with\x20key\x20\x27'+c+'\x27';}case'allocator_row':{const r=c['indexOf']('/');if(r<0x0)return'allocator_row\x20ref\x20\x27'+c+'\x27\x20must\x20be\x20\x22track/guard_key\x22';const s=c['slice'](0x0,r),u=c['slice'](r+0x1),v=a['allocator']?.['rows']??[],w=v['some'](x=>{const y=s==='_'||x['track']===s,z=u==='_'||x['guard_key']===u;return y&&z;});return w?null:'no\x20allocator.rows\x20entry\x20matching\x20\x27'+c+'\x27\x20(use\x20\x22_\x22\x20for\x20the\x20wildcard\x20half)';}case'fee_param':return Object['prototype']['hasOwnProperty']['call'](a['fee_params'],c)?null:'no\x20fee_params\x20key\x20\x27'+c+'\x27';case'keeper_duty':{const x=a['keeper_duty']??[],y=Number(c);if(!Number['isInteger'](y)||y<0x0||''+y!==c)return'keeper_duty\x20ref\x20\x27'+c+'\x27\x20must\x20be\x20a\x20stringified\x200-based\x20index';return y<x['length']?null:'keeper_duty\x20index\x20'+y+'\x20out\x20of\x20range\x20('+x['length']+'\x20entries)';}case'time_anchor':return a['time_anchors']!==undefined&&Object['prototype']['hasOwnProperty']['call'](a['time_anchors'],c)?null:'no\x20time_anchors\x20key\x20\x27'+c+'\x27';case'conditional_guard':{const z=(a['conditional_guards']??[])['map'](A=>A['guard_key']);return z['includes'](c)?null:'no\x20conditional_guards\x20entry\x20with\x20guard_key\x20\x27'+c+'\x27';}case'off_chain':return c['trim']()['length']>=0x3?null:'off_chain\x20ref\x20must\x20name\x20the\x20off-chain\x20loop\x20(got\x20\x27'+c+'\x27)';default:return'unknown\x20binding\x20kind\x20\x27'+b+'\x27';}}export function validateRuleDeclarations(a){const b=[];for(const c of RULE_SECTIONS){const d=a[c]??[],e=new Set();d['forEach']((f,g)=>{const h=c+'['+g+']';if(!f['id']||!ID_PATTERN['test'](f['id']))b['push'](h+'\x20id\x20\x27'+f['id']+'\x27\x20must\x20match\x20'+ID_PATTERN['source']);else e['has'](f['id'])?b['push'](h+'\x20id\x20\x27'+f['id']+'\x27\x20is\x20declared\x20more\x20than\x20once'):e['add'](f['id']);(!f['rule']||f['rule']['trim']()['length']<MIN_RULE_LENGTH)&&b['push'](h+'\x20rule\x20text\x20is\x20a\x20placeholder\x20('+MIN_RULE_LENGTH+'-char\x20floor)');const j=f['status']==='unexpressible';if(j)f['binding']!==undefined&&b['push'](h+'\x20declares\x20unexpressible\x20but\x20also\x20carries\x20a\x20binding\x20—\x20contradictory'),(!f['unexpressible_ref']||!GAP_ID_PATTERN['test'](f['unexpressible_ref']))&&b['push'](h+'\x20unexpressible_ref\x20\x27'+f['unexpressible_ref']+'\x27\x20must\x20match\x20'+GAP_ID_PATTERN['source']),(!f['note']||f['note']['trim']()['length']===0x0)&&b['push'](h+'\x20unexpressible\x20entries\x20require\x20a\x20disclosure\x20note');else{if(!f['binding'])b['push'](h+'\x20is\x20expressible\x20(default)\x20but\x20carries\x20no\x20binding');else{const k=resolveBinding(a,f['binding']['kind'],f['binding']['ref']);if(k)b['push'](h+'\x20binding\x20'+f['binding']['kind']+':'+f['binding']['ref']+'\x20unresolved\x20—\x20'+k);}f['unexpressible_ref']!==undefined&&b['push'](h+'\x20carries\x20unexpressible_ref\x20without\x20status\x20\x22unexpressible\x22');}});}return b;}const EMPTY_COUNT={'total':0x0,'expressible':0x0,'unexpressible':0x0},SUMMARY_KEYS=[{'section':'supply_rules','out':'supply'},{'section':'labor_rules','out':'labor'},{'section':'incentive_rules','out':'incentive'},{'section':'ops_kpis','out':'ops_kpis'}];export function summarizeRuleDeclarations(a){const b={'supply':{...EMPTY_COUNT},'labor':{...EMPTY_COUNT},'incentive':{...EMPTY_COUNT},'ops_kpis':{...EMPTY_COUNT},'bound_keys':[],'unexpressible_refs':[]},c=new Set(),d=new Set();for(const {section:e,out:f}of SUMMARY_KEYS){for(const g of a[e]??[]){const h=b[f];h['total']++;if(g['status']==='unexpressible'){h['unexpressible']++;if(g['unexpressible_ref'])d['add'](g['unexpressible_ref']);}else{h['expressible']++;if(g['binding'])c['add'](g['binding']['kind']+':'+g['binding']['ref']);}}}return b['bound_keys']=[...c]['sort'](),b['unexpressible_refs']=[...d],b;}
|
|
@@ -47,10 +47,16 @@ export interface ModeGuardRef {
|
|
|
47
47
|
};
|
|
48
48
|
params?: Record<string, unknown>;
|
|
49
49
|
identity_leg_exempt?: string;
|
|
50
|
+
node_set_segments?: string[];
|
|
51
|
+
node_set_nodes?: string[];
|
|
50
52
|
}
|
|
51
53
|
export interface ModeMachineNode {
|
|
52
54
|
name: string;
|
|
53
55
|
role: string;
|
|
56
|
+
segment?: {
|
|
57
|
+
id: string;
|
|
58
|
+
count_from: string;
|
|
59
|
+
};
|
|
54
60
|
operator?: "merchant" | "order_payer";
|
|
55
61
|
named_operator?: string;
|
|
56
62
|
semantic_role?: "draft" | "active" | "delivered" | "final" | "cancelled";
|