nova-terminal-assistant 0.1.0
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.
Potentially problematic release.
This version of nova-terminal-assistant might be problematic. Click here for more details.
- package/README.md +358 -0
- package/bin/nova +38 -0
- package/bin/nova.js +12 -0
- package/package.json +67 -0
- package/src/cli/commands/SmartCompletion.ts +458 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/startup/IFlowRepl.ts +212 -0
- package/src/cli/startup/InkBasedRepl.ts +1056 -0
- package/src/cli/startup/InteractiveRepl.ts +2833 -0
- package/src/cli/startup/NovaApp.ts +1861 -0
- package/src/cli/startup/index.ts +4 -0
- package/src/cli/startup/parseArgs.ts +293 -0
- package/src/cli/test-modules.ts +27 -0
- package/src/cli/ui/IFlowDropdown.ts +425 -0
- package/src/cli/ui/ModernReplUI.ts +276 -0
- package/src/cli/ui/SimpleSelector2.ts +215 -0
- package/src/cli/ui/components/ConfirmDialog.ts +176 -0
- package/src/cli/ui/components/ErrorPanel.ts +364 -0
- package/src/cli/ui/components/InkAppRunner.tsx +67 -0
- package/src/cli/ui/components/InkComponents.tsx +613 -0
- package/src/cli/ui/components/NovaInkApp.tsx +312 -0
- package/src/cli/ui/components/ProgressBar.ts +177 -0
- package/src/cli/ui/components/ProgressIndicator.ts +298 -0
- package/src/cli/ui/components/QuickActions.ts +396 -0
- package/src/cli/ui/components/SimpleErrorPanel.ts +231 -0
- package/src/cli/ui/components/StatusBar.ts +194 -0
- package/src/cli/ui/components/ThinkingBlockRenderer.ts +401 -0
- package/src/cli/ui/components/index.ts +27 -0
- package/src/cli/ui/ink-prototype.tsx +347 -0
- package/src/cli/utils/CliUI.ts +336 -0
- package/src/cli/utils/CompletionHelper.ts +388 -0
- package/src/cli/utils/EnhancedCompleter.test.ts +226 -0
- package/src/cli/utils/EnhancedCompleter.ts +513 -0
- package/src/cli/utils/ErrorEnhancer.ts +429 -0
- package/src/cli/utils/OutputFormatter.ts +193 -0
- package/src/cli/utils/index.ts +9 -0
- package/src/core/agents/AgentOrchestrator.ts +515 -0
- package/src/core/agents/index.ts +17 -0
- package/src/core/audit/AuditLogger.ts +509 -0
- package/src/core/audit/index.ts +11 -0
- package/src/core/auth/AuthManager.d.ts.map +1 -0
- package/src/core/auth/AuthManager.ts +138 -0
- package/src/core/auth/index.d.ts.map +1 -0
- package/src/core/auth/index.ts +2 -0
- package/src/core/config/ConfigManager.d.ts.map +1 -0
- package/src/core/config/ConfigManager.test.ts +183 -0
- package/src/core/config/ConfigManager.ts +1219 -0
- package/src/core/config/index.d.ts.map +1 -0
- package/src/core/config/index.ts +1 -0
- package/src/core/context/ContextBuilder.d.ts.map +1 -0
- package/src/core/context/ContextBuilder.ts +171 -0
- package/src/core/context/ContextCompressor.d.ts.map +1 -0
- package/src/core/context/ContextCompressor.ts +642 -0
- package/src/core/context/LayeredMemoryManager.ts +657 -0
- package/src/core/context/MemoryDiscovery.d.ts.map +1 -0
- package/src/core/context/MemoryDiscovery.ts +175 -0
- package/src/core/context/defaultSystemPrompt.d.ts.map +1 -0
- package/src/core/context/defaultSystemPrompt.ts +35 -0
- package/src/core/context/index.d.ts.map +1 -0
- package/src/core/context/index.ts +22 -0
- package/src/core/extensions/SkillGenerator.ts +421 -0
- package/src/core/extensions/SkillInstaller.d.ts.map +1 -0
- package/src/core/extensions/SkillInstaller.ts +257 -0
- package/src/core/extensions/SkillRegistry.d.ts.map +1 -0
- package/src/core/extensions/SkillRegistry.ts +361 -0
- package/src/core/extensions/SkillValidator.ts +525 -0
- package/src/core/extensions/index.ts +15 -0
- package/src/core/index.d.ts.map +1 -0
- package/src/core/index.ts +42 -0
- package/src/core/mcp/McpManager.d.ts.map +1 -0
- package/src/core/mcp/McpManager.ts +632 -0
- package/src/core/mcp/index.d.ts.map +1 -0
- package/src/core/mcp/index.ts +2 -0
- package/src/core/model/ModelClient.d.ts.map +1 -0
- package/src/core/model/ModelClient.ts +217 -0
- package/src/core/model/ModelConnectionTester.ts +363 -0
- package/src/core/model/ModelValidator.ts +348 -0
- package/src/core/model/index.d.ts.map +1 -0
- package/src/core/model/index.ts +6 -0
- package/src/core/model/providers/AnthropicProvider.d.ts.map +1 -0
- package/src/core/model/providers/AnthropicProvider.ts +279 -0
- package/src/core/model/providers/CodingPlanProvider.d.ts.map +1 -0
- package/src/core/model/providers/CodingPlanProvider.ts +210 -0
- package/src/core/model/providers/OllamaCloudProvider.d.ts.map +1 -0
- package/src/core/model/providers/OllamaCloudProvider.ts +405 -0
- package/src/core/model/providers/OllamaManager.d.ts.map +1 -0
- package/src/core/model/providers/OllamaManager.ts +201 -0
- package/src/core/model/providers/OllamaProvider.d.ts.map +1 -0
- package/src/core/model/providers/OllamaProvider.ts +73 -0
- package/src/core/model/providers/OpenAICompatibleProvider.d.ts.map +1 -0
- package/src/core/model/providers/OpenAICompatibleProvider.ts +327 -0
- package/src/core/model/providers/OpenAIProvider.d.ts.map +1 -0
- package/src/core/model/providers/OpenAIProvider.ts +29 -0
- package/src/core/model/providers/index.d.ts.map +1 -0
- package/src/core/model/providers/index.ts +12 -0
- package/src/core/model/types.d.ts.map +1 -0
- package/src/core/model/types.ts +77 -0
- package/src/core/security/ApprovalManager.d.ts.map +1 -0
- package/src/core/security/ApprovalManager.ts +174 -0
- package/src/core/security/FileFilter.d.ts.map +1 -0
- package/src/core/security/FileFilter.ts +141 -0
- package/src/core/security/HookExecutor.d.ts.map +1 -0
- package/src/core/security/HookExecutor.ts +178 -0
- package/src/core/security/SandboxExecutor.ts +447 -0
- package/src/core/security/index.d.ts.map +1 -0
- package/src/core/security/index.ts +8 -0
- package/src/core/session/AgentLoop.d.ts.map +1 -0
- package/src/core/session/AgentLoop.ts +501 -0
- package/src/core/session/SessionManager.d.ts.map +1 -0
- package/src/core/session/SessionManager.test.ts +183 -0
- package/src/core/session/SessionManager.ts +460 -0
- package/src/core/session/index.d.ts.map +1 -0
- package/src/core/session/index.ts +3 -0
- package/src/core/telemetry/Telemetry.d.ts.map +1 -0
- package/src/core/telemetry/Telemetry.ts +90 -0
- package/src/core/telemetry/TelemetryService.ts +531 -0
- package/src/core/telemetry/index.d.ts.map +1 -0
- package/src/core/telemetry/index.ts +12 -0
- package/src/core/testing/AutoFixer.ts +385 -0
- package/src/core/testing/ErrorAnalyzer.ts +499 -0
- package/src/core/testing/TestRunner.ts +265 -0
- package/src/core/testing/agent-cli-tests.ts +538 -0
- package/src/core/testing/index.ts +11 -0
- package/src/core/tools/ToolRegistry.d.ts.map +1 -0
- package/src/core/tools/ToolRegistry.test.ts +206 -0
- package/src/core/tools/ToolRegistry.ts +260 -0
- package/src/core/tools/impl/EditFileTool.d.ts.map +1 -0
- package/src/core/tools/impl/EditFileTool.ts +97 -0
- package/src/core/tools/impl/ListDirectoryTool.d.ts.map +1 -0
- package/src/core/tools/impl/ListDirectoryTool.ts +142 -0
- package/src/core/tools/impl/MemoryTool.d.ts.map +1 -0
- package/src/core/tools/impl/MemoryTool.ts +102 -0
- package/src/core/tools/impl/ReadFileTool.d.ts.map +1 -0
- package/src/core/tools/impl/ReadFileTool.ts +58 -0
- package/src/core/tools/impl/SearchContentTool.d.ts.map +1 -0
- package/src/core/tools/impl/SearchContentTool.ts +94 -0
- package/src/core/tools/impl/SearchFileTool.d.ts.map +1 -0
- package/src/core/tools/impl/SearchFileTool.ts +61 -0
- package/src/core/tools/impl/ShellTool.d.ts.map +1 -0
- package/src/core/tools/impl/ShellTool.ts +118 -0
- package/src/core/tools/impl/TaskTool.d.ts.map +1 -0
- package/src/core/tools/impl/TaskTool.ts +207 -0
- package/src/core/tools/impl/TodoTool.d.ts.map +1 -0
- package/src/core/tools/impl/TodoTool.ts +122 -0
- package/src/core/tools/impl/WebFetchTool.d.ts.map +1 -0
- package/src/core/tools/impl/WebFetchTool.ts +103 -0
- package/src/core/tools/impl/WebSearchTool.d.ts.map +1 -0
- package/src/core/tools/impl/WebSearchTool.ts +89 -0
- package/src/core/tools/impl/WriteFileTool.d.ts.map +1 -0
- package/src/core/tools/impl/WriteFileTool.ts +49 -0
- package/src/core/tools/impl/index.d.ts.map +1 -0
- package/src/core/tools/impl/index.ts +16 -0
- package/src/core/tools/index.d.ts.map +1 -0
- package/src/core/tools/index.ts +7 -0
- package/src/core/tools/schemas/execution.d.ts.map +1 -0
- package/src/core/tools/schemas/execution.ts +42 -0
- package/src/core/tools/schemas/file.d.ts.map +1 -0
- package/src/core/tools/schemas/file.ts +119 -0
- package/src/core/tools/schemas/index.d.ts.map +1 -0
- package/src/core/tools/schemas/index.ts +11 -0
- package/src/core/tools/schemas/memory.d.ts.map +1 -0
- package/src/core/tools/schemas/memory.ts +52 -0
- package/src/core/tools/schemas/orchestration.d.ts.map +1 -0
- package/src/core/tools/schemas/orchestration.ts +44 -0
- package/src/core/tools/schemas/search.d.ts.map +1 -0
- package/src/core/tools/schemas/search.ts +112 -0
- package/src/core/tools/schemas/todo.d.ts.map +1 -0
- package/src/core/tools/schemas/todo.ts +32 -0
- package/src/core/tools/schemas/web.d.ts.map +1 -0
- package/src/core/tools/schemas/web.ts +86 -0
- package/src/core/types/config.d.ts.map +1 -0
- package/src/core/types/config.ts +200 -0
- package/src/core/types/errors.d.ts.map +1 -0
- package/src/core/types/errors.ts +204 -0
- package/src/core/types/index.d.ts.map +1 -0
- package/src/core/types/index.ts +8 -0
- package/src/core/types/session.d.ts.map +1 -0
- package/src/core/types/session.ts +216 -0
- package/src/core/types/tools.d.ts.map +1 -0
- package/src/core/types/tools.ts +157 -0
- package/src/core/utils/CheckpointManager.d.ts.map +1 -0
- package/src/core/utils/CheckpointManager.ts +327 -0
- package/src/core/utils/Logger.d.ts.map +1 -0
- package/src/core/utils/Logger.ts +98 -0
- package/src/core/utils/RetryManager.ts +471 -0
- package/src/core/utils/TokenCounter.d.ts.map +1 -0
- package/src/core/utils/TokenCounter.ts +414 -0
- package/src/core/utils/VectorMemoryStore.ts +440 -0
- package/src/core/utils/helpers.d.ts.map +1 -0
- package/src/core/utils/helpers.ts +89 -0
- package/src/core/utils/index.d.ts.map +1 -0
- package/src/core/utils/index.ts +19 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// File Tool Schemas - JSON schemas for file operation tools
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
export const readFileSchema = {
|
|
6
|
+
type: 'object' as const,
|
|
7
|
+
properties: {
|
|
8
|
+
filePath: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
description: 'Absolute path to the file to read',
|
|
11
|
+
},
|
|
12
|
+
offset: {
|
|
13
|
+
type: 'number',
|
|
14
|
+
description: 'Line number to start reading from (1-based)',
|
|
15
|
+
},
|
|
16
|
+
limit: {
|
|
17
|
+
type: 'number',
|
|
18
|
+
description: 'Number of lines to read',
|
|
19
|
+
},
|
|
20
|
+
encoding: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'File encoding (default: utf-8)',
|
|
23
|
+
default: 'utf-8',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
required: ['filePath'],
|
|
27
|
+
additionalProperties: false,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const writeFileSchema = {
|
|
31
|
+
type: 'object' as const,
|
|
32
|
+
properties: {
|
|
33
|
+
filePath: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Absolute path to the file to write',
|
|
36
|
+
},
|
|
37
|
+
content: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Content to write to the file',
|
|
40
|
+
},
|
|
41
|
+
createDirectories: {
|
|
42
|
+
type: 'boolean',
|
|
43
|
+
description: 'Create parent directories if they do not exist',
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
46
|
+
encoding: {
|
|
47
|
+
type: 'string',
|
|
48
|
+
description: 'File encoding (default: utf-8)',
|
|
49
|
+
default: 'utf-8',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: ['filePath', 'content'],
|
|
53
|
+
additionalProperties: false,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const editFileSchema = {
|
|
57
|
+
type: 'object' as const,
|
|
58
|
+
properties: {
|
|
59
|
+
filePath: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
description: 'Absolute path to the file to edit',
|
|
62
|
+
},
|
|
63
|
+
oldText: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
description: 'The text to replace (must be unique in the file)',
|
|
66
|
+
},
|
|
67
|
+
newText: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
description: 'The replacement text',
|
|
70
|
+
},
|
|
71
|
+
allOccurrences: {
|
|
72
|
+
type: 'boolean',
|
|
73
|
+
description: 'Replace all occurrences of oldText (default: false, replaces first only)',
|
|
74
|
+
default: false,
|
|
75
|
+
},
|
|
76
|
+
dryRun: {
|
|
77
|
+
type: 'boolean',
|
|
78
|
+
description: 'Preview the change without modifying the file',
|
|
79
|
+
default: false,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
required: ['filePath', 'oldText', 'newText'],
|
|
83
|
+
additionalProperties: false,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const listDirectorySchema = {
|
|
87
|
+
type: 'object' as const,
|
|
88
|
+
properties: {
|
|
89
|
+
dirPath: {
|
|
90
|
+
type: 'string',
|
|
91
|
+
description: 'Absolute path to the directory to list',
|
|
92
|
+
},
|
|
93
|
+
recursive: {
|
|
94
|
+
type: 'boolean',
|
|
95
|
+
description: 'List files recursively',
|
|
96
|
+
default: false,
|
|
97
|
+
},
|
|
98
|
+
includeHidden: {
|
|
99
|
+
type: 'boolean',
|
|
100
|
+
description: 'Include hidden files and directories',
|
|
101
|
+
default: false,
|
|
102
|
+
},
|
|
103
|
+
pattern: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'Glob pattern to filter results',
|
|
106
|
+
},
|
|
107
|
+
depth: {
|
|
108
|
+
type: 'number',
|
|
109
|
+
description: 'Maximum depth for recursive listing',
|
|
110
|
+
},
|
|
111
|
+
limit: {
|
|
112
|
+
type: 'number',
|
|
113
|
+
description: 'Maximum number of entries to return (default: 500). Use smaller values for faster results.',
|
|
114
|
+
default: 500,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
required: ['dirPath'],
|
|
118
|
+
additionalProperties: false,
|
|
119
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Schemas Barrel Export
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
export { readFileSchema, writeFileSchema, editFileSchema, listDirectorySchema } from './file.js';
|
|
6
|
+
export { searchFileSchema, searchContentSchema, globSchema } from './search.js';
|
|
7
|
+
export { executeCommandSchema } from './execution.js';
|
|
8
|
+
export { webSearchSchema, webFetchSchema } from './web.js';
|
|
9
|
+
export { memoryReadSchema, memoryWriteSchema } from './memory.js';
|
|
10
|
+
export { taskSchema } from './orchestration.js';
|
|
11
|
+
export { todoSchema } from './todo.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["memory.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;CAgB5B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B7B,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Memory Tool Schemas - JSON schemas for memory operations
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
export const memoryReadSchema = {
|
|
6
|
+
type: 'object' as const,
|
|
7
|
+
properties: {
|
|
8
|
+
key: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
description: 'Memory key to read',
|
|
11
|
+
},
|
|
12
|
+
scope: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'Memory scope ("session", "project", "global")',
|
|
15
|
+
enum: ['session', 'project', 'global'],
|
|
16
|
+
default: 'session',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
required: ['key'],
|
|
20
|
+
additionalProperties: false,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const memoryWriteSchema = {
|
|
24
|
+
type: 'object' as const,
|
|
25
|
+
properties: {
|
|
26
|
+
key: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Memory key to write',
|
|
29
|
+
},
|
|
30
|
+
value: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'Memory value to store',
|
|
33
|
+
},
|
|
34
|
+
scope: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'Memory scope ("session", "project", "global")',
|
|
37
|
+
enum: ['session', 'project', 'global'],
|
|
38
|
+
default: 'session',
|
|
39
|
+
},
|
|
40
|
+
ttl: {
|
|
41
|
+
type: 'number',
|
|
42
|
+
description: 'Time-to-live in milliseconds',
|
|
43
|
+
},
|
|
44
|
+
tags: {
|
|
45
|
+
type: 'array',
|
|
46
|
+
items: { type: 'string' },
|
|
47
|
+
description: 'Tags for categorization',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
required: ['key', 'value'],
|
|
51
|
+
additionalProperties: false,
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestration.d.ts","sourceRoot":"","sources":["orchestration.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCtB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Orchestration Tool Schemas - JSON schemas for agent orchestration
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
export const taskSchema = {
|
|
6
|
+
type: 'object' as const,
|
|
7
|
+
properties: {
|
|
8
|
+
description: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
description: 'Brief description of the task (3-5 words)',
|
|
11
|
+
},
|
|
12
|
+
prompt: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'Detailed task description for the sub-agent',
|
|
15
|
+
},
|
|
16
|
+
subagentType: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'Type of sub-agent to spawn',
|
|
19
|
+
enum: ['code-explorer', 'research', 'executor'],
|
|
20
|
+
default: 'research',
|
|
21
|
+
},
|
|
22
|
+
maxTurns: {
|
|
23
|
+
type: 'number',
|
|
24
|
+
description: 'Maximum number of agentic turns',
|
|
25
|
+
default: 10,
|
|
26
|
+
},
|
|
27
|
+
mode: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'Permission mode for the sub-agent',
|
|
30
|
+
enum: ['acceptEdits', 'bypassPermissions', 'default', 'plan'],
|
|
31
|
+
default: 'default',
|
|
32
|
+
},
|
|
33
|
+
name: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Name for the sub-agent (enables team mode)',
|
|
36
|
+
},
|
|
37
|
+
teamName: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Team to join (enables team mode)',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
required: ['description', 'prompt', 'subagentType'],
|
|
43
|
+
additionalProperties: false,
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["search.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6C/B,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BtB,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Search Tool Schemas - JSON schemas for search operations
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
export const searchFileSchema = {
|
|
6
|
+
type: 'object' as const,
|
|
7
|
+
properties: {
|
|
8
|
+
pattern: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
description: 'Glob pattern to search for (e.g., "*.ts", "test*.js")',
|
|
11
|
+
},
|
|
12
|
+
directory: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'Absolute path to the directory to search in',
|
|
15
|
+
},
|
|
16
|
+
recursive: {
|
|
17
|
+
type: 'boolean',
|
|
18
|
+
description: 'Search in subdirectories',
|
|
19
|
+
default: true,
|
|
20
|
+
},
|
|
21
|
+
caseSensitive: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
description: 'Case-sensitive search',
|
|
24
|
+
default: false,
|
|
25
|
+
},
|
|
26
|
+
excludePatterns: {
|
|
27
|
+
type: 'array',
|
|
28
|
+
items: { type: 'string' },
|
|
29
|
+
description: 'Glob patterns to exclude (e.g., ["node_modules", "*.test.ts"])',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
required: ['pattern', 'directory'],
|
|
33
|
+
additionalProperties: false,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const searchContentSchema = {
|
|
37
|
+
type: 'object' as const,
|
|
38
|
+
properties: {
|
|
39
|
+
pattern: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'Regular expression pattern to search for in file contents',
|
|
42
|
+
},
|
|
43
|
+
directory: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'Absolute path to the directory to search in',
|
|
46
|
+
},
|
|
47
|
+
filePattern: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'Glob pattern to filter files (e.g., "*.ts", "*.{js,tsx}")',
|
|
50
|
+
},
|
|
51
|
+
caseSensitive: {
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
description: 'Case-sensitive search',
|
|
54
|
+
default: false,
|
|
55
|
+
},
|
|
56
|
+
includeHidden: {
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
description: 'Include hidden files',
|
|
59
|
+
default: false,
|
|
60
|
+
},
|
|
61
|
+
maxResults: {
|
|
62
|
+
type: 'number',
|
|
63
|
+
description: 'Maximum number of matches to return',
|
|
64
|
+
},
|
|
65
|
+
contextBefore: {
|
|
66
|
+
type: 'number',
|
|
67
|
+
description: 'Number of lines to show before each match',
|
|
68
|
+
},
|
|
69
|
+
contextAfter: {
|
|
70
|
+
type: 'number',
|
|
71
|
+
description: 'Number of lines to show after each match',
|
|
72
|
+
},
|
|
73
|
+
multiline: {
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
description: 'Enable multiline mode',
|
|
76
|
+
default: false,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
required: ['pattern', 'directory'],
|
|
80
|
+
additionalProperties: false,
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const globSchema = {
|
|
84
|
+
type: 'object' as const,
|
|
85
|
+
properties: {
|
|
86
|
+
pattern: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
description: 'Glob pattern (e.g., "src/**/*.ts", "**/*.test.ts")',
|
|
89
|
+
},
|
|
90
|
+
directory: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'Base directory for the glob pattern',
|
|
93
|
+
},
|
|
94
|
+
ignore: {
|
|
95
|
+
type: 'array',
|
|
96
|
+
items: { type: 'string' },
|
|
97
|
+
description: 'Patterns to ignore',
|
|
98
|
+
},
|
|
99
|
+
absolute: {
|
|
100
|
+
type: 'boolean',
|
|
101
|
+
description: 'Return absolute paths',
|
|
102
|
+
default: false,
|
|
103
|
+
},
|
|
104
|
+
dot: {
|
|
105
|
+
type: 'boolean',
|
|
106
|
+
description: 'Include dotfiles',
|
|
107
|
+
default: false,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
required: ['pattern', 'directory'],
|
|
111
|
+
additionalProperties: false,
|
|
112
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"todo.d.ts","sourceRoot":"","sources":["todo.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BtB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Todo Tool Schema
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
export const todoSchema = {
|
|
6
|
+
type: 'object' as const,
|
|
7
|
+
properties: {
|
|
8
|
+
action: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
enum: ['list', 'create', 'update', 'clear'],
|
|
11
|
+
description: 'Action to perform: list (show tasks), create (add tasks), update (change status), clear (remove all)',
|
|
12
|
+
},
|
|
13
|
+
items: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'JSON array of task strings to create (for action=create). Example: \'["Task 1", "Task 2"]\'',
|
|
16
|
+
},
|
|
17
|
+
id: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: 'Task ID to update (for action=update)',
|
|
20
|
+
},
|
|
21
|
+
content: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'New content for the task (for action=update)',
|
|
24
|
+
},
|
|
25
|
+
status: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
enum: ['pending', 'in_progress', 'completed'],
|
|
28
|
+
description: 'New status for the task (for action=update)',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
additionalProperties: false,
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["web.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC3B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8C1B,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Web Tool Schemas - JSON schemas for web operations
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
export const webSearchSchema = {
|
|
6
|
+
type: 'object' as const,
|
|
7
|
+
properties: {
|
|
8
|
+
query: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
description: 'Search query string',
|
|
11
|
+
},
|
|
12
|
+
maxResults: {
|
|
13
|
+
type: 'number',
|
|
14
|
+
description: 'Maximum number of results to return (default: 10)',
|
|
15
|
+
default: 10,
|
|
16
|
+
},
|
|
17
|
+
language: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: 'Language code for search results (e.g., "en", "zh")',
|
|
20
|
+
},
|
|
21
|
+
region: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'Region for search results (e.g., "us", "cn")',
|
|
24
|
+
},
|
|
25
|
+
safeSearch: {
|
|
26
|
+
type: 'boolean',
|
|
27
|
+
description: 'Enable safe search',
|
|
28
|
+
default: true,
|
|
29
|
+
},
|
|
30
|
+
freshness: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'Time filter (e.g., "day", "week", "month", "year")',
|
|
33
|
+
enum: ['day', 'week', 'month', 'year'],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
required: ['query'],
|
|
37
|
+
additionalProperties: false,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const webFetchSchema = {
|
|
41
|
+
type: 'object' as const,
|
|
42
|
+
properties: {
|
|
43
|
+
url: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'URL to fetch content from',
|
|
46
|
+
},
|
|
47
|
+
method: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'HTTP method (default: "GET")',
|
|
50
|
+
enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
|
|
51
|
+
default: 'GET',
|
|
52
|
+
},
|
|
53
|
+
headers: {
|
|
54
|
+
type: 'object',
|
|
55
|
+
description: 'HTTP headers',
|
|
56
|
+
additionalProperties: { type: 'string' },
|
|
57
|
+
},
|
|
58
|
+
body: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Request body (for POST/PUT/PATCH)',
|
|
61
|
+
},
|
|
62
|
+
timeout: {
|
|
63
|
+
type: 'number',
|
|
64
|
+
description: 'Timeout in milliseconds (default: 10000)',
|
|
65
|
+
default: 10000,
|
|
66
|
+
},
|
|
67
|
+
followRedirects: {
|
|
68
|
+
type: 'boolean',
|
|
69
|
+
description: 'Follow HTTP redirects (default: true)',
|
|
70
|
+
default: true,
|
|
71
|
+
},
|
|
72
|
+
format: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
description: 'Output format (default: "markdown")',
|
|
75
|
+
enum: ['markdown', 'html', 'text', 'json'],
|
|
76
|
+
default: 'markdown',
|
|
77
|
+
},
|
|
78
|
+
maxLength: {
|
|
79
|
+
type: 'number',
|
|
80
|
+
description: 'Maximum response length in characters (default: 50000)',
|
|
81
|
+
default: 50000,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
required: ['url'],
|
|
85
|
+
additionalProperties: false,
|
|
86
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.ts"],"names":[],"mappings":"AAIA,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