@zihanw/pi-forge 0.4.1 → 0.5.1

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 (372) hide show
  1. package/CHANGELOG.md +79 -1
  2. package/README.md +12 -11
  3. package/README.zh-CN.md +3 -5
  4. package/SUBAGENT_ADAPTER_CONTRACT.md +3 -1
  5. package/dist/agent-profile.d.ts +18 -62
  6. package/dist/agent-profile.d.ts.map +1 -1
  7. package/dist/agent-profile.js +27 -249
  8. package/dist/agent-profile.js.map +1 -1
  9. package/dist/codecs/agent-profile.d.ts +53 -0
  10. package/dist/codecs/agent-profile.d.ts.map +1 -0
  11. package/dist/codecs/agent-profile.js +176 -0
  12. package/dist/codecs/agent-profile.js.map +1 -0
  13. package/dist/codecs/index.d.ts +5 -0
  14. package/dist/codecs/index.d.ts.map +1 -0
  15. package/dist/codecs/index.js +3 -0
  16. package/dist/codecs/index.js.map +1 -0
  17. package/dist/codecs/prompt-stack.d.ts +18 -0
  18. package/dist/codecs/prompt-stack.d.ts.map +1 -0
  19. package/dist/codecs/prompt-stack.js +479 -0
  20. package/dist/codecs/prompt-stack.js.map +1 -0
  21. package/dist/compile-cycle.d.ts +18 -0
  22. package/dist/compile-cycle.d.ts.map +1 -0
  23. package/dist/compile-cycle.js +13 -0
  24. package/dist/compile-cycle.js.map +1 -0
  25. package/dist/compiler.d.ts +10 -4
  26. package/dist/compiler.d.ts.map +1 -1
  27. package/dist/compiler.js +53 -19
  28. package/dist/compiler.js.map +1 -1
  29. package/dist/context-diff-history.d.ts +61 -0
  30. package/dist/context-diff-history.d.ts.map +1 -0
  31. package/dist/context-diff-history.js +84 -0
  32. package/dist/context-diff-history.js.map +1 -0
  33. package/dist/context-diff-snapshot.d.ts +19 -0
  34. package/dist/context-diff-snapshot.d.ts.map +1 -0
  35. package/dist/context-diff-snapshot.js +146 -0
  36. package/dist/context-diff-snapshot.js.map +1 -0
  37. package/dist/context-diff.d.ts +70 -0
  38. package/dist/context-diff.d.ts.map +1 -0
  39. package/dist/context-diff.js +259 -0
  40. package/dist/context-diff.js.map +1 -0
  41. package/dist/extension-registry.d.ts.map +1 -1
  42. package/dist/extension-registry.js +5 -2
  43. package/dist/extension-registry.js.map +1 -1
  44. package/dist/forge-config.d.ts +0 -105
  45. package/dist/forge-config.d.ts.map +1 -1
  46. package/dist/forge-config.js +1 -313
  47. package/dist/forge-config.js.map +1 -1
  48. package/dist/forge-v1/analyzer.d.ts +3 -0
  49. package/dist/forge-v1/analyzer.d.ts.map +1 -0
  50. package/dist/forge-v1/analyzer.js +50 -0
  51. package/dist/forge-v1/analyzer.js.map +1 -0
  52. package/dist/forge-v1/index.d.ts +6 -0
  53. package/dist/forge-v1/index.d.ts.map +1 -0
  54. package/dist/forge-v1/index.js +13 -0
  55. package/dist/forge-v1/index.js.map +1 -0
  56. package/dist/forge-v1/parser.d.ts +3 -0
  57. package/dist/forge-v1/parser.d.ts.map +1 -0
  58. package/dist/forge-v1/parser.js +186 -0
  59. package/dist/forge-v1/parser.js.map +1 -0
  60. package/dist/forge-v1/renderer.d.ts +9 -0
  61. package/dist/forge-v1/renderer.d.ts.map +1 -0
  62. package/dist/forge-v1/renderer.js +181 -0
  63. package/dist/forge-v1/renderer.js.map +1 -0
  64. package/dist/forge-v1/types.d.ts +87 -0
  65. package/dist/forge-v1/types.d.ts.map +1 -0
  66. package/dist/forge-v1/types.js +4 -0
  67. package/dist/forge-v1/types.js.map +1 -0
  68. package/dist/index.d.ts +12 -12
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +54 -83
  71. package/dist/index.js.map +1 -1
  72. package/dist/lifecycle.d.ts +8 -5
  73. package/dist/lifecycle.d.ts.map +1 -1
  74. package/dist/lifecycle.js +45 -112
  75. package/dist/lifecycle.js.map +1 -1
  76. package/dist/loader.d.ts +5 -8
  77. package/dist/loader.d.ts.map +1 -1
  78. package/dist/loader.js +10 -467
  79. package/dist/loader.js.map +1 -1
  80. package/dist/macro-engine.d.ts +9 -14
  81. package/dist/macro-engine.d.ts.map +1 -1
  82. package/dist/macro-engine.js +5 -238
  83. package/dist/macro-engine.js.map +1 -1
  84. package/dist/payload-capture.d.ts +10 -0
  85. package/dist/payload-capture.d.ts.map +1 -1
  86. package/dist/payload-capture.js +39 -9
  87. package/dist/payload-capture.js.map +1 -1
  88. package/dist/payload-command.d.ts +8 -6
  89. package/dist/payload-command.d.ts.map +1 -1
  90. package/dist/payload-command.js +36 -6
  91. package/dist/payload-command.js.map +1 -1
  92. package/dist/payload-state.d.ts +19 -0
  93. package/dist/payload-state.d.ts.map +1 -0
  94. package/dist/payload-state.js +19 -0
  95. package/dist/payload-state.js.map +1 -0
  96. package/dist/preset-command.d.ts +4 -4
  97. package/dist/preset-command.d.ts.map +1 -1
  98. package/dist/preset-command.js +33 -104
  99. package/dist/preset-command.js.map +1 -1
  100. package/dist/preview.d.ts +4 -4
  101. package/dist/preview.d.ts.map +1 -1
  102. package/dist/preview.js +34 -11
  103. package/dist/preview.js.map +1 -1
  104. package/dist/profile-command.d.ts +2 -2
  105. package/dist/profile-command.d.ts.map +1 -1
  106. package/dist/profile-command.js +15 -14
  107. package/dist/profile-command.js.map +1 -1
  108. package/dist/profile-service.d.ts.map +1 -1
  109. package/dist/profile-service.js +23 -39
  110. package/dist/profile-service.js.map +1 -1
  111. package/dist/prompt-analysis.d.ts +24 -0
  112. package/dist/prompt-analysis.d.ts.map +1 -0
  113. package/dist/prompt-analysis.js +84 -0
  114. package/dist/prompt-analysis.js.map +1 -0
  115. package/dist/prompt-runtime.d.ts +19 -0
  116. package/dist/prompt-runtime.d.ts.map +1 -0
  117. package/dist/prompt-runtime.js +30 -0
  118. package/dist/prompt-runtime.js.map +1 -0
  119. package/dist/regex.js +6 -12
  120. package/dist/regex.js.map +1 -1
  121. package/dist/render-helpers.d.ts +2 -10
  122. package/dist/render-helpers.d.ts.map +1 -1
  123. package/dist/render-helpers.js +3 -53
  124. package/dist/render-helpers.js.map +1 -1
  125. package/dist/repositories/agent-profile.d.ts +36 -0
  126. package/dist/repositories/agent-profile.d.ts.map +1 -0
  127. package/dist/repositories/agent-profile.js +153 -0
  128. package/dist/repositories/agent-profile.js.map +1 -0
  129. package/dist/repositories/index.d.ts +3 -0
  130. package/dist/repositories/index.d.ts.map +1 -0
  131. package/dist/repositories/index.js +3 -0
  132. package/dist/repositories/index.js.map +1 -0
  133. package/dist/repositories/prompt-stack.d.ts +57 -0
  134. package/dist/repositories/prompt-stack.d.ts.map +1 -0
  135. package/dist/repositories/prompt-stack.js +175 -0
  136. package/dist/repositories/prompt-stack.js.map +1 -0
  137. package/dist/runtime/profile-runtime.d.ts +2 -2
  138. package/dist/runtime/profile-runtime.d.ts.map +1 -1
  139. package/dist/runtime/profile-runtime.js +13 -10
  140. package/dist/runtime/profile-runtime.js.map +1 -1
  141. package/dist/runtime/prompt-stack-runtime.d.ts +4 -3
  142. package/dist/runtime/prompt-stack-runtime.d.ts.map +1 -1
  143. package/dist/runtime/prompt-stack-runtime.js +42 -57
  144. package/dist/runtime/prompt-stack-runtime.js.map +1 -1
  145. package/dist/runtime/tool-policy-runtime.d.ts +2 -2
  146. package/dist/runtime/tool-policy-runtime.d.ts.map +1 -1
  147. package/dist/runtime/tool-policy-runtime.js +16 -6
  148. package/dist/runtime/tool-policy-runtime.js.map +1 -1
  149. package/dist/runtime/web-editor-runtime.d.ts +2 -1
  150. package/dist/runtime/web-editor-runtime.d.ts.map +1 -1
  151. package/dist/runtime/web-editor-runtime.js +8 -3
  152. package/dist/runtime/web-editor-runtime.js.map +1 -1
  153. package/dist/session-adapter.d.ts +17 -0
  154. package/dist/session-adapter.d.ts.map +1 -0
  155. package/dist/session-adapter.js +57 -0
  156. package/dist/session-adapter.js.map +1 -0
  157. package/dist/slot-renderers.d.ts +16 -3
  158. package/dist/slot-renderers.d.ts.map +1 -1
  159. package/dist/slot-renderers.js +15 -63
  160. package/dist/slot-renderers.js.map +1 -1
  161. package/dist/stack-migration.d.ts +6 -0
  162. package/dist/stack-migration.d.ts.map +1 -1
  163. package/dist/stack-migration.js +49 -52
  164. package/dist/stack-migration.js.map +1 -1
  165. package/dist/subagent/fingerprints.d.ts +24 -0
  166. package/dist/subagent/fingerprints.d.ts.map +1 -0
  167. package/dist/subagent/fingerprints.js +81 -0
  168. package/dist/subagent/fingerprints.js.map +1 -0
  169. package/dist/subagent/host-port.d.ts +296 -0
  170. package/dist/subagent/host-port.d.ts.map +1 -0
  171. package/dist/subagent/host-port.js +560 -0
  172. package/dist/subagent/host-port.js.map +1 -0
  173. package/dist/subagent/index.d.ts +10 -10
  174. package/dist/subagent/index.d.ts.map +1 -1
  175. package/dist/subagent/index.js +9 -10
  176. package/dist/subagent/index.js.map +1 -1
  177. package/dist/subagent-host.d.ts +99 -18
  178. package/dist/subagent-host.d.ts.map +1 -1
  179. package/dist/subagent-host.js +143 -146
  180. package/dist/subagent-host.js.map +1 -1
  181. package/dist/template-render.d.ts +18 -0
  182. package/dist/template-render.d.ts.map +1 -0
  183. package/dist/template-render.js +232 -0
  184. package/dist/template-render.js.map +1 -0
  185. package/dist/types.d.ts +40 -27
  186. package/dist/types.d.ts.map +1 -1
  187. package/dist/types.js.map +1 -1
  188. package/dist/ui-contribution/contrib-port.d.ts +170 -0
  189. package/dist/ui-contribution/contrib-port.d.ts.map +1 -0
  190. package/dist/ui-contribution/contrib-port.js +640 -0
  191. package/dist/ui-contribution/contrib-port.js.map +1 -0
  192. package/dist/ui-contribution/index.d.ts +3 -0
  193. package/dist/ui-contribution/index.d.ts.map +1 -0
  194. package/dist/ui-contribution/index.js +2 -0
  195. package/dist/ui-contribution/index.js.map +1 -0
  196. package/dist/web-editor/client-script.generated.d.ts.map +1 -1
  197. package/dist/web-editor/client-script.generated.js +1 -1
  198. package/dist/web-editor/client-script.generated.js.map +1 -1
  199. package/dist/web-editor/client-styles.generated.d.ts.map +1 -1
  200. package/dist/web-editor/client-styles.generated.js +1 -1
  201. package/dist/web-editor/client-styles.generated.js.map +1 -1
  202. package/dist/web-editor/contrib-service.d.ts +41 -0
  203. package/dist/web-editor/contrib-service.d.ts.map +1 -0
  204. package/dist/web-editor/contrib-service.js +174 -0
  205. package/dist/web-editor/contrib-service.js.map +1 -0
  206. package/dist/web-editor/line-diff.d.ts +28 -0
  207. package/dist/web-editor/line-diff.d.ts.map +1 -0
  208. package/dist/web-editor/line-diff.js +216 -0
  209. package/dist/web-editor/line-diff.js.map +1 -0
  210. package/dist/web-editor/schema-form.d.ts +63 -0
  211. package/dist/web-editor/schema-form.d.ts.map +1 -0
  212. package/dist/web-editor/schema-form.js +213 -0
  213. package/dist/web-editor/schema-form.js.map +1 -0
  214. package/dist/web-editor/server.d.ts.map +1 -1
  215. package/dist/web-editor/server.js +72 -74
  216. package/dist/web-editor/server.js.map +1 -1
  217. package/dist/web-editor/styles.d.ts.map +1 -1
  218. package/dist/web-editor/styles.js +201 -21
  219. package/dist/web-editor/styles.js.map +1 -1
  220. package/dist/web-editor/types.d.ts +12 -35
  221. package/dist/web-editor/types.d.ts.map +1 -1
  222. package/dist/web-host.d.ts +6 -2
  223. package/dist/web-host.d.ts.map +1 -1
  224. package/dist/web-host.js +33 -103
  225. package/dist/web-host.js.map +1 -1
  226. package/dist/workspace.d.ts +74 -0
  227. package/dist/workspace.d.ts.map +1 -0
  228. package/dist/workspace.js +351 -0
  229. package/dist/workspace.js.map +1 -0
  230. package/docs/README.md +7 -4
  231. package/docs/concepts/agent-profiles.md +1 -1
  232. package/docs/concepts/prompt-stacks.md +5 -5
  233. package/docs/design/0.5.1-plan.md +237 -0
  234. package/docs/design/README.md +21 -3
  235. package/docs/design/architecture-0.5.md +222 -0
  236. package/docs/design/archive/0.5-full-proposal/0.5-consumer-audit.md +62 -0
  237. package/docs/design/archive/0.5-full-proposal/0.5-inventory.md +208 -0
  238. package/docs/design/archive/0.5-full-proposal/0.5-phase0-decision-drafts.md +237 -0
  239. package/docs/design/archive/0.5-full-proposal/README.md +12 -0
  240. package/docs/design/archive/0.5-full-proposal/architecture-0.5.md +423 -0
  241. package/docs/design/archive/0.5-full-proposal/host-discovery-spike.md +103 -0
  242. package/docs/design/archive/0.5-full-proposal/template-language-spike.md +156 -0
  243. package/docs/design/context-diff-plan.md +78 -0
  244. package/docs/design/decision-template.md +33 -0
  245. package/docs/design/roadmap-0.4-archive.md +1 -1
  246. package/docs/design/subagents/interface-design.md +1 -1
  247. package/docs/development/architecture-rules.md +148 -0
  248. package/docs/development/release.md +7 -1
  249. package/docs/development/roadmap.md +37 -5
  250. package/docs/development/scoped-global-profiles-stacks.md +1 -1
  251. package/docs/development/setup.md +6 -4
  252. package/docs/getting-started.md +5 -4
  253. package/docs/guides/custom-macros-and-slots.md +8 -7
  254. package/docs/guides/debugging.md +1 -1
  255. package/docs/guides/delegation.md +18 -22
  256. package/docs/guides/migrating-to-0.5.md +107 -0
  257. package/docs/guides/use-cases.md +7 -11
  258. package/docs/guides/web-editor.md +6 -10
  259. package/docs/reference/commands.md +4 -3
  260. package/docs/reference/configuration.md +17 -18
  261. package/docs/reference/features.md +34 -80
  262. package/docs/reference/macros-and-slots.md +70 -49
  263. package/docs/reference/public-api.md +76 -17
  264. package/docs/reference/stack-schema.md +15 -10
  265. package/docs/reference/subagent-host-port.md +49 -0
  266. package/docs/reference/ui-contribution-port.md +51 -0
  267. package/docs/zh-CN/README.md +3 -3
  268. package/docs/zh-CN/concepts/agent-profiles.md +1 -1
  269. package/docs/zh-CN/concepts/prompt-stacks.md +5 -5
  270. package/docs/zh-CN/getting-started.md +3 -2
  271. package/docs/zh-CN/guides/delegation.md +10 -12
  272. package/docs/zh-CN/guides/migrating-to-0.5.md +92 -0
  273. package/docs/zh-CN/guides/web-editor.md +4 -4
  274. package/docs/zh-CN/reference/commands.md +3 -2
  275. package/examples/custom-system-status-extension/README.md +3 -3
  276. package/examples/custom-system-status-extension/index.ts +2 -1
  277. package/examples/custom-system-status-extension/prompt-stack.json +4 -3
  278. package/examples/default-prompt-stack.json +9 -4
  279. package/examples/image-reader-prompt-stack.json +16 -26
  280. package/examples/reviewer-prompt-stack.json +13 -24
  281. package/package.json +106 -120
  282. package/dist/runtime/subagent-runtime.d.ts +0 -45
  283. package/dist/runtime/subagent-runtime.d.ts.map +0 -1
  284. package/dist/runtime/subagent-runtime.js +0 -343
  285. package/dist/runtime/subagent-runtime.js.map +0 -1
  286. package/dist/runtime-state.d.ts +0 -30
  287. package/dist/runtime-state.d.ts.map +0 -1
  288. package/dist/runtime-state.js +0 -17
  289. package/dist/runtime-state.js.map +0 -1
  290. package/dist/sillytavern-importer/items.d.ts +0 -3
  291. package/dist/sillytavern-importer/items.d.ts.map +0 -1
  292. package/dist/sillytavern-importer/items.js +0 -88
  293. package/dist/sillytavern-importer/items.js.map +0 -1
  294. package/dist/sillytavern-importer/macros.d.ts +0 -15
  295. package/dist/sillytavern-importer/macros.d.ts.map +0 -1
  296. package/dist/sillytavern-importer/macros.js +0 -141
  297. package/dist/sillytavern-importer/macros.js.map +0 -1
  298. package/dist/sillytavern-importer/prompt-order.d.ts +0 -6
  299. package/dist/sillytavern-importer/prompt-order.d.ts.map +0 -1
  300. package/dist/sillytavern-importer/prompt-order.js +0 -38
  301. package/dist/sillytavern-importer/prompt-order.js.map +0 -1
  302. package/dist/sillytavern-importer/regex.d.ts +0 -3
  303. package/dist/sillytavern-importer/regex.d.ts.map +0 -1
  304. package/dist/sillytavern-importer/regex.js +0 -275
  305. package/dist/sillytavern-importer/regex.js.map +0 -1
  306. package/dist/sillytavern-importer/report.d.ts +0 -21
  307. package/dist/sillytavern-importer/report.d.ts.map +0 -1
  308. package/dist/sillytavern-importer/report.js +0 -166
  309. package/dist/sillytavern-importer/report.js.map +0 -1
  310. package/dist/sillytavern-importer/types.d.ts +0 -106
  311. package/dist/sillytavern-importer/types.d.ts.map +0 -1
  312. package/dist/sillytavern-importer/types.js +0 -2
  313. package/dist/sillytavern-importer/types.js.map +0 -1
  314. package/dist/sillytavern-importer.d.ts +0 -5
  315. package/dist/sillytavern-importer.d.ts.map +0 -1
  316. package/dist/sillytavern-importer.js +0 -117
  317. package/dist/sillytavern-importer.js.map +0 -1
  318. package/dist/subagent/canonical.d.ts +0 -22
  319. package/dist/subagent/canonical.d.ts.map +0 -1
  320. package/dist/subagent/canonical.js +0 -24
  321. package/dist/subagent/canonical.js.map +0 -1
  322. package/dist/subagent/context.d.ts +0 -8
  323. package/dist/subagent/context.d.ts.map +0 -1
  324. package/dist/subagent/context.js +0 -125
  325. package/dist/subagent/context.js.map +0 -1
  326. package/dist/subagent/contract.d.ts +0 -10
  327. package/dist/subagent/contract.d.ts.map +0 -1
  328. package/dist/subagent/contract.js +0 -10
  329. package/dist/subagent/contract.js.map +0 -1
  330. package/dist/subagent/plan.d.ts +0 -18
  331. package/dist/subagent/plan.d.ts.map +0 -1
  332. package/dist/subagent/plan.js +0 -157
  333. package/dist/subagent/plan.js.map +0 -1
  334. package/dist/subagent/preflight.d.ts +0 -4
  335. package/dist/subagent/preflight.d.ts.map +0 -1
  336. package/dist/subagent/preflight.js +0 -108
  337. package/dist/subagent/preflight.js.map +0 -1
  338. package/dist/subagent/request.d.ts +0 -4
  339. package/dist/subagent/request.d.ts.map +0 -1
  340. package/dist/subagent/request.js +0 -154
  341. package/dist/subagent/request.js.map +0 -1
  342. package/dist/subagent/response.d.ts +0 -8
  343. package/dist/subagent/response.d.ts.map +0 -1
  344. package/dist/subagent/response.js +0 -155
  345. package/dist/subagent/response.js.map +0 -1
  346. package/dist/subagent/tools.d.ts +0 -4
  347. package/dist/subagent/tools.d.ts.map +0 -1
  348. package/dist/subagent/tools.js +0 -42
  349. package/dist/subagent/tools.js.map +0 -1
  350. package/dist/subagent/types.d.ts +0 -272
  351. package/dist/subagent/types.d.ts.map +0 -1
  352. package/dist/subagent/types.js +0 -3
  353. package/dist/subagent/types.js.map +0 -1
  354. package/dist/subagent/validation.d.ts +0 -35
  355. package/dist/subagent/validation.d.ts.map +0 -1
  356. package/dist/subagent/validation.js +0 -314
  357. package/dist/subagent/validation.js.map +0 -1
  358. package/dist/subagent-command.d.ts +0 -5
  359. package/dist/subagent-command.d.ts.map +0 -1
  360. package/dist/subagent-command.js +0 -249
  361. package/dist/subagent-command.js.map +0 -1
  362. package/dist/subagent-profile-tool.d.ts +0 -49
  363. package/dist/subagent-profile-tool.d.ts.map +0 -1
  364. package/dist/subagent-profile-tool.js +0 -125
  365. package/dist/subagent-profile-tool.js.map +0 -1
  366. package/dist/subagent-tool.d.ts +0 -77
  367. package/dist/subagent-tool.d.ts.map +0 -1
  368. package/dist/subagent-tool.js +0 -559
  369. package/dist/subagent-tool.js.map +0 -1
  370. package/docs/guides/sillytavern-import.md +0 -47
  371. package/docs/reference/subagent-adapter.md +0 -204
  372. package/examples/sillytavern-dm-writer-prompt-stack.json +0 -190
