@agimon-ai/po-config 0.0.0-alpha.2 → 0.0.0-alpha.200

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 (269) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +34 -132
  3. package/dist/agentPluginMcp.cjs +380 -134
  4. package/dist/agentPluginMcp.cjs.map +1 -1
  5. package/dist/agentPluginMcp.d.mts +25 -4
  6. package/dist/agentPluginMcp.d.mts.map +1 -1
  7. package/dist/agentPluginMcp.mjs +378 -134
  8. package/dist/agentPluginMcp.mjs.map +1 -1
  9. package/dist/apiContracts.cjs +13 -12
  10. package/dist/apiContracts.cjs.map +1 -1
  11. package/dist/apiContracts.d.mts +2 -2
  12. package/dist/apiContracts.d.mts.map +1 -1
  13. package/dist/apiContracts.mjs +13 -12
  14. package/dist/apiContracts.mjs.map +1 -1
  15. package/dist/atomicJson-D3MHqnLW.cjs +59 -0
  16. package/dist/atomicJson-D3MHqnLW.cjs.map +1 -0
  17. package/dist/atomicJson-Dj3rlZbD.mjs +40 -0
  18. package/dist/atomicJson-Dj3rlZbD.mjs.map +1 -0
  19. package/dist/atomicJson.cjs +4 -2
  20. package/dist/atomicJson.d.mts +2 -2
  21. package/dist/atomicJson.mjs +3 -2
  22. package/dist/completion-BeLpnmA4.d.mts +102 -0
  23. package/dist/completion-BeLpnmA4.d.mts.map +1 -0
  24. package/dist/config-BBvn_ZLP.mjs +1 -0
  25. package/dist/config-BeErFE6a.mjs +230 -0
  26. package/dist/config-BeErFE6a.mjs.map +1 -0
  27. package/dist/config-DB7YUo6N.cjs +292 -0
  28. package/dist/config-DB7YUo6N.cjs.map +1 -0
  29. package/dist/{config-D2HbBLzo.d.mts → config-tk56d8mk.d.mts} +173 -52
  30. package/dist/config-tk56d8mk.d.mts.map +1 -0
  31. package/dist/config.cjs +38 -17
  32. package/dist/config.d.mts +5 -3
  33. package/dist/config.mjs +4 -3
  34. package/dist/{configPolicy-DCQgF5-f.mjs → configPolicy-BFBzdISO.mjs} +432 -97
  35. package/dist/configPolicy-BFBzdISO.mjs.map +1 -0
  36. package/dist/{configPolicy-Ce1QKDxa.cjs → configPolicy-BL4UUBLR.cjs} +459 -112
  37. package/dist/configPolicy-BL4UUBLR.cjs.map +1 -0
  38. package/dist/configSchema.d.mts +2 -2
  39. package/dist/configWriter-BzTOeJCT.cjs +218 -0
  40. package/dist/configWriter-BzTOeJCT.cjs.map +1 -0
  41. package/dist/configWriter-DwaYuqi8.mjs +180 -0
  42. package/dist/configWriter-DwaYuqi8.mjs.map +1 -0
  43. package/dist/configWriter.cjs +7 -4
  44. package/dist/configWriter.d.mts +2 -2
  45. package/dist/configWriter.mjs +1 -2
  46. package/dist/core-B8x1gjyx.cjs +369 -0
  47. package/dist/core-B8x1gjyx.cjs.map +1 -0
  48. package/dist/core-BjM59sEK.mjs +230 -0
  49. package/dist/core-BjM59sEK.mjs.map +1 -0
  50. package/dist/core-DMD33YiW.d.mts +27 -0
  51. package/dist/core-DMD33YiW.d.mts.map +1 -0
  52. package/dist/domains-B2jnohjL.mjs +1096 -0
  53. package/dist/domains-B2jnohjL.mjs.map +1 -0
  54. package/dist/domains-DBNTBmuc.d.mts +111 -0
  55. package/dist/domains-DBNTBmuc.d.mts.map +1 -0
  56. package/dist/domains-dSPktRdk.cjs +1267 -0
  57. package/dist/domains-dSPktRdk.cjs.map +1 -0
  58. package/dist/domains.cjs +19 -4
  59. package/dist/domains.d.mts +5 -3
  60. package/dist/domains.mjs +4 -3
  61. package/dist/extensions/mcp-ui.mjs +24 -21
  62. package/dist/extensions/mcp-ui.mjs.map +1 -1
  63. package/dist/extensions/mcp.cjs +13 -13
  64. package/dist/extensions/mcp.cjs.map +1 -1
  65. package/dist/extensions/mcp.d.mts +1 -1
  66. package/dist/extensions/mcp.mjs +13 -13
  67. package/dist/extensions/mcp.mjs.map +1 -1
  68. package/dist/extensions/server.cjs +38 -380
  69. package/dist/extensions/server.cjs.map +1 -1
  70. package/dist/extensions/server.d.mts +2 -2
  71. package/dist/extensions/server.d.mts.map +1 -1
  72. package/dist/extensions/server.mjs +40 -382
  73. package/dist/extensions/server.mjs.map +1 -1
  74. package/dist/{harnessState-CCyBeutB.cjs → harnessState-BpJcKc7A.cjs} +12 -34
  75. package/dist/harnessState-BpJcKc7A.cjs.map +1 -0
  76. package/dist/{harnessState-Dn_S7fB9.mjs → harnessState-XYW0Kxrp.mjs} +12 -34
  77. package/dist/harnessState-XYW0Kxrp.mjs.map +1 -0
  78. package/dist/harnessState.cjs +1 -1
  79. package/dist/harnessState.d.mts +1 -1
  80. package/dist/harnessState.mjs +1 -2
  81. package/dist/{harnessStore-CltwLB7M.mjs → harnessStore-C3slJmA6.mjs} +160 -82
  82. package/dist/harnessStore-C3slJmA6.mjs.map +1 -0
  83. package/dist/{harnessStore-CJSxdSkV.cjs → harnessStore-CEGS2XsW.cjs} +189 -81
  84. package/dist/harnessStore-CEGS2XsW.cjs.map +1 -0
  85. package/dist/harnessStore.cjs +6 -3
  86. package/dist/harnessStore.d.mts +2 -2
  87. package/dist/harnessStore.mjs +1 -2
  88. package/dist/index-7RuIAWX1.d.mts +63 -0
  89. package/dist/index-7RuIAWX1.d.mts.map +1 -0
  90. package/dist/index-B2r4kUcO.d.mts +62 -0
  91. package/dist/index-B2r4kUcO.d.mts.map +1 -0
  92. package/dist/{index-Dy_-m7gx.d.mts → index-BSqfRiCE.d.mts} +8 -11
  93. package/dist/index-BSqfRiCE.d.mts.map +1 -0
  94. package/dist/index-BXUn46YE.d.mts +71 -0
  95. package/dist/index-BXUn46YE.d.mts.map +1 -0
  96. package/dist/index-CJ9sIwip.d.mts +40 -0
  97. package/dist/index-CJ9sIwip.d.mts.map +1 -0
  98. package/dist/index-Cehagk1u.d.mts +155 -0
  99. package/dist/index-Cehagk1u.d.mts.map +1 -0
  100. package/dist/{index-CEUc7m16.d.mts → index-ClDBEynT.d.mts} +82 -32
  101. package/dist/index-ClDBEynT.d.mts.map +1 -0
  102. package/dist/index-N_GmmWJz.d.mts +83 -0
  103. package/dist/index-N_GmmWJz.d.mts.map +1 -0
  104. package/dist/index-OSfUuVIi.d.mts +94 -0
  105. package/dist/index-OSfUuVIi.d.mts.map +1 -0
  106. package/dist/index-_ANcZzRj.d.mts +69 -0
  107. package/dist/index-_ANcZzRj.d.mts.map +1 -0
  108. package/dist/index-fTuf8tVH.d.mts +34 -0
  109. package/dist/index-fTuf8tVH.d.mts.map +1 -0
  110. package/dist/index-wyQiF3PI.d.mts +226 -0
  111. package/dist/index-wyQiF3PI.d.mts.map +1 -0
  112. package/dist/index.cjs +99 -68
  113. package/dist/index.d.mts +29 -15
  114. package/dist/index.d.mts.map +1 -0
  115. package/dist/index.mjs +18 -15
  116. package/dist/init-DvEao9kS.cjs +654 -0
  117. package/dist/init-DvEao9kS.cjs.map +1 -0
  118. package/dist/init-sDZ0vh78.mjs +610 -0
  119. package/dist/init-sDZ0vh78.mjs.map +1 -0
  120. package/dist/init.cjs +8 -6
  121. package/dist/init.d.mts +2 -2
  122. package/dist/init.mjs +1 -2
  123. package/dist/layeredConfig-5gINd_qJ.cjs +267 -0
  124. package/dist/layeredConfig-5gINd_qJ.cjs.map +1 -0
  125. package/dist/layeredConfig-DpLY-Azh.mjs +205 -0
  126. package/dist/layeredConfig-DpLY-Azh.mjs.map +1 -0
  127. package/dist/layeredConfig.cjs +5 -4
  128. package/dist/layeredConfig.d.mts +2 -2
  129. package/dist/layeredConfig.mjs +1 -2
  130. package/dist/{piConfig-qGyCbcVj.mjs → piConfig-Bq36PQFF.mjs} +104 -69
  131. package/dist/piConfig-Bq36PQFF.mjs.map +1 -0
  132. package/dist/{piConfig-Bx26HMb_.d.mts → piConfig-C9rGUqPe.d.mts} +3 -3
  133. package/dist/{piConfig-Bx26HMb_.d.mts.map → piConfig-C9rGUqPe.d.mts.map} +1 -1
  134. package/dist/{piConfig-CCBdZXQr.cjs → piConfig-cluCie5i.cjs} +122 -70
  135. package/dist/piConfig-cluCie5i.cjs.map +1 -0
  136. package/dist/piConfig.cjs +4 -1
  137. package/dist/piConfig.d.mts +2 -2
  138. package/dist/piConfig.mjs +1 -2
  139. package/dist/piContext.cjs +27 -16
  140. package/dist/piContext.d.mts +3 -3
  141. package/dist/piContext.mjs +1 -2
  142. package/dist/po-runtime-identity.json +1 -0
  143. package/dist/presetConfig-BcmdY04H.cjs +531 -0
  144. package/dist/presetConfig-BcmdY04H.cjs.map +1 -0
  145. package/dist/presetConfig-BmoZvYW-.mjs +457 -0
  146. package/dist/presetConfig-BmoZvYW-.mjs.map +1 -0
  147. package/dist/presets-6swHXI2u.cjs +230 -0
  148. package/dist/presets-6swHXI2u.cjs.map +1 -0
  149. package/dist/presets-lP01-CKK.mjs +211 -0
  150. package/dist/presets-lP01-CKK.mjs.map +1 -0
  151. package/dist/presets.cjs +17 -0
  152. package/dist/presets.d.mts +113 -0
  153. package/dist/presets.d.mts.map +1 -0
  154. package/dist/presets.mjs +4 -0
  155. package/dist/profiles-CUHo67zR.cjs +1513 -0
  156. package/dist/profiles-CUHo67zR.cjs.map +1 -0
  157. package/dist/profiles-CY2ga4PH.mjs +1324 -0
  158. package/dist/profiles-CY2ga4PH.mjs.map +1 -0
  159. package/dist/profiles.cjs +266 -1
  160. package/dist/profiles.cjs.map +1 -0
  161. package/dist/profiles.d.mts +119 -4
  162. package/dist/profiles.d.mts.map +1 -1
  163. package/dist/profiles.mjs +248 -2
  164. package/dist/profiles.mjs.map +1 -0
  165. package/dist/selectionSwitch.cjs +97 -32
  166. package/dist/selectionSwitch.cjs.map +1 -1
  167. package/dist/selectionSwitch.d.mts +41 -18
  168. package/dist/selectionSwitch.d.mts.map +1 -1
  169. package/dist/selectionSwitch.mjs +93 -31
  170. package/dist/selectionSwitch.mjs.map +1 -1
  171. package/dist/{sessionConfig-DV5xTRRw.mjs → sessionConfig-BESVV7Qg.mjs} +66 -57
  172. package/dist/sessionConfig-BESVV7Qg.mjs.map +1 -0
  173. package/dist/{sessionConfig-Bf6xHWLd.cjs → sessionConfig-CLuSKK3A.cjs} +92 -95
  174. package/dist/sessionConfig-CLuSKK3A.cjs.map +1 -0
  175. package/dist/settingsApi-BE3Jj3W9.mjs +479 -0
  176. package/dist/settingsApi-BE3Jj3W9.mjs.map +1 -0
  177. package/dist/settingsApi-bS3MV2dz.cjs +484 -0
  178. package/dist/settingsApi-bS3MV2dz.cjs.map +1 -0
  179. package/dist/sync-BJ8gCP9s.mjs +29 -0
  180. package/dist/sync-BJ8gCP9s.mjs.map +1 -0
  181. package/dist/sync-DW2exveL.d.mts +47 -0
  182. package/dist/sync-DW2exveL.d.mts.map +1 -0
  183. package/dist/sync-Dlxz2msM.cjs +37 -0
  184. package/dist/sync-Dlxz2msM.cjs.map +1 -0
  185. package/dist/sync.cjs +18 -0
  186. package/dist/sync.d.mts +4 -0
  187. package/dist/sync.mjs +4 -0
  188. package/dist/types.cjs +2 -2
  189. package/dist/types.d.mts +2 -2
  190. package/dist/types.mjs +1 -2
  191. package/llms.txt +3 -3
  192. package/package.json +31 -23
  193. package/src/prompts/help-how-to-config/SKILL.md +47 -0
  194. package/src/prompts/help-how-to-config/agents/openai.yaml +4 -0
  195. package/src/prompts/help-how-to-config/references/config-contract.md +299 -0
  196. package/dist/atomicJson-1W0WhuFF.mjs +0 -44
  197. package/dist/atomicJson-1W0WhuFF.mjs.map +0 -1
  198. package/dist/atomicJson-Dt2z_DXl.cjs +0 -52
  199. package/dist/atomicJson-Dt2z_DXl.cjs.map +0 -1
  200. package/dist/config-CfTb0_9G.cjs +0 -219
  201. package/dist/config-CfTb0_9G.cjs.map +0 -1
  202. package/dist/config-D2HbBLzo.d.mts.map +0 -1
  203. package/dist/config-DoQWSt1V.mjs +0 -162
  204. package/dist/config-DoQWSt1V.mjs.map +0 -1
  205. package/dist/config-NSHRd6na.mjs +0 -2
  206. package/dist/configPolicy-Ce1QKDxa.cjs.map +0 -1
  207. package/dist/configPolicy-DCQgF5-f.mjs.map +0 -1
  208. package/dist/configWriter-B7uO8MuN.cjs +0 -150
  209. package/dist/configWriter-B7uO8MuN.cjs.map +0 -1
  210. package/dist/configWriter-DUtLgOlD.mjs +0 -130
  211. package/dist/configWriter-DUtLgOlD.mjs.map +0 -1
  212. package/dist/domains-BroCVHrS.mjs +0 -633
  213. package/dist/domains-BroCVHrS.mjs.map +0 -1
  214. package/dist/domains-DGCb7uMC.cjs +0 -727
  215. package/dist/domains-DGCb7uMC.cjs.map +0 -1
  216. package/dist/harnessState-CCyBeutB.cjs.map +0 -1
  217. package/dist/harnessState-Dn_S7fB9.mjs.map +0 -1
  218. package/dist/harnessStore-CJSxdSkV.cjs.map +0 -1
  219. package/dist/harnessStore-CltwLB7M.mjs.map +0 -1
  220. package/dist/index-78zvoS9s.d.mts +0 -35
  221. package/dist/index-78zvoS9s.d.mts.map +0 -1
  222. package/dist/index-BT29GZx5.d.mts +0 -142
  223. package/dist/index-BT29GZx5.d.mts.map +0 -1
  224. package/dist/index-C6GaYjq-.d.mts +0 -6
  225. package/dist/index-C6GaYjq-.d.mts.map +0 -1
  226. package/dist/index-CEUc7m16.d.mts.map +0 -1
  227. package/dist/index-CRcoVYXz.d.mts +0 -39
  228. package/dist/index-CRcoVYXz.d.mts.map +0 -1
  229. package/dist/index-CVlciCJF.d.mts +0 -40
  230. package/dist/index-CVlciCJF.d.mts.map +0 -1
  231. package/dist/index-Ch7ptOkW.d.mts +0 -54
  232. package/dist/index-Ch7ptOkW.d.mts.map +0 -1
  233. package/dist/index-CkDDvVQt.d.mts +0 -118
  234. package/dist/index-CkDDvVQt.d.mts.map +0 -1
  235. package/dist/index-Cvdt-Y-i.d.mts +0 -66
  236. package/dist/index-Cvdt-Y-i.d.mts.map +0 -1
  237. package/dist/index-DNk4q0Qm.d.mts +0 -81
  238. package/dist/index-DNk4q0Qm.d.mts.map +0 -1
  239. package/dist/index-DdH0w56b.d.mts +0 -116
  240. package/dist/index-DdH0w56b.d.mts.map +0 -1
  241. package/dist/index-Dy_-m7gx.d.mts.map +0 -1
  242. package/dist/init-Cd3Ki6Ub.cjs +0 -448
  243. package/dist/init-Cd3Ki6Ub.cjs.map +0 -1
  244. package/dist/init-DVzhiCUE.mjs +0 -415
  245. package/dist/init-DVzhiCUE.mjs.map +0 -1
  246. package/dist/layeredConfig-fukqN2EA.mjs +0 -67
  247. package/dist/layeredConfig-fukqN2EA.mjs.map +0 -1
  248. package/dist/layeredConfig-ol0274TN.cjs +0 -94
  249. package/dist/layeredConfig-ol0274TN.cjs.map +0 -1
  250. package/dist/majorModes-D1Itd8SN.mjs +0 -337
  251. package/dist/majorModes-D1Itd8SN.mjs.map +0 -1
  252. package/dist/majorModes-DnNSH9ZK.cjs +0 -387
  253. package/dist/majorModes-DnNSH9ZK.cjs.map +0 -1
  254. package/dist/majorModes.cjs +0 -10
  255. package/dist/majorModes.d.mts +0 -2
  256. package/dist/majorModes.mjs +0 -2
  257. package/dist/piConfig-CCBdZXQr.cjs.map +0 -1
  258. package/dist/piConfig-qGyCbcVj.mjs.map +0 -1
  259. package/dist/profiles-CTrUCmIh.d.mts +0 -27
  260. package/dist/profiles-CTrUCmIh.d.mts.map +0 -1
  261. package/dist/profiles-DBcYg5nA.mjs +0 -483
  262. package/dist/profiles-DBcYg5nA.mjs.map +0 -1
  263. package/dist/profiles-tpplXY4r.cjs +0 -552
  264. package/dist/profiles-tpplXY4r.cjs.map +0 -1
  265. package/dist/sessionConfig-Bf6xHWLd.cjs.map +0 -1
  266. package/dist/sessionConfig-DV5xTRRw.mjs.map +0 -1
  267. package/src/prompts/po-author-config/SKILL.md +0 -26
  268. package/src/prompts/po-author-config/agents/openai.yaml +0 -4
  269. package/src/prompts/po-author-config/references/config-contract.md +0 -201
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Vuong Ngo
3
+ Copyright (c) 2026 Agimon Pty Ltd
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,170 +1,72 @@
1
1
  # @agimon-ai/po-config
