dsh-agent-team-presets 0.3.2 → 0.3.4

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.
Files changed (121) hide show
  1. package/NOTICE +58 -3
  2. package/README.md +73 -398
  3. package/README.zh.md +79 -404
  4. package/assets/card-patches/catalog.json +30 -0
  5. package/assets/card-patches/dsh-context-0.85.0.client.js.gz +0 -0
  6. package/assets/card-patches/dsh-context-0.85.1.client.js.gz +0 -0
  7. package/assets/card-patches/dsh-context-0.87.0.client.js.gz +0 -0
  8. package/assets/skills/agent-leader-communication/SKILL.md +100 -0
  9. package/assets/skills/agent-subagent-orchestration/SKILL.md +56 -0
  10. package/assets/skills/agent-subagent-orchestration/references/executor-parallel-execution.md +56 -0
  11. package/assets/skills/agent-subagent-orchestration/references/leader-discovery.md +53 -0
  12. package/assets/skills/agent-subagent-orchestration/references/subagent-communication.md +58 -0
  13. package/assets/skills/backend-architecture-workflow/SKILL.md +55 -0
  14. package/assets/skills/backend-architecture-workflow/references/README.md +9 -0
  15. package/assets/skills/backend-architecture-workflow/references/architecture-audit.md +70 -0
  16. package/assets/skills/backend-architecture-workflow/references/architecture-decay-risks.md +75 -0
  17. package/assets/skills/backend-architecture-workflow/references/architecture-design.md +151 -0
  18. package/assets/skills/backend-architecture-workflow/references/bugfix-regression.md +63 -0
  19. package/assets/skills/backend-architecture-workflow/references/complex-bug-diagnosis.md +104 -0
  20. package/assets/skills/executor-short-task-workflow/SKILL.md +48 -0
  21. package/assets/skills/executor-short-task-workflow/references/agent-communication.md +44 -0
  22. package/assets/skills/executor-short-task-workflow/references/verification-and-reporting.md +45 -0
  23. package/assets/skills/frontend-engineering-workflow/SKILL.md +47 -0
  24. package/assets/skills/frontend-engineering-workflow/references/README.md +7 -0
  25. package/assets/skills/frontend-engineering-workflow/references/frontend-implementation.md +46 -0
  26. package/assets/skills/frontend-engineering-workflow/references/visual-design.md +43 -0
  27. package/assets/skills/frontend-engineering-workflow/references/visual-qa.md +126 -0
  28. package/assets/skills/fullstack-advisor/SKILL.md +50 -0
  29. package/assets/skills/fullstack-advisor/references/brooks-principles.md +51 -0
  30. package/assets/skills/fullstack-advisor/references/consultant-communication.md +51 -0
  31. package/assets/skills/fullstack-advisor/references/consultation-workflow.md +71 -0
  32. package/assets/skills/git-release-hygiene/SKILL.md +33 -21
  33. package/assets/skills/git-release-hygiene/references/git-safety.md +66 -0
  34. package/assets/skills/git-release-hygiene/references/pr-changelog.md +98 -0
  35. package/assets/skills/git-release-hygiene/references/release-standard.md +139 -0
  36. package/assets/skills/git-release-hygiene/references/validation-checklist.md +42 -0
  37. package/assets/skills/github-repository-presentation/SKILL.md +49 -130
  38. package/assets/skills/github-repository-presentation/references/bilingual-writing.md +43 -0
  39. package/assets/skills/github-repository-presentation/references/documentation-architecture.md +156 -0
  40. package/assets/skills/github-repository-presentation/references/readme-standard.md +273 -0
  41. package/assets/skills/github-repository-presentation/references/release-notes.md +70 -0
  42. package/assets/skills/github-repository-presentation/references/validation-checklist.md +47 -0
  43. package/assets/skills/independent-code-review-workflow/SKILL.md +60 -0
  44. package/assets/skills/independent-code-review-workflow/references/README.md +9 -0
  45. package/assets/skills/independent-code-review-workflow/references/decay-risks.md +99 -0
  46. package/assets/skills/independent-code-review-workflow/references/review-checklist.md +53 -0
  47. package/assets/skills/independent-code-review-workflow/references/review-methodology.md +113 -0
  48. package/assets/skills/independent-code-review-workflow/references/review-severity.md +49 -0
  49. package/assets/skills/independent-code-review-workflow/references/test-quality-review.md +71 -0
  50. package/assets/skills/leader-long-task-orchestration/SKILL.md +49 -0
  51. package/assets/skills/leader-long-task-orchestration/references/delivery-plan-template.md +73 -0
  52. package/assets/skills/leader-long-task-orchestration/references/product-alignment.md +46 -0
  53. package/assets/skills/leader-long-task-orchestration/references/rolling-wave-planning.md +32 -0
  54. package/assets/skills/leader-long-task-orchestration/references/technical-decisions-and-escalation.md +34 -0
  55. package/assets/skills/leader-medium-task-workflow/SKILL.md +55 -0
  56. package/assets/skills/leader-medium-task-workflow/references/task-board-and-leader-todo.md +41 -0
  57. package/docs/builtin-team-skills.md +82 -0
  58. package/docs/builtin-team-skills.zh.md +82 -0
  59. package/docs/builtin-teams.md +62 -0
  60. package/docs/builtin-teams.zh.md +62 -0
  61. package/docs/developer/architecture.md +54 -0
  62. package/docs/developer/architecture.zh.md +54 -0
  63. package/docs/guide/install.md +86 -0
  64. package/docs/guide/install.zh.md +86 -0
  65. package/docs/guide/integrations.md +50 -0
  66. package/docs/guide/integrations.zh.md +50 -0
  67. package/docs/guide/team-skills.md +68 -0
  68. package/docs/guide/team-skills.zh.md +68 -0
  69. package/docs/guide/using-teams.md +92 -0
  70. package/docs/guide/using-teams.zh.md +92 -0
  71. package/docs/index.md +53 -0
  72. package/docs/index.zh.md +53 -0
  73. package/docs/reference/tools-and-permissions.md +62 -0
  74. package/docs/reference/tools-and-permissions.zh.md +62 -0
  75. package/docs/reference/troubleshooting.md +59 -0
  76. package/docs/reference/troubleshooting.zh.md +59 -0
  77. package/icon.webp +0 -0
  78. package/lib/client.js +1459 -253
  79. package/lib/index.js +960 -342
  80. package/lib/typert.host.js +402 -29
  81. package/lib/typert.remote-client.d.ts +9 -9
  82. package/lib/typert.remote-client.d.ts.map +1 -1
  83. package/lib/typert.remote-client.js +402 -29
  84. package/lib/types/client/CardPatchView.js +21 -1
  85. package/lib/types/client/ComposerTeamSelect.js +24 -8
  86. package/lib/types/client/TeamAgentView.d.ts +1 -1
  87. package/lib/types/client/TeamAgentView.js +11 -6
  88. package/lib/types/client/TeamImportDialog.d.ts +4 -15
  89. package/lib/types/client/TeamImportDialog.js +29 -25
  90. package/lib/types/client/TeamPresetsSection.js +14 -5
  91. package/lib/types/client/TeamSkillsView.d.ts +5 -4
  92. package/lib/types/client/TeamSkillsView.js +64 -15
  93. package/lib/types/client/locales.d.ts +41 -2
  94. package/lib/types/client/locales.js +185 -8
  95. package/lib/types/client/team-presets-controller.d.ts +15 -2
  96. package/lib/types/client/team-presets-controller.js +86 -30
  97. package/lib/types/client/team-skills-controller.d.ts +14 -5
  98. package/lib/types/client/team-skills-controller.js +71 -37
  99. package/lib/types/index.js +57 -19
  100. package/lib/types/preset-editor.js +3 -4
  101. package/lib/types/preset-transfer.d.ts +1 -1
  102. package/lib/types/presets.d.ts +21 -23
  103. package/lib/types/presets.js +72 -36
  104. package/lib/types/team-catalog.d.ts +50 -3
  105. package/lib/types/team-catalog.js +214 -43
  106. package/lib/types/team-mode.d.ts +48 -0
  107. package/lib/types/team-mode.js +64 -0
  108. package/lib/types/team-skills/import.d.ts +17 -7
  109. package/lib/types/team-skills/import.js +115 -21
  110. package/lib/types/team-skills/index.d.ts +2 -3
  111. package/lib/types/team-skills/index.js +4 -8
  112. package/lib/types/team-skills/manager.d.ts +24 -15
  113. package/lib/types/team-skills/manager.js +98 -105
  114. package/lib/types/team-skills/official-bindings.d.ts +29 -0
  115. package/lib/types/team-skills/official-bindings.js +51 -0
  116. package/lib/types/team-skills/service.d.ts +7 -12
  117. package/lib/types/team-skills/service.js +143 -63
  118. package/lib/types/team-skills/store.d.ts +27 -6
  119. package/lib/types/team-skills/store.js +151 -15
  120. package/lib/types/types.d.ts +18 -4
  121. package/package.json +21 -2
