@powerhousedao/ph-clint-app 0.1.0-dev.72 → 0.1.0-dev.74

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 (229) hide show
  1. package/dist/browser/document-models/index.js +1 -1
  2. package/dist/browser/document-models/ph-clint-project/index.js +3 -3
  3. package/dist/browser/{editor-DL0W2XOS.js → editor-CAZmaheq.js} +825 -261
  4. package/dist/browser/{editor-DL0W2XOS.js.map → editor-CAZmaheq.js.map} +1 -1
  5. package/dist/browser/editors/ph-clint-project-editor/module.js +1 -1
  6. package/dist/browser/index.js +3 -3
  7. package/dist/browser/index.js.map +1 -1
  8. package/dist/browser/{module-DoAlHsjp.js → module-K5q3UobV.js} +1970 -977
  9. package/dist/browser/module-K5q3UobV.js.map +1 -0
  10. package/dist/browser/{ph-clint-project-D634z5c5.js → ph-clint-project-Bbl7jqNw.js} +4 -6
  11. package/dist/browser/ph-clint-project-Bbl7jqNw.js.map +1 -0
  12. package/dist/connect/assets/editor-CQqCB-3d.js +2 -0
  13. package/dist/connect/assets/editor-CQqCB-3d.js.map +1 -0
  14. package/dist/connect/assets/{index-BXAErAWR.js → index-DmrNLi1C.js} +20 -20
  15. package/dist/connect/assets/index-DmrNLi1C.js.map +1 -0
  16. package/dist/connect/assets/index-cjUwUwMU.css +2 -0
  17. package/dist/connect/assets/ph-clint-project-DZ_ZplDv.js +1142 -0
  18. package/dist/connect/assets/ph-clint-project-DZ_ZplDv.js.map +1 -0
  19. package/dist/connect/index.html +3 -3
  20. package/dist/connect/ph-packages.json +1 -1
  21. package/dist/document-models/document-models.d.ts +1 -1
  22. package/dist/document-models/index.d.ts +1 -1
  23. package/dist/document-models/ph-clint-project/index.d.ts +2 -2
  24. package/dist/document-models/ph-clint-project/upgrades/index.d.ts +2 -2
  25. package/dist/document-models/ph-clint-project/upgrades/upgrade-manifest.d.ts +2 -2
  26. package/dist/document-models/ph-clint-project/upgrades/upgrade-manifest.d.ts.map +1 -1
  27. package/dist/document-models/ph-clint-project/v1/actions.d.ts +28 -16
  28. package/dist/document-models/ph-clint-project/v1/actions.d.ts.map +1 -1
  29. package/dist/document-models/ph-clint-project/v1/gen/actions.d.ts +29 -19
  30. package/dist/document-models/ph-clint-project/v1/gen/actions.d.ts.map +1 -1
  31. package/dist/document-models/ph-clint-project/v1/gen/controller.d.ts +2 -2
  32. package/dist/document-models/ph-clint-project/v1/gen/controller.d.ts.map +1 -1
  33. package/dist/document-models/ph-clint-project/v1/gen/creators.d.ts +28 -18
  34. package/dist/document-models/ph-clint-project/v1/gen/creators.d.ts.map +1 -1
  35. package/dist/document-models/ph-clint-project/v1/gen/deployment/actions.d.ts +6 -6
  36. package/dist/document-models/ph-clint-project/v1/gen/deployment/actions.d.ts.map +1 -1
  37. package/dist/document-models/ph-clint-project/v1/gen/deployment/creators.d.ts +2 -2
  38. package/dist/document-models/ph-clint-project/v1/gen/deployment/creators.d.ts.map +1 -1
  39. package/dist/document-models/ph-clint-project/v1/gen/deployment/error.d.ts +1 -1
  40. package/dist/document-models/ph-clint-project/v1/gen/deployment/operations.d.ts +3 -3
  41. package/dist/document-models/ph-clint-project/v1/gen/deployment/operations.d.ts.map +1 -1
  42. package/dist/document-models/ph-clint-project/v1/gen/document-model.d.ts +1 -1
  43. package/dist/document-models/ph-clint-project/v1/gen/document-model.d.ts.map +1 -1
  44. package/dist/document-models/ph-clint-project/v1/gen/document-schema.d.ts +2 -2
  45. package/dist/document-models/ph-clint-project/v1/gen/document-schema.d.ts.map +1 -1
  46. package/dist/document-models/ph-clint-project/v1/gen/external-skills/actions.d.ts +6 -6
  47. package/dist/document-models/ph-clint-project/v1/gen/external-skills/actions.d.ts.map +1 -1
  48. package/dist/document-models/ph-clint-project/v1/gen/external-skills/creators.d.ts +2 -2
  49. package/dist/document-models/ph-clint-project/v1/gen/external-skills/creators.d.ts.map +1 -1
  50. package/dist/document-models/ph-clint-project/v1/gen/external-skills/error.d.ts +1 -1
  51. package/dist/document-models/ph-clint-project/v1/gen/external-skills/error.d.ts.map +1 -1
  52. package/dist/document-models/ph-clint-project/v1/gen/external-skills/operations.d.ts +3 -3
  53. package/dist/document-models/ph-clint-project/v1/gen/external-skills/operations.d.ts.map +1 -1
  54. package/dist/document-models/ph-clint-project/v1/gen/features-mastra/actions.d.ts +6 -54
  55. package/dist/document-models/ph-clint-project/v1/gen/features-mastra/actions.d.ts.map +1 -1
  56. package/dist/document-models/ph-clint-project/v1/gen/features-mastra/creators.d.ts +2 -14
  57. package/dist/document-models/ph-clint-project/v1/gen/features-mastra/creators.d.ts.map +1 -1
  58. package/dist/document-models/ph-clint-project/v1/gen/features-mastra/error.d.ts +1 -78
  59. package/dist/document-models/ph-clint-project/v1/gen/features-mastra/error.d.ts.map +1 -1
  60. package/dist/document-models/ph-clint-project/v1/gen/features-mastra/operations.d.ts +3 -15
  61. package/dist/document-models/ph-clint-project/v1/gen/features-mastra/operations.d.ts.map +1 -1
  62. package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/actions.d.ts +3 -3
  63. package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/creators.d.ts +2 -2
  64. package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/creators.d.ts.map +1 -1
  65. package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/error.d.ts +1 -1
  66. package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/operations.d.ts +3 -3
  67. package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/operations.d.ts.map +1 -1
  68. package/dist/document-models/ph-clint-project/v1/gen/features-routine/actions.d.ts +4 -4
  69. package/dist/document-models/ph-clint-project/v1/gen/features-routine/actions.d.ts.map +1 -1
  70. package/dist/document-models/ph-clint-project/v1/gen/features-routine/creators.d.ts +2 -2
  71. package/dist/document-models/ph-clint-project/v1/gen/features-routine/creators.d.ts.map +1 -1
  72. package/dist/document-models/ph-clint-project/v1/gen/features-routine/operations.d.ts +3 -3
  73. package/dist/document-models/ph-clint-project/v1/gen/features-routine/operations.d.ts.map +1 -1
  74. package/dist/document-models/ph-clint-project/v1/gen/identity/actions.d.ts +5 -5
  75. package/dist/document-models/ph-clint-project/v1/gen/identity/actions.d.ts.map +1 -1
  76. package/dist/document-models/ph-clint-project/v1/gen/identity/creators.d.ts +2 -2
  77. package/dist/document-models/ph-clint-project/v1/gen/identity/creators.d.ts.map +1 -1
  78. package/dist/document-models/ph-clint-project/v1/gen/identity/error.d.ts +1 -1
  79. package/dist/document-models/ph-clint-project/v1/gen/identity/error.d.ts.map +1 -1
  80. package/dist/document-models/ph-clint-project/v1/gen/identity/operations.d.ts +3 -3
  81. package/dist/document-models/ph-clint-project/v1/gen/identity/operations.d.ts.map +1 -1
  82. package/dist/document-models/ph-clint-project/v1/gen/index.d.ts +25 -20
  83. package/dist/document-models/ph-clint-project/v1/gen/index.d.ts.map +1 -1
  84. package/dist/document-models/ph-clint-project/v1/gen/lifecycle/actions.d.ts +3 -3
  85. package/dist/document-models/ph-clint-project/v1/gen/lifecycle/creators.d.ts +2 -2
  86. package/dist/document-models/ph-clint-project/v1/gen/lifecycle/creators.d.ts.map +1 -1
  87. package/dist/document-models/ph-clint-project/v1/gen/lifecycle/error.d.ts +13 -1
  88. package/dist/document-models/ph-clint-project/v1/gen/lifecycle/error.d.ts.map +1 -1
  89. package/dist/document-models/ph-clint-project/v1/gen/lifecycle/operations.d.ts +3 -3
  90. package/dist/document-models/ph-clint-project/v1/gen/lifecycle/operations.d.ts.map +1 -1
  91. package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/actions.d.ts +40 -0
  92. package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/actions.d.ts.map +1 -0
  93. package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/creators.d.ts +11 -0
  94. package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/creators.d.ts.map +1 -0
  95. package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/error.d.ts +79 -0
  96. package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/error.d.ts.map +1 -0
  97. package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/operations.d.ts +18 -0
  98. package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/operations.d.ts.map +1 -0
  99. package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/actions.d.ts +28 -0
  100. package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/actions.d.ts.map +1 -0
  101. package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/creators.d.ts +8 -0
  102. package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/creators.d.ts.map +1 -0
  103. package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/error.d.ts +36 -0
  104. package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/error.d.ts.map +1 -0
  105. package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/operations.d.ts +15 -0
  106. package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/operations.d.ts.map +1 -0
  107. package/dist/document-models/ph-clint-project/v1/gen/mastra-models/actions.d.ts +20 -0
  108. package/dist/document-models/ph-clint-project/v1/gen/mastra-models/actions.d.ts.map +1 -0
  109. package/dist/document-models/ph-clint-project/v1/gen/mastra-models/creators.d.ts +6 -0
  110. package/dist/document-models/ph-clint-project/v1/gen/mastra-models/creators.d.ts.map +1 -0
  111. package/dist/document-models/ph-clint-project/v1/gen/mastra-models/error.d.ts +41 -0
  112. package/dist/document-models/ph-clint-project/v1/gen/mastra-models/error.d.ts.map +1 -0
  113. package/dist/document-models/ph-clint-project/v1/gen/mastra-models/operations.d.ts +13 -0
  114. package/dist/document-models/ph-clint-project/v1/gen/mastra-models/operations.d.ts.map +1 -0
  115. package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/actions.d.ts +24 -0
  116. package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/actions.d.ts.map +1 -0
  117. package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/creators.d.ts +7 -0
  118. package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/creators.d.ts.map +1 -0
  119. package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/error.d.ts +46 -0
  120. package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/error.d.ts.map +1 -0
  121. package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/operations.d.ts +14 -0
  122. package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/operations.d.ts.map +1 -0
  123. package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/actions.d.ts +24 -0
  124. package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/actions.d.ts.map +1 -0
  125. package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/creators.d.ts +7 -0
  126. package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/creators.d.ts.map +1 -0
  127. package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/error.d.ts +51 -0
  128. package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/error.d.ts.map +1 -0
  129. package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/operations.d.ts +14 -0
  130. package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/operations.d.ts.map +1 -0
  131. package/dist/document-models/ph-clint-project/v1/gen/ph-factories.d.ts +2 -2
  132. package/dist/document-models/ph-clint-project/v1/gen/ph-factories.d.ts.map +1 -1
  133. package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/actions.d.ts +7 -7
  134. package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/actions.d.ts.map +1 -1
  135. package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/creators.d.ts +2 -2
  136. package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/creators.d.ts.map +1 -1
  137. package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/error.d.ts +1 -1
  138. package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/error.d.ts.map +1 -1
  139. package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/operations.d.ts +3 -3
  140. package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/operations.d.ts.map +1 -1
  141. package/dist/document-models/ph-clint-project/v1/gen/publishing/actions.d.ts +7 -7
  142. package/dist/document-models/ph-clint-project/v1/gen/publishing/actions.d.ts.map +1 -1
  143. package/dist/document-models/ph-clint-project/v1/gen/publishing/creators.d.ts +2 -2
  144. package/dist/document-models/ph-clint-project/v1/gen/publishing/creators.d.ts.map +1 -1
  145. package/dist/document-models/ph-clint-project/v1/gen/publishing/error.d.ts +1 -1
  146. package/dist/document-models/ph-clint-project/v1/gen/publishing/operations.d.ts +3 -3
  147. package/dist/document-models/ph-clint-project/v1/gen/publishing/operations.d.ts.map +1 -1
  148. package/dist/document-models/ph-clint-project/v1/gen/reducer.d.ts +2 -2
  149. package/dist/document-models/ph-clint-project/v1/gen/reducer.d.ts.map +1 -1
  150. package/dist/document-models/ph-clint-project/v1/gen/schema/index.d.ts +2 -2
  151. package/dist/document-models/ph-clint-project/v1/gen/schema/types.d.ts +214 -129
  152. package/dist/document-models/ph-clint-project/v1/gen/schema/types.d.ts.map +1 -1
  153. package/dist/document-models/ph-clint-project/v1/gen/schema/zod.d.ts +23 -7
  154. package/dist/document-models/ph-clint-project/v1/gen/schema/zod.d.ts.map +1 -1
  155. package/dist/document-models/ph-clint-project/v1/gen/types.d.ts +5 -5
  156. package/dist/document-models/ph-clint-project/v1/gen/types.d.ts.map +1 -1
  157. package/dist/document-models/ph-clint-project/v1/gen/utils.d.ts +2 -2
  158. package/dist/document-models/ph-clint-project/v1/gen/utils.d.ts.map +1 -1
  159. package/dist/document-models/ph-clint-project/v1/hooks.d.ts +6 -3
  160. package/dist/document-models/ph-clint-project/v1/hooks.d.ts.map +1 -1
  161. package/dist/document-models/ph-clint-project/v1/index.d.ts +6 -6
  162. package/dist/document-models/ph-clint-project/v1/module.d.ts +28 -16
  163. package/dist/document-models/ph-clint-project/v1/module.d.ts.map +1 -1
  164. package/dist/document-models/ph-clint-project/v1/src/index.d.ts +1 -1
  165. package/dist/document-models/ph-clint-project/v1/src/reducers/deployment.d.ts +1 -1
  166. package/dist/document-models/ph-clint-project/v1/src/reducers/deployment.d.ts.map +1 -1
  167. package/dist/document-models/ph-clint-project/v1/src/reducers/external-skills.d.ts +1 -1
  168. package/dist/document-models/ph-clint-project/v1/src/reducers/external-skills.d.ts.map +1 -1
  169. package/dist/document-models/ph-clint-project/v1/src/reducers/features-mastra.d.ts +1 -1
  170. package/dist/document-models/ph-clint-project/v1/src/reducers/features-mastra.d.ts.map +1 -1
  171. package/dist/document-models/ph-clint-project/v1/src/reducers/features-powerhouse.d.ts +1 -1
  172. package/dist/document-models/ph-clint-project/v1/src/reducers/features-powerhouse.d.ts.map +1 -1
  173. package/dist/document-models/ph-clint-project/v1/src/reducers/features-routine.d.ts +1 -1
  174. package/dist/document-models/ph-clint-project/v1/src/reducers/features-routine.d.ts.map +1 -1
  175. package/dist/document-models/ph-clint-project/v1/src/reducers/identity.d.ts +1 -1
  176. package/dist/document-models/ph-clint-project/v1/src/reducers/identity.d.ts.map +1 -1
  177. package/dist/document-models/ph-clint-project/v1/src/reducers/lifecycle.d.ts +1 -1
  178. package/dist/document-models/ph-clint-project/v1/src/reducers/lifecycle.d.ts.map +1 -1
  179. package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-agent-bindings.d.ts +3 -0
  180. package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-agent-bindings.d.ts.map +1 -0
  181. package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-main-agent.d.ts +3 -0
  182. package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-main-agent.d.ts.map +1 -0
  183. package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-models.d.ts +3 -0
  184. package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-models.d.ts.map +1 -0
  185. package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-profiles.d.ts +3 -0
  186. package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-profiles.d.ts.map +1 -0
  187. package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-sub-agents.d.ts +3 -0
  188. package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-sub-agents.d.ts.map +1 -0
  189. package/dist/document-models/ph-clint-project/v1/src/reducers/powerhouse-packages.d.ts +1 -1
  190. package/dist/document-models/ph-clint-project/v1/src/reducers/powerhouse-packages.d.ts.map +1 -1
  191. package/dist/document-models/ph-clint-project/v1/src/reducers/publishing.d.ts +1 -1
  192. package/dist/document-models/ph-clint-project/v1/src/reducers/publishing.d.ts.map +1 -1
  193. package/dist/document-models/ph-clint-project/v1/tests/mastra-agent-bindings.test.d.ts +2 -0
  194. package/dist/document-models/ph-clint-project/v1/tests/mastra-agent-bindings.test.d.ts.map +1 -0
  195. package/dist/document-models/ph-clint-project/v1/tests/mastra-main-agent.test.d.ts +2 -0
  196. package/dist/document-models/ph-clint-project/v1/tests/mastra-main-agent.test.d.ts.map +1 -0
  197. package/dist/document-models/ph-clint-project/v1/tests/mastra-models.test.d.ts +2 -0
  198. package/dist/document-models/ph-clint-project/v1/tests/mastra-models.test.d.ts.map +1 -0
  199. package/dist/document-models/ph-clint-project/v1/tests/mastra-profiles.test.d.ts +2 -0
  200. package/dist/document-models/ph-clint-project/v1/tests/mastra-profiles.test.d.ts.map +1 -0
  201. package/dist/document-models/ph-clint-project/v1/tests/mastra-sub-agents.test.d.ts +2 -0
  202. package/dist/document-models/ph-clint-project/v1/tests/mastra-sub-agents.test.d.ts.map +1 -0
  203. package/dist/document-models/ph-clint-project/v1/utils.d.ts +2 -2
  204. package/dist/document-models/upgrade-manifests.d.ts +1 -1
  205. package/dist/document-models/upgrade-manifests.d.ts.map +1 -1
  206. package/dist/editors/ph-clint-project-editor/editor.d.ts.map +1 -1
  207. package/dist/node/document-models/index.mjs +1 -1
  208. package/dist/node/document-models/ph-clint-project/index.mjs +3 -3
  209. package/dist/node/{editor-mM5FSNXc.mjs → editor-DOw2BwlR.mjs} +825 -261
  210. package/dist/node/{editor-mM5FSNXc.mjs.map → editor-DOw2BwlR.mjs.map} +1 -1
  211. package/dist/node/editors/ph-clint-project-editor/module.mjs +1 -1
  212. package/dist/node/index.mjs +3 -3
  213. package/dist/node/index.mjs.map +1 -1
  214. package/dist/node/{module-DayL4J7r.mjs → module-DTtUZ4DR.mjs} +1970 -977
  215. package/dist/node/module-DTtUZ4DR.mjs.map +1 -0
  216. package/dist/node/{ph-clint-project-Btx_kiiQ.mjs → ph-clint-project-DFA4zHJv.mjs} +4 -6
  217. package/dist/node/ph-clint-project-DFA4zHJv.mjs.map +1 -0
  218. package/dist/style.css +27 -30
  219. package/package.json +1 -1
  220. package/dist/browser/module-DoAlHsjp.js.map +0 -1
  221. package/dist/browser/ph-clint-project-D634z5c5.js.map +0 -1
  222. package/dist/connect/assets/editor-DgkuaKuV.js +0 -2
  223. package/dist/connect/assets/editor-DgkuaKuV.js.map +0 -1
  224. package/dist/connect/assets/index-BSq-9kCR.css +0 -2
  225. package/dist/connect/assets/index-BXAErAWR.js.map +0 -1
  226. package/dist/connect/assets/ph-clint-project-BRYYVNTj.js +0 -758
  227. package/dist/connect/assets/ph-clint-project-BRYYVNTj.js.map +0 -1
  228. package/dist/node/module-DayL4J7r.mjs.map +0 -1
  229. package/dist/node/ph-clint-project-Btx_kiiQ.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"ph-clint-project-BRYYVNTj.js","names":[],"sources":["../../../document-models/ph-clint-project/v1/gen/schema/zod.ts","../../../document-models/ph-clint-project/v1/gen/deployment/creators.ts","../../../document-models/ph-clint-project/v1/gen/external-skills/creators.ts","../../../document-models/ph-clint-project/v1/gen/features-mastra/creators.ts","../../../document-models/ph-clint-project/v1/gen/features-powerhouse/creators.ts","../../../document-models/ph-clint-project/v1/gen/features-routine/creators.ts","../../../document-models/ph-clint-project/v1/gen/identity/creators.ts","../../../document-models/ph-clint-project/v1/gen/lifecycle/creators.ts","../../../document-models/ph-clint-project/v1/gen/powerhouse-packages/creators.ts","../../../document-models/ph-clint-project/v1/gen/publishing/creators.ts","../../../document-models/ph-clint-project/v1/actions.ts","../../../document-models/ph-clint-project/v1/gen/document-model.ts","../../../document-models/ph-clint-project/v1/gen/deployment/error.ts","../../../document-models/ph-clint-project/v1/src/reducers/deployment.ts","../../../document-models/ph-clint-project/v1/gen/external-skills/error.ts","../../../document-models/ph-clint-project/v1/src/reducers/external-skills.ts","../../../document-models/ph-clint-project/v1/gen/features-mastra/error.ts","../../../document-models/ph-clint-project/v1/src/reducers/features-mastra.ts","../../../document-models/ph-clint-project/v1/gen/features-powerhouse/error.ts","../../../document-models/ph-clint-project/v1/src/reducers/features-powerhouse.ts","../../../document-models/ph-clint-project/v1/src/reducers/features-routine.ts","../../../document-models/ph-clint-project/v1/gen/identity/error.ts","../../../document-models/ph-clint-project/v1/src/reducers/identity.ts","../../../document-models/ph-clint-project/v1/src/reducers/lifecycle.ts","../../../document-models/ph-clint-project/v1/gen/powerhouse-packages/error.ts","../../../document-models/ph-clint-project/v1/src/reducers/powerhouse-packages.ts","../../../document-models/ph-clint-project/v1/gen/publishing/error.ts","../../../document-models/ph-clint-project/v1/src/reducers/publishing.ts","../../../document-models/ph-clint-project/v1/gen/reducer.ts","../../../document-models/ph-clint-project/v1/gen/document-type.ts","../../../document-models/ph-clint-project/v1/gen/document-schema.ts","../../../document-models/ph-clint-project/v1/gen/utils.ts","../../../document-models/ph-clint-project/v1/src/utils.ts","../../../document-models/ph-clint-project/v1/utils.ts","../../../document-models/ph-clint-project/v1/module.ts","../../../document-models/ph-clint-project/v1/gen/controller.ts","../../../document-models/ph-clint-project/v1/gen/ph-factories.ts","../../../document-models/ph-clint-project/v1/hooks.ts","../../../document-models/ph-clint-project/upgrades/versions.ts","../../../document-models/ph-clint-project/upgrades/upgrade-manifest.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport * as z from 'zod';\nimport type {\n AddExternalSkillInput,\n AddModelInput,\n AddPackageDocumentTypeInput,\n AddPowerhousePackageInput,\n AddProfileInput,\n AddSupportedResourceInput,\n BumpVersionInput,\n ClearAgentImageInput,\n DisableMastraInput,\n DisableRoutineInput,\n EnableMastraInput,\n EnableRoutineInput,\n ExternalSkill,\n ImportModelInput,\n ImportPackageInput,\n ImportProfileInput,\n ImportSkillInput,\n ImportSpecInput,\n PhClintAgentModel,\n PhClintAgentProfile,\n PhClintDeployment,\n PhClintFeatures,\n PhClintMastraCommon,\n PhClintMastraFeature,\n PhClintProjectState,\n PhClintRoutineFeature,\n PowerhouseLevel,\n PowerhousePackage,\n PublishDevInput,\n PublishProductionInput,\n PublishRecord,\n PublishStagingInput,\n PublishStatus,\n PublishTag,\n RemoveExternalSkillInput,\n RemoveModelInput,\n RemovePackageDocumentTypeInput,\n RemovePowerhousePackageInput,\n RemoveProfileInput,\n RemoveSupportedResourceInput,\n ReorderProfilesInput,\n SetAgentDescriptionInput,\n SetAgentIdInput,\n SetAgentImageInput,\n SetAgentNameInput,\n SetDefaultModelInput,\n SetDescriptionInput,\n SetEnableChatInput,\n SetExternalSkillGithubUrlInput,\n SetExternalSkillNameInput,\n SetObservabilityEnabledInput,\n SetPackageIdentifierInput,\n SetPackageVersionInput,\n SetPowerhouseLevelInput,\n SetProxyEnabledInput,\n SetPublishStatusInput,\n SetVersionInput,\n UpdateProfileInput,\n} from './types.js';\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny => v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z.any().refine((v) => isDefinedNonNullAny(v));\n\nexport const PowerhouseLevelSchema = z.enum(['Connect', 'Disabled', 'Reactor', 'Switchboard']);\n\nexport const PublishStatusSchema = z.enum(['Failed', 'InProgress', 'Pending', 'Succeeded']);\n\nexport const PublishTagSchema = z.enum(['Dev', 'Production', 'Staging']);\n\nexport function AddExternalSkillInputSchema(): z.ZodObject<Properties<AddExternalSkillInput>> {\n return z.object({\n githubUrl: z.url(),\n id: z.string(),\n name: z.string(),\n });\n}\n\nexport function AddModelInputSchema(): z.ZodObject<Properties<AddModelInput>> {\n return z.object({\n id: z.string(),\n isDefault: z.boolean().nullish(),\n });\n}\n\nexport function AddPackageDocumentTypeInputSchema(): z.ZodObject<Properties<AddPackageDocumentTypeInput>> {\n return z.object({\n documentType: z.string(),\n packageId: z.string(),\n });\n}\n\nexport function AddPowerhousePackageInputSchema(): z.ZodObject<Properties<AddPowerhousePackageInput>> {\n return z.object({\n id: z.string(),\n packageName: z.string(),\n });\n}\n\nexport function AddProfileInputSchema(): z.ZodObject<Properties<AddProfileInput>> {\n return z.object({\n content: z.string(),\n id: z.string(),\n insertBefore: z.string().nullish(),\n title: z.string(),\n });\n}\n\nexport function AddSupportedResourceInputSchema(): z.ZodObject<Properties<AddSupportedResourceInput>> {\n return z.object({\n resource: z.string(),\n });\n}\n\nexport function BumpVersionInputSchema(): z.ZodObject<Properties<BumpVersionInput>> {\n return z.object({\n version: z.string(),\n });\n}\n\nexport function ClearAgentImageInputSchema(): z.ZodObject<Properties<ClearAgentImageInput>> {\n return z.object({\n _: z.boolean().nullish(),\n });\n}\n\nexport function DisableMastraInputSchema(): z.ZodObject<Properties<DisableMastraInput>> {\n return z.object({\n _: z.boolean().nullish(),\n });\n}\n\nexport function DisableRoutineInputSchema(): z.ZodObject<Properties<DisableRoutineInput>> {\n return z.object({\n _: z.boolean().nullish(),\n });\n}\n\nexport function EnableMastraInputSchema(): z.ZodObject<Properties<EnableMastraInput>> {\n return z.object({\n agentId: z.string(),\n agentName: z.string(),\n });\n}\n\nexport function EnableRoutineInputSchema(): z.ZodObject<Properties<EnableRoutineInput>> {\n return z.object({\n _: z.boolean().nullish(),\n });\n}\n\nexport function ExternalSkillSchema(): z.ZodObject<Properties<ExternalSkill>> {\n return z.object({\n __typename: z.literal('ExternalSkill').optional(),\n githubUrl: z.url(),\n id: z.string(),\n name: z.string(),\n });\n}\n\nexport function ImportModelInputSchema(): z.ZodObject<Properties<ImportModelInput>> {\n return z.object({\n id: z.string(),\n isDefault: z.boolean(),\n });\n}\n\nexport function ImportPackageInputSchema(): z.ZodObject<Properties<ImportPackageInput>> {\n return z.object({\n documentTypes: z.array(z.string()),\n id: z.string(),\n packageName: z.string(),\n version: z.string().nullish(),\n });\n}\n\nexport function ImportProfileInputSchema(): z.ZodObject<Properties<ImportProfileInput>> {\n return z.object({\n content: z.string(),\n id: z.string(),\n title: z.string(),\n });\n}\n\nexport function ImportSkillInputSchema(): z.ZodObject<Properties<ImportSkillInput>> {\n return z.object({\n githubUrl: z.url(),\n id: z.string(),\n name: z.string(),\n });\n}\n\nexport function ImportSpecInputSchema(): z.ZodObject<Properties<ImportSpecInput>> {\n return z.object({\n agentDescription: z.string().nullish(),\n agentId: z.string().nullish(),\n agentImage: z.string().nullish(),\n agentName: z.string().nullish(),\n description: z.string(),\n enableChat: z.boolean().nullish(),\n externalSkills: z.array(z.lazy(() => ImportSkillInputSchema())),\n mastraEnabled: z.boolean(),\n models: z.array(z.lazy(() => ImportModelInputSchema())).nullish(),\n name: z.string(),\n observabilityEnabled: z.boolean().nullish(),\n packages: z.array(z.lazy(() => ImportPackageInputSchema())),\n powerhouse: PowerhouseLevelSchema,\n profiles: z.array(z.lazy(() => ImportProfileInputSchema())).nullish(),\n proxyEnabled: z.boolean().nullish(),\n routineEnabled: z.boolean(),\n scope: z.string().nullish(),\n supportedResources: z.array(z.string()).nullish(),\n version: z.string(),\n });\n}\n\nexport function PhClintAgentModelSchema(): z.ZodObject<Properties<PhClintAgentModel>> {\n return z.object({\n __typename: z.literal('PhClintAgentModel').optional(),\n id: z.string(),\n isDefault: z.boolean(),\n });\n}\n\nexport function PhClintAgentProfileSchema(): z.ZodObject<Properties<PhClintAgentProfile>> {\n return z.object({\n __typename: z.literal('PhClintAgentProfile').optional(),\n content: z.string(),\n id: z.string(),\n title: z.string(),\n });\n}\n\nexport function PhClintDeploymentSchema(): z.ZodObject<Properties<PhClintDeployment>> {\n return z.object({\n __typename: z.literal('PhClintDeployment').optional(),\n observabilityEnabled: z.boolean(),\n proxyEnabled: z.boolean(),\n supportedResources: z.array(z.string()),\n });\n}\n\nexport function PhClintFeaturesSchema(): z.ZodObject<Properties<PhClintFeatures>> {\n return z.object({\n __typename: z.literal('PhClintFeatures').optional(),\n mastra: z.lazy(() => PhClintMastraFeatureSchema()),\n powerhouse: PowerhouseLevelSchema,\n routine: z.lazy(() => PhClintRoutineFeatureSchema()),\n });\n}\n\nexport function PhClintMastraCommonSchema(): z.ZodObject<Properties<PhClintMastraCommon>> {\n return z.object({\n __typename: z.literal('PhClintMastraCommon').optional(),\n enableChat: z.boolean(),\n });\n}\n\nexport function PhClintMastraFeatureSchema(): z.ZodObject<Properties<PhClintMastraFeature>> {\n return z.object({\n __typename: z.literal('PhClintMastraFeature').optional(),\n agentDescription: z.string().nullish(),\n agentId: z.string().nullish(),\n agentImage: z.string().nullish(),\n agentName: z.string().nullish(),\n common: z.lazy(() => PhClintMastraCommonSchema()),\n enabled: z.boolean(),\n models: z.array(z.lazy(() => PhClintAgentModelSchema())),\n profiles: z.array(z.lazy(() => PhClintAgentProfileSchema())),\n });\n}\n\nexport function PhClintProjectStateSchema(): z.ZodObject<Properties<PhClintProjectState>> {\n return z.object({\n __typename: z.literal('PhClintProjectState').optional(),\n deployment: z.lazy(() => PhClintDeploymentSchema()),\n description: z.string(),\n externalSkills: z.array(z.lazy(() => ExternalSkillSchema())),\n features: z.lazy(() => PhClintFeaturesSchema()),\n name: z.string().nullish(),\n packages: z.array(z.lazy(() => PowerhousePackageSchema())),\n publishHistory: z.array(z.lazy(() => PublishRecordSchema())),\n scope: z.string().nullish(),\n version: z.string(),\n });\n}\n\nexport function PhClintRoutineFeatureSchema(): z.ZodObject<Properties<PhClintRoutineFeature>> {\n return z.object({\n __typename: z.literal('PhClintRoutineFeature').optional(),\n enabled: z.boolean(),\n });\n}\n\nexport function PowerhousePackageSchema(): z.ZodObject<Properties<PowerhousePackage>> {\n return z.object({\n __typename: z.literal('PowerhousePackage').optional(),\n documentTypes: z.array(z.string()),\n id: z.string(),\n managed: z.boolean(),\n packageName: z.string(),\n version: z.string().nullish(),\n });\n}\n\nexport function PublishDevInputSchema(): z.ZodObject<Properties<PublishDevInput>> {\n return z.object({\n id: z.string(),\n timestamp: z.iso.datetime(),\n });\n}\n\nexport function PublishProductionInputSchema(): z.ZodObject<Properties<PublishProductionInput>> {\n return z.object({\n id: z.string(),\n timestamp: z.iso.datetime(),\n });\n}\n\nexport function PublishRecordSchema(): z.ZodObject<Properties<PublishRecord>> {\n return z.object({\n __typename: z.literal('PublishRecord').optional(),\n id: z.string(),\n status: PublishStatusSchema,\n tag: PublishTagSchema,\n timestamp: z.iso.datetime(),\n version: z.string(),\n });\n}\n\nexport function PublishStagingInputSchema(): z.ZodObject<Properties<PublishStagingInput>> {\n return z.object({\n id: z.string(),\n timestamp: z.iso.datetime(),\n });\n}\n\nexport function RemoveExternalSkillInputSchema(): z.ZodObject<Properties<RemoveExternalSkillInput>> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function RemoveModelInputSchema(): z.ZodObject<Properties<RemoveModelInput>> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function RemovePackageDocumentTypeInputSchema(): z.ZodObject<Properties<RemovePackageDocumentTypeInput>> {\n return z.object({\n documentType: z.string(),\n packageId: z.string(),\n });\n}\n\nexport function RemovePowerhousePackageInputSchema(): z.ZodObject<Properties<RemovePowerhousePackageInput>> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function RemoveProfileInputSchema(): z.ZodObject<Properties<RemoveProfileInput>> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function RemoveSupportedResourceInputSchema(): z.ZodObject<Properties<RemoveSupportedResourceInput>> {\n return z.object({\n resource: z.string(),\n });\n}\n\nexport function ReorderProfilesInputSchema(): z.ZodObject<Properties<ReorderProfilesInput>> {\n return z.object({\n ids: z.array(z.string()),\n insertBefore: z.string().nullish(),\n });\n}\n\nexport function SetAgentDescriptionInputSchema(): z.ZodObject<Properties<SetAgentDescriptionInput>> {\n return z.object({\n description: z.string(),\n });\n}\n\nexport function SetAgentIdInputSchema(): z.ZodObject<Properties<SetAgentIdInput>> {\n return z.object({\n agentId: z.string(),\n });\n}\n\nexport function SetAgentImageInputSchema(): z.ZodObject<Properties<SetAgentImageInput>> {\n return z.object({\n image: z.string(),\n });\n}\n\nexport function SetAgentNameInputSchema(): z.ZodObject<Properties<SetAgentNameInput>> {\n return z.object({\n agentName: z.string(),\n });\n}\n\nexport function SetDefaultModelInputSchema(): z.ZodObject<Properties<SetDefaultModelInput>> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function SetDescriptionInputSchema(): z.ZodObject<Properties<SetDescriptionInput>> {\n return z.object({\n description: z.string(),\n });\n}\n\nexport function SetEnableChatInputSchema(): z.ZodObject<Properties<SetEnableChatInput>> {\n return z.object({\n enabled: z.boolean(),\n });\n}\n\nexport function SetExternalSkillGithubUrlInputSchema(): z.ZodObject<Properties<SetExternalSkillGithubUrlInput>> {\n return z.object({\n githubUrl: z.url(),\n id: z.string(),\n });\n}\n\nexport function SetExternalSkillNameInputSchema(): z.ZodObject<Properties<SetExternalSkillNameInput>> {\n return z.object({\n id: z.string(),\n name: z.string(),\n });\n}\n\nexport function SetObservabilityEnabledInputSchema(): z.ZodObject<Properties<SetObservabilityEnabledInput>> {\n return z.object({\n enabled: z.boolean(),\n });\n}\n\nexport function SetPackageIdentifierInputSchema(): z.ZodObject<Properties<SetPackageIdentifierInput>> {\n return z.object({\n identifier: z.string(),\n });\n}\n\nexport function SetPackageVersionInputSchema(): z.ZodObject<Properties<SetPackageVersionInput>> {\n return z.object({\n packageId: z.string(),\n version: z.string().nullish(),\n });\n}\n\nexport function SetPowerhouseLevelInputSchema(): z.ZodObject<Properties<SetPowerhouseLevelInput>> {\n return z.object({\n level: PowerhouseLevelSchema,\n skipAutoProxy: z.boolean().nullish(),\n });\n}\n\nexport function SetProxyEnabledInputSchema(): z.ZodObject<Properties<SetProxyEnabledInput>> {\n return z.object({\n enabled: z.boolean(),\n });\n}\n\nexport function SetPublishStatusInputSchema(): z.ZodObject<Properties<SetPublishStatusInput>> {\n return z.object({\n id: z.string(),\n status: PublishStatusSchema,\n });\n}\n\nexport function SetVersionInputSchema(): z.ZodObject<Properties<SetVersionInput>> {\n return z.object({\n version: z.string(),\n });\n}\n\nexport function UpdateProfileInputSchema(): z.ZodObject<Properties<UpdateProfileInput>> {\n return z.object({\n content: z.string().nullish(),\n id: z.string(),\n title: z.string().nullish(),\n });\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from 'document-model';\nimport { AddSupportedResourceInputSchema, RemoveSupportedResourceInputSchema, SetObservabilityEnabledInputSchema, SetProxyEnabledInputSchema } from '../schema/zod.js';\nimport type { AddSupportedResourceInput, RemoveSupportedResourceInput, SetObservabilityEnabledInput, SetProxyEnabledInput } from '../types.js';\nimport type { AddSupportedResourceAction, RemoveSupportedResourceAction, SetObservabilityEnabledAction, SetProxyEnabledAction } from './actions.js';\n\nexport const addSupportedResource = (input: AddSupportedResourceInput) => createAction<AddSupportedResourceAction>('ADD_SUPPORTED_RESOURCE', { ...input }, undefined, AddSupportedResourceInputSchema, 'global');\n\nexport const removeSupportedResource = (input: RemoveSupportedResourceInput) => createAction<RemoveSupportedResourceAction>('REMOVE_SUPPORTED_RESOURCE', { ...input }, undefined, RemoveSupportedResourceInputSchema, 'global');\n\nexport const setProxyEnabled = (input: SetProxyEnabledInput) => createAction<SetProxyEnabledAction>('SET_PROXY_ENABLED', { ...input }, undefined, SetProxyEnabledInputSchema, 'global');\n\nexport const setObservabilityEnabled = (input: SetObservabilityEnabledInput) => createAction<SetObservabilityEnabledAction>('SET_OBSERVABILITY_ENABLED', { ...input }, undefined, SetObservabilityEnabledInputSchema, 'global');\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from 'document-model';\nimport { AddExternalSkillInputSchema, RemoveExternalSkillInputSchema, SetExternalSkillGithubUrlInputSchema, SetExternalSkillNameInputSchema } from '../schema/zod.js';\nimport type { AddExternalSkillInput, RemoveExternalSkillInput, SetExternalSkillGithubUrlInput, SetExternalSkillNameInput } from '../types.js';\nimport type { AddExternalSkillAction, RemoveExternalSkillAction, SetExternalSkillGithubUrlAction, SetExternalSkillNameAction } from './actions.js';\n\nexport const addExternalSkill = (input: AddExternalSkillInput) => createAction<AddExternalSkillAction>('ADD_EXTERNAL_SKILL', { ...input }, undefined, AddExternalSkillInputSchema, 'global');\n\nexport const removeExternalSkill = (input: RemoveExternalSkillInput) => createAction<RemoveExternalSkillAction>('REMOVE_EXTERNAL_SKILL', { ...input }, undefined, RemoveExternalSkillInputSchema, 'global');\n\nexport const setExternalSkillName = (input: SetExternalSkillNameInput) => createAction<SetExternalSkillNameAction>('SET_EXTERNAL_SKILL_NAME', { ...input }, undefined, SetExternalSkillNameInputSchema, 'global');\n\nexport const setExternalSkillGithubUrl = (input: SetExternalSkillGithubUrlInput) => createAction<SetExternalSkillGithubUrlAction>('SET_EXTERNAL_SKILL_GITHUB_URL', { ...input }, undefined, SetExternalSkillGithubUrlInputSchema, 'global');\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from 'document-model';\nimport {\n AddModelInputSchema,\n AddProfileInputSchema,\n ClearAgentImageInputSchema,\n DisableMastraInputSchema,\n EnableMastraInputSchema,\n RemoveModelInputSchema,\n RemoveProfileInputSchema,\n ReorderProfilesInputSchema,\n SetAgentDescriptionInputSchema,\n SetAgentIdInputSchema,\n SetAgentImageInputSchema,\n SetAgentNameInputSchema,\n SetDefaultModelInputSchema,\n SetEnableChatInputSchema,\n UpdateProfileInputSchema,\n} from '../schema/zod.js';\nimport type {\n AddModelInput,\n AddProfileInput,\n ClearAgentImageInput,\n DisableMastraInput,\n EnableMastraInput,\n RemoveModelInput,\n RemoveProfileInput,\n ReorderProfilesInput,\n SetAgentDescriptionInput,\n SetAgentIdInput,\n SetAgentImageInput,\n SetAgentNameInput,\n SetDefaultModelInput,\n SetEnableChatInput,\n UpdateProfileInput,\n} from '../types.js';\nimport type {\n AddModelAction,\n AddProfileAction,\n ClearAgentImageAction,\n DisableMastraAction,\n EnableMastraAction,\n RemoveModelAction,\n RemoveProfileAction,\n ReorderProfilesAction,\n SetAgentDescriptionAction,\n SetAgentIdAction,\n SetAgentImageAction,\n SetAgentNameAction,\n SetDefaultModelAction,\n SetEnableChatAction,\n UpdateProfileAction,\n} from './actions.js';\n\nexport const enableMastra = (input: EnableMastraInput) => createAction<EnableMastraAction>('ENABLE_MASTRA', { ...input }, undefined, EnableMastraInputSchema, 'global');\n\nexport const disableMastra = (input: DisableMastraInput) => createAction<DisableMastraAction>('DISABLE_MASTRA', { ...input }, undefined, DisableMastraInputSchema, 'global');\n\nexport const setAgentId = (input: SetAgentIdInput) => createAction<SetAgentIdAction>('SET_AGENT_ID', { ...input }, undefined, SetAgentIdInputSchema, 'global');\n\nexport const setAgentName = (input: SetAgentNameInput) => createAction<SetAgentNameAction>('SET_AGENT_NAME', { ...input }, undefined, SetAgentNameInputSchema, 'global');\n\nexport const addModel = (input: AddModelInput) => createAction<AddModelAction>('ADD_MODEL', { ...input }, undefined, AddModelInputSchema, 'global');\n\nexport const removeModel = (input: RemoveModelInput) => createAction<RemoveModelAction>('REMOVE_MODEL', { ...input }, undefined, RemoveModelInputSchema, 'global');\n\nexport const setDefaultModel = (input: SetDefaultModelInput) => createAction<SetDefaultModelAction>('SET_DEFAULT_MODEL', { ...input }, undefined, SetDefaultModelInputSchema, 'global');\n\nexport const addProfile = (input: AddProfileInput) => createAction<AddProfileAction>('ADD_PROFILE', { ...input }, undefined, AddProfileInputSchema, 'global');\n\nexport const updateProfile = (input: UpdateProfileInput) => createAction<UpdateProfileAction>('UPDATE_PROFILE', { ...input }, undefined, UpdateProfileInputSchema, 'global');\n\nexport const removeProfile = (input: RemoveProfileInput) => createAction<RemoveProfileAction>('REMOVE_PROFILE', { ...input }, undefined, RemoveProfileInputSchema, 'global');\n\nexport const reorderProfiles = (input: ReorderProfilesInput) => createAction<ReorderProfilesAction>('REORDER_PROFILES', { ...input }, undefined, ReorderProfilesInputSchema, 'global');\n\nexport const setAgentDescription = (input: SetAgentDescriptionInput) => createAction<SetAgentDescriptionAction>('SET_AGENT_DESCRIPTION', { ...input }, undefined, SetAgentDescriptionInputSchema, 'global');\n\nexport const setAgentImage = (input: SetAgentImageInput) => createAction<SetAgentImageAction>('SET_AGENT_IMAGE', { ...input }, undefined, SetAgentImageInputSchema, 'global');\n\nexport const clearAgentImage = (input: ClearAgentImageInput) => createAction<ClearAgentImageAction>('CLEAR_AGENT_IMAGE', { ...input }, undefined, ClearAgentImageInputSchema, 'global');\n\nexport const setEnableChat = (input: SetEnableChatInput) => createAction<SetEnableChatAction>('SET_ENABLE_CHAT', { ...input }, undefined, SetEnableChatInputSchema, 'global');\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from 'document-model';\nimport { SetPowerhouseLevelInputSchema } from '../schema/zod.js';\nimport type { SetPowerhouseLevelInput } from '../types.js';\nimport type { SetPowerhouseLevelAction } from './actions.js';\n\nexport const setPowerhouseLevel = (input: SetPowerhouseLevelInput) => createAction<SetPowerhouseLevelAction>('SET_POWERHOUSE_LEVEL', { ...input }, undefined, SetPowerhouseLevelInputSchema, 'global');\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from 'document-model';\nimport { DisableRoutineInputSchema, EnableRoutineInputSchema } from '../schema/zod.js';\nimport type { DisableRoutineInput, EnableRoutineInput } from '../types.js';\nimport type { DisableRoutineAction, EnableRoutineAction } from './actions.js';\n\nexport const enableRoutine = (input: EnableRoutineInput) => createAction<EnableRoutineAction>('ENABLE_ROUTINE', { ...input }, undefined, EnableRoutineInputSchema, 'global');\n\nexport const disableRoutine = (input: DisableRoutineInput) => createAction<DisableRoutineAction>('DISABLE_ROUTINE', { ...input }, undefined, DisableRoutineInputSchema, 'global');\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from 'document-model';\nimport { SetDescriptionInputSchema, SetPackageIdentifierInputSchema, SetVersionInputSchema } from '../schema/zod.js';\nimport type { SetDescriptionInput, SetPackageIdentifierInput, SetVersionInput } from '../types.js';\nimport type { SetDescriptionAction, SetPackageIdentifierAction, SetVersionAction } from './actions.js';\n\nexport const setDescription = (input: SetDescriptionInput) => createAction<SetDescriptionAction>('SET_DESCRIPTION', { ...input }, undefined, SetDescriptionInputSchema, 'global');\n\nexport const setVersion = (input: SetVersionInput) => createAction<SetVersionAction>('SET_VERSION', { ...input }, undefined, SetVersionInputSchema, 'global');\n\nexport const setPackageIdentifier = (input: SetPackageIdentifierInput) => createAction<SetPackageIdentifierAction>('SET_PACKAGE_IDENTIFIER', { ...input }, undefined, SetPackageIdentifierInputSchema, 'global');\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from 'document-model';\nimport { ImportSpecInputSchema } from '../schema/zod.js';\nimport type { ImportSpecInput } from '../types.js';\nimport type { ImportSpecAction } from './actions.js';\n\nexport const importSpec = (input: ImportSpecInput) => createAction<ImportSpecAction>('IMPORT_SPEC', { ...input }, undefined, ImportSpecInputSchema, 'global');\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from 'document-model';\nimport { AddPackageDocumentTypeInputSchema, AddPowerhousePackageInputSchema, RemovePackageDocumentTypeInputSchema, RemovePowerhousePackageInputSchema, SetPackageVersionInputSchema } from '../schema/zod.js';\nimport type { AddPackageDocumentTypeInput, AddPowerhousePackageInput, RemovePackageDocumentTypeInput, RemovePowerhousePackageInput, SetPackageVersionInput } from '../types.js';\nimport type { AddPackageDocumentTypeAction, AddPowerhousePackageAction, RemovePackageDocumentTypeAction, RemovePowerhousePackageAction, SetPackageVersionAction } from './actions.js';\n\nexport const addPowerhousePackage = (input: AddPowerhousePackageInput) => createAction<AddPowerhousePackageAction>('ADD_POWERHOUSE_PACKAGE', { ...input }, undefined, AddPowerhousePackageInputSchema, 'global');\n\nexport const removePowerhousePackage = (input: RemovePowerhousePackageInput) => createAction<RemovePowerhousePackageAction>('REMOVE_POWERHOUSE_PACKAGE', { ...input }, undefined, RemovePowerhousePackageInputSchema, 'global');\n\nexport const addPackageDocumentType = (input: AddPackageDocumentTypeInput) => createAction<AddPackageDocumentTypeAction>('ADD_PACKAGE_DOCUMENT_TYPE', { ...input }, undefined, AddPackageDocumentTypeInputSchema, 'global');\n\nexport const removePackageDocumentType = (input: RemovePackageDocumentTypeInput) => createAction<RemovePackageDocumentTypeAction>('REMOVE_PACKAGE_DOCUMENT_TYPE', { ...input }, undefined, RemovePackageDocumentTypeInputSchema, 'global');\n\nexport const setPackageVersion = (input: SetPackageVersionInput) => createAction<SetPackageVersionAction>('SET_PACKAGE_VERSION', { ...input }, undefined, SetPackageVersionInputSchema, 'global');\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from 'document-model';\nimport { BumpVersionInputSchema, PublishDevInputSchema, PublishProductionInputSchema, PublishStagingInputSchema, SetPublishStatusInputSchema } from '../schema/zod.js';\nimport type { BumpVersionInput, PublishDevInput, PublishProductionInput, PublishStagingInput, SetPublishStatusInput } from '../types.js';\nimport type { BumpVersionAction, PublishDevAction, PublishProductionAction, PublishStagingAction, SetPublishStatusAction } from './actions.js';\n\nexport const bumpVersion = (input: BumpVersionInput) => createAction<BumpVersionAction>('BUMP_VERSION', { ...input }, undefined, BumpVersionInputSchema, 'global');\n\nexport const publishDev = (input: PublishDevInput) => createAction<PublishDevAction>('PUBLISH_DEV', { ...input }, undefined, PublishDevInputSchema, 'global');\n\nexport const publishStaging = (input: PublishStagingInput) => createAction<PublishStagingAction>('PUBLISH_STAGING', { ...input }, undefined, PublishStagingInputSchema, 'global');\n\nexport const publishProduction = (input: PublishProductionInput) => createAction<PublishProductionAction>('PUBLISH_PRODUCTION', { ...input }, undefined, PublishProductionInputSchema, 'global');\n\nexport const setPublishStatus = (input: SetPublishStatusInput) => createAction<SetPublishStatusAction>('SET_PUBLISH_STATUS', { ...input }, undefined, SetPublishStatusInputSchema, 'global');\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { baseActions } from 'document-model';\nimport {\n phClintProjectDeploymentActions,\n phClintProjectExternalSkillsActions,\n phClintProjectFeaturesMastraActions,\n phClintProjectFeaturesPowerhouseActions,\n phClintProjectFeaturesRoutineActions,\n phClintProjectIdentityActions,\n phClintProjectLifecycleActions,\n phClintProjectPowerhousePackagesActions,\n phClintProjectPublishingActions,\n} from './gen/creators.js';\n\n/** Actions for the PhClintProject document model */\n\nexport const actions = {\n ...baseActions,\n ...phClintProjectIdentityActions,\n ...phClintProjectFeaturesPowerhouseActions,\n ...phClintProjectFeaturesMastraActions,\n ...phClintProjectFeaturesRoutineActions,\n ...phClintProjectPowerhousePackagesActions,\n ...phClintProjectExternalSkillsActions,\n ...phClintProjectPublishingActions,\n ...phClintProjectLifecycleActions,\n ...phClintProjectDeploymentActions,\n};\n","import type { DocumentModelGlobalState } from 'document-model';\n\nexport const documentModel: DocumentModelGlobalState = {\n id: 'powerhouse/ph-clint-project',\n name: 'PhClintProject',\n author: {\n name: 'Powerhouse Inc.',\n website: 'https://powerhouse.inc',\n },\n extension: 'pcp',\n description:\n 'A ph-clint implementation project specification. Drives code generation of a ph-clint CLI project: identity fields (name, scope, version, description, bin) plus three feature toggles (Powerhouse, Mastra, Routine). Enabling Powerhouse is irreversible; enabling Mastra auto-enables Routine; disabling Routine is blocked while Mastra is on.',\n specifications: [\n {\n state: {\n local: {\n schema: '',\n examples: [],\n initialValue: '',\n },\n global: {\n schema:\n 'type PhClintProjectState {\\n name: String\\n scope: String\\n version: String!\\n description: String!\\n features: PhClintFeatures!\\n packages: [PowerhousePackage!]!\\n externalSkills: [ExternalSkill!]!\\n publishHistory: [PublishRecord!]!\\n deployment: PhClintDeployment!\\n}\\n\\ntype PhClintFeatures {\\n powerhouse: PowerhouseLevel!\\n mastra: PhClintMastraFeature!\\n routine: PhClintRoutineFeature!\\n}\\n\\nenum PowerhouseLevel {\\n Disabled\\n Reactor\\n Switchboard\\n Connect\\n}\\n\\ntype PhClintMastraFeature {\\n enabled: Boolean!\\n agentId: String\\n agentName: String\\n agentDescription: String\\n agentImage: String\\n models: [PhClintAgentModel!]!\\n profiles: [PhClintAgentProfile!]!\\n common: PhClintMastraCommon!\\n}\\n\\ntype PhClintMastraCommon {\\n enableChat: Boolean!\\n}\\n\\ntype PhClintAgentModel {\\n id: String!\\n isDefault: Boolean!\\n}\\n\\ntype PhClintAgentProfile {\\n id: String!\\n title: String!\\n content: String!\\n}\\n\\ntype PhClintRoutineFeature {\\n enabled: Boolean!\\n}\\n\\ntype PowerhousePackage {\\n id: OID!\\n packageName: String!\\n documentTypes: [String!]!\\n version: String\\n managed: Boolean!\\n}\\n\\ntype ExternalSkill {\\n id: OID!\\n name: String!\\n githubUrl: URL!\\n}\\n\\nenum PublishTag {\\n Dev\\n Staging\\n Production\\n}\\n\\nenum PublishStatus {\\n Pending\\n InProgress\\n Succeeded\\n Failed\\n}\\n\\ntype PublishRecord {\\n id: OID!\\n tag: PublishTag!\\n version: String!\\n timestamp: DateTime!\\n status: PublishStatus!\\n}\\n\\ntype PhClintDeployment {\\n proxyEnabled: Boolean!\\n observabilityEnabled: Boolean!\\n supportedResources: [String!]!\\n}',\n examples: [],\n initialValue:\n '{\\n \"name\": null,\\n \"scope\": null,\\n \"version\": \"0.1.0\",\\n \"description\": \"\",\\n \"features\": {\\n \"powerhouse\": \"Disabled\",\\n \"mastra\": {\\n \"enabled\": false,\\n \"agentId\": null,\\n \"agentName\": null,\\n \"agentDescription\": null,\\n \"agentImage\": null,\\n \"models\": [],\\n \"profiles\": [],\\n \"common\": { \"enableChat\": false }\\n },\\n \"routine\": { \"enabled\": false }\\n },\\n \"packages\": [],\\n \"externalSkills\": [],\\n \"publishHistory\": [],\\n \"deployment\": {\\n \"proxyEnabled\": false,\\n \"observabilityEnabled\": false,\\n \"supportedResources\": [\\n \"vetra-agent-s\",\\n \"vetra-agent-m\",\\n \"vetra-agent-l\",\\n \"vetra-agent-xl\",\\n \"vetra-agent-xxl\"\\n ]\\n }\\n}',\n },\n },\n modules: [\n {\n id: 'm-identity',\n name: 'identity',\n description: 'Package identity fields: name, scope, version, description, bin',\n operations: [\n {\n id: 'o-set-description',\n name: 'SET_DESCRIPTION',\n description: 'Set the package description.',\n schema: 'input SetDescriptionInput {\\n description: String!\\n}',\n template: 'Set the package description.',\n reducer: 'state.description = action.input.description;',\n errors: [],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-version',\n name: 'SET_VERSION',\n description: 'Set the package version. Must be a valid semver string.',\n schema: 'input SetVersionInput {\\n version: String!\\n}',\n template: 'Set the package version. Must be a valid semver string.',\n reducer: 'if (!/^\\\\d+\\\\.\\\\d+\\\\.\\\\d+(?:-[0-9A-Za-z.-]+)?(?:\\\\+[0-9A-Za-z.-]+)?$/.test(action.input.version)) {\\n throw new InvalidVersionError(`Invalid version: ${action.input.version}`);\\n}\\nstate.version = action.input.version;',\n errors: [\n {\n id: 'e-set-version-invalid',\n name: 'InvalidVersionError',\n code: 'INVALID_VERSION',\n description: 'The version must be a valid semver string (major.minor.patch, optionally with prerelease/build metadata).',\n template: 'Invalid version: {{version}}',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-package-identifier',\n name: 'SET_PACKAGE_IDENTIFIER',\n description: \"Set the package identifier. Parses scope and name from a string like '@scope/name-cli' or just 'name-cli'. Auto-adds '-cli' suffix if missing, stores scope with '@' prefix.\",\n schema: 'input SetPackageIdentifierInput {\\n identifier: String!\\n}',\n template: \"Set the package identifier. Parses scope and name from a string like '@scope/name-cli' or just 'name-cli'.\",\n reducer:\n \"const trimmed = action.input.identifier.trim();\\nif (!trimmed) {\\n throw new InvalidPackageIdentifierError('Package identifier must not be empty');\\n}\\nlet scopePart = null;\\nlet namePart = trimmed;\\nif (trimmed.includes('/')) {\\n const parts = trimmed.split('/');\\n if (parts.length !== 2 || !parts[0] || !parts[1]) {\\n throw new InvalidPackageIdentifierError(`Invalid package identifier: ${trimmed}`);\\n }\\n scopePart = parts[0].replace(/^@/, '');\\n namePart = parts[1];\\n}\\nif (scopePart !== null) {\\n if (!/^[a-z][a-z0-9-]*$/.test(scopePart)) {\\n throw new InvalidPackageIdentifierError(`Invalid scope: ${scopePart}`);\\n }\\n}\\nif (!namePart.endsWith('-cli')) {\\n namePart = namePart + '-cli';\\n}\\nif (!/^[a-z][a-z0-9-]*$/.test(namePart)) {\\n throw new InvalidPackageIdentifierError(`Invalid package name: ${namePart}`);\\n}\\nstate.scope = scopePart ? `@${scopePart}` : null;\\nstate.name = namePart;\\nconst managed = state.packages.find((p) => p.managed);\\nif (managed) {\\n const appBase = namePart.replace(/-cli$/, '-app');\\n managed.packageName = scopePart ? `@${scopePart}/${appBase}` : appBase;\\n managed.id = `app-${namePart}`;\\n}\",\n errors: [\n {\n id: 'e-invalid-package-identifier',\n name: 'InvalidPackageIdentifierError',\n code: 'INVALID_PACKAGE_IDENTIFIER',\n description: 'The package identifier is invalid. Must be a valid npm package name with optional scope.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n ],\n },\n {\n id: 'm-features-powerhouse',\n name: 'features_powerhouse',\n description: 'Powerhouse integration level. Ordered enum: Disabled < Reactor < Switchboard < Connect. Once above Disabled, cannot go back to Disabled (irreversible migration).',\n operations: [\n {\n id: 'o-set-powerhouse-level',\n name: 'SET_POWERHOUSE_LEVEL',\n description: 'Set the Powerhouse integration level. Ordered: Disabled < Reactor < Switchboard < Connect. Lowering below Reactor once above Disabled is not allowed (irreversible migration).',\n schema: 'input SetPowerhouseLevelInput {\\n level: PowerhouseLevel!\\n skipAutoProxy: Boolean\\n}',\n template: 'Set the Powerhouse integration level. Ordered: Disabled < Reactor < Switchboard < Connect. Lowering below Reactor once above Disabled is not allowed (irreversible migration).',\n reducer:\n \"const LEVELS = ['Disabled', 'Reactor', 'Switchboard', 'Connect'];\\nconst current = LEVELS.indexOf(state.features.powerhouse);\\nconst next = LEVELS.indexOf(action.input.level);\\nif (current >= 1 && next < 1) {\\n throw new CannotLowerPowerhouseError(\\n 'Cannot lower Powerhouse level below Reactor once enabled',\\n );\\n}\\nstate.features.powerhouse = action.input.level;\\nif (current === 0 && next >= 1) {\\n const hasManaged = state.packages.some((p) => p.managed);\\n if (!hasManaged) {\\n const baseName = state.name\\n ? state.name.replace(/-cli$/, '-app')\\n : 'app';\\n const appName =\\n state.scope && state.name\\n ? `${state.scope}/${baseName}`\\n : baseName;\\n state.packages.push({\\n id: `app-${state.name || 'managed'}`,\\n packageName: appName,\\n documentTypes: ['*/*'],\\n version: null,\\n managed: true,\\n });\\n }\\n}\\nif (next >= 2 && !action.input.skipAutoProxy) {\\n state.deployment.proxyEnabled = true;\\n}\",\n errors: [\n {\n id: 'e-cannot-lower-powerhouse',\n name: 'CannotLowerPowerhouseError',\n code: 'CANNOT_LOWER_POWERHOUSE',\n description: 'Cannot lower the Powerhouse level below Reactor once it has been set above Disabled.',\n template: 'Cannot lower Powerhouse level below Reactor once enabled',\n },\n ],\n examples: [],\n scope: 'global',\n },\n ],\n },\n {\n id: 'm-features-mastra',\n name: 'features_mastra',\n description: 'Mastra agent feature toggle. Orthogonal to Routine.',\n operations: [\n {\n id: 'o-enable-mastra',\n name: 'ENABLE_MASTRA',\n description: 'Enable the Mastra agent feature. Mastra and Routine are orthogonal \\u2014 enable Routine separately if needed. Idempotent.',\n schema: 'input EnableMastraInput {\\n agentId: String!\\n agentName: String!\\n}',\n template: 'Enable the Mastra agent feature. Mastra and Routine are orthogonal \\u2014 enable Routine separately if needed. Idempotent.',\n reducer:\n \"if (!/^[a-z][a-z0-9-]*$/.test(action.input.agentId)) {\\n throw new InvalidAgentIdError(\\n `Invalid agent ID: ${action.input.agentId}. Must be lowercase kebab-case.`,\\n );\\n}\\nconst trimmedName = action.input.agentName.trim();\\nif (!trimmedName) {\\n throw new InvalidAgentNameError('Agent name must not be empty.');\\n}\\nstate.features.mastra.enabled = true;\\nstate.features.mastra.agentId = action.input.agentId;\\nstate.features.mastra.agentName = trimmedName;\\n// Auto-add default model and profile\\nif (state.features.mastra.models.length === 0) {\\n state.features.mastra.models.push({ id: 'clint/demo-agent', isDefault: true });\\n}\\nif (state.features.mastra.profiles.length === 0) {\\n state.features.mastra.profiles.push({ id: 'base', title: 'Base Profile', content: 'You are a helpful assistant.' });\\n}\",\n errors: [\n {\n id: 'e-enable-mastra-invalid-id',\n name: 'InvalidAgentIdError',\n code: 'INVALID_AGENT_ID',\n description: 'The agent ID must match /^[a-z][a-z0-9-]*$/ \\u2014 lowercase kebab-case.',\n template: '',\n },\n {\n id: 'e-enable-mastra-invalid-name',\n name: 'InvalidAgentNameError',\n code: 'INVALID_AGENT_NAME',\n description: 'The agent name must not be empty after trimming.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-disable-mastra',\n name: 'DISABLE_MASTRA',\n description: 'Disable the Mastra agent feature. Does not affect Routine \\u2014 disable that separately if desired.',\n schema: 'input DisableMastraInput {\\n _: Boolean\\n}',\n template: 'Disable the Mastra agent feature. Does not affect Routine \\u2014 disable that separately if desired.',\n reducer:\n \"state.features.mastra.enabled = false;\\nstate.features.mastra.agentId = null;\\nstate.features.mastra.agentName = null;\\nstate.features.mastra.agentDescription = null;\\nstate.features.mastra.agentImage = null;\\nstate.features.mastra.models = [];\\nstate.features.mastra.profiles = [];\\nstate.features.mastra.common.enableChat = false;\\n// Remove auto-added clint-common package if managed\\nconst ccIdx = state.packages.findIndex(\\n (p) => p.packageName === '@powerhousedao/clint-common' && p.managed,\\n);\\nif (ccIdx !== -1) {\\n state.packages.splice(ccIdx, 1);\\n}\",\n errors: [],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-agent-id',\n name: 'SET_AGENT_ID',\n description: 'Set the agent ID. Must be lowercase kebab-case. Only valid when mastra is enabled.',\n schema: 'input SetAgentIdInput {\\n agentId: String!\\n}',\n template: 'Set the agent ID. Must be lowercase kebab-case. Only valid when mastra is enabled.',\n reducer:\n \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError('Cannot set agent ID when Mastra is disabled.');\\n}\\nif (!/^[a-z][a-z0-9-]*$/.test(action.input.agentId)) {\\n throw new InvalidAgentIdError(`Invalid agent ID: ${action.input.agentId}. Must be lowercase kebab-case.`);\\n}\\nstate.features.mastra.agentId = action.input.agentId;\",\n errors: [\n {\n id: 'e-set-agent-id-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before setting agent identity.',\n template: '',\n },\n {\n id: 'e-set-agent-id-invalid',\n name: 'InvalidAgentIdError',\n code: 'INVALID_AGENT_ID',\n description: 'The agent ID must match /^[a-z][a-z0-9-]*$/ \\u2014 lowercase kebab-case.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-agent-name',\n name: 'SET_AGENT_NAME',\n description: 'Set the agent display name. Must be non-empty after trim. Only valid when mastra is enabled.',\n schema: 'input SetAgentNameInput {\\n agentName: String!\\n}',\n template: 'Set the agent display name. Must be non-empty after trim. Only valid when mastra is enabled.',\n reducer:\n \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError('Cannot set agent name when Mastra is disabled.');\\n}\\nconst trimmedName = action.input.agentName.trim();\\nif (!trimmedName) {\\n throw new InvalidAgentNameError('Agent name must not be empty.');\\n}\\nstate.features.mastra.agentName = trimmedName;\",\n errors: [\n {\n id: 'e-set-agent-name-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before setting agent identity.',\n template: '',\n },\n {\n id: 'e-set-agent-name-invalid',\n name: 'InvalidAgentNameError',\n code: 'INVALID_AGENT_NAME',\n description: 'The agent name must not be empty after trimming.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-add-model',\n name: 'ADD_MODEL',\n description: 'Add a model to the agent. ID must be provider/model-name format. First model is forced default. If isDefault is true, previous default is unset.',\n schema: 'input AddModelInput {\\n id: String!\\n isDefault: Boolean\\n}',\n template: 'Add a model to the agent. ID must be provider/model-name format. First model is forced default. If isDefault is true, previous default is unset.',\n reducer:\n \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError('Cannot add model when Mastra is disabled.');\\n}\\nif (!/^[a-z0-9-]+\\\\/[a-z0-9._-]+$/.test(action.input.id)) {\\n throw new InvalidModelIdError(`Invalid model ID: ${action.input.id}. Must be provider/model-name format.`);\\n}\\nif (state.features.mastra.models.find(m => m.id === action.input.id)) {\\n throw new DuplicateModelError(`Model already exists: ${action.input.id}`);\\n}\\nconst isFirst = state.features.mastra.models.length === 0;\\nconst makeDefault = isFirst || action.input.isDefault === true;\\nif (makeDefault) {\\n for (const m of state.features.mastra.models) {\\n m.isDefault = false;\\n }\\n}\\nstate.features.mastra.models.push({\\n id: action.input.id,\\n isDefault: makeDefault,\\n});\",\n errors: [\n {\n id: 'e-add-model-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before managing models.',\n template: '',\n },\n {\n id: 'e-add-model-invalid-id',\n name: 'InvalidModelIdError',\n code: 'INVALID_MODEL_ID',\n description: 'Model ID must match provider/model-name format.',\n template: '',\n },\n {\n id: 'e-add-model-duplicate',\n name: 'DuplicateModelError',\n code: 'DUPLICATE_MODEL',\n description: 'A model with this ID already exists.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-remove-model',\n name: 'REMOVE_MODEL',\n description: 'Remove a model. If removing the default and others remain, promotes first remaining to default.',\n schema: 'input RemoveModelInput {\\n id: String!\\n}',\n template: 'Remove a model. If removing the default and others remain, promotes first remaining to default.',\n reducer:\n \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError('Cannot remove model when Mastra is disabled.');\\n}\\nconst idx = state.features.mastra.models.findIndex(m => m.id === action.input.id);\\nif (idx === -1) {\\n throw new ModelNotFoundError(`Model not found: ${action.input.id}`);\\n}\\nconst wasDefault = state.features.mastra.models[idx].isDefault;\\nstate.features.mastra.models.splice(idx, 1);\\nif (wasDefault && state.features.mastra.models.length > 0) {\\n state.features.mastra.models[0].isDefault = true;\\n}\",\n errors: [\n {\n id: 'e-remove-model-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before managing models.',\n template: '',\n },\n {\n id: 'e-remove-model-not-found',\n name: 'ModelNotFoundError',\n code: 'MODEL_NOT_FOUND',\n description: 'The specified model was not found.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-default-model',\n name: 'SET_DEFAULT_MODEL',\n description: 'Set a model as the default. Unsets the previous default.',\n schema: 'input SetDefaultModelInput {\\n id: String!\\n}',\n template: 'Set a model as the default. Unsets the previous default.',\n reducer:\n \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError('Cannot set default model when Mastra is disabled.');\\n}\\nconst model = state.features.mastra.models.find(m => m.id === action.input.id);\\nif (!model) {\\n throw new ModelNotFoundError(`Model not found: ${action.input.id}`);\\n}\\nfor (const m of state.features.mastra.models) {\\n m.isDefault = false;\\n}\\nmodel.isDefault = true;\",\n errors: [\n {\n id: 'e-set-default-model-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before managing models.',\n template: '',\n },\n {\n id: 'e-set-default-model-not-found',\n name: 'ModelNotFoundError',\n code: 'MODEL_NOT_FOUND',\n description: 'The specified model was not found.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-add-profile',\n name: 'ADD_PROFILE',\n description: 'Add an agent profile section. Inserted before insertBefore if provided, otherwise appended to end.',\n schema: 'input AddProfileInput {\\n id: String!\\n title: String!\\n content: String!\\n insertBefore: String\\n}',\n template: 'Add an agent profile section. Inserted before insertBefore if provided, otherwise appended to end.',\n reducer:\n \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError('Cannot add profile when Mastra is disabled.');\\n}\\nif (!/^[a-z][a-z0-9-]*$/.test(action.input.id)) {\\n throw new InvalidProfileIdError(`Invalid profile ID: ${action.input.id}. Must be lowercase kebab-case.`);\\n}\\nif (state.features.mastra.profiles.find(p => p.id === action.input.id)) {\\n throw new DuplicateProfileError(`Profile already exists: ${action.input.id}`);\\n}\\nconst profile = {\\n id: action.input.id,\\n title: action.input.title,\\n content: action.input.content,\\n};\\nif (action.input.insertBefore) {\\n const beforeIdx = state.features.mastra.profiles.findIndex(p => p.id === action.input.insertBefore);\\n if (beforeIdx === -1) {\\n throw new ProfileNotFoundError(`insertBefore profile not found: ${action.input.insertBefore}`);\\n }\\n state.features.mastra.profiles.splice(beforeIdx, 0, profile);\\n} else {\\n state.features.mastra.profiles.push(profile);\\n}\",\n errors: [\n {\n id: 'e-add-profile-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before managing profiles.',\n template: '',\n },\n {\n id: 'e-add-profile-invalid-id',\n name: 'InvalidProfileIdError',\n code: 'INVALID_PROFILE_ID',\n description: 'Profile ID must match /^[a-z][a-z0-9-]*$/ \\u2014 lowercase kebab-case.',\n template: '',\n },\n {\n id: 'e-add-profile-duplicate',\n name: 'DuplicateProfileError',\n code: 'DUPLICATE_PROFILE',\n description: 'A profile with this ID already exists.',\n template: '',\n },\n {\n id: 'e-add-profile-not-found',\n name: 'ProfileNotFoundError',\n code: 'PROFILE_NOT_FOUND',\n description: 'The insertBefore profile was not found.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-update-profile',\n name: 'UPDATE_PROFILE',\n description: \"Update an existing profile's title and/or content. Only updates provided fields.\",\n schema: 'input UpdateProfileInput {\\n id: String!\\n title: String\\n content: String\\n}',\n template: \"Update an existing profile's title and/or content. Only updates provided fields.\",\n reducer:\n \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError('Cannot update profile when Mastra is disabled.');\\n}\\nconst profile = state.features.mastra.profiles.find(p => p.id === action.input.id);\\nif (!profile) {\\n throw new ProfileNotFoundError(`Profile not found: ${action.input.id}`);\\n}\\nif (action.input.title) profile.title = action.input.title;\\nif (action.input.content) profile.content = action.input.content;\",\n errors: [\n {\n id: 'e-update-profile-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before managing profiles.',\n template: '',\n },\n {\n id: 'e-update-profile-not-found',\n name: 'ProfileNotFoundError',\n code: 'PROFILE_NOT_FOUND',\n description: 'The specified profile was not found.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-remove-profile',\n name: 'REMOVE_PROFILE',\n description: 'Remove an agent profile section.',\n schema: 'input RemoveProfileInput {\\n id: String!\\n}',\n template: 'Remove an agent profile section.',\n reducer:\n \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError('Cannot remove profile when Mastra is disabled.');\\n}\\nconst idx = state.features.mastra.profiles.findIndex(p => p.id === action.input.id);\\nif (idx === -1) {\\n throw new ProfileNotFoundError(`Profile not found: ${action.input.id}`);\\n}\\nstate.features.mastra.profiles.splice(idx, 1);\",\n errors: [\n {\n id: 'e-remove-profile-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before managing profiles.',\n template: '',\n },\n {\n id: 'e-remove-profile-not-found',\n name: 'ProfileNotFoundError',\n code: 'PROFILE_NOT_FOUND',\n description: 'The specified profile was not found.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-reorder-profiles',\n name: 'REORDER_PROFILES',\n description: 'Move one or more profiles before another profile, or to the end if insertBefore is null.',\n schema: 'input ReorderProfilesInput {\\n ids: [String!]!\\n insertBefore: String\\n}',\n template: 'Move one or more profiles before another profile, or to the end if insertBefore is null.',\n reducer:\n \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError('Cannot reorder profiles when Mastra is disabled.');\\n}\\nconst moving = [];\\nfor (const id of action.input.ids) {\\n const profile = state.features.mastra.profiles.find(p => p.id === id);\\n if (!profile) {\\n throw new ProfileNotFoundError(`Profile not found: ${id}`);\\n }\\n moving.push(profile);\\n}\\n// Remove moved profiles\\nstate.features.mastra.profiles = state.features.mastra.profiles.filter(p => !action.input.ids.includes(p.id));\\n// Insert at target position\\nif (action.input.insertBefore) {\\n const beforeIdx = state.features.mastra.profiles.findIndex(p => p.id === action.input.insertBefore);\\n if (beforeIdx === -1) {\\n throw new ProfileNotFoundError(`insertBefore profile not found: ${action.input.insertBefore}`);\\n }\\n state.features.mastra.profiles.splice(beforeIdx, 0, ...moving);\\n} else {\\n state.features.mastra.profiles.push(...moving);\\n}\",\n errors: [\n {\n id: 'e-reorder-profiles-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before managing profiles.',\n template: '',\n },\n {\n id: 'e-reorder-profiles-not-found',\n name: 'ProfileNotFoundError',\n code: 'PROFILE_NOT_FOUND',\n description: 'A referenced profile was not found.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-agent-description',\n name: 'SET_AGENT_DESCRIPTION',\n description: 'Set the agent description. Only valid when mastra is enabled.',\n schema: 'input SetAgentDescriptionInput {\\n description: String!\\n}',\n template: 'Set the agent description. Only valid when mastra is enabled.',\n reducer: \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError('Cannot set agent description when Mastra is disabled.');\\n}\\nstate.features.mastra.agentDescription = action.input.description;\",\n errors: [\n {\n id: 'e-set-agent-desc-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before setting agent description.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-agent-image',\n name: 'SET_AGENT_IMAGE',\n description: 'Set the agent image URL (avatar). Only valid when mastra is enabled.',\n schema: 'input SetAgentImageInput {\\n image: String!\\n}',\n template: 'Set the agent image URL (avatar). Only valid when mastra is enabled.',\n reducer:\n \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError(\\n 'Cannot set agent image when Mastra is disabled.',\\n );\\n}\\nif (!/^data:[a-z]+\\\\/[a-z0-9.+-]+;base64,/.test(action.input.image)) {\\n throw new InvalidAgentImageError(\\n 'Agent image must be a data URL (data:image/...;base64,...)',\\n );\\n}\\nstate.features.mastra.agentImage = action.input.image;\",\n errors: [\n {\n id: 'e-set-agent-image-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before setting agent image.',\n template: '',\n },\n {\n id: 'e-invalid-agent-image',\n name: 'InvalidAgentImageError',\n code: 'INVALID_AGENT_IMAGE',\n description: 'Agent image must be a data URL',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-clear-agent-image',\n name: 'CLEAR_AGENT_IMAGE',\n description: '',\n schema: 'input ClearAgentImageInput {\\n _: Boolean\\n}',\n template: '',\n reducer: \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError(\\n 'Cannot clear agent image when Mastra is disabled.',\\n );\\n}\\nstate.features.mastra.agentImage = null;\",\n errors: [\n {\n id: 'e-mastra-not-enabled-clear-img',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-enable-chat',\n name: 'SET_ENABLE_CHAT',\n description: 'Enable or disable the chat integration. When enabled, auto-adds @powerhousedao/clint-common as a managed package with powerhouse/chat-session doc type. When disabled, removes it if it only has that doc type.',\n schema: 'input SetEnableChatInput {\\n enabled: Boolean!\\n}',\n template: 'Toggle the chat integration feature. Requires both Mastra and Powerhouse to be enabled.',\n reducer:\n \"if (!state.features.mastra.enabled) {\\n throw new MastraNotEnabledError('Cannot toggle chat when Mastra is disabled.');\\n}\\nif (state.features.powerhouse === 'Disabled') {\\n throw new PowerhouseNotEnabledError('Cannot toggle chat when Powerhouse is disabled.');\\n}\\nstate.features.mastra.common.enableChat = action.input.enabled;\\nconst CLINT_COMMON_PKG = '@powerhousedao/clint-common';\\nconst CHAT_DOC_TYPE = 'powerhouse/chat-session';\\nif (action.input.enabled) {\\n const existing = state.packages.find((p) => p.packageName === CLINT_COMMON_PKG);\\n if (!existing) {\\n state.packages.push({\\n id: 'pkg-clint-common',\\n packageName: CLINT_COMMON_PKG,\\n documentTypes: [CHAT_DOC_TYPE],\\n version: null,\\n managed: true,\\n });\\n } else if (!existing.documentTypes.includes(CHAT_DOC_TYPE)) {\\n existing.documentTypes.push(CHAT_DOC_TYPE);\\n }\\n} else {\\n const idx = state.packages.findIndex(\\n (p) => p.packageName === CLINT_COMMON_PKG && p.managed,\\n );\\n if (idx !== -1) {\\n const pkg = state.packages[idx];\\n if (pkg.documentTypes.length === 1 && pkg.documentTypes[0] === CHAT_DOC_TYPE) {\\n state.packages.splice(idx, 1);\\n } else {\\n const dtIdx = pkg.documentTypes.indexOf(CHAT_DOC_TYPE);\\n if (dtIdx !== -1) pkg.documentTypes.splice(dtIdx, 1);\\n }\\n }\\n}\",\n errors: [\n {\n id: 'e-chat-mastra-not-enabled',\n name: 'MastraNotEnabledError',\n code: 'MASTRA_NOT_ENABLED',\n description: 'Mastra must be enabled before toggling chat.',\n template: '',\n },\n {\n id: 'e-chat-powerhouse-not-enabled',\n name: 'PowerhouseNotEnabledError',\n code: 'POWERHOUSE_NOT_ENABLED',\n description: 'Powerhouse must be enabled (Reactor or above) before toggling chat.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n ],\n },\n {\n id: 'm-features-routine',\n name: 'features_routine',\n description: 'Routine loop feature toggle.',\n operations: [\n {\n id: 'o-enable-routine',\n name: 'ENABLE_ROUTINE',\n description: 'Enable the routine loop. Idempotent.',\n schema: 'input EnableRoutineInput {\\n _: Boolean\\n}',\n template: 'Enable the routine loop. Idempotent.',\n reducer: 'state.features.routine.enabled = true;',\n errors: [],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-disable-routine',\n name: 'DISABLE_ROUTINE',\n description: 'Disable the routine loop. Always allowed.',\n schema: 'input DisableRoutineInput {\\n _: Boolean\\n}',\n template: 'Disable the routine loop.',\n reducer: 'state.features.routine.enabled = false;',\n errors: [],\n examples: [],\n scope: 'global',\n },\n ],\n },\n {\n id: 'm-powerhouse-packages',\n name: 'powerhouse_packages',\n description: 'Manage reactor packages and their document types. The app package is auto-created when Powerhouse level goes above Disabled.',\n operations: [\n {\n id: 'o-add-powerhouse-package',\n name: 'ADD_POWERHOUSE_PACKAGE',\n description: 'Add an external reactor package. The app package is auto-managed by SET_POWERHOUSE_LEVEL.',\n schema: 'input AddPowerhousePackageInput {\\n id: OID!\\n packageName: String!\\n}',\n template: 'Add an external reactor package. The app package is auto-managed by SET_POWERHOUSE_LEVEL.',\n reducer:\n 'const exists = state.packages.find(\\n (p) =>\\n p.id === action.input.id ||\\n p.packageName === action.input.packageName,\\n);\\nif (exists) {\\n throw new DuplicatePackageError(\\n `Package already exists: ${action.input.packageName}`,\\n );\\n}\\nstate.packages.push({\\n id: action.input.id,\\n packageName: action.input.packageName,\\n documentTypes: [],\\n version: null,\\n managed: false,\\n});',\n errors: [\n {\n id: 'e-duplicate-package',\n name: 'DuplicatePackageError',\n code: 'DUPLICATE_PACKAGE',\n description: 'A package with the same ID or name already exists.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-remove-powerhouse-package',\n name: 'REMOVE_POWERHOUSE_PACKAGE',\n description: 'Remove a reactor package. Cannot remove the auto-managed app package.',\n schema: 'input RemovePowerhousePackageInput {\\n id: OID!\\n}',\n template: 'Remove a reactor package. Cannot remove the auto-managed app package.',\n reducer:\n 'const idx = state.packages.findIndex((p) => p.id === action.input.id);\\nif (idx === -1) {\\n throw new PackageNotFoundError(`Package not found: ${action.input.id}`);\\n}\\nconst pkg = state.packages[idx];\\nif (pkg.managed) {\\n throw new CannotRemoveManagedPackageError(\\n \"Cannot remove a managed package\",\\n );\\n}\\nstate.packages.splice(idx, 1);',\n errors: [\n {\n id: 'e-package-not-found-remove',\n name: 'PackageNotFoundError',\n code: 'PACKAGE_NOT_FOUND',\n description: 'The specified package ID was not found.',\n template: '',\n },\n {\n id: 'e-cannot-remove-app-package',\n name: 'CannotRemoveAppPackageError',\n code: 'CANNOT_REMOVE_APP_PACKAGE',\n description: 'The auto-managed app package cannot be removed.',\n template: '',\n },\n {\n id: 'e-cannot-remove-managed',\n name: 'CannotRemoveManagedPackageError',\n code: 'CANNOT_REMOVE_MANAGED_PACKAGE',\n description: 'Cannot remove a managed (framework-controlled) package',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-add-package-document-type',\n name: 'ADD_PACKAGE_DOCUMENT_TYPE',\n description: 'Add a document type ID to a package (app or external).',\n schema: 'input AddPackageDocumentTypeInput {\\n packageId: OID!\\n documentType: String!\\n}',\n template: 'Add a document type ID to a package (app or external).',\n reducer:\n \"if (action.input.documentType !== '*/*' && !/^[a-z0-9-]+\\\\/[a-z0-9-]+$/.test(action.input.documentType)) {\\n throw new InvalidDocumentTypeError(\\n `Invalid document type format: ${action.input.documentType}. Expected org/name.`,\\n );\\n}\\nconst pkg = state.packages.find((p) => p.id === action.input.packageId);\\nif (!pkg) {\\n throw new PackageNotFoundError(\\n `Package not found: ${action.input.packageId}`,\\n );\\n}\\nif (action.input.documentType === '*/*') {\\n pkg.documentTypes.length = 0;\\n pkg.documentTypes.push('*/*');\\n return;\\n}\\nif (pkg.documentTypes.includes('*/*')) {\\n return;\\n}\\nif (pkg.documentTypes.includes(action.input.documentType)) {\\n throw new DuplicateDocumentTypeError(\\n `Document type already registered: ${action.input.documentType}`,\\n );\\n}\\npkg.documentTypes.push(action.input.documentType);\",\n errors: [\n {\n id: 'e-invalid-document-type',\n name: 'InvalidDocumentTypeError',\n code: 'INVALID_DOCUMENT_TYPE',\n description: 'Document type must match org/name format (e.g. powerhouse/ph-clint-project).',\n template: '',\n },\n {\n id: 'e-package-not-found-add-dt',\n name: 'PackageNotFoundError',\n code: 'PACKAGE_NOT_FOUND',\n description: 'The specified package ID was not found.',\n template: '',\n },\n {\n id: 'e-duplicate-document-type',\n name: 'DuplicateDocumentTypeError',\n code: 'DUPLICATE_DOCUMENT_TYPE',\n description: 'This document type is already registered in the package.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-remove-package-document-type',\n name: 'REMOVE_PACKAGE_DOCUMENT_TYPE',\n description: 'Remove a document type ID from a package.',\n schema: 'input RemovePackageDocumentTypeInput {\\n packageId: OID!\\n documentType: String!\\n}',\n template: 'Remove a document type ID from a package.',\n reducer:\n 'const pkg = state.packages.find(p => p.id === action.input.packageId);\\nif (!pkg) {\\n throw new PackageNotFoundError(`Package not found: ${action.input.packageId}`);\\n}\\nconst idx = pkg.documentTypes.indexOf(action.input.documentType);\\nif (idx === -1) {\\n throw new DocumentTypeNotFoundError(`Document type not found: ${action.input.documentType}`);\\n}\\npkg.documentTypes.splice(idx, 1);',\n errors: [\n {\n id: 'e-package-not-found-rm-dt',\n name: 'PackageNotFoundError',\n code: 'PACKAGE_NOT_FOUND',\n description: 'The specified package ID was not found.',\n template: '',\n },\n {\n id: 'e-document-type-not-found',\n name: 'DocumentTypeNotFoundError',\n code: 'DOCUMENT_TYPE_NOT_FOUND',\n description: 'The specified document type was not found in this package.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-package-version',\n name: 'SET_PACKAGE_VERSION',\n description: '',\n schema: 'input SetPackageVersionInput {\\n packageId: OID!\\n version: String\\n}',\n template: '',\n reducer:\n 'const pkg = state.packages.find((p) => p.id === action.input.packageId);\\nif (!pkg) {\\n throw new PackageNotFoundError(\\n `Package not found: ${action.input.packageId}`,\\n );\\n}\\nif (action.input.version != null) {\\n const SEMVER = /^\\\\d+\\\\.\\\\d+\\\\.\\\\d+(?:-[0-9A-Za-z.-]+)?(?:\\\\+[0-9A-Za-z.-]+)?$/;\\n if (!SEMVER.test(action.input.version)) {\\n throw new InvalidVersionError(\\n `Invalid version: ${action.input.version}`,\\n );\\n }\\n}\\npkg.version = action.input.version || null;',\n errors: [\n {\n id: 'e-pkg-not-found-set-ver',\n name: 'PackageNotFoundError',\n code: 'PACKAGE_NOT_FOUND',\n description: 'Referenced package does not exist',\n template: '',\n },\n {\n id: 'e-invalid-version',\n name: 'InvalidVersionError',\n code: 'INVALID_VERSION',\n description: 'Version string is not valid semver',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n ],\n },\n {\n id: 'm-external-skills',\n name: 'external_skills',\n description: 'External skills from the skills.sh ecosystem. Each skill has a name and GitHub URL for installation.',\n operations: [\n {\n id: 'o-add-external-skill',\n name: 'ADD_EXTERNAL_SKILL',\n description: 'Add an external skill. Name must be lowercase kebab-case.',\n schema: 'input AddExternalSkillInput {\\n id: OID!\\n name: String!\\n githubUrl: URL!\\n}',\n template: 'Add an external skill. Name must be lowercase kebab-case.',\n reducer:\n 'if (!/^[a-z][a-z0-9-]*$/.test(action.input.name)) {\\n throw new InvalidSkillNameError(`Invalid skill name: ${action.input.name}. Must be lowercase kebab-case.`);\\n}\\nconst exists = state.externalSkills.find(s => s.id === action.input.id || s.name === action.input.name);\\nif (exists) {\\n throw new DuplicateSkillError(`Skill already exists: ${action.input.name}`);\\n}\\nstate.externalSkills.push({\\n id: action.input.id,\\n name: action.input.name,\\n githubUrl: action.input.githubUrl,\\n});',\n errors: [\n {\n id: 'e-invalid-skill-name',\n name: 'InvalidSkillNameError',\n code: 'INVALID_SKILL_NAME',\n description: 'Skill name must be lowercase kebab-case (e.g. playwright-cli).',\n template: '',\n },\n {\n id: 'e-duplicate-skill',\n name: 'DuplicateSkillError',\n code: 'DUPLICATE_SKILL',\n description: 'A skill with the same ID or name already exists.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-remove-external-skill',\n name: 'REMOVE_EXTERNAL_SKILL',\n description: 'Remove an external skill by ID.',\n schema: 'input RemoveExternalSkillInput {\\n id: OID!\\n}',\n template: 'Remove an external skill by ID.',\n reducer: 'const idx = state.externalSkills.findIndex(s => s.id === action.input.id);\\nif (idx === -1) {\\n throw new SkillNotFoundError(`Skill not found: ${action.input.id}`);\\n}\\nstate.externalSkills.splice(idx, 1);',\n errors: [\n {\n id: 'e-skill-not-found-remove',\n name: 'SkillNotFoundError',\n code: 'SKILL_NOT_FOUND',\n description: 'The specified skill ID was not found.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-external-skill-name',\n name: 'SET_EXTERNAL_SKILL_NAME',\n description: 'Update the name of an external skill.',\n schema: 'input SetExternalSkillNameInput {\\n id: OID!\\n name: String!\\n}',\n template: 'Update the name of an external skill.',\n reducer:\n 'const skill = state.externalSkills.find(s => s.id === action.input.id);\\nif (!skill) {\\n throw new SkillNotFoundError(`Skill not found: ${action.input.id}`);\\n}\\nif (!/^[a-z][a-z0-9-]*$/.test(action.input.name)) {\\n throw new InvalidSkillNameError(`Invalid skill name: ${action.input.name}. Must be lowercase kebab-case.`);\\n}\\nconst duplicate = state.externalSkills.find(s => s.name === action.input.name && s.id !== action.input.id);\\nif (duplicate) {\\n throw new DuplicateSkillError(`Skill name already in use: ${action.input.name}`);\\n}\\nskill.name = action.input.name;',\n errors: [\n {\n id: 'e-skill-not-found-set-name',\n name: 'SkillNotFoundError',\n code: 'SKILL_NOT_FOUND',\n description: 'The specified skill ID was not found.',\n template: '',\n },\n {\n id: 'e-invalid-skill-name-set',\n name: 'InvalidSkillNameError',\n code: 'INVALID_SKILL_NAME',\n description: 'Skill name must be lowercase kebab-case.',\n template: '',\n },\n {\n id: 'e-duplicate-skill-set-name',\n name: 'DuplicateSkillError',\n code: 'DUPLICATE_SKILL',\n description: 'Another skill already uses this name.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-external-skill-github-url',\n name: 'SET_EXTERNAL_SKILL_GITHUB_URL',\n description: 'Update the GitHub URL of an external skill.',\n schema: 'input SetExternalSkillGithubUrlInput {\\n id: OID!\\n githubUrl: URL!\\n}',\n template: 'Update the GitHub URL of an external skill.',\n reducer: 'const skill = state.externalSkills.find(s => s.id === action.input.id);\\nif (!skill) {\\n throw new SkillNotFoundError(`Skill not found: ${action.input.id}`);\\n}\\nskill.githubUrl = action.input.githubUrl;',\n errors: [\n {\n id: 'e-skill-not-found-set-url',\n name: 'SkillNotFoundError',\n code: 'SKILL_NOT_FOUND',\n description: 'The specified skill ID was not found.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n ],\n },\n {\n id: 'm-publishing',\n name: 'publishing',\n description: 'Version bumping and publish records. Tracks dev/staging/production publish intents and their status.',\n operations: [\n {\n id: 'o-bump-version',\n name: 'BUMP_VERSION',\n description: 'Bump the project version. Must be a valid semver string greater than the current version.',\n schema: 'input BumpVersionInput {\\n version: String!\\n}',\n template: 'Bump the project version. Must be a valid semver string greater than the current version.',\n reducer: 'if (!/^\\\\d+\\\\.\\\\d+\\\\.\\\\d+(?:-[0-9A-Za-z.-]+)?(?:\\\\+[0-9A-Za-z.-]+)?$/.test(action.input.version)) {\\n throw new InvalidVersionError(`Invalid version: ${action.input.version}`);\\n}\\nstate.version = action.input.version;',\n errors: [\n {\n id: 'e-invalid-version-bump',\n name: 'InvalidVersionError',\n code: 'INVALID_VERSION',\n description: 'The version must be a valid semver string.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-publish-dev',\n name: 'PUBLISH_DEV',\n description: 'Record a dev publish intent. Creates a Pending publish record.',\n schema: 'input PublishDevInput {\\n id: OID!\\n timestamp: DateTime!\\n}',\n template: 'Record a dev publish intent. Creates a Pending publish record.',\n reducer: \"state.publishHistory.push({\\n id: action.input.id,\\n tag: 'Dev',\\n version: state.version,\\n timestamp: action.input.timestamp,\\n status: 'Pending',\\n});\",\n errors: [],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-publish-staging',\n name: 'PUBLISH_STAGING',\n description: 'Record a staging publish intent. Creates a Pending publish record.',\n schema: 'input PublishStagingInput {\\n id: OID!\\n timestamp: DateTime!\\n}',\n template: 'Record a staging publish intent. Creates a Pending publish record.',\n reducer: \"state.publishHistory.push({\\n id: action.input.id,\\n tag: 'Staging',\\n version: state.version,\\n timestamp: action.input.timestamp,\\n status: 'Pending',\\n});\",\n errors: [],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-publish-production',\n name: 'PUBLISH_PRODUCTION',\n description: 'Record a production publish intent. Creates a Pending publish record.',\n schema: 'input PublishProductionInput {\\n id: OID!\\n timestamp: DateTime!\\n}',\n template: 'Record a production publish intent. Creates a Pending publish record.',\n reducer: \"state.publishHistory.push({\\n id: action.input.id,\\n tag: 'Production',\\n version: state.version,\\n timestamp: action.input.timestamp,\\n status: 'Pending',\\n});\",\n errors: [],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-publish-status',\n name: 'SET_PUBLISH_STATUS',\n description: 'Update the status of a publish record. Used by the trigger after publish completes.',\n schema: 'input SetPublishStatusInput {\\n id: OID!\\n status: PublishStatus!\\n}',\n template: 'Update the status of a publish record. Used by the trigger after publish completes.',\n reducer: 'const record = state.publishHistory.find(r => r.id === action.input.id);\\nif (!record) {\\n throw new PublishRecordNotFoundError(`Publish record not found: ${action.input.id}`);\\n}\\nrecord.status = action.input.status;',\n errors: [\n {\n id: 'e-publish-record-not-found',\n name: 'PublishRecordNotFoundError',\n code: 'PUBLISH_RECORD_NOT_FOUND',\n description: 'The specified publish record ID was not found.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n ],\n },\n {\n id: 'm-lifecycle',\n name: 'lifecycle',\n description: 'Document lifecycle operations. IMPORT_SPEC bulk-imports a full project spec into the document.',\n operations: [\n {\n id: 'o-import-spec',\n name: 'IMPORT_SPEC',\n description: 'Bulk-import a full project spec into the document. Sets all identity fields, features, packages, and skills. Used by the multi-project boot sync.',\n schema:\n 'input ImportSpecInput {\\n name: String!\\n scope: String\\n version: String!\\n description: String!\\n powerhouse: PowerhouseLevel!\\n mastraEnabled: Boolean!\\n routineEnabled: Boolean!\\n packages: [ImportPackageInput!]!\\n externalSkills: [ImportSkillInput!]!\\n agentId: String\\n agentName: String\\n models: [ImportModelInput!]\\n profiles: [ImportProfileInput!]\\n agentDescription: String\\n agentImage: String\\n enableChat: Boolean\\n proxyEnabled: Boolean\\n observabilityEnabled: Boolean\\n supportedResources: [String!]\\n}\\n\\ninput ImportPackageInput {\\n id: OID!\\n packageName: String!\\n documentTypes: [String!]!\\n version: String\\n}\\n\\ninput ImportSkillInput {\\n id: OID!\\n name: String!\\n githubUrl: URL!\\n}\\n\\ninput ImportModelInput {\\n id: String!\\n isDefault: Boolean!\\n}\\n\\ninput ImportProfileInput {\\n id: String!\\n title: String!\\n content: String!\\n}',\n template: 'Bulk-import a full project spec into the document. Sets all identity fields, features, packages, and skills. Used by the multi-project boot sync.',\n reducer:\n \"state.name = action.input.name;\\nstate.scope = action.input.scope || null;\\nstate.version = action.input.version;\\nstate.description = action.input.description;\\nstate.features.powerhouse = action.input.powerhouse;\\nstate.features.mastra.enabled = action.input.mastraEnabled;\\nstate.features.routine.enabled = action.input.routineEnabled;\\n\\n// Derive the expected managed app package name\\nconst appBase = action.input.name.replace(/-cli$/, '-app');\\nconst appPkgName = action.input.scope\\n ? `${action.input.scope}/${appBase}`\\n : appBase;\\nconst phEnabled = action.input.powerhouse !== 'Disabled';\\n\\nstate.packages = action.input.packages.map((p) => ({\\n id: p.id,\\n packageName: p.packageName,\\n documentTypes: [...p.documentTypes],\\n version: p.version || null,\\n managed: phEnabled && p.packageName === appPkgName,\\n}));\\nstate.externalSkills = action.input.externalSkills.map((s) => ({\\n id: s.id,\\n name: s.name,\\n githubUrl: s.githubUrl,\\n}));\\nstate.features.mastra.agentId = action.input.agentId || null;\\nstate.features.mastra.agentName = action.input.agentName || null;\\nstate.features.mastra.models = (action.input.models || []).map((m) => ({\\n id: m.id,\\n isDefault: m.isDefault,\\n}));\\nstate.features.mastra.profiles = (action.input.profiles || []).map((p) => ({\\n id: p.id,\\n title: p.title,\\n content: p.content,\\n}));\\n\\n// agentDescription \\u2014 respects mastra-enabled guard\\nif (action.input.agentDescription && state.features.mastra.enabled) {\\n state.features.mastra.agentDescription = action.input.agentDescription;\\n} else {\\n state.features.mastra.agentDescription = null;\\n}\\n\\n// agentImage \\u2014 validates data URL format (same logic as setAgentImageOperation)\\nif (action.input.agentImage && state.features.mastra.enabled) {\\n if (!/^data:[a-z]+\\\\/[a-z0-9.+-]+;base64,/.test(action.input.agentImage)) {\\n throw new InvalidAgentImageError(\\n 'Invalid image: must be a data URL (data:<mime>;base64,...)',\\n );\\n }\\n state.features.mastra.agentImage = action.input.agentImage;\\n} else {\\n state.features.mastra.agentImage = null;\\n}\\n\\n// enableChat \\u2014 respects mastra+powerhouse guards, manages clint-common package\\nif (\\n action.input.enableChat &&\\n state.features.mastra.enabled &&\\n state.features.powerhouse !== 'Disabled'\\n) {\\n state.features.mastra.common.enableChat = true;\\n const CLINT_COMMON_PKG = '@powerhousedao/clint-common';\\n const CHAT_DOC_TYPE = 'powerhouse/chat-session';\\n const existing = state.packages.find(\\n (p) => p.packageName === CLINT_COMMON_PKG,\\n );\\n if (!existing) {\\n state.packages.push({\\n id: 'pkg-clint-common',\\n packageName: CLINT_COMMON_PKG,\\n documentTypes: [CHAT_DOC_TYPE],\\n version: null,\\n managed: true,\\n });\\n } else if (!existing.documentTypes.includes(CHAT_DOC_TYPE)) {\\n existing.documentTypes.push(CHAT_DOC_TYPE);\\n }\\n} else {\\n state.features.mastra.common.enableChat = false;\\n}\\n\\n// Deployment fields\\nstate.deployment.proxyEnabled = action.input.proxyEnabled ?? false;\\nstate.deployment.observabilityEnabled = action.input.observabilityEnabled ?? false;\\nstate.deployment.supportedResources = action.input.supportedResources\\n ? [...action.input.supportedResources]\\n : [];\",\n errors: [],\n examples: [],\n scope: 'global',\n },\n ],\n },\n {\n id: 'm-deployment',\n name: 'deployment',\n description: 'Deployment settings: service announcement toggle and supported resource tiers.',\n operations: [\n {\n id: 'o-add-supported-resource',\n name: 'ADD_SUPPORTED_RESOURCE',\n description: 'Add a supported resource tier. Guards against duplicates.',\n schema: 'input AddSupportedResourceInput {\\n resource: String!\\n}',\n template: 'Add a supported resource tier. Guards against duplicates.',\n reducer:\n 'if (state.deployment.supportedResources.includes(action.input.resource)) {\\n throw new DuplicateResourceError(`Resource already exists: ${action.input.resource}`);\\n}\\nstate.deployment.supportedResources.push(action.input.resource);',\n errors: [\n {\n id: 'e-duplicate-resource',\n name: 'DuplicateResourceError',\n code: 'DUPLICATE_RESOURCE',\n description: 'This resource is already in the supported resources list.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-remove-supported-resource',\n name: 'REMOVE_SUPPORTED_RESOURCE',\n description: 'Remove a supported resource tier.',\n schema: 'input RemoveSupportedResourceInput {\\n resource: String!\\n}',\n template: 'Remove a supported resource tier.',\n reducer:\n 'const idx = state.deployment.supportedResources.indexOf(action.input.resource);\\nif (idx === -1) {\\n throw new ResourceNotFoundError(`Resource not found: ${action.input.resource}`);\\n}\\nstate.deployment.supportedResources.splice(idx, 1);',\n errors: [\n {\n id: 'e-resource-not-found',\n name: 'ResourceNotFoundError',\n code: 'RESOURCE_NOT_FOUND',\n description: 'The specified resource was not found in the supported resources list.',\n template: '',\n },\n ],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-proxy-enabled',\n name: 'SET_PROXY_ENABLED',\n description: 'Toggle the embedded reverse proxy.',\n schema: 'input SetProxyEnabledInput {\\n enabled: Boolean!\\n}',\n template: 'Toggle the embedded reverse proxy.',\n reducer: 'state.deployment.proxyEnabled = action.input.enabled;',\n errors: [],\n examples: [],\n scope: 'global',\n },\n {\n id: 'o-set-observability-enabled',\n name: 'SET_OBSERVABILITY_ENABLED',\n description: 'Toggle the observability plugin (Sentry + OpenTelemetry).',\n schema: 'input SetObservabilityEnabledInput {\\n enabled: Boolean!\\n}',\n template: 'Toggle the observability plugin (Sentry + OpenTelemetry).',\n reducer: 'state.deployment.observabilityEnabled = action.input.enabled;',\n errors: [],\n examples: [],\n scope: 'global',\n },\n ],\n },\n ],\n version: 1,\n changeLog: [],\n },\n ],\n};\n","export type ErrorCode = 'DuplicateResourceError' | 'ResourceNotFoundError';\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class DuplicateResourceError extends Error implements ReducerError {\n errorCode = 'DuplicateResourceError' as ErrorCode;\n constructor(message = 'DuplicateResourceError') {\n super(message);\n }\n}\n\nexport class ResourceNotFoundError extends Error implements ReducerError {\n errorCode = 'ResourceNotFoundError' as ErrorCode;\n constructor(message = 'ResourceNotFoundError') {\n super(message);\n }\n}\n\nexport const errors = {\n AddSupportedResource: { DuplicateResourceError },\n RemoveSupportedResource: { ResourceNotFoundError },\n};\n","import type { PhClintProjectDeploymentOperations } from 'document-models/ph-clint-project/v1';\nimport { DuplicateResourceError, ResourceNotFoundError } from '../../gen/deployment/error.js';\n\nexport const phClintProjectDeploymentOperations: PhClintProjectDeploymentOperations = {\n addSupportedResourceOperation(state, action) {\n if (state.deployment.supportedResources.includes(action.input.resource)) {\n throw new DuplicateResourceError(`Resource already exists: ${action.input.resource}`);\n }\n state.deployment.supportedResources.push(action.input.resource);\n },\n removeSupportedResourceOperation(state, action) {\n const idx = state.deployment.supportedResources.indexOf(action.input.resource);\n if (idx === -1) {\n throw new ResourceNotFoundError(`Resource not found: ${action.input.resource}`);\n }\n state.deployment.supportedResources.splice(idx, 1);\n },\n setProxyEnabledOperation(state, action) {\n state.deployment.proxyEnabled = action.input.enabled;\n },\n setObservabilityEnabledOperation(state, action) {\n state.deployment.observabilityEnabled = action.input.enabled;\n },\n};\n","export type ErrorCode = 'InvalidSkillNameError' | 'DuplicateSkillError' | 'SkillNotFoundError';\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class InvalidSkillNameError extends Error implements ReducerError {\n errorCode = 'InvalidSkillNameError' as ErrorCode;\n constructor(message = 'InvalidSkillNameError') {\n super(message);\n }\n}\n\nexport class DuplicateSkillError extends Error implements ReducerError {\n errorCode = 'DuplicateSkillError' as ErrorCode;\n constructor(message = 'DuplicateSkillError') {\n super(message);\n }\n}\n\nexport class SkillNotFoundError extends Error implements ReducerError {\n errorCode = 'SkillNotFoundError' as ErrorCode;\n constructor(message = 'SkillNotFoundError') {\n super(message);\n }\n}\n\nexport const errors = {\n AddExternalSkill: { InvalidSkillNameError, DuplicateSkillError },\n RemoveExternalSkill: { SkillNotFoundError },\n SetExternalSkillName: {\n SkillNotFoundError,\n InvalidSkillNameError,\n DuplicateSkillError,\n },\n SetExternalSkillGithubUrl: { SkillNotFoundError },\n};\n","import type { PhClintProjectExternalSkillsOperations } from 'document-models/ph-clint-project/v1';\nimport { DuplicateSkillError, InvalidSkillNameError, SkillNotFoundError } from '../../gen/external-skills/error.js';\n\nexport const phClintProjectExternalSkillsOperations: PhClintProjectExternalSkillsOperations = {\n addExternalSkillOperation(state, action) {\n if (!/^[a-z][a-z0-9-]*$/.test(action.input.name)) {\n throw new InvalidSkillNameError(`Invalid skill name: ${action.input.name}. Must be lowercase kebab-case.`);\n }\n const exists = state.externalSkills.find((s) => s.id === action.input.id || s.name === action.input.name);\n if (exists) {\n throw new DuplicateSkillError(`Skill already exists: ${action.input.name}`);\n }\n state.externalSkills.push({\n id: action.input.id,\n name: action.input.name,\n githubUrl: action.input.githubUrl,\n });\n },\n removeExternalSkillOperation(state, action) {\n const idx = state.externalSkills.findIndex((s) => s.id === action.input.id);\n if (idx === -1) {\n throw new SkillNotFoundError(`Skill not found: ${action.input.id}`);\n }\n state.externalSkills.splice(idx, 1);\n },\n setExternalSkillNameOperation(state, action) {\n const skill = state.externalSkills.find((s) => s.id === action.input.id);\n if (!skill) {\n throw new SkillNotFoundError(`Skill not found: ${action.input.id}`);\n }\n if (!/^[a-z][a-z0-9-]*$/.test(action.input.name)) {\n throw new InvalidSkillNameError(`Invalid skill name: ${action.input.name}. Must be lowercase kebab-case.`);\n }\n const duplicate = state.externalSkills.find((s) => s.name === action.input.name && s.id !== action.input.id);\n if (duplicate) {\n throw new DuplicateSkillError(`Skill name already in use: ${action.input.name}`);\n }\n skill.name = action.input.name;\n },\n setExternalSkillGithubUrlOperation(state, action) {\n const skill = state.externalSkills.find((s) => s.id === action.input.id);\n if (!skill) {\n throw new SkillNotFoundError(`Skill not found: ${action.input.id}`);\n }\n skill.githubUrl = action.input.githubUrl;\n },\n};\n","export type ErrorCode =\n | 'InvalidAgentIdError'\n | 'InvalidAgentNameError'\n | 'MastraNotEnabledError'\n | 'InvalidModelIdError'\n | 'DuplicateModelError'\n | 'ModelNotFoundError'\n | 'InvalidProfileIdError'\n | 'DuplicateProfileError'\n | 'ProfileNotFoundError'\n | 'InvalidAgentImageError'\n | 'PowerhouseNotEnabledError';\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class InvalidAgentIdError extends Error implements ReducerError {\n errorCode = 'InvalidAgentIdError' as ErrorCode;\n constructor(message = 'InvalidAgentIdError') {\n super(message);\n }\n}\n\nexport class InvalidAgentNameError extends Error implements ReducerError {\n errorCode = 'InvalidAgentNameError' as ErrorCode;\n constructor(message = 'InvalidAgentNameError') {\n super(message);\n }\n}\n\nexport class MastraNotEnabledError extends Error implements ReducerError {\n errorCode = 'MastraNotEnabledError' as ErrorCode;\n constructor(message = 'MastraNotEnabledError') {\n super(message);\n }\n}\n\nexport class InvalidModelIdError extends Error implements ReducerError {\n errorCode = 'InvalidModelIdError' as ErrorCode;\n constructor(message = 'InvalidModelIdError') {\n super(message);\n }\n}\n\nexport class DuplicateModelError extends Error implements ReducerError {\n errorCode = 'DuplicateModelError' as ErrorCode;\n constructor(message = 'DuplicateModelError') {\n super(message);\n }\n}\n\nexport class ModelNotFoundError extends Error implements ReducerError {\n errorCode = 'ModelNotFoundError' as ErrorCode;\n constructor(message = 'ModelNotFoundError') {\n super(message);\n }\n}\n\nexport class InvalidProfileIdError extends Error implements ReducerError {\n errorCode = 'InvalidProfileIdError' as ErrorCode;\n constructor(message = 'InvalidProfileIdError') {\n super(message);\n }\n}\n\nexport class DuplicateProfileError extends Error implements ReducerError {\n errorCode = 'DuplicateProfileError' as ErrorCode;\n constructor(message = 'DuplicateProfileError') {\n super(message);\n }\n}\n\nexport class ProfileNotFoundError extends Error implements ReducerError {\n errorCode = 'ProfileNotFoundError' as ErrorCode;\n constructor(message = 'ProfileNotFoundError') {\n super(message);\n }\n}\n\nexport class InvalidAgentImageError extends Error implements ReducerError {\n errorCode = 'InvalidAgentImageError' as ErrorCode;\n constructor(message = 'InvalidAgentImageError') {\n super(message);\n }\n}\n\nexport class PowerhouseNotEnabledError extends Error implements ReducerError {\n errorCode = 'PowerhouseNotEnabledError' as ErrorCode;\n constructor(message = 'PowerhouseNotEnabledError') {\n super(message);\n }\n}\n\nexport const errors = {\n EnableMastra: { InvalidAgentIdError, InvalidAgentNameError },\n SetAgentId: { MastraNotEnabledError, InvalidAgentIdError },\n SetAgentName: { MastraNotEnabledError, InvalidAgentNameError },\n AddModel: { MastraNotEnabledError, InvalidModelIdError, DuplicateModelError },\n RemoveModel: { MastraNotEnabledError, ModelNotFoundError },\n SetDefaultModel: { MastraNotEnabledError, ModelNotFoundError },\n AddProfile: {\n MastraNotEnabledError,\n InvalidProfileIdError,\n DuplicateProfileError,\n ProfileNotFoundError,\n },\n UpdateProfile: { MastraNotEnabledError, ProfileNotFoundError },\n RemoveProfile: { MastraNotEnabledError, ProfileNotFoundError },\n ReorderProfiles: { MastraNotEnabledError, ProfileNotFoundError },\n SetAgentDescription: { MastraNotEnabledError },\n SetAgentImage: { MastraNotEnabledError, InvalidAgentImageError },\n ClearAgentImage: { MastraNotEnabledError },\n SetEnableChat: { MastraNotEnabledError, PowerhouseNotEnabledError },\n};\n","import type { PhClintProjectFeaturesMastraOperations } from 'document-models/ph-clint-project/v1';\nimport {\n DuplicateModelError,\n DuplicateProfileError,\n InvalidAgentIdError,\n InvalidAgentImageError,\n InvalidAgentNameError,\n InvalidModelIdError,\n InvalidProfileIdError,\n MastraNotEnabledError,\n ModelNotFoundError,\n PowerhouseNotEnabledError,\n ProfileNotFoundError,\n} from '../../gen/features-mastra/error.js';\n\nexport const phClintProjectFeaturesMastraOperations: PhClintProjectFeaturesMastraOperations = {\n enableMastraOperation(state, action) {\n if (!/^[a-z][a-z0-9-]*$/.test(action.input.agentId)) {\n throw new InvalidAgentIdError(`Invalid agent ID: ${action.input.agentId}. Must be lowercase kebab-case.`);\n }\n const trimmedName = action.input.agentName.trim();\n if (!trimmedName) {\n throw new InvalidAgentNameError('Agent name must not be empty.');\n }\n state.features.mastra.enabled = true;\n state.features.mastra.agentId = action.input.agentId;\n state.features.mastra.agentName = trimmedName;\n if (state.features.mastra.models.length === 0) {\n state.features.mastra.models.push({\n id: 'clint/demo-agent',\n isDefault: true,\n });\n }\n if (state.features.mastra.profiles.length === 0) {\n state.features.mastra.profiles.push({\n id: 'base',\n title: 'Base Profile',\n content: 'You are a helpful assistant',\n });\n }\n },\n disableMastraOperation(state) {\n state.features.mastra.enabled = false;\n state.features.mastra.agentId = null;\n state.features.mastra.agentName = null;\n state.features.mastra.agentDescription = null;\n state.features.mastra.agentImage = null;\n state.features.mastra.models = [];\n state.features.mastra.profiles = [];\n state.features.mastra.common.enableChat = false;\n // Remove auto-added clint-common package if managed\n const ccIdx = state.packages.findIndex((p) => p.packageName === '@powerhousedao/clint-common' && p.managed);\n if (ccIdx !== -1) {\n state.packages.splice(ccIdx, 1);\n }\n },\n setAgentIdOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot set agent ID when Mastra is disabled.');\n }\n if (!/^[a-z][a-z0-9-]*$/.test(action.input.agentId)) {\n throw new InvalidAgentIdError(`Invalid agent ID: ${action.input.agentId}. Must be lowercase kebab-case.`);\n }\n state.features.mastra.agentId = action.input.agentId;\n },\n setAgentNameOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot set agent name when Mastra is disabled.');\n }\n const trimmedName = action.input.agentName.trim();\n if (!trimmedName) {\n throw new InvalidAgentNameError('Agent name must not be empty.');\n }\n state.features.mastra.agentName = trimmedName;\n },\n addModelOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot add model when Mastra is disabled.');\n }\n if (!/^[a-z0-9-]+\\/[a-z0-9._-]+$/.test(action.input.id)) {\n throw new InvalidModelIdError(`Invalid model ID: ${action.input.id}. Must be provider/model-name format.`);\n }\n if (state.features.mastra.models.find((m) => m.id === action.input.id)) {\n throw new DuplicateModelError(`Model already exists: ${action.input.id}`);\n }\n const isFirst = state.features.mastra.models.length === 0;\n const makeDefault = isFirst || action.input.isDefault === true;\n if (makeDefault) {\n for (const m of state.features.mastra.models) {\n m.isDefault = false;\n }\n }\n state.features.mastra.models.push({\n id: action.input.id,\n isDefault: makeDefault,\n });\n },\n removeModelOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot remove model when Mastra is disabled.');\n }\n const idx = state.features.mastra.models.findIndex((m) => m.id === action.input.id);\n if (idx === -1) {\n throw new ModelNotFoundError(`Model not found: ${action.input.id}`);\n }\n const wasDefault = state.features.mastra.models[idx].isDefault;\n state.features.mastra.models.splice(idx, 1);\n if (wasDefault && state.features.mastra.models.length > 0) {\n state.features.mastra.models[0].isDefault = true;\n }\n },\n setDefaultModelOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot set default model when Mastra is disabled.');\n }\n const model = state.features.mastra.models.find((m) => m.id === action.input.id);\n if (!model) {\n throw new ModelNotFoundError(`Model not found: ${action.input.id}`);\n }\n for (const m of state.features.mastra.models) {\n m.isDefault = false;\n }\n model.isDefault = true;\n },\n addProfileOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot add profile when Mastra is disabled.');\n }\n if (!/^[a-z][a-z0-9-]*$/.test(action.input.id)) {\n throw new InvalidProfileIdError(`Invalid profile ID: ${action.input.id}. Must be lowercase kebab-case.`);\n }\n if (state.features.mastra.profiles.find((p) => p.id === action.input.id)) {\n throw new DuplicateProfileError(`Profile already exists: ${action.input.id}`);\n }\n const profile = {\n id: action.input.id,\n title: action.input.title,\n content: action.input.content,\n };\n if (action.input.insertBefore) {\n const beforeIdx = state.features.mastra.profiles.findIndex((p) => p.id === action.input.insertBefore);\n if (beforeIdx === -1) {\n throw new ProfileNotFoundError(`insertBefore profile not found: ${action.input.insertBefore}`);\n }\n state.features.mastra.profiles.splice(beforeIdx, 0, profile);\n } else {\n state.features.mastra.profiles.push(profile);\n }\n },\n updateProfileOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot update profile when Mastra is disabled.');\n }\n const profile = state.features.mastra.profiles.find((p) => p.id === action.input.id);\n if (!profile) {\n throw new ProfileNotFoundError(`Profile not found: ${action.input.id}`);\n }\n if (action.input.title) profile.title = action.input.title;\n if (action.input.content) profile.content = action.input.content;\n },\n removeProfileOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot remove profile when Mastra is disabled.');\n }\n const idx = state.features.mastra.profiles.findIndex((p) => p.id === action.input.id);\n if (idx === -1) {\n throw new ProfileNotFoundError(`Profile not found: ${action.input.id}`);\n }\n state.features.mastra.profiles.splice(idx, 1);\n },\n reorderProfilesOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot reorder profiles when Mastra is disabled.');\n }\n const moving = [];\n for (const id of action.input.ids) {\n const profile = state.features.mastra.profiles.find((p) => p.id === id);\n if (!profile) {\n throw new ProfileNotFoundError(`Profile not found: ${id}`);\n }\n moving.push(profile);\n }\n // Remove moved profiles\n state.features.mastra.profiles = state.features.mastra.profiles.filter((p) => !action.input.ids.includes(p.id));\n // Insert at target position\n if (action.input.insertBefore) {\n const beforeIdx = state.features.mastra.profiles.findIndex((p) => p.id === action.input.insertBefore);\n if (beforeIdx === -1) {\n throw new ProfileNotFoundError(`insertBefore profile not found: ${action.input.insertBefore}`);\n }\n state.features.mastra.profiles.splice(beforeIdx, 0, ...moving);\n } else {\n state.features.mastra.profiles.push(...moving);\n }\n },\n setAgentDescriptionOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot set agent description when Mastra is disabled.');\n }\n state.features.mastra.agentDescription = action.input.description;\n },\n setAgentImageOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot set agent image when Mastra is disabled.');\n }\n if (!/^data:[a-z]+\\/[a-z0-9.+-]+;base64,/.test(action.input.image)) {\n throw new InvalidAgentImageError('Invalid image: must be a data URL (data:<mime>;base64,...)');\n }\n state.features.mastra.agentImage = action.input.image;\n },\n clearAgentImageOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot clear agent image when Mastra is disabled.');\n }\n state.features.mastra.agentImage = null;\n },\n setEnableChatOperation(state, action) {\n if (!state.features.mastra.enabled) {\n throw new MastraNotEnabledError('Cannot toggle chat when Mastra is disabled.');\n }\n if (state.features.powerhouse === 'Disabled') {\n throw new PowerhouseNotEnabledError('Cannot toggle chat when Powerhouse is disabled.');\n }\n state.features.mastra.common.enableChat = action.input.enabled;\n const CLINT_COMMON_PKG = '@powerhousedao/clint-common';\n const CHAT_DOC_TYPE = 'powerhouse/chat-session';\n if (action.input.enabled) {\n const existing = state.packages.find((p) => p.packageName === CLINT_COMMON_PKG);\n if (!existing) {\n state.packages.push({\n id: 'pkg-clint-common',\n packageName: CLINT_COMMON_PKG,\n documentTypes: [CHAT_DOC_TYPE],\n version: null,\n managed: true,\n });\n } else if (!existing.documentTypes.includes(CHAT_DOC_TYPE)) {\n existing.documentTypes.push(CHAT_DOC_TYPE);\n }\n } else {\n const idx = state.packages.findIndex((p) => p.packageName === CLINT_COMMON_PKG && p.managed);\n if (idx !== -1) {\n const pkg = state.packages[idx];\n if (pkg.documentTypes.length === 1 && pkg.documentTypes[0] === CHAT_DOC_TYPE) {\n state.packages.splice(idx, 1);\n } else {\n const dtIdx = pkg.documentTypes.indexOf(CHAT_DOC_TYPE);\n if (dtIdx !== -1) pkg.documentTypes.splice(dtIdx, 1);\n }\n }\n }\n },\n};\n","export type ErrorCode = 'CannotLowerPowerhouseError';\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class CannotLowerPowerhouseError extends Error implements ReducerError {\n errorCode = 'CannotLowerPowerhouseError' as ErrorCode;\n constructor(message = 'CannotLowerPowerhouseError') {\n super(message);\n }\n}\n\nexport const errors = {\n SetPowerhouseLevel: { CannotLowerPowerhouseError },\n};\n","import type { PhClintProjectFeaturesPowerhouseOperations } from 'document-models/ph-clint-project/v1';\nimport { CannotLowerPowerhouseError } from '../../gen/features-powerhouse/error.js';\n\nconst LEVELS = ['Disabled', 'Reactor', 'Switchboard', 'Connect'] as const;\n\nexport const phClintProjectFeaturesPowerhouseOperations: PhClintProjectFeaturesPowerhouseOperations = {\n setPowerhouseLevelOperation(state, action) {\n const current = LEVELS.indexOf(state.features.powerhouse);\n const next = LEVELS.indexOf(action.input.level);\n if (current >= 1 && next < 1) {\n throw new CannotLowerPowerhouseError('Cannot lower Powerhouse level below Reactor once enabled');\n }\n state.features.powerhouse = action.input.level;\n // Auto-create managed app package when transitioning from Disabled to enabled\n if (current === 0 && next >= 1) {\n const hasManaged = state.packages.some((p) => p.managed);\n if (!hasManaged) {\n const baseName = state.name ? state.name.replace(/-cli$/, '-app') : 'app';\n const appName = state.scope && state.name ? `${state.scope}/${baseName}` : baseName;\n state.packages.push({\n id: `app-${state.name || 'managed'}`,\n packageName: appName,\n documentTypes: ['*/*'],\n version: null,\n managed: true,\n });\n }\n }\n // Auto-enable proxy when reaching Switchboard or above\n if (next >= 2 && !action.input.skipAutoProxy) {\n state.deployment.proxyEnabled = true;\n }\n },\n};\n","import type { PhClintProjectFeaturesRoutineOperations } from 'document-models/ph-clint-project/v1';\n\nexport const phClintProjectFeaturesRoutineOperations: PhClintProjectFeaturesRoutineOperations = {\n enableRoutineOperation(state) {\n state.features.routine.enabled = true;\n },\n disableRoutineOperation(state) {\n state.features.routine.enabled = false;\n },\n};\n","export type ErrorCode = 'InvalidVersionError' | 'InvalidPackageIdentifierError';\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class InvalidVersionError extends Error implements ReducerError {\n errorCode = 'InvalidVersionError' as ErrorCode;\n constructor(message = 'InvalidVersionError') {\n super(message);\n }\n}\n\nexport class InvalidPackageIdentifierError extends Error implements ReducerError {\n errorCode = 'InvalidPackageIdentifierError' as ErrorCode;\n constructor(message = 'InvalidPackageIdentifierError') {\n super(message);\n }\n}\n\nexport const errors = {\n SetVersion: { InvalidVersionError },\n SetPackageIdentifier: { InvalidPackageIdentifierError },\n};\n","import type { PhClintProjectIdentityOperations } from 'document-models/ph-clint-project/v1';\nimport { InvalidPackageIdentifierError, InvalidVersionError } from '../../gen/identity/error.js';\n\nconst SEMVER_PATTERN = /^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$/;\nconst NAME_PATTERN = /^[a-z][a-z0-9-]*$/;\n\nexport const phClintProjectIdentityOperations: PhClintProjectIdentityOperations = {\n setVersionOperation(state, action) {\n if (!SEMVER_PATTERN.test(action.input.version)) {\n throw new InvalidVersionError(`Invalid version: ${action.input.version}`);\n }\n state.version = action.input.version;\n },\n setDescriptionOperation(state, action) {\n state.description = action.input.description;\n },\n setPackageIdentifierOperation(state, action) {\n const trimmed = action.input.identifier.trim();\n if (!trimmed) {\n throw new InvalidPackageIdentifierError('Package identifier must not be empty');\n }\n let scopePart: string | null = null;\n let namePart = trimmed;\n if (trimmed.includes('/')) {\n const parts = trimmed.split('/');\n if (parts.length !== 2 || !parts[0] || !parts[1]) {\n throw new InvalidPackageIdentifierError(`Invalid package identifier: ${trimmed}`);\n }\n scopePart = parts[0].replace(/^@/, '');\n namePart = parts[1];\n }\n if (scopePart !== null) {\n if (!NAME_PATTERN.test(scopePart)) {\n throw new InvalidPackageIdentifierError(`Invalid scope: ${scopePart}`);\n }\n }\n if (!namePart.endsWith('-cli')) {\n namePart = namePart + '-cli';\n }\n if (!NAME_PATTERN.test(namePart)) {\n throw new InvalidPackageIdentifierError(`Invalid package name: ${namePart}`);\n }\n state.scope = scopePart ? `@${scopePart}` : null;\n state.name = namePart;\n // Update managed app package name to match new identity\n const managed = state.packages.find((p) => p.managed);\n if (managed) {\n const appBase = namePart.replace(/-cli$/, '-app');\n managed.packageName = scopePart ? `@${scopePart}/${appBase}` : appBase;\n managed.id = `app-${namePart}`;\n }\n },\n};\n","import type { PhClintProjectLifecycleOperations } from 'document-models/ph-clint-project/v1';\nimport { InvalidAgentImageError } from '../../gen/features-mastra/error.js';\n\nexport const phClintProjectLifecycleOperations: PhClintProjectLifecycleOperations = {\n importSpecOperation(state, action) {\n state.name = action.input.name;\n state.scope = action.input.scope || null;\n state.version = action.input.version;\n state.description = action.input.description;\n state.features.powerhouse = action.input.powerhouse;\n state.features.mastra.enabled = action.input.mastraEnabled;\n state.features.routine.enabled = action.input.routineEnabled;\n // Derive the expected managed app package name\n const appBase = action.input.name.replace(/-cli$/, '-app');\n const appPkgName = action.input.scope ? `${action.input.scope}/${appBase}` : appBase;\n const phEnabled = action.input.powerhouse !== 'Disabled';\n\n state.packages = action.input.packages.map((p) => ({\n id: p.id,\n packageName: p.packageName,\n documentTypes: [...p.documentTypes],\n version: p.version || null,\n managed: phEnabled && p.packageName === appPkgName,\n }));\n state.externalSkills = action.input.externalSkills.map((s) => ({\n id: s.id,\n name: s.name,\n githubUrl: s.githubUrl,\n }));\n state.features.mastra.agentId = action.input.agentId || null;\n state.features.mastra.agentName = action.input.agentName || null;\n state.features.mastra.models = (action.input.models || []).map((m) => ({\n id: m.id,\n isDefault: m.isDefault,\n }));\n state.features.mastra.profiles = (action.input.profiles || []).map((p) => ({\n id: p.id,\n title: p.title,\n content: p.content,\n }));\n\n // agentDescription — respects mastra-enabled guard\n if (action.input.agentDescription && state.features.mastra.enabled) {\n state.features.mastra.agentDescription = action.input.agentDescription;\n } else {\n state.features.mastra.agentDescription = null;\n }\n\n // agentImage — validates data URL format (same logic as setAgentImageOperation)\n if (action.input.agentImage && state.features.mastra.enabled) {\n if (!/^data:[a-z]+\\/[a-z0-9.+-]+;base64,/.test(action.input.agentImage)) {\n throw new InvalidAgentImageError('Invalid image: must be a data URL (data:<mime>;base64,...)');\n }\n state.features.mastra.agentImage = action.input.agentImage;\n } else {\n state.features.mastra.agentImage = null;\n }\n\n // enableChat — respects mastra+powerhouse guards, manages clint-common package\n if (action.input.enableChat && state.features.mastra.enabled && state.features.powerhouse !== 'Disabled') {\n state.features.mastra.common.enableChat = true;\n const CLINT_COMMON_PKG = '@powerhousedao/clint-common';\n const CHAT_DOC_TYPE = 'powerhouse/chat-session';\n const existing = state.packages.find((p) => p.packageName === CLINT_COMMON_PKG);\n if (!existing) {\n state.packages.push({\n id: 'pkg-clint-common',\n packageName: CLINT_COMMON_PKG,\n documentTypes: [CHAT_DOC_TYPE],\n version: null,\n managed: true,\n });\n } else if (!existing.documentTypes.includes(CHAT_DOC_TYPE)) {\n existing.documentTypes.push(CHAT_DOC_TYPE);\n }\n } else {\n state.features.mastra.common.enableChat = false;\n }\n\n // Deployment fields\n state.deployment.proxyEnabled = action.input.proxyEnabled ?? false;\n state.deployment.observabilityEnabled = action.input.observabilityEnabled ?? false;\n state.deployment.supportedResources = action.input.supportedResources ? [...action.input.supportedResources] : [];\n },\n};\n","export type ErrorCode =\n | 'DuplicatePackageError'\n | 'PackageNotFoundError'\n | 'CannotRemoveAppPackageError'\n | 'CannotRemoveManagedPackageError'\n | 'InvalidDocumentTypeError'\n | 'DuplicateDocumentTypeError'\n | 'DocumentTypeNotFoundError'\n | 'InvalidVersionError';\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class DuplicatePackageError extends Error implements ReducerError {\n errorCode = 'DuplicatePackageError' as ErrorCode;\n constructor(message = 'DuplicatePackageError') {\n super(message);\n }\n}\n\nexport class PackageNotFoundError extends Error implements ReducerError {\n errorCode = 'PackageNotFoundError' as ErrorCode;\n constructor(message = 'PackageNotFoundError') {\n super(message);\n }\n}\n\nexport class CannotRemoveAppPackageError extends Error implements ReducerError {\n errorCode = 'CannotRemoveAppPackageError' as ErrorCode;\n constructor(message = 'CannotRemoveAppPackageError') {\n super(message);\n }\n}\n\nexport class CannotRemoveManagedPackageError extends Error implements ReducerError {\n errorCode = 'CannotRemoveManagedPackageError' as ErrorCode;\n constructor(message = 'CannotRemoveManagedPackageError') {\n super(message);\n }\n}\n\nexport class InvalidDocumentTypeError extends Error implements ReducerError {\n errorCode = 'InvalidDocumentTypeError' as ErrorCode;\n constructor(message = 'InvalidDocumentTypeError') {\n super(message);\n }\n}\n\nexport class DuplicateDocumentTypeError extends Error implements ReducerError {\n errorCode = 'DuplicateDocumentTypeError' as ErrorCode;\n constructor(message = 'DuplicateDocumentTypeError') {\n super(message);\n }\n}\n\nexport class DocumentTypeNotFoundError extends Error implements ReducerError {\n errorCode = 'DocumentTypeNotFoundError' as ErrorCode;\n constructor(message = 'DocumentTypeNotFoundError') {\n super(message);\n }\n}\n\nexport class InvalidVersionError extends Error implements ReducerError {\n errorCode = 'InvalidVersionError' as ErrorCode;\n constructor(message = 'InvalidVersionError') {\n super(message);\n }\n}\n\nexport const errors = {\n AddPowerhousePackage: { DuplicatePackageError },\n RemovePowerhousePackage: {\n PackageNotFoundError,\n CannotRemoveAppPackageError,\n CannotRemoveManagedPackageError,\n },\n AddPackageDocumentType: {\n InvalidDocumentTypeError,\n PackageNotFoundError,\n DuplicateDocumentTypeError,\n },\n RemovePackageDocumentType: {\n PackageNotFoundError,\n DocumentTypeNotFoundError,\n },\n SetPackageVersion: { PackageNotFoundError, InvalidVersionError },\n};\n","import type { PhClintProjectPowerhousePackagesOperations } from 'document-models/ph-clint-project/v1';\nimport { CannotRemoveManagedPackageError, DocumentTypeNotFoundError, DuplicateDocumentTypeError, DuplicatePackageError, InvalidDocumentTypeError, InvalidVersionError, PackageNotFoundError } from '../../gen/powerhouse-packages/error.js';\n\nconst SEMVER = /^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$/;\n\nexport const phClintProjectPowerhousePackagesOperations: PhClintProjectPowerhousePackagesOperations = {\n addPowerhousePackageOperation(state, action) {\n const exists = state.packages.find((p) => p.id === action.input.id || p.packageName === action.input.packageName);\n if (exists) {\n throw new DuplicatePackageError(`Package already exists: ${action.input.packageName}`);\n }\n state.packages.push({\n id: action.input.id,\n packageName: action.input.packageName,\n documentTypes: [],\n version: null,\n managed: false,\n });\n },\n removePowerhousePackageOperation(state, action) {\n const idx = state.packages.findIndex((p) => p.id === action.input.id);\n if (idx === -1) {\n throw new PackageNotFoundError(`Package not found: ${action.input.id}`);\n }\n const pkg = state.packages[idx];\n if (pkg.managed) {\n throw new CannotRemoveManagedPackageError('Cannot remove a managed package');\n }\n state.packages.splice(idx, 1);\n },\n addPackageDocumentTypeOperation(state, action) {\n if (action.input.documentType !== '*/*' && !/^[a-z0-9-]+\\/[a-z0-9-]+$/.test(action.input.documentType)) {\n throw new InvalidDocumentTypeError(`Invalid document type format: ${action.input.documentType}. Expected org/name.`);\n }\n const pkg = state.packages.find((p) => p.id === action.input.packageId);\n if (!pkg) {\n throw new PackageNotFoundError(`Package not found: ${action.input.packageId}`);\n }\n if (action.input.documentType === '*/*') {\n pkg.documentTypes.length = 0;\n pkg.documentTypes.push('*/*');\n return;\n }\n if (pkg.documentTypes.includes('*/*')) {\n return;\n }\n if (pkg.documentTypes.includes(action.input.documentType)) {\n throw new DuplicateDocumentTypeError(`Document type already registered: ${action.input.documentType}`);\n }\n pkg.documentTypes.push(action.input.documentType);\n },\n removePackageDocumentTypeOperation(state, action) {\n const pkg = state.packages.find((p) => p.id === action.input.packageId);\n if (!pkg) {\n throw new PackageNotFoundError(`Package not found: ${action.input.packageId}`);\n }\n const idx = pkg.documentTypes.indexOf(action.input.documentType);\n if (idx === -1) {\n throw new DocumentTypeNotFoundError(`Document type not found: ${action.input.documentType}`);\n }\n pkg.documentTypes.splice(idx, 1);\n },\n setPackageVersionOperation(state, action) {\n const pkg = state.packages.find((p) => p.id === action.input.packageId);\n if (!pkg) {\n throw new PackageNotFoundError(`Package not found: ${action.input.packageId}`);\n }\n if (action.input.version != null) {\n if (!SEMVER.test(action.input.version)) {\n throw new InvalidVersionError(`Invalid version: ${action.input.version}`);\n }\n }\n pkg.version = action.input.version || null;\n },\n};\n","export type ErrorCode = 'InvalidVersionError' | 'PublishRecordNotFoundError';\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class InvalidVersionError extends Error implements ReducerError {\n errorCode = 'InvalidVersionError' as ErrorCode;\n constructor(message = 'InvalidVersionError') {\n super(message);\n }\n}\n\nexport class PublishRecordNotFoundError extends Error implements ReducerError {\n errorCode = 'PublishRecordNotFoundError' as ErrorCode;\n constructor(message = 'PublishRecordNotFoundError') {\n super(message);\n }\n}\n\nexport const errors = {\n BumpVersion: { InvalidVersionError },\n SetPublishStatus: { PublishRecordNotFoundError },\n};\n","import type { PhClintProjectPublishingOperations } from 'document-models/ph-clint-project/v1';\nimport { InvalidVersionError, PublishRecordNotFoundError } from '../../gen/publishing/error.js';\n\nexport const phClintProjectPublishingOperations: PhClintProjectPublishingOperations = {\n bumpVersionOperation(state, action) {\n if (!/^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$/.test(action.input.version)) {\n throw new InvalidVersionError(`Invalid version: ${action.input.version}`);\n }\n state.version = action.input.version;\n },\n publishDevOperation(state, action) {\n state.publishHistory.push({\n id: action.input.id,\n tag: 'Dev',\n version: state.version,\n timestamp: action.input.timestamp,\n status: 'Pending',\n });\n },\n publishStagingOperation(state, action) {\n state.publishHistory.push({\n id: action.input.id,\n tag: 'Staging',\n version: state.version,\n timestamp: action.input.timestamp,\n status: 'Pending',\n });\n },\n publishProductionOperation(state, action) {\n state.publishHistory.push({\n id: action.input.id,\n tag: 'Production',\n version: state.version,\n timestamp: action.input.timestamp,\n status: 'Pending',\n });\n },\n setPublishStatusOperation(state, action) {\n const record = state.publishHistory.find((r) => r.id === action.input.id);\n if (!record) {\n throw new PublishRecordNotFoundError(`Publish record not found: ${action.input.id}`);\n }\n record.status = action.input.status;\n },\n};\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\nimport type { Reducer, StateReducer } from 'document-model';\nimport { createReducer, isDocumentAction } from 'document-model';\nimport type { PhClintProjectPHState } from 'document-models/ph-clint-project/v1';\n\nimport { phClintProjectDeploymentOperations } from '../src/reducers/deployment.js';\nimport { phClintProjectExternalSkillsOperations } from '../src/reducers/external-skills.js';\nimport { phClintProjectFeaturesMastraOperations } from '../src/reducers/features-mastra.js';\nimport { phClintProjectFeaturesPowerhouseOperations } from '../src/reducers/features-powerhouse.js';\nimport { phClintProjectFeaturesRoutineOperations } from '../src/reducers/features-routine.js';\nimport { phClintProjectIdentityOperations } from '../src/reducers/identity.js';\nimport { phClintProjectLifecycleOperations } from '../src/reducers/lifecycle.js';\nimport { phClintProjectPowerhousePackagesOperations } from '../src/reducers/powerhouse-packages.js';\nimport { phClintProjectPublishingOperations } from '../src/reducers/publishing.js';\n\nimport {\n AddExternalSkillInputSchema,\n AddModelInputSchema,\n AddPackageDocumentTypeInputSchema,\n AddPowerhousePackageInputSchema,\n AddProfileInputSchema,\n AddSupportedResourceInputSchema,\n BumpVersionInputSchema,\n ClearAgentImageInputSchema,\n DisableMastraInputSchema,\n DisableRoutineInputSchema,\n EnableMastraInputSchema,\n EnableRoutineInputSchema,\n ImportSpecInputSchema,\n PublishDevInputSchema,\n PublishProductionInputSchema,\n PublishStagingInputSchema,\n RemoveExternalSkillInputSchema,\n RemoveModelInputSchema,\n RemovePackageDocumentTypeInputSchema,\n RemovePowerhousePackageInputSchema,\n RemoveProfileInputSchema,\n RemoveSupportedResourceInputSchema,\n ReorderProfilesInputSchema,\n SetAgentDescriptionInputSchema,\n SetAgentIdInputSchema,\n SetAgentImageInputSchema,\n SetAgentNameInputSchema,\n SetDefaultModelInputSchema,\n SetDescriptionInputSchema,\n SetEnableChatInputSchema,\n SetExternalSkillGithubUrlInputSchema,\n SetExternalSkillNameInputSchema,\n SetObservabilityEnabledInputSchema,\n SetPackageIdentifierInputSchema,\n SetPackageVersionInputSchema,\n SetPowerhouseLevelInputSchema,\n SetProxyEnabledInputSchema,\n SetPublishStatusInputSchema,\n SetVersionInputSchema,\n UpdateProfileInputSchema,\n} from './schema/zod.js';\n\nconst stateReducer: StateReducer<PhClintProjectPHState> = (state, action, dispatch) => {\n if (isDocumentAction(action)) {\n return state;\n }\n switch (action.type) {\n case 'SET_DESCRIPTION': {\n SetDescriptionInputSchema().parse(action.input);\n\n phClintProjectIdentityOperations.setDescriptionOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_VERSION': {\n SetVersionInputSchema().parse(action.input);\n\n phClintProjectIdentityOperations.setVersionOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_PACKAGE_IDENTIFIER': {\n SetPackageIdentifierInputSchema().parse(action.input);\n\n phClintProjectIdentityOperations.setPackageIdentifierOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_POWERHOUSE_LEVEL': {\n SetPowerhouseLevelInputSchema().parse(action.input);\n\n phClintProjectFeaturesPowerhouseOperations.setPowerhouseLevelOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'ENABLE_MASTRA': {\n EnableMastraInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.enableMastraOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'DISABLE_MASTRA': {\n DisableMastraInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.disableMastraOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_AGENT_ID': {\n SetAgentIdInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.setAgentIdOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_AGENT_NAME': {\n SetAgentNameInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.setAgentNameOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'ADD_MODEL': {\n AddModelInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.addModelOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'REMOVE_MODEL': {\n RemoveModelInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.removeModelOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_DEFAULT_MODEL': {\n SetDefaultModelInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.setDefaultModelOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'ADD_PROFILE': {\n AddProfileInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.addProfileOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'UPDATE_PROFILE': {\n UpdateProfileInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.updateProfileOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'REMOVE_PROFILE': {\n RemoveProfileInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.removeProfileOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'REORDER_PROFILES': {\n ReorderProfilesInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.reorderProfilesOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_AGENT_DESCRIPTION': {\n SetAgentDescriptionInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.setAgentDescriptionOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_AGENT_IMAGE': {\n SetAgentImageInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.setAgentImageOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'CLEAR_AGENT_IMAGE': {\n ClearAgentImageInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.clearAgentImageOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_ENABLE_CHAT': {\n SetEnableChatInputSchema().parse(action.input);\n\n phClintProjectFeaturesMastraOperations.setEnableChatOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'ENABLE_ROUTINE': {\n EnableRoutineInputSchema().parse(action.input);\n\n phClintProjectFeaturesRoutineOperations.enableRoutineOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'DISABLE_ROUTINE': {\n DisableRoutineInputSchema().parse(action.input);\n\n phClintProjectFeaturesRoutineOperations.disableRoutineOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'ADD_POWERHOUSE_PACKAGE': {\n AddPowerhousePackageInputSchema().parse(action.input);\n\n phClintProjectPowerhousePackagesOperations.addPowerhousePackageOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'REMOVE_POWERHOUSE_PACKAGE': {\n RemovePowerhousePackageInputSchema().parse(action.input);\n\n phClintProjectPowerhousePackagesOperations.removePowerhousePackageOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'ADD_PACKAGE_DOCUMENT_TYPE': {\n AddPackageDocumentTypeInputSchema().parse(action.input);\n\n phClintProjectPowerhousePackagesOperations.addPackageDocumentTypeOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'REMOVE_PACKAGE_DOCUMENT_TYPE': {\n RemovePackageDocumentTypeInputSchema().parse(action.input);\n\n phClintProjectPowerhousePackagesOperations.removePackageDocumentTypeOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_PACKAGE_VERSION': {\n SetPackageVersionInputSchema().parse(action.input);\n\n phClintProjectPowerhousePackagesOperations.setPackageVersionOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'ADD_EXTERNAL_SKILL': {\n AddExternalSkillInputSchema().parse(action.input);\n\n phClintProjectExternalSkillsOperations.addExternalSkillOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'REMOVE_EXTERNAL_SKILL': {\n RemoveExternalSkillInputSchema().parse(action.input);\n\n phClintProjectExternalSkillsOperations.removeExternalSkillOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_EXTERNAL_SKILL_NAME': {\n SetExternalSkillNameInputSchema().parse(action.input);\n\n phClintProjectExternalSkillsOperations.setExternalSkillNameOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_EXTERNAL_SKILL_GITHUB_URL': {\n SetExternalSkillGithubUrlInputSchema().parse(action.input);\n\n phClintProjectExternalSkillsOperations.setExternalSkillGithubUrlOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'BUMP_VERSION': {\n BumpVersionInputSchema().parse(action.input);\n\n phClintProjectPublishingOperations.bumpVersionOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'PUBLISH_DEV': {\n PublishDevInputSchema().parse(action.input);\n\n phClintProjectPublishingOperations.publishDevOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'PUBLISH_STAGING': {\n PublishStagingInputSchema().parse(action.input);\n\n phClintProjectPublishingOperations.publishStagingOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'PUBLISH_PRODUCTION': {\n PublishProductionInputSchema().parse(action.input);\n\n phClintProjectPublishingOperations.publishProductionOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_PUBLISH_STATUS': {\n SetPublishStatusInputSchema().parse(action.input);\n\n phClintProjectPublishingOperations.setPublishStatusOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'IMPORT_SPEC': {\n ImportSpecInputSchema().parse(action.input);\n\n phClintProjectLifecycleOperations.importSpecOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'ADD_SUPPORTED_RESOURCE': {\n AddSupportedResourceInputSchema().parse(action.input);\n\n phClintProjectDeploymentOperations.addSupportedResourceOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'REMOVE_SUPPORTED_RESOURCE': {\n RemoveSupportedResourceInputSchema().parse(action.input);\n\n phClintProjectDeploymentOperations.removeSupportedResourceOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_PROXY_ENABLED': {\n SetProxyEnabledInputSchema().parse(action.input);\n\n phClintProjectDeploymentOperations.setProxyEnabledOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n case 'SET_OBSERVABILITY_ENABLED': {\n SetObservabilityEnabledInputSchema().parse(action.input);\n\n phClintProjectDeploymentOperations.setObservabilityEnabledOperation((state as any)[action.scope], action as any, dispatch);\n\n break;\n }\n\n default:\n return state;\n }\n};\n\nexport const reducer: Reducer<PhClintProjectPHState> = createReducer(stateReducer);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nexport const phClintProjectDocumentType = 'powerhouse/ph-clint-project';\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { BaseDocumentHeaderSchema, BaseDocumentStateSchema } from 'document-model';\nimport { z } from 'zod';\nimport { phClintProjectDocumentType } from './document-type.js';\nimport { PhClintProjectStateSchema } from './schema/zod.js';\nimport type { PhClintProjectDocument, PhClintProjectPHState } from './types.js';\n\n/** Schema for validating the header object of a PhClintProject document */\nexport const PhClintProjectDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({\n documentType: z.literal(phClintProjectDocumentType),\n});\n\n/** Schema for validating the state object of a PhClintProject document */\nexport const PhClintProjectPHStateSchema = BaseDocumentStateSchema.extend({\n global: PhClintProjectStateSchema(),\n});\n\nexport const PhClintProjectDocumentSchema = z.object({\n header: PhClintProjectDocumentHeaderSchema,\n state: PhClintProjectPHStateSchema,\n initialState: PhClintProjectPHStateSchema,\n});\n\n/** Simple helper function to check if a state object is a PhClintProject document state object */\nexport function isPhClintProjectState(state: unknown): state is PhClintProjectPHState {\n return PhClintProjectPHStateSchema.safeParse(state).success;\n}\n\n/** Simple helper function to assert that a document state object is a PhClintProject document state object */\nexport function assertIsPhClintProjectState(state: unknown): asserts state is PhClintProjectPHState {\n PhClintProjectPHStateSchema.parse(state);\n}\n\n/** Simple helper function to check if a document is a PhClintProject document */\nexport function isPhClintProjectDocument(document: unknown): document is PhClintProjectDocument {\n return PhClintProjectDocumentSchema.safeParse(document).success;\n}\n\n/** Simple helper function to assert that a document is a PhClintProject document */\nexport function assertIsPhClintProjectDocument(document: unknown): asserts document is PhClintProjectDocument {\n PhClintProjectDocumentSchema.parse(document);\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from 'document-model';\nimport { baseCreateDocument, baseLoadFromInput, baseSaveToFileHandle, defaultBaseState, generateId } from 'document-model';\nimport { assertIsPhClintProjectDocument, assertIsPhClintProjectState, isPhClintProjectDocument, isPhClintProjectState } from './document-schema.js';\nimport { phClintProjectDocumentType } from './document-type.js';\nimport { reducer } from './reducer.js';\nimport type { PhClintProjectGlobalState, PhClintProjectLocalState, PhClintProjectPHState } from './types.js';\n\nexport const initialGlobalState: PhClintProjectGlobalState = {\n name: null,\n scope: null,\n version: '0.1.0',\n description: '',\n features: {\n powerhouse: 'Disabled',\n mastra: {\n enabled: false,\n agentId: null,\n agentName: null,\n agentDescription: null,\n agentImage: null,\n models: [],\n profiles: [],\n common: { enableChat: false },\n },\n routine: { enabled: false },\n },\n packages: [],\n externalSkills: [],\n publishHistory: [],\n deployment: {\n proxyEnabled: false,\n observabilityEnabled: false,\n supportedResources: ['vetra-agent-s', 'vetra-agent-m', 'vetra-agent-l', 'vetra-agent-xl', 'vetra-agent-xxl'],\n },\n};\nexport const initialLocalState: PhClintProjectLocalState = {};\n\nexport const utils: DocumentModelUtils<PhClintProjectPHState> = {\n fileExtension: 'pcp',\n createState(state) {\n return {\n ...defaultBaseState(),\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n },\n createDocument(state) {\n const document = baseCreateDocument(utils.createState, state);\n\n document.header.documentType = phClintProjectDocumentType;\n\n // for backwards compatibility, but this is NOT a valid signed document id\n document.header.id = generateId();\n\n return document;\n },\n saveToFileHandle(document, input) {\n return baseSaveToFileHandle(document, input);\n },\n loadFromInput(input) {\n return baseLoadFromInput(input, reducer);\n },\n isStateOfType(state) {\n return isPhClintProjectState(state);\n },\n assertIsStateOfType(state) {\n return assertIsPhClintProjectState(state);\n },\n isDocumentOfType(document) {\n return isPhClintProjectDocument(document);\n },\n assertIsDocumentOfType(document) {\n return assertIsPhClintProjectDocument(document);\n },\n};\n","export {};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from 'document-model';\nimport type { PhClintProjectPHState } from './gen/types.js';\nimport { utils as genUtils } from './gen/utils.js';\nimport * as customUtils from './src/utils.js';\n\n/** Utils for the PhClintProject document model */\nexport const utils: DocumentModelUtils<PhClintProjectPHState> = {\n ...genUtils,\n ...customUtils,\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelModule } from 'document-model';\nimport { createState, defaultBaseState } from 'document-model';\nimport { actions } from './actions.js';\nimport { documentModel } from './gen/document-model.js';\nimport { reducer } from './gen/reducer.js';\nimport type { PhClintProjectPHState } from './gen/types.js';\nimport { utils } from './utils.js';\n\n/** Document model module for the PhClintProject document type */\nexport const PhClintProject = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<PhClintProjectPHState>;\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { PHDocumentController } from 'document-model';\nimport { PhClintProject } from '../module.js';\nimport type { PhClintProjectAction, PhClintProjectPHState } from './types.js';\n\nexport const PhClintProjectController = PHDocumentController.forDocumentModel<PhClintProjectPHState, PhClintProjectAction>(PhClintProject);\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n * Factory methods for creating PhClintProjectDocument instances\n */\nimport type { PHAuthState, PHBaseState, PHDocumentState } from 'document-model';\nimport { createBaseState, defaultBaseState } from 'document-model';\nimport type { PhClintProjectDocument, PhClintProjectGlobalState, PhClintProjectLocalState, PhClintProjectPHState } from './types.js';\nimport { utils } from './utils.js';\n\nexport function defaultGlobalState(): PhClintProjectGlobalState {\n return {\n name: null,\n scope: null,\n version: '0.1.0',\n description: '',\n features: {\n powerhouse: 'Disabled',\n mastra: {\n enabled: false,\n agentId: null,\n agentName: null,\n agentDescription: null,\n agentImage: null,\n models: [],\n profiles: [],\n common: { enableChat: false },\n },\n routine: { enabled: false },\n },\n packages: [],\n externalSkills: [],\n publishHistory: [],\n deployment: {\n proxyEnabled: false,\n observabilityEnabled: false,\n supportedResources: ['vetra-agent-s', 'vetra-agent-m', 'vetra-agent-l', 'vetra-agent-xl', 'vetra-agent-xxl'],\n },\n };\n}\n\nexport function defaultLocalState(): PhClintProjectLocalState {\n return {};\n}\n\nexport function defaultPHState(): PhClintProjectPHState {\n return {\n ...defaultBaseState(),\n global: defaultGlobalState(),\n local: defaultLocalState(),\n };\n}\n\nexport function createGlobalState(state?: Partial<PhClintProjectGlobalState>): PhClintProjectGlobalState {\n return {\n ...defaultGlobalState(),\n ...(state || {}),\n };\n}\n\nexport function createLocalState(state?: Partial<PhClintProjectLocalState>): PhClintProjectLocalState {\n return {\n ...defaultLocalState(),\n ...(state || {}),\n } as PhClintProjectLocalState;\n}\n\nexport function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<PhClintProjectGlobalState>, localState?: Partial<PhClintProjectLocalState>): PhClintProjectPHState {\n return {\n ...createBaseState(baseState?.auth, baseState?.document),\n global: createGlobalState(globalState),\n local: createLocalState(localState),\n };\n}\n\n/**\n * Creates a PhClintProjectDocument with custom global and local state\n * This properly handles the PHBaseState requirements while allowing\n * document-specific state to be set.\n */\nexport function createPhClintProjectDocument(\n state?: Partial<{\n auth?: Partial<PHAuthState>;\n document?: Partial<PHDocumentState>;\n global?: Partial<PhClintProjectGlobalState>;\n local?: Partial<PhClintProjectLocalState>;\n }>,\n): PhClintProjectDocument {\n const document = utils.createDocument(state ? createState(createBaseState(state.auth, state.document), state.global, state.local) : undefined);\n\n return document;\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentDispatch } from '@powerhousedao/reactor-browser';\nimport { useDocumentById, useDocumentsInSelectedDrive, useDocumentsInSelectedFolder, useSelectedDocument } from '@powerhousedao/reactor-browser';\nimport type { PhClintProjectAction, PhClintProjectDocument } from 'document-models/ph-clint-project/v1';\nimport { assertIsPhClintProjectDocument, isPhClintProjectDocument } from './gen/document-schema.js';\n\n/** Hook to get a PhClintProject document by its id */\nexport function usePhClintProjectDocumentById(documentId: string | null | undefined): [PhClintProjectDocument, DocumentDispatch<PhClintProjectAction>] | [undefined, undefined] {\n const [document, dispatch] = useDocumentById(documentId);\n if (!isPhClintProjectDocument(document)) return [undefined, undefined];\n return [document, dispatch];\n}\n\n/** Hook to get the selected PhClintProject document */\nexport function useSelectedPhClintProjectDocument(): [PhClintProjectDocument, DocumentDispatch<PhClintProjectAction>] {\n const [document, dispatch] = useSelectedDocument();\n\n assertIsPhClintProjectDocument(document);\n return [document, dispatch] as const;\n}\n\n/** Hook to get all PhClintProject documents in the selected drive */\nexport function usePhClintProjectDocumentsInSelectedDrive() {\n const documentsInSelectedDrive = useDocumentsInSelectedDrive();\n return documentsInSelectedDrive?.filter(isPhClintProjectDocument);\n}\n\n/** Hook to get all PhClintProject documents in the selected folder */\nexport function usePhClintProjectDocumentsInSelectedFolder() {\n const documentsInSelectedFolder = useDocumentsInSelectedFolder();\n return documentsInSelectedFolder?.filter(isPhClintProjectDocument);\n}\n","export const supportedVersions = [1] as const;\n\nexport const latestVersion = supportedVersions[0];\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { UpgradeManifest } from 'document-model';\nimport { latestVersion, supportedVersions } from './versions.js';\n\nexport const phClintProjectUpgradeManifest: UpgradeManifest<typeof supportedVersions> = {\n documentType: 'powerhouse/ph-clint-project',\n latestVersion,\n supportedVersions,\n upgrades: {},\n};\n"],"mappings":"wVAsEA,IAAa,GAAuB,GAAmC,GAAyB,KAEnF,GAA0B,GAAO,CAAC,OAAQ,GAAM,GAAoB,EAAE,CAAC,CAEvE,EAAwB,GAAO,CAAC,UAAW,WAAY,UAAW,cAAc,CAAC,CAEjF,GAAsB,GAAO,CAAC,SAAU,aAAc,UAAW,YAAY,CAAC,CAE9E,GAAmB,GAAO,CAAC,MAAO,aAAc,UAAU,CAAC,CAExE,SAAgB,IAA8E,CAC5F,OAAO,EAAS,CACd,UAAW,GAAO,CAClB,GAAI,GAAU,CACd,KAAM,GAAU,CACjB,CAAC,CAGJ,SAAgB,IAA8D,CAC5E,OAAO,EAAS,CACd,GAAI,GAAU,CACd,UAAW,GAAW,CAAC,SAAS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