Metadata-Version: 2.4
Name: continuum-engine-client
Version: 1.0.5
Summary: Zero-Trust AI Verification, FinOps Routing & Client-Side MCP Kernel for terminal and IDE workflows.
Author: individual-app-developers-cmck
Project-URL: Homepage, https://github.com/individual-app-developers-cmck/continuum-engine
Project-URL: Repository, https://github.com/individual-app-developers-cmck/continuum-engine
Project-URL: Bug Tracker, https://github.com/individual-app-developers-cmck/continuum-engine/issues
Keywords: finops,zero-trust,agentic-ai,rag,llm-gateway,token-optimization,bff
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Security
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.25.1

# Continuum Engine

**70% of shipping production code isn't typing—it's researching and verifying live specs. Continuum Engine puts a grounded, real-time AI search & FinOps kernel directly inside your IDE and terminal.**

Most senior engineers stopped opening browsers for search—only to end up trapped inside sealed IDE context windows where coding agents guess from frozen memories, while unmanaged dynamic search silently burns unpredictable tokens behind the scenes.

**Continuum Engine** is a zero-dependency client-side routing & verification middleware (Core IP) engineered strictly for experienced developers working in VS Code, Cursor, Antigravity, and terminal-driven workflows. It isolates primary-source grounding at the edge, exposes the exact dynamic compute hidden behind every response, caps infrastructure spend at a hard prepaid ceiling, and optionally syncs verified research trails directly to your own private storage via **Client-Side Zero-Trust MCP**—without ever exposing your OAuth tokens or conversation logs to our servers.

