@opencoven/coven-code 0.0.4 → 0.0.7

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.
Files changed (115) hide show
  1. package/README.md +29 -130
  2. package/bin/coven-code +26 -0
  3. package/install.js +117 -0
  4. package/package.json +25 -22
  5. package/bin/coven-code-sdk.mjs +0 -12
  6. package/bin/coven-code.mjs +0 -19
  7. package/docs/CLI.md +0 -256
  8. package/docs/CONFIGURATION.md +0 -107
  9. package/docs/DEMO.md +0 -453
  10. package/docs/DEVELOPMENT.md +0 -104
  11. package/docs/DOGFOOD-PROTOCOL.md +0 -263
  12. package/docs/MCP-SKILLS-PLUGINS.md +0 -127
  13. package/docs/README.md +0 -39
  14. package/docs/RELEASE.md +0 -33
  15. package/docs/SDK.md +0 -107
  16. package/docs/superpowers/plans/2026-05-25-coven-code-panel-tui.md +0 -904
  17. package/docs/superpowers/plans/2026-05-25-coven-code-rebrand.md +0 -670
  18. package/docs/superpowers/specs/2026-05-25-coven-code-panel-tui-design.md +0 -235
  19. package/docs/superpowers/specs/2026-05-26-slash-first-tui-review.md +0 -63
  20. package/src/agent/fixture.mjs +0 -95
  21. package/src/agent/lane.mjs +0 -136
  22. package/src/cli/dispatch.mjs +0 -66
  23. package/src/cli/execute.mjs +0 -452
  24. package/src/cli/help.mjs +0 -58
  25. package/src/cli/interactive-core.mjs +0 -28
  26. package/src/cli/interactive-io.mjs +0 -101
  27. package/src/cli/interactive-slash.mjs +0 -184
  28. package/src/cli/notifications.mjs +0 -13
  29. package/src/cli/parse.mjs +0 -83
  30. package/src/cli/reasoning.mjs +0 -45
  31. package/src/cli/refs.mjs +0 -162
  32. package/src/cli/repl.mjs +0 -60
  33. package/src/cli/slash-commands.mjs +0 -375
  34. package/src/cli/stream-json.mjs +0 -225
  35. package/src/cli/tui-actions.mjs +0 -72
  36. package/src/cli/tui-blessed.mjs +0 -198
  37. package/src/cli/tui-keys.mjs +0 -80
  38. package/src/cli/tui-lane.mjs +0 -73
  39. package/src/cli/tui-render.mjs +0 -169
  40. package/src/cli/tui-submit.mjs +0 -82
  41. package/src/cli/tui.mjs +0 -174
  42. package/src/commands/agents.mjs +0 -53
  43. package/src/commands/config.mjs +0 -27
  44. package/src/commands/ide.mjs +0 -17
  45. package/src/commands/login.mjs +0 -84
  46. package/src/commands/mcp.mjs +0 -176
  47. package/src/commands/permissions-eval.mjs +0 -122
  48. package/src/commands/permissions-rules.mjs +0 -53
  49. package/src/commands/permissions-text.mjs +0 -112
  50. package/src/commands/permissions.mjs +0 -62
  51. package/src/commands/plugins.mjs +0 -86
  52. package/src/commands/review.mjs +0 -74
  53. package/src/commands/skill.mjs +0 -23
  54. package/src/commands/threads.mjs +0 -165
  55. package/src/commands/tools.mjs +0 -77
  56. package/src/commands/update.mjs +0 -31
  57. package/src/commands/usage.mjs +0 -34
  58. package/src/constants.mjs +0 -52
  59. package/src/main.mjs +0 -87
  60. package/src/mcp/discover.mjs +0 -154
  61. package/src/mcp/local.mjs +0 -55
  62. package/src/mcp/parsers.mjs +0 -46
  63. package/src/mcp/permissions.mjs +0 -52
  64. package/src/mcp/probe.mjs +0 -85
  65. package/src/mcp/registry.mjs +0 -96
  66. package/src/mcp/remote-oauth.mjs +0 -55
  67. package/src/mcp/remote-session.mjs +0 -54
  68. package/src/mcp/remote-sse.mjs +0 -82
  69. package/src/mcp/remote.mjs +0 -74
  70. package/src/plugins/api.mjs +0 -187
  71. package/src/plugins/configuration.mjs +0 -124
  72. package/src/plugins/discover.mjs +0 -84
  73. package/src/plugins/helpers.mjs +0 -187
  74. package/src/plugins/subsystems.mjs +0 -198
  75. package/src/plugins/validators.mjs +0 -142
  76. package/src/sdk-execute.mjs +0 -82
  77. package/src/sdk-install.mjs +0 -187
  78. package/src/sdk-settings.mjs +0 -88
  79. package/src/sdk.mjs +0 -163
  80. package/src/settings/load.mjs +0 -134
  81. package/src/settings/paths.mjs +0 -101
  82. package/src/skills/builtin/building-skills/SKILL.md +0 -20
  83. package/src/skills/discover.mjs +0 -95
  84. package/src/threads/store.mjs +0 -176
  85. package/src/tools/builtin/bash.mjs +0 -110
  86. package/src/tools/builtin/create-file.mjs +0 -66
  87. package/src/tools/builtin/edit-file.mjs +0 -76
  88. package/src/tools/builtin/finder.mjs +0 -73
  89. package/src/tools/builtin/glob.mjs +0 -74
  90. package/src/tools/builtin/grep.mjs +0 -82
  91. package/src/tools/builtin/index.mjs +0 -83
  92. package/src/tools/builtin/librarian.mjs +0 -97
  93. package/src/tools/builtin/look-at.mjs +0 -92
  94. package/src/tools/builtin/mcp.mjs +0 -51
  95. package/src/tools/builtin/mermaid.mjs +0 -59
  96. package/src/tools/builtin/oracle.mjs +0 -56
  97. package/src/tools/builtin/painter.mjs +0 -81
  98. package/src/tools/builtin/plugin-tool.mjs +0 -53
  99. package/src/tools/builtin/read-mcp-resource.mjs +0 -63
  100. package/src/tools/builtin/read-web-page.mjs +0 -72
  101. package/src/tools/builtin/read.mjs +0 -59
  102. package/src/tools/builtin/runtime-content.mjs +0 -31
  103. package/src/tools/builtin/runtime-decisions.mjs +0 -115
  104. package/src/tools/builtin/runtime.mjs +0 -85
  105. package/src/tools/builtin/task.mjs +0 -63
  106. package/src/tools/builtin/toolbox-tool.mjs +0 -57
  107. package/src/tools/builtin/undo-edit.mjs +0 -97
  108. package/src/tools/builtin/web-search.mjs +0 -128
  109. package/src/tools/toolbox.mjs +0 -273
  110. package/src/util/fs.mjs +0 -13
  111. package/src/util/glob.mjs +0 -46
  112. package/src/util/html.mjs +0 -21
  113. package/src/util/media.mjs +0 -13
  114. package/src/util/shell.mjs +0 -24
  115. package/src/util/table.mjs +0 -11
