@pasko70/pibo 1.0.5 → 1.2.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 (429) hide show
  1. package/README.md +106 -250
  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 +42 -5
  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 +47 -0
  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 +3168 -1811
  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-CI0Xj2Cp.js → dist-B4lw9z4F.js} +1 -1
  54. package/dist/apps/chat-ui/assets/{dist-aMr2VYOu.js → dist-BbTaHWON.js} +1 -1
  55. package/dist/apps/chat-ui/assets/{dist-u2OzzOTm.js → dist-BcT_c1EJ.js} +1 -1
  56. package/dist/apps/chat-ui/assets/{dist-Di1ScJ22.js → dist-CGINd7XU.js} +1 -1
  57. package/dist/apps/chat-ui/assets/{dist-wiRpAHIv.js → dist-CrBzZkUp.js} +1 -1
  58. package/dist/apps/chat-ui/assets/{dist-CaNOvqMY.js → dist-CyyISotB.js} +1 -1
  59. package/dist/apps/chat-ui/assets/{dist-zgYUl2B-.js → dist-DFbnFNpX.js} +1 -1
  60. package/dist/apps/chat-ui/assets/{dist-CNlhGq5i.js → dist-DGLWQLX8.js} +1 -1
  61. package/dist/apps/chat-ui/assets/{dist-BGxHKHPX.js → dist-DfcIkFSN.js} +1 -1
  62. package/dist/apps/chat-ui/assets/{dist-DrM-H3e1.js → dist-sKDHTwaT.js} +1 -1
  63. package/dist/apps/chat-ui/assets/{dist-DpmEro5R.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/cli-ui/InkSessionApp.js +1218 -0
  182. package/dist/apps/cli-ui/InkTerminalLine.js +53 -0
  183. package/dist/apps/cli-ui/InkTerminalRow.js +304 -0
  184. package/dist/apps/cli-ui/InkTerminalView.js +25 -0
  185. package/dist/apps/cli-ui/cliSessionsCommand.js +232 -0
  186. package/dist/apps/cli-ui/index.js +8 -0
  187. package/dist/apps/cli-ui/inkColors.js +67 -0
  188. package/dist/apps/cli-ui/inkJson.js +244 -0
  189. package/dist/apps/cli-ui/inkMarkdown.js +122 -0
  190. package/dist/apps/context-files-ui/assets/{dist-DFi2YGux.js → dist-BOiGdrG-.js} +1 -1
  191. package/dist/apps/context-files-ui/assets/{dist-DyfSeBMu.js → dist-DK01b7x4.js} +1 -1
  192. package/dist/apps/context-files-ui/assets/{dist-CwbH_3RN.js → dist-DPG9jOQ-.js} +1 -1
  193. package/dist/apps/context-files-ui/assets/{dist-dTBsFYAl.js → dist-Dp5AH00p.js} +1 -1
  194. package/dist/apps/context-files-ui/assets/{dist-CxRLRmMx.js → dist-DqYw0LH7.js} +1 -1
  195. package/dist/apps/context-files-ui/assets/{dist-MyZgX9K2.js → dist-TF5iO5ML.js} +1 -1
  196. package/dist/apps/context-files-ui/assets/{dist-DQXzt2Ng.js → dist-TbjAhles.js} +1 -1
  197. package/dist/apps/context-files-ui/assets/{dist-YwR9dpb-.js → dist-ZsBbt0uY.js} +1 -1
  198. package/dist/apps/context-files-ui/assets/{dist-CKQF1zEu.js → dist-kmsvtHkH.js} +1 -1
  199. package/dist/apps/context-files-ui/assets/{dist-BJW3917N.js → dist-vnd7PMu3.js} +1 -1
  200. package/dist/apps/context-files-ui/assets/{index-BwRDoHMC.css → index-B92tL3Pp.css} +1 -1
  201. package/dist/apps/context-files-ui/assets/{index-GwvjXytt.js → index-BhAWD3dv.js} +2 -2
  202. package/dist/apps/context-files-ui/index.html +2 -2
  203. package/dist/auth/better-auth.js +2 -1
  204. package/dist/auth/login-actions.js +251 -0
  205. package/dist/auth/openai-codex-usage.js +147 -0
  206. package/dist/bin/pibo.js +0 -0
  207. package/dist/bin/rg.js +15 -0
  208. package/dist/cli-session/fakeSessionSource.js +804 -0
  209. package/dist/cli-session/index.js +3 -0
  210. package/dist/cli-session/localSessionSource.js +1144 -0
  211. package/dist/cli-session/sessionSource.js +13 -0
  212. package/dist/cli.js +142 -14
  213. package/dist/compute/cli.js +415 -0
  214. package/dist/compute/docker.js +827 -0
  215. package/dist/compute/resource-health.js +333 -0
  216. package/dist/compute/resource-policy.js +98 -0
  217. package/dist/config/config.js +9 -5
  218. package/dist/core/context-build.js +677 -0
  219. package/dist/core/model-defaults.js +51 -9
  220. package/dist/core/pibo-home.js +8 -0
  221. package/dist/core/profiles.js +48 -0
  222. package/dist/core/provider-telemetry.js +222 -0
  223. package/dist/core/routed-session.js +441 -47
  224. package/dist/core/runtime-telemetry.js +853 -0
  225. package/dist/core/runtime.js +103 -15
  226. package/dist/core/session-errors.js +47 -0
  227. package/dist/core/session-model.js +39 -0
  228. package/dist/core/session-router.js +292 -62
  229. package/dist/core/shared-app.js +17 -0
  230. package/dist/core/skill-expansion.js +43 -0
  231. package/dist/core/system-prompt-template.js +9 -9
  232. package/dist/core/telemetry-staleness.js +128 -0
  233. package/dist/core/test-output-compaction.js +145 -0
  234. package/dist/core/user-settings.js +73 -0
  235. package/dist/cron/channel.js +28 -0
  236. package/dist/cron/cli.js +230 -0
  237. package/dist/cron/plugin.js +11 -0
  238. package/dist/cron/schedule.js +214 -0
  239. package/dist/cron/service.js +177 -0
  240. package/dist/cron/store.js +349 -0
  241. package/dist/cron/types.js +1 -0
  242. package/dist/data/cli.js +184 -0
  243. package/dist/data/event-log.js +106 -0
  244. package/dist/data/final-app-space-cutover-migration.js +728 -0
  245. package/dist/data/ingest-service.js +389 -0
  246. package/dist/data/message-store.js +62 -0
  247. package/dist/data/navigation-store.js +75 -0
  248. package/dist/data/observation-store.js +46 -0
  249. package/dist/data/payload-store.js +144 -0
  250. package/dist/data/pibo-store.js +59 -0
  251. package/dist/data/schema.js +434 -0
  252. package/dist/data/session-store.js +63 -0
  253. package/dist/data/shared-app-migration.js +757 -0
  254. package/dist/data/sqlite-schema.js +12 -0
  255. package/dist/data/telemetry-preview.js +65 -0
  256. package/dist/data/telemetry-queries.js +212 -0
  257. package/dist/data/telemetry-retention.js +50 -0
  258. package/dist/data/telemetry-rows.js +158 -0
  259. package/dist/data/telemetry.js +357 -0
  260. package/dist/debug/delta-compaction.js +99 -0
  261. package/dist/debug/detail-format.js +86 -0
  262. package/dist/debug/events.js +149 -29
  263. package/dist/debug/failures.js +162 -0
  264. package/dist/debug/index.js +655 -30
  265. package/dist/debug/messages.js +185 -0
  266. package/dist/debug/next-commands.js +6 -0
  267. package/dist/debug/payloads.js +123 -0
  268. package/dist/debug/pty.js +924 -0
  269. package/dist/debug/session.js +45 -15
  270. package/dist/debug/sql.js +1 -1
  271. package/dist/debug/stores.js +18 -13
  272. package/dist/debug/summary.js +72 -0
  273. package/dist/debug/telemetry.js +649 -0
  274. package/dist/debug/tools.js +168 -0
  275. package/dist/debug/trace-render-check.js +151 -0
  276. package/dist/debug/trace.js +152 -27
  277. package/dist/debug/web-artifacts.js +63 -0
  278. package/dist/debug/web-options.js +313 -0
  279. package/dist/debug/web-render-analysis.js +310 -0
  280. package/dist/debug/web-snapshot-browser-scripts.js +303 -0
  281. package/dist/debug/web-streaming-benchmark-analysis.js +605 -0
  282. package/dist/debug/web-streaming-browser-library.js +928 -0
  283. package/dist/debug/web-streaming-browser-scripts.js +242 -0
  284. package/dist/debug/web-streaming-provider-telemetry.js +194 -0
  285. package/dist/debug/web-streaming-report.js +493 -0
  286. package/dist/debug/web-streaming-types.js +1 -0
  287. package/dist/debug/web.js +574 -0
  288. package/dist/gateway/backup.js +83 -0
  289. package/dist/gateway/cli.js +511 -0
  290. package/dist/gateway/fallback.js +155 -0
  291. package/dist/gateway/pidfile.js +84 -0
  292. package/dist/gateway/protocol.js +16 -0
  293. package/dist/gateway/server.js +174 -17
  294. package/dist/gateway/tool.js +54 -51
  295. package/dist/gateway/web.js +74 -2
  296. package/dist/index.js +3 -1
  297. package/dist/local/client.js +3 -3
  298. package/dist/local/extension.js +8 -5
  299. package/dist/plugins/builtin.js +252 -49
  300. package/dist/plugins/chat-vscode-web.js +28 -0
  301. package/dist/plugins/codex-compat.js +0 -41
  302. package/dist/plugins/context-files.js +98 -18
  303. package/dist/plugins/dev-auth.js +124 -0
  304. package/dist/plugins/native-tooling.js +15 -0
  305. package/dist/plugins/registry.js +66 -2
  306. package/dist/plugins/web-annotations.js +27 -0
  307. package/dist/providers/minimax.js +70 -0
  308. package/dist/providers/openai-compat.js +48 -0
  309. package/dist/ralph/channel.js +8 -0
  310. package/dist/ralph/cli.js +152 -0
  311. package/dist/ralph/plugin.js +14 -0
  312. package/dist/ralph/service.js +271 -0
  313. package/dist/ralph/stopping.js +151 -0
  314. package/dist/ralph/store.js +450 -0
  315. package/dist/ralph/templates.js +200 -0
  316. package/dist/ralph/types.js +1 -0
  317. package/dist/reliability/store.js +42 -26
  318. package/dist/runs/registry.js +72 -35
  319. package/dist/session-ui/commandCatalog.js +193 -0
  320. package/dist/session-ui/commandResults.js +95 -0
  321. package/dist/session-ui/index.js +7 -0
  322. package/dist/session-ui/ownerViewModel.js +27 -0
  323. package/dist/session-ui/roomSessionViewModel.js +69 -0
  324. package/dist/session-ui/statusViewModel.js +127 -0
  325. package/dist/session-ui/terminalCards.js +210 -0
  326. package/dist/session-ui/terminalRows.js +937 -0
  327. package/dist/session-ui/terminalValue.js +45 -0
  328. package/dist/sessions/pibo-data-store.js +178 -0
  329. package/dist/sessions/sqlite-store.js +78 -12
  330. package/dist/sessions/store.js +11 -4
  331. package/dist/sessions/workflow-session-kind.js +20 -0
  332. package/dist/setup/cli.js +567 -0
  333. package/dist/shared/trace-async-agent-runs.js +127 -0
  334. package/dist/shared/trace-engine.js +96 -0
  335. package/dist/shared/trace-event-projection.js +679 -0
  336. package/dist/shared/trace-live-reducer.js +191 -0
  337. package/dist/shared/trace-nodes.js +76 -0
  338. package/dist/shared/trace-order.js +11 -10
  339. package/dist/shared/trace-patch-nodes.js +83 -0
  340. package/dist/shared/trace-run-notifications.js +69 -0
  341. package/dist/shared/trace-subagent-links.js +46 -0
  342. package/dist/shared/trace-transcript.js +303 -0
  343. package/dist/shared/trace-types.js +1 -0
  344. package/dist/shared-app.js +4 -0
  345. package/dist/signals/aggregate.js +65 -0
  346. package/dist/signals/events.js +1 -0
  347. package/dist/signals/projector.js +158 -0
  348. package/dist/signals/registry.js +513 -0
  349. package/dist/signals/store.js +1 -0
  350. package/dist/signals/types.js +1 -0
  351. package/dist/skills/cli.js +117 -0
  352. package/dist/tools/agent-browser-leases.js +219 -0
  353. package/dist/tools/agent-browser-wrapper.js +99 -0
  354. package/dist/tools/browser-pool.js +623 -0
  355. package/dist/tools/browser-use-cdp.js +56 -4
  356. package/dist/tools/browser-use-leases.js +215 -37
  357. package/dist/tools/browser-use-wrapper.js +508 -65
  358. package/dist/tools/cdp-client.js +189 -0
  359. package/dist/tools/guides.js +203 -4
  360. package/dist/tools/index.js +666 -16
  361. package/dist/tools/npm-runtime.js +136 -0
  362. package/dist/tools/registry.js +107 -8
  363. package/dist/tools/runtime/index.js +3 -0
  364. package/dist/tools/runtime/node-backend.js +225 -0
  365. package/dist/tools/runtime/node-worker-source.js +206 -0
  366. package/dist/tools/runtime/python-backend.js +227 -0
  367. package/dist/tools/runtime/python-worker-source.js +178 -0
  368. package/dist/tools/runtime/registry.js +255 -0
  369. package/dist/tools/runtime/tool.js +168 -0
  370. package/dist/tools/runtime/types.js +1 -0
  371. package/dist/tools/web-search.js +2 -1
  372. package/dist/user-skills/installer.js +214 -0
  373. package/dist/user-skills/manager.js +35 -0
  374. package/dist/user-skills/store.js +267 -0
  375. package/dist/user-skills/types.js +1 -0
  376. package/dist/web/auth.js +5 -1
  377. package/dist/web/channel.js +86 -0
  378. package/dist/web/http.js +79 -14
  379. package/dist/web-annotations/api.js +348 -0
  380. package/dist/web-annotations/attachments.js +201 -0
  381. package/dist/web-annotations/cdp.js +1107 -0
  382. package/dist/web-annotations/index.js +7 -0
  383. package/dist/web-annotations/store.js +407 -0
  384. package/dist/web-annotations/tools.js +350 -0
  385. package/dist/web-annotations/types.js +34 -0
  386. package/dist/web-annotations/validation.js +288 -0
  387. package/docs/README.md +23 -0
  388. package/docs/ops/install-developer-host.md +112 -0
  389. package/docs/ops/install-user-host.md +76 -0
  390. package/docs/ops/upgrade-user-to-developer-host.md +69 -0
  391. package/package.json +24 -10
  392. package/{.codex/skills → skills/builtin}/pi-agent-harness/SKILL.md +24 -24
  393. package/skills/builtin/pibo-docker-system/SKILL.md +170 -0
  394. package/skills/builtin/pibo-spec-writing/SKILL.md +330 -0
  395. package/skills/builtin/prd/SKILL.md +143 -0
  396. package/skills/builtin/ralph-loop/SKILL.md +359 -0
  397. package/skills/builtin/ralph-prd-json/SKILL.md +123 -0
  398. package/skills/builtin/skill-creator/LICENSE.txt +202 -0
  399. package/skills/builtin/skill-creator/SKILL.md +513 -0
  400. package/skills/builtin/skill-creator/agents/analyzer.md +274 -0
  401. package/skills/builtin/skill-creator/agents/comparator.md +202 -0
  402. package/skills/builtin/skill-creator/agents/grader.md +223 -0
  403. package/skills/builtin/skill-creator/assets/eval_review.html +146 -0
  404. package/skills/builtin/skill-creator/eval-viewer/generate_review.py +471 -0
  405. package/skills/builtin/skill-creator/eval-viewer/viewer.html +1325 -0
  406. package/skills/builtin/skill-creator/references/schemas.md +430 -0
  407. package/skills/builtin/skill-creator/scripts/__init__.py +0 -0
  408. package/skills/builtin/skill-creator/scripts/aggregate_benchmark.py +401 -0
  409. package/skills/builtin/skill-creator/scripts/generate_report.py +326 -0
  410. package/skills/builtin/skill-creator/scripts/improve_description.py +247 -0
  411. package/skills/builtin/skill-creator/scripts/package_skill.py +136 -0
  412. package/skills/builtin/skill-creator/scripts/quick_validate.py +103 -0
  413. package/skills/builtin/skill-creator/scripts/run_eval.py +310 -0
  414. package/skills/builtin/skill-creator/scripts/run_loop.py +328 -0
  415. package/skills/builtin/skill-creator/scripts/utils.py +47 -0
  416. package/skills/builtin/web-annotations/SKILL.md +93 -0
  417. package/dist/apps/chat-ui/assets/index-B_E935fP.js +0 -151
  418. package/dist/apps/chat-ui/assets/index-Dk-opWl3.css +0 -1
  419. package/dist/env.js +0 -32
  420. package/dist/plugins/core-tools.js +0 -94
  421. package/dist/plugins/example.js +0 -67
  422. package/dist/plugins/remote-agent.js +0 -9
  423. package/dist/remote/channel.js +0 -176
  424. package/dist/remote/client.js +0 -92
  425. package/dist/remote/examples/tui-controller.js +0 -263
  426. package/dist/remote/protocol.js +0 -55
  427. package/dist/remote/session-client.js +0 -189
  428. package/dist/sessions/bindings.js +0 -41
  429. /package/{.codex/skills → skills/builtin}/pi-agent-harness/agents/openai.yaml +0 -0
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
+ ```
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "@pasko70/pibo",
3
- "version": "1.0.5",
3
+ "version": "1.2.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
- ".codex/skills/pi-agent-harness/SKILL.md",
10
- ".codex/skills/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,23 @@
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": "vsce package --no-dependencies",
39
+ "build": "tsc -p tsconfig.json && npm run web-ui:build && node scripts/ensure-bin-executable.mjs",
35
40
  "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",
41
+ "test": "npm run build && node --test test/*.test.mjs test/chat-vscode/*.test.mjs",
42
+ "check:product-vocab": "node scripts/legacy-product-vocabulary-gate.mjs",
43
+ "validate:ink-web-derived": "node scripts/ink-cli-web-derived-parity-validate.mjs",
44
+ "compute:limited-worker-smoke": "node scripts/compute-limited-worker-smoke.mjs",
45
+ "typecheck": "tsc -p tsconfig.json --noEmit && npm run chat-ui:typecheck && npm run context-files-ui:typecheck && npm run vscode:typecheck",
38
46
  "clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"",
39
47
  "prepack": "npm run build"
40
48
  },
41
49
  "dependencies": {
42
- "@mariozechner/pi-ai": "^0.70.2",
43
- "@mariozechner/pi-coding-agent": "^0.70.2",
50
+ "@mariozechner/pi-ai": "^0.73.1",
51
+ "@mariozechner/pi-coding-agent": "^0.73.1",
44
52
  "@mdxeditor/editor": "^3.55.0",
45
53
  "@modelcontextprotocol/sdk": "^1.29.0",
46
54
  "@tailwindcss/vite": "^4.2.4",
@@ -48,14 +56,18 @@
48
56
  "@tanstack/react-router": "^1.168.25",
49
57
  "@tanstack/react-start": "^1.167.50",
50
58
  "@uiw/react-json-view": "^2.0.0-alpha.41",
59
+ "@vscode/ripgrep": "^1.18.0",
60
+ "@xyflow/react": "12.10.2",
51
61
  "better-auth": "^1.6.9",
52
62
  "commander": "^14.0.3",
63
+ "ink": "^7.0.3",
53
64
  "lexical": "^0.35.0",
54
65
  "lucide-react": "^0.545.0",
55
66
  "prismjs": "^1.30.0",
56
67
  "react": "^19.2.5",
57
68
  "react-dom": "^19.2.5",
58
69
  "react-markdown": "^10.1.0",
70
+ "react-virtuoso": "^4.18.6",
59
71
  "remark-gfm": "^4.0.1",
60
72
  "tailwindcss": "^4.2.4"
61
73
  },
@@ -66,9 +78,11 @@
66
78
  "@types/react": "^19.2.14",
67
79
  "@types/react-dom": "^19.2.3",
68
80
  "@vitejs/plugin-react": "^6.0.1",
81
+ "@vscode/vsce": "^3.6.0",
82
+ "esbuild": "^0.27.7",
69
83
  "tsx": "^4.21.0",
70
84
  "typescript": "^6.0.3",
71
85
  "vite": "^8.0.10",
72
86
  "vite-tsconfig-paths": "^5.1.4"
73
87
  }
74
- }
88
+ }
@@ -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
 
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: pibo-docker-system
3
+ description: Use this skill for Pibo Docker Compute System work, isolated implementation, worker worktrees, Chat Web or gateway testing, worker dev auth, browser/CDP validation, resource cleanup, and when coordinating Docker worker use with the github-server-flow strategy.
4
+ ---
5
+
6
+ # Pibo Docker Compute System
7
+
8
+ Use Docker compute workers as the isolated execution boundary for Pibo code work, gateway checks, Chat Web validation, browser automation, and end-to-end tests. Keep Docker-specific operating rules here instead of duplicating them in `AGENTS.md`.
9
+
10
+ ## Relationship to GitHub flow
11
+
12
+ Use this skill together with `github-server-flow`:
13
+
14
+ - `github-server-flow` owns branch, PR, fork mirror, and release strategy.
15
+ - `pibo-docker-system` owns where implementation and validation run.
16
+ - Normal code work starts from `upstream/dev` on a focused branch, then runs inside a Docker dev worker.
17
+ - Do not use `origin/dev` as a preview or staging branch just to test work. Push focused branches to `origin` and open PRs to `upstream/dev`.
18
+ - Documentation-only edits do not require a Docker worker unless they are coupled to code, build, gateway, or browser validation.
19
+
20
+ ### Worker branch pattern
21
+
22
+ `pibo compute dev spawn --worktree <name>` creates or attaches a Git worktree and uses `<name>` as the local branch name. Because container names and worktree names should be simple, prefer a slash-free local worker branch and push it to a slash-based PR branch when ready.
23
+
24
+ Recommended pattern:
25
+
26
+ ```bash
27
+ cd /root/code/pibo
28
+ git fetch origin --prune
29
+ git fetch upstream --prune
30
+
31
+ # Use a slash-free local branch/worktree name created from upstream/dev.
32
+ git branch <short-topic> upstream/dev
33
+ pibo compute dev spawn --worktree <short-topic>
34
+
35
+ # Work in the returned worktree, then push as a focused PR branch.
36
+ cd /root/code/pibo/.worktrees/<short-topic>
37
+ git push -u origin HEAD:feature/<short-topic>
38
+ ```
39
+
40
+ If the local branch already exists and points at the intended base, `pibo compute dev spawn --worktree <short-topic>` attaches a worktree for it. If it does not exist, the compute CLI creates it from the current checkout, so pre-create the branch from `upstream/dev` when strict upstream-first history matters.
41
+
42
+ ## Commands
43
+
44
+ Discover progressively with the CLI first:
45
+
46
+ ```bash
47
+ pibo compute --help
48
+ pibo compute dev --help
49
+ pibo compute dev spawn --help
50
+ ```
51
+
52
+ Common commands:
53
+
54
+ - `pibo compute spawn [--name <name>]` — create a short-lived worker container. It is useful for isolated checks but does not create the development worktree flow.
55
+ - `pibo compute dev spawn --worktree <name>` — create a long-lived dev worker with a Git worktree and deterministic port block.
56
+ - `pibo compute rebuild` — force a fresh Docker image build.
57
+ - `pibo compute list` / `pibo compute list --all` — inspect worker and dev-worker containers.
58
+ - `pibo compute release <id>` — stop and remove the named worker container. This does not delete the Git worktree.
59
+ - `pibo compute reap --dry-run` — preview worker cleanup.
60
+ - `pibo compute reap --apply` — apply selected cleanup. Dev workers are excluded unless the command explicitly includes them.
61
+ - `pibo compute health` / `pibo compute doctor` — read-only resource health checks.
62
+ - `pibo compute diagnostics` / `pibo compute disk` — read-only Docker disk diagnostics.
63
+
64
+ ## Development rule
65
+
66
+ Use a Docker dev worker for Pibo code and feature implementation whenever the compute system is available, especially for:
67
+
68
+ - gateway changes;
69
+ - Chat Web changes;
70
+ - browser automation;
71
+ - auth behavior;
72
+ - runtime/session routing changes;
73
+ - CLI/TUI changes that need realistic user-visible validation;
74
+ - end-to-end checks.
75
+
76
+ Do not edit the host checkout as an experimental workspace for code changes. Do not restart, replace, or run ad hoc host gateways for development unless the user explicitly requests host operations or Docker is unavailable. The host gateway is for observation and production/dev deployment only.
77
+
78
+ ## Worker lifecycle
79
+
80
+ 1. Start from the GitHub strategy: fetch remotes, create a focused branch from `upstream/dev`, and spawn a dev worker for that branch.
81
+ 2. Use the returned worktree for edits.
82
+ 3. Use the returned web and CDP ports for app and browser checks.
83
+ 4. Run builds/tests inside the worker worktree when the work requires runtime validation.
84
+ 5. Release the container with `pibo compute release <id>` when done.
85
+ 6. Keep, merge, push, or discard the Git worktree only after review or explicit user approval.
86
+
87
+ Releasing a dev worker removes the container, not the worktree. Worktree deletion is a separate Git cleanup decision.
88
+
89
+ ## Gateway and deployment boundaries
90
+
91
+ Host gateways are managed only through the Pibo CLI:
92
+
93
+ ```bash
94
+ pibo gateway web status
95
+ pibo gateway web start
96
+ pibo gateway web restart
97
+ pibo gateway dev status
98
+ pibo gateway dev start
99
+ pibo gateway dev restart
100
+ ```
101
+
102
+ After Docker validation, use the host dev gateway for host-level testing:
103
+
104
+ ```bash
105
+ ./scripts/deploy-web-dev.sh
106
+ pibo gateway dev restart
107
+ ```
108
+
109
+ The hosted dev Chat URL is host-specific. Set `PIBO_DEV_PUBLIC_URL` or `PIBO_DEV_BASE_URL` in the environment or repo-local `.env.developer-host`; do not hard-code public hostnames in docs, scripts, or skills.
110
+
111
+ Deploy production only after dev testing succeeds and the user approves it:
112
+
113
+ ```bash
114
+ ./scripts/deploy-web.sh
115
+ pibo gateway web restart
116
+ ```
117
+
118
+ If the production gateway restart is blocked because active agent work is running, ask the user before interrupting sessions. Do not bypass the CLI restart guard without explicit confirmation.
119
+
120
+ ## Dev auth boundary
121
+
122
+ Dev auth belongs only to Docker workers.
123
+
124
+ - `gateway:web` inside a worker enables dev auth through the Docker entrypoint's internal option.
125
+ - `PIBO_DEV_AUTH` does not enable dev auth for normal host gateways.
126
+ - Never start the host gateway with dev-auth flags or fake-auth infrastructure.
127
+ - The normal host gateway must use Better Auth.
128
+ - Dev-auth web access is loopback-only; if a worker web port is accidentally reached through a public reverse proxy, auth requests are rejected.
129
+
130
+ If auth is needed inside a Docker worker, use the `pibo-debug-auth` skill rather than bypassing auth ad hoc.
131
+
132
+ ## Browser and app validation
133
+
134
+ For Chat Web browser debugging while changing Pibo, start from the Docker dev worker when one is available. Use the worker's returned web/CDP ports so browser automation and gateway restarts stay isolated from host gateways.
135
+
136
+ Useful validation evidence includes:
137
+
138
+ - route visited;
139
+ - visible state or DOM assertions;
140
+ - screenshot path;
141
+ - CDP target details;
142
+ - request/response evidence;
143
+ - terminal output for CLI/TUI flows.
144
+
145
+ A gateway healthcheck only proves the service responds. For Web, CLI, TUI, gateway, runtime, auth, or agent-routing work, also verify user-visible behavior when feasible:
146
+
147
+ - Use browser/CDP or browser-use for Web UI flows.
148
+ - Use a pseudo-TTY or interactive shell for Ink/TUI flows.
149
+ - Use the real command, API, router, or persistence path when the default path is locally testable.
150
+
151
+ Fake/demo checks and healthchecks are useful supporting evidence, but do not treat them as final validation for a user-facing default path unless the real path is unavailable or explicitly out of scope.
152
+
153
+ ## Resource hygiene
154
+
155
+ - Workers are intended to be bounded and recyclable.
156
+ - Prefer `pibo compute release <id>` when you finish with a worker.
157
+ - Use `pibo compute list --all` to inspect running, stopped, dirty, and OOM-killed workers.
158
+ - Use `pibo compute reap --dry-run` before destructive cleanup.
159
+ - Use `pibo compute health` and `pibo compute diagnostics --json` for read-only resource investigations.
160
+ - Do not delete worktrees just because containers were released. Worktree cleanup must be explicit.
161
+
162
+ ## Source docs
163
+
164
+ For exact product requirements and implementation details, read the canonical docs on demand:
165
+
166
+ - `docs/specs/capabilities/docker-compute-workers.md`
167
+ - `docs/specs/capabilities/standalone-docker-runtime.md`
168
+ - `docs/project/compute-browser-resource-operating-model.md`
169
+ - `docs/project/compute-browser-resource-rollout-checklist.md`
170
+ - `src/skills/pibo-debug-auth/SKILL.md`