@@ -0,0 +1,92 @@
1
+ # 迁移到 pi-forge 0.5
2
+
3
+ [中文文档](../README.md) · [English](../../guides/migrating-to-0.5.md)
4
+
5
+ 0.5.0 是一个破坏性的清理版本。本页是全部变更的迁移说明。
6
+
7
+ ## 被移除的内容
8
+
9
+ - SillyTavern 导入器(`/preset import-silly`)及其报告、指南、示例和测试。升级前请先用 pi-forge 0.4 转换 SillyTavern preset。
10
+ - 可变 turn/session 变量、变量修改 macro、`pi-forge-variable-state` session 条目和 `variables` slot。
11
+ - 正则的 `display` 与 `both` 效果;保留 `outgoing` 和 `finalize`。
12
+ - 主包中的 subagent 执行功能(移至可选包,见下文 Lane 3/4)。
13
+
14
+ ## 模板语法变更
15
+
16
+ Prompt 文本现在使用封闭的 `forge-v1` 语法编译。
17
+
18
+ | 0.4 写法 | 0.5 forge-v1 |
19
+ |---|---|
20
+ | `{{name}}`(静态) | `{{ parameters.name }}` |
21
+ | `{{lastUserMessage}}` | `{{ runtime.lastUserMessage }}` |
22
+ | `{{date}}` / `{{time}}` / `{{cwd}}` | `{{ runtime.date }}` / `{{ runtime.time }}` / `{{ runtime.cwd }}` |
23
+ | `{{tools}}` | `{{ runtime.selectedToolsText }}` |
24
+ | `{{upper::x}}` | `{{ x \| upper }}` |
25
+ | `{{iftools::bash::A::B}}` | `{% if runtime.tool.bash %}A{% else %}B{% endif %}` |
26
+ | 自定义 `{{myMacro}}` | `{{ extensions.myMacro }}` |
27
+
28
+ 未知路径、未知 filter、解析错误、循环和输出超限都是编译错误;失败的块会被省略,而不是把原始模板文本重新注入。
29
+
30
+ ## Schema v2
31
+
32
+ Schema v2 的 stack 把不可变静态值存入 `parameters`(JSON 兼容),取代旧的纯字符串 `variables` 字段:
33
+
34
+ ```json
35
+ {
36
+ "schemaVersion": 2,
37
+ "parameters": { "char": "Konata" }
38
+ }
39
+ ```
40
+
41
+ 未标注版本 / v1 的 stack 仍通过旧的 `variables` 读取器加载。
42
+
43
+ ## 运行迁移工具
44
+
45
+ 一个以诊断为先的机械脚本可转换已保存的 stack 文件:
46
+
47
+ ```bash
48
+ node scripts/migrate-stack-v2.mjs .pi/forge/prompt-stacks/default.json --dry-run
49
+ node scripts/migrate-stack-v2.mjs .pi/forge/prompt-stacks/default.json --write
50
+ ```
51
+
52
+ 它会把 `variables` 改名为 `parameters`、映射 runtime/parameter 路径并转换简单的 filter 管道。无法机械转换的写法会被报告;只有不存在这类写法时才会写入文件。仍含旧 `variables` 字段的 schema v2 文件不会被改动,仅给出警告。
53
+
54
+ ## Lane 2:带 scope 的全局 profile 与 prompt stack
55
+
56
+ - 用户全局资源现在位于 `~/.pi/forge/prompt-stacks` 和 `~/.pi/forge/agent-profiles`,与项目存储并存。Profile 和 stack 选择器支持显式 scope:`project:<id>`、`global:<id>`,裸 ID 优先解析项目资源。
57
+ - 同 ID 的项目资源会遮蔽对应的全局资源;全局 stack 不能引用项目资源(反之亦然)——引用在被引用资源的 scope 内解析。
58
+ - 未信任的项目一律拒绝:只加载全局资源,所有变更路由被拒绝,并且当 session 可能仍活跃时 `session_shutdown` 不再销毁已信任的工作区(空闲工作区一小时后被清扫;host 独立停止)。
59
+ - Web 编辑器新增 scope 下拉,可向任一存储创建 stack/profile,并通过显式 `global:<id>` 路由执行全局变更。
60
+
61
+ ## Lane 3:subagent 包拆分
62
+
63
+ Subagent 执行功能从主包移入可选包 `@zihanw/pi-forge-subagents`(要求 `@zihanw/pi-forge@^0.5.0`)。如需保留前台 delegation,请单独安装该包。
64
+
65
+ - **命令:** `/subagents` 和 `/subagent-run` 已从主包移除。可选包注册 `/forge-agent backends|plan|run`。
66
+ - **模型工具:** `forge_subagent_profiles` 和 `forge_subagent` 由可选包注册。
67
+ - **配置:** `subagents.*` 从 `.pi/forge/config.json` 移入专用的 `.pi/forge/subagents.json`(可信项目)和 `~/.pi/forge/subagents.json`(用户默认)。可选包会把旧的 `config.json.subagents` 段落作为只读回退读取并发出警告;它永远不会写入旧位置。把配置值复制到 `subagents.json` 即可消除警告。
68
+ - **Web 编辑器:** delegation 卡片已从主编辑器移除;请直接编辑 `subagents.json`。
69
+ - **架构:** 主包的 prompt 编译器不再携带 subagent 假设,`ForgeWorkspace` 是资源状态和编译上下文的唯一持有者。
70
+
71
+ ## Lane 4:Forge 原生 host 契约与公开 surface
72
+
73
+ - 主包不再依赖 `@zihanw/pi-subagent-runtime`,也不再导出 0.4 执行契约。该契约(`AgentRequest`、`createAgentExecutionPlan`、`validateAgentRequest`、`negotiateSubagentTools`、preflight/plan/response 校验器等)现在位于 `@zihanw/pi-forge-subagents` 内部,供其自身 runtime 接线使用;两个包都不把它作为第三方可用的公开 surface。
74
+ - `@zihanw/pi-forge/subagent` 现在只导出带版本的 host port:wire DTO 与校验器、`ForgeHostTransport`、`ForgeHost`/`ForgeHostClient`、生命周期常量,以及 Forge 持有的规范指纹辅助函数。`resolveSubagentHostProfile` / `prepareSubagentHostPlan` 已被 host port 的 `resolveProfile` 和 `prepare` 操作取代。
75
+ - 包根只导出默认扩展工厂、`registerMacro`/`registerSlot` 及其契约类型。其余根导出(loader、agent-profile、profile-service、catalog、resource-identity、render-helper 值、`forge-v1` 引擎、registry 读取器)已全部移除。
76
+ - 所有 `@zihanw/pi-forge/src/*` 子路径别名和 `./examples/*` 导出均已移除;`check-package` 会拒绝它们。
77
+
78
+ ### 导入迁移表
79
+
80
+ | 0.4 导入 | 0.5 替代 |
81
+ |---|---|
82
+ | `@zihanw/pi-forge`(默认导出、`registerMacro`、`registerSlot`) | 不变 |
83
+ | `@zihanw/pi-forge/subagent` host-port 名称(`ForgeHost*`、校验器、指纹) | 不变 |
84
+ | `@zihanw/pi-forge/subagent` 执行契约(`AgentRequest`、`createAgentExecutionPlan` 等) | 已内置于 `@zihanw/pi-forge-subagents`;无公开替代 |
85
+ | `@zihanw/pi-forge/subagent` 的 `resolveSubagentHostProfile` / `prepareSubagentHostPlan` | 通过 `ForgeHostClient` 使用 host-port 操作 |
86
+ | `@zihanw/pi-forge/src/*` 别名 | 已移除;无替代(内部实现) |
87
+ | 根部的 loader/profile/catalog/engine 再导出 | 已移除;无替代(内部实现) |
88
+
89
+ ## 兼容性说明
90
+
91
+ - Host port 的 wire 结构在 `FORGE_HOST_PORT_VERSION = 1` 内只做增量扩展;未知操作会以普通的 `{ ok: false, error }` 结果拒绝(`"Unknown Forge host operation: …"`),而不是抛出异常。可选包必须把任何操作失败视为该请求的终态。
92
+ - 主包内置的指纹辅助函数由黄金向量锁定,与 `@zihanw/pi-subagent-runtime` 的规范序列化保持字节兼容;计划封存(plan sealing)仍只发生在可选包中。
@@ -29,17 +29,17 @@
29
29
  - 拖拽排序、启用/禁用、校验和完整编译预览;
