@powerhousedao/shared 6.2.3-dev.30 → 6.2.3-dev.32

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 (53) hide show
  1. package/dist/clis/args/{connect-B6xK4YI_.mjs → connect-BG3HkYBk.mjs} +2 -2
  2. package/dist/clis/args/connect-BG3HkYBk.mjs.map +1 -0
  3. package/dist/clis/args/connect.mjs +1 -1
  4. package/dist/clis/args/{generate-10dooJ-D.mjs → generate-BOItUNvP.mjs} +2 -7
  5. package/dist/clis/args/generate-BOItUNvP.mjs.map +1 -0
  6. package/dist/clis/args/{generate-DmgiCzuf.d.mts → generate-BPBBLeUD.d.mts} +1 -4
  7. package/dist/clis/args/generate-BPBBLeUD.d.mts.map +1 -0
  8. package/dist/clis/args/generate.d.mts +1 -1
  9. package/dist/clis/args/generate.mjs +1 -1
  10. package/dist/clis/args/{help-yRmplJjW.mjs → help-DS1NlcJQ.mjs} +3 -3
  11. package/dist/clis/args/{help-yRmplJjW.mjs.map → help-DS1NlcJQ.mjs.map} +1 -1
  12. package/dist/clis/args/help.mjs +1 -1
  13. package/dist/clis/args/index.d.mts +1 -1
  14. package/dist/clis/args/index.mjs +3 -3
  15. package/dist/clis/build-pieces.d.mts +4 -5
  16. package/dist/clis/build-pieces.d.mts.map +1 -1
  17. package/dist/clis/build-pieces.mjs +18 -11
  18. package/dist/clis/build-pieces.mjs.map +1 -1
  19. package/dist/clis/constants.d.mts +1 -1
  20. package/dist/clis/index.d.mts +40 -7
  21. package/dist/clis/index.d.mts.map +1 -1
  22. package/dist/clis/index.mjs +30 -10
  23. package/dist/clis/index.mjs.map +1 -1
  24. package/dist/clis/{types-CMFHKrgv.d.mts → types-NHa-Kayi.d.mts} +12 -1
  25. package/dist/clis/{types-CMFHKrgv.d.mts.map → types-NHa-Kayi.d.mts.map} +1 -1
  26. package/dist/{config-loader-SYDWHtqk.js → config-loader-3oqy1hN4.js} +17 -4
  27. package/dist/config-loader-3oqy1hN4.js.map +1 -0
  28. package/dist/connect/config-loader.d.ts +8 -1
  29. package/dist/connect/config-loader.d.ts.map +1 -1
  30. package/dist/connect/config-loader.js +2 -2
  31. package/dist/connect/index.d.ts +30 -5
  32. package/dist/connect/index.d.ts.map +1 -1
  33. package/dist/connect/index.js +29 -4
  34. package/dist/connect/index.js.map +1 -1
  35. package/dist/document-drive/index.d.ts +4 -4
  36. package/dist/document-model/index.d.ts +2 -2
  37. package/dist/{index-CDDyUSHE.d.ts → index-BHdnKfWp.d.ts} +2 -2
  38. package/dist/{index-CDDyUSHE.d.ts.map → index-BHdnKfWp.d.ts.map} +1 -1
  39. package/dist/{index-D0JljlgO.d.ts → index-skEwkUNm.d.ts} +2 -2
  40. package/dist/{index-D0JljlgO.d.ts.map → index-skEwkUNm.d.ts.map} +1 -1
  41. package/dist/index.d.ts +4 -4
  42. package/dist/processors/index.d.ts +1 -1
  43. package/dist/registry/index.d.ts +2 -2
  44. package/dist/registry/manifest-slim.d.ts +2 -2
  45. package/dist/{types-xLPOHE23.d.ts → types-Dr6-2rMp.d.ts} +13 -2
  46. package/dist/{types-xLPOHE23.d.ts.map → types-Dr6-2rMp.d.ts.map} +1 -1
  47. package/dist/{types-VDHUeQnm.d.ts → types-DvE2gUGf.d.ts} +3 -3
  48. package/dist/{types-VDHUeQnm.d.ts.map → types-DvE2gUGf.d.ts.map} +1 -1
  49. package/package.json +1 -1
  50. package/dist/clis/args/connect-B6xK4YI_.mjs.map +0 -1
  51. package/dist/clis/args/generate-10dooJ-D.mjs.map +0 -1
  52. package/dist/clis/args/generate-DmgiCzuf.d.mts.map +0 -1
  53. package/dist/config-loader-SYDWHtqk.js.map +0 -1
@@ -273,6 +273,16 @@ type PHConnectSentry = {
273
273
  /** Enable Sentry performance tracing. */
274
274
  tracing?: boolean;
275
275
  };
