@firstpick/pi-package-webui 0.8.0 → 0.8.2

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 (63) hide show
  1. package/README.md +34 -5
  2. package/bin/pi-webui.mjs +606 -102
  3. package/lib/component-update-state.mjs +126 -0
  4. package/lib/npm-command.mjs +81 -0
  5. package/lib/queue-mutation.mjs +6 -0
  6. package/lib/trust-boundaries.mjs +1 -0
  7. package/lib/workspace-files-live-watcher.mjs +138 -0
  8. package/package.json +8 -3
  9. package/public/app.js +4231 -376
  10. package/public/index.html +265 -52
  11. package/public/mobile-shell-state.mjs +166 -0
  12. package/public/service-worker.js +60 -13
  13. package/public/styles.css +1790 -383
  14. package/public/subagent-gate-visibility.mjs +16 -0
  15. package/public/subagent-launch-slot-state.mjs +16 -0
  16. package/public/transcript-renderer.mjs +433 -0
  17. package/tests/boot-failure-diagnostics.test.mjs +63 -5
  18. package/tests/browser/control-deck-component-updates.spec.mjs +180 -0
  19. package/tests/browser/interaction-continuity.spec.mjs +897 -0
  20. package/tests/browser/mobile-foundation.spec.mjs +363 -0
  21. package/tests/browser/optimistic-prompt.spec.mjs +130 -0
  22. package/tests/browser/side-panel-section-reorder.spec.mjs +101 -0
  23. package/tests/browser/stats-overlay.spec.mjs +265 -0
  24. package/tests/chat-scroll-intent-static.test.mjs +6 -1
  25. package/tests/codex-fast-mode-static.test.mjs +8 -5
  26. package/tests/compact-sections-static.test.mjs +20 -2
  27. package/tests/compaction-mutation-contract.test.mjs +18 -4
  28. package/tests/compaction-static.test.mjs +1 -0
  29. package/tests/completion-signal-contract.test.mjs +13 -2
  30. package/tests/component-update-api-static.test.mjs +67 -0
  31. package/tests/component-update-state.test.mjs +80 -0
  32. package/tests/control-deck-component-updates-static.test.mjs +251 -0
  33. package/tests/fast-mode-client-static.test.mjs +7 -4
  34. package/tests/fixtures/fake-pi.mjs +305 -2
  35. package/tests/footer-provider-usage-visual-static.test.mjs +71 -0
  36. package/tests/git-panel-gitignore-static.test.mjs +104 -0
  37. package/tests/http-endpoints-harness.test.mjs +228 -2
  38. package/tests/interaction-state-stability-static.test.mjs +271 -0
  39. package/tests/mobile-continuity-tablet-static.test.mjs +55 -0
  40. package/tests/mobile-foundation-static.test.mjs +71 -0
  41. package/tests/mobile-phone-experience-static.test.mjs +65 -0
  42. package/tests/mobile-shell-state.test.mjs +69 -0
  43. package/tests/mobile-static.test.mjs +246 -39
  44. package/tests/mobile-transcript-cache-characterization.test.mjs +34 -0
  45. package/tests/native-parity-harness.test.mjs +2 -0
  46. package/tests/npm-command.test.mjs +64 -1
  47. package/tests/open-issue-wizard-static.test.mjs +2 -1
  48. package/tests/queue-edit-reorder-static.test.mjs +9 -1
  49. package/tests/queue-mutation-contract.test.mjs +22 -0
  50. package/tests/service-worker-lifecycle.test.mjs +120 -0
  51. package/tests/side-panel-section-reorder-static.test.mjs +68 -0
  52. package/tests/sse-backpressure-harness.test.mjs +137 -0
  53. package/tests/stats-dashboard-static.test.mjs +266 -0
  54. package/tests/streaming-ui-coupling.test.mjs +7 -1
  55. package/tests/subagent-gate-visibility.test.mjs +18 -2
  56. package/tests/subagent-launch-slot-state.test.mjs +32 -0
  57. package/tests/subagent-launch-slots-static.test.mjs +8 -2
  58. package/tests/subagents-helper.test.mjs +90 -0
  59. package/tests/terminal-tab-workspace-static.test.mjs +1 -1
  60. package/tests/update-commands.test.mjs +4 -0
  61. package/tests/workspace-files-live-updates-static.test.mjs +76 -0
  62. package/tests/workspace-files-live-watcher.test.mjs +95 -0
  63. package/webui-rpc-helper.mjs +175 -3
