@wowok/agent-mcp 3.2.2 → 3.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/chain-semantics/field-capability.d.ts +11 -0
  2. package/dist/chain-semantics/field-capability.js +1 -0
  3. package/dist/chain-semantics/freeze-map.d.ts +11 -0
  4. package/dist/chain-semantics/freeze-map.js +1 -0
  5. package/dist/chain-semantics/fund-flow.d.ts +10 -0
  6. package/dist/chain-semantics/fund-flow.js +1 -0
  7. package/dist/chain-semantics/guard-verbs.d.ts +22 -0
  8. package/dist/chain-semantics/guard-verbs.js +1 -0
  9. package/dist/chain-semantics/index.d.ts +10 -0
  10. package/dist/chain-semantics/index.js +1 -0
  11. package/dist/chain-semantics/object-graph.d.ts +18 -0
  12. package/dist/chain-semantics/object-graph.js +1 -0
  13. package/dist/composition/audit.d.ts +10 -0
  14. package/dist/composition/audit.js +1 -0
  15. package/dist/composition/compile.d.ts +38 -0
  16. package/dist/composition/compile.js +1 -0
  17. package/dist/composition/materialize.d.ts +64 -0
  18. package/dist/composition/materialize.js +1 -0
  19. package/dist/composition/plan.d.ts +92 -0
  20. package/dist/composition/plan.js +1 -0
  21. package/dist/composition/reflux.d.ts +28 -0
  22. package/dist/composition/reflux.js +1 -0
  23. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  24. package/dist/evaluation/engine.js +1 -1
  25. package/dist/experience/realtime-feedback.js +1 -1
  26. package/dist/extensions/business-modules.js +1 -1
  27. package/dist/extensions/industry-pack.js +1 -1
  28. package/dist/extensions/modes.js +1 -1
  29. package/dist/graph/onchain/expand.js +1 -1
  30. package/dist/graph/onchain/exposure.js +1 -1
  31. package/dist/graph/onchain/facts.js +1 -1
  32. package/dist/keeper/detectors.d.ts +7 -0
  33. package/dist/keeper/detectors.js +1 -1
  34. package/dist/keeper/types.d.ts +1 -1
  35. package/dist/keeper/types.js +1 -1
  36. package/dist/knowledge/allocation-ledger.js +1 -1
  37. package/dist/knowledge/allocation-puzzle.js +1 -1
  38. package/dist/knowledge/allocation-risk.js +1 -1
  39. package/dist/knowledge/allocation-templates.js +1 -1
  40. package/dist/knowledge/arb-fund-facts.d.ts +31 -0
  41. package/dist/knowledge/arb-fund-facts.js +1 -0
  42. package/dist/knowledge/baselines/rules/allocation.json +44 -15
  43. package/dist/knowledge/baselines/rules/guard.json +27 -8
  44. package/dist/knowledge/baselines/rules/plan.json +161 -0
  45. package/dist/knowledge/baselines/semantic-facts.d.ts +12 -0
  46. package/dist/knowledge/baselines/semantic-facts.js +1 -0
  47. package/dist/knowledge/builtin-templates.d.ts +1 -1
  48. package/dist/knowledge/builtin-templates.js +1 -1
  49. package/dist/knowledge/getting-started.js +1 -1
  50. package/dist/knowledge/guard-design-patterns.js +1 -1
  51. package/dist/knowledge/guard-ledger.js +1 -1
  52. package/dist/knowledge/guard-risk.js +1 -1
  53. package/dist/knowledge/guard-templates.js +1 -1
  54. package/dist/knowledge/index.js +1 -1
  55. package/dist/knowledge/industry-registry.js +1 -1
  56. package/dist/knowledge/jsonrpc-enum.js +1 -1
  57. package/dist/knowledge/onchain-constants.d.ts +2 -2
  58. package/dist/knowledge/onchain-constants.js +1 -1
  59. package/dist/knowledge/scenario-modes.d.ts +12 -0
  60. package/dist/knowledge/service-allocation-semantics.js +1 -1
  61. package/dist/knowledge/service-ledger.js +1 -1
  62. package/dist/knowledge/service-templates.js +1 -1
  63. package/dist/knowledge/strategy-manuals.js +1 -1
  64. package/dist/knowledge/template-loader.d.ts +16 -1
  65. package/dist/knowledge/template-loader.js +1 -1
  66. package/dist/knowledge/template-registry.js +1 -1
  67. package/dist/knowledge/template-scanner.js +1 -1
  68. package/dist/knowledge/tools-reference.js +1 -1
  69. package/dist/knowledge/workflow-guidance.js +1 -1
  70. package/dist/monitor/MonitorLoop.js +1 -1
  71. package/dist/participation/radar-core.d.ts +6 -0
  72. package/dist/participation/radar-core.js +1 -1
  73. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  74. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  75. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  76. package/dist/playbooks/service-build/migration-planner.js +1 -1
  77. package/dist/playbooks/service-build/object-panorama.js +1 -1
  78. package/dist/playbooks/service-build/participation-radar.js +1 -1
  79. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  80. package/dist/playbooks/service-build/service-panorama.js +1 -1
  81. package/dist/playbooks/service-build/service-quote.js +1 -1
  82. package/dist/review/index.js +1 -1
  83. package/dist/safety/confirm-gate.js +1 -1
  84. package/dist/schema/call/order.d.ts +60 -0
  85. package/dist/schema/call/order.js +1 -1
  86. package/dist/schema/call/semantic.js +1 -1
  87. package/dist/schema/call/service.d.ts +56 -0
  88. package/dist/schema/call/service.js +1 -1
  89. package/dist/schema/common/index.js +1 -1
  90. package/dist/schema/index.d.ts +1 -0
  91. package/dist/schema/index.js +1 -1
  92. package/dist/schema/industry-pack/index.d.ts +2 -0
  93. package/dist/schema/industry-pack/index.js +1 -1
  94. package/dist/schema/local/index.js +1 -1
  95. package/dist/schema/operations.d.ts +48 -0
  96. package/dist/schema/query/index.js +1 -1
  97. package/dist/schema/schema-version.js +1 -1
  98. package/dist/schema/service-clone/index.d.ts +46 -0
  99. package/dist/schema/service-clone/index.js +1 -0
  100. package/dist/schema-query-impl/index.js +1 -1
  101. package/dist/schemas/index.json +7 -1
  102. package/dist/schemas/industry_pack_operation.output.json +4 -0
  103. package/dist/schemas/industry_pack_operation.schema.json +4 -0
  104. package/dist/schemas/onchain_operations.output.json +1 -1
  105. package/dist/schemas/onchain_operations.schema.json +405 -94
  106. package/dist/schemas/onchain_operations_allocation.schema.json +5 -5
  107. package/dist/schemas/onchain_operations_arbitration.schema.json +2 -2
  108. package/dist/schemas/onchain_operations_contact.schema.json +1 -1
  109. package/dist/schemas/onchain_operations_demand.schema.json +3 -3
  110. package/dist/schemas/onchain_operations_gen_passport.schema.json +1 -1
  111. package/dist/schemas/onchain_operations_guard.schema.json +59 -59
  112. package/dist/schemas/onchain_operations_machine.schema.json +1 -1
  113. package/dist/schemas/onchain_operations_order.schema.json +133 -1
  114. package/dist/schemas/onchain_operations_progress.schema.json +1 -1
  115. package/dist/schemas/onchain_operations_proof.schema.json +1 -1
  116. package/dist/schemas/onchain_operations_repository.schema.json +1 -1
  117. package/dist/schemas/onchain_operations_reward.schema.json +4 -4
  118. package/dist/schemas/onchain_operations_service.schema.json +186 -7
  119. package/dist/schemas/onchain_operations_treasury.schema.json +7 -7
  120. package/dist/schemas/query_toolkit.output.json +45 -45
  121. package/dist/schemas/service_clone_operation.output.json +168 -0
  122. package/dist/schemas/service_clone_operation.schema.json +49 -0
  123. package/dist/schemas/workflow_operation.schema.json +1 -1
  124. package/dist/tools/handlers/config.js +1 -1
  125. package/dist/tools/handlers/industry-pack.js +1 -1
  126. package/dist/tools/handlers/onchain.js +1 -1
  127. package/dist/tools/handlers/query.js +1 -1
  128. package/dist/tools/handlers/service-clone.d.ts +2 -0
  129. package/dist/tools/handlers/service-clone.js +1 -0
  130. package/dist/tools/index.js +1 -1
  131. package/dist/tools/registry/business.js +1 -1
  132. package/dist/tools/wrap.d.ts +6 -1
  133. package/dist/tools/wrap.js +1 -1
  134. 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{buildReviewRepositorySetup,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 a182a,getScenesByIndustry as a182b,getScenesByPattern,inferSceneFromFlow}from'./machine-ledger.js';import{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,getAllTemplates as a182c,getTemplateById as a182d,getTemplatesByScene as a182e,getTemplatesByIndustry as a182f,suggestTemplateForIntent,walkDecisionTree,fillTemplate as a182g,forkTemplate as a182h,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 a182i,identifyExecutionMode,identifyTopology,explainForwardPermission,getConstraintsByCategory as a182j,getConstraintById,getOnChainConstraints as a182k,getOffChainConstraints as a182l}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 a182m,initPuzzleFromTemplate,checkPuzzleCompleteness as a182n,recommendNextStep as a182o,derivePuzzleFromMachineJson,generateConfirmationText as a182p,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 a182q,findSceneById as a182r,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,inferSceneFromIntent as a182s,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,getCrossObjectBindings as a182t}from'./service-ledger.js';import{initPuzzleFromIntent as a182u,checkPuzzleCompleteness as a182v,validateConstraints as a182w,generateConfirmationText as a182x,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 a182y,getScenesByMode as a182z,getScenesByStrategy as a182A,findSceneById as a182B,inferSceneFromIntent as a182C,getAllScenes as a182D,getScenesCount as a182E,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,getErrorName as a182F,getErrorDescription as a182G}from'./allocation-ledger.js';import{initPuzzleFromIntent as a182H,checkPuzzleCompleteness as a182I,validateConstraints as a182J,generateConfirmationText as a182K,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION}from'./allocation-puzzle.js';import{ALLOCATION_RISK_VERSION,assessAllocationRisks,getAllRiskRules as a182L}from'./allocation-risk.js';import{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,getAllTemplates as a182M,getTemplateById as a182N,getTemplatesByScene as a182O,getTemplatesByIndustry as a182P,suggestTemplateForScene as a182Q,listTemplates as a182R,fillTemplate as a182S}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 a182T,getScenesByHostObject as a182U,findSceneById as a182V,findSceneByPermissionIndex as a182W,getBuiltinPermissionByIndex as a182X,isBuiltinTreasuryPermission,getActiveBuiltinPermissions as a182Y,getReservedBuiltinPermissions as a182Z,inferSceneFromIntent as a182a0,getTreasuryScenesCount,getGovernedOperationsForPermissionIndex as a182a1}from'./treasury-ledger.js';import{initPuzzleFromIntent as a182a2,checkPuzzleCompleteness as a182a3,validateConstraints as a182a4,generateConfirmationText as a182a5,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,MAX_DESCRIPTION_LENGTH as a182a6}from'./treasury-puzzle.js';import{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,getTemplateById as a182a7,getTemplatesByScene as a182a8,getTemplatesByIndustry as a182a9,suggestTemplateForScene as a182aa,listTemplates as a182ab,fillTemplate as a182ac}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 a182ad,findSceneById as a182ae,findSceneByMoveEntry as a182af,getScenesByPermissionLayer as a182ag,getScenesByReversibility as a182ah,getFieldDef as a182ai,getMutableFields as a182aj,getImmutableFields as a182ak,getFrozenAfterProgressFields as a182al,getOneTimeSetFields as a182am,inferSceneFromIntent as a182an,getEmittedEvents as a182ao,getInferredEvents as a182ap,getOrderScenesCount,sdkToMoveField as a182aq,moveToSdkField as a182ar}from'./order-ledger.js';import{initPuzzleFromIntent as a182as,checkPuzzleCompleteness as a182at,validateConstraints as a182au,generateConfirmationText as a182av,verifySnapshotMechanism as a182aw,inferLifecyclePhase as a182ax,matchSceneFromPuzzle as a182ay,listAllScenes as a182az,lookupScene as a182aA}from'./order-puzzle.js';import{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,getTemplateById as a182aB,getTemplatesByScene as a182aC,getTemplatesByIndustry as a182aD,getTemplatesByPermissionLayer as a182aE,getIrreversibleTemplates as a182aF,suggestTemplateForScene as a182aG,listOrderTemplates,fillTemplate as a182aH,suggestTemplateFromIntent as a182aI,getTemplateParameters as a182aJ,validateTemplateParams as a182aK}from'./order-templates.js';import{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules}from'./order-risk.js';import{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,PROGRESS_PERMISSIONS as a182aL,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,getScenesByPhase as a182aM,findSceneById as a182aN,getScenesByIndustry as a182aO,getBuiltinPermissionByIndex as a182aP,isProgressBuiltinPermission,inferSceneFromIntent as a182aQ,getAllBuiltinPermissions as a182aR,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount}from'./progress-ledger.js';import{initPuzzleFromIntent as a182aS,checkPuzzleCompleteness as a182aT,validateConstraints as a182aU,generateConfirmationText as a182aV,resolveBuiltinPermission as a182aW,isOrderHolderForward,getRelevantDimensions as a182aX}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 a182aY,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,getScenesByCategory as a182aZ,findSceneById as a182b0,findSceneByPermissionIndex as a182b1,getPermissionByIndex as a182b2,getPermissionByName as a182b3,isReservedIndex as a182b4,isUsedPermissionIndex as a182b5,getActivePermissionCount as a182b6,inferSceneFromIntent as a182b7,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,getScenesProducingStatus as a182b8,getScenesRequiringStatus as a182b9,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions}from'./arbitration-ledger.js';import{initPuzzleFromIntent as a182ba,checkPuzzleCompleteness as a182bb,validateConstraints as a182bc,generateConfirmationText as a182bd}from'./arbitration-puzzle.js';import{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,getAllTemplates as a182be,getTemplateById as a182bf,getTemplatesByScene as a182bg,getTemplatesByIndustry as a182bh,suggestTemplateForScene as a182bi,listTemplates as a182bj,fillTemplate as a182bk}from'./arbitration-templates.js';import{ARBITRATION_RISK_VERSION,assessArbitrationRisks,getAllRiskRules as a182bl}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 a182bm,findSceneById as a182bn,getScenesByIndustry as a182bo,getBuiltinPermissionByIndex as a182bp,isRewardBuiltinPermission,getAllBuiltinPermissions as a182bq,getRewardScenesCount,getGuardConstructorSpec as a182br,resolveGuardConstructor as a182bs,getRewardErrorByCode,getRewardErrorByName,validateGuardCount as a182bt,validateRecordCount as a182bu,inferSceneFromIntent as a182bv}from'./reward-ledger.js';import{REWARD_FIELD_MUTABILITY,initPuzzleFromIntent as a182bw,checkPuzzleCompleteness as a182bx,validateConstraints as a182by,generateConfirmationText as a182bz,resolveBuiltinPermission as a182bA,requiresGuardConfig as a182bB,requiresPassport as a182bC,getRelevantDimensions as a182bD,getFieldMutability as a182bE,isAdminMutableField as a182bF,getFieldPermissionIndex as a182bG}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 a182bH,getScenariosCount as a182bI,findScenarioById as a182bJ,getScenariosByConsumer as a182bK,getScenariosUsingRelies as a182bL,inferScenarioFromIntent as a182bM,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,getErrorName as a182bN,getErrorDescription as a182bO}from'./passport-ledger.js';import{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,getAllTemplates as a182bP,getTemplateById as a182bQ,getTemplatesByScenario as a182bR,getTemplatesByIndustry as a182bS,suggestTemplateForScenario as a182bT,listTemplates as a182bU,fillTemplate as a182bV}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 a182bW,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{buildReviewRepositorySetup,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,a182a as findMachineScene,a182b as getMachineScenesByIndustry,getScenesByPattern,inferSceneFromFlow};export{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,a182c as getAllMachineTemplates,a182d as getMachineTemplateById,a182e as getMachineTemplatesByScene,a182f as getMachineTemplatesByIndustry,suggestTemplateForIntent,walkDecisionTree,a182g as fillMachineTemplate,a182h as forkMachineTemplate,verifyTemplateSceneReferences,getReferencedGuardTemplateIds,getReferencedRiskIds};export{SEMANTIC_TO_MACHINE_RULES,MACHINE_CONSTRAINT_RULES,MACHINE_TRANSLATION_VERSION,MACHINE_PATTERNS_COUNT,MACHINE_CONSTRAINTS_COUNT,a182i as matchMachinePattern,identifyExecutionMode,identifyTopology,explainForwardPermission,a182j as getMachineConstraintsByCategory,getConstraintById,a182k as getOnChainMachineConstraints,a182l 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{a182m as initMachinePuzzleFromIntent,initPuzzleFromTemplate,a182n as checkMachinePuzzleCompleteness,a182o as recommendMachineNextStep,derivePuzzleFromMachineJson,a182p as generateMachineConfirmationText,MACHINE_PUZZLE_VERSION};export{SERVICE_SCENES,SERVICE_LEDGER_VERSION,SERVICE_PERMISSIONS,SERVICE_ORDER_FLOW_STAGES,SERVICE_CROSS_OBJECT_BINDINGS,a182q as getServiceScenesByCategory,a182r as findServiceSceneById,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,a182s as inferServiceSceneFromIntent,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,a182t as getServiceCrossObjectBindings};export{a182u as initServicePuzzleFromIntent,a182v as checkServicePuzzleCompleteness,a182w as validateServiceConstraints,a182x 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,a182y as getAllocationScenesByTriggerSource,a182z as getAllocationScenesByMode,a182A as getAllocationScenesByStrategy,a182B as findAllocationSceneById,a182C as inferAllocationSceneFromIntent,a182D as getAllAllocationScenes,a182E as getAllocationScenesCount,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,a182F as getAllocationErrorName,a182G as getAllocationErrorDescription};export{a182H as initAllocationPuzzleFromIntent,a182I as checkAllocationPuzzleCompleteness,a182J as validateAllocationConstraints,a182K as generateAllocationPuzzleConfirmationText,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION};export{ALLOCATION_RISK_VERSION,assessAllocationRisks,a182L as getAllAllocationRiskRules};export{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,a182M as getAllAllocationTemplates,a182N as getAllocationTemplateById,a182O as getAllocationTemplatesByScene,a182P as getAllocationTemplatesByIndustry,a182Q as suggestAllocationTemplateForScene,a182R as listAllocationTemplates,a182S 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,a182T as TREASURY_BUILTIN_PERMISSIONS,a182U as getTreasuryScenesByHostObject,a182V as findTreasurySceneById,a182W as findTreasurySceneByPermissionIndex,a182X as getTreasuryBuiltinPermissionByIndex,isBuiltinTreasuryPermission,a182Y as getActiveTreasuryBuiltinPermissions,a182Z as getReservedTreasuryBuiltinPermissions,a182a0 as inferTreasurySceneFromIntent,getTreasuryScenesCount,a182a1 as getTreasuryGovernedOperationsForPermissionIndex};export{a182a2 as initTreasuryPuzzleFromIntent,a182a3 as checkTreasuryPuzzleCompleteness,a182a4 as validateTreasuryConstraints,a182a5 as generateTreasuryPuzzleConfirmationText,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,a182a6 as TREASURY_MAX_DESCRIPTION_LENGTH};export{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,a182a7 as getTreasuryTemplateById,a182a8 as getTreasuryTemplatesByScene,a182a9 as getTreasuryTemplatesByIndustry,a182aa as suggestTreasuryTemplateForScene,a182ab as listTreasuryTemplates,a182ac 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,a182ad as getOrderScenesByOperationField,a182ae as findOrderSceneById,a182af as findOrderSceneByMoveEntry,a182ag as getOrderScenesByPermissionLayer,a182ah as getOrderScenesByReversibility,a182ai as getOrderFieldDef,a182aj as getOrderMutableFields,a182ak as getOrderImmutableFields,a182al as getOrderFrozenAfterProgressFields,a182am as getOrderOneTimeSetFields,a182an as inferOrderSceneFromIntent,a182ao as getOrderEmittedEvents,a182ap as getOrderInferredEvents,getOrderScenesCount,a182aq as sdkToMoveOrderField,a182ar as moveToSdkOrderField};export{a182as as initOrderPuzzleFromIntent,a182at as checkOrderPuzzleCompleteness,a182au as validateOrderConstraints,a182av as generateOrderPuzzleConfirmationText,a182aw as verifyOrderSnapshotMechanism,a182ax as inferOrderLifecyclePhase,a182ay as matchOrderSceneFromPuzzle,a182az as listAllOrderScenes,a182aA as lookupOrderScene};export{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,a182aB as getOrderTemplateById,a182aC as getOrderTemplatesByScene,a182aD as getOrderTemplatesByIndustry,a182aE as getOrderTemplatesByPermissionLayer,a182aF as getIrreversibleOrderTemplates,a182aG as suggestOrderTemplateForScene,listOrderTemplates,a182aH as fillOrderTemplate,a182aI as suggestOrderTemplateFromIntent,a182aJ as getOrderTemplateParameters,a182aK as validateOrderTemplateParams};export{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules};export{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,a182aL as PROGRESS_BUILTIN_PERMISSIONS,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,a182aM as getProgressScenesByPhase,a182aN as findProgressSceneById,a182aO as getProgressScenesByIndustry,a182aP as getProgressBuiltinPermissionByIndex,isProgressBuiltinPermission,a182aQ as inferProgressSceneFromIntent,a182aR as getAllProgressBuiltinPermissions,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount};export{a182aS as initProgressPuzzleFromIntent,a182aT as checkProgressPuzzleCompleteness,a182aU as validateProgressConstraints,a182aV as generateProgressPuzzleConfirmationText,a182aW as resolveProgressBuiltinPermission,isOrderHolderForward,a182aX 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,a182aY as ARBITRATION_BUILTIN_PERMISSIONS,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,a182aZ as getArbitrationScenesByCategory,a182b0 as findArbitrationSceneById,a182b1 as findArbitrationSceneByPermissionIndex,a182b2 as getArbitrationPermissionByIndex,a182b3 as getArbitrationPermissionByName,a182b4 as isArbitrationReservedIndex,a182b5 as isArbitrationUsedPermissionIndex,a182b6 as getArbitrationActivePermissionCount,a182b7 as inferArbitrationSceneFromIntent,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,a182b8 as getArbitrationScenesProducingStatus,a182b9 as getArbitrationScenesRequiringStatus,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions};export{a182ba as initArbitrationPuzzleFromIntent,a182bb as checkArbitrationPuzzleCompleteness,a182bc as validateArbitrationConstraints,a182bd as generateArbitrationPuzzleConfirmationText};export{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,a182be as getAllArbitrationTemplates,a182bf as getArbitrationTemplateById,a182bg as getArbitrationTemplatesByScene,a182bh as getArbitrationTemplatesByIndustry,a182bi as suggestArbitrationTemplateForScene,a182bj as listArbitrationTemplates,a182bk as fillArbitrationTemplate};export{ARBITRATION_RISK_VERSION,assessArbitrationRisks,a182bl 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,a182bm as getRewardScenesByPhase,a182bn as findRewardSceneById,a182bo as getRewardScenesByIndustry,a182bp as getRewardBuiltinPermissionByIndex,isRewardBuiltinPermission,a182bq as getAllRewardBuiltinPermissions,getRewardScenesCount,a182br as getRewardGuardConstructorSpec,a182bs as resolveRewardGuardConstructor,getRewardErrorByCode,getRewardErrorByName,a182bt as validateRewardGuardCount,a182bu as validateRewardRecordCount,a182bv as inferRewardSceneFromIntent};export{REWARD_FIELD_MUTABILITY,a182bw as initRewardPuzzleFromIntent,a182bx as checkRewardPuzzleCompleteness,a182by as validateRewardConstraints,a182bz as generateRewardPuzzleConfirmationText,a182bA as resolveRewardBuiltinPermission,a182bB as requiresRewardGuardConfig,a182bC as requiresRewardPassport,a182bD as getRewardRelevantDimensions,a182bE as getRewardFieldMutability,a182bF as isRewardAdminMutableField,a182bG 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,a182bH as getAllPassportScenarios,a182bI as getPassportScenesCount,a182bJ as findPassportScenarioById,a182bK as getPassportScenariosByConsumer,a182bL as getPassportScenariosUsingRelies,a182bM as inferPassportScenarioFromIntent,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,a182bN as getPassportErrorName,a182bO as getPassportErrorDescription};export{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,a182bP as getAllPassportTemplates,a182bQ as getPassportTemplateById,a182bR as getPassportTemplatesByScenario,a182bS as getPassportTemplatesByIndustry,a182bT as suggestPassportTemplateForScenario,a182bU as listPassportTemplates,a182bV 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,a182bW 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':a182L()['length'],'allocation_templates_count':ALLOCATION_TEMPLATES['length'],'allocation_context_enabled':!![],'treasury_scenes_count':TREASURY_SCENES['length'],'treasury_builtin_permissions_count':a182T['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':a182aL['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':a182aY['length'],'arbitration_risk_rules_count':a182bl()['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{buildReviewRepositorySetup,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 a195a,getScenesByIndustry as a195b,getScenesByPattern,inferSceneFromFlow}from'./machine-ledger.js';import{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,getAllTemplates as a195c,getTemplateById as a195d,getTemplatesByScene as a195e,getTemplatesByIndustry as a195f,suggestTemplateForIntent,walkDecisionTree,fillTemplate as a195g,forkTemplate as a195h,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 a195i,identifyExecutionMode,identifyTopology,explainForwardPermission,getConstraintsByCategory as a195j,getConstraintById,getOnChainConstraints as a195k,getOffChainConstraints as a195l}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 a195m,initPuzzleFromTemplate,checkPuzzleCompleteness as a195n,recommendNextStep as a195o,derivePuzzleFromMachineJson,generateConfirmationText as a195p,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 a195q,findSceneById as a195r,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,inferSceneFromIntent as a195s,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,getCrossObjectBindings as a195t}from'./service-ledger.js';import{initPuzzleFromIntent as a195u,checkPuzzleCompleteness as a195v,validateConstraints as a195w,generateConfirmationText as a195x,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 a195y,getScenesByMode as a195z,getScenesByStrategy as a195A,findSceneById as a195B,inferSceneFromIntent as a195C,getAllScenes as a195D,getScenesCount as a195E,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,getErrorName as a195F,getErrorDescription as a195G}from'./allocation-ledger.js';import{initPuzzleFromIntent as a195H,checkPuzzleCompleteness as a195I,validateConstraints as a195J,generateConfirmationText as a195K,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION}from'./allocation-puzzle.js';import{ALLOCATION_RISK_VERSION,assessAllocationRisks,getAllRiskRules as a195L}from'./allocation-risk.js';import{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,getAllTemplates as a195M,getTemplateById as a195N,getTemplatesByScene as a195O,getTemplatesByIndustry as a195P,suggestTemplateForScene as a195Q,listTemplates as a195R,fillTemplate as a195S}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 a195T,getScenesByHostObject as a195U,findSceneById as a195V,findSceneByPermissionIndex as a195W,getBuiltinPermissionByIndex as a195X,isBuiltinTreasuryPermission,getActiveBuiltinPermissions as a195Y,getReservedBuiltinPermissions as a195Z,inferSceneFromIntent as a195a0,getTreasuryScenesCount,getGovernedOperationsForPermissionIndex as a195a1}from'./treasury-ledger.js';import{initPuzzleFromIntent as a195a2,checkPuzzleCompleteness as a195a3,validateConstraints as a195a4,generateConfirmationText as a195a5,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,MAX_DESCRIPTION_LENGTH as a195a6}from'./treasury-puzzle.js';import{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,getTemplateById as a195a7,getTemplatesByScene as a195a8,getTemplatesByIndustry as a195a9,suggestTemplateForScene as a195aa,listTemplates as a195ab,fillTemplate as a195ac}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 a195ad,findSceneById as a195ae,findSceneByMoveEntry as a195af,getScenesByPermissionLayer as a195ag,getScenesByReversibility as a195ah,getFieldDef as a195ai,getMutableFields as a195aj,getImmutableFields as a195ak,getFrozenAfterProgressFields as a195al,getOneTimeSetFields as a195am,inferSceneFromIntent as a195an,getEmittedEvents as a195ao,getInferredEvents as a195ap,getOrderScenesCount,sdkToMoveField as a195aq,moveToSdkField as a195ar}from'./order-ledger.js';import{initPuzzleFromIntent as a195as,checkPuzzleCompleteness as a195at,validateConstraints as a195au,generateConfirmationText as a195av,verifySnapshotMechanism as a195aw,inferLifecyclePhase as a195ax,matchSceneFromPuzzle as a195ay,listAllScenes as a195az,lookupScene as a195aA}from'./order-puzzle.js';import{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,getTemplateById as a195aB,getTemplatesByScene as a195aC,getTemplatesByIndustry as a195aD,getTemplatesByPermissionLayer as a195aE,getIrreversibleTemplates as a195aF,suggestTemplateForScene as a195aG,listOrderTemplates,fillTemplate as a195aH,suggestTemplateFromIntent as a195aI,getTemplateParameters as a195aJ,validateTemplateParams as a195aK}from'./order-templates.js';import{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules}from'./order-risk.js';import{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,PROGRESS_PERMISSIONS as a195aL,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,getScenesByPhase as a195aM,findSceneById as a195aN,getScenesByIndustry as a195aO,getBuiltinPermissionByIndex as a195aP,isProgressBuiltinPermission,inferSceneFromIntent as a195aQ,getAllBuiltinPermissions as a195aR,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount}from'./progress-ledger.js';import{initPuzzleFromIntent as a195aS,checkPuzzleCompleteness as a195aT,validateConstraints as a195aU,generateConfirmationText as a195aV,resolveBuiltinPermission as a195aW,isOrderHolderForward,getRelevantDimensions as a195aX}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 a195aY,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,getScenesByCategory as a195aZ,findSceneById as a195b0,findSceneByPermissionIndex as a195b1,getPermissionByIndex as a195b2,getPermissionByName as a195b3,isReservedIndex as a195b4,isUsedPermissionIndex as a195b5,getActivePermissionCount as a195b6,inferSceneFromIntent as a195b7,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,getScenesProducingStatus as a195b8,getScenesRequiringStatus as a195b9,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions}from'./arbitration-ledger.js';import{initPuzzleFromIntent as a195ba,checkPuzzleCompleteness as a195bb,validateConstraints as a195bc,generateConfirmationText as a195bd}from'./arbitration-puzzle.js';import{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,getAllTemplates as a195be,getTemplateById as a195bf,getTemplatesByScene as a195bg,getTemplatesByIndustry as a195bh,suggestTemplateForScene as a195bi,listTemplates as a195bj,fillTemplate as a195bk}from'./arbitration-templates.js';import{ARBITRATION_RISK_VERSION,assessArbitrationRisks,getAllRiskRules as a195bl}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 a195bm,findSceneById as a195bn,getScenesByIndustry as a195bo,getBuiltinPermissionByIndex as a195bp,isRewardBuiltinPermission,getAllBuiltinPermissions as a195bq,getRewardScenesCount,getGuardConstructorSpec as a195br,resolveGuardConstructor as a195bs,getRewardErrorByCode,getRewardErrorByName,validateGuardCount as a195bt,validateRecordCount as a195bu,inferSceneFromIntent as a195bv}from'./reward-ledger.js';import{REWARD_FIELD_MUTABILITY,initPuzzleFromIntent as a195bw,checkPuzzleCompleteness as a195bx,validateConstraints as a195by,generateConfirmationText as a195bz,resolveBuiltinPermission as a195bA,requiresGuardConfig as a195bB,requiresPassport as a195bC,getRelevantDimensions as a195bD,getFieldMutability as a195bE,isAdminMutableField as a195bF,getFieldPermissionIndex as a195bG}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 a195bH,getScenariosCount as a195bI,findScenarioById as a195bJ,getScenariosByConsumer as a195bK,getScenariosUsingRelies as a195bL,inferScenarioFromIntent as a195bM,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,getErrorName as a195bN,getErrorDescription as a195bO}from'./passport-ledger.js';import{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,getAllTemplates as a195bP,getTemplateById as a195bQ,getTemplatesByScenario as a195bR,getTemplatesByIndustry as a195bS,suggestTemplateForScenario as a195bT,listTemplates as a195bU,fillTemplate as a195bV}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 a195bW,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{buildReviewRepositorySetup,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,a195a as findMachineScene,a195b as getMachineScenesByIndustry,getScenesByPattern,inferSceneFromFlow};export{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,a195c as getAllMachineTemplates,a195d as getMachineTemplateById,a195e as getMachineTemplatesByScene,a195f as getMachineTemplatesByIndustry,suggestTemplateForIntent,walkDecisionTree,a195g as fillMachineTemplate,a195h as forkMachineTemplate,verifyTemplateSceneReferences,getReferencedGuardTemplateIds,getReferencedRiskIds};export{SEMANTIC_TO_MACHINE_RULES,MACHINE_CONSTRAINT_RULES,MACHINE_TRANSLATION_VERSION,MACHINE_PATTERNS_COUNT,MACHINE_CONSTRAINTS_COUNT,a195i as matchMachinePattern,identifyExecutionMode,identifyTopology,explainForwardPermission,a195j as getMachineConstraintsByCategory,getConstraintById,a195k as getOnChainMachineConstraints,a195l 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{a195m as initMachinePuzzleFromIntent,initPuzzleFromTemplate,a195n as checkMachinePuzzleCompleteness,a195o as recommendMachineNextStep,derivePuzzleFromMachineJson,a195p as generateMachineConfirmationText,MACHINE_PUZZLE_VERSION};export{SERVICE_SCENES,SERVICE_LEDGER_VERSION,SERVICE_PERMISSIONS,SERVICE_ORDER_FLOW_STAGES,SERVICE_CROSS_OBJECT_BINDINGS,a195q as getServiceScenesByCategory,a195r as findServiceSceneById,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,a195s as inferServiceSceneFromIntent,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,a195t as getServiceCrossObjectBindings};export{a195u as initServicePuzzleFromIntent,a195v as checkServicePuzzleCompleteness,a195w as validateServiceConstraints,a195x 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,a195y as getAllocationScenesByTriggerSource,a195z as getAllocationScenesByMode,a195A as getAllocationScenesByStrategy,a195B as findAllocationSceneById,a195C as inferAllocationSceneFromIntent,a195D as getAllAllocationScenes,a195E as getAllocationScenesCount,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,a195F as getAllocationErrorName,a195G as getAllocationErrorDescription};export{a195H as initAllocationPuzzleFromIntent,a195I as checkAllocationPuzzleCompleteness,a195J as validateAllocationConstraints,a195K as generateAllocationPuzzleConfirmationText,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION};export{ALLOCATION_RISK_VERSION,assessAllocationRisks,a195L as getAllAllocationRiskRules};export{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,a195M as getAllAllocationTemplates,a195N as getAllocationTemplateById,a195O as getAllocationTemplatesByScene,a195P as getAllocationTemplatesByIndustry,a195Q as suggestAllocationTemplateForScene,a195R as listAllocationTemplates,a195S 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,a195T as TREASURY_BUILTIN_PERMISSIONS,a195U as getTreasuryScenesByHostObject,a195V as findTreasurySceneById,a195W as findTreasurySceneByPermissionIndex,a195X as getTreasuryBuiltinPermissionByIndex,isBuiltinTreasuryPermission,a195Y as getActiveTreasuryBuiltinPermissions,a195Z as getReservedTreasuryBuiltinPermissions,a195a0 as inferTreasurySceneFromIntent,getTreasuryScenesCount,a195a1 as getTreasuryGovernedOperationsForPermissionIndex};export{a195a2 as initTreasuryPuzzleFromIntent,a195a3 as checkTreasuryPuzzleCompleteness,a195a4 as validateTreasuryConstraints,a195a5 as generateTreasuryPuzzleConfirmationText,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,a195a6 as TREASURY_MAX_DESCRIPTION_LENGTH};export{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,a195a7 as getTreasuryTemplateById,a195a8 as getTreasuryTemplatesByScene,a195a9 as getTreasuryTemplatesByIndustry,a195aa as suggestTreasuryTemplateForScene,a195ab as listTreasuryTemplates,a195ac 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,a195ad as getOrderScenesByOperationField,a195ae as findOrderSceneById,a195af as findOrderSceneByMoveEntry,a195ag as getOrderScenesByPermissionLayer,a195ah as getOrderScenesByReversibility,a195ai as getOrderFieldDef,a195aj as getOrderMutableFields,a195ak as getOrderImmutableFields,a195al as getOrderFrozenAfterProgressFields,a195am as getOrderOneTimeSetFields,a195an as inferOrderSceneFromIntent,a195ao as getOrderEmittedEvents,a195ap as getOrderInferredEvents,getOrderScenesCount,a195aq as sdkToMoveOrderField,a195ar as moveToSdkOrderField};export{a195as as initOrderPuzzleFromIntent,a195at as checkOrderPuzzleCompleteness,a195au as validateOrderConstraints,a195av as generateOrderPuzzleConfirmationText,a195aw as verifyOrderSnapshotMechanism,a195ax as inferOrderLifecyclePhase,a195ay as matchOrderSceneFromPuzzle,a195az as listAllOrderScenes,a195aA as lookupOrderScene};export{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,a195aB as getOrderTemplateById,a195aC as getOrderTemplatesByScene,a195aD as getOrderTemplatesByIndustry,a195aE as getOrderTemplatesByPermissionLayer,a195aF as getIrreversibleOrderTemplates,a195aG as suggestOrderTemplateForScene,listOrderTemplates,a195aH as fillOrderTemplate,a195aI as suggestOrderTemplateFromIntent,a195aJ as getOrderTemplateParameters,a195aK as validateOrderTemplateParams};export{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules};export{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,a195aL as PROGRESS_BUILTIN_PERMISSIONS,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,a195aM as getProgressScenesByPhase,a195aN as findProgressSceneById,a195aO as getProgressScenesByIndustry,a195aP as getProgressBuiltinPermissionByIndex,isProgressBuiltinPermission,a195aQ as inferProgressSceneFromIntent,a195aR as getAllProgressBuiltinPermissions,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount};export{a195aS as initProgressPuzzleFromIntent,a195aT as checkProgressPuzzleCompleteness,a195aU as validateProgressConstraints,a195aV as generateProgressPuzzleConfirmationText,a195aW as resolveProgressBuiltinPermission,isOrderHolderForward,a195aX 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,a195aY as ARBITRATION_BUILTIN_PERMISSIONS,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,a195aZ as getArbitrationScenesByCategory,a195b0 as findArbitrationSceneById,a195b1 as findArbitrationSceneByPermissionIndex,a195b2 as getArbitrationPermissionByIndex,a195b3 as getArbitrationPermissionByName,a195b4 as isArbitrationReservedIndex,a195b5 as isArbitrationUsedPermissionIndex,a195b6 as getArbitrationActivePermissionCount,a195b7 as inferArbitrationSceneFromIntent,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,a195b8 as getArbitrationScenesProducingStatus,a195b9 as getArbitrationScenesRequiringStatus,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions};export{a195ba as initArbitrationPuzzleFromIntent,a195bb as checkArbitrationPuzzleCompleteness,a195bc as validateArbitrationConstraints,a195bd as generateArbitrationPuzzleConfirmationText};export{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,a195be as getAllArbitrationTemplates,a195bf as getArbitrationTemplateById,a195bg as getArbitrationTemplatesByScene,a195bh as getArbitrationTemplatesByIndustry,a195bi as suggestArbitrationTemplateForScene,a195bj as listArbitrationTemplates,a195bk as fillArbitrationTemplate};export{ARBITRATION_RISK_VERSION,assessArbitrationRisks,a195bl 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,a195bm as getRewardScenesByPhase,a195bn as findRewardSceneById,a195bo as getRewardScenesByIndustry,a195bp as getRewardBuiltinPermissionByIndex,isRewardBuiltinPermission,a195bq as getAllRewardBuiltinPermissions,getRewardScenesCount,a195br as getRewardGuardConstructorSpec,a195bs as resolveRewardGuardConstructor,getRewardErrorByCode,getRewardErrorByName,a195bt as validateRewardGuardCount,a195bu as validateRewardRecordCount,a195bv as inferRewardSceneFromIntent};export{REWARD_FIELD_MUTABILITY,a195bw as initRewardPuzzleFromIntent,a195bx as checkRewardPuzzleCompleteness,a195by as validateRewardConstraints,a195bz as generateRewardPuzzleConfirmationText,a195bA as resolveRewardBuiltinPermission,a195bB as requiresRewardGuardConfig,a195bC as requiresRewardPassport,a195bD as getRewardRelevantDimensions,a195bE as getRewardFieldMutability,a195bF as isRewardAdminMutableField,a195bG 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,a195bH as getAllPassportScenarios,a195bI as getPassportScenesCount,a195bJ as findPassportScenarioById,a195bK as getPassportScenariosByConsumer,a195bL as getPassportScenariosUsingRelies,a195bM as inferPassportScenarioFromIntent,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,a195bN as getPassportErrorName,a195bO as getPassportErrorDescription};export{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,a195bP as getAllPassportTemplates,a195bQ as getPassportTemplateById,a195bR as getPassportTemplatesByScenario,a195bS as getPassportTemplatesByIndustry,a195bT as suggestPassportTemplateForScenario,a195bU as listPassportTemplates,a195bV 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,a195bW 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':a195L()['length'],'allocation_templates_count':ALLOCATION_TEMPLATES['length'],'allocation_context_enabled':!![],'treasury_scenes_count':TREASURY_SCENES['length'],'treasury_builtin_permissions_count':a195T['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':a195aL['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':a195aY['length'],'arbitration_risk_rules_count':a195bl()['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 a185a,_setRegistryLookup as a185b}from'./acquisition-flywheel.js';import{getIndustryRiskChecks,getIndustryNeeds,getIndustryTemplate,SUPPORTED_INDUSTRIES}from'../customer/index.js';import{_setRegistryLookup as a185c}from'../customer/industry-risks.js';import{_setRegistryLookup as a185d}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'};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(){a185b(a=>{const b=registry['get'](a);return b?{'flywheel':b['flywheel']}:undefined;}),a185c(a=>{const b=registry['get'](a);return b?{'risk_checks':b['risk_checks'],'needs':b['needs']}:undefined;}),a185d(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'](),a185b(null),a185c(null),a185d(null),seedBuiltinIndustries(),injectRegistryLookup();}export function listBuiltinIndustryNames(){return a185a();}
