mindforge-cc 11.8.1 → 11.8.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.
@@ -1,11 +1,11 @@
1
1
  {
2
- "version": "11.8.1",
2
+ "version": "11.8.2",
3
3
  "environment": "development",
4
4
  "governance": {
5
5
  "drift_threshold": 0.75,
6
6
  "critical_drift_threshold": 0.5,
7
7
  "res_threshold": 0.8,
8
- "active_did": "did:mindforge:2666a4d8-1d9c-4736-b157-c75564ff9ef8"
8
+ "active_did": "did:mindforge:12d03f93-4306-463a-aa40-c82832a11f43"
9
9
  },
10
10
  "revops": {
11
11
  "market_registry": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "pattern-library.jsonl": {
3
- "lastSync": "2026-07-01T05:23:03.053Z",
3
+ "lastSync": "2026-07-01T06:53:59.643Z",
4
4
  "localCount": 1
5
5
  }
6
6
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [11.8.2] — 2026-07-01 — Clean Stable Release
4
+
5
+ ### Fixes
6
+ - `bin/installer-core.js`: Added main-guard — `health` command now produces full diagnostic output
7
+ - `bin/mindforge-cli.js:185`: Fixed null-status bug — signal-killed child processes now exit with code 1 instead of 0
8
+ - `bin/change-classifier.js`: Tier 2 branch now pushes descriptive reasons to reasons[] array
9
+ - `sdk/tests/sdk.test.js:30`: Replaced hardcoded version "11.8.0" with dynamic package.json read
10
+ - `tests/sdk-exports.test.js`: Fixed MODULE_NOT_FOUND path resolution
11
+ - `README.md:7`: Updated "Latest: v11.8.0" header to "Latest: v11.8.1"
12
+
13
+ ### Improvements
14
+ - `bin/spawn-agent.js --help`: Added v1.0 stub disclosure note to usage text
15
+ - `bin/governance/ztai-manager.js`: Lazy-instantiate SecureEnclaveProvider — eliminates spurious Tier-3 warning on commands that do not use Tier-3 trust
16
+ - `bin/review/cross-review-engine.js`: Added CLI entry point with --help, --diff, --phase, --context args
17
+ - `tests/worktree-engine.test.js`: Added 90-second timeout override to prevent false parallel-runner timeout
18
+ - ESLint: Resolved auto-fixable errors, lint stage now clean
19
+ - Test coverage: Added tests/errors.test.js and tests/file-io.test.js to improve coverage toward 80% target
20
+
21
+ ---
22
+
3
23
  ## [11.8.1] — 2026-07-01 — First Stable Release
4
24
 
5
25
  ### Security
package/MINDFORGE.md CHANGED
@@ -3,10 +3,10 @@
3
3
  ## 1. IDENTITY & VERSIONING
4
4
 
5
5
  [NAME] = MindForge
6
- [VERSION] = 11.8.1
6
+ [VERSION] = 11.8.2
7
7
  [STABLE] = true
8
8
  [MODE] = "Platform Sovereign"
9
- [REQUIRED_CORE_VERSION] = 11.8.1
9
+ [REQUIRED_CORE_VERSION] = 11.8.2
10
10
  [SOVEREIGN_IDENTITY] = true
11
11
  [SRE_LAYER_ENABLED] = true
12
12
 
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ---
6
6
 
7
- ## Latest: v11.8.0
7
+ ## Latest: v11.8.1
8
8
 
9
9
  - **v11.8.0 — "Workflow Forge II".** Expands the Dynamic Workflow Library from 12 to 32 workflows across 5 tiers — adds a new **Beast tier** for compound 5-phase adversarial workflows (security-hardening, accessibility-audit, security-threat-model), plus 18 more across Dev/Ops/Intelligence/Research. 21 new `/mindforge:wf-*` commands. Total: 219 commands.
10
10
  - **v11.7.0 — "Workflow Forge".** Ships the first Dynamic Workflow Library — 12 pre-built multi-agent workflow scripts that run via Claude Code's `Workflow` tool with true parallel agent execution. Four tiers: Research (deep-research, competitive-analysis, tech-evaluation), Dev (code-audit, feature-planner, pr-review, tdd-sprint, refactor-plan), Ops (incident-response, release-prep), Intelligence (onboard-codebase, perf-optimize). 13 new `/mindforge:wf-*` commands. Total: 198 commands.
@@ -75,6 +75,12 @@ function classify() {
75
75
  if (tier < 3) {
76
76
  if (diffFiles.length > 10 || diffFiles.some(f => f.endsWith('.js') || f.endsWith('.ts'))) {
77
77
  tier = 2; // Significant logic change
78
+ if (diffFiles.length > 10) {
79
+ reasons.push(`Large changeset: ${diffFiles.length} files modified`);
80
+ } else {
81
+ const jsFile = diffFiles.find(f => f.endsWith('.js') || f.endsWith('.ts'));
82
+ if (jsFile) reasons.push(`JavaScript/TypeScript file modified: ${jsFile}`);
83
+ }
78
84
  }
79
85
  }
80
86
 
@@ -146,11 +146,32 @@ class QuantumSafeKeyProvider extends KeyProvider {
146
146
  class ZTAIManager {
147
147
  constructor() {
148
148
  this.agentRegistry = new Map(); // DID -> { publicKey, persona, tier, providerType }
149
- this.providers = {
150
- local: new LocalKeyProvider(),
151
- enclave: new SecureEnclaveProvider(),
152
- quantum: new QuantumSafeKeyProvider()
153
- };
149
+ this._providers = {}; // lazily populated — see _getProvider()
150
+ }
151
+
152
+ /**
153
+ * Returns the key provider for the given providerType, constructing it on
154
+ * first use. This defers SecureEnclaveProvider (and its Tier-3 console
155
+ * warning) until a Tier-3+ agent is actually registered, and defers
156
+ * QuantumSafeKeyProvider (and its `require('./quantum-crypto')`) until PQC
157
+ * is explicitly requested — so unrelated commands stay warning-free.
158
+ *
159
+ * @param {'local'|'enclave'|'quantum'} providerType
160
+ * @returns {KeyProvider}
161
+ */
162
+ _getProvider(providerType) {
163
+ if (!this._providers[providerType]) {
164
+ if (providerType === 'local') {
165
+ this._providers[providerType] = new LocalKeyProvider();
166
+ } else if (providerType === 'enclave') {
167
+ this._providers[providerType] = new SecureEnclaveProvider();
168
+ } else if (providerType === 'quantum') {
169
+ this._providers[providerType] = new QuantumSafeKeyProvider();
170
+ } else {
171
+ throw new Error(`Unknown provider type: ${providerType}`);
172
+ }
173
+ }
174
+ return this._providers[providerType];
154
175
  }
155
176
 
156
177
  /**
@@ -192,7 +213,7 @@ class ZTAIManager {
192
213
  const did = `did:mindforge:${uuid}`;
193
214
 
194
215
  const providerType = this._selectProvider(tier);
195
- const provider = this.providers[providerType];
216
+ const provider = this._getProvider(providerType);
196
217
 
197
218
  const publicKeyPEM = await provider.generate(did);
198
219
 
@@ -221,7 +242,7 @@ class ZTAIManager {
221
242
  const agent = this.agentRegistry.get(did);
222
243
  if (!agent) throw new Error(`Agent not registered: ${did}`);
223
244
 
224
- const provider = this.providers[agent.providerType];
245
+ const provider = this._getProvider(agent.providerType);
225
246
  return await provider.sign(did, data);
226
247
  }
227
248
 
@@ -245,7 +266,7 @@ class ZTAIManager {
245
266
  const agent = this.agentRegistry.get(did);
246
267
  if (!agent) throw new Error(`Agent not found: ${did}`);
247
268
 
248
- const provider = this.providers[agent.providerType];
269
+ const provider = this._getProvider(agent.providerType);
249
270
  agent.publicKey = await provider.rotate(did);
250
271
  agent.rotatedAt = new Date().toISOString();
251
272
  return true;
@@ -254,7 +275,7 @@ class ZTAIManager {
254
275
  revokeAgent(did) {
255
276
  const agent = this.agentRegistry.get(did);
256
277
  if (agent) {
257
- this.providers[agent.providerType].delete(did);
278
+ this._getProvider(agent.providerType).delete(did);
258
279
  this.agentRegistry.delete(did);
259
280
  }
260
281
  }
@@ -952,3 +952,8 @@ async function run(args) {
952
952
  }
953
953
 
954
954
  module.exports = { run, install, uninstall, RUNTIMES, generateEntryContent, SENSITIVE_EXCLUDE, MINDFORGE_DEV_EXCLUDE };
955
+
956
+ if (require.main === module) {
957
+ const args = process.argv.slice(2);
958
+ run(args).catch(err => { console.error(err.message); process.exit(1); });
959
+ }
@@ -182,7 +182,7 @@ const result = spawnSync('node', [scriptPath, ...finalArgs], {
182
182
  env: { ...process.env, MINDFORGE_CLI: 'true' }
183
183
  });
184
184
 
185
- process.exit(result.status || 0);
185
+ process.exit(result.status != null ? result.status : (result.signal ? 1 : 0));
186
186
 
187
187
  /**
188
188
  * Levenshtein distance — dynamic programming edit distance between two strings.
@@ -90,3 +90,22 @@ async function runCrossReview(params) {
90
90
  }
91
91
 
92
92
  module.exports = { runCrossReview, parseFindings: synthesizeFindings.parseFindings, extractVerdict };
93
+
94
+ if (require.main === module) {
95
+ const args = process.argv.slice(2);
96
+ const phase = args.find(a => a.startsWith('--phase='))?.split('=')[1] || 'full';
97
+ const diff = args.find(a => a.startsWith('--diff='))?.split('=')[1] || 'HEAD';
98
+ const context = args.find(a => a.startsWith('--context='))?.split('=')[1] || '';
99
+ if (args.includes('--help') || args.length === 0) {
100
+ console.log('MindForge PR Review — Cross-model review engine');
101
+ console.log('Usage: node bin/review/cross-review-engine.js [--diff=HEAD] [--phase=full] [--context=...]');
102
+ console.log(' --diff Git ref or diff target (default: HEAD)');
103
+ console.log(' --phase Review phase: full|security|quality|performance (default: full)');
104
+ console.log(' --context Additional context string for the review');
105
+ process.exit(0);
106
+ }
107
+ console.log(`[MindForge PR Review] Starting ${phase} review of ${diff}...`);
108
+ runCrossReview({ phaseNum: phase, diff, context })
109
+ .then(result => { console.log(JSON.stringify(result, null, 2)); process.exit(0); })
110
+ .catch(err => { console.error('Review failed:', err.message); process.exit(1); });
111
+ }
@@ -26,6 +26,7 @@ const SAFE_NAME_PATTERN = /^[A-Za-z0-9-_]+$/;
26
26
  if (!MODE || !TARGET) {
27
27
  console.error('❌ Usage: node bin/spawn-agent.js <mode> <target> [--dry-run]');
28
28
  console.error(' modes: identity | spawn | subagent');
29
+ console.error(' Note: spawn mode performs persona resolution only in v1.0 — actual agent dispatch requires Claude Code slash commands (/mindforge:auto or /mindforge:next)');
29
30
  process.exit(1);
30
31
  }
31
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mindforge-cc",
3
- "version": "11.8.1",
3
+ "version": "11.8.2",
4
4
  "description": "MindForge \u2014 Sovereign Agentic Intelligence Framework. Sovereign Stability: Production-Hardened Agentic Intelligence (v11)",
5
5
  "bin": {
6
6
  "mindforge-cc": "bin/install.js",