@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switchboard-vSM1SpS5.js","names":[],"sources":["../../processors/switchboard.ts"],"sourcesContent":["import type { ProcessorFactoryBuilder } from
|
|
1
|
+
{"version":3,"file":"switchboard-vSM1SpS5.js","names":[],"sources":["../../processors/switchboard.ts"],"sourcesContent":["import type { ProcessorFactoryBuilder } from '@powerhousedao/reactor';\n\nexport const processorFactoryBuilders: ProcessorFactoryBuilder[] = [];\n"],"mappings":";AAEA,MAAa,2BAAsD,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect-q2RMY-je.js","names":[],"sources":["../../../processors/connect.ts"],"sourcesContent":["import type { ProcessorFactoryBuilder } from
|
|
1
|
+
{"version":3,"file":"connect-q2RMY-je.js","names":[],"sources":["../../../processors/connect.ts"],"sourcesContent":["import type { ProcessorFactoryBuilder } from '@powerhousedao/reactor';\n\nexport const processorFactoryBuilders: ProcessorFactoryBuilder[] = [];\n"],"mappings":"AAEA,IAAa,EAAsD,EAAE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Pt as e}from"./lz-string-CSbzFwDi.js";import{h as t}from"./connect-ClPSMjSP-B0m_vica.js";import{O as n,s as r}from"./ph-clint-project-BRYYVNTj.js";import{useCallback as i,useRef as a,useState as o}from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";var u=[{value:`Disabled`,description:`No Powerhouse integration`},{value:`Reactor`,description:`Document model runtime`},{value:`Switchboard`,description:`API service (GraphQL + MCP)`},{value:`Connect`,description:`Web UI for document management`}];function d(e){return l(`label`,{className:e.compact?`my-1 block`:`my-3 block`,children:[c(`h3`,{className:e.compact?`text-xs text-gray-600`:`text-base`,children:e.label}),c(`input`,{type:`text`,defaultValue:e.value,placeholder:e.placeholder,readOnly:e.readOnly,onBlur:t=>{let n=t.target.value.trim();n!==e.value&&e.onCommit(n)},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},className:`w-full font-mono`})]})}function f(e){return l(`label`,{className:`my-2 flex items-center gap-3`,children:[c(`input`,{type:`checkbox`,checked:e.checked,disabled:e.disabled,onChange:t=>e.onChange(t.target.checked)}),c(`span`,{className:`font-semibold`,children:e.label}),e.hint?c(`span`,{className:`text-sm text-gray-600`,children:e.hint}):null]})}function p(){let[i,a]=r(),s=i.state.global,{powerhouse:u,mastra:d,routine:f}=s.features,[p,g]=o(`spec`),_=e=>a(n.setPackageIdentifier({identifier:e})),v=e=>a(n.setVersion({version:e})),b=e=>a(n.setDescription({description:e})),S=e=>a(n.setPowerhouseLevel({level:e})),C=e=>{if(e){let e=s.name||`my-agent`,t=`${e}-agent`,r=`${e.charAt(0).toUpperCase()}${e.slice(1).replace(/-([a-z])/g,(e,t)=>` ${t.toUpperCase()}`)} Agent`;a(n.enableMastra({agentId:t,agentName:r}))}else a(n.disableMastra({_:!0}))},w=e=>{a(e?n.enableRoutine({_:!0}):n.disableRoutine({_:!0}))},T=t=>a(n.addPowerhousePackage({id:e(),packageName:t})),E=e=>a(n.removePowerhousePackage({id:e})),D=(e,t)=>a(n.addPackageDocumentType({packageId:e,documentType:t})),O=(e,t)=>a(n.removePackageDocumentType({packageId:e,documentType:t})),k=(t,r)=>a(n.addExternalSkill({id:e(),name:t,githubUrl:r})),A=e=>a(n.removeExternalSkill({id:e})),j=e=>a(n.bumpVersion({version:e})),M=()=>a(n.publishDev({id:e(),timestamp:new Date().toISOString()})),N=()=>a(n.publishStaging({id:e(),timestamp:new Date().toISOString()})),P=()=>a(n.publishProduction({id:e(),timestamp:new Date().toISOString()})),F=e=>a(n.setAgentId({agentId:e})),I=e=>a(n.setAgentName({agentName:e})),L=(e,t)=>a(n.addModel({id:e,isDefault:t})),R=e=>a(n.removeModel({id:e})),z=e=>a(n.setDefaultModel({id:e})),B=(e,t,r,i)=>a(n.addProfile({id:e,title:t,content:r,insertBefore:i})),V=(e,t,r)=>a(n.updateProfile({id:e,title:t,content:r})),H=e=>a(n.removeProfile({id:e})),U=(e,t)=>a(n.reorderProfiles({ids:e,insertBefore:t})),W=e=>a(n.setAgentDescription({description:e})),G=e=>a(n.setAgentImage({image:e})),K=()=>a(n.clearAgentImage({_:!0})),q=e=>a(n.setEnableChat({enabled:e})),J=e=>a(n.setProxyEnabled({enabled:e})),Y=e=>a(n.setObservabilityEnabled({enabled:e})),X=e=>a(n.addSupportedResource({resource:e})),Z=e=>a(n.removeSupportedResource({resource:e})),Q=u!==`Disabled`,$=e=>`px-4 py-2 text-sm font-medium border-b-2 cursor-pointer ${p===e?`border-blue-500 text-blue-600`:`border-transparent text-gray-500 hover:text-gray-700`}`;return l(`div`,{className:`mx-auto max-w-4xl bg-gray-50 p-6`,children:[c(t,{}),l(`div`,{className:`ph-default-styles`,children:[c(`h2`,{className:`mt-4 text-xl font-bold`,children:`ph-clint Project Spec`}),l(`nav`,{className:`my-4 flex border-b border-gray-200`,children:[c(`button`,{className:$(`spec`),onClick:()=>g(`spec`),children:`CLI`}),c(`button`,{className:$(`agent`),onClick:()=>g(`agent`),children:`Agent`}),c(`button`,{className:$(`powerhouse`),onClick:()=>g(`powerhouse`),children:`Powerhouse`}),c(`button`,{className:$(`skills`),onClick:()=>g(`skills`),children:`Skills`}),c(`button`,{className:$(`publish`),onClick:()=>g(`publish`),children:`Publish`})]}),p===`spec`&&c(m,{state:s,powerhouse:u,mastra:d,routine:f,isAboveDisabled:Q,setPackageIdentifier:_,setVersion:v,setDescription:b,setPowerhouseLevel:S,toggleMastra:C,toggleRoutine:w}),p===`agent`&&c(ee,{mastra:d,isAboveDisabled:Q,setAgentId:F,setAgentName:I,setAgentDescription:W,setAgentImage:G,clearAgentImage:K,setEnableChat:q,addModel:L,removeModel:R,setDefaultModel:z,addProfile:B,updateProfile:V,removeProfile:H,reorderProfiles:U}),p===`powerhouse`&&c(h,{packages:s.packages,isAboveDisabled:Q,addPackage:T,removePackage:E,addDocType:D,removeDocType:O}),p===`skills`&&c(y,{skills:s.externalSkills,addSkill:k,removeSkill:A}),p===`publish`&&c(x,{version:s.version,publishHistory:s.publishHistory,documentHeader:i.header,deployment:s.deployment,bumpVersion:j,publishDev:M,publishStaging:N,publishProduction:P,setProxyEnabled:J,setObservabilityEnabled:Y,addSupportedResource:X,removeSupportedResource:Z})]})]})}function m(e){let{state:t}=e,n=`${t.scope?t.scope+`/`:``}${t.name??``}`;return l(s,{children:[l(`section`,{className:`my-6`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`Identity`}),l(`div`,{className:`grid grid-cols-[3fr_1fr] gap-4`,children:[c(d,{label:`Package name`,value:n,placeholder:`@scope/my-tool-cli`,onCommit:e.setPackageIdentifier}),c(d,{label:`Version`,value:t.version,placeholder:`0.1.0`,onCommit:e.setVersion})]}),c(d,{label:`Description`,value:t.description,placeholder:`What this CLI does`,onCommit:e.setDescription})]}),c(`hr`,{}),l(`section`,{className:`my-6`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`Features`}),l(`div`,{className:`my-4 rounded border border-gray-200 bg-white p-4`,children:[c(`h4`,{className:`text-base font-semibold`,children:`Powerhouse`}),e.isAboveDisabled&&c(`p`,{className:`text-sm text-gray-500`,children:`Cannot go back to Disabled once enabled`}),c(`div`,{className:`mt-2 space-y-2`,children:u.map((t,n)=>l(`label`,{className:`flex items-start gap-2`,children:[n>0&&c(`div`,{className:`absolute -mt-3 ml-[7px] h-3 border-l border-gray-300`}),c(`input`,{type:`radio`,name:`powerhouse-level`,checked:e.powerhouse===t.value,disabled:e.isAboveDisabled&&t.value===`Disabled`,onChange:()=>e.setPowerhouseLevel(t.value),className:`mt-0.5`}),l(`div`,{children:[c(`span`,{className:`font-medium`,children:t.value}),c(`span`,{className:`ml-2 text-sm text-gray-500`,children:t.description})]})]},t.value))})]}),c(`div`,{className:`my-4 rounded border border-gray-200 bg-white p-4`,children:c(f,{label:`Mastra`,checked:e.mastra.enabled,hint:`AI agent framework`,onChange:e.toggleMastra})}),c(`div`,{className:`my-4 rounded border border-gray-200 bg-white p-4`,children:c(f,{label:`Routine loop`,checked:e.routine.enabled,hint:`tick-based execution loop with triggers`,onChange:e.toggleRoutine})})]})]})}function h(e){return e.isAboveDisabled?c(w,{packages:e.packages,addPackage:e.addPackage,removePackage:e.removePackage,addDocType:e.addDocType,removeDocType:e.removeDocType}):l(`section`,{className:`my-6 rounded border border-dashed border-gray-300 bg-white p-8 text-center text-gray-500`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`Powerhouse`}),c(`p`,{className:`mt-2`,children:`Enable Powerhouse in the Spec tab (set level to Reactor or above) to manage packages.`})]})}function ee(e){let{mastra:t}=e;return t.enabled?l(s,{children:[c(`section`,{className:`my-6`,children:l(`div`,{style:{display:`flex`,gap:`1.5rem`},children:[c(`div`,{style:{flexShrink:0,width:`7rem`},children:c(g,{image:t.agentImage??null,onSetImage:e.setAgentImage,onClearImage:e.clearAgentImage})}),l(`div`,{style:{flex:1,minWidth:0},children:[l(`div`,{className:`grid grid-cols-[1fr_2fr] gap-4`,children:[c(d,{compact:!0,label:`Agent ID`,value:t.agentId??``,placeholder:`my-agent`,onCommit:e.setAgentId}),c(d,{compact:!0,label:`Agent Name`,value:t.agentName??``,placeholder:`My Agent`,onCommit:e.setAgentName})]}),c(d,{compact:!0,label:`Agent Description`,value:t.agentDescription??``,placeholder:`A brief description of what this agent does`,onCommit:e.setAgentDescription})]})]})}),c(`hr`,{}),c(_,{models:t.models,addModel:e.addModel,removeModel:e.removeModel,setDefaultModel:e.setDefaultModel}),c(`hr`,{}),c(v,{profiles:t.profiles,addProfile:e.addProfile,updateProfile:e.updateProfile,removeProfile:e.removeProfile,reorderProfiles:e.reorderProfiles}),c(`hr`,{}),l(`section`,{className:`my-6`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`Common`}),c(`div`,{className:`my-3 rounded border border-gray-200 bg-white p-4`,children:c(f,{label:`Enable Chat`,checked:t.common.enableChat,disabled:!e.isAboveDisabled,hint:e.isAboveDisabled?`Chat session integration via clint-common`:`Requires Powerhouse to be enabled`,onChange:e.setEnableChat})})]})]}):l(`section`,{className:`my-6 rounded border border-dashed border-gray-300 bg-white p-8 text-center text-gray-500`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`Agent`}),c(`p`,{className:`mt-2`,children:`Enable Mastra in the Spec tab to configure the agent.`})]})}function g(e){let[t,n]=o(!1),r=a(0),u=t=>{if(!t.type.startsWith(`image/`))return;let n=new FileReader;n.onload=()=>{typeof n.result==`string`&&e.onSetImage(n.result)},n.readAsDataURL(t)},d=i(e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),e.stopPropagation())},[]),f=i(e=>{e.dataTransfer.types.includes(`Files`)&&(e.stopPropagation(),r.current+=1,r.current===1&&n(!0))},[]),p=i(e=>{e.dataTransfer.types.includes(`Files`)&&(e.stopPropagation(),r.current=Math.max(0,r.current-1),r.current===0&&n(!1))},[]),m=i(e=>{if(e.dataTransfer.types.includes(`Files`)){e.preventDefault(),e.stopPropagation(),r.current=0,n(!1);let t=e.dataTransfer.files[0];t&&u(t)}},[]),h=`7rem`;return c(`div`,{style:{width:h,height:h,flexShrink:0},className:`relative my-3`,children:e.image?l(s,{children:[c(`img`,{src:e.image,alt:`Agent`,style:{width:h,height:h},className:`rounded border border-gray-200 object-cover`}),l(`div`,{className:`mt-1 flex justify-center gap-1`,children:[l(`label`,{className:`cursor-pointer rounded bg-gray-100 px-2 py-0.5 text-xs hover:bg-gray-200`,children:[`Replace`,c(`input`,{type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{e.target.files?.[0]&&u(e.target.files[0])}})]}),c(`button`,{className:`rounded bg-gray-100 px-2 py-0.5 text-xs text-red-600 hover:bg-gray-200`,onClick:e.onClearImage,children:`Remove`})]})]}):c(`div`,{style:{width:h,height:h},className:`flex flex-col items-center justify-center rounded border-2 border-dashed text-center ${t?`border-blue-400 bg-blue-50`:`border-gray-300 bg-white`}`,onDragOver:d,onDragEnter:f,onDragLeave:p,onDrop:m,children:l(`label`,{className:`cursor-pointer p-2 text-xs text-gray-500 hover:text-blue-600`,children:[`Drop image or click`,c(`input`,{type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{e.target.files?.[0]&&u(e.target.files[0])}})]})})})}function _(e){let[t,n]=o(``),r=()=>{let r=t.trim();r&&(e.addModel(r),n(``))};return l(`section`,{className:`my-6`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`Models`}),c(`p`,{className:`text-sm text-gray-600`,children:`Provider/model format (e.g. anthropic/claude-sonnet-4-5). Exactly one must be default.`}),e.models.length>0&&l(`table`,{className:`mt-3 w-full text-sm`,children:[c(`thead`,{children:l(`tr`,{className:`border-b text-left text-gray-500`,children:[c(`th`,{className:`py-1`,children:`Default`}),c(`th`,{className:`py-1`,children:`Model`}),c(`th`,{className:`py-1`,children:`Provider`}),c(`th`,{className:`py-1`})]})}),c(`tbody`,{children:e.models.map(t=>{let n=t.id.split(`/`)[0];return l(`tr`,{className:`border-b border-gray-100`,children:[c(`td`,{className:`py-2`,children:c(`input`,{type:`radio`,name:`default-model`,checked:t.isDefault,onChange:()=>e.setDefaultModel(t.id)})}),c(`td`,{className:`py-2 font-mono`,children:t.id}),c(`td`,{className:`py-2 text-gray-500`,children:n}),c(`td`,{className:`py-2 text-right`,children:c(`button`,{className:`text-red-500 hover:text-red-700`,onClick:()=>e.removeModel(t.id),children:`Remove`})})]},t.id)})})]}),l(`div`,{className:`mt-3 flex items-center gap-2`,children:[c(`input`,{type:`text`,placeholder:`provider/model-name`,value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Enter`&&r()},className:`flex-1 rounded border p-2 font-mono text-sm`}),c(`button`,{className:`rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50`,disabled:!t.trim(),onClick:r,children:`Add Model`})]})]})}function v(e){let[t,n]=o(!1),[r,i]=o(``),[a,s]=o(``),u=()=>{let t=r.trim(),o=a.trim();t&&o&&(e.addProfile(t,o,``),i(``),s(``),n(!1))},d=t=>{if(t===0)return;let n=e.profiles[t].id,r=e.profiles[t-1].id;e.reorderProfiles([n],r)},f=t=>{if(t>=e.profiles.length-1)return;let n=e.profiles[t].id,r=t+2<e.profiles.length?e.profiles[t+2].id:null;e.reorderProfiles([n],r)};return l(`section`,{className:`my-6`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`Agent Profiles`}),c(`p`,{className:`text-sm text-gray-600`,children:`Markdown sections that compose into the agent's instructions. Order matters.`}),e.profiles.map((t,n)=>l(`div`,{className:`my-3 rounded border border-gray-200 bg-white p-4`,children:[l(`div`,{className:`flex items-center justify-between`,children:[l(`div`,{className:`flex items-center gap-2`,children:[c(`span`,{className:`rounded bg-gray-100 px-2 py-0.5 font-mono text-xs text-gray-500`,children:t.id}),c(`input`,{type:`text`,defaultValue:t.title,onBlur:n=>{let r=n.target.value.trim();r&&r!==t.title&&e.updateProfile(t.id,r)},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},className:`border-b border-transparent font-semibold hover:border-gray-300 focus:border-blue-500`})]}),l(`div`,{className:`flex items-center gap-1`,children:[c(`button`,{className:`px-1 text-gray-400 hover:text-gray-600 disabled:opacity-30`,disabled:n===0,onClick:()=>d(n),title:`Move up`,children:`↑`}),c(`button`,{className:`px-1 text-gray-400 hover:text-gray-600 disabled:opacity-30`,disabled:n===e.profiles.length-1,onClick:()=>f(n),title:`Move down`,children:`↓`}),c(`button`,{className:`ml-2 text-sm text-red-500 hover:text-red-700`,onClick:()=>e.removeProfile(t.id),children:`Remove`})]})]}),c(`textarea`,{defaultValue:t.content,onBlur:n=>{let r=n.target.value;r!==t.content&&e.updateProfile(t.id,void 0,r)},placeholder:`Markdown content for this profile section...`,rows:4,className:`mt-2 w-full rounded border border-gray-200 p-2 font-mono text-sm`})]},t.id)),t?c(`div`,{className:`my-3 rounded border border-blue-200 bg-blue-50 p-4`,children:l(`div`,{className:`flex items-center gap-2`,children:[c(`input`,{type:`text`,placeholder:`section-id`,value:r,onChange:e=>i(e.target.value),className:`w-40 rounded border p-2 font-mono text-sm`}),c(`input`,{type:`text`,placeholder:`Section Title`,value:a,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&u()},className:`flex-1 rounded border p-2 text-sm`}),c(`button`,{className:`rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50`,disabled:!r.trim()||!a.trim(),onClick:u,children:`Add`}),c(`button`,{className:`text-sm text-gray-500 hover:text-gray-700`,onClick:()=>{n(!1),i(``),s(``)},children:`Cancel`})]})}):c(`button`,{className:`mt-3 rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600`,onClick:()=>n(!0),children:`+ Add Profile`})]})}function y(e){return l(s,{children:[l(`section`,{className:`my-6 rounded border border-dashed border-gray-300 bg-white p-8 text-center text-gray-500`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`Skill Templates`}),c(`p`,{className:`mt-2`,children:`Coming soon`})]}),c(`hr`,{}),c(b,{skills:e.skills,addSkill:e.addSkill,removeSkill:e.removeSkill})]})}function b(e){let[t,n]=o(``),[r,i]=o(``),a=()=>{t.trim()&&r.trim()&&(e.addSkill(t.trim(),r.trim()),n(``),i(``))};return l(`section`,{className:`my-6`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`External Skills`}),c(`p`,{className:`text-sm text-gray-600`,children:`Skills from the skills.sh ecosystem, installed via GitHub URL.`}),e.skills.length>0&&c(`ul`,{className:`mt-3 space-y-2`,children:e.skills.map(t=>l(`li`,{className:`flex items-center justify-between rounded border border-gray-200 bg-white p-3`,children:[l(`div`,{children:[c(`span`,{className:`font-mono font-semibold`,children:t.name}),c(`span`,{className:`ml-2 text-sm text-gray-500`,children:t.githubUrl})]}),c(`button`,{className:`text-sm text-red-500 hover:text-red-700`,onClick:()=>e.removeSkill(t.id),children:`Remove`})]},t.id))}),l(`div`,{className:`mt-3 flex items-center gap-2`,children:[c(`input`,{type:`text`,placeholder:`skill-name`,value:t,onChange:e=>n(e.target.value),className:`w-40 rounded border p-2 font-mono text-sm`}),c(`input`,{type:`text`,placeholder:`https://github.com/org/repo`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&a()},className:`flex-1 rounded border p-2 font-mono text-sm`}),c(`button`,{className:`rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50`,disabled:!t.trim()||!r.trim(),onClick:a,children:`Add Skill`})]})]})}function x(e){let t=e.publishHistory.slice(-5).reverse();return l(s,{children:[l(`section`,{className:`my-6`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`Publishing`}),l(`div`,{className:`my-3 rounded border border-gray-200 bg-white p-4`,children:[l(`div`,{className:`flex items-center gap-4`,children:[c(`span`,{className:`text-sm text-gray-600`,children:`Current version:`}),c(`span`,{className:`font-mono font-semibold`,children:e.version})]}),l(`div`,{className:`mt-4 flex items-center gap-2`,children:[c(`button`,{className:`rounded bg-gray-600 px-3 py-2 text-sm text-white hover:bg-gray-700`,onClick:e.publishDev,children:`Publish Dev`}),c(`button`,{className:`rounded bg-amber-600 px-3 py-2 text-sm text-white hover:bg-amber-700`,onClick:e.publishStaging,children:`Publish Staging`}),c(`button`,{className:`rounded bg-green-600 px-3 py-2 text-sm text-white hover:bg-green-700`,onClick:e.publishProduction,children:`Publish Production`})]})]}),t.length>0&&l(`div`,{className:`mt-3`,children:[c(`h4`,{className:`text-sm font-semibold text-gray-600`,children:`Recent publish history`}),c(`ul`,{className:`mt-2 space-y-1`,children:t.map(e=>l(`li`,{className:`flex items-center gap-3 text-sm`,children:[c(E,{status:e.status}),c(`span`,{className:`font-mono`,children:e.version}),c(`span`,{className:`text-gray-500`,children:e.tag}),c(`span`,{className:`text-gray-400`,children:e.timestamp})]},e.id))})]})]}),c(`hr`,{}),c(C,{deployment:e.deployment,setProxyEnabled:e.setProxyEnabled,setObservabilityEnabled:e.setObservabilityEnabled,addSupportedResource:e.addSupportedResource,removeSupportedResource:e.removeSupportedResource}),c(`hr`,{}),l(`section`,{className:`my-6 grid grid-cols-2 gap-x-8`,children:[l(`label`,{children:[c(`h3`,{className:`text-base`,children:`Document ID`}),c(`input`,{type:`text`,value:e.documentHeader.id,readOnly:!0,className:`font-mono`})]}),l(`label`,{children:[c(`h3`,{className:`text-base`,children:`Type`}),c(`input`,{type:`text`,value:e.documentHeader.documentType,readOnly:!0})]})]})]})}var S=[`vetra-agent-s`,`vetra-agent-m`,`vetra-agent-l`,`vetra-agent-xl`,`vetra-agent-xxl`];function C(e){let[t,n]=o(``),{deployment:r}=e,i=r.supportedResources.filter(e=>!S.includes(e)),a=()=>{let r=t.trim();r&&(e.addSupportedResource(r),n(``))};return l(`section`,{className:`my-6`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`Deployment`}),l(`div`,{className:`my-3 rounded border border-gray-200 bg-white p-4 space-y-3`,children:[c(f,{label:`Proxy`,checked:r.proxyEnabled,hint:`Run a reverse proxy that exposes all service endpoints through a single port`,onChange:e.setProxyEnabled}),c(f,{label:`Observability`,checked:r.observabilityEnabled,hint:`Wire @powerhousedao/ph-clint-observability into the generated CLI. End-user opts in at runtime; env vars: {CLINAME}_SENTRY_DSN, {CLINAME}_OTEL_EXPORTER_OTLP_ENDPOINT.`,onChange:e.setObservabilityEnabled})]}),l(`div`,{className:`my-3 rounded border border-gray-200 bg-white p-4`,children:[c(`h4`,{className:`text-base font-semibold`,children:`Supported Resources`}),c(`p`,{className:`text-sm text-gray-600`,children:`Resource tiers this project supports.`}),c(`div`,{className:`mt-3 space-y-1`,children:S.map(t=>{let n=r.supportedResources.includes(t);return l(`label`,{className:`flex items-center gap-2`,children:[c(`input`,{type:`checkbox`,checked:n,onChange:()=>{n?e.removeSupportedResource(t):e.addSupportedResource(t)}}),c(`span`,{className:`font-mono text-sm`,children:t})]},t)})}),i.length>0&&l(`div`,{className:`mt-3 border-t border-gray-100 pt-3`,children:[c(`h5`,{className:`text-sm font-medium text-gray-600`,children:`Custom resources`}),c(`ul`,{className:`mt-1 space-y-1`,children:i.map(t=>l(`li`,{className:`flex items-center gap-2 text-sm`,children:[c(`span`,{className:`font-mono`,children:t}),c(`button`,{className:`text-xs text-red-400 hover:text-red-600`,onClick:()=>e.removeSupportedResource(t),children:`x`})]},t))})]}),l(`div`,{className:`mt-3 flex items-center gap-2`,children:[c(`input`,{type:`text`,placeholder:`custom-resource`,value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Enter`&&a()},className:`flex-1 rounded border p-2 font-mono text-sm`}),c(`button`,{className:`rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50`,disabled:!t.trim(),onClick:a,children:`Add`})]})]})]})}function w(e){let[t,n]=o(``);return l(`section`,{className:`my-6`,children:[c(`h3`,{className:`text-lg font-semibold`,children:`Powerhouse Packages`}),c(`p`,{className:`text-sm text-gray-600`,children:`Reactor packages and their document types. Managed packages are framework-controlled.`}),e.packages.map(t=>c(T,{pkg:t,addDocType:e.addDocType,removeDocType:e.removeDocType,removePackage:e.removePackage},t.id)),l(`div`,{className:`mt-4 flex items-center gap-2`,children:[c(`input`,{type:`text`,placeholder:`@org/package-name`,value:t,onChange:e=>n(e.target.value),onKeyDown:r=>{r.key===`Enter`&&t.trim()&&(e.addPackage(t.trim()),n(``))},className:`flex-1 rounded border p-2 font-mono text-sm`}),c(`button`,{className:`rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50`,disabled:!t.trim(),onClick:()=>{e.addPackage(t.trim()),n(``)},children:`Add Package`})]})]})}function T(e){let[t,n]=o(``),{pkg:r}=e,i=r.documentTypes.includes(`*/*`);return l(`div`,{className:`my-3 rounded border border-gray-200 bg-white p-4`,children:[l(`div`,{className:`flex items-center justify-between`,children:[l(`div`,{children:[c(`span`,{className:`font-mono font-semibold`,children:r.packageName}),r.managed&&c(`span`,{className:`ml-2 rounded bg-blue-100 px-2 py-0.5 text-xs text-blue-700`,children:`managed`}),r.version&&l(`span`,{className:`ml-2 text-xs text-gray-500`,children:[`v`,r.version]})]}),!r.managed&&c(`button`,{className:`text-sm text-red-500 hover:text-red-700`,onClick:()=>e.removePackage(r.id),children:`Remove`})]}),r.documentTypes.length>0&&c(`ul`,{className:`mt-2 space-y-1`,children:r.documentTypes.map(t=>l(`li`,{className:`flex items-center gap-2 text-sm`,children:[c(`span`,{className:`font-mono`,children:t===`*/*`?`All document models`:t}),c(`button`,{className:`text-xs text-red-400 hover:text-red-600`,onClick:()=>e.removeDocType(r.id,t),children:`x`})]},t))}),!i&&l(`div`,{className:`mt-2 flex items-center gap-2`,children:[c(`input`,{type:`text`,placeholder:`org/document-type`,value:t,onChange:e=>n(e.target.value),onKeyDown:i=>{i.key===`Enter`&&t.trim()&&(e.addDocType(r.id,t.trim()),n(``))},className:`flex-1 rounded border p-1 font-mono text-sm`}),c(`button`,{className:`text-sm text-blue-500 hover:text-blue-700 disabled:opacity-50`,disabled:!t.trim(),onClick:()=>{e.addDocType(r.id,t.trim()),n(``)},children:`+ doc type`})]})]})}function E(e){return c(`span`,{className:`rounded px-2 py-0.5 text-xs ${{Pending:`bg-yellow-100 text-yellow-700`,InProgress:`bg-blue-100 text-blue-700`,Succeeded:`bg-green-100 text-green-700`,Failed:`bg-red-100 text-red-700`}[e.status]??`bg-gray-100 text-gray-700`}`,children:e.status})}export{p as default};
|
|
2
|
+
//# sourceMappingURL=editor-DgkuaKuV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-DgkuaKuV.js","names":[],"sources":["../../../editors/ph-clint-project-editor/editor.tsx"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\nimport { generateId } from 'document-model';\nimport { DocumentToolbar } from '@powerhousedao/design-system/connect';\nimport { useSelectedPhClintProjectDocument, actions } from 'document-models/ph-clint-project';\nimport type { PowerhouseLevel, PowerhousePackage, ExternalSkill, PublishRecord, PhClintProjectState, PhClintMastraFeature, PhClintAgentModel, PhClintAgentProfile, PhClintDeployment } from '../../document-models/ph-clint-project/v1/gen/types.js';\n\nconst POWERHOUSE_LEVELS: { value: PowerhouseLevel; description: string }[] = [\n { value: 'Disabled', description: 'No Powerhouse integration' },\n { value: 'Reactor', description: 'Document model runtime' },\n { value: 'Switchboard', description: 'API service (GraphQL + MCP)' },\n { value: 'Connect', description: 'Web UI for document management' },\n];\n\nfunction TextField(props: { label: string; value: string; placeholder?: string; readOnly?: boolean; compact?: boolean; onCommit: (value: string) => void }) {\n return (\n <label className={props.compact ? 'my-1 block' : 'my-3 block'}>\n <h3 className={props.compact ? 'text-xs text-gray-600' : 'text-base'}>{props.label}</h3>\n <input\n type=\"text\"\n defaultValue={props.value}\n placeholder={props.placeholder}\n readOnly={props.readOnly}\n onBlur={(e) => {\n const next = e.target.value.trim();\n if (next !== props.value) props.onCommit(next);\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter') e.currentTarget.blur();\n }}\n className=\"w-full font-mono\"\n />\n </label>\n );\n}\n\nfunction Toggle(props: { label: string; checked: boolean; disabled?: boolean; hint?: string; onChange: (next: boolean) => void }) {\n return (\n <label className=\"my-2 flex items-center gap-3\">\n <input type=\"checkbox\" checked={props.checked} disabled={props.disabled} onChange={(e) => props.onChange(e.target.checked)} />\n <span className=\"font-semibold\">{props.label}</span>\n {props.hint ? <span className=\"text-sm text-gray-600\">{props.hint}</span> : null}\n </label>\n );\n}\n\ntype Tab = 'spec' | 'agent' | 'powerhouse' | 'skills' | 'publish';\n\nexport default function Editor() {\n const [document, dispatch] = useSelectedPhClintProjectDocument();\n const state = document.state.global;\n const { powerhouse, mastra, routine } = state.features;\n const [activeTab, setActiveTab] = useState<Tab>('spec');\n\n // identity dispatchers\n const setPackageIdentifier = (identifier: string) => dispatch(actions.setPackageIdentifier({ identifier }));\n const setVersion = (version: string) => dispatch(actions.setVersion({ version }));\n const setDescription = (description: string) => dispatch(actions.setDescription({ description }));\n\n // feature dispatchers\n const setPowerhouseLevel = (level: PowerhouseLevel) => dispatch(actions.setPowerhouseLevel({ level }));\n const toggleMastra = (enabled: boolean) => {\n if (enabled) {\n const baseName = state.name || 'my-agent';\n const agentId = `${baseName}-agent`;\n const agentName = `${baseName.charAt(0).toUpperCase()}${baseName.slice(1).replace(/-([a-z])/g, (_, c: string) => ` ${c.toUpperCase()}`)} Agent`;\n dispatch(actions.enableMastra({ agentId, agentName }));\n } else {\n dispatch(actions.disableMastra({ _: true }));\n }\n };\n const toggleRoutine = (enabled: boolean) => {\n if (enabled) dispatch(actions.enableRoutine({ _: true }));\n else dispatch(actions.disableRoutine({ _: true }));\n };\n\n // package dispatchers\n const addPackage = (packageName: string) => dispatch(actions.addPowerhousePackage({ id: generateId(), packageName }));\n const removePackage = (id: string) => dispatch(actions.removePowerhousePackage({ id }));\n const addDocType = (packageId: string, documentType: string) => dispatch(actions.addPackageDocumentType({ packageId, documentType }));\n const removeDocType = (packageId: string, documentType: string) => dispatch(actions.removePackageDocumentType({ packageId, documentType }));\n\n // skill dispatchers\n const addSkill = (name: string, githubUrl: string) => dispatch(actions.addExternalSkill({ id: generateId(), name, githubUrl }));\n const removeSkill = (id: string) => dispatch(actions.removeExternalSkill({ id }));\n\n // publish dispatchers\n const bumpVersion = (version: string) => dispatch(actions.bumpVersion({ version }));\n const publishDev = () => dispatch(actions.publishDev({ id: generateId(), timestamp: new Date().toISOString() }));\n const publishStaging = () => dispatch(actions.publishStaging({ id: generateId(), timestamp: new Date().toISOString() }));\n const publishProduction = () => dispatch(actions.publishProduction({ id: generateId(), timestamp: new Date().toISOString() }));\n\n // agent dispatchers\n const setAgentId = (agentId: string) => dispatch(actions.setAgentId({ agentId }));\n const setAgentName = (agentName: string) => dispatch(actions.setAgentName({ agentName }));\n const addModel = (id: string, isDefault?: boolean) => dispatch(actions.addModel({ id, isDefault }));\n const removeModel = (id: string) => dispatch(actions.removeModel({ id }));\n const setDefaultModel = (id: string) => dispatch(actions.setDefaultModel({ id }));\n const addProfile = (id: string, title: string, content: string, insertBefore?: string) => dispatch(actions.addProfile({ id, title, content, insertBefore }));\n const updateProfile = (id: string, title?: string, content?: string) => dispatch(actions.updateProfile({ id, title, content }));\n const removeProfile = (id: string) => dispatch(actions.removeProfile({ id }));\n const reorderProfiles = (ids: string[], insertBefore: string | null) => dispatch(actions.reorderProfiles({ ids, insertBefore }));\n const setAgentDescription = (description: string) => dispatch(actions.setAgentDescription({ description }));\n const setAgentImage = (image: string) => dispatch(actions.setAgentImage({ image }));\n const clearAgentImage = () => dispatch(actions.clearAgentImage({ _: true }));\n const setEnableChat = (enabled: boolean) => dispatch(actions.setEnableChat({ enabled }));\n\n // deployment dispatchers\n const setProxyEnabled = (enabled: boolean) => dispatch(actions.setProxyEnabled({ enabled }));\n const setObservabilityEnabled = (enabled: boolean) => dispatch(actions.setObservabilityEnabled({ enabled }));\n const addSupportedResource = (resource: string) => dispatch(actions.addSupportedResource({ resource }));\n const removeSupportedResource = (resource: string) => dispatch(actions.removeSupportedResource({ resource }));\n\n const isAboveDisabled = powerhouse !== 'Disabled';\n\n const tabClasses = (tab: Tab) => `px-4 py-2 text-sm font-medium border-b-2 cursor-pointer ${activeTab === tab ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500 hover:text-gray-700'}`;\n\n return (\n <div className=\"mx-auto max-w-4xl bg-gray-50 p-6\">\n <DocumentToolbar />\n\n <div className=\"ph-default-styles\">\n <h2 className=\"mt-4 text-xl font-bold\">ph-clint Project Spec</h2>\n\n <nav className=\"my-4 flex border-b border-gray-200\">\n <button className={tabClasses('spec')} onClick={() => setActiveTab('spec')}>\n CLI\n </button>\n <button className={tabClasses('agent')} onClick={() => setActiveTab('agent')}>\n Agent\n </button>\n <button className={tabClasses('powerhouse')} onClick={() => setActiveTab('powerhouse')}>\n Powerhouse\n </button>\n <button className={tabClasses('skills')} onClick={() => setActiveTab('skills')}>\n Skills\n </button>\n <button className={tabClasses('publish')} onClick={() => setActiveTab('publish')}>\n Publish\n </button>\n </nav>\n\n {activeTab === 'spec' && (\n <SpecTab\n state={state}\n powerhouse={powerhouse}\n mastra={mastra}\n routine={routine}\n isAboveDisabled={isAboveDisabled}\n setPackageIdentifier={setPackageIdentifier}\n setVersion={setVersion}\n setDescription={setDescription}\n setPowerhouseLevel={setPowerhouseLevel}\n toggleMastra={toggleMastra}\n toggleRoutine={toggleRoutine}\n />\n )}\n\n {activeTab === 'agent' && (\n <AgentTab\n mastra={mastra}\n isAboveDisabled={isAboveDisabled}\n setAgentId={setAgentId}\n setAgentName={setAgentName}\n setAgentDescription={setAgentDescription}\n setAgentImage={setAgentImage}\n clearAgentImage={clearAgentImage}\n setEnableChat={setEnableChat}\n addModel={addModel}\n removeModel={removeModel}\n setDefaultModel={setDefaultModel}\n addProfile={addProfile}\n updateProfile={updateProfile}\n removeProfile={removeProfile}\n reorderProfiles={reorderProfiles}\n />\n )}\n\n {activeTab === 'powerhouse' && <PowerhouseTab packages={state.packages} isAboveDisabled={isAboveDisabled} addPackage={addPackage} removePackage={removePackage} addDocType={addDocType} removeDocType={removeDocType} />}\n\n {activeTab === 'skills' && <SkillsTab skills={state.externalSkills} addSkill={addSkill} removeSkill={removeSkill} />}\n\n {activeTab === 'publish' && (\n <PublishTab\n version={state.version}\n publishHistory={state.publishHistory}\n documentHeader={document.header}\n deployment={state.deployment}\n bumpVersion={bumpVersion}\n publishDev={publishDev}\n publishStaging={publishStaging}\n publishProduction={publishProduction}\n setProxyEnabled={setProxyEnabled}\n setObservabilityEnabled={setObservabilityEnabled}\n addSupportedResource={addSupportedResource}\n removeSupportedResource={removeSupportedResource}\n />\n )}\n </div>\n </div>\n );\n}\n\n/* ── Spec Tab ─────────────────────────────────────────────────── */\n\nfunction SpecTab(props: {\n state: PhClintProjectState;\n powerhouse: PowerhouseLevel;\n mastra: PhClintMastraFeature;\n routine: { enabled: boolean };\n isAboveDisabled: boolean;\n setPackageIdentifier: (identifier: string) => void;\n setVersion: (version: string) => void;\n setDescription: (description: string) => void;\n setPowerhouseLevel: (level: PowerhouseLevel) => void;\n toggleMastra: (enabled: boolean) => void;\n toggleRoutine: (enabled: boolean) => void;\n}) {\n const { state } = props;\n const packageIdentifier = `${state.scope ? state.scope + '/' : ''}${state.name ?? ''}`;\n\n return (\n <>\n {/* Identity */}\n <section className=\"my-6\">\n <h3 className=\"text-lg font-semibold\">Identity</h3>\n <div className=\"grid grid-cols-[3fr_1fr] gap-4\">\n <TextField label=\"Package name\" value={packageIdentifier} placeholder=\"@scope/my-tool-cli\" onCommit={props.setPackageIdentifier} />\n <TextField label=\"Version\" value={state.version} placeholder=\"0.1.0\" onCommit={props.setVersion} />\n </div>\n <TextField label=\"Description\" value={state.description} placeholder=\"What this CLI does\" onCommit={props.setDescription} />\n </section>\n\n <hr />\n\n {/* Features */}\n <section className=\"my-6\">\n <h3 className=\"text-lg font-semibold\">Features</h3>\n\n {/* Powerhouse — radio buttons */}\n <div className=\"my-4 rounded border border-gray-200 bg-white p-4\">\n <h4 className=\"text-base font-semibold\">Powerhouse</h4>\n {props.isAboveDisabled && <p className=\"text-sm text-gray-500\">Cannot go back to Disabled once enabled</p>}\n <div className=\"mt-2 space-y-2\">\n {POWERHOUSE_LEVELS.map((level, i) => (\n <label key={level.value} className=\"flex items-start gap-2\">\n {i > 0 && <div className=\"absolute -mt-3 ml-[7px] h-3 border-l border-gray-300\" />}\n <input type=\"radio\" name=\"powerhouse-level\" checked={props.powerhouse === level.value} disabled={props.isAboveDisabled && level.value === 'Disabled'} onChange={() => props.setPowerhouseLevel(level.value)} className=\"mt-0.5\" />\n <div>\n <span className=\"font-medium\">{level.value}</span>\n <span className=\"ml-2 text-sm text-gray-500\">{level.description}</span>\n </div>\n </label>\n ))}\n </div>\n </div>\n\n <div className=\"my-4 rounded border border-gray-200 bg-white p-4\">\n <Toggle label=\"Mastra\" checked={props.mastra.enabled} hint=\"AI agent framework\" onChange={props.toggleMastra} />\n </div>\n\n <div className=\"my-4 rounded border border-gray-200 bg-white p-4\">\n <Toggle label=\"Routine loop\" checked={props.routine.enabled} hint=\"tick-based execution loop with triggers\" onChange={props.toggleRoutine} />\n </div>\n </section>\n </>\n );\n}\n\n/* ── Powerhouse Tab ──────────────────────────────────────────── */\n\nfunction PowerhouseTab(props: {\n packages: PowerhousePackage[];\n isAboveDisabled: boolean;\n addPackage: (packageName: string) => void;\n removePackage: (id: string) => void;\n addDocType: (packageId: string, documentType: string) => void;\n removeDocType: (packageId: string, documentType: string) => void;\n}) {\n if (!props.isAboveDisabled) {\n return (\n <section className=\"my-6 rounded border border-dashed border-gray-300 bg-white p-8 text-center text-gray-500\">\n <h3 className=\"text-lg font-semibold\">Powerhouse</h3>\n <p className=\"mt-2\">Enable Powerhouse in the Spec tab (set level to Reactor or above) to manage packages.</p>\n </section>\n );\n }\n\n return <PackagesSection packages={props.packages} addPackage={props.addPackage} removePackage={props.removePackage} addDocType={props.addDocType} removeDocType={props.removeDocType} />;\n}\n\n/* ── Agent Tab ────────────────────────────────────────────────── */\n\nfunction AgentTab(props: {\n mastra: PhClintMastraFeature;\n isAboveDisabled: boolean;\n setAgentId: (agentId: string) => void;\n setAgentName: (agentName: string) => void;\n setAgentDescription: (description: string) => void;\n setAgentImage: (image: string) => void;\n clearAgentImage: () => void;\n setEnableChat: (enabled: boolean) => void;\n addModel: (id: string, isDefault?: boolean) => void;\n removeModel: (id: string) => void;\n setDefaultModel: (id: string) => void;\n addProfile: (id: string, title: string, content: string, insertBefore?: string) => void;\n updateProfile: (id: string, title?: string, content?: string) => void;\n removeProfile: (id: string) => void;\n reorderProfiles: (ids: string[], insertBefore: string | null) => void;\n}) {\n const { mastra } = props;\n\n if (!mastra.enabled) {\n return (\n <section className=\"my-6 rounded border border-dashed border-gray-300 bg-white p-8 text-center text-gray-500\">\n <h3 className=\"text-lg font-semibold\">Agent</h3>\n <p className=\"mt-2\">Enable Mastra in the Spec tab to configure the agent.</p>\n </section>\n );\n }\n\n return (\n <>\n {/* Agent Identity */}\n <section className=\"my-6\">\n <div style={{ display: 'flex', gap: '1.5rem' }}>\n <div style={{ flexShrink: 0, width: '7rem' }}>\n <AgentImageField image={mastra.agentImage ?? null} onSetImage={props.setAgentImage} onClearImage={props.clearAgentImage} />\n </div>\n <div style={{ flex: 1, minWidth: 0 }}>\n <div className=\"grid grid-cols-[1fr_2fr] gap-4\">\n <TextField compact label=\"Agent ID\" value={mastra.agentId ?? ''} placeholder=\"my-agent\" onCommit={props.setAgentId} />\n <TextField compact label=\"Agent Name\" value={mastra.agentName ?? ''} placeholder=\"My Agent\" onCommit={props.setAgentName} />\n </div>\n <TextField compact label=\"Agent Description\" value={mastra.agentDescription ?? ''} placeholder=\"A brief description of what this agent does\" onCommit={props.setAgentDescription} />\n </div>\n </div>\n </section>\n\n <hr />\n\n {/* Models */}\n <ModelsSection models={mastra.models} addModel={props.addModel} removeModel={props.removeModel} setDefaultModel={props.setDefaultModel} />\n\n <hr />\n\n {/* Profiles */}\n <ProfilesSection profiles={mastra.profiles} addProfile={props.addProfile} updateProfile={props.updateProfile} removeProfile={props.removeProfile} reorderProfiles={props.reorderProfiles} />\n\n <hr />\n\n {/* Common */}\n <section className=\"my-6\">\n <h3 className=\"text-lg font-semibold\">Common</h3>\n <div className=\"my-3 rounded border border-gray-200 bg-white p-4\">\n <Toggle\n label=\"Enable Chat\"\n checked={mastra.common.enableChat}\n disabled={!props.isAboveDisabled}\n hint={props.isAboveDisabled ? 'Chat session integration via clint-common' : 'Requires Powerhouse to be enabled'}\n onChange={props.setEnableChat}\n />\n </div>\n </section>\n </>\n );\n}\n\nfunction AgentImageField(props: { image: string | null; onSetImage: (dataUrl: string) => void; onClearImage: () => void }) {\n const [isDragOver, setIsDragOver] = useState(false);\n const dragDepthRef = useRef(0);\n\n const handleFile = (file: File) => {\n if (!file.type.startsWith('image/')) return;\n const reader = new FileReader();\n reader.onload = () => {\n if (typeof reader.result === 'string') props.onSetImage(reader.result);\n };\n reader.readAsDataURL(file);\n };\n\n // Must stopPropagation on all drag events to prevent Connect's DropZone\n // from intercepting and blocking non-.phd file drops (see editor-drag-drop.md)\n const onDragOver = useCallback((e: React.DragEvent) => {\n if (e.dataTransfer.types.includes('Files')) {\n e.preventDefault();\n e.stopPropagation();\n }\n }, []);\n\n const onDragEnter = useCallback((e: React.DragEvent) => {\n if (e.dataTransfer.types.includes('Files')) {\n e.stopPropagation();\n dragDepthRef.current += 1;\n if (dragDepthRef.current === 1) setIsDragOver(true);\n }\n }, []);\n\n const onDragLeave = useCallback((e: React.DragEvent) => {\n if (e.dataTransfer.types.includes('Files')) {\n e.stopPropagation();\n dragDepthRef.current = Math.max(0, dragDepthRef.current - 1);\n if (dragDepthRef.current === 0) setIsDragOver(false);\n }\n }, []);\n\n const onDrop = useCallback((e: React.DragEvent) => {\n if (e.dataTransfer.types.includes('Files')) {\n e.preventDefault();\n e.stopPropagation();\n dragDepthRef.current = 0;\n setIsDragOver(false);\n const file = e.dataTransfer.files[0];\n if (file) handleFile(file);\n }\n }, []);\n\n const SIZE = '7rem';\n\n return (\n <div style={{ width: SIZE, height: SIZE, flexShrink: 0 }} className=\"relative my-3\">\n {props.image ? (\n <>\n <img src={props.image} alt=\"Agent\" style={{ width: SIZE, height: SIZE }} className=\"rounded border border-gray-200 object-cover\" />\n <div className=\"mt-1 flex justify-center gap-1\">\n <label className=\"cursor-pointer rounded bg-gray-100 px-2 py-0.5 text-xs hover:bg-gray-200\">\n Replace\n <input\n type=\"file\"\n accept=\"image/*\"\n className=\"hidden\"\n onChange={(e) => {\n if (e.target.files?.[0]) handleFile(e.target.files[0]);\n }}\n />\n </label>\n <button className=\"rounded bg-gray-100 px-2 py-0.5 text-xs text-red-600 hover:bg-gray-200\" onClick={props.onClearImage}>\n Remove\n </button>\n </div>\n </>\n ) : (\n <div\n style={{ width: SIZE, height: SIZE }}\n className={`flex flex-col items-center justify-center rounded border-2 border-dashed text-center ${isDragOver ? 'border-blue-400 bg-blue-50' : 'border-gray-300 bg-white'}`}\n onDragOver={onDragOver}\n onDragEnter={onDragEnter}\n onDragLeave={onDragLeave}\n onDrop={onDrop}\n >\n <label className=\"cursor-pointer p-2 text-xs text-gray-500 hover:text-blue-600\">\n Drop image or click\n <input\n type=\"file\"\n accept=\"image/*\"\n className=\"hidden\"\n onChange={(e) => {\n if (e.target.files?.[0]) handleFile(e.target.files[0]);\n }}\n />\n </label>\n </div>\n )}\n </div>\n );\n}\n\nfunction ModelsSection(props: { models: PhClintAgentModel[]; addModel: (id: string, isDefault?: boolean) => void; removeModel: (id: string) => void; setDefaultModel: (id: string) => void }) {\n const [newModelId, setNewModelId] = useState('');\n\n const handleAdd = () => {\n const id = newModelId.trim();\n if (id) {\n props.addModel(id);\n setNewModelId('');\n }\n };\n\n return (\n <section className=\"my-6\">\n <h3 className=\"text-lg font-semibold\">Models</h3>\n <p className=\"text-sm text-gray-600\">Provider/model format (e.g. anthropic/claude-sonnet-4-5). Exactly one must be default.</p>\n\n {props.models.length > 0 && (\n <table className=\"mt-3 w-full text-sm\">\n <thead>\n <tr className=\"border-b text-left text-gray-500\">\n <th className=\"py-1\">Default</th>\n <th className=\"py-1\">Model</th>\n <th className=\"py-1\">Provider</th>\n <th className=\"py-1\" />\n </tr>\n </thead>\n <tbody>\n {props.models.map((m) => {\n const provider = m.id.split('/')[0];\n return (\n <tr key={m.id} className=\"border-b border-gray-100\">\n <td className=\"py-2\">\n <input type=\"radio\" name=\"default-model\" checked={m.isDefault} onChange={() => props.setDefaultModel(m.id)} />\n </td>\n <td className=\"py-2 font-mono\">{m.id}</td>\n <td className=\"py-2 text-gray-500\">{provider}</td>\n <td className=\"py-2 text-right\">\n <button className=\"text-red-500 hover:text-red-700\" onClick={() => props.removeModel(m.id)}>\n Remove\n </button>\n </td>\n </tr>\n );\n })}\n </tbody>\n </table>\n )}\n\n <div className=\"mt-3 flex items-center gap-2\">\n <input\n type=\"text\"\n placeholder=\"provider/model-name\"\n value={newModelId}\n onChange={(e) => setNewModelId(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') handleAdd();\n }}\n className=\"flex-1 rounded border p-2 font-mono text-sm\"\n />\n <button className=\"rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50\" disabled={!newModelId.trim()} onClick={handleAdd}>\n Add Model\n </button>\n </div>\n </section>\n );\n}\n\nfunction ProfilesSection(props: {\n profiles: PhClintAgentProfile[];\n addProfile: (id: string, title: string, content: string, insertBefore?: string) => void;\n updateProfile: (id: string, title?: string, content?: string) => void;\n removeProfile: (id: string) => void;\n reorderProfiles: (ids: string[], insertBefore: string | null) => void;\n}) {\n const [showAddForm, setShowAddForm] = useState(false);\n const [newId, setNewId] = useState('');\n const [newTitle, setNewTitle] = useState('');\n\n const handleAdd = () => {\n const id = newId.trim();\n const title = newTitle.trim();\n if (id && title) {\n props.addProfile(id, title, '');\n setNewId('');\n setNewTitle('');\n setShowAddForm(false);\n }\n };\n\n const moveUp = (index: number) => {\n if (index === 0) return;\n const id = props.profiles[index].id;\n const beforeId = props.profiles[index - 1].id;\n props.reorderProfiles([id], beforeId);\n };\n\n const moveDown = (index: number) => {\n if (index >= props.profiles.length - 1) return;\n const id = props.profiles[index].id;\n const afterNext = index + 2 < props.profiles.length ? props.profiles[index + 2].id : null;\n props.reorderProfiles([id], afterNext);\n };\n\n return (\n <section className=\"my-6\">\n <h3 className=\"text-lg font-semibold\">Agent Profiles</h3>\n <p className=\"text-sm text-gray-600\">Markdown sections that compose into the agent's instructions. Order matters.</p>\n\n {props.profiles.map((profile, i) => (\n <div key={profile.id} className=\"my-3 rounded border border-gray-200 bg-white p-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <span className=\"rounded bg-gray-100 px-2 py-0.5 font-mono text-xs text-gray-500\">{profile.id}</span>\n <input\n type=\"text\"\n defaultValue={profile.title}\n onBlur={(e) => {\n const next = e.target.value.trim();\n if (next && next !== profile.title) props.updateProfile(profile.id, next);\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter') e.currentTarget.blur();\n }}\n className=\"border-b border-transparent font-semibold hover:border-gray-300 focus:border-blue-500\"\n />\n </div>\n <div className=\"flex items-center gap-1\">\n <button className=\"px-1 text-gray-400 hover:text-gray-600 disabled:opacity-30\" disabled={i === 0} onClick={() => moveUp(i)} title=\"Move up\">\n ↑\n </button>\n <button className=\"px-1 text-gray-400 hover:text-gray-600 disabled:opacity-30\" disabled={i === props.profiles.length - 1} onClick={() => moveDown(i)} title=\"Move down\">\n ↓\n </button>\n <button className=\"ml-2 text-sm text-red-500 hover:text-red-700\" onClick={() => props.removeProfile(profile.id)}>\n Remove\n </button>\n </div>\n </div>\n <textarea\n defaultValue={profile.content}\n onBlur={(e) => {\n const next = e.target.value;\n if (next !== profile.content) props.updateProfile(profile.id, undefined, next);\n }}\n placeholder=\"Markdown content for this profile section...\"\n rows={4}\n className=\"mt-2 w-full rounded border border-gray-200 p-2 font-mono text-sm\"\n />\n </div>\n ))}\n\n {showAddForm ? (\n <div className=\"my-3 rounded border border-blue-200 bg-blue-50 p-4\">\n <div className=\"flex items-center gap-2\">\n <input type=\"text\" placeholder=\"section-id\" value={newId} onChange={(e) => setNewId(e.target.value)} className=\"w-40 rounded border p-2 font-mono text-sm\" />\n <input\n type=\"text\"\n placeholder=\"Section Title\"\n value={newTitle}\n onChange={(e) => setNewTitle(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') handleAdd();\n }}\n className=\"flex-1 rounded border p-2 text-sm\"\n />\n <button className=\"rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50\" disabled={!newId.trim() || !newTitle.trim()} onClick={handleAdd}>\n Add\n </button>\n <button\n className=\"text-sm text-gray-500 hover:text-gray-700\"\n onClick={() => {\n setShowAddForm(false);\n setNewId('');\n setNewTitle('');\n }}\n >\n Cancel\n </button>\n </div>\n </div>\n ) : (\n <button className=\"mt-3 rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600\" onClick={() => setShowAddForm(true)}>\n + Add Profile\n </button>\n )}\n </section>\n );\n}\n\n/* ── Skills Tab ───────────────────────────────────────────────── */\n\nfunction SkillsTab(props: { skills: ExternalSkill[]; addSkill: (name: string, githubUrl: string) => void; removeSkill: (id: string) => void }) {\n return (\n <>\n {/* Skill Templates placeholder */}\n <section className=\"my-6 rounded border border-dashed border-gray-300 bg-white p-8 text-center text-gray-500\">\n <h3 className=\"text-lg font-semibold\">Skill Templates</h3>\n <p className=\"mt-2\">Coming soon</p>\n </section>\n\n <hr />\n\n {/* External Skills — moved from Spec tab */}\n <ExternalSkillsSection skills={props.skills} addSkill={props.addSkill} removeSkill={props.removeSkill} />\n </>\n );\n}\n\nfunction ExternalSkillsSection(props: { skills: ExternalSkill[]; addSkill: (name: string, githubUrl: string) => void; removeSkill: (id: string) => void }) {\n const [newName, setNewName] = useState('');\n const [newUrl, setNewUrl] = useState('');\n\n const handleAdd = () => {\n if (newName.trim() && newUrl.trim()) {\n props.addSkill(newName.trim(), newUrl.trim());\n setNewName('');\n setNewUrl('');\n }\n };\n\n return (\n <section className=\"my-6\">\n <h3 className=\"text-lg font-semibold\">External Skills</h3>\n <p className=\"text-sm text-gray-600\">Skills from the skills.sh ecosystem, installed via GitHub URL.</p>\n\n {props.skills.length > 0 && (\n <ul className=\"mt-3 space-y-2\">\n {props.skills.map((skill) => (\n <li key={skill.id} className=\"flex items-center justify-between rounded border border-gray-200 bg-white p-3\">\n <div>\n <span className=\"font-mono font-semibold\">{skill.name}</span>\n <span className=\"ml-2 text-sm text-gray-500\">{skill.githubUrl}</span>\n </div>\n <button className=\"text-sm text-red-500 hover:text-red-700\" onClick={() => props.removeSkill(skill.id)}>\n Remove\n </button>\n </li>\n ))}\n </ul>\n )}\n\n <div className=\"mt-3 flex items-center gap-2\">\n <input type=\"text\" placeholder=\"skill-name\" value={newName} onChange={(e) => setNewName(e.target.value)} className=\"w-40 rounded border p-2 font-mono text-sm\" />\n <input\n type=\"text\"\n placeholder=\"https://github.com/org/repo\"\n value={newUrl}\n onChange={(e) => setNewUrl(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') handleAdd();\n }}\n className=\"flex-1 rounded border p-2 font-mono text-sm\"\n />\n <button className=\"rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50\" disabled={!newName.trim() || !newUrl.trim()} onClick={handleAdd}>\n Add Skill\n </button>\n </div>\n </section>\n );\n}\n\n/* ── Publish Tab ──────────────────────────────────────────────── */\n\nfunction PublishTab(props: {\n version: string;\n publishHistory: PublishRecord[];\n documentHeader: { id: string; documentType: string };\n deployment: PhClintDeployment;\n bumpVersion: (version: string) => void;\n publishDev: () => void;\n publishStaging: () => void;\n publishProduction: () => void;\n setProxyEnabled: (enabled: boolean) => void;\n setObservabilityEnabled: (enabled: boolean) => void;\n addSupportedResource: (resource: string) => void;\n removeSupportedResource: (resource: string) => void;\n}) {\n const recentHistory = props.publishHistory.slice(-5).reverse();\n\n return (\n <>\n <section className=\"my-6\">\n <h3 className=\"text-lg font-semibold\">Publishing</h3>\n\n <div className=\"my-3 rounded border border-gray-200 bg-white p-4\">\n <div className=\"flex items-center gap-4\">\n <span className=\"text-sm text-gray-600\">Current version:</span>\n <span className=\"font-mono font-semibold\">{props.version}</span>\n </div>\n\n <div className=\"mt-4 flex items-center gap-2\">\n <button className=\"rounded bg-gray-600 px-3 py-2 text-sm text-white hover:bg-gray-700\" onClick={props.publishDev}>\n Publish Dev\n </button>\n <button className=\"rounded bg-amber-600 px-3 py-2 text-sm text-white hover:bg-amber-700\" onClick={props.publishStaging}>\n Publish Staging\n </button>\n <button className=\"rounded bg-green-600 px-3 py-2 text-sm text-white hover:bg-green-700\" onClick={props.publishProduction}>\n Publish Production\n </button>\n </div>\n </div>\n\n {recentHistory.length > 0 && (\n <div className=\"mt-3\">\n <h4 className=\"text-sm font-semibold text-gray-600\">Recent publish history</h4>\n <ul className=\"mt-2 space-y-1\">\n {recentHistory.map((r) => (\n <li key={r.id} className=\"flex items-center gap-3 text-sm\">\n <StatusBadge status={r.status} />\n <span className=\"font-mono\">{r.version}</span>\n <span className=\"text-gray-500\">{r.tag}</span>\n <span className=\"text-gray-400\">{r.timestamp}</span>\n </li>\n ))}\n </ul>\n </div>\n )}\n </section>\n\n <hr />\n\n {/* Deployment */}\n <DeploymentSection\n deployment={props.deployment}\n setProxyEnabled={props.setProxyEnabled}\n setObservabilityEnabled={props.setObservabilityEnabled}\n addSupportedResource={props.addSupportedResource}\n removeSupportedResource={props.removeSupportedResource}\n />\n\n <hr />\n\n {/* Document Metadata */}\n <section className=\"my-6 grid grid-cols-2 gap-x-8\">\n <label>\n <h3 className=\"text-base\">Document ID</h3>\n <input type=\"text\" value={props.documentHeader.id} readOnly className=\"font-mono\" />\n </label>\n <label>\n <h3 className=\"text-base\">Type</h3>\n <input type=\"text\" value={props.documentHeader.documentType} readOnly />\n </label>\n </section>\n </>\n );\n}\n\n/* ── Deployment Section ───────────────────────────────────────── */\n\nconst KNOWN_RESOURCES = ['vetra-agent-s', 'vetra-agent-m', 'vetra-agent-l', 'vetra-agent-xl', 'vetra-agent-xxl'];\n\nfunction DeploymentSection(props: {\n deployment: PhClintDeployment;\n setProxyEnabled: (enabled: boolean) => void;\n setObservabilityEnabled: (enabled: boolean) => void;\n addSupportedResource: (resource: string) => void;\n removeSupportedResource: (resource: string) => void;\n}) {\n const [newResource, setNewResource] = useState('');\n const { deployment } = props;\n const customResources = deployment.supportedResources.filter((r) => !KNOWN_RESOURCES.includes(r));\n\n const handleAddCustom = () => {\n const resource = newResource.trim();\n if (resource) {\n props.addSupportedResource(resource);\n setNewResource('');\n }\n };\n\n return (\n <section className=\"my-6\">\n <h3 className=\"text-lg font-semibold\">Deployment</h3>\n\n <div className=\"my-3 rounded border border-gray-200 bg-white p-4 space-y-3\">\n <Toggle label=\"Proxy\" checked={deployment.proxyEnabled} hint=\"Run a reverse proxy that exposes all service endpoints through a single port\" onChange={props.setProxyEnabled} />\n <Toggle\n label=\"Observability\"\n checked={deployment.observabilityEnabled}\n hint=\"Wire @powerhousedao/ph-clint-observability into the generated CLI. End-user opts in at runtime; env vars: {CLINAME}_SENTRY_DSN, {CLINAME}_OTEL_EXPORTER_OTLP_ENDPOINT.\"\n onChange={props.setObservabilityEnabled}\n />\n </div>\n\n <div className=\"my-3 rounded border border-gray-200 bg-white p-4\">\n <h4 className=\"text-base font-semibold\">Supported Resources</h4>\n <p className=\"text-sm text-gray-600\">Resource tiers this project supports.</p>\n\n <div className=\"mt-3 space-y-1\">\n {KNOWN_RESOURCES.map((resource) => {\n const checked = deployment.supportedResources.includes(resource);\n return (\n <label key={resource} className=\"flex items-center gap-2\">\n <input\n type=\"checkbox\"\n checked={checked}\n onChange={() => {\n if (checked) props.removeSupportedResource(resource);\n else props.addSupportedResource(resource);\n }}\n />\n <span className=\"font-mono text-sm\">{resource}</span>\n </label>\n );\n })}\n </div>\n\n {customResources.length > 0 && (\n <div className=\"mt-3 border-t border-gray-100 pt-3\">\n <h5 className=\"text-sm font-medium text-gray-600\">Custom resources</h5>\n <ul className=\"mt-1 space-y-1\">\n {customResources.map((resource) => (\n <li key={resource} className=\"flex items-center gap-2 text-sm\">\n <span className=\"font-mono\">{resource}</span>\n <button className=\"text-xs text-red-400 hover:text-red-600\" onClick={() => props.removeSupportedResource(resource)}>\n x\n </button>\n </li>\n ))}\n </ul>\n </div>\n )}\n\n <div className=\"mt-3 flex items-center gap-2\">\n <input\n type=\"text\"\n placeholder=\"custom-resource\"\n value={newResource}\n onChange={(e) => setNewResource(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter') handleAddCustom();\n }}\n className=\"flex-1 rounded border p-2 font-mono text-sm\"\n />\n <button className=\"rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50\" disabled={!newResource.trim()} onClick={handleAddCustom}>\n Add\n </button>\n </div>\n </div>\n </section>\n );\n}\n\n/* ── Shared Components ────────────────────────────────────────── */\n\nfunction PackagesSection(props: {\n packages: PowerhousePackage[];\n addPackage: (packageName: string) => void;\n removePackage: (id: string) => void;\n addDocType: (packageId: string, documentType: string) => void;\n removeDocType: (packageId: string, documentType: string) => void;\n}) {\n const [newPkgName, setNewPkgName] = useState('');\n\n return (\n <section className=\"my-6\">\n <h3 className=\"text-lg font-semibold\">Powerhouse Packages</h3>\n <p className=\"text-sm text-gray-600\">Reactor packages and their document types. Managed packages are framework-controlled.</p>\n\n {props.packages.map((pkg) => (\n <PackageCard key={pkg.id} pkg={pkg} addDocType={props.addDocType} removeDocType={props.removeDocType} removePackage={props.removePackage} />\n ))}\n\n <div className=\"mt-4 flex items-center gap-2\">\n <input\n type=\"text\"\n placeholder=\"@org/package-name\"\n value={newPkgName}\n onChange={(e) => setNewPkgName(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && newPkgName.trim()) {\n props.addPackage(newPkgName.trim());\n setNewPkgName('');\n }\n }}\n className=\"flex-1 rounded border p-2 font-mono text-sm\"\n />\n <button\n className=\"rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50\"\n disabled={!newPkgName.trim()}\n onClick={() => {\n props.addPackage(newPkgName.trim());\n setNewPkgName('');\n }}\n >\n Add Package\n </button>\n </div>\n </section>\n );\n}\n\nfunction PackageCard(props: { pkg: PowerhousePackage; addDocType: (packageId: string, documentType: string) => void; removeDocType: (packageId: string, documentType: string) => void; removePackage: (id: string) => void }) {\n const [newDocType, setNewDocType] = useState('');\n const { pkg } = props;\n const hasWildcard = pkg.documentTypes.includes('*/*');\n\n return (\n <div className=\"my-3 rounded border border-gray-200 bg-white p-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <span className=\"font-mono font-semibold\">{pkg.packageName}</span>\n {pkg.managed && <span className=\"ml-2 rounded bg-blue-100 px-2 py-0.5 text-xs text-blue-700\">managed</span>}\n {pkg.version && <span className=\"ml-2 text-xs text-gray-500\">v{pkg.version}</span>}\n </div>\n {!pkg.managed && (\n <button className=\"text-sm text-red-500 hover:text-red-700\" onClick={() => props.removePackage(pkg.id)}>\n Remove\n </button>\n )}\n </div>\n\n {pkg.documentTypes.length > 0 && (\n <ul className=\"mt-2 space-y-1\">\n {pkg.documentTypes.map((dt) => (\n <li key={dt} className=\"flex items-center gap-2 text-sm\">\n <span className=\"font-mono\">{dt === '*/*' ? 'All document models' : dt}</span>\n <button className=\"text-xs text-red-400 hover:text-red-600\" onClick={() => props.removeDocType(pkg.id, dt)}>\n x\n </button>\n </li>\n ))}\n </ul>\n )}\n\n {!hasWildcard && (\n <div className=\"mt-2 flex items-center gap-2\">\n <input\n type=\"text\"\n placeholder=\"org/document-type\"\n value={newDocType}\n onChange={(e) => setNewDocType(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && newDocType.trim()) {\n props.addDocType(pkg.id, newDocType.trim());\n setNewDocType('');\n }\n }}\n className=\"flex-1 rounded border p-1 font-mono text-sm\"\n />\n <button\n className=\"text-sm text-blue-500 hover:text-blue-700 disabled:opacity-50\"\n disabled={!newDocType.trim()}\n onClick={() => {\n props.addDocType(pkg.id, newDocType.trim());\n setNewDocType('');\n }}\n >\n + doc type\n </button>\n </div>\n )}\n </div>\n );\n}\n\nfunction StatusBadge(props: { status: string }) {\n const colors: Record<string, string> = {\n Pending: 'bg-yellow-100 text-yellow-700',\n InProgress: 'bg-blue-100 text-blue-700',\n Succeeded: 'bg-green-100 text-green-700',\n Failed: 'bg-red-100 text-red-700',\n };\n return <span className={`rounded px-2 py-0.5 text-xs ${colors[props.status] ?? 'bg-gray-100 text-gray-700'}`}>{props.status}</span>;\n}\n"],"mappings":"wRAMA,IAAM,EAAuE,CAC3E,CAAE,MAAO,WAAY,YAAa,4BAA6B,CAC/D,CAAE,MAAO,UAAW,YAAa,yBAA0B,CAC3D,CAAE,MAAO,cAAe,YAAa,8BAA+B,CACpE,CAAE,MAAO,UAAW,YAAa,iCAAkC,CACpE,CAED,SAAS,EAAU,EAAyI,CAC1J,OACE,EAAC,QAAD,CAAO,UAAW,EAAM,QAAU,aAAe,sBAAjD,CACE,EAAC,KAAD,CAAI,UAAW,EAAM,QAAU,wBAA0B,qBAAc,EAAM,MAAW,CAAA,CACxF,EAAC,QAAD,CACE,KAAK,OACL,aAAc,EAAM,MACpB,YAAa,EAAM,YACnB,SAAU,EAAM,SAChB,OAAS,GAAM,CACb,IAAM,EAAO,EAAE,OAAO,MAAM,MAAM,CAC9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