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

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 +149 -21
  2. package/README.md +11 -11
  3. package/dist/agentPluginMcp.cjs +313 -134
  4. package/dist/agentPluginMcp.cjs.map +1 -1
  5. package/dist/agentPluginMcp.d.mts +22 -4
  6. package/dist/agentPluginMcp.d.mts.map +1 -1
  7. package/dist/agentPluginMcp.mjs +312 -134
  8. package/dist/agentPluginMcp.mjs.map +1 -1
  9. package/dist/apiContracts.cjs.map +1 -1
  10. package/dist/apiContracts.mjs.map +1 -1
  11. package/dist/atomicJson-D3MHqnLW.cjs +59 -0
  12. package/dist/atomicJson-D3MHqnLW.cjs.map +1 -0
  13. package/dist/atomicJson-Dj3rlZbD.mjs +40 -0
  14. package/dist/atomicJson-Dj3rlZbD.mjs.map +1 -0
  15. package/dist/atomicJson.cjs +4 -2
  16. package/dist/atomicJson.d.mts +2 -2
  17. package/dist/atomicJson.mjs +3 -2
  18. package/dist/{index-BT29GZx5.d.mts → completion-Ba0TiBHa.d.mts} +58 -27
  19. package/dist/completion-Ba0TiBHa.d.mts.map +1 -0
  20. package/dist/config-BBvn_ZLP.mjs +1 -0
  21. package/dist/config-Cdybp9rT.cjs +155 -0
  22. package/dist/config-Cdybp9rT.cjs.map +1 -0
  23. package/dist/config-Cxc2xw54.mjs +112 -0
  24. package/dist/config-Cxc2xw54.mjs.map +1 -0
  25. package/dist/{config-D2HbBLzo.d.mts → config-pxC7FyUJ.d.mts} +33 -33
  26. package/dist/config-pxC7FyUJ.d.mts.map +1 -0
  27. package/dist/config.cjs +21 -17
  28. package/dist/config.d.mts +3 -3
  29. package/dist/config.mjs +4 -3
  30. package/dist/{configPolicy-Ce1QKDxa.cjs → configPolicy-CowlLhK1.cjs} +99 -99
  31. package/dist/configPolicy-CowlLhK1.cjs.map +1 -0
  32. package/dist/{configPolicy-DCQgF5-f.mjs → configPolicy-DueX0k6i.mjs} +84 -84
  33. package/dist/configPolicy-DueX0k6i.mjs.map +1 -0
  34. package/dist/configSchema.d.mts +2 -2
  35. package/dist/configWriter-DCASRzr-.mjs +180 -0
  36. package/dist/configWriter-DCASRzr-.mjs.map +1 -0
  37. package/dist/configWriter-DGO0gmXo.cjs +218 -0
  38. package/dist/configWriter-DGO0gmXo.cjs.map +1 -0
  39. package/dist/configWriter.cjs +7 -4
  40. package/dist/configWriter.d.mts +2 -2
  41. package/dist/configWriter.mjs +1 -2
  42. package/dist/core-B0Qg0Qq2.cjs +224 -0
  43. package/dist/core-B0Qg0Qq2.cjs.map +1 -0
  44. package/dist/core-DKWW9gkh.mjs +139 -0
  45. package/dist/core-DKWW9gkh.mjs.map +1 -0
  46. package/dist/{domains-DGCb7uMC.cjs → domains-CiDUsRiX.cjs} +473 -171
  47. package/dist/domains-CiDUsRiX.cjs.map +1 -0
  48. package/dist/{domains-BroCVHrS.mjs → domains-IlieGHaY.mjs} +437 -170
  49. package/dist/domains-IlieGHaY.mjs.map +1 -0
  50. package/dist/domains.cjs +9 -3
  51. package/dist/domains.d.mts +3 -3
  52. package/dist/domains.mjs +3 -3
  53. package/dist/extensions/mcp-ui.mjs +1 -1
  54. package/dist/extensions/mcp-ui.mjs.map +1 -1
  55. package/dist/extensions/mcp.cjs +3 -3
  56. package/dist/extensions/mcp.cjs.map +1 -1
  57. package/dist/extensions/mcp.d.mts +1 -1
  58. package/dist/extensions/mcp.mjs +2 -2
  59. package/dist/extensions/mcp.mjs.map +1 -1
  60. package/dist/extensions/server.cjs +55 -47
  61. package/dist/extensions/server.cjs.map +1 -1
  62. package/dist/extensions/server.d.mts +2 -2
  63. package/dist/extensions/server.d.mts.map +1 -1
  64. package/dist/extensions/server.mjs +56 -48
  65. package/dist/extensions/server.mjs.map +1 -1
  66. package/dist/{harnessState-Dn_S7fB9.mjs → harnessState-8lZda_8r.mjs} +2 -2
  67. package/dist/{harnessState-Dn_S7fB9.mjs.map → harnessState-8lZda_8r.mjs.map} +1 -1
  68. package/dist/{harnessState-CCyBeutB.cjs → harnessState-BrmH0lG5.cjs} +2 -2
  69. package/dist/{harnessState-CCyBeutB.cjs.map → harnessState-BrmH0lG5.cjs.map} +1 -1
  70. package/dist/harnessState.cjs +1 -1
  71. package/dist/harnessState.d.mts +1 -1
  72. package/dist/harnessState.mjs +1 -2
  73. package/dist/{harnessStore-CJSxdSkV.cjs → harnessStore-BinxGITh.cjs} +189 -81
  74. package/dist/harnessStore-BinxGITh.cjs.map +1 -0
  75. package/dist/{harnessStore-CltwLB7M.mjs → harnessStore-w8zHmJ_H.mjs} +160 -82
  76. package/dist/harnessStore-w8zHmJ_H.mjs.map +1 -0
  77. package/dist/harnessStore.cjs +6 -1
  78. package/dist/harnessStore.d.mts +2 -2
  79. package/dist/harnessStore.mjs +1 -2
  80. package/dist/index-7RuIAWX1.d.mts +63 -0
  81. package/dist/index-7RuIAWX1.d.mts.map +1 -0
  82. package/dist/{index-CkDDvVQt.d.mts → index-BNcG0voG.d.mts} +61 -16
  83. package/dist/index-BNcG0voG.d.mts.map +1 -0
  84. package/dist/{index-Dy_-m7gx.d.mts → index-BTOU4XiI.d.mts} +3 -3
  85. package/dist/{index-Dy_-m7gx.d.mts.map → index-BTOU4XiI.d.mts.map} +1 -1
  86. package/dist/index-COokUToB.d.mts +83 -0
  87. package/dist/index-COokUToB.d.mts.map +1 -0
  88. package/dist/index-D3vGEYup.d.mts +135 -0
  89. package/dist/index-D3vGEYup.d.mts.map +1 -0
  90. package/dist/{index-Ch7ptOkW.d.mts → index-DNEK9W6n.d.mts} +26 -16
  91. package/dist/index-DNEK9W6n.d.mts.map +1 -0
  92. package/dist/index-D_OtYtsl.d.mts +37 -0
  93. package/dist/index-D_OtYtsl.d.mts.map +1 -0
  94. package/dist/{index-DNk4q0Qm.d.mts → index-Nbj2iQWw.d.mts} +19 -25
  95. package/dist/index-Nbj2iQWw.d.mts.map +1 -0
  96. package/dist/{index-CEUc7m16.d.mts → index-dYgF03lE.d.mts} +82 -32
  97. package/dist/index-dYgF03lE.d.mts.map +1 -0
  98. package/dist/index-fTuf8tVH.d.mts +34 -0
  99. package/dist/index-fTuf8tVH.d.mts.map +1 -0
  100. package/dist/index-nVcEC1jO.d.mts +62 -0
  101. package/dist/index-nVcEC1jO.d.mts.map +1 -0
  102. package/dist/index.cjs +81 -59
  103. package/dist/index.d.mts +16 -15
  104. package/dist/index.mjs +17 -15
  105. package/dist/{init-Cd3Ki6Ub.cjs → init-BdZ-gqqk.cjs} +209 -59
  106. package/dist/init-BdZ-gqqk.cjs.map +1 -0
  107. package/dist/{init-DVzhiCUE.mjs → init-DG7MxGxC.mjs} +187 -48
  108. package/dist/init-DG7MxGxC.mjs.map +1 -0
  109. package/dist/init.cjs +8 -6
  110. package/dist/init.d.mts +2 -2
  111. package/dist/init.mjs +1 -2
  112. package/dist/layeredConfig-BbkoIEfM.mjs +95 -0
  113. package/dist/layeredConfig-BbkoIEfM.mjs.map +1 -0
  114. package/dist/layeredConfig-Bs18dXQG.cjs +127 -0
  115. package/dist/layeredConfig-Bs18dXQG.cjs.map +1 -0
  116. package/dist/layeredConfig.cjs +5 -4
  117. package/dist/layeredConfig.d.mts +7 -2
  118. package/dist/layeredConfig.d.mts.map +1 -0
  119. package/dist/layeredConfig.mjs +1 -2
  120. package/dist/{majorModes-D1Itd8SN.mjs → majorModes-B8Km83e1.mjs} +130 -23
  121. package/dist/majorModes-B8Km83e1.mjs.map +1 -0
  122. package/dist/{majorModes-DnNSH9ZK.cjs → majorModes-CLccNMZt.cjs} +147 -22
  123. package/dist/majorModes-CLccNMZt.cjs.map +1 -0
  124. package/dist/majorModes.cjs +4 -1
  125. package/dist/majorModes.d.mts +2 -2
  126. package/dist/majorModes.mjs +1 -2
  127. package/dist/{piConfig-qGyCbcVj.mjs → piConfig-Bq36PQFF.mjs} +104 -69
  128. package/dist/piConfig-Bq36PQFF.mjs.map +1 -0
  129. package/dist/{piConfig-Bx26HMb_.d.mts → piConfig-C9rGUqPe.d.mts} +3 -3
  130. package/dist/{piConfig-Bx26HMb_.d.mts.map → piConfig-C9rGUqPe.d.mts.map} +1 -1
  131. package/dist/{piConfig-CCBdZXQr.cjs → piConfig-cluCie5i.cjs} +122 -70
  132. package/dist/piConfig-cluCie5i.cjs.map +1 -0
  133. package/dist/piConfig.cjs +4 -1
  134. package/dist/piConfig.d.mts +2 -2
  135. package/dist/piConfig.mjs +1 -2
  136. package/dist/piContext.cjs +27 -16
  137. package/dist/piContext.d.mts +3 -3
  138. package/dist/piContext.mjs +1 -2
  139. package/dist/{profiles-DBcYg5nA.mjs → profiles-CHict0x-.mjs} +322 -101
  140. package/dist/profiles-CHict0x-.mjs.map +1 -0
  141. package/dist/{profiles-tpplXY4r.cjs → profiles-t2EUj0aB.cjs} +359 -102
  142. package/dist/profiles-t2EUj0aB.cjs.map +1 -0
  143. package/dist/profiles.cjs +7 -1
  144. package/dist/profiles.d.mts +27 -3
  145. package/dist/profiles.d.mts.map +1 -1
  146. package/dist/profiles.mjs +1 -2
  147. package/dist/selectionSwitch.cjs +88 -22
  148. package/dist/selectionSwitch.cjs.map +1 -1
  149. package/dist/selectionSwitch.d.mts +40 -18
  150. package/dist/selectionSwitch.d.mts.map +1 -1
  151. package/dist/selectionSwitch.mjs +85 -22
  152. package/dist/selectionSwitch.mjs.map +1 -1
  153. package/dist/{sessionConfig-DV5xTRRw.mjs → sessionConfig-DFQF618G.mjs} +48 -47
  154. package/dist/sessionConfig-DFQF618G.mjs.map +1 -0
  155. package/dist/{sessionConfig-Bf6xHWLd.cjs → sessionConfig-DeP6pplT.cjs} +74 -85
  156. package/dist/sessionConfig-DeP6pplT.cjs.map +1 -0
  157. package/dist/sync-BJ8gCP9s.mjs +29 -0
  158. package/dist/sync-BJ8gCP9s.mjs.map +1 -0
  159. package/dist/sync-CC_15kkB.d.mts +46 -0
  160. package/dist/sync-CC_15kkB.d.mts.map +1 -0
  161. package/dist/sync-Dlxz2msM.cjs +37 -0
  162. package/dist/sync-Dlxz2msM.cjs.map +1 -0
  163. package/dist/types.cjs +2 -2
  164. package/dist/types.d.mts +2 -2
  165. package/dist/types.mjs +1 -2
  166. package/llms.txt +1 -1
  167. package/package.json +16 -16
  168. package/src/prompts/po-author-config/SKILL.md +4 -4
  169. package/src/prompts/po-author-config/agents/openai.yaml +1 -1
  170. package/src/prompts/po-author-config/references/config-contract.md +5 -5
  171. package/dist/atomicJson-1W0WhuFF.mjs +0 -44
  172. package/dist/atomicJson-1W0WhuFF.mjs.map +0 -1
  173. package/dist/atomicJson-Dt2z_DXl.cjs +0 -52
  174. package/dist/atomicJson-Dt2z_DXl.cjs.map +0 -1
  175. package/dist/config-CfTb0_9G.cjs +0 -219
  176. package/dist/config-CfTb0_9G.cjs.map +0 -1
  177. package/dist/config-D2HbBLzo.d.mts.map +0 -1
  178. package/dist/config-DoQWSt1V.mjs +0 -162
  179. package/dist/config-DoQWSt1V.mjs.map +0 -1
  180. package/dist/config-NSHRd6na.mjs +0 -2
  181. package/dist/configPolicy-Ce1QKDxa.cjs.map +0 -1
  182. package/dist/configPolicy-DCQgF5-f.mjs.map +0 -1
  183. package/dist/configWriter-B7uO8MuN.cjs +0 -150
  184. package/dist/configWriter-B7uO8MuN.cjs.map +0 -1
  185. package/dist/configWriter-DUtLgOlD.mjs +0 -130
  186. package/dist/configWriter-DUtLgOlD.mjs.map +0 -1
  187. package/dist/domains-BroCVHrS.mjs.map +0 -1
  188. package/dist/domains-DGCb7uMC.cjs.map +0 -1
  189. package/dist/harnessStore-CJSxdSkV.cjs.map +0 -1
  190. package/dist/harnessStore-CltwLB7M.mjs.map +0 -1
  191. package/dist/index-78zvoS9s.d.mts +0 -35
  192. package/dist/index-78zvoS9s.d.mts.map +0 -1
  193. package/dist/index-BT29GZx5.d.mts.map +0 -1
  194. package/dist/index-C6GaYjq-.d.mts +0 -6
  195. package/dist/index-C6GaYjq-.d.mts.map +0 -1
  196. package/dist/index-CEUc7m16.d.mts.map +0 -1
  197. package/dist/index-CRcoVYXz.d.mts +0 -39
  198. package/dist/index-CRcoVYXz.d.mts.map +0 -1
  199. package/dist/index-CVlciCJF.d.mts +0 -40
  200. package/dist/index-CVlciCJF.d.mts.map +0 -1
  201. package/dist/index-Ch7ptOkW.d.mts.map +0 -1
  202. package/dist/index-CkDDvVQt.d.mts.map +0 -1
  203. package/dist/index-Cvdt-Y-i.d.mts +0 -66
  204. package/dist/index-Cvdt-Y-i.d.mts.map +0 -1
  205. package/dist/index-DNk4q0Qm.d.mts.map +0 -1
  206. package/dist/index-DdH0w56b.d.mts +0 -116
  207. package/dist/index-DdH0w56b.d.mts.map +0 -1
  208. package/dist/init-Cd3Ki6Ub.cjs.map +0 -1
  209. package/dist/init-DVzhiCUE.mjs.map +0 -1
  210. package/dist/layeredConfig-fukqN2EA.mjs +0 -67
  211. package/dist/layeredConfig-fukqN2EA.mjs.map +0 -1
  212. package/dist/layeredConfig-ol0274TN.cjs +0 -94
  213. package/dist/layeredConfig-ol0274TN.cjs.map +0 -1
  214. package/dist/majorModes-D1Itd8SN.mjs.map +0 -1
  215. package/dist/majorModes-DnNSH9ZK.cjs.map +0 -1
  216. package/dist/piConfig-CCBdZXQr.cjs.map +0 -1
  217. package/dist/piConfig-qGyCbcVj.mjs.map +0 -1
  218. package/dist/profiles-DBcYg5nA.mjs.map +0 -1
  219. package/dist/profiles-tpplXY4r.cjs.map +0 -1
  220. package/dist/sessionConfig-Bf6xHWLd.cjs.map +0 -1
  221. package/dist/sessionConfig-DV5xTRRw.mjs.map +0 -1
