command-code 1.4.1 → 1.4.3
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/CHANGELOG.md +12 -0
- package/dist/bundled/command-code-knowledge/SKILL.md +2 -3
- package/dist/bundled/command-code-knowledge/reference/custom-agents.md +2 -2
- package/dist/bundled/command-code-knowledge/reference/custom-slash-commands.md +195 -271
- package/dist/bundled/command-code-knowledge/reference/headless.md +20 -3
- package/dist/bundled/command-code-knowledge/reference/hooks.md +4 -2
- package/dist/bundled/command-code-knowledge/reference/mcp.md +2 -2
- package/dist/bundled/command-code-knowledge/reference/memory.md +77 -38
- package/dist/bundled/command-code-knowledge/reference/permissions.md +37 -3
- package/dist/bundled/command-code-knowledge/reference/plan-mode.md +215 -64
- package/dist/bundled/command-code-knowledge/reference/{checkpoints.md → sessions.md} +28 -4
- package/dist/bundled/command-code-knowledge/reference/skills.md +1 -1
- package/dist/bundled/mod-builder/reference/overview.md +25 -12
- package/dist/bundled/mod-builder/reference/verify.md +1 -1
- package/dist/cli.mjs +3 -3
- package/package.json +5 -5
- package/vsix/commandcode-vscode.vsix +0 -0
- package/dist/bundled/command-code-knowledge/reference/plan-review.md +0 -226
|
@@ -9,19 +9,24 @@ Mods are TypeScript packages that let you modify almost any behavior of Command
|
|
|
9
9
|
A loadable mod IS an `AgentMod` once loaded; the mod host just builds it from a factory file instead of a code import:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
~/.commandcode/mods/review-guard.ts
|
|
13
|
-
│
|
|
14
|
-
▼ jiti
|
|
12
|
+
~/.commandcode/mods/review-guard.ts
|
|
13
|
+
│ one file = one mod
|
|
14
|
+
▼ jiti · TypeScript, no build step
|
|
15
15
|
default-export factory(cmd: ModApi)
|
|
16
16
|
│
|
|
17
17
|
▼ createModHost().register(...)
|
|
18
|
-
hooks + addTool
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
hooks + addTool ──► ONE AgentMod
|
|
19
|
+
id `mod:<name>`,
|
|
20
|
+
appended after built-ins
|
|
21
|
+
addCommand ──► /slash dispatch
|
|
22
|
+
+ TUI autocomplete
|
|
23
|
+
on(event) ──► AgentEvent bus
|
|
24
|
+
(observe-only)
|
|
25
|
+
hooks.transformInput ──► typed-prompt
|
|
26
|
+
interception
|
|
27
|
+
addProvider ──► ProviderModule
|
|
28
|
+
addRenderer ──► custom feed entries
|
|
29
|
+
queueMessage ──► steering drains
|
|
25
30
|
```
|
|
26
31
|
|
|
27
32
|
The factory receives the API bound as `cmd`. Registration verbs are all `add*` and each returns a `Disposable` - call `.dispose()` to undo exactly that one registration.
|
|
@@ -189,7 +194,15 @@ Built-in mods always win a name collision against a discovered mod of the same n
|
|
|
189
194
|
|
|
190
195
|
## Runnable examples
|
|
191
196
|
|
|
192
|
-
|
|
197
|
+
Command Code ships runnable, single-file example mods and reads them itself. You don't need to find them on disk - just ask:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
build a mod that blocks dangerous shell commands
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Command Code opens the matching example and works from it. Every example loads through the real mod loader in CI on every test run, so what it copies is proven to load.
|
|
204
|
+
|
|
205
|
+
Ask for any of these by name or by what you want:
|
|
193
206
|
|
|
194
207
|
| File | Shows |
|
|
195
208
|
|---|---|
|
|
@@ -215,7 +228,7 @@ Runnable, single-file example mods ship with Command Code inside the bundled `mo
|
|
|
215
228
|
- **Reload is the `/reload` path.** Mods load once per process; `/reload` restarts the process, which re-discovers and re-imports every mod (jiti caches nothing between loads). There is no in-place hot swap.
|
|
216
229
|
- **Session controls stop at the harness surface.** `cmd.sessions` covers what the live harness owns (compact, tree, navigate, labels); creating/switching/forking sessions is host lifecycle, not harness state, and stays with the host UI.
|
|
217
230
|
|
|
218
|
-
Embedders wire the same machinery directly: `createModHost` + `loadMods` + `createHarness({modHost})` (or `createNodeHarnessSession({modHost})`)
|
|
231
|
+
Embedders wire the same machinery directly: `createModHost` + `loadMods` + `createHarness({modHost})` (or `createNodeHarnessSession({modHost})`), all exported from `@commandcode/harness`.
|
|
219
232
|
|
|
220
233
|
---
|
|
221
234
|
|
|
@@ -55,4 +55,4 @@ Print mode loads user-scope and `--mod` mods with the UI bridge degraded to dete
|
|
|
55
55
|
|
|
56
56
|
## Working from the bundled examples
|
|
57
57
|
|
|
58
|
-
Command Code
|
|
58
|
+
Ask Command Code to build the mod you want and it starts from a bundled example rather than a blank file - see [Runnable examples](./overview.md#runnable-examples) for the list. Each one loads through the real mod loader in CI on every test run, so what you start from is proven to load.
|