@rexvane/piweb 0.3.14 → 0.3.16

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 (262) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +12 -9
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +6 -6
  5. package/.next/react-loadable-manifest.json +16 -4
  6. package/.next/required-server-files.js +3 -1
  7. package/.next/required-server-files.json +3 -1
  8. package/.next/routes-manifest.json +20 -0
  9. package/.next/server/app/_global-error/page.js +2 -2
  10. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page.js +1 -1
  17. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/server/app/_not-found.html +1 -1
  19. package/.next/server/app/_not-found.rsc +7 -4
  20. package/.next/server/app/_not-found.segments/_full.segment.rsc +7 -4
  21. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -2
  22. package/.next/server/app/_not-found.segments/_tree.segment.rsc +5 -2
  23. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  24. package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
  25. package/.next/server/app/api/agent/[id]/route.js +1 -1
  26. package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
  27. package/.next/server/app/api/agent/[id]/tree/route.js +1 -1
  28. package/.next/server/app/api/agent/[id]/tree/route.js.nft.json +1 -1
  29. package/.next/server/app/api/agent/new/route.js +1 -1
  30. package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
  31. package/.next/server/app/api/config/route.js +1 -1
  32. package/.next/server/app/api/config/route.js.nft.json +1 -1
  33. package/.next/server/app/api/files/route.js +1 -1
  34. package/.next/server/app/api/files/route.js.nft.json +1 -1
  35. package/.next/server/app/api/git/route.js +2 -2
  36. package/.next/server/app/api/git/route.js.nft.json +1 -1
  37. package/.next/server/app/api/growth/route.js +1 -1
  38. package/.next/server/app/api/growth/route.js.nft.json +1 -1
  39. package/.next/server/app/api/health/route.js +1 -1
  40. package/.next/server/app/api/models/route.js +1 -1
  41. package/.next/server/app/api/models/route.js.nft.json +1 -1
  42. package/.next/server/app/api/pi-settings/route.js +1 -1
  43. package/.next/server/app/api/pi-settings/route.js.nft.json +1 -1
  44. package/.next/server/app/api/plugins/route.js +1 -1
  45. package/.next/server/app/api/plugins/route.js.nft.json +1 -1
  46. package/.next/server/app/api/prompts/route.js +1 -1
  47. package/.next/server/app/api/prompts/route.js.nft.json +1 -1
  48. package/.next/server/app/api/security/route.js +1 -1
  49. package/.next/server/app/api/security/route.js.nft.json +1 -1
  50. package/.next/server/app/api/sessions/[id]/export/route.js +1 -1
  51. package/.next/server/app/api/sessions/[id]/export/route.js.nft.json +1 -1
  52. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  53. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  54. package/.next/server/app/api/sessions/import/route.js +3 -3
  55. package/.next/server/app/api/sessions/import/route.js.nft.json +1 -1
  56. package/.next/server/app/api/sessions/route.js +1 -1
  57. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  58. package/.next/server/app/api/skills/route.js +2 -2
  59. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  60. package/.next/server/app/api/swarm/[id]/route.js +1 -0
  61. package/.next/server/app/api/swarm/[id]/route.js.nft.json +1 -0
  62. package/.next/server/app/api/swarm/[id]/route_client-reference-manifest.js +1 -0
  63. package/.next/server/app/api/swarm/route.js +1 -0
  64. package/.next/server/app/api/swarm/route.js.nft.json +1 -0
  65. package/.next/server/app/api/swarm/route_client-reference-manifest.js +1 -0
  66. package/.next/server/app/api/tests/route.js +2 -0
  67. package/.next/server/app/api/tests/route.js.nft.json +1 -0
  68. package/.next/server/app/api/tests/route_client-reference-manifest.js +1 -0
  69. package/.next/server/app/api/update/route.js +2 -2
  70. package/.next/server/app/api/update/route.js.nft.json +1 -1
  71. package/.next/server/app/api/version/route.js +1 -1
  72. package/.next/server/app/api/version/route.js.nft.json +1 -1
  73. package/.next/server/app/api/web-auth/route.js +1 -1
  74. package/.next/server/app/api/workspaces/route.js +1 -1
  75. package/.next/server/app/api/workspaces/route.js.nft.json +1 -1
  76. package/.next/server/app/icon.svg/route.js +1 -1
  77. package/.next/server/app/index.html +1 -1
  78. package/.next/server/app/index.rsc +9 -6
  79. package/.next/server/app/index.segments/__PAGE__.segment.rsc +7 -4
  80. package/.next/server/app/index.segments/_full.segment.rsc +9 -6
  81. package/.next/server/app/index.segments/_tree.segment.rsc +5 -2
  82. package/.next/server/app/login/page.js +1 -1
  83. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  84. package/.next/server/app/login.html +1 -1
  85. package/.next/server/app/login.rsc +8 -5
  86. package/.next/server/app/login.segments/_full.segment.rsc +8 -5
  87. package/.next/server/app/login.segments/_tree.segment.rsc +5 -2
  88. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +6 -3
  89. package/.next/server/app/page.js +1 -1
  90. package/.next/server/app/page_client-reference-manifest.js +1 -1
  91. package/.next/server/app-paths-manifest.json +12 -9
  92. package/.next/server/chunks/496.js +1 -1
  93. package/.next/server/chunks/532.js +1 -1
  94. package/.next/server/chunks/686.js +6 -2
  95. package/.next/server/chunks/757.js +1 -0
  96. package/.next/server/chunks/775.js +3 -0
  97. package/.next/server/middleware-build-manifest.js +1 -1
  98. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  99. package/.next/server/pages/404.html +1 -1
  100. package/.next/server/pages/500.html +1 -1
  101. package/.next/server/server-reference-manifest.json +1 -1
  102. package/.next/static/0t1jBUAuVaTFTXxRyIo3q/_buildManifest.js +1 -0
  103. package/.next/static/chunks/2608.43c58236c9cce8e6.js +1 -0
  104. package/.next/static/chunks/{2716.a9e808190a4e2424.js → 2716.4ec42df1d51354c9.js} +1 -1
  105. package/.next/static/chunks/4632.62139b565b657aac.js +1 -0
  106. package/.next/static/chunks/{4673.d3d0a7f2599080fb.js → 4673.7796104395deb8d7.js} +1 -1
  107. package/.next/static/chunks/4686-17f21a006739a596.js +1 -0
  108. package/.next/static/chunks/7577.10af9bb661652da8.js +1 -0
  109. package/.next/static/chunks/8866.38ec4ac4ee5a1b74.js +1 -0
  110. package/.next/static/chunks/app/_global-error/page-5148173b3f55e415.js +1 -0
  111. package/.next/static/chunks/app/api/agent/[id]/events/route-5148173b3f55e415.js +1 -0
  112. package/.next/static/chunks/app/api/agent/[id]/route-5148173b3f55e415.js +1 -0
  113. package/.next/static/chunks/app/api/agent/[id]/tree/route-5148173b3f55e415.js +1 -0
  114. package/.next/static/chunks/app/api/agent/new/route-5148173b3f55e415.js +1 -0
  115. package/.next/static/chunks/app/api/config/route-5148173b3f55e415.js +1 -0
  116. package/.next/static/chunks/app/api/files/route-5148173b3f55e415.js +1 -0
  117. package/.next/static/chunks/app/api/git/route-5148173b3f55e415.js +1 -0
  118. package/.next/static/chunks/app/api/growth/route-5148173b3f55e415.js +1 -0
  119. package/.next/static/chunks/app/api/health/route-5148173b3f55e415.js +1 -0
  120. package/.next/static/chunks/app/api/models/route-5148173b3f55e415.js +1 -0
  121. package/.next/static/chunks/app/api/pi-settings/route-5148173b3f55e415.js +1 -0
  122. package/.next/static/chunks/app/api/plugins/route-5148173b3f55e415.js +1 -0
  123. package/.next/static/chunks/app/api/prompts/route-5148173b3f55e415.js +1 -0
  124. package/.next/static/chunks/app/api/security/route-5148173b3f55e415.js +1 -0
  125. package/.next/static/chunks/app/api/sessions/[id]/export/route-5148173b3f55e415.js +1 -0
  126. package/.next/static/chunks/app/api/sessions/[id]/route-5148173b3f55e415.js +1 -0
  127. package/.next/static/chunks/app/api/sessions/import/route-5148173b3f55e415.js +1 -0
  128. package/.next/static/chunks/app/api/sessions/route-5148173b3f55e415.js +1 -0
  129. package/.next/static/chunks/app/api/skills/route-5148173b3f55e415.js +1 -0
  130. package/.next/static/chunks/app/api/swarm/[id]/route-5148173b3f55e415.js +1 -0
  131. package/.next/static/chunks/app/api/swarm/route-5148173b3f55e415.js +1 -0
  132. package/.next/static/chunks/app/api/tests/route-5148173b3f55e415.js +1 -0
  133. package/.next/static/chunks/app/api/update/route-5148173b3f55e415.js +1 -0
  134. package/.next/static/chunks/app/api/version/route-5148173b3f55e415.js +1 -0
  135. package/.next/static/chunks/app/api/web-auth/route-5148173b3f55e415.js +1 -0
  136. package/.next/static/chunks/app/api/workspaces/route-5148173b3f55e415.js +1 -0
  137. package/.next/static/chunks/app/page-14379b8060d5cf07.js +1 -0
  138. package/.next/static/chunks/next/dist/client/components/builtin/app-error-5148173b3f55e415.js +1 -0
  139. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-5148173b3f55e415.js +1 -0
  140. package/.next/static/chunks/next/dist/client/components/builtin/not-found-5148173b3f55e415.js +1 -0
  141. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-5148173b3f55e415.js +1 -0
  142. package/.next/static/chunks/webpack-d1a69ad9edb38b11.js +1 -0
  143. package/.next/static/css/d0a0162cb481abe8.css +1 -0
  144. package/.next/types/app/api/swarm/[id]/route.ts +353 -0
  145. package/.next/types/app/api/swarm/route.ts +353 -0
  146. package/.next/types/app/api/tests/route.ts +353 -0
  147. package/.next/types/routes.d.ts +4 -1
  148. package/.next/types/validator.ts +27 -0
  149. package/README.md +61 -7
  150. package/assets/archive.png +0 -0
  151. package/assets/growth-1.png +0 -0
  152. package/assets/growth-2.png +0 -0
  153. package/assets/import.png +0 -0
  154. package/assets/main.png +0 -0
  155. package/assets/outline.png +0 -0
  156. package/assets/prompts-1.png +0 -0
  157. package/assets/prompts-2.png +0 -0
  158. package/assets/providers-1.png +0 -0
  159. package/assets/providers-2.png +0 -0
  160. package/assets/providers-3.png +0 -0
  161. package/assets/trace-1.png +0 -0
  162. package/assets/trace-2.png +0 -0
  163. package/assets/trace-3.png +0 -0
  164. package/assets/trace-4.png +0 -0
  165. package/assets/viewer-1.png +0 -0
  166. package/assets/viewer-2.png +0 -0
  167. package/next.config.ts +6 -2
  168. package/package.json +10 -5
  169. package/scripts/launcher.mjs +1 -1
  170. package/scripts/managed-niubash-assets.mjs +146 -0
  171. package/scripts/pick-folder.ps1 +11 -2
  172. package/scripts/prepare-niubash-packages.mjs +182 -0
  173. package/scripts/release.mjs +11 -31
  174. package/scripts/run-test-file.mjs +34 -0
  175. package/scripts/smoke-managed-niubash.mjs +62 -0
  176. package/scripts/verify-package.mjs +53 -0
  177. package/scripts/verify-release-config.mjs +24 -0
  178. package/src/app/api/config/route.ts +4 -1
  179. package/src/app/api/security/route.ts +8 -3
  180. package/src/app/api/swarm/[id]/route.ts +28 -0
  181. package/src/app/api/swarm/route.ts +24 -0
  182. package/src/app/api/tests/route.ts +27 -0
  183. package/src/app/api/update/route.ts +8 -2
  184. package/src/app/globals.css +777 -0
  185. package/src/app/layout.tsx +13 -6
  186. package/src/components/AppShell.tsx +505 -199
  187. package/src/components/ChatInput.tsx +153 -26
  188. package/src/components/ChatWindow.tsx +46 -40
  189. package/src/components/ContextMeter.tsx +11 -17
  190. package/src/components/FileViewer.tsx +1 -1
  191. package/src/components/GitPanel.tsx +13 -11
  192. package/src/components/ModelSelector.tsx +19 -6
  193. package/src/components/PiMark.tsx +5 -38
  194. package/src/components/ProjectPanel.tsx +1 -0
  195. package/src/components/PromptPanel.tsx +132 -51
  196. package/src/components/SessionImportSection.tsx +53 -37
  197. package/src/components/SessionSidebar.tsx +159 -57
  198. package/src/components/SettingsPanel.tsx +330 -193
  199. package/src/components/SwarmCoordinatorPod.tsx +1021 -0
  200. package/src/components/TestInspectorPod.tsx +549 -0
  201. package/src/components/icons.tsx +23 -0
  202. package/src/hooks/usePiWeb.ts +112 -8
  203. package/src/i18n.tsx +59 -3
  204. package/src/lib/agent-manager.ts +182 -11
  205. package/src/lib/command-validation.ts +9 -1
  206. package/src/lib/delegation.ts +93 -0
  207. package/src/lib/managed-niubash.ts +231 -0
  208. package/src/lib/pi.ts +3 -2
  209. package/src/lib/runtime-activity.ts +27 -0
  210. package/src/lib/session-import/claude.ts +13 -2
  211. package/src/lib/session-import/codex.ts +44 -8
  212. package/src/lib/session-import/files.ts +14 -0
  213. package/src/lib/session-import/grok.ts +54 -24
  214. package/src/lib/session-import/index.ts +5 -0
  215. package/src/lib/session-import/lock.ts +25 -0
  216. package/src/lib/session-import/types.ts +12 -0
  217. package/src/lib/session-import/writer.ts +8 -3
  218. package/src/lib/skills-service.ts +16 -9
  219. package/src/lib/swarm-service.ts +371 -0
  220. package/src/lib/test-run-service.ts +122 -0
  221. package/src/lib/theme.ts +68 -1
  222. package/src/lib/trajectory.ts +1 -0
  223. package/src/lib/types.ts +14 -0
  224. package/src/lib/workflow.ts +55 -0
  225. package/.next/static/LOFl9bqqMV2goBV8erESO/_buildManifest.js +0 -1
  226. package/.next/static/chunks/2608.ec8ff1f5767c9056.js +0 -1
  227. package/.next/static/chunks/4632.112d2e893d48d188.js +0 -1
  228. package/.next/static/chunks/4686-7d694def920ff093.js +0 -1
  229. package/.next/static/chunks/app/_global-error/page-f77e9ede9808b18e.js +0 -1
  230. package/.next/static/chunks/app/api/agent/[id]/events/route-f77e9ede9808b18e.js +0 -1
  231. package/.next/static/chunks/app/api/agent/[id]/route-f77e9ede9808b18e.js +0 -1
  232. package/.next/static/chunks/app/api/agent/[id]/tree/route-f77e9ede9808b18e.js +0 -1
  233. package/.next/static/chunks/app/api/agent/new/route-f77e9ede9808b18e.js +0 -1
  234. package/.next/static/chunks/app/api/config/route-f77e9ede9808b18e.js +0 -1
  235. package/.next/static/chunks/app/api/files/route-f77e9ede9808b18e.js +0 -1
  236. package/.next/static/chunks/app/api/git/route-f77e9ede9808b18e.js +0 -1
  237. package/.next/static/chunks/app/api/growth/route-f77e9ede9808b18e.js +0 -1
  238. package/.next/static/chunks/app/api/health/route-f77e9ede9808b18e.js +0 -1
  239. package/.next/static/chunks/app/api/models/route-f77e9ede9808b18e.js +0 -1
  240. package/.next/static/chunks/app/api/pi-settings/route-f77e9ede9808b18e.js +0 -1
  241. package/.next/static/chunks/app/api/plugins/route-f77e9ede9808b18e.js +0 -1
  242. package/.next/static/chunks/app/api/prompts/route-f77e9ede9808b18e.js +0 -1
  243. package/.next/static/chunks/app/api/security/route-f77e9ede9808b18e.js +0 -1
  244. package/.next/static/chunks/app/api/sessions/[id]/export/route-f77e9ede9808b18e.js +0 -1
  245. package/.next/static/chunks/app/api/sessions/[id]/route-f77e9ede9808b18e.js +0 -1
  246. package/.next/static/chunks/app/api/sessions/import/route-f77e9ede9808b18e.js +0 -1
  247. package/.next/static/chunks/app/api/sessions/route-f77e9ede9808b18e.js +0 -1
  248. package/.next/static/chunks/app/api/skills/route-f77e9ede9808b18e.js +0 -1
  249. package/.next/static/chunks/app/api/update/route-f77e9ede9808b18e.js +0 -1
  250. package/.next/static/chunks/app/api/version/route-f77e9ede9808b18e.js +0 -1
  251. package/.next/static/chunks/app/api/web-auth/route-f77e9ede9808b18e.js +0 -1
  252. package/.next/static/chunks/app/api/workspaces/route-f77e9ede9808b18e.js +0 -1
  253. package/.next/static/chunks/app/page-9a5440047c5a415c.js +0 -1
  254. package/.next/static/chunks/next/dist/client/components/builtin/app-error-f77e9ede9808b18e.js +0 -1
  255. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-f77e9ede9808b18e.js +0 -1
  256. package/.next/static/chunks/next/dist/client/components/builtin/not-found-f77e9ede9808b18e.js +0 -1
  257. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-f77e9ede9808b18e.js +0 -1
  258. package/.next/static/chunks/webpack-d28e132e1b8c100c.js +0 -1
  259. package/.next/static/css/b2d35abc828d4713.css +0 -1
  260. package/assets/showcase.png +0 -0
  261. package/bin/pi.js +0 -50
  262. /package/.next/static/{LOFl9bqqMV2goBV8erESO → 0t1jBUAuVaTFTXxRyIo3q}/_ssgManifest.js +0 -0
