@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,58 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import type { FileTextLine } from './read-render.ts';
|
|
15
|
+
import type { CompletionRule } from './structure.ts';
|
|
16
|
+
|
|
17
|
+
export type LineSupplier = (count: number) => Promise<FileTextLine[] | undefined>;
|
|
18
|
+
|
|
19
|
+
export interface CompletionLineSuppliers {
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
preceding: LineSupplier;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
following: LineSupplier;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface CompletionTuning {
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
maxLines: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface CompletionResult {
|
|
41
|
+
|
|
42
|
+
head: FileTextLine[];
|
|
43
|
+
|
|
44
|
+
tail: FileTextLine[];
|
|
45
|
+
|
|
46
|
+
headRule?: CompletionRule;
|
|
47
|
+
|
|
48
|
+
tailRule?: CompletionRule;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
export declare function completeWindow(lines: readonly FileTextLine[], supply: CompletionLineSuppliers, tuning: CompletionTuning): Promise<CompletionResult | undefined>;
|
|
58
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
import type { FileDiff } from '@deepseek-ai/dsh-tools';
|
|
7
|
+
|
|
8
|
+
export declare const DIFF_CONTEXT = 3;
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export type FsDiffMeta = {
|
|
19
|
+
diffs: FileDiff[];
|
|
20
|
+
operation?: 'create' | 'update';
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
export declare function computeHunkDiffs(path: string, before: string, after: string): FileDiff[];
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
export declare function diffsFromMeta(meta: unknown): FileDiff[] | undefined;
|
|
41
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
10
|
+
import type { Session } from '@deepseek-ai/dsh-session';
|
|
11
|
+
import type { FsSandboxController } from './sandbox.ts';
|
|
12
|
+
|
|
13
|
+
export interface EditRepairConfig {
|
|
14
|
+
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
|
|
17
|
+
maxFileChars?: number;
|
|
18
|
+
|
|
19
|
+
maxWindowLines?: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export interface EditRepairTuning {
|
|
26
|
+
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
|
|
29
|
+
maxFileChars: number;
|
|
30
|
+
|
|
31
|
+
maxWindowLines: number;
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
priorPaths(session: Session | undefined, limit?: number): string[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
interface EditInput {
|
|
40
|
+
filePath: string;
|
|
41
|
+
oldString: string;
|
|
42
|
+
newString: string;
|
|
43
|
+
replaceAll: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
export declare function parseEditArgs(args: {
|
|
53
|
+
file_path: string;
|
|
54
|
+
old_string: string;
|
|
55
|
+
new_string: string;
|
|
56
|
+
replace_all?: boolean;
|
|
57
|
+
}): EditInput;
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
export declare function formatEditOutput(displayPath: string, replaceAll: boolean): string;
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
export declare function applyEditTool(ctx: Context, sandbox: FsSandboxController, repair: EditRepairTuning): void;
|
|
72
|
+
export {};
|
|
73
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
8
|
+
import z from '@deepseek-ai/schemastery';
|
|
9
|
+
import type { ReadRepairConfig } from './read.ts';
|
|
10
|
+
import type { WriteRepairConfig } from './write.ts';
|
|
11
|
+
import type { EditRepairConfig } from './edit.ts';
|
|
12
|
+
|
|
13
|
+
export declare const name = "tool-fs";
|
|
14
|
+
|
|
15
|
+
export declare const inject: string[];
|
|
16
|
+
|
|
17
|
+
export interface Config {
|
|
18
|
+
|
|
19
|
+
readLimit?: number;
|
|
20
|
+
|
|
21
|
+
readMaxLineLength?: number;
|
|
22
|
+
|
|
23
|
+
readMaxBytes?: number;
|
|
24
|
+
|
|
25
|
+
readStreamMinSize?: number;
|
|
26
|
+
|
|
27
|
+
editRepair?: EditRepairConfig;
|
|
28
|
+
|
|
29
|
+
readRepair?: ReadRepairConfig;
|
|
30
|
+
|
|
31
|
+
writeRepair?: WriteRepairConfig;
|
|
32
|
+
}
|
|
33
|
+
export declare const Config: z<Config>;
|
|
34
|
+
|
|
35
|
+
export declare function apply(ctx: Context, config: Config): void;
|
|
36
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
14
|
+
import type { ImageAttachmentRef, ImageMediaType } from '@deepseek-ai/dsh-attachment';
|
|
15
|
+
import type { ToolExecution } from '@deepseek-ai/dsh-tools';
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export declare function sniffImageMediaType(data: Uint8Array): ImageMediaType | undefined;
|
|
22
|
+
|
|
23
|
+
export interface ImageReadValue {
|
|
24
|
+
path: string;
|
|
25
|
+
image: {
|
|
26
|
+
attachmentId: string;
|
|
27
|
+
mediaType: ImageMediaType;
|
|
28
|
+
bytes: number;
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
name?: string;
|
|
32
|
+
|
|
33
|
+
originalDimensions?: {
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
export declare function imageMediaTypeForPath(filePath: string): ImageMediaType | undefined;
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
export declare function assertImageCapableRoute(ctx: Context, exec: ToolExecution, requestedPath: string): Promise<void>;
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
export declare function imageRefFromValue(image: ImageReadValue['image']): ImageAttachmentRef;
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
export declare function formatImageReadOutput(displayPath: string, image: ImageReadValue['image']): string;
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
export declare function applyReadImageTool(ctx: Context): void;
|
|
80
|
+
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export declare const READ_MAX_LINE_LENGTH = 2000;
|
|
9
|
+
|
|
10
|
+
export declare const READ_MAX_BYTES: number;
|
|
11
|
+
|
|
12
|
+
export interface ReadWindow {
|
|
13
|
+
|
|
14
|
+
offset: number;
|
|
15
|
+
|
|
16
|
+
limit: number;
|
|
17
|
+
|
|
18
|
+
maxLineLength: number;
|
|
19
|
+
|
|
20
|
+
maxBytes: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface FileTextLine {
|
|
24
|
+
|
|
25
|
+
number: number;
|
|
26
|
+
|
|
27
|
+
text: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface WindowResult {
|
|
31
|
+
|
|
32
|
+
lines: FileTextLine[];
|
|
33
|
+
|
|
34
|
+
totalLines: number;
|
|
35
|
+
|
|
36
|
+
truncatedByBytes: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface FileReadOutcome {
|
|
40
|
+
|
|
41
|
+
offset: number;
|
|
42
|
+
|
|
43
|
+
lines: FileTextLine[];
|
|
44
|
+
|
|
45
|
+
totalLines: number;
|
|
46
|
+
|
|
47
|
+
truncatedByBytes?: true;
|
|
48
|
+
|
|
49
|
+
repairNote?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface OffsetOutOfRange {
|
|
53
|
+
|
|
54
|
+
requestedOffset: number;
|
|
55
|
+
|
|
56
|
+
totalLines: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
export declare function parseOffsetOutOfRange(error: unknown): OffsetOutOfRange | undefined;
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
export declare function buildWindow(chunks: AsyncIterable<string> | Iterable<string>, request: ReadWindow, displayPath: string): Promise<WindowResult>;
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
export declare function formatReadOutput(displayPath: string, outcome: FileReadOutcome): string;
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
export { readLangHintForPath as langFromPath } from '@deepseek-ai/dsh-util-code-language';
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
export interface FsReadMeta {
|
|
104
|
+
|
|
105
|
+
path: string;
|
|
106
|
+
|
|
107
|
+
offset: number;
|
|
108
|
+
|
|
109
|
+
lines: FileTextLine[];
|
|
110
|
+
|
|
111
|
+
totalLines: number;
|
|
112
|
+
|
|
113
|
+
lang?: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
export declare function readMetaFromMeta(meta: unknown): FsReadMeta | undefined;
|
|
129
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
6
|
+
import type { FsInfo, FsTarget } from '@deepseek-ai/dsh-fs';
|
|
7
|
+
import type { ToolExecution } from '@deepseek-ai/dsh-tools';
|
|
8
|
+
import type { MissingPathRepair } from '@deepseek-ai/dsh-fs-edit-repair';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export declare function resolveRegularReadTarget(ctx: Context, exec: ToolExecution, requestedPath: string): Promise<{
|
|
17
|
+
target: FsTarget;
|
|
18
|
+
info: FsInfo;
|
|
19
|
+
}>;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export declare function repairTargetPath(ctx: Context, exec: ToolExecution, requestedPath: string, knownPaths: readonly string[]): Promise<MissingPathRepair | undefined>;
|
|
33
|
+
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
7
|
+
import type { ReadArgRepair } from '@deepseek-ai/dsh-arg-repair';
|
|
8
|
+
import type { Session } from '@deepseek-ai/dsh-session';
|
|
9
|
+
import type { ReadDuplicateVerdict } from '@deepseek-ai/dsh-fs-edit-repair';
|
|
10
|
+
|
|
11
|
+
export declare const READ_LIMIT = 2000;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export declare const STREAM_MIN_SIZE: number;
|
|
17
|
+
|
|
18
|
+
export interface ReadToolCaps {
|
|
19
|
+
|
|
20
|
+
limit: number;
|
|
21
|
+
|
|
22
|
+
maxLineLength: number;
|
|
23
|
+
|
|
24
|
+
maxBytes: number;
|
|
25
|
+
|
|
26
|
+
streamMinSize: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export interface ReadRepairConfig {
|
|
33
|
+
|
|
34
|
+
enabled?: boolean;
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
duplicate?: {
|
|
41
|
+
|
|
42
|
+
enabled?: boolean;
|
|
43
|
+
|
|
44
|
+
maxSteps?: number;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
completion?: {
|
|
53
|
+
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
|
|
56
|
+
maxLines?: number;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
export interface ReadRepairTuning {
|
|
65
|
+
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
priorPaths(session: Session | undefined, limit?: number): string[];
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
duplicate: {
|
|
78
|
+
enabled: boolean;
|
|
79
|
+
|
|
80
|
+
maxSteps: number;
|
|
81
|
+
judge(session: Session | undefined, path: string, version: string, window: {
|
|
82
|
+
offset: number;
|
|
83
|
+
endLine: number;
|
|
84
|
+
}): ReadDuplicateVerdict | undefined;
|
|
85
|
+
record(session: Session | undefined, path: string, observation: {
|
|
86
|
+
offset: number;
|
|
87
|
+
endLine: number;
|
|
88
|
+
totalLines: number;
|
|
89
|
+
version: string;
|
|
90
|
+
}): void;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
completion: {
|
|
101
|
+
enabled: boolean;
|
|
102
|
+
maxLines: number;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
claimDisclosure(session: Session | undefined, key: string): boolean;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
interface ReadInput {
|
|
117
|
+
filePath: string;
|
|
118
|
+
offset: number;
|
|
119
|
+
limit: number;
|
|
120
|
+
|
|
121
|
+
force: boolean;
|
|
122
|
+
|
|
123
|
+
repairs?: readonly ReadArgRepair[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
export declare function parseReadArgs(args: {
|
|
137
|
+
file_path: string;
|
|
138
|
+
force?: boolean;
|
|
139
|
+
offset?: number;
|
|
140
|
+
limit?: number;
|
|
141
|
+
}, maxLimit: number, repairEnabled?: boolean): ReadInput;
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
export declare function applyReadTool(ctx: Context, caps: ReadToolCaps, repair: ReadRepairTuning): void;
|
|
149
|
+
export {};
|
|
150
|
+
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
13
|
+
import type { ToolExecution } from '@deepseek-ai/dsh-tools';
|
|
14
|
+
import type { SandboxExecutionPolicy, SandboxMode } from '@deepseek-ai/dsh-sandbox';
|
|
15
|
+
|
|
16
|
+
export interface FsEscalationArgs {
|
|
17
|
+
sandbox_permissions?: string;
|
|
18
|
+
justification?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface EscalationSchemaFields {
|
|
22
|
+
sandbox_permissions: {
|
|
23
|
+
type: 'string';
|
|
24
|
+
enum: string[];
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
justification: {
|
|
28
|
+
type: 'string';
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
export declare class FsSandboxController {
|
|
38
|
+
private readonly ctx;
|
|
39
|
+
|
|
40
|
+
readonly escalationModes: readonly SandboxMode[];
|
|
41
|
+
|
|
42
|
+
private readonly policy;
|
|
43
|
+
constructor(ctx: Context);
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
schemaFields(): EscalationSchemaFields;
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
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
|
+
|
|
80
|
+
mapError(error: unknown, policy: SandboxExecutionPolicy | undefined): unknown;
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import type { ToolExecution } from '@deepseek-ai/dsh-tools';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export declare function sessionCwd(exec: ToolExecution): string | undefined;
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export declare function sessionResolveOptions(exec: ToolExecution, policyWorkspaceRoot?: string): {
|
|
23
|
+
cwd?: string;
|
|
24
|
+
signal?: AbortSignal;
|
|
25
|
+
};
|
|
26
|
+
|