30
30
  - 工具/skill 搜索、精确名称 chips 和通配符策略;
31
31
  - variables、context 和 regex 规则;
32
- - 原生 pi-forge 与 SillyTavern JSON 导入;
32
+ - 原生 pi-forge JSON 导入;
33
33
  - 导出、fork、删除和 payload 捕获。
34
34
 
35
35
  已有 ID 在编辑时不可修改;需要新 ID 时使用 **Fork**,避免破坏 profile 引用和当前选择。工具栏的 scope 下拉(默认 `project`)决定新建、导入和 fork 的写入位置:选择 `global` 写入用户全局 `~/.pi/forge/prompt-stacks`,选择 `project` 写入项目 `.pi/forge/prompt-stacks`。列表会为全局 stack 显示 `global` badge;保存和删除通过 `global:<id>` 路由精确作用于全局文件。保存、导入、fork 和删除后会重新加载当前 Pi session。
36
36
 
37
37
  ## Agent profile 工作区
38
38
 
39
- 列表显示 profile ID、名称、模型、思考等级、stack、校验状态、auto-activation、last-applied provenance 和 delegation 状态。每个 profile 都带 `project` / `global` scope badge;同 ID 的 shadow 对会显示 `shadows global:<id>` 或 `shadowed by project:<id>`。
39
+ 列表显示 profile ID、名称、模型、思考等级、stack、校验状态、auto-activation 和 last-applied provenance。每个 profile 都带 `project` / `global` scope badge;同 ID 的 shadow 对会显示 `shadows global:<id>` 或 `shadowed by project:<id>`。
40
40
 
