@pi-harness/pi-harness 0.1.22 → 0.1.24

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 (307) hide show
  1. package/README.md +12 -10
  2. package/apps/web/dist/assets/index-BcLXLKqO.js +24 -0
  3. package/apps/web/dist/assets/index-xF647pQJ.css +2 -0
  4. package/apps/web/dist/index.html +2 -2
  5. package/apps/web/package.json +6 -6
  6. package/apps/web/profile/cordis.yml +1 -0
  7. package/apps/web/server-dist/bin.js +45 -7
  8. package/apps/web/server-dist/bin.js.map +1 -1
  9. package/apps/web/src/server/bin.ts +45 -7
  10. package/apps/web/test/bin.test.ts +313 -0
  11. package/node_modules/@pi-harness/api-gateway/dist/index.d.ts.map +1 -1
  12. package/node_modules/@pi-harness/api-gateway/dist/index.js +295 -86
  13. package/node_modules/@pi-harness/api-gateway/dist/index.js.map +1 -1
  14. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/agent-teams.json +1 -1
  15. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/anchored-standard.json +1 -1
  16. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/annotation.json +1 -1
  17. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/archify.json +1 -1
  18. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/at-file.json +1 -1
  19. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/auto-mode.json +1 -1
  20. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/better-sidebar.json +1 -1
  21. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/browser-fetch.json +1 -1
  22. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/browser-session.json +1 -1
  23. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/canvas-draw.json +1 -1
  24. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/change-verifier.json +1 -1
  25. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cleaner.json +1 -1
  26. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cli-notifier.json +1 -1
  27. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/code2skill.json +1 -1
  28. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/colleague-skill.json +1 -1
  29. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/context-doctor.json +1 -1
  30. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/context.json +1 -1
  31. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cost-meter.json +1 -1
  32. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/dependency-checker.json +1 -1
  33. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/docker-sandbox.json +1 -1
  34. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/fail-logger.json +1 -1
  35. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/genui.json +1 -1
  36. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/git-time-capsule.json +1 -1
  37. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/graph-memory.json +1 -1
  38. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/history-compressor.json +1 -1
  39. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/hol-guard.json +3 -3
  40. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/i18n-pair.json +1 -1
  41. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/image-compressor.json +1 -1
  42. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/llm-verifier.json +1 -1
  43. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mcp-client.json +1 -1
  44. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mcp-panel.json +1 -1
  45. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/memory.json +1 -1
  46. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mirage-bridge.json +1 -1
  47. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mock-server.json +1 -1
  48. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/modlens.json +1 -1
  49. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/module-search.json +1 -1
  50. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/obsidian-sync.json +1 -1
  51. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/openpets.json +1 -1
  52. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plan-execute.json +1 -1
  53. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-check.json +1 -1
  54. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-dev.json +1 -1
  55. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-finder.json +1 -1
  56. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-radar.json +1 -1
  57. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-stars.json +1 -1
  58. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/prompt-guard.json +1 -1
  59. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/prompt-library.json +1 -1
  60. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/readme-gen.json +1 -1
  61. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/recall-unread.json +1 -1
  62. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/reverse-skill.json +1 -1
  63. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/reviewer-bot.json +1 -1
  64. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/runtime-doctor.json +1 -1
  65. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/secure-audit.json +1 -1
  66. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-bookmarks.json +1 -1
  67. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-bridge.json +1 -1
  68. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-compare.json +1 -1
  69. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-export.json +1 -1
  70. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-insights.json +1 -1
  71. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-search.json +1 -1
  72. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/skill-catalog.json +1 -1
  73. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/skill-guard.json +1 -1
  74. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/sql-lens.json +1 -1
  75. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/synapse.json +1 -1
  76. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/tab-manager.json +1 -1
  77. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/taskboard.json +1 -1
  78. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/telemetry-blocker.json +1 -1
  79. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/test-harness.json +1 -1
  80. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/theme-studio.json +1 -1
  81. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/token-guard.json +1 -1
  82. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/turn-rewind.json +1 -1
  83. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/undo-savepoint.json +1 -1
  84. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/vision-toolkit.json +1 -1
  85. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/web-research.json +1 -1
  86. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/workspace-navigator.json +1 -1
  87. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/workspace-search.json +1 -1
  88. package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/yaml-validator.json +1 -1
  89. package/node_modules/@pi-harness/api-gateway/package.json +1 -1
  90. package/node_modules/@pi-harness/cli/dist/main.d.ts +1 -0
  91. package/node_modules/@pi-harness/cli/dist/main.d.ts.map +1 -1
  92. package/node_modules/@pi-harness/cli/dist/main.js +11 -0
  93. package/node_modules/@pi-harness/cli/dist/main.js.map +1 -1
  94. package/node_modules/@pi-harness/cli/dist/node-stdio.d.ts.map +1 -1
  95. package/node_modules/@pi-harness/cli/dist/node-stdio.js +3 -1
  96. package/node_modules/@pi-harness/cli/dist/node-stdio.js.map +1 -1
  97. package/node_modules/@pi-harness/cli/dist/relaunch.d.ts.map +1 -1
  98. package/node_modules/@pi-harness/cli/dist/relaunch.js +4 -1
  99. package/node_modules/@pi-harness/cli/dist/relaunch.js.map +1 -1
  100. package/node_modules/@pi-harness/cli/package.json +1 -1
  101. package/node_modules/@pi-harness/host-webserver/dist/index.d.ts +1 -0
  102. package/node_modules/@pi-harness/host-webserver/dist/index.d.ts.map +1 -1
  103. package/node_modules/@pi-harness/host-webserver/dist/index.js +86 -3
  104. package/node_modules/@pi-harness/host-webserver/dist/index.js.map +1 -1
  105. package/node_modules/@pi-harness/host-webserver/package.json +1 -1
  106. package/node_modules/@pi-harness/web-app/dist/index.d.ts +3 -0
  107. package/node_modules/@pi-harness/web-app/dist/index.d.ts.map +1 -1
  108. package/node_modules/@pi-harness/web-app/dist/index.js +21 -8
  109. package/node_modules/@pi-harness/web-app/dist/index.js.map +1 -1
  110. package/node_modules/@pi-harness/web-app/package.json +1 -1
  111. package/package.json +8 -8
  112. package/packages/api-gateway/dist/index.d.ts.map +1 -1
  113. package/packages/api-gateway/dist/index.js +295 -86
  114. package/packages/api-gateway/dist/index.js.map +1 -1
  115. package/packages/api-gateway/dist/marketplace-entries/official/agent-teams.json +1 -1
  116. package/packages/api-gateway/dist/marketplace-entries/official/anchored-standard.json +1 -1
  117. package/packages/api-gateway/dist/marketplace-entries/official/annotation.json +1 -1
  118. package/packages/api-gateway/dist/marketplace-entries/official/archify.json +1 -1
  119. package/packages/api-gateway/dist/marketplace-entries/official/at-file.json +1 -1
  120. package/packages/api-gateway/dist/marketplace-entries/official/auto-mode.json +1 -1
  121. package/packages/api-gateway/dist/marketplace-entries/official/better-sidebar.json +1 -1
  122. package/packages/api-gateway/dist/marketplace-entries/official/browser-fetch.json +1 -1
  123. package/packages/api-gateway/dist/marketplace-entries/official/browser-session.json +1 -1
  124. package/packages/api-gateway/dist/marketplace-entries/official/canvas-draw.json +1 -1
  125. package/packages/api-gateway/dist/marketplace-entries/official/change-verifier.json +1 -1
  126. package/packages/api-gateway/dist/marketplace-entries/official/cleaner.json +1 -1
  127. package/packages/api-gateway/dist/marketplace-entries/official/cli-notifier.json +1 -1
  128. package/packages/api-gateway/dist/marketplace-entries/official/code2skill.json +1 -1
  129. package/packages/api-gateway/dist/marketplace-entries/official/colleague-skill.json +1 -1
  130. package/packages/api-gateway/dist/marketplace-entries/official/context-doctor.json +1 -1
  131. package/packages/api-gateway/dist/marketplace-entries/official/context.json +1 -1
  132. package/packages/api-gateway/dist/marketplace-entries/official/cost-meter.json +1 -1
  133. package/packages/api-gateway/dist/marketplace-entries/official/dependency-checker.json +1 -1
  134. package/packages/api-gateway/dist/marketplace-entries/official/docker-sandbox.json +1 -1
  135. package/packages/api-gateway/dist/marketplace-entries/official/fail-logger.json +1 -1
  136. package/packages/api-gateway/dist/marketplace-entries/official/genui.json +1 -1
  137. package/packages/api-gateway/dist/marketplace-entries/official/git-time-capsule.json +1 -1
  138. package/packages/api-gateway/dist/marketplace-entries/official/graph-memory.json +1 -1
  139. package/packages/api-gateway/dist/marketplace-entries/official/history-compressor.json +1 -1
  140. package/packages/api-gateway/dist/marketplace-entries/official/hol-guard.json +3 -3
  141. package/packages/api-gateway/dist/marketplace-entries/official/i18n-pair.json +1 -1
  142. package/packages/api-gateway/dist/marketplace-entries/official/image-compressor.json +1 -1
  143. package/packages/api-gateway/dist/marketplace-entries/official/llm-verifier.json +1 -1
  144. package/packages/api-gateway/dist/marketplace-entries/official/mcp-client.json +1 -1
  145. package/packages/api-gateway/dist/marketplace-entries/official/mcp-panel.json +1 -1
  146. package/packages/api-gateway/dist/marketplace-entries/official/memory.json +1 -1
  147. package/packages/api-gateway/dist/marketplace-entries/official/mirage-bridge.json +1 -1
  148. package/packages/api-gateway/dist/marketplace-entries/official/mock-server.json +1 -1
  149. package/packages/api-gateway/dist/marketplace-entries/official/modlens.json +1 -1
  150. package/packages/api-gateway/dist/marketplace-entries/official/module-search.json +1 -1
  151. package/packages/api-gateway/dist/marketplace-entries/official/obsidian-sync.json +1 -1
  152. package/packages/api-gateway/dist/marketplace-entries/official/openpets.json +1 -1
  153. package/packages/api-gateway/dist/marketplace-entries/official/plan-execute.json +1 -1
  154. package/packages/api-gateway/dist/marketplace-entries/official/plugin-check.json +1 -1
  155. package/packages/api-gateway/dist/marketplace-entries/official/plugin-dev.json +1 -1
  156. package/packages/api-gateway/dist/marketplace-entries/official/plugin-finder.json +1 -1
  157. package/packages/api-gateway/dist/marketplace-entries/official/plugin-radar.json +1 -1
  158. package/packages/api-gateway/dist/marketplace-entries/official/plugin-stars.json +1 -1
  159. package/packages/api-gateway/dist/marketplace-entries/official/prompt-guard.json +1 -1
  160. package/packages/api-gateway/dist/marketplace-entries/official/prompt-library.json +1 -1
  161. package/packages/api-gateway/dist/marketplace-entries/official/readme-gen.json +1 -1
  162. package/packages/api-gateway/dist/marketplace-entries/official/recall-unread.json +1 -1
  163. package/packages/api-gateway/dist/marketplace-entries/official/reverse-skill.json +1 -1
  164. package/packages/api-gateway/dist/marketplace-entries/official/reviewer-bot.json +1 -1
  165. package/packages/api-gateway/dist/marketplace-entries/official/runtime-doctor.json +1 -1
  166. package/packages/api-gateway/dist/marketplace-entries/official/secure-audit.json +1 -1
  167. package/packages/api-gateway/dist/marketplace-entries/official/session-bookmarks.json +1 -1
  168. package/packages/api-gateway/dist/marketplace-entries/official/session-bridge.json +1 -1
  169. package/packages/api-gateway/dist/marketplace-entries/official/session-compare.json +1 -1
  170. package/packages/api-gateway/dist/marketplace-entries/official/session-export.json +1 -1
  171. package/packages/api-gateway/dist/marketplace-entries/official/session-insights.json +1 -1
  172. package/packages/api-gateway/dist/marketplace-entries/official/session-search.json +1 -1
  173. package/packages/api-gateway/dist/marketplace-entries/official/skill-catalog.json +1 -1
  174. package/packages/api-gateway/dist/marketplace-entries/official/skill-guard.json +1 -1
  175. package/packages/api-gateway/dist/marketplace-entries/official/sql-lens.json +1 -1
  176. package/packages/api-gateway/dist/marketplace-entries/official/synapse.json +1 -1
  177. package/packages/api-gateway/dist/marketplace-entries/official/tab-manager.json +1 -1
  178. package/packages/api-gateway/dist/marketplace-entries/official/taskboard.json +1 -1
  179. package/packages/api-gateway/dist/marketplace-entries/official/telemetry-blocker.json +1 -1
  180. package/packages/api-gateway/dist/marketplace-entries/official/test-harness.json +1 -1
  181. package/packages/api-gateway/dist/marketplace-entries/official/theme-studio.json +1 -1
  182. package/packages/api-gateway/dist/marketplace-entries/official/token-guard.json +1 -1
  183. package/packages/api-gateway/dist/marketplace-entries/official/turn-rewind.json +1 -1
  184. package/packages/api-gateway/dist/marketplace-entries/official/undo-savepoint.json +1 -1
  185. package/packages/api-gateway/dist/marketplace-entries/official/vision-toolkit.json +1 -1
  186. package/packages/api-gateway/dist/marketplace-entries/official/web-research.json +1 -1
  187. package/packages/api-gateway/dist/marketplace-entries/official/workspace-navigator.json +1 -1
  188. package/packages/api-gateway/dist/marketplace-entries/official/workspace-search.json +1 -1
  189. package/packages/api-gateway/dist/marketplace-entries/official/yaml-validator.json +1 -1
  190. package/packages/api-gateway/package.json +1 -1
  191. package/packages/api-gateway/src/index.ts +310 -87
  192. package/packages/api-gateway/src/marketplace-entries/official/agent-teams.json +1 -1
  193. package/packages/api-gateway/src/marketplace-entries/official/anchored-standard.json +1 -1
  194. package/packages/api-gateway/src/marketplace-entries/official/annotation.json +1 -1
  195. package/packages/api-gateway/src/marketplace-entries/official/archify.json +1 -1
  196. package/packages/api-gateway/src/marketplace-entries/official/at-file.json +1 -1
  197. package/packages/api-gateway/src/marketplace-entries/official/auto-mode.json +1 -1
  198. package/packages/api-gateway/src/marketplace-entries/official/better-sidebar.json +1 -1
  199. package/packages/api-gateway/src/marketplace-entries/official/browser-fetch.json +1 -1
  200. package/packages/api-gateway/src/marketplace-entries/official/browser-session.json +1 -1
  201. package/packages/api-gateway/src/marketplace-entries/official/canvas-draw.json +1 -1
  202. package/packages/api-gateway/src/marketplace-entries/official/change-verifier.json +1 -1
  203. package/packages/api-gateway/src/marketplace-entries/official/cleaner.json +1 -1
  204. package/packages/api-gateway/src/marketplace-entries/official/cli-notifier.json +1 -1
  205. package/packages/api-gateway/src/marketplace-entries/official/code2skill.json +1 -1
  206. package/packages/api-gateway/src/marketplace-entries/official/colleague-skill.json +1 -1
  207. package/packages/api-gateway/src/marketplace-entries/official/context-doctor.json +1 -1
  208. package/packages/api-gateway/src/marketplace-entries/official/context.json +1 -1
  209. package/packages/api-gateway/src/marketplace-entries/official/cost-meter.json +1 -1
  210. package/packages/api-gateway/src/marketplace-entries/official/dependency-checker.json +1 -1
  211. package/packages/api-gateway/src/marketplace-entries/official/docker-sandbox.json +1 -1
  212. package/packages/api-gateway/src/marketplace-entries/official/fail-logger.json +1 -1
  213. package/packages/api-gateway/src/marketplace-entries/official/genui.json +1 -1
  214. package/packages/api-gateway/src/marketplace-entries/official/git-time-capsule.json +1 -1
  215. package/packages/api-gateway/src/marketplace-entries/official/graph-memory.json +1 -1
  216. package/packages/api-gateway/src/marketplace-entries/official/history-compressor.json +1 -1
  217. package/packages/api-gateway/src/marketplace-entries/official/hol-guard.json +3 -3
  218. package/packages/api-gateway/src/marketplace-entries/official/i18n-pair.json +1 -1
  219. package/packages/api-gateway/src/marketplace-entries/official/image-compressor.json +1 -1
  220. package/packages/api-gateway/src/marketplace-entries/official/llm-verifier.json +1 -1
  221. package/packages/api-gateway/src/marketplace-entries/official/mcp-client.json +1 -1
  222. package/packages/api-gateway/src/marketplace-entries/official/mcp-panel.json +1 -1
  223. package/packages/api-gateway/src/marketplace-entries/official/memory.json +1 -1
  224. package/packages/api-gateway/src/marketplace-entries/official/mirage-bridge.json +1 -1
  225. package/packages/api-gateway/src/marketplace-entries/official/mock-server.json +1 -1
  226. package/packages/api-gateway/src/marketplace-entries/official/modlens.json +1 -1
  227. package/packages/api-gateway/src/marketplace-entries/official/module-search.json +1 -1
  228. package/packages/api-gateway/src/marketplace-entries/official/obsidian-sync.json +1 -1
  229. package/packages/api-gateway/src/marketplace-entries/official/openpets.json +1 -1
  230. package/packages/api-gateway/src/marketplace-entries/official/plan-execute.json +1 -1
  231. package/packages/api-gateway/src/marketplace-entries/official/plugin-check.json +1 -1
  232. package/packages/api-gateway/src/marketplace-entries/official/plugin-dev.json +1 -1
  233. package/packages/api-gateway/src/marketplace-entries/official/plugin-finder.json +1 -1
  234. package/packages/api-gateway/src/marketplace-entries/official/plugin-radar.json +1 -1
  235. package/packages/api-gateway/src/marketplace-entries/official/plugin-stars.json +1 -1
  236. package/packages/api-gateway/src/marketplace-entries/official/prompt-guard.json +1 -1
  237. package/packages/api-gateway/src/marketplace-entries/official/prompt-library.json +1 -1
  238. package/packages/api-gateway/src/marketplace-entries/official/readme-gen.json +1 -1
  239. package/packages/api-gateway/src/marketplace-entries/official/recall-unread.json +1 -1
  240. package/packages/api-gateway/src/marketplace-entries/official/reverse-skill.json +1 -1
  241. package/packages/api-gateway/src/marketplace-entries/official/reviewer-bot.json +1 -1
  242. package/packages/api-gateway/src/marketplace-entries/official/runtime-doctor.json +1 -1
  243. package/packages/api-gateway/src/marketplace-entries/official/secure-audit.json +1 -1
  244. package/packages/api-gateway/src/marketplace-entries/official/session-bookmarks.json +1 -1
  245. package/packages/api-gateway/src/marketplace-entries/official/session-bridge.json +1 -1
  246. package/packages/api-gateway/src/marketplace-entries/official/session-compare.json +1 -1
  247. package/packages/api-gateway/src/marketplace-entries/official/session-export.json +1 -1
  248. package/packages/api-gateway/src/marketplace-entries/official/session-insights.json +1 -1
  249. package/packages/api-gateway/src/marketplace-entries/official/session-search.json +1 -1
  250. package/packages/api-gateway/src/marketplace-entries/official/skill-catalog.json +1 -1
  251. package/packages/api-gateway/src/marketplace-entries/official/skill-guard.json +1 -1
  252. package/packages/api-gateway/src/marketplace-entries/official/sql-lens.json +1 -1
  253. package/packages/api-gateway/src/marketplace-entries/official/synapse.json +1 -1
  254. package/packages/api-gateway/src/marketplace-entries/official/tab-manager.json +1 -1
  255. package/packages/api-gateway/src/marketplace-entries/official/taskboard.json +1 -1
  256. package/packages/api-gateway/src/marketplace-entries/official/telemetry-blocker.json +1 -1
  257. package/packages/api-gateway/src/marketplace-entries/official/test-harness.json +1 -1
  258. package/packages/api-gateway/src/marketplace-entries/official/theme-studio.json +1 -1
  259. package/packages/api-gateway/src/marketplace-entries/official/token-guard.json +1 -1
  260. package/packages/api-gateway/src/marketplace-entries/official/turn-rewind.json +1 -1
  261. package/packages/api-gateway/src/marketplace-entries/official/undo-savepoint.json +1 -1
  262. package/packages/api-gateway/src/marketplace-entries/official/vision-toolkit.json +1 -1
  263. package/packages/api-gateway/src/marketplace-entries/official/web-research.json +1 -1
  264. package/packages/api-gateway/src/marketplace-entries/official/workspace-navigator.json +1 -1
  265. package/packages/api-gateway/src/marketplace-entries/official/workspace-search.json +1 -1
  266. package/packages/api-gateway/src/marketplace-entries/official/yaml-validator.json +1 -1
  267. package/packages/api-gateway/test/index.test.ts +799 -3
  268. package/packages/api-gateway/test/marketplace-schema.test.ts +139 -0
  269. package/packages/api-gateway/test/packed-package.test.ts +70 -0
  270. package/packages/api-gateway/test/reference-docs.test.ts +50 -0
  271. package/packages/api-gateway/test/release-contract.test.ts +77 -0
  272. package/packages/api-gateway/test/release-package.test.ts +33 -2
  273. package/packages/api-gateway/test/release-version.test.ts +46 -4
  274. package/packages/bundle-web-app/dist/index.d.ts +3 -0
  275. package/packages/bundle-web-app/dist/index.d.ts.map +1 -1
  276. package/packages/bundle-web-app/dist/index.js +21 -8
  277. package/packages/bundle-web-app/dist/index.js.map +1 -1
  278. package/packages/bundle-web-app/package.json +1 -1
  279. package/packages/bundle-web-app/src/index.ts +25 -8
  280. package/packages/bundle-web-app/test/index.test.ts +116 -4
  281. package/packages/cli/dist/main.d.ts +1 -0
  282. package/packages/cli/dist/main.d.ts.map +1 -1
  283. package/packages/cli/dist/main.js +11 -0
  284. package/packages/cli/dist/main.js.map +1 -1
  285. package/packages/cli/dist/node-stdio.d.ts.map +1 -1
  286. package/packages/cli/dist/node-stdio.js +3 -1
  287. package/packages/cli/dist/node-stdio.js.map +1 -1
  288. package/packages/cli/dist/relaunch.d.ts.map +1 -1
  289. package/packages/cli/dist/relaunch.js +4 -1
  290. package/packages/cli/dist/relaunch.js.map +1 -1
  291. package/packages/cli/package.json +1 -1
  292. package/packages/cli/src/main.ts +11 -0
  293. package/packages/cli/src/node-stdio.ts +6 -3
  294. package/packages/cli/src/relaunch.ts +4 -1
  295. package/packages/cli/test/cli.test.ts +3 -1
  296. package/packages/cli/test/main.test.ts +134 -0
  297. package/packages/cli/test/node-stdio.test.ts +43 -0
  298. package/packages/cli/test/relaunch.test.ts +110 -0
  299. package/packages/host-webserver/dist/index.d.ts +1 -0
  300. package/packages/host-webserver/dist/index.d.ts.map +1 -1
  301. package/packages/host-webserver/dist/index.js +86 -3
  302. package/packages/host-webserver/dist/index.js.map +1 -1
  303. package/packages/host-webserver/package.json +1 -1
  304. package/packages/host-webserver/src/index.ts +95 -3
  305. package/packages/host-webserver/test/index.test.ts +160 -1
  306. package/apps/web/dist/assets/index-BVI_IS-R.css +0 -2
  307. package/apps/web/dist/assets/index-w0KQgv8x.js +0 -22
