@powerhousedao/shared 6.2.2-dev.9 → 6.2.2-staging.0

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 (227) hide show
  1. package/dist/clis/args/access-token--9H57y8J.d.mts +18 -0
  2. package/dist/clis/args/access-token--9H57y8J.d.mts.map +1 -0
  3. package/dist/clis/args/access-token-To5LaIfL.mjs +22 -0
  4. package/dist/clis/args/access-token-To5LaIfL.mjs.map +1 -0
  5. package/dist/clis/args/access-token.d.mts +2 -18
  6. package/dist/clis/args/access-token.mjs +1 -21
  7. package/dist/clis/args/{common-dbsvksvf.mjs → common-CcYbXrBx.mjs} +7 -2
  8. package/dist/clis/args/common-CcYbXrBx.mjs.map +1 -0
  9. package/dist/clis/args/{common-Cr8LZG55.d.mts → common-Dsf1vpHV.d.mts} +7 -4
  10. package/dist/clis/args/{common-Cr8LZG55.d.mts.map → common-Dsf1vpHV.d.mts.map} +1 -1
  11. package/dist/clis/args/common.d.mts +2 -2
  12. package/dist/clis/args/common.mjs +2 -2
  13. package/dist/clis/args/connect-BVVvCmL9.mjs +198 -0
  14. package/dist/clis/args/connect-BVVvCmL9.mjs.map +1 -0
  15. package/dist/clis/args/connect-DetTnI8g.d.mts +443 -0
  16. package/dist/clis/args/connect-DetTnI8g.d.mts.map +1 -0
  17. package/dist/clis/args/connect.d.mts +2 -434
  18. package/dist/clis/args/connect.mjs +1 -196
  19. package/dist/clis/args/{generate-Cs5okckF.mjs → generate-CA916Fvj.mjs} +2 -2
  20. package/dist/clis/args/{generate-Cs5okckF.mjs.map → generate-CA916Fvj.mjs.map} +1 -1
  21. package/dist/clis/args/generate-DnV-bfXt.d.mts +87 -0
  22. package/dist/clis/args/generate-DnV-bfXt.d.mts.map +1 -0
  23. package/dist/clis/args/generate.d.mts +2 -87
  24. package/dist/clis/args/generate.mjs +1 -1
  25. package/dist/clis/args/{help-BkF9Cxud.mjs → help-Bqbgbalu.mjs} +15 -15
  26. package/dist/clis/args/{help-BkF9Cxud.mjs.map → help-Bqbgbalu.mjs.map} +1 -1
  27. package/dist/clis/args/{help-CYjFrzIJ.d.mts → help-CjAsudUn.d.mts} +1 -1
  28. package/dist/clis/args/{help-CYjFrzIJ.d.mts.map → help-CjAsudUn.d.mts.map} +1 -1
  29. package/dist/clis/args/help.d.mts +1 -1
  30. package/dist/clis/args/help.mjs +1 -13
  31. package/dist/clis/args/index.d.mts +19 -19
  32. package/dist/clis/args/index.mjs +19 -19
  33. package/dist/clis/args/init-CUXyfquF.d.mts +55 -0
  34. package/dist/clis/args/init-CUXyfquF.d.mts.map +1 -0
  35. package/dist/clis/args/init-rz9Ei7nq.mjs +67 -0
  36. package/dist/clis/args/init-rz9Ei7nq.mjs.map +1 -0
  37. package/dist/clis/args/init.d.mts +2 -55
  38. package/dist/clis/args/init.mjs +1 -66
  39. package/dist/clis/args/inspect-DtZeoA5c.d.mts +15 -0
  40. package/dist/clis/args/inspect-DtZeoA5c.d.mts.map +1 -0
  41. package/dist/clis/args/inspect-tckH8mSw.mjs +15 -0
  42. package/dist/clis/args/inspect-tckH8mSw.mjs.map +1 -0
  43. package/dist/clis/args/inspect.d.mts +2 -15
  44. package/dist/clis/args/inspect.mjs +1 -14
  45. package/dist/clis/args/install-CkP8zcHb.d.mts +40 -0
  46. package/dist/clis/args/install-CkP8zcHb.d.mts.map +1 -0
  47. package/dist/clis/args/install-Sz2DlCHh.mjs +32 -0
  48. package/dist/clis/args/install-Sz2DlCHh.mjs.map +1 -0
  49. package/dist/clis/args/install.d.mts +2 -40
  50. package/dist/clis/args/install.mjs +1 -31
  51. package/dist/clis/args/list-BGf8s_gj.d.mts +12 -0
  52. package/dist/clis/args/list-BGf8s_gj.d.mts.map +1 -0
  53. package/dist/clis/args/list-DM2d6f1m.mjs +7 -0
  54. package/dist/clis/args/list-DM2d6f1m.mjs.map +1 -0
  55. package/dist/clis/args/list.d.mts +2 -12
  56. package/dist/clis/args/list.mjs +1 -6
  57. package/dist/clis/args/login-DNsHwvqk.d.mts +27 -0
  58. package/dist/clis/args/login-DNsHwvqk.d.mts.map +1 -0
  59. package/dist/clis/args/login-DiKT5Jfu.mjs +40 -0
  60. package/dist/clis/args/login-DiKT5Jfu.mjs.map +1 -0
  61. package/dist/clis/args/login.d.mts +2 -27
  62. package/dist/clis/args/login.mjs +1 -39
  63. package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs +1013 -0
  64. package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs.map +1 -0
  65. package/dist/clis/args/migrate-CG_gWc4k.mjs +29 -0
  66. package/dist/clis/args/migrate-CG_gWc4k.mjs.map +1 -0
  67. package/dist/clis/args/migrate-sixkWhxm.d.mts +21 -0
  68. package/dist/clis/args/migrate-sixkWhxm.d.mts.map +1 -0
  69. package/dist/clis/args/migrate.d.mts +2 -21
  70. package/dist/clis/args/migrate.mjs +1 -28
  71. package/dist/clis/args/publish-DDZYsUfV.mjs +19 -0
  72. package/dist/clis/args/publish-DDZYsUfV.mjs.map +1 -0
  73. package/dist/clis/args/publish-Dqe5DUst.d.mts +18 -0
  74. package/dist/clis/args/publish-Dqe5DUst.d.mts.map +1 -0
  75. package/dist/clis/args/publish.d.mts +2 -18
  76. package/dist/clis/args/publish.mjs +1 -18
  77. package/dist/clis/args/registry-C_OVFQmI.mjs +23 -0
  78. package/dist/clis/args/registry-C_OVFQmI.mjs.map +1 -0
  79. package/dist/clis/args/registry-C_RfTsKB.d.mts +19 -0
  80. package/dist/clis/args/registry-C_RfTsKB.d.mts.map +1 -0
  81. package/dist/clis/args/registry.d.mts +2 -19
  82. package/dist/clis/args/registry.mjs +1 -22
  83. package/dist/clis/args/service-CHOOr0Gg.mjs +11 -0
  84. package/dist/clis/args/service-CHOOr0Gg.mjs.map +1 -0
  85. package/dist/clis/args/{service-C88bN_g_.d.mts → service-DhIkf8-O.d.mts} +1 -1
  86. package/dist/clis/args/{service-C88bN_g_.d.mts.map → service-DhIkf8-O.d.mts.map} +1 -1
  87. package/dist/clis/args/service.d.mts +1 -1
  88. package/dist/clis/args/service.mjs +1 -10
  89. package/dist/clis/args/switchboard-BlPaq2at.d.mts +72 -0
  90. package/dist/clis/args/switchboard-BlPaq2at.d.mts.map +1 -0
  91. package/dist/clis/args/switchboard-Dsp7nosi.mjs +85 -0
  92. package/dist/clis/args/switchboard-Dsp7nosi.mjs.map +1 -0
  93. package/dist/clis/args/switchboard.d.mts +2 -72
  94. package/dist/clis/args/switchboard.mjs +1 -84
  95. package/dist/clis/args/uninstall-BpA3YYbw.d.mts +31 -0
  96. package/dist/clis/args/uninstall-BpA3YYbw.d.mts.map +1 -0
  97. package/dist/clis/args/uninstall-CTwTX0u_.mjs +16 -0
  98. package/dist/clis/args/uninstall-CTwTX0u_.mjs.map +1 -0
  99. package/dist/clis/args/uninstall.d.mts +2 -31
  100. package/dist/clis/args/uninstall.mjs +1 -15
  101. package/dist/clis/args/unpublish-BPMkGEg5.mjs +30 -0
  102. package/dist/clis/args/unpublish-BPMkGEg5.mjs.map +1 -0
  103. package/dist/clis/args/unpublish-CvwaIimG.d.mts +24 -0
  104. package/dist/clis/args/unpublish-CvwaIimG.d.mts.map +1 -0
  105. package/dist/clis/args/unpublish.d.mts +2 -24
  106. package/dist/clis/args/unpublish.mjs +1 -29
  107. package/dist/clis/args/vetra-DLQ6lhLl.d.mts +113 -0
  108. package/dist/clis/args/vetra-DLQ6lhLl.d.mts.map +1 -0
  109. package/dist/clis/args/vetra-b4KUu1Ax.mjs +126 -0
  110. package/dist/clis/args/vetra-b4KUu1Ax.mjs.map +1 -0
  111. package/dist/clis/args/vetra-ports.test.d.mts +1 -0
  112. package/dist/clis/args/vetra-ports.test.mjs +13249 -0
  113. package/dist/clis/args/vetra-ports.test.mjs.map +1 -0
  114. package/dist/clis/args/vetra.d.mts +2 -102
  115. package/dist/clis/args/vetra.mjs +2 -75
  116. package/dist/clis/build-config.d.mts +1 -1
  117. package/dist/clis/build-config.d.mts.map +1 -1
  118. package/dist/clis/constants.d.mts +199 -55
  119. package/dist/clis/constants.d.mts.map +1 -1
  120. package/dist/clis/constants.mjs +12 -4
  121. package/dist/clis/constants.mjs.map +1 -1
  122. package/dist/clis/index.d.mts +591 -30
  123. package/dist/clis/index.d.mts.map +1 -1
  124. package/dist/clis/index.mjs +413 -18
  125. package/dist/clis/index.mjs.map +1 -1
  126. package/dist/clis/project-env.d.mts +27 -0
  127. package/dist/clis/project-env.d.mts.map +1 -0
  128. package/dist/clis/project-env.mjs +44 -0
  129. package/dist/clis/project-env.mjs.map +1 -0
  130. package/dist/clis/project-ports.d.mts +40 -0
  131. package/dist/clis/project-ports.d.mts.map +1 -0
  132. package/dist/clis/project-ports.mjs +90 -0
  133. package/dist/clis/project-ports.mjs.map +1 -0
  134. package/dist/{config-loader-19K8n4DO.js → config-loader-B845Hidf.js} +11 -14
  135. package/dist/config-loader-B845Hidf.js.map +1 -0
  136. package/dist/connect/config-loader.d.ts +2 -1
  137. package/dist/connect/config-loader.d.ts.map +1 -1
  138. package/dist/connect/config-loader.js +1 -1
  139. package/dist/connect/index.d.ts +486 -27
  140. package/dist/connect/index.d.ts.map +1 -1
  141. package/dist/connect/index.js +531 -5
  142. package/dist/connect/index.js.map +1 -1
  143. package/dist/connect/json-adapter.d.ts.map +1 -1
  144. package/dist/{constants-C_EQX4DY.d.ts → constants-BP_gjn8g.d.ts} +1 -1
  145. package/dist/constants-BP_gjn8g.d.ts.map +1 -0
  146. package/dist/constants.d.ts +1 -1
  147. package/dist/document-drive/index.d.ts +2 -2
  148. package/dist/document-drive/index.js +3 -3
  149. package/dist/document-drive/index.js.map +1 -1
  150. package/dist/document-model/index.d.ts +4 -5
  151. package/dist/document-model/index.js +1337 -133
  152. package/dist/document-model/index.js.map +1 -1
  153. package/dist/document-model/mock.d.ts +22 -2
  154. package/dist/document-model/mock.d.ts.map +1 -0
  155. package/dist/document-model/mock.js +32 -3
  156. package/dist/document-model/mock.js.map +1 -1
  157. package/dist/document-model/utils.d.ts +1 -2
  158. package/dist/document-model/utils.js +1 -2
  159. package/dist/{index-CQDIrK1k.d.ts → index-C_iVZe7f.d.ts} +1 -1
  160. package/dist/index-C_iVZe7f.d.ts.map +1 -0
  161. package/dist/index-DPuio_se.d.ts +836 -0
  162. package/dist/index-DPuio_se.d.ts.map +1 -0
  163. package/dist/index.d.ts +5 -6
  164. package/dist/processors/index.d.ts +2 -2
  165. package/dist/registry/index.d.ts +5 -4
  166. package/dist/registry/index.d.ts.map +1 -1
  167. package/dist/registry/index.js +9 -8
  168. package/dist/registry/index.js.map +1 -1
  169. package/dist/registry/manifest-slim.d.ts +1 -1
  170. package/dist/registry/urls.d.ts +11 -0
  171. package/dist/registry/urls.d.ts.map +1 -0
  172. package/dist/registry/urls.js +15 -0
  173. package/dist/registry/urls.js.map +1 -0
  174. package/dist/{types-DvWPqxJr.d.ts → types-BBUlASQ7.d.ts} +30 -4
  175. package/dist/types-BBUlASQ7.d.ts.map +1 -0
  176. package/dist/{types-DXsYu6Tq.d.ts → types-BzWRXB7f.d.ts} +507 -16
  177. package/dist/types-BzWRXB7f.d.ts.map +1 -0
  178. package/dist/utils-DP122OSS.d.ts +18 -0
  179. package/dist/utils-DP122OSS.d.ts.map +1 -0
  180. package/dist/{utils-DKOFCM0Q.js → utils-aaTmfxFW.js} +45 -2
  181. package/dist/utils-aaTmfxFW.js.map +1 -0
  182. package/package.json +12 -1
  183. package/dist/clis/args/access-token.d.mts.map +0 -1
  184. package/dist/clis/args/access-token.mjs.map +0 -1
  185. package/dist/clis/args/common-dbsvksvf.mjs.map +0 -1
  186. package/dist/clis/args/connect.d.mts.map +0 -1
  187. package/dist/clis/args/connect.mjs.map +0 -1
  188. package/dist/clis/args/generate.d.mts.map +0 -1
  189. package/dist/clis/args/init.d.mts.map +0 -1
  190. package/dist/clis/args/init.mjs.map +0 -1
  191. package/dist/clis/args/inspect.d.mts.map +0 -1
  192. package/dist/clis/args/inspect.mjs.map +0 -1
  193. package/dist/clis/args/install.d.mts.map +0 -1
  194. package/dist/clis/args/install.mjs.map +0 -1
  195. package/dist/clis/args/list.d.mts.map +0 -1
  196. package/dist/clis/args/list.mjs.map +0 -1
  197. package/dist/clis/args/login.d.mts.map +0 -1
  198. package/dist/clis/args/login.mjs.map +0 -1
  199. package/dist/clis/args/migrate.d.mts.map +0 -1
  200. package/dist/clis/args/migrate.mjs.map +0 -1
  201. package/dist/clis/args/publish.d.mts.map +0 -1
  202. package/dist/clis/args/publish.mjs.map +0 -1
  203. package/dist/clis/args/registry.d.mts.map +0 -1
  204. package/dist/clis/args/registry.mjs.map +0 -1
  205. package/dist/clis/args/service.mjs.map +0 -1
  206. package/dist/clis/args/switchboard.d.mts.map +0 -1
  207. package/dist/clis/args/switchboard.mjs.map +0 -1
  208. package/dist/clis/args/uninstall.d.mts.map +0 -1
  209. package/dist/clis/args/uninstall.mjs.map +0 -1
  210. package/dist/clis/args/unpublish.d.mts.map +0 -1
  211. package/dist/clis/args/unpublish.mjs.map +0 -1
  212. package/dist/clis/args/vetra.d.mts.map +0 -1
  213. package/dist/clis/args/vetra.mjs.map +0 -1
  214. package/dist/config-loader-19K8n4DO.js.map +0 -1
  215. package/dist/constants-C_EQX4DY.d.ts.map +0 -1
  216. package/dist/index-CQDIrK1k.d.ts.map +0 -1
  217. package/dist/index-Dz7JrBXs.d.ts +0 -399
  218. package/dist/index-Dz7JrBXs.d.ts.map +0 -1
  219. package/dist/mock-CBcf78ra.d.ts +0 -7
  220. package/dist/mock-CBcf78ra.d.ts.map +0 -1
  221. package/dist/types-D0NNBVGA.d.ts +0 -167
  222. package/dist/types-D0NNBVGA.d.ts.map +0 -1
  223. package/dist/types-DXsYu6Tq.d.ts.map +0 -1
  224. package/dist/types-DvWPqxJr.d.ts.map +0 -1
  225. package/dist/utils-BEByNOHo.d.ts +0 -9
  226. package/dist/utils-BEByNOHo.d.ts.map +0 -1
  227. package/dist/utils-DKOFCM0Q.js.map +0 -1