@@ -0,0 +1,126 @@
1
+ export const COMPONENT_UPDATE_TARGETS = Object.freeze(["pi", "webui"]);
2
+
3
+ const TARGET_SET = new Set(COMPONENT_UPDATE_TARGETS);
4
+ const DEFAULT_ERROR_MAX_LENGTH = 1200;
5
+ const DEFAULT_MESSAGE_MAX_LENGTH = 320;
6
+
7
+ function targetLabel(target) {
8
+ return target === "pi" ? "Pi" : "Web UI";
9
+ }
10
+
11
+ function boundedText(value, maxLength) {
12
+ const text = String(value ?? "")
13
+ .replace(/\u001b(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g, "")
14
+ .replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g, "")
15
+ .trim();
16
+ return text.length > maxLength ? `${text.slice(0, Math.max(0, maxLength - 1))}…` : text;
17
+ }
18
+
19
+ export function sanitizeComponentUpdateError(value, maxLength = DEFAULT_ERROR_MAX_LENGTH) {
20
+ const raw = value instanceof Error ? (value.userMessage || value.message || String(value)) : String(value ?? "Unknown error");
21
+ const redacted = raw
22
+ .replace(/\b(authorization\s*:\s*)(?:bearer|basic)\s+[^\s,;]+/gi, "$1[redacted]")
23
+ .replace(/\b((?:_?auth[_-]?token|access[_-]?token|api[_-]?key|password|passwd|secret|token)\s*[=:]\s*)[^\s,;]+/gi, "$1[redacted]")
24
+ .replace(/\b([a-z][a-z0-9+.-]*:\/\/)[^\s/@:]+:[^\s/@]+@/gi, "$1[redacted]@")
25
+ .replace(/\b(?:npm_[A-Za-z0-9]{20,}|gh[opusr]_[A-Za-z0-9_]{20,})\b/g, "[redacted]");
26
+ return boundedText(redacted, Math.max(80, Number(maxLength) || DEFAULT_ERROR_MAX_LENGTH)) || "Unknown error";
27
+ }
28
+
29
+ export function validateComponentUpdateRequest(body) {
30
+ if (!body || typeof body !== "object" || Array.isArray(body)) {
31
+ return { ok: false, error: "Request body must be an object containing only target." };
32
+ }
33
+ const keys = Object.keys(body);
34
+ if (keys.length !== 1 || keys[0] !== "target" || !TARGET_SET.has(body.target)) {
35
+ return { ok: false, error: 'target must be exactly "pi" or "webui", with no additional fields.' };
36
+ }
37
+ return { ok: true, target: body.target };
38
+ }
39
+
40
+ function initialState(target) {
41
+ return {
42
+ target,
43
+ state: "idle",
44
+ startedAt: null,
45
+ finishedAt: null,
46
+ message: "",
47
+ error: "",
48
+ restartRequired: target === "webui",
49
+ };
50
+ }
51
+
52
+ export class ComponentUpdateState {
53
+ #states;
54
+ #now;
55
+
56
+ constructor({ now = () => new Date() } = {}) {
57
+ this.#now = now;
58
+ this.#states = Object.fromEntries(COMPONENT_UPDATE_TARGETS.map((target) => [target, initialState(target)]));
59
+ }
60
+
61
+ hasRunning() {
62
+ return COMPONENT_UPDATE_TARGETS.some((target) => this.#states[target].state === "running");
63
+ }
64
+
65
+ begin(target) {
66
+ if (!TARGET_SET.has(target)) throw new TypeError(`Unsupported component update target: ${target}`);
67
+ if (this.hasRunning()) throw new Error("Another component update is already running.");
68
+ const startedAt = this.#now().toISOString();
69
+ this.#states[target] = {
70
+ ...initialState(target),
71
+ state: "running",
72
+ startedAt,
73
+ message: `Updating ${targetLabel(target)}…`,
74
+ };
75
+ return this.get(target);
76
+ }
77
+
78
+ succeed(target, message) {
79
+ this.#requireRunning(target);
80
+ this.#states[target] = {
81
+ ...this.#states[target],
82
+ state: "succeeded",
83
+ finishedAt: this.#now().toISOString(),
84
+ message: boundedText(message, DEFAULT_MESSAGE_MAX_LENGTH),
85
+ error: "",
86
+ };
87
+ return this.get(target);
88
+ }
89
+
90
+ fail(target, error, message = `${targetLabel(target)} update failed.`) {
91
+ this.#requireRunning(target);
92
+ this.#states[target] = {
93
+ ...this.#states[target],
94
+ state: "failed",
95
+ finishedAt: this.#now().toISOString(),
96
+ message: boundedText(message, DEFAULT_MESSAGE_MAX_LENGTH),
97
+ error: sanitizeComponentUpdateError(error),
98
+ };
99
+ return this.get(target);
100
+ }
101
+
102
+ get(target) {
103
+ if (!TARGET_SET.has(target)) throw new TypeError(`Unsupported component update target: ${target}`);
104
+ return { ...this.#states[target] };
105
+ }
106
+
107
+ publicStates({ localRequest = false, updateInProgress = this.hasRunning(), webuiAvailable = true, webuiUnavailableReason = "" } = {}) {
108
+ return Object.fromEntries(COMPONENT_UPDATE_TARGETS.map((target) => {
109
+ const state = this.get(target);
110
+ let unavailableReason = "";
111
+ if (!localRequest) unavailableReason = "Component updates are only available from localhost.";
112
+ else if (target === "webui" && !webuiAvailable) unavailableReason = boundedText(webuiUnavailableReason || "Automatic Web UI update is unavailable for this installation.", DEFAULT_MESSAGE_MAX_LENGTH);
113
+ else if (updateInProgress) unavailableReason = "Another privileged update is already running.";
114
+ return [target, {
115
+ ...state,
116
+ canStart: unavailableReason === "",
117
+ unavailableReason,
118
+ }];
119
+ }));
120
+ }
121
+
122
+ #requireRunning(target) {
123
+ if (!TARGET_SET.has(target)) throw new TypeError(`Unsupported component update target: ${target}`);
124
+ if (this.#states[target].state !== "running") throw new Error(`Component update target ${target} is not running.`);
125
+ }
126
+ }
@@ -41,6 +41,83 @@ function existingPath(candidates, exists) {
41
41
  return "";
42
42
  }
