@dreb/coding-agent 2.52.0 → 2.53.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 +1 -1
- package/dist/core/slash-commands.d.ts +14 -0
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +28 -3
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +11 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +15 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts +3 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +130 -27
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +48 -4
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/docs/dashboard.md +1 -3
- package/docs/extensions.md +4 -4
- package/docs/rpc.md +58 -17
- package/package.json +1 -1
package/docs/rpc.md
CHANGED
|
@@ -82,6 +82,8 @@ If the agent is streaming and no `streamingBehavior` is specified, the command r
|
|
|
82
82
|
|
|
83
83
|
**Input expansion**: Skill commands (`/skill:name`) and prompt templates (`/template`) are expanded before sending/queueing.
|
|
84
84
|
|
|
85
|
+
**Built-in commands are client actions, not model prompts.** Registered built-ins such as `/fork` are rejected by `prompt`, `steer`, and `follow_up` with `success: false`; the message is not queued or sent to the model. Discover them through [`get_commands`](#get_commands), then invoke the corresponding RPC operation or client UI. Matching uses the complete first slash token: `/fork` and `/fork anything` are recognized, while `/forklift` and unknown slash commands remain ordinary prompt text.
|
|
86
|
+
|
|
85
87
|
Response:
|
|
86
88
|
```json
|
|
87
89
|
{"id": "req-1", "type": "response", "command": "prompt", "success": true}
|
|
@@ -169,6 +171,34 @@ If an extension cancelled:
|
|
|
169
171
|
{"type": "response", "command": "new_session", "success": true, "data": {"cancelled": true}}
|
|
170
172
|
```
|
|
171
173
|
|
|
174
|
+
#### reload
|
|
175
|
+
|
|
176
|
+
Reload session resources (extensions, skills, prompt templates, context, and themes) using the same core reload operation as the interactive command.
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{"type": "reload"}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Response:
|
|
183
|
+
```json
|
|
184
|
+
{"type": "response", "command": "reload", "success": true}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
#### dream
|
|
188
|
+
|
|
189
|
+
Run memory consolidation or manage its archive path. `args` is the text after `/dream`: omit it to run consolidation, use `"backup"` to read the archive path, or `"backup <path>"` to set it.
|
|
190
|
+
|
|
191
|
+
```json
|
|
192
|
+
{"type": "dream", "args": "backup"}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Response:
|
|
196
|
+
```json
|
|
197
|
+
{"type": "response", "command": "dream", "success": true, "data": {"message": "Dream backup path: /home/user/.dreb/memory-archive"}}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
A consolidation run performs and verifies the backup before prompting the agent. Backup, lock, path-validation, settings-write, or consolidation failures are explicit RPC errors.
|
|
201
|
+
|
|
172
202
|
### State
|
|
173
203
|
|
|
174
204
|
#### get_state
|
|
@@ -800,6 +830,19 @@ Response:
|
|
|
800
830
|
}
|
|
801
831
|
```
|
|
802
832
|
|
|
833
|
+
#### import_jsonl
|
|
834
|
+
|
|
835
|
+
Import a JSONL session into the current runtime. This can be cancelled by a session-switch extension hook.
|
|
836
|
+
|
|
837
|
+
```json
|
|
838
|
+
{"type": "import_jsonl", "inputPath": "/tmp/session.jsonl"}
|
|
839
|
+
```
|
|
840
|
+
|
|
841
|
+
Response:
|
|
842
|
+
```json
|
|
843
|
+
{"type": "response", "command": "import_jsonl", "success": true, "data": {"cancelled": false}}
|
|
844
|
+
```
|
|
845
|
+
|
|
803
846
|
#### switch_session
|
|
804
847
|
|
|
805
848
|
Load a different session file. Can be cancelled by a `session_before_switch` extension event handler.
|
|
@@ -945,7 +988,7 @@ The current session name is available via `get_state` in the `sessionName` field
|
|
|
945
988
|
|
|
946
989
|
#### get_commands
|
|
947
990
|
|
|
948
|
-
|
|
991
|
+
Discover extension commands, prompt templates, skills, and registered built-ins. Resource commands can be invoked through `prompt`; built-ins have `source: "builtin"` and require client-side handling through the corresponding RPC operation or UI. Sending a recognized built-in through `prompt`, `steer`, or `follow_up` is rejected fail-closed.
|
|
949
992
|
|
|
950
993
|
```json
|
|
951
994
|
{"type": "get_commands"}
|
|
@@ -959,28 +1002,26 @@ Response:
|
|
|
959
1002
|
"success": true,
|
|
960
1003
|
"data": {
|
|
961
1004
|
"commands": [
|
|
962
|
-
{"name": "session-name", "description": "Set or clear session name", "source": "extension", "path": "/home/user/.dreb/agent/extensions/session.ts"},
|
|
963
|
-
{"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "
|
|
964
|
-
{"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "
|
|
1005
|
+
{"name": "session-name", "description": "Set or clear session name", "source": "extension", "sourceInfo": {"path": "/home/user/.dreb/agent/extensions/session.ts"}},
|
|
1006
|
+
{"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "sourceInfo": {"path": "/home/user/myproject/.dreb/agent/prompts/fix-tests.md"}},
|
|
1007
|
+
{"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "sourceInfo": {"path": "/home/user/.dreb/agent/skills/brave-search/SKILL.md"}},
|
|
1008
|
+
{"name": "fork", "description": "Create a new fork from a previous message", "source": "builtin", "dashboard": true},
|
|
1009
|
+
{"name": "copy", "description": "Copy last agent message to clipboard", "source": "builtin", "dashboard": false}
|
|
965
1010
|
]
|
|
966
1011
|
}
|
|
967
1012
|
}
|
|
968
1013
|
```
|
|
969
1014
|
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
- `
|
|
973
|
-
- `
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
-
|
|
978
|
-
- `"user"`: User-level (`~/.dreb/agent/`)
|
|
979
|
-
- `"project"`: Project-level (`./.dreb/agent/`)
|
|
980
|
-
- `"path"`: Explicit path via CLI or settings
|
|
981
|
-
- `path`: Absolute file path to the command source (optional)
|
|
1015
|
+
Every command has `name`, optional `description`, and a `source`:
|
|
1016
|
+
|
|
1017
|
+
- `"extension"`: registered via `dreb.registerCommand()`; prompt-invokable and includes `sourceInfo`.
|
|
1018
|
+
- `"prompt"`: loaded prompt template; prompt-invokable and includes `sourceInfo`.
|
|
1019
|
+
- `"skill"`: loaded skill (name prefixed with `skill:`); prompt-invokable and includes `sourceInfo`.
|
|
1020
|
+
- `"builtin"`: core slash command; not prompt-invokable, has no file `sourceInfo`, and includes `dashboard`. A false value means dashboard clients should omit it from autocomplete while still intercepting typed use with terminal-only guidance.
|
|
1021
|
+
|
|
1022
|
+
Names are deduplicated, with a built-in taking precedence over a colliding resource command. Future registry entries appear automatically. Hidden development commands are intentionally not registered and do not appear.
|
|
982
1023
|
|
|
983
|
-
|
|
1024
|
+
The extension SDK's `dreb.getCommands()` contract is unchanged: it continues to return only commands invokable via `prompt`, with required resource provenance. Built-ins are added only to this RPC discovery surface.
|
|
984
1025
|
|
|
985
1026
|
### Session Listing
|
|
986
1027
|
|