@@ -1,21 +1,52 @@
1
1
  import { f as IAnalyticsStore } from "./types-C1in4fl3.js";
2
- import { z } from "zod";
2
+ import { ZodRawShape, z } from "zod";
3
3
  import { Draft } from "mutative";
4
+ import * as cmd_ts_dist_cjs_argparser_js0 from "cmd-ts/dist/cjs/argparser.js";
5
+ import { ArgParser } from "cmd-ts/dist/cjs/argparser.js";
6
+ import * as cmd_ts_dist_cjs_helpdoc_js0 from "cmd-ts/dist/cjs/helpdoc.js";
7
+ import * as cmd_ts_dist_cjs_runner_js0 from "cmd-ts/dist/cjs/runner.js";
8
+ import { Agent } from "package-manager-detector";
4
9
  import { OperationWithContext } from "@powerhousedao/shared/document-model";
5
10
  import { Kysely, QueryCreator } from "kysely";
6
11
  import { FC, ReactNode } from "react";
7
12
 
13
+ //#region clis/args/common.d.ts
14
+ declare const getPackageManagerCommand: Partial<cmd_ts_dist_cjs_argparser_js0.Register> & {
15
+ parse(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<{
16
+ packageManager: Agent | undefined;
17
+ npm: boolean | undefined;
18
+ pnpm: boolean | undefined;
19
+ yarn: boolean | undefined;
20
+ bun: boolean | undefined;
21
+ }>>;
22
+ } & cmd_ts_dist_cjs_helpdoc_js0.PrintHelp & cmd_ts_dist_cjs_helpdoc_js0.ProvidesHelp & cmd_ts_dist_cjs_helpdoc_js0.Named & Partial<cmd_ts_dist_cjs_helpdoc_js0.Versioned> & cmd_ts_dist_cjs_argparser_js0.Register & cmd_ts_dist_cjs_runner_js0.Handling<{
23
+ packageManager: Agent | undefined;
24
+ npm: boolean | undefined;
25
+ pnpm: boolean | undefined;
26
+ yarn: boolean | undefined;
27
+ bun: boolean | undefined;
28
+ }, {
29
+ packageManager: Agent | undefined;
30
+ npm: boolean | undefined;
31
+ pnpm: boolean | undefined;
32
+ yarn: boolean | undefined;
33
+ bun: boolean | undefined;
34
+ }> & {
35
+ run(context: cmd_ts_dist_cjs_argparser_js0.ParseContext): Promise<cmd_ts_dist_cjs_argparser_js0.ParsingResult<{
36
+ packageManager: Agent | undefined;
37
+ npm: boolean | undefined;
38
+ pnpm: boolean | undefined;
39
+ yarn: boolean | undefined;
40
+ bun: boolean | undefined;
41
+ }>>;
42
+ } & Partial<cmd_ts_dist_cjs_helpdoc_js0.Versioned & cmd_ts_dist_cjs_helpdoc_js0.Descriptive & cmd_ts_dist_cjs_helpdoc_js0.Aliased>;
43
+ //#endregion
8
44
  //#region processors/constants.d.ts
9
45
  declare const PROCESSOR_APPS: readonly ["connect", "switchboard"];
10
46
  declare const DEFAULT_RELATIONAL_PROCESSOR_DB_NAME = "relational-db";
11
47
  declare const DEFAULT_ANALYTICS_PROCESSOR_DB_NAME = "analytics-db";
12
48
  //#endregion
13
49
  //#region document-model/signatures.d.ts
14
- /**
15
- * A signature of an action.
16
- *
17
- * This will be refactored in a future release.
18
- */
19
50
  type Signature = [string, string, string, string, string];
20
51
  /**
21
52
  * A user action signer.
@@ -50,6 +81,16 @@ type PHDocumentSignatureInfo = {
50
81
  publicKey: JsonWebKey; /** The nonce that was appended to the message to create the signature. */
51
82
  nonce: string;
52
83
  };
84
+ /** Joins a signature's params for transport. Already-joined input passes through. */
85
+ declare function serializeSignature(signature: Signature | string): string;
86
+ /**
87
+ * Splits a transported signature back into its params. A tuple passes through.
88
+ *
89
+ * Short input is padded rather than refused: verification reads the params by
90
+ * position and fails on a wrong one, which says more than a length complaint
91
+ * raised here would.
92
+ */
93
+ declare function deserializeSignature(signature: Signature | string): Signature;
53
94
  /**
54
95
  * Configuration for hashing document state in operations.
55
96
  */
@@ -84,6 +125,11 @@ declare function createDocumentState(document?: Partial<PHDocumentState>): PHDoc
84
125
  * Creates a PHBaseState with the given auth and document properties
85
126
  */
86
127
  declare function createBaseState(auth?: Partial<PHAuthState>, document?: Partial<PHDocumentState>): PHBaseState;
