@pi-chamber/web 1.0.0 → 1.0.1
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/README.md +3 -1
- package/bin/cli.js +7 -32
- package/bin/dev-server.js +185 -0
- package/bin/dev-server.test.js +252 -0
- package/bin/lib/DOCUMENTATION.md +19 -0
- package/bin/lib/cli-startup.js +9 -1
- package/bin/lib/cli-startup.test.js +30 -0
- package/bin/lib/commands-serve.js +9 -5
- package/bin/lib/server-runtime.js +6 -0
- package/bin/lib/server-runtime.test.js +313 -0
- package/dist/assets/{DiagramView-CbSxUe1D.js → DiagramView-COHSzZ9Z.js} +1 -1
- package/dist/assets/{DiffView-VyBf4ilo.js → DiffView-BA4LWExp.js} +1 -1
- package/dist/assets/{FileSaveConflictDialog-BCvbQ234.js → FileSaveConflictDialog-hRumcJ2e.js} +1 -1
- package/dist/assets/{FilesView-DasA5EU2.js → FilesView-CIx6Bq8l.js} +1 -1
- package/dist/assets/{GitView-DU3mOECp.js → GitView-3Hgk_pVS.js} +3 -3
- package/dist/assets/{JsonTreeView-xZiWDwua.js → JsonTreeView-CVLGj7jk.js} +1 -1
- package/dist/assets/{MarkdownRendererImpl-BBwdI2OF.js → MarkdownRendererImpl-CWeQW9_O.js} +1 -1
- package/dist/assets/{PatchDiff-BhKm_JPT.js → PatchDiff-367QPDDL.js} +1 -1
- package/dist/assets/{SessionSwitcherContent-DTGSP_RB.js → SessionSwitcherContent-CbgywSHr.js} +1 -1
- package/dist/assets/{SessionSwitcherDropdown-CedOB-xC.js → SessionSwitcherDropdown-BAHhqkBZ.js} +2 -2
- package/dist/assets/{SessionUnreadDot-CZSNKram.js → SessionUnreadDot-CvIWGgIi.js} +1 -1
- package/dist/assets/SettingsView-BpGtnBKt.js +2 -0
- package/dist/assets/{SettingsWindow-y33YrpBE.js → SettingsWindow-CN0wm-Fv.js} +1 -1
- package/dist/assets/{ToolOutputDialog-JqIXJWAH.js → ToolOutputDialog-Bkh0DWJn.js} +1 -1
- package/dist/assets/{ToolPartDiffPreview-CRi_33jE.js → ToolPartDiffPreview-C_V9k2ob.js} +1 -1
- package/dist/assets/{VirtualizedFileDiff-ehLQSR5W.js → VirtualizedFileDiff-CFToyUp4.js} +1 -1
- package/dist/assets/{collapsible-Vypq-nMP.js → collapsible-BXBoS1M4.js} +1 -1
- package/dist/assets/{computeVirtualFileMetrics-BTfrj_fR.js → computeVirtualFileMetrics-BpbB2xiE.js} +1 -1
- package/dist/assets/{contextFileOpenGuard-Dl6mFfD1.js → contextFileOpenGuard-DsdrIBIY.js} +1 -1
- package/dist/assets/{gitStatusPredicates-LAsJAhCL.js → gitStatusPredicates-KYx0Vs9h.js} +1 -1
- package/dist/assets/{index-OveFsNBm.js → index-CVZfC79h.js} +1 -1
- package/dist/assets/{index-BXX8l7mM.css → index-Ci9OMaKW.css} +1 -1
- package/dist/assets/{index-DvNeSFO9.js → index-DyeT2dc_.js} +7 -7
- package/dist/assets/{isDiffPlainText-CNZohQ4q.js → isDiffPlainText-dBQiDlRy.js} +1 -1
- package/dist/assets/{isFilePlainText-Dz8UubRT.js → isFilePlainText-DWMzO-Ms.js} +1 -1
- package/dist/assets/{main-BsDkATRV.js → main-DkXvFwTR.js} +3 -3
- package/dist/assets/{main-C393Ywhx.js → main-DukaBOy3.js} +2 -2
- package/dist/assets/{markdownCore-Bz9-Y75q.js → markdownCore-BH61OrJ2.js} +1 -1
- package/dist/assets/{miniChat-CWEerp3c.js → miniChat-B1uBoxSn.js} +2 -2
- package/dist/assets/{mobile-YxV9KcxF.js → mobile-DV_RYy3x.js} +2 -2
- package/dist/assets/{renderElectronMiniChatApp-GrLmBQRb.js → renderElectronMiniChatApp-CA6co_Lh.js} +2 -2
- package/dist/assets/renderMobileApp-CyhFZ_4g.js +11 -0
- package/dist/assets/runtimeEndpointReset-CVoKFaRw.js +53 -0
- package/dist/assets/{runtimeSurface-DUXw4-oa.js → runtimeSurface-CxbVCK7k.js} +1 -1
- package/dist/assets/{useAppFontEffects-ad-lZJ6o.js → useAppFontEffects-HCEusnq7.js} +77 -77
- package/dist/assets/{useFilesViewSearch-C4oOHPml.js → useFilesViewSearch-Cq7IOB7l.js} +1 -1
- package/dist/assets/{usePushVisibilityBeacon-xd8Q10cI.js → usePushVisibilityBeacon-Tvi9uL7v.js} +1 -1
- package/dist/assets/{useSwitcherItems-B6VC7tug.js → useSwitcherItems-DLA7kskG.js} +1 -1
- package/dist/assets/{vendor-codemirror-language-data-B4j3gkaT.js → vendor-codemirror-language-data-zF3O85ti.js} +2 -2
- package/dist/assets/{web-components-B0RFakat.js → web-components-C7g3Hi85.js} +1 -1
- package/dist/index.html +4 -4
- package/dist/mini-chat.html +3 -3
- package/dist/mobile.html +3 -3
- package/package.json +8 -3
- package/server/index.js +40 -6
- package/server/lib/notifications/DOCUMENTATION.md +39 -0
- package/server/lib/notifications/delivery-runtime.js +314 -0
- package/server/lib/notifications/delivery-runtime.test.js +85 -0
- package/server/lib/notifications/pi-notification-watcher.js +154 -0
- package/server/lib/notifications/pi-notification-watcher.test.js +84 -0
- package/server/lib/notifications/routes.js +74 -0
- package/server/lib/pi/session-daemon/DOCUMENTATION.md +1 -0
- package/server/lib/pi/session-daemon/pi-runtime-smoke.test.js +466 -0
- package/server/lib/pi/ui-settings-store.js +3 -2
- package/server/lib/server/runtime-requirements.js +193 -0
- package/server/lib/server/runtime-requirements.test.js +295 -0
- package/dist/assets/SettingsView-B5nmu8x4.js +0 -2
- package/dist/assets/renderMobileApp-C29wquBe.js +0 -11
- package/dist/assets/runtimeEndpointReset-DHARMv9w.js +0 -53
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
const notificationPayload = (event, kind, title) => ({
|
|
2
|
+
title: kind === 'error' ? 'Work failed' : 'Work completed',
|
|
3
|
+
body: title || 'Open PiChamber to review the session.',
|
|
4
|
+
tag: `pichamber:${kind}:${event.sessionId}:${event.sequence}`,
|
|
5
|
+
data: {
|
|
6
|
+
type: kind,
|
|
7
|
+
sessionId: event.sessionId,
|
|
8
|
+
...(event.directory ? { directory: event.directory } : {}),
|
|
9
|
+
url: `/?session=${encodeURIComponent(event.sessionId)}`,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export const createPiNotificationTracker = ({ emit }) => {
|
|
14
|
+
const activeSessions = new Set();
|
|
15
|
+
const titleBySession = new Map();
|
|
16
|
+
|
|
17
|
+
const settle = (event, kind) => {
|
|
18
|
+
if (!activeSessions.delete(event.sessionId)) return;
|
|
19
|
+
emit(notificationPayload(event, kind, titleBySession.get(event.sessionId)));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const accept = (event) => {
|
|
23
|
+
if (!event || typeof event.sessionId !== 'string') return;
|
|
24
|
+
if (event.name === 'session.snapshot') {
|
|
25
|
+
const snapshot = event.payload?.snapshot;
|
|
26
|
+
if (typeof snapshot?.title === 'string' && snapshot.title.trim()) {
|
|
27
|
+
titleBySession.set(event.sessionId, snapshot.title.trim());
|
|
28
|
+
}
|
|
29
|
+
const active = snapshot?.isStreaming === true
|
|
30
|
+
|| snapshot?.lifecycle === 'busy'
|
|
31
|
+
|| snapshot?.lifecycle === 'retry';
|
|
32
|
+
if (active) activeSessions.add(event.sessionId);
|
|
33
|
+
else activeSessions.delete(event.sessionId);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (event.name === 'session.updated' && typeof event.payload?.title === 'string') {
|
|
37
|
+
titleBySession.set(event.sessionId, event.payload.title.trim());
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (event.name === 'session.deleted') {
|
|
41
|
+
activeSessions.delete(event.sessionId);
|
|
42
|
+
titleBySession.delete(event.sessionId);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (event.name === 'assistant.message.start') {
|
|
46
|
+
activeSessions.add(event.sessionId);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (event.name === 'session.lifecycle') {
|
|
50
|
+
if (event.payload?.state === 'busy' || event.payload?.state === 'retry') {
|
|
51
|
+
activeSessions.add(event.sessionId);
|
|
52
|
+
} else if (event.payload?.state === 'idle') {
|
|
53
|
+
settle(event, 'completion');
|
|
54
|
+
} else if (event.payload?.state === 'error') {
|
|
55
|
+
settle(event, 'error');
|
|
56
|
+
}
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (event.name === 'session.error') {
|
|
60
|
+
settle(event, 'error');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (event.name === 'session.interrupted') activeSessions.delete(event.sessionId);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
return { accept };
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const createPiNotificationWatcher = ({
|
|
70
|
+
supervisor,
|
|
71
|
+
uiSettingsStore,
|
|
72
|
+
delivery,
|
|
73
|
+
retryMs = 1_000,
|
|
74
|
+
deliveryTimeoutMs = 15_000,
|
|
75
|
+
}) => {
|
|
76
|
+
let stopped = false;
|
|
77
|
+
let closeSubscription = null;
|
|
78
|
+
let retryTimer = null;
|
|
79
|
+
let fromSequence;
|
|
80
|
+
let streamEpoch;
|
|
81
|
+
let deliveryChain = Promise.resolve();
|
|
82
|
+
|
|
83
|
+
const tracker = createPiNotificationTracker({
|
|
84
|
+
emit: (payload) => {
|
|
85
|
+
deliveryChain = deliveryChain.then(async () => {
|
|
86
|
+
const settings = await uiSettingsStore.read();
|
|
87
|
+
if (settings.nativeNotificationsEnabled !== true) return;
|
|
88
|
+
if (payload.data.type === 'completion' && settings.notifyOnCompletion === false) return;
|
|
89
|
+
if (payload.data.type === 'error' && settings.notifyOnError === false) return;
|
|
90
|
+
let timeoutId;
|
|
91
|
+
const timeout = new Promise((_, reject) => {
|
|
92
|
+
timeoutId = setTimeout(() => reject(new Error('Notification delivery timed out')), deliveryTimeoutMs);
|
|
93
|
+
timeoutId.unref?.();
|
|
94
|
+
});
|
|
95
|
+
try {
|
|
96
|
+
await Promise.race([
|
|
97
|
+
delivery.send({
|
|
98
|
+
...payload,
|
|
99
|
+
kind: payload.data.type,
|
|
100
|
+
sessionId: payload.data.sessionId,
|
|
101
|
+
directory: payload.data.directory,
|
|
102
|
+
requireHidden: settings.notificationMode !== 'always',
|
|
103
|
+
}),
|
|
104
|
+
timeout,
|
|
105
|
+
]);
|
|
106
|
+
} finally {
|
|
107
|
+
clearTimeout(timeoutId);
|
|
108
|
+
}
|
|
109
|
+
}).catch((error) => {
|
|
110
|
+
console.warn(`[Notifications] delivery failed: ${error?.message ?? 'unknown error'}`);
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const scheduleReconnect = () => {
|
|
116
|
+
if (stopped || retryTimer) return;
|
|
117
|
+
closeSubscription?.();
|
|
118
|
+
closeSubscription = null;
|
|
119
|
+
retryTimer = setTimeout(() => {
|
|
120
|
+
retryTimer = null;
|
|
121
|
+
void connect();
|
|
122
|
+
}, retryMs);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const connect = async () => {
|
|
126
|
+
if (stopped) return;
|
|
127
|
+
try {
|
|
128
|
+
closeSubscription?.();
|
|
129
|
+
closeSubscription = await supervisor.subscribe({
|
|
130
|
+
...(Number.isSafeInteger(fromSequence) && streamEpoch ? { fromSequence, streamEpoch } : {}),
|
|
131
|
+
onEvent: (event) => {
|
|
132
|
+
if (typeof event.streamEpoch === 'string') streamEpoch = event.streamEpoch;
|
|
133
|
+
if (Number.isSafeInteger(event.sequence)) fromSequence = event.sequence;
|
|
134
|
+
tracker.accept(event);
|
|
135
|
+
},
|
|
136
|
+
onError: scheduleReconnect,
|
|
137
|
+
});
|
|
138
|
+
} catch {
|
|
139
|
+
scheduleReconnect();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
return {
|
|
144
|
+
start: connect,
|
|
145
|
+
stop: async () => {
|
|
146
|
+
stopped = true;
|
|
147
|
+
if (retryTimer) clearTimeout(retryTimer);
|
|
148
|
+
retryTimer = null;
|
|
149
|
+
closeSubscription?.();
|
|
150
|
+
closeSubscription = null;
|
|
151
|
+
await deliveryChain;
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import { createPiNotificationTracker, createPiNotificationWatcher } from './pi-notification-watcher.js';
|
|
4
|
+
|
|
5
|
+
const event = (name, sequence, payload = {}, sessionId = 'session-1') => ({
|
|
6
|
+
protocolVersion: 1,
|
|
7
|
+
kind: 'event',
|
|
8
|
+
name,
|
|
9
|
+
sequence,
|
|
10
|
+
streamEpoch: 'epoch-1',
|
|
11
|
+
sessionId,
|
|
12
|
+
directory: '/repo',
|
|
13
|
+
payload,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
describe('Pi notification tracker', () => {
|
|
17
|
+
it('notifies once when active work completes', () => {
|
|
18
|
+
const notifications = [];
|
|
19
|
+
const tracker = createPiNotificationTracker({ emit: (payload) => notifications.push(payload) });
|
|
20
|
+
|
|
21
|
+
tracker.accept(event('session.lifecycle', 1, { state: 'busy' }));
|
|
22
|
+
tracker.accept(event('assistant.message.start', 2, { messageId: 'm1' }));
|
|
23
|
+
tracker.accept(event('session.lifecycle', 3, { state: 'idle' }));
|
|
24
|
+
tracker.accept(event('session.lifecycle', 4, { state: 'idle' }));
|
|
25
|
+
|
|
26
|
+
expect(notifications).toEqual([expect.objectContaining({
|
|
27
|
+
title: 'Work completed',
|
|
28
|
+
tag: 'pichamber:completion:session-1:3',
|
|
29
|
+
})]);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('collapses message and lifecycle error boundaries into one notification', () => {
|
|
33
|
+
const notifications = [];
|
|
34
|
+
const tracker = createPiNotificationTracker({ emit: (payload) => notifications.push(payload) });
|
|
35
|
+
|
|
36
|
+
tracker.accept(event('session.lifecycle', 1, { state: 'busy' }));
|
|
37
|
+
tracker.accept(event('session.error', 2, { code: 'ASSISTANT_ERROR', message: 'limit reached' }));
|
|
38
|
+
tracker.accept(event('session.lifecycle', 3, { state: 'error' }));
|
|
39
|
+
|
|
40
|
+
expect(notifications).toHaveLength(1);
|
|
41
|
+
expect(notifications[0]).toEqual(expect.objectContaining({
|
|
42
|
+
title: 'Work failed',
|
|
43
|
+
tag: 'pichamber:error:session-1:2',
|
|
44
|
+
}));
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('does not notify for interrupted work or settled bootstrap snapshots', () => {
|
|
48
|
+
const notifications = [];
|
|
49
|
+
const tracker = createPiNotificationTracker({ emit: (payload) => notifications.push(payload) });
|
|
50
|
+
|
|
51
|
+
tracker.accept(event('session.snapshot', 1, { snapshot: { lifecycle: 'idle', isStreaming: false } }));
|
|
52
|
+
tracker.accept(event('session.lifecycle', 2, { state: 'busy' }));
|
|
53
|
+
tracker.accept(event('session.interrupted', 3, { reason: 'user-abort', streaming: true }));
|
|
54
|
+
tracker.accept(event('session.lifecycle', 4, { state: 'idle' }));
|
|
55
|
+
|
|
56
|
+
expect(notifications).toEqual([]);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('closes a failed subscription before reconnecting', async () => {
|
|
60
|
+
const closes = [];
|
|
61
|
+
const subscriptions = [];
|
|
62
|
+
const supervisor = {
|
|
63
|
+
subscribe: async (options) => {
|
|
64
|
+
subscriptions.push(options);
|
|
65
|
+
const close = () => closes.push(subscriptions.length);
|
|
66
|
+
return close;
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
const watcher = createPiNotificationWatcher({
|
|
70
|
+
supervisor,
|
|
71
|
+
uiSettingsStore: { read: async () => ({}) },
|
|
72
|
+
delivery: { send: async () => undefined },
|
|
73
|
+
retryMs: 1,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
await watcher.start();
|
|
77
|
+
subscriptions[0].onError(new Error('disconnected'));
|
|
78
|
+
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
79
|
+
|
|
80
|
+
expect(subscriptions).toHaveLength(2);
|
|
81
|
+
expect(closes).toEqual([1]);
|
|
82
|
+
await watcher.stop();
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
const text = (value, maxLength) => {
|
|
2
|
+
if (typeof value !== 'string') return '';
|
|
3
|
+
const trimmed = value.trim();
|
|
4
|
+
return trimmed.length > 0 && trimmed.length <= maxLength ? trimmed : '';
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const registerNotificationRoutes = (app, { uiAuthController, delivery }) => {
|
|
8
|
+
const clientId = (req, res) => uiAuthController.ensureSessionToken(req, res);
|
|
9
|
+
|
|
10
|
+
app.get('/api/push/vapid-public-key', async (_req, res) => {
|
|
11
|
+
try {
|
|
12
|
+
const keys = await delivery.getOrCreateVapidKeys();
|
|
13
|
+
res.json({ publicKey: keys.publicKey });
|
|
14
|
+
} catch {
|
|
15
|
+
res.status(500).json({ error: 'Push notifications are unavailable' });
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
app.post('/api/push/subscribe', async (req, res) => {
|
|
20
|
+
const id = await clientId(req, res);
|
|
21
|
+
if (!id) return;
|
|
22
|
+
const endpoint = text(req.body?.endpoint, 4096);
|
|
23
|
+
const p256dh = text(req.body?.keys?.p256dh, 1024);
|
|
24
|
+
const auth = text(req.body?.keys?.auth, 1024);
|
|
25
|
+
if (!endpoint || !p256dh || !auth) return res.status(400).json({ error: 'Invalid push subscription' });
|
|
26
|
+
await delivery.addWebSubscription(id, {
|
|
27
|
+
endpoint,
|
|
28
|
+
p256dh,
|
|
29
|
+
auth,
|
|
30
|
+
platform: text(req.body?.platform, 32) || undefined,
|
|
31
|
+
});
|
|
32
|
+
res.json({ ok: true });
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
app.delete('/api/push/subscribe', async (req, res) => {
|
|
36
|
+
const id = await clientId(req, res);
|
|
37
|
+
if (!id) return;
|
|
38
|
+
const endpoint = text(req.body?.endpoint, 4096);
|
|
39
|
+
if (!endpoint) return res.status(400).json({ error: 'Invalid push subscription' });
|
|
40
|
+
await delivery.removeWebSubscription(id, endpoint);
|
|
41
|
+
res.json({ ok: true });
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
app.post('/api/push/apns-token', async (req, res) => {
|
|
45
|
+
const id = await clientId(req, res);
|
|
46
|
+
if (!id) return;
|
|
47
|
+
const token = text(req.body?.token, 4096);
|
|
48
|
+
const platform = req.body?.platform === 'android' ? 'android' : 'ios';
|
|
49
|
+
const environment = req.body?.environment === 'sandbox' ? 'sandbox' : 'production';
|
|
50
|
+
if (!token) return res.status(400).json({ error: 'Invalid native push token' });
|
|
51
|
+
try {
|
|
52
|
+
await delivery.addNativeToken(id, { token, platform, environment });
|
|
53
|
+
res.json({ ok: true });
|
|
54
|
+
} catch {
|
|
55
|
+
res.status(502).json({ error: 'Native push registration failed' });
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
app.delete('/api/push/apns-token', async (req, res) => {
|
|
60
|
+
const id = await clientId(req, res);
|
|
61
|
+
if (!id) return;
|
|
62
|
+
const token = text(req.body?.token, 4096);
|
|
63
|
+
if (!token) return res.status(400).json({ error: 'Invalid native push token' });
|
|
64
|
+
await delivery.removeNativeToken(id, token);
|
|
65
|
+
res.json({ ok: true });
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
app.post('/api/push/visibility', async (req, res) => {
|
|
69
|
+
const id = await clientId(req, res);
|
|
70
|
+
if (!id) return;
|
|
71
|
+
delivery.updateVisibility(id, req.body?.visible === true, text(req.body?.platform, 32) || undefined);
|
|
72
|
+
res.json({ ok: true });
|
|
73
|
+
});
|
|
74
|
+
};
|
|
@@ -61,5 +61,6 @@ The 0.84.1 → 0.85.1 upgrade retains the public session runtime/services API an
|
|
|
61
61
|
- `session-daemon-extensions.e2e.test.js` exercises real extension loading, commands, dialogs, GUI projection, reload, and session disposal.
|
|
62
62
|
- `supervisor.test.js` covers authenticated replacement of a daemon from an older PiChamber build. Normal versioned releases must retain that replacement behavior. Same-version, same-path manual dependency replacement is not a release upgrade and requires stopping the old server/daemon before restarting.
|
|
63
63
|
- The SDK CLI bin moved to `dist/bundle/cli.js`; the detached daemon already resolves `package.json`'s `bin.pi` rather than hardcoding the old location.
|
|
64
|
+
- `pi-runtime-smoke.test.js` checks the pinned SDK and foreground backend in real subprocesses with disposable dirs. It checks the SDK import with pinned version parity, bundled `bin.pi --help`, credential-free `rpc get_state` to success, and a credential-free foreground `serve --foreground --api-only` that polls `/api/pi/runtime` to ready and checks parent and daemon `execPath`. It is not provider E2E. It defaults to `process.execPath` and accepts an absolute override in `PICHAMBER_TEST_RUNTIME`. See `packages/web/bin/lib/DOCUMENTATION.md` for runtime rules and CI matrix.
|
|
64
65
|
|
|
65
66
|
The new bundled OpenCode catalog removes `deepseek-v4-flash-free`. SDK remote catalogs still merge additively with bundled models, so this upgrade fixes that stale entry, not general upstream deletion propagation. Explicit user-defined models with the same ID remain supported. Do not clear users' `models.json` or `models-store.json` to apply an upgrade.
|