mancode 0.5.5 → 0.6.0

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.
@@ -143,6 +143,7 @@ var LEGACY_MODE_ENTRY_MANAGED_MARKERS = [
143
143
  "<!-- Managed by mancode:claude-skill. Do not edit this marker. -->",
144
144
  "<!-- Managed by mancode:codex-skill. Do not edit this file manually. -->",
145
145
  "<!-- Managed by mancode:zcode-skill. Do not edit this file manually. -->",
146
+ "<!-- Managed by mancode:dsh-skill. Do not edit this file manually. -->",
146
147
  "<!-- Managed by mancode:mode-file. Do not edit this file manually. -->"
147
148
  ];
148
149
  var GENERATED_CLAUDE_HOOK_COMMANDS = /* @__PURE__ */ new Set([
@@ -172,6 +173,8 @@ var V3_KIMI_START_MARKER = "<!-- mancode:continuity:kimi:start -->";
172
173
  var V3_KIMI_END_MARKER = "<!-- mancode:continuity:kimi:end -->";
173
174
  var V3_QODER_START_MARKER = "<!-- mancode:continuity:qoder:start -->";
174
175
  var V3_QODER_END_MARKER = "<!-- mancode:continuity:qoder:end -->";
176
+ var V3_DSH_START_MARKER = "<!-- mancode:continuity:dsh:start -->";
177
+ var V3_DSH_END_MARKER = "<!-- mancode:continuity:dsh:end -->";
175
178
  var V3_COPILOT_START_MARKER = "<!-- mancode:continuity:copilot:start -->";
176
179
  var V3_COPILOT_END_MARKER = "<!-- mancode:continuity:copilot:end -->";
177
180
  var LEGACY_V3_CODEX_MARKERS = [
@@ -198,6 +201,10 @@ var LEGACY_QODER_MARKERS = [
198
201
  "<!-- mancode:qoder:start -->",
199
202
  "<!-- mancode:qoder:end -->"
200
203
  ];
204
+ var LEGACY_DSH_MARKERS = [
205
+ "<!-- mancode:dsh:start -->",
206
+ "<!-- mancode:dsh:end -->"
207
+ ];
201
208
  var RETRIABLE_ADAPTER_READ_CODES = /* @__PURE__ */ new Set(["EACCES", "EBUSY", "EPERM"]);
202
209
  var ADAPTER_READ_MAX_ATTEMPTS = 4;
203
210
  var ADAPTER_READ_RETRY_DELAY_MS = 25;
@@ -208,14 +215,16 @@ var V3_ADAPTER_PLATFORMS = [
208
215
  "copilot",
209
216
  "zcode",
210
217
  "kimi-code",
211
- "qoder"
218
+ "qoder",
219
+ "dsh"
212
220
  ];
213
221
  var V3_MODE_ENTRY_FILE_TARGETS = V3_MODE_NAMES.flatMap((mode) => [
214
222
  `claude-mode-${mode}`,
215
223
  `agents-mode-${mode}`,
216
224
  `cursor-mode-${mode}`,
217
225
  `copilot-mode-${mode}`,
218
- `qoder-mode-${mode}`
226
+ `qoder-mode-${mode}`,
227
+ `dsh-mode-${mode}`
219
228
  ]);
220
229
  var V3_LEGACY_ADAPTER_FILE_TARGETS = [
221
230
  "claude-settings",
@@ -262,35 +271,43 @@ async function planV3AdapterFiles(projectRoot) {
262
271
  removeLegacyV3Block(
263
272
  removeLegacyV3Block(
264
273
  removeLegacyV3Block(
265
- removeLegacyAgentsBlocks(existing.get("agents") ?? ""),
266
- LEGACY_V3_CODEX_MARKERS
274
+ removeLegacyV3Block(
275
+ removeLegacyAgentsBlocks(existing.get("agents") ?? ""),
276
+ LEGACY_V3_CODEX_MARKERS
277
+ ),
278
+ LEGACY_V3_ZCODE_MARKERS
267
279
  ),
268
- LEGACY_V3_ZCODE_MARKERS
280
+ LEGACY_KIMI_MARKERS
269
281
  ),
270
- LEGACY_KIMI_MARKERS
282
+ LEGACY_QODER_MARKERS
271
283
  ),
272
- LEGACY_QODER_MARKERS
284
+ LEGACY_DSH_MARKERS
273
285
  );
274
286
  const nextAgents = replaceManagedV3BlockText(
275
287
  replaceManagedV3BlockText(
276
288
  replaceManagedV3BlockText(
277
289
  replaceManagedV3BlockText(
278
- agents,
279
- V3_CODEX_START_MARKER,
280
- V3_CODEX_END_MARKER,
281
- renderV3Bootstrap("codex")
290
+ replaceManagedV3BlockText(
291
+ agents,
292
+ V3_CODEX_START_MARKER,
293
+ V3_CODEX_END_MARKER,
294
+ renderV3Bootstrap("codex")
295
+ ),
296
+ V3_ZCODE_START_MARKER,
297
+ V3_ZCODE_END_MARKER,
298
+ renderV3Bootstrap("zcode")
282
299
  ),
283
- V3_ZCODE_START_MARKER,
284
- V3_ZCODE_END_MARKER,
285
- renderV3Bootstrap("zcode")
300
+ V3_KIMI_START_MARKER,
301
+ V3_KIMI_END_MARKER,
302
+ renderV3Bootstrap("kimi-code")
286
303
  ),
287
- V3_KIMI_START_MARKER,
288
- V3_KIMI_END_MARKER,
289
- renderV3Bootstrap("kimi-code")
304
+ V3_QODER_START_MARKER,
305
+ V3_QODER_END_MARKER,
306
+ renderV3Bootstrap("qoder")
290
307
  ),
291
- V3_QODER_START_MARKER,
292
- V3_QODER_END_MARKER,
293
- renderV3Bootstrap("qoder")
308
+ V3_DSH_START_MARKER,
309
+ V3_DSH_END_MARKER,
310
+ renderV3Bootstrap("dsh")
294
311
  );
295
312
  const legacyAdapterPlans = planLegacyAdapterRetirement(existing);
296
313
  const plans = [
@@ -522,6 +539,8 @@ function v3ModeEntryPath(projectRoot, platform, mode) {
522
539
  return path.join(root, ".github", "prompts", `${mode}.prompt.md`);
523
540
  case "qoder":
524
541
  return path.join(root, ".qoder", "commands", `${mode}.md`);
542
+ case "dsh":
543
+ return path.join(root, ".dsh", "skills", mode, "SKILL.md");
525
544
  }
526
545
  }
527
546
  async function installV3Adapter(projectRoot, platform) {
@@ -601,6 +620,15 @@ async function installV3Adapter(projectRoot, platform) {
601
620
  [LEGACY_QODER_MARKERS]
602
621
  );
603
622
  break;
623
+ case "dsh":
624
+ await replaceManagedV3Block(
625
+ path.join(root, "AGENTS.md"),
626
+ V3_DSH_START_MARKER,
627
+ V3_DSH_END_MARKER,
628
+ content,
629
+ [LEGACY_DSH_MARKERS]
630
+ );
631
+ break;
604
632
  }
605
633
  await retireLegacyPlatformFiles(root, platform);
606
634
  for (const mode of V3_MODE_NAMES) {
@@ -644,15 +672,7 @@ async function inspectV3Adapter(projectRoot, platform) {
644
672
  };
645
673
  }
646
674
  async function inspectV3AdapterVersions(projectRoot, requiredPlatforms = []) {
647
- const platforms = [
648
- "claude-code",
649
- "codex",
650
- "cursor",
651
- "copilot",
652
- "zcode",
653
- "kimi-code",
654
- "qoder"
655
- ];
675
+ const platforms = [...V3_ADAPTER_PLATFORMS];
656
676
  const required = new Set(requiredPlatforms);
657
677
  const entries = await Promise.all(
658
678
  platforms.map(
@@ -772,6 +792,17 @@ async function removeV3Adapter(projectRoot, platform) {
772
792
  ...LEGACY_QODER_MARKERS
773
793
  );
774
794
  break;
795
+ case "dsh":
796
+ await removeManagedV3Block(
797
+ path.join(root, "AGENTS.md"),
798
+ V3_DSH_START_MARKER,
799
+ V3_DSH_END_MARKER
800
+ );
801
+ await removeManagedV3Block(
802
+ path.join(root, "AGENTS.md"),
803
+ ...LEGACY_DSH_MARKERS
804
+ );
805
+ break;
775
806
  }
776
807
  if (!preserveSharedModeEntries) {
777
808
  for (const mode of V3_MODE_NAMES) {
@@ -866,9 +897,10 @@ function renderV3ModeEntry(mode, platform) {
866
897
  }
867
898
  const frontmatter = [
868
899
  "---",
869
- ...platform === "claude-code" || platform === "codex" || platform === "zcode" || platform === "kimi-code" || platform === "qoder" ? [`name: ${mode}`] : [],
900
+ ...platform === "claude-code" || platform === "codex" || platform === "zcode" || platform === "kimi-code" || platform === "qoder" || platform === "dsh" ? [`name: ${mode}`] : [],
870
901
  ...platform === "copilot" ? ["agent: 'agent'"] : [],
871
902
  `description: ${JSON.stringify(definition.description)}`,
903
+ ...platform === "dsh" ? ["disable-model-invocation: true", "user-invocable: true"] : [],
872
904
  "---"
873
905
  ];
874
906
  const mutationGuidance = mode === "manps" ? "The local scan and an explicitly requested remediation do not require a TaskRef, workflow revision, actor, or session. Never turn their report files into workflow authority." : mode === "mansolo" ? "Only an explicit governed handoff mutation requires the bound TaskRef, explicit session, and latest expected revision. Ordinary focused solo work persists no mode state." : "For every mutation, use the TaskRef, explicit session, matching client, and latest expected revision reported by mancode. Do not emulate the legacy `--step` protocol or persist mode state in an adapter file.";
@@ -1069,6 +1101,15 @@ async function renderV3AdapterCandidate(root, platform) {
1069
1101
  renderV3Bootstrap(platform)
1070
1102
  );
1071
1103
  }
1104
+ case "dsh": {
1105
+ const existing = await readAdapterTarget(root, "agents") ?? "";
1106
+ return replaceManagedV3BlockText(
1107
+ removeLegacyV3Block(existing, LEGACY_DSH_MARKERS),
1108
+ V3_DSH_START_MARKER,
1109
+ V3_DSH_END_MARKER,
1110
+ renderV3Bootstrap(platform)
1111
+ );
1112
+ }
1072
1113
  }
1073
1114
  }
1074
1115
  function renderCursorRule(content) {
@@ -1120,6 +1161,7 @@ function primaryFileTarget(platform) {
1120
1161
  case "zcode":
1121
1162
  case "kimi-code":
1122
1163
  case "qoder":
1164
+ case "dsh":
1123
1165
  return "agents";
1124
1166
  case "copilot":
1125
1167
  return "copilot-instructions";
@@ -1203,6 +1245,17 @@ function planPlatformBootstrapUpgrade(desired, platform) {
1203
1245
  )
1204
1246
  );
1205
1247
  return;
1248
+ case "dsh":
1249
+ desired.set(
1250
+ target,
1251
+ replaceManagedV3BlockText(
1252
+ removeLegacyV3Block(current ?? "", LEGACY_DSH_MARKERS),
1253
+ V3_DSH_START_MARKER,
1254
+ V3_DSH_END_MARKER,
1255
+ renderV3Bootstrap(platform)
1256
+ )
1257
+ );
1258
+ return;
1206
1259
  case "copilot":
1207
1260
  desired.set(
1208
1261
  target,
@@ -1283,6 +1336,15 @@ function primaryManagedTargetSpec(platform) {
1283
1336
  V3_QODER_END_MARKER,
1284
1337
  renderV3Bootstrap(platform)
1285
1338
  );
1339
+ case "dsh":
1340
+ return embeddedManagedTargetSpec(
1341
+ target,
1342
+ "agents#dsh",
1343
+ "agents",
1344
+ V3_DSH_START_MARKER,
1345
+ V3_DSH_END_MARKER,
1346
+ renderV3Bootstrap(platform)
1347
+ );
1286
1348
  }
1287
1349
  }
1288
1350
  function embeddedManagedTargetSpec(target, identity, fileTarget, startMarker, endMarker, content) {
@@ -1617,7 +1679,7 @@ function legacyAdapterTargetsForPlatform(platform, includeSettings) {
1617
1679
  (target) => target.startsWith("agents-alias-")
1618
1680
  );
1619
1681
  }
1620
- if (platform === "qoder") {
1682
+ if (platform === "qoder" || platform === "dsh") {
1621
1683
  return [];
1622
1684
  }
1623
1685
  return V3_LEGACY_ADAPTER_FILE_TARGETS.filter(
@@ -1804,13 +1866,13 @@ function renderModeEntryForFileTarget(target) {
1804
1866
  return renderV3ModeEntry(parsed.mode, parsed.platform);
1805
1867
  }
1806
1868
  function parseModeEntryFileTarget(target) {
1807
- const match = /^(claude|agents|cursor|copilot|qoder)-mode-(manba|man|manteam|manps|mansolo)$/u.exec(
1869
+ const match = /^(claude|agents|cursor|copilot|qoder|dsh)-mode-(manba|man|manteam|manps|mansolo)$/u.exec(
1808
1870
  target
1809
1871
  );
1810
1872
  if (!match) return null;
1811
1873
  const family = match[1];
1812
1874
  const mode = match[2];
1813
- const platform = family === "claude" ? "claude-code" : family === "agents" ? "codex" : family === "cursor" ? "cursor" : family === "qoder" ? "qoder" : "copilot";
1875
+ const platform = family === "claude" ? "claude-code" : family === "agents" ? "codex" : family === "cursor" ? "cursor" : family === "qoder" ? "qoder" : family === "dsh" ? "dsh" : "copilot";
1814
1876
  return { platform, mode };
1815
1877
  }
1816
1878
  function isRecord(value) {
@@ -1950,6 +2012,7 @@ function targetFor(platform) {
1950
2012
  case "zcode":
1951
2013
  case "kimi-code":
1952
2014
  case "qoder":
2015
+ case "dsh":
1953
2016
  return "AGENTS.md";
1954
2017
  case "copilot":
1955
2018
  return ".github/copilot-instructions.md";
@@ -2012,6 +2075,8 @@ function platformLabelFor(platform) {
2012
2075
  return "Codex, ZCode, or Kimi Code (shared AGENTS.md bootstrap)";
2013
2076
  case "qoder":
2014
2077
  return "Qoder (IDE/CLI)";
2078
+ case "dsh":
2079
+ return "DeepSeek Harness";
2015
2080
  }
2016
2081
  }
2017
2082
  function capabilitiesFor(_platform) {
@@ -2067,4 +2132,4 @@ export {
2067
2132
  renderV3Bootstrap,
2068
2133
  renderV3ModeEntry
2069
2134
  };
2070
- //# sourceMappingURL=chunk-AWOIP2LC.js.map
2135
+ //# sourceMappingURL=chunk-PBXSV352.js.map