@seqyuan/pidex 0.7.3 → 0.7.5

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 (59) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +3 -3
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +1 -1
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_index.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_client-reference-manifest.js +1 -1
  17. package/.next/server/app/_not-found.html +1 -1
  18. package/.next/server/app/_not-found.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  25. package/.next/server/app/index.html +1 -1
  26. package/.next/server/app/index.rsc +2 -2
  27. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  28. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  29. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  30. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  31. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  32. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  33. package/.next/server/app/login.html +1 -1
  34. package/.next/server/app/login.rsc +1 -1
  35. package/.next/server/app/login.segments/_full.segment.rsc +1 -1
  36. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  37. package/.next/server/app/login.segments/_index.segment.rsc +1 -1
  38. package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  39. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  40. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  41. package/.next/server/app/page.js +3 -3
  42. package/.next/server/app/page_client-reference-manifest.js +1 -1
  43. package/.next/server/app-paths-manifest.json +3 -3
  44. package/.next/server/middleware-build-manifest.js +1 -1
  45. package/.next/server/middleware-manifest.json +5 -5
  46. package/.next/server/pages/404.html +1 -1
  47. package/.next/server/pages/500.html +1 -1
  48. package/.next/server/server-reference-manifest.json +1 -1
  49. package/.next/static/chunks/7355-bdeb1dc2c31c0581.js +1 -0
  50. package/.next/static/chunks/app/page-3a9b6a1dcc4f81e4.js +83 -0
  51. package/.next/static/chunks/{webpack-3fb0701c42a802b4.js → webpack-e831874daaf39dc5.js} +1 -1
  52. package/.next/trace +32 -37
  53. package/.next/trace-build +1 -1
  54. package/bin/pi-web.js +74 -3
  55. package/package.json +1 -2
  56. package/.next/static/chunks/9442-cb11613d8f427dd9.js +0 -1
  57. package/.next/static/chunks/app/page-8bcc9c902d2b01af.js +0 -83
  58. /package/.next/static/{CJNQ5tNbvMQAlR4rC2pe5 → Uyfhd8CTitS0X-x3xci5m}/_buildManifest.js +0 -0
  59. /package/.next/static/{CJNQ5tNbvMQAlR4rC2pe5 → Uyfhd8CTitS0X-x3xci5m}/_ssgManifest.js +0 -0
