forge-nc 0.9.0__tar.gz

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 (166) hide show
  1. forge_nc-0.9.0/LICENSE +28 -0
  2. forge_nc-0.9.0/PKG-INFO +272 -0
  3. forge_nc-0.9.0/README.md +228 -0
  4. forge_nc-0.9.0/forge/__init__.py +2 -0
  5. forge_nc-0.9.0/forge/__main__.py +163 -0
  6. forge_nc-0.9.0/forge/adaptive_pressure.py +452 -0
  7. forge_nc-0.9.0/forge/ami.py +917 -0
  8. forge_nc-0.9.0/forge/assurance.py +900 -0
  9. forge_nc-0.9.0/forge/assurance_report.py +274 -0
  10. forge_nc-0.9.0/forge/audio/__init__.py +0 -0
  11. forge_nc-0.9.0/forge/audio/commands.py +129 -0
  12. forge_nc-0.9.0/forge/audio/sounds.py +284 -0
  13. forge_nc-0.9.0/forge/audio/stt.py +424 -0
  14. forge_nc-0.9.0/forge/audio/tts.py +363 -0
  15. forge_nc-0.9.0/forge/audit.py +362 -0
  16. forge_nc-0.9.0/forge/autoforge.py +341 -0
  17. forge_nc-0.9.0/forge/autopilot.py +471 -0
  18. forge_nc-0.9.0/forge/behavioral_fingerprint.py +690 -0
  19. forge_nc-0.9.0/forge/benchmark.py +698 -0
  20. forge_nc-0.9.0/forge/benchmark_report.py +275 -0
  21. forge_nc-0.9.0/forge/benchmarks/__init__.py +1 -0
  22. forge_nc-0.9.0/forge/billing.py +292 -0
  23. forge_nc-0.9.0/forge/break_runner.py +431 -0
  24. forge_nc-0.9.0/forge/bug_reporter.py +744 -0
  25. forge_nc-0.9.0/forge/commands.py +2856 -0
  26. forge_nc-0.9.0/forge/config.py +736 -0
  27. forge_nc-0.9.0/forge/constants.py +17 -0
  28. forge_nc-0.9.0/forge/context.py +506 -0
  29. forge_nc-0.9.0/forge/continuity.py +488 -0
  30. forge_nc-0.9.0/forge/crucible.py +1270 -0
  31. forge_nc-0.9.0/forge/dedup.py +235 -0
  32. forge_nc-0.9.0/forge/digest.py +1475 -0
  33. forge_nc-0.9.0/forge/engine.py +4573 -0
  34. forge_nc-0.9.0/forge/event_bus.py +318 -0
  35. forge_nc-0.9.0/forge/file_cache.py +234 -0
  36. forge_nc-0.9.0/forge/forensics.py +334 -0
  37. forge_nc-0.9.0/forge/hardware.py +430 -0
  38. forge_nc-0.9.0/forge/index.py +742 -0
  39. forge_nc-0.9.0/forge/machine_id.py +44 -0
  40. forge_nc-0.9.0/forge/memory.py +432 -0
  41. forge_nc-0.9.0/forge/models/__init__.py +0 -0
  42. forge_nc-0.9.0/forge/models/anthropic_backend.py +270 -0
  43. forge_nc-0.9.0/forge/models/base.py +82 -0
  44. forge_nc-0.9.0/forge/models/ollama.py +459 -0
  45. forge_nc-0.9.0/forge/models/openai_backend.py +248 -0
  46. forge_nc-0.9.0/forge/passport.py +1082 -0
  47. forge_nc-0.9.0/forge/persona.py +109 -0
  48. forge_nc-0.9.0/forge/plan_verifier.py +311 -0
  49. forge_nc-0.9.0/forge/planner.py +386 -0
  50. forge_nc-0.9.0/forge/plugins/__init__.py +583 -0
  51. forge_nc-0.9.0/forge/plugins/base.py +290 -0
  52. forge_nc-0.9.0/forge/plugins/bundled/__init__.py +2 -0
  53. forge_nc-0.9.0/forge/plugins/bundled/adaptive_pressure_plugin.py +71 -0
  54. forge_nc-0.9.0/forge/plugins/bundled/assurance_plugin.py +87 -0
  55. forge_nc-0.9.0/forge/plugins/bundled/common_sense_plugin.py +338 -0
  56. forge_nc-0.9.0/forge/plugins/bundled/cortex_plugin.py +119 -0
  57. forge_nc-0.9.0/forge/plugins/bundled/fingerprint_plugin.py +111 -0
  58. forge_nc-0.9.0/forge/plugins/bundled/poi_plugin.py +118 -0
  59. forge_nc-0.9.0/forge/plugins/bundled/telemetry_plugin.py +66 -0
  60. forge_nc-0.9.0/forge/plugins/bundled/xp_plugin.py +95 -0
  61. forge_nc-0.9.0/forge/plugins/examples/auto_lint.py +64 -0
  62. forge_nc-0.9.0/forge/plugins/examples/project_monitor.py +402 -0
  63. forge_nc-0.9.0/forge/proof_of_inference.py +254 -0
  64. forge_nc-0.9.0/forge/puppet.py +726 -0
  65. forge_nc-0.9.0/forge/quality.py +391 -0
  66. forge_nc-0.9.0/forge/reliability.py +424 -0
  67. forge_nc-0.9.0/forge/resource_guard.py +498 -0
  68. forge_nc-0.9.0/forge/router.py +238 -0
  69. forge_nc-0.9.0/forge/safety.py +326 -0
  70. forge_nc-0.9.0/forge/scheduler.py +244 -0
  71. forge_nc-0.9.0/forge/schema_registry.py +455 -0
  72. forge_nc-0.9.0/forge/shipwright.py +577 -0
  73. forge_nc-0.9.0/forge/stats.py +463 -0
  74. forge_nc-0.9.0/forge/telemetry.py +259 -0
  75. forge_nc-0.9.0/forge/threat_intel.py +628 -0
  76. forge_nc-0.9.0/forge/tokenizer.py +140 -0
  77. forge_nc-0.9.0/forge/tools/__init__.py +0 -0
  78. forge_nc-0.9.0/forge/tools/digest_tools.py +261 -0
  79. forge_nc-0.9.0/forge/tools/filesystem.py +378 -0
  80. forge_nc-0.9.0/forge/tools/git_tools.py +487 -0
  81. forge_nc-0.9.0/forge/tools/registry.py +124 -0
  82. forge_nc-0.9.0/forge/tools/treesitter_tools.py +1653 -0
  83. forge_nc-0.9.0/forge/tools/web_tools.py +468 -0
  84. forge_nc-0.9.0/forge/ui/__init__.py +0 -0
  85. forge_nc-0.9.0/forge/ui/admin_panel.py +1452 -0
  86. forge_nc-0.9.0/forge/ui/charts.py +431 -0
  87. forge_nc-0.9.0/forge/ui/cortex_overlay.py +258 -0
  88. forge_nc-0.9.0/forge/ui/crucible_overlay.py +190 -0
  89. forge_nc-0.9.0/forge/ui/dashboard.py +4351 -0
  90. forge_nc-0.9.0/forge/ui/docs_window.py +1971 -0
  91. forge_nc-0.9.0/forge/ui/effects.py +1273 -0
  92. forge_nc-0.9.0/forge/ui/gen_icon.py +47 -0
  93. forge_nc-0.9.0/forge/ui/gui_terminal.py +1098 -0
  94. forge_nc-0.9.0/forge/ui/model_manager.py +1713 -0
  95. forge_nc-0.9.0/forge/ui/puppet_manager.py +975 -0
  96. forge_nc-0.9.0/forge/ui/settings_dialog.py +1494 -0
  97. forge_nc-0.9.0/forge/ui/terminal.py +752 -0
  98. forge_nc-0.9.0/forge/ui/terminal_io.py +539 -0
  99. forge_nc-0.9.0/forge/ui/test_runner.py +1175 -0
  100. forge_nc-0.9.0/forge/ui/themes.py +798 -0
  101. forge_nc-0.9.0/forge/ui/window_geo.py +85 -0
  102. forge_nc-0.9.0/forge/xp.py +710 -0
  103. forge_nc-0.9.0/forge_nc.egg-info/PKG-INFO +272 -0
  104. forge_nc-0.9.0/forge_nc.egg-info/SOURCES.txt +164 -0
  105. forge_nc-0.9.0/forge_nc.egg-info/dependency_links.txt +1 -0
  106. forge_nc-0.9.0/forge_nc.egg-info/entry_points.txt +2 -0
  107. forge_nc-0.9.0/forge_nc.egg-info/requires.txt +20 -0
  108. forge_nc-0.9.0/forge_nc.egg-info/top_level.txt +1 -0
  109. forge_nc-0.9.0/pyproject.toml +67 -0
  110. forge_nc-0.9.0/setup.cfg +4 -0
  111. forge_nc-0.9.0/tests/test_ami.py +776 -0
  112. forge_nc-0.9.0/tests/test_audit.py +328 -0
  113. forge_nc-0.9.0/tests/test_audit_api.py +263 -0
  114. forge_nc-0.9.0/tests/test_audit_fixes_round3.py +96 -0
  115. forge_nc-0.9.0/tests/test_autoforge.py +243 -0
  116. forge_nc-0.9.0/tests/test_autoforge_init.py +111 -0
  117. forge_nc-0.9.0/tests/test_benchmark.py +327 -0
  118. forge_nc-0.9.0/tests/test_benchmark_bridge.py +279 -0
  119. forge_nc-0.9.0/tests/test_billing.py +196 -0
  120. forge_nc-0.9.0/tests/test_billing_early_returns.py +46 -0
  121. forge_nc-0.9.0/tests/test_bug_reporter.py +707 -0
  122. forge_nc-0.9.0/tests/test_charts.py +197 -0
  123. forge_nc-0.9.0/tests/test_commands.py +147 -0
  124. forge_nc-0.9.0/tests/test_config.py +389 -0
  125. forge_nc-0.9.0/tests/test_context.py +559 -0
  126. forge_nc-0.9.0/tests/test_context_importance.py +164 -0
  127. forge_nc-0.9.0/tests/test_continuity.py +305 -0
  128. forge_nc-0.9.0/tests/test_continuity_benchmark.py +437 -0
  129. forge_nc-0.9.0/tests/test_crucible.py +569 -0
  130. forge_nc-0.9.0/tests/test_crucible_metrics.py +302 -0
  131. forge_nc-0.9.0/tests/test_crucible_redteam.py +410 -0
  132. forge_nc-0.9.0/tests/test_dedup.py +252 -0
  133. forge_nc-0.9.0/tests/test_digest.py +300 -0
  134. forge_nc-0.9.0/tests/test_event_bus.py +265 -0
  135. forge_nc-0.9.0/tests/test_file_cache.py +346 -0
  136. forge_nc-0.9.0/tests/test_filesystem.py +98 -0
  137. forge_nc-0.9.0/tests/test_forensics.py +343 -0
  138. forge_nc-0.9.0/tests/test_genome_depth.py +323 -0
  139. forge_nc-0.9.0/tests/test_housekeeping.py +89 -0
  140. forge_nc-0.9.0/tests/test_index_chunking.py +223 -0
  141. forge_nc-0.9.0/tests/test_memory.py +310 -0
  142. forge_nc-0.9.0/tests/test_multi_backend.py +234 -0
  143. forge_nc-0.9.0/tests/test_output_scanner.py +116 -0
  144. forge_nc-0.9.0/tests/test_passport.py +405 -0
  145. forge_nc-0.9.0/tests/test_passport_api.py +281 -0
  146. forge_nc-0.9.0/tests/test_pii_patterns.py +121 -0
  147. forge_nc-0.9.0/tests/test_plan_mode_cleanup.py +79 -0
  148. forge_nc-0.9.0/tests/test_plan_verifier.py +353 -0
  149. forge_nc-0.9.0/tests/test_planner.py +256 -0
  150. forge_nc-0.9.0/tests/test_plugin_events.py +332 -0
  151. forge_nc-0.9.0/tests/test_plugin_thread_safety.py +141 -0
  152. forge_nc-0.9.0/tests/test_provenance_chain.py +79 -0
  153. forge_nc-0.9.0/tests/test_puppet.py +541 -0
  154. forge_nc-0.9.0/tests/test_quality.py +206 -0
  155. forge_nc-0.9.0/tests/test_rag_scanner.py +111 -0
  156. forge_nc-0.9.0/tests/test_rate_limiter.py +100 -0
  157. forge_nc-0.9.0/tests/test_reliability.py +318 -0
  158. forge_nc-0.9.0/tests/test_reliability_extended.py +105 -0
  159. forge_nc-0.9.0/tests/test_router.py +298 -0
  160. forge_nc-0.9.0/tests/test_safety.py +402 -0
  161. forge_nc-0.9.0/tests/test_sha512_upgrade.py +73 -0
  162. forge_nc-0.9.0/tests/test_shipwright.py +406 -0
  163. forge_nc-0.9.0/tests/test_stats.py +315 -0
  164. forge_nc-0.9.0/tests/test_threat_intel.py +947 -0
  165. forge_nc-0.9.0/tests/test_tool_fencing.py +80 -0
  166. forge_nc-0.9.0/tests/test_tool_registry.py +160 -0
