@wowok/agent-mcp 3.2.7 → 3.2.9

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.
Files changed (185) hide show
  1. package/dist/chain-semantics/field-capability.js +1 -1
  2. package/dist/chain-semantics/fund-flow.js +1 -1
  3. package/dist/chain-semantics/guard-verbs.js +1 -1
  4. package/dist/chain-semantics/object-graph.js +1 -1
  5. package/dist/composition/audit.js +1 -1
  6. package/dist/composition/compile.js +1 -1
  7. package/dist/composition/inflight.d.ts +10 -0
  8. package/dist/composition/inflight.js +1 -1
  9. package/dist/extensions/business-modules.d.ts +1 -1
  10. package/dist/extensions/business-modules.js +1 -1
  11. package/dist/graph/onchain/edge-schema.js +1 -1
  12. package/dist/harness/index.d.ts +1 -0
  13. package/dist/harness/index.js +1 -1
  14. package/dist/harness/operation-id.d.ts +1 -0
  15. package/dist/harness/operation-id.js +1 -0
  16. package/dist/harness/recover.js +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/knowledge/arbitration-ledger.js +1 -1
  19. package/dist/knowledge/audit-rules.js +1 -1
  20. package/dist/knowledge/baselines/rules/guard.json +96 -1
  21. package/dist/knowledge/baselines/rules/plan.json +30 -7
  22. package/dist/knowledge/baselines/semantic-facts.js +1 -1
  23. package/dist/knowledge/builtin-templates.d.ts +1 -1
  24. package/dist/knowledge/builtin-templates.js +1 -1
  25. package/dist/knowledge/discount-threshold.d.ts +11 -0
  26. package/dist/knowledge/discount-threshold.js +1 -1
  27. package/dist/knowledge/fund-layer.js +1 -1
  28. package/dist/knowledge/getting-started.js +1 -1
  29. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  30. package/dist/knowledge/guard-design-patterns.js +1 -1
  31. package/dist/knowledge/guard-field-cognition.js +1 -1
  32. package/dist/knowledge/guard-ledger.js +1 -1
  33. package/dist/knowledge/guard-lint.js +1 -1
  34. package/dist/knowledge/guard-render.js +1 -1
  35. package/dist/knowledge/guard-risk.d.ts +1 -0
  36. package/dist/knowledge/guard-risk.js +1 -1
  37. package/dist/knowledge/guard-submission-brief.d.ts +6 -0
  38. package/dist/knowledge/guard-submission-brief.js +1 -1
  39. package/dist/knowledge/guard-templates.d.ts +2 -2
  40. package/dist/knowledge/guard-templates.js +1 -1
  41. package/dist/knowledge/index.js +1 -1
  42. package/dist/knowledge/industry-registry.js +1 -1
  43. package/dist/knowledge/jsonrpc-enum.js +1 -1
  44. package/dist/knowledge/order-ledger.js +1 -1
  45. package/dist/knowledge/reward-ledger.js +1 -1
  46. package/dist/knowledge/safety-rules.js +1 -1
  47. package/dist/knowledge/template-loader.js +1 -1
  48. package/dist/knowledge/template-registry.js +1 -1
  49. package/dist/knowledge/template-scanner.d.ts +2 -0
  50. package/dist/knowledge/template-scanner.js +1 -1
  51. package/dist/knowledge/tool-constraints.js +1 -1
  52. package/dist/knowledge/workflow-guidance.d.ts +7 -3
  53. package/dist/knowledge/workflow-guidance.js +1 -1
  54. package/dist/monitor/MonitorLoop.js +1 -1
  55. package/dist/participation/radar-core.d.ts +1 -1
  56. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  57. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  58. package/dist/playbooks/service-build/merchant-guide.d.ts +8 -0
  59. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  60. package/dist/playbooks/service-build/object-panorama.d.ts +28 -1
  61. package/dist/playbooks/service-build/object-panorama.js +1 -1
  62. package/dist/playbooks/service-build/participation-radar.d.ts +2 -0
  63. package/dist/playbooks/service-build/participation-radar.js +1 -1
  64. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  65. package/dist/playbooks/service-build/reverse-mapping-nk4.spec.js +1 -1
  66. package/dist/playbooks/service-build/reverse-mapping.js +1 -1
  67. package/dist/playbooks/service-build/service-panorama.js +1 -1
  68. package/dist/playbooks/service-build/service-quote.js +1 -1
  69. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  70. package/dist/review/index.js +1 -1
  71. package/dist/safety/confirm-gate.js +1 -1
  72. package/dist/safety/preview.d.ts +1 -0
  73. package/dist/safety/preview.js +1 -1
  74. package/dist/schema/benchmark-migration/index.d.ts +14 -0
  75. package/dist/schema/benchmark-migration/index.js +1 -1
  76. package/dist/schema/call/allocation.d.ts +1 -1
  77. package/dist/schema/call/arbitration.d.ts +4 -4
  78. package/dist/schema/call/arbitration.js +1 -1
  79. package/dist/schema/call/base.d.ts +13 -5
  80. package/dist/schema/call/base.js +1 -1
  81. package/dist/schema/call/bridge.d.ts +2 -0
  82. package/dist/schema/call/contact.d.ts +1 -1
  83. package/dist/schema/call/demand.d.ts +1 -1
  84. package/dist/schema/call/error-codes.d.ts +1 -1
  85. package/dist/schema/call/error-codes.js +1 -1
  86. package/dist/schema/call/guard.d.ts +3 -3
  87. package/dist/schema/call/guard.js +1 -1
  88. package/dist/schema/call/handler.js +1 -1
  89. package/dist/schema/call/machine.d.ts +1 -1
  90. package/dist/schema/call/machine.js +1 -1
  91. package/dist/schema/call/order.d.ts +1 -1
  92. package/dist/schema/call/order.js +1 -1
  93. package/dist/schema/call/permission.d.ts +1 -1
  94. package/dist/schema/call/personal.d.ts +4 -4
  95. package/dist/schema/call/progress.d.ts +1 -1
  96. package/dist/schema/call/progress.js +1 -1
  97. package/dist/schema/call/proof.js +1 -1
  98. package/dist/schema/call/repository.d.ts +5 -5
  99. package/dist/schema/call/repository.js +1 -1
  100. package/dist/schema/call/reward.d.ts +1 -1
  101. package/dist/schema/call/reward.js +1 -1
  102. package/dist/schema/call/semantic.js +1 -1
  103. package/dist/schema/call/service.d.ts +4 -1
  104. package/dist/schema/call/service.js +1 -1
  105. package/dist/schema/call/treasury.d.ts +1 -1
  106. package/dist/schema/common/index.d.ts +4 -4
  107. package/dist/schema/common/index.js +1 -1
  108. package/dist/schema/goal/index.d.ts +12 -0
  109. package/dist/schema/goal/planning.d.ts +18 -0
  110. package/dist/schema/goal/planning.js +1 -1
  111. package/dist/schema/local/index.d.ts +21 -0
  112. package/dist/schema/local/index.js +1 -1
  113. package/dist/schema/messenger/index.js +1 -1
  114. package/dist/schema/operations.d.ts +22 -21
  115. package/dist/schema/query/bi.d.ts +6 -6
  116. package/dist/schema/query/bi.js +1 -1
  117. package/dist/schema/query/index.d.ts +112 -54
  118. package/dist/schema/query/index.js +1 -1
  119. package/dist/schema/schema-query/index.d.ts +1 -0
  120. package/dist/schema/schema-query/index.js +1 -1
  121. package/dist/schema/schema-version.js +1 -1
  122. package/dist/schema/utils/permission-machine-check.d.ts +2 -0
  123. package/dist/schema/utils/permission-machine-check.js +1 -1
  124. package/dist/schema/workflow/index.d.ts +1 -1
  125. package/dist/schema-query-impl/index.js +1 -1
  126. package/dist/schemas/account_operation.output.json +2 -0
  127. package/dist/schemas/account_operation.schema.json +3 -3
  128. package/dist/schemas/benchmark_migration_operation.output.json +42 -0
  129. package/dist/schemas/benchmark_migration_operation.schema.json +13 -0
  130. package/dist/schemas/bridge_operation.output.json +2 -0
  131. package/dist/schemas/goal_operation.schema.json +26 -0
  132. package/dist/schemas/index.json +1 -1
  133. package/dist/schemas/local_cache_operation.output.json +2 -0
  134. package/dist/schemas/local_history_operation.output.json +2 -0
  135. package/dist/schemas/local_info_operation.output.json +2 -0
  136. package/dist/schemas/local_mark_operation.output.json +2 -0
  137. package/dist/schemas/messenger_operation.schema.json +4 -4
  138. package/dist/schemas/onchain_operations.output.json +7 -5
  139. package/dist/schemas/onchain_operations.schema.json +108 -92
  140. package/dist/schemas/onchain_operations_allocation.schema.json +5 -5
  141. package/dist/schemas/onchain_operations_arbitration.schema.json +10 -8
  142. package/dist/schemas/onchain_operations_contact.schema.json +6 -5
  143. package/dist/schemas/onchain_operations_demand.schema.json +6 -5
  144. package/dist/schemas/onchain_operations_gen_passport.schema.json +5 -5
  145. package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
  146. package/dist/schemas/onchain_operations_guard.schema.json +4 -4
  147. package/dist/schemas/onchain_operations_machine.schema.json +7 -6
  148. package/dist/schemas/onchain_operations_order.schema.json +8 -7
  149. package/dist/schemas/onchain_operations_permission.schema.json +1 -0
  150. package/dist/schemas/onchain_operations_personal.schema.json +2 -2
  151. package/dist/schemas/onchain_operations_progress.schema.json +8 -7
  152. package/dist/schemas/onchain_operations_proof.schema.json +6 -6
  153. package/dist/schemas/onchain_operations_repository.schema.json +10 -9
  154. package/dist/schemas/onchain_operations_reward.schema.json +8 -7
  155. package/dist/schemas/onchain_operations_service.schema.json +16 -11
  156. package/dist/schemas/onchain_operations_treasury.schema.json +6 -5
  157. package/dist/schemas/onchain_table_data.output.json +7 -7
  158. package/dist/schemas/query_toolkit.output.json +31 -30
  159. package/dist/schemas/query_toolkit.schema.json +1 -1
  160. package/dist/schemas/schema_query.schema.json +4 -0
  161. package/dist/schemas/workflow_operation.schema.json +5 -5
  162. package/dist/schemas/wowok_buildin_info.output.json +140 -3
  163. package/dist/schemas/wowok_buildin_info.schema.json +2 -2
  164. package/dist/tools/handlers/benchmark-migration.d.ts +22 -1
  165. package/dist/tools/handlers/benchmark-migration.js +1 -1
  166. package/dist/tools/handlers/config.js +1 -1
  167. package/dist/tools/handlers/dispatch-expectations.d.ts +0 -1
  168. package/dist/tools/handlers/dispatch-expectations.js +1 -1
  169. package/dist/tools/handlers/local.js +1 -1
  170. package/dist/tools/handlers/onchain.js +1 -1
  171. package/dist/tools/handlers/query.d.ts +1 -0
  172. package/dist/tools/handlers/query.js +1 -1
  173. package/dist/tools/handlers/review-chain.js +1 -1
  174. package/dist/tools/handlers/schema-query.js +1 -1
  175. package/dist/tools/index.js +1 -1
  176. package/dist/tools/move-fn-index.gen.js +1 -1
  177. package/dist/tools/registry/files.js +1 -1
  178. package/dist/tools/registry/query.js +1 -1
  179. package/dist/tools/rules-hook.js +1 -1
  180. package/dist/tools/upgrade-check.d.ts +23 -0
  181. package/dist/tools/upgrade-check.js +1 -1
  182. package/dist/tools/wip-deploy-assist.d.ts +6 -0
  183. package/dist/tools/wip-deploy-assist.js +1 -1
  184. package/dist/tools/wrap.js +1 -1
  185. package/package.json +2 -2
