@wowok/agent-mcp 3.1.2 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config-audit.spec.d.ts +1 -0
- package/dist/config/config-audit.spec.js +1 -0
- package/dist/config/exposure.d.ts +108 -0
- package/dist/config/exposure.js +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +1 -1
- package/dist/config/judgment.d.ts +1228 -0
- package/dist/config/judgment.js +1 -0
- package/dist/config/judgment.spec.d.ts +1 -0
- package/dist/config/judgment.spec.js +1 -0
- package/dist/config/rule-engine.d.ts +299 -0
- package/dist/config/rule-engine.js +1 -0
- package/dist/config/rule-engine.spec.d.ts +1 -0
- package/dist/config/rule-engine.spec.js +1 -0
- package/dist/config/runtime.js +1 -1
- package/dist/config/severity.d.ts +7 -0
- package/dist/config/severity.js +1 -0
- package/dist/customer/index.d.ts +3 -9
- package/dist/customer/index.js +1 -1
- package/dist/customer/industry-risks.d.ts +3 -17
- package/dist/customer/industry-risks.js +1 -1
- package/dist/customer/order-monitor.d.ts +3 -1
- package/dist/customer/order-monitor.js +1 -1
- package/dist/customer/types.d.ts +1 -165
- package/dist/customer/types.js +1 -1
- package/dist/customer/user-preferences.d.ts +0 -49
- package/dist/customer/user-preferences.js +1 -1
- package/dist/evaluation/acceptance.d.ts +1 -0
- package/dist/evaluation/acceptance.js +1 -1
- package/dist/evaluation/arbitration-game.js +1 -1
- package/dist/evaluation/architecture.spec.d.ts +1 -0
- package/dist/evaluation/architecture.spec.js +1 -0
- package/dist/evaluation/builtins/demand-match.js +1 -1
- package/dist/evaluation/builtins/graph-service.d.ts +16 -0
- package/dist/evaluation/builtins/graph-service.js +1 -0
- package/dist/evaluation/builtins/graph-service.spec.d.ts +1 -0
- package/dist/evaluation/builtins/graph-service.spec.js +1 -0
- package/dist/evaluation/builtins/index.d.ts +1 -1
- package/dist/evaluation/builtins/index.js +1 -1
- package/dist/evaluation/builtins/purity.spec.d.ts +1 -0
- package/dist/evaluation/builtins/purity.spec.js +1 -0
- package/dist/evaluation/engine.js +1 -1
- package/dist/evaluation/facets/catalog.d.ts +19 -0
- package/dist/evaluation/facets/catalog.js +1 -0
- package/dist/evaluation/game-strategy.d.ts +2 -2
- package/dist/evaluation/game-strategy.js +1 -1
- package/dist/evaluation/guard-scan.d.ts +10 -0
- package/dist/evaluation/guard-scan.js +1 -0
- package/dist/evaluation/match-operation.d.ts +2 -2
- package/dist/evaluation/match-operation.js +1 -1
- package/dist/evaluation/standards.d.ts +9 -0
- package/dist/evaluation/standards.js +1 -0
- package/dist/evaluation/standards.spec.d.ts +1 -0
- package/dist/evaluation/standards.spec.js +1 -0
- package/dist/evaluation/types.d.ts +11 -1
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/extensions/business-modules.js +1 -1
- package/dist/extensions/custom-registry-file.js +1 -1
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/index.js +1 -1
- package/dist/extensions/industry-audit.spec.d.ts +1 -0
- package/dist/extensions/industry-audit.spec.js +1 -0
- package/dist/extensions/industry-layers.d.ts +14 -5
- package/dist/extensions/industry-layers.js +1 -1
- package/dist/extensions/industry-pack.d.ts +2 -0
- package/dist/extensions/industry-pack.js +1 -1
- package/dist/extensions/mode-evaluator.js +1 -1
- package/dist/extensions/modes.js +1 -1
- package/dist/graph/onchain/analyze.d.ts +16 -1
- package/dist/graph/onchain/analyze.js +1 -1
- package/dist/graph/onchain/analyze.spec.js +1 -1
- package/dist/graph/onchain/dataplane.d.ts +1 -1
- package/dist/graph/onchain/dataplane.js +1 -1
- package/dist/graph/onchain/edge-batch.spec.d.ts +1 -0
- package/dist/graph/onchain/edge-batch.spec.js +1 -0
- package/dist/graph/onchain/edge-schema.d.ts +11 -2
- package/dist/graph/onchain/edge-schema.js +1 -1
- package/dist/graph/onchain/entity-profile.spec.d.ts +1 -0
- package/dist/graph/onchain/entity-profile.spec.js +1 -0
- package/dist/graph/onchain/event-history.spec.d.ts +1 -0
- package/dist/graph/onchain/event-history.spec.js +1 -0
- package/dist/graph/onchain/expand.js +1 -1
- package/dist/graph/onchain/exploration.d.ts +28 -0
- package/dist/graph/onchain/exploration.js +1 -0
- package/dist/graph/onchain/exploration.spec.d.ts +1 -0
- package/dist/graph/onchain/exploration.spec.js +1 -0
- package/dist/graph/onchain/exposure.d.ts +18 -0
- package/dist/graph/onchain/exposure.js +1 -0
- package/dist/graph/onchain/exposure.spec.d.ts +1 -0
- package/dist/graph/onchain/exposure.spec.js +1 -0
- package/dist/graph/onchain/extract-deep.spec.d.ts +1 -0
- package/dist/graph/onchain/extract-deep.spec.js +1 -0
- package/dist/graph/onchain/extract.d.ts +11 -3
- package/dist/graph/onchain/extract.js +1 -1
- package/dist/graph/onchain/facet-projection.d.ts +99 -0
- package/dist/graph/onchain/facet-projection.js +1 -0
- package/dist/graph/onchain/facet-projection.spec.d.ts +1 -0
- package/dist/graph/onchain/facet-projection.spec.js +1 -0
- package/dist/graph/onchain/facts.d.ts +103 -0
- package/dist/graph/onchain/facts.js +1 -0
- package/dist/graph/onchain/facts.spec.d.ts +1 -0
- package/dist/graph/onchain/facts.spec.js +1 -0
- package/dist/graph/onchain/field-manifest.d.ts +29 -0
- package/dist/graph/onchain/field-manifest.js +1 -0
- package/dist/graph/onchain/field-manifest.spec.d.ts +1 -0
- package/dist/graph/onchain/field-manifest.spec.js +1 -0
- package/dist/graph/onchain/fixtures.d.ts +80 -0
- package/dist/graph/onchain/fixtures.js +1 -0
- package/dist/graph/onchain/fixtures.spec.d.ts +1 -0
- package/dist/graph/onchain/fixtures.spec.js +1 -0
- package/dist/graph/onchain/graph-policy.spec.d.ts +1 -0
- package/dist/graph/onchain/graph-policy.spec.js +1 -0
- package/dist/graph/onchain/index.d.ts +14 -2
- package/dist/graph/onchain/index.js +1 -1
- package/dist/graph/onchain/interest.js +1 -1
- package/dist/graph/onchain/interest.spec.js +1 -1
- package/dist/graph/onchain/label-lint.spec.d.ts +1 -0
- package/dist/graph/onchain/label-lint.spec.js +1 -0
- package/dist/graph/onchain/names.d.ts +23 -0
- package/dist/graph/onchain/names.js +1 -0
- package/dist/graph/onchain/names.spec.d.ts +1 -0
- package/dist/graph/onchain/names.spec.js +1 -0
- package/dist/graph/onchain/onchain.spec.js +1 -1
- package/dist/graph/onchain/policy.d.ts +8 -0
- package/dist/graph/onchain/policy.js +1 -0
- package/dist/graph/onchain/proposal-graph.d.ts +11 -0
- package/dist/graph/onchain/proposal-graph.js +1 -0
- package/dist/graph/onchain/proposal-graph.spec.d.ts +1 -0
- package/dist/graph/onchain/proposal-graph.spec.js +1 -0
- package/dist/graph/onchain/sdk-batch.d.ts +5 -1
- package/dist/graph/onchain/sdk-batch.js +1 -1
- package/dist/graph/onchain/strategy.d.ts +16 -0
- package/dist/graph/onchain/strategy.js +1 -1
- package/dist/graph/onchain/strategy.spec.js +1 -1
- package/dist/graph/onchain/synthesis.d.ts +20 -0
- package/dist/graph/onchain/synthesis.js +1 -0
- package/dist/graph/onchain/synthesis.spec.d.ts +1 -0
- package/dist/graph/onchain/synthesis.spec.js +1 -0
- package/dist/graph/onchain/table-ledger.spec.d.ts +1 -0
- package/dist/graph/onchain/table-ledger.spec.js +1 -0
- package/dist/graph/onchain/types.d.ts +57 -7
- package/dist/graph/onchain/viewport.d.ts +1 -0
- package/dist/graph/onchain/viewport.js +1 -1
- package/dist/harness/index.d.ts +1 -5
- package/dist/harness/index.js +1 -1
- package/dist/harness/verify.d.ts +6 -1
- package/dist/harness/verify.js +1 -1
- package/dist/index.js +1 -1
- package/dist/keeper/keeper.spec.js +1 -1
- package/dist/knowledge/alloc-audit-policy.spec.d.ts +1 -0
- package/dist/knowledge/alloc-audit-policy.spec.js +1 -0
- package/dist/knowledge/allocation-ledger.js +1 -1
- package/dist/knowledge/allocation-puzzle.d.ts +1 -1
- package/dist/knowledge/allocation-puzzle.js +1 -1
- package/dist/knowledge/allocation-risk.d.ts +4 -3
- package/dist/knowledge/allocation-risk.js +1 -1
- package/dist/knowledge/allocation-templates.js +1 -1
- package/dist/knowledge/arb-risk.d.ts +6 -6
- package/dist/knowledge/arb-risk.js +1 -1
- package/dist/knowledge/arbitration-ledger.d.ts +4 -4
- package/dist/knowledge/arbitration-ledger.js +1 -1
- package/dist/knowledge/arbitration-puzzle.d.ts +1 -1
- package/dist/knowledge/arbitration-puzzle.js +1 -1
- package/dist/knowledge/arbitration-risk.d.ts +4 -3
- package/dist/knowledge/arbitration-risk.js +1 -1
- package/dist/knowledge/arbitration-templates.js +1 -1
- package/dist/knowledge/baselines/guard-lint-baseline.spec.d.ts +1 -0
- package/dist/knowledge/baselines/guard-lint-baseline.spec.js +1 -0
- package/dist/knowledge/baselines/judgment-baselines.json +289 -0
- package/dist/knowledge/baselines/risk-baselines.spec.d.ts +1 -0
- package/dist/knowledge/baselines/risk-baselines.spec.js +1 -0
- package/dist/knowledge/baselines/risk-cases.d.ts +8 -0
- package/dist/knowledge/baselines/risk-cases.js +1 -0
- package/dist/knowledge/baselines/rules/alloc_audit.json +290 -0
- package/dist/knowledge/baselines/rules/allocation.json +492 -0
- package/dist/knowledge/baselines/rules/arb.json +155 -0
- package/dist/knowledge/baselines/rules/arbitration.json +366 -0
- package/dist/knowledge/baselines/rules/bridge.json +197 -0
- package/dist/knowledge/baselines/rules/contact.json +152 -0
- package/dist/knowledge/baselines/rules/demand.json +158 -0
- package/dist/knowledge/baselines/rules/graph.json +453 -0
- package/dist/knowledge/baselines/rules/guard.json +981 -0
- package/dist/knowledge/baselines/rules/machine.json +706 -0
- package/dist/knowledge/baselines/rules/order.json +549 -0
- package/dist/knowledge/baselines/rules/payment.json +205 -0
- package/dist/knowledge/baselines/rules/permission.json +330 -0
- package/dist/knowledge/baselines/rules/personal.json +139 -0
- package/dist/knowledge/baselines/rules/progress.json +346 -0
- package/dist/knowledge/baselines/rules/proof.json +158 -0
- package/dist/knowledge/baselines/rules/registrar.json +159 -0
- package/dist/knowledge/baselines/rules/repository.json +244 -0
- package/dist/knowledge/baselines/rules/resource.json +117 -0
- package/dist/knowledge/baselines/rules/reward.json +471 -0
- package/dist/knowledge/baselines/rules/service.json +595 -0
- package/dist/knowledge/baselines/rules/treasury.json +440 -0
- package/dist/knowledge/baselines/rules/util.json +101 -0
- package/dist/knowledge/bridge-risk.d.ts +6 -6
- package/dist/knowledge/bridge-risk.js +1 -1
- package/dist/knowledge/builtin-templates.d.ts +26 -0
- package/dist/knowledge/builtin-templates.js +1 -0
- package/dist/knowledge/contact-risk.d.ts +6 -6
- package/dist/knowledge/contact-risk.js +1 -1
- package/dist/knowledge/contract-invariants.d.ts +1 -0
- package/dist/knowledge/contract-invariants.js +1 -1
- package/dist/knowledge/demand-risk.d.ts +6 -6
- package/dist/knowledge/demand-risk.js +1 -1
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/facts-sync.spec.d.ts +1 -0
- package/dist/knowledge/facts-sync.spec.js +1 -0
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-eval.d.ts +15 -0
- package/dist/knowledge/guard-eval.js +1 -0
- package/dist/knowledge/guard-eval.spec.d.ts +1 -0
- package/dist/knowledge/guard-eval.spec.js +1 -0
- package/dist/knowledge/guard-field-cognition.d.ts +1 -1
- package/dist/knowledge/guard-field-cognition.js +1 -1
- package/dist/knowledge/guard-ledger.js +1 -1
- package/dist/knowledge/guard-lint.d.ts +1 -1
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-risk.d.ts +7 -19
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/guard-translation.js +1 -1
- package/dist/knowledge/index.d.ts +51 -45
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/industry-rule-node.d.ts +7 -0
- package/dist/knowledge/industry-rule-node.js +1 -0
- package/dist/knowledge/industry-strategy.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/machine-ledger.js +1 -1
- package/dist/knowledge/machine-risk.d.ts +4 -7
- package/dist/knowledge/machine-risk.js +1 -1
- package/dist/knowledge/machine-templates.js +1 -1
- package/dist/knowledge/machine-translation.js +1 -1
- package/dist/knowledge/migration-preflight.js +1 -1
- package/dist/knowledge/operation-dictionary.js +1 -1
- package/dist/knowledge/order-ledger.js +1 -1
- package/dist/knowledge/order-puzzle.d.ts +3 -3
- package/dist/knowledge/order-puzzle.js +1 -1
- package/dist/knowledge/order-risk.d.ts +7 -12
- package/dist/knowledge/order-risk.js +1 -1
- package/dist/knowledge/order-templates.js +1 -1
- package/dist/knowledge/passport-ledger.js +1 -1
- package/dist/knowledge/passport-templates.js +1 -1
- package/dist/knowledge/payment-risk.d.ts +8 -7
- package/dist/knowledge/payment-risk.js +1 -1
- package/dist/knowledge/payment-tracker.js +1 -1
- package/dist/knowledge/permission-ledger.js +1 -1
- package/dist/knowledge/permission-puzzle.d.ts +12 -12
- package/dist/knowledge/permission-puzzle.js +1 -1
- package/dist/knowledge/permission-risk.d.ts +4 -10
- package/dist/knowledge/permission-risk.js +1 -1
- package/dist/knowledge/permission-templates.js +1 -1
- package/dist/knowledge/personal-risk.d.ts +6 -6
- package/dist/knowledge/personal-risk.js +1 -1
- package/dist/knowledge/progress-ledger.js +1 -1
- package/dist/knowledge/progress-puzzle.d.ts +2 -2
- package/dist/knowledge/progress-puzzle.js +1 -1
- package/dist/knowledge/progress-risk.d.ts +4 -3
- package/dist/knowledge/progress-risk.js +1 -1
- package/dist/knowledge/progress-templates.js +1 -1
- package/dist/knowledge/proof-risk.d.ts +6 -6
- package/dist/knowledge/proof-risk.js +1 -1
- package/dist/knowledge/puzzle-projections.d.ts +11 -0
- package/dist/knowledge/puzzle-projections.js +1 -0
- package/dist/knowledge/recipient-constraint.d.ts +20 -1
- package/dist/knowledge/recipient-constraint.js +1 -1
- package/dist/knowledge/registrar-risk.d.ts +6 -6
- package/dist/knowledge/registrar-risk.js +1 -1
- package/dist/knowledge/repository-risk.d.ts +7 -7
- package/dist/knowledge/repository-risk.js +1 -1
- package/dist/knowledge/resource-risk.d.ts +6 -6
- package/dist/knowledge/resource-risk.js +1 -1
- package/dist/knowledge/reward-ledger.d.ts +1 -1
- package/dist/knowledge/reward-ledger.js +1 -1
- package/dist/knowledge/reward-puzzle.d.ts +2 -2
- package/dist/knowledge/reward-puzzle.js +1 -1
- package/dist/knowledge/reward-risk.d.ts +5 -6
- package/dist/knowledge/reward-risk.js +1 -1
- package/dist/knowledge/rule-node-analyzers.d.ts +43 -0
- package/dist/knowledge/rule-node-analyzers.js +1 -0
- package/dist/knowledge/rule-node-analyzers.spec.d.ts +1 -0
- package/dist/knowledge/rule-node-analyzers.spec.js +1 -0
- package/dist/knowledge/rule-outcome.d.ts +5 -0
- package/dist/knowledge/rule-outcome.js +1 -0
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/scenario-modes.d.ts +2 -2
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/scenario-topology.js +1 -1
- package/dist/knowledge/service-allocator-audit-node.js +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/service-puzzle.d.ts +2 -2
- package/dist/knowledge/service-puzzle.js +1 -1
- package/dist/knowledge/service-risk-node.js +1 -1
- package/dist/knowledge/service-risk.d.ts +4 -4
- package/dist/knowledge/service-risk.js +1 -1
- package/dist/knowledge/service-templates.js +1 -1
- package/dist/knowledge/strategy-manuals.d.ts +1 -1
- package/dist/knowledge/strategy-manuals.js +1 -1
- package/dist/knowledge/template-loader.d.ts +84 -0
- package/dist/knowledge/template-loader.js +1 -0
- package/dist/knowledge/template-loader.spec.d.ts +1 -0
- package/dist/knowledge/template-loader.spec.js +1 -0
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.d.ts +17 -0
- package/dist/knowledge/template-scanner.js +1 -0
- package/dist/knowledge/template-scanner.spec.d.ts +1 -0
- package/dist/knowledge/template-scanner.spec.js +1 -0
- package/dist/knowledge/tools-reference.js +1 -1
- package/dist/knowledge/treasury-ledger.d.ts +1 -1
- package/dist/knowledge/treasury-ledger.js +1 -1
- package/dist/knowledge/treasury-puzzle.d.ts +3 -3
- package/dist/knowledge/treasury-puzzle.js +1 -1
- package/dist/knowledge/treasury-risk.d.ts +6 -4
- package/dist/knowledge/treasury-risk.js +1 -1
- package/dist/knowledge/treasury-templates.js +1 -1
- package/dist/knowledge/util-risk.d.ts +6 -6
- package/dist/knowledge/util-risk.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +4 -0
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/knowledge/workspace-lists.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/participation/arbitrator-interest.js +1 -1
- package/dist/participation/radar-core.js +1 -1
- package/dist/persona/analyzer.js +1 -1
- package/dist/persona/bridge.js +1 -1
- package/dist/persona/facet-profile.d.ts +33 -0
- package/dist/persona/facet-profile.js +1 -0
- package/dist/persona/index.js +1 -1
- package/dist/persona/model.d.ts +2 -1
- package/dist/persona/model.js +1 -1
- package/dist/persona/persona-audit.spec.d.ts +1 -0
- package/dist/persona/persona-audit.spec.js +1 -0
- package/dist/persona/topology-focus.d.ts +2 -2
- package/dist/persona/topology-focus.js +1 -1
- package/dist/persona/types.d.ts +14 -0
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/facet-money.d.ts +33 -0
- package/dist/playbooks/service-build/facet-money.js +1 -0
- package/dist/playbooks/service-build/facet-money.spec.d.ts +1 -0
- package/dist/playbooks/service-build/facet-money.spec.js +1 -0
- package/dist/playbooks/service-build/machine-panorama.d.ts +20 -0
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +2 -2
- package/dist/playbooks/service-build/migration-planner.d.ts +43 -0
- package/dist/playbooks/service-build/migration-planner.js +1 -0
- package/dist/playbooks/service-build/object-panorama.d.ts +65 -24
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/pipeline-actions.d.ts +3 -3
- package/dist/playbooks/service-build/pipeline-actions.js +1 -1
- package/dist/playbooks/service-build/reverse-mapping.d.ts +1 -0
- package/dist/playbooks/service-build/reverse-mapping.js +1 -1
- package/dist/playbooks/service-build/risk-aggregator.d.ts +4 -2
- package/dist/playbooks/service-build/risk-aggregator.js +1 -1
- package/dist/playbooks/service-build/semantic-graph.js +1 -1
- package/dist/playbooks/service-build/service-panorama.d.ts +56 -9
- package/dist/playbooks/service-build/service-panorama.js +1 -1
- package/dist/playbooks/service-build/topology-evaluation.spec.d.ts +1 -0
- package/dist/playbooks/service-build/topology-evaluation.spec.js +1 -0
- package/dist/playbooks/service-build/topology-query.d.ts +13 -2
- package/dist/playbooks/service-build/topology-query.js +1 -1
- package/dist/playbooks/service-build/workflow-design-assessment.d.ts +2 -2
- package/dist/playbooks/service-build/workflow-design-assessment.js +1 -1
- package/dist/relationship/registry.js +1 -1
- package/dist/review/arb.d.ts +0 -2
- package/dist/review/arb.js +1 -1
- package/dist/review/machine.js +1 -1
- package/dist/review/order.d.ts +0 -1
- package/dist/review/order.js +1 -1
- package/dist/review/service.js +1 -1
- package/dist/review/types.d.ts +7 -0
- package/dist/role/profiles.js +1 -1
- package/dist/rules.d.ts +1 -2
- package/dist/rules.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +207 -0
- package/dist/schema/benchmark-migration/index.js +1 -0
- package/dist/schema/call/allocation.d.ts +1 -1
- package/dist/schema/call/allocation.js +1 -1
- package/dist/schema/call/arbitration.d.ts +1 -1
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +3374 -670
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/contact.d.ts +1 -1
- package/dist/schema/call/demand.d.ts +1 -1
- package/dist/schema/call/guard.d.ts +3 -3
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +5 -5
- package/dist/schema/call/order.d.ts +3 -3
- package/dist/schema/call/payment.js +1 -1
- package/dist/schema/call/permission-handler.d.ts +1 -1
- package/dist/schema/call/permission-handler.js +1 -1
- package/dist/schema/call/permission.d.ts +16 -16
- package/dist/schema/call/permission.js +1 -1
- package/dist/schema/call/personal.d.ts +8 -8
- package/dist/schema/call/personal.js +1 -1
- package/dist/schema/call/progress.d.ts +3 -3
- package/dist/schema/call/receipt.d.ts +28 -0
- package/dist/schema/call/receipt.js +1 -0
- package/dist/schema/call/repository.d.ts +11 -11
- package/dist/schema/call/repository.js +1 -1
- package/dist/schema/call/reward.d.ts +1 -1
- package/dist/schema/call/semantic-customer-advice.spec.d.ts +1 -0
- package/dist/schema/call/semantic-customer-advice.spec.js +1 -0
- package/dist/schema/call/semantic.d.ts +5 -2
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +7 -7
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/call/treasury.d.ts +1 -1
- package/dist/schema/call/treasury.js +1 -1
- package/dist/schema/common/index.d.ts +6 -6
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/config/index.d.ts +50 -1
- package/dist/schema/config/index.js +1 -1
- package/dist/schema/evaluation/index.d.ts +307 -213
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/goal/index.d.ts +6 -6
- package/dist/schema/goal/planning.d.ts +17 -17
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +1 -1
- package/dist/schema/interaction/index.d.ts +1 -1
- package/dist/schema/keeper/index.d.ts +1 -1
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +26 -26
- package/dist/schema/operations.d.ts +59 -43
- package/dist/schema/operations.js +1 -1
- package/dist/schema/persona/index.d.ts +4732 -24
- package/dist/schema/persona/index.js +1 -1
- package/dist/schema/query/bi.d.ts +830 -10
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +44 -44
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/workflow/index.d.ts +1 -1
- package/dist/schema/workspace/index.d.ts +2 -2
- package/dist/schema-query-impl/index.d.ts +9 -0
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +1 -1
- package/dist/schemas/benchmark_migration_operation.output.json +793 -0
- package/dist/schemas/benchmark_migration_operation.schema.json +83 -0
- package/dist/schemas/bridge_operation.output.json +1 -1
- package/dist/schemas/bridge_operation.schema.json +5 -5
- package/dist/schemas/config_operation.output.json +252 -0
- package/dist/schemas/config_operation.schema.json +21 -1
- package/dist/schemas/evaluation_operation.output.json +702 -162
- package/dist/schemas/evaluation_operation.schema.json +0 -429
- package/dist/schemas/goal_operation.schema.json +8 -8
- package/dist/schemas/guard2file.schema.json +1 -1
- package/dist/schemas/index.json +7 -7
- package/dist/schemas/keeper_operation.output.json +1 -1
- package/dist/schemas/local_history_operation.output.json +1 -1
- package/dist/schemas/local_info_operation.output.json +1 -1
- package/dist/schemas/local_mark_operation.output.json +1 -1
- package/dist/schemas/machineNode2file.schema.json +1 -1
- package/dist/schemas/messenger_operation.output.json +1 -1
- package/dist/schemas/messenger_operation.schema.json +24 -12
- package/dist/schemas/monitor_events.output.json +1 -1
- package/dist/schemas/monitor_subscription.output.json +1 -1
- package/dist/schemas/onchain_events.output.json +2 -2
- package/dist/schemas/onchain_operations.output.json +6359 -3724
- package/dist/schemas/onchain_operations.schema.json +191 -141
- package/dist/schemas/onchain_operations_allocation.schema.json +13 -11
- package/dist/schemas/onchain_operations_arbitration.schema.json +10 -8
- package/dist/schemas/onchain_operations_contact.schema.json +7 -5
- package/dist/schemas/onchain_operations_demand.schema.json +7 -5
- package/dist/schemas/onchain_operations_gen_passport.schema.json +5 -3
- package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_guard.schema.json +5 -3
- package/dist/schemas/onchain_operations_machine.schema.json +22 -18
- package/dist/schemas/onchain_operations_order.schema.json +11 -7
- package/dist/schemas/onchain_operations_payment.schema.json +3 -3
- package/dist/schemas/onchain_operations_permission.schema.json +19 -11
- package/dist/schemas/onchain_operations_personal.schema.json +16 -10
- package/dist/schemas/onchain_operations_progress.schema.json +11 -7
- package/dist/schemas/onchain_operations_proof.schema.json +5 -3
- package/dist/schemas/onchain_operations_repository.schema.json +12 -8
- package/dist/schemas/onchain_operations_reward.schema.json +11 -9
- package/dist/schemas/onchain_operations_service.schema.json +28 -22
- package/dist/schemas/onchain_operations_treasury.schema.json +13 -11
- package/dist/schemas/onchain_table_data.output.json +88 -88
- package/dist/schemas/persona_operation.output.json +15875 -1
- package/dist/schemas/persona_operation.schema.json +3056 -478
- package/dist/schemas/query_toolkit.output.json +1325 -212
- package/dist/schemas/query_toolkit.schema.json +60 -2
- package/dist/schemas/workflow_operation.schema.json +4 -2
- package/dist/strategy/metrics.js +1 -1
- package/dist/strategy/scorecard.js +1 -1
- package/dist/tools/handlers/benchmark-migration.d.ts +2 -0
- package/dist/tools/handlers/benchmark-migration.js +1 -0
- package/dist/tools/handlers/bridge.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/dispatch-expectations.d.ts +3 -0
- package/dist/tools/handlers/dispatch-expectations.js +1 -0
- package/dist/tools/handlers/evaluation.js +1 -1
- package/dist/tools/handlers/industry-pack.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/schema-query.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/move-fn-index.gen.d.ts +3 -0
- package/dist/tools/move-fn-index.gen.js +1 -0
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/config.js +1 -1
- package/dist/tools/registry/evaluation.d.ts +2 -0
- package/dist/tools/registry/evaluation.js +1 -0
- package/dist/tools/registry/onchain.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/sanitize-output.d.ts +3 -0
- package/dist/tools/sanitize-output.js +1 -0
- package/dist/tools/sanitize-output.spec.d.ts +1 -0
- package/dist/tools/sanitize-output.spec.js +1 -0
- package/dist/tools/shared.d.ts +0 -1
- package/dist/tools/shared.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +9 -3
- package/dist/customer/customer-advice.d.ts +0 -32
- package/dist/customer/customer-advice.js +0 -1
- package/dist/customer/info-puzzle.d.ts +0 -146
- package/dist/customer/info-puzzle.js +0 -1
- package/dist/customer/order-strategy.d.ts +0 -17
- package/dist/customer/order-strategy.js +0 -1
- package/dist/customer/preorder-compare.d.ts +0 -24
- package/dist/customer/preorder-compare.js +0 -1
- package/dist/customer/reminder-system.d.ts +0 -42
- package/dist/customer/reminder-system.js +0 -1
- package/dist/customer/risk-assessment.d.ts +0 -13
- package/dist/customer/risk-assessment.js +0 -1
- package/dist/evaluation/builtins/service-risk.d.ts +0 -7
- package/dist/evaluation/builtins/service-risk.js +0 -1
- package/dist/knowledge/trust-metrics.d.ts +0 -66
- package/dist/knowledge/trust-metrics.js +0 -1
- package/dist/schema/trust/index.d.ts +0 -334
- package/dist/schema/trust/index.js +0 -1
- package/dist/schemas/trust_score.output.json +0 -847
- package/dist/schemas/trust_score.schema.json +0 -364
- package/dist/tools/handlers/trust.d.ts +0 -16
- package/dist/tools/handlers/trust.js +0 -1
- package/dist/tools/registry/trust.d.ts +0 -2
- package/dist/tools/registry/trust.js +0 -1
|
@@ -2,4 +2,4 @@ import type { CallEnv } from "@wowok/wowok";
|
|
|
2
2
|
import { handleCallResult } from "./handler.js";
|
|
3
3
|
import type { SemanticContext } from "./semantic.js";
|
|
4
4
|
import type { CallPermission_Data } from "./permission.js";
|
|
5
|
-
export declare function handlePermissionOperations(data: CallPermission_Data, env: CallEnv, buildCtx: (data: unknown) => SemanticContext): Promise<ReturnType<typeof handleCallResult>>;
|
|
5
|
+
export declare function handlePermissionOperations(data: CallPermission_Data, env: CallEnv, buildCtx: (data: unknown) => SemanticContext, warnings?: string[]): Promise<ReturnType<typeof handleCallResult>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CallPermission}from'@wowok/wowok';import{handleCallResult}from'./handler.js';import{isValidPermissionIndex}from'../utils/permission-index-utils.js';function validatePermissionIndexes(a){const b=[];if(a['table']){const c=a['table'];switch(c['op']){case'add\x20perm\x20by\x20index':case'set\x20perm\x20by\x20index':case'remove\x20perm\x20by\x20index':b['push']({'index':c['index'],'path':'table.'+c['op']+'.index'});break;case'add\x20perm\x20by\x20entity':case'set\x20perm\x20by\x20entity':case'remove\x20perm\x20by\x20entity':for(let d=0x0;d<c['index']['length'];d++){b['push']({'index':c['index'][d],'path':'table.'+c['op']+'.index['+d+']'});}break;}}a['remark']&&(a['remark']['op']==='set'||a['remark']['op']==='remove')&&b['push']({'index':a['remark']['index'],'path':'remark.'+a['remark']['op']+'.index'});for(const {index:e,path:f}of b){if(!isValidPermissionIndex(e))throw new Error('Invalid\x20permission\x20index\x20'+e+'\x20at\x20\x27'+f+'\x27.\x20'+'Builtin\x20indexes\x20must\x20be\x20valid\x20BuiltinPermissionIndex\x20values;\x20'+'user-defined\x20indexes\x20must\x20be\x20in\x20[1000,\x2065535].');}}function validateEntityOps(a){if(!a['entity'])return;const b=a['entity'];if(b['op']==='swap'||b['op']==='replace'||b['op']==='copy'){if(b['entity1']===b['entity2'])throw new Error('Invalid\x20entity\x20'+b['op']+'\x20operation:\x20entity1\x20and\x20entity2\x20are\x20the\x20same\x20('+('\x27'+b['entity1']+'\x27).\x20'+b['op']+'\x20requires\x20two\x20distinct\x20entities.'));}}export async function handlePermissionOperations(a,b,c){validatePermissionIndexes(a),validateEntityOps(a);const d=new CallPermission(a),
|
|
1
|
+
import{CallPermission,GetAccountOrMark_Address}from'@wowok/wowok';import{handleCallResult}from'./handler.js';import{isValidPermissionIndex}from'../utils/permission-index-utils.js';function validatePermissionIndexes(a){const b=[];if(a['table']){const c=a['table'];switch(c['op']){case'add\x20perm\x20by\x20index':case'set\x20perm\x20by\x20index':case'remove\x20perm\x20by\x20index':b['push']({'index':c['index'],'path':'table.'+c['op']+'.index'});break;case'add\x20perm\x20by\x20entity':case'set\x20perm\x20by\x20entity':case'remove\x20perm\x20by\x20entity':for(let d=0x0;d<c['index']['length'];d++){b['push']({'index':c['index'][d],'path':'table.'+c['op']+'.index['+d+']'});}break;}}a['remark']&&(a['remark']['op']==='set'||a['remark']['op']==='remove')&&b['push']({'index':a['remark']['index'],'path':'remark.'+a['remark']['op']+'.index'});for(const {index:e,path:f}of b){if(!isValidPermissionIndex(e))throw new Error('Invalid\x20permission\x20index\x20'+e+'\x20at\x20\x27'+f+'\x27.\x20'+'Builtin\x20indexes\x20must\x20be\x20valid\x20BuiltinPermissionIndex\x20values;\x20'+'user-defined\x20indexes\x20must\x20be\x20in\x20[1000,\x2065535].');}}function validateEntityOps(a){if(!a['entity'])return;const b=a['entity'];if(b['op']==='swap'||b['op']==='replace'||b['op']==='copy'){if(b['entity1']===b['entity2'])throw new Error('Invalid\x20entity\x20'+b['op']+'\x20operation:\x20entity1\x20and\x20entity2\x20are\x20the\x20same\x20('+('\x27'+b['entity1']+'\x27).\x20'+b['op']+'\x20requires\x20two\x20distinct\x20entities.'));}}async function resolveManyEntities(a,b,c,d){const e=a?.['entities'];if(!e||e['length']===0x0)return;const f=c?.['network']?'\x20(network:\x20'+c['network']+')':'',g=[];for(const i of e){const j=i?.['name_or_address']??'';if(!j)continue;const k=await GetAccountOrMark_Address(i);if(!k)g['push'](j);}if(g['length']===0x0)return;const h=g['map'](l=>'\x27'+l+'\x27')['join'](',\x20');if(a?.['check_all_founded']===!![])throw new Error('invalid\x20parameter:'+g['length']+'/'+e['length']+'\x20'+b+'\x20entries\x20could\x20not\x20be\x20resolved\x20to\x20an\x20on-chain\x20address'+f+':\x20'+h+'.\x20'+'Check\x20the\x20spelling\x20in\x20local_mark_list\x20/\x20account_list,\x20or\x20pass\x20the\x20raw\x200x\x20address.');if(g['length']===e['length'])throw new Error('invalid\x20parameter:ALL\x20'+e['length']+'\x20'+b+'\x20entries\x20could\x20not\x20be\x20resolved\x20to\x20an\x20on-chain\x20address'+f+':\x20'+h+'.\x20'+'The\x20operation\x20would\x20write\x20nothing\x20yet\x20still\x20cost\x20gas,\x20so\x20it\x20was\x20refused.\x20'+'Check\x20the\x20spelling\x20in\x20local_mark_list\x20/\x20account_list,\x20create\x20the\x20account/mark\x20first,\x20or\x20pass\x20raw\x200x\x20addresses.');d['push']('PARTIAL\x20RESOLUTION:\x20'+g['length']+'/'+e['length']+'\x20'+b+'\x20entries\x20unresolved\x20and\x20will\x20be\x20DROPPED'+f+':\x20'+h+'.\x20'+'Only\x20the\x20resolvable\x20entities\x20will\x20be\x20written\x20on-chain.');}export async function handlePermissionOperations(a,b,c,d=[]){validatePermissionIndexes(a),validateEntityOps(a);const e=a['table'];e&&'entities'in(e['entity']??{})&&await resolveManyEntities(e['entity'],'table.'+e['op']+'.entity',b,d);a['admin']&&await resolveManyEntities(a['admin']['addresses'],'admin.addresses',b,d);const f=new CallPermission(a),g=await f['call'](b);return handleCallResult(g,c(a));}
|
|
@@ -29,7 +29,7 @@ export declare const TablePermByIndexSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
29
29
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
30
30
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
31
31
|
}, z.core.$strict>>;
|
|
32
|
-
check_all_founded: z.
|
|
32
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
33
33
|
}, z.core.$strict>;
|
|
34
34
|
}, z.core.$strict>, z.ZodObject<{
|
|
35
35
|
op: z.ZodLiteral<"set perm by index">;
|
|
@@ -39,7 +39,7 @@ export declare const TablePermByIndexSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
39
39
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
40
40
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
41
41
|
}, z.core.$strict>>;
|
|
42
|
-
check_all_founded: z.
|
|
42
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
43
43
|
}, z.core.$strict>;
|
|
44
44
|
}, z.core.$strict>, z.ZodObject<{
|
|
45
45
|
op: z.ZodLiteral<"remove perm by index">;
|
|
@@ -49,7 +49,7 @@ export declare const TablePermByIndexSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
49
49
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
50
50
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
51
51
|
}, z.core.$strict>>;
|
|
52
|
-
check_all_founded: z.
|
|
52
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
53
53
|
}, z.core.$strict>;
|
|
54
54
|
}, z.core.$strict>], "op">;
|
|
55
55
|
export declare const TablePermByEntitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -82,7 +82,7 @@ export declare const TableSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
82
82
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
83
83
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
84
84
|
}, z.core.$strict>>;
|
|
85
|
-
check_all_founded: z.
|
|
85
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
86
86
|
}, z.core.$strict>;
|
|
87
87
|
}, z.core.$strict>, z.ZodObject<{
|
|
88
88
|
op: z.ZodLiteral<"set perm by index">;
|
|
@@ -92,7 +92,7 @@ export declare const TableSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
92
92
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
93
93
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
94
94
|
}, z.core.$strict>>;
|
|
95
|
-
check_all_founded: z.
|
|
95
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
96
96
|
}, z.core.$strict>;
|
|
97
97
|
}, z.core.$strict>, z.ZodObject<{
|
|
98
98
|
op: z.ZodLiteral<"remove perm by index">;
|
|
@@ -102,7 +102,7 @@ export declare const TableSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
102
102
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
103
103
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
104
104
|
}, z.core.$strict>>;
|
|
105
|
-
check_all_founded: z.
|
|
105
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
106
106
|
}, z.core.$strict>;
|
|
107
107
|
}, z.core.$strict>, z.ZodObject<{
|
|
108
108
|
op: z.ZodLiteral<"add perm by entity">;
|
|
@@ -212,7 +212,7 @@ export declare const AdminSchema: z.ZodObject<{
|
|
|
212
212
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
213
213
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
214
214
|
}, z.core.$strict>>;
|
|
215
|
-
check_all_founded: z.
|
|
215
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
216
216
|
}, z.core.$strict>;
|
|
217
217
|
}, z.core.$strict>;
|
|
218
218
|
export declare const CallPermission_DataSchema: z.ZodObject<{
|
|
@@ -241,7 +241,7 @@ export declare const CallPermission_DataSchema: z.ZodObject<{
|
|
|
241
241
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
242
242
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
243
243
|
}, z.core.$strict>>;
|
|
244
|
-
check_all_founded: z.
|
|
244
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
245
245
|
}, z.core.$strict>;
|
|
246
246
|
}, z.core.$strict>, z.ZodObject<{
|
|
247
247
|
op: z.ZodLiteral<"set perm by index">;
|
|
@@ -251,7 +251,7 @@ export declare const CallPermission_DataSchema: z.ZodObject<{
|
|
|
251
251
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
252
252
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
253
253
|
}, z.core.$strict>>;
|
|
254
|
-
check_all_founded: z.
|
|
254
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
255
255
|
}, z.core.$strict>;
|
|
256
256
|
}, z.core.$strict>, z.ZodObject<{
|
|
257
257
|
op: z.ZodLiteral<"remove perm by index">;
|
|
@@ -261,7 +261,7 @@ export declare const CallPermission_DataSchema: z.ZodObject<{
|
|
|
261
261
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
262
262
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
263
263
|
}, z.core.$strict>>;
|
|
264
|
-
check_all_founded: z.
|
|
264
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
265
265
|
}, z.core.$strict>;
|
|
266
266
|
}, z.core.$strict>, z.ZodObject<{
|
|
267
267
|
op: z.ZodLiteral<"add perm by entity">;
|
|
@@ -333,7 +333,7 @@ export declare const CallPermission_DataSchema: z.ZodObject<{
|
|
|
333
333
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
334
334
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
335
335
|
}, z.core.$strict>>;
|
|
336
|
-
check_all_founded: z.
|
|
336
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
337
337
|
}, z.core.$strict>;
|
|
338
338
|
}, z.core.$strict>>;
|
|
339
339
|
apply: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -388,7 +388,7 @@ export declare const CallPermission_InputSchema: z.ZodObject<{
|
|
|
388
388
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
389
389
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
390
390
|
}, z.core.$strict>>;
|
|
391
|
-
check_all_founded: z.
|
|
391
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
392
392
|
}, z.core.$strict>;
|
|
393
393
|
}, z.core.$strict>, z.ZodObject<{
|
|
394
394
|
op: z.ZodLiteral<"set perm by index">;
|
|
@@ -398,7 +398,7 @@ export declare const CallPermission_InputSchema: z.ZodObject<{
|
|
|
398
398
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
399
399
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
400
400
|
}, z.core.$strict>>;
|
|
401
|
-
check_all_founded: z.
|
|
401
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
402
402
|
}, z.core.$strict>;
|
|
403
403
|
}, z.core.$strict>, z.ZodObject<{
|
|
404
404
|
op: z.ZodLiteral<"remove perm by index">;
|
|
@@ -408,7 +408,7 @@ export declare const CallPermission_InputSchema: z.ZodObject<{
|
|
|
408
408
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
409
409
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
410
410
|
}, z.core.$strict>>;
|
|
411
|
-
check_all_founded: z.
|
|
411
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
412
412
|
}, z.core.$strict>;
|
|
413
413
|
}, z.core.$strict>, z.ZodObject<{
|
|
414
414
|
op: z.ZodLiteral<"add perm by entity">;
|
|
@@ -480,7 +480,7 @@ export declare const CallPermission_InputSchema: z.ZodObject<{
|
|
|
480
480
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
481
481
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
482
482
|
}, z.core.$strict>>;
|
|
483
|
-
check_all_founded: z.
|
|
483
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
484
484
|
}, z.core.$strict>;
|
|
485
485
|
}, z.core.$strict>>;
|
|
486
486
|
apply: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -551,7 +551,7 @@ export declare const CallPermission_InputSchema: z.ZodObject<{
|
|
|
551
551
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
552
552
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
553
553
|
}, z.core.$strict>>;
|
|
554
|
-
check_all_founded: z.
|
|
554
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
555
555
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>>;
|
|
556
556
|
name: z.ZodDefault<z.ZodString>;
|
|
557
557
|
object_type: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{PermissionIndexTypeSchema}from'../query/index.js';import{CallEnvSchema,SubmissionCallSchema,NormalObjectSchema}from'./base.js';import{AccountOrMark_AddressSchema,DescriptionSchema,LongNameSchema,ManyAccountOrMark_AddressSchema,NameOrAddressSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';export const RemarkSetSchema=z['object']({'op':z['literal']('set'),'index':PermissionIndexTypeSchema,'remark':LongNameSchema['describe']('Permission\x20remark.')})['strict']()['describe']('Set\x20remark\x20for\x20a\x20permission.');export const RemarkRemoveSchema=z['object']({'op':z['literal']('remove'),'index':PermissionIndexTypeSchema})['strict']()['describe']('Remove\x20remark\x20for\x20a\x20permission.');export const RemarkClearSchema=z['object']({'op':z['literal']('clear')})['strict']()['describe']('Clear\x20remarks\x20for\x20all\x20permissions.');export const RemarkSchema=z['discriminatedUnion']('op',[RemarkSetSchema,RemarkRemoveSchema,RemarkClearSchema])['describe']('Set\x20remarks\x20for\x20permissions.');export const TablePermByIndexSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('add\x20perm\x20by\x20index'),'index':PermissionIndexTypeSchema,'entity':ManyAccountOrMark_AddressSchema})['strict']()['describe']('Grant\x20a\x20specific\x20permission\x20to\x20multiple\x20entities\x20at\x20once.\x20USE\x20WHEN:\x20You\x20need\x20to\x20assign\x20the\x20SAME\x20permission\x20to\x20MULTIPLE\x20users/Guards.\x20Example:\x20Give\x20\x27create\x20service\x27\x20permission\x20to\x20Alice,\x20Bob,\x20and\x20Carol\x20simultaneously.'),z['object']({'op':z['literal']('set\x20perm\x20by\x20index'),'index':PermissionIndexTypeSchema,'entity':ManyAccountOrMark_AddressSchema})['strict']()['describe']('Replace\x20the\x20entity\x20list\x20for\x20a\x20specific\x20permission\x20with\x20a\x20new\x20set\x20of\x20entities.\x20USE\x20WHEN:\x20You\x20want\x20to\x20completely\x20redefine\x20WHO\x20has\x20this\x20permission.\x20WARNING:\x20This\x20overwrites\x20the\x20existing\x20entity\x20list\x20for\x20this\x20permission.'),z['object']({'op':z['literal']('remove\x20perm\x20by\x20index'),'index':PermissionIndexTypeSchema,'entity':ManyAccountOrMark_AddressSchema})['strict']()['describe']('Revoke\x20a\x20specific\x20permission\x20from\x20multiple\x20entities\x20at\x20once.\x20USE\x20WHEN:\x20You\x20need\x20to\x20remove\x20the\x20SAME\x20permission\x20from\x20MULTIPLE\x20users/Guards.\x20Example:\x20Remove\x20\x27create\x20service\x27\x20permission\x20from\x20Alice,\x20Bob,\x20and\x20Carol\x20simultaneously.')])['describe']('Permission-centric\x20operations:\x20Manage\x20WHO\x20has\x20a\x20specific\x20permission.\x20Best\x20for\x20batch-assigning\x20one\x20permission\x20to\x20many\x20users.\x20Structure:\x20{op:\x20\x27add|set|remove\x20perm\x20by\x20index\x27,\x20index:\x20permission_id,\x20entity:\x20[user1,\x20user2,\x20...]}');export const TablePermByEntitySchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('add\x20perm\x20by\x20entity'),'entity':AccountOrMark_AddressSchema,'index':z['array'](PermissionIndexTypeSchema)})['strict']()['describe']('Grant\x20multiple\x20permissions\x20to\x20a\x20single\x20entity.\x20USE\x20WHEN:\x20You\x20need\x20to\x20give\x20ONE\x20user/Guard\x20MANY\x20permissions\x20at\x20once.\x20Example:\x20Give\x20Alice\x20all\x20Machine-related\x20permissions\x20(create,\x20edit,\x20publish,\x20pause,\x20etc.)\x20in\x20one\x20call.'),z['object']({'op':z['literal']('set\x20perm\x20by\x20entity'),'entity':AccountOrMark_AddressSchema,'index':z['array'](PermissionIndexTypeSchema)})['strict']()['describe']('Replace\x20all\x20permissions\x20of\x20a\x20single\x20entity\x20with\x20a\x20new\x20permission\x20set.\x20USE\x20WHEN:\x20You\x20want\x20to\x20completely\x20redefine\x20WHAT\x20permissions\x20a\x20user/Guard\x20has.\x20WARNING:\x20This\x20overwrites\x20all\x20existing\x20permissions\x20for\x20this\x20entity.'),z['object']({'op':z['literal']('remove\x20perm\x20by\x20entity'),'entity':AccountOrMark_AddressSchema,'index':z['array'](PermissionIndexTypeSchema)})['strict']()['describe']('Revoke\x20multiple\x20permissions\x20from\x20a\x20single\x20entity.\x20USE\x20WHEN:\x20You\x20need\x20to\x20remove\x20MANY\x20permissions\x20from\x20ONE\x20user/Guard\x20at\x20once.\x20Example:\x20Remove\x20all\x20Machine-related\x20permissions\x20from\x20Alice.')])['describe']('Entity-centric\x20operations:\x20Manage\x20WHAT\x20permissions\x20a\x20specific\x20user/Guard\x20has.\x20Best\x20for\x20assigning\x20many\x20permissions\x20to\x20one\x20user.\x20Structure:\x20{op:\x20\x27add|set|remove\x20perm\x20by\x20entity\x27,\x20entity:\x20user_id,\x20index:\x20[perm1,\x20perm2,\x20...]}');export const TableSchema=z['discriminatedUnion']('op',[...TablePermByIndexSchema['options'],...TablePermByEntitySchema['options']])['describe']('Manage\x20permission\x20assignments\x20using\x20two\x20complementary\x20approaches.\x20CHOOSE\x20THE\x20RIGHT\x20APPROACH:\x20(1)\x20\x27perm\x20by\x20index\x27\x20-\x20Use\x20when\x20granting\x20ONE\x20permission\x20to\x20MANY\x20users\x20(permission-centric).\x20Example:\x20Give\x20\x27create\x20service\x27\x20permission\x20to\x20Alice,\x20Bob,\x20and\x20Carol.\x20(2)\x20\x27perm\x20by\x20entity\x27\x20-\x20Use\x20when\x20granting\x20MANY\x20permissions\x20to\x20ONE\x20user\x20(entity-centric).\x20Example:\x20Give\x20Alice\x20all\x20Machine-related\x20permissions.\x20Both\x20approaches\x20support\x20add/set/remove\x20operations.\x20Requires\x20admin\x20permission.');export const EntitySwapReplaceCopySchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('swap'),'entity1':AccountOrMark_AddressSchema,'entity2':AccountOrMark_AddressSchema})['strict']()['describe']('Swap\x20all\x20permission\x20indexes\x20between\x20two\x20entities.'),z['object']({'op':z['literal']('replace'),'entity1':AccountOrMark_AddressSchema,'entity2':AccountOrMark_AddressSchema})['strict']()['describe']('Remove\x20all\x20permission\x20indexes\x20from\x20entity1\x20and\x20add\x20them\x20to\x20entity2\x27s\x20permission\x20indexes.'),z['object']({'op':z['literal']('copy'),'entity1':AccountOrMark_AddressSchema,'entity2':AccountOrMark_AddressSchema})['strict']()['describe']('Add\x20all\x20permission\x20indexes\x20from\x20entity1\x20to\x20entity2\x27s\x20permission\x20indexes.')]);export const EntityDelSchema=z['object']({'op':z['literal']('del'),'entity':AccountOrMark_AddressSchema})['strict']()['describe']('Delete\x20all\x20permission\x20indexes\x20from\x20an\x20entity.');export const EntitySchema=z['discriminatedUnion']('op',[...EntitySwapReplaceCopySchema['options'],EntityDelSchema]);export const AdminSchema=z['object']({'op':z['enum'](['add','remove','set'])['describe']('Admin\x20operations:\x20add,\x20remove,\x20set.'),'addresses':ManyAccountOrMark_AddressSchema['describe']('List\x20of\x20admin\x20addresses.')})['strict']();export const CallPermission_DataSchema=z['object']({'object':NormalObjectSchema['optional'](),'description':DescriptionSchema['optional'](),'remark':RemarkSchema['optional'](),'table':TableSchema['optional']()['describe']('Manage\x20permission\x20assignments\x20using\x20two\x20approaches:\x20(1)\x20By\x20Permission\x20Index\x20-\x20add/set/remove\x20entity\x20IDs\x20for\x20a\x20specific\x20permission;\x20(2)\x20By\x20Entity\x20-\x20add/set/remove\x20permission\x20indexes\x20for\x20a\x20specific\x20entity.\x20Requires\x20admin\x20permission.'),'entity':EntitySchema['optional']()['describe']('Advanced\x20entity\x20permission\x20operations:\x20swap\x20permissions\x20between\x20two\x20entities,\x20replace\x20one\x20entity\x27s\x20permissions\x20with\x20another\x27s,\x20copy\x20permissions\x20from\x20one\x20entity\x20to\x20another,\x20or\x20delete\x20all\x20permissions\x20of\x20an\x20entity.\x20Entity\x20can\x20be\x20a\x20user\x20ID\x20or\x20Guard\x20object\x20ID.\x20Requires\x20admin\x20permission.'),'admin':AdminSchema['optional']()['describe']('Manage\x20Permission\x20object\x20admins:\x20add\x20new\x20admins,\x20remove\x20existing\x20admins,\x20or\x20set\x20the\x20complete\x20admin\x20list.\x20Only\x20the\x20Permission\x20object\x20owner\x20(builder)\x20can\x20perform\x20this\x20operation.\x20The\x20creator\x20automatically\x20becomes\x20an\x20admin\x20with\x20full\x20permissions.'),'apply':z['array'](NameOrAddressSchema)['optional']()['describe']('Array\x20of\x20object\x20IDs\x20or\x20names\x20to\x20operate\x20on,\x20apply\x20the\x20Permission\x20object\x20to\x20these\x20objects\x27\x20permission\x20control.\x20Note:\x20The\x20signer\x20must\x20be\x20the\x20owner\x20of\x20the\x20existing\x20Permission\x20objects\x20for\x20these\x20objects'),'builder':AccountOrMark_AddressSchema['optional']()['describe']('Set\x20or\x20transfer\x20ownership\x20of\x20the\x20Permission\x20object\x20to\x20the\x20specified\x20user\x20ID.\x20The\x20creator\x20automatically\x20becomes\x20the\x20builder;\x20only\x20the\x20builder\x20can\x20transfer\x20ownership\x20to\x20other\x20users.'),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Permission\x20object\x20and\x20send\x20them\x20to\x20the\x20builder(owner).'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name.')})['strict']()['describe']('On-chain\x20Permission\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20tags?,\x20...}\x20to\x20create\x20a\x20Permission.\x20NOTE:\x20\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallPermission_InputSchema=z['object']({'data':CallPermission_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
1
|
+
import{z}from'zod';import{PermissionIndexTypeSchema}from'../query/index.js';import{CallEnvSchema,SubmissionCallSchema,NormalObjectSchema}from'./base.js';import{AccountOrMark_AddressSchema,DescriptionSchema,LongNameSchema,ManyAccountOrMark_AddressSchema,NameOrAddressSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';export const RemarkSetSchema=z['object']({'op':z['literal']('set'),'index':PermissionIndexTypeSchema,'remark':LongNameSchema['describe']('Permission\x20remark.')})['strict']()['describe']('Set\x20remark\x20for\x20a\x20permission.');export const RemarkRemoveSchema=z['object']({'op':z['literal']('remove'),'index':PermissionIndexTypeSchema})['strict']()['describe']('Remove\x20remark\x20for\x20a\x20permission.');export const RemarkClearSchema=z['object']({'op':z['literal']('clear')})['strict']()['describe']('Clear\x20remarks\x20for\x20all\x20permissions.');export const RemarkSchema=z['discriminatedUnion']('op',[RemarkSetSchema,RemarkRemoveSchema,RemarkClearSchema])['describe']('Set\x20remarks\x20for\x20permissions.');export const TablePermByIndexSchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('add\x20perm\x20by\x20index'),'index':PermissionIndexTypeSchema,'entity':ManyAccountOrMark_AddressSchema})['strict']()['describe']('Grant\x20a\x20specific\x20permission\x20to\x20multiple\x20entities\x20at\x20once.\x20USE\x20WHEN:\x20You\x20need\x20to\x20assign\x20the\x20SAME\x20permission\x20to\x20MULTIPLE\x20users/Guards.\x20Example:\x20Give\x20\x27create\x20service\x27\x20permission\x20to\x20Alice,\x20Bob,\x20and\x20Carol\x20simultaneously.'),z['object']({'op':z['literal']('set\x20perm\x20by\x20index'),'index':PermissionIndexTypeSchema,'entity':ManyAccountOrMark_AddressSchema})['strict']()['describe']('Replace\x20the\x20entity\x20list\x20for\x20a\x20specific\x20permission\x20with\x20a\x20new\x20set\x20of\x20entities.\x20USE\x20WHEN:\x20You\x20want\x20to\x20completely\x20redefine\x20WHO\x20has\x20this\x20permission.\x20WARNING:\x20This\x20overwrites\x20the\x20existing\x20entity\x20list\x20for\x20this\x20permission.'),z['object']({'op':z['literal']('remove\x20perm\x20by\x20index'),'index':PermissionIndexTypeSchema,'entity':ManyAccountOrMark_AddressSchema})['strict']()['describe']('Revoke\x20a\x20specific\x20permission\x20from\x20multiple\x20entities\x20at\x20once.\x20USE\x20WHEN:\x20You\x20need\x20to\x20remove\x20the\x20SAME\x20permission\x20from\x20MULTIPLE\x20users/Guards.\x20Example:\x20Remove\x20\x27create\x20service\x27\x20permission\x20from\x20Alice,\x20Bob,\x20and\x20Carol\x20simultaneously.')])['describe']('Permission-centric\x20operations:\x20Manage\x20WHO\x20has\x20a\x20specific\x20permission.\x20Best\x20for\x20batch-assigning\x20one\x20permission\x20to\x20many\x20users.\x20Structure:\x20{op:\x20\x27add|set|remove\x20perm\x20by\x20index\x27,\x20index:\x20<permission\x20index>,\x20entity:\x20[user1,\x20user2,\x20...]}');export const TablePermByEntitySchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('add\x20perm\x20by\x20entity'),'entity':AccountOrMark_AddressSchema,'index':z['array'](PermissionIndexTypeSchema)})['strict']()['describe']('Grant\x20multiple\x20permissions\x20to\x20a\x20single\x20entity.\x20USE\x20WHEN:\x20You\x20need\x20to\x20give\x20ONE\x20user/Guard\x20MANY\x20permissions\x20at\x20once.\x20Example:\x20Give\x20Alice\x20all\x20Machine-related\x20permissions\x20(create,\x20edit,\x20publish,\x20pause,\x20etc.)\x20in\x20one\x20call.'),z['object']({'op':z['literal']('set\x20perm\x20by\x20entity'),'entity':AccountOrMark_AddressSchema,'index':z['array'](PermissionIndexTypeSchema)})['strict']()['describe']('Replace\x20all\x20permissions\x20of\x20a\x20single\x20entity\x20with\x20a\x20new\x20permission\x20set.\x20USE\x20WHEN:\x20You\x20want\x20to\x20completely\x20redefine\x20WHAT\x20permissions\x20a\x20user/Guard\x20has.\x20WARNING:\x20This\x20overwrites\x20all\x20existing\x20permissions\x20for\x20this\x20entity.'),z['object']({'op':z['literal']('remove\x20perm\x20by\x20entity'),'entity':AccountOrMark_AddressSchema,'index':z['array'](PermissionIndexTypeSchema)})['strict']()['describe']('Revoke\x20multiple\x20permissions\x20from\x20a\x20single\x20entity.\x20USE\x20WHEN:\x20You\x20need\x20to\x20remove\x20MANY\x20permissions\x20from\x20ONE\x20user/Guard\x20at\x20once.\x20Example:\x20Remove\x20all\x20Machine-related\x20permissions\x20from\x20Alice.')])['describe']('Entity-centric\x20operations:\x20Manage\x20WHAT\x20permissions\x20a\x20specific\x20user/Guard\x20has.\x20Best\x20for\x20assigning\x20many\x20permissions\x20to\x20one\x20user.\x20Structure:\x20{op:\x20\x27add|set|remove\x20perm\x20by\x20entity\x27,\x20entity:\x20user_id,\x20index:\x20[perm1,\x20perm2,\x20...]}');export const TableSchema=z['discriminatedUnion']('op',[...TablePermByIndexSchema['options'],...TablePermByEntitySchema['options']])['describe']('Manage\x20permission\x20assignments\x20using\x20two\x20complementary\x20approaches.\x20CHOOSE\x20THE\x20RIGHT\x20APPROACH:\x20(1)\x20\x27perm\x20by\x20index\x27\x20-\x20Use\x20when\x20granting\x20ONE\x20permission\x20to\x20MANY\x20users\x20(permission-centric).\x20Example:\x20Give\x20\x27create\x20service\x27\x20permission\x20to\x20Alice,\x20Bob,\x20and\x20Carol.\x20(2)\x20\x27perm\x20by\x20entity\x27\x20-\x20Use\x20when\x20granting\x20MANY\x20permissions\x20to\x20ONE\x20user\x20(entity-centric).\x20Example:\x20Give\x20Alice\x20all\x20Machine-related\x20permissions.\x20Both\x20approaches\x20support\x20add/set/remove\x20operations.\x20Requires\x20admin\x20permission.');export const EntitySwapReplaceCopySchema=z['discriminatedUnion']('op',[z['object']({'op':z['literal']('swap'),'entity1':AccountOrMark_AddressSchema,'entity2':AccountOrMark_AddressSchema})['strict']()['describe']('Swap\x20all\x20permission\x20indexes\x20between\x20two\x20entities.'),z['object']({'op':z['literal']('replace'),'entity1':AccountOrMark_AddressSchema,'entity2':AccountOrMark_AddressSchema})['strict']()['describe']('Remove\x20all\x20permission\x20indexes\x20from\x20entity1\x20and\x20add\x20them\x20to\x20entity2\x27s\x20permission\x20indexes.'),z['object']({'op':z['literal']('copy'),'entity1':AccountOrMark_AddressSchema,'entity2':AccountOrMark_AddressSchema})['strict']()['describe']('Add\x20all\x20permission\x20indexes\x20from\x20entity1\x20to\x20entity2\x27s\x20permission\x20indexes.')]);export const EntityDelSchema=z['object']({'op':z['literal']('del'),'entity':AccountOrMark_AddressSchema})['strict']()['describe']('Delete\x20all\x20permission\x20indexes\x20from\x20an\x20entity.');export const EntitySchema=z['discriminatedUnion']('op',[...EntitySwapReplaceCopySchema['options'],EntityDelSchema]);export const AdminSchema=z['object']({'op':z['enum'](['add','remove','set'])['describe']('Admin\x20operations:\x20add,\x20remove,\x20set.'),'addresses':ManyAccountOrMark_AddressSchema['describe']('List\x20of\x20admin\x20addresses.')})['strict']();export const CallPermission_DataSchema=z['object']({'object':NormalObjectSchema['optional'](),'description':DescriptionSchema['optional'](),'remark':RemarkSchema['optional'](),'table':TableSchema['optional']()['describe']('Manage\x20permission\x20assignments\x20using\x20two\x20approaches:\x20(1)\x20By\x20Permission\x20Index\x20-\x20add/set/remove\x20entity\x20IDs\x20for\x20a\x20specific\x20permission;\x20(2)\x20By\x20Entity\x20-\x20add/set/remove\x20permission\x20indexes\x20for\x20a\x20specific\x20entity.\x20Requires\x20admin\x20permission.'),'entity':EntitySchema['optional']()['describe']('Advanced\x20entity\x20permission\x20operations:\x20swap\x20permissions\x20between\x20two\x20entities,\x20replace\x20one\x20entity\x27s\x20permissions\x20with\x20another\x27s,\x20copy\x20permissions\x20from\x20one\x20entity\x20to\x20another,\x20or\x20delete\x20all\x20permissions\x20of\x20an\x20entity.\x20Entity\x20can\x20be\x20a\x20user\x20ID\x20or\x20Guard\x20object\x20ID.\x20Requires\x20admin\x20permission.'),'admin':AdminSchema['optional']()['describe']('Manage\x20Permission\x20object\x20admins:\x20add\x20new\x20admins,\x20remove\x20existing\x20admins,\x20or\x20set\x20the\x20complete\x20admin\x20list.\x20Only\x20the\x20Permission\x20object\x20owner\x20(builder)\x20can\x20perform\x20this\x20operation.\x20The\x20creator\x20automatically\x20becomes\x20an\x20admin\x20with\x20full\x20permissions.'),'apply':z['array'](NameOrAddressSchema)['optional']()['describe']('Array\x20of\x20object\x20IDs\x20or\x20names\x20to\x20operate\x20on,\x20apply\x20the\x20Permission\x20object\x20to\x20these\x20objects\x27\x20permission\x20control.\x20Note:\x20The\x20signer\x20must\x20be\x20the\x20owner\x20of\x20the\x20existing\x20Permission\x20objects\x20for\x20these\x20objects'),'builder':AccountOrMark_AddressSchema['optional']()['describe']('Set\x20or\x20transfer\x20ownership\x20of\x20the\x20Permission\x20object\x20to\x20the\x20specified\x20user\x20ID.\x20The\x20creator\x20automatically\x20becomes\x20the\x20builder;\x20only\x20the\x20builder\x20can\x20transfer\x20ownership\x20to\x20other\x20users.'),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Permission\x20object\x20and\x20send\x20them\x20to\x20the\x20builder(owner).'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name.')})['strict']()['describe']('On-chain\x20Permission\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20tags?,\x20...}\x20to\x20create\x20a\x20Permission.\x20NOTE:\x20\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallPermission_InputSchema=z['object']({'data':CallPermission_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
@@ -12,7 +12,7 @@ export declare const InformationAddSchema: z.ZodObject<{
|
|
|
12
12
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
13
13
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
14
14
|
}, z.core.$strict>>;
|
|
15
|
-
check_all_founded: z.
|
|
15
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
16
16
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
17
17
|
}, z.core.$strip>>;
|
|
18
18
|
}, z.core.$strict>;
|
|
@@ -36,7 +36,7 @@ export declare const InformationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
36
36
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
37
37
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
38
38
|
}, z.core.$strict>>;
|
|
39
|
-
check_all_founded: z.
|
|
39
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
40
40
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
41
41
|
}, z.core.$strip>>;
|
|
42
42
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -85,7 +85,7 @@ export declare const MarkClearSchema: z.ZodObject<{
|
|
|
85
85
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
86
86
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
87
87
|
}, z.core.$strict>>;
|
|
88
|
-
check_all_founded: z.
|
|
88
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
89
89
|
}, z.core.$strict>]>;
|
|
90
90
|
}, z.core.$strict>;
|
|
91
91
|
export declare const MarkLikeSchema: z.ZodObject<{
|
|
@@ -173,7 +173,7 @@ export declare const MarkSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
173
173
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
174
174
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
175
175
|
}, z.core.$strict>>;
|
|
176
|
-
check_all_founded: z.
|
|
176
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
177
177
|
}, z.core.$strict>]>;
|
|
178
178
|
}, z.core.$strict>, z.ZodObject<{
|
|
179
179
|
op: z.ZodLiteral<"like">;
|
|
@@ -236,7 +236,7 @@ export declare const CallPersonal_DataSchema: z.ZodObject<{
|
|
|
236
236
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
237
237
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
238
238
|
}, z.core.$strict>>;
|
|
239
|
-
check_all_founded: z.
|
|
239
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
240
240
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
241
241
|
}, z.core.$strip>>;
|
|
242
242
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -283,7 +283,7 @@ export declare const CallPersonal_DataSchema: z.ZodObject<{
|
|
|
283
283
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
284
284
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
285
285
|
}, z.core.$strict>>;
|
|
286
|
-
check_all_founded: z.
|
|
286
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
287
287
|
}, z.core.$strict>]>;
|
|
288
288
|
}, z.core.$strict>, z.ZodObject<{
|
|
289
289
|
op: z.ZodLiteral<"like">;
|
|
@@ -348,7 +348,7 @@ export declare const CallPersonal_InputSchema: z.ZodObject<{
|
|
|
348
348
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
349
349
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
350
350
|
}, z.core.$strict>>;
|
|
351
|
-
check_all_founded: z.
|
|
351
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
352
352
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
353
353
|
}, z.core.$strip>>;
|
|
354
354
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -395,7 +395,7 @@ export declare const CallPersonal_InputSchema: z.ZodObject<{
|
|
|
395
395
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
396
396
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
397
397
|
}, z.core.$strict>>;
|
|
398
|
-
check_all_founded: z.
|
|
398
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
399
399
|
}, z.core.$strict>]>;
|
|
400
400
|
}, z.core.$strict>, z.ZodObject<{
|
|
401
401
|
op: z.ZodLiteral<"like">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{AccountOrMark_AddressAISchema,AccountOrMark_AddressSchema,DescriptionSchema,ManyAccountOrMark_AddressAISchema,NameSchema}from'../common/index.js';import{RecordsInEntitySchema}from'../query/index.js';import{CallEnvSchema}from'./base.js';export const InformationAddSchema=z['object']({'op':z['literal']('add'),'data':z['array'](RecordsInEntitySchema)})['strict']()['describe']('PUBLIC:\x20Add\x20personal\x20info\x20on-chain.\x20Safe:\x20social\x20handles,\x20URLs,\x20public\x20email.\x20NEVER:\x20phone,\x20address,\x20private\x20keys.');export const InformationRemoveSchema=z['object']({'op':z['literal']('remove'),'name':z['array'](NameSchema)})['strict']()['describe']('PUBLIC:\x20Remove\x20specified\x20personal\x20info\x20records\x20from\x20your\x20public\x20profile.');export const InformationClearSchema=z['object']({'op':z['literal']('clear')})['strict']()['describe']('PUBLIC:\x20Clear\x20ALL\x20personal\x20info\x20from\x20your\x20public\x20profile.');export const InformationSchema=z['discriminatedUnion']('op',[InformationAddSchema,InformationRemoveSchema,InformationClearSchema]);export const MarkAddSchema=z['object']({'op':z['literal']('add'),'data':z['array'](z['object']({'address':AccountOrMark_AddressAISchema,'name':NameSchema['optional'](),'tags':z['array'](NameSchema)['optional']()})['strict']())})['strict']()['describe']('PUBLIC:\x20Add\x20ID\x20name\x20and\x20tags\x20on-chain\x20for\x20public\x20identity.\x20For\x20private\x20marks,\x20use\x20\x27local\x27\x20tool.');export const MarkRemoveSchema=z['object']({'op':z['literal']('remove'),'data':z['array'](z['object']({'address':AccountOrMark_AddressAISchema,'tags':z['array'](NameSchema)['optional']()})['strict']())})['strict']()['describe']('PUBLIC:\x20Remove\x20specified\x20tags\x20from\x20your\x20on-chain\x20identity\x20mark.');export const MarkClearSchema=z['object']({'op':z['literal']('clear'),'address':ManyAccountOrMark_AddressAISchema})['strict']()['describe']('PUBLIC:\x20Clear\x20ALL\x20tags\x20from\x20specified\x20on-chain\x20identity\x20marks.');export const MarkLikeSchema=z['object']({'op':z['literal']('like'),'address':AccountOrMark_AddressAISchema})['strict']()['describe']('PUBLIC\x20REPUTATION\x20VOTE:\x20Like\x20an\x20address\x20(0x...)\x20or\x20LocalMark\x20name.\
|
|
1
|
+
import{z}from'zod';import{AccountOrMark_AddressAISchema,AccountOrMark_AddressSchema,DescriptionSchema,ManyAccountOrMark_AddressAISchema,NameSchema}from'../common/index.js';import{RecordsInEntitySchema}from'../query/index.js';import{CallEnvSchema}from'./base.js';export const InformationAddSchema=z['object']({'op':z['literal']('add'),'data':z['array'](RecordsInEntitySchema)})['strict']()['describe']('PUBLIC:\x20Add\x20personal\x20info\x20on-chain.\x20Safe:\x20social\x20handles,\x20URLs,\x20public\x20email.\x20NEVER:\x20phone,\x20address,\x20private\x20keys.');export const InformationRemoveSchema=z['object']({'op':z['literal']('remove'),'name':z['array'](NameSchema)})['strict']()['describe']('PUBLIC:\x20Remove\x20specified\x20personal\x20info\x20records\x20from\x20your\x20public\x20profile.');export const InformationClearSchema=z['object']({'op':z['literal']('clear')})['strict']()['describe']('PUBLIC:\x20Clear\x20ALL\x20personal\x20info\x20from\x20your\x20public\x20profile.');export const InformationSchema=z['discriminatedUnion']('op',[InformationAddSchema,InformationRemoveSchema,InformationClearSchema]);export const MarkAddSchema=z['object']({'op':z['literal']('add'),'data':z['array'](z['object']({'address':AccountOrMark_AddressAISchema,'name':NameSchema['optional'](),'tags':z['array'](NameSchema)['optional']()})['strict']())})['strict']()['describe']('PUBLIC:\x20Add\x20ID\x20name\x20and\x20tags\x20on-chain\x20for\x20public\x20identity.\x20For\x20private\x20marks,\x20use\x20\x27local\x27\x20tool.');export const MarkRemoveSchema=z['object']({'op':z['literal']('remove'),'data':z['array'](z['object']({'address':AccountOrMark_AddressAISchema,'tags':z['array'](NameSchema)['optional']()})['strict']())})['strict']()['describe']('PUBLIC:\x20Remove\x20specified\x20tags\x20from\x20your\x20on-chain\x20identity\x20mark.');export const MarkClearSchema=z['object']({'op':z['literal']('clear'),'address':ManyAccountOrMark_AddressAISchema})['strict']()['describe']('PUBLIC:\x20Clear\x20ALL\x20tags\x20from\x20specified\x20on-chain\x20identity\x20marks.');export const MarkLikeSchema=z['object']({'op':z['literal']('like'),'address':AccountOrMark_AddressAISchema})['strict']()['describe']('PUBLIC\x20REPUTATION\x20VOTE:\x20Like\x20an\x20address\x20(0x...)\x20or\x20LocalMark\x20name.\x20An\x20on-chain\x20reputation\x20vote\x20—\x20toggles\x20off\x20if\x20already\x20liked,\x20auto-flips\x20an\x20existing\x20dislike,\x20and\x20increments\x20the\x20target\x27s\x20PUBLIC\x20aggregate\x20like\x20count\x20(queryable\x20via\x20query\x20personal\x20/\x20Guard\x20entity_voted_record).\x20Do\x20NOT\x20emulate\x20with\x20mark.add\x20tags:[\x27like\x27]\x20—\x20manual\x20tags\x20stay\x20private\x20in\x20your\x20Resource\x20and\x20never\x20affect\x20the\x20aggregate\x20count.');export const MarkDislikeSchema=z['object']({'op':z['literal']('dislike'),'address':AccountOrMark_AddressAISchema})['strict']()['describe']('PUBLIC\x20REPUTATION\x20VOTE:\x20Dislike\x20an\x20address\x20(0x...)\x20or\x20LocalMark\x20name.\x20An\x20on-chain\x20reputation\x20vote\x20—\x20toggles\x20off\x20if\x20already\x20disliked,\x20auto-flips\x20an\x20existing\x20like,\x20and\x20increments\x20the\x20target\x27s\x20PUBLIC\x20aggregate\x20dislike\x20count.\x20Same\x20manual-tag\x20caveat\x20as\x20\x27like\x27.');export const MarkFavorSchema=z['object']({'op':z['literal']('favor'),'address':AccountOrMark_AddressAISchema})['strict']()['describe']('PUBLIC\x20REPUTATION\x20VOTE:\x20Favor\x20(bookmark/star)\x20an\x20address\x20(0x...)\x20or\x20LocalMark\x20name.\x20An\x20on-chain\x20reputation\x20vote\x20—\x20toggles\x20off\x20if\x20already\x20favored,\x20and\x20increments\x20the\x20target\x27s\x20PUBLIC\x20aggregate\x20favor\x20count\x20(independent\x20of\x20like/dislike;\x20queryable\x20via\x20query\x20personal).\x20Use\x20for\x20\x27save\x20this\x20service/provider\x27\x20style\x20endorsements.');export const MarkTransferSchema=z['object']({'op':z['literal']('transfer'),'to':AccountOrMark_AddressAISchema})['strict']()['describe']('PUBLIC:\x20Transfer\x20your\x20on-chain\x20identity\x20mark\x20to\x20another\x20address.');export const MarkReplaceSchema=z['object']({'op':z['literal']('replace'),'new_mark_object':z['string']()['describe']('New\x20personal\x20ID\x20tag\x20object\x20ID.')})['strict']()['describe']('PUBLIC:\x20Replace\x20your\x20on-chain\x20identity\x20mark\x20with\x20a\x20new\x20object.');export const MarkDestroySchema=z['object']({'op':z['literal']('destroy')})['strict']()['describe']('PUBLIC:\x20Destroy\x20your\x20on-chain\x20identity\x20mark\x20permanently.');export const MarkSchema=z['discriminatedUnion']('op',[MarkAddSchema,MarkRemoveSchema,MarkClearSchema,MarkLikeSchema,MarkDislikeSchema,MarkFavorSchema,MarkTransferSchema,MarkReplaceSchema,MarkDestroySchema]);export const CallPersonal_DataSchema=z['object']({'description':DescriptionSchema['optional'](),'referrer':z['union']([z['string'](),AccountOrMark_AddressSchema,z['null']()])['optional']()['describe']('Referrer\x20ID\x20(name\x20or\x20address)\x20for\x20joining\x20the\x20on-chain\x20network.'),'information':InformationSchema['optional']()['describe']('PUBLIC:\x20Personal\x20info\x20on-chain.\x20Safe:\x20social\x20handles,\x20URLs.\x20NEVER:\x20phone,\x20address,\x20private\x20keys.'),'mark':MarkSchema['optional']()['describe']('PUBLIC:\x20On-chain\x20identity\x20mark.\x20For\x20PRIVATE\x20marks,\x20use\x20\x27local\x27\x20tool.')})['strict']();export const CallPersonal_InputSchema=z['object']({'data':CallPersonal_DataSchema,'env':CallEnvSchema['optional']()})['strict']();
|
|
@@ -36,7 +36,7 @@ export declare const CallProgress_DataSchema: z.ZodObject<{
|
|
|
36
36
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
37
37
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
38
38
|
}, z.core.$strict>>;
|
|
39
|
-
check_all_founded: z.
|
|
39
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
40
40
|
}, z.core.$strict>;
|
|
41
41
|
}, z.core.$strict>>;
|
|
42
42
|
operate: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
@@ -92,7 +92,7 @@ export declare const CallProgress_InputSchema: z.ZodObject<{
|
|
|
92
92
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
93
93
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
94
94
|
}, z.core.$strict>>;
|
|
95
|
-
check_all_founded: z.
|
|
95
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
96
96
|
}, z.core.$strict>;
|
|
97
97
|
}, z.core.$strict>>;
|
|
98
98
|
operate: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
@@ -170,7 +170,7 @@ export declare const CallProgress_InputSchema: z.ZodObject<{
|
|
|
170
170
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
171
171
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
172
172
|
}, z.core.$strict>>;
|
|
173
|
-
check_all_founded: z.
|
|
173
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
174
174
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>>;
|
|
175
175
|
name: z.ZodDefault<z.ZodString>;
|
|
176
176
|
object_type: z.ZodOptional<z.ZodEnum<{
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type ReceiptKind = "transaction" | "submission" | "data" | "error" | "null";
|
|
2
|
+
export interface ReceiptObjectChange {
|
|
3
|
+
type: string;
|
|
4
|
+
sender?: string;
|
|
5
|
+
owner?: string;
|
|
6
|
+
objectType?: string;
|
|
7
|
+
objectId?: string;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface ReceiptBalanceChange {
|
|
11
|
+
address?: string;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface ExecutionReceipt {
|
|
15
|
+
kind: ReceiptKind;
|
|
16
|
+
executed: boolean;
|
|
17
|
+
digest?: string;
|
|
18
|
+
txStatus?: string;
|
|
19
|
+
txError?: string;
|
|
20
|
+
error?: string;
|
|
21
|
+
objectChanges: ReceiptObjectChange[];
|
|
22
|
+
created: ReceiptObjectChange[];
|
|
23
|
+
modified: ReceiptObjectChange[];
|
|
24
|
+
events: any[];
|
|
25
|
+
balanceChanges: ReceiptBalanceChange[];
|
|
26
|
+
raw: unknown;
|
|
27
|
+
}
|
|
28
|
+
export declare function buildReceipt(result: unknown): ExecutionReceipt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const EMPTY_ARRAY=[];export function buildReceipt(a){if(a===undefined||a===null)return{'kind':'null','executed':![],...emptyChanges(),'raw':a};if(!Array['isArray'](a)&&typeof a==='object'&&'error'in a){const b=a['error'];return{'kind':'error','executed':![],'error':typeof b==='string'?b:String(b),...emptyChanges(),'raw':a};}if(Array['isArray'](a))return{'kind':'data','executed':![],...emptyChanges(),'raw':a};if(typeof a==='object'&&'guard'in a&&'submission'in a)return{'kind':'submission','executed':![],...emptyChanges(),'raw':a};if(typeof a==='object'&&'digest'in a){const c=a,d=c?.['effects']?.['status']?.['status'],e=d==='success'||c?.['effects']?.['status']?.['success']===!![],f=Array['isArray'](c['objectChanges'])?c['objectChanges']:EMPTY_ARRAY;return{'kind':'transaction','executed':e,'digest':typeof c['digest']==='string'?c['digest']:String(c['digest']),'txStatus':typeof d==='string'?d:undefined,'txError':c?.['effects']?.['status']?.['error'],'objectChanges':f,'created':f['filter'](g=>g?.['type']==='created'),'modified':f['filter'](g=>g?.['type']==='mutated'||g?.['type']==='published'),'events':Array['isArray'](c['events'])?c['events']:EMPTY_ARRAY,'balanceChanges':Array['isArray'](c['balanceChanges'])?c['balanceChanges']:EMPTY_ARRAY,'raw':a};}return{'kind':'data','executed':![],...emptyChanges(),'raw':a};}function emptyChanges(){return{'objectChanges':[],'created':[],'modified':[],'events':[],'balanceChanges':[]};}
|
|
@@ -16,7 +16,7 @@ export declare const KeyDataSchema: z.ZodObject<{
|
|
|
16
16
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
17
17
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
18
18
|
}, z.core.$strict>>;
|
|
19
|
-
check_all_founded: z.
|
|
19
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
20
20
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
21
21
|
}, z.core.$strict>;
|
|
22
22
|
export declare const RepDataItemSchema: z.ZodObject<{
|
|
@@ -33,7 +33,7 @@ export declare const RepDataItemSchema: z.ZodObject<{
|
|
|
33
33
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
34
34
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
35
35
|
}, z.core.$strict>>;
|
|
36
|
-
check_all_founded: z.
|
|
36
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
37
37
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
38
38
|
}, z.core.$strict>>;
|
|
39
39
|
write_guard: z.ZodOptional<z.ZodString>;
|
|
@@ -53,7 +53,7 @@ export declare const SignerOrClockSchema: z.ZodObject<{
|
|
|
53
53
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
54
54
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
55
55
|
}, z.core.$strict>>;
|
|
56
|
-
check_all_founded: z.
|
|
56
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
57
57
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
58
58
|
}, z.core.$strict>;
|
|
59
59
|
export declare const DataRemoveItemSchema: z.ZodObject<{
|
|
@@ -127,7 +127,7 @@ export declare const DataAddWithItemsSchema: z.ZodObject<{
|
|
|
127
127
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
128
128
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
129
129
|
}, z.core.$strict>>;
|
|
130
|
-
check_all_founded: z.
|
|
130
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
131
131
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
132
132
|
}, z.core.$strict>>;
|
|
133
133
|
write_guard: z.ZodOptional<z.ZodString>;
|
|
@@ -144,7 +144,7 @@ export declare const DataAddSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
144
144
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
145
145
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
146
146
|
}, z.core.$strict>>;
|
|
147
|
-
check_all_founded: z.
|
|
147
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
148
148
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
149
149
|
}, z.core.$strict>, z.ZodObject<{
|
|
150
150
|
name: z.ZodString;
|
|
@@ -162,7 +162,7 @@ export declare const DataAddSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
162
162
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
163
163
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
164
164
|
}, z.core.$strict>>;
|
|
165
|
-
check_all_founded: z.
|
|
165
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
166
166
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
167
167
|
}, z.core.$strict>>;
|
|
168
168
|
write_guard: z.ZodOptional<z.ZodString>;
|
|
@@ -230,7 +230,7 @@ export declare const CallRepository_DataSchema: z.ZodObject<{
|
|
|
230
230
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
231
231
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
232
232
|
}, z.core.$strict>>;
|
|
233
|
-
check_all_founded: z.
|
|
233
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
234
234
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
235
235
|
}, z.core.$strict>, z.ZodObject<{
|
|
236
236
|
name: z.ZodString;
|
|
@@ -248,7 +248,7 @@ export declare const CallRepository_DataSchema: z.ZodObject<{
|
|
|
248
248
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
249
249
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
250
250
|
}, z.core.$strict>>;
|
|
251
|
-
check_all_founded: z.
|
|
251
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
252
252
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
253
253
|
}, z.core.$strict>>;
|
|
254
254
|
write_guard: z.ZodOptional<z.ZodString>;
|
|
@@ -346,7 +346,7 @@ export declare const CallRepository_InputSchema: z.ZodObject<{
|
|
|
346
346
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
347
347
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
348
348
|
}, z.core.$strict>>;
|
|
349
|
-
check_all_founded: z.
|
|
349
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
350
350
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
351
351
|
}, z.core.$strict>, z.ZodObject<{
|
|
352
352
|
name: z.ZodString;
|
|
@@ -364,7 +364,7 @@ export declare const CallRepository_InputSchema: z.ZodObject<{
|
|
|
364
364
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
365
365
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
366
366
|
}, z.core.$strict>>;
|
|
367
|
-
check_all_founded: z.
|
|
367
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
368
368
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>, z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>]>;
|
|
369
369
|
}, z.core.$strict>>;
|
|
370
370
|
write_guard: z.ZodOptional<z.ZodString>;
|
|
@@ -455,7 +455,7 @@ export declare const CallRepository_InputSchema: z.ZodObject<{
|
|
|
455
455
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
456
456
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
457
457
|
}, z.core.$strict>>;
|
|
458
|
-
check_all_founded: z.
|
|
458
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
459
459
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>>;
|
|
460
460
|
name: z.ZodDefault<z.ZodString>;
|
|
461
461
|
object_type: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{WithPermissionObjectSchema,ObjectsSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{AccountOrMark_AddressSchema,DescriptionSchema,NameOrAddressSchema,NameSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';import{PolicyRuleSchema}from'../query/index.js';import{SupportedValueSchema}from'../common/index.js';export const RepositoryIdSchema=z['union']([z['string'](),z['number'](),AccountOrMark_AddressSchema])['describe']('Data\x20item\x20ID.\x20Supports:\x20plain\x20string(bigint),\x20number\x20(such\x20as\x20timestamp),\x20or\x20AccountOrMark_Address\x20format.');export const KeyDataSchema=z['object']({'id':RepositoryIdSchema,'data':SupportedValueSchema})['strict']()['describe']('Data\x20ID\x20and\x20value.');export const RepDataItemSchema=z['object']({'data':z['array'](KeyDataSchema)['describe']('Data\x20item\x20list.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20REQUIRED\x20for\x20data_add\x20items\x20when\x20the\x20matching\x20policy\x20uses\x20id_from=None(0):\x20it\x20must\x20reference\x20one\x20of\x20that\x20policy\x27s\x20write_guard\x20guards,\x20otherwise\x20the\x20chain\x20aborts\x20with\x2022\x20(E_POLICY_WRITE_GUARD_REQUIRED).\x20Optional\x20for\x20Clock/Signer\x20policies.')})['strict']()['describe']('List\x20of\x20data\x20items\x20to\x20write.');export const SignerOrClockBaseSchema=z['object']({'name':NameSchema['describe']('Data\x20item\x20name.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20Used\x20to\x20specify\x20the\x20policy\x20write\x20permissions\x20and\x20rules\x20corresponding\x20to\x20this\x20Guard.')})['strict']()['describe']('Specify\x20data\x20items\x20by\x20name\x20and\x20ID.\x20ID\x20is\x20the\x20on-chain\x20timestamp\x20or\x20signer\x20ID\x20(depending\x20on\x20how\x20write_guard\x20specifies\x20the\x20ID\x20source).');export const SignerOrClockSchema=z['object']({'name':NameSchema['describe']('Data\x20item\x20name.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20Used\x20to\x20specify\x20the\x20policy\x20write\x20permissions\x20and\x20rules\x20corresponding\x20to\x20this\x20Guard.'),'data':SupportedValueSchema})['strict']()['describe']('Specify\x20data\x20items\x20by\x20name\x20and\x20data.\x20ID\x20is\x20the\x20on-chain\x20timestamp\x20or\x20signer\x20ID\x20(depending\x20on\x20how\x20write_guard\x20specifies\x20the\x20ID\x20source).');export const DataRemoveItemSchema=z['object']({'id':z['array'](RepositoryIdSchema)['describe']('Data\x20item\x20ID\x20list.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20REQUIRED\x20for\x20data_remove\x20items\x20when\x20the\x20matching\x20policy\x20uses\x20id_from=None(0);\x20optional\x20for\x20Clock/Signer\x20policies.')})['strict']()['describe']('Delete\x20data\x20items\x20by\x20name\x20and\x20ID\x20list.');export const PoliciesAddSetSchema=z['object']({'op':z['enum'](['add','set']),'policy':z['array'](PolicyRuleSchema)['describe']('Policy\x20rule\x20list.')})['strict']()['describe']('Add\x20or\x20set\x20policy\x20rules.');export const PoliciesRemoveSchema=z['object']({'op':z['literal']('remove'),'policy':z['array'](NameSchema)['describe']('Policy\x20rule\x20name\x20list.')})['strict']()['describe']('Remove\x20policy\x20rules.');export const PoliciesClearSchema=z['object']({'op':z['literal']('clear')})['strict']()['describe']('Clear\x20policy\x20rules.');export const PoliciesSchema=z['discriminatedUnion']('op',[PoliciesAddSetSchema,PoliciesRemoveSchema,PoliciesClearSchema]);export const DataAddWithItemsSchema=z['object']({'name':NameSchema['describe']('Data\x20item\x20name.\x20Must\x20match\x20the\x20name\x20in\x20PolicyRule.'),'items':z['array'](RepDataItemSchema)['describe']('List\x20of\x20data\x20items\x20to\x20add.\x20Each\x20data\x20item\x20contains\x20name,\x20ID,\x20and\x20data\x20parts,\x20where\x20name\x20and\x20ID\x20together\x20form\x20the\x20unique\x20key\x20for\x20the\x20data.')})['strict']()['describe']('Add\x20data\x20by\x20name\x20and\x20data\x20item\x20list.\x20Each\x20data\x20item\x20contains\x20name,\x20ID,\x20and\x20data\x20parts,\x20where\x20name\x20and\x20ID\x20together\x20form\x20the\x20unique\x20key\x20for\x20the\x20data.');export const DataAddSchema=z['union']([SignerOrClockSchema,DataAddWithItemsSchema]);export const DataRemoveSchema=z['union']([SignerOrClockBaseSchema,z['object']({'name':NameSchema['describe']('Data\x20item\x20name.\x20Must\x20match\x20the\x20name\x20in\x20PolicyRule.'),'items':z['array'](DataRemoveItemSchema)['describe']('List\x20of\x20data\x20items\x20to\x20delete.')})['strict']()]);export const CallRepository_DataSchema=z['object']({'object':WithPermissionObjectSchema,'description':DescriptionSchema['optional'](),'policies':PoliciesSchema['optional']()['describe']('Write\x20and\x20read\x20permission\x20rules\x20governing\x20the\x20data\x20records\x20of\x20this\x20Repository.'),'data_add':DataAddSchema['optional']()['describe']('Add\x20data\x20items'),'data_remove':DataRemoveSchema['optional']()['describe']('Delete\x20data\x20items'),'rewards':ObjectsSchema['optional']()['describe']('Reward\x20objects\x20bound\x20to\x20this\x20Repository\x20to\x20incentivize\x20data\x20contribution.'),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Repository\x20object\x20and\x20send\x20them\x20to\x20the\x20owner\x20of\x20its\x20Permission\x20object.'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name.')})['strict']()['describe']('On-chain\x20Repository\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20permission,\x20...}\x20to\x20create\x20a\x20Repository.\x20NOTE:\x20\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20\x27permission\x27\x20can\x20be\x20a\x20new\x20Permission\x20object\x20or\x20reference\x20an\x20existing\x20one\x20-\x20check\x20\x27object\x27\x20field\x20description\x20for\x20details.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallRepository_InputSchema=z['object']({'data':CallRepository_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
1
|
+
import{z}from'zod';import{WithPermissionObjectSchema,ObjectsSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{AccountOrMark_AddressSchema,DescriptionSchema,NameOrAddressSchema,NameSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';import{PolicyRuleSchema}from'../query/index.js';import{SupportedValueSchema}from'../common/index.js';export const RepositoryIdSchema=z['union']([z['string'](),z['number'](),AccountOrMark_AddressSchema])['describe']('Data\x20item\x20ID.\x20Supports:\x20plain\x20string(bigint),\x20number\x20(such\x20as\x20timestamp),\x20or\x20AccountOrMark_Address\x20format.');export const KeyDataSchema=z['object']({'id':RepositoryIdSchema,'data':SupportedValueSchema})['strict']()['describe']('Data\x20ID\x20and\x20value.');export const RepDataItemSchema=z['object']({'data':z['array'](KeyDataSchema)['describe']('Data\x20item\x20list.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20REQUIRED\x20for\x20data_add\x20items\x20when\x20the\x20matching\x20policy\x20uses\x20id_from=None(0):\x20it\x20must\x20reference\x20one\x20of\x20that\x20policy\x27s\x20write_guard\x20guards,\x20otherwise\x20the\x20chain\x20aborts\x20with\x2022\x20(E_POLICY_WRITE_GUARD_REQUIRED).\x20Optional\x20for\x20Clock/Signer\x20policies.')})['strict']()['describe']('List\x20of\x20data\x20items\x20to\x20write.');export const SignerOrClockBaseSchema=z['object']({'name':NameSchema['describe']('Data\x20item\x20name.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20Used\x20to\x20specify\x20the\x20policy\x20write\x20permissions\x20and\x20rules\x20corresponding\x20to\x20this\x20Guard.')})['strict']()['describe']('Specify\x20data\x20items\x20by\x20name\x20and\x20ID.\x20ID\x20is\x20the\x20on-chain\x20timestamp\x20or\x20signer\x20ID\x20(depending\x20on\x20how\x20write_guard\x20specifies\x20the\x20ID\x20source).');export const SignerOrClockSchema=z['object']({'name':NameSchema['describe']('Data\x20item\x20name.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20Used\x20to\x20specify\x20the\x20policy\x20write\x20permissions\x20and\x20rules\x20corresponding\x20to\x20this\x20Guard.'),'data':SupportedValueSchema})['strict']()['describe']('Specify\x20data\x20items\x20by\x20name\x20and\x20data.\x20ID\x20is\x20the\x20on-chain\x20timestamp\x20or\x20signer\x20ID\x20(depending\x20on\x20how\x20write_guard\x20specifies\x20the\x20ID\x20source).');export const DataRemoveItemSchema=z['object']({'id':z['array'](RepositoryIdSchema)['describe']('Data\x20item\x20ID\x20list.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20REQUIRED\x20for\x20data_remove\x20items\x20when\x20the\x20matching\x20policy\x20uses\x20id_from=None(0);\x20optional\x20for\x20Clock/Signer\x20policies.')})['strict']()['describe']('Delete\x20data\x20items\x20by\x20name\x20and\x20ID\x20list.');export const PoliciesAddSetSchema=z['object']({'op':z['enum'](['add','set']),'policy':z['array'](PolicyRuleSchema)['describe']('Policy\x20rule\x20list.')})['strict']()['describe']('Add\x20or\x20set\x20policy\x20rules.');export const PoliciesRemoveSchema=z['object']({'op':z['literal']('remove'),'policy':z['array'](NameSchema)['describe']('Policy\x20rule\x20name\x20list.')})['strict']()['describe']('Remove\x20policy\x20rules.');export const PoliciesClearSchema=z['object']({'op':z['literal']('clear')})['strict']()['describe']('Clear\x20policy\x20rules.');export const PoliciesSchema=z['discriminatedUnion']('op',[PoliciesAddSetSchema,PoliciesRemoveSchema,PoliciesClearSchema]);export const DataAddWithItemsSchema=z['object']({'name':NameSchema['describe']('Data\x20item\x20name.\x20Must\x20match\x20the\x20name\x20in\x20PolicyRule.'),'items':z['array'](RepDataItemSchema)['describe']('List\x20of\x20data\x20items\x20to\x20add.\x20Each\x20data\x20item\x20contains\x20name,\x20ID,\x20and\x20data\x20parts,\x20where\x20name\x20and\x20ID\x20together\x20form\x20the\x20unique\x20key\x20for\x20the\x20data.')})['strict']()['describe']('Add\x20data\x20by\x20name\x20and\x20data\x20item\x20list.\x20Each\x20data\x20item\x20contains\x20name,\x20ID,\x20and\x20data\x20parts,\x20where\x20name\x20and\x20ID\x20together\x20form\x20the\x20unique\x20key\x20for\x20the\x20data.');export const DataAddSchema=z['union']([SignerOrClockSchema,DataAddWithItemsSchema]);export const DataRemoveSchema=z['union']([SignerOrClockBaseSchema,z['object']({'name':NameSchema['describe']('Data\x20item\x20name.\x20Must\x20match\x20the\x20name\x20in\x20PolicyRule.'),'items':z['array'](DataRemoveItemSchema)['describe']('List\x20of\x20data\x20items\x20to\x20delete.')})['strict']()]);export const CallRepository_DataSchema=z['object']({'object':WithPermissionObjectSchema,'description':DescriptionSchema['optional'](),'policies':PoliciesSchema['optional']()['describe']('Write\x20and\x20read\x20permission\x20rules\x20governing\x20the\x20data\x20records\x20of\x20this\x20Repository.'),'data_add':DataAddSchema['optional']()['describe']('Add\x20data\x20items\x20to\x20an\x20ALREADY-EXISTING\x20Repository.\x20TWO-PHASE:\x20if\x20\x27object\x27\x20creates\x20a\x20NEW\x20Repository\x20in\x20this\x20same\x20call,\x20data_add\x20FAILS\x20(\x27Repository\x20content\x20not\x20ready\x27)\x20—\x20first\x20create\x20the\x20Repository\x20(one\x20call),\x20then\x20add\x20data\x20in\x20a\x20follow-up\x20call.\x20The\x20data_add.name\x20must\x20match\x20a\x20policy\x20rule\x20name\x20defined\x20in\x20\x27policies\x27.'),'data_remove':DataRemoveSchema['optional']()['describe']('Delete\x20data\x20items'),'rewards':ObjectsSchema['optional']()['describe']('Reward\x20objects\x20bound\x20to\x20this\x20Repository\x20to\x20incentivize\x20data\x20contribution.'),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Repository\x20object\x20and\x20send\x20them\x20to\x20the\x20owner\x20of\x20its\x20Permission\x20object.'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name.')})['strict']()['describe']('On-chain\x20Repository\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20permission,\x20...}\x20to\x20create\x20a\x20Repository.\x20NOTE:\x20\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20\x27permission\x27\x20can\x20be\x20a\x20new\x20Permission\x20object\x20or\x20reference\x20an\x20existing\x20one\x20-\x20check\x20\x27object\x27\x20field\x20description\x20for\x20details.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallRepository_InputSchema=z['object']({'data':CallRepository_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
@@ -199,7 +199,7 @@ export declare const CallReward_InputSchema: z.ZodObject<{
|
|
|
199
199
|
name_or_address: z.ZodOptional<z.ZodString>;
|
|
200
200
|
local_mark_first: z.ZodOptional<z.ZodBoolean>;
|
|
201
201
|
}, z.core.$strict>>;
|
|
202
|
-
check_all_founded: z.
|
|
202
|
+
check_all_founded: z.ZodDefault<z.ZodBoolean>;
|
|
203
203
|
}, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>>;
|
|
204
204
|
name: z.ZodDefault<z.ZodString>;
|
|
205
205
|
object_type: z.ZodOptional<z.ZodEnum<{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{afterEach,describe,expect,it}from'vitest';import{setEnabled,reset}from'../../config/runtime.js';import{buildDataSemantic}from'./semantic.js';function trustResult(){return{'evaluation_id':'graph_service_trust','total':0x2b,'level':'high','breakdown':[{'rule_id':'trust_arbitration','dimension':'trust','score':0x0,'weight':0x14,'reason':'No\x20arbitration\x20binding\x20configured\x20(verified\x20absence)\x20—\x20binding\x20table\x20empty','mismatched':['arbitration_binding']},{'rule_id':'trust_fund_safety','dimension':'trust','score':0x28,'weight':0xf,'reason':'Fund\x20safety\x206/15\x20—\x20Compensation\x20fund\x200\x20base\x20units','mismatched':['no\x20compensation\x20fund']},{'rule_id':'trust_reviews','dimension':'trust','score':0x32,'weight':0x23,'reason':'No\x20reputation\x20signal\x20(verified\x20empty\x20window)\x20—\x200\x20votes'}],'red_flags':['service\x20paused\x20by\x20merchant'],'blocked':!![],'trace':[],'summary':'Service\x20trust\x2043/100\x20(high)\x20—\x20weakest\x20trust_arbitration\x200/100\x20—\x20binding\x20table\x20empty','unverified':[]};}function riskResult(){return{'evaluation_id':'graph_service_risk','total':0x41,'level':'medium_high','breakdown':[{'rule_id':'risk_workflow','dimension':'workflow','score':0x4e,'weight':0x23,'reason':'1\x20structural\x20finding(s):\x20[high]\x20Forward\x20sink\x20—\x20analyzer\x20findings','mismatched':['wf_sink']}],'red_flags':[],'blocked':![],'trace':[],'summary':'Service\x20risk\x2065/100\x20(medium_high)\x20—\x20weakest\x20risk_workflow\x2078/100\x20—\x201\x20structural\x20finding(s)','unverified':[]};}function fixtureEvaluation(){return{'target':'0xsvc','trust':trustResult(),'risk':riskResult(),'completeness':0x56,'coverage':[{'slot':'service_snapshot','label':'Service\x20snapshot','gloss':'g','required':!![],'state':'present','facts':[]},{'slot':'reviews','label':'Review\x20votes','gloss':'g','required':![],'state':'empty','facts':[]},{'slot':'machine_workflow','label':'Workflow','gloss':'g','required':!![],'state':'gap','facts':[]}],'unverified':['trust_reviews'],'vocabulary':{'present':'p','empty':'e','gap':'g','unverified':'u','completeness':'c'}};}const BUY_DATA={'object':'0xsvc','order_new':{'buy':{'items':[],'total_pay':{'balance':'1'}}}};afterEach(()=>{reset('customer_intelligence');}),describe('Task\x2021\x20—\x20customer_advice\x20projects\x20the\x20graph\x20evaluation\x20(TR-21.1)',()=>{it('preorder\x20advice:\x20findings\x20text\x20cites\x20the\x20breakdown\x20evidence,\x20red\x20flag\x20at\x20required\x20priority',()=>{const a=buildDataSemantic({},{'operation_type':'service','data':BUY_DATA,'evaluation':fixtureEvaluation()}),b=a?.['customer_advice'];expect(b)['toBeDefined'](),expect(b['risk_score'])['toBe'](0x41),expect(b['risk_level'])['toBe']('medium_high');const c=b['reminders']['filter'](i=>i['priority']==='required');expect(c)['toHaveLength'](0x1),expect(c[0x0]['stage'])['toBe']('preorder'),expect(c[0x0]['message'])['toContain']('Blocked:\x20service\x20paused\x20by\x20merchant');const d=b['reminders']['filter'](i=>i['priority']==='recommended'),e=d['map'](i=>i['message'])['join']('\x20|\x20');expect(e)['toContain']('Arbitration\x200/100\x20—\x20No\x20arbitration\x20binding\x20configured\x20(verified\x20absence)'),expect(e)['toContain']('missing/unmet:\x20arbitration_binding'),expect(e)['toContain']('Fund\x20safety\x206/15\x20—\x20Compensation\x20fund\x200\x20base\x20units'),expect(e)['toContain']('1\x20structural\x20finding(s):\x20[high]\x20Forward\x20sink'),expect(d[0x0]['message'])['toContain']('Arbitration\x200/100');const f=b['reminders']['map'](i=>i['message'])['join']('\x20|\x20');expect(f)['toContain']('Unverifiable\x20dimensions\x20(excluded\x20from\x20the\x20score\x20due\x20to\x20fetch\x20gaps):\x20Reputation'),expect(f)['toContain']('treat\x20them\x20as\x20unknown,\x20not\x20as\x20passed'),expect(f)['toContain']('Coverage\x20gap:\x20required\x20material\x20\x22machine_workflow\x22'),expect(f)['not']['toContain']('\x22reviews\x22'),expect(b['recommendations'])['toContain']('Resolve\x20the\x20red\x20flags\x20with\x20the\x20merchant\x20or\x20pick\x20another\x20service\x20before\x20paying');const g=b['recommendations']['filter'](i=>i['includes']('below\x20your\x20risk\x20appetite'));expect(g)['toHaveLength'](0x1),expect(g[0x0])['toContain']('Trust\x2043/100\x20is\x20below\x20your\x20risk\x20appetite\x20(50)'),expect(g[0x0])['toContain']('Service\x20trust\x2043/100\x20(high)');const h=b['reminders']['map'](i=>i['priority']);expect(h['indexOf']('required'))['toBeLessThan'](h['indexOf']('recommended')),expect(h['lastIndexOf']('info'))['toBeGreaterThan'](h['lastIndexOf']('recommended'));}),it('browse\x20advice:\x20reuses\x20the\x20evaluation\x20embedded\x20in\x20the\x20response\x20envelope\x20(no\x20threading)',()=>{const a=buildDataSemantic({'evaluation':fixtureEvaluation()},{'operation_type':'query_toolkit','data':{}}),b=a?.['customer_advice'];expect(b)['toBeDefined'](),expect(b['reminders']['every'](c=>c['stage']==='browse'))['toBe'](!![]),expect(b['reminders']['map'](c=>c['message'])['join']('\x20'))['toContain']('Blocked:\x20service\x20paused\x20by\x20merchant');}),it('no\x20evaluation\x20→\x20no\x20advice\x20(order\x20ops,\x20bare\x20service\x20ops,\x20unevaluated\x20queries)',()=>{expect(buildDataSemantic({},{'operation_type':'order','data':{'object':'0xorder'}})?.['customer_advice'])['toBeUndefined'](),expect(buildDataSemantic({},{'operation_type':'service','data':{'object':'0xsvc'}})?.['customer_advice'])['toBeUndefined'](),expect(buildDataSemantic({},{'operation_type':'query_toolkit','data':{}})?.['customer_advice'])['toBeUndefined']();}),it('clean\x20evaluation:\x20a\x20single\x20info\x20reminder\x20cites\x20both\x20measured\x20summaries',()=>{const a={'target':'0xsvc','trust':{'evaluation_id':'graph_service_trust','total':0x5c,'level':'low','breakdown':[{'rule_id':'trust_arbitration','dimension':'trust','score':0x64,'weight':0x14,'reason':'Arbitration\x2020/20\x20—\x20binding\x20active'}],'red_flags':[],'blocked':![],'trace':[],'summary':'Service\x20trust\x2092/100\x20(low)','unverified':[]},'risk':{'evaluation_id':'graph_service_risk','total':0x64,'level':'low','breakdown':[{'rule_id':'risk_workflow','dimension':'workflow','score':0x64,'weight':0x23,'reason':'No\x20structural\x20risk\x20fired\x20—\x20clean\x20findings'}],'red_flags':[],'blocked':![],'trace':[],'summary':'Service\x20risk\x20100/100\x20(low)','unverified':[]},'completeness':0x64,'coverage':[{'slot':'service_snapshot','label':'Service\x20snapshot','gloss':'g','required':!![],'state':'present','facts':[]}],'unverified':[],'vocabulary':{'present':'p','empty':'e','gap':'g','unverified':'u','completeness':'c'}},b=buildDataSemantic({},{'operation_type':'service','data':BUY_DATA,'evaluation':a}),c=b?.['customer_advice'];expect(c)['toBeDefined'](),expect(c['reminders'])['toHaveLength'](0x1),expect(c['reminders'][0x0]['priority'])['toBe']('info'),expect(c['reminders'][0x0]['message'])['toContain']('No\x20adverse\x20findings\x20in\x20the\x20graph\x20evaluation\x20—\x20Service\x20trust\x2092/100\x20(low)\x20—\x20Service\x20risk\x20100/100\x20(low)');}),it('customer_intelligence\x20disabled\x20→\x20advice\x20never\x20populates',()=>{setEnabled('customer_intelligence',![]);const a=buildDataSemantic({},{'operation_type':'service','data':BUY_DATA,'evaluation':fixtureEvaluation()});expect(a?.['customer_advice'])['toBeUndefined']();}),it('no\x20heuristic\x20leakage:\x20reminder\x20text\x20never\x20falls\x20back\x20to\x20the\x20retired\x20reminder\x20table',()=>{const a=buildDataSemantic({},{'operation_type':'service','data':BUY_DATA,'evaluation':fixtureEvaluation()}),b=JSON['stringify'](a?.['customer_advice']);expect(b)['not']['toContain']('Require\x20the\x20merchant\x20to\x20configure\x20an\x20Arbitration\x20service\x20before\x20placing\x20the\x20order'),expect(b)['not']['toContain']('Require\x20the\x20merchant\x20to\x20set\x20a\x20compensation_fund\x20to\x20guarantee');});});
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { SemanticSummary, ObjectRole, FundRole, EventSemantic } from "./base.js";
|
|
2
|
+
import type { ExecutionReceipt } from "./receipt.js";
|
|
3
|
+
import type { GraphServiceEvaluation } from "../../evaluation/builtins/graph-service.js";
|
|
2
4
|
import { type ErrorCodeValue } from "./error-codes.js";
|
|
3
5
|
export interface SemanticContext {
|
|
4
6
|
operation_type: string;
|
|
5
7
|
data: any;
|
|
6
|
-
harness?: import("../../harness/index.js").Harness;
|
|
7
8
|
expected?: import("../../harness/types.js").ExpectedResult;
|
|
8
9
|
operation_id?: string;
|
|
9
10
|
pre_warnings?: string[];
|
|
10
11
|
schema_check?: import("../schema-version.js").SchemaCheckResult;
|
|
12
|
+
evaluation?: GraphServiceEvaluation;
|
|
11
13
|
}
|
|
12
14
|
export type ErrorCode = ErrorCodeValue;
|
|
13
15
|
export interface MoveAbortInfo {
|
|
@@ -35,6 +37,7 @@ export declare function tagObjectRoles(objectChanges: any[]): ObjectRole[];
|
|
|
35
37
|
export declare function tagFundRoles(balanceChanges: any[], operation_type: string, data?: any, events?: any[]): FundRole[];
|
|
36
38
|
export declare function eventToSemantic(event: any): EventSemantic;
|
|
37
39
|
export declare function annotateEvents(events: any[] | undefined): EventSemantic[];
|
|
38
|
-
export declare function
|
|
40
|
+
export declare function referencesExistingObject(data?: Record<string, unknown> | null): boolean;
|
|
41
|
+
export declare function buildSemantic(receipt: ExecutionReceipt, context?: SemanticContext): SemanticSummary | undefined;
|
|
39
42
|
export declare function buildDataSemantic(data: any, context?: SemanticContext, isError?: boolean, errorMsg?: string): SemanticSummary | undefined;
|
|
40
43
|
export {};
|