@swoop111/dsh-tool-fs 0.2.0-rc.2 → 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/lib/index.js +463 -463
- package/lib/types/completion.d.ts +41 -41
- package/lib/types/diff.d.ts +33 -33
- package/lib/types/edit.d.ts +44 -44
- package/lib/types/error.d.ts +18 -18
- package/lib/types/index.d.ts +18 -18
- package/lib/types/read-image.d.ts +56 -56
- package/lib/types/read-render.d.ts +89 -89
- package/lib/types/read-target.d.ts +24 -24
- package/lib/types/read.d.ts +89 -89
- package/lib/types/sandbox.d.ts +55 -55
- package/lib/types/session-cwd.d.ts +20 -20
- package/lib/types/structure.d.ts +46 -46
- package/lib/types/write.d.ts +37 -37
- package/package.json +1 -1
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
8
|
export declare const READ_MAX_LINE_LENGTH = 2000;
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
export declare const READ_MAX_BYTES: number;
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
export interface ReadWindow {
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
offset: number;
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
limit: number;
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
maxLineLength: number;
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
maxBytes: number;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
export interface FileTextLine {
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
number: number;
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
text: string;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
export interface WindowResult {
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
lines: FileTextLine[];
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
totalLines: number;
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
truncatedByBytes: boolean;
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
export interface FileReadOutcome {
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
offset: number;
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
lines: FileTextLine[];
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
totalLines: number;
|
|
46
|
-
|
|
46
|
+
|
|
47
47
|
truncatedByBytes?: true;
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
repairNote?: string;
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
export interface OffsetOutOfRange {
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
requestedOffset: number;
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
totalLines: number;
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
66
|
export declare function parseOffsetOutOfRange(error: unknown): OffsetOutOfRange | undefined;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
76
|
export declare function buildWindow(chunks: AsyncIterable<string> | Iterable<string>, request: ReadWindow, displayPath: string): Promise<WindowResult>;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
83
|
export declare function formatReadOutput(displayPath: string, outcome: FileReadOutcome): string;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
94
|
export { readLangHintForPath as langFromPath } from '@deepseek-ai/dsh-util-code-language';
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
103
|
export interface FsReadMeta {
|
|
104
|
-
|
|
104
|
+
|
|
105
105
|
path: string;
|
|
106
|
-
|
|
106
|
+
|
|
107
107
|
offset: number;
|
|
108
|
-
|
|
108
|
+
|
|
109
109
|
lines: FileTextLine[];
|
|
110
|
-
|
|
110
|
+
|
|
111
111
|
totalLines: number;
|
|
112
|
-
|
|
112
|
+
|
|
113
113
|
lang?: string;
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
128
|
export declare function readMetaFromMeta(meta: unknown): FsReadMeta | undefined;
|
|
129
|
-
|
|
129
|
+
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
5
|
import type { Context } from '@deepseek-ai/cordis';
|
|
6
6
|
import type { FsInfo, FsTarget } from '@deepseek-ai/dsh-fs';
|
|
7
7
|
import type { ToolExecution } from '@deepseek-ai/dsh-tools';
|
|
8
8
|
import type { MissingPathRepair } from '@deepseek-ai/dsh-fs-edit-repair';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
16
|
export declare function resolveRegularReadTarget(ctx: Context, exec: ToolExecution, requestedPath: string): Promise<{
|
|
17
17
|
target: FsTarget;
|
|
18
18
|
info: FsInfo;
|
|
19
19
|
}>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
32
|
export declare function repairTargetPath(ctx: Context, exec: ToolExecution, requestedPath: string, knownPaths: readonly string[]): Promise<MissingPathRepair | undefined>;
|
|
33
|
-
|
|
33
|
+
|
package/lib/types/read.d.ts
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
6
|
import type { Context } from '@deepseek-ai/cordis';
|
|
7
7
|
import type { ReadArgRepair } from '@deepseek-ai/dsh-arg-repair';
|
|
8
8
|
import type { Session } from '@deepseek-ai/dsh-session';
|
|
9
9
|
import type { ReadDuplicateVerdict } from '@deepseek-ai/dsh-fs-edit-repair';
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
export declare const READ_LIMIT = 2000;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
16
|
export declare const STREAM_MIN_SIZE: number;
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
export interface ReadToolCaps {
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
limit: number;
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
maxLineLength: number;
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
maxBytes: number;
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
streamMinSize: number;
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
32
|
export interface ReadRepairConfig {
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
enabled?: boolean;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
40
|
duplicate?: {
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
enabled?: boolean;
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
maxSteps?: number;
|
|
45
45
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
52
|
completion?: {
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
enabled?: boolean;
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
maxLines?: number;
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
64
|
export interface ReadRepairTuning {
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
enabled: boolean;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
71
|
priorPaths(session: Session | undefined, limit?: number): string[];
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
77
|
duplicate: {
|
|
78
78
|
enabled: boolean;
|
|
79
|
-
|
|
79
|
+
|
|
80
80
|
maxSteps: number;
|
|
81
81
|
judge(session: Session | undefined, path: string, version: string, window: {
|
|
82
82
|
offset: number;
|
|
@@ -89,62 +89,62 @@ export interface ReadRepairTuning {
|
|
|
89
89
|
version: string;
|
|
90
90
|
}): void;
|
|
91
91
|
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
100
|
completion: {
|
|
101
101
|
enabled: boolean;
|
|
102
102
|
maxLines: number;
|
|
103
103
|
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
113
|
claimDisclosure(session: Session | undefined, key: string): boolean;
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
|
|
116
116
|
interface ReadInput {
|
|
117
117
|
filePath: string;
|
|
118
118
|
offset: number;
|
|
119
119
|
limit: number;
|
|
120
|
-
|
|
120
|
+
|
|
121
121
|
force: boolean;
|
|
122
|
-
|
|
122
|
+
|
|
123
123
|
repairs?: readonly ReadArgRepair[];
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
136
|
export declare function parseReadArgs(args: {
|
|
137
137
|
file_path: string;
|
|
138
138
|
force?: boolean;
|
|
139
139
|
offset?: number;
|
|
140
140
|
limit?: number;
|
|
141
141
|
}, maxLimit: number, repairEnabled?: boolean): ReadInput;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
148
|
export declare function applyReadTool(ctx: Context, caps: ReadToolCaps, repair: ReadRepairTuning): void;
|
|
149
149
|
export {};
|
|
150
|
-
|
|
150
|
+
|
package/lib/types/sandbox.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
12
|
import type { Context } from '@deepseek-ai/cordis';
|
|
13
13
|
import type { ToolExecution } from '@deepseek-ai/dsh-tools';
|
|
14
14
|
import type { SandboxExecutionPolicy, SandboxMode } from '@deepseek-ai/dsh-sandbox';
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
export interface FsEscalationArgs {
|
|
17
17
|
sandbox_permissions?: string;
|
|
18
18
|
justification?: string;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
export interface EscalationSchemaFields {
|
|
22
22
|
sandbox_permissions: {
|
|
23
23
|
type: 'string';
|
|
@@ -29,54 +29,54 @@ export interface EscalationSchemaFields {
|
|
|
29
29
|
description: string;
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
37
|
export declare class FsSandboxController {
|
|
38
38
|
private readonly ctx;
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
readonly escalationModes: readonly SandboxMode[];
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
private readonly policy;
|
|
43
43
|
constructor(ctx: Context);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
51
|
schemaFields(): EscalationSchemaFields;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
65
|
resolvePolicy(toolName: string, args: FsEscalationArgs, exec: ToolExecution): Promise<SandboxExecutionPolicy | undefined>;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
80
|
mapError(error: unknown, policy: SandboxExecutionPolicy | undefined): unknown;
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
|