pi-yun 0.1.2 → 0.1.4
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.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +11 -11
- package/.next/build-manifest.json +2 -2
- package/.next/required-server-files.js +2 -1
- package/.next/required-server-files.json +2 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/app-update/route.js +1 -1
- package/.next/server/app/api/cwd/browse/route.js.nft.json +2 -2
- package/.next/server/app/api/cwd/validate/route.js.nft.json +2 -2
- package/.next/server/app/api/models/default/route.js.nft.json +2 -2
- package/.next/server/app/api/models/enabled/route.js.nft.json +2 -2
- package/.next/server/app/api/terminal/[id]/events/route.js +2 -2
- package/.next/server/app/api/terminal/[id]/route.js +1 -1
- package/.next/server/app/api/terminal/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +11 -11
- package/.next/server/chunks/2243.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/app/{layout-3dc3a778fc61244e.js → layout-cc62c2969905e754.js} +1 -1
- package/.next/trace +8 -8
- package/.next/trace-build +1 -1
- package/README.md +9 -9
- package/bin/pi-web-update.js +16 -10
- package/next.config.ts +2 -1
- package/package.json +1 -2
- package/bin/prepare-terminal.js +0 -14
- /package/.next/static/{4JhGgJa7UiD-aIZf7gQtM → KEEELqca_YKVETbSzuCc-}/_buildManifest.js +0 -0
- /package/.next/static/{4JhGgJa7UiD-aIZf7gQtM → KEEELqca_YKVETbSzuCc-}/_ssgManifest.js +0 -0
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-webpack","duration":
|
|
1
|
+
[{"name":"run-webpack","duration":252477190,"timestamp":283416410681,"id":14,"parentId":1,"tags":{},"startTime":1792655412409,"traceId":"2cf1a54c41b30c1d"},{"name":"run-typescript","duration":24746416,"timestamp":283669032033,"id":789,"parentId":1,"tags":{},"startTime":1792655665030,"traceId":"2cf1a54c41b30c1d"},{"name":"static-check","duration":30053318,"timestamp":283693935581,"id":792,"parentId":1,"tags":{},"startTime":1792655689934,"traceId":"2cf1a54c41b30c1d"},{"name":"static-generation","duration":6557672,"timestamp":283724210317,"id":944,"parentId":1,"tags":{},"startTime":1792655720208,"traceId":"2cf1a54c41b30c1d"},{"name":"collect-build-traces","duration":37089407,"timestamp":283724007381,"id":941,"parentId":1,"tags":{},"startTime":1792655720005,"traceId":"2cf1a54c41b30c1d"},{"name":"telemetry-flush","duration":70,"timestamp":283761111004,"id":953,"parentId":1,"tags":{},"startTime":1792655757109,"traceId":"2cf1a54c41b30c1d"},{"name":"next-build","duration":347092440,"timestamp":283414018641,"id":1,"tags":{"buildMode":"default","version":"16.3.8","bundler":"webpack","has-custom-webpack-config":"true","use-build-worker":"false"},"startTime":1792655410017,"traceId":"2cf1a54c41b30c1d"}]
|
package/README.md
CHANGED
|
@@ -29,24 +29,24 @@ The CLI opens a browser after the server is ready. If it does not, open [http://
|
|
|
29
29
|
|
|
30
30
|
If no model provider is configured yet, open the **Models** panel to sign in or add an API key.
|
|
31
31
|
|
|
32
|
-
To install the `pi-
|
|
32
|
+
To install the `pi-yun` command globally:
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
npm install -g pi-
|
|
36
|
-
pi-
|
|
35
|
+
npm install -g pi-yun@latest
|
|
36
|
+
pi-yun
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
Commands:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
pi-
|
|
43
|
-
pi-
|
|
44
|
-
pi-
|
|
45
|
-
pi-
|
|
46
|
-
pi-
|
|
42
|
+
pi-yun version # print the installed version
|
|
43
|
+
pi-yun status # list running servers
|
|
44
|
+
pi-yun stop [--port N] # stop a running server
|
|
45
|
+
pi-yun open [--port N] # open a running server in the browser
|
|
46
|
+
pi-yun update [--check] # update a global npm install
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
To update, run `pi-
|
|
49
|
+
To update, run `pi-yun stop`, then `pi-yun update` (or run the same install command again). To uninstall, run `npm uninstall -g pi-yun`.
|
|
50
50
|
|
|
51
51
|
## Configuration
|
|
52
52
|
|
package/bin/pi-web-update.js
CHANGED
|
@@ -7,9 +7,15 @@ const fs = require("fs");
|
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
8
8
|
const path = require("path");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// This fork publishes under its own package name, so the update check and the
|
|
11
|
+
// install command both follow package.json: a rename stays a one-line change.
|
|
12
|
+
const PACKAGE_NAME =
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
14
|
+
require("../package.json").name;
|
|
15
|
+
const PACKAGE_BASENAME = PACKAGE_NAME.split("/").pop();
|
|
16
|
+
const NPM_LATEST_URL = `https://registry.npmjs.org/${PACKAGE_NAME.replace("/", "%2F")}/latest`;
|
|
11
17
|
const FETCH_TIMEOUT_MS = 10_000;
|
|
12
|
-
const MANUAL_COMMAND =
|
|
18
|
+
const MANUAL_COMMAND = `npm install -g ${PACKAGE_NAME}@latest`;
|
|
13
19
|
|
|
14
20
|
// Port of lib/app-update.ts (bin cannot import TypeScript).
|
|
15
21
|
function parseStableVersion(version) {
|
|
@@ -64,13 +70,13 @@ function realpathOrSelf(target, realpath = fs.realpathSync) {
|
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
72
|
|
|
67
|
-
// "global": pkgDir is <npm root -g
|
|
73
|
+
// "global": pkgDir is <npm root -g>/<package name>; "npx": an npx cache; else "other".
|
|
68
74
|
function getInstallKind({ pkgDir, npmRoot, realpath = fs.realpathSync }) {
|
|
69
75
|
const realPkgDir = realpathOrSelf(pkgDir, realpath);
|
|
70
76
|
if (realPkgDir.split(/[\\/]/).includes("_npx")) return "npx";
|
|
71
77
|
if (!npmRoot) return "other";
|
|
72
78
|
const inGlobalRoot =
|
|
73
|
-
path.basename(realPkgDir) ===
|
|
79
|
+
path.basename(realPkgDir) === PACKAGE_BASENAME &&
|
|
74
80
|
realpathOrSelf(path.dirname(realPkgDir), realpath) === realpathOrSelf(npmRoot, realpath);
|
|
75
81
|
return inGlobalRoot ? "global" : "other";
|
|
76
82
|
}
|
|
@@ -86,7 +92,7 @@ function getGlobalNpmRoot() {
|
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
function runNpmInstall(version) {
|
|
89
|
-
const invocation = findNpmInvocation(["install", "-g",
|
|
95
|
+
const invocation = findNpmInvocation(["install", "-g", `${PACKAGE_NAME}@${version}`]);
|
|
90
96
|
if (!invocation) return null;
|
|
91
97
|
const result = spawnSync(invocation.command, invocation.args, { stdio: "inherit" });
|
|
92
98
|
return result.status ?? 1;
|
|
@@ -113,26 +119,26 @@ async function runUpdate({
|
|
|
113
119
|
return 1;
|
|
114
120
|
}
|
|
115
121
|
if (!isNewerStableVersion(latest, currentVersion)) {
|
|
116
|
-
log(
|
|
122
|
+
log(`${PACKAGE_NAME} ${currentVersion} is up to date.`);
|
|
117
123
|
return 0;
|
|
118
124
|
}
|
|
119
|
-
log(
|
|
125
|
+
log(`${PACKAGE_NAME} ${latest} is available (installed: ${currentVersion}).`);
|
|
120
126
|
if (check) return 0;
|
|
121
127
|
|
|
122
128
|
// A running `next start` has .next/ open; never replace it underneath.
|
|
123
129
|
const running = await listRecords();
|
|
124
130
|
if (running.length > 0) {
|
|
125
|
-
error(
|
|
131
|
+
error(`${PACKAGE_NAME} is running:\n${running.map(formatRecord).join("\n")}\nRun \`${PACKAGE_BASENAME} stop\` first, then update.`);
|
|
126
132
|
return 1;
|
|
127
133
|
}
|
|
128
134
|
|
|
129
135
|
const kind = getInstallKind({ pkgDir, npmRoot: getNpmRoot(), realpath });
|
|
130
136
|
if (kind === "npx") {
|
|
131
|
-
error(
|
|
137
|
+
error(`This ${PACKAGE_BASENAME} runs from the npx cache. Run \`npx ${PACKAGE_NAME}@latest\` instead.`);
|
|
132
138
|
return 1;
|
|
133
139
|
}
|
|
134
140
|
if (kind !== "global") {
|
|
135
|
-
error(`This
|
|
141
|
+
error(`This ${PACKAGE_BASENAME} is not a global npm install. Update it yourself, for example: ${MANUAL_COMMAND}`);
|
|
136
142
|
return 1;
|
|
137
143
|
}
|
|
138
144
|
|
package/next.config.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { dirname, join } from "path";
|
|
|
4
4
|
import { fileURLToPath } from "url";
|
|
5
5
|
|
|
6
6
|
const configDir = dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
const { version } = JSON.parse(readFileSync(join(configDir, "package.json"), "utf8")) as { version: string };
|
|
7
|
+
const { version, name } = JSON.parse(readFileSync(join(configDir, "package.json"), "utf8")) as { version: string; name: string };
|
|
8
8
|
let piVersion = "unknown";
|
|
9
9
|
try {
|
|
10
10
|
const piPkgPath = join(configDir, "node_modules/@earendil-works/pi-coding-agent/package.json");
|
|
@@ -104,6 +104,7 @@ const nextConfig: NextConfig = {
|
|
|
104
104
|
},
|
|
105
105
|
env: {
|
|
106
106
|
NEXT_PUBLIC_APP_VERSION: version,
|
|
107
|
+
NEXT_PUBLIC_APP_NAME: name,
|
|
107
108
|
NEXT_PUBLIC_PI_VERSION: piVersion,
|
|
108
109
|
},
|
|
109
110
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-yun",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Web UI for the pi coding agent (fork of @agegr/pi-web)",
|
|
5
5
|
"homepage": "https://github.com/Jason-24/pi-web-yun#readme",
|
|
6
6
|
"repository": {
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"package.json"
|
|
36
36
|
],
|
|
37
37
|
"scripts": {
|
|
38
|
-
"postinstall": "node bin/prepare-terminal.js",
|
|
39
38
|
"dev": "next dev -H 127.0.0.1 -p 30141",
|
|
40
39
|
"dev:lan": "next dev -H 0.0.0.0 -p 30141",
|
|
41
40
|
"build": "next build --webpack",
|
package/bin/prepare-terminal.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// node-pty 1.1.0 ships macOS spawn-helper binaries without executable bits.
|
|
2
|
-
// Remove this workaround once the upstream package preserves those modes.
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
4
|
-
const { chmodSync, statSync } = require("node:fs");
|
|
5
|
-
const { dirname, join } = require("node:path");
|
|
6
|
-
|
|
7
|
-
if (process.platform === "darwin") {
|
|
8
|
-
const root = dirname(require.resolve("node-pty/package.json"));
|
|
9
|
-
for (const directory of ["build/Release", "build/Debug", `prebuilds/darwin-${process.arch}`]) {
|
|
10
|
-
const helper = join(root, directory, "spawn-helper");
|
|
11
|
-
const stat = statSync(helper, { throwIfNoEntry: false });
|
|
12
|
-
if (stat?.isFile() && (stat.mode & 0o111) !== 0o111) chmodSync(helper, stat.mode | 0o111);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
File without changes
|
|
File without changes
|