@@ -0,0 +1,353 @@
1
+ // File: /home/runner/work/PiWeb/PiWeb/src/app/api/tests/route.ts
2
+ import * as entry from '../../../../../src/app/api/tests/route.js'
3
+ import type { NextRequest } from 'next/server.js'
4
+
5
+ import type { InstantConfigForTypeCheckInternal, Prefetch } from 'next/dist/build/segment-config/app/app-segment-config.js'
6
+
7
+ type TEntry = typeof import('../../../../../src/app/api/tests/route.js')
8
+
9
+ type SegmentParams<T extends Object = any> = T extends Record<string, any>
10
+ ? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
11
+ : T
12
+
13
+ // Check that the entry is a valid entry
14
+ checkFields<Diff<{
15
+ GET?: Function
16
+ HEAD?: Function
17
+ OPTIONS?: Function
18
+ POST?: Function
19
+ PUT?: Function
20
+ DELETE?: Function
21
+ PATCH?: Function
22
+ config?: {}
23
+ generateStaticParams?: Function
24
+ instant?: InstantConfigForTypeCheckInternal
25
+ prefetch?: Prefetch
26
+ unstable_dynamicStaleTime?: number
27
+ revalidate?: RevalidateRange<TEntry> | false
28
+ dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
29
+ dynamicParams?: boolean
30
+ fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
31
+ /** @deprecated The `preferredRegion` config is deprecated. Remove this export. */
32
+ preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
33
+ runtime?: 'nodejs' | 'experimental-edge' | 'edge'
34
+ maxDuration?: number
35
+
36
+ }, TEntry, ''>>()
37
+
38
+ type RouteContext = { params: Promise<SegmentParams> }
39
+ // Check the prop type of the entry function
40
+ if ('GET' in entry) {
41
+ checkFields<
42
+ Diff<
43
+ ParamCheck<Request | NextRequest>,
44
+ {
45
+ __tag__: 'GET'
46
+ __param_position__: 'first'
47
+ __param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
48
+ },
49
+ 'GET'
50
+ >
51
+ >()
52
+ checkFields<
53
+ Diff<
54
+ ParamCheck<RouteContext>,
55
+ {
56
+ __tag__: 'GET'
57
+ __param_position__: 'second'
58
+ __param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
59
+ },
60
+ 'GET'
61
+ >
62
+ >()
63
+
64
+ checkFields<
65
+ Diff<
66
+ {
67
+ __tag__: 'GET',
68
+ __return_type__: Response | void | never | Promise<Response | void | never>
69
+ },
70
+ {
71
+ __tag__: 'GET',
72
+ __return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
73
+ },
74
+ 'GET'
75
+ >
76
+ >()
77
+ }
78
+ // Check the prop type of the entry function
79
+ if ('HEAD' in entry) {
80
+ checkFields<
81
+ Diff<
82
+ ParamCheck<Request | NextRequest>,
83
+ {
84
+ __tag__: 'HEAD'
85
+ __param_position__: 'first'
86
+ __param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
87
+ },
88
+ 'HEAD'
89
+ >
90
+ >()
91
+ checkFields<
92
+ Diff<
93
+ ParamCheck<RouteContext>,
94
+ {
95
+ __tag__: 'HEAD'
96
+ __param_position__: 'second'
97
+ __param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
98
+ },
99
+ 'HEAD'
100
+ >
101
+ >()
102
+
103
+ checkFields<
104
+ Diff<
105
+ {
106
+ __tag__: 'HEAD',
107
+ __return_type__: Response | void | never | Promise<Response | void | never>
108
+ },
109
+ {
110
+ __tag__: 'HEAD',
111
+ __return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
112
+ },
113
+ 'HEAD'
114
+ >
115
+ >()
116
+ }
117
+ // Check the prop type of the entry function
118
+ if ('OPTIONS' in entry) {
119
+ checkFields<
120
+ Diff<
121
+ ParamCheck<Request | NextRequest>,
122
+ {
123
+ __tag__: 'OPTIONS'
124
+ __param_position__: 'first'
125
+ __param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
126
+ },
127
+ 'OPTIONS'
128
+ >
129
+ >()
130
+ checkFields<
131
+ Diff<
132
+ ParamCheck<RouteContext>,
133
+ {
134
+ __tag__: 'OPTIONS'
135
+ __param_position__: 'second'
136
+ __param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
137
+ },
138
+ 'OPTIONS'
139
+ >
140
+ >()
141
+
142
+ checkFields<
143
+ Diff<
144
+ {
145
+ __tag__: 'OPTIONS',
146
+ __return_type__: Response | void | never | Promise<Response | void | never>
147
+ },
148
+ {
149
+ __tag__: 'OPTIONS',
150
+ __return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
151
+ },
152
+ 'OPTIONS'
153
+ >
154
+ >()
155
+ }
156
+ // Check the prop type of the entry function
157
+ if ('POST' in entry) {
158
+ checkFields<
159
+ Diff<
160
+ ParamCheck<Request | NextRequest>,
161
+ {
162
+ __tag__: 'POST'
163
+ __param_position__: 'first'
164
+ __param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
165
+ },
166
+ 'POST'
167
+ >
168
+ >()
169
+ checkFields<
170
+ Diff<
171
+ ParamCheck<RouteContext>,
172
+ {
173
+ __tag__: 'POST'
174
+ __param_position__: 'second'
175
+ __param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
176
+ },
177
+ 'POST'
178
+ >
179
+ >()
180
+
181
+ checkFields<
182
+ Diff<
183
+ {
184
+ __tag__: 'POST',
185
+ __return_type__: Response | void | never | Promise<Response | void | never>
186
+ },
187
+ {
188
+ __tag__: 'POST',
189
+ __return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
190
+ },
191
+ 'POST'
192
+ >
193
+ >()
194
+ }
195
+ // Check the prop type of the entry function
196
+ if ('PUT' in entry) {
197
+ checkFields<
198
+ Diff<
199
+ ParamCheck<Request | NextRequest>,
200
+ {
201
+ __tag__: 'PUT'
202
+ __param_position__: 'first'
203
+ __param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
204
+ },
205
+ 'PUT'
206
+ >
207
+ >()
208
+ checkFields<
209
+ Diff<
210
+ ParamCheck<RouteContext>,
211
+ {
212
+ __tag__: 'PUT'
213
+ __param_position__: 'second'
214
+ __param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
215
+ },
216
+ 'PUT'
217
+ >
218
+ >()
219
+
220
+ checkFields<
221
+ Diff<
222
+ {
223
+ __tag__: 'PUT',
224
+ __return_type__: Response | void | never | Promise<Response | void | never>
225
+ },
226
+ {
227
+ __tag__: 'PUT',
228
+ __return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
229
+ },
230
+ 'PUT'
231
+ >
232
+ >()
233
+ }
234
+ // Check the prop type of the entry function
235
+ if ('DELETE' in entry) {
236
+ checkFields<
237
+ Diff<
238
+ ParamCheck<Request | NextRequest>,
239
+ {
240
+ __tag__: 'DELETE'
241
+ __param_position__: 'first'
242
+ __param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
243
+ },
244
+ 'DELETE'
245
+ >
246
+ >()
247
+ checkFields<
248
+ Diff<
249
+ ParamCheck<RouteContext>,
250
+ {
251
+ __tag__: 'DELETE'
252
+ __param_position__: 'second'
253
+ __param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
254
+ },
255
+ 'DELETE'
256
+ >
257
+ >()
258
+
259
+ checkFields<
260
+ Diff<
261
+ {
262
+ __tag__: 'DELETE',
263
+ __return_type__: Response | void | never | Promise<Response | void | never>
264
+ },
265
+ {
266
+ __tag__: 'DELETE',
267
+ __return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
268
+ },
269
+ 'DELETE'
270
+ >
271
+ >()
272
+ }
273
+ // Check the prop type of the entry function
274
+ if ('PATCH' in entry) {
275
+ checkFields<
276
+ Diff<
277
+ ParamCheck<Request | NextRequest>,
278
+ {
279
+ __tag__: 'PATCH'
280
+ __param_position__: 'first'
281
+ __param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
282
+ },
283
+ 'PATCH'
284
+ >
285
+ >()
286
+ checkFields<
287
+ Diff<
288
+ ParamCheck<RouteContext>,
289
+ {
290
+ __tag__: 'PATCH'
291
+ __param_position__: 'second'
292
+ __param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
293
+ },
294
+ 'PATCH'
295
+ >
296
+ >()
297
+
298
+ checkFields<
299
+ Diff<
300
+ {
301
+ __tag__: 'PATCH',
302
+ __return_type__: Response | void | never | Promise<Response | void | never>
303
+ },
304
+ {
305
+ __tag__: 'PATCH',
306
+ __return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
307
+ },
308
+ 'PATCH'
309
+ >
310
+ >()
311
+ }
312
+
313
+ // Check the arguments and return type of the generateStaticParams function
314
+ if ('generateStaticParams' in entry) {
315
+ checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
316
+ checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
317
+ }
318
+
319
+ export interface PageProps {
320
+ params?: Promise<SegmentParams>
321
+ searchParams?: Promise<any>
322
+ }
323
+ export interface LayoutProps {
324
+ children?: React.ReactNode
325
+
326
+ params?: Promise<SegmentParams>
327
+ }
328
+
329
+ // =============
330
+ // Utility types
331
+ type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
332
+
333
+ // If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
334
+ type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
335
+ type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
336
+
337
+ type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
338
+ type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
339
+ type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
340
+
341
+ type ParamCheck<T> = {
342
+ __tag__: string
343
+ __param_position__: string
344
+ __param_type__: T
345
+ }
346
+
347
+ function checkFields<_ extends { [k in keyof any]: never }>() {}
348
+
349
+ // https://github.com/sindresorhus/type-fest
350
+ type Numeric = number | bigint
351
+ type Zero = 0 | 0n
352
+ type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
353
+ type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
@@ -2,7 +2,7 @@
2
2
  // Do not edit this file manually