43
43
 
44
+ function windowsCommandExtensions(command, env, pathApi) {
45
+ if (pathApi.extname(command)) return [""];
46
+ const configured = String(env.PATHEXT || env.PathExt || ".COM;.EXE;.BAT;.CMD")
47
+ .split(";")
48
+ .map((extension) => extension.trim())
49
+ .filter(Boolean);
50
+ return ["", ...configured];
51
+ }
52
+
53
+ /** Resolve the directory that supplies a command, using the same PATH order as the process. */
54
+ export function resolveCommandDirectory(command, runtime = {}) {
55
+ const env = runtime.env ?? process.env;
56
+ const platform = runtime.platform ?? process.platform;
57
+ const exists = runtime.existsSync ?? existsSync;
58
+ const pathApi = pathApiForPlatform(platform);
59
+ const value = String(command || "").trim().replace(/^"|"$/g, "");
60
+ if (!value) return "";
61
+
62
+ const directBase = pathApi.isAbsolute(value)
63
+ ? value
64
+ : value.includes("/") || value.includes("\\")
65
+ ? pathApi.resolve(runtime.cwd ?? process.cwd(), value)
66
+ : "";
67
+ const extensions = platform === "win32" ? windowsCommandExtensions(value, env, pathApi) : [""];
68
+ const pathCandidates = directBase
69
+ ? extensions.map((extension) => `${directBase}${extension}`)
70
+ : pathEntries(env, pathApi).flatMap((entry) => extensions.map((extension) => pathApi.join(entry, `${value}${extension}`)));
71
+ const resolved = existingPath(pathCandidates, exists);
72
+ return resolved ? pathApi.dirname(resolved) : "";
73
+ }
74
+
75
+ /** Put the selected Pi/Node installation first without discarding other PATH entries. */
76
+ export function prependPathDirectory(directory, runtime = {}) {
77
+ const env = runtime.env ?? process.env;
78
+ const platform = runtime.platform ?? process.platform;
79
+ const pathApi = pathApiForPlatform(platform);
80
+ const value = String(directory || "").trim();
81
+ if (!value) return envPathValue(env);
82
+ const comparable = (entry) => platform === "win32" ? pathApi.normalize(entry).toLowerCase() : pathApi.normalize(entry);
83
+ const selected = comparable(value);
84
+ const remaining = pathEntries(env, pathApi).filter((entry) => comparable(entry) !== selected);
85
+ return [value, ...remaining].join(pathApi.delimiter);
86
+ }
87
+
88
+ /** Preserve the process's PATH key casing so Windows does not receive Path and PATH entries. */
89
+ export function prependedPathEnvironment(directory, runtime = {}) {
90
+ const env = runtime.env ?? process.env;
91
+ const pathKey = Object.keys(env).find((key) => key.toLowerCase() === "path") || "PATH";
92
+ return { [pathKey]: prependPathDirectory(directory, runtime) };
93
+ }
94
+
95
+ /** Normalize Windows npm-generated Pi shims to Node plus the installation's CLI script. */
96
+ export function resolvePiCommandInvocation(command, args = [], runtime = {}) {
97
+ const env = runtime.env ?? process.env;
98
+ const execPath = runtime.execPath ?? process.execPath;
99
+ const platform = runtime.platform ?? process.platform;
100
+ const exists = runtime.existsSync ?? existsSync;
101
+ const pathApi = pathApiForPlatform(platform);
102
+ const requestedArgs = Array.isArray(args) ? args.map(String) : [];
103
+ const value = String(command || "").trim();
104
+
105
+ if (isJavaScriptPath(value)) {
106
+ return { command: execPath, args: [value, ...requestedArgs], source: "node-script" };
107
+ }
108
+ if (platform !== "win32" || !/^pi(?:\.(?:cmd|ps1))?$/i.test(pathApi.basename(value))) {
109
+ return { command: value, args: requestedArgs, source: "command" };
110
+ }
111
+
112
+ const installDirectory = resolveCommandDirectory(value, { ...runtime, env, execPath, platform, existsSync: exists });
113
+ const cliPath = pathApi.join(installDirectory, "node_modules", "@earendil-works", "pi-coding-agent", "dist", "cli.js");
114
+ if (installDirectory && existingPath([cliPath], exists)) {
115
+ const bundledNode = existingPath([pathApi.join(installDirectory, "node.exe"), execPath], exists) || execPath;
116
+ return { command: bundledNode, args: [cliPath, ...requestedArgs], source: "windows-node-cli", installDirectory };
117
+ }
118
+ return { command: value, args: requestedArgs, source: "command", installDirectory };
119
+ }
120
+
44
121
  /**
45
122
  * Resolve npm without relying on Windows CreateProcess to discover npm.cmd.
46
123
  * The returned display command intentionally remains npm-oriented while the
@@ -79,7 +156,11 @@ export function resolveNpmCommandInvocation(args = [], runtime = {}) {
79
156
  }
80
157
 
81
158
  const npmExecPath = String(env.npm_execpath || "").trim();
159
+ const preferredDirectories = Array.isArray(runtime.preferredDirectories)
160
+ ? runtime.preferredDirectories.map(String).filter(Boolean)
161
+ : [];
82
162
  const candidates = [
163
+ ...preferredDirectories.map((directory) => npmCliPathForDirectory(directory, pathApi)),
83
164
  isJavaScriptPath(npmExecPath) ? npmExecPath : "",
84
165
  npmCliPathForDirectory(pathApi.dirname(execPath), pathApi),
85
166
  ...pathEntries(env, pathApi).map((entry) => npmCliPathForDirectory(entry, pathApi)),
@@ -98,6 +98,12 @@ export function mutatePiRuntimeFollowUpQueue(session, payload = {}) {
98
98
  // `to` is the final zero-based index after the item has been removed.
99
99
  nextTracked.splice(operation.to, 0, tracked);
100
100
  nextMessages.splice(operation.to, 0, message);
101
+ } else if (operation.type === "delete") {
102
+ if (!validIndex(operation.index, followUp.length) || followUp[operation.index] !== operation.expectedText) {
103
+ return mutationFailure("invalid-request", steering, followUp);
104
+ }
105
+ nextTracked.splice(operation.index, 1);
106
+ nextMessages.splice(operation.index, 1);
101
107
  } else {
102
108
  return mutationFailure("invalid-request", steering, followUp);
103
109
  }
@@ -18,6 +18,7 @@ export const LOCALHOST_ONLY_POST_ROUTES = new Map([
18
18
  ["/api/recovery/plan", "Opening recovery plans is only allowed from localhost"],
19
19
  ["/api/restart", "Restart is only allowed from localhost"],
20
20
  ["/api/update", "Updating Pi from the Web UI is only allowed from localhost"],
21
+ ["/api/component-update", "Component updates are only allowed from localhost"],
21
22
  ["/api/shutdown", "Shutdown is only allowed from localhost"],
22
23
  ["/api/optional-feature-install", "Installing optional Web UI features is only allowed from localhost"],
23
24
  ["/api/skill-file", "Saving skill files is only allowed from localhost"],
@@ -0,0 +1,138 @@
1
+ import { watch as watchDirectory } from "node:fs";
2
+ import path from "node:path";
3
+
4
+ export const WORKSPACE_FILES_LIVE_WATCH_DEBOUNCE_MS = 250;
5
+ export const WORKSPACE_FILES_LIVE_WATCH_MAX_WAIT_MS = 2_000;
6
+
7
+ function cleanTabId(value) {
8
+ return String(value || "").trim();
9
+ }
10
+
11
+ function canonicalRoot(value) {
12
+ const root = String(value || "").trim();
13
+ return root ? path.resolve(root) : "";
14
+ }
15
+
16
+ export function createWorkspaceFilesLiveWatcher({
17
+ watch = watchDirectory,
18
+ debounceMs = WORKSPACE_FILES_LIVE_WATCH_DEBOUNCE_MS,
19
+ maxWaitMs = WORKSPACE_FILES_LIVE_WATCH_MAX_WAIT_MS,
20
+ onChange = () => {},
21
+ onError = () => {},
22
+ } = {}) {
23
+ const roots = new Map();
24
+ const tabRoots = new Map();
25
+ const delayMs = Math.max(0, Number(debounceMs) || 0);
26
+ const maximumWaitMs = Math.max(0, Number(maxWaitMs) || WORKSPACE_FILES_LIVE_WATCH_MAX_WAIT_MS);
27
+
28
+ function reportError(root, error) {
29
+ try {
30
+ onError({ root, error });
31
+ } catch {
32
+ // Watcher diagnostics must never crash the Web UI server.
33
+ }
34
+ }
35
+
36
+ function closeRoot(root, { clearTabs = true } = {}) {
37
+ const record = roots.get(root);
38
+ if (!record) return false;
39
+ roots.delete(root);
40
+ if (record.timer) clearTimeout(record.timer);
41
+ try {
42
+ record.watcher?.close();
43
+ } catch {
44
+ // The watcher may already be closed after an error.
45
+ }
46
+ if (clearTabs) {
47
+ for (const tabId of record.tabs) {
48
+ if (tabRoots.get(tabId) === root) tabRoots.delete(tabId);
49
+ }
50
+ }
51
+ return true;
52
+ }
53
+
54
+ function failRoot(root, error) {
55
+ if (!roots.has(root)) return;
56
+ closeRoot(root);
57
+ reportError(root, error);
58
+ }
59
+
60
+ function scheduleChange(root) {
61
+ const record = roots.get(root);
62
+ if (!record) return;
63
+ record.tabIds = new Set(record.tabs);
64
+ if (record.timer) clearTimeout(record.timer);
65
+ const now = Date.now();
66
+ if (!record.burstStartedAt) record.burstStartedAt = now;
67
+ const remainingMs = Math.max(0, maximumWaitMs - (now - record.burstStartedAt));
68
+ record.timer = setTimeout(() => {
69
+ const current = roots.get(root);
70
+ if (!current || current !== record) return;
71
+ current.timer = null;
72
+ current.burstStartedAt = 0;
73
+ const tabIds = [...current.tabIds];
74
+ current.tabIds.clear();
75
+ try {
76
+ onChange({ root, tabIds, changedAt: new Date().toISOString() });
77
+ } catch (error) {
78
+ reportError(root, error);
79
+ }
80
+ }, Math.min(delayMs, remainingMs));
81
+ record.timer.unref?.();
82
+ }
83
+
84
+ function ensureRoot(root) {
85
+ const existing = roots.get(root);
86
+ if (existing) return existing;
87
+ const record = { root, tabs: new Set(), tabIds: new Set(), watcher: null, timer: null, burstStartedAt: 0 };
88
+ roots.set(root, record);
89
+ try {
90
+ record.watcher = watch(root, { recursive: true, persistent: false }, () => scheduleChange(root));
91
+ record.watcher.on?.("error", (error) => failRoot(root, error));
92
+ return record;
93
+ } catch (error) {
94
+ roots.delete(root);
95
+ reportError(root, error);
96
+ return null;
97
+ }
98
+ }
99
+
100
+ function unsubscribe(tabIdValue) {
101
+ const tabId = cleanTabId(tabIdValue);
102
+ const root = tabRoots.get(tabId);
103
+ if (!root) return false;
104
+ tabRoots.delete(tabId);
105
+ const record = roots.get(root);
106
+ if (!record) return true;
107
+ record.tabs.delete(tabId);
108
+ if (!record.tabs.size) closeRoot(root, { clearTabs: false });
109
+ return true;
110
+ }
111
+
112
+ function subscribe(tabIdValue, rootValue) {
113
+ const tabId = cleanTabId(tabIdValue);
114
+ const root = canonicalRoot(rootValue);
115
+ if (!tabId || !root) return false;
116
+ const previousRoot = tabRoots.get(tabId);
117
+ if (previousRoot === root && roots.has(root)) return true;
118
+ if (previousRoot) unsubscribe(tabId);
119
+ const record = ensureRoot(root);
120
+ if (!record) return false;
121
+ record.tabs.add(tabId);
122
+ tabRoots.set(tabId, root);
123
+ return true;
124
+ }
125
+
126
+ function closeAll() {
127
+ for (const root of [...roots.keys()]) closeRoot(root);
128
+ tabRoots.clear();
129
+ }
130
+
131
+ return {
132
+ subscribe,
133
+ unsubscribe,
134
+ closeAll,
135
+ watchedRootCount: () => roots.size,
136
+ subscribedRootForTab: (tabId) => tabRoots.get(cleanTabId(tabId)) || "",
137
+ };
138
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firstpick/pi-package-webui",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Pi Web UI companion package with a local browser UI CLI plus /webui-start and /webui-status commands.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-package-webui#readme",
@@ -52,8 +52,9 @@
52
52
  "pi-webui": "./bin/pi-webui.mjs"
53
53
  },
54
54
  "scripts": {
55
- "check": "node --check public/app.js && node --check public/issue-wizard-state.mjs && node --check public/issue-bot-client.mjs && node --check public/workflow-status-stack.mjs && node --check public/fast-output-live.mjs && node --check public/subagent-launch-slot-state.mjs && node --check public/subagent-gate-visibility.mjs && node --check public/voice-conversation.mjs && node --check public/aur-review-payload.mjs && node --check public/guided-git-command-state.mjs && node --check public/guided-git-review-state.mjs && node --check bin/pi-webui.mjs && node --check bin/pi-webui-rpc-supervisor.mjs && node --check lib/rpc-supervisor-protocol.mjs && node --check lib/rpc-supervisor-state.mjs && node --check lib/rpc-supervisor-client.mjs && node --check webui-rpc-helper.mjs && node --check lib/subagent-launch-slots.mjs && node --check lib/git-live-watcher.mjs && node --check lib/git-message-artifacts.mjs && node --check lib/trust-boundaries.mjs && node --check lib/native-command-adapter.mjs && node --check lib/session-actions.mjs && node --check lib/auth-actions.mjs && node --check lib/temp-artifacts.mjs && node tests/run-all.mjs",
56
- "test": "node tests/run-all.mjs"
55
+ "check": "node --check public/app.js && node --check public/transcript-renderer.mjs && node --check public/mobile-shell-state.mjs && node --check public/issue-wizard-state.mjs && node --check public/issue-bot-client.mjs && node --check public/workflow-status-stack.mjs && node --check public/fast-output-live.mjs && node --check public/subagent-launch-slot-state.mjs && node --check public/subagent-gate-visibility.mjs && node --check public/voice-conversation.mjs && node --check public/aur-review-payload.mjs && node --check public/guided-git-command-state.mjs && node --check public/guided-git-review-state.mjs && node --check bin/pi-webui.mjs && node --check bin/pi-webui-rpc-supervisor.mjs && node --check lib/rpc-supervisor-protocol.mjs && node --check lib/rpc-supervisor-state.mjs && node --check lib/rpc-supervisor-client.mjs && node --check webui-rpc-helper.mjs && node --check lib/subagent-launch-slots.mjs && node --check lib/git-live-watcher.mjs && node --check lib/workspace-files-live-watcher.mjs && node --check lib/git-message-artifacts.mjs && node --check lib/trust-boundaries.mjs && node --check lib/native-command-adapter.mjs && node --check lib/session-actions.mjs && node --check lib/auth-actions.mjs && node --check lib/temp-artifacts.mjs && node tests/run-all.mjs",
56
+ "test": "node tests/run-all.mjs",
57
+ "test:browser": "playwright test"
57
58
  },
58
59
  "dependencies": {
59
60
  "@earendil-works/pi-coding-agent": "^0.83.0",
@@ -101,5 +102,9 @@
101
102
  "undici": "8.5.0",
102
103
  "ws": "8.21.0"
103
104
  }
105
+ },
106
+ "devDependencies": {
107
+ "@axe-core/playwright": "4.12.1",
108
+ "@playwright/test": "1.62.1"
104
109
  }
105
110
  }