@@ -1 +1 @@
1
- import{buildWorkflowGuidance,buildWorkflowReceipt,enrichWorkflowGuidance,mergeGuidanceIntoOutput,resolvePermissionRole,resolveLocalNamesFor,listLocalAccounts,accountCanExecuteForward,enumerateActionableForwards,forwardOperatorKind}from'./workflow-guidance.js';import{CONFIRMATION_RULES,SAFETY_RULES_VERSION,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,classifyTool,NAMING_CONVENTIONS,checkObjectReuseRules,checkImmutabilityRules}from'./safety-rules.js';import{TOOL_CONSTRAINTS,TOOL_CONSTRAINTS_VERSION,validateOperation,hasBlockingViolations,getWarningViolations}from'./tool-constraints.js';import{REWARD_TEMPLATES,REWARD_TEMPLATES_VERSION,getRewardTemplate,listRewardTemplates,suggestRewardTemplate}from'./reward-templates.js';import{AUDIT_RULES,AUDIT_RULES_VERSION,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings}from'./audit-rules.js';import{suggestPricing,MUTABLE_FIELDS,DYNAMIC_PRICING_VERSION}from'./dynamic-pricing.js';import{computeReviewStats,isVerifiedReview,filterVerifiedReviews,detectReviewManipulation,REPUTATION_RULES_VERSION}from'./reputation-rules.js';import{INDUSTRY_FLYWHEELS,getFlywheelForIndustry,listIndustries,suggestAcquisitionActions,generateTrustDescription,buildAcquisitionDashboard,ACQUISITION_FLYWHEEL_VERSION}from'./acquisition-flywheel.js';import{INDUSTRY_REGISTRY_VERSION,getIndustryProfile,registerIndustry,getIndustryTraits,resolveIndustryName,isRegisteredIndustry,getRegistrySize,listBuiltinIndustryNames}from'./industry-registry.js';import{DEFAULT_TRAITS,inferTraitsFromDescription,synthesizeProfile,findSimilarIndustries,composeIndustries,INDUSTRY_REQUIRED_TRAITS,DOMAIN_PRIORS,detectDomainPriors,traitContradictions,filterConsistentIndustries}from'./industry-generalizer.js';import{INDUSTRY_EVOLUTION_THRESHOLDS,aggregateIndustryMetrics,evaluateIndustryHealth,suggestIndustryUpdate,applyIndustryUpdate,runIndustryHealthPipeline}from'./industry-evolution.js';import{FLYWHEEL_LOOP_VERSION,FLYWHEEL_LOOP_MIN_SIGNALS,recordIndustrySignal,updateIndustryCognition,injectEvolutionContext}from'./flywheel-loop.js';import{BUILTIN_INTENT_SPECS,registerIntentProfile,getIntentProfile,listIntents,evaluateIndustryHealthByIntent,suggestIndustryUpdateByIntent,evaluateIndustryHealthMultiIntent,getRoleAdvice,filterSuggestionsByRole}from'./intent-metrics.js';import{GUARD_SCENES,findScene,inferSceneFromAction,getImmutableScenes,getNumericIdentifierScenes}from'./guard-ledger.js';import{SEMANTIC_TO_SCHEMA_RULES,SCHEMA_TO_SEMANTIC_RULES,GUARD_CONSTRAINT_RULES,matchSemanticPattern,explainNode,explainWitness,getConstraintsByCategory}from'./guard-translation.js';import{checkPuzzleCompleteness,generateConfirmationText,initPuzzleFromIntent,inferBindingFromAction,emptyDataSources,getWitnessInfo,WITNESS_NAME_MAP}from'./guard-puzzle.js';import{runGuardRulePack,assembleGuardAssessment,getRiskRulesCount}from'./guard-risk.js';import{evaluateGuardDraft}from'./guard-eval.js';import{GUARD_BINDING_REGISTRY,GUARD_BINDINGS_VERSION,OWNER_RECEIVE_COGNITION,getGuardBindingsByObject,getGuardBinding,summarizeGuardBinding}from'./guard-bindings.js';import{SCENARIO_BRIDGE_REGISTRY,SCENARIO_CHAINS,SCENARIO_TOPOLOGY_VERSION,getBridgeById,getBridgeByCode,getBridgesByObject,getBridgesForEdge,detectBridgesForEdges,getChainById,summarizeBridge,detectBridgesForObjects}from'./scenario-topology.js';import{GUARD_TEMPLATES,GUARD_TEMPLATES_VERSION,GUARD_TEMPLATES_COUNT,getTemplatesByScene,getTemplateById,getTemplatesByIndustry,getTemplatesByPattern,listGuardTemplates,suggestTemplateForScene,getTemplateParameters,validateTemplateParams}from'./guard-templates.js';import{lintGuard,autoFixGuard,isGuardReady,getGuardErrors,formatLintResult}from'./guard-lint.js';import{MACHINE_SCENES,MACHINE_LEDGER_VERSION,MACHINE_SCENES_COUNT,findScene as a200a,getScenesByIndustry as a200b,getScenesByPattern,inferSceneFromFlow}from'./machine-ledger.js';import{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,getAllTemplates as a200c,getTemplateById as a200d,getTemplatesByScene as a200e,getTemplatesByIndustry as a200f,suggestTemplateForIntent,walkDecisionTree,fillTemplate as a200g,forkTemplate as a200h,verifyTemplateSceneReferences,getReferencedGuardTemplateIds,getReferencedRiskIds}from'./machine-templates.js';import{SEMANTIC_TO_MACHINE_RULES,MACHINE_CONSTRAINT_RULES,MACHINE_TRANSLATION_VERSION,MACHINE_PATTERNS_COUNT,MACHINE_CONSTRAINTS_COUNT,matchSemanticPattern as a200i,identifyExecutionMode,identifyTopology,explainForwardPermission,getConstraintsByCategory as a200j,getConstraintById,getOnChainConstraints as a200k,getOffChainConstraints as a200l}from'./machine-translation.js';import{MACHINE_RISK_RULES,MACHINE_RISK_VERSION,assessMachineRisks}from'./machine-risk.js';import{analyzeTopology,identifyTopologyPattern,formatTopologySummary,MACHINE_TOPOLOGY_VERSION,MAX_NODE_COUNT,MAX_NODE_PAIR_COUNT,MAX_FORWARD_COUNT}from'./machine-topology.js';import{initPuzzleFromIntent as a200m,initPuzzleFromTemplate,checkPuzzleCompleteness as a200n,recommendNextStep as a200o,derivePuzzleFromMachineJson,generateConfirmationText as a200p,MACHINE_PUZZLE_VERSION}from'./machine-puzzle.js';import{SERVICE_SCENES,SERVICE_LEDGER_VERSION,SERVICE_PERMISSIONS,SERVICE_ORDER_FLOW_STAGES,SERVICE_CROSS_OBJECT_BINDINGS,getScenesByCategory as a200q,findSceneById as a200r,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,inferSceneFromIntent as a200s,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,getCrossObjectBindings as a200t}from'./service-ledger.js';import{initPuzzleFromIntent as a200u,checkPuzzleCompleteness as a200v,validateConstraints as a200w,generateConfirmationText as a200x,initOrderFlowPuzzle,checkOrderFlowCompleteness}from'./service-puzzle.js';import{SERVICE_RISK_VERSION,assessServiceRisks,getAllServiceRiskRules}from'./service-risk.js';import{SERVICE_TEMPLATES,SERVICE_TEMPLATES_VERSION,getServiceTemplateById,getServiceTemplatesByScene,getServiceTemplatesByIndustry,suggestServiceTemplateForScene,listServiceTemplates,fillServiceTemplate,getAllServiceTemplates}from'./service-templates.js';import{ALLOCATION_SCENES,ALLOCATION_LEDGER_VERSION,MAX_ALLOCATOR_COUNT,ALLOCATION_MAX_SHARING_COUNT,ALLOCATION_MODE_AMOUNT,ALLOCATION_MODE_RATE,ALLOCATION_MODE_SURPLUS,RATE_TOTAL_FULL,ALLOCATION_ERROR_CODES,getScenesByTriggerSource as a200y,getScenesByMode as a200z,getScenesByStrategy as a200A,findSceneById as a200B,inferSceneFromIntent as a200C,getAllScenes as a200D,getScenesCount as a200E,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,getErrorName as a200F,getErrorDescription as a200G}from'./allocation-ledger.js';import{initPuzzleFromIntent as a200H,checkPuzzleCompleteness as a200I,validateConstraints as a200J,generateConfirmationText as a200K,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION}from'./allocation-puzzle.js';import{ALLOCATION_RISK_VERSION,assessAllocationRisks,getAllRiskRules as a200L}from'./allocation-risk.js';import{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,getAllTemplates as a200M,getTemplateById as a200N,getTemplatesByScene as a200O,getTemplatesByIndustry as a200P,suggestTemplateForScene as a200Q,listTemplates as a200R,fillTemplate as a200S}from'./allocation-templates.js';import{RECIPIENT_CONSTRAINT_VERSION,classifyRecipient,analyzeRecipientConstraints,isUnboundSignerTheft,canonicalDoctrine,recipientDesignGuidance,derivePayoffFromSharing,OBJECT_DRIVEABILITY,driveabilityOf,RECIPIENT_DESIGN_OPTIONS}from'./recipient-constraint.js';import{paymentRelations,scanRecentPaymentEvents,resolveBeneficialOwners,extractionPlanForHolder,pendingWrappersAt,trackAccountPayments}from'./payment-tracker.js';import{TREASURY_LEDGER_VERSION,TREASURY_SCENES,TREASURY_PERMISSIONS as a200T,getScenesByHostObject as a200U,findSceneById as a200V,findSceneByPermissionIndex as a200W,getBuiltinPermissionByIndex as a200X,isBuiltinTreasuryPermission,getActiveBuiltinPermissions as a200Y,getReservedBuiltinPermissions as a200Z,inferSceneFromIntent as a200a0,getTreasuryScenesCount,getGovernedOperationsForPermissionIndex as a200a1}from'./treasury-ledger.js';import{initPuzzleFromIntent as a200a2,checkPuzzleCompleteness as a200a3,validateConstraints as a200a4,generateConfirmationText as a200a5,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,MAX_DESCRIPTION_LENGTH as a200a6}from'./treasury-puzzle.js';import{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,getTemplateById as a200a7,getTemplatesByScene as a200a8,getTemplatesByIndustry as a200a9,suggestTemplateForScene as a200aa,listTemplates as a200ab,fillTemplate as a200ac}from'./treasury-templates.js';import{TREASURY_RISK_VERSION,assessTreasuryRisks,getAllTreasuryRiskRules}from'./treasury-risk.js';import{ORDER_LEDGER_VERSION,ORDER_SCENES,ORDER_FIELDS,ORDER_STATES,ORDER_STATE_TRANSITIONS,ORDER_LIFECYCLE_EVENTS,ORDER_PERMISSION_MATRIX,ORDER_AUDIT_FORMULAS,getScenesByOperationField as a200ad,findSceneById as a200ae,findSceneByMoveEntry as a200af,getScenesByPermissionLayer as a200ag,getScenesByReversibility as a200ah,getFieldDef as a200ai,getMutableFields as a200aj,getImmutableFields as a200ak,getFrozenAfterProgressFields as a200al,getOneTimeSetFields as a200am,inferSceneFromIntent as a200an,getEmittedEvents as a200ao,getInferredEvents as a200ap,getOrderScenesCount,sdkToMoveField as a200aq,moveToSdkField as a200ar}from'./order-ledger.js';import{initPuzzleFromIntent as a200as,checkPuzzleCompleteness as a200at,validateConstraints as a200au,generateConfirmationText as a200av,verifySnapshotMechanism as a200aw,inferLifecyclePhase as a200ax,matchSceneFromPuzzle as a200ay,listAllScenes as a200az,lookupScene as a200aA}from'./order-puzzle.js';import{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,getTemplateById as a200aB,getTemplatesByScene as a200aC,getTemplatesByIndustry as a200aD,getTemplatesByPermissionLayer as a200aE,getIrreversibleTemplates as a200aF,suggestTemplateForScene as a200aG,listOrderTemplates,fillTemplate as a200aH,suggestTemplateFromIntent as a200aI,getTemplateParameters as a200aJ,validateTemplateParams as a200aK}from'./order-templates.js';import{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules}from'./order-risk.js';import{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,PROGRESS_PERMISSIONS as a200aL,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,getScenesByPhase as a200aM,findSceneById as a200aN,getScenesByIndustry as a200aO,getBuiltinPermissionByIndex as a200aP,isProgressBuiltinPermission,inferSceneFromIntent as a200aQ,getAllBuiltinPermissions as a200aR,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount}from'./progress-ledger.js';import{initPuzzleFromIntent as a200aS,checkPuzzleCompleteness as a200aT,validateConstraints as a200aU,generateConfirmationText as a200aV,resolveBuiltinPermission as a200aW,isOrderHolderForward,getRelevantDimensions as a200aX}from'./progress-puzzle.js';import{PROGRESS_TEMPLATES,PROGRESS_TEMPLATES_VERSION,getAllProgressTemplates,getProgressTemplateById,getProgressTemplatesByScene,getProgressTemplatesByIndustry,suggestProgressTemplateForScene,listProgressTemplates,fillProgressTemplate}from'./progress-templates.js';import{PROGRESS_RISK_VERSION,assessProgressRisks,getAllProgressRiskRules}from'./progress-risk.js';import{ARBITRATION_LEDGER_VERSION,ARBITRATION_SCENES,ARBITRATION_PERMISSIONS as a200aY,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,getScenesByCategory as a200aZ,findSceneById as a200b0,findSceneByPermissionIndex as a200b1,getPermissionByIndex as a200b2,getPermissionByName as a200b3,isReservedIndex as a200b4,isUsedPermissionIndex as a200b5,getActivePermissionCount as a200b6,inferSceneFromIntent as a200b7,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,getScenesProducingStatus as a200b8,getScenesRequiringStatus as a200b9,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions}from'./arbitration-ledger.js';import{initPuzzleFromIntent as a200ba,checkPuzzleCompleteness as a200bb,validateConstraints as a200bc,generateConfirmationText as a200bd}from'./arbitration-puzzle.js';import{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,getAllTemplates as a200be,getTemplateById as a200bf,getTemplatesByScene as a200bg,getTemplatesByIndustry as a200bh,suggestTemplateForScene as a200bi,listTemplates as a200bj,fillTemplate as a200bk}from'./arbitration-templates.js';import{ARBITRATION_RISK_VERSION,assessArbitrationRisks,getAllRiskRules as a200bl}from'./arbitration-risk.js';import{REWARD_LEDGER_VERSION,REWARD_SCENES,REWARD_PERMISSIONS,REWARD_FIELDS,REWARD_GUARD_CONSTRUCTORS,REWARD_ERROR_CODES,REWARD_CROSS_OBJECT_REFS,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,getScenesByPhase as a200bm,findSceneById as a200bn,getScenesByIndustry as a200bo,getBuiltinPermissionByIndex as a200bp,isRewardBuiltinPermission,getAllBuiltinPermissions as a200bq,getRewardScenesCount,getGuardConstructorSpec as a200br,resolveGuardConstructor as a200bs,getRewardErrorByCode,getRewardErrorByName,validateGuardCount as a200bt,validateRecordCount as a200bu,inferSceneFromIntent as a200bv}from'./reward-ledger.js';import{REWARD_FIELD_MUTABILITY,initPuzzleFromIntent as a200bw,checkPuzzleCompleteness as a200bx,validateConstraints as a200by,generateConfirmationText as a200bz,resolveBuiltinPermission as a200bA,requiresGuardConfig as a200bB,requiresPassport as a200bC,getRelevantDimensions as a200bD,getFieldMutability as a200bE,isAdminMutableField as a200bF,getFieldPermissionIndex as a200bG}from'./reward-puzzle.js';import{REWARD_RISK_VERSION,assessRewardRisks,getAllRewardRiskRules}from'./reward-risk.js';import{PASSPORT_LEDGER_VERSION,PASSPORT_ERROR_CODES,PASSPORT_SCENARIOS,MAX_GUARD_COUNT_PASSPORT,MAX_SUBMISSION_SIZE_PASSPORT,getAllScenarios as a200bH,getScenariosCount as a200bI,findScenarioById as a200bJ,getScenariosByConsumer as a200bK,getScenariosUsingRelies as a200bL,inferScenarioFromIntent as a200bM,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,getErrorName as a200bN,getErrorDescription as a200bO}from'./passport-ledger.js';import{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,getAllTemplates as a200bP,getTemplateById as a200bQ,getTemplatesByScenario as a200bR,getTemplatesByIndustry as a200bS,suggestTemplateForScenario as a200bT,listTemplates as a200bU,fillTemplate as a200bV}from'./passport-templates.js';import{PROOF_RISK_RULES,checkProofRisks}from'./proof-risk.js';import{REPOSITORY_RISK_RULES,checkRepositoryRisks,parseIdFromForRiskCheck}from'./repository-risk.js';import{DEMAND_RISK_RULES,checkDemandRisks}from'./demand-risk.js';import{CONTACT_RISK_RULES,CONTACT_RISK_VERSION,checkContactRisks}from'./contact-risk.js';import{RESOURCE_RISK_RULES,RESOURCE_RISK_VERSION,checkResourceRisks}from'./resource-risk.js';import{PAYMENT_RISK_RULES,PAYMENT_RISK_VERSION,checkPaymentRisks}from'./payment-risk.js';import{ARB_RISK_RULES,ARB_RISK_VERSION,checkArbRisks}from'./arb-risk.js';import{PERSONAL_RISK_RULES,PERSONAL_RISK_VERSION,checkPersonalRisks}from'./personal-risk.js';import{UTIL_RISK_RULES,UTIL_RISK_VERSION,checkUtilRisks}from'./util-risk.js';import{REGISTRAR_RISK_RULES,REGISTRAR_RISK_VERSION,checkRegistrarRisks}from'./registrar-risk.js';import{BRIDGE_RISK_RULES,BRIDGE_RISK_VERSION,checkBridgeRisks}from'./bridge-risk.js';import{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence}from'./tools-reference.js';import{SCENARIO_MODES,SCENARIO_MODES_VERSION,MODE_COMPOSITIONS,matchScenarioMode,inferScenarioTraits,getScenarioMode,listScenarioModes,getShippedModes,getModeCompositions}from'./scenario-modes.js';import{BUILTIN_TEMPLATES,BUILTIN_TEMPLATES_VERSION,getBuiltinTemplate,listBuiltinTemplates,TEMPLATE_KEYWORDS}from'./builtin-templates.js';import{resolveTemplatesDir,seedBuiltinTemplates,reloadTemplates,listTemplates,getTemplate,getTemplatesByIndustry as a200bW,parseTemplateFile,renderTemplateFile,loadAndValidate,TemplateFrontmatterSchema}from'./template-loader.js';import{scanTemplate}from'./template-scanner.js';import{GUARD_DESIGN_PATTERNS,GUARD_DESIGN_PATTERNS_VERSION,VERIFIER_LEVEL_GUIDANCE,getGuardDesignPattern,searchGuardDesignPatterns,getPatternsByHost,getPatternsByIndustry,getPatternsByDataSourceClass,getVerifierLevelGuidance,suggestPatternForRequirement}from'./guard-design-patterns.js';export{CONFIRMATION_RULES,SAFETY_RULES_VERSION,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,classifyTool,NAMING_CONVENTIONS,checkObjectReuseRules,checkImmutabilityRules};export{TOOL_CONSTRAINTS,TOOL_CONSTRAINTS_VERSION,validateOperation,hasBlockingViolations,getWarningViolations};export{REWARD_TEMPLATES,REWARD_TEMPLATES_VERSION,getRewardTemplate,listRewardTemplates,suggestRewardTemplate};export{AUDIT_RULES,AUDIT_RULES_VERSION,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings};export{suggestPricing,MUTABLE_FIELDS,DYNAMIC_PRICING_VERSION};export{computeReviewStats,isVerifiedReview,filterVerifiedReviews,detectReviewManipulation,REPUTATION_RULES_VERSION};export{INDUSTRY_FLYWHEELS,getFlywheelForIndustry,listIndustries,suggestAcquisitionActions,generateTrustDescription,buildAcquisitionDashboard,ACQUISITION_FLYWHEEL_VERSION};export{STRATEGY_MANUAL_FILENAME,STRATEGY_MANUAL_VERSION,renderStrategyManual,parseManualSentinel,classifyManualFile,getBuiltinStrategyManual,listBuiltinStrategyManualIndustries}from'./strategy-manuals.js';export{INDUSTRY_STRATEGIES,getIndustryStrategy,listIndustryStrategies,registerIndustryStrategy,unregisterIndustryStrategy,recommendStrategy,stageFromOrderCount,validateStrategyLevers}from'./industry-strategy.js';export{INDUSTRY_REGISTRY_VERSION,getIndustryProfile,listIndustries as listRegistryIndustries,registerIndustry,getIndustryTraits,resolveIndustryName,isRegisteredIndustry,getRegistrySize,listBuiltinIndustryNames};export{DEFAULT_TRAITS,inferTraitsFromDescription,synthesizeProfile,findSimilarIndustries,composeIndustries,INDUSTRY_REQUIRED_TRAITS,DOMAIN_PRIORS,detectDomainPriors,traitContradictions,filterConsistentIndustries};export{INDUSTRY_EVOLUTION_THRESHOLDS,aggregateIndustryMetrics,evaluateIndustryHealth,suggestIndustryUpdate,applyIndustryUpdate,runIndustryHealthPipeline};export{FLYWHEEL_LOOP_VERSION,FLYWHEEL_LOOP_MIN_SIGNALS,recordIndustrySignal,updateIndustryCognition,injectEvolutionContext};export{BUILTIN_INTENT_SPECS,registerIntentProfile,getIntentProfile,listIntents,evaluateIndustryHealthByIntent,suggestIndustryUpdateByIntent,evaluateIndustryHealthMultiIntent,getRoleAdvice,filterSuggestionsByRole};export{GUARD_SCENES,findScene,inferSceneFromAction,getImmutableScenes,getNumericIdentifierScenes};export{SEMANTIC_TO_SCHEMA_RULES,SCHEMA_TO_SEMANTIC_RULES,GUARD_CONSTRAINT_RULES,matchSemanticPattern,explainNode,explainWitness,getConstraintsByCategory};export{checkPuzzleCompleteness,generateConfirmationText,initPuzzleFromIntent,inferBindingFromAction,emptyDataSources,getWitnessInfo,WITNESS_NAME_MAP};export{runGuardRulePack,assembleGuardAssessment,evaluateGuardDraft,getRiskRulesCount,GUARD_TEMPLATES,GUARD_TEMPLATES_VERSION,GUARD_TEMPLATES_COUNT,getTemplatesByScene,getTemplateById,getTemplatesByIndustry,getTemplatesByPattern,listGuardTemplates,suggestTemplateForScene,getTemplateParameters,validateTemplateParams,GUARD_BINDING_REGISTRY,GUARD_BINDINGS_VERSION,OWNER_RECEIVE_COGNITION,getGuardBindingsByObject,getGuardBinding,summarizeGuardBinding,SCENARIO_BRIDGE_REGISTRY,SCENARIO_CHAINS,SCENARIO_TOPOLOGY_VERSION,getBridgeById,getBridgeByCode,getBridgesByObject,getBridgesForEdge,detectBridgesForEdges,getChainById,summarizeBridge,detectBridgesForObjects,lintGuard,autoFixGuard,isGuardReady,getGuardErrors,formatLintResult};export{MACHINE_SCENES,MACHINE_LEDGER_VERSION,MACHINE_SCENES_COUNT,a200a as findMachineScene,a200b as getMachineScenesByIndustry,getScenesByPattern,inferSceneFromFlow};export{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,a200c as getAllMachineTemplates,a200d as getMachineTemplateById,a200e as getMachineTemplatesByScene,a200f as getMachineTemplatesByIndustry,suggestTemplateForIntent,walkDecisionTree,a200g as fillMachineTemplate,a200h as forkMachineTemplate,verifyTemplateSceneReferences,getReferencedGuardTemplateIds,getReferencedRiskIds};export{SEMANTIC_TO_MACHINE_RULES,MACHINE_CONSTRAINT_RULES,MACHINE_TRANSLATION_VERSION,MACHINE_PATTERNS_COUNT,MACHINE_CONSTRAINTS_COUNT,a200i as matchMachinePattern,identifyExecutionMode,identifyTopology,explainForwardPermission,a200j as getMachineConstraintsByCategory,getConstraintById,a200k as getOnChainMachineConstraints,a200l as getOffChainMachineConstraints};export{MACHINE_RISK_RULES,MACHINE_RISK_VERSION,assessMachineRisks};export{analyzeTopology,identifyTopologyPattern,formatTopologySummary,MACHINE_TOPOLOGY_VERSION,MAX_NODE_COUNT,MAX_NODE_PAIR_COUNT,MAX_FORWARD_COUNT};export{a200m as initMachinePuzzleFromIntent,initPuzzleFromTemplate,a200n as checkMachinePuzzleCompleteness,a200o as recommendMachineNextStep,derivePuzzleFromMachineJson,a200p as generateMachineConfirmationText,MACHINE_PUZZLE_VERSION};export{SERVICE_SCENES,SERVICE_LEDGER_VERSION,SERVICE_PERMISSIONS,SERVICE_ORDER_FLOW_STAGES,SERVICE_CROSS_OBJECT_BINDINGS,a200q as getServiceScenesByCategory,a200r as findServiceSceneById,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,a200s as inferServiceSceneFromIntent,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,a200t as getServiceCrossObjectBindings};export{a200u as initServicePuzzleFromIntent,a200v as checkServicePuzzleCompleteness,a200w as validateServiceConstraints,a200x as generateServicePuzzleConfirmationText,initOrderFlowPuzzle,checkOrderFlowCompleteness};export{SERVICE_RISK_VERSION,assessServiceRisks,getAllServiceRiskRules};export{SERVICE_TEMPLATES,SERVICE_TEMPLATES_VERSION,getServiceTemplateById,getServiceTemplatesByScene,getServiceTemplatesByIndustry,suggestServiceTemplateForScene,listServiceTemplates,fillServiceTemplate,getAllServiceTemplates};export{ALLOCATION_SCENES,ALLOCATION_LEDGER_VERSION,MAX_ALLOCATOR_COUNT,ALLOCATION_MAX_SHARING_COUNT,ALLOCATION_MODE_AMOUNT,ALLOCATION_MODE_RATE,ALLOCATION_MODE_SURPLUS,RATE_TOTAL_FULL,ALLOCATION_ERROR_CODES,a200y as getAllocationScenesByTriggerSource,a200z as getAllocationScenesByMode,a200A as getAllocationScenesByStrategy,a200B as findAllocationSceneById,a200C as inferAllocationSceneFromIntent,a200D as getAllAllocationScenes,a200E as getAllocationScenesCount,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,a200F as getAllocationErrorName,a200G as getAllocationErrorDescription};export{a200H as initAllocationPuzzleFromIntent,a200I as checkAllocationPuzzleCompleteness,a200J as validateAllocationConstraints,a200K as generateAllocationPuzzleConfirmationText,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION};export{ALLOCATION_RISK_VERSION,assessAllocationRisks,a200L as getAllAllocationRiskRules};export{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,a200M as getAllAllocationTemplates,a200N as getAllocationTemplateById,a200O as getAllocationTemplatesByScene,a200P as getAllocationTemplatesByIndustry,a200Q as suggestAllocationTemplateForScene,a200R as listAllocationTemplates,a200S as fillAllocationTemplate};export{RECIPIENT_CONSTRAINT_VERSION,classifyRecipient,analyzeRecipientConstraints,isUnboundSignerTheft,canonicalDoctrine,recipientDesignGuidance,derivePayoffFromSharing,OBJECT_DRIVEABILITY,driveabilityOf,RECIPIENT_DESIGN_OPTIONS};export{paymentRelations,scanRecentPaymentEvents,resolveBeneficialOwners,extractionPlanForHolder,pendingWrappersAt,trackAccountPayments};export{TREASURY_LEDGER_VERSION,TREASURY_SCENES,a200T as TREASURY_BUILTIN_PERMISSIONS,a200U as getTreasuryScenesByHostObject,a200V as findTreasurySceneById,a200W as findTreasurySceneByPermissionIndex,a200X as getTreasuryBuiltinPermissionByIndex,isBuiltinTreasuryPermission,a200Y as getActiveTreasuryBuiltinPermissions,a200Z as getReservedTreasuryBuiltinPermissions,a200a0 as inferTreasurySceneFromIntent,getTreasuryScenesCount,a200a1 as getTreasuryGovernedOperationsForPermissionIndex};export{a200a2 as initTreasuryPuzzleFromIntent,a200a3 as checkTreasuryPuzzleCompleteness,a200a4 as validateTreasuryConstraints,a200a5 as generateTreasuryPuzzleConfirmationText,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,a200a6 as TREASURY_MAX_DESCRIPTION_LENGTH};export{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,a200a7 as getTreasuryTemplateById,a200a8 as getTreasuryTemplatesByScene,a200a9 as getTreasuryTemplatesByIndustry,a200aa as suggestTreasuryTemplateForScene,a200ab as listTreasuryTemplates,a200ac as fillTreasuryTemplate};export{TREASURY_RISK_VERSION,assessTreasuryRisks,getAllTreasuryRiskRules};export{ORDER_LEDGER_VERSION,ORDER_SCENES,ORDER_FIELDS,ORDER_STATES,ORDER_STATE_TRANSITIONS,ORDER_LIFECYCLE_EVENTS,ORDER_PERMISSION_MATRIX,ORDER_AUDIT_FORMULAS,a200ad as getOrderScenesByOperationField,a200ae as findOrderSceneById,a200af as findOrderSceneByMoveEntry,a200ag as getOrderScenesByPermissionLayer,a200ah as getOrderScenesByReversibility,a200ai as getOrderFieldDef,a200aj as getOrderMutableFields,a200ak as getOrderImmutableFields,a200al as getOrderFrozenAfterProgressFields,a200am as getOrderOneTimeSetFields,a200an as inferOrderSceneFromIntent,a200ao as getOrderEmittedEvents,a200ap as getOrderInferredEvents,getOrderScenesCount,a200aq as sdkToMoveOrderField,a200ar as moveToSdkOrderField};export{a200as as initOrderPuzzleFromIntent,a200at as checkOrderPuzzleCompleteness,a200au as validateOrderConstraints,a200av as generateOrderPuzzleConfirmationText,a200aw as verifyOrderSnapshotMechanism,a200ax as inferOrderLifecyclePhase,a200ay as matchOrderSceneFromPuzzle,a200az as listAllOrderScenes,a200aA as lookupOrderScene};export{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,a200aB as getOrderTemplateById,a200aC as getOrderTemplatesByScene,a200aD as getOrderTemplatesByIndustry,a200aE as getOrderTemplatesByPermissionLayer,a200aF as getIrreversibleOrderTemplates,a200aG as suggestOrderTemplateForScene,listOrderTemplates,a200aH as fillOrderTemplate,a200aI as suggestOrderTemplateFromIntent,a200aJ as getOrderTemplateParameters,a200aK as validateOrderTemplateParams};export{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules};export{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,a200aL as PROGRESS_BUILTIN_PERMISSIONS,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,a200aM as getProgressScenesByPhase,a200aN as findProgressSceneById,a200aO as getProgressScenesByIndustry,a200aP as getProgressBuiltinPermissionByIndex,isProgressBuiltinPermission,a200aQ as inferProgressSceneFromIntent,a200aR as getAllProgressBuiltinPermissions,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount};export{a200aS as initProgressPuzzleFromIntent,a200aT as checkProgressPuzzleCompleteness,a200aU as validateProgressConstraints,a200aV as generateProgressPuzzleConfirmationText,a200aW as resolveProgressBuiltinPermission,isOrderHolderForward,a200aX as getProgressRelevantDimensions};export{PROGRESS_TEMPLATES,PROGRESS_TEMPLATES_VERSION,getAllProgressTemplates,getProgressTemplateById,getProgressTemplatesByScene,getProgressTemplatesByIndustry,suggestProgressTemplateForScene,listProgressTemplates,fillProgressTemplate};export{PROGRESS_RISK_VERSION,assessProgressRisks,getAllProgressRiskRules};export{ARBITRATION_LEDGER_VERSION,ARBITRATION_SCENES,a200aY as ARBITRATION_BUILTIN_PERMISSIONS,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,a200aZ as getArbitrationScenesByCategory,a200b0 as findArbitrationSceneById,a200b1 as findArbitrationSceneByPermissionIndex,a200b2 as getArbitrationPermissionByIndex,a200b3 as getArbitrationPermissionByName,a200b4 as isArbitrationReservedIndex,a200b5 as isArbitrationUsedPermissionIndex,a200b6 as getArbitrationActivePermissionCount,a200b7 as inferArbitrationSceneFromIntent,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,a200b8 as getArbitrationScenesProducingStatus,a200b9 as getArbitrationScenesRequiringStatus,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions};export{a200ba as initArbitrationPuzzleFromIntent,a200bb as checkArbitrationPuzzleCompleteness,a200bc as validateArbitrationConstraints,a200bd as generateArbitrationPuzzleConfirmationText};export{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,a200be as getAllArbitrationTemplates,a200bf as getArbitrationTemplateById,a200bg as getArbitrationTemplatesByScene,a200bh as getArbitrationTemplatesByIndustry,a200bi as suggestArbitrationTemplateForScene,a200bj as listArbitrationTemplates,a200bk as fillArbitrationTemplate};export{ARBITRATION_RISK_VERSION,assessArbitrationRisks,a200bl as getAllArbitrationRiskRules};export{REWARD_LEDGER_VERSION,REWARD_SCENES,REWARD_PERMISSIONS,REWARD_FIELDS,REWARD_GUARD_CONSTRUCTORS,REWARD_ERROR_CODES,REWARD_CROSS_OBJECT_REFS,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,a200bm as getRewardScenesByPhase,a200bn as findRewardSceneById,a200bo as getRewardScenesByIndustry,a200bp as getRewardBuiltinPermissionByIndex,isRewardBuiltinPermission,a200bq as getAllRewardBuiltinPermissions,getRewardScenesCount,a200br as getRewardGuardConstructorSpec,a200bs as resolveRewardGuardConstructor,getRewardErrorByCode,getRewardErrorByName,a200bt as validateRewardGuardCount,a200bu as validateRewardRecordCount,a200bv as inferRewardSceneFromIntent};export{REWARD_FIELD_MUTABILITY,a200bw as initRewardPuzzleFromIntent,a200bx as checkRewardPuzzleCompleteness,a200by as validateRewardConstraints,a200bz as generateRewardPuzzleConfirmationText,a200bA as resolveRewardBuiltinPermission,a200bB as requiresRewardGuardConfig,a200bC as requiresRewardPassport,a200bD as getRewardRelevantDimensions,a200bE as getRewardFieldMutability,a200bF as isRewardAdminMutableField,a200bG as getRewardFieldPermissionIndex};export{REWARD_RISK_VERSION,assessRewardRisks,getAllRewardRiskRules};export{PASSPORT_LEDGER_VERSION,PASSPORT_ERROR_CODES,PASSPORT_SCENARIOS,MAX_GUARD_COUNT_PASSPORT,MAX_SUBMISSION_SIZE_PASSPORT,a200bH as getAllPassportScenarios,a200bI as getPassportScenesCount,a200bJ as findPassportScenarioById,a200bK as getPassportScenariosByConsumer,a200bL as getPassportScenariosUsingRelies,a200bM as inferPassportScenarioFromIntent,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,a200bN as getPassportErrorName,a200bO as getPassportErrorDescription};export{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,a200bP as getAllPassportTemplates,a200bQ as getPassportTemplateById,a200bR as getPassportTemplatesByScenario,a200bS as getPassportTemplatesByIndustry,a200bT as suggestPassportTemplateForScenario,a200bU as listPassportTemplates,a200bV as fillPassportTemplate};export{PROOF_RISK_RULES,checkProofRisks};export{REPOSITORY_RISK_RULES,checkRepositoryRisks,parseIdFromForRiskCheck};export{assessEvidenceReview,reviewEvidenceList}from'./evidence-review.js';export{DEMAND_RISK_RULES,checkDemandRisks};export{CONTACT_RISK_RULES,CONTACT_RISK_VERSION,checkContactRisks};export{RESOURCE_RISK_RULES,RESOURCE_RISK_VERSION,checkResourceRisks};export{PAYMENT_RISK_RULES,PAYMENT_RISK_VERSION,checkPaymentRisks};export{ARB_RISK_RULES,ARB_RISK_VERSION,checkArbRisks};export{PERSONAL_RISK_RULES,PERSONAL_RISK_VERSION,checkPersonalRisks};export{UTIL_RISK_RULES,UTIL_RISK_VERSION,checkUtilRisks};export{REGISTRAR_RISK_RULES,REGISTRAR_RISK_VERSION,checkRegistrarRisks};export{BRIDGE_RISK_RULES,BRIDGE_RISK_VERSION,checkBridgeRisks};export{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence};export{SCENARIO_MODES,SCENARIO_MODES_VERSION,MODE_COMPOSITIONS,matchScenarioMode,inferScenarioTraits,getScenarioMode,listScenarioModes,getShippedModes,getModeCompositions};export{BUILTIN_TEMPLATES,BUILTIN_TEMPLATES_VERSION,getBuiltinTemplate,listBuiltinTemplates,TEMPLATE_KEYWORDS};export{resolveTemplatesDir,seedBuiltinTemplates,reloadTemplates,listTemplates,getTemplate,a200bW as getIndustryTemplates,parseTemplateFile,renderTemplateFile,loadAndValidate,TemplateFrontmatterSchema};export{scanTemplate};export{GUARD_DESIGN_PATTERNS,GUARD_DESIGN_PATTERNS_VERSION,VERIFIER_LEVEL_GUIDANCE,getGuardDesignPattern,searchGuardDesignPatterns,getPatternsByHost,getPatternsByIndustry,getPatternsByDataSourceClass,getVerifierLevelGuidance,suggestPatternForRequirement};export function getKnowledgeBase(){return{'version':{'safety':SAFETY_RULES_VERSION,'tool_constraints':TOOL_CONSTRAINTS_VERSION,'reward_templates':REWARD_TEMPLATES_VERSION,'audit_rules':AUDIT_RULES_VERSION,'dynamic_pricing':DYNAMIC_PRICING_VERSION,'reputation_rules':REPUTATION_RULES_VERSION,'acquisition_flywheel':ACQUISITION_FLYWHEEL_VERSION,'industry_registry':INDUSTRY_REGISTRY_VERSION,'flywheel_loop':FLYWHEEL_LOOP_VERSION,'machine_ledger':MACHINE_LEDGER_VERSION,'machine_templates':MACHINE_TEMPLATES_VERSION,'machine_translation':MACHINE_TRANSLATION_VERSION,'machine_risk':MACHINE_RISK_VERSION,'machine_topology':MACHINE_TOPOLOGY_VERSION,'machine_puzzle':MACHINE_PUZZLE_VERSION,'service_ledger':SERVICE_LEDGER_VERSION,'service_risk':SERVICE_RISK_VERSION,'service_templates':SERVICE_TEMPLATES_VERSION,'allocation_ledger':ALLOCATION_LEDGER_VERSION,'allocation_puzzle':ALLOCATION_PUZZLE_VERSION,'allocation_risk':ALLOCATION_RISK_VERSION,'allocation_templates':ALLOCATION_TEMPLATES_VERSION,'treasury_ledger':TREASURY_LEDGER_VERSION,'treasury_templates':TREASURY_TEMPLATES_VERSION,'treasury_risk':TREASURY_RISK_VERSION,'order_ledger':ORDER_LEDGER_VERSION,'order_templates':ORDER_TEMPLATES_VERSION,'order_risk':ORDER_RISK_VERSION,'progress_ledger':PROGRESS_LEDGER_VERSION,'progress_templates':PROGRESS_TEMPLATES_VERSION,'progress_risk':PROGRESS_RISK_VERSION,'arbitration_ledger':ARBITRATION_LEDGER_VERSION,'arbitration_templates':ARBITRATION_TEMPLATES_VERSION,'arbitration_risk':ARBITRATION_RISK_VERSION,'reward_ledger':REWARD_LEDGER_VERSION,'reward_risk':REWARD_RISK_VERSION,'passport_ledger':PASSPORT_LEDGER_VERSION,'passport_templates':PASSPORT_TEMPLATES_VERSION,'contact_risk':CONTACT_RISK_VERSION,'resource_risk':RESOURCE_RISK_VERSION,'payment_risk':PAYMENT_RISK_VERSION,'arb_risk':ARB_RISK_VERSION,'personal_risk':PERSONAL_RISK_VERSION,'util_risk':UTIL_RISK_VERSION,'registrar_risk':REGISTRAR_RISK_VERSION,'bridge_risk':BRIDGE_RISK_VERSION,'scenario_modes':SCENARIO_MODES_VERSION,'guard_design_patterns':GUARD_DESIGN_PATTERNS_VERSION,'builtin_templates':BUILTIN_TEMPLATES_VERSION},'confirmation_rules':CONFIRMATION_RULES['length'],'confirmation_rule_ids':CONFIRMATION_RULES['map'](a=>a['id']),'tool_constraints_count':TOOL_CONSTRAINTS['length'],'reward_templates_count':REWARD_TEMPLATES['length'],'audit_rules_count':AUDIT_RULES['length'],'mutable_fields_count':MUTABLE_FIELDS['length'],'industry_flywheels_count':INDUSTRY_FLYWHEELS['length'],'industry_registry_count':getRegistrySize(),'intent_count':listIntents()['length'],'guard_scenes_count':GUARD_SCENES['length'],'guard_semantic_rules_count':SEMANTIC_TO_SCHEMA_RULES['length'],'guard_schema_rules_count':SCHEMA_TO_SEMANTIC_RULES['length'],'guard_constraint_rules_count':GUARD_CONSTRAINT_RULES['length'],'guard_risk_rules_count':getRiskRulesCount(),'guard_templates_count':GUARD_TEMPLATES_COUNT,'guard_lint_enabled':!![],'machine_scenes_count':MACHINE_SCENES_COUNT,'machine_templates_count':MACHINE_TEMPLATES['length'],'machine_patterns_count':SEMANTIC_TO_MACHINE_RULES['length'],'machine_constraint_rules_count':MACHINE_CONSTRAINT_RULES['length'],'machine_risk_rules_count':MACHINE_RISK_RULES['length'],'machine_on_chain_limits':{'max_node_count':MAX_NODE_COUNT,'max_node_pair_count':MAX_NODE_PAIR_COUNT,'max_forward_count':MAX_FORWARD_COUNT},'service_scenes_count':SERVICE_SCENES['length'],'service_permissions_count':SERVICE_PERMISSIONS['length'],'service_order_flow_stages_count':SERVICE_ORDER_FLOW_STAGES['length'],'service_cross_object_bindings_count':SERVICE_CROSS_OBJECT_BINDINGS['length'],'service_risk_rules_count':getAllServiceRiskRules()['length'],'service_templates_count':SERVICE_TEMPLATES['length'],'service_context_enabled':!![],'allocation_scenes_count':ALLOCATION_SCENES['length'],'allocation_risk_rules_count':a200L()['length'],'allocation_templates_count':ALLOCATION_TEMPLATES['length'],'allocation_context_enabled':!![],'treasury_scenes_count':TREASURY_SCENES['length'],'treasury_builtin_permissions_count':a200T['length'],'treasury_risk_rules_count':getAllTreasuryRiskRules()['length'],'treasury_templates_count':TREASURY_TEMPLATES['length'],'treasury_context_enabled':!![],'order_scenes_count':ORDER_SCENES['length'],'order_fields_count':ORDER_FIELDS['length'],'order_states_count':ORDER_STATES['length'],'order_lifecycle_events_count':ORDER_LIFECYCLE_EVENTS['length'],'order_risk_rules_count':getAllOrderRiskRules()['length'],'order_templates_count':ORDER_TEMPLATES['length'],'order_context_enabled':!![],'progress_scenes_count':PROGRESS_SCENES['length'],'progress_builtin_permissions_count':a200aL['length'],'progress_risk_rules_count':getAllProgressRiskRules()['length'],'progress_templates_count':PROGRESS_TEMPLATES['length'],'progress_context_enabled':!![],'arbitration_scenes_count':ARBITRATION_SCENES['length'],'arbitration_builtin_permissions_count':a200aY['length'],'arbitration_risk_rules_count':a200bl()['length'],'arbitration_templates_count':ARBITRATION_TEMPLATES['length'],'arbitration_context_enabled':!![],'reward_scenes_count':REWARD_SCENES['length'],'reward_builtin_permissions_count':REWARD_PERMISSIONS['length'],'reward_fields_count':REWARD_FIELDS['length'],'reward_guard_constructors_count':REWARD_GUARD_CONSTRUCTORS['length'],'reward_error_codes_count':REWARD_ERROR_CODES['length'],'reward_risk_rules_count':getAllRewardRiskRules()['length'],'reward_context_enabled':!![],'passport_scenarios_count':PASSPORT_SCENARIOS['length'],'passport_max_guard_count':MAX_GUARD_COUNT_PASSPORT,'passport_max_submission_size':MAX_SUBMISSION_SIZE_PASSPORT,'passport_templates_count':PASSPORT_TEMPLATES['length'],'passport_context_enabled':!![],'proof_risk_rules_count':PROOF_RISK_RULES['length'],'repository_risk_rules_count':REPOSITORY_RISK_RULES['length'],'demand_risk_rules_count':DEMAND_RISK_RULES['length'],'contact_risk_rules_count':CONTACT_RISK_RULES['length'],'resource_risk_rules_count':RESOURCE_RISK_RULES['length'],'payment_risk_rules_count':PAYMENT_RISK_RULES['length'],'arb_risk_rules_count':ARB_RISK_RULES['length'],'personal_risk_rules_count':PERSONAL_RISK_RULES['length'],'util_risk_rules_count':UTIL_RISK_RULES['length'],'registrar_risk_rules_count':REGISTRAR_RISK_RULES['length'],'bridge_risk_rules_count':BRIDGE_RISK_RULES['length'],'tools_reference_count':TOOLS_REFERENCE['length'],'scenario_modes_count':SCENARIO_MODES['length'],'scenario_mode_compositions_count':MODE_COMPOSITIONS['length'],'builtin_templates_count':BUILTIN_TEMPLATES['length'],'guard_design_patterns_count':GUARD_DESIGN_PATTERNS['length'],'verifier_level_guidance_count':VERIFIER_LEVEL_GUIDANCE['length']};}export{buildWorkflowGuidance,buildWorkflowReceipt,enrichWorkflowGuidance,mergeGuidanceIntoOutput,resolvePermissionRole,resolveLocalNamesFor,listLocalAccounts,accountCanExecuteForward,enumerateActionableForwards,forwardOperatorKind};export{buildWorkspaceLists}from'./workspace-lists.js';export{resolveSupplyChainGraph}from'./supply-chain.js';export{enumerateObjectOperations,operationCategoryOf,operationComplexityOf,isPermissionIndexType}from'./operation-dictionary.js';export{enumerateServices,enumerateDemands,enumerateArbs}from'./jsonrpc-enum.js';export{FIELD_MUTABILITY_RULES,LOCK_CONSTRAINTS,IRREVERSIBLE_OPERATIONS,STATE_MACHINE_TERMINALS,NUMERIC_LIMIT_CONSTRAINTS,EXTERNAL_ACCESS_MECHANISMS,fieldMutabilityOf,isActionForbidden,lockConstraintOf,numericLimitOf,externalAccessOf}from'./contract-invariants.js';export{GUARD_FIELD_COGNITION_VERSION,GUARD_FIELD_SITES,VALUE_ORIGIN_SEMANTICS,GUARD_PASSPORT_DOCTRINE,guardSitesFor,guardCognitionDoctrine,REPOSITORY_WRITE_ROUTE_MATRIX,repositoryRouteSlotConflicts}from'./guard-field-cognition.js';
1
+ import{buildWorkflowGuidance,buildWorkflowReceipt,enrichWorkflowGuidance,mergeGuidanceIntoOutput,resolvePermissionRole,resolveLocalNamesFor,listLocalAccounts,accountCanExecuteForward,enumerateActionableForwards,forwardOperatorKind}from'./workflow-guidance.js';import{CONFIRMATION_RULES,SAFETY_RULES_VERSION,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,classifyTool,NAMING_CONVENTIONS,checkObjectReuseRules,checkImmutabilityRules}from'./safety-rules.js';import{TOOL_CONSTRAINTS,TOOL_CONSTRAINTS_VERSION,validateOperation,hasBlockingViolations,getWarningViolations}from'./tool-constraints.js';import{REWARD_TEMPLATES,REWARD_TEMPLATES_VERSION,getRewardTemplate,listRewardTemplates,suggestRewardTemplate}from'./reward-templates.js';import{AUDIT_RULES,AUDIT_RULES_VERSION,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings}from'./audit-rules.js';import{suggestPricing,MUTABLE_FIELDS,DYNAMIC_PRICING_VERSION}from'./dynamic-pricing.js';import{computeReviewStats,isVerifiedReview,filterVerifiedReviews,detectReviewManipulation,REPUTATION_RULES_VERSION}from'./reputation-rules.js';import{INDUSTRY_FLYWHEELS,getFlywheelForIndustry,listIndustries,suggestAcquisitionActions,generateTrustDescription,buildAcquisitionDashboard,ACQUISITION_FLYWHEEL_VERSION}from'./acquisition-flywheel.js';import{INDUSTRY_REGISTRY_VERSION,getIndustryProfile,registerIndustry,getIndustryTraits,resolveIndustryName,isRegisteredIndustry,getRegistrySize,listBuiltinIndustryNames}from'./industry-registry.js';import{DEFAULT_TRAITS,inferTraitsFromDescription,synthesizeProfile,findSimilarIndustries,composeIndustries,INDUSTRY_REQUIRED_TRAITS,DOMAIN_PRIORS,detectDomainPriors,traitContradictions,filterConsistentIndustries}from'./industry-generalizer.js';import{INDUSTRY_EVOLUTION_THRESHOLDS,aggregateIndustryMetrics,evaluateIndustryHealth,suggestIndustryUpdate,applyIndustryUpdate,runIndustryHealthPipeline}from'./industry-evolution.js';import{FLYWHEEL_LOOP_VERSION,FLYWHEEL_LOOP_MIN_SIGNALS,recordIndustrySignal,updateIndustryCognition,injectEvolutionContext}from'./flywheel-loop.js';import{BUILTIN_INTENT_SPECS,registerIntentProfile,getIntentProfile,listIntents,evaluateIndustryHealthByIntent,suggestIndustryUpdateByIntent,evaluateIndustryHealthMultiIntent,getRoleAdvice,filterSuggestionsByRole}from'./intent-metrics.js';import{GUARD_SCENES,findScene,inferSceneFromAction,getImmutableScenes,getNumericIdentifierScenes}from'./guard-ledger.js';import{SEMANTIC_TO_SCHEMA_RULES,SCHEMA_TO_SEMANTIC_RULES,GUARD_CONSTRAINT_RULES,matchSemanticPattern,explainNode,explainWitness,getConstraintsByCategory}from'./guard-translation.js';import{checkPuzzleCompleteness,generateConfirmationText,initPuzzleFromIntent,inferBindingFromAction,emptyDataSources,getWitnessInfo,WITNESS_NAME_MAP}from'./guard-puzzle.js';import{runGuardRulePack,assembleGuardAssessment,getRiskRulesCount}from'./guard-risk.js';import{evaluateGuardDraft}from'./guard-eval.js';import{GUARD_BINDING_REGISTRY,GUARD_BINDINGS_VERSION,OWNER_RECEIVE_COGNITION,getGuardBindingsByObject,getGuardBinding,summarizeGuardBinding}from'./guard-bindings.js';import{SCENARIO_BRIDGE_REGISTRY,SCENARIO_CHAINS,SCENARIO_TOPOLOGY_VERSION,getBridgeById,getBridgeByCode,getBridgesByObject,getBridgesForEdge,detectBridgesForEdges,getChainById,summarizeBridge,detectBridgesForObjects}from'./scenario-topology.js';import{GUARD_TEMPLATES,GUARD_TEMPLATES_VERSION,GUARD_TEMPLATES_COUNT,getTemplatesByScene,getTemplateById,getTemplatesByIndustry,getTemplatesByPattern,listGuardTemplates,suggestTemplateForScene,getTemplateParameters,validateTemplateParams}from'./guard-templates.js';import{lintGuard,autoFixGuard,isGuardReady,getGuardErrors,formatLintResult}from'./guard-lint.js';import{MACHINE_SCENES,MACHINE_LEDGER_VERSION,MACHINE_SCENES_COUNT,findScene as a201a,getScenesByIndustry as a201b,getScenesByPattern,inferSceneFromFlow}from'./machine-ledger.js';import{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,getAllTemplates as a201c,getTemplateById as a201d,getTemplatesByScene as a201e,getTemplatesByIndustry as a201f,suggestTemplateForIntent,walkDecisionTree,fillTemplate as a201g,forkTemplate as a201h,verifyTemplateSceneReferences,getReferencedGuardTemplateIds,getReferencedRiskIds}from'./machine-templates.js';import{SEMANTIC_TO_MACHINE_RULES,MACHINE_CONSTRAINT_RULES,MACHINE_TRANSLATION_VERSION,MACHINE_PATTERNS_COUNT,MACHINE_CONSTRAINTS_COUNT,matchSemanticPattern as a201i,identifyExecutionMode,identifyTopology,explainForwardPermission,getConstraintsByCategory as a201j,getConstraintById,getOnChainConstraints as a201k,getOffChainConstraints as a201l}from'./machine-translation.js';import{MACHINE_RISK_RULES,MACHINE_RISK_VERSION,assessMachineRisks}from'./machine-risk.js';import{analyzeTopology,identifyTopologyPattern,formatTopologySummary,MACHINE_TOPOLOGY_VERSION,MAX_NODE_COUNT,MAX_NODE_PAIR_COUNT,MAX_FORWARD_COUNT}from'./machine-topology.js';import{initPuzzleFromIntent as a201m,initPuzzleFromTemplate,checkPuzzleCompleteness as a201n,recommendNextStep as a201o,derivePuzzleFromMachineJson,generateConfirmationText as a201p,MACHINE_PUZZLE_VERSION}from'./machine-puzzle.js';import{SERVICE_SCENES,SERVICE_LEDGER_VERSION,SERVICE_PERMISSIONS,SERVICE_ORDER_FLOW_STAGES,SERVICE_CROSS_OBJECT_BINDINGS,getScenesByCategory as a201q,findSceneById as a201r,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,inferSceneFromIntent as a201s,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,getCrossObjectBindings as a201t}from'./service-ledger.js';import{initPuzzleFromIntent as a201u,checkPuzzleCompleteness as a201v,validateConstraints as a201w,generateConfirmationText as a201x,initOrderFlowPuzzle,checkOrderFlowCompleteness}from'./service-puzzle.js';import{SERVICE_RISK_VERSION,assessServiceRisks,getAllServiceRiskRules}from'./service-risk.js';import{SERVICE_TEMPLATES,SERVICE_TEMPLATES_VERSION,getServiceTemplateById,getServiceTemplatesByScene,getServiceTemplatesByIndustry,suggestServiceTemplateForScene,listServiceTemplates,fillServiceTemplate,getAllServiceTemplates}from'./service-templates.js';import{ALLOCATION_SCENES,ALLOCATION_LEDGER_VERSION,MAX_ALLOCATOR_COUNT,ALLOCATION_MAX_SHARING_COUNT,ALLOCATION_MODE_AMOUNT,ALLOCATION_MODE_RATE,ALLOCATION_MODE_SURPLUS,RATE_TOTAL_FULL,ALLOCATION_ERROR_CODES,getScenesByTriggerSource as a201y,getScenesByMode as a201z,getScenesByStrategy as a201A,findSceneById as a201B,inferSceneFromIntent as a201C,getAllScenes as a201D,getScenesCount as a201E,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,getErrorName as a201F,getErrorDescription as a201G}from'./allocation-ledger.js';import{initPuzzleFromIntent as a201H,checkPuzzleCompleteness as a201I,validateConstraints as a201J,generateConfirmationText as a201K,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION}from'./allocation-puzzle.js';import{ALLOCATION_RISK_VERSION,assessAllocationRisks,getAllRiskRules as a201L}from'./allocation-risk.js';import{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,getAllTemplates as a201M,getTemplateById as a201N,getTemplatesByScene as a201O,getTemplatesByIndustry as a201P,suggestTemplateForScene as a201Q,listTemplates as a201R,fillTemplate as a201S}from'./allocation-templates.js';import{RECIPIENT_CONSTRAINT_VERSION,classifyRecipient,analyzeRecipientConstraints,isUnboundSignerTheft,canonicalDoctrine,recipientDesignGuidance,derivePayoffFromSharing,OBJECT_DRIVEABILITY,driveabilityOf,RECIPIENT_DESIGN_OPTIONS}from'./recipient-constraint.js';import{paymentRelations,scanRecentPaymentEvents,resolveBeneficialOwners,extractionPlanForHolder,pendingWrappersAt,trackAccountPayments}from'./payment-tracker.js';import{TREASURY_LEDGER_VERSION,TREASURY_SCENES,TREASURY_PERMISSIONS as a201T,getScenesByHostObject as a201U,findSceneById as a201V,findSceneByPermissionIndex as a201W,getBuiltinPermissionByIndex as a201X,isBuiltinTreasuryPermission,getActiveBuiltinPermissions as a201Y,getReservedBuiltinPermissions as a201Z,inferSceneFromIntent as a201a0,getTreasuryScenesCount,getGovernedOperationsForPermissionIndex as a201a1}from'./treasury-ledger.js';import{initPuzzleFromIntent as a201a2,checkPuzzleCompleteness as a201a3,validateConstraints as a201a4,generateConfirmationText as a201a5,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,MAX_DESCRIPTION_LENGTH as a201a6}from'./treasury-puzzle.js';import{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,getTemplateById as a201a7,getTemplatesByScene as a201a8,getTemplatesByIndustry as a201a9,suggestTemplateForScene as a201aa,listTemplates as a201ab,fillTemplate as a201ac}from'./treasury-templates.js';import{TREASURY_RISK_VERSION,assessTreasuryRisks,getAllTreasuryRiskRules}from'./treasury-risk.js';import{ORDER_LEDGER_VERSION,ORDER_SCENES,ORDER_FIELDS,ORDER_STATES,ORDER_STATE_TRANSITIONS,ORDER_LIFECYCLE_EVENTS,ORDER_PERMISSION_MATRIX,ORDER_AUDIT_FORMULAS,getScenesByOperationField as a201ad,findSceneById as a201ae,findSceneByMoveEntry as a201af,getScenesByPermissionLayer as a201ag,getScenesByReversibility as a201ah,getFieldDef as a201ai,getMutableFields as a201aj,getImmutableFields as a201ak,getFrozenAfterProgressFields as a201al,getOneTimeSetFields as a201am,inferSceneFromIntent as a201an,getEmittedEvents as a201ao,getInferredEvents as a201ap,getOrderScenesCount,sdkToMoveField as a201aq,moveToSdkField as a201ar}from'./order-ledger.js';import{initPuzzleFromIntent as a201as,checkPuzzleCompleteness as a201at,validateConstraints as a201au,generateConfirmationText as a201av,verifySnapshotMechanism as a201aw,inferLifecyclePhase as a201ax,matchSceneFromPuzzle as a201ay,listAllScenes as a201az,lookupScene as a201aA}from'./order-puzzle.js';import{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,getTemplateById as a201aB,getTemplatesByScene as a201aC,getTemplatesByIndustry as a201aD,getTemplatesByPermissionLayer as a201aE,getIrreversibleTemplates as a201aF,suggestTemplateForScene as a201aG,listOrderTemplates,fillTemplate as a201aH,suggestTemplateFromIntent as a201aI,getTemplateParameters as a201aJ,validateTemplateParams as a201aK}from'./order-templates.js';import{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules}from'./order-risk.js';import{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,PROGRESS_PERMISSIONS as a201aL,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,getScenesByPhase as a201aM,findSceneById as a201aN,getScenesByIndustry as a201aO,getBuiltinPermissionByIndex as a201aP,isProgressBuiltinPermission,inferSceneFromIntent as a201aQ,getAllBuiltinPermissions as a201aR,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount}from'./progress-ledger.js';import{initPuzzleFromIntent as a201aS,checkPuzzleCompleteness as a201aT,validateConstraints as a201aU,generateConfirmationText as a201aV,resolveBuiltinPermission as a201aW,isOrderHolderForward,getRelevantDimensions as a201aX}from'./progress-puzzle.js';import{PROGRESS_TEMPLATES,PROGRESS_TEMPLATES_VERSION,getAllProgressTemplates,getProgressTemplateById,getProgressTemplatesByScene,getProgressTemplatesByIndustry,suggestProgressTemplateForScene,listProgressTemplates,fillProgressTemplate}from'./progress-templates.js';import{PROGRESS_RISK_VERSION,assessProgressRisks,getAllProgressRiskRules}from'./progress-risk.js';import{ARBITRATION_LEDGER_VERSION,ARBITRATION_SCENES,ARBITRATION_PERMISSIONS as a201aY,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,getScenesByCategory as a201aZ,findSceneById as a201b0,findSceneByPermissionIndex as a201b1,getPermissionByIndex as a201b2,getPermissionByName as a201b3,isReservedIndex as a201b4,isUsedPermissionIndex as a201b5,getActivePermissionCount as a201b6,inferSceneFromIntent as a201b7,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,getScenesProducingStatus as a201b8,getScenesRequiringStatus as a201b9,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions}from'./arbitration-ledger.js';import{initPuzzleFromIntent as a201ba,checkPuzzleCompleteness as a201bb,validateConstraints as a201bc,generateConfirmationText as a201bd}from'./arbitration-puzzle.js';import{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,getAllTemplates as a201be,getTemplateById as a201bf,getTemplatesByScene as a201bg,getTemplatesByIndustry as a201bh,suggestTemplateForScene as a201bi,listTemplates as a201bj,fillTemplate as a201bk}from'./arbitration-templates.js';import{ARBITRATION_RISK_VERSION,assessArbitrationRisks,getAllRiskRules as a201bl}from'./arbitration-risk.js';import{REWARD_LEDGER_VERSION,REWARD_SCENES,REWARD_PERMISSIONS,REWARD_FIELDS,REWARD_GUARD_CONSTRUCTORS,REWARD_ERROR_CODES,REWARD_CROSS_OBJECT_REFS,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,getScenesByPhase as a201bm,findSceneById as a201bn,getScenesByIndustry as a201bo,getBuiltinPermissionByIndex as a201bp,isRewardBuiltinPermission,getAllBuiltinPermissions as a201bq,getRewardScenesCount,getGuardConstructorSpec as a201br,resolveGuardConstructor as a201bs,getRewardErrorByCode,getRewardErrorByName,validateGuardCount as a201bt,validateRecordCount as a201bu,inferSceneFromIntent as a201bv}from'./reward-ledger.js';import{REWARD_FIELD_MUTABILITY,initPuzzleFromIntent as a201bw,checkPuzzleCompleteness as a201bx,validateConstraints as a201by,generateConfirmationText as a201bz,resolveBuiltinPermission as a201bA,requiresGuardConfig as a201bB,requiresPassport as a201bC,getRelevantDimensions as a201bD,getFieldMutability as a201bE,isAdminMutableField as a201bF,getFieldPermissionIndex as a201bG}from'./reward-puzzle.js';import{REWARD_RISK_VERSION,assessRewardRisks,getAllRewardRiskRules}from'./reward-risk.js';import{PASSPORT_LEDGER_VERSION,PASSPORT_ERROR_CODES,PASSPORT_SCENARIOS,MAX_GUARD_COUNT_PASSPORT,MAX_SUBMISSION_SIZE_PASSPORT,getAllScenarios as a201bH,getScenariosCount as a201bI,findScenarioById as a201bJ,getScenariosByConsumer as a201bK,getScenariosUsingRelies as a201bL,inferScenarioFromIntent as a201bM,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,getErrorName as a201bN,getErrorDescription as a201bO}from'./passport-ledger.js';import{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,getAllTemplates as a201bP,getTemplateById as a201bQ,getTemplatesByScenario as a201bR,getTemplatesByIndustry as a201bS,suggestTemplateForScenario as a201bT,listTemplates as a201bU,fillTemplate as a201bV}from'./passport-templates.js';import{PROOF_RISK_RULES,checkProofRisks}from'./proof-risk.js';import{REPOSITORY_RISK_RULES,checkRepositoryRisks,parseIdFromForRiskCheck}from'./repository-risk.js';import{DEMAND_RISK_RULES,checkDemandRisks}from'./demand-risk.js';import{CONTACT_RISK_RULES,CONTACT_RISK_VERSION,checkContactRisks}from'./contact-risk.js';import{RESOURCE_RISK_RULES,RESOURCE_RISK_VERSION,checkResourceRisks}from'./resource-risk.js';import{PAYMENT_RISK_RULES,PAYMENT_RISK_VERSION,checkPaymentRisks}from'./payment-risk.js';import{ARB_RISK_RULES,ARB_RISK_VERSION,checkArbRisks}from'./arb-risk.js';import{PERSONAL_RISK_RULES,PERSONAL_RISK_VERSION,checkPersonalRisks}from'./personal-risk.js';import{UTIL_RISK_RULES,UTIL_RISK_VERSION,checkUtilRisks}from'./util-risk.js';import{REGISTRAR_RISK_RULES,REGISTRAR_RISK_VERSION,checkRegistrarRisks}from'./registrar-risk.js';import{BRIDGE_RISK_RULES,BRIDGE_RISK_VERSION,checkBridgeRisks}from'./bridge-risk.js';import{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence}from'./tools-reference.js';import{SCENARIO_MODES,SCENARIO_MODES_VERSION,MODE_COMPOSITIONS,matchScenarioMode,inferScenarioTraits,getScenarioMode,listScenarioModes,getShippedModes,getModeCompositions}from'./scenario-modes.js';import{BUILTIN_TEMPLATES,BUILTIN_TEMPLATES_VERSION,getBuiltinTemplate,listBuiltinTemplates,TEMPLATE_KEYWORDS}from'./builtin-templates.js';import{resolveTemplatesDir,seedBuiltinTemplates,reloadTemplates,listTemplates,getTemplate,getTemplatesByIndustry as a201bW,parseTemplateFile,renderTemplateFile,loadAndValidate,TemplateFrontmatterSchema}from'./template-loader.js';import{scanTemplate}from'./template-scanner.js';import{GUARD_DESIGN_PATTERNS,GUARD_DESIGN_PATTERNS_VERSION,VERIFIER_LEVEL_GUIDANCE,getGuardDesignPattern,searchGuardDesignPatterns,getPatternsByHost,getPatternsByIndustry,getPatternsByDataSourceClass,getVerifierLevelGuidance,suggestPatternForRequirement}from'./guard-design-patterns.js';export{CONFIRMATION_RULES,SAFETY_RULES_VERSION,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,classifyTool,NAMING_CONVENTIONS,checkObjectReuseRules,checkImmutabilityRules};export{TOOL_CONSTRAINTS,TOOL_CONSTRAINTS_VERSION,validateOperation,hasBlockingViolations,getWarningViolations};export{REWARD_TEMPLATES,REWARD_TEMPLATES_VERSION,getRewardTemplate,listRewardTemplates,suggestRewardTemplate};export{AUDIT_RULES,AUDIT_RULES_VERSION,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings};export{suggestPricing,MUTABLE_FIELDS,DYNAMIC_PRICING_VERSION};export{computeReviewStats,isVerifiedReview,filterVerifiedReviews,detectReviewManipulation,REPUTATION_RULES_VERSION};export{INDUSTRY_FLYWHEELS,getFlywheelForIndustry,listIndustries,suggestAcquisitionActions,generateTrustDescription,buildAcquisitionDashboard,ACQUISITION_FLYWHEEL_VERSION};export{STRATEGY_MANUAL_FILENAME,STRATEGY_MANUAL_VERSION,renderStrategyManual,parseManualSentinel,classifyManualFile,getBuiltinStrategyManual,listBuiltinStrategyManualIndustries}from'./strategy-manuals.js';export{INDUSTRY_STRATEGIES,getIndustryStrategy,listIndustryStrategies,registerIndustryStrategy,unregisterIndustryStrategy,recommendStrategy,stageFromOrderCount,validateStrategyLevers}from'./industry-strategy.js';export{INDUSTRY_REGISTRY_VERSION,getIndustryProfile,listIndustries as listRegistryIndustries,registerIndustry,getIndustryTraits,resolveIndustryName,isRegisteredIndustry,getRegistrySize,listBuiltinIndustryNames};export{DEFAULT_TRAITS,inferTraitsFromDescription,synthesizeProfile,findSimilarIndustries,composeIndustries,INDUSTRY_REQUIRED_TRAITS,DOMAIN_PRIORS,detectDomainPriors,traitContradictions,filterConsistentIndustries};export{INDUSTRY_EVOLUTION_THRESHOLDS,aggregateIndustryMetrics,evaluateIndustryHealth,suggestIndustryUpdate,applyIndustryUpdate,runIndustryHealthPipeline};export{FLYWHEEL_LOOP_VERSION,FLYWHEEL_LOOP_MIN_SIGNALS,recordIndustrySignal,updateIndustryCognition,injectEvolutionContext};export{BUILTIN_INTENT_SPECS,registerIntentProfile,getIntentProfile,listIntents,evaluateIndustryHealthByIntent,suggestIndustryUpdateByIntent,evaluateIndustryHealthMultiIntent,getRoleAdvice,filterSuggestionsByRole};export{GUARD_SCENES,findScene,inferSceneFromAction,getImmutableScenes,getNumericIdentifierScenes};export{SEMANTIC_TO_SCHEMA_RULES,SCHEMA_TO_SEMANTIC_RULES,GUARD_CONSTRAINT_RULES,matchSemanticPattern,explainNode,explainWitness,getConstraintsByCategory};export{checkPuzzleCompleteness,generateConfirmationText,initPuzzleFromIntent,inferBindingFromAction,emptyDataSources,getWitnessInfo,WITNESS_NAME_MAP};export{runGuardRulePack,assembleGuardAssessment,evaluateGuardDraft,getRiskRulesCount,GUARD_TEMPLATES,GUARD_TEMPLATES_VERSION,GUARD_TEMPLATES_COUNT,getTemplatesByScene,getTemplateById,getTemplatesByIndustry,getTemplatesByPattern,listGuardTemplates,suggestTemplateForScene,getTemplateParameters,validateTemplateParams,GUARD_BINDING_REGISTRY,GUARD_BINDINGS_VERSION,OWNER_RECEIVE_COGNITION,getGuardBindingsByObject,getGuardBinding,summarizeGuardBinding,SCENARIO_BRIDGE_REGISTRY,SCENARIO_CHAINS,SCENARIO_TOPOLOGY_VERSION,getBridgeById,getBridgeByCode,getBridgesByObject,getBridgesForEdge,detectBridgesForEdges,getChainById,summarizeBridge,detectBridgesForObjects,lintGuard,autoFixGuard,isGuardReady,getGuardErrors,formatLintResult};export{MACHINE_SCENES,MACHINE_LEDGER_VERSION,MACHINE_SCENES_COUNT,a201a as findMachineScene,a201b as getMachineScenesByIndustry,getScenesByPattern,inferSceneFromFlow};export{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,a201c as getAllMachineTemplates,a201d as getMachineTemplateById,a201e as getMachineTemplatesByScene,a201f as getMachineTemplatesByIndustry,suggestTemplateForIntent,walkDecisionTree,a201g as fillMachineTemplate,a201h as forkMachineTemplate,verifyTemplateSceneReferences,getReferencedGuardTemplateIds,getReferencedRiskIds};export{SEMANTIC_TO_MACHINE_RULES,MACHINE_CONSTRAINT_RULES,MACHINE_TRANSLATION_VERSION,MACHINE_PATTERNS_COUNT,MACHINE_CONSTRAINTS_COUNT,a201i as matchMachinePattern,identifyExecutionMode,identifyTopology,explainForwardPermission,a201j as getMachineConstraintsByCategory,getConstraintById,a201k as getOnChainMachineConstraints,a201l as getOffChainMachineConstraints};export{MACHINE_RISK_RULES,MACHINE_RISK_VERSION,assessMachineRisks};export{analyzeTopology,identifyTopologyPattern,formatTopologySummary,MACHINE_TOPOLOGY_VERSION,MAX_NODE_COUNT,MAX_NODE_PAIR_COUNT,MAX_FORWARD_COUNT};export{a201m as initMachinePuzzleFromIntent,initPuzzleFromTemplate,a201n as checkMachinePuzzleCompleteness,a201o as recommendMachineNextStep,derivePuzzleFromMachineJson,a201p as generateMachineConfirmationText,MACHINE_PUZZLE_VERSION};export{SERVICE_SCENES,SERVICE_LEDGER_VERSION,SERVICE_PERMISSIONS,SERVICE_ORDER_FLOW_STAGES,SERVICE_CROSS_OBJECT_BINDINGS,a201q as getServiceScenesByCategory,a201r as findServiceSceneById,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,a201s as inferServiceSceneFromIntent,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,a201t as getServiceCrossObjectBindings};export{a201u as initServicePuzzleFromIntent,a201v as checkServicePuzzleCompleteness,a201w as validateServiceConstraints,a201x as generateServicePuzzleConfirmationText,initOrderFlowPuzzle,checkOrderFlowCompleteness};export{SERVICE_RISK_VERSION,assessServiceRisks,getAllServiceRiskRules};export{SERVICE_TEMPLATES,SERVICE_TEMPLATES_VERSION,getServiceTemplateById,getServiceTemplatesByScene,getServiceTemplatesByIndustry,suggestServiceTemplateForScene,listServiceTemplates,fillServiceTemplate,getAllServiceTemplates};export{ALLOCATION_SCENES,ALLOCATION_LEDGER_VERSION,MAX_ALLOCATOR_COUNT,ALLOCATION_MAX_SHARING_COUNT,ALLOCATION_MODE_AMOUNT,ALLOCATION_MODE_RATE,ALLOCATION_MODE_SURPLUS,RATE_TOTAL_FULL,ALLOCATION_ERROR_CODES,a201y as getAllocationScenesByTriggerSource,a201z as getAllocationScenesByMode,a201A as getAllocationScenesByStrategy,a201B as findAllocationSceneById,a201C as inferAllocationSceneFromIntent,a201D as getAllAllocationScenes,a201E as getAllocationScenesCount,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,a201F as getAllocationErrorName,a201G as getAllocationErrorDescription};export{a201H as initAllocationPuzzleFromIntent,a201I as checkAllocationPuzzleCompleteness,a201J as validateAllocationConstraints,a201K as generateAllocationPuzzleConfirmationText,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION};export{ALLOCATION_RISK_VERSION,assessAllocationRisks,a201L as getAllAllocationRiskRules};export{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,a201M as getAllAllocationTemplates,a201N as getAllocationTemplateById,a201O as getAllocationTemplatesByScene,a201P as getAllocationTemplatesByIndustry,a201Q as suggestAllocationTemplateForScene,a201R as listAllocationTemplates,a201S as fillAllocationTemplate};export{RECIPIENT_CONSTRAINT_VERSION,classifyRecipient,analyzeRecipientConstraints,isUnboundSignerTheft,canonicalDoctrine,recipientDesignGuidance,derivePayoffFromSharing,OBJECT_DRIVEABILITY,driveabilityOf,RECIPIENT_DESIGN_OPTIONS};export{paymentRelations,scanRecentPaymentEvents,resolveBeneficialOwners,extractionPlanForHolder,pendingWrappersAt,trackAccountPayments};export{TREASURY_LEDGER_VERSION,TREASURY_SCENES,a201T as TREASURY_BUILTIN_PERMISSIONS,a201U as getTreasuryScenesByHostObject,a201V as findTreasurySceneById,a201W as findTreasurySceneByPermissionIndex,a201X as getTreasuryBuiltinPermissionByIndex,isBuiltinTreasuryPermission,a201Y as getActiveTreasuryBuiltinPermissions,a201Z as getReservedTreasuryBuiltinPermissions,a201a0 as inferTreasurySceneFromIntent,getTreasuryScenesCount,a201a1 as getTreasuryGovernedOperationsForPermissionIndex};export{a201a2 as initTreasuryPuzzleFromIntent,a201a3 as checkTreasuryPuzzleCompleteness,a201a4 as validateTreasuryConstraints,a201a5 as generateTreasuryPuzzleConfirmationText,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,a201a6 as TREASURY_MAX_DESCRIPTION_LENGTH};export{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,a201a7 as getTreasuryTemplateById,a201a8 as getTreasuryTemplatesByScene,a201a9 as getTreasuryTemplatesByIndustry,a201aa as suggestTreasuryTemplateForScene,a201ab as listTreasuryTemplates,a201ac as fillTreasuryTemplate};export{TREASURY_RISK_VERSION,assessTreasuryRisks,getAllTreasuryRiskRules};export{ORDER_LEDGER_VERSION,ORDER_SCENES,ORDER_FIELDS,ORDER_STATES,ORDER_STATE_TRANSITIONS,ORDER_LIFECYCLE_EVENTS,ORDER_PERMISSION_MATRIX,ORDER_AUDIT_FORMULAS,a201ad as getOrderScenesByOperationField,a201ae as findOrderSceneById,a201af as findOrderSceneByMoveEntry,a201ag as getOrderScenesByPermissionLayer,a201ah as getOrderScenesByReversibility,a201ai as getOrderFieldDef,a201aj as getOrderMutableFields,a201ak as getOrderImmutableFields,a201al as getOrderFrozenAfterProgressFields,a201am as getOrderOneTimeSetFields,a201an as inferOrderSceneFromIntent,a201ao as getOrderEmittedEvents,a201ap as getOrderInferredEvents,getOrderScenesCount,a201aq as sdkToMoveOrderField,a201ar as moveToSdkOrderField};export{a201as as initOrderPuzzleFromIntent,a201at as checkOrderPuzzleCompleteness,a201au as validateOrderConstraints,a201av as generateOrderPuzzleConfirmationText,a201aw as verifyOrderSnapshotMechanism,a201ax as inferOrderLifecyclePhase,a201ay as matchOrderSceneFromPuzzle,a201az as listAllOrderScenes,a201aA as lookupOrderScene};export{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,a201aB as getOrderTemplateById,a201aC as getOrderTemplatesByScene,a201aD as getOrderTemplatesByIndustry,a201aE as getOrderTemplatesByPermissionLayer,a201aF as getIrreversibleOrderTemplates,a201aG as suggestOrderTemplateForScene,listOrderTemplates,a201aH as fillOrderTemplate,a201aI as suggestOrderTemplateFromIntent,a201aJ as getOrderTemplateParameters,a201aK as validateOrderTemplateParams};export{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules};export{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,a201aL as PROGRESS_BUILTIN_PERMISSIONS,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,a201aM as getProgressScenesByPhase,a201aN as findProgressSceneById,a201aO as getProgressScenesByIndustry,a201aP as getProgressBuiltinPermissionByIndex,isProgressBuiltinPermission,a201aQ as inferProgressSceneFromIntent,a201aR as getAllProgressBuiltinPermissions,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount};export{a201aS as initProgressPuzzleFromIntent,a201aT as checkProgressPuzzleCompleteness,a201aU as validateProgressConstraints,a201aV as generateProgressPuzzleConfirmationText,a201aW as resolveProgressBuiltinPermission,isOrderHolderForward,a201aX as getProgressRelevantDimensions};export{PROGRESS_TEMPLATES,PROGRESS_TEMPLATES_VERSION,getAllProgressTemplates,getProgressTemplateById,getProgressTemplatesByScene,getProgressTemplatesByIndustry,suggestProgressTemplateForScene,listProgressTemplates,fillProgressTemplate};export{PROGRESS_RISK_VERSION,assessProgressRisks,getAllProgressRiskRules};export{ARBITRATION_LEDGER_VERSION,ARBITRATION_SCENES,a201aY as ARBITRATION_BUILTIN_PERMISSIONS,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,a201aZ as getArbitrationScenesByCategory,a201b0 as findArbitrationSceneById,a201b1 as findArbitrationSceneByPermissionIndex,a201b2 as getArbitrationPermissionByIndex,a201b3 as getArbitrationPermissionByName,a201b4 as isArbitrationReservedIndex,a201b5 as isArbitrationUsedPermissionIndex,a201b6 as getArbitrationActivePermissionCount,a201b7 as inferArbitrationSceneFromIntent,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,a201b8 as getArbitrationScenesProducingStatus,a201b9 as getArbitrationScenesRequiringStatus,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions};export{a201ba as initArbitrationPuzzleFromIntent,a201bb as checkArbitrationPuzzleCompleteness,a201bc as validateArbitrationConstraints,a201bd as generateArbitrationPuzzleConfirmationText};export{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,a201be as getAllArbitrationTemplates,a201bf as getArbitrationTemplateById,a201bg as getArbitrationTemplatesByScene,a201bh as getArbitrationTemplatesByIndustry,a201bi as suggestArbitrationTemplateForScene,a201bj as listArbitrationTemplates,a201bk as fillArbitrationTemplate};export{ARBITRATION_RISK_VERSION,assessArbitrationRisks,a201bl as getAllArbitrationRiskRules};export{REWARD_LEDGER_VERSION,REWARD_SCENES,REWARD_PERMISSIONS,REWARD_FIELDS,REWARD_GUARD_CONSTRUCTORS,REWARD_ERROR_CODES,REWARD_CROSS_OBJECT_REFS,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,a201bm as getRewardScenesByPhase,a201bn as findRewardSceneById,a201bo as getRewardScenesByIndustry,a201bp as getRewardBuiltinPermissionByIndex,isRewardBuiltinPermission,a201bq as getAllRewardBuiltinPermissions,getRewardScenesCount,a201br as getRewardGuardConstructorSpec,a201bs as resolveRewardGuardConstructor,getRewardErrorByCode,getRewardErrorByName,a201bt as validateRewardGuardCount,a201bu as validateRewardRecordCount,a201bv as inferRewardSceneFromIntent};export{REWARD_FIELD_MUTABILITY,a201bw as initRewardPuzzleFromIntent,a201bx as checkRewardPuzzleCompleteness,a201by as validateRewardConstraints,a201bz as generateRewardPuzzleConfirmationText,a201bA as resolveRewardBuiltinPermission,a201bB as requiresRewardGuardConfig,a201bC as requiresRewardPassport,a201bD as getRewardRelevantDimensions,a201bE as getRewardFieldMutability,a201bF as isRewardAdminMutableField,a201bG as getRewardFieldPermissionIndex};export{REWARD_RISK_VERSION,assessRewardRisks,getAllRewardRiskRules};export{PASSPORT_LEDGER_VERSION,PASSPORT_ERROR_CODES,PASSPORT_SCENARIOS,MAX_GUARD_COUNT_PASSPORT,MAX_SUBMISSION_SIZE_PASSPORT,a201bH as getAllPassportScenarios,a201bI as getPassportScenesCount,a201bJ as findPassportScenarioById,a201bK as getPassportScenariosByConsumer,a201bL as getPassportScenariosUsingRelies,a201bM as inferPassportScenarioFromIntent,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,a201bN as getPassportErrorName,a201bO as getPassportErrorDescription};export{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,a201bP as getAllPassportTemplates,a201bQ as getPassportTemplateById,a201bR as getPassportTemplatesByScenario,a201bS as getPassportTemplatesByIndustry,a201bT as suggestPassportTemplateForScenario,a201bU as listPassportTemplates,a201bV as fillPassportTemplate};export{PROOF_RISK_RULES,checkProofRisks};export{REPOSITORY_RISK_RULES,checkRepositoryRisks,parseIdFromForRiskCheck};export{assessEvidenceReview,reviewEvidenceList}from'./evidence-review.js';export{DEMAND_RISK_RULES,checkDemandRisks};export{CONTACT_RISK_RULES,CONTACT_RISK_VERSION,checkContactRisks};export{RESOURCE_RISK_RULES,RESOURCE_RISK_VERSION,checkResourceRisks};export{PAYMENT_RISK_RULES,PAYMENT_RISK_VERSION,checkPaymentRisks};export{ARB_RISK_RULES,ARB_RISK_VERSION,checkArbRisks};export{PERSONAL_RISK_RULES,PERSONAL_RISK_VERSION,checkPersonalRisks};export{UTIL_RISK_RULES,UTIL_RISK_VERSION,checkUtilRisks};export{REGISTRAR_RISK_RULES,REGISTRAR_RISK_VERSION,checkRegistrarRisks};export{BRIDGE_RISK_RULES,BRIDGE_RISK_VERSION,checkBridgeRisks};export{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence};export{SCENARIO_MODES,SCENARIO_MODES_VERSION,MODE_COMPOSITIONS,matchScenarioMode,inferScenarioTraits,getScenarioMode,listScenarioModes,getShippedModes,getModeCompositions};export{BUILTIN_TEMPLATES,BUILTIN_TEMPLATES_VERSION,getBuiltinTemplate,listBuiltinTemplates,TEMPLATE_KEYWORDS};export{resolveTemplatesDir,seedBuiltinTemplates,reloadTemplates,listTemplates,getTemplate,a201bW as getIndustryTemplates,parseTemplateFile,renderTemplateFile,loadAndValidate,TemplateFrontmatterSchema};export{scanTemplate};export{GUARD_DESIGN_PATTERNS,GUARD_DESIGN_PATTERNS_VERSION,VERIFIER_LEVEL_GUIDANCE,getGuardDesignPattern,searchGuardDesignPatterns,getPatternsByHost,getPatternsByIndustry,getPatternsByDataSourceClass,getVerifierLevelGuidance,suggestPatternForRequirement};export function getKnowledgeBase(){return{'version':{'safety':SAFETY_RULES_VERSION,'tool_constraints':TOOL_CONSTRAINTS_VERSION,'reward_templates':REWARD_TEMPLATES_VERSION,'audit_rules':AUDIT_RULES_VERSION,'dynamic_pricing':DYNAMIC_PRICING_VERSION,'reputation_rules':REPUTATION_RULES_VERSION,'acquisition_flywheel':ACQUISITION_FLYWHEEL_VERSION,'industry_registry':INDUSTRY_REGISTRY_VERSION,'flywheel_loop':FLYWHEEL_LOOP_VERSION,'machine_ledger':MACHINE_LEDGER_VERSION,'machine_templates':MACHINE_TEMPLATES_VERSION,'machine_translation':MACHINE_TRANSLATION_VERSION,'machine_risk':MACHINE_RISK_VERSION,'machine_topology':MACHINE_TOPOLOGY_VERSION,'machine_puzzle':MACHINE_PUZZLE_VERSION,'service_ledger':SERVICE_LEDGER_VERSION,'service_risk':SERVICE_RISK_VERSION,'service_templates':SERVICE_TEMPLATES_VERSION,'allocation_ledger':ALLOCATION_LEDGER_VERSION,'allocation_puzzle':ALLOCATION_PUZZLE_VERSION,'allocation_risk':ALLOCATION_RISK_VERSION,'allocation_templates':ALLOCATION_TEMPLATES_VERSION,'treasury_ledger':TREASURY_LEDGER_VERSION,'treasury_templates':TREASURY_TEMPLATES_VERSION,'treasury_risk':TREASURY_RISK_VERSION,'order_ledger':ORDER_LEDGER_VERSION,'order_templates':ORDER_TEMPLATES_VERSION,'order_risk':ORDER_RISK_VERSION,'progress_ledger':PROGRESS_LEDGER_VERSION,'progress_templates':PROGRESS_TEMPLATES_VERSION,'progress_risk':PROGRESS_RISK_VERSION,'arbitration_ledger':ARBITRATION_LEDGER_VERSION,'arbitration_templates':ARBITRATION_TEMPLATES_VERSION,'arbitration_risk':ARBITRATION_RISK_VERSION,'reward_ledger':REWARD_LEDGER_VERSION,'reward_risk':REWARD_RISK_VERSION,'passport_ledger':PASSPORT_LEDGER_VERSION,'passport_templates':PASSPORT_TEMPLATES_VERSION,'contact_risk':CONTACT_RISK_VERSION,'resource_risk':RESOURCE_RISK_VERSION,'payment_risk':PAYMENT_RISK_VERSION,'arb_risk':ARB_RISK_VERSION,'personal_risk':PERSONAL_RISK_VERSION,'util_risk':UTIL_RISK_VERSION,'registrar_risk':REGISTRAR_RISK_VERSION,'bridge_risk':BRIDGE_RISK_VERSION,'scenario_modes':SCENARIO_MODES_VERSION,'guard_design_patterns':GUARD_DESIGN_PATTERNS_VERSION,'builtin_templates':BUILTIN_TEMPLATES_VERSION},'confirmation_rules':CONFIRMATION_RULES['length'],'confirmation_rule_ids':CONFIRMATION_RULES['map'](a=>a['id']),'tool_constraints_count':TOOL_CONSTRAINTS['length'],'reward_templates_count':REWARD_TEMPLATES['length'],'audit_rules_count':AUDIT_RULES['length'],'mutable_fields_count':MUTABLE_FIELDS['length'],'industry_flywheels_count':INDUSTRY_FLYWHEELS['length'],'industry_registry_count':getRegistrySize(),'intent_count':listIntents()['length'],'guard_scenes_count':GUARD_SCENES['length'],'guard_semantic_rules_count':SEMANTIC_TO_SCHEMA_RULES['length'],'guard_schema_rules_count':SCHEMA_TO_SEMANTIC_RULES['length'],'guard_constraint_rules_count':GUARD_CONSTRAINT_RULES['length'],'guard_risk_rules_count':getRiskRulesCount(),'guard_templates_count':GUARD_TEMPLATES_COUNT,'guard_lint_enabled':!![],'machine_scenes_count':MACHINE_SCENES_COUNT,'machine_templates_count':MACHINE_TEMPLATES['length'],'machine_patterns_count':SEMANTIC_TO_MACHINE_RULES['length'],'machine_constraint_rules_count':MACHINE_CONSTRAINT_RULES['length'],'machine_risk_rules_count':MACHINE_RISK_RULES['length'],'machine_on_chain_limits':{'max_node_count':MAX_NODE_COUNT,'max_node_pair_count':MAX_NODE_PAIR_COUNT,'max_forward_count':MAX_FORWARD_COUNT},'service_scenes_count':SERVICE_SCENES['length'],'service_permissions_count':SERVICE_PERMISSIONS['length'],'service_order_flow_stages_count':SERVICE_ORDER_FLOW_STAGES['length'],'service_cross_object_bindings_count':SERVICE_CROSS_OBJECT_BINDINGS['length'],'service_risk_rules_count':getAllServiceRiskRules()['length'],'service_templates_count':SERVICE_TEMPLATES['length'],'service_context_enabled':!![],'allocation_scenes_count':ALLOCATION_SCENES['length'],'allocation_risk_rules_count':a201L()['length'],'allocation_templates_count':ALLOCATION_TEMPLATES['length'],'allocation_context_enabled':!![],'treasury_scenes_count':TREASURY_SCENES['length'],'treasury_builtin_permissions_count':a201T['length'],'treasury_risk_rules_count':getAllTreasuryRiskRules()['length'],'treasury_templates_count':TREASURY_TEMPLATES['length'],'treasury_context_enabled':!![],'order_scenes_count':ORDER_SCENES['length'],'order_fields_count':ORDER_FIELDS['length'],'order_states_count':ORDER_STATES['length'],'order_lifecycle_events_count':ORDER_LIFECYCLE_EVENTS['length'],'order_risk_rules_count':getAllOrderRiskRules()['length'],'order_templates_count':ORDER_TEMPLATES['length'],'order_context_enabled':!![],'progress_scenes_count':PROGRESS_SCENES['length'],'progress_builtin_permissions_count':a201aL['length'],'progress_risk_rules_count':getAllProgressRiskRules()['length'],'progress_templates_count':PROGRESS_TEMPLATES['length'],'progress_context_enabled':!![],'arbitration_scenes_count':ARBITRATION_SCENES['length'],'arbitration_builtin_permissions_count':a201aY['length'],'arbitration_risk_rules_count':a201bl()['length'],'arbitration_templates_count':ARBITRATION_TEMPLATES['length'],'arbitration_context_enabled':!![],'reward_scenes_count':REWARD_SCENES['length'],'reward_builtin_permissions_count':REWARD_PERMISSIONS['length'],'reward_fields_count':REWARD_FIELDS['length'],'reward_guard_constructors_count':REWARD_GUARD_CONSTRUCTORS['length'],'reward_error_codes_count':REWARD_ERROR_CODES['length'],'reward_risk_rules_count':getAllRewardRiskRules()['length'],'reward_context_enabled':!![],'passport_scenarios_count':PASSPORT_SCENARIOS['length'],'passport_max_guard_count':MAX_GUARD_COUNT_PASSPORT,'passport_max_submission_size':MAX_SUBMISSION_SIZE_PASSPORT,'passport_templates_count':PASSPORT_TEMPLATES['length'],'passport_context_enabled':!![],'proof_risk_rules_count':PROOF_RISK_RULES['length'],'repository_risk_rules_count':REPOSITORY_RISK_RULES['length'],'demand_risk_rules_count':DEMAND_RISK_RULES['length'],'contact_risk_rules_count':CONTACT_RISK_RULES['length'],'resource_risk_rules_count':RESOURCE_RISK_RULES['length'],'payment_risk_rules_count':PAYMENT_RISK_RULES['length'],'arb_risk_rules_count':ARB_RISK_RULES['length'],'personal_risk_rules_count':PERSONAL_RISK_RULES['length'],'util_risk_rules_count':UTIL_RISK_RULES['length'],'registrar_risk_rules_count':REGISTRAR_RISK_RULES['length'],'bridge_risk_rules_count':BRIDGE_RISK_RULES['length'],'tools_reference_count':TOOLS_REFERENCE['length'],'scenario_modes_count':SCENARIO_MODES['length'],'scenario_mode_compositions_count':MODE_COMPOSITIONS['length'],'builtin_templates_count':BUILTIN_TEMPLATES['length'],'guard_design_patterns_count':GUARD_DESIGN_PATTERNS['length'],'verifier_level_guidance_count':VERIFIER_LEVEL_GUIDANCE['length']};}export{buildWorkflowGuidance,buildWorkflowReceipt,enrichWorkflowGuidance,mergeGuidanceIntoOutput,resolvePermissionRole,resolveLocalNamesFor,listLocalAccounts,accountCanExecuteForward,enumerateActionableForwards,forwardOperatorKind};export{buildWorkspaceLists}from'./workspace-lists.js';export{resolveSupplyChainGraph}from'./supply-chain.js';export{enumerateObjectOperations,operationCategoryOf,operationComplexityOf,isPermissionIndexType}from'./operation-dictionary.js';export{enumerateServices,enumerateDemands,enumerateArbs}from'./jsonrpc-enum.js';export{FIELD_MUTABILITY_RULES,LOCK_CONSTRAINTS,IRREVERSIBLE_OPERATIONS,STATE_MACHINE_TERMINALS,NUMERIC_LIMIT_CONSTRAINTS,EXTERNAL_ACCESS_MECHANISMS,fieldMutabilityOf,isActionForbidden,lockConstraintOf,numericLimitOf,externalAccessOf}from'./contract-invariants.js';export{GUARD_FIELD_COGNITION_VERSION,GUARD_FIELD_SITES,VALUE_ORIGIN_SEMANTICS,GUARD_PASSPORT_DOCTRINE,guardSitesFor,guardCognitionDoctrine,REPOSITORY_WRITE_ROUTE_MATRIX,repositoryRouteSlotConflicts}from'./guard-field-cognition.js';
@@ -1 +1 @@
1
- import{getFlywheelForIndustry,listIndustries as a203a,_setRegistryLookup as a203b}from'./acquisition-flywheel.js';import{getIndustryRiskChecks,getIndustryNeeds,getIndustryTemplate,SUPPORTED_INDUSTRIES}from'../customer/index.js';import{_setRegistryLookup as a203c}from'../customer/industry-risks.js';import{_setRegistryLookup as a203d}from'../customer/user-preferences.js';export function isRegisteredIndustry(a){if(!a)return![];const b=resolveIndustryName(a)??a['toLowerCase']();return b==='general'||registry['has'](b);}const BUILTIN_TRAITS={'freelance':{'has_logistics':![],'communication_heavy':!![],'pure_digital':!![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'high','consumption_frequency':'occasional','avg_ticket_size':'medium'},'rental':{'has_logistics':!![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':!![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'high','consumption_frequency':'occasional','avg_ticket_size':'medium'},'education':{'has_logistics':![],'communication_heavy':!![],'pure_digital':![],'long_cycle':!![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'one_time','avg_ticket_size':'large'},'travel':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':!![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'one_time','avg_ticket_size':'large'},'subscription':{'has_logistics':![],'communication_heavy':![],'pure_digital':!![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'frequent','avg_ticket_size':'small'},'retail':{'has_logistics':!![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'frequent','avg_ticket_size':'small'}},BUILTIN_DISPLAY_NAMES={'freelance':'Freelance','rental':'Rental','education':'Education','travel':'Travel','subscription':'Subscription','retail':'Retail','general':'General','custom':'Custom'},INDUSTRY_ALIASES={'outsourcing':'freelance','design':'freelance','development':'freelance','consulting':'freelance','rent':'rental','lease':'rental','course':'education','training':'education','tourism':'travel','itinerary':'travel','membership':'subscription','ecommerce':'retail','goods':'retail','freelancer':'freelance','gig':'freelance','edu':'education','trip':'travel','tour':'travel','subscribe':'subscription','shop':'retail','general_industry':'general','amazon':'retail','etsy':'retail','upwork':'freelance','fiverr':'freelance','contra':'freelance','airbnb':'rental','ziroom':'rental','turo':'rental','getaround':'rental','coursera':'education','udemy':'education','yuanfudao':'education','booking':'travel','klook':'travel','patreon':'subscription','onlyfans':'subscription','substack':'subscription','bnb':'rental','homestay':'rental','shortstay':'rental','short-stay':'rental','short-term-rental':'rental'};export const INDUSTRY_REGISTRY_VERSION=0x1;const registry=new Map();function seedBuiltinProfile(a){const b=BUILTIN_TRAITS[a];if(!b)return undefined;const c=getFlywheelForIndustry(a);if(!c)return undefined;const d=getIndustryRiskChecks(a),e=getIndustryNeeds(a),f=getIndustryTemplate(a);return{'name':a,'display_name':BUILTIN_DISPLAY_NAMES[a]??a,'traits':b,'source':'builtin','version':'v1','flywheel':c,'risk_checks':d,'preference_template':f,'needs':e};}function seedBuiltinIndustries(){for(const a of SUPPORTED_INDUSTRIES){const b=seedBuiltinProfile(a);b&&registry['set'](a,b);}}seedBuiltinIndustries(),injectRegistryLookup();function injectRegistryLookup(){a203b(a=>{const b=registry['get'](a);return b?{'flywheel':b['flywheel']}:undefined;}),a203c(a=>{const b=registry['get'](a);return b?{'risk_checks':b['risk_checks'],'needs':b['needs']}:undefined;}),a203d(a=>{const b=registry['get'](a);return b?{'preference_template':b['preference_template']}:undefined;});}export function getIndustryProfile(a){const b=registry['get'](a);return b?JSON['parse'](JSON['stringify'](b)):undefined;}export function listIndustries(a){const b=Array['from'](registry['values']());if(a?.['source'])return b['filter'](c=>c['source']===a['source']);return b;}export function registerIndustry(a){if(!a['name']||!a['traits']||!a['flywheel'])return![];return registry['set'](a['name'],a),!![];}export function getIndustryTraits(a){return registry['get'](a)?.['traits'];}export function resolveIndustryName(a){if(!a||typeof a!=='string')return undefined;const b=a['trim']();if(!b)return undefined;const c=b['toLowerCase']();if(INDUSTRY_ALIASES[b])return INDUSTRY_ALIASES[b];if(INDUSTRY_ALIASES[c])return INDUSTRY_ALIASES[c];if(registry['has'](b))return b;if(registry['has'](c))return c;return undefined;}export function getRegistrySize(){return registry['size'];}export function _resetRegistryForTest(){registry['clear'](),a203b(null),a203c(null),a203d(null),seedBuiltinIndustries(),injectRegistryLookup();}export function listBuiltinIndustryNames(){return a203a();}
1
+ import{getFlywheelForIndustry,listIndustries as a204a,_setRegistryLookup as a204b}from'./acquisition-flywheel.js';import{getIndustryRiskChecks,getIndustryNeeds,getIndustryTemplate,SUPPORTED_INDUSTRIES}from'../customer/index.js';import{_setRegistryLookup as a204c}from'../customer/industry-risks.js';import{_setRegistryLookup as a204d}from'../customer/user-preferences.js';export function isRegisteredIndustry(a){if(!a)return![];const b=resolveIndustryName(a)??a['toLowerCase']();return b==='general'||registry['has'](b);}const BUILTIN_TRAITS={'freelance':{'has_logistics':![],'communication_heavy':!![],'pure_digital':!![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'high','consumption_frequency':'occasional','avg_ticket_size':'medium'},'rental':{'has_logistics':!![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':!![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'high','consumption_frequency':'occasional','avg_ticket_size':'medium'},'education':{'has_logistics':![],'communication_heavy':!![],'pure_digital':![],'long_cycle':!![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'one_time','avg_ticket_size':'large'},'travel':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':!![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'one_time','avg_ticket_size':'large'},'subscription':{'has_logistics':![],'communication_heavy':![],'pure_digital':!![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'frequent','avg_ticket_size':'small'},'retail':{'has_logistics':!![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'frequent','avg_ticket_size':'small'}},BUILTIN_DISPLAY_NAMES={'freelance':'Freelance','rental':'Rental','education':'Education','travel':'Travel','subscription':'Subscription','retail':'Retail','general':'General','custom':'Custom'},INDUSTRY_ALIASES={'outsourcing':'freelance','design':'freelance','development':'freelance','consulting':'freelance','rent':'rental','lease':'rental','course':'education','training':'education','tourism':'travel','itinerary':'travel','membership':'subscription','ecommerce':'retail','goods':'retail','freelancer':'freelance','gig':'freelance','edu':'education','trip':'travel','tour':'travel','subscribe':'subscription','shop':'retail','general_industry':'general','amazon':'retail','etsy':'retail','upwork':'freelance','fiverr':'freelance','contra':'freelance','airbnb':'rental','ziroom':'rental','turo':'rental','getaround':'rental','coursera':'education','udemy':'education','yuanfudao':'education','booking':'travel','klook':'travel','patreon':'subscription','onlyfans':'subscription','substack':'subscription','bnb':'rental','homestay':'rental','shortstay':'rental','short-stay':'rental','short-term-rental':'rental'};export const INDUSTRY_REGISTRY_VERSION=0x1;const registry=new Map();function seedBuiltinProfile(a){const b=BUILTIN_TRAITS[a];if(!b)return undefined;const c=getFlywheelForIndustry(a);if(!c)return undefined;const d=getIndustryRiskChecks(a),e=getIndustryNeeds(a),f=getIndustryTemplate(a);return{'name':a,'display_name':BUILTIN_DISPLAY_NAMES[a]??a,'traits':b,'source':'builtin','version':'v1','flywheel':c,'risk_checks':d,'preference_template':f,'needs':e};}function seedBuiltinIndustries(){for(const a of SUPPORTED_INDUSTRIES){const b=seedBuiltinProfile(a);b&&registry['set'](a,b);}}seedBuiltinIndustries(),injectRegistryLookup();function injectRegistryLookup(){a204b(a=>{const b=registry['get'](a);return b?{'flywheel':b['flywheel']}:undefined;}),a204c(a=>{const b=registry['get'](a);return b?{'risk_checks':b['risk_checks'],'needs':b['needs']}:undefined;}),a204d(a=>{const b=registry['get'](a);return b?{'preference_template':b['preference_template']}:undefined;});}export function getIndustryProfile(a){const b=registry['get'](a);return b?JSON['parse'](JSON['stringify'](b)):undefined;}export function listIndustries(a){const b=Array['from'](registry['values']());if(a?.['source'])return b['filter'](c=>c['source']===a['source']);return b;}export function registerIndustry(a){if(!a['name']||!a['traits']||!a['flywheel'])return![];return registry['set'](a['name'],a),!![];}export function getIndustryTraits(a){return registry['get'](a)?.['traits'];}export function resolveIndustryName(a){if(!a||typeof a!=='string')return undefined;const b=a['trim']();if(!b)return undefined;const c=b['toLowerCase']();if(INDUSTRY_ALIASES[b])return INDUSTRY_ALIASES[b];if(INDUSTRY_ALIASES[c])return INDUSTRY_ALIASES[c];if(registry['has'](b))return b;if(registry['has'](c))return c;return undefined;}export function getRegistrySize(){return registry['size'];}export function _resetRegistryForTest(){registry['clear'](),a204b(null),a204c(null),a204d(null),seedBuiltinIndustries(),injectRegistryLookup();}export function listBuiltinIndustryNames(){return a204a();}
@@ -1 +1 @@
1
- import{query_events}from'@wowok/wowok';import{batchQueryObjectsByIds as a207a}from'../graph/onchain/sdk-batch.js';function toStr(a){if(typeof a==='string')return a;if(typeof a==='number'||typeof a==='bigint')return String(a);return undefined;}async function collectObjectIdsByEvent(a,b,c,d,e){const f=new Set();let g=null,h=![];while(f['size']<d){const i=await query_events({'type':a,'cursor':g,'limit':0x32,'order':'descending','no_cache':e,'network':c}),j=i?.['data']??[];if(j['length']===0x0)break;for(const k of j){const l=b(k);if(l)f['add'](l);}h=!!(i?.['hasNextPage']&&i?.['nextCursor']);if(!h)break;g=i?.['nextCursor']??null;}return{'ids':Array['from'](f)['slice'](0x0,d),'hasMore':h};}export async function enumerateServices(a,b={}){const c=b['max_objects']??0xc8,{ids:d,hasMore:e}=await collectObjectIdsByEvent('ServiceEvent',i=>typeof i?.['object']==='string'?i['object']:undefined,a,c,b['no_cache']),f=await a207a(d,a,b['no_cache']),g=(b['location_any']??[])['map'](i=>i['toLowerCase']()),h=f['filter'](i=>(i?.['type']??'')==='Service')['filter'](i=>{if(g['length']===0x0)return!![];const j=typeof i?.['location']==='string'?i['location']['toLowerCase']():'';return g['some'](k=>j['includes'](k));})['map'](i=>({'object':String(i['object']),'name':typeof i['name']==='string'?i['name']:undefined,'location':typeof i['location']==='string'?i['location']:'','json':{...i,'compensation_fund':toStr(i['compensation_fund']),'sales':Array['isArray'](i['sales'])?i['sales']['map'](j=>({...j,'price':toStr(j['price'])})):[]}}));return{'services':h,'total_enumerated':h['length'],'has_more':e};}export async function enumerateDemands(a,b={}){const c=b['max_objects']??0xc8,{ids:d,hasMore:e}=await collectObjectIdsByEvent('DemandChangedEvent',h=>typeof h?.['object']==='string'?h['object']:undefined,a,c,b['no_cache']),f=await a207a(d,a,b['no_cache']),g=f['filter'](h=>(h?.['type']??'')==='Demand')['map'](h=>h);return{'demands':g,'total_enumerated':g['length'],'has_more':e};}export async function enumerateArbs(a,b={}){const c=b['max_objects']??0xc8,{ids:d,hasMore:e}=await collectObjectIdsByEvent('ArbEvent',i=>typeof i?.['arb']==='string'?i['arb']:undefined,a,c,b['no_cache']),f=await a207a(d,a,b['no_cache']),g=b['status']===undefined?undefined:Array['isArray'](b['status'])?b['status']:[b['status']],h=f['filter'](i=>(i?.['type']??'')==='Arb')['map'](i=>i)['filter'](i=>b['arbitration']?i['arbitration']===b['arbitration']:!![])['filter'](i=>b['order']?i['order']===b['order']:!![])['filter'](i=>g?g['includes'](Number(i['status'])):!![]);return{'arbs':h,'total_enumerated':h['length'],'has_more':e};}
1
+ import{query_events}from'@wowok/wowok';import{batchQueryObjectsByIds as a208a}from'../graph/onchain/sdk-batch.js';function toStr(a){if(typeof a==='string')return a;if(typeof a==='number'||typeof a==='bigint')return String(a);return undefined;}async function collectObjectIdsByEvent(a,b,c,d,e){const f=new Set();let g=null,h=![];while(f['size']<d){const i=await query_events({'type':a,'cursor':g,'limit':0x32,'order':'descending','no_cache':e,'network':c}),j=i?.['data']??[];if(j['length']===0x0)break;for(const k of j){const l=b(k);if(l)f['add'](l);}h=!!(i?.['hasNextPage']&&i?.['nextCursor']);if(!h)break;g=i?.['nextCursor']??null;}return{'ids':Array['from'](f)['slice'](0x0,d),'hasMore':h};}export async function enumerateServices(a,b={}){const c=b['max_objects']??0xc8,{ids:d,hasMore:e}=await collectObjectIdsByEvent('ServiceEvent',i=>typeof i?.['object']==='string'?i['object']:undefined,a,c,b['no_cache']),f=await a208a(d,a,b['no_cache']),g=(b['location_any']??[])['map'](i=>i['toLowerCase']()),h=f['filter'](i=>(i?.['type']??'')==='Service')['filter'](i=>{if(g['length']===0x0)return!![];const j=typeof i?.['location']==='string'?i['location']['toLowerCase']():'';return g['some'](k=>j['includes'](k));})['map'](i=>({'object':String(i['object']),'name':typeof i['name']==='string'?i['name']:undefined,'location':typeof i['location']==='string'?i['location']:'','json':{...i,'compensation_fund':toStr(i['compensation_fund']),'sales':Array['isArray'](i['sales'])?i['sales']['map'](j=>({...j,'price':toStr(j['price'])})):[]}}));return{'services':h,'total_enumerated':h['length'],'has_more':e};}export async function enumerateDemands(a,b={}){const c=b['max_objects']??0xc8,{ids:d,hasMore:e}=await collectObjectIdsByEvent('DemandChangedEvent',h=>typeof h?.['object']==='string'?h['object']:undefined,a,c,b['no_cache']),f=await a208a(d,a,b['no_cache']),g=f['filter'](h=>(h?.['type']??'')==='Demand')['map'](h=>h);return{'demands':g,'total_enumerated':g['length'],'has_more':e};}export async function enumerateArbs(a,b={}){const c=b['max_objects']??0xc8,{ids:d,hasMore:e}=await collectObjectIdsByEvent('ArbEvent',i=>typeof i?.['arb']==='string'?i['arb']:undefined,a,c,b['no_cache']),f=await a208a(d,a,b['no_cache']),g=b['status']===undefined?undefined:Array['isArray'](b['status'])?b['status']:[b['status']],h=f['filter'](i=>(i?.['type']??'')==='Arb')['map'](i=>i)['filter'](i=>b['arbitration']?i['arbitration']===b['arbitration']:!![])['filter'](i=>b['order']?i['order']===b['order']:!![])['filter'](i=>g?g['includes'](Number(i['status'])):!![]);return{'arbs':h,'total_enumerated':h['length'],'has_more':e};}
@@ -1 +1 @@
1
- export const ORDER_FIELDS=[{'move_name':'id','sdk_name':'id','move_type':'UID','mutability_layer':0x1,'description':'Order\x20unique\x20ID'},{'move_name':'items','sdk_name':'items','move_type':'vector<SaleItem>','mutability_layer':0x1,'description':'Purchased\x20items\x20(created-immutable)'},{'move_name':'discount','sdk_name':'discount','move_type':'Option<address>','mutability_layer':0x1,'description':'Discount\x20object\x20address\x20(created-immutable)'},{'move_name':'progress','sdk_name':'progress','move_type':'Option<address>','mutability_layer':0x2,'description':'Progress\x20object\x20address\x20(one-time-set\x20when\x20the\x20Progress\x20binds)'},{'move_name':'machine','sdk_name':'machine','move_type':'Option<address>','mutability_layer':0x1,'description':'Machine\x20snapshot\x20copied\x20from\x20service.machine\x20at\x20buy\x20time'},{'move_name':'amount','sdk_name':'amount','move_type':'u64','mutability_layer':0x1,'description':'Order\x20amount\x20in\x20MIST\x20(created-immutable)'},{'move_name':'owner','sdk_name':'builder','move_type':'address','mutability_layer':0x4,'description':'Order\x20owner\x20/\x20buyer.\x20Mutable\x20at\x20ANY\x20time\x20via\x20an\x20ownership\x20transfer\x20(L1,\x20E_NOT_THE_OWNER).\x20⚠️\x20SDK\x20field\x20name\x20is\x20\x27builder\x27\x20(only\x20naming\x20deviation\x20in\x2022\x20objects)'},{'move_name':'service','sdk_name':'service','move_type':'address','mutability_layer':0x1,'description':'Service\x20object\x20address\x20(created-immutable,\x20reference\x20only)'},{'move_name':'dispute','sdk_name':'dispute','move_type':'vector<address>','mutability_layer':0x4,'description':'Arb\x20object\x20addresses\x20(append-only,\x20max\x2010,\x20frozen\x20when\x20claimed_by\x20set)'},{'move_name':'agent','sdk_name':'agent','move_type':'vector<address>','mutability_layer':0x4,'description':'Agent\x20addresses\x20(max\x2010\x20distinct\x20per\x20call\x20—\x20input\x20deduped\x20on-chain;\x20setting\x20the\x20list\x20REPLACES\x20it\x20at\x20any\x20time,\x20no\x20progress\x20freeze)'},{'move_name':'allocation','sdk_name':'allocation','move_type':'Option<address>','mutability_layer':0x2,'description':'Allocation\x20object\x20address\x20(one-time-set\x20when\x20the\x20Allocation\x20binds)'},{'move_name':'claimed_by','sdk_name':'claimed_by','move_type':'Option<address>','mutability_layer':0x2,'description':'Claimed\x20Arb\x20object\x20address\x20(one-time,\x20irreversible;\x20blocks\x20new\x20disputes)'},{'move_name':'required_info','sdk_name':'required_info','move_type':'Option<address>','mutability_layer':0x4,'description':'Contact\x20(recipient)\x20or\x20WTS\x20Proof\x20(delivery\x20proof);\x20owner-only'},{'move_name':'time','sdk_name':'time','move_type':'u64','mutability_layer':0x1,'description':'Creation\x20timestamp\x20(clock::timestamp_ms)'}];export const ORDER_STATES=['CREATED','IN_PROGRESS','DISPUTED','CLAIMED','COMPLETED','CANCELLED'];export const ORDER_STATE_TRANSITIONS=[{'from':'CREATED','to':'IN_PROGRESS','trigger':'buy\x20(with\x20machine)\x20→\x20the\x20Progress\x20object\x20is\x20set\x20at\x20creation'},{'from':'CREATED','to':'DISPUTED','trigger':'arb_confirm\x20→\x20dispute()\x20appends\x20Arb\x20address'},{'from':'CREATED','to':'COMPLETED','trigger':'Progress\x20reaches\x20terminal\x20(no\x20machine\x20path)\x20or\x20manual'},{'from':'IN_PROGRESS','to':'DISPUTED','trigger':'arb_confirm\x20→\x20dispute()\x20appends\x20Arb\x20address'},{'from':'IN_PROGRESS','to':'COMPLETED','trigger':'Progress\x20reaches\x20terminal\x20node'},{'from':'IN_PROGRESS','to':'CANCELLED','trigger':'Progress\x20reaches\x20cancel\x20node'},{'from':'DISPUTED','to':'CLAIMED','trigger':'arb_claim_compensation\x20→\x20compensate()\x20sets\x20claimed_by'},{'from':'DISPUTED','to':'COMPLETED','trigger':'Arb\x20resolution\x20+\x20Progress\x20terminal'},{'from':'DISPUTED','to':'CANCELLED','trigger':'Arb\x20resolution\x20=\x20cancel'}];export const ORDER_LIFECYCLE_EVENTS=[{'name':'NewOrderEvent','trigger':'buy\x20flow\x20phase\x205\x20(the\x20order\x20record\x20is\x20created)','emit_source':'order\x20creation\x20inside\x20the\x20buy\x20transaction','actually_emitted':!![],'fields':['object','service','progress','discount','allocation','amount']},{'name':'OrderCompletedEvent','trigger':'Progress\x20reaches\x20terminal','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','completion_time']},{'name':'OrderCancelledEvent','trigger':'Progress\x20reaches\x20cancel','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','cancel_reason']},{'name':'OrderAdvancedEvent','trigger':'order.progress\x20forward','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','from_node','to_node']},{'name':'OrderDisputeAppendedEvent','trigger':'arb_confirm\x20→\x20dispute()','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','arb']},{'name':'OrderClaimedEvent','trigger':'arb_claim_compensation\x20→\x20compensate()','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','arb','claimed_by']},{'name':'OwnerChangedEvent','trigger':'ownership\x20transfer\x20/\x20transfer_to','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','old_owner','new_owner']},{'name':'AgentSetEvent','trigger':'setting\x20the\x20agent\x20list','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','agent_list']},{'name':'RequiredInfoUpdatedEvent','trigger':'updating\x20required_info','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','required_info']},{'name':'AllocationBoundEvent','trigger':'allocation\x20binding','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','allocation']},{'name':'ProgressBoundEvent','trigger':'progress\x20binding','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','progress']}];export const ORDER_PERMISSION_MATRIX=[{'operation':'owner_receive\x20/\x20receive','move_function':'receive\x20CoinWrapper\x20/\x20receive\x20Receiving\x20object','layer':'L4_object_gated','aborts_with':'EPAYMENT_NOT_MATCH','notes':'Gated\x20by\x20Receiving\x20existence,\x20NOT\x20by\x20an\x20owner\x20assert:\x20the\x20allocation\x20payout\x20must\x20have\x20run\x20and\x20created\x20a\x20Receiving\x20at\x20the\x20caller\x27s\x20address.\x20No\x20owner\x20assert\x20—\x20funds\x20ALWAYS\x20go\x20to\x20order.owner\x20regardless\x20of\x20caller.\x20Receiving\x20must\x20match\x20the\x20Payment\x20object\x20(EPAYMENT_NOT_MATCH).'},{'operation':'transfer_to\x20(ownership\x20transfer)','move_function':'transfer\x20the\x20order\x20to\x20a\x20new\x20owner','layer':'L1_owner_only','aborts_with':'E_NOT_THE_OWNER','notes':'Irreversible.\x20New\x20owner\x20takes\x20over\x20ALL\x20permissions.\x20NOT\x20frozen\x20after\x20progress\x20binding.'},{'operation':'agent\x20(set\x20agent\x20list)','move_function':'set\x20the\x20agent\x20list\x20(replaces\x20all)','layer':'L1_owner_only','aborts_with':'E_NOT_THE_OWNER,\x20E_MAX_AGENT_COUNT','notes':'REPLACES\x20the\x20whole\x20agent\x20list\x20(not\x20append).\x20Max\x2010\x20distinct\x20agents\x20(assert\x20length\x20<\x20MAX_AGENT_COUNT\x20before\x20each\x20push).\x20NOT\x20frozen\x20after\x20progress\x20binding.'},{'operation':'update\x20required_info','move_function':'set\x20or\x20clear\x20required_info\x20(Contact\x20/\x20WTS\x20Proof)','layer':'L1_owner_only','aborts_with':'E_NOT_THE_OWNER','notes':'Owner-only.\x20Agent\x20CANNOT\x20update\x20required_info.'},{'operation':'progress\x20(advance)','move_function':'(progress::operate)','layer':'L2_owner_or_agent','aborts_with':'E_NOT_OP_PERMISSION','notes':'Both\x20owner\x20and\x20agent\x20can\x20advance\x20Progress.'},{'operation':'arb_confirm','move_function':'(file\x20for\x20arbitration)','layer':'L2_owner_or_agent','aborts_with':'E_NOT_OP_PERMISSION,\x20E_STATUS_NOT_MATCH,\x20E_ARB_ORDER_NOT_MATCH,\x20E_ORDER_ALREADY_CLAIMED','notes':'Both\x20can\x20file\x20arbitration.\x20confirmed=true\x20additionally\x20asserts\x20claimed_by\x20is\x20none.\x20Irreversible.'},{'operation':'arb_objection','move_function':'(object\x20to\x20the\x20arbitration\x20ruling)','layer':'L2_owner_or_agent','aborts_with':'E_NOT_OP_PERMISSION,\x20E_ORDER_ALREADY_CLAIMED,\x20E_STATUS_NOT_MATCH,\x20E_ARB_ORDER_NOT_MATCH','notes':'Both\x20can\x20object\x20to\x20Arb\x20ruling.\x20Requires\x20Arb\x20status\x20==\x20Arbirated.\x20Irreversible.'},{'operation':'arb_claim_compensation','move_function':'(claim\x20the\x20compensation)','layer':'L4_object_gated','aborts_with':'E_ORDER_SERVICE_NOT_MATCH,\x20E_ARBITRATION_ARB_NOT_MATCH,\x20E_STATUS_NOT_MATCH,\x20E_ARB_ORDER_NOT_MATCH,\x20E_COMPENSATION_NOT_MATCH,\x20E_ORDER_ALREADY_CLAIMED','notes':'No\x20op-permission\x20assert\x20—\x20gated\x20by\x20Arb\x20status\x20(must\x20be\x20Arbirated,\x20ruling\x20final).\x20Compensation\x20is\x20paid\x20to\x20the\x20order\x20owner\x20(permissionless\x20keeper\x20—\x20the\x20sender\x20never\x20receives).\x20Sets\x20claimed_by\x20—\x20one-time,\x20irreversible.\x20The\x20claim\x20does\x20NOT\x20seal\x20the\x20order:\x20the\x20owner\x20receive\x20entries\x20are\x20deliberately\x20ungated\x20(order.move:213-234),\x20so\x20any\x20escrow\x20balance\x20left\x20on\x20the\x20order\x20stays\x20claimable\x20unless\x20the\x20refund\x20allocator\x27s\x20guard\x20is\x20gated\x20on\x20order.claimed_by\x20some==false;\x20the\x20provider\x20release\x20track\x20(direct\x20transfer)\x20stays\x20usable.'},{'operation':'progress\x20binding\x20(package-only)','move_function':'bind\x20the\x20Progress\x20object\x20(package\x20write-back)','layer':'L3_package_only','aborts_with':'E_PROGRESS_ALREADY_SPECIFIED','notes':'Progress\x20module\x20writes\x20back.\x20No\x20external\x20access.'},{'operation':'allocation\x20binding\x20(package-only)','move_function':'bind\x20the\x20Allocation\x20object\x20(package\x20write-back)','layer':'L3_package_only','aborts_with':'E_ALLOCATION_ALREADY_SPECIFIED','notes':'Allocation\x20module\x20writes\x20back.\x20No\x20external\x20access.'},{'operation':'dispute\x20(package-only)','move_function':'dispute','layer':'L3_package_only','aborts_with':'E_ORDER_ALREADY_CLAIMED,\x20E_MAX_DISPUTE_COUNT','notes':'Arbitration\x20module\x20appends\x20Arb\x20address.'},{'operation':'compensate\x20(package-only)','move_function':'compensate','layer':'L3_package_only','aborts_with':'E_ORDER_ALREADY_CLAIMED','notes':'Arbitration\x20module\x20sets\x20claimed_by.\x20Irreversible.'}];export const ORDER_SCENES=[{'id':'order_create','name':'Create\x20order\x20via\x20a\x20service\x20purchase\x20(composite\x20creation)','operation_field':'object','move_entry':'buy\x20flow:\x20order\x20record\x20created\x20inside\x20the\x20service\x20purchase\x20transaction','permission_layer':'L3_package_only','reversibility':'irreversible','governed_operations':['buy\x20(items,\x20discount,\x20machine_forward?,\x20named_order?)','order\x20record\x20creation\x20(package-only)','allocation\x20creation\x20+\x20binding\x20(if\x20order_allocators\x20configured)','progress\x20creation\x20+\x20binding\x20(if\x20machine\x20configured)','order\x20record\x20created\x20+\x20NewOrderEvent\x20emitted'],'common_patterns':['Composite\x20creation:\x20Order\x20+\x20Allocation\x20+\x20Progress\x20in\x20one\x20transaction','Service.machine\x20is\x20SNAPSHOTTED\x20to\x20order.machine\x20(not\x20a\x20reference)','owner\x20=\x20tx_context::sender\x20(buyer);\x20agent\x20=\x20[]\x20initially','Allotment\x206\x20phases\x20are\x20atomic\x20—\x20any\x20failure\x20rolls\x20back\x20fully'],'related_risks':['R-O-1-05','R-O-2-01','R-O-4-01','R-O-5-01'],'recommended_templates':['T-O-01','T-O-02','T-O-03']},{'id':'order_advance','name':'Advance\x20Progress\x20(forward/hold)','operation_field':'progress','move_entry':'progress::operate\x20(via\x20order.progress\x20delegation)','permission_layer':'L2_owner_or_agent','reversibility':'irreversible','governed_operations':['progress.operation.next_node_name\x20+\x20forward','progress.op\x20(next/hold/unhold/adminUnhold)','progress.message\x20(optional)'],'common_patterns':['Both\x20owner\x20and\x20agent\x20can\x20advance\x20—\x20agent\x20enables\x20third-party\x20logistics','Node\x20transition\x20is\x20irreversible\x20(no\x20backward\x20movement)','Forward.guard\x20may\x20require\x20Guard\x20submission'],'related_risks':['R-O-3-02','R-O-4-03','R-O-5-03'],'recommended_templates':['T-O-02']},{'id':'order_set_agent','name':'Set\x20agent\x20list\x20(owner-only,\x20replaces\x20entire\x20list)','operation_field':'agent','move_entry':'set\x20the\x20agent\x20list\x20(owner-only)','permission_layer':'L1_owner_only','reversibility':'reversible','governed_operations':['set\x20the\x20agent\x20list\x20(overwrites\x20entire\x20agent\x20list)'],'common_patterns':['Setting\x20the\x20agent\x20list\x20REPLACES\x20the\x20whole\x20list\x20—\x20agents\x20omitted\x20from\x20the\x20new\x20list\x20silently\x20lose\x20access\x20(old\x20agent\x20role\x20records\x20are\x20removed\x20from\x20EntityOrders)','Max\x2010\x20distinct\x20agents\x20per\x20call\x20(E_MAX_AGENT_COUNT,\x20assert\x20length\x20<\x20MAX_AGENT_COUNT\x20before\x20each\x20push)','Can\x20be\x20called\x20at\x20ANY\x20time\x20—\x20NOT\x20frozen\x20after\x20Progress\x20binding','Agents\x20can\x20operate\x20the\x20order\x20(L2\x20ops)\x20but\x20CANNOT\x20change\x20owner\x20or\x20required_info\x20(L1\x20ops)'],'related_risks':['R-O-1-04','R-O-3-01','R-O-4-02'],'recommended_templates':['T-O-03']},{'id':'order_required_info','name':'Update\x20required_info\x20(Contact\x20or\x20WTS\x20Proof)','operation_field':'required_info','move_entry':'update\x20required_info\x20(owner-only)','permission_layer':'L1_owner_only','reversibility':'reversible','governed_operations':['update\x20required_info\x20(set\x20Contact\x20or\x20WTS\x20Proof\x20address)','required_info\x20=\x20null\x20(clear)'],'common_patterns':['Contact\x20object\x20=\x20recipient\x20info\x20(shipping\x20address)','WTS\x20Proof\x20object\x20=\x20delivery\x20proof\x20(via\x20Wowok\x20Messenger)','Owner-only\x20—\x20agent\x20CANNOT\x20update\x20required_info'],'related_risks':['R-O-3-02'],'recommended_templates':['T-O-01']},{'id':'order_arb_confirm','name':'Apply\x20for\x20arbitration\x20compensation','operation_field':'arb_confirm','move_entry':'arb_confirm\x20flow\x20(confirm\x20/\x20description\x20/\x20proposition)','permission_layer':'L2_owner_or_agent','reversibility':'irreversible','governed_operations':['arb_confirm.confirm\x20(true=confirm\x20materials,\x20false=deny)','arb_confirm.description\x20(compensation\x20application\x20description)','arb_confirm.proposition\x20(compensation\x20claims\x20list)'],'common_patterns':['Triggers\x20Arb\x20→\x20dispute()\x20appends\x20Arb\x20to\x20order.dispute','Both\x20owner\x20and\x20agent\x20can\x20file\x20—\x20agent\x20useful\x20for\x20representative\x20cases','Once\x20filed,\x20the\x20Arb\x20process\x20is\x20irreversible'],'related_risks':['R-O-3-03','R-O-4-04','R-O-5-04'],'recommended_templates':['T-O-04']},{'id':'order_arb_objection','name':'Object\x20to\x20arbitration\x20result','operation_field':'arb_objection','move_entry':'objection\x20to\x20the\x20arbitration\x20ruling','permission_layer':'L2_owner_or_agent','reversibility':'irreversible','governed_operations':['arb_objection.objection\x20(reason\x20for\x20re-arbitration)'],'common_patterns':['Requires\x20Arb\x20status\x20=\x20Arbitrated\x20(after\x20ruling)','Triggers\x20re-arbitration\x20flow','Both\x20owner\x20and\x20agent\x20can\x20object'],'related_risks':['R-O-3-03','R-O-4-04'],'recommended_templates':['T-O-04']},{'id':'order_arb_claim_compensation','name':'Claim\x20compensation\x20(sets\x20claimed_by,\x20irreversible)','operation_field':'arb_claim_compensation','move_entry':'claim\x20compensation\x20→\x20the\x20order\x20is\x20claimed\x20and\x20compensation\x20paid','permission_layer':'L4_object_gated','reversibility':'irreversible','governed_operations':['arb_claim_compensation.arb\x20(the\x20ruled\x20Arb\x20object)','compensate()\x20sets\x20order.claimed_by\x20=\x20arb'],'common_patterns':['⚠️\x20ONE-TIME,\x20IRREVERSIBLE\x20—\x20claimed_by\x20cannot\x20be\x20reset','After\x20claim,\x20NO\x20new\x20disputes\x20can\x20be\x20filed\x20and\x20the\x20order\x20rejects\x20all\x20further\x20payout\x20claims\x20(owner\x20receive\x20aborts\x20E_ORDER_ALREADY_CLAIMED)','Requires\x20Arb\x20status\x20=\x20Arbitrated\x20(ruling\x20final\x20—\x20no\x20op-permission\x20assert)','Compensation\x20is\x20paid\x20to\x20the\x20order\x20owner\x20(permissionless\x20keeper\x20—\x20the\x20sender\x20never\x20receives)'],'related_risks':['R-O-3-03','R-O-4-04','R-O-5-04'],'recommended_templates':['T-O-06']},{'id':'order_receive','name':'Receive\x20payment\x20(Receiving-gated,\x20funds\x20to\x20owner)','operation_field':'receive','move_entry':'receive\x20payment\x20(coin\x20or\x20Receiving\x20object)','permission_layer':'L4_object_gated','reversibility':'reversible','governed_operations':['receive\x20CoinWrapper\x20(unwrap\x20and\x20forward\x20to\x20owner)','receive\x20arbitrary\x20Receiving<K>\x20object'],'common_patterns':['⚠️\x20Gated\x20by\x20Receiving\x20existence:\x20the\x20allocation\x20payout\x20must\x20have\x20run\x20and\x20created\x20a\x20Receiving\x20at\x20the\x20caller\x27s\x20address\x20—\x20without\x20it\x20the\x20call\x20cannot\x20even\x20be\x20constructed','Receiving\x20must\x20match\x20the\x20Payment\x20object\x20(EPAYMENT_NOT_MATCH\x20on\x20mismatch)','No\x20owner\x20assert\x20—\x20funds\x20are\x20ALWAYS\x20forwarded\x20to\x20order.owner\x20regardless\x20of\x20caller','Can\x20be\x20called\x20multiple\x20times\x20(e.g.\x20partial\x20refunds)','Receives\x20are\x20unwrapped\x20(CoinWrapper\x20→\x20Coin)\x20and\x20transferred\x20to\x20owner\x20address'],'related_risks':['R-O-3-01','R-O-4-05'],'recommended_templates':['T-O-05']},{'id':'order_transfer','name':'Transfer\x20order\x20ownership\x20(irreversible)','operation_field':'transfer_to','move_entry':'transfer\x20the\x20order\x20to\x20a\x20new\x20owner\x20(owner-only)','permission_layer':'L1_owner_only','reversibility':'irreversible','governed_operations':['transfer_to\x20(new\x20owner\x20address)'],'common_patterns':['⚠️\x20IRREVERSIBLE\x20—\x20new\x20owner\x20takes\x20over\x20ALL\x20permissions','Only\x20owner\x20can\x20transfer','Can\x20be\x20called\x20even\x20after\x20Progress\x20binding\x20(unlike\x20setting\x20the\x20agent\x20list)','New\x20owner\x20becomes\x20the\x20sole\x20receiver\x20of\x20future\x20payments'],'related_risks':['R-O-3-01','R-O-4-06'],'recommended_templates':['T-O-05']},{'id':'order_dispute_append','name':'Append\x20Arb\x20to\x20dispute\x20list\x20(package-only)','operation_field':'lifecycle','move_entry':'append\x20Arb\x20to\x20the\x20dispute\x20list\x20(package-only)','permission_layer':'L3_package_only','reversibility':'append_only','governed_operations':['dispute(arb)\x20—\x20append\x20Arb\x20address\x20to\x20order.dispute'],'common_patterns':['Called\x20by\x20the\x20Arbitration\x20module\x20when\x20a\x20dispute\x20is\x20filed,\x20NOT\x20by\x20external\x20users','Max\x2010\x20Arb\x20addresses\x20(MAX_DISPUTE_COUNT)','Frozen\x20when\x20claimed_by\x20is\x20set\x20(E_ORDER_ALREADY_CLAIMED)','Duplicate\x20Arb\x20addresses\x20are\x20silently\x20skipped'],'related_risks':['R-O-1-03','R-O-3-03','R-O-5-04'],'recommended_templates':['T-O-04']}];export const ORDER_AUDIT_FORMULAS={'status_inference':'if\x20claimed_by\x20!=\x20null:\x20CLAIMED;\x20'+'elif\x20progress\x20!=\x20null:\x20query\x20Progress\x20→\x20terminal?\x20COMPLETED\x20:\x20cancel?\x20CANCELLED\x20:\x20IN_PROGRESS;\x20'+'elif\x20dispute.length\x20>\x200:\x20DISPUTED;\x20'+'else:\x20CREATED','amount_check':'order.amount\x20=\x20sum(items[].price\x20*\x20items[].quantity)\x20-\x20discount_value','fund_balance':'order.amount\x20=\x20allocation_distributed\x20+\x20compensation_paid\x20+\x20refund_amount','dispute_constraint':'dispute.length\x20<=\x20MAX_DISPUTE_COUNT\x20(10);\x20frozen\x20when\x20claimed_by.is_some()','agent_constraint':'agent.length\x20<=\x20MAX_AGENT_COUNT\x20(doc=10,\x20⚠️\x20actual=11\x20due\x20to\x20<=\x20bug\x20in\x20the\x20agent-set\x20implementation)'};export const ORDER_LEDGER_VERSION='1.0.0';export function getScenesByOperationField(a){return ORDER_SCENES['filter'](b=>b['operation_field']===a);}export function findSceneById(a){return ORDER_SCENES['find'](b=>b['id']===a);}export function findSceneByMoveEntry(a){return ORDER_SCENES['find'](b=>b['move_entry']['includes'](a));}export function getScenesByPermissionLayer(a){return ORDER_SCENES['filter'](b=>b['permission_layer']===a);}export function getScenesByReversibility(a){return ORDER_SCENES['filter'](b=>b['reversibility']===a);}export function getFieldDef(a){return ORDER_FIELDS['find'](b=>b['move_name']===a);}export function getMutableFields(){return ORDER_FIELDS['filter'](a=>a['mutability_layer']===0x4);}export function getImmutableFields(){return ORDER_FIELDS['filter'](a=>a['mutability_layer']===0x1);}export function getFrozenAfterProgressFields(){return ORDER_FIELDS['filter'](a=>a['mutability_layer']===0x3);}export function getOneTimeSetFields(){return ORDER_FIELDS['filter'](a=>a['mutability_layer']===0x2);}export function inferSceneFromIntent(a){const b=a['toLowerCase'](),c=[['buy','order_create'],['purchase','order_create'],['advance','order_advance'],['forward','order_advance'],['progress','order_advance'],['set\x20agent','order_set_agent'],['agent','order_set_agent'],['required_info','order_required_info'],['recipient','order_required_info'],['arb\x20confirm','order_arb_confirm'],['apply\x20arbitration','order_arb_confirm'],['apply\x20compensation','order_arb_confirm'],['objection','order_arb_objection'],['object','order_arb_objection'],['claim\x20compensation','order_arb_claim_compensation'],['claim','order_arb_claim_compensation'],['receive','order_receive'],['collect','order_receive'],['withdraw','order_receive'],['transfer','order_transfer'],['transfer\x20ownership','order_transfer'],['handover','order_transfer']];for(const [d,e]of c){if(b['includes'](d['toLowerCase']()))return findSceneById(e);}return undefined;}export function getEmittedEvents(){return ORDER_LIFECYCLE_EVENTS['filter'](a=>a['actually_emitted']);}export function getInferredEvents(){return ORDER_LIFECYCLE_EVENTS['filter'](a=>!a['actually_emitted']);}export function getOrderScenesCount(){return ORDER_SCENES['length'];}export function sdkToMoveField(a){const b=ORDER_FIELDS['find'](c=>c['sdk_name']===a);return b?.['move_name'];}export function moveToSdkField(a){const b=ORDER_FIELDS['find'](c=>c['move_name']===a);return b?.['sdk_name'];}
1
+ export const ORDER_FIELDS=[{'move_name':'id','sdk_name':'id','move_type':'UID','mutability_layer':0x1,'description':'Order\x20unique\x20ID'},{'move_name':'items','sdk_name':'items','move_type':'vector<SaleItem>','mutability_layer':0x1,'description':'Purchased\x20items\x20(created-immutable)'},{'move_name':'discount','sdk_name':'discount','move_type':'Option<address>','mutability_layer':0x1,'description':'Discount\x20object\x20address\x20(created-immutable)'},{'move_name':'progress','sdk_name':'progress','move_type':'Option<address>','mutability_layer':0x2,'description':'Progress\x20object\x20address\x20(one-time-set\x20when\x20the\x20Progress\x20binds)'},{'move_name':'machine','sdk_name':'machine','move_type':'Option<address>','mutability_layer':0x1,'description':'Machine\x20snapshot\x20copied\x20from\x20service.machine\x20at\x20buy\x20time'},{'move_name':'amount','sdk_name':'amount','move_type':'u64','mutability_layer':0x1,'description':'Order\x20amount\x20in\x20MIST\x20(created-immutable)'},{'move_name':'owner','sdk_name':'builder','move_type':'address','mutability_layer':0x4,'description':'Order\x20owner\x20/\x20buyer.\x20Mutable\x20at\x20ANY\x20time\x20via\x20an\x20ownership\x20transfer\x20(L1,\x20E_NOT_THE_OWNER).\x20⚠️\x20SDK\x20field\x20name\x20is\x20\x27builder\x27\x20(only\x20naming\x20deviation\x20in\x2022\x20objects)'},{'move_name':'service','sdk_name':'service','move_type':'address','mutability_layer':0x1,'description':'Service\x20object\x20address\x20(created-immutable,\x20reference\x20only)'},{'move_name':'dispute','sdk_name':'dispute','move_type':'vector<address>','mutability_layer':0x4,'description':'Arb\x20object\x20addresses\x20(append-only,\x20max\x2010,\x20frozen\x20when\x20claimed_by\x20set)'},{'move_name':'agent','sdk_name':'agent','move_type':'vector<address>','mutability_layer':0x4,'description':'Agent\x20addresses\x20(max\x2010\x20distinct\x20per\x20call\x20—\x20input\x20deduped\x20on-chain;\x20setting\x20the\x20list\x20REPLACES\x20it\x20at\x20any\x20time,\x20no\x20progress\x20freeze)'},{'move_name':'allocation','sdk_name':'allocation','move_type':'Option<address>','mutability_layer':0x2,'description':'Allocation\x20object\x20address\x20(one-time-set\x20when\x20the\x20Allocation\x20binds)'},{'move_name':'claimed_by','sdk_name':'claimed_by','move_type':'Option<address>','mutability_layer':0x2,'description':'Claimed\x20Arb\x20object\x20address\x20(one-time,\x20irreversible;\x20blocks\x20new\x20disputes)'},{'move_name':'required_info','sdk_name':'required_info','move_type':'Option<address>','mutability_layer':0x4,'description':'Contact\x20(recipient)\x20or\x20WTS\x20Proof\x20(delivery\x20proof);\x20owner-only.\x20The\x20controlled\x20bind\x20entry\x20additionally\x20chain-verifies\x20the\x20Proof\x20is\x20about\x20THIS\x20order\x20and\x20owner-created\x20(E_REQUIRED_INFO_PROOF_NOT_BOUND\x20otherwise).'},{'move_name':'time','sdk_name':'time','move_type':'u64','mutability_layer':0x1,'description':'Creation\x20timestamp\x20(clock::timestamp_ms)'}];export const ORDER_STATES=['CREATED','IN_PROGRESS','DISPUTED','CLAIMED','COMPLETED','CANCELLED'];export const ORDER_STATE_TRANSITIONS=[{'from':'CREATED','to':'IN_PROGRESS','trigger':'buy\x20(with\x20machine)\x20→\x20the\x20Progress\x20object\x20is\x20set\x20at\x20creation'},{'from':'CREATED','to':'DISPUTED','trigger':'arb_confirm\x20→\x20dispute()\x20appends\x20Arb\x20address'},{'from':'CREATED','to':'COMPLETED','trigger':'Progress\x20reaches\x20terminal\x20(no\x20machine\x20path)\x20or\x20manual'},{'from':'IN_PROGRESS','to':'DISPUTED','trigger':'arb_confirm\x20→\x20dispute()\x20appends\x20Arb\x20address'},{'from':'IN_PROGRESS','to':'COMPLETED','trigger':'Progress\x20reaches\x20terminal\x20node'},{'from':'IN_PROGRESS','to':'CANCELLED','trigger':'Progress\x20reaches\x20cancel\x20node'},{'from':'DISPUTED','to':'CLAIMED','trigger':'arb_claim_compensation\x20→\x20compensate()\x20sets\x20claimed_by'},{'from':'DISPUTED','to':'COMPLETED','trigger':'Arb\x20resolution\x20+\x20Progress\x20terminal'},{'from':'DISPUTED','to':'CANCELLED','trigger':'Arb\x20resolution\x20=\x20cancel'}];export const ORDER_LIFECYCLE_EVENTS=[{'name':'NewOrderEvent','trigger':'buy\x20flow\x20phase\x205\x20(the\x20order\x20record\x20is\x20created)','emit_source':'order\x20creation\x20inside\x20the\x20buy\x20transaction','actually_emitted':!![],'fields':['object','service','progress','discount','allocation','amount']},{'name':'OrderCompletedEvent','trigger':'Progress\x20reaches\x20terminal','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','completion_time']},{'name':'OrderCancelledEvent','trigger':'Progress\x20reaches\x20cancel','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','cancel_reason']},{'name':'OrderAdvancedEvent','trigger':'order.progress\x20forward','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','from_node','to_node']},{'name':'OrderDisputeAppendedEvent','trigger':'arb_confirm\x20→\x20dispute()','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','arb']},{'name':'OrderClaimedEvent','trigger':'arb_claim_compensation\x20→\x20compensate()','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','arb','claimed_by']},{'name':'OwnerChangedEvent','trigger':'ownership\x20transfer\x20/\x20transfer_to','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','old_owner','new_owner']},{'name':'AgentSetEvent','trigger':'setting\x20the\x20agent\x20list','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','agent_list']},{'name':'RequiredInfoUpdatedEvent','trigger':'updating\x20required_info','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','required_info']},{'name':'AllocationBoundEvent','trigger':'allocation\x20binding','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','allocation']},{'name':'ProgressBoundEvent','trigger':'progress\x20binding','emit_source':'(not\x20implemented)','actually_emitted':![],'fields':['order','progress']}];export const ORDER_PERMISSION_MATRIX=[{'operation':'owner_receive\x20/\x20receive','move_function':'receive\x20CoinWrapper\x20/\x20receive\x20Receiving\x20object','layer':'L4_object_gated','aborts_with':'EPAYMENT_NOT_MATCH','notes':'Gated\x20by\x20Receiving\x20existence,\x20NOT\x20by\x20an\x20owner\x20assert:\x20the\x20allocation\x20payout\x20must\x20have\x20run\x20and\x20created\x20a\x20Receiving\x20at\x20the\x20caller\x27s\x20address.\x20No\x20owner\x20assert\x20—\x20funds\x20ALWAYS\x20go\x20to\x20order.owner\x20regardless\x20of\x20caller.\x20Receiving\x20must\x20match\x20the\x20Payment\x20object\x20(EPAYMENT_NOT_MATCH).'},{'operation':'transfer_to\x20(ownership\x20transfer)','move_function':'transfer\x20the\x20order\x20to\x20a\x20new\x20owner','layer':'L1_owner_only','aborts_with':'E_NOT_THE_OWNER','notes':'Irreversible.\x20New\x20owner\x20takes\x20over\x20ALL\x20permissions.\x20NOT\x20frozen\x20after\x20progress\x20binding.'},{'operation':'agent\x20(set\x20agent\x20list)','move_function':'set\x20the\x20agent\x20list\x20(replaces\x20all)','layer':'L1_owner_only','aborts_with':'E_NOT_THE_OWNER,\x20E_MAX_AGENT_COUNT','notes':'REPLACES\x20the\x20whole\x20agent\x20list\x20(not\x20append).\x20Max\x2010\x20distinct\x20agents\x20(assert\x20length\x20<\x20MAX_AGENT_COUNT\x20before\x20each\x20push).\x20NOT\x20frozen\x20after\x20progress\x20binding.'},{'operation':'update\x20required_info','move_function':'set\x20or\x20clear\x20required_info\x20(Contact\x20/\x20WTS\x20Proof)','layer':'L1_owner_only','aborts_with':'E_NOT_THE_OWNER','notes':'Owner-only.\x20Agent\x20CANNOT\x20update\x20required_info.'},{'operation':'bind\x20required_info\x20(controlled)','move_function':'bind\x20a\x20WTS\x20Proof\x20to\x20the\x20order\x20(write\x20only\x20when\x20Proof-about==order\x20&&\x20Proof-creator==owner)','layer':'L1_owner_only','aborts_with':'E_NOT_THE_OWNER,\x20E_REQUIRED_INFO_PROOF_NOT_BOUND\x20(11)','notes':'MOV-PROTOCOL-1212\x20(11):\x20chain-enforced\x20per-order\x20binding.\x20On\x20mismatch\x20NOTHING\x20is\x20written.\x20Coexists\x20with\x20the\x20plain\x20update\x20above\x20—\x20the\x20reuse\x20model\x20(one\x20contact\x20Proof\x20across\x20orders)\x20stays\x20the\x20privacy-preserving\x20default;\x20bind\x20is\x20for\x20listings\x20that\x20promise\x20a\x20per-order\x20credential.'},{'operation':'progress\x20(advance)','move_function':'(progress::operate)','layer':'L2_owner_or_agent','aborts_with':'E_NOT_OP_PERMISSION','notes':'Both\x20owner\x20and\x20agent\x20can\x20advance\x20Progress.'},{'operation':'arb_confirm','move_function':'(file\x20for\x20arbitration)','layer':'L2_owner_or_agent','aborts_with':'E_NOT_OP_PERMISSION,\x20E_STATUS_NOT_MATCH,\x20E_ARB_ORDER_NOT_MATCH,\x20E_ORDER_ALREADY_CLAIMED','notes':'Both\x20can\x20file\x20arbitration.\x20confirmed=true\x20additionally\x20asserts\x20claimed_by\x20is\x20none.\x20Irreversible.'},{'operation':'arb_objection','move_function':'(object\x20to\x20the\x20arbitration\x20ruling)','layer':'L2_owner_or_agent','aborts_with':'E_NOT_OP_PERMISSION,\x20E_ORDER_ALREADY_CLAIMED,\x20E_STATUS_NOT_MATCH,\x20E_ARB_ORDER_NOT_MATCH','notes':'Both\x20can\x20object\x20to\x20Arb\x20ruling.\x20Requires\x20Arb\x20status\x20==\x20Arbirated.\x20Irreversible.'},{'operation':'arb_claim_compensation','move_function':'(claim\x20the\x20compensation)','layer':'L4_object_gated','aborts_with':'E_ORDER_SERVICE_NOT_MATCH,\x20E_ARBITRATION_ARB_NOT_MATCH,\x20E_STATUS_NOT_MATCH,\x20E_ARB_ORDER_NOT_MATCH,\x20E_COMPENSATION_NOT_MATCH,\x20E_ORDER_ALREADY_CLAIMED','notes':'No\x20op-permission\x20assert\x20—\x20gated\x20by\x20Arb\x20status\x20(must\x20be\x20Arbirated,\x20ruling\x20final).\x20Compensation\x20is\x20paid\x20to\x20the\x20order\x20owner\x20(permissionless\x20keeper\x20—\x20the\x20sender\x20never\x20receives).\x20Sets\x20claimed_by\x20—\x20one-time,\x20irreversible.\x20The\x20claim\x20does\x20NOT\x20seal\x20the\x20order:\x20the\x20owner\x20receive\x20entries\x20are\x20deliberately\x20ungated\x20(order.move:213-234),\x20so\x20any\x20escrow\x20balance\x20left\x20on\x20the\x20order\x20stays\x20claimable\x20unless\x20the\x20refund\x20allocator\x27s\x20guard\x20is\x20gated\x20on\x20order.claimed_by\x20some==false;\x20the\x20provider\x20release\x20track\x20(direct\x20transfer)\x20stays\x20usable.'},{'operation':'progress\x20binding\x20(package-only)','move_function':'bind\x20the\x20Progress\x20object\x20(package\x20write-back)','layer':'L3_package_only','aborts_with':'E_PROGRESS_ALREADY_SPECIFIED','notes':'Progress\x20module\x20writes\x20back.\x20No\x20external\x20access.'},{'operation':'allocation\x20binding\x20(package-only)','move_function':'bind\x20the\x20Allocation\x20object\x20(package\x20write-back)','layer':'L3_package_only','aborts_with':'E_ALLOCATION_ALREADY_SPECIFIED','notes':'Allocation\x20module\x20writes\x20back.\x20No\x20external\x20access.'},{'operation':'dispute\x20(package-only)','move_function':'dispute','layer':'L3_package_only','aborts_with':'E_ORDER_ALREADY_CLAIMED,\x20E_MAX_DISPUTE_COUNT','notes':'Arbitration\x20module\x20appends\x20Arb\x20address.'},{'operation':'compensate\x20(package-only)','move_function':'compensate','layer':'L3_package_only','aborts_with':'E_ORDER_ALREADY_CLAIMED','notes':'Arbitration\x20module\x20sets\x20claimed_by.\x20Irreversible.'}];export const ORDER_SCENES=[{'id':'order_create','name':'Create\x20order\x20via\x20a\x20service\x20purchase\x20(composite\x20creation)','operation_field':'object','move_entry':'buy\x20flow:\x20order\x20record\x20created\x20inside\x20the\x20service\x20purchase\x20transaction','permission_layer':'L3_package_only','reversibility':'irreversible','governed_operations':['buy\x20(items,\x20discount,\x20machine_forward?,\x20named_order?)','order\x20record\x20creation\x20(package-only)','allocation\x20creation\x20+\x20binding\x20(if\x20order_allocators\x20configured)','progress\x20creation\x20+\x20binding\x20(if\x20machine\x20configured)','order\x20record\x20created\x20+\x20NewOrderEvent\x20emitted'],'common_patterns':['Composite\x20creation:\x20Order\x20+\x20Allocation\x20+\x20Progress\x20in\x20one\x20transaction','Service.machine\x20is\x20SNAPSHOTTED\x20to\x20order.machine\x20(not\x20a\x20reference)','owner\x20=\x20tx_context::sender\x20(buyer);\x20agent\x20=\x20[]\x20initially','Allotment\x206\x20phases\x20are\x20atomic\x20—\x20any\x20failure\x20rolls\x20back\x20fully'],'related_risks':['R-O-1-05','R-O-2-01','R-O-4-01','R-O-5-01'],'recommended_templates':['T-O-01','T-O-02','T-O-03']},{'id':'order_advance','name':'Advance\x20Progress\x20(forward/hold)','operation_field':'progress','move_entry':'progress::operate\x20(via\x20order.progress\x20delegation)','permission_layer':'L2_owner_or_agent','reversibility':'irreversible','governed_operations':['progress.operation.next_node_name\x20+\x20forward','progress.op\x20(next/hold/unhold/adminUnhold)','progress.message\x20(optional)'],'common_patterns':['Both\x20owner\x20and\x20agent\x20can\x20advance\x20—\x20agent\x20enables\x20third-party\x20logistics','Node\x20transition\x20is\x20irreversible\x20(no\x20backward\x20movement)','Forward.guard\x20may\x20require\x20Guard\x20submission'],'related_risks':['R-O-3-02','R-O-4-03','R-O-5-03'],'recommended_templates':['T-O-02']},{'id':'order_set_agent','name':'Set\x20agent\x20list\x20(owner-only,\x20replaces\x20entire\x20list)','operation_field':'agent','move_entry':'set\x20the\x20agent\x20list\x20(owner-only)','permission_layer':'L1_owner_only','reversibility':'reversible','governed_operations':['set\x20the\x20agent\x20list\x20(overwrites\x20entire\x20agent\x20list)'],'common_patterns':['Setting\x20the\x20agent\x20list\x20REPLACES\x20the\x20whole\x20list\x20—\x20agents\x20omitted\x20from\x20the\x20new\x20list\x20silently\x20lose\x20access\x20(old\x20agent\x20role\x20records\x20are\x20removed\x20from\x20EntityOrders)','Max\x2010\x20distinct\x20agents\x20per\x20call\x20(E_MAX_AGENT_COUNT,\x20assert\x20length\x20<\x20MAX_AGENT_COUNT\x20before\x20each\x20push)','Can\x20be\x20called\x20at\x20ANY\x20time\x20—\x20NOT\x20frozen\x20after\x20Progress\x20binding','Agents\x20can\x20operate\x20the\x20order\x20(L2\x20ops)\x20but\x20CANNOT\x20change\x20owner\x20or\x20required_info\x20(L1\x20ops)'],'related_risks':['R-O-1-04','R-O-3-01','R-O-4-02'],'recommended_templates':['T-O-03']},{'id':'order_required_info','name':'Update\x20required_info\x20(Contact\x20or\x20WTS\x20Proof)','operation_field':'required_info','move_entry':'update\x20required_info\x20(owner-only)','permission_layer':'L1_owner_only','reversibility':'reversible','governed_operations':['update\x20required_info\x20(set\x20Contact\x20or\x20WTS\x20Proof\x20address)','required_info\x20=\x20null\x20(clear)'],'common_patterns':['Contact\x20object\x20=\x20recipient\x20info\x20(shipping\x20address)','WTS\x20Proof\x20object\x20=\x20delivery\x20proof\x20(via\x20Wowok\x20Messenger)','Owner-only\x20—\x20agent\x20CANNOT\x20update\x20required_info'],'related_risks':['R-O-3-02'],'recommended_templates':['T-O-01']},{'id':'order_arb_confirm','name':'Apply\x20for\x20arbitration\x20compensation','operation_field':'arb_confirm','move_entry':'arb_confirm\x20flow\x20(confirm\x20/\x20description\x20/\x20proposition)','permission_layer':'L2_owner_or_agent','reversibility':'irreversible','governed_operations':['arb_confirm.confirm\x20(true=confirm\x20materials,\x20false=deny)','arb_confirm.description\x20(compensation\x20application\x20description)','arb_confirm.proposition\x20(compensation\x20claims\x20list)'],'common_patterns':['Triggers\x20Arb\x20→\x20dispute()\x20appends\x20Arb\x20to\x20order.dispute','Both\x20owner\x20and\x20agent\x20can\x20file\x20—\x20agent\x20useful\x20for\x20representative\x20cases','Once\x20filed,\x20the\x20Arb\x20process\x20is\x20irreversible'],'related_risks':['R-O-3-03','R-O-4-04','R-O-5-04'],'recommended_templates':['T-O-04']},{'id':'order_arb_objection','name':'Object\x20to\x20arbitration\x20result','operation_field':'arb_objection','move_entry':'objection\x20to\x20the\x20arbitration\x20ruling','permission_layer':'L2_owner_or_agent','reversibility':'irreversible','governed_operations':['arb_objection.objection\x20(reason\x20for\x20re-arbitration)'],'common_patterns':['Requires\x20Arb\x20status\x20=\x20Arbitrated\x20(after\x20ruling)','Triggers\x20re-arbitration\x20flow','Both\x20owner\x20and\x20agent\x20can\x20object'],'related_risks':['R-O-3-03','R-O-4-04'],'recommended_templates':['T-O-04']},{'id':'order_arb_claim_compensation','name':'Claim\x20compensation\x20(sets\x20claimed_by,\x20irreversible)','operation_field':'arb_claim_compensation','move_entry':'claim\x20compensation\x20→\x20the\x20order\x20is\x20claimed\x20and\x20compensation\x20paid','permission_layer':'L4_object_gated','reversibility':'irreversible','governed_operations':['arb_claim_compensation.arb\x20(the\x20ruled\x20Arb\x20object)','compensate()\x20sets\x20order.claimed_by\x20=\x20arb'],'common_patterns':['⚠️\x20ONE-TIME,\x20IRREVERSIBLE\x20—\x20claimed_by\x20cannot\x20be\x20reset','After\x20claim,\x20NO\x20new\x20disputes\x20can\x20be\x20filed\x20and\x20the\x20order\x20rejects\x20all\x20further\x20payout\x20claims\x20(owner\x20receive\x20aborts\x20E_ORDER_ALREADY_CLAIMED)','Requires\x20Arb\x20status\x20=\x20Arbitrated\x20(ruling\x20final\x20—\x20no\x20op-permission\x20assert)','Compensation\x20is\x20paid\x20to\x20the\x20order\x20owner\x20(permissionless\x20keeper\x20—\x20the\x20sender\x20never\x20receives)'],'related_risks':['R-O-3-03','R-O-4-04','R-O-5-04'],'recommended_templates':['T-O-06']},{'id':'order_receive','name':'Receive\x20payment\x20(Receiving-gated,\x20funds\x20to\x20owner)','operation_field':'receive','move_entry':'receive\x20payment\x20(coin\x20or\x20Receiving\x20object)','permission_layer':'L4_object_gated','reversibility':'reversible','governed_operations':['receive\x20CoinWrapper\x20(unwrap\x20and\x20forward\x20to\x20owner)','receive\x20arbitrary\x20Receiving<K>\x20object'],'common_patterns':['⚠️\x20Gated\x20by\x20Receiving\x20existence:\x20the\x20allocation\x20payout\x20must\x20have\x20run\x20and\x20created\x20a\x20Receiving\x20at\x20the\x20caller\x27s\x20address\x20—\x20without\x20it\x20the\x20call\x20cannot\x20even\x20be\x20constructed','Receiving\x20must\x20match\x20the\x20Payment\x20object\x20(EPAYMENT_NOT_MATCH\x20on\x20mismatch)','No\x20owner\x20assert\x20—\x20funds\x20are\x20ALWAYS\x20forwarded\x20to\x20order.owner\x20regardless\x20of\x20caller','Can\x20be\x20called\x20multiple\x20times\x20(e.g.\x20partial\x20refunds)','Receives\x20are\x20unwrapped\x20(CoinWrapper\x20→\x20Coin)\x20and\x20transferred\x20to\x20owner\x20address'],'related_risks':['R-O-3-01','R-O-4-05'],'recommended_templates':['T-O-05']},{'id':'order_transfer','name':'Transfer\x20order\x20ownership\x20(irreversible)','operation_field':'transfer_to','move_entry':'transfer\x20the\x20order\x20to\x20a\x20new\x20owner\x20(owner-only)','permission_layer':'L1_owner_only','reversibility':'irreversible','governed_operations':['transfer_to\x20(new\x20owner\x20address)'],'common_patterns':['⚠️\x20IRREVERSIBLE\x20—\x20new\x20owner\x20takes\x20over\x20ALL\x20permissions','Only\x20owner\x20can\x20transfer','Can\x20be\x20called\x20even\x20after\x20Progress\x20binding\x20(unlike\x20setting\x20the\x20agent\x20list)','New\x20owner\x20becomes\x20the\x20sole\x20receiver\x20of\x20future\x20payments'],'related_risks':['R-O-3-01','R-O-4-06'],'recommended_templates':['T-O-05']},{'id':'order_dispute_append','name':'Append\x20Arb\x20to\x20dispute\x20list\x20(package-only)','operation_field':'lifecycle','move_entry':'append\x20Arb\x20to\x20the\x20dispute\x20list\x20(package-only)','permission_layer':'L3_package_only','reversibility':'append_only','governed_operations':['dispute(arb)\x20—\x20append\x20Arb\x20address\x20to\x20order.dispute'],'common_patterns':['Called\x20by\x20the\x20Arbitration\x20module\x20when\x20a\x20dispute\x20is\x20filed,\x20NOT\x20by\x20external\x20users','Max\x2010\x20Arb\x20addresses\x20(MAX_DISPUTE_COUNT)','Frozen\x20when\x20claimed_by\x20is\x20set\x20(E_ORDER_ALREADY_CLAIMED)','Duplicate\x20Arb\x20addresses\x20are\x20silently\x20skipped'],'related_risks':['R-O-1-03','R-O-3-03','R-O-5-04'],'recommended_templates':['T-O-04']}];export const ORDER_AUDIT_FORMULAS={'status_inference':'if\x20claimed_by\x20!=\x20null:\x20CLAIMED;\x20'+'elif\x20progress\x20!=\x20null:\x20query\x20Progress\x20→\x20terminal?\x20COMPLETED\x20:\x20cancel?\x20CANCELLED\x20:\x20IN_PROGRESS;\x20'+'elif\x20dispute.length\x20>\x200:\x20DISPUTED;\x20'+'else:\x20CREATED','amount_check':'order.amount\x20=\x20sum(items[].price\x20*\x20items[].quantity)\x20-\x20discount_value','fund_balance':'order.amount\x20=\x20allocation_distributed\x20+\x20compensation_paid\x20+\x20refund_amount','dispute_constraint':'dispute.length\x20<=\x20MAX_DISPUTE_COUNT\x20(10);\x20frozen\x20when\x20claimed_by.is_some()','agent_constraint':'agent.length\x20<=\x20MAX_AGENT_COUNT\x20(doc=10,\x20⚠️\x20actual=11\x20due\x20to\x20<=\x20bug\x20in\x20the\x20agent-set\x20implementation)'};export const ORDER_LEDGER_VERSION='1.0.0';export function getScenesByOperationField(a){return ORDER_SCENES['filter'](b=>b['operation_field']===a);}export function findSceneById(a){return ORDER_SCENES['find'](b=>b['id']===a);}export function findSceneByMoveEntry(a){return ORDER_SCENES['find'](b=>b['move_entry']['includes'](a));}export function getScenesByPermissionLayer(a){return ORDER_SCENES['filter'](b=>b['permission_layer']===a);}export function getScenesByReversibility(a){return ORDER_SCENES['filter'](b=>b['reversibility']===a);}export function getFieldDef(a){return ORDER_FIELDS['find'](b=>b['move_name']===a);}export function getMutableFields(){return ORDER_FIELDS['filter'](a=>a['mutability_layer']===0x4);}export function getImmutableFields(){return ORDER_FIELDS['filter'](a=>a['mutability_layer']===0x1);}export function getFrozenAfterProgressFields(){return ORDER_FIELDS['filter'](a=>a['mutability_layer']===0x3);}export function getOneTimeSetFields(){return ORDER_FIELDS['filter'](a=>a['mutability_layer']===0x2);}export function inferSceneFromIntent(a){const b=a['toLowerCase'](),c=[['buy','order_create'],['purchase','order_create'],['advance','order_advance'],['forward','order_advance'],['progress','order_advance'],['set\x20agent','order_set_agent'],['agent','order_set_agent'],['required_info','order_required_info'],['recipient','order_required_info'],['arb\x20confirm','order_arb_confirm'],['apply\x20arbitration','order_arb_confirm'],['apply\x20compensation','order_arb_confirm'],['objection','order_arb_objection'],['object','order_arb_objection'],['claim\x20compensation','order_arb_claim_compensation'],['claim','order_arb_claim_compensation'],['receive','order_receive'],['collect','order_receive'],['withdraw','order_receive'],['transfer','order_transfer'],['transfer\x20ownership','order_transfer'],['handover','order_transfer']];for(const [d,e]of c){if(b['includes'](d['toLowerCase']()))return findSceneById(e);}return undefined;}export function getEmittedEvents(){return ORDER_LIFECYCLE_EVENTS['filter'](a=>a['actually_emitted']);}export function getInferredEvents(){return ORDER_LIFECYCLE_EVENTS['filter'](a=>!a['actually_emitted']);}export function getOrderScenesCount(){return ORDER_SCENES['length'];}export function sdkToMoveField(a){const b=ORDER_FIELDS['find'](c=>c['sdk_name']===a);return b?.['move_name'];}export function moveToSdkField(a){const b=ORDER_FIELDS['find'](c=>c['move_name']===a);return b?.['sdk_name'];}
@@ -1 +1 @@
1
- import{MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD}from'./onchain-constants.js';export{MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD};export const REWARD_NEW={'index':0x96,'name':'REWARD_NEW','description':'Create\x20new\x20Reward<T>','governed_operations':['create\x20a\x20new\x20Reward\x20pool'],'sdk_exposed':!![]};export const REWARD_DESCRIPTION={'index':0x97,'name':'REWARD_DESCRIPTION','description':'Update\x20description','governed_operations':['update\x20the\x20Reward\x20description'],'sdk_exposed':!![]};export const REWARD_GUARD={'index':0x98,'name':'REWARD_GUARD','description':'Add\x20/\x20remove\x20expired\x20guards\x20(≤\x20MAX_GUARD_COUNT_REWARD=200)','governed_operations':['add\x20a\x20claim\x20guard\x20to\x20the\x20Reward','remove\x20expired\x20claim\x20guards'],'sdk_exposed':!![]};export const REWARD_COIN_ADD={'index':0x99,'name':'REWARD_COIN_ADD','description':'Deposit\x20Coin<T>\x20directly\x20into\x20Reward\x20balance\x20(joins\x20Balance<T>)','governed_operations':['deposit\x20Coin<T>\x20into\x20the\x20Reward\x20balance'],'sdk_exposed':!![]};export const REWARD_RECEIVE={'index':0x9a,'name':'REWARD_RECEIVE','description':'Receive\x20CoinWrapper<T>\x20into\x20the\x20balance\x20(unwrapped\x20with\x20balance\x20check)','governed_operations':['receive\x20a\x20CoinWrapper<T>\x20payment\x20into\x20the\x20balance'],'sdk_exposed':!![]};export const REWARD_GUARD_EXPIRATION_TIME_ADD={'index':0x9b,'name':'REWARD_GUARD_EXPIRATION_TIME_ADD','description':'Set\x20/\x20cancel\x20guard_not_added_expiration_time\x20(time-lock\x20on\x20new\x20guard\x20additions)','governed_operations':['set\x20or\x20cancel\x20the\x20time-lock\x20on\x20adding\x20new\x20guards'],'sdk_exposed':!![]};export const REWARD_OWNER_RECEIVE={'index':0x9c,'name':'REWARD_OWNER_RECEIVE','description':'Owner\x20receives\x20Receiving<K>\x20/\x20CoinWrapper<K>\x20at\x20terminal\x20state\x20(unwrap\x20→\x20owner)','governed_operations':['owner\x20receipt\x20of\x20payments\x20at\x20terminal\x20state\x20(unwrapped\x20to\x20the\x20owner)','owner\x20receipt\x20of\x20whole\x20objects\x20at\x20terminal\x20state'],'sdk_exposed':!![]};export const REWARD_UM={'index':0x9d,'name':'REWARD_UM','description':'Bind\x20/\x20unbind\x20Contact\x20(UM)\x20for\x20off-chain\x20coordination','governed_operations':['bind\x20a\x20Contact\x20as\x20the\x20UM\x20coordinator','unbind\x20the\x20UM\x20Contact'],'sdk_exposed':!![]};export const REWARD_PERMISSIONS=[REWARD_NEW,REWARD_DESCRIPTION,REWARD_GUARD,REWARD_COIN_ADD,REWARD_RECEIVE,REWARD_GUARD_EXPIRATION_TIME_ADD,REWARD_OWNER_RECEIVE,REWARD_UM];export const REWARD_FIELDS=[{'name':'id','move_type':'UID','mutability':'immutable','set_at_creation':!![],'constraint':'Object\x20UID;\x20assigned\x20at\x20creation.\x20Never\x20changes.'},{'name':'description','move_type':'String','mutability':'admin_mutable','set_at_creation':!![],'permission_index':0x97,'constraint':'Must\x20satisfy\x20common::DESCRIPTION.\x20Updated\x20via\x20permission\x20151.'},{'name':'guards','move_type':'vector<RewardGuard>','mutability':'admin_mutable','set_at_creation':!![],'permission_index':0x98,'constraint':'vector::length\x20<\x20MAX_GUARD_COUNT\x20(200);\x20E_GUARD_COUNT_EXCEEDED\x20on\x20overflow.','related_errors':['E_GUARD_COUNT_EXCEEDED']},{'name':'balance','move_type':'Balance<T>','mutability':'runtime','set_at_creation':!![],'constraint':'Zero\x20at\x20creation\x20(balance::zero());\x20grows\x20via\x20coin_add/receive;\x20shrinks\x20via\x20claim\x20(split)\x20and\x20never\x20via\x20direct\x20withdraw.','related_errors':['E_INSUFFICIENT_BALANCE']},{'name':'guard_not_added_expiration_time','move_type':'Option<u64>','mutability':'admin_mutable','set_at_creation':!![],'permission_index':0x9b,'constraint':'Option<timestamp_ms>.\x20When\x20Some(t):\x20guard_add\x20requires\x20clock\x20>\x20t\x20(E_GUARD_LOCKED_TIME).\x20When\x20None\x20or\x20t\x20<\x20now:\x20guards\x20can\x20be\x20added.','related_errors':['E_GUARD_LOCKED_TIME','E_GUARD_LOCKED_TIME_NOT_INCREASING','E_GUARD_LOCKED_TIME_INVALID']},{'name':'record','move_type':'ParentTable<address,\x20RecipientRecord>','mutability':'runtime','set_at_creation':!![],'constraint':'Per-recipient\x20claim\x20history.\x20Each\x20RecipientRecord.amount\x20vector\x20has\x20length\x20<\x20MAX_RECORD_COUNT\x20(5200);\x20E_RECORD_COUNT_EXCEEDED\x20on\x20overflow.','related_errors':['E_RECORD_COUNT_EXCEEDED']},{'name':'um','move_type':'Option<address>','mutability':'admin_mutable','set_at_creation':!![],'permission_index':0x9d,'constraint':'Option<Contact\x20address>.\x20Binding\x20creates\x20an\x20object-linker\x20core\x20binding;\x20unbinding\x20disaffiliates.'},{'name':'permission','move_type':'address','mutability':'admin_mutable','set_at_creation':!![],'constraint':'Permission\x20object\x20address.\x20Updated\x20owner-only\x20(asserts\x20old.owner\x20==\x20sender);\x20the\x20change\x20is\x20registered\x20as\x20an\x20object-linker\x20affiliation\x20change.'}];export const REWARD_GUARD_CONSTRUCTORS=[{'constructor':'dynamic_recipient_dynamic_amount','recipient_type':'GuardIdentifier','amount_type':'GuardU64Identifier','params':{'recipient_param':'u8','amount_param':'u8','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['recipient\x20identifier\x20must\x20resolve\x20to\x20an\x20address\x20in\x20the\x20Passport\x20table\x20—\x20E_RECIPIENT_IDENTIFIER_NOT_ADDRESS\x20(4)','amount\x20identifier\x20must\x20resolve\x20to\x20a\x20u64\x20Passport\x20value\x20—\x20E_AMOUNT_NOT_U64\x20(5)','if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Dynamic\x20recipient\x20+\x20dynamic\x20amount\x20—\x20both\x20extracted\x20from\x20Passport\x20at\x20claim\x20time\x20(e.g.\x20referral\x20rewards\x20where\x20referrer\x20and\x20amount\x20vary\x20per\x20claim).'},{'constructor':'dynamic_recipient_fixed_amount','recipient_type':'GuardIdentifier','amount_type':'Fixed','params':{'recipient_param':'u8','amount_param':'u64','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['recipient\x20identifier\x20must\x20resolve\x20to\x20an\x20address\x20in\x20the\x20Passport\x20table\x20—\x20E_RECIPIENT_IDENTIFIER_NOT_ADDRESS\x20(4)','if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Dynamic\x20recipient\x20+\x20fixed\x20amount\x20—\x20e.g.\x20first-order\x20reward\x20where\x20any\x20new\x20customer\x20claims\x20a\x20fixed\x201\x20WOW.'},{'constructor':'entity_recipient_dynamic_amount','recipient_type':'Entity','amount_type':'GuardU64Identifier','params':{'recipient_param':'address','amount_param':'u8','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['amount\x20identifier\x20must\x20resolve\x20to\x20a\x20u64\x20Passport\x20value\x20—\x20E_AMOUNT_NOT_U64\x20(5)','if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Fixed\x20recipient\x20+\x20dynamic\x20amount\x20—\x20e.g.\x20tiered\x20loyalty\x20reward\x20where\x20amount\x20depends\x20on\x20Passport\x20submission\x20(tier\x20level).'},{'constructor':'entity_recipient_fixed_amount','recipient_type':'Entity','amount_type':'Fixed','params':{'recipient_param':'address','amount_param':'u64','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Fully\x20fixed\x20recipient\x20+\x20amount\x20—\x20simplest\x20configuration\x20(e.g.\x20specific\x20partner\x20bounty).'},{'constructor':'caller_recipient_dynamic_amount','recipient_type':'Signer','amount_type':'GuardU64Identifier','params':{'amount_param':'u8','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['amount\x20identifier\x20must\x20resolve\x20to\x20a\x20u64\x20Passport\x20value\x20—\x20E_AMOUNT_NOT_U64\x20(5)','if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Caller\x20is\x20recipient\x20+\x20dynamic\x20amount\x20—\x20e.g.\x20self-service\x20claim\x20where\x20amount\x20depends\x20on\x20Passport\x20submission\x20(e.g.\x20cashback\x20rate).'},{'constructor':'caller_recipient_fixed_amount','recipient_type':'Signer','amount_type':'Fixed','params':{'amount_param':'u64','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Caller\x20is\x20recipient\x20+\x20fixed\x20amount\x20—\x20e.g.\x20flash\x20sale\x20where\x20any\x20eligible\x20caller\x20claims\x20a\x20fixed\x20reward.'}];export const REWARD_ERROR_CODES=[{'code':0x1,'name':'E_GUARD_LOCKED_TIME_NOT_INCREASING','description':'guard-lock\x20time\x20update:\x20new\x20time\x20<\x20current\x20clock\x20(must\x20be\x20≥\x20now)','trigger_operation':'guard-lock\x20time\x20update\x20(155)'},{'code':0x2,'name':'E_GUARD_EXPIRED','description':'guard_add\x20on\x20guard\x20with\x20expiration_time\x20<\x20now,\x20OR\x20claim\x20on\x20guard\x20with\x20expiration_time\x20<\x20now','trigger_operation':'guard_add\x20/\x20claim'},{'code':0x3,'name':'E_GUARD_COUNT_EXCEEDED','description':'guard_add\x20would\x20exceed\x20MAX_GUARD_COUNT=200\x20(only\x20on\x20NEW\x20guard,\x20not\x20on\x20update\x20of\x20existing)','trigger_operation':'guard_add'},{'code':0x4,'name':'E_RECIPIENT_IDENTIFIER_NOT_ADDRESS','description':'RewardGuard\x20constructor:\x20recipient\x20identifier\x20type\x20is\x20not\x20address\x20(GuardIdentifier\x20variant\x20only)','trigger_operation':'claim-guard\x20construction'},{'code':0x5,'name':'E_AMOUNT_NOT_U64','description':'RewardGuard\x20constructor:\x20amount\x20identifier\x20type\x20is\x20not\x20u64\x20(GuardU64Identifier\x20variant\x20only)','trigger_operation':'claim-guard\x20construction'},{'code':0x6,'name':'E_INSUFFICIENT_BALANCE','description':'claim:\x20balance\x20<\x20amount\x20(cannot\x20split\x20more\x20than\x20held)','trigger_operation':'claim'},{'code':0x7,'name':'E_GUARD_NOT_FOUND','description':'claim:\x20no\x20guard\x20in\x20self.guards\x20matches\x20the\x20supplied\x20guard\x20address','trigger_operation':'claim'},{'code':0x8,'name':'E_RECORD_COUNT_EXCEEDED','description':'claim:\x20recipient\x20already\x20has\x20MAX_RECORD_COUNT=5200\x20entries\x20(E_RECORD_COUNT_EXCEEDED)','trigger_operation':'claim'},{'code':0xa,'name':'E_GUARD_LOCKED_TIME','description':'guard_add\x20while\x20guard_not_added_expiration_time\x20is\x20Some\x20and\x20clock\x20≤\x20expiration_time','trigger_operation':'guard_add'},{'code':0xb,'name':'E_GUARD_LOCKED_TIME_INVALID','description':'guard-lock\x20time\x20update:\x20new\x20Some(t)\x20where\x20t\x20≤\x20now\x20(must\x20be\x20future)','trigger_operation':'guard-lock\x20time\x20update\x20(155)'},{'code':0xc,'name':'E_STORE_FROM_ID_NOT_COMPATIBLE','description':'RewardGuard\x20constructor:\x20store_from_id\x20identifier\x20type\x20is\x20not\x20number\x20or\x20address','trigger_operation':'claim-guard\x20construction'}];export const REWARD_SCENES=[{'id':'reward_first_order','name':'First-order\x20reward','industry':['universal','ecommerce','service','freelance'],'scenario':'New\x20customers\x20receive\x20a\x20fixed\x20reward\x20after\x20their\x20first\x20order.\x20Guard\x20verifies\x20order\x20ownership\x20+\x20first-time\x20status;\x20'+'Recipient=Signer\x20(caller\x20is\x20the\x20new\x20customer);\x20Amount=Fixed\x20(e.g.\x201\x20WOW).','phases':['creation','guard_addition','funds_replenish','claim'],'coin_type_note':'T\x20=\x20project\x20reward\x20coin\x20(e.g.\x200x2::wow::WOW\x20or\x20a\x20custom\x20token)','typical_guard_count':0x1,'recipient_types_used':['Signer'],'amount_types_used':['Fixed'],'uses_expiration_time':!![],'uses_store_from_id':![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD],'common_patterns':['Signer\x20recipient\x20+\x20Fixed\x20amount\x20—\x20caller\x20claims\x20a\x20fixed\x20amount\x20(e.g.\x201\x20WOW)','Guard\x20verifies:\x20order_address.holder\x20==\x20signer\x20AND\x20order\x20is\x20the\x20first\x20order\x20(Repository\x20query)','expiration_time\x20bounds\x20the\x20campaign\x20window\x20(e.g.\x2030\x20days)','coin_add\x20deposits\x20the\x20campaign\x20budget\x20upfront\x20(e.g.\x20100\x20WOW\x20for\x20100\x20claims)'],'recommended_templates':['first_order']},{'id':'reward_referral','name':'Referral\x20viral\x20reward','industry':['universal','ecommerce','service','content'],'scenario':'Both\x20referrer\x20and\x20referee\x20receive\x20a\x20reward\x20when\x20the\x20referee\x20completes\x20a\x20first\x20order.\x20Two\x20guards:\x20one\x20for\x20referrer\x20(Entity),\x20one\x20for\x20referee\x20(Signer).','phases':['creation','guard_addition','funds_replenish','claim'],'coin_type_note':'T\x20=\x20project\x20reward\x20coin','typical_guard_count':0x2,'recipient_types_used':['Entity','Signer'],'amount_types_used':['Fixed'],'uses_expiration_time':!![],'uses_store_from_id':!![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD],'common_patterns':['Entity\x20recipient\x20+\x20Fixed\x20amount\x20for\x20the\x20referrer\x20(recipient\x20=\x20referrer\x20address)','Signer\x20recipient\x20+\x20Fixed\x20amount\x20for\x20the\x20referee\x20(caller\x20is\x20recipient)','Guard\x20verifies:\x20referrer\x20marked\x20in\x20Repository\x20AND\x20referee\x27s\x20order\x20completed','store_from_id\x20may\x20record\x20the\x20order\x20address\x20for\x20audit\x20trail'],'recommended_templates':['referral']},{'id':'reward_loyalty','name':'Loyalty\x20tiered\x20reward','industry':['universal','ecommerce','subscription','content'],'scenario':'Customers\x20unlock\x20higher\x20rewards\x20after\x20reaching\x20cumulative\x20spending\x20tiers.\x20Recipient=Signer;\x20Amount=GuardU64Identifier\x20(tier-dependent\x20amount\x20extracted\x20from\x20Passport).','phases':['creation','guard_addition','funds_replenish','claim'],'coin_type_note':'T\x20=\x20project\x20reward\x20coin','typical_guard_count':0x1,'recipient_types_used':['Signer'],'amount_types_used':['GuardU64Identifier'],'uses_expiration_time':![],'uses_store_from_id':![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD],'common_patterns':['Signer\x20recipient\x20+\x20identifier\x20amount\x20—\x20amount\x20is\x20dynamic,\x20extracted\x20from\x20Passport\x20submission\x20(tier\x20level\x20→\x20reward\x20amount)','Guard\x20verifies:\x20cumulative\x20spend\x20≥\x20tier\x20threshold\x20(Repository\x20query)','No\x20expiration_time\x20—\x20loyalty\x20is\x20perpetual\x20(until\x20deactivated\x20via\x20guard_remove_expired)','Guard\x20submission\x20value\x20type\x20MUST\x20be\x20u64\x20(E_AMOUNT_NOT_U64\x20otherwise)'],'recommended_templates':['loyalty']},{'id':'reward_flash_sale','name':'Limited-time\x20flash\x20sale\x20reward','industry':['universal','ecommerce','retail'],'scenario':'Time-bounded\x20reward\x20for\x20the\x20first\x20N\x20callers.\x20Recipient=Signer;\x20Amount=Fixed.\x20Guard\x20verifies\x20time\x20window\x20+\x20claim\x20count.','phases':['creation','guard_addition','funds_replenish','claim','guard_lock_mgmt'],'coin_type_note':'T\x20=\x20project\x20reward\x20coin','typical_guard_count':0x1,'recipient_types_used':['Signer'],'amount_types_used':['Fixed'],'uses_expiration_time':!![],'uses_store_from_id':![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD,REWARD_GUARD_EXPIRATION_TIME_ADD],'common_patterns':['Signer\x20recipient\x20+\x20Fixed\x20amount\x20—\x20fixed\x20amount\x20per\x20claim\x20(e.g.\x202\x20WOW)','expiration_time\x20bounds\x20the\x20flash\x20sale\x20window\x20(e.g.\x2048\x20hours)','the\x20guard-addition\x20time-lock\x20(155)\x20may\x20lock\x20further\x20guard\x20additions\x20during\x20the\x20sale','Budget\x20=\x20max_claims\x20×\x20amount;\x20coin_add\x20deposits\x20this\x20upfront'],'recommended_templates':['flash_sale']},{'id':'reward_bulk_discount','name':'Bulk\x20discount\x20/\x20cashback\x20reward','industry':['universal','ecommerce','wholesale','service'],'scenario':'Customer\x20receives\x20cashback\x20proportional\x20to\x20order\x20size.\x20Recipient=Signer\x20or\x20Entity\x20(order\x20holder);\x20Amount=GuardU64Identifier\x20(cashback\x20rate\x20from\x20Passport).','phases':['creation','guard_addition','funds_replenish','claim'],'coin_type_note':'T\x20=\x20payment\x20coin\x20type\x20(must\x20match\x20order\x20payment\x20for\x20clean\x20cashback)','typical_guard_count':0x1,'recipient_types_used':['Signer','Entity'],'amount_types_used':['GuardU64Identifier'],'uses_expiration_time':![],'uses_store_from_id':!![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD,REWARD_RECEIVE],'common_patterns':['Signer\x20recipient\x20+\x20identifier\x20amount\x20—\x20caller\x20claims\x20dynamic\x20amount\x20(cashback\x20=\x20order_amount\x20×\x20rate)','store_from_id\x20records\x20the\x20order\x20address\x20for\x20cross-reference\x20(audit\x20trail)','receive\x20(154)\x20may\x20be\x20used\x20to\x20accept\x20CoinWrapper<T>\x20refunds\x20that\x20replenish\x20the\x20balance','Guard\x20verifies:\x20order.completed\x20AND\x20order.service\x20==\x20this\x20Service'],'recommended_templates':['cashback']},{'id':'reward_milestone','name':'Service\x20milestone\x20reward','industry':['universal','ecommerce','content','subscription'],'scenario':'When\x20a\x20Service\x20reaches\x20a\x20milestone\x20(e.g.\x20100\x20orders),\x20early\x20supporters\x20receive\x20extra\x20rewards.\x20Recipient=Entity\x20(early\x20customer);\x20Amount=Fixed.','phases':['creation','guard_addition','funds_replenish','claim','guard_lock_mgmt'],'coin_type_note':'T\x20=\x20project\x20reward\x20coin','typical_guard_count':0x32,'recipient_types_used':['Entity'],'amount_types_used':['Fixed'],'uses_expiration_time':!![],'uses_store_from_id':![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD,REWARD_GUARD_EXPIRATION_TIME_ADD],'common_patterns':['Entity\x20recipient\x20+\x20Fixed\x20amount\x20for\x20each\x20early\x20customer\x20(recipient\x20=\x20customer\x20address)','Multiple\x20guards\x20(up\x20to\x2050\x20for\x2050\x20early\x20supporters)\x20—\x20well\x20within\x20MAX_GUARD_COUNT=200','Guard\x20verifies:\x20Service\x20order_count\x20>=\x20milestone\x20AND\x20claimer\x20is\x20in\x20early-customer\x20list','the\x20guard-addition\x20time-lock\x20(155)\x20may\x20lock\x20the\x20guard\x20list\x20after\x20milestone\x20setup'],'recommended_templates':['milestone']}];export const REWARD_LEDGER_VERSION='1.0.0';export function getScenesByPhase(a){return REWARD_SCENES['filter'](b=>b['phases']['includes'](a));}export function findSceneById(a){return REWARD_SCENES['find'](b=>b['id']===a);}export function getScenesByIndustry(a){return REWARD_SCENES['filter'](b=>b['industry']['includes'](a)||b['industry']['includes']('universal'));}export function getBuiltinPermissionByIndex(a){return REWARD_PERMISSIONS['find'](b=>b['index']===a);}export function isRewardBuiltinPermission(a){return getBuiltinPermissionByIndex(a)!==undefined;}export function getAllBuiltinPermissions(){return[...REWARD_PERMISSIONS];}export function getRewardScenesCount(){return REWARD_SCENES['length'];}export function getGuardConstructorSpec(a){return REWARD_GUARD_CONSTRUCTORS['find'](b=>b['constructor']===a);}export function resolveGuardConstructor(a,b){const c={'GuardIdentifier|GuardU64Identifier':'dynamic_recipient_dynamic_amount','GuardIdentifier|Fixed':'dynamic_recipient_fixed_amount','Entity|GuardU64Identifier':'entity_recipient_dynamic_amount','Entity|Fixed':'entity_recipient_fixed_amount','Signer|GuardU64Identifier':'caller_recipient_dynamic_amount','Signer|Fixed':'caller_recipient_fixed_amount'};return c[a+'|'+b];}export function getRewardErrorByCode(a){return REWARD_ERROR_CODES['find'](b=>b['code']===a);}export function getRewardErrorByName(a){return REWARD_ERROR_CODES['find'](b=>b['name']===a);}export function validateGuardCount(a){if(a>=MAX_GUARD_COUNT_REWARD)return{'ok':![],'violation':'Guard\x20count\x20'+a+'\x20would\x20exceed\x20MAX_GUARD_COUNT_REWARD\x20'+MAX_GUARD_COUNT_REWARD};return{'ok':!![]};}export function validateRecordCount(a){if(a>=MAX_RECORD_COUNT_REWARD)return{'ok':![],'violation':'Record\x20count\x20'+a+'\x20would\x20exceed\x20MAX_RECORD_COUNT_REWARD\x20'+MAX_RECORD_COUNT_REWARD+'\x20—\x20recipient\x20can\x20no\x20longer\x20claim'};return{'ok':!![]};}export function inferSceneFromIntent(a){const b=a['toLowerCase'](),c=[['flash\x20sale','reward_flash_sale'],['flash_sale','reward_flash_sale'],['limited-time','reward_flash_sale'],['limited\x20time','reward_flash_sale'],['referral','reward_referral'],['viral','reward_referral'],['refer\x20a\x20friend','reward_referral'],['invite','reward_referral'],['loyalty','reward_loyalty'],['tiered','reward_loyalty'],['tier','reward_loyalty'],['repeat','reward_loyalty'],['cashback','reward_bulk_discount'],['bulk\x20discount','reward_bulk_discount'],['bulk_discount','reward_bulk_discount'],['wholesale','reward_bulk_discount'],['milestone','reward_milestone'],['early\x20supporter','reward_milestone'],['early\x20customer','reward_milestone'],['first\x20order','reward_first_order'],['first_order','reward_first_order'],['new\x20customer','reward_first_order'],['first-time','reward_first_order']];for(const [d,e]of c){if(b['includes'](d)){const f=findSceneById(e);if(f)return f;}}return undefined;}export const REWARD_CROSS_OBJECT_REFS=[{'object':'Permission','phase':'universal','relationship':'Reward.permission\x20(address;\x20borrowed\x20for\x20all\x20150-157\x20assertions)'},{'object':'Permission','phase':'permission_update','relationship':'permission\x20update:\x20owner-only\x20(asserts\x20old.owner\x20==\x20sender);\x20registered\x20as\x20an\x20object-linker\x20affiliation\x20change'},{'object':'Guard','phase':'guard_addition','relationship':'RewardGuard.guard\x20=\x20guard.id_address\x20(each\x20guard\x20registered\x20via\x20object-linker\x20core\x20binding)'},{'object':'Guard','phase':'claim','relationship':'claim:\x20iterates\x20self.guards\x20looking\x20for\x20guard.id_address\x20match;\x20E_GUARD_NOT_FOUND\x20if\x20no\x20match'},{'object':'Guard','phase':'claim','relationship':'claim:\x20the\x20guard\x20verification\x20result\x20validates\x20the\x20Passport\x20submission\x20data'},{'object':'Passport','phase':'claim','relationship':'claim:\x20the\x20claimant\x27s\x20Passport\x20submission\x20supplies\x20the\x20recipient\x20(address)\x20and/or\x20amount\x20(u64)\x20per\x20RewardGuard\x20variant'},{'object':'Passport','phase':'claim','relationship':'claim:\x20if\x20store_from_id\x20is\x20Some,\x20extracts\x20store-from\x20address\x20from\x20Passport\x20submission'},{'object':'Payment','phase':'funds_replenish','relationship':'receive\x20(154):\x20unwraps\x20Coin<T>\x20from\x20CoinWrapper<T>\x20(with\x20check)\x20and\x20joins\x20the\x20balance'},{'object':'Payment','phase':'owner_receive','relationship':'owner\x20receipt\x20(156):\x20unwraps\x20CoinWrapper<K>\x20and\x20forwards\x20it\x20to\x20the\x20Permission\x20owner'},{'object':'Repository','phase':'claim','relationship':'Guard\x20may\x20query\x20Repository\x20(e.g.\x20order\x20history\x20for\x20first-order\x20/\x20loyalty\x20verification)'},{'object':'Service','phase':'claim','relationship':'Guard\x20may\x20verify\x20order.service\x20==\x20this\x20Service\x20(cashback\x20/\x20first-order\x20scenarios)'},{'object':'Demand','phase':'guard_addition','relationship':'Guard\x20may\x20be\x20shared\x20with\x20Demand\x20(recommendation\x20filtering);\x20same\x20Guard\x20object\x20address\x20space'},{'object':'Allocation','phase':'owner_receive','relationship':'Terminal\x20Allocation\x20alloc\x20may\x20route\x20funds\x20back\x20to\x20Reward\x20(replenishment\x20loop)'},{'object':'Contact','phase':'um_mgmt','relationship':'UM\x20binding\x20(157):\x20binds\x20Contact\x20(UM)\x20for\x20off-chain\x20coordination;\x20creates\x20object-linker\x20core\x20binding'},{'object':'Coin','phase':'universal','relationship':'Reward<phantom\x20T>:\x20T\x20is\x20the\x20coin\x20type;\x20balance:\x20Balance<T>;\x20coin_add\x20expects\x20Coin<T>'}];
1
+ import{MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD}from'./onchain-constants.js';export{MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD};export const REWARD_NEW={'index':0x96,'name':'REWARD_NEW','description':'Create\x20new\x20Reward<T>','governed_operations':['create\x20a\x20new\x20Reward\x20pool'],'sdk_exposed':!![]};export const REWARD_DESCRIPTION={'index':0x97,'name':'REWARD_DESCRIPTION','description':'Update\x20description','governed_operations':['update\x20the\x20Reward\x20description'],'sdk_exposed':!![]};export const REWARD_GUARD={'index':0x98,'name':'REWARD_GUARD','description':'Add\x20/\x20remove\x20expired\x20guards\x20(≤\x20MAX_GUARD_COUNT_REWARD=200)','governed_operations':['add\x20a\x20claim\x20guard\x20to\x20the\x20Reward','remove\x20expired\x20claim\x20guards'],'sdk_exposed':!![]};export const REWARD_COIN_ADD={'index':0x99,'name':'REWARD_COIN_ADD','description':'Deposit\x20Coin<T>\x20directly\x20into\x20Reward\x20balance\x20(joins\x20Balance<T>)','governed_operations':['deposit\x20Coin<T>\x20into\x20the\x20Reward\x20balance'],'sdk_exposed':!![]};export const REWARD_RECEIVE={'index':0x9a,'name':'REWARD_RECEIVE','description':'Receive\x20CoinWrapper<T>\x20into\x20the\x20balance\x20(unwrapped\x20with\x20balance\x20check)','governed_operations':['receive\x20a\x20CoinWrapper<T>\x20payment\x20into\x20the\x20balance'],'sdk_exposed':!![]};export const REWARD_GUARD_EXPIRATION_TIME_ADD={'index':0x9b,'name':'REWARD_GUARD_EXPIRATION_TIME_ADD','description':'Set\x20/\x20cancel\x20guard_not_added_expiration_time\x20(time-lock\x20on\x20new\x20guard\x20additions)','governed_operations':['set\x20or\x20cancel\x20the\x20time-lock\x20on\x20adding\x20new\x20guards'],'sdk_exposed':!![]};export const REWARD_OWNER_RECEIVE={'index':0x9c,'name':'REWARD_OWNER_RECEIVE','description':'Owner\x20receives\x20Receiving<K>\x20/\x20CoinWrapper<K>\x20at\x20terminal\x20state\x20(unwrap\x20→\x20owner)','governed_operations':['owner\x20receipt\x20of\x20payments\x20at\x20terminal\x20state\x20(unwrapped\x20to\x20the\x20owner)','owner\x20receipt\x20of\x20whole\x20objects\x20at\x20terminal\x20state'],'sdk_exposed':!![]};export const REWARD_UM={'index':0x9d,'name':'REWARD_UM','description':'Bind\x20/\x20unbind\x20Contact\x20(UM)\x20for\x20off-chain\x20coordination','governed_operations':['bind\x20a\x20Contact\x20as\x20the\x20UM\x20coordinator','unbind\x20the\x20UM\x20Contact'],'sdk_exposed':!![]};export const REWARD_PERMISSIONS=[REWARD_NEW,REWARD_DESCRIPTION,REWARD_GUARD,REWARD_COIN_ADD,REWARD_RECEIVE,REWARD_GUARD_EXPIRATION_TIME_ADD,REWARD_OWNER_RECEIVE,REWARD_UM];export const REWARD_FIELDS=[{'name':'id','move_type':'UID','mutability':'immutable','set_at_creation':!![],'constraint':'Object\x20UID;\x20assigned\x20at\x20creation.\x20Never\x20changes.'},{'name':'description','move_type':'String','mutability':'admin_mutable','set_at_creation':!![],'permission_index':0x97,'constraint':'Must\x20satisfy\x20common::DESCRIPTION.\x20Updated\x20via\x20permission\x20151.'},{'name':'guards','move_type':'vector<RewardGuard>','mutability':'admin_mutable','set_at_creation':!![],'permission_index':0x98,'constraint':'vector::length\x20<\x20MAX_GUARD_COUNT\x20(200);\x20E_GUARD_COUNT_EXCEEDED\x20on\x20overflow.','related_errors':['E_GUARD_COUNT_EXCEEDED']},{'name':'balance','move_type':'Balance<T>','mutability':'runtime','set_at_creation':!![],'constraint':'Zero\x20at\x20creation\x20(balance::zero());\x20grows\x20via\x20coin_add/receive;\x20shrinks\x20via\x20claim\x20(split)\x20and\x20never\x20via\x20direct\x20withdraw.','related_errors':['E_INSUFFICIENT_BALANCE']},{'name':'guard_not_added_expiration_time','move_type':'Option<u64>','mutability':'admin_mutable','set_at_creation':!![],'permission_index':0x9b,'constraint':'Option<timestamp_ms>.\x20When\x20Some(t):\x20guard_add\x20requires\x20clock\x20>\x20t\x20(E_GUARD_LOCKED_TIME).\x20When\x20None\x20or\x20t\x20<\x20now:\x20guards\x20can\x20be\x20added.','related_errors':['E_GUARD_LOCKED_TIME','E_GUARD_LOCKED_TIME_NOT_INCREASING','E_GUARD_LOCKED_TIME_INVALID']},{'name':'record','move_type':'ParentTable<address,\x20RecipientRecord>','mutability':'runtime','set_at_creation':!![],'constraint':'Per-recipient\x20claim\x20history.\x20Each\x20RecipientRecord.amount\x20vector\x20has\x20length\x20<\x20MAX_RECORD_COUNT\x20(5200);\x20E_RECORD_COUNT_EXCEEDED\x20on\x20overflow.','related_errors':['E_RECORD_COUNT_EXCEEDED']},{'name':'um','move_type':'Option<address>','mutability':'admin_mutable','set_at_creation':!![],'permission_index':0x9d,'constraint':'Option<Contact\x20address>.\x20Binding\x20creates\x20an\x20object-linker\x20core\x20binding;\x20unbinding\x20disaffiliates.'},{'name':'permission','move_type':'address','mutability':'admin_mutable','set_at_creation':!![],'constraint':'Permission\x20object\x20address.\x20Updated\x20owner-only\x20(asserts\x20old.owner\x20==\x20sender);\x20the\x20change\x20is\x20registered\x20as\x20an\x20object-linker\x20affiliation\x20change.'}];export const REWARD_GUARD_CONSTRUCTORS=[{'constructor':'dynamic_recipient_dynamic_amount','recipient_type':'GuardIdentifier','amount_type':'GuardU64Identifier','params':{'recipient_param':'u8','amount_param':'u8','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['recipient\x20identifier\x20must\x20resolve\x20to\x20an\x20address\x20in\x20the\x20Passport\x20table\x20—\x20E_RECIPIENT_IDENTIFIER_NOT_ADDRESS\x20(4)','amount\x20identifier\x20must\x20resolve\x20to\x20a\x20u64\x20Passport\x20value\x20—\x20E_AMOUNT_NOT_U64\x20(5)','if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Dynamic\x20recipient\x20+\x20dynamic\x20amount\x20—\x20both\x20extracted\x20from\x20Passport\x20at\x20claim\x20time\x20(e.g.\x20referral\x20rewards\x20where\x20referrer\x20and\x20amount\x20vary\x20per\x20claim).'},{'constructor':'dynamic_recipient_fixed_amount','recipient_type':'GuardIdentifier','amount_type':'Fixed','params':{'recipient_param':'u8','amount_param':'u64','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['recipient\x20identifier\x20must\x20resolve\x20to\x20an\x20address\x20in\x20the\x20Passport\x20table\x20—\x20E_RECIPIENT_IDENTIFIER_NOT_ADDRESS\x20(4)','if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Dynamic\x20recipient\x20+\x20fixed\x20amount\x20—\x20e.g.\x20first-order\x20reward\x20where\x20any\x20new\x20customer\x20claims\x20a\x20fixed\x201\x20WOW.'},{'constructor':'entity_recipient_dynamic_amount','recipient_type':'Entity','amount_type':'GuardU64Identifier','params':{'recipient_param':'address','amount_param':'u8','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['amount\x20identifier\x20must\x20resolve\x20to\x20a\x20u64\x20Passport\x20value\x20—\x20E_AMOUNT_NOT_U64\x20(5)','if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Fixed\x20recipient\x20+\x20dynamic\x20amount\x20—\x20e.g.\x20tiered\x20loyalty\x20reward\x20where\x20amount\x20depends\x20on\x20Passport\x20submission\x20(tier\x20level).'},{'constructor':'entity_recipient_fixed_amount','recipient_type':'Entity','amount_type':'Fixed','params':{'recipient_param':'address','amount_param':'u64','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Fully\x20fixed\x20recipient\x20+\x20amount\x20—\x20simplest\x20configuration\x20(e.g.\x20specific\x20partner\x20bounty).'},{'constructor':'caller_recipient_dynamic_amount','recipient_type':'Signer','amount_type':'GuardU64Identifier','params':{'amount_param':'u8','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['amount\x20identifier\x20must\x20resolve\x20to\x20a\x20u64\x20Passport\x20value\x20—\x20E_AMOUNT_NOT_U64\x20(5)','if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Caller\x20is\x20recipient\x20+\x20dynamic\x20amount\x20—\x20e.g.\x20self-service\x20claim\x20where\x20amount\x20depends\x20on\x20Passport\x20submission\x20(e.g.\x20cashback\x20rate).'},{'constructor':'caller_recipient_fixed_amount','recipient_type':'Signer','amount_type':'Fixed','params':{'amount_param':'u64','expiration_time':'Option<u64>','store_from_id':'Option<u8>'},'construction_checks':['if\x20store_from_id\x20is\x20Some:\x20its\x20identifier\x20must\x20be\x20number/address\x20compatible\x20—\x20E_STORE_FROM_ID_NOT_COMPATIBLE\x20(12)'],'typical_use':'Caller\x20is\x20recipient\x20+\x20fixed\x20amount\x20—\x20e.g.\x20flash\x20sale\x20where\x20any\x20eligible\x20caller\x20claims\x20a\x20fixed\x20reward.'}];export const REWARD_ERROR_CODES=[{'code':0x1,'name':'E_GUARD_LOCKED_TIME_NOT_INCREASING','description':'guard-lock\x20time\x20update:\x20new\x20time\x20<\x20current\x20clock\x20(must\x20be\x20≥\x20now)','trigger_operation':'guard-lock\x20time\x20update\x20(155)'},{'code':0x2,'name':'E_GUARD_EXPIRED','description':'guard_add\x20on\x20guard\x20with\x20expiration_time\x20<\x20now,\x20OR\x20claim\x20on\x20guard\x20with\x20expiration_time\x20<\x20now','trigger_operation':'guard_add\x20/\x20claim'},{'code':0x3,'name':'E_GUARD_COUNT_EXCEEDED','description':'guard_add\x20would\x20exceed\x20MAX_GUARD_COUNT=200\x20(only\x20on\x20NEW\x20guard,\x20not\x20on\x20update\x20of\x20existing)','trigger_operation':'guard_add'},{'code':0x4,'name':'E_RECIPIENT_IDENTIFIER_NOT_ADDRESS','description':'RewardGuard\x20constructor:\x20recipient\x20identifier\x20type\x20is\x20not\x20address\x20(GuardIdentifier\x20variant\x20only)','trigger_operation':'claim-guard\x20construction'},{'code':0x5,'name':'E_AMOUNT_NOT_U64','description':'RewardGuard\x20constructor:\x20amount\x20identifier\x20type\x20is\x20not\x20u64\x20(GuardU64Identifier\x20variant\x20only)','trigger_operation':'claim-guard\x20construction'},{'code':0x6,'name':'E_INSUFFICIENT_BALANCE','description':'claim:\x20balance\x20<\x20amount\x20(cannot\x20split\x20more\x20than\x20held)','trigger_operation':'claim'},{'code':0x7,'name':'E_GUARD_NOT_FOUND','description':'claim:\x20no\x20guard\x20in\x20self.guards\x20matches\x20the\x20supplied\x20guard\x20address','trigger_operation':'claim'},{'code':0x8,'name':'E_RECORD_COUNT_EXCEEDED','description':'claim:\x20recipient\x20already\x20has\x20MAX_RECORD_COUNT=5200\x20entries\x20(E_RECORD_COUNT_EXCEEDED)','trigger_operation':'claim'},{'code':0xa,'name':'E_GUARD_LOCKED_TIME','description':'guard_add\x20while\x20guard_not_added_expiration_time\x20is\x20Some\x20and\x20clock\x20≤\x20expiration_time','trigger_operation':'guard_add'},{'code':0xb,'name':'E_GUARD_LOCKED_TIME_INVALID','description':'guard-lock\x20time\x20update:\x20new\x20Some(t)\x20where\x20t\x20≤\x20now\x20(must\x20be\x20future)','trigger_operation':'guard-lock\x20time\x20update\x20(155)'},{'code':0xc,'name':'E_STORE_FROM_ID_NOT_COMPATIBLE','description':'RewardGuard\x20constructor:\x20store_from_id\x20identifier\x20type\x20is\x20not\x20number\x20or\x20address','trigger_operation':'claim-guard\x20construction'},{'code':0xd,'name':'E_CLAIM_ALREADY_MADE','description':'claim:\x20the\x20(recipient,\x20guard,\x20store_from\x20value)\x20once-slot\x20is\x20already\x20consumed\x20(MOV-PROTOCOL-1212\x20F-01\x20fix\x20—\x20replay\x20aborts,\x20the\x20pool\x20keeps\x20its\x20balance).\x20Empty\x20store_from\x20slot\x20=\x20once\x20per\x20(recipient,\x20guard);\x20a\x20store_from\x20value\x20pins\x20a\x20per-value\x20slot\x20(per-order\x20bounty)','trigger_operation':'claim'},{'code':0xe,'name':'E_CLAIM_RECIPIENT_NOT_SIGNER','description':'claim:\x20the\x20resolved\x20recipient\x20(from\x20guard\x20submissions\x20or\x20the\x20Entity\x20binding)\x20is\x20not\x20the\x20transaction\x20sender\x20(MOV-PROTOCOL-1212\x20B5\x20fix\x20—\x20an\x20attacker\x20cannot\x20route\x20a\x20reward\x20to\x20a\x20third\x20address).\x20Entity\x20flows\x20pass\x20because\x20the\x20SDK\x20replaces\x20the\x20sender\x20with\x20the\x20entity\x20account','trigger_operation':'claim'}];export const REWARD_SCENES=[{'id':'reward_first_order','name':'First-order\x20reward','industry':['universal','ecommerce','service','freelance'],'scenario':'New\x20customers\x20receive\x20a\x20fixed\x20reward\x20after\x20their\x20first\x20order.\x20Guard\x20verifies\x20order\x20ownership\x20+\x20first-time\x20status;\x20'+'Recipient=Signer\x20(caller\x20is\x20the\x20new\x20customer);\x20Amount=Fixed\x20(e.g.\x201\x20WOW).','phases':['creation','guard_addition','funds_replenish','claim'],'coin_type_note':'T\x20=\x20project\x20reward\x20coin\x20(e.g.\x200x2::wow::WOW\x20or\x20a\x20custom\x20token)','typical_guard_count':0x1,'recipient_types_used':['Signer'],'amount_types_used':['Fixed'],'uses_expiration_time':!![],'uses_store_from_id':![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD],'common_patterns':['Signer\x20recipient\x20+\x20Fixed\x20amount\x20—\x20caller\x20claims\x20a\x20fixed\x20amount\x20(e.g.\x201\x20WOW)','Guard\x20verifies:\x20order_address.holder\x20==\x20signer\x20AND\x20order\x20is\x20the\x20first\x20order\x20(Repository\x20query)','expiration_time\x20bounds\x20the\x20campaign\x20window\x20(e.g.\x2030\x20days)','coin_add\x20deposits\x20the\x20campaign\x20budget\x20upfront\x20(e.g.\x20100\x20WOW\x20for\x20100\x20claims)'],'recommended_templates':['first_order']},{'id':'reward_referral','name':'Referral\x20viral\x20reward','industry':['universal','ecommerce','service','content'],'scenario':'Both\x20referrer\x20and\x20referee\x20receive\x20a\x20reward\x20when\x20the\x20referee\x20completes\x20a\x20first\x20order.\x20Two\x20guards:\x20one\x20for\x20referrer\x20(Entity),\x20one\x20for\x20referee\x20(Signer).','phases':['creation','guard_addition','funds_replenish','claim'],'coin_type_note':'T\x20=\x20project\x20reward\x20coin','typical_guard_count':0x2,'recipient_types_used':['Entity','Signer'],'amount_types_used':['Fixed'],'uses_expiration_time':!![],'uses_store_from_id':!![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD],'common_patterns':['Entity\x20recipient\x20+\x20Fixed\x20amount\x20for\x20the\x20referrer\x20(recipient\x20=\x20referrer\x20address)','Signer\x20recipient\x20+\x20Fixed\x20amount\x20for\x20the\x20referee\x20(caller\x20is\x20recipient)','Guard\x20verifies:\x20referrer\x20marked\x20in\x20Repository\x20AND\x20referee\x27s\x20order\x20completed','store_from_id\x20may\x20record\x20the\x20order\x20address\x20for\x20audit\x20trail'],'recommended_templates':['referral']},{'id':'reward_loyalty','name':'Loyalty\x20tiered\x20reward','industry':['universal','ecommerce','subscription','content'],'scenario':'Customers\x20unlock\x20higher\x20rewards\x20after\x20reaching\x20cumulative\x20spending\x20tiers.\x20Recipient=Signer;\x20Amount=GuardU64Identifier\x20(tier-dependent\x20amount\x20extracted\x20from\x20Passport).','phases':['creation','guard_addition','funds_replenish','claim'],'coin_type_note':'T\x20=\x20project\x20reward\x20coin','typical_guard_count':0x1,'recipient_types_used':['Signer'],'amount_types_used':['GuardU64Identifier'],'uses_expiration_time':![],'uses_store_from_id':![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD],'common_patterns':['Signer\x20recipient\x20+\x20identifier\x20amount\x20—\x20amount\x20is\x20dynamic,\x20extracted\x20from\x20Passport\x20submission\x20(tier\x20level\x20→\x20reward\x20amount)','Guard\x20verifies:\x20cumulative\x20spend\x20≥\x20tier\x20threshold\x20(Repository\x20query)','No\x20expiration_time\x20—\x20loyalty\x20is\x20perpetual\x20(until\x20deactivated\x20via\x20guard_remove_expired)','Guard\x20submission\x20value\x20type\x20MUST\x20be\x20u64\x20(E_AMOUNT_NOT_U64\x20otherwise)'],'recommended_templates':['loyalty']},{'id':'reward_flash_sale','name':'Limited-time\x20flash\x20sale\x20reward','industry':['universal','ecommerce','retail'],'scenario':'Time-bounded\x20reward\x20for\x20the\x20first\x20N\x20callers.\x20Recipient=Signer;\x20Amount=Fixed.\x20Guard\x20verifies\x20time\x20window\x20+\x20claim\x20count.','phases':['creation','guard_addition','funds_replenish','claim','guard_lock_mgmt'],'coin_type_note':'T\x20=\x20project\x20reward\x20coin','typical_guard_count':0x1,'recipient_types_used':['Signer'],'amount_types_used':['Fixed'],'uses_expiration_time':!![],'uses_store_from_id':![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD,REWARD_GUARD_EXPIRATION_TIME_ADD],'common_patterns':['Signer\x20recipient\x20+\x20Fixed\x20amount\x20—\x20fixed\x20amount\x20per\x20claim\x20(e.g.\x202\x20WOW)','expiration_time\x20bounds\x20the\x20flash\x20sale\x20window\x20(e.g.\x2048\x20hours)','the\x20guard-addition\x20time-lock\x20(155)\x20may\x20lock\x20further\x20guard\x20additions\x20during\x20the\x20sale','Budget\x20=\x20max_claims\x20×\x20amount;\x20coin_add\x20deposits\x20this\x20upfront'],'recommended_templates':['flash_sale']},{'id':'reward_bulk_discount','name':'Bulk\x20discount\x20/\x20cashback\x20reward','industry':['universal','ecommerce','wholesale','service'],'scenario':'Customer\x20receives\x20cashback\x20proportional\x20to\x20order\x20size.\x20Recipient=Signer\x20or\x20Entity\x20(order\x20holder);\x20Amount=GuardU64Identifier\x20(cashback\x20rate\x20from\x20Passport).','phases':['creation','guard_addition','funds_replenish','claim'],'coin_type_note':'T\x20=\x20payment\x20coin\x20type\x20(must\x20match\x20order\x20payment\x20for\x20clean\x20cashback)','typical_guard_count':0x1,'recipient_types_used':['Signer','Entity'],'amount_types_used':['GuardU64Identifier'],'uses_expiration_time':![],'uses_store_from_id':!![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD,REWARD_RECEIVE],'common_patterns':['Signer\x20recipient\x20+\x20identifier\x20amount\x20—\x20caller\x20claims\x20dynamic\x20amount\x20(cashback\x20=\x20order_amount\x20×\x20rate)','store_from_id\x20records\x20the\x20order\x20address\x20for\x20cross-reference\x20(audit\x20trail)','receive\x20(154)\x20may\x20be\x20used\x20to\x20accept\x20CoinWrapper<T>\x20refunds\x20that\x20replenish\x20the\x20balance','Guard\x20verifies:\x20order.completed\x20AND\x20order.service\x20==\x20this\x20Service'],'recommended_templates':['cashback']},{'id':'reward_milestone','name':'Service\x20milestone\x20reward','industry':['universal','ecommerce','content','subscription'],'scenario':'When\x20a\x20Service\x20reaches\x20a\x20milestone\x20(e.g.\x20100\x20orders),\x20early\x20supporters\x20receive\x20extra\x20rewards.\x20Recipient=Entity\x20(early\x20customer);\x20Amount=Fixed.','phases':['creation','guard_addition','funds_replenish','claim','guard_lock_mgmt'],'coin_type_note':'T\x20=\x20project\x20reward\x20coin','typical_guard_count':0x32,'recipient_types_used':['Entity'],'amount_types_used':['Fixed'],'uses_expiration_time':!![],'uses_store_from_id':![],'builtin_indexes_consumed':[REWARD_NEW,REWARD_GUARD,REWARD_COIN_ADD,REWARD_GUARD_EXPIRATION_TIME_ADD],'common_patterns':['Entity\x20recipient\x20+\x20Fixed\x20amount\x20for\x20each\x20early\x20customer\x20(recipient\x20=\x20customer\x20address)','Multiple\x20guards\x20(up\x20to\x2050\x20for\x2050\x20early\x20supporters)\x20—\x20well\x20within\x20MAX_GUARD_COUNT=200','Guard\x20verifies:\x20Service\x20order_count\x20>=\x20milestone\x20AND\x20claimer\x20is\x20in\x20early-customer\x20list','the\x20guard-addition\x20time-lock\x20(155)\x20may\x20lock\x20the\x20guard\x20list\x20after\x20milestone\x20setup'],'recommended_templates':['milestone']}];export const REWARD_LEDGER_VERSION='1.0.0';export function getScenesByPhase(a){return REWARD_SCENES['filter'](b=>b['phases']['includes'](a));}export function findSceneById(a){return REWARD_SCENES['find'](b=>b['id']===a);}export function getScenesByIndustry(a){return REWARD_SCENES['filter'](b=>b['industry']['includes'](a)||b['industry']['includes']('universal'));}export function getBuiltinPermissionByIndex(a){return REWARD_PERMISSIONS['find'](b=>b['index']===a);}export function isRewardBuiltinPermission(a){return getBuiltinPermissionByIndex(a)!==undefined;}export function getAllBuiltinPermissions(){return[...REWARD_PERMISSIONS];}export function getRewardScenesCount(){return REWARD_SCENES['length'];}export function getGuardConstructorSpec(a){return REWARD_GUARD_CONSTRUCTORS['find'](b=>b['constructor']===a);}export function resolveGuardConstructor(a,b){const c={'GuardIdentifier|GuardU64Identifier':'dynamic_recipient_dynamic_amount','GuardIdentifier|Fixed':'dynamic_recipient_fixed_amount','Entity|GuardU64Identifier':'entity_recipient_dynamic_amount','Entity|Fixed':'entity_recipient_fixed_amount','Signer|GuardU64Identifier':'caller_recipient_dynamic_amount','Signer|Fixed':'caller_recipient_fixed_amount'};return c[a+'|'+b];}export function getRewardErrorByCode(a){return REWARD_ERROR_CODES['find'](b=>b['code']===a);}export function getRewardErrorByName(a){return REWARD_ERROR_CODES['find'](b=>b['name']===a);}export function validateGuardCount(a){if(a>=MAX_GUARD_COUNT_REWARD)return{'ok':![],'violation':'Guard\x20count\x20'+a+'\x20would\x20exceed\x20MAX_GUARD_COUNT_REWARD\x20'+MAX_GUARD_COUNT_REWARD};return{'ok':!![]};}export function validateRecordCount(a){if(a>=MAX_RECORD_COUNT_REWARD)return{'ok':![],'violation':'Record\x20count\x20'+a+'\x20would\x20exceed\x20MAX_RECORD_COUNT_REWARD\x20'+MAX_RECORD_COUNT_REWARD+'\x20—\x20recipient\x20can\x20no\x20longer\x20claim'};return{'ok':!![]};}export function inferSceneFromIntent(a){const b=a['toLowerCase'](),c=[['flash\x20sale','reward_flash_sale'],['flash_sale','reward_flash_sale'],['limited-time','reward_flash_sale'],['limited\x20time','reward_flash_sale'],['referral','reward_referral'],['viral','reward_referral'],['refer\x20a\x20friend','reward_referral'],['invite','reward_referral'],['loyalty','reward_loyalty'],['tiered','reward_loyalty'],['tier','reward_loyalty'],['repeat','reward_loyalty'],['cashback','reward_bulk_discount'],['bulk\x20discount','reward_bulk_discount'],['bulk_discount','reward_bulk_discount'],['wholesale','reward_bulk_discount'],['milestone','reward_milestone'],['early\x20supporter','reward_milestone'],['early\x20customer','reward_milestone'],['first\x20order','reward_first_order'],['first_order','reward_first_order'],['new\x20customer','reward_first_order'],['first-time','reward_first_order']];for(const [d,e]of c){if(b['includes'](d)){const f=findSceneById(e);if(f)return f;}}return undefined;}export const REWARD_CROSS_OBJECT_REFS=[{'object':'Permission','phase':'universal','relationship':'Reward.permission\x20(address;\x20borrowed\x20for\x20all\x20150-157\x20assertions)'},{'object':'Permission','phase':'permission_update','relationship':'permission\x20update:\x20owner-only\x20(asserts\x20old.owner\x20==\x20sender);\x20registered\x20as\x20an\x20object-linker\x20affiliation\x20change'},{'object':'Guard','phase':'guard_addition','relationship':'RewardGuard.guard\x20=\x20guard.id_address\x20(each\x20guard\x20registered\x20via\x20object-linker\x20core\x20binding)'},{'object':'Guard','phase':'claim','relationship':'claim:\x20iterates\x20self.guards\x20looking\x20for\x20guard.id_address\x20match;\x20E_GUARD_NOT_FOUND\x20if\x20no\x20match'},{'object':'Guard','phase':'claim','relationship':'claim:\x20the\x20guard\x20verification\x20result\x20validates\x20the\x20Passport\x20submission\x20data'},{'object':'Passport','phase':'claim','relationship':'claim:\x20the\x20claimant\x27s\x20Passport\x20submission\x20supplies\x20the\x20recipient\x20(address)\x20and/or\x20amount\x20(u64)\x20per\x20RewardGuard\x20variant'},{'object':'Passport','phase':'claim','relationship':'claim:\x20if\x20store_from_id\x20is\x20Some,\x20extracts\x20store-from\x20address\x20from\x20Passport\x20submission'},{'object':'Payment','phase':'funds_replenish','relationship':'receive\x20(154):\x20unwraps\x20Coin<T>\x20from\x20CoinWrapper<T>\x20(with\x20check)\x20and\x20joins\x20the\x20balance'},{'object':'Payment','phase':'owner_receive','relationship':'owner\x20receipt\x20(156):\x20unwraps\x20CoinWrapper<K>\x20and\x20forwards\x20it\x20to\x20the\x20Permission\x20owner'},{'object':'Repository','phase':'claim','relationship':'Guard\x20may\x20query\x20Repository\x20(e.g.\x20order\x20history\x20for\x20first-order\x20/\x20loyalty\x20verification)'},{'object':'Service','phase':'claim','relationship':'Guard\x20may\x20verify\x20order.service\x20==\x20this\x20Service\x20(cashback\x20/\x20first-order\x20scenarios)'},{'object':'Demand','phase':'guard_addition','relationship':'Guard\x20may\x20be\x20shared\x20with\x20Demand\x20(recommendation\x20filtering);\x20same\x20Guard\x20object\x20address\x20space'},{'object':'Allocation','phase':'owner_receive','relationship':'Terminal\x20Allocation\x20alloc\x20may\x20route\x20funds\x20back\x20to\x20Reward\x20(replenishment\x20loop)'},{'object':'Contact','phase':'um_mgmt','relationship':'UM\x20binding\x20(157):\x20binds\x20Contact\x20(UM)\x20for\x20off-chain\x20coordination;\x20creates\x20object-linker\x20core\x20binding'},{'object':'Coin','phase':'universal','relationship':'Reward<phantom\x20T>:\x20T\x20is\x20the\x20coin\x20type;\x20balance:\x20Balance<T>;\x20coin_add\x20expects\x20Coin<T>'}];