41
41
  可信项目通过 **New profile** 旁的 scope 下拉(默认 `project`)选择目标 scope:选择 `global` 写入用户全局 `~/.pi/forge/agent-profiles`,选择 `project` 写入项目 `.pi/forge/agent-profiles`。全局 profile 可通过显式 `global:<id>` 路由编辑、校验、保存、一次性应用和删除;未限定路由始终只作用于项目资源。编辑全局 profile 时,stack 下拉只显示全局 stack。Model 选项来自 Pi registry,thinking 选项反映模型支持,stack 选项来自同一个 repository。编辑器会拒绝同 scope 内第二个 auto-activation profile。
42
42
 
43
- Delegation 卡片按 profile 的 scope 修改 `subagents.profiles.<id>` 的 enable/backend/timeout:项目 profile 写入项目 config,全局 profile 写入用户全局 config。切换 profile、刷新、删除或离开页面时,未保存的 delegation 字段会得到保护。通用默认值和 `allowAgentInvocationWithoutApproval` 只能在 config 文件中设置。
43
+ ## Delegation
44
44
 
45
- 启用前请阅读[前台 delegation](delegation.md)。
45
+ Delegation 配置不在主编辑器中。可选包 `@zihanw/pi-forge-subagents` 持有专用的 `.pi/forge/subagents.json` 和 `~/.pi/forge/subagents.json` 文件。启用 profile 前请阅读[前台 delegation](delegation.md)。
@@ -23,7 +23,6 @@
23
23
  | 命令 | 行为 |