1
+ import{getFlywheelForIndustry,listIndustries as a198a,_setRegistryLookup as a198b}from'./acquisition-flywheel.js';import{getIndustryRiskChecks,getIndustryNeeds,getIndustryTemplate,SUPPORTED_INDUSTRIES}from'../customer/index.js';import{_setRegistryLookup as a198c}from'../customer/industry-risks.js';import{_setRegistryLookup as a198d}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'};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(){a198b(a=>{const b=registry['get'](a);return b?{'flywheel':b['flywheel']}:undefined;}),a198c(a=>{const b=registry['get'](a);return b?{'risk_checks':b['risk_checks'],'needs':b['needs']}:undefined;}),a198d(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'](),a198b(null),a198c(null),a198d(null),seedBuiltinIndustries(),injectRegistryLookup();}export function listBuiltinIndustryNames(){return a198a();}
@@ -1 +1 @@
1
- import{query_events}from'@wowok/wowok';import{batchQueryObjectsByIds as a189a}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 a189a(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 a189a(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 a189a(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 a202a}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 a202a(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 a202a(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 a202a(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,4 +1,4 @@
1
- import { ONCHAIN_CONSTANTS, MAX_NODE_COUNT, MAX_NODE_COUNT_ONCHAIN, MAX_FORWARD_COUNT, MAX_FORWARD_ORDER_COUNT, MAX_NODE_PAIR_COUNT, MAX_CONSENSUS_REPOSITORIES_COUNT, USER_DEFINED_PERM_INDEX_START, MAX_PERM_FOR_ENTITY, MAX_ADMIN_COUNT, MAX_ITEM_COUNT, ROLE_OWNER, ROLE_ADMIN, ROLE_ENTITY, MAX_AGENT_COUNT, MAX_DISPUTE_COUNT, MAX_SHARING_COUNT, MAX_VOTING_GUARD_COUNT, MAX_POLICY_COUNT, MAX_ID_COUNT_ONCE, MAX_REWARD_COUNT, MAX_GUARD_COUNT_REWARD, MAX_RECORD_COUNT_REWARD, MAX_CONTEXT_REPOSITORY_COUNT, MAX_NAMED_OPERATOR_COUNT, MAX_NAMED_OPERATOR_ADDRESS_COUNT, MAX_IM_COUNT, MAX_TAGS_COUNT, MAX_RECIPIENT_COUNT, MAX_PROPOSITION_COUNT, MAX_VOTOR_COUNT, WITHDRAW_DURATION_TIME, MAX_ADDRESS_COUNT, MAX_RECORD_LENGTH, BRIDGE_MESSAGE_VERSION, BRIDGE_EVM_ADDRESS_LENGTH, BRIDGE_CURRENT_VERSION, BRIDGE_TRANSFER_STATUS_PENDING, BRIDGE_TRANSFER_STATUS_APPROVED, BRIDGE_TRANSFER_STATUS_CLAIMED, BRIDGE_TRANSFER_STATUS_NOT_FOUND, MAX_INDEMNITY_MULTIPLE, MAX_PRESENTER_COUNT, MAX_INPUT_SIZE, MAX_TABLE_SIZE, MAX_DEPENDED_COUNT, MAX_DISCOUNT_TOTAL_COUNT, type OnchainConstantName, type MaxNodeCountSdkLiteral } from "@wowok/wowok";
2
- export { ONCHAIN_CONSTANTS, MAX_NODE_COUNT, MAX_NODE_COUNT_ONCHAIN, MAX_FORWARD_COUNT, MAX_FORWARD_ORDER_COUNT, MAX_NODE_PAIR_COUNT, MAX_CONSENSUS_REPOSITORIES_COUNT, USER_DEFINED_PERM_INDEX_START, MAX_PERM_FOR_ENTITY, MAX_ADMIN_COUNT, MAX_ITEM_COUNT, ROLE_OWNER, ROLE_ADMIN, ROLE_ENTITY, MAX_AGENT_COUNT, MAX_DISPUTE_COUNT, MAX_SHARING_COUNT, MAX_VOTING_GUARD_COUNT, MAX_POLICY_COUNT, MAX_ID_COUNT_ONCE, MAX_REWARD_COUNT, MAX_GUARD_COUNT_REWARD, MAX_RECORD_COUNT_REWARD, MAX_CONTEXT_REPOSITORY_COUNT, MAX_NAMED_OPERATOR_COUNT, MAX_NAMED_OPERATOR_ADDRESS_COUNT, MAX_IM_COUNT, MAX_TAGS_COUNT, MAX_RECIPIENT_COUNT, MAX_PROPOSITION_COUNT, MAX_VOTOR_COUNT, WITHDRAW_DURATION_TIME, MAX_INDEMNITY_MULTIPLE, MAX_PRESENTER_COUNT, MAX_INPUT_SIZE, MAX_TABLE_SIZE, MAX_DEPENDED_COUNT, MAX_DISCOUNT_TOTAL_COUNT, MAX_ADDRESS_COUNT, MAX_RECORD_LENGTH, BRIDGE_MESSAGE_VERSION, BRIDGE_EVM_ADDRESS_LENGTH, BRIDGE_CURRENT_VERSION, BRIDGE_TRANSFER_STATUS_PENDING, BRIDGE_TRANSFER_STATUS_APPROVED, BRIDGE_TRANSFER_STATUS_CLAIMED, BRIDGE_TRANSFER_STATUS_NOT_FOUND, type OnchainConstantName, type MaxNodeCountSdkLiteral, };
1
+ import { ONCHAIN_CONSTANTS, MAX_NODE_COUNT, MAX_NODE_COUNT_ONCHAIN, MAX_FORWARD_COUNT, MAX_FORWARD_ORDER_COUNT, MAX_NODE_PAIR_COUNT, MAX_CONSENSUS_REPOSITORIES_COUNT, USER_DEFINED_PERM_INDEX_START, MAX_PERM_FOR_ENTITY, MAX_ADMIN_COUNT, MAX_ITEM_COUNT, ROLE_OWNER, ROLE_ADMIN, ROLE_ENTITY, MAX_AGENT_COUNT, MAX_DISPUTE_COUNT, MAX_SHARING_COUNT, MAX_VOTING_GUARD_COUNT, MAX_POLICY_COUNT, MAX_ID_COUNT_ONCE, MAX_REWARD_COUNT, MAX_GUARD_COUNT_REWARD, MAX_RECORD_COUNT_REWARD, MAX_CONTEXT_REPOSITORY_COUNT, MAX_NAMED_OPERATOR_COUNT, MAX_NAMED_OPERATOR_ADDRESS_COUNT, MAX_IM_COUNT, MAX_TAGS_COUNT, MAX_RECIPIENT_COUNT, MAX_PROPOSITION_COUNT, MAX_VOTOR_COUNT, WITHDRAW_DURATION_TIME, MAX_ADDRESS_COUNT, MAX_RECORD_LENGTH, BRIDGE_MESSAGE_VERSION, BRIDGE_EVM_ADDRESS_LENGTH, BRIDGE_CURRENT_VERSION, BRIDGE_TRANSFER_STATUS_PENDING, BRIDGE_TRANSFER_STATUS_APPROVED, BRIDGE_TRANSFER_STATUS_CLAIMED, BRIDGE_TRANSFER_STATUS_NOT_FOUND, MAX_INDEMNITY_MULTIPLE, MAX_PRESENTER_COUNT, MAX_INPUT_SIZE, MAX_TABLE_SIZE, MAX_DEPENDED_COUNT, MAX_DISCOUNT_TOTAL_COUNT, MAX_USER_IDENTIFIER, type OnchainConstantName, type MaxNodeCountSdkLiteral } from "@wowok/wowok";
2
+ export { ONCHAIN_CONSTANTS, MAX_NODE_COUNT, MAX_NODE_COUNT_ONCHAIN, MAX_FORWARD_COUNT, MAX_FORWARD_ORDER_COUNT, MAX_NODE_PAIR_COUNT, MAX_CONSENSUS_REPOSITORIES_COUNT, USER_DEFINED_PERM_INDEX_START, MAX_PERM_FOR_ENTITY, MAX_ADMIN_COUNT, MAX_ITEM_COUNT, ROLE_OWNER, ROLE_ADMIN, ROLE_ENTITY, MAX_AGENT_COUNT, MAX_DISPUTE_COUNT, MAX_SHARING_COUNT, MAX_VOTING_GUARD_COUNT, MAX_POLICY_COUNT, MAX_ID_COUNT_ONCE, MAX_REWARD_COUNT, MAX_GUARD_COUNT_REWARD, MAX_RECORD_COUNT_REWARD, MAX_CONTEXT_REPOSITORY_COUNT, MAX_NAMED_OPERATOR_COUNT, MAX_NAMED_OPERATOR_ADDRESS_COUNT, MAX_IM_COUNT, MAX_TAGS_COUNT, MAX_RECIPIENT_COUNT, MAX_PROPOSITION_COUNT, MAX_VOTOR_COUNT, WITHDRAW_DURATION_TIME, MAX_INDEMNITY_MULTIPLE, MAX_PRESENTER_COUNT, MAX_INPUT_SIZE, MAX_TABLE_SIZE, MAX_DEPENDED_COUNT, MAX_DISCOUNT_TOTAL_COUNT, MAX_USER_IDENTIFIER, MAX_ADDRESS_COUNT, MAX_RECORD_LENGTH, BRIDGE_MESSAGE_VERSION, BRIDGE_EVM_ADDRESS_LENGTH, BRIDGE_CURRENT_VERSION, BRIDGE_TRANSFER_STATUS_PENDING, BRIDGE_TRANSFER_STATUS_APPROVED, BRIDGE_TRANSFER_STATUS_CLAIMED, BRIDGE_TRANSFER_STATUS_NOT_FOUND, type OnchainConstantName, type MaxNodeCountSdkLiteral, };
3
3
  export declare const ONCHAIN_CONSTANT_MCP_CONSUMERS: Record<string, string[]>;
4
4
  export declare function getOnchainConstant(name: OnchainConstantName): number;
@@ -1 +1 @@
1
- import{ONCHAIN_CONSTANTS,MAX_NODE_COUNT,MAX_NODE_COUNT_ONCHAIN,MAX_FORWARD_COUNT,MAX_FORWARD_ORDER_COUNT,MAX_NODE_PAIR_COUNT,MAX_CONSENSUS_REPOSITORIES_COUNT,USER_DEFINED_PERM_INDEX_START,MAX_PERM_FOR_ENTITY,MAX_ADMIN_COUNT,MAX_ITEM_COUNT,ROLE_OWNER,ROLE_ADMIN,ROLE_ENTITY,MAX_AGENT_COUNT,MAX_DISPUTE_COUNT,MAX_SHARING_COUNT,MAX_VOTING_GUARD_COUNT,MAX_POLICY_COUNT,MAX_ID_COUNT_ONCE,MAX_REWARD_COUNT,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,MAX_CONTEXT_REPOSITORY_COUNT,MAX_NAMED_OPERATOR_COUNT,MAX_NAMED_OPERATOR_ADDRESS_COUNT,MAX_IM_COUNT,MAX_TAGS_COUNT,MAX_RECIPIENT_COUNT,MAX_PROPOSITION_COUNT,MAX_VOTOR_COUNT,WITHDRAW_DURATION_TIME,MAX_ADDRESS_COUNT,MAX_RECORD_LENGTH,BRIDGE_MESSAGE_VERSION,BRIDGE_EVM_ADDRESS_LENGTH,BRIDGE_CURRENT_VERSION,BRIDGE_TRANSFER_STATUS_PENDING,BRIDGE_TRANSFER_STATUS_APPROVED,BRIDGE_TRANSFER_STATUS_CLAIMED,BRIDGE_TRANSFER_STATUS_NOT_FOUND,MAX_INDEMNITY_MULTIPLE,MAX_PRESENTER_COUNT,MAX_INPUT_SIZE,MAX_TABLE_SIZE,MAX_DEPENDED_COUNT,MAX_DISCOUNT_TOTAL_COUNT}from'@wowok/wowok';export{ONCHAIN_CONSTANTS,MAX_NODE_COUNT,MAX_NODE_COUNT_ONCHAIN,MAX_FORWARD_COUNT,MAX_FORWARD_ORDER_COUNT,MAX_NODE_PAIR_COUNT,MAX_CONSENSUS_REPOSITORIES_COUNT,USER_DEFINED_PERM_INDEX_START,MAX_PERM_FOR_ENTITY,MAX_ADMIN_COUNT,MAX_ITEM_COUNT,ROLE_OWNER,ROLE_ADMIN,ROLE_ENTITY,MAX_AGENT_COUNT,MAX_DISPUTE_COUNT,MAX_SHARING_COUNT,MAX_VOTING_GUARD_COUNT,MAX_POLICY_COUNT,MAX_ID_COUNT_ONCE,MAX_REWARD_COUNT,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,MAX_CONTEXT_REPOSITORY_COUNT,MAX_NAMED_OPERATOR_COUNT,MAX_NAMED_OPERATOR_ADDRESS_COUNT,MAX_IM_COUNT,MAX_TAGS_COUNT,MAX_RECIPIENT_COUNT,MAX_PROPOSITION_COUNT,MAX_VOTOR_COUNT,WITHDRAW_DURATION_TIME,MAX_INDEMNITY_MULTIPLE,MAX_PRESENTER_COUNT,MAX_INPUT_SIZE,MAX_TABLE_SIZE,MAX_DEPENDED_COUNT,MAX_DISCOUNT_TOTAL_COUNT,MAX_ADDRESS_COUNT,MAX_RECORD_LENGTH,BRIDGE_MESSAGE_VERSION,BRIDGE_EVM_ADDRESS_LENGTH,BRIDGE_CURRENT_VERSION,BRIDGE_TRANSFER_STATUS_PENDING,BRIDGE_TRANSFER_STATUS_APPROVED,BRIDGE_TRANSFER_STATUS_CLAIMED,BRIDGE_TRANSFER_STATUS_NOT_FOUND};export const ONCHAIN_CONSTANT_MCP_CONSUMERS={'MAX_NODE_COUNT':['machine-topology.ts\x20(within_limits\x20check)','machine-risk.ts\x20R-M1-07','machine-translation.ts\x20MC-C-01','knowledge/index.ts\x20(max_node_count\x20field)'],'MAX_FORWARD_ORDER_COUNT':[],'MAX_NODE_PAIR_COUNT':['machine-topology.ts\x20(within_limits\x20check)'],'USER_DEFINED_PERM_INDEX_START':['machine-risk.ts\x20R-M3-08','guard-risk.ts\x20(forward\x20permissionIndex\x20guidance)'],'MAX_VOTING_GUARD_COUNT':['evaluation/builtins/arbitration-score.ts\x20(fairness_governance\x20reason)'],'MAX_ITEM_COUNT':['permission-context.ts\x20(entity_permission\x20reverse\x20index)'],'ROLE_OWNER':['permission-context.ts\x20(entity_permission\x20role\x20flags)'],'ROLE_ADMIN':['permission-context.ts\x20(entity_permission\x20role\x20flags)'],'ROLE_ENTITY':['permission-context.ts\x20(entity_permission\x20role\x20flags)']};export function getOnchainConstant(a){const b=ONCHAIN_CONSTANTS[a];if(b===undefined)throw new Error('Unknown\x20on-chain\x20constant:\x20'+String(a));return b;}
1
+ import{ONCHAIN_CONSTANTS,MAX_NODE_COUNT,MAX_NODE_COUNT_ONCHAIN,MAX_FORWARD_COUNT,MAX_FORWARD_ORDER_COUNT,MAX_NODE_PAIR_COUNT,MAX_CONSENSUS_REPOSITORIES_COUNT,USER_DEFINED_PERM_INDEX_START,MAX_PERM_FOR_ENTITY,MAX_ADMIN_COUNT,MAX_ITEM_COUNT,ROLE_OWNER,ROLE_ADMIN,ROLE_ENTITY,MAX_AGENT_COUNT,MAX_DISPUTE_COUNT,MAX_SHARING_COUNT,MAX_VOTING_GUARD_COUNT,MAX_POLICY_COUNT,MAX_ID_COUNT_ONCE,MAX_REWARD_COUNT,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,MAX_CONTEXT_REPOSITORY_COUNT,MAX_NAMED_OPERATOR_COUNT,MAX_NAMED_OPERATOR_ADDRESS_COUNT,MAX_IM_COUNT,MAX_TAGS_COUNT,MAX_RECIPIENT_COUNT,MAX_PROPOSITION_COUNT,MAX_VOTOR_COUNT,WITHDRAW_DURATION_TIME,MAX_ADDRESS_COUNT,MAX_RECORD_LENGTH,BRIDGE_MESSAGE_VERSION,BRIDGE_EVM_ADDRESS_LENGTH,BRIDGE_CURRENT_VERSION,BRIDGE_TRANSFER_STATUS_PENDING,BRIDGE_TRANSFER_STATUS_APPROVED,BRIDGE_TRANSFER_STATUS_CLAIMED,BRIDGE_TRANSFER_STATUS_NOT_FOUND,MAX_INDEMNITY_MULTIPLE,MAX_PRESENTER_COUNT,MAX_INPUT_SIZE,MAX_TABLE_SIZE,MAX_DEPENDED_COUNT,MAX_DISCOUNT_TOTAL_COUNT,MAX_USER_IDENTIFIER}from'@wowok/wowok';export{ONCHAIN_CONSTANTS,MAX_NODE_COUNT,MAX_NODE_COUNT_ONCHAIN,MAX_FORWARD_COUNT,MAX_FORWARD_ORDER_COUNT,MAX_NODE_PAIR_COUNT,MAX_CONSENSUS_REPOSITORIES_COUNT,USER_DEFINED_PERM_INDEX_START,MAX_PERM_FOR_ENTITY,MAX_ADMIN_COUNT,MAX_ITEM_COUNT,ROLE_OWNER,ROLE_ADMIN,ROLE_ENTITY,MAX_AGENT_COUNT,MAX_DISPUTE_COUNT,MAX_SHARING_COUNT,MAX_VOTING_GUARD_COUNT,MAX_POLICY_COUNT,MAX_ID_COUNT_ONCE,MAX_REWARD_COUNT,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,MAX_CONTEXT_REPOSITORY_COUNT,MAX_NAMED_OPERATOR_COUNT,MAX_NAMED_OPERATOR_ADDRESS_COUNT,MAX_IM_COUNT,MAX_TAGS_COUNT,MAX_RECIPIENT_COUNT,MAX_PROPOSITION_COUNT,MAX_VOTOR_COUNT,WITHDRAW_DURATION_TIME,MAX_INDEMNITY_MULTIPLE,MAX_PRESENTER_COUNT,MAX_INPUT_SIZE,MAX_TABLE_SIZE,MAX_DEPENDED_COUNT,MAX_DISCOUNT_TOTAL_COUNT,MAX_USER_IDENTIFIER,MAX_ADDRESS_COUNT,MAX_RECORD_LENGTH,BRIDGE_MESSAGE_VERSION,BRIDGE_EVM_ADDRESS_LENGTH,BRIDGE_CURRENT_VERSION,BRIDGE_TRANSFER_STATUS_PENDING,BRIDGE_TRANSFER_STATUS_APPROVED,BRIDGE_TRANSFER_STATUS_CLAIMED,BRIDGE_TRANSFER_STATUS_NOT_FOUND};export const ONCHAIN_CONSTANT_MCP_CONSUMERS={'MAX_NODE_COUNT':['machine-topology.ts\x20(within_limits\x20check)','machine-risk.ts\x20R-M1-07','machine-translation.ts\x20MC-C-01','knowledge/index.ts\x20(max_node_count\x20field)'],'MAX_FORWARD_ORDER_COUNT':[],'MAX_NODE_PAIR_COUNT':['machine-topology.ts\x20(within_limits\x20check)'],'USER_DEFINED_PERM_INDEX_START':['machine-risk.ts\x20R-M3-08','guard-risk.ts\x20(forward\x20permissionIndex\x20guidance)'],'MAX_VOTING_GUARD_COUNT':['evaluation/builtins/arbitration-score.ts\x20(fairness_governance\x20reason)'],'MAX_ITEM_COUNT':['permission-context.ts\x20(entity_permission\x20reverse\x20index)'],'ROLE_OWNER':['permission-context.ts\x20(entity_permission\x20role\x20flags)'],'ROLE_ADMIN':['permission-context.ts\x20(entity_permission\x20role\x20flags)'],'ROLE_ENTITY':['permission-context.ts\x20(entity_permission\x20role\x20flags)']};export function getOnchainConstant(a){const b=ONCHAIN_CONSTANTS[a];if(b===undefined)throw new Error('Unknown\x20on-chain\x20constant:\x20'+String(a));return b;}
@@ -14,6 +14,9 @@ export interface ModeAllocatorRow {
14
14
  mode: "amount" | "rate" | "surplus";
15
15
  value?: string | number;
16
16
  value_from?: string;
17
+ fix?: string | number;
18
+ fix_from?: string;
19
+ guard_key?: string;
17
20
  note?: string;
18
21
  }
19
22
  export interface ModeAllocatorStrategy {
@@ -30,12 +33,21 @@ export interface ModeGuardRef {
30
33
  template_id: string;
31
34
  host: "service" | "machine" | "reward" | "repository" | "arbitration";
32
35
  purpose: string;
36
+ key?: string;
33
37
  }
34
38
  export interface ModeMachineNode {
35
39
  name: string;
36
40
  role: string;
37
41
  operator?: "merchant" | "order_payer";
38
42
  semantic_role?: "draft" | "active" | "delivered" | "final" | "cancelled";
43
+ from?: (string | ModeMachineEdge)[];
44
+ }
45
+ export interface ModeMachineEdge {
46
+ prev: string;
47
+ forward?: string;
48
+ operator?: "merchant" | "order_payer";
49
+ permission_index?: number;
50
+ guard_key?: string;
39
51
  }
40
52
  export declare const BUYER_ACTION_NODE_RE: RegExp;
41
53
  export declare function unannotatedBuyerActionNodes(shape: ReadonlyArray<{
@@ -1 +1 @@
1
- import{resolveInViewport}from'./repository-write-semantics.js';export const SERVICE_ALLOCATION_SEMANTICS_ANALYZER_ID='SA1';export const ALLOCATION_SEMANTICS_ANALYZER_ID='SA2';function asRecord(a){return a!=null&&typeof a==='object'&&!Array['isArray'](a)?a:undefined;}function recipientOf(a){if(typeof a==='string')return'entity:'+a['toLowerCase']();const b=asRecord(a);if(b){if(b['signer']!=null)return'signer';const c=b['guard_identifier']??b['guardIdentifier']??b['identifier'];if(c!=null)return'guard_identifier:'+String(c);const d=b['address']??b['entity'];if(typeof d==='string')return'entity:'+d['toLowerCase']();}if(typeof a==='number')return'guard_identifier:'+a;return'(unknown\x20recipient)';}function modeOf(a){const b=typeof a==='number'?a:typeof a==='string'?Number(a):NaN;return Number['isNaN'](b)?undefined:b;}function normalizeSharing(a){if(!Array['isArray'](a))return[];return a['map'](b=>{const c=b??{};return{'who':recipientOf(c['who']??c['recipient']),...c['sharing']!=null?{'value':String(c['sharing'])}:{},...modeOf(c['mode'])!==undefined?{'mode':modeOf(c['mode'])}:{}};});}function normalizeAllocators(a){if(!Array['isArray'](a))return[];return a['map'](b=>{const c=b??{},d=normalizeSharing(c['sharing']),e=modeOf(c['mode']),f=e!==undefined?d['map'](g=>g['mode']===undefined?{...g,'mode':e}:g):d;return{...typeof c['guard']==='string'&&c['guard']?{'guard':c['guard']['toLowerCase']()}:{},'sharing':f,...c['fix']!=null?{'fix':String(c['fix'])}:{},...c['max']!=null&&c['max']!==null?{'max':String(c['max'])}:{}};});}export function serviceAllocatorsOf(a){const b=asRecord(a['order_allocators']);if(!b)return[];return normalizeAllocators(b['allocators']);}export function allocationInstanceFactsOf(a){const b=asRecord(a['allocators']),c=asRecord(a['payment_info']),d=e=>typeof e==='string'&&e['length']>0x0?e['toLowerCase']():undefined;return{'allocators':normalizeAllocators(b?.['allocators']),...b&&b['threshold']!=null?{'threshold':String(b['threshold'])}:{},...c&&d(c['for_object'])?{'forObject':d(c['for_object'])}:{},...c&&d(c['for_guard'])?{'forGuard':d(c['for_guard'])}:{}};}const MODE_NAME={0x0:'amount',0x1:'rate',0x2:'surplus',0x3:'rate-gross'};function modeSemantics(a,b){switch(a){case 0x0:return'fixed-amount\x20mode:\x20the\x20allocator\x20moves\x20its\x20configured\x20total'+(b['fix']?'\x20(fix\x20'+b['fix']+')':'')+(b['max']?'\x20capped\x20at\x20'+b['max']:'')+';\x20a\x20run\x20with\x20insufficient\x20balance\x20aborts\x20the\x20whole\x20allocation';case 0x1:return'net\x20rate\x20mode:\x20each\x20row\x20moves\x20share/10000\x20of\x20the\x20EXECUTION-TIME\x20surplus\x20(balance\x20minus\x20the\x20fixed\x20part)\x20—\x20recipient\x20amounts\x20float\x20with\x20the\x20balance\x20at\x20unlock\x20time';case 0x2:return'surplus\x20mode:\x20the\x20row\x20receives\x20whatever\x20remains\x20after\x20the\x20fixed\x20and\x20rated\x20rows\x20are\x20served';case 0x3:return'rate-gross\x20mode:\x20each\x20row\x20moves\x20share/10000\x20of\x20the\x20FULL\x20pool\x20(or\x20the\x20max\x20cap\x20when\x20set)\x20with\x20the\x20fixed\x20part\x20NOT\x20removed\x20—\x20lets\x20fixed\x20Amount\x20rows\x20and\x20percentage-of-total\x20rows\x20coexist\x20exactly';default:return'mode\x20value\x20out\x20of\x20the\x20on-chain\x20range\x20(0/1/2/3)\x20—\x20the\x20configuration\x20cannot\x20exist\x20on-chain';}}function classificationRisks(a,b,c){const d=[];a['forEach']((e,f)=>{const g=[...new Set(e['sharing']['map'](j=>j['mode']??0x0))],h=g['length']===0x1?g[0x0]:undefined;d['push']({'id':'R-ALC-S-01','level':'info','title':'Allocator\x20#'+f+'\x20of\x20'+c+':\x20'+(h!==undefined?MODE_NAME[h]??'mode\x20'+h:'mixed-mode')+'\x20allocation','description':'Unlocking\x20guard\x20'+(e['guard']??'(proposal\x20guard)')+'\x20triggers\x20this\x20allocator\x20—\x20'+modeSemantics(h,e)+'.\x20'+(e['sharing']['length']+'\x20recipient\x20row(s):\x20'+e['sharing']['map'](j=>''+j['who']+(j['value']?'='+j['value']:''))['join'](',\x20')+'.')+(b&&b!=='0'?'\x20The\x20allocation\x20template\x20enforces\x20a\x20minimum\x20run\x20amount\x20of\x20'+b+'.':''),'evidence':'allocator='+f+'\x20guard='+(e['guard']??'?')+'\x20sharing_rows='+e['sharing']['length'],'affected_stakeholders':['owner','buyer'],'confidence':'exact'});});for(let e=0x0;e<a['length'];e++){const f=a[e]['sharing']['filter'](h=>h['mode']===0x1);if(f['length']===0x0)continue;const g=f['reduce']((h,j)=>h+Number(j['value']??0x0),0x0);g!==0x2710&&d['push']({'id':'R-ALC-S-05','level':'info','title':'Allocator\x20#'+e+'\x20of\x20'+c+':\x20rated\x20rows\x20sum\x20to\x20'+g+'/10000','description':'Rate\x20rows\x20are\x20fractions\x20of\x20the\x20execution-time\x20surplus\x20(basis\x2010000).\x20A\x20sum\x20of\x20'+g+'\x20leaves\x20'+(0x2710-g)+'/10000\x20of\x20the\x20surplus\x20unmoved\x20by\x20this\x20allocator\x20per\x20run\x20—\x20intentional\x20residue\x20or\x20a\x20configuration\x20slip?','evidence':'allocator='+e+'\x20rate_sum='+g,'affected_stakeholders':['owner','buyer'],'confidence':'exact'});}return d;}function duplicateGuardRisks(a,b){const c=new Map(),d=[];return a['forEach']((e,f)=>{if(!e['guard'])return;const g=c['get'](e['guard']);g!==undefined?d['push']({'id':'R-ALC-S-04','level':'high','title':'Allocator\x20#'+f+'\x20of\x20'+b+'\x20can\x20never\x20run\x20(duplicate\x20guard)','description':'Guard\x20'+e['guard']+'\x20already\x20drives\x20allocator\x20#'+g+';\x20allocation\x20matches\x20the\x20FIRST\x20allocator\x20whose\x20guard\x20equals\x20the\x20unlocking\x20guard,\x20so\x20this\x20entry\x20is\x20dead\x20configuration\x20—\x20its\x20recipients\x20are\x20silently\x20unreachable.\x20Remove\x20it\x20or\x20give\x20it\x20a\x20distinct\x20guard.','evidence':'guard='+e['guard']+'\x20first='+g+'\x20duplicate='+f,'affected_stakeholders':['owner','buyer'],'confidence':'exact'}):c['set'](e['guard'],f);}),d;}function resolutionRisks(b,c,d){const f=[],g=new Set();for(const h of b){if(!h['guard'])continue;const i=resolveInViewport(h['guard'],d);if(i['status']!=='fetched'){if(g['has'](h['guard']))continue;g['add'](h['guard']);const j=i['status']==='masked'?'present\x20in\x20the\x20graph\x20but\x20ACCESS-GATED\x20for\x20the\x20current\x20viewer':i['status']==='unfetched'?'in\x20the\x20graph\x20but\x20its\x20state\x20is\x20\x22'+i['state']+'\x22':'OUTSIDE\x20the\x20witnessed\x20topology';f['push']({'id':'R-ALC-S-02','level':'medium','title':'Allocator\x20guard\x20unresolved\x20—\x20allocation\x20semantics\x20incomplete','description':'Guard\x20'+h['guard']+'\x20of\x20'+c+'\x20is\x20'+j+':\x20what\x20unlocks\x20this\x20allocator,\x20and\x20therefore\x20when\x20money\x20moves,\x20cannot\x20be\x20assessed.\x20'+(i['status']==='absent'&&i['depthCapped']?'The\x20expansion\x20depth\x20budget\x20was\x20exhausted\x20(default\x20depth\x20is\x204);\x20request\x20a\x20deeper\x20topology\x20read.':i['status']==='absent'?'Request\x20a\x20deeper\x20or\x20wider\x20topology\x20read\x20(raise\x20the\x20exploration\x20depth\x20beyond\x20the\x20default\x204,\x20or\x20widen\x20the\x20expanded\x20edge\x20set).':i['status']==='masked'?'Widen\x20viewer\x20access\x20and\x20re-analyze.':'Retry\x20once\x20the\x20object\x20fetch\x20succeeds.'),'evidence':'guard='+h['guard']+'\x20resolution='+i['status'],'affected_stakeholders':['owner','buyer'],'confidence':'bounded'});continue;}for(const k of d['graph']['out']['get'](h['guard'])??[]){if(k['schema']!=='guard.relies')continue;const l=resolveInViewport(k['to'],d);if(l['status']==='fetched')continue;f['push']({'id':'R-ALC-S-03','level':'medium','title':'Sub-guard\x20of\x20an\x20allocator\x20guard\x20unresolved\x20—\x20condition\x20semantics\x20incomplete','description':'The\x20allocator\x20guard\x20'+h['guard']+'\x20of\x20'+c+'\x20relies\x20on\x20sub-guard\x20'+k['to']+',\x20which\x20is\x20not\x20witnessed\x20as\x20fetched:\x20part\x20of\x20the\x20unlock\x20condition\x20is\x20invisible,\x20so\x20sufficiency\x20of\x20the\x20allocation\x20conditions\x20cannot\x20be\x20confirmed.','evidence':'guard='+h['guard']+'\x20relies='+k['to']+'\x20resolution='+l['status'],'affected_stakeholders':['owner','buyer'],'confidence':'bounded'});}}return f;}function anchoringRisks(a,b){if(a['forObject']||a['forGuard'])return[];return[{'id':'R-ALC-S-06','level':'info','title':b+'\x20is\x20not\x20anchored\x20to\x20a\x20business\x20object','description':'No\x20for_object/for_guard\x20anchoring\x20is\x20configured:\x20ANY\x20payment\x20routed\x20to\x20this\x20allocation\x20(from\x20any\x20source\x20that\x20learns\x20its\x20address)\x20unlocks\x20the\x20allocation\x20guards\x20—\x20the\x20split\x20runs\x20regardless\x20of\x20business\x20context.\x20Anchoring\x20is\x20enforced\x20ONLY\x20when\x20set;\x20leave\x20unanchored\x20only\x20when\x20open\x20routing\x20is\x20intended.','evidence':'for_object=none\x20for_guard=none','affected_stakeholders':['owner','buyer'],'confidence':'exact'}];}function analyzeAllocationSemantics(a,b,c,d){const e=[];if(a['length']===0x0)return e['push']({'id':'R-ALC-S-01','level':'info','title':b['subject']+'\x20has\x20no\x20allocators','description':'No\x20allocator\x20is\x20configured\x20—\x20no\x20split\x20runs\x20when\x20payments\x20settle;\x20funds\x20stay\x20in\x20the\x20host\x20object.\x20Configure\x20allocators\x20if\x20proceeds\x20must\x20be\x20distributed.','evidence':'allocators=0','affected_stakeholders':['owner'],'confidence':'exact'}),e;return e['push'](...classificationRisks(a,b['threshold'],b['subject'])),e['push'](...duplicateGuardRisks(a,b['subject'])),e['push'](...resolutionRisks(a,b['subject'],d)),b['anchored']===![]&&e['push'](...anchoringRisks({'allocators':a},b['subject'])),e;}export function analyzeServiceAllocationSemantics(a,b,c){return analyzeAllocationSemantics(serviceAllocatorsOf(a),{'subject':'service\x20'+b['id']+'\x20order_allocators'},b,c);}export function analyzeAllocationInstanceSemantics(a,b,c){const d=allocationInstanceFactsOf(a);return analyzeAllocationSemantics(d['allocators'],{'subject':'allocation\x20'+b['id'],...d['threshold']?{'threshold':d['threshold']}:{},'anchored':d['forObject']===undefined&&d['forGuard']===undefined?![]:!![]},b,c);}
1
+ import{resolveInViewport}from'./repository-write-semantics.js';export const SERVICE_ALLOCATION_SEMANTICS_ANALYZER_ID='SA1';export const ALLOCATION_SEMANTICS_ANALYZER_ID='SA2';function asRecord(a){return a!=null&&typeof a==='object'&&!Array['isArray'](a)?a:undefined;}function recipientOf(a){if(typeof a==='string')return'entity:'+a['toLowerCase']();const b=asRecord(a);if(b){if(b['signer']!=null)return'signer';const c=b['guard_identifier']??b['guardIdentifier']??b['identifier'];if(c!=null)return'guard_identifier:'+String(c);const d=b['address']??b['entity'];if(typeof d==='string')return'entity:'+d['toLowerCase']();}if(typeof a==='number')return'guard_identifier:'+a;return'(unknown\x20recipient)';}function modeOf(a){const b=typeof a==='number'?a:typeof a==='string'?Number(a):NaN;return Number['isNaN'](b)?undefined:b;}function normalizeSharing(a){if(!Array['isArray'](a))return[];return a['map'](b=>{const c=b??{};return{'who':recipientOf(c['who']??c['recipient']),...c['sharing']!=null?{'value':String(c['sharing'])}:{},...modeOf(c['mode'])!==undefined?{'mode':modeOf(c['mode'])}:{}};});}function normalizeAllocators(a){if(!Array['isArray'](a))return[];return a['map'](b=>{const c=b??{},d=normalizeSharing(c['sharing']),e=modeOf(c['mode']),f=e!==undefined?d['map'](g=>g['mode']===undefined?{...g,'mode':e}:g):d;return{...typeof c['guard']==='string'&&c['guard']?{'guard':c['guard']['toLowerCase']()}:{},'sharing':f,...c['fix']!=null?{'fix':String(c['fix'])}:{},...c['max']!=null&&c['max']!==null?{'max':String(c['max'])}:{}};});}export function serviceAllocatorsOf(a){const b=asRecord(a['order_allocators']);if(!b)return[];return normalizeAllocators(b['allocators']);}export function allocationInstanceFactsOf(a){const b=asRecord(a['allocators']),c=asRecord(a['payment_info']),d=e=>typeof e==='string'&&e['length']>0x0?e['toLowerCase']():undefined;return{'allocators':normalizeAllocators(b?.['allocators']),...b&&b['threshold']!=null?{'threshold':String(b['threshold'])}:{},...c&&d(c['for_object'])?{'forObject':d(c['for_object'])}:{},...c&&d(c['for_guard'])?{'forGuard':d(c['for_guard'])}:{}};}const MODE_NAME={0x0:'amount',0x1:'rate',0x2:'surplus',0x3:'rate-gross'};function modeSemantics(a,b){switch(a){case 0x0:return'fixed-amount\x20mode:\x20the\x20allocator\x20moves\x20its\x20configured\x20total'+(b['fix']?'\x20(fix\x20'+b['fix']+')':'')+(b['max']?'\x20capped\x20at\x20'+b['max']:'')+';\x20a\x20run\x20with\x20insufficient\x20balance\x20aborts\x20the\x20whole\x20allocation';case 0x1:return'net\x20rate\x20mode:\x20each\x20row\x20moves\x20share/10000\x20of\x20the\x20EXECUTION-TIME\x20surplus\x20(balance\x20minus\x20the\x20fixed\x20part)\x20—\x20recipient\x20amounts\x20float\x20with\x20the\x20balance\x20at\x20unlock\x20time';case 0x2:return'surplus\x20mode:\x20the\x20row\x20receives\x20whatever\x20remains\x20after\x20the\x20fixed\x20and\x20rated\x20rows\x20are\x20served';case 0x3:return'rate-gross\x20mode:\x20each\x20row\x20moves\x20share/10000\x20of\x20the\x20FULL\x20pool\x20(or\x20the\x20max\x20cap\x20when\x20set)\x20with\x20the\x20fixed\x20part\x20NOT\x20removed\x20—\x20lets\x20fixed\x20Amount\x20rows\x20and\x20percentage-of-total\x20rows\x20coexist\x20exactly';default:return'mode\x20value\x20out\x20of\x20the\x20on-chain\x20range\x20(0/1/2/3)\x20—\x20the\x20configuration\x20cannot\x20exist\x20on-chain';}}function classificationRisks(a,b,c){const d=[];a['forEach']((e,f)=>{const g=[...new Set(e['sharing']['map'](j=>j['mode']??0x0))],h=g['length']===0x1?g[0x0]:undefined;d['push']({'id':'R-ALC-S-01','level':'info','title':'Allocator\x20#'+f+'\x20of\x20'+c+':\x20'+(h!==undefined?MODE_NAME[h]??'mode\x20'+h:'mixed-mode')+'\x20allocation','description':'Unlocking\x20guard\x20'+(e['guard']??'(proposal\x20guard)')+'\x20triggers\x20this\x20allocator\x20—\x20'+modeSemantics(h,e)+'.\x20'+(e['sharing']['length']+'\x20recipient\x20row(s):\x20'+e['sharing']['map'](j=>''+j['who']+(j['value']?'='+j['value']:''))['join'](',\x20')+'.')+(b&&b!=='0'?'\x20The\x20allocation\x20template\x20enforces\x20a\x20minimum\x20run\x20amount\x20of\x20'+b+'.':''),'evidence':'allocator='+f+'\x20guard='+(e['guard']??'?')+'\x20sharing_rows='+e['sharing']['length'],'affected_stakeholders':['owner','buyer'],'confidence':'exact'});});for(let e=0x0;e<a['length'];e++){const f=a[e]['sharing']['filter'](h=>h['mode']===0x1);if(f['length']===0x0)continue;const g=f['reduce']((h,j)=>h+Number(j['value']??0x0),0x0);g!==0x2710&&d['push']({'id':'R-ALC-S-05','level':'info','title':'Allocator\x20#'+e+'\x20of\x20'+c+':\x20rated\x20rows\x20sum\x20to\x20'+g+'/10000','description':'Rate\x20rows\x20are\x20fractions\x20of\x20the\x20execution-time\x20surplus\x20(basis\x2010000).\x20A\x20sum\x20of\x20'+g+'\x20leaves\x20'+(0x2710-g)+'/10000\x20of\x20the\x20surplus\x20unmoved\x20by\x20this\x20allocator\x20per\x20run\x20—\x20intentional\x20residue\x20or\x20a\x20configuration\x20slip?','evidence':'allocator='+e+'\x20rate_sum='+g,'affected_stakeholders':['owner','buyer'],'confidence':'exact'});}return d;}function duplicateGuardRisks(a,b){const c=new Map(),d=[];return a['forEach']((e,f)=>{if(!e['guard'])return;const g=c['get'](e['guard']);g!==undefined?d['push']({'id':'R-ALC-S-04','level':'high','title':'Allocator\x20#'+f+'\x20of\x20'+b+'\x20can\x20never\x20run\x20(duplicate\x20guard)','description':'Guard\x20'+e['guard']+'\x20already\x20drives\x20allocator\x20#'+g+';\x20allocation\x20fires\x20EVERY\x20allocator\x20whose\x20guard\x20equals\x20the\x20unlocking\x20guard\x20(allocation.move:366-368),\x20so\x20this\x20entry\x20STACKS\x20with\x20#'+g+'\x20on\x20the\x20same\x20call\x20—\x20each\x20fires\x20in\x20vector\x20order\x20against\x20the\x20shrinking\x20pool.\x20If\x20they\x20were\x20meant\x20as\x20alternative\x20paths,\x20give\x20this\x20entry\x20a\x20distinct\x20guard;\x20if\x20a\x20waterfall\x20was\x20intended,\x20verify\x20the\x20order\x20matches\x20the\x20payout\x20sequence.','evidence':'guard='+e['guard']+'\x20first='+g+'\x20duplicate='+f,'affected_stakeholders':['owner','buyer'],'confidence':'exact'}):c['set'](e['guard'],f);}),d;}function resolutionRisks(b,c,d){const f=[],g=new Set();for(const h of b){if(!h['guard'])continue;const i=resolveInViewport(h['guard'],d);if(i['status']!=='fetched'){if(g['has'](h['guard']))continue;g['add'](h['guard']);const j=i['status']==='masked'?'present\x20in\x20the\x20graph\x20but\x20ACCESS-GATED\x20for\x20the\x20current\x20viewer':i['status']==='unfetched'?'in\x20the\x20graph\x20but\x20its\x20state\x20is\x20\x22'+i['state']+'\x22':'OUTSIDE\x20the\x20witnessed\x20topology';f['push']({'id':'R-ALC-S-02','level':'medium','title':'Allocator\x20guard\x20unresolved\x20—\x20allocation\x20semantics\x20incomplete','description':'Guard\x20'+h['guard']+'\x20of\x20'+c+'\x20is\x20'+j+':\x20what\x20unlocks\x20this\x20allocator,\x20and\x20therefore\x20when\x20money\x20moves,\x20cannot\x20be\x20assessed.\x20'+(i['status']==='absent'&&i['depthCapped']?'The\x20expansion\x20depth\x20budget\x20was\x20exhausted\x20(default\x20depth\x20is\x204);\x20request\x20a\x20deeper\x20topology\x20read.':i['status']==='absent'?'Request\x20a\x20deeper\x20or\x20wider\x20topology\x20read\x20(raise\x20the\x20exploration\x20depth\x20beyond\x20the\x20default\x204,\x20or\x20widen\x20the\x20expanded\x20edge\x20set).':i['status']==='masked'?'Widen\x20viewer\x20access\x20and\x20re-analyze.':'Retry\x20once\x20the\x20object\x20fetch\x20succeeds.'),'evidence':'guard='+h['guard']+'\x20resolution='+i['status'],'affected_stakeholders':['owner','buyer'],'confidence':'bounded'});continue;}for(const k of d['graph']['out']['get'](h['guard'])??[]){if(k['schema']!=='guard.relies')continue;const l=resolveInViewport(k['to'],d);if(l['status']==='fetched')continue;f['push']({'id':'R-ALC-S-03','level':'medium','title':'Sub-guard\x20of\x20an\x20allocator\x20guard\x20unresolved\x20—\x20condition\x20semantics\x20incomplete','description':'The\x20allocator\x20guard\x20'+h['guard']+'\x20of\x20'+c+'\x20relies\x20on\x20sub-guard\x20'+k['to']+',\x20which\x20is\x20not\x20witnessed\x20as\x20fetched:\x20part\x20of\x20the\x20unlock\x20condition\x20is\x20invisible,\x20so\x20sufficiency\x20of\x20the\x20allocation\x20conditions\x20cannot\x20be\x20confirmed.','evidence':'guard='+h['guard']+'\x20relies='+k['to']+'\x20resolution='+l['status'],'affected_stakeholders':['owner','buyer'],'confidence':'bounded'});}}return f;}function anchoringRisks(a,b){if(a['forObject']||a['forGuard'])return[];return[{'id':'R-ALC-S-06','level':'info','title':b+'\x20is\x20not\x20anchored\x20to\x20a\x20business\x20object','description':'No\x20for_object/for_guard\x20anchoring\x20is\x20configured:\x20ANY\x20payment\x20routed\x20to\x20this\x20allocation\x20(from\x20any\x20source\x20that\x20learns\x20its\x20address)\x20unlocks\x20the\x20allocation\x20guards\x20—\x20the\x20split\x20runs\x20regardless\x20of\x20business\x20context.\x20Anchoring\x20is\x20enforced\x20ONLY\x20when\x20set;\x20leave\x20unanchored\x20only\x20when\x20open\x20routing\x20is\x20intended.','evidence':'for_object=none\x20for_guard=none','affected_stakeholders':['owner','buyer'],'confidence':'exact'}];}function analyzeAllocationSemantics(a,b,c,d){const e=[];if(a['length']===0x0)return e['push']({'id':'R-ALC-S-01','level':'info','title':b['subject']+'\x20has\x20no\x20allocators','description':'No\x20allocator\x20is\x20configured\x20—\x20no\x20split\x20runs\x20when\x20payments\x20settle;\x20funds\x20stay\x20in\x20the\x20host\x20object.\x20Configure\x20allocators\x20if\x20proceeds\x20must\x20be\x20distributed.','evidence':'allocators=0','affected_stakeholders':['owner'],'confidence':'exact'}),e;return e['push'](...classificationRisks(a,b['threshold'],b['subject'])),e['push'](...duplicateGuardRisks(a,b['subject'])),e['push'](...resolutionRisks(a,b['subject'],d)),b['anchored']===![]&&e['push'](...anchoringRisks({'allocators':a},b['subject'])),e;}export function analyzeServiceAllocationSemantics(a,b,c){return analyzeAllocationSemantics(serviceAllocatorsOf(a),{'subject':'service\x20'+b['id']+'\x20order_allocators'},b,c);}export function analyzeAllocationInstanceSemantics(a,b,c){const d=allocationInstanceFactsOf(a);return analyzeAllocationSemantics(d['allocators'],{'subject':'allocation\x20'+b['id'],...d['threshold']?{'threshold':d['threshold']}:{},'anchored':d['forObject']===undefined&&d['forGuard']===undefined?![]:!![]},b,c);}
@@ -1 +1 @@
1
- export const SERVICE_PERMISSIONS=[{'index':0x12c,'name':'SERVICE_NEW','description':'Create\x20new\x20Service','governed_operation':'create\x20a\x20new\x20Service','post_publish_mutability':'na'},{'index':0x12d,'name':'SERVICE_DESCRIPTION','description':'Modify\x20Service\x20description','governed_operation':'modify\x20the\x20Service\x20description','post_publish_mutability':'mutable'},{'index':0x12f,'name':'SERVICE_LOCATION','description':'Set\x20Service\x20location/URL','governed_operation':'set\x20the\x20Service\x20location/URL','post_publish_mutability':'mutable'},{'index':0x130,'name':'SERVICE_REPOSITORY','description':'Add/remove\x20Repository\x20references','governed_operation':'add/remove/clear\x20Repository\x20references','post_publish_mutability':'mutable'},{'index':0x131,'name':'SERVICE_SALES','description':'Add/set/remove/clear\x20sales\x20items','governed_operation':'add/set/remove/clear\x20sales\x20items','post_publish_mutability':'mutable'},{'index':0x132,'name':'SERVICE_MACHINE','description':'Bind/unbind\x20Machine\x20workflow\x20template','governed_operation':'bind/unbind\x20the\x20Machine\x20workflow\x20template','post_publish_mutability':'immutable'},{'index':0x133,'name':'SERVICE_BUY_GUARD','description':'Set/clear\x20buy\x20Guard\x20(post-publish\x20mutable)','governed_operation':'set/clear\x20the\x20buy_guard\x20check','post_publish_mutability':'mutable'},{'index':0x134,'name':'SERVICE_ARBITRATION','description':'Add/remove\x20Arbitration\x20references','governed_operation':'add/remove/clear\x20Arbitration\x20references','post_publish_mutability':'immutable'},{'index':0x135,'name':'SERVICE_CUSTOMER_INFO_REQUIRED','description':'Set\x20customer\x20required\x20info\x20fields','governed_operation':'set\x20customer\x20required\x20info\x20fields','post_publish_mutability':'mutable'},{'index':0x136,'name':'SERVICE_PAUSE','description':'Pause/resume\x20Service\x20(block\x20new\x20orders)','governed_operation':'pause/resume\x20the\x20Service','post_publish_mutability':'mutable'},{'index':0x137,'name':'SERVICE_PUBLISH','description':'Publish\x20Service\x20(IRREVERSIBLE)','governed_operation':'publish\x20the\x20Service\x20(irreversible)','post_publish_mutability':'one_shot'},{'index':0x138,'name':'SERVICE_DISCOUNT','description':'Issue/discount_destroy\x20discount\x20coupons','governed_operation':'issue/destroy\x20discount\x20coupons','post_publish_mutability':'mutable'},{'index':0x139,'name':'SERVICE_ORDER_ALLOCATOR','description':'Set\x20order\x20allocator\x20strategy','governed_operation':'set\x20the\x20order_allocators\x20strategy','post_publish_mutability':'immutable'},{'index':0x13a,'name':'SERVICE_COMPENSATION_FUND_WITHDRAW','description':'Withdraw\x20compensation\x20fund\x20(time-locked)','governed_operation':'withdraw\x20from\x20the\x20compensation_fund\x20(time-locked)','post_publish_mutability':'locked_by_duration'},{'index':0x13b,'name':'SERVICE_COMPENSATION_FUND_DEPOSIT','description':'Deposit\x20to\x20compensation\x20fund','governed_operation':'deposit\x20to\x20the\x20compensation_fund','post_publish_mutability':'mutable'},{'index':0x13c,'name':'SERVICE_COMPENSATION_FUND_RECEIVE','description':'Receive\x20compensation\x20fund\x20(arbitration\x20payout)','governed_operation':'receive\x20the\x20compensation_fund\x20payout\x20(arbitration\x20payout)','post_publish_mutability':'mutable'},{'index':0x13d,'name':'SERVICE_COMPENSATION_LOCK_DURATION_ADD','description':'Extend\x20setting_lock_duration\x20(only-increase)','governed_operation':'extend\x20setting_lock_duration\x20(only-increase)','post_publish_mutability':'mutable'},{'index':0x13e,'name':'SERVICE_REWARD','description':'Add/remove\x20Reward\x20references\x20(remove/clear\x20time-locked)','governed_operation':'add/remove/clear\x20Reward\x20references','post_publish_mutability':'locked_by_duration'},{'index':0x13f,'name':'SERVICE_OWNER_RECEIVE','description':'Receive\x20Payment/objects\x20to\x20owner','governed_operation':'receive\x20Payments/objects\x20to\x20owner','post_publish_mutability':'mutable'},{'index':0x140,'name':'SERVICE_UM','description':'Bind/unbind\x20Contact\x20as\x20UM','governed_operation':'bind/unbind\x20Contact\x20as\x20UM','post_publish_mutability':'mutable'},{'index':0x141,'name':'SERVICE_ARB_STATEMENT','description':'Append\x20seller\x20statement\x20to\x20an\x20Arb\x20case\x20(event-only)','governed_operation':'append\x20seller\x20text\x20to\x20a\x20case\x20against\x20an\x20order\x20of\x20this\x20service\x20(ArbStatementEvent;\x20no\x20Arb\x20state\x20change)','post_publish_mutability':'mutable'}];export const SERVICE_ORDER_FLOW_STAGES=[{'stage':0x1,'name':'pre_check','preconditions':['Service.bPublished\x20==\x20true\x20(else\x20E_NOT_PUBLISHED,\x20service:7)','Service.bPaused\x20==\x20false\x20(else\x20E_PAUSED,\x20service:19)','buy_guard\x20(if\x20set)\x20added\x20to\x20guards[]\x20list\x20for\x20verification'],'side_effects':[],'always_executed':!![]},{'stage':0x2,'name':'wip_verify','preconditions':['buy.items\x20non-empty','Each\x20item.name\x20matches\x20a\x20sale\x20in\x20Service.sales\x20(else\x20E_SALE_ITEM_NOT_FOUND,\x20service:32)','sale.suspension\x20==\x20false\x20(else\x20E_SALE_SUSPENDED)'],'side_effects':['If\x20buyer\x20passes\x20empty\x20wip_hash,\x20SDK\x20auto-fills\x20with\x20sale.wip_hash','verifiedWipUrls\x20Set\x20avoids\x20re-verifying\x20same\x20WIP\x20URL\x20across\x20items','verify_wip()\x20fetches\x20WIP\x20file\x20and\x20compares\x20hash\x20(else\x20E_WIP_HASH_NOT_MATCH)'],'always_executed':!![]},{'stage':0x3,'name':'quote','preconditions':['All\x20items\x20have\x20valid\x20sale\x20+\x20wip_hash\x20match','stock\x20>=\x20purchase\x20quantity\x20(else\x20E_STOCK_NOT_ENOUGH,\x20service:16)','discount\x20object\x20(if\x20used)\x20is\x20valid\x20and\x20within\x20its\x20[time_start,\x20time_end]\x20window\x20(else\x20E_DISCOUNT_TIME_INVALID)'],'side_effects':['The\x20quote\x20step\x20computes\x20the\x20total\x20price\x20(with\x20discount\x20if\x20applicable)','⚠️\x20Stock\x20is\x20deducted\x20(split)\x20—\x20side\x20effect\x20is\x20NOT\x20auto-rolled-back\x20on\x20later\x20failure','The\x20on-chain\x20quote\x20call\x20executes\x20(the\x20discount\x20path\x20validates\x20the\x20Clock\x20time-window\x20check)'],'always_executed':!![]},{'stage':0x4,'name':'create_order','preconditions':['Quote\x20object\x20from\x20stage\x203','Registrar\x20+\x20Clock\x20objects\x20available'],'side_effects':['The\x20atomic\x20on-chain\x20buy\x20call\x20executes\x20(passport-gated\x20variant\x20supported)','Order\x20object\x20created\x20(builder=customer,\x20service=Service.id)','Order.id\x20recorded\x20for\x20stages\x205-7'],'always_executed':!![]},{'stage':0x5,'name':'create_allocation','preconditions':['Service.order_allocators\x20is\x20Some\x20(configured)','Order\x20from\x20stage\x204','CoinParam\x20for\x20total_pay\x20matches\x20Service<T>\x20type'],'side_effects':['The\x20on-chain\x20allocation\x20call\x20executes','Allocation\x20object\x20created\x20(first-match-wins\x20fund\x20distribution)','Order.allocation\x20=\x20Allocation\x20address'],'always_executed':!![]},{'stage':0x6,'name':'create_progress','preconditions':['Service.machine\x20is\x20Some\x20(machine\x20bound)','Order\x20from\x20stage\x204','Machine\x20from\x20Service.machine'],'side_effects':['The\x20on-chain\x20progress-creation\x20call\x20executes','Progress\x20object\x20created\x20(Progress.machine\x20=\x20Service.machine,\x20Progress.task\x20=\x20Order.id)'],'always_executed':![]},{'stage':0x7,'name':'post_actions','preconditions':['Order/Allocation/Progress\x20objects\x20from\x20stages\x204-6'],'side_effects':['Attach\x20agents\x20to\x20the\x20order\x20(if\x20order_new.agents\x20provided)','order_required_info_update\x20(if\x20order_required_info\x20provided)','Transfer\x20Order\x20ownership\x20(if\x20transfer\x20provided\x20—\x20sets\x20new\x20Order\x20owner)','namedNewOrder\x20/\x20namedNewAllocation\x20/\x20namedNewProgress\x20(local\x20naming)'],'always_executed':![]},{'stage':0x8,'name':'return_result','preconditions':['All\x20preceding\x20stages\x20succeeded'],'side_effects':['Returns\x20BuyResult\x20{\x20order,\x20allocation?,\x20progress?\x20}','Caller\x20proceeds\x20to\x20sign\x20+\x20submit\x20transaction'],'always_executed':!![]}];export const SERVICE_CROSS_OBJECT_BINDINGS=[{'object':'Machine','field':'machine','required':![],'locked_after_publish':!![],'notes':'Workflow\x20template;\x20post-publish\x20immutable\x20(F-S-20).\x20Progress.machine\x20inherits\x20this\x20value.'},{'object':'Guard','field':'buy_guard','required':![],'locked_after_publish':![],'notes':'Buyer\x20eligibility\x20guard;\x20post-publish\x20STILL\x20MUTABLE\x20(unusual\x20—\x20see\x20F-S-26)'},{'object':'Allocation','field':'order_allocators','required':!![],'locked_after_publish':!![],'notes':'Order\x20fund\x20distribution\x20strategy;\x20publish\x20prerequisite\x20(F-S-18).\x20Post-publish\x20immutable\x20(F-S-22).'},{'object':'Arbitration','field':'arbitrations','required':![],'locked_after_publish':![],'notes':'Dispute\x20handlers;\x20required\x20if\x20compensation_fund\x20>\x200\x20(F-S-19).\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish\x20(F-S-21).'},{'object':'Repository','field':'repositories','required':![],'locked_after_publish':![],'notes':'Shared\x20data\x20stores;\x20mutable\x20post-publish'},{'object':'Reward','field':'rewards','required':![],'locked_after_publish':![],'notes':'Marketing\x20incentives;\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish\x20(F-S-24)'},{'object':'Contact','field':'um','required':![],'locked_after_publish':![],'notes':'User\x20Manager\x20(Contact\x20object);\x20mutable\x20post-publish'},{'object':'Treasury','field':'(indirect\x20via\x20order_allocators.sharing.who=Entity)','required':![],'locked_after_publish':![],'notes':'Treasury\x20is\x20referenced\x20by\x20Allocation.sharing.who,\x20not\x20by\x20Service\x20directly'}];export const SERVICE_SCENES=[{'id':'service_retail','name':'Retail\x20e-commerce\x20Service','category':'retail','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL','set\x20customer\x20required\x20info\x20fields'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','pause/resume\x20the\x20Service\x20(310)','add/set/remove/clear\x20sales\x20items\x20(305)','set\x20the\x20order_allocators\x20strategy\x20(313)','set/clear\x20the\x20buy_guard\x20check\x20(307)','issue/destroy\x20discount\x20coupons\x20(312)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set\x20(F-S-18,\x20E_NO_ALLOCATOR)','If\x20compensation_fund\x20>\x200,\x20arbitrations\x20must\x20be\x20non-empty\x20(F-S-19)'],'common_patterns':['Multi-tier\x20pricing\x20via\x20sales[]\x20(Standard/Premium/Enterprise)','WIP\x20hash\x20per\x20sale\x20item\x20for\x20tamper-proof\x20product\x20info','buy_guard\x20for\x20KYC\x20whitelist\x20during\x20pre-sale,\x20then\x20null\x20for\x20public\x20sale','compensation_fund\x20deposited\x20before\x20publish\x20+\x20arbitrations\x20configured'],'recommended_templates':['T-S-01','T-S-06']},{'id':'service_rental','name':'Rental\x20Service\x20(short/long-term)','category':'rental','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','add/set\x20sales\x20items\x20(305)','bind\x20the\x20Machine\x20workflow\x20(306)\x20—\x20for\x20rental\x20workflow','add\x20Arbitration\x20references\x20(308)\x20—\x20for\x20deposit\x20disputes'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set','machine\x20recommended\x20(rental\x20workflow\x20with\x20deposit/return\x20stages)','arbitrations\x20recommended\x20(deposit\x20refund\x20disputes)'],'common_patterns':['Machine\x20workflow\x20with\x20\x27Deposit\x20→\x20Use\x20→\x20Return\x20→\x20Refund\x27\x20nodes','compensation_fund\x20holds\x20deposit\x20guarantees','buy_guard\x20verifies\x20renter\x20identity/KYC','stock=1\x20per\x20rental\x20item\x20(unique\x20items)'],'recommended_templates':['T-S-02','T-S-04']},{'id':'service_subscription','name':'Subscription\x20Service\x20(recurring)','category':'subscription','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','add/set\x20sales\x20items\x20(305)','issue\x20discount\x20coupons\x20(312)\x20—\x20promotional\x20rates','add\x20Reward\x20references\x20(318)\x20—\x20loyalty\x20rewards'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Tiered\x20plans\x20(Free/Pro/Enterprise)\x20as\x20sales[]','Discount\x20coupons\x20for\x20trial\x20periods','Rewards\x20for\x20long-term\x20subscribers','Renewal\x20handled\x20by\x20repeat\x20orders\x20(no\x20native\x20recurring\x20billing)'],'recommended_templates':['T-S-03']},{'id':'service_workflow','name':'Workflow-bound\x20Service\x20(machine-bound)','category':'workflow','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['bind\x20the\x20Machine\x20workflow\x20(306)','publish\x20the\x20Service\x20(311)','set\x20the\x20order_allocators\x20strategy\x20(313)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set','machine\x20must\x20be\x20published\x20before\x20binding','machine\x20recommended\x20for\x20any\x20multi-stage\x20service\x20delivery'],'common_patterns':['Machine\x20defines\x20Pay\x20→\x20Confirm\x20→\x20Deliver\x20→\x20Sign-off\x20nodes','Progress\x20created\x20per\x20order\x20(stage\x206\x20of\x20buy\x20flow)','Named\x20operators\x20assigned\x20per\x20Forward\x20in\x20Machine','Service.paused\x20does\x20NOT\x20affect\x20already-created\x20Progress\x20(existing\x20orders\x20continue)'],'recommended_templates':['T-S-04']},{'id':'service_arbitration','name':'Arbitration-bound\x20Service\x20(dispute-ready)','category':'arbitration','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add\x20Arbitration\x20references\x20(308)','deposit\x20to\x20the\x20compensation_fund\x20(315)','extend\x20setting_lock_duration\x20(317)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['If\x20compensation_fund\x20>\x200,\x20arbitrations\x20must\x20be\x20non-empty\x20(F-S-19)','Arbitration\x20objects\x20must\x20be\x20created\x20before\x20binding','compensation_fund_add\x20before\x20publish\x20recommended\x20(else\x20post-publish\x20deposit\x20still\x20possible)'],'common_patterns':['2-3\x20Arbitration\x20objects\x20(different\x20arb\x20committees\x20for\x20different\x20dispute\x20types)','compensation_fund\x20deposited\x20as\x20%\x20of\x20expected\x20order\x20volume','setting_lock_duration\x20extended\x20by\x20owner\x20to\x20build\x20customer\x20trust','Arbitration\x20compensation\x20payout\x20triggered\x20by\x20the\x20arbitration\x20result\x20(not\x20by\x20Service\x20directly)'],'recommended_templates':['T-S-05','T-S-06']},{'id':'service_compensation_fund','name':'Compensation\x20Fund\x20Service\x20(embedded\x20balance)','category':'compensation_fund','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['deposit\x20to\x20the\x20compensation_fund\x20(315)','withdraw\x20from\x20the\x20compensation_fund\x20(314)\x20—\x20time-locked\x20after\x20publish','receive\x20the\x20compensation_fund\x20payout\x20(316)\x20—\x20arbitration\x20payout\x20(always\x20mutable)','extend\x20setting_lock_duration\x20(317)\x20—\x20extend\x20lock'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['compensation_fund\x20>\x200\x20→\x20arbitrations\x20non-empty\x20(F-S-19)','compensation_fund\x20coin\x20type\x20must\x20match\x20Service<T>\x20type\x20parameter'],'common_patterns':['Fund\x20inflow:\x20compensation_fund_add\x20(315)\x20—\x20always\x20mutable','Fund\x20outflow:\x20compensation_fund_withdraw\x20(314)\x20—\x20requires\x20bPaused\x20+\x20lock_duration\x20expired','Fund\x20receive:\x20compensation_fund_receive\x20(316)\x20—\x20arbitration\x20payout,\x20always\x20mutable','Fund\x20consumer:\x20arbitration\x20compensation\x20payout\x20(driven\x20by\x20arb\x20result)','Distinct\x20from\x20Treasury:\x20Service-internal,\x20arbitration-bound,\x20lock-protected'],'recommended_templates':['T-S-06']},{'id':'service_reward','name':'Reward-attached\x20Service\x20(marketing)','category':'reward','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add/remove/clear\x20Reward\x20references\x20(318)\x20—\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish','issue/destroy\x20discount\x20coupons\x20(312)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Rewards\x20added\x20post-publish\x20(always\x20allowed;\x20remove/clear\x20is\x20time-locked\x20after\x20publish)','Reward\x20objects\x20must\x20exist\x20before\x20binding\x20(queryObjectsWithType\x20validation)','MAX_REWARD_COUNT\x20=\x2020\x20per\x20Service','Reward\x20remove/clear\x20requires\x20Service\x20paused\x20+\x20setting_lock_duration\x20elapsed\x20(protects\x20customer\x20expectations)'],'recommended_templates':['T-S-08']},{'id':'service_arbitration_binding','name':'Arbitration\x20Binding\x20Service\x20(post-publish\x20immutable)','category':'arbitration','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add\x20Arbitration\x20references\x20(308)\x20—\x20pre-publish\x20only','remove\x20an\x20Arbitration\x20reference\x20(308)\x20—\x20pre-publish\x20only','clear\x20Arbitration\x20references\x20(308)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['MAX_ARBITRATION_COUNT\x20=\x2020\x20per\x20Service\x20(F-S-04)','Each\x20Arbitration\x20object\x20must\x20be\x20valid\x20(queryObjectsWithType\x20validation)','Arbitration\x20bound\x20=\x20locked\x20post-publish\x20(F-S-21).\x20To\x20change:\x20create\x20new\x20Service.'],'common_patterns':['Pre-publish:\x20set\x201-3\x20Arbitration\x20objects\x20for\x20different\x20dispute\x20scopes','Post-publish:\x20immutable\x20—\x20clone\x20Service\x20if\x20change\x20needed','⚠️\x20Data\x20inconsistency:\x20dynamic-pricing.ts\x20marks\x20arbitrations\x20as\x20mutable,\x20but\x20SDK\x20blocks\x20it\x20(F-S-21)'],'recommended_templates':['T-S-05']},{'id':'service_buy_guard','name':'Buy\x20Guard\x20Service\x20(post-publish\x20mutable\x20guard)','category':'buy_guard','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['bind\x20the\x20buy_guard\x20Guard\x20(307)','clear\x20the\x20buy_guard\x20Guard\x20(307)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Pre-sale\x20phase:\x20buy_guard\x20=\x20whitelist\x20Guard\x20(KYC\x20verified\x20buyers\x20only)','Public\x20sale:\x20buy_guard\x20=\x20null\x20(anyone\x20can\x20buy)','Restricted\x20phase:\x20buy_guard\x20=\x20KYC\x20Guard\x20(compliance)','⚠️\x20buy_guard\x20is\x20the\x20ONLY\x20publish-locked-field\x20exception\x20—\x20still\x20mutable\x20post-publish','buy_guard\x20verification\x20happens\x20at\x20Stage\x201\x20of\x20buy\x20flow\x20(pre_check)'],'recommended_templates':['T-S-01']},{'id':'service_order_allocator','name':'Order\x20Allocator\x20Service\x20(fund\x20distribution\x20config)','category':'order_allocator','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['set\x20the\x20order_allocators\x20strategy\x20(313)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)\x20—\x20requires\x20order_allocators\x20(F-S-18)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20MUST\x20be\x20set\x20(F-S-18,\x20E_NO_ALLOCATOR)','Allocators.sharing.who\x20can\x20reference\x20Treasury\x20addresses\x20(indirect\x20Treasury\x20binding)','MAX_SHARING_COUNT\x20=\x20100\x20per\x20allocator'],'common_patterns':['Multi-party\x20split:\x20merchant\x2080%\x20/\x20platform\x2010%\x20/\x20logistics\x2010%','Threshold-based:\x20different\x20allocators\x20for\x20different\x20order\x20sizes','Guard-bound\x20allocator:\x20allocation\x20execution\x20requires\x20Guard\x20verification','Post-publish\x20immutable\x20—\x20clone\x20Service\x20to\x20change\x20allocation\x20strategy'],'recommended_templates':['T-S-08']},{'id':'service_dynamic_pricing','name':'Dynamic\x20Pricing\x20Service\x20(discount-driven)','category':'dynamic_pricing','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['issue\x20discount\x20coupons\x20(312)','add/set\x20sales\x20items\x20(305)\x20—\x20adjust\x20base\x20prices','remove\x20sales\x20items\x20(305)\x20—\x20remove\x20deprecated\x20SKUs'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Discount\x20types:\x200=rates\x20(basis\x20points,\x20per\x2010000),\x201=minus\x20(direct\x20deduction)','MAX_DISCOUNT_COUNT_ONCE\x20=\x201000\x20per\x20issue\x20call','MAX_DISCOUNT_RECEIVER_ONCE\x20=\x201000\x20receivers\x20per\x20call','MAX_DISCOUNT_TOTAL_COUNT\x20=\x2020000\x20total\x20coupons','discount_destroy:\x20holder-only\x20(no\x20SERVICE_DISCOUNT\x20permission\x20needed)'],'recommended_templates':['T-S-07']},{'id':'service_multi_allocator','name':'Multi-Allocator\x20Service\x20(tiered\x20fund\x20distribution)','category':'multi_allocator','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['set\x20the\x20order_allocators\x20strategy\x20(313)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20MUST\x20be\x20set','Each\x20allocator\x20has\x20its\x20own\x20Guard\x20+\x20sharing\x20+\x20threshold','First-match-wins:\x20first\x20allocator\x20whose\x20threshold\x20is\x20met\x20handles\x20the\x20order'],'common_patterns':['Tier\x201\x20(small\x20orders):\x20single-recipient\x20allocator\x20(low\x20fee)','Tier\x202\x20(medium\x20orders):\x20two-recipient\x20split\x20(merchant\x20+\x20platform)','Tier\x203\x20(large\x20orders):\x20three-recipient\x20split\x20(merchant\x20+\x20platform\x20+\x20logistics)','Each\x20tier\x20can\x20have\x20its\x20own\x20Guard\x20for\x20execution\x20authorization'],'recommended_templates':['T-S-08']}];export const SERVICE_LEDGER_VERSION='1.0.0';export function getScenesByCategory(a){return SERVICE_SCENES['filter'](b=>b['category']===a);}export function findSceneById(a){return SERVICE_SCENES['find'](b=>b['id']===a);}export function getServicePermissionByIndex(a){return SERVICE_PERMISSIONS['find'](b=>b['index']===a);}export function isServicePermission(a){return getServicePermissionByIndex(a)!==undefined;}export function getPermissionsByMutability(a){return SERVICE_PERMISSIONS['filter'](b=>b['post_publish_mutability']===a);}export function getImmutablePostPublishPermissions(){return SERVICE_PERMISSIONS['filter'](a=>a['post_publish_mutability']==='immutable'||a['post_publish_mutability']==='one_shot');}export function getLockedByDurationPermissions(){return SERVICE_PERMISSIONS['filter'](a=>a['post_publish_mutability']==='locked_by_duration');}export function inferSceneFromIntent(a){const b=a['toLowerCase'](),c=[['retail','retail'],['ecommerce','retail'],['rental','rental'],['rent','rental'],['short-term\x20rental','rental'],['long-term\x20rental','rental'],['subscription','subscription'],['subscribe','subscription'],['workflow','workflow'],['machine-bound','workflow'],['arbitration','arbitration'],['dispute','arbitration'],['compensation','compensation_fund'],['compensation_fund','compensation_fund'],['reward','reward'],['marketing','reward'],['buy_guard','buy_guard'],['kyc','buy_guard'],['whitelist','buy_guard'],['allocator','order_allocator'],['discount','dynamic_pricing'],['coupon','dynamic_pricing'],['multi-allocator','multi_allocator'],['tiered','multi_allocator']];for(const [d,e]of c){if(b['includes'](d)){const f=getScenesByCategory(e);if(f['length']>0x0)return f[0x0];}}if(b['includes']('service'))return findSceneById('service_retail');return undefined;}export function getAllServiceScenes(){return[...SERVICE_SCENES];}export function getServiceScenesCount(){return SERVICE_SCENES['length'];}export function getServicePermissionsCount(){return SERVICE_PERMISSIONS['length'];}export function getOrderFlowStage(a){return SERVICE_ORDER_FLOW_STAGES['find'](b=>b['stage']===a);}export function getCrossObjectBindings(){return[...SERVICE_CROSS_OBJECT_BINDINGS];}
1
+ export const SERVICE_PERMISSIONS=[{'index':0x12c,'name':'SERVICE_NEW','description':'Create\x20new\x20Service','governed_operation':'create\x20a\x20new\x20Service','post_publish_mutability':'na'},{'index':0x12d,'name':'SERVICE_DESCRIPTION','description':'Modify\x20Service\x20description','governed_operation':'modify\x20the\x20Service\x20description','post_publish_mutability':'mutable'},{'index':0x12f,'name':'SERVICE_LOCATION','description':'Set\x20Service\x20location/URL','governed_operation':'set\x20the\x20Service\x20location/URL','post_publish_mutability':'mutable'},{'index':0x130,'name':'SERVICE_REPOSITORY','description':'Add/remove\x20Repository\x20references','governed_operation':'add/remove/clear\x20Repository\x20references','post_publish_mutability':'mutable'},{'index':0x131,'name':'SERVICE_SALES','description':'Add/set/remove/clear\x20sales\x20items','governed_operation':'add/set/remove/clear\x20sales\x20items','post_publish_mutability':'mutable'},{'index':0x132,'name':'SERVICE_MACHINE','description':'Bind/unbind\x20Machine\x20workflow\x20template','governed_operation':'bind/unbind\x20the\x20Machine\x20workflow\x20template','post_publish_mutability':'immutable'},{'index':0x133,'name':'SERVICE_BUY_GUARD','description':'Set/clear\x20buy\x20Guard\x20(post-publish\x20mutable)','governed_operation':'set/clear\x20the\x20buy_guard\x20check','post_publish_mutability':'mutable'},{'index':0x134,'name':'SERVICE_ARBITRATION','description':'Add/remove\x20Arbitration\x20references','governed_operation':'add/remove/clear\x20Arbitration\x20references','post_publish_mutability':'immutable'},{'index':0x135,'name':'SERVICE_CUSTOMER_INFO_REQUIRED','description':'Set\x20customer\x20required\x20info\x20fields','governed_operation':'set\x20customer\x20required\x20info\x20fields','post_publish_mutability':'mutable'},{'index':0x136,'name':'SERVICE_PAUSE','description':'Pause/resume\x20Service\x20(block\x20new\x20orders)','governed_operation':'pause/resume\x20the\x20Service','post_publish_mutability':'mutable'},{'index':0x137,'name':'SERVICE_PUBLISH','description':'Publish\x20Service\x20(IRREVERSIBLE)','governed_operation':'publish\x20the\x20Service\x20(irreversible)','post_publish_mutability':'one_shot'},{'index':0x138,'name':'SERVICE_DISCOUNT','description':'Issue/discount_destroy\x20discount\x20coupons','governed_operation':'issue/destroy\x20discount\x20coupons','post_publish_mutability':'mutable'},{'index':0x139,'name':'SERVICE_ORDER_ALLOCATOR','description':'Set\x20order\x20allocator\x20strategy','governed_operation':'set\x20the\x20order_allocators\x20strategy','post_publish_mutability':'immutable'},{'index':0x13a,'name':'SERVICE_COMPENSATION_FUND_WITHDRAW','description':'Withdraw\x20compensation\x20fund\x20(time-locked)','governed_operation':'withdraw\x20from\x20the\x20compensation_fund\x20(time-locked)','post_publish_mutability':'locked_by_duration'},{'index':0x13b,'name':'SERVICE_COMPENSATION_FUND_DEPOSIT','description':'Deposit\x20to\x20compensation\x20fund','governed_operation':'deposit\x20to\x20the\x20compensation_fund','post_publish_mutability':'mutable'},{'index':0x13c,'name':'SERVICE_COMPENSATION_FUND_RECEIVE','description':'Receive\x20compensation\x20fund\x20(arbitration\x20payout)','governed_operation':'receive\x20the\x20compensation_fund\x20payout\x20(arbitration\x20payout)','post_publish_mutability':'mutable'},{'index':0x13d,'name':'SERVICE_COMPENSATION_LOCK_DURATION_ADD','description':'Extend\x20setting_lock_duration\x20(only-increase)','governed_operation':'extend\x20setting_lock_duration\x20(only-increase)','post_publish_mutability':'mutable'},{'index':0x13e,'name':'SERVICE_REWARD','description':'Add/remove\x20Reward\x20references\x20(remove/clear\x20time-locked)','governed_operation':'add/remove/clear\x20Reward\x20references','post_publish_mutability':'locked_by_duration'},{'index':0x13f,'name':'SERVICE_OWNER_RECEIVE','description':'Receive\x20Payment/objects\x20to\x20owner','governed_operation':'receive\x20Payments/objects\x20to\x20owner','post_publish_mutability':'mutable'},{'index':0x140,'name':'SERVICE_UM','description':'Bind/unbind\x20Contact\x20as\x20UM','governed_operation':'bind/unbind\x20Contact\x20as\x20UM','post_publish_mutability':'mutable'},{'index':0x141,'name':'SERVICE_ARB_STATEMENT','description':'Append\x20seller\x20statement\x20to\x20an\x20Arb\x20case\x20(event-only)','governed_operation':'append\x20seller\x20text\x20to\x20a\x20case\x20against\x20an\x20order\x20of\x20this\x20service\x20(ArbStatementEvent;\x20no\x20Arb\x20state\x20change)','post_publish_mutability':'mutable'}];export const SERVICE_ORDER_FLOW_STAGES=[{'stage':0x1,'name':'pre_check','preconditions':['Service.bPublished\x20==\x20true\x20(else\x20E_NOT_PUBLISHED,\x20service:7)','Service.bPaused\x20==\x20false\x20(else\x20E_PAUSED,\x20service:19)','buy_guard\x20(if\x20set)\x20added\x20to\x20guards[]\x20list\x20for\x20verification'],'side_effects':[],'always_executed':!![]},{'stage':0x2,'name':'wip_verify','preconditions':['buy.items\x20non-empty','Each\x20item.name\x20matches\x20a\x20sale\x20in\x20Service.sales\x20(else\x20E_SALE_ITEM_NOT_FOUND,\x20service:32)','sale.suspension\x20==\x20false\x20(else\x20E_SALE_SUSPENDED)'],'side_effects':['If\x20buyer\x20passes\x20empty\x20wip_hash,\x20SDK\x20auto-fills\x20with\x20sale.wip_hash','verifiedWipUrls\x20Set\x20avoids\x20re-verifying\x20same\x20WIP\x20URL\x20across\x20items','verify_wip()\x20fetches\x20WIP\x20file\x20and\x20compares\x20hash\x20(else\x20E_WIP_HASH_NOT_MATCH)'],'always_executed':!![]},{'stage':0x3,'name':'quote','preconditions':['All\x20items\x20have\x20valid\x20sale\x20+\x20wip_hash\x20match','stock\x20>=\x20purchase\x20quantity\x20(else\x20E_STOCK_NOT_ENOUGH,\x20service:16)','discount\x20object\x20(if\x20used)\x20is\x20valid\x20and\x20within\x20its\x20[time_start,\x20time_end]\x20window\x20(else\x20E_DISCOUNT_TIME_INVALID)'],'side_effects':['The\x20quote\x20step\x20computes\x20the\x20total\x20price\x20(with\x20discount\x20if\x20applicable)','⚠️\x20Stock\x20is\x20deducted\x20(split)\x20—\x20side\x20effect\x20is\x20NOT\x20auto-rolled-back\x20on\x20later\x20failure','The\x20on-chain\x20quote\x20call\x20executes\x20(the\x20discount\x20path\x20validates\x20the\x20Clock\x20time-window\x20check)'],'always_executed':!![]},{'stage':0x4,'name':'create_order','preconditions':['Quote\x20object\x20from\x20stage\x203','Registrar\x20+\x20Clock\x20objects\x20available'],'side_effects':['The\x20atomic\x20on-chain\x20buy\x20call\x20executes\x20(passport-gated\x20variant\x20supported)','Order\x20object\x20created\x20(builder=customer,\x20service=Service.id)','Order.id\x20recorded\x20for\x20stages\x205-7'],'always_executed':!![]},{'stage':0x5,'name':'create_allocation','preconditions':['Service.order_allocators\x20is\x20Some\x20(configured)','Order\x20from\x20stage\x204','CoinParam\x20for\x20total_pay\x20matches\x20Service<T>\x20type'],'side_effects':['The\x20on-chain\x20allocation\x20call\x20executes','Allocation\x20object\x20created\x20(guard-selected\x20fund\x20distribution)','Order.allocation\x20=\x20Allocation\x20address'],'always_executed':!![]},{'stage':0x6,'name':'create_progress','preconditions':['Service.machine\x20is\x20Some\x20(machine\x20bound)','Order\x20from\x20stage\x204','Machine\x20from\x20Service.machine'],'side_effects':['The\x20on-chain\x20progress-creation\x20call\x20executes','Progress\x20object\x20created\x20(Progress.machine\x20=\x20Service.machine,\x20Progress.task\x20=\x20Order.id)'],'always_executed':![]},{'stage':0x7,'name':'post_actions','preconditions':['Order/Allocation/Progress\x20objects\x20from\x20stages\x204-6'],'side_effects':['Attach\x20agents\x20to\x20the\x20order\x20(if\x20order_new.agents\x20provided)','order_required_info_update\x20(if\x20order_required_info\x20provided)','Transfer\x20Order\x20ownership\x20(if\x20transfer\x20provided\x20—\x20sets\x20new\x20Order\x20owner)','namedNewOrder\x20/\x20namedNewAllocation\x20/\x20namedNewProgress\x20(local\x20naming)'],'always_executed':![]},{'stage':0x8,'name':'return_result','preconditions':['All\x20preceding\x20stages\x20succeeded'],'side_effects':['Returns\x20BuyResult\x20{\x20order,\x20allocation?,\x20progress?\x20}','Caller\x20proceeds\x20to\x20sign\x20+\x20submit\x20transaction'],'always_executed':!![]}];export const SERVICE_CROSS_OBJECT_BINDINGS=[{'object':'Machine','field':'machine','required':![],'locked_after_publish':!![],'notes':'Workflow\x20template;\x20post-publish\x20immutable\x20(F-S-20).\x20Progress.machine\x20inherits\x20this\x20value.'},{'object':'Guard','field':'buy_guard','required':![],'locked_after_publish':![],'notes':'Buyer\x20eligibility\x20guard;\x20post-publish\x20STILL\x20MUTABLE\x20(unusual\x20—\x20see\x20F-S-26)'},{'object':'Allocation','field':'order_allocators','required':!![],'locked_after_publish':!![],'notes':'Order\x20fund\x20distribution\x20strategy;\x20publish\x20prerequisite\x20(F-S-18).\x20Post-publish\x20immutable\x20(F-S-22).'},{'object':'Arbitration','field':'arbitrations','required':![],'locked_after_publish':![],'notes':'Dispute\x20handlers;\x20required\x20if\x20compensation_fund\x20>\x200\x20(F-S-19).\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish\x20(F-S-21).'},{'object':'Repository','field':'repositories','required':![],'locked_after_publish':![],'notes':'Shared\x20data\x20stores;\x20mutable\x20post-publish'},{'object':'Reward','field':'rewards','required':![],'locked_after_publish':![],'notes':'Marketing\x20incentives;\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish\x20(F-S-24)'},{'object':'Contact','field':'um','required':![],'locked_after_publish':![],'notes':'User\x20Manager\x20(Contact\x20object);\x20mutable\x20post-publish'},{'object':'Treasury','field':'(indirect\x20via\x20order_allocators.sharing.who=Entity)','required':![],'locked_after_publish':![],'notes':'Treasury\x20is\x20referenced\x20by\x20Allocation.sharing.who,\x20not\x20by\x20Service\x20directly'}];export const SERVICE_SCENES=[{'id':'service_retail','name':'Retail\x20e-commerce\x20Service','category':'retail','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL','set\x20customer\x20required\x20info\x20fields'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','pause/resume\x20the\x20Service\x20(310)','add/set/remove/clear\x20sales\x20items\x20(305)','set\x20the\x20order_allocators\x20strategy\x20(313)','set/clear\x20the\x20buy_guard\x20check\x20(307)','issue/destroy\x20discount\x20coupons\x20(312)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set\x20(F-S-18,\x20E_NO_ALLOCATOR)','If\x20compensation_fund\x20>\x200,\x20arbitrations\x20must\x20be\x20non-empty\x20(F-S-19)'],'common_patterns':['Multi-tier\x20pricing\x20via\x20sales[]\x20(Standard/Premium/Enterprise)','WIP\x20hash\x20per\x20sale\x20item\x20for\x20tamper-proof\x20product\x20info','buy_guard\x20for\x20KYC\x20whitelist\x20during\x20pre-sale,\x20then\x20null\x20for\x20public\x20sale','compensation_fund\x20deposited\x20before\x20publish\x20+\x20arbitrations\x20configured'],'recommended_templates':['T-S-01','T-S-06']},{'id':'service_rental','name':'Rental\x20Service\x20(short/long-term)','category':'rental','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','add/set\x20sales\x20items\x20(305)','bind\x20the\x20Machine\x20workflow\x20(306)\x20—\x20for\x20rental\x20workflow','add\x20Arbitration\x20references\x20(308)\x20—\x20for\x20deposit\x20disputes'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set','machine\x20recommended\x20(rental\x20workflow\x20with\x20deposit/return\x20stages)','arbitrations\x20recommended\x20(deposit\x20refund\x20disputes)'],'common_patterns':['Machine\x20workflow\x20with\x20\x27Deposit\x20→\x20Use\x20→\x20Return\x20→\x20Refund\x27\x20nodes','compensation_fund\x20holds\x20deposit\x20guarantees','buy_guard\x20verifies\x20renter\x20identity/KYC','stock=1\x20per\x20rental\x20item\x20(unique\x20items)'],'recommended_templates':['T-S-02','T-S-04']},{'id':'service_subscription','name':'Subscription\x20Service\x20(recurring)','category':'subscription','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','add/set\x20sales\x20items\x20(305)','issue\x20discount\x20coupons\x20(312)\x20—\x20promotional\x20rates','add\x20Reward\x20references\x20(318)\x20—\x20loyalty\x20rewards'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Tiered\x20plans\x20(Free/Pro/Enterprise)\x20as\x20sales[]','Discount\x20coupons\x20for\x20trial\x20periods','Rewards\x20for\x20long-term\x20subscribers','Renewal\x20handled\x20by\x20repeat\x20orders\x20(no\x20native\x20recurring\x20billing)'],'recommended_templates':['T-S-03']},{'id':'service_workflow','name':'Workflow-bound\x20Service\x20(machine-bound)','category':'workflow','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['bind\x20the\x20Machine\x20workflow\x20(306)','publish\x20the\x20Service\x20(311)','set\x20the\x20order_allocators\x20strategy\x20(313)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set','machine\x20must\x20be\x20published\x20before\x20binding','machine\x20recommended\x20for\x20any\x20multi-stage\x20service\x20delivery'],'common_patterns':['Machine\x20defines\x20Pay\x20→\x20Confirm\x20→\x20Deliver\x20→\x20Sign-off\x20nodes','Progress\x20created\x20per\x20order\x20(stage\x206\x20of\x20buy\x20flow)','Named\x20operators\x20assigned\x20per\x20Forward\x20in\x20Machine','Service.paused\x20does\x20NOT\x20affect\x20already-created\x20Progress\x20(existing\x20orders\x20continue)'],'recommended_templates':['T-S-04']},{'id':'service_arbitration','name':'Arbitration-bound\x20Service\x20(dispute-ready)','category':'arbitration','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add\x20Arbitration\x20references\x20(308)','deposit\x20to\x20the\x20compensation_fund\x20(315)','extend\x20setting_lock_duration\x20(317)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['If\x20compensation_fund\x20>\x200,\x20arbitrations\x20must\x20be\x20non-empty\x20(F-S-19)','Arbitration\x20objects\x20must\x20be\x20created\x20before\x20binding','compensation_fund_add\x20before\x20publish\x20recommended\x20(else\x20post-publish\x20deposit\x20still\x20possible)'],'common_patterns':['2-3\x20Arbitration\x20objects\x20(different\x20arb\x20committees\x20for\x20different\x20dispute\x20types)','compensation_fund\x20deposited\x20as\x20%\x20of\x20expected\x20order\x20volume','setting_lock_duration\x20extended\x20by\x20owner\x20to\x20build\x20customer\x20trust','Arbitration\x20compensation\x20payout\x20triggered\x20by\x20the\x20arbitration\x20result\x20(not\x20by\x20Service\x20directly)'],'recommended_templates':['T-S-05','T-S-06']},{'id':'service_compensation_fund','name':'Compensation\x20Fund\x20Service\x20(embedded\x20balance)','category':'compensation_fund','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['deposit\x20to\x20the\x20compensation_fund\x20(315)','withdraw\x20from\x20the\x20compensation_fund\x20(314)\x20—\x20time-locked\x20after\x20publish','receive\x20the\x20compensation_fund\x20payout\x20(316)\x20—\x20arbitration\x20payout\x20(always\x20mutable)','extend\x20setting_lock_duration\x20(317)\x20—\x20extend\x20lock'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['compensation_fund\x20>\x200\x20→\x20arbitrations\x20non-empty\x20(F-S-19)','compensation_fund\x20coin\x20type\x20must\x20match\x20Service<T>\x20type\x20parameter'],'common_patterns':['Fund\x20inflow:\x20compensation_fund_add\x20(315)\x20—\x20always\x20mutable','Fund\x20outflow:\x20compensation_fund_withdraw\x20(314)\x20—\x20requires\x20bPaused\x20+\x20lock_duration\x20expired','Fund\x20receive:\x20compensation_fund_receive\x20(316)\x20—\x20arbitration\x20payout,\x20always\x20mutable','Fund\x20consumer:\x20arbitration\x20compensation\x20payout\x20(driven\x20by\x20arb\x20result)','Distinct\x20from\x20Treasury:\x20Service-internal,\x20arbitration-bound,\x20lock-protected'],'recommended_templates':['T-S-06']},{'id':'service_reward','name':'Reward-attached\x20Service\x20(marketing)','category':'reward','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add/remove/clear\x20Reward\x20references\x20(318)\x20—\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish','issue/destroy\x20discount\x20coupons\x20(312)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Rewards\x20added\x20post-publish\x20(always\x20allowed;\x20remove/clear\x20is\x20time-locked\x20after\x20publish)','Reward\x20objects\x20must\x20exist\x20before\x20binding\x20(queryObjectsWithType\x20validation)','MAX_REWARD_COUNT\x20=\x2020\x20per\x20Service','Reward\x20remove/clear\x20requires\x20Service\x20paused\x20+\x20setting_lock_duration\x20elapsed\x20(protects\x20customer\x20expectations)'],'recommended_templates':['T-S-08']},{'id':'service_arbitration_binding','name':'Arbitration\x20Binding\x20Service\x20(post-publish\x20immutable)','category':'arbitration','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add\x20Arbitration\x20references\x20(308)\x20—\x20pre-publish\x20only','remove\x20an\x20Arbitration\x20reference\x20(308)\x20—\x20pre-publish\x20only','clear\x20Arbitration\x20references\x20(308)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['MAX_ARBITRATION_COUNT\x20=\x2020\x20per\x20Service\x20(F-S-04)','Each\x20Arbitration\x20object\x20must\x20be\x20valid\x20(queryObjectsWithType\x20validation)','Arbitration\x20bound\x20=\x20locked\x20post-publish\x20(F-S-21).\x20To\x20change:\x20create\x20new\x20Service.'],'common_patterns':['Pre-publish:\x20set\x201-3\x20Arbitration\x20objects\x20for\x20different\x20dispute\x20scopes','Post-publish:\x20immutable\x20—\x20clone\x20Service\x20if\x20change\x20needed','⚠️\x20Data\x20inconsistency:\x20dynamic-pricing.ts\x20marks\x20arbitrations\x20as\x20mutable,\x20but\x20SDK\x20blocks\x20it\x20(F-S-21)'],'recommended_templates':['T-S-05']},{'id':'service_buy_guard','name':'Buy\x20Guard\x20Service\x20(post-publish\x20mutable\x20guard)','category':'buy_guard','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['bind\x20the\x20buy_guard\x20Guard\x20(307)','clear\x20the\x20buy_guard\x20Guard\x20(307)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Pre-sale\x20phase:\x20buy_guard\x20=\x20whitelist\x20Guard\x20(KYC\x20verified\x20buyers\x20only)','Public\x20sale:\x20buy_guard\x20=\x20null\x20(anyone\x20can\x20buy)','Restricted\x20phase:\x20buy_guard\x20=\x20KYC\x20Guard\x20(compliance)','⚠️\x20buy_guard\x20is\x20the\x20ONLY\x20publish-locked-field\x20exception\x20—\x20still\x20mutable\x20post-publish','buy_guard\x20verification\x20happens\x20at\x20Stage\x201\x20of\x20buy\x20flow\x20(pre_check)'],'recommended_templates':['T-S-01']},{'id':'service_order_allocator','name':'Order\x20Allocator\x20Service\x20(fund\x20distribution\x20config)','category':'order_allocator','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['set\x20the\x20order_allocators\x20strategy\x20(313)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)\x20—\x20requires\x20order_allocators\x20(F-S-18)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20MUST\x20be\x20set\x20(F-S-18,\x20E_NO_ALLOCATOR)','Allocators.sharing.who\x20can\x20reference\x20Treasury\x20addresses\x20(indirect\x20Treasury\x20binding)','MAX_SHARING_COUNT\x20=\x20100\x20per\x20allocator'],'common_patterns':['Multi-party\x20split:\x20merchant\x2080%\x20/\x20platform\x2010%\x20/\x20logistics\x2010%','Threshold-based:\x20different\x20allocators\x20for\x20different\x20order\x20sizes','Guard-bound\x20allocator:\x20allocation\x20execution\x20requires\x20Guard\x20verification','Post-publish\x20immutable\x20—\x20clone\x20Service\x20to\x20change\x20allocation\x20strategy'],'recommended_templates':['T-S-08']},{'id':'service_dynamic_pricing','name':'Dynamic\x20Pricing\x20Service\x20(discount-driven)','category':'dynamic_pricing','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['issue\x20discount\x20coupons\x20(312)','add/set\x20sales\x20items\x20(305)\x20—\x20adjust\x20base\x20prices','remove\x20sales\x20items\x20(305)\x20—\x20remove\x20deprecated\x20SKUs'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Discount\x20types:\x200=rates\x20(basis\x20points,\x20per\x2010000),\x201=minus\x20(direct\x20deduction)','MAX_DISCOUNT_COUNT_ONCE\x20=\x201000\x20per\x20issue\x20call','MAX_DISCOUNT_RECEIVER_ONCE\x20=\x201000\x20receivers\x20per\x20call','MAX_DISCOUNT_TOTAL_COUNT\x20=\x2020000\x20total\x20coupons','discount_destroy:\x20holder-only\x20(no\x20SERVICE_DISCOUNT\x20permission\x20needed)'],'recommended_templates':['T-S-07']},{'id':'service_multi_allocator','name':'Multi-Allocator\x20Service\x20(tiered\x20fund\x20distribution)','category':'multi_allocator','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['set\x20the\x20order_allocators\x20strategy\x20(313)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20MUST\x20be\x20set','Each\x20allocator\x20has\x20its\x20own\x20Guard\x20+\x20sharing\x20+\x20threshold','Each\x20allocator\x20is\x20bound\x20to\x20a\x20DIFFERENT\x20guard\x20—\x20the\x20caller\x27s\x20submitted\x20guard\x20selects\x20which\x20path\x20fires'],'common_patterns':['Tier\x201\x20(small\x20orders):\x20single-recipient\x20allocator\x20(low\x20fee)','Tier\x202\x20(medium\x20orders):\x20two-recipient\x20split\x20(merchant\x20+\x20platform)','Tier\x203\x20(large\x20orders):\x20three-recipient\x20split\x20(merchant\x20+\x20platform\x20+\x20logistics)','Each\x20tier\x20can\x20have\x20its\x20own\x20Guard\x20for\x20execution\x20authorization'],'recommended_templates':['T-S-08']}];export const SERVICE_LEDGER_VERSION='1.0.0';export function getScenesByCategory(a){return SERVICE_SCENES['filter'](b=>b['category']===a);}export function findSceneById(a){return SERVICE_SCENES['find'](b=>b['id']===a);}export function getServicePermissionByIndex(a){return SERVICE_PERMISSIONS['find'](b=>b['index']===a);}export function isServicePermission(a){return getServicePermissionByIndex(a)!==undefined;}export function getPermissionsByMutability(a){return SERVICE_PERMISSIONS['filter'](b=>b['post_publish_mutability']===a);}export function getImmutablePostPublishPermissions(){return SERVICE_PERMISSIONS['filter'](a=>a['post_publish_mutability']==='immutable'||a['post_publish_mutability']==='one_shot');}export function getLockedByDurationPermissions(){return SERVICE_PERMISSIONS['filter'](a=>a['post_publish_mutability']==='locked_by_duration');}export function inferSceneFromIntent(a){const b=a['toLowerCase'](),c=[['retail','retail'],['ecommerce','retail'],['rental','rental'],['rent','rental'],['short-term\x20rental','rental'],['long-term\x20rental','rental'],['subscription','subscription'],['subscribe','subscription'],['workflow','workflow'],['machine-bound','workflow'],['arbitration','arbitration'],['dispute','arbitration'],['compensation','compensation_fund'],['compensation_fund','compensation_fund'],['reward','reward'],['marketing','reward'],['buy_guard','buy_guard'],['kyc','buy_guard'],['whitelist','buy_guard'],['allocator','order_allocator'],['discount','dynamic_pricing'],['coupon','dynamic_pricing'],['multi-allocator','multi_allocator'],['tiered','multi_allocator']];for(const [d,e]of c){if(b['includes'](d)){const f=getScenesByCategory(e);if(f['length']>0x0)return f[0x0];}}if(b['includes']('service'))return findSceneById('service_retail');return undefined;}export function getAllServiceScenes(){return[...SERVICE_SCENES];}export function getServiceScenesCount(){return SERVICE_SCENES['length'];}export function getServicePermissionsCount(){return SERVICE_PERMISSIONS['length'];}export function getOrderFlowStage(a){return SERVICE_ORDER_FLOW_STAGES['find'](b=>b['stage']===a);}export function getCrossObjectBindings(){return[...SERVICE_CROSS_OBJECT_BINDINGS];}