bmad-plus 0.17.0 → 0.17.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +90 -29
  2. package/README.md +21 -21
  3. package/SECURITY.md +9 -1
  4. package/osint-agent-package/README.md +13 -0
  5. package/osint-agent-package/SETUP_KEYS.md +13 -0
  6. package/package.json +30 -8
  7. package/readme-international/README.de.md +134 -542
  8. package/readme-international/README.es.md +136 -561
  9. package/readme-international/README.fr.md +135 -558
  10. package/src/bmad-plus/agents/agent-shadow/SKILL.md +6 -0
  11. package/src/bmad-plus/packs/pack-memory/README.md +1 -1
  12. package/src/bmad-plus/packs/pack-memory/memory-orchestrator.md +1 -1
  13. package/src/bmad-plus/packs/pack-memory/shared/memory-protocol.md +1 -1
  14. package/src/bmad-plus/packs/pack-shield/README.md +2 -0
  15. package/src/bmad-plus/packs/pack-shield/SKILL.md +2 -0
  16. package/src/bmad-plus/packs/pack-shield/shared/audit-report-template.md +6 -0
  17. package/src/bmad-plus/packs/pack-shield/shield-orchestrator.md +4 -0
  18. package/tools/build/adapters.config.js +1 -1
  19. package/tools/build/generate-adapters.js +186 -60
  20. package/tools/build/generate.js +49 -13
  21. package/tools/cli/bmad-plus-cli.js +3 -6
  22. package/tools/cli/commands/autoconfig.js +62 -22
  23. package/tools/cli/commands/install.js +620 -356
  24. package/tools/cli/commands/memory.js +40 -13
  25. package/tools/cli/commands/scan.js +94 -30
  26. package/tools/cli/commands/uninstall.js +65 -16
  27. package/tools/cli/commands/update-check.js +8 -3
  28. package/tools/cli/commands/update-policy.js +14 -5
  29. package/tools/cli/commands/update.js +89 -20
  30. package/tools/cli/i18n.js +120 -68
  31. package/tools/cli/lib/ide-config.js +3 -1
  32. package/tools/cli/lib/install-manifest.js +13 -6
  33. package/tools/cli/lib/installation-health.js +33 -1
  34. package/tools/cli/lib/installed-adapters.js +29 -6
  35. package/tools/cli/lib/memory-init.js +19 -4
  36. package/tools/cli/lib/packs.js +17 -28
  37. package/tools/cli/lib/path-hash.js +5 -1
  38. package/tools/cli/lib/python-provision.js +51 -12
  39. package/tools/cli/lib/stack-detect.js +51 -25
  40. package/tools/cli/lib/update-check.js +132 -34
  41. package/tools/cli/lib/update-dispatch.js +2 -2
  42. package/tools/cli/lib/update-policy.js +57 -19
  43. package/tools/cli/lib/update-transaction.js +439 -85
  44. package/tools/build/README.md +0 -78
  45. package/tools/build/check-counts.js +0 -626
  46. package/tools/build/check-install-contract.js +0 -648
  47. package/tools/build/generated-adapters/.codex/AGENTS.md +0 -134
  48. package/tools/build/generated-adapters/.cursor/rules/bmad-plus.mdc +0 -139
  49. package/tools/build/generated-adapters/.opencode/AGENTS.md +0 -134
  50. package/tools/build/generated-adapters/AGENTS.md +0 -132
  51. package/tools/build/generated-adapters/CLAUDE.md +0 -135
  52. package/tools/build/generated-adapters/CONVENTIONS.md +0 -134
  53. package/tools/build/generated-adapters/GEMINI.md +0 -139
  54. package/tools/build/generated-adapters/README.md +0 -79
  55. package/tools/maintain/upstream-candidate.js +0 -456
  56. package/tools/release/publication-content.js +0 -904
  57. package/tools/release/supply-chain.js +0 -282
@@ -8,14 +8,19 @@ const { safeAdapterPath } = require('./installed-adapters');
8
8
  const POLICY_FILE = '_bmad/update-policy.json';
9
9
  const OFFICIAL_REGISTRY = 'https://registry.npmjs.org/';
10
10
  const DEFAULT_POLICY = Object.freeze({
11
- mode: 'notify', channel: 'latest', allowedRange: null,
12
- allowPrerelease: false, registry: OFFICIAL_REGISTRY,
11
+ mode: 'notify',
12
+ channel: 'latest',
13
+ allowedRange: null,
14
+ allowPrerelease: false,
15
+ registry: OFFICIAL_REGISTRY,
13
16
  });
14
17
 
15
18
  function isExactVersion(version) {
16
- return typeof version === 'string' &&
19
+ return (
20
+ typeof version === 'string' &&
17
21
  /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(version) &&
18
- semver.valid(version) !== null;
22
+ semver.valid(version) !== null
23
+ );
19
24
  }
20
25
 
