@pasko70/pibo 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/README.md +106 -254
  2. package/context/codex-base-prompt.md +4 -0
  3. package/context/compute-worker.md +23 -0
  4. package/context/pibo-native-tooling.md +18 -0
  5. package/context/pibo-system-prompt.md +69 -8
  6. package/dist/api/simple-agent-api.js +136 -0
  7. package/dist/app-context.js +4 -0
  8. package/dist/apps/chat/agent-profiles.js +18 -3
  9. package/dist/apps/chat/agent-store.js +113 -16
  10. package/dist/apps/chat/chat-api-routes.js +311 -0
  11. package/dist/apps/chat/chat-capability-routes.js +90 -0
  12. package/dist/apps/chat/chat-files.js +178 -0
  13. package/dist/apps/chat/chat-request-normalizers.js +681 -0
  14. package/dist/apps/chat/chat-settings-routes.js +75 -0
  15. package/dist/apps/chat/chat-trace-helpers.js +94 -0
  16. package/dist/apps/chat/chat-user-skill-routes.js +149 -0
  17. package/dist/apps/chat/cron-api.js +213 -0
  18. package/dist/apps/chat/data/chat-data-mappers.js +74 -0
  19. package/dist/apps/chat/data/event-command-service.js +75 -0
  20. package/dist/apps/chat/data/navigation-query-service.js +11 -0
  21. package/dist/apps/chat/data/project-service.js +844 -0
  22. package/dist/apps/chat/data/read-state-service.js +42 -0
  23. package/dist/apps/chat/data/room-service.js +52 -0
  24. package/dist/apps/chat/data/session-query-service.js +63 -0
  25. package/dist/apps/chat/data/timeline-query-service.js +96 -0
  26. package/dist/apps/chat/event-log.js +1 -307
  27. package/dist/apps/chat/model-catalog.js +7 -2
  28. package/dist/apps/chat/output-compactor.js +126 -0
  29. package/dist/apps/chat/output-event-policy.js +17 -0
  30. package/dist/apps/chat/project-workflow-human-actions.js +347 -0
  31. package/dist/apps/chat/project-workflow-sessions.js +260 -0
  32. package/dist/apps/chat/provider-auth-actions.js +43 -0
  33. package/dist/apps/chat/ralph-api.js +156 -0
  34. package/dist/apps/chat/read-model.js +1 -218
  35. package/dist/apps/chat/rooms.js +1 -321
  36. package/dist/apps/chat/static-assets.js +996 -0
  37. package/dist/apps/chat/stream.js +29 -6
  38. package/dist/apps/chat/trace.js +179 -1003
  39. package/dist/apps/chat/types/event-store.js +1 -0
  40. package/dist/apps/chat/types/read-model.js +1 -0
  41. package/dist/apps/chat/types/rooms.js +36 -0
  42. package/dist/apps/chat/web-app.js +3131 -1959
  43. package/dist/apps/chat/workflow-catalog.js +572 -0
  44. package/dist/apps/chat/workflow-edge-compatibility.js +51 -0
  45. package/dist/apps/chat/workflow-json-schema-validation.js +335 -0
  46. package/dist/apps/chat/workflow-persistence-model.js +140 -0
  47. package/dist/apps/chat/workflow-persistence.js +633 -0
  48. package/dist/apps/chat/workflow-registered-ref-params.js +130 -0
  49. package/dist/apps/chat/workflow-registered-ref-pickers.js +179 -0
  50. package/dist/apps/chat/workflow-registered-ref-validation.js +210 -0
  51. package/dist/apps/chat/workflow-v2-security-validation.js +93 -0
  52. package/dist/apps/chat/workflow-validation-helpers.js +114 -0
  53. package/dist/apps/chat-ui/assets/{dist-CNLWH2qh.js → dist-B4lw9z4F.js} +1 -1
  54. package/dist/apps/chat-ui/assets/{dist-8e4L8ciw.js → dist-BbTaHWON.js} +1 -1
  55. package/dist/apps/chat-ui/assets/{dist-CMZOa5ik.js → dist-BcT_c1EJ.js} +1 -1
  56. package/dist/apps/chat-ui/assets/{dist-DNcnQRPF.js → dist-CGINd7XU.js} +1 -1
  57. package/dist/apps/chat-ui/assets/{dist-CqqUC8Ce.js → dist-CrBzZkUp.js} +1 -1
  58. package/dist/apps/chat-ui/assets/{dist-D2N4-LIc.js → dist-CyyISotB.js} +1 -1
  59. package/dist/apps/chat-ui/assets/{dist-CUqpST5w.js → dist-DFbnFNpX.js} +1 -1
  60. package/dist/apps/chat-ui/assets/{dist-CspjOeBj.js → dist-DGLWQLX8.js} +1 -1
  61. package/dist/apps/chat-ui/assets/{dist-B7bbI3Qz.js → dist-DfcIkFSN.js} +1 -1
  62. package/dist/apps/chat-ui/assets/{dist-v4pjHlB7.js → dist-sKDHTwaT.js} +1 -1
  63. package/dist/apps/chat-ui/assets/{dist-D9L4MSRF.js → dist-y9D6la48.js} +1 -1
  64. package/dist/apps/chat-ui/assets/index-C25VYnyb.css +1 -0
  65. package/dist/apps/chat-ui/assets/index-CUkuvI3v.js +165 -0
  66. package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-144x144.png +0 -0
  67. package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-192x192.png +0 -0
  68. package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-48x48.png +0 -0
  69. package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-512x512.png +0 -0
  70. package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-72x72.png +0 -0
  71. package/dist/apps/chat-ui/assets/pwa-images/android/launchericon-96x96.png +0 -0
  72. package/dist/apps/chat-ui/assets/pwa-images/ios/100.png +0 -0
  73. package/dist/apps/chat-ui/assets/pwa-images/ios/1024.png +0 -0
  74. package/dist/apps/chat-ui/assets/pwa-images/ios/114.png +0 -0
  75. package/dist/apps/chat-ui/assets/pwa-images/ios/120.png +0 -0
  76. package/dist/apps/chat-ui/assets/pwa-images/ios/128.png +0 -0
  77. package/dist/apps/chat-ui/assets/pwa-images/ios/144.png +0 -0
  78. package/dist/apps/chat-ui/assets/pwa-images/ios/152.png +0 -0
  79. package/dist/apps/chat-ui/assets/pwa-images/ios/16.png +0 -0
  80. package/dist/apps/chat-ui/assets/pwa-images/ios/167.png +0 -0
  81. package/dist/apps/chat-ui/assets/pwa-images/ios/180.png +0 -0
  82. package/dist/apps/chat-ui/assets/pwa-images/ios/192.png +0 -0
  83. package/dist/apps/chat-ui/assets/pwa-images/ios/20.png +0 -0
  84. package/dist/apps/chat-ui/assets/pwa-images/ios/256.png +0 -0
  85. package/dist/apps/chat-ui/assets/pwa-images/ios/29.png +0 -0
  86. package/dist/apps/chat-ui/assets/pwa-images/ios/32.png +0 -0
  87. package/dist/apps/chat-ui/assets/pwa-images/ios/40.png +0 -0
  88. package/dist/apps/chat-ui/assets/pwa-images/ios/50.png +0 -0
  89. package/dist/apps/chat-ui/assets/pwa-images/ios/512.png +0 -0
  90. package/dist/apps/chat-ui/assets/pwa-images/ios/57.png +0 -0
  91. package/dist/apps/chat-ui/assets/pwa-images/ios/58.png +0 -0
  92. package/dist/apps/chat-ui/assets/pwa-images/ios/60.png +0 -0
  93. package/dist/apps/chat-ui/assets/pwa-images/ios/64.png +0 -0
  94. package/dist/apps/chat-ui/assets/pwa-images/ios/72.png +0 -0
  95. package/dist/apps/chat-ui/assets/pwa-images/ios/76.png +0 -0
  96. package/dist/apps/chat-ui/assets/pwa-images/ios/80.png +0 -0
  97. package/dist/apps/chat-ui/assets/pwa-images/ios/87.png +0 -0
  98. package/dist/apps/chat-ui/assets/pwa-images/windows/LargeTile.scale-100.png +0 -0
  99. package/dist/apps/chat-ui/assets/pwa-images/windows/LargeTile.scale-125.png +0 -0
  100. package/dist/apps/chat-ui/assets/pwa-images/windows/LargeTile.scale-150.png +0 -0
  101. package/dist/apps/chat-ui/assets/pwa-images/windows/LargeTile.scale-200.png +0 -0
  102. package/dist/apps/chat-ui/assets/pwa-images/windows/LargeTile.scale-400.png +0 -0
  103. package/dist/apps/chat-ui/assets/pwa-images/windows/SmallTile.scale-100.png +0 -0
  104. package/dist/apps/chat-ui/assets/pwa-images/windows/SmallTile.scale-125.png +0 -0
  105. package/dist/apps/chat-ui/assets/pwa-images/windows/SmallTile.scale-150.png +0 -0
  106. package/dist/apps/chat-ui/assets/pwa-images/windows/SmallTile.scale-200.png +0 -0
  107. package/dist/apps/chat-ui/assets/pwa-images/windows/SmallTile.scale-400.png +0 -0
  108. package/dist/apps/chat-ui/assets/pwa-images/windows/SplashScreen.scale-100.png +0 -0
  109. package/dist/apps/chat-ui/assets/pwa-images/windows/SplashScreen.scale-125.png +0 -0
  110. package/dist/apps/chat-ui/assets/pwa-images/windows/SplashScreen.scale-150.png +0 -0
  111. package/dist/apps/chat-ui/assets/pwa-images/windows/SplashScreen.scale-200.png +0 -0
  112. package/dist/apps/chat-ui/assets/pwa-images/windows/SplashScreen.scale-400.png +0 -0
  113. package/dist/apps/chat-ui/assets/pwa-images/windows/Square150x150Logo.scale-100.png +0 -0
  114. package/dist/apps/chat-ui/assets/pwa-images/windows/Square150x150Logo.scale-125.png +0 -0
  115. package/dist/apps/chat-ui/assets/pwa-images/windows/Square150x150Logo.scale-150.png +0 -0
  116. package/dist/apps/chat-ui/assets/pwa-images/windows/Square150x150Logo.scale-200.png +0 -0
  117. package/dist/apps/chat-ui/assets/pwa-images/windows/Square150x150Logo.scale-400.png +0 -0
  118. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-16.png +0 -0
  119. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-20.png +0 -0
  120. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-24.png +0 -0
  121. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-256.png +0 -0
  122. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-30.png +0 -0
  123. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-32.png +0 -0
  124. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-36.png +0 -0
  125. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-40.png +0 -0
  126. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-44.png +0 -0
  127. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-48.png +0 -0
  128. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-60.png +0 -0
  129. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-64.png +0 -0
  130. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-72.png +0 -0
  131. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-80.png +0 -0
  132. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-lightunplated_targetsize-96.png +0 -0
  133. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-16.png +0 -0
  134. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-20.png +0 -0
  135. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-24.png +0 -0
  136. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-256.png +0 -0
  137. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-30.png +0 -0
  138. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-32.png +0 -0
  139. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-36.png +0 -0
  140. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-40.png +0 -0
  141. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-44.png +0 -0
  142. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-48.png +0 -0
  143. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-60.png +0 -0
  144. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-64.png +0 -0
  145. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-72.png +0 -0
  146. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-80.png +0 -0
  147. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.altform-unplated_targetsize-96.png +0 -0
  148. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.scale-100.png +0 -0
  149. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.scale-125.png +0 -0
  150. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.scale-150.png +0 -0
  151. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.scale-200.png +0 -0
  152. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.scale-400.png +0 -0
  153. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-16.png +0 -0
  154. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-20.png +0 -0
  155. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-24.png +0 -0
  156. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-256.png +0 -0
  157. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-30.png +0 -0
  158. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-32.png +0 -0
  159. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-36.png +0 -0
  160. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-40.png +0 -0
  161. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-44.png +0 -0
  162. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-48.png +0 -0
  163. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-60.png +0 -0
  164. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-64.png +0 -0
  165. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-72.png +0 -0
  166. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-80.png +0 -0
  167. package/dist/apps/chat-ui/assets/pwa-images/windows/Square44x44Logo.targetsize-96.png +0 -0
  168. package/dist/apps/chat-ui/assets/pwa-images/windows/StoreLogo.scale-100.png +0 -0
  169. package/dist/apps/chat-ui/assets/pwa-images/windows/StoreLogo.scale-125.png +0 -0
  170. package/dist/apps/chat-ui/assets/pwa-images/windows/StoreLogo.scale-150.png +0 -0
  171. package/dist/apps/chat-ui/assets/pwa-images/windows/StoreLogo.scale-200.png +0 -0
  172. package/dist/apps/chat-ui/assets/pwa-images/windows/StoreLogo.scale-400.png +0 -0
  173. package/dist/apps/chat-ui/assets/pwa-images/windows/Wide310x150Logo.scale-100.png +0 -0
  174. package/dist/apps/chat-ui/assets/pwa-images/windows/Wide310x150Logo.scale-125.png +0 -0
  175. package/dist/apps/chat-ui/assets/pwa-images/windows/Wide310x150Logo.scale-150.png +0 -0
  176. package/dist/apps/chat-ui/assets/pwa-images/windows/Wide310x150Logo.scale-200.png +0 -0
  177. package/dist/apps/chat-ui/assets/pwa-images/windows/Wide310x150Logo.scale-400.png +0 -0
  178. package/dist/apps/chat-ui/index.html +8 -3
  179. package/dist/apps/chat-ui/manifest.webmanifest +25 -0
  180. package/dist/apps/chat-ui/sw.js +41 -0
  181. package/dist/apps/chat-vscode-web/assets/index-B5QK07zO.css +2 -0
  182. package/dist/apps/chat-vscode-web/assets/index-C3GTPyDo.js +41 -0
  183. package/dist/apps/chat-vscode-web/index.html +14 -0
  184. package/dist/apps/cli-ui/InkSessionApp.js +1218 -0
  185. package/dist/apps/cli-ui/InkTerminalLine.js +53 -0
  186. package/dist/apps/cli-ui/InkTerminalRow.js +304 -0
  187. package/dist/apps/cli-ui/InkTerminalView.js +25 -0
  188. package/dist/apps/cli-ui/cliSessionsCommand.js +232 -0
  189. package/dist/apps/cli-ui/index.js +8 -0
  190. package/dist/apps/cli-ui/inkColors.js +67 -0
  191. package/dist/apps/cli-ui/inkJson.js +244 -0
  192. package/dist/apps/cli-ui/inkMarkdown.js +122 -0
  193. package/dist/apps/context-files-ui/assets/{dist-DFi2YGux.js → dist-BOiGdrG-.js} +1 -1
  194. package/dist/apps/context-files-ui/assets/{dist-DyfSeBMu.js → dist-DK01b7x4.js} +1 -1
  195. package/dist/apps/context-files-ui/assets/{dist-CwbH_3RN.js → dist-DPG9jOQ-.js} +1 -1
  196. package/dist/apps/context-files-ui/assets/{dist-dTBsFYAl.js → dist-Dp5AH00p.js} +1 -1
  197. package/dist/apps/context-files-ui/assets/{dist-CxRLRmMx.js → dist-DqYw0LH7.js} +1 -1
  198. package/dist/apps/context-files-ui/assets/{dist-MyZgX9K2.js → dist-TF5iO5ML.js} +1 -1
  199. package/dist/apps/context-files-ui/assets/{dist-DQXzt2Ng.js → dist-TbjAhles.js} +1 -1
  200. package/dist/apps/context-files-ui/assets/{dist-YwR9dpb-.js → dist-ZsBbt0uY.js} +1 -1
  201. package/dist/apps/context-files-ui/assets/{dist-CKQF1zEu.js → dist-kmsvtHkH.js} +1 -1
  202. package/dist/apps/context-files-ui/assets/{dist-BJW3917N.js → dist-vnd7PMu3.js} +1 -1
  203. package/dist/apps/context-files-ui/assets/{index-BwRDoHMC.css → index-B92tL3Pp.css} +1 -1
  204. package/dist/apps/context-files-ui/assets/{index-GwvjXytt.js → index-BhAWD3dv.js} +2 -2
  205. package/dist/apps/context-files-ui/index.html +2 -2
  206. package/dist/apps/vscode-artifacts/latest.vsix +0 -0
  207. package/dist/apps/vscode-artifacts/pibo-vscode-1.3.0.vsix +0 -0
  208. package/dist/auth/better-auth.js +2 -1
  209. package/dist/auth/login-actions.js +251 -0
  210. package/dist/auth/openai-codex-usage.js +147 -0
  211. package/dist/bin/pibo.js +0 -0
  212. package/dist/bin/rg.js +15 -0
  213. package/dist/cli-session/fakeSessionSource.js +804 -0
  214. package/dist/cli-session/index.js +3 -0
  215. package/dist/cli-session/localSessionSource.js +1144 -0
  216. package/dist/cli-session/sessionSource.js +13 -0
  217. package/dist/cli.js +159 -14
  218. package/dist/compute/cli.js +415 -0
  219. package/dist/compute/docker.js +827 -0
  220. package/dist/compute/resource-health.js +333 -0
  221. package/dist/compute/resource-policy.js +98 -0
  222. package/dist/config/config.js +9 -5
  223. package/dist/core/context-build.js +677 -0
  224. package/dist/core/model-defaults.js +51 -9
  225. package/dist/core/pibo-home.js +8 -0
  226. package/dist/core/profiles.js +48 -0
  227. package/dist/core/provider-telemetry.js +222 -0
  228. package/dist/core/routed-session.js +441 -47
  229. package/dist/core/runtime-telemetry.js +853 -0
  230. package/dist/core/runtime.js +103 -15
  231. package/dist/core/session-errors.js +47 -0
  232. package/dist/core/session-model.js +39 -0
  233. package/dist/core/session-router.js +292 -62
  234. package/dist/core/shared-app.js +17 -0
  235. package/dist/core/skill-expansion.js +43 -0
  236. package/dist/core/system-prompt-template.js +9 -9
  237. package/dist/core/telemetry-staleness.js +128 -0
  238. package/dist/core/test-output-compaction.js +145 -0
  239. package/dist/core/user-settings.js +73 -0
  240. package/dist/cron/channel.js +28 -0
  241. package/dist/cron/cli.js +230 -0
  242. package/dist/cron/plugin.js +11 -0
  243. package/dist/cron/schedule.js +214 -0
  244. package/dist/cron/service.js +177 -0
  245. package/dist/cron/store.js +349 -0
  246. package/dist/cron/types.js +1 -0
  247. package/dist/data/cli.js +184 -0
  248. package/dist/data/event-log.js +106 -0
  249. package/dist/data/final-app-space-cutover-migration.js +728 -0
  250. package/dist/data/ingest-service.js +389 -0
  251. package/dist/data/message-store.js +62 -0
  252. package/dist/data/navigation-store.js +75 -0
  253. package/dist/data/observation-store.js +46 -0
  254. package/dist/data/payload-store.js +144 -0
  255. package/dist/data/pibo-store.js +59 -0
  256. package/dist/data/schema.js +434 -0
  257. package/dist/data/session-store.js +63 -0
  258. package/dist/data/shared-app-migration.js +757 -0
  259. package/dist/data/sqlite-schema.js +12 -0
  260. package/dist/data/telemetry-preview.js +65 -0
  261. package/dist/data/telemetry-queries.js +212 -0
  262. package/dist/data/telemetry-retention.js +50 -0
  263. package/dist/data/telemetry-rows.js +158 -0
  264. package/dist/data/telemetry.js +357 -0
  265. package/dist/debug/delta-compaction.js +99 -0
  266. package/dist/debug/detail-format.js +86 -0
  267. package/dist/debug/events.js +149 -29
  268. package/dist/debug/failures.js +162 -0
  269. package/dist/debug/index.js +655 -30
  270. package/dist/debug/messages.js +185 -0
  271. package/dist/debug/next-commands.js +6 -0
  272. package/dist/debug/payloads.js +123 -0
  273. package/dist/debug/pty.js +924 -0
  274. package/dist/debug/session.js +45 -15
  275. package/dist/debug/sql.js +1 -1
  276. package/dist/debug/stores.js +18 -13
  277. package/dist/debug/summary.js +72 -0
  278. package/dist/debug/telemetry.js +649 -0
  279. package/dist/debug/tools.js +168 -0
  280. package/dist/debug/trace-render-check.js +151 -0
  281. package/dist/debug/trace.js +152 -27
  282. package/dist/debug/web-artifacts.js +63 -0
  283. package/dist/debug/web-options.js +313 -0
  284. package/dist/debug/web-render-analysis.js +310 -0
  285. package/dist/debug/web-snapshot-browser-scripts.js +303 -0
  286. package/dist/debug/web-streaming-benchmark-analysis.js +605 -0
  287. package/dist/debug/web-streaming-browser-library.js +928 -0
  288. package/dist/debug/web-streaming-browser-scripts.js +242 -0
  289. package/dist/debug/web-streaming-provider-telemetry.js +194 -0
  290. package/dist/debug/web-streaming-report.js +493 -0
  291. package/dist/debug/web-streaming-types.js +1 -0
  292. package/dist/debug/web.js +574 -0
  293. package/dist/gateway/backup.js +83 -0
  294. package/dist/gateway/cli.js +511 -0
  295. package/dist/gateway/fallback.js +155 -0
  296. package/dist/gateway/pidfile.js +84 -0
  297. package/dist/gateway/protocol.js +16 -0
  298. package/dist/gateway/server.js +172 -17
  299. package/dist/gateway/tool.js +54 -51
  300. package/dist/gateway/web.js +74 -2
  301. package/dist/index.js +3 -1
  302. package/dist/local/client.js +3 -3
  303. package/dist/local/extension.js +8 -5
  304. package/dist/plugins/builtin.js +251 -49
  305. package/dist/plugins/chat-vscode-web.js +28 -0
  306. package/dist/plugins/codex-compat.js +0 -41
  307. package/dist/plugins/context-files.js +98 -18
  308. package/dist/plugins/dev-auth.js +124 -0
  309. package/dist/plugins/native-tooling.js +15 -0
  310. package/dist/plugins/registry.js +49 -1
  311. package/dist/plugins/web-annotations.js +27 -0
  312. package/dist/providers/minimax.js +70 -0
  313. package/dist/providers/openai-compat.js +48 -0
  314. package/dist/ralph/channel.js +8 -0
  315. package/dist/ralph/cli.js +152 -0
  316. package/dist/ralph/plugin.js +14 -0
  317. package/dist/ralph/service.js +271 -0
  318. package/dist/ralph/stopping.js +151 -0
  319. package/dist/ralph/store.js +450 -0
  320. package/dist/ralph/templates.js +200 -0
  321. package/dist/ralph/types.js +1 -0
  322. package/dist/reliability/store.js +42 -26
  323. package/dist/runs/registry.js +72 -35
  324. package/dist/session-ui/commandCatalog.js +193 -0
  325. package/dist/session-ui/commandResults.js +95 -0
  326. package/dist/session-ui/index.js +7 -0
  327. package/dist/session-ui/ownerViewModel.js +27 -0
  328. package/dist/session-ui/roomSessionViewModel.js +69 -0
  329. package/dist/session-ui/statusViewModel.js +127 -0
  330. package/dist/session-ui/terminalCards.js +210 -0
  331. package/dist/session-ui/terminalRows.js +937 -0
  332. package/dist/session-ui/terminalValue.js +45 -0
  333. package/dist/sessions/pibo-data-store.js +178 -0
  334. package/dist/sessions/sqlite-store.js +78 -12
  335. package/dist/sessions/store.js +11 -4
  336. package/dist/sessions/workflow-session-kind.js +20 -0
  337. package/dist/setup/cli.js +567 -0
  338. package/dist/shared/trace-async-agent-runs.js +127 -0
  339. package/dist/shared/trace-engine.js +96 -0
  340. package/dist/shared/trace-event-projection.js +679 -0
  341. package/dist/shared/trace-live-reducer.js +191 -0
  342. package/dist/shared/trace-nodes.js +76 -0
  343. package/dist/shared/trace-order.js +11 -10
  344. package/dist/shared/trace-patch-nodes.js +83 -0
  345. package/dist/shared/trace-run-notifications.js +69 -0
  346. package/dist/shared/trace-subagent-links.js +46 -0
  347. package/dist/shared/trace-transcript.js +303 -0
  348. package/dist/shared/trace-types.js +1 -0
  349. package/dist/shared-app.js +4 -0
  350. package/dist/signals/aggregate.js +65 -0
  351. package/dist/signals/events.js +1 -0
  352. package/dist/signals/projector.js +158 -0
  353. package/dist/signals/registry.js +513 -0
  354. package/dist/signals/store.js +1 -0
  355. package/dist/signals/types.js +1 -0
  356. package/dist/skills/cli.js +117 -0
  357. package/dist/tools/agent-browser-leases.js +219 -0
  358. package/dist/tools/agent-browser-wrapper.js +99 -0
  359. package/dist/tools/browser-pool.js +623 -0
  360. package/dist/tools/browser-use-cdp.js +56 -4
  361. package/dist/tools/browser-use-leases.js +215 -37
  362. package/dist/tools/browser-use-wrapper.js +508 -65
  363. package/dist/tools/cdp-client.js +189 -0
  364. package/dist/tools/guides.js +203 -4
  365. package/dist/tools/index.js +666 -16
  366. package/dist/tools/npm-runtime.js +136 -0
  367. package/dist/tools/registry.js +107 -8
  368. package/dist/tools/runtime/index.js +3 -0
  369. package/dist/tools/runtime/node-backend.js +225 -0
  370. package/dist/tools/runtime/node-worker-source.js +206 -0
  371. package/dist/tools/runtime/python-backend.js +227 -0
  372. package/dist/tools/runtime/python-worker-source.js +178 -0
  373. package/dist/tools/runtime/registry.js +255 -0
  374. package/dist/tools/runtime/tool.js +168 -0
  375. package/dist/tools/runtime/types.js +1 -0
  376. package/dist/tools/web-search.js +2 -1
  377. package/dist/user-skills/installer.js +39 -36
  378. package/dist/user-skills/store.js +50 -11
  379. package/dist/vscode/cli.js +90 -0
  380. package/dist/vscode/code-cli.js +119 -0
  381. package/dist/vscode/install.js +177 -0
  382. package/dist/vscode/status.js +80 -0
  383. package/dist/vscode/types.js +14 -0
  384. package/dist/vscode/uninstall.js +49 -0
  385. package/dist/vscode/vsix-fetcher.js +131 -0
  386. package/dist/web/auth.js +5 -1
  387. package/dist/web/channel.js +86 -0
  388. package/dist/web/http.js +79 -14
  389. package/dist/web-annotations/api.js +348 -0
  390. package/dist/web-annotations/attachments.js +201 -0
  391. package/dist/web-annotations/cdp.js +1107 -0
  392. package/dist/web-annotations/index.js +7 -0
  393. package/dist/web-annotations/store.js +407 -0
  394. package/dist/web-annotations/tools.js +350 -0
  395. package/dist/web-annotations/types.js +34 -0
  396. package/dist/web-annotations/validation.js +288 -0
  397. package/docs/README.md +23 -0
  398. package/docs/ops/install-developer-host.md +112 -0
  399. package/docs/ops/install-user-host.md +76 -0
  400. package/docs/ops/upgrade-user-to-developer-host.md +69 -0
  401. package/docs/ops/vscode-extension-release.md +138 -0
  402. package/package.json +24 -9
  403. package/skills/builtin/pi-agent-harness/SKILL.md +24 -24
  404. package/skills/builtin/pibo-docker-system/SKILL.md +170 -0
  405. package/skills/builtin/pibo-spec-writing/SKILL.md +330 -0
  406. package/skills/builtin/prd/SKILL.md +143 -0
  407. package/skills/builtin/ralph-loop/SKILL.md +359 -0
  408. package/skills/builtin/ralph-prd-json/SKILL.md +123 -0
  409. package/skills/builtin/skill-creator/LICENSE.txt +202 -0
  410. package/skills/builtin/skill-creator/SKILL.md +513 -0
  411. package/skills/builtin/skill-creator/agents/analyzer.md +274 -0
  412. package/skills/builtin/skill-creator/agents/comparator.md +202 -0
  413. package/skills/builtin/skill-creator/agents/grader.md +223 -0
  414. package/skills/builtin/skill-creator/assets/eval_review.html +146 -0
  415. package/skills/builtin/skill-creator/eval-viewer/generate_review.py +471 -0
  416. package/skills/builtin/skill-creator/eval-viewer/viewer.html +1325 -0
  417. package/skills/builtin/skill-creator/references/schemas.md +430 -0
  418. package/skills/builtin/skill-creator/scripts/__init__.py +0 -0
  419. package/skills/builtin/skill-creator/scripts/aggregate_benchmark.py +401 -0
  420. package/skills/builtin/skill-creator/scripts/generate_report.py +326 -0
  421. package/skills/builtin/skill-creator/scripts/improve_description.py +247 -0
  422. package/skills/builtin/skill-creator/scripts/package_skill.py +136 -0
  423. package/skills/builtin/skill-creator/scripts/quick_validate.py +103 -0
  424. package/skills/builtin/skill-creator/scripts/run_eval.py +310 -0
  425. package/skills/builtin/skill-creator/scripts/run_loop.py +328 -0
  426. package/skills/builtin/skill-creator/scripts/utils.py +47 -0
  427. package/skills/builtin/web-annotations/SKILL.md +93 -0
  428. package/dist/apps/chat-ui/assets/index-D2Qxambd.js +0 -151
  429. package/dist/apps/chat-ui/assets/index-DXx368XK.css +0 -1
  430. package/dist/env.js +0 -32
  431. package/dist/plugins/core-tools.js +0 -94
  432. package/dist/plugins/example.js +0 -67
  433. package/dist/plugins/remote-agent.js +0 -9
  434. package/dist/remote/channel.js +0 -176
  435. package/dist/remote/client.js +0 -92
  436. package/dist/remote/examples/tui-controller.js +0 -263
  437. package/dist/remote/protocol.js +0 -55
  438. package/dist/remote/session-client.js +0 -189
  439. package/dist/sessions/bindings.js +0 -41