package/README.md CHANGED
@@ -1,146 +1,45 @@
1
- # Coven Code
1
+ # @opencoven/coven-code
2
2
 
3
- A small Node CLI for local Coven Code workflows. It runs deterministic local
4
- command, thread, tool, MCP, skill, plugin, and SDK flows so integration behavior
5
- can be exercised end-to-end without a hosted service.
3
+ [![Version](https://img.shields.io/npm/v/@opencoven/coven-code?style=flat-square)](https://www.npmjs.com/package/@opencoven/coven-code)
4
+ [![License](https://img.shields.io/badge/License-GPL--3.0-blue?style=flat-square)](https://github.com/OpenCoven/coven-code/blob/main/LICENSE.md)
6
5
 
7
- ## Quickstart
6
+ **Coven Code** — open-source, multi-provider agentic coding TUI built in Rust.
7
+ OpenCoven fork of [Claurst](https://github.com/Kuberwastaken/claurst) by Kuber Mehta (GPL-3.0).
8
8
 
9
- ```sh
10
- npm test
11
- npm start
12
- npm run coven-code -- --help
13
- npm run coven-code -- -x "what is 2+2?"
14
- echo "list markdown files" | npm run coven-code
15
- ```
16
-
17
- The package exposes `coven-code` and `coven-code-sdk` bins.
18
-
19
- ## Documentation
20
-
21
- - [CLI reference](docs/CLI.md) - commands, flags, interactive mode, execute mode, JSON streaming, and thread workflows
22
- - [Configuration](docs/CONFIGURATION.md) - settings files, environment variables, precedence, and common examples
23
- - [MCP, skills, and plugins](docs/MCP-SKILLS-PLUGINS.md) - extension points for tools, MCP servers, skills, and project plugins
24
- - [SDK](docs/SDK.md) - package exports, install helper, execution API, permissions, and thread helpers
25
- - [Development](docs/DEVELOPMENT.md) - repository layout, local checks, release notes, and safety expectations
26
- - [Coven Dogfood Protocol](docs/DOGFOOD-PROTOCOL.md) - daily task packets, harness assignment, handoff, verification, retrospectives, and issue capture
27
- - [Demo](docs/DEMO.md) - 15-20 minute end-to-end walkthrough of every shipped surface (`npm run demo`)
28
-
29
- ## Interactive Mode
30
-
31
- Running `coven-code` with no arguments in a terminal starts the `neo-blessed`
32
- panel TUI. Type `/` in the composer to open the slash-command menu with live
33
- filtering and a details panel for commands, skills, and plugin actions.
9
+ ## Install
34
10
 
35
- ```text
36
- $ coven-code
37
- Coven Code 0.0.4
38
- /Users/example/project
39
- [chat] lane tools threads config help mode: smart effort: high
40
- --------------------------------------------------------------------------------
41
- Ready. Type a prompt or /help.
42
- --------------------------------------------------------------------------------
43
- >
11
+ ```bash
12
+ npm install -g @opencoven/coven-code
13
+ # or
14
+ bun install -g @opencoven/coven-code
44
15
  ```
45
16
 
46
- The classic readline REPL remains available for scripts, demos, and compatibility:
17
+ On install, the correct pre-built native binary for your platform is automatically downloaded from [GitHub Releases](https://github.com/OpenCoven/coven-code/releases). No compilation required.
47
18
 
48
- ```sh
49
- COVEN_CODE_REPL=1 coven-code
50
- ```
51
-
52
- Line history is stored at `${XDG_CONFIG_HOME:-~/.config}/coven-code/repl_history`.
53
- Use `COVEN_CODE_REPL_HISTORY_FILE` to override the path or
54
- `COVEN_CODE_REPL_HISTORY=0` to disable history in the classic REPL.
55
-
56
- `COVEN_CODE_TUI_SCRIPTED=1` is reserved for deterministic tests and automation
57
- that need to drive the TUI with newline-separated input.
19
+ ## Usage
58
20
 
59
- ## Execute Mode
60
-
61
- ```sh
62
- coven-code -x "prompt"
63
- coven-code -x "see @README.md" </dev/null
64
- coven-code -x "..." --stream-json
65
- coven-code -x "..." --stream-json --stream-json-input < msgs.jsonl
66
- coven-code --continue T-... -x "continue a thread"
67
- coven-code --toolbox ./toolbox -x "use tb__my_tool"
68
- coven-code --skills ./skills -x "use the data-map skill"
21
+ ```bash
22
+ coven-code # interactive TUI
23
+ coven-code -p "fix this bug" # headless one-shot
69
24
  ```
70
25
 
71
- Settings use the `covenCode.*` prefix. User settings live under
72
- `${XDG_CONFIG_HOME:-~/.config}/coven-code/settings.json`; workspace settings
73
- live under `.coven-code/settings.json`.
74
-
75
- Useful settings and env vars:
26
+ ## Providers
76
27
 
77
- - `covenCode.fuzzy.alwaysIncludePaths`
78
- - `covenCode.tools.enable` / `covenCode.tools.disable`
79
- - `covenCode.permissions`
80
- - `covenCode.commands.allowlist`
81
- - `covenCode.mcpServers`
82
- - `covenCode.mcpPermissions`
83
- - `covenCode.mcpRegistry.url`
84
- - `covenCode.notifications.enabled`
85
- - `covenCode.updates.mode`
86
- - `covenCode.defaultVisibility`
87
- - `COVEN_CODE_TOOLBOX`
88
- - `COVEN_CODE_API_KEY`
89
- - `COVEN_CODE_SKIP_UPDATE_CHECK`
90
- - `COVEN_CODE_FORCE_BEL`
91
- - `COVEN_CODE_CLI_PATH`
92
- - `COVEN_CODE_HOME`
28
+ Supports Anthropic (Claude), OpenAI, Google Gemini, Groq, Ollama, LM Studio, OpenRouter, Bedrock, Vertex, and any OpenAI-compatible endpoint.
93
29
 
94
- ## Implemented Surface
95
-
96
- Core:
97
-
98
- - `coven-code --help`, `coven-code --version`
99
- - panel TUI with transcript, lane status, tabs, status rail, composer, keyboard shortcuts, and command palette
100
- - lane view for isolated worktree/branch context, harness selection, terminal output, changed files, diff summary, verification state, and PR/merge/cleanup status
101
- - compatibility REPL with `/new`, `/continue`, `/queue`, `/mode`, `/reasoning`, persistent history, and multiline prompts
102
- - command-palette aliases for thread archive, visibility, diagnostics, IDE, skills, plugins, and help
103
- - one-shot execute mode with `-x` / `--execute`
104
- - `@file`, glob, image, explicit thread, and `@@query` thread-search references
105
- - `--stream-json`, `--stream-json-thinking`, `--stream-json-input`, and `--reasoning-effort`
106
- - local persisted threads with labels, visibility, archive state, reports, and maps
107
-
108
- Tools and permissions:
109
-
110
- - built-in tools: `Bash`, `Read`, `Grep`, `glob`, `create_file`, `edit_file`, `undo_edit`, `Task`, `oracle`, `librarian`, `painter`, `mermaid`, `look_at`, `web_search`, `read_web_page`, `find_thread`, `finder`, and `read_mcp_resource`
111
- - `coven-code tools list|make|show|use`
112
- - toolbox discovery through `COVEN_CODE_TOOLBOX`, `--toolbox`, and `${XDG_CONFIG_HOME:-~/.config}/coven-code/tools`
113
- - `coven-code permissions list|add|edit|test`
114
- - delegated permission helpers receive `AGENT=coven-code` and `COVEN_CODE_THREAD_ID`
115
-
116
- MCP, skills, and plugins:
117
-
118
- - `coven-code mcp add|list|doctor|approve`
119
- - remote MCP headers, OAuth credential storage in `~/.coven-code/oauth`, token refresh, Streamable HTTP sessions, and SSE fallback
120
- - MCP registry enforcement that blocks unlisted servers and fails closed when the registry is unreachable
121
- - skill discovery from configured roots, `.agents/skills`, legacy `.claude/skills` roots, and built-ins
122
- - `coven-code skill list|show`
123
- - project plugins from `.coven-code/plugins/*.ts` and user plugins from `${XDG_CONFIG_HOME:-~/.config}/coven-code/plugins/*.ts`
124
- - plugin tools, commands, lifecycle events, configuration, status items, UI fallbacks, and helper APIs
125
-
126
- SDK:
127
-
128
- - `coven-code-sdk install [--force]`
129
- - package root exports `execute`, `createUserMessage`, `createPermission`, and `threads`
130
- - SDK execution streams local `coven-code --stream-json` messages
131
- - SDK options map to CLI args for cwd, env, mode, reasoning effort, thinking, labels, visibility, archive, continuation, settings, toolbox, skills, MCP config, permissions, enabled tools, system prompt, logging, and permission bypass
30
+ ```bash
31
+ coven-code --provider openai "refactor this"
32
+ coven-code --provider ollama --model llama3.2 "explain this"
33
+ ```
132
34
 
133
- ## Development Checks
35
+ ## Configuration
134
36
 
135
- Run the full local verification gate before committing or publishing:
37
+ Settings: `~/.coven-code/settings.json`
38
+ Env prefix: `COVEN_CODE_*`
136
39
 
137
- ```sh
138
- git diff --check
139
- node ./bin/coven-code.mjs --help
140
- node ./bin/coven-code.mjs -x "what is 2+2?"
141
- npm test
142
- ```
40
+ ## Links
143
41
 
144
- The project is intentionally dependency-free at runtime. Keep new behavior
145
- covered in `test/cli.test.mjs`, avoid hosted-service assumptions, and keep
146
- examples deterministic.
42
+ - [OpenCoven](https://opencoven.ai)
43
+ - [GitHub](https://github.com/OpenCoven/coven-code)
44
+ - [Issues](https://github.com/OpenCoven/coven-code/issues)
45
+ - [Upstream (Claurst)](https://github.com/Kuberwastaken/claurst)
package/bin/coven-code ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { spawnSync } = require('child_process');
5
+ const path = require('path');
6
+ const os = require('os');
7
+ const fs = require('fs');
8
+
9
+ const ext = os.platform() === 'win32' ? '.exe' : '';
10
+ const binary = path.join(__dirname, '..', 'native', `coven-code`);
11
+
12
+ if (!fs.existsSync(binary)) {
13
+ console.error(
14
+ 'coven-code: native binary not found.\n' +
15
+ 'Try reinstalling: npm install -g /coven-code\n' +
16
+ `Expected: ${binary}`
17
+ );
18
+ process.exit(1);
19
+ }
20
+
21
+ const result = spawnSync(binary, process.argv.slice(2), {
22
+ stdio: 'inherit',
23
+ env: process.env,
24
+ });
25
+
26
+ process.exit(result.status ?? 1);
package/install.js ADDED
@@ -0,0 +1,117 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const https = require('https');
5
+ const http = require('http');
6
+ const fs = require('fs');
7
+ const path = require('path');
8
+ const os = require('os');
9
+ const { execFileSync } = require('child_process');
10
+
11
+ const pkg = require('./package.json');
12
+ const VERSION = pkg.version;
13
+ const REPO = 'OpenCoven/coven-code';
14
+ const BASE_URL = `https://github.com/${REPO}/releases/download/v${VERSION}`;
15
+ const NATIVE_DIR = path.join(__dirname, 'native');
16
+
17
+ function getPlatform() {
18
+ const platform = process.platform;
19
+ const arch = process.arch;
20
+
21
+ if (platform === 'win32' && arch === 'x64') {
22
+ return { artifact: 'coven-code-windows-x86_64', ext: '.exe', archive: '.zip' };
23
+ }
24
+ if (platform === 'linux' && arch === 'x64') {
25
+ return { artifact: 'coven-code-linux-x86_64', ext: '', archive: '.tar.gz' };
26
+ }
27
+ if (platform === 'linux' && arch === 'arm64') {
28
+ return { artifact: 'coven-code-linux-aarch64', ext: '', archive: '.tar.gz' };
29
+ }
30
+ if (platform === 'darwin' && arch === 'x64') {
31
+ return { artifact: 'coven-code-macos-x86_64', ext: '', archive: '.tar.gz' };
32
+ }
33
+ if (platform === 'darwin' && arch === 'arm64') {
34
+ return { artifact: 'coven-code-macos-aarch64', ext: '', archive: '.tar.gz' };
35
+ }
36
+ throw new Error(
37
+ `Unsupported platform: ${platform}/${arch}.\n` +
38
+ `Install manually from: https://github.com/${REPO}/releases/tag/v${VERSION}`
39
+ );
40
+ }
41
+
42
+ function download(url, dest) {
43
+ return new Promise((resolve, reject) => {
44
+ const file = fs.createWriteStream(dest);
45
+ const get = url.startsWith('https') ? https : http;
46
+ get.get(url, (res) => {
47
+ if (res.statusCode === 301 || res.statusCode === 302) {
48
+ file.close();
49
+ try { fs.unlinkSync(dest); } catch (_) {}
50
+ download(res.headers.location, dest).then(resolve).catch(reject);
51
+ return;
52
+ }
53
+ if (res.statusCode !== 200) {
54
+ file.close();
55
+ try { fs.unlinkSync(dest); } catch (_) {}
56
+ reject(new Error(`HTTP ${res.statusCode} downloading ${url}`));
57
+ return;
58
+ }
59
+ res.pipe(file);
60
+ file.on('finish', () => file.close(resolve));
61
+ file.on('error', (err) => {
62
+ try { fs.unlinkSync(dest); } catch (_) {}
63
+ reject(err);
64
+ });
65
+ }).on('error', (err) => {
66
+ try { fs.unlinkSync(dest); } catch (_) {}
67
+ reject(err);
68
+ });
69
+ });
70
+ }
71
+
72
+ async function main() {
73
+ const { artifact, ext, archive } = getPlatform();
74
+ const archiveName = `${artifact}${archive}`;
75
+ const url = `${BASE_URL}/${archiveName}`;
76
+ const tmpPath = path.join(os.tmpdir(), `coven-code-install-${process.pid}${archive}`);
77
+ const binaryDest = path.join(NATIVE_DIR, `coven-code${ext}`);
78
+
79
+ if (fs.existsSync(binaryDest)) {
80
+ console.log('coven-code: native binary already present, skipping download.');
81
+ return;
82
+ }
83
+
84
+ fs.mkdirSync(NATIVE_DIR, { recursive: true });
85
+
86
+ console.log(`coven-code: downloading v${VERSION} for ${process.platform}/${process.arch}`);
87
+ console.log(` ${url}`);
88
+ await download(url, tmpPath);
89
+
90
+ console.log('coven-code: extracting...');
91
+ if (archive === '.zip') {
92
+ execFileSync('powershell', [
93
+ '-NoProfile', '-NonInteractive', '-Command',
94
+ `Expand-Archive -Force -Path "${tmpPath}" -DestinationPath "${NATIVE_DIR}"`
95
+ ]);
96
+ } else {
97
+ execFileSync('tar', ['-xzf', tmpPath, '-C', NATIVE_DIR]);
98
+ }
99
+
100
+ try { fs.unlinkSync(tmpPath); } catch (_) {}
101
+
102
+ if (!fs.existsSync(binaryDest)) {
103
+ throw new Error(`Extraction succeeded but binary not found at ${binaryDest}`);
104
+ }
105
+
106
+ if (ext === '') {
107
+ fs.chmodSync(binaryDest, 0o755);
108
+ }
109
+
110
+ console.log(`coven-code: ready — run \`coven-code\` to start.`);
111
+ }
112
+
113
+ main().catch((err) => {
114
+ console.error(`\ncoven-code install failed: ${err.message}`);
115
+ console.error(`Manual install: https://github.com/${REPO}/releases/tag/v${VERSION}\n`);
116
+ process.exit(1);
117
+ });
package/package.json CHANGED
@@ -1,37 +1,40 @@
1
1
  {
2
2
  "name": "@opencoven/coven-code",
3
- "version": "0.0.4",
4
- "type": "module",
3
+ "version": "0.0.7",
4
+ "description": "Open-source, multi-provider agentic coding TUI for the terminal — OpenCoven fork of Claurst",
5
+ "license": "GPL-3.0-only",
5
6
  "repository": {
6
7
  "type": "git",
7
8
  "url": "git+https://github.com/OpenCoven/coven-code.git"
8
9
  },
9
- "exports": {
10
- ".": "./src/sdk.mjs"
10
+ "homepage": "https://opencoven.ai",
11
+ "bugs": {
12
+ "url": "https://github.com/OpenCoven/coven-code/issues"
11
13
  },
14
+ "keywords": [
15
+ "ai",
16
+ "coding-agent",
17
+ "tui",
18
+ "rust",
19
+ "coven",
20
+ "opencoven",
21
+ "terminal",
22
+ "agentic"
23
+ ],
24
+ "author": "OpenCoven (based on Claurst by Kuber Mehta)",
12
25
  "bin": {
13
- "coven-code": "bin/coven-code.mjs",
14
- "coven-code-sdk": "bin/coven-code-sdk.mjs"
26
+ "coven-code": "bin/coven-code"
27
+ },
28
+ "scripts": {
29
+ "postinstall": "node install.js"
15
30
  },
16
31
  "files": [
17
32
  "bin/",
18
- "docs/",
19
- "src/",
20
- "README.md"
33
+ "install.js",
34
+ "README.md",
35
+ "ATTRIBUTION.md"
21
36
  ],
22
- "publishConfig": {
23
- "access": "public"
24
- },
25
- "scripts": {
26
- "test": "node --test test/cli.test.mjs test/commands.test.mjs test/config.test.mjs test/execute.test.mjs test/mcp.test.mjs test/permissions.test.mjs test/plugins-agent-events.test.mjs test/plugins-commands.test.mjs test/plugins-discovery.test.mjs test/plugins-tool-events.test.mjs test/sdk.test.mjs test/skills.test.mjs test/stream-json.test.mjs test/threads.test.mjs test/tools.test.mjs test/tui.test.mjs",
27
- "start": "node ./bin/coven-code.mjs",
28
- "coven-code": "node ./bin/coven-code.mjs",
29
- "demo": "bash ./scripts/demo.sh"
30
- },
31
37
  "engines": {
32
- "node": ">=24"
33
- },
34
- "dependencies": {
35
- "neo-blessed": "0.2.0"
38
+ "node": ">=16"
36
39
  }
37
40
  }
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- import { runInstallCommand } from '../src/sdk-install.mjs';
3
-
4
- runInstallCommand(process.argv.slice(2))
5
- .then((exitCode) => {
6
- process.exit(exitCode);
7
- })
8
- .catch((error) => {
9
- const message = error instanceof Error ? error.message : String(error);
10
- console.error(message);
11
- process.exit(1);
12
- });
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env node
2
- import { main, UsageError } from '../src/main.mjs';
3
- import { CLI_NAME } from '../src/constants.mjs';
4
-
5
- process.stdout.on('error', (error) => {
6
- if (error?.code === 'EPIPE') process.exit(0);
7
- throw error;
8
- });
9
- process.on('SIGPIPE', () => process.exit(0));
10
-
11
- main().catch((error) => {
12
- if (error instanceof UsageError) {
13
- console.error(`${CLI_NAME}: ${error.message}`);
14
- console.error(`Run \`${CLI_NAME} --help\` for usage.`);
15
- process.exit(2);
16
- }
17
- console.error(error.stack || String(error));
18
- process.exit(1);
19
- });
package/docs/CLI.md DELETED
@@ -1,256 +0,0 @@
1
- # CLI Reference
2
-
3
- ## Entry Points
4
-
5
- During development, run the CLI through npm:
6
-
7
- ```sh
8
- npm run coven-code -- --help
9
- npm run coven-code -- -x "what is 2+2?"
10
- ```
11
-
12
- Installed package binaries:
13
-
14
- ```sh
15
- coven-code --help
16
- coven-code-sdk install
17
- ```
18
-
19
- The direct local entrypoint is:
20
-
21
- ```sh
22
- node ./bin/coven-code.mjs
23
- ```
24
-
25
- ## Help
26
-
27
- `coven-code --help` prints the full option and command reference. The excerpt
28
- below is verified against actual `--help` output by the test suite; regenerate
29
- it with `node ./bin/coven-code.mjs --help` between the markers if it drifts.
30
-
31
- <!-- BEGIN: coven-code --help -->
32
- ```text
33
- Coven Code
34
-
35
- Usage: coven-code [options] [command]
36
-
37
- Run with no arguments in a terminal to enter the panel TUI. Set
38
- COVEN_CODE_REPL=1 to use the classic readline REPL. Piped stdin becomes the
39
- first interactive message when stdout is a TTY. Pass --execute or redirect
40
- stdout to run a single turn and exit.
41
-
42
- Options:
43
- --execute, -x [prompt] Run one agent turn, print the final answer, and exit
44
- --stream-json Emit structured JSONL in execute mode
45
- --stream-json-thinking Include thinking blocks in stream JSON output
46
- --stream-json-input Read one or more user messages as JSONL from stdin
47
- --dangerously-allow-all Allow tool calls that would otherwise require approval
48
- --mcp-config <json> Add an inline MCP server config for this run
49
- --settings-file <path> Read user settings from a specific file
50
- --mode <name> Agent mode: smart, deep, rush, or large
51
- --reasoning-effort <level>
52
- Set reasoning effort for the active mode
53
- --label <name> Add a label to the created or continued thread
54
- --visibility <level> Thread visibility: private, public, workspace, group, or unlisted
55
- --archive Archive the thread after the execute turn
56
- --continue [thread-id] Continue the latest active thread or the specified thread
57
- --toolbox <path> Use a PATH-like toolbox root for this run
58
- --skills <path> Use a PATH-like skill root for this run
59
- --jetbrains Connect to a JetBrains IDE
60
- -h, --help Show help
61
- -v, --version Show version
62
-
63
- Commands:
64
- login Print local login instructions
65
- update Check for updates
66
- usage Show local usage estimates
67
- review Run configured local review checks
68
- tools list|make|show|use Manage built-in and toolbox tools
69
- permissions list Show permission policy rules
70
- config edit [--workspace] Open settings in $EDITOR
71
- ide connect Connect or inspect local IDE integration
72
- mcp add|list|doctor|approve|oauth
73
- Manage MCP server settings
74
- skill list|show Inspect discovered Coven Code agent skills
75
- plugins list|reload Show and reload project and user plugin files
76
- threads list|show|search|archive|visibility|continue|map|report
77
- Manage local thread records
78
- agents-md list Show AGENTS.md guidance files used for this cwd
79
- agents list Alias for agents-md list
80
-
81
- TUI lane commands:
82
- /lane refresh Refresh worktree, branch, changed files, and diff summary
83
- /lane harness <name|next> Select smart, deep, rush, or large for the lane
84
- /lane verify Run the detected verification command for the lane
85
- /lane status|diff Show lane status or diff summary
86
- ```
87
- <!-- END: coven-code --help -->
88
-
89
- ## Interactive Mode
90
-
91
- Run with no arguments in a TTY:
92
-
93
- ```sh
94
- coven-code
95
- ```
96
-
97
- The default interactive surface is a full-screen `neo-blessed` panel TUI with a
98
- transcript, tabs, compact status line, command palette, slash-command menu, and
99
- composer. It keeps a current local thread and accepts slash commands:
100
-
101
- ```text
102
- Coven Code 0.0.4
103
- [chat] lane tools threads config help mode: smart effort: high
104
- --------------------------------------------------------------------------------
105
- Ready. Type a prompt or /help.
106
- --------------------------------------------------------------------------------
107
- > /help
108
- ```
109
-
110
- Supported interactive behaviors include:
111
-
112
- - panel tabs for chat, lane, tools, threads, config, and help
113
- - `/lane refresh` to load current worktree, branch, changed files, and diff summary
114
- - `/lane harness <smart|deep|rush|large|next>` to select the active lane harness
115
- - `/lane verify` to run the detected verification command and keep its output in the lane panel
116
- - `/lane status` and `/lane diff` to inspect the visible lane model
117
- - `/` opens a filtered command menu with details for built-ins, skills, and
118
- plugin commands
119
- - Tab completes the selected slash command; Enter accepts it; Esc closes the menu
120
- - command palette actions for common thread and tool workflows
121
- - persistent line history
122
- - `/new` to start a fresh thread
123
- - `/continue` to resume a thread
124
- - `/queue` to queue a follow-up prompt
125
- - `/mode` to inspect or change the active mode
126
- - `/reasoning` to inspect or change reasoning effort
127
- - command aliases for tools, skills, plugins, threads, diagnostics, and IDE
128
- inspection
129
- - multiline prompts with trailing backslash continuation
130
-
131
- Use the classic readline REPL explicitly when a plain prompt is better for
132
- scripts, demos, or compatibility:
133
-
134
- ```sh
135
- COVEN_CODE_REPL=1 coven-code
136
- ```
137
-
138
- Disable classic REPL history for demos or tests:
139
-
140
- ```sh
141
- COVEN_CODE_REPL_HISTORY=0 coven-code
142
- ```
143
-
144
- `COVEN_CODE_TUI_SCRIPTED=1` is a deterministic test and automation hook for
145
- feeding newline-separated TUI input. It is not intended as a normal user mode.
146
-
147
- ## Execute Mode
148
-
149
- Use `--execute` or `-x` for one turn and exit:
150
-
151
- ```sh
152
- coven-code -x "what is 2+2?"
153
- coven-code -x "summarize @README.md"
154
- coven-code --continue T-example -x "continue this thread"
155
- ```
156
-
157
- Piped stdin is combined with the prompt:
158
-
159
- ```sh
160
- echo "list markdown files" | coven-code
161
- echo "additional context" | coven-code -x "answer using this context"
162
- ```
163
-
164
- `-x`, `--stream-json`, `--stream-json-input`, stdin piping, and subcommands
165
- keep their existing noninteractive behavior; the panel TUI only changes the
166
- bare no-argument TTY path.
167
-
168
- ## File, Image, Glob, and Thread References
169
-
170
- Execute prompts can reference local context:
171
-
172
- ```sh
173
- coven-code -x "summarize @README.md"
174
- coven-code -x "inspect @docs/*.md"
175
- coven-code -x "describe @image.png"
176
- coven-code -x "compare this with @T-existing-thread"
177
- coven-code -x "continue from @@search words"
178
- ```
179
-
180
- Text references are capped to keep prompts bounded. Binary files are skipped
181
- unless handled as supported media references.
182
-
183
- ## Stream JSON
184
-
185
- Use `--stream-json` for structured JSONL suitable for frontends and SDKs:
186
-
187
- ```sh
188
- coven-code -x "what is 2+2?" --stream-json
189
- coven-code -x "inspect this" --stream-json --stream-json-thinking
190
- ```
191
-
192
- Use `--stream-json-input` to read user messages from JSONL stdin:
193
-
194
- ```sh
195
- coven-code --stream-json --stream-json-input < messages.jsonl
196
- ```
197
-
198
- Stream JSON emits initialization, user, assistant, tool use, tool result, and
199
- final result messages.
200
-
201
- ## Tools
202
-
203
- ```sh
204
- coven-code tools list
205
- coven-code tools show Bash
206
- coven-code tools make --bash my-tool
207
- coven-code tools use tb__my-tool
208
- ```
209
-
210
- Built-in tools include `Bash`, `Read`, `Grep`, `glob`, `create_file`,
211
- `edit_file`, `undo_edit`, `Task`, `oracle`, `librarian`, `painter`, `mermaid`,
212
- `look_at`, `web_search`, `read_web_page`, `find_thread`, `finder`, and
213
- `read_mcp_resource`.
214
-
215
- ## Permissions
216
-
217
- ```sh
218
- coven-code permissions list
219
- coven-code permissions list --builtin
220
- coven-code permissions add allow Bash command.name git
221
- coven-code permissions test Bash command.name git
222
- ```
223
-
224
- Permission rules can allow or reject tool calls by tool name, action, command,
225
- arguments, server names, URLs, and nested context fields.
226
-
227
- ## Threads
228
-
229
- ```sh
230
- coven-code threads list
231
- coven-code threads show T-example
232
- coven-code threads search "query"
233
- coven-code threads continue T-example -x "follow up"
234
- coven-code threads archive T-example
235
- coven-code threads visibility T-example workspace
236
- coven-code threads map T-example
237
- coven-code threads report T-example
238
- ```
239
-
240
- Threads are local records that preserve prompts, labels, visibility, archive
241
- state, diagnostic reports, and reference edges.
242
-
243
- ## Other Commands
244
-
245
- ```sh
246
- coven-code login
247
- coven-code update
248
- coven-code usage
249
- coven-code review
250
- coven-code config edit
251
- coven-code config edit --workspace
252
- coven-code ide connect
253
- coven-code agents-md list
254
- ```
255
-
256
- `agents list` is an alias for `agents-md list`.