128
+ /**
129
+ * Backfills the auth scope to the default for legacy documents serialized with
130
+ * an empty `auth`. Replaces only `state.auth`. Idempotent.
131
+ */
132
+ declare function backfillAuthState<TState extends PHBaseState>(state: TState): TState;
87
133
  /**
88
134
  * The document state of the document.
89
135
  */
@@ -101,11 +147,106 @@ type PHDocumentState = {
101
147
  deletionReason?: string;
102
148
  };
103
149
  /**
104
- * The authentication state of the document.
105
- *
106
- * This has yet to be implemented.
150
+ * The document's authorization policy: an ordered, stacked list of grants,
151
+ * where the last matching grant wins. `{ version: 0, grants: [] }` is
152
+ * uninitialized and leaves the document open.
153
+ */
154
+ type PHAuthState = {
155
+ /**
156
+ * Policy language version. 0 is the uninitialized state; INITIALIZE_AUTH
157
+ * sets an integer >= 1.
158
+ */
159
+ version: number;
160
+ grants: Grant[];
161
+ /**
162
+ * The did:key of the auth-policy creator, captured from the INITIALIZE_AUTH
163
+ * signer. The creator may always administer the auth scope, so a grant policy
164
+ * can never lock administration out of itself. Absent for an unsigned genesis.
165
+ */
166
+ creator?: string;
167
+ };
168
+ type Grant = {
169
+ /** Stable id. */id: string;
170
+ description: string;
171
+ effect: "allow" | "deny";
172
+ principal: Principal;
173
+ capability: Capability;
174
+ /**
175
+ * The grant applies only when this condition holds. Until conditions are
176
+ * evaluated, a grant carrying one never applies.
177
+ */
178
+ where?: Condition;
179
+ };
180
+ type Principal = {
181
+ anyone: true;
182
+ } | {
183
+ address: string;
184
+ } | {
185
+ group: string;
186
+ } | {
187
+ match: Condition;
188
+ };
189
+ /**
190
+ * The folded global state of a PHGroup (powerhouse/reactor-group) document,
191
+ * narrowed to what auth evaluation reads. Membership is matched
192
+ * case-insensitively against the subject's address.
193
+ */
194
+ type PHGroupState = {
195
+ members: string[];
196
+ };
197
+ /**
198
+ * Folded group states keyed by group document id, as the groups projection
199
+ * provides them. A group id a policy names but the map does not hold fails
200
+ * closed: the principal does not match.
201
+ */
202
+ type AuthGroups = Record<string, PHGroupState>;
203
+ type Capability = {
204
+ can: "read";
205
+ scope?: string;
206
+ } | {
207
+ can: "execute";
208
+ scope?: string;
209
+ operation?: string[];
210
+ };
211
+ /**
212
+ * Boolean condition language for grants: deterministic, total, and
213
+ * JSON-serializable, versioned by `PHAuthState.version`. Defined now but not
214
+ * yet evaluated or enforced.
107
215
  */
108
- type PHAuthState = {};
216
+ type Condition = {
217
+ eq: [Operand, Operand];
218
+ } | {
219
+ ne: [Operand, Operand];
220
+ } | {
221
+ in: [Operand, Operand[]];
222
+ } | {
223
+ notIn: [Operand, Operand[]];
224
+ } | {
225
+ lt: [Operand, Operand];
226
+ } | {
227
+ lte: [Operand, Operand];
228
+ } | {
229
+ gt: [Operand, Operand];
230
+ } | {
231
+ gte: [Operand, Operand];
232
+ } | {
233
+ exists: Operand;
234
+ } | {
235
+ and: Condition[];
236
+ } | {
237
+ or: Condition[];
238
+ } | {
239
+ not: Condition;
240
+ };
241
+ /**
242
+ * A condition operand: `attr` is a dotted path into the decision context
243
+ * (e.g. "doc.global.status", "subject.address"); `lit` is a constant value.
244
+ */
245
+ type Operand = {
246
+ attr: string;
247
+ } | {
248
+ lit: string | number | boolean | null;
249
+ };
109
250
  /**
110
251
  * The base state of the document.
111
252
  */
