mindforge-cc 8.1.1 → 9.0.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.
Files changed (74) hide show
  1. package/.claude/settings.local.json +16 -0
  2. package/.mindforge/celestial.db +0 -0
  3. package/.mindforge/config.json +7 -7
  4. package/.planning/REQUIREMENTS.md +13 -1
  5. package/.planning/STATE.md +13 -8
  6. package/.planning/jira-sync.json +1 -5
  7. package/.planning/slack-threads.json +1 -3
  8. package/CHANGELOG.md +39 -0
  9. package/LICENSE +1 -1
  10. package/MINDFORGE.md +14 -13
  11. package/README.md +9 -2
  12. package/RELEASENOTES.md +55 -0
  13. package/bin/autonomous/auto-runner.js +307 -14
  14. package/bin/engine/learning-manager.js +4 -2
  15. package/bin/governance/impact-analyzer.js +4 -2
  16. package/bin/installer-core.js +18 -2
  17. package/bin/memory/vector-hub.js +148 -16
  18. package/bin/migrations/migrate.js +1 -0
  19. package/bin/migrations/v9-unified-memory.js +98 -0
  20. package/bin/models/cloud-broker.js +7 -6
  21. package/bin/models/model-broker.js +6 -5
  22. package/bin/models/model-client.js +12 -8
  23. package/bin/models/model-router.js +13 -11
  24. package/bin/sre/adversarial-sre.js +109 -0
  25. package/bin/sre/sentinel.js +128 -0
  26. package/bin/sre/shadow-mirror.js +122 -0
  27. package/bin/sre/sli-verifier.js +81 -0
  28. package/docs/Context/Master-Context.md +39 -2
  29. package/docs/PERSONAS.md +40 -0
  30. package/docs/architecture/V8-SRE.md +88 -0
  31. package/docs/architecture/V9-BEDROCK.md +162 -0
  32. package/docs/governance-guide.md +52 -17
  33. package/package.json +2 -2
  34. package/.mindforge/bypasses.json +0 -8
  35. package/.mindforge/memory/decision-library.jsonl +0 -0
  36. package/.mindforge/memory/knowledge-base.jsonl +0 -15
  37. package/.mindforge/memory/pattern-library.jsonl +0 -1
  38. package/.mindforge/memory/team-preferences.jsonl +0 -5
  39. package/.mindforge/remediation-queue.json +0 -47
  40. package/.planning/AUDIT.jsonl +0 -45
  41. package/.planning/RISK-AUDIT.jsonl +0 -53
  42. package/.planning/ROI.jsonl +0 -2
  43. package/.planning/TEMPORAL-TEST.md +0 -1
  44. package/.planning/history/36525e1d9da1b674/ARCHITECTURE.md +0 -0
  45. package/.planning/history/36525e1d9da1b674/HANDOFF.json +0 -8
  46. package/.planning/history/36525e1d9da1b674/PROJECT.md +0 -33
  47. package/.planning/history/36525e1d9da1b674/RELEASE-CHECKLIST.md +0 -68
  48. package/.planning/history/36525e1d9da1b674/REQUIREMENTS.md +0 -0
  49. package/.planning/history/36525e1d9da1b674/ROADMAP.md +0 -12
  50. package/.planning/history/36525e1d9da1b674/SNAPSHOT-META.json +0 -18
  51. package/.planning/history/36525e1d9da1b674/STATE.md +0 -31
  52. package/.planning/history/36525e1d9da1b674/TEMPORAL-TEST.md +0 -1
  53. package/.planning/history/36525e1d9da1b674/jira-sync.json +0 -5
  54. package/.planning/history/36525e1d9da1b674/slack-threads.json +0 -3
  55. package/.planning/history/test-audit-001/ARCHITECTURE.md +0 -0
  56. package/.planning/history/test-audit-001/HANDOFF.json +0 -8
  57. package/.planning/history/test-audit-001/PROJECT.md +0 -33
  58. package/.planning/history/test-audit-001/RELEASE-CHECKLIST.md +0 -68
  59. package/.planning/history/test-audit-001/REQUIREMENTS.md +0 -0
  60. package/.planning/history/test-audit-001/ROADMAP.md +0 -12
  61. package/.planning/history/test-audit-001/SNAPSHOT-META.json +0 -17
  62. package/.planning/history/test-audit-001/STATE.md +0 -31
  63. package/.planning/history/test-audit-001/TEMPORAL-TEST.md +0 -1
  64. package/.planning/history/test-audit-001/jira-sync.json +0 -5
  65. package/.planning/history/test-audit-001/slack-threads.json +0 -3
  66. package/bin/engine/test-ceg.js +0 -59
  67. package/bin/engine/test-interlock.js +0 -40
  68. package/bin/engine/test-remediation.js +0 -61
  69. package/bin/engine/test-rsa.js +0 -64
  70. package/bin/engine/test-scs.js +0 -57
  71. package/bin/engine/test-v7-blueprint.js +0 -44
  72. package/bin/governance/test-config.js +0 -40
  73. package/bin/governance/test-crypto-pluggable.js +0 -50
  74. package/bin/governance/test-hardened-gate.js +0 -71
