jinzd-ai-cli 0.1.94 → 0.1.96
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/dist/{chunk-PYJJOWBD.js → chunk-LSM6QYBE.js} +8 -1
- package/dist/{chunk-A56ZRY2B.js → chunk-MKCOC3S6.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/{run-tests-56DD3KFS.js → run-tests-BX2T6JTU.js} +1 -1
- package/dist/{server-4YKTZGGC.js → server-KV423SND.js} +18 -4
- package/dist/web/client/icon-192.png +0 -0
- package/dist/web/client/icon-512.png +0 -0
- package/dist/web/client/icon.svg +22 -0
- package/dist/web/client/index.html +13 -0
- package/dist/web/client/manifest.json +15 -0
- package/dist/web/client/sw.js +83 -0
- package/package.json +1 -1
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
3
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
|
+
}) : x)(function(x) {
|
|
5
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
6
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
+
});
|
|
2
8
|
|
|
3
9
|
// src/tools/builtin/run-tests.ts
|
|
4
10
|
import { execSync } from "child_process";
|
|
@@ -8,7 +14,7 @@ import { platform } from "os";
|
|
|
8
14
|
import chalk from "chalk";
|
|
9
15
|
|
|
10
16
|
// src/core/constants.ts
|
|
11
|
-
var VERSION = "0.1.
|
|
17
|
+
var VERSION = "0.1.96";
|
|
12
18
|
var APP_NAME = "ai-cli";
|
|
13
19
|
var CONFIG_DIR_NAME = ".aicli";
|
|
14
20
|
var CONFIG_FILE_NAME = "config.json";
|
|
@@ -441,6 +447,7 @@ var runTestsTool = {
|
|
|
441
447
|
};
|
|
442
448
|
|
|
443
449
|
export {
|
|
450
|
+
__require,
|
|
444
451
|
VERSION,
|
|
445
452
|
APP_NAME,
|
|
446
453
|
CONFIG_DIR_NAME,
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
theme,
|
|
36
36
|
truncateOutput,
|
|
37
37
|
undoStack
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-MKCOC3S6.js";
|
|
39
39
|
import {
|
|
40
40
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
41
41
|
AUTHOR,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
REPO_URL,
|
|
56
56
|
SKILLS_DIR_NAME,
|
|
57
57
|
VERSION
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-LSM6QYBE.js";
|
|
59
59
|
|
|
60
60
|
// src/index.ts
|
|
61
61
|
import { program } from "commander";
|
|
@@ -1904,7 +1904,7 @@ ${hint}` : "")
|
|
|
1904
1904
|
description: "Run project tests and show structured report",
|
|
1905
1905
|
usage: "/test [command|filter]",
|
|
1906
1906
|
async execute(args, _ctx) {
|
|
1907
|
-
const { executeTests } = await import("./run-tests-
|
|
1907
|
+
const { executeTests } = await import("./run-tests-BX2T6JTU.js");
|
|
1908
1908
|
const argStr = args.join(" ").trim();
|
|
1909
1909
|
let testArgs = {};
|
|
1910
1910
|
if (argStr) {
|
|
@@ -5292,7 +5292,7 @@ program.command("web").description("Start Web UI server with browser-based chat
|
|
|
5292
5292
|
console.error("Error: Invalid port number. Must be between 1 and 65535.");
|
|
5293
5293
|
process.exit(1);
|
|
5294
5294
|
}
|
|
5295
|
-
const { startWebServer } = await import("./server-
|
|
5295
|
+
const { startWebServer } = await import("./server-KV423SND.js");
|
|
5296
5296
|
await startWebServer({ port, host: options.host });
|
|
5297
5297
|
});
|
|
5298
5298
|
program.command("sessions").description("List recent conversation sessions").action(async () => {
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
setupProxy,
|
|
24
24
|
spawnAgentContext,
|
|
25
25
|
truncateOutput
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MKCOC3S6.js";
|
|
27
27
|
import {
|
|
28
28
|
AGENTIC_BEHAVIOR_GUIDELINE,
|
|
29
29
|
CONTEXT_FILE_CANDIDATES,
|
|
@@ -34,8 +34,9 @@ import {
|
|
|
34
34
|
PLAN_MODE_READONLY_TOOLS,
|
|
35
35
|
PLAN_MODE_SYSTEM_ADDON,
|
|
36
36
|
SKILLS_DIR_NAME,
|
|
37
|
-
VERSION
|
|
38
|
-
|
|
37
|
+
VERSION,
|
|
38
|
+
__require
|
|
39
|
+
} from "./chunk-LSM6QYBE.js";
|
|
39
40
|
|
|
40
41
|
// src/web/server.ts
|
|
41
42
|
import express from "express";
|
|
@@ -1560,10 +1561,23 @@ async function startWebServer(options = {}) {
|
|
|
1560
1561
|
let actualPort = port;
|
|
1561
1562
|
const tryListen = (attempt) => {
|
|
1562
1563
|
server.listen(actualPort, host, () => {
|
|
1563
|
-
const url = `http://${host}:${actualPort}`;
|
|
1564
|
+
const url = `http://${host === "0.0.0.0" ? "localhost" : host}:${actualPort}`;
|
|
1564
1565
|
console.log(`
|
|
1565
1566
|
\u{1F310} Web UI ready: ${url}`);
|
|
1566
1567
|
if (actualPort !== port) console.log(` (port ${port} was in use, using ${actualPort})`);
|
|
1568
|
+
if (host === "0.0.0.0" || host === "::") {
|
|
1569
|
+
try {
|
|
1570
|
+
const nets = __require("os").networkInterfaces();
|
|
1571
|
+
for (const name of Object.keys(nets)) {
|
|
1572
|
+
for (const net of nets[name] ?? []) {
|
|
1573
|
+
if (net.family === "IPv4" && !net.internal) {
|
|
1574
|
+
console.log(` \u{1F4F1} LAN access: http://${net.address}:${actualPort}`);
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
} catch {
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1567
1581
|
console.log(` Press Ctrl+C to stop
|
|
1568
1582
|
`);
|
|
1569
1583
|
openBrowser(url);
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
2
|
+
<rect width="512" height="512" rx="96" fill="#1d232a"/>
|
|
3
|
+
<g transform="translate(256,240)">
|
|
4
|
+
<!-- Head -->
|
|
5
|
+
<rect x="-120" y="-100" width="240" height="180" rx="32" fill="#6419e6"/>
|
|
6
|
+
<!-- Eyes -->
|
|
7
|
+
<circle cx="-50" cy="-20" r="28" fill="#fff"/>
|
|
8
|
+
<circle cx="50" cy="-20" r="28" fill="#fff"/>
|
|
9
|
+
<circle cx="-50" cy="-20" r="14" fill="#1d232a"/>
|
|
10
|
+
<circle cx="50" cy="-20" r="14" fill="#1d232a"/>
|
|
11
|
+
<!-- Mouth -->
|
|
12
|
+
<rect x="-40" y="30" width="80" height="12" rx="6" fill="#fff" opacity="0.8"/>
|
|
13
|
+
<!-- Antenna -->
|
|
14
|
+
<line x1="0" y1="-100" x2="0" y2="-140" stroke="#6419e6" stroke-width="8" stroke-linecap="round"/>
|
|
15
|
+
<circle cx="0" cy="-148" r="12" fill="#a855f7"/>
|
|
16
|
+
<!-- Ears -->
|
|
17
|
+
<rect x="-140" y="-60" width="24" height="60" rx="12" fill="#a855f7"/>
|
|
18
|
+
<rect x="116" y="-60" width="24" height="60" rx="12" fill="#a855f7"/>
|
|
19
|
+
</g>
|
|
20
|
+
<!-- Text -->
|
|
21
|
+
<text x="256" y="420" text-anchor="middle" fill="#fff" font-family="system-ui,sans-serif" font-weight="700" font-size="72">ai-cli</text>
|
|
22
|
+
</svg>
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>ai-cli Web UI</title>
|
|
7
|
+
<!-- PWA -->
|
|
8
|
+
<link rel="manifest" href="manifest.json">
|
|
9
|
+
<meta name="theme-color" content="#6419e6">
|
|
10
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
11
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
12
|
+
<link rel="apple-touch-icon" href="icon-192.png">
|
|
13
|
+
<link rel="icon" type="image/svg+xml" href="icon.svg">
|
|
14
|
+
<link rel="icon" type="image/png" sizes="192x192" href="icon-192.png">
|
|
7
15
|
<!-- Tailwind CSS + DaisyUI (CDN) -->
|
|
8
16
|
<link href="https://cdn.jsdelivr.net/npm/daisyui@4.12.23/dist/full.min.css" rel="stylesheet">
|
|
9
17
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
@@ -187,5 +195,10 @@
|
|
|
187
195
|
</dialog>
|
|
188
196
|
|
|
189
197
|
<script src="app.js"></script>
|
|
198
|
+
<script>
|
|
199
|
+
if ('serviceWorker' in navigator) {
|
|
200
|
+
navigator.serviceWorker.register('sw.js').catch(() => {});
|
|
201
|
+
}
|
|
202
|
+
</script>
|
|
190
203
|
</body>
|
|
191
204
|
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ai-cli Web UI",
|
|
3
|
+
"short_name": "ai-cli",
|
|
4
|
+
"description": "Cross-platform AI chat assistant with agentic tool calling",
|
|
5
|
+
"start_url": "/",
|
|
6
|
+
"display": "standalone",
|
|
7
|
+
"background_color": "#1d232a",
|
|
8
|
+
"theme_color": "#6419e6",
|
|
9
|
+
"orientation": "any",
|
|
10
|
+
"icons": [
|
|
11
|
+
{ "src": "icon-192.png", "sizes": "192x192", "type": "image/png" },
|
|
12
|
+
{ "src": "icon-512.png", "sizes": "512x512", "type": "image/png" },
|
|
13
|
+
{ "src": "icon.svg", "sizes": "any", "type": "image/svg+xml" }
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ai-cli PWA Service Worker
|
|
3
|
+
* Caches app shell (HTML/CSS/JS/icons) for fast startup.
|
|
4
|
+
* API calls and WebSocket are always network-first.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const CACHE_NAME = 'aicli-v1';
|
|
8
|
+
|
|
9
|
+
// App shell — files needed for offline-capable startup
|
|
10
|
+
const APP_SHELL = [
|
|
11
|
+
'/',
|
|
12
|
+
'/index.html',
|
|
13
|
+
'/style.css',
|
|
14
|
+
'/app.js',
|
|
15
|
+
'/manifest.json',
|
|
16
|
+
'/icon.svg',
|
|
17
|
+
'/icon-192.png',
|
|
18
|
+
'/icon-512.png',
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
// CDN resources to cache on first use
|
|
22
|
+
const CDN_CACHE = [
|
|
23
|
+
'cdn.jsdelivr.net',
|
|
24
|
+
'cdn.tailwindcss.com',
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
self.addEventListener('install', (event) => {
|
|
28
|
+
event.waitUntil(
|
|
29
|
+
caches.open(CACHE_NAME)
|
|
30
|
+
.then(cache => cache.addAll(APP_SHELL))
|
|
31
|
+
.then(() => self.skipWaiting())
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
self.addEventListener('activate', (event) => {
|
|
36
|
+
event.waitUntil(
|
|
37
|
+
caches.keys().then(keys =>
|
|
38
|
+
Promise.all(keys
|
|
39
|
+
.filter(k => k !== CACHE_NAME)
|
|
40
|
+
.map(k => caches.delete(k))
|
|
41
|
+
)
|
|
42
|
+
).then(() => self.clients.claim())
|
|
43
|
+
);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
self.addEventListener('fetch', (event) => {
|
|
47
|
+
const url = new URL(event.request.url);
|
|
48
|
+
|
|
49
|
+
// Never cache API calls or WebSocket upgrades
|
|
50
|
+
if (url.pathname.startsWith('/api/') || event.request.headers.get('upgrade') === 'websocket') {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// CDN resources: cache-first (they're versioned by URL)
|
|
55
|
+
if (CDN_CACHE.some(host => url.hostname.includes(host))) {
|
|
56
|
+
event.respondWith(
|
|
57
|
+
caches.match(event.request).then(cached => {
|
|
58
|
+
if (cached) return cached;
|
|
59
|
+
return fetch(event.request).then(response => {
|
|
60
|
+
if (response.ok) {
|
|
61
|
+
const clone = response.clone();
|
|
62
|
+
caches.open(CACHE_NAME).then(cache => cache.put(event.request, clone));
|
|
63
|
+
}
|
|
64
|
+
return response;
|
|
65
|
+
});
|
|
66
|
+
})
|
|
67
|
+
);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// App shell: network-first with cache fallback (always get latest from server)
|
|
72
|
+
event.respondWith(
|
|
73
|
+
fetch(event.request)
|
|
74
|
+
.then(response => {
|
|
75
|
+
if (response.ok) {
|
|
76
|
+
const clone = response.clone();
|
|
77
|
+
caches.open(CACHE_NAME).then(cache => cache.put(event.request, clone));
|
|
78
|
+
}
|
|
79
|
+
return response;
|
|
80
|
+
})
|
|
81
|
+
.catch(() => caches.match(event.request))
|
|
82
|
+
);
|
|
83
|
+
});
|