@deepseek-ai/dsh-tool-fs 0.1.6-alpha.1 → 0.1.6-alpha.2

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 CHANGED
@@ -631,11 +631,14 @@ function applyWriteTool(ctx, sandbox) {
631
631
  type: "text",
632
632
  text: formatWriteOutput(value.path, value)
633
633
  }],
634
- presentationMeta: (args, value) => ({ diffs: value.before === null ? [] : computeHunkDiffs(args.file_path, value.before, value.after).map(({ path, oldText, newText }) => ({
635
- path,
636
- oldText,
637
- newText
638
- })) })
634
+ presentationMeta: (args, value) => ({
635
+ operation: value.operation,
636
+ diffs: value.before === null ? [] : computeHunkDiffs(args.file_path, value.before, value.after).map(({ path, oldText, newText }) => ({
637
+ path,
638
+ oldText,
639
+ newText
640
+ }))
641
+ })
639
642
  },
640
643
  async execute(args, exec) {
641
644
  const input = parseWriteArgs(args);
@@ -1170,7 +1173,8 @@ var FsSandboxController = class {
1170
1173
  /**
1171
1174
  * The policy to stamp onto this mutation: an approved escalation grant (a
1172
1175
  * strictly wider retry resolved through `ctx.approval` before anything
1173
- * executes), else the session's standing mode. The calling session's cwd is
1176
+ * executes), else the session's standing mode. Repeating the standing mode
1177
+ * requires no approval. The calling session's cwd is
1174
1178
  * always carried as the workspace root. Validates the escalation argument
1175
1179
  * pairing first.
1176
1180
  * @param toolName - the mutating tool's name, for the approval audit trail.
@@ -8,13 +8,16 @@ import type { FileDiff } from '@deepseek-ai/dsh-tools';
8
8
  export declare const DIFF_CONTEXT = 3;
9
9
  /**
10
10
  * The `write`/`edit` tools' private `tool/result` `meta` payload: the applied
11
- * contextual-diff hunks. Attached opaquely (as `unknown`) on the tool result and
11
+ * contextual-diff hunks, and for `write` whether the call created or updated
12
+ * the file, which tells an empty hunk list of a create from one of an
13
+ * unchanged overwrite. Attached opaquely (as `unknown`) on the tool result and
12
14
  * persisted with the session log — it must be JSON-serializable (the session
13
15
  * validates this at `append`), so `presentResult` reproduces the diff card on
14
16
  * replay. The producing tool owns and narrows this opaque shape.
15
17
  */
16
18
  export type FsDiffMeta = {
17
19
  diffs: FileDiff[];
20
+ operation?: 'create' | 'update';
18
21
  };
19
22
  /**
20
23
  * Compute one {@link FileDiff} per hunk between `before` and `after`, each carrying the
@@ -52,7 +52,8 @@ export declare class FsSandboxController {
52
52
  /**
53
53
  * The policy to stamp onto this mutation: an approved escalation grant (a
54
54
  * strictly wider retry resolved through `ctx.approval` before anything
55
- * executes), else the session's standing mode. The calling session's cwd is
55
+ * executes), else the session's standing mode. Repeating the standing mode
56
+ * requires no approval. The calling session's cwd is
56
57
  * always carried as the workspace root. Validates the escalation argument
57
58
  * pairing first.
58
59
  * @param toolName - the mutating tool's name, for the approval audit trail.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-fs",
3
3
  "description": "Model-facing filesystem tools (read, write, edit) over the DeepSeek Harness filesystem seam (ctx.fs)",
4
- "version": "0.1.6-alpha.1",
4
+ "version": "0.1.6-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -31,36 +31,36 @@
31
31
  "@deepseek-ai/schemastery": "^3.18.2"
32
32
  },
33
33
  "peerDependencies": {
34
- "@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
35
- "@deepseek-ai/dsh-sandbox": "^0.1.6-alpha.1",
36
- "@deepseek-ai/dsh-fs": "^0.1.6-alpha.1",
37
- "@deepseek-ai/dsh-attachment": "^0.1.6-alpha.1",
38
- "@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
39
- "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.1",
40
- "@deepseek-ai/dsh-tools": "^0.1.6-alpha.1",
41
- "@deepseek-ai/dsh-sandbox-policy": "^0.1.6-alpha.1",
42
- "@deepseek-ai/dsh-user-approval": "^0.1.6-alpha.1",
34
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
35
+ "@deepseek-ai/dsh-fs": "^0.1.6-alpha.2",
36
+ "@deepseek-ai/dsh-sandbox": "^0.1.6-alpha.2",
37
+ "@deepseek-ai/dsh-sandbox-policy": "^0.1.6-alpha.2",
38
+ "@deepseek-ai/dsh-attachment": "^0.1.6-alpha.2",
39
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
40
+ "@deepseek-ai/dsh-tools": "^0.1.6-alpha.2",
41
+ "@deepseek-ai/dsh-user-approval": "^0.1.6-alpha.2",
42
+ "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.2",
43
43
  "@deepseek-ai/cordis": "^4.0.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
47
- "@deepseek-ai/dsh-agent-loop": "^0.1.6-alpha.1",
48
- "@deepseek-ai/dsh-agent-loop-testkit": "^0.1.6-alpha.1",
49
- "@deepseek-ai/dsh-attachment": "^0.1.6-alpha.1",
50
- "@deepseek-ai/dsh-fs": "^0.1.6-alpha.1",
51
- "@deepseek-ai/dsh-fs-local": "^0.1.6-alpha.1",
52
- "@deepseek-ai/dsh-fs-observation-policy": "^0.1.6-alpha.1",
53
- "@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
54
- "@deepseek-ai/dsh-llm-deepseek": "^0.1.6-alpha.1",
55
- "@deepseek-ai/dsh-sandbox": "^0.1.6-alpha.1",
56
- "@deepseek-ai/dsh-sandbox-policy": "^0.1.6-alpha.1",
57
- "@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
58
- "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.1",
59
- "@deepseek-ai/dsh-tools": "^0.1.6-alpha.1",
46
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2",
47
+ "@deepseek-ai/dsh-agent-loop": "^0.1.6-alpha.2",
48
+ "@deepseek-ai/dsh-agent-loop-testkit": "^0.1.6-alpha.2",
49
+ "@deepseek-ai/dsh-attachment": "^0.1.6-alpha.2",
50
+ "@deepseek-ai/dsh-fs": "^0.1.6-alpha.2",
51
+ "@deepseek-ai/dsh-fs-observation-policy": "^0.1.6-alpha.2",
52
+ "@deepseek-ai/dsh-fs-local": "^0.1.6-alpha.2",
53
+ "@deepseek-ai/dsh-llm-deepseek": "^0.1.6-alpha.2",
54
+ "@deepseek-ai/dsh-sandbox": "^0.1.6-alpha.2",
55
+ "@deepseek-ai/dsh-sandbox-policy": "^0.1.6-alpha.2",
56
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
57
+ "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.2",
58
+ "@deepseek-ai/dsh-tools": "^0.1.6-alpha.2",
59
+ "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.2",
60
+ "@deepseek-ai/dsh-scope": "^0.1.6-alpha.2",
61
+ "@deepseek-ai/dsh-ptc-runtime": "^0.1.6-alpha.2",
60
62
  "@deepseek-ai/cordis": "^4.0.2",
61
- "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
62
- "@deepseek-ai/dsh-scope": "^0.1.6-alpha.1",
63
- "@deepseek-ai/dsh-user-approval": "^0.1.6-alpha.1",
64
- "@deepseek-ai/dsh-ptc-runtime": "^0.1.6-alpha.1"
63
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
64
+ "@deepseek-ai/dsh-user-approval": "^0.1.6-alpha.2"
65
65
  }
66
66
  }