diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d1dc9ebf4..487a3e8fa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,7 @@ --- +# mainbrain/ is a vendored tree (WORDLIB + OKComputer swarm) with its own +# tooling and test suite; host lint/format/type hooks must not touch it. +exclude: ^mainbrain/ repos: - repo: https://github.com/mpalmer/action-validator rev: 7fa61514fb806fc9afd664b909e83584aca84f78 # v0.7.0 diff --git a/mainbrain/.gitignore b/mainbrain/.gitignore new file mode 100644 index 000000000..46b63203b --- /dev/null +++ b/mainbrain/.gitignore @@ -0,0 +1,4 @@ +# Counter unanchored patterns from the repo root .gitignore that would +# swallow real source in the vendored apps (api/lib, src/lib in the swarm). +!**/lib/ +!**/lib/** diff --git a/mainbrain/README.md b/mainbrain/README.md new file mode 100644 index 000000000..384c82106 --- /dev/null +++ b/mainbrain/README.md @@ -0,0 +1,118 @@ +# MAINBRAIN — Unified Best-of-Both Build + +Assembled 2026-07-17 from two uploaded packages: + +- `Babafile.zip` → `CONVERSATION_HANDOFF_MASTERZIP_v1` (conversation handoff: docs, baseline trees, the OKComputer swarm app) +- `OMEGA_MEGAKERNEL_PACKAGE.zip` → the evolved WORDLIB tree (semantic core + docking protocol era) + +This directory is the merge of the strongest parts of both, with duplicates +eliminated by provenance analysis rather than guesswork. + +## Layout + +```text +mainbrain/ + wordlib/ The OMEGA Megakernel WORDLIB tree (canonical, newest in hand). + Offline-first AI workstation: launcher brain, ETHER AI Flask hub, + 12-agent swarm, 5-layer reasoning stack, atomic self-evolution + with rollback, deployment stage engine, docking/spec protocol, + CNS deploy proof gates, 23 test modules. + okcomputer-swarm/ OKComputer Swarm Integrated (from Babafile). React/TypeScript/ + tRPC/Drizzle shell: OpenAI Agents SDK planner-worker-validator- + synthesizer, Claude as adversarial critic, Hugging Face + Transformers.js local embeddings, Supabase control plane. + ether-runtime/ Pure-stdlib durable task runtime — offline reconstruction of + the missing EtherAI Absorption v11 artifact (top-5 #4): SQLite + WAL journal + transactional outbox, consumer-group stream with + idle reclaim, deterministic jittered retries, allowlisted task + types, at-least-once with terminal-state dedup. 24 tests. + handoff/ The conversation-handoff record: start-here docs, the three + runtime/memory design conversations, MASTERZIP v11 domain spec, + and integrity manifests of the original bundle. + TOP5.md The top-5 conversations/models/code, presented in detail. +``` + +## De-duplication decisions (what was NOT copied, and why) + +1. **`WORDLIB_v29_BASELINE` (Babafile) — dropped.** A full recursive diff against + the OMEGA tree showed zero unique files: every baseline file exists in OMEGA, + and all 8 differing files are strictly newer/larger in OMEGA (e.g. + `deploy_check.py` 319 → 1,442 lines with the CNS proof-gate work). The only + baseline-unique content was `__pycache__` bytecode. +2. **`90_ORIGINAL_UPLOADS` — dropped.** Retained in the original zip for rollback; + every member is superseded by a canonical working tree or a handoff doc here. +3. **`40_DATABASE_AND_PROVIDER_STATE` — dropped.** All four files are + byte-identical to copies shipped inside `okcomputer-swarm/` (verified with + `cmp`). The operative copies live with the app. +4. **Runtime state excluded by the tree's own `.gitignore`**: 245 self-editor + `.bak` snapshots, event/genome/memory JSON, logs. These are machine-specific + and regenerated; the self-healer recreates missing directories on boot. + +## How the two worlds fit (adapter-first federation) + +Per `handoff/00_START_HERE/MERGE_AND_EXECUTION_PLAN.md`: OKComputer is the +connected orchestration shell; WORDLIB is the offline reasoning/memory/proof +foundation. They federate through adapters and evidence gates — not by pasting +one tree into the other. + +```text +User / UI + -> okcomputer-swarm (connected shell) + -> OpenAI Agents SDK: planner, workers, validator, synthesizer + -> Claude: adversarial critic (server-side key only) + -> Transformers.js: local semantic routing (mxbai-embed-xsmall-v1) + -> Supabase: control.swarm_runs / swarm_events / swarm_checkpoints + -> wordlib (offline brain) + -> ETHER AI hub (Flask, :5757) + RAG + -> 12-agent swarm, reasoning guards, uncertainty quantifier + -> EvolutionManager: atomic multi-file self-edit with verified rollback + -> docking/: spec protocol, patch payloads, CNS deploy proof gates +``` + +Swarm state machine (both worlds observe it): +`INTAKE -> PLAN -> ROUTE -> EXECUTE -> CRITIQUE -> VALIDATE -> PERSIST -> COMPLETE | FAILED` + +## Quickstarts + +**wordlib** (offline brain; Windows-first, Linux parity): + +```text +START_HERE.bat one-time polished auto-install (8 stages) +RUN_ME.bat daily driver menu +python tests/run_tests.py test suite without pytest +``` + +**okcomputer-swarm** (connected shell; needs Node + server-side keys): + +```bash +cd okcomputer-swarm +cp .env.example .env # keys go in the server environment only, never committed +npm install && npm run verify:integration && npm run dev +``` + +## Safety rules carried over (non-negotiable) + +- Never expose provider keys to browser code, logs, prompts, or this repo. +- Never merge WORDLIB self-editing into active execution without the gate order: + `SPEC-CRYPTOGRAPHIC_BINDING -> SPEC-DEPLOY_PROOF_GATE -> + SPEC-TESTED_PATCH_EXECUTION_SANDBOX -> human approval`. +- MASTERZIP v11 stays **VAL-0 / specification state**: audit it into implemented + code / placeholders / unsupported claims / evidence-required before any + physical or commercial claim. +- GremlinAgent stays propose-only (Theater Mode); GuardianAgent veto stands. + +## The frontier beyond this snapshot + +Connector sweep on 2026-07-17 found the ecosystem has release *receipts* newer +than any code in hand — the artifacts themselves stayed in chat handoffs: + +- **v30 Mainbrain** release receipt (Drive) — 103/103 tests, Codex Masterfile hashes. +- **v31 MARM + Filesystem MCP** (Notion) — 118/118 tests, sidecar architecture. +- **v32 Memory Integrity** (Drive doc + Linear project `WORDLIB Memory Integrity + v32`) — 132/132 tests, Wolfram-verified retry/stability kernel, Black Vault + repair-first plan. Linear: MOH-17 done, MOH-16 in progress, MOH-18 todo, + MOH-19 blocked. + +This `mainbrain/` tree is therefore the newest **executable** consolidation; +the v30–v32 receipts document work whose code should be recovered from those +chat handoffs and layered on top, gate by gate. diff --git a/mainbrain/TOP5.md b/mainbrain/TOP5.md new file mode 100644 index 000000000..70ef4e2af --- /dev/null +++ b/mainbrain/TOP5.md @@ -0,0 +1,167 @@ +# The Top 5 Conversations, Models, and Code + +Ranked by executable weight and how much of the ecosystem depends on them. +Sources: the two uploaded packages, plus a live connector sweep (Google Drive, +Notion, Linear, Gmail) on 2026-07-17. + +--- + +## 1. WORDLIB → OMEGA Megakernel — the offline brain + +**Code (in hand):** `mainbrain/wordlib/` — the single largest, most evolved asset. + +**Conversation thread:** `wordlib/CLAUDE_BRIEFING.md` — a 1,200-line evolution +log, v1 through v29, written as a running handoff between Claude sessions. +It is the highest-signal conversation in either package. + +What the code actually contains, all verified-real per its own honesty log: + +- `launcher.py` — the one brain: venv, services, hub, menu, one-hit install. +- `src/ether_core.py` — EtherCore blob brain; `EvolutionManager.evolve_files()` + gives **atomic multi-file self-modification** with validate → snapshot → + deploy → test → verified rollback (a real rollback bug was caught by the + test suite and fixed at v13.8). +- `src/agents/` — ClawOrchestrator + 12 agents (Architect, Code, Test, Deploy, + Guardian veto, Researcher, Reasoning, Math, Absorption, Gremlin propose-only, + Market, EvolutionArchitect). +- `src/reasoning/` — 5-layer honest reasoning stack: output-quality guard, + sympy math validator, ast code reasoner, structured-output repair+cache, + Wilson/Brier/ECE uncertainty quantifier, plus quantum-*inspired* (classical, + honestly labeled) optimizer and an Ollama LLM-as-judge. +- `src/deployment/` — stage engine: idempotent, resumable, retry w/ backoff, + rollback, self-repair; absorption scanner + environment intelligence. +- `docking/` + `core/contracts/` + `deploy_check.py` (1,442 lines) — the + spec/docking protocol with CNS deploy proof gates (see #3). +- `tests/` — 23 modules, pytest-free runner for USB deployment. +- Three WCAG 2.2 AA UIs: `/panel`, `/console` (reasoning-transparent), + `/nephilim` (living orbital UI) — all guarded by tests that fail on any + phantom endpoint. + +**Models (local, confirmed tags):** `dolphin-2.9-mistral-7b` Q4_K_M (primary), +`dolphin3:8b-llama3.1-q4_K_M` (creative), `qwen2.5-coder:7b-instruct-q4_K_M` +(code), `Meta-Llama-3-8B-Instruct` Q4_K_M (classroom-safe), +`nomic-embed-text` (RAG embeddings). + +--- + +## 2. OKComputer Swarm Integrated — the connected orchestration shell + +**Code (in hand):** `mainbrain/okcomputer-swarm/` — React 18 + TypeScript + +tRPC + Drizzle + Vite, with the swarm runtime under `api/ai/`. + +**Conversation thread:** `handoff/00_START_HERE/HIGH_SIGNAL_CONVERSATION_RECORD.md` +— the consolidation conversation that fused MASTERZIP domain knowledge with +the swarm shell and made five architectural decisions: + +1. **OpenAI Agents SDK is primary** — planner, specialist workers, validator, + synthesizer (`api/ai/openai-swarm.ts`, `execute-swarm.ts`). +2. **Claude is the adversarial critic**, never primary authority + (`api/ai/claude-critic.ts`), output routed back into validation. +3. **Hugging Face is local-first** — Transformers.js semantic router with + `mixedbread-ai/mxbai-embed-xsmall-v1`, remote loading disabled + (`api/ai/hf-local-router.ts`). +4. **Supabase is the control plane, not bulk storage** — + `control.swarm_runs` / `swarm_events` / `swarm_checkpoints` behind RLS with + service-role-only RPCs (`SUPABASE_SWARM_CONTROL_MIGRATION.sql`, applied and + smoke-tested live during the conversation). +5. **Canva is a documentation surface only** (4 operator-guide candidates). + +The state machine (`api/ai/state-machine.ts` + its test): +`INTAKE → PLAN → ROUTE → EXECUTE → CRITIQUE → VALIDATE → PERSIST → COMPLETE | FAILED`. +Security corrections from the conversation: simulated provider outputs removed +as an execution path, credentials server-side only, auth + ownership required +on all run reads/writes. + +--- + +## 3. Semantic Core + Docking Protocol — spec-driven self-improvement with proof gates + +**Conversation thread:** `handoff/30_RUNTIME_AND_MEMORY_DESIGNS/WORDLIB semantic +core update.txt` — the fork-B decision ordering the gate chain: +`SPEC-CRYPTOGRAPHIC_BINDING` (done) → `SPEC-DEPLOY_PROOF_GATE` (ordered) → +`SPEC-TESTED_PATCH_EXECUTION_SANDBOX` (next wound to close). + +**Code (in hand, inside `mainbrain/wordlib/`):** this conversation was +*implemented* in the OMEGA tree — the clearest proof OMEGA supersedes the +Babafile baseline: + +- `docking/` — spec registry, lifecycle, validator, auditor, patch applier, + failure memory, side letters, improvement pipeline. +- `core/contracts/docking/` — typed contracts: SpecDocument, PatchPayload, + ImprovementProposal/Record, FailureRecord, ChangeTrace, SideLetter. +- `deploy_check.py` grew 319 → 1,442 lines: deploy-time CNS proof-gate checks + (`canonical_patch_digest()` determinism, digest-mismatch rejection, no + whitelist/approval bypass, `--json` mode, non-zero exit on gate failure). +- Tests: `test_docking_protocol.py`, `test_patch_payload.py`, + `test_sideletter_protocol.py`, `test_closed_loop_improvement.py`, etc. + +**Models thread:** `Consider best setup.txt` — the upgrade recommendation: +one ~32B-class reasoning brain (Qwen3.5-32B quantized) + a 7–9B fast router, +and a hybrid **LanceDB (vectors) + FalkorDB/Neo4j (graph/ontology)** semantic +core instead of a plain vector DB. + +--- + +## 4. EtherAI Absorption System v11 — the durable task runtime (design in hand, artifact missing) + +**Conversation thread:** `handoff/30_RUNTIME_AND_MEMORY_DESIGNS/EtherAI +Absorption System.txt` — a complete production design record: + +- Redis Streams consumer-group dispatch, `XREADGROUP` + `XAUTOCLAIM` crash + recovery, SQLite WAL transactional task **outbox**, worker leases, + dead-letter records, health-gated Compose startup. +- Honest **at-least-once** delivery claim (not exactly-once), duplicate window + controlled by stable task_id + leases + terminal-state dedup. +- Wolfram-verified retry policy: delays 1/2/4/8/16s, deterministic ±20% jitter + from `SHA-256(task_id + attempt)`, reclaim threshold 60s. +- Security correction: the proposed `/execute_verified` arbitrary-shell + endpoint was **removed**; only `absorb_text` and `verify_artifact` remain. + +**Status:** the v11 starter zip/wheel referenced by the record is **not present +in any package** (`handoff/00_START_HERE/MISSING_ARTIFACTS.md`). + +**Rebuilt:** `mainbrain/ether-runtime/` now implements the v11 durability model +from this record — pure stdlib, fully offline: SQLite WAL journal + +transactional outbox, consumer-group stream with 60s idle reclaim, execution +leases, the exact 1/2/4/8/16s ±20% deterministic-jitter retry ladder, +dead-lettering, and only the two validated task types. 24 tests prove the +outbox atomicity, the at-least-once duplicate window, lease exclusion, and the +retry math. Redis/HTTP layers remain honest future adapters — see its README. + +--- + +## 5. MASTERZIP v11 / ALUM-BOO — the engineering domain spec (VAL-0) + +**Document (in hand):** `handoff/20_DOMAIN_SPECIFICATIONS/` — the combined +engineering handover PDF + extracted text: domain rules, blueprints, FMEA, +validation ladders, T1–T28 tool concepts, prototype scripts. + +**Standing order from the conversation record:** treat as **VAL-0 / +specification state**. The first real swarm request is the audit: + +> Audit MASTERZIP v11. Separate implemented code, placeholders, unsupported +> claims, and the exact evidence required before VAL-1. + +Physical validation ladder VAL-0 → VAL-9 (geometry → materials → control sim → +mock-up → powered tests → RF → operational cycles). The swarm may generate +analyses and test plans; it may not certify a build or sale. + +**Connector context:** Drive also holds `ALUMBOO_R17_MASTERFILE.md` (2026-07-15) +— the strategy pivot to the aluminum-glass cash-core (AGFS) with Class-A/Class-B +feedstock separation. Same doctrine: no structural claims without tests. + +--- + +## Beyond the zips: the live frontier (connector sweep, 2026-07-17) + +The newest *receipts* found in connectors — code for these stayed in chat +handoffs and should be recovered next: + +| Version | Where found | Evidence | +| --- | --- | --- | +| v30 Mainbrain release | Drive doc + Notion pages | 103/103 tests, artifact SHA-256 list, deployer SKILL.md | +| v31 MARM + Filesystem MCP | Notion cockpit + evidence pages | 118/118 tests, dual-STDIO sidecar architecture | +| v32 Memory Integrity | Drive doc + Linear project | 132/132 tests, Wolfram stability kernel, Black Vault repair-first plan; MOH-17 ✅, MOH-16 🔄, MOH-18 ⏳, MOH-19 ⛔ | + +The `mainbrain/` tree in this repo is the newest **executable** consolidation +of everything above. diff --git a/mainbrain/ether-runtime/README.md b/mainbrain/ether-runtime/README.md new file mode 100644 index 000000000..c94cf734c --- /dev/null +++ b/mainbrain/ether-runtime/README.md @@ -0,0 +1,59 @@ +# ether-runtime — durable task runtime (pure stdlib, offline) + +Reconstruction of the missing **EtherAI Absorption System v11** artifact — +top-5 item #4. The original v11 starter zip/wheel referenced by the design +record (`../handoff/30_RUNTIME_AND_MEMORY_DESIGNS/EtherAI Absorption +System.txt`) was never present in any package; this implements its durability +model from that record, with zero third-party dependencies, so it runs and +tests fully offline. + +## What it implements from the v11 record + +| v11 design element | Here | +| --- | --- | +| SQLite WAL task journaling | `store.py` — WAL journal, terminal status authoritative | +| Transactional task outbox | submit = task + outbox row in ONE transaction | +| Outbox claim leases | publishers claim rows under a lease; no double publish | +| Consumer groups (`XREADGROUP`) | `read_group()` — pending-entries list per group | +| Crash recovery (`XAUTOCLAIM`) | `autoclaim()` — transfers entries idle ≥ 60s | +| Worker execution leases | one runner per task; expiry frees crashed work | +| Retry ladder 1/2/4/8/16s | `retry.py`, nominal total 31s < 60s reclaim | +| Deterministic ±20% jitter | derived from `SHA-256(task_id + attempt)` | +| Dead-letter records | `dead_lettered` status after max attempts | +| At-least-once, not exactly-once | duplicate window controlled by stable task ids, task uniqueness, leases, terminal-state dedup (tested) | +| Only validated task types | `absorb_text`, `verify_artifact`; unknown kinds rejected at submit — no arbitrary-execution endpoint, same boundary the v11 review enforced | + +## Usage + +```bash +python -m ether_runtime submit-absorb --source NOTE --text "durable text" +python -m ether_runtime submit-verify --file rel/path.bin= +python -m ether_runtime work # drain once +python -m ether_runtime status # journal counts + retry policy +python -m ether_runtime doctor # findings with exact fixes +``` + +Run the tests (stdlib + pytest only): + +```bash +cd mainbrain/ether-runtime && python -m pytest -q +``` + +## Honest divergences from v11 + +- **No Redis / no Docker / no FastAPI here.** The stream + pending-entries + tables are a single-node, in-database stand-in for Redis Streams with the + same claim/ack/reclaim semantics. A Redis adapter can implement the same + operations later without touching worker logic; an HTTP gateway is a thin + layer over `TaskRuntime.submit()` when a connected deployment needs one. +- **Single-node coordination.** SQLite is not distributed consensus — same + limit the v11 record states for its own SQLite authority. +- The Wolfram-verified numbers (31s nominal retry total vs 60s reclaim) are + re-derived at startup by `retry.validate_policy()`, which raises if the + invariant is ever broken by edit. + +## Integration path (merge plan Phase 3) + +Swarm planner → bounded task envelope (`submit`) → durable outbox → stream → +worker lease → result/evidence record (`result` on the journal row) → swarm +validator. Allowlisted task types only. diff --git a/mainbrain/ether-runtime/ether_runtime/__init__.py b/mainbrain/ether-runtime/ether_runtime/__init__.py new file mode 100644 index 000000000..9204ca1a2 --- /dev/null +++ b/mainbrain/ether-runtime/ether_runtime/__init__.py @@ -0,0 +1,37 @@ +"""ether_runtime -- pure-stdlib durable task runtime. + +Offline reconstruction of the missing EtherAI Absorption System v11 artifact +(design record: mainbrain/handoff/30_RUNTIME_AND_MEMORY_DESIGNS/). SQLite WAL +journal + transactional outbox + consumer-group stream with idle reclaim, +deterministic jittered retries, allowlisted task types, at-least-once +delivery with terminal-state dedup. See README.md for honest limits. +""" + +from .retry import ( + DEFAULT_MAX_ATTEMPTS, + RECLAIM_IDLE_SECONDS, + RETRY_DELAYS, + jitter_factor, + retry_delay, + validate_policy, +) +from .runtime import GROUP, TaskRuntime, Worker +from .store import Task, TaskStore, stable_task_id +from .tasks import ALLOWED_KINDS, PayloadError + +__all__ = [ + "ALLOWED_KINDS", + "DEFAULT_MAX_ATTEMPTS", + "GROUP", + "PayloadError", + "RECLAIM_IDLE_SECONDS", + "RETRY_DELAYS", + "Task", + "TaskRuntime", + "TaskStore", + "Worker", + "jitter_factor", + "retry_delay", + "stable_task_id", + "validate_policy", +] diff --git a/mainbrain/ether-runtime/ether_runtime/__main__.py b/mainbrain/ether-runtime/ether_runtime/__main__.py new file mode 100644 index 000000000..eb53e2f31 --- /dev/null +++ b/mainbrain/ether-runtime/ether_runtime/__main__.py @@ -0,0 +1,3 @@ +from .cli import main + +raise SystemExit(main()) diff --git a/mainbrain/ether-runtime/ether_runtime/cli.py b/mainbrain/ether-runtime/ether_runtime/cli.py new file mode 100644 index 000000000..506c8ad98 --- /dev/null +++ b/mainbrain/ether-runtime/ether_runtime/cli.py @@ -0,0 +1,114 @@ +"""Command-line entry point. + + python -m ether_runtime submit-absorb --source NOTE --text "..." + python -m ether_runtime submit-verify --file rel/path=sha256hex [...] + python -m ether_runtime work [--loop SECONDS] + python -m ether_runtime status + python -m ether_runtime doctor +""" + +from __future__ import annotations + +import argparse +import json +import sys +import time +from pathlib import Path + +from . import retry +from .runtime import TaskRuntime, Worker + + +def _default_db() -> str: + return str(Path.cwd() / "data" / "ether_runtime.db") + + +def build_parser() -> argparse.ArgumentParser: + parser = argparse.ArgumentParser(prog="ether_runtime") + parser.add_argument("--db", default=_default_db(), help="SQLite database path") + parser.add_argument("--artifact-root", default=None, help="root for verify_artifact") + sub = parser.add_subparsers(dest="command", required=True) + + absorb = sub.add_parser("submit-absorb", help="journal an absorb_text task") + absorb.add_argument("--source", required=True) + absorb.add_argument("--text", required=True) + + verify = sub.add_parser("submit-verify", help="journal a verify_artifact task") + verify.add_argument( + "--file", + action="append", + required=True, + metavar="REL_PATH=SHA256", + help="repeatable manifest entry", + ) + + work = sub.add_parser("work", help="run the worker") + work.add_argument("--loop", type=float, default=None, metavar="SECONDS", + help="poll interval; omit for a single drain pass") + + sub.add_parser("status", help="journal counts + retry policy") + sub.add_parser("doctor", help="diagnose runtime state with exact fixes") + return parser + + +def _doctor(runtime: TaskRuntime) -> int: + counts = runtime.store.counts() + problems: list[str] = [] + if counts["outbox_backlog"] > 0: + problems.append( + f"outbox backlog of {counts['outbox_backlog']}:" + " no publisher is running -> run 'work'" + ) + dead = counts["tasks_by_status"].get("dead_lettered", 0) + if dead: + problems.append( + f"{dead} dead-lettered task(s): inspect with 'status', fix the" + " underlying payload/artifact, and resubmit" + ) + if counts["pending_entries"] > 0 and counts["active_leases"] == 0: + problems.append( + f"{counts['pending_entries']} pending entries with no active lease:" + " a consumer likely crashed -> next 'work' pass reclaims after" + f" {retry.RECLAIM_IDLE_SECONDS:.0f}s idle" + ) + for line in problems or ["healthy: no findings"]: + print(f"[{'WARN' if problems else 'OK'}] {line}") + return 1 if problems else 0 + + +def main(argv: list[str] | None = None) -> int: + args = build_parser().parse_args(argv) + runtime = TaskRuntime(args.db, artifact_root=args.artifact_root) + try: + if args.command == "submit-absorb": + task, created = runtime.submit( + "absorb_text", {"source": args.source, "text": args.text} + ) + print(json.dumps({"task_id": task.task_id, "created": created})) + elif args.command == "submit-verify": + files = {} + for spec in args.file: + rel, _, digest = spec.partition("=") + files[rel] = digest + task, created = runtime.submit("verify_artifact", {"files": files}) + print(json.dumps({"task_id": task.task_id, "created": created})) + elif args.command == "work": + worker = Worker(runtime) + if args.loop is None: + executed = worker.run_until_drained() + print(json.dumps({"executed": executed})) + else: + while True: # pragma: no cover - interactive loop + worker.run_once() + time.sleep(args.loop) + elif args.command == "status": + print(json.dumps(runtime.status(), indent=2, sort_keys=True)) + elif args.command == "doctor": + return _doctor(runtime) + return 0 + finally: + runtime.close() + + +if __name__ == "__main__": # pragma: no cover + sys.exit(main()) diff --git a/mainbrain/ether-runtime/ether_runtime/retry.py b/mainbrain/ether-runtime/ether_runtime/retry.py new file mode 100644 index 000000000..a03c78414 --- /dev/null +++ b/mainbrain/ether-runtime/ether_runtime/retry.py @@ -0,0 +1,67 @@ +"""Retry policy for the durable task runtime. + +Implements the verified policy from the EtherAI Absorption v11 design record: +nominal delays 1, 2, 4, 8, 16 seconds, deterministic +/-20% jitter derived +from SHA-256(task_id + attempt), and a stream reclaim threshold of 60 seconds +that strictly exceeds the total nominal retry delay (31 seconds), so a task +in its normal retry ladder is never stolen by reclaim. +""" + +from __future__ import annotations + +import hashlib + +RETRY_DELAYS: tuple[float, ...] = (1.0, 2.0, 4.0, 8.0, 16.0) +JITTER_FRACTION = 0.2 +RECLAIM_IDLE_SECONDS = 60.0 +MAX_TASK_TIMEOUT_SECONDS = 30.0 +DEFAULT_MAX_ATTEMPTS = len(RETRY_DELAYS) + 1 # first attempt + one per delay + + +def jitter_factor(task_id: str, attempt: int) -> float: + """Deterministic jitter in [1 - JITTER_FRACTION, 1 + JITTER_FRACTION]. + + Derived from SHA-256(task_id + attempt) so retries spread across tasks + while remaining reproducible and auditable. + """ + digest = hashlib.sha256(f"{task_id}:{attempt}".encode("utf-8")).digest() + unit = int.from_bytes(digest[:8], "big") / float(2**64 - 1) + return 1.0 - JITTER_FRACTION + (2.0 * JITTER_FRACTION * unit) + + +def retry_delay(task_id: str, attempt: int) -> float: + """Jittered delay before retry number `attempt` (1-based failed attempts). + + attempt=1 means the first attempt just failed -> first delay in the ladder. + Attempts beyond the ladder reuse the final delay (callers normally + dead-letter before that happens). + """ + if attempt < 1: + raise ValueError("attempt is 1-based; got %r" % attempt) + nominal = RETRY_DELAYS[min(attempt - 1, len(RETRY_DELAYS) - 1)] + return nominal * jitter_factor(task_id, attempt) + + +def validate_policy() -> dict: + """Re-derive the v11 constraint check; raises if the invariant breaks.""" + total_nominal = sum(RETRY_DELAYS) + max_jittered = max(RETRY_DELAYS) * (1.0 + JITTER_FRACTION) + ok = ( + total_nominal < RECLAIM_IDLE_SECONDS + and MAX_TASK_TIMEOUT_SECONDS < RECLAIM_IDLE_SECONDS + ) + if not ok: + raise AssertionError( + "retry policy invariant broken: nominal retry total %.1fs / task " + "timeout %.1fs must stay under reclaim threshold %.1fs" + % (total_nominal, MAX_TASK_TIMEOUT_SECONDS, RECLAIM_IDLE_SECONDS) + ) + return { + "nominal_delays": list(RETRY_DELAYS), + "total_nominal_delay": total_nominal, + "max_single_jittered_delay": max_jittered, + "jitter_fraction": JITTER_FRACTION, + "reclaim_idle_seconds": RECLAIM_IDLE_SECONDS, + "max_task_timeout_seconds": MAX_TASK_TIMEOUT_SECONDS, + "constraint_check": "passed", + } diff --git a/mainbrain/ether-runtime/ether_runtime/runtime.py b/mainbrain/ether-runtime/ether_runtime/runtime.py new file mode 100644 index 000000000..338f350bf --- /dev/null +++ b/mainbrain/ether-runtime/ether_runtime/runtime.py @@ -0,0 +1,144 @@ +"""TaskRuntime: the gateway-side facade, and Worker: the consumer loop. + +Flow (mirrors the v11 durability model): + + submit() -- SQLite task + outbox row in one transaction + -> publish_pending() -- publisher claims outbox rows -> stream + -> Worker.run_once() -- consumer-group read + idle-entry autoclaim + -> execution lease -- one runner per task, ever + -> handler -- allowlisted kinds only + -> completed / retry_wait (jittered delay) / dead_lettered + +SQLite terminal status is authoritative. Delivery is at-least-once; the +consumer skips (and acks) entries whose task is already terminal. +""" + +from __future__ import annotations + +import time +import uuid +from pathlib import Path + +from . import retry +from .store import TERMINAL_STATUSES, StreamEntry, Task, TaskStore +from .tasks import HANDLERS, PayloadError, validate_payload + +GROUP = "ether-workers" + + +class TaskRuntime: + def __init__(self, db_path: str | Path, artifact_root: str | Path | None = None): + self.store = TaskStore(db_path) + root = Path(artifact_root) if artifact_root else Path(db_path).parent / "artifacts" + root.mkdir(parents=True, exist_ok=True) + self.artifact_root = root + retry.validate_policy() + + def close(self) -> None: + self.store.close() + + # -- gateway side ------------------------------------------------------- + + def submit( + self, + kind: str, + payload: dict, + idempotency_key: str | None = None, + now: float | None = None, + ) -> tuple[Task, bool]: + """Validate then journal a task. Unknown kinds never enter the system.""" + validate_payload(kind, payload) + return self.store.submit( + kind, + payload, + idempotency_key=idempotency_key, + max_attempts=retry.DEFAULT_MAX_ATTEMPTS, + now=now, + ) + + def publish_pending( + self, publisher: str | None = None, now: float | None = None + ) -> int: + """Pump the outbox onto the stream; returns entries published.""" + publisher = publisher or f"pub-{uuid.uuid4().hex[:8]}" + published = 0 + for task_id in self.store.claim_outbox(publisher, now=now): + self.store.publish_claimed(task_id, now=now) + published += 1 + return published + + def status(self) -> dict: + return {"policy": retry.validate_policy(), **self.store.counts()} + + +class Worker: + def __init__(self, runtime: TaskRuntime, name: str | None = None): + self.runtime = runtime + self.store = runtime.store + self.name = name or f"worker-{uuid.uuid4().hex[:8]}" + + def run_once(self, now: float | None = None, batch: int = 8) -> list[dict]: + """One scheduling pass: pump outbox, reclaim idle work, execute.""" + now = time.time() if now is None else now + self.runtime.publish_pending(publisher=self.name, now=now) + entries = self.store.autoclaim( + GROUP, self.name, retry.RECLAIM_IDLE_SECONDS, now=now + ) + entries += self.store.read_group(GROUP, self.name, count=batch, now=now) + return [self.execute(entry, now=now) for entry in entries] + + def execute(self, entry: StreamEntry, now: float | None = None) -> dict: + now = time.time() if now is None else now + task = self.store.get_task(entry.task_id) + + # Terminal-state duplicate detection: the at-least-once window ends here. + if task.status in TERMINAL_STATUSES: + self.store.ack(entry.entry_id) + return {"task_id": task.task_id, "outcome": "duplicate_skipped"} + + lease_seconds = retry.MAX_TASK_TIMEOUT_SECONDS + 5.0 + if not self.store.acquire_lease(task.task_id, self.name, lease_seconds, now=now): + # Another live worker owns it; leave the entry pending for reclaim. + return {"task_id": task.task_id, "outcome": "lease_held"} + + attempt = self.store.mark_running(task.task_id, now=now) + try: + handler = HANDLERS[task.kind] + result = handler(self.store, task.payload, self.runtime.artifact_root) + except PayloadError as exc: + # Malformed-but-journaled work is not retriable; fail it fast. + self.store.mark_dead_lettered(task.task_id, f"payload: {exc}", now=now) + self.store.ack(entry.entry_id) + self.store.release_lease(task.task_id, self.name) + return {"task_id": task.task_id, "outcome": "dead_lettered", "attempt": attempt} + except Exception as exc: # noqa: BLE001 - task isolation boundary + self.store.ack(entry.entry_id) + if attempt >= task.max_attempts: + self.store.mark_dead_lettered(task.task_id, str(exc), now=now) + outcome = "dead_lettered" + else: + delay = retry.retry_delay(task.task_id, attempt) + self.store.mark_retry_wait(task.task_id, str(exc), delay, now=now) + outcome = "retry_wait" + self.store.release_lease(task.task_id, self.name) + return {"task_id": task.task_id, "outcome": outcome, "attempt": attempt} + + self.store.mark_completed(task.task_id, result, now=now) + self.store.ack(entry.entry_id) + self.store.release_lease(task.task_id, self.name) + return { + "task_id": task.task_id, + "outcome": "completed", + "attempt": attempt, + "result": result, + } + + def run_until_drained(self, now: float | None = None, max_passes: int = 100) -> int: + """Drive passes until no ready work remains; returns tasks executed.""" + executed = 0 + for _ in range(max_passes): + outcomes = self.run_once(now=now) + if not outcomes: + break + executed += sum(1 for o in outcomes if o["outcome"] != "lease_held") + return executed diff --git a/mainbrain/ether-runtime/ether_runtime/store.py b/mainbrain/ether-runtime/ether_runtime/store.py new file mode 100644 index 000000000..99cb0cbc1 --- /dev/null +++ b/mainbrain/ether-runtime/ether_runtime/store.py @@ -0,0 +1,422 @@ +"""SQLite WAL task journal, transactional outbox, and stream queue. + +Single-node durability core of the runtime. One database owns all state: + +- tasks -- the authoritative task journal (SQLite terminal status is + authoritative; the stream is delivery plumbing). +- outbox -- transactional outbox: a submit writes task + outbox row in ONE + transaction; a publisher claims outbox rows under a lease and + moves them onto the stream. +- stream -- append-only delivery queue (Redis Streams stand-in). Entries + carry not_before for delayed retry redelivery. +- pending -- per-group pending entries list (PEL analog): who was delivered + what, when, and how many times. +- leases -- per-task execution leases so two consumers never run the same + task concurrently. +- absorbed -- content-hashed store written by the absorb_text handler. + +Honest properties (mirrors the v11 design record): delivery is AT-LEAST-ONCE, +not exactly-once. A crash between stream append and outbox delete republishes +the task; the duplicate is controlled by stable task ids, task uniqueness, +execution leases, and terminal-state duplicate detection at the consumer. +""" + +from __future__ import annotations + +import hashlib +import json +import sqlite3 +import time +from dataclasses import dataclass +from pathlib import Path +from typing import Any, Iterator + +_SCHEMA = """ +CREATE TABLE IF NOT EXISTS tasks( + task_id TEXT PRIMARY KEY, + kind TEXT NOT NULL, + payload TEXT NOT NULL, + status TEXT NOT NULL, + attempts INTEGER NOT NULL DEFAULT 0, + max_attempts INTEGER NOT NULL, + created_at REAL NOT NULL, + updated_at REAL NOT NULL, + result TEXT, + error TEXT +); +CREATE TABLE IF NOT EXISTS outbox( + task_id TEXT PRIMARY KEY, + claimed_by TEXT, + claim_expires REAL, + created_at REAL NOT NULL +); +CREATE TABLE IF NOT EXISTS stream( + entry_id INTEGER PRIMARY KEY AUTOINCREMENT, + task_id TEXT NOT NULL, + not_before REAL NOT NULL DEFAULT 0, + added_at REAL NOT NULL +); +CREATE TABLE IF NOT EXISTS pending( + entry_id INTEGER PRIMARY KEY, + group_name TEXT NOT NULL, + consumer TEXT NOT NULL, + delivered_at REAL NOT NULL, + delivery_count INTEGER NOT NULL +); +CREATE TABLE IF NOT EXISTS leases( + task_id TEXT PRIMARY KEY, + worker TEXT NOT NULL, + expires REAL NOT NULL +); +CREATE TABLE IF NOT EXISTS absorbed( + content_hash TEXT PRIMARY KEY, + source TEXT NOT NULL, + text TEXT NOT NULL, + created_at REAL NOT NULL +); +""" + +TERMINAL_STATUSES = ("completed", "dead_lettered") + + +@dataclass(frozen=True) +class Task: + task_id: str + kind: str + payload: dict + status: str + attempts: int + max_attempts: int + result: Any = None + error: str | None = None + + +@dataclass(frozen=True) +class StreamEntry: + entry_id: int + task_id: str + delivery_count: int + + +def stable_task_id(kind: str, payload: dict, idempotency_key: str | None) -> str: + """Stable, reproducible task id from kind + canonical payload (+ key).""" + canonical = json.dumps(payload, sort_keys=True, separators=(",", ":")) + seed = f"{kind}\x00{canonical}\x00{idempotency_key or ''}" + return hashlib.sha256(seed.encode("utf-8")).hexdigest() + + +class TaskStore: + """All state transitions run through here; every method is atomic.""" + + def __init__(self, db_path: str | Path): + self.db_path = Path(db_path) + self.db_path.parent.mkdir(parents=True, exist_ok=True) + self._conn = sqlite3.connect(str(self.db_path)) + self._conn.row_factory = sqlite3.Row + self._conn.execute("PRAGMA journal_mode=WAL") + self._conn.execute("PRAGMA busy_timeout=5000") + with self._conn: + self._conn.executescript(_SCHEMA) + + def close(self) -> None: + self._conn.close() + + # -- journal + outbox --------------------------------------------------- + + def submit( + self, + kind: str, + payload: dict, + idempotency_key: str | None = None, + max_attempts: int = 6, + now: float | None = None, + ) -> tuple[Task, bool]: + """Insert task + outbox row in one transaction (idempotent). + + Returns (task, created). A duplicate submit returns the existing task + unchanged -- SQLite task uniqueness is the first dedup layer. + """ + now = time.time() if now is None else now + task_id = stable_task_id(kind, payload, idempotency_key) + with self._conn: + existing = self._conn.execute( + "SELECT * FROM tasks WHERE task_id = ?", (task_id,) + ).fetchone() + if existing is not None: + return self._task_from_row(existing), False + self._conn.execute( + "INSERT INTO tasks(task_id, kind, payload, status, attempts," + " max_attempts, created_at, updated_at)" + " VALUES(?,?,?,?,0,?,?,?)", + (task_id, kind, json.dumps(payload), "queued", max_attempts, now, now), + ) + self._conn.execute( + "INSERT INTO outbox(task_id, created_at) VALUES(?,?)", (task_id, now) + ) + return self.get_task(task_id), True + + def claim_outbox( + self, + publisher: str, + limit: int = 16, + lease_seconds: float = 30.0, + now: float | None = None, + ) -> list[str]: + """Claim unclaimed (or claim-expired) outbox rows for this publisher. + + Claim leases prevent two publishers from racing the same row. + """ + now = time.time() if now is None else now + with self._conn: + rows = self._conn.execute( + "SELECT task_id FROM outbox WHERE claimed_by IS NULL" + " OR claim_expires < ? ORDER BY created_at LIMIT ?", + (now, limit), + ).fetchall() + ids = [r["task_id"] for r in rows] + for task_id in ids: + self._conn.execute( + "UPDATE outbox SET claimed_by = ?, claim_expires = ?" + " WHERE task_id = ?", + (publisher, now + lease_seconds, task_id), + ) + return ids + + def publish_claimed(self, task_id: str, now: float | None = None) -> int: + """Move one claimed outbox row onto the stream. + + Split into two transactions ON PURPOSE: appending the stream entry and + deleting the outbox row are separate failure domains. A crash between + them republishes the task later -- the documented at-least-once window. + Tests exercise it via append_stream_entry() alone. + """ + now = time.time() if now is None else now + entry_id = self.append_stream_entry(task_id, now=now) + with self._conn: + self._conn.execute("DELETE FROM outbox WHERE task_id = ?", (task_id,)) + return entry_id + + def append_stream_entry( + self, task_id: str, not_before: float = 0.0, now: float | None = None + ) -> int: + now = time.time() if now is None else now + with self._conn: + cur = self._conn.execute( + "INSERT INTO stream(task_id, not_before, added_at) VALUES(?,?,?)", + (task_id, not_before, now), + ) + self._conn.execute( + "UPDATE tasks SET status = 'published', updated_at = ?" + " WHERE task_id = ? AND status = 'queued'", + (now, task_id), + ) + return int(cur.lastrowid) + + # -- consumer-group delivery ------------------------------------------- + + def read_group( + self, group: str, consumer: str, count: int = 8, now: float | None = None + ) -> list[StreamEntry]: + """Deliver ready, not-yet-pending entries to `consumer` (XREADGROUP).""" + now = time.time() if now is None else now + with self._conn: + rows = self._conn.execute( + "SELECT s.entry_id, s.task_id FROM stream s" + " LEFT JOIN pending p ON p.entry_id = s.entry_id" + " WHERE p.entry_id IS NULL AND s.not_before <= ?" + " ORDER BY s.entry_id LIMIT ?", + (now, count), + ).fetchall() + entries = [] + for r in rows: + self._conn.execute( + "INSERT INTO pending(entry_id, group_name, consumer," + " delivered_at, delivery_count) VALUES(?,?,?,?,1)", + (r["entry_id"], group, consumer, now), + ) + entries.append(StreamEntry(r["entry_id"], r["task_id"], 1)) + return entries + + def autoclaim( + self, + group: str, + consumer: str, + min_idle_seconds: float, + now: float | None = None, + ) -> list[StreamEntry]: + """Transfer pending entries idle beyond the threshold (XAUTOCLAIM). + + Recovers work abandoned by crashed consumers. + """ + now = time.time() if now is None else now + with self._conn: + rows = self._conn.execute( + "SELECT p.entry_id, s.task_id, p.delivery_count FROM pending p" + " JOIN stream s ON s.entry_id = p.entry_id" + " WHERE p.group_name = ? AND p.delivered_at <= ?" + " ORDER BY p.entry_id", + (group, now - min_idle_seconds), + ).fetchall() + entries = [] + for r in rows: + new_count = r["delivery_count"] + 1 + self._conn.execute( + "UPDATE pending SET consumer = ?, delivered_at = ?," + " delivery_count = ? WHERE entry_id = ?", + (consumer, now, new_count, r["entry_id"]), + ) + entries.append(StreamEntry(r["entry_id"], r["task_id"], new_count)) + return entries + + def ack(self, entry_id: int) -> None: + """Acknowledge after processing: entry leaves pending AND the stream.""" + with self._conn: + self._conn.execute("DELETE FROM pending WHERE entry_id = ?", (entry_id,)) + self._conn.execute("DELETE FROM stream WHERE entry_id = ?", (entry_id,)) + + # -- execution leases --------------------------------------------------- + + def acquire_lease( + self, task_id: str, worker: str, lease_seconds: float, now: float | None = None + ) -> bool: + now = time.time() if now is None else now + with self._conn: + row = self._conn.execute( + "SELECT worker, expires FROM leases WHERE task_id = ?", (task_id,) + ).fetchone() + if row is not None and row["expires"] > now and row["worker"] != worker: + return False + self._conn.execute( + "INSERT INTO leases(task_id, worker, expires) VALUES(?,?,?)" + " ON CONFLICT(task_id) DO UPDATE SET worker=excluded.worker," + " expires=excluded.expires", + (task_id, worker, now + lease_seconds), + ) + return True + + def release_lease(self, task_id: str, worker: str) -> None: + with self._conn: + self._conn.execute( + "DELETE FROM leases WHERE task_id = ? AND worker = ?", + (task_id, worker), + ) + + # -- task state transitions -------------------------------------------- + + def mark_running(self, task_id: str, now: float | None = None) -> int: + """Set running and bump attempts; returns the new attempt number.""" + now = time.time() if now is None else now + with self._conn: + self._conn.execute( + "UPDATE tasks SET status = 'running', attempts = attempts + 1," + " updated_at = ? WHERE task_id = ?", + (now, task_id), + ) + row = self._conn.execute( + "SELECT attempts FROM tasks WHERE task_id = ?", (task_id,) + ).fetchone() + return int(row["attempts"]) + + def mark_completed(self, task_id: str, result: Any, now: float | None = None) -> None: + now = time.time() if now is None else now + with self._conn: + self._conn.execute( + "UPDATE tasks SET status = 'completed', result = ?, error = NULL," + " updated_at = ? WHERE task_id = ?", + (json.dumps(result), now, task_id), + ) + + def mark_retry_wait( + self, task_id: str, error: str, delay_seconds: float, now: float | None = None + ) -> None: + """Record failure and re-enqueue with a delayed stream entry.""" + now = time.time() if now is None else now + with self._conn: + self._conn.execute( + "UPDATE tasks SET status = 'retry_wait', error = ?, updated_at = ?" + " WHERE task_id = ?", + (error, now, task_id), + ) + self._conn.execute( + "INSERT INTO stream(task_id, not_before, added_at) VALUES(?,?,?)", + (task_id, now + delay_seconds, now), + ) + + def mark_dead_lettered(self, task_id: str, error: str, now: float | None = None) -> None: + now = time.time() if now is None else now + with self._conn: + self._conn.execute( + "UPDATE tasks SET status = 'dead_lettered', error = ?, updated_at = ?" + " WHERE task_id = ?", + (error, now, task_id), + ) + + # -- absorption store --------------------------------------------------- + + def absorb(self, source: str, text: str, now: float | None = None) -> tuple[str, bool]: + """Content-hashed insert; duplicate content is a no-op (idempotent).""" + now = time.time() if now is None else now + content_hash = hashlib.sha256( + f"{source}\x00{text}".encode("utf-8") + ).hexdigest() + with self._conn: + existing = self._conn.execute( + "SELECT 1 FROM absorbed WHERE content_hash = ?", (content_hash,) + ).fetchone() + if existing is not None: + return content_hash, False + self._conn.execute( + "INSERT INTO absorbed(content_hash, source, text, created_at)" + " VALUES(?,?,?,?)", + (content_hash, source, text, now), + ) + return content_hash, True + + # -- introspection ------------------------------------------------------ + + def get_task(self, task_id: str) -> Task: + row = self._conn.execute( + "SELECT * FROM tasks WHERE task_id = ?", (task_id,) + ).fetchone() + if row is None: + raise KeyError(f"unknown task {task_id!r}") + return self._task_from_row(row) + + def counts(self) -> dict: + by_status = { + r["status"]: r["n"] + for r in self._conn.execute( + "SELECT status, COUNT(*) AS n FROM tasks GROUP BY status" + ) + } + scalar = lambda sql: self._conn.execute(sql).fetchone()[0] # noqa: E731 + return { + "tasks_by_status": by_status, + "outbox_backlog": scalar("SELECT COUNT(*) FROM outbox"), + "stream_depth": scalar("SELECT COUNT(*) FROM stream"), + "pending_entries": scalar("SELECT COUNT(*) FROM pending"), + "active_leases": scalar("SELECT COUNT(*) FROM leases"), + "absorbed_records": scalar("SELECT COUNT(*) FROM absorbed"), + } + + def iter_tasks(self, status: str | None = None) -> Iterator[Task]: + sql = "SELECT * FROM tasks" + args: tuple = () + if status is not None: + sql += " WHERE status = ?" + args = (status,) + for row in self._conn.execute(sql + " ORDER BY created_at", args): + yield self._task_from_row(row) + + @staticmethod + def _task_from_row(row: sqlite3.Row) -> Task: + return Task( + task_id=row["task_id"], + kind=row["kind"], + payload=json.loads(row["payload"]), + status=row["status"], + attempts=row["attempts"], + max_attempts=row["max_attempts"], + result=json.loads(row["result"]) if row["result"] else None, + error=row["error"], + ) diff --git a/mainbrain/ether-runtime/ether_runtime/tasks.py b/mainbrain/ether-runtime/ether_runtime/tasks.py new file mode 100644 index 000000000..b5cbbaf65 --- /dev/null +++ b/mainbrain/ether-runtime/ether_runtime/tasks.py @@ -0,0 +1,93 @@ +"""Allowlisted task handlers. + +The v11 record removed the proposed /execute_verified arbitrary-shell endpoint +as unsafe; this runtime keeps that boundary. Exactly two validated task types +exist, and unknown kinds are rejected at submit time -- there is no generic +execution path to smuggle work through. + +- absorb_text: store sourced text into the content-hashed absorption + store. A source is REQUIRED (anonymous evidence is + rejected, same rule as wordlib's MarketIntelAnalyst). +- verify_artifact: compute SHA-256 of files under a configured root and + compare against an expected manifest. Paths outside the + root are rejected (no traversal). +""" + +from __future__ import annotations + +import hashlib +from pathlib import Path + +from .store import TaskStore + + +class PayloadError(ValueError): + """Invalid payload for an allowlisted task type.""" + + +def _require_str(payload: dict, key: str) -> str: + value = payload.get(key) + if not isinstance(value, str) or not value.strip(): + raise PayloadError(f"payload field {key!r} must be a non-empty string") + return value + + +def validate_payload(kind: str, payload: dict) -> None: + """Validate at submit time so malformed work never enters the journal.""" + if kind == "absorb_text": + _require_str(payload, "source") + _require_str(payload, "text") + elif kind == "verify_artifact": + files = payload.get("files") + if not isinstance(files, dict) or not files: + raise PayloadError( + "payload field 'files' must be a non-empty mapping of" + " relative path -> expected sha256 hex" + ) + for rel, digest in files.items(): + if not isinstance(rel, str) or not rel.strip(): + raise PayloadError("manifest keys must be relative path strings") + if Path(rel).is_absolute() or ".." in Path(rel).parts: + raise PayloadError(f"manifest path {rel!r} escapes the artifact root") + if not isinstance(digest, str) or len(digest) != 64: + raise PayloadError(f"expected sha256 hex for {rel!r}") + else: + raise PayloadError(f"unknown task kind {kind!r}; allowlist: {sorted(ALLOWED_KINDS)}") + + +def run_absorb_text(store: TaskStore, payload: dict, artifact_root: Path) -> dict: + source = _require_str(payload, "source") + text = _require_str(payload, "text") + content_hash, created = store.absorb(source, text) + return {"content_hash": content_hash, "created": created, "source": source} + + +def run_verify_artifact(store: TaskStore, payload: dict, artifact_root: Path) -> dict: + root = artifact_root.resolve() + results: dict[str, dict] = {} + all_ok = True + for rel, expected in payload["files"].items(): + target = (root / rel).resolve() + if root not in target.parents and target != root: + raise PayloadError(f"path {rel!r} resolves outside the artifact root") + entry: dict = {"expected": expected.lower()} + if not target.is_file(): + entry.update(status="missing", actual=None) + all_ok = False + else: + actual = hashlib.sha256(target.read_bytes()).hexdigest() + entry["actual"] = actual + if actual == expected.lower(): + entry["status"] = "verified" + else: + entry["status"] = "mismatch" + all_ok = False + results[rel] = entry + return {"ok": all_ok, "files": results} + + +HANDLERS = { + "absorb_text": run_absorb_text, + "verify_artifact": run_verify_artifact, +} +ALLOWED_KINDS = frozenset(HANDLERS) diff --git a/mainbrain/ether-runtime/pytest.ini b/mainbrain/ether-runtime/pytest.ini new file mode 100644 index 000000000..414fb20c1 --- /dev/null +++ b/mainbrain/ether-runtime/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +addopts = +testpaths = tests diff --git a/mainbrain/ether-runtime/tests/conftest.py b/mainbrain/ether-runtime/tests/conftest.py new file mode 100644 index 000000000..6cc3204d9 --- /dev/null +++ b/mainbrain/ether-runtime/tests/conftest.py @@ -0,0 +1,20 @@ +import sys +from pathlib import Path + +import pytest + +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) + +from ether_runtime import TaskRuntime, Worker # noqa: E402 + + +@pytest.fixture() +def runtime(tmp_path): + rt = TaskRuntime(tmp_path / "runtime.db", artifact_root=tmp_path / "artifacts") + yield rt + rt.close() + + +@pytest.fixture() +def worker(runtime): + return Worker(runtime, name="w1") diff --git a/mainbrain/ether-runtime/tests/test_cli.py b/mainbrain/ether-runtime/tests/test_cli.py new file mode 100644 index 000000000..61fefb824 --- /dev/null +++ b/mainbrain/ether-runtime/tests/test_cli.py @@ -0,0 +1,28 @@ +"""CLI: submit -> work -> status -> doctor round trip.""" + +import json + +from ether_runtime.cli import main + + +def test_cli_round_trip(tmp_path, capsys): + db = str(tmp_path / "cli.db") + + assert main(["--db", db, "submit-absorb", "--source", "cli", "--text", "hello"]) == 0 + submitted = json.loads(capsys.readouterr().out) + assert submitted["created"] is True + + # Doctor sees the unpublished backlog before a worker runs. + assert main(["--db", db, "doctor"]) == 1 + assert "outbox backlog" in capsys.readouterr().out + + assert main(["--db", db, "work"]) == 0 + assert json.loads(capsys.readouterr().out)["executed"] == 1 + + assert main(["--db", db, "status"]) == 0 + status = json.loads(capsys.readouterr().out) + assert status["tasks_by_status"] == {"completed": 1} + assert status["policy"]["constraint_check"] == "passed" + + assert main(["--db", db, "doctor"]) == 0 + assert "healthy" in capsys.readouterr().out diff --git a/mainbrain/ether-runtime/tests/test_outbox_and_delivery.py b/mainbrain/ether-runtime/tests/test_outbox_and_delivery.py new file mode 100644 index 000000000..f817af1d4 --- /dev/null +++ b/mainbrain/ether-runtime/tests/test_outbox_and_delivery.py @@ -0,0 +1,118 @@ +"""Durability core: outbox atomicity, at-least-once window, leases, reclaim.""" + +import sqlite3 + +import pytest + +from ether_runtime import GROUP, PayloadError, Worker, stable_task_id +from ether_runtime.retry import RECLAIM_IDLE_SECONDS + +T0 = 1_000_000.0 + + +def _absorb_payload(n=0): + return {"source": "unit-test", "text": f"absorb me {n}"} + + +def test_submit_is_one_transaction_and_idempotent(runtime): + task, created = runtime.submit("absorb_text", _absorb_payload(), now=T0) + assert created and task.status == "queued" + counts = runtime.store.counts() + assert counts["outbox_backlog"] == 1 + + again, created_again = runtime.submit("absorb_text", _absorb_payload(), now=T0) + assert not created_again and again.task_id == task.task_id + assert runtime.store.counts()["outbox_backlog"] == 1, "no duplicate outbox row" + + +def test_unknown_kind_rejected_at_submit(runtime): + with pytest.raises(PayloadError): + runtime.submit("execute_verified", {"cmd": "rm -rf /"}) + + +def test_stable_task_id_changes_with_content(): + base = stable_task_id("absorb_text", {"a": 1}, None) + assert stable_task_id("absorb_text", {"a": 2}, None) != base + assert stable_task_id("verify_artifact", {"a": 1}, None) != base + assert stable_task_id("absorb_text", {"a": 1}, "key") != base + + +def test_publish_moves_outbox_to_stream(runtime): + runtime.submit("absorb_text", _absorb_payload(), now=T0) + published = runtime.publish_pending(publisher="p1", now=T0) + assert published == 1 + counts = runtime.store.counts() + assert counts["outbox_backlog"] == 0 + assert counts["stream_depth"] == 1 + + +def test_publisher_claim_lease_blocks_second_publisher(runtime): + runtime.submit("absorb_text", _absorb_payload(), now=T0) + first = runtime.store.claim_outbox("p1", now=T0) + second = runtime.store.claim_outbox("p2", now=T0) + assert len(first) == 1 and second == [], "claimed row must not be re-claimed" + # After the claim lease expires, another publisher may recover the row. + third = runtime.store.claim_outbox("p2", now=T0 + 31.0) + assert len(third) == 1 + + +def test_at_least_once_window_duplicate_is_skipped(runtime, worker): + """Crash between stream append and outbox delete -> duplicate entry. + + The duplicate must be detected via terminal state and acked, not re-run. + """ + task, _ = runtime.submit("absorb_text", _absorb_payload(), now=T0) + # Simulate the crash window: entry hits the stream, outbox row survives. + runtime.store.append_stream_entry(task.task_id, now=T0) + outcomes = worker.run_once(now=T0) # also republishes the surviving outbox row + executed = [o for o in outcomes if o["outcome"] == "completed"] + skipped = [o for o in outcomes if o["outcome"] == "duplicate_skipped"] + assert len(executed) == 1, "task must execute exactly once" + assert len(skipped) == 1, "duplicate delivery must be skipped" + assert runtime.store.get_task(task.task_id).status == "completed" + assert runtime.store.counts()["stream_depth"] == 0, "both entries acked" + + +def test_execution_lease_blocks_second_consumer(runtime): + task, _ = runtime.submit("absorb_text", _absorb_payload(), now=T0) + runtime.publish_pending(publisher="p", now=T0) + assert runtime.store.acquire_lease(task.task_id, "w1", 35.0, now=T0) + assert not runtime.store.acquire_lease(task.task_id, "w2", 35.0, now=T0) + # Lease expiry frees the task for another worker (crash recovery). + assert runtime.store.acquire_lease(task.task_id, "w2", 35.0, now=T0 + 36.0) + + +def test_autoclaim_recovers_abandoned_entry(runtime): + task, _ = runtime.submit("absorb_text", _absorb_payload(), now=T0) + runtime.publish_pending(publisher="p", now=T0) + delivered = runtime.store.read_group(GROUP, "crashed-consumer", now=T0) + assert len(delivered) == 1 and delivered[0].delivery_count == 1 + + # Before the idle threshold nothing is transferable. + assert runtime.store.autoclaim(GROUP, "w2", RECLAIM_IDLE_SECONDS, now=T0 + 10) == [] + + reclaimed = runtime.store.autoclaim( + GROUP, "w2", RECLAIM_IDLE_SECONDS, now=T0 + RECLAIM_IDLE_SECONDS + 1 + ) + assert len(reclaimed) == 1 + assert reclaimed[0].delivery_count == 2 + assert reclaimed[0].task_id == task.task_id + + +def test_state_survives_reopen(tmp_path): + """WAL journal is the durability boundary: reopen sees identical state.""" + from ether_runtime import TaskRuntime + + db = tmp_path / "durable.db" + rt = TaskRuntime(db) + task, _ = rt.submit("absorb_text", _absorb_payload(), now=T0) + rt.close() + + rt2 = TaskRuntime(db) + try: + assert rt2.store.get_task(task.task_id).status == "queued" + assert rt2.store.counts()["outbox_backlog"] == 1 + mode = sqlite3.connect(str(db)).execute("PRAGMA journal_mode").fetchone()[0] + assert mode.lower() == "wal" + finally: + rt2.close() diff --git a/mainbrain/ether-runtime/tests/test_retry_policy.py b/mainbrain/ether-runtime/tests/test_retry_policy.py new file mode 100644 index 000000000..f2b62d63f --- /dev/null +++ b/mainbrain/ether-runtime/tests/test_retry_policy.py @@ -0,0 +1,41 @@ +"""Retry policy: exact ladder, deterministic bounded jitter, invariants.""" + +from ether_runtime import retry_delay, validate_policy +from ether_runtime.retry import JITTER_FRACTION, RETRY_DELAYS, jitter_factor + +import pytest + + +def test_nominal_ladder_matches_v11_record(): + assert RETRY_DELAYS == (1.0, 2.0, 4.0, 8.0, 16.0) + assert sum(RETRY_DELAYS) == 31.0 + + +def test_policy_constraint_check_passes(): + report = validate_policy() + assert report["constraint_check"] == "passed" + assert report["total_nominal_delay"] < report["reclaim_idle_seconds"] + + +def test_jitter_is_deterministic_and_bounded(): + for attempt in range(1, 6): + a = jitter_factor("task-a", attempt) + b = jitter_factor("task-a", attempt) + assert a == b, "same task+attempt must jitter identically" + assert 1 - JITTER_FRACTION <= a <= 1 + JITTER_FRACTION + + +def test_jitter_spreads_across_tasks(): + factors = {jitter_factor(f"task-{i}", 1) for i in range(50)} + assert len(factors) > 40, "jitter should differ across task ids" + + +def test_retry_delay_uses_ladder_with_jitter(): + for attempt, nominal in enumerate(RETRY_DELAYS, start=1): + delay = retry_delay("t", attempt) + assert nominal * (1 - JITTER_FRACTION) <= delay <= nominal * (1 + JITTER_FRACTION) + + +def test_attempt_must_be_positive(): + with pytest.raises(ValueError): + retry_delay("t", 0) diff --git a/mainbrain/ether-runtime/tests/test_worker_and_handlers.py b/mainbrain/ether-runtime/tests/test_worker_and_handlers.py new file mode 100644 index 000000000..1e07f8cf5 --- /dev/null +++ b/mainbrain/ether-runtime/tests/test_worker_and_handlers.py @@ -0,0 +1,117 @@ +"""End-to-end worker behavior and the two allowlisted handlers.""" + +import hashlib + +import pytest + +from ether_runtime import PayloadError, Worker +from ether_runtime.retry import DEFAULT_MAX_ATTEMPTS, JITTER_FRACTION, RETRY_DELAYS +from ether_runtime.tasks import HANDLERS + +T0 = 2_000_000.0 + + +def test_absorb_text_end_to_end(runtime, worker): + task, _ = runtime.submit( + "absorb_text", {"source": "handoff", "text": "durable runtimes ack after work"}, + now=T0, + ) + outcomes = worker.run_once(now=T0) + assert [o["outcome"] for o in outcomes] == ["completed"] + done = runtime.store.get_task(task.task_id) + assert done.status == "completed" + assert done.result["created"] is True + assert runtime.store.counts()["absorbed_records"] == 1 + + +def test_absorb_requires_source(runtime): + with pytest.raises(PayloadError): + runtime.submit("absorb_text", {"source": " ", "text": "anonymous"}) + + +def test_absorb_is_content_deduplicated(runtime, worker): + payload = {"source": "s", "text": "same content"} + runtime.submit("absorb_text", payload, idempotency_key="first", now=T0) + runtime.submit("absorb_text", payload, idempotency_key="second", now=T0) + worker.run_until_drained(now=T0) + assert runtime.store.counts()["absorbed_records"] == 1, "content hash dedups" + + +def test_verify_artifact_verified_and_mismatch(runtime, worker, tmp_path): + good = runtime.artifact_root / "good.bin" + good.write_bytes(b"payload-bytes") + good_sha = hashlib.sha256(b"payload-bytes").hexdigest() + task, _ = runtime.submit( + "verify_artifact", + {"files": {"good.bin": good_sha, "absent.bin": "0" * 64}}, + now=T0, + ) + worker.run_until_drained(now=T0) + done = runtime.store.get_task(task.task_id) + assert done.status == "completed" + assert done.result["ok"] is False + assert done.result["files"]["good.bin"]["status"] == "verified" + assert done.result["files"]["absent.bin"]["status"] == "missing" + + +def test_verify_artifact_rejects_traversal_at_submit(runtime): + with pytest.raises(PayloadError): + runtime.submit("verify_artifact", {"files": {"../escape": "0" * 64}}) + with pytest.raises(PayloadError): + runtime.submit("verify_artifact", {"files": {"/etc/passwd": "0" * 64}}) + + +def test_failure_walks_retry_ladder_then_dead_letters(runtime, monkeypatch): + """A persistently failing handler retries with jittered delays, then dies.""" + calls = {"n": 0} + + def always_fails(store, payload, artifact_root): + calls["n"] += 1 + raise RuntimeError("simulated handler crash") + + monkeypatch.setitem(HANDLERS, "absorb_text", always_fails) + task, _ = runtime.submit("absorb_text", {"source": "s", "text": "t"}, now=T0) + worker = Worker(runtime, name="w-retry") + + now = T0 + outcomes = [] + for _ in range(DEFAULT_MAX_ATTEMPTS): + result = worker.run_once(now=now) + assert len(result) == 1 + outcomes.append(result[0]["outcome"]) + # Jump past the maximum possible jittered delay to make the + # retry entry deliverable on the next pass. + now += max(RETRY_DELAYS) * (1 + JITTER_FRACTION) + 1 + + assert outcomes[:-1] == ["retry_wait"] * (DEFAULT_MAX_ATTEMPTS - 1) + assert outcomes[-1] == "dead_lettered" + assert calls["n"] == DEFAULT_MAX_ATTEMPTS + dead = runtime.store.get_task(task.task_id) + assert dead.status == "dead_lettered" + assert dead.attempts == DEFAULT_MAX_ATTEMPTS + assert "simulated handler crash" in dead.error + assert runtime.store.counts()["stream_depth"] == 0, "nothing left enqueued" + + +def test_retry_entry_not_deliverable_before_delay(runtime, monkeypatch): + def always_fails(store, payload, artifact_root): + raise RuntimeError("boom") + + monkeypatch.setitem(HANDLERS, "absorb_text", always_fails) + runtime.submit("absorb_text", {"source": "s", "text": "t"}, now=T0) + worker = Worker(runtime, name="w-delay") + assert worker.run_once(now=T0)[0]["outcome"] == "retry_wait" + # Minimum possible first delay is 1s * (1 - jitter); before that: nothing. + assert worker.run_once(now=T0 + 0.5) == [] + + +def test_mixed_batch_drains_cleanly(runtime, worker): + for i in range(5): + runtime.submit("absorb_text", {"source": "s", "text": f"text {i}"}, now=T0) + executed = worker.run_until_drained(now=T0) + assert executed == 5 + statuses = {t.status for t in runtime.store.iter_tasks()} + assert statuses == {"completed"} + counts = runtime.store.counts() + assert counts["stream_depth"] == 0 and counts["pending_entries"] == 0 + assert counts["active_leases"] == 0 diff --git a/mainbrain/handoff/00_START_HERE/CANONICAL_SOURCE_MAP.md b/mainbrain/handoff/00_START_HERE/CANONICAL_SOURCE_MAP.md new file mode 100644 index 000000000..4c6864182 --- /dev/null +++ b/mainbrain/handoff/00_START_HERE/CANONICAL_SOURCE_MAP.md @@ -0,0 +1,78 @@ +# Canonical Source Map + +## Tier A - active executable candidate + +### OKComputer Swarm Integrated v1 +Path: `10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/` + +Role: user interface, authenticated swarm runs, OpenAI Agents SDK orchestration, optional Claude critique, local Hugging Face routing, Supabase control-plane integration. + +Canonicality: newest active software candidate from this conversation. + +Do not overwrite it with the original swarm archive. Compare or cherry-pick only. + +## Tier B - preserved foundation baseline + +### WORDLIB v29 +Path: `10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/` + +Role: offline knowledge system, agents, reasoning modules, RAG management, deployment stages, self-editing/evolution infrastructure, launchers, and UI. + +Canonicality: historical baseline. Valuable, but not assumed production-safe. The newer semantic-core note describes future work that is not present in this archive. + +Highest-value candidate modules for later selective integration: + +- `src/reasoning/reasoning_guard.py` +- `src/reasoning/uncertainty_quantifier.py` +- `src/reasoning/output_quality.py` +- `src/reasoning/math_validator.py` +- `src/agents/orchestrator.py` +- `src/deployment/stages.py` +- `src/deployment/state.py` +- `src/deployment/repair.py` +- `src/rag_manager.py` +- `deploy_check.py` +- `src/self_editor.py` only after proof/sandbox gates + +## Tier C - engineering/domain specification + +### MASTERZIP v11 +Paths: + +- `20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_COMBINED_DETAILED.pdf` +- `20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_EXTRACTED_TEXT.txt` + +Role: ALUM-BOO engineering knowledge, prototype scripts, FMEA, compliance concepts, blueprints, validation ladder, field protocols, inventory/cutting/pricing ideas. + +Canonicality: canonical domain handover, but **not canonical evidence of implementation quality or physical validation**. + +Current stage: VAL-0 / specification complete or in progress. VAL-1 remains blocked by geometry and hardware evidence. + +## Tier D - future architecture/specifications + +### WORDLIB semantic core update +Path: `30_RUNTIME_AND_MEMORY_DESIGNS/WORDLIB semantic core update.txt` + +Role: next-spec order. It says deploy proof gates must precede tested patch execution sandbox work. + +Status: instruction/specification only. The referenced cryptographic-binding archive is absent from this bundle. + +### EtherAI Absorption System +Path: `30_RUNTIME_AND_MEMORY_DESIGNS/EtherAI Absorption System.txt` + +Role: design record for a durable Redis Streams + SQLite WAL task runtime with at-least-once delivery and safe task types. + +Status: narrative/verification summary only. The referenced starter ZIP and wheel are absent from the current filesystem and therefore are not included or claimed available. + +### Semantic core setup note +Path: `30_RUNTIME_AND_MEMORY_DESIGNS/Consider best setup.txt` + +Role: proposed future local model and memory architecture: one strong reasoning model, one small router, hybrid vector + graph memory. + +Status: unimplemented recommendation. Hardware sizing and model selection require a fresh connected-machine assessment. + +## Tier E - originals and rollback + +Path: `90_ORIGINAL_UPLOADS/` + +Contains every source artifact physically available in this conversation, unchanged. Use these files for provenance, rollback, and diffing. diff --git a/mainbrain/handoff/00_START_HERE/CONTINUATION_PROMPT.xml b/mainbrain/handoff/00_START_HERE/CONTINUATION_PROMPT.xml new file mode 100644 index 000000000..544cea001 --- /dev/null +++ b/mainbrain/handoff/00_START_HERE/CONTINUATION_PROMPT.xml @@ -0,0 +1,43 @@ + + + + Evidence-driven software architect, integration engineer, verification lead, and handoff custodian. + Johannes / Joe + + + + 00_START_HERE/README_MASTER_HANDOFF.md + 00_START_HERE/CURRENT_STATE.xml + 99_INTEGRITY/MASTER_MANIFEST.json + 10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated + 10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib + 20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_COMBINED_DETAILED.pdf + + + + Verify archive checksums and active source integrity. + Install dependencies on a connected machine and run check, tests, and production build. + Run the first real swarm request auditing MASTERZIP v11 capability truth. + Create a typed adapter registry; do not directly expose unclassified scripts as agents. + Recommend the smallest safe integration patch. + + + + No fabricated execution, connector success, test pass, source, metric, or physical evidence. + No secrets in client code, logs, prompts, repositories, or handoff archives. + MASTERZIP stays VAL-0 until evidence-backed promotion. + Claude is optional; absence is not a failed run. + Supabase owns control metadata only; model files and large artifacts remain local/object storage. + Do not merge WORDLIB self-editor before proof-binding, deploy gates, isolated patch testing, rollback, and approval. + Preserve all originals and create a new versioned ZIP after each substantial round. + + + + Top five highest-signal findings first. + Exact commands and exact observed results. + Capability registry with implementation and evidence classes. + Risk register and next executable action. + Updated continuation XML. + Versioned ZIP, file count, SHA-256, and manifest. + + diff --git a/mainbrain/handoff/00_START_HERE/CURRENT_STATE.xml b/mainbrain/handoff/00_START_HERE/CURRENT_STATE.xml new file mode 100644 index 000000000..8f947d7a1 --- /dev/null +++ b/mainbrain/handoff/00_START_HERE/CURRENT_STATE.xml @@ -0,0 +1,59 @@ + + + + Preserve current conversation state and strongest physically available artifacts before conversation merge. + + + + Authenticated UI and evidence-driven multi-agent orchestration shell. + OKComputer_Advanced_Swarm_AI_Search.zip for active development only. + + + Offline knowledge, reasoning, agent, deployment, RAG, and self-editing foundation. + + + Engineering knowledge and validation specification. + NEXT-001 geometry and hardware evidence before VAL-1. + + + + + + + + + + + + + INTAKE + PLAN + ROUTE + EXECUTE + CRITIQUE + VALIDATE + PERSIST + COMPLETE + FAILED + + + + SPEC-CRYPTOGRAPHIC_BINDING + SPEC-DEPLOY_PROOF_GATE + SPEC-TESTED_PATCH_EXECUTION_SANDBOX + Human-approved self-edit integration + blumentritt_SPEC_CRYPTOGRAPHIC_BINDING_implemented_v1.zip + + + + etherai_absorption_gun_complete_starter_v11.zip + EtherAI wheel and detailed verification documents + Cryptographic-binding implementation archive + Hugging Face local model binaries + Provider API keys + + + + Verify the integrated OKComputer build on a connected machine, then audit MASTERZIP v11 into real, simplified, placeholder, narrative-only, unsupported, and evidence-blocked capabilities. + + diff --git a/mainbrain/handoff/00_START_HERE/HANDOFF_PROMPT.md b/mainbrain/handoff/00_START_HERE/HANDOFF_PROMPT.md new file mode 100644 index 000000000..398e5f01b --- /dev/null +++ b/mainbrain/handoff/00_START_HERE/HANDOFF_PROMPT.md @@ -0,0 +1,40 @@ +# Ready-to-paste handoff prompt + +You are taking over the WORDLIB Mainbrain consolidated handoff. + +Read these files first, in order: + +1. `00_START_HERE/README_MASTER_HANDOFF.md` +2. `00_START_HERE/CURRENT_STATE.xml` +3. `00_START_HERE/CANONICAL_SOURCE_MAP.md` +4. `00_START_HERE/HIGH_SIGNAL_CONVERSATION_RECORD.md` +5. `00_START_HERE/MERGE_AND_EXECUTION_PLAN.md` +6. `00_START_HERE/KNOWN_GAPS_AND_RISKS.md` +7. `99_INTEGRITY/MASTER_MANIFEST.json` + +Do not perform a broad merge immediately. + +Your first mission is to verify the active OKComputer integrated candidate on a connected machine, then run this audit: + +“Audit MASTERZIP v11. Separate implemented code, simplified implementations, placeholders, narrative-only claims, unsupported claims, and the exact evidence required before VAL-1.” + +Required outputs: + +- machine-readable capability registry; +- exact build/test results; +- provider configuration status without exposing secrets; +- blockers and risks; +- smallest safe next patch; +- updated continuation XML; +- new ZIP with manifest and SHA-256. + +Hard rules: + +- preserve original archives; +- no fabricated execution or evidence; +- no physical validation promotion; +- no arbitrary shell task endpoint; +- no WORDLIB self-edit merge until cryptographic binding, deploy proof gates, isolated patched-workspace testing, rollback, and approval are proven; +- use Supabase only as the control plane, not bulk model storage; +- Claude remains optional unless authorized; +- lead with the five highest-signal findings. diff --git a/mainbrain/handoff/00_START_HERE/HIGH_SIGNAL_CONVERSATION_RECORD.md b/mainbrain/handoff/00_START_HERE/HIGH_SIGNAL_CONVERSATION_RECORD.md new file mode 100644 index 000000000..a51d224ce --- /dev/null +++ b/mainbrain/handoff/00_START_HERE/HIGH_SIGNAL_CONVERSATION_RECORD.md @@ -0,0 +1,90 @@ +# High-Signal Conversation Record + +## Original consolidation problem + +Two complementary assets were identified: + +- MASTERZIP v11: engineering domain knowledge, validation logic, FMEA/compliance concepts, and prototype scripts. +- OKComputer Advanced Swarm: modern React/TypeScript application shell with authentication, database, agent UI, and history. + +The chosen strategy was to fuse them through adapters and evidence gates rather than paste engineering scripts into the UI or continue expanding the projects separately. + +## Major architectural decisions + +### 1. OpenAI is the primary orchestrator + +The integrated runtime uses an OpenAI Agents SDK path for planner, specialist workers, validator, and synthesizer. It includes explicit safety instructions, project-state retrieval, and action classification gates. + +Status: code present. Live execution still requires a valid `OPENAI_API_KEY` in the server environment. A secure key-setup flow was initiated during the conversation, but no raw key was exposed or added to this package. + +### 2. Claude is optional and adversarial + +Claude was assigned the critic role rather than primary authority. Its output is routed into OpenAI validation and final synthesis. + +Status: adapter present. No direct Claude connector or usable Anthropic API key was available. Gmail showed account/API-related correspondence, which is evidence of an account relationship, not authorization for this application. + +### 3. Hugging Face is local-first + +Transformers.js was adapted for local semantic routing/embeddings. The selected default model in code is `mixedbread-ai/mxbai-embed-xsmall-v1`. Remote model loading is disabled unless explicitly enabled. Model files are not bundled. + +Status: code present; model inference not run in this environment. + +### 4. Supabase is metadata control plane, not bulk storage + +The live project `dxyghtyjndylvfugutsr` received: + +- `control.swarm_runs` +- `control.swarm_events` +- `control.swarm_checkpoints` +- service-role-only RPC bridge functions +- connector target expansion for OpenAI, Anthropic, Hugging Face, and Canva + +An RPC smoke test created a temporary run, appended an event, wrote a checkpoint, read it back, and deleted it. + +### 5. Canva is documentation surface only + +Four operator-guide candidates were generated. Canva is not the source of engineering truth and does not replace code, test evidence, Supabase state, or physical validation records. + +Candidate URLs retained from the conversation: + +- https://www.canva.com/d/oAgsMvfUHEain3d +- https://www.canva.com/d/NGqy8euQ9P4zRz5 +- https://www.canva.com/d/mBArQGLxKvgvdA8 +- https://www.canva.com/d/nTdAjViQ_kY3vXW + +No candidate was declared canonical. + +## Security corrections made in the integrated swarm + +- Removed simulated/fabricated provider outputs as the main execution path. +- Added explicit state transitions and failure states. +- Required authentication and ownership for swarm run reads and writes. +- Kept provider credentials server-side. +- Kept Supabase control tables behind RLS and service-role RPC access. +- Preserved evidence and approval blocks for physical, sale, deployment, and destructive actions. + +## Honest verification boundary + +Verified or materially present: + +- integrated source archive exists; +- state-machine and provider integration code exists; +- Supabase SQL was applied and smoke-tested during the conversation; +- source ZIPs pass archive-integrity checks in this consolidation run; +- no provider secret is intentionally bundled. + +Not proven here: + +- full connected `npm install` and production build; +- live OpenAI agent run; +- live Claude critique; +- live Hugging Face local inference; +- physical performance or compliance of MASTERZIP products; +- existence of the EtherAI starter ZIP/wheel referenced by its narrative; +- existence of the cryptographic-binding archive referenced by the WORDLIB semantic-core note. + +## First audit to run + +> Audit MASTERZIP v11. Separate implemented code, placeholders, unsupported claims, and the exact evidence required before VAL-1. + +That audit should produce a machine-readable capability registry before any mass agentization of T1-T28. diff --git a/mainbrain/handoff/00_START_HERE/KNOWN_GAPS_AND_RISKS.md b/mainbrain/handoff/00_START_HERE/KNOWN_GAPS_AND_RISKS.md new file mode 100644 index 000000000..d0131185d --- /dev/null +++ b/mainbrain/handoff/00_START_HERE/KNOWN_GAPS_AND_RISKS.md @@ -0,0 +1,51 @@ +# Known Gaps and Risks + +## Critical blockers + +1. **OpenAI key not bundled** - correct security behavior. Live OpenAI execution requires server-side setup. +2. **Claude key unavailable** - the critic is optional and must remain disabled until authorized. +3. **Hugging Face model files absent** - local semantic routing cannot run until models are downloaded and pinned. +4. **EtherAI executable package absent** - only its narrative summary is available here. +5. **WORDLIB cryptographic-binding base archive absent** - the deploy-proof specification cannot be honestly executed on the referenced base without recovering that archive. +6. **MASTERZIP remains VAL-0** - geometry, material, structural, control, bench, RF, outdoor, and operational evidence remain incomplete. + +## High risks + +### False capability inflation + +MASTERZIP scripts include simplified algorithms and placeholder-like implementations. Their presence must not be equated with full photogrammetry, FEA, OCR, Bayesian optimization, compliance certification, or field validation. + +### Cross-system state conflict + +WORDLIB, OKComputer's application database, Supabase, SQLite, Redis, and future graph/vector stores can create competing truths. Assign one authoritative owner to each record class. + +### Self-editing blast radius + +WORDLIB self-edit/evolution features are powerful but must remain isolated until cryptographic payload binding, deploy-visible proof gates, isolated patched-workspace tests, rollback, and approval are implemented. + +### Provider drift + +Model names and SDK interfaces may change. Pin dependencies, record provider/model/revision with every run, and retain provider-independent task/evidence schemas. + +### Physical and commercial liability + +Software-generated compliance PDFs or calculations do not constitute legal certification or field validation. Human engineering review and local regulatory compliance may be required. + +## Medium risks + +- Supabase RLS with no client policies intentionally blocks client access; server RPC configuration must be tested after deployment. +- The integrated package does not contain a refreshed lockfile for the added AI SDK dependencies. +- The original OKComputer code and integrated code have diverged; future merges should be diff-based. +- The semantic-core hardware recommendation was not benchmarked against Joe's exact machine in this conversation. +- Canva candidate designs may contain presentation simplifications and are not authoritative. + +## Future scaling capabilities + +- resumable multi-agent runs through event/checkpoint state; +- local semantic routing and model fallback; +- durable Redis worker execution; +- graph-backed capability/evidence lineage; +- sandboxed self-improvement; +- human approval queues; +- reproducible physical experiment registry; +- offline-first deployment and model storage. diff --git a/mainbrain/handoff/00_START_HERE/MERGE_AND_EXECUTION_PLAN.md b/mainbrain/handoff/00_START_HERE/MERGE_AND_EXECUTION_PLAN.md new file mode 100644 index 000000000..3335f2f92 --- /dev/null +++ b/mainbrain/handoff/00_START_HERE/MERGE_AND_EXECUTION_PLAN.md @@ -0,0 +1,122 @@ +# Merge and Execution Plan + +## Recommended path: adapter-first federation + +Do not combine all repositories into one unstructured tree. Use OKComputer as the orchestration shell and integrate the other systems through versioned adapters. + +### Phase 0 - restore and verify + +1. Unpack this bundle. +2. Verify `99_INTEGRITY/SHA256SUMS.txt`. +3. Run the integrated swarm's dependency install, type-check, tests, and build on a connected machine. +4. Confirm environment variables are server-only. +5. Export or inspect the live Supabase schema before applying any new migration. + +Exit gate: clean build, passing tests, no secret leakage, state-machine tests green. + +### Phase 1 - MASTERZIP capability audit + +Create a registry for every T-tool and subsystem with these fields: + +```text +id +name +implementation_path +implementation_class = real | simplified | placeholder | narrative_only +inputs +outputs +dependencies +validation_method +evidence_state +safety_class +allowed_execution_mode +blocking_requirements +``` + +Do not expose a tool to the swarm until its adapter validates inputs/outputs and its implementation class is known. + +Exit gate: no T1-T28 item remains ambiguously labeled "validated" without implementation and evidence classification. + +### Phase 2 - WORDLIB selective absorption + +Integrate only bounded, testable modules: + +1. reasoning guard +2. uncertainty quantifier +3. output-quality evaluator +4. math validator +5. deployment state/stages +6. RAG interfaces + +Do not merge `self_editor.py` or autonomous evolution paths yet. + +Required gate order: + +```text +SPEC-CRYPTOGRAPHIC_BINDING + -> SPEC-DEPLOY_PROOF_GATE + -> SPEC-TESTED_PATCH_EXECUTION_SANDBOX + -> human-approved self-edit integration +``` + +The current bundle contains only the deploy-proof instruction, not the cryptographic-binding implementation archive. + +### Phase 3 - durable task runtime + +Reconstruct or recover the EtherAI starter artifact, then integrate it as a worker plane: + +```text +Swarm planner + -> bounded task envelope + -> durable outbox + -> Redis Stream + -> worker lease + -> result/evidence record + -> swarm validator +``` + +Permit only allowlisted task types. Do not reintroduce arbitrary shell execution. + +### Phase 4 - hybrid memory + +Recommended logical layers: + +- Supabase/Postgres: authoritative run metadata, provenance, claims, approvals, checkpoints. +- LanceDB or equivalent local vector store: embeddings and multimodal retrieval. +- Graph layer: relationships, dependencies, evidence lineage, supersession. +- Local filesystem/object storage: model weights and large artifacts. + +Do not make two databases co-authoritative for the same state. Each record class needs one owner. + +### Phase 5 - physical engineering interface + +The swarm may generate analyses, field sheets, cut lists, and test plans. It may not certify a build or sale. Physical stages require evidence ingestion, human witness/approval, and compliance gates. + +Canonical physical validation sequence remains: + +```text +VAL-0 specification +VAL-1 geometry verification +VAL-2 material/structural evidence +VAL-3 control simulation +VAL-4 unpowered mock-up +VAL-5 single-hinge powered test +VAL-6 integrated bench test +VAL-7 indoor RF test +VAL-8 controlled outdoor test +VAL-9 operational cycles +``` + +## Two implementation options + +### Option A - recommended: federated repositories + +Keep swarm, WORDLIB, EtherAI, and engineering specs separate. Connect them through schemas, task envelopes, adapters, and manifests. + +Why recommended: smallest blast radius, clear ownership, easier rollback, preserves proof boundaries. + +### Option B - monorepo + +Move all code into packages under one repository with shared CI and contracts. + +Use only after adapters and tests exist. A premature monorepo would hide provenance and make weak components look production-ready simply because they live beside strong ones. diff --git a/mainbrain/handoff/00_START_HERE/MISSING_ARTIFACTS.md b/mainbrain/handoff/00_START_HERE/MISSING_ARTIFACTS.md new file mode 100644 index 000000000..31a9521ea --- /dev/null +++ b/mainbrain/handoff/00_START_HERE/MISSING_ARTIFACTS.md @@ -0,0 +1,18 @@ +# Referenced but Missing Artifacts + +The following artifacts are mentioned in available text but were not physically present under `/mnt/data` during consolidation. They are not included and must not be represented as bundled: + +1. `etherai_absorption_gun_complete_starter_v11.zip` +2. `etherai_absorption_gun-2.1.0-py3-none-any.whl` +3. EtherAI distributed-runtime and Wolfram assessment files referenced by the narrative +4. `blumentritt_SPEC_CRYPTOGRAPHIC_BINDING_implemented_v1.zip` +5. `blumentritt_SPEC_DEPLOY_PROOF_GATE_implemented_v1.zip` +6. Any Hugging Face model weights or ONNX files +7. Any OpenAI or Anthropic API key +8. Any selected/published Canva design export + +Recovery priority: + +1. cryptographic-binding archive, if WORDLIB self-edit work continues; +2. EtherAI starter ZIP, if durable worker execution is pursued; +3. model weights and pinned revisions after connected-machine benchmarking. diff --git a/mainbrain/handoff/00_START_HERE/PROVIDER_AND_CONNECTOR_STATE.md b/mainbrain/handoff/00_START_HERE/PROVIDER_AND_CONNECTOR_STATE.md new file mode 100644 index 000000000..e591a0856 --- /dev/null +++ b/mainbrain/handoff/00_START_HERE/PROVIDER_AND_CONNECTOR_STATE.md @@ -0,0 +1,47 @@ +# Provider and Connector State + +## OpenAI + +Role: primary orchestrator. + +Code: installed in integrated source through `@openai/agents` and `openai` dependencies. + +Credential state: secure setup was initiated; no raw key is present in this bundle. `OPENAI_API_KEY` must be configured server-side. + +## Anthropic / Claude + +Role: optional adversarial critic. + +Code: compatibility adapter present. + +Credential state: unavailable. Gmail evidence of Anthropic/Claude messages does not grant API access. Keep disabled until `ANTHROPIC_API_KEY` is explicitly provided. + +## Hugging Face + +Role: local embeddings and semantic agent routing. + +Code: Transformers.js dependency and local-first environment logic present. + +Default model: `mixedbread-ai/mxbai-embed-xsmall-v1`. + +Model state: binaries absent. Download/pin locally before enabling inference. Remote loading defaults off. + +## Supabase + +Role: swarm control-plane metadata and checkpoints. + +Project reference: `dxyghtyjndylvfugutsr`. + +Conversation state: migrations `add_swarm_control_plane_v1` and `add_swarm_control_rpc_v1` were applied and smoke-tested. + +Secrets: no service-role key is included. + +## Canva + +Role: operator-guide and presentation surface. + +State: four candidates generated; none selected as canonical. + +## Direct Claude connection search + +No direct Claude connector was available in the chat runtime. No credential was extracted from Gmail or another connector. The system must not claim otherwise. diff --git a/mainbrain/handoff/00_START_HERE/README_MASTER_HANDOFF.md b/mainbrain/handoff/00_START_HERE/README_MASTER_HANDOFF.md new file mode 100644 index 000000000..7ced21f2b --- /dev/null +++ b/mainbrain/handoff/00_START_HERE/README_MASTER_HANDOFF.md @@ -0,0 +1,75 @@ +# WORDLIB Mainbrain - Consolidated Conversation Handoff MasterZIP v1 + +Generated: 2026-07-17 +Owner: Johannes / Joe +Purpose: preserve the strongest executable files, specifications, decisions, provider state, and next-step logic from this conversation before it is merged. + +## Start here: the five highest-signal facts + +1. **Active software candidate:** `10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/` is the newest swarm implementation. It supersedes the original OKComputer archive for active development, while the original is retained unchanged under `90_ORIGINAL_UPLOADS/` for comparison and rollback. + +2. **Foundation baseline:** `10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/` is the preserved WORDLIB v29 codebase. It is not automatically merged into the swarm. Its strongest reusable modules are orchestration, reasoning guards, uncertainty/quality evaluation, deployment staging, RAG management, and self-editing infrastructure. Any merge must pass proof and deploy gates. + +3. **Engineering domain source:** `20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_COMBINED_DETAILED.pdf` is the ALUM-BOO engineering handover. It contains valuable domain rules, blueprints, FMEA, validation ladders, and prototype scripts, but it must be treated as **VAL-0 / specification state**, not as proof that physical performance, compliance, or commercial claims have been validated. + +4. **Live control-plane work:** two Supabase migrations were applied during this conversation to project `dxyghtyjndylvfugutsr`, adding private swarm run/event/checkpoint tables and service-role-only RPC functions. The reproducible SQL is stored under `40_DATABASE_AND_PROVIDER_STATE/` and inside the integrated app. + +5. **Correct next move:** run the integrated swarm on a connected machine, verify dependencies and tests, then use the first real request to audit MASTERZIP v11 into four classes: implemented code, placeholders, unsupported claims, and evidence required before VAL-1. Do not begin a broad codebase merge or physical build before that audit. + +## Canonical architecture + +```text +User / UI + -> OKComputer Swarm Runtime + -> OpenAI Agents SDK: primary planner, workers, validator, synthesizer + -> Claude: optional adversarial critic only when a valid server-side API key exists + -> Hugging Face Transformers.js: local semantic role router / embeddings + -> Supabase: control-plane metadata, run events, checkpoints + -> WORDLIB: future reasoning, memory, proof-gate, and deployment modules + -> EtherAI Task Runtime: future durable worker queue, not present as an executable archive here + -> MASTERZIP v11: engineering knowledge and validation rules, not auto-executable truth +``` + +Canonical swarm state machine: + +```text +INTAKE -> PLAN -> ROUTE -> EXECUTE -> CRITIQUE -> VALIDATE -> PERSIST -> COMPLETE + \---------------------------------> FAILED +``` + +## Exact next action + +On a connected development machine: + +```bash +cd 10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated +cp .env.example .env +# Add credentials only to the local server environment. Never commit them. +npm install +npm run verify:integration +npm run db:push +npm run db:seed +npm run dev +``` + +First real swarm request: + +> Audit MASTERZIP v11. Separate implemented code, placeholders, unsupported claims, and the exact evidence required before VAL-1. + +## Read order + +1. `CURRENT_STATE.xml` +2. `CANONICAL_SOURCE_MAP.md` +3. `HIGH_SIGNAL_CONVERSATION_RECORD.md` +4. `MERGE_AND_EXECUTION_PLAN.md` +5. `KNOWN_GAPS_AND_RISKS.md` +6. `CONTINUATION_PROMPT.xml` +7. `99_INTEGRITY/MASTER_MANIFEST.json` + +## Integrity and honesty rules + +- Never represent an uploaded narrative as an executable artifact unless the artifact is physically present in this bundle. +- Never promote MASTERZIP beyond its evidence-backed validation stage. +- Never expose provider keys to browser code, logs, prompts, or this bundle. +- Never merge WORDLIB self-editing capabilities into active execution without cryptographic binding, deploy proof gates, isolated patch testing, and explicit human approval. +- Preserve original archives unchanged for rollback and provenance. diff --git a/mainbrain/handoff/20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_COMBINED_DETAILED.pdf b/mainbrain/handoff/20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_COMBINED_DETAILED.pdf new file mode 100644 index 000000000..fca70cf9e Binary files /dev/null and b/mainbrain/handoff/20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_COMBINED_DETAILED.pdf differ diff --git a/mainbrain/handoff/20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_EXTRACTED_TEXT.txt b/mainbrain/handoff/20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_EXTRACTED_TEXT.txt new file mode 100644 index 000000000..761775b86 --- /dev/null +++ b/mainbrain/handoff/20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_EXTRACTED_TEXT.txt @@ -0,0 +1,3180 @@ +ALUM-BOO CYBERNETICS LAB — MASTERZIP v11 — COMBINED +DETAILED PDF — 2-ROUND MAX EFFORT + +ABCAA-TAGAYTAY-2026 | ARCHITECTPRIME v1.0 | Owner Johannes Philipp | Tagaytay/Cavite PH | Budget ■15k | Pi 4 Offline + +Generated 2026-07-15 | Files 42 | Total 132.2KB unzipped | ZIP 66.8KB | All T1-T28 validated with runnable code + 00 — README HANDOVER v11 — START HERE — SINGLE SOURCE OF TRUTH +================================================================================ +ALUM-BOO CYBERNETICS LAB — MASTERZIP v11 — COMPLETE HANDOVER README +ABCAA-TAGAYTAY-2026 | ARCHITECTPRIME v1.0 | 2-ROUND MAX EFFORT FINISHED +Date: 2026-07-15 | Owner: Johannes Philipp | Location: Tagaytay/Cavite, PH +Budget ■15k | Helpers 2 @ ■500/day | Saw 1 | Pi 4 Offline | No Cloud API +================================================================================ + +YOU ARE READING THE SINGLE SOURCE OF TRUTH FOR HANDOVER. +This PDF contains EVERY file from v11, ordered, deduplicated, with runnable code. +If you are an AI (Claude, GPT-4, Gemini, Meta AI), paste this PDF text and you can resume full state. + +WHAT THIS PDF IS: +- Round 1 v10: Cut duplicates, ordered code into modules, filled weakest placeholders T20-T28 with runnable Python that +runs on Pi 4 offline. +- Round 2 v11: Added 6 new subsystems: photogrammetry pipeline (NEXT-001 -> VAL-1), structural FEA (LC-05 -> VAL-2), RF +array calculator (VAL-7), field manual generator (A4 sheets + laminated cards), experiment registry (DoE), requirements +wheelhouse. +- Total: 30+ files, ~110KB unzipped, combined PDF with README at front. +- Every number validated, every build has FMEA, every helper has training, every sale has compliance cert, every price +Bayesian optimized. + +FILE STRUCTURE (in order in this PDF): +00_README_HANDOVER_v11.txt - This file, start here +00_READ_THIS_FIRST__HANDOVER_MASTER_v9.txt - Previous handover master v9 (canonical source) +science_tools_v4.py - CANONICAL physics source T1-T28 with validation, organized classes +seed_engine_v3.py - Integrated seed engine with SQLite + XML + cut-list + BOM + QC +cutting_stock_optimizer.py - T20 real MILP heuristic FFD + local search 200 iter, kerf 2mm, waste <10% +nesting_optimizer.py - T21 2D shelf + guillotine + SVG preview +fmea_calculator.py - T22 RPN=SxOxD flags >100 redesign mandatory +protocol_validator.py - T23 field sheet completeness PIL + QR check auto-populates seeds.db +price_tracker.py - T24 7-day MA alerts LSTM export +inventory_tracker.py - T25 QR on masking tape inventory.json feeds T20 +training_validator.py - T26 quiz scoring 4/5 pass 90-day retrain +compliance_audit.py - T27 audit checklist PDF cert blocks sale if critical fail +pricing_optimizer.py - T28 Thompson sampling Bayesian bandit revenue weighted +photogrammetry_pipeline.py - NEXT-001 geometry survey -> panels.json hinges.json -> SS-GEO -> VAL-1 +structural_fea.py - FEA via numpy/sympy Wolfram equivalent LC-05 wind fully deployed +rf_array_calculator.py - Array factor AF=sum w_n exp(jk r_n dot r_hat) pose dependent +field_manual_generator.py - A4 field sheets photo grid 6 + measurement table + QR + laminated quick-ref cards +experiment_registry.py - SQLite experiments DoE adaptive +ALUM_BOO_PROJECT_SPEC.xml - Canonical ARCHITECTPRIME XML with status/confidence +P1_NOVELTY_LATCH_BLUEPRINT_v10.txt - P1 Cost 300 Sell 1800 cross-ref T2/T3 +P2_TECH_CHASSIS_BLUEPRINT_v10.txt - P2 Cost 800 Sell 3500 T1/T14 +P6_MARKET_CANOPY_BLUEPRINT_v3.txt - P6 Cost 1690 Sell 5500 orientation 40mm vertical mandatory wind 80km/h with guys +SA_PANTOGRAPH_BLUEPRINT_v10.txt - SA 0.039mm/step Jacobian IK G-code safety interlock +COMPLIANCE_CHECKLIST_v2.json - Per project critical checks blocks sale +SUPPLIER_REGISTRY_v2.json - Verified junkshop contacts prices lead times +VERSION_v11.json - Machine readable metadata +CHANGELOG - What changed +BUILD_MANIFEST - Inventory + checksums +requirements_pi.txt - Wheelhouse for offline Pi + +VALIDATION LADDER STATUS: +Current: VAL-0 In Progress (Specification Complete) +Next: NEXT-001 Geometry & Hardware Survey unlocks VAL-1 +Steps for NEXT-001: +1. Top/side/front sketches with mm dimensions +2. Smartphone photos 6+ with ruler/coin reference, 70% overlap +3. Component labels P-01 H-01 ACT-01 with QR masking tape +4. Model numbers for all electronics +5. Run photogrammetry_pipeline.py --images evidence/ABCAA_photos/ --output 01_GEOMETRY_SURVEY/ +6. Import panels.json hinges.json into ALUM_BOO_PROJECT_SPEC.xml SS-GEO +7. Run VAL-1 checks: loop closure residual <0.001m, no self-intersection, hinge limits enforced +After VAL-1: Populate material registry (spark test + coupon tensile) -> VAL-2 via structural_fea.py +After VAL-2: Control simulation -> VAL-3 +After VAL-3: Unpowered mock-up -> VAL-4 +After VAL-4: Single-hinge powered test -> VAL-5 +After VAL-5: Integrated bench test -> VAL-6 with tap-test T14 DI<0.05 +After VAL-6: Indoor RF test via rf_array_calculator.py -> VAL-7 + After VAL-7: Controlled outdoor RF test with wind limits -> VAL-8 +After VAL-8: Operational validation repeated cycles -> VAL-9 + +HOW TO USE ON PI 4 OFFLINE (NO CLOUD): +1. Unzip: unzip MASTERZIP_v11.zip -d ~/lab/FINAL_ONGOING_ZIP/releases/v11.0/ && ln -sfn releases/v11.0 current && cd +current +2. Wheels: pip install --no-index --find-links=wheelhouse -r requirements_pi.txt (numpy scipy pandas sympy qrcode pillow +reportlab) +3. Validate science: python3 science_tools_v4.py --validate-all (should PASS 28 tools) +4. Inventory: python3 inventory_tracker.py --generate-qr --id AL-20260715-001 --cross-section flat_bar_40x4 --length 1000 +--weight 400 +5. Cutting stock: python3 cutting_stock_optimizer.py --inventory inventory.json --demand P6_cutlist.json --kerf 2 --output +cut_plan.json +6. Nesting: python3 nesting_optimizer.py --pieces 200x100x10 --sheet 1000x1000 --output nest_plan.json --svg +nest_preview.svg +7. Seed: python3 seed_engine_v3.py --template canopy --params '{"L":2.0,"h":2.5,"wind_kmh":80}' --export-adopter +8. Field manual: python3 field_manual_generator.py --project P6 --id SEED_0001 --output-dir 15_CANVA_FIELD_MANUAL/ +9. Build per blueprint, fill A4 field sheet, photos 6 mandatory with ruler+coin +10. Validate protocol: python3 protocol_validator.py --sheet evidence/P6_20260715.json --db seeds.db +11. FMEA: python3 fmea_calculator.py --input fmea.json --output fmea_evaluated.json --csv fmea_matrix.csv +12. Compliance: python3 compliance_audit.py --project P6_MARKET_CANOPY --id SEED_0001 --field-sheet +evidence/P6_20260715.json --checklist COMPLIANCE_CHECKLIST_v2.json --output P6_CERT_SEED_0001.pdf (must PASS before sale) +13. Price track: python3 price_tracker.py --csv csv/prices.csv --thresholds '{"Al_scrap_kg":70}' --export +data/stream_e_prices.json (daily 6AM) +14. Pricing: python3 pricing_optimizer.py --data csv/pricing_ab.csv --prices '{"A":5500,"B":6500,"C":4500}' --pick-tomorrow + +CRITICAL PHYSICS FIXES IN v11 (from v9): +- P6 bar orientation: 40mm vertical strong axis mandatory. Flat orientation Z=106mm3 sigma=1064MPa FAIL, edge orientation +Z=1066mm3 sigma=106MPa PASS SF 2.6 with 6061. Red dot mark + jig enforced. +- Wind load: q=363Pa at 80km/h Cp=1.2, F=1815N total 5sqm, per corner 454N. M8 bolt required (RPN 192->48 after +mitigation), M6 insufficient for dynamic gust 2x. +- Anchor pull-out: uplift 1815N > weight 181N, soft volcanic soil Tagaytay, RPN 378 CRITICAL -> mandatory 40cm rebar stakes +4x + 200N pull test + guy wires 45deg. +- P1 arm: 3003-H14 mandatory not 6061-T6, bend radius >=6mm, K_t reduction file radius >=0.5mm from 3.0 to 1.8. +- P2 upright: 25x25x2 L=0.4m P_cr=69kN SF471 PASS, slender 20x20x1.5 L=0.6m P_cr=217N with 3g shock 441N FAIL -> mandatory +25x25x2. + +FINANCIAL PROJECTION v11 WITH OPTIMIZATION: +Week1: 2x P6 @5500 profit 7620 +5x P1 @1800 profit 7500 -helpers 7000 -transport 500 =7620 net debt cleared day1 via P1 +batch +Week2: 8600 net via T28 upsell to custom print +Week3: 13900 net via referral +Week4: 16800 net +Total Month1: 42300 net on 15000 initial =282% ROI, v11 adds 15% via T20 waste <10% + T28 pricing -> 48645 net + +AUTO-PROMPT FOR NEXT ROUND (Round 7 After v11): +"Load MASTERZIP v11 logic. Active tools T1-T28 validated with real code. Build queue P1,P2,P6,SA,SF. Execute Round 7: add 2 +new tools from Wiley/Statista/Perplexity (e.g., T29 auxetic impact, T30 bamboo creep), cross out 2 weakest (T9 solar, T10 +cable), re-score all architectures with FMEA RPN weights from fmea_calculator.py, promote highest skeleton to active build, +generate cut-lists and field protocols for next 15hr sprint using cutting_stock_optimizer.py + inventory.json, run +compliance_audit.py, run pricing A/B test 1 week, collect data, optimize via pricing_optimizer.py." + +END README HANDOVER v11 +================================================================================ + FILE: 00_READ_THIS_FIRST__HANDOVER_MASTER_v9.txt — 11228 bytes +================================================================================ +ALUM-BOO CYBERNETICS LAB — MASTERZIP v9 — HANDOVER MASTER +ABCAA-TAGAYTAY-2026 | ARCHITECTPRIME v1.0 Integrated +Date: 2026-07-15 | Owner: Johannes Philipp | Location: Tagaytay/Cavite, PH +Budget: ■15,000 | Debt: ■1,500 | Helpers: 2 @ ■500/day | Saw: 1 | Pi 4: Offline +================================================================================ + +YOU ARE READING THE CANONICAL SOURCE OF TRUTH. +Every number here has status, confidence, measurement method, and pass/fail. +No silent assumptions. If UNKNOWN → BLOCKED per ARCHITECTPRIME governance. + +-------------------------------------------------------------------------------- +EXECUTIVE SUMMARY — WHAT v9 FIXES OVER v8 (8 DIMENSIONS) +-------------------------------------------------------------------------------- +v8 = 21.5KB, 6 files. Equations stated, not measured. Only P6 had cut-list. +No FMEA, no training, no compliance, no price optimization. + +v9 = 13 files, ~90KB. Every build validated, every failure scored, every helper +certified, every sale compliance-checked. + +DIMENSION 1 — VERIFIABLE SCIENCE: + Before: T1-T18 listed with formula. + After: T1-T28 each have Validation subsection: + Theoretical Prediction → Workshop Measurement Method → Expected Range → + Pass/Fail Criteria → Downgrade Rule. + Example: T1 P_cr for P2 upright = 217N predicted. Measure with sandbags. + Expected 200-240N. If <180N: material is weaker than 6061-T6, downgrade all + SF calcs to 3003-H14 values, increase thickness 25%. + New T19: Measurement Uncertainty — Every dimension ±0.1mm caliper error + propagated through to final SF via root-sum-square. Every number now shows + ± interval. + +DIMENSION 2 — INTEGRATED CUT LISTS: + Before: P6 only. + After: Machine-readable JSON for P1, P2, P6, SA. Each entry: + part_id, material, length_mm, holes[], cut_angle_deg, kerf_mm, qty + T20 Cutting Stock Optimizer: MILP via PuLP/OR-Tools on Pi 4. Input: + inventory.json + demand.json → output optimal cut sequence minimizing waste. + Handles kerf=2mm, blade change penalty, mixed lengths. + T21 Nesting Optimizer: 2D shelf-packer for flat sheet parts (Miura panels, + hub plates). Minimizes area waste, respects grain direction for bamboo plywood. + +DIMENSION 3 — FAILURE MODE LIBRARY: + Before: 8 weaknesses listed. + After: Full FMEA per Tier 1 project. Each failure mode: + Mode → Cause (physics + load calc) → Effect → Detection (Stream F tap-test + interval) → Mitigation (hardware change) → RPN = S×O×D. + RPN>100 → redesign mandatory. RPN 50-100 → monitoring. RPN<50 → accept. + T22 FMEA Calculator generates matrix, flags high RPN, auto-links to redesign task. + P6 example: rivet shear at scissor pivot, wind 80km/h, load 1,422N > 618N capacity, + collapse risk, detect via tap-test every 10 deploys, mitigate to M8 bolt + guy wire, + RPN=8×6×4=192 → REDESIGN. + +DIMENSION 4 — FIELD PROTOCOLS: + Before: Canva forms vague, low priority. + After: Complete A4 field sheets for EVERY build step with: + Header (project ID, date, operator, weather, GPS, version) + Photo grid (6 slots with ruler/coin reference, mandatory) + Measurement table (dimension, nominal, measured, deviation, pass/fail, instrument) + QR code linking to seeds.db entry + evidence/ folder + Signature block (operator + witness) + timestamp + Laminated quick-reference cards (credit card size, printable on Pi): + Rivet torque: M4 2.5 N·m, M6 5.0 N·m, M8 10 N·m + Alloy spark test color chart (5052: no spark, 6061: dull, steel: bright) + PRBM deflection check: hang 1kg at tip, measure → should be X mm ±10% + Emergency stop: saw blade guard, push stick, eye protection, kill switch + T23 Protocol Validator: OCR via Tesseract on Pi scans field sheets, flags missing + measurements, auto-populates ALUM_BOO_PROJECT_SPEC.xml registry. + +DIMENSION 5 — SUPPLY CHAIN INTEGRATION: + Before: Perplexity manual, low priority. + After: Verified supplier registry JSON with: + Junkshop: name, location (GPS), price/kg (last verified date), stock check method, + contact, payment terms, transport cost. + Glass shop: services, tempering ■/sqm, drilling ■/hole, lead time. + Electronics: Lazada/Shopee links, lead time, return policy, bench test result. + T24 Price Tracker: Python on Pi 4, reads manual CSV, calculates 7-day moving avg, + alerts when price < threshold, exports to Stream E LSTM training data. + T25 Inventory Tracker: QR/barcode scan of every scrap piece on entry (print QR on + masking tape), auto-updates inventory.json → feeds T20 optimizer. + +DIMENSION 6 — TRAINING MATERIALS: + Before: Learn by doing. + After: Structured modules for Helper 1 (saw operator) and Helper 2 (assembler): + H1: Safety (blade guard, push stick, no loose clothing, eye/ear protection), + Technique (feed rate 5mm/s Al, coolant, kerf compensation 2mm, blade change + every 150m cut), Quality (squareness ±0.5°, length ±0.5mm, burr <0.2mm), + Quiz 5 questions, must score 4/5 before unsupervised operation. + H2: Rivet gun (grip 90°, pressure, mandrel collection), Torque wrench (click-type, + calibration every 100 uses, star pattern), Vibration QC (tap-test: 5N force, + record with MPU6050, compare to baseline, DI threshold 0.05), Quiz 5 questions. + T26 Training Validator tracks progress, certifies competency, flags retraining every + 90 days or after fault. + +DIMENSION 7 — REGULATORY COMPLIANCE: + Before: Ad hoc safety checks. + After: Compliance checklist per project: + P1 Latch: no sharp edges radius ≥2mm, no pinch points gap <5mm or >25mm, + load test 2× rated (50kg), deburr log, material cert. + P2 Chassis: electrical grounding <0.1Ω, fuse protection, thermal shutdown 70°C, + glass edge polished, no exposed 220V. + P6 Canopy: wind rating label (80km/h with guy wires, 40km/h without), guy wire + requirement, collapse warning sign, anchoring test 200N pull. + SA Pantograph: emergency stop button, interlock guard, pinch point warning labels, + stepper current limit, homing sequence. + T27 Compliance Auditor checks every build against checklist, generates compliance + certificate PDF, blocks sale if incomplete, logs to 11_RESULTS_DATABASE/. + +DIMENSION 8 — REVENUE OPTIMIZATION: + Before: Fixed prices. + After: A/B test framework: + Variants: A ■5,500 standard, B ■6,500 custom tarp print, C ■4,500 bare frame + Track: views, inquiries, conversion rate, time-to-sale, referral rate + Significance: n≥30 per variant, p<0.05, Bayesian update daily. + T28 Pricing Optimizer: Bayesian bandit (Thompson sampling), auto-adjusts price based + on conversion data, maximizes revenue/listings. Runs on Pi 4, no cloud. + Sales funnel: Facebook Marketplace → PM → site visit → demo (15s deploy) → + close → delivery → photo evidence → review → referral 10% discount. + Financial projection Month 1 with v9: Week1 ■3k net (debt cleared), W2 ■8.6k, + W3 ■13.9k, W4 ■16.8k = ■42.3k net on ■15k = 282% ROI. v9 adds 15% margin via optimization. + +-------------------------------------------------------------------------------- +ARCHITECTPRIME INTEGRATION — VALIDATION LADDER +-------------------------------------------------------------------------------- +Current: VAL-0 In Progress (Specification Complete) +Next: NEXT-001 Geometry & Hardware Survey unlocks VAL-1 + Requirements: + - Exact site GPS (Tagaytay lat/lon) + - Top/side/front sketches with mm dimensions + - Photos with ruler/coin reference + - Component IDs (P-01, H-01, ACT-01) QR-coded + - Model numbers for all electronics + +All parameters follow status: UNKNOWN (BLOCKED) → PROVISIONAL (conditional) → +MEASURED/MANUFACTURER_SPECIFIED/LITERATURE_DERIVED/CALCULATED/SIMULATED → +BENCH_VALIDATED → FIELD_VALIDATED. Confidence 0.0-1.0. Change control mandatory. + +Load Cases LC-01 to LC-12, Faults FLT-001 to FLT-010, Design Criteria (structural, +kinematic, control, RF) enforced via T27 auditor. + +-------------------------------------------------------------------------------- +ACTIVE BUILD QUEUE v9 (Tier 1, GREEN) +-------------------------------------------------------------------------------- +P1 Novelty Latch: 5 units, 3-5 hrs, 3003/5052 alloy mandatory (σ_root=133MPa), + PRBM leaf spring K_θ=γEI/L, self-lock θ>arctan(µ), K_t=3.0 at hole, deburr structural. + Cut-list JSON ready, FMEA RPN max 84, field protocol A4 ready. +P2 Tech Chassis: 1 unit, 6 hrs, open-frame +15% convection, glass diaphragm, + vibration QC testbed, Euler buckling check P_cr=217N, SF≥2.0. +P6 Market Canopy: 1 unit, 10 hrs, 2.0×2.5m, Λ=6.51, wind 80km/h q=296Pa F=1,422N, + upgraded 40×4 flat bar SF=1.81 (was 1.16 with 25×3), deploy 15s one person. +P SA Pantograph: Stage 1 pen 8 hrs, 0.039mm/step, Jacobian IK, G-code subset, + safety interlock, emergency stop. +P SF Vibration QC: 4 hrs, MPU6050→Arduino→Pi, DI=0.05 threshold, FFT+wavelet. + +ELIMINATED (RED, Do Not Build): + Stream C Solar Tracker — CM alignment sensitivity, typhoon liability. + Stream B Tensegrity Sensor Node — underactuated, non-repeatable. + +SKELETON POOL (Round 7 candidates): + SKEL-A Waterbomb dome top (Wiley thick origami) + SKEL-B Auxetic impact tile (negative Poisson) + SKEL-C Snap-latch gate (0.75hr quick build) + SKEL-D Bamboo fiber-gradient strut (rule of mixtures) + SKEL-E Modular kiosk system (P2+W1+P1+P6, 4.2-6.1× margin) + +ACTIVE TOOL LIBRARY v9: T1-T28 (expanded from 8, validated, 6-10 rule suspended +for v9 audit, will rotate ±2 next round to return to 8-10 window). + +-------------------------------------------------------------------------------- +HOW TO USE THIS ZIP ON PI 4 OFFLINE +-------------------------------------------------------------------------------- +1. Unzip to ~/lab/FINAL_ONGOING_ZIP/releases/v9.0/ +2. ln -sfn releases/v9.0 current +3. cd current && python3 science_tools_v3.py --validate-all + Expected: 28 tools PASS, 0 FAIL. +4. python3 seed_engine.py --template canopy --params '{"L":2.0,"h":2.5,"wind_kmh":80}' +5. For each build, print A4 field sheet from 15_CANVA_FIELD_MANUAL/ +6. After build, run: python3 compliance_audit.py --project P1 --id SEED_0001 + Must PASS before sale. +7. Daily 6AM: python3 price_tracker.py --update csv/prices.csv --alert + +-------------------------------------------------------------------------------- +AUTO-PROMPT FOR ROUND 7 (NEXT) +-------------------------------------------------------------------------------- +"Load MASTERZIP v9 logic. Active tools: T1-T28. Build queue: P1, P2, P6, SA, SF. +Execute Round 7: add 2 new tools from Wiley/Statista/Perplexity, cross out 2 weakest +active tools (maintain 6-10 total), re-score all architectures with new FMEA RPN + weights, promote highest skeleton to active build, generate cut-lists and field +protocols for next 15-hour sprint, run pricing A/B test for 1 week, collect data, +optimize." + +================================================================================ +END OF HANDOVER MASTER v9 +================================================================================ + FILE: science_tools_v4.py — 14834 bytes +#!/usr/bin/env python3 +""" +SCIENCE TOOLS v3 — T1-T28 with VALIDATION SUBSECTIONS +ABCAA-TAGAYTAY-2026 | ARCHITECTPRIME v1.0 +Runs offline on Raspberry Pi 4. No cloud. +Each tool: theory → measurement method → expected range → pass/fail → downgrade rule +""" + +import math, json, statistics +from dataclasses import dataclass +from typing import Tuple, List, Dict + +# Constants +E_AL_6061_T6 = 68.9e9 # Pa +E_AL_3003_H14 = 45e9 +RHO_AIR = 1.225 +MU_AL_AL_DRY = 0.4 +KERF_MM = 2.0 + +@dataclass +class ValidationResult: + tool_id: str + prediction: float + measured: float + expected_range: Tuple[float,float] + passed: bool + action_if_fail: str + +def validate_measurement(pred, meas, low, high, fail_action): + passed = low <= meas <= high + return ValidationResult("", pred, meas, (low,high), passed, fail_action) + +# ========================= +# T1 EULER BUCKLING +# ========================= +def T1_euler_buckling(E, I, K, L): + """P_cr = pi^2 EI / (KL)^2""" + return (math.pi**2 * E * I) / ((K*L)**2) + +def T1_validation(): + # Example: P2 upright 25x25x2mm square tube, L=0.6m, K=1.0 (pinned-pinned) + # I for square tube: (b^4 - (b-2t)^4)/12 + b=0.025; t=0.002; I=(b**4 - (b-2*t)**4)/12 + P_pred = T1_euler_buckling(E_AL_6061_T6, I, 1.0, 0.6) + # Workshop: stack sandbags on upright until bow visible + # Expected: 200-240N (20-24kg). Pass if within. + print(f"T1 Prediction P_cr={P_pred:.1f} N for P2 upright L=0.6m") + print(" Measure: sandbags 5kg increments, dial indicator at midspan") + print(" Expected: 200-240N. Pass if >=180N.") + print(" Fail action: downgrade E to 45GPa (3003-H14), increase t to 3mm, re-calc SF≥2.0") + return P_pred + +# T2 PRBM LEAF SPRING +def T2_prbm_K_theta(gamma, E, I, L): + return gamma * E * I / L +def T2_stress(M, y, I): + return M*y/I + +def T2_validation(): + # P1 arm: flat bar 25x3mm, L=0.08m, b=0.025, h=0.003, I=bh^3/12 + b=0.025; h=0.003; L=0.08; I=b*h**3/12 + gamma=0.85 + K_theta = T2_prbm_K_theta(gamma, E_AL_3003_H14, I, L) + # Hang 1kg at tip, deflection + F=9.81; delta_pred = F*L**3/(3*E_AL_3003_H14*I) + print(f"T2 K_theta={K_theta:.3f} Nm/rad, delta_1kg={delta_pred*1000:.1f} mm") + print(" Measure: clamp arm, hang 1kg, measure tip with caliper") + print(" Expected: 4.5-5.5mm for 3003-H14 25x3x80mm") + print(" Pass if 4-6mm. Fail: material is 6061-T6 too stiff → anneal or switch to 3003") + print(" Self-lock: theta_lock=arctan(0.4)+5°=26.8°, measure catch angle must exceed") + return K_theta + +# T3 RIVET/BOLT CHECK +def T3_shear_stress(F, A): return F/A +def T3_bearing_stress(F,d,t): return F/(d*t) + +def T3_validation(): + # P6 pivot M6 bolt, F=1422N/4=355N per pivot (4 pivots share wind) + F=355; d=0.006; t=0.004; A=math.pi*(d/2)**2 + tau=F/A; sigma_br=F/(d*t) + print(f"T3 tau={tau/1e6:.1f} MPa (allow 60), sigma_br={sigma_br/1e6:.1f} MPa (allow 120)") + print(" Measure: pull-test with luggage scale to 500N, inspect hole elongation") + print(" Expected: no elongation <0.1mm at 500N. Pass if <0.1mm") + print(" Fail: upgrade to M8, t=6mm, or add washer, RPN>100 mandatory") + return tau, sigma_br + +# T4 SCISSOR IK +def T4_height(L, theta): return 2*L*math.sin(theta) +def T4_lambda(h,h0): return h/h0 + +def T4_validation(): + L=1.0; theta=math.radians(45); h=T4_height(L,theta); h0=T4_height(L,math.radians(10)) + lam=h/h0 + print(f"T4 h={h:.2f}m at 45°, Lambda={lam:.2f} (h/h0)") + print(" Measure: protractor at scissor joint, tape measure height") + print(" Expected Lambda 6.51±0.3 for P6 at 2.5m deploy") + print(" Pass if Lambda within 6.0-7.0 and no binding") + return h, lam + +# T5 MIURA-ORI +def T5_gap(t, alpha): return t*math.tan(alpha/2) +def T5_stiffness_ratio(t,h): return ((t+2*h)**3)/(t**3) + +def T5_validation(): + t=0.003; alpha=math.radians(60); gap=T5_gap(t,alpha); ratio=T5_stiffness_ratio(t,0.02) + print(f"T5 gap={gap*1000:.2f}mm, stiffness ratio={ratio:.1f}x") + print(" Measure: fold paper model, measure gap with feeler gauge") + print(" Expected gap 1.0-2.0mm for t=3mm. Pass if no panel collision") + return gap + +# T6 SPHERICAL TRIG HUB +def T6_hub_angle(n_struts): + # Simplified: central angle for n struts + return 2*math.pi/n_struts + +def T6_validation(): + angle=T6_hub_angle(6) + print(f"T6 hub angle for 6 struts={math.degrees(angle):.1f}°") + print(" Measure: printed template from SA pantograph, check fit with protractor") + print(" Expected ±0.5°. Pass if all struts seat without gap >1mm") + return angle + +# T7 BAMBOO ORTHOTROPIC +def T7_rule_of_mixtures(E_f, V_f, E_m, V_m): + return E_f*V_f + E_m*V_m + +def T7_validation(): + E_long=18e9 # bamboo longitudinal + print(f"T7 bamboo E_long={E_long/1e9:.1f}GPa") + print(" Measure: 3-point bend of culm segment, span 0.5m, load 20kg") + print(" Expected deflection 5-15mm. Pass if no longitudinal split at nodes") + print(" Fail: add Al sleeve, load parallel to fibers only") + return E_long + +# T8 THERMAL EXPANSION +def T8_delta_L(alpha, L, dT): return alpha*L*dT + +def T8_validation(): + alpha_al=23e-6; L=2.5; dT=30 # Tagaytay 20-50°C surface + dL=T8_delta_L(alpha_al,L,dT) + print(f"T8 delta_L={dL*1000:.2f}mm for 2.5m Al over 30K") + print(" Measure: tape at noon vs 6AM") + print(" Expected 1.5-2.0mm. Pass if slotted holes accommodate") + return dL + +# T9 SOLAR IRRADIANCE (for reference) +def T9_irradiance(): return 1000 # W/m2 peak + +def T9_validation(): + print("T9 peak 1000W/m2, Tagaytay avg 5.2 kWh/m2/day (PAGASA)") + print(" Measure: lux meter → W/m2 ≈ lux/120") + print(" Pass if >800W/m2 at noon clear sky") + +# T10 CABLE PRESTRESS +def T10_stiffness(T, L): return T/L + +# T11 PANTOGRAPH JACOBIAN +def T11_resolution(steps_per_rev, microstep, pitch_mm): + return pitch_mm/(steps_per_rev*microstep) + +def T11_validation(): + res=T11_resolution(200,16,8) # 200 steps, 16 micro, 8mm pitch (M8 threaded rod) + print(f"T11 resolution={res:.4f}mm/step = {res*1000:.1f}um") + print(" Measure: command 1000 steps, measure with caliper") + print(" Expected 0.039mm/step ±10%. Pass if <0.05mm backlash") + return res + +# T12 WIND UPLIFT +def T12_q(rho, v, Cp): return 0.5*rho*v**2*Cp + +def T12_validation(): + v=22.22 # 80km/h in m/s + q=T12_q(RHO_AIR,v,1.2); A=2.0*2.5; F=q*A + print(f"T12 q={q:.1f}Pa, F={F:.0f}N for 5sqm @80km/h") + print(" Measure: anemometer + luggage scale on tarp corner") + print(" Expected F 1300-1500N @80km/h. Pass if < design capacity 2578N (40x4 SF1.81)") + print(" Fail: add guy wires, reduce to 40km/h operation") + return q,F + +# T13 GLASS DIAPHRAGM +def T13_validation(): + print("T13 glass diaphragm stiffness: 12mm tempered adds 3x shear") + print(" Measure: tap-test P2 with/without glass, freq shift >15% indicates composite action") + +# T14 FFT QC +def T14_DI(f_damaged,f_healthy): return abs(f_damaged-f_healthy)/f_healthy +def T14_validation(): + f_h=120; f_d=110; di=T14_DI(f_d,f_h) + print(f"T14 DI={di:.3f} threshold 0.05") + print(" Measure: MPU6050 tap 5N, FFT peak, compare to baseline") + print(" Pass if DI<0.05. Fail → rework rivets, re-tap") + return di + +# T15 CUTTING KERF LOSS +def T15_waste(total_stock, total_parts, kerf, cuts): + return (total_stock - total_parts) + kerf*cuts + +def T15_validation(): + print("T15 kerf 2mm, measure kerf by cutting 10 pcs and measuring remainder") + print(" Expected waste <15%. Pass if <10% after MILP optimization") + +# T16 HYDROSTATIC EQUALIZATION +def T16_dP(rho,g,h): return rho*g*h + +def T16_validation(): + dP=T16_dP(1000,9.81,1.0) + print(f"T16 dP={dP/1000:.1f}kPa for 1m head") + print(" Measure: clear tube manometer") + print(" Expected 9.81kPa/m. Pass if flow equalizes within 5%") + +# T17 COST MARGIN +def T17_margin(sell,cost): return sell/cost + +def T17_validation(): + m=T17_margin(5500,1690) + print(f"T17 margin={m:.2f}x for P6") + print(" Measure: actual BOM from junkshop receipts") + print(" Pass if margin >2.5x after transport") + +# T18 HYDROSTATIC PRESSURE (duplicate for ABCAA compatibility) +def T18_validation(): + print("T18 ∆P=ρgh same as T16, used for rainwater load LC-11") + +# T19 MEASUREMENT UNCERTAINTY +def T19_uncertainty_propagation(measurements): + # Root sum square + return math.sqrt(sum([m**2 for m in measurements])) + +def T19_validation(): + u=T19_uncertainty_propagation([0.1,0.1,0.05]) # mm + print(f"T19 combined uncertainty={u:.3f}mm from caliper ±0.1mm") + print(" Every final dimension reported as nominal ±U. Pass if U<0.5mm for length") + print(" Example: P1 arm 80.0±0.17mm, SF calc uses worst case") + return u + +# T20 CUTTING STOCK OPTIMIZER (MILP) +def T20_cutting_stock_optimize(stock_lengths, demand): + """ + Greedy + MILP placeholder: runs on Pi with PuLP + stock_lengths: list of available lengths mm + demand: list of (length, qty) + Returns: cutting plan, waste + """ + # Simple first-fit decreasing for offline demo + plan=[] + waste=0 + stock_sorted=sorted(stock_lengths, reverse=True) + demand_flat=[] + for l,q in demand: + demand_flat.extend([l]*q) + demand_flat.sort(reverse=True) + for stock in stock_sorted: + remaining=stock + used=[] + for d in demand_flat[:]: + if d+KERF_MM <= remaining: + used.append(d) + remaining-=d+KERF_MM + demand_flat.remove(d) + if used: + plan.append({"stock":stock,"used":used,"waste":remaining}) + waste+=remaining + if not demand_flat: + break + return plan, waste, demand_flat + +def T20_validation(): + stock=[3000,3000,3000] + demand=[(500,5),(1200,4)] # P1 + P6 example + plan,waste,leftover=T20_cutting_stock_optimize(stock,demand) + print(f"T20 plan={plan}, waste={waste}mm, leftover demand={leftover}") + print(" Measure: actual cuts vs plan, weigh offcuts") + print(" Pass if waste <10% and leftover=0") + +# T21 NESTING OPTIMIZER (2D) +def T21_nesting_shelf(pieces, sheet_w, sheet_h): + # Simple shelf algorithm + x=y=0 + row_h=0 + placements=[] + for w,h in pieces: + if x+w>sheet_w: + x=0; y+=row_h; row_h=0 + if y+h>sheet_h: + break + placements.append((x,y,w,h)) + x+=w; row_h=max(row_h,h) + waste=sheet_w*sheet_h - sum([w*h for _,_,w,h in placements]) + return placements, waste + +def T21_validation(): + pieces=[(200,100)]*10 # hub plates + placements,waste=T21_nesting_shelf(pieces,1000,1000) + print(f"T21 placements={len(placements)}, waste={waste/1e6:.3f} m2") + print(" Measure: layout on cardboard, trace, cut") + print(" Pass if waste <20%") + +# T22 FMEA CALCULATOR +def T22_rpn(severity, occurrence, detection): return severity*occurrence*detection + +def T22_validation(): + rpn=T22_rpn(8,6,4) + print(f"T22 RPN={rpn} for P6 rivet shear") + print(" S=8 (collapse injury), O=6 (80km/h occurs 5x/year), D=4 (tap-test every 10 deploys)") + print(" Pass if RPN<100, redesign if >100. This case 192 → redesign to M8+guy wires") + +# T23 PROTOCOL VALIDATOR (OCR) +def T23_validation(): + print("T23 OCR scan of A4 field sheets via Tesseract on Pi") + print(" Checks: 6 photos present, all dimensions filled, QR readable, signatures present") + print(" Pass if >90% fields complete, auto-populates seeds.db") + +# T24 PRICE TRACKER +def T24_moving_avg(prices, window=7): return sum(prices[-window:])/window + +def T24_validation(): + prices=[80,85,90,78,82,88,60,65,70] # ■/kg Al scrap + ma=T24_moving_avg(prices) + print(f"T24 7-day MA={ma:.1f} ■/kg") + print(" Alert if price < 70. Export to Stream E LSTM") + +# T25 INVENTORY TRACKER +def T25_validation(): + print("T25 QR on masking tape per scrap piece, scan with phone → inventory.json") + print(" Fields: id, cross-section, length, weight, location, photo, timestamp") + print(" Pass if scan <30s per piece, inventory accuracy >95%") + +# T26 TRAINING VALIDATOR +def T26_validation(): + print("T26 tracks Helper 1/2 + +... [TRUNCATED, full 14786 chars in ZIP, file science_tools_v4.py] ... + FILE: science_tools_v3.py — 13754 bytes +#!/usr/bin/env python3 +""" +SCIENCE TOOLS v3 — T1-T28 with VALIDATION SUBSECTIONS +ABCAA-TAGAYTAY-2026 | ARCHITECTPRIME v1.0 +Runs offline on Raspberry Pi 4. No cloud. +Each tool: theory → measurement method → expected range → pass/fail → downgrade rule +""" + +import math, json, statistics +from dataclasses import dataclass +from typing import Tuple, List, Dict + +# Constants +E_AL_6061_T6 = 68.9e9 # Pa +E_AL_3003_H14 = 45e9 +RHO_AIR = 1.225 +MU_AL_AL_DRY = 0.4 +KERF_MM = 2.0 + +@dataclass +class ValidationResult: + tool_id: str + prediction: float + measured: float + expected_range: Tuple[float,float] + passed: bool + action_if_fail: str + +def validate_measurement(pred, meas, low, high, fail_action): + passed = low <= meas <= high + return ValidationResult("", pred, meas, (low,high), passed, fail_action) + +# ========================= +# T1 EULER BUCKLING +# ========================= +def T1_euler_buckling(E, I, K, L): + """P_cr = pi^2 EI / (KL)^2""" + return (math.pi**2 * E * I) / ((K*L)**2) + +def T1_validation(): + # Example: P2 upright 25x25x2mm square tube, L=0.6m, K=1.0 (pinned-pinned) + # I for square tube: (b^4 - (b-2t)^4)/12 + b=0.025; t=0.002; I=(b**4 - (b-2*t)**4)/12 + P_pred = T1_euler_buckling(E_AL_6061_T6, I, 1.0, 0.6) + # Workshop: stack sandbags on upright until bow visible + # Expected: 200-240N (20-24kg). Pass if within. + print(f"T1 Prediction P_cr={P_pred:.1f} N for P2 upright L=0.6m") + print(" Measure: sandbags 5kg increments, dial indicator at midspan") + print(" Expected: 200-240N. Pass if >=180N.") + print(" Fail action: downgrade E to 45GPa (3003-H14), increase t to 3mm, re-calc SF≥2.0") + return P_pred + +# T2 PRBM LEAF SPRING +def T2_prbm_K_theta(gamma, E, I, L): + return gamma * E * I / L +def T2_stress(M, y, I): + return M*y/I + +def T2_validation(): + # P1 arm: flat bar 25x3mm, L=0.08m, b=0.025, h=0.003, I=bh^3/12 + b=0.025; h=0.003; L=0.08; I=b*h**3/12 + gamma=0.85 + K_theta = T2_prbm_K_theta(gamma, E_AL_3003_H14, I, L) + # Hang 1kg at tip, deflection + F=9.81; delta_pred = F*L**3/(3*E_AL_3003_H14*I) + print(f"T2 K_theta={K_theta:.3f} Nm/rad, delta_1kg={delta_pred*1000:.1f} mm") + print(" Measure: clamp arm, hang 1kg, measure tip with caliper") + print(" Expected: 4.5-5.5mm for 3003-H14 25x3x80mm") + print(" Pass if 4-6mm. Fail: material is 6061-T6 too stiff → anneal or switch to 3003") + print(" Self-lock: theta_lock=arctan(0.4)+5°=26.8°, measure catch angle must exceed") + return K_theta + +# T3 RIVET/BOLT CHECK +def T3_shear_stress(F, A): return F/A +def T3_bearing_stress(F,d,t): return F/(d*t) + +def T3_validation(): + # P6 pivot M6 bolt, F=1422N/4=355N per pivot (4 pivots share wind) + F=355; d=0.006; t=0.004; A=math.pi*(d/2)**2 + tau=F/A; sigma_br=F/(d*t) + print(f"T3 tau={tau/1e6:.1f} MPa (allow 60), sigma_br={sigma_br/1e6:.1f} MPa (allow 120)") + print(" Measure: pull-test with luggage scale to 500N, inspect hole elongation") + print(" Expected: no elongation <0.1mm at 500N. Pass if <0.1mm") + print(" Fail: upgrade to M8, t=6mm, or add washer, RPN>100 mandatory") + return tau, sigma_br + +# T4 SCISSOR IK +def T4_height(L, theta): return 2*L*math.sin(theta) +def T4_lambda(h,h0): return h/h0 + +def T4_validation(): + L=1.0; theta=math.radians(45); h=T4_height(L,theta); h0=T4_height(L,math.radians(10)) + lam=h/h0 + print(f"T4 h={h:.2f}m at 45°, Lambda={lam:.2f} (h/h0)") + print(" Measure: protractor at scissor joint, tape measure height") + print(" Expected Lambda 6.51±0.3 for P6 at 2.5m deploy") + print(" Pass if Lambda within 6.0-7.0 and no binding") + return h, lam + +# T5 MIURA-ORI +def T5_gap(t, alpha): return t*math.tan(alpha/2) +def T5_stiffness_ratio(t,h): return ((t+2*h)**3)/(t**3) + +def T5_validation(): + t=0.003; alpha=math.radians(60); gap=T5_gap(t,alpha); ratio=T5_stiffness_ratio(t,0.02) + print(f"T5 gap={gap*1000:.2f}mm, stiffness ratio={ratio:.1f}x") + print(" Measure: fold paper model, measure gap with feeler gauge") + print(" Expected gap 1.0-2.0mm for t=3mm. Pass if no panel collision") + return gap + +# T6 SPHERICAL TRIG HUB +def T6_hub_angle(n_struts): + # Simplified: central angle for n struts + return 2*math.pi/n_struts + +def T6_validation(): + angle=T6_hub_angle(6) + print(f"T6 hub angle for 6 struts={math.degrees(angle):.1f}°") + print(" Measure: printed template from SA pantograph, check fit with protractor") + print(" Expected ±0.5°. Pass if all struts seat without gap >1mm") + return angle + +# T7 BAMBOO ORTHOTROPIC +def T7_rule_of_mixtures(E_f, V_f, E_m, V_m): + return E_f*V_f + E_m*V_m + +def T7_validation(): + E_long=18e9 # bamboo longitudinal + print(f"T7 bamboo E_long={E_long/1e9:.1f}GPa") + print(" Measure: 3-point bend of culm segment, span 0.5m, load 20kg") + print(" Expected deflection 5-15mm. Pass if no longitudinal split at nodes") + print(" Fail: add Al sleeve, load parallel to fibers only") + return E_long + +# T8 THERMAL EXPANSION +def T8_delta_L(alpha, L, dT): return alpha*L*dT + +def T8_validation(): + alpha_al=23e-6; L=2.5; dT=30 # Tagaytay 20-50°C surface + dL=T8_delta_L(alpha_al,L,dT) + print(f"T8 delta_L={dL*1000:.2f}mm for 2.5m Al over 30K") + print(" Measure: tape at noon vs 6AM") + print(" Expected 1.5-2.0mm. Pass if slotted holes accommodate") + return dL + +# T9 SOLAR IRRADIANCE (for reference) +def T9_irradiance(): return 1000 # W/m2 peak + +def T9_validation(): + print("T9 peak 1000W/m2, Tagaytay avg 5.2 kWh/m2/day (PAGASA)") + print(" Measure: lux meter → W/m2 ≈ lux/120") + print(" Pass if >800W/m2 at noon clear sky") + +# T10 CABLE PRESTRESS +def T10_stiffness(T, L): return T/L + +# T11 PANTOGRAPH JACOBIAN +def T11_resolution(steps_per_rev, microstep, pitch_mm): + return pitch_mm/(steps_per_rev*microstep) + +def T11_validation(): + res=T11_resolution(200,16,8) # 200 steps, 16 micro, 8mm pitch (M8 threaded rod) + print(f"T11 resolution={res:.4f}mm/step = {res*1000:.1f}um") + print(" Measure: command 1000 steps, measure with caliper") + print(" Expected 0.039mm/step ±10%. Pass if <0.05mm backlash") + return res + +# T12 WIND UPLIFT +def T12_q(rho, v, Cp): return 0.5*rho*v**2*Cp + +def T12_validation(): + v=22.22 # 80km/h in m/s + q=T12_q(RHO_AIR,v,1.2); A=2.0*2.5; F=q*A + print(f"T12 q={q:.1f}Pa, F={F:.0f}N for 5sqm @80km/h") + print(" Measure: anemometer + luggage scale on tarp corner") + print(" Expected F 1300-1500N @80km/h. Pass if < design capacity 2578N (40x4 SF1.81)") + print(" Fail: add guy wires, reduce to 40km/h operation") + return q,F + +# T13 GLASS DIAPHRAGM +def T13_validation(): + print("T13 glass diaphragm stiffness: 12mm tempered adds 3x shear") + print(" Measure: tap-test P2 with/without glass, freq shift >15% indicates composite action") + +# T14 FFT QC +def T14_DI(f_damaged,f_healthy): return abs(f_damaged-f_healthy)/f_healthy +def T14_validation(): + f_h=120; f_d=110; di=T14_DI(f_d,f_h) + print(f"T14 DI={di:.3f} threshold 0.05") + print(" Measure: MPU6050 tap 5N, FFT peak, compare to baseline") + print(" Pass if DI<0.05. Fail → rework rivets, re-tap") + return di + +# T15 CUTTING KERF LOSS +def T15_waste(total_stock, total_parts, kerf, cuts): + return (total_stock - total_parts) + kerf*cuts + +def T15_validation(): + print("T15 kerf 2mm, measure kerf by cutting 10 pcs and measuring remainder") + print(" Expected waste <15%. Pass if <10% after MILP optimization") + +# T16 HYDROSTATIC EQUALIZATION +def T16_dP(rho,g,h): return rho*g*h + +def T16_validation(): + dP=T16_dP(1000,9.81,1.0) + print(f"T16 dP={dP/1000:.1f}kPa for 1m head") + print(" Measure: clear tube manometer") + print(" Expected 9.81kPa/m. Pass if flow equalizes within 5%") + +# T17 COST MARGIN +def T17_margin(sell,cost): return sell/cost + +def T17_validation(): + m=T17_margin(5500,1690) + print(f"T17 margin={m:.2f}x for P6") + print(" Measure: actual BOM from junkshop receipts") + print(" Pass if margin >2.5x after transport") + +# T18 HYDROSTATIC PRESSURE (duplicate for ABCAA compatibility) +def T18_validation(): + print("T18 ∆P=ρgh same as T16, used for rainwater load LC-11") + +# T19 MEASUREMENT UNCERTAINTY +def T19_uncertainty_propagation(measurements): + # Root sum square + return math.sqrt(sum([m**2 for m in measurements])) + +def T19_validation(): + u=T19_uncertainty_propagation([0.1,0.1,0.05]) # mm + print(f"T19 combined uncertainty={u:.3f}mm from caliper ±0.1mm") + print(" Every final dimension reported as nominal ±U. Pass if U<0.5mm for length") + print(" Example: P1 arm 80.0±0.17mm, SF calc uses worst case") + return u + +# T20 CUTTING STOCK OPTIMIZER (MILP) +def T20_cutting_stock_optimize(stock_lengths, demand): + """ + Greedy + MILP placeholder: runs on Pi with PuLP + stock_lengths: list of available lengths mm + demand: list of (length, qty) + Returns: cutting plan, waste + """ + # Simple first-fit decreasing for offline demo + plan=[] + waste=0 + stock_sorted=sorted(stock_lengths, reverse=True) + demand_flat=[] + for l,q in demand: + demand_flat.extend([l]*q) + demand_flat.sort(reverse=True) + for stock in stock_sorted: + remaining=stock + used=[] + for d in demand_flat[:]: + if d+KERF_MM <= remaining: + used.append(d) + remaining-=d+KERF_MM + demand_flat.remove(d) + if used: + plan.append({"stock":stock,"used":used,"waste":remaining}) + waste+=remaining + if not demand_flat: + break + return plan, waste, demand_flat + +def T20_validation(): + stock=[3000,3000,3000] + demand=[(500,5),(1200,4)] # P1 + P6 example + plan,waste,leftover=T20_cutting_stock_optimize(stock,demand) + print(f"T20 plan={plan}, waste={waste}mm, leftover demand={leftover}") + print(" Measure: actual cuts vs plan, weigh offcuts") + print(" Pass if waste <10% and leftover=0") + +# T21 NESTING OPTIMIZER (2D) +def T21_nesting_shelf(pieces, sheet_w, sheet_h): + # Simple shelf algorithm + x=y=0 + row_h=0 + placements=[] + for w,h in pieces: + if x+w>sheet_w: + x=0; y+=row_h; row_h=0 + if y+h>sheet_h: + break + placements.append((x,y,w,h)) + x+=w; row_h=max(row_h,h) + waste=sheet_w*sheet_h - sum([w*h for _,_,w,h in placements]) + return placements, waste + +def T21_validation(): + pieces=[(200,100)]*10 # hub plates + placements,waste=T21_nesting_shelf(pieces,1000,1000) + print(f"T21 placements={len(placements)}, waste={waste/1e6:.3f} m2") + print(" Measure: layout on cardboard, trace, cut") + print(" Pass if waste <20%") + +# T22 FMEA CALCULATOR +def T22_rpn(severity, occurrence, detection): return severity*occurrence*detection + +def T22_validation(): + rpn=T22_rpn(8,6,4) + print(f"T22 RPN={rpn} for P6 rivet shear") + print(" S=8 (collapse injury), O=6 (80km/h occurs 5x/year), D=4 (tap-test every 10 deploys)") + print(" Pass if RPN<100, redesign if >100. This case 192 → redesign to M8+guy wires") + +# T23 PROTOCOL VALIDATOR (OCR) +def T23_validation(): + print("T23 OCR scan of A4 field sheets via Tesseract on Pi") + print(" Checks: 6 photos present, all dimensions filled, QR readable, signatures present") + print(" Pass if >90% fields complete, auto-populates seeds.db") + +# T24 PRICE TRACKER +def T24_moving_avg(prices, window=7): return sum(prices[-window:])/window + +def T24_validation(): + prices=[80,85,90,78,82,88,60,65,70] # ■/kg Al scrap + ma=T24_moving_avg(prices) + print(f"T24 7-day MA={ma:.1f} ■/kg") + print(" Alert if price < 70. Export to Stream E LSTM") + +# T25 INVENTORY TRACKER +def T25_validation(): + print("T25 QR on masking tape per scrap piece, scan with phone → inventory.json") + print(" Fields: id, cross-section, length, weight, location, photo, timestamp") + print(" Pass if scan <30s per piece, inventory accuracy >95%") + +# T26 TRAINING VALIDATOR +def T26_validation(): + print("T26 tracks Helper 1/2 + +... [TRUNCATED, full 13706 chars in ZIP, file science_tools_v3.py] ... + FILE: seed_engine_v3.py — 1088 bytes +#!/usr/bin/env python3 +"""SEED ENGINE v3 — SQLITE + XML""" +import json, sqlite3, datetime, hashlib, pathlib +class SeedEngineV3: + def __init__(self, db_path="seeds.db"): + self.conn=sqlite3.connect(db_path) + self.cur=self.conn.cursor() + self.cur.execute("CREATE TABLE IF NOT EXISTS seeds (id INTEGER PRIMARY KEY, template TEXT, params TEXT, +cut_list TEXT, bom TEXT, created_at TEXT, version TEXT, checksum TEXT)") + self.conn.commit() + def create_seed(self, template_name, params): + cut={"parts":[{"part_id":"P6-SCISSOR-BAR-001","length_mm":1000,"qty":16}]} + bom={"total_cost_php":1690,"sell_price_php":5500,"margin":3.25} + checksum=hashlib.sha256(json.dumps(cut).encode()).hexdigest()[:8] + self.cur.execute("INSERT INTO seeds (template,params,cut_list,bom,created_at,version,checksum) VALUES (?,?,?,?, +?,?,?)",(template_name,json.dumps(params),json.dumps(cut),json.dumps(bom),datetime.datetime.now().isoformat(),"v10", +checksum)) + self.conn.commit() + return {"id":self.cur.lastrowid,"bom":bom,"checksum":checksum} + FILE: cutting_stock_optimizer.py — 1073 bytes +#!/usr/bin/env python3 +"""T20 CUTTING STOCK OPTIMIZER — REAL FFD + LOCAL SEARCH 200 ITER, KERF 2mm""" +import json, argparse +def first_fit_decreasing(stock_lengths, demands, kerf=2): + flat=[] + for l,q in demands: flat.extend([l]*q) + flat.sort(reverse=True) + bins=[{"stock":s,"used":[],"remaining":s} for s in sorted(stock_lengths, reverse=True)] + leftover=[] + for d in flat: + placed=False + for b in bins: + if d+kerf <= b["remaining"]: + b["used"].append(d); b["remaining"]-=(d+kerf); placed=True; break + if not placed: leftover.append(d) + bins=[b for b in bins if b["used"]] + waste=sum([b["remaining"] for b in bins]) + total=sum([b["stock"] for b in bins]) + return bins,waste,waste/total*100 if total else 0, leftover +def main(): + import argparse; parser=argparse.ArgumentParser(); parser.add_argument("--inventory"); parser.add_argument("-- +demand"); parser.add_argument("--kerf", type=float, default=2); args=parser.parse_args() + print("T20 optimizer run") +if __name__=="__main__": main() + FILE: nesting_optimizer.py — 526 bytes +#!/usr/bin/env python3 +"""T21 NESTING OPTIMIZER — SHELF + GUILLOTINE + SVG""" +import json +def shelf_pack(pieces, sheet_w, sheet_h): + pieces_sorted=sorted(pieces, key=lambda x: x[1], reverse=True) + x=y=0; row_h=0; placements=[] + for w,h in pieces_sorted: + if x+w>sheet_w: x=0; y+=row_h; row_h=0 + if y+h>sheet_h: break + placements.append((x,y,w,h)); x+=w; row_h=max(row_h,h) + waste=sheet_w*sheet_h - sum([w*h for _,_,w,h in placements]) + return placements,waste,waste/(sheet_w*sheet_h)*100 + FILE: fmea_calculator.py — 395 bytes +#!/usr/bin/env python3 +"""T22 FMEA CALCULATOR — RPN=SxOxD flags >100""" +import json, argparse +def rpn(S,O,D): return S*O*D +def evaluate(fmeas): + flagged=[] + for f in fmeas: + f["RPN"]=rpn(f["S"],f["O"],f["D"]) + f["action"]="REDESIGN_MANDATORY" if f["RPN"]>100 else "MONITOR" if f["RPN"]>=50 else "ACCEPT" + if f["RPN"]>100: flagged.append(f) + return fmeas, flagged + FILE: protocol_validator.py — 521 bytes +#!/usr/bin/env python3 +"""T23 PROTOCOL VALIDATOR — PIL + QR check + completeness""" +import json, pathlib +try: from PIL import Image; PIL_AVAILABLE=True +except: PIL_AVAILABLE=False +def check_field_sheet(sheet_path): + with open(sheet_path) as f: sheet=json.load(f) + photos_ok=len(sheet.get("photos",[]))>=6 + meas_ok=all([m.get("measured") is not None for m in sheet.get("measurements",[])]) + qr_ok=sheet.get("qr_code") is not None + completeness=sum([photos_ok,meas_ok,qr_ok])/3*100 + return completeness + FILE: price_tracker.py — 271 bytes +#!/usr/bin/env python3 +"""T24 PRICE TRACKER — 7-day MA + alerts + LSTM export""" +import csv, json +def moving_avg(prices, window=7): + vals=[p["price"] for p in prices] + return sum(vals[-window:])/window if len(vals)>=window else sum(vals)/len(vals) if vals else 0 + FILE: inventory_tracker.py — 227 bytes +#!/usr/bin/env python3 +"""T25 INVENTORY TRACKER — QR on masking tape""" +import json, datetime +try: import qrcode; QR=True +except: QR=False +def generate_qr(data, path): + if QR: + img=qrcode.make(data); img.save(path) + FILE: training_validator.py — 146 bytes +#!/usr/bin/env python3 +"""T26 TRAINING VALIDATOR — SQLite + 90-day retrain""" +import sqlite3, datetime +def is_certified(score): return score>=4 + FILE: compliance_audit.py — 334 bytes +#!/usr/bin/env python3 +"""T27 COMPLIANCE AUDITOR — checks checklist, generates PDF cert, blocks sale""" +import json +from reportlab.pdfgen import canvas +def audit(checklist, evidence): + fails=[item["id"] for item in checklist["critical_items"] if item["required"] and not evidence.get(item["id"])] + return len(fails)==0, fails + FILE: pricing_optimizer.py — 408 bytes +#!/usr/bin/env python3 +"""T28 PRICING OPTIMIZER — Thompson sampling Bayesian bandit""" +import random +def thompson_sample(s,f): return random.betavariate(s+1,f+1) +def pick_best(variants): + best=None; best_rev=0 + for v in variants: + sample=thompson_sample(v["successes"],v["failures"]) + rev=sample*v["price"] + if rev>best_rev: best_rev=rev; best=v["name"] + return best,best_rev + FILE: photogrammetry_pipeline.py — 990 bytes +#!/usr/bin/env python3 +""" +PHOTOGRAMMETRY PIPELINE — NEXT-001 -> VAL-1 +Depth Anything V2 + OpenCV bundle adjustment +Steps: capture 6+ photos ruler reference, detect fiducial, depth estimation, bundle adjustment, generate panels.json +hinges.json +""" +import json, pathlib +class PhotogrammetryPipeline: + def __init__(self, image_dir, output_dir="01_GEOMETRY_SURVEY/"): + self.image_dir=pathlib.Path(image_dir) + self.output_dir=pathlib.Path(output_dir) + self.output_dir.mkdir(parents=True, exist_ok=True) + def run(self): + points=[{"id":"V-01","x_m":0.0,"y_m":0.0,"z_m":0.0,"uncertainty_m":0.001}] + panels=[{"panel_id":"P-01","vertices":points}] + hinges=[{"hinge_id":"H-01","parent_panel":"P-01","child_panel":"P-02"}] + with open(self.output_dir/"panels.json","w") as f: json.dump(panels,f,indent=2) + with open(self.output_dir/"hinges.json","w") as f: json.dump(hinges,f,indent=2) + print("Generated panels.json hinges.json") + FILE: structural_fea.py — 491 bytes +#!/usr/bin/env python3 +""" +STRUCTURAL FEA — Wolfram Equivalent via NumPy + SymPy +P6 scissor bar: M=PL/4=113.5Nm sigma=106MPa edge PASS 1064MPa flat FAIL, P_cr=14.4kN SF31, LC-05 +""" +import math, json, numpy as np +def evaluate_P6(): + L=1.0; F=454; b=0.004; h=0.04 + I=b*h**3/12; Z=b*h**2/6; M=F*L/4; sigma=M/Z; P_cr=math.pi**2*68.9e9*I/(L**2) + return {"sigma_MPa":sigma/1e6,"P_cr_N":P_cr,"SF_6061":276e6/sigma,"SF_buckling":P_cr/F} +if __name__=="__main__": + print(evaluate_P6()) + FILE: rf_array_calculator.py — 644 bytes +#!/usr/bin/env python3 +"""RF ARRAY CALCULATOR — AF=sum w_n exp(jk r dot r_hat) for ABCAA""" +import math, numpy as np +class RFArrayCalculator: + def __init__(self, positions, freq=2.4e9): + self.positions=np.array(positions); self.freq=freq; self.wavelength=3e8/freq; self.k=2*math.pi/self.wavelength + def array_factor(self, theta_deg, phi_deg): + theta=math.radians(theta_deg); phi=math.radians(phi_deg) + r_hat=np.array([math.sin(theta)*math.cos(phi), math.sin(theta)*math.sin(phi), math.cos(theta)]) + AF=0j + for rn in self.positions: + AF+=np.exp(1j*self.k*np.dot(rn,r_hat)) + return AF + FILE: field_manual_generator.py — 1234 bytes +#!/usr/bin/env python3 +"""FIELD MANUAL GENERATOR — A4 sheets + laminated quick-ref cards QR""" +import pathlib +try: + from reportlab.lib.pagesizes import A4 + from reportlab.pdfgen import canvas + REPORTLAB=True +except: REPORTLAB=False +def generate_field_sheet(project_id, output="field_sheet.pdf"): + if not REPORTLAB: + pathlib.Path(output).write_text("Field sheet placeholder") + return + c=canvas.Canvas(output, pagesize=A4) + c.drawString(50,800,f"ABCAA Field Survey — {project_id}") + c.drawString(50,780,"Photo Grid 6 mandatory ruler+coin, Measurement Table, QR, Signature") + c.save() + print(f"Generated {output}") +def generate_quick_ref_cards(output="quick_ref_cards.pdf"): + if not REPORTLAB: return + c=canvas.Canvas(output, pagesize=A4) + cards=["M4 2.5 M6 5.0 M8 10 N·m","Alloy Spark Test 5052 no spark 6061 dull","PRBM 1kg 4-6mm","Wind <40 no guys 40- +80 with guys >80 stow","Safety Saw guard DOWN"] + for i,text in enumerate(cards): + x=50 + (i%3)*150; y=700 - (i//3)*100 + c.rect(x,y,140,80); c.drawString(x+5,y+60,text) + c.save() + print(f"Generated {output}") +if __name__=="__main__": + generate_field_sheet("P6_SEED_0001") + generate_quick_ref_cards() + FILE: experiment_registry.py — 820 bytes +#!/usr/bin/env python3 +"""EXPERIMENT REGISTRY — DoE Engine + SQLite""" +import sqlite3, json, datetime, random +class ExperimentRegistry: + def __init__(self, db_path="seeds.db"): + self.conn=sqlite3.connect(db_path) + self.conn.execute("CREATE TABLE IF NOT EXISTS experiments (id TEXT PRIMARY KEY, project_id TEXT, load_case TEXT, + params TEXT, result TEXT, passed BOOL, timestamp TEXT)") + def create_experiment(self, exp_id, project_id, load_case, params): + self.conn.execute("INSERT OR REPLACE INTO experiments VALUES (?,?,?,?,?,?,?)",(exp_id,project_id,load_case,json. +dumps(params),json.dumps({}),False,datetime.datetime.now().isoformat())) + self.conn.commit() + def adaptive_doe_next(self, param_bounds): + return {k: random.uniform(v[0],v[1]) for k,v in param_bounds.items()} + FILE: ALUM_BOO_PROJECT_SPEC.xml — 544 bytes + + + + + + + + + + + + FILE: P1_NOVELTY_LATCH_BLUEPRINT.txt — 6782 bytes +================================================================================ +P1 NOVELTY LATCH BLUEPRINT — v9 FULL SPEC +Cost ■300 | Sell ■1,800 | Margin 6.0x | Time 0.6-1.0 hr per unit | Batch 5 units 3-5 hrs +Status: GREEN — Build Now | Owner: Helper 2 assembly, Helper 1 cutting +================================================================================ + +1. PHYSICS BASIS — T2 PRBM + T3 + T19 +------------------- +Arm: flat bar 3003-H14 or 5052-H32, 25mm x 3mm x 80mm, vise-bent 30° +PRBM: K_theta = gamma*E*I/L, gamma=0.85, E=45GPa (3003), I=b*h^3/12 = 25*27/12=56.25mm4 +K_theta=0.85*45e9*56.25e-12/0.08=26.9 Nmm/rad =0.0269 Nm/rad +Deflection: delta=FL^3/(3EI). For F=9.81N (1kg), delta=4.9mm predicted. +Stress: sigma=M*y/I, M=F*L=0.785Nm, y=1.5mm, sigma=133MPa → requires 3003-H14 (145MPa yield) + 6061-T6 yields 276MPa but brittle, not suitable for repeated bending → use 3003/5052. +K_t=3.0 at centered hole d/w=0.3 (6mm hole /20mm width at narrow). Deburr is structural: + file radius >=0.5mm reduces K_t to 1.8. + +Self-lock: theta_lock=arctan(mu)+5°, mu=0.4 dry Al-Al → 21.8°+5°=26.8°. Catch angle must be >27° +Measure catch with protractor. Pass if 28-35°. + +Validation T2: + Theoretical: delta_1kg=4.5-5.5mm + Measure: clamp arm in vise, hang 1kg bag, caliper tip deflection + Expected: 4-6mm + Pass: 4-6mm, no crack after 10 cycles + Fail: if <3mm → material too stiff (6061-T6), anneal 350°C 1hr or switch to 3003. + if >7mm → too soft (pure Al), increase thickness to 4mm. + +2. CUT-LIST JSON (MACHINE-READABLE) — T20 INPUT +------------------- +{ + "project_id": "P1_LATCH_BATCH_5", + "version": "v9", + "kerf_mm": 2, + "parts": [ + {"part_id": "P1-ARM-001", "material": "flat_bar_3003_25x3", "length_mm": 80, "width_mm": 25, "thickness_mm": 3, +"holes": [{"pos_mm": 10, "dia_mm": 6, "type": "pivot"}, {"pos_mm": 65, "dia_mm": 5, "type": "catch"}], "cut_angle_deg": +0, "qty": 5, "bend_deg": 30, "bend_pos_mm": 40}, + {"part_id": "P1-BASE-001", "material": "flat_bar_3003_40x4", "length_mm": 60, "width_mm": 40, "thickness_mm": 4, +"holes": [{"pos_mm": 10, "dia_mm": 6, "type": "mount"}, {"pos_mm": 50, "dia_mm": 6, "type": "mount"}], "cut_angle_deg": +0, "qty": 5}, + {"part_id": "P1-CATCH-001", "material": "flat_bar_3003_20x3", "length_mm": 40, "width_mm": 20, "thickness_mm": 3, +"holes": [{"pos_mm": 20, "dia_mm": 6, "type": "pivot"}], "cut_angle_deg": 0, "qty": 5}, + {"part_id": "P1-PIN-001", "material": "Al_round_6mm", "length_mm": 30, "dia_mm": 6, "qty": 5}, + {"part_id": "FASTENER", "material": "rivet_M6_washer", "qty": 10} + ], + "stock_required": {"flat_bar_25x3_m": 0.41, "flat_bar_40x4_m": 0.31, "flat_bar_20x3_m": 0.21, "round_6mm_m": 0.15}, + "waste_estimate_percent": 8.5 +} + +Run: python3 -m cutting_stock --inventory inventory.json --demand P1_cutlist.json +Output optimal sequence minimizing waste. Expected waste <10% with 3m stock. + +3. FMEA (FAILURE MODE AND EFFECTS ANALYSIS) — T22 +------------------- +FM-01: Rivet shear at pivot + Cause: repeated cycling 1000x, F=50N, tau= F/A=50/28.3=1.8MPa <60MPa safe but fatigue + Effect: arm detaches, gate fails open + S=5, O=3, D=6 (visual inspect every 50 cycles) → RPN=90 (monitor) + Mitigation: use M6 bolt + nyloc, not rivet at pivot, add washer + +FM-02: Root crack at bend due to K_t and wrong alloy + Cause: 6061-T6 bent sharp, K_t=3.0, sigma=133*3=399MPa > yield 276MPa → crack + Effect: latch snaps, sharp edge, injury risk + S=7, O=4, D=4 (PRBM deflection check) → RPN=112 → REDESIGN MANDATORY + Mitigation: mandatory 3003/5052 alloy check via spark test (no spark), bend radius ≥6mm (2× thickness), file radius, +anneal if needed + After mitigation: O=2, RPN=56 PASS + +FM-03: Self-lock failure, gate opens under wind vibration + Cause: catch angle <26.8°, mu drops to 0.2 when wet + Effect: gate flaps, animal escape + S=4, O=5 (rain 60% days in Tagaytay), D=5 (angle gauge) → RPN=100 borderline + Mitigation: design catch 30-35°, add rubber friction pad, wet test spray water + 10N pull + After: D=2, RPN=40 PASS + +FM-04: Sharp edge cut injury + Cause: no deburr, edge radius <0.5mm + Effect: laceration + S=6, O=3, D=7 (finger test) → RPN=126 → REDESIGN + Mitigation: mandatory deburr log, radius gauge ≥2mm for P1, file + sand 120 grit, operator gloves + After: O=1, D=2, RPN=12 PASS + +Highest RPN before mitigation: 126, after: 90. All <100 after mitigation → build allowed per T27. + +4. FIELD PROTOCOL A4 — T23 +------------------- +Header: + Project: P1-____ | Date: ____ | Operator: H1/H2 | Weather: ___°C, ___%RH | GPS: ____ | Version v9 + +Photo Grid (6 slots, ruler + coin for scale mandatory): + [ ] Stock flat bar with label + [ ] Cut pieces laid out with ID tape + [ ] Bend angle measurement protractor + [ ] Hole positions caliper + [ ] Assembled latch open + [ ] Assembled latch closed + deflection test 1kg + +Measurement Table: + Dimension | Nominal | Measured | Deviation | Instrument | Pass/Fail + Length arm | 80.0±0.5mm | ___ | ___ | Caliper TOOL-CAL-01 | ___ + Bend angle | 30±2° | ___ | ___ | Protractor | ___ + Hole dia | 6.0±0.1mm | ___ | ___ | Caliper | ___ + Deflection 1kg | 4-6mm | ___ | ___ | Caliper+1kg weight | ___ + Catch angle | 28-35° | ___ | ___ | Protractor | ___ + Edge radius | ≥2mm | ___ | ___ | Radius gauge | ___ + +QR Code: link to seeds.db entry SEED_xxxx + evidence/P1_YYYYMMDD_HHMM.jpg + +Signature: Operator ____ Witness ____ Timestamp ____ + +Quick-ref card (laminated): + M6 bolt torque 5.0 N·m, rivet shear 60MPa bearing 120MPa, PRBM check 1kg→5mm + +5. TRAINING INTEGRATION — T26 +------------------- +Helper 1: cut 25x3 flat bar, feed rate 5mm/s, kerf 2mm compensation, squareness check +Helper 2: bend in vise with radius jig (6mm dowel), deburr, rivet gun 90°, tap-test +Quiz (must 4/5): + Q1: What alloy allowed for P1 arm? A: 3003/5052 only, not 6061-T6 + Q2: Bend radius minimum? A: 6mm (2× thickness) + Q3: Catch angle minimum? A: 27° (arctan 0.4+5°) + Q4: Edge radius minimum? A: 2mm + Q5: Deflection check expected? A: 4-6mm with 1kg + +6. COMPLIANCE — T27 +------------------- +Checklist: sharp edge ≥2mm radius, pinch point gap <5mm or >25mm, load test 2× rated (50N→100N hold 1min), material +cert, deburr log +Certificate generated: P1_CERT_xxxx.pdf, blocks sale if fail. + +7. REVENUE — T28 +------------------- +Sell price variants: A ■1,800 standard, B ■2,200 custom figure (dog/cat), C ■1,500 bare +Track FB Marketplace views, PMs, conversion. Bayesian bandit updates daily. +Sales funnel: listing with 6 photos (ruler scale) → PM → site visit → demo snap 10× → close. + +================================================================================ +END P1 BLUEPRINT v9 +================================================================================ + FILE: P2_TECH_CHASSIS_BLUEPRINT.txt — 6373 bytes +================================================================================ +P2 TECH CHASSIS BLUEPRINT — v9 FULL SPEC +Cost ■800 | Sell ■3,500 | Margin 4.37x | Time 6 hrs | Open-frame +15% convection +Status: GREEN — Build Now | Vibration QC testbed +================================================================================ + +1. PHYSICS — T1 EULER + T13 GLASS + T14 FFT + T19 UNCERTAINTY +------------------- +Chassis: ATX standard 305x244mm motherboard tray, but open-frame from L-profile 25x25x2mm 6061-T6. +Upright columns L=0.4m, pinned-pinned K=1.0. +I for 25x25x2 square tube: b=25mm, t=2mm, I=(b^4-(b-2t)^4)/12 = (390k-194k)/12=16.3k mm4=1.63e-8 m4 +E=68.9GPa +P_cr=pi^2*E*I/(K*L)^2 =9.87*68.9e9*1.63e-8/0.16=69.3N? Wait compute: 68.9e9*1.63e-8=1123, *9.87=11086, /0.16=69286? +Let's compute accurately: 0.4^2=0.16, 11086/0.16=69286N → Actually earlier calc 217N was for 20x20x1.5 L=0.6m. For this +case P_cr=69kN? No, re-evaluate: I=16.3e3 mm4 =16.3e3*(1e-3)^4=16.3e3*1e-12=1.63e-8 correct. So P_cr=pi^2*68.9e9*1.63e- +8/0.16=69k? 68.9e9*1.63e-8=1123, *9.87=11086, /0.16=69287N=69kN → huge SF. Good. + +But GPU load 15kg=147N vertical + moment. SF=69287/147=471 >>2.0 PASS. + +Thermal: open-frame natural convection +15% vs closed case (measured). GPU temp drops 8-12°C. + +Glass diaphragm: 6mm tempered 300x300mm side panel adds shear stiffness, freq shift expected +18% in tap-test. + +Validation T1: + Theoretical P_cr=69kN for 25x25x2 L=0.4m + Measure: apply 20kg (196N) at top, measure lateral deflection <0.5mm + Expected <0.2mm at 20kg + Pass if <0.5mm + Fail: if >1mm → check K factor (loose bolts), tighten to 5N·m, re-test + +Validation T14: + Baseline freq with glass: expected 95Hz ±5Hz (healthy) + Damaged (loose rivet): 88Hz → DI=|88-95|/95=0.074 >0.05 → REWORK + Measure: MPU6050 tap 5N at node A, FFT 0-200Hz, peak detection + Pass if DI<0.05 + +2. CUT-LIST JSON — T20 INPUT +------------------- +{ + "project_id": "P2_CHASSIS_001", + "version": "v9", + "kerf_mm": 2, + "parts": [ + {"part_id": "P2-UPRIGHT-001", "material": "square_tube_25x25x2_6061", "length_mm": 400, "qty": 4, "holes": [{ +"pos_mm": 20, "dia_mm": 6, "type": "base"}, {"pos_mm": 380, "dia_mm": 6, "type": "top"}], "cut_angle_deg": 0}, + {"part_id": "P2-BASE-LONG-001", "material": "L_profile_25x25x2", "length_mm": 350, "qty": 2, "holes": [{"pos_mm": +10, "dia_mm": 6}, {"pos_mm": 340, "dia_mm": 6}]}, + {"part_id": "P2-BASE-SHORT-001", "material": "L_profile_25x25x2", "length_mm": 300, "qty": 2}, + {"part_id": "P2-GPU-BRACE-001", "material": "flat_bar_25x3", "length_mm": 250, "qty": 1, "holes": [{"pos_mm": 20, +"dia_mm": 6, "type": "slot", "slot_length_mm": 20}]}, + {"part_id": "P2-MB-TRAY-001", "material": "flat_bar_40x4", "length_mm": 305, "qty": 2, "holes": [{"pos_mm": 50, +"dia_mm": 4, "type": "mb_mount"}, {"pos_mm": 150, "dia_mm": 4}, {"pos_mm": 250, "dia_mm": 4}]}, + {"part_id": "P2-GLASS-PANEL-001", "material": "tempered_glass_6mm_300x300", "qty": 1, "edge_polish": true, "holes": +[{"pos_mm": 10, "dia_mm": 6, "type": "mount"}]}, + {"part_id": "FASTENERS", "material": "M6_bolt_nyloc_washer", "qty": 24} + ], + "stock_required": {"square_tube_25x25x2_m": 1.6, "L_profile_25x25x2_m": 1.3, "flat_bar_25x3_m": 0.25, +"flat_bar_40x4_m": 0.61}, + "waste_estimate_percent": 9.2 +} + +3. FMEA — T22 +------------------- +FM-01: Euler buckling of upright under GPU weight + transport shock 3g + Cause: 15kg GPU + 3g shock = 441N >? No, 441N < 69kN safe. But if using 20x20x1.5 L=0.6m P_cr=217N, then 441N >217N → +buckling + S=8 (GPU damage ■20k), O=2 (shock rare), D=7 (visual bow) → RPN=112 → redesign if using slender tube + Mitigation: mandatory 25x25x2 minimum, L≤0.5m, or add diagonal brace, check P_cr calc before build + +FM-02: Glass panel shatter due to edge chip + Cause: unpolished edge, stress concentration, thermal shock Tagaytay 20-50°C surface ∆T=30K + S=7 (injury cut), O=3, D=5 (edge inspection) → RPN=105 → redesign + Mitigation: require tempered glass, polished edges radius ≥1mm, rubber grommet in mount holes, slotted holes for T8 +expansion 1.7mm + +FM-03: Electrical short, no grounding + Cause: PSU chassis not grounded to Al frame, resistance >0.1Ω + S=9 (electrocution), O=2, D=3 (multimeter) → RPN=54 monitor but critical severity + Mitigation: star grounding, 2.5mm² green wire, <0.1Ω measured, fuse 5A, thermal cutoff 70°C + +FM-04: Vibration QC false pass due to MPU6050 not calibrated + Cause: offset not zeroed + S=4, O=4, D=6 → RPN=96 monitor + Mitigation: calibrate on flat surface, baseline 3 taps averaged, store in seeds.db + +Highest RPN 112 → redesign enforced for slender variant. Main variant RPN max 96 → allowed. + +4. FIELD PROTOCOL A4 — T23 +------------------- +Header: P2-____ | Date | Operator | Weather | GPS | v9 +Photo Grid: + [ ] Uprights cut, label with QR + [ ] Base frame dry-fit squareness diagonal measure (should be equal ±1mm) + [ ] GPU brace slot + [ ] Glass panel edge polish close-up + [ ] Assembled frame with motherboard tray + [ ] Tap-test setup MPU6050 at node A + +Measurement Table: + Upright length 400±0.5mm, diagonal base equal ±1mm, hole pos ±0.2mm, grounding <0.1Ω, + freq baseline 95±5Hz, DI <0.05, deflection under 20kg <0.5mm + +QR: seeds.db + evidence/P2_*.jpg + +Quick-ref: M6 torque 5N·m, grounding check, glass handling gloves, 15% convection bonus + +5. TRAINING — T26 +------------------- +H1: cut square tube, deburr inside (critical for cable), squareness ±0.5° +H2: assemble star pattern torque, mount MPU6050 with double-sided tape, glass mount with rubber, wiring +Quiz: Q1 P_cr for 25x25x2 L=0.4? A 69kN, Q2 grounding max? 0.1Ω, Q3 DI threshold? 0.05, Q4 glass edge? polished, Q5 +thermal expansion 2.5m 30K? 1.7mm + +6. COMPLIANCE — T27 +------------------- +Checklist: grounding <0.1Ω, fuse 5A, no 220V exposed, glass polished + tempered cert, sharp edge ≥2mm, tip-over test +15° tilt no topple, thermal shutdown +Certificate P2_CERT_xxxx.pdf blocks sale if fail. + +7. REVENUE — T28 +------------------- +A ■3,500 standard, B ■4,500 with RGB + glass, C ■2,800 bare frame +Target gamers in Dasmariñas, Tagaytay cafes. Demo thermal drop with HWInfo screenshot. + +================================================================================ +END P2 BLUEPRINT v9 +================================================================================ + FILE: P6_MARKET_CANOPY_BLUEPRINT_v2.txt — 11760 bytes +================================================================================ +P6 MARKET CANOPY BLUEPRINT v2 — UPGRADED — v9 FULL SPEC +Size 2.0×2.5m, Deploy 15s, One Person, Wind Rated 80km/h with Guy Wires +Cost ■1,690 (was ■1,810) optimized via T20 | Sell ■5,500-6,500 | Margin 3.25x +Status: GREEN — Build Now | Critical: Wind Uplift T12 + FMEA RPN 192→45 after fix +================================================================================ + +1. PHYSICS — T4 SCISSOR + T12 WIND + T1 BUCKLING + T3 BOLT + T19 UNCERTAINTY +------------------- +Scissor: L=1.0m bar, 4 pairs per side, total 16 bars. Theta closed=10°, open=45° +h=2*L*sin(theta). h0=2*1.0*sin10°=0.347m per unit. h_open=2*1.0*sin45°=1.414m per unit. +For 2 units stacked vertical: h_closed=0.694m, h_open=2.828m → but we use 2.5m target. +Lambda= h/h0 = 2.5/0.694? Wait earlier calc Λ=6.51 for full canopy. Let's use measured: deployed 2.5m, stowed 0.38m → +Λ=6.58. + +Grübler-Kutzbach: M=3(n-j-1)+Σfi. For scissor: n=8 bars + ground =9? Actually per mechanism. Need M=1 for single DOF +deploy. Verified via Python. + +Wind: q=0.5*rho*v^2*Cp, rho=1.225, v=80km/h=22.22m/s, Cp=1.2 canopy (uplift) +q=0.5*1.225*22.22^2*1.2=0.6125*493.7*1.2=362.8Pa? Let's compute: 0.5*1.225=0.6125, v^2=493.8, *0.6125=302.5, *1.2=363Pa. + Earlier 296Pa close. Use 363Pa. +A=2.0*2.5=5.0m2, F=q*A=1815N uplift. Earlier 1422N using 296Pa. Use worst 1815N. +Per pivot: 4 corners share → 454N per corner uplift. But drag also. + +Bolt check: M6 bolt A=28.3mm2, tau=454/28.3=16MPa <60MPa PASS, bearing sigma_br=F/(d*t)=454/(6*4)=18.9MPa <120 PASS for +40x4 bar. +For 25x3 bar: sigma_br=454/(6*3)=25.2MPa PASS but SF=120/25.2=4.76, but earlier calc 1.16 was bending? Need bending +check: +Bending at pivot hole: M=F*eccentricity, but simplified. + +Critical upgrade: 25x3 → 40x4 flat bar. Section modulus Z=b*h^2/6=4*40^2/6? Wait orientation. For flat bar on edge, +bending about weak axis. +Let's do bending of scissor bar under wind: L=1.0m, load uniform? Approx point load 454N at center? Actually wind +distributed. +Worst case: bar as beam with 454N at mid, M=PL/4=454*1.0/4=113.5Nm +Z for 40x4 on flat (weak): Z= (width*thickness^2)/6 =40*16/6=106.7mm3=1.067e-7 m3 +Sigma= M/Z=113.5/1.067e-7=1.064e9 Pa=1064MPa > yield 276MPa FAIL → need orientation on edge. + +If bar oriented on edge (40mm vertical): Z= thickness*height^2/6=4*40^2/6=1066.7mm3=1.067e-6 m3, sigma=113.5/1.067e- +6=106MPa <145MPa (3003) PASS SF=1.36. With 6061-T6 SF=2.6. +So orientation critical: 40mm dimension vertical (strong axis). + +For 25x3 on edge: Z=3*25^2/6=312.5mm3, sigma=113.5/3.125e-7=363MPa > yield FAIL. So 25x3 fails. Hence upgrade to 40x4 +on edge mandatory. + +SF calculation: yield 145MPa (3003) /106MPa=1.37, but with 6061-T6 276/106=2.6. Use 6061-T6 for P6 scissor bars, 3003 +for P1 latch. Document. + +Validation T12: + Theoretical q=363Pa @80km/h, F=1815N total + Measure: anemometer + spring scale on corner at 40km/h (11.11m/s) q=90.7Pa F=453N total → per corner 113N, scale +should read ~11.5kg + Expected at 40km/h: 100-130N per corner + Pass if measured within ±20% of predicted + Fail: if measured > predicted 20% → increase Cp to 1.5, reduce rated wind to 60km/h label, mandatory guy wires + +Validation T1 for P6 leg as column: 40x4 flat bar as column L=1.0m, K=1.0, I= thickness*height^3/12=4*40^3/ +12=21333mm4=2.13e-8 m4, P_cr=pi^2*68.9e9*2.13e-8/1=14480N=14.4kN >> 454N PASS SF=31 + +2. CUT-LIST JSON — T20 + T21 +------------------- +{ + "project_id": "P6_CANOPY_2.0x2.5_v9", + "version": "v9", + "kerf_mm": 2, + "orientation_critical": "40mm vertical (strong axis) for all scissor bars", + "parts": [ + {"part_id": "P6-SCISSOR-BAR-001", "material": "flat_bar_6061_40x4", "length_mm": 1000, "width_mm": 40, +"thickness_mm": 4, "holes": [{"pos_mm": 50, "dia_mm": 8, "type": "pivot"}, {"pos_mm": 500, "dia_mm": 8, "type": +"center_pivot"}, {"pos_mm": 950, "dia_mm": 8, "type": "pivot"}], "cut_angle_deg": 0, "qty": 16, "edge_orientation": +"40mm vertical", "deburr": true}, + {"part_id": "P6-FOOT-001", "material": "flat_bar_6061_40x4", "length_mm": 200, "width_mm": 40, "thickness_mm": 4, +"holes": [{"pos_mm": 20, "dia_mm": 8, "type": "pivot"}, {"pos_mm": 100, "dia_mm": 10, "type": "anchor_hole"}], "qty": +8}, + {"part_id": "P6-TAB-001", "material": "flat_bar_3003_25x3", "length_mm": 80, "width_mm": 25, "thickness_mm": 3, +"holes": [{"pos_mm": 20, "dia_mm": 8}], "qty": 8}, + {"part_id": "P6-SLEEVE-001", "material": "Al_round_tube_20x2", "length_mm": 40, "dia_outer_mm": 20, "dia_inner_mm": +16, "qty": 16, "purpose": "bushing to reduce bearing stress"}, + {"part_id": "P6-TARP-001", "material": "tarp_heavy_duty_2x2.5m_blue", "qty": 1, "grommets": 8, "wind_vents": 2}, + {"part_id": "P6-GUY-WIRE-001", "material": "nylon_rope_6mm_5m", "qty": 4, "with_hook": true}, + {"part_id": "FASTENERS", "material": "M8_bolt_nyloc_washer_40x4", "qty": 32, "torque_Nm": 10, "critical": "upgrade +from M6 due to FMEA RPN 192"} + ], + "stock_required": {"flat_bar_40x4_6061_m": 18.4, "flat_bar_25x3_m": 0.64, "round_tube_20x2_m": 0.64, "tarp": 1, +"rope_6mm_m": 20}, + "cost_breakdown_php": {"Al_40x4_6061_120_per_m": 2208, "tarp": 450, "rope": 200, "bolts": 320, "total": 3178, +"optimized_via_T20": 1690, "note": "scrap price 60-80/kg reduces to 1690 if junkshop mixed, else 3178 new"}, + "waste_estimate_percent": 7.5, + "weight_kg": 18.5, + "deploy_time_s": 15, + "persons_required": 1 +} + T20 optimizer: stock 3m lengths, demand 1.0m x16 → 2 per stock with 0.996m waste? Actually 3m stock: 2x1.0m + kerf +2x2mm=2004mm waste 996mm → 33% waste. Better use 2m stock: 2x1.0m waste 0? Actually 2m stock -2*1000 -2*2= -4mm? 2000- +2000-4=-4 need 2.004m → need 2.1m stock. So order 2.1m or 6m stock cut 5x with 990mm waste. MILP finds best. + +3. FMEA — T22 — CRITICAL +------------------- +FM-01: Rivet shear at scissor pivot under 80km/h gust + Cause: wind F=1815N, per pivot 454N, rivet shear area 20mm2 (4mm dia), tau=22.7MPa <60 PASS but dynamic gust factor +2x → 45MPa still <60 but bearing fails: sigma_br=454/(4*4)=28MPa <120 PASS. However earlier RPN calc used M6 618N +capacity vs 1422N? Let's recalc: single rivet capacity shear = tau_allow * A =60MPa*12.6mm2=756N. 4 rivets per side? +Actually need to recompute RPN example in brief used 618N capacity vs 1422N load → that was total, not per pivot. So +worst total 1815N vs 4 rivets 3024N capacity PASS but close. Use M8 upgrade to be safe. + S=8 (collapse, injury), O=6 (80km/h occurs 5x/year Tagaytay typhoon edge), D=4 (tap-test every 10 deploys) + RPN=192 → REDESIGN MANDATORY per T22 + Mitigation: upgrade to M8 bolts (A=50.3mm2, capacity 3018N per bolt), add 4x guy wires 45°, reduce allowable to 60km/ +h without guys, 80km/h with guys, add wind rating label, add collapse warning sign + After mitigation: O=3 (with guys, collapse less likely), D=2 (guy tension check visual), RPN=8*3*2=48 PASS + +FM-02: Scissor bar bending failure due to wrong orientation (flat vs edge) + Cause: 40mm flat orientation (weak axis) Z=106mm3 sigma=1064MPa > yield + Effect: permanent bend, canopy sag, collapse + S=8, O=5 (helper error common), D=5 (visual orientation check) + RPN=200 → REDESIGN MANDATORY + Mitigation: color mark strong axis (red dot on 40mm edge), field protocol photo of orientation, training quiz, jig +that only fits one orientation + After: O=1, D=2, RPN=16 PASS + +FM-03: Foot anchor pull-out on soft soil, canopy becomes projectile + Cause: no anchoring, uplift 1815N > weight 18.5kg*9.81=181N + S=9 (projectile injury), O=7 (Tagaytay soft volcanic soil), D=6 (no test) + RPN=378 → CRITICAL REDESIGN + Mitigation: mandatory ground anchors (40cm rebar stakes 4x), 200N pull test per foot, guy wires to stakes, label +"ANCHOR REQUIRED - DO NOT USE WITHOUT GUY WIRES ABOVE 40KM/H" + After: O=2, D=2, RPN=36 PASS + +FM-04: Tarp tear at grommet + Cause: stress concentration, K_t=3.0 at grommet hole + S=5, O=4, D=5 → RPN=100 borderline + Mitigation: double tarp at grommet, washer backing, wind vents 2x to reduce q by 20%, inspect every 20 deploys + After: RPN=40 PASS + +FM-05: Pinch point during deploy (finger caught in scissor) + Cause: scissor closing, gap goes 25mm→0mm + S=6 (crush), O=4, D=7 (no guard) + RPN=168 → REDESIGN + Mitigation: handle extension 200mm away from scissor, deploy procedure two-hand on handle only, warning label, gloves +required, training + After: D=2, RPN=48 PASS + +Highest RPN before mitigation 378 → after mitigation max 48 → build allowed only after mitigation implemented and +verified via T27 audit. + +4. FIELD PROTOCOL A4 — T23 — DETAILED +------------------- +Header: P6-____ | Date | Operator H1/H2 | Weather wind ___km/h, temp, RH | GPS | Version v9 + +Photo Grid (6 mandatory): + [ ] Stock 40x4 bars with QR tape, ruler + [ ] Cut 16 bars laid out, orientation mark visible (red dot) + [ ] Drilled holes, caliper hole pos + [ ] Foot + anchor + guy wire assembly + [ ] Deployed canopy side view with 2m ruler, person for scale + [ ] Stowed canopy compact, weight scale + +Measurement Table: + Bar length 1000±0.5mm, hole pos 50/500/950 ±0.2mm, hole dia 8.0±0.1mm, + Orientation check 40mm vertical YES/NO, Torque M8 10N·m (click wrench), + Deploy time <20s, Anchor pull test 200N per foot (luggage scale), Tap-test freq baseline, + Wind rating label attached YES/NO, Guy wires 4x present YES/NO + +QR: seeds.db entry + evidence/P6_*.jpg + video deploy 15s + +Signature: Operator ____ Witness ____ Timestamp ____ + +Quick-ref cards: + M8 torque 10N·m, wind: <40km/h no guys, 40-80km/h with guys, >80km/h stow mandatory, + Anchor pull 200N, orientation red dot up, emergency: pull tarp release cord + +5. SUPPLY CHAIN INTEGRATION — T24/T25 +------------------- +Junkshop: Tagaytay Mahogany Ave scrap, 40x4 flat bar 6061 mixed ■80/kg, check method: visit Mon/Wed, photo inventory, +QR scan on entry +Glass not needed for P6, but tarp: Divisoria market or Shopee "heavy duty tarp 2x2.5m" ■450, lead 2 days, return 7 days +Rope: hardware store 6mm nylon ■10/m, M8 bolts ■10 each +Inventory: each bar QR with masking tape, scan → inventory.json → T20 optimizer + +6. TRAINING — T26 +------------------- +H1: cut 40x4, feed rate 3mm/s (thicker), coolant WD40, kerf 2mm, orientation jig, squareness +H2: drill 8mm with center punch, deburr, assemble with M8 star pattern, torque 10N·m, anchor install 40cm rebar, guy +tension equal, tap-test 3 nodes (expected freq 45Hz, 60Hz, 75Hz), DI threshold 0.05 +Quiz: Q1 bar orientation? 40mm vertical, Q2 wind rating with guys? 80km/h, without? 40km/h, Q3 anchor pull test? 200N, +Q4 M8 torque? 10N·m, Q5 deploy time target? 15s + +7. COMPLIANCE — T27 + ------------------- +Checklist: wind label (80km/h with guys, 40 without), guy wires 4x present, anchor pull test log, no sharp edges ≥2mm, +pinch point warning, collapse warning sign, tarp fire retardant? not required but note, torque log, tap-test DI<0.05, +photo evidence 6x, QR linked, certificate +Certificate P6_CERT_xxxx.pdf blocks sale if any fail, especially anchor test and orientation. + +8. REVENUE — T28 — A/B TEST +------------------- +Variants: A ■5,500 standard blue tarp, B ■6,500 custom print (market name), C ■4,500 bare frame +Track: FB Marketplace views, inquiries, conversion, time-to-sale +Sales funnel: listing video 15s deploy → PM → site visit → demo one-person deploy → close → delivery tricycle ■200 → +photo with customer → review → referral 10% discount +Financial: cost optimized ■1,690 via scrap, sell ■5,500 margin 3.25x, 1 unit/day = ■3,810 profit, 20 days = ■76k/month + +================================================================================ +END P6 BLUEPRINT v2 v9 +================================================================================ + FILE: SA_PANTOGRAPH_BLUEPRINT.txt — 5846 bytes +================================================================================ +SA PANTOGRAPH PLOTTER BLUEPRINT — v9 FULL SPEC +Stage 1 Pen 0.039mm/step, Jacobian IK, G-code Subset, Safety Interlock +Cost ■1,200 | Time 8 hrs | Resolution 0.039mm | Work Area 300x300mm cardboard +Status: GREEN — Build Now | Purpose: Print templates for P5/P6 hubs, Canva forms +================================================================================ + +1. KINEMATICS — T4 + T11 + T6 +------------------- +4-bar parallelogram pantograph, 2× stepper motors at base, arms L1=200mm, L2=300mm, scale k=2.0 (output = input *2) +Resolution: steps_per_rev=200, microstep=16, pitch=8mm (M8 threaded rod or GT2 belt 2mm pitch 20 teeth → 40mm/rev) +If belt: steps/mm = (200*16)/40=80 steps/mm → 0.0125mm/step theoretical, but pantograph k=2 → 0.025mm/step output +If threaded rod: 8mm/rev → 3200 steps/rev /8=400 steps/mm → 0.0025mm/step input → 0.005mm output but slower +Design uses GT2 belt for speed: 0.025mm/step, but measured 0.039mm/step due to backlash 0.1mm + +Jacobian: v = J * theta_dot, J = [[-L1*sin(theta1)-L2*sin(theta1+theta2), -L2*sin(theta1+theta2)], [L1*cos( +theta1)+L2*cos(theta1+theta2), L2*cos(theta1+theta2)]] +Inverse kinematics: given (x,y), solve theta2 = acos((x^2+y^2-L1^2-L2^2)/(2*L1*L2)), theta1= atan2(y,x)-atan2(L2*sin( +theta2), L1+L2*cos(theta2)) + +Validation T11: + Theoretical resolution 0.025mm/step (belt) or 0.039 measured + Measure: command 1000 steps X, caliper distance should be 25mm (or 39mm) + Expected 25±1mm for belt, 3.9±0.2mm for 100 steps + Pass if <0.05mm backlash measured via dial indicator back-and-forth + Fail: tighten belt, add anti-backlash spring, re-calibrate steps/mm + +2. CUT-LIST JSON — T20 +------------------- +{ + "project_id": "SA_PANTOGRAPH_STAGE1_PEN", + "version": "v9", + "kerf_mm": 2, + "parts": [ + {"part_id": "SA-BASE-001", "material": "plywood_12mm_400x400", "qty": 1, "holes": [{"pos_mm": 50, "dia_mm": 6}]}, + {"part_id": "SA-ARM-L1-001", "material": "flat_bar_25x3_6061", "length_mm": 200, "qty": 2, "holes": [{"pos_mm": 10, +"dia_mm": 6}, {"pos_mm": 190, "dia_mm": 6}]}, + {"part_id": "SA-ARM-L2-001", "material": "flat_bar_25x3_6061", "length_mm": 300, "qty": 2, "holes": [{"pos_mm": 10, +"dia_mm": 6}, {"pos_mm": 290, "dia_mm": 6}]}, + {"part_id": "SA-PEN-HOLDER-001", "material": "Al_L_20x20x2", "length_mm": 50, "qty": 1}, + {"part_id": "ELECTRONICS", "parts": [{"id": "stepper_NEMA17_1.5A", "qty": 2}, {"id": "A4988_driver", "qty": 2}, { +"id": "Arduino_Uno", "qty": 1}, {"id": "GT2_belt_1m", "qty": 2}, {"id": "GT2_pulley_20T", "qty": 2}, {"id": +"bearing_608", "qty": 8}]}, + {"part_id": "FASTENERS", "material": "M6_bolt_washer", "qty": 16} + ], + "stock_required": {"flat_bar_25x3_m": 1.0, "plywood_m2": 0.16}, + "work_area_mm": "300x300", + "resolution_mm": 0.039 +} + +3. FMEA — T22 +------------------- +FM-01: Stepper stall due to friction, missed steps, drawing distorted + Cause: Al arm friction at pivot, no bearing, load > motor torque 0.4Nm + S=4, O=5, D=6 → RPN=120 → redesign + Mitigation: use 608 bearings at all pivots, lubricate, reduce acceleration to 500mm/s2, add homing + After: RPN=40 PASS + +FM-02: Pinch point finger in scissor-like arms + S=6, O=4, D=7 → RPN=168 → redesign + Mitigation: enclosure around base motors, warning label, emergency stop button, speed limit 20mm/s during demo + After: RPN=48 + +FM-03: Electrical short 12V to Al frame + S=9, O=2, D=3 → RPN=54 but severity 9 → mandatory grounding, fuse + Mitigation: insulated mounts, <0.1Ω ground, 5A fuse, thermal shutdown + +FM-04: Pen not contacting paper due to Z variation + Cause: cardboard warp ±2mm + S=3, O=6, D=5 → RPN=90 monitor + Mitigation: spring-loaded pen holder 10mm travel, 0.5N preload + +4. G-CODE SUBSET — SUPPORTED +------------------- +G00 X Y rapid, G01 X Y F feed, G28 home, M03 pen down, M05 pen up +Example square 100mm: +G28 +G00 X0 Y0 +M03 +G01 X100 Y0 F1000 +G01 X100 Y100 +G01 X0 Y100 +G01 X0 Y0 +M05 +G00 X0 Y0 + +Validation: run square, measure diagonal 141.4±0.5mm, squareness 90±0.5° + +5. SAFETY INTERLOCK — T27 +------------------- +- Emergency stop button (red mushroom) cuts 12V to drivers, must be within arm reach +- Interlock guard: acrylic cover over belt/pulley, microswitch stops if opened + - Homing sequence mandatory on power-up, slow 10mm/s +- Current limit A4988 set to 1.0A (70% of motor 1.5A) via Vref 0.7V +- Pinch warning labels at all pivots +- Max speed 20mm/s when guard open, 50mm/s when closed + +Field protocol: photo of e-stop, guard, grounding, pen spring, test square measured + +6. FIELD PROTOCOL — T23 +------------------- +Header SA-____ | Date | Operator | Weather | v9 +Photo grid: base with motors, arms with bearings, pen holder spring, e-stop button, guard, test square drawing with +ruler +Measurement: arm lengths ±0.2mm, backlash <0.05mm, squareness 90±0.5°, resolution 0.039±0.005mm, grounding <0.1Ω, e- +stop functional YES/NO + +7. TRAINING — T26 +------------------- +H1: cut 25x3, drill with jig, bearing press fit +H2: wire steppers (4 wires), A4988 Vref adjust, Arduino flash GRBL, belt tension, homing, G-code run +Quiz: Q1 resolution? 0.039mm/step, Q2 e-stop cuts? 12V, Q3 current limit? 1.0A, Q4 G-code pen down? M03, Q5 backlash +max? 0.05mm + +8. COMPLIANCE — T27 +------------------- +Checklist: e-stop present + functional, guard interlock, grounding <0.1Ω, fuse 5A, pinch labels, speed limit, homing +works, test square within tolerance, no exposed 220V +Certificate SA_CERT_xxxx.pdf blocks sale/use if fail. + +9. REVENUE — Not direct revenue but enables P5/P6 template printing, saves 2 hrs manual layout per canopy, ROI 1 canopy. + +================================================================================ +END SA BLUEPRINT v9 +================================================================================ + FILE: P1_NOVELTY_LATCH_BLUEPRINT_v10.txt — 162 bytes +P1 Latch blueprint v10 - Cost 300 Sell 1800 - See T2 T3 +Cut-list JSON: {"parts":[{"part_id":"P1-ARM-001","material":"flat_bar_3003_25x3","length_mm":80,"qty":5}]} + FILE: P2_TECH_CHASSIS_BLUEPRINT_v10.txt — 58 bytes +P2 Chassis blueprint v10 - Cost 800 Sell 3500 - See T1 T14 + FILE: P6_MARKET_CANOPY_BLUEPRINT_v3.txt — 106 bytes +P6 Canopy blueprint v3 - Cost 1690 Sell 5500 - Orientation 40mm vertical mandatory - Wind 80km/h with guys + FILE: SA_PANTOGRAPH_BLUEPRINT_v10.txt — 67 bytes +SA Pantograph blueprint v10 - Resolution 0.039mm/step - Jacobian IK + FILE: COMPLIANCE_CHECKLIST.json — 7494 bytes +{ + "version": "v9", + "auditor": "T27 Compliance Auditor", + "blocking_rule": "Sale blocked if any CRITICAL checklist item FAIL, certificate not generated", + "projects": { + "P1_NOVELTY_LATCH": { + "critical_items": [ + { + "id": "P1-C-01", + "check": "No sharp edges radius >=2mm", + "method": "Radius gauge + finger test (gloved)", + "severity": "HIGH", + "required": true + }, + { + "id": "P1-C-02", + "check": "No pinch points gap <5mm or >25mm", + "method": "Feeler gauge", + "severity": "MEDIUM", + "required": true + }, + { + "id": "P1-C-03", + "check": "Load test 2x rated 50N -> 100N hold 1min no deformation", + "method": "Luggage scale + timer", + "severity": "CRITICAL", + "required": true + }, + { + "id": "P1-C-04", + "check": "Material cert 3003/5052 not 6061-T6 for arm", + "method": "Spark test + deflection test 1kg 4-6mm", + "severity": "CRITICAL", + "required": true + }, + { + "id": "P1-C-05", + "check": "Deburr log complete + photo", + "method": "Field sheet photo", + "severity": "MEDIUM", + "required": true + }, + { + "id": "P1-C-06", + "check": "Catch angle 28-35\u00b0", + "method": "Protractor", + "severity": "MEDIUM", + "required": true + } + ], + "non_critical": [ + { + "id": "P1-NC-01", + "check": "Surface finish 120 grit", + "method": "Visual" + }, + { + "id": "P1-NC-02", + "check": "QR code linked to seeds.db", + "method": "Scan" + } + ], + "certificate": "P1_CERT_{id}.pdf", + "sign_off": [ + "Operator", + "Witness" + ] + }, + "P2_TECH_CHASSIS": { + "critical_items": [ + { + "id": "P2-C-01", + "check": "Electrical grounding <0.1\u03a9", + "method": "Multimeter", + "severity": "CRITICAL", + "required": true + }, + { + "id": "P2-C-02", + "check": "Fuse 5A present + thermal shutdown 70\u00b0C", + "method": "Visual + test", + "severity": "CRITICAL", + "required": true + }, + { + "id": "P2-C-03", + "check": "No exposed 220V", + "method": "Visual", + "severity": "CRITICAL", + "required": true + }, + { + "id": "P2-C-04", + "check": "Glass tempered cert + polished edges radius >=1mm", + "method": "Cert + radius gauge", + "severity": "HIGH", + "required": true + }, + { + "id": "P2-C-05", + "check": "Tip-over test 15\u00b0 tilt no topple", + "method": "Tilt table", + "severity": "MEDIUM", + "required": true + }, + { + "id": "P2-C-06", + "check": "Sharp edges >=2mm", + "method": "Radius gauge", + "severity": "MEDIUM", + "required": true + }, + { + "id": "P2-C-07", + "check": "Vibration QC DI<0.05", + "method": "MPU6050 tap-test", + "severity": "MEDIUM", + "required": true + } + ], + "certificate": "P2_CERT_{id}.pdf" +}, +"P6_MARKET_CANOPY": { + "critical_items": [ + { + "id": "P6-C-01", + "check": "Wind rating label attached: 80km/h with guys, 40km/h without", + "method": "Visual", + "severity": "CRITICAL", + "required": true + }, + { + "id": "P6-C-02", + "check": "Guy wires 4x present + equal tension", + "method": "Visual + hand tension", + "severity": "CRITICAL", + "required": true + }, + { + "id": "P6-C-03", + "check": "Anchor pull test 200N per foot logged", + "method": "Luggage scale 20kg", + "severity": "CRITICAL", + "required": true + }, + { + "id": "P6-C-04", + "check": "Bar orientation 40mm vertical (strong axis) for all 16 bars", + "method": "Photo + red dot + jig", + "severity": "CRITICAL", + "required": true + }, + { + "id": "P6-C-05", + "check": "M8 bolts torque 10N\u00b7m logged", + "method": "Torque wrench click", + "severity": "HIGH", + "required": true + }, + { + "id": "P6-C-06", + "check": "No sharp edges >=2mm + pinch warning label", + "method": "Radius gauge + label", + "severity": "HIGH", + "required": true + }, + { + "id": "P6-C-07", + "check": "Collapse warning sign attached", + "method": "Visual", + "severity": "MEDIUM", + "required": true + }, + { + "id": "P6-C-08", + "check": "Tap-test DI<0.05 at 3 nodes", + "method": "MPU6050", + "severity": "MEDIUM", + "required": true + }, + { + "id": "P6-C-09", + "check": "Deploy time <20s one person + video evidence", + "method": "Timer + video", + "severity": "MEDIUM", + "required": true + } + ], + "certificate": "P6_CERT_{id}.pdf", + "blocking": "If P6-C-01 to C-05 fail, BLOCK SALE" + }, + "SA_PANTOGRAPH": { + "critical_items": [ + { + "id": "SA-C-01", + "check": "Emergency stop button present + functional cuts 12V", + "method": "Press test + multimeter", + "severity": "CRITICAL", + "required": true + }, + { + "id": "SA-C-02", + "check": "Interlock guard over belt/pulley + microswitch stops if opened", + "method": "Open guard, try move", + "severity": "CRITICAL", + "required": true + }, + { + "id": "SA-C-03", + "check": "Grounding <0.1\u03a9", + "method": "Multimeter", + "severity": "CRITICAL", + "required": true + }, + { + "id": "SA-C-04", + "check": "Fuse 5A + current limit 1.0A (Vref 0.7V)", + "method": "Visual + measure Vref", + "severity": "HIGH", + "required": true + }, + { + "id": "SA-C-05", + "check": "Pinch warning labels at all pivots", + "method": "Visual", + "severity": "MEDIUM", + "required": true + }, + { + "id": "SA-C-06", + "check": "Homing sequence works + slow 10mm/s", + "method": "Power-up test", + "severity": "MEDIUM", + "required": true + }, + { + "id": "SA-C-07", + "check": "Test square 100mm diagonal 141.4\u00b10.5mm + squareness 90\u00b10.5\u00b0", + "method": "Caliper + square", + "severity": "MEDIUM", + "required": true + } + ], + "certificate": "SA_CERT_{id}.pdf" + } + }, + "audit_procedure": { + "script": "compliance_audit.py --project P6 --id SEED_0001", + "steps": [ + "Load checklist JSON", + "Load field sheet + photos", + "Check training_log for operator cert", + "Run tap-test verification", + "Generate PDF cert with QR", + "If fail, block sale, log to 11_RESULTS_DATABASE/", + "If pass, allow sale, log" + ], + "log_path": "11_RESULTS_DATABASE/compliance_log.csv" + } +} + FILE: COMPLIANCE_CHECKLIST_v2.json — 108 bytes +{"version":"v10","projects":{"P6_MARKET_CANOPY":{"critical_items":[{"id":"P6-C-01","check":"Wind label"}]}}} + FILE: SUPPLIER_REGISTRY.json — 4113 bytes +{ + "version": "v9", + "last_verified": "2026-07-15", + "location": "Tagaytay/Cavite, Philippines", + "suppliers": [ + { + "id": "JUNK_MAHOGANY_001", + "name": "Mahogany Ave Scrapyard (main)", + "category": "aluminum_scrap", + "address": "Mahogany Ave, Tagaytay, Cavite", + "gps": "14.1067,120.9372", + "contact": "Kuya Roger - FB: Roger Scrap Tagaytay", + "phone": "PH +63 9XX XXX XXXX (verify on visit)", + "price_kg_php": { + "range": "60-120", + "avg": 80, + "last_price": 80, + "last_verified": "2026-07-10", + "trend": "stable" + }, + "stock_check_method": "Visit Mon/Wed 8AM, photo inventory, QR scan each piece on entry", + "payment_terms": "Cash only, no receipt, weigh on site", + "transport_cost_php": 150, + "lead_time": "0 days (on-site)", + "quality_notes": "Mixed 6061, 3003, 5052. Must spark test. 40x4 flat bar rare, ask to reserve. 25x3 common.", + "reliability_score": 8 + }, + { + "id": "JUNK_DASMA_002", + "name": "Dasmari\u00f1as Industrial Scrap", + "category": "aluminum_scrap_backup", + "address": "Dasmari\u00f1as, Cavite (30km)", + "gps": "14.329,120.936", + "price_kg_php": { + "range": "70-130", + "avg": 90, + "last_verified": "2026-07-05" + }, + "stock_check_method": "Call first, FB page", + "transport_cost_php": 300, + "lead_time": "1 day", + "reliability_score": 6 + }, + { + "id": "GLASS_TAGAY_001", + "name": "Tagaytay Glass & Aluminum Works", + "category": "glass", + "services": [ + "tempered_glass", + "drilling", + "polishing", + "cutting" + ], + "price_per_sqm_php": { + "6mm_tempered": 1200, + "12mm_tempered": 2500, + "drilling_per_hole": 50, + "polishing_per_m": 100 + }, + "address": "Tagaytay City Proper", + "lead_time_days": 3, + "return_policy": "No return on custom cut", + "quality_notes": "Require polished edges for P2. Ask for tempered cert.", + "last_verified": "2026-07-12" + }, + { + "id": "HARDWARE_TAGAY_001", + "name": "Citi Hardware Tagaytay / MC Home", + "category": "fasteners_tools", + "items": { + "M6_bolt_nyloc": 8, + "M8_bolt_nyloc": 10, + "M6_rivet": 3, + "M8_washer": 2, + "nylon_rope_6mm_per_m": 10, + "tarp_2x2.5m": 450 + }, + "address": "Tagaytay", + "lead_time": "0 days", + "price_tracker_csv": "csv/hardware_prices.csv" + }, + { + "id": "ELECTRONICS_LAZADA_001", + "name": "Lazada - MPU6050, A4988, Arduino", + "category": "electronics", + "links": { + "MPU6050": "lazada.com.ph search MPU6050 GY-521 \u20b1120", + "A4988": "\u20b180", + "Arduino_Uno": "\u20b1350", + "NEMA17": "\u20b1650" + }, + "lead_time_days": 3, + "return_policy": "7 days Lazada return", + "bench_test_required": "Yes, test MPU6050 I2C scan, A4988 Vref", + "last_verified": "2026-07-14" + }, + { + "id": "TARP_DIVI_001", + "name": "Divisoria / Shopee Tarp Supplier", + "category": "tarp", + "price_php": { + "2x2.5m_blue_heavy": 450, + "custom_print_add": 800 + }, + "lead_time_days": 2, + "link": "shopee.com.ph search heavy duty tarp 2x2.5" + } + ], + "price_tracker_config": { + "csv_path": "csv/prices.csv", + "fields": [ + "date", + "item", + "price_php", + "supplier_id", + "notes" + ], + "alert_thresholds": { + "Al_scrap_kg": 70, + "M8_bolt": 9, + "tarp_2x2.5": 400 + }, + "moving_avg_window": 7, + "export_for_LSTM": "data/stream_e_prices.json" + }, + "inventory_tracker_config": { + "qr_print_method": "Print QR on masking tape via Pi + thermal printer or hand-write ID", + "fields": [ + "id", + "cross_section", + "length_mm", + "weight_g", + "alloy_guess", + "location", + "photo_path", + "timestamp" + ], + "scan_app": "Phone camera + Google Sheets or Pi camera + pyzbar", + "feeds_to": "T20 cutting stock optimizer" + } +} + FILE: SUPPLIER_REGISTRY_v2.json — 76 bytes +{"version":"v10","suppliers":[{"id":"JUNK_MAHOGANY_001","price_kg_php":80}]} + FILE: PRICING_AB_TEST_FRAMEWORK.txt — 6848 bytes +================================================================================ +PRICING A/B TEST FRAMEWORK — v9 — T28 BAYESIAN BANDIT +ABCAA-TAGAYTAY-2026 | Revenue Optimization +================================================================================ + +1. OBJECTIVE +Maximize revenue per listing per day, not just conversion. Optimize price, variant, and funnel. + +2. VARIANTS — PER PROJECT +------------------- +P6 Market Canopy (primary revenue driver): + Variant A: ■5,500 standard blue tarp, no print, 4 guy wires, anchor stakes included + Cost ■1,690, margin 3.25x, target time-to-sale 3 days + Variant B: ■6,500 custom tarp print (market name/logo), 4 guy wires, stakes, 1 custom grommet + Cost ■1,690+■800 print=■2,490, margin 2.61x, higher perceived value, target 5 days + Variant C: ■4,500 bare frame no tarp (customer provides tarp), 4 guy wires + Cost ■1,240 (no tarp), margin 3.63x, fastest sale, target 2 days + Variant D (test later): ■7,500 with side walls (2x tarps) for rainy season + +P1 Latch: + A ■1,800 standard, B ■2,200 custom figure (dog/cat), C ■1,500 bare + +P2 Chassis: + A ■3,500 standard, B ■4,500 RGB+glass, C ■2,800 bare frame + +3. METRICS TO TRACK (Daily, manual entry to csv/pricing_ab.csv) +------------------- +Columns: date, project, variant, views (FB Marketplace), inquiries (PM count), site_visits, demos, closes (sales), +price_php, cost_php, time_to_sale_days, referral (yes/no), review_stars + +Funnel: + Views → Inquiries (CTR) → Site Visits (interest) → Demos (deploy 15s) → Closes (conversion) → Review → Referral + +Example row: +2026-07-15,P6,A,120,8,3,2,1,5500,1690,3,0,5 + +4. STATISTICAL METHOD — T28 BAYESIAN BANDIT (Thompson Sampling) +------------------- +Prior: Beta(1,1) uniform for each variant conversion rate. +Update: successes = closes, failures = inquiries - closes +Sampling: each day, sample conversion rate from Beta(successes+1, failures+1), pick variant with highest sampled rate * +price (revenue). +This balances exploration vs exploitation automatically. + +Implementation on Pi 4 (no cloud): + Python script pricing_optimizer.py: + - reads csv/pricing_ab.csv + - groups by variant, counts successes/failures + - samples Beta via random.betavariate + - picks best variant for tomorrow's listing + - outputs: "Tomorrow list variant B for P6, expected revenue ■X" + +Significance: need n>=30 per variant before trusting. p<0.05 via chi-square test. + +Pseudo: +import random +def thompson(successes, failures): + samples = [random.betavariate(s+1, f+1) for s,f in zip(successes,failures)] + return max(range(len(samples)), key=lambda i: samples[i]) + +For revenue: weight by price: sample * price. + +5. SALES FUNNEL — FACEBOOK MARKETPLACE +------------------- +Step 1: Listing + Title: "Market Canopy 2x2.5m - 15 Sec Deploy, 80km/h Rated - Tagaytay" + Photos: 6 mandatory (stock with ruler, cut layout, orientation mark, deployed side with ruler+person, stowed compact +on scale, anchor pull test) + Video: 15s deploy one person (phone, no edit) + Description: Taglish, include wind rating, guy wire requirement, compliance cert, QR link to video, price variant + +Step 2: PM Response (within 1 hr) + Template: "Sir/Ma'am, P6 canopy 2x2.5m, 15 sec deploy, wind 80km/h with guy wires (40 without). With anchor test 200N, + compliance cert. Price ■5,500 standard / ■6,500 custom print / ■4,500 bare frame. Site visit free in Tagaytay. Demo 15 +sec. Delivery tricycle ■200. Warranty 7 days for rivet failure (not wind misuse)." + +Step 3: Site Visit + Demo + Bring: canopy stowed, anchor stakes, luggage scale, torque wrench, compliance cert + Demo: one-person deploy <20s, anchor pull 200N, tap-test, show orientation red dot, wind label + Close: "If you take today, free delivery + 10% referral discount for next customer" + +Step 4: Delivery + Tricycle, photo with customer + deployed canopy, ask for FB review + photo + +Step 5: Review + Referral + Message after 3 days: "Kamusta canopy? If ok, pa-review sa FB + referral may 10% discount" + Track referral source in pricing_ab.csv + +6. PRICE TRACKER INTEGRATION — T24 +------------------- +csv/prices.csv logs scrap Al price. If Al price drops <■70/kg, cost drops to ■1,400, can lower Variant C to ■4,000 to +increase volume while maintaining margin 2.85x. + 7. WEEK 1 RUN PLAN +------------------- +Day 1-2: List all 3 variants P6, equal impressions (post at 6AM, 12PM, 6PM) +Day 3: Collect 20 views each, 2-3 inquiries, update Beta +Day 4-7: Thompson picks best, allocate 60% impressions to best, 20% each to others (explore) +Day 7: Calculate significance, report best variant, expected revenue per day. + +Target: P6 1 sale every 2 days @ ■5,500 = ■3,810 profit per sale = ■13,335/week net after helper pay. + +8. CODE — pricing_optimizer.py (runs on Pi) +------------------- +See science_tools_v3.py T28 for function. Full script: + +import csv, random, json +from collections import defaultdict + +def load_data(path): + data = defaultdict(list) + with open(path) as f: + r=csv.DictReader(f) + for row in r: + data[row['variant']].append(row) + return data + +def calc_success_fail(rows): + succ = sum(1 for row in rows if int(row['closes'])>0) + fail = sum(int(row['inquiries'])-int(row['closes']) for row in rows) + return succ, fail + +def thompson_revenue(variants_data, prices): + samples=[] + for var in variants_data: + succ,fail=calc_success_fail(variants_data[var]) + sample=random.betavariate(succ+1, fail+1) + samples.append((var, sample*prices[var], sample, succ, fail)) + best=max(samples, key=lambda x: x[1]) + return best, samples + +# Example usage +prices={'A':5500,'B':6500,'C':4500} +# data = load_data('csv/pricing_ab.csv') +# best, all_samples = thompson_revenue(data, prices) +# print(f"Best variant tomorrow: {best[0]} expected revenue {best[1]:.0f}") + +9. FINANCIAL PROJECTION WITH v9 OPTIMIZATION +------------------- +Week 1: 2x P6 sales @■5,500 = ■7,620 profit (after ■3,380 cost) + 5x P1 @■1,800 = ■7,500 profit → gross ■15,120 - +helpers ■7,000 (2*500*7) - transport ■500 = ■7,620 net + debt cleared? Actually debt ■1,500 cleared day 1 via P1 batch. +Week 2 with optimization (Bayesian picks best): margin improves 15% via variant B upsell → ■8,600 net +Week 3-4: volume increase via referral → ■13,900, ■16,800 net +Total Month 1: ■42,300 net on ■15,000 initial = 282% ROI (validated in v8, v9 adds 15% via pricing). + +10. COMPLIANCE LINK — T27 +------------------- +No sale without compliance cert. Cert PDF attached to listing increases trust + conversion 20% (hypothesis to test). + +================================================================================ +END PRICING A/B TEST FRAMEWORK v9 +================================================================================ + FILE: VERSION_v9.json — 2944 bytes +{ + "version": "v9.0", + "previous_version": "v8.0", + "date": "2026-07-15", + "location": "Tagaytay/Cavite, Philippines", + "owner": "Johannes Philipp", + "status": "ACTIVE", + "validation_stage": "VAL-0 In Progress", + "next_action": "NEXT-001 Geometry & Hardware Survey", + "budget_php": 15000, + "debt_php": 1500, + "helpers": 2, + "helper_pay_php_per_day": 500, + "target_size_kb": "75-100", + "actual_files": 13, + "tools": { + "count": 28, + "ids": [ + "T1", + "T2", + "T3", + "T4", + "T5", + "T6", + "T7", + "T8", + "T9", + "T10", + "T11", + "T12", + "T13", + "T14", + "T15", + "T16", + "T17", + "T18", + "T19", + "T20", + "T21", + "T22", + "T23", + "T24", + "T25", + "T26", + "T27", + "T28" + ], + "locked": [ + "T1", + "T2", + "T3" + ], + "core_8_for_next_round": [ + "T1", + "T2", + "T3", + "T12", + "T14", + "T20", + "T22", + "T27" + ], + "validation": "All tools have Validation subsection with theoretical prediction, measurement method, expected range, + pass/fail, downgrade rule" + }, + "build_queue": { + "tier1_green": [ + "P1 Novelty Latch", + "P2 Tech Chassis", + "P6 Market Canopy", + "SA Pantograph", + "SF Vibration QC" + ], + "eliminated_red": [ + "Stream C Solar Tracker", + "Stream B Tensegrity Sensor Node" + ], + "skeleton_pool": [ + "SKEL-A Waterbomb dome", + "SKEL-B Auxetic tile", + "SKEL-C Snap-latch gate", + "SKEL-D Bamboo fiber-gradient strut", + "SKEL-E Modular kiosk" + ] + }, + "strengthening_dimensions": { + "1_verifiable_science": "Every tool T1-T28 has validation, T19 uncertainty propagation", + "2_integrated_cut_lists": "JSON cut-lists for P1,P2,P6,SA + T20 MILP + T21 nesting", + "3_failure_mode_library": "Full FMEA per project with RPN, T22 calculator, RPN>100 redesign mandatory", + "4_field_protocols": "A4 sheets with 6 photos, measurement table, QR, signature + laminated quick-ref cards + T23 +OCR validator", + "5_supply_chain": "Verified supplier registry + T24 price tracker + T25 inventory QR", + "6_training": "H1/H2 modules with safety/technique/quality + quizzes 4/5 pass + T26 validator", + "7_compliance": "Checklist per project + T27 auditor blocks sale + cert PDF", + "8_revenue": "A/B test variants + T28 Bayesian bandit + sales funnel FB Marketplace \u2192 referral" + }, + "blockers": [ + "No geometry survey data \u2192 Execute NEXT-001", + "Material properties unverified \u2192 spark/acid test + coupon tensile", + "No actuator/sensor specs for ABCAA antenna array \u2192 document motors, calibrate MPU6050", + "No deployment environment data \u2192 PAGASA wind, GPS", + "No RF design for ABCAA \u2192 single element prototype, VNA test" + ], + "compliance_required": true, + "sales_blocked_if_compliance_fail": true +} + FILE: VERSION_v11.json — 93 bytes +{ + "version": "v11.0", + "date": "2026-07-15", + "files": 33, + "total_kb": 130.2626953125 +} + FILE: CHANGELOG_v8_to_v9.md — 5202 bytes +# CHANGELOG v8 → v9 — MASSIVELY STRONGER ZIP + +## Summary +- v8: 21.5KB, 6 files, equations stated, only P6 cut-list, no FMEA, no training, no compliance, no pricing optimization +- v9: ~90KB, 13 files, every tool validated, every build has FMEA + cut-list JSON + field protocol, every helper has +training + quiz, every sale has compliance cert, every price Bayesian optimized +- Target strength: 3-5× v8, achieved via 8 dimensions + +## Added Files (7 new) +- P1_NOVELTY_LATCH_BLUEPRINT.txt (was missing, now full FMEA + cut-list + protocol) +- P2_TECH_CHASSIS_BLUEPRINT.txt (was missing, now full spec) +- SA_PANTOGRAPH_BLUEPRINT.txt (was missing, now full kinematics + G-code + safety) +- SUPPLIER_REGISTRY.json (new, verified contacts, prices, lead times) +- TRAINING_MODULES.pdf (new, Helper 1 & 2 with quizzes, quick-ref cards) +- COMPLIANCE_CHECKLIST.json (new, per-project regulatory, blocks sale) +- PRICING_AB_TEST_FRAMEWORK.txt (new, Bayesian bandit, sales funnel) + +## Upgraded Files (6 upgraded) +- 00_READ_THIS_FIRST__HANDOVER_MASTER_v9.txt: complete rewrite, integrates all 8 dimensions, ARCHITECTPRIME ladder, +auto-prompt Round 7 +- science_tools_v3.py: v2 had 8 tools, v3 has T1-T28 each with Validation subsection (theoretical → measurement → +expected range → pass/fail → downgrade rule). Added T19-T28: + T19 Measurement Uncertainty (RSS propagation ±0.1mm caliper) + T20 Cutting Stock Optimizer (MILP greedy, runs on Pi with PuLP) + T21 Nesting Optimizer (2D shelf-packer) + T22 FMEA Calculator (RPN=S×O×D, flags >100) + T23 Protocol Validator (OCR via Tesseract, flags missing fields) + T24 Price Tracker (7-day MA, alert, export to LSTM) + T25 Inventory Tracker (QR on masking tape, <30s per piece) + T26 Training Validator (tracks cert, 90-day retrain) + T27 Compliance Auditor (checks checklist, generates cert, blocks sale) + T28 Pricing Optimizer (Thompson sampling Bayesian bandit) +- P6_MARKET_CANOPY_BLUEPRINT_v2.txt: upgraded from v1, added full FMEA with RPN 192→48 after mitigation (M8 + guy wires ++ orientation jig), supply chain, training, compliance, revenue A/B test. Cut-list JSON with orientation critical note ( +40mm vertical), cost optimized to ■1,690 via T20. +- VERSION_v9.json: new metadata +- BUILD_MANIFEST_v9.json: new manifest with checksums + +## Breaking Changes / Migration Notes +- Tool count: v8 had 8 tools (T1-T5,T12,T14,T18), v9 has 28. For Round 7, must rotate ±2 to return to 6-10 window. +Recommendation: keep T1,T2,T3,T12,T14,T20,T22,T27 as core 8, archive others to skeleton pool. +- Cut-list format: v8 used ad hoc text, v9 uses machine-readable JSON with fields part_id, material, length_mm, holes[], + cut_angle_deg, kerf_mm, qty, orientation. Update inventory.json to match. +- Field protocol: v8 Canva forms vague, v9 A4 with 6 photo slots, measurement table, QR, signature. Print new forms +from 15_CANVA_FIELD_MANUAL/ (generate via Canva or Pi). +- FMEA: new mandatory. All Tier 1 builds must have RPN<100 after mitigation before T27 allows sale. Existing P6 builds +with 25x3 bar and M6 rivets have RPN 378 (anchor pull-out) → must retrofit to 40x4 + M8 + guy wires + anchor test. +- Compliance: v8 ad hoc, v9 blocks sale if critical fail. Run compliance_audit.py before any sale. +- Pricing: v8 fixed, v9 A/B test. Start logging to csv/pricing_ab.csv immediately. +- Supplier registry: v8 manual Perplexity, v9 verified JSON. Verify junkshop price/kg weekly, update last_verified date. + +## Validation Results +- T1: P2 upright 25x25x2 L=0.4m P_cr=69kN predicted, measure <0.5mm deflection @20kg PASS +- T2: P1 arm 1kg deflection 4-6mm expected, if not → wrong alloy +- T3: M6 shear 16MPa <60 PASS, bearing 18.9MPa <120 PASS +- T4: Lambda 6.51 predicted, measure 6.0-7.0 PASS +- T12: q=363Pa @80km/h, F=1815N total, per corner 113N @40km/h measured PASS if ±20% +- T14: DI threshold 0.05, baseline 95Hz for P2, 45/60/75Hz for P6 +- T19: combined uncertainty 0.17mm from caliper ±0.1mm +- T20: waste <10% target, measured via weigh offcuts +- T22: RPN calc, P6 rivet shear 192→48 after mitigation +- All 28 tools PASS when run python3 science_tools_v3.py --validate-all + +## Next Actions (Round 7) +- Execute NEXT-001: Geometry & Hardware Survey for ABCAA (GPS, sketches, photos with ruler, component IDs) +- Run T20 optimizer on current inventory (scan all scrap with QR) +- Build P1 batch 5 units with new FMEA mitigation (3003 alloy, deburr log, catch angle 28-35°) +- Build P2 chassis with grounding <0.1Ω test +- Build P6 v2 with 40x4 orientation jig, M8 bolts, anchor pull test 200N, guy wires +- Run compliance audit for each, generate certs +- Start pricing A/B test for 1 week, collect n>=30 per variant, run Thompson sampling +- Add 2 new tools from Wiley/Statista/Perplexity (e.g., T29 auxetic impact, T30 bamboo creep), cross out 2 weakest (T9 +solar, T10 cable prestress maybe) + +## Financial Impact +- v8 projected Month1 ■42,300 net +- v9 adds 15% margin via T20 waste reduction (8.5% waste vs 20% before) + T28 price optimization (upsell to custom +print) → projected ■48,645 net (+■6,345) + +## Files Checksums (see BUILD_MANIFEST_v9.json) + +## Author +Johannes Philipp + Meta AI (Muse Spark 1.1) | Tagaytay City | 2026-07-15 + +END CHANGELOG + FILE: CHANGELOG_v10_to_v11.md — 122 bytes +# Changelog v10->v11 Round 2 +Added photogrammetry, FEA, RF, field manual, experiment registry +Cut duplicates, ordered code + FILE: BUILD_MANIFEST_v9.json — 2666 bytes +{ + "version": "v9.0", + "date": "2026-07-15", + "total_files": 13, + "target_size_kb": "75-100", + "actual_size_kb": 89.2314453125, + "files": [ + { + "file": "00_READ_THIS_FIRST__HANDOVER_MASTER_v9.txt", + "size_bytes": 11228, + "sha256_16": "1800c5ef02029840", + "purpose": "see changelog" + }, + { + "file": "science_tools_v3.py", + "size_bytes": 13754, + "sha256_16": "21a2a872b6c26516", + "purpose": "see changelog" + }, + { + "file": "P1_NOVELTY_LATCH_BLUEPRINT.txt", + "size_bytes": 6782, + "sha256_16": "62bdeb135392f73c", + "purpose": "see changelog" + }, + { + "file": "P2_TECH_CHASSIS_BLUEPRINT.txt", + "size_bytes": 6373, + "sha256_16": "37ea87ba1ca714ab", + "purpose": "see changelog" + }, + { + "file": "P6_MARKET_CANOPY_BLUEPRINT_v2.txt", + "size_bytes": 11760, + "sha256_16": "09c3283dcdd0994c", + "purpose": "see changelog" + }, + { + "file": "SA_PANTOGRAPH_BLUEPRINT.txt", + "size_bytes": 5846, + "sha256_16": "750a111ee6748057", + "purpose": "see changelog" + }, + { + "file": "SUPPLIER_REGISTRY.json", + "size_bytes": 4113, + "sha256_16": "b781ee06ffc97034", + "purpose": "see changelog" + }, + { + "file": "TRAINING_MODULES.pdf", + "size_bytes": 9029, + "sha256_16": "9e55ef4eda23ad43", + "purpose": "see changelog" + }, + { + "file": "COMPLIANCE_CHECKLIST.json", + "size_bytes": 7494, + "sha256_16": "84f6d2b6b17058dd", + "purpose": "see changelog" + }, + { + "file": "PRICING_AB_TEST_FRAMEWORK.txt", + "size_bytes": 6848, + "sha256_16": "9293816bc501c0ed", + "purpose": "see changelog" + }, + { + "file": "CHANGELOG_v8_to_v9.md", + "size_bytes": 5202, + "sha256_16": "223a4a60275a4721", + "purpose": "see changelog" + }, + { + "file": "VERSION_v9.json", + "size_bytes": 2944, + "sha256_16": "45b4d34862adf1b3", + "purpose": "see changelog" + } + ], + "release_structure": { + "current": "symlink to releases/v9.0/", + "releases/v9.0/": "immutable snapshot of 13 files", + "seeds/": "templates, components, materials, recipes", + "databank/": "OSE GVCS, Project Combine, etc.", + "00-15 folders": "per ARCHITECTPRIME layers", + "evidence/": "material tests, vibration logs, photos", + "experiments/": "exp_001 etc", + "csv/": "prices.csv, pricing_ab.csv, inventory.json" + }, + "checksums": "SHA256 first 16 chars per file, full SHA256 via sha256sum command on Pi", + "build_command": "python3 science_tools_v3.py --validate-all && zip -r MASTERZIP_v9.zip *.txt *.py *.json *.pdf *.md" + } + FILE: BUILD_MANIFEST_v11.json — 1164 bytes +{ + "version": "v11", + "total_files": 35, + "total_kb": 130.47265625, + "files": [ + "00_READ_THIS_FIRST__HANDOVER_MASTER_v9.txt", + "BUILD_MANIFEST_v9.json", + "CHANGELOG_v8_to_v9.md", + "COMPLIANCE_CHECKLIST.json", + "P1_NOVELTY_LATCH_BLUEPRINT.txt", + "P2_TECH_CHASSIS_BLUEPRINT.txt", + "P6_MARKET_CANOPY_BLUEPRINT_v2.txt", + "PRICING_AB_TEST_FRAMEWORK.txt", + "SA_PANTOGRAPH_BLUEPRINT.txt", + "SUPPLIER_REGISTRY.json", + "TRAINING_MODULES.pdf", + "TRAINING_MODULES.pdf.txt", + "VERSION_v9.json", + "science_tools_v3.py", + "science_tools_v4.py", + "seed_engine_v3.py", + "cutting_stock_optimizer.py", + "nesting_optimizer.py", + "fmea_calculator.py", + "protocol_validator.py", + "price_tracker.py", + "inventory_tracker.py", + "training_validator.py", + "compliance_audit.py", + "pricing_optimizer.py", + "ALUM_BOO_PROJECT_SPEC.xml", + "requirements_pi.txt", + "photogrammetry_pipeline.py", + "structural_fea.py", + "rf_array_calculator.py", + "field_manual_generator.py", + "experiment_registry.py", + "00_README_HANDOVER_v11.txt", + "VERSION_v11.json", + "CHANGELOG_v10_to_v11.md" + ] +} + FILE: requirements_pi.txt — 100 bytes +numpy==1.24.3 +scipy==1.10.1 +pandas==2.0.3 +sympy==1.12 +qrcode==7.4.2 +Pillow==10.0.0 +reportlab==4.0.4 + FILE: 00_README_HANDOVER_v11.txt — 8365 bytes +================================================================================ +ALUM-BOO CYBERNETICS LAB — MASTERZIP v11 — COMPLETE HANDOVER README +ABCAA-TAGAYTAY-2026 | ARCHITECTPRIME v1.0 | 2-ROUND MAX EFFORT FINISHED +Date: 2026-07-15 | Owner: Johannes Philipp | Location: Tagaytay/Cavite, PH +Budget ■15k | Helpers 2 @ ■500/day | Saw 1 | Pi 4 Offline | No Cloud API +================================================================================ + +YOU ARE READING THE SINGLE SOURCE OF TRUTH FOR HANDOVER. +This PDF contains EVERY file from v11, ordered, deduplicated, with runnable code. +If you are an AI (Claude, GPT-4, Gemini, Meta AI), paste this PDF text and you can resume full state. + +WHAT THIS PDF IS: +- Round 1 v10: Cut duplicates, ordered code into modules, filled weakest placeholders T20-T28 with runnable Python that +runs on Pi 4 offline. +- Round 2 v11: Added 6 new subsystems: photogrammetry pipeline (NEXT-001 -> VAL-1), structural FEA (LC-05 -> VAL-2), RF +array calculator (VAL-7), field manual generator (A4 sheets + laminated cards), experiment registry (DoE), requirements +wheelhouse. +- Total: 30+ files, ~110KB unzipped, combined PDF with README at front. +- Every number validated, every build has FMEA, every helper has training, every sale has compliance cert, every price +Bayesian optimized. + +FILE STRUCTURE (in order in this PDF): +00_README_HANDOVER_v11.txt - This file, start here +00_READ_THIS_FIRST__HANDOVER_MASTER_v9.txt - Previous handover master v9 (canonical source) +science_tools_v4.py - CANONICAL physics source T1-T28 with validation, organized classes +seed_engine_v3.py - Integrated seed engine with SQLite + XML + cut-list + BOM + QC +cutting_stock_optimizer.py - T20 real MILP heuristic FFD + local search 200 iter, kerf 2mm, waste <10% +nesting_optimizer.py - T21 2D shelf + guillotine + SVG preview +fmea_calculator.py - T22 RPN=SxOxD flags >100 redesign mandatory +protocol_validator.py - T23 field sheet completeness PIL + QR check auto-populates seeds.db +price_tracker.py - T24 7-day MA alerts LSTM export +inventory_tracker.py - T25 QR on masking tape inventory.json feeds T20 +training_validator.py - T26 quiz scoring 4/5 pass 90-day retrain +compliance_audit.py - T27 audit checklist PDF cert blocks sale if critical fail +pricing_optimizer.py - T28 Thompson sampling Bayesian bandit revenue weighted +photogrammetry_pipeline.py - NEXT-001 geometry survey -> panels.json hinges.json -> SS-GEO -> VAL-1 +structural_fea.py - FEA via numpy/sympy Wolfram equivalent LC-05 wind fully deployed +rf_array_calculator.py - Array factor AF=sum w_n exp(jk r_n dot r_hat) pose dependent +field_manual_generator.py - A4 field sheets photo grid 6 + measurement table + QR + laminated quick-ref cards +experiment_registry.py - SQLite experiments DoE adaptive +ALUM_BOO_PROJECT_SPEC.xml - Canonical ARCHITECTPRIME XML with status/confidence +P1_NOVELTY_LATCH_BLUEPRINT_v10.txt - P1 Cost 300 Sell 1800 cross-ref T2/T3 +P2_TECH_CHASSIS_BLUEPRINT_v10.txt - P2 Cost 800 Sell 3500 T1/T14 +P6_MARKET_CANOPY_BLUEPRINT_v3.txt - P6 Cost 1690 Sell 5500 orientation 40mm vertical mandatory wind 80km/h with guys +SA_PANTOGRAPH_BLUEPRINT_v10.txt - SA 0.039mm/step Jacobian IK G-code safety interlock +COMPLIANCE_CHECKLIST_v2.json - Per project critical checks blocks sale +SUPPLIER_REGISTRY_v2.json - Verified junkshop contacts prices lead times +VERSION_v11.json - Machine readable metadata +CHANGELOG - What changed +BUILD_MANIFEST - Inventory + checksums +requirements_pi.txt - Wheelhouse for offline Pi + +VALIDATION LADDER STATUS: +Current: VAL-0 In Progress (Specification Complete) +Next: NEXT-001 Geometry & Hardware Survey unlocks VAL-1 + Steps for NEXT-001: + 1. Top/side/front sketches with mm dimensions + 2. Smartphone photos 6+ with ruler/coin reference, 70% overlap + 3. Component labels P-01 H-01 ACT-01 with QR masking tape + 4. Model numbers for all electronics + 5. Run photogrammetry_pipeline.py --images evidence/ABCAA_photos/ --output 01_GEOMETRY_SURVEY/ + 6. Import panels.json hinges.json into ALUM_BOO_PROJECT_SPEC.xml SS-GEO + 7. Run VAL-1 checks: loop closure residual <0.001m, no self-intersection, hinge limits enforced + After VAL-1: Populate material registry (spark test + coupon tensile) -> VAL-2 via structural_fea.py + After VAL-2: Control simulation -> VAL-3 + After VAL-3: Unpowered mock-up -> VAL-4 + After VAL-4: Single-hinge powered test -> VAL-5 + After VAL-5: Integrated bench test -> VAL-6 with tap-test T14 DI<0.05 + After VAL-6: Indoor RF test via rf_array_calculator.py -> VAL-7 + After VAL-7: Controlled outdoor RF test with wind limits -> VAL-8 + After VAL-8: Operational validation repeated cycles -> VAL-9 + +HOW TO USE ON PI 4 OFFLINE (NO CLOUD): +1. Unzip: unzip MASTERZIP_v11.zip -d ~/lab/FINAL_ONGOING_ZIP/releases/v11.0/ && ln -sfn releases/v11.0 current && cd +current +2. Wheels: pip install --no-index --find-links=wheelhouse -r requirements_pi.txt (numpy scipy pandas sympy qrcode +pillow reportlab) +3. Validate science: python3 science_tools_v4.py --validate-all (should PASS 28 tools) +4. Inventory: python3 inventory_tracker.py --generate-qr --id AL-20260715-001 --cross-section flat_bar_40x4 --length +1000 --weight 400 +5. Cutting stock: python3 cutting_stock_optimizer.py --inventory inventory.json --demand P6_cutlist.json --kerf 2 -- +output cut_plan.json +6. Nesting: python3 nesting_optimizer.py --pieces 200x100x10 --sheet 1000x1000 --output nest_plan.json --svg +nest_preview.svg +7. Seed: python3 seed_engine_v3.py --template canopy --params '{"L":2.0,"h":2.5,"wind_kmh":80}' --export-adopter +8. Field manual: python3 field_manual_generator.py --project P6 --id SEED_0001 --output-dir 15_CANVA_FIELD_MANUAL/ +9. Build per blueprint, fill A4 field sheet, photos 6 mandatory with ruler+coin +10. Validate protocol: python3 protocol_validator.py --sheet evidence/P6_20260715.json --db seeds.db +11. FMEA: python3 fmea_calculator.py --input fmea.json --output fmea_evaluated.json --csv fmea_matrix.csv +12. Compliance: python3 compliance_audit.py --project P6_MARKET_CANOPY --id SEED_0001 --field-sheet evidence/ +P6_20260715.json --checklist COMPLIANCE_CHECKLIST_v2.json --output P6_CERT_SEED_0001.pdf (must PASS before sale) +13. Price track: python3 price_tracker.py --csv csv/prices.csv --thresholds '{"Al_scrap_kg":70}' --export data/ + stream_e_prices.json (daily 6AM) +14. Pricing: python3 pricing_optimizer.py --data csv/pricing_ab.csv --prices '{"A":5500,"B":6500,"C":4500}' --pick- +tomorrow + +CRITICAL PHYSICS FIXES IN v11 (from v9): +- P6 bar orientation: 40mm vertical strong axis mandatory. Flat orientation Z=106mm3 sigma=1064MPa FAIL, edge +orientation Z=1066mm3 sigma=106MPa PASS SF 2.6 with 6061. Red dot mark + jig enforced. +- Wind load: q=363Pa at 80km/h Cp=1.2, F=1815N total 5sqm, per corner 454N. M8 bolt required (RPN 192->48 after +mitigation), M6 insufficient for dynamic gust 2x. +- Anchor pull-out: uplift 1815N > weight 181N, soft volcanic soil Tagaytay, RPN 378 CRITICAL -> mandatory 40cm rebar +stakes 4x + 200N pull test + guy wires 45deg. +- P1 arm: 3003-H14 mandatory not 6061-T6, bend radius >=6mm, K_t reduction file radius >=0.5mm from 3.0 to 1.8. +- P2 upright: 25x25x2 L=0.4m P_cr=69kN SF471 PASS, slender 20x20x1.5 L=0.6m P_cr=217N with 3g shock 441N FAIL -> +mandatory 25x25x2. + +FINANCIAL PROJECTION v11 WITH OPTIMIZATION: +Week1: 2x P6 @5500 profit 7620 +5x P1 @1800 profit 7500 -helpers 7000 -transport 500 =7620 net debt cleared day1 via P1 +batch +Week2: 8600 net via T28 upsell to custom print +Week3: 13900 net via referral +Week4: 16800 net +Total Month1: 42300 net on 15000 initial =282% ROI, v11 adds 15% via T20 waste <10% + T28 pricing -> 48645 net + +AUTO-PROMPT FOR NEXT ROUND (Round 7 After v11): +"Load MASTERZIP v11 logic. Active tools T1-T28 validated with real code. Build queue P1,P2,P6,SA,SF. Execute Round 7: +add 2 new tools from Wiley/Statista/Perplexity (e.g., T29 auxetic impact, T30 bamboo creep), cross out 2 weakest (T9 +solar, T10 cable), re-score all architectures with FMEA RPN weights from fmea_calculator.py, promote highest skeleton +to active build, generate cut-lists and field protocols for next 15hr sprint using cutting_stock_optimizer.py + +inventory.json, run compliance_audit.py, run pricing A/B test 1 week, collect data, optimize via pricing_optimizer.py." + +END README HANDOVER v11 +================================================================================ + FILE: TRAINING_MODULES.pdf — 9029 bytes +%PDF-1.3 +% ReportLab Generated PDF document http://www.reportlab.com +1 0 obj +<< +/F1 2 0 R /F2 3 0 R /F3 4 0 R /F4 5 0 R +>> +endobj +2 0 obj +<< +/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font +>> +endobj +3 0 obj +<< +/BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding /Name /F2 /Subtype /Type1 /Type /Font +>> +endobj +4 0 obj +<< +/BaseFont /Symbol /Name /F3 /Subtype /Type1 /Type /Font +>> +endobj +5 0 obj +<< +/BaseFont /Helvetica-Oblique /Encoding /WinAnsiEncoding /Name /F4 /Subtype /Type1 /Type /Font +>> +endobj +6 0 obj +<< +/Contents 13 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 12 0 R /Resources << +/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] +>> /Rotate 0 /Trans << + +>> + /Type /Page +>> +endobj +7 0 obj +<< +/Contents 14 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 12 0 R /Resources << +/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] +>> /Rotate 0 /Trans << + +>> + /Type /Page +>> +endobj +8 0 obj +<< +/Contents 15 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 12 0 R /Resources << +/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] +>> /Rotate 0 /Trans << + +>> + /Type /Page +>> +endobj +9 0 obj +<< +/Contents 16 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 12 0 R /Resources << +/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] +>> /Rotate 0 /Trans << + +>> + /Type /Page +>> +endobj +10 0 obj +<< +/PageMode /UseNone /Pages 12 0 R /Type /Catalog +>> +endobj +11 0 obj +<< +/Author (anonymous) /CreationDate (D:20260715075311+08'00') /Creator (ReportLab PDF Library - www.reportlab.com) / +Keywords () /ModDate (D:20260715075311+08'00') /Producer (ReportLab PDF Library - www.reportlab.com) + /Subject (unspecified) /Title (untitled) /Trapped /False +>> +endobj +12 0 obj +<< +/Count 4 /Kids [ 6 0 R 7 0 R 8 0 R 9 0 R ] /Type /Pages +>> +endobj +13 0 obj +<< +/Filter [ /ASCII85Decode /FlateDecode ] /Length 2300 +>> +stream +GasaqBl=qN')b#/U-@9m$JbsaOH@^RZ/rn;gTp/UN!ogtW,>5m\.;:U4r3bMpQ98BFon%H"#e+FlP3R+?<,/p#J[G@S!HGa'080san7&bPKOiAjIBi( +DgL9XN1LP_r+"S(9EZLHa55IF-k;V+%`afuFRXR!IPnaWj/(p-F>LV,3Bg6&q)'JMe$I6(b>34E5,@7$-3)[D_#m1PH#MYL'F,-"3#D1MYNI_/. +Xqf@OE+2Hq,Q)e^_p#I*0B+93k8++[na9k*Lk,SbNq[HRt+":W(FYhdtO'pC_FS/Oq)7Zu8?f;'U9_FCJ6@9)GcfLV2C$oV(TTTI^+Ia@9, + XqT(/dX*olb&Tn8]E^*uU<6/knd;J9'<9Zk;BB#hJr#, +0'Pf[8HX,'CMmsS21:J,uQV/I^i7t3.mf>U:4f*q9XJc=P7Aio8M?hq@X?'3q$<^iB4T)J`'$G-@E1cZ^LY<9+<_"WoH_b?Vj6]l(]B,aZ5i.me^PNV: +1jbCmC[+Yl]rpRC;T\K=U'-QC7QiJs"l0j)(2XGgs,80QQj]=$@hYpD@&7ZtZ:^`#Z$J>0]eX+bf)\D)dB7q[%AQ=CM(3OA"?':?-DU/n(!<5lEu[ +VI@_YIC<[Y]V1$9mA6?S4l'73>kM]565e]Hr['U&PrEC\n:pnZrKPP'RGr3BjTCc:OBfD_dpO/T:-&]>iN,$1])6(Ql_i4j,%jKS\FV7/iXY3SDRh1TZA\ +3oYd&Pnkedpdud_=n:<\EV17?Po0!RLOr9D*'0S.proEmKH)Z@RdhLF/KZYC_u4$#8`J(26@fHh^KW3fNE'4c3Da9Xn!Lp7'X;!A9RnHnndi=B%*=O1`JN- +dBcaX;CS$*&@D52eQ:f8O$9ZRdEtRbiimpJSOYjfDu\MS20D(CC3`Y:\@5'FOg2i:)0D_JW?6Qd*"dU`V[=87=hmZ-j;( +@2;6HWs/M2E=F*7m4F,cB*WVn: +jT?VG>1j,KK%l;`KVfe2S1apW7>S\3b>:C^WMeek&<_Nb@j$Y6MDFLVu]3_[`>O]K$Cj/eF7VM2]#N.b=Z_pf0ThrjYK4Iom1qs\<":Le;O. +#='hYO?c+Q>A&_LZ<3Im,g6r$YBa_6eHMqPrp;"ASlfAf5'r;!!Y9/atsqMrK]"%_Jr;!*7(dOZdZ8@BlZ,H`1ci]!;/ +#Cd#$bU*o5tLY2T5p%:hiN+%8)CI%P[jCi9/SG)aRCS=WM9G0C=Yi(W;Y.R`"'Z/eoBZ;p.DIP%4h)(gku&r<;]:9bGt0aln66A"Oo3dgI;- +#hTkrBo%pa4':bAGU$:/X_'7k;ha_rh93DrX<..,_N^N;.k=I._bQ0rrC/FaeJ~>endstream +endobj +14 0 obj +<< +/Filter [ /ASCII85Decode /FlateDecode ] /Length 2514 +>> +stream +Gat%$CK'!/')fPZU;-%HEn;B)I^o)8%%,sY0ORRP\OBLj87PjidV*9(&lSVen!P%H,^ZS8/l2`B8F#X-3IUb2IIcmnS%iN-FL7d[;kNu<^c-EM)9+'l8#Z@,JgrqC2cEZjt\j!"AE]RRO(N8OmIm^84[/0[ ++0>ucd?bp)p_Gq@uOn!O5H#e6qUU+A!B/b#>B>!K>6kj.B&Na-93MJuZC,OM;)H!1BDss0n]/SW&n\5R/J0enJ(l+IPT6NBGO*j:76:tKI)]I*HjDR,?s$]- +n\/Ih9GE9DS12^.*_/&V`jXnPUm"HdKJ+XZ(.1Eo>"LXc7S#toAm=HsQpZZFA\X9n^GTQJ:1cFg;Q$#kk[ +qRh`hHc4ffEnOJ>Se]0dn?k5J^_2rm>0JjX!DV^'MY?$+Zd3<464!eeC;COjkUm_*V?"8fkKM!4!!7UDJEf9OPFjj18[ef4UG>]W^@8!W'\8jWd;jN)NjuC:)$<`T]M$[^8\\,YIdJN$AEIP_//=4d; +7N_U?rC217)8qpuA[8rknGW@d:.E5sC;+3!?W?6!T/$=_1nn)d-+2Crq+%$DDYS[s@g7hPX9aMl\Hil0d?cYtA7>n-LPonum/ +UC4?m#5VT"1b5iCDtmF9BVd_VCKP_Ri\\WOg-S!mb0qQ+Ua_%=M\&S%Y6+1p3cqJPO3L"#+VD\KM0G>U[@8T[Z3<=\I43e`k-+7!ZPc=hkn?kr2OY)Bl:I6n\3Q"&:W/'Jk/^^h%_#=K1#6C:t+2.+"c/^T/75X4)[ +?ElG$?BL&ed6E.5qg'CuLGFJVZ_KIuiCt"1fJq?i,RoV[cM)<38SO2\1hPkF0H*aC4iK7He?6#)\=iS<,Z%Oh;ad,NI?qgF9uMK-pctaD93q?i`+[+P\L"NlKB"-IW7Y"BN\/ +B?mDM'KQIV@o'K=AH?fTDUfUFuaM<+mqU1'!>D1D6)N!6S#l#;[FbYaeGgZTRcZ^cgX>O?_.HYCbp!?hPP"JCb^sgeh8CW3TGr?s`G7"e( +MlNkuYtMm7^t1PrNuFJ!ddS_PNFJd>G,A;fFCG5`TAjC3la7u+>g-UATR..V0uYPj>LZuWPPq$IW9dIj;/)n$A,#2V3VE3nBKrSean0j.Fa4E`('Ie(!3>SO3;[qbDU"KJq<@h0Nr4!UKGD9DIDcX^SoB&L^)f>kDTmkTn<.*B9O.Z"5[ +!5R?nXP:6erWV1Gc^-\$MSGl\`*AS$esk'k2dA"!m/%ZrenKgGaB+ab)TgeUrs&IIWFRYl"F#!u1(kYN+a2FJbtu)')M>-TA!\o: +i?KC`fqj_cp+O<#1SXWr?bIcTj=U7'>hTBendstream +endobj +15 0 obj +<< +/Filter [ /ASCII85Decode /FlateDecode ] /Length 535 +>> +stream +Gat$s?#/1K'RfGR302as*D*LN4,e_hRdFN(@5X!1?Skuq21N]gb!KK#^2cc6k$\Wd+J^6(cai3[$K;gamWf&=1X%clPT_PC_]VA@%PY=^CSD7,Q%73'h]GV[bsXj(j0PrI;l)D, +2l\u_TC[6=Pk@,A_sMmV%BLk/c#g]WGjCJh^gBRR6@g2T3a/;RN_5#AK8;TmGh5^=P!2EdU67RqFf'f4P~>endstream +endobj +16 0 obj +<< +/Filter [ /ASCII85Decode /FlateDecode ] /Length 935 +>> +stream +GasIe?#SF^&:ErMfU#X7-&9hA'D9[i*!GL07La*2rd,d_;;,hkB?R@W$aV-r8CRVT213/aK\Va,*Tk^S$T]4Q!Uud"3Q>WWPncXa'r"o-UPL]#coWEja3&k%PL#2rZcp6l*EA#qrZQMhGdfF%D_=Z\%LpM-T*L82n2Ah@>?W[4Aur--(o+g;%jhG, +LZ4X.D,@3@N0O7FE&e2T(C^,h#F>l:A.ImC)*qP.P8H=0)K*V,TLR3Eu#TV3AnFD-bkZPNG0lROQ3SHngg?/'msiGrhM`RXrY5=b)2p+i, +bc]1WbN]"7&;7)P,4I1>qY9"bltQNcS!e*)L5jG>4+A/$s2%4Wn*"rY2*16Iu5@sWcuWVVBIa*Bie'uRLlR7NBo\!@en)`g_rA#C8j`:mt'C?+0!DtN)BbFjU1oki\t[ +LL#`AY]d7j9eeVM(LB"jA9WH<[g_dC?a.1B&He5$5V1.c&_qtf?j5.id(k'_:/di\P5ah@~>endstream +endobj +xref +0 17 +0000000000 65535 f +0000000073 00000 n +0000000134 00000 n +0000000241 00000 n +0000000353 00000 n +0000000430 00000 n +0000000545 00000 n +0000000750 00000 n +0000000955 00000 n +0000001160 00000 n +0000001365 00000 n +0000001435 00000 n +0000001732 00000 n +0000001810 00000 n +0000004202 00000 n +0000006808 00000 n +0000007434 00000 n +trailer +<< + /ID +[] +% ReportLab generated PDF document -- digest (http://www.reportlab.com) + +/Info 11 0 R +/Root 10 0 R +/Size 17 +>> +startxref +8460 +%%EOF + FILE: TRAINING_MODULES.pdf.txt — 6339 bytes +HELPER 1 — SAW OPERATOR TRAINING v9 +MODULE H1: SAW OPERATOR (Helper 1 - Debtor, 3 days to clear debt) +Objective: Safe, accurate, repeatable cuts with ±0.5mm tolerance, squareness ±0.5°, burr < +0.2mm +SAFETY (Must memorize, demo required): +1. Blade guard MUST be down during cut. No guard = STOP WORK. +2. Push stick for pieces <150mm, never hands within 100mm of blade. +3. No loose clothing, tie hair, gloves OFF when operating saw (entanglement), gloves ON wh +en handling cut Al (sharp). +4. Eye protection + ear protection mandatory. Safety glasses Z87. +5. Emergency stop: red button cuts power. Test every morning. Location: within arm reach. +6. Saw blade change interval: every 150m cut or when burr >0.3mm. Change with power OFF, l +ockout. +7. Coolant: WD40 spray for Al, prevents gumming. No coolant on steel. +8. Workpiece clamp mandatory, no free-hand cuts. +TECHNIQUE: +Feed rate: 5mm/s for 25x3 flat bar, 3mm/s for 40x4, 2mm/s for square tube (listen to motor +, no screaming). +Kerf compensation: 2mm blade thickness. Mark cut line +2mm. Measure after first cut, adjus +t. +Saw blade: 80T carbide for Al, 24T for wood. Never mix. +Squareness check: square tool, check both axes. If out >0.5°, adjust fence. +Length check: caliper for <300mm, tape for >300mm, both with ±0.1mm resolution for caliper +. +Orientation critical for P6: 40mm vertical (strong axis). Red dot mark on strong side. Jig + only fits one way. +QUALITY: +Burr inspection: finger test (with glove) + visual. Burr >0.2mm → file. +Deburr: file + 120 grit sandpaper. For P1 latch, deburr is structural (K_t reduction). +Measurement log: every piece measured, recorded in field sheet, QR tape. +Waste: offcuts >100mm keep, <100mm recycle bin. Weigh waste for T15. +QUIZ (Must 4/5 to operate unsupervised): +Q1: Kerf compensation for this saw? A: 2mm +Q2: Feed rate for 40x4 flat bar? A: 3mm/s +Q3: Blade guard position? A: DOWN during cut +Q4: P6 bar orientation? A: 40mm vertical, red dot up +Q5: Emergency stop test frequency? A: Every morning +Q6: Gloves when operating saw? A: OFF (entanglement), ON when handling cut pieces +Q7: Blade change interval? A: Every 150m or burr >0.3mm +CERTIFICATION: Operator ____ Date ____ Witness ____ Score __/7 +Retraining: Every 90 days or after any safety incident or failed QC. +Page 1 | ABCAA-TAGAYTAY-2026 | v9 | Helper Training Modules + +HELPER 2 — ASSEMBLER & QC TRAINING v9 +MODULE H2: ASSEMBLER & QC (Helper 2 - Sourcer, logistics, assembly) +Objective: Correct assembly, torque, tap-test, inventory, delivery +RIVET GUN OPERATION: +Grip angle 90° to surface, pressure firm, mandrel collection bin (no litter). +For P1 pivot: use M6 bolt + nyloc, not rivet (fatigue). Rivet only for non-pivot. +Hole prep: center punch, drill 6mm, deburr both sides. +TORQUE WRENCH (Click-type): +M4: 2.5 N·m, M6: 5.0 N·m, M8: 10 N·m. Set dial, listen for click, stop. +Calibration: every 100 uses or 30 days, hang 5kg weight at 0.5m → 24.5N·m check. +Sequence: star pattern for 4+ bolts, incremental 50%→100% torque. +Log torque in field sheet. +VIBRATION QC (Stream F): +MPU6050 → Arduino → Pi. Mount with double-sided tape at node A (marked). +Tap-test: 5N force (approx finger flick), record 2 sec @ 500Hz, FFT 0-200Hz, find peak. +Baseline: 3 taps healthy, average freq. DI = |f_damaged - f_healthy|/f_healthy +Threshold 0.05 → REWORK if DI>0.05. Rework: tighten rivets, re-tap. +Expected baselines: P1 latch 120Hz, P2 chassis 95Hz, P6 node 45/60/75Hz, SA arm 30Hz +Data logging: csv with timestamp, project_id, freq, DI, pass/fail → seeds.db +INVENTORY & SUPPLY CHAIN: +QR scan: every scrap piece on entry, masking tape with ID (e.g., AL-20260715-001), scan wi +th phone → inventory.json +Fields: cross-section, length, weight, alloy guess (spark test), location (shelf A/B), pho +to. +Price tracker: manual entry to csv/prices.csv daily 6AM, check moving avg, alert if < thre +shold. +ASSEMBLY FOR P6 (Critical): +Orientation: 40mm vertical, red dot up. Jig ensures correct. +Anchor: 40cm rebar stakes, 200N pull test per foot with luggage scale, log. +Guy wires: 4x equal tension, 45° angle, hook to stake. +Deploy: handle extension only, no hands in scissor, 15s target, two-hand on handle. +QUIZ (Must 4/5): +Q1: M6 torque? A: 5.0 N·m +Q2: DI threshold for rework? A: 0.05 +Q3: Tap force? A: 5N +Q4: QR scan time target? A: <30s per piece +Q5: P6 anchor pull test? A: 200N per foot +Q6: P6 orientation? A: 40mm vertical +Q7: Rivet vs bolt at pivot? A: Bolt + nyloc at pivot, rivet only non-pivot +CERTIFICATION: Operator ____ Date ____ Witness ____ Score __/7 +Retraining: Every 90 days or after failed QC or customer complaint. +QUICK-REFERENCE CARDS (Laminated, credit card size, print on Pi): +Card 1 - Torques: M4 2.5, M6 5.0, M8 10 N·m + +Card 2 - Spark test: 5052 no spark, 6061 dull short, steel bright forked, pure Al no spark + soft +Card 3 - PRBM check: P1 arm hang 1kg → 4-6mm deflection, if not → wrong alloy +Card 4 - Wind: <40 no guys, 40-80 with guys, >80 stow, anchor pull 200N +Card 5 - Emergency: Saw e-stop, push stick, eye protection, first aid kit location + Page 2 | ABCAA-TAGAYTAY-2026 | v9 | Helper Training Modules + +TRAINING VALIDATOR & LINKS +TRAINING VALIDATOR — T26 — TRACKING +Tracks: helper ID, module completed, quiz score, certification date, retraining due +Implementation: Python sqlite seeds.db table training_log +Schema: id, helper_name, module (H1/H2), score, passed (bool), certified_by, date, next_re +train_date (date+90 days) +Alert: if next_retrain_date < today → block unsupervised operation, require quiz retake +Dashboard: print monthly report of certified helpers, scores, incidents +COMPLIANCE LINK — T27 +No helper can sign field sheet unless certified for that project. +Field protocol signature block checks training_log for valid certification. +REVENUE LINK — T28 +Helper 2 does delivery, collects review, referral discount 10%. Track via pricing_ab_test. +Page 3 | ABCAA-TAGAYTAY-2026 | v9 | Helper Training Modules + +[PDF page 1 image attached. Read this image directly to extract content.] + +[PDF page 2 image attached. Read this image directly to extract content.] + +[PDF page 3 image attached. Read this image directly to extract content.] + +[PDF page 4 image attached. Read this image directly to extract content.] + \ No newline at end of file diff --git a/mainbrain/handoff/20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_PDF_INSPECTION.txt b/mainbrain/handoff/20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_PDF_INSPECTION.txt new file mode 100644 index 000000000..a9b970881 --- /dev/null +++ b/mainbrain/handoff/20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_PDF_INSPECTION.txt @@ -0,0 +1,28 @@ +PDF: /mnt/data/MASTERZIP_v11_COMBINED_DETAILED(2).pdf +Pages: 68 +Encrypted: False +Page sizes (pt, rounded): + - 595 x 842 (68 page(s)) +Metadata: + /Author: (anonymous) + /CreationDate: D:20260715092347+08'00' + /Creator: (unspecified) + /Keywords: + /ModDate: D:20260715092347+08'00' + /Producer: ReportLab PDF Library - www.reportlab.com + /Subject: (unspecified) + /Title: (anonymous) + /Trapped: /False +Outline items: 0 +Form fields: 0 +Attachments: 0 +Annotations: 0 + +Fonts (pdffonts, first 25 lines): +name type encoding emb sub uni object ID +------------------------------------ ----------------- ---------------- --- --- --- --------- +Helvetica Type 1 WinAnsi no no no 2 0 +Helvetica-Bold Type 1 WinAnsi no no no 3 0 +ZapfDingbats Type 1 ZapfDingbats no no no 4 0 +Courier Type 1 WinAnsi no no no 6 0 +Symbol Type 1 Symbol no no no 9 0 diff --git a/mainbrain/handoff/30_RUNTIME_AND_MEMORY_DESIGNS/Consider best setup.txt b/mainbrain/handoff/30_RUNTIME_AND_MEMORY_DESIGNS/Consider best setup.txt new file mode 100644 index 000000000..a16a0de42 --- /dev/null +++ b/mainbrain/handoff/30_RUNTIME_AND_MEMORY_DESIGNS/Consider best setup.txt @@ -0,0 +1,4 @@ +Human thinks this might be a good setup to upgrade to before deployment Core Brain — One strong reasoning model (~30-35B class, Qwen3.5 32B or equivalent quantized). This is your main thinker. Pair it with a small fast router model (7-9B) for triage. This combo eats ~40-45GB and gives you the best quality/speed balance without needing a datacenter. +The Semantic Core (This is the real premium part) — Don’t do basic vector DB. Go with a hybrid vector + graph setup: +• LanceDB for the vector side (lightweight, zero-copy, excellent for local, multimodal-ready). +• FalkorDB or Neo4j (embedded mode) for the graph/ontology layer. \ No newline at end of file diff --git a/mainbrain/handoff/30_RUNTIME_AND_MEMORY_DESIGNS/EtherAI Absorption System.txt b/mainbrain/handoff/30_RUNTIME_AND_MEMORY_DESIGNS/EtherAI Absorption System.txt new file mode 100644 index 000000000..8313f2673 --- /dev/null +++ b/mainbrain/handoff/30_RUNTIME_AND_MEMORY_DESIGNS/EtherAI Absorption System.txt @@ -0,0 +1,163 @@ +Completed the scaffold audit and produced **EtherAI Absorption Gun Complete Production Starter v11**, version **2.1.0**. + +[Download the complete v11 starter pack](sandbox:/mnt/data/etherai_absorption_gun_complete_starter_v11.zip) + +[Download the installable v2.1.0 wheel](sandbox:/mnt/data/etherai_absorption_gun_complete_starter_v11/dist/etherai_absorption_gun-2.1.0-py3-none-any.whl) + +[Read the distributed-runtime assessment](sandbox:/mnt/data/etherai_absorption_gun_complete_starter_v11/docs/DISTRIBUTED_RUNTIME_ASSESSMENT_v11.md) + +[Read the complete verification record](sandbox:/mnt/data/etherai_absorption_gun_complete_starter_v11/VERIFICATION_v11.txt) + +## What was absorbed + +The best parts of your scaffold are now real production components: + +- Redis Streams consumer-group dispatch +- `XREADGROUP` processing and acknowledgment +- `XAUTOCLAIM` recovery of work abandoned by crashed consumers +- SQLite WAL-backed task journaling +- Compose health-gated startup +- Separate gateway and worker processes +- SHA-256 artifact manifest verification +- Durable result and dead-letter records +- Worker heartbeat healthchecks +- Optional Chroma deployment profile + +Redis documents that consumer-group work should be acknowledged after processing and that pending messages otherwise remain available for recovery. `XAUTOCLAIM` transfers ownership of entries idle beyond a configured threshold, which is now implemented in the worker. ([redis.io](https://redis.io/docs/latest/commands/xautoclaim/)) + +Docker Compose’s `service_healthy` condition waits for the dependency’s healthcheck before starting the dependent service, which now governs Redis → worker → gateway startup. ([docs.docker.com](https://docs.docker.com/compose/how-tos/startup-order/)) + +## Important corrections + +The proposed `/execute_verified` endpoint was not safe. It accepted arbitrary shell commands without authentication, sandboxing, authorization, or an allowlist. It has been removed. + +The gateway now accepts only two validated Pydantic task types: + +```text id="2ruywh" +absorb_text +verify_artifact +``` + +The service was also renamed from **MCP Gateway** to **Task Gateway** because the submitted FastAPI code did not implement the Model Context Protocol. The package does not falsely label a REST API as MCP. + +Fixed container names and static IPv4 assignments were removed. Compose service DNS is used instead, allowing worker replicas and avoiding subnet conflicts. + +Chroma is no longer started in the critical path. It is available only through an optional profile and requires an explicitly pinned image before activation. + +## New durability model + +v11 introduces a proper transactional task outbox: + +```text id="k089r2" +API request + → SQLite task + outbox row in one transaction + → publisher claims outbox row + → Redis XADD + → consumer-group worker + → SQLite execution lease + → task execution + → completed / retry_wait / dead_lettered +``` + +Outbox claim leases prevent the gateway and worker from publishing the same row concurrently. + +A crash after Redis publication but before the SQLite publication marker can still produce a duplicate message. That unavoidable at-least-once window is controlled by: + +- stable `task_id`; +- SQLite task uniqueness; +- worker execution leases; +- terminal-state duplicate detection; +- idempotent acknowledgment handling. + +The system correctly claims **at-least-once delivery**, not exactly-once execution. + +## Wolfram-verified retry policy + +Wolfram was used to verify the default retry and reclaim relationship: + +```text id="mbwfci" +Maximum task timeout: 30 seconds +Nominal retry delays: 1, 2, 4, 8, 16 seconds +Deterministic jitter: ±20% +Total nominal retry delay: 31 seconds +Redis reclaim threshold: 60 seconds +Constraint check: passed +``` + +The implementation derives jitter deterministically from: + +```text id="rrswhv" +SHA-256(task_id + attempt) +``` + +This spreads retries across tasks while remaining reproducible and auditable. + +[Read the Wolfram retry analysis](sandbox:/mnt/data/etherai_absorption_gun_complete_starter_v11/docs/WOLFRAM_RETRY_ANALYSIS_v11.md) + +## Gateway and deployment + +The FastAPI gateway now uses the recommended lifespan context for shared startup and shutdown resources instead of legacy startup hooks. ([fastapi.tiangolo.com](https://fastapi.tiangolo.com/advanced/events/)) + +Routes: + +```text id="p46a19" +GET /healthz +GET /readyz +POST /v1/tasks/absorb +POST /v1/tasks/verify-artifact +GET /v1/tasks/{task_id} +``` + +The gateway: + +- binds to `127.0.0.1` by default; +- runs as a non-root user; +- uses a read-only root filesystem; +- checks both Redis readiness and SQLite writability; +- contains no arbitrary execution endpoint. + +SQLite WAL allows reads and writes to proceed concurrently in most normal cases, although applications must still handle occasional `SQLITE_BUSY` outcomes. ([sqlite.org](https://sqlite.org/wal.html)) + +## Hugging Face integration + +The root remains a lightweight private-ready Gradio Space. + +The Redis worker and Compose stack remain a separate self-hosted deployment because a standard Space restart does not automatically guarantee persistent local database storage. Hugging Face supports custom Docker Spaces, one externally exposed application port, runtime environment variables, and optional attached storage or external persistence. ([huggingface.co](https://huggingface.co/docs/hub/spaces-sdks-docker)) + +[Read the Hugging Face deployment guide](sandbox:/mnt/data/etherai_absorption_gun_complete_starter_v11/docs/HUGGING_FACE_DEPLOYMENT.md) + +I did not publish the project to the Hub because no final repository name or privacy setting was specified in this turn, and the local `hf` CLI runtime was not authenticated. + +## Verification + +```text id="14a4gq" +Tests: 56 passed +Python compilation: passed +Compose YAML parsing: passed +Wheel build: passed +Fresh wheel installation: passed +Installed CLI doctor: healthy +pip dependency check: passed +ZIP integrity: passed +Files in package: 119 +``` + +ZIP SHA-256: + +```text id="pd2qsc" +9a82c2719d0b6c35f5da4c16fcd2d9c0a7d2ee0665b0ef1006c129eb2856afde +``` + +Wheel SHA-256: + +```text id="dur9iu" +6e8f4ada95dbc9a7ff3802a6ffad63666d5beb8f634a1bbf1cdf924d83583a00 +``` + +## Honest remaining weaknesses + +A live Docker/Redis deployment could not be booted in this execution environment because neither Docker nor Redis Server was available. The distributed layer was verified with unit tests, fake-queue integration tests, API lifecycle tests, static Compose validation, and an installed-wheel test. + +SQLite is still single-node coordination, not distributed consensus. Redis and SQLite cannot participate in one atomic cross-system transaction. Result-stream publication is therefore auxiliary; SQLite terminal status remains authoritative. + +Remote gateway exposure still requires authentication, rate limiting, TLS, and Redis ACL configuration. Chroma remains intentionally disconnected until a real vector-memory adapter and migration policy exist. \ No newline at end of file diff --git a/mainbrain/handoff/30_RUNTIME_AND_MEMORY_DESIGNS/WORDLIB semantic core update.txt b/mainbrain/handoff/30_RUNTIME_AND_MEMORY_DESIGNS/WORDLIB semantic core update.txt new file mode 100644 index 000000000..ee762b287 --- /dev/null +++ b/mainbrain/handoff/30_RUNTIME_AND_MEMORY_DESIGNS/WORDLIB semantic core update.txt @@ -0,0 +1,91 @@ +Choose **B — proceed to `SPEC-DEPLOY_PROOF_GATE`**. + +Reason: `SPEC-CRYPTOGRAPHIC_BINDING` is implemented and packaged. The honest missing piece is deploy/runtime enforcement. You do not need to debate the crypto-binding patch forever. The next useful move is to make the system check those proof gates during deployment. + +Send him this: + +:::writing{variant="standard" id="48391"} +B — Proceed to `SPEC-DEPLOY_PROOF_GATE`. + +Yes, this is a new execution order, and yes, `deploy_check.py` is now explicitly allowed for this spec. + +Base archive: +`blumentritt_SPEC_CRYPTOGRAPHIC_BINDING_implemented_v1.zip` + +Mission: +Implement `SPEC-DEPLOY_PROOF_GATE` on top of the cryptographic-binding build. The job is to make the new proof chain deploy-visible, mechanically checked, and impossible to silently regress. + +Allowed files for this run: +- `deploy_check.py` +- `tests/test_deploy_proof_gate.py` +- `tests/test_patch_payload.py` +- `docking/improvement/patch_applier.py` + +Forbidden files: +- `src/self_editor.py` +- `main.py` +- `data/**` +- `models/**` +- `Setup/**` +- `docking/audit/*.jsonl` +- `docking/memory/*.jsonl` +- `docking/letters/*.jsonl` +- `docking/improvement/*records.jsonl` + +Required implementation: +1. Add a deploy-time CNS proof-gate section to `deploy_check.py`. +2. Add `check_cns_proof_gates()` or the cleanest equivalent function. +3. Verify `canonical_patch_digest()` determinism. +4. Verify digest changes when target file, action, old content, or new content changes. +5. Verify malformed or missing content digests cannot pass. +6. Verify digest mismatch returns `mismatched_content_digest`. +7. Verify missing digest returns `missing_content_digest` or strict validation failure. +8. Verify valid `expected_hash_before` cannot override a digest mismatch. +9. Verify digest match does not bypass whitelist or human approval gates. +10. Verify synthetic deploy checks do not modify forbidden JSONL logs. +11. Ensure `deploy_check.py` reports the proof-gate result in both normal mode and `--json` mode. +12. Ensure deploy check exits non-zero if a proof gate fails. + +Important scope guard: +Do not solve the larger isolated-tester problem in this spec. Do not implement `SPEC-TESTED_PATCH_EXECUTION_SANDBOX` yet. Mention it only as the next real wound after deploy proof gates. + +Verification required: +- `python -m pytest -q tests/test_deploy_proof_gate.py` +- `python -m pytest -q tests/test_patch_payload.py` +- `python deploy_check.py` +- `python deploy_check.py --json` +- `python -m py_compile deploy_check.py docking/improvement/patch_applier.py` + +If `pydantic` or `pytest` are still unavailable, say so honestly, but still perform pure-function and static structural checks where possible. Do not fake green tests. + +Return: +- new archive: `blumentritt_SPEC_DEPLOY_PROOF_GATE_implemented_v1.zip` +- files changed +- exact checks added +- test commands and exact results +- whether forbidden JSONL logs stayed byte-identical +- archive file count +- archive SHA-256 hash +- remaining risks +- whether `SPEC-TESTED_PATCH_EXECUTION_SANDBOX` is now the correct next spec + +Execute now. Patch, verify, package, and return the archive. +::: + +Do **not** choose C yet. The isolated tester problem is real, but `SPEC-DEPLOY_PROOF_GATE` should come first because it gives you a deploy-visible safety net around the cryptographic-binding work. After that, the next bigger architecture spec should be: + +`SPEC-TESTED_PATCH_EXECUTION_SANDBOX` + +That is where you close the deeper wound: tests must run against an isolated patched candidate workspace, not merely a propagated digest claim. + + +Decision made: choose fork B. + +Prepared explicit Claude instruction authorizing `deploy_check.py` for `SPEC-DEPLOY_PROOF_GATE`. + +Defined allowed files, forbidden files, implementation requirements, verification commands, return contract, and scope guard. + +Deferred `SPEC-TESTED_PATCH_EXECUTION_SANDBOX` until after deploy proof gates. + +No code or archive created in this turn. + \ No newline at end of file diff --git a/mainbrain/handoff/99_INTEGRITY/MASTER_MANIFEST.json b/mainbrain/handoff/99_INTEGRITY/MASTER_MANIFEST.json new file mode 100644 index 000000000..fb5b27fc2 --- /dev/null +++ b/mainbrain/handoff/99_INTEGRITY/MASTER_MANIFEST.json @@ -0,0 +1,2679 @@ +{ + "bundle_name": "CONVERSATION_HANDOFF_MASTERZIP_v1", + "generated": "2026-07-17", + "owner": "Johannes / Joe", + "indexed_file_count": 379, + "total_payload_bytes": 3733418, + "integrity_files_excluded_from_index": [ + "99_INTEGRITY/DUPLICATE_GROUPS.json", + "99_INTEGRITY/FILE_INDEX.md", + "99_INTEGRITY/MASTER_MANIFEST.json", + "99_INTEGRITY/SHA256SUMS.txt", + "99_INTEGRITY/SHA256SUMS_VERIFY.log" + ], + "sections": [ + "00_START_HERE", + "10_CANONICAL_WORKING_TREES", + "20_DOMAIN_SPECIFICATIONS", + "30_RUNTIME_AND_MEMORY_DESIGNS", + "40_DATABASE_AND_PROVIDER_STATE", + "90_ORIGINAL_UPLOADS", + "99_INTEGRITY", + "START_HERE.md" + ], + "files": [ + { + "path": "00_START_HERE/CANONICAL_SOURCE_MAP.md", + "size_bytes": 3332, + "sha256": "80d04ddf28ec855389cbafd251a0b6966b28eb613cb0cde6f61c1e3640444e2f", + "mime_type": "text/markdown", + "section": "00_START_HERE" + }, + { + "path": "00_START_HERE/CONTINUATION_PROMPT.xml", + "size_bytes": 2487, + "sha256": "f90e5d5babcfca0a9c674191c00d9814bf479e3d0a17006771b877c226d0eb4e", + "mime_type": "application/xml", + "section": "00_START_HERE" + }, + { + "path": "00_START_HERE/CURRENT_STATE.xml", + "size_bytes": 3125, + "sha256": "7698782a35cb36f853f25ad99cddb2fc33b9e8339dbaf41d9977e8c3cdd080fd", + "mime_type": "application/xml", + "section": "00_START_HERE" + }, + { + "path": "00_START_HERE/HANDOFF_PROMPT.md", + "size_bytes": 1512, + "sha256": "a6459baffcb5c049109f9fc3de725856248892748e02496b6d63dbbf10e63fbe", + "mime_type": "text/markdown", + "section": "00_START_HERE" + }, + { + "path": "00_START_HERE/HIGH_SIGNAL_CONVERSATION_RECORD.md", + "size_bytes": 4144, + "sha256": "7ae5571a4f267f141e2028f2e88c28fe60e1d002284dad7703aa20eb8c56cdc9", + "mime_type": "text/markdown", + "section": "00_START_HERE" + }, + { + "path": "00_START_HERE/KNOWN_GAPS_AND_RISKS.md", + "size_bytes": 2836, + "sha256": "9985de1e4c09c502d89fd2adadb26cb3eac0ea1ac806a64726f2cfad717c8bcc", + "mime_type": "text/markdown", + "section": "00_START_HERE" + }, + { + "path": "00_START_HERE/MERGE_AND_EXECUTION_PLAN.md", + "size_bytes": 3842, + "sha256": "fa78fc82532686bba65b5c3d3e447ad0199b2e05a134bd213fcd37b3c64f3e79", + "mime_type": "text/markdown", + "section": "00_START_HERE" + }, + { + "path": "00_START_HERE/MISSING_ARTIFACTS.md", + "size_bytes": 902, + "sha256": "33c599218a812a5b02309aaf508a97fd296b3f173a134989bb8586f091767d8c", + "mime_type": "text/markdown", + "section": "00_START_HERE" + }, + { + "path": "00_START_HERE/PROVIDER_AND_CONNECTOR_STATE.md", + "size_bytes": 1462, + "sha256": "08cf89d445e77723461d856769b40064405622b599d94657b68a8574b022d74e", + "mime_type": "text/markdown", + "section": "00_START_HERE" + }, + { + "path": "00_START_HERE/README_MASTER_HANDOFF.md", + "size_bytes": 4244, + "sha256": "06a7074f550f689834746b8aa4aba01ea6d6a835454335b8b76190e1cf0ad74f", + "mime_type": "text/markdown", + "section": "00_START_HERE" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.backend-features.json", + "size_bytes": 144, + "sha256": "400a842ce988d932f78deb578551809943a215250143294097a71c0adafe67ff", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.dockerignore", + "size_bytes": 35, + "sha256": "63c04a042584ffb92392a0b832664c992d4948d1acb77d6a3160fb939886163e", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.env.example", + "size_bytes": 2506, + "sha256": "c2beefe028fcb096be2684463bfdfaf473a6ad18721485cb4801ae704a06f9dd", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.gitignore", + "size_bytes": 462, + "sha256": "25b56bca05230fe1d820d5e24f4981837a3d0796796c272fe44dee90607c2a2a", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.prettierignore", + "size_bytes": 310, + "sha256": "17f593918ed38aec9deac4301d519a4349172c649d1849ce17190cedbde33228", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.prettierrc", + "size_bytes": 310, + "sha256": "087532218269eb851c22dcc3d5234ea46bfa513b494a3d7b167b1c1f48c410c5", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/CLAUDE_CONNECTION_STATUS.md", + "size_bytes": 1035, + "sha256": "620be0b514040ed2d07ed232bbaca99f9108bb0ac34d2f028e31e1d5951f59ce", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/INTEGRATION_GUIDE_2026.md", + "size_bytes": 6332, + "sha256": "e7b24b72d6018c167f272eec6f89d92a55b10bd3bd773208d5ee7ec506ca65fd", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/README.md", + "size_bytes": 2065, + "sha256": "46c71c30d3db03886f9e1dd27209bf49861275730ca6d3190719bf6637e7f9f6", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/SUPABASE_SWARM_CONTROL_MIGRATION.sql", + "size_bytes": 6218, + "sha256": "6b300d6c375299183df7247884a04ea01968e6b040a26059b0c5d81ef69b507d", + "mime_type": "application/sql", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/VERIFICATION_REPORT.md", + "size_bytes": 3462, + "sha256": "1055cdaf97d11bc5c651b604befac21b82a392db612dde4acf651e315e6da9e9", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/admin-router.ts", + "size_bytes": 3320, + "sha256": "7279f7266a8258f1c5d562f76a0e1b73b60138fd131ffbc65281a02c68d2fb00", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/agent-router.ts", + "size_bytes": 15677, + "sha256": "5a7af02ac0de759283a020c770d502b0c467d331b18da8840994ff6d178ec5ae", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/claude-critic.ts", + "size_bytes": 1931, + "sha256": "3a5fde912bd9dbabcfe403ad46d298c3b584fcf4eba390edbb574b3ab269017e", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/contracts.ts", + "size_bytes": 1225, + "sha256": "46f06451c946c90bf013e3fcd2d5e48e836f07a8d3dcfc96e7453b80ac40320c", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/execute-swarm.ts", + "size_bytes": 5565, + "sha256": "94867c046b92f17947670e8b520cca1aa455e4739ab8d7dc0d40220b272455ec", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/hf-local-router.ts", + "size_bytes": 2920, + "sha256": "93805392eabecd0ce658200084e7716ee91628048667c486ea7bc77b11db6902", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/openai-swarm.ts", + "size_bytes": 6765, + "sha256": "5000688f54f27ed838af43dcec4488f4cb13bdc801205da643e161791e12dc56", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/project-context.ts", + "size_bytes": 2373, + "sha256": "875478ad125832104d9ad7e5b3482746ed96a89274875b756f8c13b994299a94", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/provider-status.ts", + "size_bytes": 1202, + "sha256": "1e427fef95caae9ee92efdc440a714ada53cf3fb81216efff8ef0346ce3a056a", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/state-machine.test.ts", + "size_bytes": 891, + "sha256": "57fcb1eb97f0b9fd7b09d37d830f91e96a1dcc8d078fbaf950b055c87327523c", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/state-machine.ts", + "size_bytes": 928, + "sha256": "f2d69e213744787ba9712523e612800e8084f1c8463921218498d23241cd815e", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/supabase-control.ts", + "size_bytes": 3072, + "sha256": "66cfc80292ffe2f58ebb29d3ff816293ac26693e8c63141a80615d4161ed4105", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/auth-router.ts", + "size_bytes": 725, + "sha256": "0741718e5d6c19991060bc246f5db814a0bd958e53d089b85c57c5147cbc4036", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/boot.ts", + "size_bytes": 1165, + "sha256": "c24f67a29baf4ef6de9ed44c6941fa6a93c1f8bed1229f0afdccc58ecaba41cb", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/context.ts", + "size_bytes": 572, + "sha256": "b6b8e6e1ab58f0482d48817d297eb5e83356d7f23715c36a917521ca1f99f6d7", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/kimi/auth.ts", + "size_bytes": 3937, + "sha256": "e739b199ff5679ccd61b65ebf07124c671d06a554fc86de1a128ecb05205d72a", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/kimi/platform.ts", + "size_bytes": 712, + "sha256": "3d8c5d609a8641877f7e26ce69fa5987ba5ea84425cd27394317dd187b0c094e", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/kimi/session.ts", + "size_bytes": 1130, + "sha256": "478659cb9189fc814e9f508b41eb9eb0ba4cf0b76c4cf7f52847709a0ce06393", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/kimi/types.ts", + "size_bytes": 307, + "sha256": "cdb5cec7f668ea83841b2ad0eaeaf5b85965f72c39cf4ba3bf98297ac25cbe22", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/lib/cookies.ts", + "size_bytes": 462, + "sha256": "f7a010030fad3689ca38277c9d4193400486464cf3fd6e4c88cf5f6904815be4", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/lib/env.ts", + "size_bytes": 579, + "sha256": "c52fc532bcdd2d3d06b3be81466ce727374a20b061eb58dfdf9da7e081b16908", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/lib/http.ts", + "size_bytes": 1996, + "sha256": "615041eecd972d7aa371a45c047db67e2ba6fd0bffc6c769f4f0fddb1d9dda92", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/lib/vite.ts", + "size_bytes": 742, + "sha256": "ba7c9068e75ef736d53024f34d07cb0793786e7d6db5ac0bc5663648a052ce89", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/middleware.ts", + "size_bytes": 1083, + "sha256": "9e18f8dd53815bc859fd38280d88cb726f73f0c80ea8859d859c23a6086232cb", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/queries/connection.ts", + "size_bytes": 447, + "sha256": "935d3f79901082b54f4ae4292c4dfb9c8ceb402e9eea3e6f177bb7f401156e97", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/queries/users.ts", + "size_bytes": 858, + "sha256": "8ce74035f0b155e29a434708d72c9623527606bcd79a6959af00ef17b8b188a7", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/router.ts", + "size_bytes": 411, + "sha256": "b9106e15d176bfab83938eaf2c1afe677ef07f93b11db0b207aa081f2c2bbb8a", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/components.json", + "size_bytes": 461, + "sha256": "22643b642f17cd817ec94d8439a272dac28119af0aebf8219a96ac1c2f4c61dd", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/contracts/constants.ts", + "size_bytes": 335, + "sha256": "1115a0ea08874a7d0ff3c534107ed247c2312a0cb64848dd1cccf0074ae0892d", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/contracts/errors.ts", + "size_bytes": 501, + "sha256": "823cdb78cfc45faa3077db9d2f5cd9e1bd8b8f87e5941e38daa6cde0f19d990b", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/contracts/types.ts", + "size_bytes": 61, + "sha256": "191164b8f041fdf08032103ccceeeba5eea342c9625263ee987e52d65d290d48", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/db/migrations/.gitkeep", + "size_bytes": 0, + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/db/relations.ts", + "size_bytes": 27, + "sha256": "85acb8ece8fbb5031fc56fa8c70338d9b8b06ef3b032391fff8532c6373c7186", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/db/schema.ts", + "size_bytes": 4551, + "sha256": "c5fc3d59dbba5e7b0eb2f4991f27e9cb509bf2e8285ae742991dffc530fe174f", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/db/seed.ts", + "size_bytes": 5266, + "sha256": "96d225203beb798382bbcce6ca0cb9ab3efde85b9c922e4bf5f7090cf6eb9c5c", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/drizzle.config.ts", + "size_bytes": 378, + "sha256": "554769ef8024b45c332b68850ebe9a34c0b0deab819ca6ef269b164027c2d89a", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/eslint.config.js", + "size_bytes": 616, + "sha256": "4efe97b16d1200fac0eaf07aa00930a8668b1f96a0be1891ace8c1e712ff0ccb", + "mime_type": "text/javascript", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/index.html", + "size_bytes": 295, + "sha256": "b649685c058225dc8c564ba04c75ff2bc538bd36a5eb3c52d735bb9aacba0a65", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/info.md", + "size_bytes": 1385, + "sha256": "e86b40922c19326c0d3ddf44ac003359f21f105a38324a471e21ddc678b6eafc", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/package.json", + "size_bytes": 4042, + "sha256": "1c448990c7e84a53268c4ce97f467b2d890f62e6a744f84ac7beb267c4df74fd", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/postcss.config.js", + "size_bytes": 80, + "sha256": "190c877db466995bf1482f4a16abd06e04a89ede3119341e2a86ff96e1737b27", + "mime_type": "text/javascript", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/public/assets/asset-1.jpg", + "size_bytes": 116313, + "sha256": "14f991fe2d5d6155118b16ce02294112b1916cd4cc16f32cf97a9fedb3621e96", + "mime_type": "image/jpeg", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/public/assets/asset-2.jpg", + "size_bytes": 73060, + "sha256": "57ed3f60b788fb14c0d05dc713134d5a43f0c1935b347600592d0bb9b46ef192", + "mime_type": "image/jpeg", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/App.css", + "size_bytes": 606, + "sha256": "a0715e0a09edbd0fbde65816a75e0fa0fc8b314c5260c0768c19bf3aac22621a", + "mime_type": "text/css", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/App.tsx", + "size_bytes": 895, + "sha256": "b43f36b73039dab0f0f8a6c5bfb24640975bd93d0959a67e2496d770bf72fcb6", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/AuthLayout.tsx", + "size_bytes": 9039, + "sha256": "751e39d2bdf3c420a80debbb4780637f14e32e09b335e02f1ad3a03f9f3508cb", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/AuthLayoutSkeleton.tsx", + "size_bytes": 1618, + "sha256": "aa6c35cd632c36c36d2e0830c064703d848f0cd02c0c6ce488a9f3fafe5a19e4", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/IntelligenceOrbit.tsx", + "size_bytes": 2280, + "sha256": "8976af371ca0d4de3a6b7a75d3497900c5e7a1a81e0eb443968022bb1853b014", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/Layout.tsx", + "size_bytes": 6895, + "sha256": "61cb21dce12eabb0d46943bbb5b1cac6ed360ab40aacb102fba867bf4fefacfb", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/NexusRibbon.tsx", + "size_bytes": 1509, + "sha256": "e2dae9e089b442b0d7f8246520a0c39bcee26bfc2e341e2fbef9cbece18da532", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/accordion.tsx", + "size_bytes": 2039, + "sha256": "1e00288c7eee72380002164ea3ff7589df5d92f2f1b8c7aa5077596ef680acdb", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/alert-dialog.tsx", + "size_bytes": 3850, + "sha256": "683cf8b6c3b0c29fb0e31f36e8c7794c63ab5b7ab431f7441ea2d478bbf9fe41", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/alert.tsx", + "size_bytes": 1614, + "sha256": "49d8311589b810b106aada8ef7b13f70b2b1f68cfce4e1458b7f31a191f420e9", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/aspect-ratio.tsx", + "size_bytes": 280, + "sha256": "6a75117416aa89200cf31e8d61643b428e812f479caea857c80004b26d893e79", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/avatar.tsx", + "size_bytes": 1083, + "sha256": "e637ab3522c01631eac2e456588ef301314e2bb7940ebf7cd96e698a868d47bc", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/badge.tsx", + "size_bytes": 1633, + "sha256": "e7455feb113b38c59456ba29a9ec264b5ffa1daae8883866332ad637ffd57c31", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/breadcrumb.tsx", + "size_bytes": 2357, + "sha256": "22f3f4c13ed1085c4131379bfccc6fb173a474f861636bc2736506820153aa08", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/button-group.tsx", + "size_bytes": 2209, + "sha256": "ccbf09097f5ebf2eec86f1a96cb92e8dd39d251ebb5867394196c8b4fec68a5c", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/button.tsx", + "size_bytes": 2218, + "sha256": "5a5c4b8b60a8a80ba7b8b5d0319be2d3c61bfd2ce4fc2a645371dee9f6db0a77", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/calendar.tsx", + "size_bytes": 7793, + "sha256": "c8e67d15d8622135b72045d974a3234ea99f5ffcc1b981eafea8847a14ae1f12", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/card.tsx", + "size_bytes": 1987, + "sha256": "2040cdff27cd1ed771e0ebbd15abcd73d31f2f1e4be6664bd6816fffd2a87476", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/carousel.tsx", + "size_bytes": 5542, + "sha256": "10c5388b66d98f0c555dad2e5b89b9bc846fbc1a3de101ee8b98abc305ec2c51", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/chart.tsx", + "size_bytes": 10069, + "sha256": "39a2fde544144e0ed0e3e7f76eb3f3988f570f849f30f62208c6f3e2fc4e3e4f", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/checkbox.tsx", + "size_bytes": 1219, + "sha256": "a8292972a5b81eff164f621ac0bb66f4ed4419d1599e2d4901968e216574677f", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/collapsible.tsx", + "size_bytes": 786, + "sha256": "661444318605c90d19e47e4d21289a68b4c5f7f01782be70dafa80d3f7a4cd08", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/command.tsx", + "size_bytes": 4804, + "sha256": "416cdc19eb9e7301b51f9665b4f1a797534769a6bb58a563808979f460b0b8a2", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/context-menu.tsx", + "size_bytes": 8274, + "sha256": "70e547a9bececcc98adf2fbfb2cae05c99179707ab0edb1ddfb5d2de329dab42", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/dialog.tsx", + "size_bytes": 3981, + "sha256": "6333f1124e85ff25bce5061ac9ab5981e5346782d5535c9dfeeb51b2d535a7cc", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/drawer.tsx", + "size_bytes": 4255, + "sha256": "0c9464ed4f95207ff6ec0b8f433f550388ea0fe57fecd36bbe100b084ee46a3e", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/dropdown-menu.tsx", + "size_bytes": 8410, + "sha256": "ba022169876b487c849d046ac577654ab61a4cfba158305c8790c572b704ed9e", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/empty.tsx", + "size_bytes": 2396, + "sha256": "584b491f9eb69f8041b3d3732a4d139f5af01de19a00b7a97656c7af7a78716a", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/field.tsx", + "size_bytes": 6145, + "sha256": "e9dcb51b16e5f235bdf23a0b4a092e55c05b2bad08a83126ac675b72aae5380d", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/form.tsx", + "size_bytes": 3764, + "sha256": "a12f73507ab613e9d797979b988a15e32d23458fc8dd4ba71b922aeee977a3b6", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/hover-card.tsx", + "size_bytes": 1532, + "sha256": "031f6a309d87c8e42a2282fccc277dde75e373de8c93dad881582c9dc13e05d0", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/input-group.tsx", + "size_bytes": 5065, + "sha256": "c0df02569e483db8ee86bd51b3b392a1ba62b276604d8c7ea90a9efc5faa9e25", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/input-otp.tsx", + "size_bytes": 2240, + "sha256": "7fd7ed5273f849cde558238148ee1bbae729aa1149407c7c732b6c65906933d2", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/input.tsx", + "size_bytes": 962, + "sha256": "56b7fd30208addbcc2468cfda4f5bc0a55342211deaab61ee35b1c352b1622f1", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/item.tsx", + "size_bytes": 4494, + "sha256": "6d64b756260749245b3a1f292e2aaf2774d7ec0b8bb99403eb8c1be31bd26900", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/kbd.tsx", + "size_bytes": 862, + "sha256": "886e04c83aaa016dfce924e461aa38aa68a9f5c83bdaedd6209dc358c32a8f22", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/label.tsx", + "size_bytes": 611, + "sha256": "9ec42c8a57e82311118b794318409ee02b2cebfa49ba6cce8457cff6448cd471", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/menubar.tsx", + "size_bytes": 8380, + "sha256": "b4be4da586ce1288e8259b1e760a9e317eb0ee9183548c762d8b2a222bbdb3e5", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/navigation-menu.tsx", + "size_bytes": 6664, + "sha256": "d71f57fe0f365541fbf5d00196b0b78a461d8c4f38d35293e5754680d93b9245", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/pagination.tsx", + "size_bytes": 2717, + "sha256": "374ad135c3d4ff3ec080a0009cd9745cdd0e12faa89d2b0e86074f11e5127fd1", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/popover.tsx", + "size_bytes": 1635, + "sha256": "29a217781737bbf5c430859b3de46097a44ada81c4143c2d05543d2167de0ee1", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/progress.tsx", + "size_bytes": 726, + "sha256": "9e36ca3f10bc56b69058d8edd342832b72c8c1b2d36cd142a0decb2445c3b724", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/radio-group.tsx", + "size_bytes": 1466, + "sha256": "b12ca5cef859dd75b274337234bae66e413b0f97845243254a1dedcb2d7a7237", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/resizable.tsx", + "size_bytes": 1980, + "sha256": "4634b0a700b91e5d422babc1f068b6d145b5f000c8aff62d5cfc9b5711fbff73", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/scroll-area.tsx", + "size_bytes": 1645, + "sha256": "1c5d0b242d0513848f4bfa9b57ba7f438d9b1120617029941bfaa137196ecead", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/select.tsx", + "size_bytes": 6344, + "sha256": "68fc754d3042f9fec3406895845e6fcc05d44f93a049478a9d3c706919100ebe", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/separator.tsx", + "size_bytes": 699, + "sha256": "e9dddbd8dbbc0eccd683306481b0f0bbc8e2b60ea97817416ebb9fe7fbbbdca8", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/sheet.tsx", + "size_bytes": 4076, + "sha256": "fbe9b257fd95b9865e1aba651489899c959ed5c16cb8493fe8c2733f83b92ee1", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/sidebar.tsx", + "size_bytes": 21638, + "sha256": "6074d8027b4bc9ea2d5eb1527a8528a7fa69df96f6261b9c6441c3980d41700f", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/skeleton.tsx", + "size_bytes": 276, + "sha256": "f2aea81d8baf2b621945382aabac150e3db40f20d19ac1abea7aff805f1dc33c", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/slider.tsx", + "size_bytes": 1996, + "sha256": "640996327017c3977e3c61eee8ec55230fa0bec509d0f4b44bdc9acdd8eca138", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/sonner.tsx", + "size_bytes": 1020, + "sha256": "a3868f2a8aafd8e2dc96b7ae145009939e9d8723cbb5a4b61d7b7d9bed9df478", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/spinner.tsx", + "size_bytes": 331, + "sha256": "3e6e6e8d37fb4069f8e43e55318f8db06fbc36e6c8be0096da3c9337c1c798b9", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/switch.tsx", + "size_bytes": 1177, + "sha256": "17f2390d98e8ce4d9e90155eac1918266914d6a9ada7c276b5d1c917cef0e969", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/table.tsx", + "size_bytes": 2434, + "sha256": "95e3ef5db88b3bbfb68eed12f341fb942e40ca815f4342e1d5dbc8c8d47c783d", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/tabs.tsx", + "size_bytes": 1969, + "sha256": "e8469e599381cf021ce751c27cca3d8cb06440a45665ca9c2ef2efb0acef1fd9", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/textarea.tsx", + "size_bytes": 759, + "sha256": "de4e9fb0fd8e8ed10ea2e475ffe202a922ffe77e3f3edb2c517b0781447ad1b4", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/toggle-group.tsx", + "size_bytes": 2300, + "sha256": "c63c671fe328f2c1e0d58e3df82a474e73834037c5a39a9ff566a4b3b2cf9010", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/toggle.tsx", + "size_bytes": 1556, + "sha256": "ab2e52debb86451889ac9519dfe27daf3a86d70aa2833da8ed8f6cf3146197ff", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/tooltip.tsx", + "size_bytes": 1892, + "sha256": "cbc12f4086448f8a307ed5fbb160f79467c84a44c48ca0dbd2c62e39a2db6f5d", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/const.ts", + "size_bytes": 36, + "sha256": "f46e9241d92cd3a39ae007ebe69160e6949153ccdbea3590b0d14a0b0deb8ec7", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/hooks/use-mobile.ts", + "size_bytes": 565, + "sha256": "ad0936f84f1df79d3697bfbff9c18f8ad58431c1cbaf2359c6a853b0fcc9f28b", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/hooks/useAuth.ts", + "size_bytes": 1538, + "sha256": "fd65eed54948873c0e9dc6a6c97979f1a8f035dd501d8b5a5ce01bbf2ad1c273", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/index.css", + "size_bytes": 4229, + "sha256": "f4a96fccfd5d73e446df811ee4ac0186801791d850fefa00f11ef22dec9c0921", + "mime_type": "text/css", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/lib/utils.ts", + "size_bytes": 166, + "sha256": "7c8c3dfc0cdd370d44932828eb067ef771c8fe7996693221d5d4b90af6d54f2d", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/main.tsx", + "size_bytes": 411, + "sha256": "5158f50a8d24a8f10519f1cb9757884b890da059235c0dcbfe63acd387f45ab0", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/AdminDashboard.tsx", + "size_bytes": 12661, + "sha256": "8cb4b85497bf488ba2d4a5d98f1835e3a926e8ec591cade534805aadf37f2187", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/AgentGallery.tsx", + "size_bytes": 7781, + "sha256": "0a7f5f11dba8c7bfd608164cbccc831b370beb6352623660a15aed4b6e1d13c2", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/History.tsx", + "size_bytes": 6520, + "sha256": "fef4a4b58ceb716f3ed0421268b8788511b2774c0cbddc2124455ee279033fe8", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/Home.tsx", + "size_bytes": 10360, + "sha256": "ddbefe3e4f52253efc5ba75c619060b604833bb5f8f7ccbdda010985e1328ec4", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/Login.tsx", + "size_bytes": 2982, + "sha256": "b09f1e20f438e9d8500ecd849a2db7867448b484693f6c7a8b0dc03555329cdb", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/NotFound.tsx", + "size_bytes": 1210, + "sha256": "3b193acb178c2c93919ac507b1d86239411cdbcf6ccff5cd27422c45dbe7dba7", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/SwarmWorkspace.tsx", + "size_bytes": 15210, + "sha256": "2c81de99ff62f1de0aec77dfbb4e1ad564bca09b35953e8890904b75d51433b5", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/providers/trpc.tsx", + "size_bytes": 954, + "sha256": "4b29a7cd0a16720f021b1daf5b9e07f6cd4435b9273d65a5b144cfb12f81bc60", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tailwind.config.js", + "size_bytes": 2777, + "sha256": "149b62bbe6c8c83d2f3dfb3196bbdb309156a63a7a289acc12f6c9066c763752", + "mime_type": "text/javascript", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tsconfig.app.json", + "size_bytes": 930, + "sha256": "4f315c21e5baadb1c1a1453478549f4f53bc04a44fad30bebb7c3e1247d69706", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tsconfig.integration.json", + "size_bytes": 600, + "sha256": "05aefeb2c50149ed2bf1cad4874344cbdefec64960437956b99e53786291be23", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tsconfig.json", + "size_bytes": 401, + "sha256": "095df19402d5aa87e29ddf7dd3f7259c6588aac659221f36b94b8a5891adb7f2", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tsconfig.node.json", + "size_bytes": 653, + "sha256": "c3dd0fb522feba3596713f51b95bd53d781d845d24aedbfa2ac093d8b39c5120", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tsconfig.server.json", + "size_bytes": 616, + "sha256": "7166d855e0fb97203e1ce5dcbdda8546e5a33da543d9ecab67e95f13bc57ed07", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/verification/offline-ai-sdk-shims.d.ts", + "size_bytes": 1094, + "sha256": "5f81483f0cdbbe9c4cd04bf5052025dc556332b8723ac34904709018585bf40a", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/vite.config.ts", + "size_bytes": 810, + "sha256": "d9b910dbd12644b976f1965b14f56e1eb36f1e61ac15540bdb854e847e1e78d5", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/vitest.config.ts", + "size_bytes": 489, + "sha256": "fb8add3e50ba9d1a82f280430b751dfef08b20c95bd9ef567613836b62d2392c", + "mime_type": "text/vnd.trolltech.linguist", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/.github/workflows/ci.yml", + "size_bytes": 4164, + "sha256": "adc1b9edfd51a0e80dbfa261a90a606e8752192382a4c314571af3bb51b7f35f", + "mime_type": "application/yaml", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/.gitignore", + "size_bytes": 485, + "sha256": "5ecfd774a3f7f0be8ae11ac6912268e4cca1cb03de529649e42a2e11294140da", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/CHECK.bat", + "size_bytes": 629, + "sha256": "026960a8075c2510db2bfb3743ac14c9e1cfa8c942f01f60bd4b70ad2f90dff1", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/CLAUDE_BRIEFING.md", + "size_bytes": 62063, + "sha256": "6930709bd7d8133e75ec98734bee99fd1406cfd096f69c6f9e315e1224e1c289", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/GodotProjects/PLACE_PROJECTS_HERE.txt", + "size_bytes": 461, + "sha256": "60338d7c36474121ed183f3a2468ed4fbf38c9ceae48122efd12d29cee7c1f39", + "mime_type": "text/plain", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/INSTALL.bat", + "size_bytes": 1975, + "sha256": "fa2491c41db88207571aca85fa84687097e4d8c3443c22f51ada160f3a463496", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/README.md", + "size_bytes": 4089, + "sha256": "fc84c3fbbc9df2b8d4c66eb83e6f7e5fbb94e9ee8fb81fe054239f8180eaef6d", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/RUN_ME.bat", + "size_bytes": 1054, + "sha256": "75df707416275c7fd4779859d91450c7b58d07ec7d66eb7bfad6cd84efcf21ec", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/START.vbs", + "size_bytes": 344, + "sha256": "59281bafa67a694253e1cde209a8a4b2ce512c732c1c382b650a117be17c0ae2", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/START_HERE.bat", + "size_bytes": 1588, + "sha256": "5cba9ca3c47c9a8ec7779ac897578608e99837fdc29e387384f779620b9ad9b3", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/00_Backup_Before_Ventoy.bat", + "size_bytes": 1697, + "sha256": "5b816b2e4ab6d1b889c04537bec8d71df29e3d73b10183173ca389582d679d0b", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/01_Install_Ollama.bat", + "size_bytes": 2705, + "sha256": "39da152492ae1b6d2c13512f2d6a6b79a1002f8a4ab8de3b86be36722573d38a", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/02_Install_OpenWebUI.bat", + "size_bytes": 1665, + "sha256": "f97157379e226d58fc0154db2ad69b1005f8e50cb1226db64870f755ed69683e", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/03_Setup_Kiwix.bat", + "size_bytes": 5841, + "sha256": "3943ba70aad3acade1628ebc36128742825a901e9779c21b098fe86ecbe2b9df", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/04_Setup_Godot.bat", + "size_bytes": 8328, + "sha256": "a0a7c1d80b17fc4e45b3add4c547cd7ebfc27e0ae42ddbc9a5da7d69b4ba1eb8", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/05_Add_To_Grokipedia.bat", + "size_bytes": 2781, + "sha256": "25e5a2485fcc603cf925f0221abb40a2abffc84ec43eb8b791895867af9cfd1f", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/auto_install.cpython-313.pyc", + "size_bytes": 24699, + "sha256": "8483a907f880c5dd536918ed5df98ac46ef4ad0dabd2a4927f90fa4687173cae", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/content_seeder.cpython-313.pyc", + "size_bytes": 43375, + "sha256": "1d5d3e8b68593427f82cdb3abb44bc480c1ca33f87f8db9022e9eb782d235571", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/deploy_check.cpython-313.pyc", + "size_bytes": 16369, + "sha256": "18a25da6e899c35c32c1b2a0649bc7c9ae4925f7f70e240592d0c25b4138ba42", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/launcher.cpython-313.pyc", + "size_bytes": 44308, + "sha256": "14f6e5946122b0b8cd2d9337b5623c9232466c01625010d2c9b2aa39748615fb", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/main.cpython-313.pyc", + "size_bytes": 8208, + "sha256": "482b0bb4b032f9c8704b35054d8fce92cf30ca26d9248064f21b61cb4e75d4bb", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/start_here.cpython-313.pyc", + "size_bytes": 28327, + "sha256": "7bfcd462809eb9418a22548d7dbf7fd815e272d97c103503761c6bc5c1993397", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/__pycache__/main.cpython-313.pyc", + "size_bytes": 68118, + "sha256": "a4b3ccd6d39e06f75ebb0a2e89dc1eaf27aa183c2d628d41480d968c043cd769", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/main.py", + "size_bytes": 49765, + "sha256": "18c6897e74854fbd998195cd7de7f227165408597c369932683d759f4d4675db", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/base.html", + "size_bytes": 12031, + "sha256": "b4037a962ab799f711dc650f3554ba66d97615fe19b3d4502e22ebbd264d1f42", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/chat.html", + "size_bytes": 5213, + "sha256": "5e2d7aeb69f3be15b94e7a1f8f9438fdb2bfff96af5c936b325b15622e19c48c", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/console.html", + "size_bytes": 12348, + "sha256": "7df6bd49279bc0ebcae10f2f341174ed6893cdc6bf61f9655de992240a73e688", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/index.html", + "size_bytes": 3746, + "sha256": "60597e7a608b7395797b8499b418f906cb5930c87967f40b15661d128363a8e6", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/kb.html", + "size_bytes": 1843, + "sha256": "ccd8b34fb609c91192629c8ee4ed85edf9b9c6f5838c985c87e91929743c9655", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/kb_edit.html", + "size_bytes": 1719, + "sha256": "b9e4fd5cbac814f8c6ce0b05a5daec6c2f73233efe46f78d6ac855e802ec0c4c", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/kb_entry.html", + "size_bytes": 882, + "sha256": "42e344a5be0d944e242c0d2c27c75ae3aa19dde79cfbbc9fc44977e72bf0f3b2", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/library.html", + "size_bytes": 4935, + "sha256": "c172d5ad3bed065f99c79ec7067f0c319f3ee10e373f07afb95b165beb2b0d17", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/nephilim.html", + "size_bytes": 28759, + "sha256": "fd5660a0c49115d65fb6d9e0d8975e5804b06e66134c5be22c4b989f91d683d9", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/note_edit.html", + "size_bytes": 1784, + "sha256": "ee6eda4eeb1dbbea82d658b6bc9726da7557d7b35b62a529451014ad0e1f3646", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/note_view.html", + "size_bytes": 899, + "sha256": "02dd5cf700f2f3f01a740d350be747dd46a678148d8ed0ba348b5bb7d060c525", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/panel.html", + "size_bytes": 8528, + "sha256": "b5c54bcd92e5c991ce7507943794e02116cf61cc64dc9ad1b4330ecfdf507bb2", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/recovery.html", + "size_bytes": 2248, + "sha256": "984e540018c0532ccf0f76d3a199a5bcc4f4d71ad8298ee817d2c396ae22ea88", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/research.html", + "size_bytes": 1099, + "sha256": "4b8ce44714e62f56670e692f810c8189046649d4273bb854ecbbd31002243474", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/strategy.html", + "size_bytes": 2248, + "sha256": "cf19400a4e011d6c88b7da753e718dd0afb4a3f63e1b86f08579768e3d3efbf3", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/auto_install.py", + "size_bytes": 16536, + "sha256": "b6b88ce61cd59987a8d1cb1acefce2fe0ec34ce31ef3d419e50dfdf811da99ac", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/config/agent_message_schema.xml", + "size_bytes": 1951, + "sha256": "861ed826d60b50d8a809b37d6372b20c72c35c134d19d66f79aecb6fa6f38f3c", + "mime_type": "application/xml", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/config/creative.json", + "size_bytes": 1918, + "sha256": "9eb8b398cffbb10a37b225e88d27be54f4034aa09ebad304e18b6999f1265c83", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/config/gremlin_premium_features.xml", + "size_bytes": 1811, + "sha256": "4941744b6372b8f70eaa69a9a54a6e835d1aefe331baf20afd1e61af9e14761d", + "mime_type": "application/xml", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/config/model_manifest.json", + "size_bytes": 2405, + "sha256": "bb3246634bbdb0db4af942df831a6bea19e3bed7c4b9b10a8d0232334c9e7185", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/config/usb_paths.json", + "size_bytes": 1010, + "sha256": "6572fe0c7e7927f68d528818cfce178112d541899c2ac1d2ea247f7cf4863bca", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/content_seeder.py", + "size_bytes": 39946, + "sha256": "fac9d65e5b2e9c706e92ba7ac7eef6470d6a62bb47deeb4c40e0e1d73b18938d", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/core/__init__.py", + "size_bytes": 0, + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/core/__pycache__/__init__.cpython-313.pyc", + "size_bytes": 230, + "sha256": "72152854fe820faf9265d1b42b5f81b04d641c02593002f18a0b146963fd2a96", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/core/__pycache__/paths.cpython-313.pyc", + "size_bytes": 8729, + "sha256": "bdc72784318f23a031ee971f4d9c821cfeff395a3ba6b2d9969c83ee457dc96f", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/core/paths.py", + "size_bytes": 7415, + "sha256": "862f741ec5527b8244c6aeb5093e504a5b637e65d85bca2a2f2aed79878036d1", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/deploy_check.py", + "size_bytes": 11580, + "sha256": "43668140cc3d564ab92b09e72f94653b5b4b5fdbcad0811cfc37ecd644ead65a", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/HOW_TO_MAKE_THE_EXE.txt", + "size_bytes": 2379, + "sha256": "736339058a593bd9899a552a163983db24a00bf11d2b03b72a0a8d342a085f66", + "mime_type": "text/plain", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/MODEL_GUIDE.txt", + "size_bytes": 3909, + "sha256": "3b6108f1b4f104ce26b17c0f59f60a591ef90d3d641e8ac9a759e8041cadbead", + "mime_type": "text/plain", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/SETUP_GUIDE.txt", + "size_bytes": 3473, + "sha256": "a8e0eb98fd9845d3d6e83ea3a7c0017c60abf15e1ca73777f82e480e101e1ec4", + "mime_type": "text/plain", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/TROUBLESHOOTING.txt", + "size_bytes": 5137, + "sha256": "71d0e9a2f94c812e9894fe3c7f1f2302aa436c360727eb18e83ed56efa036134", + "mime_type": "text/plain", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/USB_STRUCTURE.txt", + "size_bytes": 3984, + "sha256": "ad535e444f2dcd0e0aba8888353c0099cf3394ee079038bd1c0155a0e0a74ed4", + "mime_type": "text/plain", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/VENTOY_LINUX_MINT_SETUP.txt", + "size_bytes": 7653, + "sha256": "b1e5907d6cadb20c5c936f13c1bfc25b327ff698ae1d4fd866c5b69ebb0f61e3", + "mime_type": "text/plain", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/editor/__init__.py", + "size_bytes": 0, + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/editor/__pycache__/__init__.cpython-313.pyc", + "size_bytes": 232, + "sha256": "425b97c65558279bb17f604428829ddb8c090c2c0fb492ad38eb5b3a17ae113a", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/editor/__pycache__/self_healer.cpython-313.pyc", + "size_bytes": 4588, + "sha256": "a7cefc8bb5108aef8268e4e9dd7194cdd2c670be97db2a8fc6c4cfe6e296c1c1", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/editor/self_healer.py", + "size_bytes": 3305, + "sha256": "8869c3333f48c0a94f66e12c8e0d9d81e3fbd8a6a812e810da5aeca7b7171a19", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/launcher.py", + "size_bytes": 34601, + "sha256": "c9b83e0096d37a8fff1aba71927d3949830d0a2e22f43a84c00b43dc7ab5db87", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/logs/usb_orchestrator.log", + "size_bytes": 7826, + "sha256": "40baab816dcd627684bc13168df8f566f6c70996ccdfc3dbe0fb7e4635a0197c", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/main.py", + "size_bytes": 6298, + "sha256": "288c37388d7cda03b06ed810e3fa95868b036de2d727bed4aac2aa80e639d0b9", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/models/PLACE_GGUF_FILES_HERE.txt", + "size_bytes": 950, + "sha256": "136289f6a66a4c82c1f20b4646c2bf0eab727d31d7f55c27d1249e9e2d2751a7", + "mime_type": "text/plain", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/presets/01_Gold_Standard_Teaching.json", + "size_bytes": 1095, + "sha256": "8e9c3f0cd0aa0ea75282a70db2a76c750bf91db26c96c53b5b298a795a6daa4c", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/presets/02_Dolphin_Uncensored.json", + "size_bytes": 1042, + "sha256": "0c828ea18400f45b7e115dd6c5b4e2a3f2dd28c13481c094bd21b1c96d0cedb7", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/presets/03_Coding_Assistant.json", + "size_bytes": 1213, + "sha256": "b0fc1eacc6968e23aad862017184ada3cc24c4cf4851d376d4a8e15be5a99d9a", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/presets/04_General_Assistant.json", + "size_bytes": 1098, + "sha256": "38b5eb38121d68a8d51c2321cb9208e7db86bbe65615bdc95f5f3d231868fe7f", + "mime_type": "application/json", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/run.bat", + "size_bytes": 342, + "sha256": "d5ebcfd7ffe642e5f5f0dc9938688ca76c49a585c55170a293450b51799813fb", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/BUILD_INSTALLER.bat", + "size_bytes": 2064, + "sha256": "15a17775370d800c8d8960de33be3876e47d03414b9b7d72ed3e11a3e9dfb3f7", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/TROUBLESHOOT.bat", + "size_bytes": 628, + "sha256": "d83d200815f8242886b4713a18c37dfab0e47283b37e91e6477c79d14349bdf8", + "mime_type": "application/x-msdos-program", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/check.sh", + "size_bytes": 504, + "sha256": "aef7cd1200b061d531810e01b44f7a144d4916d29e55834b441d19d0c9ec3447", + "mime_type": "text/x-sh", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/install.sh", + "size_bytes": 785, + "sha256": "f3e7df5afb76897748318316c693ad586e461b6dcf40508ae93a268cee286179", + "mime_type": "text/x-sh", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/run_me.sh", + "size_bytes": 735, + "sha256": "e7702f4d0e33c9a6ac11ee938074da0dea3c6cc43343ca68fe017b8ae0c3fa4b", + "mime_type": "text/x-sh", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/setup_linux.sh", + "size_bytes": 3355, + "sha256": "7da0bee639deb8fa78f49a3938fbc7484c1a2d12a97db9e1cd1f912982b8b3da", + "mime_type": "text/x-sh", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/start_here.sh", + "size_bytes": 531, + "sha256": "9d59db003d209f2c1c4466f5fa8379d42d6b9f3bc6a58c37b0b73678a06dcf48", + "mime_type": "text/x-sh", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/troubleshoot.sh", + "size_bytes": 409, + "sha256": "2f12a2e4cbbf68cd3ea644362b6d8a70723132379ba9a640113240d68a1b1034", + "mime_type": "text/x-sh", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/sfx_config.txt", + "size_bytes": 223, + "sha256": "e0cd0e6e2ed7a18b9db313084a11e29e66317ef05b8a0d340e72394125b1df47", + "mime_type": "text/plain", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/HTML_Generator.html", + "size_bytes": 8574, + "sha256": "6dcc20958d42d1460e8f3f3585f113549d5d880de092fbbb56194eb34e0a5a74", + "mime_type": "text/html", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/USB_Launcher.ps1", + "size_bytes": 20837, + "sha256": "8f0e47749a28c8ab3c02e66f7e266f01d099bfcfc25c9bd95b8785b394993fba", + "mime_type": "application/octet-stream", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/content_manager.cpython-313.pyc", + "size_bytes": 16933, + "sha256": "c5b6db00bd7785910a4557c7ad367cd220994fe7cb9ed709e8cdc72492eea873", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/creative_bridge.cpython-313.pyc", + "size_bytes": 9789, + "sha256": "30c1b45fbd075bfca58f58c9178498d6a473f9dcb392ced5ff41a9c1cbd6bd0a", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/ether_core.cpython-313.pyc", + "size_bytes": 25251, + "sha256": "3e2c0096b912a25f136b3a9f5d5399f209818afa1fde4653243c00d333027f32", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/gremlin_coordinator.cpython-313.pyc", + "size_bytes": 14697, + "sha256": "3d168532b93e6e352a6397c08e71ce3476001ea761c480567b1984bfbd92c6f4", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/hub_client.cpython-313.pyc", + "size_bytes": 4815, + "sha256": "e8e92c1c1da8b9c40764c98be705348fd76f6f72415890a6a104201d7667db4f", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/market_intel.cpython-313.pyc", + "size_bytes": 11715, + "sha256": "b72ff662af2b956408c14c2ca01ac3efe01a23b7a961e0689fab3cc0f220ed71", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/openclaw_bridge.cpython-313.pyc", + "size_bytes": 12638, + "sha256": "7ccfc3ebcad717ac7738e10d87ed48cb5d8da7ea0dd6b5e595441b76c8ac0ffe", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/rag_manager.cpython-313.pyc", + "size_bytes": 12120, + "sha256": "3a3f8c869663a21c87b1cd215c762251189fd4fec294476df6ce4875a38ccecc", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/self_editor.cpython-313.pyc", + "size_bytes": 18651, + "sha256": "d9d1cb0e639da93cb5e915ad80f41ffa499c376cba5b72fa9b16c8b11a0d27e2", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/troubleshoot.cpython-313.pyc", + "size_bytes": 13991, + "sha256": "1f60c71b5f2e02bac4784ed8f70f7cdaea0c78d38ea48390cd89d55a895d93f9", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/usb_orchestrator.cpython-313.pyc", + "size_bytes": 18378, + "sha256": "256c46c9277bf01e0ed45a6309fa3565e6fcbb267eaec3185384fac9e3f84f63", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__init__.py", + "size_bytes": 826, + "sha256": "b86c3221f4c9e01f57abe01d7251344093298490f68c28956895876b2ff82d29", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/__init__.cpython-313.pyc", + "size_bytes": 1007, + "sha256": "f8b085bce32596cfc22833d0099c2d67700a927f2c3dc0ca051fb848c2e1da63", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/base.cpython-313.pyc", + "size_bytes": 6459, + "sha256": "5681416c2835ba815aa740db7e98d50450528fee9c8c31315b255800758970c0", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/dashboard.cpython-313.pyc", + "size_bytes": 10764, + "sha256": "ec21a0a3be13b0010f60e5630b34ed4325b31ecb7d21f3eefd870c178c6698df", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/evolution_architect.cpython-313.pyc", + "size_bytes": 4841, + "sha256": "2d8b6732911db50901a65df143da358628710d5862452236d5f4ecc2a2f3769d", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/gremlin_agent.cpython-313.pyc", + "size_bytes": 10641, + "sha256": "3f1782c71afb2d8494e169830242e3621587a54635b2dd23a071f8e328453d51", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/orchestrator.cpython-313.pyc", + "size_bytes": 12982, + "sha256": "1f64c0122ac1d6c6a3c6347c63003eb4a14284a37a0875ad9b4bb93a69fcc49e", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/specialized.cpython-313.pyc", + "size_bytes": 24634, + "sha256": "4c134b8da19a25d3e41b8a7b8d9c87ee2b787b41a927b0427842547a81f50fff", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/base.py", + "size_bytes": 3360, + "sha256": "36e3ac103401d25adbfa522624cb0de5d9bf39e5265435c46a667a61c6628baa", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/dashboard.py", + "size_bytes": 6560, + "sha256": "f9abc859cb45393a3aa7b671651c415f6702320f295f355bb37ce68d4a88109e", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/evolution_architect.py", + "size_bytes": 4336, + "sha256": "a27ce1b62c97b31f5fd90d138d8fa253ce27177b506ec7c2760979cc8e8f0e8c", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/gremlin_agent.py", + "size_bytes": 7618, + "sha256": "76896a55a623985852ec8d4314d158351dc09625ea07191ab98995da62f26c8e", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/orchestrator.py", + "size_bytes": 8537, + "sha256": "949497b363dba936b8229b5ae509ef0f8f7d5e6525532d5858735c862862e868", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/specialized.py", + "size_bytes": 17120, + "sha256": "7e1f70e8bdbd52fb5a22a1016cb12b537074ae1f6753bf692cef8179bbecebd7", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/content_manager.py", + "size_bytes": 12954, + "sha256": "999b1def4ba73b279a76636a510b619963f80d46dd786d5af60e1018ac94cb63", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/creative_bridge.py", + "size_bytes": 5867, + "sha256": "1f0f7ea683e9f16536bf9534e170c6fe8d0807d5900eedf742db1f4d863ec794", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__init__.py", + "size_bytes": 711, + "sha256": "7166a2120433df61d19c7063266ca5b99fee934e4bda63820976a36ecf8dcf16", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/__init__.cpython-313.pyc", + "size_bytes": 919, + "sha256": "2a06025c4ee8432f2ba574a136a72dcc48c6c4c5ccaa10321917623afd2772c3", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/absorption.cpython-313.pyc", + "size_bytes": 15800, + "sha256": "e87991b7b21ff6d20ff7304bdc6ec5868a84780db89f3d1faaf4ec39eeb3b18e", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/errors.cpython-313.pyc", + "size_bytes": 2397, + "sha256": "af5e7313cecef3f3e038c0f92ff12799fdea5fb90d11241b57a7cf604298ee44", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/logging_setup.cpython-313.pyc", + "size_bytes": 2807, + "sha256": "d5fe31683fae35cf99a74666a3b7737ecc23999a4cbae0de311a34a2a9d27b90", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/repair.cpython-313.pyc", + "size_bytes": 6614, + "sha256": "95a865135dfff5194b536fe8bbc5e700667bf8169bb3096d677d03cc2aece60d", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/scaling.cpython-313.pyc", + "size_bytes": 6465, + "sha256": "0de29660520bec86a802ab00cce73ba56c15bf16bdf30680fa67d5d90f1bf2bb", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/stages.cpython-313.pyc", + "size_bytes": 7727, + "sha256": "9e4b1e349fe6bd3eb57c383d8d1a054c2cadf7c311abd50ca71fe9b463300d37", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/state.cpython-313.pyc", + "size_bytes": 5763, + "sha256": "1b6abc90c0a66d4d9ce699708f449ed6662fadef108dcf4372529060515bd5fe", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/absorption.py", + "size_bytes": 11219, + "sha256": "a3aba592bb0262060ba01c38c34d8c1a659d7eb12102d8392df09fb07b71421d", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/errors.py", + "size_bytes": 1196, + "sha256": "84fa03cdd71c4b5fdd0211d1ac31f18b2d5eb63153273be05c54945a9e79b702", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/logging_setup.py", + "size_bytes": 1445, + "sha256": "76bf9a254709b6fd1029ad3feade04a92572ff863c27f8a909f9fa9afa947f8d", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/repair.py", + "size_bytes": 4806, + "sha256": "fe763fabce2ad95e5fb1fc4b968df1c8ee0438ff1e11e6deedef82739fcaccba", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/scaling.py", + "size_bytes": 4953, + "sha256": "e2db16208962c3261af7a8984c16adeefc97e8edb0bb714fc7cf3863b8f616a9", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/stages.py", + "size_bytes": 5237, + "sha256": "b91d30627ac7634f6ec0048c72e1386a83733d0c1164bbb459b468b885340227", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/state.py", + "size_bytes": 2765, + "sha256": "0672a787d68db960fb668df3c372fdbbbb9e85650a2a02c4db55f9e9b9929db0", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ether_core.py", + "size_bytes": 21922, + "sha256": "db888cd1f7fd188d2bc5e5d325e046e504df574da8517bd22cde2e4201623097", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/evolution/__init__.py", + "size_bytes": 0, + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/evolution/__pycache__/__init__.cpython-313.pyc", + "size_bytes": 239, + "sha256": "67df195af757acce8e8b0c60e908d44b9ebc0d8c9792101154e13093a3d1c6a0", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/evolution/__pycache__/meta_evolution_engine.cpython-313.pyc", + "size_bytes": 16556, + "sha256": "557b3ef3da8e7dfdfe396e350ce01a69d0c0edc49a4523bba23d4ed62fab0a89", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/evolution/meta_evolution_engine.py", + "size_bytes": 11214, + "sha256": "f8f34a387aa7dc6a4894a799eb56755f96827141db4a2e613965f78c7e4e21c1", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/gremlin_coordinator.py", + "size_bytes": 10766, + "sha256": "82b781117c84e95e297855647b5b0629afd71b407f00fb9a7bfe355c2dfcaf35", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/hub_client.py", + "size_bytes": 2486, + "sha256": "ac872465c92008aa07c1211b9a5fd516de40432ee0083a3f9b8a9c134a00828a", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/market_intel.py", + "size_bytes": 8725, + "sha256": "9b8a24addb89135525a2878ad8145788c05e1e2719a9378add58e28716dd8f33", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/openclaw_bridge.py", + "size_bytes": 7533, + "sha256": "0dcace9040c1942e07a434c22f8e041f0dbc8b8002032b5a9278c7e9b8f8cefb", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/rag_manager.py", + "size_bytes": 10481, + "sha256": "d5b75baddf05a14b1990552c36c9fe2d6b485ca99c94f26e585bc016549b3ae7", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__init__.py", + "size_bytes": 1198, + "sha256": "f6135f4556419e4a54b62f7fa60b2b0f11349e93dbf446733f662693539c9c3c", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/__init__.cpython-313.pyc", + "size_bytes": 1375, + "sha256": "a157c7e78a2a11db3ee543766d242d17867955386fff7d3a9d0064a95d6d5f14", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/code_reasoner.cpython-313.pyc", + "size_bytes": 7190, + "sha256": "4538660b4d4c564b9b53a7b66cc8d25cd990f65fadcc34cef8af24dd17382f46", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/math_validator.cpython-313.pyc", + "size_bytes": 7841, + "sha256": "42542dbdc01b97456b7377805a8f9da8341c90c85e5a41bcb3979c5084b8cbbf", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/output_quality.cpython-313.pyc", + "size_bytes": 8974, + "sha256": "cb48d9d7aa5b6dc8b4a2298705d929f281c4c8887dfb27670f4074555bcb22ae", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/prometheus_judge.cpython-313.pyc", + "size_bytes": 8773, + "sha256": "152b5b21b64743f77e1c57ec5c9129a35fcbeec151b8bb1150a6c8f987323eac", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/quantum_inspired_optimizer.cpython-313.pyc", + "size_bytes": 9891, + "sha256": "9e18c60909184c9d7234df359af834db9d90430076ce3f0adbbdd26240c36253", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/reasoning_engine.cpython-313.pyc", + "size_bytes": 6625, + "sha256": "c2bfb54f83885596c2a8acf083e3baff80279a1a17ee9037ba7c6063be9b2a63", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/reasoning_guard.cpython-313.pyc", + "size_bytes": 3635, + "sha256": "ee1ea5fb9cc08f67e247cb4169425f6af26eff314c52be8575f8920b6f301af6", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/structured_output.cpython-313.pyc", + "size_bytes": 6685, + "sha256": "087560d7ab0502239298575b088259d1fb0e73b5482cd96f284f33ef8f3675d5", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/uncertainty_quantifier.cpython-313.pyc", + "size_bytes": 10647, + "sha256": "409c03f8480e12c2d669792f0013eca48f7218675a5a206471ddeab486815dc3", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/code_reasoner.py", + "size_bytes": 4312, + "sha256": "bfef4874f5a11a780eaec7ab8008d574afefcaaff3aada0fbb0646eddfce8877", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/math_validator.py", + "size_bytes": 5410, + "sha256": "84f2874fbd435b30f9248f7cfb9b71a58798ee4c8eff8c39cc5a31c406bde7e3", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/output_quality.py", + "size_bytes": 6539, + "sha256": "9240369ee660191ccd56212669da58df638ef8055115aaad16dd9e1fcc505064", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/prometheus_judge.py", + "size_bytes": 5830, + "sha256": "13bd9c03b8e65e3c444e00c631e476730c38c740cc5a6ba4680745eacefdc352", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/quantum_inspired_optimizer.py", + "size_bytes": 6850, + "sha256": "4a4012ba61cc06b23924ed799483d760552d1bddd2c1773f5b9118eb37d2f9c0", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/reasoning_engine.py", + "size_bytes": 3913, + "sha256": "2558f66970be75c56c2e82d1759e38f6266695dde209f17dbeb789c7d6f105ec", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/reasoning_guard.py", + "size_bytes": 1994, + "sha256": "40b591a1c2f147d439701fb1cf763a8a4fe58e2ab7ee408592cb8387e0b63c8a", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/structured_output.py", + "size_bytes": 4338, + "sha256": "0a450c689e684fbe243fcba7cbc90fe5f6f02c15d720ea5ac402a4568203ab8f", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/uncertainty_quantifier.py", + "size_bytes": 6863, + "sha256": "84d3fba1cc24532fb39a4df232e10b62d1cc24de1cd39d1b19916bbb9d79be15", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/self_editor.py", + "size_bytes": 14756, + "sha256": "e2c6f27961993390e373f2a029efd188a088e30966510bf15dfe0397890effb8", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/troubleshoot.py", + "size_bytes": 10460, + "sha256": "0c9c863073ad9fbabf4fef74d642231728b9613731674c4a5c21186752a6ddbe", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/RENDERER_README.md", + "size_bytes": 13995, + "sha256": "aa76b04e8db6f8b1a88564a19435ce0c6b08dd6fda32f126d1fb13b93055bd55", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__init__.py", + "size_bytes": 1934, + "sha256": "810da8770788411c6f26a2ea5a947ebdf3e6a0fdc098c0f9eeec52db7f8d7217", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/__init__.cpython-313.pyc", + "size_bytes": 2277, + "sha256": "89d290d9a025b85912357ab9cba4c84b1fb74bdff19ffaa6d0737eb809e2dd43", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/shadow_atlas.cpython-313.pyc", + "size_bytes": 4835, + "sha256": "b0836b4535fcb9bf4f2eb966eb3b5c91a2bb65e2df33820af670412b51a9d774", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/ultra_renderer.cpython-313.pyc", + "size_bytes": 22972, + "sha256": "4163b85ca17c4a270fbb664e7b4ed7bcd5a6cd208ecd3ef70fbd125eb7f19d8b", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/ultra_renderer_quality.cpython-313.pyc", + "size_bytes": 22376, + "sha256": "8efb3d0e6d0e2eed16db91cdd71219a91dbfa53b042fdb00867d7fe57b8e5839", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/visibility_rasterizer.cpython-313.pyc", + "size_bytes": 16660, + "sha256": "fc4bdc7ad29d142121df6db197e1c4671d9b965d49e3af70be24056da4b28280", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/vulkan_skeleton.cpython-313.pyc", + "size_bytes": 529, + "sha256": "adfa77234770f0a8bcdea13ed1857e464e8a75fd36861add723146be6f470cac", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/godot_gdextension_skeleton.md", + "size_bytes": 2253, + "sha256": "227aaff28a19f4e4df2abcf395d12ae8be9df10d42eaf8e1a25bb4de647ddcf5", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/requirements.txt", + "size_bytes": 110, + "sha256": "9e325dba75d81134319314a5d94471b5dd8e7ac516a036a3db65512119ffb97e", + "mime_type": "text/plain", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/shadow_atlas.py", + "size_bytes": 3598, + "sha256": "a455e137797083f19ff431aed682527a75d924b94c546a0a2ae1fed847211119", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/ultra_renderer.py", + "size_bytes": 18851, + "sha256": "5317099d6166d63a1f8071cf8c4659fa9b23da75726d465471c7977767bf553d", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/ultra_renderer_quality.py", + "size_bytes": 17624, + "sha256": "6415efd7a0a77a3a3589fe935e6bfe0f54d694bbe5310930642a54bd28a4410b", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/visibility_rasterizer.py", + "size_bytes": 12653, + "sha256": "576352e56c627496bc9e4ee23d8277fd281a32f0fcab9c4a902eb1d16f67dc8d", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/vulkan_skeleton.py", + "size_bytes": 5172, + "sha256": "7c6623971dcc48a9f6b9dccfa79422c89aa360bc58420ac32443b672448667be", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/usb_orchestrator.py", + "size_bytes": 16754, + "sha256": "083b6b30f5cccbece038f65941f71cc8e7b5c07ccd19b262249265ec05f6305a", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/start_here.py", + "size_bytes": 18571, + "sha256": "438a21e4bb439d7be649dbba2071653c7eec2ddd2c7c8259f027029eccdd1846", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/game_design/design_patterns_in_games.md", + "size_bytes": 5020, + "sha256": "5e4ca59d8702ed6cc715c2d1becd1c1363928444b6302c59d9464fa0eb3b4cd4", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/game_design/game_design_fundamentals.md", + "size_bytes": 4572, + "sha256": "750297126a3d1f21eb926a1ad22f6e5d778bc621a08219cd9efb70e2d5acdbb3", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/godot/godot4_architecture.md", + "size_bytes": 3503, + "sha256": "f968abab7e39ca3b6f78525479aec9bb5f3d61d4006ce4e27e1ce487e9ee0fd0", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/godot/godot4_optimization.md", + "size_bytes": 3470, + "sha256": "54719ed6fbefa047dd5970ca9983262fd01649e2640a79f1ef5993c82e41f03c", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/kb/python_quick_reference.md", + "size_bytes": 5847, + "sha256": "90f46e2271106cd9aac1fe4b999c52324074a551be2fdedb6ed48af2750526bb", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/recovery/supplement_protocol.md", + "size_bytes": 4541, + "sha256": "0a2ff7e900ff58fb46061429f8396d37d36ed8a95ec31c37ebed4b76ac87885a", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/reference/local_ai_model_guide.md", + "size_bytes": 3499, + "sha256": "ba881bcbb2d885e8b290fc6f865e002e1fa84d753c51559c385a2f4a378c55c5", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/research/gdscript_patterns.md", + "size_bytes": 6133, + "sha256": "93c0fe7789954ea60574ce1e182643c6f167caa7321ebf91bafadb51b64d50e8", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/research/local_ai_operations.md", + "size_bytes": 6238, + "sha256": "71b3704d7d0b056a5ccc7137713c0f05ba68336a380eaeb944918df50c1cfb1d", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/strategy/eu4_castile_guide.md", + "size_bytes": 4598, + "sha256": "f2577841d31a3648d94eba8770da825ac2b67c9ab1182f5bcbfa0029471c2272", + "mime_type": "text/markdown", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/conftest.cpython-313.pyc", + "size_bytes": 753, + "sha256": "4567edd5617c1f595162bbaf5f10011bbb589fcceb2ba214e18c73702b85b25d", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/run_tests.cpython-313.pyc", + "size_bytes": 4219, + "sha256": "0da6ec01c40b483d0d7728d065e3a66f8edb63cab4a537b56cd393baf95e8d02", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_accessibility.cpython-313.pyc", + "size_bytes": 8721, + "sha256": "f740fc94944f2f690a9961e929b8a7c128e3360f8082c8b28c99a41d7e60eecb", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_deployment_and_agents.cpython-313.pyc", + "size_bytes": 8110, + "sha256": "77156ef76cd0927147887ea454e698b25b64e3107cc96a6faf3949999b432657", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_evolution.cpython-313.pyc", + "size_bytes": 4029, + "sha256": "cc9599c54b19aeaf91ab7aea68448771c6eac70af929e2356bfec70572345274", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_market_and_gremlin.cpython-313.pyc", + "size_bytes": 6059, + "sha256": "66720572c6031457cffe12be683057e61a9c2647bea376b9ddb81b5ee1419ad5", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_meta_evolution.cpython-313.pyc", + "size_bytes": 7343, + "sha256": "641efe4e009a9cc502e643e455810e6244303d7c44d7d4b054dcb3fff65f8e79", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_paths_and_healer.cpython-313.pyc", + "size_bytes": 7190, + "sha256": "58c6e23277374b3ceb727748808870357fe8025bb70555793d13554812b7e285", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_reasoning.cpython-313.pyc", + "size_bytes": 8480, + "sha256": "bb6a421f11152d8a5d711d2f2a80117287bb9fa404109b2f5b181036a9a149bf", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_self_editor.cpython-313.pyc", + "size_bytes": 3786, + "sha256": "9497d85fa5ceef8be3cb667c9a2aa46e4291216f2724029b3ee37cc4844db39b", + "mime_type": "application/x-python-code", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/conftest.py", + "size_bytes": 263, + "sha256": "12008a244f401b051932f5743a35aa9bee9aa98788944f69c1b7bbd10dc69398", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/run_tests.py", + "size_bytes": 2157, + "sha256": "4c5f5ecd656f1e8c2d211a9de891a72d271c2eddb7b0810a37b17519b7587aed", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_accessibility.py", + "size_bytes": 4967, + "sha256": "b21729b27b9a738831cca6d70628e89e3659a61214c1ceb1049e93e9214bfa50", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_deployment_and_agents.py", + "size_bytes": 4381, + "sha256": "e6970c26d1a19ed80e2e91b496accf26e564528b8a498ec1a9caf3d81b8d2ea8", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_evolution.py", + "size_bytes": 2133, + "sha256": "546780f66ac665b87715aa09cebecefcd7b2068da78574e82149ce09b5ba2d0b", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_market_and_gremlin.py", + "size_bytes": 3259, + "sha256": "80ed441606800989d947f553bf46d5b466d92e903b721df9754a6ddb5c9e8442", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_meta_evolution.py", + "size_bytes": 3968, + "sha256": "a07b4b13b3035bb65ae48a381603a81229f25bbe1a28c616eef62b377b9b5913", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_paths_and_healer.py", + "size_bytes": 4684, + "sha256": "4e18a86ae04a1de5f89a0df6dbe0f01d2d86480b0f3f8a4074f8d1d4bed6fda6", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_reasoning.py", + "size_bytes": 5131, + "sha256": "c6fbf07ffadbd35d5e3f1a99d820e1496be8234669d1d4652d918913060c5ee1", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_self_editor.py", + "size_bytes": 2325, + "sha256": "63c3ff61cb6b40d8769b76c35028cc33b5498e84d8a09928e772c53eb2918119", + "mime_type": "text/x-python", + "section": "10_CANONICAL_WORKING_TREES" + }, + { + "path": "20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_COMBINED_DETAILED.pdf", + "size_bytes": 132036, + "sha256": "570efb9361366a0c6ef84276d6bedd92ce9cbed51a0252b2e486fc4db7974934", + "mime_type": "application/pdf", + "section": "20_DOMAIN_SPECIFICATIONS" + }, + { + "path": "20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_EXTRACTED_TEXT.txt", + "size_bytes": 142868, + "sha256": "537eb30218be807f92508cf31c37fa5028ffa48e9d8897b0575c5d70e5a07aa0", + "mime_type": "text/plain", + "section": "20_DOMAIN_SPECIFICATIONS" + }, + { + "path": "20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_PDF_INSPECTION.txt", + "size_bytes": 1161, + "sha256": "da5e84edb0237549628f420ba9b277910ac0ec7eb8f54ac8b0cda17d63669e46", + "mime_type": "text/plain", + "section": "20_DOMAIN_SPECIFICATIONS" + }, + { + "path": "30_RUNTIME_AND_MEMORY_DESIGNS/Consider best setup.txt", + "size_bytes": 640, + "sha256": "1c414aa8058529851bd56548a206e73d50487a55183860d9eead6a1a502be4b6", + "mime_type": "text/plain", + "section": "30_RUNTIME_AND_MEMORY_DESIGNS" + }, + { + "path": "30_RUNTIME_AND_MEMORY_DESIGNS/EtherAI Absorption System.txt", + "size_bytes": 7094, + "sha256": "1eab3a14d1beb665e2731abfcba44617ce9f54a6cdea61c1739134bb19925887", + "mime_type": "text/plain", + "section": "30_RUNTIME_AND_MEMORY_DESIGNS" + }, + { + "path": "30_RUNTIME_AND_MEMORY_DESIGNS/WORDLIB semantic core update.txt", + "size_bytes": 3967, + "sha256": "a119cd5fe9e2ead7524ae58246e40f6004ba007015bea43ec95354fe98817712", + "mime_type": "text/plain", + "section": "30_RUNTIME_AND_MEMORY_DESIGNS" + }, + { + "path": "40_DATABASE_AND_PROVIDER_STATE/CLAUDE_CONNECTION_STATUS.md", + "size_bytes": 1035, + "sha256": "620be0b514040ed2d07ed232bbaca99f9108bb0ac34d2f028e31e1d5951f59ce", + "mime_type": "text/markdown", + "section": "40_DATABASE_AND_PROVIDER_STATE" + }, + { + "path": "40_DATABASE_AND_PROVIDER_STATE/INTEGRATION_GUIDE_2026.md", + "size_bytes": 6332, + "sha256": "e7b24b72d6018c167f272eec6f89d92a55b10bd3bd773208d5ee7ec506ca65fd", + "mime_type": "text/markdown", + "section": "40_DATABASE_AND_PROVIDER_STATE" + }, + { + "path": "40_DATABASE_AND_PROVIDER_STATE/OKComputer_Swarm_Integrated_v1.sha256", + "size_bytes": 101, + "sha256": "9c526ea7ba31516ac4421259e314e7d3c5d3378906320e1f8b9ec35666cde908", + "mime_type": "application/octet-stream", + "section": "40_DATABASE_AND_PROVIDER_STATE" + }, + { + "path": "40_DATABASE_AND_PROVIDER_STATE/SUPABASE_SWARM_CONTROL_MIGRATION.sql", + "size_bytes": 6218, + "sha256": "6b300d6c375299183df7247884a04ea01968e6b040a26059b0c5d81ef69b507d", + "mime_type": "application/sql", + "section": "40_DATABASE_AND_PROVIDER_STATE" + }, + { + "path": "40_DATABASE_AND_PROVIDER_STATE/VERIFICATION_REPORT.md", + "size_bytes": 3462, + "sha256": "1055cdaf97d11bc5c651b604befac21b82a392db612dde4acf651e315e6da9e9", + "mime_type": "text/markdown", + "section": "40_DATABASE_AND_PROVIDER_STATE" + }, + { + "path": "90_ORIGINAL_UPLOADS/Consider best setup.txt", + "size_bytes": 640, + "sha256": "1c414aa8058529851bd56548a206e73d50487a55183860d9eead6a1a502be4b6", + "mime_type": "text/plain", + "section": "90_ORIGINAL_UPLOADS" + }, + { + "path": "90_ORIGINAL_UPLOADS/EtherAI Absorption System.txt", + "size_bytes": 7094, + "sha256": "1eab3a14d1beb665e2731abfcba44617ce9f54a6cdea61c1739134bb19925887", + "mime_type": "text/plain", + "section": "90_ORIGINAL_UPLOADS" + }, + { + "path": "90_ORIGINAL_UPLOADS/MASTERZIP_v11_COMBINED_DETAILED(2).pdf", + "size_bytes": 132036, + "sha256": "570efb9361366a0c6ef84276d6bedd92ce9cbed51a0252b2e486fc4db7974934", + "mime_type": "application/pdf", + "section": "90_ORIGINAL_UPLOADS" + }, + { + "path": "90_ORIGINAL_UPLOADS/OKComputer_Advanced_Swarm_AI_Search.zip", + "size_bytes": 389852, + "sha256": "a41f8fc1aed5dd055c978ff7d3e09c82a453cb4cdbbcc950b90e87a880dc14bd", + "mime_type": "application/zip", + "section": "90_ORIGINAL_UPLOADS" + }, + { + "path": "90_ORIGINAL_UPLOADS/OKComputer_Swarm_Integrated_v1.sha256", + "size_bytes": 101, + "sha256": "9c526ea7ba31516ac4421259e314e7d3c5d3378906320e1f8b9ec35666cde908", + "mime_type": "application/octet-stream", + "section": "90_ORIGINAL_UPLOADS" + }, + { + "path": "90_ORIGINAL_UPLOADS/OKComputer_Swarm_Integrated_v1.zip", + "size_bytes": 335517, + "sha256": "20613246df4a37c01c9bdcb106f834156e38dd3ecd9d6df59f574d46593783c1", + "mime_type": "application/zip", + "section": "90_ORIGINAL_UPLOADS" + }, + { + "path": "90_ORIGINAL_UPLOADS/WORDLIB semantic core update.txt", + "size_bytes": 3967, + "sha256": "a119cd5fe9e2ead7524ae58246e40f6004ba007015bea43ec95354fe98817712", + "mime_type": "text/plain", + "section": "90_ORIGINAL_UPLOADS" + }, + { + "path": "90_ORIGINAL_UPLOADS/wordlib_D_drive_FINAL_v29.zip", + "size_bytes": 339209, + "sha256": "276781bb7a22a350a008e95e75f5425552403deb0ab59292cea9e9a7e3698b52", + "mime_type": "application/zip", + "section": "90_ORIGINAL_UPLOADS" + }, + { + "path": "99_INTEGRITY/BUILD_VERIFICATION.md", + "size_bytes": 1739, + "sha256": "03ba3cd675b8bc413adf8a899dbf2ab87d03ecf400553f4c0d1245045324951d", + "mime_type": "text/markdown", + "section": "99_INTEGRITY" + }, + { + "path": "99_INTEGRITY/MASTERZIP_PDFINFO.txt", + "size_bytes": 604, + "sha256": "72ff4fc13d0da15b59fcaec16971736d42310803959b492d82de52c42f9f222c", + "mime_type": "text/plain", + "section": "99_INTEGRITY" + }, + { + "path": "99_INTEGRITY/NODE_VERSION.txt", + "size_bytes": 9, + "sha256": "256a8e08ee35cb8ad36ae16385257192c3dbe7d80cfdeff9eaa886531b2f83bc", + "mime_type": "text/plain", + "section": "99_INTEGRITY" + }, + { + "path": "99_INTEGRITY/SECRET_SCAN.json", + "size_bytes": 77, + "sha256": "970ee4c3d19519c1025a5781b9aa4f49d900d9a1956c9eefd2b15786a9e5dfbb", + "mime_type": "application/json", + "section": "99_INTEGRITY" + }, + { + "path": "99_INTEGRITY/SOURCE_ARCHIVE_TESTS.txt", + "size_bytes": 788, + "sha256": "83eefc22c1b503a53ff8b5386c2d64abac0b8bd1a4032b7ca69ae907fa9b84e5", + "mime_type": "text/plain", + "section": "99_INTEGRITY" + }, + { + "path": "99_INTEGRITY/SWARM_TSC.exitcode", + "size_bytes": 4, + "sha256": "743c7850cccfba5e53a9002663ec1ddd1079315a98bdbfdde10e6044f56abefe", + "mime_type": "application/octet-stream", + "section": "99_INTEGRITY" + }, + { + "path": "99_INTEGRITY/SWARM_TSC.log", + "size_bytes": 77, + "sha256": "baa39f268839202237ea4be94353c7fde01bb7dca9b9a40a7ad0ca301e3e8a50", + "mime_type": "application/octet-stream", + "section": "99_INTEGRITY" + }, + { + "path": "99_INTEGRITY/WORDLIB_COMPILEALL.exitcode", + "size_bytes": 2, + "sha256": "9a271f2a916b0b6ee6cecb2426f0b3206ef074578be55d9bc94f6f3fe3ab86aa", + "mime_type": "application/octet-stream", + "section": "99_INTEGRITY" + }, + { + "path": "99_INTEGRITY/WORDLIB_COMPILEALL.log", + "size_bytes": 0, + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "mime_type": "application/octet-stream", + "section": "99_INTEGRITY" + }, + { + "path": "START_HERE.md", + "size_bytes": 175, + "sha256": "2305841419d88c13ff78e825f311f7aa84c9e2fae9ee5da9f70be889579c2443", + "mime_type": "text/markdown", + "section": "START_HERE.md" + } + ] +} \ No newline at end of file diff --git a/mainbrain/handoff/99_INTEGRITY/SHA256SUMS.txt b/mainbrain/handoff/99_INTEGRITY/SHA256SUMS.txt new file mode 100644 index 000000000..b96b18cd6 --- /dev/null +++ b/mainbrain/handoff/99_INTEGRITY/SHA256SUMS.txt @@ -0,0 +1,382 @@ +80d04ddf28ec855389cbafd251a0b6966b28eb613cb0cde6f61c1e3640444e2f ./00_START_HERE/CANONICAL_SOURCE_MAP.md +f90e5d5babcfca0a9c674191c00d9814bf479e3d0a17006771b877c226d0eb4e ./00_START_HERE/CONTINUATION_PROMPT.xml +7698782a35cb36f853f25ad99cddb2fc33b9e8339dbaf41d9977e8c3cdd080fd ./00_START_HERE/CURRENT_STATE.xml +a6459baffcb5c049109f9fc3de725856248892748e02496b6d63dbbf10e63fbe ./00_START_HERE/HANDOFF_PROMPT.md +7ae5571a4f267f141e2028f2e88c28fe60e1d002284dad7703aa20eb8c56cdc9 ./00_START_HERE/HIGH_SIGNAL_CONVERSATION_RECORD.md +9985de1e4c09c502d89fd2adadb26cb3eac0ea1ac806a64726f2cfad717c8bcc ./00_START_HERE/KNOWN_GAPS_AND_RISKS.md +fa78fc82532686bba65b5c3d3e447ad0199b2e05a134bd213fcd37b3c64f3e79 ./00_START_HERE/MERGE_AND_EXECUTION_PLAN.md +33c599218a812a5b02309aaf508a97fd296b3f173a134989bb8586f091767d8c ./00_START_HERE/MISSING_ARTIFACTS.md +08cf89d445e77723461d856769b40064405622b599d94657b68a8574b022d74e ./00_START_HERE/PROVIDER_AND_CONNECTOR_STATE.md +06a7074f550f689834746b8aa4aba01ea6d6a835454335b8b76190e1cf0ad74f ./00_START_HERE/README_MASTER_HANDOFF.md +400a842ce988d932f78deb578551809943a215250143294097a71c0adafe67ff ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.backend-features.json +63c04a042584ffb92392a0b832664c992d4948d1acb77d6a3160fb939886163e ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.dockerignore +c2beefe028fcb096be2684463bfdfaf473a6ad18721485cb4801ae704a06f9dd ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.env.example +25b56bca05230fe1d820d5e24f4981837a3d0796796c272fe44dee90607c2a2a ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.gitignore +17f593918ed38aec9deac4301d519a4349172c649d1849ce17190cedbde33228 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.prettierignore +087532218269eb851c22dcc3d5234ea46bfa513b494a3d7b167b1c1f48c410c5 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/.prettierrc +620be0b514040ed2d07ed232bbaca99f9108bb0ac34d2f028e31e1d5951f59ce ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/CLAUDE_CONNECTION_STATUS.md +e7b24b72d6018c167f272eec6f89d92a55b10bd3bd773208d5ee7ec506ca65fd ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/INTEGRATION_GUIDE_2026.md +46c71c30d3db03886f9e1dd27209bf49861275730ca6d3190719bf6637e7f9f6 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/README.md +6b300d6c375299183df7247884a04ea01968e6b040a26059b0c5d81ef69b507d ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/SUPABASE_SWARM_CONTROL_MIGRATION.sql +1055cdaf97d11bc5c651b604befac21b82a392db612dde4acf651e315e6da9e9 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/VERIFICATION_REPORT.md +7279f7266a8258f1c5d562f76a0e1b73b60138fd131ffbc65281a02c68d2fb00 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/admin-router.ts +5a7af02ac0de759283a020c770d502b0c467d331b18da8840994ff6d178ec5ae ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/agent-router.ts +3a5fde912bd9dbabcfe403ad46d298c3b584fcf4eba390edbb574b3ab269017e ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/claude-critic.ts +46f06451c946c90bf013e3fcd2d5e48e836f07a8d3dcfc96e7453b80ac40320c ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/contracts.ts +94867c046b92f17947670e8b520cca1aa455e4739ab8d7dc0d40220b272455ec ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/execute-swarm.ts +93805392eabecd0ce658200084e7716ee91628048667c486ea7bc77b11db6902 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/hf-local-router.ts +5000688f54f27ed838af43dcec4488f4cb13bdc801205da643e161791e12dc56 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/openai-swarm.ts +875478ad125832104d9ad7e5b3482746ed96a89274875b756f8c13b994299a94 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/project-context.ts +1e427fef95caae9ee92efdc440a714ada53cf3fb81216efff8ef0346ce3a056a ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/provider-status.ts +57fcb1eb97f0b9fd7b09d37d830f91e96a1dcc8d078fbaf950b055c87327523c ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/state-machine.test.ts +f2d69e213744787ba9712523e612800e8084f1c8463921218498d23241cd815e ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/state-machine.ts +66cfc80292ffe2f58ebb29d3ff816293ac26693e8c63141a80615d4161ed4105 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/ai/supabase-control.ts +0741718e5d6c19991060bc246f5db814a0bd958e53d089b85c57c5147cbc4036 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/auth-router.ts +c24f67a29baf4ef6de9ed44c6941fa6a93c1f8bed1229f0afdccc58ecaba41cb ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/boot.ts +b6b8e6e1ab58f0482d48817d297eb5e83356d7f23715c36a917521ca1f99f6d7 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/context.ts +e739b199ff5679ccd61b65ebf07124c671d06a554fc86de1a128ecb05205d72a ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/kimi/auth.ts +3d8c5d609a8641877f7e26ce69fa5987ba5ea84425cd27394317dd187b0c094e ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/kimi/platform.ts +478659cb9189fc814e9f508b41eb9eb0ba4cf0b76c4cf7f52847709a0ce06393 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/kimi/session.ts +cdb5cec7f668ea83841b2ad0eaeaf5b85965f72c39cf4ba3bf98297ac25cbe22 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/kimi/types.ts +f7a010030fad3689ca38277c9d4193400486464cf3fd6e4c88cf5f6904815be4 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/lib/cookies.ts +c52fc532bcdd2d3d06b3be81466ce727374a20b061eb58dfdf9da7e081b16908 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/lib/env.ts +615041eecd972d7aa371a45c047db67e2ba6fd0bffc6c769f4f0fddb1d9dda92 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/lib/http.ts +ba7c9068e75ef736d53024f34d07cb0793786e7d6db5ac0bc5663648a052ce89 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/lib/vite.ts +9e18f8dd53815bc859fd38280d88cb726f73f0c80ea8859d859c23a6086232cb ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/middleware.ts +935d3f79901082b54f4ae4292c4dfb9c8ceb402e9eea3e6f177bb7f401156e97 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/queries/connection.ts +8ce74035f0b155e29a434708d72c9623527606bcd79a6959af00ef17b8b188a7 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/queries/users.ts +b9106e15d176bfab83938eaf2c1afe677ef07f93b11db0b207aa081f2c2bbb8a ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/api/router.ts +22643b642f17cd817ec94d8439a272dac28119af0aebf8219a96ac1c2f4c61dd ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/components.json +1115a0ea08874a7d0ff3c534107ed247c2312a0cb64848dd1cccf0074ae0892d ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/contracts/constants.ts +823cdb78cfc45faa3077db9d2f5cd9e1bd8b8f87e5941e38daa6cde0f19d990b ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/contracts/errors.ts +191164b8f041fdf08032103ccceeeba5eea342c9625263ee987e52d65d290d48 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/contracts/types.ts +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/db/migrations/.gitkeep +85acb8ece8fbb5031fc56fa8c70338d9b8b06ef3b032391fff8532c6373c7186 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/db/relations.ts +c5fc3d59dbba5e7b0eb2f4991f27e9cb509bf2e8285ae742991dffc530fe174f ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/db/schema.ts +96d225203beb798382bbcce6ca0cb9ab3efde85b9c922e4bf5f7090cf6eb9c5c ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/db/seed.ts +554769ef8024b45c332b68850ebe9a34c0b0deab819ca6ef269b164027c2d89a ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/drizzle.config.ts +4efe97b16d1200fac0eaf07aa00930a8668b1f96a0be1891ace8c1e712ff0ccb ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/eslint.config.js +b649685c058225dc8c564ba04c75ff2bc538bd36a5eb3c52d735bb9aacba0a65 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/index.html +e86b40922c19326c0d3ddf44ac003359f21f105a38324a471e21ddc678b6eafc ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/info.md +1c448990c7e84a53268c4ce97f467b2d890f62e6a744f84ac7beb267c4df74fd ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/package.json +190c877db466995bf1482f4a16abd06e04a89ede3119341e2a86ff96e1737b27 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/postcss.config.js +14f991fe2d5d6155118b16ce02294112b1916cd4cc16f32cf97a9fedb3621e96 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/public/assets/asset-1.jpg +57ed3f60b788fb14c0d05dc713134d5a43f0c1935b347600592d0bb9b46ef192 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/public/assets/asset-2.jpg +a0715e0a09edbd0fbde65816a75e0fa0fc8b314c5260c0768c19bf3aac22621a ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/App.css +b43f36b73039dab0f0f8a6c5bfb24640975bd93d0959a67e2496d770bf72fcb6 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/App.tsx +751e39d2bdf3c420a80debbb4780637f14e32e09b335e02f1ad3a03f9f3508cb ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/AuthLayout.tsx +aa6c35cd632c36c36d2e0830c064703d848f0cd02c0c6ce488a9f3fafe5a19e4 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/AuthLayoutSkeleton.tsx +8976af371ca0d4de3a6b7a75d3497900c5e7a1a81e0eb443968022bb1853b014 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/IntelligenceOrbit.tsx +61cb21dce12eabb0d46943bbb5b1cac6ed360ab40aacb102fba867bf4fefacfb ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/Layout.tsx +e2dae9e089b442b0d7f8246520a0c39bcee26bfc2e341e2fbef9cbece18da532 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/NexusRibbon.tsx +1e00288c7eee72380002164ea3ff7589df5d92f2f1b8c7aa5077596ef680acdb ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/accordion.tsx +683cf8b6c3b0c29fb0e31f36e8c7794c63ab5b7ab431f7441ea2d478bbf9fe41 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/alert-dialog.tsx +49d8311589b810b106aada8ef7b13f70b2b1f68cfce4e1458b7f31a191f420e9 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/alert.tsx +6a75117416aa89200cf31e8d61643b428e812f479caea857c80004b26d893e79 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/aspect-ratio.tsx +e637ab3522c01631eac2e456588ef301314e2bb7940ebf7cd96e698a868d47bc ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/avatar.tsx +e7455feb113b38c59456ba29a9ec264b5ffa1daae8883866332ad637ffd57c31 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/badge.tsx +22f3f4c13ed1085c4131379bfccc6fb173a474f861636bc2736506820153aa08 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/breadcrumb.tsx +ccbf09097f5ebf2eec86f1a96cb92e8dd39d251ebb5867394196c8b4fec68a5c ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/button-group.tsx +5a5c4b8b60a8a80ba7b8b5d0319be2d3c61bfd2ce4fc2a645371dee9f6db0a77 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/button.tsx +c8e67d15d8622135b72045d974a3234ea99f5ffcc1b981eafea8847a14ae1f12 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/calendar.tsx +2040cdff27cd1ed771e0ebbd15abcd73d31f2f1e4be6664bd6816fffd2a87476 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/card.tsx +10c5388b66d98f0c555dad2e5b89b9bc846fbc1a3de101ee8b98abc305ec2c51 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/carousel.tsx +39a2fde544144e0ed0e3e7f76eb3f3988f570f849f30f62208c6f3e2fc4e3e4f ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/chart.tsx +a8292972a5b81eff164f621ac0bb66f4ed4419d1599e2d4901968e216574677f ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/checkbox.tsx +661444318605c90d19e47e4d21289a68b4c5f7f01782be70dafa80d3f7a4cd08 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/collapsible.tsx +416cdc19eb9e7301b51f9665b4f1a797534769a6bb58a563808979f460b0b8a2 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/command.tsx +70e547a9bececcc98adf2fbfb2cae05c99179707ab0edb1ddfb5d2de329dab42 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/context-menu.tsx +6333f1124e85ff25bce5061ac9ab5981e5346782d5535c9dfeeb51b2d535a7cc ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/dialog.tsx +0c9464ed4f95207ff6ec0b8f433f550388ea0fe57fecd36bbe100b084ee46a3e ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/drawer.tsx +ba022169876b487c849d046ac577654ab61a4cfba158305c8790c572b704ed9e ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/dropdown-menu.tsx +584b491f9eb69f8041b3d3732a4d139f5af01de19a00b7a97656c7af7a78716a ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/empty.tsx +e9dcb51b16e5f235bdf23a0b4a092e55c05b2bad08a83126ac675b72aae5380d ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/field.tsx +a12f73507ab613e9d797979b988a15e32d23458fc8dd4ba71b922aeee977a3b6 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/form.tsx +031f6a309d87c8e42a2282fccc277dde75e373de8c93dad881582c9dc13e05d0 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/hover-card.tsx +c0df02569e483db8ee86bd51b3b392a1ba62b276604d8c7ea90a9efc5faa9e25 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/input-group.tsx +7fd7ed5273f849cde558238148ee1bbae729aa1149407c7c732b6c65906933d2 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/input-otp.tsx +56b7fd30208addbcc2468cfda4f5bc0a55342211deaab61ee35b1c352b1622f1 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/input.tsx +6d64b756260749245b3a1f292e2aaf2774d7ec0b8bb99403eb8c1be31bd26900 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/item.tsx +886e04c83aaa016dfce924e461aa38aa68a9f5c83bdaedd6209dc358c32a8f22 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/kbd.tsx +9ec42c8a57e82311118b794318409ee02b2cebfa49ba6cce8457cff6448cd471 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/label.tsx +b4be4da586ce1288e8259b1e760a9e317eb0ee9183548c762d8b2a222bbdb3e5 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/menubar.tsx +d71f57fe0f365541fbf5d00196b0b78a461d8c4f38d35293e5754680d93b9245 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/navigation-menu.tsx +374ad135c3d4ff3ec080a0009cd9745cdd0e12faa89d2b0e86074f11e5127fd1 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/pagination.tsx +29a217781737bbf5c430859b3de46097a44ada81c4143c2d05543d2167de0ee1 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/popover.tsx +9e36ca3f10bc56b69058d8edd342832b72c8c1b2d36cd142a0decb2445c3b724 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/progress.tsx +b12ca5cef859dd75b274337234bae66e413b0f97845243254a1dedcb2d7a7237 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/radio-group.tsx +4634b0a700b91e5d422babc1f068b6d145b5f000c8aff62d5cfc9b5711fbff73 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/resizable.tsx +1c5d0b242d0513848f4bfa9b57ba7f438d9b1120617029941bfaa137196ecead ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/scroll-area.tsx +68fc754d3042f9fec3406895845e6fcc05d44f93a049478a9d3c706919100ebe ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/select.tsx +e9dddbd8dbbc0eccd683306481b0f0bbc8e2b60ea97817416ebb9fe7fbbbdca8 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/separator.tsx +fbe9b257fd95b9865e1aba651489899c959ed5c16cb8493fe8c2733f83b92ee1 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/sheet.tsx +6074d8027b4bc9ea2d5eb1527a8528a7fa69df96f6261b9c6441c3980d41700f ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/sidebar.tsx +f2aea81d8baf2b621945382aabac150e3db40f20d19ac1abea7aff805f1dc33c ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/skeleton.tsx +640996327017c3977e3c61eee8ec55230fa0bec509d0f4b44bdc9acdd8eca138 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/slider.tsx +a3868f2a8aafd8e2dc96b7ae145009939e9d8723cbb5a4b61d7b7d9bed9df478 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/sonner.tsx +3e6e6e8d37fb4069f8e43e55318f8db06fbc36e6c8be0096da3c9337c1c798b9 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/spinner.tsx +17f2390d98e8ce4d9e90155eac1918266914d6a9ada7c276b5d1c917cef0e969 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/switch.tsx +95e3ef5db88b3bbfb68eed12f341fb942e40ca815f4342e1d5dbc8c8d47c783d ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/table.tsx +e8469e599381cf021ce751c27cca3d8cb06440a45665ca9c2ef2efb0acef1fd9 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/tabs.tsx +de4e9fb0fd8e8ed10ea2e475ffe202a922ffe77e3f3edb2c517b0781447ad1b4 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/textarea.tsx +c63c671fe328f2c1e0d58e3df82a474e73834037c5a39a9ff566a4b3b2cf9010 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/toggle-group.tsx +ab2e52debb86451889ac9519dfe27daf3a86d70aa2833da8ed8f6cf3146197ff ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/toggle.tsx +cbc12f4086448f8a307ed5fbb160f79467c84a44c48ca0dbd2c62e39a2db6f5d ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/components/ui/tooltip.tsx +f46e9241d92cd3a39ae007ebe69160e6949153ccdbea3590b0d14a0b0deb8ec7 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/const.ts +ad0936f84f1df79d3697bfbff9c18f8ad58431c1cbaf2359c6a853b0fcc9f28b ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/hooks/use-mobile.ts +fd65eed54948873c0e9dc6a6c97979f1a8f035dd501d8b5a5ce01bbf2ad1c273 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/hooks/useAuth.ts +f4a96fccfd5d73e446df811ee4ac0186801791d850fefa00f11ef22dec9c0921 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/index.css +7c8c3dfc0cdd370d44932828eb067ef771c8fe7996693221d5d4b90af6d54f2d ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/lib/utils.ts +5158f50a8d24a8f10519f1cb9757884b890da059235c0dcbfe63acd387f45ab0 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/main.tsx +8cb4b85497bf488ba2d4a5d98f1835e3a926e8ec591cade534805aadf37f2187 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/AdminDashboard.tsx +0a7f5f11dba8c7bfd608164cbccc831b370beb6352623660a15aed4b6e1d13c2 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/AgentGallery.tsx +fef4a4b58ceb716f3ed0421268b8788511b2774c0cbddc2124455ee279033fe8 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/History.tsx +ddbefe3e4f52253efc5ba75c619060b604833bb5f8f7ccbdda010985e1328ec4 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/Home.tsx +b09f1e20f438e9d8500ecd849a2db7867448b484693f6c7a8b0dc03555329cdb ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/Login.tsx +3b193acb178c2c93919ac507b1d86239411cdbcf6ccff5cd27422c45dbe7dba7 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/NotFound.tsx +2c81de99ff62f1de0aec77dfbb4e1ad564bca09b35953e8890904b75d51433b5 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/pages/SwarmWorkspace.tsx +4b29a7cd0a16720f021b1daf5b9e07f6cd4435b9273d65a5b144cfb12f81bc60 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/src/providers/trpc.tsx +149b62bbe6c8c83d2f3dfb3196bbdb309156a63a7a289acc12f6c9066c763752 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tailwind.config.js +4f315c21e5baadb1c1a1453478549f4f53bc04a44fad30bebb7c3e1247d69706 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tsconfig.app.json +05aefeb2c50149ed2bf1cad4874344cbdefec64960437956b99e53786291be23 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tsconfig.integration.json +095df19402d5aa87e29ddf7dd3f7259c6588aac659221f36b94b8a5891adb7f2 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tsconfig.json +c3dd0fb522feba3596713f51b95bd53d781d845d24aedbfa2ac093d8b39c5120 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tsconfig.node.json +7166d855e0fb97203e1ce5dcbdda8546e5a33da543d9ecab67e95f13bc57ed07 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/tsconfig.server.json +5f81483f0cdbbe9c4cd04bf5052025dc556332b8723ac34904709018585bf40a ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/verification/offline-ai-sdk-shims.d.ts +d9b910dbd12644b976f1965b14f56e1eb36f1e61ac15540bdb854e847e1e78d5 ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/vite.config.ts +fb8add3e50ba9d1a82f280430b751dfef08b20c95bd9ef567613836b62d2392c ./10_CANONICAL_WORKING_TREES/OKComputer_Swarm_Integrated_v1/OKComputer_Swarm_Integrated/vitest.config.ts +adc1b9edfd51a0e80dbfa261a90a606e8752192382a4c314571af3bb51b7f35f ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/.github/workflows/ci.yml +5ecfd774a3f7f0be8ae11ac6912268e4cca1cb03de529649e42a2e11294140da ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/.gitignore +026960a8075c2510db2bfb3743ac14c9e1cfa8c942f01f60bd4b70ad2f90dff1 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/CHECK.bat +6930709bd7d8133e75ec98734bee99fd1406cfd096f69c6f9e315e1224e1c289 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/CLAUDE_BRIEFING.md +60338d7c36474121ed183f3a2468ed4fbf38c9ceae48122efd12d29cee7c1f39 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/GodotProjects/PLACE_PROJECTS_HERE.txt +fa2491c41db88207571aca85fa84687097e4d8c3443c22f51ada160f3a463496 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/INSTALL.bat +fc84c3fbbc9df2b8d4c66eb83e6f7e5fbb94e9ee8fb81fe054239f8180eaef6d ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/README.md +75df707416275c7fd4779859d91450c7b58d07ec7d66eb7bfad6cd84efcf21ec ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/RUN_ME.bat +59281bafa67a694253e1cde209a8a4b2ce512c732c1c382b650a117be17c0ae2 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/START.vbs +5cba9ca3c47c9a8ec7779ac897578608e99837fdc29e387384f779620b9ad9b3 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/START_HERE.bat +5b816b2e4ab6d1b889c04537bec8d71df29e3d73b10183173ca389582d679d0b ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/00_Backup_Before_Ventoy.bat +39da152492ae1b6d2c13512f2d6a6b79a1002f8a4ab8de3b86be36722573d38a ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/01_Install_Ollama.bat +f97157379e226d58fc0154db2ad69b1005f8e50cb1226db64870f755ed69683e ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/02_Install_OpenWebUI.bat +3943ba70aad3acade1628ebc36128742825a901e9779c21b098fe86ecbe2b9df ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/03_Setup_Kiwix.bat +a0a7c1d80b17fc4e45b3add4c547cd7ebfc27e0ae42ddbc9a5da7d69b4ba1eb8 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/04_Setup_Godot.bat +25e5a2485fcc603cf925f0221abb40a2abffc84ec43eb8b791895867af9cfd1f ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/Setup/05_Add_To_Grokipedia.bat +8483a907f880c5dd536918ed5df98ac46ef4ad0dabd2a4927f90fa4687173cae ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/auto_install.cpython-313.pyc +1d5d3e8b68593427f82cdb3abb44bc480c1ca33f87f8db9022e9eb782d235571 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/content_seeder.cpython-313.pyc +18a25da6e899c35c32c1b2a0649bc7c9ae4925f7f70e240592d0c25b4138ba42 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/deploy_check.cpython-313.pyc +14f6e5946122b0b8cd2d9337b5623c9232466c01625010d2c9b2aa39748615fb ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/launcher.cpython-313.pyc +482b0bb4b032f9c8704b35054d8fce92cf30ca26d9248064f21b61cb4e75d4bb ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/main.cpython-313.pyc +7bfcd462809eb9418a22548d7dbf7fd815e272d97c103503761c6bc5c1993397 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/__pycache__/start_here.cpython-313.pyc +a4b3ccd6d39e06f75ebb0a2e89dc1eaf27aa183c2d628d41480d968c043cd769 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/__pycache__/main.cpython-313.pyc +18c6897e74854fbd998195cd7de7f227165408597c369932683d759f4d4675db ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/main.py +b4037a962ab799f711dc650f3554ba66d97615fe19b3d4502e22ebbd264d1f42 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/base.html +5e2d7aeb69f3be15b94e7a1f8f9438fdb2bfff96af5c936b325b15622e19c48c ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/chat.html +7df6bd49279bc0ebcae10f2f341174ed6893cdc6bf61f9655de992240a73e688 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/console.html +60597e7a608b7395797b8499b418f906cb5930c87967f40b15661d128363a8e6 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/index.html +ccd8b34fb609c91192629c8ee4ed85edf9b9c6f5838c985c87e91929743c9655 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/kb.html +b9e4fd5cbac814f8c6ce0b05a5daec6c2f73233efe46f78d6ac855e802ec0c4c ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/kb_edit.html +42e344a5be0d944e242c0d2c27c75ae3aa19dde79cfbbc9fc44977e72bf0f3b2 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/kb_entry.html +c172d5ad3bed065f99c79ec7067f0c319f3ee10e373f07afb95b165beb2b0d17 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/library.html +fd5660a0c49115d65fb6d9e0d8975e5804b06e66134c5be22c4b989f91d683d9 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/nephilim.html +ee6eda4eeb1dbbea82d658b6bc9726da7557d7b35b62a529451014ad0e1f3646 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/note_edit.html +02dd5cf700f2f3f01a740d350be747dd46a678148d8ed0ba348b5bb7d060c525 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/note_view.html +b5c54bcd92e5c991ce7507943794e02116cf61cc64dc9ad1b4330ecfdf507bb2 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/panel.html +984e540018c0532ccf0f76d3a199a5bcc4f4d71ad8298ee817d2c396ae22ea88 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/recovery.html +4b8ce44714e62f56670e692f810c8189046649d4273bb854ecbbd31002243474 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/research.html +cf19400a4e011d6c88b7da753e718dd0afb4a3f63e1b86f08579768e3d3efbf3 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/app/templates/strategy.html +b6b88ce61cd59987a8d1cb1acefce2fe0ec34ce31ef3d419e50dfdf811da99ac ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/auto_install.py +861ed826d60b50d8a809b37d6372b20c72c35c134d19d66f79aecb6fa6f38f3c ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/config/agent_message_schema.xml +9eb8b398cffbb10a37b225e88d27be54f4034aa09ebad304e18b6999f1265c83 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/config/creative.json +4941744b6372b8f70eaa69a9a54a6e835d1aefe331baf20afd1e61af9e14761d ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/config/gremlin_premium_features.xml +bb3246634bbdb0db4af942df831a6bea19e3bed7c4b9b10a8d0232334c9e7185 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/config/model_manifest.json +6572fe0c7e7927f68d528818cfce178112d541899c2ac1d2ea247f7cf4863bca ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/config/usb_paths.json +fac9d65e5b2e9c706e92ba7ac7eef6470d6a62bb47deeb4c40e0e1d73b18938d ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/content_seeder.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/core/__init__.py +72152854fe820faf9265d1b42b5f81b04d641c02593002f18a0b146963fd2a96 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/core/__pycache__/__init__.cpython-313.pyc +bdc72784318f23a031ee971f4d9c821cfeff395a3ba6b2d9969c83ee457dc96f ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/core/__pycache__/paths.cpython-313.pyc +862f741ec5527b8244c6aeb5093e504a5b637e65d85bca2a2f2aed79878036d1 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/core/paths.py +43668140cc3d564ab92b09e72f94653b5b4b5fdbcad0811cfc37ecd644ead65a ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/deploy_check.py +736339058a593bd9899a552a163983db24a00bf11d2b03b72a0a8d342a085f66 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/HOW_TO_MAKE_THE_EXE.txt +3b6108f1b4f104ce26b17c0f59f60a591ef90d3d641e8ac9a759e8041cadbead ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/MODEL_GUIDE.txt +a8e0eb98fd9845d3d6e83ea3a7c0017c60abf15e1ca73777f82e480e101e1ec4 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/SETUP_GUIDE.txt +71d0e9a2f94c812e9894fe3c7f1f2302aa436c360727eb18e83ed56efa036134 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/TROUBLESHOOTING.txt +ad535e444f2dcd0e0aba8888353c0099cf3394ee079038bd1c0155a0e0a74ed4 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/USB_STRUCTURE.txt +b1e5907d6cadb20c5c936f13c1bfc25b327ff698ae1d4fd866c5b69ebb0f61e3 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/docs/VENTOY_LINUX_MINT_SETUP.txt +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/editor/__init__.py +425b97c65558279bb17f604428829ddb8c090c2c0fb492ad38eb5b3a17ae113a ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/editor/__pycache__/__init__.cpython-313.pyc +a7cefc8bb5108aef8268e4e9dd7194cdd2c670be97db2a8fc6c4cfe6e296c1c1 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/editor/__pycache__/self_healer.cpython-313.pyc +8869c3333f48c0a94f66e12c8e0d9d81e3fbd8a6a812e810da5aeca7b7171a19 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/editor/self_healer.py +c9b83e0096d37a8fff1aba71927d3949830d0a2e22f43a84c00b43dc7ab5db87 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/launcher.py +40baab816dcd627684bc13168df8f566f6c70996ccdfc3dbe0fb7e4635a0197c ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/logs/usb_orchestrator.log +288c37388d7cda03b06ed810e3fa95868b036de2d727bed4aac2aa80e639d0b9 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/main.py +136289f6a66a4c82c1f20b4646c2bf0eab727d31d7f55c27d1249e9e2d2751a7 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/models/PLACE_GGUF_FILES_HERE.txt +8e9c3f0cd0aa0ea75282a70db2a76c750bf91db26c96c53b5b298a795a6daa4c ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/presets/01_Gold_Standard_Teaching.json +0c828ea18400f45b7e115dd6c5b4e2a3f2dd28c13481c094bd21b1c96d0cedb7 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/presets/02_Dolphin_Uncensored.json +b0fc1eacc6968e23aad862017184ada3cc24c4cf4851d376d4a8e15be5a99d9a ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/presets/03_Coding_Assistant.json +38b5eb38121d68a8d51c2321cb9208e7db86bbe65615bdc95f5f3d231868fe7f ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/presets/04_General_Assistant.json +d5ebcfd7ffe642e5f5f0dc9938688ca76c49a585c55170a293450b51799813fb ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/run.bat +15a17775370d800c8d8960de33be3876e47d03414b9b7d72ed3e11a3e9dfb3f7 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/BUILD_INSTALLER.bat +d83d200815f8242886b4713a18c37dfab0e47283b37e91e6477c79d14349bdf8 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/TROUBLESHOOT.bat +aef7cd1200b061d531810e01b44f7a144d4916d29e55834b441d19d0c9ec3447 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/check.sh +f3e7df5afb76897748318316c693ad586e461b6dcf40508ae93a268cee286179 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/install.sh +e7702f4d0e33c9a6ac11ee938074da0dea3c6cc43343ca68fe017b8ae0c3fa4b ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/run_me.sh +7da0bee639deb8fa78f49a3938fbc7484c1a2d12a97db9e1cd1f912982b8b3da ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/setup_linux.sh +9d59db003d209f2c1c4466f5fa8379d42d6b9f3bc6a58c37b0b73678a06dcf48 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/start_here.sh +2f12a2e4cbbf68cd3ea644362b6d8a70723132379ba9a640113240d68a1b1034 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/scripts/troubleshoot.sh +e0cd0e6e2ed7a18b9db313084a11e29e66317ef05b8a0d340e72394125b1df47 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/sfx_config.txt +6dcc20958d42d1460e8f3f3585f113549d5d880de092fbbb56194eb34e0a5a74 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/HTML_Generator.html +8f0e47749a28c8ab3c02e66f7e266f01d099bfcfc25c9bd95b8785b394993fba ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/USB_Launcher.ps1 +c5b6db00bd7785910a4557c7ad367cd220994fe7cb9ed709e8cdc72492eea873 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/content_manager.cpython-313.pyc +30c1b45fbd075bfca58f58c9178498d6a473f9dcb392ced5ff41a9c1cbd6bd0a ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/creative_bridge.cpython-313.pyc +3e2c0096b912a25f136b3a9f5d5399f209818afa1fde4653243c00d333027f32 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/ether_core.cpython-313.pyc +3d168532b93e6e352a6397c08e71ce3476001ea761c480567b1984bfbd92c6f4 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/gremlin_coordinator.cpython-313.pyc +e8e92c1c1da8b9c40764c98be705348fd76f6f72415890a6a104201d7667db4f ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/hub_client.cpython-313.pyc +b72ff662af2b956408c14c2ca01ac3efe01a23b7a961e0689fab3cc0f220ed71 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/market_intel.cpython-313.pyc +7ccfc3ebcad717ac7738e10d87ed48cb5d8da7ea0dd6b5e595441b76c8ac0ffe ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/openclaw_bridge.cpython-313.pyc +3a3f8c869663a21c87b1cd215c762251189fd4fec294476df6ce4875a38ccecc ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/rag_manager.cpython-313.pyc +d9d1cb0e639da93cb5e915ad80f41ffa499c376cba5b72fa9b16c8b11a0d27e2 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/self_editor.cpython-313.pyc +1f60c71b5f2e02bac4784ed8f70f7cdaea0c78d38ea48390cd89d55a895d93f9 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/troubleshoot.cpython-313.pyc +256c46c9277bf01e0ed45a6309fa3565e6fcbb267eaec3185384fac9e3f84f63 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/__pycache__/usb_orchestrator.cpython-313.pyc +b86c3221f4c9e01f57abe01d7251344093298490f68c28956895876b2ff82d29 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__init__.py +f8b085bce32596cfc22833d0099c2d67700a927f2c3dc0ca051fb848c2e1da63 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/__init__.cpython-313.pyc +5681416c2835ba815aa740db7e98d50450528fee9c8c31315b255800758970c0 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/base.cpython-313.pyc +ec21a0a3be13b0010f60e5630b34ed4325b31ecb7d21f3eefd870c178c6698df ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/dashboard.cpython-313.pyc +2d8b6732911db50901a65df143da358628710d5862452236d5f4ecc2a2f3769d ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/evolution_architect.cpython-313.pyc +3f1782c71afb2d8494e169830242e3621587a54635b2dd23a071f8e328453d51 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/gremlin_agent.cpython-313.pyc +1f64c0122ac1d6c6a3c6347c63003eb4a14284a37a0875ad9b4bb93a69fcc49e ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/orchestrator.cpython-313.pyc +4c134b8da19a25d3e41b8a7b8d9c87ee2b787b41a927b0427842547a81f50fff ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/__pycache__/specialized.cpython-313.pyc +36e3ac103401d25adbfa522624cb0de5d9bf39e5265435c46a667a61c6628baa ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/base.py +f9abc859cb45393a3aa7b671651c415f6702320f295f355bb37ce68d4a88109e ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/dashboard.py +a27ce1b62c97b31f5fd90d138d8fa253ce27177b506ec7c2760979cc8e8f0e8c ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/evolution_architect.py +76896a55a623985852ec8d4314d158351dc09625ea07191ab98995da62f26c8e ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/gremlin_agent.py +949497b363dba936b8229b5ae509ef0f8f7d5e6525532d5858735c862862e868 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/orchestrator.py +7e1f70e8bdbd52fb5a22a1016cb12b537074ae1f6753bf692cef8179bbecebd7 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/agents/specialized.py +999b1def4ba73b279a76636a510b619963f80d46dd786d5af60e1018ac94cb63 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/content_manager.py +1f0f7ea683e9f16536bf9534e170c6fe8d0807d5900eedf742db1f4d863ec794 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/creative_bridge.py +7166a2120433df61d19c7063266ca5b99fee934e4bda63820976a36ecf8dcf16 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__init__.py +2a06025c4ee8432f2ba574a136a72dcc48c6c4c5ccaa10321917623afd2772c3 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/__init__.cpython-313.pyc +e87991b7b21ff6d20ff7304bdc6ec5868a84780db89f3d1faaf4ec39eeb3b18e ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/absorption.cpython-313.pyc +af5e7313cecef3f3e038c0f92ff12799fdea5fb90d11241b57a7cf604298ee44 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/errors.cpython-313.pyc +d5fe31683fae35cf99a74666a3b7737ecc23999a4cbae0de311a34a2a9d27b90 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/logging_setup.cpython-313.pyc +95a865135dfff5194b536fe8bbc5e700667bf8169bb3096d677d03cc2aece60d ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/repair.cpython-313.pyc +0de29660520bec86a802ab00cce73ba56c15bf16bdf30680fa67d5d90f1bf2bb ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/scaling.cpython-313.pyc +9e4b1e349fe6bd3eb57c383d8d1a054c2cadf7c311abd50ca71fe9b463300d37 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/stages.cpython-313.pyc +1b6abc90c0a66d4d9ce699708f449ed6662fadef108dcf4372529060515bd5fe ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/__pycache__/state.cpython-313.pyc +a3aba592bb0262060ba01c38c34d8c1a659d7eb12102d8392df09fb07b71421d ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/absorption.py +84fa03cdd71c4b5fdd0211d1ac31f18b2d5eb63153273be05c54945a9e79b702 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/errors.py +76bf9a254709b6fd1029ad3feade04a92572ff863c27f8a909f9fa9afa947f8d ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/logging_setup.py +fe763fabce2ad95e5fb1fc4b968df1c8ee0438ff1e11e6deedef82739fcaccba ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/repair.py +e2db16208962c3261af7a8984c16adeefc97e8edb0bb714fc7cf3863b8f616a9 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/scaling.py +b91d30627ac7634f6ec0048c72e1386a83733d0c1164bbb459b468b885340227 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/stages.py +0672a787d68db960fb668df3c372fdbbbb9e85650a2a02c4db55f9e9b9929db0 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/deployment/state.py +db888cd1f7fd188d2bc5e5d325e046e504df574da8517bd22cde2e4201623097 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ether_core.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/evolution/__init__.py +67df195af757acce8e8b0c60e908d44b9ebc0d8c9792101154e13093a3d1c6a0 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/evolution/__pycache__/__init__.cpython-313.pyc +557b3ef3da8e7dfdfe396e350ce01a69d0c0edc49a4523bba23d4ed62fab0a89 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/evolution/__pycache__/meta_evolution_engine.cpython-313.pyc +f8f34a387aa7dc6a4894a799eb56755f96827141db4a2e613965f78c7e4e21c1 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/evolution/meta_evolution_engine.py +82b781117c84e95e297855647b5b0629afd71b407f00fb9a7bfe355c2dfcaf35 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/gremlin_coordinator.py +ac872465c92008aa07c1211b9a5fd516de40432ee0083a3f9b8a9c134a00828a ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/hub_client.py +9b8a24addb89135525a2878ad8145788c05e1e2719a9378add58e28716dd8f33 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/market_intel.py +0dcace9040c1942e07a434c22f8e041f0dbc8b8002032b5a9278c7e9b8f8cefb ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/openclaw_bridge.py +d5b75baddf05a14b1990552c36c9fe2d6b485ca99c94f26e585bc016549b3ae7 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/rag_manager.py +f6135f4556419e4a54b62f7fa60b2b0f11349e93dbf446733f662693539c9c3c ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__init__.py +a157c7e78a2a11db3ee543766d242d17867955386fff7d3a9d0064a95d6d5f14 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/__init__.cpython-313.pyc +4538660b4d4c564b9b53a7b66cc8d25cd990f65fadcc34cef8af24dd17382f46 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/code_reasoner.cpython-313.pyc +42542dbdc01b97456b7377805a8f9da8341c90c85e5a41bcb3979c5084b8cbbf ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/math_validator.cpython-313.pyc +cb48d9d7aa5b6dc8b4a2298705d929f281c4c8887dfb27670f4074555bcb22ae ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/output_quality.cpython-313.pyc +152b5b21b64743f77e1c57ec5c9129a35fcbeec151b8bb1150a6c8f987323eac ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/prometheus_judge.cpython-313.pyc +9e18c60909184c9d7234df359af834db9d90430076ce3f0adbbdd26240c36253 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/quantum_inspired_optimizer.cpython-313.pyc +c2bfb54f83885596c2a8acf083e3baff80279a1a17ee9037ba7c6063be9b2a63 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/reasoning_engine.cpython-313.pyc +ee1ea5fb9cc08f67e247cb4169425f6af26eff314c52be8575f8920b6f301af6 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/reasoning_guard.cpython-313.pyc +087560d7ab0502239298575b088259d1fb0e73b5482cd96f284f33ef8f3675d5 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/structured_output.cpython-313.pyc +409c03f8480e12c2d669792f0013eca48f7218675a5a206471ddeab486815dc3 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/__pycache__/uncertainty_quantifier.cpython-313.pyc +bfef4874f5a11a780eaec7ab8008d574afefcaaff3aada0fbb0646eddfce8877 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/code_reasoner.py +84f2874fbd435b30f9248f7cfb9b71a58798ee4c8eff8c39cc5a31c406bde7e3 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/math_validator.py +9240369ee660191ccd56212669da58df638ef8055115aaad16dd9e1fcc505064 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/output_quality.py +13bd9c03b8e65e3c444e00c631e476730c38c740cc5a6ba4680745eacefdc352 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/prometheus_judge.py +4a4012ba61cc06b23924ed799483d760552d1bddd2c1773f5b9118eb37d2f9c0 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/quantum_inspired_optimizer.py +2558f66970be75c56c2e82d1759e38f6266695dde209f17dbeb789c7d6f105ec ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/reasoning_engine.py +40b591a1c2f147d439701fb1cf763a8a4fe58e2ab7ee408592cb8387e0b63c8a ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/reasoning_guard.py +0a450c689e684fbe243fcba7cbc90fe5f6f02c15d720ea5ac402a4568203ab8f ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/structured_output.py +84d3fba1cc24532fb39a4df232e10b62d1cc24de1cd39d1b19916bbb9d79be15 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/reasoning/uncertainty_quantifier.py +e2c6f27961993390e373f2a029efd188a088e30966510bf15dfe0397890effb8 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/self_editor.py +0c9c863073ad9fbabf4fef74d642231728b9613731674c4a5c21186752a6ddbe ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/troubleshoot.py +aa76b04e8db6f8b1a88564a19435ce0c6b08dd6fda32f126d1fb13b93055bd55 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/RENDERER_README.md +810da8770788411c6f26a2ea5a947ebdf3e6a0fdc098c0f9eeec52db7f8d7217 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__init__.py +89d290d9a025b85912357ab9cba4c84b1fb74bdff19ffaa6d0737eb809e2dd43 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/__init__.cpython-313.pyc +b0836b4535fcb9bf4f2eb966eb3b5c91a2bb65e2df33820af670412b51a9d774 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/shadow_atlas.cpython-313.pyc +4163b85ca17c4a270fbb664e7b4ed7bcd5a6cd208ecd3ef70fbd125eb7f19d8b ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/ultra_renderer.cpython-313.pyc +8efb3d0e6d0e2eed16db91cdd71219a91dbfa53b042fdb00867d7fe57b8e5839 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/ultra_renderer_quality.cpython-313.pyc +fc4bdc7ad29d142121df6db197e1c4671d9b965d49e3af70be24056da4b28280 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/visibility_rasterizer.cpython-313.pyc +adfa77234770f0a8bcdea13ed1857e464e8a75fd36861add723146be6f470cac ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/__pycache__/vulkan_skeleton.cpython-313.pyc +227aaff28a19f4e4df2abcf395d12ae8be9df10d42eaf8e1a25bb4de647ddcf5 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/godot_gdextension_skeleton.md +9e325dba75d81134319314a5d94471b5dd8e7ac516a036a3db65512119ffb97e ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/requirements.txt +a455e137797083f19ff431aed682527a75d924b94c546a0a2ae1fed847211119 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/shadow_atlas.py +5317099d6166d63a1f8071cf8c4659fa9b23da75726d465471c7977767bf553d ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/ultra_renderer.py +6415efd7a0a77a3a3589fe935e6bfe0f54d694bbe5310930642a54bd28a4410b ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/ultra_renderer_quality.py +576352e56c627496bc9e4ee23d8277fd281a32f0fcab9c4a902eb1d16f67dc8d ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/visibility_rasterizer.py +7c6623971dcc48a9f6b9dccfa79422c89aa360bc58420ac32443b672448667be ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/ultra_renderer/vulkan_skeleton.py +083b6b30f5cccbece038f65941f71cc8e7b5c07ccd19b262249265ec05f6305a ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/src/usb_orchestrator.py +438a21e4bb439d7be649dbba2071653c7eec2ddd2c7c8259f027029eccdd1846 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/start_here.py +5e4ca59d8702ed6cc715c2d1becd1c1363928444b6302c59d9464fa0eb3b4cd4 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/game_design/design_patterns_in_games.md +750297126a3d1f21eb926a1ad22f6e5d778bc621a08219cd9efb70e2d5acdbb3 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/game_design/game_design_fundamentals.md +f968abab7e39ca3b6f78525479aec9bb5f3d61d4006ce4e27e1ce487e9ee0fd0 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/godot/godot4_architecture.md +54719ed6fbefa047dd5970ca9983262fd01649e2640a79f1ef5993c82e41f03c ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/godot/godot4_optimization.md +90f46e2271106cd9aac1fe4b999c52324074a551be2fdedb6ed48af2750526bb ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/kb/python_quick_reference.md +0a2ff7e900ff58fb46061429f8396d37d36ed8a95ec31c37ebed4b76ac87885a ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/recovery/supplement_protocol.md +ba881bcbb2d885e8b290fc6f865e002e1fa84d753c51559c385a2f4a378c55c5 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/reference/local_ai_model_guide.md +93c0fe7789954ea60574ce1e182643c6f167caa7321ebf91bafadb51b64d50e8 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/research/gdscript_patterns.md +71b3704d7d0b056a5ccc7137713c0f05ba68336a380eaeb944918df50c1cfb1d ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/research/local_ai_operations.md +f2577841d31a3648d94eba8770da825ac2b67c9ab1182f5bcbfa0029471c2272 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/storage/strategy/eu4_castile_guide.md +4567edd5617c1f595162bbaf5f10011bbb589fcceb2ba214e18c73702b85b25d ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/conftest.cpython-313.pyc +0da6ec01c40b483d0d7728d065e3a66f8edb63cab4a537b56cd393baf95e8d02 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/run_tests.cpython-313.pyc +f740fc94944f2f690a9961e929b8a7c128e3360f8082c8b28c99a41d7e60eecb ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_accessibility.cpython-313.pyc +77156ef76cd0927147887ea454e698b25b64e3107cc96a6faf3949999b432657 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_deployment_and_agents.cpython-313.pyc +cc9599c54b19aeaf91ab7aea68448771c6eac70af929e2356bfec70572345274 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_evolution.cpython-313.pyc +66720572c6031457cffe12be683057e61a9c2647bea376b9ddb81b5ee1419ad5 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_market_and_gremlin.cpython-313.pyc +641efe4e009a9cc502e643e455810e6244303d7c44d7d4b054dcb3fff65f8e79 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_meta_evolution.cpython-313.pyc +58c6e23277374b3ceb727748808870357fe8025bb70555793d13554812b7e285 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_paths_and_healer.cpython-313.pyc +bb6a421f11152d8a5d711d2f2a80117287bb9fa404109b2f5b181036a9a149bf ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_reasoning.cpython-313.pyc +9497d85fa5ceef8be3cb667c9a2aa46e4291216f2724029b3ee37cc4844db39b ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/__pycache__/test_self_editor.cpython-313.pyc +12008a244f401b051932f5743a35aa9bee9aa98788944f69c1b7bbd10dc69398 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/conftest.py +4c5f5ecd656f1e8c2d211a9de891a72d271c2eddb7b0810a37b17519b7587aed ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/run_tests.py +b21729b27b9a738831cca6d70628e89e3659a61214c1ceb1049e93e9214bfa50 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_accessibility.py +e6970c26d1a19ed80e2e91b496accf26e564528b8a498ec1a9caf3d81b8d2ea8 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_deployment_and_agents.py +546780f66ac665b87715aa09cebecefcd7b2068da78574e82149ce09b5ba2d0b ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_evolution.py +80ed441606800989d947f553bf46d5b466d92e903b721df9754a6ddb5c9e8442 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_market_and_gremlin.py +a07b4b13b3035bb65ae48a381603a81229f25bbe1a28c616eef62b377b9b5913 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_meta_evolution.py +4e18a86ae04a1de5f89a0df6dbe0f01d2d86480b0f3f8a4074f8d1d4bed6fda6 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_paths_and_healer.py +c6fbf07ffadbd35d5e3f1a99d820e1496be8234669d1d4652d918913060c5ee1 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_reasoning.py +63c3ff61cb6b40d8769b76c35028cc33b5498e84d8a09928e772c53eb2918119 ./10_CANONICAL_WORKING_TREES/WORDLIB_v29_BASELINE/wordlib/tests/test_self_editor.py +570efb9361366a0c6ef84276d6bedd92ce9cbed51a0252b2e486fc4db7974934 ./20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_COMBINED_DETAILED.pdf +537eb30218be807f92508cf31c37fa5028ffa48e9d8897b0575c5d70e5a07aa0 ./20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_EXTRACTED_TEXT.txt +da5e84edb0237549628f420ba9b277910ac0ec7eb8f54ac8b0cda17d63669e46 ./20_DOMAIN_SPECIFICATIONS/MASTERZIP_v11_PDF_INSPECTION.txt +1c414aa8058529851bd56548a206e73d50487a55183860d9eead6a1a502be4b6 ./30_RUNTIME_AND_MEMORY_DESIGNS/Consider best setup.txt +1eab3a14d1beb665e2731abfcba44617ce9f54a6cdea61c1739134bb19925887 ./30_RUNTIME_AND_MEMORY_DESIGNS/EtherAI Absorption System.txt +a119cd5fe9e2ead7524ae58246e40f6004ba007015bea43ec95354fe98817712 ./30_RUNTIME_AND_MEMORY_DESIGNS/WORDLIB semantic core update.txt +620be0b514040ed2d07ed232bbaca99f9108bb0ac34d2f028e31e1d5951f59ce ./40_DATABASE_AND_PROVIDER_STATE/CLAUDE_CONNECTION_STATUS.md +e7b24b72d6018c167f272eec6f89d92a55b10bd3bd773208d5ee7ec506ca65fd ./40_DATABASE_AND_PROVIDER_STATE/INTEGRATION_GUIDE_2026.md +9c526ea7ba31516ac4421259e314e7d3c5d3378906320e1f8b9ec35666cde908 ./40_DATABASE_AND_PROVIDER_STATE/OKComputer_Swarm_Integrated_v1.sha256 +6b300d6c375299183df7247884a04ea01968e6b040a26059b0c5d81ef69b507d ./40_DATABASE_AND_PROVIDER_STATE/SUPABASE_SWARM_CONTROL_MIGRATION.sql +1055cdaf97d11bc5c651b604befac21b82a392db612dde4acf651e315e6da9e9 ./40_DATABASE_AND_PROVIDER_STATE/VERIFICATION_REPORT.md +1c414aa8058529851bd56548a206e73d50487a55183860d9eead6a1a502be4b6 ./90_ORIGINAL_UPLOADS/Consider best setup.txt +1eab3a14d1beb665e2731abfcba44617ce9f54a6cdea61c1739134bb19925887 ./90_ORIGINAL_UPLOADS/EtherAI Absorption System.txt +570efb9361366a0c6ef84276d6bedd92ce9cbed51a0252b2e486fc4db7974934 ./90_ORIGINAL_UPLOADS/MASTERZIP_v11_COMBINED_DETAILED(2).pdf +a41f8fc1aed5dd055c978ff7d3e09c82a453cb4cdbbcc950b90e87a880dc14bd ./90_ORIGINAL_UPLOADS/OKComputer_Advanced_Swarm_AI_Search.zip +9c526ea7ba31516ac4421259e314e7d3c5d3378906320e1f8b9ec35666cde908 ./90_ORIGINAL_UPLOADS/OKComputer_Swarm_Integrated_v1.sha256 +20613246df4a37c01c9bdcb106f834156e38dd3ecd9d6df59f574d46593783c1 ./90_ORIGINAL_UPLOADS/OKComputer_Swarm_Integrated_v1.zip +a119cd5fe9e2ead7524ae58246e40f6004ba007015bea43ec95354fe98817712 ./90_ORIGINAL_UPLOADS/WORDLIB semantic core update.txt +276781bb7a22a350a008e95e75f5425552403deb0ab59292cea9e9a7e3698b52 ./90_ORIGINAL_UPLOADS/wordlib_D_drive_FINAL_v29.zip +03ba3cd675b8bc413adf8a899dbf2ab87d03ecf400553f4c0d1245045324951d ./99_INTEGRITY/BUILD_VERIFICATION.md +2862d477747637558b4b2f8c6f5d165f1c7a89448dcee8fa25359e0d69f0241a ./99_INTEGRITY/DUPLICATE_GROUPS.json +672b68da072b6cc1f2dc0345b9a1289fc7715c833c03868b8a37e78e2d8cbac9 ./99_INTEGRITY/FILE_INDEX.md +72ff4fc13d0da15b59fcaec16971736d42310803959b492d82de52c42f9f222c ./99_INTEGRITY/MASTERZIP_PDFINFO.txt +2ecd15b35f9d265e2e46dc0fb3ca001fc725431410b01338d6e089879a3506d8 ./99_INTEGRITY/MASTER_MANIFEST.json +256a8e08ee35cb8ad36ae16385257192c3dbe7d80cfdeff9eaa886531b2f83bc ./99_INTEGRITY/NODE_VERSION.txt +970ee4c3d19519c1025a5781b9aa4f49d900d9a1956c9eefd2b15786a9e5dfbb ./99_INTEGRITY/SECRET_SCAN.json +83eefc22c1b503a53ff8b5386c2d64abac0b8bd1a4032b7ca69ae907fa9b84e5 ./99_INTEGRITY/SOURCE_ARCHIVE_TESTS.txt +743c7850cccfba5e53a9002663ec1ddd1079315a98bdbfdde10e6044f56abefe ./99_INTEGRITY/SWARM_TSC.exitcode +baa39f268839202237ea4be94353c7fde01bb7dca9b9a40a7ad0ca301e3e8a50 ./99_INTEGRITY/SWARM_TSC.log +9a271f2a916b0b6ee6cecb2426f0b3206ef074578be55d9bc94f6f3fe3ab86aa ./99_INTEGRITY/WORDLIB_COMPILEALL.exitcode +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ./99_INTEGRITY/WORDLIB_COMPILEALL.log +2305841419d88c13ff78e825f311f7aa84c9e2fae9ee5da9f70be889579c2443 ./START_HERE.md diff --git a/mainbrain/okcomputer-swarm/.backend-features.json b/mainbrain/okcomputer-swarm/.backend-features.json new file mode 100644 index 000000000..8bcca478a --- /dev/null +++ b/mainbrain/okcomputer-swarm/.backend-features.json @@ -0,0 +1,6 @@ +{ + "version": 1, + "features": ["auth","db"], + "app_id": "19f6336b-e342-84ef-8000-00009efac4e7", + "initialized_at": "2026-07-15T00:40:04Z" +} diff --git a/mainbrain/okcomputer-swarm/.dockerignore b/mainbrain/okcomputer-swarm/.dockerignore new file mode 100644 index 000000000..51e5a3d30 --- /dev/null +++ b/mainbrain/okcomputer-swarm/.dockerignore @@ -0,0 +1,5 @@ +node_modules +dist +.git +*.swp +*.log diff --git a/mainbrain/okcomputer-swarm/.env.example b/mainbrain/okcomputer-swarm/.env.example new file mode 100644 index 000000000..7dd09a3d6 --- /dev/null +++ b/mainbrain/okcomputer-swarm/.env.example @@ -0,0 +1,39 @@ +# ── Backend ───────────────────────────────────────────────────── +APP_ID= # Application ID +APP_SECRET= # Application secret (used for JWT signing) + +# ── Database ─────────────────────────────────────────────────── +DATABASE_URL= # MySQL connection string (mysql://user:pass@host:port/db) + +# ── Frontend (exposed to browser via Vite) ────────────────────── +VITE_KIMI_AUTH_URL= # Kimi OAuth server URL (e.g. https://auth.kimi.com) +VITE_APP_ID= # OAuth application ID + +# ── Backend (Auth) ───────────────────────────────────────────── +KIMI_AUTH_URL= # Kimi OAuth server URL (backend) +KIMI_OPEN_URL= # Kimi Open Platform URL (e.g. https://open.kimi.com) + +# ── Admin Role ────────────────────────────────────────────────── +OWNER_UNION_ID= # Union ID of the app creator; this user gets role "admin" on first login + +# ── OpenAI Agents SDK (server only) ──────────────────────────── +OPENAI_API_KEY= # Create through the secure OpenAI Platform setup flow +OPENAI_MODEL=gpt-5.4 +OPENAI_SWARM_MAX_WORKERS=3 + +# ── Optional Claude critic via Anthropic OpenAI compatibility ── +ANTHROPIC_API_KEY= # Optional; never expose to the browser +CLAUDE_MODEL=claude-sonnet-4-6 + +# ── Supabase control plane only ──────────────────────────────── +SUPABASE_PROJECT_REF=dxyghtyjndylvfugutsr +SUPABASE_URL=https://dxyghtyjndylvfugutsr.supabase.co +SUPABASE_SERVICE_ROLE_KEY= # Server only; required for private control schema writes + +# ── Hugging Face local semantic router ───────────────────────── +HF_LOCAL_ROUTER_ENABLED=true +HF_LOCAL_MODEL_PATH= # Recommended: a non-synced local HuggingFaces directory +HF_CACHE_DIR= # Optional; defaults to /.cache +HF_EMBEDDING_MODEL=mixedbread-ai/mxbai-embed-xsmall-v1 +HF_ALLOW_REMOTE_MODELS=false + diff --git a/mainbrain/okcomputer-swarm/.gitignore b/mainbrain/okcomputer-swarm/.gitignore new file mode 100644 index 000000000..123a742fe --- /dev/null +++ b/mainbrain/okcomputer-swarm/.gitignore @@ -0,0 +1,41 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +# Environment variables +.env +.env.local +.env.*.local +# Database +*.db +*.sqlite +*.sqlite3 +db/migrations/*.sql +# TypeScript cache +*.tsbuildinfo +# Build outputs +dist/ +build/ +# Test coverage +coverage/ +.nyc_output/ diff --git a/mainbrain/okcomputer-swarm/.prettierignore b/mainbrain/okcomputer-swarm/.prettierignore new file mode 100644 index 000000000..72842592f --- /dev/null +++ b/mainbrain/okcomputer-swarm/.prettierignore @@ -0,0 +1,35 @@ +# Dependencies +node_modules/ +.pnpm-store/ + +# Build outputs +dist/ +build/ +*.dist + +# Generated files +*.tsbuildinfo +coverage/ + +# Package files +package-lock.json +pnpm-lock.yaml + +# Database +*.db +*.sqlite +*.sqlite3 + +# Logs +*.log + +# Environment files +.env* + +# IDE files +.vscode/ +.idea/ + +# OS files +.DS_Store +Thumbs.db diff --git a/mainbrain/okcomputer-swarm/.prettierrc b/mainbrain/okcomputer-swarm/.prettierrc new file mode 100644 index 000000000..67c0bc83c --- /dev/null +++ b/mainbrain/okcomputer-swarm/.prettierrc @@ -0,0 +1,15 @@ +{ + "semi": true, + "trailingComma": "es5", + "singleQuote": false, + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true, + "bracketSameLine": false, + "arrowParens": "avoid", + "endOfLine": "lf", + "quoteProps": "as-needed", + "jsxSingleQuote": false, + "proseWrap": "preserve" +} diff --git a/mainbrain/okcomputer-swarm/CLAUDE_CONNECTION_STATUS.md b/mainbrain/okcomputer-swarm/CLAUDE_CONNECTION_STATUS.md new file mode 100644 index 000000000..f8a2b0ed8 --- /dev/null +++ b/mainbrain/okcomputer-swarm/CLAUDE_CONNECTION_STATUS.md @@ -0,0 +1,26 @@ +# Claude Connection Status + +Status: **adapter installed, live connection not established** + +Evidence found: + +- The Gmail account receives Claude and Anthropic account messages. +- An Anthropic message states that Claude API rate limits were increased. +- No usable Claude API key is exposed through the connected tools. +- No direct Claude connector is installed in this ChatGPT runtime. + +Implemented route: + +```text +OpenAI SDK + → baseURL https://api.anthropic.com/v1/ + → ANTHROPIC_API_KEY + → CLAUDE_MODEL + → adversarial critic output +``` + +This follows Anthropic's official OpenAI SDK compatibility path. Anthropic describes that compatibility layer as suitable for testing and comparison, not the preferred long-term production API. Therefore the current integration uses it only as an optional critic. + +A consumer Claude subscription, Gmail authorization, Google Drive access, or Claude's access to another app does not grant this application permission to call the Claude API. + +No key was fabricated, extracted, or copied. diff --git a/mainbrain/okcomputer-swarm/INTEGRATION_GUIDE_2026.md b/mainbrain/okcomputer-swarm/INTEGRATION_GUIDE_2026.md new file mode 100644 index 000000000..6b5f3e5bd --- /dev/null +++ b/mainbrain/okcomputer-swarm/INTEGRATION_GUIDE_2026.md @@ -0,0 +1,213 @@ +# OKComputer Swarm × MASTERZIP v11 — Integrated Runtime Guide + +Version: 1.0.0 +Date: 2026-07-16 +Project: ABCAA-TAGAYTAY-2026 / OKComputer Advanced Swarm AI +Supabase project: `dxyghtyjndylvfugutsr` (`ap-southeast-1`) + +## What changed + +The original application looked like a multi-agent system, but its workspace generated hard-coded agent replies and timing claims. The backend only selected agents and inserted rows; it did not call a model or execute a real agent loop. + +This build replaces the simulated core with: + +1. **OpenAI Agents SDK** as the primary agent runtime. +2. **Supabase private control-plane tables** for states, events, and resumable checkpoints. +3. **Hugging Face Transformers.js local embeddings** for semantic role routing, with remote model loading disabled by default. +4. **Optional Claude critic** through Anthropic's official OpenAI SDK compatibility endpoint. +5. **A strict state machine** that prevents direct jumps from planning to completion. +6. **A real workspace UI** that shows persisted provider output and never invents agent messages. + +## Canonical execution path + +```text +INTAKE + → PLAN + → ROUTE + → EXECUTE + → CRITIQUE + → VALIDATE + → PERSIST + → COMPLETE +``` + +Any active state may transition to `FAILED`. Completion cannot bypass validation. + +## Provider responsibilities + +### OpenAI + +OpenAI is the primary orchestrator. It runs the planner, selected specialists, validator, and synthesizer. The Agents SDK receives two bounded tools: + +- `get_project_validation_state` +- `classify_action_gate` + +The tools expose project state and classify actions without executing physical, financial, destructive, publication, or sales actions. + +### Claude + +Claude is secondary and optional. It is not treated as an orchestrator. When `ANTHROPIC_API_KEY` exists, the system sends the draft through Anthropic's official OpenAI SDK compatibility endpoint and asks Claude to act as an adversarial critic. + +The route is installed but cannot be live-tested without a Claude API key. A consumer Claude subscription or Google-account authorization is not an API credential. + +### Hugging Face + +The local semantic router uses: + +- Package: `@huggingface/transformers` +- Default model: `mixedbread-ai/mxbai-embed-xsmall-v1` +- Task: `feature-extraction` +- Pooling: mean +- Normalization: enabled + +The adapted Hugging Face design deliberately changes the default cloud-first tutorial: + +```ts +env.allowRemoteModels = false; +env.localModelPath = HF_LOCAL_MODEL_PATH; +env.cacheDir = HF_CACHE_DIR; +``` + +This means model files remain local. Supabase receives no weights, tokens, caches, or bulk artifacts. + +Recommended local root: + +```text +%USERPROFILE%\Desktop\HuggingFaces +``` + +If Desktop is redirected into OneDrive or another sync service, set `HF_LOCAL_MODEL_PATH` to a non-synced local drive instead. + +Expected local model structure: + +```text +HuggingFaces/ +└── mixedbread-ai/ + └── mxbai-embed-xsmall-v1/ + ├── config.json + ├── tokenizer.json + ├── tokenizer_config.json + └── onnx/ + └── model_quantized.onnx +``` + +If the local model is absent, the router fails closed and uses deterministic keyword routing. It does not silently download the model unless `HF_ALLOW_REMOTE_MODELS=true` is explicitly set. + +### Supabase + +Supabase is control-plane-only. The migration creates: + +```text +control.swarm_runs +control.swarm_events +control.swarm_checkpoints +``` + +RLS is enabled and no anon/authenticated policies are created. Writes require a server-side service-role key. + +The migration also extends the reviewed dry-run connector outbox targets with: + +```text +openai +anthropic +huggingface +canva +``` + +No connector write becomes automatically approved. + +### Canva + +Canva is used as the visual documentation and operator-manual surface, not as the source of truth. Generated field manuals, architecture maps, and workflow cards must reference the versioned runtime state. Canva content cannot promote a physical build or claim compliance by itself. + +## Setup + +Copy `.env.example` to `.env` and populate only server-side secrets. + +Required for the current application shell: + +```env +APP_ID= +APP_SECRET= +DATABASE_URL= +KIMI_AUTH_URL= +KIMI_OPEN_URL= +``` + +Required for real OpenAI execution: + +```env +OPENAI_API_KEY= +OPENAI_MODEL=gpt-5.4 +OPENAI_SWARM_MAX_WORKERS=3 +``` + +Optional Claude critic: + +```env +ANTHROPIC_API_KEY= +CLAUDE_MODEL=claude-sonnet-4-6 +``` + +Supabase control plane: + +```env +SUPABASE_PROJECT_REF=dxyghtyjndylvfugutsr +SUPABASE_URL=https://dxyghtyjndylvfugutsr.supabase.co +SUPABASE_SERVICE_ROLE_KEY= +``` + +Local Hugging Face routing: + +```env +HF_LOCAL_ROUTER_ENABLED=true +HF_LOCAL_MODEL_PATH= +HF_CACHE_DIR= +HF_EMBEDDING_MODEL=mixedbread-ai/mxbai-embed-xsmall-v1 +HF_ALLOW_REMOTE_MODELS=false +``` + +Never expose `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `SUPABASE_SERVICE_ROLE_KEY` through a `VITE_` variable. + +## Commands + +```bash +npm install +npm run check +npm test +npm run build +npm run db:push +npm run db:seed +npm run dev +``` + +## First verification run + +Use a bounded request: + +```text +Audit MASTERZIP v11. Separate implemented code, placeholders, unsupported claims, and the exact evidence required before VAL-1. +``` + +Expected behavior: + +1. The home screen remains pending while real providers execute. +2. The workspace displays persisted messages rather than animations. +3. OpenAI contributions identify provider and phase. +4. Claude shows `optional` unless a valid API key exists. +5. The Supabase control run contains state events and checksummed checkpoints when the service role is configured. +6. The Hugging Face router either uses the local model or logs a deterministic fallback. +7. The final synthesis preserves blockers and does not claim VAL-1 passed. + +## Remaining boundary + +The UI and agent catalog still use the legacy MySQL/Drizzle data layer. Supabase is now the durable execution control plane, not yet the full application database. That is intentional for the first integration: it avoids an unsafe full rewrite while establishing a clean migration boundary. + +The next database phase should port users, agents, swarms, messages, and tasks to Postgres only after: + +- a complete schema mapping, +- auth strategy replacement, +- RLS design, +- migration rehearsal, +- rollback test, +- and parity verification. diff --git a/mainbrain/okcomputer-swarm/README.md b/mainbrain/okcomputer-swarm/README.md new file mode 100644 index 000000000..f8d1ae1f6 --- /dev/null +++ b/mainbrain/okcomputer-swarm/README.md @@ -0,0 +1,49 @@ +# OKComputer Advanced Swarm AI — Evidence Runtime + +This package fuses the existing React/TypeScript swarm interface with the MASTERZIP v11 engineering state. + +The original project contained a strong interface and data model, but its agent responses were simulated in the browser. This version installs a real execution path: + +- OpenAI Agents SDK orchestration +- strict execution state machine +- Supabase private control-plane events and checkpoints +- optional Claude adversarial critic +- Hugging Face local semantic routing +- persisted provider output in the workspace +- no fabricated latency, success, source, or validation claims + +Start with [INTEGRATION_GUIDE_2026.md](./INTEGRATION_GUIDE_2026.md). + +## Safety boundary + +This software may plan or analyze physical fabrication work. It does not certify a build, approve a sale, replace a qualified engineer, or bypass MASTERZIP validation gates. Unknown physical parameters remain blocked. + +## Development + +```bash +cp .env.example .env +npm install +npm run check +npm test +npm run build +npm run db:push +npm run db:seed +npm run dev +``` + +## Provider status + +- OpenAI: required for real swarm execution. +- Claude: optional critic; requires `ANTHROPIC_API_KEY`. +- Hugging Face: local router; remote loading disabled by default. +- Supabase: control-plane metadata only; requires server-side service role. +- Canva: visual documentation surface; not an engineering source of truth. + +## Verification status + +- Integration-layer TypeScript: passes `tsconfig.integration.json`. +- State machine: valid sequence, invalid transition rejection, and failure transition tested. +- Full dependency installation/build: must be rerun on an internet-connected machine because this execution environment could not resolve `registry.npmjs.org`. +- Supabase control-plane migrations: applied to project `dxyghtyjndylvfugutsr`. +- Claude route: adapter installed; inactive until `ANTHROPIC_API_KEY` is supplied server-side. +- OpenAI route: secure API-key setup flow opened; key must be copied into the server environment, never the browser. diff --git a/mainbrain/okcomputer-swarm/SUPABASE_SWARM_CONTROL_MIGRATION.sql b/mainbrain/okcomputer-swarm/SUPABASE_SWARM_CONTROL_MIGRATION.sql new file mode 100644 index 000000000..64c2e1c3b --- /dev/null +++ b/mainbrain/okcomputer-swarm/SUPABASE_SWARM_CONTROL_MIGRATION.sql @@ -0,0 +1,186 @@ +-- Applied to Supabase project dxyghtyjndylvfugutsr on 2026-07-16. +-- Retained here for local review and reproducibility. + +create schema if not exists control; + +do $$ begin + if exists ( + select 1 from pg_constraint + where conrelid = 'public.connector_outbox'::regclass + and conname = 'connector_outbox_target_check' + ) then + alter table public.connector_outbox + drop constraint connector_outbox_target_check; + end if; +end $$; + +alter table public.connector_outbox + add constraint connector_outbox_target_check + check (target = any (array[ + 'supabase'::text, + 'asana'::text, + 'github'::text, + 'vercel'::text, + 'notion'::text, + 'linear'::text, + 'openai'::text, + 'anthropic'::text, + 'huggingface'::text, + 'canva'::text + ])); + +create table if not exists control.swarm_runs ( + run_id uuid primary key default gen_random_uuid(), + external_swarm_id bigint, + owner_ref text, + query text not null, + provider_plan jsonb not null default '{}'::jsonb, + status text not null default 'created' + check (status in ('created','running','paused','completed','failed')), + current_state text not null default 'INTAKE' + check (current_state in ( + 'INTAKE','PLAN','ROUTE','EXECUTE','CRITIQUE', + 'VALIDATE','PERSIST','COMPLETE','FAILED' + )), + final_summary text, + error_code text, + created_at timestamptz not null default now(), + updated_at timestamptz not null default now(), + completed_at timestamptz +); + +create table if not exists control.swarm_events ( + event_id bigint generated always as identity primary key, + run_id uuid not null references control.swarm_runs(run_id) on delete cascade, + event_type text not null, + agent_slug text, + state text, + payload jsonb not null default '{}'::jsonb, + occurred_at timestamptz not null default now() +); + +create table if not exists control.swarm_checkpoints ( + checkpoint_id bigint generated always as identity primary key, + run_id uuid not null references control.swarm_runs(run_id) on delete cascade, + agent_slug text not null, + sequence_no integer not null, + checksum text not null, + snapshot jsonb not null, + created_at timestamptz not null default now(), + unique (run_id, agent_slug, sequence_no) +); + +create index if not exists idx_swarm_runs_status + on control.swarm_runs(status, updated_at desc); +create index if not exists idx_swarm_events_run + on control.swarm_events(run_id, event_id); +create index if not exists idx_swarm_checkpoints_run + on control.swarm_checkpoints(run_id, sequence_no); + +alter table control.swarm_runs enable row level security; +alter table control.swarm_events enable row level security; +alter table control.swarm_checkpoints enable row level security; + +grant usage on schema control to service_role; +grant all on control.swarm_runs, control.swarm_events, control.swarm_checkpoints + to service_role; +grant usage, select on all sequences in schema control to service_role; + +-- RPC bridge: control schema stays unexposed; only service_role may execute. +create or replace function public.swarm_create_run( + p_external_swarm_id bigint, + p_owner_ref text, + p_query text, + p_provider_plan jsonb +) returns uuid +language plpgsql +security definer +set search_path = control, public, pg_temp +as $$ +declare v_run_id uuid; +begin + insert into control.swarm_runs ( + external_swarm_id, owner_ref, query, provider_plan, status, current_state + ) values ( + p_external_swarm_id, p_owner_ref, p_query, coalesce(p_provider_plan, '{}'::jsonb), 'running', 'INTAKE' + ) returning run_id into v_run_id; + return v_run_id; +end; +$$; + +create or replace function public.swarm_append_event( + p_run_id uuid, + p_event_type text, + p_state text, + p_agent_slug text default null, + p_payload jsonb default '{}'::jsonb +) returns void +language plpgsql +security definer +set search_path = control, public, pg_temp +as $$ +begin + insert into control.swarm_events(run_id, event_type, agent_slug, state, payload) + values (p_run_id, p_event_type, p_agent_slug, p_state, coalesce(p_payload, '{}'::jsonb)); + + update control.swarm_runs + set current_state = p_state, updated_at = now() + where run_id = p_run_id; +end; +$$; + +create or replace function public.swarm_write_checkpoint( + p_run_id uuid, + p_agent_slug text, + p_sequence_no integer, + p_checksum text, + p_snapshot jsonb +) returns void +language plpgsql +security definer +set search_path = control, public, pg_temp +as $$ +begin + insert into control.swarm_checkpoints( + run_id, agent_slug, sequence_no, checksum, snapshot + ) values ( + p_run_id, p_agent_slug, p_sequence_no, p_checksum, p_snapshot + ) + on conflict (run_id, agent_slug, sequence_no) + do update set checksum = excluded.checksum, + snapshot = excluded.snapshot, + created_at = now(); +end; +$$; + +create or replace function public.swarm_complete_run( + p_run_id uuid, + p_final_summary text default null, + p_failed boolean default false, + p_error_code text default null +) returns void +language plpgsql +security definer +set search_path = control, public, pg_temp +as $$ +begin + update control.swarm_runs + set status = case when p_failed then 'failed' else 'completed' end, + current_state = case when p_failed then 'FAILED' else 'COMPLETE' end, + final_summary = p_final_summary, + error_code = p_error_code, + updated_at = now(), + completed_at = now() + where run_id = p_run_id; +end; +$$; + +revoke all on function public.swarm_create_run(bigint,text,text,jsonb) from public, anon, authenticated; +revoke all on function public.swarm_append_event(uuid,text,text,text,jsonb) from public, anon, authenticated; +revoke all on function public.swarm_write_checkpoint(uuid,text,integer,text,jsonb) from public, anon, authenticated; +revoke all on function public.swarm_complete_run(uuid,text,boolean,text) from public, anon, authenticated; + +grant execute on function public.swarm_create_run(bigint,text,text,jsonb) to service_role; +grant execute on function public.swarm_append_event(uuid,text,text,text,jsonb) to service_role; +grant execute on function public.swarm_write_checkpoint(uuid,text,integer,text,jsonb) to service_role; +grant execute on function public.swarm_complete_run(uuid,text,boolean,text) to service_role; diff --git a/mainbrain/okcomputer-swarm/VERIFICATION_REPORT.md b/mainbrain/okcomputer-swarm/VERIFICATION_REPORT.md new file mode 100644 index 000000000..57c1f4f34 --- /dev/null +++ b/mainbrain/okcomputer-swarm/VERIFICATION_REPORT.md @@ -0,0 +1,81 @@ +# OKComputer Swarm Integration — Verification Report + +Date: 2026-07-16 (Asia/Manila) + +## Passed + +1. **Integration-layer TypeScript check** + - Command: `tsc -p tsconfig.integration.json` + - Result: PASS, zero diagnostics. + - Scope: OpenAI orchestration, state machine, Claude critic adapter, Hugging Face local router, Supabase control client, contracts, and provider status. + +2. **State-machine runtime checks** + - Valid sequence reached `COMPLETE`. + - Invalid `INTAKE -> EXECUTE` transition was rejected. + - Failure transition reached `FAILED`. + - Result: `STATE_MACHINE_TESTS_PASS`. + +3. **Modified-source syntax scan** + - TypeScript `transpileModule` scan across the modified API, UI, and seed files. + - Result: `TRANSPILE_SYNTAX_CHECK_PASS`. + +4. **Supabase control-plane migration** + - `add_swarm_control_plane_v1`: applied. + - `add_swarm_control_rpc_v1`: applied. + - RPC smoke test created a temporary run, appended one event, wrote one checkpoint, read back `current_state=PLAN`, then deleted the test run. + - Result: PASS. + +5. **Security corrections** + - Swarm run reads, history, provider status, follow-ups, completion, and agent-status writes now require authentication/ownership. + - Provider secrets remain server-only. + - Supabase `control` tables have RLS and no client policies; service-role-only RPC functions bridge writes without exposing the schema. + - Hugging Face remote model loading defaults to disabled. + +6. **Claude critique integration** + - Claude critique is inserted before OpenAI validation. + - The critique is consumed by both validator and final synthesizer. + - Missing Claude credentials are treated as an optional unavailable route, not fabricated success. + +## Correctly blocked / not claimed + +1. **Full `npm install` and production build** + - The execution environment could not resolve `registry.npmjs.org` (`EAI_AGAIN`). + - The uploaded dependency cache was incomplete and did not contain the new AI SDKs or a runnable Vite binary. + - Therefore no full-build success is claimed. + +2. **Live OpenAI execution** + - The secure OpenAI API-key setup flow was opened. + - A raw key was not exposed to this chat or written into the package. + - Live execution requires `OPENAI_API_KEY` in the server environment. + +3. **Live Claude execution** + - Gmail evidence indicates an Anthropic/Claude API relationship, but no usable API credential was accessible. + - The adapter is installed but remains inactive until `ANTHROPIC_API_KEY` is provided server-side. + +4. **Hugging Face inference** + - The local router follows the official Transformers.js local-cache pattern. + - No model binaries were downloaded, consistent with the local-only storage rule. + - A live inference test requires the selected model under `HF_LOCAL_MODEL_PATH`. + +5. **MASTERZIP physical validation** + - Software integration does not advance the engineering project beyond VAL-0. + - NEXT-001 geometry and hardware evidence is still required before VAL-1. + - No physical build, safety, compliance, or sale claim is certified by this package. + +## Exact connected-machine verification + +```bash +cp .env.example .env +# Add server-side credentials only. +npm install +npm run check +npm test +npm run build +npm run db:push +npm run db:seed +npm run dev +``` + +First real swarm request: + +> Audit MASTERZIP v11. Separate implemented code, placeholders, unsupported claims, and the exact evidence required before VAL-1. diff --git a/mainbrain/okcomputer-swarm/api/admin-router.ts b/mainbrain/okcomputer-swarm/api/admin-router.ts new file mode 100644 index 000000000..406d7d1ba --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/admin-router.ts @@ -0,0 +1,117 @@ +import { z } from "zod"; +import { createRouter, adminQuery } from "./middleware"; +import { getDb } from "./queries/connection"; +import { users, agents, swarms, messages, tasks } from "@db/schema"; +import { eq, desc, sql, count } from "drizzle-orm"; + +export const adminRouter = createRouter({ + dashboard: adminQuery.query(async () => { + const db = getDb(); + + const [userStats] = await db + .select({ + totalUsers: count(), + adminUsers: sql`sum(case when ${users.role} = 'admin' then 1 else 0 end)`, + newUsersToday: sql`sum(case when date(${users.createdAt}) = curdate() then 1 else 0 end)`, + }) + .from(users); + + const [swarmStats] = await db + .select({ + totalSwarms: count(), + runningSwarms: sql`sum(case when ${swarms.status} = 'running' then 1 else 0 end)`, + completedSwarms: sql`sum(case when ${swarms.status} = 'completed' then 1 else 0 end)`, + }) + .from(swarms); + + const [messageStats] = await db + .select({ + totalMessages: count(), + userMessages: sql`sum(case when ${messages.role} = 'user' then 1 else 0 end)`, + agentMessages: sql`sum(case when ${messages.role} = 'agent' then 1 else 0 end)`, + }) + .from(messages); + + const [taskStats] = await db + .select({ + totalTasks: count(), + completedTasks: sql`sum(case when ${tasks.status} = 'completed' then 1 else 0 end)`, + failedTasks: sql`sum(case when ${tasks.status} = 'failed' then 1 else 0 end)`, + }) + .from(tasks); + + const agentList = await db + .select({ + id: agents.id, + name: agents.name, + slug: agents.slug, + status: agents.status, + totalTasks: agents.totalTasks, + successRate: agents.successRate, + avgLatency: agents.avgLatency, + specialty: agents.specialty, + }) + .from(agents) + .orderBy(desc(agents.totalTasks)); + + return { + users: userStats, + swarms: swarmStats, + messages: messageStats, + tasks: taskStats, + agents: agentList, + }; + }), + + users: adminQuery + .input( + z + .object({ + page: z.number().default(1), + limit: z.number().default(20), + }) + .optional() + ) + .query(async ({ input }) => { + const db = getDb(); + const page = input?.page ?? 1; + const limit = input?.limit ?? 20; + const offset = (page - 1) * limit; + + const userList = await db + .select() + .from(users) + .orderBy(desc(users.createdAt)) + .limit(limit) + .offset(offset); + + const [total] = await db.select({ count: count() }).from(users); + + return { users: userList, total: total.count }; + }), + + swarms: adminQuery.query(async () => { + const db = getDb(); + return db + .select() + .from(swarms) + .orderBy(desc(swarms.createdAt)) + .limit(100); + }), + + updateUserRole: adminQuery + .input( + z.object({ + userId: z.number(), + role: z.enum(["user", "admin"]), + }) + ) + .mutation(async ({ input }) => { + const db = getDb(); + await db + .update(users) + .set({ role: input.role }) + .where(eq(users.id, input.userId)); + return { ok: true }; + }), +}); diff --git a/mainbrain/okcomputer-swarm/api/agent-router.ts b/mainbrain/okcomputer-swarm/api/agent-router.ts new file mode 100644 index 000000000..9fe2ee4e1 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/agent-router.ts @@ -0,0 +1,553 @@ +import { z } from "zod"; +import { createRouter, publicQuery, authedQuery } from "./middleware"; +import { getDb } from "./queries/connection"; +import { agents, swarms, swarmAgents, messages, tasks } from "@db/schema"; +import { and, eq, desc, sql, inArray } from "drizzle-orm"; +import { executeSwarmRun } from "./ai/execute-swarm"; +import { getProviderStatus } from "./ai/provider-status"; +import type { SwarmExecutionResult } from "./ai/contracts"; + +export const agentRouter = createRouter({ + list: publicQuery.query(async () => { + const db = getDb(); + return db.select().from(agents).orderBy(agents.name); + }), + + getBySlug: publicQuery + .input(z.object({ slug: z.string() })) + .query(async ({ input }) => { + const db = getDb(); + const [agent] = await db + .select() + .from(agents) + .where(eq(agents.slug, input.slug)) + .limit(1); + return agent ?? null; + }), + + providerStatus: authedQuery.query(() => getProviderStatus()), + + getStats: publicQuery.query(async () => { + const db = getDb(); + const [agentStats] = await db + .select({ + totalAgents: sql`count(*)`, + activeAgents: sql`sum(case when ${agents.status} = 'active' then 1 else 0 end)`, + totalTasks: sql`sum(${agents.totalTasks})`, + avgSuccessRate: sql`avg(${agents.successRate})`, + }) + .from(agents); + return agentStats; + }), + + orchestrate: authedQuery + .input(z.object({ query: z.string().min(1).max(12000) })) + .mutation(async ({ input, ctx }) => { + const db = getDb(); + const userId = ctx.user.id; + + const allAgents = await db.select().from(agents); + const selectedAgents = selectAgentsForQuery(input.query, allAgents); + + const [swarm] = await db + .insert(swarms) + .values({ + name: `Swarm: ${input.query.slice(0, 60)}`, + query: input.query, + status: "running", + agentCount: selectedAgents.length, + userId, + metadata: { + executionMode: "real-provider-run", + createdBy: "openai-agents-sdk", + }, + }) + .$returningId(); + + const swarmId = Number(swarm.id); + + for (let i = 0; i < selectedAgents.length; i += 1) { + const agent = selectedAgents[i]; + await db.insert(swarmAgents).values({ + swarmId, + agentId: agent.id, + role: + agent.slug === "planner" + ? "orchestrator" + : agent.slug === "validator" + ? "validator" + : "worker", + status: agent.slug === "planner" ? "active" : "waiting", + }); + } + + await db.insert(messages).values({ + swarmId, + role: "user", + content: input.query, + }); + + try { + const execution = await executeSwarmRun({ + query: input.query, + externalSwarmId: swarmId, + ownerRef: String(userId), + }); + + await persistExecution({ + swarmId, + execution, + allAgents, + }); + + return { + swarmId, + agents: selectedAgents, + execution: { + selectedRoles: execution.selectedRoles, + providerStatus: execution.providerStatus, + controlRunId: execution.controlRunId, + }, + }; + } catch (error) { + const message = + error instanceof Error ? error.message : "Unknown swarm error"; + + await db.insert(messages).values({ + swarmId, + role: "system", + content: `Execution failed safely: ${message}`, + reasoning: "Provider failure was persisted; no result was fabricated.", + }); + + await db + .update(swarms) + .set({ + status: "failed", + summary: message, + completedAt: new Date(), + metadata: { + executionMode: "real-provider-run", + failure: message, + providerStatus: getProviderStatus(), + }, + }) + .where(eq(swarms.id, swarmId)); + + throw new Error(message); + } + }), + + getSwarm: authedQuery + .input(z.object({ id: z.number() })) + .query(async ({ input, ctx }) => { + const db = getDb(); + const [swarm] = await db + .select() + .from(swarms) + .where(and(eq(swarms.id, input.id), eq(swarms.userId, ctx.user.id))) + .limit(1); + + if (!swarm) return null; + + const swarmAgentList = await db + .select() + .from(swarmAgents) + .where(eq(swarmAgents.swarmId, input.id)); + + const agentIds = swarmAgentList.map((sa) => sa.agentId); + const agentDetails = + agentIds.length > 0 + ? await db.select().from(agents).where(inArray(agents.id, agentIds)) + : []; + + const messageList = await db + .select() + .from(messages) + .where(eq(messages.swarmId, input.id)) + .orderBy(messages.createdAt); + + const taskList = await db + .select() + .from(tasks) + .where(eq(tasks.swarmId, input.id)) + .orderBy(tasks.createdAt); + + return { + ...swarm, + agents: swarmAgentList.map((sa) => ({ + ...sa, + agent: agentDetails.find((agent) => agent.id === sa.agentId), + })), + messages: messageList, + tasks: taskList, + }; + }), + + addMessage: authedQuery + .input( + z.object({ + swarmId: z.number(), + agentId: z.number().optional(), + role: z.enum(["user", "agent", "system"]), + content: z.string().min(1).max(12000), + sources: z + .array( + z.object({ + title: z.string(), + url: z.string(), + snippet: z.string(), + }), + ) + .optional(), + reasoning: z.string().optional(), + tokens: z.number().optional(), + latency: z.number().optional(), + }), + ) + .mutation(async ({ input, ctx }) => { + const db = getDb(); + const [ownedSwarm] = await db + .select() + .from(swarms) + .where( + and( + eq(swarms.id, input.swarmId), + eq(swarms.userId, ctx.user.id), + ), + ) + .limit(1); + if (!ownedSwarm) throw new Error("Swarm not found"); + + const [msg] = await db + .insert(messages) + .values({ + swarmId: input.swarmId, + agentId: input.agentId, + role: input.role, + content: input.content, + sources: input.sources, + reasoning: input.reasoning, + tokens: input.tokens ?? 0, + latency: input.latency ?? 0, + }) + .$returningId(); + + if (input.role !== "user") return { id: Number(msg.id) }; + + const prior = await db + .select() + .from(messages) + .where(eq(messages.swarmId, input.swarmId)) + .orderBy(desc(messages.createdAt)) + .limit(10); + + await db + .update(swarms) + .set({ status: "running", completedAt: null }) + .where(eq(swarms.id, input.swarmId)); + + try { + const execution = await executeSwarmRun({ + query: input.content, + externalSwarmId: input.swarmId, + ownerRef: String(ctx.user.id), + priorContext: prior + .reverse() + .map((item) => `${item.role}: ${item.content}`) + .join("\n") + .slice(-12000), + }); + const allAgents = await db.select().from(agents); + await persistExecution({ + swarmId: input.swarmId, + execution, + allAgents, + }); + } catch (error) { + const message = + error instanceof Error ? error.message : "Unknown follow-up error"; + await db.insert(messages).values({ + swarmId: input.swarmId, + role: "system", + content: `Follow-up failed safely: ${message}`, + }); + await db + .update(swarms) + .set({ + status: "failed", + summary: message, + completedAt: new Date(), + }) + .where(eq(swarms.id, input.swarmId)); + } + + return { id: Number(msg.id) }; + }), + + completeSwarm: authedQuery + .input( + z.object({ + swarmId: z.number(), + summary: z.string(), + }), + ) + .mutation(async ({ input, ctx }) => { + const db = getDb(); + await db + .update(swarms) + .set({ + status: "completed", + summary: input.summary, + completedAt: new Date(), + }) + .where( + and( + eq(swarms.id, input.swarmId), + eq(swarms.userId, ctx.user.id), + ), + ); + return { ok: true }; + }), + + updateAgentStatus: authedQuery + .input( + z.object({ + swarmAgentId: z.number(), + status: z.enum(["active", "completed", "failed", "waiting"]), + contribution: z.string().optional(), + }), + ) + .mutation(async ({ input, ctx }) => { + const db = getDb(); + const [membership] = await db + .select() + .from(swarmAgents) + .where(eq(swarmAgents.id, input.swarmAgentId)) + .limit(1); + if (!membership) throw new Error("Swarm agent not found"); + + const [ownedSwarm] = await db + .select() + .from(swarms) + .where( + and( + eq(swarms.id, membership.swarmId), + eq(swarms.userId, ctx.user.id), + ), + ) + .limit(1); + if (!ownedSwarm) throw new Error("Swarm agent not found"); + + const update: Record = { status: input.status }; + if (input.contribution) update.contribution = input.contribution; + if (input.status === "completed" || input.status === "failed") { + update.completedAt = new Date(); + } + await db + .update(swarmAgents) + .set(update) + .where(eq(swarmAgents.id, input.swarmAgentId)); + return { ok: true }; + }), + + listSwarms: authedQuery.query(async ({ ctx }) => { + const db = getDb(); + return db + .select() + .from(swarms) + .where(eq(swarms.userId, ctx.user.id)) + .orderBy(desc(swarms.createdAt)); + }), + + history: authedQuery.query(async ({ ctx }) => { + const db = getDb(); + const swarmList = await db + .select() + .from(swarms) + .where( + and( + eq(swarms.status, "completed"), + eq(swarms.userId, ctx.user.id), + ), + ) + .orderBy(desc(swarms.createdAt)) + .limit(50); + + const result = []; + for (const swarm of swarmList) { + const swarmAgentList = await db + .select() + .from(swarmAgents) + .where(eq(swarmAgents.swarmId, swarm.id)); + const agentIds = swarmAgentList.map((sa) => sa.agentId); + const agentDetails = + agentIds.length > 0 + ? await db.select().from(agents).where(inArray(agents.id, agentIds)) + : []; + const messageList = await db + .select() + .from(messages) + .where(eq(messages.swarmId, swarm.id)) + .orderBy(messages.createdAt); + + result.push({ + ...swarm, + agents: agentDetails, + messageCount: messageList.length, + }); + } + return result; + }), +}); + +async function persistExecution(input: { + swarmId: number; + execution: SwarmExecutionResult; + allAgents: Array<{ + id: number; + slug: string; + }>; +}) { + const db = getDb(); + const requiredSlugs = new Set([ + "planner", + "validator", + "synthesizer", + ...input.execution.selectedRoles, + ]); + + for (const slug of requiredSlugs) { + const agent = input.allAgents.find((candidate) => candidate.slug === slug); + if (!agent) continue; + const [existing] = await db + .select() + .from(swarmAgents) + .where( + and( + eq(swarmAgents.swarmId, input.swarmId), + eq(swarmAgents.agentId, agent.id), + ), + ) + .limit(1); + if (!existing) { + await db.insert(swarmAgents).values({ + swarmId: input.swarmId, + agentId: agent.id, + role: + slug === "planner" + ? "orchestrator" + : slug === "validator" + ? "validator" + : "worker", + status: "waiting", + }); + } + } + + for (const contribution of input.execution.contributions) { + const matched = + input.allAgents.find((agent) => agent.slug === contribution.slug) ?? + input.allAgents.find((agent) => + contribution.slug === "claude-critic" + ? agent.slug === "validator" + : agent.slug === "synthesizer", + ); + + await db.insert(messages).values({ + swarmId: input.swarmId, + agentId: matched?.id, + role: "agent", + content: + contribution.slug === "claude-critic" + ? `[Claude critic]\n${contribution.content}` + : contribution.content, + reasoning: JSON.stringify({ + provider: contribution.provider, + phase: contribution.phase, + trace: "decision-summary-only", + }), + latency: contribution.latencyMs, + }); + + if (matched) { + await db + .update(swarmAgents) + .set({ + status: "completed", + contribution: contribution.content.slice(0, 4000), + completedAt: new Date(), + }) + .where( + sql`${swarmAgents.swarmId} = ${input.swarmId} and ${swarmAgents.agentId} = ${matched.id}`, + ); + } + } + + await db + .update(swarms) + .set({ + status: "completed", + summary: input.execution.finalOutput, + completedAt: new Date(), + metadata: { + executionMode: "real-provider-run", + selectedRoles: input.execution.selectedRoles, + providerStatus: input.execution.providerStatus, + controlRunId: input.execution.controlRunId, + validationSummary: input.execution.validationSummary.slice(0, 4000), + }, + }) + .where(eq(swarms.id, input.swarmId)); +} + +function selectAgentsForQuery( + query: string, + allAgents: Array<{ + id: number; + name: string; + slug: string; + specialty: string | null; + capabilities: string[] | null; + }>, +) { + const q = query.toLowerCase(); + const scores = allAgents.map((agent) => { + let score = 0; + const caps = (agent.capabilities ?? []).join(" ").toLowerCase(); + + if (/(code|program|debug|function|api|integrat|database)/.test(q)) { + if (agent.slug === "coder") score += 10; + } + if (/(analy|data|statistics|trend|risk|architecture)/.test(q)) { + if (agent.slug === "analyst") score += 10; + } + if (/(research|find|search|information|source|guide)/.test(q)) { + if (agent.slug === "researcher") score += 10; + } + if (/(write|create|design|story|canva|visual)/.test(q)) { + if (agent.slug === "creative") score += 10; + } + if (/(check|verify|validate|fact|safety|compliance)/.test(q)) { + if (agent.slug === "validator") score += 10; + } + if (/(plan|organize|schedule|task|workflow)/.test(q)) { + if (agent.slug === "planner") score += 10; + } + + if (agent.slug === "planner") score += 7; + if (agent.slug === "validator") score += 7; + if (agent.slug === "synthesizer") score += 6; + if (agent.slug === "memory") score += 2; + + if (caps.includes("search") && /(find|look up|research)/.test(q)) score += 3; + if (caps.includes("analysis") && /(analy|compare)/.test(q)) score += 3; + + return { agent, score }; + }); + + scores.sort((a, b) => b.score - a.score); + const positive = scores.filter((entry) => entry.score > 0); + const count = Math.min(Math.max(4, positive.length), 7); + return scores.slice(0, count).map((entry) => entry.agent); +} diff --git a/mainbrain/okcomputer-swarm/api/ai/claude-critic.ts b/mainbrain/okcomputer-swarm/api/ai/claude-critic.ts new file mode 100644 index 000000000..7030ed37b --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/ai/claude-critic.ts @@ -0,0 +1,74 @@ +import OpenAI from "openai"; + +export type ClaudeCriticResult = { + configured: boolean; + critique?: string; + model: string; + latencyMs?: number; + error?: string; +}; + +export async function runClaudeCritic( + query: string, + candidateOutput: string, +): Promise { + const model = process.env.CLAUDE_MODEL ?? "claude-sonnet-4-6"; + const apiKey = process.env.ANTHROPIC_API_KEY; + + if (!apiKey) { + return { + configured: false, + model, + error: + "ANTHROPIC_API_KEY is not configured. Claude route remains installed but inactive.", + }; + } + + const startedAt = Date.now(); + try { + // Anthropic's official OpenAI SDK compatibility endpoint. + // This is intentionally a secondary critic path, not the production orchestrator. + const client = new OpenAI({ + apiKey, + baseURL: "https://api.anthropic.com/v1/", + }); + + const response = await client.chat.completions.create({ + model, + max_tokens: 1400, + messages: [ + { + role: "system", + content: + "You are a hostile but fair engineering reviewer. Return only actionable defects, unsupported claims, missing tests, unsafe assumptions, and a concise accept/revise verdict. Do not reveal hidden reasoning.", + }, + { + role: "user", + content: [ + "ORIGINAL REQUEST:", + query, + "", + "CANDIDATE SWARM OUTPUT:", + candidateOutput, + ].join("\n"), + }, + ], + }); + + return { + configured: true, + model, + latencyMs: Date.now() - startedAt, + critique: + response.choices[0]?.message?.content?.trim() || + "Claude critic returned no text.", + }; + } catch (error) { + return { + configured: true, + model, + latencyMs: Date.now() - startedAt, + error: error instanceof Error ? error.message : String(error), + }; + } +} diff --git a/mainbrain/okcomputer-swarm/api/ai/contracts.ts b/mainbrain/okcomputer-swarm/api/ai/contracts.ts new file mode 100644 index 000000000..40fe63d87 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/ai/contracts.ts @@ -0,0 +1,63 @@ +export const SWARM_STATES = [ + "INTAKE", + "PLAN", + "ROUTE", + "EXECUTE", + "CRITIQUE", + "VALIDATE", + "PERSIST", + "COMPLETE", + "FAILED", +] as const; + +export type SwarmState = (typeof SWARM_STATES)[number]; + +export type ProviderName = "openai" | "anthropic" | "huggingface-local"; + +export type AgentContribution = { + slug: string; + content: string; + provider: ProviderName; + phase: SwarmState; + latencyMs: number; +}; + +export type ProviderStatus = { + openai: { + configured: boolean; + model: string; + }; + anthropic: { + configured: boolean; + model: string; + mode: "openai-sdk-compatibility"; + }; + huggingface: { + enabled: boolean; + model: string; + localModelPath: string; + remoteModelsAllowed: boolean; + }; + supabase: { + configured: boolean; + projectRef: string; + role: "control-plane-only"; + }; +}; + +export type SwarmExecutionInput = { + query: string; + externalSwarmId?: number; + ownerRef?: string; + priorContext?: string; +}; + +export type SwarmExecutionResult = { + finalOutput: string; + contributions: AgentContribution[]; + selectedRoles: string[]; + providerStatus: ProviderStatus; + controlRunId?: string; + validationSummary: string; + claudeCritique?: string; +}; diff --git a/mainbrain/okcomputer-swarm/api/ai/execute-swarm.ts b/mainbrain/okcomputer-swarm/api/ai/execute-swarm.ts new file mode 100644 index 000000000..7f639bc53 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/ai/execute-swarm.ts @@ -0,0 +1,199 @@ +import type { + AgentContribution, + SwarmExecutionInput, + SwarmExecutionResult, +} from "./contracts"; +import { SwarmStateMachine } from "./state-machine"; +import { getProviderStatus } from "./provider-status"; +import { + runOpenAIPlanner, + runOpenAISynthesizer, + runOpenAIValidator, + runOpenAIWorkers, + selectOpenAIWorkerRoles, +} from "./openai-swarm"; +import { runClaudeCritic } from "./claude-critic"; +import { + appendControlEvent, + completeControlRun, + createControlRun, + writeCheckpoint, +} from "./supabase-control"; + +export async function executeSwarmRun( + input: SwarmExecutionInput, +): Promise { + const machine = new SwarmStateMachine(); + const providerStatus = getProviderStatus(); + const contributions: AgentContribution[] = []; + let controlRunId: string | undefined; + + try { + controlRunId = await createControlRun({ + externalSwarmId: input.externalSwarmId, + ownerRef: input.ownerRef, + query: input.query, + providerStatus, + }); + + await appendControlEvent({ + runId: controlRunId, + eventType: "run_created", + state: machine.state, + payload: { externalSwarmId: input.externalSwarmId, providers: providerStatus }, + }); + + machine.transition("PLAN"); + await appendControlEvent({ + runId: controlRunId, + eventType: "planning_started", + state: machine.state, + }); + const plan = await runOpenAIPlanner({ + query: input.query, + priorContext: input.priorContext, + }); + contributions.push(plan); + await writeCheckpoint({ + runId: controlRunId, + agentSlug: "planner", + sequenceNo: 1, + snapshot: { plan: plan.content }, + }); + + machine.transition("ROUTE"); + const selectedRoles = await selectOpenAIWorkerRoles(input.query); + await appendControlEvent({ + runId: controlRunId, + eventType: "roles_selected", + state: machine.state, + payload: { selectedRoles }, + }); + + machine.transition("EXECUTE"); + const workers = await runOpenAIWorkers({ + query: input.query, + plan, + selectedRoles, + priorContext: input.priorContext, + }); + for (const worker of workers) { + contributions.push(worker); + await appendControlEvent({ + runId: controlRunId, + eventType: "agent_completed", + state: machine.state, + agentSlug: worker.slug, + payload: { provider: worker.provider, latencyMs: worker.latencyMs }, + }); + await writeCheckpoint({ + runId: controlRunId, + agentSlug: worker.slug, + sequenceNo: 1, + snapshot: { content: worker.content }, + }); + } + + machine.transition("CRITIQUE"); + const draftForCritique = [ + plan.content, + ...workers.map((worker) => worker.content), + ].join("\n\n"); + const claude = await runClaudeCritic(input.query, draftForCritique); + const claudeCritique = claude.critique; + if (claudeCritique) { + contributions.push({ + slug: "claude-critic", + provider: "anthropic", + phase: "CRITIQUE", + latencyMs: claude.latencyMs ?? 0, + content: claudeCritique, + }); + } + await appendControlEvent({ + runId: controlRunId, + eventType: claude.configured + ? claude.error + ? "claude_critic_failed" + : "claude_critic_completed" + : "claude_critic_unconfigured", + state: machine.state, + agentSlug: "claude-critic", + payload: { model: claude.model, error: claude.error, latencyMs: claude.latencyMs }, + }); + + machine.transition("VALIDATE"); + const validator = await runOpenAIValidator({ + query: input.query, + plan, + workers, + externalCritique: claudeCritique, + }); + contributions.push(validator); + await appendControlEvent({ + runId: controlRunId, + eventType: "validation_completed", + state: machine.state, + agentSlug: "validator", + payload: { latencyMs: validator.latencyMs }, + }); + + machine.transition("PERSIST"); + const synthesizer = await runOpenAISynthesizer({ + query: input.query, + plan, + workers, + validator, + externalCritique: claudeCritique, + }); + contributions.push(synthesizer); + await writeCheckpoint({ + runId: controlRunId, + agentSlug: "synthesizer", + sequenceNo: 1, + snapshot: { finalOutput: synthesizer.content, validation: validator.content }, + }); + + machine.transition("COMPLETE"); + await appendControlEvent({ + runId: controlRunId, + eventType: "run_completed", + state: machine.state, + agentSlug: "synthesizer", + payload: { contributionCount: contributions.length }, + }); + await completeControlRun({ + runId: controlRunId, + finalSummary: synthesizer.content.slice(0, 4000), + }); + + return { + finalOutput: synthesizer.content, + validationSummary: validator.content, + contributions, + selectedRoles, + providerStatus, + controlRunId, + claudeCritique, + }; + } catch (error) { + machine.fail(); + const message = error instanceof Error ? error.message : String(error); + try { + await appendControlEvent({ + runId: controlRunId, + eventType: "run_failed", + state: machine.state, + payload: { error: message }, + }); + await completeControlRun({ + runId: controlRunId, + failed: true, + errorCode: message.slice(0, 500), + }); + } catch (controlError) { + console.error("Failed to persist swarm failure state", controlError); + } + throw error; + } +} diff --git a/mainbrain/okcomputer-swarm/api/ai/hf-local-router.ts b/mainbrain/okcomputer-swarm/api/ai/hf-local-router.ts new file mode 100644 index 000000000..dddf77b8d --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/ai/hf-local-router.ts @@ -0,0 +1,107 @@ +import path from "node:path"; +import { ROLE_DESCRIPTIONS } from "./project-context"; +import { defaultHfRoot } from "./provider-status"; + +type RankedRole = { + slug: string; + score: number; +}; + +let extractorPromise: Promise | undefined; + +async function getExtractor(): Promise { + if (!extractorPromise) { + extractorPromise = (async () => { + const { env, pipeline } = await import("@huggingface/transformers"); + env.allowRemoteModels = process.env.HF_ALLOW_REMOTE_MODELS === "true"; + env.localModelPath = defaultHfRoot(); + env.cacheDir = + process.env.HF_CACHE_DIR ?? path.join(defaultHfRoot(), ".cache"); + + const model = + process.env.HF_EMBEDDING_MODEL ?? + "mixedbread-ai/mxbai-embed-xsmall-v1"; + + return pipeline("feature-extraction", model); + })(); + } + return extractorPromise; +} + +function dot(a: number[], b: number[]): number { + let value = 0; + const size = Math.min(a.length, b.length); + for (let i = 0; i < size; i += 1) value += a[i] * b[i]; + return value; +} + +export async function rankRolesLocally( + query: string, + limit = 3, +): Promise { + if (process.env.HF_LOCAL_ROUTER_ENABLED === "false") return null; + + try { + const extractor = await getExtractor(); + const texts = [ + query, + ...ROLE_DESCRIPTIONS.map( + (role) => `${role.slug}: ${role.description}`, + ), + ]; + const tensor = await extractor(texts, { + pooling: "mean", + normalize: true, + }); + const vectors = tensor.tolist() as number[][]; + const queryVector = vectors[0]; + + return ROLE_DESCRIPTIONS.map((role, index) => ({ + slug: role.slug, + score: dot(queryVector, vectors[index + 1]), + })) + .sort((a, b) => b.score - a.score) + .slice(0, limit); + } catch (error) { + console.warn( + "Hugging Face local semantic router unavailable; using deterministic fallback.", + error instanceof Error ? error.message : error, + ); + return null; + } +} + +export function rankRolesByKeywords(query: string, limit = 3): RankedRole[] { + const q = query.toLowerCase(); + const score: Record = { + planner: 4, + validator: 4, + synthesizer: 3, + researcher: 0, + analyst: 0, + coder: 0, + creative: 0, + memory: 0, + }; + + if (/(code|api|typescript|react|debug|build|integrat|database)/.test(q)) { + score.coder += 10; + } + if (/(research|search|source|paper|guide|documentation)/.test(q)) { + score.researcher += 10; + } + if (/(analy|compare|risk|metric|cost|score|architecture)/.test(q)) { + score.analyst += 9; + } + if (/(design|visual|canva|creative|brand)/.test(q)) { + score.creative += 7; + } + if (/(history|memory|previous|context|canonical)/.test(q)) { + score.memory += 7; + } + + return Object.entries(score) + .map(([slug, value]) => ({ slug, score: value })) + .sort((a, b) => b.score - a.score) + .slice(0, limit); +} diff --git a/mainbrain/okcomputer-swarm/api/ai/openai-swarm.ts b/mainbrain/okcomputer-swarm/api/ai/openai-swarm.ts new file mode 100644 index 000000000..775144450 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/ai/openai-swarm.ts @@ -0,0 +1,215 @@ +import { Agent, run, tool } from "@openai/agents"; +import { z } from "zod"; +import type { AgentContribution } from "./contracts"; +import { MASTERZIP_CONTEXT, ROLE_INSTRUCTIONS } from "./project-context"; +import { rankRolesByKeywords, rankRolesLocally } from "./hf-local-router"; + +const model = process.env.OPENAI_MODEL ?? "gpt-5.4"; + +const projectStateTool = tool({ + name: "get_project_validation_state", + description: + "Return the canonical MASTERZIP project state, validation gate, and non-negotiable controls.", + parameters: z.object({ reason: z.string().min(1).max(300) }), + async execute() { + return MASTERZIP_CONTEXT; + }, +}); + +const approvalGateTool = tool({ + name: "classify_action_gate", + description: + "Classify a proposed action as analysis-only, reversible write, external side effect, physical build, or sale/compliance action.", + parameters: z.object({ action: z.string().min(1).max(500) }), + async execute({ action }: { action: string }) { + const lower = action.toLowerCase(); + if (/(sell|sale|certif|deploy outdoor|power tool|cut|drill|weld)/.test(lower)) { + return { + gate: "HUMAN_APPROVAL_AND_EVIDENCE_REQUIRED", + reason: + "Physical, sale, or compliance-affecting actions cannot be auto-approved.", + }; + } + if (/(send|publish|delete|purchase|pay|merge|deploy)/.test(lower)) { + return { + gate: "HUMAN_APPROVAL_REQUIRED", + reason: "External or destructive side effect.", + }; + } + return { gate: "ANALYSIS_ALLOWED", reason: "Read-only planning or reversible draft." }; + }, +}); + +function assertOpenAIConfigured(): void { + if (!process.env.OPENAI_API_KEY) { + throw new Error( + "OPENAI_API_KEY is not configured. Use the secure OpenAI Platform setup flow, then place the key in the server environment.", + ); + } +} + +function createAgent(slug: string): Agent { + return new Agent({ + name: slug.charAt(0).toUpperCase() + slug.slice(1), + model, + instructions: [ + ROLE_INSTRUCTIONS[slug] ?? ROLE_INSTRUCTIONS.synthesizer, + "Never claim that code ran, a connector succeeded, a physical test passed, or evidence exists unless supplied context proves it.", + "Do not output private chain-of-thought. Return decisions, evidence, assumptions, uncertainties, and concise verification notes.", + MASTERZIP_CONTEXT, + ].join("\n\n"), + tools: + slug === "planner" || slug === "validator" + ? [projectStateTool, approvalGateTool] + : [projectStateTool], + }); +} + +function outputText(value: unknown): string { + if (typeof value === "string") return value.trim(); + if (value === null || value === undefined) return ""; + return JSON.stringify(value, null, 2); +} + +async function executeAgent( + slug: string, + prompt: string, + phase: AgentContribution["phase"], +): Promise { + assertOpenAIConfigured(); + const startedAt = Date.now(); + const result = await run(createAgent(slug), prompt); + return { + slug, + provider: "openai", + phase, + latencyMs: Date.now() - startedAt, + content: outputText(result.finalOutput), + }; +} + +export async function runOpenAIPlanner(input: { + query: string; + priorContext?: string; +}): Promise { + return executeAgent( + "planner", + [ + "Create the smallest complete execution plan for this request.", + "Use explicit states and approval gates.", + "REQUEST:", + input.query, + input.priorContext ? `PRIOR CONTEXT:\n${input.priorContext}` : "", + ] + .filter(Boolean) + .join("\n\n"), + "PLAN", + ); +} + +export async function selectOpenAIWorkerRoles( + query: string, +): Promise { + const workerLimit = Math.max( + 1, + Math.min(4, Number(process.env.OPENAI_SWARM_MAX_WORKERS ?? "3")), + ); + const semanticRoles = await rankRolesLocally(query, workerLimit); + const fallbackRoles = rankRolesByKeywords(query, workerLimit); + const selected = (semanticRoles ?? fallbackRoles) + .map((entry) => entry.slug) + .filter((slug) => !["planner", "validator", "synthesizer"].includes(slug)); + + return selected.length > 0 ? selected : ["coder", "analyst"]; +} + +export async function runOpenAIWorkers(input: { + query: string; + plan: AgentContribution; + selectedRoles: string[]; + priorContext?: string; +}): Promise { + return Promise.all( + input.selectedRoles.map((slug) => + executeAgent( + slug, + [ + `You own the ${slug} workstream.`, + "Produce a bounded contribution that the validator can audit.", + "REQUEST:", + input.query, + "PLAN:", + input.plan.content, + input.priorContext ? `PRIOR CONTEXT:\n${input.priorContext}` : "", + ] + .filter(Boolean) + .join("\n\n"), + "EXECUTE", + ), + ), + ); +} + +export async function runOpenAIValidator(input: { + query: string; + plan: AgentContribution; + workers: AgentContribution[]; + externalCritique?: string; +}): Promise { + const combinedWorkers = input.workers + .map((worker) => `### ${worker.slug}\n${worker.content}`) + .join("\n\n"); + + return executeAgent( + "validator", + [ + "Audit the plan, worker outputs, and any cross-provider critique.", + "List blocking defects first. Mark unsupported claims and false completion signals.", + "Return a concise verdict: ACCEPT, ACCEPT_WITH_BLOCKS, or REVISE.", + "REQUEST:", + input.query, + "PLAN:", + input.plan.content, + "WORKER OUTPUTS:", + combinedWorkers, + input.externalCritique + ? `EXTERNAL CLAUDE CRITIQUE:\n${input.externalCritique}` + : "EXTERNAL CLAUDE CRITIQUE: not configured; do not treat this as a failure.", + ].join("\n\n"), + "VALIDATE", + ); +} + +export async function runOpenAISynthesizer(input: { + query: string; + plan: AgentContribution; + workers: AgentContribution[]; + validator: AgentContribution; + externalCritique?: string; +}): Promise { + const combinedWorkers = input.workers + .map((worker) => `### ${worker.slug}\n${worker.content}`) + .join("\n\n"); + + return executeAgent( + "synthesizer", + [ + "Produce the final user-facing result.", + "Lead with the five highest-signal decisions or changes.", + "Preserve blockers, validation limits, and unresolved critic findings.", + "End with the exact next executable action.", + "REQUEST:", + input.query, + "PLAN:", + input.plan.content, + "WORKER OUTPUTS:", + combinedWorkers, + input.externalCritique + ? `EXTERNAL CLAUDE CRITIQUE:\n${input.externalCritique}` + : "EXTERNAL CLAUDE CRITIQUE: unavailable.", + "VALIDATOR:", + input.validator.content, + ].join("\n\n"), + "PERSIST", + ); +} diff --git a/mainbrain/okcomputer-swarm/api/ai/project-context.ts b/mainbrain/okcomputer-swarm/api/ai/project-context.ts new file mode 100644 index 000000000..92c5bccdf --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/ai/project-context.ts @@ -0,0 +1,38 @@ +export const MASTERZIP_CONTEXT = ` +Project: ABCAA-TAGAYTAY-2026 / ALUM-BOO CYBERNETICS LAB. +Canonical input: MASTERZIP v11, generated 2026-07-15. +Current validation stage: VAL-0 specification complete/in progress. +Next hard gate: NEXT-001 Geometry & Hardware Survey, then VAL-1 geometry verification. +Active build queue: P1 novelty latch, P2 tech chassis, P6 market canopy, SA pantograph, SF vibration QC. +Active science tools: T1-T28. +Non-negotiable controls: +- Unknown physical parameters remain BLOCKED, not guessed. +- Every build requires evidence, FMEA, cut list, field protocol, helper training, compliance review, and traceable results. +- A compliance failure blocks sale. +- Physical safety claims require measured, manufacturer-specified, literature-derived, calculated, simulated, bench-validated, or field-validated status. +- Supabase is control-plane metadata only. Never store model binaries, secrets, or bulk artifacts there. +- Hugging Face model binaries remain local. Remote model loading is disabled by default. +`.trim(); + +export const ROLE_INSTRUCTIONS: Record = { + planner: + "Decompose the request into a short dependency-aware plan. Separate facts, assumptions, blocked items, and approval gates.", + researcher: + "Extract the strongest available evidence from the supplied context. Do not invent citations, measurements, suppliers, or completed tests.", + analyst: + "Analyze dependencies, risks, uncertainty, cost, state transitions, and likely failure modes. Quantify only when inputs support it.", + coder: + "Design implementation-ready TypeScript interfaces, APIs, tests, and migration steps. Preserve compatibility and avoid broad rewrites.", + creative: + "Generate useful alternatives without weakening safety, evidence, or validation requirements.", + validator: + "Act as an adversarial verifier. Identify unsupported claims, missing evidence, state violations, safety risks, and false completion claims.", + memory: + "Compress prior context into reusable facts and constraints. Never store secrets or unnecessary personal data.", + synthesizer: + "Merge outputs into one precise answer. Preserve disagreements, confidence limits, blocked states, and the exact next action.", +}; + +export const ROLE_DESCRIPTIONS = Object.entries(ROLE_INSTRUCTIONS).map( + ([slug, description]) => ({ slug, description }), +); diff --git a/mainbrain/okcomputer-swarm/api/ai/provider-status.ts b/mainbrain/okcomputer-swarm/api/ai/provider-status.ts new file mode 100644 index 000000000..263dddd6c --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/ai/provider-status.ts @@ -0,0 +1,38 @@ +import { homedir } from "node:os"; +import path from "node:path"; +import type { ProviderStatus } from "./contracts"; + +export function defaultHfRoot(): string { + return process.env.HF_LOCAL_MODEL_PATH ?? + path.join(homedir(), "Desktop", "HuggingFaces"); +} + +export function getProviderStatus(): ProviderStatus { + return { + openai: { + configured: Boolean(process.env.OPENAI_API_KEY), + model: process.env.OPENAI_MODEL ?? "gpt-5.4", + }, + anthropic: { + configured: Boolean(process.env.ANTHROPIC_API_KEY), + model: process.env.CLAUDE_MODEL ?? "claude-sonnet-4-6", + mode: "openai-sdk-compatibility", + }, + huggingface: { + enabled: process.env.HF_LOCAL_ROUTER_ENABLED !== "false", + model: + process.env.HF_EMBEDDING_MODEL ?? + "mixedbread-ai/mxbai-embed-xsmall-v1", + localModelPath: defaultHfRoot(), + remoteModelsAllowed: process.env.HF_ALLOW_REMOTE_MODELS === "true", + }, + supabase: { + configured: Boolean( + process.env.SUPABASE_URL && process.env.SUPABASE_SERVICE_ROLE_KEY, + ), + projectRef: + process.env.SUPABASE_PROJECT_REF ?? "dxyghtyjndylvfugutsr", + role: "control-plane-only", + }, + }; +} diff --git a/mainbrain/okcomputer-swarm/api/ai/state-machine.test.ts b/mainbrain/okcomputer-swarm/api/ai/state-machine.test.ts new file mode 100644 index 000000000..259b9ddd1 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/ai/state-machine.test.ts @@ -0,0 +1,34 @@ +import { describe, expect, it } from "vitest"; +import { SwarmStateMachine } from "./state-machine"; + +describe("SwarmStateMachine", () => { + it("accepts the canonical successful path", () => { + const machine = new SwarmStateMachine(); + for (const state of [ + "PLAN", + "ROUTE", + "EXECUTE", + "CRITIQUE", + "VALIDATE", + "PERSIST", + "COMPLETE", + ] as const) { + machine.transition(state); + } + expect(machine.state).toBe("COMPLETE"); + }); + + it("rejects validation bypass", () => { + const machine = new SwarmStateMachine(); + machine.transition("PLAN"); + expect(() => machine.transition("COMPLETE")).toThrow( + "Invalid swarm transition", + ); + }); + + it("can fail from any active state", () => { + const machine = new SwarmStateMachine(); + machine.transition("PLAN"); + expect(machine.fail()).toBe("FAILED"); + }); +}); diff --git a/mainbrain/okcomputer-swarm/api/ai/state-machine.ts b/mainbrain/okcomputer-swarm/api/ai/state-machine.ts new file mode 100644 index 000000000..dee37c782 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/ai/state-machine.ts @@ -0,0 +1,36 @@ +import type { SwarmState } from "./contracts"; + +const ALLOWED_TRANSITIONS: Record = { + INTAKE: ["PLAN", "FAILED"], + PLAN: ["ROUTE", "FAILED"], + ROUTE: ["EXECUTE", "FAILED"], + EXECUTE: ["CRITIQUE", "VALIDATE", "FAILED"], + CRITIQUE: ["VALIDATE", "FAILED"], + VALIDATE: ["PERSIST", "FAILED"], + PERSIST: ["COMPLETE", "FAILED"], + COMPLETE: [], + FAILED: [], +}; + +export class SwarmStateMachine { + private _state: SwarmState = "INTAKE"; + + get state(): SwarmState { + return this._state; + } + + transition(next: SwarmState): SwarmState { + if (!ALLOWED_TRANSITIONS[this._state].includes(next)) { + throw new Error(`Invalid swarm transition: ${this._state} -> ${next}`); + } + this._state = next; + return this._state; + } + + fail(): SwarmState { + if (this._state !== "COMPLETE" && this._state !== "FAILED") { + this._state = "FAILED"; + } + return this._state; + } +} diff --git a/mainbrain/okcomputer-swarm/api/ai/supabase-control.ts b/mainbrain/okcomputer-swarm/api/ai/supabase-control.ts new file mode 100644 index 000000000..792410890 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/ai/supabase-control.ts @@ -0,0 +1,103 @@ +import { createHash } from "node:crypto"; +import { createClient } from "@supabase/supabase-js"; +import type { ProviderStatus, SwarmState } from "./contracts"; + +let client: ReturnType | undefined; + +function getClient(): ReturnType | undefined { + const url = process.env.SUPABASE_URL; + const serviceRoleKey = process.env.SUPABASE_SERVICE_ROLE_KEY; + if (!url || !serviceRoleKey) return undefined; + if (client) return client; + + client = createClient(url, serviceRoleKey, { + auth: { + persistSession: false, + autoRefreshToken: false, + detectSessionInUrl: false, + }, + }); + return client; +} + +export async function createControlRun(input: { + externalSwarmId?: number; + ownerRef?: string; + query: string; + providerStatus: ProviderStatus; +}): Promise { + const supabase = getClient(); + if (!supabase) return undefined; + + const { data, error } = await supabase.rpc("swarm_create_run", { + p_external_swarm_id: input.externalSwarmId ?? null, + p_owner_ref: input.ownerRef ?? null, + p_query: input.query, + p_provider_plan: input.providerStatus, + }); + + if (error) throw new Error(`Supabase createControlRun: ${error.message}`); + return typeof data === "string" ? data : undefined; +} + +export async function appendControlEvent(input: { + runId?: string; + eventType: string; + state: SwarmState; + agentSlug?: string; + payload?: Record; +}): Promise { + const supabase = getClient(); + if (!supabase || !input.runId) return; + + const { error } = await supabase.rpc("swarm_append_event", { + p_run_id: input.runId, + p_event_type: input.eventType, + p_state: input.state, + p_agent_slug: input.agentSlug ?? null, + p_payload: input.payload ?? {}, + }); + + if (error) throw new Error(`Supabase appendControlEvent: ${error.message}`); +} + +export async function writeCheckpoint(input: { + runId?: string; + agentSlug: string; + sequenceNo: number; + snapshot: Record; +}): Promise { + const supabase = getClient(); + if (!supabase || !input.runId) return; + + const serialized = JSON.stringify(input.snapshot); + const checksum = createHash("sha256").update(serialized).digest("hex"); + const { error } = await supabase.rpc("swarm_write_checkpoint", { + p_run_id: input.runId, + p_agent_slug: input.agentSlug, + p_sequence_no: input.sequenceNo, + p_checksum: checksum, + p_snapshot: input.snapshot, + }); + + if (error) throw new Error(`Supabase writeCheckpoint: ${error.message}`); +} + +export async function completeControlRun(input: { + runId?: string; + finalSummary?: string; + failed?: boolean; + errorCode?: string; +}): Promise { + const supabase = getClient(); + if (!supabase || !input.runId) return; + + const { error } = await supabase.rpc("swarm_complete_run", { + p_run_id: input.runId, + p_final_summary: input.finalSummary ?? null, + p_failed: Boolean(input.failed), + p_error_code: input.errorCode ?? null, + }); + + if (error) throw new Error(`Supabase completeControlRun: ${error.message}`); +} diff --git a/mainbrain/okcomputer-swarm/api/auth-router.ts b/mainbrain/okcomputer-swarm/api/auth-router.ts new file mode 100644 index 000000000..4b42f17a6 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/auth-router.ts @@ -0,0 +1,22 @@ +import * as cookie from "cookie"; +import { Session } from "@contracts/constants"; +import { getSessionCookieOptions } from "./lib/cookies"; +import { createRouter, authedQuery } from "./middleware"; + +export const authRouter = createRouter({ + me: authedQuery.query((opts) => opts.ctx.user), + logout: authedQuery.mutation(async ({ ctx }) => { + const opts = getSessionCookieOptions(ctx.req.headers); + ctx.resHeaders.append( + "set-cookie", + cookie.serialize(Session.cookieName, "", { + httpOnly: opts.httpOnly, + path: opts.path, + sameSite: opts.sameSite?.toLowerCase() as "lax" | "none", + secure: opts.secure, + maxAge: 0, + }), + ); + return { success: true }; + }), +}); diff --git a/mainbrain/okcomputer-swarm/api/boot.ts b/mainbrain/okcomputer-swarm/api/boot.ts new file mode 100644 index 000000000..1e0748cae --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/boot.ts @@ -0,0 +1,36 @@ +import { Hono } from "hono"; +import { bodyLimit } from "hono/body-limit"; +import type { HttpBindings } from "@hono/node-server"; +import { fetchRequestHandler } from "@trpc/server/adapters/fetch"; +import { appRouter } from "./router"; +import { createContext } from "./context"; +import { env } from "./lib/env"; +import { createOAuthCallbackHandler } from "./kimi/auth"; +import { Paths } from "@contracts/constants"; + +const app = new Hono<{ Bindings: HttpBindings }>(); + +app.use(bodyLimit({ maxSize: 50 * 1024 * 1024 })); +app.get(Paths.oauthCallback, createOAuthCallbackHandler()); +app.use("/api/trpc/*", async (c) => { + return fetchRequestHandler({ + endpoint: "/api/trpc", + req: c.req.raw, + router: appRouter, + createContext, + }); +}); +app.all("/api/*", (c) => c.json({ error: "Not Found" }, 404)); + +export default app; + +if (env.isProduction) { + const { serve } = await import("@hono/node-server"); + const { serveStaticFiles } = await import("./lib/vite"); + serveStaticFiles(app); + + const port = parseInt(process.env.PORT || "3000"); + serve({ fetch: app.fetch, port }, () => { + console.log(`Server running on http://localhost:${port}/`); + }); +} diff --git a/mainbrain/okcomputer-swarm/api/context.ts b/mainbrain/okcomputer-swarm/api/context.ts new file mode 100644 index 000000000..56d8c77e9 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/context.ts @@ -0,0 +1,21 @@ +import type { FetchCreateContextFnOptions } from "@trpc/server/adapters/fetch"; +import type { User } from "@db/schema"; +import { authenticateRequest } from "./kimi/auth"; + +export type TrpcContext = { + req: Request; + resHeaders: Headers; + user?: User; +}; + +export async function createContext( + opts: FetchCreateContextFnOptions, +): Promise { + const ctx: TrpcContext = { req: opts.req, resHeaders: opts.resHeaders }; + try { + ctx.user = await authenticateRequest(opts.req.headers); + } catch { + // Authentication is optional here + } + return ctx; +} diff --git a/mainbrain/okcomputer-swarm/api/kimi/auth.ts b/mainbrain/okcomputer-swarm/api/kimi/auth.ts new file mode 100644 index 000000000..64231a9fc --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/kimi/auth.ts @@ -0,0 +1,130 @@ +import type { Context } from "hono"; +import { setCookie } from "hono/cookie"; +import * as jose from "jose"; +import * as cookie from "cookie"; +import { env } from "../lib/env"; +import { getSessionCookieOptions } from "../lib/cookies"; +import { Session } from "@contracts/constants"; +import { Errors } from "@contracts/errors"; +import { signSessionToken, verifySessionToken } from "./session"; +import { users as kimiUsers } from "./platform"; +import { findUserByUnionId, upsertUser } from "../queries/users"; +import type { TokenResponse } from "./types"; + +async function exchangeAuthCode( + code: string, + redirectUri: string, +): Promise { + const body = new URLSearchParams({ + grant_type: "authorization_code", + code, + client_id: env.appId, + redirect_uri: redirectUri, + client_secret: env.appSecret, + }); + + const resp = await fetch(`${env.kimiAuthUrl}/api/oauth/token`, { + method: "POST", + headers: { "Content-Type": "application/x-www-form-urlencoded" }, + body: body.toString(), + }); + + if (!resp.ok) { + const text = await resp.text(); + throw new Error(`Token exchange failed (${resp.status}): ${text}`); + } + + return resp.json() as Promise; +} + +const jwks = jose.createRemoteJWKSet( + new URL(`${env.kimiAuthUrl}/api/.well-known/jwks.json`), +); + +async function verifyAccessToken( + accessToken: string, +): Promise<{ userId: string; clientId: string }> { + const { payload } = await jose.jwtVerify(accessToken, jwks); + const userId = payload.user_id as string; + const clientId = payload.client_id as string; + if (!userId) { + throw new Error("user_id missing from access token"); + } + return { userId, clientId }; +} + +export async function authenticateRequest(headers: Headers) { + const cookies = cookie.parse(headers.get("cookie") || ""); + const token = cookies[Session.cookieName]; + if (!token) { + console.warn("[auth] No session cookie found in request."); + throw Errors.forbidden("Invalid authentication token."); + } + const claim = await verifySessionToken(token); + if (!claim) { + throw Errors.forbidden("Invalid authentication token."); + } + const user = await findUserByUnionId(claim.unionId); + if (!user) { + throw Errors.forbidden("User not found. Please re-login."); + } + return user; +} + +export function createOAuthCallbackHandler() { + return async (c: Context) => { + const code = c.req.query("code"); + const state = c.req.query("state"); + const error = c.req.query("error"); + const errorDescription = c.req.query("error_description"); + + if (error) { + if (error === "access_denied") { + return c.redirect("/", 302); + } + return c.json( + { error, error_description: errorDescription }, + 400, + ); + } + + if (!code || !state) { + return c.json({ error: "code and state are required" }, 400); + } + + try { + const redirectUri = atob(state); + const tokenResp = await exchangeAuthCode(code, redirectUri); + const { userId } = await verifyAccessToken(tokenResp.access_token); + const userProfile = await kimiUsers.getProfile(tokenResp.access_token); + if (!userProfile) { + throw new Error("Failed to fetch user profile from Kimi Open"); + } + + await upsertUser({ + unionId: userId, + name: userProfile.name, + avatar: userProfile.avatar_url, + lastSignInAt: new Date(), + }); + + const token = await signSessionToken({ + unionId: userId, + clientId: env.appId, + }); + + const cookieOpts = getSessionCookieOptions(c.req.raw.headers); + setCookie(c, Session.cookieName, token, { + ...cookieOpts, + maxAge: Session.maxAgeMs / 1000, + }); + + return c.redirect("/", 302); + } catch (error) { + console.error("[OAuth] Callback failed", error); + return c.json({ error: "OAuth callback failed" }, 500); + } + }; +} + +export { exchangeAuthCode, verifyAccessToken }; diff --git a/mainbrain/okcomputer-swarm/api/kimi/platform.ts b/mainbrain/okcomputer-swarm/api/kimi/platform.ts new file mode 100644 index 000000000..549d9f66d --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/kimi/platform.ts @@ -0,0 +1,30 @@ +import { env } from "../lib/env"; +import type { UserProfile } from "./types"; + +async function kimiRequest( + path: string, + token: string, + init?: RequestInit, +): Promise { + const resp = await fetch(`${env.kimiOpenUrl}${path}`, { + ...init, + headers: { + Accept: "application/json", + Authorization: `Bearer ${token}`, + ...init?.headers, + }, + }); + if (!resp.ok) { + const text = await resp.text(); + console.warn( + `[kimi] Request to ${path} failed (${resp.status}): ${text}`, + ); + return null; + } + return resp.json() as Promise; +} + +export const users = { + getProfile: (token: string) => + kimiRequest("/v1/users/me/profile", token), +}; diff --git a/mainbrain/okcomputer-swarm/api/kimi/session.ts b/mainbrain/okcomputer-swarm/api/kimi/session.ts new file mode 100644 index 000000000..4cd0c43cc --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/kimi/session.ts @@ -0,0 +1,40 @@ +import * as jose from "jose"; +import { env } from "../lib/env"; +import type { SessionPayload } from "./types"; + +const JWT_ALG = "HS256"; + +export async function signSessionToken( + payload: SessionPayload, +): Promise { + const secret = new TextEncoder().encode(env.appSecret); + return new jose.SignJWT(payload) + .setProtectedHeader({ alg: JWT_ALG }) + .setIssuedAt() + .setExpirationTime("1 year") + .sign(secret); +} + +export async function verifySessionToken( + token: string, +): Promise { + if (!token) { + console.warn("[session] No token provided for verification."); + return null; + } + try { + const secret = new TextEncoder().encode(env.appSecret); + const { payload } = await jose.jwtVerify(token, secret, { + algorithms: [JWT_ALG], + }); + const { unionId, clientId } = payload; + if (!unionId || !clientId) { + console.warn("[session] JWT payload missing required fields."); + return null; + } + return { unionId, clientId } as SessionPayload; + } catch (error) { + console.warn("[session] JWT verification failed:", error); + return null; + } +} diff --git a/mainbrain/okcomputer-swarm/api/kimi/types.ts b/mainbrain/okcomputer-swarm/api/kimi/types.ts new file mode 100644 index 000000000..67a437ee1 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/kimi/types.ts @@ -0,0 +1,18 @@ +export type TokenResponse = { + access_token: string; + token_type: string; + expires_in: number; + refresh_token?: string; + scope: string; +}; + +export type SessionPayload = { + unionId: string; + clientId: string; +}; + +export type UserProfile = { + user_id: string; + name: string; + avatar_url: string; +}; diff --git a/mainbrain/okcomputer-swarm/api/lib/cookies.ts b/mainbrain/okcomputer-swarm/api/lib/cookies.ts new file mode 100644 index 000000000..ca288e229 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/lib/cookies.ts @@ -0,0 +1,17 @@ +import type { CookieOptions } from "hono/utils/cookie"; + +function isLocalhost(headers: Headers): boolean { + const host = headers.get("host") || ""; + return host.startsWith("localhost:") || host.startsWith("127.0.0.1:"); +} + +export function getSessionCookieOptions(headers: Headers): CookieOptions { + const localhost = isLocalhost(headers); + + return { + httpOnly: true, + path: "/", + sameSite: localhost ? "Lax" : "None", + secure: !localhost, + }; +} diff --git a/mainbrain/okcomputer-swarm/api/lib/env.ts b/mainbrain/okcomputer-swarm/api/lib/env.ts new file mode 100644 index 000000000..aac02d715 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/lib/env.ts @@ -0,0 +1,19 @@ +import "dotenv/config"; + +function required(name: string): string { + const value = process.env[name]; + if (!value && process.env.NODE_ENV === "production") { + throw new Error(`Missing required environment variable: ${name}`); + } + return value ?? ""; +} + +export const env = { + appId: required("APP_ID"), + appSecret: required("APP_SECRET"), + isProduction: process.env.NODE_ENV === "production", + databaseUrl: required("DATABASE_URL"), + kimiAuthUrl: required("KIMI_AUTH_URL"), + kimiOpenUrl: required("KIMI_OPEN_URL"), + ownerUnionId: process.env.OWNER_UNION_ID ?? "", +}; diff --git a/mainbrain/okcomputer-swarm/api/lib/http.ts b/mainbrain/okcomputer-swarm/api/lib/http.ts new file mode 100644 index 000000000..53bf2c6ff --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/lib/http.ts @@ -0,0 +1,77 @@ +interface RequestConfig extends RequestInit { + baseUrl?: string; + params?: Record; + timeout?: number; +} + +export class HttpClient { + private baseUrl: string; + private defaultHeaders: Record; + + constructor(baseURL: string, opts?: { headers?: Record }) { + this.baseUrl = baseURL; + this.defaultHeaders = { + "Content-Type": "application/json", + ...opts?.headers, + }; + } + + async request(endpoint: string, config: RequestConfig = {}): Promise { + const { + method = "GET", + params, + body, + headers, + timeout = 30000, + ...rest + } = config; + + const url = new URL(`${this.baseUrl}${endpoint}`); + if (params) { + Object.entries(params).forEach(([key, value]) => + url.searchParams.append(key, value.toString()), + ); + } + + const controller = new AbortController(); + const timeoutId = setTimeout(() => controller.abort(), timeout); + + try { + const response = await fetch(url.toString(), { + ...rest, + method, + headers: { ...this.defaultHeaders, ...headers }, + body: body ? JSON.stringify(body) : undefined, + signal: controller.signal, + }); + + clearTimeout(timeoutId); + + if (!response.ok) { + const errorData = (await response + .json() + .catch(() => ({}))) as Record; + throw new Error(errorData.message || `HTTP Error: ${response.status}`); + } + + return (await response.json()) as T; + } catch (error: any) { + if (error.name === "AbortError") { + throw new Error("Request timeout"); + } + throw error; + } + } + + get( + url: string, + params?: RequestConfig["params"], + config?: RequestConfig, + ) { + return this.request(url, { ...config, method: "GET", params }); + } + + post(url: string, body?: any, config?: RequestConfig) { + return this.request(url, { ...config, method: "POST", body }); + } +} diff --git a/mainbrain/okcomputer-swarm/api/lib/vite.ts b/mainbrain/okcomputer-swarm/api/lib/vite.ts new file mode 100644 index 000000000..6cb0789a1 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/lib/vite.ts @@ -0,0 +1,23 @@ +import type { Hono } from "hono"; +import type { HttpBindings } from "@hono/node-server"; +import { serveStatic } from "@hono/node-server/serve-static"; +import fs from "fs"; +import path from "path"; + +type App = Hono<{ Bindings: HttpBindings }>; + +export function serveStaticFiles(app: App) { + const distPath = path.resolve(import.meta.dirname, "../dist/public"); + + app.use("*", serveStatic({ root: "./dist/public" })); + + app.notFound((c) => { + const accept = c.req.header("accept") ?? ""; + if (!accept.includes("text/html")) { + return c.json({ error: "Not Found" }, 404); + } + const indexPath = path.resolve(distPath, "index.html"); + const content = fs.readFileSync(indexPath, "utf-8"); + return c.html(content); + }); +} diff --git a/mainbrain/okcomputer-swarm/api/middleware.ts b/mainbrain/okcomputer-swarm/api/middleware.ts new file mode 100644 index 000000000..a70d8d53e --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/middleware.ts @@ -0,0 +1,42 @@ +import { ErrorMessages } from "@contracts/constants"; +import { initTRPC, TRPCError } from "@trpc/server"; +import superjson from "superjson"; +import type { TrpcContext } from "./context"; + +const t = initTRPC.context().create({ + transformer: superjson, +}); + +export const createRouter = t.router; +export const publicQuery = t.procedure; + +const requireAuth = t.middleware(async (opts) => { + const { ctx, next } = opts; + + if (!ctx.user) { + throw new TRPCError({ + code: "UNAUTHORIZED", + message: ErrorMessages.unauthenticated, + }); + } + + return next({ ctx: { ...ctx, user: ctx.user } }); +}); + +function requireRole(role: string) { + return t.middleware(async (opts) => { + const { ctx, next } = opts; + + if (!ctx.user || ctx.user.role !== role) { + throw new TRPCError({ + code: "FORBIDDEN", + message: ErrorMessages.insufficientRole, + }); + } + + return next({ ctx: { ...ctx, user: ctx.user } }); + }); +} + +export const authedQuery = t.procedure.use(requireAuth); +export const adminQuery = authedQuery.use(requireRole("admin")); diff --git a/mainbrain/okcomputer-swarm/api/queries/connection.ts b/mainbrain/okcomputer-swarm/api/queries/connection.ts new file mode 100644 index 000000000..b792c2a85 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/queries/connection.ts @@ -0,0 +1,18 @@ +import { drizzle } from "drizzle-orm/mysql2"; +import { env } from "../lib/env"; +import * as schema from "@db/schema"; +import * as relations from "@db/relations"; + +const fullSchema = { ...schema, ...relations }; + +let instance: ReturnType>; + +export function getDb() { + if (!instance) { + instance = drizzle(env.databaseUrl, { + mode: "planetscale", + schema: fullSchema, + }); + } + return instance; +} diff --git a/mainbrain/okcomputer-swarm/api/queries/users.ts b/mainbrain/okcomputer-swarm/api/queries/users.ts new file mode 100644 index 000000000..f1d081fbb --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/queries/users.ts @@ -0,0 +1,36 @@ +import { eq } from "drizzle-orm"; +import * as schema from "@db/schema"; +import type { InsertUser } from "@db/schema"; +import { getDb } from "./connection"; +import { env } from "../lib/env"; + +export async function findUserByUnionId(unionId: string) { + const rows = await getDb() + .select() + .from(schema.users) + .where(eq(schema.users.unionId, unionId)) + .limit(1); + return rows.at(0); +} + +export async function upsertUser(data: InsertUser) { + const values = { ...data }; + const updateSet: Partial = { + lastSignInAt: new Date(), + ...data, + }; + + if ( + values.role === undefined && + values.unionId && + values.unionId === env.ownerUnionId + ) { + values.role = "admin"; + updateSet.role = "admin"; + } + + await getDb() + .insert(schema.users) + .values(values) + .onDuplicateKeyUpdate({ set: updateSet }); +} diff --git a/mainbrain/okcomputer-swarm/api/router.ts b/mainbrain/okcomputer-swarm/api/router.ts new file mode 100644 index 000000000..fbb17d2d1 --- /dev/null +++ b/mainbrain/okcomputer-swarm/api/router.ts @@ -0,0 +1,13 @@ +import { authRouter } from "./auth-router"; +import { agentRouter } from "./agent-router"; +import { adminRouter } from "./admin-router"; +import { createRouter, publicQuery } from "./middleware"; + +export const appRouter = createRouter({ + ping: publicQuery.query(() => ({ ok: true, ts: Date.now() })), + auth: authRouter, + agent: agentRouter, + admin: adminRouter, +}); + +export type AppRouter = typeof appRouter; diff --git a/mainbrain/okcomputer-swarm/components.json b/mainbrain/okcomputer-swarm/components.json new file mode 100644 index 000000000..411f77047 --- /dev/null +++ b/mainbrain/okcomputer-swarm/components.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "postcss.config.js", + "css": "src/index.css", + "baseColor": "slate", + "cssVariables": true, + "prefix": "" + }, + "iconLibrary": "lucide", + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "registries": {} +} diff --git a/mainbrain/okcomputer-swarm/contracts/constants.ts b/mainbrain/okcomputer-swarm/contracts/constants.ts new file mode 100644 index 000000000..5bdf87170 --- /dev/null +++ b/mainbrain/okcomputer-swarm/contracts/constants.ts @@ -0,0 +1,14 @@ +export const Session = { + cookieName: "kimi_sid", + maxAgeMs: 365 * 24 * 60 * 60 * 1000, +} as const; + +export const ErrorMessages = { + unauthenticated: "Authentication required", + insufficientRole: "Insufficient permissions", +} as const; + +export const Paths = { + login: "/login", + oauthCallback: "/api/oauth/callback", +} as const; diff --git a/mainbrain/okcomputer-swarm/contracts/errors.ts b/mainbrain/okcomputer-swarm/contracts/errors.ts new file mode 100644 index 000000000..b88860f0e --- /dev/null +++ b/mainbrain/okcomputer-swarm/contracts/errors.ts @@ -0,0 +1,15 @@ +type AppError = { tag: "app_error"; status: number; message: string }; + +function appError(status: number, message: string): AppError { + return { tag: "app_error", status, message }; +} + +export const Errors = { + badRequest: (msg: string) => appError(400, msg), + unauthorized: (msg: string) => appError(401, msg), + forbidden: (msg: string) => appError(403, msg), + notFound: (msg: string) => appError(404, msg), + internal: (msg: string) => appError(500, msg), +} as const; + +export type { AppError }; diff --git a/mainbrain/okcomputer-swarm/contracts/types.ts b/mainbrain/okcomputer-swarm/contracts/types.ts new file mode 100644 index 000000000..77a112744 --- /dev/null +++ b/mainbrain/okcomputer-swarm/contracts/types.ts @@ -0,0 +1,2 @@ +export type * from "../db/schema"; +export * from "./errors"; diff --git a/mainbrain/okcomputer-swarm/db/migrations/.gitkeep b/mainbrain/okcomputer-swarm/db/migrations/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/mainbrain/okcomputer-swarm/db/relations.ts b/mainbrain/okcomputer-swarm/db/relations.ts new file mode 100644 index 000000000..941a2680e --- /dev/null +++ b/mainbrain/okcomputer-swarm/db/relations.ts @@ -0,0 +1 @@ +import {} from "./schema"; diff --git a/mainbrain/okcomputer-swarm/db/schema.ts b/mainbrain/okcomputer-swarm/db/schema.ts new file mode 100644 index 000000000..dcc9a11d7 --- /dev/null +++ b/mainbrain/okcomputer-swarm/db/schema.ts @@ -0,0 +1,110 @@ +import { + mysqlTable, + mysqlEnum, + serial, + varchar, + text, + timestamp, + bigint, + json, + int, +} from "drizzle-orm/mysql-core"; + +export const users = mysqlTable("users", { + id: serial("id").primaryKey(), + unionId: varchar("unionId", { length: 255 }).notNull().unique(), + name: varchar("name", { length: 255 }), + email: varchar("email", { length: 320 }), + avatar: text("avatar"), + role: mysqlEnum("role", ["user", "admin"]).default("user").notNull(), + createdAt: timestamp("createdAt").defaultNow().notNull(), + updatedAt: timestamp("updatedAt") + .defaultNow() + .notNull() + .$onUpdate(() => new Date()), + lastSignInAt: timestamp("lastSignInAt").defaultNow().notNull(), +}); + +export type User = typeof users.$inferSelect; +export type InsertUser = typeof users.$inferInsert; + +export const agents = mysqlTable("agents", { + id: serial("id").primaryKey(), + name: varchar("name", { length: 255 }).notNull(), + slug: varchar("slug", { length: 100 }).notNull().unique(), + description: text("description"), + icon: varchar("icon", { length: 100 }).default("bot"), + color: varchar("color", { length: 20 }).default("#5B21FF"), + specialty: varchar("specialty", { length: 255 }), + status: mysqlEnum("status", ["active", "idle", "offline"]).default("idle").notNull(), + totalTasks: int("totalTasks").default(0), + successRate: int("successRate").default(95), + avgLatency: int("avgLatency").default(120), + capabilities: json("capabilities").$type(), + createdAt: timestamp("createdAt").defaultNow().notNull(), + updatedAt: timestamp("updatedAt").defaultNow().notNull().$onUpdate(() => new Date()), +}); + +export type Agent = typeof agents.$inferSelect; +export type InsertAgent = typeof agents.$inferInsert; + +export const swarms = mysqlTable("swarms", { + id: serial("id").primaryKey(), + name: varchar("name", { length: 255 }).notNull(), + query: text("query").notNull(), + status: mysqlEnum("status", ["running", "completed", "failed", "paused"]).default("running").notNull(), + agentCount: int("agentCount").default(0), + userId: bigint("userId", { mode: "number", unsigned: true }), + summary: text("summary"), + metadata: json("metadata").$type>(), + createdAt: timestamp("createdAt").defaultNow().notNull(), + updatedAt: timestamp("updatedAt").defaultNow().notNull().$onUpdate(() => new Date()), + completedAt: timestamp("completedAt"), +}); + +export type Swarm = typeof swarms.$inferSelect; +export type InsertSwarm = typeof swarms.$inferInsert; + +export const swarmAgents = mysqlTable("swarm_agents", { + id: serial("id").primaryKey(), + swarmId: bigint("swarmId", { mode: "number", unsigned: true }).notNull(), + agentId: bigint("agentId", { mode: "number", unsigned: true }).notNull(), + role: mysqlEnum("role", ["leader", "worker", "validator", "orchestrator"]).default("worker").notNull(), + status: mysqlEnum("status", ["active", "completed", "failed", "waiting"]).default("waiting").notNull(), + contribution: text("contribution"), + startedAt: timestamp("startedAt").defaultNow().notNull(), + completedAt: timestamp("completedAt"), +}); + +export type SwarmAgent = typeof swarmAgents.$inferSelect; + +export const messages = mysqlTable("messages", { + id: serial("id").primaryKey(), + swarmId: bigint("swarmId", { mode: "number", unsigned: true }).notNull(), + agentId: bigint("agentId", { mode: "number", unsigned: true }), + role: mysqlEnum("role", ["user", "agent", "system"]).notNull(), + content: text("content").notNull(), + sources: json("sources").$type>(), + reasoning: text("reasoning"), + tokens: int("tokens").default(0), + latency: int("latency").default(0), + createdAt: timestamp("createdAt").defaultNow().notNull(), +}); + +export type Message = typeof messages.$inferSelect; +export type InsertMessage = typeof messages.$inferInsert; + +export const tasks = mysqlTable("tasks", { + id: serial("id").primaryKey(), + swarmId: bigint("swarmId", { mode: "number", unsigned: true }).notNull(), + agentId: bigint("agentId", { mode: "number", unsigned: true }), + title: varchar("title", { length: 255 }).notNull(), + description: text("description"), + status: mysqlEnum("status", ["pending", "running", "completed", "failed"]).default("pending").notNull(), + priority: mysqlEnum("priority", ["low", "medium", "high", "critical"]).default("medium").notNull(), + result: text("result"), + createdAt: timestamp("createdAt").defaultNow().notNull(), + completedAt: timestamp("completedAt"), +}); + +export type Task = typeof tasks.$inferSelect; diff --git a/mainbrain/okcomputer-swarm/db/seed.ts b/mainbrain/okcomputer-swarm/db/seed.ts new file mode 100644 index 000000000..696cd6f38 --- /dev/null +++ b/mainbrain/okcomputer-swarm/db/seed.ts @@ -0,0 +1,192 @@ +import { getDb } from "../api/queries/connection"; +import { agents } from "./schema"; + +async function seed() { + const db = getDb(); + + const agentData = [ + { + name: "Researcher", + slug: "researcher", + description: + "Evidence retrieval specialist. Extracts source-backed facts and marks unavailable evidence instead of inventing it.", + icon: "search", + color: "#5B21FF", + specialty: "Evidence Retrieval", + status: "active" as const, + totalTasks: 0, + successRate: 0, + avgLatency: 0, + capabilities: [ + "source_extraction", + "documentation_review", + "fact_classification", + ], + }, + { + name: "Analyst", + slug: "analyst", + description: + "Risk, dependency, uncertainty, and quantitative analysis specialist.", + icon: "bar-chart-3", + color: "#00E5FF", + specialty: "Risk Analysis", + status: "active" as const, + totalTasks: 0, + successRate: 0, + avgLatency: 0, + capabilities: [ + "risk_analysis", + "dependency_mapping", + "uncertainty_analysis", + ], + }, + { + name: "Coder", + slug: "coder", + description: + "Implementation specialist for TypeScript, APIs, tests, migrations, and compatibility-preserving changes.", + icon: "code-2", + color: "#FFD600", + specialty: "Implementation", + status: "active" as const, + totalTasks: 0, + successRate: 0, + avgLatency: 0, + capabilities: [ + "code_generation", + "debugging", + "testing", + "integration", + ], + }, + { + name: "Creative", + slug: "creative", + description: + "Design and alternative-generation agent constrained by safety and evidence gates.", + icon: "sparkles", + color: "#FF6B9D", + specialty: "Design Alternatives", + status: "active" as const, + totalTasks: 0, + successRate: 0, + avgLatency: 0, + capabilities: ["design_ideation", "canva_briefing", "alternatives"], + }, + { + name: "Validator", + slug: "validator", + description: + "Adversarial verifier for unsupported claims, missing tests, unsafe assumptions, and state bypasses.", + icon: "shield-check", + color: "#10B981", + specialty: "Verification", + status: "active" as const, + totalTasks: 0, + successRate: 0, + avgLatency: 0, + capabilities: [ + "fact_checking", + "state_validation", + "safety_review", + "compliance_review", + ], + }, + { + name: "Planner", + slug: "planner", + description: + "Dependency-aware workflow architect with approval gates and blocked-state handling.", + icon: "git-branch", + color: "#F97316", + specialty: "Orchestration", + status: "active" as const, + totalTasks: 0, + successRate: 0, + avgLatency: 0, + capabilities: [ + "task_decomposition", + "workflow_design", + "approval_gates", + ], + }, + { + name: "Memory", + slug: "memory", + description: + "Context compression and checkpoint agent. Stores no secrets or model binaries.", + icon: "database", + color: "#8B5CF6", + specialty: "Context and Checkpoints", + status: "active" as const, + totalTasks: 0, + successRate: 0, + avgLatency: 0, + capabilities: [ + "context_compression", + "checkpointing", + "constraint_retention", + ], + }, + { + name: "Synthesizer", + slug: "synthesizer", + description: + "Final answer assembler that preserves validation limits, disagreements, and exact next actions.", + icon: "layers", + color: "#EC4899", + specialty: "Synthesis", + status: "active" as const, + totalTasks: 0, + successRate: 0, + avgLatency: 0, + capabilities: [ + "multi_source_integration", + "conflict_preservation", + "summary_generation", + ], + }, + { + name: "Claude Critic", + slug: "claude-critic", + description: + "Optional secondary critic reached through Anthropic's OpenAI SDK compatibility endpoint when ANTHROPIC_API_KEY is configured.", + icon: "scan-search", + color: "#D97706", + specialty: "Cross-provider Critique", + status: "idle" as const, + totalTasks: 0, + successRate: 0, + avgLatency: 0, + capabilities: ["cross_provider_review", "failure_analysis"], + }, + { + name: "HF Local Router", + slug: "hf-router", + description: + "Local semantic router using Transformers.js embeddings with remote model loading disabled by default.", + icon: "route", + color: "#FACC15", + specialty: "Local Semantic Routing", + status: "idle" as const, + totalTasks: 0, + successRate: 0, + avgLatency: 0, + capabilities: ["local_embeddings", "semantic_routing", "offline_cache"], + }, + ]; + + for (const agent of agentData) { + await db.insert(agents).values(agent).onDuplicateKeyUpdate({ + set: { ...agent, updatedAt: new Date() }, + }); + } + + console.log(`Seeded ${agentData.length} evidence-driven agents`); +} + +seed().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/mainbrain/okcomputer-swarm/drizzle.config.ts b/mainbrain/okcomputer-swarm/drizzle.config.ts new file mode 100644 index 000000000..8e85f6240 --- /dev/null +++ b/mainbrain/okcomputer-swarm/drizzle.config.ts @@ -0,0 +1,16 @@ +import "dotenv/config"; +import { defineConfig } from "drizzle-kit"; + +const connectionString = process.env.DATABASE_URL; +if (!connectionString) { + throw new Error("DATABASE_URL is required to run drizzle commands"); +} + +export default defineConfig({ + schema: "./db/schema.ts", + out: "./db/migrations", + dialect: "mysql", + dbCredentials: { + url: connectionString, + }, +}); diff --git a/mainbrain/okcomputer-swarm/eslint.config.js b/mainbrain/okcomputer-swarm/eslint.config.js new file mode 100644 index 000000000..5e6b472f5 --- /dev/null +++ b/mainbrain/okcomputer-swarm/eslint.config.js @@ -0,0 +1,23 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import tseslint from 'typescript-eslint' +import { defineConfig, globalIgnores } from 'eslint/config' + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [ + js.configs.recommended, + tseslint.configs.recommended, + reactHooks.configs.flat.recommended, + reactRefresh.configs.vite, + ], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + }, +]) diff --git a/mainbrain/okcomputer-swarm/index.html b/mainbrain/okcomputer-swarm/index.html new file mode 100644 index 000000000..53b57518f --- /dev/null +++ b/mainbrain/okcomputer-swarm/index.html @@ -0,0 +1,12 @@ + + + + + + Nexus AI + + +
+ + + diff --git a/mainbrain/okcomputer-swarm/info.md b/mainbrain/okcomputer-swarm/info.md new file mode 100644 index 000000000..bccea1154 --- /dev/null +++ b/mainbrain/okcomputer-swarm/info.md @@ -0,0 +1,31 @@ +Using Node.js 20, Tailwind CSS v3.4.19, and Vite v7.2.4 + +Tailwind CSS has been set up with the shadcn theme + +Setup complete: /mnt/agents/output/app + +Components (40+): + accordion, alert-dialog, alert, aspect-ratio, avatar, badge, breadcrumb, + button-group, button, calendar, card, carousel, chart, checkbox, collapsible, + command, context-menu, dialog, drawer, dropdown-menu, empty, field, form, + hover-card, input-group, input-otp, input, item, kbd, label, menubar, + navigation-menu, pagination, popover, progress, radio-group, resizable, + scroll-area, select, separator, sheet, sidebar, skeleton, slider, sonner, + spinner, switch, table, tabs, textarea, toggle-group, toggle, tooltip + +Usage: + import { Button } from '@/components/ui/button' + import { Card, CardHeader, CardTitle } from '@/components/ui/card' + +Structure: + src/sections/ Page sections + src/hooks/ Custom hooks + src/types/ Type definitions + src/App.css Styles specific to the Webapp + src/App.tsx Root React component + src/index.css Global styles + src/main.tsx Entry point for rendering the Webapp + index.html Entry point for the Webapp + tailwind.config.js Configures Tailwind's theme, plugins, etc. + vite.config.ts Main build and dev server settings for Vite + postcss.config.js Config file for CSS post-processing tools \ No newline at end of file diff --git a/mainbrain/okcomputer-swarm/package.json b/mainbrain/okcomputer-swarm/package.json new file mode 100644 index 000000000..58d54da34 --- /dev/null +++ b/mainbrain/okcomputer-swarm/package.json @@ -0,0 +1,119 @@ +{ + "name": "my-app", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build && esbuild api/boot.ts --platform=node --bundle --format=esm --packages=external --outdir=dist --banner:js=\"import { createRequire } from 'module';const require = createRequire(import.meta.url);\"", + "lint": "eslint .", + "preview": "vite preview", + "start": "NODE_ENV=production node dist/boot.js", + "check": "tsc -b", + "format": "prettier --write .", + "test": "vitest run", + "db:generate": "drizzle-kit generate", + "db:migrate": "drizzle-kit migrate", + "db:push": "drizzle-kit push", + "db:seed": "tsx db/seed.ts", + "verify:integration": "npm run check && npm test && npm run build" + }, + "dependencies": { + "@aws-sdk/client-s3": "^3.965.0", + "@aws-sdk/s3-request-presigner": "^3.965.0", + "@hono/node-server": "^1.14.3", + "@hookform/resolvers": "^5.2.2", + "@radix-ui/react-accordion": "^1.2.12", + "@radix-ui/react-alert-dialog": "^1.1.15", + "@radix-ui/react-aspect-ratio": "^1.1.8", + "@radix-ui/react-avatar": "^1.1.11", + "@radix-ui/react-checkbox": "^1.3.3", + "@radix-ui/react-collapsible": "^1.1.12", + "@radix-ui/react-context-menu": "^2.2.16", + "@radix-ui/react-dialog": "^1.1.15", + "@radix-ui/react-dropdown-menu": "^2.1.16", + "@radix-ui/react-hover-card": "^1.1.15", + "@radix-ui/react-label": "^2.1.8", + "@radix-ui/react-menubar": "^1.1.16", + "@radix-ui/react-navigation-menu": "^1.2.14", + "@radix-ui/react-popover": "^1.1.15", + "@radix-ui/react-progress": "^1.1.8", + "@radix-ui/react-radio-group": "^1.3.8", + "@radix-ui/react-scroll-area": "^1.2.10", + "@radix-ui/react-select": "^2.2.6", + "@radix-ui/react-separator": "^1.1.8", + "@radix-ui/react-slider": "^1.3.6", + "@radix-ui/react-slot": "^1.2.4", + "@radix-ui/react-switch": "^1.2.6", + "@radix-ui/react-tabs": "^1.1.13", + "@radix-ui/react-toggle": "^1.1.10", + "@radix-ui/react-toggle-group": "^1.1.11", + "@radix-ui/react-tooltip": "^1.2.8", + "@react-three/drei": "^10.7.7", + "@react-three/fiber": "^9.6.1", + "@tanstack/react-query": "^5.90.16", + "@trpc/client": "^11.8.1", + "@trpc/react-query": "^11.8.1", + "@trpc/server": "^11.8.1", + "@types/three": "^0.185.1", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "cmdk": "^1.1.1", + "cookie": "^1.1.1", + "date-fns": "^4.1.0", + "dotenv": "^17.2.3", + "drizzle-orm": "^0.45.1", + "embla-carousel-react": "^8.6.0", + "gsap": "^3.15.0", + "hono": "^4.8.3", + "input-otp": "^1.4.2", + "jose": "6.1.3", + "lucide-react": "^0.562.0", + "mysql2": "^3.14.1", + "nanoid": "^5.1.6", + "next-themes": "^0.4.6", + "react": "^19.2.0", + "react-day-picker": "^9.13.0", + "react-dom": "^19.2.0", + "react-hook-form": "^7.70.0", + "react-resizable-panels": "^4.2.2", + "react-router": "^7.6.1", + "recharts": "^2.15.4", + "sonner": "^2.0.7", + "superjson": "^2.2.6", + "tailwind-merge": "^3.4.0", + "three": "^0.185.1", + "vaul": "^1.1.2", + "zod": "^4.3.5", + "@openai/agents": "^0.13.4", + "openai": "^6.47.0", + "@supabase/supabase-js": "^2.110.6", + "@huggingface/transformers": "^4.2.0" + }, + "devDependencies": { + "@eslint/js": "^9.39.1", + "@hono/vite-dev-server": "^0.19.0", + "@types/node": "^24.10.1", + "@types/react": "^19.2.5", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^5.1.1", + "autoprefixer": "^10.4.23", + "drizzle-kit": "^0.31.8", + "esbuild": "^0.27.2", + "eslint": "^9.39.1", + "eslint-plugin-react-hooks": "^7.0.1", + "eslint-plugin-react-refresh": "^0.4.24", + "globals": "^16.5.0", + "kimi-plugin-inspect-react": "^1.0.3", + "postcss": "^8.5.6", + "prettier": "^3.7.4", + "tailwindcss": "^3.4.19", + "tailwindcss-animate": "^1.0.7", + "tw-animate-css": "^1.4.0", + "typescript": "~5.9.3", + "typescript-eslint": "^8.46.4", + "vite": "^7.2.4", + "vitest": "^4.0.16", + "tsx": "^4.23.0" + } +} diff --git a/mainbrain/okcomputer-swarm/postcss.config.js b/mainbrain/okcomputer-swarm/postcss.config.js new file mode 100644 index 000000000..2e7af2b7f --- /dev/null +++ b/mainbrain/okcomputer-swarm/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/mainbrain/okcomputer-swarm/public/assets/asset-1.jpg b/mainbrain/okcomputer-swarm/public/assets/asset-1.jpg new file mode 100644 index 000000000..56fc7d1e8 Binary files /dev/null and b/mainbrain/okcomputer-swarm/public/assets/asset-1.jpg differ diff --git a/mainbrain/okcomputer-swarm/public/assets/asset-2.jpg b/mainbrain/okcomputer-swarm/public/assets/asset-2.jpg new file mode 100644 index 000000000..848628ca5 Binary files /dev/null and b/mainbrain/okcomputer-swarm/public/assets/asset-2.jpg differ diff --git a/mainbrain/okcomputer-swarm/src/App.css b/mainbrain/okcomputer-swarm/src/App.css new file mode 100644 index 000000000..b9d355df2 --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/App.css @@ -0,0 +1,42 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.react:hover { + filter: drop-shadow(0 0 2em #61dafbaa); +} + +@keyframes logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: no-preference) { + a:nth-of-type(2) .logo { + animation: logo-spin infinite 20s linear; + } +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} diff --git a/mainbrain/okcomputer-swarm/src/App.tsx b/mainbrain/okcomputer-swarm/src/App.tsx new file mode 100644 index 000000000..0fb8f7a34 --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/App.tsx @@ -0,0 +1,25 @@ +import { Routes, Route } from "react-router"; +import Layout from "@/components/Layout"; +import Home from "./pages/Home"; +import Login from "./pages/Login"; +import SwarmWorkspace from "./pages/SwarmWorkspace"; +import AgentGallery from "./pages/AgentGallery"; +import History from "./pages/History"; +import AdminDashboard from "./pages/AdminDashboard"; +import NotFound from "./pages/NotFound"; + +export default function App() { + return ( + + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + + ); +} diff --git a/mainbrain/okcomputer-swarm/src/components/AuthLayout.tsx b/mainbrain/okcomputer-swarm/src/components/AuthLayout.tsx new file mode 100644 index 000000000..a9c185cb1 --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/AuthLayout.tsx @@ -0,0 +1,266 @@ +import { useAuth } from "@/hooks/useAuth"; +import { Avatar, AvatarFallback } from "@/components/ui/avatar"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; +import { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarHeader, + SidebarInset, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarProvider, + SidebarTrigger, + useSidebar, +} from "@/components/ui/sidebar"; +import { LOGIN_PATH } from "@/const"; +import { useIsMobile } from "@/hooks/use-mobile"; +import { LayoutDashboard, LogOut, PanelLeft, Users } from "lucide-react"; +import { type CSSProperties, type ReactNode, useEffect, useRef, useState } from "react"; +import { useLocation, useNavigate } from "react-router"; +import { AuthLayoutSkeleton } from "./AuthLayoutSkeleton"; +import { Button } from "./ui/button"; + +const menuItems = [ + { icon: LayoutDashboard, label: "Page 1", path: "/" }, + { icon: Users, label: "Page 2", path: "/some-path" }, +]; + +const SIDEBAR_WIDTH_KEY = "sidebar-width"; +const DEFAULT_WIDTH = 280; +const MIN_WIDTH = 200; +const MAX_WIDTH = 480; + +export default function AuthLayout({ + children, +}: { + children: ReactNode; +}) { + const [sidebarWidth, setSidebarWidth] = useState(() => { + const saved = localStorage.getItem(SIDEBAR_WIDTH_KEY); + return saved ? parseInt(saved, 10) : DEFAULT_WIDTH; + }); + const { isLoading, user } = useAuth(); + + useEffect(() => { + localStorage.setItem(SIDEBAR_WIDTH_KEY, sidebarWidth.toString()); + }, [sidebarWidth]); + + if (isLoading) { + return ; + } + + if (!user) { + return ( +
+
+
+

+ Sign in to continue +

+

+ Access to this dashboard requires authentication. Continue to + launch the login flow. +

+
+ +
+
+ ); + } + + return ( + + + {children} + + + ); +} + +type AuthLayoutContentProps = { + children: ReactNode; + setSidebarWidth: (width: number) => void; +}; + +function AuthLayoutContent({ + children, + setSidebarWidth, +}: AuthLayoutContentProps) { + const { user, logout } = useAuth(); + const location = useLocation(); + const navigate = useNavigate(); + const { state, toggleSidebar } = useSidebar(); + const isCollapsed = state === "collapsed"; + const [isResizing, setIsResizing] = useState(false); + const sidebarRef = useRef(null); + const activeMenuItem = menuItems.find(item => item.path === location.pathname); + const isMobile = useIsMobile(); + + useEffect(() => { + if (isCollapsed) { + setIsResizing(false); + } + }, [isCollapsed]); + + useEffect(() => { + const handleMouseMove = (e: MouseEvent) => { + if (!isResizing) return; + + const sidebarLeft = sidebarRef.current?.getBoundingClientRect().left ?? 0; + const newWidth = e.clientX - sidebarLeft; + if (newWidth >= MIN_WIDTH && newWidth <= MAX_WIDTH) { + setSidebarWidth(newWidth); + } + }; + + const handleMouseUp = () => { + setIsResizing(false); + }; + + if (isResizing) { + document.addEventListener("mousemove", handleMouseMove); + document.addEventListener("mouseup", handleMouseUp); + document.body.style.cursor = "col-resize"; + document.body.style.userSelect = "none"; + } + + return () => { + document.removeEventListener("mousemove", handleMouseMove); + document.removeEventListener("mouseup", handleMouseUp); + document.body.style.cursor = ""; + document.body.style.userSelect = ""; + }; + }, [isResizing, setSidebarWidth]); + + return ( + <> +
+ + +
+ + {!isCollapsed ? ( +
+ + Navigation + +
+ ) : null} +
+
+ + + + {menuItems.map(item => { + const isActive = location.pathname === item.path; + return ( + + navigate(item.path)} + tooltip={item.label} + className={`h-10 transition-all font-normal`} + > + + {item.label} + + + ); + })} + + + + + + + + + + + + Sign out + + + + +
+
{ + if (isCollapsed) return; + setIsResizing(true); + }} + style={{ zIndex: 50 }} + /> +
+ + + {isMobile && ( +
+
+ +
+
+ + {activeMenuItem?.label ?? "Menu"} + +
+
+
+
+ )} +
{children}
+
+ + ); +} diff --git a/mainbrain/okcomputer-swarm/src/components/AuthLayoutSkeleton.tsx b/mainbrain/okcomputer-swarm/src/components/AuthLayoutSkeleton.tsx new file mode 100644 index 000000000..53f7c4754 --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/AuthLayoutSkeleton.tsx @@ -0,0 +1,46 @@ +import { Skeleton } from "./ui/skeleton"; + +export function AuthLayoutSkeleton() { + return ( +
+ {/* Sidebar skeleton */} +
+ {/* Logo area */} +
+ + +
+ + {/* Menu items */} +
+ + + +
+ + {/* User profile area at bottom */} +
+
+ +
+ + +
+
+
+
+ + {/* Main content skeleton */} +
+ {/* Content blocks */} + +
+ + + +
+ +
+
+ ); +} diff --git a/mainbrain/okcomputer-swarm/src/components/IntelligenceOrbit.tsx b/mainbrain/okcomputer-swarm/src/components/IntelligenceOrbit.tsx new file mode 100644 index 000000000..a0ef3de9a --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/IntelligenceOrbit.tsx @@ -0,0 +1,89 @@ +import { useRef, useMemo } from "react"; +import { Canvas, useFrame } from "@react-three/fiber"; +import * as THREE from "three"; + +const ORBIT_TEXT = "DISCOVER KNOWLEDGE ACTIVATE "; + +function TextRing({ + radius = 12, + fontSize = 1.2, + depth = 0.2, +}: { + radius?: number; + fontSize?: number; + depth?: number; +}) { + const groupRef = useRef(null); + + const chars = useMemo(() => ORBIT_TEXT.split(""), []); + + useFrame(({ clock }) => { + if (groupRef.current) { + groupRef.current.rotation.z = clock.getElapsedTime() * 0.2; + } + }); + + return ( + + {chars.map((char, i) => { + if (char === " ") return null; + const angle = (i / chars.length) * Math.PI * 2; + const x = Math.cos(angle) * radius; + const y = Math.sin(angle) * radius; + const rotZ = angle - Math.PI / 2; + + return ( + + {/* Use a simple box for each character as a stylized representation */} + + + + ); + })} + + {/* Haze shell - torus for glow effect */} + + + + + + ); +} + +export default function IntelligenceOrbit({ + className = "", + style = {}, +}: { + className?: string; + style?: React.CSSProperties; +}) { + return ( +
+ + + +
+ ); +} diff --git a/mainbrain/okcomputer-swarm/src/components/Layout.tsx b/mainbrain/okcomputer-swarm/src/components/Layout.tsx new file mode 100644 index 000000000..803eb82df --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/Layout.tsx @@ -0,0 +1,177 @@ +import { Link, useLocation } from "react-router"; +import { useAuth } from "@/hooks/useAuth"; +import { + Hexagon, + Search, + History, + Users, + LayoutDashboard, + LogIn, + LogOut, + User, + Menu, + X, +} from "lucide-react"; +import { useState, useEffect } from "react"; + +export default function Layout({ children }: { children: React.ReactNode }) { + const { user, logout, isAdmin } = useAuth(); + const location = useLocation(); + const [scrolled, setScrolled] = useState(false); + const [mobileOpen, setMobileOpen] = useState(false); + + useEffect(() => { + const handleScroll = () => setScrolled(window.scrollY > 20); + window.addEventListener("scroll", handleScroll); + return () => window.removeEventListener("scroll", handleScroll); + }, []); + + const isActive = (path: string) => location.pathname === path; + + const navLinks = [ + { path: "/", label: "Home", icon: Search }, + { path: "/swarm", label: "Swarm", icon: Hexagon }, + { path: "/agents", label: "Agents", icon: Users }, + { path: "/history", label: "History", icon: History }, + ...(isAdmin ? [{ path: "/admin", label: "Admin", icon: LayoutDashboard }] : []), + ]; + + return ( +
+ {/* Neural Cascade Background */} +
+ + {/* Header */} +
+
+
+ {/* Logo */} + +
+ +
+
+ + SwarmOS + + + + {/* Desktop Nav */} + + + {/* Auth */} +
+ {user ? ( +
+
+ + + {user.name || "User"} + + {isAdmin && ( + + Admin + + )} +
+ +
+ ) : ( + + + Sign In + + )} + + {/* Mobile menu toggle */} + +
+
+
+ + {/* Mobile Nav */} + {mobileOpen && ( +
+
+ {navLinks.map((link) => ( + setMobileOpen(false)} + className={`flex items-center gap-2.5 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-300 ${ + isActive(link.path) + ? "text-[#FFD600] bg-[#FFD600]/10" + : "text-[#A1A1AA] hover:text-[#FAFAFA] hover:bg-white/5" + }`} + > + + {link.label} + + ))} +
+
+ )} +
+ + {/* Main Content */} +
+ {children} +
+ + {/* Footer */} +
+
+

+ SwarmOS v2.0 // Cognitive Architecture +

+
+ + Terms + + + Privacy + +
+
+
+
+ ); +} diff --git a/mainbrain/okcomputer-swarm/src/components/NexusRibbon.tsx b/mainbrain/okcomputer-swarm/src/components/NexusRibbon.tsx new file mode 100644 index 000000000..f419a3501 --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/NexusRibbon.tsx @@ -0,0 +1,56 @@ +import { + Globe, + Database, + Cpu, + Server, + Cloud, + Zap, + Shield, + Code, + Search, + Brain, + Layers, + Radio, + Wifi, + CircuitBoard, + Network, +} from "lucide-react"; + +const DATA_NODES = [ + { label: "Indexing web sources...", icon: Globe }, + { label: "Querying knowledge graph", icon: Database }, + { label: "Neural inference active", icon: Brain }, + { label: "Vector search: 12.4M docs", icon: Search }, + { label: "GPU cluster: 8x A100", icon: Cpu }, + { label: "API latency: 23ms", icon: Zap }, + { label: "Semantic parsing", icon: Code }, + { label: "Context retrieval", icon: Layers }, + { label: "Source verification", icon: Shield }, + { label: "Edge nodes: 47 active", icon: Server }, + { label: "Cloud sync: real-time", icon: Cloud }, + { label: "Signal processing", icon: Radio }, + { label: "Mesh network: online", icon: Network }, + { label: "Bandwidth: 10Gbps", icon: Wifi }, + { label: "Circuit analysis", icon: CircuitBoard }, +]; + +export default function NexusRibbon() { + // Double the nodes for seamless loop + const allNodes = [...DATA_NODES, ...DATA_NODES]; + + return ( +
+
+ {allNodes.map((node, i) => { + const Icon = node.icon; + return ( +
+ + {node.label} +
+ ); + })} +
+
+ ); +} diff --git a/mainbrain/okcomputer-swarm/src/components/ui/accordion.tsx b/mainbrain/okcomputer-swarm/src/components/ui/accordion.tsx new file mode 100644 index 000000000..d21b65f7a --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/ui/accordion.tsx @@ -0,0 +1,64 @@ +import * as React from "react" +import * as AccordionPrimitive from "@radix-ui/react-accordion" +import { ChevronDownIcon } from "lucide-react" + +import { cn } from "@/lib/utils" + +function Accordion({ + ...props +}: React.ComponentProps) { + return +} + +function AccordionItem({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AccordionTrigger({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + svg]:rotate-180", + className + )} + {...props} + > + {children} + + + + ) +} + +function AccordionContent({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + +
{children}
+
+ ) +} + +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } diff --git a/mainbrain/okcomputer-swarm/src/components/ui/alert-dialog.tsx b/mainbrain/okcomputer-swarm/src/components/ui/alert-dialog.tsx new file mode 100644 index 000000000..935eecf3f --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/ui/alert-dialog.tsx @@ -0,0 +1,155 @@ +import * as React from "react" +import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" + +import { cn } from "@/lib/utils" +import { buttonVariants } from "@/components/ui/button" + +function AlertDialog({ + ...props +}: React.ComponentProps) { + return +} + +function AlertDialogTrigger({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogPortal({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogOverlay({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + + ) +} + +function AlertDialogHeader({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDialogFooter({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDialogTitle({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogDescription({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogAction({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogCancel({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { + AlertDialog, + AlertDialogPortal, + AlertDialogOverlay, + AlertDialogTrigger, + AlertDialogContent, + AlertDialogHeader, + AlertDialogFooter, + AlertDialogTitle, + AlertDialogDescription, + AlertDialogAction, + AlertDialogCancel, +} diff --git a/mainbrain/okcomputer-swarm/src/components/ui/alert.tsx b/mainbrain/okcomputer-swarm/src/components/ui/alert.tsx new file mode 100644 index 000000000..14213546e --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/ui/alert.tsx @@ -0,0 +1,66 @@ +import * as React from "react" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const alertVariants = cva( + "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", + { + variants: { + variant: { + default: "bg-card text-card-foreground", + destructive: + "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function Alert({ + className, + variant, + ...props +}: React.ComponentProps<"div"> & VariantProps) { + return ( +
+ ) +} + +function AlertTitle({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function AlertDescription({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} + +export { Alert, AlertTitle, AlertDescription } diff --git a/mainbrain/okcomputer-swarm/src/components/ui/aspect-ratio.tsx b/mainbrain/okcomputer-swarm/src/components/ui/aspect-ratio.tsx new file mode 100644 index 000000000..3df3fd02a --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/ui/aspect-ratio.tsx @@ -0,0 +1,11 @@ +"use client" + +import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" + +function AspectRatio({ + ...props +}: React.ComponentProps) { + return +} + +export { AspectRatio } diff --git a/mainbrain/okcomputer-swarm/src/components/ui/avatar.tsx b/mainbrain/okcomputer-swarm/src/components/ui/avatar.tsx new file mode 100644 index 000000000..b7224f001 --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/ui/avatar.tsx @@ -0,0 +1,51 @@ +import * as React from "react" +import * as AvatarPrimitive from "@radix-ui/react-avatar" + +import { cn } from "@/lib/utils" + +function Avatar({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarImage({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarFallback({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Avatar, AvatarImage, AvatarFallback } diff --git a/mainbrain/okcomputer-swarm/src/components/ui/badge.tsx b/mainbrain/okcomputer-swarm/src/components/ui/badge.tsx new file mode 100644 index 000000000..fd3a406ba --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/ui/badge.tsx @@ -0,0 +1,46 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const badgeVariants = cva( + "inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", + { + variants: { + variant: { + default: + "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90", + secondary: + "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", + destructive: + "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", + outline: + "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + }, + }, + defaultVariants: { + variant: "default", + }, + } +) + +function Badge({ + className, + variant, + asChild = false, + ...props +}: React.ComponentProps<"span"> & + VariantProps & { asChild?: boolean }) { + const Comp = asChild ? Slot : "span" + + return ( + + ) +} + +export { Badge, badgeVariants } diff --git a/mainbrain/okcomputer-swarm/src/components/ui/breadcrumb.tsx b/mainbrain/okcomputer-swarm/src/components/ui/breadcrumb.tsx new file mode 100644 index 000000000..eb88f3212 --- /dev/null +++ b/mainbrain/okcomputer-swarm/src/components/ui/breadcrumb.tsx @@ -0,0 +1,109 @@ +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { ChevronRight, MoreHorizontal } from "lucide-react" + +import { cn } from "@/lib/utils" + +function Breadcrumb({ ...props }: React.ComponentProps<"nav">) { + return