neuro-cli 4.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.
- package/LICENSE +21 -0
- package/README.md +510 -0
- package/dist/advisor/advisor.d.ts +50 -0
- package/dist/advisor/advisor.js +178 -0
- package/dist/agents/base.d.ts +62 -0
- package/dist/agents/base.js +215 -0
- package/dist/agents/orchestrator.d.ts +46 -0
- package/dist/agents/orchestrator.js +192 -0
- package/dist/agents/team.d.ts +51 -0
- package/dist/agents/team.js +210 -0
- package/dist/api/models.d.ts +23 -0
- package/dist/api/models.js +514 -0
- package/dist/api/ollama.d.ts +153 -0
- package/dist/api/ollama.js +751 -0
- package/dist/api/openrouter.d.ts +55 -0
- package/dist/api/openrouter.js +223 -0
- package/dist/commands/commands.d.ts +43 -0
- package/dist/commands/commands.js +308 -0
- package/dist/config/config.d.ts +8 -0
- package/dist/config/config.js +311 -0
- package/dist/context/compaction.d.ts +54 -0
- package/dist/context/compaction.js +251 -0
- package/dist/context/custom-agents.d.ts +107 -0
- package/dist/context/custom-agents.js +397 -0
- package/dist/context/custom-tools.d.ts +120 -0
- package/dist/context/custom-tools.js +564 -0
- package/dist/context/git-checkpoint.d.ts +52 -0
- package/dist/context/git-checkpoint.js +240 -0
- package/dist/context/neuro-md.d.ts +48 -0
- package/dist/context/neuro-md.js +202 -0
- package/dist/context/neuroignore.d.ts +102 -0
- package/dist/context/neuroignore.js +441 -0
- package/dist/context/repo-map.d.ts +38 -0
- package/dist/context/repo-map.js +220 -0
- package/dist/context/skill-standard.d.ts +262 -0
- package/dist/context/skill-standard.js +1156 -0
- package/dist/context/skill-system.d.ts +75 -0
- package/dist/context/skill-system.js +578 -0
- package/dist/context/tree-sitter.d.ts +99 -0
- package/dist/context/tree-sitter.js +1956 -0
- package/dist/core/acp.d.ts +325 -0
- package/dist/core/acp.js +1498 -0
- package/dist/core/api-server.d.ts +143 -0
- package/dist/core/api-server.js +550 -0
- package/dist/core/approval.d.ts +81 -0
- package/dist/core/approval.js +432 -0
- package/dist/core/auto-compact.d.ts +127 -0
- package/dist/core/auto-compact.js +436 -0
- package/dist/core/auto-mode.d.ts +232 -0
- package/dist/core/auto-mode.js +831 -0
- package/dist/core/background-session.d.ts +166 -0
- package/dist/core/background-session.js +696 -0
- package/dist/core/cicd.d.ts +257 -0
- package/dist/core/cicd.js +1443 -0
- package/dist/core/cloud-sync.d.ts +156 -0
- package/dist/core/cloud-sync.js +582 -0
- package/dist/core/code-review.d.ts +132 -0
- package/dist/core/code-review.js +1191 -0
- package/dist/core/completion.d.ts +49 -0
- package/dist/core/completion.js +384 -0
- package/dist/core/context.d.ts +38 -0
- package/dist/core/context.js +144 -0
- package/dist/core/diff-preview.d.ts +35 -0
- package/dist/core/diff-preview.js +173 -0
- package/dist/core/doom-loop.d.ts +51 -0
- package/dist/core/doom-loop.js +179 -0
- package/dist/core/engine.d.ts +183 -0
- package/dist/core/engine.js +942 -0
- package/dist/core/extended-thinking.d.ts +103 -0
- package/dist/core/extended-thinking.js +269 -0
- package/dist/core/fallback.d.ts +54 -0
- package/dist/core/fallback.js +104 -0
- package/dist/core/git-worktree.d.ts +139 -0
- package/dist/core/git-worktree.js +614 -0
- package/dist/core/headless.d.ts +30 -0
- package/dist/core/headless.js +101 -0
- package/dist/core/i18n.d.ts +83 -0
- package/dist/core/i18n.js +739 -0
- package/dist/core/linting.d.ts +129 -0
- package/dist/core/linting.js +699 -0
- package/dist/core/model-router.d.ts +109 -0
- package/dist/core/model-router.js +581 -0
- package/dist/core/multi-model.d.ts +243 -0
- package/dist/core/multi-model.js +1099 -0
- package/dist/core/multi-session.d.ts +144 -0
- package/dist/core/multi-session.js +442 -0
- package/dist/core/multimodal.d.ts +125 -0
- package/dist/core/multimodal.js +286 -0
- package/dist/core/observability.d.ts +93 -0
- package/dist/core/observability.js +737 -0
- package/dist/core/os-sandbox.d.ts +122 -0
- package/dist/core/os-sandbox.js +1193 -0
- package/dist/core/outcome-grading.d.ts +228 -0
- package/dist/core/outcome-grading.js +1123 -0
- package/dist/core/output-styles.d.ts +57 -0
- package/dist/core/output-styles.js +382 -0
- package/dist/core/parallel-agents.d.ts +183 -0
- package/dist/core/parallel-agents.js +563 -0
- package/dist/core/plugin-bundle.d.ts +236 -0
- package/dist/core/plugin-bundle.js +887 -0
- package/dist/core/plugin-sdk.d.ts +139 -0
- package/dist/core/plugin-sdk.js +273 -0
- package/dist/core/prompt-cache.d.ts +163 -0
- package/dist/core/prompt-cache.js +599 -0
- package/dist/core/sandbox.d.ts +127 -0
- package/dist/core/sandbox.js +369 -0
- package/dist/core/scheduled-tasks.d.ts +151 -0
- package/dist/core/scheduled-tasks.js +502 -0
- package/dist/core/security-scanner.d.ts +160 -0
- package/dist/core/security-scanner.js +1494 -0
- package/dist/core/session.d.ts +83 -0
- package/dist/core/session.js +269 -0
- package/dist/core/shell-completion.d.ts +51 -0
- package/dist/core/shell-completion.js +674 -0
- package/dist/core/smart-monitor.d.ts +146 -0
- package/dist/core/smart-monitor.js +1199 -0
- package/dist/core/spec-driven.d.ts +233 -0
- package/dist/core/spec-driven.js +1485 -0
- package/dist/core/spending-warnings.d.ts +123 -0
- package/dist/core/spending-warnings.js +456 -0
- package/dist/core/sub-agent.d.ts +298 -0
- package/dist/core/sub-agent.js +1023 -0
- package/dist/core/telemetry.d.ts +157 -0
- package/dist/core/telemetry.js +412 -0
- package/dist/core/terminal-ux.d.ts +134 -0
- package/dist/core/terminal-ux.js +649 -0
- package/dist/core/testing.d.ts +146 -0
- package/dist/core/testing.js +1200 -0
- package/dist/core/types.d.ts +439 -0
- package/dist/core/types.js +6 -0
- package/dist/core/undo-redo.d.ts +112 -0
- package/dist/core/undo-redo.js +290 -0
- package/dist/core/updater.d.ts +159 -0
- package/dist/core/updater.js +608 -0
- package/dist/core/vim-mode.d.ts +151 -0
- package/dist/core/vim-mode.js +771 -0
- package/dist/core/voice.d.ts +137 -0
- package/dist/core/voice.js +538 -0
- package/dist/core/web-dashboard.d.ts +109 -0
- package/dist/core/web-dashboard.js +484 -0
- package/dist/hooks/hooks.d.ts +74 -0
- package/dist/hooks/hooks.js +160 -0
- package/dist/hooks/llm-evaluator.d.ts +165 -0
- package/dist/hooks/llm-evaluator.js +560 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1186 -0
- package/dist/lsp/lsp-manager.d.ts +63 -0
- package/dist/lsp/lsp-manager.js +351 -0
- package/dist/mcp/client.d.ts +133 -0
- package/dist/mcp/client.js +684 -0
- package/dist/mcp/mcp-apps.d.ts +70 -0
- package/dist/mcp/mcp-apps.js +1007 -0
- package/dist/tools/bash.d.ts +5 -0
- package/dist/tools/bash.js +195 -0
- package/dist/tools/browser.d.ts +92 -0
- package/dist/tools/browser.js +1570 -0
- package/dist/tools/extended.d.ts +6 -0
- package/dist/tools/extended.js +191 -0
- package/dist/tools/file.d.ts +10 -0
- package/dist/tools/file.js +382 -0
- package/dist/tools/github.d.ts +389 -0
- package/dist/tools/github.js +759 -0
- package/dist/tools/index.d.ts +9 -0
- package/dist/tools/index.js +40 -0
- package/dist/tools/memory.d.ts +6 -0
- package/dist/tools/memory.js +197 -0
- package/dist/tools/registry.d.ts +29 -0
- package/dist/tools/registry.js +64 -0
- package/dist/tools/web.d.ts +6 -0
- package/dist/tools/web.js +150 -0
- package/dist/ui/renderer.d.ts +97 -0
- package/dist/ui/renderer.js +279 -0
- package/dist/ui/theme.d.ts +27 -0
- package/dist/ui/theme.js +106 -0
- package/package.json +83 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NeuroCLI — SKILL.md Standard Compliance System
|
|
3
|
+
*
|
|
4
|
+
* Implements the agentskills.io specification for SKILL.md files.
|
|
5
|
+
* Provides auto-discovery, parsing, activation, registry, and
|
|
6
|
+
* cross-tool compatibility with Claude Code, Codex CLI, and GitHub Copilot.
|
|
7
|
+
*
|
|
8
|
+
* Uses only Node.js built-in modules (fs, path, os, crypto, https, http, url).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Represents a fully-parsed SKILL.md definition conforming to the
|
|
12
|
+
* agentskills.io specification.
|
|
13
|
+
*/
|
|
14
|
+
export interface StandardSkillDefinition {
|
|
15
|
+
/** Unique skill name (lowercase, hyphens, max 64 chars) — REQUIRED */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Trigger condition for agent activation — REQUIRED */
|
|
18
|
+
description: string;
|
|
19
|
+
/** Semantic version string — optional */
|
|
20
|
+
version?: string;
|
|
21
|
+
/** Author or organisation — optional */
|
|
22
|
+
author?: string;
|
|
23
|
+
/** Searchable tags — optional */
|
|
24
|
+
tags?: string[];
|
|
25
|
+
/** Tools this skill requires access to — optional */
|
|
26
|
+
tools?: string[];
|
|
27
|
+
/** Priority 0-100 (higher = more important) — optional, default 50 */
|
|
28
|
+
priority?: number;
|
|
29
|
+
/** Invocation mode: "explicit" (user-triggered) or "auto" (agent decides) */
|
|
30
|
+
invoke?: "explicit" | "auto";
|
|
31
|
+
/** Load timing: "startup" or "on-demand" — optional, default "on-demand" */
|
|
32
|
+
load?: "startup" | "on-demand";
|
|
33
|
+
/** Full Markdown body after frontmatter */
|
|
34
|
+
body: string;
|
|
35
|
+
/** Absolute file-system path to the SKILL.md file */
|
|
36
|
+
filePath: string;
|
|
37
|
+
/** Source of the skill: "global" or "project" */
|
|
38
|
+
source: "global" | "project";
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Minimal representation used for the compact listing that the agent sees
|
|
42
|
+
* when deciding which skill to activate.
|
|
43
|
+
*/
|
|
44
|
+
export interface SkillCompactEntry {
|
|
45
|
+
name: string;
|
|
46
|
+
description: string;
|
|
47
|
+
priority: number;
|
|
48
|
+
invoke: "explicit" | "auto";
|
|
49
|
+
load: "startup" | "on-demand";
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Result of parsing a SKILL.md file — includes both the definition and
|
|
53
|
+
* any validation warnings encountered.
|
|
54
|
+
*/
|
|
55
|
+
export interface ParseResult {
|
|
56
|
+
skill: StandardSkillDefinition | null;
|
|
57
|
+
warnings: string[];
|
|
58
|
+
errors: string[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Represents an entry in the Neuro skill registry (local or remote).
|
|
62
|
+
*/
|
|
63
|
+
export interface SkillRegistryEntry {
|
|
64
|
+
/** Unique skill name */
|
|
65
|
+
name: string;
|
|
66
|
+
/** Human-readable description */
|
|
67
|
+
description: string;
|
|
68
|
+
/** Semantic version */
|
|
69
|
+
version: string;
|
|
70
|
+
/** Author */
|
|
71
|
+
author: string;
|
|
72
|
+
/** Tags */
|
|
73
|
+
tags: string[];
|
|
74
|
+
/** Download URL or local path */
|
|
75
|
+
source: string;
|
|
76
|
+
/** SHA-256 checksum of the SKILL.md content */
|
|
77
|
+
checksum: string;
|
|
78
|
+
/** ISO-8601 timestamp of when the entry was added */
|
|
79
|
+
addedAt: string;
|
|
80
|
+
/** Whether the skill is currently installed locally */
|
|
81
|
+
installed: boolean;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Options for the SkillStandard constructor.
|
|
85
|
+
*/
|
|
86
|
+
export interface SkillStandardOptions {
|
|
87
|
+
/** Override the global skills directory (default: ~/.neuro/skills) */
|
|
88
|
+
globalSkillsDir?: string;
|
|
89
|
+
/** Override the project skills directory (default: .neuro/skills) */
|
|
90
|
+
projectSkillsDir?: string;
|
|
91
|
+
/** Whether to enable caching (default: true) */
|
|
92
|
+
enableCache?: boolean;
|
|
93
|
+
/** Cache TTL in milliseconds (default: 300 000) */
|
|
94
|
+
cacheTtlMs?: number;
|
|
95
|
+
/** Custom registry base URL (default: https://registry.agentskills.io) */
|
|
96
|
+
registryBaseUrl?: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Detect the skill format from the file name.
|
|
100
|
+
*/
|
|
101
|
+
type SkillFormat = "neuro" | "claude" | "codex" | "copilot";
|
|
102
|
+
/**
|
|
103
|
+
* Core class implementing the agentskills.io SKILL.md standard compliance
|
|
104
|
+
* system for NeuroCLI.
|
|
105
|
+
*
|
|
106
|
+
* Handles discovery, parsing, activation, installation, search, publishing,
|
|
107
|
+
* and cross-tool compatibility.
|
|
108
|
+
*/
|
|
109
|
+
export declare class SkillStandard {
|
|
110
|
+
private globalSkillsDir;
|
|
111
|
+
private projectSkillsDir;
|
|
112
|
+
private enableCache;
|
|
113
|
+
private cacheTtlMs;
|
|
114
|
+
private registryBaseUrl;
|
|
115
|
+
/** In-memory skill definitions, keyed by name */
|
|
116
|
+
private skills;
|
|
117
|
+
/** Compact listing cache for agent activation */
|
|
118
|
+
private compactListing;
|
|
119
|
+
/** Internal cache */
|
|
120
|
+
private cache;
|
|
121
|
+
/** Local registry index (file-backed) */
|
|
122
|
+
private registryIndex;
|
|
123
|
+
/** Path to the local registry file */
|
|
124
|
+
private registryFilePath;
|
|
125
|
+
/** Whether discovery has been run at least once */
|
|
126
|
+
private discovered;
|
|
127
|
+
constructor(options?: SkillStandardOptions);
|
|
128
|
+
/**
|
|
129
|
+
* Discover all skills from both global and project directories.
|
|
130
|
+
* Reads ONLY the `name` and `description` from each skill's YAML
|
|
131
|
+
* frontmatter for the compact listing, but also caches full definitions.
|
|
132
|
+
*
|
|
133
|
+
* @param projectRoot - The root directory of the current project
|
|
134
|
+
* @returns Array of compact skill entries for agent activation
|
|
135
|
+
*/
|
|
136
|
+
discoverSkills(projectRoot: string): SkillCompactEntry[];
|
|
137
|
+
/**
|
|
138
|
+
* Parse a SKILL.md file according to the agentskills.io specification.
|
|
139
|
+
* Supports cross-tool format detection and automatic adaptation.
|
|
140
|
+
*
|
|
141
|
+
* @param filePath - Absolute path to the SKILL.md (or compatible) file
|
|
142
|
+
* @returns Parse result with skill definition, warnings, and errors
|
|
143
|
+
*/
|
|
144
|
+
parseSkillMd(filePath: string): ParseResult;
|
|
145
|
+
/**
|
|
146
|
+
* Get the compact listing of name+description pairs for agent activation.
|
|
147
|
+
* This is the minimal information the agent sees to decide which skill
|
|
148
|
+
* to activate. Must call discoverSkills() first.
|
|
149
|
+
*
|
|
150
|
+
* @returns Array of compact skill entries
|
|
151
|
+
*/
|
|
152
|
+
getCompactListing(): SkillCompactEntry[];
|
|
153
|
+
/**
|
|
154
|
+
* Activate a skill if its description matches the current context or prompt.
|
|
155
|
+
* For "auto" invoke skills, the description is used as a trigger condition.
|
|
156
|
+
* For "explicit" invoke skills, the skill name must be directly referenced.
|
|
157
|
+
*
|
|
158
|
+
* @param name - The skill name to activate
|
|
159
|
+
* @param prompt - The current user prompt or context for matching
|
|
160
|
+
* @returns The full skill definition if activated, or null
|
|
161
|
+
*/
|
|
162
|
+
activateSkill(name: string, prompt: string): StandardSkillDefinition | null;
|
|
163
|
+
/**
|
|
164
|
+
* Install a skill from a URL or local path.
|
|
165
|
+
*
|
|
166
|
+
* @param source - URL (http/https) or local file path to the SKILL.md
|
|
167
|
+
* @param options - Installation options
|
|
168
|
+
* @returns The installed skill definition, or null on failure
|
|
169
|
+
*/
|
|
170
|
+
installSkill(source: string, options?: {
|
|
171
|
+
/** Install to global directory instead of project directory */
|
|
172
|
+
global?: boolean;
|
|
173
|
+
/** Override the skill name (auto-detected from frontmatter by default) */
|
|
174
|
+
name?: string;
|
|
175
|
+
/** Project root for project-level installs */
|
|
176
|
+
projectRoot?: string;
|
|
177
|
+
}): Promise<{
|
|
178
|
+
skill: StandardSkillDefinition | null;
|
|
179
|
+
errors: string[];
|
|
180
|
+
}>;
|
|
181
|
+
/**
|
|
182
|
+
* Search available skills from the registry.
|
|
183
|
+
* Searches both the local registry index and the remote registry.
|
|
184
|
+
*
|
|
185
|
+
* @param query - Search query string
|
|
186
|
+
* @returns Array of matching registry entries
|
|
187
|
+
*/
|
|
188
|
+
searchSkills(query: string): Promise<SkillRegistryEntry[]>;
|
|
189
|
+
/**
|
|
190
|
+
* Publish a skill to the registry.
|
|
191
|
+
*
|
|
192
|
+
* @param skillPath - Path to the SKILL.md file or the skill directory
|
|
193
|
+
* @returns The registry entry created, or null on failure
|
|
194
|
+
*/
|
|
195
|
+
publishSkill(skillPath: string): Promise<{
|
|
196
|
+
entry: SkillRegistryEntry | null;
|
|
197
|
+
errors: string[];
|
|
198
|
+
}>;
|
|
199
|
+
/**
|
|
200
|
+
* Get the full content of an activated skill.
|
|
201
|
+
* This should be called after activateSkill() returns a match.
|
|
202
|
+
*
|
|
203
|
+
* @param name - The skill name
|
|
204
|
+
* @returns The full skill definition including the Markdown body, or null
|
|
205
|
+
*/
|
|
206
|
+
getSkillContent(name: string): StandardSkillDefinition | null;
|
|
207
|
+
/**
|
|
208
|
+
* List all installed skills with their current status.
|
|
209
|
+
*
|
|
210
|
+
* @returns Array of skill definitions with status information
|
|
211
|
+
*/
|
|
212
|
+
listInstalled(): Array<StandardSkillDefinition & {
|
|
213
|
+
/** Whether the skill is currently loaded in memory */
|
|
214
|
+
loaded: boolean;
|
|
215
|
+
/** The skill format origin */
|
|
216
|
+
format: SkillFormat;
|
|
217
|
+
}>;
|
|
218
|
+
/**
|
|
219
|
+
* Parse a standard Neuro SKILL.md file.
|
|
220
|
+
*/
|
|
221
|
+
private parseNeuroFormat;
|
|
222
|
+
/**
|
|
223
|
+
* Invalidate the discovery cache.
|
|
224
|
+
*/
|
|
225
|
+
private invalidateCache;
|
|
226
|
+
/**
|
|
227
|
+
* Load the local registry index from disk.
|
|
228
|
+
*/
|
|
229
|
+
private loadRegistryIndex;
|
|
230
|
+
/**
|
|
231
|
+
* Save the local registry index to disk.
|
|
232
|
+
*/
|
|
233
|
+
private saveRegistryIndex;
|
|
234
|
+
/**
|
|
235
|
+
* Update a single registry entry.
|
|
236
|
+
*/
|
|
237
|
+
private updateRegistryEntry;
|
|
238
|
+
/**
|
|
239
|
+
* Search the remote skill registry.
|
|
240
|
+
*/
|
|
241
|
+
private searchRemoteRegistry;
|
|
242
|
+
/**
|
|
243
|
+
* Check if a registry entry matches the given query terms.
|
|
244
|
+
*/
|
|
245
|
+
private matchesQuery;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Create a new SKILL.md file at the specified path.
|
|
249
|
+
* Convenience function for bootstrapping new skills.
|
|
250
|
+
*/
|
|
251
|
+
export declare function createSkillFile(dirPath: string, definition: Omit<StandardSkillDefinition, "filePath" | "source" | "body"> & {
|
|
252
|
+
body?: string;
|
|
253
|
+
}): string;
|
|
254
|
+
/**
|
|
255
|
+
* Validate a skill name against the specification requirements.
|
|
256
|
+
*/
|
|
257
|
+
export declare function validateSkillName(name: string): {
|
|
258
|
+
valid: boolean;
|
|
259
|
+
errors: string[];
|
|
260
|
+
};
|
|
261
|
+
export {};
|
|
262
|
+
//# sourceMappingURL=skill-standard.d.ts.map
|