@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,405 +1 @@
|
|
|
1
|
-
import { isProgressBuiltinPermission, getBuiltinPermissionByIndex, } from "./progress-ledger.js";
|
|
2
|
-
export const PROGRESS_SEMANTIC_TO_SCHEMA_RULES = [
|
|
3
|
-
{
|
|
4
|
-
id: "P-PR-01",
|
|
5
|
-
pattern_name: "Advance Progress (next / order_next)",
|
|
6
|
-
semantic_intent: "Push Progress forward via a Forward definition; accumulate weight, possibly complete session",
|
|
7
|
-
match_keywords: ["next", "advance", "proceed", "complete forward"],
|
|
8
|
-
schema_fields: ["object", "operate(operation, op='next')"],
|
|
9
|
-
example_json: {
|
|
10
|
-
object: "0xPROGRESS_ADDRESS",
|
|
11
|
-
operate: {
|
|
12
|
-
operation: { next_node_name: "shipped", forward: "ship" },
|
|
13
|
-
op: "next",
|
|
14
|
-
message: "Order shipped via FedEx, tracking 12345",
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
reverse_explanation: "operate.op='next' → calls progress::next or order_next (if task bound). " +
|
|
18
|
-
"Move accumulates forward.weight; on reaching threshold, session → history and current = next_node_name. " +
|
|
19
|
-
"⚠ ROUTING RULE: When Forward.namedOperator=\"\" (empty string = OrderHolder), the caller MUST use " +
|
|
20
|
-
"order.progress (not progress.operate) — order_next uses order.has_op_permission which recognizes " +
|
|
21
|
-
"the OrderHolder short-circuit. Direct progress::next will abort with 'Permission denied' (code 5). " +
|
|
22
|
-
"For non-empty namedOperator or permissionIndex-only forwards, use progress.operate directly.",
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
id: "P-PR-02",
|
|
26
|
-
pattern_name: "Hold Progress (block forward)",
|
|
27
|
-
semantic_intent: "Lock a Forward so no one else can advance it until unhold",
|
|
28
|
-
match_keywords: ["hold", "lock", "block", "pause forward"],
|
|
29
|
-
schema_fields: ["object", "operate(operation, op='hold', message)"],
|
|
30
|
-
example_json: {
|
|
31
|
-
object: "0xPROGRESS_ADDRESS",
|
|
32
|
-
operate: {
|
|
33
|
-
operation: { next_node_name: "revision_required", forward: "request_revision" },
|
|
34
|
-
op: "hold",
|
|
35
|
-
message: "Please revise section 3",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
reverse_explanation: "operate.op='hold' → calls progress::hold or order_hold. session_hold sets Holder.who = sender; " +
|
|
39
|
-
"other callers will hit E_NOT_THE_HOLDER if they try to advance.",
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
id: "P-PR-03",
|
|
43
|
-
pattern_name: "Self-unhold (release own hold)",
|
|
44
|
-
semantic_intent: "Release a forward that I previously held",
|
|
45
|
-
match_keywords: ["unhold", "release", "self release"],
|
|
46
|
-
schema_fields: ["object", "operate(operation, op='unhold')"],
|
|
47
|
-
example_json: {
|
|
48
|
-
object: "0xPROGRESS_ADDRESS",
|
|
49
|
-
operate: {
|
|
50
|
-
operation: { next_node_name: "reviewing", forward: "resubmit" },
|
|
51
|
-
op: "unhold",
|
|
52
|
-
message: "Revised content uploaded",
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
reverse_explanation: "operate.op='unhold' → calls progress::hold(bHold=false) or order_hold(bHold=false). " +
|
|
56
|
-
"Move's session_hold releases the lock (sender == Holder.who). " +
|
|
57
|
-
"After release, the forward can be re-locked or accomplished by eligible callers.",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
id: "P-PR-04",
|
|
61
|
-
pattern_name: "Admin force-unhold (224 permission)",
|
|
62
|
-
semantic_intent: "Force-release a held forward using 224 permission, bypassing holder check",
|
|
63
|
-
match_keywords: ["adminUnhold", "force unhold", "admin release"],
|
|
64
|
-
schema_fields: ["object", "operate(operation, op='adminUnhold')"],
|
|
65
|
-
example_json: {
|
|
66
|
-
object: "0xPROGRESS_ADDRESS",
|
|
67
|
-
operate: {
|
|
68
|
-
operation: { next_node_name: "arb_decided", forward: "decide" },
|
|
69
|
-
op: "adminUnhold",
|
|
70
|
-
message: "Admin override: holder unresponsive for 7 days",
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
reverse_explanation: "operate.op='adminUnhold' → calls progress::unhold. Move checks sender_has_permission_idcheck(224); " +
|
|
74
|
-
"if true, force release (bForce=true). If false, falls back to holder-match check.",
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
id: "P-PR-05",
|
|
78
|
-
pattern_name: "Bind task (one-time, immutable)",
|
|
79
|
-
semantic_intent: "Associate an Order/Reward address with this Progress (only once per Progress)",
|
|
80
|
-
match_keywords: ["task_set", "bind task", "set task"],
|
|
81
|
-
schema_fields: ["object", "task"],
|
|
82
|
-
example_json: {
|
|
83
|
-
object: "0xPROGRESS_ADDRESS",
|
|
84
|
-
task: "0xORDER_ADDRESS",
|
|
85
|
-
},
|
|
86
|
-
reverse_explanation: "Calls progress::task_set. Move asserts option::is_none(&self.task); if already set, E_TASK_ALREADY_SET aborts. " +
|
|
87
|
-
"There is NO task_unset — once bound, the Progress is permanently tied to that Order/Reward.",
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: "P-PR-06",
|
|
91
|
-
pattern_name: "Manage context repositories",
|
|
92
|
-
semantic_intent: "Add/remove/clear Repository objects as query context (≤ 30 total)",
|
|
93
|
-
match_keywords: ["repository", "context"],
|
|
94
|
-
schema_fields: ["object", "repository(op, objects)"],
|
|
95
|
-
example_json: {
|
|
96
|
-
object: "0xPROGRESS_ADDRESS",
|
|
97
|
-
repository: { op: "add", objects: ["0xREPO1", "0xREPO2"] },
|
|
98
|
-
},
|
|
99
|
-
reverse_explanation: "op=add: appends (idempotent via vector::contains). op=remove: drops listed addresses. " +
|
|
100
|
-
"op=clear: empties the list. op=set: clears then adds. Count must stay ≤ MAX_CONTEXT_REPOSITORY_COUNT (30).",
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
id: "P-PR-07",
|
|
104
|
-
pattern_name: "Manage named_operator namespace",
|
|
105
|
-
semantic_intent: "Add/set/remove addresses for a named operator role (Forward gate)",
|
|
106
|
-
match_keywords: ["named_operator", "operator"],
|
|
107
|
-
schema_fields: ["object", "progress_namedOperator(op, name, operators)"],
|
|
108
|
-
example_json: {
|
|
109
|
-
object: "0xPROGRESS_ADDRESS",
|
|
110
|
-
progress_namedOperator: {
|
|
111
|
-
op: "add",
|
|
112
|
-
name: "logistics",
|
|
113
|
-
operators: ["0xADDR1", "0xADDR2"],
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
reverse_explanation: "op=add: appends (deduped). op=set: REPLACES the address list. op=remove: drops listed addresses. " +
|
|
117
|
-
"Up to 60 named_operator names per Progress; up to 80 addresses per name.",
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
id: "P-PR-08",
|
|
121
|
-
pattern_name: "Owner receive (terminal node unwrap)",
|
|
122
|
-
semantic_intent: "Owner receives Receiving<K> objects or CoinWrapper<T> coins at a terminal node",
|
|
123
|
-
match_keywords: ["owner_receive", "unwrap", "withdraw"],
|
|
124
|
-
schema_fields: ["(SDK does not expose this in CallProgress_Data — direct move call required)"],
|
|
125
|
-
example_json: {
|
|
126
|
-
_note: "Not exposed in CallProgress_Data; direct Move call:",
|
|
127
|
-
target: "progress::owner_receive<T>",
|
|
128
|
-
arguments: ["progress", "machine", "permission", "received", "payment"],
|
|
129
|
-
},
|
|
130
|
-
reverse_explanation: "Calls progress::owner_receive (225 permission). Unwraps CoinWrapper<T> via Payment.unwrap_with_check, " +
|
|
131
|
-
"forwards coin/object to Permission owner. Typically triggered at terminal nodes (return_approved, completed, enforced).",
|
|
132
|
-
},
|
|
133
|
-
];
|
|
134
|
-
export const PROGRESS_SCHEMA_TO_SEMANTIC_RULES = [
|
|
135
|
-
{
|
|
136
|
-
element_type: "field",
|
|
137
|
-
type_name: "object",
|
|
138
|
-
semantic_explanation: "Progress object address. Always required for operate calls (Progress is created indirectly via service::buy).",
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
element_type: "field",
|
|
142
|
-
type_name: "task",
|
|
143
|
-
semantic_explanation: "Bind a task (Order/Reward) address. ONE-TIME only — E_TASK_ALREADY_SET on re-set.",
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
element_type: "field",
|
|
147
|
-
type_name: "repository",
|
|
148
|
-
semantic_explanation: "Context Repository list management. op=add/set/remove/clear. Total ≤ MAX_CONTEXT_REPOSITORY_COUNT (30).",
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
element_type: "field",
|
|
152
|
-
type_name: "progress_namedOperator",
|
|
153
|
-
semantic_explanation: "named_operator namespace management. name='' is the OrderHolder special namespace. ≤ 60 names, ≤ 80 addresses each.",
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
element_type: "field",
|
|
157
|
-
type_name: "operate",
|
|
158
|
-
semantic_explanation: "Forward advancement / hold / unhold. Contains operation (next_node_name + forward) and hold/adminUnhold/message flags.",
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
element_type: "field",
|
|
162
|
-
type_name: "operate.operation.next_node_name",
|
|
163
|
-
semantic_explanation: "Target node name. Must exist in Machine and be reachable from current via a Forward definition.",
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
element_type: "field",
|
|
167
|
-
type_name: "operate.operation.forward",
|
|
168
|
-
semantic_explanation: "Forward name. Must be one of the forwards defined from current → next_node_name in the Machine.",
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
element_type: "field",
|
|
172
|
-
type_name: "operate.op",
|
|
173
|
-
semantic_explanation: "Operation type: 'next' = advance forward; 'hold' = lock forward (Holder.who = sender); 'unhold' = self-release own hold; 'adminUnhold' = force release via 224 permission (bypasses holder check).",
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
element_type: "field",
|
|
177
|
-
type_name: "operate.message",
|
|
178
|
-
semantic_explanation: "Deliverable message (≤ MAX_LONG_NAME_LENGTH). Stored in Holder.msg / delivered on accomplishment.",
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
element_type: "op",
|
|
182
|
-
type_name: "next",
|
|
183
|
-
semantic_explanation: "Plain forward advance. Use when no bound Order, OR caller is named_operator (not OrderHolder).",
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
element_type: "op",
|
|
187
|
-
type_name: "order_next",
|
|
188
|
-
semantic_explanation: "Order-bound forward advance. Caller must satisfy order.has_op_permission (order owner/agent).",
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
element_type: "op",
|
|
192
|
-
type_name: "hold",
|
|
193
|
-
semantic_explanation: "Lock forward. Holder.who = sender; subsequent callers hit E_NOT_THE_HOLDER.",
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
element_type: "op",
|
|
197
|
-
type_name: "order_hold",
|
|
198
|
-
semantic_explanation: "Order-bound hold. Same as hold but uses order.has_op_permission for OrderHolder verification.",
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
element_type: "op",
|
|
202
|
-
type_name: "unhold",
|
|
203
|
-
semantic_explanation: "Self-release (sender == Holder.who) OR admin force-release (224 permission).",
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
element_type: "op",
|
|
207
|
-
type_name: "namedOperator_add",
|
|
208
|
-
semantic_explanation: "Append addresses to a named_operator (deduped; fails if name new and ≥ 60 names).",
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
element_type: "op",
|
|
212
|
-
type_name: "namedOperator_set",
|
|
213
|
-
semantic_explanation: "REPLACE the address list for a named_operator name (or create if name new).",
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
element_type: "op",
|
|
217
|
-
type_name: "namedOperator_remove",
|
|
218
|
-
semantic_explanation: "Drop listed addresses from a named_operator name (no-op if name doesn't exist).",
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
element_type: "phase",
|
|
222
|
-
type_name: "creation",
|
|
223
|
-
semantic_explanation: "Indirect: service::buy → progress::new_imp (bypasses 220 assertion via package-internal entry).",
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
element_type: "phase",
|
|
227
|
-
type_name: "task_binding",
|
|
228
|
-
semantic_explanation: "One-time task_set (222). E_TASK_ALREADY_SET on any retry.",
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
element_type: "phase",
|
|
232
|
-
type_name: "forward_advance",
|
|
233
|
-
semantic_explanation: "Dynamic permission: IsNamedOperator OR Forward.permissionIndex OR Forward.guard (Passport). NOT 220-225.",
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
element_type: "phase",
|
|
237
|
-
type_name: "completed",
|
|
238
|
-
semantic_explanation: "session.weights ≥ threshold → push to history, current = next_node. Atomic.",
|
|
239
|
-
},
|
|
240
|
-
];
|
|
241
|
-
export const PROGRESS_CONSTRAINT_RULES = [
|
|
242
|
-
{
|
|
243
|
-
id: "MC-PR-01",
|
|
244
|
-
category: "structural",
|
|
245
|
-
rule: "Machine must be published before Progress creation (machine::on_progress_new asserts published state)",
|
|
246
|
-
applies_to: ["creation"],
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
id: "MC-PR-02",
|
|
250
|
-
category: "structural",
|
|
251
|
-
rule: "Progress.machine is immutable after creation (E_MACHINE_NOT_MATCH on every op)",
|
|
252
|
-
applies_to: ["operate", "task", "repository", "progress_namedOperator"],
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
id: "MC-PR-03",
|
|
256
|
-
category: "structural",
|
|
257
|
-
rule: "named_operator count < MAX_NAMED_OPERATOR_COUNT (60); E_MAX_NAMED_OPERATOR_COUNT on overflow",
|
|
258
|
-
applies_to: ["progress_namedOperator.op=add (new name)"],
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
id: "MC-PR-04",
|
|
262
|
-
category: "structural",
|
|
263
|
-
rule: "named_operator addresses < MAX_NAMED_OPERATOR_ADDRESS_COUNT (80); E_MAX_NAMED_OPERATOR_ADDRESS_COUNT on overflow",
|
|
264
|
-
applies_to: ["progress_namedOperator.operators"],
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
id: "MC-PR-05",
|
|
268
|
-
category: "structural",
|
|
269
|
-
rule: "context_repository count < MAX_CONTEXT_REPOSITORY_COUNT (30); E_MAX_CONTEXT_REPOSITORY_COUNT on overflow",
|
|
270
|
-
applies_to: ["repository.op=add", "repository.op=set"],
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
id: "MC-PR-06",
|
|
274
|
-
category: "semantic",
|
|
275
|
-
rule: "task_set is one-time: E_TASK_ALREADY_SET blocks any re-assignment",
|
|
276
|
-
applies_to: ["task"],
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
id: "MC-PR-07",
|
|
280
|
-
category: "semantic",
|
|
281
|
-
rule: "operate.op must be one of: next | hold | unhold | adminUnhold (schema-enforced enum)",
|
|
282
|
-
applies_to: ["operate.op"],
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
id: "MC-PR-08",
|
|
286
|
-
category: "semantic",
|
|
287
|
-
rule: "operate.message must satisfy common::LONG_NAME (≤ MAX_LONG_NAME_LENGTH)",
|
|
288
|
-
applies_to: ["operate.message"],
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
id: "MC-PR-09",
|
|
292
|
-
category: "permission",
|
|
293
|
-
rule: "Forward advance uses DYNAMIC permission: namedOperator OR Forward.permissionIndex OR Forward.guard — NOT 220-225",
|
|
294
|
-
applies_to: ["operate (next/hold/unhold)"],
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
id: "MC-PR-10",
|
|
298
|
-
category: "permission",
|
|
299
|
-
rule: "220-225 builtin indexes are MANAGEMENT-ONLY (named_operator/task/repository/unhold/owner_receive)",
|
|
300
|
-
applies_to: ["progress_namedOperator", "task", "repository", "operate.op='adminUnhold'"],
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
id: "MC-PR-11",
|
|
304
|
-
category: "permission",
|
|
305
|
-
rule: "adminUnhold (224) bypasses holder check — grant only to dedicated recovery addresses",
|
|
306
|
-
applies_to: ["operate.op='adminUnhold'"],
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
id: "MC-PR-12",
|
|
310
|
-
category: "lifecycle",
|
|
311
|
-
rule: "Forward already accomplished → E_FORWARD_ALREADY_ACCOMPLISHED on re-hold (idempotent completion)",
|
|
312
|
-
applies_to: ["operate.op='hold'"],
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
id: "MC-PR-13",
|
|
316
|
-
category: "lifecycle",
|
|
317
|
-
rule: "unhold by non-holder requires 224 permission; else E_NOT_THE_HOLDER",
|
|
318
|
-
applies_to: ["operate.op='unhold'"],
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
id: "MC-PR-14",
|
|
322
|
-
category: "cross_object",
|
|
323
|
-
rule: "order_next/order_hold require progress.task == order address (E_ORDER_NOT_MATCH)",
|
|
324
|
-
applies_to: ["operate (order variant)"],
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
id: "MC-PR-15",
|
|
328
|
-
category: "cross_object",
|
|
329
|
-
rule: "context_repository_add creates Registrar affiliation — remove before deleting Repository",
|
|
330
|
-
applies_to: ["repository.op=add"],
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
id: "MC-PR-16",
|
|
334
|
-
category: "cross_object",
|
|
335
|
-
rule: "Forward.guard (Some) requires *_with_passport variant; plain next() aborts E_NEED_PASSPORT",
|
|
336
|
-
applies_to: ["operate (guarded forward)"],
|
|
337
|
-
},
|
|
338
|
-
];
|
|
339
|
-
export const PROGRESS_TRANSLATION_VERSION = "1.0.0";
|
|
340
|
-
export function matchSemanticPattern(userIntent) {
|
|
341
|
-
const lower = userIntent.toLowerCase();
|
|
342
|
-
return PROGRESS_SEMANTIC_TO_SCHEMA_RULES.filter(rule => rule.match_keywords.some(kw => lower.includes(kw.toLowerCase())));
|
|
343
|
-
}
|
|
344
|
-
export function explainProgressCallData(data) {
|
|
345
|
-
const lines = [];
|
|
346
|
-
if (!data.object) {
|
|
347
|
-
lines.push("Operation: CREATE Progress (indirect — service::buy → new_imp)");
|
|
348
|
-
}
|
|
349
|
-
else {
|
|
350
|
-
lines.push(`Operation: OPERATE Progress at ${data.object}`);
|
|
351
|
-
}
|
|
352
|
-
if (data.task) {
|
|
353
|
-
lines.push(`- ⚠️ task_set: ${data.task} (one-time, immutable — E_TASK_ALREADY_SET on re-set)`);
|
|
354
|
-
}
|
|
355
|
-
if (data.repository) {
|
|
356
|
-
const r = data.repository;
|
|
357
|
-
const objCount = r.objects?.length ?? 0;
|
|
358
|
-
lines.push(`- Repository ${r.op}: ${objCount} object(s)`);
|
|
359
|
-
}
|
|
360
|
-
if (data.progress_namedOperator) {
|
|
361
|
-
const n = data.progress_namedOperator;
|
|
362
|
-
const opCount = n.operators?.length ?? 0;
|
|
363
|
-
const nameDisplay = n.name === "" ? "(OrderHolder namespace)" : `"${n.name}"`;
|
|
364
|
-
lines.push(`- namedOperator ${n.op} ${nameDisplay}: ${opCount} address(es)`);
|
|
365
|
-
}
|
|
366
|
-
if (data.operate) {
|
|
367
|
-
const o = data.operate;
|
|
368
|
-
lines.push(`- Operation: ${o.operation.forward} → ${o.operation.next_node_name}`);
|
|
369
|
-
if (o.op) {
|
|
370
|
-
lines.push(` op=${o.op}`);
|
|
371
|
-
}
|
|
372
|
-
if (o.op === "hold") {
|
|
373
|
-
lines.push(` ⚠️ hold: lock this forward (Holder.who = sender)`);
|
|
374
|
-
}
|
|
375
|
-
else if (o.op === "adminUnhold") {
|
|
376
|
-
lines.push(` ⚠️ adminUnhold: force release via 224 permission (bypasses holder check)`);
|
|
377
|
-
}
|
|
378
|
-
else if (o.op === "unhold") {
|
|
379
|
-
lines.push(` ℹ️ unhold: self-release own hold (sender must == Holder.who)`);
|
|
380
|
-
}
|
|
381
|
-
else {
|
|
382
|
-
lines.push(` Submit result (advance forward, accumulate weight toward threshold)`);
|
|
383
|
-
}
|
|
384
|
-
if (o.message) {
|
|
385
|
-
lines.push(` Message: "${o.message}"`);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
return lines.join("\n");
|
|
389
|
-
}
|
|
390
|
-
export function explainField(fieldName) {
|
|
391
|
-
return PROGRESS_SCHEMA_TO_SEMANTIC_RULES.find(r => r.element_type === "field" && r.type_name === fieldName);
|
|
392
|
-
}
|
|
393
|
-
export function explainOp(opName) {
|
|
394
|
-
return PROGRESS_SCHEMA_TO_SEMANTIC_RULES.find(r => r.element_type === "op" && r.type_name === opName);
|
|
395
|
-
}
|
|
396
|
-
export function getConstraintsByCategory(category) {
|
|
397
|
-
return PROGRESS_CONSTRAINT_RULES.filter(r => r.category === category);
|
|
398
|
-
}
|
|
399
|
-
export function explainPermissionIndex(index) {
|
|
400
|
-
if (isProgressBuiltinPermission(index)) {
|
|
401
|
-
const entry = getBuiltinPermissionByIndex(index);
|
|
402
|
-
return `${entry.name} (${index}) — ${entry.description}`;
|
|
403
|
-
}
|
|
404
|
-
return `Custom/dynamic permission index (${index}) — resolved via Forward.permissionIndex in Machine`;
|
|
405
|
-
}
|
|
1
|
+
import{isProgressBuiltinPermission,getBuiltinPermissionByIndex}from'./progress-ledger.js';export const PROGRESS_SEMANTIC_TO_SCHEMA_RULES=[{'id':'P-PR-01','pattern_name':'Advance\x20Progress\x20(next\x20/\x20order_next)','semantic_intent':'Push\x20Progress\x20forward\x20via\x20a\x20Forward\x20definition;\x20accumulate\x20weight,\x20possibly\x20complete\x20session','match_keywords':['next','advance','proceed','complete\x20forward'],'schema_fields':['object','operate(operation,\x20op=\x27next\x27)'],'example_json':{'object':'0xPROGRESS_ADDRESS','operate':{'operation':{'next_node_name':'shipped','forward':'ship'},'op':'next','message':'Order\x20shipped\x20via\x20FedEx,\x20tracking\x2012345'}},'reverse_explanation':'operate.op=\x27next\x27\x20→\x20calls\x20progress::next\x20or\x20order_next\x20(if\x20task\x20bound).\x20'+'Move\x20accumulates\x20forward.weight;\x20on\x20reaching\x20threshold,\x20session\x20→\x20history\x20and\x20current\x20=\x20next_node_name.\x20'+'⚠\x20ROUTING\x20RULE:\x20When\x20Forward.namedOperator=\x22\x22\x20(empty\x20string\x20=\x20OrderHolder),\x20the\x20caller\x20MUST\x20use\x20'+'order.progress\x20(not\x20progress.operate)\x20—\x20order_next\x20uses\x20order.has_op_permission\x20which\x20recognizes\x20'+'the\x20OrderHolder\x20short-circuit.\x20Direct\x20progress::next\x20will\x20abort\x20with\x20\x27Permission\x20denied\x27\x20(code\x205).\x20'+'For\x20non-empty\x20namedOperator\x20or\x20permissionIndex-only\x20forwards,\x20use\x20progress.operate\x20directly.'},{'id':'P-PR-02','pattern_name':'Hold\x20Progress\x20(block\x20forward)','semantic_intent':'Lock\x20a\x20Forward\x20so\x20no\x20one\x20else\x20can\x20advance\x20it\x20until\x20unhold','match_keywords':['hold','lock','block','pause\x20forward'],'schema_fields':['object','operate(operation,\x20op=\x27hold\x27,\x20message)'],'example_json':{'object':'0xPROGRESS_ADDRESS','operate':{'operation':{'next_node_name':'revision_required','forward':'request_revision'},'op':'hold','message':'Please\x20revise\x20section\x203'}},'reverse_explanation':'operate.op=\x27hold\x27\x20→\x20calls\x20progress::hold\x20or\x20order_hold.\x20session_hold\x20sets\x20Holder.who\x20=\x20sender;\x20'+'other\x20callers\x20will\x20hit\x20E_NOT_THE_HOLDER\x20if\x20they\x20try\x20to\x20advance.'},{'id':'P-PR-03','pattern_name':'Self-unhold\x20(release\x20own\x20hold)','semantic_intent':'Release\x20a\x20forward\x20that\x20I\x20previously\x20held','match_keywords':['unhold','release','self\x20release'],'schema_fields':['object','operate(operation,\x20op=\x27unhold\x27)'],'example_json':{'object':'0xPROGRESS_ADDRESS','operate':{'operation':{'next_node_name':'reviewing','forward':'resubmit'},'op':'unhold','message':'Revised\x20content\x20uploaded'}},'reverse_explanation':'operate.op=\x27unhold\x27\x20→\x20calls\x20progress::hold(bHold=false)\x20or\x20order_hold(bHold=false).\x20'+'Move\x27s\x20session_hold\x20releases\x20the\x20lock\x20(sender\x20==\x20Holder.who).\x20'+'After\x20release,\x20the\x20forward\x20can\x20be\x20re-locked\x20or\x20accomplished\x20by\x20eligible\x20callers.'},{'id':'P-PR-04','pattern_name':'Admin\x20force-unhold\x20(224\x20permission)','semantic_intent':'Force-release\x20a\x20held\x20forward\x20using\x20224\x20permission,\x20bypassing\x20holder\x20check','match_keywords':['adminUnhold','force\x20unhold','admin\x20release'],'schema_fields':['object','operate(operation,\x20op=\x27adminUnhold\x27)'],'example_json':{'object':'0xPROGRESS_ADDRESS','operate':{'operation':{'next_node_name':'arb_decided','forward':'decide'},'op':'adminUnhold','message':'Admin\x20override:\x20holder\x20unresponsive\x20for\x207\x20days'}},'reverse_explanation':'operate.op=\x27adminUnhold\x27\x20→\x20calls\x20progress::unhold.\x20Move\x20checks\x20sender_has_permission_idcheck(224);\x20'+'if\x20true,\x20force\x20release\x20(bForce=true).\x20If\x20false,\x20falls\x20back\x20to\x20holder-match\x20check.'},{'id':'P-PR-05','pattern_name':'Bind\x20task\x20(one-time,\x20immutable)','semantic_intent':'Associate\x20an\x20Order/Reward\x20address\x20with\x20this\x20Progress\x20(only\x20once\x20per\x20Progress)','match_keywords':['task_set','bind\x20task','set\x20task'],'schema_fields':['object','task'],'example_json':{'object':'0xPROGRESS_ADDRESS','task':'0xORDER_ADDRESS'},'reverse_explanation':'Calls\x20progress::task_set.\x20Move\x20asserts\x20option::is_none(&self.task);\x20if\x20already\x20set,\x20E_TASK_ALREADY_SET\x20aborts.\x20'+'There\x20is\x20NO\x20task_unset\x20—\x20once\x20bound,\x20the\x20Progress\x20is\x20permanently\x20tied\x20to\x20that\x20Order/Reward.'},{'id':'P-PR-06','pattern_name':'Manage\x20context\x20repositories','semantic_intent':'Add/remove/clear\x20Repository\x20objects\x20as\x20query\x20context\x20(≤\x2030\x20total)','match_keywords':['repository','context'],'schema_fields':['object','repository(op,\x20objects)'],'example_json':{'object':'0xPROGRESS_ADDRESS','repository':{'op':'add','objects':['0xREPO1','0xREPO2']}},'reverse_explanation':'op=add:\x20appends\x20(idempotent\x20via\x20vector::contains).\x20op=remove:\x20drops\x20listed\x20addresses.\x20'+'op=clear:\x20empties\x20the\x20list.\x20op=set:\x20clears\x20then\x20adds.\x20Count\x20must\x20stay\x20≤\x20MAX_CONTEXT_REPOSITORY_COUNT\x20(30).'},{'id':'P-PR-07','pattern_name':'Manage\x20named_operator\x20namespace','semantic_intent':'Add/set/remove\x20addresses\x20for\x20a\x20named\x20operator\x20role\x20(Forward\x20gate)','match_keywords':['named_operator','operator'],'schema_fields':['object','progress_namedOperator(op,\x20name,\x20operators)'],'example_json':{'object':'0xPROGRESS_ADDRESS','progress_namedOperator':{'op':'add','name':'logistics','operators':['0xADDR1','0xADDR2']}},'reverse_explanation':'op=add:\x20appends\x20(deduped).\x20op=set:\x20REPLACES\x20the\x20address\x20list.\x20op=remove:\x20drops\x20listed\x20addresses.\x20'+'Up\x20to\x2060\x20named_operator\x20names\x20per\x20Progress;\x20up\x20to\x2080\x20addresses\x20per\x20name.'},{'id':'P-PR-08','pattern_name':'Owner\x20receive\x20(terminal\x20node\x20unwrap)','semantic_intent':'Owner\x20receives\x20Receiving<K>\x20objects\x20or\x20CoinWrapper<T>\x20coins\x20at\x20a\x20terminal\x20node','match_keywords':['owner_receive','unwrap','withdraw'],'schema_fields':['(SDK\x20does\x20not\x20expose\x20this\x20in\x20CallProgress_Data\x20—\x20direct\x20move\x20call\x20required)'],'example_json':{'_note':'Not\x20exposed\x20in\x20CallProgress_Data;\x20direct\x20Move\x20call:','target':'progress::owner_receive<T>','arguments':['progress','machine','permission','received','payment']},'reverse_explanation':'Calls\x20progress::owner_receive\x20(225\x20permission).\x20Unwraps\x20CoinWrapper<T>\x20via\x20Payment.unwrap_with_check,\x20'+'forwards\x20coin/object\x20to\x20Permission\x20owner.\x20Typically\x20triggered\x20at\x20terminal\x20nodes\x20(return_approved,\x20completed,\x20enforced).'}];export const PROGRESS_SCHEMA_TO_SEMANTIC_RULES=[{'element_type':'field','type_name':'object','semantic_explanation':'Progress\x20object\x20address.\x20Always\x20required\x20for\x20operate\x20calls\x20(Progress\x20is\x20created\x20indirectly\x20via\x20service::buy).'},{'element_type':'field','type_name':'task','semantic_explanation':'Bind\x20a\x20task\x20(Order/Reward)\x20address.\x20ONE-TIME\x20only\x20—\x20E_TASK_ALREADY_SET\x20on\x20re-set.'},{'element_type':'field','type_name':'repository','semantic_explanation':'Context\x20Repository\x20list\x20management.\x20op=add/set/remove/clear.\x20Total\x20≤\x20MAX_CONTEXT_REPOSITORY_COUNT\x20(30).'},{'element_type':'field','type_name':'progress_namedOperator','semantic_explanation':'named_operator\x20namespace\x20management.\x20name=\x27\x27\x20is\x20the\x20OrderHolder\x20special\x20namespace.\x20≤\x2060\x20names,\x20≤\x2080\x20addresses\x20each.'},{'element_type':'field','type_name':'operate','semantic_explanation':'Forward\x20advancement\x20/\x20hold\x20/\x20unhold.\x20Contains\x20operation\x20(next_node_name\x20+\x20forward)\x20and\x20hold/adminUnhold/message\x20flags.'},{'element_type':'field','type_name':'operate.operation.next_node_name','semantic_explanation':'Target\x20node\x20name.\x20Must\x20exist\x20in\x20Machine\x20and\x20be\x20reachable\x20from\x20current\x20via\x20a\x20Forward\x20definition.'},{'element_type':'field','type_name':'operate.operation.forward','semantic_explanation':'Forward\x20name.\x20Must\x20be\x20one\x20of\x20the\x20forwards\x20defined\x20from\x20current\x20→\x20next_node_name\x20in\x20the\x20Machine.'},{'element_type':'field','type_name':'operate.op','semantic_explanation':'Operation\x20type:\x20\x27next\x27\x20=\x20advance\x20forward;\x20\x27hold\x27\x20=\x20lock\x20forward\x20(Holder.who\x20=\x20sender);\x20\x27unhold\x27\x20=\x20self-release\x20own\x20hold;\x20\x27adminUnhold\x27\x20=\x20force\x20release\x20via\x20224\x20permission\x20(bypasses\x20holder\x20check).'},{'element_type':'field','type_name':'operate.message','semantic_explanation':'Deliverable\x20message\x20(≤\x20MAX_LONG_NAME_LENGTH).\x20Stored\x20in\x20Holder.msg\x20/\x20delivered\x20on\x20accomplishment.'},{'element_type':'op','type_name':'next','semantic_explanation':'Plain\x20forward\x20advance.\x20Use\x20when\x20no\x20bound\x20Order,\x20OR\x20caller\x20is\x20named_operator\x20(not\x20OrderHolder).'},{'element_type':'op','type_name':'order_next','semantic_explanation':'Order-bound\x20forward\x20advance.\x20Caller\x20must\x20satisfy\x20order.has_op_permission\x20(order\x20owner/agent).'},{'element_type':'op','type_name':'hold','semantic_explanation':'Lock\x20forward.\x20Holder.who\x20=\x20sender;\x20subsequent\x20callers\x20hit\x20E_NOT_THE_HOLDER.'},{'element_type':'op','type_name':'order_hold','semantic_explanation':'Order-bound\x20hold.\x20Same\x20as\x20hold\x20but\x20uses\x20order.has_op_permission\x20for\x20OrderHolder\x20verification.'},{'element_type':'op','type_name':'unhold','semantic_explanation':'Self-release\x20(sender\x20==\x20Holder.who)\x20OR\x20admin\x20force-release\x20(224\x20permission).'},{'element_type':'op','type_name':'namedOperator_add','semantic_explanation':'Append\x20addresses\x20to\x20a\x20named_operator\x20(deduped;\x20fails\x20if\x20name\x20new\x20and\x20≥\x2060\x20names).'},{'element_type':'op','type_name':'namedOperator_set','semantic_explanation':'REPLACE\x20the\x20address\x20list\x20for\x20a\x20named_operator\x20name\x20(or\x20create\x20if\x20name\x20new).'},{'element_type':'op','type_name':'namedOperator_remove','semantic_explanation':'Drop\x20listed\x20addresses\x20from\x20a\x20named_operator\x20name\x20(no-op\x20if\x20name\x20doesn\x27t\x20exist).'},{'element_type':'phase','type_name':'creation','semantic_explanation':'Indirect:\x20service::buy\x20→\x20progress::new_imp\x20(bypasses\x20220\x20assertion\x20via\x20package-internal\x20entry).'},{'element_type':'phase','type_name':'task_binding','semantic_explanation':'One-time\x20task_set\x20(222).\x20E_TASK_ALREADY_SET\x20on\x20any\x20retry.'},{'element_type':'phase','type_name':'forward_advance','semantic_explanation':'Dynamic\x20permission:\x20IsNamedOperator\x20OR\x20Forward.permissionIndex\x20OR\x20Forward.guard\x20(Passport).\x20NOT\x20220-225.'},{'element_type':'phase','type_name':'completed','semantic_explanation':'session.weights\x20≥\x20threshold\x20→\x20push\x20to\x20history,\x20current\x20=\x20next_node.\x20Atomic.'}];export const PROGRESS_CONSTRAINT_RULES=[{'id':'MC-PR-01','category':'structural','rule':'Machine\x20must\x20be\x20published\x20before\x20Progress\x20creation\x20(machine::on_progress_new\x20asserts\x20published\x20state)','applies_to':['creation']},{'id':'MC-PR-02','category':'structural','rule':'Progress.machine\x20is\x20immutable\x20after\x20creation\x20(E_MACHINE_NOT_MATCH\x20on\x20every\x20op)','applies_to':['operate','task','repository','progress_namedOperator']},{'id':'MC-PR-03','category':'structural','rule':'named_operator\x20count\x20<\x20MAX_NAMED_OPERATOR_COUNT\x20(60);\x20E_MAX_NAMED_OPERATOR_COUNT\x20on\x20overflow','applies_to':['progress_namedOperator.op=add\x20(new\x20name)']},{'id':'MC-PR-04','category':'structural','rule':'named_operator\x20addresses\x20<\x20MAX_NAMED_OPERATOR_ADDRESS_COUNT\x20(80);\x20E_MAX_NAMED_OPERATOR_ADDRESS_COUNT\x20on\x20overflow','applies_to':['progress_namedOperator.operators']},{'id':'MC-PR-05','category':'structural','rule':'context_repository\x20count\x20<\x20MAX_CONTEXT_REPOSITORY_COUNT\x20(30);\x20E_MAX_CONTEXT_REPOSITORY_COUNT\x20on\x20overflow','applies_to':['repository.op=add','repository.op=set']},{'id':'MC-PR-06','category':'semantic','rule':'task_set\x20is\x20one-time:\x20E_TASK_ALREADY_SET\x20blocks\x20any\x20re-assignment','applies_to':['task']},{'id':'MC-PR-07','category':'semantic','rule':'operate.op\x20must\x20be\x20one\x20of:\x20next\x20|\x20hold\x20|\x20unhold\x20|\x20adminUnhold\x20(schema-enforced\x20enum)','applies_to':['operate.op']},{'id':'MC-PR-08','category':'semantic','rule':'operate.message\x20must\x20satisfy\x20common::LONG_NAME\x20(≤\x20MAX_LONG_NAME_LENGTH)','applies_to':['operate.message']},{'id':'MC-PR-09','category':'permission','rule':'Forward\x20advance\x20uses\x20DYNAMIC\x20permission:\x20namedOperator\x20OR\x20Forward.permissionIndex\x20OR\x20Forward.guard\x20—\x20NOT\x20220-225','applies_to':['operate\x20(next/hold/unhold)']},{'id':'MC-PR-10','category':'permission','rule':'220-225\x20builtin\x20indexes\x20are\x20MANAGEMENT-ONLY\x20(named_operator/task/repository/unhold/owner_receive)','applies_to':['progress_namedOperator','task','repository','operate.op=\x27adminUnhold\x27']},{'id':'MC-PR-11','category':'permission','rule':'adminUnhold\x20(224)\x20bypasses\x20holder\x20check\x20—\x20grant\x20only\x20to\x20dedicated\x20recovery\x20addresses','applies_to':['operate.op=\x27adminUnhold\x27']},{'id':'MC-PR-12','category':'lifecycle','rule':'Forward\x20already\x20accomplished\x20→\x20E_FORWARD_ALREADY_ACCOMPLISHED\x20on\x20re-hold\x20(idempotent\x20completion)','applies_to':['operate.op=\x27hold\x27']},{'id':'MC-PR-13','category':'lifecycle','rule':'unhold\x20by\x20non-holder\x20requires\x20224\x20permission;\x20else\x20E_NOT_THE_HOLDER','applies_to':['operate.op=\x27unhold\x27']},{'id':'MC-PR-14','category':'cross_object','rule':'order_next/order_hold\x20require\x20progress.task\x20==\x20order\x20address\x20(E_ORDER_NOT_MATCH)','applies_to':['operate\x20(order\x20variant)']},{'id':'MC-PR-15','category':'cross_object','rule':'context_repository_add\x20creates\x20Registrar\x20affiliation\x20—\x20remove\x20before\x20deleting\x20Repository','applies_to':['repository.op=add']},{'id':'MC-PR-16','category':'cross_object','rule':'Forward.guard\x20(Some)\x20requires\x20*_with_passport\x20variant;\x20plain\x20next()\x20aborts\x20E_NEED_PASSPORT','applies_to':['operate\x20(guarded\x20forward)']}];export const PROGRESS_TRANSLATION_VERSION='1.0.0';export function matchSemanticPattern(a){const b=a['toLowerCase']();return PROGRESS_SEMANTIC_TO_SCHEMA_RULES['filter'](c=>c['match_keywords']['some'](d=>b['includes'](d['toLowerCase']())));}export function explainProgressCallData(a){const b=[];!a['object']?b['push']('Operation:\x20CREATE\x20Progress\x20(indirect\x20—\x20service::buy\x20→\x20new_imp)'):b['push']('Operation:\x20OPERATE\x20Progress\x20at\x20'+a['object']);a['task']&&b['push']('-\x20⚠️\x20task_set:\x20'+a['task']+'\x20(one-time,\x20immutable\x20—\x20E_TASK_ALREADY_SET\x20on\x20re-set)');if(a['repository']){const c=a['repository'],d=c['objects']?.['length']??0x0;b['push']('-\x20Repository\x20'+c['op']+':\x20'+d+'\x20object(s)');}if(a['progress_namedOperator']){const e=a['progress_namedOperator'],f=e['operators']?.['length']??0x0,g=e['name']===''?'(OrderHolder\x20namespace)':'\x22'+e['name']+'\x22';b['push']('-\x20namedOperator\x20'+e['op']+'\x20'+g+':\x20'+f+'\x20address(es)');}if(a['operate']){const h=a['operate'];b['push']('-\x20Operation:\x20'+h['operation']['forward']+'\x20→\x20'+h['operation']['next_node_name']);h['op']&&b['push']('\x20\x20op='+h['op']);if(h['op']==='hold')b['push']('\x20\x20⚠️\x20hold:\x20lock\x20this\x20forward\x20(Holder.who\x20=\x20sender)');else{if(h['op']==='adminUnhold')b['push']('\x20\x20⚠️\x20adminUnhold:\x20force\x20release\x20via\x20224\x20permission\x20(bypasses\x20holder\x20check)');else h['op']==='unhold'?b['push']('\x20\x20ℹ️\x20unhold:\x20self-release\x20own\x20hold\x20(sender\x20must\x20==\x20Holder.who)'):b['push']('\x20\x20Submit\x20result\x20(advance\x20forward,\x20accumulate\x20weight\x20toward\x20threshold)');}h['message']&&b['push']('\x20\x20Message:\x20\x22'+h['message']+'\x22');}return b['join']('\x0a');}export function explainField(a){return PROGRESS_SCHEMA_TO_SEMANTIC_RULES['find'](b=>b['element_type']==='field'&&b['type_name']===a);}export function explainOp(a){return PROGRESS_SCHEMA_TO_SEMANTIC_RULES['find'](b=>b['element_type']==='op'&&b['type_name']===a);}export function getConstraintsByCategory(a){return PROGRESS_CONSTRAINT_RULES['filter'](b=>b['category']===a);}export function explainPermissionIndex(a){if(isProgressBuiltinPermission(a)){const b=getBuiltinPermissionByIndex(a);return b['name']+'\x20('+a+')\x20—\x20'+b['description'];}return'Custom/dynamic\x20permission\x20index\x20('+a+')\x20—\x20resolved\x20via\x20Forward.permissionIndex\x20in\x20Machine';}
|