nova-terminal-assistant 0.2.1 → 0.2.3
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/bin/nova.js
CHANGED
|
@@ -10,7 +10,6 @@ const __dirname = dirname(__filename);
|
|
|
10
10
|
const appPath = join(__dirname, '..', 'dist', 'startup', 'NovaApp.js');
|
|
11
11
|
const args = process.argv.slice(2);
|
|
12
12
|
|
|
13
|
-
// 直接运行编译后的 JavaScript
|
|
14
13
|
spawn(process.execPath, [appPath, ...args], {
|
|
15
14
|
stdio: 'inherit',
|
|
16
15
|
env: { ...process.env }
|
|
@@ -87,7 +87,7 @@ export class ModelValidator {
|
|
|
87
87
|
const result = new Map();
|
|
88
88
|
try {
|
|
89
89
|
// Get all providers from config
|
|
90
|
-
const { ConfigManager } = await import('config/ConfigManager.js');
|
|
90
|
+
const { ConfigManager } = await import('../config/ConfigManager.js');
|
|
91
91
|
const config = ConfigManager.getInstance ? ConfigManager.getInstance() : new ConfigManager();
|
|
92
92
|
const providers = Object.keys(config.getConfig().models.providers);
|
|
93
93
|
}
|
|
@@ -6,9 +6,9 @@ import * as fs from 'node:fs';
|
|
|
6
6
|
import * as path from 'node:path';
|
|
7
7
|
import { spawn } from 'node:child_process';
|
|
8
8
|
import chalk from 'chalk';
|
|
9
|
-
import { AgentLoop } from '
|
|
10
|
-
import { ModelClient } from '
|
|
11
|
-
import { buildSystemPrompt } from '
|
|
9
|
+
import { AgentLoop } from '../session/AgentLoop.js';
|
|
10
|
+
import { ModelClient } from '../model/ModelClient.js';
|
|
11
|
+
import { buildSystemPrompt } from '../context/defaultSystemPrompt.js';
|
|
12
12
|
import { ThinkingBlockRenderer } from '../ui/components/ThinkingBlockRenderer.js';
|
|
13
13
|
import { selectModelInteractive, selectSkillInteractive } from '../ui/SimpleSelector2.js';
|
|
14
14
|
// ============================================================================
|
|
@@ -9,10 +9,10 @@ import * as path from 'node:path';
|
|
|
9
9
|
import * as os from 'node:os';
|
|
10
10
|
import { execSync, spawn } from 'node:child_process';
|
|
11
11
|
import chalk from 'chalk';
|
|
12
|
-
import { AgentLoop } from '
|
|
13
|
-
import { buildSystemPrompt } from '
|
|
12
|
+
import { AgentLoop } from '../session/AgentLoop.js';
|
|
13
|
+
import { buildSystemPrompt } from '../context/defaultSystemPrompt.js';
|
|
14
14
|
import { ThinkingBlockRenderer } from '../ui/components/ThinkingBlockRenderer.js';
|
|
15
|
-
import { OllamaManager } from '
|
|
15
|
+
import { OllamaManager } from '../model/providers/OllamaManager.js';
|
|
16
16
|
import { EnhancedCompleter } from '../utils/EnhancedCompleter.js';
|
|
17
17
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
18
|
const MODE_LABELS = {
|
|
@@ -1944,7 +1944,7 @@ ${(scan.topLevel || []).slice(0, 20).join('\n')}
|
|
|
1944
1944
|
return;
|
|
1945
1945
|
}
|
|
1946
1946
|
// Import installer
|
|
1947
|
-
const { SkillInstaller, POPULAR_SKILL_REPOS } = await import('extensions/SkillInstaller.js');
|
|
1947
|
+
const { SkillInstaller, POPULAR_SKILL_REPOS } = await import('../extensions/SkillInstaller.js');
|
|
1948
1948
|
const installer = new SkillInstaller();
|
|
1949
1949
|
// Resolve shorthand
|
|
1950
1950
|
const source = POPULAR_SKILL_REPOS[repoArg]?.url || repoArg;
|
|
@@ -2127,7 +2127,7 @@ ${(scan.topLevel || []).slice(0, 20).join('\n')}
|
|
|
2127
2127
|
// /checkpoint — File snapshot and rollback management
|
|
2128
2128
|
// ========================================================================
|
|
2129
2129
|
async handleCheckpointCommand(arg) {
|
|
2130
|
-
const { CheckpointManager } = await import('utils/CheckpointManager.js');
|
|
2130
|
+
const { CheckpointManager } = await import('../utils/CheckpointManager.js');
|
|
2131
2131
|
const manager = new CheckpointManager(this.cwd, this.config);
|
|
2132
2132
|
const parts = arg.split(/\s+/).filter(Boolean);
|
|
2133
2133
|
const cmd = parts[0];
|
package/dist/startup/NovaApp.js
CHANGED
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
// ============================================================================
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import os from 'node:os';
|
|
6
|
-
import { ConfigManager } from '
|
|
7
|
-
import { AuthManager } from '
|
|
8
|
-
import { ToolRegistry } from '
|
|
9
|
-
import { SessionManager } from '
|
|
10
|
-
import { AgentLoop } from '
|
|
11
|
-
import { ModelClient } from '
|
|
12
|
-
import { ModelConnectionTester } from '
|
|
13
|
-
import { McpManager } from '
|
|
14
|
-
import { SkillRegistry } from '
|
|
15
|
-
import { SkillInstaller } from '
|
|
16
|
-
import { ContextCompressor } from '
|
|
17
|
-
import { ApprovalManager } from '
|
|
18
|
-
import { HookExecutor } from '
|
|
19
|
-
import { NovaError, getErrorMessage } from '
|
|
20
|
-
import { readFileHandler, writeFileHandler, editFileHandler, listDirectoryHandler, searchFileHandler, searchContentHandler, shellHandler, webSearchHandler, webFetchHandler, memoryReadHandler, memoryWriteHandler, todoHandler, taskHandler, } from '
|
|
21
|
-
import { readFileSchema, writeFileSchema, editFileSchema, listDirectorySchema, searchFileSchema, searchContentSchema, executeCommandSchema, webSearchSchema, webFetchSchema, memoryReadSchema, memoryWriteSchema, todoSchema, taskSchema, } from '
|
|
22
|
-
import { OllamaManager } from '
|
|
6
|
+
import { ConfigManager } from '../config/ConfigManager.js';
|
|
7
|
+
import { AuthManager } from '../auth/AuthManager.js';
|
|
8
|
+
import { ToolRegistry } from '../tools/ToolRegistry.js';
|
|
9
|
+
import { SessionManager } from '../session/SessionManager.js';
|
|
10
|
+
import { AgentLoop } from '../session/AgentLoop.js';
|
|
11
|
+
import { ModelClient } from '../model/ModelClient.js';
|
|
12
|
+
import { ModelConnectionTester } from '../model/ModelConnectionTester.js';
|
|
13
|
+
import { McpManager } from '../mcp/McpManager.js';
|
|
14
|
+
import { SkillRegistry } from '../extensions/SkillRegistry.js';
|
|
15
|
+
import { SkillInstaller } from '../extensions/SkillInstaller.js';
|
|
16
|
+
import { ContextCompressor } from '../context/ContextCompressor.js';
|
|
17
|
+
import { ApprovalManager } from '../security/ApprovalManager.js';
|
|
18
|
+
import { HookExecutor } from '../security/HookExecutor.js';
|
|
19
|
+
import { NovaError, getErrorMessage } from '../types/errors.js';
|
|
20
|
+
import { readFileHandler, writeFileHandler, editFileHandler, listDirectoryHandler, searchFileHandler, searchContentHandler, shellHandler, webSearchHandler, webFetchHandler, memoryReadHandler, memoryWriteHandler, todoHandler, taskHandler, } from '../tools/impl/index.js';
|
|
21
|
+
import { readFileSchema, writeFileSchema, editFileSchema, listDirectorySchema, searchFileSchema, searchContentSchema, executeCommandSchema, webSearchSchema, webFetchSchema, memoryReadSchema, memoryWriteSchema, todoSchema, taskSchema, } from '../tools/schemas/index.js';
|
|
22
|
+
import { OllamaManager } from '../model/providers/OllamaManager.js';
|
|
23
23
|
import { parseCliArgs } from './parseArgs.js';
|
|
24
24
|
import { InkBasedRepl } from './InkBasedRepl.js';
|
|
25
25
|
/** Providers that require an API key */
|
|
@@ -489,7 +489,7 @@ export class NovaApp {
|
|
|
489
489
|
model: config.core.defaultModel,
|
|
490
490
|
streaming: true,
|
|
491
491
|
});
|
|
492
|
-
const { buildSystemPrompt } = await import('context/defaultSystemPrompt.js');
|
|
492
|
+
const { buildSystemPrompt } = await import('../context/defaultSystemPrompt.js');
|
|
493
493
|
const chalk = await import('chalk');
|
|
494
494
|
const systemPrompt = buildSystemPrompt({
|
|
495
495
|
workingDirectory: cwd,
|
|
@@ -912,7 +912,7 @@ export class NovaApp {
|
|
|
912
912
|
let availableModels = [];
|
|
913
913
|
let defaultModel = args.defaultModel || '';
|
|
914
914
|
try {
|
|
915
|
-
const { OpenAICompatibleProvider } = await import('model/providers/OpenAICompatibleProvider.js');
|
|
915
|
+
const { OpenAICompatibleProvider } = await import('../model/providers/OpenAICompatibleProvider.js');
|
|
916
916
|
const probe = new (class extends OpenAICompatibleProvider {
|
|
917
917
|
constructor() {
|
|
918
918
|
super({ apiKey: key, baseUrl, model: 'probe' });
|
package/dist/test-modules.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ContextCompressor } from 'context/ContextCompressor.js';
|
|
2
|
-
import { LayeredMemoryManager } from 'context/LayeredMemoryManager.js';
|
|
3
|
-
import { AgentLoop } from 'session/AgentLoop.js';
|
|
1
|
+
import { ContextCompressor } from './context/ContextCompressor.js';
|
|
2
|
+
import { LayeredMemoryManager } from './context/LayeredMemoryManager.js';
|
|
3
|
+
import { AgentLoop } from './session/AgentLoop.js';
|
|
4
4
|
console.log('ContextCompressor:', typeof ContextCompressor);
|
|
5
5
|
console.log('LayeredMemoryManager:', typeof LayeredMemoryManager);
|
|
6
6
|
console.log('AgentLoop:', typeof AgentLoop);
|
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nova-terminal-assistant",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Nova - AI-powered terminal assistant with multi-model support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/startup/NovaApp.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"nova": "./bin/nova.js"
|
|
9
9
|
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "tsc -p tsconfig.build.json"
|
|
12
|
-
},
|
|
13
10
|
"keywords": [
|
|
14
11
|
"cli",
|
|
15
12
|
"ai",
|
|
@@ -24,6 +21,10 @@
|
|
|
24
21
|
"node": ">=18.0.0"
|
|
25
22
|
},
|
|
26
23
|
"dependencies": {
|
|
24
|
+
"uuid": "^10.0.0",
|
|
25
|
+
"glob": "^11.0.0",
|
|
26
|
+
"node-fetch": "^3.3.2",
|
|
27
|
+
"ink-text-input": "^6.0.0",
|
|
27
28
|
"@anthropic-ai/sdk": "^0.30.0",
|
|
28
29
|
"@google/generative-ai": "^0.21.0",
|
|
29
30
|
"chalk": "^5.3.0",
|