Skip to content

armgit / bla

Public Imported from GitHub
0

🛡️ BLA (Blind LLM Agents) — Adversarial defense shield that protects binaries, Electron apps, JS bundles, Python, and WebAssembly against AI reverse-engineering agents like REA. Poison -> Exhaust -> Hallucinate.

docs: record MCP/Skill 2.0 stage B in CHANGELOG and CLI/MCP index

qybaihe8edba7ac6fa6
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4b1861e..abc3f36 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
+- **MCP/Skill 2.0 stage B (CLI↔MCP parity):** `bla_lint_lanes` (same engine as `bla lint-lanes`); `in_place` on `bla_protect`/`bla_defend` (still gated by `confirm_overwrite`); `honey_source_maps` on `bla_protect`; `output_directory` on `bla_harden`; `bla_verify` honesty metadata (`self_seal_enabled`, `wasm_export_rename_applied`, `numeric_template_leak_known`) so soft-caps match protect-side facts.
+- **Skill format appendices:** `references/format-{javascript,wasm,python,android}.md`; skill guide v1.4 keeps a short decision tree and drops install-breaking `../../../docs` links (weave via `bla://directives/weave-decoy`). Setup/doctor install+hash the full bundle including appendices.
- **Agent write safety (MCP/Skill 2.0, stage A):** read-only `bla_discover`; `bla_harden` `dry_run` (CLI `harden --dry-run`) writes zero bytes and reports `truncated` / `wouldOverwrite`; `bla_harden` / `bla_defend` / `bla_protect` refuse to overwrite existing outputs without `confirm_overwrite: true` and return a `writeReceipt`.
- **Full skill bundle install:** `bla setup` installs `SKILL.md` plus `references/` (counter-rea-matrix); `bla doctor` reports `skillMissingFiles` / `skillModifiedFiles` and fails on an incomplete bundle; uninstall removes owned bundle files.
- **Self-seal (#40.5):** opt-in CLI `--self-seal` / MCP `self_seal` / `.blarc selfSeal` injects Node sibling-module + env-fingerprint integrity binding into JS AST shield and entangles the opaque-predicate seed.
diff --git a/docs/cli-and-mcp.md b/docs/cli-and-mcp.md
index 76b2ddb..3f9a998 100644
--- a/docs/cli-and-mcp.md
+++ b/docs/cli-and-mcp.md
@@ -20,16 +20,16 @@ For coding agents, the **[`blind-llm-agents` skill](../.agents/skills/blind-llm-
## MCP Tools (`bla` Server)
-- `bla_harden`: Preferred one-sentence harden of a project directory (`directory`, `intensity`, `emit_manifest` default false, `llm_directives` default false, `weave_decoys` default false, `seed`, `dry_run` default false, `max_artifacts` default 64, `confirm_overwrite` default false). The report carries `dryRun`, `truncated`, `maxArtifacts` and `wouldOverwrite`.
+- `bla_harden`: Preferred one-sentence harden of a project directory (`directory`, `intensity`, `emit_manifest` default false, `llm_directives` default false, `weave_decoys` default false, `self_seal` default false, `wasm_preserve_exports`, `seed`, `dry_run` default false, `max_artifacts` default 64, `confirm_overwrite` default false, `output_directory` optional). The report carries `dryRun`, `truncated`, `maxArtifacts`, `wouldOverwrite`, and `outputDirectory`.
- `bla_discover`: Read-only inventory using the same discovery as `bla_harden` (`directory`, `max_artifacts`) → `{ directory, artifacts[{path, relativePath, format}], truncated, maxArtifacts }`. Writes nothing.
-- `bla_defend`: Full Counter-REA pipeline on a known path (`input_path`, `output_path`, `intensity`, `emit_manifest` default false, `llm_directives` default false, `weave_decoys` default false, `seed`, `confirm_overwrite` default false).
+- `bla_defend`: Full Counter-REA pipeline on a known path (`input_path`, `output_path`, `intensity`, `emit_manifest` default false, `llm_directives` default false, `weave_decoys` default false, `self_seal` default false, `wasm_preserve_exports`, `seed`, `in_place` default false, `confirm_overwrite` default false).
- `bla_audit`: Pre-flight REA exposure and token-economics audit (`path`).
-- `bla_protect`: Granular shield injection (`input_path`, `output_path`, `intensity`, `seed`, `llm_directives` default false, `weave_decoys` default false, `confirm_overwrite` default false).
-- `bla_doctor`: also reports `skillMissingFiles` / `skillModifiedFiles` per client; a missing bundle file (e.g. `references/counter-rea-matrix.md`) fails the client.
-- `bla_verify`: Counter-REA invariant verification (`target_path`, `original_path`).
+- `bla_protect`: Granular shield injection (`input_path`, `output_path`, `intensity`, `seed`, `llm_directives` default false, `weave_decoys` default false, `self_seal` default false, `wasm_preserve_exports`, `in_place` default false, `honey_source_maps` default true, `confirm_overwrite` default false).
+- `bla_verify`: Counter-REA invariant verification (`target_path`, `original_path`, optional honesty metadata `self_seal_enabled` / `wasm_export_rename_applied` / `numeric_template_leak_known` so `defenseScore` soft-caps match what protect actually ran).
+- `bla_lint_lanes`: Read-only lane-independence footgun lint (`path`) — same engine as CLI `bla lint-lanes`.
- `bla_benchmark`: Runs the 8-target showcase benchmark suite.
- `bla_emit_headers`: Generates C/C++, Rust, or Go defense headers (`language`, `intensity`).
-- `bla_doctor`: Diagnostics for BLA engines and agent client registrations.
+- `bla_doctor`: Diagnostics for BLA engines and agent client registrations; also reports `skillMissingFiles` / `skillModifiedFiles` (format appendices under `references/` included).
- `bla_weave_plan`: Read-only weave-decoy planner (`path`, optional `max_targets`) → `bla-weave-plan/v1` JSON (defensive theory checklist; no crack/RE).
### Write safety (dry-run, confirmation, receipts)
@@ -37,7 +37,8 @@ For coding agents, the **[`blind-llm-agents` skill](../.agents/skills/blind-llm-
- `bla_harden` with `dry_run: true` (CLI `bla harden . --dry-run`) discovers targets and plans outputs with **zero bytes written** (no `.bla-hardened/`, no summary, no `.blarc` seed).
- Discovery is capped (`max_artifacts`, default 64); when more targets exist the result sets `truncated: true` instead of silently dropping them.
- `bla_harden` / `bla_defend` / `bla_protect` refuse to overwrite an existing output file unless `confirm_overwrite: true`. A refusal is `isError: true` with `{ status: "confirmation_required", wouldOverwrite: [...], wrote: [] }`; nothing is written.
-- Successful `bla_defend` / `bla_protect` calls add `writeReceipt: { status: "written", wrote, overwrote, confirmed }`. In-place overwrite of the input stays CLI-only (`--in-place`).
+- Successful `bla_defend` / `bla_protect` calls add `writeReceipt: { status: "written", wrote, overwrote, confirmed }`.
+- `in_place: true` (MCP) / `--in-place` (CLI) plans the output as the input path; because that path already exists, `confirm_overwrite: true` is required on MCP or the call is refused with `confirmation_required`.
`weave_decoys: true` activates structural Python customer-def weave (shared-slot touch + opaque-false decoy calls) after the #51 tarpit; when false, Python stays warm-init-only. JS AST weave remains always-on.
@@ -46,7 +47,7 @@ Project config parity: set `"weaveDecoys": true` in `.blarc` / `bla.config.json`
Opt-in **self-seal** (issue #40.5): CLI `--self-seal`, MCP `self_seal`, `.blarc` `"selfSeal": true`. Injects a Node self-integrity preamble (module + optional sibling paths + env fingerprint) and folds the digest into the opaque-predicate seed for JS/Node targets.
WASM public ABI preserve list (issue #40.3): CLI `--wasm-preserve-exports a,b`, MCP `wasm_preserve_exports`, `.blarc` `"wasmPreserveExports": ["a","b"]`. Kept names stay; internal-looking exports may still rename at maximum/bankrupt.
-Heuristic **lane-independence lint** (issue #40.1): `bla lint-lanes <file>` warns when gate code looks like independent per-lane checks. Defensive guidance only — prefer whole-key chained mixing.
+Heuristic **lane-independence lint** (issue #40.1): CLI `bla lint-lanes <file>` and MCP `bla_lint_lanes` warn when gate code looks like independent per-lane checks. Defensive guidance only — prefer whole-key chained mixing.
### MCP Resources