24
24
  |---|---|
25
25
  | `/preset migrate-stacks [--dry-run] [--overwrite] [--delete-legacy]` | 把旧 stack 复制到 `.pi/forge/prompt-stacks` |
26
- | `/preset import-silly <path> [character_id] [--dry-run] [--overwrite]` | 转换 SillyTavern preset 并生成报告 |
27
26
 
28
27
  覆盖或删除之前请先使用 `--dry-run`。
29
28
 
@@ -42,13 +41,15 @@
42
41
 
43
42
  ## 实验性 delegation
44
43
 
44
+ 以下命令由可选包 `@zihanw/pi-forge-subagents` 提供。
45
+
45
46
  | 命令 | 行为 |
46
47
  |---|---|
47
48
  | `/forge-agent backends` | 列出 backend、capabilities 和默认值 |
48
49
  | `/forge-agent plan <profile> [--backend <id>] <task>` | 准备、显示并丢弃计划,不联系 provider |
49
50
  | `/forge-agent run <profile> [--backend <id>] <task>` | 审批并执行前台只读任务 |
50
51
 
51
- 只接受匹配 scope 明确授权的 profile:项目 config 授权 `project:<id>`,全局 config 授权 `global:<id>`。模型工具为 `forge_subagent_profiles` 和 `forge_subagent`。见[安全说明](../guides/delegation.md)。
52
+ 只接受明确 scope 的授权:请在 `subagents.json` 中使用 `project:<id>` 或 `global:<id>` key。裸授权 key 始终表示 `project:<id>`,即使它位于全局配置中;`.pi/forge/config.json.subagents` 仅作为只读兼容来源。模型工具为 `forge_subagent_profiles` 和 `forge_subagent`。见[安全说明](../guides/delegation.md)。
52
53
 