@@ -209,7 +350,11 @@ type Operation = {
209
350
  skip: number; /** Timestamp of when the operation was added */
210
351
  timestampUtcMs: string; /** Hash of the resulting document data after the operation */
211
352
  hash: string; /** Error message for a failed action */
212
- error?: string; /** The resulting state after the operation */
353
+ error?: string;
354
+ /**
355
+ * If authorization rejected the action, this records the reason why.
356
+ */
357
+ deniedReason?: string; /** The resulting state after the operation */
213
358
  resultingState?: string;
214
359
  /**
215
360
  * The action that was applied to the document to produce this operation.
@@ -225,6 +370,24 @@ type Operation = {
225
370
  * but that is a breaking change for codegen + external doc models.
226
371
  */
227
372
  type DocumentOperations = Record<string, Operation[]>;
373
+ /**
374
+ * What happened to an operation. An operation that is not `applied` still
375
+ * occupies its index but contributes nothing to the document's state.
376
+ */
377
+ type OperationOutcome = {
378
+ kind: "applied";
379
+ } | {
380
+ kind: "reducer-error";
381
+ message: string;
382
+ } | {
383
+ kind: "denied";
384
+ reason: string;
385
+ };
386
+ /**
387
+ * Reads an operation's outcome. A denial takes precedence over a reducer
388
+ * error, since a denied operation never reaches its reducer.
389
+ */
390
+ declare function operationOutcome(operation: Operation): OperationOutcome;
228
391
  type OperationContext = {
229
392
  documentId: string;
230
393
  documentType: string;
@@ -375,8 +538,24 @@ declare function mapSkippedOperationsV2(operations: Operation[]): MappedOperatio
375
538
  * Uses the V2 model where consecutive NOOPs form chains.
376
539
  * Unlike V1 garbageCollect, this preserves ALL operations but marks which to apply.
377
540
  */
541
+ /**
542
+ * The base-reducer protocol version a document is written against. Every
543
+ * document carries one, set from the CREATE_DOCUMENT input. A header without
544
+ * one was built outside that path, and choosing a version on its behalf would
545
+ * replay the document through a reducer it was not written for, so it is an
546
+ * error rather than a default.
547
+ */
548
+ declare function baseReducerVersion(header: PHDocumentHeader): number;
378
549
  declare function garbageCollectV2<TOpIndex extends OperationIndex>(sortedOperations: TOpIndex[]): TOpIndex[];
379
550
  declare function sortMappedOperations(operations: DocumentOperationsIgnoreMap): MappedOperation[];
551
+ /**
552
+ * Records an operation in the history without applying it, which is what a
553
+ * denied operation needs: it occupies its index and contributes no state.
554
+ *
555
+ * The scope defaults to the action's own, and is passed explicitly by a rebuild
556
+ * that is walking one stream and does not want to trust the action's copy.
557
+ */
558
+ declare function appendWithoutApplying<TState extends PHBaseState>(document: PHDocument<TState>, operation: Operation, scope?: string): PHDocument<TState>;
380
559
  declare function replayDocument<TState extends PHBaseState = PHBaseState>(initialState: TState, operations: DocumentOperations, reducer: Reducer<TState>, header: PHDocumentHeader, dispatch?: SignalDispatch, skipHeaderOperations?: SkipHeaderOperations, options?: ReplayDocumentOptions): PHDocument<TState>;
381
560
  declare function parseResultingState<TState>(state: string | null | undefined): TState;
382
561
  declare enum IntegrityIssueType {
@@ -449,6 +628,7 @@ declare function filterDocumentOperationsResultingState(documentOperations?: Doc
449
628
  timestampUtcMs: string;
450
629
  hash: string;
451
630
  error?: string;
631
+ deniedReason?: string;
452
632
  action: Action;
453
633
  }[];
454
634
  };
@@ -766,7 +946,7 @@ type ProcessorDispatchResult = {
766
946
  interface IProcessorDispatch {
767
947
  execute(docId: string, branch: string, actions: Action[], signal?: AbortSignal, meta?: Record<string, unknown>): Promise<ProcessorDispatchResult>;
768
948
  }
769
- interface IProcessorHostModule {
949
+ interface IProcessorHostModuleBase {
770
950
  analyticsStore: IAnalyticsStore;
771
951
  relationalDb: IRelationalDb;
772
952
  processorApp: ProcessorApp;
@@ -807,14 +987,17 @@ type ProcessorRecord = {
807
987
  processor: IProcessor;
808
988
  filter: ProcessorFilter;
809
989
  startFrom?: "beginning" | "current";
990
+ id?: string;
810
991
  };
811
992
  /**
812
993
  * A factory function that creates processor records for a given drive.
813
994
  * Called once per drive when the drive is first detected or when the factory is registered.
814
995
  */
815
996
  type ProcessorFactory = (driveHeader: PHDocumentHeader, processorApp?: ProcessorApp) => Promise<ProcessorRecord[]> | ProcessorRecord[];
816
- /** Takes a processor host module and builds processor factories using its context */
817
- type ProcessorFactoryBuilder = (module: IProcessorHostModule) => Promise<ProcessorFactory> | ProcessorFactory;
997
+ /** Takes a processor host module and builds processor factories using its context. */
998
+ type ProcessorFactoryBuilder<TModule extends IProcessorHostModuleBase = IProcessorHostModuleBase> = {
999
+ bivarianceHack(module: TModule): Promise<ProcessorFactory> | ProcessorFactory;
1000
+ }["bivarianceHack"];
818
1001
  type ProcessorStatus = "active" | "errored";
819
1002
  type TrackedProcessor = {
820
1003
  processorId: string;
@@ -1236,6 +1419,7 @@ declare const ConfigEntrySchema: z.ZodObject<{
1236
1419
  required: z.ZodOptional<z.ZodBoolean>;
1237
1420
  default: z.ZodOptional<z.ZodBoolean>;
1238
1421
  }, z.core.$strip>;
1422
+ declare const PwaConfigSchema: z.ZodType<PHConnectPwa>;
1239
1423
  declare const ManifestSchema: z.ZodObject<{
1240
1424
  name: z.ZodString;
1241
1425
  description: z.ZodOptional<z.ZodString>;
@@ -1277,6 +1461,7 @@ declare const ManifestSchema: z.ZodObject<{
1277
1461
  required: z.ZodOptional<z.ZodBoolean>;
1278
1462
  default: z.ZodOptional<z.ZodBoolean>;
1279
1463
  }, z.core.$strip>>>;
1464
+ pwa: z.ZodOptional<z.ZodType<PHConnectPwa, unknown, z.core.$ZodTypeInternals<PHConnectPwa, unknown>>>;
1280
1465
  }, z.core.$strip>;
1281
1466
  //#endregion
1282
1467
  //#region document-model/upgrades.d.ts
@@ -1297,6 +1482,15 @@ type UpgradeManifest<TVersions extends readonly number[]> = {
1297
1482
  supportedVersions: TVersions;
1298
1483
  upgrades: { [V in Exclude<TupleMember<TVersions>, 1> as `v${V}`]: UpgradeTransition };
1299
1484
  };
1485
+ /**
1486
+ * Canonical document-model version normalization: documents stamped with 0
1487
+ * or nothing at all predate versioning and are treated as version 1, the
1488
+ * same version the registry assigns unversioned modules. Every consumer
1489
+ * that resolves a module or compares versions must use this rule; resolving
1490
+ * 0 to "latest" instead re-pins a legacy document's history to whichever
1491
+ * module happens to be newest.
1492
+ */
1493
+ declare function normalizeDocumentModelVersion(version: number | undefined | null): number;
1300
1494
  /**
1301
1495
  * Applies an UPGRADE_DOCUMENT action to a document.
1302
1496
  * Handles all upgrade scenarios including initial upgrades, no-ops, and multi-step upgrades.
@@ -2467,6 +2661,31 @@ type DocumentModelUtils<TState extends PHBaseState = PHBaseState> = {
2467
2661
  assertIsDocumentOfType: AssertIsDocumentOfType<TState>;
2468
2662
  };
2469
2663
  type Actions = Record<string, (...args: any[]) => Action>;
2664
+ /** MCP-compatible annotation hints; structural, no MCP SDK dependency. */
2665
+ type PhAiToolAnnotations = {
2666
+ title?: string;
2667
+ readOnlyHint?: boolean;
2668
+ destructiveHint?: boolean;
2669
+ idempotentHint?: boolean;
2670
+ openWorldHint?: boolean;
2671
+ };
2672
+ /**
2673
+ * Provider-agnostic tool descriptor a package can offer to the in-browser
2674
+ * AI assistant (see `DocumentModelLib.aiTools`).
2675
+ *
2676
+ * Structurally compatible with the MCP tool records produced by
2677
+ * `createReactorMcpProvider`: the callback parameter is `never` so any
2678
+ * per-tool-args function type is assignable, and the result is `unknown`
2679
+ * because the envelope shape (MCP `CallToolResult`) is unwrapped at the
2680
+ * adapter boundary.
2681
+ */
2682
+ type PhAiToolDescriptor = {
2683
+ name: string;
2684
+ description?: string;
2685
+ inputSchema: ZodRawShape;
2686
+ annotations?: PhAiToolAnnotations;
2687
+ callback: (args: never) => Promise<unknown>;
2688
+ };
2470
2689
  type DocumentModelModule<TState extends PHBaseState = PHBaseState> = {
2471
2690
  /** optional version field, should be made required */version?: number;
2472
2691
  reducer: Reducer<TState>;
@@ -2481,6 +2700,11 @@ type DocumentModelLib<TState extends PHBaseState = PHBaseState> = {
2481
2700
  subgraphs?: readonly SubgraphModule[];
2482
2701
  upgradeManifests?: readonly UpgradeManifest<readonly number[]>[] | undefined;
2483
2702
  processorFactory?: ProcessorFactoryBuilder;
2703
+ /**
2704
+ * Optional: tool descriptors this package offers to the in-browser AI
2705
+ * assistant (merged into the chat agent's tool set by the host app).
2706
+ */
2707
+ aiTools?: readonly PhAiToolDescriptor[];
2484
2708
  };
2485
2709
  type DocumentModelDocumentModelModule = DocumentModelModule<DocumentModelPHState>;
2486
2710
  type ConfigEntryType = z.infer<typeof ConfigEntryTypeSchema>;
@@ -2489,5 +2713,272 @@ type PowerhouseModule = z.infer<typeof PowerhouseModuleSchema>;
2489
2713
  type Publisher = z.infer<typeof PublisherSchema>;
2490
2714
  type Manifest = z.infer<typeof ManifestSchema>;
2491
2715
  //#endregion
2492
- export { DocumentModelDocumentModelModule as $, RedoActionSchema as $a, merge as $c, UpdateChangeLogItemInput as $i, OperationSpecification as $n, IRelationalQueryBuilder as $o, SetModelIdInput as $r, reorderOperationExamples as $s, MinimalBackupData as $t, CreateDocument as A, DeleteOperationInputSchema as Aa, PHDocument as Ac, SetPreferredEditorActionInput as Ai, createDocumentState as Al, MutationSetModelExtensionArgs as An, SetPreferredEditorActionSchema as Ao, RevisionsFilter as Ar, buildSignedAction as As, IAction as At, DeleteModuleAction as B, ManifestSchema as Ba, filterDuplicatedOperations as Bc, SignalType as Bi, ActionSigner as Bl, MutationSetOperationErrorTemplateArgs as Bn, UpdateStateExampleInputSchema as Bo, SchemaUndoAction as Br, moveOperation as Bs, IsStateOfType as Bt, CodeExample as C, CodeExampleSchema as Ca, undo as Cc, SetOperationSchemaAction as Ci, undoOperation as Cl, MutationReorderOperationErrorsArgs as Cn, SetOperationErrorTemplateInputSchema as Co, ReorderOperationErrorsAction as Cr, addModule as Cs, ENSInfo as Ct, CopyChildDocumentSignal as D, DeleteModuleInputSchema as Da, verifyOperationSignature as Dc, SetOperationTemplateAction as Di, PHDocumentState as Dl, MutationSetAuthorWebsiteArgs as Dn, SetOperationScopeInputSchema as Do, ReorderStateExamplesAction as Dr, addStateExample as Ds, Exact as Dt, CopyChildDocumentInput as E, DeleteChangeLogItemInputSchema as Ea, updateStateExample as Ec, SetOperationScopeInput as Ei, PHBaseState as El, MutationSetAuthorNameArgs as En, SetOperationSchemaInputSchema as Eo, ReorderOperationExamplesInput as Er, addOperationExample as Es, EditorProps as Et, DeleteChangeLogItemInput as F, DocumentSpecificationSchema as Fa, baseCreateDocument as Fc, Set_PreferredEditor as Fi, defaultBaseState as Fl, MutationSetNameArgs as Fn, UndoActionInputSchema as Fo, SchemaNOOPAction as Fr, deleteOperationError as Fs, ISignalResult as Ft, DeleteOperationExampleAction as G, OperationSpecificationSchema as Ga, groupOperationsByScope as Gc, State as Gi, UserActionSigner as Gl, MutationSetStateSchemaArgs as Gn, createRelationalDb as Go, SetAuthorWebsiteInput as Gr, operationWithContext as Gs, LoadStateActionStateInput as Gt, DeleteOperationAction as H, MoveOperationInputSchema as Ha, garbageCollectDocumentOperations as Hc, SigningParameters as Hi, HashConfig as Hl, MutationSetOperationReducerArgs as Hn, isDefinedNonNullAny as Ho, SetAuthorNameAction as Hr, operationExampleCreators as Hs, LoadFromInput as Ht, DeleteChildDocumentInput as I, LoadStateActionInputSchema as Ia, checkCleanedOperationsIntegrity as Ic, Signal as Ii, defaultDocumentState as Il, MutationSetOperationDescriptionArgs as In, UndoActionSchema as Io, SchemaPruneAction as Ir, deleteOperationExample as Is, ISigner as It, DeleteStateExampleAction as J, PruneActionInputSchema as Ja, isNoopOperation as Jc, Undo as Ji, PROCESSOR_APPS as Jl, MutationUpdateOperationExampleArgs as Jn, ExtractProcessorSchemaOrSelf as Jo, SetModelDescriptionAction as Jr, releaseNewVersion as Js, MakeMaybe as Jt, DeleteOperationExampleInput as K, PowerhouseModuleSchema as Ka, hashDocumentStateForScope as Kc, StateReducer as Ki, DEFAULT_ANALYTICS_PROCESSOR_DB_NAME as Kl, MutationUndoArgs as Kn, hashNamespace as Ko, SetInitialStateAction as Kr, prune as Ks, Load_State as Kt, DeleteChildDocumentSignal as L, LoadStateActionSchema as La, checkOperationsIntegrity as Lc, SignalDispatch as Li, defaultGlobalState as Ll, MutationSetOperationErrorCodeArgs as Ln, UndoSchema as Lo, SchemaRedoAction as Lr, deleteStateExample as Ls, Incremental as Lt, CreateDocumentActionInput as M, DocumentActionSchema as Ma, PHDocumentMeta as Mc, SetStateSchemaAction as Mi, createLocalState as Ml, MutationSetModelNameArgs as Mn, Set_NameSchema as Mo, SaveToFileHandle as Mr, deleteChangeLogItem as Ms, IDocument as Mt, CreateState as N, DocumentModelGlobalStateSchema as Na, addUndo as Nc, SetStateSchemaInput as Ni, createState as Nl, MutationSetModuleDescriptionArgs as Nn, Set_PreferredEditorSchema as No, Scalars as Nr, deleteModule as Ns, IOperation as Nt, CreateChildDocumentInput as O, DeleteOperationErrorInputSchema as Oa, IntegrityIssueSubType as Oc, SetOperationTemplateInput as Oi, createAuthState as Ol, MutationSetInitialStateArgs as On, SetOperationTemplateInputSchema as Oo, ReorderStateExamplesInput as Or, baseActions as Os, FileInput as Ot, DeleteChangeLogItemAction as P, DocumentModelInputSchema as Pa, attachBranch as Pc, Set_Name as Pi, defaultAuthState as Pl, MutationSetModuleNameArgs as Pn, StateSchema as Po, SchemaLoadStateAction as Pr, deleteOperation as Ps, ISignal as Pt, DocumentModelDocument as Q, RedoActionInputSchema as Qa, mapSkippedOperationsV2 as Qc, UpdateChangeLogItemAction as Qi, OperationIndex as Qn, IRelationalDbProcessor as Qo, SetModelIdAction as Qr, reorderOperationErrors as Qs, Maybe as Qt, DeleteDocumentAction as R, LoadStateActionStateInputSchema as Ra, diffOperations as Rc, SignalResult as Ri, defaultLocalState as Rl, MutationSetOperationErrorDescriptionArgs as Rn, UpdateChangeLogItemInputSchema as Ro, SchemaSetNameAction as Rr, documentModelActions as Rs, InputMaybe as Rt, Author as S, AuthorSchema as Sa, setStateSchema as Sc, SetOperationReducerInput as Si, setPreferredEditorOperation as Sl, MutationReorderModulesArgs as Sn, SetOperationErrorNameInputSchema as So, ReorderModulesInput as Sr, addChangeLogItem as Ss, DocumentSpecification as St, ConfigEntryType as T, ConfigEntryTypeSchema as Ta, updateOperationExample as Tc, SetOperationScopeAction as Ti, PHAuthState as Tl, MutationReorderStateExamplesArgs as Tn, SetOperationReducerInputSchema as To, ReorderOperationExamplesAction as Tr, addOperationError as Ts, EditorModule as Tt, DeleteOperationErrorAction as U, OperationErrorSchema as Ua, garbageCollectV2 as Uc, SkipHeaderOperationIndex as Ui, PHDocumentSignatureInfo as Ul, MutationSetOperationSchemaArgs as Un, createNamespacedDb as Uo, SetAuthorNameInput as Ur, operationFromAction as Us, LoadStateAction as Ut, DeleteModuleInput as V, ModuleSchema as Va, garbageCollect as Vc, SignatureVerificationHandler as Vi, AppActionSigner as Vl, MutationSetOperationNameArgs as Vn, definedNonNullAnySchema as Vo, ScopeState as Vr, noop as Vs, LoadFromFile as Vt, DeleteOperationErrorInput as W, OperationScopeSchema as Wa, getDocumentLastModified as Wc, SkipHeaderOperations as Wi, Signature as Wl, MutationSetOperationTemplateArgs as Wn, createNamespacedQueryBuilder as Wo, SetAuthorWebsiteAction as Wr, operationFromOperation as Ws, LoadStateActionInput as Wt, DocumentAction as X, PruneSchema as Xa, isUndoRedo as Xc, UndoActionInput as Xi, NOOPAction as Xn, IBaseRelationalDb as Xo, SetModelExtensionAction as Xr, reorderModuleOperations as Xs, Manifest as Xt, DeleteStateExampleInput as Y, PruneActionSchema as Ya, isUndo as Yc, UndoAction as Yi, MutationUpdateStateExampleArgs as Yn, HashAlgorithms as Yo, SetModelDescriptionInput as Yr, reorderChangeLogItems as Ys, MakeOptional as Yt, DocumentModelAction as Z, PublisherSchema as Za, mapSkippedOperations as Zc, UndoRedoAction as Zi, OperationErrorSpecification as Zn, IRelationalDb as Zo, SetModelExtensionInput as Zr, reorderModules as Zs, MappedOperation as Zt, AddRelationshipActionInput as _, AddModuleInputSchema as _a, setOperationReducer as _c, SetOperationErrorTemplateAction as _i, OperationContext as _l, MutationMoveOperationArgs as _n, SetNameActionInputSchema as _o, ReorderChangeLogItemsAction as _r, ActionContext as _s, DocumentModelStateOperations as _t, Actions as a, UpdateStateExampleInput as aa, setModelExtension as ac, SetModuleNameInput as ai, readOnly as al, MutationAddModuleArgs as an, ReorderOperationExamplesInputSchema as ao, PruneAction as ar, IProcessorHostModule as as, DocumentModelLocalState as at, AssertIsDocumentOfType as b, AddOperationInputSchema as ba, setOperationTemplate as bc, SetOperationNameInput as bi, redoOperation as bl, MutationReorderChangeLogItemsInputArgs as bn, SetOperationErrorCodeInputSchema as bo, ReorderModuleOperationsInput as br, actionSigner as bs, DocumentModelVersioningOperations as bt, AddModuleAction as c, User as ca, setModuleDescription as cc, SetNameOperation as ci, reshuffleByTimestamp as cl, MutationAddOperationExampleArgs as cn, SetAuthorNameInputSchema as co, Query as cr, ProcessorApps as cs, DocumentModelModuleOperations as ct, AddOperationErrorAction as d, UpgradeReducer as da, setOperationDescription as dc, SetOperationErrorCodeAction as di, sortMappedOperations as dl, MutationDeleteModuleArgs as dn, SetModelDescriptionInputSchema as do, RedoActionInput as dr, ProcessorFactoryBuilder as ds, DocumentModelOperationErrorOperations as dt, UpdateOperationExampleAction as ea, reorderStateExamples as ec, SetModelNameAction as ei, nextSkipNumber as el, ModuleSpecification as en, RedoSchema as eo, OperationsByScope as er, IRelationalQueryMethods as es, DocumentModelGlobalState as et, AddOperationErrorInput as f, UpgradeTransition as fa, setOperationErrorCode as fc, SetOperationErrorCodeInput as fi, sortOperations as fl, MutationDeleteOperationArgs as fn, SetModelExtensionInputSchema as fo, Reducer as fr, ProcessorFilter as fs, DocumentModelOperationExampleAction as ft, AddRelationshipAction as g, AddChangeLogItemInputSchema as ga, setOperationName as gc, SetOperationErrorNameInput as gi, Operation as gl, MutationLoadStateArgs as gn, SetModuleNameInputSchema as go, RemoveRelationshipActionInput as gr, Action as gs, DocumentModelStateAction as gt, AddOperationInput as h, computeUpgradeTransitions as ha, setOperationErrorTemplate as hc, SetOperationErrorNameAction as hi, DocumentOperations as hl, MutationDeleteStateExampleArgs as hn, SetModuleDescriptionInputSchema as ho, RemoveRelationshipAction as hr, TrackedProcessor as hs, DocumentModelPHState as ht, ActionVerificationHandler as i, UpdateStateExampleAction as ia, setModelDescription as ic, SetModuleNameAction as ii, prepareOperations as il, MutationAddChangeLogItemInputArgs as in, ReorderOperationErrorsInputSchema as io, Prune as ir, IProcessorDispatch as is, DocumentModelLib as it, CreateDocumentAction as j, DeleteStateExampleInputSchema as ja, PHDocumentHeader as jc, SetPreferredEditorOperation as ji, createGlobalState as jl, MutationSetModelIdArgs as jn, SetStateSchemaInputSchema as jo, SaveToFile as jr, createAction as js, ID as jt, CreateChildDocumentSignal as k, DeleteOperationExampleInputSchema as ka, IntegrityIssueType as kc, SetPreferredEditorAction as ki, createBaseState as kl, MutationSetModelDescriptionArgs as kn, SetPreferredEditorActionInputSchema as ko, ReplayDocumentOptions as kr, buildOperationSignature as ks, GetDocumentOptions as kt, AddModuleInput as l, ValidationError as la, setModuleName as lc, SetOperationDescriptionAction as li, reshuffleByTimestampAndIndex as ll, MutationAddStateExampleArgs as ln, SetAuthorWebsiteInputSchema as lo, Redo as lr, ProcessorDispatchResult as ls, DocumentModelOperationAction as lt, AddOperationExampleInput as m, applyUpgradeDocumentAction as ma, setOperationErrorName as mc, SetOperationErrorDescriptionInput as mi, updateHeaderRevision as ml, MutationDeleteOperationExampleArgs as mn, SetModelNameInputSchema as mo, ReleaseNewVersionAction as mr, ProcessorStatus as ms, DocumentModelOperationOperations as mt, ActionSignatureContext as n, UpdateRelationshipAction as na, setAuthorWebsite as nc, SetModuleDescriptionAction as ni, parseResultingState as nl, MoveOperationInput as nn, ReorderModuleOperationsInputSchema as no, PartialState as nr, RelationalDbProcessorClass as ns, DocumentModelHeaderOperations as nt, AddChangeLogItemAction as o, UpgradeDocumentAction as oa, setModelId as oc, SetNameAction as oi, removeExistingOperations as ol, MutationAddOperationArgs as on, ReorderStateExamplesInputSchema as oo, PruneActionInput as or, IProcessorManager as os, DocumentModelModule as ot, AddOperationExampleAction as p, applyDeleteDocumentAction as pa, setOperationErrorDescription as pc, SetOperationErrorDescriptionAction as pi, split as pl, MutationDeleteOperationErrorArgs as pn, SetModelIdInputSchema as po, ReducerOptions as pr, ProcessorRecord as ps, DocumentModelOperationExampleOperations as pt, DeleteOperationInput as q, PowerhouseModulesSchema as qa, isDocumentAction as qc, SubgraphModule as qi, DEFAULT_RELATIONAL_PROCESSOR_DB_NAME as ql, MutationUpdateChangeLogItemInputArgs as qn, relationalDbToQueryBuilder as qo, SetInitialStateInput as qr, redo as qs, MakeEmpty as qt, ActionSigningHandler as r, UpdateRelationshipActionInput as ra, setInitialState as rc, SetModuleDescriptionInput as ri, precedes as rl, Mutation as rn, ReorderModulesInputSchema as ro, PowerhouseModule as rr, IProcessor as rs, DocumentModelInput as rt, AddChangeLogItemInput as s, UpgradeDocumentActionInput as sa, setModelName as sc, SetNameActionInput as si, replayDocument as sl, MutationAddOperationErrorArgs as sn, ScopeStateSchema as so, Publisher as sr, ProcessorApp as ss, DocumentModelModuleAction as st, ActionErrorCallback as t, UpdateOperationExampleInput as ta, setAuthorName as tc, SetModelNameInput as ti, operationsAreEqual as tl, MoveOperationAction as tn, ReorderChangeLogItemsInputSchema as to, PartialRecord as tr, RelationalDbProcessor as ts, DocumentModelHeaderAction as tt, AddOperationAction as u, UpgradeManifest as ua, setName as uc, SetOperationDescriptionInput as ui, skipHeaderOperations as ul, MutationDeleteChangeLogItemInputArgs as un, SetInitialStateInputSchema as uo, RedoAction as ur, ProcessorFactory as us, DocumentModelOperationErrorAction as ut, AddStateExampleAction as v, AddOperationErrorInputSchema as va, setOperationSchema as vc, SetOperationErrorTemplateInput as vi, OperationWithContext$1 as vl, MutationPruneArgs as vn, SetNameActionSchema as vo, ReorderChangeLogItemsInput as vr, actionContext as vs, DocumentModelUtils as vt, ConfigEntry as w, ConfigEntrySchema as wa, updateChangeLogItem as wc, SetOperationSchemaInput as wi, undoOperationV2 as wl, MutationReorderOperationExamplesArgs as wn, SetOperationNameInputSchema as wo, ReorderOperationErrorsInput as wr, addOperation as ws, EditorDispatch as wt, AssertIsStateOfType as x, AddStateExampleInputSchema as xa, setPreferredEditor as xc, SetOperationReducerAction as xi, setNameOperation as xl, MutationReorderModuleOperationsArgs as xn, SetOperationErrorDescriptionInputSchema as xo, ReorderModulesAction as xr, actions as xs, DocumentOperationsIgnoreMap as xt, AddStateExampleInput as y, AddOperationExampleInputSchema as ya, setOperationScope as yc, SetOperationNameAction as yi, loadStateOperation as yl, MutationRedoArgs as yn, SetOperationDescriptionInputSchema as yo, ReorderModuleOperationsAction as yr, actionFromAction as ys, DocumentModelVersioningAction as yt, DeleteDocumentActionInput as z, Load_StateSchema as za, filterDocumentOperationsResultingState as zc, SignalResults as zi, defaultPHState as zl, MutationSetOperationErrorNameArgs as zn, UpdateOperationExampleInputSchema as zo, SchemaSetPreferredEditorAction as zr, loadState as zs, IsDocumentOfType as zt };
2493
- //# sourceMappingURL=types-DXsYu6Tq.d.ts.map
2716
+ //#region clis/constants.d.ts
2717
+ declare const SERVICE_ACTIONS: readonly ["start", "stop", "status", "setup", "restart"];
2718
+ declare const DRIVES_PRESERVE_STRATEGIES: readonly ["preserve-all", "preserve-by-url-and-detach"];
2719
+ declare const LOG_LEVELS: readonly ["debug", "info", "warn", "error", "verbose"];
2720
+ declare const DEFAULT_REGISTRY_URL: "https://registry.vetra.io";
2721
+ //#endregion
2722
+ //#region clis/types.d.ts
2723
+ type ServiceActions = typeof SERVICE_ACTIONS;
2724
+ type ServiceAction = ServiceActions[number];
2725
+ type DrivePreserveStrategies = typeof DRIVES_PRESERVE_STRATEGIES;
2726
+ type DrivePreserveStrategy = DrivePreserveStrategies[number];
2727
+ type LogLevels = typeof LOG_LEVELS;
2728
+ type LogLevel = LogLevels[number];
2729
+ type ParsedCmdResult<P> = P extends ArgParser<infer Out> ? Out : never;
2730
+ type PackageManagerArgs = ParsedCmdResult<typeof getPackageManagerCommand>;
2731
+ type PHPackageProvider = "npm" | "github" | "local" | "registry";
2732
+ type PathValidation = (dir: string) => boolean;
2733
+ type PowerhousePackage = {
2734
+ packageName: string;
2735
+ version?: string;
2736
+ provider?: PHPackageProvider;
2737
+ url?: string;
2738
+ };
2739
+ type PHConnectBranding = {
2740
+ appName?: string;
2741
+ homeBackground?: string | null;
2742
+ };
2743
+ type PHConnectDefaultDriveRemote = {
2744
+ url: string;
2745
+ name?: string | null;
2746
+ icon?: string | null;
2747
+ };
2748
+ type PHConnectDefaultDriveLocal = {
2749
+ /** Discriminator: this entry is a local drive created on first boot. */local: true; /** Stable drive id; the drive is not re-created on later boots. */
2750
+ id: string;
2751
+ name?: string | null;
2752
+ icon?: string | null; /** Drive app (preferred editor) to open on the drive. */
2753
+ app?: string;
2754
+ };
2755
+ type PHConnectDefaultDrive = PHConnectDefaultDriveRemote | PHConnectDefaultDriveLocal;
2756
+ type PHConnectDriveSection = {
2757
+ enabled?: boolean;
2758
+ allowAdd?: boolean;
2759
+ allowDelete?: boolean;
2760
+ };
2761
+ type PHConnectDriveSections = {
2762
+ remote?: PHConnectDriveSection;
2763
+ local?: PHConnectDriveSection;
2764
+ };
2765
+ type PHConnectDrives = {
2766
+ allowAddDrive?: boolean;
2767
+ defaultDrives?: PHConnectDefaultDrive[];
2768
+ preserveStrategy?: DrivePreserveStrategy;
2769
+ sections?: PHConnectDriveSections;
2770
+ };
2771
+ type PHConnectApp = {
2772
+ logLevel?: "debug" | "info" | "warn" | "error";
2773
+ basePath?: string;
2774
+ offline?: boolean;
2775
+ studioMode?: boolean;
2776
+ };
2777
+ type PHConnectAi = {
2778
+ /** Enables the in-browser AI assistant (chat FAB + window). Off by default. */assistantEnabled?: boolean;
2779
+ };
2780
+ type PHConnectPackages = {
2781
+ externalEnabled?: boolean; /** Subscribe to the static-mode `/__packages` SSE channel for live reload. */
2782
+ liveReload?: boolean;
2783
+ };
2784
+ type PHRenownRainbowAdapterConfig = {
2785
+ /** WalletConnect project id; required for the rainbow adapter to function. */walletConnectProjectId?: string; /** Optional Infura project id used to build RPC transports. */
2786
+ infuraProjectId?: string;
2787
+ };
2788
+ type PHRenownPrivyAdapterConfig = {
2789
+ /** Privy application id; required for the privy adapter to function. */appId?: string; /** Optional Privy client id. */
2790
+ clientId?: string; /** Login methods this adapter offers; defaults per adapter when omitted. */
2791
+ methods?: string[];
2792
+ };
2793
+ type PHConnectRenownAdapters = {
2794
+ rainbow?: PHRenownRainbowAdapterConfig;
2795
+ privy?: PHRenownPrivyAdapterConfig;
2796
+ };
2797
+ type PHConnectRenown = {
2798
+ url?: string;
2799
+ networkId?: string;
2800
+ chainId?: number; /** Renown localStorage namespace; share it across Connects to share login. */
2801
+ namespace?: string; /** Switchboard GraphQL URL; when set, enables in-page (no-redirect) auth. */
2802
+ switchboardUrl?: string; /** Per-adapter wallet config; presence of a key enables that adapter. */
2803
+ adapters?: PHConnectRenownAdapters;
2804
+ };
2805
+ type PHConnectSentry = {
2806
+ /** Sentry DSN URL. `null` disables Sentry entirely. */dsn?: string | null; /** Sentry environment label. */
2807
+ env?: string; /** Enable Sentry performance tracing. */
2808
+ tracing?: boolean;
2809
+ };
2810
+ type PHConnectInstance = {
2811
+ namespace: string | null;
2812
+ reactorWorker: boolean;
2813
+ };
2814
+ /** Each flag implies its predecessors, and must match the fleet Connect syncs
2815
+ * with or the two compute different replay outcomes. */
2816
+ type PHConnectReactorFeatureFlags = {
2817
+ /** Decide writes from the document stream instead of the meta cache. */documentDecisions?: boolean; /** Enforce the auth scope's policy at admission, replay, and read. */
2818
+ authEnforcement?: boolean; /** Let `{ group }` principals match, via the group documents' rosters. */
2819
+ authGroups?: boolean; /** Evaluate `where` / `match` conditions on grants. */
2820
+ authConditions?: boolean;
2821
+ };
2822
+ type PHConnectReactor = {
2823
+ featureFlags?: PHConnectReactorFeatureFlags;
2824
+ };
2825
+ /**
2826
+ * A URL-matching pattern for a service-worker runtime-caching rule, in
2827
+ * JSON-serialisable form. A plain string is handed to Workbox verbatim (exact
2828
+ * URL or same-origin path match). `{ source, flags }` is reconstructed into a
2829
+ * `RegExp` at build time — use it for prefix/suffix/origin matches (e.g.
2830
+ * `{ source: "^https://api\\.acme\\.io/" }`). Function-valued patterns aren't
2831
+ * expressible here; regex covers the realistic package cases.
2832
+ */
2833
+ type PHConnectPwaUrlPattern = string | {
2834
+ source: string;
2835
+ flags?: string;
2836
+ };
2837
+ type PHConnectPwaCacheStrategy = "CacheFirst" | "CacheOnly" | "NetworkFirst" | "NetworkOnly" | "StaleWhileRevalidate";
2838
+ /** Serialisable subset of a Workbox `RuntimeCaching` rule. */
2839
+ type PHConnectPwaRuntimeCaching = {
2840
+ urlPattern: PHConnectPwaUrlPattern;
2841
+ handler: PHConnectPwaCacheStrategy;
2842
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "PATCH";
2843
+ options?: {
2844
+ cacheName?: string;
2845
+ /** Seconds a NetworkFirst rule waits for the network before falling back
2846
+ * to the cache. */
2847
+ networkTimeoutSeconds?: number;
2848
+ expiration?: {
2849
+ maxEntries?: number;
2850
+ maxAgeSeconds?: number;
2851
+ };
2852
+ cacheableResponse?: {
2853
+ statuses?: number[];
2854
+ headers?: Record<string, string>;
2855
+ };
2856
+ };
2857
+ };
2858
+ type PHConnectPwaIcon = {
2859
+ src: string;
2860
+ sizes?: string;
2861
+ type?: string;
2862
+ purpose?: string;
2863
+ };
2864
+ /**
2865
+ * A File Handling API entry a package or project contributes: the OS-level
2866
+ * file types the installed Connect PWA offers to open. There is deliberately
2867
+ * no `action` field — consuming launched files requires runtime code that
2868
+ * lives in Connect itself, so every handler (built-in or contributed) opens
2869
+ * at Connect's app root, injected at build time.
2870
+ */
2871
+ type PHConnectPwaFileHandler = {
2872
+ /** MIME type → file extensions (each must start with "."). */accept: Record<string, string[]>; /** OS-level file-type icons. */
2873
+ icons?: PHConnectPwaIcon[];
2874
+ launch_type?: "single-client" | "multiple-clients";
2875
+ };
2876
+ /** Web-app-manifest fields a package or project may override. */
2877
+ type PHConnectPwaManifest = {
2878
+ name?: string;
2879
+ short_name?: string;
2880
+ description?: string;
2881
+ theme_color?: string;
2882
+ background_color?: string;
2883
+ display?: "fullscreen" | "standalone" | "minimal-ui" | "browser";
2884
+ start_url?: string;
2885
+ scope?: string;
2886
+ icons?: PHConnectPwaIcon[]; /** Extra file associations, appended after Connect's built-in `.phd`/`.phdm` handler. */
2887
+ file_handlers?: PHConnectPwaFileHandler[]; /** How the OS launches the app for handled files/links. */
2888
+ launch_handler?: {
2889
+ client_mode: "auto" | "focus-existing" | "navigate-existing" | "navigate-new";
2890
+ };
2891
+ /** App-store-style categories. NOT authored under `connect.pwa` — derived at
2892
+ * build/runtime from the `category` field of every contributing
2893
+ * `powerhouse.manifest.json` (project + packages), unioned across them. */
2894
+ categories?: string[];
2895
+ };
2896
+ /**
2897
+ * PWA / service-worker overrides contributed by a package or the project.
2898
+ * Layered on top of Connect's hardcoded PWA defaults at build time. Scalar
2899
+ * fields deep-merge (later layer wins); every array member — the manifest
2900
+ * arrays (`icons`, `file_handlers`, and the derived `categories`) plus the
2901
+ * top-level `globPatterns`, `globIgnores`, `runtimeCaching` and
2902
+ * `navigateFallbackDenylist` — is additive (concatenated/unioned);
2903
+ * `maximumFileSizeToCacheInBytes` takes the max across contributors.
2904
+ * Precedence: defaults < package fragments < project config.
2905
+ */
2906
+ type PHConnectPwa = {
2907
+ manifest?: PHConnectPwaManifest; /** Extra Workbox precache globs, unioned with the built-in patterns. */
2908
+ globPatterns?: string[]; /** Extra Workbox precache ignore globs, unioned with the built-in list. */
2909
+ globIgnores?: string[]; /** Raise the precache file-size ceiling; the max across contributors wins. */
2910
+ maximumFileSizeToCacheInBytes?: number; /** Additional runtime-caching rules, appended after the built-in rules. */
2911
+ runtimeCaching?: PHConnectPwaRuntimeCaching[]; /** Extra SPA-fallback denylist patterns, unioned with the built-in list. */
2912
+ navigateFallbackDenylist?: PHConnectPwaUrlPattern[];
2913
+ };
2914
+ type PHConnectRuntimeConfig = {
2915
+ branding?: PHConnectBranding;
2916
+ app?: PHConnectApp;
2917
+ ai?: PHConnectAi;
2918
+ packages?: PHConnectPackages;
2919
+ drives?: PHConnectDrives;
2920
+ renown?: PHConnectRenown;
2921
+ sentry?: PHConnectSentry;
2922
+ instance?: PHConnectInstance;
2923
+ reactor?: PHConnectReactor;
2924
+ pwa?: PHConnectPwa;
2925
+ };
2926
+ /** Which Renown instance a reactor authenticates against, server-side. */
2927
+ type PHReactorRenown = {
2928
+ /** "self" reads this reactor's own renown read model; "remote" (default)
2929
+ * queries a Renown or Switchboard instance. */
2930
+ source?: "remote" | "self"; /** Renown base URL; also the instance this reactor's own identity uses. */
2931
+ url?: string; /** Switchboard GraphQL endpoint to read credentials from directly. */
2932
+ switchboardUrl?: string;
2933
+ };
2934
+ type PowerhouseConfig = {
2935
+ logLevel: LogLevel;
2936
+ documentModelsDir: string;
2937
+ editorsDir: string;
2938
+ processorsDir: string;
2939
+ subgraphsDir: string;
2940
+ importScriptsDir: string;
2941
+ skipFormat: boolean;
2942
+ interactive?: boolean;
2943
+ watch?: boolean;
2944
+ reactor?: {
2945
+ port?: number;
2946
+ https?: undefined | boolean | {
2947
+ keyPath: string;
2948
+ certPath: string;
2949
+ };
2950
+ storage?: {
2951
+ type: "filesystem" | "memory" | "postgres" | "browser";
2952
+ filesystemPath?: string;
2953
+ postgresUrl?: string;
2954
+ };
2955
+ };
2956
+ auth?: {
2957
+ enabled?: boolean;
2958
+ admins: string[];
2959
+ renown?: PHReactorRenown;
2960
+ };
2961
+ switchboard?: {
2962
+ database?: {
2963
+ url?: string;
2964
+ };
2965
+ port?: number;
2966
+ };
2967
+ studio?: {
2968
+ port?: number;
2969
+ host?: string;
2970
+ https: boolean;
2971
+ openBrowser?: boolean;
2972
+ };
2973
+ packages?: PowerhousePackage[];
2974
+ vetra?: {
2975
+ driveId?: string;
2976
+ driveUrl?: string;
2977
+ connectPort?: number;
2978
+ };
2979
+ packageRegistryUrl?: string;
2980
+ connect?: PHConnectRuntimeConfig;
2981
+ };
2982
+ //#endregion
2983
+ export { AddOperationExampleAction as $, UpgradeReducer as $a, setModuleName as $c, SetOperationErrorCodeAction as $i, replayDocument as $l, MutationDeleteOperationErrorArgs as $n, SetAuthorWebsiteInputSchema as $o, RedoActionInput as $r, ProcessorDispatchResult as $s, DocumentModelOperationExampleOperations as $t, PHReactorRenown as A, SigningParameters as Aa, moveOperation as Ac, SetAuthorNameAction as Ai, diffOperations as Al, LoadStateActionInput as An, ModuleSchema as Ao, MutationSetOperationTemplateArgs as Ar, UpdateStateExampleInputSchema as As, DeleteOperationErrorInput as At, createAuthState as Au, DEFAULT_REGISTRY_URL as B, UpdateChangeLogItemAction as Ba, reorderModuleOperations as Bc, SetModelIdAction as Bi, isNoopOperation as Bl, ModuleSpecification as Bn, PublisherSchema as Bo, OperationsByScope as Br, IBaseRelationalDb as Bs, DocumentModelGlobalState as Bt, defaultLocalState as Bu, PHConnectReactor as C, Set_PreferredEditor as Ca, deleteModule as Cc, SchemaNOOPAction as Ci, addUndo as Cl, Incremental as Cn, DocumentModelInputSchema as Co, MutationSetOperationErrorCodeArgs as Cr, Set_PreferredEditorSchema as Cs, DeleteChildDocumentSignal as Ct, Operand as Cu, PHConnectRuntimeConfig as D, SignalResults as Da, deleteStateExample as Dc, SchemaSetPreferredEditorAction as Di, baseReducerVersion as Dl, LoadFromFile as Dn, LoadStateActionStateInputSchema as Do, MutationSetOperationNameArgs as Dr, UndoSchema as Ds, DeleteModuleInput as Dt, PHGroupState as Du, PHConnectRenownAdapters as E, SignalResult as Ea, deleteOperationExample as Ec, SchemaSetNameAction as Ei, baseCreateDocument as El, IsStateOfType as En, LoadStateActionSchema as Eo, MutationSetOperationErrorTemplateArgs as Er, UndoActionSchema as Es, DeleteModuleAction as Et, PHDocumentState as Eu, PathValidation as F, SubgraphModule as Fa, operationWithContext as Fc, SetInitialStateInput as Fi, garbageCollectV2 as Fl, MakeOptional as Fn, PowerhouseModuleSchema as Fo, MutationUpdateStateExampleArgs as Fr, createRelationalDb as Fs, DeleteStateExampleInput as Ft, createState as Fu, Actions as G, UpdateRelationshipActionInput as Ga, setAuthorName as Gc, SetModuleDescriptionInput as Gi, merge as Gl, MutationAddModuleArgs as Gn, ReorderChangeLogItemsInputSchema as Go, PowerhouseModule as Gr, RelationalDbProcessor as Gs, DocumentModelLocalState as Gt, PHDocumentSignatureInfo as Gu, ActionSignatureContext as H, UpdateOperationExampleAction as Ha, reorderOperationErrors as Hc, SetModelNameAction as Hi, isUndoRedo as Hl, MoveOperationInput as Hn, RedoActionInputSchema as Ho, PartialState as Hr, IRelationalDbProcessor as Hs, DocumentModelHeaderOperations as Ht, ActionSigner as Hu, PowerhouseConfig as I, Undo as Ia, prune as Ic, SetModelDescriptionAction as Ii, getDocumentLastModified as Il, Manifest as In, PowerhouseModulesSchema as Io, NOOPAction as Ir, hashNamespace as Is, DocumentAction as It, defaultAuthState as Iu, AddModuleAction as J, UpgradeDocumentAction as Ja, setModelDescription as Jc, SetNameAction as Ji, parseResultingState as Jl, MutationAddOperationExampleArgs as Jn, ReorderOperationErrorsInputSchema as Jo, PruneActionInput as Jr, IProcessorDispatch as Js, DocumentModelModuleOperations as Jt, deserializeSignature as Ju, AddChangeLogItemAction as K, UpdateStateExampleAction as Ka, setAuthorWebsite as Kc, SetModuleNameAction as Ki, nextSkipNumber as Kl, MutationAddOperationArgs as Kn, ReorderModuleOperationsInputSchema as Ko, Prune as Kr, RelationalDbProcessorClass as Ks, DocumentModelModule as Kt, Signature as Ku, PowerhousePackage as L, UndoAction as La, redo as Lc, SetModelDescriptionInput as Li, groupOperationsByScope as Ll, MappedOperation as Ln, PruneActionInputSchema as Lo, OperationErrorSpecification as Lr, relationalDbToQueryBuilder as Ls, DocumentModelAction as Lt, defaultBaseState as Lu, PHRenownRainbowAdapterConfig as M, SkipHeaderOperations as Ma, operationExampleCreators as Mc, SetAuthorWebsiteAction as Mi, filterDuplicatedOperations as Ml, Load_State as Mn, OperationErrorSchema as Mo, MutationUndoArgs as Mr, isDefinedNonNullAny as Ms, DeleteOperationExampleInput as Mt, createDocumentState as Mu, PackageManagerArgs as N, State as Na, operationFromAction as Nc, SetAuthorWebsiteInput as Ni, garbageCollect as Nl, MakeEmpty as Nn, OperationScopeSchema as No, MutationUpdateChangeLogItemInputArgs as Nr, createNamespacedDb as Ns, DeleteOperationInput as Nt, createGlobalState as Nu, PHConnectSentry as O, SignalType as Oa, documentModelActions as Oc, SchemaUndoAction as Oi, checkCleanedOperationsIntegrity as Ol, LoadFromInput as On, Load_StateSchema as Oo, MutationSetOperationReducerArgs as Or, UpdateChangeLogItemInputSchema as Os, DeleteOperationAction as Ot, Principal as Ou, ParsedCmdResult as P, StateReducer as Pa, operationFromOperation as Pc, SetInitialStateAction as Pi, garbageCollectDocumentOperations as Pl, MakeMaybe as Pn, OperationSpecificationSchema as Po, MutationUpdateOperationExampleArgs as Pr, createNamespacedQueryBuilder as Ps, DeleteStateExampleAction as Pt, createLocalState as Pu, AddOperationErrorInput as Q, UpgradeManifest as Qa, setModuleDescription as Qc, SetOperationDescriptionInput as Qi, removeExistingOperations as Ql, MutationDeleteOperationArgs as Qn, SetAuthorNameInputSchema as Qo, RedoAction as Qr, ProcessorApps as Qs, DocumentModelOperationExampleAction as Qt, PROCESSOR_APPS as Qu, ServiceAction as R, UndoActionInput as Ra, releaseNewVersion as Rc, SetModelExtensionAction as Ri, hashDocumentStateForScope as Rl, Maybe as Rn, PruneActionSchema as Ro, OperationIndex as Rr, ExtractProcessorSchemaOrSelf as Rs, DocumentModelDocument as Rt, defaultDocumentState as Ru, PHConnectPwaUrlPattern as S, Set_Name as Sa, deleteChangeLogItem as Sc, SchemaLoadStateAction as Si, PHDocumentMeta as Sl, ISigner as Sn, DocumentModelGlobalStateSchema as So, MutationSetOperationDescriptionArgs as Sr, Set_NameSchema as Ss, DeleteChildDocumentInput as St, Grant as Su, PHConnectRenown as T, SignalDispatch as Ta, deleteOperationError as Tc, SchemaRedoAction as Ti, attachBranch as Tl, IsDocumentOfType as Tn, LoadStateActionInputSchema as To, MutationSetOperationErrorNameArgs as Tr, UndoActionInputSchema as Ts, DeleteDocumentActionInput as Tt, PHBaseState as Tu, ActionSigningHandler as U, UpdateOperationExampleInput as Ua, reorderOperationExamples as Uc, SetModelNameInput as Ui, mapSkippedOperations as Ul, Mutation as Un, RedoActionSchema as Uo, PhAiToolAnnotations as Ur, IRelationalQueryBuilder as Us, DocumentModelInput as Ut, AppActionSigner as Uu, ActionErrorCallback as V, UpdateChangeLogItemInput as Va, reorderModules as Vc, SetModelIdInput as Vi, isUndo as Vl, MoveOperationAction as Vn, PwaConfigSchema as Vo, PartialRecord as Vr, IRelationalDb as Vs, DocumentModelHeaderAction as Vt, defaultPHState as Vu, ActionVerificationHandler as W, UpdateRelationshipAction as Wa, reorderStateExamples as Wc, SetModuleDescriptionAction as Wi, mapSkippedOperationsV2 as Wl, MutationAddChangeLogItemInputArgs as Wn, RedoSchema as Wo, PhAiToolDescriptor as Wr, IRelationalQueryMethods as Ws, DocumentModelLib as Wt, HashConfig as Wu, AddOperationAction as X, User as Xa, setModelId as Xc, SetNameOperation as Xi, prepareOperations as Xl, MutationDeleteChangeLogItemInputArgs as Xn, ReorderStateExamplesInputSchema as Xo, Query as Xr, IProcessorManager as Xs, DocumentModelOperationErrorAction as Xt, DEFAULT_ANALYTICS_PROCESSOR_DB_NAME as Xu, AddModuleInput as Y, UpgradeDocumentActionInput as Ya, setModelExtension as Yc, SetNameActionInput as Yi, precedes as Yl, MutationAddStateExampleArgs as Yn, ReorderOperationExamplesInputSchema as Yo, Publisher as Yr, IProcessorHostModuleBase as Ys, DocumentModelOperationAction as Yt, serializeSignature as Yu, AddOperationErrorAction as Z, ValidationError as Za, setModelName as Zc, SetOperationDescriptionAction as Zi, readOnly as Zl, MutationDeleteModuleArgs as Zn, ScopeStateSchema as Zo, Redo as Zr, ProcessorApp as Zs, DocumentModelOperationErrorOperations as Zt, DEFAULT_RELATIONAL_PROCESSOR_DB_NAME as Zu, PHConnectPwaCacheStrategy as _, SetPreferredEditorAction as _a, addStateExample as _c, ReplayDocumentOptions as _i, verifyOperationSignature as _l, ID as _n, DeleteOperationErrorInputSchema as _o, MutationSetModelIdArgs as _r, SetOperationScopeInputSchema as _s, CreateDocumentAction as _t, undoOperation as _u, PHConnectAi as a, SetOperationErrorTemplateAction as aa, TrackedProcessor as ac, ReorderChangeLogItemsAction as ai, setOperationErrorTemplate as al, DocumentModelVersioningAction as an, AddChangeLogItemInputSchema as ao, MutationRedoArgs as ar, SetModuleDescriptionInputSchema as as, AddStateExampleInput as at, split as au, PHConnectPwaManifest as b, SetStateSchemaAction as ba, buildSignedAction as bc, SaveToFileHandle as bi, PHDocument as bl, ISignal as bn, DeleteStateExampleInputSchema as bo, MutationSetModuleNameArgs as br, SetPreferredEditorActionSchema as bs, DeleteChangeLogItemAction as bt, Capability as bu, PHConnectDefaultDrive as c, SetOperationNameInput as ca, actionContext as cc, ReorderModuleOperationsInput as ci, setOperationSchema as cl, DocumentSpecification as cn, AddOperationExampleInputSchema as co, MutationReorderModulesArgs as cr, SetNameActionSchema as cs, Author as ct, Operation as cu, PHConnectDriveSection as d, SetOperationSchemaAction as da, actions as dc, ReorderOperationErrorsAction as di, setPreferredEditor as dl, EditorModule as dn, AuthorSchema as do, MutationReorderStateExamplesArgs as dr, SetOperationErrorDescriptionInputSchema as ds, ConfigEntryType as dt, OperationWithContext$1 as du, SetOperationErrorCodeInput as ea, ProcessorFactory as ec, Reducer as ei, setName as el, DocumentModelOperationOperations as en, UpgradeTransition as eo, MutationDeleteOperationExampleArgs as er, SetInitialStateInputSchema as es, AddOperationExampleInput as et, reshuffleByTimestamp as eu, PHConnectDriveSections as f, SetOperationSchemaInput as fa, addChangeLogItem as fc, ReorderOperationErrorsInput as fi, setStateSchema as fl, EditorProps as fn, CodeExampleSchema as fo, MutationSetAuthorNameArgs as fr, SetOperationErrorNameInputSchema as fs, CopyChildDocumentInput as ft, loadStateOperation as fu, PHConnectPwa as g, SetOperationTemplateInput as ga, addOperationExample as gc, ReorderStateExamplesInput as gi, updateStateExample as gl, IAction as gn, DeleteModuleInputSchema as go, MutationSetModelExtensionArgs as gr, SetOperationSchemaInputSchema as gs, CreateDocument as gt, setPreferredEditorOperation as gu, PHConnectPackages as h, SetOperationTemplateAction as ha, addOperationError as hc, ReorderStateExamplesAction as hi, updateOperationExample as hl, GetDocumentOptions as hn, DeleteChangeLogItemInputSchema as ho, MutationSetModelDescriptionArgs as hr, SetOperationReducerInputSchema as hs, CreateChildDocumentSignal as ht, setNameOperation as hu, LogLevels as i, SetOperationErrorNameInput as ia, ProcessorStatus as ic, RemoveRelationshipActionInput as ii, setOperationErrorName as il, DocumentModelUtils as in, normalizeDocumentModelVersion as io, MutationPruneArgs as ir, SetModelNameInputSchema as is, AddStateExampleAction as it, sortOperations as iu, PHRenownPrivyAdapterConfig as j, SkipHeaderOperationIndex as ja, noop as jc, SetAuthorNameInput as ji, filterDocumentOperationsResultingState as jl, LoadStateActionStateInput as jn, MoveOperationInputSchema as jo, MutationSetStateSchemaArgs as jr, definedNonNullAnySchema as js, DeleteOperationExampleAction as jt, createBaseState as ju, PHPackageProvider as k, SignatureVerificationHandler as ka, loadState as kc, ScopeState as ki, checkOperationsIntegrity as kl, LoadStateAction as kn, ManifestSchema as ko, MutationSetOperationSchemaArgs as kr, UpdateOperationExampleInputSchema as ks, DeleteOperationErrorAction as kt, backfillAuthState as ku, PHConnectDefaultDriveLocal as l, SetOperationReducerAction as la, actionFromAction as lc, ReorderModulesAction as li, setOperationScope as ll, ENSInfo as ln, AddOperationInputSchema as lo, MutationReorderOperationErrorsArgs as lr, SetOperationDescriptionInputSchema as ls, CodeExample as lt, OperationContext as lu, PHConnectInstance as m, SetOperationScopeInput as ma, addOperation as mc, ReorderOperationExamplesInput as mi, updateChangeLogItem as ml, FileInput as mn, ConfigEntryTypeSchema as mo, MutationSetInitialStateArgs as mr, SetOperationNameInputSchema as ms, CreateChildDocumentInput as mt, redoOperation as mu, DrivePreserveStrategy as n, SetOperationErrorDescriptionInput as na, ProcessorFilter as nc, ReleaseNewVersionAction as ni, setOperationErrorCode as nl, DocumentModelStateAction as nn, applyUpgradeDocumentAction as no, MutationLoadStateArgs as nr, SetModelExtensionInputSchema as ns, AddRelationshipAction as nt, skipHeaderOperations as nu, PHConnectApp as o, SetOperationErrorTemplateInput as oa, Action as oc, ReorderChangeLogItemsInput as oi, setOperationName as ol, DocumentModelVersioningOperations as on, AddModuleInputSchema as oo, MutationReorderChangeLogItemsInputArgs as or, SetModuleNameInputSchema as os, AssertIsDocumentOfType as ot, updateHeaderRevision as ou, PHConnectDrives as p, SetOperationScopeAction as pa, addModule as pc, ReorderOperationExamplesAction as pi, undo as pl, Exact as pn, ConfigEntrySchema as po, MutationSetAuthorWebsiteArgs as pr, SetOperationErrorTemplateInputSchema as ps, CopyChildDocumentSignal as pt, operationOutcome as pu, AddChangeLogItemInput as q, UpdateStateExampleInput as qa, setInitialState as qc, SetModuleNameInput as qi, operationsAreEqual as ql, MutationAddOperationErrorArgs as qn, ReorderModulesInputSchema as qo, PruneAction as qr, IProcessor as qs, DocumentModelModuleAction as qt, UserActionSigner as qu, LogLevel as r, SetOperationErrorNameAction as ra, ProcessorRecord as rc, RemoveRelationshipAction as ri, setOperationErrorDescription as rl, DocumentModelStateOperations as rn, computeUpgradeTransitions as ro, MutationMoveOperationArgs as rr, SetModelIdInputSchema as rs, AddRelationshipActionInput as rt, sortMappedOperations as ru, PHConnectBranding as s, SetOperationNameAction as sa, ActionContext as sc, ReorderModuleOperationsAction as si, setOperationReducer as sl, DocumentOperationsIgnoreMap as sn, AddOperationErrorInputSchema as so, MutationReorderModuleOperationsArgs as sr, SetNameActionInputSchema as ss, AssertIsStateOfType as st, DocumentOperations as su, DrivePreserveStrategies as t, SetOperationErrorDescriptionAction as ta, ProcessorFactoryBuilder as tc, ReducerOptions as ti, setOperationDescription as tl, DocumentModelPHState as tn, applyDeleteDocumentAction as to, MutationDeleteStateExampleArgs as tr, SetModelDescriptionInputSchema as ts, AddOperationInput as tt, reshuffleByTimestampAndIndex as tu, PHConnectDefaultDriveRemote as u, SetOperationReducerInput as ua, actionSigner as uc, ReorderModulesInput as ui, setOperationTemplate as ul, EditorDispatch as un, AddStateExampleInputSchema as uo, MutationReorderOperationExamplesArgs as ur, SetOperationErrorCodeInputSchema as us, ConfigEntry as ut, OperationOutcome as uu, PHConnectPwaFileHandler as v, SetPreferredEditorActionInput as va, baseActions as vc, RevisionsFilter as vi, IntegrityIssueSubType as vl, IDocument as vn, DeleteOperationExampleInputSchema as vo, MutationSetModelNameArgs as vr, SetOperationTemplateInputSchema as vs, CreateDocumentActionInput as vt, undoOperationV2 as vu, PHConnectReactorFeatureFlags as w, Signal as wa, deleteOperation as wc, SchemaPruneAction as wi, appendWithoutApplying as wl, InputMaybe as wn, DocumentSpecificationSchema as wo, MutationSetOperationErrorDescriptionArgs as wr, StateSchema as ws, DeleteDocumentAction as wt, PHAuthState as wu, PHConnectPwaRuntimeCaching as x, SetStateSchemaInput as xa, createAction as xc, Scalars as xi, PHDocumentHeader as xl, ISignalResult as xn, DocumentActionSchema as xo, MutationSetNameArgs as xr, SetStateSchemaInputSchema as xs, DeleteChangeLogItemInput as xt, Condition as xu, PHConnectPwaIcon as y, SetPreferredEditorOperation as ya, buildOperationSignature as yc, SaveToFile as yi, IntegrityIssueType as yl, IOperation as yn, DeleteOperationInputSchema as yo, MutationSetModuleDescriptionArgs as yr, SetPreferredEditorActionInputSchema as ys, CreateState as yt, AuthGroups as yu, ServiceActions as z, UndoRedoAction as za, reorderChangeLogItems as zc, SetModelExtensionInput as zi, isDocumentAction as zl, MinimalBackupData as zn, PruneSchema as zo, OperationSpecification as zr, HashAlgorithms as zs, DocumentModelDocumentModelModule as zt, defaultGlobalState as zu };
2984
+ //# sourceMappingURL=types-BzWRXB7f.d.ts.map