@@ -1,44 +0,0 @@
1
- /**
2
- * MindForge v7 — Test Suite
3
- * Blueprint Verification: NDR Pillar X
4
- */
5
- 'use strict';
6
-
7
- const tracer = require('./nexus-tracer');
8
- const remediationQueue = require('../revops/remediation-queue');
9
- const fs = require('node:fs');
10
-
11
- async function testNDRBlueprint() {
12
- console.log('--- STARTING NDR BLUEPRINT VERIFICATION ---');
13
-
14
- // Clear existing queue for clean test
15
- if (fs.existsSync(remediationQueue.queuePath)) fs.unlinkSync(remediationQueue.queuePath);
16
-
17
- // We need to create an active span to record reasoning
18
- await tracer.startSpan('span_stable', { agent: 'mf-researcher' });
19
- await tracer.startSpan('span_drift', { agent: 'mf-researcher' });
20
-
21
- // 1. Simulate a Stable Thought (should have high confidence)
22
- console.log('\n[TEST 1] Testing Stable reasoning...');
23
- await tracer.recordReasoning('span_stable', 'mf-researcher', 'I will now analyze the dependencies and create a plan.');
24
-
25
- // 2. Simulate a Drifting Thought (should trigger validator critique)
26
- console.log('\n[TEST 2] Testing Drifting reasoning (Self-Doubt)...');
27
- await tracer.recordReasoning('span_drift', 'mf-researcher', 'I am not sure how to proceed, maybe I should wait and check the goal again.');
28
-
29
- // 3. Verify Queue Persistence
30
- const pending = remediationQueue.getPending();
31
- console.log(`\n[RESULT] Pending Remediations in Queue: ${pending.length}`);
32
-
33
- if (pending.length > 0) {
34
- console.log('--- NDR BLUEPRINT VERIFICATION PASSED ---');
35
- } else {
36
- console.error('--- NDR BLUEPRINT VERIFICATION FAILED: No remediation queued ---');
37
- process.exit(1);
38
- }
39
- }
40
-
41
- testNDRBlueprint().catch(err => {
42
- console.error(err);
43
- process.exit(1);
44
- });
@@ -1,40 +0,0 @@
1
- /**
2
- * MindForge v7 — Core Governance Test
3
- * Verifies ConfigManager loading and MarketEvaluator integration.
4
- */
5
- 'use strict';
6
-
7
- const configManager = require('./config-manager');
8
- const marketEvaluator = require('../revops/market-evaluator');
9
-
10
- function testConfig() {
11
- console.log('--- ConfigManager Test ---');
12
-
13
- const version = configManager.get('version');
14
- console.log(`Version: ${version}`);
15
- if (version !== '7.0.0') throw new Error('Incorrect config version');
16
-
17
- const drift = configManager.get('governance.drift_threshold');
18
- console.log(`Drift Threshold: ${drift}`);
19
- if (drift !== 0.75) throw new Error('Incorrect drift threshold');
20
-
21
- console.log('--- MarketEvaluator Integration Test ---');
22
- const best = marketEvaluator.getBestProvider(95);
23
- console.log(`Best Provider for MIR 95: ${best.model_id} (${best.provider})`);
24
-
25
- if (best.model_id !== 'llama-3-70b-local' && best.model_id !== 'claude-3-5-sonnet' && best.model_id !== 'gemini-1.5-pro') {
26
- // Based on our config, llama-3-70b-local has benchmark 92 (doesn't meet 95),
27
- // gemini-1.5-pro (98) and claude-3-5-sonnet (99) and gpt-4o (97) meet it.
28
- // Cheapest among those: gemini-1.5-pro (0.014) vs claude-3-5-sonnet (0.018) vs gpt-4o (0.02)
29
- // So gemini-1.5-pro should be the winner.
30
- }
31
-
32
- console.log('PASSED');
33
- }
34
-
35
- try {
36
- testConfig();
37
- } catch (err) {
38
- console.error(`FAILED: ${err.message}`);
39
- process.exit(1);
40
- }
@@ -1,50 +0,0 @@
1
- /**
2
- * MindForge v7 — Security & Observability Test
3
- * Verifies pluggable crypto and new tracer hooks.
4
- */
5
- 'use strict';
6
-
7
- const quantumCrypto = require('./quantum-crypto');
8
- const nexusTracer = require('../engine/nexus-tracer');
9
-
10
- async function testSecurityAndTracer() {
11
- console.log('--- Security & Tracer Test ---');
12
-
13
- // 1. Verify Crypto Provider
14
- const provider = quantumCrypto.getProvider();
15
- console.log(`Active Crypto Provider: ${provider.id} (${provider.algorithm})`);
16
-
17
- if (provider.id !== 'simulated-lattice') {
18
- throw new Error(`Expected simulated-lattice provider, got ${provider.id}`);
19
- }
20
-
21
- // 2. Verify PQAS Key Generation
22
- const keys = await quantumCrypto.generateLatticeKeyPair();
23
- console.log(`Generated Keys with Provider: ${keys.provider}`);
24
- if (keys.provider !== provider.id) throw new Error('Key provider mismatch');
25
-
26
- // 3. Verify Tracer Fine-Tuning Hook
27
- const spanId = await nexusTracer.startSpan('critical-logic-test');
28
- const criticalThought = 'This thought is so critically broken and repeating that it should trigger the v7 fine-tuning hook. Repeating, repeating, repeating, repeating, repeating.';
29
-
30
- console.log('[Tracer] Recording critical reasoning trace...');
31
- await nexusTracer.recordReasoning(spanId, 'test-agent', criticalThought);
32
-
33
- // 4. Verify SBOM Arbitrage
34
- nexusTracer.recordArbitrage(0.005);
35
- const sbomPath = await nexusTracer.exportSBOM();
36
- console.log(`SBOM Exported to: ${sbomPath}`);
37
-
38
- const sbomRaw = require('fs').readFileSync(sbomPath, 'utf8');
39
- const sbom = JSON.parse(sbomRaw);
40
- console.log(`SBOM Arbitrage Total: ${sbom.arbitrage_total}`);
41
-
42
- if (sbom.arbitrage_total !== 0.005) throw new Error('SBOM Arbitrage tracking failed');
43
-
44
- console.log('PASSED');
45
- }
46
-
47
- testSecurityAndTracer().catch(err => {
48
- console.error(`FAILED: ${err.message}`);
49
- process.exit(1);
50
- });
@@ -1,71 +0,0 @@
1
- /**
2
- * MindForge v7 — Test Suite
3
- * Blueprint Verification: PQAS Pillar XI
4
- */
5
- 'use strict';
6
-
7
- const PolicyEngine = require('./policy-engine');
8
- const policyGate = require('./policy-gate-hardened');
9
- const fs = require('node:fs');
10
-
11
- async function testPQASBlueprint() {
12
- console.log('--- STARTING PQAS BLUEPRINT VERIFICATION ---');
13
-
14
- // Clear existing bypasses for clean test
15
- if (fs.existsSync(policyGate.bypassStore)) fs.unlinkSync(policyGate.bypassStore);
16
-
17
- const engine = new PolicyEngine({ policiesDir: __dirname + '/policies' });
18
-
19
- // 1. Simulate High-Impact Intent (Score > 95)
20
- console.log('\n[TEST 1] Testing Critical Risk Mutation (WRITE on STATE.md)...');
21
-
22
- // Create a policy that targets this resource with max_impact 100
23
- if (!fs.existsSync(__dirname + '/policies')) fs.mkdirSync(__dirname + '/policies');
24
- fs.writeFileSync(__dirname + '/policies/critical-data.json', JSON.stringify({
25
- id: 'pol_critical_001',
26
- effect: 'PERMIT',
27
- max_impact: 100,
28
- conditions: { resource: 'STATE.md' }
29
- }));
30
-
31
- const intent = {
32
- did: 'did:key:admin',
33
- action: 'WRITE',
34
- resource: 'STATE.md',
35
- requestId: 'req_crit_001',
36
- tier: 1
37
- };
38
-
39
- // We need to ensure ImpactAnalyzer returns > 95.
40
- // In the real code it calculates it. For test, we'll try to trigger the gate.
41
- const verdict = await engine.evaluate(intent);
42
-
43
- console.log(`\n[RESULT] Verdict: ${verdict.verdict}`);
44
- console.log(`[RESULT] Reason: ${verdict.reason}`);
45
- console.log(`[RESULT] Status: ${verdict.status}`);
46
-
47
- if (verdict.status === 'WAIT_FOR_BIOMETRIC') {
48
- console.log('\n[TEST 2] Recording Biometric Signature...');
49
- await policyGate.recordBypass(intent.requestId, 'SIG_WEBAUTHN_EXECUTIVE_ALPHA');
50
-
51
- console.log('\n[TEST 3] Re-evaluating with Signature...');
52
- const finalVerdict = await engine.evaluate(intent);
53
- console.log(`\n[RESULT] Final Verdict: ${finalVerdict.verdict}`);
54
-
55
- if (finalVerdict.verdict === 'PERMIT') {
56
- console.log('--- PQAS BLUEPRINT VERIFICATION PASSED ---');
57
- } else {
58
- console.error('--- PQAS BLUEPRINT VERIFICATION FAILED: Still denied after signature ---');
59
- process.exit(1);
60
- }
61
- } else {
62
- // If it didn't trigger, maybe the impact score wasn't high enough?
63
- // Since we can't easily force ImpactAnalyzer without editing it, we check if it handled it.
64
- console.log('--- PQAS BLUEPRINT VERIFICATION SKIPPED: Risk score below gate threshold ---');
65
- }
66
- }
67
-
68
- testPQASBlueprint().catch(err => {
69
- console.error(err);
70
- process.exit(1);
71
- });