276
+ type PHConnectOpenPanel = {
277
+ /** OpenPanel client id. Empty string (the default) disables OpenPanel. */
278
+ clientId?: string;
279
+ /** OpenPanel API URL, for self-hosted instances. */
280
+ apiUrl?: string;
281
+ /** Track UI events. */
282
+ trackUiEvents?: boolean;
283
+ /** Track document operations. */
284
+ trackOperations?: boolean;
285
+ };
276
286
  type PHConnectInstance = {
277
287
  namespace: string | null;
278
288
  reactorWorker: boolean;
@@ -400,6 +410,7 @@ type PHConnectRuntimeConfig = {
400
410
  drives?: PHConnectDrives;
401
411
  renown?: PHConnectRenown;
402
412
  sentry?: PHConnectSentry;
413
+ openPanel?: PHConnectOpenPanel;
403
414
  instance?: PHConnectInstance;
404
415
  reactor?: PHConnectReactor;
405
416
  pwa?: PHConnectPwa;
@@ -525,4 +536,4 @@ type Manifest = z.infer<typeof ManifestSchema>;
525
536
  //#endregion
526
537
  export { PIECES_FRAMEWORK_PACKAGE as A, VERSIONED_DEPENDENCIES as B, LEGACY_LINT_FORMAT_FILES as C, PH_BIN as D, PEER_EXTERNAL_DEPENDENCIES as E, PROJECT_PORT_BAND_SWITCHBOARD as F, externalDevDependencies as G, VERSIONED_PEER_DEPENDENCIES as H, PROJECT_PORT_BAND_VETRA_CONNECT as I, packageJsonExports as K, REACTOR_API_PACKAGE as L, POWERHOUSE_GLOBAL_DIR as M, PROJECT_PORT_BAND_SIZE as N, PH_GLOBAL_DIR_NAME as O, PROJECT_PORT_BAND_STUDIO as P, SECONDS_IN_DAY as R, LEGACY_LINT_FORMAT_DEPENDENCIES as S, MINIMUM_NODE_VERSION as T, defaultManifest as U, VERSIONED_DEV_DEPENDENCIES as V, externalDependencies as W, DRIVES_PRESERVE_STRATEGIES as _, DEFAULT_CONFIG as a, GRAPHQL_TAG_PACKAGE as b, DEFAULT_CONNECT_STUDIO_PORT as c, DEFAULT_REGISTRY_URL as d, DEFAULT_RENOWN_URL as f, DEFAULT_VETRA_DRIVE_ID as g, DEFAULT_VETRA_CONNECT_PORT as h, BOILERPLATE_DEPENDENCY_OVERRIDES as i, POWERHOUSE_CONFIG_FILE as j, PH_GLOBAL_PROJECT_NAME as k, DEFAULT_EXPIRY_DAYS as l, DEFAULT_TIMEOUT as m, ANALYTICS_ENGINE_CORE_PACKAGE as n, DEFAULT_CONNECT_OUTDIR as o, DEFAULT_SWITCHBOARD_PORT as p, packageScripts as q, BOILERPLATE_ALLOWED_BUILDS as r, DEFAULT_CONNECT_PREVIEW_PORT as s, Manifest as t, DEFAULT_EXPIRY_SECONDS as u, FEATURE_DEPENDENCIES as v, LOG_LEVELS as w, HOME_DIR as x, GRAPHQL_PACKAGE as y, SERVICE_ACTIONS as z };
527
538
  export {};
528
- //# sourceMappingURL=types-CMFHKrgv.d.mts.map
539
+ //# sourceMappingURL=types-NHa-Kayi.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-CMFHKrgv.d.mts","names":[],"sources":["../../clis/constants.ts","../../clis/types.ts","../../document-model/schemas.ts","../../document-model/types.ts"],"mappings":";;;;;;;cAKa;cAQA;cACA;cACA;cAEA;cAKA;cAQA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAqBA;cACA;cACA;cACA;cAEA;cAEA;cACA;cACA;cACA;cAEA;cAEA;cAEA;cAGA;cAOA;cACA;cAEA;cACA;cACA;cAQA;;aACU;aAAa;;;aACT;aAAY;;;aAC5B;aAAa;;;aACP;aAAa;;;aACrB;aAAY;;;cAKR;;aAET;aACA;aACA;;;aAKA;aACA;aACA;;;cAWS;cAUA;cAiBA;WACC;WACN;WACI;;cAGC;cAQA;WACX;aACE;aACA;aACA;;WAEF;aACE;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAKF;aACE;aACA;;WAEF;aACE;aACA;;WAEF;WACA;;cAGW;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WAEA;;cAIW;cAIA;cAcA;cAwBA;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;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AU;EACV;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;IACE;IACA;MAIM;MACA;;IAEN;MACE;MACA;MACA;;;EAGJ;IACE;IACA;IACA,SAAS;;EAEX;IACE;MACE;;IAEF;;EAEF;IACE;IACA;IACA;IACA;;EAEF,WAAW;EACX;IACE;IACA;IACA;;EAIF;IACE;;EAEF;EACA,UAAU;;;;cC0fC,gBAAc,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiBzB,EAAA,KAAA;;;KC+zBU,WAAW,EAAE,aAAa"}
1
+ {"version":3,"file":"types-NHa-Kayi.d.mts","names":[],"sources":["../../clis/constants.ts","../../clis/types.ts","../../document-model/schemas.ts","../../document-model/types.ts"],"mappings":";;;;;;;cAKa;cAQA;cACA;cACA;cAEA;cAKA;cAQA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAqBA;cACA;cACA;cACA;cAEA;cAEA;cACA;cACA;cACA;cAEA;cAEA;cAEA;cAGA;cAOA;cACA;cAEA;cACA;cACA;cAQA;;aACU;aAAa;;;aACT;aAAY;;;aAC5B;aAAa;;;aACP;aAAa;;;aACrB;aAAY;;;cAKR;;aAET;aACA;aACA;;;aAKA;aACA;aACA;;;cAWS;cAUA;cAiBA;WACC;WACN;WACI;;cAGC;cAQA;WACX;aACE;aACA;aACA;;WAEF;aACE;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAKF;aACE;aACA;;WAEF;aACE;aACA;;WAEF;WACA;;cAGW;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WAEA;;cAIW;cAIA;cAcA;cAwBA;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA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U;EAEV,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;IACE;IACA;MAIM;MACA;;IAEN;MACE;MACA;MACA;;;EAGJ;IACE;IACA;IACA,SAAS;;EAEX;IACE;MACE;;IAEF;;EAEF;IACE;IACA;IACA;IACA;;EAEF,WAAW;EACX;IACE;IACA;IACA;;EAIF;IACE;;EAEF;EACA,UAAU;;;;cC+eC,gBAAc,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiBzB,EAAA,KAAA;;;KC+zBU,WAAW,EAAE,aAAa"}
@@ -11,8 +11,7 @@ const DEFAULT_CONNECT_CONFIG = {
11
11
  logLevel: "info",
12
12
  basePath: "/",
13
13
  offline: true,
14
- studioMode: false,
15
- workflowsEnabled: false
14
+ studioMode: false
16
15
  },
17
16
  ai: { assistantEnabled: false },
18
17
  packages: {
@@ -45,6 +44,11 @@ const DEFAULT_CONNECT_CONFIG = {
45
44
  env: "dev",
46
45
  tracing: false
47
46
  },
47
+ openPanel: {
48
+ clientId: "",
49
+ trackUiEvents: true,
50
+ trackOperations: true
51
+ },
48
52
  instance: {
49
53
  namespace: null,
50
54
  reactorWorker: false
@@ -91,6 +95,15 @@ function deepMerge(base, patch) {
91
95
  return result;
92
96
  }
93
97
  /**
98
+ * The effective `connect.*` block of a source `powerhouse.config.json`:
99
+ * defaults < project-wide settings Connect follows < `connect.*`. So
100
+ * `connect.app.workflowsEnabled` falls back to `workflows.enabled`, and
101
+ * wins when set.
102
+ */
103
+ function resolveSourceConnect(source, defaults = DEFAULT_CONNECT_CONFIG) {
104
+ return deepMerge(deepMerge(defaults, { app: { workflowsEnabled: source.workflows?.enabled } }), source.connect ?? {});
105
+ }
106
+ /**
94
107
  * Pluggable loader on top of a `ConfigAdapter`.
95
108
  *
96
109
  * Responsibilities:
@@ -148,6 +161,6 @@ var ConfigLoader = class {
148
161
  }
149
162
  };
150
163
  //#endregion
151
- export { buildRuntimeConfig as i, deepMerge as n, DEFAULT_CONNECT_CONFIG as r, ConfigLoader as t };
164
+ export { buildRuntimeConfig as a, DEFAULT_CONNECT_CONFIG as i, deepMerge as n, resolveSourceConnect as r, ConfigLoader as t };
152
165
 
153
- //# sourceMappingURL=config-loader-SYDWHtqk.js.map
166
+ //# sourceMappingURL=config-loader-3oqy1hN4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-loader-3oqy1hN4.js","names":[],"sources":["../connect/runtime-config.ts","../connect/config-loader.ts"],"sourcesContent":["import type {\n PHConnectRuntimeConfig,\n PowerhouseConfig,\n PowerhousePackage,\n} from \"../clis/types.js\";\n\nexport type RuntimePowerhouseConfig = {\n schemaVersion: 2;\n packages: PowerhousePackage[];\n packageRegistryUrl?: string;\n localPackage: { name: string; version: string } | null;\n connect: PHConnectRuntimeConfig;\n};\n\n/** Defaults for every field Connect reads at runtime, merged into the\n * `connect.*` block at boot; also the dist emitter's and the scaffold's base. */\nexport const DEFAULT_CONNECT_CONFIG: PHConnectRuntimeConfig = {\n branding: {\n appName: \"Powerhouse Connect\",\n homeBackground: null,\n },\n app: {\n logLevel: \"info\",\n basePath: \"/\",\n offline: true,\n studioMode: false,\n },\n ai: {\n assistantEnabled: false,\n },\n packages: {\n externalEnabled: true,\n liveReload: false,\n },\n drives: {\n allowAddDrive: true,\n defaultDrives: [],\n sections: {\n remote: { enabled: true, allowAdd: true, allowDelete: true },\n local: { enabled: true, allowAdd: true, allowDelete: true },\n },\n },\n renown: {\n url: \"https://www.renown.id\",\n networkId: \"eip155\",\n chainId: 1,\n },\n sentry: {\n // `dsn: null` is the disabled-Sentry state — the SPA never loads the\n // Sentry SDK chunk. Override via `ph connect config --sentry-dsn ...`\n // or by including `connect.sentry.dsn` in PH_CONNECT_CONFIG_JSON.\n dsn: null,\n env: \"dev\",\n tracing: false,\n },\n openPanel: {\n // An empty `clientId` keeps OpenPanel disabled. Enable it per deploy by\n // including `connect.openPanel.clientId` in PH_CONNECT_CONFIG_JSON.\n // `apiUrl` has no default: unset means OpenPanel's hosted API.\n clientId: \"\",\n trackUiEvents: true,\n trackOperations: true,\n },\n instance: {\n namespace: null,\n reactorWorker: false,\n },\n reactor: {\n featureFlags: {\n documentDecisions: false,\n authEnforcement: false,\n authGroups: false,\n authConditions: false,\n },\n createSignaturePolicy: \"v2-required\",\n },\n};\n\nexport function buildRuntimeConfig(\n source: Pick<PowerhouseConfig, \"packages\" | \"connect\" | \"packageRegistryUrl\">,\n projectInfo: { name: string; version: string } | null,\n): RuntimePowerhouseConfig {\n const result: RuntimePowerhouseConfig = {\n schemaVersion: 2,\n packages: source.packages ?? [],\n localPackage: projectInfo,\n connect: source.connect ?? {},\n };\n if (\n typeof source.packageRegistryUrl === \"string\" &&\n source.packageRegistryUrl !== \"\"\n ) {\n result.packageRegistryUrl = source.packageRegistryUrl;\n }\n return result;\n}\n","// Environment-neutral config loader. Wraps a `ConfigAdapter` (the IO layer)\n// with in-process caching and deep-merge-with-defaults reads.\n//\n// No validation. The loader trusts that whatever bytes the adapter returns\n// can be merged into the default Connect config; missing or partial fields\n// fall back to DEFAULT_CONNECT_CONFIG, so the SPA always sees a complete\n// `connect.*` block.\n//\n// Top-level fields outside `connect.*` (e.g. `studio.port` in the source\n// powerhouse.config.json) pass through untouched on both read and write.\n// They're not Connect's concern, but a write-back round-trip preserves\n// them so editing tools don't accidentally drop them.\n\nimport { isPlainObject } from \"remeda\";\nimport type {\n PHConnectRuntimeConfig,\n PowerhouseConfig,\n} from \"../clis/types.js\";\nimport { DEFAULT_CONNECT_CONFIG } from \"./runtime-config.js\";\n\n/** Recursive Partial. Arrays are leaves — `write({ packages: [...] })`\n * replaces the array, it doesn't merge. */\nexport type DeepPartial<T> =\n T extends Array<infer U>\n ? Array<U>\n : T extends object\n ? { [K in keyof T]?: DeepPartial<T[K]> }\n : T;\n\n/**\n * Shape returned by `ConfigLoader.read()`. The loader is Connect-scoped:\n * it guarantees `connect` is present and fully populated from\n * DEFAULT_CONNECT_CONFIG, but lets any other top-level fields pass\n * through unchanged so source-config-only fields (studio, reactor, auth,\n * documentModelsDir, etc.) survive a read+write round-trip.\n */\nexport type ConfigShape = Record<string, unknown> & {\n connect: PHConnectRuntimeConfig;\n};\n\n/**\n * Abstract IO layer for `powerhouse.config.json`.\n *\n * Implementations decide where bytes come from and go to. The shipped\n * adapter is `JsonConfigAdapter` (reads via fetch in the browser, fs in\n * Node; writes via fs in Node, throws in the browser). Future adapters\n * (remote-JSON, GraphQL) plug in without changing the loader or any\n * consumer.\n */\nexport interface ConfigAdapter {\n /** Read raw JSON-parsed payload from the backing store. */\n read(): Promise<unknown>;\n /** Persist a fully-formed config. */\n write(next: ConfigShape): Promise<void>;\n /** Human-readable description used in errors and logs. */\n readonly source: string;\n}\n\n/**\n * Deep-merge `patch` into `base`. Object fields recurse; arrays and\n * primitives replace. `undefined` in patch leaves the base value\n * untouched (no unset). `null` in patch overwrites with null.\n *\n * Exported for unit tests; consumers use ConfigLoader.write() which\n * applies this internally.\n */\nexport function deepMerge<T>(base: T, patch: DeepPartial<T>): T {\n if (!isPlainObject(base) || !isPlainObject(patch)) {\n return patch as T;\n }\n const result: Record<string, unknown> = { ...base };\n for (const [key, patchValue] of Object.entries(patch)) {\n if (patchValue === undefined) continue;\n const baseValue = result[key];\n if (isPlainObject(baseValue) && isPlainObject(patchValue)) {\n result[key] = deepMerge(\n baseValue,\n patchValue as DeepPartial<typeof baseValue>,\n );\n } else {\n result[key] = patchValue;\n }\n }\n return result as T;\n}\n\n/**\n * The effective `connect.*` block of a source `powerhouse.config.json`:\n * defaults < project-wide settings Connect follows < `connect.*`. So\n * `connect.app.workflowsEnabled` falls back to `workflows.enabled`, and\n * wins when set.\n */\nexport function resolveSourceConnect(\n source: Pick<PowerhouseConfig, \"connect\" | \"workflows\">,\n defaults: PHConnectRuntimeConfig = DEFAULT_CONNECT_CONFIG,\n): PHConnectRuntimeConfig {\n const projectWide = deepMerge(defaults, {\n app: { workflowsEnabled: source.workflows?.enabled },\n });\n return deepMerge(projectWide, source.connect ?? {});\n}\n\n/**\n * Pluggable loader on top of a `ConfigAdapter`.\n *\n * Responsibilities:\n * - merge-with-defaults on read (so consumers never see a partial connect block)\n * - in-process caching (call `invalidate()` to force re-read)\n * - deep-merge for partial writes; writes the merged whole back through the adapter\n *\n * The cache is module-instance scoped — every `new ConfigLoader(...)` has\n * its own cache. The browser SPA constructs the loader once at boot; the\n * CLI typically constructs a fresh loader per command.\n */\nexport class ConfigLoader {\n private cache: ConfigShape | undefined;\n\n constructor(\n private readonly adapter: ConfigAdapter,\n private readonly defaults: PHConnectRuntimeConfig = DEFAULT_CONNECT_CONFIG,\n ) {}\n\n /** Returns the config with the default connect block merged in.\n * Cached after the first successful call. */\n async read(): Promise<ConfigShape> {\n if (this.cache) return this.cache;\n const raw = await this.adapter.read();\n const obj = isPlainObject(raw) ? raw : {};\n const connectRaw = isPlainObject(obj.connect) ? obj.connect : {};\n this.cache = {\n ...obj,\n connect: deepMerge(\n this.defaults,\n connectRaw as DeepPartial<PHConnectRuntimeConfig>,\n ),\n };\n return this.cache;\n }\n\n /**\n * Returns the cached config synchronously. Throws if `read()` has not\n * resolved yet — matches Connect's `getRuntimeConfig()` shape.\n */\n getCached(): ConfigShape {\n if (!this.cache) {\n throw new Error(\n `ConfigLoader (${this.adapter.source}): cache empty; call read() first.`,\n );\n }\n return this.cache;\n }\n\n /** Drop the in-memory cache. Next `read()` re-fetches from the adapter. */\n invalidate(): void {\n this.cache = undefined;\n }\n\n /**\n * Deep-merge `patch` into the current config and persist via the adapter.\n * Returns the new full config (also updates the cache). Arrays in `patch`\n * replace — they do NOT append.\n */\n async write(patch: DeepPartial<ConfigShape>): Promise<ConfigShape> {\n const current = await this.read();\n const next = deepMerge(current, patch);\n await this.adapter.write(next);\n this.cache = next;\n return next;\n }\n}\n"],"mappings":";;;;AAgBA,MAAa,yBAAiD;CAC5D,UAAU;EACR,SAAS;EACT,gBAAgB;CAClB;CACA,KAAK;EACH,UAAU;EACV,U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ACX;CAIxB,OAAO,UAHa,UAAU,UAAU,EACtC,KAAK,EAAE,kBAAkB,OAAO,WAAW,QAAQ,EACrD,CAC2B,GAAG,OAAO,WAAW,CAAC,CAAC;AACpD;;;;;;;;;;;;;AAcA,IAAa,eAAb,MAA0B;CAIL;CACA;CAJnB;CAEA,YACE,SACA,WAAoD,wBACpD;EAFiB,KAAA,UAAA;EACA,KAAA,WAAA;CAChB;;;CAIH,MAAM,OAA6B;EACjC,IAAI,KAAK,OAAO,OAAO,KAAK;EAC5B,MAAM,MAAM,MAAM,KAAK,QAAQ,KAAK;EACpC,MAAM,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC;EACxC,MAAM,aAAa,cAAc,IAAI,OAAO,IAAI,IAAI,UAAU,CAAC;EAC/D,KAAK,QAAQ;GACX,GAAG;GACH,SAAS,UACP,KAAK,UACL,UACF;EACF;EACA,OAAO,KAAK;CACd;;;;;CAMA,YAAyB;EACvB,IAAI,CAAC,KAAK,OACR,MAAM,IAAI,MACR,iBAAiB,KAAK,QAAQ,OAAO,mCACvC;EAEF,OAAO,KAAK;CACd;;CAGA,aAAmB;EACjB,KAAK,QAAQ,KAAA;CACf;;;;;;CAOA,MAAM,MAAM,OAAuD;EAEjE,MAAM,OAAO,UAAU,MADD,KAAK,KAAK,GACA,KAAK;EACrC,MAAM,KAAK,QAAQ,MAAM,IAAI;EAC7B,KAAK,QAAQ;EACb,OAAO;CACT;AACF"}
@@ -1,4 +1,4 @@
1
- import { D as PHConnectRuntimeConfig } from "../types-xLPOHE23.js";
1
+ import { L as PowerhouseConfig, O as PHConnectRuntimeConfig } from "../types-Dr6-2rMp.js";
2
2
  //#region connect/config-loader.d.ts
3
3
  /** Recursive Partial. Arrays are leaves — `write({ packages: [...] })`
4
4
  * replaces the array, it doesn't merge. */
@@ -39,6 +39,13 @@ export interface ConfigAdapter {
39
39
  * applies this internally.
40
40
  */
41
41
  export declare function deepMerge<T>(base: T, patch: DeepPartial<T>): T;
42
+ /**
43
+ * The effective `connect.*` block of a source `powerhouse.config.json`:
44
+ * defaults < project-wide settings Connect follows < `connect.*`. So
45
+ * `connect.app.workflowsEnabled` falls back to `workflows.enabled`, and
46
+ * wins when set.
47
+ */
48
+ export declare function resolveSourceConnect(source: Pick<PowerhouseConfig, "connect" | "workflows">, defaults?: PHConnectRuntimeConfig): PHConnectRuntimeConfig;
42
49
  /**
43
50
  * Pluggable loader on top of a `ConfigAdapter`.
44
51
  *
@@ -1 +1 @@
1
- {"version":3,"file":"config-loader.d.ts","names":[],"sources":["../../connect/config-loader.ts"],"mappings":";;;;YAmBY,YAAY,KACtB,UAAU,YAAY,KAClB,MAAM,KACN,sBACK,WAAW,KAAK,YAAY,EAAE,SACjC;;;;;;;;YASI,cAAc;EACxB,SAAS;;;;;;;;;;;iBAYM;;EAEf,QAAQ;;EAER,MAAM,MAAM,cAAc;;WAEjB;;;;;;;;;;wBAWK,UAAU,GAAG,MAAM,GAAG,OAAO,YAAY,KAAK;;;;;;;;;;;;;qBAgCjD;mBAIQ;mBACA;UAJX;EAER,YACmB,SAAS,eACT,WAAU;;;EAKvB,QAAQ,QAAQ;;;;;EAmBtB,aAAa;;EAUb;;;;;;EASM,MAAM,OAAO,YAAY,eAAe,QAAQ"}
1
+ {"version":3,"file":"config-loader.d.ts","names":[],"sources":["../../connect/config-loader.ts"],"mappings":";;;;YAsBY,YAAY,KACtB,UAAU,YAAY,KAClB,MAAM,KACN,sBACK,WAAW,KAAK,YAAY,EAAE,SACjC;;;;;;;;YASI,cAAc;EACxB,SAAS;;;;;;;;;;;iBAYM;;EAEf,QAAQ;;EAER,MAAM,MAAM,cAAc;;WAEjB;;;;;;;;;;wBAWK,UAAU,GAAG,MAAM,GAAG,OAAO,YAAY,KAAK;;;;;;;wBA0B9C,qBACd,QAAQ,KAAK,4CACb,WAAU,yBACT;;;;;;;;;;;;;qBAmBU;mBAIQ;mBACA;UAJX;EAER,YACmB,SAAS,eACT,WAAU;;;EAKvB,QAAQ,QAAQ;;;;;EAmBtB,aAAa;;EAUb;;;;;;EASM,MAAM,OAAO,YAAY,eAAe,QAAQ"}
@@ -1,2 +1,2 @@
1
- import { n as deepMerge, t as ConfigLoader } from "../config-loader-SYDWHtqk.js";
2
- export { ConfigLoader, deepMerge };
1
+ import { n as deepMerge, r as resolveSourceConnect, t as ConfigLoader } from "../config-loader-3oqy1hN4.js";
2
+ export { ConfigLoader, deepMerge, resolveSourceConnect };
@@ -1,5 +1,5 @@
1
- import { D as PHConnectRuntimeConfig, I as PowerhouseConfig, L as PowerhousePackage, S as PHConnectPwaUrlPattern, _ as PHConnectPwaCacheStrategy, b as PHConnectPwaManifest, g as PHConnectPwa, v as PHConnectPwaFileHandler, x as PHConnectPwaRuntimeCaching, y as PHConnectPwaIcon } from "../types-xLPOHE23.js";
2
- import { ConfigAdapter, ConfigLoader, ConfigShape, DeepPartial, deepMerge } from "./config-loader.js";
1
+ import { C as PHConnectPwaUrlPattern, L as PowerhouseConfig, O as PHConnectRuntimeConfig, R as PowerhousePackage, S as PHConnectPwaRuntimeCaching, _ as PHConnectPwa, b as PHConnectPwaIcon, v as PHConnectPwaCacheStrategy, x as PHConnectPwaManifest, y as PHConnectPwaFileHandler } from "../types-Dr6-2rMp.js";
2
+ import { ConfigAdapter, ConfigLoader, ConfigShape, DeepPartial, deepMerge, resolveSourceConnect } from "./config-loader.js";
3
3
  import { JsonConfigAdapter, JsonConfigAdapterOptions } from "./json-adapter.js";
4
4
  import { z } from "zod";
5
5
  //#region connect/dynamic-base.d.ts
@@ -384,8 +384,7 @@ export declare const phConnectRuntimeConfigSchema: {
384
384
  };
385
385
  readonly workflowsEnabled: {
386
386
  readonly type: "boolean";
387
- readonly description: "Powerhouse workflows in Connect. When true the tab loads the @powerhousedao/workflow package (workflow + connection documents, their editors and Workflow Studio) and the reactor worker registers its document models. Connect's counterpart to the reactor-side `workflows.enabled` / PH_WORKFLOWS_ENABLED; independent of studioMode. False by default.";
388
- readonly default: false;
387
+ readonly description: "Powerhouse workflows in Connect. When true the tab loads the @powerhousedao/workflow package (workflow + connection documents, their editors and Workflow Studio) and the reactor worker registers its document models. Falls back to the top-level `workflows.enabled`; set it to override that for Connect. Independent of studioMode. False when neither is set.";
389
388
  };
390
389
  };
391
390
  };
@@ -629,6 +628,32 @@ export declare const phConnectRuntimeConfigSchema: {
629
628
  };
630
629
  };
631
630
  };
631
+ readonly openPanel: {
632
+ readonly type: "object";
633
+ readonly additionalProperties: false;
634
+ readonly description: "OpenPanel product analytics. Set `clientId` to enable; an empty `clientId` disables it. Events are only sent after the user accepts analytics cookies. Takes precedence over the build-time PH_CONNECT_OPENPANEL_* env vars.";
635
+ readonly properties: {
636
+ readonly clientId: {
637
+ readonly type: "string";
638
+ readonly description: "OpenPanel client id. Empty string disables OpenPanel entirely.";
639
+ readonly default: "";
640
+ };
641
+ readonly apiUrl: {
642
+ readonly type: "string";
643
+ readonly description: "OpenPanel API URL for self-hosted instances (e.g. 'https://openpanel.example/api'). Omit to use OpenPanel's hosted API.";
644
+ };
645
+ readonly trackUiEvents: {
646
+ readonly type: "boolean";
647
+ readonly description: "Track UI events.";
648
+ readonly default: true;
649
+ };
650
+ readonly trackOperations: {
651
+ readonly type: "boolean";
652
+ readonly description: "Track document operations.";
653
+ readonly default: true;
654
+ };
655
+ };
656
+ };
632
657
  readonly instance: {
633
658
  readonly type: "object";
634
659
  readonly additionalProperties: false;
@@ -1013,6 +1038,6 @@ export type PackageDeps = {
1013
1038
  export declare function checkSharedDeps(pkgJson: PackageDeps, hostVersions: Record<string, string>): SharedDepMismatch[];
1014
1039
  export declare function formatSharedDepWarnings(mismatches: SharedDepMismatch[]): string[];
1015
1040
  //#endregion
1016
- export { ConfigAdapter, ConfigLoader, ConfigShape, DeepPartial, JsonConfigAdapter, JsonConfigAdapterOptions, type PHConnectPwa, type PHConnectPwaCacheStrategy, type PHConnectPwaFileHandler, type PHConnectPwaIcon, type PHConnectPwaManifest, type PHConnectPwaRuntimeCaching, type PHConnectPwaUrlPattern, deepMerge };
1041
+ export { ConfigAdapter, ConfigLoader, ConfigShape, DeepPartial, JsonConfigAdapter, JsonConfigAdapterOptions, type PHConnectPwa, type PHConnectPwaCacheStrategy, type PHConnectPwaFileHandler, type PHConnectPwaIcon, type PHConnectPwaManifest, type PHConnectPwaRuntimeCaching, type PHConnectPwaUrlPattern, deepMerge, resolveSourceConnect };
1017
1042
  export {};
1018
1043
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../connect/dynamic-base.ts","../../connect/env-config.ts","../../connect/pwa-config.ts","../../connect/pwa-manifest.ts","../../connect/runtime-config.ts","../../connect/schema-fragments.ts","../../connect/shared-deps.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAYa;;;;;;cCQP,gBAAc,EAAA;;;;;;GA0BlB,EAAA,KAAA;;;;;;qBAiGW,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAES,EAAA,KAAA;;;;qBAKzB,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAgD,EAAA,KAAA;;;;YAKjE,kBAAkB,EAAE,aAAa;YACjC,oBAAoB,EAAE,aAAa;YACnC,aAAa,EAAE,aAAa;;;;iBASvB;;;;EAIf,aAAa;;;;EAIb,UAAU;;;;;;;;;;;wBAkEI,eAAe,UAAS,iBAAsB;;;;;;;;;wBAkB9C,eACd,UAAS,iBACR;;;;;;;;;;;;;;;wBAoBa,cAAc,QAAQ,QAAQ;;;;;;;;;;;;;;;;;wBA4C9B,kBAAkB;;;;;;qBA8BrB;;;;;;;;;;;;;;;;;;;;;;;wBAwBG,oBAAoB;;;;YCrVxB;;EAEV;EACA,QAAQ;;KA6BL;EACH;EACA;EACA;;;wBAyBc,YAAY,UAAU,UAAU,OAAO,MAAM;;;;;;;;;wBA4B7C,mBAAmB,kBAAkB,UAAU,MAAM;;;;;;wBASrD,qBACd,QAAQ,cACR,oBACC;;wBASa,aACd,4BACA;;;;;;;;;;;;;;;wBA2Gc,eACd,sBAAsB,mBACtB,gBAAgB,cAChB,UAAS,2BACR;;;wBA8Ca,iBACd,SAAS,kCACC;;;;;;;;;;;qBCrRC;qBAQA;qBACA;qBACA;qBACA;;;;iBAKI;EACf,QAAQ;EACR,iBAAiB;IAA4B;;EAC7C;GACC;;;;;;;;;;;;;;;;;;;;;wBAsBa,cACd,MAAM,gBACN,UAAU,kCACV;EACE;EACA;IAED;;;YCzES;EACV;EACA,UAAU;EACV;EACA;IAAgB;IAAc;;EAC9B,SAAS;;;;qBAKE,wBAAwB;wBAuDrB,mBACd,QAAQ,KAAK,kEACb;EAAe;EAAc;WAC5B;;;qBCnEU;WACX;WACA;WACA;WACA;aACE;eACE;eACA;;aAEF;eACE;eACA;;aAEF;eACE;eACA;eACA;;aAEF;eACE;eACA;;;;qBAsEO;WACX;WACA;WACA;WAEA;aACE;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;;iBAGF;mBACE;mBACA;;;;aAKN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;mBACA;qBACE;uBAEI;uBACA;uBACA;uBACA;yBACE;2BAAO;;yBACP;2BAAQ;;yBACR;2BAAQ;;;;uBAIV;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;yBAGF;2BAAQ;;yBACR;2BAAQ;;yBACR;2BACE;2BACA;;;;;;iBAQZ;mBACE;mBACA;mBACA;;iBAGF;mBACE;mBACA;mBACA;mBAEA;qBACE;uBA7NJ;;uBAGJ;;yBAEA;2BACE;2BACA;2BACA;;yBAEF;2BACE;2BACA;2BAEA;;yBAEF;2BACE;2BACA;2BAEA;;;;qBA0MM;;;;;;;;;;;;;;;;;;;;;;;;;;aAKR;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;;iBAGF;mBACE;mBACA;;iBAGF;mBACE;mBACA;mBACA;mBAEA;qBACE;uBACE;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;;;qBAKN;uBACE;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;yBAEF;2BACE;2BACA;2BAEA;6BAAS;;;;;;;;;aAQvB;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBACA;;;;aAIN;eACE;eACA;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBACA;mBAEA;qBACE;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;;;iBAIN;mBACE;mBACA;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBACA;mBACA;qBACE;uBAAQ;;qBACR;uBAAc;;qBACd;uBAAe;;qBACf;uBAAe;;qBACf;uBAAoB;;qBACpB;uBACE;uBACA;;qBAEF;uBAAa;;qBACb;uBAAS;;qBACT;uBACE;uBACA;uBAEA;yBAxXN;;yBAEK;;2BAET;6BAAO;;2BACP;6BAAS;;2BACT;6BAAQ;;2BACR;6BAAW;;;;;qBAmXH;uBACE;uBACA;uBAEA;yBACE;yBACA;yBACA;yBACA;2BACE;6BACE;6BACA;6BAEA;+BACE;+BACA;iCAAS;iCAAgB;;;;2BAG7B;6BACE;6BACA;6BACA;;;;;;;;;;;;;;;;;;;;2BAEF;6BACE;6BACA;;;;;qBAKR;uBACE;uBACA;uBACA;uBACA;uBAEA;yBACE;2BACE;2BACA;;;;;;iBAWV;mBACE;mBACA;qBAAS;;mBACT;;iBAGF;mBACE;mBACA;qBAAS;;mBACT;;iBAGF;mBACE;mBACA;;iBAGF;mBACE;mBACA;mBAEA;qBACE;qBACA;qBACA;qBACA;uBACE;yBAvdV;;2BAEE;;2BAEA;2BACA;2BACA;2BACA;6BACE;+BAAU;+BAAgB;;6BAC1B;+BAAS;+BAAgB;;;;;uBA+cnB;yBACE;yBACA;;uBAQF;yBACE;yBACA;;uBAEF;yBACE;yBACA;yBACA;2BACE;6BAAa;;2BACb;6BACE;6BACA;;2BAGF;6BACE;6BACA;6BACA;+BACE;iCAAc;;+BACd;iCAAiB;;;;2BAGrB;6BACE;6BACA;6BACA;+BACE;iCAAY;iCAAe;mCAAS;;;+BACpC;iCACE;iCACA;mCAAwB;;;;;;;;;;iBASxC;mBACE;mBACA;mBAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;YC/kBE;EAAc;EAAmB;;;;;;;qBAOhC,sBAAsB;qBA2BtB;;;;;;;;;qBAYA;;;;;;;;;;;;qBAqBA;;wBAQG,aAAa;EAAiB;EAAa;;;;;;;;;;;wBAwB3C,kBACd,gBACA;;;;;;;;;;wBA0Bc,qBACd,gBACA,mBACA,SAAS;YAkCC;EACV;EACA;EACA;;YAGU;EACV,eAAe;EACf,mBAAmB;;;;;;;;wBASL,gBACd,SAAS,aACT,cAAc,yBACb;wBAkBa,wBACd,YAAY"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../connect/dynamic-base.ts","../../connect/env-config.ts","../../connect/pwa-config.ts","../../connect/pwa-manifest.ts","../../connect/runtime-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;WAC5B;;;qBC1EU;WACX;WACA;WACA;WACA;aACE;eACE;eACA;;aAEF;eACE;eACA;;aAEF;eACE;eACA;eACA;;aAEF;eACE;eACA;;;;qBAsEO;WACX;WACA;WACA;WAEA;aACE;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;;iBAGF;mBACE;mBACA;;;;aAKN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;;;;aAKN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;mBACA;qBACE;uBAEI;uBACA;uBACA;uBACA;yBACE;2BAAO;;yBACP;2BAAQ;;yBACR;2BAAQ;;;;uBAIV;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;yBAGF;2BAAQ;;yBACR;2BAAQ;;yBACR;2BACE;2BACA;;;;;;iBAQZ;mBACE;mBACA;mBACA;;iBAGF;mBACE;mBACA;mBACA;mBAEA;qBACE;uBA5NJ;;uBAGJ;;yBAEA;2BACE;2BACA;2BACA;;yBAEF;2BACE;2BACA;2BAEA;;yBAEF;2BACE;2BACA;2BAEA;;;;qBAyMM;;;;;;;;;;;;;;;;;;;;;;;;;;aAKR;eACE;eACA;eACA;eACA;iBACE;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;;iBAGF;mBACE;mBACA;;iBAGF;mBACE;mBACA;mBACA;mBAEA;qBACE;uBACE;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;;;qBAKN;uBACE;uBACA;uBACA;uBACA;yBACE;2BACE;2BACA;;yBAGF;2BACE;2BACA;;yBAEF;2BACE;2BACA;2BAEA;6BAAS;;;;;;;;;aAQvB;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBACA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;;iBAGF;mBACE;mBACA;mBACA;;iBAEF;mBACE;mBACA;mBACA;;;;aAIN;eACE;eACA;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBAEA;;iBAEF;mBACE;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBACA;mBAEA;qBACE;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;qBAEF;uBACE;uBACA;uBAEA;;;;iBAIN;mBACE;mBACA;mBACA;mBAEA;;;;aAIN;eACE;eACA;eACA;eAEA;iBACE;mBACE;mBACA;mBACA;mBACA;qBACE;uBAAQ;;qBACR;uBAAc;;qBACd;uBAAe;;qBACf;uBAAe;;qBACf;uBAAoB;;qBACpB;uBACE;uBACA;;qBAEF;uBAAa;;qBACb;uBAAS;;qBACT;uBACE;uBACA;uBAEA;yBApZN;;yBAEK;;2BAET;6BAAO;;2BACP;6BAAS;;2BACT;6BAAQ;;2BACR;6BAAW;;;;;qBA+YH;uBACE;uBACA;uBAEA;yBACE;yBACA;yBACA;yBACA;2BACE;6BACE;6BACA;6BAEA;+BACE;+BACA;iCAAS;iCAAgB;;;;2BAG7B;6BACE;6BACA;6BACA;;;;;;;;;;;;;;;;;;;;2BAEF;6BACE;6BACA;;;;;qBAKR;uBACE;uBACA;uBACA;uBACA;uBAEA;yBACE;2BACE;2BACA;;;;;;iBAWV;mBACE;mBACA;qBAAS;;mBACT;;iBAGF;mBACE;mBACA;qBAAS;;mBACT;;iBAGF;mBACE;mBACA;;iBAGF;mBACE;mBACA;mBAEA;qBACE;qBACA;qBACA;qBACA;uBACE;yBAnfV;;2BAEE;;2BAEA;2BACA;2BACA;2BACA;6BACE;+BAAU;+BAAgB;;6BAC1B;+BAAS;+BAAgB;;;;;uBA2enB;yBACE;yBACA;;uBAQF;yBACE;yBACA;;uBAEF;yBACE;yBACA;yBACA;2BACE;6BAAa;;2BACb;6BACE;6BACA;;2BAGF;6BACE;6BACA;6BACA;+BACE;iCAAc;;+BACd;iCAAiB;;;;2BAGrB;6BACE;6BACA;6BACA;+BACE;iCAAY;iCAAe;mCAAS;;;+BACpC;iCACE;iCACA;mCAAwB;;;;;;;;;;iBASxC;mBACE;mBACA;mBAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;YC3mBE;EAAc;EAAmB;;;;;;;qBAOhC,sBAAsB;qBA2BtB;;;;;;;;;qBAYA;;;;;;;;;;;;qBAqBA;;wBAQG,aAAa;EAAiB;EAAa;;;;;;;;;;;wBAwB3C,kBACd,gBACA;;;;;;;;;;wBA0Bc,qBACd,gBACA,mBACA,SAAS;YAkCC;EACV;EACA;EACA;;YAGU;EACV,eAAe;EACf,mBAAmB;;;;;;;;wBASL,gBACd,SAAS,aACT,cAAc,yBACb;wBAkBa,wBACd,YAAY"}
@@ -1,4 +1,4 @@
1
- import { i as buildRuntimeConfig, n as deepMerge, r as DEFAULT_CONNECT_CONFIG, t as ConfigLoader } from "../config-loader-SYDWHtqk.js";
1
+ import { a as buildRuntimeConfig, i as DEFAULT_CONNECT_CONFIG, n as deepMerge, r as resolveSourceConnect, t as ConfigLoader } from "../config-loader-3oqy1hN4.js";
2
2
  import { JsonConfigAdapter } from "./json-adapter.js";
3
3
  import { z } from "zod";
4
4
  import { satisfies, validRange } from "semver";
@@ -629,8 +629,7 @@ const phConnectRuntimeConfigSchema = {
629
629
  },
630
630
  workflowsEnabled: {
631
631
  type: "boolean",
632
- description: "Powerhouse workflows in Connect. When true the tab loads the @powerhousedao/workflow package (workflow + connection documents, their editors and Workflow Studio) and the reactor worker registers its document models. Connect's counterpart to the reactor-side `workflows.enabled` / PH_WORKFLOWS_ENABLED; independent of studioMode. False by default.",
633
- default: false
632
+ description: "Powerhouse workflows in Connect. When true the tab loads the @powerhousedao/workflow package (workflow + connection documents, their editors and Workflow Studio) and the reactor worker registers its document models. Falls back to the top-level `workflows.enabled`; set it to override that for Connect. Independent of studioMode. False when neither is set."
634
633
  }
635
634
  }
636
635
  },
@@ -816,6 +815,32 @@ const phConnectRuntimeConfigSchema = {
816
815
  }
817
816
  }
818
817
  },
818
+ openPanel: {
819
+ type: "object",
820
+ additionalProperties: false,
821
+ description: "OpenPanel product analytics. Set `clientId` to enable; an empty `clientId` disables it. Events are only sent after the user accepts analytics cookies. Takes precedence over the build-time PH_CONNECT_OPENPANEL_* env vars.",
822
+ properties: {
823
+ clientId: {
824
+ type: "string",
825
+ description: "OpenPanel client id. Empty string disables OpenPanel entirely.",
826
+ default: ""
827
+ },
828
+ apiUrl: {
829
+ type: "string",
830
+ description: "OpenPanel API URL for self-hosted instances (e.g. 'https://openpanel.example/api'). Omit to use OpenPanel's hosted API."
831
+ },
832
+ trackUiEvents: {
833
+ type: "boolean",
834
+ description: "Track UI events.",
835
+ default: true
836
+ },
837
+ trackOperations: {
838
+ type: "boolean",
839
+ description: "Track document operations.",
840
+ default: true
841
+ }
842
+ }
843
+ },
819
844
  instance: {
820
845
  type: "object",
821
846
  additionalProperties: false,
@@ -1206,6 +1231,6 @@ function formatSharedDepWarnings(mismatches) {
1206
1231
  return mismatches.map((m) => `${m.package}: requires ${m.required}, Connect provides ${m.provided}`);
1207
1232
  }
1208
1233
  //#endregion
1209
- export { ConfigLoader, DEFAULT_CONNECT_CONFIG, DYNAMIC_BASE_PLACEHOLDER, EXTERNALIZABLE_SHARED_SPECIFIERS, JsonConfigAdapter, PWA_FILE_HANDLER_ACTION, PWA_IDB_KEY, PWA_IDB_NAME, PWA_IDB_STORE, PWA_IDB_VERSION, ROOT_STORAGE_NAMESPACE, SHARED_DEPS, SHARED_DEP_SPECIFIERS, SHARED_SUBPATHS, buildRuntimeConfig, checkSharedDeps, connectEnvSchema, dedupeFileHandlers, dedupeIcons, deepMerge, findSharedImports, formatSharedDepWarnings, getStorageNamespace, loadConnectEnv, loadRuntimeEnv, mergeManifest, mergePwaConfig, normalizeBasePath, parseDepSpec, phConnectRuntimeConfigSchema, powerhousePackageSchema, rewritePackageSource, runtimeEnvSchema, setConnectEnv, toRegExpOrString, unionStrings, withInferredCategory };
1234
+ export { ConfigLoader, DEFAULT_CONNECT_CONFIG, DYNAMIC_BASE_PLACEHOLDER, EXTERNALIZABLE_SHARED_SPECIFIERS, JsonConfigAdapter, PWA_FILE_HANDLER_ACTION, PWA_IDB_KEY, PWA_IDB_NAME, PWA_IDB_STORE, PWA_IDB_VERSION, ROOT_STORAGE_NAMESPACE, SHARED_DEPS, SHARED_DEP_SPECIFIERS, SHARED_SUBPATHS, buildRuntimeConfig, checkSharedDeps, connectEnvSchema, dedupeFileHandlers, dedupeIcons, deepMerge, findSharedImports, formatSharedDepWarnings, getStorageNamespace, loadConnectEnv, loadRuntimeEnv, mergeManifest, mergePwaConfig, normalizeBasePath, parseDepSpec, phConnectRuntimeConfigSchema, powerhousePackageSchema, resolveSourceConnect, rewritePackageSource, runtimeEnvSchema, setConnectEnv, toRegExpOrString, unionStrings, withInferredCategory };
1210
1235
 
1211
1236
  //# sourceMappingURL=index.js.map