refactor(tool-fs): drop per-tool subpath plugins; adopt single-tsconfig build

Adapt the four fs packages to master's single-tsconfig build convention
(lib/types outDir + types path + files allowlist), brought in by the merge.

While doing so, drop dsh-tool-fs's /read//write//edit subpath plugins. They
were the only subpath-export package in the tree and forced bespoke tsdown,
tsconfig path, package.json files, and workspace-constraint handling that no
sibling tool package (e.g. dsh-tool-bash) carries, for a focused-deployment
use case no consumer needed. dsh-tool-fs is now a single root plugin that
registers read/write/edit, mirroring dsh-tool-bash; the per-tool registration
helpers stay internal modules the root composes. The file-context event-gate
RFC is amended to record the narrowed scope.
This commit is contained in:
Dudu-0223
2026-06-28 17:43:29 +08:00
parent 89b27ad442
commit 4a1177093a
16 changed files with 34 additions and 189 deletions

View File

@@ -8,7 +8,7 @@
* returns `createIfAbsent`/`replaceIfVersion` instead. The tool stats ZERO
* times either way.
*
* @module @deepseek-ai/dsh-tool-fs/write
* @module @deepseek-ai/dsh-tool-fs/src/write
*/
import type { Context } from 'cordis'
@@ -36,7 +36,7 @@ ${verb} file
}
/** Register the `write` tool and its system-prompt guidance. */
export function apply(ctx: Context): void {
export function applyWriteTool(ctx: Context): void {
ctx.systemPrompt.section({
name: 'tool:write',
order: 101,
@@ -62,12 +62,3 @@ export function apply(ctx: Context): void {
},
}))
}
/** Cordis plugin name used by loader diagnostics. */
export const name = 'fs-write'
/** Services required by the `write` tool plugin. */
export const inject = ['tools', 'fs', 'systemPrompt']
/** Named helper for direct registration in the root plugin and tests. */
export const applyWriteTool = apply