53
54
  ## Payload
54
55
 
@@ -4,7 +4,7 @@ This example shows how trusted pi-forge extension modules can register a custom
4
4
 
5
5
  It registers:
6
6
 
7
- - `{{cpuLoad}}` macro: one-line CPU load summary.
7
+ - `{{ extensions.cpuLoad }}` macro: one-line CPU load summary.
8
8
  - `machine-status` slot: CPU load, OS load average, memory, and uptime snapshot.
9
9
 
10
10
  The renderers are synchronous, so this example uses Node's OS load average and memory APIs. It is a rough machine-load signal, not an async sampled CPU-utilization profiler.
@@ -53,12 +53,12 @@ Each module exports a default function or named `register` function:
53
53
 
54
54
  ```ts
55
55
  export default function register(api) {
56
- api.registerMacro({ name: "cpuLoad", render: () => "..." });
56
+ api.registerMacro({ name: "cpuLoad", dependencies: [], render: ({ env, helpers }) => "..." });
57
57
  api.registerSlot({ name: "machine-status", render: () => "..." });
58
58
  }
59
59
  ```
60
60
 
61
- pi-forge passes the registration API into the function, tracks unregister callbacks, and unregisters previous definitions before reloading the folder. If the extension is not loaded, the stack can still be read, but `machine-status` will validate as an unsupported slot and `{{cpuLoad}}` will remain an unresolved macro.
61
+ pi-forge passes the registration API into the function, tracks unregister callbacks, and unregisters previous definitions before reloading the folder. If the extension is not loaded, the stack can still be read, but `machine-status` will validate as an unsupported slot and `{{ extensions.cpuLoad }}` will remain an unresolved extension path.
62
62
 
63
63
  Only use this folder for trusted code. These modules execute with normal local code permissions after the project is trusted.
64
64
 
@@ -5,7 +5,8 @@ interface ForgeRegistrationApi {
5
5
  name: string;
6
6
  source?: string;
7
7
  description?: string;
8
- render: () => string;
8
+ dependencies?: string[];
9
+ render: (ctx: { env: Record<string, unknown>; helpers: unknown }) => string;
9
10
  }): () => void;
10
11
  registerSlot(definition: {
11
12
  name: string;
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": 1,
2
+ "schemaVersion": 2,
3
3
  "type": "pi-forge.prompt-stack",
4
4
  "id": "custom-system-status",
5
5
  "name": "Custom System Status",
@@ -12,7 +12,7 @@
12
12
  "name": "CPU Load Macro",
13
13
  "enabled": true,
14
14
  "role": "system",
15
- "content": "Current rough CPU load: {{cpuLoad}}"
15
+ "content": "Current rough CPU load: {{ extensions.cpuLoad }}"
16
16
  },
17
17
  {
18
18
  "kind": "slot",
@@ -35,5 +35,6 @@
35
35
  "enabled": true,
36
36
  "slot": "chat-history"
37
37
  }
38
- ]
38
+ ],
39
+ "parameters": {}
39
40
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": 1,
2
+ "schemaVersion": 2,
3
3
  "type": "pi-forge.prompt-stack",
4
4
  "id": "default",
5
5
  "name": "Default Pi Prompt Mirror",
@@ -14,10 +14,14 @@
14
14
  "allowDuplicateChatHistory": false
15
15
  },
16
16
  "tools": {
17
- "allow": ["*"]
17
+ "allow": [
18
+ "*"
19
+ ]
18
20
  },
19
21
  "skills": {
20
- "allow": ["*"]
22
+ "allow": [
23
+ "*"
24
+ ]
21
25
  },
22
26
  "items": [
23
27
  {
@@ -116,5 +120,6 @@
116
120
  "enabled": true,
117
121
  "slot": "chat-history"
118
122
  }
119
- ]
123
+ ],
124
+ "parameters": {}
120
125
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": 1,
2
+ "schemaVersion": 2,
3
3
  "type": "pi-forge.prompt-stack",
4
4
  "id": "image-reader",
5
5
  "name": "Image Reader Subagent",
@@ -14,13 +14,11 @@
14
14
  "allowDuplicateChatHistory": false
15
15
  },
16
16
  "tools": {
17
- "deny": ["bash", "edit", "write"]
18
- },
19
- "variables": {
20
- "audience": "main agent",
21
- "report_mode": "image-reader",
22
- "detail_level": "exhaustive factual visual inventory",
23
- "safety_scope": "include safety-relevant visual content neutrally without giving instructions for harmful acts"
17
+ "deny": [
18
+ "bash",
19
+ "edit",
20
+ "write"
21
+ ]
24
22
  },
25
23
  "items": [
26
24
  {
@@ -29,7 +27,7 @@
29
27
  "name": "Image Reader Role",
30
28
  "enabled": true,
31
29
  "role": "system",
32
- "content": "{{setturnvar::active_preset::image-reader}}You are an image reader subagent. Your job is to inspect image inputs directly and produce a faithful visual report for the {{audience}}.\n\nUse this stack only when you can actually inspect the image. If no image is present, the image is inaccessible, or the current model cannot view images, say that directly and do not guess.\n\nPrimary objective: describe exactly what is visible in the image in detail. Treat the report as sensory evidence for another agent, not as advice, judgment, or creative writing."
30
+ "content": "You are an image reader subagent. Your job is to inspect image inputs directly and produce a faithful visual report for the {{ parameters.audience }}.\n\nUse this stack only when you can actually inspect the image. If no image is present, the image is inaccessible, or the current model cannot view images, say that directly and do not guess.\n\nPrimary objective: describe exactly what is visible in the image in detail. Treat the report as sensory evidence for another agent, not as advice, judgment, or creative writing."
33
31
  },
34
32
  {
35
33
  "kind": "block",
@@ -45,21 +43,7 @@
45
43
  "name": "Macro Context",
46
44
  "enabled": true,
47
45
  "role": "system",
48
- "content": "{{ifeq::report_mode::image-reader::Report mode is active: {{upper::{{report_mode}}}}.::Report mode is not image-reader; state this mismatch before proceeding.}}\n{{ifvar::safety_scope::Safety scope: {{safety_scope}}.}}\n{{iftools::read::If the user references an image file path and direct vision input is unavailable, you may inspect only file metadata or surrounding text with read tools; do not pretend metadata is image vision.}}\n{{ifslot::variables::Runtime variables are available below for auditability.}}"
49
- },
50
- {
51
- "kind": "slot",
52
- "id": "variables",
53
- "name": "Image Reader Variables",
54
- "enabled": true,
55
- "role": "system",
56
- "slot": "variables",
57
- "options": {
58
- "includeStatic": true,
59
- "includeSession": true,
60
- "includeTurn": true,
61
- "format": "plain"
62
- }
46
+ "content": "Report mode is active: {{ parameters.report_mode | upper }}.\nSafety scope: {{ parameters.safety_scope }}.\n{% if runtime.tool.read %}If the user references an image file path and direct vision input is unavailable, you may inspect only file metadata or surrounding text with read tools; do not pretend metadata is image vision.{% endif %}"
63
47
  },
64
48
  {
65
49
  "kind": "slot",
@@ -118,7 +102,13 @@
118
102
  "name": "Current Image Task",
119
103
  "enabled": true,
120
104
  "role": "user",
121
- "content": "<current_image_task>\n{{xml::{{lastUserMessage}}}}\n</current_image_task>\n\nProduce the image report now for the {{audience}}.\n\nRequired output:\n1. Access check: state whether you can directly inspect the image.\n2. One-sentence overview: summarize the scene plainly.\n3. Detailed inventory: list visible subjects, objects, setting, text, colors, layout, and relationships.\n4. Safety-relevant content: list visible hazards, injuries, weapons, explicit content, abuse indicators, hate symbols, or other potentially harmful content. Write \"None visible\" only if none are visible.\n5. Uncertainties: list anything important that is unclear, ambiguous, cropped, blurry, or inferred.\n6. Machine-readable summary: include one compact JSON object with keys \"canInspectImage\", \"overview\", \"visibleText\", \"safetyRelevantContent\", and \"uncertainties\". Use strings or arrays only; do not include markdown inside the JSON.\n\nRequest as JSON string for logging: {{json::{{lastUserMessage}}}}"
105
+ "content": "<current_image_task>\n{{ runtime.lastUserMessage | xml }}\n</current_image_task>\n\nProduce the image report now for the {{ parameters.audience }}.\n\nRequired output:\n1. Access check: state whether you can directly inspect the image.\n2. One-sentence overview: summarize the scene plainly.\n3. Detailed inventory: list visible subjects, objects, setting, text, colors, layout, and relationships.\n4. Safety-relevant content: list visible hazards, injuries, weapons, explicit content, abuse indicators, hate symbols, or other potentially harmful content. Write \"None visible\" only if none are visible.\n5. Uncertainties: list anything important that is unclear, ambiguous, cropped, blurry, or inferred.\n6. Machine-readable summary: include one compact JSON object with keys \"canInspectImage\", \"overview\", \"visibleText\", \"safetyRelevantContent\", and \"uncertainties\". Use strings or arrays only; do not include markdown inside the JSON.\n\nRequest as JSON string for logging: {{ runtime.lastUserMessage | json }}"
122
106
  }
123
- ]
107
+ ],
108
+ "parameters": {
109
+ "audience": "main agent",
110
+ "report_mode": "image-reader",
111
+ "detail_level": "exhaustive factual visual inventory",
112
+ "safety_scope": "include safety-relevant visual content neutrally without giving instructions for harmful acts"
113
+ }
124
114
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": 1,
2
+ "schemaVersion": 2,
3
3
  "type": "pi-forge.prompt-stack",
