@cavelang/cli 0.5.0 → 0.13.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 +4 -3
- package/dist/src/cli.d.ts +18 -9
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +504 -24
- package/dist/src/cli.js.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/main.js +7 -2
- package/dist/src/main.js.map +1 -1
- package/package.json +14 -10
- package/src/cli.ts +516 -25
- package/src/index.ts +2 -2
- package/src/main.ts +6 -2
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@cavelang/cli` — the `cave` command (parse / add / query / export / demo).
|
|
2
|
+
* `@cavelang/cli` — the `cave` command (parse / add / query / derive / act / check / export / demo).
|
|
3
3
|
* Programmatic access to the same implementations lives here.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export { addCommand, cave, commandHelp, demoCommand, exportCommand, helpCommand, highlightCommand, importCommand, parseCommand, queryCommand, usage, versionCommand } from './cli.ts'
|
|
6
|
+
export { actCommand, addCommand, cave, checkCommand, commandHelp, demoCommand, deriveCommand, exportCommand, helpCommand, highlightCommand, importCommand, parseCommand, queryCommand, usage, versionCommand } from './cli.ts'
|
|
7
7
|
export type { Output } from './cli.ts'
|
package/src/main.ts
CHANGED
|
@@ -13,9 +13,9 @@ const write = (code: number, out: string, err: string): void => {
|
|
|
13
13
|
process.exitCode = code
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
// mcp and
|
|
16
|
+
// mcp, ingest and connect own their help text, so `cave help X` becomes `cave X --help`.
|
|
17
17
|
const raw = process.argv.slice(2)
|
|
18
|
-
const argv = raw[0] === 'help' && (raw[1] === 'mcp' || raw[1] === 'ingest') ?
|
|
18
|
+
const argv = raw[0] === 'help' && (raw[1] === 'mcp' || raw[1] === 'ingest' || raw[1] === 'connect') ?
|
|
19
19
|
[raw[1], '--help'] :
|
|
20
20
|
raw
|
|
21
21
|
if (argv[0] === 'mcp') {
|
|
@@ -26,6 +26,10 @@ if (argv[0] === 'mcp') {
|
|
|
26
26
|
// Long-running: drives an LLM agent over batches of files.
|
|
27
27
|
const { runIngest } = await import('@cavelang/ingest')
|
|
28
28
|
process.exitCode = await runIngest(argv.slice(1))
|
|
29
|
+
} else if (argv[0] === 'connect') {
|
|
30
|
+
// Async (URL sources fetch) and potentially long-running (--watch).
|
|
31
|
+
const { runConnect } = await import('@cavelang/connect')
|
|
32
|
+
process.exitCode = await runConnect(argv.slice(1))
|
|
29
33
|
} else if (argv[0] === 'highlight' && !argv.includes('--help') && !argv.includes('-h')) {
|
|
30
34
|
// Async (grammar WASM loads on first use); --help stays on the sync path.
|
|
31
35
|
const { code, out, err } = await highlightCommand(argv.slice(1))
|