@swoop111/dsh-tool-fs 0.0.0-stage → 0.2.0-rc.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/LICENSE +21 -0
- package/README.i18n.yaml +142 -0
- package/README.md +277 -2
- package/README.zh.md +278 -0
- package/lib/index.js +1838 -0
- package/lib/types/completion.d.ts +58 -0
- package/lib/types/diff.d.ts +41 -0
- package/lib/types/edit.d.ts +73 -0
- package/lib/types/error.d.ts +19 -0
- package/lib/types/index.d.ts +36 -0
- package/lib/types/read-image.d.ts +80 -0
- package/lib/types/read-render.d.ts +129 -0
- package/lib/types/read-target.d.ts +33 -0
- package/lib/types/read.d.ts +150 -0
- package/lib/types/sandbox.d.ts +82 -0
- package/lib/types/session-cwd.d.ts +26 -0
- package/lib/types/structure.d.ts +67 -0
- package/lib/types/write.d.ts +57 -0
- package/package.json +70 -4
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export type CompletionRule = 'fence' | 'brace' | 'indent';
|
|
17
|
+
|
|
18
|
+
export type OpenConstruct = {
|
|
19
|
+
kind: 'fence';
|
|
20
|
+
|
|
21
|
+
marker: string;
|
|
22
|
+
|
|
23
|
+
lineIndex: number;
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'brace';
|
|
26
|
+
|
|
27
|
+
depth: number;
|
|
28
|
+
|
|
29
|
+
lineIndex: number;
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'indent';
|
|
32
|
+
|
|
33
|
+
width: number;
|
|
34
|
+
|
|
35
|
+
lineIndex: number;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export interface HeadContext {
|
|
39
|
+
|
|
40
|
+
kind: CompletionRule;
|
|
41
|
+
|
|
42
|
+
startIndex: number;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
export declare function detectOpenTail(lines: readonly string[]): OpenConstruct | undefined;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
export declare function detectOpenHead(window: readonly string[], preceding: readonly string[]): HeadContext | undefined;
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
export declare function closureLength(construct: OpenConstruct, appended: readonly string[]): number;
|
|
67
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
8
|
+
import type { FsWriteOutcome } from '@deepseek-ai/dsh-fs';
|
|
9
|
+
import type { Session } from '@deepseek-ai/dsh-session';
|
|
10
|
+
import type { FsSandboxController } from './sandbox.ts';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export interface WriteHintTuning {
|
|
16
|
+
|
|
17
|
+
pathHint: boolean;
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
priorPaths(session: Session | undefined, limit?: number): string[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface WriteRepairConfig {
|
|
26
|
+
|
|
27
|
+
pathHint?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
export declare function parseWriteArgs(args: {
|
|
36
|
+
file_path: string;
|
|
37
|
+
content: string;
|
|
38
|
+
}): {
|
|
39
|
+
filePath: string;
|
|
40
|
+
content: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
export declare function formatWriteOutput(displayPath: string, outcome: Pick<FsWriteOutcome, 'operation'>, hint?: string): string;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
export declare function applyWriteTool(ctx: Context, sandbox: FsSandboxController, hints: WriteHintTuning): void;
|
|
57
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,72 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swoop111/dsh-tool-fs",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"description": "Model-facing filesystem tools (read, write, edit) over the DeepSeek Harness filesystem seam (ctx.fs)",
|
|
4
|
+
"version": "0.2.0-rc.2.1",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
|
|
11
|
+
"directory": "packages/fs/tool-fs"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"types": "lib/types/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/types/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./src/*": "./src/*",
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"lib/index.js",
|
|
26
|
+
"lib/types/**/*.d.ts"
|
|
27
|
+
],
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"diff": "^9.0.0",
|
|
31
|
+
"@deepseek-ai/schemastery": "~3.18.4",
|
|
32
|
+
"@deepseek-ai/dsh-util-code-language": "0.2.0-rc.2"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@deepseek-ai/dsh-arg-repair": "0.2.0-rc.2",
|
|
36
|
+
"@deepseek-ai/dsh-sandbox": "0.2.0-rc.2",
|
|
37
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
38
|
+
"@deepseek-ai/dsh-session": "0.2.0-rc.2",
|
|
39
|
+
"@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
|
|
40
|
+
"@deepseek-ai/dsh-fs": "0.2.0-rc.2",
|
|
41
|
+
"@deepseek-ai/dsh-fs-edit-repair": "0.2.0-rc.2",
|
|
42
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.2",
|
|
43
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
|
|
44
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.2",
|
|
45
|
+
"@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",
|
|
46
|
+
"@deepseek-ai/cordis": "~4.0.4"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.0-rc.2",
|
|
50
|
+
"@deepseek-ai/dsh-agent": "0.2.0-rc.2",
|
|
51
|
+
"@deepseek-ai/dsh-arg-repair": "0.2.0-rc.2",
|
|
52
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.0-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
|
|
54
|
+
"@deepseek-ai/dsh-fs": "0.2.0-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-fs-local": "0.2.0-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-fs-edit-repair": "0.2.0-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.2.0-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-fs-observation-policy": "0.2.0-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.0-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",
|
|
62
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
|
|
63
|
+
"@deepseek-ai/dsh-sandbox": "0.2.0-rc.2",
|
|
64
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.2",
|
|
65
|
+
"@deepseek-ai/dsh-session": "0.2.0-rc.2",
|
|
66
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
67
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.2",
|
|
68
|
+
"@deepseek-ai/dsh-scope": "0.2.0-rc.2",
|
|
69
|
+
"@deepseek-ai/dsh-ptc-runtime": "0.2.0-rc.2",
|
|
70
|
+
"@deepseek-ai/dsh-session-projection": "0.2.0-rc.2"
|
|
71
|
+
}
|
|
72
|
+
}
|