@powerhousedao/ph-clint-app 0.1.0-dev.93 → 0.1.0-dev.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/connect/assets/{ClearStorageModal-CXoNWmRe-CfudY7gP.js → ClearStorageModal-CXoNWmRe-C0PKw6Ua.js} +2 -2
  2. package/dist/connect/assets/{ClearStorageModal-CXoNWmRe-CfudY7gP.js.map → ClearStorageModal-CXoNWmRe-C0PKw6Ua.js.map} +1 -1
  3. package/dist/connect/assets/{DebugSettingsModal-5SDhy5gt-Oc_wrZVo.js → DebugSettingsModal-5SDhy5gt-xwOLh7V7.js} +2 -2
  4. package/dist/connect/assets/{DebugSettingsModal-5SDhy5gt-Oc_wrZVo.js.map → DebugSettingsModal-5SDhy5gt-xwOLh7V7.js.map} +1 -1
  5. package/dist/connect/assets/{InspectorModal-BsSihzuc-adr3q93h.js → InspectorModal-BsSihzuc-Y0F2Af5R.js} +2 -2
  6. package/dist/connect/assets/{InspectorModal-BsSihzuc-adr3q93h.js.map → InspectorModal-BsSihzuc-Y0F2Af5R.js.map} +1 -1
  7. package/dist/connect/assets/{SettingsModal-S_A5qf95-DqxCHnLy.js → SettingsModal-S_A5qf95-BsCVW2De.js} +2 -2
  8. package/dist/connect/assets/{SettingsModal-S_A5qf95-DqxCHnLy.js.map → SettingsModal-S_A5qf95-BsCVW2De.js.map} +1 -1
  9. package/dist/connect/assets/{components-ByEUkO4U-DHdzb1cM.js → components-ByEUkO4U-DsSCto_6.js} +4 -4
  10. package/dist/connect/assets/{components-ByEUkO4U-DHdzb1cM.js.map → components-ByEUkO4U-DsSCto_6.js.map} +1 -1
  11. package/dist/connect/assets/{connect.config-Bt4pvvWV-TF7SRwB1.js → connect.config-Bt4pvvWV-CJUIVtPH.js} +2 -2
  12. package/dist/connect/assets/{connect.config-Bt4pvvWV-TF7SRwB1.js.map → connect.config-Bt4pvvWV-CJUIVtPH.js.map} +1 -1
  13. package/dist/connect/assets/{index-Bgr9U9X9.js → index-xE_aP4qB.js} +3 -3
  14. package/dist/connect/assets/{index-Bgr9U9X9.js.map → index-xE_aP4qB.js.map} +1 -1
  15. package/dist/connect/assets/{load-BWibkoFV-jV3p7MXQ.js → load-BWibkoFV-s_Cv5VAt.js} +2 -2
  16. package/dist/connect/assets/{load-BWibkoFV-jV3p7MXQ.js.map → load-BWibkoFV-s_Cv5VAt.js.map} +1 -1
  17. package/dist/connect/assets/{module-bwULLGwn.js → module-DqKIwD3c.js} +2 -2
  18. package/dist/connect/assets/{module-bwULLGwn.js.map → module-DqKIwD3c.js.map} +1 -1
  19. package/dist/connect/assets/{pglite-seed-BWk7yOwr-BjLA_ztF.js → pglite-seed-BWk7yOwr-QkSBuIAk.js} +2 -2
  20. package/dist/connect/assets/{pglite-seed-BWk7yOwr-BjLA_ztF.js.map → pglite-seed-BWk7yOwr-QkSBuIAk.js.map} +1 -1
  21. package/dist/connect/assets/{reactor-BxNvHOKC-DEqXBEvK.js → reactor-BxNvHOKC-BNFTmKjy.js} +2 -2
  22. package/dist/connect/assets/{reactor-BxNvHOKC-DEqXBEvK.js.map → reactor-BxNvHOKC-BNFTmKjy.js.map} +1 -1
  23. package/dist/connect/assets/{registerServiceWorker-D9l1kja7-DG9mrLlt.js → registerServiceWorker-D9l1kja7-D0BQ1ZVO.js} +2 -2
  24. package/dist/connect/assets/{registerServiceWorker-D9l1kja7-DG9mrLlt.js.map → registerServiceWorker-D9l1kja7-D0BQ1ZVO.js.map} +1 -1
  25. package/dist/connect/index.html +1 -1
  26. package/dist/connect/powerhouse.config.json +1 -1
  27. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{O as e}from"./dist-t-ezfpxv.js";import{n as t,o as n,s as r}from"./runtime-config-DL3QjcfM-D9g4VFtY.js";import{a as i}from"./dist-Cb4AoJ-8.js";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`1929e5c6-2fcf-504d-9b33-4790264371b5`)}catch{}})();var a=n({processEnv:{BASE_URL:`/`,DEV:!1,MODE:`production`,PH_CONNECT_DIFF_ANALYTICS_ENABLED:`false`,PH_CONNECT_DRIVE_ANALYTICS_ENABLED:`true`,PH_CONNECT_EXTERNAL_ANALYTICS_PROCESSORS_ENABLED:`true`,PH_CONNECT_OPENPANEL_TRACK_OPERATIONS:`true`,PH_CONNECT_OPENPANEL_TRACK_UI_EVENTS:`true`,PH_CONNECT_VERSION:`unknown`,PROD:!0,SSR:!1}}),o=t().connect;function s(e){return e.endsWith(`/`)?e:e+`/`}function c(){return typeof globalThis<`u`&&globalThis.__PH_DYNAMIC_BASE__?`/`:o.app?.basePath||`/`}function l(){return{allowList:void 0,allowedDocumentTypes:[],isDragAndDropEnabled:!0,isEditorDebugModeEnabled:!1,isEditorReadModeEnabled:!1,isExternalControlsEnabled:!1,version:a.PH_CONNECT_VERSION,logLevel:o.app?.logLevel,requiresHardRefresh:!0,warnOutdatedApp:!1,studioMode:!1,versionCheckInterval:3600*1e3,cliVersion:a.PH_CONNECT_CLI_VERSION,fileUploadOperationsChunkSize:50,gaTrackingId:void 0,defaultDrivesUrl:o.drives?.defaultDrives?.[0]?.url,drivesPreserveStrategy:o.drives?.preserveStrategy,enabledEditors:void 0,disabledEditors:[`powerhouse/document-drive`],isExternalProcessorsEnabled:!0,isAnalyticsEnabled:!1,isAnalyticsExternalProcessorsEnabled:a.PH_CONNECT_EXTERNAL_ANALYTICS_PROCESSORS_ENABLED,analyticsDatabaseName:void 0,isRelationalProcessorsEnabled:!0,isExternalRelationalProcessorsEnabled:!0,renownUrl:o.renown?.url,renownNetworkId:o.renown?.networkId,renownChainId:o.renown?.chainId,sentryRelease:`0.1.0-dev.93`,sentryDsn:o.sentry?.dsn??void 0,sentryEnv:o.sentry?.env,isDiffAnalyticsEnabled:a.PH_CONNECT_DIFF_ANALYTICS_ENABLED,isDriveAnalyticsEnabled:a.PH_CONNECT_DRIVE_ANALYTICS_ENABLED,isPublicDrivesEnabled:o.drives?.sections?.remote?.enabled,isCloudDrivesEnabled:o.drives?.sections?.remote?.enabled??!0,isLocalDrivesEnabled:o.drives?.sections?.local?.enabled,isSentryTracingEnabled:o.sentry?.tracing,isDocumentModelSelectionSettingsEnabled:!1,isAddDriveEnabled:o.drives?.allowAddDrive,isAddPublicDrivesEnabled:o.drives?.sections?.remote?.allowAdd,isDeletePublicDrivesEnabled:o.drives?.sections?.remote?.allowDelete,isAddCloudDrivesEnabled:o.drives?.sections?.remote?.allowAdd??!0,isDeleteCloudDrivesEnabled:o.drives?.sections?.remote?.allowDelete??!0,isAddLocalDrivesEnabled:o.drives?.sections?.local?.allowAdd,isDeleteLocalDrivesEnabled:o.drives?.sections?.local?.allowDelete,isAnalyticsDatabaseWorkerEnabled:!1,isExternalPackagesEnabled:o.packages?.externalEnabled}}function u(e,t,n){let r=l(),i={};return n.drives?.allowAddDrive!==void 0&&(i.isAddDriveEnabled=n.drives.allowAddDrive),{basePath:e,routerBasename:t,...r,...i}}function d(){let e=c()??`/`;return u(e,s(e),o)}var f=d(),p={isExternalControlsEnabled:f.isExternalControlsEnabled},m={allowedDocumentTypes:f.allowedDocumentTypes,isDragAndDropEnabled:f.isDragAndDropEnabled},h=o.app?.logLevel;h&&e(h),i.debug(`Setting log level to @level.`,h);var g=r(c()??`/`),_=`${g.replace(/\//g,``)}:analytics`,v={appVersion:a.PH_CONNECT_VERSION,studioMode:!1,warnOutdatedApp:!1,appVersionCheckInterval:3600*1e3,routerBasename:g,externalPackagesEnabled:o.packages?.externalEnabled,processors:{enabled:!0,externalProcessorsEnabled:!0},analytics:{enabled:!0,databaseName:_,useWorker:!1,driveAnalyticsEnabled:a.PH_CONNECT_DRIVE_ANALYTICS_ENABLED,diffProcessorEnabled:a.PH_CONNECT_DIFF_ANALYTICS_ENABLED,externalProcessorsEnabled:!0},relational:{enabled:!0,externalProcessorsEnabled:!0},openPanel:{clientId:a.PH_CONNECT_OPENPANEL_CLIENT_ID??``,apiUrl:a.PH_CONNECT_OPENPANEL_API_URL,trackUiEvents:a.PH_CONNECT_OPENPANEL_TRACK_UI_EVENTS,trackOperations:a.PH_CONNECT_OPENPANEL_TRACK_OPERATIONS},renown:{url:o.renown?.url,networkId:o.renown?.networkId,chainId:o.renown?.chainId},sentry:{release:`0.1.0-dev.93`,dsn:o.sentry?.dsn??null,env:o.sentry?.env,tracing:o.sentry?.tracing??!1},content:{showSearchBar:!1,showDocumentModelSelectionSetting:!1},drives:{addDriveEnabled:o.drives?.allowAddDrive,preserveStrategy:o.drives?.preserveStrategy,sections:(()=>{let e={enabled:o.drives?.sections?.remote?.enabled,allowAdd:o.drives?.sections?.remote?.allowAdd,allowDelete:o.drives?.sections?.remote?.allowDelete};return{LOCAL:{enabled:o.drives?.sections?.local?.enabled,allowAdd:o.drives?.sections?.local?.allowAdd,allowDelete:o.drives?.sections?.local?.allowDelete},PUBLIC:e,CLOUD:e}})()},gaTrackingId:void 0,phCliVersion:a.PH_CONNECT_CLI_VERSION};export{p as a,m as i,u as n,f as o,v as r,g as t};
