kiku-agent 1.2.0 → 1.3.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 +459 -407
- package/package.json +32 -3
- package/server/agent/agentCore.js +635 -267
- package/server/agent/appPaths.js +2 -0
- package/server/agent/catalogEntityResolver.js +637 -0
- package/server/agent/citations.js +0 -21
- package/server/agent/clarificationAnalytics.js +1 -1
- package/server/agent/clarifyingQuestions.js +286 -216
- package/server/agent/cli.js +532 -73
- package/server/agent/commandFeatures.js +123 -24
- package/server/agent/commandRegistry.js +128 -62
- package/server/agent/commands.js +1410 -95
- package/server/agent/config.js +253 -163
- package/server/agent/contextCompactor.js +239 -25
- package/server/agent/dynamicCatalog.js +192 -0
- package/server/agent/envBootstrap.js +46 -0
- package/server/agent/envManager.js +317 -0
- package/server/agent/eventBus.js +3 -3
- package/server/agent/feedbackLearning.js +0 -8
- package/server/agent/gpuMetrics.js +188 -55
- package/server/agent/ingestionWorker.js +339 -0
- package/server/agent/ink/App.jsx +348 -0
- package/server/agent/ink/Panel.jsx +54 -0
- package/server/agent/ink/PromptInput.jsx +321 -0
- package/server/agent/ink/TaskPlanPanel.jsx +88 -0
- package/server/agent/ink/ThinkingPanel.jsx +68 -0
- package/server/agent/ink/ToolResult.jsx +133 -0
- package/server/agent/ink/main.jsx +195 -0
- package/server/agent/ink/useEventBus.js +218 -0
- package/server/agent/lanDiscovery.js +369 -0
- package/server/agent/llmClient.js +111 -39
- package/server/agent/lmStudioWakeup.js +144 -0
- package/server/agent/mcpClient.js +2 -2
- package/server/agent/memory/contextAllocator.js +214 -0
- package/server/agent/memory/hierarchicalStore.js +523 -0
- package/server/agent/memory/reflectionWorker.js +110 -0
- package/server/agent/memory.js +635 -494
- package/server/agent/modelConfig.js +487 -0
- package/server/agent/newsIntelligence.js +219 -0
- package/server/agent/newsWatch.js +85 -0
- package/server/agent/prompts.js +146 -0
- package/server/agent/publicTools.js +7 -0
- package/server/agent/queryDetails.js +62 -1
- package/server/agent/research.js +314 -35
- package/server/agent/routingInterceptor.js +77 -0
- package/server/agent/rumoredProjects.js +15 -0
- package/server/agent/sanitizer.js +117 -17
- package/server/agent/subagent.js +52 -9
- package/server/agent/suggestionTui.js +33 -13
- package/server/agent/suggestions.js +29 -13
- package/server/agent/telemetry/hardwareTiers.js +332 -0
- package/server/agent/telemetry/runtimeWatchdog.js +66 -0
- package/server/agent/telemetry/techPowerUpClient.js +682 -0
- package/server/agent/telemetry/techpowerup-mcp.json +22 -0
- package/server/agent/telemetry.js +0 -11
- package/server/agent/terminalImage.js +0 -1
- package/server/agent/textToolProtocol.js +190 -0
- package/server/agent/tokenTracker.js +220 -0
- package/server/agent/toolRouter.js +362 -216
- package/server/agent/tools.js +1155 -194
- package/server/agent/ui.js +144 -41
- package/server/agent/vramService.js +572 -0
- package/server/agent/webSearch.js +2279 -273
- package/server/agent/websearch/adapters/duckduckgo.js +97 -0
- package/server/agent/websearch/adapters/jina.js +77 -0
- package/server/agent/websearch/adapters/searxng.js +57 -0
- package/server/agent/websearch/core/canonical.js +89 -0
- package/server/agent/websearch/core/fusion.js +81 -0
- package/server/agent/websearch/core/types.js +29 -0
- package/server/agent/websearch/extract.js +605 -0
- package/server/agent/websearch/index.js +43 -0
- package/server/agent/websearch/orchestrator.js +266 -0
- package/server/agent/websearch/resilience/breaker.js +97 -0
- package/server/agent/websearch/resilience/cache.js +59 -0
- package/server/agent/websearch/resilience/limiter.js +93 -0
- package/server/agent/websearch/security/filter.js +36 -0
- package/server/agent/websearch/security/ssrf.js +289 -0
- package/server/agent/websearch/telemetry.js +71 -0
- package/server/agent/youtubeAuth.js +82 -73
- package/server/agent/youtubeTranscript.js +209 -0
- package/server/apiRouter.js +390 -190
- package/server/mcp/data/brands.js +5 -5
- package/server/mcp/data/discography.js +56 -45
- package/server/mcp/data/gallery.js +9 -0
- package/server/mcp/data/index.js +1 -0
- package/server/mcp/data/industryIndex.js +251 -0
- package/server/mcp/data/profile.js +5 -5
- package/server/mcp/data/timeline.js +2 -2
- package/server/mcp/data/works.js +2 -2
- package/server/mcp/handler.js +0 -2
- package/server/mcp/prompts.js +42 -2
- package/server/mcp/resources.js +5 -1
- package/server/mcp/security.js +25 -14
- package/server/mcp/server.js +92 -3
- package/server/mcp/tools.js +20 -11
- package/server/routes/agent.js +55 -0
- package/server/web-chat/core/connection.js +218 -194
- package/server/web-chat/core/conversationContext.js +1 -1
- package/server/web-chat/core/directCatalogEngine.js +190 -184
- package/server/web-chat/core/followUpEngine.js +88 -11
- package/server/web-chat/core/security.js +7 -4
- package/server/web-chat/router.js +54 -17
- package/server/web-chat/routes/bilibiliRoute.js +34 -0
- package/server/web-chat/routes/chatRoute.js +488 -397
- package/server/web-chat/routes/clarifyConfigRoute.js +1 -2
- package/server/web-chat/routes/exportRoute.js +2 -1
- package/server/web-chat/routes/lanDiscoveryRoute.js +90 -0
- package/server/web-chat/routes/newsRoute.js +36 -6
- package/server/web-chat/routes/providerRoute.js +87 -0
- package/server/web-chat/routes/staticRoute.js +61 -13
- package/server/web-chat/routes/statusRoute.js +23 -2
- package/server/web-chat/routes/vramRoute.js +22 -0
- package/server/web-chat/server.js +135 -106
- package/server/web-chat/ui/htmlBuilder.js +8 -8
- package/server/web-chat/ui/previews/modelSettings.preview.html +41 -0
- package/server/web-chat/ui/scripts/agentBubbleSystem.js +0 -5
- package/server/web-chat/ui/scripts/client.js +10526 -8397
- package/server/web-chat/ui/scripts/webchatI18n.js +190 -138
- package/server/web-chat/ui/styles/main.css +7471 -4246
- package/server/web-chat/ui/templates/body.html +305 -179
- package/src/data/brandsData.js +29 -6
- package/src/data/discographyData.js +918 -900
- package/src/data/galleryData.js +66 -0
- package/src/data/industryIndexData.js +292 -0
- package/src/data/musicVideoData.js +48 -5
- package/src/data/profileData.js +15 -1
- package/src/data/timelineData.js +4 -3
- package/src/data/worksData.js +536 -535
- package/src/lib/vram/estimator.js +464 -0
- package/src/lib/vram/modelRegistry.js +387 -0
- package/tokens.css +33 -2
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { executeTool } from './tools.js';
|
|
2
2
|
import { allowlistedValue, boundedInteger, parseCommandInput } from './commandInput.js';
|
|
3
3
|
import { C, printSolidPanel, sanitizeTerminalText } from './ui.js';
|
|
4
|
+
import { mergeNewsResults, classifyTopics, classifySource } from './newsIntelligence.js';
|
|
5
|
+
import { checkNewsWatch, loadWatchState, saveWatchState, startNewsWatchLoop } from './newsWatch.js';
|
|
6
|
+
import { KIKU_DATA_DIR } from './appPaths.js';
|
|
7
|
+
import path from 'node:path';
|
|
4
8
|
|
|
5
9
|
const ENTITY_TYPES = ['all', 'work', 'song', 'role', 'brand', 'award', 'photo', 'stage'];
|
|
6
10
|
const FAVORITE_TYPES = ENTITY_TYPES.filter(type => type !== 'all');
|
|
@@ -133,6 +137,7 @@ async function handleFind(ctx) {
|
|
|
133
137
|
}
|
|
134
138
|
const entities = await findCatalogEntities(query, { type, year, limit, executeTool: ctx.executeTool });
|
|
135
139
|
const summary = entities.length ? await aiNarration(ctx, {
|
|
140
|
+
label: 'Narrating search results…',
|
|
136
141
|
system: `You are the Kiku catalog guide. In ONE short sentence, tell the user why the top search result matches their query and what to notice about it. ${languageHint(ctx)} Mention only facts present in the data. Never invent facts, dates, or titles. No markdown.`,
|
|
137
142
|
user: JSON.stringify({ query, type, year, results: entities.slice(0, 3).map(e => ({ title: e.title, type: e.type, year: e.year, detail: e.detail })) }),
|
|
138
143
|
limit: 260,
|
|
@@ -151,9 +156,12 @@ export function languageHint(ctx) {
|
|
|
151
156
|
return lang === 'th' ? 'Answer in Thai.' : lang === 'zh' ? 'Answer in Chinese.' : lang === 'en' ? 'Answer in English.' : 'Answer in the same language as the surrounding UI (English is fine).';
|
|
152
157
|
}
|
|
153
158
|
|
|
154
|
-
export async function aiNarration(ctx, { system, user, limit = 400, multiline = false }) {
|
|
159
|
+
export async function aiNarration(ctx, { system, user, limit = 400, multiline = false, label = null }) {
|
|
155
160
|
const client = ctx?.agent?.client;
|
|
156
161
|
if (!client || typeof client.chat !== 'function') return null;
|
|
162
|
+
if (label && typeof ctx?.setIsProcessing === 'function') {
|
|
163
|
+
ctx.setIsProcessing(true, label);
|
|
164
|
+
}
|
|
157
165
|
try {
|
|
158
166
|
const res = await client.chat({
|
|
159
167
|
messages: [
|
|
@@ -177,6 +185,7 @@ export async function aiNarration(ctx, { system, user, limit = 400, multiline =
|
|
|
177
185
|
async function aiDiscoverRationale(ctx, entity, { type, year, mood }) {
|
|
178
186
|
const item = { type, title: entity.title, year: entity.year || year || 'unknown', detail: entity.detail || 'no extra detail' };
|
|
179
187
|
const text = await aiNarration(ctx, {
|
|
188
|
+
label: 'Curating a pick…',
|
|
180
189
|
system: `You are the Kiku fan-curator. Write ONE short, warm, factual sentence explaining why this Ju Jingyi catalog item is a good pick for the requested vibe. ${languageHint(ctx)} Mention only details present in the item. Never invent facts, dates, or titles. Max ~160 characters. Output only the sentence, no quotes, no markdown.`,
|
|
181
190
|
user: JSON.stringify({ mood, year, type, item }),
|
|
182
191
|
limit: 220,
|
|
@@ -266,6 +275,7 @@ async function handleCompare(ctx) {
|
|
|
266
275
|
const a = { title: left.title, type: left.type, year: left.year, fields: comparableFields(left) };
|
|
267
276
|
const b = { title: right.title, type: right.type, year: right.year, fields: comparableFields(right) };
|
|
268
277
|
const aiSummary = await aiNarration(ctx, {
|
|
278
|
+
label: 'Comparing items…',
|
|
269
279
|
system: `You are the Kiku comparisons editor. In ONE short paragraph, summarize how these two Ju Jingyi catalog items differ and what is notable about each. ${languageHint(ctx)} Mention only facts present in the data. Never invent facts, dates, or titles. Do not use markdown.`,
|
|
270
280
|
user: JSON.stringify({ a, b }),
|
|
271
281
|
limit: 420,
|
|
@@ -349,6 +359,7 @@ async function handleFavorites(ctx) {
|
|
|
349
359
|
const poolResults = await Promise.allSettled(types.map(type => findCatalogEntities('', { type, limit: 8, executeTool: ctx.executeTool })));
|
|
350
360
|
const pool = poolResults.flatMap(entry => entry.status === 'fulfilled' ? entry.value.map(e => ({ type: e.type, title: e.title, year: e.year, detail: e.detail })) : []);
|
|
351
361
|
const aiText = await aiNarration(ctx, {
|
|
362
|
+
label: 'Suggesting favorites…',
|
|
352
363
|
system: `You are the Kiku personal curator. Based on the fan's saved favorites, recommend 3 catalog items from the available pool that best match their taste. ${languageHint(ctx)} Reply with a plain list, one per line, format exactly: "<title> — <short reason>". Mention only items present in the pool and only facts present in their detail. Never invent titles or facts. No markdown, no numbering prefix.`,
|
|
353
364
|
user: JSON.stringify({ profile, pool }),
|
|
354
365
|
limit: 220,
|
|
@@ -395,41 +406,129 @@ function detectedDate(item) {
|
|
|
395
406
|
|
|
396
407
|
async function handleNews(ctx) {
|
|
397
408
|
const parsed = parsedRequest(ctx);
|
|
398
|
-
const
|
|
409
|
+
const positionals = parsed.positionals || [];
|
|
410
|
+
const first = String(positionals[0] || '').toLowerCase();
|
|
411
|
+
const daysFlag = boundedInteger(parsed.flags.days, 7, 1, 90);
|
|
412
|
+
const executor = ctx.executeTool || executeTool;
|
|
413
|
+
const watchStatePath = path.join(KIKU_DATA_DIR, 'news-watch-state.json');
|
|
414
|
+
|
|
415
|
+
if (first === 'watch' || first === 'watches' || first === 'check') {
|
|
416
|
+
const topic = positionals.slice(1).join(' ').trim() || 'latest';
|
|
417
|
+
|
|
418
|
+
if (first === 'watches') {
|
|
419
|
+
const watches = typeof ctx.agent?.getJobs === 'function'
|
|
420
|
+
? ctx.agent.getJobs().filter(job => job.type === 'news-watch')
|
|
421
|
+
: [];
|
|
422
|
+
printSolidPanel({
|
|
423
|
+
title: `News Watches • ${watches.length} active`,
|
|
424
|
+
lines: watches.length ? watches.map(jobLine) : [`${C.dim}No active watches. Start one with /news watch <topic>.${C.reset}`],
|
|
425
|
+
});
|
|
426
|
+
return 'HANDLED';
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
const state = loadWatchState(watchStatePath);
|
|
430
|
+
const fetcher = async (t, d) => {
|
|
431
|
+
const res = await executor('search_news', { query: `Ju Jingyi 鞠婧祎 ${t === 'latest' ? 'latest news' : t} when:${d}d`, maxResults: 12 });
|
|
432
|
+
return res?.results || [];
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
if (first === 'check') {
|
|
436
|
+
const delta = await checkNewsWatch({ topic, days: daysFlag, fetcher, state, statePath: watchStatePath });
|
|
437
|
+
saveWatchState(state, watchStatePath);
|
|
438
|
+
printSolidPanel({
|
|
439
|
+
title: `News Check • ${delta.topic} • ${delta.fresh.length} new of ${delta.total}`,
|
|
440
|
+
lines: delta.items.slice(0, 8).map((item, index) => {
|
|
441
|
+
const isNew = delta.fresh.includes(item);
|
|
442
|
+
const mark = isNew ? `${C.emerald}[NEW]${C.reset} ` : `${C.dim}[ ]${C.reset} `;
|
|
443
|
+
const date = item.date ? item.date.toISOString().slice(0, 10) : 'date unverified';
|
|
444
|
+
return `${mark}${C.bold}${C.cyberCyan}${clean(item.title, 110)}${C.reset} ${C.dim}${date}${C.reset}`;
|
|
445
|
+
}),
|
|
446
|
+
});
|
|
447
|
+
return 'HANDLED';
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
const every = boundedInteger(parsed.flags.every, 30, 5, 720);
|
|
451
|
+
const job = typeof ctx.agent?.jobs?.create === 'function'
|
|
452
|
+
? ctx.agent.jobs.create('news-watch', `News watch • ${topic} • every ${every}m`)
|
|
453
|
+
: null;
|
|
454
|
+
if (!job) {
|
|
455
|
+
printSolidPanel({ title: 'News Watch', lines: [`${C.amber}Agent job manager is unavailable in this context.${C.reset}`] });
|
|
456
|
+
return 'HANDLED';
|
|
457
|
+
}
|
|
458
|
+
startNewsWatchLoop({
|
|
459
|
+
topic,
|
|
460
|
+
days: daysFlag,
|
|
461
|
+
intervalMinutes: every,
|
|
462
|
+
fetcher,
|
|
463
|
+
controller: job.controller,
|
|
464
|
+
state,
|
|
465
|
+
statePath: watchStatePath,
|
|
466
|
+
onDelta: delta => {
|
|
467
|
+
console.log(`\n ${C.emerald}[NEWS WATCH] ${delta.topic}: ${delta.fresh.length} new item(s)${C.reset}`);
|
|
468
|
+
for (const item of delta.fresh.slice(0, 5)) {
|
|
469
|
+
console.log(` • ${clean(item.title, 120)} ${C.dim}(${item.date ? item.date.toISOString().slice(0, 10) : 'date unknown'})${C.reset}`);
|
|
470
|
+
}
|
|
471
|
+
console.log('');
|
|
472
|
+
},
|
|
473
|
+
onError: err => console.log(` ${C.amber}[news watch] check failed: ${err.message}${C.reset}`),
|
|
474
|
+
});
|
|
475
|
+
printSolidPanel({
|
|
476
|
+
title: 'News Watch Started',
|
|
477
|
+
lines: [
|
|
478
|
+
`• Topic: ${C.bold}${topic}${C.reset} • every ${every} min • window ${daysFlag}d`,
|
|
479
|
+
`• Job: ${C.dim}${job.id}${C.reset} — cancel with ${C.bold}/jobs cancel ${job.id}${C.reset}`,
|
|
480
|
+
`${C.dim}New items will be printed here automatically as they are detected.${C.reset}`,
|
|
481
|
+
],
|
|
482
|
+
});
|
|
483
|
+
return 'HANDLED';
|
|
484
|
+
}
|
|
485
|
+
|
|
399
486
|
const officialOnly = parsed.flags['official-only'] === true || String(parsed.flags['official-only']).toLowerCase() === 'true';
|
|
400
|
-
const topic =
|
|
487
|
+
const topic = positionals.join(' ').trim();
|
|
401
488
|
const now = new Date();
|
|
402
|
-
const cutoff = new Date(now.getTime() -
|
|
489
|
+
const cutoff = new Date(now.getTime() - daysFlag * 86_400_000);
|
|
403
490
|
cutoff.setUTCHours(0, 0, 0, 0);
|
|
404
491
|
const after = cutoff.toISOString().slice(0, 10);
|
|
405
492
|
const before = new Date(now.getTime() + 86_400_000).toISOString().slice(0, 10);
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
493
|
+
const baseQuery = `Ju Jingyi 鞠婧祎 ${topic || 'latest news'}`;
|
|
494
|
+
|
|
495
|
+
const [newsSettled, webSettled] = await Promise.allSettled([
|
|
496
|
+
executor('search_news', { query: `${baseQuery} when:${daysFlag}d`, maxResults: 12 }),
|
|
497
|
+
executor('web_search', { query: `${baseQuery} after:${after} before:${before}${officialOnly ? ' official studio' : ''}` }),
|
|
498
|
+
]);
|
|
499
|
+
const newsResults = newsSettled.status === 'fulfilled' ? (newsSettled.value?.results || []) : [];
|
|
500
|
+
const webResults = webSettled.status === 'fulfilled' ? (webSettled.value?.results || []) : [];
|
|
501
|
+
const { items } = mergeNewsResults({
|
|
502
|
+
groups: [
|
|
503
|
+
{ name: 'news-rss', results: newsResults },
|
|
504
|
+
{ name: 'web', results: webResults },
|
|
505
|
+
],
|
|
506
|
+
now,
|
|
507
|
+
cutoff,
|
|
508
|
+
officialOnly,
|
|
509
|
+
budget: 10,
|
|
510
|
+
});
|
|
511
|
+
const visible = officialOnly
|
|
512
|
+
? items.filter(item => OFFICIAL_NEWS_SIGNAL.test(`${item.title || ''} ${item.snippet || ''}`))
|
|
513
|
+
: items;
|
|
514
|
+
|
|
515
|
+
const summary = visible.length ? await aiNarration(ctx, {
|
|
516
|
+
label: 'Summarizing news…',
|
|
420
517
|
system: `You are the Kiku news desk. In ONE short paragraph (2-3 sentences), summarize what these Ju Jingyi news results say this week. ${languageHint(ctx)} Synthesize only from the provided items. Never invent facts, dates, or sources. No markdown.`,
|
|
421
|
-
user: JSON.stringify({ topic, items:
|
|
518
|
+
user: JSON.stringify({ topic, items: visible.slice(0, 8).map((item, index) => ({ title: item.title, snippet: item.snippet, source: safeNewsUrl(item.url)?.hostname || item.source })) }),
|
|
422
519
|
limit: 420,
|
|
423
520
|
}) : null;
|
|
424
521
|
printSolidPanel({
|
|
425
|
-
title: `${officialOnly ? 'Official-source ' : ''}News Search • ${
|
|
426
|
-
lines:
|
|
427
|
-
? [...
|
|
522
|
+
title: `${officialOnly ? 'Official-source ' : ''}News Search • ${visible.length} result${visible.length === 1 ? '' : 's'} • requested ${daysFlag}-day window`,
|
|
523
|
+
lines: visible.length
|
|
524
|
+
? [...visible.flatMap((item, index) => {
|
|
428
525
|
const url = safeNewsUrl(item.url);
|
|
429
|
-
const date = detectedDate(item);
|
|
526
|
+
const date = item.date || detectedDate(item);
|
|
527
|
+
const tierTag = `[${(item.tierLabel || 'community').toUpperCase()}]`;
|
|
528
|
+
const topicTags = (item.topics || []).slice(0, 2).join('/');
|
|
430
529
|
return [
|
|
431
530
|
`${C.gold}[${index + 1}]${C.reset} ${C.bold}${C.cyberCyan}${clean(item.title)}${C.reset}`,
|
|
432
|
-
` ${C.dim}${date ? date.toISOString().slice(0, 10) : 'date unavailable • recency unverified'} • ${clean(url?.hostname || item.source || 'source', 100)}${C.reset}`,
|
|
531
|
+
` ${C.dim}${date ? date.toISOString().slice(0, 10) : 'date unavailable • recency unverified'} • ${clean(url?.hostname || item.source || 'source', 100)} • ${tierTag}${topicTags ? ` • ${topicTags}` : ''}${C.reset}`,
|
|
433
532
|
` ${C.white}${clean(item.snippet, 260)}${C.reset}`,
|
|
434
533
|
` ${C.slate}${clean(url?.href || '', 500)}${C.reset}`,
|
|
435
534
|
];
|
|
@@ -11,7 +11,6 @@ export const COMMAND_DEFINITIONS = Object.freeze([
|
|
|
11
11
|
{ name: '/subagent', usage: '/subagent <research task>', desc: 'Run a bounded Ju Jingyi research subagent', insert: '/subagent ' },
|
|
12
12
|
{ name: '/research', usage: '/research <question|status|last|sources|cancel>', desc: 'Run coordinated multi-source Ju Jingyi research', insert: '/research ' },
|
|
13
13
|
{ name: '/verify', usage: '/verify <claim>', desc: 'Verify a Ju Jingyi claim with independent workers', insert: '/verify ' },
|
|
14
|
-
{ name: '/sources', usage: '/sources', desc: 'Show sources from the latest research job', insert: '/sources' },
|
|
15
14
|
{ name: '/debate', usage: '/debate <claim|status|last>', desc: 'Run multi-agent adversarial debate & fact synthesis', insert: '/debate ' },
|
|
16
15
|
{ name: '/timeline', usage: '/timeline [year|era]', desc: 'Render career milestone graphic timeline in terminal', insert: '/timeline ' },
|
|
17
16
|
{ name: '/suggestion', usage: '/suggestion [list|run <id|all>|auto|refresh|topic <name>]', desc: 'Generate AI research suggestions & execute with concurrent subagents', insert: '/suggestion ' },
|
|
@@ -22,18 +21,23 @@ export const COMMAND_DEFINITIONS = Object.freeze([
|
|
|
22
21
|
{ name: '/compare', usage: '/compare <item-a> -- <item-b>', desc: 'Compare catalog entries or career years', insert: '/compare ' },
|
|
23
22
|
{ name: '/favorites', usage: '/favorites [list|add|suggest|remove|export]', desc: 'Manage a persistent fan collection', insert: '/favorites ' },
|
|
24
23
|
{ name: '/news', usage: '/news [topic] [--days N] [--official-only]', desc: 'Find recent source-backed Ju Jingyi news', insert: '/news ' },
|
|
24
|
+
{ name: '/ingest', usage: '/ingest [status|run|add <text>|clear]', desc: 'Manage autonomous knowledge ingestion and dynamic catalog overlay', insert: '/ingest ' },
|
|
25
25
|
{ name: '/jobs', usage: '/jobs [list|show|cancel|clear]', desc: 'Inspect and control tracked agent jobs', insert: '/jobs ' },
|
|
26
26
|
{ name: '/discover', usage: '/discover [drama|song|stage|photo]', desc: 'Discover something from the catalog', insert: '/discover ' },
|
|
27
|
-
{ name: '/stats', usage: '/stats', desc: 'Show
|
|
28
|
-
{ name: '/provider', usage: '/provider [list|use <name> [model]|models [name]|setkey [provider] <key>|info <name>|test|status]', desc: 'Manage AI providers (OpenAI, Gemini, Groq, DeepSeek, OpenRouter
|
|
29
|
-
{ name: '/
|
|
27
|
+
{ name: '/stats', usage: '/stats [overview|tokens]', desc: 'Show catalog overview or session token telemetry', insert: '/stats ' },
|
|
28
|
+
{ name: '/provider', usage: '/provider [list|use <name> [model]|url [provider] [url]|models [name]|setkey [provider] <key>|info <name>|test|status]', desc: 'Manage AI providers and unified API Base URLs (LM Studio, vLLM, OpenAI, Gemini, Groq, DeepSeek, OpenRouter)', insert: '/provider ' },
|
|
29
|
+
{ name: '/lan', usage: '/lan [scan [<cidr|range|ip>,...] [--ports p1,p2]|use <n>|json]', desc: 'Scan the local network (or custom CIDR/ranges) for LM Studio / vLLM / Ollama servers and list their models', insert: '/lan ' },
|
|
30
|
+
{ name: '/model', usage: '/model [status|ping|list|recommend|use <id>|reconnect]', desc: 'Inspect, recommend, or switch active AI model', insert: '/model ' },
|
|
31
|
+
{ name: '/vram', usage: '/vram [check <model>|live|compare|ctx|list|tier] [--ctx <len>] [--quant <type>] [--force]', desc: 'Predictive VRAM analyzer: footprint, live usage, quant/context ladders, hardware tier & pre-flight check', insert: '/vram ' },
|
|
32
|
+
{ name: '/eval', usage: '/eval [ui|dashboard|validate|quick|run|judge|compare|gate|status]', desc: 'Manage evaluation studio, benchmarks, and performance dashboards', insert: '/eval ' },
|
|
33
|
+
{ name: '/hub', usage: '/hub [filter]', desc: 'Show Kiku Master Command Center hub with hardware telemetry & command index', insert: '/hub' },
|
|
34
|
+
{ name: '/portal', usage: '/portal [open|api|chat|eval|status] [port]', desc: 'Inspect or open local portal, REST API docs, Web Chat, or Eval Studio (port 3000)', insert: '/portal ' },
|
|
30
35
|
{ name: '/profile', usage: '/profile [list|use <name>|show <name>|save <name>|delete <name>]', desc: 'Manage configuration profiles (default, fast, deep-reasoning, cloud, gemini)', insert: '/profile ' },
|
|
31
36
|
{ name: '/mcp', usage: '/mcp [status|list|connect <name> <url|cmd>|disconnect <name>|remove <name>|reconnect [all]|save|reload|tools]', desc: 'Manage persistent Model Context Protocol connections', insert: '/mcp ' },
|
|
32
|
-
{ name: '/ping', usage: '/ping', desc: 'Check active model server latency', insert: '/ping' },
|
|
33
37
|
{ name: '/config', usage: '/config', desc: 'Show runtime configuration', insert: '/config' },
|
|
38
|
+
{ name: '/env', usage: '/env [init|set <KEY> <VALUE>|get <KEY>|unset <KEY>|path]', desc: 'Create and manage the local .env file (sets only the necessary values; the rest stays optional)', insert: '/env ' },
|
|
34
39
|
{ name: '/doctor', usage: '/doctor', desc: 'Check first-run environment and optional features', insert: '/doctor' },
|
|
35
40
|
{ name: '/prompt', usage: '/prompt', desc: 'Preview the active system persona', insert: '/prompt' },
|
|
36
|
-
{ name: '/version', usage: '/version', desc: 'Show Kiku Agent version information', insert: '/version' },
|
|
37
41
|
{ name: '/system', usage: '/system', desc: 'Show operating-system and memory information', insert: '/system' },
|
|
38
42
|
{ name: '/gpu', usage: '/gpu [status]', desc: 'Show GPU & VRAM hardware resource metrics', insert: '/gpu' },
|
|
39
43
|
{ name: '/about', usage: '/about', desc: 'Show information about Kiku Agent', insert: '/about' },
|
|
@@ -59,8 +63,7 @@ export const COMMAND_DEFINITIONS = Object.freeze([
|
|
|
59
63
|
{ name: '/search', usage: '/search <query>', desc: 'Search YouTube', insert: '/search ' },
|
|
60
64
|
{ name: '/current', usage: '/current', desc: 'Show the current track', insert: '/current' },
|
|
61
65
|
{ name: '/queue', usage: '/queue [clear]', desc: 'Show or clear the active queue', insert: '/queue ' },
|
|
62
|
-
{ name: '/web', usage: '/web [start|open|stop|status|restart] [port]', desc: 'Start or open the standalone chatbot web app (port
|
|
63
|
-
{ name: '/web-chat', usage: '/web-chat [start|open|stop|status|restart] [port]', desc: 'Start or open the standalone chatbot web app (port 3300)', insert: '/web-chat ' },
|
|
66
|
+
{ name: '/web', usage: '/web [start|open|stop|status|restart] [port]', desc: 'Start or open the standalone chatbot web app (port 3002)', insert: '/web ' },
|
|
64
67
|
{ name: '/login', usage: '/login', desc: 'Connect a YouTube browser session', insert: '/login' },
|
|
65
68
|
{ name: '/ytstatus', usage: '/ytstatus', desc: 'Show YouTube authentication status', insert: '/ytstatus' },
|
|
66
69
|
{ name: '/exit', usage: '/exit', desc: 'Archive the session and quit', insert: '/exit' },
|
|
@@ -73,25 +76,25 @@ export const COMMAND_CATEGORIES = Object.freeze([
|
|
|
73
76
|
id: 'conversation',
|
|
74
77
|
name: 'Conversation & Session',
|
|
75
78
|
icon: '◆',
|
|
76
|
-
commands: ['/help', '/web', '/
|
|
79
|
+
commands: ['/help', '/web', '/session', '/history', '/details', '/copy', '/thinking', '/clear', '/save', '/retry', '/cancel', '/exit'],
|
|
77
80
|
},
|
|
78
81
|
{
|
|
79
82
|
id: 'research',
|
|
80
83
|
name: 'Research & Intelligence',
|
|
81
84
|
icon: '✦',
|
|
82
|
-
commands: ['/research', '/subagent', '/verify', '/debate', '/suggestion', '/
|
|
85
|
+
commands: ['/research', '/subagent', '/verify', '/debate', '/suggestion', '/jobs'],
|
|
83
86
|
},
|
|
84
87
|
{
|
|
85
88
|
id: 'catalog',
|
|
86
89
|
name: 'Catalog, News & Memory',
|
|
87
90
|
icon: '■',
|
|
88
|
-
commands: ['/find', '/compare', '/timeline', '/discover', '/favorites', '/news', '/stats', '/mem', '/skill'],
|
|
91
|
+
commands: ['/find', '/compare', '/timeline', '/discover', '/favorites', '/news', '/ingest', '/stats', '/mem', '/skill'],
|
|
89
92
|
},
|
|
90
93
|
{
|
|
91
94
|
id: 'model',
|
|
92
95
|
name: 'AI Model & MCP Connectivity',
|
|
93
96
|
icon: '●',
|
|
94
|
-
commands: ['/provider', '/model', '/profile', '/mcp', '/
|
|
97
|
+
commands: ['/provider', '/lan', '/model', '/profile', '/mcp', '/prompt', '/config', '/env'],
|
|
95
98
|
},
|
|
96
99
|
{
|
|
97
100
|
id: 'media',
|
|
@@ -103,32 +106,36 @@ export const COMMAND_CATEGORIES = Object.freeze([
|
|
|
103
106
|
id: 'system',
|
|
104
107
|
name: 'System, Theme & Developer Tools',
|
|
105
108
|
icon: '◆',
|
|
106
|
-
commands: ['/doctor', '/system', '/gpu', '/
|
|
109
|
+
commands: ['/doctor', '/system', '/gpu', '/vram', '/eval', '/hub', '/portal', '/theme', '/lang', '/quiz', '/key', '/about', '/tools', '/tool', '/ads'],
|
|
107
110
|
},
|
|
108
111
|
]);
|
|
109
112
|
|
|
110
113
|
export const SUB_COMMANDS = Object.freeze({
|
|
111
|
-
'/help': ['find', 'web', 'provider', 'model', 'session', 'details', 'copy', 'mcp', 'mem', 'research', 'verify', 'suggestion', 'skill', 'theme', 'quiz', 'key', 'play', 'doctor'],
|
|
114
|
+
'/help': ['find', 'web', 'provider', 'model', 'session', 'details', 'copy', 'mcp', 'mem', 'research', 'verify', 'suggestion', 'skill', 'theme', 'quiz', 'key', 'play', 'doctor'],
|
|
112
115
|
'/web': ['start', 'open', 'status', 'stop', 'restart', '3001'],
|
|
113
|
-
'/web-chat': ['start', 'open', 'status', 'stop', 'restart', '3001'],
|
|
114
116
|
'/mem': ['add <fact>', 'search <query>', 'list', 'topics', 'summary', 'del <id>', 'import <path>', 'export', 'clear'],
|
|
115
117
|
'/quiz': ['lang th', 'lang en', 'lang zh'],
|
|
116
118
|
'/key': ['show', 'apply <key>', 'clear'],
|
|
117
119
|
'/subagent': ['<research task>', 'status', 'last'],
|
|
118
|
-
'/research': ['<question>', 'status', 'last', 'sources', 'cancel'],
|
|
120
|
+
'/research': ['<question>', 'status', 'last', 'sources', 'auto on|off|status', 'cancel'],
|
|
119
121
|
'/verify': ['<claim>'],
|
|
120
122
|
'/debate': ['<claim>', 'status', 'last', 'cancel'],
|
|
121
123
|
'/timeline': ['2026', '2024-2026', 'snh48', 'solo', 'studio', 'drama'],
|
|
122
|
-
'/sources': ['show'],
|
|
123
124
|
'/suggestion': ['list', 'run 1', 'run all', 'auto', 'refresh', 'topic drama', 'topic music', 'topic fashion', 'topic 2026'],
|
|
124
125
|
'/skill': ['learn <instruction>', 'list', 'del <id>', 'on', 'off', 'clear'],
|
|
125
126
|
'/find': ['--type work', '--type song', '--type role', '--type brand', '--type award', '--type photo', '--type stage', '--year 2026', '--limit 8'],
|
|
126
127
|
'/compare': ['<item-a> -- <item-b>', '<year-a> -- <year-b>', '--type work', '--type song'],
|
|
127
128
|
'/favorites': ['list', 'list --type work', 'add <query>', 'add song <query>', 'suggest', 'remove <id>', 'export json', 'export markdown'],
|
|
128
129
|
'/news': ['--days 7', '--days 30', '--official-only', '<topic> --days 14'],
|
|
130
|
+
'/ingest': ['status', 'run', 'add <text>', 'clear'],
|
|
129
131
|
'/jobs': ['list', 'show <id>', 'cancel <id>', 'clear'],
|
|
130
132
|
'/discover': ['drama', 'song', 'stage', 'photo', 'song --mood calm', 'stage --year 2025'],
|
|
131
|
-
'/stats': ['overview'],
|
|
133
|
+
'/stats': ['overview', 'tokens', 'session'],
|
|
134
|
+
'/vram': ['check <model_path_or_name> --ctx 8192 --quant q4_k_m', 'live', 'compare --ctx 16384', 'ctx --quant q4_k_m', 'list', 'tier'],
|
|
135
|
+
'/eval': ['ui', 'dashboard', 'validate', 'quick', 'run', 'judge', 'compare', 'gate', 'status'],
|
|
136
|
+
'/hub': ['', '<filter>'],
|
|
137
|
+
'/portal': ['open', 'api', 'chat', 'eval', 'status', '3000'],
|
|
138
|
+
'/env': ['init', 'set <KEY> <VALUE>', 'get <KEY>', 'unset <KEY>', 'path'],
|
|
132
139
|
'/provider': [
|
|
133
140
|
'list',
|
|
134
141
|
'status',
|
|
@@ -167,14 +174,13 @@ export const SUB_COMMANDS = Object.freeze({
|
|
|
167
174
|
'test deepseek',
|
|
168
175
|
'test lmstudio'
|
|
169
176
|
],
|
|
170
|
-
'/model': ['status', 'list', 'recommend', 'use <model-id>', 'reconnect'],
|
|
177
|
+
'/model': ['status', 'ping', 'list', 'recommend', 'use <model-id>', 'reconnect'],
|
|
178
|
+
'/lan': ['scan', 'scan 192.168.0.0/24', 'scan 10.0.0.1-10.0.0.50 --ports 1234,8000', 'use <n>', 'json'],
|
|
171
179
|
'/profile': ['list', 'use default', 'use fast', 'use deep-reasoning', 'use cloud', 'use gemini', 'show default', 'save <name>', 'delete <name>'],
|
|
172
180
|
'/mcp': ['status', 'list', 'tools', 'connect <name> <url>', 'disconnect <name>', 'remove <name>', 'reconnect [all]', 'save', 'reload'],
|
|
173
|
-
'/ping': ['status'],
|
|
174
181
|
'/config': ['status'],
|
|
175
182
|
'/doctor': ['check'],
|
|
176
183
|
'/prompt': ['show'],
|
|
177
|
-
'/version': ['show'],
|
|
178
184
|
'/system': ['info'],
|
|
179
185
|
'/gpu': ['status'],
|
|
180
186
|
'/about': ['info'],
|
|
@@ -221,10 +227,10 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
221
227
|
examples: ['/help', '/help provider', '/help session', '/help research', '/help copy'],
|
|
222
228
|
},
|
|
223
229
|
'/web': {
|
|
224
|
-
summary: 'Launch or manage the dedicated standalone web chatbot on port
|
|
230
|
+
summary: 'Launch or manage the dedicated standalone web chatbot on port 3002',
|
|
225
231
|
usage: '/web [start|open|stop|status|restart] [port]',
|
|
226
232
|
subcommands: [
|
|
227
|
-
{ cmd: 'start [port]', desc: 'Start standalone web chatbot server (default port
|
|
233
|
+
{ cmd: 'start [port]', desc: 'Start standalone web chatbot server (default port 3002) and open browser', example: '/web start' },
|
|
228
234
|
{ cmd: 'open', desc: 'Open current web chatbot URL in default browser', example: '/web open' },
|
|
229
235
|
{ cmd: 'status', desc: 'Check standalone web server running state and port', example: '/web status' },
|
|
230
236
|
{ cmd: 'stop', desc: 'Stop the standalone web chatbot server', example: '/web stop' },
|
|
@@ -232,18 +238,7 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
232
238
|
],
|
|
233
239
|
examples: ['/web', '/web open', '/web status', '/web stop'],
|
|
234
240
|
},
|
|
235
|
-
|
|
236
|
-
summary: 'Launch or manage the dedicated standalone web chatbot on port 3300 (alias for /web)',
|
|
237
|
-
usage: '/web-chat [start|open|stop|status|restart] [port]',
|
|
238
|
-
subcommands: [
|
|
239
|
-
{ cmd: 'start [port]', desc: 'Start standalone web chatbot server (default port 3300) and open browser', example: '/web-chat start' },
|
|
240
|
-
{ cmd: 'open', desc: 'Open current web chatbot URL in default browser', example: '/web-chat open' },
|
|
241
|
-
{ cmd: 'status', desc: 'Check standalone web server running state and port', example: '/web-chat status' },
|
|
242
|
-
{ cmd: 'stop', desc: 'Stop the standalone web chatbot server', example: '/web-chat stop' },
|
|
243
|
-
{ cmd: 'restart', desc: 'Restart the standalone web chatbot server', example: '/web-chat restart' },
|
|
244
|
-
],
|
|
245
|
-
examples: ['/web-chat', '/web-chat open', '/web-chat status', '/web-chat stop'],
|
|
246
|
-
},
|
|
241
|
+
|
|
247
242
|
'/find': {
|
|
248
243
|
summary: 'Search works, songs, roles, brands, awards, photos, and performances without an active chat model',
|
|
249
244
|
usage: '/find <query> [--type <type>] [--year YYYY] [--limit 1-20]',
|
|
@@ -278,14 +273,28 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
278
273
|
examples: ['/favorites add In Blossom', '/favorites suggest', '/favorites list', '/favorites export json'],
|
|
279
274
|
},
|
|
280
275
|
'/news': {
|
|
281
|
-
summary: '
|
|
282
|
-
usage: '/news [topic] [--days 1-90] [--official-only]',
|
|
276
|
+
summary: 'Find, rank, dedupe, and watch recent source-backed Ju Jingyi news (RSS + web fusion with recency ranking, source trust tiers, and topic tags)',
|
|
277
|
+
usage: '/news [topic] [--days 1-90] [--official-only] | watch <topic> [--every M] | check [topic] | watches',
|
|
283
278
|
subcommands: [
|
|
284
|
-
{ cmd: '[topic]', desc: 'Search recent news for an optional topic', example: '/news ซีรีส์ใหม่' },
|
|
279
|
+
{ cmd: '[topic]', desc: 'Search recent news for an optional topic (recency-ranked, cross-language deduped, trust-tiered)', example: '/news ซีรีส์ใหม่' },
|
|
285
280
|
{ cmd: '--days N', desc: 'Set the recent-news window from 1 to 90 days', example: '/news Versace --days 30' },
|
|
286
281
|
{ cmd: '--official-only', desc: 'Keep results from supported official social and media hosts', example: '/news --days 14 --official-only' },
|
|
282
|
+
{ cmd: 'watch <topic>', desc: 'Start a background watch job that polls the topic and prints new items as detected (SimHash delta)', example: '/news watch comeback --every 30' },
|
|
283
|
+
{ cmd: 'check [topic]', desc: 'One-shot delta check against the last watch snapshot', example: '/news check' },
|
|
284
|
+
{ cmd: 'watches', desc: 'List active news watch jobs', example: '/news watches' },
|
|
287
285
|
],
|
|
288
|
-
examples: ['/news', '/news drama --days 7', '/news --official-only'],
|
|
286
|
+
examples: ['/news', '/news drama --days 7', '/news --official-only', '/news watch comeback', '/news check'],
|
|
287
|
+
},
|
|
288
|
+
'/ingest': {
|
|
289
|
+
summary: 'Autonomous knowledge ingestion and dynamic catalog overlay manager',
|
|
290
|
+
usage: '/ingest [status | run [topic] | add <text> | clear]',
|
|
291
|
+
subcommands: [
|
|
292
|
+
{ cmd: 'status', desc: 'Display statistics of dynamic catalog overlay (counts per category)', example: '/ingest status' },
|
|
293
|
+
{ cmd: 'run [topic]', desc: 'Scan and autonomously ingest source-backed news and events for a topic', example: '/ingest run Lafang' },
|
|
294
|
+
{ cmd: 'add <text>', desc: 'Extract and ingest an event or live stream from text directly into dynamic catalog', example: '/ingest add จวีจิ้งอี ไลฟ์สดงานแบรนด์ Lafang' },
|
|
295
|
+
{ cmd: 'clear', desc: 'Clear all dynamic catalog overlay entries', example: '/ingest clear' },
|
|
296
|
+
],
|
|
297
|
+
examples: ['/ingest status', '/ingest run', '/ingest run Lafang', '/ingest add จวีจิ้งอี ไลฟ์สด Douyin', '/ingest clear'],
|
|
289
298
|
},
|
|
290
299
|
'/jobs': {
|
|
291
300
|
summary: 'Inspect, cancel, and clear tracked research, verification, subagent, and suggestion jobs',
|
|
@@ -374,6 +383,17 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
374
383
|
'/provider models',
|
|
375
384
|
],
|
|
376
385
|
},
|
|
386
|
+
'/lan': {
|
|
387
|
+
summary: 'Discover LM Studio / vLLM / Ollama servers on the local network — auto or custom ranges — and switch to them',
|
|
388
|
+
usage: '/lan [scan [<cidr|range|ip>,...] [--ports p1,p2] | use <n> | json]',
|
|
389
|
+
subcommands: [
|
|
390
|
+
{ cmd: 'scan', desc: 'Scan the private subnets of every local interface (plus 127.0.0.1) for OpenAI-compatible LM servers', example: '/lan scan' },
|
|
391
|
+
{ cmd: 'scan <targets>', desc: 'Scan custom ranges: CIDR any prefix, IP range a.b.c.d-e.f.g.h, or single IPs, comma-separated (private ranges only, capped by KIKU_LAN_SCAN_MAX_HOSTS)', example: '/lan scan 192.168.0.0/24, 10.0.0.1-10.0.0.50 --ports 1234,8000' },
|
|
392
|
+
{ cmd: 'use <n>', desc: 'Switch provider/baseUrl to a numbered endpoint from the last scan and connect to its first model', example: '/lan use 1' },
|
|
393
|
+
{ cmd: 'json', desc: 'Print the last scan result as raw JSON', example: '/lan json' },
|
|
394
|
+
],
|
|
395
|
+
examples: ['/lan', '/lan scan 192.168.0.0/24', '/lan scan 10.0.0.1-10.0.0.50 --ports 1234,8000', '/lan use 2', '/lan json'],
|
|
396
|
+
},
|
|
377
397
|
'/key': {
|
|
378
398
|
summary: 'Manage your Developer VIP API Key (earned via /quiz or custom seed)',
|
|
379
399
|
usage: '/key [show | apply <key> | clear]',
|
|
@@ -393,6 +413,7 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
393
413
|
usage: '/model [status | list | recommend | use <model-id> | reconnect]',
|
|
394
414
|
subcommands: [
|
|
395
415
|
{ cmd: 'status', desc: 'Display active model name, provider, latency, and context configuration', example: '/model status' },
|
|
416
|
+
{ cmd: 'ping', desc: 'Ping the active model endpoint and report round-trip latency', example: '/model ping' },
|
|
396
417
|
{ cmd: 'list', desc: 'List models reported by the active provider or local LM Studio instance', example: '/model list' },
|
|
397
418
|
{ cmd: 'use <model-id>', desc: 'Switch active model immediately without restarting the agent', example: '/model use google/gemma-4-e4b' },
|
|
398
419
|
{ cmd: 'recommend', desc: 'Show curated model recommendations optimized for Ju Jingyi knowledge tasks', example: '/model recommend' },
|
|
@@ -414,6 +435,7 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
414
435
|
{ cmd: 'status', desc: 'Check status of running background research workers', example: '/research status' },
|
|
415
436
|
{ cmd: 'last', desc: 'Display synthesized findings from the latest research job', example: '/research last' },
|
|
416
437
|
{ cmd: 'sources', desc: 'List all validated URLs and citations collected during research', example: '/research sources' },
|
|
438
|
+
{ cmd: 'auto on|off|status', desc: 'Control automatic deep research on complex questions (on = aggressive, auto = smart heuristic, off = model decides)', example: '/research auto on' },
|
|
417
439
|
{ cmd: 'cancel', desc: 'Cancel the currently active research job', example: '/research cancel' },
|
|
418
440
|
],
|
|
419
441
|
examples: [
|
|
@@ -433,14 +455,7 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
433
455
|
'/verify Ju Jingyi will star in a new 2026 historical drama',
|
|
434
456
|
],
|
|
435
457
|
},
|
|
436
|
-
|
|
437
|
-
summary: 'Display full citation list, verified URLs, and media links from the most recent research job',
|
|
438
|
-
usage: '/sources',
|
|
439
|
-
subcommands: [
|
|
440
|
-
{ cmd: '', desc: 'Show all citations, reference domains, and validated external sources from the latest research', example: '/sources' },
|
|
441
|
-
],
|
|
442
|
-
examples: ['/sources'],
|
|
443
|
-
},
|
|
458
|
+
|
|
444
459
|
'/quiz': {
|
|
445
460
|
summary: 'Interactive 15-question Ju Jingyi quiz to claim a Developer VIP Key (1,000 req/min)',
|
|
446
461
|
usage: '/quiz [lang <th|en|zh>]',
|
|
@@ -698,20 +713,28 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
698
713
|
},
|
|
699
714
|
'/stats': {
|
|
700
715
|
summary: 'Show comprehensive content metrics, database records, and catalog statistics',
|
|
701
|
-
usage: '/stats',
|
|
716
|
+
usage: '/stats [overview|tokens]',
|
|
702
717
|
subcommands: [
|
|
703
718
|
{ cmd: '', desc: 'Display total counts for dramas, discography, brands, awards, and gallery photos', example: '/stats' },
|
|
719
|
+
{ cmd: 'tokens', desc: 'Session token telemetry: counters, throughput, TTFT and ITL percentiles', example: '/stats tokens' },
|
|
704
720
|
],
|
|
705
|
-
examples: ['/stats'],
|
|
721
|
+
examples: ['/stats', '/stats tokens'],
|
|
706
722
|
},
|
|
707
|
-
'/
|
|
708
|
-
summary: '
|
|
709
|
-
usage: '/
|
|
723
|
+
'/vram': {
|
|
724
|
+
summary: 'Predictive VRAM analyzer: weights, KV cache, activation workspace and runtime overhead against detected GPU memory — plus live usage, quantization and context ladders',
|
|
725
|
+
usage: '/vram [check <model_path_or_name>|live|compare|ctx|list|tier] [--ctx <len>] [--quant <type>] [--force]',
|
|
710
726
|
subcommands: [
|
|
711
|
-
{ cmd: '', desc: '
|
|
727
|
+
{ cmd: '', desc: 'Analyze the currently selected model against detected hardware', example: '/vram' },
|
|
728
|
+
{ cmd: 'check <model_path_or_name>', desc: 'Evaluate a target model/config before loading it', example: '/vram check Qwen2.5-Coder-32B-Instruct-Q4_K_M.gguf --ctx 16384' },
|
|
729
|
+
{ cmd: 'live', desc: 'Show live VRAM usage right now vs. the current model footprint (LM Studio runtime ctx)', example: '/vram live' },
|
|
730
|
+
{ cmd: 'compare', desc: 'Table of every quantization (FP16 to Q2_K) and its feasibility at one context', example: '/vram compare --ctx 16384' },
|
|
731
|
+
{ cmd: 'ctx', desc: 'Context ladder (2k to 262k): how far you can push context at the chosen quant', example: '/vram ctx --quant q4_k_m' },
|
|
732
|
+
{ cmd: 'list', desc: 'List built-in registry architectures with tool/vision/reasoning tags', example: '/vram list' },
|
|
733
|
+
{ cmd: 'tier', desc: 'Inspect GPU hardware tier, memory bus width, and architecture classification', example: '/vram tier' },
|
|
712
734
|
],
|
|
713
|
-
examples: ['/
|
|
735
|
+
examples: ['/vram', '/vram live', '/vram tier', '/vram compare --ctx 16384', '/vram ctx', '/vram check qwen2.5-7b-instruct --ctx 8192 --quant q4_k_m'],
|
|
714
736
|
},
|
|
737
|
+
|
|
715
738
|
'/config': {
|
|
716
739
|
summary: 'Display current runtime configuration, active profile, provider, paths, and environment settings',
|
|
717
740
|
usage: '/config',
|
|
@@ -720,6 +743,19 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
720
743
|
],
|
|
721
744
|
examples: ['/config'],
|
|
722
745
|
},
|
|
746
|
+
'/env': {
|
|
747
|
+
summary: 'Create and manage the local .env file for global npm installs — only necessary values are set, optional ones stay commented',
|
|
748
|
+
usage: '/env [init|set <KEY> <VALUE>|get <KEY>|unset <KEY>|path]',
|
|
749
|
+
subcommands: [
|
|
750
|
+
{ cmd: '', desc: 'Show .env location, LM Studio reachability, and which variables are set (secrets masked)', example: '/env' },
|
|
751
|
+
{ cmd: 'init', desc: 'Interactive wizard: writes .env with necessary values auto-detected from the running LM Studio', example: '/env init' },
|
|
752
|
+
{ cmd: 'set <KEY> <VALUE>', desc: 'Insert or replace one variable, preserving comments', example: '/env set KIKU_CONTEXT_LIMIT 32768' },
|
|
753
|
+
{ cmd: 'get <KEY>', desc: 'Show one variable (API keys/cookies are masked)', example: '/env get LMSTUDIO_BASE_URL' },
|
|
754
|
+
{ cmd: 'unset <KEY>', desc: 'Remove a variable from the file', example: '/env unset KIKU_VRAM_TOTAL_GB' },
|
|
755
|
+
{ cmd: 'path', desc: 'Print the active .env path and the user-level fallback', example: '/env path' },
|
|
756
|
+
],
|
|
757
|
+
examples: ['/env', '/env init', '/env set KIKU_CONTEXT_LIMIT 131072', '/env path'],
|
|
758
|
+
},
|
|
723
759
|
'/profile': {
|
|
724
760
|
summary: 'Manage AI configuration profiles (default, fast, deep-reasoning, cloud, gemini)',
|
|
725
761
|
usage: '/profile [list | use <name> | show <name> | save <name> | delete <name>]',
|
|
@@ -748,14 +784,7 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
748
784
|
],
|
|
749
785
|
examples: ['/prompt'],
|
|
750
786
|
},
|
|
751
|
-
|
|
752
|
-
summary: 'Display installed Kiku Agent release version, build channel, and package metadata',
|
|
753
|
-
usage: '/version',
|
|
754
|
-
subcommands: [
|
|
755
|
-
{ cmd: '', desc: 'Show semantic version, git commit, Node runtime version, and release channel', example: '/version' },
|
|
756
|
-
],
|
|
757
|
-
examples: ['/version'],
|
|
758
|
-
},
|
|
787
|
+
|
|
759
788
|
'/system': {
|
|
760
789
|
summary: 'Display host operating system, CPU architecture, memory usage, and Node process stats',
|
|
761
790
|
usage: '/system',
|
|
@@ -932,6 +961,43 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
932
961
|
],
|
|
933
962
|
examples: ['/exit'],
|
|
934
963
|
},
|
|
964
|
+
'/eval': {
|
|
965
|
+
summary: 'Manage evaluation studio, benchmark suites, and performance validation dashboards',
|
|
966
|
+
usage: '/eval [ui|dashboard|validate|quick|run|judge|compare|gate|status]',
|
|
967
|
+
subcommands: [
|
|
968
|
+
{ cmd: 'ui', desc: 'Launch or open interactive Eval Studio web UI on port 3000 (/eval)', example: '/eval ui' },
|
|
969
|
+
{ cmd: 'dashboard', desc: 'Generate mobile-responsive HTML evaluation report and open in browser', example: '/eval dashboard' },
|
|
970
|
+
{ cmd: 'validate', desc: 'Validate all 500 benchmark cases without running live models', example: '/eval validate' },
|
|
971
|
+
{ cmd: 'quick', desc: 'Run 3-case quick live evaluation smoke test against active model', example: '/eval quick' },
|
|
972
|
+
{ cmd: 'run', desc: 'Run full frozen 500-case evaluation suite', example: '/eval run' },
|
|
973
|
+
{ cmd: 'judge', desc: 'Judge recorded run results against frozen reference ground truth', example: '/eval judge' },
|
|
974
|
+
{ cmd: 'compare', desc: 'Compare candidate evaluation run against baseline run', example: '/eval compare' },
|
|
975
|
+
{ cmd: 'gate', desc: 'Evaluate quality gating metrics against pass/fail threshold', example: '/eval gate' },
|
|
976
|
+
{ cmd: 'status', desc: 'Show latest evaluation runs and recorded report status', example: '/eval status' },
|
|
977
|
+
],
|
|
978
|
+
examples: ['/eval ui', '/eval dashboard', '/eval validate', '/eval quick'],
|
|
979
|
+
},
|
|
980
|
+
'/hub': {
|
|
981
|
+
summary: 'Display Kiku Master Command Center hub with hardware telemetry, system metrics, and command index',
|
|
982
|
+
usage: '/hub [filter]',
|
|
983
|
+
subcommands: [
|
|
984
|
+
{ cmd: '', desc: 'Render full Master Command Center hub dashboard in terminal', example: '/hub' },
|
|
985
|
+
{ cmd: '<filter>', desc: 'Render hub filtering commands by category or keyword', example: '/hub system' },
|
|
986
|
+
],
|
|
987
|
+
examples: ['/hub', '/hub system', '/hub media', '/hub research'],
|
|
988
|
+
},
|
|
989
|
+
'/portal': {
|
|
990
|
+
summary: 'Inspect or open local portal, REST API v1 documentation, Web Chat, or Eval Studio (port 3000)',
|
|
991
|
+
usage: '/portal [open|api|chat|eval|status] [port]',
|
|
992
|
+
subcommands: [
|
|
993
|
+
{ cmd: 'open', desc: 'Open Fan Portal SPA home page in default browser', example: '/portal open' },
|
|
994
|
+
{ cmd: 'api', desc: 'Open REST API v1 interactive documentation (/api-docs)', example: '/portal api' },
|
|
995
|
+
{ cmd: 'chat', desc: 'Open Luxury Web Chat interface (/chat)', example: '/portal chat' },
|
|
996
|
+
{ cmd: 'eval', desc: 'Open Eval Studio dashboard (/eval)', example: '/portal eval' },
|
|
997
|
+
{ cmd: 'status', desc: 'Check Port 3000 in-process dev server status and endpoints', example: '/portal status' },
|
|
998
|
+
],
|
|
999
|
+
examples: ['/portal', '/portal open', '/portal api', '/portal chat', '/portal eval'],
|
|
1000
|
+
},
|
|
935
1001
|
});
|
|
936
1002
|
|
|
937
1003
|
export function findCommandDefinition(name) {
|