21
26
  function validatePolicy(value) {
@@ -27,13 +32,21 @@ function validatePolicy(value) {
27
32
  }
28
33
  const policy = { ...DEFAULT_POLICY, ...value };
29
34
  delete policy.schemaVersion;
30
- if (Object.keys(policy).some(key => !Object.hasOwn(DEFAULT_POLICY, key)) ||
31
- !['off', 'notify', 'auto'].includes(policy.mode) ||
32
- typeof policy.channel !== 'string' || !/^[a-z][a-z0-9_-]{0,31}$/.test(policy.channel) ||
33
- typeof policy.allowPrerelease !== 'boolean' || policy.registry !== OFFICIAL_REGISTRY ||
34
- (policy.allowedRange !== null && (typeof policy.allowedRange !== 'string' ||
35
- !policy.allowedRange.trim() || !semver.validRange(policy.allowedRange)))) {
36
- throw new Error('Invalid update policy: check mode, channel, range, prerelease flag and official registry.');
35
+ if (
36
+ Object.keys(policy).some((key) => !Object.hasOwn(DEFAULT_POLICY, key)) ||
37
+ !['off', 'notify', 'auto'].includes(policy.mode) ||
38
+ typeof policy.channel !== 'string' ||
39
+ !/^[a-z][a-z0-9_-]{0,31}$/.test(policy.channel) ||
40
+ typeof policy.allowPrerelease !== 'boolean' ||
41
+ policy.registry !== OFFICIAL_REGISTRY ||
42
+ (policy.allowedRange !== null &&
43
+ (typeof policy.allowedRange !== 'string' ||
44
+ !policy.allowedRange.trim() ||
45
+ !semver.validRange(policy.allowedRange)))
46
+ ) {
47
+ throw new Error(
48
+ 'Invalid update policy: check mode, channel, range, prerelease flag and official registry.'
49
+ );
37
50
  }
38
51
  if (policy.mode === 'auto' && policy.allowedRange === null) {
39
52
  throw new Error('Automatic updates require an explicit allowedRange.');
@@ -58,11 +71,18 @@ function writeProjectJson(projectDir, relativeFile, data) {
58
71
  const temporaryName = `${relativeFile}.${process.pid}.${crypto.randomUUID()}.tmp`;
59
72
  const temporary = safeAdapterPath(projectDir, temporaryName);
60
73
  try {
61
- fs.writeFileSync(temporary, JSON.stringify(data, null, 2) + '\n', { encoding: 'utf8', flag: 'wx' });
74
+ fs.writeFileSync(temporary, JSON.stringify(data, null, 2) + '\n', {
75
+ encoding: 'utf8',
76
+ flag: 'wx',
77
+ });
62
78
  safeAdapterPath(projectDir, relativeFile);
63
79
  fs.renameSync(temporary, file);
64
80
  } finally {
65
- try { fs.unlinkSync(temporary); } catch { /* Preserve the original write error if cleanup fails. */ }
81
+ try {
82
+ fs.unlinkSync(temporary);
83
+ } catch {
84
+ /* Preserve the original write error if cleanup fails. */
85
+ }
66
86
  }
67
87
  }
68
88
 
@@ -74,17 +94,35 @@ function writeUpdatePolicy(projectDir, value) {
74
94
 
75
95
  function authorizeTarget(value, version) {
76
96
  let policy;
77
- try { policy = validatePolicy(value); } catch { return { allowed: false, reason: 'invalid-policy' }; }
97
+ try {
98
+ policy = validatePolicy(value);
99
+ } catch {
100
+ return { allowed: false, reason: 'invalid-policy' };
101
+ }
78
102
  if (!isExactVersion(version)) return { allowed: false, reason: 'invalid-target-version' };
79
- if (policy.mode !== 'auto') return { allowed: false, reason: policy.mode === 'off' ? 'updates-disabled' : 'approval-required' };
80
- if (!policy.allowPrerelease && semver.prerelease(version)) return { allowed: false, reason: 'prerelease-not-allowed' };
81
- if (!semver.satisfies(version, policy.allowedRange, { includePrerelease: policy.allowPrerelease })) {
103
+ if (policy.mode !== 'auto')
104
+ return {
105
+ allowed: false,
106
+ reason: policy.mode === 'off' ? 'updates-disabled' : 'approval-required',
107
+ };
108
+ if (!policy.allowPrerelease && semver.prerelease(version))
109
+ return { allowed: false, reason: 'prerelease-not-allowed' };
110
+ if (
111
+ !semver.satisfies(version, policy.allowedRange, { includePrerelease: policy.allowPrerelease })
112
+ ) {
82
113
  return { allowed: false, reason: 'outside-allowed-range' };
83
114
  }
84
115
  return { allowed: true, reason: 'authorized-policy' };
85
116
  }
86
117
 
87
118
  module.exports = {
88
- DEFAULT_POLICY, POLICY_FILE, OFFICIAL_REGISTRY, isExactVersion,
89
- validatePolicy, readUpdatePolicy, writeUpdatePolicy, authorizeTarget, writeProjectJson,
119
+ DEFAULT_POLICY,
120
+ POLICY_FILE,
121
+ OFFICIAL_REGISTRY,
122
+ isExactVersion,
123
+ validatePolicy,
124
+ readUpdatePolicy,
125
+ writeUpdatePolicy,
126
+ authorizeTarget,
127
+ writeProjectJson,
90
128
  };