@ace-sdk/cli 2.0.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/README.md +61 -0
- package/dist/cli.d.ts +14 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +427 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/bootstrap.d.ts +19 -0
- package/dist/commands/bootstrap.d.ts.map +1 -0
- package/dist/commands/bootstrap.js +157 -0
- package/dist/commands/bootstrap.js.map +1 -0
- package/dist/commands/cache.d.ts +19 -0
- package/dist/commands/cache.d.ts.map +1 -0
- package/dist/commands/cache.js +101 -0
- package/dist/commands/cache.js.map +1 -0
- package/dist/commands/clear.d.ts +12 -0
- package/dist/commands/clear.d.ts.map +1 -0
- package/dist/commands/clear.js +50 -0
- package/dist/commands/clear.js.map +1 -0
- package/dist/commands/config.d.ts +34 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +423 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/delta.d.ts +14 -0
- package/dist/commands/delta.d.ts.map +1 -0
- package/dist/commands/delta.js +140 -0
- package/dist/commands/delta.js.map +1 -0
- package/dist/commands/doctor.d.ts +8 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +187 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/export.d.ts +12 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +45 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/import.d.ts +13 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +87 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/learn.d.ts +17 -0
- package/dist/commands/learn.d.ts.map +1 -0
- package/dist/commands/learn.js +193 -0
- package/dist/commands/learn.js.map +1 -0
- package/dist/commands/patterns.d.ts +13 -0
- package/dist/commands/patterns.d.ts.map +1 -0
- package/dist/commands/patterns.js +76 -0
- package/dist/commands/patterns.js.map +1 -0
- package/dist/commands/plugin.d.ts +26 -0
- package/dist/commands/plugin.d.ts.map +1 -0
- package/dist/commands/plugin.js +267 -0
- package/dist/commands/plugin.js.map +1 -0
- package/dist/commands/projects.d.ts +15 -0
- package/dist/commands/projects.d.ts.map +1 -0
- package/dist/commands/projects.js +122 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/record.d.ts +32 -0
- package/dist/commands/record.d.ts.map +1 -0
- package/dist/commands/record.js +307 -0
- package/dist/commands/record.js.map +1 -0
- package/dist/commands/search.d.ts +16 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +125 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/status.d.ts +8 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +63 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/summarize.d.ts +17 -0
- package/dist/commands/summarize.d.ts.map +1 -0
- package/dist/commands/summarize.js +167 -0
- package/dist/commands/summarize.js.map +1 -0
- package/dist/commands/top.d.ts +14 -0
- package/dist/commands/top.d.ts.map +1 -0
- package/dist/commands/top.js +58 -0
- package/dist/commands/top.js.map +1 -0
- package/dist/commands/tune.d.ts +36 -0
- package/dist/commands/tune.d.ts.map +1 -0
- package/dist/commands/tune.js +354 -0
- package/dist/commands/tune.js.map +1 -0
- package/dist/formatters/playbook-formatter.d.ts +19 -0
- package/dist/formatters/playbook-formatter.d.ts.map +1 -0
- package/dist/formatters/playbook-formatter.js +56 -0
- package/dist/formatters/playbook-formatter.js.map +1 -0
- package/dist/formatters/search-formatter.d.ts +28 -0
- package/dist/formatters/search-formatter.d.ts.map +1 -0
- package/dist/formatters/search-formatter.js +48 -0
- package/dist/formatters/search-formatter.js.map +1 -0
- package/dist/formatters/status-formatter.d.ts +25 -0
- package/dist/formatters/status-formatter.d.ts.map +1 -0
- package/dist/formatters/status-formatter.js +46 -0
- package/dist/formatters/status-formatter.js.map +1 -0
- package/dist/services/config-loader.d.ts +8 -0
- package/dist/services/config-loader.d.ts.map +1 -0
- package/dist/services/config-loader.js +7 -0
- package/dist/services/config-loader.js.map +1 -0
- package/dist/services/initialization.d.ts +128 -0
- package/dist/services/initialization.d.ts.map +1 -0
- package/dist/services/initialization.js +874 -0
- package/dist/services/initialization.js.map +1 -0
- package/dist/services/language-detector.d.ts +63 -0
- package/dist/services/language-detector.d.ts.map +1 -0
- package/dist/services/language-detector.js +123 -0
- package/dist/services/language-detector.js.map +1 -0
- package/dist/services/logger.d.ts +97 -0
- package/dist/services/logger.d.ts.map +1 -0
- package/dist/services/logger.js +229 -0
- package/dist/services/logger.js.map +1 -0
- package/dist/services/plugin-loader.d.ts +84 -0
- package/dist/services/plugin-loader.d.ts.map +1 -0
- package/dist/services/plugin-loader.js +282 -0
- package/dist/services/plugin-loader.js.map +1 -0
- package/dist/services/recorder.d.ts +80 -0
- package/dist/services/recorder.d.ts.map +1 -0
- package/dist/services/recorder.js +267 -0
- package/dist/services/recorder.js.map +1 -0
- package/dist/services/server-client.d.ts +32 -0
- package/dist/services/server-client.d.ts.map +1 -0
- package/dist/services/server-client.js +68 -0
- package/dist/services/server-client.js.map +1 -0
- package/dist/services/session-storage.d.ts +20 -0
- package/dist/services/session-storage.d.ts.map +1 -0
- package/dist/services/session-storage.js +29 -0
- package/dist/services/session-storage.js.map +1 -0
- package/dist/types/config.d.ts +33 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +63 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/pattern.d.ts +8 -0
- package/dist/types/pattern.d.ts.map +1 -0
- package/dist/types/pattern.js +7 -0
- package/dist/types/pattern.js.map +1 -0
- package/dist/types/plugin.d.ts +87 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +5 -0
- package/dist/types/plugin.js.map +1 -0
- package/dist/types/recorder.d.ts +44 -0
- package/dist/types/recorder.d.ts.map +1 -0
- package/dist/types/recorder.js +5 -0
- package/dist/types/recorder.js.map +1 -0
- package/dist/utils/code-extractor.d.ts +8 -0
- package/dist/utils/code-extractor.d.ts.map +1 -0
- package/dist/utils/code-extractor.js +7 -0
- package/dist/utils/code-extractor.js.map +1 -0
- package/dist/utils/semver.d.ts +13 -0
- package/dist/utils/semver.d.ts.map +1 -0
- package/dist/utils/semver.js +14 -0
- package/dist/utils/semver.js.map +1 -0
- package/dist/utils/version-checker.d.ts +27 -0
- package/dist/utils/version-checker.d.ts.map +1 -0
- package/dist/utils/version-checker.js +141 -0
- package/dist/utils/version-checker.js.map +1 -0
- package/package.json +64 -0
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# @ace-sdk/cli
|
|
2
|
+
|
|
3
|
+
Command-line tool for ACE pattern learning.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@ace-sdk/cli)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g @ace-sdk/cli
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- **32+ Commands**: patterns, search, learn, bootstrap, and more
|
|
17
|
+
- **Multi-Org Support**: Work with multiple organizations and projects
|
|
18
|
+
- **3-Tier Caching**: RAM → SQLite → Server for fast pattern access
|
|
19
|
+
- **Session Recording**: Capture execution traces for AI-powered learning
|
|
20
|
+
- **JSON Output**: Automation-friendly structured output
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Configure connection to ACE Server
|
|
26
|
+
ce-ace config
|
|
27
|
+
|
|
28
|
+
# View patterns in your playbook
|
|
29
|
+
ce-ace patterns
|
|
30
|
+
|
|
31
|
+
# Search for relevant patterns
|
|
32
|
+
ce-ace search "authentication best practices"
|
|
33
|
+
|
|
34
|
+
# Bootstrap playbook from existing codebase
|
|
35
|
+
ce-ace bootstrap --mode hybrid
|
|
36
|
+
|
|
37
|
+
# Submit learning from execution
|
|
38
|
+
ce-ace learn --task "Fixed JWT bug" --success --output "Token validation matters"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Commands Overview
|
|
42
|
+
|
|
43
|
+
| Command | Description |
|
|
44
|
+
|---------|-------------|
|
|
45
|
+
| `patterns` | View playbook patterns |
|
|
46
|
+
| `search` | Semantic search across patterns |
|
|
47
|
+
| `learn` | Submit execution trace for learning |
|
|
48
|
+
| `bootstrap` | Initialize playbook from codebase |
|
|
49
|
+
| `status` | Show playbook statistics |
|
|
50
|
+
| `config` | Configure server connection |
|
|
51
|
+
| `doctor` | Run diagnostics |
|
|
52
|
+
|
|
53
|
+
## Documentation
|
|
54
|
+
|
|
55
|
+
Full documentation: [packages/cli/docs](./docs)
|
|
56
|
+
|
|
57
|
+
See also: [Root README](../../README.md) for complete command reference.
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT © [CE.NET Team](mailto:ace@code-engine.net)
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ACE CLI - Standalone command-line tool for pattern learning and playbook management
|
|
4
|
+
*/
|
|
5
|
+
export interface GlobalOptions {
|
|
6
|
+
json: boolean;
|
|
7
|
+
verbose: boolean;
|
|
8
|
+
quiet: boolean;
|
|
9
|
+
trace: boolean;
|
|
10
|
+
org?: string;
|
|
11
|
+
project?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare let globalOptions: GlobalOptions;
|
|
14
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;GAEG;AAuIH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAGD,eAAO,IAAI,aAAa,EAAE,aAOzB,CAAC"}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ACE CLI - Standalone command-line tool for pattern learning and playbook management
|
|
4
|
+
*/
|
|
5
|
+
import { Command } from 'commander';
|
|
6
|
+
import tabtab from 'tabtab';
|
|
7
|
+
import { configCommand, configShowCommand, configSetCommand, configResetCommand, configValidateCommand } from './commands/config.js';
|
|
8
|
+
import { doctorCommand } from './commands/doctor.js';
|
|
9
|
+
import { patternsCommand } from './commands/patterns.js';
|
|
10
|
+
import { searchCommand } from './commands/search.js';
|
|
11
|
+
import { topCommand } from './commands/top.js';
|
|
12
|
+
import { learnCommand } from './commands/learn.js';
|
|
13
|
+
import { bootstrapCommand } from './commands/bootstrap.js';
|
|
14
|
+
import { statusCommand } from './commands/status.js';
|
|
15
|
+
import { clearCommand } from './commands/clear.js';
|
|
16
|
+
import { cacheCommand, cacheRecallCommand } from './commands/cache.js';
|
|
17
|
+
import { deltaCommand } from './commands/delta.js';
|
|
18
|
+
import { exportCommand } from './commands/export.js';
|
|
19
|
+
import { importCommand } from './commands/import.js';
|
|
20
|
+
import { recordStartCommand, recordStopCommand, recordListCommand, recordExportCommand, recordDeleteCommand, recordStatusCommand } from './commands/record.js';
|
|
21
|
+
import { summarizeCommand } from './commands/summarize.js';
|
|
22
|
+
import { pluginListCommand, pluginTrustCommand, pluginUntrustCommand, pluginEnableCommand, pluginDisableCommand } from './commands/plugin.js';
|
|
23
|
+
import { projectsCommand } from './commands/projects.js';
|
|
24
|
+
import { tuneCommand, tuneShowCommand, tuneResetCommand } from './commands/tune.js';
|
|
25
|
+
import { checkCliUpdate } from './utils/version-checker.js';
|
|
26
|
+
import { readFileSync, existsSync } from 'fs';
|
|
27
|
+
import { join } from 'path';
|
|
28
|
+
// Load .claude/settings.json if present in current directory
|
|
29
|
+
// This allows per-directory ACE configuration
|
|
30
|
+
function loadLocalSettings() {
|
|
31
|
+
const settingsPath = join(process.cwd(), '.claude', 'settings.json');
|
|
32
|
+
if (existsSync(settingsPath)) {
|
|
33
|
+
try {
|
|
34
|
+
const settings = JSON.parse(readFileSync(settingsPath, 'utf8'));
|
|
35
|
+
// Handle both flat structure and nested env structure
|
|
36
|
+
const envVars = settings.env || settings;
|
|
37
|
+
// Set environment variables from settings (only if not already set)
|
|
38
|
+
// This allows .claude/settings.json to provide defaults that can be overridden by actual env vars
|
|
39
|
+
if (envVars.ACE_SERVER_URL && !process.env.ACE_SERVER_URL) {
|
|
40
|
+
process.env.ACE_SERVER_URL = envVars.ACE_SERVER_URL;
|
|
41
|
+
}
|
|
42
|
+
if (envVars.ACE_API_TOKEN && !process.env.ACE_API_TOKEN) {
|
|
43
|
+
process.env.ACE_API_TOKEN = envVars.ACE_API_TOKEN;
|
|
44
|
+
}
|
|
45
|
+
if (envVars.ACE_ORG_ID && !process.env.ACE_ORG_ID) {
|
|
46
|
+
process.env.ACE_ORG_ID = envVars.ACE_ORG_ID;
|
|
47
|
+
}
|
|
48
|
+
if (envVars.ACE_PROJECT_ID && !process.env.ACE_PROJECT_ID) {
|
|
49
|
+
process.env.ACE_PROJECT_ID = envVars.ACE_PROJECT_ID;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
// Silently ignore errors - if settings file is malformed, just skip it
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// Load local settings before anything else
|
|
58
|
+
loadLocalSettings();
|
|
59
|
+
const program = new Command();
|
|
60
|
+
// Handle tab completion
|
|
61
|
+
if (process.env.COMP_LINE) {
|
|
62
|
+
const env = tabtab.parseEnv(process.env);
|
|
63
|
+
if (env.complete) {
|
|
64
|
+
// Main command completions
|
|
65
|
+
if (!env.prev || env.prev === 'ce-ace') {
|
|
66
|
+
tabtab.log([
|
|
67
|
+
'status', 'patterns', 'search', 'top', 'learn',
|
|
68
|
+
'bootstrap', 'cache', 'delta', 'export', 'import',
|
|
69
|
+
'record', 'summarize', 'plugin', 'config', 'doctor',
|
|
70
|
+
'projects', 'clear', 'completion', 'tune'
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
// Subcommand completions
|
|
74
|
+
else if (env.prev === 'record') {
|
|
75
|
+
tabtab.log(['start', 'stop', 'list', 'export', 'delete', 'status']);
|
|
76
|
+
}
|
|
77
|
+
else if (env.prev === 'plugin') {
|
|
78
|
+
tabtab.log(['list', 'trust', 'untrust', 'enable', 'disable']);
|
|
79
|
+
}
|
|
80
|
+
else if (env.prev === 'config') {
|
|
81
|
+
tabtab.log(['show', 'set', 'reset', 'validate']);
|
|
82
|
+
}
|
|
83
|
+
else if (env.prev === 'tune') {
|
|
84
|
+
tabtab.log(['show', 'reset']);
|
|
85
|
+
}
|
|
86
|
+
else if (env.prev === 'cache') {
|
|
87
|
+
tabtab.log(['clear']);
|
|
88
|
+
}
|
|
89
|
+
else if (env.prev === 'delta') {
|
|
90
|
+
tabtab.log(['add', 'update', 'remove']);
|
|
91
|
+
}
|
|
92
|
+
else if (env.prev === 'completion') {
|
|
93
|
+
tabtab.log(['install', 'uninstall']);
|
|
94
|
+
}
|
|
95
|
+
// Flag completions for specific commands
|
|
96
|
+
else if (env.prev === 'search') {
|
|
97
|
+
tabtab.log(['--stdin', '--threshold', '--section', '--json', '--verbose', '--quiet']);
|
|
98
|
+
}
|
|
99
|
+
else if (env.prev === 'patterns') {
|
|
100
|
+
tabtab.log(['--section', '--min-helpful', '--json', '--verbose', '--quiet']);
|
|
101
|
+
}
|
|
102
|
+
else if (env.prev === 'bootstrap') {
|
|
103
|
+
tabtab.log(['--mode', '--thoroughness', '--commit-limit', '--days-back', '--max-files', '--repo-path', '--merge']);
|
|
104
|
+
}
|
|
105
|
+
process.exit(0);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Check for CLI updates in background (non-blocking, cached for 24h)
|
|
109
|
+
checkCliUpdate().catch(() => {
|
|
110
|
+
// Silently ignore errors - update checks shouldn't break the CLI
|
|
111
|
+
});
|
|
112
|
+
// Make global options accessible
|
|
113
|
+
export let globalOptions = {
|
|
114
|
+
json: false,
|
|
115
|
+
verbose: false,
|
|
116
|
+
quiet: false,
|
|
117
|
+
trace: false,
|
|
118
|
+
org: undefined,
|
|
119
|
+
project: undefined,
|
|
120
|
+
};
|
|
121
|
+
program
|
|
122
|
+
.name('ce-ace')
|
|
123
|
+
.description('ACE CLI - Intelligent pattern learning and playbook management')
|
|
124
|
+
.version('2.0.0')
|
|
125
|
+
.option('--json', 'Output structured JSON (for automation)')
|
|
126
|
+
.option('--verbose', 'Show detailed output')
|
|
127
|
+
.option('--quiet', 'Suppress non-essential output')
|
|
128
|
+
.option('--trace', 'Log raw HTTP requests and responses (debug mode)')
|
|
129
|
+
.option('--org <org_id>', 'Organization ID (overrides env and .claude/settings.json)')
|
|
130
|
+
.option('--project <project_id>', 'Project ID (overrides env and .claude/settings.json)')
|
|
131
|
+
.hook('preAction', (thisCommand) => {
|
|
132
|
+
const opts = thisCommand.optsWithGlobals();
|
|
133
|
+
globalOptions = {
|
|
134
|
+
json: opts.json || false,
|
|
135
|
+
verbose: opts.verbose || false,
|
|
136
|
+
quiet: opts.quiet || false,
|
|
137
|
+
trace: opts.trace || false,
|
|
138
|
+
org: opts.org,
|
|
139
|
+
project: opts.project,
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
// Configuration commands
|
|
143
|
+
const config = program
|
|
144
|
+
.command('config')
|
|
145
|
+
.description('Configuration wizard (interactive or non-interactive)')
|
|
146
|
+
.option('--server-url <url>', 'ACE server URL')
|
|
147
|
+
.option('--api-token <token>', 'API token')
|
|
148
|
+
.option('--org-id <org_id>', 'Organization ID (optional)')
|
|
149
|
+
.option('--project-id <project_id>', 'Project ID')
|
|
150
|
+
.action(configCommand);
|
|
151
|
+
config
|
|
152
|
+
.command('show')
|
|
153
|
+
.description('Display current configuration')
|
|
154
|
+
.action(configShowCommand);
|
|
155
|
+
config
|
|
156
|
+
.command('set <key> <value>')
|
|
157
|
+
.description('Set a configuration value')
|
|
158
|
+
.action(configSetCommand);
|
|
159
|
+
config
|
|
160
|
+
.command('reset')
|
|
161
|
+
.description('Reset configuration to defaults')
|
|
162
|
+
.option('--yes', 'Skip confirmation prompt')
|
|
163
|
+
.action(configResetCommand);
|
|
164
|
+
config
|
|
165
|
+
.command('validate')
|
|
166
|
+
.description('Validate token and display organization/project info')
|
|
167
|
+
.option('--server-url <url>', 'ACE server URL')
|
|
168
|
+
.option('--api-token <token>', 'API token')
|
|
169
|
+
.action((_options, command) => {
|
|
170
|
+
// Commander.js subcommands need optsWithGlobals() to get options
|
|
171
|
+
// This merges parent and subcommand options, with kebab→camelCase conversion
|
|
172
|
+
const opts = command.optsWithGlobals();
|
|
173
|
+
configValidateCommand({
|
|
174
|
+
serverUrl: opts.serverUrl,
|
|
175
|
+
apiToken: opts.apiToken
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
// Project discovery
|
|
179
|
+
program
|
|
180
|
+
.command('projects')
|
|
181
|
+
.description('List all projects from ACE server')
|
|
182
|
+
.option('--org <org_id>', 'Filter to specific organization')
|
|
183
|
+
.action(projectsCommand);
|
|
184
|
+
// Diagnostics
|
|
185
|
+
program
|
|
186
|
+
.command('doctor')
|
|
187
|
+
.description('Run diagnostics on ACE configuration and connectivity')
|
|
188
|
+
.action(doctorCommand);
|
|
189
|
+
// Tune thresholds and settings (actual server fields - 11 total)
|
|
190
|
+
const tune = program
|
|
191
|
+
.command('tune')
|
|
192
|
+
.description('Tune ACE server configuration (interactive or flags)')
|
|
193
|
+
.option('--scope <scope>', 'Configuration scope (project)', 'project')
|
|
194
|
+
.option('--constitution-threshold <value>', 'Retrieval similarity threshold (0.0-1.0)', parseFloat)
|
|
195
|
+
.option('--search-top-k <value>', 'Max search results (1-100)', parseInt)
|
|
196
|
+
.option('--dedup-similarity-threshold <value>', 'Deduplication similarity threshold (0.0-1.0)', parseFloat)
|
|
197
|
+
.option('--dedup-enabled <boolean>', 'Enable/disable deduplication', (v) => v === 'true')
|
|
198
|
+
.option('--pruning-threshold <value>', 'Pruning threshold to keep patterns (0.0-1.0)', parseFloat)
|
|
199
|
+
.option('--max-playbook-tokens <value>', 'Maximum playbook tokens (null for unlimited)', parseInt)
|
|
200
|
+
.option('--token-budget-enforcement <boolean>', 'Enable/disable token budget enforcement', (v) => v === 'true')
|
|
201
|
+
.option('--max-batch-size <value>', 'Maximum patterns per batch (1-100)', parseInt)
|
|
202
|
+
.option('--auto-learning-enabled <boolean>', 'Enable/disable automatic learning', (v) => v === 'true')
|
|
203
|
+
.option('--reflector-enabled <boolean>', 'Enable/disable Reflector agent', (v) => v === 'true')
|
|
204
|
+
.option('--curator-enabled <boolean>', 'Enable/disable Curator agent', (v) => v === 'true')
|
|
205
|
+
.action(tuneCommand);
|
|
206
|
+
tune
|
|
207
|
+
.command('show')
|
|
208
|
+
.description('Show current effective configuration')
|
|
209
|
+
.action(tuneShowCommand);
|
|
210
|
+
tune
|
|
211
|
+
.command('reset')
|
|
212
|
+
.description('Reset configuration to defaults')
|
|
213
|
+
.option('--scope <scope>', 'Scope to reset (project)', 'project')
|
|
214
|
+
.action(tuneResetCommand);
|
|
215
|
+
// Playbook access
|
|
216
|
+
program
|
|
217
|
+
.command('patterns')
|
|
218
|
+
.description('View playbook patterns')
|
|
219
|
+
.option('--section <section>', 'Filter by section (strategies|snippets|troubleshooting|apis)')
|
|
220
|
+
.option('--min-helpful <score>', 'Minimum helpful score', parseFloat)
|
|
221
|
+
.action(patternsCommand);
|
|
222
|
+
program
|
|
223
|
+
.command('search [query]')
|
|
224
|
+
.description('Search for patterns using semantic search')
|
|
225
|
+
.option('--stdin', 'Read query from stdin')
|
|
226
|
+
.option('--threshold <value>', 'Similarity threshold (0.0-1.0) - overrides server default', parseFloat)
|
|
227
|
+
.option('--section <section>', 'Filter by section - overrides server default')
|
|
228
|
+
.option('--top-k <number>', 'Maximum patterns to return (1-100)', parseInt)
|
|
229
|
+
.option('--pin-session <sessionId>', 'Pin results to session for later recall')
|
|
230
|
+
.action(searchCommand);
|
|
231
|
+
program
|
|
232
|
+
.command('top')
|
|
233
|
+
.description('Show top-rated patterns')
|
|
234
|
+
.option('--section <section>', 'Filter by section')
|
|
235
|
+
.option('--limit <number>', 'Number of patterns to show', parseInt, 10)
|
|
236
|
+
.option('--min-helpful <score>', 'Minimum helpful score', parseFloat, 0)
|
|
237
|
+
.action(topCommand);
|
|
238
|
+
// Learning / Knowledge updates
|
|
239
|
+
program
|
|
240
|
+
.command('learn')
|
|
241
|
+
.description('Submit learning event to update playbook')
|
|
242
|
+
.option('--transcript <file>', 'Path to transcript file')
|
|
243
|
+
.option('--stdin', 'Read transcript from stdin')
|
|
244
|
+
.option('--task <description>', 'Task description')
|
|
245
|
+
.option('--success', 'Task was successful')
|
|
246
|
+
.option('--failure', 'Task failed')
|
|
247
|
+
.option('--output <text>', 'Output/lessons learned')
|
|
248
|
+
.action(learnCommand);
|
|
249
|
+
// Bootstrap / Data ingestion
|
|
250
|
+
program
|
|
251
|
+
.command('bootstrap')
|
|
252
|
+
.description('Initialize playbook from codebase')
|
|
253
|
+
.option('--mode <mode>', 'Analysis mode (hybrid|both|local-files|git-history|docs-only)', 'hybrid')
|
|
254
|
+
.option('--thoroughness <level>', 'Analysis depth (light|medium|deep)', 'medium')
|
|
255
|
+
.option('--commit-limit <number>', 'Max commits to analyze', parseInt)
|
|
256
|
+
.option('--days-back <number>', 'Days of history to analyze', parseInt)
|
|
257
|
+
.option('--max-files <number>', 'Max files to analyze', parseInt)
|
|
258
|
+
.option('--repo-path <path>', 'Path to repository', process.cwd())
|
|
259
|
+
.option('--merge', 'Merge with existing playbook', true)
|
|
260
|
+
.action(bootstrapCommand);
|
|
261
|
+
// Maintenance
|
|
262
|
+
program
|
|
263
|
+
.command('status')
|
|
264
|
+
.description('Show playbook statistics')
|
|
265
|
+
.action(statusCommand);
|
|
266
|
+
program
|
|
267
|
+
.command('clear')
|
|
268
|
+
.description('Clear the playbook')
|
|
269
|
+
.option('--yes', 'Skip confirmation prompt')
|
|
270
|
+
.action(clearCommand);
|
|
271
|
+
const cache = program
|
|
272
|
+
.command('cache')
|
|
273
|
+
.description('Manage local cache');
|
|
274
|
+
cache
|
|
275
|
+
.command('clear')
|
|
276
|
+
.description('Clear local cache')
|
|
277
|
+
.option('--type <type>', 'Cache type (ram|sqlite|all)', 'all')
|
|
278
|
+
.action(cacheCommand);
|
|
279
|
+
cache
|
|
280
|
+
.command('recall')
|
|
281
|
+
.description('Recall patterns from a pinned session')
|
|
282
|
+
.requiredOption('--session <sessionId>', 'Session ID to recall')
|
|
283
|
+
.action(cacheRecallCommand);
|
|
284
|
+
program
|
|
285
|
+
.command('delta <operation>')
|
|
286
|
+
.description('Apply incremental pattern updates (add|update|remove)')
|
|
287
|
+
.option('--bullets <json>', 'Bullets as JSON string')
|
|
288
|
+
.option('--file <path>', 'Read bullets from JSON file')
|
|
289
|
+
.option('--stdin', 'Read bullets from stdin')
|
|
290
|
+
.action(deltaCommand);
|
|
291
|
+
program
|
|
292
|
+
.command('export')
|
|
293
|
+
.description('Export playbook to JSON')
|
|
294
|
+
.option('--output <file>', 'Output file (default: stdout)')
|
|
295
|
+
.action(exportCommand);
|
|
296
|
+
program
|
|
297
|
+
.command('import [file]')
|
|
298
|
+
.description('Import playbook from JSON file or stdin')
|
|
299
|
+
.option('--file <path>', 'Import from file')
|
|
300
|
+
.option('--stdin', 'Read playbook from stdin')
|
|
301
|
+
.action(importCommand);
|
|
302
|
+
// Session recording
|
|
303
|
+
const record = program
|
|
304
|
+
.command('record')
|
|
305
|
+
.description('Manage session recordings');
|
|
306
|
+
record
|
|
307
|
+
.command('start')
|
|
308
|
+
.description('Start recording a session')
|
|
309
|
+
.option('--session <name>', 'Session name/description')
|
|
310
|
+
.action(recordStartCommand);
|
|
311
|
+
record
|
|
312
|
+
.command('stop')
|
|
313
|
+
.description('Stop the current recording session')
|
|
314
|
+
.action(recordStopCommand);
|
|
315
|
+
record
|
|
316
|
+
.command('list')
|
|
317
|
+
.description('List all recorded sessions')
|
|
318
|
+
.action(recordListCommand);
|
|
319
|
+
record
|
|
320
|
+
.command('export <sessionId> <output>')
|
|
321
|
+
.description('Export a session to a file')
|
|
322
|
+
.action(recordExportCommand);
|
|
323
|
+
record
|
|
324
|
+
.command('delete <sessionId>')
|
|
325
|
+
.description('Delete a session recording')
|
|
326
|
+
.option('--yes', 'Skip confirmation prompt')
|
|
327
|
+
.action(recordDeleteCommand);
|
|
328
|
+
record
|
|
329
|
+
.command('status')
|
|
330
|
+
.description('Show current recording status')
|
|
331
|
+
.action(recordStatusCommand);
|
|
332
|
+
// Session summarization
|
|
333
|
+
program
|
|
334
|
+
.command('summarize [sessionIdOrFile]')
|
|
335
|
+
.description('Summarize a recorded session using AI')
|
|
336
|
+
.option('--stdin', 'Read session data from stdin')
|
|
337
|
+
.option('--output <file>', 'Save summary to file')
|
|
338
|
+
.option('--format <format>', 'Output format (text|json|markdown)', 'text')
|
|
339
|
+
.action(summarizeCommand);
|
|
340
|
+
// Plugin management
|
|
341
|
+
const plugin = program
|
|
342
|
+
.command('plugin')
|
|
343
|
+
.description('Manage plugins');
|
|
344
|
+
plugin
|
|
345
|
+
.command('list')
|
|
346
|
+
.description('List all available plugins')
|
|
347
|
+
.action(pluginListCommand);
|
|
348
|
+
plugin
|
|
349
|
+
.command('trust <name>')
|
|
350
|
+
.description('Trust a plugin (required before enabling)')
|
|
351
|
+
.option('--yes', 'Skip confirmation prompt')
|
|
352
|
+
.action(pluginTrustCommand);
|
|
353
|
+
plugin
|
|
354
|
+
.command('untrust <name>')
|
|
355
|
+
.description('Untrust and disable a plugin')
|
|
356
|
+
.action(pluginUntrustCommand);
|
|
357
|
+
plugin
|
|
358
|
+
.command('enable <name>')
|
|
359
|
+
.description('Enable a trusted plugin')
|
|
360
|
+
.action(pluginEnableCommand);
|
|
361
|
+
plugin
|
|
362
|
+
.command('disable <name>')
|
|
363
|
+
.description('Disable a plugin')
|
|
364
|
+
.action(pluginDisableCommand);
|
|
365
|
+
// Shell completion
|
|
366
|
+
const completion = program
|
|
367
|
+
.command('completion')
|
|
368
|
+
.description('Manage shell completion (bash/zsh/fish)');
|
|
369
|
+
completion
|
|
370
|
+
.command('install')
|
|
371
|
+
.description('Install shell completion for ce-ace')
|
|
372
|
+
.action(async () => {
|
|
373
|
+
try {
|
|
374
|
+
await tabtab.install({
|
|
375
|
+
name: 'ce-ace',
|
|
376
|
+
completer: 'ce-ace'
|
|
377
|
+
});
|
|
378
|
+
console.log('Shell completion installed successfully!');
|
|
379
|
+
console.log('Please restart your shell or run: source ~/.bashrc (or ~/.zshrc)');
|
|
380
|
+
}
|
|
381
|
+
catch (error) {
|
|
382
|
+
console.error('Failed to install completion:', error instanceof Error ? error.message : String(error));
|
|
383
|
+
process.exit(1);
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
completion
|
|
387
|
+
.command('uninstall')
|
|
388
|
+
.description('Uninstall shell completion for ce-ace')
|
|
389
|
+
.action(async () => {
|
|
390
|
+
try {
|
|
391
|
+
await tabtab.uninstall({
|
|
392
|
+
name: 'ce-ace'
|
|
393
|
+
});
|
|
394
|
+
console.log('Shell completion uninstalled successfully!');
|
|
395
|
+
}
|
|
396
|
+
catch (error) {
|
|
397
|
+
console.error('Failed to uninstall completion:', error instanceof Error ? error.message : String(error));
|
|
398
|
+
process.exit(1);
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
// Handle uncaught errors
|
|
402
|
+
process.on('unhandledRejection', (reason, _promise) => {
|
|
403
|
+
if (!globalOptions.json) {
|
|
404
|
+
console.error('Unhandled rejection:', reason);
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
console.error(JSON.stringify({ error: String(reason), type: 'unhandled_rejection' }));
|
|
408
|
+
}
|
|
409
|
+
process.exit(1);
|
|
410
|
+
});
|
|
411
|
+
process.on('uncaughtException', (error) => {
|
|
412
|
+
if (!globalOptions.json) {
|
|
413
|
+
console.error('Uncaught exception:', error);
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
console.error(JSON.stringify({ error: error.message, stack: error.stack, type: 'uncaught_exception' }));
|
|
417
|
+
}
|
|
418
|
+
process.exit(1);
|
|
419
|
+
});
|
|
420
|
+
// Parse arguments
|
|
421
|
+
program.parse(process.argv);
|
|
422
|
+
// Show help if no command provided
|
|
423
|
+
if (!process.argv.slice(2).length) {
|
|
424
|
+
program.outputHelp();
|
|
425
|
+
process.exit(0);
|
|
426
|
+
}
|
|
427
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACrI,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MA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ThoroughnessLevel } from '../types/pattern.js';
|
|
5
|
+
interface BootstrapOptions {
|
|
6
|
+
mode?: 'hybrid' | 'both' | 'local-files' | 'git-history' | 'docs-only';
|
|
7
|
+
thoroughness?: ThoroughnessLevel;
|
|
8
|
+
commitLimit?: number;
|
|
9
|
+
daysBack?: number;
|
|
10
|
+
maxFiles?: number;
|
|
11
|
+
repoPath?: string;
|
|
12
|
+
merge?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Initialize playbook from codebase
|
|
16
|
+
*/
|
|
17
|
+
export declare function bootstrapCommand(options: BootstrapOptions): Promise<void>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=bootstrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/commands/bootstrap.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,EAAwB,iBAAiB,EAAkB,MAAM,qBAAqB,CAAC;AAI9F,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,aAAa,GAAG,aAAa,GAAG,WAAW,CAAC;IACvE,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,iBAkK/D"}
|