@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.
- package/README.md +29 -130
- package/bin/coven-code +26 -0
- package/install.js +117 -0
- package/package.json +25 -22
- package/bin/coven-code-sdk.mjs +0 -12
- package/bin/coven-code.mjs +0 -19
- package/docs/CLI.md +0 -256
- package/docs/CONFIGURATION.md +0 -107
- package/docs/DEMO.md +0 -453
- package/docs/DEVELOPMENT.md +0 -104
- package/docs/DOGFOOD-PROTOCOL.md +0 -263
- package/docs/MCP-SKILLS-PLUGINS.md +0 -127
- package/docs/README.md +0 -39
- package/docs/RELEASE.md +0 -33
- package/docs/SDK.md +0 -107
- package/docs/superpowers/plans/2026-05-25-coven-code-panel-tui.md +0 -904
- package/docs/superpowers/plans/2026-05-25-coven-code-rebrand.md +0 -670
- package/docs/superpowers/specs/2026-05-25-coven-code-panel-tui-design.md +0 -235
- package/docs/superpowers/specs/2026-05-26-slash-first-tui-review.md +0 -63
- package/src/agent/fixture.mjs +0 -95
- package/src/agent/lane.mjs +0 -136
- package/src/cli/dispatch.mjs +0 -66
- package/src/cli/execute.mjs +0 -452
- package/src/cli/help.mjs +0 -58
- package/src/cli/interactive-core.mjs +0 -28
- package/src/cli/interactive-io.mjs +0 -101
- package/src/cli/interactive-slash.mjs +0 -184
- package/src/cli/notifications.mjs +0 -13
- package/src/cli/parse.mjs +0 -83
- package/src/cli/reasoning.mjs +0 -45
- package/src/cli/refs.mjs +0 -162
- package/src/cli/repl.mjs +0 -60
- package/src/cli/slash-commands.mjs +0 -375
- package/src/cli/stream-json.mjs +0 -225
- package/src/cli/tui-actions.mjs +0 -72
- package/src/cli/tui-blessed.mjs +0 -198
- package/src/cli/tui-keys.mjs +0 -80
- package/src/cli/tui-lane.mjs +0 -73
- package/src/cli/tui-render.mjs +0 -169
- package/src/cli/tui-submit.mjs +0 -82
- package/src/cli/tui.mjs +0 -174
- package/src/commands/agents.mjs +0 -53
- package/src/commands/config.mjs +0 -27
- package/src/commands/ide.mjs +0 -17
- package/src/commands/login.mjs +0 -84
- package/src/commands/mcp.mjs +0 -176
- package/src/commands/permissions-eval.mjs +0 -122
- package/src/commands/permissions-rules.mjs +0 -53
- package/src/commands/permissions-text.mjs +0 -112
- package/src/commands/permissions.mjs +0 -62
- package/src/commands/plugins.mjs +0 -86
- package/src/commands/review.mjs +0 -74
- package/src/commands/skill.mjs +0 -23
- package/src/commands/threads.mjs +0 -165
- package/src/commands/tools.mjs +0 -77
- package/src/commands/update.mjs +0 -31
- package/src/commands/usage.mjs +0 -34
- package/src/constants.mjs +0 -52
- package/src/main.mjs +0 -87
- package/src/mcp/discover.mjs +0 -154
- package/src/mcp/local.mjs +0 -55
- package/src/mcp/parsers.mjs +0 -46
- package/src/mcp/permissions.mjs +0 -52
- package/src/mcp/probe.mjs +0 -85
- package/src/mcp/registry.mjs +0 -96
- package/src/mcp/remote-oauth.mjs +0 -55
- package/src/mcp/remote-session.mjs +0 -54
- package/src/mcp/remote-sse.mjs +0 -82
- package/src/mcp/remote.mjs +0 -74
- package/src/plugins/api.mjs +0 -187
- package/src/plugins/configuration.mjs +0 -124
- package/src/plugins/discover.mjs +0 -84
- package/src/plugins/helpers.mjs +0 -187
- package/src/plugins/subsystems.mjs +0 -198
- package/src/plugins/validators.mjs +0 -142
- package/src/sdk-execute.mjs +0 -82
- package/src/sdk-install.mjs +0 -187
- package/src/sdk-settings.mjs +0 -88
- package/src/sdk.mjs +0 -163
- package/src/settings/load.mjs +0 -134
- package/src/settings/paths.mjs +0 -101
- package/src/skills/builtin/building-skills/SKILL.md +0 -20
- package/src/skills/discover.mjs +0 -95
- package/src/threads/store.mjs +0 -176
- package/src/tools/builtin/bash.mjs +0 -110
- package/src/tools/builtin/create-file.mjs +0 -66
- package/src/tools/builtin/edit-file.mjs +0 -76
- package/src/tools/builtin/finder.mjs +0 -73
- package/src/tools/builtin/glob.mjs +0 -74
- package/src/tools/builtin/grep.mjs +0 -82
- package/src/tools/builtin/index.mjs +0 -83
- package/src/tools/builtin/librarian.mjs +0 -97
- package/src/tools/builtin/look-at.mjs +0 -92
- package/src/tools/builtin/mcp.mjs +0 -51
- package/src/tools/builtin/mermaid.mjs +0 -59
- package/src/tools/builtin/oracle.mjs +0 -56
- package/src/tools/builtin/painter.mjs +0 -81
- package/src/tools/builtin/plugin-tool.mjs +0 -53
- package/src/tools/builtin/read-mcp-resource.mjs +0 -63
- package/src/tools/builtin/read-web-page.mjs +0 -72
- package/src/tools/builtin/read.mjs +0 -59
- package/src/tools/builtin/runtime-content.mjs +0 -31
- package/src/tools/builtin/runtime-decisions.mjs +0 -115
- package/src/tools/builtin/runtime.mjs +0 -85
- package/src/tools/builtin/task.mjs +0 -63
- package/src/tools/builtin/toolbox-tool.mjs +0 -57
- package/src/tools/builtin/undo-edit.mjs +0 -97
- package/src/tools/builtin/web-search.mjs +0 -128
- package/src/tools/toolbox.mjs +0 -273
- package/src/util/fs.mjs +0 -13
- package/src/util/glob.mjs +0 -46
- package/src/util/html.mjs +0 -21
- package/src/util/media.mjs +0 -13
- package/src/util/shell.mjs +0 -24
- package/src/util/table.mjs +0 -11
package/docs/CONFIGURATION.md
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# Configuration
|
|
2
|
-
|
|
3
|
-
## Settings Files
|
|
4
|
-
|
|
5
|
-
Coven Code reads settings from these places:
|
|
6
|
-
|
|
7
|
-
- user settings: `${XDG_CONFIG_HOME:-~/.config}/coven-code/settings.json`
|
|
8
|
-
- workspace settings: `.coven-code/settings.json`
|
|
9
|
-
- explicit settings file: `--settings-file <path>`
|
|
10
|
-
- managed settings used by tests and embedding environments
|
|
11
|
-
|
|
12
|
-
Settings use the `covenCode.*` namespace.
|
|
13
|
-
|
|
14
|
-
Workspace settings override user settings where both define the same key.
|
|
15
|
-
Managed settings override both. Explicit command-line flags override settings
|
|
16
|
-
for the current run.
|
|
17
|
-
|
|
18
|
-
## Editing Settings
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
coven-code config edit
|
|
22
|
-
coven-code config edit --workspace
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Settings files may use JSONC syntax, including comments and trailing commas.
|
|
26
|
-
|
|
27
|
-
## Common Settings
|
|
28
|
-
|
|
29
|
-
```jsonc
|
|
30
|
-
{
|
|
31
|
-
"covenCode.tools.disable": ["web_search"],
|
|
32
|
-
"covenCode.tools.enable": ["Bash", "Read", "Grep"],
|
|
33
|
-
"covenCode.commands.allowlist": ["git", "npm", "node"],
|
|
34
|
-
"covenCode.permissions": [
|
|
35
|
-
{
|
|
36
|
-
"effect": "allow",
|
|
37
|
-
"tool": "Bash",
|
|
38
|
-
"match": {
|
|
39
|
-
"command.name": "git"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
"covenCode.mcpServers": {
|
|
44
|
-
"local-tools": {
|
|
45
|
-
"command": "node",
|
|
46
|
-
"args": ["./tools/server.mjs"]
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"covenCode.mcpPermissions": [],
|
|
50
|
-
"covenCode.mcpRegistry.url": "https://example.invalid/registry.json",
|
|
51
|
-
"covenCode.notifications.enabled": true,
|
|
52
|
-
"covenCode.updates.mode": "skip",
|
|
53
|
-
"covenCode.defaultVisibility": "workspace",
|
|
54
|
-
"covenCode.showCosts": true
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Environment Variables
|
|
59
|
-
|
|
60
|
-
```sh
|
|
61
|
-
COVEN_CODE_API_KEY
|
|
62
|
-
COVEN_CODE_HOME
|
|
63
|
-
COVEN_CODE_CLI_PATH
|
|
64
|
-
COVEN_CODE_TOOLBOX
|
|
65
|
-
COVEN_CODE_REPL_HISTORY
|
|
66
|
-
COVEN_CODE_REPL_HISTORY_FILE
|
|
67
|
-
COVEN_CODE_SKIP_UPDATE_CHECK
|
|
68
|
-
COVEN_CODE_FORCE_BEL
|
|
69
|
-
COVEN_CODE_URL
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
`COVEN_CODE_HOME` controls the local state root used by SDK-managed installs
|
|
73
|
-
and tests. `COVEN_CODE_CLI_PATH` points SDK execution at a specific CLI binary.
|
|
74
|
-
|
|
75
|
-
Use isolated state for demos and tests:
|
|
76
|
-
|
|
77
|
-
```sh
|
|
78
|
-
COVEN_CODE_HOME="$(mktemp -d)" \
|
|
79
|
-
XDG_CONFIG_HOME="$(mktemp -d)" \
|
|
80
|
-
COVEN_CODE_REPL_HISTORY=0 \
|
|
81
|
-
COVEN_CODE_SKIP_UPDATE_CHECK=1 \
|
|
82
|
-
npm run coven-code -- -x "what is 2+2?"
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## Visibility
|
|
86
|
-
|
|
87
|
-
Thread visibility accepts:
|
|
88
|
-
|
|
89
|
-
- `private`
|
|
90
|
-
- `public`
|
|
91
|
-
- `workspace`
|
|
92
|
-
- `group`
|
|
93
|
-
- `unlisted`
|
|
94
|
-
|
|
95
|
-
SDK compatibility maps documented team visibility to workspace visibility.
|
|
96
|
-
|
|
97
|
-
## Permissions Model
|
|
98
|
-
|
|
99
|
-
Permission rules are evaluated before tool execution. Built-in defaults can be
|
|
100
|
-
listed with:
|
|
101
|
-
|
|
102
|
-
```sh
|
|
103
|
-
coven-code permissions list --builtin
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Workspace permission settings override user settings. This keeps repository
|
|
107
|
-
policy close to the project under test.
|
package/docs/DEMO.md
DELETED
|
@@ -1,453 +0,0 @@
|
|
|
1
|
-
# Coven Code Demo
|
|
2
|
-
|
|
3
|
-
A 15-20 minute end-to-end walkthrough of every shipped surface in this
|
|
4
|
-
repository. Designed to be driven by a coding agent on the user's behalf,
|
|
5
|
-
or run live by a human presenter.
|
|
6
|
-
|
|
7
|
-
The companion script `scripts/demo.sh` is the executable source of truth.
|
|
8
|
-
Every shell block in this document also appears there in the same order
|
|
9
|
-
with the same expected outputs. The script is presentation-only and is
|
|
10
|
-
not wired into `npm test`.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Agent Instructions (read this first if you are an LLM)
|
|
15
|
-
|
|
16
|
-
You are driving this demo for the user. Follow these rules:
|
|
17
|
-
|
|
18
|
-
1. **Prefer the script over ad-hoc commands.** If the user says "run the
|
|
19
|
-
demo" with no qualifier, run `npm run demo` once end-to-end and
|
|
20
|
-
report results. Do not improvise commands that drift from what is
|
|
21
|
-
documented here. The script opens a menu by default but
|
|
22
|
-
auto-advances through every section when stdin is not a TTY, so
|
|
23
|
-
invoking it from an agent subprocess will not hang — it runs
|
|
24
|
-
straight through. To request only one section non-interactively,
|
|
25
|
-
the user can run `npm run demo` with input like `5\nq\n` piped in,
|
|
26
|
-
but the easier path is just `npm run demo -- --auto` for the full
|
|
27
|
-
walk.
|
|
28
|
-
|
|
29
|
-
2. **Walk the sections in order if asked to narrate.** When the user
|
|
30
|
-
asks for a guided walkthrough, run each section's commands in the
|
|
31
|
-
listed order. Before each command, state in one sentence what it
|
|
32
|
-
demonstrates. After each command, confirm the expected output shape
|
|
33
|
-
matches (do not paste full output back unless asked).
|
|
34
|
-
|
|
35
|
-
3. **Stop and ask before any of these.** The demo is offline and writes
|
|
36
|
-
only to a temporary `HOME`, so it is otherwise safe. But you must
|
|
37
|
-
confirm before:
|
|
38
|
-
- Running the demo against the user's real `HOME` instead of a
|
|
39
|
-
`mktemp` directory (do not do this unless explicitly asked).
|
|
40
|
-
- Installing the package globally (`coven-code-sdk install`) on
|
|
41
|
-
the user's machine.
|
|
42
|
-
- Modifying any committed file in this repo as part of the demo
|
|
43
|
-
(the demo should write only to `$DEMO_HOME` and `$DEMO_HOME`
|
|
44
|
-
subdirectories).
|
|
45
|
-
|
|
46
|
-
4. **The interactive panel TUI is the only surface you cannot drive.**
|
|
47
|
-
It requires a real terminal and keyboard input. When you reach the
|
|
48
|
-
TUI Appendix below, hand off to the user with the documented key
|
|
49
|
-
sequences they should try. Do not attempt to spawn the TUI yourself
|
|
50
|
-
in execute mode or stream-json mode — it will not work and you
|
|
51
|
-
will hang the session.
|
|
52
|
-
|
|
53
|
-
5. **All other state is disposable.** The demo writes to a fresh
|
|
54
|
-
`$DEMO_HOME = $(mktemp -d)`. To re-run cleanly, just re-invoke the
|
|
55
|
-
script — it creates a new temp dir each time. To clean up an old
|
|
56
|
-
run, the final section of the script prints the exact `rm -rf`
|
|
57
|
-
command to use.
|
|
58
|
-
|
|
59
|
-
6. **What this demo proves.** That every advertised feature in the
|
|
60
|
-
`README.md` "Implemented Surface" section actually works against
|
|
61
|
-
the local deterministic fixture agent (`src/agent/fixture.mjs`),
|
|
62
|
-
without needing an API key, network access, or a hosted Coven Code
|
|
63
|
-
service.
|
|
64
|
-
|
|
65
|
-
7. **What this demo does NOT prove.** It does not prove behavior
|
|
66
|
-
against a real hosted model, real remote MCP servers, real OAuth,
|
|
67
|
-
or the panel TUI's rendering. Those paths exist in the code but
|
|
68
|
-
are out of scope for an offline demo. If the user asks about them,
|
|
69
|
-
point them at `docs/MCP-SKILLS-PLUGINS.md`, the `mcp oauth login`
|
|
70
|
-
subcommand, and the TUI appendix below.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## How to Run the Demo
|
|
75
|
-
|
|
76
|
-
End-to-end (recommended):
|
|
77
|
-
|
|
78
|
-
```sh
|
|
79
|
-
npm run demo
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
This invokes `bash ./scripts/demo.sh`. The script opens with a
|
|
83
|
-
welcome banner listing the 12 sections and the sandboxed HOME it will
|
|
84
|
-
use, then drops into an interactive menu so the operator picks what
|
|
85
|
-
to see — no cognitive overload from a 12-section wall of output.
|
|
86
|
-
|
|
87
|
-
The menu accepts:
|
|
88
|
-
|
|
89
|
-
| Input | Action |
|
|
90
|
-
| -------- | -------------------------------------------------------- |
|
|
91
|
-
| `1`-`12` | run one section by number |
|
|
92
|
-
| `a` | run all sections in sequence, then print the scoreboard |
|
|
93
|
-
| `r` | replay the last section you ran |
|
|
94
|
-
| `t` | type your own prompt and run one execute turn |
|
|
95
|
-
| `s` | list the files the demo wrote into the sandbox HOME |
|
|
96
|
-
| `x` | open a real subshell inside the sandbox (`exit` returns) |
|
|
97
|
-
| `c` | copy the sandbox path to your clipboard |
|
|
98
|
-
| `l` | re-print the section table of contents (with `✓` marks) |
|
|
99
|
-
| `?` | show the menu help |
|
|
100
|
-
| `q` | quit (sandbox path printed so you can clean up or poke around) |
|
|
101
|
-
|
|
102
|
-
Each section starts with a short narration explaining what it proves,
|
|
103
|
-
runs its commands (the literal `coven-code …` shell line is printed in
|
|
104
|
-
magenta before each output), and closes with a green `✓ proved: …`
|
|
105
|
-
payoff and a `↳ see also:` pointer to the relevant doc. After every
|
|
106
|
-
section the menu re-displays the running counter (`3 / 12 sections
|
|
107
|
-
seen`) so the audience always knows where they are.
|
|
108
|
-
|
|
109
|
-
The menu reads input via `read -e` so backspace, arrow keys, and line
|
|
110
|
-
history work in any terminal that supports readline — including agent
|
|
111
|
-
shells. Direct invocation (`bash scripts/demo.sh`) works identically
|
|
112
|
-
if `npm` is unavailable.
|
|
113
|
-
|
|
114
|
-
To skip the menu and run every section straight through (for example
|
|
115
|
-
when capturing a transcript or showing the demo to yourself):
|
|
116
|
-
|
|
117
|
-
```sh
|
|
118
|
-
npm run demo -- --auto # explicit flag
|
|
119
|
-
COVEN_DEMO_AUTO=1 npm run demo # env var
|
|
120
|
-
npm run demo > /tmp/demo.log 2>&1 # non-TTY stdout auto-advances too
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
When stdin is not a TTY (CI, an agent subprocess, a piped run), the
|
|
124
|
-
script automatically runs in `--auto` mode so it never hangs.
|
|
125
|
-
|
|
126
|
-
Colors are emitted only when stdout is a TTY. Set `NO_COLOR=1` to
|
|
127
|
-
disable color in a terminal that supports it but where you would
|
|
128
|
-
rather have plain output (e.g., capturing for a markdown paste).
|
|
129
|
-
|
|
130
|
-
To inspect or modify the demo HOME after the run, set it explicitly:
|
|
131
|
-
|
|
132
|
-
```sh
|
|
133
|
-
COVEN_DEMO_HOME=/tmp/my-coven-demo npm run demo
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
To clean up:
|
|
137
|
-
|
|
138
|
-
```sh
|
|
139
|
-
rm -rf "$DEMO_HOME" # the script prints the exact path at the end
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
## Section 0 — Sanity
|
|
145
|
-
|
|
146
|
-
**What this shows.** The CLI is installed and the local login path
|
|
147
|
-
works without any account or API key.
|
|
148
|
-
|
|
149
|
-
```sh
|
|
150
|
-
node ./bin/coven-code.mjs --version # prints 0.0.4
|
|
151
|
-
node ./bin/coven-code.mjs --help # full option and command reference
|
|
152
|
-
node ./bin/coven-code.mjs login # printable instructions (no token yet)
|
|
153
|
-
node ./bin/coven-code.mjs login status # auth_status: logged_out
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
The repo intentionally has no live-model API integration. `login` and
|
|
157
|
-
`login status` operate against a local `~/.config/coven-code/auth.json`
|
|
158
|
-
file; the demo never sets a real token. If the user wants to also see
|
|
159
|
-
the credential-storage path, run `COVEN_CODE_API_KEY=demo-token coven-code login`
|
|
160
|
-
out of band — that is not part of the offline demo because it muddies
|
|
161
|
-
the "no credentials" story.
|
|
162
|
-
|
|
163
|
-
## Section 1 — Execute Mode
|
|
164
|
-
|
|
165
|
-
**What this shows.** Single-turn answers, mode and reasoning-effort
|
|
166
|
-
selection, `@file` context references, and stdin combination.
|
|
167
|
-
|
|
168
|
-
```sh
|
|
169
|
-
coven-code -x "what is 2+2?"
|
|
170
|
-
coven-code --mode deep --reasoning-effort high -x "summarize this request"
|
|
171
|
-
coven-code -x "summarize @sample.md"
|
|
172
|
-
printf 'extra context from stdin\n' | coven-code -x "answer using the piped context"
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
The fixture agent echoes a deterministic envelope around the prompt so
|
|
176
|
-
you can see exactly how mode, reasoning, file refs, and stdin flow into
|
|
177
|
-
the agent's input message.
|
|
178
|
-
|
|
179
|
-
## Section 2 — Threads
|
|
180
|
-
|
|
181
|
-
**What this shows.** Threads are local records. They persist across
|
|
182
|
-
execute turns, carry labels and visibility, support continue/search,
|
|
183
|
-
and can emit diagnostic reports and reference maps.
|
|
184
|
-
|
|
185
|
-
```sh
|
|
186
|
-
coven-code --label demo --visibility workspace -x "kick off a labelled demo thread"
|
|
187
|
-
coven-code threads list
|
|
188
|
-
coven-code --continue T-<id> -x "follow up on the previous turn"
|
|
189
|
-
coven-code threads show T-<id>
|
|
190
|
-
coven-code threads visibility T-<id> private
|
|
191
|
-
coven-code threads map T-<id>
|
|
192
|
-
coven-code threads report T-<id>
|
|
193
|
-
coven-code threads search "demo"
|
|
194
|
-
coven-code threads archive T-<id>
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
The script captures the first listed thread id into `$THREAD_ID` and
|
|
198
|
-
substitutes it into the subsequent commands.
|
|
199
|
-
|
|
200
|
-
## Section 3 — Stream JSON
|
|
201
|
-
|
|
202
|
-
**What this shows.** Structured JSONL output suitable for SDKs and
|
|
203
|
-
frontends, including thinking blocks and multi-turn JSONL input.
|
|
204
|
-
|
|
205
|
-
```sh
|
|
206
|
-
coven-code -x "what is 2+2?" --stream-json
|
|
207
|
-
coven-code -x "demonstrate reasoning" --stream-json --stream-json-thinking
|
|
208
|
-
coven-code -x 'kickoff' --stream-json --stream-json-input < messages.jsonl
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
`messages.jsonl` contains two `user` messages; the agent processes them
|
|
212
|
-
in order after the kickoff prompt.
|
|
213
|
-
|
|
214
|
-
## Section 4 — Permissions
|
|
215
|
-
|
|
216
|
-
**What this shows.** The default policy ships sensible allow/ask rules
|
|
217
|
-
for common shell commands, and operators can add and test their own.
|
|
218
|
-
|
|
219
|
-
```sh
|
|
220
|
-
coven-code permissions list
|
|
221
|
-
coven-code permissions add allow Bash command.name git
|
|
222
|
-
coven-code permissions test Bash command.name git
|
|
223
|
-
coven-code permissions list
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
Each rule is keyed by tool name plus a nested field path. `test`
|
|
227
|
-
prints the matched rule and source (user vs builtin) so you can see
|
|
228
|
-
exactly which rule wins.
|
|
229
|
-
|
|
230
|
-
## Section 5 — Tools and Toolbox
|
|
231
|
-
|
|
232
|
-
**What this shows.** Built-in tools, scaffolding a new toolbox tool,
|
|
233
|
-
running it directly, and pointing the CLI at a workspace-local
|
|
234
|
-
toolbox root with `--toolbox`.
|
|
235
|
-
|
|
236
|
-
```sh
|
|
237
|
-
coven-code tools list # built-ins
|
|
238
|
-
coven-code tools make --bash demo_tool # writes ~/.config/coven-code/tools/demo_tool
|
|
239
|
-
coven-code tools list # now includes tb__demo_tool
|
|
240
|
-
coven-code tools show tb__demo_tool
|
|
241
|
-
coven-code tools use tb__demo_tool --only output
|
|
242
|
-
coven-code --toolbox ./workspace-toolbox tools list # workspace-local toolbox
|
|
243
|
-
coven-code --toolbox ./workspace-toolbox tools show tb__local_tool
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
The `--only output` flag is two args (`--only output`), not
|
|
247
|
-
`--only-output`. The script uses the correct form.
|
|
248
|
-
|
|
249
|
-
## Section 6 — Skills
|
|
250
|
-
|
|
251
|
-
**What this shows.** Skill discovery from built-ins and a workspace
|
|
252
|
-
skill root via `--skills`.
|
|
253
|
-
|
|
254
|
-
```sh
|
|
255
|
-
coven-code skill list
|
|
256
|
-
coven-code skill show building-skills
|
|
257
|
-
coven-code --skills ./workspace-skills skill list
|
|
258
|
-
coven-code --skills ./workspace-skills skill show release-checklist
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
A skill is just a directory with a `SKILL.md` whose YAML frontmatter
|
|
262
|
-
declares `name` and `description`. The script writes a minimal
|
|
263
|
-
`release-checklist` skill so the workspace-root case has something to
|
|
264
|
-
show.
|
|
265
|
-
|
|
266
|
-
## Section 7 — MCP
|
|
267
|
-
|
|
268
|
-
**What this shows.** Adding a stdio MCP server, approving it, and
|
|
269
|
-
running the health doctor — all without contacting a real remote
|
|
270
|
-
server.
|
|
271
|
-
|
|
272
|
-
```sh
|
|
273
|
-
coven-code mcp list # (none)
|
|
274
|
-
coven-code mcp add demo-server -- node -e "process.stdout.write('hi')" # harmless stdio command
|
|
275
|
-
coven-code mcp list # demo-server listed, approved at user scope
|
|
276
|
-
coven-code mcp approve demo-server # workspace approval
|
|
277
|
-
coven-code mcp doctor # probes the server
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
The `--` separator is required so the spec parser knows where the
|
|
281
|
-
server name ends and the command begins. `mcp doctor` actually spawns
|
|
282
|
-
the configured command and waits for the MCP handshake; the harmless
|
|
283
|
-
command we use exits immediately, which the doctor reports as
|
|
284
|
-
"ok 0 tools."
|
|
285
|
-
|
|
286
|
-
For live remote MCP servers, see `docs/MCP-SKILLS-PLUGINS.md` and the
|
|
287
|
-
`coven-code mcp oauth login --server-url ... --client-id ... --client-secret ...`
|
|
288
|
-
flow. That path is intentionally out of scope for this offline demo.
|
|
289
|
-
|
|
290
|
-
## Section 8 — Plugins
|
|
291
|
-
|
|
292
|
-
**What this shows.** A project plugin in `.coven-code/plugins/*.ts`
|
|
293
|
-
registers a tool and a command. After reload, the new tool appears in
|
|
294
|
-
`tools list` and in the stream-json initialization message, proving it
|
|
295
|
-
is wired into the agent's runtime catalog.
|
|
296
|
-
|
|
297
|
-
```sh
|
|
298
|
-
# Plugin file (.coven-code/plugins/demo.ts):
|
|
299
|
-
export default function (covenCode) {
|
|
300
|
-
covenCode.registerTool({
|
|
301
|
-
name: 'demo_status',
|
|
302
|
-
description: 'Returns a deterministic status string for the demo plugin',
|
|
303
|
-
inputSchema: { type: 'object', properties: {}, additionalProperties: false },
|
|
304
|
-
async execute() {
|
|
305
|
-
return { content: [{ type: 'text', text: 'demo-plugin: ok' }] };
|
|
306
|
-
},
|
|
307
|
-
});
|
|
308
|
-
covenCode.registerCommand(
|
|
309
|
-
'demo-hello',
|
|
310
|
-
{ title: 'Demo Hello', description: 'Greets the operator from the demo plugin' },
|
|
311
|
-
async () => 'hello from the demo plugin',
|
|
312
|
-
);
|
|
313
|
-
}
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
```sh
|
|
317
|
-
coven-code plugins list
|
|
318
|
-
coven-code plugins reload
|
|
319
|
-
coven-code tools list # demo_status now appears as 'plugin'
|
|
320
|
-
coven-code -x "list available tools" --stream-json | head -1
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
The `head -1` line is the most important one: the init message's
|
|
324
|
-
`tools` array contains `demo_status`, confirming the plugin tool is
|
|
325
|
-
visible to the agent loop, not just to `tools list`.
|
|
326
|
-
|
|
327
|
-
## Section 9 — SDK
|
|
328
|
-
|
|
329
|
-
**What this shows.** Both the `coven-code-sdk` install helper and the
|
|
330
|
-
package's module exports (`execute`, `threads`, etc.).
|
|
331
|
-
|
|
332
|
-
```sh
|
|
333
|
-
node ./bin/coven-code-sdk.mjs # prints usage for the install helper
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
A tiny consumer (`sdk-demo.mjs`) imports from `src/sdk.mjs` and
|
|
337
|
-
streams an execute turn:
|
|
338
|
-
|
|
339
|
-
```js
|
|
340
|
-
import { execute, threads } from '<repo>/src/sdk.mjs';
|
|
341
|
-
|
|
342
|
-
const threadId = await threads.new({ cwd: process.cwd() });
|
|
343
|
-
for await (const message of execute({ prompt: 'demonstrate the SDK path' })) {
|
|
344
|
-
if (message.type === 'assistant') {
|
|
345
|
-
console.log('assistant:', message.message?.content?.[0]?.text);
|
|
346
|
-
}
|
|
347
|
-
if (message.type === 'result') {
|
|
348
|
-
console.log('result:', message.result);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
```sh
|
|
354
|
-
node sdk-demo.mjs
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
This proves the SDK shells out to `coven-code --stream-json` under the
|
|
358
|
-
hood and reshapes the JSONL into the documented event stream.
|
|
359
|
-
|
|
360
|
-
## Section 10 — Diagnostics
|
|
361
|
-
|
|
362
|
-
**What this shows.** Local-only diagnostic commands that are useful in
|
|
363
|
-
day-to-day operation but do not require model access.
|
|
364
|
-
|
|
365
|
-
```sh
|
|
366
|
-
coven-code usage # thread/turn counts and token estimates
|
|
367
|
-
coven-code review # configured local review checks (none by default)
|
|
368
|
-
coven-code ide connect # IDE integration status
|
|
369
|
-
coven-code agents-md list # AGENTS.md guidance files discovered from cwd
|
|
370
|
-
coven-code update # update check (skipped because of COVEN_CODE_SKIP_UPDATE_CHECK=1)
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
The script writes a minimal `AGENTS.md` into the demo workspace so the
|
|
374
|
-
`agents-md list` output is non-empty.
|
|
375
|
-
|
|
376
|
-
## Section 11 — Cleanup
|
|
377
|
-
|
|
378
|
-
The script prints the absolute path of the temp `HOME` it used, along
|
|
379
|
-
with the exact `rm -rf` command to remove it. The demo never writes
|
|
380
|
-
outside `$DEMO_HOME`.
|
|
381
|
-
|
|
382
|
-
---
|
|
383
|
-
|
|
384
|
-
## Appendix A — Panel TUI (human only)
|
|
385
|
-
|
|
386
|
-
The interactive panel TUI is the project's headline UI but cannot be
|
|
387
|
-
scripted (it owns the terminal, processes raw keys, and has no
|
|
388
|
-
non-interactive contract beyond the deterministic test hook
|
|
389
|
-
`COVEN_CODE_TUI_SCRIPTED=1`, which is reserved for tests, not demos).
|
|
390
|
-
|
|
391
|
-
For a live audience, run this section by hand in a normal terminal:
|
|
392
|
-
|
|
393
|
-
```sh
|
|
394
|
-
node ./bin/coven-code.mjs # no arguments, in a TTY -> panel TUI
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
Things worth showing:
|
|
398
|
-
|
|
399
|
-
1. **Tabs.** The status bar shows `chat | lane | tools | threads | config | help`.
|
|
400
|
-
Cycle through them.
|
|
401
|
-
2. **Slash menu.** Type `/` in the composer to open the slash command
|
|
402
|
-
palette with live filtering. Tab completes the selection.
|
|
403
|
-
3. **`/help`.** Lists built-in slash commands.
|
|
404
|
-
4. **`/mode`.** Shows the active agent mode (`smart`, `deep`, `rush`,
|
|
405
|
-
`large`) and lets you change it.
|
|
406
|
-
5. **`/reasoning`.** Inspects or changes reasoning effort.
|
|
407
|
-
6. **`/lane refresh`, `/lane status`, `/lane diff`.** Loads the current
|
|
408
|
-
worktree, branch, changed files, and a diff summary into the lane
|
|
409
|
-
panel.
|
|
410
|
-
7. **`/lane harness <smart|deep|rush|large|next>`.** Switches the active
|
|
411
|
-
lane harness.
|
|
412
|
-
8. **`/lane verify`.** Runs the detected verification command for the
|
|
413
|
-
lane and keeps its output in the panel.
|
|
414
|
-
9. **`/new` and `/continue`.** Start a fresh thread or resume one.
|
|
415
|
-
10. **`/queue`.** Queues a follow-up prompt while the current turn is
|
|
416
|
-
still running.
|
|
417
|
-
|
|
418
|
-
To exit cleanly, the standard kill key for `neo-blessed` apps works
|
|
419
|
-
(`Ctrl-C`).
|
|
420
|
-
|
|
421
|
-
If a demo cannot use a real TTY (e.g., recorded over an SSH pipeline
|
|
422
|
-
without a pty), fall back to the classic readline REPL instead — it
|
|
423
|
-
composes with shell pipelines and is fully scriptable:
|
|
424
|
-
|
|
425
|
-
```sh
|
|
426
|
-
COVEN_CODE_REPL=1 COVEN_CODE_REPL_HISTORY=0 coven-code
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
---
|
|
430
|
-
|
|
431
|
-
## Appendix B — What to do if the demo fails
|
|
432
|
-
|
|
433
|
-
The script uses `set -euo pipefail`, so any non-zero exit immediately
|
|
434
|
-
stops the run and the failing command is visible in the last printed
|
|
435
|
-
`$ ...` banner.
|
|
436
|
-
|
|
437
|
-
Common failure modes:
|
|
438
|
-
|
|
439
|
-
- **`node: command not found`** — `package.json` requires Node 24+.
|
|
440
|
-
Check `node --version`.
|
|
441
|
-
- **`Unknown tool: tb__demo_tool`** — a previous failed run left state
|
|
442
|
-
in `$DEMO_HOME`. The script always creates a fresh temp HOME, so
|
|
443
|
-
just re-run.
|
|
444
|
-
- **`Unknown mcp command: ...`** — you're on an older CLI than this
|
|
445
|
-
doc was written against. Pull the repo to head and re-run.
|
|
446
|
-
- **`Plugin tool execute handler is required`** — the plugin file was
|
|
447
|
-
edited away from the documented shape. Restore it from this doc or
|
|
448
|
-
`scripts/demo.sh`.
|
|
449
|
-
|
|
450
|
-
If any other command fails, capture the full output and the path of
|
|
451
|
-
the temp HOME (printed in section 11) and share both. The temp HOME
|
|
452
|
-
contains all settings, threads, plugins, and skills that the demo
|
|
453
|
-
generated, which is enough to reproduce the failure offline.
|
package/docs/DEVELOPMENT.md
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# Development
|
|
2
|
-
|
|
3
|
-
## Requirements
|
|
4
|
-
|
|
5
|
-
- Node.js 24 or newer (plugins are loaded as `.ts` modules, which Node added native unflagged support for in 23.6)
|
|
6
|
-
- npm for this package's current lockfile and scripts
|
|
7
|
-
|
|
8
|
-
The runtime intentionally has a small dependency surface. `neo-blessed` owns the
|
|
9
|
-
live panel TUI so Coven Code does not maintain a fragile raw escape-code input
|
|
10
|
-
loop. Keep any future dependency additions similarly narrow and justified.
|
|
11
|
-
|
|
12
|
-
## Repository Layout
|
|
13
|
-
|
|
14
|
-
```text
|
|
15
|
-
bin/ CLI entrypoints
|
|
16
|
-
docs/ User-facing documentation
|
|
17
|
-
src/agent/ Local deterministic agent behavior
|
|
18
|
-
src/cli/ Argument parsing, TUI/REPL, references, stream helpers
|
|
19
|
-
src/commands/ Top-level command implementations
|
|
20
|
-
src/mcp/ MCP discovery, permissions, probing, registry checks
|
|
21
|
-
src/plugins/ Project/user plugin discovery and lifecycle
|
|
22
|
-
src/settings/ Settings paths and merge logic
|
|
23
|
-
src/skills/ Skill discovery and built-in skills
|
|
24
|
-
src/threads/ Local thread persistence
|
|
25
|
-
src/tools/ Built-in and toolbox tool surfaces
|
|
26
|
-
test/ Node test suite
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Local Verification
|
|
30
|
-
|
|
31
|
-
Run this before every commit:
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
git diff --check
|
|
35
|
-
node ./bin/coven-code.mjs --help
|
|
36
|
-
node ./bin/coven-code.mjs -x "what is 2+2?"
|
|
37
|
-
npm test
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Expected result:
|
|
41
|
-
|
|
42
|
-
- no whitespace errors
|
|
43
|
-
- help renders
|
|
44
|
-
- execute mode prints `4`
|
|
45
|
-
- test suite exits with zero failures
|
|
46
|
-
|
|
47
|
-
## Isolated Demo State
|
|
48
|
-
|
|
49
|
-
Use temporary state when demonstrating the CLI so the run does not write to the
|
|
50
|
-
operator's normal config or REPL history:
|
|
51
|
-
|
|
52
|
-
```sh
|
|
53
|
-
COVEN_CODE_HOME="$(mktemp -d)" \
|
|
54
|
-
XDG_CONFIG_HOME="$(mktemp -d)" \
|
|
55
|
-
COVEN_CODE_REPL_HISTORY=0 \
|
|
56
|
-
COVEN_CODE_SKIP_UPDATE_CHECK=1 \
|
|
57
|
-
npm run coven-code -- -x "what is 2+2?"
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
For interactive demos, bare `coven-code` opens the `neo-blessed` panel TUI. Use
|
|
61
|
-
`/` in the composer to verify the slash-command menu, filtering, details panel,
|
|
62
|
-
Tab completion, Enter acceptance, and Esc close behavior. Use the classic
|
|
63
|
-
readline surface only when the demo needs a plain prompt:
|
|
64
|
-
|
|
65
|
-
```sh
|
|
66
|
-
COVEN_CODE_REPL=1 \
|
|
67
|
-
COVEN_CODE_REPL_HISTORY=0 \
|
|
68
|
-
COVEN_CODE_SKIP_UPDATE_CHECK=1 \
|
|
69
|
-
npm run coven-code
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
`COVEN_CODE_TUI_SCRIPTED=1` is reserved for deterministic TUI tests and
|
|
73
|
-
automation. It feeds newline-separated input through the TUI loop without
|
|
74
|
-
changing execute mode, stream JSON, stdin piping, or subcommand behavior.
|
|
75
|
-
|
|
76
|
-
## Testing Expectations
|
|
77
|
-
|
|
78
|
-
Add or update tests in `test/cli.test.mjs` for any CLI behavior change. TUI
|
|
79
|
-
changes should cover the model/renderer, key handling, scripted smoke path, and
|
|
80
|
-
classic REPL compatibility when needed. Slash-command changes should test the
|
|
81
|
-
catalog source and at least one rendered/filtering TUI state. Prefer
|
|
82
|
-
deterministic local tests over network calls. When a feature integrates with MCP,
|
|
83
|
-
plugins, skills, or toolbox tools, test both discovery and execution paths.
|
|
84
|
-
|
|
85
|
-
## Safety
|
|
86
|
-
|
|
87
|
-
- Do not commit secrets, tokens, generated credentials, or local config state.
|
|
88
|
-
- Keep examples deterministic and local.
|
|
89
|
-
- Keep docs and command help aligned.
|
|
90
|
-
- Do not rely on hosted services for default behavior.
|
|
91
|
-
- Keep private workspace paths and machine-specific URLs out of docs.
|
|
92
|
-
|
|
93
|
-
## Release Notes
|
|
94
|
-
|
|
95
|
-
The package currently uses version `0.0.0` while the CLI surface is rebuilt.
|
|
96
|
-
Before publishing, update versioning deliberately and verify:
|
|
97
|
-
|
|
98
|
-
```sh
|
|
99
|
-
npm test
|
|
100
|
-
npm pack --dry-run
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
The `.npmignore` file excludes internal superpowers planning notes while
|
|
104
|
-
including the user-facing docs in this directory.
|