@@ -1,30 +1,22 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
- const require_config = require("./config-CfTb0_9G.cjs");
2
+ const require_core = require("./core-B0Qg0Qq2.cjs");
3
+ require("./config-Cdybp9rT.cjs");
4
+ let node_path = require("node:path");
5
+ node_path = require_rolldown_runtime.__toESM(node_path, 1);
6
+ let _agimon_ai_po_core_platform = require("@agimon-ai/po-core/platform");
3
7
  let node_crypto = require("node:crypto");
4
8
  let node_fs = require("node:fs");
5
9
  node_fs = require_rolldown_runtime.__toESM(node_fs, 1);
6
- let node_path = require("node:path");
7
- node_path = require_rolldown_runtime.__toESM(node_path, 1);
8
- let node_os = require("node:os");
9
- node_os = require_rolldown_runtime.__toESM(node_os, 1);
10
- //#region src/services/init/index.ts
11
- const PRIVATE_DIRECTORY_MODE = 448;
12
- const PRIVATE_FILE_MODE = 384;
13
- const REPOSITORY_DIRECTORY_MODE = 493;
14
- const REPOSITORY_FILE_MODE = 420;
15
- const DOOM_DIRECTORY = ".po";
16
- const UTF8_ENCODING = "utf8";
17
- const FILE_ALREADY_EXISTS = "EEXIST";
18
- const FILE_NOT_FOUND = "ENOENT";
10
+ //#region src/services/init/templates.ts
19
11
  /** The global seed files are processed in this fixed order. */