3
3
 
4
4
  type AppRoutes = "/" | "/login"
5
- type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/events" | "/api/agent/[id]/tree" | "/api/agent/new" | "/api/config" | "/api/files" | "/api/git" | "/api/growth" | "/api/health" | "/api/models" | "/api/pi-settings" | "/api/plugins" | "/api/prompts" | "/api/security" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/export" | "/api/sessions/import" | "/api/skills" | "/api/update" | "/api/version" | "/api/web-auth" | "/api/workspaces"
5
+ type AppRouteHandlerRoutes = "/api/agent/[id]" | "/api/agent/[id]/events" | "/api/agent/[id]/tree" | "/api/agent/new" | "/api/config" | "/api/files" | "/api/git" | "/api/growth" | "/api/health" | "/api/models" | "/api/pi-settings" | "/api/plugins" | "/api/prompts" | "/api/security" | "/api/sessions" | "/api/sessions/[id]" | "/api/sessions/[id]/export" | "/api/sessions/import" | "/api/skills" | "/api/swarm" | "/api/swarm/[id]" | "/api/tests" | "/api/update" | "/api/version" | "/api/web-auth" | "/api/workspaces"
6
6
  type PageRoutes = never
7
7
  type LayoutRoutes = "/"
8
8
  type RedirectRoutes = never
