@powerhousedao/ph-clint-app 0.1.0-dev.70 → 0.1.0-dev.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/connect-DWTABaUr.js.map +1 -1
- package/dist/browser/document-models/index.js +1 -1
- package/dist/browser/document-models/ph-clint-project/index.js +3 -3
- package/dist/browser/{editor-DXdZh-Jg.js → editor-DL0W2XOS.js} +15 -7
- package/dist/browser/{editor-DXdZh-Jg.js.map → editor-DL0W2XOS.js.map} +1 -1
- package/dist/browser/editors/ph-clint-project-editor/module.js +1 -1
- package/dist/browser/factory-BorJujF7.js.map +1 -1
- package/dist/browser/index.js +6 -5
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/{module-Os61MtkV.js → module-DoAlHsjp.js} +1668 -1593
- package/dist/browser/{module-Os61MtkV.js.map → module-DoAlHsjp.js.map} +1 -1
- package/dist/browser/{ph-clint-project-ii15OQEN.js → ph-clint-project-D634z5c5.js} +22 -17
- package/dist/browser/ph-clint-project-D634z5c5.js.map +1 -0
- package/dist/browser/switchboard-vSM1SpS5.js.map +1 -1
- package/dist/connect/assets/connect-q2RMY-je.js.map +1 -1
- package/dist/connect/assets/editor-DgkuaKuV.js +2 -0
- package/dist/connect/assets/editor-DgkuaKuV.js.map +1 -0
- package/dist/connect/assets/index-BSq-9kCR.css +2 -0
- package/dist/connect/assets/{index-CLaxnBSy.js → index-BXAErAWR.js} +20 -20
- package/dist/connect/assets/index-BXAErAWR.js.map +1 -0
- package/dist/connect/assets/{ph-clint-project-YyH0u8I2.js → ph-clint-project-BRYYVNTj.js} +9 -3
- package/dist/connect/assets/ph-clint-project-BRYYVNTj.js.map +1 -0
- package/dist/connect/assets/switchboard-BCPp_tNt.js.map +1 -1
- package/dist/connect/index.html +3 -3
- package/dist/connect/ph-packages.json +1 -1
- package/dist/document-models/document-models.d.ts +5 -1
- package/dist/document-models/document-models.d.ts.map +1 -1
- package/dist/document-models/index.d.ts +1 -1
- package/dist/document-models/ph-clint-project/index.d.ts +2 -2
- package/dist/document-models/ph-clint-project/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/upgrades/index.d.ts +2 -2
- package/dist/document-models/ph-clint-project/upgrades/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/upgrades/upgrade-manifest.d.ts +6 -2
- package/dist/document-models/ph-clint-project/upgrades/upgrade-manifest.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/actions.d.ts +1 -0
- package/dist/document-models/ph-clint-project/v1/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/actions.d.ts +22 -18
- package/dist/document-models/ph-clint-project/v1/gen/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/controller.d.ts +6 -2
- package/dist/document-models/ph-clint-project/v1/gen/controller.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/creators.d.ts +22 -18
- package/dist/document-models/ph-clint-project/v1/gen/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/actions.d.ts +10 -2
- package/dist/document-models/ph-clint-project/v1/gen/deployment/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/creators.d.ts +3 -2
- package/dist/document-models/ph-clint-project/v1/gen/deployment/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/operations.d.ts +10 -5
- package/dist/document-models/ph-clint-project/v1/gen/deployment/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-schema.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-type.d.ts +4 -0
- package/dist/document-models/ph-clint-project/v1/gen/document-type.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/actions.d.ts +10 -6
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/operations.d.ts +11 -7
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/actions.d.ts +5 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/operations.d.ts +21 -17
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/actions.d.ts +7 -3
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/operations.d.ts +8 -4
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/actions.d.ts +8 -4
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/operations.d.ts +9 -5
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/actions.d.ts +9 -5
- package/dist/document-models/ph-clint-project/v1/gen/identity/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/identity/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/operations.d.ts +10 -6
- package/dist/document-models/ph-clint-project/v1/gen/identity/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/index.d.ts +24 -20
- package/dist/document-models/ph-clint-project/v1/gen/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/actions.d.ts +7 -3
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/operations.d.ts +8 -4
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/ph-factories.d.ts +3 -1
- package/dist/document-models/ph-clint-project/v1/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/actions.d.ts +11 -7
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/operations.d.ts +12 -8
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/actions.d.ts +11 -7
- package/dist/document-models/ph-clint-project/v1/gen/publishing/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/publishing/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/operations.d.ts +12 -8
- package/dist/document-models/ph-clint-project/v1/gen/publishing/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/index.d.ts +6 -2
- package/dist/document-models/ph-clint-project/v1/gen/schema/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/types.d.ts +5 -0
- package/dist/document-models/ph-clint-project/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/zod.d.ts +2 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/types.d.ts +9 -5
- package/dist/document-models/ph-clint-project/v1/gen/types.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/utils.d.ts +4 -0
- package/dist/document-models/ph-clint-project/v1/gen/utils.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/hooks.d.ts +7 -6
- package/dist/document-models/ph-clint-project/v1/hooks.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/index.d.ts +10 -5
- package/dist/document-models/ph-clint-project/v1/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/module.d.ts +59 -3
- package/dist/document-models/ph-clint-project/v1/module.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/index.d.ts +5 -1
- package/dist/document-models/ph-clint-project/v1/src/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/deployment.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/external-skills.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/external-skills.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-mastra.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-powerhouse.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-powerhouse.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-routine.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-routine.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/identity.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/identity.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/lifecycle.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/powerhouse-packages.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/powerhouse-packages.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/publishing.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/publishing.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/utils.d.ts +6 -2
- package/dist/document-models/ph-clint-project/v1/utils.d.ts.map +1 -1
- package/dist/document-models/upgrade-manifests.d.ts +5 -1
- package/dist/document-models/upgrade-manifests.d.ts.map +1 -1
- package/dist/editors/index.d.ts +1 -1
- package/dist/editors/ph-clint-project-editor/editor.d.ts.map +1 -1
- package/dist/node/connect-D6zH68QP.mjs.map +1 -1
- package/dist/node/document-models/index.mjs +1 -1
- package/dist/node/document-models/ph-clint-project/index.mjs +3 -3
- package/dist/node/{editor-DBx3eRfn.mjs → editor-mM5FSNXc.mjs} +15 -7
- package/dist/node/{editor-DBx3eRfn.mjs.map → editor-mM5FSNXc.mjs.map} +1 -1
- package/dist/node/editors/ph-clint-project-editor/module.mjs +1 -1
- package/dist/node/factory-Dp2uZuax.mjs.map +1 -1
- package/dist/node/index.mjs +6 -5
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{module-B8cTCphJ.mjs → module-DayL4J7r.mjs} +1668 -1593
- package/dist/node/{module-B8cTCphJ.mjs.map → module-DayL4J7r.mjs.map} +1 -1
- package/dist/node/{ph-clint-project-B70Z4AOx.mjs → ph-clint-project-Btx_kiiQ.mjs} +22 -17
- package/dist/node/ph-clint-project-Btx_kiiQ.mjs.map +1 -0
- package/dist/node/switchboard-DwDjMPBV.mjs.map +1 -1
- package/dist/powerhouse.manifest.json +26 -25
- package/dist/processors/connect.d.ts +1 -1
- package/dist/processors/factory.d.ts +2 -2
- package/dist/processors/factory.d.ts.map +1 -1
- package/dist/processors/index.d.ts +1 -1
- package/dist/processors/switchboard.d.ts +1 -1
- package/dist/style.css +7 -0
- package/package.json +1 -1
- package/dist/browser/ph-clint-project-ii15OQEN.js.map +0 -1
- package/dist/connect/assets/editor-Cmx2y5dq.js +0 -2
- package/dist/connect/assets/editor-Cmx2y5dq.js.map +0 -1
- package/dist/connect/assets/index-C7FM_INJ.css +0 -2
- package/dist/connect/assets/index-CLaxnBSy.js.map +0 -1
- package/dist/connect/assets/ph-clint-project-YyH0u8I2.js.map +0 -1
- package/dist/node/ph-clint-project-B70Z4AOx.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./chunk-zsgVPwQN.js";import{$ as t,At as n,Ct as r,Dt as i,Et as a,K as ee,Mt as o,Nt as s,Pt as te,Q as ne,St as re,Tt as c,Z as ie,at as ae,ct as oe,et as se,it as l,kt as u,nt as ce,pt as le,st as ue,tt as de,ut as fe,wt as d}from"./lz-string-CSbzFwDi.js";import{G as pe,K as me,Mt as he,dt as ge}from"./dist-BzAXfaNf.js";var _e={id:`powerhouse/ph-clint-project`,name:`PhClintProject`,author:{name:`Powerhouse Inc.`,website:`https://powerhouse.inc`},extension:`pcp`,description:`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.`,specifications:[{state:{local:{schema:``,examples:[],initialValue:``},global:{schema:`type PhClintProjectState {
|
|
1
|
+
import{r as e}from"./chunk-zsgVPwQN.js";import{$ as t,At as n,Ct as r,Dt as i,Et as a,K as ee,Mt as o,Nt as s,Pt as te,Q as ne,St as re,Tt as c,Z as ie,at as ae,ct as oe,et as se,it as l,kt as u,nt as ce,pt as le,st as ue,tt as de,ut as fe,wt as d}from"./lz-string-CSbzFwDi.js";import{G as pe,K as me,Mt as he,dt as ge}from"./dist-BzAXfaNf.js";var _e=e=>e!=null,ve=r().refine(e=>_e(e)),f=re([`Connect`,`Disabled`,`Reactor`,`Switchboard`]),ye=re([`Failed`,`InProgress`,`Pending`,`Succeeded`]),be=re([`Dev`,`Production`,`Staging`]);function xe(){return u({githubUrl:o(),id:n(),name:n()})}function Se(){return u({id:n(),isDefault:c().nullish()})}function Ce(){return u({documentType:n(),packageId:n()})}function p(){return u({id:n(),packageName:n()})}function m(){return u({content:n(),id:n(),insertBefore:n().nullish(),title:n()})}function we(){return u({resource:n()})}function Te(){return u({version:n()})}function Ee(){return u({_:c().nullish()})}function De(){return u({_:c().nullish()})}function Oe(){return u({_:c().nullish()})}function ke(){return u({agentId:n(),agentName:n()})}function h(){return u({_:c().nullish()})}function Ae(){return u({__typename:i(`ExternalSkill`).optional(),githubUrl:o(),id:n(),name:n()})}function je(){return u({id:n(),isDefault:c()})}function Me(){return u({documentTypes:d(n()),id:n(),packageName:n(),version:n().nullish()})}function Ne(){return u({content:n(),id:n(),title:n()})}function Pe(){return u({githubUrl:o(),id:n(),name:n()})}function g(){return u({agentDescription:n().nullish(),agentId:n().nullish(),agentImage:n().nullish(),agentName:n().nullish(),description:n(),enableChat:c().nullish(),externalSkills:d(a(()=>Pe())),mastraEnabled:c(),models:d(a(()=>je())).nullish(),name:n(),observabilityEnabled:c().nullish(),packages:d(a(()=>Me())),powerhouse:f,profiles:d(a(()=>Ne())).nullish(),proxyEnabled:c().nullish(),routineEnabled:c(),scope:n().nullish(),supportedResources:d(n()).nullish(),version:n()})}function Fe(){return u({__typename:i(`PhClintAgentModel`).optional(),id:n(),isDefault:c()})}function Ie(){return u({__typename:i(`PhClintAgentProfile`).optional(),content:n(),id:n(),title:n()})}function Le(){return u({__typename:i(`PhClintDeployment`).optional(),observabilityEnabled:c(),proxyEnabled:c(),supportedResources:d(n())})}function Re(){return u({__typename:i(`PhClintFeatures`).optional(),mastra:a(()=>Be()),powerhouse:f,routine:a(()=>He())})}function ze(){return u({__typename:i(`PhClintMastraCommon`).optional(),enableChat:c()})}function Be(){return u({__typename:i(`PhClintMastraFeature`).optional(),agentDescription:n().nullish(),agentId:n().nullish(),agentImage:n().nullish(),agentName:n().nullish(),common:a(()=>ze()),enabled:c(),models:d(a(()=>Fe())),profiles:d(a(()=>Ie()))})}function Ve(){return u({__typename:i(`PhClintProjectState`).optional(),deployment:a(()=>Le()),description:n(),externalSkills:d(a(()=>Ae())),features:a(()=>Re()),name:n().nullish(),packages:d(a(()=>Ue())),publishHistory:d(a(()=>We())),scope:n().nullish(),version:n()})}function He(){return u({__typename:i(`PhClintRoutineFeature`).optional(),enabled:c()})}function Ue(){return u({__typename:i(`PowerhousePackage`).optional(),documentTypes:d(n()),id:n(),managed:c(),packageName:n(),version:n().nullish()})}function _(){return u({id:n(),timestamp:s()})}function v(){return u({id:n(),timestamp:s()})}function We(){return u({__typename:i(`PublishRecord`).optional(),id:n(),status:ye,tag:be,timestamp:s(),version:n()})}function y(){return u({id:n(),timestamp:s()})}function b(){return u({id:n()})}function x(){return u({id:n()})}function S(){return u({documentType:n(),packageId:n()})}function C(){return u({id:n()})}function w(){return u({id:n()})}function T(){return u({resource:n()})}function E(){return u({ids:d(n()),insertBefore:n().nullish()})}function D(){return u({description:n()})}function O(){return u({agentId:n()})}function k(){return u({image:n()})}function A(){return u({agentName:n()})}function j(){return u({id:n()})}function M(){return u({description:n()})}function N(){return u({enabled:c()})}function P(){return u({githubUrl:o(),id:n()})}function F(){return u({id:n(),name:n()})}function I(){return u({enabled:c()})}function L(){return u({identifier:n()})}function Ge(){return u({packageId:n(),version:n().nullish()})}function R(){return u({level:f,skipAutoProxy:c().nullish()})}function z(){return u({enabled:c()})}function B(){return u({id:n(),status:ye})}function V(){return u({version:n()})}function H(){return u({content:n().nullish(),id:n(),title:n().nullish()})}var Ke=e({addSupportedResource:()=>qe,removeSupportedResource:()=>Je,setObservabilityEnabled:()=>Xe,setProxyEnabled:()=>Ye}),qe=e=>l(`ADD_SUPPORTED_RESOURCE`,{...e},void 0,we,`global`),Je=e=>l(`REMOVE_SUPPORTED_RESOURCE`,{...e},void 0,T,`global`),Ye=e=>l(`SET_PROXY_ENABLED`,{...e},void 0,z,`global`),Xe=e=>l(`SET_OBSERVABILITY_ENABLED`,{...e},void 0,I,`global`),Ze=e({addExternalSkill:()=>Qe,removeExternalSkill:()=>$e,setExternalSkillGithubUrl:()=>tt,setExternalSkillName:()=>et}),Qe=e=>l(`ADD_EXTERNAL_SKILL`,{...e},void 0,xe,`global`),$e=e=>l(`REMOVE_EXTERNAL_SKILL`,{...e},void 0,b,`global`),et=e=>l(`SET_EXTERNAL_SKILL_NAME`,{...e},void 0,F,`global`),tt=e=>l(`SET_EXTERNAL_SKILL_GITHUB_URL`,{...e},void 0,P,`global`),nt=e({addModel:()=>st,addProfile:()=>ut,clearAgentImage:()=>gt,disableMastra:()=>it,enableMastra:()=>rt,removeModel:()=>ct,removeProfile:()=>ft,reorderProfiles:()=>pt,setAgentDescription:()=>mt,setAgentId:()=>at,setAgentImage:()=>ht,setAgentName:()=>ot,setDefaultModel:()=>lt,setEnableChat:()=>_t,updateProfile:()=>dt}),rt=e=>l(`ENABLE_MASTRA`,{...e},void 0,ke,`global`),it=e=>l(`DISABLE_MASTRA`,{...e},void 0,De,`global`),at=e=>l(`SET_AGENT_ID`,{...e},void 0,O,`global`),ot=e=>l(`SET_AGENT_NAME`,{...e},void 0,A,`global`),st=e=>l(`ADD_MODEL`,{...e},void 0,Se,`global`),ct=e=>l(`REMOVE_MODEL`,{...e},void 0,x,`global`),lt=e=>l(`SET_DEFAULT_MODEL`,{...e},void 0,j,`global`),ut=e=>l(`ADD_PROFILE`,{...e},void 0,m,`global`),dt=e=>l(`UPDATE_PROFILE`,{...e},void 0,H,`global`),ft=e=>l(`REMOVE_PROFILE`,{...e},void 0,w,`global`),pt=e=>l(`REORDER_PROFILES`,{...e},void 0,E,`global`),mt=e=>l(`SET_AGENT_DESCRIPTION`,{...e},void 0,D,`global`),ht=e=>l(`SET_AGENT_IMAGE`,{...e},void 0,k,`global`),gt=e=>l(`CLEAR_AGENT_IMAGE`,{...e},void 0,Ee,`global`),_t=e=>l(`SET_ENABLE_CHAT`,{...e},void 0,N,`global`),vt=e({setPowerhouseLevel:()=>yt}),yt=e=>l(`SET_POWERHOUSE_LEVEL`,{...e},void 0,R,`global`),bt=e({disableRoutine:()=>St,enableRoutine:()=>xt}),xt=e=>l(`ENABLE_ROUTINE`,{...e},void 0,h,`global`),St=e=>l(`DISABLE_ROUTINE`,{...e},void 0,Oe,`global`),Ct=e({setDescription:()=>wt,setPackageIdentifier:()=>Et,setVersion:()=>Tt}),wt=e=>l(`SET_DESCRIPTION`,{...e},void 0,M,`global`),Tt=e=>l(`SET_VERSION`,{...e},void 0,V,`global`),Et=e=>l(`SET_PACKAGE_IDENTIFIER`,{...e},void 0,L,`global`),Dt=e({importSpec:()=>Ot}),Ot=e=>l(`IMPORT_SPEC`,{...e},void 0,g,`global`),kt=e({addPackageDocumentType:()=>Mt,addPowerhousePackage:()=>At,removePackageDocumentType:()=>Nt,removePowerhousePackage:()=>jt,setPackageVersion:()=>Pt}),At=e=>l(`ADD_POWERHOUSE_PACKAGE`,{...e},void 0,p,`global`),jt=e=>l(`REMOVE_POWERHOUSE_PACKAGE`,{...e},void 0,C,`global`),Mt=e=>l(`ADD_PACKAGE_DOCUMENT_TYPE`,{...e},void 0,Ce,`global`),Nt=e=>l(`REMOVE_PACKAGE_DOCUMENT_TYPE`,{...e},void 0,S,`global`),Pt=e=>l(`SET_PACKAGE_VERSION`,{...e},void 0,Ge,`global`),Ft=e({bumpVersion:()=>It,publishDev:()=>Lt,publishProduction:()=>zt,publishStaging:()=>Rt,setPublishStatus:()=>Bt}),It=e=>l(`BUMP_VERSION`,{...e},void 0,Te,`global`),Lt=e=>l(`PUBLISH_DEV`,{...e},void 0,_,`global`),Rt=e=>l(`PUBLISH_STAGING`,{...e},void 0,y,`global`),zt=e=>l(`PUBLISH_PRODUCTION`,{...e},void 0,v,`global`),Bt=e=>l(`SET_PUBLISH_STATUS`,{...e},void 0,B,`global`),Vt={...t,...Ct,...vt,...nt,...bt,...kt,...Ze,...Ft,...Dt,...Ke},Ht={id:`powerhouse/ph-clint-project`,name:`PhClintProject`,author:{name:`Powerhouse Inc.`,website:`https://powerhouse.inc`},extension:`pcp`,description:`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.`,specifications:[{state:{local:{schema:``,examples:[],initialValue:``},global:{schema:`type PhClintProjectState {
|
|
2
2
|
name: String
|
|
3
3
|
scope: String
|
|
4
4
|
version: String!
|
|
@@ -90,6 +90,7 @@ type PublishRecord {
|
|
|
90
90
|
|
|
91
91
|
type PhClintDeployment {
|
|
92
92
|
proxyEnabled: Boolean!
|
|
93
|
+
observabilityEnabled: Boolean!
|
|
93
94
|
supportedResources: [String!]!
|
|
94
95
|
}`,examples:[],initialValue:`{
|
|
95
96
|
"name": null,
|
|
@@ -115,6 +116,7 @@ type PhClintDeployment {
|
|
|
115
116
|
"publishHistory": [],
|
|
116
117
|
"deployment": {
|
|
117
118
|
"proxyEnabled": false,
|
|
119
|
+
"observabilityEnabled": false,
|
|
118
120
|
"supportedResources": [
|
|
119
121
|
"vetra-agent-s",
|
|
120
122
|
"vetra-agent-m",
|
|
@@ -621,6 +623,7 @@ record.status = action.input.status;`,errors:[{id:`e-publish-record-not-found`,n
|
|
|
621
623
|
agentImage: String
|
|
622
624
|
enableChat: Boolean
|
|
623
625
|
proxyEnabled: Boolean
|
|
626
|
+
observabilityEnabled: Boolean
|
|
624
627
|
supportedResources: [String!]
|
|
625
628
|
}
|
|
626
629
|
|
|
@@ -733,6 +736,7 @@ if (
|
|
|
733
736
|
|
|
734
737
|
// Deployment fields
|
|
735
738
|
state.deployment.proxyEnabled = action.input.proxyEnabled ?? false;
|
|
739
|
+
state.deployment.observabilityEnabled = action.input.observabilityEnabled ?? false;
|
|
736
740
|
state.deployment.supportedResources = action.input.supportedResources
|
|
737
741
|
? [...action.input.supportedResources]
|
|
738
742
|
: [];`,errors:[],examples:[],scope:`global`}]},{id:`m-deployment`,name:`deployment`,description:`Deployment settings: service announcement toggle and supported resource tiers.`,operations:[{id:`o-add-supported-resource`,name:`ADD_SUPPORTED_RESOURCE`,description:`Add a supported resource tier. Guards against duplicates.`,schema:`input AddSupportedResourceInput {
|
|
@@ -748,5 +752,7 @@ if (idx === -1) {
|
|
|
748
752
|
}
|
|
749
753
|
state.deployment.supportedResources.splice(idx, 1);`,errors:[{id:`e-resource-not-found`,name:`ResourceNotFoundError`,code:`RESOURCE_NOT_FOUND`,description:`The specified resource was not found in the supported resources list.`,template:``}],examples:[],scope:`global`},{id:`o-set-proxy-enabled`,name:`SET_PROXY_ENABLED`,description:`Toggle the embedded reverse proxy.`,schema:`input SetProxyEnabledInput {
|
|
750
754
|
enabled: Boolean!
|
|
751
|
-
}`,template:`Toggle the embedded reverse proxy.`,reducer:`state.deployment.proxyEnabled = action.input.enabled;`,errors:[],examples:[],scope:`global`}]}],version:1,changeLog:[]}]},ve=class extends Error{errorCode=`InvalidVersionError`;constructor(e=`InvalidVersionError`){super(e)}},f=class extends Error{errorCode=`InvalidPackageIdentifierError`;constructor(e=`InvalidPackageIdentifierError`){super(e)}},ye=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/,be=/^[a-z][a-z0-9-]*$/,p={setVersionOperation(e,t){if(!ye.test(t.input.version))throw new ve(`Invalid version: ${t.input.version}`);e.version=t.input.version},setDescriptionOperation(e,t){e.description=t.input.description},setPackageIdentifierOperation(e,t){let n=t.input.identifier.trim();if(!n)throw new f(`Package identifier must not be empty`);let r=null,i=n;if(n.includes(`/`)){let e=n.split(`/`);if(e.length!==2||!e[0]||!e[1])throw new f(`Invalid package identifier: ${n}`);r=e[0].replace(/^@/,``),i=e[1]}if(r!==null&&!be.test(r))throw new f(`Invalid scope: ${r}`);if(i.endsWith(`-cli`)||(i+=`-cli`),!be.test(i))throw new f(`Invalid package name: ${i}`);e.scope=r?`@${r}`:null,e.name=i;let a=e.packages.find(e=>e.managed);if(a){let e=i.replace(/-cli$/,`-app`);a.packageName=r?`@${r}/${e}`:e,a.id=`app-${i}`}}},xe=class extends Error{errorCode=`CannotLowerPowerhouseError`;constructor(e=`CannotLowerPowerhouseError`){super(e)}},Se=[`Disabled`,`Reactor`,`Switchboard`,`Connect`],Ce={setPowerhouseLevelOperation(e,t){let n=Se.indexOf(e.features.powerhouse),r=Se.indexOf(t.input.level);if(n>=1&&r<1)throw new xe(`Cannot lower Powerhouse level below Reactor once enabled`);if(e.features.powerhouse=t.input.level,n===0&&r>=1&&!e.packages.some(e=>e.managed)){let t=e.name?e.name.replace(/-cli$/,`-app`):`app`,n=e.scope&&e.name?`${e.scope}/${t}`:t;e.packages.push({id:`app-${e.name||`managed`}`,packageName:n,documentTypes:[`*/*`],version:null,managed:!0})}r>=2&&!t.input.skipAutoProxy&&(e.deployment.proxyEnabled=!0)}},we=class extends Error{errorCode=`InvalidAgentIdError`;constructor(e=`InvalidAgentIdError`){super(e)}},Te=class extends Error{errorCode=`InvalidAgentNameError`;constructor(e=`InvalidAgentNameError`){super(e)}},m=class extends Error{errorCode=`MastraNotEnabledError`;constructor(e=`MastraNotEnabledError`){super(e)}},Ee=class extends Error{errorCode=`InvalidModelIdError`;constructor(e=`InvalidModelIdError`){super(e)}},De=class extends Error{errorCode=`DuplicateModelError`;constructor(e=`DuplicateModelError`){super(e)}},Oe=class extends Error{errorCode=`ModelNotFoundError`;constructor(e=`ModelNotFoundError`){super(e)}},ke=class extends Error{errorCode=`InvalidProfileIdError`;constructor(e=`InvalidProfileIdError`){super(e)}},Ae=class extends Error{errorCode=`DuplicateProfileError`;constructor(e=`DuplicateProfileError`){super(e)}},h=class extends Error{errorCode=`ProfileNotFoundError`;constructor(e=`ProfileNotFoundError`){super(e)}},je=class extends Error{errorCode=`InvalidAgentImageError`;constructor(e=`InvalidAgentImageError`){super(e)}},Me=class extends Error{errorCode=`PowerhouseNotEnabledError`;constructor(e=`PowerhouseNotEnabledError`){super(e)}},g={enableMastraOperation(e,t){if(!/^[a-z][a-z0-9-]*$/.test(t.input.agentId))throw new we(`Invalid agent ID: ${t.input.agentId}. Must be lowercase kebab-case.`);let n=t.input.agentName.trim();if(!n)throw new Te(`Agent name must not be empty.`);e.features.mastra.enabled=!0,e.features.mastra.agentId=t.input.agentId,e.features.mastra.agentName=n,e.features.mastra.models.length===0&&e.features.mastra.models.push({id:`clint/demo-agent`,isDefault:!0}),e.features.mastra.profiles.length===0&&e.features.mastra.profiles.push({id:`base`,title:`Base Profile`,content:`You are a helpful assistant`})},disableMastraOperation(e){e.features.mastra.enabled=!1,e.features.mastra.agentId=null,e.features.mastra.agentName=null,e.features.mastra.agentDescription=null,e.features.mastra.agentImage=null,e.features.mastra.models=[],e.features.mastra.profiles=[],e.features.mastra.common.enableChat=!1;let t=e.packages.findIndex(e=>e.packageName===`@powerhousedao/clint-common`&&e.managed);t!==-1&&e.packages.splice(t,1)},setAgentIdOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot set agent ID when Mastra is disabled.`);if(!/^[a-z][a-z0-9-]*$/.test(t.input.agentId))throw new we(`Invalid agent ID: ${t.input.agentId}. Must be lowercase kebab-case.`);e.features.mastra.agentId=t.input.agentId},setAgentNameOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot set agent name when Mastra is disabled.`);let n=t.input.agentName.trim();if(!n)throw new Te(`Agent name must not be empty.`);e.features.mastra.agentName=n},addModelOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot add model when Mastra is disabled.`);if(!/^[a-z0-9-]+\/[a-z0-9._-]+$/.test(t.input.id))throw new Ee(`Invalid model ID: ${t.input.id}. Must be provider/model-name format.`);if(e.features.mastra.models.find(e=>e.id===t.input.id))throw new De(`Model already exists: ${t.input.id}`);let n=e.features.mastra.models.length===0||t.input.isDefault===!0;if(n)for(let t of e.features.mastra.models)t.isDefault=!1;e.features.mastra.models.push({id:t.input.id,isDefault:n})},removeModelOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot remove model when Mastra is disabled.`);let n=e.features.mastra.models.findIndex(e=>e.id===t.input.id);if(n===-1)throw new Oe(`Model not found: ${t.input.id}`);let r=e.features.mastra.models[n].isDefault;e.features.mastra.models.splice(n,1),r&&e.features.mastra.models.length>0&&(e.features.mastra.models[0].isDefault=!0)},setDefaultModelOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot set default model when Mastra is disabled.`);let n=e.features.mastra.models.find(e=>e.id===t.input.id);if(!n)throw new Oe(`Model not found: ${t.input.id}`);for(let t of e.features.mastra.models)t.isDefault=!1;n.isDefault=!0},addProfileOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot add profile when Mastra is disabled.`);if(!/^[a-z][a-z0-9-]*$/.test(t.input.id))throw new ke(`Invalid profile ID: ${t.input.id}. Must be lowercase kebab-case.`);if(e.features.mastra.profiles.find(e=>e.id===t.input.id))throw new Ae(`Profile already exists: ${t.input.id}`);let n={id:t.input.id,title:t.input.title,content:t.input.content};if(t.input.insertBefore){let r=e.features.mastra.profiles.findIndex(e=>e.id===t.input.insertBefore);if(r===-1)throw new h(`insertBefore profile not found: ${t.input.insertBefore}`);e.features.mastra.profiles.splice(r,0,n)}else e.features.mastra.profiles.push(n)},updateProfileOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot update profile when Mastra is disabled.`);let n=e.features.mastra.profiles.find(e=>e.id===t.input.id);if(!n)throw new h(`Profile not found: ${t.input.id}`);t.input.title&&(n.title=t.input.title),t.input.content&&(n.content=t.input.content)},removeProfileOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot remove profile when Mastra is disabled.`);let n=e.features.mastra.profiles.findIndex(e=>e.id===t.input.id);if(n===-1)throw new h(`Profile not found: ${t.input.id}`);e.features.mastra.profiles.splice(n,1)},reorderProfilesOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot reorder profiles when Mastra is disabled.`);let n=[];for(let r of t.input.ids){let t=e.features.mastra.profiles.find(e=>e.id===r);if(!t)throw new h(`Profile not found: ${r}`);n.push(t)}if(e.features.mastra.profiles=e.features.mastra.profiles.filter(e=>!t.input.ids.includes(e.id)),t.input.insertBefore){let r=e.features.mastra.profiles.findIndex(e=>e.id===t.input.insertBefore);if(r===-1)throw new h(`insertBefore profile not found: ${t.input.insertBefore}`);e.features.mastra.profiles.splice(r,0,...n)}else e.features.mastra.profiles.push(...n)},setAgentDescriptionOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot set agent description when Mastra is disabled.`);e.features.mastra.agentDescription=t.input.description},setAgentImageOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot set agent image when Mastra is disabled.`);if(!/^data:[a-z]+\/[a-z0-9.+-]+;base64,/.test(t.input.image))throw new je(`Invalid image: must be a data URL (data:<mime>;base64,...)`);e.features.mastra.agentImage=t.input.image},clearAgentImageOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot clear agent image when Mastra is disabled.`);e.features.mastra.agentImage=null},setEnableChatOperation(e,t){if(!e.features.mastra.enabled)throw new m(`Cannot toggle chat when Mastra is disabled.`);if(e.features.powerhouse===`Disabled`)throw new Me(`Cannot toggle chat when Powerhouse is disabled.`);e.features.mastra.common.enableChat=t.input.enabled;let n=`@powerhousedao/clint-common`,r=`powerhouse/chat-session`;if(t.input.enabled){let t=e.packages.find(e=>e.packageName===n);t?t.documentTypes.includes(r)||t.documentTypes.push(r):e.packages.push({id:`pkg-clint-common`,packageName:n,documentTypes:[r],version:null,managed:!0})}else{let t=e.packages.findIndex(e=>e.packageName===n&&e.managed);if(t!==-1){let n=e.packages[t];if(n.documentTypes.length===1&&n.documentTypes[0]===r)e.packages.splice(t,1);else{let e=n.documentTypes.indexOf(r);e!==-1&&n.documentTypes.splice(e,1)}}}}},Ne={enableRoutineOperation(e){e.features.routine.enabled=!0},disableRoutineOperation(e){e.features.routine.enabled=!1}},Pe=class extends Error{errorCode=`DuplicatePackageError`;constructor(e=`DuplicatePackageError`){super(e)}},_=class extends Error{errorCode=`PackageNotFoundError`;constructor(e=`PackageNotFoundError`){super(e)}},Fe=class extends Error{errorCode=`CannotRemoveManagedPackageError`;constructor(e=`CannotRemoveManagedPackageError`){super(e)}},Ie=class extends Error{errorCode=`InvalidDocumentTypeError`;constructor(e=`InvalidDocumentTypeError`){super(e)}},Le=class extends Error{errorCode=`DuplicateDocumentTypeError`;constructor(e=`DuplicateDocumentTypeError`){super(e)}},Re=class extends Error{errorCode=`DocumentTypeNotFoundError`;constructor(e=`DocumentTypeNotFoundError`){super(e)}},ze=class extends Error{errorCode=`InvalidVersionError`;constructor(e=`InvalidVersionError`){super(e)}},Be=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/,v={addPowerhousePackageOperation(e,t){if(e.packages.find(e=>e.id===t.input.id||e.packageName===t.input.packageName))throw new Pe(`Package already exists: ${t.input.packageName}`);e.packages.push({id:t.input.id,packageName:t.input.packageName,documentTypes:[],version:null,managed:!1})},removePowerhousePackageOperation(e,t){let n=e.packages.findIndex(e=>e.id===t.input.id);if(n===-1)throw new _(`Package not found: ${t.input.id}`);if(e.packages[n].managed)throw new Fe(`Cannot remove a managed package`);e.packages.splice(n,1)},addPackageDocumentTypeOperation(e,t){if(t.input.documentType!==`*/*`&&!/^[a-z0-9-]+\/[a-z0-9-]+$/.test(t.input.documentType))throw new Ie(`Invalid document type format: ${t.input.documentType}. Expected org/name.`);let n=e.packages.find(e=>e.id===t.input.packageId);if(!n)throw new _(`Package not found: ${t.input.packageId}`);if(t.input.documentType===`*/*`){n.documentTypes.length=0,n.documentTypes.push(`*/*`);return}if(!n.documentTypes.includes(`*/*`)){if(n.documentTypes.includes(t.input.documentType))throw new Le(`Document type already registered: ${t.input.documentType}`);n.documentTypes.push(t.input.documentType)}},removePackageDocumentTypeOperation(e,t){let n=e.packages.find(e=>e.id===t.input.packageId);if(!n)throw new _(`Package not found: ${t.input.packageId}`);let r=n.documentTypes.indexOf(t.input.documentType);if(r===-1)throw new Re(`Document type not found: ${t.input.documentType}`);n.documentTypes.splice(r,1)},setPackageVersionOperation(e,t){let n=e.packages.find(e=>e.id===t.input.packageId);if(!n)throw new _(`Package not found: ${t.input.packageId}`);if(t.input.version!=null&&!Be.test(t.input.version))throw new ze(`Invalid version: ${t.input.version}`);n.version=t.input.version||null}},Ve=class extends Error{errorCode=`InvalidSkillNameError`;constructor(e=`InvalidSkillNameError`){super(e)}},He=class extends Error{errorCode=`DuplicateSkillError`;constructor(e=`DuplicateSkillError`){super(e)}},y=class extends Error{errorCode=`SkillNotFoundError`;constructor(e=`SkillNotFoundError`){super(e)}},b={addExternalSkillOperation(e,t){if(!/^[a-z][a-z0-9-]*$/.test(t.input.name))throw new Ve(`Invalid skill name: ${t.input.name}. Must be lowercase kebab-case.`);if(e.externalSkills.find(e=>e.id===t.input.id||e.name===t.input.name))throw new He(`Skill already exists: ${t.input.name}`);e.externalSkills.push({id:t.input.id,name:t.input.name,githubUrl:t.input.githubUrl})},removeExternalSkillOperation(e,t){let n=e.externalSkills.findIndex(e=>e.id===t.input.id);if(n===-1)throw new y(`Skill not found: ${t.input.id}`);e.externalSkills.splice(n,1)},setExternalSkillNameOperation(e,t){let n=e.externalSkills.find(e=>e.id===t.input.id);if(!n)throw new y(`Skill not found: ${t.input.id}`);if(!/^[a-z][a-z0-9-]*$/.test(t.input.name))throw new Ve(`Invalid skill name: ${t.input.name}. Must be lowercase kebab-case.`);if(e.externalSkills.find(e=>e.name===t.input.name&&e.id!==t.input.id))throw new He(`Skill name already in use: ${t.input.name}`);n.name=t.input.name},setExternalSkillGithubUrlOperation(e,t){let n=e.externalSkills.find(e=>e.id===t.input.id);if(!n)throw new y(`Skill not found: ${t.input.id}`);n.githubUrl=t.input.githubUrl}},Ue=class extends Error{errorCode=`InvalidVersionError`;constructor(e=`InvalidVersionError`){super(e)}},We=class extends Error{errorCode=`PublishRecordNotFoundError`;constructor(e=`PublishRecordNotFoundError`){super(e)}},x={bumpVersionOperation(e,t){if(!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(t.input.version))throw new Ue(`Invalid version: ${t.input.version}`);e.version=t.input.version},publishDevOperation(e,t){e.publishHistory.push({id:t.input.id,tag:`Dev`,version:e.version,timestamp:t.input.timestamp,status:`Pending`})},publishStagingOperation(e,t){e.publishHistory.push({id:t.input.id,tag:`Staging`,version:e.version,timestamp:t.input.timestamp,status:`Pending`})},publishProductionOperation(e,t){e.publishHistory.push({id:t.input.id,tag:`Production`,version:e.version,timestamp:t.input.timestamp,status:`Pending`})},setPublishStatusOperation(e,t){let n=e.publishHistory.find(e=>e.id===t.input.id);if(!n)throw new We(`Publish record not found: ${t.input.id}`);n.status=t.input.status}},Ge={importSpecOperation(e,t){e.name=t.input.name,e.scope=t.input.scope||null,e.version=t.input.version,e.description=t.input.description,e.features.powerhouse=t.input.powerhouse,e.features.mastra.enabled=t.input.mastraEnabled,e.features.routine.enabled=t.input.routineEnabled;let n=t.input.name.replace(/-cli$/,`-app`),r=t.input.scope?`${t.input.scope}/${n}`:n,i=t.input.powerhouse!==`Disabled`;if(e.packages=t.input.packages.map(e=>({id:e.id,packageName:e.packageName,documentTypes:[...e.documentTypes],version:e.version||null,managed:i&&e.packageName===r})),e.externalSkills=t.input.externalSkills.map(e=>({id:e.id,name:e.name,githubUrl:e.githubUrl})),e.features.mastra.agentId=t.input.agentId||null,e.features.mastra.agentName=t.input.agentName||null,e.features.mastra.models=(t.input.models||[]).map(e=>({id:e.id,isDefault:e.isDefault})),e.features.mastra.profiles=(t.input.profiles||[]).map(e=>({id:e.id,title:e.title,content:e.content})),t.input.agentDescription&&e.features.mastra.enabled?e.features.mastra.agentDescription=t.input.agentDescription:e.features.mastra.agentDescription=null,t.input.agentImage&&e.features.mastra.enabled){if(!/^data:[a-z]+\/[a-z0-9.+-]+;base64,/.test(t.input.agentImage))throw new je(`Invalid image: must be a data URL (data:<mime>;base64,...)`);e.features.mastra.agentImage=t.input.agentImage}else e.features.mastra.agentImage=null;if(t.input.enableChat&&e.features.mastra.enabled&&e.features.powerhouse!==`Disabled`){e.features.mastra.common.enableChat=!0;let t=`@powerhousedao/clint-common`,n=`powerhouse/chat-session`,r=e.packages.find(e=>e.packageName===t);r?r.documentTypes.includes(n)||r.documentTypes.push(n):e.packages.push({id:`pkg-clint-common`,packageName:t,documentTypes:[n],version:null,managed:!0})}else e.features.mastra.common.enableChat=!1;e.deployment.proxyEnabled=t.input.proxyEnabled??!1,e.deployment.supportedResources=t.input.supportedResources?[...t.input.supportedResources]:[]}},Ke=class extends Error{errorCode=`DuplicateResourceError`;constructor(e=`DuplicateResourceError`){super(e)}},qe=class extends Error{errorCode=`ResourceNotFoundError`;constructor(e=`ResourceNotFoundError`){super(e)}},S={addSupportedResourceOperation(e,t){if(e.deployment.supportedResources.includes(t.input.resource))throw new Ke(`Resource already exists: ${t.input.resource}`);e.deployment.supportedResources.push(t.input.resource)},removeSupportedResourceOperation(e,t){let n=e.deployment.supportedResources.indexOf(t.input.resource);if(n===-1)throw new qe(`Resource not found: ${t.input.resource}`);e.deployment.supportedResources.splice(n,1)},setProxyEnabledOperation(e,t){e.deployment.proxyEnabled=t.input.enabled}},Je=e=>e!=null,Ye=r().refine(e=>Je(e)),C=re([`Connect`,`Disabled`,`Reactor`,`Switchboard`]),w=re([`Failed`,`InProgress`,`Pending`,`Succeeded`]),Xe=re([`Dev`,`Production`,`Staging`]);function T(){return u({githubUrl:o(),id:n(),name:n()})}function E(){return u({id:n(),isDefault:c().nullish()})}function D(){return u({documentType:n(),packageId:n()})}function O(){return u({id:n(),packageName:n()})}function k(){return u({content:n(),id:n(),insertBefore:n().nullish(),title:n()})}function A(){return u({resource:n()})}function j(){return u({version:n()})}function M(){return u({_:c().nullish()})}function N(){return u({_:c().nullish()})}function P(){return u({_:c().nullish()})}function F(){return u({agentId:n(),agentName:n()})}function I(){return u({_:c().nullish()})}function Ze(){return u({__typename:i(`ExternalSkill`).optional(),githubUrl:o(),id:n(),name:n()})}function Qe(){return u({id:n(),isDefault:c()})}function $e(){return u({documentTypes:d(n()),id:n(),packageName:n(),version:n().nullish()})}function et(){return u({content:n(),id:n(),title:n()})}function tt(){return u({githubUrl:o(),id:n(),name:n()})}function L(){return u({agentDescription:n().nullish(),agentId:n().nullish(),agentImage:n().nullish(),agentName:n().nullish(),description:n(),enableChat:c().nullish(),externalSkills:d(a(()=>tt())),mastraEnabled:c(),models:d(a(()=>Qe())).nullish(),name:n(),packages:d(a(()=>$e())),powerhouse:C,profiles:d(a(()=>et())).nullish(),proxyEnabled:c().nullish(),routineEnabled:c(),scope:n().nullish(),supportedResources:d(n()).nullish(),version:n()})}function nt(){return u({__typename:i(`PhClintAgentModel`).optional(),id:n(),isDefault:c()})}function rt(){return u({__typename:i(`PhClintAgentProfile`).optional(),content:n(),id:n(),title:n()})}function it(){return u({__typename:i(`PhClintDeployment`).optional(),proxyEnabled:c(),supportedResources:d(n())})}function at(){return u({__typename:i(`PhClintFeatures`).optional(),mastra:a(()=>st()),powerhouse:C,routine:a(()=>lt())})}function ot(){return u({__typename:i(`PhClintMastraCommon`).optional(),enableChat:c()})}function st(){return u({__typename:i(`PhClintMastraFeature`).optional(),agentDescription:n().nullish(),agentId:n().nullish(),agentImage:n().nullish(),agentName:n().nullish(),common:a(()=>ot()),enabled:c(),models:d(a(()=>nt())),profiles:d(a(()=>rt()))})}function ct(){return u({__typename:i(`PhClintProjectState`).optional(),deployment:a(()=>it()),description:n(),externalSkills:d(a(()=>Ze())),features:a(()=>at()),name:n().nullish(),packages:d(a(()=>ut())),publishHistory:d(a(()=>dt())),scope:n().nullish(),version:n()})}function lt(){return u({__typename:i(`PhClintRoutineFeature`).optional(),enabled:c()})}function ut(){return u({__typename:i(`PowerhousePackage`).optional(),documentTypes:d(n()),id:n(),managed:c(),packageName:n(),version:n().nullish()})}function R(){return u({id:n(),timestamp:s()})}function z(){return u({id:n(),timestamp:s()})}function dt(){return u({__typename:i(`PublishRecord`).optional(),id:n(),status:w,tag:Xe,timestamp:s(),version:n()})}function B(){return u({id:n(),timestamp:s()})}function V(){return u({id:n()})}function H(){return u({id:n()})}function U(){return u({documentType:n(),packageId:n()})}function ft(){return u({id:n()})}function W(){return u({id:n()})}function G(){return u({resource:n()})}function K(){return u({ids:d(n()),insertBefore:n().nullish()})}function q(){return u({description:n()})}function J(){return u({agentId:n()})}function Y(){return u({image:n()})}function pt(){return u({agentName:n()})}function mt(){return u({id:n()})}function ht(){return u({description:n()})}function gt(){return u({enabled:c()})}function _t(){return u({githubUrl:o(),id:n()})}function vt(){return u({id:n(),name:n()})}function yt(){return u({identifier:n()})}function bt(){return u({packageId:n(),version:n().nullish()})}function xt(){return u({level:C,skipAutoProxy:c().nullish()})}function St(){return u({enabled:c()})}function Ct(){return u({id:n(),status:w})}function wt(){return u({version:n()})}function Tt(){return u({content:n().nullish(),id:n(),title:n().nullish()})}var Et=ue((e,t,n)=>{if(le(t))return e;switch(t.type){case`SET_DESCRIPTION`:ht().parse(t.input),p.setDescriptionOperation(e[t.scope],t,n);break;case`SET_VERSION`:wt().parse(t.input),p.setVersionOperation(e[t.scope],t,n);break;case`SET_PACKAGE_IDENTIFIER`:yt().parse(t.input),p.setPackageIdentifierOperation(e[t.scope],t,n);break;case`SET_POWERHOUSE_LEVEL`:xt().parse(t.input),Ce.setPowerhouseLevelOperation(e[t.scope],t,n);break;case`ENABLE_MASTRA`:F().parse(t.input),g.enableMastraOperation(e[t.scope],t,n);break;case`DISABLE_MASTRA`:N().parse(t.input),g.disableMastraOperation(e[t.scope],t,n);break;case`SET_AGENT_ID`:J().parse(t.input),g.setAgentIdOperation(e[t.scope],t,n);break;case`SET_AGENT_NAME`:pt().parse(t.input),g.setAgentNameOperation(e[t.scope],t,n);break;case`ADD_MODEL`:E().parse(t.input),g.addModelOperation(e[t.scope],t,n);break;case`REMOVE_MODEL`:H().parse(t.input),g.removeModelOperation(e[t.scope],t,n);break;case`SET_DEFAULT_MODEL`:mt().parse(t.input),g.setDefaultModelOperation(e[t.scope],t,n);break;case`ADD_PROFILE`:k().parse(t.input),g.addProfileOperation(e[t.scope],t,n);break;case`UPDATE_PROFILE`:Tt().parse(t.input),g.updateProfileOperation(e[t.scope],t,n);break;case`REMOVE_PROFILE`:W().parse(t.input),g.removeProfileOperation(e[t.scope],t,n);break;case`REORDER_PROFILES`:K().parse(t.input),g.reorderProfilesOperation(e[t.scope],t,n);break;case`SET_AGENT_DESCRIPTION`:q().parse(t.input),g.setAgentDescriptionOperation(e[t.scope],t,n);break;case`SET_AGENT_IMAGE`:Y().parse(t.input),g.setAgentImageOperation(e[t.scope],t,n);break;case`CLEAR_AGENT_IMAGE`:M().parse(t.input),g.clearAgentImageOperation(e[t.scope],t,n);break;case`SET_ENABLE_CHAT`:gt().parse(t.input),g.setEnableChatOperation(e[t.scope],t,n);break;case`ENABLE_ROUTINE`:I().parse(t.input),Ne.enableRoutineOperation(e[t.scope],t,n);break;case`DISABLE_ROUTINE`:P().parse(t.input),Ne.disableRoutineOperation(e[t.scope],t,n);break;case`ADD_POWERHOUSE_PACKAGE`:O().parse(t.input),v.addPowerhousePackageOperation(e[t.scope],t,n);break;case`REMOVE_POWERHOUSE_PACKAGE`:ft().parse(t.input),v.removePowerhousePackageOperation(e[t.scope],t,n);break;case`ADD_PACKAGE_DOCUMENT_TYPE`:D().parse(t.input),v.addPackageDocumentTypeOperation(e[t.scope],t,n);break;case`REMOVE_PACKAGE_DOCUMENT_TYPE`:U().parse(t.input),v.removePackageDocumentTypeOperation(e[t.scope],t,n);break;case`SET_PACKAGE_VERSION`:bt().parse(t.input),v.setPackageVersionOperation(e[t.scope],t,n);break;case`ADD_EXTERNAL_SKILL`:T().parse(t.input),b.addExternalSkillOperation(e[t.scope],t,n);break;case`REMOVE_EXTERNAL_SKILL`:V().parse(t.input),b.removeExternalSkillOperation(e[t.scope],t,n);break;case`SET_EXTERNAL_SKILL_NAME`:vt().parse(t.input),b.setExternalSkillNameOperation(e[t.scope],t,n);break;case`SET_EXTERNAL_SKILL_GITHUB_URL`:_t().parse(t.input),b.setExternalSkillGithubUrlOperation(e[t.scope],t,n);break;case`BUMP_VERSION`:j().parse(t.input),x.bumpVersionOperation(e[t.scope],t,n);break;case`PUBLISH_DEV`:R().parse(t.input),x.publishDevOperation(e[t.scope],t,n);break;case`PUBLISH_STAGING`:B().parse(t.input),x.publishStagingOperation(e[t.scope],t,n);break;case`PUBLISH_PRODUCTION`:z().parse(t.input),x.publishProductionOperation(e[t.scope],t,n);break;case`SET_PUBLISH_STATUS`:Ct().parse(t.input),x.setPublishStatusOperation(e[t.scope],t,n);break;case`IMPORT_SPEC`:L().parse(t.input),Ge.importSpecOperation(e[t.scope],t,n);break;case`ADD_SUPPORTED_RESOURCE`:A().parse(t.input),S.addSupportedResourceOperation(e[t.scope],t,n);break;case`REMOVE_SUPPORTED_RESOURCE`:G().parse(t.input),S.removeSupportedResourceOperation(e[t.scope],t,n);break;case`SET_PROXY_ENABLED`:St().parse(t.input),S.setProxyEnabledOperation(e[t.scope],t,n);break;default:return e}}),Dt=e({setDescription:()=>Ot,setPackageIdentifier:()=>At,setVersion:()=>kt}),Ot=e=>l(`SET_DESCRIPTION`,{...e},void 0,ht,`global`),kt=e=>l(`SET_VERSION`,{...e},void 0,wt,`global`),At=e=>l(`SET_PACKAGE_IDENTIFIER`,{...e},void 0,yt,`global`),jt=e({setPowerhouseLevel:()=>Mt}),Mt=e=>l(`SET_POWERHOUSE_LEVEL`,{...e},void 0,xt,`global`),Nt=e({addModel:()=>Rt,addProfile:()=>Vt,clearAgentImage:()=>qt,disableMastra:()=>Ft,enableMastra:()=>Pt,removeModel:()=>zt,removeProfile:()=>Ut,reorderProfiles:()=>Wt,setAgentDescription:()=>Gt,setAgentId:()=>It,setAgentImage:()=>Kt,setAgentName:()=>Lt,setDefaultModel:()=>Bt,setEnableChat:()=>Jt,updateProfile:()=>Ht}),Pt=e=>l(`ENABLE_MASTRA`,{...e},void 0,F,`global`),Ft=e=>l(`DISABLE_MASTRA`,{...e},void 0,N,`global`),It=e=>l(`SET_AGENT_ID`,{...e},void 0,J,`global`),Lt=e=>l(`SET_AGENT_NAME`,{...e},void 0,pt,`global`),Rt=e=>l(`ADD_MODEL`,{...e},void 0,E,`global`),zt=e=>l(`REMOVE_MODEL`,{...e},void 0,H,`global`),Bt=e=>l(`SET_DEFAULT_MODEL`,{...e},void 0,mt,`global`),Vt=e=>l(`ADD_PROFILE`,{...e},void 0,k,`global`),Ht=e=>l(`UPDATE_PROFILE`,{...e},void 0,Tt,`global`),Ut=e=>l(`REMOVE_PROFILE`,{...e},void 0,W,`global`),Wt=e=>l(`REORDER_PROFILES`,{...e},void 0,K,`global`),Gt=e=>l(`SET_AGENT_DESCRIPTION`,{...e},void 0,q,`global`),Kt=e=>l(`SET_AGENT_IMAGE`,{...e},void 0,Y,`global`),qt=e=>l(`CLEAR_AGENT_IMAGE`,{...e},void 0,M,`global`),Jt=e=>l(`SET_ENABLE_CHAT`,{...e},void 0,gt,`global`),Yt=e({disableRoutine:()=>Zt,enableRoutine:()=>Xt}),Xt=e=>l(`ENABLE_ROUTINE`,{...e},void 0,I,`global`),Zt=e=>l(`DISABLE_ROUTINE`,{...e},void 0,P,`global`),Qt=e({addPackageDocumentType:()=>tn,addPowerhousePackage:()=>$t,removePackageDocumentType:()=>nn,removePowerhousePackage:()=>en,setPackageVersion:()=>rn}),$t=e=>l(`ADD_POWERHOUSE_PACKAGE`,{...e},void 0,O,`global`),en=e=>l(`REMOVE_POWERHOUSE_PACKAGE`,{...e},void 0,ft,`global`),tn=e=>l(`ADD_PACKAGE_DOCUMENT_TYPE`,{...e},void 0,D,`global`),nn=e=>l(`REMOVE_PACKAGE_DOCUMENT_TYPE`,{...e},void 0,U,`global`),rn=e=>l(`SET_PACKAGE_VERSION`,{...e},void 0,bt,`global`),an=e({addExternalSkill:()=>on,removeExternalSkill:()=>sn,setExternalSkillGithubUrl:()=>ln,setExternalSkillName:()=>cn}),on=e=>l(`ADD_EXTERNAL_SKILL`,{...e},void 0,T,`global`),sn=e=>l(`REMOVE_EXTERNAL_SKILL`,{...e},void 0,V,`global`),cn=e=>l(`SET_EXTERNAL_SKILL_NAME`,{...e},void 0,vt,`global`),ln=e=>l(`SET_EXTERNAL_SKILL_GITHUB_URL`,{...e},void 0,_t,`global`),un=e({bumpVersion:()=>dn,publishDev:()=>fn,publishProduction:()=>mn,publishStaging:()=>pn,setPublishStatus:()=>hn}),dn=e=>l(`BUMP_VERSION`,{...e},void 0,j,`global`),fn=e=>l(`PUBLISH_DEV`,{...e},void 0,R,`global`),pn=e=>l(`PUBLISH_STAGING`,{...e},void 0,B,`global`),mn=e=>l(`PUBLISH_PRODUCTION`,{...e},void 0,z,`global`),hn=e=>l(`SET_PUBLISH_STATUS`,{...e},void 0,Ct,`global`),gn=e({importSpec:()=>_n}),_n=e=>l(`IMPORT_SPEC`,{...e},void 0,L,`global`),vn=e({addSupportedResource:()=>yn,removeSupportedResource:()=>bn,setProxyEnabled:()=>xn}),yn=e=>l(`ADD_SUPPORTED_RESOURCE`,{...e},void 0,A,`global`),bn=e=>l(`REMOVE_SUPPORTED_RESOURCE`,{...e},void 0,G,`global`),xn=e=>l(`SET_PROXY_ENABLED`,{...e},void 0,St,`global`),Sn={...t,...Dt,...jt,...Nt,...Yt,...Qt,...an,...un,...gn,...vn},Cn=`powerhouse/ph-clint-project`,wn=ie.extend({documentType:i(Cn)}),X=ne.extend({global:ct()}),Tn=u({header:wn,state:X,initialState:X});function En(e){return X.safeParse(e).success}function Dn(e){X.parse(e)}function Z(e){return Tn.safeParse(e).success}function On(e){Tn.parse(e)}var kn={name:null,scope:null,version:`0.1.0`,description:``,features:{powerhouse:`Disabled`,mastra:{enabled:!1,agentId:null,agentName:null,agentDescription:null,agentImage:null,models:[],profiles:[],common:{enableChat:!1}},routine:{enabled:!1}},packages:[],externalSkills:[],publishHistory:[],deployment:{proxyEnabled:!1,supportedResources:[`vetra-agent-s`,`vetra-agent-m`,`vetra-agent-l`,`vetra-agent-xl`,`vetra-agent-xxl`]}},An={},jn={fileExtension:`pcp`,createState(e){return{...fe(),global:{...kn,...e?.global},local:{...An,...e?.local}}},createDocument(e){let t=se(jn.createState,e);return t.header.documentType=Cn,t.header.id=te(),t},saveToFileHandle(e,t){return ce(e,t)},loadFromInput(e){return de(e,Et)},isStateOfType(e){return En(e)},assertIsStateOfType(e){return Dn(e)},isDocumentOfType(e){return Z(e)},assertIsDocumentOfType(e){return On(e)}},Mn=e({}),Nn={...jn,...Mn},Pn={version:1,reducer:Et,actions:Sn,utils:Nn,documentModel:oe(fe(),_e)},Q=[1],Fn=Q[0],In={documentType:`powerhouse/ph-clint-project`,latestVersion:Fn,supportedVersions:Q,upgrades:{}};function Ln(){return{name:null,scope:null,version:`0.1.0`,description:``,features:{powerhouse:`Disabled`,mastra:{enabled:!1,agentId:null,agentName:null,agentDescription:null,agentImage:null,models:[],profiles:[],common:{enableChat:!1}},routine:{enabled:!1}},packages:[],externalSkills:[],publishHistory:[],deployment:{proxyEnabled:!1,supportedResources:[`vetra-agent-s`,`vetra-agent-m`,`vetra-agent-l`,`vetra-agent-xl`,`vetra-agent-xxl`]}}}function $(){return{}}function Rn(){return{...fe(),global:Ln(),local:$()}}function zn(e){return{...Ln(),...e||{}}}function Bn(e){return{...$(),...e||{}}}function Vn(e,t,n){return{...ae(e?.auth,e?.document),global:zn(t),local:Bn(n)}}function Hn(e){return jn.createDocument(e?Vn(ae(e.auth,e.document),e.global,e.local):void 0)}var Un=ee.forDocumentModel(Pn);function Wn(e){let[t,n]=he(e);return Z(t)?[t,n]:[void 0,void 0]}function Gn(){let[e,t]=ge();return On(e),[e,t]}function Kn(){return pe()?.filter(Z)}function qn(){return me()?.filter(Z)}export{Rt as $,B as $t,xn as A,N as At,an as B,nt as Bt,Z as C,wt as Cn,E as Ct,yn as D,_e as Dn,A as Dt,Sn as E,Je as En,k as Et,fn as F,Qe as Ft,$t as G,st as Gt,ln as H,it as Ht,mn as I,$e as It,en as J,C as Jt,Qt as K,ct as Kt,pn as L,et as Lt,_n as M,F as Mt,dn as N,I as Nt,vn as O,j as Ot,un as P,Ze as Pt,Xt as Q,dt as Qt,hn as R,tt as Rt,Dn as S,Ct as Sn,T as St,Cn as T,Ye as Tn,O as Tt,cn as U,at as Ut,sn as V,rt as Vt,tn as W,ot as Wt,Yt as X,R as Xt,rn as Y,ut as Yt,Zt as Z,z as Zt,An as _,vt as _n,Dt as _t,Un as a,ft as an,zt as at,X as b,xt as bn,kt as bt,Ln as c,K as cn,Gt as ct,In as d,Y as dn,Lt as dt,w as en,Vt as et,Fn as f,pt as fn,Bt as ft,kn as g,_t as gn,Mt as gt,Nn as h,gt as hn,jt as ht,Gn as i,U as in,Pt as it,gn as j,P as jt,bn as k,M as kt,$ as l,q as ln,It as lt,Pn as m,ht as mn,Ht as mt,Kn as n,V as nn,Nt as nt,Hn as o,W as on,Ut as ot,Q as p,mt as pn,Jt as pt,nn as q,lt as qt,qn as r,H as rn,Ft as rt,Vn as s,G as sn,Wt as st,Wn as t,Xe as tn,qt as tt,Rn as u,J as un,Kt as ut,wn as v,yt as vn,Ot as vt,En as w,Tt as wn,D as wt,On as x,St as xn,Et as xt,Tn as y,bt as yn,At as yt,on as z,L as zt};
|
|
752
|
-
|
|
755
|
+
}`,template:`Toggle the embedded reverse proxy.`,reducer:`state.deployment.proxyEnabled = action.input.enabled;`,errors:[],examples:[],scope:`global`},{id:`o-set-observability-enabled`,name:`SET_OBSERVABILITY_ENABLED`,description:`Toggle the observability plugin (Sentry + OpenTelemetry).`,schema:`input SetObservabilityEnabledInput {
|
|
756
|
+
enabled: Boolean!
|
|
757
|
+
}`,template:`Toggle the observability plugin (Sentry + OpenTelemetry).`,reducer:`state.deployment.observabilityEnabled = action.input.enabled;`,errors:[],examples:[],scope:`global`}]}],version:1,changeLog:[]}]},Ut=class extends Error{errorCode=`DuplicateResourceError`;constructor(e=`DuplicateResourceError`){super(e)}},Wt=class extends Error{errorCode=`ResourceNotFoundError`;constructor(e=`ResourceNotFoundError`){super(e)}},U={addSupportedResourceOperation(e,t){if(e.deployment.supportedResources.includes(t.input.resource))throw new Ut(`Resource already exists: ${t.input.resource}`);e.deployment.supportedResources.push(t.input.resource)},removeSupportedResourceOperation(e,t){let n=e.deployment.supportedResources.indexOf(t.input.resource);if(n===-1)throw new Wt(`Resource not found: ${t.input.resource}`);e.deployment.supportedResources.splice(n,1)},setProxyEnabledOperation(e,t){e.deployment.proxyEnabled=t.input.enabled},setObservabilityEnabledOperation(e,t){e.deployment.observabilityEnabled=t.input.enabled}},Gt=class extends Error{errorCode=`InvalidSkillNameError`;constructor(e=`InvalidSkillNameError`){super(e)}},Kt=class extends Error{errorCode=`DuplicateSkillError`;constructor(e=`DuplicateSkillError`){super(e)}},qt=class extends Error{errorCode=`SkillNotFoundError`;constructor(e=`SkillNotFoundError`){super(e)}},W={addExternalSkillOperation(e,t){if(!/^[a-z][a-z0-9-]*$/.test(t.input.name))throw new Gt(`Invalid skill name: ${t.input.name}. Must be lowercase kebab-case.`);if(e.externalSkills.find(e=>e.id===t.input.id||e.name===t.input.name))throw new Kt(`Skill already exists: ${t.input.name}`);e.externalSkills.push({id:t.input.id,name:t.input.name,githubUrl:t.input.githubUrl})},removeExternalSkillOperation(e,t){let n=e.externalSkills.findIndex(e=>e.id===t.input.id);if(n===-1)throw new qt(`Skill not found: ${t.input.id}`);e.externalSkills.splice(n,1)},setExternalSkillNameOperation(e,t){let n=e.externalSkills.find(e=>e.id===t.input.id);if(!n)throw new qt(`Skill not found: ${t.input.id}`);if(!/^[a-z][a-z0-9-]*$/.test(t.input.name))throw new Gt(`Invalid skill name: ${t.input.name}. Must be lowercase kebab-case.`);if(e.externalSkills.find(e=>e.name===t.input.name&&e.id!==t.input.id))throw new Kt(`Skill name already in use: ${t.input.name}`);n.name=t.input.name},setExternalSkillGithubUrlOperation(e,t){let n=e.externalSkills.find(e=>e.id===t.input.id);if(!n)throw new qt(`Skill not found: ${t.input.id}`);n.githubUrl=t.input.githubUrl}},Jt=class extends Error{errorCode=`InvalidAgentIdError`;constructor(e=`InvalidAgentIdError`){super(e)}},Yt=class extends Error{errorCode=`InvalidAgentNameError`;constructor(e=`InvalidAgentNameError`){super(e)}},G=class extends Error{errorCode=`MastraNotEnabledError`;constructor(e=`MastraNotEnabledError`){super(e)}},Xt=class extends Error{errorCode=`InvalidModelIdError`;constructor(e=`InvalidModelIdError`){super(e)}},Zt=class extends Error{errorCode=`DuplicateModelError`;constructor(e=`DuplicateModelError`){super(e)}},Qt=class extends Error{errorCode=`ModelNotFoundError`;constructor(e=`ModelNotFoundError`){super(e)}},$t=class extends Error{errorCode=`InvalidProfileIdError`;constructor(e=`InvalidProfileIdError`){super(e)}},en=class extends Error{errorCode=`DuplicateProfileError`;constructor(e=`DuplicateProfileError`){super(e)}},K=class extends Error{errorCode=`ProfileNotFoundError`;constructor(e=`ProfileNotFoundError`){super(e)}},tn=class extends Error{errorCode=`InvalidAgentImageError`;constructor(e=`InvalidAgentImageError`){super(e)}},nn=class extends Error{errorCode=`PowerhouseNotEnabledError`;constructor(e=`PowerhouseNotEnabledError`){super(e)}},q={enableMastraOperation(e,t){if(!/^[a-z][a-z0-9-]*$/.test(t.input.agentId))throw new Jt(`Invalid agent ID: ${t.input.agentId}. Must be lowercase kebab-case.`);let n=t.input.agentName.trim();if(!n)throw new Yt(`Agent name must not be empty.`);e.features.mastra.enabled=!0,e.features.mastra.agentId=t.input.agentId,e.features.mastra.agentName=n,e.features.mastra.models.length===0&&e.features.mastra.models.push({id:`clint/demo-agent`,isDefault:!0}),e.features.mastra.profiles.length===0&&e.features.mastra.profiles.push({id:`base`,title:`Base Profile`,content:`You are a helpful assistant`})},disableMastraOperation(e){e.features.mastra.enabled=!1,e.features.mastra.agentId=null,e.features.mastra.agentName=null,e.features.mastra.agentDescription=null,e.features.mastra.agentImage=null,e.features.mastra.models=[],e.features.mastra.profiles=[],e.features.mastra.common.enableChat=!1;let t=e.packages.findIndex(e=>e.packageName===`@powerhousedao/clint-common`&&e.managed);t!==-1&&e.packages.splice(t,1)},setAgentIdOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot set agent ID when Mastra is disabled.`);if(!/^[a-z][a-z0-9-]*$/.test(t.input.agentId))throw new Jt(`Invalid agent ID: ${t.input.agentId}. Must be lowercase kebab-case.`);e.features.mastra.agentId=t.input.agentId},setAgentNameOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot set agent name when Mastra is disabled.`);let n=t.input.agentName.trim();if(!n)throw new Yt(`Agent name must not be empty.`);e.features.mastra.agentName=n},addModelOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot add model when Mastra is disabled.`);if(!/^[a-z0-9-]+\/[a-z0-9._-]+$/.test(t.input.id))throw new Xt(`Invalid model ID: ${t.input.id}. Must be provider/model-name format.`);if(e.features.mastra.models.find(e=>e.id===t.input.id))throw new Zt(`Model already exists: ${t.input.id}`);let n=e.features.mastra.models.length===0||t.input.isDefault===!0;if(n)for(let t of e.features.mastra.models)t.isDefault=!1;e.features.mastra.models.push({id:t.input.id,isDefault:n})},removeModelOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot remove model when Mastra is disabled.`);let n=e.features.mastra.models.findIndex(e=>e.id===t.input.id);if(n===-1)throw new Qt(`Model not found: ${t.input.id}`);let r=e.features.mastra.models[n].isDefault;e.features.mastra.models.splice(n,1),r&&e.features.mastra.models.length>0&&(e.features.mastra.models[0].isDefault=!0)},setDefaultModelOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot set default model when Mastra is disabled.`);let n=e.features.mastra.models.find(e=>e.id===t.input.id);if(!n)throw new Qt(`Model not found: ${t.input.id}`);for(let t of e.features.mastra.models)t.isDefault=!1;n.isDefault=!0},addProfileOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot add profile when Mastra is disabled.`);if(!/^[a-z][a-z0-9-]*$/.test(t.input.id))throw new $t(`Invalid profile ID: ${t.input.id}. Must be lowercase kebab-case.`);if(e.features.mastra.profiles.find(e=>e.id===t.input.id))throw new en(`Profile already exists: ${t.input.id}`);let n={id:t.input.id,title:t.input.title,content:t.input.content};if(t.input.insertBefore){let r=e.features.mastra.profiles.findIndex(e=>e.id===t.input.insertBefore);if(r===-1)throw new K(`insertBefore profile not found: ${t.input.insertBefore}`);e.features.mastra.profiles.splice(r,0,n)}else e.features.mastra.profiles.push(n)},updateProfileOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot update profile when Mastra is disabled.`);let n=e.features.mastra.profiles.find(e=>e.id===t.input.id);if(!n)throw new K(`Profile not found: ${t.input.id}`);t.input.title&&(n.title=t.input.title),t.input.content&&(n.content=t.input.content)},removeProfileOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot remove profile when Mastra is disabled.`);let n=e.features.mastra.profiles.findIndex(e=>e.id===t.input.id);if(n===-1)throw new K(`Profile not found: ${t.input.id}`);e.features.mastra.profiles.splice(n,1)},reorderProfilesOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot reorder profiles when Mastra is disabled.`);let n=[];for(let r of t.input.ids){let t=e.features.mastra.profiles.find(e=>e.id===r);if(!t)throw new K(`Profile not found: ${r}`);n.push(t)}if(e.features.mastra.profiles=e.features.mastra.profiles.filter(e=>!t.input.ids.includes(e.id)),t.input.insertBefore){let r=e.features.mastra.profiles.findIndex(e=>e.id===t.input.insertBefore);if(r===-1)throw new K(`insertBefore profile not found: ${t.input.insertBefore}`);e.features.mastra.profiles.splice(r,0,...n)}else e.features.mastra.profiles.push(...n)},setAgentDescriptionOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot set agent description when Mastra is disabled.`);e.features.mastra.agentDescription=t.input.description},setAgentImageOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot set agent image when Mastra is disabled.`);if(!/^data:[a-z]+\/[a-z0-9.+-]+;base64,/.test(t.input.image))throw new tn(`Invalid image: must be a data URL (data:<mime>;base64,...)`);e.features.mastra.agentImage=t.input.image},clearAgentImageOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot clear agent image when Mastra is disabled.`);e.features.mastra.agentImage=null},setEnableChatOperation(e,t){if(!e.features.mastra.enabled)throw new G(`Cannot toggle chat when Mastra is disabled.`);if(e.features.powerhouse===`Disabled`)throw new nn(`Cannot toggle chat when Powerhouse is disabled.`);e.features.mastra.common.enableChat=t.input.enabled;let n=`@powerhousedao/clint-common`,r=`powerhouse/chat-session`;if(t.input.enabled){let t=e.packages.find(e=>e.packageName===n);t?t.documentTypes.includes(r)||t.documentTypes.push(r):e.packages.push({id:`pkg-clint-common`,packageName:n,documentTypes:[r],version:null,managed:!0})}else{let t=e.packages.findIndex(e=>e.packageName===n&&e.managed);if(t!==-1){let n=e.packages[t];if(n.documentTypes.length===1&&n.documentTypes[0]===r)e.packages.splice(t,1);else{let e=n.documentTypes.indexOf(r);e!==-1&&n.documentTypes.splice(e,1)}}}}},rn=class extends Error{errorCode=`CannotLowerPowerhouseError`;constructor(e=`CannotLowerPowerhouseError`){super(e)}},an=[`Disabled`,`Reactor`,`Switchboard`,`Connect`],on={setPowerhouseLevelOperation(e,t){let n=an.indexOf(e.features.powerhouse),r=an.indexOf(t.input.level);if(n>=1&&r<1)throw new rn(`Cannot lower Powerhouse level below Reactor once enabled`);if(e.features.powerhouse=t.input.level,n===0&&r>=1&&!e.packages.some(e=>e.managed)){let t=e.name?e.name.replace(/-cli$/,`-app`):`app`,n=e.scope&&e.name?`${e.scope}/${t}`:t;e.packages.push({id:`app-${e.name||`managed`}`,packageName:n,documentTypes:[`*/*`],version:null,managed:!0})}r>=2&&!t.input.skipAutoProxy&&(e.deployment.proxyEnabled=!0)}},sn={enableRoutineOperation(e){e.features.routine.enabled=!0},disableRoutineOperation(e){e.features.routine.enabled=!1}},cn=class extends Error{errorCode=`InvalidVersionError`;constructor(e=`InvalidVersionError`){super(e)}},J=class extends Error{errorCode=`InvalidPackageIdentifierError`;constructor(e=`InvalidPackageIdentifierError`){super(e)}},ln=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/,un=/^[a-z][a-z0-9-]*$/,dn={setVersionOperation(e,t){if(!ln.test(t.input.version))throw new cn(`Invalid version: ${t.input.version}`);e.version=t.input.version},setDescriptionOperation(e,t){e.description=t.input.description},setPackageIdentifierOperation(e,t){let n=t.input.identifier.trim();if(!n)throw new J(`Package identifier must not be empty`);let r=null,i=n;if(n.includes(`/`)){let e=n.split(`/`);if(e.length!==2||!e[0]||!e[1])throw new J(`Invalid package identifier: ${n}`);r=e[0].replace(/^@/,``),i=e[1]}if(r!==null&&!un.test(r))throw new J(`Invalid scope: ${r}`);if(i.endsWith(`-cli`)||(i+=`-cli`),!un.test(i))throw new J(`Invalid package name: ${i}`);e.scope=r?`@${r}`:null,e.name=i;let a=e.packages.find(e=>e.managed);if(a){let e=i.replace(/-cli$/,`-app`);a.packageName=r?`@${r}/${e}`:e,a.id=`app-${i}`}}},fn={importSpecOperation(e,t){e.name=t.input.name,e.scope=t.input.scope||null,e.version=t.input.version,e.description=t.input.description,e.features.powerhouse=t.input.powerhouse,e.features.mastra.enabled=t.input.mastraEnabled,e.features.routine.enabled=t.input.routineEnabled;let n=t.input.name.replace(/-cli$/,`-app`),r=t.input.scope?`${t.input.scope}/${n}`:n,i=t.input.powerhouse!==`Disabled`;if(e.packages=t.input.packages.map(e=>({id:e.id,packageName:e.packageName,documentTypes:[...e.documentTypes],version:e.version||null,managed:i&&e.packageName===r})),e.externalSkills=t.input.externalSkills.map(e=>({id:e.id,name:e.name,githubUrl:e.githubUrl})),e.features.mastra.agentId=t.input.agentId||null,e.features.mastra.agentName=t.input.agentName||null,e.features.mastra.models=(t.input.models||[]).map(e=>({id:e.id,isDefault:e.isDefault})),e.features.mastra.profiles=(t.input.profiles||[]).map(e=>({id:e.id,title:e.title,content:e.content})),t.input.agentDescription&&e.features.mastra.enabled?e.features.mastra.agentDescription=t.input.agentDescription:e.features.mastra.agentDescription=null,t.input.agentImage&&e.features.mastra.enabled){if(!/^data:[a-z]+\/[a-z0-9.+-]+;base64,/.test(t.input.agentImage))throw new tn(`Invalid image: must be a data URL (data:<mime>;base64,...)`);e.features.mastra.agentImage=t.input.agentImage}else e.features.mastra.agentImage=null;if(t.input.enableChat&&e.features.mastra.enabled&&e.features.powerhouse!==`Disabled`){e.features.mastra.common.enableChat=!0;let t=`@powerhousedao/clint-common`,n=`powerhouse/chat-session`,r=e.packages.find(e=>e.packageName===t);r?r.documentTypes.includes(n)||r.documentTypes.push(n):e.packages.push({id:`pkg-clint-common`,packageName:t,documentTypes:[n],version:null,managed:!0})}else e.features.mastra.common.enableChat=!1;e.deployment.proxyEnabled=t.input.proxyEnabled??!1,e.deployment.observabilityEnabled=t.input.observabilityEnabled??!1,e.deployment.supportedResources=t.input.supportedResources?[...t.input.supportedResources]:[]}},pn=class extends Error{errorCode=`DuplicatePackageError`;constructor(e=`DuplicatePackageError`){super(e)}},Y=class extends Error{errorCode=`PackageNotFoundError`;constructor(e=`PackageNotFoundError`){super(e)}},mn=class extends Error{errorCode=`CannotRemoveManagedPackageError`;constructor(e=`CannotRemoveManagedPackageError`){super(e)}},hn=class extends Error{errorCode=`InvalidDocumentTypeError`;constructor(e=`InvalidDocumentTypeError`){super(e)}},gn=class extends Error{errorCode=`DuplicateDocumentTypeError`;constructor(e=`DuplicateDocumentTypeError`){super(e)}},_n=class extends Error{errorCode=`DocumentTypeNotFoundError`;constructor(e=`DocumentTypeNotFoundError`){super(e)}},vn=class extends Error{errorCode=`InvalidVersionError`;constructor(e=`InvalidVersionError`){super(e)}},yn=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/,X={addPowerhousePackageOperation(e,t){if(e.packages.find(e=>e.id===t.input.id||e.packageName===t.input.packageName))throw new pn(`Package already exists: ${t.input.packageName}`);e.packages.push({id:t.input.id,packageName:t.input.packageName,documentTypes:[],version:null,managed:!1})},removePowerhousePackageOperation(e,t){let n=e.packages.findIndex(e=>e.id===t.input.id);if(n===-1)throw new Y(`Package not found: ${t.input.id}`);if(e.packages[n].managed)throw new mn(`Cannot remove a managed package`);e.packages.splice(n,1)},addPackageDocumentTypeOperation(e,t){if(t.input.documentType!==`*/*`&&!/^[a-z0-9-]+\/[a-z0-9-]+$/.test(t.input.documentType))throw new hn(`Invalid document type format: ${t.input.documentType}. Expected org/name.`);let n=e.packages.find(e=>e.id===t.input.packageId);if(!n)throw new Y(`Package not found: ${t.input.packageId}`);if(t.input.documentType===`*/*`){n.documentTypes.length=0,n.documentTypes.push(`*/*`);return}if(!n.documentTypes.includes(`*/*`)){if(n.documentTypes.includes(t.input.documentType))throw new gn(`Document type already registered: ${t.input.documentType}`);n.documentTypes.push(t.input.documentType)}},removePackageDocumentTypeOperation(e,t){let n=e.packages.find(e=>e.id===t.input.packageId);if(!n)throw new Y(`Package not found: ${t.input.packageId}`);let r=n.documentTypes.indexOf(t.input.documentType);if(r===-1)throw new _n(`Document type not found: ${t.input.documentType}`);n.documentTypes.splice(r,1)},setPackageVersionOperation(e,t){let n=e.packages.find(e=>e.id===t.input.packageId);if(!n)throw new Y(`Package not found: ${t.input.packageId}`);if(t.input.version!=null&&!yn.test(t.input.version))throw new vn(`Invalid version: ${t.input.version}`);n.version=t.input.version||null}},bn=class extends Error{errorCode=`InvalidVersionError`;constructor(e=`InvalidVersionError`){super(e)}},xn=class extends Error{errorCode=`PublishRecordNotFoundError`;constructor(e=`PublishRecordNotFoundError`){super(e)}},Z={bumpVersionOperation(e,t){if(!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(t.input.version))throw new bn(`Invalid version: ${t.input.version}`);e.version=t.input.version},publishDevOperation(e,t){e.publishHistory.push({id:t.input.id,tag:`Dev`,version:e.version,timestamp:t.input.timestamp,status:`Pending`})},publishStagingOperation(e,t){e.publishHistory.push({id:t.input.id,tag:`Staging`,version:e.version,timestamp:t.input.timestamp,status:`Pending`})},publishProductionOperation(e,t){e.publishHistory.push({id:t.input.id,tag:`Production`,version:e.version,timestamp:t.input.timestamp,status:`Pending`})},setPublishStatusOperation(e,t){let n=e.publishHistory.find(e=>e.id===t.input.id);if(!n)throw new xn(`Publish record not found: ${t.input.id}`);n.status=t.input.status}},Sn=ue((e,t,n)=>{if(le(t))return e;switch(t.type){case`SET_DESCRIPTION`:M().parse(t.input),dn.setDescriptionOperation(e[t.scope],t,n);break;case`SET_VERSION`:V().parse(t.input),dn.setVersionOperation(e[t.scope],t,n);break;case`SET_PACKAGE_IDENTIFIER`:L().parse(t.input),dn.setPackageIdentifierOperation(e[t.scope],t,n);break;case`SET_POWERHOUSE_LEVEL`:R().parse(t.input),on.setPowerhouseLevelOperation(e[t.scope],t,n);break;case`ENABLE_MASTRA`:ke().parse(t.input),q.enableMastraOperation(e[t.scope],t,n);break;case`DISABLE_MASTRA`:De().parse(t.input),q.disableMastraOperation(e[t.scope],t,n);break;case`SET_AGENT_ID`:O().parse(t.input),q.setAgentIdOperation(e[t.scope],t,n);break;case`SET_AGENT_NAME`:A().parse(t.input),q.setAgentNameOperation(e[t.scope],t,n);break;case`ADD_MODEL`:Se().parse(t.input),q.addModelOperation(e[t.scope],t,n);break;case`REMOVE_MODEL`:x().parse(t.input),q.removeModelOperation(e[t.scope],t,n);break;case`SET_DEFAULT_MODEL`:j().parse(t.input),q.setDefaultModelOperation(e[t.scope],t,n);break;case`ADD_PROFILE`:m().parse(t.input),q.addProfileOperation(e[t.scope],t,n);break;case`UPDATE_PROFILE`:H().parse(t.input),q.updateProfileOperation(e[t.scope],t,n);break;case`REMOVE_PROFILE`:w().parse(t.input),q.removeProfileOperation(e[t.scope],t,n);break;case`REORDER_PROFILES`:E().parse(t.input),q.reorderProfilesOperation(e[t.scope],t,n);break;case`SET_AGENT_DESCRIPTION`:D().parse(t.input),q.setAgentDescriptionOperation(e[t.scope],t,n);break;case`SET_AGENT_IMAGE`:k().parse(t.input),q.setAgentImageOperation(e[t.scope],t,n);break;case`CLEAR_AGENT_IMAGE`:Ee().parse(t.input),q.clearAgentImageOperation(e[t.scope],t,n);break;case`SET_ENABLE_CHAT`:N().parse(t.input),q.setEnableChatOperation(e[t.scope],t,n);break;case`ENABLE_ROUTINE`:h().parse(t.input),sn.enableRoutineOperation(e[t.scope],t,n);break;case`DISABLE_ROUTINE`:Oe().parse(t.input),sn.disableRoutineOperation(e[t.scope],t,n);break;case`ADD_POWERHOUSE_PACKAGE`:p().parse(t.input),X.addPowerhousePackageOperation(e[t.scope],t,n);break;case`REMOVE_POWERHOUSE_PACKAGE`:C().parse(t.input),X.removePowerhousePackageOperation(e[t.scope],t,n);break;case`ADD_PACKAGE_DOCUMENT_TYPE`:Ce().parse(t.input),X.addPackageDocumentTypeOperation(e[t.scope],t,n);break;case`REMOVE_PACKAGE_DOCUMENT_TYPE`:S().parse(t.input),X.removePackageDocumentTypeOperation(e[t.scope],t,n);break;case`SET_PACKAGE_VERSION`:Ge().parse(t.input),X.setPackageVersionOperation(e[t.scope],t,n);break;case`ADD_EXTERNAL_SKILL`:xe().parse(t.input),W.addExternalSkillOperation(e[t.scope],t,n);break;case`REMOVE_EXTERNAL_SKILL`:b().parse(t.input),W.removeExternalSkillOperation(e[t.scope],t,n);break;case`SET_EXTERNAL_SKILL_NAME`:F().parse(t.input),W.setExternalSkillNameOperation(e[t.scope],t,n);break;case`SET_EXTERNAL_SKILL_GITHUB_URL`:P().parse(t.input),W.setExternalSkillGithubUrlOperation(e[t.scope],t,n);break;case`BUMP_VERSION`:Te().parse(t.input),Z.bumpVersionOperation(e[t.scope],t,n);break;case`PUBLISH_DEV`:_().parse(t.input),Z.publishDevOperation(e[t.scope],t,n);break;case`PUBLISH_STAGING`:y().parse(t.input),Z.publishStagingOperation(e[t.scope],t,n);break;case`PUBLISH_PRODUCTION`:v().parse(t.input),Z.publishProductionOperation(e[t.scope],t,n);break;case`SET_PUBLISH_STATUS`:B().parse(t.input),Z.setPublishStatusOperation(e[t.scope],t,n);break;case`IMPORT_SPEC`:g().parse(t.input),fn.importSpecOperation(e[t.scope],t,n);break;case`ADD_SUPPORTED_RESOURCE`:we().parse(t.input),U.addSupportedResourceOperation(e[t.scope],t,n);break;case`REMOVE_SUPPORTED_RESOURCE`:T().parse(t.input),U.removeSupportedResourceOperation(e[t.scope],t,n);break;case`SET_PROXY_ENABLED`:z().parse(t.input),U.setProxyEnabledOperation(e[t.scope],t,n);break;case`SET_OBSERVABILITY_ENABLED`:I().parse(t.input),U.setObservabilityEnabledOperation(e[t.scope],t,n);break;default:return e}}),Cn=`powerhouse/ph-clint-project`,wn=ie.extend({documentType:i(Cn)}),Q=ne.extend({global:Ve()}),Tn=u({header:wn,state:Q,initialState:Q});function En(e){return Q.safeParse(e).success}function Dn(e){Q.parse(e)}function $(e){return Tn.safeParse(e).success}function On(e){Tn.parse(e)}var kn={name:null,scope:null,version:`0.1.0`,description:``,features:{powerhouse:`Disabled`,mastra:{enabled:!1,agentId:null,agentName:null,agentDescription:null,agentImage:null,models:[],profiles:[],common:{enableChat:!1}},routine:{enabled:!1}},packages:[],externalSkills:[],publishHistory:[],deployment:{proxyEnabled:!1,observabilityEnabled:!1,supportedResources:[`vetra-agent-s`,`vetra-agent-m`,`vetra-agent-l`,`vetra-agent-xl`,`vetra-agent-xxl`]}},An={},jn={fileExtension:`pcp`,createState(e){return{...fe(),global:{...kn,...e?.global},local:{...An,...e?.local}}},createDocument(e){let t=se(jn.createState,e);return t.header.documentType=Cn,t.header.id=te(),t},saveToFileHandle(e,t){return ce(e,t)},loadFromInput(e){return de(e,Sn)},isStateOfType(e){return En(e)},assertIsStateOfType(e){return Dn(e)},isDocumentOfType(e){return $(e)},assertIsDocumentOfType(e){return On(e)}},Mn=e({}),Nn={...jn,...Mn},Pn={version:1,reducer:Sn,actions:Vt,utils:Nn,documentModel:oe(fe(),Ht)},Fn=ee.forDocumentModel(Pn);function In(){return{name:null,scope:null,version:`0.1.0`,description:``,features:{powerhouse:`Disabled`,mastra:{enabled:!1,agentId:null,agentName:null,agentDescription:null,agentImage:null,models:[],profiles:[],common:{enableChat:!1}},routine:{enabled:!1}},packages:[],externalSkills:[],publishHistory:[],deployment:{proxyEnabled:!1,observabilityEnabled:!1,supportedResources:[`vetra-agent-s`,`vetra-agent-m`,`vetra-agent-l`,`vetra-agent-xl`,`vetra-agent-xxl`]}}}function Ln(){return{}}function Rn(){return{...fe(),global:In(),local:Ln()}}function zn(e){return{...In(),...e||{}}}function Bn(e){return{...Ln(),...e||{}}}function Vn(e,t,n){return{...ae(e?.auth,e?.document),global:zn(t),local:Bn(n)}}function Hn(e){return jn.createDocument(e?Vn(ae(e.auth,e.document),e.global,e.local):void 0)}function Un(e){let[t,n]=he(e);return $(t)?[t,n]:[void 0,void 0]}function Wn(){let[e,t]=ge();return On(e),[e,t]}function Gn(){return pe()?.filter($)}function Kn(){return me()?.filter($)}var qn=[1],Jn=qn[0],Yn={documentType:`powerhouse/ph-clint-project`,latestVersion:Jn,supportedVersions:qn,upgrades:{}};export{ut as $,v as $t,Ft as A,Te as At,Pt as B,Pe as Bt,$ as C,R as Cn,Ye as Ct,Ht as D,H as Dn,p as Dt,Sn as E,V as En,Ce as Et,Mt as F,h as Ft,Et as G,Re as Gt,Ot as H,Fe as Ht,At as I,Ae as It,St as J,Ve as Jt,Tt as K,ze as Kt,kt as L,je as Lt,zt as M,De as Mt,Rt as N,Oe as Nt,Vt as O,ve as On,m as Ot,Bt as P,ke as Pt,st as Q,_ as Qt,Nt as R,Me as Rt,Dn as S,Ge as Sn,Xe as St,Cn as T,B as Tn,Se as Tt,Ct as U,Ie as Ut,Dt as V,g as Vt,wt as W,Le as Wt,vt as X,f as Xt,xt as Y,He as Yt,yt as Z,Ue as Zt,An as _,N as _n,tt as _t,Gn as a,x as an,ft as at,Q as b,I as bn,Ke as bt,Hn as c,w as cn,at as ct,Ln as d,D as dn,lt as dt,We as en,gt as et,Rn as f,O as fn,_t as ft,kn as g,M as gn,$e as gt,Nn as h,j as hn,Ze as ht,Un as i,b as in,ct as it,Lt as j,Ee as jt,It as k,_e as kn,we as kt,Vn as l,T as ln,ht as lt,Pn as m,A as mn,Qe as mt,Jn as n,ye as nn,it as nt,Kn as o,S as on,pt as ot,Fn as p,k as pn,dt as pt,bt as q,Be as qt,qn as r,be as rn,rt,Wn as s,C as sn,mt as st,Yn as t,y as tn,nt as tt,In as u,E as un,ot as ut,wn as v,P as vn,et as vt,En as w,z as wn,xe as wt,On as x,L as xn,Je as xt,Tn as y,F as yn,qe as yt,jt as z,Ne as zt};
|
|
758
|
+
//# sourceMappingURL=ph-clint-project-BRYYVNTj.js.map
|