@agimon-ai/po-config 0.0.0-alpha.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 (170) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +170 -0
  3. package/dist/agentPluginMcp.cjs +322 -0
  4. package/dist/agentPluginMcp.cjs.map +1 -0
  5. package/dist/agentPluginMcp.d.mts +38 -0
  6. package/dist/agentPluginMcp.d.mts.map +1 -0
  7. package/dist/agentPluginMcp.mjs +318 -0
  8. package/dist/agentPluginMcp.mjs.map +1 -0
  9. package/dist/apiContracts.cjs +203 -0
  10. package/dist/apiContracts.cjs.map +1 -0
  11. package/dist/apiContracts.d.mts +53 -0
  12. package/dist/apiContracts.d.mts.map +1 -0
  13. package/dist/apiContracts.mjs +198 -0
  14. package/dist/apiContracts.mjs.map +1 -0
  15. package/dist/atomicJson-1W0WhuFF.mjs +44 -0
  16. package/dist/atomicJson-1W0WhuFF.mjs.map +1 -0
  17. package/dist/atomicJson-Dt2z_DXl.cjs +52 -0
  18. package/dist/atomicJson-Dt2z_DXl.cjs.map +1 -0
  19. package/dist/atomicJson.cjs +3 -0
  20. package/dist/atomicJson.d.mts +2 -0
  21. package/dist/atomicJson.mjs +2 -0
  22. package/dist/config-BUw5kHsx.cjs +219 -0
  23. package/dist/config-BUw5kHsx.cjs.map +1 -0
  24. package/dist/config-CKA07FxG.mjs +162 -0
  25. package/dist/config-CKA07FxG.mjs.map +1 -0
  26. package/dist/config-Cm3EV1jp.d.mts +320 -0
  27. package/dist/config-Cm3EV1jp.d.mts.map +1 -0
  28. package/dist/config-NSHRd6na.mjs +2 -0
  29. package/dist/config-zZz80Mh5.cjs +1 -0
  30. package/dist/config.cjs +24 -0
  31. package/dist/config.d.mts +3 -0
  32. package/dist/config.mjs +3 -0
  33. package/dist/configPolicy--TNX7feH.mjs +718 -0
  34. package/dist/configPolicy--TNX7feH.mjs.map +1 -0
  35. package/dist/configPolicy-DmsZEp0t.cjs +795 -0
  36. package/dist/configPolicy-DmsZEp0t.cjs.map +1 -0
  37. package/dist/configSchema.cjs +0 -0
  38. package/dist/configSchema.d.mts +2 -0
  39. package/dist/configSchema.mjs +1 -0
  40. package/dist/configWriter-BTuinLjs.cjs +150 -0
  41. package/dist/configWriter-BTuinLjs.cjs.map +1 -0
  42. package/dist/configWriter-BgkGaLrf.mjs +130 -0
  43. package/dist/configWriter-BgkGaLrf.mjs.map +1 -0
  44. package/dist/configWriter.cjs +5 -0
  45. package/dist/configWriter.d.mts +2 -0
  46. package/dist/configWriter.mjs +2 -0
  47. package/dist/domains-CBYkuxs5.cjs +727 -0
  48. package/dist/domains-CBYkuxs5.cjs.map +1 -0
  49. package/dist/domains-DZOu9vYM.mjs +633 -0
  50. package/dist/domains-DZOu9vYM.mjs.map +1 -0
  51. package/dist/domains.cjs +19 -0
  52. package/dist/domains.d.mts +3 -0
  53. package/dist/domains.mjs +3 -0
  54. package/dist/extensions/mcp-ui.mjs +101 -0
  55. package/dist/extensions/mcp-ui.mjs.map +1 -0
  56. package/dist/extensions/mcp.cjs +171 -0
  57. package/dist/extensions/mcp.cjs.map +1 -0
  58. package/dist/extensions/mcp.d.mts +5 -0
  59. package/dist/extensions/mcp.d.mts.map +1 -0
  60. package/dist/extensions/mcp.mjs +166 -0
  61. package/dist/extensions/mcp.mjs.map +1 -0
  62. package/dist/extensions/server.cjs +504 -0
  63. package/dist/extensions/server.cjs.map +1 -0
  64. package/dist/extensions/server.d.mts +5 -0
  65. package/dist/extensions/server.d.mts.map +1 -0
  66. package/dist/extensions/server.mjs +499 -0
  67. package/dist/extensions/server.mjs.map +1 -0
  68. package/dist/harnessState-CCyBeutB.cjs +188 -0
  69. package/dist/harnessState-CCyBeutB.cjs.map +1 -0
  70. package/dist/harnessState-Dn_S7fB9.mjs +163 -0
  71. package/dist/harnessState-Dn_S7fB9.mjs.map +1 -0
  72. package/dist/harnessState.cjs +6 -0
  73. package/dist/harnessState.d.mts +2 -0
  74. package/dist/harnessState.mjs +2 -0
  75. package/dist/harnessStore-CJSxdSkV.cjs +343 -0
  76. package/dist/harnessStore-CJSxdSkV.cjs.map +1 -0
  77. package/dist/harnessStore-CltwLB7M.mjs +262 -0
  78. package/dist/harnessStore-CltwLB7M.mjs.map +1 -0
  79. package/dist/harnessStore.cjs +15 -0
  80. package/dist/harnessStore.d.mts +2 -0
  81. package/dist/harnessStore.mjs +2 -0
  82. package/dist/index-BAaTySaM.d.mts +35 -0
  83. package/dist/index-BAaTySaM.d.mts.map +1 -0
  84. package/dist/index-BT29GZx5.d.mts +142 -0
  85. package/dist/index-BT29GZx5.d.mts.map +1 -0
  86. package/dist/index-B_lp0W3U.d.mts +114 -0
  87. package/dist/index-B_lp0W3U.d.mts.map +1 -0
  88. package/dist/index-C6GaYjq-.d.mts +6 -0
  89. package/dist/index-C6GaYjq-.d.mts.map +1 -0
  90. package/dist/index-CIQrKS1A.d.mts +50 -0
  91. package/dist/index-CIQrKS1A.d.mts.map +1 -0
  92. package/dist/index-CRcoVYXz.d.mts +39 -0
  93. package/dist/index-CRcoVYXz.d.mts.map +1 -0
  94. package/dist/index-CVlciCJF.d.mts +40 -0
  95. package/dist/index-CVlciCJF.d.mts.map +1 -0
  96. package/dist/index-CeOk2kqs.d.mts +118 -0
  97. package/dist/index-CeOk2kqs.d.mts.map +1 -0
  98. package/dist/index-Ch7ptOkW.d.mts +54 -0
  99. package/dist/index-Ch7ptOkW.d.mts.map +1 -0
  100. package/dist/index-Cvdt-Y-i.d.mts +66 -0
  101. package/dist/index-Cvdt-Y-i.d.mts.map +1 -0
  102. package/dist/index-DJpG-I9K.d.mts +122 -0
  103. package/dist/index-DJpG-I9K.d.mts.map +1 -0
  104. package/dist/index-DNk4q0Qm.d.mts +81 -0
  105. package/dist/index-DNk4q0Qm.d.mts.map +1 -0
  106. package/dist/index.cjs +121 -0
  107. package/dist/index.d.mts +15 -0
  108. package/dist/index.mjs +15 -0
  109. package/dist/init-C_9nyp3-.cjs +448 -0
  110. package/dist/init-C_9nyp3-.cjs.map +1 -0
  111. package/dist/init-DJ6wm-dr.mjs +415 -0
  112. package/dist/init-DJ6wm-dr.mjs.map +1 -0
  113. package/dist/init.cjs +7 -0
  114. package/dist/init.d.mts +2 -0
  115. package/dist/init.mjs +2 -0
  116. package/dist/layeredConfig-B922ibgn.mjs +67 -0
  117. package/dist/layeredConfig-B922ibgn.mjs.map +1 -0
  118. package/dist/layeredConfig-DdI5ysUf.cjs +94 -0
  119. package/dist/layeredConfig-DdI5ysUf.cjs.map +1 -0
  120. package/dist/layeredConfig.cjs +6 -0
  121. package/dist/layeredConfig.d.mts +2 -0
  122. package/dist/layeredConfig.mjs +2 -0
  123. package/dist/majorModes-CmPLEpMT.mjs +333 -0
  124. package/dist/majorModes-CmPLEpMT.mjs.map +1 -0
  125. package/dist/majorModes-DPhVMuhT.cjs +383 -0
  126. package/dist/majorModes-DPhVMuhT.cjs.map +1 -0
  127. package/dist/majorModes.cjs +10 -0
  128. package/dist/majorModes.d.mts +2 -0
  129. package/dist/majorModes.mjs +2 -0
  130. package/dist/piConfig-Bx26HMb_.d.mts +33 -0
  131. package/dist/piConfig-Bx26HMb_.d.mts.map +1 -0
  132. package/dist/piConfig-CCBdZXQr.cjs +260 -0
  133. package/dist/piConfig-CCBdZXQr.cjs.map +1 -0
  134. package/dist/piConfig-qGyCbcVj.mjs +197 -0
  135. package/dist/piConfig-qGyCbcVj.mjs.map +1 -0
  136. package/dist/piConfig.cjs +12 -0
  137. package/dist/piConfig.d.mts +2 -0
  138. package/dist/piConfig.mjs +2 -0
  139. package/dist/piContext.cjs +18 -0
  140. package/dist/piContext.d.mts +3 -0
  141. package/dist/piContext.mjs +2 -0
  142. package/dist/profiles-CTrUCmIh.d.mts +27 -0
  143. package/dist/profiles-CTrUCmIh.d.mts.map +1 -0
  144. package/dist/profiles-DnF9DBpd.cjs +552 -0
  145. package/dist/profiles-DnF9DBpd.cjs.map +1 -0
  146. package/dist/profiles-fujQKrS0.mjs +483 -0
  147. package/dist/profiles-fujQKrS0.mjs.map +1 -0
  148. package/dist/profiles.cjs +13 -0
  149. package/dist/profiles.d.mts +25 -0
  150. package/dist/profiles.d.mts.map +1 -0
  151. package/dist/profiles.mjs +2 -0
  152. package/dist/rolldown-runtime-VH7oDXx4.cjs +28 -0
  153. package/dist/selectionSwitch.cjs +70 -0
  154. package/dist/selectionSwitch.cjs.map +1 -0
  155. package/dist/selectionSwitch.d.mts +30 -0
  156. package/dist/selectionSwitch.d.mts.map +1 -0
  157. package/dist/selectionSwitch.mjs +64 -0
  158. package/dist/selectionSwitch.mjs.map +1 -0
  159. package/dist/sessionConfig-Boh4Fdje.cjs +342 -0
  160. package/dist/sessionConfig-Boh4Fdje.cjs.map +1 -0
  161. package/dist/sessionConfig-CtLoc-lO.mjs +240 -0
  162. package/dist/sessionConfig-CtLoc-lO.mjs.map +1 -0
  163. package/dist/types.cjs +9 -0
  164. package/dist/types.d.mts +2 -0
  165. package/dist/types.mjs +2 -0
  166. package/llms.txt +12 -0
  167. package/package.json +206 -0
  168. package/src/prompts/po-author-config/SKILL.md +26 -0
  169. package/src/prompts/po-author-config/agents/openai.yaml +4 -0
  170. package/src/prompts/po-author-config/references/config-contract.md +201 -0