20
- const GLOBAL_DOOM_SEED_FILES = [
12
+ const GLOBAL_PO_SEED_FILES = [
21
13
  "config.yaml",
22
14
  "modes.yaml",
23
15
  "domains.yaml",
24
16
  "profiles.yaml"
25
17
  ];
26
- /** Portable defaults for a new global Doom configuration directory. */
27
- const DOOM_CONFIG_TEMPLATES = {
18
+ /** Portable defaults for a new global Po configuration directory. */
19
+ const PO_CONFIG_TEMPLATES = {
28
20
  "config.yaml": `projectTrust: ask
29
21
 
30
22
  # Autonomous voice is opt-in and uses an explicitly configured Pi model.
@@ -32,14 +24,14 @@ const DOOM_CONFIG_TEMPLATES = {
32
24
  # autoCapture:
33
25
  # model: provider/model-id
34
26
  # startPhrases:
35
- # - hey doom
27
+ # - hey po
36
28
  # stopPhrases:
37
29
  # - stop speaking
38
30
  # utteranceIdleMs: 3000
39
31
  # # Long prompts only: open a draft, keep talking, then send it in one piece.
40
32
  # # Short utterances are delivered as you finish them and need no phrase.
41
33
  # composeOpenPhrases:
42
- # - hey doom
34
+ # - hey po
43
35
  # composeSendPhrases:
44
36
  # - that's it
45
37
  # composeCancelPhrases:
@@ -92,9 +84,13 @@ default:
92
84
  - '@agimon-ai/po-autocompact'
93
85
  - '@agimon-ai/po-loop'
94
86
  - '@agimon-ai/po-plan'
87
+ - '@agimon-ai/po-author'
88
+ - '@agimon-ai/po-computer-use'
95
89
  - '@agimon-ai/po-workflow'
96
90
  - '@agimon-ai/po-log'
97
91
  - '@agimon-ai/po-mcp'
92
+ - '@agimon-ai/po-prompt'
93
+ - '@agimon-ai/po-template-advanced'
98
94
  - '@agimon-ai/po-template-elegant'
99
95
  layers:
100
96
  team:
@@ -114,6 +110,27 @@ layers:
114
110
  task:
115
111
  packages:
116
112
  - '@agimon-ai/po-task'
113
+ sandbox:
114
+ packages:
115
+ - '@agimon-ai/po-sandbox'
116
+ design:
117
+ packages:
118
+ - '@agimon-ai/po-style-system'
119
+ llm:
120
+ packages:
121
+ - '@agimon-ai/po-model-guidance'
122
+ source-control:
123
+ packages:
124
+ - '@agimon-ai/po-git'
125
+ image-gen:
126
+ packages:
127
+ - '@agimon-ai/po-image-gen'
128
+ web-search:
129
+ packages:
130
+ - '@agimon-ai/po-web-search'
131
+ browser:
132
+ packages:
133
+ - '@agimon-ai/po-browse'
117
134
  # A major mode explains when it should be used and names its ordered layers.
118
135
  # Add another entry under majorMode, then select it with
119
136
  # po --major-mode <name>. Change defaultMajorMode to make it the default.
@@ -121,10 +138,13 @@ defaultMajorMode: copilot
121
138
  majorMode:
122
139
  minimal:
123
140
  description: Lean mode with Team delegation and persistent tasks.
124
- layers: [team, task]
141
+ layers: [team, task, llm]
125
142
  copilot:
126
- description: General-purpose coding mode with Team delegation, persistent tasks, supervised commands, and structured user feedback.
127
- layers: [team, ask-user, task]
143
+ description: General-purpose coding mode with delegation, persistent tasks, supervised commands, and structured user feedback.
144
+ layers: [team, ask-user, task, sandbox, llm, source-control, design, image-gen, web-search, browser]
145
+ examples:
146
+ description: Layer-free base mode for the repository's plugin and workflow examples.
147
+ layers: []
128
148
  # review:
129
149
  # description: Focused review mode for inspecting changes and reporting risks.
130
150
  # layers: [team, task, ask-user]
@@ -204,13 +224,13 @@ profiles:
204
224
  # env:
205
225
  # BRAND: acme
206
226
  # TONE: concise
207
- # Doom Pi concatenates profile.md, SOUL.md, then AGENTS.md for the persona.
227
+ # Po Pi concatenates profile.md, SOUL.md, then AGENTS.md for the persona.
208
228
  # Select one with: po --profile writer
209
229
  `
210
230
  };
211
- /** Standalone defaults for a repository that is trying Po through DPI. */
212
- const REPOSITORY_DOOM_CONFIG_TEMPLATES = {
213
- "config.yaml": DOOM_CONFIG_TEMPLATES["config.yaml"],
231
+ /** Standalone defaults for a repository that is trying Po through Po. */
232
+ const REPOSITORY_PO_CONFIG_TEMPLATES = {
233
+ "config.yaml": PO_CONFIG_TEMPLATES["config.yaml"],
214
234
  "modes.yaml": `# Repository-local layers and major modes. These entries override personal
215
235
  # entries with the same name from ~/.po/modes.yaml.
216
236
  # This repository-local default replaces the personal top-level default as one
@@ -229,9 +249,13 @@ default:
229
249
  - '@agimon-ai/po-autocompact'
230
250
  - '@agimon-ai/po-loop'
231
251
  - '@agimon-ai/po-plan'
252
+ - '@agimon-ai/po-author'
253
+ - '@agimon-ai/po-computer-use'
232
254
  - '@agimon-ai/po-workflow'
233
255
  - '@agimon-ai/po-log'
234
256
  - '@agimon-ai/po-mcp'
257
+ - '@agimon-ai/po-prompt'
258
+ - '@agimon-ai/po-template-advanced'
235
259
  - '@agimon-ai/po-template-elegant'
236
260
  layers:
237
261
  team:
@@ -243,14 +267,38 @@ layers:
243
267
  task:
244
268
  packages:
245
269
  - '@agimon-ai/po-task'
270
+ sandbox:
271
+ packages:
272
+ - '@agimon-ai/po-sandbox'
273
+ design:
274
+ packages:
275
+ - '@agimon-ai/po-style-system'
276
+ llm:
277
+ packages:
278
+ - '@agimon-ai/po-model-guidance'
279
+ source-control:
280
+ packages:
281
+ - '@agimon-ai/po-git'
282
+ image-gen:
283
+ packages:
284
+ - '@agimon-ai/po-image-gen'
285
+ web-search:
286
+ packages:
287
+ - '@agimon-ai/po-web-search'
288
+ browser:
289
+ packages:
290
+ - '@agimon-ai/po-browse'
246
291
  defaultMajorMode: copilot
247
292
  majorMode:
248
293
  minimal:
249
294
  description: Lean mode with Team delegation and persistent tasks.
250
- layers: [team, task]
295
+ layers: [team, task, llm]
251
296
  copilot:
252
297
  description: General-purpose coding mode with delegation, persistent tasks, supervised commands, and structured user feedback.
253
- layers: [team, ask-user, task]
298
+ layers: [team, ask-user, task, sandbox, llm, source-control, design, image-gen, web-search, browser]
299
+ examples:
300
+ description: Layer-free base mode for the repository's plugin and workflow examples.
301
+ layers: []
254
302
  `,
255
303
  "domains.yaml": `# Repository-local plugin catalog and domain selection.
256
304
  defaultDomains: [default]
@@ -269,12 +317,17 @@ profiles:
269
317
  entries: {}
270
318
  `
271
319
  };
320
+ //#endregion
321
+ //#region src/services/init/sync.ts
322
+ const UTF8_ENCODING = "utf8";
323
+ const FILE_ALREADY_EXISTS = "EEXIST";
324
+ const FILE_NOT_FOUND = "ENOENT";
272
325
  function errorCode(error) {
273
326
  if (!(error instanceof Error)) return void 0;
274
327
  const code = error.code;
275
328
  return typeof code === "string" ? code : void 0;
276
329
  }
277
- function ensureDirectory(directory, mode) {
330
+ function ensureDirectory$1(directory, mode) {
278
331
  let stats;
279
332
  try {
280
333
  stats = node_fs.default.lstatSync(directory);
@@ -289,13 +342,13 @@ function ensureDirectory(directory, mode) {
289
342
  }
290
343
  }
291
344
  if (stats.isSymbolicLink()) throw new Error(`Refusing to initialize through symlinked directory: ${directory}`);
292
- if (!stats.isDirectory()) throw new Error(`Doom config path is not a directory: ${directory}`);
345
+ if (!stats.isDirectory()) throw new Error(`Po config path is not a directory: ${directory}`);
293
346
  }
294
- function ensureDoomDirectory(directory, mode) {
295
- ensureDirectory(node_path.default.dirname(directory), mode);
296
- ensureDirectory(directory, mode);
347
+ function ensurePoDirectory(directory, mode) {
348
+ ensureDirectory$1(node_path.default.dirname(directory), mode);
349
+ ensureDirectory$1(directory, mode);
297
350
  }
298
- function classifyTarget(targetPath) {
351
+ function classifyTarget$1(targetPath) {
299
352
  let stats;
300
353
  try {
301
354
  stats = node_fs.default.lstatSync(targetPath);
@@ -307,9 +360,9 @@ function classifyTarget(targetPath) {
307
360
  if (stats.isSymbolicLink()) try {
308
361
  if (node_fs.default.statSync(targetPath).isFile()) return "file";
309
362
  } catch (error) {
310
- throw new Error(`Doom config seed symlink is not file-like: ${targetPath}`, { cause: error });
363
+ throw new Error(`Po config seed symlink is not file-like: ${targetPath}`, { cause: error });
311
364
  }
312
- throw new Error(`Doom config seed path is not file-like: ${targetPath}`);
365
+ throw new Error(`Po config seed path is not file-like: ${targetPath}`);
313
366
  }
314
367
  function cleanupTemporaryFile(temporaryPath) {
315
368
  try {
@@ -319,7 +372,7 @@ function cleanupTemporaryFile(temporaryPath) {
319
372
  }
320
373
  }
321
374
  function publishExclusively(targetPath, content, mode) {
322
- const temporaryPath = `${targetPath}.${process.pid}.${(0, node_crypto.randomUUID)()}.tmp`;
375
+ const temporaryPath = `${targetPath}.${_agimon_ai_po_core_platform.nodeHost.processId()}.${(0, node_crypto.randomUUID)()}.tmp`;
323
376
  let fileDescriptor;
324
377
  try {
325
378
  fileDescriptor = node_fs.default.openSync(temporaryPath, "wx", mode);
@@ -333,7 +386,7 @@ function publishExclusively(targetPath, content, mode) {
333
386
  node_fs.default.linkSync(temporaryPath, targetPath);
334
387
  return true;
335
388
  } catch (error) {
336
- if (errorCode(error) === FILE_ALREADY_EXISTS && classifyTarget(targetPath) === "file") return false;
389
+ if (errorCode(error) === FILE_ALREADY_EXISTS && classifyTarget$1(targetPath) === "file") return false;
337
390
  throw error;
338
391
  }
339
392
  } finally {
@@ -353,7 +406,7 @@ function publishExclusively(targetPath, content, mode) {
353
406
  * the link rather than writing through it.
354
407
  */
355
408
  function publishForcefully(targetPath, content, mode) {
356
- const temporaryPath = `${targetPath}.${process.pid}.${(0, node_crypto.randomUUID)()}.tmp`;
409
+ const temporaryPath = `${targetPath}.${_agimon_ai_po_core_platform.nodeHost.processId()}.${(0, node_crypto.randomUUID)()}.tmp`;
357
410
  let fileDescriptor;
358
411
  try {
359
412
  fileDescriptor = node_fs.default.openSync(temporaryPath, "wx", mode);
@@ -373,14 +426,14 @@ function publishForcefully(targetPath, content, mode) {
373
426
  cleanupTemporaryFile(temporaryPath);
374
427
  }
375
428
  }
376
- function initializeDoomConfig(directory, templates, options, directoryMode, fileMode) {
377
- ensureDoomDirectory(directory, directoryMode);
429
+ function initializePoConfig$1(directory, templates, options, directoryMode, fileMode) {
430
+ ensurePoDirectory(directory, directoryMode);
378
431
  const created = [];
379
432
  const preserved = [];
380
433
  const replaced = [];
381
- for (const fileName of GLOBAL_DOOM_SEED_FILES) {
434
+ for (const fileName of GLOBAL_PO_SEED_FILES) {
382
435
  const targetPath = node_path.default.join(directory, fileName);
383
- const existed = classifyTarget(targetPath) === "file";
436
+ const existed = classifyTarget$1(targetPath) === "file";
384
437
  if (options.force) {
385
438
  publishForcefully(targetPath, templates[fileName], fileMode);
386
439
  (existed ? replaced : created).push(fileName);
@@ -404,45 +457,142 @@ function initializeDoomConfig(directory, templates, options, directoryMode, file
404
457
  * Fills missing global seed files.
405
458
  *
406
459
  * Existing files are left alone so that re-running init never discards
460
+ * hand-edited config; pass `force` to overwrite them from the template. A new
461
+ * file is published with an exclusive hard link, so a concurrent writer in
462
+ * another process never loses its file to this one.
463
+ *
464
+ * @deprecated Node-only sync shim; use initializeGlobalPoConfigAsync. Removed in M2.
465
+ */
466
+ function initializeGlobalPoConfig(homeDirectory = _agimon_ai_po_core_platform.nodeHost.homeDirectory(), options = {}) {
467
+ return initializePoConfig$1(require_core.globalPoConfigDirectory(homeDirectory), PO_CONFIG_TEMPLATES, options, 448, 384);
468
+ }
469
+ /**
470
+ * Seeds repository-local configuration without creating or changing Pi settings.
471
+ *
472
+ * @deprecated Node-only sync shim; use initializeRepositoryPoConfigAsync. Removed in M2.
473
+ */
474
+ function initializeRepositoryPoConfig(repositoryRoot = process.cwd(), options = {}) {
475
+ return initializePoConfig$1(node_path.default.join(node_path.default.resolve(repositoryRoot), ".po"), REPOSITORY_PO_CONFIG_TEMPLATES, options, 493, 420);
476
+ }
477
+ //#endregion
478
+ //#region src/services/init/index.ts
479
+ /** Seed writes in this process are queued per file, so a check and its write are not interleaved. */
480
+ const seedWrites = (0, _agimon_ai_po_core_platform.createSerialRunner)();
481
+ async function ensureDirectory(fs, directory, mode, context) {
482
+ let info = await fs.fileInfo(directory, context);
483
+ if (!info.ok && info.error.code === "not_found") {
484
+ if ((await fs.createDir(directory, { recursive: false }, context)).ok) await _agimon_ai_po_core_platform.nodeHost.setMode(directory, mode);
485
+ info = await fs.fileInfo(directory, context);
486
+ }
487
+ const kind = (0, _agimon_ai_po_core_platform.getOrThrow)(info).kind;
488
+ if (kind === "symlink") throw new Error(`Refusing to initialize through symlinked directory: ${directory}`);
489
+ if (kind !== "directory") throw new Error(`Po config path is not a directory: ${directory}`);
490
+ }
491
+ async function classifyTarget(fs, targetPath, context) {
492
+ const info = await fs.fileInfo(targetPath, context);
493
+ if (!info.ok && info.error.code === "not_found") return "missing";
494
+ const kind = (0, _agimon_ai_po_core_platform.getOrThrow)(info).kind;
495
+ if (kind === "file") return "file";
496
+ if (kind === "symlink") try {
497
+ const target = (0, _agimon_ai_po_core_platform.getOrThrow)(await fs.canonicalPath(targetPath, context));
498
+ if ((0, _agimon_ai_po_core_platform.getOrThrow)(await fs.fileInfo(target, context)).kind === "file") return "file";
499
+ } catch (error) {
500
+ throw new Error(`Po config seed symlink is not file-like: ${targetPath}`, { cause: error });
501
+ }
502
+ throw new Error(`Po config seed path is not file-like: ${targetPath}`);
503
+ }
504
+ async function publish(fs, targetPath, content, mode, context) {
505
+ await (0, _agimon_ai_po_core_platform.writeFileAtomic)(fs, targetPath, content, context);
506
+ await _agimon_ai_po_core_platform.nodeHost.setMode(targetPath, mode);
507
+ }
508
+ /**
509
+ * Fills one seed directory over a FileSystem.
510
+ *
511
+ * Without `force`, a missing file is checked and written inside one queued step
512
+ * per file. The FileSystem has no exclusive create, so a second process writing
513
+ * the same new file at the same instant can be overwritten; the Node-only sync
514
+ * shim keeps its hard-link publication for that case.
515
+ */
516
+ async function initializePoConfig(fs, directory, templates, options, directoryMode, fileMode, context) {
517
+ await ensureDirectory(fs, node_path.default.dirname(directory), directoryMode, context);
518
+ await ensureDirectory(fs, directory, directoryMode, context);
519
+ const created = [];
520
+ const preserved = [];
521
+ const replaced = [];
522
+ for (const fileName of GLOBAL_PO_SEED_FILES) {
523
+ const targetPath = node_path.default.join(directory, fileName);
524
+ await seedWrites.forKey(node_path.default.resolve(targetPath))(async () => {
525
+ const existed = await classifyTarget(fs, targetPath, context) === "file";
526
+ if (existed && !options.force) {
527
+ preserved.push(fileName);
528
+ return;
529
+ }
530
+ await publish(fs, targetPath, templates[fileName], fileMode, context);
531
+ (existed ? replaced : created).push(fileName);
532
+ });
533
+ }
534
+ return {
535
+ directory,
536
+ created,
537
+ preserved,
538
+ replaced
539
+ };
540
+ }
541
+ /**
542
+ * Fills missing global seed files over a FileSystem.
543
+ *
544
+ * Existing files are left alone so that re-running init never discards
407
545
  * hand-edited config; pass `force` to overwrite them from the template.
408
546
  */
409
- function initializeGlobalDoomConfig(homeDirectory = node_os.default.homedir(), options = {}) {
410
- return initializeDoomConfig(require_config.globalDoomConfigDirectory(homeDirectory), DOOM_CONFIG_TEMPLATES, options, PRIVATE_DIRECTORY_MODE, PRIVATE_FILE_MODE);
547
+ function initializeGlobalPoConfigAsync(fs, context, homeDirectory = _agimon_ai_po_core_platform.nodeHost.homeDirectory(), options = {}) {
548
+ return initializePoConfig(fs, require_core.globalPoConfigDirectory(homeDirectory), PO_CONFIG_TEMPLATES, options, 448, 384, context);
411
549
  }
412
- /** Seeds repository-local configuration without creating or changing Pi settings. */
413
- function initializeRepositoryDoomConfig(repositoryRoot = process.cwd(), options = {}) {
414
- return initializeDoomConfig(node_path.default.join(node_path.default.resolve(repositoryRoot), DOOM_DIRECTORY), REPOSITORY_DOOM_CONFIG_TEMPLATES, options, REPOSITORY_DIRECTORY_MODE, REPOSITORY_FILE_MODE);
550
+ /** Seeds repository-local configuration over a FileSystem without creating or changing Pi settings. */
551
+ function initializeRepositoryPoConfigAsync(fs, repositoryRoot, context, options = {}) {
552
+ return initializePoConfig(fs, node_path.default.join(node_path.default.resolve(repositoryRoot), ".po"), REPOSITORY_PO_CONFIG_TEMPLATES, options, 493, 420, context);
415
553
  }
416
554
  //#endregion
417
- Object.defineProperty(exports, "DOOM_CONFIG_TEMPLATES", {
555
+ Object.defineProperty(exports, "GLOBAL_PO_SEED_FILES", {
556
+ enumerable: true,
557
+ get: function() {
558
+ return GLOBAL_PO_SEED_FILES;
559
+ }
560
+ });
561
+ Object.defineProperty(exports, "PO_CONFIG_TEMPLATES", {
562
+ enumerable: true,
563
+ get: function() {
564
+ return PO_CONFIG_TEMPLATES;
565
+ }
566
+ });
567
+ Object.defineProperty(exports, "REPOSITORY_PO_CONFIG_TEMPLATES", {
418
568
  enumerable: true,
419
569
  get: function() {
420
- return DOOM_CONFIG_TEMPLATES;
570
+ return REPOSITORY_PO_CONFIG_TEMPLATES;
421
571
  }
422
572
  });
423
- Object.defineProperty(exports, "GLOBAL_DOOM_SEED_FILES", {
573
+ Object.defineProperty(exports, "initializeGlobalPoConfig", {
424
574
  enumerable: true,
425
575
  get: function() {
426
- return GLOBAL_DOOM_SEED_FILES;
576
+ return initializeGlobalPoConfig;
427
577
  }
428
578
  });
429
- Object.defineProperty(exports, "REPOSITORY_DOOM_CONFIG_TEMPLATES", {
579
+ Object.defineProperty(exports, "initializeGlobalPoConfigAsync", {
430
580
  enumerable: true,
431
581
  get: function() {
432
- return REPOSITORY_DOOM_CONFIG_TEMPLATES;
582
+ return initializeGlobalPoConfigAsync;
433
583
  }
434
584
  });
435
- Object.defineProperty(exports, "initializeGlobalDoomConfig", {
585
+ Object.defineProperty(exports, "initializeRepositoryPoConfig", {
436
586
  enumerable: true,
437
587
  get: function() {
438
- return initializeGlobalDoomConfig;
588
+ return initializeRepositoryPoConfig;
439
589
  }
440
590
  });
441
- Object.defineProperty(exports, "initializeRepositoryDoomConfig", {
591
+ Object.defineProperty(exports, "initializeRepositoryPoConfigAsync", {
442
592
  enumerable: true,
443
593
  get: function() {
444
- return initializeRepositoryDoomConfig;
594
+ return initializeRepositoryPoConfigAsync;
445
595
  }
446
596
  });
447
597
 
448
- //# sourceMappingURL=init-Cd3Ki6Ub.cjs.map
598
+ //# sourceMappingURL=init-BdZ-gqqk.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-BdZ-gqqk.cjs","names":["ensureDirectory","fs","path","classifyTarget","nodeHost","randomUUID","initializePoConfig","globalPoConfigDirectory","createSerialRunner","nodeHost","getOrThrow","writeFileAtomic","path","globalPoConfigDirectory"],"sources":["../src/services/init/templates.ts","../src/services/init/sync.ts","../src/services/init/index.ts"],"sourcesContent":["export const PRIVATE_DIRECTORY_MODE = 0o700;\nexport const PRIVATE_FILE_MODE = 0o600;\nexport const REPOSITORY_DIRECTORY_MODE = 0o755;\nexport const REPOSITORY_FILE_MODE = 0o644;\nexport const PO_DIRECTORY = '.po';\n\n/** The global seed files are processed in this fixed order. */\nexport const GLOBAL_PO_SEED_FILES = ['config.yaml', 'modes.yaml', 'domains.yaml', 'profiles.yaml'] as const;\n\nexport type PoSeedFile = (typeof GLOBAL_PO_SEED_FILES)[number];\n\n/** Portable defaults for a new global Po configuration directory. */\nexport const PO_CONFIG_TEMPLATES: Readonly<Record<PoSeedFile, string>> = {\n 'config.yaml': `projectTrust: ask\n\n# Autonomous voice is opt-in and uses an explicitly configured Pi model.\n# voice:\n# autoCapture:\n# model: provider/model-id\n# startPhrases:\n# - hey po\n# stopPhrases:\n# - stop speaking\n# utteranceIdleMs: 3000\n# # Long prompts only: open a draft, keep talking, then send it in one piece.\n# # Short utterances are delivered as you finish them and need no phrase.\n# composeOpenPhrases:\n# - hey po\n# composeSendPhrases:\n# - that's it\n# composeCancelPhrases:\n# - scratch that\n# # Endpoint window while a draft collects, so a short command lands on its own.\n# composeUtteranceIdleMs: 1200\n# # Silence before Voice reminds you a draft is open. 0 turns the reminder off.\n# composeNudgeMs: 10000\n# tts:\n# engine: macos-say\n# voice: Samantha\n# rate: 190\n`,\n 'modes.yaml': `# A layer is a reusable named bundle of packages, built-in or local extensions,\n# and hook groups. Major modes below choose which layers load together for a session.\n#\n# Layers and modes defined here apply to every repository. A repository's own\n# .po/modes.yaml is read after this file and replaces any layer or mode of the\n# same name, so a repository can override one entry without restating the rest.\n#\n# Add a layer by giving it a unique name under layers. Local Pi scripts belong\n# under extensions, while installed Pi packages belong under packages:\n# review-tools:\n# extensions:\n# - './extensions/local-review.ts'\n# packages:\n# - '@scope/review-extension'\n# A bare extension name selects a Po built-in. A path beginning with ./ or\n# ../ loads a custom script or extension directory. A bare package loads its\n# ordered package.json pi.extensions entries, while an exported subpath selects\n# one adapter. Relative paths resolve beside this file here (~/.po), or\n# from the repository root in .po/modes.yaml.\n#\n# Use a package mapping when that package accepts configuration. Configuration\n# belongs under the package entry that consumes it, not beside packages.\n# The top-level default bundle loads before every major mode. Replace this whole\n# packages list to customize the distribution defaults. Po core packages\n# remain active independently of this list.\ndefault:\n packages:\n - '@agimon-ai/po-help'\n - '@agimon-ai/po-hook'\n - '@agimon-ai/po-goal'\n - '@agimon-ai/po-voice'\n - '@agimon-ai/po-runner'\n - '@agimon-ai/po-read'\n - '@agimon-ai/po-grep'\n - '@agimon-ai/po-edit'\n - '@agimon-ai/po-file-edit'\n - '@agimon-ai/po-autocompact'\n - '@agimon-ai/po-loop'\n - '@agimon-ai/po-plan'\n - '@agimon-ai/po-author'\n - '@agimon-ai/po-computer-use'\n - '@agimon-ai/po-workflow'\n - '@agimon-ai/po-log'\n - '@agimon-ai/po-mcp'\n - '@agimon-ai/po-prompt'\n - '@agimon-ai/po-template-advanced'\n - '@agimon-ai/po-template-elegant'\nlayers:\n team:\n packages:\n - name: '@agimon-ai/po-team'\n # Optional Team configuration. Uncomment and choose models available to Pi.\n # config:\n # models:\n # - model: openai-codex/gpt-5.6-luna\n # thinking: xhigh\n # # Tool names excluded from subagents launched by this package. These\n # # remove model-visible tools while preserving hidden team transport.\n # excludeTools: [ask_user_question, intercom, subagent]\n ask-user:\n packages:\n - '@agimon-ai/po-user-feedback'\n task:\n packages:\n - '@agimon-ai/po-task'\n sandbox:\n packages:\n - '@agimon-ai/po-sandbox'\n design:\n packages:\n - '@agimon-ai/po-style-system'\n llm:\n packages:\n - '@agimon-ai/po-model-guidance'\n source-control:\n packages:\n - '@agimon-ai/po-git'\n image-gen:\n packages:\n - '@agimon-ai/po-image-gen'\n web-search:\n packages:\n - '@agimon-ai/po-web-search'\n browser:\n packages:\n - '@agimon-ai/po-browse'\n# A major mode explains when it should be used and names its ordered layers.\n# Add another entry under majorMode, then select it with\n# po --major-mode <name>. Change defaultMajorMode to make it the default.\ndefaultMajorMode: copilot\nmajorMode:\n minimal:\n description: Lean mode with Team delegation and persistent tasks.\n layers: [team, task, llm]\n copilot:\n description: General-purpose coding mode with delegation, persistent tasks, supervised commands, and structured user feedback.\n layers: [team, ask-user, task, sandbox, llm, source-control, design, image-gen, web-search, browser]\n examples:\n description: Layer-free base mode for the repository's plugin and workflow examples.\n layers: []\n # review:\n # description: Focused review mode for inspecting changes and reporting risks.\n # layers: [team, task, ask-user]\n`,\n 'domains.yaml': `# Plugins are named once in this catalog, then selected by one or more domains.\n# Po automatically inspects personal and repository Codex marketplaces.\n# Each configured root may also be a folder whose direct children are plugins;\n# use roots: [plugins] to discover a repository plugin folder without one entry\n# per plugin. Discovery never scans recursively.\ndefaultDomains: [default]\nplugins:\n roots: []\n entries: {}\n # Local paths resolve beside this file in ~/.po. Repository paths in a\n # repository .po/domains.yaml resolve from that repository root.\n # entries:\n # development:\n # source: local\n # path: plugins/development\n # remote-review:\n # source: url\n # url: https://github.com/acme/review-plugin.git\n # ref: v1.2.0\n # published-review:\n # source: npm\n # package: '@acme/review-plugin'\n # version: 1.2.0\n# Domains carry descriptions and refer to catalog names, not filesystem paths.\ndomains:\n default:\n description: Shared skills and repository MCP only.\n plugins: []\n # development:\n # description: TypeScript implementation and review tools.\n # plugins:\n # - development\n # # Mapping form can load only selected resources from a shared plugin.\n # - name: remote-review\n # skills: [typescript]\n # agents: [reviewer]\n # hooks: false\n # mcp: true\n # # Set false only when this domain should omit shared .claude/skills.\n # sharedSkills: false\n # # Domain mcp is an allowlist over servers configured elsewhere, not a\n # # request to start new ones. Listing servers here drops the tool schemas\n # # of the ones left out, usually the largest context saving a domain can\n # # make. Run po --explain to see the token cost before and after.\n # # Filtering applies only when every selected domain declares mcp, so a\n # # selection mixing this with a domain that omits it stays unfiltered.\n # mcp:\n # servers: [code-intel]\n # proxy: [repository-search]\n# Select it with po --domains development, or add it to defaultDomains.\n#\n# Aliases let one selection enable multiple domains. Replace the empty mapping\n# below with entries like the commented example.\naliases: {}\n# aliases:\n# work: [default, development]\n`,\n 'profiles.yaml': `# Profiles select a persona and optional environment defaults for a session.\n# Each configured root may itself be a profile or contain direct-child profile\n# folders. A folder is discovered when it contains profile.md, SOUL.md, or\n# AGENTS.md; discovery never scans recursively.\nprofiles:\n roots: []\n entries: {}\n # Roots resolve beside this file in ~/.po. Repository roots in a\n # repository .po/profiles.yaml resolve from that repository root.\n # roots: [agents/acme]\n # Explicit entries override an automatically discovered folder of the same\n # name. Environment values must be strings; already exported values win.\n # entries:\n # writer:\n # persona: agents/special/writer\n # env:\n # BRAND: acme\n # TONE: concise\n# Po Pi concatenates profile.md, SOUL.md, then AGENTS.md for the persona.\n# Select one with: po --profile writer\n`,\n};\n\n/** Standalone defaults for a repository that is trying Po through Po. */\nexport const REPOSITORY_PO_CONFIG_TEMPLATES: Readonly<Record<PoSeedFile, string>> = {\n 'config.yaml': PO_CONFIG_TEMPLATES['config.yaml'],\n 'modes.yaml': `# Repository-local layers and major modes. These entries override personal\n# entries with the same name from ~/.po/modes.yaml.\n# This repository-local default replaces the personal top-level default as one\n# whole package list. Edit it to customize the standalone package baseline.\ndefault:\n packages:\n - '@agimon-ai/po-help'\n - '@agimon-ai/po-hook'\n - '@agimon-ai/po-goal'\n - '@agimon-ai/po-voice'\n - '@agimon-ai/po-runner'\n - '@agimon-ai/po-read'\n - '@agimon-ai/po-grep'\n - '@agimon-ai/po-edit'\n - '@agimon-ai/po-file-edit'\n - '@agimon-ai/po-autocompact'\n - '@agimon-ai/po-loop'\n - '@agimon-ai/po-plan'\n - '@agimon-ai/po-author'\n - '@agimon-ai/po-computer-use'\n - '@agimon-ai/po-workflow'\n - '@agimon-ai/po-log'\n - '@agimon-ai/po-mcp'\n - '@agimon-ai/po-prompt'\n - '@agimon-ai/po-template-advanced'\n - '@agimon-ai/po-template-elegant'\nlayers:\n team:\n packages:\n - name: '@agimon-ai/po-team'\n ask-user:\n packages:\n - '@agimon-ai/po-user-feedback'\n task:\n packages:\n - '@agimon-ai/po-task'\n sandbox:\n packages:\n - '@agimon-ai/po-sandbox'\n design:\n packages:\n - '@agimon-ai/po-style-system'\n llm:\n packages:\n - '@agimon-ai/po-model-guidance'\n source-control:\n packages:\n - '@agimon-ai/po-git'\n image-gen:\n packages:\n - '@agimon-ai/po-image-gen'\n web-search:\n packages:\n - '@agimon-ai/po-web-search'\n browser:\n packages:\n - '@agimon-ai/po-browse'\ndefaultMajorMode: copilot\nmajorMode:\n minimal:\n description: Lean mode with Team delegation and persistent tasks.\n layers: [team, task, llm]\n copilot:\n description: General-purpose coding mode with delegation, persistent tasks, supervised commands, and structured user feedback.\n layers: [team, ask-user, task, sandbox, llm, source-control, design, image-gen, web-search, browser]\n examples:\n description: Layer-free base mode for the repository's plugin and workflow examples.\n layers: []\n`,\n 'domains.yaml': `# Repository-local plugin catalog and domain selection.\ndefaultDomains: [default]\nplugins:\n roots: []\n entries: {}\ndomains:\n default:\n description: Shared skills and repository MCP only.\n plugins: []\naliases: {}\n`,\n 'profiles.yaml': `# Repository-local persona roots and environment defaults.\nprofiles:\n roots: []\n entries: {}\n`,\n};\n\n/** Result of filling a Po seed directory. File arrays contain names in seed order. */\nexport interface GlobalPoInitResult {\n directory: string;\n created: string[];\n preserved: string[];\n /** Existing files overwritten from the template. Only ever non-empty under `force`. */\n replaced: string[];\n}\n\nexport interface GlobalPoInitOptions {\n /**\n * Overwrite existing seed files instead of preserving them.\n *\n * Off by default: init is safe to re-run, and hand-edited config is the\n * normal case rather than the exception.\n */\n force?: boolean;\n}\n\nexport type RepositoryPoInitOptions = GlobalPoInitOptions;\nexport type RepositoryPoInitResult = GlobalPoInitResult;\n","import { randomUUID } from 'node:crypto';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport { nodeHost } from '@agimon-ai/po-core/platform';\n\nimport { globalPoConfigDirectory } from '../config';\nimport {\n PO_CONFIG_TEMPLATES,\n PO_DIRECTORY,\n GLOBAL_PO_SEED_FILES,\n PRIVATE_DIRECTORY_MODE,\n PRIVATE_FILE_MODE,\n REPOSITORY_DIRECTORY_MODE,\n REPOSITORY_PO_CONFIG_TEMPLATES,\n REPOSITORY_FILE_MODE,\n type PoSeedFile,\n type GlobalPoInitOptions,\n type GlobalPoInitResult,\n type RepositoryPoInitOptions,\n type RepositoryPoInitResult,\n} from './templates';\n\nconst UTF8_ENCODING = 'utf8';\nconst FILE_ALREADY_EXISTS = 'EEXIST';\nconst FILE_NOT_FOUND = 'ENOENT';\n\nfunction errorCode(error: unknown): string | undefined {\n if (!(error instanceof Error)) return undefined;\n const code = (error as NodeJS.ErrnoException).code;\n return typeof code === 'string' ? code : undefined;\n}\n\nfunction ensureDirectory(directory: string, mode: number): void {\n let stats: fs.Stats;\n try {\n stats = fs.lstatSync(directory);\n } catch (error) {\n if (errorCode(error) !== FILE_NOT_FOUND) throw error;\n try {\n fs.mkdirSync(directory, { mode });\n stats = fs.lstatSync(directory);\n } catch (mkdirError) {\n if (errorCode(mkdirError) !== FILE_ALREADY_EXISTS) throw mkdirError;\n stats = fs.lstatSync(directory);\n }\n }\n\n if (stats.isSymbolicLink()) {\n throw new Error(`Refusing to initialize through symlinked directory: ${directory}`);\n }\n if (!stats.isDirectory()) {\n throw new Error(`Po config path is not a directory: ${directory}`);\n }\n}\n\nfunction ensurePoDirectory(directory: string, mode: number): void {\n ensureDirectory(path.dirname(directory), mode);\n ensureDirectory(directory, mode);\n}\n\nfunction classifyTarget(targetPath: string): 'missing' | 'file' {\n let stats: fs.Stats;\n try {\n stats = fs.lstatSync(targetPath);\n } catch (error) {\n if (errorCode(error) === FILE_NOT_FOUND) return 'missing';\n throw error;\n }\n\n if (stats.isFile()) return 'file';\n if (stats.isSymbolicLink()) {\n try {\n if (fs.statSync(targetPath).isFile()) return 'file';\n } catch (error) {\n throw new Error(`Po config seed symlink is not file-like: ${targetPath}`, { cause: error });\n }\n }\n throw new Error(`Po config seed path is not file-like: ${targetPath}`);\n}\n\nfunction cleanupTemporaryFile(temporaryPath: string): void {\n try {\n fs.unlinkSync(temporaryPath);\n } catch (error) {\n if (errorCode(error) !== FILE_NOT_FOUND) throw error;\n }\n}\n\nfunction publishExclusively(targetPath: string, content: string, mode: number): boolean {\n const temporaryPath = `${targetPath}.${nodeHost.processId()}.${randomUUID()}.tmp`;\n let fileDescriptor: number | undefined;\n try {\n fileDescriptor = fs.openSync(temporaryPath, 'wx', mode);\n fs.writeFileSync(fileDescriptor, content, UTF8_ENCODING);\n fs.fchmodSync(fileDescriptor, mode);\n fs.fsyncSync(fileDescriptor);\n const descriptorToClose = fileDescriptor;\n fileDescriptor = undefined;\n fs.closeSync(descriptorToClose);\n\n try {\n fs.linkSync(temporaryPath, targetPath);\n return true;\n } catch (error) {\n if (errorCode(error) === FILE_ALREADY_EXISTS && classifyTarget(targetPath) === 'file') return false;\n throw error;\n }\n } finally {\n if (fileDescriptor !== undefined) {\n const descriptorToClose = fileDescriptor;\n fileDescriptor = undefined;\n fs.closeSync(descriptorToClose);\n }\n cleanupTemporaryFile(temporaryPath);\n }\n}\n\n/**\n * Replaces a seed file with the template, atomically.\n *\n * The rename swaps the directory entry in one step, so a reader either sees the\n * whole old file or the whole new one. Renaming onto a symlinked seed replaces\n * the link rather than writing through it.\n */\nfunction publishForcefully(targetPath: string, content: string, mode: number): void {\n const temporaryPath = `${targetPath}.${nodeHost.processId()}.${randomUUID()}.tmp`;\n let fileDescriptor: number | undefined;\n try {\n fileDescriptor = fs.openSync(temporaryPath, 'wx', mode);\n fs.writeFileSync(fileDescriptor, content, UTF8_ENCODING);\n fs.fchmodSync(fileDescriptor, mode);\n fs.fsyncSync(fileDescriptor);\n const descriptorToClose = fileDescriptor;\n fileDescriptor = undefined;\n fs.closeSync(descriptorToClose);\n\n fs.renameSync(temporaryPath, targetPath);\n } finally {\n if (fileDescriptor !== undefined) {\n const descriptorToClose = fileDescriptor;\n fileDescriptor = undefined;\n fs.closeSync(descriptorToClose);\n }\n cleanupTemporaryFile(temporaryPath);\n }\n}\n\nfunction initializePoConfig(\n directory: string,\n templates: Readonly<Record<PoSeedFile, string>>,\n options: GlobalPoInitOptions,\n directoryMode: number,\n fileMode: number,\n): GlobalPoInitResult {\n ensurePoDirectory(directory, directoryMode);\n\n const created: string[] = [];\n const preserved: string[] = [];\n const replaced: string[] = [];\n for (const fileName of GLOBAL_PO_SEED_FILES) {\n const targetPath = path.join(directory, fileName);\n const existed = classifyTarget(targetPath) === 'file';\n\n if (options.force) {\n publishForcefully(targetPath, templates[fileName], fileMode);\n (existed ? replaced : created).push(fileName);\n continue;\n }\n if (existed) {\n preserved.push(fileName);\n continue;\n }\n if (publishExclusively(targetPath, templates[fileName], fileMode)) created.push(fileName);\n else preserved.push(fileName);\n }\n\n return { directory, created, preserved, replaced };\n}\n\n/**\n * Fills missing global seed files.\n *\n * Existing files are left alone so that re-running init never discards\n * hand-edited config; pass `force` to overwrite them from the template. A new\n * file is published with an exclusive hard link, so a concurrent writer in\n * another process never loses its file to this one.\n *\n * @deprecated Node-only sync shim; use initializeGlobalPoConfigAsync. Removed in M2.\n */\nexport function initializeGlobalPoConfig(\n homeDirectory = nodeHost.homeDirectory(),\n options: GlobalPoInitOptions = {},\n): GlobalPoInitResult {\n return initializePoConfig(\n globalPoConfigDirectory(homeDirectory),\n PO_CONFIG_TEMPLATES,\n options,\n PRIVATE_DIRECTORY_MODE,\n PRIVATE_FILE_MODE,\n );\n}\n\n/**\n * Seeds repository-local configuration without creating or changing Pi settings.\n *\n * @deprecated Node-only sync shim; use initializeRepositoryPoConfigAsync. Removed in M2.\n */\nexport function initializeRepositoryPoConfig(\n repositoryRoot = process.cwd(),\n options: RepositoryPoInitOptions = {},\n): RepositoryPoInitResult {\n return initializePoConfig(\n path.join(path.resolve(repositoryRoot), PO_DIRECTORY),\n REPOSITORY_PO_CONFIG_TEMPLATES,\n options,\n REPOSITORY_DIRECTORY_MODE,\n REPOSITORY_FILE_MODE,\n );\n}\n","import path from 'node:path';\n\nimport {\n createSerialRunner,\n getOrThrow,\n nodeHost,\n writeFileAtomic,\n type FileSystem,\n} from '@agimon-ai/po-core/platform';\n\nimport { globalPoConfigDirectory } from '../config';\nimport {\n PO_CONFIG_TEMPLATES,\n PO_DIRECTORY,\n GLOBAL_PO_SEED_FILES,\n PRIVATE_DIRECTORY_MODE,\n PRIVATE_FILE_MODE,\n REPOSITORY_DIRECTORY_MODE,\n REPOSITORY_PO_CONFIG_TEMPLATES,\n REPOSITORY_FILE_MODE,\n type PoSeedFile,\n type GlobalPoInitOptions,\n type GlobalPoInitResult,\n type RepositoryPoInitOptions,\n type RepositoryPoInitResult,\n} from './templates';\n\ntype IoContext = Parameters<FileSystem['readTextFile']>[1];\n\nexport {\n PO_CONFIG_TEMPLATES,\n GLOBAL_PO_SEED_FILES,\n REPOSITORY_PO_CONFIG_TEMPLATES,\n type GlobalPoInitOptions,\n type GlobalPoInitResult,\n type RepositoryPoInitOptions,\n type RepositoryPoInitResult,\n} from './templates';\nexport { initializeGlobalPoConfig, initializeRepositoryPoConfig } from './sync';\n\n/** Seed writes in this process are queued per file, so a check and its write are not interleaved. */\nconst seedWrites = createSerialRunner();\n\nasync function ensureDirectory(fs: FileSystem, directory: string, mode: number, context: IoContext): Promise<void> {\n let info = await fs.fileInfo(directory, context);\n if (!info.ok && info.error.code === 'not_found') {\n const created = await fs.createDir(directory, { recursive: false }, context);\n if (created.ok) await nodeHost.setMode(directory, mode);\n info = await fs.fileInfo(directory, context);\n }\n const kind = getOrThrow(info).kind;\n if (kind === 'symlink') throw new Error(`Refusing to initialize through symlinked directory: ${directory}`);\n if (kind !== 'directory') throw new Error(`Po config path is not a directory: ${directory}`);\n}\n\nasync function classifyTarget(fs: FileSystem, targetPath: string, context: IoContext): Promise<'missing' | 'file'> {\n const info = await fs.fileInfo(targetPath, context);\n if (!info.ok && info.error.code === 'not_found') return 'missing';\n const kind = getOrThrow(info).kind;\n if (kind === 'file') return 'file';\n if (kind === 'symlink') {\n try {\n const target = getOrThrow(await fs.canonicalPath(targetPath, context));\n if (getOrThrow(await fs.fileInfo(target, context)).kind === 'file') return 'file';\n } catch (error) {\n throw new Error(`Po config seed symlink is not file-like: ${targetPath}`, { cause: error });\n }\n }\n throw new Error(`Po config seed path is not file-like: ${targetPath}`);\n}\n\nasync function publish(fs: FileSystem, targetPath: string, content: string, mode: number, context: IoContext) {\n await writeFileAtomic(fs, targetPath, content, context);\n await nodeHost.setMode(targetPath, mode);\n}\n\n/**\n * Fills one seed directory over a FileSystem.\n *\n * Without `force`, a missing file is checked and written inside one queued step\n * per file. The FileSystem has no exclusive create, so a second process writing\n * the same new file at the same instant can be overwritten; the Node-only sync\n * shim keeps its hard-link publication for that case.\n */\nasync function initializePoConfig(\n fs: FileSystem,\n directory: string,\n templates: Readonly<Record<PoSeedFile, string>>,\n options: GlobalPoInitOptions,\n directoryMode: number,\n fileMode: number,\n context: IoContext,\n): Promise<GlobalPoInitResult> {\n await ensureDirectory(fs, path.dirname(directory), directoryMode, context);\n await ensureDirectory(fs, directory, directoryMode, context);\n\n const created: string[] = [];\n const preserved: string[] = [];\n const replaced: string[] = [];\n for (const fileName of GLOBAL_PO_SEED_FILES) {\n const targetPath = path.join(directory, fileName);\n await seedWrites.forKey(path.resolve(targetPath))(async () => {\n const existed = (await classifyTarget(fs, targetPath, context)) === 'file';\n if (existed && !options.force) {\n preserved.push(fileName);\n return;\n }\n await publish(fs, targetPath, templates[fileName], fileMode, context);\n (existed ? replaced : created).push(fileName);\n });\n }\n return { directory, created, preserved, replaced };\n}\n\n/**\n * Fills missing global seed files over a FileSystem.\n *\n * Existing files are left alone so that re-running init never discards\n * hand-edited config; pass `force` to overwrite them from the template.\n */\nexport function initializeGlobalPoConfigAsync(\n fs: FileSystem,\n context: IoContext,\n homeDirectory = nodeHost.homeDirectory(),\n options: GlobalPoInitOptions = {},\n): Promise<GlobalPoInitResult> {\n return initializePoConfig(\n fs,\n globalPoConfigDirectory(homeDirectory),\n PO_CONFIG_TEMPLATES,\n options,\n PRIVATE_DIRECTORY_MODE,\n PRIVATE_FILE_MODE,\n context,\n );\n}\n\n/** Seeds repository-local configuration over a FileSystem without creating or changing Pi settings. */\nexport function initializeRepositoryPoConfigAsync(\n fs: FileSystem,\n repositoryRoot: string,\n context: IoContext,\n options: RepositoryPoInitOptions = {},\n): Promise<RepositoryPoInitResult> {\n return initializePoConfig(\n fs,\n path.join(path.resolve(repositoryRoot), PO_DIRECTORY),\n REPOSITORY_PO_CONFIG_TEMPLATES,\n options,\n REPOSITORY_DIRECTORY_MODE,\n REPOSITORY_FILE_MODE,\n context,\n );\n}\n"],"mappings":";;;;;;;;;;;AAOA,MAAa,uBAAuB;CAAC;CAAe;CAAc;CAAgB;AAAe;;AAKjG,MAAa,sBAA4D;CACvE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Bf,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwGd,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDhB,iBAAiB;;;;;;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