dsh-root-planner-preset 1.4.2 → 1.4.3

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/build-patch.mjs CHANGED
@@ -71,7 +71,7 @@ const patch = `# Generated by build-patch.mjs from persona.txt. Do not hand-edit
71
71
  - id: persona
72
72
  name: '@deepseek-ai/dsh-persona'
73
73
  config:
74
- suffix: Your working directory is {{cwd}}.
74
+ suffix: Your working directory is the session workspace; call the working_directory tool to read its absolute path when you need it.
75
75
  prefix: |-
76
76
  <PERSONA>
77
77
  - id: agent-instructions
@@ -259,7 +259,7 @@ const patch = `# Generated by build-patch.mjs from persona.txt. Do not hand-edit
259
259
  - id: persona
260
260
  name: '@deepseek-ai/dsh-persona'
261
261
  config:
262
- suffix: Your working directory is {{cwd}}.
262
+ suffix: Your working directory is the session workspace; call the working_directory tool to read its absolute path when you need it.
263
263
  prefix: |-
264
264
  <PERSONA>
265
265
  - id: agent-instructions
package/cordis.patch.yml CHANGED
@@ -17,7 +17,7 @@
17
17
  - id: persona
18
18
  name: '@deepseek-ai/dsh-persona'
19
19
  config:
20
- suffix: Your working directory is {{cwd}}.
20
+ suffix: Your working directory is the session workspace; call the working_directory tool to read its absolute path when you need it.
21
21
  prefix: |-
22
22
  A task may be handled by a single agent or by a tree of agents. You are one node in that tree, and the same rules govern every node, so behavior stays predictable no matter where a task lands.
23
23
 
@@ -276,7 +276,7 @@
276
276
  - id: persona
277
277
  name: '@deepseek-ai/dsh-persona'
278
278
  config:
279
- suffix: Your working directory is {{cwd}}.
279
+ suffix: Your working directory is the session workspace; call the working_directory tool to read its absolute path when you need it.
280
280
  prefix: |-
281
281
  A task may be handled by a single agent or by a tree of agents. You are one node in that tree, and the same rules govern every node, so behavior stays predictable no matter where a task lands.
282
282
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-root-planner-preset",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "type": "module",
5
5
  "description": "DSH agent preset: the root agent plans and decides, subagent workers read, write and run commands inside their own _agents/ workspace, and nothing outlives its task.",
6
6
  "license": "MIT",
package/verify-patch.mjs CHANGED
@@ -51,7 +51,13 @@ check(presetRow?.config?.order === 5, 'preset order is 5 (after the shipped pres
51
51
 
52
52
  const plugins = presetRow?.config?.plugins ?? [];
53
53
  const personaRow = plugins.find((row) => row.id === 'persona');
54
- check(personaRow?.config?.suffix === 'Your working directory is {{cwd}}.', 'persona suffix matches the deployment text');
54
+ // The suffix is intentionally not the deployment's text any more: that one interpolates
55
+ // {{cwd}}, which DSH 0.2.1 rejects (only provider and model are registered variables). The
56
+ // variable-free replacement is asserted below for both presets.
57
+ check(
58
+ typeof personaRow?.config?.suffix === 'string' && personaRow.config.suffix.length > 0,
59
+ 'persona suffix is set',
60
+ );
55
61
 
56
62
  const expected = readFileSync(join(here, 'persona.txt'), 'utf8').replace(/\r\n/g, '\n').trimEnd();
57
63
  check(personaRow?.config?.prefix === expected, 'parsed persona is byte-identical to persona.txt');
@@ -248,6 +254,23 @@ for (const scoped of SCOPE_LOCAL_TOOLS) {
248
254
  );
249
255
  }
250
256
 
257
+ // DSH 0.2.1 validates every `{{name}}` in a prompt section against the registered prompt
258
+ // variables, which on this machine are `provider` and `model` only. The persona suffix used
259
+ // to say "Your working directory is {{cwd}}." and that now fails the whole run with
260
+ // unknown prompt variable "{{cwd}}" in section "deployment:persona-suffix"
261
+ // so the suffix is variable-free and points at the tool that reports the path.
262
+ for (const [label, rows] of [
263
+ ['the root preset', plugins],
264
+ ['the worker preset', workerPlugins],
265
+ ]) {
266
+ const suffix = rows.find((entry) => entry.id === 'persona')?.config?.suffix ?? '';
267
+ check(typeof suffix === 'string' && suffix.length > 0, `${label} declares a persona suffix`);
268
+ check(
269
+ !/\{\{/.test(suffix),
270
+ `${label} persona suffix declares no prompt variables (only provider and model are registered)`,
271
+ );
272
+ }
273
+
251
274
  // "No unbounded process": with the shell tools present, the property lives in each
252
275
  // preset's own rows rather than in a mask — the worker needs it as much as the root.
253
276
  for (const [label, rows] of [