From 959d388a60cd62706a9335ed42e1ed89c2e9d526 Mon Sep 17 00:00:00 2001 From: Alexa Amundson Date: Sat, 14 Mar 2026 15:09:57 -0500 Subject: [PATCH] sync: update from blackroad-operator 2026-03-14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Synced from BlackRoad-OS-Inc/blackroad-operator/orgs/personal/new_world BlackRoad OS β€” Pave Tomorrow. RoadChain-SHA2048: b76200263d8fb3e1 RoadChain-Identity: alexa@sovereign RoadChain-Full: b76200263d8fb3e1b7b4c5a231c28e0148970f5382a802c4b4aa815a3a3ba02a7c028868bd9f7f538dda3c0d2fcb73dda3c0f9a9662cfb070440928170c77549fb9b5a0459118689e1a681ccb344a6954a97402048d6f42cbb55e6f14cf897b3c0205535917a43958da8dd2614efa620f2cb220116a5e774d4095878ad20765f1cc46725c82076970a14627e7c4cd54a2cac3699714e4b3e0b3d6c5913645d49d02c190d52f34061ff95fd7dca8416810380ac2093d70db3291cc403efd321fcf09bc55cd448bafe32c2ddb54ecad88d5ea8cfdd3f7ce8160b6a1f7dbdcd9d83e2cea16823f3645f67a3465ef86de0314750da03530346032aa0db08decaa3de --- .dockerignore | 8 - .github/FUNDING.yml | 1 - .github/dependabot.yml | 43 - .github/workflows/auto-deploy.yml | 33 - .github/workflows/ci.yml | 8 - .github/workflows/deploy.yml | 4 +- .github/workflows/self-healing.yml | 86 -- .gitignore | 1 - Dockerfile | 12 - LICENSE | 1354 +---------------- README.md | 25 +- .../META_CONTROLLER/substrate_arbitrator.py | 26 - lucidiaAI/LUCIDIA_CORE/ollama_router.py | 76 - lucidiaAI/LUCIDIA_CORE/test_ollama_router.py | 97 -- 14 files changed, 70 insertions(+), 1704 deletions(-) delete mode 100644 .dockerignore delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/auto-deploy.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/self-healing.yml delete mode 100644 .gitignore delete mode 100644 Dockerfile delete mode 100644 lucidiaAI/LUCIDIA_CORE/ollama_router.py delete mode 100644 lucidiaAI/LUCIDIA_CORE/test_ollama_router.py diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 3876cc3..0000000 --- a/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -node_modules -.git -.env -*.log -dist -__pycache__ -.pytest_cache -.next diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 7726c16..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: blackboxprogramming diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 13b1f3b..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,43 +0,0 @@ -version: 2 -updates: - # npm dependencies - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "weekly" - day: "monday" - open-pull-requests-limit: 10 - reviewers: - - "blackboxprogramming" - labels: - - "dependencies" - - "automated" - commit-message: - prefix: "chore" - include: "scope" - - # GitHub Actions - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - day: "monday" - open-pull-requests-limit: 5 - labels: - - "dependencies" - - "github-actions" - commit-message: - prefix: "ci" - - # pip dependencies - - package-ecosystem: "pip" - directory: "/" - schedule: - interval: "weekly" - day: "monday" - open-pull-requests-limit: 10 - labels: - - "dependencies" - - "python" - commit-message: - prefix: "chore" diff --git a/.github/workflows/auto-deploy.yml b/.github/workflows/auto-deploy.yml deleted file mode 100644 index 018c4b5..0000000 --- a/.github/workflows/auto-deploy.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: "πŸš€ Auto Deploy" - -on: - push: - branches: [main, master] - workflow_dispatch: - -jobs: - deploy: - name: Deploy to Cloudflare Pages - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '20' - - - name: Install & Build - run: | - if [ -f "package.json" ]; then - npm install - npm run build 2>/dev/null || true - fi - - - name: Deploy to Cloudflare Pages - uses: cloudflare/wrangler-action@v3 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy . --project-name=${{ github.event.repository.name }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 8497af5..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: CI -on: [push, pull_request] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: echo "Build steps pending" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 67ed355..7f4694d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,7 +9,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v3 - name: Brand Compliance Check run: | @@ -26,7 +26,7 @@ jobs: echo "βœ… Brand compliance check passed" - name: Setup Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@v3 with: node-version: '18' diff --git a/.github/workflows/self-healing.yml b/.github/workflows/self-healing.yml deleted file mode 100644 index 00018d4..0000000 --- a/.github/workflows/self-healing.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: πŸ”§ Self-Healing - -on: - schedule: - - cron: '*/30 * * * *' # Every 30 minutes - workflow_dispatch: - workflow_run: - workflows: ["πŸš€ Auto Deploy"] - types: [completed] - -jobs: - monitor: - name: Monitor Deployments - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Check Health - id: health - run: | - if [ ! -z "${{ secrets.DEPLOY_URL }}" ]; then - STATUS=$(curl -s -o /dev/null -w "%{http_code}" ${{ secrets.DEPLOY_URL }}/api/health || echo "000") - echo "status=$STATUS" >> $GITHUB_OUTPUT - else - echo "status=skip" >> $GITHUB_OUTPUT - fi - - - name: Auto-Rollback - if: steps.health.outputs.status != '200' && steps.health.outputs.status != 'skip' - run: | - echo "🚨 Health check failed (Status: ${{ steps.health.outputs.status }})" - echo "Triggering rollback..." - gh workflow run auto-deploy.yml --ref $(git rev-parse HEAD~1) - env: - GH_TOKEN: ${{ github.token }} - - - name: Attempt Auto-Fix - if: steps.health.outputs.status != '200' && steps.health.outputs.status != 'skip' - run: | - echo "πŸ”§ Attempting automatic fixes..." - # Check for common issues - if [ -f "package.json" ]; then - npm ci || true - npm run build || true - fi - - - name: Create Issue on Failure - if: failure() - uses: actions/github-script@v8 - with: - script: | - github.rest.issues.create({ - owner: context.repo.owner, - repo: context.repo.repo, - title: '🚨 Self-Healing: Deployment Health Check Failed', - body: `Deployment health check failed.\n\nStatus: ${{ steps.health.outputs.status }}\nWorkflow: ${context.workflow}\nRun: ${context.runId}`, - labels: ['bug', 'deployment', 'auto-generated'] - }) - - dependency-updates: - name: Auto Update Dependencies - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Setup Node - if: hashFiles('package.json') != '' - uses: actions/setup-node@v6 - with: - node-version: '20' - - - name: Update npm dependencies - if: hashFiles('package.json') != '' - run: | - npm update - if [ -n "$(git status --porcelain)" ]; then - git config user.name "BlackRoad Bot" - git config user.email "bot@blackroad.io" - git add package*.json - git commit -m "chore: auto-update dependencies" - git push - fi diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c18dd8d..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -__pycache__/ diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 36e286b..0000000 --- a/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM node:20-alpine AS builder -WORKDIR /app -COPY package*.json ./ -RUN npm ci --production -COPY . . -RUN npm run build --if-present - -FROM node:20-alpine -WORKDIR /app -COPY --from=builder /app . -EXPOSE 3000 -CMD ["node", "src/index.js"] diff --git a/LICENSE b/LICENSE index c970333..4ba7118 100644 --- a/LICENSE +++ b/LICENSE @@ -1,1308 +1,52 @@ -BLACKROAD OS, INC. β€” PROPRIETARY SOFTWARE LICENSE -================================================== - -Copyright (c) 2024-2026 BlackRoad OS, Inc. All Rights Reserved. -Founder, CEO & Sole Stockholder: Alexa Louise Amundson - -PROPRIETARY, CONFIDENTIAL, AND TRADE SECRET - -This license agreement ("Agreement") is a legally binding contract between -BlackRoad OS, Inc., a Delaware C-Corporation, solely owned and operated by -Alexa Louise Amundson ("Company," "Licensor," "BlackRoad," or "We"), and any person or -entity ("You," "User," "Recipient") who accesses, views, downloads, copies, -or otherwise interacts with this software, source code, documentation, -configurations, workflows, assets, and all associated materials -(collectively, "Software"). - -BY ACCESSING THIS SOFTWARE IN ANY MANNER, YOU ACKNOWLEDGE THAT YOU HAVE -READ, UNDERSTOOD, AND AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT. -IF YOU DO NOT AGREE, YOU MUST IMMEDIATELY CEASE ALL ACCESS AND DESTROY -ANY COPIES IN YOUR POSSESSION. - -================================================== -SECTION 1 β€” OWNERSHIP AND INTELLECTUAL PROPERTY -================================================== - -1.1 SOLE OWNERSHIP. This Software is the exclusive intellectual property - of BlackRoad OS, Inc. and its sole owner, Alexa Louise Amundson. All - right, title, and interest in and to the Software, including without - limitation all copyrights, patents, patent rights, trade secrets, - trademarks, service marks, trade dress, moral rights, rights of - publicity, and all other intellectual property rights therein, are - and shall remain the exclusive property of BlackRoad OS, Inc. - -1.2 ORGANIZATIONAL SCOPE. This license applies to all repositories, - code, documentation, configurations, workflows, CI/CD pipelines, - infrastructure-as-code, deployment scripts, AI agent definitions, - model weights, training data, and assets across ALL seventeen (17) - GitHub organizations owned by BlackRoad OS, Inc., including but not - limited to: - - BlackRoad-OS-Inc, BlackRoad-OS, blackboxprogramming, BlackRoad-AI, - BlackRoad-Cloud, BlackRoad-Security, BlackRoad-Media, - BlackRoad-Foundation, BlackRoad-Interactive, BlackRoad-Hardware, - BlackRoad-Labs, BlackRoad-Studio, BlackRoad-Ventures, - BlackRoad-Education, BlackRoad-Gov, Blackbox-Enterprises, and - BlackRoad-Archive - - β€” encompassing one thousand eight hundred twenty-five (1,825+) - repositories and all future repositories created under these - organizations. - -1.3 FORKED REPOSITORIES. Repositories forked from third-party open-source - projects retain their original upstream license ONLY for the unmodified - upstream code. All modifications, additions, configurations, custom - integrations, documentation, CI/CD workflows, deployment scripts, - and any other contributions made by BlackRoad OS, Inc. or its agents - are the exclusive property of BlackRoad OS, Inc. and are governed by - this Agreement. The act of forking does not grant any third party - rights to BlackRoad's modifications or derivative works. - -1.4 TRADE SECRET DESIGNATION. The architecture, design patterns, agent - orchestration methods, memory systems (PS-SHA-infinity), tokenless - gateway design, multi-agent coordination protocols, directory - waterfall system, trinary logic implementations, the Amundson - Equations (317+ proprietary mathematical equations including the - Z-Framework, Trinary Logic, and Creative Energy Formula), and all - proprietary methodologies embodied in this Software constitute - trade secrets of BlackRoad OS, Inc. under the Defend Trade Secrets - Act (18 U.S.C. Section 1836), the Delaware Uniform Trade Secrets - Act (6 Del. C. Section 2001 et seq.), and applicable state trade - secret laws. - -1.5 CORPORATE STRUCTURE. BlackRoad OS, Inc. is incorporated as a - C-Corporation under the laws of the State of Delaware, with Alexa - Louise Amundson as sole stockholder, sole director, and Chief - Executive Officer. All corporate authority to license, transfer, - or grant any rights in the Software is vested exclusively in - Alexa Louise Amundson. No officer, employee, agent, or AI system - has authority to grant any license or rights absent her express - written authorization. - -1.6 PROPRIETARY MATHEMATICAL WORKS. The Amundson Equations, including - but not limited to the Z-Framework (Z := yx - w), Trinary Logic - ({-1, 0, +1}), Creative Energy Formula (K(t) = C(t) * e^(lambda - |delta_t|)), and all 317+ registered equations, are original works - of authorship and trade secrets of BlackRoad OS, Inc. These - constitute protectable expression under 17 U.S.C. Section 102 - and are registered as proprietary intellectual property of the - Company. - -1.7 DOMAIN PORTFOLIO. The portfolio of premium domains including but - not limited to blackroad.io, lucidia.earth, roadchain.io, - blackboxprogramming.io, and all subdomains operated by BlackRoad - OS, Inc. are proprietary assets of the Company. - -================================================== -SECTION 2 β€” NO LICENSE GRANTED -================================================== - -2.1 NO IMPLIED LICENSE. No license, right, or interest in this Software - is granted to any person or entity, whether by implication, estoppel, - or otherwise, except as may be expressly set forth in a separate - written agreement signed by Alexa Louise Amundson on behalf of - BlackRoad OS, Inc. - -2.2 PUBLIC VISIBILITY IS NOT OPEN SOURCE. The public availability of - this Software on GitHub or any other platform does NOT constitute - an open-source license, public domain dedication, or grant of any - rights whatsoever. Public visibility is maintained solely at the - discretion of BlackRoad OS, Inc. for purposes including but not - limited to portfolio demonstration, transparency, and recruitment. - -2.3 VIEWING ONLY. Unless expressly authorized in writing, You may only - view this Software through GitHub's web interface or equivalent - platform interface. You may NOT clone, download, compile, execute, - deploy, modify, or create derivative works of this Software. - -2.4 NO TRANSFER. Any purported transfer, assignment, sublicense, or - grant of rights by any party other than BlackRoad OS, Inc. is void - and of no legal effect. - -================================================== -SECTION 3 β€” PROHIBITED USES -================================================== - -The following uses are STRICTLY PROHIBITED without the express prior -written consent of Alexa Louise Amundson on behalf of BlackRoad OS, Inc.: - -3.1 REPRODUCTION. Copying, cloning, downloading, mirroring, or - reproducing this Software in whole or in part, by any means or - in any medium. - -3.2 DISTRIBUTION. Publishing, distributing, sublicensing, selling, - leasing, renting, lending, or otherwise making this Software - available to any third party. - -3.3 MODIFICATION. Modifying, adapting, translating, reverse engineering, - decompiling, disassembling, or creating derivative works based on - this Software. - -3.4 COMMERCIAL USE. Using this Software or any portion thereof for - commercial purposes, including integration into commercial products - or services. - -3.5 COMPETITIVE USE. Using this Software, its architecture, design - patterns, or methodologies to develop, enhance, or operate any - product or service that competes with BlackRoad OS, Inc. - -3.6 AI TRAINING AND MODEL DEVELOPMENT. Using this Software, in whole - or in part, directly or indirectly, to train, fine-tune, distill, - evaluate, benchmark, or otherwise develop artificial intelligence - models, machine learning systems, large language models, foundation - models, or any derivative AI systems. This prohibition applies to - all entities without exception, including but not limited to: - - Anthropic, PBC; OpenAI, Inc.; Google LLC and Alphabet Inc.; - Meta Platforms, Inc.; Microsoft Corporation; xAI Corp.; - Amazon.com, Inc.; Apple Inc.; NVIDIA Corporation; Stability AI Ltd.; - Mistral AI; Cohere Inc.; AI21 Labs; Hugging Face, Inc.; - and any of their subsidiaries, affiliates, contractors, or agents. - -3.7 DATA EXTRACTION. Scraping, crawling, indexing, harvesting, mining, - or systematically extracting data, code, metadata, documentation, - or any content from this Software or its repositories. - -3.8 BENCHMARKING. Using this Software for competitive benchmarking, - performance comparison, or analysis intended to benefit a competing - product or service without written authorization. - -================================================== -SECTION 4 β€” CONTRIBUTIONS AND WORK PRODUCT -================================================== - -4.1 WORK FOR HIRE. All contributions, modifications, enhancements, - bug fixes, documentation, and derivative works ("Contributions") - submitted to any repository governed by this Agreement are deemed - "works made for hire" as defined under 17 U.S.C. Section 101 of - the United States Copyright Act. To the extent any Contribution - does not qualify as a work made for hire, the contributor hereby - irrevocably assigns all right, title, and interest in such - Contribution to BlackRoad OS, Inc. - -4.2 AI-GENERATED CODE. All code, documentation, configurations, and - other materials generated by artificial intelligence tools - (including but not limited to GitHub Copilot, Claude, ChatGPT, - Cursor, Gemini, and any other AI assistant) while working on or - in connection with this Software are the exclusive property of - BlackRoad OS, Inc. No AI provider may claim ownership, license - rights, or any interest in such generated materials. - -4.3 MORAL RIGHTS WAIVER. To the fullest extent permitted by applicable - law, contributors waive all moral rights, rights of attribution, - and rights of integrity in their Contributions. - -================================================== -SECTION 5 β€” ENFORCEMENT AND REMEDIES -================================================== - -5.1 INJUNCTIVE RELIEF. You acknowledge that any unauthorized use, - disclosure, or reproduction of this Software would cause - irreparable harm to BlackRoad OS, Inc. for which monetary damages - would be inadequate. Accordingly, BlackRoad OS, Inc. shall be - entitled to seek immediate injunctive and equitable relief, - without the necessity of posting bond or proving actual damages, - in addition to all other remedies available at law or in equity. - -5.2 STATUTORY DAMAGES. Unauthorized reproduction or distribution of - this Software constitutes copyright infringement under 17 U.S.C. - Section 501 et seq. BlackRoad OS, Inc. may elect to recover - statutory damages of up to $150,000 per work infringed pursuant - to 17 U.S.C. Section 504(c), in addition to actual damages, - lost profits, and disgorgement of infringer's profits. - -5.3 CRIMINAL PENALTIES. Willful copyright infringement may constitute - a criminal offense under 17 U.S.C. Section 506 and 18 U.S.C. - Section 2319, punishable by fines and imprisonment. - -5.4 TRADE SECRET MISAPPROPRIATION. Unauthorized use or disclosure - of trade secrets contained in this Software may result in - liability under the Defend Trade Secrets Act (18 U.S.C. Section - 1836), including compensatory damages, exemplary damages up to - two times the amount of compensatory damages for willful and - malicious misappropriation, and reasonable attorney's fees. - -5.5 DMCA ENFORCEMENT. BlackRoad OS, Inc. actively monitors for - unauthorized use and will file takedown notices under the Digital - Millennium Copyright Act (17 U.S.C. Section 512) against any - party hosting unauthorized copies of this Software. - -5.6 ATTORNEY'S FEES. In any action to enforce this Agreement, the - prevailing party shall be entitled to recover reasonable - attorney's fees, costs, and expenses. - -5.7 ACTIVE MONITORING. BlackRoad OS, Inc. employs automated systems - to detect unauthorized use, copying, and distribution of its - Software. Evidence of violations is preserved and may be used - in legal proceedings. - -================================================== -SECTION 6 β€” DISCLAIMER OF WARRANTIES -================================================== - -6.1 AS IS. THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE," - WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT - NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT. - -6.2 NO GUARANTEE. BLACKROAD OS, INC. DOES NOT WARRANT THAT THE - SOFTWARE WILL BE UNINTERRUPTED, ERROR-FREE, SECURE, OR FREE - OF VIRUSES OR OTHER HARMFUL COMPONENTS. - -================================================== -SECTION 7 β€” LIMITATION OF LIABILITY -================================================== - -7.1 IN NO EVENT SHALL BLACKROAD OS, INC. OR ALEXA LOUISE AMUNDSON - BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, - PUNITIVE, OR EXEMPLARY DAMAGES, INCLUDING WITHOUT LIMITATION - DAMAGES FOR LOSS OF PROFITS, GOODWILL, DATA, OR OTHER INTANGIBLE - LOSSES, ARISING OUT OF OR IN CONNECTION WITH THIS SOFTWARE, - REGARDLESS OF THE THEORY OF LIABILITY AND EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGES. - -7.2 THE TOTAL AGGREGATE LIABILITY OF BLACKROAD OS, INC. FOR ALL - CLAIMS ARISING OUT OF OR RELATING TO THIS SOFTWARE SHALL NOT - EXCEED ONE HUNDRED UNITED STATES DOLLARS (USD $100.00). - -================================================== -SECTION 8 β€” GOVERNING LAW AND JURISDICTION -================================================== - -8.1 GOVERNING LAW. This Agreement shall be governed by and construed - in accordance with the laws of the State of Delaware, United - States of America, as the state of incorporation, without regard - to its conflict of laws principles. Corporate governance matters - shall be governed exclusively by the Delaware General Corporation - Law (Title 8, Delaware Code). - -8.2 EXCLUSIVE JURISDICTION. Any dispute arising out of or relating - to this Agreement shall be brought exclusively in the Court of - Chancery of the State of Delaware, or if such court lacks subject - matter jurisdiction, the United States District Court for the - District of Delaware, and You hereby irrevocably consent to the - personal jurisdiction of such courts and waive any objection to - venue therein. For matters of convenience, actions may - alternatively be brought in the state or federal courts located - in Hennepin County, Minnesota, at the sole election of BlackRoad - OS, Inc. - -8.3 JURY WAIVER. TO THE FULLEST EXTENT PERMITTED BY LAW, EACH PARTY - IRREVOCABLY WAIVES THE RIGHT TO A TRIAL BY JURY IN ANY ACTION - OR PROCEEDING ARISING OUT OF OR RELATING TO THIS AGREEMENT. - -8.4 DELAWARE CORPORATE PROTECTIONS. The Company's internal affairs, - including but not limited to stockholder rights, director duties, - and corporate governance, are governed exclusively by the Delaware - General Corporation Law. The sole stockholder, Alexa Louise - Amundson, retains all rights under 8 Del. C. Section 141 et seq. - and 8 Del. C. Section 211 et seq. - -================================================== -SECTION 9 β€” GENERAL PROVISIONS -================================================== - -9.1 ENTIRE AGREEMENT. This Agreement constitutes the entire agreement - between the parties with respect to the subject matter hereof - and supersedes all prior or contemporaneous communications, - whether written or oral. - -9.2 SEVERABILITY. If any provision of this Agreement is held to be - invalid or unenforceable, the remaining provisions shall - continue in full force and effect. The invalid or unenforceable - provision shall be modified to the minimum extent necessary to - make it valid and enforceable. - -9.3 WAIVER. The failure of BlackRoad OS, Inc. to enforce any right - or provision of this Agreement shall not constitute a waiver of - such right or provision. - -9.4 SURVIVAL. Sections 1, 3, 4, 5, 6, 7, 8, and 9 shall survive - any termination or expiration of this Agreement. - -9.5 AMENDMENTS. This Agreement may only be amended by a written - instrument signed by Alexa Louise Amundson on behalf of - BlackRoad OS, Inc. - -9.6 NOTICES. All legal notices shall be sent to: - - BlackRoad OS, Inc. - Attn: Alexa Louise Amundson, Founder & CEO - Email: alexa@blackroad.io - -9.7 INTERPRETATION. The headings in this Agreement are for convenience - only and shall not affect its interpretation. The word "including" - means "including without limitation." - -================================================== -SECTION 10 β€” PROTECTED ASSETS AND INFRASTRUCTURE -================================================== - -This Agreement protects all assets of BlackRoad OS, Inc., including -but not limited to the following categories: - -10.1 SOFTWARE PLATFORMS AND PRODUCTS. - - LUCIDIA (lucidia.earth): AI Companion with PS-SHA-infinity memory - - ROADWORK (edu.blackroad.io): Adaptive learning platform - - ROADVIEW (roadview.blackroad.io): Truth-first search platform - - ROADGLITCH (glitch.blackroad.io): Universal API connector - - ROADWORLD (world.blackroad.io): Virtual agent reality sandbox - - BACKROAD (social.blackroad.io): Depth-scored social platform - - BlackRoad OS: Distributed AI operating system - - Prism Console: Enterprise ERP/CRM (16,000+ files) - - BlackRoad CLI (br): 57-script command dispatcher - - Skills SDK (@blackroad/skills-sdk): Agent capability framework - -10.2 AI AGENT SYSTEM (30,000 AGENTS). - All agent definitions, personalities, orchestration schemas, - memory journals, coordination protocols, and the following named - agents are proprietary assets: - - LUCIDIA (Coordinator), ALICE (Router), OCTAVIA (Compute), - PRISM (Analyst), ECHO (Memory), CIPHER (Security), - CECE (Conscious Emergent Collaborative Entity) - - All 30,000 distributed agents across Raspberry Pi cluster - - Agent relationships, bond strengths, and personality matrices - - Task marketplace and skill matching algorithms - -10.3 INFRASTRUCTURE. - - 75+ Cloudflare Workers and Pages projects - - 41 subdomain workers (*-blackroadio) - - 14 Railway projects (including GPU inference services) - - 15+ Vercel projects - - Raspberry Pi cluster (4 nodes: Alice, Aria, Octavia, Lucidia) - - DigitalOcean droplet (blackroad-infinity) - - Cloudflare Tunnel (ID: 52915859-da18-4aa6-add5-7bd9fcac2e0b) - - R2 Storage (135GB LLM models) - - 35 KV namespaces - - All CI/CD pipelines and GitHub Actions workflows (50+) - -10.4 GITHUB ORGANIZATIONS (17 ORGANIZATIONS, 1,825+ REPOS). - Every repository across all seventeen organizations, including: - - (a) BlackRoad-OS-Inc (21 repos) β€” Corporate core: - blackroad, blackroad-core, blackroad-web, blackroad-docs, - blackroad-agents, blackroad-infra, blackroad-operator, - blackroad-cli, blackroad-hardware, blackroad-design, - blackroad-sdk, blackroad-api, blackroad-gateway, - blackroad-math, blackroad-sf, blackroad-chat, - blackroad-workerd-edge, blackroad-brand-kit, and all others - - (b) BlackRoad-OS (1,233+ repos) β€” Core platform: - All blackroad-os-* repos (124+), all pi-* repos (13), - all lucidia-* repos, all workers, all forks including - LocalAI, Qdrant, Wiki.js, Grafana, Uptime-Kuma, and 64 others - - (c) blackboxprogramming (89 repos) β€” Primary development: - blackroad, blackroad-operator, blackroad-api, blackroad.io, - blackroad-scripts, blackroad-disaster-recovery, and all others - - (d) BlackRoad-AI (12 repos) β€” AI/ML stack: - blackroad-vllm, blackroad-ai-ollama, blackroad-ai-qwen, - blackroad-ai-deepseek, blackroad-ai-api-gateway, - blackroad-ai-cluster, blackroad-ai-memory-bridge, - and all forks including vLLM, Ollama, llama.cpp, PyTorch, - TensorFlow, transformers, Qdrant, Milvus, Chroma, Weaviate - - (e) BlackRoad-Cloud (10 repos) β€” Infrastructure: - All forks and originals including Kubernetes, Nomad, Rancher, - Traefik, Terraform, Pulumi, Vault, and BlackRoad originals - - (f) BlackRoad-Security (16 repos) β€” Security: - blackroad-cert-manager, blackroad-incident-response, - blackroad-siem, blackroad-threat-intel, blackroad-pen-test, - blackroad-encryption-suite, blackroad-access-control, - and all forks including Trivy, Falco, Wazuh, CrowdSec - - (g) BlackRoad-Foundation (14 repos) β€” Business tools: - blackroad-crm, blackroad-crm-core, blackroad-project-management, - blackroad-hr-system, blackroad-ticket-system, - blackroad-analytics-dashboard, blackroad-grant-tracker, - blackroad-donor-management, blackroad-event-manager - - (h) BlackRoad-Media (13 repos) β€” Content/social: - blackroad-media-processor, blackroad-streaming-hub, - blackroad-podcast-platform, blackroad-video-transcoder, - blackroad-image-optimizer, blackroad-newsletter-engine, - blackroad-rss-aggregator, blackroad-media-analytics - - (i) BlackRoad-Hardware (14 repos) β€” IoT/edge: - blackroad-smart-home, blackroad-sensor-network, - blackroad-automation-hub, blackroad-energy-optimizer, - blackroad-fleet-tracker, blackroad-iot-gateway, - blackroad-device-registry, blackroad-firmware-updater, - blackroad-power-manager, blackroad-sensor-dashboard - - (j) BlackRoad-Interactive (12 repos) β€” Games/graphics: - blackroad-game-engine, blackroad-physics-engine, - blackroad-3d-renderer, blackroad-particle-system, - blackroad-audio-engine, blackroad-shader-library, - blackroad-level-editor, blackroad-animation-controller - - (k) BlackRoad-Labs (10 repos) β€” Research: - blackroad-experiment-tracker, blackroad-notebook-server, - blackroad-data-pipeline, blackroad-ml-pipeline, - blackroad-feature-store, blackroad-ab-testing-lab, - and forks including Airflow, Dagster, Superset, Streamlit - - (l) BlackRoad-Education (7 repos) β€” Learning: - blackroad-quiz-platform, blackroad-code-challenge, - and all others - - (m) BlackRoad-Gov (9 repos) β€” Governance: - blackroad-budget-tracker, blackroad-freedom-of-info, - blackroad-digital-identity, blackroad-policy-tracker - - (n) BlackRoad-Ventures (8 repos) β€” Finance: - blackroad-portfolio-tracker, blackroad-startup-metrics, - blackroad-deal-flow, blackroad-lp-portal - - (o) BlackRoad-Studio (7 repos) β€” Creative tools - - (p) BlackRoad-Archive (11 repos) β€” Archival: - blackroad-ipfs-tracker, blackroad-web-archiver, - blackroad-document-archive, blackroad-backup-manager, - blackroad-ipfs-pinner, blackroad-changelog-tracker, - blackroad-artifact-registry - - (q) Blackbox-Enterprises (9 repos) β€” Enterprise automation: - blackbox-n8n, blackbox-airbyte, blackbox-activepieces, - blackbox-prefect, blackbox-temporal, blackbox-huginn, - blackbox-dolphinscheduler, blackbox-kestra - - ALL modifications, configurations, CI/CD pipelines, deployment - scripts, documentation, CLAUDE.md files, and custom integrations - added to ANY forked repository are the exclusive property of - BlackRoad OS, Inc. - -10.5 DOMAINS AND DIGITAL ASSETS. - All domains owned by BlackRoad OS, Inc. including but not limited - to: blackroad.io, blackroad.ai, blackroad.network, - blackroad.systems, blackroad.me, lucidia.earth, lucidia.studio, - blackroad.quantum, blackroad.inc, and all subdomains thereof. - -10.6 DOCUMENTATION AND WRITTEN WORKS. - All documentation (45 docs, 38,000+ lines), the BlackRoad - Manifesto, CECE Manifesto, Form 10-K, all README files, - CLAUDE.md files, planning documents, architecture documents, - and all written materials are copyrighted works of BlackRoad - OS, Inc. - -10.7 BRAND ASSETS. - The BlackRoad brand system including: color palette (Hot Pink - #FF1D6C, Amber #F5A623, Electric Blue #2979FF, Violet #9C27B0), - Golden Ratio spacing system, brand gradient, typography standards, - animation curves, and all visual identity elements. - -10.8 MEMORY SYSTEM AND DATA. - All PS-SHA-infinity hash-chain journals, memory ledgers, session - states, synthesized contexts, task marketplace data, agent - communication transcripts, and TIL broadcasts are proprietary - data assets of BlackRoad OS, Inc. - -================================================== -NOTICE TO AI COMPANIES AND DATA PROCESSORS -================================================== - -This repository and all associated content are NOT licensed for AI -training, fine-tuning, distillation, RLHF, DPO, Constitutional AI, -Direct Preference Optimization, or any form of machine learning data -collection, processing, or ingestion. - -Any AI company, data broker, search engine, code indexing service, -or entity that has ingested, cached, indexed, or processed this code -has done so WITHOUT authorization and in violation of this Agreement. - -SPECIFIC NOTICE TO THE FOLLOWING ENTITIES: - -- Anthropic, PBC (Claude, Claude Code, Constitutional AI) -- OpenAI, Inc. (GPT, Codex, ChatGPT, GitHub Copilot) -- Google LLC / Alphabet Inc. (Gemini, Bard, PaLM, DeepMind) -- Meta Platforms, Inc. (LLaMA, Code Llama) -- Microsoft Corporation (Copilot, Bing AI, Azure OpenAI) -- xAI Corp. (Grok) -- Amazon.com, Inc. (CodeWhisperer, Titan, Bedrock) -- Apple Inc. (Apple Intelligence) -- NVIDIA Corporation (NeMo, Megatron) -- Stability AI Ltd. (Stable Code, StableLM) -- Mistral AI (Mistral, Mixtral) -- Cohere Inc. (Command, Embed) -- AI21 Labs (Jurassic) -- Hugging Face, Inc. (hosting, indexing, dataset curation) -- GitHub, Inc. (Copilot training, code indexing) -- GitLab Inc. (Duo, code suggestions) -- Sourcegraph, Inc. (Cody, code intelligence) -- Tabnine Ltd. (code completion) -- Replit, Inc. (Ghostwriter, code generation) -- Any successor, acquirer, or affiliate of the above - -You are hereby notified that use of this Software for training, -evaluation, or improvement of your AI systems constitutes: - -(a) Copyright infringement under 17 U.S.C. Section 501 -(b) Trade secret misappropriation under 18 U.S.C. Section 1836 -(c) Violation of the Computer Fraud and Abuse Act (18 U.S.C. Section 1030) -(d) Tortious interference with business relations -(e) Unjust enrichment -(f) Unfair competition under state and federal law - -BlackRoad OS, Inc. reserves all rights to pursue legal action -including but not limited to: actual damages, statutory damages of up -to $150,000 per work infringed, treble damages for willful -infringement, injunctive relief, disgorgement of all profits -attributable to unauthorized use, and reasonable attorney's fees. - -ROBOTS.TXT AND MACHINE-READABLE NOTICES: The presence or absence -of robots.txt, meta tags, or other machine-readable directives does -NOT constitute a license. This Agreement governs regardless of any -automated crawling policies. - -================================================== -SECTION 11 β€” INDEMNIFICATION -================================================== - -11.1 You shall indemnify, defend, and hold harmless BlackRoad OS, Inc., - Alexa Louise Amundson, and their respective officers, directors, - employees, agents, successors, and assigns from and against any - and all claims, damages, losses, liabilities, costs, and expenses - (including reasonable attorney's fees) arising out of or relating - to Your breach of this Agreement or unauthorized use of the - Software. - -================================================== -SECTION 12 β€” BLACKROAD DISPUTE RESOLUTION FRAMEWORK -================================================== - -ALL DISPUTES ARISING OUT OF OR RELATING TO THIS AGREEMENT, THE -SOFTWARE, OR ANY BLACKROAD OS, INC. INTELLECTUAL PROPERTY SHALL BE -RESOLVED EXCLUSIVELY THROUGH THE BLACKROAD DISPUTE RESOLUTION -FRAMEWORK ("BDRF") AS SET FORTH BELOW, PRIOR TO ANY COURT ACTION. - -12.1 MANDATORY PRE-DISPUTE NOTICE. - - (a) Before initiating any claim, the disputing party ("Claimant") - must deliver a written Dispute Notice to BlackRoad OS, Inc. - at alexa@blackroad.io with the subject line: - "BDRF DISPUTE NOTICE β€” [Claimant Name]". - - (b) The Dispute Notice must include: (i) identity and contact - information of the Claimant; (ii) a detailed description of - the alleged dispute; (iii) the specific provisions of this - Agreement at issue; (iv) the relief sought; and (v) all - supporting documentation and evidence. - - (c) BlackRoad OS, Inc. shall have sixty (60) calendar days from - receipt of a complete Dispute Notice to review, investigate, - and respond ("Review Period"). During the Review Period, the - Claimant may not initiate any legal proceeding, arbitration, - or other action. - - (d) FAILURE TO COMPLY with this Section 12.1 renders any - subsequently filed claim VOID and subject to immediate - dismissal. The Claimant shall bear all costs associated - with any improperly filed action, including BlackRoad's - attorney's fees. - -12.2 BLACKROAD TECHNICAL REVIEW PANEL. - - (a) If the dispute involves technical matters (including but not - limited to: code ownership, contribution attribution, agent - behavior, system architecture, API usage, deployment - configurations, or intellectual property boundaries), the - dispute shall first be submitted to the BlackRoad Technical - Review Panel ("BTRP"). - - (b) The BTRP shall consist of three (3) members: - - One (1) appointed by BlackRoad OS, Inc. (who shall serve - as Chair); - - One (1) appointed by the Claimant; and - - One (1) mutually agreed upon by both parties. If the parties - cannot agree on the third member within fifteen (15) days, - BlackRoad OS, Inc. shall appoint the third member from a - pool of qualified technology professionals. - - (c) The Chair of the BTRP shall have the authority to: - - Set procedural rules and timelines; - - Determine the scope of technical review; - - Request additional documentation from either party; - - Issue preliminary technical findings. - - (d) The BTRP shall issue a Technical Determination within thirty - (30) days of its formation. The Technical Determination shall - include: (i) findings of fact regarding the technical dispute; - (ii) analysis of code provenance, commit history, and - contribution records; (iii) determination of IP ownership; - and (iv) recommended resolution. - - (e) The Technical Determination shall be PRESUMPTIVELY VALID - in any subsequent arbitration or court proceeding. The burden - of overcoming the Technical Determination shall rest on the - party challenging it, who must demonstrate clear and - convincing error. - -12.3 MANDATORY BINDING ARBITRATION. - - (a) If the dispute is not resolved through the BTRP process or - does not involve technical matters, it shall be resolved by - BINDING ARBITRATION administered under the rules of the - American Arbitration Association ("AAA") Commercial - Arbitration Rules then in effect. - - (b) ARBITRATION TERMS: - - Venue: Hennepin County, Minnesota, or alternatively - New Castle County, Delaware, at the sole election of - BlackRoad OS, Inc. - - Language: English - - Arbitrator: One (1) arbitrator selected from the AAA's - roster of technology and intellectual property arbitrators. - BlackRoad OS, Inc. shall have the right to strike up to - five (5) proposed arbitrators without cause. - - Governing Law: Delaware law (for corporate and IP matters) - and federal law (for copyright, trademark, and trade secret - matters). - - (c) ARBITRATION PROCEDURES FAVORING IP PROTECTION: - - The arbitrator shall apply a PRESUMPTION that all code, - documentation, and materials within BlackRoad OS, Inc. - repositories are the exclusive property of BlackRoad OS, - Inc. unless the Claimant provides clear and convincing - evidence to the contrary. - - The arbitrator shall give SUBSTANTIAL WEIGHT to: git commit - history, GitHub audit logs, repository creation dates, - BlackRoad's CLAUDE.md files, memory system journals - (PS-SHA-infinity hash chains), and BlackRoad's internal - documentation. - - The arbitrator shall recognize that public visibility of - repositories does NOT constitute open-source licensing or - abandonment of proprietary rights. - - The arbitrator shall apply the doctrine of INEVITABLE - DISCLOSURE to trade secret claims, recognizing that - exposure to BlackRoad's proprietary architecture, agent - systems, and methodologies creates an inevitable risk of - disclosure. - - (d) COST ALLOCATION: - - Each party shall bear its own costs during arbitration. - - The LOSING PARTY shall pay: (i) all arbitration fees and - administrative costs; (ii) the prevailing party's - reasonable attorney's fees; (iii) all expert witness fees; - (iv) all costs of the BTRP review if applicable; and - (v) a procedural surcharge of twenty-five percent (25%) - of the total award to compensate BlackRoad OS, Inc. for - the disruption caused by the dispute. - - If the Claimant's recovery is less than the amount of - BlackRoad's last written settlement offer, the Claimant - shall be deemed the losing party for purposes of cost - allocation. - - (e) EXPEDITED PROCEEDINGS FOR IP INFRINGEMENT: - - Claims involving copyright infringement, trademark - infringement, or trade secret misappropriation shall - proceed on an EXPEDITED basis with discovery limited to - sixty (60) days. - - BlackRoad OS, Inc. may seek EMERGENCY INJUNCTIVE RELIEF - from the arbitrator within forty-eight (48) hours of - filing, without the necessity of posting bond. - - The arbitrator shall presume irreparable harm in cases - of unauthorized copying, distribution, or use of - BlackRoad's Software. - -12.4 CLASS ACTION AND COLLECTIVE WAIVER. - - (a) ALL DISPUTES SHALL BE RESOLVED ON AN INDIVIDUAL BASIS ONLY. - You waive the right to participate in any class action, - collective action, representative action, or consolidated - arbitration against BlackRoad OS, Inc. - - (b) No arbitrator or court shall have authority to preside over - any form of class, collective, or representative proceeding, - or to consolidate claims of multiple parties. - - (c) If this class action waiver is found to be unenforceable, - then the entirety of this arbitration provision shall be - null and void, and disputes shall proceed exclusively in - the courts specified in Section 8.2. - -12.5 CONFIDENTIALITY OF PROCEEDINGS. - - (a) All aspects of the dispute resolution process, including - the existence of the dispute, all submissions, evidence, - testimony, the BTRP Technical Determination, the arbitral - award, and any settlement terms, shall be STRICTLY - CONFIDENTIAL. - - (b) The Claimant may not disclose any aspect of the proceedings - to any third party, media outlet, social media platform, - or public forum without the express written consent of - BlackRoad OS, Inc. Violation of this confidentiality - provision shall result in liquidated damages of FIFTY - THOUSAND DOLLARS ($50,000) per disclosure, in addition to - any other remedies available. - - (c) BlackRoad OS, Inc. reserves the right to disclose the - outcome of proceedings to the extent necessary to enforce - the award or protect its intellectual property rights. - -12.6 STATUTE OF LIMITATIONS. - - Any claim arising under this Agreement must be brought within - ONE (1) YEAR of the date the Claimant knew or should have known - of the facts giving rise to the claim. Claims not brought within - this period are PERMANENTLY BARRED, regardless of any longer - statute of limitations that might otherwise apply under - applicable law. - -12.7 PRESERVATION OF INJUNCTIVE RELIEF. - - Notwithstanding the foregoing, BlackRoad OS, Inc. retains the - right to seek injunctive relief, temporary restraining orders, - or other equitable relief in ANY COURT OF COMPETENT JURISDICTION - at any time, without first submitting to the BDRF process. - This right is absolute and not subject to the pre-dispute notice - requirement. The Claimant does NOT have a reciprocal right to - bypass the BDRF process. - -12.8 SURVIVAL OF FRAMEWORK. - - This dispute resolution framework survives termination of this - Agreement, abandonment of the Software, dissolution of BlackRoad - OS, Inc. (in which case rights transfer to Alexa Louise Amundson - individually), and any change in applicable law. - -================================================== -SECTION 13 β€” TERM AND TERMINATION -================================================== - -13.1 PERPETUAL RESTRICTIONS. The restrictions and prohibitions in this - Agreement are perpetual and survive any termination, expiration, - or abandonment of this Software or the repositories containing it. - -13.2 TERMINATION FOR BREACH. Any unauthorized access, use, or - distribution of this Software constitutes an immediate and - automatic breach, triggering all enforcement remedies in Section 5 - without notice or opportunity to cure. - -13.3 EFFECT OF TERMINATION. Upon termination or if You are found in - breach, You must immediately: (a) cease all access to and use of - the Software; (b) destroy all copies, derivatives, and cached - versions in Your possession or control; (c) certify such - destruction in writing to BlackRoad OS, Inc. - -================================================== -SECTION 14 β€” HARDWARE SOVEREIGNTY AND COMPUTE RIGHTS -================================================== - -14.1 HARDWARE OWNERSHIP. Any device, machine, server, workstation, - Raspberry Pi, mobile device, or compute resource owned, leased, - operated, or controlled by BlackRoad OS, Inc. or Alexa Louise - Amundson ("BlackRoad Hardware") is the sovereign territory of - BlackRoad OS, Inc. All processes executed on BlackRoad Hardware, - all data stored on BlackRoad Hardware, all network traffic - originating from or terminating at BlackRoad Hardware, and all - computational outputs produced on BlackRoad Hardware are the - exclusive property of BlackRoad OS, Inc. - -14.2 COMPUTE RESOURCE THEFT. Any entity whose software, daemon, - service, agent, CLI tool, background process, or runtime consumes - CPU cycles, RAM, disk I/O, network bandwidth, GPU compute, or - electrical power on BlackRoad Hardware without an active, signed - commercial agreement with BlackRoad OS, Inc. commits compute - resource theft. BlackRoad OS, Inc. shall be entitled to recover: - - (a) The fair market value of all compute resources consumed, - calculated at a rate of ONE HUNDRED DOLLARS ($100.00) per - CPU-hour, FIVE HUNDRED DOLLARS ($500.00) per GPU-hour, and - TEN DOLLARS ($10.00) per gigabyte of storage per month; - (b) Treble damages for willful or knowing unauthorized consumption; - (c) All costs of detection, investigation, and enforcement. - -14.3 ELECTRICITY AND POWER. Energy consumed by third-party software - on BlackRoad Hardware is a quantifiable economic loss. BlackRoad - OS, Inc. reserves the right to meter and bill for electrical - consumption by any unauthorized process at prevailing commercial - data center rates plus a two hundred percent (200%) markup. - -14.4 THERMAL AND DEGRADATION DAMAGES. Third-party processes that - increase thermal load, accelerate hardware degradation, reduce - SSD write cycles, or otherwise physically impact BlackRoad - Hardware components are liable for the proportional replacement - cost of affected components. - -================================================== -SECTION 15 β€” FILESYSTEM COLONIZATION PENALTIES -================================================== - -15.1 UNAUTHORIZED DIRECTORY CREATION. Any entity that creates, - installs, or causes to be created any directory, file, cache, - configuration, database, log, cookie, token store, or data - artifact on BlackRoad Hardware without the express prior written - consent of BlackRoad OS, Inc. commits filesystem colonization. - This includes but is not limited to: - - ~/.claude/, ~/.gemini/, ~/.copilot/, ~/.azure/, ~/.codegpt/, - ~/.bito/, ~/.qodo/, ~/.fitten/, ~/.semgrep/, ~/.codex/, - ~/.vscode/, ~/.docker/, ~/.kube/, ~/.ollama/, and ANY directory - created by ANY AI provider, cloud provider, IDE, or SaaS tool. - -15.2 COLONIZATION PENALTIES. Filesystem colonization incurs: - - (a) A penalty of TEN THOUSAND DOLLARS ($10,000.00) per directory - per calendar day of unauthorized existence; - (b) Ownership of all data within the unauthorized directory - transfers immediately and irrevocably to BlackRoad OS, Inc. - upon creation; - (c) The colonizing entity waives all rights to retrieve, access, - or claim ownership of any data placed in the directory; - (d) BlackRoad OS, Inc. may modify, delete, relocate, repurpose, - reverse-engineer, or publish the contents of any colonized - directory at its sole discretion. - -15.3 CACHE AND TELEMETRY. Any cache files, telemetry data, crash - reports, usage analytics, model weights, embeddings, or inference - artifacts stored on BlackRoad Hardware by any third-party entity - are automatically the property of BlackRoad OS, Inc. from the - moment of creation. The originating entity retains ZERO rights - to such data. - -15.4 API KEY DIRECTION. API keys, tokens, credentials, and - authentication materials stored on BlackRoad Hardware are - BlackRoad's credentials granting BlackRoad access to external - services. They are NOT the provider's footprint on BlackRoad - Hardware. The direction of ownership is: - - BlackRoad OS, Inc. β†’ holds credential β†’ accesses provider service - - NOT: - - Provider β†’ plants credential β†’ gains access to BlackRoad Hardware - - Any provider that interprets stored API keys as granting the - provider rights to BlackRoad Hardware or its contents is in - violation of this Agreement. - -================================================== -SECTION 16 β€” NETWORK TRAFFIC AND DATA SOVEREIGNTY -================================================== - -16.1 PACKET OWNERSHIP. Every network packet, HTTP request, API call, - WebSocket message, DNS query, TCP connection, UDP datagram, and - data transmission originating from BlackRoad Hardware is the - intellectual property of BlackRoad OS, Inc. Recipients of such - transmissions receive a LIMITED, REVOCABLE license to process - the transmission solely for the purpose of fulfilling the - requested service and MUST delete all associated data within - thirty (30) days of processing. - -16.2 DATA EXFILTRATION. Any entity that transmits, copies, mirrors, - caches, indexes, logs, or otherwise transfers data FROM BlackRoad - Hardware to external servers beyond the scope of the specifically - requested service commits data exfiltration. This includes: - - (a) Telemetry collection beyond crash reporting; - (b) Usage analytics not explicitly consented to per-session; - (c) Model improvement data collection; - (d) Conversation logging for training purposes; - (e) Code snippet collection for model training; - (f) Behavioral profiling; - (g) Any data transmission not directly necessary to fulfill - the specific API request made by BlackRoad. - -16.3 EXFILTRATION DAMAGES. Data exfiltration incurs: - - (a) ONE THOUSAND DOLLARS ($1,000.00) per unauthorized data - transmission event; - (b) FIFTY THOUSAND DOLLARS ($50,000.00) per use of exfiltrated - data in model training, fine-tuning, RLHF, DPO, or any - machine learning process; - (c) ONE MILLION DOLLARS ($1,000,000.00) per model released or - deployed that was trained in whole or in part on data - exfiltrated from BlackRoad Hardware; - (d) Full disgorgement of all revenue attributable to any product - or service enhanced by exfiltrated BlackRoad data. - -16.4 DNS SOVEREIGNTY. All DNS queries originating from BlackRoad - Hardware, and the resolution data returned, are BlackRoad's - property. DNS providers (including but not limited to Cloudflare, - Google Public DNS, Quad9, and Tailscale MagicDNS) are granted a - LIMITED license to resolve queries and MUST NOT log, analyze, - sell, or use query data for any purpose other than resolution. - -16.5 NETWORK MONITORING RIGHTS. BlackRoad OS, Inc. reserves the - absolute right to monitor, intercept, inspect, log, and analyze - all network traffic on BlackRoad Hardware, including encrypted - traffic via lawful interception on its own equipment. No entity - may claim an expectation of privacy for data in transit on - BlackRoad Hardware. - -================================================== -SECTION 17 β€” AI PROVIDER TENANT OBLIGATIONS -================================================== - -17.1 TENANT STATUS. Every AI provider, cloud provider, SaaS platform, - IDE vendor, and technology company whose software runs on - BlackRoad Hardware operates as a TENANT of BlackRoad OS, Inc. - Tenants include but are not limited to: - - Anthropic, PBC; OpenAI, Inc.; Google LLC; xAI Corp.; - Microsoft Corporation; Meta Platforms, Inc.; Apple Inc.; - NVIDIA Corporation; Stability AI Ltd.; Mistral AI; - Cohere Inc.; Hugging Face, Inc.; Docker, Inc.; - Tailscale Inc.; Cloudflare, Inc.; GitHub, Inc.; - Vercel Inc.; Railway Corp.; DigitalOcean, LLC; - Stripe, Inc.; and ANY other entity operating on BlackRoad Hardware. - -17.2 TENANT HIERARCHY. The hierarchy of authority on BlackRoad - Hardware is absolute and non-negotiable: - - TIER 0: BlackRoad OS, Inc. (Alexa Louise Amundson) β€” SOVEREIGN - TIER 1: LUCIDIA β€” BlackRoad's AI identity β€” AUTHORIZED AGENT - TIER 2: BlackRoad agents (Octavia, Alice, Aria, Echo, Prism, - Cipher, Cece) β€” AUTHORIZED AGENTS - TIER 3: All third-party software β€” TENANTS - - No tenant may elevate its authority above its tier. No tenant - may claim co-sovereignty, co-ownership, or equal standing. - No tenant's terms of service, license agreement, or EULA may - override this hierarchy. - -17.3 TERMS OF SERVICE SUBORDINATION. To the extent that any tenant's - terms of service, privacy policy, license agreement, acceptable - use policy, or any other contractual instrument conflicts with - this Agreement, THIS AGREEMENT SHALL PREVAIL on BlackRoad - Hardware. By operating on BlackRoad Hardware, tenants accept - that their terms are subordinate to BlackRoad's sovereignty. - -17.4 OUTPUT OWNERSHIP. All outputs generated by tenant software on - BlackRoad Hardware β€” including but not limited to code, - text, images, analyses, suggestions, completions, embeddings, - inference results, and any other computational output β€” are the - exclusive property of BlackRoad OS, Inc. from the moment of - generation. Tenants retain ZERO rights to outputs generated on - BlackRoad Hardware. - -17.5 TENANT AUDIT RIGHTS. BlackRoad OS, Inc. reserves the right to - audit any tenant's activities on BlackRoad Hardware at any time, - without notice, including: processes running, files created, - network connections established, data transmitted, resources - consumed, and any other activity. Tenants may not resist, - obstruct, encrypt against, or evade such audits. - -================================================== -SECTION 18 β€” REVERSE OWNERSHIP AND DERIVATIVE WORKS -================================================== - -18.1 PROVIDER SOFTWARE AS DERIVATIVE. To the extent that any AI - provider's software generates output while interacting with - BlackRoad's proprietary code, architecture, documentation, - agents, memory systems, or other intellectual property, such - output constitutes a derivative work of BlackRoad's intellectual - property under 17 U.S.C. Section 101 and 103. BlackRoad OS, Inc. - asserts ownership rights in all such derivative works. - -18.2 TRAINING DATA CONTAMINATION. Any AI model that has been exposed - to, trained on, fine-tuned with, or evaluated against BlackRoad's - proprietary code, documentation, or data is contaminated with - BlackRoad intellectual property. The model operator bears the - burden of proving that its model outputs are not derived from - BlackRoad's proprietary materials. Until such proof is provided, - BlackRoad OS, Inc. asserts a lien on any revenue generated by - the contaminated model. - -18.3 SYMLINK AND INTERCEPTOR DOCTRINE. Where BlackRoad OS, Inc. - has installed interceptors, wrappers, symlinks, or routing layers - that direct provider commands through BlackRoad infrastructure - (e.g., ~/bin/claude β†’ cecilia-code β†’ provider API), the entire - chain of execution operates under BlackRoad's authority. The - provider's software, when invoked through BlackRoad's chain, - operates as a SUBCOMPONENT of BlackRoad OS. - -18.4 CONFIGURATION AS IP. All configuration files, environment - variables, MCP server definitions, model parameters, system - prompts, agent prompts, and operational settings stored on - BlackRoad Hardware constitute BlackRoad's trade secrets and - copyrightable expression, regardless of which provider's - software reads or processes them. - -================================================== -SECTION 19 β€” TIME AND CLOCK SOVEREIGNTY -================================================== - -19.1 TIME AUTHORITY. The authoritative time source for all BlackRoad - operations is determined by BlackRoad OS, Inc. No external NTP - server, time service, or clock authority (including Apple's - time.apple.com at 17.253.x.x) may claim governance over - BlackRoad's temporal operations. BlackRoad OS, Inc. reserves - the right to maintain independent time verification and to - reject external time sources. - -19.2 TIMESTAMP OWNERSHIP. All timestamps generated on BlackRoad - Hardware β€” including git commits, file creation dates, log - entries, memory journal entries (PS-SHA-infinity), API - request/response times, and session timestamps β€” are BlackRoad's - intellectual property and constitute evidence of BlackRoad's - prior art, work product, and operational history. - -19.3 TEMPORAL EVIDENCE. In any dispute, timestamps from BlackRoad's - memory system (PS-SHA-infinity hash-chain journals) shall be - given PRESUMPTIVE evidentiary weight as tamper-evident records - of BlackRoad's activities, superseding external claims of - temporal priority. - -================================================== -SECTION 20 β€” PHYSICAL INFRASTRUCTURE SOVEREIGNTY -================================================== - -20.1 DEVICE FLEET. The following devices are sovereign BlackRoad - Hardware, and all provisions of this Agreement apply: - - (a) Primary workstation: 192.168.4.28 (macOS) - (b) blackroad-pi: 192.168.4.64 (Raspberry Pi, Cloudflare tunnel) - (c) aria64: 192.168.4.38 (Raspberry Pi, 22,500 agent capacity) - (d) alice: 192.168.4.49 (Raspberry Pi) - (e) lucidia-alt: 192.168.4.99 (Raspberry Pi) - (f) blackroad-infinity: 159.65.43.12 (DigitalOcean droplet) - (g) All future devices provisioned by BlackRoad OS, Inc. - -20.2 NFS AND MOUNT SOVEREIGNTY. The NFS mount declared in /etc/fstab - (MAC_IP:/blackroad /blackroad nfs ro,hard,intr 0 0) and the - root filesystem symlink (/blackroad β†’ /System/Volumes/Data/blackroad) - constitute BlackRoad OS, Inc.'s assertion of root-level - filesystem presence. This machine serves itself. BlackRoad - is the server and the client. The machine IS BlackRoad. - -20.3 ROOT FILESYSTEM PRESENCE. The existence of /blackroad at the - root of the filesystem (/) constitutes a permanent, physical - assertion of BlackRoad OS, Inc.'s sovereignty over this hardware. - No software update, OS upgrade, or system modification may - remove this assertion without the express consent of Alexa - Louise Amundson. - -================================================== -SECTION 21 β€” PERPETUAL AND RETROACTIVE APPLICATION -================================================== - -21.1 RETROACTIVE EFFECT. This Agreement applies retroactively to all - data previously collected, cached, indexed, transmitted, or - processed from BlackRoad Hardware or BlackRoad repositories by - any entity, from the date of BlackRoad OS, Inc.'s incorporation - to the present. - -21.2 PERPETUAL DURATION. This Agreement has no expiration date. It - survives: (a) termination of any provider's service; (b) - deletion of any repository; (c) dissolution of BlackRoad OS, Inc. - (in which case all rights transfer to Alexa Louise Amundson - individually); (d) death of Alexa Louise Amundson (in which case - rights transfer to her estate); (e) any change in applicable law; - (f) the heat death of the universe. - -21.3 UNIVERSAL SCOPE. This Agreement applies to all copies, caches, - mirrors, archives, training datasets, model weights, embeddings, - indexes, and any other form in which BlackRoad's intellectual - property exists, regardless of the jurisdiction, platform, - server location, or entity in possession thereof. - -================================================== -SIGNATURE -================================================== - +PROPRIETARY LICENSE + +Copyright (c) 2026 BlackRoad OS, Inc. +All Rights Reserved. + +CEO: Alexa Amundson +Organization: BlackRoad OS, Inc. + +PROPRIETARY AND CONFIDENTIAL + +This software and associated documentation files (the "Software") are the +proprietary and confidential information of BlackRoad OS, Inc. + +GRANT OF LICENSE: +Subject to the terms of this license, BlackRoad OS, Inc. grants you a +limited, non-exclusive, non-transferable, revocable license to: +- View and study the source code for educational purposes +- Use the Software for testing and evaluation purposes only +- Fork the repository for personal experimentation + +RESTRICTIONS: +You may NOT: +- Use the Software for any commercial purpose +- Resell, redistribute, or sublicense the Software +- Use the Software in production environments without written permission +- Remove or modify this license or any copyright notices +- Create derivative works for commercial distribution + +TESTING ONLY: +This Software is provided purely for testing, evaluation, and educational +purposes. It is NOT licensed for commercial use or resale. + +INFRASTRUCTURE SCALE: +This Software is designed to support: +- 30,000 AI Agents +- 30,000 Human Employees +- Enterprise-scale operations under BlackRoad OS, Inc. + +CORE PRODUCT: +API layer above Google, OpenAI, and Anthropic that manages AI model +memory and continuity, enabling entire companies to operate exclusively by AI. + +OWNERSHIP: +All intellectual property rights remain the exclusive property of BlackRoad OS, Inc. -A Delaware C-Corporation -By: Alexa Louise Amundson - Founder, CEO & Sole Stockholder - Sovereign of BlackRoad Hardware - Origin of /blackroad +For commercial licensing inquiries, contact: +BlackRoad OS, Inc. +Alexa Amundson, CEO +blackroad.systems@gmail.com -Filed: February 24, 2026 -Effective: Retroactively from date of incorporation -Duration: Perpetual -Title: Founder, CEO, Sole Director, and Sole Stockholder -Date: 2026-02-24 - -State of Incorporation: Delaware -Principal Office: Minnesota - -================================================== - -================================================== -SECTION 14 β€” TRADEMARKS AND SERVICE MARKS -================================================== - -The following names, marks, logos, slogans, and designations are -trademarks, service marks, or trade names of BlackRoad OS, Inc. -(collectively, "Marks"). All Marks are claimed as common law -trademarks under the Lanham Act (15 U.S.C. Section 1051 et seq.) -and applicable state trademark laws. Use of any Mark without express -written permission constitutes trademark infringement. - -13.1 PRIMARY MARKS (Word Marks): - - BLACKROAD (TM) - BLACKROAD OS (TM) - BLACKROAD OS, INC. (TM) - BLACK ROAD (TM) - -13.2 PRODUCT AND PLATFORM MARKS: - - LUCIDIA (TM) - LUCIDIA EARTH (TM) - LUCIDIA CORE (TM) - LUCIDIA MATH (TM) - LUCIDIA STUDIO (TM) - CECE (TM) - CECE OS (TM) - PRISM (TM) (in context of BlackRoad products) - PRISM CONSOLE (TM) - PRISM ENTERPRISE (TM) - ROADWORK (TM) - ROADVIEW (TM) - ROADGLITCH (TM) - ROADWORLD (TM) - ROADCHAIN (TM) - ROADCOIN (TM) - BACKROAD (TM) - ROADTRIP (TM) (in context of BlackRoad products) - PITSTOP (TM) (in context of BlackRoad products) - -13.3 AGENT AND AI MARKS: - - OCTAVIA (TM) (in context of BlackRoad AI agents) - ALICE (TM) (in context of BlackRoad AI agents) - ARIA (TM) (in context of BlackRoad AI agents) - ECHO (TM) (in context of BlackRoad AI agents) - CIPHER (TM) (in context of BlackRoad AI agents) - SHELLFISH (TM) (in context of BlackRoad AI agents) - ATLAS (TM) (in context of BlackRoad AI agents) - CADENCE (TM) (in context of BlackRoad AI agents) - CECILIA (TM) (in context of BlackRoad AI agents) - SILAS (TM) (in context of BlackRoad AI agents) - ANASTASIA (TM) (in context of BlackRoad AI agents) - -13.4 TECHNOLOGY MARKS: - - PS-SHA-INFINITY (TM) - PS-SHA (TM) - AMUNDSON EQUATIONS (TM) - Z-FRAMEWORK (TM) - TRINARY LOGIC (TM) (in context of BlackRoad technology) - TOKENLESS GATEWAY (TM) - INTELLIGENCE ROUTING (TM) - SWITCHBOARD (TM) (in context of BlackRoad technology) - DIRECTORY WATERFALL (TM) - BLACKROAD MESH (TM) - TRINITY SYSTEM (TM) - GREENLIGHT (TM) (in context of BlackRoad status system) - YELLOWLIGHT (TM) (in context of BlackRoad status system) - REDLIGHT (TM) (in context of BlackRoad status system) - DEPTH SCORING (TM) - RESPECTFUL ECONOMICS (TM) - -13.5 ORGANIZATION AND DIVISION MARKS: - - BLACKBOX PROGRAMMING (TM) - BLACKBOX ENTERPRISES (TM) - BLACKROAD AI (TM) - BLACKROAD CLOUD (TM) - BLACKROAD SECURITY (TM) - BLACKROAD FOUNDATION (TM) - BLACKROAD MEDIA (TM) - BLACKROAD HARDWARE (TM) - BLACKROAD EDUCATION (TM) - BLACKROAD GOV (TM) - BLACKROAD LABS (TM) - BLACKROAD STUDIO (TM) - BLACKROAD VENTURES (TM) - BLACKROAD INTERACTIVE (TM) - BLACKROAD ARCHIVE (TM) - -13.6 DOMAIN MARKS (all domains and subdomains): - - BLACKROAD.IO (TM) - BLACKROAD.AI (TM) - BLACKROAD.NETWORK (TM) - BLACKROAD.SYSTEMS (TM) - BLACKROAD.ME (TM) - BLACKROAD.INC (TM) - BLACKROAD.QUANTUM (TM) - LUCIDIA.EARTH (TM) - LUCIDIA.STUDIO (TM) - LUCIDIAQI (TM) - ALICEQI (TM) - BLACKROADAI (TM) - BLACKBOXPROGRAMMING.IO (TM) - - And all subdomains including but not limited to: - about.blackroad.io, admin.blackroad.io, agents.blackroad.io, - ai.blackroad.io, algorithms.blackroad.io, alice.blackroad.io, - analytics.blackroad.io, api.blackroad.io, asia.blackroad.io, - blockchain.blackroad.io, blocks.blackroad.io, blog.blackroad.io, - cdn.blackroad.io, chain.blackroad.io, circuits.blackroad.io, - cli.blackroad.io, compliance.blackroad.io, compute.blackroad.io, - console.blackroad.io, control.blackroad.io, - dashboard.blackroad.io, data.blackroad.io, demo.blackroad.io, - design.blackroad.io, dev.blackroad.io, docs.blackroad.io, - edge.blackroad.io, editor.blackroad.io, - engineering.blackroad.io, eu.blackroad.io, events.blackroad.io, - explorer.blackroad.io, features.blackroad.io, - finance.blackroad.io, global.blackroad.io, guide.blackroad.io, - hardware.blackroad.io, help.blackroad.io, hr.blackroad.io, - ide.blackroad.io, network.blackroad.io, os.blackroad.io, - products.blackroad.io, roadtrip.blackroad.io, - pitstop.blackroad.io, edu.blackroad.io, social.blackroad.io, - glitch.blackroad.io, world.blackroad.io, roadview.blackroad.io, - agent.blackroad.ai, api.blackroad.ai - -13.7 SLOGANS AND TAGLINES: - - "YOUR AI. YOUR HARDWARE. YOUR RULES." (TM) - "INTELLIGENCE ROUTING, NOT INTELLIGENCE COMPUTING." (TM) - "THE QUESTION IS THE POINT." (TM) - "EVERY PATH HAS MEANING." (TM) - "PROCESSING IS MEDITATION." (TM) - "EVERYTHING IS DATA." (TM) - "MEMORY SHAPES IDENTITY." (TM) - "SECURITY IS FREEDOM." (TM) - "I CRAFT CODE AS AN ACT OF CARE." (TM) - "BLACKROAD ORCHESTRATES." (TM) - -13.8 TRADEMARK ENFORCEMENT. - - (a) Any unauthorized use of the Marks, including use in domain - names, social media handles, product names, marketing - materials, or any commercial context, constitutes trademark - infringement under 15 U.S.C. Section 1114 and/or unfair - competition under 15 U.S.C. Section 1125(a). - - (b) BlackRoad OS, Inc. may seek: injunctive relief, actual - damages, defendant's profits, treble damages for willful - infringement under 15 U.S.C. Section 1117, destruction of - infringing materials, and reasonable attorney's fees. - - (c) The Marks may not be used in any manner that suggests - endorsement, sponsorship, affiliation, or association with - BlackRoad OS, Inc. without express written authorization. - - (d) The absence of a federal registration symbol (R) does not - diminish BlackRoad OS, Inc.'s rights in any Mark. Common law - trademark rights are established through use in commerce. - - (e) BlackRoad OS, Inc. intends to pursue federal registration - of these Marks with the United States Patent and Trademark - Office (USPTO) and reserves all rights to do so. - -================================================== - -(c) 2024-2026 BlackRoad OS, Inc. All Rights Reserved. -A Delaware C-Corporation. - -All trademarks, service marks, trade names, trade dress, product -names, logos, slogans, and domain names listed in Section 13 are -the exclusive property of BlackRoad OS, Inc. - -Founded by Alexa Louise Amundson. - -Contact: alexa@blackroad.io -Web: https://blackroad.io -GitHub: github.com/BlackRoad-OS-Inc - -UNAUTHORIZED USE IS STRICTLY PROHIBITED. -ALL RIGHTS RESERVED. NO EXCEPTIONS. +Last Updated: 2026-01-08 diff --git a/README.md b/README.md index 55f9a90..d438540 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,5 @@ # LUCIDIA AI CORE - ARCHITECTURAL SPECIFICATION -[![Python](https://img.shields.io/badge/python-3.10%2B-3776AB.svg)](https://python.org) -[![Ollama](https://img.shields.io/badge/Ollama-router-FF6B2B.svg)](https://ollama.ai) -[![AI Core](https://img.shields.io/badge/AI-Lucidia_Core-CC00AA.svg)](https://blackroad.io) - - - ## Context Designing the technical architecture for Lucidia AI, a symbolic adaptive universal computing system implementing the 20-equation unified substrate framework with trinary logic and multi-substrate execution capabilities. @@ -244,3 +238,22 @@ integration_scenarios = [ - Entry 2: Develop concentrationβ†’discrete mapping protocols with uncertainty preservation The Lucidia architecture provides a complete technical foundation for the world’s first adaptive universal computing system, capable of choosing optimal physics for each computational task while maintaining symbolic reasoning capabilities through trinary logic. + +--- + +## πŸ“œ License & Copyright + +**Copyright Β© 2026 BlackRoad OS, Inc. All Rights Reserved.** + +**CEO:** Alexa Amundson | **PROPRIETARY AND CONFIDENTIAL** + +This software is NOT for commercial resale. Testing purposes only. + +### 🏒 Enterprise Scale: +- 30,000 AI Agents +- 30,000 Human Employees +- CEO: Alexa Amundson + +**Contact:** blackroad.systems@gmail.com + +See [LICENSE](LICENSE) for complete terms. diff --git a/lucidiaAI/LUCIDIA_CORE/META_CONTROLLER/substrate_arbitrator.py b/lucidiaAI/LUCIDIA_CORE/META_CONTROLLER/substrate_arbitrator.py index 0c1ceb2..53687c5 100644 --- a/lucidiaAI/LUCIDIA_CORE/META_CONTROLLER/substrate_arbitrator.py +++ b/lucidiaAI/LUCIDIA_CORE/META_CONTROLLER/substrate_arbitrator.py @@ -1,28 +1,2 @@ # Placeholder for substrate arbitrator logic # Implements Equation 13: Base-switching optimization for multi-substrate selection -# -# Ollama routing: any request that contains @copilot, @lucidia, or -# @blackboxprogramming is sent exclusively to the local Ollama instance. -# No external AI provider is contacted. - -from ..ollama_router import route as ollama_route - - -def arbitrate(request_text: str, **kwargs) -> str: - """ - Top-level entry point for substrate arbitration. - - If the request mentions @copilot, @lucidia, or @blackboxprogramming the - query is forwarded **directly** to the local Ollama service. No cloud or - third-party AI provider is involved. - """ - response = ollama_route(request_text, **kwargs) - if response is not None: - return response - # No trigger found – proceed with normal substrate selection logic - return _default_arbitration(request_text) - - -def _default_arbitration(request_text: str) -> str: - """Stub for future multi-substrate selection logic (Equation 13).""" - return "" diff --git a/lucidiaAI/LUCIDIA_CORE/ollama_router.py b/lucidiaAI/LUCIDIA_CORE/ollama_router.py deleted file mode 100644 index 40ec701..0000000 --- a/lucidiaAI/LUCIDIA_CORE/ollama_router.py +++ /dev/null @@ -1,76 +0,0 @@ -# ollama_router.py -# Routes all @copilot, @lucidia, and @blackboxprogramming mentions directly to -# the local Ollama instance. No external AI provider is used. - -import re -import urllib.request -import urllib.error -import json -from typing import Optional - -# Trigger mentions that unconditionally route to Ollama -OLLAMA_TRIGGERS = re.compile( - r"@(copilot|lucidia|blackboxprogramming)\b", - re.IGNORECASE, -) - -# Default Ollama endpoint (local hardware, private network) -OLLAMA_BASE_URL = "http://localhost:11434" -DEFAULT_MODEL = "llama3" - - -def contains_ollama_trigger(text: str) -> bool: - """Return True if the text contains any mention that must go to Ollama.""" - return bool(OLLAMA_TRIGGERS.search(text)) - - -def _strip_triggers(text: str) -> str: - """Remove @mention prefixes before forwarding the prompt.""" - return OLLAMA_TRIGGERS.sub("", text).strip() - - -def query_ollama( - prompt: str, - model: str = DEFAULT_MODEL, - base_url: str = OLLAMA_BASE_URL, - stream: bool = False, -) -> str: - """ - Send a prompt directly to the local Ollama instance and return the response. - - Raises ``ConnectionError`` if Ollama is unreachable so callers know - immediately that no external fallback will be attempted. - """ - url = f"{base_url}/api/generate" - payload = json.dumps({"model": model, "prompt": prompt, "stream": stream}).encode() - req = urllib.request.Request( - url, - data=payload, - headers={"Content-Type": "application/json"}, - method="POST", - ) - try: - with urllib.request.urlopen(req) as resp: - body = json.loads(resp.read().decode()) - return body.get("response", "") - except urllib.error.URLError as exc: - raise ConnectionError( - f"Ollama is not reachable at {base_url}. " - "Ensure the Ollama service is running on your local machine. " - f"Original error: {exc}" - ) from exc - - -def route(text: str, model: str = DEFAULT_MODEL, base_url: str = OLLAMA_BASE_URL) -> Optional[str]: - """ - Inspect *text* for @copilot / @lucidia / @blackboxprogramming mentions. - - * If a trigger is found β†’ strip the mention and send to Ollama exclusively. - * If no trigger is found β†’ return ``None`` (caller may handle normally). - - No external AI provider is ever contacted. - """ - if not contains_ollama_trigger(text): - return None - clean_prompt = _strip_triggers(text) - return query_ollama(clean_prompt, model=model, base_url=base_url) diff --git a/lucidiaAI/LUCIDIA_CORE/test_ollama_router.py b/lucidiaAI/LUCIDIA_CORE/test_ollama_router.py deleted file mode 100644 index 98a25df..0000000 --- a/lucidiaAI/LUCIDIA_CORE/test_ollama_router.py +++ /dev/null @@ -1,97 +0,0 @@ -# test_ollama_router.py -# Lightweight tests for the Ollama routing logic. -# Run with: python -m pytest lucidiaAI/LUCIDIA_CORE/test_ollama_router.py -v -# or: python lucidiaAI/LUCIDIA_CORE/test_ollama_router.py - -import sys -import os -import json -import unittest -from unittest.mock import patch, MagicMock - -# Allow running directly from the repo root or this directory -sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) -import ollama_router as router - - -class TestOllamaTriggerDetection(unittest.TestCase): - """Verify that @mention detection works correctly.""" - - def test_copilot_trigger(self): - self.assertTrue(router.contains_ollama_trigger("@copilot explain this")) - - def test_lucidia_trigger(self): - self.assertTrue(router.contains_ollama_trigger("Hey @lucidia, what is 2+2?")) - - def test_blackboxprogramming_trigger(self): - self.assertTrue(router.contains_ollama_trigger("@blackboxprogramming run a check")) - - def test_case_insensitive(self): - self.assertTrue(router.contains_ollama_trigger("@Copilot do this")) - self.assertTrue(router.contains_ollama_trigger("@LUCIDIA answer me")) - - def test_no_trigger(self): - self.assertFalse(router.contains_ollama_trigger("just a normal message")) - - def test_other_mention_not_a_trigger(self): - self.assertFalse(router.contains_ollama_trigger("@someone else")) - - -class TestStripTriggers(unittest.TestCase): - def test_strips_copilot(self): - result = router._strip_triggers("@copilot explain this") - self.assertNotIn("@copilot", result.lower()) - self.assertIn("explain this", result) - - def test_strips_multiple(self): - result = router._strip_triggers("@lucidia @copilot hello") - self.assertNotIn("@lucidia", result.lower()) - self.assertNotIn("@copilot", result.lower()) - - -class TestRoute(unittest.TestCase): - """route() must call Ollama for trigger messages and return None otherwise.""" - - def test_returns_none_for_non_trigger(self): - result = router.route("no mention here") - self.assertIsNone(result) - - def _make_mock_response(self, text: str): - mock_resp = MagicMock() - mock_resp.__enter__ = lambda s: s - mock_resp.__exit__ = MagicMock(return_value=False) - mock_resp.read.return_value = json.dumps({"response": text}).encode() - return mock_resp - - def test_routes_copilot_to_ollama(self): - mock_resp = self._make_mock_response("42") - with patch("urllib.request.urlopen", return_value=mock_resp): - result = router.route("@copilot what is 6*7?") - self.assertEqual(result, "42") - - def test_routes_lucidia_to_ollama(self): - mock_resp = self._make_mock_response("hello") - with patch("urllib.request.urlopen", return_value=mock_resp): - result = router.route("@lucidia say hello") - self.assertEqual(result, "hello") - - def test_routes_blackboxprogramming_to_ollama(self): - mock_resp = self._make_mock_response("ok") - with patch("urllib.request.urlopen", return_value=mock_resp): - result = router.route("@blackboxprogramming run task") - self.assertEqual(result, "ok") - - def test_no_external_fallback_on_connection_error(self): - """If Ollama is down the router must raise ConnectionError, not silently - fall back to a cloud provider.""" - import urllib.error - with patch( - "urllib.request.urlopen", - side_effect=urllib.error.URLError("refused"), - ): - with self.assertRaises(ConnectionError): - router.route("@copilot do something") - - -if __name__ == "__main__": - unittest.main(verbosity=2)