@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,229 +0,0 @@
|
|
|
1
|
-
import type { ServicePanoramaInput } from "../../schema/query/bi.js";
|
|
2
|
-
import { type BusinessReport } from "./reverse-mapping.js";
|
|
3
|
-
import { type SupplyChainGraph } from "../../knowledge/supply-chain.js";
|
|
4
|
-
import { type ExplorationBlock } from "../../graph/onchain/exploration.js";
|
|
5
|
-
type ProjectInput = ServicePanoramaInput;
|
|
6
|
-
export interface PanoramaSale {
|
|
7
|
-
name: string;
|
|
8
|
-
price: string | null;
|
|
9
|
-
price_display: string;
|
|
10
|
-
price_tip: string;
|
|
11
|
-
stock: string | null;
|
|
12
|
-
suspension: boolean;
|
|
13
|
-
restock_on_refund: boolean;
|
|
14
|
-
wip: string;
|
|
15
|
-
wip_hash: string;
|
|
16
|
-
}
|
|
17
|
-
export interface PanoramaForward {
|
|
18
|
-
name: string;
|
|
19
|
-
weight: number;
|
|
20
|
-
guard: string | null;
|
|
21
|
-
retained_submission: number[] | null;
|
|
22
|
-
named_operator: string | null;
|
|
23
|
-
permission_index: number | null;
|
|
24
|
-
}
|
|
25
|
-
export interface PanoramaMachineEdge {
|
|
26
|
-
from: string;
|
|
27
|
-
to: string;
|
|
28
|
-
threshold: number;
|
|
29
|
-
forwards: PanoramaForward[];
|
|
30
|
-
}
|
|
31
|
-
export interface PanoramaMachineGraph {
|
|
32
|
-
address: string;
|
|
33
|
-
name: string | null;
|
|
34
|
-
description: string | null;
|
|
35
|
-
published: boolean | null;
|
|
36
|
-
paused: boolean | null;
|
|
37
|
-
node_count: number | null;
|
|
38
|
-
consensus_repositories: string[];
|
|
39
|
-
nodes: {
|
|
40
|
-
name: string;
|
|
41
|
-
description: string | null;
|
|
42
|
-
}[];
|
|
43
|
-
edges: PanoramaMachineEdge[];
|
|
44
|
-
}
|
|
45
|
-
export interface PanoramaGuardSummary {
|
|
46
|
-
address: string;
|
|
47
|
-
description: string | null;
|
|
48
|
-
rep: boolean | null;
|
|
49
|
-
table_entry_count: number;
|
|
50
|
-
submission_slot_count: number;
|
|
51
|
-
relies: string[];
|
|
52
|
-
relies_logic_and: boolean | null;
|
|
53
|
-
}
|
|
54
|
-
export interface PanoramaSharing {
|
|
55
|
-
who: string;
|
|
56
|
-
entity: string | null;
|
|
57
|
-
mode: "rate" | "amount" | "surplus";
|
|
58
|
-
value: string | null;
|
|
59
|
-
}
|
|
60
|
-
export interface PanoramaIncomeRecipient {
|
|
61
|
-
address: string;
|
|
62
|
-
kind: "treasury" | "account";
|
|
63
|
-
description: string | null;
|
|
64
|
-
permission: string | null;
|
|
65
|
-
balance: string | null;
|
|
66
|
-
balance_display: string | null;
|
|
67
|
-
balance_tip: string | null;
|
|
68
|
-
external_deposit_guard_count: number | null;
|
|
69
|
-
external_withdraw_guard_count: number | null;
|
|
70
|
-
via: string;
|
|
71
|
-
}
|
|
72
|
-
export interface PanoramaPermissionSummary {
|
|
73
|
-
address: string;
|
|
74
|
-
description: string | null;
|
|
75
|
-
builder: string | null;
|
|
76
|
-
owner: string | null;
|
|
77
|
-
owner_name: string | null;
|
|
78
|
-
admin_count: number;
|
|
79
|
-
entity_count: number | null;
|
|
80
|
-
perm_remark: {
|
|
81
|
-
index: string;
|
|
82
|
-
remark: string;
|
|
83
|
-
}[];
|
|
84
|
-
um: string | null;
|
|
85
|
-
tags: string[];
|
|
86
|
-
updated_timestamp_ms: string | null;
|
|
87
|
-
}
|
|
88
|
-
export interface PanoramaOrderStats {
|
|
89
|
-
scope_count: number;
|
|
90
|
-
scoped: boolean;
|
|
91
|
-
amount_sum_raw: string | null;
|
|
92
|
-
amount_sum_display: string | null;
|
|
93
|
-
amount_sum_tip: string | null;
|
|
94
|
-
amount_known_count: number;
|
|
95
|
-
disputed_order_count: number;
|
|
96
|
-
allocation_pending_count: number;
|
|
97
|
-
allocation_allocated_count: number;
|
|
98
|
-
allocation_none_count: number;
|
|
99
|
-
first_created_ms: number | null;
|
|
100
|
-
last_created_ms: number | null;
|
|
101
|
-
}
|
|
102
|
-
export interface PanoramaDrilldown {
|
|
103
|
-
total_count: number;
|
|
104
|
-
analyzed_count: number;
|
|
105
|
-
stats_scope_count: number;
|
|
106
|
-
prompt: string;
|
|
107
|
-
}
|
|
108
|
-
export interface PanoramaRecentOrders {
|
|
109
|
-
count: number;
|
|
110
|
-
window_saturated: boolean;
|
|
111
|
-
preview_truncated: boolean;
|
|
112
|
-
order_addresses?: string[];
|
|
113
|
-
stats: PanoramaOrderStats;
|
|
114
|
-
drilldown?: PanoramaDrilldown;
|
|
115
|
-
items: {
|
|
116
|
-
order: string;
|
|
117
|
-
time: number;
|
|
118
|
-
updated_ms: number | null;
|
|
119
|
-
amount: string;
|
|
120
|
-
amount_display: string;
|
|
121
|
-
amount_tip: string;
|
|
122
|
-
progress: string | null;
|
|
123
|
-
allocation: string | null;
|
|
124
|
-
disputes: string[];
|
|
125
|
-
agent: string[];
|
|
126
|
-
owner: string | null;
|
|
127
|
-
claimed_by: string | null;
|
|
128
|
-
required_info: string | null;
|
|
129
|
-
progress_next: string | null;
|
|
130
|
-
allocation_state: "none" | "pending" | "allocated";
|
|
131
|
-
bought: {
|
|
132
|
-
name: string;
|
|
133
|
-
price_display: string;
|
|
134
|
-
quantity: string;
|
|
135
|
-
wip_hash: string;
|
|
136
|
-
}[];
|
|
137
|
-
}[];
|
|
138
|
-
}
|
|
139
|
-
export interface ServicePanoramaResult {
|
|
140
|
-
action: "service_panorama";
|
|
141
|
-
network: string;
|
|
142
|
-
now_ms: number;
|
|
143
|
-
service: {
|
|
144
|
-
address: string;
|
|
145
|
-
name: string | null;
|
|
146
|
-
description: string;
|
|
147
|
-
location: string;
|
|
148
|
-
published: boolean;
|
|
149
|
-
paused: boolean;
|
|
150
|
-
paused_time: number | null;
|
|
151
|
-
setting_lock_duration: string | null;
|
|
152
|
-
customer_required: string[];
|
|
153
|
-
compensation_fund: string | null;
|
|
154
|
-
compensation_fund_display: string;
|
|
155
|
-
compensation_fund_tip: string;
|
|
156
|
-
compensation_fund_cover_cap: string | null;
|
|
157
|
-
compensation_fund_cover_cap_display: string | null;
|
|
158
|
-
compensation_fund_cover_cap_note: string | null;
|
|
159
|
-
compensation_fund_listing_wall: {
|
|
160
|
-
blocked: {
|
|
161
|
-
name: string;
|
|
162
|
-
price: string;
|
|
163
|
-
price_display: string;
|
|
164
|
-
}[];
|
|
165
|
-
note: string | null;
|
|
166
|
-
} | null;
|
|
167
|
-
sales: PanoramaSale[];
|
|
168
|
-
machine: string | null;
|
|
169
|
-
buy_guard: string | null;
|
|
170
|
-
permission: string;
|
|
171
|
-
um: string | null;
|
|
172
|
-
arbitrations: string[];
|
|
173
|
-
rewards: string[];
|
|
174
|
-
repositories: string[];
|
|
175
|
-
order_allocators: {
|
|
176
|
-
description: string;
|
|
177
|
-
threshold: string | null;
|
|
178
|
-
allocators: {
|
|
179
|
-
guard: string;
|
|
180
|
-
sharing_count: number;
|
|
181
|
-
max: string | null;
|
|
182
|
-
sharing: PanoramaSharing[];
|
|
183
|
-
guard_summary: PanoramaGuardSummary | null;
|
|
184
|
-
}[];
|
|
185
|
-
} | null;
|
|
186
|
-
income_recipients: PanoramaIncomeRecipient[];
|
|
187
|
-
payment_token: {
|
|
188
|
-
coin_type: string | null;
|
|
189
|
-
guidance: string;
|
|
190
|
-
};
|
|
191
|
-
onchain_last_updated: {
|
|
192
|
-
timestamp_ms: string;
|
|
193
|
-
digest: string | null;
|
|
194
|
-
sender: string | null;
|
|
195
|
-
} | null;
|
|
196
|
-
tags: string[];
|
|
197
|
-
owner: string | null;
|
|
198
|
-
owner_name: string | null;
|
|
199
|
-
};
|
|
200
|
-
machine_graph: PanoramaMachineGraph | null;
|
|
201
|
-
buy_guard: PanoramaGuardSummary | null;
|
|
202
|
-
permission: PanoramaPermissionSummary | null;
|
|
203
|
-
related: {
|
|
204
|
-
groups: {
|
|
205
|
-
type_label: string;
|
|
206
|
-
items: {
|
|
207
|
-
address: string;
|
|
208
|
-
type_label: string;
|
|
209
|
-
name: string | null;
|
|
210
|
-
time: number | null;
|
|
211
|
-
via: string | null;
|
|
212
|
-
explanation?: {
|
|
213
|
-
description: string | null;
|
|
214
|
-
table_refs: string[];
|
|
215
|
-
references_this_service: boolean;
|
|
216
|
-
submission_slots: number;
|
|
217
|
-
note: string;
|
|
218
|
-
} | null;
|
|
219
|
-
}[];
|
|
220
|
-
}[];
|
|
221
|
-
};
|
|
222
|
-
supply_chain: SupplyChainGraph | null;
|
|
223
|
-
business_report: BusinessReport | null;
|
|
224
|
-
recent_orders: PanoramaRecentOrders | null;
|
|
225
|
-
data_gaps: string[];
|
|
226
|
-
exploration?: ExplorationBlock;
|
|
227
|
-
}
|
|
228
|
-
export declare function handleServicePanorama(v: ProjectInput): Promise<ServicePanoramaResult>;
|
|
229
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{describe,it,expect,vi,beforeEach}from'vitest';const {sdkMocks}=vi['hoisted'](()=>({'sdkMocks':{'network_get':vi['fn'](),'localMarkList':vi['fn'](),'query_objects':vi['fn'](),'query_serviceContext':vi['fn'](),'queryTableItem_RepositoryData':vi['fn'](),'resolveAddress':vi['fn']()}}));vi['mock']('@wowok/wowok',async a=>{const b=await a();return{...b,'Config':{'Instance':()=>({'network_get':sdkMocks['network_get']})},'LocalMark':{'Instance':()=>({'list':sdkMocks['localMarkList']})},'query_objects':sdkMocks['query_objects'],'query_serviceContext':sdkMocks['query_serviceContext'],'queryTableItem_RepositoryData':sdkMocks['queryTableItem_RepositoryData']};}),vi['mock']('../../tools/handlers/name-resolution.js',()=>({'resolveAddress':sdkMocks['resolveAddress']})),vi['mock']('./facet-money.js',()=>({'formatMoneyAnnotation':async a=>({'display':a})}));import{handleServiceQuote}from'./service-quote.js';const SVC='0x'+'1'['repeat'](0x40),COUPON='0x'+'2'['repeat'](0x40),OTHER_SVC='0x'+'3'['repeat'](0x40),BUYER='0x'+'b'['repeat'](0x40),FLEXIBLE='Flexible\x20—\x20canal\x20view\x20double',LIST_TOTAL=0x35a4e900n;function makeCoupon(a={}){const b=Date['now']();return{'object':COUPON,'name':'bk3t-promo15','discount_type':0x0,'off':0x5dc,'benchmark':null,'time_start':b-0x5265c00,'time_end':b+0x5265c00,'service':SVC,'transferable':![],'owner':{'AddressOwner':BUYER},...a};}function quoteInput(a={}){return{'query_type':'service_quote','service_address':'bk3t-canal-stay','items':[{'name':FLEXIBLE,'quantity':0x1}],'context_network':'mainnet',...a};}beforeEach(()=>{vi['clearAllMocks'](),sdkMocks['network_get']['mockResolvedValue']('mainnet'),sdkMocks['localMarkList']['mockResolvedValue']([{'name':'bk3t-canal-stay'}]),sdkMocks['query_serviceContext']['mockResolvedValue']({'service':{'type_raw':'Service<0x2::wow::WOW>','sales':[{'name':FLEXIBLE,'price':{'balance':LIST_TOTAL['toString']()},'suspension':![]}]}}),sdkMocks['resolveAddress']['mockImplementation'](async a=>{if(a==='bk3t-canal-stay')return SVC;if(a==='bk3t-promo15'||a===COUPON)return COUPON;throw new Error('unresolvable:\x20'+a);}),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeCoupon()]});}),describe('service_quote\x20discount\x20pricing\x20(F-10)',()=>{it('no\x20discount\x20requested\x20→\x20undiscounted\x20total,\x20discount\x20block\x20null\x20(pre-fix\x20behavior\x20preserved)',async()=>{const a=await handleServiceQuote(quoteInput());expect(a['discount'])['toBeNull'](),expect(a['total_pay']['balance'])['toBe'](LIST_TOTAL['toString']());}),it('RATES\x20coupon\x20applies\x20with\x20integer\x20floor\x20division\x20—\x20reproduces\x20the\x20live\x20order\x20C\x20number',async()=>{const a=await handleServiceQuote(quoteInput({'discount':'bk3t-promo15'}));expect(a['discount'])['not']['toBeNull'](),expect(a['discount']['type'])['toBe']('rates'),expect(a['discount']['applied'])['toBe'](!![]),expect(a['discount']['list_total'])['toBe']('900000000'),expect(a['discount']['final_total'])['toBe']('765000000'),expect(a['total_pay']['balance'])['toBe']('765000000'),expect(a['total_pay']['note'])['toContain']('FLOOR\x20semantics'),expect(a['discount']['owned_by'])['toBe'](BUYER),expect(a['discount']['ownership_note'])['toContain']('owned\x20by\x20'+BUYER),expect(a['discount']['ownership_note'])['toContain']('only\x20the\x20holder\x20can\x20redeem'),expect(a['discount']['ownership_note'])['toContain']('cannot\x20be\x20applied\x20to\x20your\x20order'),expect(a['discount']['ownership_note'])['toContain']('Refunds\x20settle\x20the\x20post-coupon\x20amount\x20only');}),it('MINUS\x20coupon\x20subtracts\x20a\x20fixed\x20amount\x20and\x20clamps\x20at\x20zero',async()=>{sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeCoupon({'discount_type':0x1,'off':0x5f5e100})]});const a=await handleServiceQuote(quoteInput({'discount':COUPON}));expect(a['discount']['type'])['toBe']('minus'),expect(a['discount']['final_total'])['toBe']('800000000'),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeCoupon({'discount_type':0x1,'off':0x77359400})]});const b=await handleServiceQuote(quoteInput({'discount':COUPON}));expect(b['discount']['final_total'])['toBe']('0'),expect(b['discount']['note'])['toContain']('DEAD\x20BASKET'),expect(b['discount']['note'])['toContain']('REFUSES\x20zero-total'),expect(b['discount']['note'])['toContain']('allow_zero_total'),expect(b['discount']['note'])['toContain']('NOT\x20unlock\x20this\x20buy'),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeCoupon({'discount_type':0x1,'off':0x5f5e100})]});const c=await handleServiceQuote(quoteInput({'discount':COUPON}));expect(c['discount']['note'])['toContain']('Discounted\x20total\x20shown\x20—\x20order_new.buy.total_pay.balance\x20must\x20be\x20>=\x20this\x20final_total'),expect(c['discount']['note'])['toContain']('BURN-ON-USE'),expect(c['discount']['note'])['toContain']('CANCELLATION\x20REFUNDS\x20THE\x20DISCOUNTED\x20AMOUNT\x20ONLY');}),it('unmet\x20benchmark\x20→\x20applied:false\x20+\x20attach\x20warning,\x20total\x20stays\x20at\x20list\x20price\x20(NOT\x20thrown)',async()=>{sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeCoupon({'benchmark':(LIST_TOTAL+0x1n)['toString']()})]});const a=await handleServiceQuote(quoteInput({'discount':COUPON}));expect(a['discount']['applied'])['toBe'](![]),expect(a['discount']['benchmark_met'])['toBe'](![]),expect(a['total_pay']['balance'])['toBe'](LIST_TOTAL['toString']()),expect(a['discount']['note'])['toContain']('REJECTS'),expect(a['discount']['note'])['toContain']('coupon\x20preserved');}),it('benchmark\x20exactly\x20met\x20→\x20applies\x20(chain\x20uses\x20>=)',async()=>{sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeCoupon({'benchmark':LIST_TOTAL['toString']()})]});const a=await handleServiceQuote(quoteInput({'discount':COUPON}));expect(a['discount']['applied'])['toBe'](!![]),expect(a['discount']['final_total'])['toBe']('765000000');}),it('benchmark\x20None\x20always\x20applies\x20(corrected\x20old\x20docs\x20claim)',async()=>{const a=await handleServiceQuote(quoteInput({'discount':COUPON}));expect(a['discount']['benchmark'])['toBeNull'](),expect(a['discount']['applied'])['toBe'](!![]);}),it('coupon\x20bound\x20to\x20another\x20service\x20→\x20rejected\x20like\x20the\x20chain\x20abort\x20(E_SERVICE_DISCOUNT_NOT_MATCH)',async()=>{sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeCoupon({'service':OTHER_SVC})]}),await expect(handleServiceQuote(quoteInput({'discount':COUPON})))['rejects']['toThrow'](/E_SERVICE_DISCOUNT_NOT_MATCH/);}),it('coupon\x20outside\x20its\x20time\x20window\x20→\x20rejected\x20like\x20the\x20chain\x20abort\x20(E_DISCOUNT_TIME_INVALID)',async()=>{const a=Date['now']();sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeCoupon({'time_start':a+0x3e8,'time_end':a+0x186a0})]}),await expect(handleServiceQuote(quoteInput({'discount':COUPON})))['rejects']['toThrow'](/E_DISCOUNT_TIME_INVALID/);}),it('KB-02\x20attribution:\x20owner\x20unwraps\x20from\x20the\x20ObjectOwner\x20enum\x20shapes\x20and\x20stays\x20fail-soft\x20when\x20unreadable',async()=>{sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeCoupon({'owner':{'ObjectOwner':BUYER}})]});const a=await handleServiceQuote(quoteInput({'discount':COUPON}));expect(a['discount']['owned_by'])['toBe'](BUYER),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeCoupon({'owner':BUYER})]});const b=await handleServiceQuote(quoteInput({'discount':COUPON}));expect(b['discount']['owned_by'])['toBe'](BUYER),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeCoupon({'owner':undefined})]});const c=await handleServiceQuote(quoteInput({'discount':COUPON}));expect(c['discount']['owned_by'])['toBeNull'](),expect(c['discount']['ownership_note'])['toContain']('could\x20not\x20be\x20read'),expect(c['discount']['ownership_note'])['toContain']('only\x20the\x20holder\x20can\x20redeem'),expect(c['discount']['ownership_note'])['toContain']('have\x20the\x20owner\x20transfer\x20it\x20first');}),it('unknown\x20coupon\x20object\x20→\x20clear\x20rejection,\x20never\x20a\x20silent\x20full-price\x20quote',async()=>{sdkMocks['query_objects']['mockResolvedValue']({'objects':[]}),await expect(handleServiceQuote(quoteInput({'discount':COUPON})))['rejects']['toThrow'](/not found/);}),it('paused\x20service\x20(bs29\x20R-16)\x20→\x20paused:true\x20+\x20PAUSED\x20warning\x20on\x20the\x20total_pay\x20note',async()=>{sdkMocks['query_serviceContext']['mockResolvedValue']({'service':{'type_raw':'Service<0x2::wow::WOW>','paused':!![],'sales':[{'name':FLEXIBLE,'price':{'balance':LIST_TOTAL['toString']()},'suspension':![]}]}});const a=await handleServiceQuote(quoteInput());expect(a['paused'])['toBe'](!![]),expect(a['total_pay']['note'])['toContain']('SERVICE\x20PAUSED'),expect(a['total_pay']['note'])['toContain']('pause:false'),expect(a['total_pay']['balance'])['toBe'](LIST_TOTAL['toString']()),sdkMocks['query_serviceContext']['mockResolvedValue']({'service':{'type_raw':'Service<0x2::wow::WOW>','bPaused':!![],'sales':[{'name':FLEXIBLE,'price':{'balance':LIST_TOTAL['toString']()},'suspension':![]}]}});const b=await handleServiceQuote(quoteInput());expect(b['paused'])['toBe'](!![]);});});const REWARD='0x'+'4'['repeat'](0x40),CLAIM_GUARD='0x'+'5'['repeat'](0x40);function makeReward(a={}){return{'object':REWARD,'description':'5-star\x20review\x20reward','balance':'500000000','record_count':0x3,'guards':[{'guard':CLAIM_GUARD,'amount':{'type':0x1,'value':'100000000'},'expiration_time':Date['now']()+0x5265c00}],...a};}function svcWithRewards(...a){sdkMocks['query_serviceContext']['mockResolvedValue']({'service':{'type_raw':'Service<0x2::wow::WOW>','sales':[{'name':FLEXIBLE,'price':{'balance':LIST_TOTAL['toString']()},'suspension':![]}],'rewards':a}});}describe('service_quote\x20reward\x20terms\x20(review\x20component\x20b2-5)',()=>{it('no\x20rewards\x20on\x20the\x20Service\x20→\x20reward_terms\x20null',async()=>{const a=await handleServiceQuote(quoteInput());expect(a['reward_terms'])['toBeNull']();}),it('fixed\x20amount\x20+\x20live\x20window\x20→\x20terms\x20with\x20coverage\x20estimate,\x20expired:false,\x20no\x20gaps',async()=>{svcWithRewards(REWARD),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeReward()]});const a=await handleServiceQuote(quoteInput());expect(a['reward_terms'])['not']['toBeNull']();const b=a['reward_terms']['rewards'][0x0];expect(b['reward'])['toBe'](REWARD),expect(b['description'])['toBe']('5-star\x20review\x20reward'),expect(b['pool_balance'])['toBe']('500000000'),expect(b['record_count'])['toBe'](0x3),expect(b['claims'][0x0]['guard'])['toBe'](CLAIM_GUARD),expect(b['claims'][0x0]['amount_type'])['toBe']('fixed'),expect(b['claims'][0x0]['amount'])['toBe']('100000000'),expect(b['claims'][0x0]['expired'])['toBe'](![]),expect(b['coverage'])['toMatch'](/~5 further claim/),expect(a['reward_terms']['data_gaps'])['toEqual']([]),expect(a['total_pay']['balance'])['toBe'](LIST_TOTAL['toString']());}),it('empty\x20pool\x20→\x20EMPTY\x20coverage\x20warning;\x20expired\x20window\x20→\x20expired:true',async()=>{svcWithRewards(REWARD),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeReward({'balance':'0','guards':[{'guard':CLAIM_GUARD,'amount':{'type':0x1,'value':'100000000'},'expiration_time':Date['now']()-0x3e8}]})]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0];expect(b['claims'][0x0]['expired'])['toBe'](!![]),expect(b['coverage'])['toContain']('EMPTY'),expect(b['coverage'])['toContain']('E_INSUFFICIENT_BALANCE');}),it('guard_submission\x20amount\x20→\x20coverage\x20null\x20(guard-decided),\x20amount\x20carries\x20the\x20submission\x20identifier',async()=>{svcWithRewards(REWARD),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeReward({'guards':[{'guard':CLAIM_GUARD,'amount':{'type':0x0,'value':0x7}}]})]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0];expect(b['claims'][0x0]['amount_type'])['toBe']('guard_submission'),expect(b['claims'][0x0]['amount'])['toContain']('7'),expect(b['claims'][0x0]['amount_display'])['toBeNull'](),expect(b['coverage'])['toBeNull']();}),it('no\x20window\x20set\x20→\x20expiration\x20null\x20and\x20expired\x20null\x20(claimable\x20until\x20guard\x20removal)',async()=>{svcWithRewards(REWARD),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeReward({'guards':[{'guard':CLAIM_GUARD,'amount':{'type':0x1,'value':'100000000'}}]})]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['claims'][0x0];expect(b['expiration_time'])['toBeNull'](),expect(b['expiration_display'])['toBeNull'](),expect(b['expired'])['toBeNull'](),expect(b['claim_window'])['toBeNull'](),expect(b['claim_state'])['toBe']('unknown');}),it('R-09\x20claim\x20window\x20decodes\x20from\x20the\x20guard\x27s\x20Clock\x20comparison\x20(order.time\x20+\x20600s\x20upper)',async()=>{svcWithRewards(REWARD);const a={'object':CLAIM_GUARD,'root':[{'type':'logic_as_u256_lesser_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'calc_number_add','nodes':[{'type':'query','query':'order.time'},{'type':'identifier','identifier':'600000'}]}]}],'table':[{'identifier':'600000','b_submission':![],'value':0x927c0}]};sdkMocks['query_objects']['mockResolvedValueOnce']({'objects':[makeReward()]})['mockResolvedValueOnce']({'objects':[a]});const b=await handleServiceQuote(quoteInput()),d=b['reward_terms']['rewards'][0x0]['claims'][0x0];expect(d['claim_window'])['toEqual']({'opens_after_s':null,'closes_after_s':0x258,'anchor':'order.time'}),expect(d['min_rating'])['toBeNull'](),expect(d['claim_state'])['toBe']('open_window'),expect(d['claim_state_note'])['toContain']('Claimable\x20at\x20the\x20anchor\x20event'),expect(b['reward_terms']['data_gaps'])['toEqual']([]);}),it('bsw4\x20F-11\x20claim_state:\x20opens\x2014d\x20+\x20a\x20further\x2014d\x20span\x20→\x20delayed_window\x20with\x20buyer-language\x20note',async()=>{svcWithRewards(REWARD);const a={'object':CLAIM_GUARD,'root':[{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'calc_number_add','nodes':[{'type':'query_progress_history_time'},{'type':'calc_number_multiply','nodes':[{'type':'identifier','identifier':'5'},{'type':'identifier','identifier':'13'}]}]}]},{'type':'logic_as_u256_lesser_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'calc_number_add','nodes':[{'type':'query_progress_history_time'},{'type':'calc_number_multiply','nodes':[{'type':'identifier','identifier':'5'},{'type':'identifier','identifier':'13'}]},{'type':'calc_number_multiply','nodes':[{'type':'identifier','identifier':'12'},{'type':'identifier','identifier':'13'}]}]}]}],'table':[{'identifier':'5','b_submission':![],'value':0xe},{'identifier':'12','b_submission':![],'value':0xe},{'identifier':'13','b_submission':![],'value':0x5265c00}]};sdkMocks['query_objects']['mockResolvedValueOnce']({'objects':[makeReward()]})['mockResolvedValueOnce']({'objects':[a]});const b=await handleServiceQuote(quoteInput()),d=b['reward_terms']['rewards'][0x0]['claims'][0x0];expect(d['claim_window'])['toEqual']({'opens_after_s':0x127500,'closes_after_s':0x24ea00,'anchor':'progress.history.time'}),expect(d['claim_state'])['toBe']('delayed_window'),expect(d['claim_state_note'])['toContain']('Opens\x2014\x20day(s)'),expect(d['claim_state_note'])['toContain']('a\x20further\x2014\x20day(s)'),expect(d['claim_state_note'])['toContain']('hard\x20deadline\x2028\x20day(s)');}),it('bsw4\x20F-11\x20claim_state:\x20opens-only\x20guard\x20(v76\x20archetype)\x20→\x20delayed_open_ended,\x20NEVER-closes\x20disclosed',async()=>{svcWithRewards(REWARD);const a={'object':CLAIM_GUARD,'root':[{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'calc_number_add','nodes':[{'type':'query_progress_history_time'},{'type':'identifier','identifier':'5'}]}]}],'table':[{'identifier':'5','b_submission':![],'value':0x48190800}]};sdkMocks['query_objects']['mockResolvedValueOnce']({'objects':[makeReward()]})['mockResolvedValueOnce']({'objects':[a]});const b=await handleServiceQuote(quoteInput()),d=b['reward_terms']['rewards'][0x0]['claims'][0x0];expect(d['claim_state'])['toBe']('delayed_open_ended'),expect(d['claim_state_note'])['toContain']('NEVER\x20closes'),expect(d['claim_state_note'])['toContain']('bsw4\x20F-11');}),it('ddmc4\x20B-33:\x20rating_floor\x20/\x20opens_after_days\x20/\x20closes_after_days\x20/\x20per_order_limit\x20surface\x20from\x20the\x20decoded\x20guard',async()=>{svcWithRewards(REWARD);const a={'object':CLAIM_GUARD,'root':[{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'calc_number_add','nodes':[{'type':'query_progress_history_time'},{'type':'calc_number_multiply','nodes':[{'type':'identifier','identifier':'5'},{'type':'identifier','identifier':'13'}]}]}]},{'type':'logic_as_u256_lesser_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'calc_number_add','nodes':[{'type':'query_progress_history_time'},{'type':'calc_number_multiply','nodes':[{'type':'identifier','identifier':'5'},{'type':'identifier','identifier':'13'}]},{'type':'calc_number_multiply','nodes':[{'type':'identifier','identifier':'12'},{'type':'identifier','identifier':'13'}]}]}]},{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'query','query':'repository.data','object':{'identifier':0x9},'parameters':[]},{'type':'identifier','identifier':'4'}]}],'table':[{'identifier':0x5,'b_submission':![],'value':0xe},{'identifier':0xc,'b_submission':![],'value':0xe},{'identifier':0xd,'b_submission':![],'value':0x5265c00},{'identifier':0x4,'b_submission':![],'value':0x4},{'identifier':0x9,'b_submission':![],'value_type':'String','value':'rating'}]};sdkMocks['query_objects']['mockResolvedValueOnce']({'objects':[makeReward({'guards':[{'guard':CLAIM_GUARD,'amount':{'type':0x1,'value':'100000000'},'store_from_id':0x0}]})]})['mockResolvedValueOnce']({'objects':[a]});const b=await handleServiceQuote(quoteInput()),c=b['reward_terms']['rewards'][0x0];expect(c['rating_floor'])['toBe'](0x4),expect(c['opens_after_days'])['toBe'](0xe),expect(c['closes_after_days'])['toBe'](0xe),expect(c['per_order_limit'])['toBe'](0x1);}),it('ddmc4\x20B-33:\x20undecoded\x20faces\x20stay\x20null\x20(no\x20rating\x20leg,\x20no\x20day\x20window,\x20unstamped\x20claim)\x20—\x20never\x20a\x20fabricated\x20number',async()=>{svcWithRewards(REWARD),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeReward()]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0];expect(b['rating_floor'])['toBeNull'](),expect(b['opens_after_days'])['toBeNull'](),expect(b['closes_after_days'])['toBeNull'](),expect(b['per_order_limit'])['toBeNull']();}),it('unreadable\x20reward\x20object\x20→\x20data_gaps\x20note,\x20quote\x20still\x20succeeds\x20(fail-soft)',async()=>{svcWithRewards(REWARD),sdkMocks['query_objects']['mockResolvedValue']({'objects':[]});const a=await handleServiceQuote(quoteInput());expect(a['reward_terms'])['not']['toBeNull'](),expect(a['reward_terms']['rewards'])['toEqual']([]),expect(a['reward_terms']['data_gaps'][0x0])['toContain'](REWARD),expect(a['total_pay']['balance'])['toBe'](LIST_TOTAL['toString']());}),it('reward\x20lookup\x20throws\x20→\x20whole\x20lookup\x20degrades\x20to\x20one\x20gap\x20note,\x20never\x20thrown',async()=>{svcWithRewards(REWARD),sdkMocks['query_objects']['mockRejectedValue'](new Error('rpc\x20down'));const a=await handleServiceQuote(quoteInput());expect(a['reward_terms']['rewards'])['toEqual']([]),expect(a['reward_terms']['data_gaps'][0x0])['toContain']('rpc\x20down'),expect(a['total_pay']['balance'])['toBe'](LIST_TOTAL['toString']());}),it('unstamped\x20claim\x20guard\x20→\x20replay_scope\x20once_per_recipient_guard\x20with\x20abort\x2013\x20+\x20254\x20note',async()=>{svcWithRewards(REWARD),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeReward()]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['replay_scope'];expect(b['scope'])['toBe']('once_per_recipient_guard'),expect(b['detail'])['toContain']('for\x20LIFE'),expect(b['detail'])['toContain']('abort\x2013'),expect(b['detail'])['toContain']('E_CLAIM_ALREADY_MADE'),expect(b['per_order_note'])['toContain']('254'),expect(b['per_order_note'])['toContain']('store_from_id');}),it('store_from_id=0\x20→\x20replay_scope\x20once_per_order',async()=>{svcWithRewards(REWARD),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeReward({'guards':[{'guard':CLAIM_GUARD,'amount':{'type':0x1,'value':'100000000'},'store_from_id':0x0}]})]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['replay_scope'];expect(b['scope'])['toBe']('once_per_order'),expect(b['detail'])['toContain']('once\x20key\x20is\x20(guard,\x20order)'),expect(b['detail'])['toContain']('E_CLAIM_ALREADY_MADE');}),it('stamp\x20on\x20a\x20non-Order\x20slot\x20→\x20replay_scope\x20once_per_stamp\x20(no\x20overclaim)',async()=>{svcWithRewards(REWARD),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeReward({'guards':[{'guard':CLAIM_GUARD,'amount':{'type':0x1,'value':'100000000'},'store_from_id':0x2}]})]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['replay_scope'];expect(b['scope'])['toBe']('once_per_stamp'),expect(b['detail'])['toContain']('slots:\x202'),expect(b['detail'])['toContain']('per-ORDER\x20only\x20when');}),it('mixed\x20stamped/unstamped\x20guards\x20→\x20replay_scope\x20mixed;\x20no\x20guards\x20→\x20unknown',async()=>{svcWithRewards(REWARD),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeReward({'guards':[{'guard':CLAIM_GUARD,'amount':{'type':0x1,'value':'1'},'store_from_id':0x0},{'guard':'0x'+'6'['repeat'](0x40),'amount':{'type':0x1,'value':'1'}}]})]});const a=await handleServiceQuote(quoteInput());expect(a['reward_terms']['rewards'][0x0]['replay_scope']['scope'])['toBe']('mixed'),expect(a['reward_terms']['rewards'][0x0]['replay_scope']['detail'])['toContain']('1\x20of\x202'),sdkMocks['query_objects']['mockResolvedValue']({'objects':[makeReward({'guards':[]})]});const b=await handleServiceQuote(quoteInput());expect(b['reward_terms']['rewards'][0x0]['replay_scope']['scope'])['toBe']('unknown');});});function ratingFloorGuard(a={}){return{'object':CLAIM_GUARD,'root':{'type':'logic_and','nodes':[{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'query','query':'repository.data.rating'},{'type':'identifier','identifier':'4'}]}]},'table':[{'identifier':0x4,'b_submission':![],'value':0x4}],...a};}function mockRewardThenGuard(a){sdkMocks['query_objects']['mockResolvedValueOnce']({'objects':[makeReward()]})['mockResolvedValueOnce']({'objects':[a]});}describe('service_quote\x20min_rating\x20signal\x20detection\x20(R2-02)',()=>{it('UTF-8\x20byte-array\x20rating\x20key\x20→\x20the\x20floor\x20decodes\x20(NOT\x20null)',async()=>{svcWithRewards(REWARD),mockRewardThenGuard(ratingFloorGuard({'rating_key':[0x72,0x61,0x74,0x69,0x6e,0x67]}));const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['claims'][0x0];expect(b['min_rating'])['toBe']('>=\x204'),expect(a['reward_terms']['data_gaps'])['toEqual']([]);}),it('hex-encoded\x20rating\x20key\x20→\x20the\x20floor\x20decodes\x20(NOT\x20null)',async()=>{svcWithRewards(REWARD),mockRewardThenGuard(ratingFloorGuard({'rating_key_hex':'726174696e67'}));const a=await handleServiceQuote(quoteInput());expect(a['reward_terms']['rewards'][0x0]['claims'][0x0]['min_rating'])['toBe']('>=\x204');}),it('base64-encoded\x20rating\x20key\x20→\x20the\x20floor\x20decodes\x20(NOT\x20null)',async()=>{svcWithRewards(REWARD),mockRewardThenGuard(ratingFloorGuard({'rating_key_b64':'cmF0aW5n'}));const a=await handleServiceQuote(quoteInput());expect(a['reward_terms']['rewards'][0x0]['claims'][0x0]['min_rating'])['toBe']('>=\x204');}),it('ddmc2\x20F-09:\x20AGGREGATE\x20gate\x20count_where(rating\x20>=\x204)\x20>=\x201\x20decodes\x20the\x20INNER\x20floor\x20(>=\x204),\x20the\x20OUTER\x20row\x20count\x20rides\x20min_rows',async()=>{svcWithRewards(REWARD),mockRewardThenGuard({'object':CLAIM_GUARD,'root':{'type':'logic_and','nodes':[{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'query','query':'query_repository_data_count_where','object':{'identifier':0x0},'key':{'identifier':0x2},'where':{'kind':'gte','value':'4'}},{'type':'identifier','identifier':0x1}]}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address'},{'identifier':0x1,'b_submission':![],'value':0x1},{'identifier':0x2,'b_submission':![],'value_type':'String','value':'rating'}]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['claims'][0x0];expect(b['min_rating'])['toBe']('>=\x204'),expect(b['min_rows'])['toBe'](0x1);}),it('ddmc2\x20F-09\x20twin:\x20a\x20NON-numeric\x20aggregate\x20where\x20(addressEq\x20referral\x20count)\x20is\x20NOT\x20a\x20rating\x20floor\x20—\x20min_rating\x20unknown,\x20min_rows\x20still\x20surfaced',async()=>{svcWithRewards(REWARD),mockRewardThenGuard({'object':CLAIM_GUARD,'root':{'type':'logic_and','nodes':[{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'query','query':'query_repository_data_count_where','object':{'identifier':0x0},'key':{'identifier':0x2},'where':{'kind':'addressEq','identifier':0x3}},{'type':'identifier','identifier':0x1}]}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address'},{'identifier':0x1,'b_submission':![],'value':0x3},{'identifier':0x2,'b_submission':![],'value_type':'String','value':'rating'},{'identifier':0x3,'b_submission':![],'value_type':'Address'}]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['claims'][0x0];expect(b['min_rating'])['toBe']('unknown'),expect(b['min_rows'])['toBe'](0x3);}),it('no\x20rating\x20signal\x20at\x20all\x20→\x20min_rating\x20stays\x20null\x20(unconditional,\x20NOT\x20unknown)',async()=>{svcWithRewards(REWARD),mockRewardThenGuard(ratingFloorGuard());const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['claims'][0x0];expect(b['min_rating'])['toBeNull'](),expect(a['reward_terms']['data_gaps'])['toEqual']([]);}),it('rating\x20signal\x20present\x20but\x20the\x20structure\x20is\x20not\x20a\x20decodable\x20floor\x20→\x20unknown\x20+\x20data_gaps\x20disclosure',async()=>{svcWithRewards(REWARD),mockRewardThenGuard({'object':CLAIM_GUARD,'root':{'type':'logic_and','nodes':[{'type':'logic_equal','nodes':[{'type':'query','query':'repository.data.rating'},{'type':'identifier','identifier':'4'}]}]},'table':[{'identifier':0x4,'b_submission':![],'value':0x4}],'rating_key':[0x72,0x61,0x74,0x69,0x6e,0x67]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['claims'][0x0];expect(b['min_rating'])['toBe']('unknown'),expect(a['reward_terms']['data_gaps']['some'](d=>d['includes']('min_rating=unknown')))['toBe'](!![]);});}),describe('service_quote\x20unreadable_legs\x20(W5-11③)',()=>{it('find_where\x20+\x20vec_contains\x20membership\x20gate\x20→\x20min_rating\x20unknown\x20AND\x20the\x20leg\x20named',async()=>{svcWithRewards(REWARD),mockRewardThenGuard({'object':CLAIM_GUARD,'root':{'type':'logic_and','nodes':[{'type':'vec_contains_address','nodes':[{'type':'query','query':'query_repository_data_find_where','object':{'identifier':0x0},'key':{'identifier':0x2},'where':{'kind':'gte','value':'4'}},{'type':'identifier','identifier':0x3}]}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address'},{'identifier':0x2,'b_submission':![],'value_type':'String','value':'rating'},{'identifier':0x3,'b_submission':![],'value_type':'Address'}]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['claims'][0x0];expect(b['min_rating'])['toBe']('unknown'),expect(b['unreadable_legs'])['toHaveLength'](0x1),expect(b['unreadable_legs'][0x0])['toContain']('vec_contains_address'),expect(b['unreadable_legs'][0x0])['toContain']('find_where'),expect(b['unreadable_legs'][0x0])['toContain']('not\x20statically\x20decodable');}),it('a\x20decoded\x20numeric\x20floor\x20leaves\x20unreadable_legs\x20null\x20(the\x20leg\x20DID\x20decode)',async()=>{svcWithRewards(REWARD),mockRewardThenGuard(ratingFloorGuard({'rating_key':[0x72,0x61,0x74,0x69,0x6e,0x67]}));const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['claims'][0x0];expect(b['min_rating'])['toBe']('>=\x204'),expect(b['unreadable_legs'])['toBeNull']();}),it('an\x20unknown\x20shape\x20with\x20NO\x20recognized\x20membership\x20leg\x20stays\x20unknown\x20with\x20unreadable_legs\x20null\x20(no\x20noise)',async()=>{svcWithRewards(REWARD),mockRewardThenGuard({'object':CLAIM_GUARD,'root':{'type':'logic_and','nodes':[{'type':'logic_equal','nodes':[{'type':'query','query':'repository.data.rating'},{'type':'identifier','identifier':'4'}]}]},'table':[{'identifier':0x4,'b_submission':![],'value':0x4}],'rating_key':[0x72,0x61,0x74,0x69,0x6e,0x67]});const a=await handleServiceQuote(quoteInput()),b=a['reward_terms']['rewards'][0x0]['claims'][0x0];expect(b['min_rating'])['toBe']('unknown'),expect(b['unreadable_legs'])['toBeNull']();});}),describe('service_quote\x20stock\x20disclosure\x20(S4-03\x20/\x20F-20)',()=>{function a(b,c=![]){sdkMocks['query_serviceContext']['mockResolvedValue']({'service':{'type_raw':'Service<0x2::wow::WOW>','sales':[{'name':FLEXIBLE,'price':{'balance':LIST_TOTAL['toString']()},'suspension':c,'stock':b}]}});}it('stock\x20below\x20quantity\x20→\x20stock_ok:false\x20+\x20STOCK\x20SHORT\x20warning\x20(the\x20buy\x20WILL\x20abort)',async()=>{a({'balance':'2'});const b=await handleServiceQuote(quoteInput({'items':[{'name':FLEXIBLE,'quantity':0x3}]}));expect(b['items'][0x0]['stock'])['toBe']('2'),expect(b['items'][0x0]['stock_ok'])['toBe'](![]),expect(b['total_pay']['note'])['toContain']('STOCK\x20SHORT'),expect(b['total_pay']['note'])['toContain']('E_STOCK_NOT_ENOUGH'),expect(b['total_pay']['note'])['toContain']('asked\x203,\x20stock\x202'),expect(b['total_pay']['balance'])['toBe']((LIST_TOTAL*0x3n)['toString']());}),it('stock\x20at/above\x20quantity\x20→\x20stock_ok:true,\x20no\x20false\x20alarm\x20on\x20the\x20note',async()=>{a({'balance':'10'});const b=await handleServiceQuote(quoteInput());expect(b['items'][0x0]['stock'])['toBe']('10'),expect(b['items'][0x0]['stock_ok'])['toBe'](!![]),expect(b['total_pay']['note'])['not']['toContain']('STOCK\x20SHORT');}),it('plain-number\x20stock\x20(unwrapped\x20transport)\x20decodes\x20the\x20same',async()=>{a('0');const b=await handleServiceQuote(quoteInput());expect(b['items'][0x0]['stock'])['toBe']('0'),expect(b['items'][0x0]['stock_ok'])['toBe'](![]),expect(b['total_pay']['note'])['toContain']('STOCK\x20SHORT');}),it('unreadable\x20stock\x20→\x20null/null\x20(honest\x20gap,\x20never\x20a\x20fabricated\x20ok\x20or\x20a\x20false\x20alarm)',async()=>{a(undefined);const b=await handleServiceQuote(quoteInput());expect(b['items'][0x0]['stock'])['toBeNull'](),expect(b['items'][0x0]['stock_ok'])['toBeNull'](),expect(b['total_pay']['note'])['not']['toContain']('STOCK\x20SHORT');});});function svcWithFund(a){sdkMocks['query_serviceContext']['mockResolvedValue']({'service':{'type_raw':'Service<0x2::wow::WOW>','sales':[{'name':FLEXIBLE,'price':{'balance':LIST_TOTAL['toString']()},'suspension':![]}],'compensation_fund':a}});}describe('service_quote\x20compensation_fund_coverage\x20(b6-11)',()=>{it('no\x20fund\x20→\x20covered:false\x20with\x20the\x20no-protection\x20disclosure\x20(never\x20blocked)',async()=>{const a=await handleServiceQuote(quoteInput());expect(a['compensation_fund_coverage'])['not']['toBeNull'](),expect(a['compensation_fund_coverage']['fund_balance'])['toBe']('0'),expect(a['compensation_fund_coverage']['required_for_this_basket'])['toBe']('2700000000'),expect(a['compensation_fund_coverage']['covered'])['toBe'](![]),expect(a['compensation_fund_coverage']['note'])['toContain']('WITHOUT\x20a\x20compensation\x20fund'),expect(a['compensation_fund_coverage']['note'])['toContain']('never\x20blocked');}),it('fund\x20at/over\x203x\x20the\x20basket\x20→\x20covered:true',async()=>{svcWithFund('2700000000');const a=await handleServiceQuote(quoteInput());expect(a['compensation_fund_coverage']['covered'])['toBe'](!![]),expect(a['compensation_fund_coverage']['note'])['toContain']('payable\x20from\x20the\x20pool');}),it('fund\x20short\x20→\x20covered:false\x20and\x20the\x20note\x20names\x20the\x20warning\x20+\x20error\x20code\x20anchor',async()=>{svcWithFund('100000000');const a=await handleServiceQuote(quoteInput());expect(a['compensation_fund_coverage']['covered'])['toBe'](![]),expect(a['compensation_fund_coverage']['note'])['toContain']('PROCEEDS\x20with\x20a\x20warning'),expect(a['compensation_fund_coverage']['note'])['toContain']('compensation_fund_below_order_ceiling'),expect(a['compensation_fund_coverage']['note'])['toContain']('compensation_fund_add');}),it('shortfall\x20states\x20the\x20exact\x20top-up\x20(required\x20-\x20fund;\x20etsy-gf\x20R1:\x20no\x20reader\x20subtraction)',async()=>{svcWithFund('1000000000');const a=await handleServiceQuote(quoteInput());expect(a['compensation_fund_coverage']['shortfall'])['toBe']('1700000000'),expect(a['compensation_fund_coverage']['note'])['toContain']('by'),svcWithFund('2700000000');const b=await handleServiceQuote(quoteInput());expect(b['compensation_fund_coverage']['shortfall'])['toBe']('0'),svcWithFund('0');const c=await handleServiceQuote(quoteInput());expect(c['compensation_fund_coverage']['shortfall'])['toBe']('2700000000');}),it('F-OF2-06:\x20max_coverable_order\x20names\x20the\x20storefront\x20price\x20cap\x20(fund/3)\x20in\x20every\x20fund\x20state',async()=>{const a=await handleServiceQuote(quoteInput());expect(a['compensation_fund_coverage']['max_coverable_order'])['toBe']('0'),svcWithFund('2700000000');const b=await handleServiceQuote(quoteInput());expect(b['compensation_fund_coverage']['max_coverable_order'])['toBe']('900000000'),expect(b['compensation_fund_coverage']['note'])['toContain']('ceiling'),svcWithFund('1000000000');const c=await handleServiceQuote(quoteInput());expect(c['compensation_fund_coverage']['max_coverable_order'])['toBe']('333333333'),expect(c['compensation_fund_coverage']['note'])['toContain']('orders\x20above');}),it('required\x20base\x20is\x20the\x20DISCOUNTED\x20total\x20(what\x20the\x20order\x20actually\x20pays)',async()=>{svcWithFund('2295000000');const a=await handleServiceQuote(quoteInput({'discount':'bk3t-promo15'}));expect(a['total_pay']['balance'])['toBe']('765000000'),expect(a['compensation_fund_coverage']['required_for_this_basket'])['toBe']('2295000000'),expect(a['compensation_fund_coverage']['covered'])['toBe'](!![]);});}),describe('service_quote\x20dispute\x20filing\x20boundary\x20(ddmc2\x20F-02)',()=>{function a(b){sdkMocks['query_serviceContext']['mockResolvedValue']({'service':{'type_raw':'Service<0x2::wow::WOW>','sales':[{'name':FLEXIBLE,'price':{'balance':LIST_TOTAL['toString']()},'suspension':![]}],'arbitrations':b}});}it('arbitration-bound\x20Service\x20→\x20DISPUTE\x20FILING\x20BOUNDARY\x20on\x20the\x20total\x20note\x20(with\x20the\x20real-case\x20self-defense)',async()=>{a(['0xabc']);const b=await handleServiceQuote(quoteInput());expect(b['total_pay']['note'])['toContain']('DISPUTE\x20FILING\x20BOUNDARY'),expect(b['total_pay']['note'])['toContain']('does\x20NOT\x20require\x20an\x20arbitration\x20case'),expect(b['total_pay']['note'])['toContain']('append-only'),expect(b['total_pay']['note'])['toContain']('Arbitration.dispute');}),it('no\x20arbitration\x20binding\x20→\x20no\x20dispute\x20disclosure\x20(nothing\x20to\x20wedge)',async()=>{a([]);const b=await handleServiceQuote(quoteInput());expect(b['total_pay']['note'])['not']['toContain']('DISPUTE\x20FILING\x20BOUNDARY');}),it('missing/unordered\x20arbitrations\x20field\x20→\x20no\x20false\x20disclosure',async()=>{a(undefined);const b=await handleServiceQuote(quoteInput());expect(b['total_pay']['note'])['not']['toContain']('DISPUTE\x20FILING\x20BOUNDARY');});}),describe('service_quote\x20buyable\x20verdict\x20(F-RQ-01)',()=>{const a='行李门到门转运服务七十二小时送达超时全额赔付保障条款'['slice'](0x0,0x1e),b='x'['repeat'](0x50);function c(...d){sdkMocks['query_serviceContext']['mockResolvedValue']({'service':{'type_raw':'Service<0x2::wow::WOW>','sales':d['map'](e=>({'price':{'balance':LIST_TOTAL['toString']()},'suspension':![],...e}))}});}it('over-limit\x20CJK\x20name\x20(90\x20bytes)\x20→\x20line\x20buyable:false\x20+\x20UNBUYABLE\x20BASKET,\x20price\x20still\x20quoted',async()=>{c({'name':a,'stock':{'balance':'9'}});const d=await handleServiceQuote(quoteInput({'items':[{'name':a,'quantity':0x1}]}));expect(d['items'][0x0]['stock_ok'])['toBe'](!![]),expect(d['items'][0x0]['buyable'])['toBe'](![]),expect(d['items'][0x0]['buyable_blockers'][0x0])['toContain']('64-byte'),expect(d['buyable']['purchasable'])['toBe'](![]),expect(d['buyable']['blocked_items'])['toEqual']([a]),expect(d['buyable']['note'])['toContain']('UNBUYABLE\x20SKU\x20NAME'),expect(d['buyable']['note'])['toContain']('abort\x201'),expect(d['buyable']['note'])['toContain']('NEW\x20SKU'),expect(d['total_pay']['note'])['toContain']('UNBUYABLE\x20BASKET'),expect(d['total_pay']['balance'])['toBe'](LIST_TOTAL['toString']());}),it('over-limit\x20ASCII\x20name\x20(80\x20bytes)\x20→\x20same\x20verdict\x20(byte-length,\x20not\x20char-count)',async()=>{c({'name':b,'stock':{'balance':'9'}});const d=await handleServiceQuote(quoteInput({'items':[{'name':b,'quantity':0x1}]}));expect(d['items'][0x0]['buyable'])['toBe'](![]),expect(d['items'][0x0]['buyable_blockers'][0x0])['toContain']('80\x20bytes');}),it('64\x20bytes\x20exactly\x20→\x20buyable:true\x20(the\x20limit\x20is\x20inclusive)',async()=>{const d='y'['repeat'](0x40);c({'name':d,'stock':{'balance':'9'}});const e=await handleServiceQuote(quoteInput({'items':[{'name':d,'quantity':0x1}]}));expect(e['items'][0x0]['buyable'])['toBe'](!![]),expect(e['buyable']['purchasable'])['toBe'](!![]),expect(e['buyable']['note'])['toContain']('Every\x20line\x20passes'),expect(e['total_pay']['note'])['not']['toContain']('UNBUYABLE');}),it('suspended\x20sale\x20→\x20buyable:false\x20with\x20the\x20suspension\x20blocker',async()=>{c({'name':FLEXIBLE,'suspension':!![],'stock':{'balance':'9'}});const d=await handleServiceQuote(quoteInput());expect(d['items'][0x0]['buyable'])['toBe'](![]),expect(d['items'][0x0]['buyable_blockers'][0x0])['toContain']('suspended'),expect(d['buyable']['purchasable'])['toBe'](![]);}),it('unreadable\x20stock\x20+\x20ok\x20name\x20→\x20buyable\x20null\x20(honest\x20unknown,\x20basket\x20null)',async()=>{c({'name':FLEXIBLE});const d=await handleServiceQuote(quoteInput());expect(d['items'][0x0]['buyable'])['toBeNull'](),expect(d['buyable']['purchasable'])['toBeNull'](),expect(d['buyable']['note'])['toContain']('verify\x20before\x20checkout');}),it('one\x20dead\x20SKU\x20among\x20healthy\x20ones\x20→\x20only\x20the\x20dead\x20line\x20is\x20blocked',async()=>{c({'name':FLEXIBLE,'stock':{'balance':'9'}},{'name':b,'stock':{'balance':'9'}});const d=await handleServiceQuote(quoteInput({'items':[{'name':FLEXIBLE,'quantity':0x1}]}));expect(d['items'][0x0]['buyable'])['toBe'](!![]),expect(d['buyable']['purchasable'])['toBe'](!![]),expect(d['buyable']['blocked_items'])['toEqual']([]);});}),describe('service_quote\x20W5-22\x20CAMPAIGN_CLOSED\x20probe',()=>{const a='0x'+'9'['repeat'](0x40),b='0x'+'4'['repeat'](0x40),c='0x'+'5'['repeat'](0x40);function d(f){sdkMocks['query_serviceContext']['mockResolvedValue']({'service':{'type_raw':'Service<0x2::wow::WOW>','buy_guard':a,'sales':[{'name':FLEXIBLE,'price':{'balance':LIST_TOTAL['toString']()},'suspension':![],'stock':{'balance':'9'}}]}}),sdkMocks['query_objects']['mockResolvedValue']({'objects':[{'object':a,'root':f,'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':b},{'identifier':0x1,'b_submission':![],'value_type':'String','value':'next_cycle_deadline'},{'identifier':0x2,'b_submission':![],'value_type':'Address','value':c}]}]});}const e=()=>({'type':'logic_as_u256_lesser_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'query','query':'repository.data','object':{'identifier':0x0},'parameters':[{'type':'identifier','identifier':0x1},{'type':'identifier','identifier':0x2}]}]});it('past\x20deadline\x20→\x20basket\x20purchasable:false,\x20CAMPAIGN_CLOSED\x20on\x20the\x20basket\x20AND\x20every\x20line',async()=>{d(e()),sdkMocks['queryTableItem_RepositoryData']['mockResolvedValue']({'entity':c,'name':'next_cycle_deadline','value':new Uint8Array(0x8),'data':{'value_type':'U64','value':(Date['now']()-0x36ee80)['toString']()}});const f=await handleServiceQuote(quoteInput());expect(f['buyable']['purchasable'])['toBe'](![]),expect(f['buyable']['note'])['toContain']('CAMPAIGN_CLOSED'),expect(f['items'][0x0]['buyable'])['toBe'](![]),expect(f['items'][0x0]['buyable_blockers']['join'](';\x20'))['toContain']('CAMPAIGN_CLOSED'),expect(f['total_pay']['note'])['toContain']('CAMPAIGN\x20WINDOW\x20(CLOSED)'),expect(sdkMocks['queryTableItem_RepositoryData'])['toHaveBeenCalledWith'](expect['objectContaining']({'parent':b,'name':'next_cycle_deadline','entity':c}));}),it('future\x20deadline\x20→\x20window\x20OPEN\x20disclosed,\x20basket\x20stays\x20purchasable',async()=>{d(e()),sdkMocks['queryTableItem_RepositoryData']['mockResolvedValue']({'entity':c,'name':'next_cycle_deadline','value':new Uint8Array(0x8),'data':{'value_type':'U64','value':(Date['now']()+0x36ee80)['toString']()}});const f=await handleServiceQuote(quoteInput());expect(f['buyable']['purchasable'])['toBe'](!![]),expect(f['buyable']['note'])['not']['toContain']('CAMPAIGN_CLOSED'),expect(f['total_pay']['note'])['toContain']('CAMPAIGN\x20WINDOW\x20(OPEN)');}),it('deadline\x20as\x20RAW\x20BCS\x20u64\x20little-endian\x20bytes\x20decodes\x20too',async()=>{d(e());const f=Date['now']()-0x3e8,g=new Uint8Array(0x8);let h=BigInt(f);for(let k=0x0;k<0x8;k++){g[k]=Number(h&0xffn),h>>=0x8n;}sdkMocks['queryTableItem_RepositoryData']['mockResolvedValue']({'entity':c,'name':'next_cycle_deadline','value':g,'data':{'value_type':'U64','value':g}});const j=await handleServiceQuote(quoteInput());expect(j['buyable']['purchasable'])['toBe'](![]),expect(j['buyable']['note'])['toContain']('CAMPAIGN_CLOSED');}),it('UNSEEDED\x20row\x20(query\x20returns\x20undefined)\x20→\x20closed-by-refusal\x20with\x20the\x20seed\x20hint',async()=>{d(e()),sdkMocks['queryTableItem_RepositoryData']['mockResolvedValue'](undefined);const f=await handleServiceQuote(quoteInput());expect(f['buyable']['purchasable'])['toBe'](![]),expect(f['buyable']['note'])['toContain']('NOT\x20seeded'),expect(f['buyable']['note'])['toContain']('fail-closed');}),it('a\x20DIFFERENT\x20policy\x20key\x20is\x20not\x20the\x20recognized\x20shape\x20—\x20the\x20probe\x20claims\x20nothing',async()=>{const f=e();sdkMocks['query_serviceContext']['mockResolvedValue']({'service':{'type_raw':'Service<0x2::wow::WOW>','buy_guard':a,'sales':[{'name':FLEXIBLE,'price':{'balance':LIST_TOTAL['toString']()},'suspension':![],'stock':{'balance':'9'}}]}}),sdkMocks['query_objects']['mockResolvedValue']({'objects':[{'object':a,'root':f,'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':b},{'identifier':0x1,'b_submission':![],'value_type':'String','value':'vendor_season_end'},{'identifier':0x2,'b_submission':![],'value_type':'Address','value':c}]}]}),sdkMocks['queryTableItem_RepositoryData']['mockResolvedValue'](undefined);const g=await handleServiceQuote(quoteInput());expect(g['buyable']['purchasable'])['toBe'](!![]),expect(g['buyable']['note'])['not']['toContain']('CAMPAIGN_CLOSED'),expect(sdkMocks['queryTableItem_RepositoryData'])['not']['toHaveBeenCalled']();}),it('no\x20buy_guard\x20→\x20no\x20probe,\x20zero\x20extra\x20reads\x20(legacy\x20storefronts\x20unaffected)',async()=>{const f=await handleServiceQuote(quoteInput());expect(f['buyable']['purchasable'])['toBeNull'](),expect(sdkMocks['query_objects'])['not']['toHaveBeenCalled'](),expect(sdkMocks['queryTableItem_RepositoryData'])['not']['toHaveBeenCalled']();});});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{describe,expect,it}from'vitest';import{ENTRYPOINT}from'@wowok/wowok';import{FakeDataPlane}from'../../graph/onchain/dataplane.js';import{expandTopology}from'../../graph/onchain/expand.js';import{FULL,fullServiceState}from'../../graph/onchain/fixtures.js';import{EVALUATION_SERVICE_INTENTS,resolveExpansionStrategy,withEvaluationBundle}from'../../graph/onchain/strategy.js';import{registerGraphServiceEvaluations}from'../../evaluation/builtins/graph-service.js';import{handleOnchainTopology}from'./topology-query.js';const NET='mainnet';describe('onchain_topology\x20evaluation\x20projection\x20(Task\x2016)',()=>{it('TR-16.1:\x20full\x20shop\x20—\x20evaluation\x20section\x20with\x20real\x20arbitration\x20conclusion\x20+\x20coverage',async()=>{registerGraphServiceEvaluations();const a=await handleOnchainTopology({'query_type':'onchain_topology','focus':FULL['svc'],'context_network':NET},new FakeDataPlane(fullServiceState()));expect(a['evaluation'])['toBeDefined']();const b=a['evaluation'];expect(Number['isInteger'](b['completeness']))['toBe'](!![]),expect(b['completeness'])['toBeGreaterThan'](0x0),expect(b['completeness'])['toBeLessThanOrEqual'](0x64),expect(b['coverage']['length'])['toBeGreaterThan'](0x0),expect(b['target'])['toBe'](FULL['svc']['toLowerCase']()),expect(b['unverified'])['toEqual']([]);const c=b['trust']['breakdown']['find'](d=>d['rule_id']==='trust_arbitration');expect(c?.['score'])['toBe'](0x64),expect(c?.['matched']?.['length']??0x0)['toBeGreaterThan'](0x0),expect(a['summary'])['toContain']('Evaluation:\x20trust\x20'+b['trust']['total']+'/100,\x20risk\x20'+b['risk']['total']+'/100');}),it('TR-16.2:\x20single\x20expansion\x20—\x20evaluation\x20adds\x20zero\x20fetches,\x20the\x20probe\x20is\x20a\x20dedup\x20hit',async()=>{registerGraphServiceEvaluations();const a=withEvaluationBundle(resolveExpansionStrategy({'defaultIntents':[...EVALUATION_SERVICE_INTENTS]})),b=new FakeDataPlane(fullServiceState()),c=await expandTopology(b,{'network':ENTRYPOINT['Mainnet'],'seed':FULL['svc'],'budget':a['budget'],'edges':a['edges']}),d=new FakeDataPlane(fullServiceState()),e=await handleOnchainTopology({'query_type':'onchain_topology','focus':FULL['svc'],'context_network':NET},d);expect(d['batches']['objects'])['toBe'](b['batches']['objects']),expect(e['stats']['rpc']['batches'])['toBe'](c['rpcReport']['batches']),expect(d['dedupHits'])['toBe'](b['dedupHits']);}),it('wiring:\x20no-intent\x20Service\x20seed\x20defaults\x20to\x20the\x20evaluation\x20bundle\x20with\x20its\x20shaping',async()=>{registerGraphServiceEvaluations();const a=await handleOnchainTopology({'query_type':'onchain_topology','focus':FULL['svc'],'context_network':NET},new FakeDataPlane(fullServiceState()));expect(a['strategy']['intents'])['toEqual']([...EVALUATION_SERVICE_INTENTS]),expect(a['strategy']['trace']['some'](b=>b['startsWith']('intent\x20(default):\x20')))['toBe'](!![]),expect(a['strategy']['trace']['some'](b=>b['startsWith']('evaluation\x20bundle:')))['toBe'](!![]);}),it('wiring:\x20role-default\x20intents\x20UNION\x20onto\x20the\x20evaluation\x20floor,\x20never\x20replace\x20it',async()=>{registerGraphServiceEvaluations();const a=await handleOnchainTopology({'query_type':'onchain_topology','focus':FULL['svc'],'role':'customer','context_network':NET},new FakeDataPlane(fullServiceState()));for(const c of EVALUATION_SERVICE_INTENTS)expect(a['strategy']['intents'])['toContain'](c);expect(a['strategy']['intents'])['toContain']('order_health'),expect(a['strategy']['intents'])['toContain']('counterparty'),expect(a['strategy']['trace']['some'](d=>d['startsWith']('evaluation\x20bundle:')))['toBe'](!![]);const b=a['facets']?.['items']['find'](d=>d['id']==='arbitration');expect(b?.['state'])['toBe']('present'),expect(a['evaluation']['unverified'])['not']['toContain']('risk_trust');}),it('wiring:\x20an\x20explicit\x20intent\x20wins\x20over\x20the\x20default\x20and\x20skips\x20the\x20bundle\x20shaping',async()=>{registerGraphServiceEvaluations();const a=await handleOnchainTopology({'query_type':'onchain_topology','focus':FULL['svc'],'intent':'workflow','context_network':NET},new FakeDataPlane(fullServiceState()));expect(a['strategy']['intents'])['toEqual'](['workflow']),expect(a['strategy']['trace']['some'](b=>b['startsWith']('intent\x20(explicit):\x20workflow')))['toBe'](!![]),expect(a['strategy']['trace']['some'](b=>b['startsWith']('evaluation\x20bundle:')))['toBe'](![]),expect(a['evaluation'])['toBeDefined']();}),it('wiring:\x20an\x20explicit\x20intent\x20on\x20a\x20non-Service\x20seed\x20keeps\x20the\x20kernel\x20default\x20posture;\x20gap\x20dims\x20are\x20excluded\x20honestly',async()=>{registerGraphServiceEvaluations();const a=await handleOnchainTopology({'query_type':'onchain_topology','focus':FULL['mac'],'intent':'full_map','context_network':NET},new FakeDataPlane(fullServiceState()));expect(a['strategy']['intents'])['toEqual'](['full_map']),expect(a['evaluation'])['toBeDefined'](),expect(a['evaluation']['unverified']['length'])['toBeGreaterThan'](0x0);}),it('wiring:\x20a\x20no-intent\x20trust-evaluation\x20call\x20on\x20a\x20non-Service\x20focus\x20is\x20refused\x20before\x20any\x20traversal',async()=>{registerGraphServiceEvaluations(),await expect(handleOnchainTopology({'query_type':'onchain_topology','focus':FULL['mac'],'context_network':NET}))['rejects']['toThrow'](/not a Service/);}),it('analyze=false\x20drops\x20the\x20evaluation\x20section\x20(no\x20findings-less\x20all-clear)',async()=>{registerGraphServiceEvaluations();const a=await handleOnchainTopology({'query_type':'onchain_topology','focus':FULL['svc'],'analyze':![],'context_network':NET},new FakeDataPlane(fullServiceState()));expect(a['evaluation'])['toBeUndefined'](),expect(a['findings'])['toEqual']([]);});});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type DataPlane, type ExpansionStrategy, type FindingKind, type TopologyGraph } from "../../graph/onchain/index.js";
|
|
2
|
-
import type { OnchainTopologyInput, OnchainTopologyResult } from "../../schema/query/bi.js";
|
|
3
|
-
import { type GraphServiceEvaluation } from "../../evaluation/builtins/graph-service.js";
|
|
4
|
-
import type { UserInjection } from "../../evaluation/types.js";
|
|
5
|
-
import { type ResolvedFacetProfile } from "../../persona/facet-profile.js";
|
|
6
|
-
export interface TopologyShapeOptions {
|
|
7
|
-
analyze?: boolean;
|
|
8
|
-
analyzerKinds?: FindingKind[];
|
|
9
|
-
onlyAnalyzers?: string[];
|
|
10
|
-
includeRaw?: boolean;
|
|
11
|
-
strategy?: ExpansionStrategy;
|
|
12
|
-
interestRole?: string;
|
|
13
|
-
interestObserver?: string;
|
|
14
|
-
interestDrive?: import("../../evaluation/game-strategy.js").PersonaDrive;
|
|
15
|
-
injection?: UserInjection;
|
|
16
|
-
facetProfile?: ResolvedFacetProfile;
|
|
17
|
-
}
|
|
18
|
-
export declare function buildOnchainTopologyResult(graph: TopologyGraph, seed: string, opts?: TopologyShapeOptions): Promise<OnchainTopologyResult>;
|
|
19
|
-
export declare function handleOnchainTopology(v: OnchainTopologyInput, planeOverride?: DataPlane, evaluationInjection?: UserInjection): Promise<OnchainTopologyResult>;
|
|
20
|
-
export interface GraphServiceEvaluateOptions {
|
|
21
|
-
injection?: UserInjection;
|
|
22
|
-
no_cache?: boolean;
|
|
23
|
-
context_network?: "testnet" | "mainnet" | "localnet";
|
|
24
|
-
}
|
|
25
|
-
export declare function evaluateServiceFromGraph(focus: string, opts?: GraphServiceEvaluateOptions): Promise<GraphServiceEvaluation>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { Blueprint } from "../../composition/blueprint-view.js";
|
|
2
|
-
import { type GameTheoryReport } from "./game-theory.js";
|
|
3
|
-
export interface DesignCheck {
|
|
4
|
-
id: string;
|
|
5
|
-
dimension: "intent" | "game" | "value";
|
|
6
|
-
passed: boolean;
|
|
7
|
-
severity: "critical" | "medium" | "info";
|
|
8
|
-
message: string;
|
|
9
|
-
fix?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface DesignFinding {
|
|
12
|
-
kind: "business_loophole" | "semantic_loophole";
|
|
13
|
-
severity: "critical" | "medium" | "info";
|
|
14
|
-
message: string;
|
|
15
|
-
fix: string;
|
|
16
|
-
}
|
|
17
|
-
export interface WorkflowDesignAssessment {
|
|
18
|
-
checks: DesignCheck[];
|
|
19
|
-
findings: DesignFinding[];
|
|
20
|
-
game_coverage: GameTheoryReport;
|
|
21
|
-
score: number;
|
|
22
|
-
summary: string;
|
|
23
|
-
}
|
|
24
|
-
export interface DesignCoverageGap {
|
|
25
|
-
id: string;
|
|
26
|
-
label: string;
|
|
27
|
-
severity: "critical" | "medium" | "info";
|
|
28
|
-
message: string;
|
|
29
|
-
fix: string;
|
|
30
|
-
}
|
|
31
|
-
export declare function assessWorkflowDesign(graph: Blueprint, coverage?: {
|
|
32
|
-
gaps: DesignCoverageGap[];
|
|
33
|
-
}): WorkflowDesignAssessment;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import type { RelationshipProfile } from "./types.js";
|
|
2
|
-
export interface PermissionFacts {
|
|
3
|
-
address: string;
|
|
4
|
-
owner: string;
|
|
5
|
-
admins: string[];
|
|
6
|
-
entities: Array<{
|
|
7
|
-
address: string;
|
|
8
|
-
perm_indices: number[];
|
|
9
|
-
}>;
|
|
10
|
-
anchor_role_bits?: number;
|
|
11
|
-
managed_objects?: Array<{
|
|
12
|
-
object_type: string;
|
|
13
|
-
address: string;
|
|
14
|
-
}>;
|
|
15
|
-
}
|
|
16
|
-
export interface MachineFacts {
|
|
17
|
-
address: string;
|
|
18
|
-
permission_address?: string;
|
|
19
|
-
forwards?: Array<{
|
|
20
|
-
node: string;
|
|
21
|
-
next_node: string;
|
|
22
|
-
forward_name: string;
|
|
23
|
-
named_operator?: string | null;
|
|
24
|
-
permission_index?: number | null;
|
|
25
|
-
guard?: string | null;
|
|
26
|
-
}>;
|
|
27
|
-
}
|
|
28
|
-
export interface OrderFacts {
|
|
29
|
-
address: string;
|
|
30
|
-
owner: string;
|
|
31
|
-
agents: string[];
|
|
32
|
-
service: string;
|
|
33
|
-
amount?: string;
|
|
34
|
-
service_owner?: string;
|
|
35
|
-
allocation?: string;
|
|
36
|
-
dispute_arbitrations?: string[];
|
|
37
|
-
claimed_by?: string | null;
|
|
38
|
-
}
|
|
39
|
-
export interface DemandFacts {
|
|
40
|
-
address: string;
|
|
41
|
-
owner: string;
|
|
42
|
-
presenters?: Array<{
|
|
43
|
-
address: string;
|
|
44
|
-
service?: string;
|
|
45
|
-
acceptance_score?: number;
|
|
46
|
-
scoredAt?: number;
|
|
47
|
-
}>;
|
|
48
|
-
rewards?: string[];
|
|
49
|
-
guards?: string[];
|
|
50
|
-
}
|
|
51
|
-
export interface AllocationFacts {
|
|
52
|
-
address: string;
|
|
53
|
-
owner?: string;
|
|
54
|
-
sharing?: Array<{
|
|
55
|
-
who: {
|
|
56
|
-
Entity: string;
|
|
57
|
-
} | {
|
|
58
|
-
Signer: true;
|
|
59
|
-
} | {
|
|
60
|
-
GuardIdentifier: number;
|
|
61
|
-
};
|
|
62
|
-
mode: "Amount" | "Rate" | "Surplus" | "RateGross" | "Formula";
|
|
63
|
-
sharing?: string;
|
|
64
|
-
guard?: string;
|
|
65
|
-
}>;
|
|
66
|
-
}
|
|
67
|
-
export interface ContactFacts {
|
|
68
|
-
address: string;
|
|
69
|
-
ims: string[];
|
|
70
|
-
owner: string;
|
|
71
|
-
}
|
|
72
|
-
export interface ArbitrationFacts {
|
|
73
|
-
address: string;
|
|
74
|
-
object_kind?: "case" | "service";
|
|
75
|
-
voters?: Array<{
|
|
76
|
-
address: string;
|
|
77
|
-
weight?: number;
|
|
78
|
-
}>;
|
|
79
|
-
order?: string;
|
|
80
|
-
arbitration?: string;
|
|
81
|
-
anchor_side?: "buyer" | "merchant";
|
|
82
|
-
bound_services?: string[];
|
|
83
|
-
}
|
|
84
|
-
export interface RelationshipInput {
|
|
85
|
-
anchor: string;
|
|
86
|
-
permissions?: PermissionFacts[];
|
|
87
|
-
machines?: MachineFacts[];
|
|
88
|
-
orders?: OrderFacts[];
|
|
89
|
-
demands?: DemandFacts[];
|
|
90
|
-
allocations?: AllocationFacts[];
|
|
91
|
-
contacts?: ContactFacts[];
|
|
92
|
-
arbitrations?: ArbitrationFacts[];
|
|
93
|
-
service_owners?: Record<string, string>;
|
|
94
|
-
}
|
|
95
|
-
export declare function deriveRelationshipProfile(input: RelationshipInput): RelationshipProfile;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{describe,expect,it}from'vitest';import{deriveRelationshipProfile}from'./derivation.js';const ANCHOR='0xaaa111',VOTER1='0xbbb222',VOTER2='0xccc333',ARB_CASE='0x1200aa',ORDER='0x1600bb',ARB_SERVICE='0x1300cc';function edgesOf(a,b){return deriveRelationshipProfile(b)['edges']['filter'](c=>c['kind']===a);}describe('deriveRelationshipProfile\x20—\x20arbitration\x20edges\x20(K3-19\x20G1)',()=>{it('merchant-side\x20case:\x20voters\x20produce\x20BOTH\x20delegation\x20and\x20dispute_resolution\x20edges',()=>{const a={'anchor':ANCHOR,'arbitrations':[{'address':ARB_CASE,'object_kind':'case','voters':[{'address':VOTER1,'weight':0x2},{'address':VOTER2,'weight':0x1}],'order':ORDER,'arbitration':ARB_SERVICE,'anchor_side':'merchant'}]},b=edgesOf('arbitration_delegation',a);expect(b)['toHaveLength'](0x2),expect(b['map'](f=>f['counterparty'])['sort']())['toEqual']([VOTER1,VOTER2]['sort']()),expect(b[0x0]['power']['objects'][0x0])['toMatchObject']({'object_type':'Arbitration','address':ARB_CASE});const c=edgesOf('dispute_resolution',a);expect(c)['toHaveLength'](0x2);const d=c['find'](f=>f['counterparty']===VOTER1);expect(d['power']['objects'])['toEqual']([{'object_type':'Arb','address':ARB_CASE,'capacity':'dispute\x20case\x20(vote\x20weight\x202)'},{'object_type':'Order','address':ORDER,'capacity':'disputed\x20order'}]),expect(d['interest']['gains'][0x0])['toMatch'](/indemnity|own-side loss/i);}),it('buyer-side\x20case:\x20dispute_resolution\x20edges\x20only\x20—\x20the\x20buyer\x20never\x20delegates',()=>{const a={'anchor':ANCHOR,'arbitrations':[{'address':ARB_CASE,'object_kind':'case','voters':[{'address':VOTER1,'weight':0x3}],'order':ORDER,'anchor_side':'buyer'}]};expect(edgesOf('arbitration_delegation',a))['toHaveLength'](0x0);const b=edgesOf('dispute_resolution',a);expect(b)['toHaveLength'](0x1),expect(b[0x0]['counterparty'])['toBe'](VOTER1);}),it('arbitration\x20SERVICE\x20without\x20resolved\x20voters:\x20binding\x20presence\x20only,\x20no\x20edges',()=>{const a={'anchor':ANCHOR,'arbitrations':[{'address':ARB_SERVICE,'object_kind':'service','voters':[],'bound_services':[]}]},b=deriveRelationshipProfile(a);expect(b['edges']['filter'](c=>c['kind']==='arbitration_delegation'||c['kind']==='dispute_resolution'))['toHaveLength'](0x0);}),it('the\x20anchor\x27s\x20own\x20vote\x20is\x20skipped\x20(no\x20self\x20edges)',()=>{const a={'anchor':ANCHOR,'arbitrations':[{'address':ARB_CASE,'object_kind':'case','voters':[{'address':ANCHOR,'weight':0x1},{'address':VOTER2}],'order':ORDER,'anchor_side':'merchant'}]},b=deriveRelationshipProfile(a)['edges'];expect(b['every'](c=>c['counterparty']['toLowerCase']()!==ANCHOR['toLowerCase']()))['toBe'](!![]),expect(edgesOf('dispute_resolution',a))['toHaveLength'](0x1),expect(edgesOf('dispute_resolution',a)[0x0]['power']['objects'][0x0]['capacity'])['toContain']('n/a');}),it('legacy\x20facts\x20(no\x20object_kind/anchor_side)\x20still\x20produce\x20delegation\x20edges',()=>{const a={'anchor':ANCHOR,'arbitrations':[{'address':ARB_SERVICE,'voters':[{'address':VOTER1,'weight':0x5}]}]};expect(edgesOf('arbitration_delegation',a))['toHaveLength'](0x1),expect(edgesOf('dispute_resolution',a))['toHaveLength'](0x0);}),it('multiple\x20cases\x20on\x20the\x20same\x20voter\x20merge\x20into\x20ONE\x20edge\x20per\x20(pair,\x20kind)',()=>{const a='0x1200dd',b={'anchor':ANCHOR,'arbitrations':[{'address':ARB_CASE,'object_kind':'case','voters':[{'address':VOTER1,'weight':0x1}],'order':ORDER,'anchor_side':'buyer'},{'address':a,'object_kind':'case','voters':[{'address':VOTER1,'weight':0x2}],'order':'0x1600ee','anchor_side':'buyer'}]},c=edgesOf('dispute_resolution',b);expect(c)['toHaveLength'](0x1),expect(c[0x0]['power']['objects']['filter'](d=>d['object_type']==='Arb'))['toHaveLength'](0x2);});});
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { LiabilityResolution, ReactionKpi } from "../participation/employee-kpi.js";
|
|
2
|
-
export interface AcceptanceEvidence {
|
|
3
|
-
node: string;
|
|
4
|
-
wip_hashes: string[];
|
|
5
|
-
submitted_at?: number;
|
|
6
|
-
}
|
|
7
|
-
export interface AcceptanceVerdict {
|
|
8
|
-
node: string;
|
|
9
|
-
passed: boolean;
|
|
10
|
-
criteria: string[];
|
|
11
|
-
gaps: string[];
|
|
12
|
-
}
|
|
13
|
-
export interface IncentiveInput {
|
|
14
|
-
employee: string;
|
|
15
|
-
kpis: ReactionKpi[];
|
|
16
|
-
acceptance: AcceptanceEvidence[];
|
|
17
|
-
liability?: LiabilityResolution;
|
|
18
|
-
available_rewards?: Array<{
|
|
19
|
-
address: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
}>;
|
|
22
|
-
prior_compensation?: string;
|
|
23
|
-
}
|
|
24
|
-
export type SuggestionKind = "reward_grant" | "compensation_offset" | "correction_notice" | "none";
|
|
25
|
-
export interface RewardSuggestion {
|
|
26
|
-
employee: string;
|
|
27
|
-
kind: SuggestionKind;
|
|
28
|
-
rationale: string;
|
|
29
|
-
requires_confirmation: true;
|
|
30
|
-
reward_candidates: Array<{
|
|
31
|
-
address: string;
|
|
32
|
-
description?: string;
|
|
33
|
-
}>;
|
|
34
|
-
execution_hint: string;
|
|
35
|
-
kpi_rollup: string;
|
|
36
|
-
}
|
|
37
|
-
export declare function evaluateAcceptance(node: string, evidence?: AcceptanceEvidence): AcceptanceVerdict;
|
|
38
|
-
export declare function suggestIncentive(input: IncentiveInput): RewardSuggestion;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { RelationshipKind, RelationshipTension } from "./types.js";
|
|
2
|
-
export interface RelationshipKindMeta {
|
|
3
|
-
kind: RelationshipKind;
|
|
4
|
-
semantics: string;
|
|
5
|
-
anchor_role: string;
|
|
6
|
-
counterparty_role: string;
|
|
7
|
-
tension?: RelationshipTension;
|
|
8
|
-
}
|
|
9
|
-
export declare const RELATIONSHIP_KIND_REGISTRY: Record<RelationshipKind, RelationshipKindMeta>;
|
|
10
|
-
export declare function interestHintsFor(kind: RelationshipKind, asAnchorRole: boolean): {
|
|
11
|
-
gains: string[];
|
|
12
|
-
exposures: string[];
|
|
13
|
-
};
|