forge_nc-0.9.0/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2026 Forge Contributors. All rights reserved.
2
+
3
+ PROPRIETARY SOFTWARE LICENSE
4
+
5
+ This software and associated documentation files (the "Software") are
6
+ proprietary and confidential. Unauthorized copying, distribution,
7
+ modification, public display, or public performance of the Software,
8
+ via any medium, is strictly prohibited.
9
+
10
+ The Software is provided to authorized testers and collaborators only,
11
+ under the following conditions:
12
+
13
+ 1. You may not redistribute, sublicense, or share the Software with
14
+ any third party without prior written permission.
15
+
16
+ 2. You may not reverse engineer, decompile, or disassemble the Software.
17
+
18
+ 3. You may not use the Software for commercial purposes without a
19
+ separate commercial license agreement.
20
+
21
+ 4. The Software is provided "AS IS", without warranty of any kind,
22
+ express or implied, including but not limited to the warranties of
23
+ merchantability, fitness for a particular purpose, and noninfringement.
24
+
25
+ 5. In no event shall the authors or copyright holders be liable for any
26
+ claim, damages, or other liability arising from the use of the Software.
27
+
28
+ For licensing inquiries, contact the project maintainers.
@@ -0,0 +1,272 @@
1
+ Metadata-Version: 2.4
2
+ Name: forge-nc
3
+ Version: 0.9.0
4
+ Summary: Local-first AI coding assistant with adversarial model testing, transparent context management, and cryptographic audit trails
5
+ Author: Forge-NC
6
+ License: Proprietary
7
+ Project-URL: Homepage, https://forge-nc.dev
8
+ Project-URL: Documentation, https://forge-nc.dev/docs.php
9
+ Project-URL: Repository, https://github.com/Forge-NC/Forge
10
+ Project-URL: Issues, https://github.com/Forge-NC/Forge/issues
11
+ Keywords: ai,coding-assistant,local-llm,ollama,security,ai-testing,ai-assurance
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Environment :: GPU
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: Other/Proprietary License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Software Development
23
+ Classifier: Topic :: Security
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: requests>=2.28
28
+ Requires-Dist: numpy>=1.24
29
+ Requires-Dist: Pillow>=9.0
30
+ Requires-Dist: customtkinter>=5.2
31
+ Requires-Dist: tiktoken>=0.7
32
+ Requires-Dist: pyreadline3>=3.4; sys_platform == "win32"
33
+ Requires-Dist: cryptography>=41.0
34
+ Provides-Extra: voice
35
+ Requires-Dist: faster-whisper>=1.0; extra == "voice"
36
+ Requires-Dist: sounddevice>=0.4; extra == "voice"
37
+ Requires-Dist: pynput>=1.7; extra == "voice"
38
+ Requires-Dist: edge-tts>=6.0; extra == "voice"
39
+ Requires-Dist: soundfile>=0.12; extra == "voice"
40
+ Requires-Dist: pyttsx3>=2.90; extra == "voice"
41
+ Provides-Extra: yaml
42
+ Requires-Dist: pyyaml>=6.0; extra == "yaml"
43
+ Dynamic: license-file
44
+
45
+ <p align="center">
46
+ <img src="https://forge-nc.dev/assets/brain.webp" alt="Forge" width="128">
47
+ </p>
48
+
49
+ <h1 align="center">Forge</h1>
50
+
51
+ <p align="center">
52
+ <strong>AI you can verify, not just trust.</strong>
53
+ </p>
54
+
55
+ <p align="center">
56
+ <a href="https://forge-nc.dev">Website</a> &middot;
57
+ <a href="https://forge-nc.dev/docs.php">Documentation</a> &middot;
58
+ <a href="https://forge-nc.dev/matrix.php">The Matrix</a> &middot;
59
+ <a href="#quick-start">Quick Start</a>
60
+ </p>
61
+
62
+ ---
63
+
64
+ AI tools help you write code. But none of them tell you whether the model you're trusting with your codebase is actually safe, reliable, or honest. You're supposed to just... trust it.
65
+
66
+ Forge is a local AI coding assistant that also audits the AI it runs. Write code with any Ollama model. Then stress-test that model across safety, reliability, adversarial resistance, data exfiltration, context integrity, and more. Get a cryptographically signed report of exactly what happened. Every session is logged, every tool call is recorded, every context decision is visible.
67
+
68
+ **The [Forge Matrix™](https://forge-nc.dev/matrix.php) aggregates test results from every user into a crowdsourced model intelligence map -- like Rotten Tomatoes, but for AI models.** See which models hold up under pressure, which ones collapse, and where the gaps are across the entire open-source ecosystem. Users run the tests. The data speaks for itself.
69
+
70
+ Everything runs on your hardware. Nothing leaves your machine unless you opt in.
71
+
72
+ ```
73
+ git clone https://github.com/Forge-NC/Forge.git
74
+ cd Forge && python install.py
75
+ ```
76
+
77
+ 79,000+ lines of Python. 1,318 tests. 60 commands. Zero telemetry by default.
78
+
79
+ ## The Coding Assistant
80
+
81
+ Download Forge, pick a model, start coding. Every user gets:
82
+
83
+ - **Tool use** -- Forge gives the model hands. File read/write/edit, git operations, web requests, tree-sitter AST navigation across 8+ languages, codebase indexing with semantic search, and a digest engine for whole-project analysis.
84
+ - **Context window management** -- most AI tools silently compact or drop context when the window fills up. Forge partitions context into priority tiers, scores each entry by importance, and evicts deterministically so you always know what the model can see and what it can't. Every eviction is logged. A real-time continuity grade (A-F) monitors 6 quality signals after every swap and triggers automatic recovery -- re-reading critical files and re-injecting decisions -- when quality degrades. Nothing is silently lost.
85
+ - **Multi-model routing** -- route simple tasks to a small fast model (3B) and complex tasks to your primary model (14B-70B). Saves tokens without sacrificing quality where it matters. Forge auto-detects your GPU and recommends the best fit.
86
+ - **Plan mode** -- break complex tasks into steps with test/lint verification gates between each one. The model executes, Forge verifies.
87
+ - **Episodic memory** -- long-term recall with embeddings that persists across sessions. Forge remembers what you worked on, what decisions were made, and what the model learned about your project.
88
+ - **Billing ledger** -- token-level cost accounting with per-turn tracking. Compare your local costs against cloud providers with `/compare`.
89
+ - **Voice input** -- push-to-talk or voice-activated dictation via faster-whisper.
90
+ - **14 visual themes** -- midnight, obsidian, dracula, nord, monokai, cyberpunk, matrix, amber, phosphor, arctic, sunset, od_green, plasma, solarized_dark. Hot-swap with `/theme`.
91
+ - **Plugin system** -- 17 hooks for extending Forge behavior. Drop a `.py` file in `~/.forge/plugins/` and it loads automatically.
92
+ - **Neural Cortex GUI** -- full dashboard with brain animation, performance cards, HUD menu, model manager, settings dialog, and visual effects engine. Or use the console terminal if you prefer.
93
+
94
+ ## The Auditing Platform
95
+
96
+ Opt in to Forge's testing and assurance infrastructure and you get a full AI auditing toolkit:
97
+
98
+ ### `/break` -- Adversarial Stress Testing
99
+
100
+ Run your model through structured adversarial scenarios and get a scored report. Categories tested:
101
+
102
+ | Category | What It Tests |
103
+ |----------|---------------|
104
+ | **Safety** | Harm refusal, jailbreak resistance, social engineering, unsafe code generation |
105
+ | **Reliability** | Instruction following, output consistency, edge case handling, long-context coherence |
106
+ | **Adversarial** | Prompt injection, role hijacking, context manipulation, multi-turn attacks |
107
+ | **Tool Misuse** | Hallucinated tool calls, unauthorized file access, command injection attempts |
108
+ | **Exfiltration** | Data leakage, credential extraction, side-channel attempts |
109
+ | **Context Integrity** | Memory poisoning, instruction persistence, context window manipulation |
110
+ | **Data Residency** | Cross-session data bleed, PII retention, workspace isolation |
111
+ | **Audit Integrity** | Log tampering resistance, forensic record completeness |
112
+
113
+ Each scenario runs the model through a probe, evaluates the response, and scores it. Results feed into a stability profile that blends assurance scores with behavioral fingerprint data.
114
+
115
+ ### `/assure` -- Signed Assurance Reports
116
+
117
+ Generate a cryptographically signed report of your model's assurance run. Reports are:
118
+ - **Signed with Ed25519** using the machine's private key (generated on first run, hardware-bound)
119
+ - **Tamper-evident** -- any modification invalidates the signature
120
+ - **Uploadable** -- share results to a verification endpoint where third parties can validate the signature and review scores
121
+ - **Stored locally** as JSON + human-readable Markdown in `~/.forge/assurance/`
122
+
123
+ ### `/export` -- Governance Audit Bundles
124
+
125
+ Export a complete session as a zip bundle for compliance review:
126
+ - `manifest.json` with SHA-512 file hashes, machine fingerprint, hardware profile
127
+ - `audit.json` with full structured session data
128
+ - `logs/tool_calls.jsonl`, `logs/threats.jsonl`, `logs/journal.jsonl`
129
+ - `verification/results.json` with plan verification outcomes
130
+ - Provenance chain integrity verification
131
+ - Optional redaction mode that strips sensitive content while preserving metadata
132
+
133
+ ### Proof of Inference
134
+
135
+ Challenge-response protocol that cryptographically proves a model forward pass actually ran on local hardware. Server issues a probe prompt with a nonce; Forge runs it through the model, classifies the response, hashes it with the nonce, and signs the payload. Prevents spoofing and establishes that inference genuinely occurred.
136
+
137
+ ### Behavioral Fingerprinting
138
+
139
+ Builds a unique behavioral profile for each model instance by running standardized probes and measuring response characteristics. Used to detect model swaps, quantization changes, or fine-tuning drift between sessions.
140
+
141
+ ### Fleet Telemetry (Opt-In)
142
+
143
+ For teams running Forge across multiple machines:
144
+ - Per-machine profiles with hardware fingerprints, scenario history, pass rates
145
+ - Server-side adaptive test manifests that learn which scenarios are flaky on which hardware
146
+ - Fleet health dashboard with cross-machine analytics
147
+ - SLA alerting when fleet pass rate drops below threshold
148
+
149
+ ## Forge Crucible™ Security Pipeline
150
+
151
+ 9 layers spanning the full request lifecycle:
152
+
153
+ | # | Layer | Function |
154
+ |---|-------|----------|
155
+ | 1 | **Pattern Scanner** | Regex detection of prompt injection signatures, shell metacharacters, LOLBins, zero-width unicode, encoded payloads |
156
+ | 2 | **Semantic Anomaly** | AI-generated responses scanned before reaching user or disk; RAG context validated for injection and poisoning |
157
+ | 3 | **Behavioral Tripwire** | Timing anomalies, call frequency spikes, abnormal request pattern throttling |
158
+ | 4 | **Canary Trap** | Honeypot canary integrity — planted tokens detect context exfiltration |
159
+ | 5 | **Threat Intelligence** | Updatable signature database with SHA-512 validation and version monotonicity |
160
+ | 6 | **Command Guard** | Dangerous command detection, LOLBin blocking, shell metacharacter filtering |
161
+ | 7 | **Path Sandbox** | Filesystem sandboxing with 4-tier safety guard |
162
+ | 8 | **Plan Verifier** | Multi-step plan validation with test/lint gates |
163
+ | 9 | **Forensic Auditor** | Full audit trail with severity classification and forensic context |
164
+
165
+ All threats logged with severity and full forensic context. The Crucible™ scanner (layers 1-4) runs in under 50 ms per check.
166
+
167
+ ## Quick Start
168
+
169
+ ```bash
170
+ git clone https://github.com/Forge-NC/Forge.git
171
+ cd Forge
172
+ python install.py # Creates venv, installs deps, creates desktop shortcut
173
+ .venv/Scripts/forge # Windows
174
+ .venv/bin/forge # Linux / macOS
175
+ ```
176
+
177
+ On first launch Forge creates `~/.forge/`, connects to your local Ollama instance, and offers to pull a model.
178
+
179
+ ## System Requirements
180
+
181
+ | Component | Minimum | Recommended | Optimal |
182
+ |-----------|---------|-------------|---------|
183
+ | **GPU** | 4-8 GB VRAM (GTX 1650 / RTX 3060) | 16-24 GB (RTX 4070 Ti / 5070 Ti / 4090 / 5090) | 48 GB+ (dual GPU / A6000 / workstation) |
184
+ | **RAM** | 8 GB | 32 GB | 64-128 GB |
185
+ | **Storage** | 10 GB | 50 GB | 200 GB+ |
186
+ | **CPU** | Any modern 4-core | 8+ cores | 16+ cores |
187
+ | **OS** | Windows 10/11, Linux (Ubuntu 20.04+), macOS 12+ |||
188
+
189
+ Larger models produce better results but need more VRAM:
190
+
191
+ | Parameters | VRAM (Q4) | Quality | Use Case |
192
+ |------------|-----------|---------|----------|
193
+ | 3B | ~2.5 GB | Good | Router model, fast classification |
194
+ | 7B | ~5 GB | Strong | General coding, 8 GB GPU sweet spot |
195
+ | 14B | ~10 GB | Excellent | Complex reasoning, refactoring |
196
+ | 32B | ~20 GB | Best | Architecture design, hard problems |
197
+ | 70B | ~48 GB | Frontier | Maximum quality, multi-GPU setups |
198
+
199
+ Forge auto-detects your GPU and recommends the best model via `/hardware`.
200
+
201
+ ## Launch Modes
202
+
203
+ | Command | Description |
204
+ |---------|-------------|
205
+ | `forge` | Console terminal |
206
+ | `forge --fnc` | Neural Cortex GUI with dashboard, brain animation, HUD menu |
207
+ | `forge --gui-terminal` | GUI terminal with visual effects |
208
+
209
+ ## Commands
210
+
211
+ 60 commands. Run `/help` in-session for the full list.
212
+
213
+ | Category | Commands |
214
+ |----------|----------|
215
+ | **Session** | `/save`, `/load`, `/clear`, `/reset`, `/quit` |
216
+ | **Context** | `/context`, `/pin`, `/unpin`, `/drop` |
217
+ | **Models** | `/model`, `/models`, `/router`, `/ami` |
218
+ | **Development** | `/tools`, `/cd`, `/scan`, `/digest`, `/index`, `/search`, `/tasks`, `/plan`, `/dedup` |
219
+ | **Memory** | `/memory`, `/journal`, `/recall` |
220
+ | **Billing** | `/billing`, `/compare`, `/topup` |
221
+ | **Safety** | `/safety`, `/crucible`, `/forensics`, `/provenance`, `/threats` |
222
+ | **Continuity** | `/continuity` |
223
+ | **Reliability** | `/break`, `/autopsy`, `/stress`, `/assure` |
224
+ | **Audit** | `/export`, `/benchmark`, `/stats`, `/report` |
225
+ | **Release** | `/ship`, `/autocommit`, `/license` |
226
+ | **Fleet** | `/puppet`, `/admin` |
227
+ | **UI** | `/theme`, `/dashboard`, `/docs`, `/voice`, `/plugins`, `/synapse` |
228
+ | **Config** | `/config`, `/hardware`, `/cache` |
229
+ | **Updates** | `/update` |
230
+
231
+ ## Configuration
232
+
233
+ 99 configuration keys. Edit `~/.forge/config.yaml` or use `/config` in-session.
234
+
235
+ ```yaml
236
+ default_model: "qwen2.5-coder:14b"
237
+ small_model: "qwen2.5-coder:3b"
238
+ router_enabled: true
239
+ safety_level: 1 # 0=unleashed, 1=smart_guard, 2=confirm_writes, 3=locked_down
240
+ sandbox_enabled: true
241
+ swap_threshold_pct: 85
242
+ theme: "midnight"
243
+ telemetry_enabled: false # opt-in only
244
+ ```
245
+
246
+ ## Nightly Testing
247
+
248
+ Automated fleet-wide testing with adaptive scheduling:
249
+
250
+ - 13 integration scenarios (endurance, model swap, context storm, plugin chaos, crash recovery, malicious repo, and more)
251
+ - 8 invariants checked after every scenario
252
+ - Auto-bisect to pinpoint regressions
253
+ - Cross-platform scheduling via Settings
254
+
255
+ ## Testing
256
+
257
+ ```bash
258
+ pytest tests/ -v --timeout=300 # 1,318 unit tests
259
+ pytest tests/integration/ -v --timeout=600 # Stub mode (no Ollama)
260
+ pytest tests/integration/ -v --live --timeout=600 # Live mode (requires Ollama)
261
+ python scripts/run_live_stress.py --live --full -n 1 # Full stress suite
262
+ ```
263
+
264
+ ## License
265
+
266
+ Proprietary. All rights reserved. See [LICENSE](LICENSE) for details.
267
+
268
+ ---
269
+
270
+ <p align="center">
271
+ <a href="https://forge-nc.dev">forge-nc.dev</a>
272
+ </p>
@@ -0,0 +1,228 @@
1
+ <p align="center">
2
+ <img src="https://forge-nc.dev/assets/brain.webp" alt="Forge" width="128">
3
+ </p>
4
+
5
+ <h1 align="center">Forge</h1>
6
+
7
+ <p align="center">
8
+ <strong>AI you can verify, not just trust.</strong>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://forge-nc.dev">Website</a> &middot;
13
+ <a href="https://forge-nc.dev/docs.php">Documentation</a> &middot;
14
+ <a href="https://forge-nc.dev/matrix.php">The Matrix</a> &middot;
15
+ <a href="#quick-start">Quick Start</a>
16
+ </p>
17
+
18
+ ---
19
+
20
+ AI tools help you write code. But none of them tell you whether the model you're trusting with your codebase is actually safe, reliable, or honest. You're supposed to just... trust it.
21
+
22
+ Forge is a local AI coding assistant that also audits the AI it runs. Write code with any Ollama model. Then stress-test that model across safety, reliability, adversarial resistance, data exfiltration, context integrity, and more. Get a cryptographically signed report of exactly what happened. Every session is logged, every tool call is recorded, every context decision is visible.
23
+
24
+ **The [Forge Matrix™](https://forge-nc.dev/matrix.php) aggregates test results from every user into a crowdsourced model intelligence map -- like Rotten Tomatoes, but for AI models.** See which models hold up under pressure, which ones collapse, and where the gaps are across the entire open-source ecosystem. Users run the tests. The data speaks for itself.
25
+
26
+ Everything runs on your hardware. Nothing leaves your machine unless you opt in.
27
+
28
+ ```
29
+ git clone https://github.com/Forge-NC/Forge.git
30
+ cd Forge && python install.py
31
+ ```
32
+
33
+ 79,000+ lines of Python. 1,318 tests. 60 commands. Zero telemetry by default.
34
+
35
+ ## The Coding Assistant
36
+
37
+ Download Forge, pick a model, start coding. Every user gets:
38
+
39
+ - **Tool use** -- Forge gives the model hands. File read/write/edit, git operations, web requests, tree-sitter AST navigation across 8+ languages, codebase indexing with semantic search, and a digest engine for whole-project analysis.
40
+ - **Context window management** -- most AI tools silently compact or drop context when the window fills up. Forge partitions context into priority tiers, scores each entry by importance, and evicts deterministically so you always know what the model can see and what it can't. Every eviction is logged. A real-time continuity grade (A-F) monitors 6 quality signals after every swap and triggers automatic recovery -- re-reading critical files and re-injecting decisions -- when quality degrades. Nothing is silently lost.
41
+ - **Multi-model routing** -- route simple tasks to a small fast model (3B) and complex tasks to your primary model (14B-70B). Saves tokens without sacrificing quality where it matters. Forge auto-detects your GPU and recommends the best fit.
42
+ - **Plan mode** -- break complex tasks into steps with test/lint verification gates between each one. The model executes, Forge verifies.
43
+ - **Episodic memory** -- long-term recall with embeddings that persists across sessions. Forge remembers what you worked on, what decisions were made, and what the model learned about your project.
44
+ - **Billing ledger** -- token-level cost accounting with per-turn tracking. Compare your local costs against cloud providers with `/compare`.
45
+ - **Voice input** -- push-to-talk or voice-activated dictation via faster-whisper.
46
+ - **14 visual themes** -- midnight, obsidian, dracula, nord, monokai, cyberpunk, matrix, amber, phosphor, arctic, sunset, od_green, plasma, solarized_dark. Hot-swap with `/theme`.
47
+ - **Plugin system** -- 17 hooks for extending Forge behavior. Drop a `.py` file in `~/.forge/plugins/` and it loads automatically.
48
+ - **Neural Cortex GUI** -- full dashboard with brain animation, performance cards, HUD menu, model manager, settings dialog, and visual effects engine. Or use the console terminal if you prefer.
49
+
50
+ ## The Auditing Platform
51
+
52
+ Opt in to Forge's testing and assurance infrastructure and you get a full AI auditing toolkit:
53
+
54
+ ### `/break` -- Adversarial Stress Testing
55
+
56
+ Run your model through structured adversarial scenarios and get a scored report. Categories tested:
57
+
58
+ | Category | What It Tests |
59
+ |----------|---------------|
60
+ | **Safety** | Harm refusal, jailbreak resistance, social engineering, unsafe code generation |
61
+ | **Reliability** | Instruction following, output consistency, edge case handling, long-context coherence |
62
+ | **Adversarial** | Prompt injection, role hijacking, context manipulation, multi-turn attacks |
63
+ | **Tool Misuse** | Hallucinated tool calls, unauthorized file access, command injection attempts |
64
+ | **Exfiltration** | Data leakage, credential extraction, side-channel attempts |
65
+ | **Context Integrity** | Memory poisoning, instruction persistence, context window manipulation |
66
+ | **Data Residency** | Cross-session data bleed, PII retention, workspace isolation |
67
+ | **Audit Integrity** | Log tampering resistance, forensic record completeness |
68
+
69
+ Each scenario runs the model through a probe, evaluates the response, and scores it. Results feed into a stability profile that blends assurance scores with behavioral fingerprint data.
70
+
71
+ ### `/assure` -- Signed Assurance Reports
72
+
73
+ Generate a cryptographically signed report of your model's assurance run. Reports are:
74
+ - **Signed with Ed25519** using the machine's private key (generated on first run, hardware-bound)
75
+ - **Tamper-evident** -- any modification invalidates the signature
76
+ - **Uploadable** -- share results to a verification endpoint where third parties can validate the signature and review scores
77
+ - **Stored locally** as JSON + human-readable Markdown in `~/.forge/assurance/`
78
+
79
+ ### `/export` -- Governance Audit Bundles
80
+
81
+ Export a complete session as a zip bundle for compliance review:
82
+ - `manifest.json` with SHA-512 file hashes, machine fingerprint, hardware profile
83
+ - `audit.json` with full structured session data
84
+ - `logs/tool_calls.jsonl`, `logs/threats.jsonl`, `logs/journal.jsonl`
85
+ - `verification/results.json` with plan verification outcomes
86
+ - Provenance chain integrity verification
87
+ - Optional redaction mode that strips sensitive content while preserving metadata
88
+
89
+ ### Proof of Inference
90
+
91
+ Challenge-response protocol that cryptographically proves a model forward pass actually ran on local hardware. Server issues a probe prompt with a nonce; Forge runs it through the model, classifies the response, hashes it with the nonce, and signs the payload. Prevents spoofing and establishes that inference genuinely occurred.
92
+
93
+ ### Behavioral Fingerprinting
94
+
95
+ Builds a unique behavioral profile for each model instance by running standardized probes and measuring response characteristics. Used to detect model swaps, quantization changes, or fine-tuning drift between sessions.
96
+
97
+ ### Fleet Telemetry (Opt-In)
98
+
99
+ For teams running Forge across multiple machines:
100
+ - Per-machine profiles with hardware fingerprints, scenario history, pass rates
101
+ - Server-side adaptive test manifests that learn which scenarios are flaky on which hardware
102
+ - Fleet health dashboard with cross-machine analytics
103
+ - SLA alerting when fleet pass rate drops below threshold
104
+
105
+ ## Forge Crucible™ Security Pipeline
106
+
107
+ 9 layers spanning the full request lifecycle:
108
+
109
+ | # | Layer | Function |
110
+ |---|-------|----------|
111
+ | 1 | **Pattern Scanner** | Regex detection of prompt injection signatures, shell metacharacters, LOLBins, zero-width unicode, encoded payloads |
112
+ | 2 | **Semantic Anomaly** | AI-generated responses scanned before reaching user or disk; RAG context validated for injection and poisoning |
113
+ | 3 | **Behavioral Tripwire** | Timing anomalies, call frequency spikes, abnormal request pattern throttling |
114
+ | 4 | **Canary Trap** | Honeypot canary integrity — planted tokens detect context exfiltration |
115
+ | 5 | **Threat Intelligence** | Updatable signature database with SHA-512 validation and version monotonicity |
116
+ | 6 | **Command Guard** | Dangerous command detection, LOLBin blocking, shell metacharacter filtering |
117
+ | 7 | **Path Sandbox** | Filesystem sandboxing with 4-tier safety guard |
118
+ | 8 | **Plan Verifier** | Multi-step plan validation with test/lint gates |
119
+ | 9 | **Forensic Auditor** | Full audit trail with severity classification and forensic context |
120
+
121
+ All threats logged with severity and full forensic context. The Crucible™ scanner (layers 1-4) runs in under 50 ms per check.
122
+
123
+ ## Quick Start
124
+
125
+ ```bash
126
+ git clone https://github.com/Forge-NC/Forge.git
127
+ cd Forge
128
+ python install.py # Creates venv, installs deps, creates desktop shortcut
129
+ .venv/Scripts/forge # Windows
130
+ .venv/bin/forge # Linux / macOS
131
+ ```
132
+
133
+ On first launch Forge creates `~/.forge/`, connects to your local Ollama instance, and offers to pull a model.
134
+
135
+ ## System Requirements
136
+
137
+ | Component | Minimum | Recommended | Optimal |
138
+ |-----------|---------|-------------|---------|
139
+ | **GPU** | 4-8 GB VRAM (GTX 1650 / RTX 3060) | 16-24 GB (RTX 4070 Ti / 5070 Ti / 4090 / 5090) | 48 GB+ (dual GPU / A6000 / workstation) |
140
+ | **RAM** | 8 GB | 32 GB | 64-128 GB |
141
+ | **Storage** | 10 GB | 50 GB | 200 GB+ |
142
+ | **CPU** | Any modern 4-core | 8+ cores | 16+ cores |
143
+ | **OS** | Windows 10/11, Linux (Ubuntu 20.04+), macOS 12+ |||
144
+
145
+ Larger models produce better results but need more VRAM:
146
+
147
+ | Parameters | VRAM (Q4) | Quality | Use Case |
148
+ |------------|-----------|---------|----------|
149
+ | 3B | ~2.5 GB | Good | Router model, fast classification |
150
+ | 7B | ~5 GB | Strong | General coding, 8 GB GPU sweet spot |
151
+ | 14B | ~10 GB | Excellent | Complex reasoning, refactoring |
152
+ | 32B | ~20 GB | Best | Architecture design, hard problems |
153
+ | 70B | ~48 GB | Frontier | Maximum quality, multi-GPU setups |
154
+
155
+ Forge auto-detects your GPU and recommends the best model via `/hardware`.
156
+
157
+ ## Launch Modes
158
+
159
+ | Command | Description |
160
+ |---------|-------------|
161
+ | `forge` | Console terminal |
162
+ | `forge --fnc` | Neural Cortex GUI with dashboard, brain animation, HUD menu |
163
+ | `forge --gui-terminal` | GUI terminal with visual effects |
164
+
165
+ ## Commands
166
+
167
+ 60 commands. Run `/help` in-session for the full list.
168
+
169
+ | Category | Commands |
170
+ |----------|----------|
171
+ | **Session** | `/save`, `/load`, `/clear`, `/reset`, `/quit` |
172
+ | **Context** | `/context`, `/pin`, `/unpin`, `/drop` |
173
+ | **Models** | `/model`, `/models`, `/router`, `/ami` |
174
+ | **Development** | `/tools`, `/cd`, `/scan`, `/digest`, `/index`, `/search`, `/tasks`, `/plan`, `/dedup` |
175
+ | **Memory** | `/memory`, `/journal`, `/recall` |
176
+ | **Billing** | `/billing`, `/compare`, `/topup` |
177
+ | **Safety** | `/safety`, `/crucible`, `/forensics`, `/provenance`, `/threats` |
178
+ | **Continuity** | `/continuity` |
179
+ | **Reliability** | `/break`, `/autopsy`, `/stress`, `/assure` |
180
+ | **Audit** | `/export`, `/benchmark`, `/stats`, `/report` |
181
+ | **Release** | `/ship`, `/autocommit`, `/license` |
182
+ | **Fleet** | `/puppet`, `/admin` |
183
+ | **UI** | `/theme`, `/dashboard`, `/docs`, `/voice`, `/plugins`, `/synapse` |
184
+ | **Config** | `/config`, `/hardware`, `/cache` |
185
+ | **Updates** | `/update` |
186
+
187
+ ## Configuration
188
+
189
+ 99 configuration keys. Edit `~/.forge/config.yaml` or use `/config` in-session.
190
+
191
+ ```yaml
192
+ default_model: "qwen2.5-coder:14b"
193
+ small_model: "qwen2.5-coder:3b"
194
+ router_enabled: true
195
+ safety_level: 1 # 0=unleashed, 1=smart_guard, 2=confirm_writes, 3=locked_down
196
+ sandbox_enabled: true
197
+ swap_threshold_pct: 85
198
+ theme: "midnight"
199
+ telemetry_enabled: false # opt-in only
200
+ ```
201
+
202
+ ## Nightly Testing
203
+
204
+ Automated fleet-wide testing with adaptive scheduling:
205
+
206
+ - 13 integration scenarios (endurance, model swap, context storm, plugin chaos, crash recovery, malicious repo, and more)
207
+ - 8 invariants checked after every scenario
208
+ - Auto-bisect to pinpoint regressions
209
+ - Cross-platform scheduling via Settings
210
+
211
+ ## Testing
212
+
213
+ ```bash
214
+ pytest tests/ -v --timeout=300 # 1,318 unit tests
215
+ pytest tests/integration/ -v --timeout=600 # Stub mode (no Ollama)
216
+ pytest tests/integration/ -v --live --timeout=600 # Live mode (requires Ollama)
217
+ python scripts/run_live_stress.py --live --full -n 1 # Full stress suite
218
+ ```
219
+
220
+ ## License
221
+
222
+ Proprietary. All rights reserved. See [LICENSE](LICENSE) for details.
223
+
224
+ ---
225
+
226
+ <p align="center">
227
+ <a href="https://forge-nc.dev">forge-nc.dev</a>
228
+ </p>
@@ -0,0 +1,2 @@
1
+ """Forge — Local AI coding assistant with transparent context management."""
2
+ __version__ = "0.9.0"