@chainingintention/pi-web-cn 1.202606.3 → 1.202606.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/LICENSE +21 -21
- package/README.md +364 -364
- package/dist/cli.js +32 -32
- package/dist/client/assets/{CodeViewer-B4nxYc0g.js → CodeViewer-BNKhIElN.js} +1 -1
- package/dist/client/assets/{TerminalPanel-htr2dU1I.js → TerminalPanel-VPiiPQfC.js} +1 -1
- package/dist/client/assets/{index-BjUH4a8R.js → index-Csx3hC75.js} +135 -135
- package/dist/client/favicon.svg +11 -11
- package/dist/client/index.html +17 -17
- package/dist/client/manifest.webmanifest +24 -24
- package/dist/pi-web-plugins/info/package.json +9 -9
- package/dist/pi-web-plugins/info/pi-web-plugin.js +14 -14
- package/dist/pi-web-plugins/updates/package.json +9 -9
- package/dist/pi-web-plugins/updates/pi-web-plugin.js +75 -75
- package/dist/pi-web-plugins/workspace-tasks/config.js +1 -1
- package/dist/pi-web-plugins/workspace-tasks/package.json +9 -9
- package/dist/pi-web-plugins/workspace-tasks/pi-web-plugin.js +10 -10
- package/dist/pi-web-plugins/workspace-tasks/taskRunner.js +1 -1
- package/dist/pi-web-plugins/workspace-tasks/tasksPanelElement.js +58 -58
- package/dist/pi-web-plugins/workspace-tasks/workspaceTasksClient.js +1 -1
- package/docs/assets/favicon.svg +11 -11
- package/docs/plugins.md +762 -762
- package/extensions/pi-web.ts +133 -133
- package/install.sh +5 -5
- package/package.json +127 -127
- package/plugin-api/unstable.d.ts +1 -1
- package/plugin-api.d.ts +1 -1
package/extensions/pi-web.ts
CHANGED
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
import { spawn } from "node:child_process";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { homedir } from "node:os";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
7
|
-
|
|
8
|
-
const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
9
|
-
const cliPath = join(packageRoot, "dist", "cli.js");
|
|
10
|
-
const serviceNames = ["pi-web-sessiond.service", "pi-web.service", "pi-web-ui-dev.service"];
|
|
11
|
-
const macLogPaths = ["sessiond.log", "web.log", "ui-dev.log"].map((name) => join(homedir(), ".pi-web", "logs", name));
|
|
12
|
-
|
|
13
|
-
const subcommands = [
|
|
14
|
-
"install",
|
|
15
|
-
"status",
|
|
16
|
-
"logs",
|
|
17
|
-
"restart",
|
|
18
|
-
"start",
|
|
19
|
-
"stop",
|
|
20
|
-
"doctor",
|
|
21
|
-
"version",
|
|
22
|
-
"uninstall",
|
|
23
|
-
"open",
|
|
24
|
-
"help",
|
|
25
|
-
] as const;
|
|
26
|
-
|
|
27
|
-
type Subcommand = (typeof subcommands)[number];
|
|
28
|
-
|
|
29
|
-
function parseArgs(args: string): string[] {
|
|
30
|
-
return args.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g)?.map((part) => {
|
|
31
|
-
if ((part.startsWith('"') && part.endsWith('"')) || (part.startsWith("'") && part.endsWith("'"))) {
|
|
32
|
-
return part.slice(1, -1);
|
|
33
|
-
}
|
|
34
|
-
return part;
|
|
35
|
-
}) ?? [];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function truncateOutput(output: string): string {
|
|
39
|
-
const trimmed = output.trim();
|
|
40
|
-
if (trimmed.length <= 3_500) return trimmed;
|
|
41
|
-
return `${trimmed.slice(0, 3_500)}\n… output truncated`;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function run(command: string, args: string[], env: NodeJS.ProcessEnv = {}): Promise<{ code: number; output: string }> {
|
|
45
|
-
return new Promise((resolve) => {
|
|
46
|
-
const child = spawn(command, args, {
|
|
47
|
-
env: { ...process.env, ...env },
|
|
48
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
let output = "";
|
|
52
|
-
child.stdout.setEncoding("utf8");
|
|
53
|
-
child.stderr.setEncoding("utf8");
|
|
54
|
-
child.stdout.on("data", (chunk: string) => { output += chunk; });
|
|
55
|
-
child.stderr.on("data", (chunk: string) => { output += chunk; });
|
|
56
|
-
child.on("error", (error) => {
|
|
57
|
-
resolve({ code: 1, output: error.message });
|
|
58
|
-
});
|
|
59
|
-
child.on("close", (code) => {
|
|
60
|
-
resolve({ code: code ?? 1, output });
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
async function runPiWeb(args: string[], env: NodeJS.ProcessEnv = {}): Promise<{ code: number; output: string }> {
|
|
66
|
-
if (existsSync(cliPath)) {
|
|
67
|
-
return run(process.execPath, [cliPath, ...args], env);
|
|
68
|
-
}
|
|
69
|
-
return run("pi-web", args, env);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function showResult(ctx: { ui: { notify(message: string, type?: "info" | "warning" | "error" | "success"): void } }, title: string, result: { code: number; output: string }): void {
|
|
73
|
-
const body = truncateOutput(result.output) || (result.code === 0 ? "Done." : `Command failed with exit code ${String(result.code)}.`);
|
|
74
|
-
ctx.ui.notify(`${title}\n\n${body}`, result.code === 0 ? "info" : "error");
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function isSubcommand(value: string): value is Subcommand {
|
|
78
|
-
return subcommands.some((command) => command === value);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async function boundedLogs(): Promise<{ code: number; output: string }> {
|
|
82
|
-
if (process.platform === "darwin") {
|
|
83
|
-
const existingLogs = macLogPaths.filter((path) => existsSync(path));
|
|
84
|
-
if (existingLogs.length === 0) return { code: 1, output: "No PI WEB log files found in ~/.pi-web/logs." };
|
|
85
|
-
return run("tail", ["-n", "100", ...existingLogs]);
|
|
86
|
-
}
|
|
87
|
-
return run("journalctl", ["--user", ...serviceNames.flatMap((serviceName) => ["-u", serviceName]), "-n", "100", "--no-pager"]);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export default function piWebExtension(pi: ExtensionAPI): void {
|
|
91
|
-
pi.registerCommand("pi-web", {
|
|
92
|
-
description: "Manage PI WEB services: install, status, logs, restart, start, stop, doctor, version, open",
|
|
93
|
-
getArgumentCompletions(prefix: string): { value: string; label: string }[] | null {
|
|
94
|
-
const [first = ""] = parseArgs(prefix);
|
|
95
|
-
const items = subcommands
|
|
96
|
-
.filter((command) => command.startsWith(first))
|
|
97
|
-
.map((command) => ({ value: command, label: command }));
|
|
98
|
-
return items.length > 0 ? items : null;
|
|
99
|
-
},
|
|
100
|
-
async handler(args, ctx) {
|
|
101
|
-
const parsedArgs = parseArgs(args);
|
|
102
|
-
const subcommand = parsedArgs[0] ?? "help";
|
|
103
|
-
const rest = parsedArgs.slice(1);
|
|
104
|
-
|
|
105
|
-
if (subcommand === "help") {
|
|
106
|
-
ctx.ui.notify(`PI WEB commands:\n\n${subcommands.map((command) => `/pi-web ${command}`).join("\n")}\n\nLogs are bounded to the last 100 service log lines in the Pi command. Use \`pi-web logs\` in a shell to follow logs.`, "info");
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
if (subcommand === "open") {
|
|
111
|
-
ctx.ui.notify("PI WEB default URL: http://127.0.0.1:8504", "info");
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (!isSubcommand(subcommand)) {
|
|
116
|
-
ctx.ui.notify(`Unknown pi-web command: ${subcommand}. Try /pi-web help.`, "error");
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
if (subcommand === "stop" || subcommand === "uninstall") {
|
|
121
|
-
const ok = await ctx.ui.confirm(`pi-web ${subcommand}`, `Run pi-web ${subcommand}?`);
|
|
122
|
-
if (!ok) return;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (subcommand === "logs") {
|
|
126
|
-
showResult(ctx, "pi-web logs", await boundedLogs());
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
showResult(ctx, `pi-web ${subcommand}`, await runPiWeb([subcommand, ...rest]));
|
|
131
|
-
},
|
|
132
|
-
});
|
|
133
|
-
}
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
7
|
+
|
|
8
|
+
const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
9
|
+
const cliPath = join(packageRoot, "dist", "cli.js");
|
|
10
|
+
const serviceNames = ["pi-web-sessiond.service", "pi-web.service", "pi-web-ui-dev.service"];
|
|
11
|
+
const macLogPaths = ["sessiond.log", "web.log", "ui-dev.log"].map((name) => join(homedir(), ".pi-web", "logs", name));
|
|
12
|
+
|
|
13
|
+
const subcommands = [
|
|
14
|
+
"install",
|
|
15
|
+
"status",
|
|
16
|
+
"logs",
|
|
17
|
+
"restart",
|
|
18
|
+
"start",
|
|
19
|
+
"stop",
|
|
20
|
+
"doctor",
|
|
21
|
+
"version",
|
|
22
|
+
"uninstall",
|
|
23
|
+
"open",
|
|
24
|
+
"help",
|
|
25
|
+
] as const;
|
|
26
|
+
|
|
27
|
+
type Subcommand = (typeof subcommands)[number];
|
|
28
|
+
|
|
29
|
+
function parseArgs(args: string): string[] {
|
|
30
|
+
return args.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g)?.map((part) => {
|
|
31
|
+
if ((part.startsWith('"') && part.endsWith('"')) || (part.startsWith("'") && part.endsWith("'"))) {
|
|
32
|
+
return part.slice(1, -1);
|
|
33
|
+
}
|
|
34
|
+
return part;
|
|
35
|
+
}) ?? [];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function truncateOutput(output: string): string {
|
|
39
|
+
const trimmed = output.trim();
|
|
40
|
+
if (trimmed.length <= 3_500) return trimmed;
|
|
41
|
+
return `${trimmed.slice(0, 3_500)}\n… output truncated`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function run(command: string, args: string[], env: NodeJS.ProcessEnv = {}): Promise<{ code: number; output: string }> {
|
|
45
|
+
return new Promise((resolve) => {
|
|
46
|
+
const child = spawn(command, args, {
|
|
47
|
+
env: { ...process.env, ...env },
|
|
48
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
let output = "";
|
|
52
|
+
child.stdout.setEncoding("utf8");
|
|
53
|
+
child.stderr.setEncoding("utf8");
|
|
54
|
+
child.stdout.on("data", (chunk: string) => { output += chunk; });
|
|
55
|
+
child.stderr.on("data", (chunk: string) => { output += chunk; });
|
|
56
|
+
child.on("error", (error) => {
|
|
57
|
+
resolve({ code: 1, output: error.message });
|
|
58
|
+
});
|
|
59
|
+
child.on("close", (code) => {
|
|
60
|
+
resolve({ code: code ?? 1, output });
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function runPiWeb(args: string[], env: NodeJS.ProcessEnv = {}): Promise<{ code: number; output: string }> {
|
|
66
|
+
if (existsSync(cliPath)) {
|
|
67
|
+
return run(process.execPath, [cliPath, ...args], env);
|
|
68
|
+
}
|
|
69
|
+
return run("pi-web", args, env);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function showResult(ctx: { ui: { notify(message: string, type?: "info" | "warning" | "error" | "success"): void } }, title: string, result: { code: number; output: string }): void {
|
|
73
|
+
const body = truncateOutput(result.output) || (result.code === 0 ? "Done." : `Command failed with exit code ${String(result.code)}.`);
|
|
74
|
+
ctx.ui.notify(`${title}\n\n${body}`, result.code === 0 ? "info" : "error");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function isSubcommand(value: string): value is Subcommand {
|
|
78
|
+
return subcommands.some((command) => command === value);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async function boundedLogs(): Promise<{ code: number; output: string }> {
|
|
82
|
+
if (process.platform === "darwin") {
|
|
83
|
+
const existingLogs = macLogPaths.filter((path) => existsSync(path));
|
|
84
|
+
if (existingLogs.length === 0) return { code: 1, output: "No PI WEB log files found in ~/.pi-web/logs." };
|
|
85
|
+
return run("tail", ["-n", "100", ...existingLogs]);
|
|
86
|
+
}
|
|
87
|
+
return run("journalctl", ["--user", ...serviceNames.flatMap((serviceName) => ["-u", serviceName]), "-n", "100", "--no-pager"]);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export default function piWebExtension(pi: ExtensionAPI): void {
|
|
91
|
+
pi.registerCommand("pi-web", {
|
|
92
|
+
description: "Manage PI WEB services: install, status, logs, restart, start, stop, doctor, version, open",
|
|
93
|
+
getArgumentCompletions(prefix: string): { value: string; label: string }[] | null {
|
|
94
|
+
const [first = ""] = parseArgs(prefix);
|
|
95
|
+
const items = subcommands
|
|
96
|
+
.filter((command) => command.startsWith(first))
|
|
97
|
+
.map((command) => ({ value: command, label: command }));
|
|
98
|
+
return items.length > 0 ? items : null;
|
|
99
|
+
},
|
|
100
|
+
async handler(args, ctx) {
|
|
101
|
+
const parsedArgs = parseArgs(args);
|
|
102
|
+
const subcommand = parsedArgs[0] ?? "help";
|
|
103
|
+
const rest = parsedArgs.slice(1);
|
|
104
|
+
|
|
105
|
+
if (subcommand === "help") {
|
|
106
|
+
ctx.ui.notify(`PI WEB commands:\n\n${subcommands.map((command) => `/pi-web ${command}`).join("\n")}\n\nLogs are bounded to the last 100 service log lines in the Pi command. Use \`pi-web logs\` in a shell to follow logs.`, "info");
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (subcommand === "open") {
|
|
111
|
+
ctx.ui.notify("PI WEB default URL: http://127.0.0.1:8504", "info");
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (!isSubcommand(subcommand)) {
|
|
116
|
+
ctx.ui.notify(`Unknown pi-web command: ${subcommand}. Try /pi-web help.`, "error");
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (subcommand === "stop" || subcommand === "uninstall") {
|
|
121
|
+
const ok = await ctx.ui.confirm(`pi-web ${subcommand}`, `Run pi-web ${subcommand}?`);
|
|
122
|
+
if (!ok) return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (subcommand === "logs") {
|
|
126
|
+
showResult(ctx, "pi-web logs", await boundedLogs());
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
showResult(ctx, `pi-web ${subcommand}`, await runPiWeb([subcommand, ...rest]));
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
}
|
package/install.sh
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
set -eu
|
|
3
|
-
|
|
4
|
-
npm install -g @chainingintention/pi-web-cn
|
|
5
|
-
pi-web install
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
npm install -g @chainingintention/pi-web-cn
|
|
5
|
+
pi-web install
|
package/package.json
CHANGED
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@chainingintention/pi-web-cn",
|
|
3
|
-
"version": "1.202606.
|
|
4
|
-
"description": "Remote web UI and browser control plane for persistent Pi Coding Agent sessions.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"author": "Federico Jaramillo Martinez",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"bin": {
|
|
9
|
-
"pi-web": "dist/cli.js",
|
|
10
|
-
"pi-web-server": "dist/server/index.js",
|
|
11
|
-
"pi-web-sessiond": "dist/server/sessiond.js"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"dist",
|
|
15
|
-
"install.sh",
|
|
16
|
-
"README.md",
|
|
17
|
-
"LICENSE",
|
|
18
|
-
"extensions",
|
|
19
|
-
"docs/plugins.md",
|
|
20
|
-
"docs/assets",
|
|
21
|
-
"plugin-api.d.ts",
|
|
22
|
-
"plugin-api/unstable.d.ts"
|
|
23
|
-
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"dev": "bash -c 'trap \"kill 0\" EXIT; npm run dev:sessiond & npm run dev:web & npm run dev:client & wait'",
|
|
26
|
-
"dev:sessiond": "tsx watch src/server/sessiond.ts",
|
|
27
|
-
"dev:web": "bash -c 'set -e; npm run build:plugins; trap \"kill 0\" EXIT; npm run dev:plugins & tsx watch src/server/index.ts & wait'",
|
|
28
|
-
"dev:server": "npm run dev:web",
|
|
29
|
-
"dev:client": "vite --host 0.0.0.0",
|
|
30
|
-
"dev:plugins": "node scripts/build-plugins.mjs --watch",
|
|
31
|
-
"build": "tsc -p tsconfig.build.json && npm run build:plugin-api && npm run build:plugins && vite build",
|
|
32
|
-
"build:plugin-api": "tsc -p tsconfig.plugin-api.json",
|
|
33
|
-
"build:plugins": "tsc -p tsconfig.plugins.json && node scripts/build-plugins.mjs",
|
|
34
|
-
"typecheck": "tsc --noEmit",
|
|
35
|
-
"lint": "eslint \"src/**/*.ts\" \"extensions/**/*.ts\" \"pi-web-plugins/**/*.ts\" vite.config.ts vitest.config.ts",
|
|
36
|
-
"test": "vitest run --config vitest.config.ts",
|
|
37
|
-
"verify": "npm run typecheck && npm run lint && npm test",
|
|
38
|
-
"start": "tsx src/server/index.ts",
|
|
39
|
-
"start:sessiond": "tsx src/server/sessiond.ts",
|
|
40
|
-
"clean": "rm -rf dist",
|
|
41
|
-
"prepack": "npm run build",
|
|
42
|
-
"pack:dry": "npm pack --dry-run",
|
|
43
|
-
"prepublishOnly": "npm run verify",
|
|
44
|
-
"publish:npm": "npm publish --access public",
|
|
45
|
-
"prepare": "node scripts/install-git-hooks.mjs",
|
|
46
|
-
"changeset": "changeset",
|
|
47
|
-
"release:version": "changeset version",
|
|
48
|
-
"changelog:status": "changeset status"
|
|
49
|
-
},
|
|
50
|
-
"dependencies": {
|
|
51
|
-
"@codemirror/lang-css": "^6.3.1",
|
|
52
|
-
"@codemirror/lang-go": "^6.0.1",
|
|
53
|
-
"@codemirror/lang-html": "^6.4.11",
|
|
54
|
-
"@codemirror/lang-javascript": "^6.2.5",
|
|
55
|
-
"@codemirror/lang-json": "^6.0.2",
|
|
56
|
-
"@codemirror/lang-markdown": "^6.5.0",
|
|
57
|
-
"@codemirror/lang-python": "^6.2.1",
|
|
58
|
-
"@codemirror/lang-rust": "^6.0.2",
|
|
59
|
-
"@codemirror/legacy-modes": "^6.5.2",
|
|
60
|
-
"@fastify/static": "^9.1.3",
|
|
61
|
-
"@fastify/websocket": "^11.2.0",
|
|
62
|
-
"@xterm/addon-fit": "^0.11.0",
|
|
63
|
-
"@xterm/xterm": "^6.0.0",
|
|
64
|
-
"codemirror": "^6.0.2",
|
|
65
|
-
"diff": "^8.0.4",
|
|
66
|
-
"fastify": "^5.6.1",
|
|
67
|
-
"lit": "^3.3.1",
|
|
68
|
-
"marked": "^18.0.3",
|
|
69
|
-
"node-pty": "^1.1.0",
|
|
70
|
-
"ws": "^8.20.1"
|
|
71
|
-
},
|
|
72
|
-
"devDependencies": {
|
|
73
|
-
"@changesets/cli": "^2.31.0",
|
|
74
|
-
"@earendil-works/pi-coding-agent": "^0.74.0",
|
|
75
|
-
"@eslint/js": "^10.0.1",
|
|
76
|
-
"@types/node": "^24.10.1",
|
|
77
|
-
"@types/ws": "^8.18.1",
|
|
78
|
-
"eslint": "^10.3.0",
|
|
79
|
-
"globals": "^17.6.0",
|
|
80
|
-
"tsx": "^4.20.6",
|
|
81
|
-
"typescript": "^5.9.3",
|
|
82
|
-
"typescript-eslint": "^8.59.2",
|
|
83
|
-
"vite": "^7.2.4",
|
|
84
|
-
"vitest": "^4.1.5",
|
|
85
|
-
"@earendil-works/pi-ai": "^0.74.0"
|
|
86
|
-
},
|
|
87
|
-
"publishConfig": {
|
|
88
|
-
"access": "public"
|
|
89
|
-
},
|
|
90
|
-
"engines": {
|
|
91
|
-
"node": ">=22"
|
|
92
|
-
},
|
|
93
|
-
"repository": {
|
|
94
|
-
"type": "git",
|
|
95
|
-
"url": "git+https://github.com/nayuto-wakusei/pi-web-ChineseTranslation.git"
|
|
96
|
-
},
|
|
97
|
-
"bugs": {
|
|
98
|
-
"url": "https://github.com/nayuto-wakusei/pi-web-ChineseTranslation/issues"
|
|
99
|
-
},
|
|
100
|
-
"homepage": "https://github.com/nayuto-wakusei/pi-web-ChineseTranslation#readme",
|
|
101
|
-
"packageManager": "npm@11.11.0",
|
|
102
|
-
"peerDependencies": {
|
|
103
|
-
"@earendil-works/pi-coding-agent": ">=0.74.0 <1",
|
|
104
|
-
"@earendil-works/pi-ai": ">=0.74.0 <1"
|
|
105
|
-
},
|
|
106
|
-
"keywords": [
|
|
107
|
-
"pi-package",
|
|
108
|
-
"pi",
|
|
109
|
-
"pi-coding-agent",
|
|
110
|
-
"coding-agent",
|
|
111
|
-
"agent",
|
|
112
|
-
"web",
|
|
113
|
-
"ui",
|
|
114
|
-
"web-ui",
|
|
115
|
-
"webui",
|
|
116
|
-
"remote",
|
|
117
|
-
"browser",
|
|
118
|
-
"control-plane",
|
|
119
|
-
"persistent-sessions"
|
|
120
|
-
],
|
|
121
|
-
"pi": {
|
|
122
|
-
"extensions": [
|
|
123
|
-
"./extensions"
|
|
124
|
-
],
|
|
125
|
-
"image": "https://raw.githubusercontent.com/jmfederico/pi-web/main/docs/assets/pi-web-banner.png"
|
|
126
|
-
}
|
|
127
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@chainingintention/pi-web-cn",
|
|
3
|
+
"version": "1.202606.4",
|
|
4
|
+
"description": "Remote web UI and browser control plane for persistent Pi Coding Agent sessions.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Federico Jaramillo Martinez",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"pi-web": "dist/cli.js",
|
|
10
|
+
"pi-web-server": "dist/server/index.js",
|
|
11
|
+
"pi-web-sessiond": "dist/server/sessiond.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"install.sh",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE",
|
|
18
|
+
"extensions",
|
|
19
|
+
"docs/plugins.md",
|
|
20
|
+
"docs/assets",
|
|
21
|
+
"plugin-api.d.ts",
|
|
22
|
+
"plugin-api/unstable.d.ts"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "bash -c 'trap \"kill 0\" EXIT; npm run dev:sessiond & npm run dev:web & npm run dev:client & wait'",
|
|
26
|
+
"dev:sessiond": "tsx watch src/server/sessiond.ts",
|
|
27
|
+
"dev:web": "bash -c 'set -e; npm run build:plugins; trap \"kill 0\" EXIT; npm run dev:plugins & tsx watch src/server/index.ts & wait'",
|
|
28
|
+
"dev:server": "npm run dev:web",
|
|
29
|
+
"dev:client": "vite --host 0.0.0.0",
|
|
30
|
+
"dev:plugins": "node scripts/build-plugins.mjs --watch",
|
|
31
|
+
"build": "tsc -p tsconfig.build.json && npm run build:plugin-api && npm run build:plugins && vite build",
|
|
32
|
+
"build:plugin-api": "tsc -p tsconfig.plugin-api.json",
|
|
33
|
+
"build:plugins": "tsc -p tsconfig.plugins.json && node scripts/build-plugins.mjs",
|
|
34
|
+
"typecheck": "tsc --noEmit",
|
|
35
|
+
"lint": "eslint \"src/**/*.ts\" \"extensions/**/*.ts\" \"pi-web-plugins/**/*.ts\" vite.config.ts vitest.config.ts",
|
|
36
|
+
"test": "vitest run --config vitest.config.ts",
|
|
37
|
+
"verify": "npm run typecheck && npm run lint && npm test",
|
|
38
|
+
"start": "tsx src/server/index.ts",
|
|
39
|
+
"start:sessiond": "tsx src/server/sessiond.ts",
|
|
40
|
+
"clean": "rm -rf dist",
|
|
41
|
+
"prepack": "npm run build",
|
|
42
|
+
"pack:dry": "npm pack --dry-run",
|
|
43
|
+
"prepublishOnly": "npm run verify",
|
|
44
|
+
"publish:npm": "npm publish --access public",
|
|
45
|
+
"prepare": "node scripts/install-git-hooks.mjs",
|
|
46
|
+
"changeset": "changeset",
|
|
47
|
+
"release:version": "changeset version",
|
|
48
|
+
"changelog:status": "changeset status"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@codemirror/lang-css": "^6.3.1",
|
|
52
|
+
"@codemirror/lang-go": "^6.0.1",
|
|
53
|
+
"@codemirror/lang-html": "^6.4.11",
|
|
54
|
+
"@codemirror/lang-javascript": "^6.2.5",
|
|
55
|
+
"@codemirror/lang-json": "^6.0.2",
|
|
56
|
+
"@codemirror/lang-markdown": "^6.5.0",
|
|
57
|
+
"@codemirror/lang-python": "^6.2.1",
|
|
58
|
+
"@codemirror/lang-rust": "^6.0.2",
|
|
59
|
+
"@codemirror/legacy-modes": "^6.5.2",
|
|
60
|
+
"@fastify/static": "^9.1.3",
|
|
61
|
+
"@fastify/websocket": "^11.2.0",
|
|
62
|
+
"@xterm/addon-fit": "^0.11.0",
|
|
63
|
+
"@xterm/xterm": "^6.0.0",
|
|
64
|
+
"codemirror": "^6.0.2",
|
|
65
|
+
"diff": "^8.0.4",
|
|
66
|
+
"fastify": "^5.6.1",
|
|
67
|
+
"lit": "^3.3.1",
|
|
68
|
+
"marked": "^18.0.3",
|
|
69
|
+
"node-pty": "^1.1.0",
|
|
70
|
+
"ws": "^8.20.1"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@changesets/cli": "^2.31.0",
|
|
74
|
+
"@earendil-works/pi-coding-agent": "^0.74.0",
|
|
75
|
+
"@eslint/js": "^10.0.1",
|
|
76
|
+
"@types/node": "^24.10.1",
|
|
77
|
+
"@types/ws": "^8.18.1",
|
|
78
|
+
"eslint": "^10.3.0",
|
|
79
|
+
"globals": "^17.6.0",
|
|
80
|
+
"tsx": "^4.20.6",
|
|
81
|
+
"typescript": "^5.9.3",
|
|
82
|
+
"typescript-eslint": "^8.59.2",
|
|
83
|
+
"vite": "^7.2.4",
|
|
84
|
+
"vitest": "^4.1.5",
|
|
85
|
+
"@earendil-works/pi-ai": "^0.74.0"
|
|
86
|
+
},
|
|
87
|
+
"publishConfig": {
|
|
88
|
+
"access": "public"
|
|
89
|
+
},
|
|
90
|
+
"engines": {
|
|
91
|
+
"node": ">=22"
|
|
92
|
+
},
|
|
93
|
+
"repository": {
|
|
94
|
+
"type": "git",
|
|
95
|
+
"url": "git+https://github.com/nayuto-wakusei/pi-web-ChineseTranslation.git"
|
|
96
|
+
},
|
|
97
|
+
"bugs": {
|
|
98
|
+
"url": "https://github.com/nayuto-wakusei/pi-web-ChineseTranslation/issues"
|
|
99
|
+
},
|
|
100
|
+
"homepage": "https://github.com/nayuto-wakusei/pi-web-ChineseTranslation#readme",
|
|
101
|
+
"packageManager": "npm@11.11.0",
|
|
102
|
+
"peerDependencies": {
|
|
103
|
+
"@earendil-works/pi-coding-agent": ">=0.74.0 <1",
|
|
104
|
+
"@earendil-works/pi-ai": ">=0.74.0 <1"
|
|
105
|
+
},
|
|
106
|
+
"keywords": [
|
|
107
|
+
"pi-package",
|
|
108
|
+
"pi",
|
|
109
|
+
"pi-coding-agent",
|
|
110
|
+
"coding-agent",
|
|
111
|
+
"agent",
|
|
112
|
+
"web",
|
|
113
|
+
"ui",
|
|
114
|
+
"web-ui",
|
|
115
|
+
"webui",
|
|
116
|
+
"remote",
|
|
117
|
+
"browser",
|
|
118
|
+
"control-plane",
|
|
119
|
+
"persistent-sessions"
|
|
120
|
+
],
|
|
121
|
+
"pi": {
|
|
122
|
+
"extensions": [
|
|
123
|
+
"./extensions"
|
|
124
|
+
],
|
|
125
|
+
"image": "https://raw.githubusercontent.com/jmfederico/pi-web/main/docs/assets/pi-web-banner.png"
|
|
126
|
+
}
|
|
127
|
+
}
|
package/plugin-api/unstable.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../dist/plugin-api/unstable.js";
|
|
1
|
+
export * from "../dist/plugin-api/unstable.js";
|
package/plugin-api.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./dist/plugin-api.js";
|
|
1
|
+
export * from "./dist/plugin-api.js";
|