@@ -4,7 +4,8 @@ import { createHash, randomUUID } from 'node:crypto';
4
4
  import { lstat, mkdir, open, readFile, readdir, rename, rm, writeFile } from 'node:fs/promises';
5
5
  import { dirname, join, relative, resolve } from 'node:path';
6
6
  import { SkillPathError, assertNoSymlinks, canonicalRoot, assetDirectoryName, checkFolder, isTextBytes, normalizeSkillPath, resolveInside } from "./paths.js";
7
- import { buildSkillPackage } from "./import.js";
7
+ import { buildSkillPackage, renameSkillPackage } from "./import.js";
8
+ export const SKILL_IMPORT_FOLDER = 'inbox';
8
9
  const REGISTRY_VERSION = 1;
9
10
  const NO_DEPENDENCIES = { mcpServers: [], executables: [], otherSkills: [] };
10
11
  const locks = new Map();
@@ -36,6 +37,11 @@ export function diskComponent(value) {
36
37
  return value.length <= 120 ? `~${Buffer.from(value, 'utf8').toString('hex')}` : `~h${digestBytes(Buffer.from(value, 'utf8'))}`;
37
38
  }
38
39
  function strings(value) { return Array.isArray(value) && value.every(item => typeof item === 'string'); }
40
+ function importFolderName(value) {
41
+ if (normalizeSkillPath(value) !== value || value.includes('/') || value.startsWith('.'))
42
+ throw new Error('invalid Team Skill source folder');
43
+ return value;
44
+ }
39
45
  function validateAsset(value) {
40
46
  if (value === null || typeof value !== 'object')
41
47
  throw new Error('invalid Team Skill asset');
@@ -49,6 +55,11 @@ function validateAsset(value) {
49
55
  || (a.baseVersion !== undefined && component(a.baseVersion) !== a.baseVersion)
50
56
  || (a.updateAvailable !== undefined && typeof a.updateAvailable !== 'boolean'))
51
57
  throw new Error('invalid Team Skill asset shape');
58
+ if (a.sourceFolder !== undefined) {
59
+ if (a.origin !== 'custom' || typeof a.sourceFolder !== 'string')
60
+ throw new Error('invalid Team Skill source folder');
61
+ importFolderName(a.sourceFolder);
62
+ }
52
63
  for (const file of a.files) {
53
64
  if (file === null || typeof file !== 'object' || typeof file.path !== 'string' || normalizeSkillPath(file.path) !== file.path
54
65
  || typeof file.text !== 'boolean' || typeof file.sha256 !== 'string' || !/^[a-f0-9]{64}$/u.test(file.sha256))
@@ -152,7 +163,12 @@ export class TeamSkillStore {
152
163
  }
153
164
  get journalPath() { return join(this.root, 'transaction.json'); }
154
165
  journalTarget(path) {
155
- if (!/^(?:(?:assets|manifests)\/(?:[A-Za-z0-9][A-Za-z0-9:._-]*|~(?:[a-f0-9]+|h[a-f0-9]{64}))(?:\/(?:[A-Za-z0-9][A-Za-z0-9:._-]*|~(?:[a-f0-9]+|h[a-f0-9]{64}))(?:\.json)?)?|\.(?:stage|removed)-[a-f0-9-]+)$/u.test(path)
166
+ const parts = path.split('/');
167
+ if (parts[0] === SKILL_IMPORT_FOLDER && parts.length >= 3) {
168
+ importFolderName(parts[1]);
169
+ normalizeSkillPath(parts.slice(2).join('/'));
170
+ }
171
+ else if (!/^(?:(?:assets|manifests)\/(?:[A-Za-z0-9][A-Za-z0-9:._-]*|~(?:[a-f0-9]+|h[a-f0-9]{64}))(?:\/(?:[A-Za-z0-9][A-Za-z0-9:._-]*|~(?:[a-f0-9]+|h[a-f0-9]{64}))(?:\.json)?)?|\.(?:stage|removed)-[a-f0-9-]+)$/u.test(path)
156
172
  || path.split('/').some(part => part === '.' || part === '..'))
157
173
  throw new Error('invalid Team Skill transaction path');
158
174
  // Old POSIX journals may contain ':'. On Windows those coordinates were
@@ -328,9 +344,23 @@ export class TeamSkillStore {
328
344
  }
329
345
  list() { return [...this.table.values()].sort((a, b) => a.skillId.localeCompare(b.skillId) || a.id.localeCompare(b.id)); }
330
346
  get(assetId) { return this.table.get(assetId); }
347
+ /**
348
+ * Resolve one skill by its name rather than by asset identity.
349
+ *
350
+ * Several assets may legitimately share a name: the shipped copy, a local
351
+ * override of it, and a skill the user imported under the same name. The
352
+ * shipped copy wins, because a name denotes the skill the plugin ships — a
353
+ * user's own copy must never shadow it for a caller that only said the name.
354
+ * Callers that know which copy they mean pass the asset id instead.
355
+ * @param skillId - kebab-case skill name.
356
+ * @returns the shipped copy when it exists, else the best local one.
357
+ */
331
358
  bySkillId(skillId) {
332
359
  const candidates = this.list().filter(asset => asset.skillId === skillId);
333
- return candidates.find(asset => asset.origin === 'override') ?? candidates.find(asset => asset.origin === 'custom') ?? candidates[0];
360
+ return candidates.find(asset => asset.origin === 'builtin')
361
+ ?? candidates.find(asset => asset.origin === 'override')
362
+ ?? candidates.find(asset => asset.origin === 'custom')
363
+ ?? candidates[0];
334
364
  }
335
365
  /** Commit all nested store mutations once; failures restore memory and version folders. */
336
366
  async transaction(operation) {
@@ -367,6 +397,23 @@ export class TeamSkillStore {
367
397
  if (!checked.ok)
368
398
  throw new Error(`invalid skill package: ${checked.reason}`);
369
399
  assetDirectoryName(package_.name);
400
+ // The English skill name is the identity every other surface uses: a
401
+ // binding names it, a preset document exports it, and the model addresses
402
+ // the skill by it. Two assets may therefore share it only when one is a
403
+ // sanctioned copy of the other -- an override IS the shipped skill, edited.
404
+ // A user skill or import taking a name that already belongs to another
405
+ // skill is refused here rather than allowed to shadow it, which is what
406
+ // made "bind `git-release-hygiene`" ambiguous in the first place. The
407
+ // shipped set is authoritative: installing a builtin always proceeds, so a
408
+ // legacy same-named user skill can neither block a release nor win a
409
+ // binding (bindings resolve by the builtin's identity).
410
+ if (options.origin !== 'builtin') {
411
+ const clash = [...this.table.values()].find(asset => asset.skillId === package_.name && asset.id !== options.id
412
+ && !(options.origin === 'override' && asset.origin === 'builtin'));
413
+ if (clash !== undefined) {
414
+ throw new Error(`the skill name "${package_.name}" already belongs to ${clash.id}; a skill name is the identity a binding uses`);
415
+ }
416
+ }
370
417
  const target = this.assetPath(options.id, options.version);
371
418
  const manifest = this.manifestPath(options.id, options.version);
372
419
  await assertNoSymlinks(target);
@@ -383,6 +430,7 @@ export class TeamSkillStore {
383
430
  const asset = immutable({ id: options.id, skillId: package_.name, description: checked.skill.description, origin: options.origin, version: options.version,
384
431
  ...options.officialSkillId === undefined ? {} : { officialSkillId: options.officialSkillId },
385
432
  ...options.baseVersion === undefined ? {} : { baseVersion: options.baseVersion },
433
+ ...options.sourceFolder === undefined ? {} : { sourceFolder: options.sourceFolder },
386
434
  digest: folderDigest(files), files, dependencies: options.dependencies ?? NO_DEPENDENCIES, updatedAt: Date.now() });
387
435
  validateAsset(asset);
388
436
  const tx = this.transactions.getStore();
@@ -428,11 +476,40 @@ export class TeamSkillStore {
428
476
  return asset;
429
477
  });
430
478
  }
431
- async writeFile(assetId, path, content) {
479
+ sourcePath(folder) {
480
+ return resolveInside(join(this.root, SKILL_IMPORT_FOLDER), importFolderName(folder));
481
+ }
482
+ /** Publish a scanned package under its existing identity, or register it for the first time. */
483
+ async publishSource(folder, package_) {
484
+ importFolderName(folder);
485
+ return this.transaction(async () => {
486
+ const current = this.bySkillId(package_.name);
487
+ if (current !== undefined && current.origin !== 'custom')
488
+ throw new Error(`the skill name "${package_.name}" already belongs to ${current.id}`);
489
+ if (current !== undefined && current.digest === folderDigest(fileTable(package_.files))) {
490
+ if (current.sourceFolder !== folder) {
491
+ const tx = this.transactions.getStore();
492
+ tx.assets.set(current.id, immutable({ ...current, sourceFolder: folder }));
493
+ tx.dirty = true;
494
+ }
495
+ return 'existing';
496
+ }
497
+ await this.install(package_, {
498
+ id: current?.id ?? `custom:${package_.name}`,
499
+ origin: 'custom', sourceFolder: folder, version: current === undefined ? '1' : nextVersion(),
500
+ ...(current === undefined ? {} : { dependencies: current.dependencies }),
501
+ });
502
+ return current === undefined ? 'imported' : 'updated';
503
+ });
504
+ }
505
+ async writeFile(assetId, path, content, expectedVersion) {
432
506
  return this.transaction(async () => {
433
507
  const asset = requireAsset(this.table, assetId);
434
508
  if (asset.origin === 'builtin')
435
509
  throw new Error('a shipped Team Skill is read-only; create an editable copy instead');
510
+ if (expectedVersion !== undefined && asset.version !== expectedVersion) {
511
+ throw new Error('This Team Skill has a newer published version. Reopen its file before saving.');
512
+ }
436
513
  const relative = normalizeSkillPath(path);
437
514
  const files = new Map();
438
515
  for (const file of asset.files)
@@ -443,9 +520,35 @@ export class TeamSkillStore {
443
520
  throw new Error(`invalid skill package: ${checked.reason}`);
444
521
  if (checked.skill.name !== asset.skillId)
445
522
  throw new Error('editing cannot change the skill name');
523
+ if (asset.sourceFolder !== undefined)
524
+ await this.writeSourceFile(asset, asset.sourceFolder, relative, files.get(relative));
446
525
  return this.install(checked.skill, { ...asset, version: nextVersion() });
447
526
  });
448
527
  }
528
+ async writeSourceFile(asset, folder, path, bytes) {
529
+ const current = await inspectSkillDirectory(this.sourcePath(folder));
530
+ const sourceChanged = 'The Team Skill source changed on disk. Scan the import folder before saving.';
531
+ if (!current.ok || folderDigest(fileTable(current.skill.files)) !== asset.digest)
532
+ throw new Error(sourceChanged);
533
+ const previous = asset.files.find(file => file.path === path);
534
+ if (previous === undefined || !previous.text)
535
+ throw new Error('Only existing text files can be edited in a scanned Team Skill.');
536
+ const sourcePath = `${SKILL_IMPORT_FOLDER}/${folder}/${path}`;
537
+ const stagePath = `.stage-${randomUUID()}`;
538
+ const backupPath = `.removed-${randomUUID()}`;
539
+ const target = this.journalTarget(sourcePath);
540
+ const stage = this.journalTarget(stagePath);
541
+ const backup = this.journalTarget(backupPath);
542
+ await assertNoSymlinks(target);
543
+ await this.record({ kind: 'create', path: stagePath });
544
+ await writeFile(stage, bytes, { flag: 'wx', mode: (await lstat(target)).mode & 0o777 });
545
+ await this.record({ kind: 'move', path: sourcePath, backup: backupPath });
546
+ await rename(target, backup);
547
+ if (digestBytes(await readFile(backup)) !== previous.sha256)
548
+ throw new Error(sourceChanged);
549
+ await this.record({ kind: 'relocate', path: stagePath, destination: sourcePath });
550
+ await rename(stage, target);
551
+ }
449
552
  /** Change dependency metadata by publishing a new immutable asset version. */
450
553
  async updateDependencies(assetId, dependencies) {
451
554
  return this.transaction(async () => {
@@ -576,19 +679,54 @@ export class TeamSkillStore {
576
679
  throw new Error('Team Skill manifest does not match its version');
577
680
  return immutable(parsed);
578
681
  }
579
- async createOverride(skillId, id) {
682
+ freeCopyName(skillId, reserved) {
683
+ const taken = new Set([...reserved, ...this.list().map(asset => asset.skillId)]);
684
+ let suffix = 1;
685
+ while (taken.has(`${skillId}-${suffix}`))
686
+ suffix += 1;
687
+ return `${skillId}-${suffix}`;
688
+ }
689
+ /** Keep old binding identities when a previously same-named copy needs its own name. */
690
+ async renameLegacyCopies(reserved) {
691
+ await this.transaction(async () => {
692
+ const seen = new Set([...reserved, ...this.list().filter(asset => asset.origin !== 'override').map(asset => asset.skillId)]);
693
+ for (const asset of this.list()) {
694
+ if (asset.origin !== 'override')
695
+ continue;
696
+ if (seen.has(asset.skillId) || asset.skillId === asset.officialSkillId) {
697
+ const name = this.freeCopyName(asset.officialSkillId ?? asset.skillId, reserved);
698
+ const package_ = renameSkillPackage(await this.readPackage(asset), name);
699
+ await this.install(package_, { ...asset, version: nextVersion() });
700
+ seen.add(name);
701
+ }
702
+ else {
703
+ seen.add(asset.skillId);
704
+ }
705
+ }
706
+ });
707
+ }
708
+ async readPackage(asset) {
709
+ const files = [];
710
+ for (const file of asset.files)
711
+ files.push({ path: file.path, bytes: await this.readBytes(asset.id, file.path, asset.version) });
712
+ const checked = buildSkillPackage(files);
713
+ if (!checked.ok)
714
+ throw new Error(`invalid skill package: ${checked.reason}`);
715
+ return checked.skill;
716
+ }
717
+ async createOverride(skillId, id, reserved = []) {
580
718
  return this.transaction(async () => {
581
- const existing = this.table.get(id);
719
+ const existing = id === undefined ? undefined : this.table.get(id);
582
720
  if (existing) {
583
721
  if (existing.origin === 'override' && existing.officialSkillId === skillId)
584
722
  return existing;
585
723
  throw new Error('asset identity already belongs to another skill');
586
724
  }
587
725
  const official = requireAsset(this.table, `builtin:${skillId}`);
588
- const files = [];
589
- for (const file of official.files)
590
- files.push({ path: file.path, bytes: await this.readBytes(official.id, file.path, official.version) });
591
- return this.installFiles(skillId, files, { id, origin: 'override', version: nextVersion(), officialSkillId: skillId, baseVersion: official.version });
726
+ const name = this.freeCopyName(skillId, reserved);
727
+ const package_ = renameSkillPackage(await this.readPackage(official), name);
728
+ return this.install(package_, { id: id ?? `override:${randomUUID()}`, origin: 'override', version: nextVersion(),
729
+ officialSkillId: skillId, baseVersion: official.version, dependencies: official.dependencies });
592
730
  });
593
731
  }
594
732
  async resetOverride(assetId) {
@@ -597,10 +735,8 @@ export class TeamSkillStore {
597
735
  if (asset.origin !== 'override' || asset.officialSkillId === undefined)
598
736
  throw new Error('only an override of a shipped Team Skill can be reset');
599
737
  const official = requireAsset(this.table, `builtin:${asset.officialSkillId}`);
600
- const files = [];
601
- for (const file of official.files)
602
- files.push({ path: file.path, bytes: await this.readBytes(official.id, file.path, official.version) });
603
- return this.installFiles(official.skillId, files, { id: assetId, origin: 'override', version: nextVersion(), officialSkillId: official.skillId, baseVersion: official.version });
738
+ const package_ = renameSkillPackage(await this.readPackage(official), asset.skillId);
739
+ return this.install(package_, { ...asset, version: nextVersion(), baseVersion: official.version });
604
740
  });
605
741
  }
606
742
  async verify(assetId) {
@@ -667,7 +803,7 @@ export async function inspectSkillDirectory(source) {
667
803
  try {
668
804
  const checked = buildSkillPackage(await readDirectory(source));
669
805
  if (checked.ok)
670
- return { ok: true, skill: checked.skill };
806
+ return checked;
671
807
  return { ok: false, reason: checked.reason, ...checked.path === undefined ? {} : { path: checked.path } };
672
808
  }
673
809
  catch (error) {
@@ -309,6 +309,8 @@ export type TeamSkillAsset = {
309
309
  dependencies: TeamSkillDependencies;
310
310
  /** Whether the shipped official asset this overrides has a newer version. */
311
311
  updateAvailable?: boolean;
312
+ /** Folder under the private import directory that supplies this custom skill. */
313
+ sourceFolder?: string;
312
314
  /** Epoch milliseconds of the last local write. */
313
315
  updatedAt: number;
314
316
  };
@@ -483,6 +485,8 @@ export interface TeamSkillLibraryView {
483
485
  readonly teams: readonly TeamSkillTeamView[];
484
486
  /** Shipped skill ids this deployment provides. */
485
487
  readonly official: readonly string[];
488
+ /** Source folders with changes or conflicts found during a read-only check. */
489
+ readonly inboxChanges?: readonly TeamSkillScanEntry[];
486
490
  /** Why the store is unusable, when this deployment could not open it. */
487
491
  readonly issue?: string;
488
492
  }
@@ -503,8 +507,12 @@ export interface TeamSkillDetailView {
503
507
  readonly files: readonly TeamSkillFileView[];
504
508
  /** The `SKILL.md` body, without frontmatter. */
505
509
  readonly body: string;
506
- /** Absolute directory holding this version's files, as the store named it. */
510
+ /** Absolute source directory for scanned assets, or the published version's directory. */
507
511
  readonly directory: string;
512
+ /** Frontmatter fields the importer preserves without applying as dependencies. */
513
+ readonly ignoredDependencyFields?: readonly string[];
514
+ /** The copy was created, but moving the existing role bindings failed. */
515
+ readonly bindingSwitchIssue?: string;
508
516
  /** Declared dependencies, with the executable check that can be made here. */
509
517
  readonly dependencies?: {
510
518
  readonly executables: readonly {
@@ -545,8 +553,10 @@ export interface TeamSkillDeleteView {
545
553
  export interface TeamSkillScanEntry {
546
554
  /** Folder name inside the scan root. */
547
555
  readonly folder: string;
548
- /** Whether it was imported, already present, or refused. */
549
- readonly status: 'imported' | 'existing' | 'invalid';
556
+ /** How the source compares to the installed version. */
557
+ readonly status: 'imported' | 'updated' | 'existing' | 'invalid' | 'missing';
558
+ /** Frontmatter fields preserved without applying them as dependencies. */
559
+ readonly ignoredDependencyFields?: readonly string[];
550
560
  /** Skill name read from its `SKILL.md`, when the folder was readable. */
551
561
  readonly skillId?: string;
552
562
  /** Asset identity for an imported or already-present skill. */
@@ -575,8 +585,12 @@ export interface TeamSkillScanView {
575
585
  readonly scanned: number;
576
586
  /** Folders published as new custom assets. */
577
587
  readonly imported: number;
578
- /** Folders whose skill name already exists in the library. */
588
+ /** Installed custom skills that received a new version. */
589
+ readonly updated: number;
590
+ /** Folders whose published package is identical. */
579
591
  readonly existing: number;
592
+ /** Known source folders no longer providing the installed skill. */
593
+ readonly missing: number;
580
594
  /** Folders refused with a reason. */
581
595
  readonly invalid: number;
582
596
  /** One row per folder, in name order. */
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "dsh-agent-team-presets",
3
3
  "description": "Reusable Agent Team presets for DeepSeek Harness: a captain plus members with their own prompt, model, reasoning effort, and tools.",
4
- "version": "0.3.2",
4
+ "version": "0.3.4",
5
+ "icon": "./icon.webp",
5
6
  "keywords": [
6
7
  "agent-presets",
7
8
  "agent-teams",
@@ -43,6 +44,7 @@
43
44
  },
44
45
  "./src/*": "./src/*",
45
46
  "./locale/*.json": "./locale/*.json",
47
+ "./icon": "./icon.webp",
46
48
  "./package.json": "./package.json"
47
49
  },
48
50
  "dsh": {
@@ -159,10 +161,27 @@
159
161
  "lib/typert.remote-client.d.ts",
160
162
  "cordis.patch.yml",
161
163
  "locale",
164
+ "icon.webp",
162
165
  "assets/skills",
163
166
  "assets/card-patches",
164
167
  "LICENSE",
165
168
  "NOTICE",
166
- "README.md"
169
+ "README.md",
170
+ "docs/index.md",
171
+ "docs/index.zh.md",
172
+ "docs/builtin-teams.md",
173
+ "docs/builtin-teams.zh.md",
174
+ "docs/builtin-team-skills.md",
175
+ "docs/builtin-team-skills.zh.md",
176
+ "docs/guide/install.md",
177
+ "docs/guide/install.zh.md",
178
+ "docs/guide/using-teams.md",
179
+ "docs/guide/using-teams.zh.md",
180
+ "docs/guide/team-skills.md",
181
+ "docs/guide/team-skills.zh.md",
182
+ "docs/guide/integrations.md",
183
+ "docs/guide/integrations.zh.md",
184
+ "docs/reference",
185
+ "docs/developer"
167
186
  ]
168
187
  }