@phuetz/code-buddy 1.3.0 → 1.3.2
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 +64 -22
- package/dist/agent/autonomous/agentic-coding-runner.d.ts +2 -2
- package/dist/agent/autonomous/agentic-coding-runner.js +24 -24
- package/dist/agent/autonomous/checkpoint-manager.d.ts +2 -2
- package/dist/agent/base-agent.d.ts +1 -1
- package/dist/agent/base-agent.js +1 -1
- package/dist/agent/hermes-tool-parity-local.js +2 -2
- package/dist/agent/tool-handler.js +2 -2
- package/dist/codebuddy/providers/provider-chatgpt-responses.d.ts +4 -0
- package/dist/codebuddy/providers/provider-chatgpt-responses.js +34 -13
- package/dist/codebuddy/providers/provider-openai-compat.js +8 -0
- package/dist/codebuddy/tool-definitions/code-explorer-tools.d.ts +8 -0
- package/dist/codebuddy/tool-definitions/code-explorer-tools.js +24 -0
- package/dist/codebuddy/tool-definitions/graph-tools.d.ts +1 -1
- package/dist/codebuddy/tool-definitions/graph-tools.js +1 -1
- package/dist/codebuddy/tool-definitions/index.d.ts +1 -1
- package/dist/codebuddy/tool-definitions/index.js +2 -2
- package/dist/codebuddy/tools.d.ts +2 -2
- package/dist/codebuddy/tools.js +13 -13
- package/dist/collaboration/ai-colab-manager.js +9 -4
- package/dist/commands/cli/code-explorer-commands.d.ts +7 -0
- package/dist/commands/cli/code-explorer-commands.js +40 -0
- package/dist/commands/cli/native-engine-commands.js +64 -0
- package/dist/commands/handlers/graph-handlers.d.ts +1 -1
- package/dist/commands/handlers/graph-handlers.js +1 -1
- package/dist/config/model-tools.js +1 -1
- package/dist/daemon/autonomous-loop.d.ts +0 -7
- package/dist/daemon/autonomous-loop.js +24 -14
- package/dist/fleet/capability-registry.js +9 -1
- package/dist/fleet/colab-store.d.ts +109 -3
- package/dist/fleet/colab-store.js +181 -6
- package/dist/index.js +28 -11
- package/dist/kanban/colab-kanban-adapter.d.ts +31 -0
- package/dist/kanban/colab-kanban-adapter.js +232 -0
- package/dist/knowledge/community-detector.d.ts +1 -1
- package/dist/knowledge/community-detector.js +1 -1
- package/dist/knowledge/process-detector.d.ts +1 -1
- package/dist/knowledge/process-detector.js +1 -1
- package/dist/plugins/{gitnexus/GitNexusMCPClient.d.ts → code-explorer/CodeExplorerMCPClient.d.ts} +9 -9
- package/dist/plugins/{gitnexus/GitNexusMCPClient.js → code-explorer/CodeExplorerMCPClient.js} +17 -17
- package/dist/plugins/{gitnexus/GitNexusManager.d.ts → code-explorer/CodeExplorerManager.d.ts} +16 -16
- package/dist/plugins/{gitnexus/GitNexusManager.js → code-explorer/CodeExplorerManager.js} +35 -35
- package/dist/plugins/code-explorer/index.d.ts +9 -0
- package/dist/plugins/code-explorer/index.js +8 -0
- package/dist/providers/provider-catalog.js +23 -1
- package/dist/services/prompt-builder.js +9 -9
- package/dist/skills/parser.js +1 -1
- package/dist/tools/{gitnexus-tool.d.ts → code-explorer-tool.d.ts} +9 -9
- package/dist/tools/{gitnexus-tool.js → code-explorer-tool.js} +16 -16
- package/dist/tools/metadata.js +3 -3
- package/dist/tools/registry/code-explorer-tools.d.ts +18 -0
- package/dist/tools/registry/{gitnexus-tools.js → code-explorer-tools.js} +14 -14
- package/dist/tools/registry/graph-tools.d.ts +1 -1
- package/dist/tools/registry/graph-tools.js +1 -1
- package/dist/tools/registry/index.d.ts +1 -1
- package/dist/tools/registry/index.js +6 -6
- package/dist/tools/registry/kanban-tools.d.ts +1 -1
- package/dist/tools/registry/kanban-tools.js +2 -2
- package/package.json +2 -2
- package/dist/codebuddy/tool-definitions/gitnexus-tools.d.ts +0 -8
- package/dist/codebuddy/tool-definitions/gitnexus-tools.js +0 -24
- package/dist/commands/cli/gitnexus-commands.d.ts +0 -7
- package/dist/commands/cli/gitnexus-commands.js +0 -42
- package/dist/plugins/gitnexus/index.d.ts +0 -9
- package/dist/plugins/gitnexus/index.js +0 -8
- package/dist/tools/registry/gitnexus-tools.d.ts +0 -18
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* CodeExplorer Tool Client
|
|
3
3
|
*
|
|
4
|
-
* Consultative, read-only interface to
|
|
4
|
+
* Consultative, read-only interface to CodeExplorer endpoints (/ask, /push-session, /world-model).
|
|
5
5
|
* Degrades gracefully by returning empty contexts/invariants and detailed notes on timeout/offline.
|
|
6
6
|
*/
|
|
7
7
|
import { logger } from '../utils/logger.js';
|
|
8
8
|
import { redactSecrets } from '../security/data-redaction.js';
|
|
9
|
-
export class
|
|
9
|
+
export class CodeExplorerTool {
|
|
10
10
|
endpoint;
|
|
11
11
|
apiKey;
|
|
12
12
|
timeoutMs;
|
|
13
13
|
constructor(config) {
|
|
14
|
-
this.endpoint = config?.endpoint || process.env.
|
|
15
|
-
this.apiKey = config?.apiKey || process.env.
|
|
16
|
-
this.timeoutMs = config?.timeoutMs ?? Number(process.env.
|
|
14
|
+
this.endpoint = config?.endpoint || process.env.CODE_EXPLORER_ENDPOINT || '';
|
|
15
|
+
this.apiKey = config?.apiKey || process.env.CODE_EXPLORER_API_KEY || '';
|
|
16
|
+
this.timeoutMs = config?.timeoutMs ?? Number(process.env.CODE_EXPLORER_TIMEOUT_MS || 5000);
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Helper to perform HTTP request with timeout and headers.
|
|
20
20
|
*/
|
|
21
21
|
async request(path, options) {
|
|
22
22
|
if (!this.endpoint) {
|
|
23
|
-
logger.debug(`
|
|
23
|
+
logger.debug(`CodeExplorer: No endpoint configured, skipping request to ${path}`);
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
26
|
const url = `${this.endpoint.replace(/\/$/, '')}${path}`;
|
|
@@ -52,7 +52,7 @@ export class GitNexusTool {
|
|
|
52
52
|
catch (error) {
|
|
53
53
|
const rawMsg = error instanceof Error ? error.message : String(error);
|
|
54
54
|
const msg = redactSecrets(rawMsg);
|
|
55
|
-
logger.warn(`
|
|
55
|
+
logger.warn(`CodeExplorer request to ${path} failed: ${msg}`);
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
58
|
finally {
|
|
@@ -60,17 +60,17 @@ export class GitNexusTool {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* Lecture seule : interroge
|
|
63
|
+
* Lecture seule : interroge CodeExplorer pour une tâche/texte. Dégrade proprement si indisponible.
|
|
64
64
|
*/
|
|
65
65
|
async ask(query) {
|
|
66
66
|
const redactedQuery = redactSecrets(query);
|
|
67
|
-
logger.debug(`
|
|
67
|
+
logger.debug(`CodeExplorer.ask called with query: ${redactedQuery}`);
|
|
68
68
|
if (!this.endpoint) {
|
|
69
69
|
return {
|
|
70
70
|
likelyFiles: [],
|
|
71
71
|
dependentSymbols: [],
|
|
72
72
|
testsToWatch: [],
|
|
73
|
-
notes: '
|
|
73
|
+
notes: 'CodeExplorer is not configured (missing endpoint).',
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
const response = await this.request('/ask', {
|
|
@@ -82,7 +82,7 @@ export class GitNexusTool {
|
|
|
82
82
|
likelyFiles: [],
|
|
83
83
|
dependentSymbols: [],
|
|
84
84
|
testsToWatch: [],
|
|
85
|
-
notes: '
|
|
85
|
+
notes: 'CodeExplorer is offline or returned an error.',
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
return {
|
|
@@ -93,11 +93,11 @@ export class GitNexusTool {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
|
-
* Pousse le résumé de session vers
|
|
96
|
+
* Pousse le résumé de session vers CodeExplorer (mémoire technique).
|
|
97
97
|
*/
|
|
98
98
|
async pushSession(summary) {
|
|
99
99
|
const redactedSummary = redactSecrets(summary);
|
|
100
|
-
logger.debug(`
|
|
100
|
+
logger.debug(`CodeExplorer.pushSession called: ${redactedSummary}`);
|
|
101
101
|
if (!this.endpoint) {
|
|
102
102
|
return { ok: false };
|
|
103
103
|
}
|
|
@@ -111,7 +111,7 @@ export class GitNexusTool {
|
|
|
111
111
|
* Lecture des invariants du world model.
|
|
112
112
|
*/
|
|
113
113
|
async readWorldModel() {
|
|
114
|
-
logger.debug('
|
|
114
|
+
logger.debug('CodeExplorer.readWorldModel called');
|
|
115
115
|
if (!this.endpoint) {
|
|
116
116
|
return null;
|
|
117
117
|
}
|
|
@@ -121,4 +121,4 @@ export class GitNexusTool {
|
|
|
121
121
|
return response;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
//# sourceMappingURL=
|
|
124
|
+
//# sourceMappingURL=code-explorer-tool.js.map
|
package/dist/tools/metadata.js
CHANGED
|
@@ -1232,11 +1232,11 @@ export const TOOL_METADATA = [
|
|
|
1232
1232
|
description: 'Spawn an isolated sandboxed sub-agent session for a delegated task (depth-3 + 10/workflow caps)',
|
|
1233
1233
|
},
|
|
1234
1234
|
{
|
|
1235
|
-
name: '
|
|
1235
|
+
name: 'code_explorer_ask',
|
|
1236
1236
|
category: 'utility',
|
|
1237
|
-
keywords: ['
|
|
1237
|
+
keywords: ['code-explorer', 'ask', 'query', 'understand', 'explain', 'search', 'related files', 'dependents', 'tests'],
|
|
1238
1238
|
priority: 6,
|
|
1239
|
-
description: 'Consult
|
|
1239
|
+
description: 'Consult CodeExplorer for a query or code understanding request (read-only)',
|
|
1240
1240
|
fleetSafe: true,
|
|
1241
1241
|
},
|
|
1242
1242
|
{
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeExplorer Tool Adapter
|
|
3
|
+
*
|
|
4
|
+
* ITool-compliant adapter for the CodeExplorer tool.
|
|
5
|
+
*/
|
|
6
|
+
import type { ToolResult } from '../../types/index.js';
|
|
7
|
+
import type { ITool, ToolSchema, IToolMetadata, IValidationResult } from './types.js';
|
|
8
|
+
export declare class CodeExplorerAskTool implements ITool {
|
|
9
|
+
readonly name = "code_explorer_ask";
|
|
10
|
+
readonly description = "Consult CodeExplorer for a query or code understanding request. Returns related files, dependent symbols, tests to watch, and technical recommendations. This is a read-only tool.";
|
|
11
|
+
execute(input: Record<string, unknown>): Promise<ToolResult>;
|
|
12
|
+
getSchema(): ToolSchema;
|
|
13
|
+
validate(input: unknown): IValidationResult;
|
|
14
|
+
getMetadata(): IToolMetadata;
|
|
15
|
+
isAvailable(): boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function createCodeExplorerTools(): ITool[];
|
|
18
|
+
export declare function resetCodeExplorerInstances(): void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* CodeExplorer Tool Adapter
|
|
3
3
|
*
|
|
4
|
-
* ITool-compliant adapter for the
|
|
4
|
+
* ITool-compliant adapter for the CodeExplorer tool.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
export class
|
|
8
|
-
name = '
|
|
9
|
-
description = 'Consult
|
|
6
|
+
import { CodeExplorerTool } from '../code-explorer-tool.js';
|
|
7
|
+
export class CodeExplorerAskTool {
|
|
8
|
+
name = 'code_explorer_ask';
|
|
9
|
+
description = 'Consult CodeExplorer for a query or code understanding request. Returns related files, dependent symbols, tests to watch, and technical recommendations. This is a read-only tool.';
|
|
10
10
|
async execute(input) {
|
|
11
11
|
const query = typeof input.query === 'string' ? input.query : '';
|
|
12
12
|
if (!query) {
|
|
@@ -16,8 +16,8 @@ export class GitNexusAskTool {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
try {
|
|
19
|
-
const
|
|
20
|
-
const result = await
|
|
19
|
+
const codeExplorer = new CodeExplorerTool();
|
|
20
|
+
const result = await codeExplorer.ask(query);
|
|
21
21
|
return {
|
|
22
22
|
success: true,
|
|
23
23
|
output: JSON.stringify(result, null, 2),
|
|
@@ -39,7 +39,7 @@ export class GitNexusAskTool {
|
|
|
39
39
|
properties: {
|
|
40
40
|
query: {
|
|
41
41
|
type: 'string',
|
|
42
|
-
description: 'The query or task description to ask
|
|
42
|
+
description: 'The query or task description to ask CodeExplorer about.',
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
45
|
required: ['query'],
|
|
@@ -61,7 +61,7 @@ export class GitNexusAskTool {
|
|
|
61
61
|
name: this.name,
|
|
62
62
|
description: this.description,
|
|
63
63
|
category: 'utility',
|
|
64
|
-
keywords: ['
|
|
64
|
+
keywords: ['code-explorer', 'ask', 'query', 'understand', 'explain', 'search', 'related files', 'dependents', 'tests'],
|
|
65
65
|
priority: 6,
|
|
66
66
|
modifiesFiles: false,
|
|
67
67
|
makesNetworkRequests: true,
|
|
@@ -71,10 +71,10 @@ export class GitNexusAskTool {
|
|
|
71
71
|
return true;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
export function
|
|
75
|
-
return [new
|
|
74
|
+
export function createCodeExplorerTools() {
|
|
75
|
+
return [new CodeExplorerAskTool()];
|
|
76
76
|
}
|
|
77
|
-
export function
|
|
77
|
+
export function resetCodeExplorerInstances() {
|
|
78
78
|
// Stateless tool — nothing to reset
|
|
79
79
|
}
|
|
80
|
-
//# sourceMappingURL=
|
|
80
|
+
//# sourceMappingURL=code-explorer-tools.js.map
|
|
@@ -57,7 +57,7 @@ export { ResolveConflictsExecuteTool, createMergeConflictTools, resetMergeConfli
|
|
|
57
57
|
export { VulnScannerExecuteTool, createVulnScannerTools, resetVulnScannerInstances, } from './vuln-scanner-tools.js';
|
|
58
58
|
export { AdvisorExecuteTool, createAdvisorTools, resetAdvisorInstances, setAdvisorConfigProvider, resetAdvisorConfigProvider, } from './advisor-tools.js';
|
|
59
59
|
export { PeerDelegateTool, PeerChainTool, ListPeersTool, RoutePeerTool, createFleetTools, resetFleetToolInstances, } from './fleet-tools.js';
|
|
60
|
-
export {
|
|
60
|
+
export { CodeExplorerAskTool, createCodeExplorerTools, resetCodeExplorerInstances, } from './code-explorer-tools.js';
|
|
61
61
|
export { ScreenMemoryTool, createScreenpipeTools, resetScreenpipeInstances, } from './screenpipe-tools.js';
|
|
62
62
|
export { AskUserQuestionExecuteTool, createAskUserQuestionTools, resetAskUserQuestionInstances, } from './ask-user-question-tools.js';
|
|
63
63
|
export { ExitPlanModeExecuteTool, createExitPlanModeTools, resetExitPlanModeInstances, } from './exit-plan-mode-tools.js';
|
|
@@ -99,8 +99,8 @@ export { VulnScannerExecuteTool, createVulnScannerTools, resetVulnScannerInstanc
|
|
|
99
99
|
export { AdvisorExecuteTool, createAdvisorTools, resetAdvisorInstances, setAdvisorConfigProvider, resetAdvisorConfigProvider, } from './advisor-tools.js';
|
|
100
100
|
// Tool Adapters - Fleet (peer_delegate, list_peers, route_peer)
|
|
101
101
|
export { PeerDelegateTool, PeerChainTool, ListPeersTool, RoutePeerTool, createFleetTools, resetFleetToolInstances, } from './fleet-tools.js';
|
|
102
|
-
// Tool Adapters -
|
|
103
|
-
export {
|
|
102
|
+
// Tool Adapters - CodeExplorer
|
|
103
|
+
export { CodeExplorerAskTool, createCodeExplorerTools, resetCodeExplorerInstances, } from './code-explorer-tools.js';
|
|
104
104
|
// Tool Adapters - Screenpipe (screen_memory)
|
|
105
105
|
export { ScreenMemoryTool, createScreenpipeTools, resetScreenpipeInstances, } from './screenpipe-tools.js';
|
|
106
106
|
// Tool Adapters - AskUserQuestion (ask_user_question)
|
|
@@ -172,7 +172,7 @@ export async function createAllToolsAsync() {
|
|
|
172
172
|
const { createFleetTools } = await import('./fleet-tools.js');
|
|
173
173
|
const { createAskUserQuestionTools } = await import('./ask-user-question-tools.js');
|
|
174
174
|
const { createExitPlanModeTools } = await import('./exit-plan-mode-tools.js');
|
|
175
|
-
const {
|
|
175
|
+
const { createCodeExplorerTools } = await import('./code-explorer-tools.js');
|
|
176
176
|
// Await MCP Manager initialization before registering its tools
|
|
177
177
|
const { getMcpManager } = await import('../mcp/mcp-manager.js');
|
|
178
178
|
await getMcpManager().initialize();
|
|
@@ -226,7 +226,7 @@ export async function createAllToolsAsync() {
|
|
|
226
226
|
...createFleetTools(),
|
|
227
227
|
...createAskUserQuestionTools(),
|
|
228
228
|
...createExitPlanModeTools(),
|
|
229
|
-
...
|
|
229
|
+
...createCodeExplorerTools(),
|
|
230
230
|
...createMcpTools(),
|
|
231
231
|
];
|
|
232
232
|
// Register backward-compat canonical-prefix aliases (shell_exec, file_read, etc.)
|
|
@@ -302,7 +302,7 @@ export function registerBuiltinTools(registry) {
|
|
|
302
302
|
...createExitPlanModeTools(),
|
|
303
303
|
...createGuiTools(),
|
|
304
304
|
...createSessionTools(),
|
|
305
|
-
...
|
|
305
|
+
...createCodeExplorerTools(),
|
|
306
306
|
];
|
|
307
307
|
// Append canonical-prefix aliases (shell_exec → bash_run, etc.).
|
|
308
308
|
allTools.push(...createAliasTools(allTools));
|
|
@@ -368,6 +368,6 @@ import { createExitPlanModeTools } from './exit-plan-mode-tools.js';
|
|
|
368
368
|
import { createGuiTools } from './gui-tools.js';
|
|
369
369
|
import { createSessionTools } from './session-tools.js';
|
|
370
370
|
import { createAliasTools } from './tool-aliases.js';
|
|
371
|
-
import {
|
|
371
|
+
import { createCodeExplorerTools } from './code-explorer-tools.js';
|
|
372
372
|
export * from "./windows-tools.js";
|
|
373
373
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { KanbanStoreOptions } from '../../kanban/kanban-store.js';
|
|
2
2
|
import type { ITool } from './types.js';
|
|
3
3
|
export type KanbanToolOptions = KanbanStoreOptions;
|
|
4
4
|
export declare function createKanbanTools(options?: KanbanToolOptions): ITool[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KANBAN_BLOCK_TOOL, KANBAN_COMMENT_TOOL, KANBAN_COMPLETE_TOOL, KANBAN_CREATE_TOOL, KANBAN_HEARTBEAT_TOOL, KANBAN_LINK_TOOL, KANBAN_LIST_TOOL, KANBAN_SHOW_TOOL, KANBAN_UNBLOCK_TOOL, } from '../../codebuddy/tool-definitions/kanban-tools.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ColabKanbanAdapter } from '../../kanban/colab-kanban-adapter.js';
|
|
3
3
|
class KanbanTool {
|
|
4
4
|
definition;
|
|
5
5
|
executor;
|
|
@@ -54,7 +54,7 @@ class KanbanTool {
|
|
|
54
54
|
return true;
|
|
55
55
|
}
|
|
56
56
|
createStore(context) {
|
|
57
|
-
return new
|
|
57
|
+
return new ColabKanbanAdapter({
|
|
58
58
|
...this.options,
|
|
59
59
|
rootDir: this.options.rootDir ?? context?.cwd,
|
|
60
60
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phuetz/code-buddy",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "Open-source multi-provider AI coding agent for the terminal.
|
|
3
|
+
"version": "1.3.2",
|
|
4
|
+
"description": "Open-source multi-provider AI coding agent for the terminal, desktop, and HTTP. 15 LLM providers (Grok, Claude, ChatGPT, Gemini, Ollama, LM Studio, …) with ~110 tools, a peer-to-peer fleet, opt-in self-improvement, multi-channel messaging, and a skills system.",
|
|
5
5
|
"author": "Patrice Huetz <patrice.huetz@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitNexus Tool Definitions
|
|
3
|
-
*
|
|
4
|
-
* OpenAI function calling schema for the GitNexus tool.
|
|
5
|
-
*/
|
|
6
|
-
export const GITNEXUS_ASK_TOOL = {
|
|
7
|
-
type: 'function',
|
|
8
|
-
function: {
|
|
9
|
-
name: 'gitnexus_ask',
|
|
10
|
-
description: 'Consult GitNexus for a query or code understanding request. Returns related files, dependent symbols, tests to watch, and technical recommendations. This is a read-only tool.',
|
|
11
|
-
parameters: {
|
|
12
|
-
type: 'object',
|
|
13
|
-
properties: {
|
|
14
|
-
query: {
|
|
15
|
-
type: 'string',
|
|
16
|
-
description: 'The query or task description to ask GitNexus about.',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
required: ['query'],
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
export const GITNEXUS_TOOLS = [GITNEXUS_ASK_TOOL];
|
|
24
|
-
//# sourceMappingURL=gitnexus-tools.js.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitNexus CLI commands
|
|
3
|
-
*
|
|
4
|
-
* Exposes commands to consult GitNexus and push session summaries.
|
|
5
|
-
*/
|
|
6
|
-
import { GitNexusTool } from '../../tools/gitnexus-tool.js';
|
|
7
|
-
export function registerGitNexusCommands(program) {
|
|
8
|
-
const gitnexus = program
|
|
9
|
-
.command('gitnexus')
|
|
10
|
-
.description('Interact with GitNexus for code understanding and session syncing');
|
|
11
|
-
gitnexus
|
|
12
|
-
.command('ask')
|
|
13
|
-
.description('Consult GitNexus for a query or code understanding request')
|
|
14
|
-
.argument('<query>', 'The query or task description to ask GitNexus about')
|
|
15
|
-
.action(async (query) => {
|
|
16
|
-
try {
|
|
17
|
-
const gitNexus = new GitNexusTool();
|
|
18
|
-
const result = await gitNexus.ask(query);
|
|
19
|
-
console.log(JSON.stringify(result, null, 2));
|
|
20
|
-
}
|
|
21
|
-
catch (error) {
|
|
22
|
-
console.error('Error querying GitNexus:', error);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
gitnexus
|
|
27
|
-
.command('push-session')
|
|
28
|
-
.description('Push the session summary to GitNexus as technical memory')
|
|
29
|
-
.argument('<summary>', 'The session summary to push')
|
|
30
|
-
.action(async (summary) => {
|
|
31
|
-
try {
|
|
32
|
-
const gitNexus = new GitNexusTool();
|
|
33
|
-
const result = await gitNexus.pushSession(summary);
|
|
34
|
-
console.log(JSON.stringify(result, null, 2));
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
console.error('Error pushing session to GitNexus:', error);
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=gitnexus-commands.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitNexus Plugin — Barrel Export
|
|
3
|
-
*
|
|
4
|
-
* Code graph analysis via GitNexus MCP server integration.
|
|
5
|
-
*/
|
|
6
|
-
export { GitNexusManager, getGitNexusManager, clearGitNexusManagerCache, } from './GitNexusManager.js';
|
|
7
|
-
export { GitNexusMCPClient } from './GitNexusMCPClient.js';
|
|
8
|
-
export type { GNQueryResult, GNContextResult, GNImpactResult, GNCluster, GNProcess, } from './GitNexusMCPClient.js';
|
|
9
|
-
export type { GitNexusStats } from './GitNexusManager.js';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitNexus Plugin — Barrel Export
|
|
3
|
-
*
|
|
4
|
-
* Code graph analysis via GitNexus MCP server integration.
|
|
5
|
-
*/
|
|
6
|
-
export { GitNexusManager, getGitNexusManager, clearGitNexusManagerCache, } from './GitNexusManager.js';
|
|
7
|
-
export { GitNexusMCPClient } from './GitNexusMCPClient.js';
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitNexus Tool Adapter
|
|
3
|
-
*
|
|
4
|
-
* ITool-compliant adapter for the GitNexus tool.
|
|
5
|
-
*/
|
|
6
|
-
import type { ToolResult } from '../../types/index.js';
|
|
7
|
-
import type { ITool, ToolSchema, IToolMetadata, IValidationResult } from './types.js';
|
|
8
|
-
export declare class GitNexusAskTool implements ITool {
|
|
9
|
-
readonly name = "gitnexus_ask";
|
|
10
|
-
readonly description = "Consult GitNexus for a query or code understanding request. Returns related files, dependent symbols, tests to watch, and technical recommendations. This is a read-only tool.";
|
|
11
|
-
execute(input: Record<string, unknown>): Promise<ToolResult>;
|
|
12
|
-
getSchema(): ToolSchema;
|
|
13
|
-
validate(input: unknown): IValidationResult;
|
|
14
|
-
getMetadata(): IToolMetadata;
|
|
15
|
-
isAvailable(): boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare function createGitNexusTools(): ITool[];
|
|
18
|
-
export declare function resetGitNexusInstances(): void;
|