@agimon-ai/po-config 0.0.0-alpha.21 → 0.0.0-alpha.210

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 (221) hide show
  1. package/LICENSE +21 -149
  2. package/README.md +34 -132
  3. package/dist/agentPluginMcp.cjs +67 -0
  4. package/dist/agentPluginMcp.cjs.map +1 -1
  5. package/dist/agentPluginMcp.d.mts +4 -1
  6. package/dist/agentPluginMcp.d.mts.map +1 -1
  7. package/dist/agentPluginMcp.mjs +67 -1
  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/{completion-Ba0TiBHa.d.mts → completion-MHRDthkU.d.mts} +32 -101
  16. package/dist/completion-MHRDthkU.d.mts.map +1 -0
  17. package/dist/config-BLG7l_l3.mjs +229 -0
  18. package/dist/config-BLG7l_l3.mjs.map +1 -0
  19. package/dist/config-C-X9JHzR.cjs +291 -0
  20. package/dist/config-C-X9JHzR.cjs.map +1 -0
  21. package/dist/{config-pxC7FyUJ.d.mts → config-Dx0UxTXn.d.mts} +179 -21
  22. package/dist/config-Dx0UxTXn.d.mts.map +1 -0
  23. package/dist/config.cjs +38 -21
  24. package/dist/config.d.mts +5 -3
  25. package/dist/config.mjs +3 -4
  26. package/dist/{configWriter-DGO0gmXo.cjs → configWriter-B7Wd7YXY.cjs} +35 -8
  27. package/dist/configWriter-B7Wd7YXY.cjs.map +1 -0
  28. package/dist/{configWriter-DCASRzr-.mjs → configWriter-BoGILUs4.mjs} +29 -8
  29. package/dist/configWriter-BoGILUs4.mjs.map +1 -0
  30. package/dist/configWriter.cjs +2 -1
  31. package/dist/configWriter.d.mts +2 -2
  32. package/dist/configWriter.mjs +1 -1
  33. package/dist/{configPolicy-DueX0k6i.mjs → core-BVKJSk4d.mjs} +688 -24
  34. package/dist/core-BVKJSk4d.mjs.map +1 -0
  35. package/dist/core-Bp-tQExp.d.mts +27 -0
  36. package/dist/core-Bp-tQExp.d.mts.map +1 -0
  37. package/dist/core-flH758tm.cjs +1705 -0
  38. package/dist/core-flH758tm.cjs.map +1 -0
  39. package/dist/{domains-CiDUsRiX.cjs → domains-CCVx5bSY.cjs} +279 -35
  40. package/dist/domains-CCVx5bSY.cjs.map +1 -0
  41. package/dist/domains-DBNTBmuc.d.mts +111 -0
  42. package/dist/domains-DBNTBmuc.d.mts.map +1 -0
  43. package/dist/{domains-IlieGHaY.mjs → domains-DJ9UuWe3.mjs} +231 -35
  44. package/dist/domains-DJ9UuWe3.mjs.map +1 -0
  45. package/dist/domains.cjs +13 -3
  46. package/dist/domains.d.mts +5 -3
  47. package/dist/domains.mjs +4 -3
  48. package/dist/extensions/mcp-ui.mjs +23 -20
  49. package/dist/extensions/mcp-ui.mjs.map +1 -1
  50. package/dist/extensions/mcp.cjs +23 -15
  51. package/dist/extensions/mcp.cjs.map +1 -1
  52. package/dist/extensions/mcp.d.mts.map +1 -1
  53. package/dist/extensions/mcp.mjs +23 -15
  54. package/dist/extensions/mcp.mjs.map +1 -1
  55. package/dist/extensions/server.cjs +16 -366
  56. package/dist/extensions/server.cjs.map +1 -1
  57. package/dist/extensions/server.mjs +14 -364
  58. package/dist/extensions/server.mjs.map +1 -1
  59. package/dist/{harnessState-BrmH0lG5.cjs → harnessState-BpJcKc7A.cjs} +11 -33
  60. package/dist/harnessState-BpJcKc7A.cjs.map +1 -0
  61. package/dist/{harnessState-8lZda_8r.mjs → harnessState-XYW0Kxrp.mjs} +11 -33
  62. package/dist/harnessState-XYW0Kxrp.mjs.map +1 -0
  63. package/dist/harnessState.cjs +1 -1
  64. package/dist/harnessState.d.mts +1 -1
  65. package/dist/harnessState.mjs +1 -1
  66. package/dist/{harnessStore-w8zHmJ_H.mjs → harnessStore-C3slJmA6.mjs} +2 -2
  67. package/dist/harnessStore-C3slJmA6.mjs.map +1 -0
  68. package/dist/{harnessStore-BinxGITh.cjs → harnessStore-CEGS2XsW.cjs} +2 -2
  69. package/dist/harnessStore-CEGS2XsW.cjs.map +1 -0
  70. package/dist/harnessStore.cjs +1 -3
  71. package/dist/harnessStore.d.mts +2 -2
  72. package/dist/harnessStore.mjs +1 -1
  73. package/dist/index-7RuIAWX1.d.mts.map +1 -1
  74. package/dist/{index-nVcEC1jO.d.mts → index-B2r4kUcO.d.mts} +2 -2
  75. package/dist/index-B2r4kUcO.d.mts.map +1 -0
  76. package/dist/{index-BTOU4XiI.d.mts → index-B2v4uyQX.d.mts} +7 -10
  77. package/dist/index-B2v4uyQX.d.mts.map +1 -0
  78. package/dist/{index-dYgF03lE.d.mts → index-C3vE1yQQ.d.mts} +3 -3
  79. package/dist/{index-dYgF03lE.d.mts.map → index-C3vE1yQQ.d.mts.map} +1 -1
  80. package/dist/{index-BNcG0voG.d.mts → index-CCTIKKkR.d.mts} +43 -51
  81. package/dist/index-CCTIKKkR.d.mts.map +1 -0
  82. package/dist/{index-D3vGEYup.d.mts → index-CDQ9VTQD.d.mts} +25 -57
  83. package/dist/index-CDQ9VTQD.d.mts.map +1 -0
  84. package/dist/index-CIBMaST9.d.mts +226 -0
  85. package/dist/index-CIBMaST9.d.mts.map +1 -0
  86. package/dist/{index-D_OtYtsl.d.mts → index-CUxIAqIX.d.mts} +7 -4
  87. package/dist/index-CUxIAqIX.d.mts.map +1 -0
  88. package/dist/index-CXEZEWUs.d.mts +71 -0
  89. package/dist/index-CXEZEWUs.d.mts.map +1 -0
  90. package/dist/{index-DNEK9W6n.d.mts → index-CXYir3Gc.d.mts} +9 -4
  91. package/dist/index-CXYir3Gc.d.mts.map +1 -0
  92. package/dist/index-fTuf8tVH.d.mts.map +1 -1
  93. package/dist/{index-COokUToB.d.mts → index-mYHYXDnp.d.mts} +16 -4
  94. package/dist/index-mYHYXDnp.d.mts.map +1 -0
  95. package/dist/index.cjs +50 -40
  96. package/dist/index.d.mts +26 -13
  97. package/dist/index.d.mts.map +1 -0
  98. package/dist/index.mjs +13 -13
  99. package/dist/{init-BdZ-gqqk.cjs → init-Bcoo0dpO.cjs} +97 -41
  100. package/dist/init-Bcoo0dpO.cjs.map +1 -0
  101. package/dist/{init-DG7MxGxC.mjs → init-FN5UTd7_.mjs} +97 -41
  102. package/dist/init-FN5UTd7_.mjs.map +1 -0
  103. package/dist/init.cjs +1 -1
  104. package/dist/init.d.mts +1 -1
  105. package/dist/init.mjs +1 -1
  106. package/dist/layeredConfig-BKBQ56-v.cjs +267 -0
  107. package/dist/layeredConfig-BKBQ56-v.cjs.map +1 -0
  108. package/dist/layeredConfig-CrNhukCI.mjs +205 -0
  109. package/dist/layeredConfig-CrNhukCI.mjs.map +1 -0
  110. package/dist/layeredConfig.cjs +1 -1
  111. package/dist/layeredConfig.d.mts +2 -7
  112. package/dist/layeredConfig.mjs +1 -1
  113. package/dist/piConfig-Bq36PQFF.mjs.map +1 -1
  114. package/dist/piConfig-cluCie5i.cjs.map +1 -1
  115. package/dist/piContext.cjs +1 -1
  116. package/dist/piContext.d.mts +2 -2
  117. package/dist/piContext.mjs +1 -1
  118. package/dist/po-runtime-identity.json +1 -0
  119. package/dist/{majorModes-CLccNMZt.cjs → presetConfig-BkOUNRB6.cjs} +132 -113
  120. package/dist/presetConfig-BkOUNRB6.cjs.map +1 -0
  121. package/dist/{majorModes-B8Km83e1.mjs → presetConfig-CswBRvp4.mjs} +113 -100
  122. package/dist/presetConfig-CswBRvp4.mjs.map +1 -0
  123. package/dist/presets-BrkK8RXC.cjs +230 -0
  124. package/dist/presets-BrkK8RXC.cjs.map +1 -0
  125. package/dist/presets-D4EVBv1F.mjs +211 -0
  126. package/dist/presets-D4EVBv1F.mjs.map +1 -0
  127. package/dist/presets.cjs +17 -0
  128. package/dist/presets.d.mts +113 -0
  129. package/dist/presets.d.mts.map +1 -0
  130. package/dist/presets.mjs +4 -0
  131. package/dist/profiles-DwgWBBg6.mjs +1328 -0
  132. package/dist/profiles-DwgWBBg6.mjs.map +1 -0
  133. package/dist/profiles-ILyTd4_d.cjs +1517 -0
  134. package/dist/profiles-ILyTd4_d.cjs.map +1 -0
  135. package/dist/profiles.cjs +261 -1
  136. package/dist/profiles.cjs.map +1 -0
  137. package/dist/profiles.d.mts +95 -4
  138. package/dist/profiles.d.mts.map +1 -1
  139. package/dist/profiles.mjs +249 -1
  140. package/dist/profiles.mjs.map +1 -0
  141. package/dist/selectionSwitch.cjs +28 -29
  142. package/dist/selectionSwitch.cjs.map +1 -1
  143. package/dist/selectionSwitch.d.mts +11 -10
  144. package/dist/selectionSwitch.d.mts.map +1 -1
  145. package/dist/selectionSwitch.mjs +27 -28
  146. package/dist/selectionSwitch.mjs.map +1 -1
  147. package/dist/{sessionConfig-DFQF618G.mjs → sessionConfig-BZZ6_9Vg.mjs} +23 -15
  148. package/dist/sessionConfig-BZZ6_9Vg.mjs.map +1 -0
  149. package/dist/{sessionConfig-DeP6pplT.cjs → sessionConfig-Bm2aUxeM.cjs} +23 -15
  150. package/dist/sessionConfig-Bm2aUxeM.cjs.map +1 -0
  151. package/dist/settingsApi-B4kihcFn.mjs +478 -0
  152. package/dist/settingsApi-B4kihcFn.mjs.map +1 -0
  153. package/dist/settingsApi-Dr6B6fZj.cjs +483 -0
  154. package/dist/settingsApi-Dr6B6fZj.cjs.map +1 -0
  155. package/dist/{sync-CC_15kkB.d.mts → sync-8qbJf1Uu.d.mts} +11 -10
  156. package/dist/sync-8qbJf1Uu.d.mts.map +1 -0
  157. package/dist/sync-BJ8gCP9s.mjs.map +1 -1
  158. package/dist/sync-Dlxz2msM.cjs.map +1 -1
  159. package/dist/sync.cjs +18 -0
  160. package/dist/sync.d.mts +4 -0
  161. package/dist/sync.mjs +4 -0
  162. package/dist/types.d.mts +2 -2
  163. package/llms.txt +2 -2
  164. package/locales/vi.json +21 -0
  165. package/locales/zh-CN.json +21 -0
  166. package/package.json +30 -19
  167. package/src/prompts/help-how-to-config/SKILL.md +47 -0
  168. package/src/prompts/{po-author-config → help-how-to-config}/agents/openai.yaml +1 -1
  169. package/src/prompts/{po-author-config → help-how-to-config}/references/config-contract.md +109 -11
  170. package/dist/completion-Ba0TiBHa.d.mts.map +0 -1
  171. package/dist/config-Cdybp9rT.cjs +0 -155
  172. package/dist/config-Cdybp9rT.cjs.map +0 -1
  173. package/dist/config-Cxc2xw54.mjs +0 -112
  174. package/dist/config-Cxc2xw54.mjs.map +0 -1
  175. package/dist/config-pxC7FyUJ.d.mts.map +0 -1
  176. package/dist/configPolicy-CowlLhK1.cjs +0 -883
  177. package/dist/configPolicy-CowlLhK1.cjs.map +0 -1
  178. package/dist/configPolicy-DueX0k6i.mjs.map +0 -1
  179. package/dist/configWriter-DCASRzr-.mjs.map +0 -1
  180. package/dist/configWriter-DGO0gmXo.cjs.map +0 -1
  181. package/dist/core-B0Qg0Qq2.cjs +0 -224
  182. package/dist/core-B0Qg0Qq2.cjs.map +0 -1
  183. package/dist/core-DKWW9gkh.mjs +0 -139
  184. package/dist/core-DKWW9gkh.mjs.map +0 -1
  185. package/dist/domains-CiDUsRiX.cjs.map +0 -1
  186. package/dist/domains-IlieGHaY.mjs.map +0 -1
  187. package/dist/harnessState-8lZda_8r.mjs.map +0 -1
  188. package/dist/harnessState-BrmH0lG5.cjs.map +0 -1
  189. package/dist/harnessStore-BinxGITh.cjs.map +0 -1
  190. package/dist/harnessStore-w8zHmJ_H.mjs.map +0 -1
  191. package/dist/index-BNcG0voG.d.mts.map +0 -1
  192. package/dist/index-BTOU4XiI.d.mts.map +0 -1
  193. package/dist/index-COokUToB.d.mts.map +0 -1
  194. package/dist/index-D3vGEYup.d.mts.map +0 -1
  195. package/dist/index-DNEK9W6n.d.mts.map +0 -1
  196. package/dist/index-D_OtYtsl.d.mts.map +0 -1
  197. package/dist/index-Nbj2iQWw.d.mts +0 -75
  198. package/dist/index-Nbj2iQWw.d.mts.map +0 -1
  199. package/dist/index-nVcEC1jO.d.mts.map +0 -1
  200. package/dist/init-BdZ-gqqk.cjs.map +0 -1
  201. package/dist/init-DG7MxGxC.mjs.map +0 -1
  202. package/dist/layeredConfig-BbkoIEfM.mjs +0 -95
  203. package/dist/layeredConfig-BbkoIEfM.mjs.map +0 -1
  204. package/dist/layeredConfig-Bs18dXQG.cjs +0 -127
  205. package/dist/layeredConfig-Bs18dXQG.cjs.map +0 -1
  206. package/dist/layeredConfig.d.mts.map +0 -1
  207. package/dist/majorModes-B8Km83e1.mjs.map +0 -1
  208. package/dist/majorModes-CLccNMZt.cjs.map +0 -1
  209. package/dist/majorModes.cjs +0 -13
  210. package/dist/majorModes.d.mts +0 -2
  211. package/dist/majorModes.mjs +0 -1
  212. package/dist/profiles-CHict0x-.mjs +0 -704
  213. package/dist/profiles-CHict0x-.mjs.map +0 -1
  214. package/dist/profiles-CTrUCmIh.d.mts +0 -27
  215. package/dist/profiles-CTrUCmIh.d.mts.map +0 -1
  216. package/dist/profiles-t2EUj0aB.cjs +0 -809
  217. package/dist/profiles-t2EUj0aB.cjs.map +0 -1
  218. package/dist/sessionConfig-DFQF618G.mjs.map +0 -1
  219. package/dist/sessionConfig-DeP6pplT.cjs.map +0 -1
  220. package/dist/sync-CC_15kkB.d.mts.map +0 -1
  221. package/src/prompts/po-author-config/SKILL.md +0 -26