2
2
 
3
- Typed runtime configuration and immutable session context for
4
- [Po](https://www.npmjs.com/package/@agimon-ai/po).
3
+ Typed configuration loading, validation, and session selection state for Po. The distribution loads Config before selectable packages; do not add it to a layer.
5
4
 
6
- This package is fixed core in the Po distribution. It loads `config.yaml`, validates supported
7
- runtime settings, publishes the `doom/config` Cordis service, and maintains selection state shared
8
- by the major-mode, domain, and profile transition flows.
5
+ Requires Node.js 24 or newer. Pi consumers use the peer version declared in `package.json`.
9
6
 
10
- > **Alpha:** configuration contracts may change between releases.
7
+ ## Runtime settings
11
8
 
12
- ## Requirements
9
+ Po reads host settings from `~/.po/config.yaml` and repository settings from `<repoRoot>/.po/config.yaml`. The strict runtime reader also applies the selected person's cached issuer-global settings beneath the host file, for portable keys only. It uses the session starter's identity when supplied, otherwise the host owner's. A missing cache contributes nothing. See [Hierarchy](../../../docs/architecture.md#hierarchy).
13
10
 
14
- - Node.js 24 or newer
15
- - Pi 1.0.0 as a peer dependency
16
-
17
- ## Install
18
-
19
- ```bash
20
- npm install @agimon-ai/po-config
21
- ```
22
-
23
- Do not add this package to a Po layer. The distribution activates it before selectable packages
24
- so the rest of the parent session can consume one resolved configuration snapshot.
25
-
26
- ## Runtime configuration
27
-
28
- Po reads `~/.po/config.yaml` first and `<repoRoot>/.po/config.yaml` second. Merge policy
29
- is field-specific because some settings are personal and others are repository policy:
30
-
31
- | Setting | Effective source policy |
32
- | ------------------- | -------------------------------------------------------------------- |
33
- | `projectTrust` | Repository value, defaulting to `ask` |
34
- | `editor` | Personal config only |
35
- | `modes.planning` | Personal and repository fields merge, with repository values winning |
36
- | `voice` | Personal and repository fields merge, with repository values winning |
37
- | `voice.autoCapture` | Personal config only |
38
- | `selection` | Per-axis merge, with repository values winning |
39
-
40
- Supported root keys are `modes`, `projectTrust`, `editor`, `voice`, and `selection`. Unknown keys and
41
- invalid values fail during loading.
11
+ Merge rules depend on the field: repository trust policy defaults to `ask`; editor choice and autonomous voice capture are host-only; planning, voice, and default selection merge where supported. Unknown keys and invalid values fail loading. The settings inspection reader `readPoConfigLayers` currently reports host and repository layers, not the cached global layer.
42
12
 
43
13
  ```yaml
44
14
  projectTrust: ask
45
- modes:
46
- planning:
47
- main:
48
- model: openai/gpt-5.4
49
- thinking: high
50
- plansDirectory: .po/plans
51
- voice:
52
- engine: auto
53
- language: en
54
15
  selection:
55
- majorMode: copilot
16
+ preset: copilot
56
17
  domains: [default]
57
18
  profile: reviewer
58
19
  ```
59
20
 
60
- The `selection` mapping names defaults. Definitions for those axes live in `modes.yaml`,
61
- `domains.yaml`, and `profiles.yaml` and are documented by their owning package Help skills.
62
-
63
- See the shipped [configuration contract](./src/prompts/po-author-config/references/config-contract.md) for
64
- the complete runtime schema and additional configuration details.
21
+ Selection names defaults. Definitions belong in `presets.yaml`, `domains.yaml`, and `profiles.yaml`, whose owning packages provide Help guidance. The [configuration contract](./src/prompts/help-how-to-config/references/config-contract.md) gives authoring examples; the parser in `src/services/configPolicy` owns accepted fields and merge behavior.
65
22
 
66
- ## Typed session context
23
+ ## Workspace declarations
67
24
 
68
- The native session server root provides
69
- `DOOM_CONFIG_SERVICE`. Consumers must access it under an owning service injection:
25
+ Declare workspaces in repository `.po/workspaces.yaml`:
70
26
 
71
- ```ts
72
- import { DOOM_CONFIG_SERVICE, type DoomConfigContext, requireDoomConfigContext } from '@agimon-ai/po-config';
73
- import type { Context } from '@deepseek-ai/cordis';
74
-
75
- export function consumeDoomConfig(context: Context, consume: (snapshot: DoomConfigContext) => void): void {
76
- context.inject([DOOM_CONFIG_SERVICE], (configContext) => {
77
- consume(requireDoomConfigContext(configContext));
78
- });
79
- }
27
+ ```yaml
28
+ workspaces:
29
+ - name: Product
30
+ path: .
31
+ alias: product
32
+ instructions: Focus on this product.
33
+ metadata:
34
+ '@example/plugin': { projectId: product }
80
35
  ```
81
36
 
82
- The snapshot is deeply frozen. It contains validated `settings`, active `harness` state, an optional
83
- `pendingSelection`, and `requiresRelaunch`. Do not mutate it or retain it across provider or session
84
- replacement. The next session publishes a new snapshot.
85
-
86
- ## Plugin structure and lifecycle
37
+ Paths currently must resolve to the repository root, including equivalent symlinks. Declarations can share that root while receiving distinct workspace IDs. Names and aliases must be unique within the file. Metadata is JSON, not a credential store or an authorization boundary; each consuming plugin validates its own fields.
87
38
 
88
- Native server declarations live in `src/extensions`. HTTP request handling lives in routed `api/` files, package behavior in `src/services/{serviceName}`, and cached harness state in `src/models`. Public consumption modules remain flat under `src/exports`.
39
+ An existing declaration file is authoritative, including `workspaces: []`. Invalid or blank files fail rather than falling back. Only an absent file permits the deprecated repository `config.yaml` list. Personal declarations are ignored; Po does not migrate files automatically. Instructions are copied on initial admission, not overwritten later.
89
40
 
90
- The native session server root installs the Config runtime as a Cordis service and awaits its readiness in `onStart`. It uses `Promise.allSettled` to preserve degraded initialization reporting rather than throwing the readiness rejection from startup. The runtime receives the scope signal. Config and MCP projection logic stays in services, while public `src/exports` modules only forward symbols from their owners.
41
+ Hosts read declarations at composition boundaries with `readWorkspaceDeclarations`. Plugins inject `po/workspace-registry` instead of rereading YAML. Resolve the current workspace ID; path lookup can be ambiguous when declarations share a root.
91
42
 
92
- The root publishes its service before `onStart` awaits readiness, so startup consumers can observe the coordinator.
43
+ ## Consume the session snapshot
93
44
 
94
- ## Selection transitions
95
-
96
- Major-mode, domain, and profile packages resolve their own requested changes, then use the shared
97
- transition coordinator. Config owns the persisted selection and transition journal records used to
98
- distinguish active state from pending intent.
99
-
100
- Native session selection is serialized by the kernel and applied to retained facet candidates. Config owns persisted selection and pending transition records; Po factory reload and terminal relaunch are not native authoring mechanisms.
101
-
102
- Consumers must not edit `snapshot.harness`, bypass the coordinator, or cache launcher environment
103
- state at module scope.
104
-
105
- ## Public API
106
-
107
- The root and focused `/config` and `/piContext` exports provide runtime parsing, merge policy, and
108
- session integration:
45
+ Inject `PO_CONFIG_SERVICE` and call `requirePoConfigContext` inside the owning service fiber:
109
46
 
110
47
  ```ts
111
- import { loadDoomConfig } from '@agimon-ai/po-config';
48
+ import { PO_CONFIG_SERVICE, requirePoConfigContext } from '@agimon-ai/po-config';
112
49
 
113
- const settings = loadDoomConfig(process.cwd());
50
+ context.inject([PO_CONFIG_SERVICE], (context) => {
51
+ const snapshot = requirePoConfigContext(context);
52
+ // Consume snapshot.settings without mutating it.
53
+ });
114
54
  ```
115
55
 
116
- Pi-specific JSON settings are exposed through `/pi-config`; their types are exposed through `/config-schema`. The removed `/config/piConfig` and `/config/schema` paths have no aliases.
117
-
118
- The package also exposes lower-level loaders used by the fixed axis packages. User-facing guidance
119
- for defining modes, domains, and profiles is intentionally owned by those packages instead of this
120
- runtime Config authoring skill.
56
+ Snapshots are deeply frozen. Do not retain one across provider or session replacement. Selection changes go through the shared coordinator, not direct edits to harness state. Runtime packages use injected configuration; host composition code can use the FileSystem-based `readPoConfig` with explicit environment and home directory. Node-only loaders are compatibility shims, not portable runtime APIs.
121
57
 
122
- ## Help
58
+ Focused exports include `/config`, `/piConfig`, `/configSchema`, and `/piContext`; inspect `package.json` for the current public surface.
123
59
 
124
- The package publishes `src/prompts/po-author-config`, links it from `llms.txt`, and registers
125
- `po-author-config` with the `doom/help` Cordis service. The guidance is visible to the AI only
126
- while the parent Help minor mode is active.
60
+ ## Remote session summary
127
61
 
128
- ## Remote session app
62
+ The remote `show_session` tool returns a read-only summary and an MCP App for compatible hosts. It exposes session identity and selection, not credentials, instruction text, or absolute repository paths. Conversation-routed callers must preserve host-supplied conversation metadata on every call, including refresh. Otherwise use a dedicated-session connection; there is no shared-session fallback.
129
63
 
130
- The remote-only `show_session` tool returns a read-only summary and links it to an MCP App.
131
- Compatible hosts render the repository name, session identity, revision, profile, domains, layers,
132
- and modes. Text-only clients receive the same information as readable text. `load_context` remains
133
- separate and does not open a widget.
134
-
135
- The component refreshes through the host's `tools/call` bridge. It receives no access token, does
136
- not contact localhost or an external asset server, and does not include instructions, persona text,
137
- or absolute repository paths. Conversation-routed connections still require host-supplied
138
- conversation metadata on every tool call, including refresh. A host that cannot preserve that
139
- metadata must use a dedicated-session connection; there is no fallback to a shared session.
140
-
141
- `build:mcp` first runs `build:app`. The browser SDK and HTML are bundled into
142
- `generated/mcp-apps/session.ts`, then embedded in the published MCP facet. The `ui://` resource URI
143
- contains a hash of the complete HTML. Do not edit generated assets or reuse an old URI for changed
144
- content. Resource reads are authorized static prefetches and never create a child session.
145
-
146
- Connect an MCP Apps host to the existing session MCP URL. After rebuilding and restarting the
147
- server, refresh the host's tool catalog and invoke `show_session`. ChatGPT developer-mode
148
- connections use the same endpoint. Public app submission, a stable production widget origin, and
149
- upstream third-party widget forwarding are separate deployment work.
64
+ MCP UI assets are generated by the build. Do not edit them or reuse an old content-hashed resource URI. Source tests do not establish behavior inside a third-party MCP App host.
150
65
 
151
66
  ## Development
152
67
 
153
- ```bash
154
- pnpm build
155
- pnpm typecheck
156
- pnpm test
157
- pnpm lint
158
- pnpm test:app
159
- ```
160
-
161
- The browser tests require Playwright Chromium (`pnpm exec playwright install chromium`). They
162
- exercise the packaged HTML in a sandboxed iframe using the standard SDK's `AppBridge`, including
163
- refresh, theme changes, errors, text safety, and teardown. They do not substitute for testing the
164
- connection inside ChatGPT itself.
165
-
166
- Maintained by [Agimon](https://agimon.ai/about).
68
+ Run `pnpm build`, `pnpm typecheck`, `pnpm test`, and `pnpm lint` from this package. Help guidance is published through `llms.txt` and `src/prompts`.
167
69
 
168
70
  ## License
169
71
 
170
- MIT
72
+ MIT. See [LICENSE](LICENSE).