@@ -31,6 +31,9 @@ interface ParamMap {
31
31
  "/api/sessions/[id]/export": { "id": string; }
32
32
  "/api/sessions/import": {}
33
33
  "/api/skills": {}
34
+ "/api/swarm": {}
35
+ "/api/swarm/[id]": { "id": string; }
36
+ "/api/tests": {}
34
37
  "/api/update": {}
35
38
  "/api/version": {}
36
39
  "/api/web-auth": {}
@@ -236,6 +236,33 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
236
236
  type __Unused = __Check
237
237
  }
238
238
 
239
+ // Validate ../../src/app/api/swarm/[id]/route.ts
240
+ {
241
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/swarm/[id]">> = Specific
242
+ const handler = {} as typeof import("../../src/app/api/swarm/[id]/route.js")
243
+ type __Check = __IsExpected<typeof handler>
244
+ // @ts-ignore
245
+ type __Unused = __Check
246
+ }
247
+
248
+ // Validate ../../src/app/api/swarm/route.ts
249
+ {
250
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/swarm">> = Specific
251
+ const handler = {} as typeof import("../../src/app/api/swarm/route.js")
252
+ type __Check = __IsExpected<typeof handler>
253
+ // @ts-ignore
254
+ type __Unused = __Check
255
+ }
256
+
257
+ // Validate ../../src/app/api/tests/route.ts
258
+ {
259
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/tests">> = Specific
260
+ const handler = {} as typeof import("../../src/app/api/tests/route.js")
261
+ type __Check = __IsExpected<typeof handler>
262
+ // @ts-ignore
263
+ type __Unused = __Check
264
+ }
265
+
239
266
  // Validate ../../src/app/api/update/route.ts