package/LICENSE CHANGED
@@ -1,149 +1,21 @@
1
- License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved.
2
- "Business Source License" is a trademark of MariaDB Corporation Ab.
3
-
4
- Parameters
5
-
6
- Licensor: Agimon Pty Ltd
7
- Licensed Work: Po, the software in the Po source repository and the
8
- packages released from it, in each version released by
9
- the Licensor.
10
- The Licensed Work is (c) 2026 Agimon Pty Ltd.
11
- Material identified as third-party in the "Third-party
12
- components" section at the end of this file or in a
13
- NOTICE file, and any package or directory whose own
14
- license file grants a different license, is not part of
15
- the Licensed Work and remains under its own license.
16
- Additional Use Grant: You may make production use of the Licensed Work if
17
- your use is Eligible Use. "Eligible Use" is production use that falls
18
- within at least one of the following:
19
-
20
- (a) Personal Use. Use by an individual for their own personal purposes,
21
- and not on behalf of, or for the benefit of, an employer, client, or
22
- other Organization. Use by an individual in the course of employment
23
- or engagement by an Organization is use by that Organization.
24
-
25
- (b) Small Organization Use. Use by or on behalf of an Organization whose
26
- Annual Revenue is less than USD 1,000,000.
27
-
28
- (c) Non-profit, Education and Research Use. Use, regardless of Annual
29
- Revenue, by (i) an Organization registered or recognized as a
30
- non-profit or charitable organization under the laws of its
31
- jurisdiction, for its non-profit purposes; (ii) an accredited school,
32
- college, or university, for teaching, learning, or academic research;
33
- or (iii) a publicly funded research institution, for its research.
34
-
35
- (d) Service Provider Use. Use by a consultant, contractor, agency, or other
36
- service provider, regardless of its own Annual Revenue, solely to
37
- build, deploy, host, operate, or support the Licensed Work for a client
38
- whose own use would be Eligible Use under (a), (b), or (c). A service
39
- provider's use for its own purposes is Eligible Use only if the service
40
- provider itself qualifies under (b) or (c).
41
-
42
-
43
- Hosted services. Offering the Licensed Work to third parties as a hosted
44
- or managed service whose primary value is the Licensed Work is Eligible
45
- Use only if each such third party's own use would be Eligible Use.
46
-
47
- Definitions. "Organization" means any company, partnership, sole
48
- proprietorship, trust, association, government body, or other entity, and
49
- includes an individual acting in a business or professional capacity.
50
- "Affiliate" means any entity that directly or indirectly controls, is
51
- controlled by, or is under common control with an Organization, where
52
- "control" means ownership of more than 50% of the voting interests of an
53
- entity or the power to direct its management and policies by contract or
54
- otherwise. "Annual Revenue" means the total gross revenue of an
55
- Organization and all of its Affiliates combined, from all sources and
56
- whether or not related to the Licensed Work, for its most recently
57
- completed fiscal year, or, if it has not completed a fiscal year, for the
58
- twelve months before the use (or since its formation, if shorter),
59
- converted into US dollars at the average exchange rate for that period.
60
- Proceeds of equity or debt financing are not revenue.
61
-
62
- Threshold. If an Organization stops qualifying under (b), its existing
63
- production use remains Eligible Use for 90 days after it stops
64
- qualifying, after which it must obtain a commercial license or stop
65
- production use. Use that was Eligible Use when it occurred never requires
66
- a commercial license after the fact.
67
- Change Date: Four years from the date a version of the Licensed Work
68
- is first publicly released by the Licensor.
69
- Change License: Apache License, Version 2.0
70
-
71
- For information about alternative licensing arrangements for the Licensed
72
- Work, please visit: https://agimon.ai/licensing
73
-
74
- Notice
75
-
76
- The Business Source License (this document, or the "License") is not an Open
77
- Source license. However, the Licensed Work will eventually be made available
78
- under an Open Source License, as stated in this License.
79
-
80
- -----------------------------------------------------------------------------
81
-
82
- Business Source License 1.1
83
-
84
- Terms
85
-
86
- The Licensor hereby grants you the right to copy, modify, create derivative
87
- works, redistribute, and make non-production use of the Licensed Work. The
88
- Licensor may make an Additional Use Grant, above, permitting limited
89
- production use.
90
-
91
- Effective on the Change Date, or the fourth anniversary of the first publicly
92
- available distribution of a specific version of the Licensed Work under this
93
- License, whichever comes first, the Licensor hereby grants you rights under
94
- the terms of the Change License, and the rights granted in the paragraph
95
- above terminate.
96
-
97
- If your use of the Licensed Work does not comply with the requirements
98
- currently in effect as described in this License, you must purchase a
99
- commercial license from the Licensor, its affiliated entities, or authorized
100
- resellers, or you must refrain from using the Licensed Work.
101
-
102
- All copies of the original and modified Licensed Work, and derivative works
103
- of the Licensed Work, are subject to this License. This License applies
104
- separately for each version of the Licensed Work and the Change Date may vary
105
- for each version of the Licensed Work released by Licensor.
106
-
107
- You must conspicuously display this License on each original or modified copy
108
- of the Licensed Work. If you receive the Licensed Work in original or
109
- modified form from a third party, the terms and conditions set forth in this
110
- License apply to your use of that work.
111
-
112
- Any use of the Licensed Work in violation of this License will automatically
113
- terminate your rights under this License for the current and all other
114
- versions of the Licensed Work.
115
-
116
- This License does not grant you any right in any trademark or logo of
117
- Licensor or its affiliates (provided that you may use a trademark or logo of
118
- Licensor as expressly required by this License).
119
-
120
- TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
121
- AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
122
- EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
123
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
124
- TITLE.
125
-
126
- MariaDB hereby grants you permission to use this License’s text to license
127
- your works, and to refer to it using the trademark “Business Source License”,
128
- as long as you comply with the Covenants of Licensor below.
129
-
130
- Covenants of Licensor
131
-
132
- In consideration of the right to use this License’s text and the “Business
133
- Source License” name and trademark, Licensor covenants to MariaDB, and to all
134
- other recipients of the licensed work to be provided by Licensor:
135
-
136
- 1. To specify as the Change License the GPL Version 2.0 or any later version,
137
- or a license that is compatible with GPL Version 2.0 or a later version,
138
- where “compatible” means that software provided under the Change License can
139
- be included in a program with software provided under GPL Version 2.0 or a
140
- later version. Licensor may specify additional Change Licenses without
141
- limitation.
142
-
143
- 2. To either: (a) specify an additional grant of rights to use that does not
144
- impose any additional restriction on the right granted in this License, as
145
- the Additional Use Grant; or (b) insert the text “None”.
146
-
147
- 3. To specify a Change Date.
148
-
149
- 4. Not to modify this License in any other way.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Agimon Pty Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
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 `po/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
- `PO_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 { PO_CONFIG_SERVICE, type PoConfigContext, requirePoConfigContext } from '@agimon-ai/po-config';
73
- import type { Context } from '@deepseek-ai/cordis';
74
-
75
- export function consumePoConfig(context: Context, consume: (snapshot: PoConfigContext) => void): void {
76
- context.inject([PO_CONFIG_SERVICE], (configContext) => {
77
- consume(requirePoConfigContext(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 server package 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 { loadPoConfig } from '@agimon-ai/po-config';
48
+ import { PO_CONFIG_SERVICE, requirePoConfigContext } from '@agimon-ai/po-config';
112
49
 
113
- const settings = loadPoConfig(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 `po/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
- Business Source License 1.1: free for personal use, organisations under USD 1M revenue, non-profits and education. See [LICENSE](LICENSE) and https://agimon.ai/licensing.
72
+ MIT. See [LICENSE](LICENSE).
@@ -377,6 +377,72 @@ function normalizeAgentPluginMcpSource(source, options) {
377
377
  return disabledResult(label, error);
378
378
  }
379
379
  }
380
+ const AGENT_PLUGIN_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json";
381
+ function isPlainObject(value) {
382
+ return typeof value === "object" && value !== null && !Array.isArray(value);
383
+ }
384
+ async function stablePluginIdentity(entry) {
385
+ const source = entry.source;
386
+ const identity = source?.type === "git" ? [
387
+ "git",
388
+ source.url,
389
+ source.path ?? ""
390
+ ] : source?.type === "npm" ? [
391
+ "npm",
392
+ source.registry ?? "",
393
+ source.package
394
+ ] : ["local", await node_fs.default.promises.realpath(entry.directory)];
395
+ return (0, node_crypto.createHash)("sha256").update(JSON.stringify(identity)).digest("hex");
396
+ }
397
+ async function rootAgentPluginSchema(entry) {
398
+ const manifestPath = node_path.default.join(entry.directory, "plugin.json");
399
+ if (entry.manifest?.path === manifestPath && entry.manifest.agentPluginSchema === AGENT_PLUGIN_SCHEMA) return AGENT_PLUGIN_SCHEMA;
400
+ try {
401
+ const stat = await node_fs.default.promises.lstat(manifestPath);
402
+ if (stat.isSymbolicLink() || !stat.isFile()) return void 0;
403
+ const parsed = JSON.parse(await node_fs.default.promises.readFile(manifestPath, "utf8"));
404
+ return isPlainObject(parsed) && parsed.$schema === AGENT_PLUGIN_SCHEMA ? AGENT_PLUGIN_SCHEMA : void 0;
405
+ } catch {
406
+ return;
407
+ }
408
+ }
409
+ /** One plugin's MCP config as a projection source, or nothing when it ships none. Shared by sync and settings. */
410
+ async function pluginMcpSource(entry, pluginDataRoot) {
411
+ if (entry.mcp === false) return void 0;
412
+ const pluginRoot = await node_fs.default.promises.realpath(entry.directory);
413
+ const agentPlugin = await rootAgentPluginSchema(entry) === AGENT_PLUGIN_SCHEMA;
414
+ const configPath = node_path.default.join(pluginRoot, agentPlugin ? "mcp.json" : ".mcp.json");
415
+ let stat;
416
+ try {
417
+ stat = await node_fs.default.promises.lstat(configPath);
418
+ } catch (error) {
419
+ if (error.code === "ENOENT") return void 0;
420
+ throw error;
421
+ }
422
+ if (!stat.isFile() || stat.isSymbolicLink()) return void 0;
423
+ const content = await node_fs.default.promises.readFile(configPath);
424
+ const contentDigest = (0, node_crypto.createHash)("sha256").update(content).digest("hex");
425
+ const pluginId = await stablePluginIdentity(entry);
426
+ const sourceId = `plugin:${pluginId}`;
427
+ if (!agentPlugin) return {
428
+ sourceId,
429
+ owner: "plugin",
430
+ format: "native",
431
+ configPath,
432
+ contentDigest
433
+ };
434
+ return {
435
+ sourceId,
436
+ owner: "plugin",
437
+ format: "agent-plugin-v1",
438
+ configPath,
439
+ contentDigest,
440
+ pluginId,
441
+ pluginRoot,
442
+ pluginDataDirectory: node_path.default.join(pluginDataRoot, pluginId),
443
+ mcpSchemaUrl: _agimon_ai_po_core_mcpProjection.AGENT_PLUGIN_MCP_SCHEMA_URL
444
+ };
445
+ }
380
446
  //#endregion
381
447
  //#region src/services/agentPluginMcp/index.ts
382
448
  async function realContainedPath(fs, root, candidate, label, context) {
@@ -497,5 +563,6 @@ async function normalizeAgentPluginMcpSourceAsync(fs, source, options, context)
497
563
  //#endregion
498
564
  exports.normalizeAgentPluginMcpSource = normalizeAgentPluginMcpSource;
499
565
  exports.normalizeAgentPluginMcpSourceAsync = normalizeAgentPluginMcpSourceAsync;
566
+ exports.pluginMcpSource = pluginMcpSource;
500
567
 
501
568
  //# sourceMappingURL=agentPluginMcp.cjs.map