@wowok/agent-mcp 2.7.0 → 2.7.2
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/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.js +1 -373
- package/dist/customer/post-purchase.js +1 -351
- package/dist/customer/preorder-compare.js +1 -34
- package/dist/customer/reminder-system.js +1 -316
- package/dist/customer/risk-assessment.d.ts +5 -1
- package/dist/customer/risk-assessment.js +1 -397
- package/dist/customer/types.js +1 -13
- package/dist/customer/user-preferences.js +1 -460
- package/dist/evaluation/arbitration-game.d.ts +23 -0
- package/dist/evaluation/arbitration-game.js +1 -0
- package/dist/evaluation/builtins/demand-match.d.ts +15 -0
- package/dist/evaluation/builtins/demand-match.js +1 -0
- package/dist/evaluation/builtins/index.d.ts +3 -0
- package/dist/evaluation/builtins/index.js +1 -0
- package/dist/evaluation/builtins/service-risk.d.ts +6 -0
- package/dist/evaluation/builtins/service-risk.js +1 -0
- package/dist/evaluation/capability.d.ts +50 -0
- package/dist/evaluation/capability.js +1 -0
- package/dist/evaluation/composer.d.ts +13 -0
- package/dist/evaluation/composer.js +1 -0
- package/dist/evaluation/engine.d.ts +18 -0
- package/dist/evaluation/engine.js +1 -0
- package/dist/evaluation/extract.d.ts +30 -0
- package/dist/evaluation/extract.js +1 -0
- package/dist/evaluation/game-strategy.d.ts +27 -0
- package/dist/evaluation/game-strategy.js +1 -0
- package/dist/evaluation/gap.d.ts +2 -0
- package/dist/evaluation/gap.js +1 -0
- package/dist/evaluation/index.d.ts +12 -0
- package/dist/evaluation/index.js +1 -0
- package/dist/evaluation/node-game.d.ts +62 -0
- package/dist/evaluation/node-game.js +1 -0
- package/dist/evaluation/region.d.ts +10 -0
- package/dist/evaluation/region.js +1 -0
- package/dist/evaluation/types.d.ts +77 -0
- package/dist/evaluation/types.js +1 -0
- package/dist/evaluation/user-injection.d.ts +6 -0
- package/dist/evaluation/user-injection.js +1 -0
- package/dist/examples/education-contact-create.json +40 -0
- package/dist/examples/freelance-contact-create.json +40 -0
- package/dist/examples/insurance-machine-create.json +1 -1
- package/dist/examples/insurance-service-allocators.json +1 -1
- package/dist/examples/machine-publish.json +1 -1
- package/dist/examples/rental-ziroom-service-create.json +1 -1
- package/dist/examples/retail-adv-guard-messenger-proof-create.json +1 -1
- package/dist/examples/retail-myshop-service-create.json +1 -1
- package/dist/examples/retail-myshop-service-customer-required.json +1 -1
- package/dist/examples/subscription-contact-create.json +40 -0
- package/dist/examples/threebody-machine-create.json +1 -1
- package/dist/examples/travel-machine-create.json +1 -1
- package/dist/examples/travel-service-create.json +1 -1
- 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.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.js +1 -6
- package/dist/extensions/metric-registry.js +1 -257
- package/dist/extensions/mode-evaluator.js +1 -170
- package/dist/extensions/modes.js +1 -499
- package/dist/extensions/registry.js +1 -717
- package/dist/extensions/types.js +1 -1
- package/dist/harness/auto-escalation.js +1 -68
- package/dist/harness/checkpoint.js +1 -129
- package/dist/harness/index.js +1 -78
- package/dist/harness/plan.js +1 -276
- package/dist/harness/recover.js +1 -139
- package/dist/harness/types.js +1 -1
- package/dist/harness/verify.js +1 -237
- package/dist/index.js +1 -273
- package/dist/intent/enrich.d.ts +1 -0
- package/dist/intent/enrich.js +1 -0
- package/dist/intent/index.d.ts +23 -0
- package/dist/intent/index.js +1 -0
- package/dist/intent/matcher.d.ts +2 -0
- package/dist/intent/matcher.js +1 -0
- package/dist/intent/store.d.ts +19 -0
- package/dist/intent/store.js +1 -0
- package/dist/intent/types.d.ts +33 -0
- package/dist/intent/types.js +1 -0
- 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/arb-risk.js +1 -210
- 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 -433
- package/dist/knowledge/arbitration-templates.js +1 -276
- package/dist/knowledge/arbitration-translation.js +1 -487
- package/dist/knowledge/arbitration-trust.js +1 -117
- package/dist/knowledge/audit-rules.js +1 -141
- package/dist/knowledge/bridge-risk.js +1 -263
- package/dist/knowledge/contact-risk.js +1 -200
- package/dist/knowledge/contact-templates.d.ts +27 -0
- package/dist/knowledge/contact-templates.js +1 -0
- package/dist/knowledge/demand-confirm.js +1 -206
- package/dist/knowledge/demand-matching.js +1 -132
- package/dist/knowledge/demand-risk.js +1 -240
- 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/examples-scanner-cli.js +1 -26
- package/dist/knowledge/examples-scanner.js +1 -825
- 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.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.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 -670
- 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/mcp-schema-audit-cli.js +1 -45
- package/dist/knowledge/mcp-schema-audit.d.ts +1 -1
- package/dist/knowledge/mcp-schema-audit.js +1 -773
- 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-risk.js +1 -249
- package/dist/knowledge/permission-confirm.js +1 -426
- package/dist/knowledge/permission-context.js +1 -224
- 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-risk.js +1 -212
- 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-risk.js +1 -207
- package/dist/knowledge/proof-translation.js +1 -283
- package/dist/knowledge/registrar-risk.js +1 -217
- package/dist/knowledge/repository-confirm.js +1 -286
- package/dist/knowledge/repository-risk.js +1 -373
- package/dist/knowledge/repository-translation.js +1 -445
- package/dist/knowledge/reputation-rules.js +1 -99
- package/dist/knowledge/resource-risk.js +1 -157
- package/dist/knowledge/reward-confirm.js +1 -526
- 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.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.js +1 -615
- package/dist/knowledge/service-templates.js +1 -456
- package/dist/knowledge/service-translation.js +1 -622
- package/dist/knowledge/template-registry.d.ts +1 -1
- package/dist/knowledge/template-registry.js +1 -341
- package/dist/knowledge/tool-constraints.js +1 -195
- package/dist/knowledge/tools-reference.js +1 -155
- 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/util-risk.js +1 -135
- 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/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.d.ts +16 -0
- package/dist/persona/analyzer.js +1 -0
- package/dist/persona/bridge.d.ts +5 -0
- package/dist/persona/bridge.js +1 -0
- package/dist/persona/defaults.d.ts +4 -0
- package/dist/persona/defaults.js +1 -0
- package/dist/persona/experience-bridge.d.ts +3 -0
- package/dist/persona/experience-bridge.js +1 -0
- package/dist/persona/index.d.ts +18 -0
- package/dist/persona/index.js +1 -0
- package/dist/persona/model.d.ts +7 -0
- package/dist/persona/model.js +1 -0
- package/dist/persona/store.d.ts +19 -0
- package/dist/persona/store.js +1 -0
- package/dist/persona/types.d.ts +45 -0
- package/dist/persona/types.js +1 -0
- 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.js +1 -2011
- package/dist/project/game-theory.js +1 -177
- package/dist/project/graph-builder.js +1 -656
- package/dist/project/graph.js +1 -340
- package/dist/project/handlers.d.ts +5 -0
- package/dist/project/handlers.js +1 -1762
- package/dist/project/index.d.ts +1 -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.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.js +1 -245
- 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/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.d.ts +2 -0
- package/dist/rules.js +1 -9
- 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.js +1 -34
- package/dist/schema/call/arbitration.js +1 -113
- package/dist/schema/call/base.d.ts +15 -15
- package/dist/schema/call/base.js +1 -370
- package/dist/schema/call/bridge-handler.js +1 -265
- package/dist/schema/call/bridge.d.ts +7 -7
- package/dist/schema/call/bridge.js +1 -458
- package/dist/schema/call/contact.js +1 -37
- package/dist/schema/call/demand.js +1 -47
- 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.js +1 -193
- package/dist/schema/call/order.js +1 -35
- package/dist/schema/call/payment.js +1 -37
- package/dist/schema/call/permission-handler.js +1 -54
- package/dist/schema/call/permission.js +1 -105
- package/dist/schema/call/personal.js +1 -78
- package/dist/schema/call/progress.js +1 -47
- package/dist/schema/call/proof.js +1 -33
- package/dist/schema/call/repository.js +1 -77
- package/dist/schema/call/reward.js +1 -30
- package/dist/schema/call/semantic.js +1 -1657
- package/dist/schema/call/service.js +1 -178
- package/dist/schema/call/treasury.js +1 -71
- package/dist/schema/common/index.js +1 -407
- package/dist/schema/config/index.js +1 -68
- package/dist/schema/evaluation/index.d.ts +4436 -0
- package/dist/schema/evaluation/index.js +1 -0
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.js +1 -13
- package/dist/schema/intent-radar/index.d.ts +284 -0
- package/dist/schema/intent-radar/index.js +1 -0
- package/dist/schema/local/index.d.ts +21 -21
- package/dist/schema/local/index.js +1 -927
- package/dist/schema/local/wip.js +1 -187
- package/dist/schema/messenger/index.d.ts +7 -7
- package/dist/schema/messenger/index.js +1 -475
- package/dist/schema/operations.d.ts +7 -7
- package/dist/schema/operations.js +1 -520
- package/dist/schema/persona/index.d.ts +1985 -0
- package/dist/schema/persona/index.js +1 -0
- package/dist/schema/project/index.d.ts +96 -50
- package/dist/schema/project/index.js +1 -2057
- package/dist/schema/query/index.d.ts +423 -7
- package/dist/schema/query/index.js +1 -1640
- package/dist/schema/schema-query/index.js +1 -104
- package/dist/schema/schema-version.js +1 -76
- package/dist/schema/sync-layer4.d.ts +1 -1
- package/dist/schema/sync-layer4.js +1 -282
- package/dist/schema/task-status.d.ts +168 -0
- package/dist/schema/task-status.js +1 -0
- 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.js +1 -77
- package/dist/schema-query/index.js +1 -810
- package/dist/schemas/account_operation.output.json +5 -2
- package/dist/schemas/bridge_operation.output.json +5 -2
- package/dist/schemas/evaluation_operation.output.json +782 -0
- package/dist/schemas/evaluation_operation.schema.json +990 -0
- package/dist/schemas/index.json +25 -1
- package/dist/schemas/intent_radar.output.json +232 -0
- package/dist/schemas/intent_radar.schema.json +138 -0
- package/dist/schemas/local_info_operation.output.json +5 -2
- package/dist/schemas/local_mark_operation.output.json +5 -2
- package/dist/schemas/messenger_operation.output.json +5 -2
- package/dist/schemas/onchain_events.output.json +5 -2
- package/dist/schemas/onchain_operations.output.json +5 -2
- package/dist/schemas/onchain_operations.schema.json +6 -6
- package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
- package/dist/schemas/onchain_operations_machine.schema.json +2 -2
- package/dist/schemas/onchain_operations_service.schema.json +3 -3
- package/dist/schemas/onchain_table_data.output.json +6 -3
- package/dist/schemas/persona_operation.output.json +392 -0
- package/dist/schemas/persona_operation.schema.json +250 -0
- package/dist/schemas/project_operation.output.json +28 -8
- package/dist/schemas/query_task_status.output.json +115 -0
- package/dist/schemas/query_task_status.schema.json +24 -0
- package/dist/schemas/query_toolkit.output.json +9 -6
- package/dist/schemas/trust_score.schema.json +1 -1
- package/dist/schemas/wowok_buildin_info.output.json +132 -0
- package/dist/schemas/wowok_buildin_info.schema.json +14 -0
- 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.js +1 -1
- package/dist/tools/handlers/config.js +1 -74
- package/dist/tools/handlers/evaluation.d.ts +2 -0
- package/dist/tools/handlers/evaluation.js +1 -0
- package/dist/tools/handlers/file-export.js +1 -90
- package/dist/tools/handlers/intent-radar.d.ts +2 -0
- package/dist/tools/handlers/intent-radar.js +1 -0
- package/dist/tools/handlers/local.js +1 -53
- package/dist/tools/handlers/messenger.js +1 -188
- package/dist/tools/handlers/onchain.js +1 -1082
- package/dist/tools/handlers/persona.d.ts +4 -0
- package/dist/tools/handlers/persona.js +1 -0
- 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.d.ts +0 -168
- package/dist/tools/handlers/task-status.js +1 -55
- package/dist/tools/handlers/trust.js +1 -380
- package/dist/tools/handlers/wip.js +1 -90
- package/dist/tools/index.js +1 -1306
- package/dist/tools/retry.js +1 -85
- package/dist/tools/rules-hook.js +1 -23
- package/dist/tools/shared.js +1 -130
- 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.d.ts +1 -1
- package/dist/tools/wip-deploy-assist.js +1 -278
- package/dist/tools/wrap.js +1 -500
- package/package.json +5 -3
|
@@ -1,228 +1 @@
|
|
|
1
|
-
export const PROGRESS_TEMPLATES = [
|
|
2
|
-
{
|
|
3
|
-
id: "T-PR-01",
|
|
4
|
-
name: "Single named_operator workflow",
|
|
5
|
-
description: "Bind a single named_operator role (e.g. 'seller' or 'logistics') to a Progress. " +
|
|
6
|
-
"Suitable for linear flows with one external operator besides OrderHolder.",
|
|
7
|
-
applicable_scenes: ["progress_named_operator", "progress_task_submit"],
|
|
8
|
-
industry_tags: ["universal", "ecommerce"],
|
|
9
|
-
params: [
|
|
10
|
-
{ name: "progress_address", type: "address", description: "Progress object address", required: true },
|
|
11
|
-
{ name: "operator_name", type: "name", description: "named_operator name (e.g. 'seller', 'logistics')", required: true },
|
|
12
|
-
{ name: "operator_address", type: "address", description: "Single operator address", required: true },
|
|
13
|
-
],
|
|
14
|
-
body: (p) => ({
|
|
15
|
-
object: p.progress_address,
|
|
16
|
-
progress_namedOperator: {
|
|
17
|
-
op: "set",
|
|
18
|
-
name: p.operator_name,
|
|
19
|
-
operators: [p.operator_address],
|
|
20
|
-
},
|
|
21
|
-
}),
|
|
22
|
-
notes: [
|
|
23
|
-
"Use 'set' for initial assignment (REPLACE list); use 'add' for extending existing list",
|
|
24
|
-
"Operator name must be a valid NAME (common::NAME) — non-empty, length-bounded",
|
|
25
|
-
"Empty name '' is reserved for OrderHolder — do not use here",
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
id: "T-PR-02",
|
|
30
|
-
name: "Multi named_operator collaborative workflow",
|
|
31
|
-
description: "Bind multiple named_operator roles in one transaction (e.g. seller + logistics + reviewer). " +
|
|
32
|
-
"Suitable for collaborative workflows where different roles advance different forwards.",
|
|
33
|
-
applicable_scenes: ["progress_named_operator"],
|
|
34
|
-
industry_tags: ["logistics", "arbitration", "freelance"],
|
|
35
|
-
params: [
|
|
36
|
-
{ name: "progress_address", type: "address", description: "Progress object address", required: true },
|
|
37
|
-
{ name: "roles", type: "string[]", description: "named_operator names (e.g. ['seller','logistics','reviewer'])", required: true },
|
|
38
|
-
{ name: "addresses_per_role", type: "string", description: "Comma-separated addresses per role, semicolon-separated roles (e.g. '0xA,0xB;0xC;0xD,0xE')", required: true },
|
|
39
|
-
],
|
|
40
|
-
body: (p) => {
|
|
41
|
-
const roles = p.roles;
|
|
42
|
-
const roleAddrStrings = p.addresses_per_role.split(";");
|
|
43
|
-
const operations = [];
|
|
44
|
-
for (let i = 0; i < roles.length; i++) {
|
|
45
|
-
const roleName = roles[i];
|
|
46
|
-
const addrs = (roleAddrStrings[i] ?? "").split(",").map(s => s.trim()).filter(s => s.length > 0);
|
|
47
|
-
operations.push({
|
|
48
|
-
object: p.progress_address,
|
|
49
|
-
progress_namedOperator: {
|
|
50
|
-
op: "set",
|
|
51
|
-
name: roleName,
|
|
52
|
-
operators: addrs,
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
_batch: operations,
|
|
58
|
-
_note: "Each entry is a separate CallProgress_Data; submit all in one transaction",
|
|
59
|
-
};
|
|
60
|
-
},
|
|
61
|
-
notes: [
|
|
62
|
-
"Each role must satisfy common::NAME — non-empty, length-bounded",
|
|
63
|
-
"Total roles ≤ MAX_NAMED_OPERATOR_COUNT (60); each role's addresses ≤ MAX_NAMED_OPERATOR_ADDRESS_COUNT (80)",
|
|
64
|
-
"Submit all operations in a single transaction for atomicity",
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
id: "T-PR-03",
|
|
69
|
-
name: "Context_repository binding workflow",
|
|
70
|
-
description: "Bind context Repository objects to a Progress for query-time context " +
|
|
71
|
-
"(learning progress, inspection records, bridge state). Up to 30 repositories.",
|
|
72
|
-
applicable_scenes: ["progress_context_repository"],
|
|
73
|
-
industry_tags: ["education", "content", "rental", "cross_chain"],
|
|
74
|
-
params: [
|
|
75
|
-
{ name: "progress_address", type: "address", description: "Progress object address", required: true },
|
|
76
|
-
{ name: "repository_addresses", type: "string[]", description: "Repository object addresses to bind", required: true },
|
|
77
|
-
{ name: "op", type: "string", description: "Operation: 'add' (extend) | 'set' (replace) | 'remove' | 'clear'", required: false, default: "add" },
|
|
78
|
-
],
|
|
79
|
-
body: (p) => ({
|
|
80
|
-
object: p.progress_address,
|
|
81
|
-
repository: {
|
|
82
|
-
op: p.op || "add",
|
|
83
|
-
objects: p.repository_addresses,
|
|
84
|
-
},
|
|
85
|
-
}),
|
|
86
|
-
notes: [
|
|
87
|
-
"op='add' is idempotent (vector::contains check); op='set' clears then adds",
|
|
88
|
-
"Total count ≤ MAX_CONTEXT_REPOSITORY_COUNT (30); E_MAX_CONTEXT_REPOSITORY_COUNT on overflow",
|
|
89
|
-
"Binding creates Registrar affiliation — remove before deleting Repository to avoid dangling refs",
|
|
90
|
-
"Bind BEFORE forward advance so on-chain guards can read context data",
|
|
91
|
-
],
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
id: "T-PR-04",
|
|
95
|
-
name: "Forward advancement workflow",
|
|
96
|
-
description: "Advance a Progress forward (next or hold). Forwards are defined in the bound Machine; " +
|
|
97
|
-
"this template emits the operate payload for a single forward step.",
|
|
98
|
-
applicable_scenes: ["progress_completed", "progress_unhold"],
|
|
99
|
-
industry_tags: ["universal"],
|
|
100
|
-
params: [
|
|
101
|
-
{ name: "progress_address", type: "address", description: "Progress object address", required: true },
|
|
102
|
-
{ name: "next_node_name", type: "name", description: "Target node name (must exist in Machine)", required: true },
|
|
103
|
-
{ name: "forward", type: "name", description: "Forward name (from current → next_node_name)", required: true },
|
|
104
|
-
{ name: "op", type: "string", description: "'next' to advance the forward, 'hold' to lock the forward", required: false, default: "next" },
|
|
105
|
-
{ name: "message", type: "string", description: "Deliverable message (≤ MAX_LONG_NAME_LENGTH)", required: false, default: "" },
|
|
106
|
-
],
|
|
107
|
-
body: (p) => ({
|
|
108
|
-
object: p.progress_address,
|
|
109
|
-
operate: {
|
|
110
|
-
operation: {
|
|
111
|
-
next_node_name: p.next_node_name,
|
|
112
|
-
forward: p.forward,
|
|
113
|
-
},
|
|
114
|
-
op: p.op || "next",
|
|
115
|
-
message: p.message || "",
|
|
116
|
-
},
|
|
117
|
-
}),
|
|
118
|
-
notes: [
|
|
119
|
-
"Forward must exist in Machine: query machine::info_borrow(machine, current, next_node, forward)",
|
|
120
|
-
"If Forward.guard is Some, use *_with_passport variant (SDK auto-selects based on submission)",
|
|
121
|
-
"If Forward.namedOperator is set, caller must be in that operator list (IsNamedOperator short-circuit)",
|
|
122
|
-
"op='hold' blocks the forward; op='next' advances it; op='unhold' self-releases; op='adminUnhold' force-releases via 224",
|
|
123
|
-
],
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
id: "T-PR-05",
|
|
127
|
-
name: "Unhold / adminUnhold workflow",
|
|
128
|
-
description: "Release a previously-held forward. Two modes: (a) self-unhold by original holder (op='unhold'); " +
|
|
129
|
-
"(b) adminUnhold via 224 permission to bypass holder check (op='adminUnhold', deadlock recovery).",
|
|
130
|
-
applicable_scenes: ["progress_unhold"],
|
|
131
|
-
industry_tags: ["content", "rental", "arbitration", "subscription"],
|
|
132
|
-
params: [
|
|
133
|
-
{ name: "progress_address", type: "address", description: "Progress object address", required: true },
|
|
134
|
-
{ name: "next_node_name", type: "name", description: "Target node name (matches the held forward)", required: true },
|
|
135
|
-
{ name: "forward", type: "name", description: "Forward name (matches the held forward)", required: true },
|
|
136
|
-
{ name: "admin_unhold", type: "string", description: "'true' to force-release via 224 permission (op='adminUnhold'); 'false' for self-unhold (op='unhold')", required: false, default: "false" },
|
|
137
|
-
{ name: "message", type: "string", description: "Release message (≤ MAX_LONG_NAME_LENGTH)", required: false, default: "" },
|
|
138
|
-
],
|
|
139
|
-
body: (p) => ({
|
|
140
|
-
object: p.progress_address,
|
|
141
|
-
operate: {
|
|
142
|
-
operation: {
|
|
143
|
-
next_node_name: p.next_node_name,
|
|
144
|
-
forward: p.forward,
|
|
145
|
-
},
|
|
146
|
-
op: p.admin_unhold === "true" ? "adminUnhold" : "unhold",
|
|
147
|
-
message: p.message || "",
|
|
148
|
-
},
|
|
149
|
-
}),
|
|
150
|
-
notes: [
|
|
151
|
-
"op='unhold': sender must == Holder.who; else E_NOT_THE_HOLDER",
|
|
152
|
-
"op='adminUnhold': requires 224 permission (PROGRESS_UNHOLD); bypasses holder check",
|
|
153
|
-
"Re-hold on already-accomplished forward → E_FORWARD_ALREADY_ACCOMPLISHED",
|
|
154
|
-
"Use adminUnhold sparingly — log every invocation for audit",
|
|
155
|
-
],
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
id: "T-PR-06",
|
|
159
|
-
name: "Owner receive workflow",
|
|
160
|
-
description: "Owner receives Receiving<K> objects or CoinWrapper<T> coins at a terminal node. " +
|
|
161
|
-
"Unwraps via Payment.unwrap_with_check; forwards to Permission owner. " +
|
|
162
|
-
"Note: NOT exposed in CallProgress_Data — direct Move call required.",
|
|
163
|
-
applicable_scenes: ["progress_owner_receive"],
|
|
164
|
-
industry_tags: ["finance", "treasury", "rental", "freelance"],
|
|
165
|
-
params: [
|
|
166
|
-
{ name: "progress_address", type: "address", description: "Progress object address", required: true },
|
|
167
|
-
{ name: "machine_address", type: "address", description: "Bound Machine object address", required: true },
|
|
168
|
-
{ name: "permission_address", type: "address", description: "Machine's Permission object address", required: true },
|
|
169
|
-
{ name: "asset_type", type: "string", description: "'coin' or 'object'", required: true },
|
|
170
|
-
{ name: "received_object", type: "address", description: "Receiving<K> object address (the received 'envelope')", required: true },
|
|
171
|
-
{ name: "payment_object", type: "address", description: "Payment<T> object address (only for asset_type='coin')", required: false },
|
|
172
|
-
],
|
|
173
|
-
body: (p) => ({
|
|
174
|
-
_note: "This operation is NOT exposed via CallProgress_Data; must be called via direct Move call.",
|
|
175
|
-
_move_target: p.asset_type === "coin"
|
|
176
|
-
? "progress::owner_receive<T>"
|
|
177
|
-
: "progress::owner_receive_object<K>",
|
|
178
|
-
_arguments: p.asset_type === "coin"
|
|
179
|
-
? [p.progress_address, p.machine_address, p.permission_address, p.received_object, p.payment_object]
|
|
180
|
-
: [p.progress_address, p.machine_address, p.permission_address, p.received_object],
|
|
181
|
-
_permission_required: 225,
|
|
182
|
-
_permission_label: "PROGRESS_OWNER_RECEIVE",
|
|
183
|
-
}),
|
|
184
|
-
notes: [
|
|
185
|
-
"Permission 225 (PROGRESS_OWNER_RECEIVE) is required; SDK CallProgress_Data does NOT expose this op",
|
|
186
|
-
"Recipient is Permission owner (Machine.permission's owner), NOT Progress creator",
|
|
187
|
-
"Triggered at terminal nodes: 'return_approved', 'completed', 'enforced', 'paid'",
|
|
188
|
-
"For coins: Payment.unwrap_with_check validates amount before forwarding to owner",
|
|
189
|
-
"For objects: generic K:key+store — forwarded directly via permission::owner_receive_inner",
|
|
190
|
-
],
|
|
191
|
-
},
|
|
192
|
-
];
|
|
193
|
-
export const PROGRESS_TEMPLATES_VERSION = "1.0.0";
|
|
194
|
-
export function getAllProgressTemplates() {
|
|
195
|
-
return [...PROGRESS_TEMPLATES];
|
|
196
|
-
}
|
|
197
|
-
export function getProgressTemplateById(id) {
|
|
198
|
-
return PROGRESS_TEMPLATES.find(t => t.id === id);
|
|
199
|
-
}
|
|
200
|
-
export function getProgressTemplatesByScene(sceneId) {
|
|
201
|
-
return PROGRESS_TEMPLATES.filter(t => t.applicable_scenes.includes(sceneId));
|
|
202
|
-
}
|
|
203
|
-
export function getProgressTemplatesByIndustry(industry) {
|
|
204
|
-
return PROGRESS_TEMPLATES.filter(t => t.industry_tags.includes(industry) || t.industry_tags.includes("universal"));
|
|
205
|
-
}
|
|
206
|
-
export function suggestProgressTemplateForScene(sceneId) {
|
|
207
|
-
const matches = getProgressTemplatesByScene(sceneId);
|
|
208
|
-
return matches.length > 0 ? matches[0] : undefined;
|
|
209
|
-
}
|
|
210
|
-
export function listProgressTemplates() {
|
|
211
|
-
return PROGRESS_TEMPLATES.map(t => ({
|
|
212
|
-
id: t.id,
|
|
213
|
-
name: t.name,
|
|
214
|
-
description: t.description,
|
|
215
|
-
scenes: t.applicable_scenes,
|
|
216
|
-
}));
|
|
217
|
-
}
|
|
218
|
-
export function fillProgressTemplate(templateId, params) {
|
|
219
|
-
const tpl = getProgressTemplateById(templateId);
|
|
220
|
-
if (!tpl)
|
|
221
|
-
return { ok: false, error: `Template ${templateId} not found` };
|
|
222
|
-
for (const p of tpl.params) {
|
|
223
|
-
if (p.required && !(p.name in params)) {
|
|
224
|
-
return { ok: false, error: `Missing required param: ${p.name}` };
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
return { ok: true, body: tpl.body(params) };
|
|
228
|
-
}
|
|
1
|
+
export const PROGRESS_TEMPLATES=[{'id':'T-PR-01','name':'Single\x20named_operator\x20workflow','description':'Bind\x20a\x20single\x20named_operator\x20role\x20(e.g.\x20\x27seller\x27\x20or\x20\x27logistics\x27)\x20to\x20a\x20Progress.\x20'+'Suitable\x20for\x20linear\x20flows\x20with\x20one\x20external\x20operator\x20besides\x20OrderHolder.','applicable_scenes':['progress_named_operator','progress_task_submit'],'industry_tags':['universal','ecommerce'],'params':[{'name':'progress_address','type':'address','description':'Progress\x20object\x20address','required':!![]},{'name':'operator_name','type':'name','description':'named_operator\x20name\x20(e.g.\x20\x27seller\x27,\x20\x27logistics\x27)','required':!![]},{'name':'operator_address','type':'address','description':'Single\x20operator\x20address','required':!![]}],'body':a=>({'object':a['progress_address'],'progress_namedOperator':{'op':'set','name':a['operator_name'],'operators':[a['operator_address']]}}),'notes':['Use\x20\x27set\x27\x20for\x20initial\x20assignment\x20(REPLACE\x20list);\x20use\x20\x27add\x27\x20for\x20extending\x20existing\x20list','Operator\x20name\x20must\x20be\x20a\x20valid\x20NAME\x20(common::NAME)\x20—\x20non-empty,\x20length-bounded','Empty\x20name\x20\x27\x27\x20is\x20reserved\x20for\x20OrderHolder\x20—\x20do\x20not\x20use\x20here']},{'id':'T-PR-02','name':'Multi\x20named_operator\x20collaborative\x20workflow','description':'Bind\x20multiple\x20named_operator\x20roles\x20in\x20one\x20transaction\x20(e.g.\x20seller\x20+\x20logistics\x20+\x20reviewer).\x20'+'Suitable\x20for\x20collaborative\x20workflows\x20where\x20different\x20roles\x20advance\x20different\x20forwards.','applicable_scenes':['progress_named_operator'],'industry_tags':['logistics','arbitration','freelance'],'params':[{'name':'progress_address','type':'address','description':'Progress\x20object\x20address','required':!![]},{'name':'roles','type':'string[]','description':'named_operator\x20names\x20(e.g.\x20[\x27seller\x27,\x27logistics\x27,\x27reviewer\x27])','required':!![]},{'name':'addresses_per_role','type':'string','description':'Comma-separated\x20addresses\x20per\x20role,\x20semicolon-separated\x20roles\x20(e.g.\x20\x270xA,0xB;0xC;0xD,0xE\x27)','required':!![]}],'body':a=>{const b=a['roles'],c=a['addresses_per_role']['split'](';'),d=[];for(let e=0x0;e<b['length'];e++){const f=b[e],g=(c[e]??'')['split'](',')['map'](h=>h['trim']())['filter'](h=>h['length']>0x0);d['push']({'object':a['progress_address'],'progress_namedOperator':{'op':'set','name':f,'operators':g}});}return{'_batch':d,'_note':'Each\x20entry\x20is\x20a\x20separate\x20CallProgress_Data;\x20submit\x20all\x20in\x20one\x20transaction'};},'notes':['Each\x20role\x20must\x20satisfy\x20common::NAME\x20—\x20non-empty,\x20length-bounded','Total\x20roles\x20≤\x20MAX_NAMED_OPERATOR_COUNT\x20(60);\x20each\x20role\x27s\x20addresses\x20≤\x20MAX_NAMED_OPERATOR_ADDRESS_COUNT\x20(80)','Submit\x20all\x20operations\x20in\x20a\x20single\x20transaction\x20for\x20atomicity']},{'id':'T-PR-03','name':'Context_repository\x20binding\x20workflow','description':'Bind\x20context\x20Repository\x20objects\x20to\x20a\x20Progress\x20for\x20query-time\x20context\x20'+'(learning\x20progress,\x20inspection\x20records,\x20bridge\x20state).\x20Up\x20to\x2030\x20repositories.','applicable_scenes':['progress_context_repository'],'industry_tags':['education','content','rental','cross_chain'],'params':[{'name':'progress_address','type':'address','description':'Progress\x20object\x20address','required':!![]},{'name':'repository_addresses','type':'string[]','description':'Repository\x20object\x20addresses\x20to\x20bind','required':!![]},{'name':'op','type':'string','description':'Operation:\x20\x27add\x27\x20(extend)\x20|\x20\x27set\x27\x20(replace)\x20|\x20\x27remove\x27\x20|\x20\x27clear\x27','required':![],'default':'add'}],'body':a=>({'object':a['progress_address'],'repository':{'op':a['op']||'add','objects':a['repository_addresses']}}),'notes':['op=\x27add\x27\x20is\x20idempotent\x20(vector::contains\x20check);\x20op=\x27set\x27\x20clears\x20then\x20adds','Total\x20count\x20≤\x20MAX_CONTEXT_REPOSITORY_COUNT\x20(30);\x20E_MAX_CONTEXT_REPOSITORY_COUNT\x20on\x20overflow','Binding\x20creates\x20Registrar\x20affiliation\x20—\x20remove\x20before\x20deleting\x20Repository\x20to\x20avoid\x20dangling\x20refs','Bind\x20BEFORE\x20forward\x20advance\x20so\x20on-chain\x20guards\x20can\x20read\x20context\x20data']},{'id':'T-PR-04','name':'Forward\x20advancement\x20workflow','description':'Advance\x20a\x20Progress\x20forward\x20(next\x20or\x20hold).\x20Forwards\x20are\x20defined\x20in\x20the\x20bound\x20Machine;\x20'+'this\x20template\x20emits\x20the\x20operate\x20payload\x20for\x20a\x20single\x20forward\x20step.','applicable_scenes':['progress_completed','progress_unhold'],'industry_tags':['universal'],'params':[{'name':'progress_address','type':'address','description':'Progress\x20object\x20address','required':!![]},{'name':'next_node_name','type':'name','description':'Target\x20node\x20name\x20(must\x20exist\x20in\x20Machine)','required':!![]},{'name':'forward','type':'name','description':'Forward\x20name\x20(from\x20current\x20→\x20next_node_name)','required':!![]},{'name':'op','type':'string','description':'\x27next\x27\x20to\x20advance\x20the\x20forward,\x20\x27hold\x27\x20to\x20lock\x20the\x20forward','required':![],'default':'next'},{'name':'message','type':'string','description':'Deliverable\x20message\x20(≤\x20MAX_LONG_NAME_LENGTH)','required':![],'default':''}],'body':a=>({'object':a['progress_address'],'operate':{'operation':{'next_node_name':a['next_node_name'],'forward':a['forward']},'op':a['op']||'next','message':a['message']||''}}),'notes':['Forward\x20must\x20exist\x20in\x20Machine:\x20query\x20machine::info_borrow(machine,\x20current,\x20next_node,\x20forward)','If\x20Forward.guard\x20is\x20Some,\x20use\x20*_with_passport\x20variant\x20(SDK\x20auto-selects\x20based\x20on\x20submission)','If\x20Forward.namedOperator\x20is\x20set,\x20caller\x20must\x20be\x20in\x20that\x20operator\x20list\x20(IsNamedOperator\x20short-circuit)','op=\x27hold\x27\x20blocks\x20the\x20forward;\x20op=\x27next\x27\x20advances\x20it;\x20op=\x27unhold\x27\x20self-releases;\x20op=\x27adminUnhold\x27\x20force-releases\x20via\x20224']},{'id':'T-PR-05','name':'Unhold\x20/\x20adminUnhold\x20workflow','description':'Release\x20a\x20previously-held\x20forward.\x20Two\x20modes:\x20(a)\x20self-unhold\x20by\x20original\x20holder\x20(op=\x27unhold\x27);\x20'+'(b)\x20adminUnhold\x20via\x20224\x20permission\x20to\x20bypass\x20holder\x20check\x20(op=\x27adminUnhold\x27,\x20deadlock\x20recovery).','applicable_scenes':['progress_unhold'],'industry_tags':['content','rental','arbitration','subscription'],'params':[{'name':'progress_address','type':'address','description':'Progress\x20object\x20address','required':!![]},{'name':'next_node_name','type':'name','description':'Target\x20node\x20name\x20(matches\x20the\x20held\x20forward)','required':!![]},{'name':'forward','type':'name','description':'Forward\x20name\x20(matches\x20the\x20held\x20forward)','required':!![]},{'name':'admin_unhold','type':'string','description':'\x27true\x27\x20to\x20force-release\x20via\x20224\x20permission\x20(op=\x27adminUnhold\x27);\x20\x27false\x27\x20for\x20self-unhold\x20(op=\x27unhold\x27)','required':![],'default':'false'},{'name':'message','type':'string','description':'Release\x20message\x20(≤\x20MAX_LONG_NAME_LENGTH)','required':![],'default':''}],'body':a=>({'object':a['progress_address'],'operate':{'operation':{'next_node_name':a['next_node_name'],'forward':a['forward']},'op':a['admin_unhold']==='true'?'adminUnhold':'unhold','message':a['message']||''}}),'notes':['op=\x27unhold\x27:\x20sender\x20must\x20==\x20Holder.who;\x20else\x20E_NOT_THE_HOLDER','op=\x27adminUnhold\x27:\x20requires\x20224\x20permission\x20(PROGRESS_UNHOLD);\x20bypasses\x20holder\x20check','Re-hold\x20on\x20already-accomplished\x20forward\x20→\x20E_FORWARD_ALREADY_ACCOMPLISHED','Use\x20adminUnhold\x20sparingly\x20—\x20log\x20every\x20invocation\x20for\x20audit']},{'id':'T-PR-06','name':'Owner\x20receive\x20workflow','description':'Owner\x20receives\x20Receiving<K>\x20objects\x20or\x20CoinWrapper<T>\x20coins\x20at\x20a\x20terminal\x20node.\x20'+'Unwraps\x20via\x20Payment.unwrap_with_check;\x20forwards\x20to\x20Permission\x20owner.\x20'+'Note:\x20NOT\x20exposed\x20in\x20CallProgress_Data\x20—\x20direct\x20Move\x20call\x20required.','applicable_scenes':['progress_owner_receive'],'industry_tags':['finance','treasury','rental','freelance'],'params':[{'name':'progress_address','type':'address','description':'Progress\x20object\x20address','required':!![]},{'name':'machine_address','type':'address','description':'Bound\x20Machine\x20object\x20address','required':!![]},{'name':'permission_address','type':'address','description':'Machine\x27s\x20Permission\x20object\x20address','required':!![]},{'name':'asset_type','type':'string','description':'\x27coin\x27\x20or\x20\x27object\x27','required':!![]},{'name':'received_object','type':'address','description':'Receiving<K>\x20object\x20address\x20(the\x20received\x20\x27envelope\x27)','required':!![]},{'name':'payment_object','type':'address','description':'Payment<T>\x20object\x20address\x20(only\x20for\x20asset_type=\x27coin\x27)','required':![]}],'body':a=>({'_note':'This\x20operation\x20is\x20NOT\x20exposed\x20via\x20CallProgress_Data;\x20must\x20be\x20called\x20via\x20direct\x20Move\x20call.','_move_target':a['asset_type']==='coin'?'progress::owner_receive<T>':'progress::owner_receive_object<K>','_arguments':a['asset_type']==='coin'?[a['progress_address'],a['machine_address'],a['permission_address'],a['received_object'],a['payment_object']]:[a['progress_address'],a['machine_address'],a['permission_address'],a['received_object']],'_permission_required':0xe1,'_permission_label':'PROGRESS_OWNER_RECEIVE'}),'notes':['Permission\x20225\x20(PROGRESS_OWNER_RECEIVE)\x20is\x20required;\x20SDK\x20CallProgress_Data\x20does\x20NOT\x20expose\x20this\x20op','Recipient\x20is\x20Permission\x20owner\x20(Machine.permission\x27s\x20owner),\x20NOT\x20Progress\x20creator','Triggered\x20at\x20terminal\x20nodes:\x20\x27return_approved\x27,\x20\x27completed\x27,\x20\x27enforced\x27,\x20\x27paid\x27','For\x20coins:\x20Payment.unwrap_with_check\x20validates\x20amount\x20before\x20forwarding\x20to\x20owner','For\x20objects:\x20generic\x20K:key+store\x20—\x20forwarded\x20directly\x20via\x20permission::owner_receive_inner']}];export const PROGRESS_TEMPLATES_VERSION='1.0.0';export function getAllProgressTemplates(){return[...PROGRESS_TEMPLATES];}export function getProgressTemplateById(a){return PROGRESS_TEMPLATES['find'](b=>b['id']===a);}export function getProgressTemplatesByScene(a){return PROGRESS_TEMPLATES['filter'](b=>b['applicable_scenes']['includes'](a));}export function getProgressTemplatesByIndustry(a){return PROGRESS_TEMPLATES['filter'](b=>b['industry_tags']['includes'](a)||b['industry_tags']['includes']('universal'));}export function suggestProgressTemplateForScene(a){const b=getProgressTemplatesByScene(a);return b['length']>0x0?b[0x0]:undefined;}export function listProgressTemplates(){return PROGRESS_TEMPLATES['map'](a=>({'id':a['id'],'name':a['name'],'description':a['description'],'scenes':a['applicable_scenes']}));}export function fillProgressTemplate(a,b){const c=getProgressTemplateById(a);if(!c)return{'ok':![],'error':'Template\x20'+a+'\x20not\x20found'};for(const d of c['params']){if(d['required']&&!(d['name']in b))return{'ok':![],'error':'Missing\x20required\x20param:\x20'+d['name']};}return{'ok':!![],'body':c['body'](b)};}
|