@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,175 +0,0 @@
|
|
|
1
|
-
import { type GoalClassification } from "./GoalClassifier.js";
|
|
2
|
-
import { GoalStore } from "./GoalStore.js";
|
|
3
|
-
import { type BoundaryQuestion, type GoalBoundaries, type GoalProcessSummary, type GoalRecord, type GoalStage, type GoalType, type NextStepOption, type ObjectRef, type PursueReport } from "./types.js";
|
|
4
|
-
import { type FeedbackRecord, type ProblemRecord, type ProcessEvent, type ProcessManifest, type ProcessStageState, type SuggestionRecord } from "../task/types.js";
|
|
5
|
-
import type { UserIntentSignature } from "../experience/types.js";
|
|
6
|
-
import { type SubscriptionStore } from "../monitor/SubscriptionStore.js";
|
|
7
|
-
import type { CreateIntentInput } from "../intent/index.js";
|
|
8
|
-
import type { IntentRecord } from "../intent/types.js";
|
|
9
|
-
import { type LocalAccountInfo } from "../knowledge/workflow-guidance.js";
|
|
10
|
-
import { type GoalCompletionVerdict } from "../knowledge/goal-completion.js";
|
|
11
|
-
import type { CommunicationEvidenceKind } from "../communication/evidence.js";
|
|
12
|
-
export declare const GOAL_PLAYBOOKS: Record<GoalType, string | undefined>;
|
|
13
|
-
export declare const PLAN_APPROVAL_COVERS_LEVELS: readonly ["standard", "none"];
|
|
14
|
-
export interface GoalProcessDeps {
|
|
15
|
-
rootDir(): string;
|
|
16
|
-
initProcess(dir: string, manifest: ProcessManifest, stages: string[]): ProcessManifest;
|
|
17
|
-
loadManifest(dir: string): ProcessManifest;
|
|
18
|
-
saveManifest(dir: string, manifest: ProcessManifest): void;
|
|
19
|
-
loadStageState(dir: string): ProcessStageState | undefined;
|
|
20
|
-
appendEvent(dir: string, event: ProcessEvent): void;
|
|
21
|
-
addFeedback(dir: string, input: {
|
|
22
|
-
source: FeedbackRecord["source"];
|
|
23
|
-
sentiment: FeedbackRecord["sentiment"];
|
|
24
|
-
comment: string;
|
|
25
|
-
refs?: FeedbackRecord["refs"];
|
|
26
|
-
}): FeedbackRecord;
|
|
27
|
-
listProblems(dir: string, filter?: {
|
|
28
|
-
status?: ProblemRecord["status"];
|
|
29
|
-
}): ProblemRecord[];
|
|
30
|
-
listFeedback(dir: string): FeedbackRecord[];
|
|
31
|
-
readEvents(dir: string): ProcessEvent[];
|
|
32
|
-
addSuggestion(dir: string, input: {
|
|
33
|
-
object?: string;
|
|
34
|
-
kind: SuggestionRecord["kind"];
|
|
35
|
-
stage?: string;
|
|
36
|
-
objects?: {
|
|
37
|
-
type: string;
|
|
38
|
-
object: string;
|
|
39
|
-
}[];
|
|
40
|
-
title: string;
|
|
41
|
-
detail?: string;
|
|
42
|
-
origin?: SuggestionRecord["origin"];
|
|
43
|
-
}): SuggestionRecord;
|
|
44
|
-
updateSuggestion(dir: string, id: string, patch: Partial<Pick<SuggestionRecord, "status" | "resolution_note" | "applied" | "stage" | "object">>): SuggestionRecord;
|
|
45
|
-
listSuggestions(dir: string, filter?: {
|
|
46
|
-
status?: SuggestionRecord["status"];
|
|
47
|
-
}): SuggestionRecord[];
|
|
48
|
-
removeDir(dir: string): void;
|
|
49
|
-
}
|
|
50
|
-
export interface GoalEngineDeps {
|
|
51
|
-
store: Pick<GoalStore, "create" | "get" | "save" | "list" | "counts" | "remove">;
|
|
52
|
-
subscriptionStore: Pick<SubscriptionStore, "getConfig" | "saveConfig">;
|
|
53
|
-
createIntent(input: CreateIntentInput): Promise<IntentRecord>;
|
|
54
|
-
removeIntent(id: string): Promise<boolean>;
|
|
55
|
-
listLocalAccounts(): Promise<LocalAccountInfo[]>;
|
|
56
|
-
evaluateCompletion(goal: GoalRecord, network?: string): Promise<GoalCompletionVerdict>;
|
|
57
|
-
processes: GoalProcessDeps;
|
|
58
|
-
recordSignature(sig: UserIntentSignature): void;
|
|
59
|
-
}
|
|
60
|
-
export interface CreateOrAdoptInput {
|
|
61
|
-
intent_text: string;
|
|
62
|
-
goal_type?: GoalType;
|
|
63
|
-
account?: string;
|
|
64
|
-
persona?: string;
|
|
65
|
-
title?: string;
|
|
66
|
-
network?: string;
|
|
67
|
-
conversation_id?: string;
|
|
68
|
-
create_process?: boolean;
|
|
69
|
-
}
|
|
70
|
-
export interface CreateOrAdoptResult {
|
|
71
|
-
goal?: GoalRecord;
|
|
72
|
-
adopted: boolean;
|
|
73
|
-
classification?: GoalClassification;
|
|
74
|
-
needs_type?: boolean;
|
|
75
|
-
warnings?: string[];
|
|
76
|
-
}
|
|
77
|
-
export interface AdvanceInput {
|
|
78
|
-
stage?: GoalStage;
|
|
79
|
-
objects?: ObjectRef[];
|
|
80
|
-
}
|
|
81
|
-
export interface CompleteResult {
|
|
82
|
-
goal: GoalRecord;
|
|
83
|
-
completed: boolean;
|
|
84
|
-
verify_report: GoalCompletionVerdict;
|
|
85
|
-
teardown_notes?: string[];
|
|
86
|
-
}
|
|
87
|
-
export declare const ADOPT_JACCARD_THRESHOLD = 0.6;
|
|
88
|
-
export declare function tokenizeIntent(text: string): Set<string>;
|
|
89
|
-
export declare function jaccard(a: Set<string>, b: Set<string>): number;
|
|
90
|
-
export declare class GoalEngine {
|
|
91
|
-
private readonly deps;
|
|
92
|
-
constructor(deps: GoalEngineDeps);
|
|
93
|
-
createOrAdopt(input: CreateOrAdoptInput): Promise<CreateOrAdoptResult>;
|
|
94
|
-
private preflightAccount;
|
|
95
|
-
approve(network: string, id: string, note?: string): Promise<GoalRecord>;
|
|
96
|
-
bind(network: string, id: string, account: string, persona?: string): Promise<GoalRecord>;
|
|
97
|
-
advance(network: string, id: string, input?: AdvanceInput): Promise<GoalRecord>;
|
|
98
|
-
registerActObjects(goalId: string, objects: ObjectRef[], network?: string): Promise<number>;
|
|
99
|
-
recordCommunicationEvidence(goalId: string, evidence: {
|
|
100
|
-
operation: string;
|
|
101
|
-
kind: CommunicationEvidenceKind;
|
|
102
|
-
title: string;
|
|
103
|
-
detail?: string;
|
|
104
|
-
data?: Record<string, unknown>;
|
|
105
|
-
}, network?: string): Promise<boolean>;
|
|
106
|
-
private registerProcessObjects;
|
|
107
|
-
private emitProcessEvent;
|
|
108
|
-
private distillOutcome;
|
|
109
|
-
private assertTransition;
|
|
110
|
-
pause(network: string, id: string): Promise<GoalRecord>;
|
|
111
|
-
private autoBindMonitor;
|
|
112
|
-
complete(network: string, id: string, opts?: {
|
|
113
|
-
force?: boolean;
|
|
114
|
-
feedback?: {
|
|
115
|
-
sentiment: "positive" | "negative" | "neutral";
|
|
116
|
-
comment: string;
|
|
117
|
-
};
|
|
118
|
-
}): Promise<CompleteResult>;
|
|
119
|
-
abandon(network: string, id: string, reason?: string): Promise<{
|
|
120
|
-
goal: GoalRecord;
|
|
121
|
-
teardown_notes?: string[];
|
|
122
|
-
}>;
|
|
123
|
-
remove(network: string, id: string, opts?: {
|
|
124
|
-
force?: boolean;
|
|
125
|
-
}): Promise<{
|
|
126
|
-
deleted: boolean;
|
|
127
|
-
tore_down_active?: boolean;
|
|
128
|
-
process_removed?: boolean;
|
|
129
|
-
}>;
|
|
130
|
-
private teardown;
|
|
131
|
-
get(network: string, id: string): Promise<GoalRecord & {
|
|
132
|
-
process_summary?: GoalProcessSummary;
|
|
133
|
-
}>;
|
|
134
|
-
private summarizeProcess;
|
|
135
|
-
listSuggestions(network: string, id: string, opts?: {
|
|
136
|
-
include_resolved?: boolean;
|
|
137
|
-
}): Promise<{
|
|
138
|
-
goal: GoalRecord;
|
|
139
|
-
suggestions: SuggestionRecord[];
|
|
140
|
-
open_problems: ProblemRecord[];
|
|
141
|
-
}>;
|
|
142
|
-
resolveSuggestion(network: string, id: string, suggestionId: string, opts: {
|
|
143
|
-
decision: "confirm" | "dismiss";
|
|
144
|
-
note?: string;
|
|
145
|
-
apply?: boolean;
|
|
146
|
-
}): Promise<{
|
|
147
|
-
goal: GoalRecord;
|
|
148
|
-
suggestion: SuggestionRecord;
|
|
149
|
-
applied: boolean;
|
|
150
|
-
apply_error?: string;
|
|
151
|
-
complete_report?: GoalCompletionVerdict;
|
|
152
|
-
}>;
|
|
153
|
-
boundariesView(network: string, id: string): Promise<{
|
|
154
|
-
goal: GoalRecord;
|
|
155
|
-
boundaries?: GoalBoundaries;
|
|
156
|
-
questions: BoundaryQuestion[];
|
|
157
|
-
missing: string[];
|
|
158
|
-
}>;
|
|
159
|
-
setBoundaries(network: string, id: string, patch: Partial<GoalBoundaries>): Promise<GoalRecord>;
|
|
160
|
-
pursue(network: string, id: string): Promise<PursueReport>;
|
|
161
|
-
nextSteps(network: string, id: string): Promise<{
|
|
162
|
-
goal: GoalRecord;
|
|
163
|
-
steps: NextStepOption[];
|
|
164
|
-
}>;
|
|
165
|
-
private emitSuggestionEvent;
|
|
166
|
-
list(network: string, filter?: {
|
|
167
|
-
stage?: GoalStage;
|
|
168
|
-
account?: string;
|
|
169
|
-
}): Promise<{
|
|
170
|
-
goals: GoalRecord[];
|
|
171
|
-
counts: Record<string, number>;
|
|
172
|
-
}>;
|
|
173
|
-
private mustGet;
|
|
174
|
-
}
|
|
175
|
-
export declare const goalEngine: GoalEngine;
|
package/dist/goal/GoalStore.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { SQLiteStorage } from "@wowok/wowok/w/local";
|
|
2
|
-
import { TERMINAL_STAGES, type GoalRecord, type GoalStage } from "./types.js";
|
|
3
|
-
export interface GoalListFilter {
|
|
4
|
-
stage?: GoalStage;
|
|
5
|
-
account?: string;
|
|
6
|
-
conversation_id?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class GoalStore {
|
|
9
|
-
private storage;
|
|
10
|
-
private locks;
|
|
11
|
-
constructor(storage?: SQLiteStorage);
|
|
12
|
-
private withLock;
|
|
13
|
-
private goalKey;
|
|
14
|
-
private idxKey;
|
|
15
|
-
private getJson;
|
|
16
|
-
private putJson;
|
|
17
|
-
create(network: string, goal: GoalRecord): Promise<GoalRecord>;
|
|
18
|
-
get(network: string, id: string): Promise<GoalRecord | undefined>;
|
|
19
|
-
save(network: string, goal: GoalRecord): Promise<GoalRecord>;
|
|
20
|
-
list(network: string, filter?: GoalListFilter): Promise<GoalRecord[]>;
|
|
21
|
-
remove(network: string, id: string): Promise<boolean>;
|
|
22
|
-
counts(network: string): Promise<Record<string, number>>;
|
|
23
|
-
private indexAdd;
|
|
24
|
-
}
|
|
25
|
-
export declare const GOAL_INDEX_STAGES: readonly GoalStage[];
|
|
26
|
-
export { TERMINAL_STAGES };
|
|
27
|
-
export declare const goalStore: GoalStore;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type GoalRecord, type NextStepOption } from "./types.js";
|
|
2
|
-
export interface NextStepsContext {
|
|
3
|
-
pending_suggestions: {
|
|
4
|
-
count: number;
|
|
5
|
-
top: string[];
|
|
6
|
-
};
|
|
7
|
-
open_problems: {
|
|
8
|
-
count: number;
|
|
9
|
-
top: string[];
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export declare function nextStepsForGoal(goal: GoalRecord, ctx?: NextStepsContext): NextStepOption[];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function registerPlanApproval(goalId: string): void;
|
|
2
|
-
export declare function revokePlanApproval(goalId: string): void;
|
|
3
|
-
export declare function isPlanPreapproved(env: unknown): boolean;
|
|
4
|
-
export declare function clearPlanApprovals(): void;
|
|
5
|
-
export declare function listPlanApprovals(): string[];
|
package/dist/goal/pursue.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { BoundaryQuestion, GoalAutonomy, GoalRecord, GoalType, PursueAction, PursueCandidate, PursuePlanItem, PursueRisk } from "./types.js";
|
|
2
|
-
export declare function goalBoundaryQuestions(goalType: GoalType): BoundaryQuestion[];
|
|
3
|
-
export declare function decideByAutonomy(autonomy: GoalAutonomy, risk: PursueRisk): "execute" | "ask_user";
|
|
4
|
-
export declare function exceedsBudget(cost: string | undefined, budget: string | undefined): boolean | null;
|
|
5
|
-
export interface PursuePlan {
|
|
6
|
-
action: PursueAction;
|
|
7
|
-
items: PursuePlanItem[];
|
|
8
|
-
boundary_status: PursuePlanBoundaryStatus;
|
|
9
|
-
notes: string[];
|
|
10
|
-
}
|
|
11
|
-
export interface PursuePlanBoundaryStatus {
|
|
12
|
-
autonomy: GoalAutonomy | "unset";
|
|
13
|
-
budget?: string;
|
|
14
|
-
deadline?: number;
|
|
15
|
-
deadline_exceeded?: boolean;
|
|
16
|
-
requirements?: string[];
|
|
17
|
-
}
|
|
18
|
-
export declare function pursueTick(goal: GoalRecord, candidates: PursueCandidate[], now: number): PursuePlan;
|
package/dist/graph/base.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { Analyzer, Confidence, Finding, FindingKind, FindingSeverity, NodeAnalyzer, Retention, TopoNode, ViewerRole, Viewport, FindingExposure } from "./types.js";
|
|
2
|
-
import type { NameResolver } from "./names.js";
|
|
3
|
-
export declare function findingWhere(f: {
|
|
4
|
-
id: string;
|
|
5
|
-
title?: string;
|
|
6
|
-
}): string;
|
|
7
|
-
export declare function findingWhereResolved(f: {
|
|
8
|
-
id: string;
|
|
9
|
-
title?: string;
|
|
10
|
-
}, names: NameResolver): string;
|
|
11
|
-
export declare const RETENTION_RANK: Record<Retention, number>;
|
|
12
|
-
export declare function pathConfidence(v: Viewport, pathEdges: Array<{
|
|
13
|
-
schema: string;
|
|
14
|
-
from: string;
|
|
15
|
-
truncated?: boolean;
|
|
16
|
-
retention: Retention;
|
|
17
|
-
}>): {
|
|
18
|
-
confidence: Confidence;
|
|
19
|
-
window?: {
|
|
20
|
-
observed: number;
|
|
21
|
-
limit: number;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
interface ControlIndex {
|
|
25
|
-
controllers: Map<string, Set<string>>;
|
|
26
|
-
objectsByEoa: Map<string, Set<string>>;
|
|
27
|
-
permsOfObject: Map<string, Set<string>>;
|
|
28
|
-
}
|
|
29
|
-
export declare function buildControlIndex(v: Viewport): ControlIndex;
|
|
30
|
-
export declare const DEFAULT_ANALYZERS: Analyzer[];
|
|
31
|
-
export declare function registerAnalyzer(analyzer: Analyzer): void;
|
|
32
|
-
export declare function getAnalyzer(id: string): Analyzer | undefined;
|
|
33
|
-
export declare function listAnalyzers(): string[];
|
|
34
|
-
export declare function runAnalyzers(v: Viewport, opts?: {
|
|
35
|
-
only?: string[];
|
|
36
|
-
kinds?: FindingKind[];
|
|
37
|
-
}): Finding[];
|
|
38
|
-
export declare function withFindingObjects(findings: Finding[]): Finding[];
|
|
39
|
-
export interface NodeRuleOutcome {
|
|
40
|
-
severity?: FindingSeverity;
|
|
41
|
-
title: string;
|
|
42
|
-
detail: string;
|
|
43
|
-
suggestion: string;
|
|
44
|
-
roles?: ViewerRole[];
|
|
45
|
-
confidence?: Confidence;
|
|
46
|
-
ruleId?: string;
|
|
47
|
-
evidence?: string;
|
|
48
|
-
exposure?: FindingExposure;
|
|
49
|
-
nativeRisk?: unknown;
|
|
50
|
-
}
|
|
51
|
-
export interface NodeRuleBinding {
|
|
52
|
-
id: string;
|
|
53
|
-
kind: FindingKind;
|
|
54
|
-
objectType: string;
|
|
55
|
-
inspect(node: TopoNode, v: Viewport): NodeRuleOutcome[];
|
|
56
|
-
}
|
|
57
|
-
export declare function adaptNodeAnalyzer(binding: NodeRuleBinding): NodeAnalyzer;
|
|
58
|
-
export declare function runNodeAnalyzers(v: Viewport, analyzers: NodeAnalyzer[]): Finding[];
|
|
59
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{describe,it,expect}from'vitest';import{ENTRYPOINT}from'@wowok/wowok';import{buildViewport,runAnalyzers,runNodeAnalyzers,adaptNodeAnalyzer,listAnalyzers,registerAnalyzer,findingWhere}from'./index.js';describe('findingWhere',()=>{it('renders\x20R4\x20as\x20machine\x20+\x20node\x20names\x20(no\x20::node::\x20grammar,\x20no\x20R4:\x20prefix)',()=>{expect(findingWhere({'id':'R4:myshop_machine:myshop_machine::node::Order\x20Confirmed→myshop_machine::node::Order\x20Cancel'}))['toBe']('myshop_machine:\x20Order\x20Confirmed\x20→\x20Order\x20Cancel');}),it('renders\x20R7/R2\x20as\x20object\x20kind\x20+\x20name',()=>{expect(findingWhere({'id':'R7:reward:0x1f2e'}))['toBe']('Reward\x200x1f2e'),expect(findingWhere({'id':'R7:treasury:0xabc'}))['toBe']('Treasury\x200xabc'),expect(findingWhere({'id':'R2:0x14519d'}))['toBe']('0x14519d');}),it('falls\x20back\x20to\x20the\x20finding\x20title\x20for\x20unknown\x20id\x20shapes',()=>{expect(findingWhere({'id':'R1:weird','title':'Arb\x20permission\x20shared\x20with\x20the\x20merchant'}))['toBe']('Arb\x20permission\x20shared\x20with\x20the\x20merchant');});});const FAMILY={'eoa.permission':'R','permission.core_binding':'R','permission.entity':'W','service.order':'R','service.machine':'F','service.buy_guard':'F','machine.permission':'F','machine.node':'W','wf.transition':'W','wf.forward_guard':'W','order.allocation':'F','demand.guard':'R','demand.presenter':'R','arbitration.voting_guard':'F','arb.arbitration_service':'F','arb.voter':'S'};class GB{['nodes']=new Map();['edges']=[];['out']=new Map();['inc']=new Map();['truncations']=[];['eoa'](a){return this['nodes']['set'](a,{'id':a,'kind':'eoa','state':'fetched','origins':[],'depth':0x0}),this;}['obj'](a,b,c,d){return this['nodes']['set'](a,{'id':a,'kind':'object','objectType':b,'state':'fetched','origins':[],'depth':0x1,'raw':{'object':a,'type':b,...d?{'type_raw':d}:{},'data':c}}),this;}['edge'](a,b,c,d,f,g=![]){const h={'id':a+'|'+b+'→'+c+(d?.['forward']?'|'+d['forward']:''),'schema':a,'family':FAMILY[a]??'F','from':b,'to':c,'retention':f??(FAMILY[a]==='R'?'bounded_exact':'complete'),'observedAt':0x1,...d?{'payload':d}:{},...g?{'truncated':!![]}:{}};return this['edges']['push'](h),(this['out']['get'](b)??this['out']['set'](b,[])['get'](b))['push'](h),(this['inc']['get'](c)??this['inc']['set'](c,[])['get'](c))['push'](h),h;}['trunc'](a,b,c){return this['truncations']['push']({'nodeId':a,'schema':b,'observed':c,'limit':0x1450}),this;}['build'](a='0xseed'){return{'network':ENTRYPOINT['Mainnet'],'seed':a,'builtAt':0x1,'nodes':this['nodes'],'edges':this['edges'],'out':this['out'],'inc':this['inc'],'gaps':[],'truncations':this['truncations'],'rpcReport':{'batches':0x0,'byChannel':{'objects':0x0,'keyedFields':0x0,'tables':0x0,'events':0x0},'dedupHits':0x0},'budgetExhausted':{}};}['vp'](a='0xseed',b='neutral'){return buildViewport(this['build'](a),a,b);}}const ids=a=>a['map'](b=>b['id']);describe('analyze\x20—\x20registry',()=>{it('ships\x20the\x2026\x20rules\x20(R1-7/A1-4/O1-4/G1-3\x20+\x20anti-cheat\x20AC1-7\x20+\x20proposal.gap)',()=>{expect(listAnalyzers()['sort']())['toEqual'](['R1','R2','R3','R4','R5','R6','R7','A1','A2','A3','A4','O1','O2','O3','O4','G1','G2','G3','AC1','AC2','AC3','AC4','AC5','AC6','AC7','proposal.gap']['sort']());}),it('is\x20fail-soft:\x20a\x20throwing\x20analyzer\x20never\x20aborts\x20the\x20suite',()=>{registerAnalyzer({'id':'__boom','kind':'risk','run':()=>{throw new Error('boom');}});const a=new GB()['obj']('0xs1','Service',{'bPublished':!![],'setting_lock_duration':'0'})['vp'](),b=runAnalyzers(a,{'only':['__boom','R6']});expect(ids(b))['toContain']('R6:0xs1'),expect(b['find'](c=>c['id']['startsWith']('__boom')))['toBeUndefined']();}),it('adapts\x20single-object\x20legacy\x20rules\x20through\x20the\x20NodeAnalyzer\x20bridge',()=>{const a=adaptNodeAnalyzer({'id':'legacy-lock','kind':'risk','objectType':'Service','inspect':e=>{const f=e['raw']['data']??{};return f['setting_lock_duration']==='0'?[{'title':'Lock','detail':'d','suggestion':'s','roles':['merchant']}]:[];}}),b=new GB()['obj']('0xs1','Service',{'bPublished':!![],'setting_lock_duration':'0'})['vp'](),c=runNodeAnalyzers(b,[a]);expect(c)['toHaveLength'](0x1),expect(c[0x0]['id'])['toBe']('legacy-lock:0xs1#0'),expect(c[0x0]['kind'])['toBe']('risk');});}),describe('analyze\x20—\x20risk\x20rules',()=>{it('R6\x20flags\x20published\x20services\x20without\x20a\x20setting\x20lock',()=>{const a=new GB()['obj']('0xs1','Service',{'bPublished':!![],'setting_lock_duration':'0'})['obj']('0xs2','Service',{'bPublished':!![],'setting_lock_duration':'2592000000'})['obj']('0xs3','Service',{'bPublished':![],'setting_lock_duration':'0'})['vp'](),b=runAnalyzers(a,{'only':['R6']});expect(ids(b))['toEqual'](['R6:0xs1']);}),it('R7\x20emits\x20CRITICAL\x20for\x20object\x20users\x20when\x20a\x20Treasury\x20has\x20mounted\x20external\x20withdraw\x20Guards',()=>{const a=new GB();a['obj']('0xt1','Treasury',{'external_withdraw_guard':[{'guard':'0xg1','identifier':0x0,'store_from_id':0x0}]}),a['obj']('0xt2','Treasury',{'external_withdraw_guard':[]});const b=runAnalyzers(a['vp'](),{'only':['R7']});expect(ids(b))['toEqual'](['R7:treasury:0xt1']),expect(b[0x0]['severity'])['toBe']('critical'),expect(b[0x0]['detail'])['toContain']('code\x2010');}),it('R7\x20emits\x20CRITICAL\x20for\x20object\x20users\x20when\x20a\x20Reward\x20has\x20mounted\x20claim\x20Guards',()=>{const a=new GB();a['obj']('0xr1','Reward',{'guards':[{'guard':'0xg1'}]}),a['obj']('0xr2','Reward',{'guards':[]});const b=runAnalyzers(a['vp'](),{'only':['R7']});expect(ids(b))['toEqual'](['R7:reward:0xr1']),expect(b[0x0]['severity'])['toBe']('critical'),expect(b[0x0]['detail'])['toContain']('GuardIdentifier');}),it('R7\x20downgrades\x20to\x20info\x20when\x20every\x20payout\x20slot\x20is\x20provably\x20bound\x20(guard\x20defs\x20fetched)',()=>{const a=new GB();a['obj']('0xr1','Reward',{'guards':[{'guard':'0xg1','recipient':'0xmerchant'}]}),a['obj']('0xg1','Guard',{'root':{'type':'true'},'table':[]});const b=runAnalyzers(a['vp'](),{'only':['R7']});expect(ids(b))['toEqual'](['R7:reward:0xr1']),expect(b[0x0]['severity'])['toBe']('info'),expect(b[0x0]['title'])['toContain']('downgraded\x20hint'),expect(b[0x0]['detail'])['toContain']('1\x20blocked,\x200\x20viable');}),it('R7\x20keeps\x20CRITICAL\x20when\x20a\x20fetched\x20guard\x20leaves\x20the\x20payout\x20slot\x20viable',()=>{const a=new GB();a['obj']('0xr1','Reward',{'guards':[{'guard':'0xg1','recipient':'Signer'}]}),a['obj']('0xg1','Guard',{'root':{'type':'true'},'table':[]});const b=runAnalyzers(a['vp'](),{'only':['R7']});expect(ids(b))['toEqual'](['R7:reward:0xr1']),expect(b[0x0]['severity'])['toBe']('critical');}),it('R7\x20carries\x20drill-through\x20objects\x20—\x20the\x20FULL\x20reward\x20address\x20from\x20path/detail',()=>{const a='0x1a77893aaa0f0000000000000000000000000000000000000000000000aa1234',b=new GB();b['obj'](a,'Reward',{'guards':[{'guard':'0xg1'}]});const c=runAnalyzers(b['vp'](),{'only':['R7']});expect(c)['toHaveLength'](0x1),expect(c[0x0]['objects'])['toEqual']([a]);}),it('R2\x20measures\x20the\x20compensation\x20fund\x20against\x203x\x20the\x20largest\x20windowed\x20order',()=>{const a=new GB();a['obj']('0xs1','Service',{'bPublished':!![],'compensation_fund':'50'}),a['obj']('0xo1','Order',{'amount':'100'}),a['obj']('0xo2','Order',{'amount':'100'}),a['edge']('service.order','0xs1','0xo1',undefined,'bounded_window'),a['edge']('service.order','0xs1','0xo2',undefined,'bounded_window',!![]);const b=runAnalyzers(a['vp'](),{'only':['R2']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['severity'])['toBe']('high'),expect(b[0x0]['confidence'])['toBe']('windowed'),expect(b[0x0]['window']?.['limit'])['toBe'](0x1450),expect(b[0x0]['detail'])['toContain']('{fund}'),expect(b[0x0]['detail'])['not']['toContain']('base\x20units'),expect(b[0x0]['amounts']?.['map'](c=>c['key']))['toEqual'](['fund','amount','needed']),expect(b[0x0]['amounts']?.['every'](c=>c['raw']==='50'||c['raw']==='100'||c['raw']==='300'))['toBe'](!![]);}),it('R1\x20flags\x20one\x20EOA\x20controlling\x20a\x20shop\x20and\x20an\x20arbitration\x20service\x20across\x20distinct\x20permissions',()=>{const a=new GB();a['eoa']('0xe1'),a['obj']('0xp1','Permission',{'owner':'0xe1'}),a['obj']('0xp2','Permission',{'owner':'0xe1'}),a['obj']('0xs1','Service',{}),a['obj']('0xa1','Arbitration',{'fee':'0'}),a['edge']('eoa.permission','0xe1','0xp1',{'roleBits':0x3}),a['edge']('eoa.permission','0xe1','0xp2',{'roleBits':0x3}),a['edge']('permission.core_binding','0xp1','0xs1'),a['edge']('permission.core_binding','0xp2','0xa1');const b=runAnalyzers(a['vp'](),{'only':['R1']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['severity'])['toBe']('high');const c=new GB();c['eoa']('0xe1')['obj']('0xp1','Permission',{})['obj']('0xs1','Service',{})['obj']('0xa1','Arbitration',{'fee':'0'}),c['edge']('eoa.permission','0xe1','0xp1',{'roleBits':0x3}),c['edge']('permission.core_binding','0xp1','0xs1'),c['edge']('permission.core_binding','0xp1','0xa1'),expect(runAnalyzers(c['vp'](),{'only':['R1']}))['toHaveLength'](0x0);}),it('R3\x20flags\x20concentrated\x20control\x20of\x20core\x20objects',()=>{const a=new GB();a['eoa']('0xe1')['obj']('0xp1','Permission',{}),a['obj']('0xs1','Service',{})['obj']('0xs2','Service',{})['obj']('0xm1','Machine',{}),a['edge']('eoa.permission','0xe1','0xp1',{'roleBits':0x1});for(const c of['0xs1','0xs2','0xm1'])a['edge']('permission.core_binding','0xp1',c);const b=runAnalyzers(a['vp'](),{'only':['R3']});expect(ids(b))['toEqual'](['R3:0xe1']);}),it('R4\x20flags\x20a\x20unique\x20operator\x20with\x20no\x20backup\x20guard\x20on\x20a\x20terminal-entering\x20forward',()=>{const a=new GB();a['obj']('0xm1','Machine',{'bPublished':!![]}),a['edge']('wf.transition','0xm1::node::paid','0xm1::node::delivered',{'node':'delivered','prevNode':'paid','forward':'go','namedOperator':'alice'});const b=runAnalyzers(a['vp'](),{'only':['R4']});expect(b)['toHaveLength'](0x1);const c=new GB();c['obj']('0xm1','Machine',{'bPublished':!![]}),c['edge']('wf.transition','0xm1::node::paid','0xm1::node::delivered',{'node':'delivered','prevNode':'paid','forward':'go','namedOperator':'alice','guard':'0xg1'}),expect(runAnalyzers(c['vp'](),{'only':['R4']}))['toHaveLength'](0x0);}),it('R5\x20reports\x20window\x20truncations\x20as\x20downgraded\x20meta\x20findings',()=>{const a=new GB()['obj']('0xs1','Service',{})['trunc']('0xs1','service.order',0x1450),b=runAnalyzers(a['vp'](),{'only':['R5']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['confidence'])['toBe']('windowed'),expect(b[0x0]['window'])['toEqual']({'observed':0x1450,'limit':0x1450});});}),describe('analyze\x20—\x20arbitrage\x20rules',()=>{it('A1\x20detects\x20rate-basis\x20mismatch,\x20surplus\x20duplication\x20and\x20missing\x20max',()=>{const a=new GB();a['obj']('0xal1','Allocation',{'allocators':[{'guard':'0xg1','max':null,'sharing':[{'who':'0xa','mode':0x0,'sharing':'100'}]},{'guard':'0xg2','sharing':[{'who':'0xb','mode':0x1,'sharing':'9000'}]},{'guard':'0xg3','sharing':[{'who':'0xc','mode':0x2}]},{'guard':'0xg4','sharing':[{'who':'0xd','mode':0x2}]}]});const b=runAnalyzers(a['vp'](),{'only':['A1']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['detail'])['toContain']('9000'),expect(b[0x0]['detail'])['toContain']('max'),expect(b[0x0]['detail'])['toContain']('Surplus');}),it('A1\x20fires\x20on\x20the\x20real\x20on-chain\x20container\x20shape\x20{threshold,\x20allocators:[…]}',()=>{const a=new GB();a['obj']('0xal2','Allocation',{'allocators':{'threshold':0x1,'allocators':[{'guard':'0xg2','sharing':[{'who':'0xb','mode':0x1,'sharing':'9000'}]}]}});const b=runAnalyzers(a['vp'](),{'only':['A1']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['detail'])['toContain']('9000');}),it('A4\x20detects\x20Surplus-then-Rate\x20drain\x20across\x20distinct\x20guards',()=>{const a=new GB();a['obj']('0xal3','Allocation',{'allocators':{'threshold':0x1,'allocators':[{'guard':'0xgsettle','sharing':[{'who':'0xmerchant','mode':0x1,'sharing':'9000'},{'who':'0xplatform','mode':0x2}]},{'guard':'0xgrefund','sharing':[{'who':'0xbuyer','mode':0x1,'sharing':'10000'}]}]},'payment_info':{'for_object':'0xorder1'},'balance':'1000000'});const b=runAnalyzers(a['vp'](),{'only':['A4']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['id'])['toBe']('A4:drain:0xal3'),expect(b[0x0]['detail'])['toContain']('0xgrefund');}),it('A4\x20flags\x20unanchored\x20GuardIdentifier\x20recipients',()=>{const a=new GB();a['obj']('0xal4','Allocation',{'allocators':{'threshold':0x1,'allocators':[{'guard':'0xgpay','sharing':[{'who':{'GuardIdentifier':0x1},'mode':0x1,'sharing':'10000'}]}]},'balance':'500'});const b=runAnalyzers(a['vp'](),{'only':['A4']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['id'])['toBe']('A4:unanchored:0xal4');}),it('A4\x20flags\x20settlement\x20deadlock:\x20completed\x20order\x20on\x20an\x20allocator-less\x20pool',()=>{const a=new GB();a['obj']('0xm1','Machine',{}),a['edge']('wf.transition','0xm1::node::paid','0xm1::node::completed',{'node':'completed','prevNode':'paid','forward':'settle'}),a['obj']('0xpr9','Progress',{'current':'completed','machine':'0xm1'}),a['obj']('0xord9','Order',{'machine':'0xm1','progress':'0xpr9','amount':'1000'}),a['obj']('0xal5','Allocation',{'allocators':{'threshold':0x1,'allocators':[]},'balance':'1000'}),a['edge']('order.allocation','0xord9','0xal5');const b=runAnalyzers(a['vp'](),{'only':['A4']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['id'])['toBe']('A4:deadlock:0xal5:0xord9'),expect(b[0x0]['severity'])['toBe']('critical');}),it('A2\x20flags\x20transferable\x20fixed\x20long-window\x20discounts\x20without\x20a\x20benchmark',()=>{const a=new GB();a['obj']('0xd1','Discount',{'discount_type':0x1,'benchmark':null,'transferable':!![],'time_start':'0','time_end':String(0x1fn*0x18n*0x3cn*0x3cn*0x3e8n)});const b=runAnalyzers(a['vp'](),{'only':['A2']});expect(b)['toHaveLength'](0x1);const c=new GB();c['obj']('0xd2','Discount',{'discount_type':0x1,'benchmark':null,'transferable':![],'time_start':'0','time_end':String(0x1fn*0x18n*0x3cn*0x3cn*0x3e8n)}),expect(runAnalyzers(c['vp'](),{'only':['A2']}))['toHaveLength'](0x0);}),it('A3\x20flags\x20zero-fee/no-usage-guard\x20arbitration\x20and\x20reports\x20CoinWrapper\x20custody',()=>{const a=new GB();a['obj']('0xa1','Arbitration',{'fee':'0','usage_guard':null,'voting_guard':[]}),a['obj']('0xcw1','Payment',{},'0x2::payment::CoinWrapper<0x2::wow::WOW>');const b=runAnalyzers(a['vp'](),{'only':['A3']});expect(ids(b)['sort']())['toEqual'](['A3:0xa1','A3:coinwrapper']),expect(b['find'](c=>c['id']==='A3:coinwrapper')['detail'])['toContain']('0x2::wow::WOW');});}),describe('analyze\x20—\x20opportunity\x20rules',()=>{it('O1\x20surfaces\x20scarce-presenter\x20demands\x20with\x20structurally\x20matching\x20services',()=>{const a=new GB();a['obj']('0xdm1','Demand',{'guards':[{'guard':'0xg1'}]}),a['edge']('demand.guard','0xdm1','0xg1'),a['obj']('0xs1','Service',{'bPublished':!![]}),a['obj']('0xm1','Machine',{}),a['edge']('service.machine','0xs1','0xm1'),a['edge']('wf.forward_guard','0xm1::node::paid','0xg1');const b=runAnalyzers(a['vp'](),{'only':['O1']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['detail'])['toContain']('0xs1'),a['eoa']('0u1')['eoa']('0u2'),a['edge']('demand.presenter','0xdm1','0u1',{'service':'0xs1'}),a['edge']('demand.presenter','0xdm1','0u2',{'service':'0xs1'}),expect(runAnalyzers(a['vp'](),{'only':['O1']}))['toHaveLength'](0x0);}),it('O4\x20projects\x20presenter\x20acceptance\x20coverage\x20and\x20freshness\x20(D-R8);\x20a\x20sparse\x20sample\x20is\x20not\x20a\x20verdict',()=>{const a=new GB();a['obj']('0xdm1','Demand',{'description':'build\x20a\x20shop'}),a['eoa']('0u1')['eoa']('0u2'),a['edge']('demand.presenter','0xdm1','0u1',{'service':'0xs1','score':0x5a,'time':0x190,'feedbackTime':0x1f4}),a['edge']('demand.presenter','0xdm1','0u2',{});const b=runAnalyzers(a['vp'](),{'only':['O4']});expect(ids(b))['toEqual'](['O4:0xdm1']),expect(b[0x0]['detail'])['toContain']('2\x20presenter(s),\x201\x20with\x20an\x20acceptance\x20score'),expect(b[0x0]['detail'])['toContain']('sparse\x20by\x20nature');}),it('O4\x20skips\x20presenter-less\x20demands\x20and\x20reports\x20unknown\x20staleness\x20without\x20timestamps',()=>{const a=new GB();a['obj']('0xdm1','Demand',{}),a['obj']('0xdm2','Demand',{}),a['eoa']('0u1'),a['edge']('demand.presenter','0xdm2','0u1',{'score':0x28});const b=runAnalyzers(a['vp'](),{'only':['O4']});expect(ids(b))['toEqual'](['O4:0xdm2']),expect(b[0x0]['detail'])['toContain']('staleness\x20unknown');}),it('O2\x20reports\x20graph\x20supply/demand\x20density',()=>{const a=new GB();a['obj']('0xs1','Service',{'bPublished':!![],'bPaused':![]}),a['obj']('0xs2','Service',{'bPublished':![]}),a['obj']('0xd1','Demand',{});const b=runAnalyzers(a['vp'](),{'only':['O2']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['detail'])['toContain']('2\x20Service(s)'),expect(b[0x0]['detail'])['toContain']('1\x20open\x20demand(s)');}),it('O3\x20lists\x20operator-less\x20forwards\x20as\x20workflow\x20slots',()=>{const a=new GB();a['obj']('0xm1','Machine',{}),a['edge']('wf.transition','0xm1::node::paid','0xm1::node::done',{'node':'done','prevNode':'paid','forward':'auto','namedOperator':null,'permissionIndex':null,'guard':'0xg1'});const b=runAnalyzers(a['vp'](),{'only':['O3']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['detail'])['toContain']('paid:auto');});}),describe('analyze\x20—\x20game\x20rules',()=>{it('G1\x20reports\x20all-vote\x20vs\x20weighted\x20structures\x20plus\x20observed\x20case\x20weights',()=>{const a=new GB();a['obj']('0xa1','Arbitration',{'fee':'0','voting_guard':[]}),a['obj']('0xcase1','Arb',{'voted':[{'voter':'0u1','weight':0x1},{'voter':'0u2','weight':0x2}]}),a['edge']('arb.arbitration_service','0xcase1','0xa1');const b=runAnalyzers(a['vp'](),{'only':['G1']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['detail'])['toContain']('open\x20to\x20all\x20members'),expect(b[0x0]['detail'])['toContain']('w1x1'),expect(b[0x0]['detail'])['toContain']('w2x1');}),it('G2\x20marks\x20a\x20named-operator\x20forward\x20as\x20a\x20pool-of-one\x20hold-up\x20point',()=>{const a=new GB();a['obj']('0xm1','Machine',{}),a['edge']('wf.transition','0xm1::node::paid','0xm1::node::done',{'node':'done','prevNode':'paid','forward':'sign','namedOperator':'bob'});const b=runAnalyzers(a['vp'](),{'only':['G2']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['id'])['toContain']('paid:sign');}),it('G3\x20emits\x20the\x20relief\x20parameter\x20matrix\x20for\x20every\x20arbitration\x20service',()=>{const a=new GB();a['obj']('0xa1','Arbitration',{'fee':'5','usage_guard':'0xg1','voting_guard':[{'guard':'0xg2'}]});const b=runAnalyzers(a['vp'](),{'only':['G3']});expect(b)['toHaveLength'](0x1),expect(b[0x0]['detail'])['toContain']('fee=5'),expect(b[0x0]['detail'])['toContain']('30-day');});}),describe('analyze\x20—\x20anti-cheat\x20rules\x20(AC1-AC4)',()=>{function a(d,e,f,g){d['eoa'](e),d['edge']('eoa.permission',e,f,{'roleBits':0x1|0x2}),d['edge']('permission.core_binding',f,g);}function b(d,e,f,g){d['obj'](f,'Order',g),d['edge']('service.order',e,f,undefined,'bounded_window'),d['edge']('order.builder',f,String(g['builder']));}it('AC1\x20flags\x20window\x20orders\x20whose\x20buyer\x20controls\x20the\x20selling\x20Service',()=>{const d=new GB();d['obj']('0xs1','Service',{'bPublished':!![],'machine':'0xm1'}),a(d,'0u1','0p1','0xs1'),b(d,'0xs1','0o1',{'builder':'0u1','service':'0xs1','amount':'100'});const e=runAnalyzers(d['vp'](),{'only':['AC1']});expect(e)['toHaveLength'](0x1),expect(e[0x0]['severity'])['toBe']('high'),expect(e[0x0]['confidence'])['toBe']('windowed'),expect(e[0x0]['id'])['toContain']('0o1');const f=new GB();f['obj']('0xs1','Service',{'bPublished':!![],'machine':'0xm1'}),a(f,'0u1','0p1','0xs1'),b(f,'0xs1','0o1',{'builder':'0u2','service':'0xs1','amount':'100'}),expect(runAnalyzers(f['vp'](),{'only':['AC1']}))['toEqual']([]);}),it('AC2\x20flags\x20reciprocal\x20buying\x20between\x20two\x20controlled\x20Services',()=>{const d=new GB();d['obj']('0xs1','Service',{'bPublished':!![],'machine':'0xm1'}),d['obj']('0xs2','Service',{'bPublished':!![],'machine':'0xm2'}),a(d,'0u1','0p1','0xs1'),a(d,'0u2','0p2','0xs2'),b(d,'0xs1','0o1',{'builder':'0u2','service':'0xs1','amount':'100'}),b(d,'0xs2','0o2',{'builder':'0u1','service':'0xs2','amount':'100'});const e=runAnalyzers(d['vp'](),{'only':['AC2']});expect(e)['toHaveLength'](0x1),expect(e[0x0]['severity'])['toBe']('medium'),expect(e[0x0]['id'])['toContain']('0o1'),expect(e[0x0]['id'])['toContain']('0o2');}),it('AC3\x20flags\x20completed\x20positive-amount\x20orders\x20without\x20Allocation,\x20but\x20not\x20zero-amount\x20orders',()=>{const d=new GB();d['obj']('0xs1','Service',{'bPublished':!![],'machine':'0xm1'}),a(d,'0u1','0p1','0xs1'),b(d,'0xs1','0opaid',{'builder':'0u9','service':'0xs1','amount':'100'}),b(d,'0xs1','0ofree',{'builder':'0u8','service':'0xs1','amount':'0'});const e=runAnalyzers(d['vp'](),{'only':['AC3']});expect(e)['toHaveLength'](0x1),expect(e[0x0]['id'])['toContain']('0opaid'),expect(e[0x0]['id'])['not']['toContain']('0ofree'),d['edge']('order.allocation','0opaid','0al1'),expect(runAnalyzers(d['vp'](),{'only':['AC3']}))['toEqual']([]);}),it('AC4\x20surfaces\x20shell-merchant\x20shapes\x20only\x20for\x20published\x20Services',()=>{const d=new GB();d['obj']('0xs1','Service',{'bPublished':!![],'arbitrations':[],'compensation_fund':'0'});const e=runAnalyzers(d['vp'](),{'only':['AC4']});expect(ids(e)['sort']())['toEqual'](['AC4:0xs1:shell_no_arbitration','AC4:0xs1:shell_no_machine']['sort']());const f=new GB();f['obj']('0xs2','Service',{'bPublished':!![],'arbitrations':[],'compensation_fund':'500'});const g=runAnalyzers(f['vp'](),{'only':['AC4']});expect(g['map'](i=>i['severity'])['sort']())['toEqual'](['high','low','medium']['sort']());const h=new GB();h['obj']('0xs3','Service',{'bPublished':![],'arbitrations':[],'compensation_fund':'500'}),expect(runAnalyzers(h['vp'](),{'only':['AC4']}))['toEqual']([]);});function c(){const d=new GB();return d['edge']('target.vote','0xt1','0xv1',{'voteBits':0x2}),d['edge']('target.vote','0xt2','0xv1',{'voteBits':0x2}),d['edge']('target.vote','0xt3','0xv1',{'voteBits':0x4}),d['edge']('target.vote','0xt1','0xv2',{'voteBits':0x2}),d['edge']('entity.profile','0xv1','0xv1',{'registeredAt':Date['now']()-0x2*0x5265c00}),d['edge']('entity.profile','0xv2','0xv2',{'registeredAt':Date['now']()-0x320*0x5265c00}),d['eoa']('0o1'),d['edge']('eoa.order','0xv2','0o1',{'roleBits':0x1}),d;}it('AC5\x20flags\x20the\x20fresh\x20voter\x27s\x20burst\x20through\x20the\x20full\x20graph\x20projection',()=>{const d=runAnalyzers(c()['vp'](),{'only':['AC5']});expect(d)['toHaveLength'](0x1),expect(d[0x0]['severity'])['toBe']('medium'),expect(d[0x0]['id'])['toContain']('0xv1');}),it('AC6\x20flags\x20a\x20mutual\x20vote\x20pair\x20through\x20the\x20full\x20graph\x20projection',()=>{const d=new GB();d['edge']('target.vote','0xa','0xb',{'voteBits':0x2}),d['edge']('target.vote','0xb','0xa',{'voteBits':0x2});const e=runAnalyzers(d['vp'](),{'only':['AC6']});expect(e)['toHaveLength'](0x1),expect(e[0x0]['severity'])['toBe']('medium'),expect(runAnalyzers(c()['vp'](),{'only':['AC6']}))['toEqual']([]);}),it('AC7\x20flags\x20the\x20target\x20whose\x20votes\x20are\x20dominated\x20by\x20low-credibility\x20voters',()=>{const d=new GB();for(const [f,g]of['0xf1','0xf2','0xz','0xok1','0xok2']['entries']()){d['edge']('target.vote','0xt',g,{'voteBits':0x2});const h=g['startsWith']('0xf')||g==='0xz';d['edge']('entity.profile',g,g,h?{'registeredAt':Date['now']()-0x5265c00}:{'registeredAt':Date['now']()-0x384*0x5265c00}),!h&&(d['eoa']('0o'+f),d['edge']('eoa.order',g,'0o'+f,{'roleBits':0x1}));}const e=runAnalyzers(d['vp'](),{'only':['AC7']});expect(e)['toHaveLength'](0x1),expect(e[0x0]['severity'])['toBe']('high'),expect(e[0x0]['id'])['toContain']('0xt');});});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export type AntiCheatSeverity = "high" | "medium" | "low";
|
|
2
|
-
export interface AntiCheatSignal {
|
|
3
|
-
kind: "fake_order" | "fake_review" | "shell_merchant" | "reputation_trade" | "vote_noise";
|
|
4
|
-
code: "self_buy" | "reciprocal_loop" | "no_allocation" | "reviews_unverified" | "reviewer_duplicate" | "review_time_burst" | "shell_no_arbitration" | "shell_funded_no_arbitration" | "shell_no_machine" | "reputation_bound" | "new_account_burst" | "vote_reciprocity" | "single_target_flood";
|
|
5
|
-
severity: AntiCheatSeverity;
|
|
6
|
-
description: string;
|
|
7
|
-
refs?: string[];
|
|
8
|
-
}
|
|
9
|
-
export interface OrderEvidence {
|
|
10
|
-
id: string;
|
|
11
|
-
buyer: string;
|
|
12
|
-
seller: string;
|
|
13
|
-
amount: number | bigint | string;
|
|
14
|
-
status: string;
|
|
15
|
-
allocation?: string | null;
|
|
16
|
-
}
|
|
17
|
-
export interface ReviewEvidence {
|
|
18
|
-
reviewer: string;
|
|
19
|
-
rating: "like" | "dislike";
|
|
20
|
-
orderRef?: string;
|
|
21
|
-
verified?: boolean;
|
|
22
|
-
timestamp?: number;
|
|
23
|
-
}
|
|
24
|
-
export interface MerchantEvidence {
|
|
25
|
-
service: {
|
|
26
|
-
object: string;
|
|
27
|
-
arbitrations: string[];
|
|
28
|
-
compensation_fund: number | bigint | string;
|
|
29
|
-
machine: string | null;
|
|
30
|
-
bPublished: boolean;
|
|
31
|
-
};
|
|
32
|
-
orders: OrderEvidence[];
|
|
33
|
-
reviews: ReviewEvidence[];
|
|
34
|
-
}
|
|
35
|
-
export declare function detectFakeOrders(orders: OrderEvidence[]): AntiCheatSignal[];
|
|
36
|
-
export declare function detectFakeReviews(reviews: ReviewEvidence[]): AntiCheatSignal[];
|
|
37
|
-
export declare function detectShellMerchant(service: MerchantEvidence["service"]): AntiCheatSignal[];
|
|
38
|
-
export declare function reputationTradeNote(): AntiCheatSignal;
|
|
39
|
-
export declare function assessAntiCheat(evidence: MerchantEvidence): AntiCheatSignal[];
|
|
40
|
-
export interface VoteEdgeEvidence {
|
|
41
|
-
voter: string;
|
|
42
|
-
target: string;
|
|
43
|
-
like: boolean;
|
|
44
|
-
dislike: boolean;
|
|
45
|
-
favor: boolean;
|
|
46
|
-
}
|
|
47
|
-
export interface VoterProfileEvidence {
|
|
48
|
-
address: string;
|
|
49
|
-
registeredAt?: number;
|
|
50
|
-
ordersOwned: number;
|
|
51
|
-
ordersAgented: number;
|
|
52
|
-
objectsFootprint: number;
|
|
53
|
-
}
|
|
54
|
-
export declare const VOTER_NEW_ACCOUNT_DAYS = 30;
|
|
55
|
-
export declare const VOTER_BURST_MIN_VOTES = 3;
|
|
56
|
-
export declare const VOTER_FLOOD_MIN_VOTES = 5;
|
|
57
|
-
export declare const VOTER_FLOOD_LOW_CRED_RATIO = 0.5;
|
|
58
|
-
export interface VoterCredibility {
|
|
59
|
-
address: string;
|
|
60
|
-
accountAgeDays: number | null;
|
|
61
|
-
ordersCount: number;
|
|
62
|
-
objectsFootprint: number;
|
|
63
|
-
votesCast: number;
|
|
64
|
-
likeRatio: number | null;
|
|
65
|
-
}
|
|
66
|
-
export declare function summarizeVoterCredibility(votes: VoteEdgeEvidence[], profiles: VoterProfileEvidence[], nowMs: number): VoterCredibility[];
|
|
67
|
-
export declare function detectNewAccountBurst(votes: VoteEdgeEvidence[], profiles: VoterProfileEvidence[], nowMs: number): AntiCheatSignal[];
|
|
68
|
-
export declare function detectVoteReciprocity(votes: VoteEdgeEvidence[]): AntiCheatSignal[];
|
|
69
|
-
export declare function detectTargetFlood(votes: VoteEdgeEvidence[], profiles: VoterProfileEvidence[], nowMs: number): AntiCheatSignal[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{describe,expect,it}from'vitest';import{assessAntiCheat,detectFakeOrders,detectShellMerchant,detectNewAccountBurst,detectVoteReciprocity,detectTargetFlood,summarizeVoterCredibility}from'./index.js';function order(a){return{'amount':'0','status':'completed','allocation':null,...a};}describe('anti-cheat\x20pure\x20engine\x20—\x20detectFakeOrders',()=>{it('flags\x20self-buy-sell\x20with\x20order\x20refs\x20and\x20code',()=>{const a=detectFakeOrders([order({'id':'o1','buyer':'a','seller':'a'})]);expect(a)['toHaveLength'](0x1),expect(a[0x0]['code'])['toBe']('self_buy'),expect(a[0x0]['severity'])['toBe']('high'),expect(a[0x0]['refs'])['toEqual'](['o1']);}),it('flags\x20reciprocal\x20buyer/seller\x20loops\x20only\x20with\x20two\x20or\x20more\x20matching\x20orders',()=>{const a=detectFakeOrders([order({'id':'o1','buyer':'a','seller':'b'})]);expect(a['find'](d=>d['code']==='reciprocal_loop'))['toBeUndefined']();const b=detectFakeOrders([order({'id':'o1','buyer':'a','seller':'b','amount':'100','allocation':'al1'}),order({'id':'o2','buyer':'b','seller':'a','amount':'100','allocation':'al2'})]),c=b['find'](d=>d['code']==='reciprocal_loop');expect(c?.['refs'])['toEqual'](['o1','o2']);}),it('treats\x20completed\x20positive-amount\x20orders\x20without\x20Allocation\x20as\x20unclosed,\x20but\x20exempts\x20zero-amount\x20orders',()=>{const a=detectFakeOrders([order({'id':'paid-noalloc','buyer':'a','seller':'b','amount':'100','status':'completed'}),order({'id':'free-noalloc','buyer':'a','seller':'b','amount':'0','status':'completed'}),order({'id':'open-noalloc','buyer':'a','seller':'b','amount':'100','status':'in_progress'})]),b=a['find'](c=>c['code']==='no_allocation');expect(b?.['refs'])['toEqual'](['paid-noalloc']);});}),describe('anti-cheat\x20pure\x20engine\x20—\x20detectShellMerchant',()=>{const a={'object':'s1','arbitrations':[],'compensation_fund':'0','machine':null,'bPublished':!![]};it('stays\x20silent\x20for\x20unpublished\x20services',()=>{expect(detectShellMerchant({...a,'bPublished':![]}))['toEqual']([]);}),it('emits\x20the\x20three\x20shell\x20codes\x20with\x20contract-aligned\x20severities',()=>{const b=detectShellMerchant({...a,'compensation_fund':'9'});expect(b['map'](d=>d['code'])['sort']())['toEqual'](['shell_no_arbitration','shell_funded_no_arbitration','shell_no_machine']['sort']()),expect(b['find'](d=>d['code']==='shell_funded_no_arbitration')?.['severity'])['toBe']('high');const c=detectShellMerchant({...a,'machine':'m1','compensation_fund':'0'});expect(c['find'](d=>d['code']==='shell_no_arbitration')?.['severity'])['toBe']('low');});}),describe('anti-cheat\x20pure\x20engine\x20—\x20assessAntiCheat',()=>{it('composes\x20order/review/service\x20signals\x20plus\x20the\x20static\x20reputation\x20note',()=>{const a=assessAntiCheat({'service':{'object':'s1','arbitrations':[],'compensation_fund':'0','machine':null,'bPublished':!![]},'orders':[order({'id':'o1','buyer':'a','seller':'a'})],'reviews':[]});expect(a['map'](b=>b['code']))['toContain']('self_buy'),expect(a['map'](b=>b['code']))['toContain']('reputation_bound');});});const NOW=0x1a3185c5000;function vote(a,b,c=!![]){return{'voter':a,'target':b,'like':c,'dislike':!c&&![],'favor':![]};}function profile(a){return{'ordersOwned':0x0,'ordersAgented':0x0,'objectsFootprint':0x0,...a};}describe('anti-cheat\x20pure\x20engine\x20—\x20voter-side\x20(V-PROF)',()=>{it('AC5\x20flags\x20fresh\x20accounts\x20voting\x20in\x20a\x20burst,\x20not\x20one-vote\x20onboarding',()=>{const a=NOW-0x5*0x5265c00,b=[profile({'address':'n1','registeredAt':a}),profile({'address':'n2','registeredAt':a}),profile({'address':'old','registeredAt':NOW-0x190*0x5265c00})],c=[vote('n1','t1'),vote('n1','t2'),vote('n1','t3'),vote('n2','t1'),vote('old','t1')],d=detectNewAccountBurst(c,b,NOW);expect(d)['toHaveLength'](0x1),expect(d[0x0]['code'])['toBe']('new_account_burst'),expect(d[0x0]['severity'])['toBe']('medium'),expect(d[0x0]['refs'])['toEqual'](['n1']),expect(detectNewAccountBurst([vote('old','t1'),vote('old','t2'),vote('old','t3')],b,NOW))['toEqual']([]);}),it('AC6\x20flags\x20mutual\x20vote\x20pairs\x20once\x20per\x20pair\x20(direction-normalized)',()=>{const a=detectVoteReciprocity([vote('a','b'),vote('b','a'),vote('a','c')]);expect(a)['toHaveLength'](0x1),expect(a[0x0]['code'])['toBe']('vote_reciprocity'),expect(a[0x0]['refs'])['toEqual'](['a','b']),expect(detectVoteReciprocity([vote('a','b'),vote('a','c'),vote('b','c')]))['toEqual']([]);}),it('AC7\x20flags\x20a\x20target\x20flooded\x20by\x20low-credibility\x20voters;\x20unexpanded\x20profiles\x20prove\x20nothing',()=>{const a=NOW-0x2*0x5265c00,b=[profile({'address':'f1','registeredAt':a}),profile({'address':'f2','registeredAt':a}),profile({'address':'z1'}),profile({'address':'busy','ordersOwned':0x4,'objectsFootprint':0x9})],c=[vote('f1','victim'),vote('f2','victim'),vote('z1','victim'),vote('f2','victim'),vote('busy','victim'),vote('busy','victim2')],d=detectTargetFlood(c,b,NOW);expect(d)['toHaveLength'](0x1),expect(d[0x0]['code'])['toBe']('single_target_flood'),expect(d[0x0]['severity'])['toBe']('high'),expect(d[0x0]['refs']?.[0x0])['toBe']('victim');const e=detectTargetFlood([vote('u1','t'),vote('u2','t'),vote('u3','t'),vote('u4','t')],[],NOW);expect(e)['toEqual']([]);}),it('summarizeVoterCredibility\x20projects\x20the\x20per-voter\x20facets',()=>{const c=summarizeVoterCredibility([vote('a','t'),vote('a','t2'),vote('b','t',![])],[profile({'address':'a','registeredAt':NOW-0xa*0x5265c00,'ordersOwned':0x2,'objectsFootprint':0x5})],NOW);expect(c)['toHaveLength'](0x2);const d=c['find'](f=>f['address']==='a');expect(d['accountAgeDays'])['toBe'](0xa),expect(d['ordersCount'])['toBe'](0x2),expect(d['votesCast'])['toBe'](0x2),expect(d['likeRatio'])['toBe'](0x1);const e=c['find'](f=>f['address']==='b');expect(e['accountAgeDays'])['toBeNull'](),expect(e['likeRatio'])['toBe'](0x0);});});
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { DataPlane, EventCursor, EventPage, ExpandBudget, RawObject, TableItem } from "./types.js";
|
|
2
|
-
export declare const MAX_OBJECTS_PER_QUERY = 50;
|
|
3
|
-
export declare const DEFAULT_BUDGET: ExpandBudget;
|
|
4
|
-
export declare function mergeBudget(b?: Partial<ExpandBudget>): ExpandBudget;
|
|
5
|
-
export declare function mapPool<T, R>(items: T[], concurrency: number, fn: (item: T, index: number) => Promise<R>): Promise<R[]>;
|
|
6
|
-
export declare function chunk50<T>(items: T[]): T[][];
|
|
7
|
-
export interface FakePlaneState {
|
|
8
|
-
objects: Map<string, RawObject>;
|
|
9
|
-
keyedFields: Map<string, Map<string, unknown>>;
|
|
10
|
-
tables: Map<string, TableItem[]>;
|
|
11
|
-
events: Map<string, {
|
|
12
|
-
events: unknown[];
|
|
13
|
-
fail?: boolean;
|
|
14
|
-
}[]>;
|
|
15
|
-
}
|
|
16
|
-
export declare class FakeDataPlane implements DataPlane {
|
|
17
|
-
readonly state: FakePlaneState;
|
|
18
|
-
batches: {
|
|
19
|
-
objects: number;
|
|
20
|
-
keyedFields: number;
|
|
21
|
-
tables: number;
|
|
22
|
-
events: number;
|
|
23
|
-
};
|
|
24
|
-
dedupHits: number;
|
|
25
|
-
private seenObjects;
|
|
26
|
-
private seenKeyed;
|
|
27
|
-
constructor(state?: Partial<FakePlaneState>);
|
|
28
|
-
getObjects(ids: string[]): Promise<Map<string, RawObject>>;
|
|
29
|
-
getKeyedFields(parent: string, keys: string[], opts?: {
|
|
30
|
-
keyType?: "address" | "u64";
|
|
31
|
-
}): Promise<Map<string, RawObject>>;
|
|
32
|
-
getTable(parent: string, opts?: {
|
|
33
|
-
maxItems?: number;
|
|
34
|
-
pageLimit?: number;
|
|
35
|
-
fetchValues?: boolean;
|
|
36
|
-
}): Promise<{
|
|
37
|
-
items: TableItem[];
|
|
38
|
-
truncated: boolean;
|
|
39
|
-
}>;
|
|
40
|
-
getEvents(type: string, opts?: {
|
|
41
|
-
cursor?: EventCursor | null;
|
|
42
|
-
maxPages?: number;
|
|
43
|
-
}): Promise<EventPage>;
|
|
44
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{describe,expect,it}from'vitest';import{ENTRYPOINT}from'@wowok/wowok';import{FakeDataPlane}from'./dataplane.js';import{expandTopology}from'./expand.js';import{extractObjectEdges,inferObjectType}from'./extract.js';import{FULL,fullServiceObjects,fullServiceState}from'./fixtures.js';import{COVERED_OBJECT_TYPES,EDGE_SCHEMA_BY_ID,outgoingSchemaIds}from'./edge-schema.js';function rawByAddress(a){const b=fullServiceObjects()['find'](c=>c['object']===a);if(!b)throw new Error('fixture\x20object\x20missing:\x20'+a);return b;}function refsOf(a,b,c){const d=extractObjectEdges(a,b)['find'](e=>e['schemaId']===c);return d?.['refs']??[];}describe('Task\x206\x20field-edge\x20batch\x20—\x20extraction\x20on\x20golden\x20fixtures\x20(TR-6.1)',()=>{it('order.required_info\x20→\x20the\x20WTS\x20proof\x20/\x20IM\x20credential',()=>{expect(refsOf('Order',rawByAddress(FULL['o1']),'order.required_info')['map'](a=>a['to']))['toEqual']([FULL['proof1']]);}),it('discount.service\x20→\x20the\x20issuing\x20shop',()=>{expect(refsOf('Discount',rawByAddress(FULL['disc']),'discount.service')['map'](a=>a['to']))['toEqual']([FULL['svc']]);}),it('progress.context_repository\x20→\x20runtime\x20evidence\x20repositories',()=>{expect(refsOf('Progress',rawByAddress(FULL['pr1']),'progress.context_repository')['map'](a=>a['to']))['toEqual']([FULL['repo']]);}),it('allocation.payment\x20→\x20payment\x20receipts',()=>{expect(refsOf('Allocation',rawByAddress(FULL['alloc']),'allocation.payment')['map'](a=>a['to']))['toEqual']([FULL['pay1'],FULL['pay2']]);}),it('allocation\x20payment_info\x20→\x20M\x20routing\x20object/guard\x20with\x20coin\x20type',()=>{const a=refsOf('Allocation',rawByAddress(FULL['alloc']),'allocation.for_object'),b=refsOf('Allocation',rawByAddress(FULL['alloc']),'allocation.for_guard');expect(a['map'](c=>c['to']))['toEqual']([FULL['o1']]),expect(a[0x0]['payload']?.['coinType'])['toContain']('USDT'),expect(b['map'](c=>c['to']))['toEqual']([FULL['gAlloc']]),expect(b[0x0]['payload']?.['coinType'])['toContain']('USDT');}),it('repository.um\x20/\x20permission.owner\x20/\x20permission.um\x20/\x20treasury.um',()=>{expect(refsOf('Repository',rawByAddress(FULL['repo']),'repository.um')['map'](a=>a['to']))['toEqual']([FULL['ctRepo']]),expect(refsOf('Permission',rawByAddress(FULL['perm']),'permission.owner')['map'](a=>a['to']))['toEqual']([FULL['merchant']]),expect(refsOf('Permission',rawByAddress(FULL['perm']),'permission.um')['map'](a=>a['to']))['toEqual']([FULL['ctShop']]),expect(refsOf('Treasury',rawByAddress(FULL['tres']),'treasury.um')['map'](a=>a['to']))['toEqual']([FULL['ctT']]);}),it('payment.signer\x20→\x20the\x20payer\x20EOA',()=>{expect(refsOf('Payment',rawByAddress(FULL['pay1']),'payment.signer')['map'](a=>a['to']))['toEqual']([FULL['buyer']]);}),it('passport.impack\x20→\x20packed\x20business\x20objects',()=>{expect(refsOf('Passport',rawByAddress(FULL['pp']),'passport.impack')['map'](a=>a['to']))['toEqual']([FULL['o1']]);}),it('passport.ticket_relies\x20→\x20sub-guards\x20nested\x20under\x20guard[].relies[]',()=>{expect(refsOf('Passport',rawByAddress(FULL['pp']),'passport.ticket_relies')['map'](a=>a['to']))['toEqual']([FULL['gSub']]);}),it('contact.im\x20→\x20member\x20EOA\x20with\x20roster\x20payload\x20(status/join_time/description)',()=>{const a=refsOf('Contact',rawByAddress(FULL['ctShop']),'contact.im');expect(a['map'](b=>b['to']))['toEqual']([FULL['member']]),expect(a[0x0]['payload'])['toMatchObject']({'imStatus':'active','joinTime':0x18bcfe56800,'imDescription':'ops\x20im'});});}),describe('Task\x206\x20field-edge\x20batch\x20—\x20empty\x20values\x20produce\x20no\x20edges\x20(TR-6.1)',()=>{it('bare\x20order\x20/\x20progress\x20have\x20no\x20required_info\x20/\x20context_repository\x20edges',()=>{expect(refsOf('Order',rawByAddress(FULL['o2']),'order.required_info'))['toEqual']([]),expect(refsOf('Progress',rawByAddress(FULL['pr2']),'progress.context_repository'))['toEqual']([]);}),it('empty\x20roster\x20/\x20ticket\x20vectors\x20produce\x20no\x20edges',()=>{const a={'object':FULL['ctMac'],'type':'Contact','data':{'permission':FULL['perm'],'ims':[]}};expect(refsOf('Contact',a,'contact.im'))['toEqual']([]);const b={'object':FULL['pp'],'type':'Passport','data':{'signer':FULL['buyer'],'guard':[{'guard':FULL['gVote'],'relies':[]}],'impack':[]}};expect(refsOf('Passport',b,'passport.ticket_relies'))['toEqual']([]),expect(refsOf('Passport',b,'passport.impack'))['toEqual']([]);}),it('allocation\x20without\x20payment_info\x20/\x20payment\x20receipts\x20has\x20neither\x20edge',()=>{const a={'object':FULL['alloc'],'type':'Allocation','data':{'allocators':{'allocators':[]}}};expect(refsOf('Allocation',a,'allocation.payment'))['toEqual']([]),expect(refsOf('Allocation',a,'allocation.for_object'))['toEqual']([]),expect(refsOf('Allocation',a,'allocation.for_guard'))['toEqual']([]);});}),describe('Task\x206\x20field-edge\x20batch\x20—\x20end-to-end\x20expansion\x20from\x20the\x20shop\x20seed',()=>{const a=['service.order','service.um','service.permission','service.repository','order.required_info','order.discount','order.allocation','order.progress','discount.service','progress.context_repository','allocation.payment','allocation.for_object','allocation.for_guard','payment.signer','payment.from_object','treasury.um','permission.owner','permission.um','repository.um','contact.im'];it('materializes\x20the\x20new\x20edges\x20through\x20the\x20whitelisted\x20chain',async()=>{const b=new FakeDataPlane(fullServiceState()),c=await expandTopology(b,{'network':ENTRYPOINT['Mainnet'],'seed':FULL['svc'],'edges':{'schemas':a},'budget':{'maxDepth':0x6}}),d=new Map();for(const f of c['edges']){const g=d['get'](f['schema'])??new Set();g['add'](f['to']),d['set'](f['schema'],g);}expect(d['get']('order.required_info'))['toEqual'](new Set([FULL['proof1']])),expect(d['get']('discount.service'))['toEqual'](new Set([FULL['svc']])),expect(d['get']('progress.context_repository'))['toEqual'](new Set([FULL['repo']])),expect(d['get']('allocation.payment'))['toEqual'](new Set([FULL['pay1'],FULL['pay2']])),expect(d['get']('allocation.for_object'))['toEqual'](new Set([FULL['o1']])),expect(d['get']('allocation.for_guard'))['toEqual'](new Set([FULL['gAlloc']])),expect(d['get']('payment.signer'))['toEqual'](new Set([FULL['buyer'],FULL['merchant']])),expect(d['get']('treasury.um'))['toEqual'](new Set([FULL['ctT']])),expect(d['get']('permission.owner'))['toEqual'](new Set([FULL['merchant']])),expect(d['get']('repository.um'))['toEqual'](new Set([FULL['ctRepo']])),expect(d['get']('contact.im'))['toEqual'](new Set([FULL['member']]));});}),describe('Task\x207\x20—\x20repaired\x20guard\x20paths\x20(TR-7.1)',()=>{it('repository.policy_guard\x20reads\x20policies[].write_guard[].guard\x20(deep)',()=>{expect(refsOf('Repository',rawByAddress(FULL['repo']),'repository.policy_guard')['map'](a=>a['to']))['toEqual']([FULL['gWrite']]);}),it('repository.quote_guard\x20reads\x20policies[].quote_guard\x20(Option<address>\x20leaf)',()=>{expect(refsOf('Repository',rawByAddress(FULL['repo']),'repository.quote_guard')['map'](a=>a['to']))['toEqual']([FULL['gQuote']]);}),it('treasury\x20deposit/withdraw\x20guards\x20extract\x20separately\x20with\x20identifier\x20slots',()=>{const a=refsOf('Treasury',rawByAddress(FULL['tres']),'treasury.deposit_guard'),b=refsOf('Treasury',rawByAddress(FULL['tres']),'treasury.withdraw_guard');expect(a['map'](c=>c['to']))['toEqual']([FULL['gDep']]),expect(a[0x0]['payload'])['toMatchObject']({'identifier':0x1,'storeFromId':null}),expect(b['map'](c=>c['to']))['toEqual']([FULL['gWd']]),expect(b[0x0]['payload'])['toMatchObject']({'identifier':0x1,'storeFromId':null});}),it('the\x20dead\x20treasury.external_guard\x20id\x20is\x20unregistered\x20and\x20has\x20no\x20outgoing\x20slot',()=>{expect(EDGE_SCHEMA_BY_ID['get']('treasury.external_guard'))['toBeUndefined'](),expect(EDGE_SCHEMA_BY_ID['get']('treasury.deposit_guard'))['toBeDefined'](),expect(EDGE_SCHEMA_BY_ID['get']('treasury.withdraw_guard'))['toBeDefined'](),expect(EDGE_SCHEMA_BY_ID['get']('repository.quote_guard'))['toBeDefined'](),expect(outgoingSchemaIds('Repository'))['toContain']('repository.policy_guard'),expect(outgoingSchemaIds('Repository'))['toContain']('repository.quote_guard'),expect(outgoingSchemaIds('Treasury'))['toContain']('treasury.deposit_guard'),expect(outgoingSchemaIds('Treasury'))['toContain']('treasury.withdraw_guard'),expect(outgoingSchemaIds('Treasury'))['not']['toContain']('treasury.external_guard');}),it('all\x20four\x20guard\x20edges\x20materialize\x20when\x20expanded\x20from\x20their\x20own\x20seeds',async()=>{const a=new FakeDataPlane(fullServiceState()),[b,c]=await Promise['all']([expandTopology(a,{'network':ENTRYPOINT['Mainnet'],'seed':FULL['repo'],'edges':{'schemas':['repository.policy_guard','repository.quote_guard']},'budget':{'maxDepth':0x2}}),expandTopology(a,{'network':ENTRYPOINT['Mainnet'],'seed':FULL['tres'],'edges':{'schemas':['treasury.deposit_guard','treasury.withdraw_guard']},'budget':{'maxDepth':0x2}})]);expect(new Set(b['edges']['map'](d=>d['schema'])))['toEqual'](new Set(['repository.policy_guard','repository.quote_guard'])),expect(b['edges']['map'](d=>d['to'])['sort']())['toEqual']([FULL['gQuote'],FULL['gWrite']]['sort']()),expect(new Set(c['edges']['map'](d=>d['schema'])))['toEqual'](new Set(['treasury.deposit_guard','treasury.withdraw_guard'])),expect(c['edges']['map'](d=>d['to'])['sort']())['toEqual']([FULL['gDep'],FULL['gWd']]['sort']());});}),describe('Task\x206\x20field-edge\x20batch\x20—\x20type\x20coverage\x20(TR-6.2)',()=>{it('COVERED_OBJECT_TYPES\x20includes\x20the\x20new\x20source/target\x20types',()=>{for(const a of['Discount','Payment','Treasury','Repository','Passport','Contact','Permission','Progress','Allocation']){expect(COVERED_OBJECT_TYPES)['toContain'](a);}}),it('inferObjectType\x20decodes\x20the\x20fixture\x20first\x20bytes\x20to\x20SDK\x20types',()=>{const a=[[FULL['disc'],'Discount'],[FULL['pay1'],'Payment'],[FULL['tres'],'Treasury'],[FULL['repo'],'Repository'],[FULL['pp'],'Passport'],[FULL['alloc'],'Allocation'],[FULL['pr1'],'Progress'],[FULL['ctShop'],'Contact'],[FULL['perm'],'Permission'],[FULL['proof1'],'Proof']];for(const [b,c]of a){expect(inferObjectType(b),b+'\x20→\x20'+c)['toBe'](c);}});});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { EdgeFamily, Retention, SingletonId } from "./types.js";
|
|
2
|
-
export interface FieldRead {
|
|
3
|
-
kind: "field";
|
|
4
|
-
path: string;
|
|
5
|
-
}
|
|
6
|
-
export interface FieldsRead {
|
|
7
|
-
kind: "fields";
|
|
8
|
-
path: string;
|
|
9
|
-
}
|
|
10
|
-
export interface StructFieldsRead {
|
|
11
|
-
kind: "structFields";
|
|
12
|
-
path: string;
|
|
13
|
-
field: string;
|
|
14
|
-
}
|
|
15
|
-
export interface DeepRead {
|
|
16
|
-
kind: "deep";
|
|
17
|
-
segments: string[];
|
|
18
|
-
field: string;
|
|
19
|
-
}
|
|
20
|
-
export interface ReverseRead {
|
|
21
|
-
kind: "reverse";
|
|
22
|
-
parent: SingletonId;
|
|
23
|
-
filterType?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface TableRead {
|
|
26
|
-
kind: "table";
|
|
27
|
-
rowType: "MachineNode" | "PermissionPerm" | "DemandPresenter" | "TreasuryRecord" | "RewardClaimRecord" | "RepositoryData";
|
|
28
|
-
}
|
|
29
|
-
export interface DerivedRead {
|
|
30
|
-
kind: "derived";
|
|
31
|
-
producer: string;
|
|
32
|
-
}
|
|
33
|
-
export interface EventRead {
|
|
34
|
-
kind: "event";
|
|
35
|
-
eventType: string;
|
|
36
|
-
matchField?: string;
|
|
37
|
-
matchSender?: boolean;
|
|
38
|
-
targetField: string;
|
|
39
|
-
}
|
|
40
|
-
export type EdgeRead = FieldRead | FieldsRead | StructFieldsRead | DeepRead | ReverseRead | TableRead | DerivedRead | EventRead;
|
|
41
|
-
export type Cardinality = 1 | "0..1" | "N";
|
|
42
|
-
export type FieldMutabilityAction = "add" | "remove" | "clear" | "set" | "update";
|
|
43
|
-
export interface EdgeContractMeta {
|
|
44
|
-
field: string;
|
|
45
|
-
frozenWhen: string | null;
|
|
46
|
-
forbiddenActions: FieldMutabilityAction[];
|
|
47
|
-
allowedActions: FieldMutabilityAction[];
|
|
48
|
-
unfreeze: string | null;
|
|
49
|
-
moveAnchor: string;
|
|
50
|
-
}
|
|
51
|
-
export interface EdgeSchema {
|
|
52
|
-
id: string;
|
|
53
|
-
family: EdgeFamily;
|
|
54
|
-
source: string;
|
|
55
|
-
target: string;
|
|
56
|
-
cardinality: Cardinality;
|
|
57
|
-
read: EdgeRead;
|
|
58
|
-
retention: Retention;
|
|
59
|
-
evidence: string;
|
|
60
|
-
contract?: EdgeContractMeta;
|
|
61
|
-
bridgeIds?: string[];
|
|
62
|
-
maxHops?: number;
|
|
63
|
-
label: string;
|
|
64
|
-
}
|
|
65
|
-
export declare const EDGE_ID_REPOSITORY_POLICY_GUARD = "repository.policy_guard";
|
|
66
|
-
export declare const EDGE_SCHEMAS: EdgeSchema[];
|
|
67
|
-
export declare const EDGE_SCHEMA_BY_ID: Map<string, EdgeSchema>;
|
|
68
|
-
export declare function outgoingSchemaIds(sourceType: string): string[];
|
|
69
|
-
export declare const COVERED_OBJECT_TYPES: string[];
|