240
267
  {
241
268
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/update">> = Specific
package/README.md CHANGED
@@ -16,33 +16,85 @@
16
16
 
17
17
  **PiWeb** brings a sleek, feature-rich browser interface to the [pi coding agent](https://github.com/earendil-works/pi) with zero modifications to the core Pi engine. Install with one command, and all your existing pi configuration, sessions, models, skills, and plugins work out of the box.
18
18
 
19
+ ## Relationship to pi
20
+
21
+ PiWeb and pi are two separate programs, and PiWeb is not another build of pi: it is a web shell that drives the pi already installed on your machine through the official SDK, leaving pi itself untouched. The two **share one set of state** — the same agent directory (`~/.pi/agent`) holds your settings, models and credentials, sessions, skills and packages — so a conversation started in the pi CLI shows up in the browser right away, and the other way round. Updating is **two separate things**: the pi engine and PiWeb each carry their own version and their own update entry point (the two "Check for updates" rows in Settings), and upgrading one leaves the other alone. What runs underneath is native pi; plugin compatibility in the browser, interactive plugins especially, is not finished yet — for now plugins can be managed rather than fully driven from the page.
22
+
23
+ ## Workflows and Delegation
24
+
25
+ Use the **+** button in the composer's lower-left corner to choose **Agent / Plan / Goal** per session. Agent uses the existing tool preset. Plan uses read-only tools and stops for explicit approval; "Execute plan" temporarily restores the current tool preset for that run, then returns to read-only planning. Goal retains the first prompt as the objective and asks the agent to verify progress on later turns; it does not start unlimited follow-up turns automatically. Workflow state is stored as a custom entry in the native pi session.
26
+
27
+ Plan's tool restriction is not a sandbox for locally installed, trusted pi extensions. Approval is tied to the latest proposed plan and is rejected if the conversation changes after that plan.
28
+
29
+ Click a sent user message to edit and resend it in place, even without changing its text. PiWeb reruns the conversation from that message and keeps the previous branch in the native session history rather than adding a new message at the bottom.
30
+
31
+ With the standard or full tool preset, `piweb_delegate` can run up to three independent research tasks in parallel. Each temporary subagent uses the current model and read-only file tools. It cannot run commands, edit files, or delegate again. Reports return to the parent; these are not independent Worker sessions. The explicit read-only preset does not automatically enable delegation.
32
+
19
33
  ## Features
20
34
 
21
35
  ### Real-Time Streaming Chat
22
36
 
23
- Full SSE snapshots with ordered deltas and automatic replay via `Last-Event-ID`. The thinking process and inline tool execution cards stream live.
37
+ Markdown renders as it streams — headings, lists and code blocks take shape before the answer is finished, not after. Thinking and tool calls appear inline as cards. The layout stays restrained: sessions on the left, outline on the right, both collapsible, leaving the screen to the conversation.
38
+
39
+ <p align="center"><img src="assets/main.png" alt="Main page: streaming chat with tool cards" width="840" /></p>
40
+
41
+ ### Chat Navigation
42
+
43
+ The outline on the right of the transcript: **bold entries are messages you sent**, the rest are headings inside the assistant's answers. Collapsed it reads as a column of bars — longer for your messages, shorter the deeper a heading sits; hover to expand the list. It highlights where you are as you scroll, and a click scrolls smoothly to that spot.
44
+
45
+ <p align="center"><img src="assets/outline.png" alt="Chat navigation: bold entries are your own messages" width="840" /></p>
46
+
47
+ ### Trajectory and Files, In Place
24
48
 
25
- <p align="center"><img src="assets/main.png" alt="Streaming chat with tool cards" width="840" /></p>
49
+ Tool cards carry both entry points: **View in trajectory** drops that step into the trajectory panel — a timeline with input / model / tool lanes, laid out by sequence, wall-clock time or duration, searchable, with per-row tokens and timings and detail tabs for summary, preview, raw and source. **Open in editor** jumps straight to the local file that step touched. A card that changed a file also carries the whole diff inline (additions green, deletions red, with +N −M counts), folded to a preview for long changes and expanded on click.
50
+
51
+ <p align="center"><img src="assets/trace-1.png" alt="工具卡片上的两个入口与内联 diff" width="840" /></p>
52
+ <p align="center"><img src="assets/trace-2.png" alt="轨迹入口按钮" /> <img src="assets/trace-3.png" alt="入口按钮细节" /> <img src="assets/trace-4.png" alt="入口按钮细节" /></p>
26
53
 
27
54
  ### Workspaces & Sessions
28
55
 
29
- Sessions grouped by project folder, with a native folder picker (Windows / macOS / Linux), rename and archive. Session tree branches, draft recovery, and JSONL / HTML export.
56
+ Sessions grouped by project folder, with a native folder picker (Windows / macOS / Linux), rename and archive. Archived conversations live together under "Archived" in the sidebar, ready to reopen or unarchive, and **an archived session is deleted automatically after 30 days of inactivity** — no manual cleanup. Session tree branches, draft recovery, and JSONL / HTML export are there too.
57
+
58
+ <p align="center"><img src="assets/archive.png" alt="Archived: archived conversations in one place" width="400" /></p>
30
59
 
31
60
  ### Import Local Sessions
32
61
 
33
- Bring conversation history from Codex, Claude Code, Grok, ZCode, dsh, and opencode on this machine into pi sessions without loss: text, thinking, tool calls and their results, timestamps, and usage are all kept, and the source data is **read-only** — nothing in the other tools is modified. If the original project directory still exists locally the session lands in that workspace; otherwise it falls back to one you pick. Find it under Settings → Import sessions. The 15 most recent conversations per source are listed, and anything already imported is marked and cannot be imported twice.
62
+ Bring conversation history from Codex, Claude Code, Grok, ZCode, dsh and opencode on this machine into pi sessions without loss: text, thinking, tool calls and their results, timestamps and usage are all kept, and the source data is **read-only** — nothing in the other tools is modified. Each source lists only its 15 most recent **main** conversations; work the main agent handed to a subagent is ignored, because the conversation you want is your own. If the original project directory still exists locally the session lands in that workspace, otherwise it falls back to one you pick — and anything already imported is marked and never imported twice.
63
+
64
+ <p align="center"><img src="assets/import.png" alt="Settings → Import sessions: pick a source, tick, import" width="840" /></p>
34
65
 
35
66
  ### Project Growth Tree
36
67
 
37
- Every step the agent takes on your codebase is snapshotted: navigate the timeline round by round, see added/modified/deleted files, and open line-level diffs for any file at any step — even if the workspace has no git history of its own.
68
+ Every file operation pi makes is snapshotted, grouped one round per message you send. Each round shows what changed **relative to the previous one** — files added, modified and deleted, with line-level diffs one click away — so you can review the work round by round, or drill into single steps inside a round. A round with no file changes says so instead of being skipped, and the record is independent of git: it works on a project with no version history at all.
69
+
70
+ <p align="center"><img src="assets/growth-1.png" alt="Project growth tree (1 of 2)" width="840" /></p>
71
+ <p align="center"><img src="assets/growth-2.png" alt="Project growth tree (2 of 2)" width="840" /></p>
72
+
73
+ ### File Viewer
74
+
75
+ Open project files in the page instead of switching to an editor: a centered window with tabs, and fuzzy search behind the "+". Each file has three views — **Changes** (whole-file diff, additions green and deletions red, with one-click jumps between changes), **Content** (line numbers and syntax highlighting; deleted files show their last content), and **Rendered** (Markdown as a document). Quote a selection into the composer, or open the file in your local editor.
76
+
77
+ <p align="center"><img src="assets/viewer-1.png" alt="File viewer (1 of 2)" width="840" /></p>
78
+ <p align="center"><img src="assets/viewer-2.png" alt="File viewer (2 of 2)" width="840" /></p>
38
79
 
39
80
  ### Context Meter
40
81
 
41
82
  Click the ring next to the composer to see the context window broken down into 13 segments — System Prompt, System/Custom Tools, Memory (AGENTS.md), Skills, messages by type, Compacted Data, Auto-Compact Buffer, and Free Space.
42
83
 
84
+ ### Prompt Sources
85
+
86
+ A header button opens a panel listing every prompt that reaches the model's context: the system prompt and its appended sections, project memory (`AGENTS.md`), each skill's `SKILL.md`, prompt templates, tool definitions, plus the assembled prompt actually sent and the compaction summary — each row labelled with where it came from (project / personal / package / extension). Click a row to read the original in the centre viewer. The list is enumerated live for the current workspace, so prompts that arrive with a plugin or package installed later show up on refresh.
87
+
88
+ <p align="center"><img src="assets/prompts-1.png" alt="Prompt sources (1 of 2)" width="840" /></p>
89
+ <p align="center"><img src="assets/prompts-2.png" alt="Prompt sources (2 of 2)" width="840" /></p>
90
+
43
91
  ### Model & Provider Management
44
92
 
45
- 30+ built-in providers, OAuth logins (Claude, Codex, Copilot, etc.), custom providers written to `models.json`, one-click model discovery, and a placeholder key auto-filled for local gateways like Ollama.
93
+ 40 built-in providers, signed in with an API key or OAuth — Anthropic, GitHub Copilot, OpenAI Codex, xAI, OpenRouter, Kimi and Radius support one-click OAuth. Anything else works just as well: give a custom provider its base URL, protocol and models, and it lands in `models.json`; local gateways such as Ollama get a placeholder key automatically. Pull the model catalog in one click, and quota or balance reads (Claude, Codex, xAI, DeepSeek and 7 more) sit right on the provider card.
94
+
95
+ <p align="center"><img src="assets/providers-1.png" alt="Provider setup (1 of 3)" width="840" /></p>
96
+ <p align="center"><img src="assets/providers-2.png" alt="Provider setup (2 of 3)" width="840" /></p>
97
+ <p align="center"><img src="assets/providers-3.png" alt="Provider setup (3 of 3)" width="840" /></p>
46
98
 
47
99
  ### Plugins & Skills
48
100
 
@@ -63,6 +115,8 @@ piweb
63
115
 
64
116
  The package registers only the `piweb` command, so it never conflicts with the official `pi` CLI. Requires Node.js ≥ 22.19.0 (24 recommended); Git is needed for growth-history features.
65
117
 
118
+ On Windows x64 and ARM64, npm automatically installs PiWeb's matching managed [niubash](https://github.com/unixwin/niubash) portable runtime. PiWeb uses it as the `bash` tool through the official Pi SDK—no separate shell install and no changes to `~/.pi/agent/settings.json`. macOS and Linux continue to use Pi's normal system Bash selection. If the optional Windows runtime is omitted or fails integrity validation, PiWeb logs a warning and falls back to Pi's configured/default Bash.
119
+
66
120
  ### Update
67
121
 
68
122
  ```bash
@@ -104,4 +158,4 @@ Set `PI_WEB_PASSWORD` to enable the login page and HTTP Basic Auth (user `pi`).
104
158
 
105
159
  ## License
106
160
 
107
- [MIT](LICENSE)
161
+ [MIT](LICENSE). The optional Windows runtime packages redistribute niubash, rubash, and WinuxCmd under their upstream licenses; the pinned notices are in [`third-party/managed-niubash`](third-party/managed-niubash).
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/next.config.ts CHANGED
@@ -13,8 +13,12 @@ export default (phase: string): NextConfig => {
13
13
  // Webpack's dev chunk names are stable. A per-process prefix prevents an older
14
14
  // browser cache entry from hydrating HTML emitted by a newer dev server.
15
15
  assetPrefix: development ? `/_piweb-dev/${devAssetId}` : undefined,
16
- // pi SDK 与其动态加载的扩展都运行在服务端(Node runtime),不对客户端打包
17
- serverExternalPackages: ["@earendil-works/pi-coding-agent"],
16
+ // pi SDK、动态扩展与 Windows 平台运行时都留在服务端由 Node 原生加载。
17
+ serverExternalPackages: [
18
+ "@earendil-works/pi-coding-agent",
19
+ "@rexvane/piweb-niubash-win32-x64",
20
+ "@rexvane/piweb-niubash-win32-arm64",
21
+ ],
18
22
  // Image prompts allow 268 MB of base64 plus text and JSON framing.
19
23
  experimental: { proxyClientMaxBodySize: "272mb" },
20
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rexvane/piweb",
3
- "version": "0.3.14",
3
+ "version": "0.3.16",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Modern web UI for the pi coding agent, driven by the official pi SDK without modifying pi",
@@ -28,7 +28,7 @@
28
28
  "src",
29
29
  "scripts",
30
30
  "public",
31
- "assets/showcase.png",
31
+ "assets",
32
32
  "next.config.ts",
33
33
  "tsconfig.json",
34
34
  "postcss.config.mjs",
@@ -39,9 +39,9 @@
39
39
  "build": "node --max-old-space-size=8192 node_modules/next/dist/bin/next build --webpack",
40
40
  "build:release": "node scripts/release.mjs",
41
41
  "postinstall": "node scripts/postinstall.mjs",
42
+ "prepare:niubash": "node scripts/prepare-niubash-packages.mjs",
42
43
  "prepublishOnly": "npm run typecheck && npm run test",
43
44
  "start": "node bin/piweb.js",
44
- "web": "node bin/pi.js web",
45
45
  "typecheck": "tsc --noEmit",
46
46
  "verify:package": "node scripts/verify-package.mjs",
47
47
  "test": "vitest run",
@@ -52,8 +52,8 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@automann/maple-mono-cn": "^7.9.2",
55
- "@earendil-works/pi-ai": "0.85.1",
56
- "@earendil-works/pi-coding-agent": "0.85.1",
55
+ "@earendil-works/pi-ai": "0.87.1",
56
+ "@earendil-works/pi-coding-agent": "0.87.1",
57
57
  "@lobehub/icons-static-svg": "^1.95.0",
58
58
  "@tailwindcss/postcss": "^4.2.2",
59
59
  "@types/node": "^26",
@@ -71,8 +71,13 @@
71
71
  "rehype-highlight": "^7.0.2",
72
72
  "remark-gfm": "^4.0.1",
73
73
  "tailwindcss": "^4.2.2",
74
+ "typebox": "1.3.27",
74
75
  "typescript": "^7"
75
76
  },
77
+ "optionalDependencies": {
78
+ "@rexvane/piweb-niubash-win32-arm64": "1.1.4-piweb.0",
79
+ "@rexvane/piweb-niubash-win32-x64": "1.1.4-piweb.0"
80
+ },
76
81
  "devDependencies": {
77
82
  "@testing-library/dom": "^10.4.2",
78
83
  "@testing-library/react": "^16.3.3",
@@ -169,7 +169,7 @@ export async function runLauncher({ args = process.argv.slice(2), env = process.
169
169
  const options = parseLauncherArgs(args, env);
170
170
  const log = dependencies.log ?? console.log;
171
171
  if (options.help) {
172
- log("Usage: pi web [-p, --port <port>] [-H, --hostname <host>] [--dev] [--no-open]");
172
+ log("Usage: piweb [-p, --port <port>] [-H, --hostname <host>] [--dev] [--no-open]");
173
173
  log("默认绑定 127.0.0.1:30141;端口被占自动 +1。开发模式仅允许本机监听。");
174
174
  log("对外监听必须使用生产构建与 PI_WEB_PASSWORD。构建/恢复发布:npm run build:release。");
175
175
  return 0;