![Continuum Engine Architecture](https://raw.githubusercontent.com/individual-app-developers-cmck/continuum-engine/main/architecture.jpg)

## 1. Live FinOps Telemetry & Zero-Trust MCP Verification

### 🎥 Live Production Telemetry (Edge Purge in Action)

https://github.com/user-attachments/assets/551ab40e-1da2-49c9-9ac0-b2095859d98c

Engineers trust live terminal logs, not marketing copy. When you route queries through Continuum Engine, the client kernel dismantles the black box of real-time search grounding.

It explicitly exposes the compute breakdown behind every verified response, confirms direct client-side Zero-Trust storage synchronization, and quantifies the exact noise purged at the edge per request.

```text
==================================================
🤖 [AI RESPONSE]
==================================================
(Verified authoritative engineering response grounded in live primary docs...)
--------------------------------------------------
🔗 [VERIFIED PRIMARY SOURCES]
  1. Official Cloud Architecture Documentation
     https://[Authorized-Enterprise-Domain]/...
--------------------------------------------------
🛡️ [ZERO-TRUST MCP SYNC] Saved directly to your Google Drive (updated: <YOUR_PRIVATE_FILE_ID>)
   👉 https://drive.google.com/file/d/<YOUR_PRIVATE_FILE_ID>/view?usp=drivesdk
--------------------------------------------------
🔍 [FINOPS TELEMETRY BREAKDOWN]
  ├─ T_input (Optimized Prompt)     : 210 tokens
  ├─ T_grounding (Dynamic Search)   : 4,820 tokens  <-- Hidden compute exposed
  └─ T_output (Generated Result)    : 640 tokens

  🛡️ Edge Purge (Tokens Prevented) : 1,200 tokens
  📉 Net Grounded Compute          : 5,670 tokens
==================================================
💳 Quota Balance: 799 requests remaining
==================================================
```

## 2. Acquire & Integrate (From Checkout to Workflow in 3 Minutes)

- **$60 One-Time Acquisition**: Includes a mathematically enforced 800-request hard cap—predictable fixed-cost tooling built to expense once and deploy immediately.
- **No Subscriptions, No Runaway Billing**: Physically isolates your workflow from unbounded cloud meter exposure.
- **Cross-Platform Parity**: Native SDKs for **Node.js (npm — 0 external dependencies)** and **Python (PyPI)** with shared Zero-Trust MCP token cache interoperability.

_Protected by Stripe Checkout & Zero-Trust Origin Verification_

[![Stripe Checkout](https://img.shields.io/badge/Stripe%20Checkout-Activate%20Private%20Engine%20%28%2460%29-635BFF?style=for-the-badge&logo=stripe&logoColor=white)](https://buy.stripe.com/eVq28t2qB4mneGfc336sw00)

We respect your time. Provisioning and integration take three steps:

1. **Checkout & Provisioning**: Complete the $60 transaction above. You will be immediately redirected to a secure `setup.html` console where your private API key and dedicated endpoint are provisioned.

   *(Note: The `setup.html` console and integration examples are hosted in our [GitHub Repository](https://github.com/individual-app-developers-cmck/continuum-engine). Clone the repository if you are integrating directly into an internal BFF or custom IDE toolchain.)*

2. **Install the Client Kernel**:

   ```bash
   npm install continuum-engine-client
   # or
   pip install continuum-engine-client
   ```

3. **Drop It Into Your Workflow (Pure Stateless or Client-Side Zero-Trust MCP)**:
   Replace the environment variables with your provisioned credentials.

   **Node.js:**
   ```javascript
   const ContinuumClient = require("continuum-engine-client");

   const client = new ContinuumClient(
     process.env.CONTINUUM_ENDPOINT,
     "<HEADER_REVEALED_POST_PURCHASE>",
     process.env.CONTINUUM_API_KEY,
     {
       // Optional: Client-Side Zero-Trust Google Drive MCP (OAuth 2.0 + PKCE)
       // Omit this 4th argument for Pure Stateless Mode.
       clientId: process.env.GOOGLE_OAUTH_CLIENT_ID,
       clientSecret: process.env.GOOGLE_OAUTH_CLIENT_SECRET,
       fileName: "Continuum_Engine_History.txt",
     }
   );

   // Terminal validation (.ask) or programmatic workflow integration (.query)
   const result = await client.query("Summarize the latest Zero-Trust architecture.");
   ```

   **Python:**
   ```python
   import os
   from continuum_engine_client import ContinuumClient

   client = ContinuumClient(
       os.environ["CONTINUUM_ENDPOINT"],
       "<HEADER_REVEALED_POST_PURCHASE>",
       os.environ["CONTINUUM_API_KEY"],
       mcp_config={
           # Optional: Client-Side Zero-Trust Google Drive MCP (OAuth 2.0 + PKCE)
           # Omit mcp_config for Pure Stateless Mode.
           "client_id": os.environ["GOOGLE_OAUTH_CLIENT_ID"],
           "client_secret": os.environ["GOOGLE_OAUTH_CLIENT_SECRET"],
           "file_name": "Continuum_Engine_History.txt",
       },
   )

   # Terminal validation (.ask) or programmatic workflow integration (.query)
   result = client.query("Summarize the latest Zero-Trust architecture.")
   ```

## 3. Core Capabilities & Architecture

This repository distributes the open-source client kernels (`client-kernel.js` + `mcp-drive.js` for Node.js, `client_kernel.py` + `mcp_drive.py` for Python). These lightweight kernels connect to the Continuum Engine Core API, a closed intellectual property designed to enforce primary-source grounding, hardware-level quotas, and data sovereignty.

### A. Data Sovereignty (Three Memory Architectures)

Under strict Zero-Trust principles, **you retain absolute control over your data footprint.** Choose the mode that fits your security posture:

- **Client-Side Zero-Trust Google Drive MCP (Recommended):** The Continuum backend runs in pure Stateless mode (`docId: null`). Your local client kernel authenticates directly via **OAuth 2.0 + PKCE (`S256`) + CSRF `state` verification** over a strictly bound RFC 8252 loopback (`127.0.0.1:53682`, with 120s auto-timeout and remote/SSH URL-paste fallback) and writes verified research trails straight to your private Google Drive under the minimal `drive.file` scope. Neither your OAuth tokens nor your conversation logs ever touch Continuum servers. Local token caches (`.continuum_mcp_token.json`, `0600` permissions) are interoperable between the Node.js and Python SDKs.
- **Pure Stateless Mode ("Amnesia"):** Omit the MCP configuration and Doc ID to execute ephemerally with zero server-side log retention.
- **Legacy Stateful Mode (BYOD — Bring Your Own Document):** Supply an existing document ID string to sync logs via document cooling for backward compatibility (transient session routing pointers auto-purge after 7 days).

### B. Automated Perimeter Defenses (Gate 0 & 0.5)

- **Zero-Tolerance Exploit Defense:** Gate 0 intercepts malformed payloads, prompt injections, and protocol probing before they consume downstream compute.
- **180s Circuit Breaker:** Enforces a strict 180-second execution ceiling to prevent infinite search loops during dynamic grounding.

_(Note: Automated vulnerability scans or prompt injection payloads trigger immediate token revocation without refund.)_

## 4. Local Runtime & Telemetry Format Inspection (Offline Fixture)

For engineers auditing package behavior before provisioning a production key, the repository includes an offline execution harness (`run_simulator.js` / `run_simulator.py`).

> **Scope Notice:** This utility replays a **static, pre-recorded fixture locally**—it makes no live network calls and does not perform dynamic AI inference on custom prompts. Use it solely to inspect zero-dependency runtime mechanics and terminal telemetry formatting in your local environment.

**Node.js:**
```bash
node node_modules/continuum-engine-client/run_simulator.js
# Or from a cloned repository:
node run_simulator.js
```

**Python:**
```bash
python -m continuum_engine_client.run_simulator
# Or from a cloned repository:
python run_simulator.py
```

## 5. Operational Policies (Read Before Use)

To guarantee low-latency edge enforcement and strict FinOps predictability, the gateway enforces non-negotiable operational controls:

- **Service Availability (Geographic Scope):** This middleware and associated API keys are intended exclusively for global engineering environments and are **strictly not available for use or purchase within Japan**. Access from restricted jurisdictions is filtered at the gateway level.
- **Strict Quota Cap:** The 800-request quota is a mathematically enforced hard cap safeguarding against autonomous loop runaways. Once depleted, a new license acquisition is required.
- **Zero-Support Policy:** Built strictly for experienced systems engineers who audit their own tools. We do not provide interactive debugging, manual onboarding, or post-revocation appeals.

> 💬 **Action-Oriented Builders' Guild:** [Read the Charter & Join the Discussion here](https://github.com/individual-app-developers-cmck/continuum-engine/discussions/1)