package/.next/trace-build CHANGED
@@ -1 +1 @@
1
- [{"name":"run-webpack","duration":20521802,"timestamp":134535267,"id":14,"parentId":1,"tags":{},"startTime":1780039202321,"traceId":"ea014ccff11c7912"},{"name":"run-typescript","duration":7438589,"timestamp":155088819,"id":3745,"parentId":1,"tags":{},"startTime":1780039222874,"traceId":"ea014ccff11c7912"},{"name":"static-check","duration":1826183,"timestamp":162544862,"id":3748,"parentId":1,"tags":{},"startTime":1780039230330,"traceId":"ea014ccff11c7912"},{"name":"static-generation","duration":3939483,"timestamp":164627994,"id":3814,"parentId":1,"tags":{},"startTime":1780039232416,"traceId":"ea014ccff11c7912"},{"name":"collect-build-traces","duration":39077710,"timestamp":164374062,"id":3811,"parentId":1,"tags":{},"startTime":1780039232159,"traceId":"ea014ccff11c7912"},{"name":"telemetry-flush","duration":60,"timestamp":203454460,"id":3823,"parentId":1,"tags":{},"startTime":1780039271240,"traceId":"ea014ccff11c7912"},{"name":"next-build","duration":69044964,"timestamp":134409569,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1780039202195,"traceId":"ea014ccff11c7912"}]
1
+ [{"name":"run-webpack","duration":19137813,"timestamp":71684424,"id":14,"parentId":1,"tags":{},"startTime":1780039888539,"traceId":"105be6f630b2de37"},{"name":"run-typescript","duration":6602334,"timestamp":90827235,"id":3255,"parentId":1,"tags":{},"startTime":1780039907682,"traceId":"105be6f630b2de37"},{"name":"static-check","duration":1812933,"timestamp":97445785,"id":3258,"parentId":1,"tags":{},"startTime":1780039914300,"traceId":"105be6f630b2de37"},{"name":"static-generation","duration":3308689,"timestamp":99887708,"id":3324,"parentId":1,"tags":{},"startTime":1780039916742,"traceId":"105be6f630b2de37"},{"name":"collect-build-traces","duration":40465033,"timestamp":99262208,"id":3321,"parentId":1,"tags":{},"startTime":1780039916117,"traceId":"105be6f630b2de37"},{"name":"telemetry-flush","duration":56,"timestamp":139729809,"id":3333,"parentId":1,"tags":{},"startTime":1780039956584,"traceId":"105be6f630b2de37"},{"name":"next-build","duration":68199276,"timestamp":71530600,"id":1,"tags":{"buildMode":"default","version":"16.2.1","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1780039888385,"traceId":"105be6f630b2de37"}]
package/bin/pi-web.js CHANGED
@@ -16,6 +16,9 @@ const { parseArgs } = require("util");
16
16
 
17
17
  const pkgDir = path.join(__dirname, "..");
18
18
  const nextDir = path.join(pkgDir, ".next");
19
+ const pkg = JSON.parse(fs.readFileSync(path.join(pkgDir, "package.json"), "utf8"));
20
+ const VERSION = pkg.version;
21
+ const PKG_NAME = pkg.name;
19
22
 
20
23
  // Resolve next's CLI entry
21
24
  let nextBin;
@@ -30,14 +33,81 @@ try {
30
33
  }
31
34
  }
32
35
 
33
- const { values: cliArgs } = parseArgs({
36
+ const { values: cliArgs, positionals } = parseArgs({
34
37
  options: {
35
38
  port: { type: "string", short: "p" },
36
39
  hostname: { type: "string", short: "H" },
40
+ version: { type: "boolean", short: "v" },
41
+ help: { type: "boolean", short: "h" },
37
42
  },
38
43
  strict: false,
44
+ allowPositionals: true,
39
45
  });
40
46
 
47
+ // ── CLI commands ──
48
+
49
+ if (cliArgs.version) {
50
+ console.log(VERSION);
51
+ process.exit(0);
52
+ }
53
+
54
+ if (cliArgs.help) {
55
+ console.log(`pidex v${VERSION} — Web UI for the pi coding agent
56
+
57
+ Usage:
58
+ pidex [options]
59
+ pidex update Update to the latest version
60
+
61
+ Options:
62
+ -p, --port <port> Port to listen on (default: 30141, env: PORT)
63
+ -H, --hostname <host> Hostname to bind to (default: localhost)
64
+ -v, --version Print version
65
+ -h, --help Show this help
66
+
67
+ Environment:
68
+ PORT Server port
69
+ PIDEX_PASSWORD Set password on first start
70
+ PI_CODING_AGENT_DIR Custom pi agent data directory
71
+ `);
72
+ process.exit(0);
73
+ }
74
+
75
+ const firstPos = positionals[0];
76
+ if (firstPos === "update") {
77
+ console.log(`\n Updating ${PKG_NAME} to latest version...\n`);
78
+ const child = spawn(process.execPath, [
79
+ require.resolve("npm/bin/npm-cli.js", { paths: [pkgDir] }) ||
80
+ path.join(path.dirname(process.execPath), "npm"),
81
+ "install", "-g", `${PKG_NAME}@latest`,
82
+ ], { stdio: "inherit" });
83
+ child.on("exit", (code) => process.exit(code ?? 0));
84
+ return;
85
+ }
86
+
87
+ // ── Version check (async, non-blocking) ──
88
+
89
+ function checkVersion() {
90
+ const https = require("https");
91
+ const req = https.get(`https://registry.npmjs.org/${encodeURIComponent(PKG_NAME)}/latest`, { timeout: 5000 }, (res) => {
92
+ let data = "";
93
+ res.on("data", (chunk) => data += chunk);
94
+ res.on("end", () => {
95
+ try {
96
+ const json = JSON.parse(data);
97
+ const latest = json.version;
98
+ if (latest && latest !== VERSION) {
99
+ console.log(`\n ⚡ Update available: ${VERSION} → ${latest}`);
100
+ console.log(` Run: pidex update\n`);
101
+ }
102
+ } catch { /* ignore */ }
103
+ });
104
+ });
105
+ req.on("error", () => {});
106
+ req.on("timeout", () => req.destroy());
107
+ }
108
+
109
+ // ── Normal startup ──
110
+
41
111
  const port = cliArgs.port ?? process.env.PORT ?? "30141";
42
112
  const hostname = cliArgs.hostname ?? process.env.HOSTNAME ?? null;
43
113
 
@@ -92,7 +162,7 @@ async function maybeSetupAuth() {
92
162
  await promptPassword();
93
163
  }
94
164
 
95
- // ── Seed default soul.md ──
165
+ // ── Seed defaults ──
96
166
  const defaultSoulSrc = path.join(pkgDir, "lib", "default-soul.md");
97
167
  const soulDest = path.join(os.homedir(), ".pi", "agent", "soul.md");
98
168
  if (!fs.existsSync(soulDest) && fs.existsSync(defaultSoulSrc)) {
@@ -102,7 +172,6 @@ if (!fs.existsSync(soulDest) && fs.existsSync(defaultSoulSrc)) {
102
172
  console.log(" 🖖 Default soul.md seeded to ~/.pi/agent/soul.md");
103
173
  }
104
174
 
105
- // ── Seed default harness.md ──
106
175
  const defaultHarnessSrc = path.join(pkgDir, "lib", "visualization-harness.md");
107
176
  const harnessDest = path.join(os.homedir(), ".pi", "agent", "harness.md");
108
177
  if (!fs.existsSync(harnessDest) && fs.existsSync(defaultHarnessSrc)) {
@@ -119,6 +188,8 @@ if (!fs.existsSync(nextDir)) {
119
188
  process.exit(1);
120
189
  }
121
190
 
191
+ checkVersion();
192
+
122
193
  const nextArgs = ["start", "-p", port];
123
194
  if (hostname) nextArgs.push("-H", hostname);
124
195
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seqyuan/pidex",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "Web UI for the pi coding agent",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -45,7 +45,6 @@
45
45
  "@codemirror/view": "^6.43.0",
46
46
  "@earendil-works/pi-ai": "^0.75.5",
47
47
  "@earendil-works/pi-coding-agent": "^0.75.5",
48
- "@lobehub/icons": "^5.6.0",
49
48
  "@types/react-syntax-highlighter": "^15.5.13",
50
49
  "bcryptjs": "^3.0.3",
51
50
  "codemirror": "^6.0.2",