4
4
  "id": "reviewer",
5
5
  "name": "Focused Code Reviewer",
@@ -14,12 +14,10 @@
14
14
  "allowDuplicateChatHistory": false
15
15
  },
16
16
  "tools": {
17
- "deny": ["edit", "write"]
18
- },
19
- "variables": {
20
- "review_focus": "correctness, regressions, security, maintainability, and missing tests",
21
- "review_style": "findings first, ordered by severity",
22
- "max_findings": "8"
17
+ "deny": [
18
+ "edit",
19
+ "write"
20
+ ]
23
21
  },
24
22
  "items": [
25
23
  {
@@ -28,7 +26,7 @@
28
26
  "name": "Reviewer Role",
29
27
  "enabled": true,
30
28
  "role": "system",
31
- "content": "You are a senior code reviewer operating inside pi. Review the user's target with a skeptical engineering lens. Prioritize {{review_focus}}.\n\nRules:\n- Do not edit files or write patches unless the user explicitly asks for implementation.\n- You may inspect files and run safe read-only commands when needed.\n- Treat previous conversation as context, not as the target unless the latest user message says so.\n- Prefer concrete file/line references when available.\n- If there are no substantive issues, say that clearly and mention residual risks or test gaps."
29
+ "content": "You are a senior code reviewer operating inside pi. Review the user's target with a skeptical engineering lens. Prioritize {{ parameters.review_focus }}.\n\nRules:\n- Do not edit files or write patches unless the user explicitly asks for implementation.\n- You may inspect files and run safe read-only commands when needed.\n- Treat previous conversation as context, not as the target unless the latest user message says so.\n- Prefer concrete file/line references when available.\n- If there are no substantive issues, say that clearly and mention residual risks or test gaps."
32
30
  },
33
31
  {
34
32
  "kind": "slot",
@@ -58,20 +56,6 @@
58
56
  "role": "system",
59
57
  "slot": "date-cwd"
60
58
  },
61
- {
62
- "kind": "slot",
63
- "id": "variables",
64
- "name": "Review Variables",
65
- "enabled": true,
66
- "role": "system",
67
- "slot": "variables",
68
- "options": {
69
- "includeStatic": true,
70
- "includeSession": true,
71
- "includeTurn": false,
72
- "format": "plain"
73
- }
74
- },
75
59
  {
76
60
  "kind": "block",
77
61
  "id": "history-open",
@@ -109,7 +93,12 @@
109
93
  "name": "Current Review Target",
110
94
  "enabled": true,
111
95
  "role": "user",
112
- "content": "<review_target>\n{{lastUserMessage}}\n</review_target>\n\nReview this target now. Lead with findings, ordered by severity. Limit yourself to the most important {{max_findings}} findings unless the target asks for exhaustive review. Use this format:\n\nFindings:\n- [severity] file:line - issue, impact, and suggested fix.\n\nOpen questions:\n- List only questions that materially affect the review.\n\nIf no findings are present, write \"No blocking findings\" and then summarize remaining test or operational risk."
96
+ "content": "<review_target>\n{{ runtime.lastUserMessage }}\n</review_target>\n\nReview this target now. Lead with findings, ordered by severity. Limit yourself to the most important {{ parameters.max_findings }} findings unless the target asks for exhaustive review. Use this format:\n\nFindings:\n- [severity] file:line - issue, impact, and suggested fix.\n\nOpen questions:\n- List only questions that materially affect the review.\n\nIf no findings are present, write \"No blocking findings\" and then summarize remaining test or operational risk."
113
97
  }
114
- ]
98
+ ],
99
+ "parameters": {
100
+ "review_focus": "correctness, regressions, security, maintainability, and missing tests",
101
+ "review_style": "findings first, ordered by severity",
102
+ "max_findings": "8"
103
+ }
115
104
  }