@@ -0,0 +1,118 @@
1
+ import { a as ConfigDiagnostic } from "./config-Cm3EV1jp.mjs";
2
+ import { n as DoomConfigProvenance } from "./index-Ch7ptOkW.mjs";
3
+ //#region src/services/majorModes/index.d.ts
4
+ type LayerPackageConfig = Record<string, unknown>;
5
+ /** One package selected by a layer, plus configuration owned by that package. */
6
+ interface LayerPackage {
7
+ name: string;
8
+ optional?: boolean;
9
+ config?: LayerPackageConfig;
10
+ }
11
+ /** One configured package found while walking selected layers in order. */
12
+ interface ResolvedPackageConfiguration {
13
+ layer: string;
14
+ specifier: string;
15
+ config: LayerPackageConfig;
16
+ baseDirectory: string;
17
+ filePath?: string;
18
+ }
19
+ interface LayerDefinition {
20
+ /**
21
+ * Po built-in names, or Pi-compatible local extension paths.
22
+ * Bare names resolve from Po's own extension entries. Paths beginning
23
+ * with `./` or `../`, plus absolute paths, resolve against the config that
24
+ * declares the layer and may name a script file or extension directory.
25
+ */
26
+ extensions?: string[];
27
+ /**
28
+ * npm specifiers, or local package paths retained for compatibility.
29
+ * Relative paths resolve against the repository root for `.po/modes.yaml`
30
+ * and against the global `.po` directory for
31
+ * `~/.po/modes.yaml`.
32
+ */
33
+ packages?: Array<string | LayerPackage>;
34
+ hookGroups?: string[];
35
+ }
36
+ /** A layer plus the root its relative extension and package paths resolve against. */
37
+ interface ResolvedLayerDefinition extends LayerDefinition {
38
+ baseDirectory: string;
39
+ /** Absolute path of the modes file that declared this layer. */
40
+ filePath?: string;
41
+ }
42
+ interface MajorModeDefinition {
43
+ /** Human-readable purpose used by pickers and agent-facing catalogs. */
44
+ description: string;
45
+ /** Ordered layer names activated by this mode. */
46
+ layers: string[];
47
+ }
48
+ interface MajorModesConfig {
49
+ /** Unconditional package bundle loaded before packages from selected named layers. */
50
+ default?: ResolvedLayerDefinition;
51
+ layers: Record<string, ResolvedLayerDefinition>;
52
+ /** The mode selected when neither a flag nor the environment names one. */
53
+ defaultMajorMode: string;
54
+ /** Source that last declared the default, absent for the built-in fallback. */
55
+ defaultMajorModeSource?: DoomConfigProvenance;
56
+ /** Named major modes, including their purpose and ordered layers. */
57
+ majorMode: Record<string, MajorModeDefinition>;
58
+ /** Declaring source for each surviving named mode. */
59
+ majorModeSources?: Record<string, DoomConfigProvenance>;
60
+ }
61
+ interface LayerResolvers {
62
+ ownEntry: (name: string) => string;
63
+ packageEntry: (name: string) => string;
64
+ optionalPackageEntry: (name: string) => string | undefined;
65
+ /** Resolves every standard package.json pi.extensions entry for a package root. */
66
+ packageEntries?: (name: string) => string[];
67
+ /** Optional counterpart to packageEntries. */
68
+ optionalPackageEntries?: (name: string) => string[] | undefined;
69
+ /** Resolves one path-style layer entry against the config that declared it. */
70
+ localEntry: (specifier: string, baseDirectory: string) => string | undefined;
71
+ /** Resolves every Pi extension entry contributed by a local file or directory. */
72
+ localEntries?: (specifier: string, baseDirectory: string) => string[] | undefined;
73
+ }
74
+ /**
75
+ * Whether a layer value names a path rather than a built-in or installed package.
76
+ *
77
+ * The same rule Node applies to import specifiers, so a bare name is always a
78
+ * logical name and a path always looks like one.
79
+ */
80
+ declare function isLocalPackageSpecifier(specifier: string): boolean;
81
+ /**
82
+ * Reads layers and major modes from the global and repository configs.
83
+ *
84
+ * The repository is read last, so it replaces a global layer or major mode of
85
+ * the same name. Layers keep the root they were declared under so that a
86
+ * global layer naming `./extensions/x` still points beside the global config
87
+ * once it is loaded from inside some other repository.
88
+ */
89
+ declare function loadMajorModesConfig(repoRoot: string, homeDirectory?: string, environment?: NodeJS.ProcessEnv): MajorModesConfig;
90
+ /** Finds configuration owned by one package while preserving layer and package order. */
91
+ declare function resolvePackageConfigurations(config: MajorModesConfig, names: string[], packageName: string): ResolvedPackageConfiguration[];
92
+ /** Resolves one named major mode into its configured layer components. */
93
+ declare function resolveLayers(config: MajorModesConfig, majorMode: string): string[];
94
+ /** Resolves one layer's extension and package entries to absolute paths. */
95
+ declare function layerEntries(config: MajorModesConfig, name: string, resolvers: LayerResolvers): string[];
96
+ /** Hook group ids contributed by the selected layers, deduped. */
97
+ declare function layerHookGroups(config: MajorModesConfig, names: string[]): string[];
98
+ /**
99
+ * Suppress layers that exist to contribute hook groups when hooks are disabled.
100
+ *
101
+ * Lives beside layerHookGroups because it is the inverse question about the same
102
+ * field, and because every caller that resolves layers has to ask it.
103
+ */
104
+ declare function filterHookDisabledLayers(config: MajorModesConfig, layers: readonly string[], hooks: boolean): string[];
105
+ /**
106
+ * Reads layers and major modes, tolerating unknown keys.
107
+ *
108
+ * `po sync` uses this so a modes.yaml written against a different set of
109
+ * layer packages cannot break a build. Every other caller keeps the strict
110
+ * `loadMajorModesConfig`, and `po doctor` still reports what was tolerated.
111
+ */
112
+ declare function loadMajorModesConfigLenient(repoRoot: string, homeDirectory?: string, environment?: NodeJS.ProcessEnv): {
113
+ config: MajorModesConfig;
114
+ diagnostics: ConfigDiagnostic[];
115
+ };
116
+ //#endregion
117
+ export { MajorModeDefinition as a, ResolvedPackageConfiguration as c, layerEntries as d, layerHookGroups as f, resolvePackageConfigurations as g, resolveLayers as h, LayerResolvers as i, filterHookDisabledLayers as l, loadMajorModesConfigLenient as m, LayerPackage as n, MajorModesConfig as o, loadMajorModesConfig as p, LayerPackageConfig as r, ResolvedLayerDefinition as s, LayerDefinition as t, isLocalPackageSpecifier as u };
118
+ //# sourceMappingURL=index-CeOk2kqs.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CeOk2kqs.d.mts","names":[],"sources":["../src/services/majorModes/index.ts"],"mappings":";;;KAMY,qBAAqB;;UAGhB;EACf;EACA;EACA,SAAS;;;UAIM;EACf;EACA;EACA,QAAQ;EACR;EACA;;UAGe;;;;;;;EAOf;;;;;;;EAOA,WAAW,eAAe;EAC1B;;;UAIe,gCAAgC;EAC/C;;EAEA;;UAGe;;EAEf;;EAEA;;UAGe;;EAEf,UAAU;EACV,QAAQ,eAAe;;EAEvB;;EAEA,yBAAyB;;EAEzB,WAAW,eAAe;;EAE1B,mBAAmB,eAAe;;UAGnB;EACf,WAAW;EACX,eAAe;EACf,uBAAuB;;EAEvB,kBAAkB;;EAElB,0BAA0B;;EAE1B,aAAa,mBAAmB;;EAEhC,gBAAgB,mBAAmB;;;;;;;;iBAsBrB,wBAAwB;;;;;;;;;iBAoLxB,qBACd,kBACA,wBACA,cAAa,OAAO,aACnB;;iBA2Ea,6BACd,QAAQ,kBACR,iBACA,sBACC;;iBA4Ba,cAAc,QAAQ,kBAAkB;;iBAqBxC,aAAa,QAAQ,kBAAkB,cAAc,WAAW;;iBAmDhE,gBAAgB,QAAQ,kBAAkB;;;;;;;iBAc1C,yBACd,QAAQ,kBACR,2BACA;;;;;;;;iBAac,4BACd,kBACA,wBACA,cAAa,OAAO;EACjB,QAAQ;EAAkB,aAAa"}
@@ -0,0 +1,54 @@
1
+ //#region src/services/layeredConfig/index.d.ts
2
+ /** Repository-local po configuration directory, committed to git. */
3
+ declare const DOOM_DIR = ".po";
4
+ /** Source identity retained for diagnostics and composition fingerprints. */
5
+ interface DoomConfigProvenance {
6
+ /** Absolute path of the declaring configuration file. */
7
+ filePath: string;
8
+ /** Directory used to resolve paths authored by that file. */
9
+ baseDirectory: string;
10
+ }
11
+ /** One `.po` document plus the root its relative paths resolve against. */
12
+ interface DoomConfigSource<TDocument> extends DoomConfigProvenance {
13
+ /** Absolute path of the file the document was read from. */
14
+ filePath: string;
15
+ /**
16
+ * Where relative paths inside this document point.
17
+ *
18
+ * A repository document resolves against the repository root, so `plugins/x`
19
+ * keeps meaning the same thing it always has. A global document resolves
20
+ * against the global `.po` directory, so it can name plugins and extensions
21
+ * that live beside it in `~/.po` rather than inside whichever
22
+ * repository happens to be open.
23
+ */
24
+ baseDirectory: string;
25
+ /** Raw file contents, for callers that cache parsed results by source text. */
26
+ text: string;
27
+ document: TDocument;
28
+ }
29
+ /**
30
+ * Reads one named `.po` document from the global and repository config
31
+ * directories, lowest precedence first.
32
+ *
33
+ * A missing or empty file contributes nothing, so either location on its own is
34
+ * a complete configuration. Documents are deliberately returned unmerged:
35
+ * merging is by name, and only the caller knows what a name means in its own
36
+ * document, so each one folds the sources itself with the repository last.
37
+ */
38
+ declare function doomConfigCandidates(fileName: string, repoRoot: string, homeDirectory?: string): Array<{
39
+ filePath: string;
40
+ baseDirectory: string;
41
+ }>;
42
+ declare function readDoomConfigSources<TDocument>(fileName: string, repoRoot: string, homeDirectory?: string): Array<DoomConfigSource<TDocument>>;
43
+ /**
44
+ * Merges same-named records across sources, tagging each entry with the base
45
+ * directory of the document that supplied it.
46
+ *
47
+ * Later sources win outright rather than being deep-merged: a repository that
48
+ * redefines a name is replacing it, and a half-inherited definition whose paths
49
+ * straddle two roots would be impossible to resolve.
50
+ */
51
+ declare function mergeNamedSources<TDocument, TEntry extends object>(sources: ReadonlyArray<DoomConfigSource<TDocument>>, select: (document: TDocument) => Record<string, TEntry> | undefined): Record<string, TEntry & DoomConfigProvenance>;
52
+ //#endregion
53
+ export { mergeNamedSources as a, doomConfigCandidates as i, DoomConfigProvenance as n, readDoomConfigSources as o, DoomConfigSource as r, DOOM_DIR as t };
54
+ //# sourceMappingURL=index-Ch7ptOkW.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Ch7ptOkW.d.mts","names":[],"sources":["../src/services/layeredConfig/index.ts"],"mappings":";;cASa;;UAKI;;EAEf;;EAEA;;;UAIe,iBAAiB,mBAAmB;;EAEnD;;;;;;;;;;EAUA;;EAEA;EACA,UAAU;;;;;;;;;;;iBAYI,qBACd,kBACA,kBACA,yBACC;EAAQ;EAAkB;;iBAOb,sBAAsB,WACpC,kBACA,kBACA,yBACC,MAAM,iBAAiB;;;;;;;;;iBAwBV,kBAAkB,WAAW,uBAC3C,SAAS,cAAc,iBAAiB,aACxC,SAAS,UAAU,cAAc,eAAe,sBAC/C,eAAe,SAAS"}
@@ -0,0 +1,66 @@
1
+ //#region src/services/configWriter/index.d.ts
2
+ /**
3
+ * Writes into the global Doom config file, one key path at a time.
4
+ *
5
+ * Extracted from doom-file-edit, which owned the only writer in the repo and had
6
+ * it hard-coded to `editor.command`. Several extensions now edit their own
7
+ * settings from the config panel, and every one of them needs the same four
8
+ * properties: keep the user's comments, never publish a file the parser would
9
+ * reject, never leave a half-written file behind, and apply a set of related
10
+ * edits together.
11
+ *
12
+ * That last one is not a convenience. `voice.adapters.<engine>.model` accepts a
13
+ * path or an id but not both, so switching between them is a set and an unset
14
+ * that must land in the same write, or the file is briefly invalid.
15
+ *
16
+ * Atomicity is the same rename trick as `atomicJson.ts` next door, and carries
17
+ * the same caveat: it prevents torn reads, not lost updates. Two sessions with
18
+ * the panel open still clobber each other, because the rename only publishes
19
+ * what the caller already computed.
20
+ *
21
+ * AVOID:
22
+ * - Treating this as a lock
23
+ * - Writing an empty string; the parser rejects blank values, so clearing a key
24
+ * means removing it
25
+ */
26
+ /** Which file a write is aimed at; the modes follow from it. */
27
+ type DoomConfigScope = 'global' | 'repository';
28
+ interface DoomConfigEdit {
29
+ /** Key path into the document, e.g. `['voice', 'adapters', 'mlx-whisper', 'model', 'id']`. */
30
+ readonly keyPath: readonly string[];
31
+ /**
32
+ * The value to write. `undefined` removes the key.
33
+ *
34
+ * Not only strings: the config holds numbers (`utteranceIdleMs`) and lists
35
+ * (`startPhrases`), and a panel that edits them as text has to hand back the
36
+ * parsed value or the next load rejects what it wrote.
37
+ */
38
+ readonly value?: string | number | boolean | readonly string[];
39
+ }
40
+ interface WriteDoomConfigOptions {
41
+ /**
42
+ * Remove ancestors left holding nothing. Defaults to true, and is not
43
+ * cosmetic: an adapter left as `{}` fails validation, because the parser
44
+ * requires a model once the adapter exists at all.
45
+ */
46
+ readonly prune?: boolean;
47
+ /**
48
+ * Which file this is, so the write lands with the right permissions.
49
+ * Defaults to `global`, which is what every caller wrote before the
50
+ * repository file was writable at all.
51
+ */
52
+ readonly scope?: DoomConfigScope;
53
+ }
54
+ /**
55
+ * Applies every edit as one document mutation, or throws having written nothing.
56
+ *
57
+ * Validation runs against the serialized result rather than each edit, so a pair
58
+ * of edits only valid together is accepted, and a single edit that breaks an
59
+ * invariant elsewhere is still caught.
60
+ */
61
+ declare function writeDoomConfigValues(filePath: string, edits: readonly DoomConfigEdit[], options?: WriteDoomConfigOptions): Promise<void>;
62
+ declare function setDoomConfigValue(filePath: string, keyPath: readonly string[], value: string, options?: WriteDoomConfigOptions): Promise<void>;
63
+ declare function unsetDoomConfigValue(filePath: string, keyPath: readonly string[], options?: WriteDoomConfigOptions): Promise<void>;
64
+ //#endregion
65
+ export { unsetDoomConfigValue as a, setDoomConfigValue as i, DoomConfigScope as n, writeDoomConfigValues as o, WriteDoomConfigOptions as r, DoomConfigEdit as t };
66
+ //# sourceMappingURL=index-Cvdt-Y-i.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Cvdt-Y-i.d.mts","names":[],"sources":["../src/services/configWriter/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;KAkDY;UASK;;WAEN;;;;;;;;WAQA;;UAGM;;;;;;WAMN;;;;;;WAMA,QAAQ;;;;;;;;;iBAmCG,sBACpB,kBACA,gBAAgB,kBAChB,UAAS,yBACR;iBAqCmB,mBACpB,kBACA,4BACA,eACA,UAAS,yBACR;iBAImB,qBACpB,kBACA,4BACA,UAAS,yBACR"}
@@ -0,0 +1,122 @@
1
+ import { x as HarnessState } from "./config-Cm3EV1jp.mjs";
2
+ import { r as HarnessStateParseReporter } from "./index-CIQrKS1A.mjs";
3
+ //#region src/models/harnessCache.d.ts
4
+ interface LoadedHarnessState {
5
+ /** Undefined when this process is running off the environment fallback. */
6
+ filePath?: string;
7
+ owned: boolean;
8
+ state: HarnessState;
9
+ }
10
+ //#endregion
11
+ //#region src/services/harnessStore/index.d.ts
12
+ /**
13
+ * Who owns the harness state, and where it lives.
14
+ *
15
+ * The state used to be the environment: twenty variables that every reader
16
+ * re-parsed and every writer mutated globally. The file is the authority now,
17
+ * and the environment is a projection published for the readers that can only
18
+ * see an environment, which are bash hooks, the shell launchers, packages that
19
+ * do not depend on this one, and any process spawned by any of them.
20
+ *
21
+ * OWNERSHIP IS PER PROCESS, AND THAT IS THE WHOLE DESIGN:
22
+ * Doom Team subagents run detached, in their own process group, from an
23
+ * environment snapshot taken at spawn. A child can outlive its parent. If it
24
+ * shared the parent's file it would corrupt a session it does not own, and if
25
+ * that file sat in the parent's run directory the parent's shutdown sweep would
26
+ * delete it from under a live run. So every process writes a file it owns:
27
+ * `owner.pid` records who, and a process that finds someone else's file copies
28
+ * it before its first write.
29
+ *
30
+ * AVOID:
31
+ * - Treating the file as shared mutable state between processes. Atomic writes
32
+ * prevent torn reads, not lost updates
33
+ * - Reading the environment directly for anything this exposes
34
+ */
35
+ /** Points at the state file. The one variable that is not derived. */
36
+ declare const HARNESS_STATE_POINTER = "PO_STATE";
37
+ interface HarnessStateFile {
38
+ version: number;
39
+ owner: {
40
+ pid: number;
41
+ startedAt: string;
42
+ };
43
+ state: HarnessState;
44
+ }
45
+ interface HarnessStateTransactionSnapshot {
46
+ readonly filePath?: string;
47
+ readonly owned: boolean;
48
+ readonly state: HarnessState;
49
+ readonly environment: Readonly<Record<string, string | undefined>>;
50
+ }
51
+ /** Drops the cached state. For tests, and for a process changing identity. */
52
+ declare function resetHarnessStore(): void;
53
+ /**
54
+ * Reads the state for this process, once.
55
+ *
56
+ * A missing pointer means nobody wrote a file for this process, so the
57
+ * environment is all there is: a nested run, a third-party spawn, or a caller
58
+ * older than the store. A pointer that cannot be read is reported and then
59
+ * treated the same way, because a session that starts degraded beats a session
60
+ * that does not start at all.
61
+ */
62
+ declare function loadHarnessState(environment?: NodeJS.ProcessEnv, report?: HarnessStateParseReporter): LoadedHarnessState;
63
+ /** Captures the owned state pointer and every projected harness variable. */
64
+ declare function snapshotHarnessState(environment?: NodeJS.ProcessEnv): HarnessStateTransactionSnapshot;
65
+ /** Restores a snapshot only while the current process still owns its state pointer. */
66
+ declare function restoreHarnessStateSnapshot(snapshot: HarnessStateTransactionSnapshot, environment?: NodeJS.ProcessEnv): void;
67
+ declare function getHarnessState(report?: HarnessStateParseReporter): HarnessState;
68
+ /**
69
+ * The harness state of one session, by id.
70
+ *
71
+ * A server runs many sessions' extensions in one process, each with its own state file, so
72
+ * a session-scoped reader asks by session id. A terminal session owns its process, and the
73
+ * answer is the same as `getHarnessState`.
74
+ */
75
+ declare function getSessionHarnessState(sessionId: string | undefined, report?: HarnessStateParseReporter): HarnessState;
76
+ /**
77
+ * Starts a session: writes the file and publishes the derived environment.
78
+ *
79
+ * The environment is a parameter because the caller is usually describing a
80
+ * process other than itself. The launcher builds the environment for the Pi it
81
+ * is about to spawn, and Doom Team builds the snapshot for a detached child, so
82
+ * neither should touch its own `process.env` to do it.
83
+ */
84
+ declare function createHarnessSession(state: HarnessState, options: {
85
+ directory: string;
86
+ environment: NodeJS.ProcessEnv;
87
+ /**
88
+ * Leave the file for a process that does not exist yet to claim.
89
+ *
90
+ * What a spawner wants: the child owns its state from its first read, in a
91
+ * directory the spawner manages, so the parent cleaning up its own session
92
+ * cannot pull the file out from under a detached run.
93
+ */
94
+ unclaimed?: boolean;
95
+ }): string;
96
+ /**
97
+ * Applies a patch to this process's state.
98
+ *
99
+ * Copy on write: a process holding a file it does not own writes its own copy
100
+ * and repoints itself at it, so a child can never rewrite its parent's session.
101
+ */
102
+ declare function updateHarnessState(patch: Partial<HarnessState>, environment?: NodeJS.ProcessEnv): HarnessState;
103
+ /** Removes this process's own state file. Safe when there is none. */
104
+ declare function disposeHarnessState(environment?: NodeJS.ProcessEnv): void;
105
+ declare function harnessRoot(state?: Pick<HarnessState, 'root'>): string;
106
+ /**
107
+ * The repository root, or a hard error.
108
+ *
109
+ * Separate from `requireHarnessPaths` because most callers only need the root,
110
+ * and separate from `harnessRoot` because falling back to `process.cwd()` would
111
+ * quietly operate on whatever directory the session happens to sit in. A caller
112
+ * that asks for the root wants the session's repository or nothing.
113
+ */
114
+ declare function requireHarnessRoot(state?: Pick<HarnessState, 'root'>): string;
115
+ /** The root and the run's scratch directory, for callers that write to disk. */
116
+ declare function requireHarnessPaths(state?: Pick<HarnessState, 'root' | 'temporaryDirectory'>): {
117
+ root: string;
118
+ temporaryDirectory: string;
119
+ };
120
+ //#endregion
121
+ export { disposeHarnessState as a, harnessRoot as c, requireHarnessRoot as d, resetHarnessStore as f, LoadedHarnessState as g, updateHarnessState as h, createHarnessSession as i, loadHarnessState as l, snapshotHarnessState as m, HarnessStateFile as n, getHarnessState as o, restoreHarnessStateSnapshot as p, HarnessStateTransactionSnapshot as r, getSessionHarnessState as s, HARNESS_STATE_POINTER as t, requireHarnessPaths as u };
122
+ //# sourceMappingURL=index-DJpG-I9K.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DJpG-I9K.d.mts","names":[],"sources":["../src/models/harnessCache.ts","../src/services/harnessStore/index.ts"],"mappings":";;;UAEiB;;EAEf;EACA;EACA,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCmCI;UAYI;EACf;EACA;IAAS;IAAa;;EACtB,OAAO;;UAGQ;WACN;WACA;WACA,OAAO;WACP,aAAa,SAAS;;;iBAIjB;;;;;;;;;;iBA0DA,iBACd,cAAa,OAAO,YACpB,SAAS,4BACR;;iBAwBa,qBAAqB,cAAa,OAAO,aAA2B;;iBAepE,4BACd,UAAU,iCACV,cAAa,OAAO;iBAiCN,gBAAgB,SAAS,4BAA4B;;;;;;;;iBAWrD,uBACd,+BACA,SAAS,4BACR;;;;;;;;;iBA6Ba,qBACd,OAAO,cACP;EACE;EACA,aAAa,OAAO;;;;;;;;EAQpB;;;;;;;;iBAmBY,mBACd,OAAO,QAAQ,eACf,cAAa,OAAO,aACnB;;iBAYa,oBAAoB,cAAa,OAAO;iBAQxC,YAAY,QAAO,KAAK;;;;;;;;;iBAYxB,mBAAmB,QAAO,KAAK;;iBAM/B,oBAAoB,QAAO,KAAK;EAC9C;EACA"}
@@ -0,0 +1,81 @@
1
+ import { i as PersonaVoiceOverride, r as PersonaIdentity } from "./profiles-CTrUCmIh.mjs";
2
+ //#region src/services/profileBinding/type.d.ts
3
+ /** Nonsecret references to fields of existing provider credentials. */
4
+ interface ProfileSecretReference {
5
+ readonly credentialId: string;
6
+ readonly field: string;
7
+ /** Exact HTTP(S) origins permitted to receive this field through a browser. */
8
+ readonly allowedOrigins: readonly string[];
9
+ }
10
+ interface ProfileBrowserBinding {
11
+ /** Persistent browser profile name, never a caller-supplied filesystem path. */
12
+ readonly profileName: string;
13
+ readonly allowedOrigins: readonly string[];
14
+ }
15
+ /** Metadata only. Authentication and resolved secret values belong to the session provider. */
16
+ interface ProfileIntegrationBinding {
17
+ readonly provider: string;
18
+ readonly organizationId: string;
19
+ readonly mailboxId: string;
20
+ readonly credentialRef: string;
21
+ readonly secrets: Readonly<Record<string, ProfileSecretReference>>;
22
+ readonly browser?: ProfileBrowserBinding;
23
+ }
24
+ //#endregion
25
+ //#region src/services/profiles/index.d.ts
26
+ /** Files that make up one repository persona, concatenated in this order. */
27
+ declare const PERSONA_FILES: string[];
28
+ /** A persona's resolved presentation: display name, and an icon already read into a data URL. */
29
+ interface AgentProfile {
30
+ name: string;
31
+ /** Directory relative to personaRoot, which remains the persona source. */
32
+ persona: string;
33
+ /**
34
+ * Root the persona path resolves against: the repository root for a
35
+ * repository profile, the global `.po` directory for a global one.
36
+ */
37
+ personaRoot: string;
38
+ /** Environment defaults. Values already exported by the caller win. */
39
+ env: Record<string, string>;
40
+ /** Nonsecret integration metadata. Resolved secrets never enter profile environment. */
41
+ integration?: ProfileIntegrationBinding;
42
+ /** Display name and avatar declared in the persona's own front-matter. */
43
+ identity?: PersonaIdentity;
44
+ /** Narrowly scoped TTS override declared alongside the identity. */
45
+ voice?: PersonaVoiceOverride;
46
+ }
47
+ /**
48
+ * Loads profiles from the global and repository configs, repository last.
49
+ *
50
+ * Configured roots accumulate and inspect themselves or their direct-child
51
+ * directories for persona files. Later discoveries replace earlier names, and
52
+ * explicit entries replace discoveries. Legacy flat profile mappings remain
53
+ * accepted as explicit entries.
54
+ */
55
+ declare function loadProfiles(repoRoot: string, homeDirectory?: string): AgentProfile[];
56
+ /**
57
+ * The profile catalog: every resolved profile, plus the name a launch starts on
58
+ * when the caller names none.
59
+ *
60
+ * `defaultProfile` mirrors `defaultMajorMode` in modes.yaml and `defaultDomains`
61
+ * in domains.yaml, so each selection axis declares its default in its own
62
+ * catalog. A repository declaration replaces a personal one. An unknown name is
63
+ * an error rather than a silent fallback: a typo that quietly starts the session
64
+ * with no persona is worse than a refused launch.
65
+ */
66
+ declare function loadProfileCatalog(repoRoot: string, homeDirectory?: string): {
67
+ profiles: AgentProfile[];
68
+ defaultProfile?: string;
69
+ };
70
+ /** Resolves one selected profile and fails clearly when its name is unknown. */
71
+ declare function resolveProfile(repoRoot: string, name: string, homeDirectory?: string): AgentProfile;
72
+ declare function listProfileNames(repoRoot: string, homeDirectory?: string): string[];
73
+ /** Builds the persona system-prompt block, or undefined when nothing is readable. */
74
+ declare function buildPersonaPrompt(personaRoot: string, personaDirectory: string): string | undefined;
75
+ /** Applies profile environment defaults and returns only the values it contributed. */
76
+ declare function applyProfileEnvironment(environment: NodeJS.ProcessEnv, defaults: Record<string, string>): Record<string, string>;
77
+ /** Replaces environment defaults previously contributed by another profile. */
78
+ declare function replaceProfileEnvironment(environment: NodeJS.ProcessEnv, previous: Record<string, string>, next: Record<string, string>): Record<string, string>;
79
+ //#endregion
80
+ export { listProfileNames as a, replaceProfileEnvironment as c, ProfileIntegrationBinding as d, ProfileSecretReference as f, buildPersonaPrompt as i, resolveProfile as l, PERSONA_FILES as n, loadProfileCatalog as o, applyProfileEnvironment as r, loadProfiles as s, AgentProfile as t, ProfileBrowserBinding as u };
81
+ //# sourceMappingURL=index-DNk4q0Qm.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DNk4q0Qm.d.mts","names":[],"sources":["../src/services/profileBinding/type.ts","../src/services/profiles/index.ts"],"mappings":";;;UACiB;WACN;WACA;;WAEA;;UAGM;;WAEN;WACA;;;UAIM;WACN;WACA;WACA;WACA;WACA,SAAS,SAAS,eAAe;WACjC,UAAU;;;;;cCRR;;UAOI;EACf;;EAEA;;;;;EAKA;;EAEA,KAAK;;EAEL,cAAc;;EAEd,WAAW;;EAEX,QAAQ;;;;;;;;;;iBAwNM,aAAa,kBAAkB,yBAAuC;;;;;;;;;;;iBA6BtE,mBACd,kBACA;EACG,UAAU;EAAgB;;;iBAcf,eAAe,kBAAkB,cAAc,yBAAyB;iBAMxE,iBAAiB,kBAAkB;;iBA2CnC,mBAAmB,qBAAqB;;iBAuBxC,wBACd,aAAa,OAAO,YACpB,UAAU,yBACT;;iBAWa,0BACd,aAAa,OAAO,YACpB,UAAU,wBACV,MAAM,yBACL"}
package/dist/index.cjs ADDED
@@ -0,0 +1,121 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_atomicJson = require("./atomicJson-Dt2z_DXl.cjs");
3
+ const require_configPolicy = require("./configPolicy-DmsZEp0t.cjs");
4
+ const require_config = require("./config-BUw5kHsx.cjs");
5
+ const require_configWriter = require("./configWriter-BTuinLjs.cjs");
6
+ const require_layeredConfig = require("./layeredConfig-DdI5ysUf.cjs");
7
+ const require_domains = require("./domains-CBYkuxs5.cjs");
8
+ const require_harnessState = require("./harnessState-CCyBeutB.cjs");
9
+ const require_harnessStore = require("./harnessStore-CJSxdSkV.cjs");
10
+ const require_piConfig = require("./piConfig-CCBdZXQr.cjs");
11
+ const require_init = require("./init-C_9nyp3-.cjs");
12
+ const require_majorModes = require("./majorModes-DPhVMuhT.cjs");
13
+ const require_profiles = require("./profiles-DnF9DBpd.cjs");
14
+ require("./config-zZz80Mh5.cjs");
15
+ const require_sessionConfig = require("./sessionConfig-Boh4Fdje.cjs");
16
+ let _agimon_ai_po_core_config = require("@agimon-ai/po-core/config");
17
+ exports.DEFAULT_IMAGE_MAX_DIMENSION = require_piConfig.DEFAULT_IMAGE_MAX_DIMENSION;
18
+ exports.DOOM_CONFIG_ENTRY_TYPE = require_sessionConfig.DOOM_CONFIG_ENTRY_TYPE;
19
+ Object.defineProperty(exports, "DOOM_CONFIG_SERVICE", {
20
+ enumerable: true,
21
+ get: function() {
22
+ return _agimon_ai_po_core_config.DOOM_CONFIG_SERVICE;
23
+ }
24
+ });
25
+ exports.DOOM_CONFIG_TEMPLATES = require_init.DOOM_CONFIG_TEMPLATES;
26
+ exports.DOOM_CONFIG_TRANSITION_ENTRY_TYPE = require_sessionConfig.DOOM_CONFIG_TRANSITION_ENTRY_TYPE;
27
+ exports.DOOM_DIR = require_layeredConfig.DOOM_DIR;
28
+ exports.DOOM_PLANNING_THINKING_LEVELS = require_configPolicy.DOOM_PLANNING_THINKING_LEVELS;
29
+ exports.DOOM_VOICE_ENGINES = require_configPolicy.DOOM_VOICE_ENGINES;
30
+ exports.DOOM_VOICE_MODES = require_configPolicy.DOOM_VOICE_MODES;
31
+ exports.DOOM_VOICE_TTS_ENGINES = require_configPolicy.DOOM_VOICE_TTS_ENGINES;
32
+ exports.FILE_ONLY_STATE_FIELDS = require_harnessState.FILE_ONLY_STATE_FIELDS;
33
+ exports.GLOBAL_DOOM_SEED_FILES = require_init.GLOBAL_DOOM_SEED_FILES;
34
+ exports.HARNESS_STATE_KEYS = require_harnessState.HARNESS_STATE_KEYS;
35
+ exports.HARNESS_STATE_POINTER = require_harnessStore.HARNESS_STATE_POINTER;
36
+ exports.MARKETPLACE_MANIFEST_RELATIVE_PATHS = require_domains.MARKETPLACE_MANIFEST_RELATIVE_PATHS;
37
+ exports.MIN_IMAGE_MAX_DIMENSION = require_piConfig.MIN_IMAGE_MAX_DIMENSION;
38
+ exports.PERSONA_FILES = require_profiles.PERSONA_FILES;
39
+ exports.REPOSITORY_DOOM_CONFIG_TEMPLATES = require_init.REPOSITORY_DOOM_CONFIG_TEMPLATES;
40
+ exports.acknowledgeDoomConfigTransition = require_sessionConfig.acknowledgeDoomConfigTransition;
41
+ exports.appendDoomConfigSelection = require_sessionConfig.appendDoomConfigSelection;
42
+ exports.appendDoomConfigTransition = require_sessionConfig.appendDoomConfigTransition;
43
+ exports.applyProfileEnvironment = require_profiles.applyProfileEnvironment;
44
+ exports.buildPersonaPrompt = require_profiles.buildPersonaPrompt;
45
+ exports.clampImageMaxDimension = require_piConfig.clampImageMaxDimension;
46
+ exports.configLeafKeys = require_configPolicy.configLeafKeys;
47
+ exports.configRootKeys = require_configPolicy.configRootKeys;
48
+ exports.configScopeOf = require_configPolicy.configScopeOf;
49
+ exports.createDoomConfigContext = require_sessionConfig.createDoomConfigContext;
50
+ exports.createDoomConfigContextAsync = require_sessionConfig.createDoomConfigContextAsync;
51
+ exports.createHarnessSession = require_harnessStore.createHarnessSession;
52
+ exports.disposeHarnessState = require_harnessStore.disposeHarnessState;
53
+ exports.domainCompletionItems = require_domains.domainCompletionItems;
54
+ exports.domainCompletionPrefix = require_domains.domainCompletionPrefix;
55
+ exports.expandDomainNames = require_domains.expandDomainNames;
56
+ exports.findPluginManifestPath = require_domains.findPluginManifestPath;
57
+ exports.freezeDoomConfigContext = require_sessionConfig.freezeDoomConfigContext;
58
+ exports.getHarnessState = require_harnessStore.getHarnessState;
59
+ exports.getSessionHarnessState = require_harnessStore.getSessionHarnessState;
60
+ exports.globalDoomConfigDirectory = require_config.globalDoomConfigDirectory;
61
+ exports.globalDoomConfigPath = require_config.globalDoomConfigPath;
62
+ exports.harnessRoot = require_harnessStore.harnessRoot;
63
+ exports.initializeGlobalDoomConfig = require_init.initializeGlobalDoomConfig;
64
+ exports.initializeRepositoryDoomConfig = require_init.initializeRepositoryDoomConfig;
65
+ exports.isLocalPackageSpecifier = require_majorModes.isLocalPackageSpecifier;
66
+ exports.isRemotePluginSource = require_domains.isRemotePluginSource;
67
+ exports.layerEntries = require_majorModes.layerEntries;
68
+ exports.layerHookGroups = require_majorModes.layerHookGroups;
69
+ exports.listDomainNames = require_domains.listDomainNames;
70
+ exports.listProfileNames = require_profiles.listProfileNames;
71
+ exports.loadDomains = require_domains.loadDomains;
72
+ exports.loadDoomConfig = require_config.loadDoomConfig;
73
+ exports.loadDoomConfigAsync = require_config.loadDoomConfigAsync;
74
+ exports.loadDoomConfigLayers = require_config.loadDoomConfigLayers;
75
+ exports.loadDoomConfigLenient = require_config.loadDoomConfigLenient;
76
+ exports.loadHarnessState = require_harnessStore.loadHarnessState;
77
+ exports.loadMajorModesConfig = require_majorModes.loadMajorModesConfig;
78
+ exports.loadMajorModesConfigLenient = require_majorModes.loadMajorModesConfigLenient;
79
+ exports.loadPiConfig = require_piConfig.loadPiConfig;
80
+ exports.loadPiConfigAsync = require_piConfig.loadPiConfigAsync;
81
+ exports.loadPiImageSettings = require_piConfig.loadPiImageSettings;
82
+ exports.loadProfiles = require_profiles.loadProfiles;
83
+ exports.mergeDoomConfigs = require_configPolicy.mergeDoomConfigs;
84
+ exports.parseAutocompactModeConfig = require_configPolicy.parseAutocompactModeConfig;
85
+ exports.parseDoomConfig = require_configPolicy.parseDoomConfig;
86
+ exports.parsePiImageSettings = require_piConfig.parsePiImageSettings;
87
+ exports.parsePlanningModeConfig = require_configPolicy.parsePlanningModeConfig;
88
+ exports.piConfigPaths = require_piConfig.piConfigPaths;
89
+ exports.piImageSettingsPath = require_piConfig.piImageSettingsPath;
90
+ exports.pluginDirectoryForSource = require_domains.pluginDirectoryForSource;
91
+ exports.projectHarnessEnvironment = require_harnessState.projectHarnessEnvironment;
92
+ exports.provideDoomConfigContext = require_sessionConfig.provideDoomConfigContext;
93
+ exports.readDoomConfigContextGeneration = require_sessionConfig.readDoomConfigContextGeneration;
94
+ exports.readDoomConfigPendingSelection = require_sessionConfig.readDoomConfigPendingSelection;
95
+ exports.readDoomConfigSelection = require_sessionConfig.readDoomConfigSelection;
96
+ exports.readHarnessState = require_harnessState.readHarnessState;
97
+ exports.replaceDoomConfigContext = require_sessionConfig.replaceDoomConfigContext;
98
+ exports.replaceProfileEnvironment = require_profiles.replaceProfileEnvironment;
99
+ exports.repositoryDoomConfigPath = require_config.repositoryDoomConfigPath;
100
+ exports.requireDoomConfigContext = require_sessionConfig.requireDoomConfigContext;
101
+ exports.requireHarnessPaths = require_harnessStore.requireHarnessPaths;
102
+ exports.requireHarnessRoot = require_harnessStore.requireHarnessRoot;
103
+ exports.resetHarnessStore = require_harnessStore.resetHarnessStore;
104
+ exports.resolveLayers = require_majorModes.resolveLayers;
105
+ exports.resolvePackageConfigurations = require_majorModes.resolvePackageConfigurations;
106
+ exports.resolvePlanningPlansDirectory = require_config.resolvePlanningPlansDirectory;
107
+ exports.resolvePluginDirectories = require_domains.resolvePluginDirectories;
108
+ exports.resolvePluginEntries = require_domains.resolvePluginEntries;
109
+ exports.resolveProfile = require_profiles.resolveProfile;
110
+ exports.resolveSharedSkills = require_domains.resolveSharedSkills;
111
+ exports.resolveVoiceConfig = require_configPolicy.resolveVoiceConfig;
112
+ exports.restoreHarnessStateSnapshot = require_harnessStore.restoreHarnessStateSnapshot;
113
+ exports.savePiImageSettings = require_piConfig.savePiImageSettings;
114
+ exports.setDoomConfigValue = require_configWriter.setDoomConfigValue;
115
+ exports.snapshotHarnessState = require_harnessStore.snapshotHarnessState;
116
+ exports.supersedeDoomConfigTransition = require_sessionConfig.supersedeDoomConfigTransition;
117
+ exports.unsetDoomConfigValue = require_configWriter.unsetDoomConfigValue;
118
+ exports.updateHarnessState = require_harnessStore.updateHarnessState;
119
+ exports.valueAtKeyPath = require_configPolicy.valueAtKeyPath;
120
+ exports.writeDoomConfigValues = require_configWriter.writeDoomConfigValues;
121
+ exports.writePrivateAtomicJson = require_atomicJson.writePrivateAtomicJson;
@@ -0,0 +1,15 @@
1
+ import { t as writePrivateAtomicJson } from "./index-C6GaYjq-.mjs";
2
+ import { A as PluginHookSource, B as VoiceTtsConfig, C as IDoomConfigService, D as PlanningAgentConfig, E as PackageAttribution, F as VoiceAutoCaptureConfig, I as VoiceConfig, L as VoiceEngine, M as ResolvedVoiceAutoCaptureConfig, N as ResolvedVoiceConfig, O as PlanningModeConfig, P as VoiceAdapterConfig, R as VoiceMode, S as IDoomConfigLoader, V as VoiceTtsEngine, _ as DoomConfigTransitionStrategy, b as EditorConfig, c as DeepReadonly, d as DoomConfigLayer, f as DoomConfigLayers, g as DoomConfigTransitionRecord, h as DoomConfigTransitionPhase, i as AutocompactTokenConfig, j as ProjectTrust, k as PlanningThinkingLevel, l as DoomConfig, n as AutocompactOverrideConfig, o as ConfigValueOrigin, p as DoomConfigPendingSelection, r as AutocompactThresholdConfig, s as DOOM_CONFIG_SERVICE, t as AutocompactModeConfig, u as DoomConfigContext, v as DoomHarnessContext, x as HarnessState, y as DoomSelectionConfig, z as VoiceModelConfig } from "./config-Cm3EV1jp.mjs";
3
+ import { S as resolvePlanningPlansDirectory, _ as loadDoomConfig, a as DOOM_VOICE_TTS_ENGINES, b as loadDoomConfigLenient, c as configScopeOf, d as parseDoomConfig, f as parsePlanningModeConfig, g as globalDoomConfigPath, h as globalDoomConfigDirectory, i as DOOM_VOICE_MODES, l as mergeDoomConfigs, m as valueAtKeyPath, n as DOOM_PLANNING_THINKING_LEVELS, o as configLeafKeys, p as resolveVoiceConfig, r as DOOM_VOICE_ENGINES, s as configRootKeys, t as ConfigKeyScope, u as parseAutocompactModeConfig, v as loadDoomConfigAsync, x as repositoryDoomConfigPath, y as loadDoomConfigLayers } from "./index-B_lp0W3U.mjs";
4
+ import { a as PiConfigPaths, i as PiConfigLoadOptions, r as PiConfig, t as ConfigAdapterRegistrationOptions } from "./piConfig-Bx26HMb_.mjs";
5
+ import { a as unsetDoomConfigValue, i as setDoomConfigValue, n as DoomConfigScope, o as writeDoomConfigValues, r as WriteDoomConfigOptions, t as DoomConfigEdit } from "./index-Cvdt-Y-i.mjs";
6
+ import { C as PluginCatalog, D as PluginSkillDiscovery, E as PluginManifestMetadata, O as PluginSource, S as NpmPluginSource, T as PluginEntry, _ as DomainManifest, a as domainCompletionItems, b as GitPluginSource, d as listDomainNames, f as loadDomains, g as DomainDefinition, h as resolveSharedSkills, i as pluginDirectoryForSource, k as ResolvedDomain, m as resolvePluginEntries, n as findPluginManifestPath, o as domainCompletionPrefix, p as resolvePluginDirectories, r as isRemotePluginSource, s as expandDomainNames, t as MARKETPLACE_MANIFEST_RELATIVE_PATHS, v as DomainMcpAllowlist, w as PluginCatalogEntry, x as LocalPluginSource, y as DomainPlugin } from "./index-BT29GZx5.mjs";
7
+ import { t as DOOM_DIR } from "./index-Ch7ptOkW.mjs";
8
+ import { a as readHarnessState, i as projectHarnessEnvironment, n as HARNESS_STATE_KEYS, r as HarnessStateParseReporter, t as FILE_ONLY_STATE_FIELDS } from "./index-CIQrKS1A.mjs";
9
+ import { a as disposeHarnessState, c as harnessRoot, d as requireHarnessRoot, f as resetHarnessStore, g as LoadedHarnessState, h as updateHarnessState, i as createHarnessSession, l as loadHarnessState, m as snapshotHarnessState, n as HarnessStateFile, o as getHarnessState, p as restoreHarnessStateSnapshot, r as HarnessStateTransactionSnapshot, s as getSessionHarnessState, t as HARNESS_STATE_POINTER, u as requireHarnessPaths } from "./index-DJpG-I9K.mjs";
10
+ import { a as piImageSettingsPath, c as MIN_IMAGE_MAX_DIMENSION, d as clampImageMaxDimension, f as parsePiImageSettings, i as piConfigPaths, l as PiImageSettings, n as loadPiConfigAsync, o as savePiImageSettings, r as loadPiImageSettings, s as DEFAULT_IMAGE_MAX_DIMENSION, t as loadPiConfig, u as PiImageSettingsUpdate } from "./index-CVlciCJF.mjs";
11
+ import { a as REPOSITORY_DOOM_CONFIG_TEMPLATES, c as initializeGlobalDoomConfig, i as GlobalDoomInitResult, l as initializeRepositoryDoomConfig, n as GLOBAL_DOOM_SEED_FILES, o as RepositoryDoomInitOptions, s as RepositoryDoomInitResult, t as DOOM_CONFIG_TEMPLATES } from "./index-CRcoVYXz.mjs";
12
+ import { a as MajorModeDefinition, c as ResolvedPackageConfiguration, d as layerEntries, f as layerHookGroups, g as resolvePackageConfigurations, h as resolveLayers, i as LayerResolvers, m as loadMajorModesConfigLenient, n as LayerPackage, o as MajorModesConfig, p as loadMajorModesConfig, r as LayerPackageConfig, s as ResolvedLayerDefinition, t as LayerDefinition, u as isLocalPackageSpecifier } from "./index-CeOk2kqs.mjs";
13
+ import { a as listProfileNames, c as replaceProfileEnvironment, i as buildPersonaPrompt, l as resolveProfile, n as PERSONA_FILES, r as applyProfileEnvironment, s as loadProfiles, t as AgentProfile } from "./index-DNk4q0Qm.mjs";
14
+ import { _ as supersedeDoomConfigTransition, a as appendDoomConfigSelection, c as createDoomConfigContextAsync, d as provideDoomConfigContext, f as readDoomConfigContextGeneration, g as requireDoomConfigContext, h as replaceDoomConfigContext, i as acknowledgeDoomConfigTransition, l as freezeDoomConfigContext, m as readDoomConfigSelection, n as DOOM_CONFIG_TRANSITION_ENTRY_TYPE, o as appendDoomConfigTransition, p as readDoomConfigPendingSelection, r as DoomConfigSelection, s as createDoomConfigContext, t as DOOM_CONFIG_ENTRY_TYPE } from "./index-BAaTySaM.mjs";
15
+ export { type AgentProfile, type AutocompactModeConfig, type AutocompactOverrideConfig, type AutocompactThresholdConfig, type AutocompactTokenConfig, type ConfigAdapterRegistrationOptions, type ConfigKeyScope, type ConfigValueOrigin, DEFAULT_IMAGE_MAX_DIMENSION, DOOM_CONFIG_ENTRY_TYPE, DOOM_CONFIG_SERVICE, DOOM_CONFIG_TEMPLATES, DOOM_CONFIG_TRANSITION_ENTRY_TYPE, DOOM_DIR, DOOM_PLANNING_THINKING_LEVELS, DOOM_VOICE_ENGINES, DOOM_VOICE_MODES, DOOM_VOICE_TTS_ENGINES, type DeepReadonly, type DomainDefinition, type DomainManifest, type DomainMcpAllowlist, type DomainPlugin, type DoomConfig, type DoomConfigContext, type DoomConfigEdit, type DoomConfigLayer, type DoomConfigLayers, type DoomConfigPendingSelection, type DoomConfigScope, type DoomConfigSelection, type DoomConfigTransitionPhase, type DoomConfigTransitionRecord, type DoomConfigTransitionStrategy, type DoomHarnessContext, type DoomSelectionConfig, type EditorConfig, FILE_ONLY_STATE_FIELDS, GLOBAL_DOOM_SEED_FILES, type GitPluginSource, type GlobalDoomInitResult, HARNESS_STATE_KEYS, HARNESS_STATE_POINTER, type HarnessState, type HarnessStateFile, type HarnessStateParseReporter, type HarnessStateTransactionSnapshot, type IDoomConfigLoader, type IDoomConfigService, type LayerDefinition, type LayerPackage, type LayerPackageConfig, type LayerResolvers, type LoadedHarnessState, type LocalPluginSource, MARKETPLACE_MANIFEST_RELATIVE_PATHS, MIN_IMAGE_MAX_DIMENSION, type MajorModeDefinition, type MajorModesConfig, type NpmPluginSource, PERSONA_FILES, type PackageAttribution, type PiConfig, type PiConfigLoadOptions, type PiConfigPaths, type PiImageSettings, type PiImageSettingsUpdate, type PlanningAgentConfig, type PlanningModeConfig, type PlanningThinkingLevel, type PluginCatalog, type PluginCatalogEntry, type PluginEntry, type PluginHookSource, type PluginManifestMetadata, type PluginSkillDiscovery, type PluginSource, type ProjectTrust, REPOSITORY_DOOM_CONFIG_TEMPLATES, type RepositoryDoomInitOptions, type RepositoryDoomInitResult, type ResolvedDomain, type ResolvedLayerDefinition, type ResolvedPackageConfiguration, type ResolvedVoiceAutoCaptureConfig, type ResolvedVoiceConfig, type VoiceAdapterConfig, type VoiceAutoCaptureConfig, type VoiceConfig, type VoiceEngine, type VoiceMode, type VoiceModelConfig, type VoiceTtsConfig, type VoiceTtsEngine, type WriteDoomConfigOptions, acknowledgeDoomConfigTransition, appendDoomConfigSelection, appendDoomConfigTransition, applyProfileEnvironment, buildPersonaPrompt, clampImageMaxDimension, configLeafKeys, configRootKeys, configScopeOf, createDoomConfigContext, createDoomConfigContextAsync, createHarnessSession, disposeHarnessState, domainCompletionItems, domainCompletionPrefix, expandDomainNames, findPluginManifestPath, freezeDoomConfigContext, getHarnessState, getSessionHarnessState, globalDoomConfigDirectory, globalDoomConfigPath, harnessRoot, initializeGlobalDoomConfig, initializeRepositoryDoomConfig, isLocalPackageSpecifier, isRemotePluginSource, layerEntries, layerHookGroups, listDomainNames, listProfileNames, loadDomains, loadDoomConfig, loadDoomConfigAsync, loadDoomConfigLayers, loadDoomConfigLenient, loadHarnessState, loadMajorModesConfig, loadMajorModesConfigLenient, loadPiConfig, loadPiConfigAsync, loadPiImageSettings, loadProfiles, mergeDoomConfigs, parseAutocompactModeConfig, parseDoomConfig, parsePiImageSettings, parsePlanningModeConfig, piConfigPaths, piImageSettingsPath, pluginDirectoryForSource, projectHarnessEnvironment, provideDoomConfigContext, readDoomConfigContextGeneration, readDoomConfigPendingSelection, readDoomConfigSelection, readHarnessState, replaceDoomConfigContext, replaceProfileEnvironment, repositoryDoomConfigPath, requireDoomConfigContext, requireHarnessPaths, requireHarnessRoot, resetHarnessStore, resolveLayers, resolvePackageConfigurations, resolvePlanningPlansDirectory, resolvePluginDirectories, resolvePluginEntries, resolveProfile, resolveSharedSkills, resolveVoiceConfig, restoreHarnessStateSnapshot, savePiImageSettings, setDoomConfigValue, snapshotHarnessState, supersedeDoomConfigTransition, unsetDoomConfigValue, updateHarnessState, valueAtKeyPath, writeDoomConfigValues, writePrivateAtomicJson };
package/dist/index.mjs ADDED
@@ -0,0 +1,15 @@
1
+ import { t as writePrivateAtomicJson } from "./atomicJson-1W0WhuFF.mjs";
2
+ import { a as configLeafKeys, c as mergeDoomConfigs, d as parsePlanningModeConfig, f as resolveVoiceConfig, i as DOOM_VOICE_TTS_ENGINES, l as parseAutocompactModeConfig, n as DOOM_VOICE_ENGINES, o as configRootKeys, p as valueAtKeyPath, r as DOOM_VOICE_MODES, s as configScopeOf, t as DOOM_PLANNING_THINKING_LEVELS, u as parseDoomConfig } from "./configPolicy--TNX7feH.mjs";
3
+ import { a as loadDoomConfigAsync, c as repositoryDoomConfigPath, i as loadDoomConfig, l as resolvePlanningPlansDirectory, n as globalDoomConfigPath, o as loadDoomConfigLayers, s as loadDoomConfigLenient, t as globalDoomConfigDirectory } from "./config-CKA07FxG.mjs";
4
+ import { n as unsetDoomConfigValue, r as writeDoomConfigValues, t as setDoomConfigValue } from "./configWriter-BgkGaLrf.mjs";
5
+ import { t as DOOM_DIR } from "./layeredConfig-B922ibgn.mjs";
6
+ import { a as loadDomains, c as resolveSharedSkills, d as expandDomainNames, f as MARKETPLACE_MANIFEST_RELATIVE_PATHS, h as pluginDirectoryForSource, i as listDomainNames, l as domainCompletionItems, m as isRemotePluginSource, o as resolvePluginDirectories, p as findPluginManifestPath, s as resolvePluginEntries, u as domainCompletionPrefix } from "./domains-DZOu9vYM.mjs";
7
+ import { i as readHarnessState, n as HARNESS_STATE_KEYS, r as projectHarnessEnvironment, t as FILE_ONLY_STATE_FIELDS } from "./harnessState-Dn_S7fB9.mjs";
8
+ import { a as getSessionHarnessState, c as requireHarnessPaths, d as restoreHarnessStateSnapshot, f as snapshotHarnessState, i as getHarnessState, l as requireHarnessRoot, n as createHarnessSession, o as harnessRoot, p as updateHarnessState, r as disposeHarnessState, s as loadHarnessState, t as HARNESS_STATE_POINTER, u as resetHarnessStore } from "./harnessStore-CltwLB7M.mjs";
9
+ import { a as piImageSettingsPath, c as MIN_IMAGE_MAX_DIMENSION, i as piConfigPaths, l as clampImageMaxDimension, n as loadPiConfigAsync, o as savePiImageSettings, r as loadPiImageSettings, s as DEFAULT_IMAGE_MAX_DIMENSION, t as loadPiConfig, u as parsePiImageSettings } from "./piConfig-qGyCbcVj.mjs";
10
+ import { a as initializeRepositoryDoomConfig, i as initializeGlobalDoomConfig, n as GLOBAL_DOOM_SEED_FILES, r as REPOSITORY_DOOM_CONFIG_TEMPLATES, t as DOOM_CONFIG_TEMPLATES } from "./init-DJ6wm-dr.mjs";
11
+ import { a as loadMajorModesConfig, c as resolvePackageConfigurations, i as layerHookGroups, n as isLocalPackageSpecifier, o as loadMajorModesConfigLenient, r as layerEntries, s as resolveLayers } from "./majorModes-CmPLEpMT.mjs";
12
+ import { c as resolveProfile, i as listProfileNames, n as applyProfileEnvironment, o as loadProfiles, r as buildPersonaPrompt, s as replaceProfileEnvironment, t as PERSONA_FILES } from "./profiles-fujQKrS0.mjs";
13
+ import { t as DOOM_CONFIG_SERVICE } from "./config-NSHRd6na.mjs";
14
+ import { _ as supersedeDoomConfigTransition, a as appendDoomConfigTransition, d as provideDoomConfigContext, f as readDoomConfigContextGeneration, g as requireDoomConfigContext, h as replaceDoomConfigContext, i as appendDoomConfigSelection, l as freezeDoomConfigContext, m as readDoomConfigSelection, n as DOOM_CONFIG_TRANSITION_ENTRY_TYPE, o as createDoomConfigContext, p as readDoomConfigPendingSelection, r as acknowledgeDoomConfigTransition, s as createDoomConfigContextAsync, t as DOOM_CONFIG_ENTRY_TYPE } from "./sessionConfig-CtLoc-lO.mjs";
15
+ export { DEFAULT_IMAGE_MAX_DIMENSION, DOOM_CONFIG_ENTRY_TYPE, DOOM_CONFIG_SERVICE, DOOM_CONFIG_TEMPLATES, DOOM_CONFIG_TRANSITION_ENTRY_TYPE, DOOM_DIR, DOOM_PLANNING_THINKING_LEVELS, DOOM_VOICE_ENGINES, DOOM_VOICE_MODES, DOOM_VOICE_TTS_ENGINES, FILE_ONLY_STATE_FIELDS, GLOBAL_DOOM_SEED_FILES, HARNESS_STATE_KEYS, HARNESS_STATE_POINTER, MARKETPLACE_MANIFEST_RELATIVE_PATHS, MIN_IMAGE_MAX_DIMENSION, PERSONA_FILES, REPOSITORY_DOOM_CONFIG_TEMPLATES, acknowledgeDoomConfigTransition, appendDoomConfigSelection, appendDoomConfigTransition, applyProfileEnvironment, buildPersonaPrompt, clampImageMaxDimension, configLeafKeys, configRootKeys, configScopeOf, createDoomConfigContext, createDoomConfigContextAsync, createHarnessSession, disposeHarnessState, domainCompletionItems, domainCompletionPrefix, expandDomainNames, findPluginManifestPath, freezeDoomConfigContext, getHarnessState, getSessionHarnessState, globalDoomConfigDirectory, globalDoomConfigPath, harnessRoot, initializeGlobalDoomConfig, initializeRepositoryDoomConfig, isLocalPackageSpecifier, isRemotePluginSource, layerEntries, layerHookGroups, listDomainNames, listProfileNames, loadDomains, loadDoomConfig, loadDoomConfigAsync, loadDoomConfigLayers, loadDoomConfigLenient, loadHarnessState, loadMajorModesConfig, loadMajorModesConfigLenient, loadPiConfig, loadPiConfigAsync, loadPiImageSettings, loadProfiles, mergeDoomConfigs, parseAutocompactModeConfig, parseDoomConfig, parsePiImageSettings, parsePlanningModeConfig, piConfigPaths, piImageSettingsPath, pluginDirectoryForSource, projectHarnessEnvironment, provideDoomConfigContext, readDoomConfigContextGeneration, readDoomConfigPendingSelection, readDoomConfigSelection, readHarnessState, replaceDoomConfigContext, replaceProfileEnvironment, repositoryDoomConfigPath, requireDoomConfigContext, requireHarnessPaths, requireHarnessRoot, resetHarnessStore, resolveLayers, resolvePackageConfigurations, resolvePlanningPlansDirectory, resolvePluginDirectories, resolvePluginEntries, resolveProfile, resolveSharedSkills, resolveVoiceConfig, restoreHarnessStateSnapshot, savePiImageSettings, setDoomConfigValue, snapshotHarnessState, supersedeDoomConfigTransition, unsetDoomConfigValue, updateHarnessState, valueAtKeyPath, writeDoomConfigValues, writePrivateAtomicJson };