@compilr-dev/cli 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo.app +1 -1
- package/dist/.tsbuildinfo.domain +1 -1
- package/dist/agent.d.ts +9 -1
- package/dist/agent.js +2 -0
- package/dist/compilr-diff-companion.vsix +0 -0
- package/dist/index.js +9 -0
- package/dist/tools/meta-tools.js +22 -2
- package/dist/tools.d.ts +4 -0
- package/dist/tools.js +4 -0
- package/dist/ui/overlay/impl/resume-overlay-v2.js +17 -1
- package/package.json +2 -2
package/dist/agent.d.ts
CHANGED
|
@@ -45,9 +45,17 @@ export interface AgentOptions {
|
|
|
45
45
|
*/
|
|
46
46
|
onIterationLimitReached?: (context: IterationLimitContext) => Promise<number | false>;
|
|
47
47
|
/**
|
|
48
|
-
* Active project name (
|
|
48
|
+
* Active project display name (e.g. "Hr Manager").
|
|
49
49
|
*/
|
|
50
50
|
projectName?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Active project slug — unique identifier (e.g. "hr-manager").
|
|
53
|
+
*/
|
|
54
|
+
projectSlug?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Active project ID (numeric database identifier).
|
|
57
|
+
*/
|
|
58
|
+
projectId?: number;
|
|
51
59
|
/**
|
|
52
60
|
* Project context from COMPILR.md or CLAUDE.md.
|
|
53
61
|
* This is appended to the system prompt to give the agent project-specific knowledge.
|
package/dist/agent.js
CHANGED
|
@@ -385,6 +385,8 @@ export function createAgent(options = {}) {
|
|
|
385
385
|
enableMetaTools: capabilityManager ? false : useMetaTools,
|
|
386
386
|
hasGit: capabilityManager ? false : undefined, // false = skip git-safety; undefined = auto-detect
|
|
387
387
|
projectName: options.projectName,
|
|
388
|
+
projectSlug: options.projectSlug,
|
|
389
|
+
projectId: options.projectId,
|
|
388
390
|
projectContext: options.projectContext,
|
|
389
391
|
guidedModeContext: options.guidedModeContext,
|
|
390
392
|
planModeContext: options.planModeContext,
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -70,6 +70,10 @@ function parseArgs() {
|
|
|
70
70
|
else if (arg === '--update') {
|
|
71
71
|
options.update = true;
|
|
72
72
|
}
|
|
73
|
+
else if (arg === '--version' || arg === '-v' || arg === '-V') {
|
|
74
|
+
console.log(VERSION);
|
|
75
|
+
process.exit(0);
|
|
76
|
+
}
|
|
73
77
|
else if (arg === '--help' || arg === '-h') {
|
|
74
78
|
showHelp();
|
|
75
79
|
process.exit(0);
|
|
@@ -89,6 +93,7 @@ Options:
|
|
|
89
93
|
--minimal Use minimal tool set
|
|
90
94
|
--show-filtering Show tool filtering analysis
|
|
91
95
|
--update Check for and install updates
|
|
96
|
+
--version, -v Show version number
|
|
92
97
|
--help, -h Show this help
|
|
93
98
|
|
|
94
99
|
Environment Variables:
|
|
@@ -523,6 +528,8 @@ async function main() {
|
|
|
523
528
|
sharedState.pendingSuggestion = event.action;
|
|
524
529
|
},
|
|
525
530
|
projectName: liveProjectState.dbProject?.displayName,
|
|
531
|
+
projectSlug: liveProjectState.dbProject?.name,
|
|
532
|
+
projectId: liveProjectState.dbProject?.id,
|
|
526
533
|
projectContext: liveProjectState.projectContext,
|
|
527
534
|
guidedModeContext: liveProjectState.guidedModeContext,
|
|
528
535
|
// Anchors - library handles re-injection on every LLM call
|
|
@@ -578,6 +585,8 @@ async function main() {
|
|
|
578
585
|
sharedState.pendingSuggestion = event.action;
|
|
579
586
|
},
|
|
580
587
|
projectName: liveProjectState.dbProject?.displayName,
|
|
588
|
+
projectSlug: liveProjectState.dbProject?.name,
|
|
589
|
+
projectId: liveProjectState.dbProject?.id,
|
|
581
590
|
projectContext: liveProjectState.projectContext,
|
|
582
591
|
guidedModeContext: liveProjectState.guidedModeContext,
|
|
583
592
|
enableAnchors: true,
|
package/dist/tools/meta-tools.js
CHANGED
|
@@ -12,9 +12,29 @@
|
|
|
12
12
|
* 4. A transparent fallback handler that routes calls to the registry
|
|
13
13
|
*/
|
|
14
14
|
import { MetaToolsRegistry, createMetaTools, META_TOOLS_SYSTEM_PROMPT_PREFIX as SDK_META_TOOLS_SYSTEM_PROMPT_PREFIX, } from '@compilr-dev/sdk';
|
|
15
|
+
import { getCapabilityManager } from '../multi-agent/capability-loader.js';
|
|
15
16
|
// Singleton registry for the CLI process
|
|
16
17
|
const registry = new MetaToolsRegistry();
|
|
17
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Auto-load callback shared by both use_tool and createFallback paths.
|
|
20
|
+
* When a tool is blocked by the capability filter, this loads the pack
|
|
21
|
+
* and updates the filter so the tool executes in the same turn.
|
|
22
|
+
*/
|
|
23
|
+
function onFilteredTool(toolName) {
|
|
24
|
+
const manager = getCapabilityManager();
|
|
25
|
+
if (!manager)
|
|
26
|
+
return false;
|
|
27
|
+
const packId = manager.findPackForTool(toolName);
|
|
28
|
+
if (!packId || manager.isLoaded(packId))
|
|
29
|
+
return false;
|
|
30
|
+
if (manager.getTier(packId) !== 'loadable')
|
|
31
|
+
return false;
|
|
32
|
+
manager.load(packId, 'auto-load');
|
|
33
|
+
// Minimal filter rebuild — next BeforeLLM turn does the full rebuild with orphans
|
|
34
|
+
registry.setFilter(manager.getActiveToolNames());
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
const metaToolSet = createMetaTools(registry, { onFilteredTool });
|
|
18
38
|
// =============================================================================
|
|
19
39
|
// Module-level API (same signatures as before)
|
|
20
40
|
// =============================================================================
|
|
@@ -42,7 +62,7 @@ export const getToolInfoTool = metaToolSet.getToolInfoTool;
|
|
|
42
62
|
export const useToolTool = metaToolSet.useToolTool;
|
|
43
63
|
export const metaTools = [listToolsTool, getToolInfoTool, useToolTool];
|
|
44
64
|
export function createMetaToolFallback() {
|
|
45
|
-
return metaToolSet.createFallback();
|
|
65
|
+
return metaToolSet.createFallback({ onFilteredTool });
|
|
46
66
|
}
|
|
47
67
|
/**
|
|
48
68
|
* Generate a filtered tool index showing only tools in the given set.
|
package/dist/tools.d.ts
CHANGED
|
@@ -51,6 +51,10 @@ export declare function getMetaTools(): Tool[];
|
|
|
51
51
|
* Create a fallback handler for the tool registry.
|
|
52
52
|
* When the agent calls a tool not in the direct registry, this handler
|
|
53
53
|
* checks the meta-registry and executes it transparently.
|
|
54
|
+
*
|
|
55
|
+
* Auto-loading of capability packs for filtered tools is handled by the
|
|
56
|
+
* shared onFilteredTool callback in meta-tools.ts (covers both use_tool
|
|
57
|
+
* and direct fallback paths).
|
|
54
58
|
*/
|
|
55
59
|
export declare function createToolFallback(): (name: string, input: Record<string, unknown>) => Promise<import('@compilr-dev/sdk').ToolExecutionResult | null>;
|
|
56
60
|
/**
|
package/dist/tools.js
CHANGED
|
@@ -289,6 +289,10 @@ export function getMetaTools() {
|
|
|
289
289
|
* Create a fallback handler for the tool registry.
|
|
290
290
|
* When the agent calls a tool not in the direct registry, this handler
|
|
291
291
|
* checks the meta-registry and executes it transparently.
|
|
292
|
+
*
|
|
293
|
+
* Auto-loading of capability packs for filtered tools is handled by the
|
|
294
|
+
* shared onFilteredTool callback in meta-tools.ts (covers both use_tool
|
|
295
|
+
* and direct fallback paths).
|
|
292
296
|
*/
|
|
293
297
|
export function createToolFallback() {
|
|
294
298
|
return createMetaToolFallback();
|
|
@@ -86,11 +86,15 @@ class DetailScreen extends BaseScreen {
|
|
|
86
86
|
confirmDelete = false;
|
|
87
87
|
confirmCrossProject = false;
|
|
88
88
|
confirmSelected = 1; // 0 = Yes, 1 = No (for both confirmations)
|
|
89
|
-
constructor(item, styles, onDelete) {
|
|
89
|
+
constructor(item, styles, onDelete, startInDeleteMode = false) {
|
|
90
90
|
super();
|
|
91
91
|
this.item = item;
|
|
92
92
|
this.styles = styles;
|
|
93
93
|
this.onDelete = onDelete;
|
|
94
|
+
if (startInDeleteMode && onDelete) {
|
|
95
|
+
this.confirmDelete = true;
|
|
96
|
+
this.confirmSelected = 1; // Default to "No"
|
|
97
|
+
}
|
|
94
98
|
}
|
|
95
99
|
render() {
|
|
96
100
|
const s = this.styles;
|
|
@@ -387,6 +391,18 @@ export class ResumeOverlayV2 extends TabbedListOverlayV2 {
|
|
|
387
391
|
showCount: true,
|
|
388
392
|
emptyMessage: 'No saved sessions found.',
|
|
389
393
|
noResultsMessage: 'No sessions match the search.',
|
|
394
|
+
// Handle 'd' key to delete session from list view
|
|
395
|
+
handleCustomKey: (key) => {
|
|
396
|
+
const char = extractPrintable(key);
|
|
397
|
+
if (char === 'd' && options.onDelete && this.state.filteredItems.length > 0) {
|
|
398
|
+
const item = this.state.filteredItems[this.state.selectedIndex];
|
|
399
|
+
return {
|
|
400
|
+
handled: true,
|
|
401
|
+
pushScreen: new DetailScreen(item, this.getStyles(), options.onDelete, true),
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
return { handled: false };
|
|
405
|
+
},
|
|
390
406
|
footerHints: (searchMode) => {
|
|
391
407
|
if (searchMode) {
|
|
392
408
|
return 'Type to search Enter Select Esc Exit search';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compilr-dev/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "AI-powered coding assistant CLI using @compilr-dev/agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@compilr-dev/agents-coding": "^1.0.4",
|
|
59
59
|
"@compilr-dev/editor-core": "^0.0.2",
|
|
60
60
|
"@compilr-dev/factory": "^0.1.12",
|
|
61
|
-
"@compilr-dev/sdk": "^0.1.
|
|
61
|
+
"@compilr-dev/sdk": "^0.1.28",
|
|
62
62
|
"@compilr-dev/ui-core": "^0.0.1",
|
|
63
63
|
"@modelcontextprotocol/sdk": "^1.23.0",
|
|
64
64
|
"better-sqlite3": "^12.5.0",
|