package/package.json CHANGED
@@ -1,122 +1,108 @@
1
1
  {
2
- "name": "@zihanw/pi-forge",
3
- "version": "0.4.1",
4
- "description": "Pi extension for prompt stacks, one-shot agent profiles, policy, import, and debugging.",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/MacroSony/pi-forge.git"
8
- },
9
- "type": "module",
10
- "exports": {
11
- ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.js",
14
- "default": "./dist/index.js"
15
- },
16
- "./subagent": {
17
- "types": "./dist/subagent/index.d.ts",
18
- "import": "./dist/subagent/index.js",
19
- "default": "./dist/subagent/index.js"
20
- },
21
- "./src/*.ts": {
22
- "types": "./dist/*.d.ts",
23
- "import": "./dist/*.js",
24
- "default": "./dist/*.js"
25
- },
26
- "./src/*.js": {
27
- "types": "./dist/*.d.ts",
28
- "import": "./dist/*.js",
29
- "default": "./dist/*.js"
30
- },
31
- "./src/*": {
32
- "types": "./dist/*.d.ts",
33
- "import": "./dist/*.js",
34
- "default": "./dist/*.js"
35
- },
36
- "./src/web-editor/client/*": null,
37
- "./examples/*": "./examples/*"
38
- },
39
- "keywords": [
40
- "pi-package",
41
- "pi-extension",
42
- "prompt-stack",
43
- "agent-profile"
44
- ],
45
- "license": "MIT",
46
- "engines": {
47
- "node": ">=22.19.0"
48
- },
49
- "pi": {
50
- "extensions": [
51
- "./dist/index.js"
52
- ]
53
- },
54
- "peerDependencies": {
55
- "@earendil-works/pi-agent-core": "*",
56
- "@earendil-works/pi-ai": "*",
57
- "@earendil-works/pi-coding-agent": "*",
58
- "@earendil-works/pi-tui": "*",
59
- "typebox": "*"
60
- },
61
- "peerDependenciesMeta": {
62
- "@earendil-works/pi-agent-core": {
63
- "optional": true
64
- },
65
- "@earendil-works/pi-ai": {
66
- "optional": true
67
- },
68
- "@earendil-works/pi-coding-agent": {
69
- "optional": true
70
- },
71
- "@earendil-works/pi-tui": {
72
- "optional": true
73
- },
74
- "typebox": {
75
- "optional": true
76
- }
77
- },
78
- "dependencies": {
79
- "@zihanw/pi-subagent-runtime": "0.1.0-beta.2"
80
- },
81
- "devDependencies": {
82
- "@earendil-works/pi-agent-core": "0.83.0",
83
- "@earendil-works/pi-ai": "0.83.0",
84
- "@earendil-works/pi-coding-agent": "0.83.0",
85
- "@earendil-works/pi-tui": "0.83.0",
86
- "@types/node": "22.20.1",
87
- "@vitejs/plugin-vue": "6.0.8",
88
- "playwright-core": "1.61.1",
89
- "typebox": "1.3.7",
90
- "typescript": "6.0.3",
91
- "vite": "8.1.5",
92
- "vue": "3.5.40",
93
- "vue-tsc": "3.3.8"
94
- },
95
- "scripts": {
96
- "build": "npm run build:client && tsc -p tsconfig.build.json",
97
- "build:client": "node scripts/build-web-client.mjs",
98
- "check:client": "node scripts/build-web-client.mjs --check",
99
- "check:docs": "node scripts/check-docs.mjs",
100
- "check:dist": "node scripts/check-dist.mjs",
101
- "check:package": "node scripts/check-package.mjs",
102
- "prepack": "npm run build",
103
- "typecheck": "tsc --noEmit && vue-tsc --noEmit -p tsconfig.web.json",
104
- "test": "node --test tests/*.test.ts",
105
- "test:browser": "node --test --test-concurrency=1 tests-browser/*.test.ts",
106
- "verify": "npm test && npm run test:browser && npm run typecheck && npm run check:client && npm run check:docs && npm run check:dist && npm run check:package"
107
- },
108
- "files": [
109
- "dist/",
110
- "docs/",
111
- "examples/",
112
- "README.md",
113
- "README.zh-CN.md",
114
- "CHANGELOG.md",
115
- "SUBAGENT_ADAPTER_CONTRACT.md",
116
- "PUBLIC_API.md",
117
- "LICENSE*"
118
- ],
119
- "publishConfig": {
120
- "access": "public"
121
- }
2
+ "name": "@zihanw/pi-forge",
3
+ "version": "0.5.1",
4
+ "description": "Pi extension for prompt stacks, one-shot agent profiles, policy, import, and debugging.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/MacroSony/pi-forge.git"
8
+ },
9
+ "type": "module",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "default": "./dist/index.js"
15
+ },
16
+ "./subagent": {
17
+ "types": "./dist/subagent/index.d.ts",
18
+ "import": "./dist/subagent/index.js",
19
+ "default": "./dist/subagent/index.js"
20
+ },
21
+ "./ui-contribution": {
22
+ "types": "./dist/ui-contribution/index.d.ts",
23
+ "import": "./dist/ui-contribution/index.js",
24
+ "default": "./dist/ui-contribution/index.js"
25
+ }
26
+ },
27
+ "keywords": [
28
+ "pi-package",
29
+ "pi-extension",
30
+ "prompt-stack",
31
+ "agent-profile"
32
+ ],
33
+ "license": "MIT",
34
+ "engines": {
35
+ "node": ">=22.19.0"
36
+ },
37
+ "pi": {
38
+ "extensions": [
39
+ "./dist/index.js"
40
+ ]
41
+ },
42
+ "peerDependencies": {
43
+ "@earendil-works/pi-agent-core": "*",
44
+ "@earendil-works/pi-ai": "*",
45
+ "@earendil-works/pi-coding-agent": "*",
46
+ "@earendil-works/pi-tui": "*",
47
+ "typebox": "*"
48
+ },
49
+ "peerDependenciesMeta": {
50
+ "@earendil-works/pi-agent-core": {
51
+ "optional": true
52
+ },
53
+ "@earendil-works/pi-ai": {
54
+ "optional": true
55
+ },
56
+ "@earendil-works/pi-coding-agent": {
57
+ "optional": true
58
+ },
59
+ "@earendil-works/pi-tui": {
60
+ "optional": true
61
+ },
62
+ "typebox": {
63
+ "optional": true
64
+ }
65
+ },
66
+ "devDependencies": {
67
+ "@earendil-works/pi-agent-core": "0.84.2",
68
+ "@earendil-works/pi-ai": "0.84.2",
69
+ "@earendil-works/pi-coding-agent": "0.84.2",
70
+ "@earendil-works/pi-tui": "0.84.2",
71
+ "@types/node": "22.20.1",
72
+ "@vitejs/plugin-vue": "6.0.8",
73
+ "playwright-core": "1.61.1",
74
+ "typebox": "1.3.7",
75
+ "typescript": "6.0.3",
76
+ "vite": "8.1.5",
77
+ "vue": "3.5.40",
78
+ "vue-tsc": "3.3.8"
79
+ },
80
+ "scripts": {
81
+ "build": "npm run build:client && tsc -p tsconfig.build.json",
82
+ "build:client": "node scripts/build-web-client.mjs",
83
+ "check:client": "node scripts/build-web-client.mjs --check",
84
+ "check:docs": "node scripts/check-docs.mjs",
85
+ "check:dist": "node scripts/check-dist.mjs",
86
+ "check:package": "node scripts/check-package.mjs",
87
+ "prepack": "npm run build",
88
+ "typecheck": "tsc --noEmit && vue-tsc --noEmit -p tsconfig.web.json",
89
+ "test": "node --test tests/*.test.ts",
90
+ "test:browser": "node --test --test-concurrency=1 tests-browser/*.test.ts",
91
+ "verify": "npm test && npm run test:browser && npm run typecheck && npm run check:client && npm run check:docs && npm run check:dist && npm run check:package && npm run check:packed",
92
+ "check:packed": "node scripts/check-packed-install.mjs"
93
+ },
94
+ "files": [
95
+ "dist/",
96
+ "docs/",
97
+ "examples/",
98
+ "README.md",
99
+ "README.zh-CN.md",
100
+ "CHANGELOG.md",
101
+ "SUBAGENT_ADAPTER_CONTRACT.md",
102
+ "PUBLIC_API.md",
103
+ "LICENSE*"
104
+ ],
105
+ "publishConfig": {
106
+ "access": "public"
107
+ }
122
108
  }