2
- //# sourceMappingURL=connect.config-Bt4pvvWV-TF7SRwB1.js.map
1
+ import{O as e}from"./dist-t-ezfpxv.js";import{n as t,o as n,s as r}from"./runtime-config-DL3QjcfM-D9g4VFtY.js";import{a as i}from"./dist-Cb4AoJ-8.js";(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`1929e5c6-2fcf-504d-9b33-4790264371b5`)}catch{}})();var a=n({processEnv:{BASE_URL:`/`,DEV:!1,MODE:`production`,PH_CONNECT_DIFF_ANALYTICS_ENABLED:`false`,PH_CONNECT_DRIVE_ANALYTICS_ENABLED:`true`,PH_CONNECT_EXTERNAL_ANALYTICS_PROCESSORS_ENABLED:`true`,PH_CONNECT_OPENPANEL_TRACK_OPERATIONS:`true`,PH_CONNECT_OPENPANEL_TRACK_UI_EVENTS:`true`,PH_CONNECT_VERSION:`unknown`,PROD:!0,SSR:!1}}),o=t().connect;function s(e){return e.endsWith(`/`)?e:e+`/`}function c(){return typeof globalThis<`u`&&globalThis.__PH_DYNAMIC_BASE__?`/`:o.app?.basePath||`/`}function l(){return{allowList:void 0,allowedDocumentTypes:[],isDragAndDropEnabled:!0,isEditorDebugModeEnabled:!1,isEditorReadModeEnabled:!1,isExternalControlsEnabled:!1,version:a.PH_CONNECT_VERSION,logLevel:o.app?.logLevel,requiresHardRefresh:!0,warnOutdatedApp:!1,studioMode:!1,versionCheckInterval:3600*1e3,cliVersion:a.PH_CONNECT_CLI_VERSION,fileUploadOperationsChunkSize:50,gaTrackingId:void 0,defaultDrivesUrl:o.drives?.defaultDrives?.[0]?.url,drivesPreserveStrategy:o.drives?.preserveStrategy,enabledEditors:void 0,disabledEditors:[`powerhouse/document-drive`],isExternalProcessorsEnabled:!0,isAnalyticsEnabled:!1,isAnalyticsExternalProcessorsEnabled:a.PH_CONNECT_EXTERNAL_ANALYTICS_PROCESSORS_ENABLED,analyticsDatabaseName:void 0,isRelationalProcessorsEnabled:!0,isExternalRelationalProcessorsEnabled:!0,renownUrl:o.renown?.url,renownNetworkId:o.renown?.networkId,renownChainId:o.renown?.chainId,sentryRelease:`0.1.0-dev.95`,sentryDsn:o.sentry?.dsn??void 0,sentryEnv:o.sentry?.env,isDiffAnalyticsEnabled:a.PH_CONNECT_DIFF_ANALYTICS_ENABLED,isDriveAnalyticsEnabled:a.PH_CONNECT_DRIVE_ANALYTICS_ENABLED,isPublicDrivesEnabled:o.drives?.sections?.remote?.enabled,isCloudDrivesEnabled:o.drives?.sections?.remote?.enabled??!0,isLocalDrivesEnabled:o.drives?.sections?.local?.enabled,isSentryTracingEnabled:o.sentry?.tracing,isDocumentModelSelectionSettingsEnabled:!1,isAddDriveEnabled:o.drives?.allowAddDrive,isAddPublicDrivesEnabled:o.drives?.sections?.remote?.allowAdd,isDeletePublicDrivesEnabled:o.drives?.sections?.remote?.allowDelete,isAddCloudDrivesEnabled:o.drives?.sections?.remote?.allowAdd??!0,isDeleteCloudDrivesEnabled:o.drives?.sections?.remote?.allowDelete??!0,isAddLocalDrivesEnabled:o.drives?.sections?.local?.allowAdd,isDeleteLocalDrivesEnabled:o.drives?.sections?.local?.allowDelete,isAnalyticsDatabaseWorkerEnabled:!1,isExternalPackagesEnabled:o.packages?.externalEnabled}}function u(e,t,n){let r=l(),i={};return n.drives?.allowAddDrive!==void 0&&(i.isAddDriveEnabled=n.drives.allowAddDrive),{basePath:e,routerBasename:t,...r,...i}}function d(){let e=c()??`/`;return u(e,s(e),o)}var f=d(),p={isExternalControlsEnabled:f.isExternalControlsEnabled},m={allowedDocumentTypes:f.allowedDocumentTypes,isDragAndDropEnabled:f.isDragAndDropEnabled},h=o.app?.logLevel;h&&e(h),i.debug(`Setting log level to @level.`,h);var g=r(c()??`/`),_=`${g.replace(/\//g,``)}:analytics`,v={appVersion:a.PH_CONNECT_VERSION,studioMode:!1,warnOutdatedApp:!1,appVersionCheckInterval:3600*1e3,routerBasename:g,externalPackagesEnabled:o.packages?.externalEnabled,processors:{enabled:!0,externalProcessorsEnabled:!0},analytics:{enabled:!0,databaseName:_,useWorker:!1,driveAnalyticsEnabled:a.PH_CONNECT_DRIVE_ANALYTICS_ENABLED,diffProcessorEnabled:a.PH_CONNECT_DIFF_ANALYTICS_ENABLED,externalProcessorsEnabled:!0},relational:{enabled:!0,externalProcessorsEnabled:!0},openPanel:{clientId:a.PH_CONNECT_OPENPANEL_CLIENT_ID??``,apiUrl:a.PH_CONNECT_OPENPANEL_API_URL,trackUiEvents:a.PH_CONNECT_OPENPANEL_TRACK_UI_EVENTS,trackOperations:a.PH_CONNECT_OPENPANEL_TRACK_OPERATIONS},renown:{url:o.renown?.url,networkId:o.renown?.networkId,chainId:o.renown?.chainId},sentry:{release:`0.1.0-dev.95`,dsn:o.sentry?.dsn??null,env:o.sentry?.env,tracing:o.sentry?.tracing??!1},content:{showSearchBar:!1,showDocumentModelSelectionSetting:!1},drives:{addDriveEnabled:o.drives?.allowAddDrive,preserveStrategy:o.drives?.preserveStrategy,sections:(()=>{let e={enabled:o.drives?.sections?.remote?.enabled,allowAdd:o.drives?.sections?.remote?.allowAdd,allowDelete:o.drives?.sections?.remote?.allowDelete};return{LOCAL:{enabled:o.drives?.sections?.local?.enabled,allowAdd:o.drives?.sections?.local?.allowAdd,allowDelete:o.drives?.sections?.local?.allowDelete},PUBLIC:e,CLOUD:e}})()},gaTrackingId:void 0,phCliVersion:a.PH_CONNECT_CLI_VERSION};export{p as a,m as i,u as n,f as o,v as r,g as t};
2
+ //# sourceMappingURL=connect.config-Bt4pvvWV-CJUIVtPH.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connect.config-Bt4pvvWV-TF7SRwB1.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/connect.config-Bt4pvvWV.js"],"sourcesContent":["\n!function(){try{var e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]=\"1929e5c6-2fcf-504d-9b33-4790264371b5\")}catch(e){}}();\nimport { n as getRuntimeConfig } from \"./runtime-config-DL3QjcfM.js\";\nimport { loadRuntimeEnv, normalizeBasePath } from \"@powerhousedao/shared/connect\";\nimport { setLogLevel } from \"@powerhousedao/reactor-browser\";\nimport { logger } from \"document-model\";\n//#region src/connect.config.ts\nconst env = loadRuntimeEnv({ processEnv: import.meta.env });\nconst runtime = getRuntimeConfig().connect;\nfunction getRouterBasenameFromBasePath(basePath) {\n\treturn basePath.endsWith(\"/\") ? basePath : basePath + \"/\";\n}\nfunction getDeployBasePath() {\n\tif (typeof globalThis !== \"undefined\" && globalThis.__PH_DYNAMIC_BASE__) return import.meta.env.BASE_URL;\n\treturn runtime.app?.basePath || import.meta.env.BASE_URL;\n}\nfunction getBuiltInDefaults() {\n\treturn {\n\t\tallowList: void 0,\n\t\tallowedDocumentTypes: [],\n\t\tisDragAndDropEnabled: true,\n\t\tisEditorDebugModeEnabled: false,\n\t\tisEditorReadModeEnabled: false,\n\t\tisExternalControlsEnabled: false,\n\t\tversion: env.PH_CONNECT_VERSION,\n\t\tlogLevel: runtime.app?.logLevel,\n\t\trequiresHardRefresh: true,\n\t\twarnOutdatedApp: false,\n\t\tstudioMode: false,\n\t\tversionCheckInterval: 3600 * 1e3,\n\t\tcliVersion: env.PH_CONNECT_CLI_VERSION,\n\t\tfileUploadOperationsChunkSize: 50,\n\t\tgaTrackingId: void 0,\n\t\tdefaultDrivesUrl: runtime.drives?.defaultDrives?.[0]?.url,\n\t\tdrivesPreserveStrategy: runtime.drives?.preserveStrategy,\n\t\tenabledEditors: void 0,\n\t\tdisabledEditors: [\"powerhouse/document-drive\"],\n\t\tisExternalProcessorsEnabled: true,\n\t\tisAnalyticsEnabled: false,\n\t\tisAnalyticsExternalProcessorsEnabled: env.PH_CONNECT_EXTERNAL_ANALYTICS_PROCESSORS_ENABLED,\n\t\tanalyticsDatabaseName: void 0,\n\t\tisRelationalProcessorsEnabled: true,\n\t\tisExternalRelationalProcessorsEnabled: true,\n\t\trenownUrl: runtime.renown?.url,\n\t\trenownNetworkId: runtime.renown?.networkId,\n\t\trenownChainId: runtime.renown?.chainId,\n\t\tsentryRelease: PH_CONNECT_SENTRY_RELEASE,\n\t\tsentryDsn: runtime.sentry?.dsn ?? void 0,\n\t\tsentryEnv: runtime.sentry?.env,\n\t\tisDiffAnalyticsEnabled: env.PH_CONNECT_DIFF_ANALYTICS_ENABLED,\n\t\tisDriveAnalyticsEnabled: env.PH_CONNECT_DRIVE_ANALYTICS_ENABLED,\n\t\tisPublicDrivesEnabled: runtime.drives?.sections?.remote?.enabled,\n\t\tisCloudDrivesEnabled: runtime.drives?.sections?.remote?.enabled ?? true,\n\t\tisLocalDrivesEnabled: runtime.drives?.sections?.local?.enabled,\n\t\tisSentryTracingEnabled: runtime.sentry?.tracing,\n\t\tisDocumentModelSelectionSettingsEnabled: false,\n\t\tisAddDriveEnabled: runtime.drives?.allowAddDrive,\n\t\tisAddPublicDrivesEnabled: runtime.drives?.sections?.remote?.allowAdd,\n\t\tisDeletePublicDrivesEnabled: runtime.drives?.sections?.remote?.allowDelete,\n\t\tisAddCloudDrivesEnabled: runtime.drives?.sections?.remote?.allowAdd ?? true,\n\t\tisDeleteCloudDrivesEnabled: runtime.drives?.sections?.remote?.allowDelete ?? true,\n\t\tisAddLocalDrivesEnabled: runtime.drives?.sections?.local?.allowAdd,\n\t\tisDeleteLocalDrivesEnabled: runtime.drives?.sections?.local?.allowDelete,\n\t\tisAnalyticsDatabaseWorkerEnabled: false,\n\t\tisExternalPackagesEnabled: runtime.packages?.externalEnabled\n\t};\n}\nfunction buildPHGlobalConfig(basePath, routerBasename, connectFromConfig) {\n\tconst defaults = getBuiltInDefaults();\n\tconst fileOverrides = {};\n\tif (connectFromConfig.drives?.allowAddDrive !== void 0) fileOverrides.isAddDriveEnabled = connectFromConfig.drives.allowAddDrive;\n\treturn {\n\t\tbasePath,\n\t\trouterBasename,\n\t\t...defaults,\n\t\t...fileOverrides\n\t};\n}\nfunction getPHGlobalConfigFromRuntime() {\n\tconst basePath = getDeployBasePath() ?? \"/\";\n\treturn buildPHGlobalConfig(basePath, getRouterBasenameFromBasePath(basePath), runtime);\n}\nconst phGlobalConfig = getPHGlobalConfigFromRuntime();\nconst defaultPHDocumentEditorConfig = { isExternalControlsEnabled: phGlobalConfig.isExternalControlsEnabled };\nconst defaultPHAppConfig = {\n\tallowedDocumentTypes: phGlobalConfig.allowedDocumentTypes,\n\tisDragAndDropEnabled: phGlobalConfig.isDragAndDropEnabled\n};\nconst RESOLVED_LOG_LEVEL = runtime.app?.logLevel;\nif (RESOLVED_LOG_LEVEL) setLogLevel(RESOLVED_LOG_LEVEL);\nlogger.debug(\"Setting log level to @level.\", RESOLVED_LOG_LEVEL);\nconst PH_CONNECT_BASE_PATH = normalizeBasePath(getDeployBasePath() ?? \"/\");\nconst PH_CONNECT_ANALYTICS_DATABASE_NAME = `${PH_CONNECT_BASE_PATH.replace(/\\//g, \"\")}:analytics`;\nconst connectConfig = {\n\tappVersion: env.PH_CONNECT_VERSION,\n\tstudioMode: false,\n\twarnOutdatedApp: false,\n\tappVersionCheckInterval: 3600 * 1e3,\n\trouterBasename: PH_CONNECT_BASE_PATH,\n\texternalPackagesEnabled: runtime.packages?.externalEnabled,\n\tprocessors: {\n\t\tenabled: true,\n\t\texternalProcessorsEnabled: true\n\t},\n\tanalytics: {\n\t\tenabled: true,\n\t\tdatabaseName: PH_CONNECT_ANALYTICS_DATABASE_NAME,\n\t\tuseWorker: false,\n\t\tdriveAnalyticsEnabled: env.PH_CONNECT_DRIVE_ANALYTICS_ENABLED,\n\t\tdiffProcessorEnabled: env.PH_CONNECT_DIFF_ANALYTICS_ENABLED,\n\t\texternalProcessorsEnabled: true\n\t},\n\trelational: {\n\t\tenabled: true,\n\t\texternalProcessorsEnabled: true\n\t},\n\topenPanel: {\n\t\tclientId: env.PH_CONNECT_OPENPANEL_CLIENT_ID ?? \"\",\n\t\tapiUrl: env.PH_CONNECT_OPENPANEL_API_URL,\n\t\ttrackUiEvents: env.PH_CONNECT_OPENPANEL_TRACK_UI_EVENTS,\n\t\ttrackOperations: env.PH_CONNECT_OPENPANEL_TRACK_OPERATIONS\n\t},\n\trenown: {\n\t\turl: runtime.renown?.url,\n\t\tnetworkId: runtime.renown?.networkId,\n\t\tchainId: runtime.renown?.chainId\n\t},\n\tsentry: {\n\t\trelease: PH_CONNECT_SENTRY_RELEASE,\n\t\tdsn: runtime.sentry?.dsn ?? null,\n\t\tenv: runtime.sentry?.env,\n\t\ttracing: runtime.sentry?.tracing ?? false\n\t},\n\tcontent: {\n\t\tshowSearchBar: false,\n\t\tshowDocumentModelSelectionSetting: false\n\t},\n\tdrives: {\n\t\taddDriveEnabled: runtime.drives?.allowAddDrive,\n\t\tpreserveStrategy: runtime.drives?.preserveStrategy,\n\t\tsections: (() => {\n\t\t\tconst remote = {\n\t\t\t\tenabled: runtime.drives?.sections?.remote?.enabled,\n\t\t\t\tallowAdd: runtime.drives?.sections?.remote?.allowAdd,\n\t\t\t\tallowDelete: runtime.drives?.sections?.remote?.allowDelete\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tLOCAL: {\n\t\t\t\t\tenabled: runtime.drives?.sections?.local?.enabled,\n\t\t\t\t\tallowAdd: runtime.drives?.sections?.local?.allowAdd,\n\t\t\t\t\tallowDelete: runtime.drives?.sections?.local?.allowDelete\n\t\t\t\t},\n\t\t\t\tPUBLIC: remote,\n\t\t\t\tCLOUD: remote\n\t\t\t};\n\t\t})()\n\t},\n\tgaTrackingId: void 0,\n\tphCliVersion: env.PH_CONNECT_CLI_VERSION\n};\n//#endregion\nexport { defaultPHDocumentEditorConfig as a, defaultPHAppConfig as i, buildPHGlobalConfig as n, phGlobalConfig as o, connectConfig as r, PH_CONNECT_BASE_PATH as t };\n\n//# sourceMappingURL=connect.config-Bt4pvvWV.js.map\n//# debugId=1929e5c6-2fcf-504d-9b33-4790264371b5\n"],"x_google_ignoreList":[0],"mappings":"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"}
1
+ {"version":3,"file":"connect.config-Bt4pvvWV-CJUIVtPH.js","names":[],"sources":["../../../../../node_modules/.pnpm/@powerhousedao+connect@6.2.0-dev.23_@babel+runtime@7.29.2_@parcel+watcher@2.5.6_@sentry_92fbcdab943457b0ffd54c0864a4f38d/node_modules/@powerhousedao/connect/dist/connect.config-Bt4pvvWV.js"],"sourcesContent":["\n!function(){try{var e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]=\"1929e5c6-2fcf-504d-9b33-4790264371b5\")}catch(e){}}();\nimport { n as getRuntimeConfig } from \"./runtime-config-DL3QjcfM.js\";\nimport { loadRuntimeEnv, normalizeBasePath } from \"@powerhousedao/shared/connect\";\nimport { setLogLevel } from \"@powerhousedao/reactor-browser\";\nimport { logger } from \"document-model\";\n//#region src/connect.config.ts\nconst env = loadRuntimeEnv({ processEnv: import.meta.env });\nconst runtime = getRuntimeConfig().connect;\nfunction getRouterBasenameFromBasePath(basePath) {\n\treturn basePath.endsWith(\"/\") ? basePath : basePath + \"/\";\n}\nfunction getDeployBasePath() {\n\tif (typeof globalThis !== \"undefined\" && globalThis.__PH_DYNAMIC_BASE__) return import.meta.env.BASE_URL;\n\treturn runtime.app?.basePath || import.meta.env.BASE_URL;\n}\nfunction getBuiltInDefaults() {\n\treturn {\n\t\tallowList: void 0,\n\t\tallowedDocumentTypes: [],\n\t\tisDragAndDropEnabled: true,\n\t\tisEditorDebugModeEnabled: false,\n\t\tisEditorReadModeEnabled: false,\n\t\tisExternalControlsEnabled: false,\n\t\tversion: env.PH_CONNECT_VERSION,\n\t\tlogLevel: runtime.app?.logLevel,\n\t\trequiresHardRefresh: true,\n\t\twarnOutdatedApp: false,\n\t\tstudioMode: false,\n\t\tversionCheckInterval: 3600 * 1e3,\n\t\tcliVersion: env.PH_CONNECT_CLI_VERSION,\n\t\tfileUploadOperationsChunkSize: 50,\n\t\tgaTrackingId: void 0,\n\t\tdefaultDrivesUrl: runtime.drives?.defaultDrives?.[0]?.url,\n\t\tdrivesPreserveStrategy: runtime.drives?.preserveStrategy,\n\t\tenabledEditors: void 0,\n\t\tdisabledEditors: [\"powerhouse/document-drive\"],\n\t\tisExternalProcessorsEnabled: true,\n\t\tisAnalyticsEnabled: false,\n\t\tisAnalyticsExternalProcessorsEnabled: env.PH_CONNECT_EXTERNAL_ANALYTICS_PROCESSORS_ENABLED,\n\t\tanalyticsDatabaseName: void 0,\n\t\tisRelationalProcessorsEnabled: true,\n\t\tisExternalRelationalProcessorsEnabled: true,\n\t\trenownUrl: runtime.renown?.url,\n\t\trenownNetworkId: runtime.renown?.networkId,\n\t\trenownChainId: runtime.renown?.chainId,\n\t\tsentryRelease: PH_CONNECT_SENTRY_RELEASE,\n\t\tsentryDsn: runtime.sentry?.dsn ?? void 0,\n\t\tsentryEnv: runtime.sentry?.env,\n\t\tisDiffAnalyticsEnabled: env.PH_CONNECT_DIFF_ANALYTICS_ENABLED,\n\t\tisDriveAnalyticsEnabled: env.PH_CONNECT_DRIVE_ANALYTICS_ENABLED,\n\t\tisPublicDrivesEnabled: runtime.drives?.sections?.remote?.enabled,\n\t\tisCloudDrivesEnabled: runtime.drives?.sections?.remote?.enabled ?? true,\n\t\tisLocalDrivesEnabled: runtime.drives?.sections?.local?.enabled,\n\t\tisSentryTracingEnabled: runtime.sentry?.tracing,\n\t\tisDocumentModelSelectionSettingsEnabled: false,\n\t\tisAddDriveEnabled: runtime.drives?.allowAddDrive,\n\t\tisAddPublicDrivesEnabled: runtime.drives?.sections?.remote?.allowAdd,\n\t\tisDeletePublicDrivesEnabled: runtime.drives?.sections?.remote?.allowDelete,\n\t\tisAddCloudDrivesEnabled: runtime.drives?.sections?.remote?.allowAdd ?? true,\n\t\tisDeleteCloudDrivesEnabled: runtime.drives?.sections?.remote?.allowDelete ?? true,\n\t\tisAddLocalDrivesEnabled: runtime.drives?.sections?.local?.allowAdd,\n\t\tisDeleteLocalDrivesEnabled: runtime.drives?.sections?.local?.allowDelete,\n\t\tisAnalyticsDatabaseWorkerEnabled: false,\n\t\tisExternalPackagesEnabled: runtime.packages?.externalEnabled\n\t};\n}\nfunction buildPHGlobalConfig(basePath, routerBasename, connectFromConfig) {\n\tconst defaults = getBuiltInDefaults();\n\tconst fileOverrides = {};\n\tif (connectFromConfig.drives?.allowAddDrive !== void 0) fileOverrides.isAddDriveEnabled = connectFromConfig.drives.allowAddDrive;\n\treturn {\n\t\tbasePath,\n\t\trouterBasename,\n\t\t...defaults,\n\t\t...fileOverrides\n\t};\n}\nfunction getPHGlobalConfigFromRuntime() {\n\tconst basePath = getDeployBasePath() ?? \"/\";\n\treturn buildPHGlobalConfig(basePath, getRouterBasenameFromBasePath(basePath), runtime);\n}\nconst phGlobalConfig = getPHGlobalConfigFromRuntime();\nconst defaultPHDocumentEditorConfig = { isExternalControlsEnabled: phGlobalConfig.isExternalControlsEnabled };\nconst defaultPHAppConfig = {\n\tallowedDocumentTypes: phGlobalConfig.allowedDocumentTypes,\n\tisDragAndDropEnabled: phGlobalConfig.isDragAndDropEnabled\n};\nconst RESOLVED_LOG_LEVEL = runtime.app?.logLevel;\nif (RESOLVED_LOG_LEVEL) setLogLevel(RESOLVED_LOG_LEVEL);\nlogger.debug(\"Setting log level to @level.\", RESOLVED_LOG_LEVEL);\nconst PH_CONNECT_BASE_PATH = normalizeBasePath(getDeployBasePath() ?? \"/\");\nconst PH_CONNECT_ANALYTICS_DATABASE_NAME = `${PH_CONNECT_BASE_PATH.replace(/\\//g, \"\")}:analytics`;\nconst connectConfig = {\n\tappVersion: env.PH_CONNECT_VERSION,\n\tstudioMode: false,\n\twarnOutdatedApp: false,\n\tappVersionCheckInterval: 3600 * 1e3,\n\trouterBasename: PH_CONNECT_BASE_PATH,\n\texternalPackagesEnabled: runtime.packages?.externalEnabled,\n\tprocessors: {\n\t\tenabled: true,\n\t\texternalProcessorsEnabled: true\n\t},\n\tanalytics: {\n\t\tenabled: true,\n\t\tdatabaseName: PH_CONNECT_ANALYTICS_DATABASE_NAME,\n\t\tuseWorker: false,\n\t\tdriveAnalyticsEnabled: env.PH_CONNECT_DRIVE_ANALYTICS_ENABLED,\n\t\tdiffProcessorEnabled: env.PH_CONNECT_DIFF_ANALYTICS_ENABLED,\n\t\texternalProcessorsEnabled: true\n\t},\n\trelational: {\n\t\tenabled: true,\n\t\texternalProcessorsEnabled: true\n\t},\n\topenPanel: {\n\t\tclientId: env.PH_CONNECT_OPENPANEL_CLIENT_ID ?? \"\",\n\t\tapiUrl: env.PH_CONNECT_OPENPANEL_API_URL,\n\t\ttrackUiEvents: env.PH_CONNECT_OPENPANEL_TRACK_UI_EVENTS,\n\t\ttrackOperations: env.PH_CONNECT_OPENPANEL_TRACK_OPERATIONS\n\t},\n\trenown: {\n\t\turl: runtime.renown?.url,\n\t\tnetworkId: runtime.renown?.networkId,\n\t\tchainId: runtime.renown?.chainId\n\t},\n\tsentry: {\n\t\trelease: PH_CONNECT_SENTRY_RELEASE,\n\t\tdsn: runtime.sentry?.dsn ?? null,\n\t\tenv: runtime.sentry?.env,\n\t\ttracing: runtime.sentry?.tracing ?? false\n\t},\n\tcontent: {\n\t\tshowSearchBar: false,\n\t\tshowDocumentModelSelectionSetting: false\n\t},\n\tdrives: {\n\t\taddDriveEnabled: runtime.drives?.allowAddDrive,\n\t\tpreserveStrategy: runtime.drives?.preserveStrategy,\n\t\tsections: (() => {\n\t\t\tconst remote = {\n\t\t\t\tenabled: runtime.drives?.sections?.remote?.enabled,\n\t\t\t\tallowAdd: runtime.drives?.sections?.remote?.allowAdd,\n\t\t\t\tallowDelete: runtime.drives?.sections?.remote?.allowDelete\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tLOCAL: {\n\t\t\t\t\tenabled: runtime.drives?.sections?.local?.enabled,\n\t\t\t\t\tallowAdd: runtime.drives?.sections?.local?.allowAdd,\n\t\t\t\t\tallowDelete: runtime.drives?.sections?.local?.allowDelete\n\t\t\t\t},\n\t\t\t\tPUBLIC: remote,\n\t\t\t\tCLOUD: remote\n\t\t\t};\n\t\t})()\n\t},\n\tgaTrackingId: void 0,\n\tphCliVersion: env.PH_CONNECT_CLI_VERSION\n};\n//#endregion\nexport { defaultPHDocumentEditorConfig as a, defaultPHAppConfig as i, buildPHGlobalConfig as n, phGlobalConfig as o, connectConfig as r, PH_CONNECT_BASE_PATH as t };\n\n//# sourceMappingURL=connect.config-Bt4pvvWV.js.map\n//# debugId=1929e5c6-2fcf-504d-9b33-4790264371b5\n"],"x_google_ignoreList":[0],"mappings":"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"}
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/components-ByEUkO4U-DHdzb1cM.js","assets/preload-helper-ca-nBW7U.js","assets/connect-CGvtDtZh.js","assets/chunk-BNv3lrIs.js","assets/dist-t-ezfpxv.js","assets/hmac-wnxCe4SN.js","assets/worker-XYrQaEmt-w0FhumYk.js","assets/error-info-Cpu4OY3o-DJ8lg6ye.js","assets/types-CxSpmNGK-BaNo7EHQ.js","assets/esm-0nAQjFUV.js","assets/errors-D3S6Eysd-DUmQAeoG.js","assets/dist-Cb4AoJ-8.js","assets/clsx-CtFH8AOT.js","assets/dist-DC27BFRa.js","assets/chunk-3WWIVTCY-Dk4atnGX.js","assets/chunk-QY3QWFKW-Dw6-Hpdq.js","assets/chunk-F2DQ4FIK-B5wKwnbU.js","assets/chunk-VBDAOXYI-BWd303gi.js","assets/connect.config-Bt4pvvWV-TF7SRwB1.js","assets/runtime-config-DL3QjcfM-D9g4VFtY.js","assets/module-bwULLGwn.js","assets/registerServiceWorker-D9l1kja7-DG9mrLlt.js","assets/toast-BEy42aYx-Dg_jZf6v.js","assets/Trans-DDyWfeQm.js","assets/i18next-kqPoxo7u.js","assets/useTranslation-DQCCLfKw.js","assets/editor-Bds50MuL.js","assets/hooks-CE3gZpe3.js"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./chunk-BNv3lrIs.js";import{r as t}from"./runtime-config-DL3QjcfM-D9g4VFtY.js";import{t as n}from"./preload-helper-ca-nBW7U.js";import{C as r,P as i,b as a,f as ee,h as te,m as ne,v as re,x as ie}from"./types-CxSpmNGK-BaNo7EHQ.js";import{n as ae}from"./dist-Cb4AoJ-8.js";import{$ as oe,$t as se,A as ce,An as le,At as o,B as ue,Bn as de,Bt as fe,C as pe,Cn as me,Ct as he,D as ge,Dn as _e,Dt as ve,E as ye,En as be,Et as xe,F as Se,Fn as Ce,Ft as we,G as Te,Gn as Ee,Gt as De,H as Oe,Hn as ke,Ht as Ae,I as je,In as Me,It as Ne,J as Pe,Jt as Fe,K as Ie,Kt as Le,L as Re,Ln as ze,Lt as Be,M as Ve,Mn as He,Mt as Ue,N as We,Nn as Ge,Nt as Ke,O as qe,On as Je,Ot as Ye,P as Xe,Pn as Ze,Pt as Qe,Q as $e,Qt as et,R as tt,Rn as nt,Rt as rt,S as it,Sn as at,St as ot,T as st,Tn as ct,Tt as lt,U as ut,Un as dt,Ut as ft,V as pt,Vn as s,Vt as c,W as mt,Wn as ht,Wt as gt,X as _t,Xt as vt,Y as yt,Yt as bt,Z as xt,Zt as St,_ as Ct,_n as l,_t as wt,a as Tt,an as Et,at as Dt,b as Ot,bn as u,bt as kt,c as d,cn as f,ct as At,d as p,dn as m,dt as jt,en as Mt,et as Nt,f as h,fn as Pt,ft as Ft,g as It,gn as g,gt as Lt,h as Rt,hn as _,ht as zt,i as Bt,in as Vt,it as Ht,j as Ut,jn as v,jt as y,k as Wt,kn as b,kt as x,l as S,ln as C,lt as Gt,m as Kt,mn as w,mt as qt,n as Jt,nn as Yt,nt as Xt,o as Zt,on as Qt,ot as $t,p as en,pn as tn,pt as nn,q as rn,qt as an,r as on,rn as sn,rt as cn,s as ln,sn as un,st as dn,t as fn,tn as pn,tt as mn,u as hn,un as gn,ut as _n,v as vn,vn as yn,vt as bn,w as xn,wn as Sn,wt as Cn,x as wn,xn as Tn,xt as En,y as Dn,yn as On,yt as kn,z as An,zn as jn,zt as Mn}from"./hooks-CE3gZpe3.js";import{createRoot as Nn}from"react-dom/client";import{jsx as Pn}from"react/jsx-runtime";import{lazy as Fn}from"react";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`2f8a11cf-bc6b-5fbf-9031-7723d0609b7b`)}catch{}})(),await t();var{AppLoader:In}=await n(async()=>{let{AppLoader:e}=await import(`./components-ByEUkO4U-DHdzb1cM.js`);return{AppLoader:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]));function Ln(e){window.ph?.vetraPackageManager?.updateLocalPackage(e)}function Rn(e){return window.ph||(window.ph={}),Nn(document.getElementById(`root`)).render(Pn(In,{localPackage:e})),{updateLocalPackage:Ln}}var zn={name:`ph-clint-app`,description:``,category:``,publisher:{name:``,url:``},documentModels:[{id:`powerhouse/ph-clint-project`,name:`PhClintProject`}],apps:[],editors:[{id:`ph-clint-project-editor`,name:`PhClintProjectEditor`,documentTypes:[`powerhouse/ph-clint-project`]}],processors:[],subgraphs:[],config:[]},Bn={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
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/components-ByEUkO4U-DsSCto_6.js","assets/preload-helper-ca-nBW7U.js","assets/connect-CGvtDtZh.js","assets/chunk-BNv3lrIs.js","assets/dist-t-ezfpxv.js","assets/hmac-wnxCe4SN.js","assets/worker-XYrQaEmt-w0FhumYk.js","assets/error-info-Cpu4OY3o-DJ8lg6ye.js","assets/types-CxSpmNGK-BaNo7EHQ.js","assets/esm-0nAQjFUV.js","assets/errors-D3S6Eysd-DUmQAeoG.js","assets/dist-Cb4AoJ-8.js","assets/clsx-CtFH8AOT.js","assets/dist-DC27BFRa.js","assets/chunk-3WWIVTCY-Dk4atnGX.js","assets/chunk-QY3QWFKW-Dw6-Hpdq.js","assets/chunk-F2DQ4FIK-B5wKwnbU.js","assets/chunk-VBDAOXYI-BWd303gi.js","assets/connect.config-Bt4pvvWV-CJUIVtPH.js","assets/runtime-config-DL3QjcfM-D9g4VFtY.js","assets/module-DqKIwD3c.js","assets/registerServiceWorker-D9l1kja7-D0BQ1ZVO.js","assets/toast-BEy42aYx-Dg_jZf6v.js","assets/Trans-DDyWfeQm.js","assets/i18next-kqPoxo7u.js","assets/useTranslation-DQCCLfKw.js","assets/editor-Bds50MuL.js","assets/hooks-CE3gZpe3.js"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./chunk-BNv3lrIs.js";import{r as t}from"./runtime-config-DL3QjcfM-D9g4VFtY.js";import{t as n}from"./preload-helper-ca-nBW7U.js";import{C as r,P as i,b as a,f as ee,h as te,m as ne,v as re,x as ie}from"./types-CxSpmNGK-BaNo7EHQ.js";import{n as ae}from"./dist-Cb4AoJ-8.js";import{$ as oe,$t as se,A as ce,An as le,At as o,B as ue,Bn as de,Bt as fe,C as pe,Cn as me,Ct as he,D as ge,Dn as _e,Dt as ve,E as ye,En as be,Et as xe,F as Se,Fn as Ce,Ft as we,G as Te,Gn as Ee,Gt as De,H as Oe,Hn as ke,Ht as Ae,I as je,In as Me,It as Ne,J as Pe,Jt as Fe,K as Ie,Kt as Le,L as Re,Ln as ze,Lt as Be,M as Ve,Mn as He,Mt as Ue,N as We,Nn as Ge,Nt as Ke,O as qe,On as Je,Ot as Ye,P as Xe,Pn as Ze,Pt as Qe,Q as $e,Qt as et,R as tt,Rn as nt,Rt as rt,S as it,Sn as at,St as ot,T as st,Tn as ct,Tt as lt,U as ut,Un as dt,Ut as ft,V as pt,Vn as s,Vt as c,W as mt,Wn as ht,Wt as gt,X as _t,Xt as vt,Y as yt,Yt as bt,Z as xt,Zt as St,_ as Ct,_n as l,_t as wt,a as Tt,an as Et,at as Dt,b as Ot,bn as u,bt as kt,c as d,cn as f,ct as At,d as p,dn as m,dt as jt,en as Mt,et as Nt,f as h,fn as Pt,ft as Ft,g as It,gn as g,gt as Lt,h as Rt,hn as _,ht as zt,i as Bt,in as Vt,it as Ht,j as Ut,jn as v,jt as y,k as Wt,kn as b,kt as x,l as S,ln as C,lt as Gt,m as Kt,mn as w,mt as qt,n as Jt,nn as Yt,nt as Xt,o as Zt,on as Qt,ot as $t,p as en,pn as tn,pt as nn,q as rn,qt as an,r as on,rn as sn,rt as cn,s as ln,sn as un,st as dn,t as fn,tn as pn,tt as mn,u as hn,un as gn,ut as _n,v as vn,vn as yn,vt as bn,w as xn,wn as Sn,wt as Cn,x as wn,xn as Tn,xt as En,y as Dn,yn as On,yt as kn,z as An,zn as jn,zt as Mn}from"./hooks-CE3gZpe3.js";import{createRoot as Nn}from"react-dom/client";import{jsx as Pn}from"react/jsx-runtime";import{lazy as Fn}from"react";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`2f8a11cf-bc6b-5fbf-9031-7723d0609b7b`)}catch{}})(),await t();var{AppLoader:In}=await n(async()=>{let{AppLoader:e}=await import(`./components-ByEUkO4U-DsSCto_6.js`);return{AppLoader:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]));function Ln(e){window.ph?.vetraPackageManager?.updateLocalPackage(e)}function Rn(e){return window.ph||(window.ph={}),Nn(document.getElementById(`root`)).render(Pn(In,{localPackage:e})),{updateLocalPackage:Ln}}var zn={name:`ph-clint-app`,description:``,category:``,publisher:{name:``,url:``},documentModels:[{id:`powerhouse/ph-clint-project`,name:`PhClintProject`}],apps:[],editors:[{id:`ph-clint-project-editor`,name:`PhClintProjectEditor`,documentTypes:[`powerhouse/ph-clint-project`]}],processors:[],subgraphs:[],config:[]},Bn={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 {
3
3
  name: String
4
4
  scope: String
5
5
  version: String!
@@ -1101,4 +1101,4 @@ if (idx === -1) {
1101
1101
  );
1102
1102
  }
1103
1103
  agent.toolPatterns.splice(idx, 1);`,errors:[{id:`e-remove-pattern-not-enabled`,name:`MastraNotEnabledError`,code:`MASTRA_NOT_ENABLED`,description:`Mastra must be enabled.`,template:``},{id:`e-remove-pattern-agent-not-found`,name:`AgentNotFoundError`,code:`AGENT_NOT_FOUND`,description:`The specified agentId was not found.`,template:``},{id:`e-remove-pattern-not-found`,name:`ToolPatternNotFoundError`,code:`TOOL_PATTERN_NOT_FOUND`,description:`The tool pattern is not on this agent.`,template:``}],examples:[],scope:`global`}]}],version:1,changeLog:[]}]},Vn=class extends Error{errorCode=`DuplicateResourceError`;constructor(e=`DuplicateResourceError`){super(e)}},Hn=class extends Error{errorCode=`ResourceNotFoundError`;constructor(e=`ResourceNotFoundError`){super(e)}},T={addSupportedResourceOperation(e,t){if(e.deployment.supportedResources.includes(t.input.resource))throw new Vn(`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 Hn(`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}},Un=class extends Error{errorCode=`InvalidSkillNameError`;constructor(e=`InvalidSkillNameError`){super(e)}},Wn=class extends Error{errorCode=`DuplicateSkillError`;constructor(e=`DuplicateSkillError`){super(e)}},E=class extends Error{errorCode=`SkillNotFoundError`;constructor(e=`SkillNotFoundError`){super(e)}},D={addExternalSkillOperation(e,t){if(!/^[a-z][a-z0-9-]*$/.test(t.input.name))throw new Un(`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 Wn(`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 E(`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 E(`Skill not found: ${t.input.id}`);if(!/^[a-z][a-z0-9-]*$/.test(t.input.name))throw new Un(`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 Wn(`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 E(`Skill not found: ${t.input.id}`);n.githubUrl=t.input.githubUrl}},Gn=class extends Error{errorCode=`InvalidAgentIdError`;constructor(e=`InvalidAgentIdError`){super(e)}},Kn=class extends Error{errorCode=`InvalidAgentNameError`;constructor(e=`InvalidAgentNameError`){super(e)}},qn=class extends Error{errorCode=`MastraNotEnabledError`;constructor(e=`MastraNotEnabledError`){super(e)}},Jn=class extends Error{errorCode=`PowerhouseNotEnabledError`;constructor(e=`PowerhouseNotEnabledError`){super(e)}},O={enableMastraOperation(e,t){if(!/^[a-z][a-z0-9-]*$/.test(t.input.agentId))throw new Gn(`Invalid agent ID: ${t.input.agentId}. Must be lowercase kebab-case.`);let n=t.input.agentName.trim();if(!n)throw new Kn(`Agent name must not be empty.`);e.features.mastra.enabled=!0,e.features.mastra.models.length===0&&e.features.mastra.models.push({id:`clint/demo-agent`}),e.features.mastra.profiles.length===0&&e.features.mastra.profiles.push({id:`base`,title:`Base Profile`,content:`You are a helpful assistant.`});let r=e.features.mastra.mainAgent;r?(r.id=t.input.agentId,r.name=n):e.features.mastra.mainAgent={id:t.input.agentId,name:n,description:null,attachment:null,modelId:`clint/demo-agent`,profileIds:[`base`],skills:[],toolPatterns:[]}},disableMastraOperation(e){e.features.mastra.enabled=!1,e.features.mastra.mainAgent=null,e.features.mastra.subAgents=[],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)},setEnableChatOperation(e,t){if(!e.features.mastra.enabled)throw new qn(`Cannot toggle chat when Mastra is disabled.`);if(e.features.powerhouse===`Disabled`)throw new Jn(`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)}}}}},Yn=class extends Error{errorCode=`CannotLowerPowerhouseError`;constructor(e=`CannotLowerPowerhouseError`){super(e)}},Xn=[`Disabled`,`Reactor`,`Switchboard`,`Connect`],Zn={setPowerhouseLevelOperation(e,t){let n=Xn.indexOf(e.features.powerhouse),r=Xn.indexOf(t.input.level);if(n>=1&&r<1)throw new Yn(`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)}},Qn={enableRoutineOperation(e){e.features.routine.enabled=!0},disableRoutineOperation(e){e.features.routine.enabled=!1}},$n=class extends Error{errorCode=`InvalidVersionError`;constructor(e=`InvalidVersionError`){super(e)}},k=class extends Error{errorCode=`InvalidPackageIdentifierError`;constructor(e=`InvalidPackageIdentifierError`){super(e)}},er=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/,tr=/^[a-z][a-z0-9-]*$/,A={setVersionOperation(e,t){if(!er.test(t.input.version))throw new $n(`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 k(`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 k(`Invalid package identifier: ${n}`);r=e[0].replace(/^@/,``),i=e[1]}if(r!==null&&!tr.test(r))throw new k(`Invalid scope: ${r}`);if(i.endsWith(`-cli`)||(i+=`-cli`),!tr.test(i))throw new k(`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}`}}},nr={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.models=t.input.models.map(e=>({id:e.id})),e.features.mastra.profiles=t.input.profiles.map(e=>({id:e.id,title:e.title,content:e.content})),t.input.mainAgent&&e.features.mastra.enabled){let n=t.input.mainAgent;e.features.mastra.mainAgent={id:n.id,name:n.name,description:n.description||null,attachment:n.attachment||null,modelId:n.modelId,profileIds:[...n.profileIds],skills:[...n.skills],toolPatterns:[...n.toolPatterns]}}else e.features.mastra.mainAgent=null;if(e.features.mastra.enabled?e.features.mastra.subAgents=t.input.subAgents.map(e=>({id:e.id,name:e.name,description:e.description,modelId:e.modelId,profileIds:[...e.profileIds],skills:[...e.skills],toolPatterns:[...e.toolPatterns]})):e.features.mastra.subAgents=[],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]:[]}},j=class extends Error{errorCode=`MastraNotEnabledError`;constructor(e=`MastraNotEnabledError`){super(e)}},M=class extends Error{errorCode=`AgentNotFoundError`;constructor(e=`AgentNotFoundError`){super(e)}},rr=class extends Error{errorCode=`ModelReferenceNotFoundError`;constructor(e=`ModelReferenceNotFoundError`){super(e)}},N=class extends Error{errorCode=`ProfileReferenceNotFoundError`;constructor(e=`ProfileReferenceNotFoundError`){super(e)}},ir=class extends Error{errorCode=`InvalidSkillNameError`;constructor(e=`InvalidSkillNameError`){super(e)}},ar=class extends Error{errorCode=`SkillNotFoundError`;constructor(e=`SkillNotFoundError`){super(e)}},or=class extends Error{errorCode=`InvalidToolPatternError`;constructor(e=`InvalidToolPatternError`){super(e)}},sr=class extends Error{errorCode=`ToolPatternNotFoundError`;constructor(e=`ToolPatternNotFoundError`){super(e)}};function P(e,t,n){return e&&e.id===n?e:t.find(e=>e.id===n)}var F={setAgentModelOperation(e,t){if(!e.features.mastra.enabled)throw new j(`Cannot set agent model when Mastra is disabled.`);let n=P(e.features.mastra.mainAgent,e.features.mastra.subAgents,t.input.agentId);if(!n)throw new M(`Agent not found: ${t.input.agentId}`);if(!e.features.mastra.models.find(e=>e.id===t.input.modelId))throw new rr(`Model not in library: ${t.input.modelId}`);n.modelId=t.input.modelId},addAgentProfileRefOperation(e,t){if(!e.features.mastra.enabled)throw new j(`Cannot add profile ref when Mastra is disabled.`);let n=P(e.features.mastra.mainAgent,e.features.mastra.subAgents,t.input.agentId);if(!n)throw new M(`Agent not found: ${t.input.agentId}`);if(!e.features.mastra.profiles.find(e=>e.id===t.input.profileId))throw new N(`Profile not in library: ${t.input.profileId}`);if(!n.profileIds.includes(t.input.profileId))if(t.input.insertBefore){let e=n.profileIds.indexOf(t.input.insertBefore);if(e===-1)throw new N(`insertBefore profile not in agent's profileIds: ${t.input.insertBefore}`);n.profileIds.splice(e,0,t.input.profileId)}else n.profileIds.push(t.input.profileId)},removeAgentProfileRefOperation(e,t){if(!e.features.mastra.enabled)throw new j(`Cannot remove profile ref when Mastra is disabled.`);let n=P(e.features.mastra.mainAgent,e.features.mastra.subAgents,t.input.agentId);if(!n)throw new M(`Agent not found: ${t.input.agentId}`);let r=n.profileIds.indexOf(t.input.profileId);if(r===-1)throw new N(`Profile not in agent's profileIds: ${t.input.profileId}`);n.profileIds.splice(r,1)},reorderAgentProfileRefsOperation(e,t){if(!e.features.mastra.enabled)throw new j(`Cannot reorder profile refs when Mastra is disabled.`);let n=P(e.features.mastra.mainAgent,e.features.mastra.subAgents,t.input.agentId);if(!n)throw new M(`Agent not found: ${t.input.agentId}`);for(let e of t.input.ids)if(!n.profileIds.includes(e))throw new N(`Profile not in agent's profileIds: ${e}`);let r=n.profileIds.filter(e=>!t.input.ids.includes(e));if(t.input.insertBefore){let e=r.indexOf(t.input.insertBefore);if(e===-1)throw new N(`insertBefore profile not in agent's profileIds: ${t.input.insertBefore}`);r.splice(e,0,...t.input.ids)}else r.push(...t.input.ids);n.profileIds=r},addAgentSkillOperation(e,t){if(!e.features.mastra.enabled)throw new j(`Cannot add skill when Mastra is disabled.`);let n=P(e.features.mastra.mainAgent,e.features.mastra.subAgents,t.input.agentId);if(!n)throw new M(`Agent not found: ${t.input.agentId}`);let r=t.input.name.trim();if(!/^[a-z][a-z0-9-]*$/.test(r))throw new ir(`Invalid skill name: ${t.input.name}. Must be lowercase kebab-case.`);n.skills.includes(r)||n.skills.push(r)},removeAgentSkillOperation(e,t){if(!e.features.mastra.enabled)throw new j(`Cannot remove skill when Mastra is disabled.`);let n=P(e.features.mastra.mainAgent,e.features.mastra.subAgents,t.input.agentId);if(!n)throw new M(`Agent not found: ${t.input.agentId}`);let r=n.skills.indexOf(t.input.name);if(r===-1)throw new ar(`Skill not on agent: ${t.input.name}`);n.skills.splice(r,1)},addAgentToolPatternOperation(e,t){if(!e.features.mastra.enabled)throw new j(`Cannot add tool pattern when Mastra is disabled.`);let n=P(e.features.mastra.mainAgent,e.features.mastra.subAgents,t.input.agentId);if(!n)throw new M(`Agent not found: ${t.input.agentId}`);let r=t.input.pattern.trim();if(!r)throw new or(`Tool pattern must not be empty after trimming.`);n.toolPatterns.includes(r)||n.toolPatterns.push(r)},removeAgentToolPatternOperation(e,t){if(!e.features.mastra.enabled)throw new j(`Cannot remove tool pattern when Mastra is disabled.`);let n=P(e.features.mastra.mainAgent,e.features.mastra.subAgents,t.input.agentId);if(!n)throw new M(`Agent not found: ${t.input.agentId}`);let r=n.toolPatterns.indexOf(t.input.pattern);if(r===-1)throw new sr(`Tool pattern not on agent: ${t.input.pattern}`);n.toolPatterns.splice(r,1)}},I=class extends Error{errorCode=`MastraNotEnabledError`;constructor(e=`MastraNotEnabledError`){super(e)}},cr=class extends Error{errorCode=`InvalidAgentNameError`;constructor(e=`InvalidAgentNameError`){super(e)}},lr=class extends Error{errorCode=`InvalidAgentImageError`;constructor(e=`InvalidAgentImageError`){super(e)}},L={setMainAgentNameOperation(e,t){let n=e.features.mastra.mainAgent;if(!e.features.mastra.enabled||!n)throw new I(`Cannot set main agent name when Mastra is disabled.`);let r=t.input.name.trim();if(!r)throw new cr(`Agent name must not be empty.`);n.name=r},setMainAgentDescriptionOperation(e,t){let n=e.features.mastra.mainAgent;if(!e.features.mastra.enabled||!n)throw new I(`Cannot set main agent description when Mastra is disabled.`);n.description=t.input.description},clearMainAgentDescriptionOperation(e){let t=e.features.mastra.mainAgent;if(!e.features.mastra.enabled||!t)throw new I(`Cannot clear main agent description when Mastra is disabled.`);t.description=null},setMainAgentImageOperation(e,t){let n=e.features.mastra.mainAgent;if(!e.features.mastra.enabled||!n)throw new I(`Cannot set main agent image when Mastra is disabled.`);if(!t.input.attachment.startsWith(`attachment://`))throw new lr(`Agent image must be an attachment ref (attachment://...)`);n.attachment=t.input.attachment},clearMainAgentImageOperation(e){let t=e.features.mastra.mainAgent;if(!e.features.mastra.enabled||!t)throw new I(`Cannot clear main agent image when Mastra is disabled.`);t.attachment=null}},ur=class extends Error{errorCode=`MastraNotEnabledError`;constructor(e=`MastraNotEnabledError`){super(e)}},dr=class extends Error{errorCode=`InvalidModelIdError`;constructor(e=`InvalidModelIdError`){super(e)}},fr=class extends Error{errorCode=`DuplicateModelError`;constructor(e=`DuplicateModelError`){super(e)}},pr=class extends Error{errorCode=`ModelNotFoundError`;constructor(e=`ModelNotFoundError`){super(e)}},mr=class extends Error{errorCode=`ModelInUseError`;constructor(e=`ModelInUseError`){super(e)}},hr={addModelOperation(e,t){if(!e.features.mastra.enabled)throw new ur(`Cannot add model when Mastra is disabled.`);if(!/^[a-z0-9-]+\/[a-z0-9._-]+$/.test(t.input.id))throw new dr(`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 fr(`Model already exists: ${t.input.id}`);e.features.mastra.models.push({id:t.input.id})},removeModelOperation(e,t){if(!e.features.mastra.enabled)throw new ur(`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 pr(`Model not found: ${t.input.id}`);let r=e.features.mastra.mainAgent,i=!!r&&r.modelId===t.input.id,a=e.features.mastra.subAgents.some(e=>e.modelId===t.input.id);if(i||a)throw new mr(`Model ${t.input.id} is in use by an agent.`);e.features.mastra.models.splice(n,1)}},R=class extends Error{errorCode=`MastraNotEnabledError`;constructor(e=`MastraNotEnabledError`){super(e)}},gr=class extends Error{errorCode=`InvalidProfileIdError`;constructor(e=`InvalidProfileIdError`){super(e)}},_r=class extends Error{errorCode=`DuplicateProfileError`;constructor(e=`DuplicateProfileError`){super(e)}},z=class extends Error{errorCode=`ProfileNotFoundError`;constructor(e=`ProfileNotFoundError`){super(e)}},vr=class extends Error{errorCode=`ProfileInUseError`;constructor(e=`ProfileInUseError`){super(e)}},B={addProfileOperation(e,t){if(!e.features.mastra.enabled)throw new R(`Cannot add profile when Mastra is disabled.`);if(!/^[a-z][a-z0-9-]*$/.test(t.input.id))throw new gr(`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 _r(`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 z(`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 R(`Cannot update profile when Mastra is disabled.`);let n=e.features.mastra.profiles.find(e=>e.id===t.input.id);if(!n)throw new z(`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 R(`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 z(`Profile not found: ${t.input.id}`);let r=e.features.mastra.mainAgent,i=!!r&&r.profileIds.includes(t.input.id),a=e.features.mastra.subAgents.some(e=>e.profileIds.includes(t.input.id));if(i||a)throw new vr(`Profile ${t.input.id} is in use by an agent.`);e.features.mastra.profiles.splice(n,1)},reorderProfilesOperation(e,t){if(!e.features.mastra.enabled)throw new R(`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 z(`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 z(`insertBefore profile not found: ${t.input.insertBefore}`);e.features.mastra.profiles.splice(r,0,...n)}else e.features.mastra.profiles.push(...n)}},V=class extends Error{errorCode=`MastraNotEnabledError`;constructor(e=`MastraNotEnabledError`){super(e)}},yr=class extends Error{errorCode=`InvalidAgentIdError`;constructor(e=`InvalidAgentIdError`){super(e)}},br=class extends Error{errorCode=`InvalidAgentNameError`;constructor(e=`InvalidAgentNameError`){super(e)}},xr=class extends Error{errorCode=`DuplicateAgentIdError`;constructor(e=`DuplicateAgentIdError`){super(e)}},Sr=class extends Error{errorCode=`ModelReferenceNotFoundError`;constructor(e=`ModelReferenceNotFoundError`){super(e)}},H=class extends Error{errorCode=`AgentNotFoundError`;constructor(e=`AgentNotFoundError`){super(e)}},U={addSubAgentOperation(e,t){let n=e.features.mastra.mainAgent;if(!e.features.mastra.enabled||!n)throw new V(`Cannot add sub-agent when Mastra is disabled.`);if(!/^[a-z][a-z0-9-]*$/.test(t.input.id))throw new yr(`Invalid sub-agent ID: ${t.input.id}. Must be lowercase kebab-case.`);let r=t.input.name.trim();if(!r)throw new br(`Sub-agent name must not be empty.`);if(n.id===t.input.id)throw new xr(`Agent ID already taken by main agent: ${t.input.id}`);if(e.features.mastra.subAgents.find(e=>e.id===t.input.id))throw new xr(`Sub-agent already exists: ${t.input.id}`);if(!e.features.mastra.models.find(e=>e.id===t.input.modelId))throw new Sr(`Model not in library: ${t.input.modelId}`);e.features.mastra.subAgents.push({id:t.input.id,name:r,description:t.input.description,modelId:t.input.modelId,profileIds:[],skills:[],toolPatterns:[]})},removeSubAgentOperation(e,t){if(!e.features.mastra.enabled)throw new V(`Cannot remove sub-agent when Mastra is disabled.`);let n=e.features.mastra.subAgents.findIndex(e=>e.id===t.input.id);if(n===-1)throw new H(`Sub-agent not found: ${t.input.id}`);e.features.mastra.subAgents.splice(n,1)},setSubAgentNameOperation(e,t){if(!e.features.mastra.enabled)throw new V(`Cannot set sub-agent name when Mastra is disabled.`);let n=e.features.mastra.subAgents.find(e=>e.id===t.input.id);if(!n)throw new H(`Sub-agent not found: ${t.input.id}`);let r=t.input.name.trim();if(!r)throw new br(`Sub-agent name must not be empty.`);n.name=r},setSubAgentDescriptionOperation(e,t){if(!e.features.mastra.enabled)throw new V(`Cannot set sub-agent description when Mastra is disabled.`);let n=e.features.mastra.subAgents.find(e=>e.id===t.input.id);if(!n)throw new H(`Sub-agent not found: ${t.input.id}`);n.description=t.input.description}},Cr=class extends Error{errorCode=`DuplicatePackageError`;constructor(e=`DuplicatePackageError`){super(e)}},W=class extends Error{errorCode=`PackageNotFoundError`;constructor(e=`PackageNotFoundError`){super(e)}},wr=class extends Error{errorCode=`CannotRemoveManagedPackageError`;constructor(e=`CannotRemoveManagedPackageError`){super(e)}},Tr=class extends Error{errorCode=`InvalidDocumentTypeError`;constructor(e=`InvalidDocumentTypeError`){super(e)}},Er=class extends Error{errorCode=`DuplicateDocumentTypeError`;constructor(e=`DuplicateDocumentTypeError`){super(e)}},Dr=class extends Error{errorCode=`DocumentTypeNotFoundError`;constructor(e=`DocumentTypeNotFoundError`){super(e)}},Or=class extends Error{errorCode=`InvalidVersionError`;constructor(e=`InvalidVersionError`){super(e)}},kr=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/,G={addPowerhousePackageOperation(e,t){if(e.packages.find(e=>e.id===t.input.id||e.packageName===t.input.packageName))throw new Cr(`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 W(`Package not found: ${t.input.id}`);if(e.packages[n].managed)throw new wr(`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 Tr(`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 W(`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 Er(`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 W(`Package not found: ${t.input.packageId}`);let r=n.documentTypes.indexOf(t.input.documentType);if(r===-1)throw new Dr(`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 W(`Package not found: ${t.input.packageId}`);if(t.input.version!=null&&!kr.test(t.input.version))throw new Or(`Invalid version: ${t.input.version}`);n.version=t.input.version||null}},Ar=class extends Error{errorCode=`InvalidVersionError`;constructor(e=`InvalidVersionError`){super(e)}},jr=class extends Error{errorCode=`PublishRecordNotFoundError`;constructor(e=`PublishRecordNotFoundError`){super(e)}},K={bumpVersionOperation(e,t){if(!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(t.input.version))throw new Ar(`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 jr(`Publish record not found: ${t.input.id}`);n.status=t.input.status}},q=a((e,t,n)=>{if(i(t))return e;switch(t.type){case`SET_DESCRIPTION`:_e().parse(t.input),A.setDescriptionOperation(e[t.scope],t,n);break;case`SET_VERSION`:ke().parse(t.input),A.setVersionOperation(e[t.scope],t,n);break;case`SET_PACKAGE_IDENTIFIER`:Ce().parse(t.input),A.setPackageIdentifierOperation(e[t.scope],t,n);break;case`SET_POWERHOUSE_LEVEL`:ze().parse(t.input),Zn.setPowerhouseLevelOperation(e[t.scope],t,n);break;case`ENABLE_ROUTINE`:c().parse(t.input),Qn.enableRoutineOperation(e[t.scope],t,n);break;case`DISABLE_ROUTINE`:Mn().parse(t.input),Qn.disableRoutineOperation(e[t.scope],t,n);break;case`ADD_POWERHOUSE_PACKAGE`:y().parse(t.input),G.addPowerhousePackageOperation(e[t.scope],t,n);break;case`REMOVE_POWERHOUSE_PACKAGE`:u().parse(t.input),G.removePowerhousePackageOperation(e[t.scope],t,n);break;case`ADD_PACKAGE_DOCUMENT_TYPE`:o().parse(t.input),G.addPackageDocumentTypeOperation(e[t.scope],t,n);break;case`REMOVE_PACKAGE_DOCUMENT_TYPE`:On().parse(t.input),G.removePackageDocumentTypeOperation(e[t.scope],t,n);break;case`SET_PACKAGE_VERSION`:Me().parse(t.input),G.setPackageVersionOperation(e[t.scope],t,n);break;case`ADD_EXTERNAL_SKILL`:Ye().parse(t.input),D.addExternalSkillOperation(e[t.scope],t,n);break;case`REMOVE_EXTERNAL_SKILL`:l().parse(t.input),D.removeExternalSkillOperation(e[t.scope],t,n);break;case`SET_EXTERNAL_SKILL_NAME`:le().parse(t.input),D.setExternalSkillNameOperation(e[t.scope],t,n);break;case`SET_EXTERNAL_SKILL_GITHUB_URL`:b().parse(t.input),D.setExternalSkillGithubUrlOperation(e[t.scope],t,n);break;case`BUMP_VERSION`:we().parse(t.input),K.bumpVersionOperation(e[t.scope],t,n);break;case`PUBLISH_DEV`:f().parse(t.input),K.publishDevOperation(e[t.scope],t,n);break;case`PUBLISH_STAGING`:m().parse(t.input),K.publishStagingOperation(e[t.scope],t,n);break;case`PUBLISH_PRODUCTION`:C().parse(t.input),K.publishProductionOperation(e[t.scope],t,n);break;case`SET_PUBLISH_STATUS`:jn().parse(t.input),K.setPublishStatusOperation(e[t.scope],t,n);break;case`IMPORT_SPEC`:Fe().parse(t.input),nr.importSpecOperation(e[t.scope],t,n);break;case`ADD_SUPPORTED_RESOURCE`:Qe().parse(t.input),T.addSupportedResourceOperation(e[t.scope],t,n);break;case`REMOVE_SUPPORTED_RESOURCE`:me().parse(t.input),T.removeSupportedResourceOperation(e[t.scope],t,n);break;case`SET_PROXY_ENABLED`:nt().parse(t.input),T.setProxyEnabledOperation(e[t.scope],t,n);break;case`SET_OBSERVABILITY_ENABLED`:Ze().parse(t.input),T.setObservabilityEnabledOperation(e[t.scope],t,n);break;case`ENABLE_MASTRA`:fe().parse(t.input),O.enableMastraOperation(e[t.scope],t,n);break;case`DISABLE_MASTRA`:rt().parse(t.input),O.disableMastraOperation(e[t.scope],t,n);break;case`SET_ENABLE_CHAT`:Je().parse(t.input),O.setEnableChatOperation(e[t.scope],t,n);break;case`ADD_MODEL`:x().parse(t.input),hr.addModelOperation(e[t.scope],t,n);break;case`REMOVE_MODEL`:yn().parse(t.input),hr.removeModelOperation(e[t.scope],t,n);break;case`ADD_PROFILE`:Ue().parse(t.input),B.addProfileOperation(e[t.scope],t,n);break;case`UPDATE_PROFILE`:dt().parse(t.input),B.updateProfileOperation(e[t.scope],t,n);break;case`REMOVE_PROFILE`:Tn().parse(t.input),B.removeProfileOperation(e[t.scope],t,n);break;case`REORDER_PROFILES`:ct().parse(t.input),B.reorderProfilesOperation(e[t.scope],t,n);break;case`SET_MAIN_AGENT_NAME`:Ge().parse(t.input),L.setMainAgentNameOperation(e[t.scope],t,n);break;case`SET_MAIN_AGENT_DESCRIPTION`:v().parse(t.input),L.setMainAgentDescriptionOperation(e[t.scope],t,n);break;case`CLEAR_MAIN_AGENT_DESCRIPTION`:Ne().parse(t.input),L.clearMainAgentDescriptionOperation(e[t.scope],t,n);break;case`SET_MAIN_AGENT_IMAGE`:He().parse(t.input),L.setMainAgentImageOperation(e[t.scope],t,n);break;case`CLEAR_MAIN_AGENT_IMAGE`:Be().parse(t.input),L.clearMainAgentImageOperation(e[t.scope],t,n);break;case`ADD_SUB_AGENT`:Ke().parse(t.input),U.addSubAgentOperation(e[t.scope],t,n);break;case`REMOVE_SUB_AGENT`:at().parse(t.input),U.removeSubAgentOperation(e[t.scope],t,n);break;case`SET_SUB_AGENT_NAME`:s().parse(t.input),U.setSubAgentNameOperation(e[t.scope],t,n);break;case`SET_SUB_AGENT_DESCRIPTION`:de().parse(t.input),U.setSubAgentDescriptionOperation(e[t.scope],t,n);break;case`SET_AGENT_MODEL`:be().parse(t.input),F.setAgentModelOperation(e[t.scope],t,n);break;case`ADD_AGENT_PROFILE_REF`:lt().parse(t.input),F.addAgentProfileRefOperation(e[t.scope],t,n);break;case`REMOVE_AGENT_PROFILE_REF`:w().parse(t.input),F.removeAgentProfileRefOperation(e[t.scope],t,n);break;case`REORDER_AGENT_PROFILE_REFS`:Sn().parse(t.input),F.reorderAgentProfileRefsOperation(e[t.scope],t,n);break;case`ADD_AGENT_SKILL`:xe().parse(t.input),F.addAgentSkillOperation(e[t.scope],t,n);break;case`REMOVE_AGENT_SKILL`:_().parse(t.input),F.removeAgentSkillOperation(e[t.scope],t,n);break;case`ADD_AGENT_TOOL_PATTERN`:ve().parse(t.input),F.addAgentToolPatternOperation(e[t.scope],t,n);break;case`REMOVE_AGENT_TOOL_PATTERN`:g().parse(t.input),F.removeAgentToolPatternOperation(e[t.scope],t,n);break;default:return e}}),J=[1],Mr=J[0],Y={documentType:`powerhouse/ph-clint-project`,latestVersion:Mr,supportedVersions:J,upgrades:{}},Nr={name:null,scope:null,version:`0.1.0`,description:``,features:{powerhouse:`Disabled`,mastra:{enabled:!1,mainAgent:null,subAgents:[],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`]}},Pr={},X={fileExtension:`pcp`,createState(e){return{...r(),global:{...Nr,...e?.global},local:{...Pr,...e?.local}}},createDocument(e){return ee(X.createState,e,h)},saveToFileHandle(e,t){return te(e,t)},loadFromInput(e){return ne(e,{reducers:{1:q},upgradeManifest:Y})},isStateOfType(e){return p(e)},assertIsStateOfType(e){return S(e)},isDocumentOfType(e){return hn(e)},assertIsDocumentOfType(e){return d(e)}},Fr=e({}),Ir={...X,...Fr},Z={version:1,reducer:q,actions:en,utils:Ir,documentModel:ie(r(),Bn)},Lr=ae.forDocumentModel(Z);function Q(){return{name:null,scope:null,version:`0.1.0`,description:``,features:{powerhouse:`Disabled`,mastra:{enabled:!1,mainAgent:null,subAgents:[],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 $(){return{}}function Rr(){return{...r(),global:Q(),local:$()}}function zr(e){return{...Q(),...e||{}}}function Br(e){return{...$(),...e||{}}}function Vr(e,t,n){return{...re(e?.auth,e?.document),global:zr(t),local:Br(n)}}function Hr(e){return X.createDocument(e?Vr(re(e.auth,e.document),e.global,e.local):void 0)}var Ur=[Z],Wr=[Y],Gr=[{Component:Fn(()=>n(()=>import(`./editor-Bds50MuL.js`),__vite__mapDeps([26,3,2,1,4,5,6,7,8,9,10,11,12,27]))),documentTypes:[`powerhouse/ph-clint-project`],config:{id:`ph-clint-project-editor`,name:`PhClintProjectEditor`}}],Kr=async e=>{let{processorFactoryBuilders:t}=e.processorApp===`connect`?await n(()=>import(`./connect-DGfzdELb.js`),[]):await n(()=>import(`./switchboard-CPQzDmSh.js`),[]),r=await Promise.all(t.map(async t=>await t(e)));return async t=>{let n=[];for(let i of r){let r=await i(t,e.processorApp);n.push(...r)}return n}},qr=e({AddAgentProfileRefInputSchema:()=>lt,AddAgentSkillInputSchema:()=>xe,AddAgentToolPatternInputSchema:()=>ve,AddExternalSkillInputSchema:()=>Ye,AddModelInputSchema:()=>x,AddPackageDocumentTypeInputSchema:()=>o,AddPowerhousePackageInputSchema:()=>y,AddProfileInputSchema:()=>Ue,AddSubAgentInputSchema:()=>Ke,AddSupportedResourceInputSchema:()=>Qe,BumpVersionInputSchema:()=>we,ClearMainAgentDescriptionInputSchema:()=>Ne,ClearMainAgentImageInputSchema:()=>Be,DisableMastraInputSchema:()=>rt,DisableRoutineInputSchema:()=>Mn,EnableMastraInputSchema:()=>fe,EnableRoutineInputSchema:()=>c,ExternalSkillSchema:()=>Ae,ImportMainAgentInputSchema:()=>ft,ImportModelInputSchema:()=>gt,ImportPackageInputSchema:()=>De,ImportProfileInputSchema:()=>Le,ImportSkillInputSchema:()=>an,ImportSpecInputSchema:()=>Fe,ImportSubAgentInputSchema:()=>bt,PhClintAgentModelSchema:()=>vt,PhClintAgentProfileSchema:()=>St,PhClintDeploymentSchema:()=>et,PhClintFeaturesSchema:()=>se,PhClintMainAgentSchema:()=>Mt,PhClintMastraCommonSchema:()=>pn,PhClintMastraFeatureSchema:()=>Yt,PhClintProject:()=>Z,PhClintProjectController:()=>Lr,PhClintProjectDocumentHeaderSchema:()=>Tt,PhClintProjectDocumentSchema:()=>Zt,PhClintProjectPHStateSchema:()=>ln,PhClintProjectStateSchema:()=>sn,PhClintRoutineFeatureSchema:()=>Vt,PhClintSubAgentSchema:()=>Et,PowerhouseLevelSchema:()=>Qt,PowerhousePackageSchema:()=>un,PublishDevInputSchema:()=>f,PublishProductionInputSchema:()=>C,PublishRecordSchema:()=>gn,PublishStagingInputSchema:()=>m,PublishStatusSchema:()=>Pt,PublishTagSchema:()=>tn,RemoveAgentProfileRefInputSchema:()=>w,RemoveAgentSkillInputSchema:()=>_,RemoveAgentToolPatternInputSchema:()=>g,RemoveExternalSkillInputSchema:()=>l,RemoveModelInputSchema:()=>yn,RemovePackageDocumentTypeInputSchema:()=>On,RemovePowerhousePackageInputSchema:()=>u,RemoveProfileInputSchema:()=>Tn,RemoveSubAgentInputSchema:()=>at,RemoveSupportedResourceInputSchema:()=>me,ReorderAgentProfileRefsInputSchema:()=>Sn,ReorderProfilesInputSchema:()=>ct,SetAgentModelInputSchema:()=>be,SetDescriptionInputSchema:()=>_e,SetEnableChatInputSchema:()=>Je,SetExternalSkillGithubUrlInputSchema:()=>b,SetExternalSkillNameInputSchema:()=>le,SetMainAgentDescriptionInputSchema:()=>v,SetMainAgentImageInputSchema:()=>He,SetMainAgentNameInputSchema:()=>Ge,SetObservabilityEnabledInputSchema:()=>Ze,SetPackageIdentifierInputSchema:()=>Ce,SetPackageVersionInputSchema:()=>Me,SetPowerhouseLevelInputSchema:()=>ze,SetProxyEnabledInputSchema:()=>nt,SetPublishStatusInputSchema:()=>jn,SetSubAgentDescriptionInputSchema:()=>de,SetSubAgentNameInputSchema:()=>s,SetVersionInputSchema:()=>ke,UpdateProfileInputSchema:()=>dt,actions:()=>en,addAgentProfileRef:()=>Te,addAgentSkill:()=>Ie,addAgentToolPattern:()=>rn,addExternalSkill:()=>zt,addModel:()=>je,addPackageDocumentType:()=>Ot,addPowerhousePackage:()=>wn,addProfile:()=>Ut,addSubAgent:()=>ye,addSupportedResource:()=>kt,assertIsPhClintProjectDocument:()=>d,assertIsPhClintProjectState:()=>S,bumpVersion:()=>Kt,clearMainAgentDescription:()=>An,clearMainAgentImage:()=>ue,createPhClintProjectDocument:()=>Hr,createState:()=>Vr,defaultGlobalState:()=>Q,defaultLocalState:()=>$,defaultPHState:()=>Rr,definedNonNullAnySchema:()=>ht,disableMastra:()=>Ft,disableRoutine:()=>dn,documentModel:()=>Bn,documentModels:()=>Ur,editors:()=>Gr,enableMastra:()=>nn,enableRoutine:()=>At,importSpec:()=>mn,initialGlobalState:()=>Nr,initialLocalState:()=>Pr,isDefinedNonNullAny:()=>Ee,isPhClintProjectDocument:()=>hn,isPhClintProjectState:()=>p,latestVersion:()=>Mr,manifest:()=>Jr,phClintProjectDeploymentActions:()=>En,phClintProjectDocumentType:()=>h,phClintProjectExternalSkillsActions:()=>Lt,phClintProjectFeaturesMastraActions:()=>jt,phClintProjectFeaturesPowerhouseActions:()=>Gt,phClintProjectFeaturesRoutineActions:()=>$t,phClintProjectIdentityActions:()=>Xt,phClintProjectLifecycleActions:()=>Nt,phClintProjectMastraAgentBindingsActions:()=>Pe,phClintProjectMastraMainAgentActions:()=>pt,phClintProjectMastraModelsActions:()=>Re,phClintProjectMastraProfilesActions:()=>Ve,phClintProjectMastraSubAgentsActions:()=>ge,phClintProjectPowerhousePackagesActions:()=>it,phClintProjectPublishingActions:()=>Rt,phClintProjectUpgradeManifest:()=>Y,processorFactory:()=>Kr,publishDev:()=>It,publishProduction:()=>Ct,publishStaging:()=>vn,reducer:()=>q,removeAgentProfileRef:()=>yt,removeAgentSkill:()=>_t,removeAgentToolPattern:()=>xt,removeExternalSkill:()=>wt,removeModel:()=>tt,removePackageDocumentType:()=>pe,removePowerhousePackage:()=>xn,removeProfile:()=>We,removeSubAgent:()=>qe,removeSupportedResource:()=>ot,reorderAgentProfileRefs:()=>$e,reorderProfiles:()=>Xe,setAgentModel:()=>oe,setDescription:()=>cn,setEnableChat:()=>qt,setExternalSkillGithubUrl:()=>bn,setExternalSkillName:()=>kn,setMainAgentDescription:()=>Oe,setMainAgentImage:()=>ut,setMainAgentName:()=>mt,setObservabilityEnabled:()=>he,setPackageIdentifier:()=>Ht,setPackageVersion:()=>st,setPowerhouseLevel:()=>_n,setProxyEnabled:()=>Cn,setPublishStatus:()=>Dn,setSubAgentDescription:()=>Wt,setSubAgentName:()=>ce,setVersion:()=>Dt,supportedVersions:()=>J,updateProfile:()=>Se,upgradeManifests:()=>Wr,usePhClintProjectDocumentById:()=>fn,usePhClintProjectDocumentsInSelectedDrive:()=>Jt,usePhClintProjectDocumentsInSelectedFolder:()=>on,useSelectedPhClintProjectDocument:()=>Bt,utils:()=>Ir}),Jr=zn,{updateLocalPackage:Yr}=Rn(qr);(void 0)?.accept([`./index.js`],([e])=>{e&&Yr(e)});
1104
- //# sourceMappingURL=index-Bgr9U9X9.js.map
1104
+ //# sourceMappingURL=index-xE_aP4qB.js.map