@wowok/agent-mcp 2.7.1 → 2.7.3
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/index.js +1 -1
- package/dist/config/runtime.js +1 -238
- package/dist/customer/account-events.d.ts +32 -0
- package/dist/customer/account-events.js +1 -0
- package/dist/customer/customer-advice.d.ts +1 -0
- package/dist/customer/customer-advice.js +1 -130
- package/dist/customer/index.js +1 -11
- package/dist/customer/industry-risks.js +1 -438
- package/dist/customer/info-puzzle.js +1 -681
- package/dist/customer/order-monitor.js +1 -328
- package/dist/customer/order-strategy.d.ts +1 -1
- package/dist/customer/order-strategy.js +1 -373
- package/dist/customer/post-purchase.js +1 -351
- package/dist/customer/preorder-compare.js +1 -34
- package/dist/customer/reminder-system.d.ts +2 -0
- package/dist/customer/reminder-system.js +1 -316
- package/dist/customer/risk-assessment.d.ts +1 -0
- package/dist/customer/risk-assessment.js +1 -397
- package/dist/customer/types.d.ts +2 -0
- package/dist/customer/types.js +1 -13
- package/dist/customer/user-preferences.js +1 -460
- package/dist/evaluation/arbitration-game.d.ts +9 -2
- package/dist/evaluation/arbitration-game.js +1 -48
- package/dist/evaluation/builtins/arbitration-score.d.ts +41 -0
- package/dist/evaluation/builtins/arbitration-score.js +1 -0
- package/dist/evaluation/builtins/demand-match.js +1 -153
- package/dist/evaluation/builtins/index.d.ts +1 -0
- package/dist/evaluation/builtins/index.js +1 -10
- package/dist/evaluation/builtins/service-risk.js +1 -55
- package/dist/evaluation/capability.js +1 -13
- package/dist/evaluation/category-match-rules.d.ts +30 -0
- package/dist/evaluation/category-match-rules.js +1 -0
- package/dist/evaluation/composer.js +1 -40
- package/dist/evaluation/engine.js +1 -175
- package/dist/evaluation/extract.js +1 -115
- package/dist/evaluation/game-strategy.d.ts +27 -0
- package/dist/evaluation/game-strategy.js +1 -0
- package/dist/evaluation/gap.js +1 -100
- package/dist/evaluation/index.d.ts +2 -0
- package/dist/evaluation/index.js +1 -11
- package/dist/evaluation/location-match.d.ts +42 -0
- package/dist/evaluation/location-match.js +1 -0
- package/dist/evaluation/node-game.d.ts +31 -3
- package/dist/evaluation/node-game.js +1 -57
- package/dist/evaluation/path-reasoning.d.ts +35 -0
- package/dist/evaluation/path-reasoning.js +1 -0
- package/dist/evaluation/region.d.ts +6 -0
- package/dist/evaluation/region.js +1 -36
- package/dist/evaluation/types.d.ts +18 -0
- package/dist/evaluation/types.js +1 -1
- package/dist/evaluation/user-injection.js +1 -27
- package/dist/experience/experience-reuse.js +1 -103
- package/dist/experience/index.js +1 -5
- package/dist/experience/intent-distill.js +1 -83
- package/dist/experience/realtime-feedback.js +1 -94
- package/dist/experience/types.js +1 -1
- package/dist/experience/user-profile.d.ts +1 -1
- package/dist/experience/user-profile.js +1 -171
- package/dist/extensions/business-modules.js +1 -287
- package/dist/extensions/capability-manifest.js +1 -781
- package/dist/extensions/constraint-registry.js +1 -198
- package/dist/extensions/index.d.ts +6 -0
- package/dist/extensions/index.js +1 -6
- package/dist/extensions/industry-layers.d.ts +75 -0
- package/dist/extensions/industry-layers.js +1 -0
- package/dist/extensions/industry-pack.d.ts +105 -0
- package/dist/extensions/industry-pack.js +1 -0
- package/dist/extensions/metric-registry.js +1 -257
- package/dist/extensions/mode-evaluator.d.ts +1 -1
- package/dist/extensions/mode-evaluator.js +1 -170
- package/dist/extensions/modes.js +1 -499
- package/dist/extensions/registry.d.ts +1 -0
- package/dist/extensions/registry.js +1 -717
- package/dist/extensions/types.js +1 -1
- package/dist/graph/base.d.ts +8 -0
- package/dist/graph/base.js +1 -0
- package/dist/harness/auto-escalation.js +1 -68
- package/dist/harness/checkpoint.js +1 -129
- package/dist/harness/index.d.ts +1 -0
- package/dist/harness/index.js +1 -78
- package/dist/harness/plan.d.ts +2 -0
- package/dist/harness/plan.js +1 -315
- package/dist/harness/recover.d.ts +1 -1
- package/dist/harness/recover.js +1 -139
- package/dist/harness/types.d.ts +2 -3
- package/dist/harness/types.js +1 -1
- package/dist/harness/verify.js +1 -237
- package/dist/index.js +1 -273
- package/dist/intent/enrich.js +1 -67
- package/dist/intent/index.js +1 -60
- package/dist/intent/matcher.js +1 -81
- package/dist/intent/store.js +1 -55
- package/dist/intent/types.js +1 -10
- package/dist/knowledge/acquisition-flywheel.js +1 -192
- package/dist/knowledge/allocation-confirm.js +1 -534
- package/dist/knowledge/allocation-context.js +1 -249
- package/dist/knowledge/allocation-ledger.js +1 -463
- package/dist/knowledge/allocation-puzzle.js +1 -298
- package/dist/knowledge/allocation-risk.js +1 -568
- package/dist/knowledge/allocation-templates.js +1 -970
- package/dist/knowledge/allocation-translation.js +1 -585
- package/dist/knowledge/anti-cheat.d.ts +37 -0
- package/dist/knowledge/anti-cheat.js +1 -0
- package/dist/knowledge/arb-confirm.d.ts +28 -0
- package/dist/knowledge/arb-confirm.js +1 -0
- package/dist/knowledge/arb-risk.js +1 -210
- package/dist/knowledge/arb-translation.d.ts +48 -0
- package/dist/knowledge/arb-translation.js +1 -0
- package/dist/knowledge/arbitration-confirm.js +1 -559
- package/dist/knowledge/arbitration-context.js +1 -505
- package/dist/knowledge/arbitration-ledger.js +1 -521
- package/dist/knowledge/arbitration-puzzle.js +1 -304
- package/dist/knowledge/arbitration-risk.js +1 -423
- package/dist/knowledge/arbitration-templates.js +1 -276
- package/dist/knowledge/arbitration-translation.js +1 -487
- package/dist/knowledge/audit-rules.js +1 -141
- package/dist/knowledge/bridge-confirm.d.ts +26 -0
- package/dist/knowledge/bridge-confirm.js +1 -0
- package/dist/knowledge/bridge-risk.js +1 -263
- package/dist/knowledge/bridge-translation.d.ts +37 -0
- package/dist/knowledge/bridge-translation.js +1 -0
- package/dist/knowledge/contact-confirm.d.ts +27 -0
- package/dist/knowledge/contact-confirm.js +1 -0
- package/dist/knowledge/contact-risk.js +1 -200
- package/dist/knowledge/contact-templates.js +1 -60
- package/dist/knowledge/contact-translation.d.ts +39 -0
- package/dist/knowledge/contact-translation.js +1 -0
- package/dist/knowledge/demand-confirm.js +1 -206
- package/dist/knowledge/demand-context.d.ts +17 -0
- package/dist/knowledge/demand-context.js +1 -0
- package/dist/knowledge/demand-ledger.d.ts +26 -0
- package/dist/knowledge/demand-ledger.js +1 -0
- package/dist/knowledge/demand-matching.js +1 -132
- package/dist/knowledge/demand-puzzle.d.ts +29 -0
- package/dist/knowledge/demand-puzzle.js +1 -0
- package/dist/knowledge/demand-risk.js +1 -240
- package/dist/knowledge/demand-templates.d.ts +12 -0
- package/dist/knowledge/demand-templates.js +1 -0
- package/dist/knowledge/demand-translation.js +1 -354
- package/dist/knowledge/deployment-scanner.js +1 -823
- package/dist/knowledge/dynamic-pricing.js +1 -87
- package/dist/knowledge/evidence-review.d.ts +12 -0
- package/dist/knowledge/evidence-review.js +1 -0
- package/dist/knowledge/examples-scanner-cli.js +1 -26
- package/dist/knowledge/examples-scanner.js +1 -843
- package/dist/knowledge/flywheel-loop.d.ts +0 -1
- package/dist/knowledge/flywheel-loop.js +1 -404
- package/dist/knowledge/fund-layer.js +1 -973
- package/dist/knowledge/glossary.js +1 -211
- package/dist/knowledge/guard-confirm.js +1 -406
- package/dist/knowledge/guard-context.js +1 -287
- package/dist/knowledge/guard-design-patterns.js +1 -360
- package/dist/knowledge/guard-ledger.js +1 -260
- package/dist/knowledge/guard-lint.js +1 -670
- package/dist/knowledge/guard-migration.d.ts +1 -1
- package/dist/knowledge/guard-migration.js +1 -228
- package/dist/knowledge/guard-puzzle.js +1 -805
- package/dist/knowledge/guard-render.js +1 -700
- package/dist/knowledge/guard-risk.js +1 -1879
- package/dist/knowledge/guard-submission-prompt.js +1 -171
- package/dist/knowledge/guard-templates.js +1 -1105
- package/dist/knowledge/guard-translation.js +1 -1119
- package/dist/knowledge/index.d.ts +71 -3
- package/dist/knowledge/index.js +1 -436
- package/dist/knowledge/industry-evolution.js +1 -323
- package/dist/knowledge/industry-generalizer.js +1 -381
- package/dist/knowledge/industry-registry.js +1 -174
- package/dist/knowledge/intent-metrics.d.ts +4 -3
- package/dist/knowledge/intent-metrics.js +1 -566
- package/dist/knowledge/machine-confirm.js +1 -559
- package/dist/knowledge/machine-context.js +1 -833
- package/dist/knowledge/machine-ledger.js +1 -338
- package/dist/knowledge/machine-puzzle.js +1 -494
- package/dist/knowledge/machine-render.js +1 -565
- package/dist/knowledge/machine-risk.js +1 -669
- package/dist/knowledge/machine-templates.js +1 -1597
- package/dist/knowledge/machine-topology.js +1 -234
- package/dist/knowledge/machine-translation.js +1 -513
- package/dist/knowledge/market-metrics.d.ts +12 -0
- package/dist/knowledge/market-metrics.js +1 -0
- package/dist/knowledge/market-operations.d.ts +46 -0
- package/dist/knowledge/market-operations.js +1 -0
- package/dist/knowledge/mcp-schema-audit-cli.js +1 -45
- package/dist/knowledge/mcp-schema-audit.d.ts +22 -22
- package/dist/knowledge/mcp-schema-audit.js +1 -777
- package/dist/knowledge/onchain-constants.js +1 -35
- package/dist/knowledge/order-confirm.js +1 -573
- package/dist/knowledge/order-context.js +1 -390
- package/dist/knowledge/order-ledger.js +1 -341
- package/dist/knowledge/order-puzzle.js +1 -255
- package/dist/knowledge/order-risk.js +1 -653
- package/dist/knowledge/order-templates.js +1 -368
- package/dist/knowledge/order-translation.js +1 -550
- package/dist/knowledge/overrides-loader.js +1 -65
- package/dist/knowledge/passport-confirm.js +1 -531
- package/dist/knowledge/passport-context.js +1 -306
- package/dist/knowledge/passport-ledger.js +1 -282
- package/dist/knowledge/passport-puzzle.js +1 -333
- package/dist/knowledge/passport-risk.js +1 -450
- package/dist/knowledge/passport-templates.js +1 -568
- package/dist/knowledge/passport-translation.js +1 -516
- package/dist/knowledge/payment-confirm.d.ts +26 -0
- package/dist/knowledge/payment-confirm.js +1 -0
- package/dist/knowledge/payment-risk.js +1 -249
- package/dist/knowledge/payment-translation.d.ts +37 -0
- package/dist/knowledge/payment-translation.js +1 -0
- package/dist/knowledge/permission-confirm.js +1 -426
- package/dist/knowledge/permission-context.js +1 -224
- package/dist/knowledge/permission-ledger.d.ts +11 -0
- package/dist/knowledge/permission-ledger.js +1 -403
- package/dist/knowledge/permission-puzzle.js +1 -173
- package/dist/knowledge/permission-risk.js +1 -411
- package/dist/knowledge/permission-templates.js +1 -234
- package/dist/knowledge/permission-translation.js +1 -350
- package/dist/knowledge/personal-confirm.d.ts +29 -0
- package/dist/knowledge/personal-confirm.js +1 -0
- package/dist/knowledge/personal-risk.js +1 -212
- package/dist/knowledge/personal-translation.d.ts +37 -0
- package/dist/knowledge/personal-translation.js +1 -0
- package/dist/knowledge/process-model.d.ts +1 -11
- package/dist/knowledge/process-model.js +1 -160
- package/dist/knowledge/progress-confirm.js +1 -456
- package/dist/knowledge/progress-context.js +1 -452
- package/dist/knowledge/progress-ledger.js +1 -330
- package/dist/knowledge/progress-puzzle.js +1 -219
- package/dist/knowledge/progress-risk.js +1 -461
- package/dist/knowledge/progress-templates.js +1 -228
- package/dist/knowledge/progress-translation.js +1 -405
- package/dist/knowledge/proof-confirm.js +1 -187
- package/dist/knowledge/proof-context.d.ts +17 -0
- package/dist/knowledge/proof-context.js +1 -0
- package/dist/knowledge/proof-ledger.d.ts +34 -0
- package/dist/knowledge/proof-ledger.js +1 -0
- package/dist/knowledge/proof-puzzle.d.ts +35 -0
- package/dist/knowledge/proof-puzzle.js +1 -0
- package/dist/knowledge/proof-risk.js +1 -207
- package/dist/knowledge/proof-templates.d.ts +22 -0
- package/dist/knowledge/proof-templates.js +1 -0
- package/dist/knowledge/proof-translation.js +1 -283
- package/dist/knowledge/registrar-confirm.d.ts +26 -0
- package/dist/knowledge/registrar-confirm.js +1 -0
- package/dist/knowledge/registrar-risk.js +1 -217
- package/dist/knowledge/registrar-translation.d.ts +37 -0
- package/dist/knowledge/registrar-translation.js +1 -0
- package/dist/knowledge/repository-confirm.js +1 -286
- package/dist/knowledge/repository-context.d.ts +12 -0
- package/dist/knowledge/repository-context.js +1 -0
- package/dist/knowledge/repository-ledger.d.ts +25 -0
- package/dist/knowledge/repository-ledger.js +1 -0
- package/dist/knowledge/repository-puzzle.d.ts +30 -0
- package/dist/knowledge/repository-puzzle.js +1 -0
- package/dist/knowledge/repository-risk.js +1 -373
- package/dist/knowledge/repository-templates.d.ts +14 -0
- package/dist/knowledge/repository-templates.js +1 -0
- package/dist/knowledge/repository-translation.js +1 -445
- package/dist/knowledge/reputation-rules.js +1 -99
- package/dist/knowledge/resource-confirm.d.ts +25 -0
- package/dist/knowledge/resource-confirm.js +1 -0
- package/dist/knowledge/resource-risk.js +1 -157
- package/dist/knowledge/resource-translation.d.ts +37 -0
- package/dist/knowledge/resource-translation.js +1 -0
- package/dist/knowledge/reward-confirm.js +1 -526
- package/dist/knowledge/reward-context.d.ts +2 -2
- package/dist/knowledge/reward-context.js +1 -504
- package/dist/knowledge/reward-ledger.js +1 -502
- package/dist/knowledge/reward-puzzle.js +1 -300
- package/dist/knowledge/reward-risk.js +1 -627
- package/dist/knowledge/reward-templates.js +1 -197
- package/dist/knowledge/reward-translation.js +1 -501
- package/dist/knowledge/safety-rules.d.ts +1 -0
- package/dist/knowledge/safety-rules.js +1 -404
- package/dist/knowledge/scenario-modes.js +1 -321
- package/dist/knowledge/service-confirm.js +1 -807
- package/dist/knowledge/service-context.js +1 -403
- package/dist/knowledge/service-ledger.js +1 -609
- package/dist/knowledge/service-puzzle.js +1 -236
- package/dist/knowledge/service-risk.d.ts +1 -1
- package/dist/knowledge/service-risk.js +1 -651
- package/dist/knowledge/service-templates.js +1 -456
- package/dist/knowledge/service-translation.js +1 -622
- package/dist/knowledge/template-registry.js +1 -353
- package/dist/knowledge/tool-constraints.js +1 -195
- package/dist/knowledge/tools-reference.js +1 -178
- package/dist/knowledge/treasury-confirm.js +1 -512
- package/dist/knowledge/treasury-context.js +1 -363
- package/dist/knowledge/treasury-ledger.js +1 -300
- package/dist/knowledge/treasury-puzzle.js +1 -216
- package/dist/knowledge/treasury-risk.js +1 -440
- package/dist/knowledge/treasury-templates.js +1 -358
- package/dist/knowledge/treasury-translation.js +1 -498
- package/dist/knowledge/trust-metrics.js +1 -198
- package/dist/knowledge/universal-template.d.ts +22 -0
- package/dist/knowledge/universal-template.js +1 -0
- package/dist/knowledge/util-confirm.d.ts +24 -0
- package/dist/knowledge/util-confirm.js +1 -0
- package/dist/knowledge/util-risk.js +1 -135
- package/dist/knowledge/util-translation.d.ts +38 -0
- package/dist/knowledge/util-translation.js +1 -0
- package/dist/knowledge/workflow-guidance.d.ts +116 -0
- package/dist/knowledge/workflow-guidance.js +1 -0
- package/dist/loop-engineering/aggregate.js +1 -132
- package/dist/loop-engineering/context-collect.js +1 -83
- package/dist/loop-engineering/diagnose.js +1 -273
- package/dist/loop-engineering/improve.js +1 -405
- package/dist/loop-engineering/index.js +1 -4
- package/dist/loop-engineering/pipeline.js +1 -56
- package/dist/mode-market/index.js +1 -3
- package/dist/mode-market/registry.js +1 -124
- package/dist/mode-market/review.js +1 -214
- package/dist/mode-market/submission.js +1 -85
- package/dist/participation/collaborator-interest.d.ts +23 -0
- package/dist/participation/collaborator-interest.js +1 -0
- package/dist/participation/customer-interest.d.ts +25 -0
- package/dist/participation/customer-interest.js +1 -0
- package/dist/participation/employee-kpi.d.ts +25 -0
- package/dist/participation/employee-kpi.js +1 -0
- package/dist/participation/employee-store.d.ts +16 -0
- package/dist/participation/employee-store.js +1 -0
- package/dist/participation/index.d.ts +2 -0
- package/dist/participation/index.js +1 -0
- package/dist/participation/merchant-interest.js +1 -100
- package/dist/participation/radar-core.d.ts +13 -3
- package/dist/participation/radar-core.js +1 -269
- package/dist/participation/supplier-interest.d.ts +25 -0
- package/dist/participation/supplier-interest.js +1 -0
- package/dist/persona/analyzer.js +1 -66
- package/dist/persona/bridge.js +1 -86
- package/dist/persona/defaults.js +1 -195
- package/dist/persona/experience-bridge.js +1 -23
- package/dist/persona/index.d.ts +9 -2
- package/dist/persona/index.js +1 -71
- package/dist/persona/local-region.d.ts +20 -0
- package/dist/persona/local-region.js +1 -0
- package/dist/persona/model.js +1 -111
- package/dist/persona/overrides.d.ts +10 -0
- package/dist/persona/overrides.js +1 -0
- package/dist/persona/pack-personae.d.ts +11 -0
- package/dist/persona/pack-personae.js +1 -0
- package/dist/persona/store.js +1 -62
- package/dist/persona/strategy-intent.d.ts +20 -0
- package/dist/persona/strategy-intent.js +1 -0
- package/dist/persona/types.d.ts +6 -2
- package/dist/persona/types.js +1 -5
- package/dist/project/business-puzzle.d.ts +1 -1
- package/dist/project/business-puzzle.js +1 -383
- package/dist/project/context-assembly.js +1 -254
- package/dist/project/deployment-bridge.js +1 -120
- package/dist/project/deployment-doc.js +1 -1126
- package/dist/project/edit-planner.js +1 -1342
- package/dist/project/evaluation.d.ts +37 -1
- package/dist/project/evaluation.js +1 -2011
- package/dist/project/game-theory.js +1 -177
- package/dist/project/graph-builder.js +1 -656
- package/dist/project/graph.d.ts +3 -6
- package/dist/project/graph.js +1 -340
- package/dist/project/handlers.d.ts +33 -2
- package/dist/project/handlers.js +1 -1784
- package/dist/project/index.d.ts +2 -0
- package/dist/project/index.js +1 -301
- package/dist/project/intent-analyzer.js +1 -149
- package/dist/project/machine-nodes.js +1 -36
- package/dist/project/merchant-guide.d.ts +19 -0
- package/dist/project/merchant-guide.js +1 -264
- package/dist/project/migration.js +1 -125
- package/dist/project/mode-actions.js +1 -309
- package/dist/project/namespace.js +1 -206
- package/dist/project/participation-radar.js +1 -428
- package/dist/project/pipeline-actions.js +1 -109
- package/dist/project/project-store.js +1 -422
- package/dist/project/query.js +1 -153
- package/dist/project/reverse-mapping.d.ts +34 -0
- package/dist/project/reverse-mapping.js +1 -0
- package/dist/project/risk-aggregator.js +1 -295
- package/dist/project/rollback-policy.js +1 -290
- package/dist/project/semantic-assembler.js +1 -345
- package/dist/project/semantic-graph.d.ts +3 -5
- package/dist/project/semantic-graph.js +1 -292
- package/dist/project/stage-gate.js +1 -369
- package/dist/project/substep-trace.js +1 -332
- package/dist/project/task-tracker.js +1 -78
- package/dist/project/workflow-design-assessment.d.ts +24 -0
- package/dist/project/workflow-design-assessment.js +1 -0
- package/dist/role/derivation.d.ts +18 -0
- package/dist/role/derivation.js +1 -0
- package/dist/role/index.d.ts +5 -0
- package/dist/role/index.js +1 -0
- package/dist/role/model.d.ts +8 -0
- package/dist/role/model.js +1 -0
- package/dist/role/resolution.d.ts +11 -0
- package/dist/role/resolution.js +1 -0
- package/dist/role/types.d.ts +11 -0
- package/dist/role/types.js +1 -0
- package/dist/rules.js +1 -52
- package/dist/safety/confirm-gate.d.ts +1 -1
- package/dist/safety/confirm-gate.js +1 -88
- package/dist/safety/index.js +1 -3
- package/dist/safety/preview.js +1 -52
- package/dist/schema/call/allocation.d.ts +186 -1385
- package/dist/schema/call/allocation.js +1 -34
- package/dist/schema/call/arbitration.d.ts +272 -1871
- package/dist/schema/call/arbitration.js +1 -113
- package/dist/schema/call/base.d.ts +1831 -9076
- package/dist/schema/call/base.js +1 -370
- package/dist/schema/call/bridge.d.ts +911 -3171
- package/dist/schema/call/bridge.js +1 -458
- package/dist/schema/call/contact.d.ts +135 -931
- package/dist/schema/call/contact.js +1 -37
- package/dist/schema/call/demand.d.ts +164 -1194
- package/dist/schema/call/demand.js +1 -47
- package/dist/schema/call/guard.d.ts +298 -1140
- package/dist/schema/call/guard.js +1 -161
- package/dist/schema/call/handler.js +1 -322
- package/dist/schema/call/index.js +1 -20
- package/dist/schema/call/machine.d.ts +459 -5403
- package/dist/schema/call/machine.js +1 -193
- package/dist/schema/call/order.d.ts +137 -844
- package/dist/schema/call/order.js +1 -35
- package/dist/schema/call/payment.d.ts +74 -561
- package/dist/schema/call/payment.js +1 -37
- package/dist/schema/call/permission-handler.js +1 -54
- package/dist/schema/call/permission.d.ts +335 -2791
- package/dist/schema/call/permission.js +1 -105
- package/dist/schema/call/personal.d.ts +227 -1814
- package/dist/schema/call/personal.js +1 -78
- package/dist/schema/call/progress.d.ts +140 -843
- package/dist/schema/call/progress.js +1 -47
- package/dist/schema/call/proof.d.ts +42 -258
- package/dist/schema/call/proof.js +1 -33
- package/dist/schema/call/repository.d.ts +324 -2222
- package/dist/schema/call/repository.js +1 -77
- package/dist/schema/call/reward.d.ts +153 -1183
- package/dist/schema/call/reward.js +1 -30
- package/dist/schema/call/semantic.js +1 -1679
- package/dist/schema/call/service.d.ts +376 -3431
- package/dist/schema/call/service.js +1 -184
- package/dist/schema/call/treasury.d.ts +252 -2158
- package/dist/schema/call/treasury.js +1 -71
- package/dist/schema/common/index.d.ts +222 -697
- package/dist/schema/common/index.js +1 -407
- package/dist/schema/config/index.d.ts +18 -161
- package/dist/schema/config/index.js +1 -68
- package/dist/schema/employee/index.d.ts +99 -0
- package/dist/schema/employee/index.js +1 -0
- package/dist/schema/evaluation/index.d.ts +1062 -3748
- package/dist/schema/evaluation/index.js +1 -356
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.js +1 -17
- package/dist/schema/industry-pack/index.d.ts +132 -0
- package/dist/schema/industry-pack/index.js +1 -0
- package/dist/schema/intent-radar/index.d.ts +92 -245
- package/dist/schema/intent-radar/index.js +1 -89
- package/dist/schema/local/index.d.ts +2045 -18080
- package/dist/schema/local/index.js +1 -927
- package/dist/schema/local/wip.d.ts +61 -651
- package/dist/schema/local/wip.js +1 -187
- package/dist/schema/messenger/index.d.ts +949 -5557
- package/dist/schema/messenger/index.js +1 -475
- package/dist/schema/operations.d.ts +2969 -26518
- package/dist/schema/operations.js +1 -520
- package/dist/schema/persona/index.d.ts +469 -1820
- package/dist/schema/persona/index.js +1 -148
- package/dist/schema/project/index.d.ts +1027 -8408
- package/dist/schema/project/index.js +1 -2057
- package/dist/schema/query/index.d.ts +12041 -75261
- package/dist/schema/query/index.js +1 -1646
- package/dist/schema/schema-query/index.d.ts +35 -98
- package/dist/schema/schema-query/index.js +1 -104
- package/dist/schema/schema-version.js +1 -76
- package/dist/schema/task-status.d.ts +26 -132
- package/dist/schema/task-status.js +1 -36
- package/dist/schema/trust/index.d.ts +194 -1290
- package/dist/schema/trust/index.js +1 -314
- package/dist/schema/utils/guard-parser.js +1 -419
- package/dist/schema/utils/guard-query-utils.js +1 -46
- package/dist/schema/utils/node-parser.js +1 -369
- package/dist/schema/utils/object-type-utils.js +1 -35
- package/dist/schema/utils/permission-index-utils.js +1 -7
- package/dist/schema/utils/permission-machine-check.js +1 -121
- package/dist/schema/utils/skills-recommendation.d.ts +1 -0
- package/dist/schema/utils/skills-recommendation.js +1 -77
- package/dist/schema/workspace/index.d.ts +69 -0
- package/dist/schema/workspace/index.js +1 -0
- package/dist/schema-query-impl/index.js +1 -0
- package/dist/schemas/account_operation.output.json +3147 -1652
- package/dist/schemas/account_operation.schema.json +225 -218
- package/dist/schemas/bridge_operation.output.json +1168 -650
- package/dist/schemas/bridge_operation.schema.json +736 -504
- package/dist/schemas/config_operation.output.json +185 -179
- package/dist/schemas/config_operation.schema.json +21 -26
- package/dist/schemas/employee_operation.output.json +207 -0
- package/dist/schemas/employee_operation.schema.json +176 -0
- package/dist/schemas/evaluation_operation.output.json +2329 -557
- package/dist/schemas/evaluation_operation.schema.json +2939 -720
- package/dist/schemas/guard2file.output.json +58 -64
- package/dist/schemas/guard2file.schema.json +79 -81
- package/dist/schemas/index.json +29 -11
- package/dist/schemas/industry_pack_operation.output.json +594 -0
- package/dist/schemas/industry_pack_operation.schema.json +55 -0
- package/dist/schemas/intent_radar.output.json +275 -200
- package/dist/schemas/intent_radar.schema.json +124 -123
- package/dist/schemas/local_info_operation.output.json +1174 -657
- package/dist/schemas/local_info_operation.schema.json +119 -125
- package/dist/schemas/local_mark_operation.output.json +1239 -689
- package/dist/schemas/local_mark_operation.schema.json +91 -96
- package/dist/schemas/machineNode2file.output.json +63 -69
- package/dist/schemas/machineNode2file.schema.json +79 -81
- package/dist/schemas/messenger_operation.output.json +2722 -1528
- package/dist/schemas/messenger_operation.schema.json +1482 -1264
- package/dist/schemas/onchain_events.output.json +2590 -975
- package/dist/schemas/onchain_events.schema.json +117 -99
- package/dist/schemas/onchain_operations.output.json +3957 -2309
- package/dist/schemas/onchain_operations.schema.json +20799 -9285
- package/dist/schemas/onchain_operations_allocation.schema.json +172 -108
- package/dist/schemas/onchain_operations_arbitration.schema.json +233 -146
- package/dist/schemas/onchain_operations_contact.schema.json +129 -90
- package/dist/schemas/onchain_operations_demand.schema.json +170 -112
- package/dist/schemas/onchain_operations_gen_passport.schema.json +61 -646
- package/dist/schemas/onchain_operations_gen_proof.schema.json +40 -172
- package/dist/schemas/onchain_operations_guard.schema.json +3765 -294
- package/dist/schemas/onchain_operations_machine.schema.json +537 -164
- package/dist/schemas/onchain_operations_order.schema.json +126 -96
- package/dist/schemas/onchain_operations_payment.schema.json +82 -67
- package/dist/schemas/onchain_operations_permission.schema.json +331 -93
- package/dist/schemas/onchain_operations_personal.schema.json +636 -96
- package/dist/schemas/onchain_operations_progress.schema.json +125 -92
- package/dist/schemas/onchain_operations_proof.schema.json +76 -69
- package/dist/schemas/onchain_operations_repository.schema.json +636 -249
- package/dist/schemas/onchain_operations_reward.schema.json +218 -108
- package/dist/schemas/onchain_operations_service.schema.json +679 -221
- package/dist/schemas/onchain_operations_treasury.schema.json +401 -135
- package/dist/schemas/onchain_table_data.output.json +6018 -2430
- package/dist/schemas/onchain_table_data.schema.json +544 -430
- package/dist/schemas/persona_operation.output.json +1568 -265
- package/dist/schemas/persona_operation.schema.json +346 -202
- package/dist/schemas/project_operation.output.json +6957 -5147
- package/dist/schemas/project_operation.schema.json +1050 -1020
- package/dist/schemas/query_task_status.output.json +195 -99
- package/dist/schemas/query_task_status.schema.json +12 -18
- package/dist/schemas/query_toolkit.output.json +18870 -14566
- package/dist/schemas/query_toolkit.schema.json +614 -522
- package/dist/schemas/schema_query.output.json +127 -129
- package/dist/schemas/schema_query.schema.json +64 -69
- package/dist/schemas/trust_score.output.json +678 -587
- package/dist/schemas/trust_score.schema.json +289 -277
- package/dist/schemas/wip_file.output.json +116 -124
- package/dist/schemas/wip_file.schema.json +142 -143
- package/dist/schemas/workspace_operation.output.json +277 -0
- package/dist/schemas/workspace_operation.schema.json +45 -0
- package/dist/schemas/wowok_buildin_info.output.json +1693 -723
- package/dist/schemas/wowok_buildin_info.schema.json +576 -512
- package/dist/telemetry/index.js +1 -112
- package/dist/telemetry/redact.js +1 -23
- package/dist/telemetry/storage.js +1 -80
- package/dist/tools/handlers/bridge.d.ts +8 -1
- package/dist/tools/handlers/bridge.js +1 -1
- package/dist/tools/handlers/config.js +1 -74
- package/dist/tools/handlers/employee.d.ts +2 -0
- package/dist/tools/handlers/employee.js +1 -0
- package/dist/tools/handlers/evaluation.js +1 -123
- package/dist/tools/handlers/file-export.js +1 -90
- package/dist/tools/handlers/industry-pack.d.ts +2 -0
- package/dist/tools/handlers/industry-pack.js +1 -0
- package/dist/tools/handlers/intent-radar.js +1 -76
- package/dist/tools/handlers/local.js +1 -53
- package/dist/tools/handlers/messenger.js +1 -188
- package/dist/tools/handlers/onchain.js +1 -1180
- package/dist/tools/handlers/persona.js +1 -89
- package/dist/tools/handlers/project.js +1 -211
- package/dist/tools/handlers/query.js +1 -434
- package/dist/tools/handlers/schema-query.js +1 -176
- package/dist/tools/handlers/task-status.js +1 -26
- package/dist/tools/handlers/trust.js +1 -380
- package/dist/tools/handlers/wip.js +1 -90
- package/dist/tools/handlers/workspace.d.ts +2 -0
- package/dist/tools/handlers/workspace.js +1 -0
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.js +1 -1382
- package/dist/tools/retry.js +1 -85
- package/dist/tools/rules-hook.d.ts +1 -1
- package/dist/tools/rules-hook.js +1 -23
- package/dist/tools/shared.d.ts +1 -1
- package/dist/tools/shared.js +1 -130
- package/dist/tools/types.d.ts +2 -1
- package/dist/tools/types.js +1 -1
- package/dist/tools/upgrade-check.d.ts +19 -0
- package/dist/tools/upgrade-check.js +1 -0
- package/dist/tools/wip-deploy-assist.js +1 -306
- package/dist/tools/wrap.js +1 -500
- package/package.json +7 -6
- package/dist/knowledge/arbitration-trust.d.ts +0 -24
- package/dist/knowledge/arbitration-trust.js +0 -117
- package/dist/schema/call/bridge-handler.d.ts +0 -8
- package/dist/schema/call/bridge-handler.js +0 -265
- package/dist/schema/sync-layer4.d.ts +0 -21
- package/dist/schema/sync-layer4.js +0 -286
- package/dist/schema-query/index.js +0 -810
- /package/dist/{schema-query → schema-query-impl}/index.d.ts +0 -0
|
@@ -1,521 +1 @@
|
|
|
1
|
-
export const ARB_STATUS_CODE = {
|
|
2
|
-
Principal_confirming: 0,
|
|
3
|
-
Arbitrator_confirming: 1,
|
|
4
|
-
Voting: 2,
|
|
5
|
-
Arbitrated: 3,
|
|
6
|
-
Objectionable: 4,
|
|
7
|
-
Finished: 5,
|
|
8
|
-
Withdrawn: 6,
|
|
9
|
-
};
|
|
10
|
-
export const ARB_TERMINAL_STATUSES = ["Finished", "Withdrawn"];
|
|
11
|
-
export const ARB_STATUS_ALIASES = {
|
|
12
|
-
created: "Principal_confirming",
|
|
13
|
-
voting: "Voting",
|
|
14
|
-
feedback: "Arbitrator_confirming",
|
|
15
|
-
confirmed: "Arbitrated",
|
|
16
|
-
completed: "Finished",
|
|
17
|
-
reset: "Objectionable",
|
|
18
|
-
disputed: "Withdrawn",
|
|
19
|
-
};
|
|
20
|
-
export const ARBITRATION_PERMISSIONS = [
|
|
21
|
-
{
|
|
22
|
-
index: 350,
|
|
23
|
-
name: "ARBITRATION_NEW",
|
|
24
|
-
description: "Create new Arbitration object",
|
|
25
|
-
governed_operations: ["arbitration::new", "arbitration::new_with_passport"],
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
index: 351,
|
|
29
|
-
name: "ARBITRATION_DESCRIPTION",
|
|
30
|
-
description: "Modify Arbitration description",
|
|
31
|
-
governed_operations: ["arbitration::description_set", "arbitration::description_set_with_passport"],
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
index: 352,
|
|
35
|
-
name: "ARBITRATION_ENDPOINT",
|
|
36
|
-
description: "Reserved placeholder — not used on-chain (SDK commented out)",
|
|
37
|
-
governed_operations: [],
|
|
38
|
-
is_reserved: true,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
index: 353,
|
|
42
|
-
name: "ARBITRATION_LOCATION",
|
|
43
|
-
description: "Set Arbitration location",
|
|
44
|
-
governed_operations: ["arbitration::location_set", "arbitration::location_set_with_passport"],
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
index: 354,
|
|
48
|
-
name: "ARBITRATION_VOTING_GUARD",
|
|
49
|
-
description: "Manage voting_guard list (add / remove / clear) — controls vote weight",
|
|
50
|
-
governed_operations: [
|
|
51
|
-
"arbitration::voting_guard_by_id_add",
|
|
52
|
-
"arbitration::voting_guard_fixed_add",
|
|
53
|
-
"arbitration::voting_guard_remove",
|
|
54
|
-
"arbitration::voting_guard_clear",
|
|
55
|
-
"(+ _with_passport variants)",
|
|
56
|
-
],
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
index: 355,
|
|
60
|
-
name: "ARBITRATION_USAGE_GUARD",
|
|
61
|
-
description: "Set / clear usage_guard — controls who can file disputes",
|
|
62
|
-
governed_operations: [
|
|
63
|
-
"arbitration::usage_guard_set",
|
|
64
|
-
"arbitration::usage_guard_none",
|
|
65
|
-
"(+ _with_passport variants)",
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
index: 356,
|
|
70
|
-
name: "ARBITRATION_PAUSE",
|
|
71
|
-
description: "Pause / resume Arbitration (bPaused default true)",
|
|
72
|
-
governed_operations: ["arbitration::pause", "arbitration::pause_with_passport"],
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
index: 357,
|
|
76
|
-
name: "ARBITRATION_FEE",
|
|
77
|
-
description: "Set dispute application fee (u64)",
|
|
78
|
-
governed_operations: ["arbitration::fee_set", "arbitration::fee_set_with_passport"],
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
index: 358,
|
|
82
|
-
name: "ARBITRATION_VOTE",
|
|
83
|
-
description: "Open vote (no voting_guard configured — 1 person 1 vote)",
|
|
84
|
-
governed_operations: ["arbitration::vote", "arbitration::vote_with_passport"],
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
index: 359,
|
|
88
|
-
name: "ARBITRATION_ARBITRATION",
|
|
89
|
-
description: "Make definitive arbitration ruling (with indemnity)",
|
|
90
|
-
governed_operations: ["arbitration::arbitration", "arbitration::arbitration_with_passport"],
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
index: 360,
|
|
94
|
-
name: "ARBITRATION_FEEDBACK",
|
|
95
|
-
description: "Provide feedback on Arb case",
|
|
96
|
-
governed_operations: ["arbitration::feedback", "arbitration::feedback_with_passport"],
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
index: 361,
|
|
100
|
-
name: "ARBITRATION_CONFIRM",
|
|
101
|
-
description: "Confirm materials submitted by principal (starts voting phase)",
|
|
102
|
-
governed_operations: ["arbitration::confirm", "arbitration::confirm_with_passport"],
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
index: 362,
|
|
106
|
-
name: "ARBITRATION_VOTING_DEADLINE_CHANGE",
|
|
107
|
-
description: "Change voting deadline for an Arb case",
|
|
108
|
-
governed_operations: ["arbitration::voting_deadline_change", "arbitration::voting_deadline_change_with_passport"],
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
index: 363,
|
|
112
|
-
name: "ARBITRATION_RESET",
|
|
113
|
-
description: "Reset arbitration — principal resubmits materials, restart lifecycle",
|
|
114
|
-
governed_operations: ["arbitration::reset", "arbitration::reset_with_passport"],
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
index: 364,
|
|
118
|
-
name: "ARBITRATION_ARB_WITHDRAW",
|
|
119
|
-
description: "Withdraw arbitration fees from Arb into Arbitration.balance",
|
|
120
|
-
governed_operations: ["arbitration::arb_withdraw", "arbitration::arb_withdraw_with_passport"],
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
index: 365,
|
|
124
|
-
name: "ARBITRATION_FEES_ALLOC",
|
|
125
|
-
description: "Allocate arbitration fees to Allocation object",
|
|
126
|
-
governed_operations: ["arbitration::fees_alloc", "arbitration::fees_alloc_with_passport"],
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
index: 366,
|
|
130
|
-
name: "ARBITRATION_FEES_TRANSFER",
|
|
131
|
-
description: "Transfer arbitration fees to Treasury object",
|
|
132
|
-
governed_operations: ["arbitration::fees_transfer", "arbitration::fees_transfer_with_passport"],
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
index: 367,
|
|
136
|
-
name: "ARBITRATION_OWNER_RECEIVE",
|
|
137
|
-
description: "Owner receive (unwrap received Coin/Object and send to Permission owner)",
|
|
138
|
-
governed_operations: ["arbitration::owner_receive", "arbitration::owner_receive_object"],
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
index: 368,
|
|
142
|
-
name: "ARBITRATION_UM",
|
|
143
|
-
description: "Set / clear User Manager (Contact object)",
|
|
144
|
-
governed_operations: ["arbitration::um_set", "arbitration::um_none", "(+ _with_passport variants)"],
|
|
145
|
-
},
|
|
146
|
-
];
|
|
147
|
-
export const DUAL_GUARD_MATRIX = [
|
|
148
|
-
{
|
|
149
|
-
voting_guard_empty: true,
|
|
150
|
-
usage_guard_none: true,
|
|
151
|
-
dispute_method: "dispute",
|
|
152
|
-
vote_method: "vote",
|
|
153
|
-
scenario: "Open dispute + open voting (1 person 1 vote)",
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
voting_guard_empty: true,
|
|
157
|
-
usage_guard_none: false,
|
|
158
|
-
dispute_method: "dispute_with_passport",
|
|
159
|
-
vote_method: "vote",
|
|
160
|
-
scenario: "Restricted dispute + open voting",
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
voting_guard_empty: false,
|
|
164
|
-
usage_guard_none: true,
|
|
165
|
-
dispute_method: "dispute",
|
|
166
|
-
vote_method: "vote_with_voting_guard",
|
|
167
|
-
scenario: "Open dispute + weighted voting",
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
voting_guard_empty: false,
|
|
171
|
-
usage_guard_none: false,
|
|
172
|
-
dispute_method: "dispute_with_passport",
|
|
173
|
-
vote_method: "vote_with_voting_guard",
|
|
174
|
-
scenario: "Restricted dispute + weighted voting (most controlled)",
|
|
175
|
-
},
|
|
176
|
-
];
|
|
177
|
-
export const ARBITRATION_SCENES = [
|
|
178
|
-
{
|
|
179
|
-
id: "arbitration_create",
|
|
180
|
-
name: "Create new Arbitration service",
|
|
181
|
-
operation_category: "lifecycle",
|
|
182
|
-
permission_index: 350,
|
|
183
|
-
permission_name: "ARBITRATION_NEW",
|
|
184
|
-
requires_voting_guard: "any",
|
|
185
|
-
requires_usage_guard: "any",
|
|
186
|
-
has_passport_variant: true,
|
|
187
|
-
governed_operations: ["arbitration::new", "arbitration::new_with_passport"],
|
|
188
|
-
common_patterns: [
|
|
189
|
-
"Pre-publish config: create Arbitration + Permission together",
|
|
190
|
-
"bPaused defaults to true — must call pause(false) to enable",
|
|
191
|
-
"Generic T: choose Coin type (e.g. 0x2::wow::WOW) at creation",
|
|
192
|
-
"Registrar affiliation: permission + arbitration linked via Registrar",
|
|
193
|
-
],
|
|
194
|
-
recommended_templates: ["T-AB-01", "T-AB-02"],
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
id: "arbitration_dispute",
|
|
198
|
-
name: "File dispute against an Order (creates Arb case)",
|
|
199
|
-
operation_category: "dispute",
|
|
200
|
-
permission_index: 0,
|
|
201
|
-
permission_name: "(order op permission — no ARBITRATION_* index)",
|
|
202
|
-
required_arb_status: [],
|
|
203
|
-
resulting_arb_status: "Principal_confirming",
|
|
204
|
-
requires_voting_guard: "any",
|
|
205
|
-
requires_usage_guard: "any",
|
|
206
|
-
has_passport_variant: true,
|
|
207
|
-
governed_operations: ["arbitration::dispute", "arbitration::dispute_with_passport"],
|
|
208
|
-
common_patterns: [
|
|
209
|
-
"Fee gate: coin::value(&fee) >= self.fee, else E_FEE_NOT_ENOUGH",
|
|
210
|
-
"Order op permission: order::assert_op_permission(order, ctx) required",
|
|
211
|
-
"Creates independent Arb<T> object with its own lifecycle",
|
|
212
|
-
"If usage_guard is Some → must use dispute_with_passport",
|
|
213
|
-
"Order.dispute list: appends new Arb (max 10 per Order)",
|
|
214
|
-
],
|
|
215
|
-
recommended_templates: ["T-AB-01", "T-AB-03", "T-AB-04"],
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
id: "arbitration_vote",
|
|
219
|
-
name: "Vote on Arb propositions",
|
|
220
|
-
operation_category: "voting",
|
|
221
|
-
permission_index: 358,
|
|
222
|
-
permission_name: "ARBITRATION_VOTE",
|
|
223
|
-
required_arb_status: ["Voting"],
|
|
224
|
-
requires_voting_guard: "any",
|
|
225
|
-
requires_usage_guard: "not_applicable",
|
|
226
|
-
has_passport_variant: true,
|
|
227
|
-
governed_operations: [
|
|
228
|
-
"arbitration::vote",
|
|
229
|
-
"arbitration::vote_with_passport",
|
|
230
|
-
"arbitration::vote_with_voting_guard",
|
|
231
|
-
],
|
|
232
|
-
common_patterns: [
|
|
233
|
-
"Open vote: voting_guard empty → vote() / vote_with_passport()",
|
|
234
|
-
"Weighted vote: voting_guard non-empty → vote_with_voting_guard()",
|
|
235
|
-
"votes: u8 array — index into proposition list (0..N-1)",
|
|
236
|
-
"Mismatch: vote() with non-empty voting_guard → E_VOTING_GUARD_USED",
|
|
237
|
-
"Guard not in list: E_VOTING_GUARD_NOT_FOUND",
|
|
238
|
-
],
|
|
239
|
-
recommended_templates: ["T-AB-02", "T-AB-03"],
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
id: "arbitration_confirm",
|
|
243
|
-
name: "Confirm principal materials and start voting phase",
|
|
244
|
-
operation_category: "ruling",
|
|
245
|
-
permission_index: 361,
|
|
246
|
-
permission_name: "ARBITRATION_CONFIRM",
|
|
247
|
-
required_arb_status: ["Principal_confirming", "Arbitrator_confirming"],
|
|
248
|
-
resulting_arb_status: "Voting",
|
|
249
|
-
requires_voting_guard: "any",
|
|
250
|
-
requires_usage_guard: "not_applicable",
|
|
251
|
-
has_passport_variant: true,
|
|
252
|
-
governed_operations: ["arbitration::confirm", "arbitration::confirm_with_passport"],
|
|
253
|
-
common_patterns: [
|
|
254
|
-
"Transitions Arb from Principal_confirming → Voting",
|
|
255
|
-
"voting_deadline: u64 timestamp_ms (null = no deadline)",
|
|
256
|
-
"Once in Voting, only vote / voting_deadline_change / reset allowed",
|
|
257
|
-
],
|
|
258
|
-
recommended_templates: ["T-AB-01", "T-AB-02"],
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
id: "arbitration_feedback",
|
|
262
|
-
name: "Provide feedback on Arb case",
|
|
263
|
-
operation_category: "ruling",
|
|
264
|
-
permission_index: 360,
|
|
265
|
-
permission_name: "ARBITRATION_FEEDBACK",
|
|
266
|
-
required_arb_status: ["Principal_confirming", "Arbitrator_confirming", "Voting", "Arbitrated", "Objectionable"],
|
|
267
|
-
requires_voting_guard: "not_applicable",
|
|
268
|
-
requires_usage_guard: "not_applicable",
|
|
269
|
-
has_passport_variant: true,
|
|
270
|
-
governed_operations: ["arbitration::feedback", "arbitration::feedback_with_passport"],
|
|
271
|
-
common_patterns: [
|
|
272
|
-
"Feedback is informational — does not change Arb status",
|
|
273
|
-
"Used by principal / arbitrator / voters to attach notes",
|
|
274
|
-
"No state transition; supplements the case record",
|
|
275
|
-
],
|
|
276
|
-
recommended_templates: ["T-AB-01", "T-AB-07"],
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
id: "arbitration_ruling",
|
|
280
|
-
name: "Make definitive arbitration ruling with indemnity",
|
|
281
|
-
operation_category: "ruling",
|
|
282
|
-
permission_index: 359,
|
|
283
|
-
permission_name: "ARBITRATION_ARBITRATION",
|
|
284
|
-
required_arb_status: ["Voting", "Arbitrated", "Objectionable"],
|
|
285
|
-
resulting_arb_status: "Arbitrated",
|
|
286
|
-
requires_voting_guard: "any",
|
|
287
|
-
requires_usage_guard: "not_applicable",
|
|
288
|
-
has_passport_variant: true,
|
|
289
|
-
governed_operations: ["arbitration::arbitration", "arbitration::arbitration_with_passport"],
|
|
290
|
-
common_patterns: [
|
|
291
|
-
"Ruling produces: feedback (string) + indemnity (u64)",
|
|
292
|
-
"indemnity is compensation amount — paid via order::compensate",
|
|
293
|
-
"compensate is public(package) — only order.move can trigger it",
|
|
294
|
-
"Once Arbitrated, case enters Objectionable window (reset possible)",
|
|
295
|
-
],
|
|
296
|
-
recommended_templates: ["T-AB-01", "T-AB-05"],
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
id: "arbitration_reset",
|
|
300
|
-
name: "Reset arbitration — principal resubmits materials",
|
|
301
|
-
operation_category: "ruling",
|
|
302
|
-
permission_index: 363,
|
|
303
|
-
permission_name: "ARBITRATION_RESET",
|
|
304
|
-
required_arb_status: ["Objectionable", "Arbitrated"],
|
|
305
|
-
resulting_arb_status: "Principal_confirming",
|
|
306
|
-
requires_voting_guard: "any",
|
|
307
|
-
requires_usage_guard: "not_applicable",
|
|
308
|
-
has_passport_variant: true,
|
|
309
|
-
governed_operations: ["arbitration::reset", "arbitration::reset_with_passport"],
|
|
310
|
-
common_patterns: [
|
|
311
|
-
"Resets Arb from Objectionable/Arbitrated → Principal_confirming",
|
|
312
|
-
"Used when principal objects to ruling and resubmits materials",
|
|
313
|
-
"Feedback required (string explaining reset reason)",
|
|
314
|
-
"Restart full lifecycle: Principal_confirming → ... → Finished",
|
|
315
|
-
],
|
|
316
|
-
recommended_templates: ["T-AB-07"],
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
id: "arbitration_arb_withdraw",
|
|
320
|
-
name: "Withdraw arbitration fees from Arb into Arbitration.balance",
|
|
321
|
-
operation_category: "fund",
|
|
322
|
-
permission_index: 364,
|
|
323
|
-
permission_name: "ARBITRATION_ARB_WITHDRAW",
|
|
324
|
-
required_arb_status: ["Finished", "Withdrawn"],
|
|
325
|
-
requires_voting_guard: "not_applicable",
|
|
326
|
-
requires_usage_guard: "not_applicable",
|
|
327
|
-
has_passport_variant: true,
|
|
328
|
-
governed_operations: ["arbitration::arb_withdraw", "arbitration::arb_withdraw_with_passport"],
|
|
329
|
-
common_patterns: [
|
|
330
|
-
"Calls arb::withdraw(arb, clock) — moves fees from Arb to Arbitration",
|
|
331
|
-
"Only allowed after Arb reaches terminal state (Finished/Withdrawn)",
|
|
332
|
-
"Increases Arbitration.balance — funds available for fees_alloc/fees_transfer",
|
|
333
|
-
],
|
|
334
|
-
recommended_templates: ["T-AB-06"],
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
id: "arbitration_fees_alloc",
|
|
338
|
-
name: "Allocate arbitration fees to Allocation object",
|
|
339
|
-
operation_category: "fund",
|
|
340
|
-
permission_index: 365,
|
|
341
|
-
permission_name: "ARBITRATION_FEES_ALLOC",
|
|
342
|
-
requires_voting_guard: "not_applicable",
|
|
343
|
-
requires_usage_guard: "not_applicable",
|
|
344
|
-
has_passport_variant: true,
|
|
345
|
-
governed_operations: ["arbitration::fees_alloc", "arbitration::fees_alloc_with_passport"],
|
|
346
|
-
common_patterns: [
|
|
347
|
-
"Destination: Allocation object (parameterized fund distribution)",
|
|
348
|
-
"payment_remark + payment_index: bookkeeping for Payment object",
|
|
349
|
-
"May create new Payment object if newPayment name provided",
|
|
350
|
-
"Triggers balance::withdraw_all — extracts ALL balance",
|
|
351
|
-
],
|
|
352
|
-
recommended_templates: ["T-AB-06"],
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
id: "arbitration_fees_transfer",
|
|
356
|
-
name: "Transfer arbitration fees to Treasury object",
|
|
357
|
-
operation_category: "fund",
|
|
358
|
-
permission_index: 366,
|
|
359
|
-
permission_name: "ARBITRATION_FEES_TRANSFER",
|
|
360
|
-
requires_voting_guard: "not_applicable",
|
|
361
|
-
requires_usage_guard: "not_applicable",
|
|
362
|
-
has_passport_variant: true,
|
|
363
|
-
governed_operations: ["arbitration::fees_transfer", "arbitration::fees_transfer_with_passport"],
|
|
364
|
-
common_patterns: [
|
|
365
|
-
"Destination: Treasury object (general fund pool)",
|
|
366
|
-
"Same bookkeeping as fees_alloc (remark + index + newPayment)",
|
|
367
|
-
"Triggers balance::withdraw_all — extracts ALL balance",
|
|
368
|
-
"Choose Allocation vs Treasury by distribution need",
|
|
369
|
-
],
|
|
370
|
-
recommended_templates: ["T-AB-06"],
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
id: "arbitration_voting_guard_config",
|
|
374
|
-
name: "Configure voting_guard list (add / set / remove / clear)",
|
|
375
|
-
operation_category: "guard",
|
|
376
|
-
permission_index: 354,
|
|
377
|
-
permission_name: "ARBITRATION_VOTING_GUARD",
|
|
378
|
-
requires_voting_guard: "any",
|
|
379
|
-
requires_usage_guard: "not_applicable",
|
|
380
|
-
has_passport_variant: true,
|
|
381
|
-
governed_operations: [
|
|
382
|
-
"arbitration::voting_guard_by_id_add (+ _with_passport)",
|
|
383
|
-
"arbitration::voting_guard_fixed_add (+ _with_passport)",
|
|
384
|
-
"arbitration::voting_guard_remove (+ _with_passport)",
|
|
385
|
-
"arbitration::voting_guard_clear (+ _with_passport)",
|
|
386
|
-
],
|
|
387
|
-
common_patterns: [
|
|
388
|
-
"Max 50 guards: MAX_VOTING_GUARD_COUNT=50 (off-by-one-safe: len<50 allows add)",
|
|
389
|
-
"GuardIdentifier(u8): dynamic weight from Passport submission value",
|
|
390
|
-
"FixedValue(u32): static weight (e.g. 100 votes per holder)",
|
|
391
|
-
"Add same guard twice → updates vote_weight (no duplicate)",
|
|
392
|
-
"op='set' = clear then add; op='add' = append; op='remove' = by address",
|
|
393
|
-
],
|
|
394
|
-
recommended_templates: ["T-AB-02", "T-AB-03"],
|
|
395
|
-
},
|
|
396
|
-
{
|
|
397
|
-
id: "arbitration_usage_guard_config",
|
|
398
|
-
name: "Configure usage_guard (set / clear)",
|
|
399
|
-
operation_category: "guard",
|
|
400
|
-
permission_index: 355,
|
|
401
|
-
permission_name: "ARBITRATION_USAGE_GUARD",
|
|
402
|
-
requires_voting_guard: "not_applicable",
|
|
403
|
-
requires_usage_guard: "any",
|
|
404
|
-
has_passport_variant: true,
|
|
405
|
-
governed_operations: [
|
|
406
|
-
"arbitration::usage_guard_set (+ _with_passport)",
|
|
407
|
-
"arbitration::usage_guard_none (+ _with_passport)",
|
|
408
|
-
],
|
|
409
|
-
common_patterns: [
|
|
410
|
-
"Single guard (Option<address>) — not a list",
|
|
411
|
-
"Some(guard): dispute must use _with_passport variant",
|
|
412
|
-
"None: dispute can use either variant (no passport needed)",
|
|
413
|
-
"Registrar affiliation_change: updates link when guard changes",
|
|
414
|
-
],
|
|
415
|
-
recommended_templates: ["T-AB-04"],
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
id: "arbitration_pause",
|
|
419
|
-
name: "Pause / resume Arbitration service",
|
|
420
|
-
operation_category: "lifecycle",
|
|
421
|
-
permission_index: 356,
|
|
422
|
-
permission_name: "ARBITRATION_PAUSE",
|
|
423
|
-
requires_voting_guard: "not_applicable",
|
|
424
|
-
requires_usage_guard: "not_applicable",
|
|
425
|
-
has_passport_variant: true,
|
|
426
|
-
governed_operations: ["arbitration::pause", "arbitration::pause_with_passport"],
|
|
427
|
-
common_patterns: [
|
|
428
|
-
"bPaused default true — new Arbitration cannot accept disputes",
|
|
429
|
-
"pause(false) to enable, pause(true) to disable",
|
|
430
|
-
"Paused Arbitration rejects dispute (E_PAUSED)",
|
|
431
|
-
"Does not affect already-open Arb cases",
|
|
432
|
-
],
|
|
433
|
-
recommended_templates: ["T-AB-01"],
|
|
434
|
-
},
|
|
435
|
-
];
|
|
436
|
-
export const ARBITRATION_LEDGER_VERSION = "1.0.0";
|
|
437
|
-
export function getScenesByCategory(category) {
|
|
438
|
-
return ARBITRATION_SCENES.filter(s => s.operation_category === category);
|
|
439
|
-
}
|
|
440
|
-
export function findSceneById(id) {
|
|
441
|
-
return ARBITRATION_SCENES.find(s => s.id === id);
|
|
442
|
-
}
|
|
443
|
-
export function findSceneByPermissionIndex(index) {
|
|
444
|
-
return ARBITRATION_SCENES.find(s => s.permission_index === index);
|
|
445
|
-
}
|
|
446
|
-
export function getPermissionByIndex(index) {
|
|
447
|
-
return ARBITRATION_PERMISSIONS.find(p => p.index === index);
|
|
448
|
-
}
|
|
449
|
-
export function getPermissionByName(name) {
|
|
450
|
-
return ARBITRATION_PERMISSIONS.find(p => p.name === name);
|
|
451
|
-
}
|
|
452
|
-
export function isReservedIndex(index) {
|
|
453
|
-
const entry = getPermissionByIndex(index);
|
|
454
|
-
return !!entry?.is_reserved;
|
|
455
|
-
}
|
|
456
|
-
export function isUsedPermissionIndex(index) {
|
|
457
|
-
const entry = getPermissionByIndex(index);
|
|
458
|
-
return !!entry && !entry.is_reserved;
|
|
459
|
-
}
|
|
460
|
-
export function getActivePermissionCount() {
|
|
461
|
-
return ARBITRATION_PERMISSIONS.filter(p => !p.is_reserved).length;
|
|
462
|
-
}
|
|
463
|
-
export function inferSceneFromIntent(intent) {
|
|
464
|
-
const lower = intent.toLowerCase();
|
|
465
|
-
const keywordMap = [
|
|
466
|
-
{ keywords: ["create", "new"], sceneId: "arbitration_create" },
|
|
467
|
-
{ keywords: ["dispute", "file", "complaint"], sceneId: "arbitration_dispute" },
|
|
468
|
-
{ keywords: ["vote", "voting", "decide"], sceneId: "arbitration_vote" },
|
|
469
|
-
{ keywords: ["confirm", "materials"], sceneId: "arbitration_confirm" },
|
|
470
|
-
{ keywords: ["feedback", "opinion"], sceneId: "arbitration_feedback" },
|
|
471
|
-
{ keywords: ["ruling", "arbitration", "verdict"], sceneId: "arbitration_ruling" },
|
|
472
|
-
{ keywords: ["reset", "resubmit"], sceneId: "arbitration_reset" },
|
|
473
|
-
{ keywords: ["arb_withdraw", "withdraw", "withdraw fees"], sceneId: "arbitration_arb_withdraw" },
|
|
474
|
-
{ keywords: ["fees_alloc", "allocate", "allocate fees"], sceneId: "arbitration_fees_alloc" },
|
|
475
|
-
{ keywords: ["fees_transfer", "transfer", "transfer in"], sceneId: "arbitration_fees_transfer" },
|
|
476
|
-
{ keywords: ["voting_guard", "voting guard"], sceneId: "arbitration_voting_guard_config" },
|
|
477
|
-
{ keywords: ["usage_guard", "usage guard"], sceneId: "arbitration_usage_guard_config" },
|
|
478
|
-
{ keywords: ["pause", "enable"], sceneId: "arbitration_pause" },
|
|
479
|
-
];
|
|
480
|
-
for (const { keywords, sceneId } of keywordMap) {
|
|
481
|
-
if (keywords.some(kw => lower.includes(kw.toLowerCase()))) {
|
|
482
|
-
const scene = findSceneById(sceneId);
|
|
483
|
-
if (scene)
|
|
484
|
-
return scene;
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
return undefined;
|
|
488
|
-
}
|
|
489
|
-
export function getDualGuardMatrixEntry(votingGuardEmpty, usageGuardNone) {
|
|
490
|
-
return DUAL_GUARD_MATRIX.find(m => m.voting_guard_empty === votingGuardEmpty && m.usage_guard_none === usageGuardNone);
|
|
491
|
-
}
|
|
492
|
-
export function isValidArbStatusTransition(from, to) {
|
|
493
|
-
const transitions = {
|
|
494
|
-
Principal_confirming: ["Arbitrator_confirming", "Voting"],
|
|
495
|
-
Arbitrator_confirming: ["Voting", "Principal_confirming"],
|
|
496
|
-
Voting: ["Arbitrated"],
|
|
497
|
-
Arbitrated: ["Objectionable", "Finished"],
|
|
498
|
-
Objectionable: ["Principal_confirming", "Finished"],
|
|
499
|
-
Finished: ["Withdrawn"],
|
|
500
|
-
Withdrawn: [],
|
|
501
|
-
};
|
|
502
|
-
return transitions[from]?.includes(to) ?? false;
|
|
503
|
-
}
|
|
504
|
-
export function isTerminalArbStatus(status) {
|
|
505
|
-
return ARB_TERMINAL_STATUSES.includes(status);
|
|
506
|
-
}
|
|
507
|
-
export function getScenesProducingStatus(status) {
|
|
508
|
-
return ARBITRATION_SCENES.filter(s => s.resulting_arb_status === status);
|
|
509
|
-
}
|
|
510
|
-
export function getScenesRequiringStatus(status) {
|
|
511
|
-
return ARBITRATION_SCENES.filter(s => s.required_arb_status?.includes(status));
|
|
512
|
-
}
|
|
513
|
-
export function getArbitrationScenesCount() {
|
|
514
|
-
return ARBITRATION_SCENES.length;
|
|
515
|
-
}
|
|
516
|
-
export function getAllArbitrationPermissions() {
|
|
517
|
-
return [...ARBITRATION_PERMISSIONS];
|
|
518
|
-
}
|
|
519
|
-
export function getActiveArbitrationPermissions() {
|
|
520
|
-
return ARBITRATION_PERMISSIONS.filter(p => !p.is_reserved);
|
|
521
|
-
}
|
|
1
|
+
export const ARB_STATUS_CODE={'Principal_confirming':0x0,'Arbitrator_confirming':0x1,'Voting':0x2,'Arbitrated':0x3,'Objectionable':0x4,'Finished':0x5,'Withdrawn':0x6};export const ARB_TERMINAL_STATUSES=['Finished','Withdrawn'];export const ARB_STATUS_ALIASES={'created':'Principal_confirming','voting':'Voting','feedback':'Arbitrator_confirming','confirmed':'Arbitrated','completed':'Finished','reset':'Objectionable','disputed':'Withdrawn'};export const ARBITRATION_PERMISSIONS=[{'index':0x15e,'name':'ARBITRATION_NEW','description':'Create\x20new\x20Arbitration\x20object','governed_operations':['arbitration::new','arbitration::new_with_passport']},{'index':0x15f,'name':'ARBITRATION_DESCRIPTION','description':'Modify\x20Arbitration\x20description','governed_operations':['arbitration::description_set','arbitration::description_set_with_passport']},{'index':0x160,'name':'ARBITRATION_ENDPOINT','description':'Reserved\x20placeholder\x20—\x20not\x20used\x20on-chain\x20(SDK\x20commented\x20out)','governed_operations':[],'is_reserved':!![]},{'index':0x161,'name':'ARBITRATION_LOCATION','description':'Set\x20Arbitration\x20location','governed_operations':['arbitration::location_set','arbitration::location_set_with_passport']},{'index':0x162,'name':'ARBITRATION_VOTING_GUARD','description':'Manage\x20voting_guard\x20list\x20(add\x20/\x20remove\x20/\x20clear)\x20—\x20controls\x20vote\x20weight','governed_operations':['arbitration::voting_guard_by_id_add','arbitration::voting_guard_fixed_add','arbitration::voting_guard_remove','arbitration::voting_guard_clear','(+\x20_with_passport\x20variants)']},{'index':0x163,'name':'ARBITRATION_USAGE_GUARD','description':'Set\x20/\x20clear\x20usage_guard\x20—\x20controls\x20who\x20can\x20file\x20disputes','governed_operations':['arbitration::usage_guard_set','arbitration::usage_guard_none','(+\x20_with_passport\x20variants)']},{'index':0x164,'name':'ARBITRATION_PAUSE','description':'Pause\x20/\x20resume\x20Arbitration\x20(bPaused\x20default\x20true)','governed_operations':['arbitration::pause','arbitration::pause_with_passport']},{'index':0x165,'name':'ARBITRATION_FEE','description':'Set\x20dispute\x20application\x20fee\x20(u64)','governed_operations':['arbitration::fee_set','arbitration::fee_set_with_passport']},{'index':0x166,'name':'ARBITRATION_VOTE','description':'Open\x20vote\x20(no\x20voting_guard\x20configured\x20—\x201\x20person\x201\x20vote)','governed_operations':['arbitration::vote','arbitration::vote_with_passport']},{'index':0x167,'name':'ARBITRATION_ARBITRATION','description':'Make\x20definitive\x20arbitration\x20ruling\x20(with\x20indemnity)','governed_operations':['arbitration::arbitration','arbitration::arbitration_with_passport']},{'index':0x168,'name':'ARBITRATION_FEEDBACK','description':'Provide\x20feedback\x20on\x20Arb\x20case','governed_operations':['arbitration::feedback','arbitration::feedback_with_passport']},{'index':0x169,'name':'ARBITRATION_CONFIRM','description':'Confirm\x20materials\x20submitted\x20by\x20principal\x20(starts\x20voting\x20phase)','governed_operations':['arbitration::confirm','arbitration::confirm_with_passport']},{'index':0x16a,'name':'ARBITRATION_VOTING_DEADLINE_CHANGE','description':'Change\x20voting\x20deadline\x20for\x20an\x20Arb\x20case','governed_operations':['arbitration::voting_deadline_change','arbitration::voting_deadline_change_with_passport']},{'index':0x16b,'name':'ARBITRATION_RESET','description':'Reset\x20arbitration\x20—\x20principal\x20resubmits\x20materials,\x20restart\x20lifecycle','governed_operations':['arbitration::reset','arbitration::reset_with_passport']},{'index':0x16c,'name':'ARBITRATION_ARB_WITHDRAW','description':'Withdraw\x20arbitration\x20fees\x20from\x20Arb\x20into\x20Arbitration.balance','governed_operations':['arbitration::arb_withdraw','arbitration::arb_withdraw_with_passport']},{'index':0x16d,'name':'ARBITRATION_FEES_ALLOC','description':'Allocate\x20arbitration\x20fees\x20to\x20Allocation\x20object','governed_operations':['arbitration::fees_alloc','arbitration::fees_alloc_with_passport']},{'index':0x16e,'name':'ARBITRATION_FEES_TRANSFER','description':'Transfer\x20arbitration\x20fees\x20to\x20Treasury\x20object','governed_operations':['arbitration::fees_transfer','arbitration::fees_transfer_with_passport']},{'index':0x16f,'name':'ARBITRATION_OWNER_RECEIVE','description':'Owner\x20receive\x20(unwrap\x20received\x20Coin/Object\x20and\x20send\x20to\x20Permission\x20owner)','governed_operations':['arbitration::owner_receive','arbitration::owner_receive_object']},{'index':0x170,'name':'ARBITRATION_UM','description':'Set\x20/\x20clear\x20User\x20Manager\x20(Contact\x20object)','governed_operations':['arbitration::um_set','arbitration::um_none','(+\x20_with_passport\x20variants)']}];export const DUAL_GUARD_MATRIX=[{'voting_guard_empty':!![],'usage_guard_none':!![],'dispute_method':'dispute','vote_method':'vote','scenario':'Open\x20dispute\x20+\x20open\x20voting\x20(1\x20person\x201\x20vote)'},{'voting_guard_empty':!![],'usage_guard_none':![],'dispute_method':'dispute_with_passport','vote_method':'vote','scenario':'Restricted\x20dispute\x20+\x20open\x20voting'},{'voting_guard_empty':![],'usage_guard_none':!![],'dispute_method':'dispute','vote_method':'vote_with_voting_guard','scenario':'Open\x20dispute\x20+\x20weighted\x20voting'},{'voting_guard_empty':![],'usage_guard_none':![],'dispute_method':'dispute_with_passport','vote_method':'vote_with_voting_guard','scenario':'Restricted\x20dispute\x20+\x20weighted\x20voting\x20(most\x20controlled)'}];export const ARBITRATION_SCENES=[{'id':'arbitration_create','name':'Create\x20new\x20Arbitration\x20service','operation_category':'lifecycle','permission_index':0x15e,'permission_name':'ARBITRATION_NEW','requires_voting_guard':'any','requires_usage_guard':'any','has_passport_variant':!![],'governed_operations':['arbitration::new','arbitration::new_with_passport'],'common_patterns':['Pre-publish\x20config:\x20create\x20Arbitration\x20+\x20Permission\x20together','bPaused\x20defaults\x20to\x20true\x20—\x20must\x20call\x20pause(false)\x20to\x20enable','Generic\x20T:\x20choose\x20Coin\x20type\x20(e.g.\x200x2::wow::WOW)\x20at\x20creation','Registrar\x20affiliation:\x20permission\x20+\x20arbitration\x20linked\x20via\x20Registrar'],'recommended_templates':['T-AB-01','T-AB-02']},{'id':'arbitration_dispute','name':'File\x20dispute\x20against\x20an\x20Order\x20(creates\x20Arb\x20case)','operation_category':'dispute','permission_index':0x0,'permission_name':'(order\x20op\x20permission\x20—\x20no\x20ARBITRATION_*\x20index)','required_arb_status':[],'resulting_arb_status':'Principal_confirming','requires_voting_guard':'any','requires_usage_guard':'any','has_passport_variant':!![],'governed_operations':['arbitration::dispute','arbitration::dispute_with_passport'],'common_patterns':['Fee\x20gate:\x20coin::value(&fee)\x20>=\x20self.fee,\x20else\x20E_FEE_NOT_ENOUGH','Order\x20op\x20permission:\x20order::assert_op_permission(order,\x20ctx)\x20required','Creates\x20independent\x20Arb<T>\x20object\x20with\x20its\x20own\x20lifecycle','If\x20usage_guard\x20is\x20Some\x20→\x20must\x20use\x20dispute_with_passport','Order.dispute\x20list:\x20appends\x20new\x20Arb\x20(max\x2010\x20per\x20Order)'],'recommended_templates':['T-AB-01','T-AB-03','T-AB-04']},{'id':'arbitration_vote','name':'Vote\x20on\x20Arb\x20propositions','operation_category':'voting','permission_index':0x166,'permission_name':'ARBITRATION_VOTE','required_arb_status':['Voting'],'requires_voting_guard':'any','requires_usage_guard':'not_applicable','has_passport_variant':!![],'governed_operations':['arbitration::vote','arbitration::vote_with_passport','arbitration::vote_with_voting_guard'],'common_patterns':['Open\x20vote:\x20voting_guard\x20empty\x20→\x20vote()\x20/\x20vote_with_passport()','Weighted\x20vote:\x20voting_guard\x20non-empty\x20→\x20vote_with_voting_guard()','votes:\x20u8\x20array\x20—\x20index\x20into\x20proposition\x20list\x20(0..N-1)','Mismatch:\x20vote()\x20with\x20non-empty\x20voting_guard\x20→\x20E_VOTING_GUARD_USED','Guard\x20not\x20in\x20list:\x20E_VOTING_GUARD_NOT_FOUND'],'recommended_templates':['T-AB-02','T-AB-03']},{'id':'arbitration_confirm','name':'Confirm\x20principal\x20materials\x20and\x20start\x20voting\x20phase','operation_category':'ruling','permission_index':0x169,'permission_name':'ARBITRATION_CONFIRM','required_arb_status':['Principal_confirming','Arbitrator_confirming'],'resulting_arb_status':'Voting','requires_voting_guard':'any','requires_usage_guard':'not_applicable','has_passport_variant':!![],'governed_operations':['arbitration::confirm','arbitration::confirm_with_passport'],'common_patterns':['Transitions\x20Arb\x20from\x20Principal_confirming\x20→\x20Voting','voting_deadline:\x20u64\x20timestamp_ms\x20(null\x20=\x20no\x20deadline)','Once\x20in\x20Voting,\x20only\x20vote\x20/\x20voting_deadline_change\x20/\x20reset\x20allowed'],'recommended_templates':['T-AB-01','T-AB-02']},{'id':'arbitration_feedback','name':'Provide\x20feedback\x20on\x20Arb\x20case','operation_category':'ruling','permission_index':0x168,'permission_name':'ARBITRATION_FEEDBACK','required_arb_status':['Principal_confirming','Arbitrator_confirming','Voting','Arbitrated','Objectionable'],'requires_voting_guard':'not_applicable','requires_usage_guard':'not_applicable','has_passport_variant':!![],'governed_operations':['arbitration::feedback','arbitration::feedback_with_passport'],'common_patterns':['Feedback\x20is\x20informational\x20—\x20does\x20not\x20change\x20Arb\x20status','Used\x20by\x20principal\x20/\x20arbitrator\x20/\x20voters\x20to\x20attach\x20notes','No\x20state\x20transition;\x20supplements\x20the\x20case\x20record'],'recommended_templates':['T-AB-01','T-AB-07']},{'id':'arbitration_ruling','name':'Make\x20definitive\x20arbitration\x20ruling\x20with\x20indemnity','operation_category':'ruling','permission_index':0x167,'permission_name':'ARBITRATION_ARBITRATION','required_arb_status':['Voting','Arbitrated','Objectionable'],'resulting_arb_status':'Arbitrated','requires_voting_guard':'any','requires_usage_guard':'not_applicable','has_passport_variant':!![],'governed_operations':['arbitration::arbitration','arbitration::arbitration_with_passport'],'common_patterns':['Ruling\x20produces:\x20feedback\x20(string)\x20+\x20indemnity\x20(u64)','indemnity\x20is\x20compensation\x20amount\x20—\x20paid\x20via\x20order::compensate','compensate\x20is\x20public(package)\x20—\x20only\x20order.move\x20can\x20trigger\x20it','Once\x20Arbitrated,\x20case\x20enters\x20Objectionable\x20window\x20(reset\x20possible)'],'recommended_templates':['T-AB-01','T-AB-05']},{'id':'arbitration_reset','name':'Reset\x20arbitration\x20—\x20principal\x20resubmits\x20materials','operation_category':'ruling','permission_index':0x16b,'permission_name':'ARBITRATION_RESET','required_arb_status':['Objectionable','Arbitrated'],'resulting_arb_status':'Principal_confirming','requires_voting_guard':'any','requires_usage_guard':'not_applicable','has_passport_variant':!![],'governed_operations':['arbitration::reset','arbitration::reset_with_passport'],'common_patterns':['Resets\x20Arb\x20from\x20Objectionable/Arbitrated\x20→\x20Principal_confirming','Used\x20when\x20principal\x20objects\x20to\x20ruling\x20and\x20resubmits\x20materials','Feedback\x20required\x20(string\x20explaining\x20reset\x20reason)','Restart\x20full\x20lifecycle:\x20Principal_confirming\x20→\x20...\x20→\x20Finished'],'recommended_templates':['T-AB-07']},{'id':'arbitration_arb_withdraw','name':'Withdraw\x20arbitration\x20fees\x20from\x20Arb\x20into\x20Arbitration.balance','operation_category':'fund','permission_index':0x16c,'permission_name':'ARBITRATION_ARB_WITHDRAW','required_arb_status':['Finished','Withdrawn'],'requires_voting_guard':'not_applicable','requires_usage_guard':'not_applicable','has_passport_variant':!![],'governed_operations':['arbitration::arb_withdraw','arbitration::arb_withdraw_with_passport'],'common_patterns':['Calls\x20arb::withdraw(arb,\x20clock)\x20—\x20moves\x20fees\x20from\x20Arb\x20to\x20Arbitration','Only\x20allowed\x20after\x20Arb\x20reaches\x20terminal\x20state\x20(Finished/Withdrawn)','Increases\x20Arbitration.balance\x20—\x20funds\x20available\x20for\x20fees_alloc/fees_transfer'],'recommended_templates':['T-AB-06']},{'id':'arbitration_fees_alloc','name':'Allocate\x20arbitration\x20fees\x20to\x20Allocation\x20object','operation_category':'fund','permission_index':0x16d,'permission_name':'ARBITRATION_FEES_ALLOC','requires_voting_guard':'not_applicable','requires_usage_guard':'not_applicable','has_passport_variant':!![],'governed_operations':['arbitration::fees_alloc','arbitration::fees_alloc_with_passport'],'common_patterns':['Destination:\x20Allocation\x20object\x20(parameterized\x20fund\x20distribution)','payment_remark\x20+\x20payment_index:\x20bookkeeping\x20for\x20Payment\x20object','May\x20create\x20new\x20Payment\x20object\x20if\x20newPayment\x20name\x20provided','Triggers\x20balance::withdraw_all\x20—\x20extracts\x20ALL\x20balance'],'recommended_templates':['T-AB-06']},{'id':'arbitration_fees_transfer','name':'Transfer\x20arbitration\x20fees\x20to\x20Treasury\x20object','operation_category':'fund','permission_index':0x16e,'permission_name':'ARBITRATION_FEES_TRANSFER','requires_voting_guard':'not_applicable','requires_usage_guard':'not_applicable','has_passport_variant':!![],'governed_operations':['arbitration::fees_transfer','arbitration::fees_transfer_with_passport'],'common_patterns':['Destination:\x20Treasury\x20object\x20(general\x20fund\x20pool)','Same\x20bookkeeping\x20as\x20fees_alloc\x20(remark\x20+\x20index\x20+\x20newPayment)','Triggers\x20balance::withdraw_all\x20—\x20extracts\x20ALL\x20balance','Choose\x20Allocation\x20vs\x20Treasury\x20by\x20distribution\x20need'],'recommended_templates':['T-AB-06']},{'id':'arbitration_voting_guard_config','name':'Configure\x20voting_guard\x20list\x20(add\x20/\x20set\x20/\x20remove\x20/\x20clear)','operation_category':'guard','permission_index':0x162,'permission_name':'ARBITRATION_VOTING_GUARD','requires_voting_guard':'any','requires_usage_guard':'not_applicable','has_passport_variant':!![],'governed_operations':['arbitration::voting_guard_by_id_add\x20(+\x20_with_passport)','arbitration::voting_guard_fixed_add\x20(+\x20_with_passport)','arbitration::voting_guard_remove\x20(+\x20_with_passport)','arbitration::voting_guard_clear\x20(+\x20_with_passport)'],'common_patterns':['Max\x2050\x20guards:\x20MAX_VOTING_GUARD_COUNT=50\x20(off-by-one-safe:\x20len<50\x20allows\x20add)','GuardIdentifier(u8):\x20dynamic\x20weight\x20from\x20Passport\x20submission\x20value','FixedValue(u32):\x20static\x20weight\x20(e.g.\x20100\x20votes\x20per\x20holder)','Add\x20same\x20guard\x20twice\x20→\x20updates\x20vote_weight\x20(no\x20duplicate)','op=\x27set\x27\x20=\x20clear\x20then\x20add;\x20op=\x27add\x27\x20=\x20append;\x20op=\x27remove\x27\x20=\x20by\x20address'],'recommended_templates':['T-AB-02','T-AB-03']},{'id':'arbitration_usage_guard_config','name':'Configure\x20usage_guard\x20(set\x20/\x20clear)','operation_category':'guard','permission_index':0x163,'permission_name':'ARBITRATION_USAGE_GUARD','requires_voting_guard':'not_applicable','requires_usage_guard':'any','has_passport_variant':!![],'governed_operations':['arbitration::usage_guard_set\x20(+\x20_with_passport)','arbitration::usage_guard_none\x20(+\x20_with_passport)'],'common_patterns':['Single\x20guard\x20(Option<address>)\x20—\x20not\x20a\x20list','Some(guard):\x20dispute\x20must\x20use\x20_with_passport\x20variant','None:\x20dispute\x20can\x20use\x20either\x20variant\x20(no\x20passport\x20needed)','Registrar\x20affiliation_change:\x20updates\x20link\x20when\x20guard\x20changes'],'recommended_templates':['T-AB-04']},{'id':'arbitration_pause','name':'Pause\x20/\x20resume\x20Arbitration\x20service','operation_category':'lifecycle','permission_index':0x164,'permission_name':'ARBITRATION_PAUSE','requires_voting_guard':'not_applicable','requires_usage_guard':'not_applicable','has_passport_variant':!![],'governed_operations':['arbitration::pause','arbitration::pause_with_passport'],'common_patterns':['bPaused\x20default\x20true\x20—\x20new\x20Arbitration\x20cannot\x20accept\x20disputes','pause(false)\x20to\x20enable,\x20pause(true)\x20to\x20disable','Paused\x20Arbitration\x20rejects\x20dispute\x20(E_PAUSED)','Does\x20not\x20affect\x20already-open\x20Arb\x20cases'],'recommended_templates':['T-AB-01']}];export const ARBITRATION_LEDGER_VERSION='1.0.0';export function getScenesByCategory(a){return ARBITRATION_SCENES['filter'](b=>b['operation_category']===a);}export function findSceneById(a){return ARBITRATION_SCENES['find'](b=>b['id']===a);}export function findSceneByPermissionIndex(a){return ARBITRATION_SCENES['find'](b=>b['permission_index']===a);}export function getPermissionByIndex(a){return ARBITRATION_PERMISSIONS['find'](b=>b['index']===a);}export function getPermissionByName(a){return ARBITRATION_PERMISSIONS['find'](b=>b['name']===a);}export function isReservedIndex(a){const b=getPermissionByIndex(a);return!!b?.['is_reserved'];}export function isUsedPermissionIndex(a){const b=getPermissionByIndex(a);return!!b&&!b['is_reserved'];}export function getActivePermissionCount(){return ARBITRATION_PERMISSIONS['filter'](a=>!a['is_reserved'])['length'];}export function inferSceneFromIntent(a){const b=a['toLowerCase'](),c=[{'keywords':['create','new'],'sceneId':'arbitration_create'},{'keywords':['dispute','file','complaint'],'sceneId':'arbitration_dispute'},{'keywords':['vote','voting','decide'],'sceneId':'arbitration_vote'},{'keywords':['confirm','materials'],'sceneId':'arbitration_confirm'},{'keywords':['feedback','opinion'],'sceneId':'arbitration_feedback'},{'keywords':['ruling','arbitration','verdict'],'sceneId':'arbitration_ruling'},{'keywords':['reset','resubmit'],'sceneId':'arbitration_reset'},{'keywords':['arb_withdraw','withdraw','withdraw\x20fees'],'sceneId':'arbitration_arb_withdraw'},{'keywords':['fees_alloc','allocate','allocate\x20fees'],'sceneId':'arbitration_fees_alloc'},{'keywords':['fees_transfer','transfer','transfer\x20in'],'sceneId':'arbitration_fees_transfer'},{'keywords':['voting_guard','voting\x20guard'],'sceneId':'arbitration_voting_guard_config'},{'keywords':['usage_guard','usage\x20guard'],'sceneId':'arbitration_usage_guard_config'},{'keywords':['pause','enable'],'sceneId':'arbitration_pause'}];for(const {keywords:d,sceneId:e}of c){if(d['some'](f=>b['includes'](f['toLowerCase']()))){const f=findSceneById(e);if(f)return f;}}return undefined;}export function getDualGuardMatrixEntry(a,b){return DUAL_GUARD_MATRIX['find'](c=>c['voting_guard_empty']===a&&c['usage_guard_none']===b);}export function isValidArbStatusTransition(a,b){const c={'Principal_confirming':['Arbitrator_confirming','Voting'],'Arbitrator_confirming':['Voting','Principal_confirming'],'Voting':['Arbitrated'],'Arbitrated':['Objectionable','Finished'],'Objectionable':['Principal_confirming','Finished'],'Finished':['Withdrawn'],'Withdrawn':[]};return c[a]?.['includes'](b)??![];}export function isTerminalArbStatus(a){return ARB_TERMINAL_STATUSES['includes'](a);}export function getScenesProducingStatus(a){return ARBITRATION_SCENES['filter'](b=>b['resulting_arb_status']===a);}export function getScenesRequiringStatus(a){return ARBITRATION_SCENES['filter'](b=>b['required_arb_status']?.['includes'](a));}export function getArbitrationScenesCount(){return ARBITRATION_SCENES['length'];}export function getAllArbitrationPermissions(){return[...ARBITRATION_PERMISSIONS];}export function getActiveArbitrationPermissions(){return ARBITRATION_PERMISSIONS['filter'](a=>!a['is_reserved']);}
|