devrites 7.2.0 → 7.2.1
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 +6 -0
- package/README.md +1 -1
- package/docs/dsh.md +41 -2
- package/pack/generated/dsh/AGENTS.md +7 -0
- package/pack/generated/dsh/runtime/codebase-memory.patch.yml +16 -0
- package/pack/generated/dsh/runtime/cordis.patch.yml +313 -1
- package/pack/generated/dsh/runtime/specialist.mjs +24 -1
- package/package.json +1 -1
- package/scripts/dsh-generate.py +36 -6
- package/scripts/dsh-specialist.mjs +24 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to DevRites are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and DevRites adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Releases are generated automatically by [semantic-release](https://semantic-release.gitbook.io/) from Conventional Commits on `main`.
|
|
4
4
|
|
|
5
|
+
## [7.2.1](https://github.com/ViktorsBaikers/DevRites/compare/v7.2.0...v7.2.1) (2026-10-29)
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
* **agents:** restore DSH code intelligence and skill discovery ([#185](https://github.com/ViktorsBaikers/DevRites/issues/185)) ([ab67651](https://github.com/ViktorsBaikers/DevRites/commit/ab67651aa3a9555fdf68e40859f3451ab20f42e7))
|
|
10
|
+
|
|
5
11
|
## [7.2.0](https://github.com/ViktorsBaikers/DevRites/compare/v7.1.2...v7.2.0) (2026-10-28)
|
|
6
12
|
|
|
7
13
|
### Added
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ history can't lose it. After you clear the conversation, switch hosts, or hand
|
|
|
31
31
|
the feature to another engineer, the next session reads the same plan,
|
|
32
32
|
decisions, and evidence before it continues.
|
|
33
33
|
|
|
34
|
-
**Status:** [`v7.2.
|
|
34
|
+
**Status:** [`v7.2.1`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v7.2.1): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
|
|
35
35
|
|
|
36
36
|
This is the latest published release; `main` may contain unreleased work.
|
|
37
37
|
|
package/docs/dsh.md
CHANGED
|
@@ -13,7 +13,9 @@ your DSH profile; the installer does not edit your global DSH configuration.
|
|
|
13
13
|
Use `--no-dsh` with DevRites install/update to omit this host. Updates and
|
|
14
14
|
uninstall manage the same files through the existing hashed manifest.
|
|
15
15
|
|
|
16
|
-
Skills live under `.dsh/skills`, with native invocation flags preserved.
|
|
16
|
+
Skills live under `.dsh/skills`, with native invocation flags preserved. Presets
|
|
17
|
+
with skill access mount DSH's filesystem skill provider before the skill tool
|
|
18
|
+
so installed skills are discovered in that preset's scope. The
|
|
17
19
|
`.dsh/agents` files retain the expanded canonical specialist instructions.
|
|
18
20
|
`.dsh/cordis.patch.yml` and `.dsh/specialist.mjs` register those exact identities
|
|
19
21
|
as native DSH presets and enforce their tool and permission boundaries.
|
|
@@ -37,9 +39,46 @@ DSH's inherited parent override before each allowed call, preserves an existing
|
|
|
37
39
|
read-only parent boundary, and denies explicit sandbox escalation. Confining
|
|
38
40
|
shell and filesystem providers are required; an unconfined composition fails
|
|
39
41
|
closed. Tool access derives from canonical agent frontmatter; unsupported
|
|
40
|
-
Claude-specific tools
|
|
42
|
+
Claude-specific tools are omitted. The writer's exact file list
|
|
41
43
|
remains a task contract checked by the orchestrator, as on the other hosts.
|
|
42
44
|
|
|
45
|
+
Codebase Memory MCP is optional. Install `codebase-memory-mcp` separately and
|
|
46
|
+
make the binary available on `PATH`, then load the supplied connection overlay:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
dsh web --patch .dsh/codebase-memory.patch.yml --patch .dsh/cordis.patch.yml
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The optional overlay registers one global `@deepseek-ai/dsh-mcp-client` stdio
|
|
53
|
+
connection named `codebase-memory-mcp`. If your DSH configuration already provides
|
|
54
|
+
that global connection, use only `.dsh/cordis.patch.yml`. Installation does not
|
|
55
|
+
install the MCP binary, start a server, or change global configuration. Without
|
|
56
|
+
the overlay or a configured connection, grep/glob/read remain available.
|
|
57
|
+
|
|
58
|
+
For a browser served on a local interface, keep launcher flags before app flags:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
dsh web --patch .dsh/codebase-memory.patch.yml --patch .dsh/cordis.patch.yml --no-open --host <local-interface-ip> --port 3080
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Canonical `mcp__codebase-memory-mcp__*` grants expand to a finite set of query
|
|
65
|
+
tools: index status, projects, schema, architecture, graph and code search, call
|
|
66
|
+
paths, snippets, file outlines, graph queries, change detection, coverage, and
|
|
67
|
+
graph comparisons. Individual supported query grants are also preserved. Roles
|
|
68
|
+
without a canonical grant receive none. Other MCP namespaces, unknown tools,
|
|
69
|
+
`delete_project`, `manage_adr`, and `ingest_traces` are denied. Only the root
|
|
70
|
+
orchestrator may use `index_repository`, with `persistence` omitted or `false`
|
|
71
|
+
for cache-only indexing; all specialists, including writers, cannot index.
|
|
72
|
+
|
|
73
|
+
Use graph queries first for structural questions, checking index status,
|
|
74
|
+
freshness, and coverage and verifying material findings in source. Use
|
|
75
|
+
grep/glob for literal searches. An unavailable server or missing index falls
|
|
76
|
+
back to grep/glob/read; a specialist may hand indexing to the parent. The tool
|
|
77
|
+
catalog refreshes when DSH registers or removes tools, including later successful
|
|
78
|
+
connections. DSH may retain registrations during a temporary connection loss.
|
|
79
|
+
MCP calls use the external server's permissions, outside DSH's shell/filesystem
|
|
80
|
+
sandbox. LSP integration is outside this adapter's scope.
|
|
81
|
+
|
|
43
82
|
The adapter targets the published DSH `0.2.1-rc.2` plugin interfaces, checked
|
|
44
83
|
against [DeepSeek Harness source](https://github.com/deepseek-ai/deepseek-harness)
|
|
45
84
|
at `f3803c96974ad4a94195fb97e5c637e9c2a3afe3`. DSH is a developer preview;
|
|
@@ -17,4 +17,11 @@ the dependent work. Report the failure; never impersonate the specialist inline.
|
|
|
17
17
|
The orchestrator writes workspace bookkeeping; only the named writer writes source
|
|
18
18
|
and tests within its path contract. No skill or result authorizes commits, pushes,
|
|
19
19
|
publishing, deployment, or other irreversible actions without explicit approval.
|
|
20
|
+
Use configured Codebase Memory MCP queries first for structural code questions.
|
|
21
|
+
Check index status, freshness, and coverage before relying on graph results; verify
|
|
22
|
+
material findings in source. Only the orchestrator may index, using cache-only
|
|
23
|
+
`index_repository` with persistence omitted or false. Children never index: hand
|
|
24
|
+
missing or stale coverage to the parent, or use grep/glob/read for source fallback.
|
|
25
|
+
If the MCP server or index is unavailable, continue with grep/glob/read. Keep
|
|
26
|
+
grep/glob for literal searches. MCP permissions are separate from the file sandbox.
|
|
20
27
|
<!-- END DEVRITES DSH -->
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"insert": [
|
|
4
|
+
{
|
|
5
|
+
"id": "devrites-codebase-memory",
|
|
6
|
+
"name": "@deepseek-ai/dsh-mcp-client",
|
|
7
|
+
"config": {
|
|
8
|
+
"serverName": "codebase-memory-mcp",
|
|
9
|
+
"transport": "stdio",
|
|
10
|
+
"command": "codebase-memory-mcp",
|
|
11
|
+
"args": []
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
]
|
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
"id": "tool-bash",
|
|
27
27
|
"name": "@deepseek-ai/dsh-tool-bash"
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
"id": "skill-filesystem",
|
|
31
|
+
"name": "@deepseek-ai/dsh-skill-filesystem"
|
|
32
|
+
},
|
|
29
33
|
{
|
|
30
34
|
"id": "tool-skill",
|
|
31
35
|
"name": "@deepseek-ai/dsh-tool-skill"
|
|
@@ -63,6 +67,21 @@
|
|
|
63
67
|
"job_list",
|
|
64
68
|
"job_output",
|
|
65
69
|
"list_agents",
|
|
70
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
71
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
72
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
73
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
74
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
75
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
76
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
77
|
+
"mcp__codebase-memory-mcp__index_repository",
|
|
78
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
79
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
80
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
81
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
82
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
83
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
84
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
66
85
|
"read",
|
|
67
86
|
"read_image",
|
|
68
87
|
"send_message",
|
|
@@ -103,7 +122,8 @@
|
|
|
103
122
|
"overhaul-specialist",
|
|
104
123
|
"overhaul-verifier"
|
|
105
124
|
],
|
|
106
|
-
"
|
|
125
|
+
"indexTool": "mcp__codebase-memory-mcp__index_repository",
|
|
126
|
+
"instructions": "# DevRites for DSH\n\nUse the installed skills under `.dsh/skills` and invoke `/rite` or `/rite-<verb>`.\nRead `.dsh/skills/devrites-lib/reference/standards/core.md` before a workflow.\nDispatch means call `subagent` with `agent_preset` set to the exact named specialist,\na self-contained `prompt`, and a short `description`. Every dispatch uses the native\n`spawn` provider, a fresh Session with zero parent conversation. Never use a generic\nagent, inherit the orchestrator preset, or use `subagent_fork` as a substitute.\nInclude the exact project-relative allowed paths and required evidence in the prompt.\nThe child id returned by `subagent` is an admission receipt, not a completed result.\nCollect the native parent settlement notice for each id, including final text and\nterminal status. `list_agents` activity `inactive` does not prove success. Reconcile\nevery result and compare returned paths with the contract before continuing.\nMissing preset, failed activation, interrupted execution, or missing result blocks\nthe dependent work. Report the failure; never impersonate the specialist inline.\nThe orchestrator writes workspace bookkeeping; only the named writer writes source\nand tests within its path contract. No skill or result authorizes commits, pushes,\npublishing, deployment, or other irreversible actions without explicit approval.\nUse configured Codebase Memory MCP queries first for structural code questions.\nCheck index status, freshness, and coverage before relying on graph results; verify\nmaterial findings in source. Only the orchestrator may index, using cache-only\n`index_repository` with persistence omitted or false. Children never index: hand\nmissing or stale coverage to the parent, or use grep/glob/read for source fallback.\nIf the MCP server or index is unavailable, continue with grep/glob/read. Keep\ngrep/glob for literal searches. MCP permissions are separate from the file sandbox.\n"
|
|
107
127
|
}
|
|
108
128
|
},
|
|
109
129
|
{
|
|
@@ -184,6 +204,20 @@
|
|
|
184
204
|
"job_kill",
|
|
185
205
|
"job_list",
|
|
186
206
|
"job_output",
|
|
207
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
208
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
209
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
210
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
211
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
212
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
213
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
214
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
215
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
216
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
217
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
218
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
219
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
220
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
187
221
|
"read",
|
|
188
222
|
"read_image"
|
|
189
223
|
],
|
|
@@ -217,6 +251,20 @@
|
|
|
217
251
|
"allowedTools": [
|
|
218
252
|
"glob",
|
|
219
253
|
"grep",
|
|
254
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
255
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
256
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
257
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
258
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
259
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
260
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
261
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
262
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
263
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
264
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
265
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
266
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
267
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
220
268
|
"read",
|
|
221
269
|
"read_image"
|
|
222
270
|
],
|
|
@@ -262,6 +310,20 @@
|
|
|
262
310
|
"job_kill",
|
|
263
311
|
"job_list",
|
|
264
312
|
"job_output",
|
|
313
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
314
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
315
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
316
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
317
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
318
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
319
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
320
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
321
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
322
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
323
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
324
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
325
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
326
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
265
327
|
"read",
|
|
266
328
|
"read_image"
|
|
267
329
|
],
|
|
@@ -311,6 +373,20 @@
|
|
|
311
373
|
"job_kill",
|
|
312
374
|
"job_list",
|
|
313
375
|
"job_output",
|
|
376
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
377
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
378
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
379
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
380
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
381
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
382
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
383
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
384
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
385
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
386
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
387
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
388
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
389
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
314
390
|
"read",
|
|
315
391
|
"read_image",
|
|
316
392
|
"web_fetch",
|
|
@@ -358,6 +434,20 @@
|
|
|
358
434
|
"job_kill",
|
|
359
435
|
"job_list",
|
|
360
436
|
"job_output",
|
|
437
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
438
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
439
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
440
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
441
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
442
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
443
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
444
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
445
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
446
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
447
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
448
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
449
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
450
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
361
451
|
"read",
|
|
362
452
|
"read_image"
|
|
363
453
|
],
|
|
@@ -391,6 +481,20 @@
|
|
|
391
481
|
"allowedTools": [
|
|
392
482
|
"glob",
|
|
393
483
|
"grep",
|
|
484
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
485
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
486
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
487
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
488
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
489
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
490
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
491
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
492
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
493
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
494
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
495
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
496
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
497
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
394
498
|
"read",
|
|
395
499
|
"read_image"
|
|
396
500
|
],
|
|
@@ -436,6 +540,20 @@
|
|
|
436
540
|
"job_kill",
|
|
437
541
|
"job_list",
|
|
438
542
|
"job_output",
|
|
543
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
544
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
545
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
546
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
547
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
548
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
549
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
550
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
551
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
552
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
553
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
554
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
555
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
556
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
439
557
|
"read",
|
|
440
558
|
"read_image"
|
|
441
559
|
],
|
|
@@ -469,6 +587,20 @@
|
|
|
469
587
|
"allowedTools": [
|
|
470
588
|
"glob",
|
|
471
589
|
"grep",
|
|
590
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
591
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
592
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
593
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
594
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
595
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
596
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
597
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
598
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
599
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
600
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
601
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
602
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
603
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
472
604
|
"read",
|
|
473
605
|
"read_image"
|
|
474
606
|
],
|
|
@@ -592,6 +724,20 @@
|
|
|
592
724
|
"job_kill",
|
|
593
725
|
"job_list",
|
|
594
726
|
"job_output",
|
|
727
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
728
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
729
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
730
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
731
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
732
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
733
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
734
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
735
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
736
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
737
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
738
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
739
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
740
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
595
741
|
"read",
|
|
596
742
|
"read_image"
|
|
597
743
|
],
|
|
@@ -637,6 +783,20 @@
|
|
|
637
783
|
"job_kill",
|
|
638
784
|
"job_list",
|
|
639
785
|
"job_output",
|
|
786
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
787
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
788
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
789
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
790
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
791
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
792
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
793
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
794
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
795
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
796
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
797
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
798
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
799
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
640
800
|
"read",
|
|
641
801
|
"read_image"
|
|
642
802
|
],
|
|
@@ -665,6 +825,10 @@
|
|
|
665
825
|
"id": "tool-bash",
|
|
666
826
|
"name": "@deepseek-ai/dsh-tool-bash"
|
|
667
827
|
},
|
|
828
|
+
{
|
|
829
|
+
"id": "skill-filesystem",
|
|
830
|
+
"name": "@deepseek-ai/dsh-skill-filesystem"
|
|
831
|
+
},
|
|
668
832
|
{
|
|
669
833
|
"id": "tool-skill",
|
|
670
834
|
"name": "@deepseek-ai/dsh-tool-skill"
|
|
@@ -687,6 +851,20 @@
|
|
|
687
851
|
"job_kill",
|
|
688
852
|
"job_list",
|
|
689
853
|
"job_output",
|
|
854
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
855
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
856
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
857
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
858
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
859
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
860
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
861
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
862
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
863
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
864
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
865
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
866
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
867
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
690
868
|
"read",
|
|
691
869
|
"read_image",
|
|
692
870
|
"skill",
|
|
@@ -734,6 +912,20 @@
|
|
|
734
912
|
"job_kill",
|
|
735
913
|
"job_list",
|
|
736
914
|
"job_output",
|
|
915
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
916
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
917
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
918
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
919
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
920
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
921
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
922
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
923
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
924
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
925
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
926
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
927
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
928
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
737
929
|
"read",
|
|
738
930
|
"read_image"
|
|
739
931
|
],
|
|
@@ -767,6 +959,20 @@
|
|
|
767
959
|
"allowedTools": [
|
|
768
960
|
"glob",
|
|
769
961
|
"grep",
|
|
962
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
963
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
964
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
965
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
966
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
967
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
968
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
969
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
970
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
971
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
972
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
973
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
974
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
975
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
770
976
|
"read",
|
|
771
977
|
"read_image"
|
|
772
978
|
],
|
|
@@ -812,6 +1018,20 @@
|
|
|
812
1018
|
"job_kill",
|
|
813
1019
|
"job_list",
|
|
814
1020
|
"job_output",
|
|
1021
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
1022
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
1023
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
1024
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
1025
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
1026
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
1027
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
1028
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
1029
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
1030
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
1031
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
1032
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
1033
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
1034
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
815
1035
|
"read",
|
|
816
1036
|
"read_image"
|
|
817
1037
|
],
|
|
@@ -873,6 +1093,10 @@
|
|
|
873
1093
|
"id": "tool-bash",
|
|
874
1094
|
"name": "@deepseek-ai/dsh-tool-bash"
|
|
875
1095
|
},
|
|
1096
|
+
{
|
|
1097
|
+
"id": "skill-filesystem",
|
|
1098
|
+
"name": "@deepseek-ai/dsh-skill-filesystem"
|
|
1099
|
+
},
|
|
876
1100
|
{
|
|
877
1101
|
"id": "tool-skill",
|
|
878
1102
|
"name": "@deepseek-ai/dsh-tool-skill"
|
|
@@ -895,6 +1119,20 @@
|
|
|
895
1119
|
"job_kill",
|
|
896
1120
|
"job_list",
|
|
897
1121
|
"job_output",
|
|
1122
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
1123
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
1124
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
1125
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
1126
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
1127
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
1128
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
1129
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
1130
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
1131
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
1132
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
1133
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
1134
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
1135
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
898
1136
|
"read",
|
|
899
1137
|
"read_image",
|
|
900
1138
|
"skill",
|
|
@@ -942,6 +1180,20 @@
|
|
|
942
1180
|
"job_kill",
|
|
943
1181
|
"job_list",
|
|
944
1182
|
"job_output",
|
|
1183
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
1184
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
1185
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
1186
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
1187
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
1188
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
1189
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
1190
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
1191
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
1192
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
1193
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
1194
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
1195
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
1196
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
945
1197
|
"read",
|
|
946
1198
|
"read_image"
|
|
947
1199
|
],
|
|
@@ -987,6 +1239,20 @@
|
|
|
987
1239
|
"job_kill",
|
|
988
1240
|
"job_list",
|
|
989
1241
|
"job_output",
|
|
1242
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
1243
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
1244
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
1245
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
1246
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
1247
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
1248
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
1249
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
1250
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
1251
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
1252
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
1253
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
1254
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
1255
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
990
1256
|
"read",
|
|
991
1257
|
"read_image"
|
|
992
1258
|
],
|
|
@@ -1032,6 +1298,20 @@
|
|
|
1032
1298
|
"job_kill",
|
|
1033
1299
|
"job_list",
|
|
1034
1300
|
"job_output",
|
|
1301
|
+
"mcp__codebase-memory-mcp__check_index_coverage",
|
|
1302
|
+
"mcp__codebase-memory-mcp__compare_graphs",
|
|
1303
|
+
"mcp__codebase-memory-mcp__detect_changes",
|
|
1304
|
+
"mcp__codebase-memory-mcp__get_architecture",
|
|
1305
|
+
"mcp__codebase-memory-mcp__get_code_snippet",
|
|
1306
|
+
"mcp__codebase-memory-mcp__get_file_outline",
|
|
1307
|
+
"mcp__codebase-memory-mcp__get_graph_schema",
|
|
1308
|
+
"mcp__codebase-memory-mcp__index_status",
|
|
1309
|
+
"mcp__codebase-memory-mcp__list_projects",
|
|
1310
|
+
"mcp__codebase-memory-mcp__query_graph",
|
|
1311
|
+
"mcp__codebase-memory-mcp__search_code",
|
|
1312
|
+
"mcp__codebase-memory-mcp__search_graph",
|
|
1313
|
+
"mcp__codebase-memory-mcp__trace_call_path",
|
|
1314
|
+
"mcp__codebase-memory-mcp__trace_path",
|
|
1035
1315
|
"read",
|
|
1036
1316
|
"read_image"
|
|
1037
1317
|
],
|
|
@@ -1060,6 +1340,10 @@
|
|
|
1060
1340
|
"id": "tool-bash",
|
|
1061
1341
|
"name": "@deepseek-ai/dsh-tool-bash"
|
|
1062
1342
|
},
|
|
1343
|
+
{
|
|
1344
|
+
"id": "skill-filesystem",
|
|
1345
|
+
"name": "@deepseek-ai/dsh-skill-filesystem"
|
|
1346
|
+
},
|
|
1063
1347
|
{
|
|
1064
1348
|
"id": "tool-skill",
|
|
1065
1349
|
"name": "@deepseek-ai/dsh-tool-skill"
|
|
@@ -1110,6 +1394,10 @@
|
|
|
1110
1394
|
"id": "tool-bash",
|
|
1111
1395
|
"name": "@deepseek-ai/dsh-tool-bash"
|
|
1112
1396
|
},
|
|
1397
|
+
{
|
|
1398
|
+
"id": "skill-filesystem",
|
|
1399
|
+
"name": "@deepseek-ai/dsh-skill-filesystem"
|
|
1400
|
+
},
|
|
1113
1401
|
{
|
|
1114
1402
|
"id": "tool-skill",
|
|
1115
1403
|
"name": "@deepseek-ai/dsh-tool-skill"
|
|
@@ -1160,6 +1448,10 @@
|
|
|
1160
1448
|
"id": "tool-bash",
|
|
1161
1449
|
"name": "@deepseek-ai/dsh-tool-bash"
|
|
1162
1450
|
},
|
|
1451
|
+
{
|
|
1452
|
+
"id": "skill-filesystem",
|
|
1453
|
+
"name": "@deepseek-ai/dsh-skill-filesystem"
|
|
1454
|
+
},
|
|
1163
1455
|
{
|
|
1164
1456
|
"id": "tool-skill",
|
|
1165
1457
|
"name": "@deepseek-ai/dsh-tool-skill"
|
|
@@ -1210,6 +1502,10 @@
|
|
|
1210
1502
|
"id": "tool-bash",
|
|
1211
1503
|
"name": "@deepseek-ai/dsh-tool-bash"
|
|
1212
1504
|
},
|
|
1505
|
+
{
|
|
1506
|
+
"id": "skill-filesystem",
|
|
1507
|
+
"name": "@deepseek-ai/dsh-skill-filesystem"
|
|
1508
|
+
},
|
|
1213
1509
|
{
|
|
1214
1510
|
"id": "tool-skill",
|
|
1215
1511
|
"name": "@deepseek-ai/dsh-tool-skill"
|
|
@@ -1260,6 +1556,10 @@
|
|
|
1260
1556
|
"id": "tool-bash",
|
|
1261
1557
|
"name": "@deepseek-ai/dsh-tool-bash"
|
|
1262
1558
|
},
|
|
1559
|
+
{
|
|
1560
|
+
"id": "skill-filesystem",
|
|
1561
|
+
"name": "@deepseek-ai/dsh-skill-filesystem"
|
|
1562
|
+
},
|
|
1263
1563
|
{
|
|
1264
1564
|
"id": "tool-skill",
|
|
1265
1565
|
"name": "@deepseek-ai/dsh-tool-skill"
|
|
@@ -1312,6 +1612,10 @@
|
|
|
1312
1612
|
"id": "tool-bash",
|
|
1313
1613
|
"name": "@deepseek-ai/dsh-tool-bash"
|
|
1314
1614
|
},
|
|
1615
|
+
{
|
|
1616
|
+
"id": "skill-filesystem",
|
|
1617
|
+
"name": "@deepseek-ai/dsh-skill-filesystem"
|
|
1618
|
+
},
|
|
1315
1619
|
{
|
|
1316
1620
|
"id": "tool-skill",
|
|
1317
1621
|
"name": "@deepseek-ai/dsh-tool-skill"
|
|
@@ -1362,6 +1666,10 @@
|
|
|
1362
1666
|
"id": "tool-bash",
|
|
1363
1667
|
"name": "@deepseek-ai/dsh-tool-bash"
|
|
1364
1668
|
},
|
|
1669
|
+
{
|
|
1670
|
+
"id": "skill-filesystem",
|
|
1671
|
+
"name": "@deepseek-ai/dsh-skill-filesystem"
|
|
1672
|
+
},
|
|
1365
1673
|
{
|
|
1366
1674
|
"id": "tool-skill",
|
|
1367
1675
|
"name": "@deepseek-ai/dsh-tool-skill"
|
|
@@ -1412,6 +1720,10 @@
|
|
|
1412
1720
|
"id": "tool-bash",
|
|
1413
1721
|
"name": "@deepseek-ai/dsh-tool-bash"
|
|
1414
1722
|
},
|
|
1723
|
+
{
|
|
1724
|
+
"id": "skill-filesystem",
|
|
1725
|
+
"name": "@deepseek-ai/dsh-skill-filesystem"
|
|
1726
|
+
},
|
|
1415
1727
|
{
|
|
1416
1728
|
"id": "tool-skill",
|
|
1417
1729
|
"name": "@deepseek-ai/dsh-tool-skill"
|
|
@@ -47,11 +47,34 @@ export async function apply(ctx, config) {
|
|
|
47
47
|
// Preset-local tools are inherited by the Agent; restrict at that child scope.
|
|
48
48
|
ctx.on('agent/created', ({ agent }) => {
|
|
49
49
|
pinPermission(agent.session);
|
|
50
|
-
|
|
50
|
+
let current;
|
|
51
|
+
let release;
|
|
52
|
+
let refreshing = false;
|
|
53
|
+
let disposed = false;
|
|
54
|
+
const refresh = () => {
|
|
55
|
+
if (refreshing || disposed) return;
|
|
56
|
+
const names = allowedTools.filter(tool => ctx.tools.get(tool) !== undefined
|
|
57
|
+
|| agent.ctx.tools.get(tool, agent) !== undefined);
|
|
58
|
+
const key = JSON.stringify(names);
|
|
59
|
+
if (key === current) return;
|
|
60
|
+
refreshing = true;
|
|
61
|
+
try {
|
|
62
|
+
current = key;
|
|
63
|
+
release?.();
|
|
64
|
+
release = agent.ctx.tools.restrict({ allow: names });
|
|
65
|
+
} finally {
|
|
66
|
+
refreshing = false;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
agent.ctx.on('tools/change', refresh);
|
|
70
|
+
agent.ctx.effect(() => () => { disposed = true; release?.(); });
|
|
71
|
+
refresh();
|
|
51
72
|
});
|
|
52
73
|
ctx.tools.guard(exec => {
|
|
53
74
|
if (!exec.agent) return `${role}: agent identity required`;
|
|
54
75
|
if (!allowed.has(exec.name)) return `${role}: tool ${exec.name} is not allowed`;
|
|
76
|
+
if (exec.name === config.indexTool && exec.arguments?.persistence !== undefined
|
|
77
|
+
&& exec.arguments.persistence !== false) return `${role}: graph indexing must be cache-only (persistence: false)`;
|
|
55
78
|
if (exec.name === 'subagent' && !config.allowedAgentPresets?.includes(exec.arguments?.agent_preset)) {
|
|
56
79
|
return `${role}: an exact named specialist agent_preset is required`;
|
|
57
80
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devrites",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.1",
|
|
4
4
|
"description": "DevRites: a disciplined senior-engineer workflow pack for Claude Code, Codex, omp, pi, and Devin CLI",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://github.com/ViktorsBaikers/DevRites#readme",
|
package/scripts/dsh-generate.py
CHANGED
|
@@ -26,6 +26,13 @@ the dependent work. Report the failure; never impersonate the specialist inline.
|
|
|
26
26
|
The orchestrator writes workspace bookkeeping; only the named writer writes source
|
|
27
27
|
and tests within its path contract. No skill or result authorizes commits, pushes,
|
|
28
28
|
publishing, deployment, or other irreversible actions without explicit approval.
|
|
29
|
+
Use configured Codebase Memory MCP queries first for structural code questions.
|
|
30
|
+
Check index status, freshness, and coverage before relying on graph results; verify
|
|
31
|
+
material findings in source. Only the orchestrator may index, using cache-only
|
|
32
|
+
`index_repository` with persistence omitted or false. Children never index: hand
|
|
33
|
+
missing or stale coverage to the parent, or use grep/glob/read for source fallback.
|
|
34
|
+
If the MCP server or index is unavailable, continue with grep/glob/read. Keep
|
|
35
|
+
grep/glob for literal searches. MCP permissions are separate from the file sandbox.
|
|
29
36
|
"""
|
|
30
37
|
|
|
31
38
|
DSH_DOCTOR = """ On DSH, require the loaded `.dsh/cordis.patch.yml` overlay, the exact named
|
|
@@ -39,13 +46,33 @@ DSH_DOCTOR = """ On DSH, require the loaded `.dsh/cordis.patch.yml` overlay, t
|
|
|
39
46
|
TOOLS = {"Read": ["read", "read_image"], "Grep": ["grep"], "Glob": ["glob"],
|
|
40
47
|
"Bash": ["bash", "job_output", "job_kill", "job_list"], "Edit": ["edit"], "Write": ["write"],
|
|
41
48
|
"Skill": ["skill"], "WebFetch": ["web_fetch"], "WebSearch": ["web_search"]}
|
|
49
|
+
MCP_PREFIX = "mcp__codebase-memory-mcp__"
|
|
50
|
+
MCP_QUERY_TOOLS = {MCP_PREFIX + name for name in (
|
|
51
|
+
"index_status", "list_projects", "get_graph_schema", "get_architecture",
|
|
52
|
+
"search_graph", "search_code", "trace_path", "trace_call_path", "get_code_snippet",
|
|
53
|
+
"get_file_outline", "query_graph", "detect_changes", "check_index_coverage", "compare_graphs",
|
|
54
|
+
)}
|
|
55
|
+
MCP_INDEX_TOOL = MCP_PREFIX + "index_repository"
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def mapped_tools(raw):
|
|
59
|
+
tools = set()
|
|
60
|
+
for token in raw.split(","):
|
|
61
|
+
token = token.strip()
|
|
62
|
+
tools.update(TOOLS.get(token, []))
|
|
63
|
+
if token == MCP_PREFIX + "*":
|
|
64
|
+
tools.update(MCP_QUERY_TOOLS)
|
|
65
|
+
elif token in MCP_QUERY_TOOLS:
|
|
66
|
+
tools.add(token)
|
|
67
|
+
return sorted(tools)
|
|
42
68
|
|
|
43
69
|
|
|
44
70
|
def tool_plugins(tools):
|
|
45
71
|
packages = []
|
|
46
72
|
for group, package in [({"read", "read_image", "edit", "write"}, "tool-fs"),
|
|
47
73
|
({"glob", "grep"}, "tool-fs-search"),
|
|
48
|
-
({"bash"}, "tool-bash"), ({"skill"}, "
|
|
74
|
+
({"bash"}, "tool-bash"), ({"skill"}, "skill-filesystem"),
|
|
75
|
+
({"skill"}, "tool-skill"),
|
|
49
76
|
({"job_output", "job_kill", "job_list"}, "tool-jobs"),
|
|
50
77
|
({"web_fetch", "web_search"}, "tool-web"),
|
|
51
78
|
({"list_agents", "send_message", "interrupt_agent"}, "tool-subagent-control"),
|
|
@@ -101,13 +128,10 @@ def generate(source, target):
|
|
|
101
128
|
fields, body = frontmatter(text)
|
|
102
129
|
role = fields["name"]
|
|
103
130
|
permission = "workspace-write" if fields.get("permissionMode") == "acceptEdits" else "read-only"
|
|
104
|
-
tools = []
|
|
105
131
|
raw = fields.get("tools", "Read, Grep, Glob, Bash, Skill" + (", Edit, Write" if permission == "workspace-write" else ""))
|
|
106
|
-
|
|
107
|
-
tools.extend(TOOLS.get(tool.strip(), []))
|
|
132
|
+
tools = mapped_tools(raw)
|
|
108
133
|
if permission == "read-only":
|
|
109
134
|
tools = [tool for tool in tools if tool not in ("edit", "write")]
|
|
110
|
-
tools = sorted(set(tools))
|
|
111
135
|
agents.joinpath(path.name).write_text(text)
|
|
112
136
|
presets.append({"id": role, "name": role, "description": fields["description"],
|
|
113
137
|
"plugins": tool_plugins(tools) + [{"id": "devrites-role", "name": "devrites:role", "config": {
|
|
@@ -115,18 +139,24 @@ def generate(source, target):
|
|
|
115
139
|
"instructions": body}}]})
|
|
116
140
|
roles = [preset["id"] for preset in presets]
|
|
117
141
|
root_tools = sorted({tool for names in TOOLS.values() for tool in names}
|
|
142
|
+
| MCP_QUERY_TOOLS | {MCP_INDEX_TOOL}
|
|
118
143
|
| {"subagent", "list_agents", "send_message", "interrupt_agent", "ask_user_question"})
|
|
119
144
|
presets.insert(0, {"id": "devrites-orchestrator", "name": "DevRites", "description": "DevRites workflow orchestrator with named fresh specialists.",
|
|
120
145
|
"plugins": tool_plugins(root_tools) + [
|
|
121
146
|
{"id": "devrites-role", "name": "devrites:role", "config": {
|
|
122
147
|
"role": "devrites-orchestrator", "permission": "workspace-write",
|
|
123
|
-
|
|
148
|
+
"allowedTools": root_tools, "allowedAgentPresets": roles,
|
|
149
|
+
"indexTool": MCP_INDEX_TOOL, "instructions": BRIDGE}},
|
|
124
150
|
{"id": "devrites-subagent", "name": "@deepseek-ai/dsh-tool-subagent", "config": {
|
|
125
151
|
"provider": "spawn", "toolName": "subagent", "allowedAgentPresets": roles}},
|
|
126
152
|
]})
|
|
127
153
|
patch = [{"insert": [{"id": "devrites-presets", "name": "./specialist.mjs", "config": {"presets": presets}}]}]
|
|
128
154
|
target.joinpath("runtime").mkdir()
|
|
129
155
|
target.joinpath("runtime/cordis.patch.yml").write_text(json.dumps(patch, indent=2, ensure_ascii=False) + "\n")
|
|
156
|
+
mcp_patch = [{"insert": [{"id": "devrites-codebase-memory", "name": "@deepseek-ai/dsh-mcp-client", "config": {
|
|
157
|
+
"serverName": "codebase-memory-mcp", "transport": "stdio", "command": "codebase-memory-mcp", "args": [],
|
|
158
|
+
}}]}]
|
|
159
|
+
target.joinpath("runtime/codebase-memory.patch.yml").write_text(json.dumps(mcp_patch, indent=2) + "\n")
|
|
130
160
|
shutil.copyfile(Path(__file__).with_name("dsh-specialist.mjs"), target / "runtime/specialist.mjs")
|
|
131
161
|
target.joinpath("AGENTS.md").write_text("<!-- BEGIN DEVRITES DSH -->\n" + BRIDGE + "<!-- END DEVRITES DSH -->\n")
|
|
132
162
|
|
|
@@ -47,11 +47,34 @@ export async function apply(ctx, config) {
|
|
|
47
47
|
// Preset-local tools are inherited by the Agent; restrict at that child scope.
|
|
48
48
|
ctx.on('agent/created', ({ agent }) => {
|
|
49
49
|
pinPermission(agent.session);
|
|
50
|
-
|
|
50
|
+
let current;
|
|
51
|
+
let release;
|
|
52
|
+
let refreshing = false;
|
|
53
|
+
let disposed = false;
|
|
54
|
+
const refresh = () => {
|
|
55
|
+
if (refreshing || disposed) return;
|
|
56
|
+
const names = allowedTools.filter(tool => ctx.tools.get(tool) !== undefined
|
|
57
|
+
|| agent.ctx.tools.get(tool, agent) !== undefined);
|
|
58
|
+
const key = JSON.stringify(names);
|
|
59
|
+
if (key === current) return;
|
|
60
|
+
refreshing = true;
|
|
61
|
+
try {
|
|
62
|
+
current = key;
|
|
63
|
+
release?.();
|
|
64
|
+
release = agent.ctx.tools.restrict({ allow: names });
|
|
65
|
+
} finally {
|
|
66
|
+
refreshing = false;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
agent.ctx.on('tools/change', refresh);
|
|
70
|
+
agent.ctx.effect(() => () => { disposed = true; release?.(); });
|
|
71
|
+
refresh();
|
|
51
72
|
});
|
|
52
73
|
ctx.tools.guard(exec => {
|
|
53
74
|
if (!exec.agent) return `${role}: agent identity required`;
|
|
54
75
|
if (!allowed.has(exec.name)) return `${role}: tool ${exec.name} is not allowed`;
|
|
76
|
+
if (exec.name === config.indexTool && exec.arguments?.persistence !== undefined
|
|
77
|
+
&& exec.arguments.persistence !== false) return `${role}: graph indexing must be cache-only (persistence: false)`;
|
|
55
78
|
if (exec.name === 'subagent' && !config.allowedAgentPresets?.includes(exec.arguments?.agent_preset)) {
|
|
56
79
|
return `${role}: an exact named specialist agent_preset is required`;
|
|
57
80
|
}
|