@@ -0,0 +1,313 @@
1
+ import { spawn } from "node:child_process";
2
+ import { existsSync } from "node:fs";
3
+ import { mkdir, mkdtemp, rm } from "node:fs/promises";
4
+ import { request as httpRequest } from "node:http";
5
+ import { createServer } from "node:net";
6
+ import { tmpdir } from "node:os";
7
+ import { join } from "node:path";
8
+ import { setTimeout as delay } from "node:timers/promises";
9
+ import { afterEach, describe, expect, test } from "vitest";
10
+
11
+ const BIN = join(import.meta.dirname, "..", "server-dist", "bin.js");
12
+
13
+ interface LauncherRun {
14
+ readonly consoleUrl: string;
15
+ readonly code: number | null;
16
+ readonly signal: NodeJS.Signals | null;
17
+ readonly elapsedMs: number;
18
+ readonly stderr: string;
19
+ }
20
+
21
+ interface LauncherExit {
22
+ readonly code: number | null;
23
+ readonly stdout: string;
24
+ readonly stderr: string;
25
+ }
26
+
27
+ const directories: string[] = [];
28
+
29
+ afterEach(async () => {
30
+ await Promise.all(directories.splice(0).map(async (directory) => rm(directory, { recursive: true, force: true })));
31
+ });
32
+
33
+ async function makeTempDir(label: string): Promise<string> {
34
+ const directory = await mkdtemp(join(tmpdir(), `pi-harness-web-bin-${label}-`));
35
+ directories.push(directory);
36
+ return directory;
37
+ }
38
+
39
+ // Boots the built launcher on an ephemeral port with an isolated agent directory, waits for the console URL, runs the optional probe against the live server, sends the signal, and reports how the process exited.
40
+ async function runLauncher(
41
+ signal: NodeJS.Signals,
42
+ extraEnv: Record<string, string> = {},
43
+ spawnCwd?: string,
44
+ probe?: (consoleUrl: string) => Promise<void>,
45
+ ): Promise<LauncherRun> {
46
+ const agentDir = await makeTempDir("agent");
47
+ const child = spawn(process.execPath, [BIN], {
48
+ stdio: ["ignore", "pipe", "pipe"],
49
+ ...(spawnCwd === undefined ? {} : { cwd: spawnCwd }),
50
+ env: {
51
+ ...process.env,
52
+ PI_HARNESS_PORT: "0",
53
+ PI_AGENT_DIR: agentDir,
54
+ PI_HARNESS_PROVIDER: "anthropic",
55
+ PI_HARNESS_MODEL: "claude-sonnet-4-5",
56
+ ...extraEnv,
57
+ },
58
+ });
59
+ let stdout = "";
60
+ let stderr = "";
61
+ child.stdout.setEncoding("utf8");
62
+ child.stderr.setEncoding("utf8");
63
+ child.stderr.on("data", (chunk: string) => {
64
+ stderr += chunk;
65
+ });
66
+ const exit = new Promise<{ code: number | null; signal: NodeJS.Signals | null }>((resolve) =>
67
+ child.once("exit", (code, exitSignal) => resolve({ code, signal: exitSignal })),
68
+ );
69
+ const consoleUrl = await new Promise<string>((resolve, reject) => {
70
+ const check = (chunk: string) => {
71
+ stdout += chunk;
72
+ const match = /Pi Harness web console: (\S+)/u.exec(stdout);
73
+ if (match?.[1] !== undefined) {
74
+ child.stdout.off("data", check);
75
+ resolve(match[1]);
76
+ }
77
+ };
78
+ child.stdout.on("data", check);
79
+ void exit.then(({ code }) => reject(new Error("launcher exited before printing the console URL (code " + String(code) + "): " + stderr)));
80
+ });
81
+ try {
82
+ await probe?.(consoleUrl);
83
+ } catch (error) {
84
+ child.kill("SIGKILL");
85
+ throw error;
86
+ }
87
+ const started = Date.now();
88
+ child.kill(signal);
89
+ const timeout = setTimeout(() => child.kill("SIGKILL"), 15_000);
90
+ const result = await exit;
91
+ clearTimeout(timeout);
92
+ return { consoleUrl, ...result, elapsedMs: Date.now() - started, stderr };
93
+ }
94
+
95
+ // Runs the built launcher until it exits on its own, for the startup guards that must abort before a console URL is ever printed.
96
+ async function runLauncherToExit(extraEnv: Record<string, string>): Promise<LauncherExit> {
97
+ const agentDir = await makeTempDir("guard");
98
+ const child = spawn(process.execPath, [BIN], {
99
+ stdio: ["ignore", "pipe", "pipe"],
100
+ env: {
101
+ ...process.env,
102
+ PI_HARNESS_PORT: "0",
103
+ PI_AGENT_DIR: agentDir,
104
+ PI_HARNESS_PROVIDER: "anthropic",
105
+ PI_HARNESS_MODEL: "claude-sonnet-4-5",
106
+ PI_HARNESS_DISABLE_UPDATE_CHECK: "1",
107
+ ...extraEnv,
108
+ },
109
+ });
110
+ let stdout = "";
111
+ let stderr = "";
112
+ child.stdout.setEncoding("utf8");
113
+ child.stderr.setEncoding("utf8");
114
+ child.stdout.on("data", (chunk: string) => {
115
+ stdout += chunk;
116
+ });
117
+ child.stderr.on("data", (chunk: string) => {
118
+ stderr += chunk;
119
+ });
120
+ const timeout = setTimeout(() => child.kill("SIGKILL"), 30_000);
121
+ const code = await new Promise<number | null>((resolve) => child.once("exit", (exitCode) => resolve(exitCode)));
122
+ clearTimeout(timeout);
123
+ return { code, stdout, stderr };
124
+ }
125
+
126
+ // fetch() drops a caller-supplied Host header because "host" is a forbidden header name, so a request that has to carry a proxy hostname goes out over node:http instead.
127
+ function statusWithHostHeader(port: number, hostHeader: string): Promise<number> {
128
+ return new Promise((resolve, reject) => {
129
+ const outgoing = httpRequest({ host: "127.0.0.1", port, path: "/api/status", headers: { host: hostHeader } }, (response) => {
130
+ response.resume();
131
+ resolve(response.statusCode ?? 0);
132
+ });
133
+ outgoing.once("error", reject);
134
+ outgoing.end();
135
+ });
136
+ }
137
+
138
+ // Takes a loopback port from the kernel and releases it again, so a launcher run can be probed over HTTP without reading the console URL from stdout.
139
+ async function reserveLoopbackPort(): Promise<number> {
140
+ const server = createServer();
141
+ await new Promise<void>((resolve) => server.listen(0, "127.0.0.1", resolve));
142
+ const address = server.address();
143
+ const port = typeof address === "object" && address !== null ? address.port : 0;
144
+ await new Promise<void>((resolve) => server.close(() => resolve()));
145
+ return port;
146
+ }
147
+
148
+ describe("web launcher", () => {
149
+ test("completes graceful shutdown on SIGINT and exits with code 130 instead of dying by signal", async () => {
150
+ const run = await runLauncher("SIGINT");
151
+ expect(run.consoleUrl).toMatch(/^http:\/\/127\.0\.0\.1:\d+$/u);
152
+ expect(run.signal).toBeNull();
153
+ expect(run.code).toBe(130);
154
+ expect(run.stderr).not.toContain("shutdown timed out");
155
+ expect(run.elapsedMs).toBeLessThan(4_000);
156
+ }, 30_000);
157
+
158
+ test("maps SIGTERM to exit code 143", async () => {
159
+ const run = await runLauncher("SIGTERM");
160
+ expect(run.signal).toBeNull();
161
+ expect(run.code).toBe(143);
162
+ expect(run.stderr).not.toContain("shutdown timed out");
163
+ }, 30_000);
164
+
165
+ test("binds a bracketed IPv6 loopback host by stripping the brackets", async () => {
166
+ const run = await runLauncher("SIGINT", { PI_HARNESS_HOST: "[::1]" });
167
+ expect(run.consoleUrl).toMatch(/^http:\/\/\[::1\]:\d+$/u);
168
+ expect(run.code).toBe(130);
169
+ }, 30_000);
170
+
171
+ test("resolves a relative PI_AGENT_DIR against the working directory and ignores surrounding whitespace", async () => {
172
+ const workingDir = await makeTempDir("cwd");
173
+ const home = await makeTempDir("home");
174
+ await mkdir(join(workingDir, "agent-state"));
175
+
176
+ const run = await runLauncher("SIGINT", { PI_AGENT_DIR: " ./agent-state ", HOME: home }, workingDir);
177
+
178
+ expect(run.consoleUrl).toMatch(/^http:\/\/127\.0\.0\.1:\d+$/u);
179
+ expect(run.stderr).not.toContain("must be an absolute path");
180
+ // Booting writes the model store into the agent directory, so these two paths pin which base the relative value resolved against: the working directory, not the home directory.
181
+ expect(existsSync(join(workingDir, "agent-state", "models-store.json"))).toBe(true);
182
+ expect(existsSync(join(home, "agent-state"))).toBe(false);
183
+ expect(run.code).toBe(130);
184
+ }, 60_000);
185
+
186
+ test("treats a blank PI_AGENT_DIR as unset and falls back to the home agent directory", async () => {
187
+ const workingDir = await makeTempDir("cwd");
188
+ const home = await makeTempDir("home");
189
+ await mkdir(join(home, ".pi", "agent"), { recursive: true });
190
+
191
+ const run = await runLauncher("SIGINT", { PI_AGENT_DIR: " ", HOME: home }, workingDir);
192
+
193
+ expect(run.stderr).not.toContain("must be an absolute path");
194
+ expect(existsSync(join(home, ".pi", "agent", "models-store.json"))).toBe(true);
195
+ expect(existsSync(join(workingDir, ".pi"))).toBe(false);
196
+ expect(run.code).toBe(130);
197
+ }, 60_000);
198
+
199
+ test("keeps serving and shuts down gracefully when a closed stdout pipe breaks the console URL write", async () => {
200
+ const agentDir = await makeTempDir("epipe");
201
+ const port = await reserveLoopbackPort();
202
+ const child = spawn(process.execPath, [BIN], {
203
+ stdio: ["ignore", "pipe", "pipe"],
204
+ env: {
205
+ ...process.env,
206
+ PI_HARNESS_PORT: String(port),
207
+ PI_AGENT_DIR: agentDir,
208
+ PI_HARNESS_PROVIDER: "anthropic",
209
+ PI_HARNESS_MODEL: "claude-sonnet-4-5",
210
+ PI_HARNESS_DISABLE_UPDATE_CHECK: "1",
211
+ },
212
+ });
213
+ let stderr = "";
214
+ let exited = false;
215
+ child.stderr.setEncoding("utf8");
216
+ child.stderr.on("data", (chunk: string) => {
217
+ stderr += chunk;
218
+ });
219
+ const exit = new Promise<{ code: number | null; signal: NodeJS.Signals | null }>((resolve) =>
220
+ child.once("exit", (code, signal) => {
221
+ exited = true;
222
+ resolve({ code, signal });
223
+ }),
224
+ );
225
+ // Closing the read end of the pipe is what `pi-harness | head -1` does: the launcher's next write raises EPIPE on process.stdout.
226
+ child.stdout.destroy();
227
+
228
+ await expect
229
+ .poll(
230
+ async () => {
231
+ if (exited) return "exited";
232
+ try {
233
+ await fetch(`http://127.0.0.1:${String(port)}/`);
234
+ return "listening";
235
+ } catch {
236
+ return "starting";
237
+ }
238
+ },
239
+ { interval: 200, timeout: 40_000 },
240
+ )
241
+ .not.toBe("starting");
242
+ // The console URL is written shortly after the server starts listening, so wait past that point before deciding the process survived the broken pipe.
243
+ await delay(3_000);
244
+
245
+ expect(stderr).not.toContain("EPIPE");
246
+ expect(exited).toBe(false);
247
+ child.kill("SIGINT");
248
+ const result = await exit;
249
+ expect(result.code).toBe(130);
250
+ }, 60_000);
251
+ });
252
+
253
+ describe("web launcher startup guards", () => {
254
+ test("refuses a non-loopback PI_HARNESS_HOST while remote access is not opted in", async () => {
255
+ for (const remoteHost of ["0.0.0.0", "192.0.2.10"]) {
256
+ const run = await runLauncherToExit({ PI_HARNESS_HOST: remoteHost });
257
+
258
+ expect(run.stderr).toContain("Refusing non-loopback PI_HARNESS_HOST");
259
+ expect(run.stdout).not.toContain("Pi Harness web console:");
260
+ expect(run.code).not.toBe(0);
261
+ }
262
+ }, 60_000);
263
+
264
+ test("binds a host outside the loopback allowlist once PI_HARNESS_ALLOW_REMOTE opts in", async () => {
265
+ // "LOCALHOST" is not one of the literals the launcher treats as loopback, so it takes the opt-in path, yet getaddrinfo still resolves it to the loopback address: the bind succeeds without putting the console on the network.
266
+ const run = await runLauncher("SIGINT", { PI_HARNESS_HOST: "LOCALHOST", PI_HARNESS_ALLOW_REMOTE: "1" });
267
+
268
+ expect(run.stderr).not.toContain("Refusing non-loopback PI_HARNESS_HOST");
269
+ expect(run.consoleUrl).toMatch(/^http:\/\/LOCALHOST:\d+$/u);
270
+ expect(run.code).toBe(130);
271
+ }, 60_000);
272
+
273
+ test("hands an opted-in host to listen and reports the bind failure when no interface owns it", async () => {
274
+ // 192.0.2.10 is TEST-NET-1 and is assigned to no interface, so this pins that the guard let the host through: the run dies in listen rather than in the guard.
275
+ const run = await runLauncherToExit({ PI_HARNESS_HOST: "192.0.2.10", PI_HARNESS_ALLOW_REMOTE: "1" });
276
+
277
+ expect(run.stderr).not.toContain("Refusing non-loopback PI_HARNESS_HOST");
278
+ expect(run.stderr).toContain("EADDRNOTAVAIL");
279
+ expect(run.code).toBe(1);
280
+ }, 60_000);
281
+
282
+ test("accepts a proxy hostname in the Host header only when PI_HARNESS_ALLOWED_HOSTS names it", async () => {
283
+ const statuses: number[] = [];
284
+ const run = await runLauncher("SIGINT", { PI_HARNESS_ALLOWED_HOSTS: " proxy.internal.example , " }, undefined, async (consoleUrl) => {
285
+ const port = Number(new URL(consoleUrl).port);
286
+ statuses.push(await statusWithHostHeader(port, `proxy.internal.example:${String(port)}`));
287
+ statuses.push(await statusWithHostHeader(port, `other.internal.example:${String(port)}`));
288
+ });
289
+
290
+ expect(statuses).toEqual([200, 400]);
291
+ expect(run.code).toBe(130);
292
+ }, 60_000);
293
+
294
+ test("rejects a PI_HARNESS_ALLOWED_HOSTS entry that is not a bare hostname", async () => {
295
+ for (const entry of ["https://proxy.example", "proxy.example:8443", "proxy.example/app"]) {
296
+ const run = await runLauncherToExit({ PI_HARNESS_ALLOWED_HOSTS: entry });
297
+
298
+ expect(run.stderr).toContain("PI_HARNESS_ALLOWED_HOSTS entries must be bare hostnames");
299
+ expect(run.stdout).not.toContain("Pi Harness web console:");
300
+ expect(run.code).not.toBe(0);
301
+ }
302
+ }, 60_000);
303
+
304
+ test("rejects a PI_HARNESS_PORT that is not an integer inside the valid range", async () => {
305
+ for (const badPort of ["70000", "-1", "abc"]) {
306
+ const run = await runLauncherToExit({ PI_HARNESS_PORT: badPort });
307
+
308
+ expect(run.stderr).toContain("PI_HARNESS_PORT must be an integer between 0 and 65535");
309
+ expect(run.stdout).not.toContain("Pi Harness web console:");
310
+ expect(run.code).not.toBe(0);
311
+ }
312
+ }, 60_000);
313
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;;;;mBA8hBlC,OAAO;;AAHxB,wBAqzCE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;;;;mBAkqBlC,OAAO;;AAHxB,wBAg5CE"}