agentgui 1.0.947 → 1.0.949
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/.claude/workflows/gui-audit.js +86 -0
- package/AGENTS.md +29 -11
- package/docs/demo.html +27 -27
- package/lib/codec.js +1 -1
- package/lib/http-handler.js +31 -4
- package/lib/process-message.js +1 -1
- package/lib/stream-event-handler.js +3 -3
- package/lib/terminal.js +1 -1
- package/lib/ws-handlers-util.js +9 -0
- package/lib/ws-setup.js +1 -1
- package/package.json +2 -2
- package/scripts/build-rippleui.mjs +5 -5
- package/scripts/capture-screenshots.mjs +3 -3
- package/scripts/copy-vendor.js +1 -1
- package/scripts/harvest-fixtures.mjs +7 -7
- package/scripts/seed-large-conversation.js +2 -2
- package/scripts/smoke-ws-chat.mjs +2 -2
- package/server.js +1 -1
- package/site/app/index.html +25 -19
- package/site/app/js/app.js +224 -76
- package/site/app/js/backend.js +13 -9
- package/site/app/vendor/anentrypoint-design/247420.css +923 -46
- package/site/app/vendor/anentrypoint-design/247420.js +89 -42
- package/site/theme.mjs +1 -1
- package/test.js +27 -11
package/site/theme.mjs
CHANGED
|
@@ -137,7 +137,7 @@ const renderHtml = ({ site, nav, page, clientScript }) => `<!DOCTYPE html>
|
|
|
137
137
|
<head>
|
|
138
138
|
<meta charset="UTF-8" />
|
|
139
139
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
140
|
-
<title>${escapeHtml(page.title || site.title)}${site.tagline ? '
|
|
140
|
+
<title>${escapeHtml(page.title || site.title)}${site.tagline ? ' - ' + escapeHtml(site.tagline) : ''}</title>
|
|
141
141
|
<meta name="description" content="${escapeHtml(page.description || site.description || site.tagline || site.title)}" />
|
|
142
142
|
<script type="importmap">{"imports":{"anentrypoint-design":"${SDK_URL}"}}</script>
|
|
143
143
|
<style>html,body{margin:0;padding:0}body{background:var(--app-bg,#FBF6EB);color:var(--ink,#1F1B16);font-family:var(--ff-ui,'Nunito',system-ui,sans-serif)}</style>
|
package/test.js
CHANGED
|
@@ -3,7 +3,6 @@ import { createRequire } from 'module';
|
|
|
3
3
|
import { initSchema } from './database-schema.js';
|
|
4
4
|
import { migrateConversationColumns } from './database-migrations.js';
|
|
5
5
|
import { migrateACPSchema } from './database-migrations-acp.js';
|
|
6
|
-
import { createQueries } from './lib/db-queries.js';
|
|
7
6
|
import { encode, decode } from './lib/codec.js';
|
|
8
7
|
import { WsRouter } from './lib/ws-protocol.js';
|
|
9
8
|
import { WSOptimizer } from './lib/ws-optimizer.js';
|
|
@@ -13,8 +12,16 @@ import { maskKey, buildSystemPrompt } from './lib/provider-config.js';
|
|
|
13
12
|
import { initializeDescriptors, getAgentDescriptor } from './lib/agent-descriptors.js';
|
|
14
13
|
import { createACPProtocolHandler } from './lib/acp-protocol.js';
|
|
15
14
|
import { sendJSON, compressAndSend, acceptsEncoding } from './lib/http-utils.js';
|
|
16
|
-
import { JsonlParser } from './lib/jsonl-parser.js';
|
|
17
15
|
const require = createRequire(import.meta.url);
|
|
16
|
+
// lib/jsonl-parser.js was also removed in the pivot (ccsniff owns JSONL parsing
|
|
17
|
+
// now). Load it dynamically so its test skips rather than crashing the suite.
|
|
18
|
+
let JsonlParser = null;
|
|
19
|
+
try { ({ JsonlParser } = await import('./lib/jsonl-parser.js')); } catch { JsonlParser = null; }
|
|
20
|
+
// lib/db-queries.js was removed in the 2026-05-19 single-surface pivot (history
|
|
21
|
+
// now flows through ccsniff, not the local query layer). Import it dynamically
|
|
22
|
+
// so its absence skips only the db-queries tests instead of crashing the suite.
|
|
23
|
+
let createQueries = null;
|
|
24
|
+
try { ({ createQueries } = await import('./lib/db-queries.js')); } catch { createQueries = null; }
|
|
18
25
|
let Database, dbAvailable = false;
|
|
19
26
|
try {
|
|
20
27
|
try { Database = (await import('bun:sqlite')).default; }
|
|
@@ -22,11 +29,14 @@ try {
|
|
|
22
29
|
new Database(':memory:');
|
|
23
30
|
dbAvailable = true;
|
|
24
31
|
} catch { dbAvailable = false; }
|
|
25
|
-
let passed = 0, failed = 0;
|
|
32
|
+
let passed = 0, failed = 0, skipped = 0;
|
|
26
33
|
const ok = (name, fn) => Promise.resolve().then(fn).then(
|
|
27
|
-
() => { console.log(`ok
|
|
28
|
-
(err) => { console.error(`FAIL
|
|
29
|
-
|
|
34
|
+
() => { console.log(`ok - ${name}`); passed++; },
|
|
35
|
+
(err) => { console.error(`FAIL - ${name}: ${err.message}`); failed++; });
|
|
36
|
+
// Skip a test when sqlite is unavailable OR when it needs the removed db-queries layer.
|
|
37
|
+
const okDb = (name, fn) => (dbAvailable && createQueries)
|
|
38
|
+
? ok(name, fn)
|
|
39
|
+
: (console.log(`skip (${dbAvailable ? 'no db-queries' : 'no sqlite'}) - ${name}`), skipped++, Promise.resolve());
|
|
30
40
|
function inMemDb() {
|
|
31
41
|
const db = new Database(':memory:');
|
|
32
42
|
if (db.pragma) db.pragma('foreign_keys = ON'); else db.run('PRAGMA foreign_keys = ON');
|
|
@@ -43,11 +53,17 @@ function mockRes() {
|
|
|
43
53
|
return r;
|
|
44
54
|
}
|
|
45
55
|
const run = async () => {
|
|
46
|
-
await ok('codec: roundtrip +
|
|
56
|
+
await ok('codec: json roundtrip + wire-byte decode', () => {
|
|
57
|
+
// The codec is a plain-JSON text codec (encode = JSON.stringify); it does not
|
|
58
|
+
// preserve binary payloads (a Buffer is not JSON-native), so we assert the
|
|
59
|
+
// JSON-value contract plus decode()'s ability to read a Uint8Array wire frame.
|
|
47
60
|
assert.deepEqual(decode(encode({ a: 1, b: 'str', c: [1, 2, 3], d: { nested: true } })), { a: 1, b: 'str', c: [1, 2, 3], d: { nested: true } });
|
|
48
|
-
|
|
61
|
+
// decode() must accept an incoming Uint8Array/Buffer wire frame and parse it.
|
|
62
|
+
const wire = new TextEncoder().encode(encode({ ok: true, n: 5 }));
|
|
63
|
+
assert.deepEqual(decode(wire), { ok: true, n: 5 });
|
|
64
|
+
assert.deepEqual(decode(Buffer.from(encode({ z: 'y' }))), { z: 'y' });
|
|
49
65
|
});
|
|
50
|
-
await
|
|
66
|
+
await (dbAvailable ? ok : (n) => (console.log(`skip (no sqlite) - ${n}`), skipped++, Promise.resolve()))('db: init schema creates conversations table', () => {
|
|
51
67
|
assert.ok(inMemDb().db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='conversations'").get());
|
|
52
68
|
});
|
|
53
69
|
await okDb('db-queries: createConversation round-trip', () => {
|
|
@@ -157,7 +173,7 @@ await ok('http-utils: sendJSON + compressAndSend size threshold', () => {
|
|
|
157
173
|
const big = mockRes(); compressAndSend(req, big, 200, 'text/plain', 'x'.repeat(2000)); assert.equal(big.headers['Content-Encoding'], 'gzip');
|
|
158
174
|
const ng = mockRes(); compressAndSend({ headers: {} }, ng, 200, 'text/html', 'y'.repeat(2000)); assert.equal(ng.headers['Cache-Control'], 'no-store');
|
|
159
175
|
});
|
|
160
|
-
await ok('jsonl-parser: register + remove + clear', () => {
|
|
176
|
+
await (JsonlParser ? ok : (n) => (console.log(`skip (no jsonl-parser) - ${n}`), skipped++, Promise.resolve()))('jsonl-parser: register + remove + clear', () => {
|
|
161
177
|
const p = new JsonlParser({ broadcastSync: () => {}, queries: { getConversationByClaudeSessionId: () => null } });
|
|
162
178
|
p.registerSession('s1', 'c1', 'd1'); assert.equal(p._convMap.get('s1'), 'c1');
|
|
163
179
|
p.removeSid('s1'); assert.equal(p._convMap.has('s1'), false);
|
|
@@ -195,6 +211,6 @@ await okDb('conv-routes+thread-routes+auth-config+util-routes', async () => {
|
|
|
195
211
|
const vr = mr(); await uR['GET /api/version'](null, vr); assert.equal(vr.statusCode, 200);
|
|
196
212
|
const fr = mr(); await uR['POST /api/folders']({ _b: { path: process.cwd() } }, fr); assert.equal(fr.statusCode, 200); assert.ok(Array.isArray(JSON.parse(fr.body).folders));
|
|
197
213
|
});
|
|
198
|
-
console.log(`\n${passed} passed, ${failed} failed`);
|
|
214
|
+
console.log(`\n${passed} passed, ${failed} failed, ${skipped} skipped`);
|
|
199
215
|
process.exit(failed === 0 ? 0 : 1);
|
|
200
216
|
}; run();
|