kiku-agent 1.0.7 → 1.0.9
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/LICENSE +621 -0
- package/README.md +296 -14
- package/package.json +95 -92
- package/server/agent/agentCore.js +58 -31
- package/server/agent/cli.js +79 -43
- package/server/agent/commandFeatures.js +517 -0
- package/server/agent/commandInput.js +113 -0
- package/server/agent/commandRegistry.js +122 -8
- package/server/agent/commands.js +403 -28
- package/server/agent/jobManager.js +96 -0
- package/server/agent/mcpClient.js +68 -11
- package/server/agent/memory.js +87 -14
- package/server/agent/quizData.js +384 -0
- package/server/agent/terminalImage.js +248 -0
- package/server/agent/tools.js +153 -43
- package/server/agent/ui.js +67 -21
- package/server/agent/updateManager.js +21 -3
- package/src/assets/images/0040jbadgy1id6amcqte3j62c0340qv602.jpg +0 -0
- package/src/assets/images/0040jbadly8icq3if7twwj60qy0qy0uc02.jpg +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export const COMMAND_DEFINITIONS = Object.freeze([
|
|
2
2
|
{ name: '/help', usage: '/help [command]', desc: 'Show all commands or details for one command', insert: '/help ' },
|
|
3
|
-
{ name: '/history', usage: '/history [n|search|clear]', desc: 'View or
|
|
4
|
-
{ name: '/session', usage: '/session [info|list|export|clear]', desc: 'Manage the current session', insert: '/session ' },
|
|
3
|
+
{ name: '/history', usage: '/history [n|search|summary|clear]', desc: 'View, search, or summarize chat history', insert: '/history ' },
|
|
4
|
+
{ name: '/session', usage: '/session [info|summary|list|export|clear]', desc: 'Manage or summarize the current session', insert: '/session ' },
|
|
5
5
|
{ name: '/thinking', usage: '/thinking [show|hide|toggle]', desc: 'Control reasoning visibility', insert: '/thinking ' },
|
|
6
6
|
{ name: '/details', usage: '/details [Qn] [overview|answer|thinking|tools|tool n]', desc: 'Inspect query diagnostics (F2 opens latest overview)', insert: '/details ' },
|
|
7
7
|
{ name: '/copy', usage: '/copy [Qn] [answer|thinking|tools|tool n|all|markdown]', desc: 'Copy full untruncated model answer, thinking, or diagnostics to clipboard', insert: '/copy ' },
|
|
8
8
|
{ name: '/lang', usage: '/lang [th|zh|en|auto]', desc: 'Set the response language', insert: '/lang ' },
|
|
9
9
|
{ name: '/theme', usage: '/theme [name|list|current|reset]', desc: 'View or change the terminal color theme', insert: '/theme ' },
|
|
10
|
-
{ name: '/mem', usage: '/mem [add|del|search|list|topics|import|export|clear]', desc: 'Manage long-term memory', insert: '/mem ' },
|
|
10
|
+
{ name: '/mem', usage: '/mem [add|del|search|list|topics|summary|import|export|clear]', desc: 'Manage and summarize long-term memory', insert: '/mem ' },
|
|
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 ' },
|
|
@@ -16,6 +16,12 @@ export const COMMAND_DEFINITIONS = Object.freeze([
|
|
|
16
16
|
{ name: '/skill', usage: '/skill [learn|list|del|on|off|clear]', desc: 'Teach Kiku how to answer for you', insert: '/skill ' },
|
|
17
17
|
{ name: '/tool', usage: '/tool <name> [args]', desc: 'Execute a registered tool directly', insert: '/tool ' },
|
|
18
18
|
{ name: '/tools', usage: '/tools [filter]', desc: 'List registered tools', insert: '/tools ' },
|
|
19
|
+
{ name: '/find', usage: '/find <query> [--type <type>] [--year YYYY]', desc: 'Search every Ju Jingyi catalog', insert: '/find ' },
|
|
20
|
+
{ name: '/compare', usage: '/compare <item-a> -- <item-b>', desc: 'Compare catalog entries or career years', insert: '/compare ' },
|
|
21
|
+
{ name: '/favorites', usage: '/favorites [list|add|suggest|remove|export]', desc: 'Manage a persistent fan collection', insert: '/favorites ' },
|
|
22
|
+
{ name: '/news', usage: '/news [topic] [--days N] [--official-only]', desc: 'Find recent source-backed Ju Jingyi news', insert: '/news ' },
|
|
23
|
+
{ name: '/jobs', usage: '/jobs [list|show|cancel|clear]', desc: 'Inspect and control tracked agent jobs', insert: '/jobs ' },
|
|
24
|
+
{ name: '/discover', usage: '/discover [drama|song|stage|photo]', desc: 'Discover something from the catalog', insert: '/discover ' },
|
|
19
25
|
{ name: '/stats', usage: '/stats', desc: 'Show the content database overview', insert: '/stats' },
|
|
20
26
|
{ name: '/provider', usage: '/provider [list|use <name> [model]|models [name]|info <name>|test|setkey <key>|status]', desc: 'Manage AI providers (OpenAI, Gemini, Groq, DeepSeek, OpenRouter, LM Studio)', insert: '/provider ' },
|
|
21
27
|
{ name: '/model', usage: '/model [status|list|recommend|use <id>|reconnect]', desc: 'Inspect, recommend, or switch active AI model', insert: '/model ' },
|
|
@@ -29,7 +35,10 @@ export const COMMAND_DEFINITIONS = Object.freeze([
|
|
|
29
35
|
{ name: '/system', usage: '/system', desc: 'Show operating-system and memory information', insert: '/system' },
|
|
30
36
|
{ name: '/gpu', usage: '/gpu [status]', desc: 'Show GPU & VRAM hardware resource metrics', insert: '/gpu' },
|
|
31
37
|
{ name: '/about', usage: '/about', desc: 'Show information about Kiku Agent', insert: '/about' },
|
|
38
|
+
{ name: '/quiz', usage: '/quiz [lang]', desc: 'Take the 15-question Ju Jingyi quiz to claim a Developer VIP Key', insert: '/quiz ' },
|
|
39
|
+
{ name: '/key', usage: '/key [show|apply <key>|clear]', desc: 'Manage your Developer VIP API Key', insert: '/key ' },
|
|
32
40
|
{ name: '/ads', usage: '/ads', desc: 'Show the next sponsor card', insert: '/ads' },
|
|
41
|
+
{ name: '/gallery', usage: '/gallery', desc: 'Show the next Ju Jingyi image in the terminal', insert: '/gallery' },
|
|
33
42
|
{ name: '/retry', usage: '/retry', desc: 'Retry the previous query', insert: '/retry' },
|
|
34
43
|
{ name: '/cancel', usage: '/cancel', desc: 'Abort the currently running query, tool, or subagent task', insert: '/cancel' },
|
|
35
44
|
{ name: '/clear', usage: '/clear', desc: 'Archive the session and clear the screen', insert: '/clear' },
|
|
@@ -56,12 +65,20 @@ export const COMMAND_DEFINITIONS = Object.freeze([
|
|
|
56
65
|
export const COMMAND_NAMES = Object.freeze(COMMAND_DEFINITIONS.map(command => command.name));
|
|
57
66
|
|
|
58
67
|
export const SUB_COMMANDS = Object.freeze({
|
|
59
|
-
'/mem': ['add <fact>', 'search <query>', 'list', 'topics', 'del <id>', 'import <path>', 'export', 'clear'],
|
|
68
|
+
'/mem': ['add <fact>', 'search <query>', 'list', 'topics', 'summary', 'del <id>', 'import <path>', 'export', 'clear'],
|
|
69
|
+
'/quiz': ['lang th', 'lang en', 'lang zh'],
|
|
70
|
+
'/key': ['show', 'apply <key>', 'clear'],
|
|
60
71
|
'/subagent': ['<research task>'],
|
|
61
72
|
'/research': ['<question>', 'status', 'last', 'sources', 'cancel'],
|
|
62
73
|
'/verify': ['<claim>'],
|
|
63
74
|
'/suggestion': ['list', 'run 1', 'run all', 'auto', 'refresh', 'topic drama', 'topic music', 'topic fashion', 'topic 2026'],
|
|
64
75
|
'/skill': ['learn <instruction>', 'list', 'del <id>', 'on', 'off', 'clear'],
|
|
76
|
+
'/find': ['--type work', '--type song', '--type role', '--type brand', '--type award', '--type photo', '--type stage', '--year 2026', '--limit 8'],
|
|
77
|
+
'/compare': ['<item-a> -- <item-b>', '<year-a> -- <year-b>', '--type work', '--type song'],
|
|
78
|
+
'/favorites': ['list', 'list --type work', 'add <query>', 'add song <query>', 'suggest', 'remove <id>', 'export json', 'export markdown'],
|
|
79
|
+
'/news': ['--days 7', '--days 30', '--official-only', '<topic> --days 14'],
|
|
80
|
+
'/jobs': ['list', 'show <id>', 'cancel <id>', 'clear'],
|
|
81
|
+
'/discover': ['drama', 'song', 'stage', 'photo', 'song --mood calm', 'stage --year 2025'],
|
|
65
82
|
'/provider': ['list', 'status', 'models', 'models openai', 'models gemini', 'models groq', 'models deepseek', 'models openrouter', 'models lmstudio', 'use openai', 'use openrouter', 'use groq', 'use deepseek', 'use gemini', 'use lmstudio', 'use custom', 'info', 'test', 'setkey <key>'],
|
|
66
83
|
'/model': ['status', 'list', 'recommend', 'use <model-id>', 'reconnect'],
|
|
67
84
|
'/mcp': ['status', 'list', 'tools', 'connect <name> <url>', 'disconnect <name>', 'remove <name>', 'reconnect [all]', 'save', 'reload'],
|
|
@@ -70,13 +87,77 @@ export const SUB_COMMANDS = Object.freeze({
|
|
|
70
87
|
'/thinking': ['show', 'hide', 'toggle'],
|
|
71
88
|
'/details': ['latest', 'overview', 'answer', 'thinking', 'tools', 'tool <n>', 'all', 'markdown', 'Q1 overview', 'Q1 tool 1'],
|
|
72
89
|
'/copy': ['answer', 'thinking', 'tools', 'tool 1', 'overview', 'all', 'markdown', 'Q1 answer', 'Q1 thinking', 'Q1 all'],
|
|
73
|
-
'/session': ['info', 'list', 'export', 'clear'],
|
|
74
|
-
'/history': ['10', '20', '50', 'search <query>', 'clear'],
|
|
90
|
+
'/session': ['info', 'summary', 'list', 'export', 'clear'],
|
|
91
|
+
'/history': ['10', '20', '50', 'search <query>', 'summary', 'clear'],
|
|
75
92
|
'/queue': ['clear'],
|
|
76
93
|
'/update': ['check', 'install', 'install next', 'install canary', 'channel', 'channel latest', 'channel next', 'channel canary', 'rollback', 'help'],
|
|
77
94
|
});
|
|
78
95
|
|
|
79
96
|
export const COMMAND_DETAILS = Object.freeze({
|
|
97
|
+
'/find': {
|
|
98
|
+
summary: 'Search works, songs, roles, brands, awards, photos, and performances without an active chat model',
|
|
99
|
+
usage: '/find <query> [--type <type>] [--year YYYY] [--limit 1-20]',
|
|
100
|
+
subcommands: [
|
|
101
|
+
{ cmd: '<query>', desc: 'Search all supported catalog types', example: '/find In Blossom' },
|
|
102
|
+
{ cmd: '--type <type>', desc: 'Limit results to work, song, role, brand, award, photo, or stage', example: '/find Rain Love --type song' },
|
|
103
|
+
{ cmd: '--year YYYY', desc: 'Limit results to one catalog year', example: '/find --type work --year 2025' },
|
|
104
|
+
{ cmd: '--limit N', desc: 'Return between 1 and 20 results', example: '/find จวีจิ้งอี --limit 12' },
|
|
105
|
+
],
|
|
106
|
+
examples: ['/find In Blossom', '/find Versace --type brand', '/find --type work --year 2026'],
|
|
107
|
+
},
|
|
108
|
+
'/compare': {
|
|
109
|
+
summary: 'Compare two catalog entries or summarize two career years side by side',
|
|
110
|
+
usage: '/compare <item-a> -- <item-b> [--type <type>]',
|
|
111
|
+
subcommands: [
|
|
112
|
+
{ cmd: '<item-a> -- <item-b>', desc: 'Resolve and compare two catalog entries', example: '/compare In Blossom -- Beauty of Resilience' },
|
|
113
|
+
{ cmd: '<year-a> -- <year-b>', desc: 'Compare catalog activity across two years', example: '/compare 2024 -- 2025' },
|
|
114
|
+
{ cmd: '--type <type>', desc: 'Resolve both items within one catalog type', example: '/compare Rain Love -- Moonlight --type song' },
|
|
115
|
+
],
|
|
116
|
+
examples: ['/compare In Blossom -- Beauty of Resilience', '/compare 2024 -- 2025'],
|
|
117
|
+
},
|
|
118
|
+
'/favorites': {
|
|
119
|
+
summary: 'Build and export a persistent personal collection of Ju Jingyi content with AI suggestions',
|
|
120
|
+
usage: '/favorites [list | add [type] <query> | suggest | remove <id> | export <json|markdown>]',
|
|
121
|
+
subcommands: [
|
|
122
|
+
{ cmd: 'list [--type <type>]', desc: 'List every favorite or filter by catalog type', example: '/favorites list --type song' },
|
|
123
|
+
{ cmd: 'add [type] <query>', desc: 'Resolve a catalog entry and save it', example: '/favorites add song Rain Love' },
|
|
124
|
+
{ cmd: 'suggest', desc: 'Synthesize AI recommendations based on your saved favorites', example: '/favorites suggest' },
|
|
125
|
+
{ cmd: 'remove <id>', desc: 'Remove one favorite by its displayed ID', example: '/favorites remove fav_123_abc' },
|
|
126
|
+
{ cmd: 'export <json|markdown>', desc: 'Export favorites to the protected Kiku exports directory', example: '/favorites export markdown' },
|
|
127
|
+
],
|
|
128
|
+
examples: ['/favorites add In Blossom', '/favorites suggest', '/favorites list', '/favorites export json'],
|
|
129
|
+
},
|
|
130
|
+
'/news': {
|
|
131
|
+
summary: 'Search recent Ju Jingyi coverage and display source URLs with available dates',
|
|
132
|
+
usage: '/news [topic] [--days 1-90] [--official-only]',
|
|
133
|
+
subcommands: [
|
|
134
|
+
{ cmd: '[topic]', desc: 'Search recent news for an optional topic', example: '/news ซีรีส์ใหม่' },
|
|
135
|
+
{ cmd: '--days N', desc: 'Set the recent-news window from 1 to 90 days', example: '/news Versace --days 30' },
|
|
136
|
+
{ cmd: '--official-only', desc: 'Keep results from supported official social and media hosts', example: '/news --days 14 --official-only' },
|
|
137
|
+
],
|
|
138
|
+
examples: ['/news', '/news drama --days 7', '/news --official-only'],
|
|
139
|
+
},
|
|
140
|
+
'/jobs': {
|
|
141
|
+
summary: 'Inspect, cancel, and clear tracked research, verification, subagent, and suggestion jobs',
|
|
142
|
+
usage: '/jobs [list | show <id> | cancel <id> | clear]',
|
|
143
|
+
subcommands: [
|
|
144
|
+
{ cmd: 'list', desc: 'List active and recent jobs', example: '/jobs list' },
|
|
145
|
+
{ cmd: 'show <id>', desc: 'Show timestamps, state, and error details for one job', example: '/jobs show job_123_abc' },
|
|
146
|
+
{ cmd: 'cancel <id>', desc: 'Abort one running job', example: '/jobs cancel job_123_abc' },
|
|
147
|
+
{ cmd: 'clear', desc: 'Remove completed, failed, and cancelled jobs', example: '/jobs clear' },
|
|
148
|
+
],
|
|
149
|
+
examples: ['/jobs', '/jobs show job_123_abc', '/jobs cancel job_123_abc'],
|
|
150
|
+
},
|
|
151
|
+
'/discover': {
|
|
152
|
+
summary: 'Pick a catalog recommendation for a drama, song, stage performance, or photo',
|
|
153
|
+
usage: '/discover [drama|song|stage|photo] [--year YYYY] [--mood <mood>]',
|
|
154
|
+
subcommands: [
|
|
155
|
+
{ cmd: 'drama | song | stage | photo', desc: 'Choose the type of recommendation', example: '/discover drama' },
|
|
156
|
+
{ cmd: '--year YYYY', desc: 'Limit discovery to one year', example: '/discover stage --year 2025' },
|
|
157
|
+
{ cmd: '--mood <mood>', desc: 'Use calm, romantic, energetic, dramatic, or any', example: '/discover song --mood calm' },
|
|
158
|
+
],
|
|
159
|
+
examples: ['/discover drama', '/discover song --mood calm', '/discover photo'],
|
|
160
|
+
},
|
|
80
161
|
'/suggestion': {
|
|
81
162
|
summary: 'Generate AI research suggestions & execute with concurrent subagents',
|
|
82
163
|
usage: '/suggestion [list | run <id|ids|all> | auto | topic <name> | refresh]',
|
|
@@ -182,6 +263,35 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
182
263
|
'/verify Ju Jingyi will star in a new 2026 historical drama',
|
|
183
264
|
],
|
|
184
265
|
},
|
|
266
|
+
'/quiz': {
|
|
267
|
+
summary: 'Interactive 15-question Ju Jingyi quiz to claim a Developer VIP Key (1,000 req/min)',
|
|
268
|
+
usage: '/quiz [lang <th|en|zh>]',
|
|
269
|
+
subcommands: [
|
|
270
|
+
{ cmd: '', desc: 'Start the quiz in your current language setting', example: '/quiz' },
|
|
271
|
+
{ cmd: 'lang th', desc: 'Start the quiz in Thai', example: '/quiz lang th' },
|
|
272
|
+
{ cmd: 'lang en', desc: 'Start the quiz in English', example: '/quiz lang en' },
|
|
273
|
+
{ cmd: 'lang zh', desc: 'Start the quiz in Chinese', example: '/quiz lang zh' },
|
|
274
|
+
],
|
|
275
|
+
examples: [
|
|
276
|
+
'/quiz',
|
|
277
|
+
'/quiz lang th',
|
|
278
|
+
'/quiz lang en',
|
|
279
|
+
],
|
|
280
|
+
},
|
|
281
|
+
'/key': {
|
|
282
|
+
summary: 'View, apply, or clear your Developer VIP API Key',
|
|
283
|
+
usage: '/key [show | apply <key> | clear]',
|
|
284
|
+
subcommands: [
|
|
285
|
+
{ cmd: 'show', desc: 'Display your current stored VIP key', example: '/key show' },
|
|
286
|
+
{ cmd: 'apply <key>', desc: 'Manually save a VIP key for use in API requests', example: '/key apply kiku_vip_sk_abc123' },
|
|
287
|
+
{ cmd: 'clear', desc: 'Remove the stored VIP key', example: '/key clear' },
|
|
288
|
+
],
|
|
289
|
+
examples: [
|
|
290
|
+
'/key',
|
|
291
|
+
'/key apply kiku_vip_sk_abc123',
|
|
292
|
+
'/key clear',
|
|
293
|
+
],
|
|
294
|
+
},
|
|
185
295
|
'/subagent': {
|
|
186
296
|
summary: 'Spawn an isolated iterative research subagent to investigate a specific task or subtopic',
|
|
187
297
|
usage: '/subagent <task | status | last | tools>',
|
|
@@ -302,26 +412,30 @@ export const COMMAND_DETAILS = Object.freeze({
|
|
|
302
412
|
usage: '/session [info | list | export | clear]',
|
|
303
413
|
subcommands: [
|
|
304
414
|
{ cmd: 'info', desc: 'Display session ID, active duration, message count, and turn stats', example: '/session info' },
|
|
415
|
+
{ cmd: 'summary', desc: 'Synthesize an AI analytical summary of the active session', example: '/session summary' },
|
|
305
416
|
{ cmd: 'list', desc: 'List all saved conversation sessions on disk', example: '/session list' },
|
|
306
417
|
{ cmd: 'export', desc: 'Export full conversation session history to JSON', example: '/session export' },
|
|
307
418
|
{ cmd: 'clear', desc: 'Archive current conversation session and reset history', example: '/session clear' },
|
|
308
419
|
],
|
|
309
420
|
examples: [
|
|
310
421
|
'/session info',
|
|
422
|
+
'/session summary',
|
|
311
423
|
'/session list',
|
|
312
424
|
'/session clear',
|
|
313
425
|
],
|
|
314
426
|
},
|
|
315
427
|
'/history': {
|
|
316
|
-
summary: 'View or
|
|
317
|
-
usage: '/history [count | search <query> | clear]',
|
|
428
|
+
summary: 'View, search, or summarize recent chat message history',
|
|
429
|
+
usage: '/history [count | search <query> | summary | clear]',
|
|
318
430
|
subcommands: [
|
|
319
431
|
{ cmd: '[n]', desc: 'Display the last N messages (default: 20)', example: '/history 10' },
|
|
320
432
|
{ cmd: 'search <query>', desc: 'Search messages in current session history', example: '/history search In Blossom' },
|
|
433
|
+
{ cmd: 'summary', desc: 'Synthesize an AI summary of past conversation turns', example: '/history summary' },
|
|
321
434
|
{ cmd: 'clear', desc: 'Clear in-memory conversation history', example: '/history clear' },
|
|
322
435
|
],
|
|
323
436
|
examples: [
|
|
324
437
|
'/history',
|
|
438
|
+
'/history summary',
|
|
325
439
|
'/history 50',
|
|
326
440
|
'/history search drama',
|
|
327
441
|
],
|