@causyne/agent 1.20.14 → 1.20.16
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/package.json +7 -4
- package/src/providers/budgetEnforcer.js +11 -3
- package/src/providers/budgetEnforcer.ts +8 -3
- package/src/smartToolsUse.js +28 -4
- package/src/smartToolsUse.ts +31 -4
- package/src/toolPacks.js +6 -1
- package/src/toolPacks.ts +8 -2
- package/src/tools/registry.js +9 -1
- package/src/tools/reverseEngineering.js +573 -0
- package/src/tools/reverseEngineering.ts +657 -0
- package/src/toolsList.js +4 -1
- package/src/toolsList.ts +5 -2
- package/src/tui/chatRenderer.js +109 -7
- package/src/tui/composerControls.js +6 -0
- package/src/tui/composerControls.ts +6 -0
- package/src/tui/messageInteraction.js +11 -3
- package/src/tui/messageInteraction.ts +12 -2
- package/src/tui/prompt.js +26 -5
- package/src/tui/scrollInteraction.js +7 -0
- package/src/tui/scrollInteraction.ts +9 -0
- package/src/tui/sessionPicker.js +3 -10
- package/src/tui/sessionPicker.ts +3 -10
- package/src/tui/stageSurface.js +22 -10
- package/src/tui/turnRail.js +124 -19
- package/src/tui/turnRail.ts +140 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@causyne/agent",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.16",
|
|
4
4
|
"description": "Agentic AI for software, tools, and computer workflows",
|
|
5
5
|
"main": "bin/causyne.js",
|
|
6
6
|
"type": "module",
|
|
@@ -54,18 +54,21 @@
|
|
|
54
54
|
"url": "https://github.com/ikbal-causyne/causyne-agent/issues"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@modelcontextprotocol/client": "2.
|
|
57
|
+
"@modelcontextprotocol/client": "^2.4.0",
|
|
58
58
|
"acorn-walk": "^8.3.5",
|
|
59
59
|
"commander": "^11.1.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@babel/parser": "^8.0.7",
|
|
63
|
-
"@modelcontextprotocol/node": "2.1.
|
|
64
|
-
"@modelcontextprotocol/server": "2.
|
|
63
|
+
"@modelcontextprotocol/node": "^2.1.2",
|
|
64
|
+
"@modelcontextprotocol/server": "^2.4.0",
|
|
65
65
|
"@types/node": "^22.20.2",
|
|
66
66
|
"acorn": "^8.18.0",
|
|
67
67
|
"typescript": "^7.0.2",
|
|
68
68
|
"zod": "4.6.7"
|
|
69
69
|
},
|
|
70
|
+
"overrides": {
|
|
71
|
+
"@hono/node-server": "^2.1.5"
|
|
72
|
+
},
|
|
70
73
|
"private": false
|
|
71
74
|
}
|
|
@@ -16,6 +16,8 @@ export function actionLimitFor(archetype) {
|
|
|
16
16
|
return 25;
|
|
17
17
|
if (archetype === 'game_development' || archetype === 'game')
|
|
18
18
|
return 250;
|
|
19
|
+
if (archetype === 'software_engineering' || archetype === 'backend_engineering')
|
|
20
|
+
return 200;
|
|
19
21
|
if (archetype === 'web_engineering')
|
|
20
22
|
return 120;
|
|
21
23
|
return 35;
|
|
@@ -25,6 +27,8 @@ export function tokenLimitFor(archetype) {
|
|
|
25
27
|
return 150_000;
|
|
26
28
|
if (archetype === 'game_development' || archetype === 'game')
|
|
27
29
|
return 3_000_000;
|
|
30
|
+
if (archetype === 'software_engineering' || archetype === 'backend_engineering')
|
|
31
|
+
return 2_500_000;
|
|
28
32
|
if (archetype === 'media_3d_generation')
|
|
29
33
|
return 400_000;
|
|
30
34
|
if (archetype === 'web_engineering' || archetype === 'web_fullstack')
|
|
@@ -34,6 +38,8 @@ export function tokenLimitFor(archetype) {
|
|
|
34
38
|
export function turnTokenLimitFor(archetype) {
|
|
35
39
|
if (archetype === 'game_development' || archetype === 'game')
|
|
36
40
|
return 1_000_000;
|
|
41
|
+
if (archetype === 'software_engineering' || archetype === 'backend_engineering')
|
|
42
|
+
return 1_000_000;
|
|
37
43
|
if (archetype === 'web_engineering' || archetype === 'web_fullstack')
|
|
38
44
|
return 250_000;
|
|
39
45
|
if (archetype === 'media_3d_generation')
|
|
@@ -50,8 +56,10 @@ export class EfficiencyCheckpoint extends Error {
|
|
|
50
56
|
scope;
|
|
51
57
|
constructor(reason, used, limit, scope = 'task') {
|
|
52
58
|
const scopeLabel = scope === 'turn' ? 'single-turn' : 'task';
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
const guidance = scope === 'turn'
|
|
60
|
+
? 'Auto-compacting context and continuing task execution.'
|
|
61
|
+
: 'Session history is retained; continue from this checkpoint without repeating completed actions.';
|
|
62
|
+
super(`Efficiency checkpoint: ${used.toLocaleString()} ${reason} reached the ${limit.toLocaleString()} ${scopeLabel} limit. ${guidance}`);
|
|
55
63
|
this.name = 'EfficiencyCheckpoint';
|
|
56
64
|
this.reason = reason;
|
|
57
65
|
this.used = used;
|
|
@@ -84,10 +92,10 @@ export class UnifiedBudgetEnforcer {
|
|
|
84
92
|
}
|
|
85
93
|
recordUsage(usage) {
|
|
86
94
|
const fresh = noncachedTokens(usage);
|
|
95
|
+
this.tokens += fresh;
|
|
87
96
|
if (fresh >= this.maxTurnTokens) {
|
|
88
97
|
throw new EfficiencyCheckpoint('tokens', fresh, this.maxTurnTokens, 'turn');
|
|
89
98
|
}
|
|
90
|
-
this.tokens += fresh;
|
|
91
99
|
if (this.tokens >= this.maxTaskTokens) {
|
|
92
100
|
throw new EfficiencyCheckpoint('tokens', this.tokens, this.maxTaskTokens, 'task');
|
|
93
101
|
}
|
|
@@ -23,6 +23,7 @@ export function actionLimitFor(archetype: string): number {
|
|
|
23
23
|
if (archetype === 'desktop_personalization') return 12;
|
|
24
24
|
if (archetype === 'media_3d_generation') return 25;
|
|
25
25
|
if (archetype === 'game_development' || archetype === 'game') return 250;
|
|
26
|
+
if (archetype === 'software_engineering' || archetype === 'backend_engineering') return 200;
|
|
26
27
|
if (archetype === 'web_engineering') return 120;
|
|
27
28
|
return 35;
|
|
28
29
|
}
|
|
@@ -30,6 +31,7 @@ export function actionLimitFor(archetype: string): number {
|
|
|
30
31
|
export function tokenLimitFor(archetype: string): number {
|
|
31
32
|
if (archetype === 'desktop_personalization') return 150_000;
|
|
32
33
|
if (archetype === 'game_development' || archetype === 'game') return 3_000_000;
|
|
34
|
+
if (archetype === 'software_engineering' || archetype === 'backend_engineering') return 2_500_000;
|
|
33
35
|
if (archetype === 'media_3d_generation') return 400_000;
|
|
34
36
|
if (archetype === 'web_engineering' || archetype === 'web_fullstack') return 500_000;
|
|
35
37
|
return 100_000;
|
|
@@ -37,6 +39,7 @@ export function tokenLimitFor(archetype: string): number {
|
|
|
37
39
|
|
|
38
40
|
export function turnTokenLimitFor(archetype: string): number {
|
|
39
41
|
if (archetype === 'game_development' || archetype === 'game') return 1_000_000;
|
|
42
|
+
if (archetype === 'software_engineering' || archetype === 'backend_engineering') return 1_000_000;
|
|
40
43
|
if (archetype === 'web_engineering' || archetype === 'web_fullstack') return 250_000;
|
|
41
44
|
if (archetype === 'media_3d_generation') return 200_000;
|
|
42
45
|
if (archetype === 'desktop_personalization') return 100_000;
|
|
@@ -52,8 +55,10 @@ export class EfficiencyCheckpoint extends Error {
|
|
|
52
55
|
|
|
53
56
|
constructor(reason: 'tokens' | 'actions', used: number, limit: number, scope: 'turn' | 'task' = 'task') {
|
|
54
57
|
const scopeLabel = scope === 'turn' ? 'single-turn' : 'task';
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
const guidance = scope === 'turn'
|
|
59
|
+
? 'Auto-compacting context and continuing task execution.'
|
|
60
|
+
: 'Session history is retained; continue from this checkpoint without repeating completed actions.';
|
|
61
|
+
super(`Efficiency checkpoint: ${used.toLocaleString()} ${reason} reached the ${limit.toLocaleString()} ${scopeLabel} limit. ${guidance}`);
|
|
57
62
|
this.name = 'EfficiencyCheckpoint';
|
|
58
63
|
this.reason = reason;
|
|
59
64
|
this.used = used;
|
|
@@ -90,10 +95,10 @@ export class UnifiedBudgetEnforcer {
|
|
|
90
95
|
|
|
91
96
|
recordUsage(usage: BudgetUsage): void {
|
|
92
97
|
const fresh = noncachedTokens(usage);
|
|
98
|
+
this.tokens += fresh;
|
|
93
99
|
if (fresh >= this.maxTurnTokens) {
|
|
94
100
|
throw new EfficiencyCheckpoint('tokens', fresh, this.maxTurnTokens, 'turn');
|
|
95
101
|
}
|
|
96
|
-
this.tokens += fresh;
|
|
97
102
|
if (this.tokens >= this.maxTaskTokens) {
|
|
98
103
|
throw new EfficiencyCheckpoint('tokens', this.tokens, this.maxTaskTokens, 'task');
|
|
99
104
|
}
|
package/src/smartToolsUse.js
CHANGED
|
@@ -122,14 +122,16 @@ const PURE_WEB_SEARCH_PATTERN = /\b(search(ing)? (the )?web|web search|look up o
|
|
|
122
122
|
const WEB_CONSTRUCTION_EXCLUSION = /\b(build|create|make|design|develop|scaffold|code|program|css|html|tailwind|component|frontend|front-end|landing page|website|webpage|dashboard)\b/i;
|
|
123
123
|
// System admin / process & terminal operations
|
|
124
124
|
const SYSTEM_ADMIN_PATTERN = /\b(kill process|kill port|check port|port \d+|lsof|ps aux|terminate process|zip folder|unzip file|extract archive|compress folder)\b/i;
|
|
125
|
-
// Simple file management operations
|
|
126
|
-
const SIMPLE_FILE_OP_PATTERN = /\b(list (the )?files|show files|count files|rename file(s)?|delete file(s)?|move file(s)?|clean (up )?folder)\b/i;
|
|
125
|
+
// Simple file management operations (reading small notes, listing/deleting/moving files)
|
|
126
|
+
const SIMPLE_FILE_OP_PATTERN = /\b(list (the )?files|show files|count files|rename file(s)?|delete file(s)?|move file(s)?|clean (up )?folder|read (the )?(?:note|file)|summarize (?:its )?content)\b/i;
|
|
127
127
|
// Media generation intent (explicit creation of 3D, video, audio, or synthesized speech)
|
|
128
128
|
const EXPLICIT_MEDIA_GENERATION_PATTERN = /\b(blender|3d model|render 3d|render frame|render animation|da vinci|resolve|audio synth|synthesizer|text to speech|tts|voiceover|dubbing)\b|\.blend\d*\b/i;
|
|
129
129
|
// Explicit web engineering intent
|
|
130
130
|
const EXPLICIT_WEB_ENGINEERING_PATTERN = /\b(build|create|make|design|develop|implement|redesign|buat\w*)\b[\s\S]*\b(web|website|webpage|webapp|landing page|dashboard|ui|frontend|threejs|three\.js|thre\.?js|3js|webgl|canvas)\b/i;
|
|
131
131
|
// Explicit game development intent
|
|
132
|
-
const EXPLICIT_GAME_DEV_PATTERN = /(?:\b(build
|
|
132
|
+
const EXPLICIT_GAME_DEV_PATTERN = /(?:\b(?:build|create|make|design|develop|scaffold|render|animate|code|program|buat\w*|bikin\w*)[\s\S]*(?:game|simulation|simulator|simulasi|interactive|3d|three\.?js|threejs|webgl|canvas3d|babylonjs|godot|unity|unreal|platformer|rpg|arcade)\b|\b(?:game|gamedev|godot|unity|unreal|platformer|rpg|arcade|simulator|simulation|simulasi|interactive)\b|\b3d\s*(?:game|app|simulator|simulation|scene|city|world|view|body|human|anatomy|model|mesh|character|rendering|visualization|experience|space|environment)\b|\bin 3d\b|[-_]3d\b|\b3d[-_]|\b(?:threejs|three\.js|webgl|canvas3d|babylonjs)\b)/i;
|
|
133
|
+
// Explicit software and systems engineering intent (backend, APIs, refactoring, algorithms, testing, architecture, CLI tools)
|
|
134
|
+
const EXPLICIT_SOFTWARE_ENGINEERING_PATTERN = /(?:\b(?:build|create|code|program|develop|refactor|debug|fix|implement|test|optimize|write|add|modify|migrate|architect|engineer|benchmark|profile|audit)\b[\s\S]*\b(?:api|backend|service|microservice|server|database|schema|endpoint|controller|auth|test|spec|algorithm|function|module|class|feature|script|pipeline|codebase|repo|repository|bug|issue|engine|tool|cli|library|sdk|migration|handler|worker|queue|stream)\b|\b(?:python|rust|golang|c\+\+|cpp|java|typescript|javascript|ruby|php|sql|bash|shell|docker|k8s|kubernetes)\b)/i;
|
|
133
135
|
/**
|
|
134
136
|
* Select tools to preload based on prompt intent. This is never an allowlist:
|
|
135
137
|
* tool_search can add capabilities as the task develops.
|
|
@@ -196,7 +198,7 @@ export function determineToolScope(prompt, _taskShape) {
|
|
|
196
198
|
};
|
|
197
199
|
}
|
|
198
200
|
// 4. Simple local file manipulation
|
|
199
|
-
if (SIMPLE_FILE_OP_PATTERN.test(text) && !EXPLICIT_WEB_ENGINEERING_PATTERN.test(text) && !EXPLICIT_GAME_DEV_PATTERN.test(text)) {
|
|
201
|
+
if (SIMPLE_FILE_OP_PATTERN.test(text) && !EXPLICIT_WEB_ENGINEERING_PATTERN.test(text) && !EXPLICIT_GAME_DEV_PATTERN.test(text) && !EXPLICIT_SOFTWARE_ENGINEERING_PATTERN.test(text)) {
|
|
200
202
|
const tools = new Set([
|
|
201
203
|
'fs_read',
|
|
202
204
|
'fs_write',
|
|
@@ -276,6 +278,28 @@ export function determineToolScope(prompt, _taskShape) {
|
|
|
276
278
|
reason: 'Game development and simulation intent focuses on game code, assets, terminal execution, and browser/screen verification.'
|
|
277
279
|
};
|
|
278
280
|
}
|
|
281
|
+
// 8. Software and systems engineering intent (backend, APIs, refactoring, algorithms, testing, architecture, CLI tools)
|
|
282
|
+
if (EXPLICIT_SOFTWARE_ENGINEERING_PATTERN.test(text)) {
|
|
283
|
+
const tools = new Set([
|
|
284
|
+
'fs_write',
|
|
285
|
+
'fs_edit',
|
|
286
|
+
'fs_read',
|
|
287
|
+
'fs_list',
|
|
288
|
+
'fs_search',
|
|
289
|
+
'sysRun',
|
|
290
|
+
'browser_act',
|
|
291
|
+
'screenshot',
|
|
292
|
+
'vision_inspect_ui',
|
|
293
|
+
'update_plan',
|
|
294
|
+
'tool_search'
|
|
295
|
+
]);
|
|
296
|
+
return {
|
|
297
|
+
toolScope: tools,
|
|
298
|
+
archetype: 'software_engineering',
|
|
299
|
+
suppressedPacks: ['media', 'game'],
|
|
300
|
+
reason: 'Software engineering intent focuses on code authoring, search, terminal execution, and verification; suppresses creative media and game packs.'
|
|
301
|
+
};
|
|
302
|
+
}
|
|
279
303
|
// Default: unconstrained (standard progressive disclosure and packs apply)
|
|
280
304
|
return {
|
|
281
305
|
toolScope: null,
|
package/src/smartToolsUse.ts
CHANGED
|
@@ -160,9 +160,9 @@ const WEB_CONSTRUCTION_EXCLUSION =
|
|
|
160
160
|
const SYSTEM_ADMIN_PATTERN =
|
|
161
161
|
/\b(kill process|kill port|check port|port \d+|lsof|ps aux|terminate process|zip folder|unzip file|extract archive|compress folder)\b/i;
|
|
162
162
|
|
|
163
|
-
// Simple file management operations
|
|
163
|
+
// Simple file management operations (reading small notes, listing/deleting/moving files)
|
|
164
164
|
const SIMPLE_FILE_OP_PATTERN =
|
|
165
|
-
/\b(list (the )?files|show files|count files|rename file(s)?|delete file(s)?|move file(s)?|clean (up )?folder)\b/i;
|
|
165
|
+
/\b(list (the )?files|show files|count files|rename file(s)?|delete file(s)?|move file(s)?|clean (up )?folder|read (the )?(?:note|file)|summarize (?:its )?content)\b/i;
|
|
166
166
|
|
|
167
167
|
// Media generation intent (explicit creation of 3D, video, audio, or synthesized speech)
|
|
168
168
|
const EXPLICIT_MEDIA_GENERATION_PATTERN =
|
|
@@ -174,7 +174,11 @@ const EXPLICIT_WEB_ENGINEERING_PATTERN =
|
|
|
174
174
|
|
|
175
175
|
// Explicit game development intent
|
|
176
176
|
const EXPLICIT_GAME_DEV_PATTERN =
|
|
177
|
-
/(?:\b(build
|
|
177
|
+
/(?:\b(?:build|create|make|design|develop|scaffold|render|animate|code|program|buat\w*|bikin\w*)[\s\S]*(?:game|simulation|simulator|simulasi|interactive|3d|three\.?js|threejs|webgl|canvas3d|babylonjs|godot|unity|unreal|platformer|rpg|arcade)\b|\b(?:game|gamedev|godot|unity|unreal|platformer|rpg|arcade|simulator|simulation|simulasi|interactive)\b|\b3d\s*(?:game|app|simulator|simulation|scene|city|world|view|body|human|anatomy|model|mesh|character|rendering|visualization|experience|space|environment)\b|\bin 3d\b|[-_]3d\b|\b3d[-_]|\b(?:threejs|three\.js|webgl|canvas3d|babylonjs)\b)/i;
|
|
178
|
+
|
|
179
|
+
// Explicit software and systems engineering intent (backend, APIs, refactoring, algorithms, testing, architecture, CLI tools)
|
|
180
|
+
const EXPLICIT_SOFTWARE_ENGINEERING_PATTERN =
|
|
181
|
+
/(?:\b(?:build|create|code|program|develop|refactor|debug|fix|implement|test|optimize|write|add|modify|migrate|architect|engineer|benchmark|profile|audit)\b[\s\S]*\b(?:api|backend|service|microservice|server|database|schema|endpoint|controller|auth|test|spec|algorithm|function|module|class|feature|script|pipeline|codebase|repo|repository|bug|issue|engine|tool|cli|library|sdk|migration|handler|worker|queue|stream)\b|\b(?:python|rust|golang|c\+\+|cpp|java|typescript|javascript|ruby|php|sql|bash|shell|docker|k8s|kubernetes)\b)/i;
|
|
178
182
|
|
|
179
183
|
/**
|
|
180
184
|
* Select tools to preload based on prompt intent. This is never an allowlist:
|
|
@@ -249,7 +253,7 @@ export function determineToolScope(
|
|
|
249
253
|
}
|
|
250
254
|
|
|
251
255
|
// 4. Simple local file manipulation
|
|
252
|
-
if (SIMPLE_FILE_OP_PATTERN.test(text) && !EXPLICIT_WEB_ENGINEERING_PATTERN.test(text) && !EXPLICIT_GAME_DEV_PATTERN.test(text)) {
|
|
256
|
+
if (SIMPLE_FILE_OP_PATTERN.test(text) && !EXPLICIT_WEB_ENGINEERING_PATTERN.test(text) && !EXPLICIT_GAME_DEV_PATTERN.test(text) && !EXPLICIT_SOFTWARE_ENGINEERING_PATTERN.test(text)) {
|
|
253
257
|
const tools = new Set([
|
|
254
258
|
'fs_read',
|
|
255
259
|
'fs_write',
|
|
@@ -333,6 +337,29 @@ export function determineToolScope(
|
|
|
333
337
|
};
|
|
334
338
|
}
|
|
335
339
|
|
|
340
|
+
// 8. Software and systems engineering intent (backend, APIs, refactoring, algorithms, testing, architecture, CLI tools)
|
|
341
|
+
if (EXPLICIT_SOFTWARE_ENGINEERING_PATTERN.test(text)) {
|
|
342
|
+
const tools = new Set([
|
|
343
|
+
'fs_write',
|
|
344
|
+
'fs_edit',
|
|
345
|
+
'fs_read',
|
|
346
|
+
'fs_list',
|
|
347
|
+
'fs_search',
|
|
348
|
+
'sysRun',
|
|
349
|
+
'browser_act',
|
|
350
|
+
'screenshot',
|
|
351
|
+
'vision_inspect_ui',
|
|
352
|
+
'update_plan',
|
|
353
|
+
'tool_search'
|
|
354
|
+
]);
|
|
355
|
+
return {
|
|
356
|
+
toolScope: tools,
|
|
357
|
+
archetype: 'software_engineering',
|
|
358
|
+
suppressedPacks: ['media', 'game'],
|
|
359
|
+
reason: 'Software engineering intent focuses on code authoring, search, terminal execution, and verification; suppresses creative media and game packs.'
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
|
|
336
363
|
// Default: unconstrained (standard progressive disclosure and packs apply)
|
|
337
364
|
return {
|
|
338
365
|
toolScope: null,
|
package/src/toolPacks.js
CHANGED
|
@@ -112,6 +112,9 @@ export const PACKS = {
|
|
|
112
112
|
'code_search_ast',
|
|
113
113
|
'code_list_symbols',
|
|
114
114
|
'pdf_read'
|
|
115
|
+
],
|
|
116
|
+
reverse_engineering: [
|
|
117
|
+
'reverse_engineering'
|
|
115
118
|
]
|
|
116
119
|
};
|
|
117
120
|
export const PACK_NAMES = Object.keys(PACKS);
|
|
@@ -328,12 +331,14 @@ const WEB_INTENT = /\b(web|webpage|website|frontend|front-end|landing page|homep
|
|
|
328
331
|
const MEDIA_INTENT = /\b(image|images|picture|photo|render|3d model|blender|animation|animate|video|movie|film|audio|sound|sfx|music|song|voice|tts|text.to.speech|narration|podcast|thumbnail|poster|illustration|logo)\b/i;
|
|
329
332
|
const SYSTEM_INTENT = /\b(process|processes|pid|kill|port|zip|unzip|tar|archive|compress|extract|clipboard|copy to clipboard|print|printer|open in browser|launch app|computer use|vision grounding|desktop vision|gui agent|coordinate click|desktop control)\b/i;
|
|
330
333
|
const ADVANCED_INTENT = /\b(pdf|document|proposal|screenplay|shotlist|shot list|voiceover|dubbing|forge a tool|custom tool|new tool|plugin|plugins|custom plugin|subagent|sub-agent|parallel agent|swarm|ast|symbols|refactor across)\b/i;
|
|
334
|
+
const REVERSE_ENGINEERING_INTENT = /\b(decompile|disassemble|binary|binaries|apk|dex|elf|mach-o|pe|coff|reverse engineer|reverse-engineering|reverse_engineering|sourcemap|deobfuscate|asar|symbols|ghidra|rizin|radare|hopper|frida|hook script|mitigations|pie|canary)\b/i;
|
|
331
335
|
const INTENT_MATCHERS = {
|
|
332
336
|
game: GAME_INTENT,
|
|
333
337
|
web: WEB_INTENT,
|
|
334
338
|
media: MEDIA_INTENT,
|
|
335
339
|
system: SYSTEM_INTENT,
|
|
336
|
-
advanced: ADVANCED_INTENT
|
|
340
|
+
advanced: ADVANCED_INTENT,
|
|
341
|
+
reverse_engineering: REVERSE_ENGINEERING_INTENT
|
|
337
342
|
};
|
|
338
343
|
/** True when the prompt genuinely describes game development work. */
|
|
339
344
|
export function isGameIntent(prompt) {
|
package/src/toolPacks.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
// already normalised to underscores (see tools/registry.js TOOL_DEFINITIONS).
|
|
18
18
|
// ---------------------------------------------------------------------------
|
|
19
19
|
|
|
20
|
-
export type PackName = 'game' | 'web' | 'media' | 'system' | 'advanced';
|
|
20
|
+
export type PackName = 'game' | 'web' | 'media' | 'system' | 'advanced' | 'reverse_engineering';
|
|
21
21
|
|
|
22
22
|
export interface WorkspaceRoutingContext {
|
|
23
23
|
framework?: string | null | undefined;
|
|
@@ -138,6 +138,9 @@ export const PACKS: Record<PackName, string[]> = {
|
|
|
138
138
|
'code_search_ast',
|
|
139
139
|
'code_list_symbols',
|
|
140
140
|
'pdf_read'
|
|
141
|
+
],
|
|
142
|
+
reverse_engineering: [
|
|
143
|
+
'reverse_engineering'
|
|
141
144
|
]
|
|
142
145
|
};
|
|
143
146
|
|
|
@@ -373,12 +376,15 @@ const SYSTEM_INTENT = /\b(process|processes|pid|kill|port|zip|unzip|tar|archive|
|
|
|
373
376
|
|
|
374
377
|
const ADVANCED_INTENT = /\b(pdf|document|proposal|screenplay|shotlist|shot list|voiceover|dubbing|forge a tool|custom tool|new tool|plugin|plugins|custom plugin|subagent|sub-agent|parallel agent|swarm|ast|symbols|refactor across)\b/i;
|
|
375
378
|
|
|
379
|
+
const REVERSE_ENGINEERING_INTENT = /\b(decompile|disassemble|binary|binaries|apk|dex|elf|mach-o|pe|coff|reverse engineer|reverse-engineering|reverse_engineering|sourcemap|deobfuscate|asar|symbols|ghidra|rizin|radare|hopper|frida|hook script|mitigations|pie|canary)\b/i;
|
|
380
|
+
|
|
376
381
|
const INTENT_MATCHERS: Record<PackName, RegExp> = {
|
|
377
382
|
game: GAME_INTENT,
|
|
378
383
|
web: WEB_INTENT,
|
|
379
384
|
media: MEDIA_INTENT,
|
|
380
385
|
system: SYSTEM_INTENT,
|
|
381
|
-
advanced: ADVANCED_INTENT
|
|
386
|
+
advanced: ADVANCED_INTENT,
|
|
387
|
+
reverse_engineering: REVERSE_ENGINEERING_INTENT
|
|
382
388
|
};
|
|
383
389
|
|
|
384
390
|
/** True when the prompt genuinely describes game development work. */
|
package/src/tools/registry.js
CHANGED
|
@@ -5,6 +5,7 @@ import { documentForgeTool } from './documentForge.js';
|
|
|
5
5
|
import { nativeEngineTool } from './nativeEngine.js';
|
|
6
6
|
import { peerAgentTool } from './peerAgent.js';
|
|
7
7
|
import { openSourceToolProvisioner } from './openSourceToolProvisioner.js';
|
|
8
|
+
import { reverseEngineering } from './reverseEngineering.js';
|
|
8
9
|
import { sysRun, sysRunBg } from './sysRun.js';
|
|
9
10
|
import { fsRead } from './fsRead.js';
|
|
10
11
|
import { fsWrite } from './fsWrite.js';
|
|
@@ -129,7 +130,7 @@ const TOOL_MODULES = [
|
|
|
129
130
|
gameTilemapGenerator, gameUiHudBuilder, gameEconomyBalancer,
|
|
130
131
|
gameDataForge, gameWebRuntimeInspector, gameCanvasAudit, readNativeSkill, createSkill, creativeApps,
|
|
131
132
|
computerUse, uiForge, documentForgeTool, nativeEngineTool, peerAgentTool,
|
|
132
|
-
openSourceToolProvisioner
|
|
133
|
+
openSourceToolProvisioner, reverseEngineering
|
|
133
134
|
];
|
|
134
135
|
|
|
135
136
|
// Base static definitions (backwards compatible). Order is preserved from the
|
|
@@ -161,6 +162,13 @@ const TOOL_ALIASES = {
|
|
|
161
162
|
gitExec: 'gitOp',
|
|
162
163
|
tool_deferred_mcp_search: 'tool_search',
|
|
163
164
|
|
|
165
|
+
// Sovereign Reverse Engineering aliases
|
|
166
|
+
re_inspect_binary: 'reverse_engineering',
|
|
167
|
+
re_decompile: 'reverse_engineering',
|
|
168
|
+
re_unpack_bundle: 'reverse_engineering',
|
|
169
|
+
re_deobfuscate_script: 'reverse_engineering',
|
|
170
|
+
re_trace_runtime: 'reverse_engineering',
|
|
171
|
+
|
|
164
172
|
// Core filesystem aliases
|
|
165
173
|
read_file: 'fs_read',
|
|
166
174
|
readFile: 'fs_read',
|