package/docs/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # Pibo Documentation
2
+
3
+ This directory is the single home for project documentation, specs, plans, and reports.
4
+
5
+ ## Structure
6
+
7
+ ```text
8
+ docs/
9
+ project/ Normal/current project docs and other canonical documentation
10
+ specs/ Product, technical, and implementation specifications
11
+ plans/ Implementation plans and design plans
12
+ reports/ Investigation reports, validation reports, and generated report artifacts
13
+ legacy/ Previous documentation set kept for reference
14
+ ```
15
+
16
+ ## Rules
17
+
18
+ - Put normal/current project docs and other canonical documentation in `docs/project/`.
19
+ - Put specifications in `docs/specs/`.
20
+ - Put implementation plans in `docs/plans/`.
21
+ - Put investigation, validation, and incident reports in `docs/reports/`.
22
+ - Do not create new root-level `plans/`, `reports/`, or `specs/` directories.
23
+ - Do not delete legacy docs unless there is a separate cleanup decision.
@@ -0,0 +1,112 @@
1
+ # Install Pibo as a Developer Host
2
+
3
+ Use this path when the host is used to develop Pibo itself.
4
+
5
+ ## Philosophy
6
+
7
+ Production must stay stable while development moves quickly. The dev gateway can restart, fail, or deploy the `dev` branch without interrupting the main production gateway.
8
+
9
+ Docker compute workers are part of the developer setup. Each agent should get its own isolated container and gateway so agent restarts do not disturb other agents or the host gateways.
10
+
11
+ ## Target layout
12
+
13
+ ```text
14
+ /root/code/pibo main / production
15
+ /root/code/pibo/.worktrees/dev dev / development
16
+
17
+ /root/.pibo production data
18
+ /root/.pibo-dev development data
19
+
20
+ pibo-web.service prod web 4788, gateway 4789
21
+ pibo-web-dev.service dev web 4808, gateway 4809
22
+ ```
23
+
24
+ ## Remotes
25
+
26
+ Each developer host should use its own fork as `origin` and the canonical repo as `upstream`:
27
+
28
+ ```text
29
+ origin git@github.com:<server-or-user-fork>/pibo.git
30
+ upstream git@github.com:Pascapone/pibo.git
31
+ ```
32
+
33
+ ## Plan the setup
34
+
35
+ ```bash
36
+ pibo setup developer-host \
37
+ --origin git@github.com:<server-or-user-fork>/pibo.git \
38
+ --upstream git@github.com:Pascapone/pibo.git \
39
+ --prod-domain pibo.example.com \
40
+ --dev-domain dev.pibo.example.com \
41
+ --print-files
42
+ ```
43
+
44
+ Review the generated systemd units, dev start wrapper, environment template, and Caddyfile. Stage files before applying when testing a fresh host:
45
+
46
+ ```bash
47
+ pibo setup developer-host \
48
+ --origin git@github.com:<server-or-user-fork>/pibo.git \
49
+ --prod-domain pibo.example.com \
50
+ --dev-domain dev.pibo.example.com \
51
+ --write-to /tmp/pibo-setup
52
+ ```
53
+
54
+ Apply after review:
55
+
56
+ ```bash
57
+ pibo setup developer-host \
58
+ --origin git@github.com:<server-or-user-fork>/pibo.git \
59
+ --prod-domain pibo.example.com \
60
+ --dev-domain dev.pibo.example.com \
61
+ --apply --yes
62
+ systemctl daemon-reload
63
+ ```
64
+
65
+ ## Important detail: service pinning
66
+
67
+ Do not globally install the dev worktree over the production install. `npm install -g .` from a local checkout creates a global symlink to that checkout; running it again from the dev worktree can accidentally move `/usr/bin/pibo` to dev.
68
+
69
+ The generated developer services avoid this by pinning production to:
70
+
71
+ ```text
72
+ /usr/bin/node /root/code/pibo/dist/bin/pibo.js
73
+ ```
74
+
75
+ and dev to the wrapper in `/usr/local/bin/pibo-web-dev-start.mjs`, which imports the dev worktree directly.
76
+
77
+ Run this in each checkout/worktree instead:
78
+
79
+ ```bash
80
+ npm ci
81
+ npm run build
82
+ ```
83
+
84
+ ## Important detail: dev internal gateway port
85
+
86
+ Do not start dev only with:
87
+
88
+ ```bash
89
+ pibo gateway:web --web-port 4808
90
+ ```
91
+
92
+ That changes the web port but leaves the internal gateway at the default `4789`, which collides with production. The generated developer setup uses a wrapper that calls `runWebGatewayServer` with:
93
+
94
+ ```text
95
+ web port: 4808
96
+ internal port: 4809
97
+ ```
98
+
99
+ ## Validate
100
+
101
+ ```bash
102
+ systemctl is-active pibo-web
103
+ systemctl is-active pibo-web-dev
104
+ pibo gateway web status
105
+ PIBO_GATEWAY_DEV_PORT=4808 pibo gateway dev status
106
+ pibo setup doctor --domain pibo.example.com --dev-domain dev.pibo.example.com --expected-ip <server-ip> --require-docker --min-swap-gb 8
107
+ pibo compute spawn --help
108
+ ```
109
+
110
+ DNS must point to the host before Caddy can issue public certificates.
111
+
112
+ Docker and swap are developer-host prerequisites only. User-host installs can ignore Docker and swap. The setup command does not create swap automatically; provision it at the OS level, then verify it with `pibo setup doctor --min-swap-gb 8`.
@@ -0,0 +1,76 @@
1
+ # Install Pibo as a User Host
2
+
3
+ Use this path when you want to run Pibo, not develop Pibo itself.
4
+
5
+ ## What this installs
6
+
7
+ A user host has one gateway and one data directory:
8
+
9
+ ```text
10
+ /root/.pibo
11
+ pibo-web.service
12
+ 127.0.0.1:4788 web app
13
+ 127.0.0.1:4789 internal gateway
14
+ ```
15
+
16
+ It does not require Docker, a dev gateway, a GitHub App, or branch worktrees.
17
+
18
+ ## Recommended flow
19
+
20
+ ```bash
21
+ npm install -g @pasko70/pibo
22
+ pibo setup doctor --domain pibo.example.com --expected-ip <server-ip>
23
+ pibo setup user-host --domain pibo.example.com --print-files
24
+ ```
25
+
26
+ Review the generated files before installing them. To stage the exact paths without touching the host, use:
27
+
28
+ ```bash
29
+ pibo setup user-host --domain pibo.example.com --write-to /tmp/pibo-setup
30
+ find /tmp/pibo-setup -type f -maxdepth 5 -print
31
+ ```
32
+
33
+ After review, apply directly on the host with:
34
+
35
+ ```bash
36
+ pibo setup user-host --domain pibo.example.com --apply --yes
37
+ systemctl daemon-reload
38
+ ```
39
+
40
+ ## Configure auth
41
+
42
+ ```bash
43
+ pibo config set auth.baseURL https://pibo.example.com
44
+ pibo config set auth.secret <at-least-32-characters>
45
+ pibo config set auth.googleClientId <google-client-id>
46
+ pibo config set auth.googleClientSecret <google-client-secret>
47
+ pibo config set auth.allowedEmails you@example.com
48
+ ```
49
+
50
+ ## Start the gateway
51
+
52
+ `pibo-web` will not start until Better Auth config is complete. This cannot be automated because you must create/select your Google OAuth client and allowed user list. Check it first:
53
+
54
+ ```bash
55
+ pibo setup doctor --pibo-home /root/.pibo
56
+ ```
57
+
58
+ If auth is incomplete, the doctor prints a hard blocker and the exact missing keys. After installing the rendered systemd unit:
59
+
60
+ ```bash
61
+ systemctl daemon-reload
62
+ systemctl enable --now pibo-web
63
+ pibo gateway web status
64
+ ```
65
+
66
+ If you use Caddy, point DNS at the host before expecting Let's Encrypt to issue a certificate.
67
+
68
+ ## When not to use this path
69
+
70
+ Use the developer-host path if you need:
71
+
72
+ - a separate dev gateway;
73
+ - Docker compute workers;
74
+ - multiple agents working in isolated containers;
75
+ - GitHub App PR automation;
76
+ - `main` and `dev` branch deployment on the same host.
@@ -0,0 +1,69 @@
1
+ # Upgrade a User Host to a Developer Host
2
+
3
+ A normal npm-installed Pibo host can be upgraded later. The upgrade must preserve the production gateway and add development infrastructure next to it.
4
+
5
+ ## Starting point
6
+
7
+ ```text
8
+ /root/.pibo
9
+ pibo-web.service
10
+ ```
11
+
12
+ ## Target point
13
+
14
+ ```text
15
+ /root/.pibo unchanged production data
16
+ /root/.pibo-dev new development data
17
+ /root/code/pibo source checkout on main
18
+ /root/code/pibo/.worktrees/dev source worktree on dev
19
+ pibo-web.service existing production service
20
+ pibo-web-dev.service new development service
21
+ Docker installed for compute workers
22
+ ```
23
+
24
+ ## Plan first
25
+
26
+ ```bash
27
+ pibo setup developer-host \
28
+ --origin git@github.com:<server-or-user-fork>/pibo.git \
29
+ --prod-domain pibo.example.com \
30
+ --dev-domain dev.pibo.example.com \
31
+ --print-files
32
+
33
+ pibo setup developer-host \
34
+ --origin git@github.com:<server-or-user-fork>/pibo.git \
35
+ --prod-domain pibo.example.com \
36
+ --dev-domain dev.pibo.example.com \
37
+ --write-to /tmp/pibo-setup
38
+ ```
39
+
40
+ ## Upgrade rules
41
+
42
+ - Do not replace `/root/.pibo`.
43
+ - Do not stop production unless a user approves it.
44
+ - Create `/root/.pibo-dev` separately.
45
+ - Keep `pibo-web` on `4788/4789`.
46
+ - Start `pibo-web-dev` on `4808/4809`.
47
+ - Install Docker only for the developer path.
48
+ - Provision swap at the OS level for developer hosts, then verify it with `--min-swap-gb 8`.
49
+ - Build each checkout with `npm ci && npm run build`; do not globally install the dev worktree over production.
50
+ - Keep generated services pinned to branch-specific entrypoints instead of relying on one mutable global `pibo` symlink.
51
+ - Keep `origin` pointed at the host-specific fork.
52
+ - Keep `upstream` pointed at `git@github.com:Pascapone/pibo.git`.
53
+
54
+ ## Validation
55
+
56
+ ```bash
57
+ pibo setup doctor --domain pibo.example.com --dev-domain dev.pibo.example.com --expected-ip <server-ip> --require-docker --min-swap-gb 8
58
+ pibo gateway web status
59
+ PIBO_GATEWAY_DEV_PORT=4808 pibo gateway dev status
60
+ docker --version
61
+ pibo compute spawn --help
62
+ ```
63
+
64
+ After DNS is updated, check both browser URLs:
65
+
66
+ ```text
67
+ https://pibo.example.com/apps/chat
68
+ https://dev.pibo.example.com/apps/chat
69
+ ```
@@ -0,0 +1,138 @@
1
+ # Pibo VS Code Extension Release Runbook
2
+
3
+ The Pibo VS Code extension is shipped as a `.vsix` artifact. This runbook describes the end-to-end release process and the split of responsibilities between the maintainer and the `pibo` release script.
4
+
5
+ ## Distribution channels
6
+
7
+ The extension is published through two channels that are intentionally separate:
8
+
9
+ | Channel | Owner | Cadence | What it carries |
10
+ |---|---|---|---|
11
+ | npm `@pasko70/pibo` | automated via `npm publish` (or the release script's `--publish-npm` flag) | every `main` commit that includes a version bump | the `pibo` CLI, the gateway, the WebView bundle at `dist/apps/chat-vscode-web/` |
12
+ | VS Code Marketplace `pibo.pibo-vscode` | **maintainer uploads the VSIX manually** via <https://marketplace.visualstudio.com/manage> | every release that needs the extension UI updated | the `.vsix` produced by `npm run vscode:package` |
13
+
14
+ The npm package and the Marketplace extension are versioned together. The release script bumps both `package.json` (npm) and `src/apps/chat-vscode/package.json` (extension) in one go so the published artifacts stay in lockstep.
15
+
16
+ `pibo vscode install` (new since the distribution rework) downloads the VSIX from the GitHub Release for the configured repo (`Pascapone/pibo` by default). When the maintainer also uploads the same VSIX to the Marketplace, both channels serve identical bytes.
17
+
18
+ ## Versioning
19
+
20
+ - The root `package.json#version` is the npm version. It follows [SemVer](https://semver.org/).
21
+ - The extension's `src/apps/chat-vscode/package.json#version` is the Marketplace version. It is kept equal to the npm version (the release script enforces this).
22
+ - A SemVer **minor** bump (e.g., `1.2.0` → `1.3.0`) is appropriate when the change is additive and backward-compatible. The distribution rework itself is a minor bump: existing `pibo` users are unaffected, and the new `pibo vscode install` command is opt-in.
23
+ - A SemVer **major** bump is reserved for breaking changes to either the public CLI surface or the WebView host↔Web postMessage contract.
24
+
25
+ ## Release steps
26
+
27
+ The release script does the heavy lifting. The maintainer's job is to review, commit, and push.
28
+
29
+ ### 1. Pick the version
30
+
31
+ Decide on the next version. For the distribution rework that introduces `pibo vscode install`, the right bump is `1.2.0` → `1.3.0` (new CLI command, new marketplace-ready extension, no breaking changes).
32
+
33
+ ### 2. Bump + build + package (local)
34
+
35
+ From the repo root:
36
+
37
+ ```bash
38
+ node scripts/release.mjs --version 1.3.0
39
+ ```
40
+
41
+ The script:
42
+
43
+ 1. Reads the current version from both `package.json` files.
44
+ 2. Writes the new version to both files.
45
+ 3. Runs `npm run build` (which includes the WebView build).
46
+ 4. Runs `npm run vscode:package` to produce `dist/apps/vscode-artifacts/pibo-vscode-1.3.0.vsix` and a stable `latest.vsix` copy.
47
+ 5. Prints the VSIX path and size.
48
+
49
+ The script does **not** push to git or create a tag. The maintainer reviews the diff and commits it.
50
+
51
+ ### 3. Commit and tag
52
+
53
+ ```bash
54
+ git add package.json src/apps/chat-vscode/package.json
55
+ git commit -m "chore(release): bump @pasko70/pibo and pibo.pibo-vscode to 1.3.0"
56
+ git tag -a v1.3.0 -m "@pasko70/pibo 1.3.0"
57
+ git push origin main
58
+ git push origin v1.3.0
59
+ ```
60
+
61
+ ### 4. Create a GitHub Release with the VSIX attached
62
+
63
+ ```bash
64
+ gh release create v1.3.0 \
65
+ dist/apps/vscode-artifacts/pibo-vscode-1.3.0.vsix \
66
+ --title "pibo 1.3.0" \
67
+ --notes "..."
68
+ ```
69
+
70
+ This makes the VSIX downloadable from a stable URL (`https://github.com/Pascapone/pibo/releases/download/v1.3.0/pibo-vscode-1.3.0.vsix`). The `pibo vscode install` command uses the GitHub Releases API to discover this URL automatically.
71
+
72
+ The release script can also do this in one step:
73
+
74
+ ```bash
75
+ node scripts/release.mjs --version 1.3.0 --create-release
76
+ ```
77
+
78
+ …if the tag has already been pushed.
79
+
80
+ ### 5. Publish the npm package
81
+
82
+ ```bash
83
+ npm publish
84
+ ```
85
+
86
+ Or, in one go with the release script:
87
+
88
+ ```bash
89
+ node scripts/release.mjs --version 1.3.0 --publish-npm --create-release
90
+ ```
91
+
92
+ The publish step uploads the `pibo` CLI, the gateway plugins, and the WebView bundle. The Marketplace upload is intentionally **not** automated — see step 6.
93
+
94
+ ### 6. Upload the VSIX to the VS Code Marketplace (manual)
95
+
96
+ The Marketplace does not currently accept a Personal Access Token from this account (Azure-side provisioning issue). The release is therefore finished by uploading the VSIX through the Marketplace web UI:
97
+
98
+ 1. Open <https://marketplace.visualstudio.com/manage>.
99
+ 2. Pick the publisher `pibo` (created during the first marketplace publish).
100
+ 3. Click **Upload new extension** and select `dist/apps/vscode-artifacts/pibo-vscode-1.3.0.vsix`.
101
+ 4. The Marketplace validates the manifest and publishes the extension. The publisher ID is `pibo.pibo-vscode`.
102
+
103
+ After the upload, `code --install-extension pibo.pibo-vscode` works for end users.
104
+
105
+ ### 7. Verify
106
+
107
+ ```bash
108
+ pibo vscode install --vsix dist/apps/vscode-artifacts/pibo-vscode-1.3.0.vsix
109
+ pibo vscode status
110
+ ```
111
+
112
+ Confirm that `status` reports `pibo.pibo-vscode@1.3.0` installed via the expected `code` binary, and that the WebView loads the gateway at `http://127.0.0.1:4788/apps/chat-vscode/`.
113
+
114
+ ## Rollback
115
+
116
+ If a release is broken:
117
+
118
+ - **npm**: `npm unpublish @pasko70/pibo@1.3.0` works only within 72 hours of publish. After that, publish `1.3.1` with a fix.
119
+ - **VSIX via `pibo vscode install`**: delete the GitHub Release and re-create it with a fixed VSIX. Users who have already installed the extension will not auto-update until they run `pibo vscode install` again.
120
+ - **Marketplace**: the Marketplace UI supports un-publishing or un-listing. For a fast fix, upload a corrected `.vsix` with the same version (the Marketplace accepts a re-upload before processing the original).
121
+
122
+ ## What ships in the `pibo` npm package
123
+
124
+ The `files` whitelist in `package.json` controls what is published:
125
+
126
+ - `dist/` — the compiled server, the gateway plugins, the WebView bundles (chat-ui, context-files-ui, chat-vscode-web).
127
+ - `context/` — the bundled agent skills.
128
+ - `skills/builtin/**` — built-in user skills.
129
+ - `docs/ops/**` — operator runbooks.
130
+ - `README.md` and `src/mcp/LICENSE.mcp-cli`.
131
+
132
+ The `.vsix` is **not** in the npm package. It lives on the GitHub Release and (after the maintainer uploads it) on the VS Code Marketplace.
133
+
134
+ ## Why the WebView bundle is in the npm package
135
+
136
+ The extension's WebView loads from `http://<gateway>/apps/chat-vscode/`, not from the `.vsix`. The gateway serves the bundle out of `dist/apps/chat-vscode-web/`. If the bundle were not in the npm package, the gateway would return 404 for the WebView and the extension would be unusable.
137
+
138
+ Including the bundle in npm costs about 1 MB of disk per `pibo` install and zero runtime cost for users who never open the extension. Users who only use the `pibo` CLI never load the bundle.
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "@pasko70/pibo",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "description": "Minimal TypeScript wrapper around Pi Coding Agent.",
6
6
  "files": [
7
7
  "dist",
8
8
  "context",
9
- "skills/builtin/pi-agent-harness/SKILL.md",
10
- "skills/builtin/pi-agent-harness/agents/openai.yaml",
9
+ "skills/builtin/**",
10
+ "docs/ops/**",
11
11
  "README.md",
12
12
  "src/mcp/LICENSE.mcp-cli"
13
13
  ],
14
14
  "bin": {
15
- "pibo": "dist/bin/pibo.js"
15
+ "pibo": "dist/bin/pibo.js",
16
+ "rg": "dist/bin/rg.js"
16
17
  },
17
18
  "engines": {
18
19
  "node": ">=24"
@@ -31,16 +32,24 @@
31
32
  "context-files-ui:build": "vite build --config src/apps/context-files-ui/vite.config.ts",
32
33
  "context-files-ui:typecheck": "tsc -p src/apps/context-files-ui/tsconfig.json --noEmit",
33
34
  "web-ui:build": "npm run chat-ui:build && npm run context-files-ui:build",
34
- "build": "tsc -p tsconfig.json && npm run web-ui:build",
35
+ "vscode:typecheck": "tsc -p src/apps/chat-vscode/extension/tsconfig.json --noEmit && tsc -p src/apps/chat-vscode/extension/webview/tsconfig.json --noEmit",
36
+ "vscode:webview:build": "vite build --config src/apps/chat-vscode/extension/webview/vite.config.ts",
37
+ "vscode:extension:build": "esbuild src/apps/chat-vscode/extension/src/extension.ts --bundle --platform=node --target=node24 --format=cjs --outfile=src/apps/chat-vscode/dist/extension/extension.cjs --external:vscode --sourcemap=inline",
38
+ "vscode:package": "node scripts/vscode-package.mjs",
39
+ "release": "node scripts/release.mjs",
40
+ "build": "tsc -p tsconfig.json && npm run web-ui:build && npm run vscode:webview:build && node scripts/ensure-bin-executable.mjs",
35
41
  "start": "node dist/bin/pibo.js",
36
- "test": "npm run build && node --test test/*.test.mjs",
37
- "typecheck": "tsc -p tsconfig.json --noEmit && npm run chat-ui:typecheck && npm run context-files-ui:typecheck",
42
+ "test": "npm run build && node --test test/*.test.mjs test/chat-vscode/*.test.mjs",
43
+ "check:product-vocab": "node scripts/legacy-product-vocabulary-gate.mjs",
44
+ "validate:ink-web-derived": "node scripts/ink-cli-web-derived-parity-validate.mjs",
45
+ "compute:limited-worker-smoke": "node scripts/compute-limited-worker-smoke.mjs",
46
+ "typecheck": "tsc -p tsconfig.json --noEmit && npm run chat-ui:typecheck && npm run context-files-ui:typecheck && npm run vscode:typecheck",
38
47
  "clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"",
39
48
  "prepack": "npm run build"
40
49
  },
41
50
  "dependencies": {
42
- "@mariozechner/pi-ai": "^0.70.2",
43
- "@mariozechner/pi-coding-agent": "^0.70.2",
51
+ "@mariozechner/pi-ai": "^0.73.1",
52
+ "@mariozechner/pi-coding-agent": "^0.73.1",
44
53
  "@mdxeditor/editor": "^3.55.0",
45
54
  "@modelcontextprotocol/sdk": "^1.29.0",
46
55
  "@tailwindcss/vite": "^4.2.4",
@@ -48,14 +57,18 @@
48
57
  "@tanstack/react-router": "^1.168.25",
49
58
  "@tanstack/react-start": "^1.167.50",
50
59
  "@uiw/react-json-view": "^2.0.0-alpha.41",
60
+ "@vscode/ripgrep": "^1.18.0",
61
+ "@xyflow/react": "12.10.2",
51
62
  "better-auth": "^1.6.9",
52
63
  "commander": "^14.0.3",
64
+ "ink": "^7.0.3",
53
65
  "lexical": "^0.35.0",
54
66
  "lucide-react": "^0.545.0",
55
67
  "prismjs": "^1.30.0",
56
68
  "react": "^19.2.5",
57
69
  "react-dom": "^19.2.5",
58
70
  "react-markdown": "^10.1.0",
71
+ "react-virtuoso": "^4.18.6",
59
72
  "remark-gfm": "^4.0.1",
60
73
  "tailwindcss": "^4.2.4"
61
74
  },
@@ -66,6 +79,8 @@
66
79
  "@types/react": "^19.2.14",
67
80
  "@types/react-dom": "^19.2.3",
68
81
  "@vitejs/plugin-react": "^6.0.1",
82
+ "@vscode/vsce": "^3.6.0",
83
+ "esbuild": "^0.27.7",
69
84
  "tsx": "^4.21.0",
70
85
  "typescript": "^6.0.3",
71
86
  "vite": "^8.0.10",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pi-agent-harness
3
- description: Use when designing, specifying, implementing, or reviewing a modular system built around Pi Coding Agent / Pi Agent as an embedded agent engine. Trigger for Pi Agent docking, createAgentSession, custom tools, SessionManager, ResourceLoader, ExtensionRunner, Pi events, OpenClaw-style harnesses, plugin ecosystems, web chat channels, MCP/tool adapters, system prompt ownership, policy layers, or minimal runtimes around packages/coding-agent.
3
+ description: Use when designing, specifying, implementing, or reviewing a modular system built around Pi Coding Agent / Pi Agent as an embedded agent engine. Trigger for Pi Agent docking, createAgentSession, custom tools, SessionManager, ResourceLoader, ExtensionRunner, Pi events, OpenClaw-style harnesses, plugin ecosystems, web chat channels, MCP/tool adapters, system prompt stewardship, policy layers, or minimal runtimes around packages/coding-agent.
4
4
  ---
5
5
 
6
6
  # Pi Agent Harness
@@ -26,34 +26,34 @@ Read only what the task needs. These are the important paths:
26
26
 
27
27
  Pi product layer:
28
28
 
29
- - `/home/pibo/code/pi-mono/packages/coding-agent/README.md` - product philosophy: minimal core, modes, skills, extensions, explicit tools.
30
- - `/home/pibo/code/pi-mono/packages/coding-agent/src/main.ts` - CLI entry and mode dispatch.
31
- - `/home/pibo/code/pi-mono/packages/coding-agent/src/core/sdk.ts` - `createAgentSession(...)`, SDK options, model/auth/settings wiring.
32
- - `/home/pibo/code/pi-mono/packages/coding-agent/src/core/agent-session.ts` - prompt pipeline, event persistence, compaction, tool registry, extension integration.
33
- - `/home/pibo/code/pi-mono/packages/coding-agent/src/core/session-manager.ts` - append-only JSONL session tree, branch/fork/compaction context.
34
- - `/home/pibo/code/pi-mono/packages/coding-agent/src/core/resource-loader.ts` - loads context files, skills, prompts, themes, extensions, `SYSTEM.md`, `APPEND_SYSTEM.md`.
35
- - `/home/pibo/code/pi-mono/packages/coding-agent/src/core/system-prompt.ts` - default prompt builder and tool/context/skill prompt assembly.
36
- - `/home/pibo/code/pi-mono/packages/coding-agent/src/core/extensions/types.ts` - extension contract and event names.
37
- - `/home/pibo/code/pi-mono/packages/coding-agent/src/core/extensions/runner.ts` - extension lifecycle, stale-context guard, event dispatch.
38
- - `/home/pibo/code/pi-mono/packages/coding-agent/src/modes/interactive/interactive-mode.ts` - TUI integration, commands, selectors, rendering of events.
29
+ - `<HOME>/code/pi-mono/packages/coding-agent/README.md` - product philosophy: minimal core, modes, skills, extensions, explicit tools.
30
+ - `<HOME>/code/pi-mono/packages/coding-agent/src/main.ts` - CLI entry and mode dispatch.
31
+ - `<HOME>/code/pi-mono/packages/coding-agent/src/core/sdk.ts` - `createAgentSession(...)`, SDK options, model/auth/settings wiring.
32
+ - `<HOME>/code/pi-mono/packages/coding-agent/src/core/agent-session.ts` - prompt pipeline, event persistence, compaction, tool registry, extension integration.
33
+ - `<HOME>/code/pi-mono/packages/coding-agent/src/core/session-manager.ts` - append-only JSONL session tree, branch/fork/compaction context.
34
+ - `<HOME>/code/pi-mono/packages/coding-agent/src/core/resource-loader.ts` - loads context files, skills, prompts, themes, extensions, `SYSTEM.md`, `APPEND_SYSTEM.md`.
35
+ - `<HOME>/code/pi-mono/packages/coding-agent/src/core/system-prompt.ts` - default prompt builder and tool/context/skill prompt assembly.
36
+ - `<HOME>/code/pi-mono/packages/coding-agent/src/core/extensions/types.ts` - extension contract and event names.
37
+ - `<HOME>/code/pi-mono/packages/coding-agent/src/core/extensions/runner.ts` - extension lifecycle, stale-context guard, event dispatch.
38
+ - `<HOME>/code/pi-mono/packages/coding-agent/src/modes/interactive/interactive-mode.ts` - TUI integration, commands, selectors, rendering of events.
39
39
 
40
40
  Lower engine layers:
41
41
 
42
- - `/home/pibo/code/pi-mono/packages/agent/src/agent.ts` - stateful agent wrapper, `subscribe`, `prompt`, `steer`, `followUp`.
43
- - `/home/pibo/code/pi-mono/packages/agent/src/agent-loop.ts` - turn loop, streaming, tool execution, event emission.
44
- - `/home/pibo/code/pi-mono/packages/ai/src/stream.ts` - provider dispatch.
45
- - `/home/pibo/code/pi-mono/packages/tui/src/tui.ts` - terminal rendering if building TUI surfaces.
42
+ - `<HOME>/code/pi-mono/packages/agent/src/agent.ts` - stateful agent wrapper, `subscribe`, `prompt`, `steer`, `followUp`.
43
+ - `<HOME>/code/pi-mono/packages/agent/src/agent-loop.ts` - turn loop, streaming, tool execution, event emission.
44
+ - `<HOME>/code/pi-mono/packages/ai/src/stream.ts` - provider dispatch.
45
+ - `<HOME>/code/pi-mono/packages/tui/src/tui.ts` - terminal rendering if building TUI surfaces.
46
46
 
47
47
  OpenClaw reference pattern:
48
48
 
49
- - `/home/pibo/docs/research/tools/openclaw-pi-agent-docking-concept.md` - concise docking analysis.
50
- - `/home/pibo/code/openclaw/src/agents/pi-embedded-runner/run/attempt.ts` - embedded runner assembly.
51
- - `/home/pibo/code/openclaw/src/agents/pi-tools.ts` - OpenClaw tool catalog assembler.
52
- - `/home/pibo/code/openclaw/src/agents/pi-tool-definition-adapter.ts` - OpenClaw tool to Pi `ToolDefinition` adapter.
53
- - `/home/pibo/code/openclaw/src/agents/pi-embedded-runner/tool-split.ts` - custom-tool authority pattern.
54
- - `/home/pibo/code/openclaw/src/agents/pi-embedded-runner/system-prompt.ts` - external system prompt ownership.
55
- - `/home/pibo/code/openclaw/src/agents/pi-embedded-subscribe.ts` - Pi event subscription to product output.
56
- - `/home/pibo/code/openclaw/src/plugins/types.ts` - broad plugin-hook vocabulary, useful as design reference.
49
+ - `<HOME>/docs/research/tools/openclaw-pi-agent-docking-concept.md` - concise docking analysis.
50
+ - `<HOME>/code/openclaw/src/agents/pi-embedded-runner/run/attempt.ts` - embedded runner assembly.
51
+ - `<HOME>/code/openclaw/src/agents/pi-tools.ts` - OpenClaw tool catalog assembler.
52
+ - `<HOME>/code/openclaw/src/agents/pi-tool-definition-adapter.ts` - OpenClaw tool to Pi `ToolDefinition` adapter.
53
+ - `<HOME>/code/openclaw/src/agents/pi-embedded-runner/tool-split.ts` - custom-tool authority pattern.
54
+ - `<HOME>/code/openclaw/src/agents/pi-embedded-runner/system-prompt.ts` - external system prompt stewardship.
55
+ - `<HOME>/code/openclaw/src/agents/pi-embedded-subscribe.ts` - Pi event subscription to product output.
56
+ - `<HOME>/code/openclaw/src/plugins/types.ts` - broad plugin-hook vocabulary, useful as design reference.
57
57
 
58
58
  ## Mental Model
59
59
 
@@ -159,7 +159,7 @@ For MCP, browser tools, filesystem tools, subprocesses, message sending, or host
159
159
 
160
160
  OpenClaw reference: `src/agents/pi-tool-definition-adapter.ts`.
161
161
 
162
- ## Prompt Ownership
162
+ ## Prompt Stewardship
163
163
 
164
164
  Pi can build a good default system prompt, but a product harness usually needs one explicit runtime contract.
165
165