# Open Valstorm & Valstorm Cloud — Full Developer Documentation Corpus # Open Valstorm & Valstorm Cloud — AI Agent Developer Skill (`SKILL.md`) > Drop this file into `CLAUDE.md`, `.cursorrules`, or `~/.valstorm/skills/valstorm-dev/SKILL.md` so your AI coding agent immediately understands how to query, mutate, extend, and build on Valstorm. --- ## 1. Unified `PlatformContext` Mental Model (1:1 Parity) Valstorm exposes the exact same domain facades whether your code runs: 1. **Inside a Server Trigger, Custom Function, or FastAPI Route (`apps/open-api`)**: `platform.records`, `platform.query`, `platform.schemas`, `platform.vfs`, `platform.files`, `platform.tasks`, `platform.` 2. **In an External Script or Microservice via the Python SDK (`valstorm-client`)**: `client.records`, `client.query`, `client.schemas`, `client.vfs`, `client.files`, `client.apps`, `client.sandboxes` 3. **Inside the Go Worker (`apps/open-worker`)**: `platformCtx.ForOrg(orgID, userID).Records.Create/Update/Delete/Get/Query` ### Python SDK Quick Reference (`valstorm-client`) ```python from valstorm import AsyncValstormClient, ValstormClient, PatAuth, ServiceKeyAuth # Synchronous client client = ValstormClient( base_url="http://localhost:8010/v1", # or "https://api.valstorm.com/v1" auth=PatAuth("vst_pat_..."), ) # 1. Inspect an Object Schema before mutating contact_schema = client.schemas.get("contact") # 2. Execute Parameterized ANSI SQL with Valstorm Macros leads = client.query.sql( "SELECT id, name, status FROM lead WHERE owner = ME AND created_date = last_n_days:30 LIMIT 25" ) # 3. Create Records (Plain String Lookup IDs & Picklist String Labels!) created = client.records.create("ticket", [{ "name": "Configure Telnyx Webhook", "status": "Pending Assignment", # Picklist -> human-readable tag label "priority": "High", # Picklist -> human-readable tag label "type": "Feature Improvement", "owner": "user_qBulInDu18OcylWP", # Lookup -> plain Base62 string ID (NEVER a dict!) "description": "Full markdown details...", }]) # 4. Virtual File Service (VFS) Hybrid Vector + Full-Text Search vault_tree = client.vfs.tree() ``` --- ## 2. Mandatory Data Model Rules (Zero Exceptions) 1. **Relationship Lookups Store Plain String IDs Only:** - **NEVER** pass dictionary objects like `{"id": "user_123", "name": "Jared"}` to `lookup` or `lookup_list` fields. - Always store plain string Base62 IDs (`"owner": "user_123"`) and arrays of plain string IDs (`"contacts": ["con_123", "con_456"]`). 2. **Picklist Fields Store String Labels (Not Tag IDs):** - Fields with `format: "picklist"` (`status`, `priority`, `type`, `utm_source`) store the human-readable tag label (`"Active"`, `"High"`), **never** a `tag_...` ID. 3. **Custom Objects & Fields (`__c`):** - Creating a schema via `POST /v1/schema/object` compiles directly to PostgreSQL `CREATE TABLE`. - Adding a field via `POST /v1/schema/field` compiles to `ALTER TABLE ... ADD COLUMN` ($O(1)$ instant DDL). --- ## 3. Dual-Runtime Microservice Architecture (Cloud & COSS) | Service | Port | Runtime | Responsibilities & Direct Endpoints | | :--- | :--- | :--- | :--- | | **`open-api`** | `:8010` | Python 3.13 (FastAPI) | REST (`/v1/records/c/{obj}`, `/v1/query/sql`, `/v1/schema/*`, `/v1/vfs/*`), GraphQL (`/v1/graphql`), OAuth 2.1, and 19 Python plugin routers. | | **`open-worker`** | `:8080` | Go 1.23 (`pgx/v5`) | WebSocket Hub (`/v1/ws/{org}/{user}`, `/v1/ws/desktop/execute`), Fleet DDL Deployer (`/v1/deployment/rollout`), Sub-10ms AI Desktop Sync (`/v1/ai/chat/{chat_id}/desktop-sync`), Public Form/Webhook Ingress (`/v1/inbound/submit`), Booking (`/v1/booking/{slug}/availability`), and Telnyx/Twilio/SendGrid webhooks. | | **`open-worker-p1` / `p2`** | — | Python 3.13 | Standalone background queue consumers for `valstorm:queue:default` and `valstorm:queue:low`. | | **`open-agent-runtime`** | `:8660` | Python 3.13 | Multi-turn Cloud ReAct Agent Runtime (`POST /v1/runs`, `GET /v1/runs/{run_id}/events`). | | **`open-web-scraper`** | `:8661` | Python 3.14 | 3-Tier Waterfall Web Scraper (`POST /v1/scrape`, `/v1/crawl`, `/v1/feed/poll`, `/v1/diff`). | | **`open-video-worker`** | `:8089` | Python + FFmpeg | Video transcoding, thumbnails, and Deepgram/AI video metadata (`valstorm:queue:video`). | --- ## 4. Model Context Protocol (MCP) Server Tools (`valstorm-mcp-server`) Connect any MCP client to `https://mcp.valstorm.com/mcp` (Streamable HTTP) or run locally via `uv run --project apps/valstorm-mcp-server valstorm-mcp --transport stdio`: - **Records & SQL:** `schema_inspect`, `record_query_sql`, `record_get`, `record_create`, `record_update`, `record_delete`, `record_hydrate_batch` - **Knowledge Vaults (VFS):** `vfs_search` (`pgvector` + `tsvector` hybrid RRF), `vfs_ask`, `vfs_read_text`, `vfs_browse`, `vfs_move`, `vfs_prepare_upload`, `vfs_get_download_url`, `vfs_delete_file` --- ## 5. Creating or Extending an Open Valstorm Plugin (`/plugins`) Every plugin lives in `/plugins/valstorm-plugin-/` and is toggled via `VALSTORM_PLUGINS`: - **Python (`python/src/valstorm_plugin_/__init__.py`):** Exports `plugin = ValstormPlugin(name="...", routers=[...], worker_includes=[...], ai_tools=[...], prefixes={...}, context_class=...)` mounted at `platform.`. - **Go (`go/plugin.go`):** Calls `plugin.Register(&MyPlugin{})` in `init()`, binds high-speed routes on `ctx.HTTPMux`, registers `valstorm:queue:critical` task handlers via `ctx.RegisterTaskHandler(...)`, and mutates tenant Postgres directly via `ctx.Platform.ForOrg(orgID, userID)`. --- # [Guide: 5-Minute AI Agent & Developer Quickstart] (/quickstart) # 5-Minute AI Agent & Developer Quickstart Welcome to **Valstorm Developer Documentation** — covering both **Valstorm Cloud** and **Open Valstorm (COSS)**. Valstorm is built around a **single 1:1 mental model (`PlatformContext`)** shared across: 1. **In-Process Server Triggers & Functions** (`platform.records`, `platform.query`, `platform.vfs`, `platform.`) 2. **Python Client SDK (`valstorm-client`)** (`client.records`, `client.query`, `client.vfs`, `client.schemas`) 3. **Native Go Worker (`apps/open-worker/pkg/platform`)** (`platformCtx.ForOrg(orgID, userID).Records.*`) 4. **Model Context Protocol (`valstorm-mcp-server`)** & **Agent Runtime (`vsagent`)** --- ## ⚡ Step 1: Teach Your AI Agent Valstorm in 10 Seconds Whether you use **Valstorm Agent (`vsagent`)**, **Claude Code**, **Cursor**, or **Windsurf**, point your agent to our machine-readable skill and corpus endpoints: | Resource | URL | Purpose | | :--- | :--- | :--- | | **Agent Skill Ruleset (`SKILL.md`)** | [`/SKILL.md`](/SKILL.md) | Complete coding rules: `PlatformContext` syntax, ANSI SQL macros, Base62 IDs, plain-string lookup rules, and plugin patterns. Drop into `CLAUDE.md` or `.cursorrules`. | | **LLM Index (`llms.txt`)** | [`/llms.txt`](/llms.txt) | Structured index of all guides, 20 plugins, 41 core schemas, and 416 API operations. | | **Full Corpus (`llms-full.txt`)** | [`/llms-full.txt`](/llms-full.txt) | Single-file concatenated Markdown of the entire Open Valstorm developer documentation. | | **Unified OpenAPI 3.1 Spec** | [`/openapi.json`](/openapi.json) | Merged OpenAPI 3.1 JSON across `open-api` (Python :8010), `open-worker` (Go :8080), `open-agent-runtime` (:8660), and `open-web-scraper` (:8661). | ```bash # Download the Valstorm Developer Skill directly into your repo for Claude Code / Cursor / vsagent curl -fsSL https://developers.valstorm.com/SKILL.md -o VALSTORM_SKILL.md ``` --- ## ☁️ Option A: Start on Valstorm Cloud (Zero Infrastructure) 1. **Generate a Personal Access Token (PAT)** (`vst_pat_...`) or **Service Key** (`vst_sk_...`) in your Valstorm Workspace Settings. 2. **Connect via MCP Server (`valstorm-mcp-server`):** ```json { "mcpServers": { "valstorm": { "url": "https://mcp.valstorm.com/mcp", "headers": { "Authorization": "Bearer vst_pat_your_token_here" } } } } ``` 3. **Or install the Python SDK (`valstorm-client`) & CLI (`valstorm`):** ```bash uv add "valstorm-client @ git+https://github.com/Valstorm-Corp/valstorm-client-python.git" uv tool install git+https://github.com/Valstorm-Corp/valstorm-cli ``` --- ## 🐳 Option B: Self-Host Open Valstorm (COSS Docker Stack) Open Valstorm consolidates MongoDB, Qdrant, and ClickHouse into **PostgreSQL 16 + `pgvector`** with ** dedicated database-per-tenant isolation** (`CREATE DATABASE org_xyz`) and **Valkey 7.2**. ```bash # 1. Start the full 1:1 Open Valstorm stack docker compose -f docker-compose.open.yaml up -d # 2. Seed the central directory DB, Admin Org, Support User, and Client Workspace cd apps/open-api uv sync uv run python app/seed.py ``` ### The 8-Container 1:1 Open Valstorm Topology (`docker-compose.open.yaml`) | Service | Port | Runtime | Role | | :--- | :--- | :--- | :--- | | **`open-postgres`** | `:5432` | `pgvector:pg16` | Central `valstorm_directory` DB + isolated per-tenant databases (`org_*`), `pgvector` + `tsvector` hybrid RRF search, and unified `log` telemetry. | | **`open-valkey`** | `:6379` | `valkey:7.2` | L1 schema/session cache, WebSocket Pub/Sub channels, and background task queues (`default`, `low`, `critical`, `video`). | | **`open-api`** | `:8010` | Python 3.13 (FastAPI) | Core REST & GraphQL API, `sqlglot` ANSI SQL compiler, dynamic DDL compiler, PyMuPDF engine, and Python plugin routers (`DISABLE_BACKGROUND_WORKER=true`). | | **`open-worker`** | `:8080` | Go 1.23 (`pgx/v5`) | Real-time WebSocket Hub (`/v1/ws/*`), CUD broadcaster, Cron Scheduler, `valstorm:queue:critical` consumer, Fleet DDL deployer, and Go plugins. | | **`open-worker-p1`** | — | Python 3.13 | Dedicated high-priority background worker (`valstorm:queue:default`, concurrency 50). | | **`open-worker-p2`** | — | Python 3.13 | Dedicated low-priority & scheduled-item worker (`valstorm:queue:low`, concurrency 25). | | **`open-agent-runtime`** | `:8660` | Python 3.13 | Stateful multi-turn Cloud ReAct Agent Runtime (`/v1/runs` + SSE streaming). | | **`open-web-scraper`** | `:8661` | Python 3.14 (`zstd`) | 3-Tier Waterfall Web Scraper (HTTP/2 -> Stealth Playwright Chromium -> Firecrawl) + domain crawler & Postgres `zstd` diff engine. | | **`open-video-worker`** | `:8089` | Python + FFmpeg | Asynchronous FFmpeg H.264 MP4 transcoder, thumbnail extractor, and Deepgram/AI video chapter processor (`valstorm:queue:video`). | --- # [Guide: Unified PlatformContext & Dual-Runtime Architecture] (/architecture) # Open Valstorm Plugin System & Native Dual-Runtime `PlatformContext` Architecture ## 1. Executive Summary Open Valstorm is designed to keep its core (`apps/open-api` in Python and `apps/open-worker` in Go) streamlined, fast, and database-strict on PostgreSQL + Valkey/Redis, while supporting an extensible ecosystem of modular integrations (**Slack, AI, Telnyx, Twilio, Google Workspace, Microsoft 365, DigitalOcean, Azure, Campaigns, Booking**, etc.) packaged under `/plugins/*`. Crucially, Go integrations (like Telnyx, Twilio, Gmail sync, Campaigns, and AI Desktop Sync) **must not** proxy database CUD or schema operations over HTTP through the Python FastAPI server. Instead, both `apps/open-api` (Python) and `apps/open-worker` (Go) implement a **Native `PlatformContext` Data Plane** that communicates directly with PostgreSQL (`asyncpg` in Python, `pgxpool` in Go) and Valkey (`redis`), sharing the exact same Redis schema-invalidation signals, CUD WebSocket broadcast format, and asynchronous trigger queues. --- ## 2. Runtime Order of Operations (Unified Data Plane) Every record mutation (whether initiated from Python `PlatformContext` or Go `pkg/platform`) executes the exact same 6-step order of operations: ```text [1. Ingress] ├── REST / GraphQL / OAuth / AI Chat ────────► open-api (Python) └── High-Speed Webhooks / WS / Asynq / Cron ─► open-worker (Go) │ ▼ [2. Schema & Tenant Resolution (0ms RAM Cache + Redis Invalidation)] • Checks Redis `org:{org_id}:schemas_updated_at` • Loads SchemaDefinition + Postgres column types from local memory cache • Resolves Tenant Postgres connection pool (`db_manager` in Python / `TenantPoolManager` in Go) │ ▼ [3. Record Preparation & Sanitization] • Python: `sanitize_record_for_db` + `format_column_value` • Go: `schema.PrepareRecord` / `schema.PrepareUpdate` • Both: Generate Base62 ID (`prefix_...`), stamp `created_date`/`modified_date` (UTC), stamp `created_by`/`modified_by`, strip lookup dicts to string IDs, format phone objects, hydrate defaults, increment auto-number counters │ ▼ [4. Direct Parameterized PostgreSQL Execution] • Executes `INSERT / UPDATE / DELETE ... RETURNING *` directly against Tenant DB • Native Postgres enforces types (`TIMESTAMPTZ`, `JSONB`, `TEXT[]`) & foreign keys │ ▼ [5. Real-Time WebSocket CUD Broadcast (<0.1ms)] • Publishes `cud_create` / `cud_update` / `cud_delete` envelope to Redis channel `{org_id}` • `open-worker` WebSocket server streams immediately to all connected browsers/desktops │ ▼ [6. Asynchronous Trigger & Workflow Relay (<0.1ms)] • Pushes `valstorm.core.execute_async_trigger` task payload into Redis (`valstorm:queue:default`) • Python `ValstormBackgroundWorker` picks up and runs any tenant custom Python triggers in sandbox ``` --- ## 3. Classification of Existing Modules (`worker-go` & `api`) ### Tier A: Core Engine & Data Plane (Lives in `apps/open-worker` & `apps/open-api` Core) 1. **Multi-Tenant DB Manager (`pkg/tenantdb` in Go / `db_router.py` in Python)**: Manages tenant `pgxpool.Pool` / `asyncpg` pools. 2. **Dynamic Schema & Record Sanitizer (`pkg/schema` in Go / `record_service.py` in Python)**: In-memory `sync.RWMutex` schema cache invalidated by Redis `org:{org_id}:schemas_updated_at`, Base62 ID generation, default value hydration, lookup string extraction, phone normalization, and Postgres column type coercion. 3. **Native `PlatformContext` (`pkg/platform` in Go / `platform_context.py` in Python)**: Unified CUD, SQL query, credential decryption, CUD broadcast, and async trigger relay facade. 4. **WebSocket & CUD Broadcast (`internal/websocket`, `internal/cud`)**: Real-time pub/sub streaming to connected clients. 5. **Dynamic Scheduler (`internal/scheduler`)**: Cron ticker and Python/Asynq task relay. 6. **Fleet App Deployment (`internal/deployment`)**: Concurrent (`errgroup`) multi-tenant schema DDL and app bundle installer. 7. **Telemetry & Logging (`internal/telemetry`)**: High-throughput activity, error, and usage logging. 8. **Core High-Speed Handlers (`internal/inbound`, `internal/vfs`, `internal/webhook`, `internal/notification`, `internal/scraper`)**: Public form/webhook ingestion (`/v1/inbound/submit`), S3 batch purges/cascades, outbound webhook dispatch, and notification routing. ### Tier B: Modular Plugins (Lives in `/plugins/valstorm-plugin-`) Each plugin can contain a `/python` package (FastAPI routers, background tasks, AI tools) and/or a `/go` module (Asynq handlers, high-speed HTTP/WebSocket handlers): 1. **`valstorm-plugin-slack`** (Python): Slack OAuth v2, workspace client, event webhooks, background tasks, AI tools. 2. **`valstorm-plugin-telnyx`** (Python + Go): Number provisioning, Call Control state machine, Deepgram transcription, MMS S3 uploads, SMS webhooks. 3. **`valstorm-plugin-twilio`** (Python + Go): Twilio Conversations state machine, bulk SMS, call ringing/queued alerts. 4. **`valstorm-plugin-ai`** (Python + Go): Agentic chat orchestration, tool bridge, and Go sub-10ms `/v1/ai/chat/{chat_id}/desktop-sync`. 5. **`valstorm-plugin-google`** (Python + Go): Google OAuth, Gmail Pub/Sub delta sync (`pgx.Batch`), Google Calendar sync, and Booking slot engine. 6. **`valstorm-plugin-campaign`** (Python + Go): Bulk email/SMS campaign orchestrator and delivery status tracker. 7. **`valstorm-plugin-m365` / `valstorm-plugin-digitalocean` / `valstorm-plugin-azure`**: Cloud & enterprise integrations. --- ## 4. Phased Implementation Roadmap ### Step 1: Build the Native Go `PlatformContext` in `apps/open-worker` 1. **`apps/open-worker/pkg/id`**: Base62 ID generation and prefix inference matching `open-api`. 2. **`apps/open-worker/pkg/tenantdb`**: Multi-tenant `pgxpool.Pool` manager with thread-safe caching per `orgID`. 3. **`apps/open-worker/pkg/schema`**: Port `apps/worker-go/internal/schema` (`types.go`, `record.go`, `manager.go`) from MongoDB to PostgreSQL (`pgxpool`), including table column type reflection (`information_schema.columns`) and atomic counter increments. 4. **`apps/open-worker/pkg/platform`**: Native Go `PlatformContext` (`ForOrg(orgID, userID)`) providing: - `Records.Create(ctx, apiName, data)` & `Records.CreateBatch(ctx, apiName, records)` - `Records.Update(ctx, apiName, id, data)` - `Records.Delete(ctx, apiName, id)` - `Records.Get(ctx, apiName, id)` & `Records.Query(ctx, apiName, filters, limit)` - Automatic `cud.PublishCUD` broadcast + Redis `valstorm.core.execute_async_trigger` dispatch on mutations. 5. **Comprehensive Go Test Suite**: Unit tests for `pkg/id`, `pkg/schema`, and `pkg/platform` verifying schema hydration, Postgres SQL generation, CUD publishing, and async trigger relay. ### Step 2: Build the Python & Go Plugin Registries + `PlatformContext` Extensions 1. Extend Python `PlatformContext` with `platform.cache`, `platform.credentials`, `platform.tasks`, and `PlatformContext.for_external_account(...)`. 2. Create Python plugin loader (`apps/open-api/app/core/plugins.py`) and Go plugin registry (`apps/open-worker/pkg/plugin/registry.go`) controlled by `VALSTORM_PLUGINS`. 3. Configure `/plugins`, `go.work`, and `docker-compose.open.yaml` volume mounts for live hot-reloading. ### Step 3: Vertical Slice #1 — Pure Python Plugin (`valstorm-plugin-slack`) - Extract `apps/api/app/slack` into `plugins/valstorm-plugin-slack` using pure `PlatformContext`. ### Step 4: Vertical Slice #2 — Hybrid Go + Python Plugins (`valstorm-plugin-telnyx` & `twilio`) - Port Telnyx and Twilio handlers into `plugins/valstorm-plugin-telnyx` and `plugins/valstorm-plugin-twilio` on top of Go `pkg/platform` and Python `PlatformContext`. ### Step 5: Vertical Slice #3 — AI, Google Workspace, Campaigns & Cloud Integrations - Port `ai`, `google` (`gmail` + `calendar` + `booking`), and `campaign` into `/plugins/*`. --- # [Guide: Open Valstorm Core API (apps/open-api)] (/open-api) # Open Valstorm API (`apps/open-api`) **Greenfield PostgreSQL-Powered Core Engine for Open Valstorm** Open Valstorm API is a greenfield backend built with **Python 3.13**, **`uv`**, and **PostgreSQL 16**. It introduces a **dedicated logical database-per-tenant** architecture with an automated DDL compiler and native SQL query execution, completely eliminating application-layer Python joins and legacy regex SQL transpiling. --- ## 1. Architectural Highlights ### Dedicated Database-Per-Tenant Isolation * **Zero Cross-Tenant Leaks**: Every customer organization operates inside an isolated PostgreSQL database (`CREATE DATABASE org_xyz`). Cross-database queries are physically prohibited by the PostgreSQL engine. * **Central Directory DB (`valstorm_directory`)**: Coordinates global authentication, organization routing, and the marketplace catalog (`app`). * **Universal Support User Pattern**: Every provisioned tenant database automatically attaches an attributable Support User (`support@...`), enabling platform administrators to assist customers, run scheduled workflows, and debug without requesting user passwords. * **$O(1)$ Instant Custom Fields**: Adding custom fields compiles to native PostgreSQL DDL (`ALTER TABLE ... ADD COLUMN ...`), executing as an instantaneous metadata-only change in PostgreSQL 11+. * **Native ANSI SQL Optimizer**: Relational joins (`JOIN ... ON ...`) are executed directly by the PostgreSQL query planner with AST sanitization via `sqlglot`. --- ## 2. Tech Stack | Component | Technology | Description | | :--- | :--- | :--- | | **Runtime** | Python 3.13 | High-performance async runtime | | **Package Manager** | `uv` | Sub-second virtual environment & dependency management | | **Web Framework** | FastAPI (ASGI) | REST API & OpenAPI documentation | | **Database Driver** | `asyncpg` | Native async PostgreSQL binary protocol driver | | **Relational Store** | PostgreSQL 16 | Dedicated database-per-tenant architecture | | **Cache & Pub/Sub** | Valkey 7.2 | High-throughput in-memory token & session caching | | **SQL Engine** | `sqlglot` | AST parser, validator, and LIMIT injector | --- ## 3. Quickstart Guide ### Step 1: Start the Local Infrastructure From the repository root, start PostgreSQL and Valkey: ```bash docker compose -f docker-compose.open.yaml up -d ``` * **PostgreSQL Port:** `localhost:5432` (Database: `valstorm_directory`, User: `valstorm`, Password: `valstorm_password`) * **Valkey/Redis Port:** `localhost:6379` ### Step 2: Install Python Dependencies via `uv` ```bash cd apps/open-api uv sync ``` ### Step 3: Run the Core Seeder Initialize the central Directory DB and provision the Admin Org and Client Workspace. #### Option A: Interactive Setup Wizard (Recommended for new installs) ```bash uv run python app/seed.py --interactive ``` #### Option B: CLI Flags (Ideal for CI/CD & Automation) > **Note for macOS (`zsh`) / `bash` users:** Always wrap passwords containing `!` or `$` in **single quotes** (`'...'`) rather than double quotes (`"..."`). In `zsh`, `!"` inside double quotes triggers history expansion and leaves the quote unclosed (`dquote>`). ```bash uv run python app/seed.py \ --admin-org-name 'Apex Aerospace HQ' \ --admin-email 'admin@apex.io' \ --admin-password 'AdminSecret123!' \ --support-email 'support@apex.io' \ --support-password 'SupportSecret123!' \ --client-org-name 'Cyberdyne Systems' \ --client-user-name 'Miles Dyson' \ --client-email 'miles@cyberdyne.com' \ --client-password 'ClientSecret123!' ``` #### Option C: Default Valstorm Development Seed ```bash uv run python app/seed.py ``` * **Super Admin:** `admin@valstorm.com` / `valstorm_admin_password` (Org: `org_AwmQ8vSogMavWkw9`) * **Support User:** `support@valstorm.com` / `valstorm_support_password` (Injected into all orgs) * **Client Admin:** `team@valstorm.com` / `valstorm_client_password` (Org: `org_dSnPMRjS1ZkkdYQ2`) ### Step 4: Start the API Server ```bash uv run uvicorn app.main:app --port 8010 --reload ``` The API will be available at `http://localhost:8010`. Interactive Swagger documentation is available at `http://localhost:8010/docs`. --- ## 4. The 33 Foundational Base App Tables The Base App (`app_0Ik4pJ5P60Bk7x1u`) automatically seeds these 33 foundational schemas and tables into each tenant database: | Category | PostgreSQL Tables | | :--- | :--- | | **Identity & Access** | `user`, `role`, `permission`, `user_group`, `auth_credential` | | **System & Environment** | `organization`, `environment_configuration`, `app`, `app_metadata`, `onboarding` | | **Triggers & Logic** | `api_trigger`, `record_trigger`, `function`, `schedule_trigger`, `schedule_trigger_run`, `schedule_trigger_setting`, `scheduled_item` | | **UI & Layout** | `app_page`, `dashboard`, `report`, `list_filter`, `template`, `guide` | | **File Storage** | `file`, `related_file` | | **Notifications** | `notification`, `notification_setting`, `notification_subscriber` | | **Commercial / Billing** | `app_product`, `app_product_price`, `integrated_app` | | **Metadata & Categorization**| `tag`, `log` | --- ## 5. API Reference Summary All routes maintain exact compatibility with the Valstorm frontend (`packages/components`, `apps/workspace`, and `apps/valstorm-desktop`): ### Authentication (`/auth`) * `POST /auth/register` - Create a new user, register an organization, and provision a dedicated database. * `POST /auth/login` - Authenticate with email/password and obtain a JWT bearer token. * `GET /auth/me` - Retrieve authenticated user profile and organization scoping. ### Object & Schema DDL (`/schema`) * `POST /schema/object` - Define a new custom object; compiles and executes `CREATE TABLE`. * `POST /schema/field` - Add a field to an existing object; compiles and executes `ALTER TABLE ... ADD COLUMN`. * `GET /schema/object` - Retrieve all registered schemas and property definitions for the tenant. ### Record CRUD (`/records/c/{object_name}`) * `POST /records/c/{object_name}` - Batch create records with Base62 ID generation (`tick_...`, `con_...`). * `PUT /records/c/{object_name}` - Batch update records by ID. * `DELETE /records/c/{object_name}` - Batch delete records by ID list (`{"ids": [...]}`). * `GET /records/c/{object_name}` - Paginated list of records (`?limit=50&offset=0`). ### Native SQL Queries (`/query`) * `POST /query/sql` - Execute parameterized ANSI SQL directly on PostgreSQL: ```json { "query": "SELECT id, name, priority FROM ticket WHERE is_closed = false ORDER BY created_date DESC", "limit": 50 } ``` ### Tenant Sandboxes (`/sandbox`) * `POST /sandbox/create` - Provision a dedicated sandbox database (`CREATE DATABASE {prod_org}_s_{name}`). * `DELETE /sandbox/delete` - Cleanly drop and terminate active connections for a sandbox database. --- ## 6. Code Quality, Security & Compliance Audits The `open-api` service enforces an automated multi-layer quality and security verification pipeline before any code is approved for deployment. ### Code Quality & Linting Checklist (Ruff) Open Valstorm uses **Ruff** for high-performance Python 3.13 linting, import sorting (isort), and formatting: ```bash # Check code style, unused imports, and syntax rules uv run ruff check . # Automatically apply safe fixes and organize imports uv run ruff check --fix . # Verify formatting without mutating files uv run ruff format --check . # Format all files to PEP 8 standards uv run ruff format . ``` ### Security & Vulnerability Audits Run individual security scanners or the unified CI/CD audit script: ```bash # 1. Static Application Security Testing (SAST) via Bandit uv run bandit -c .bandit.yaml -r app # 2. Software Supply Chain Vulnerability Scan (SCA) via pip-audit uv run pip-audit # 3. Secret Leak Detection via Gitleaks gitleaks git --log-opts="HEAD~10..HEAD" --verbose # 4. Dependency License Compliance Audit (0 copyleft/GPL contamination) uv run pip-licenses --summary # 5. Full 8-Gate Security & Quality CI/CD Pipeline ./scripting/cicd/security_audit.sh ``` --- ## 7. Python Sandbox & AST Security Gatekeeper Server-side Python functions and record triggers run inside an AST-enforced, asynchronous sandbox (`apps/open-api/app/core/sandbox/`): - **Whitelisted Standard Modules**: `math`, `datetime`, `re`, `orjson`, `uuid`, `decimal`, `random`, `typing`. - **Performance Enforcement (`orjson`)**: Importing the standard `json` library is actively intercepted by the AST gatekeeper, throwing a `SecurityViolationError` instructing developers to use `orjson` for high-throughput serialization. - **Prohibited Built-ins & Calls**: `eval()`, `exec()`, `open()`, `compile()`, `globals()`, `locals()`, `vars()`, `__import__()`, `breakpoint()`. - **Introspection & Escape Armor**: Access to dunder attributes (`__class__`, `__subclasses__`, `__bases__`, `__mro__`, `__globals__`, `__dict__`) and dynamic dunder access via `getattr`/`setattr` are strictly rejected at parse time. - **Resource Constraints**: - Script Execution Timeout: `5.0s` maximum wall clock limit (`CodeExecutionTimeout` / HTTP 408). - Trigger Recursion Guard: Maximum depth of 3 nested triggers (`TriggerRecursionError` / HTTP 400). --- ## 8. Automated Testing & Verification Run the full automated test suite using `pytest`: ```bash uv run pytest -v ``` ### Test Suite Directory (`apps/open-api/tests/`) The test suite consists of 50 integration and unit tests across 19 specialized modules: | Test Module | Coverage Domain | | :--- | :--- | | `tests/test_triggers_and_sandbox.py` | AST security gatekeeper, `orjson` enforcement, Before/After record triggers, recursion prevention. | | `tests/test_platform_context.py` | Direct SDK and REST API route parity for `records`, `query`, `schemas`, `files/vfs`, `apps`, `sandboxes`. | | `tests/test_query_service.py` | SQL AST validation, `SELECT`-only enforcement, LIMIT capping, and injection sanitization. | | `tests/test_query_hydration.py` | Relational lookup hydration (`hydrate: true/false`) and reverse resolution. | | `tests/test_phase3_security_and_sql.py` | Object-Level Security (OLS), Field-Level Security (FLS), Row-Level Security (RLS), and SQL macro rewriting. | | `tests/test_iteration_a_security_gaps.py` | Canonical prefix mapping, schema validation rules, OAuth2 refresh tokens, and OLS/RLS gates. | | `tests/test_enterprise_licensing.py` | Multi-tier enterprise licensing, license activation, and dynamic feature flag toggles. | | `tests/test_ddl_compiler.py` | Schema definition to PostgreSQL DDL compilation (`CREATE TABLE`, `ALTER TABLE`, `DROP COLUMN`). | | `tests/test_schema_sync_reflection.py` | Dual-system schema synchronization, PostgreSQL drift detection, and prefix utilities. | | `tests/test_vfs_and_files.py` | Virtual File Service (VFS), Knowledge Vault hierarchy, file revisions, and rollback. | | `tests/test_cud_notifications.py` | CUD mutation event publishing, Valkey pub/sub, and WebSocket distribution. | | `tests/test_graphql.py` | Dynamic GraphQL schema generation, Strawberry resolvers, and dataloaders. | | `tests/test_graphql_page_record_errors.py` | Complex type handling and field error boundaries in GraphQL execution. | | `tests/test_app_deployment.py` | Application marketplace installation, bundle deployment, and subscriber tracking. | | `tests/test_bootstrap_v2.py` | Full V2 bootstrap lifecycle and org provisioning. | | `tests/test_seeder.py` | End-to-end default core bootstrap seeding (33 foundational Base App tables). | | `tests/test_generic_seeder.py` | Custom non-proprietary org seeding and Universal Support User verification. | | `tests/test_e2e_seeded_api.py` | Production v1 API contract verification against seeded live tenant data. | | `tests/test_api_endpoints.py` | Health endpoints, OpenAPI schema generation, and service readiness. | --- ## 9. Resetting & Wiping Your Local Instance (Fresh Admin & Client Setup) To completely wipe your local Open Valstorm instance—including the central `valstorm_directory` database, all isolated per-tenant PostgreSQL databases (`org_*`), Valkey/Redis cache, and local VFS storage—and bootstrap a fresh Admin and Client workspace from the ground up, follow these steps: ### Step 1: Wipe the Databases, Volumes & Local Storage Because Open Valstorm dynamically creates a dedicated PostgreSQL database for each tenant (`org_awmq8vsogmavwkw9`, `org_dsnpmrjs1zkkdyq2`, sandboxes, etc.) inside the `open_pgdata` Docker volume, tear down the compose stack with `-v` (remove volumes) from the monorepo root: ```bash # Tear down containers and delete the open_pgdata PostgreSQL volume docker compose -f docker-compose.open.yaml down -v # Optional: Remove any local VFS files written to disk during previous test runs rm -rf apps/open-api/storage ``` ### Step 2: Start Fresh PostgreSQL & Valkey Containers Choose whether to run only the database/cache in Docker (with the FastAPI server running on your host via `uv`) or the entire stack in Docker: * **Option 1 — Run DB/Cache in Docker & API on Host (Recommended for local dev):** ```bash docker compose -f docker-compose.open.yaml up -d open-postgres open-valkey ``` * **Option 2 — Run the Full Stack (Postgres, Valkey, Open-API, Open-Worker) in Docker:** ```bash docker compose -f docker-compose.open.yaml up -d ``` ### Step 3: Seed a Fresh Admin Org, Support User & Client Workspace Navigate to `apps/open-api` and run `app/seed.py`. This initializes `valstorm_directory`, provisions the dedicated PostgreSQL databases for both the **Admin** and **Client** organizations, compiles the foundational Base App tables/schemas, attaches the Universal Support User, and flushes Valkey (`FLUSHDB`): ```bash cd apps/open-api uv sync ``` Choose one of the three seeding modes: #### Option A: Default Valstorm Seed (Fastest) ```bash uv run python app/seed.py ``` | Role | Email | Password | Organization ID | Dedicated Postgres DB | | :--- | :--- | :--- | :--- | :--- | | **Super Admin** | `admin@valstorm.com` | `valstorm_admin_password` | `org_AwmQ8vSogMavWkw9` | `org_awmq8vsogmavwkw9` | | **Support User** | `support@valstorm.com` | `valstorm_support_password` | *(Attached to all orgs)* | *(Both Admin & Client DBs)* | | **Client Admin** | `team@valstorm.com` | `valstorm_client_password` | `org_dSnPMRjS1ZkkdYQ2` | `org_dsnpmrjs1zkkdyq2` | #### Option B: Interactive Setup Wizard (Custom Names, Emails & Passwords) ```bash uv run python app/seed.py --interactive ``` #### Option C: Custom CLI Flags ```bash uv run python app/seed.py \ --admin-org-name 'System Administration' \ --admin-user-name 'Super Admin' \ --admin-email 'admin@valstorm.com' \ --admin-password 'AdminSecret123!' \ --support-email 'support@valstorm.com' \ --support-password 'SupportSecret123!' \ --client-org-name 'Test Client Org' \ --client-user-name 'Client Tester' \ --client-email 'client@valstorm.com' \ --client-password 'ClientSecret123!' ``` ### Step 4: Start the Open API Server If you selected **Option 1** in Step 2 (running the API on your host machine): ```bash cd apps/open-api uv run uvicorn app.main:app --port 8010 --reload ``` * **API Base URL:** `http://localhost:8010` * **Interactive Swagger Docs:** `http://localhost:8010/docs` ### Step 5: Migrating Existing MongoDB Tenants to PostgreSQL (1-Click ETL) To migrate existing Valstorm organizations from MongoDB (`apps/api` + `apps/worker-go`) into dedicated Open Valstorm PostgreSQL databases (`apps/open-api` + `apps/open-worker`): ```bash # Migrate a single tenant organization (with row-count + checksum verification) uv run --project scripting python scripting/database-admin/migrate_mongo_to_postgres.py --org org_dSnPMRjS1ZkkdYQ2 --verify # Migrate all tenant organizations discovered in MongoDB uv run --project scripting python scripting/database-admin/migrate_mongo_to_postgres.py --all-orgs --verify # Clean re-migration (drops & recreates target tenant databases before loading) uv run --project scripting python scripting/database-admin/migrate_mongo_to_postgres.py --all-orgs --flush --verify ``` What the migration pipeline automatically handles: * **Global Directory (`valstorm_directory`)**: Syncs `organization`, `users`, `app` (filtering deprecated monolithic apps converted to `/plugins`), and `external_account_routing` (Twilio, Telnyx, Stripe, OAuth). * **Schema & Plugin DDL Compilation**: Compiles all MongoDB `schemas`, merges foundational `base_app.json` + built-in plugin schemas (`user_ai_memory`, `user_asset_affinity`, `personal_access_token`), hydrates picklist/multi-select options from `tag`, and guarantees zero prefix collisions and `SchemaService.get_sync_status() == True`. * **Encrypted Credentials & BYOK**: Decrypts legacy AES-256-CBC `auth_credential` and `environment_configuration` envelopes (including double-encrypted or Python dict repr payloads) and re-encrypts them as RFC 8259 JSON under the Open Valstorm encryption key. * **AI Working Memory & VFS Paths**: Consolidates `user_asset_affinity` (`uaaf_`) records into `user_ai_memory.pinned_assets` (`uaim_`) for `valstorm-plugin-ai` and computes hierarchical `vault_paths` across `vault` and `file`. --- # [Guide: Open Valstorm Go Worker & WebSocket Hub (apps/open-worker)] (/open-worker) # Open Valstorm Worker (`apps/open-worker`) **High-Throughput Go Worker & WebSocket Hub for Open Valstorm** Built with **Go 1.23+** and **`pgx/v5`**, `open-worker` handles high-concurrency real-time WebSocket client subscriptions and asynchronous background event processing. --- ## 1. Responsibilities 1. **WebSocket Hub (`/ws`)**: - Manages persistent bi-directional connections to UI clients. - Pushes live record mutations (`record_created`, `record_updated`, `record_deleted`) directly to browser and desktop interfaces. 2. **Background Task Queue**: - Consumes asynchronous task queues for webhooks, email triggers, and scheduled jobs without blocking the main FastAPI event loop. 3. **Native PostgreSQL Access (`pgx/v5`)**: - Connects directly to `valstorm_directory` and individual tenant databases via high-performance connection pooling. --- ## 2. Quickstart Guide ### Run Locally ```bash cd apps/open-worker go run main.go ``` * **HTTP / Health Port:** `http://localhost:8080/health` * **WebSocket Endpoint:** `ws://localhost:8080/ws` ### Run in Docker ```bash docker compose -f docker-compose.open.yaml up -d open-worker ``` --- ## 3. Environment Variables | Variable | Default Value | Description | | :--- | :--- | :--- | | `PORT` | `8080` | Worker HTTP and WebSocket listen port | | `DIRECTORY_DB_URL` | `postgresql://valstorm:valstorm_password@localhost:5432/valstorm_directory` | PostgreSQL directory database connection string | | `REDIS_URL` | `redis://localhost:6379/0` | Valkey/Redis cache & pub/sub connection string | --- ## Direct Go HTTP & WebSocket Endpoints (`:8080`) Unlike Python routes on `open-api (:8010)`, performance-critical ingress endpoints are served directly by `open-worker (:8080)`: - **WebSocket Hub:** `GET /v1/ws/{org_id}/{user_id}`, `GET /v1/ws/create`, `POST /v1/ws/send_message`, `POST /v1/ws/desktop/execute` - **Fleet App Deployment:** `POST /v1/deployment/rollout`, `GET /v1/deployment/status/{job_id}`, `POST /v1/deployment/install` - **Sub-10ms AI Desktop Sync:** `POST /v1/ai/chat/{chat_id}/desktop-sync` - **High-Speed Public Form & Webhook Ingestion:** `POST /v1/inbound/submit`, `POST /v1/inbound/webhook` - **Public Calendar Booking Engine:** `GET /v1/booking/{slug}/availability`, `POST /v1/booking/{slug}/reserve` - **Telephony & Email Provider Webhooks:** `POST /v1/webhooks/telnyx/{org_id}`, `POST /v1/webhooks/twilio/{org_id}`, `POST /v1/email-services/sendgrid/webhook/{org_id}` - **OpenAPI & Route Introspection:** `GET /v1/openapi.json`, `GET /v1/routes` --- # [Guide: Model Context Protocol (MCP) Server] (/mcp) # Valstorm Hosted MCP Server (`apps/valstorm-mcp-server`) Official hosted Model Context Protocol (MCP) server for the Valstorm Enterprise Platform. - **Official Tool Page & Quickstart:** [https://www.valstorm.com/free-tools/valstorm-mcp](https://www.valstorm.com/free-tools/valstorm-mcp?utm_source=github&utm_medium=readme&utm_campaign=valstorm_mcp) - **All Valstorm Free & Open-Source Tools:** [https://www.valstorm.com/free-tools](https://www.valstorm.com/free-tools?utm_source=github&utm_medium=readme&utm_campaign=valstorm_mcp) - **Valstorm BOS Platform Overview:** [https://www.valstorm.com/bos](https://www.valstorm.com/bos?utm_source=github&utm_medium=readme&utm_campaign=valstorm_mcp) This microservice acts as a stateless, high-performance SSE & JSON-RPC proxy to the Valstorm Core API (`https://api.valstorm.com/v1`), exposing granularly scoped tools for autonomous agents (Claude Desktop, Cursor, hermes profiles, internal enterprise workers) while offloading binary transfer via direct S3 recipes. ## Architecture Highlights - **Dual Transport:** Serves Streamable HTTP at `/mcp` (the current MCP standard, used by Claude and Cursor), the legacy SSE transport at `/sse` + `/messages` for older clients, and `stdio` for local CLI workflows. - **Stateless Transport:** `/mcp` runs stateless, so any replica can answer any request. Multi-replica deployments need no session affinity. - **OAuth 2.1 Discovery:** Publishes RFC 9728 protected-resource and RFC 8414 authorization-server metadata describing itself, delegating authorization and token endpoints to the core API. - **Stateless Proxy:** Zero direct database attachments. Forwards JSON-RPC tool invocations to the core Valstorm REST API via `httpx.AsyncClient`. - **Granular Scopes:** Strict token scope inspection (`vfs:read`, `vfs:write`, `vfs:delete`, `record:read`, `record:write`, `record:delete`, `query:execute`). - **Transfer Orchestrator:** Bypasses JSON-RPC bloat by returning S3 presigned URLs and execution recipes for binary transfers. - **RAG & Search:** Server-side Gemini RAG (`vfs_ask`) and OpenSearch hybrid retrieval (`vfs_search`). - **Zero N+1 Querying:** Single-roundtrip document fetching (`vfs_read_text` via `GET /vfs/file/{id}`) and batch foreign key hydration (`record_hydrate_batch` via `POST /object/hydrate-batch`). ## Quickstart ### Running locally with stdio: ```bash uv run --project apps/valstorm-mcp-server valstorm-mcp --transport stdio ``` ### Running the hosted HTTP server (Streamable HTTP + SSE): ```bash uv run --project apps/valstorm-mcp-server valstorm-mcp --transport streamable-http --host 0.0.0.0 --port 8660 ``` Or via uvicorn directly: ```bash uv run --project apps/valstorm-mcp-server uvicorn valstorm_mcp.server:app --host 0.0.0.0 --port 8660 ``` ## Available Tool Registry (16 Tools) ### Virtual File System (VFS) 1. `vfs_search(query, limit=10, vault_id=None)` — Hybrid OpenSearch vector & metadata chunk search. 2. `vfs_ask(query, vault_id=None, limit=5)` — Server-side Gemini RAG with synthesized markdown answer and citations. 3. `vfs_read_text(file_id, max_bytes=100000)` — High-performance single-roundtrip text reader (`GET /vfs/file/{id}`). 4. `vfs_browse(target='root', browse_type='vault')` — Explores VFS vaults, folder trees, or full hierarchy snapshots. 5. `vfs_move(item_id, to_vault_id)` — Atomic file or vault folder moves with path cascades. 6. `vfs_prepare_upload(filename, vault_id=None, content_type="application/octet-stream")` — Generates out-of-band upload recipe. 7. `vfs_get_download_url(file_id)` — Generates presigned S3 GET URL & terminal download recipe. 8. `vfs_delete_file(file_id, confirm=False)` — Secure file deletion guarded by confirmation flag. ### Records, SQL, & Schemas 9. `record_query_sql(query, bypass_cache=False, limit=50)` — Executes custom Valstorm SQL engine (`SELECT ... WHERE owner = ME`). 10. `record_query_mongo(collection, pipeline)` — Structured document aggregation pipeline (`$match`, `$group`, `$lookup`, `$facet`). 11. `record_hydrate_batch(ids)` — Resolves foreign key ID arrays to display names and schemas in a single roundtrip. 12. `record_get(api_name, record_id)` — Fetches single record by ID. 13. `record_create(api_name, record)` — Creates single or batch records. 14. `record_update(api_name, record_id, data)` — Patches existing record fields. 15. `record_delete(api_name, record_id, confirm=False)` — Removes a record guarded by confirmation flag. 16. `schema_inspect(api_name=None)` — Introspects object schemas, fields, lookups, and validation rules. --- ## License & Commercial Terms Valstorm Hosted MCP Server is distributed under a **Dual License** model: - **Noncommercial Use (Community & Academic)**: Licensed under the **[PolyForm Noncommercial License 1.0.0](LICENSE.md)**. You are free to run, inspect, and evaluate the server for personal, hobby, or educational purposes without fees. - **Commercial & Enterprise Use**: Any commercial use—including running internal business operations, powering SaaS backends, managed hosting, or client consulting deliverables—requires a commercial agreement. For commercial licensing, enterprise BYOC terms, or official partner programs: - **Email:** team@valstorm.com - **Website:** [Valstorm Pricing](https://valstorm.com/pricing) - **Enterprise Portal:** [Valstorm Enterprise](https://valstorm.com/enterprise) See [CONTRIBUTING.md](CONTRIBUTING.md) for community guidelines and development policies. ``` Copyright (c) 2026 Valstorm LLC. All rights reserved. ``` ---

Built by Valstorm — The everything engine for business operations.

--- # [Guide: Valstorm Agent Runtime (vsagent)] (/agent-runtime) # Valstorm Agent Runtime (`vsagent`) [![Release](https://img.shields.io/github/v/release/Valstorm-Corp/valstorm-agent?color=blue&label=version)](https://github.com/Valstorm-Corp/valstorm-agent/releases) [![License](https://img.shields.io/badge/License-PolyForm%20Noncommercial%201.0.0-purple.svg)](LICENSE.md) [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/) [![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey)]() [![Valstorm Enterprise](https://img.shields.io/badge/Enterprise-Valstorm%20Cloud-emerald)](https://www.valstorm.com/register?utm_source=github&utm_medium=readme&utm_campaign=vsagent_repo&utm_content=badge) **Valstorm Agent Runtime (`vsagent`)** is an enterprise-grade autonomous AI execution runtime and ReAct engine designed for developer workstations, continuous integration pipelines, and team-wide automation. - **Official Tool Page & Architecture Guide:** [https://www.valstorm.com/free-tools/valstorm-agent](https://www.valstorm.com/free-tools/valstorm-agent?utm_source=github&utm_medium=readme&utm_campaign=valstorm_agent) - **6-Axis Scientific Benchmark & Ablation Study:** [https://www.valstorm.com/research/agent-runtime-benchmark-harness](https://www.valstorm.com/research/agent-runtime-benchmark-harness?utm_source=github&utm_medium=readme&utm_campaign=valstorm_agent) - **All Valstorm Free & Open-Source Tools:** [https://www.valstorm.com/free-tools](https://www.valstorm.com/free-tools?utm_source=github&utm_medium=readme&utm_campaign=valstorm_agent) Run it locally from your command line, launch it as a background workstation daemon, or orchestrate it remotely from anywhere. --- > ### 🏢 Deploying for Your Team or Enterprise? > **The best way to run and manage `vsagent` across your organization is through [Valstorm Enterprise](https://www.valstorm.com/register?utm_source=github&utm_medium=readme&utm_campaign=vsagent_repo&utm_content=hero_banner).** > > - **📱 Remote Control from Your Phone:** Command your AI from your smartphone or browser on the go to take real actions on your office PC, local workstation, or remote servers. > - **🛡️ Built for Non-Developers (100% Zero-Code):** Operations, finance, and management teams can execute complex automations, data synthesis, and file tasks through an intuitive visual chat interface—no terminal or coding required. > - **🔒 Cloud Sandboxing & Blast-Radius Protection:** Safely run code execution and shell tools in isolated, ephemeral Docker containers or E2B cloud sandboxes with human-in-the-loop approval gates. > - **⚡ 1-Click Zero-Config Setup:** Install tools, register workstations, and launch the agent daemon automatically via the Valstorm Desktop client. > - **🔑 Managed Multi-Model Gateway:** Zero API key distribution or management. Provision access to Google Gemini, Anthropic Claude, OpenAI, and DeepSeek through centralized company billing. > - **☁️ Live Cloud Sync & Audit Logs:** Every turn, tool call, and token telemetry event syncs seamlessly to your organization's unified workspace and CRM. > - **📚 Enterprise Knowledge Vaults:** Grant your agent secure access to private Virtual File Service (VFS) documents, company SOPs, and database query engines. > > 👉 **[Create Your Valstorm Workspace](https://www.valstorm.com/register?utm_source=github&utm_medium=readme&utm_campaign=vsagent_repo&utm_content=hero_cta)** --- ## Key Capabilities ### 📱 1. Remote Execution: Control Your Workstation from Your Phone Valstorm Agent bridges devices seamlessly. You can message your AI agent while away from your desk (using the Valstorm Mobile app or web portal) and instruct it to: - Take action on your **office PC** or local dev machine (e.g. *"Run our test suite on my machine and let me know if it passes"*). - Execute operational playbooks on **remote servers or cloud instances**. - Retrieve or modify local files and git branches from anywhere in the world. ### 🛡️ 2. Zero-Code & Safe for Non-Developers You do not need to be a software engineer to harness autonomous agents: - **Human-in-the-Loop Safeguards:** Any potentially destructive action (file deletions, database mutations, external communications) automatically pauses and requests explicit approval before proceeding. - **Full Cloud Version:** Use the 100% cloud-hosted agent runtime without installing anything on your computer. - **Automated Redaction & Secret Sanitization:** Sensitive credentials, connection strings, and API keys are automatically masked before any prompt egresses. ### 🧪 3. Isolated Sandboxing & Code Execution - **Multi-Engine Sandboxes:** Execute generated code and shell commands inside ephemeral Docker containers or remote E2B cloud sandboxes. - **Zero Local Blast Radius:** Prevent runaway scripts or dependency conflicts on developer laptops. ### 🧠 4. Cognitive Model Cascade & Swarm Delegation - **Dynamic Model Fallback:** Automatically cascades through cognitive tiers (`tier_1`: Heavy Thinker, `tier_2`: Reasoner, `tier_3`: Worker Bee) across Gemini, Claude, OpenAI, and DeepSeek. - **Subagent Delegation (`delegate_task`):** Spawns isolated child subagents with scoped tool access to tackle complex multi-step objectives in parallel without context pollution. ### 🧰 5. Enterprise Toolbelt & 170+ Procedural Skills - **Developer Tools:** `terminal_exec`, `patch_file`, `write_file`, `read_file`, `search_files`. - **System Management:** `process_manage`, `execute_code`, `clarify`, `confirmation_required`. - **Valstorm Platform Tools:** Direct access to `valstorm_sql_query`, `valstorm_schema_inspect`, Knowledge Vaults (`valstorm_vfs_search`), and CRM mutations. - **170+ Standard Operating Procedures:** Built-in repository of battle-tested engineering, debugging, and DevOps skills accessed on demand. --- ## Architecture: Hybrid Remote Execution Mesh ``` 📱 Mobile App / Web Browser / Phone │ ▼ (Encrypted WebSocket / REST API) ☁️ Valstorm Enterprise Cloud Gateway • Multi-Tenant State & Audit Logging • Managed Multi-Model Gateway • Knowledge Vaults (VFS) │ ┌─────────────┴─────────────┐ ▼ ▼ 💻 Local Workstation 🛡️ Ephemeral Cloud Sandboxes • Valstorm Desktop App • Isolated Docker / E2B • vsagent Gateway (8650) • Zero local blast radius • Git repos & Local Shell • Safe for non-developers ``` --- ## Installation ### Method 1: Install via Valstorm Desktop (Recommended for Teams & Non-Developers) For zero-configuration setup with automatic token authentication, device registration, and background daemon lifecycle: 1. Download and open [Valstorm Desktop](https://www.valstorm.com/register?utm_source=github&utm_medium=readme&utm_campaign=vsagent_repo&utm_content=desktop_installer). 2. Follow the 1-click onboarding installer at `valstorm://install`. 3. All dependencies, PATH entries, and credentials are configured automatically. --- ### Method 2: Standalone CLI Installation (Developers / CI) Install globally using [`uv`](https://docs.astral.sh/uv/): ```bash # Install vsagent tool globally from GitHub uv tool install --from git+https://github.com/Valstorm-Corp/valstorm-agent.git valstorm-agent --force # Verify installation vsagent --version vsagent status ``` *Tip: If you do not have `uv` installed, get it in seconds via `curl -LsSf https://astral.sh/uv/install.sh | sh`.* --- ## Quickstart & CLI Usage ### 1. Interactive Chat REPL Start a multi-turn conversation with the agent directly in your terminal: ```bash # Launch interactive REPL with default assistant vsagent chat # Launch with specialized role profiles vsagent chat --profile developer vsagent chat --profile researcher vsagent chat --profile architect vsagent chat --profile backend-tester vsagent chat --profile orchestrator # Switch models and providers on the fly vsagent chat --model gemini-flash-latest --provider gemini vsagent chat --model claude-3-7-sonnet-latest --provider anthropic ``` Inside the REPL, use slash commands to manage context and state: - `/tasks` or `/todo`: Inspect the live task checklist. - `/compact`: Prune verbose historical tool outputs while retaining decisions. - `/stats`: View prompt, completion, and cumulative session token usage. - `/history`: Review full conversation turns and tool execution logs. - `/profile `: Switch active agent persona mid-session. - `/yolo`: Toggle human-confirmation bypass mode for high-risk commands. --- ### 2. Single-Prompt Task Runner Execute a task autonomously and exit immediately: ```bash # Run a refactoring task vsagent run "Inspect apps/api and refactor the authentication middleware" # Run with a specialized developer profile vsagent run --profile developer "Run test suite and fix failing assertions" # Shorthand prompt flag vsagent -p "Summarize git diff since origin/main" ``` --- ### 3. Cloud Session Synchronization When authenticated with a Valstorm workspace (`valstorm login pat `), all CLI turns and token metrics automatically sync to your Valstorm cloud dashboard: ```bash # Synced by default: visible in Valstorm Desktop & Mobile AI Chats vsagent run "Build release artifacts" # Run completely offline / privately without syncing vsagent run "Generate private key" --no-sync ``` --- ### 4. Background Server Daemon Start the local HTTP / SSE gateway daemon on port `8650`: ```bash # Start background host daemon vsagent server start host --port 8650 # Check daemon status vsagent server status ``` --- ## Configuration & Provider Keys `vsagent` supports two configuration modes: ### Mode A: Valstorm Managed Gateway (Zero-Config) When linked to an active [Valstorm organization](https://www.valstorm.com/register?utm_source=github&utm_medium=readme&utm_campaign=vsagent_repo&utm_content=enterprise_gateway), your CLI authenticates using your desktop PAT: ```bash valstorm login pat ``` All model requests route through your tenant's multi-model gateway with centralized company billing. ### Mode B: Bring Your Own Keys (BYOK) Store provider API keys securely in `~/.config/valstorm/keys.json`: ```bash vsagent keys set gemini vsagent keys set openai vsagent keys set anthropic ``` --- ## Contributing & Development Valstorm Agent Runtime is developed and maintained exclusively by the core engineering team at **Valstorm LLC** to preserve strict architectural security and unified copyright ownership. While external pull requests are not accepted, community feedback, bug reports, and discussions are welcome! Please see **[CONTRIBUTING.md](CONTRIBUTING.md)** for details on how to report issues and participate. To set up the agent runtime locally for development or testing: ```bash # Clone the repository git clone https://github.com/Valstorm-Corp/valstorm-agent.git cd valstorm-agent # Sync virtualenv and dependencies with uv uv sync # Run the test suite uv run pytest tests/ ``` --- ## License & Commercial Terms Valstorm Agent Runtime is distributed under a **Dual License** model: - **Noncommercial Use (Community & Academic)**: Licensed under the **[PolyForm Noncommercial License 1.0.0](LICENSE.md)**. You are free to run, inspect, and evaluate the software for personal, hobby, or educational purposes without fees. - **Commercial & Enterprise Use**: Any commercial use—including running internal business operations, powering SaaS backends, managed hosting, or client consulting deliverables—requires a commercial agreement. For commercial licensing, enterprise BYOC terms, or official partner programs: - **Email:** team@valstorm.com - **Website:** [Valstorm Pricing](https://valstorm.com/pricing) - **Enterprise Portal:** [Valstorm Enterprise](https://valstorm.com/enterprise) ``` Copyright (c) 2026 Valstorm LLC. All rights reserved. ``` ---

Built by Valstorm — The everything engine for business operations.

--- # [Guide: Python Client SDK (valstorm-client)] (/sdk-python) # Valstorm Python Client SDK (`valstorm-client`) The official Python client library for the **Open Valstorm** platform. Built with Python 3.13+, `httpx`, and `pydantic`. Provides **1:1 structural interface parity** with the server-side in-process `PlatformContext` (`client.records.*`, `client.query.*`, `client.vfs.*`, `client.schemas.*`, `client.files.*`, `client.apps.*`, `client.sandboxes.*`), enabling unified developer ergonomics across both in-process and remote satellite applications. - **Official SDK Page & Documentation:** [https://www.valstorm.com/free-tools/valstorm-client-python](https://www.valstorm.com/free-tools/valstorm-client-python?utm_source=github&utm_medium=readme&utm_campaign=valstorm_client_python) - **All Valstorm Free & Open-Source Tools:** [https://www.valstorm.com/free-tools](https://www.valstorm.com/free-tools?utm_source=github&utm_medium=readme&utm_campaign=valstorm_client_python) - **Valstorm BOS Platform Overview:** [https://www.valstorm.com/bos](https://www.valstorm.com/bos?utm_source=github&utm_medium=readme&utm_campaign=valstorm_client_python) --- ## Features - **Dual Sync & Async Transports**: - `ValstormClient` — Synchronous, backed by `httpx.Client(http2=True)`. Designed for CLI tools, Celery worker tasks, offline data migrations, and linear Python scripts. - `AsyncValstormClient` — Fully asynchronous, backed by `httpx.AsyncClient(http2=True)`. Designed for high-concurrency AI agent loops (`apps/agent-runtime`), FastMCP servers (`apps/valstorm-mcp-server`), and FastAPI applications. - **1:1 `PlatformContext` Parity**: - Shared method names, signatures, and mental models as `apps/open-api/app/core/platform_context.py`. - Type-checked via Python `typing.Protocol` interfaces (`PlatformProtocol`). - **Robust Authentication Strategies**: - `PatAuth` — Long-lived Personal Access Tokens (`vst_pat_...`). - `ServiceKeyAuth` — Machine-to-Machine keys (`vst_sk_...`) with organization scoping. - `UserJwtAuth` — Interactive user OAuth2 tokens with automatic JWT expiration detection and mutexed proactive/reactive refresh. - **Enterprise Resilience**: - HTTP/2 multiplexing and connection pooling. - Automatic `X-Request-ID` tracing on every call. - Granular exception hierarchy mapping HTTP status codes (`AuthenticationError`, `NotFoundError`, `ValidationError`, `RateLimitError`). --- ## Installation Using `uv` (recommended): ```bash uv add "valstorm-client @ git+https://github.com/Valstorm-Corp/valstorm-client-python.git" ``` Using `pip`: ```bash pip install "git+https://github.com/Valstorm-Corp/valstorm-client-python.git" ``` --- ## Quickstart ### 1. Synchronous Usage (`ValstormClient`) Ideal for CLI commands, Celery tasks, and ETL scripts: ```python from valstorm import ValstormClient, PatAuth client = ValstormClient( base_url="http://localhost:8010/v1", auth=PatAuth("vst_pat_your_token_here"), ) # 1. Query data using SQL leads = client.query.sql("SELECT id, name, status, loan_amount FROM lead WHERE status = 'Active'") print(f"Found {len(leads)} active leads") # 2. Create records new_leads = client.records.create( "lead", [{"name": "Alice Morgan", "email": "alice@example.com", "loan_amount": 750000}] ) print(f"Created lead: {new_leads[0]['id']}") # 3. List records with pagination records, total_count = client.records.list("lead", limit=20, offset=0) # 4. Explore Virtual File Service vfs_tree = client.vfs.tree() ``` ### 2. Asynchronous Usage (`AsyncValstormClient`) Ideal for AI Agent Runtimes, FastMCP servers, and streaming endpoints: ```python import asyncio from valstorm import AsyncValstormClient, UserJwtAuth async def main(): async with AsyncValstormClient( base_url="http://localhost:8010/v1", auth=UserJwtAuth( access_token="eyJhbGciOi...", refresh_token="ref_12345...", on_refresh=lambda new_acc, new_ref: print("Tokens auto-refreshed!"), ), ) as client: # SQL query results = await client.query.sql("SELECT * FROM contact LIMIT 5") # Virtual File Service snapshot snapshot = await client.vfs.snapshot() # Schema metadata inspection schema = await client.schemas.get("contact") print(f"Contact fields: {list(schema.get('properties', {}).keys())}") asyncio.run(main()) ``` --- ## Authentication Strategies ### 1. Personal Access Token (PAT) ```python from valstorm import ValstormClient, PatAuth client = ValstormClient(auth=PatAuth("vst_pat_abc123")) ``` ### 2. Machine-to-Machine Service Key (M2M) ```python from valstorm import ValstormClient, ServiceKeyAuth client = ValstormClient( auth=ServiceKeyAuth(service_key="vst_sk_xyz789", organization_id="org_marketing_prod") ) ``` ### 3. User JWT with Transparent Auto-Refresh ```python from valstorm import AsyncValstormClient, UserJwtAuth def save_tokens(access_token: str, refresh_token: str | None): # Persist updated tokens to secure store (~/.valstorm/profiles/default.json) ... auth = UserJwtAuth( access_token="...", refresh_token="...", on_refresh=save_tokens, ) client = AsyncValstormClient(auth=auth) ``` --- ## Domain Facades Overview Both `ValstormClient` and `AsyncValstormClient` expose identical facades: | Facade | Methods | Description | |---|---|---| | `client.records` | `create()`, `update()`, `delete()`, `get()`, `list()` | Record mutations (CUD) and ID lookups | | `client.query` | `sql()`, `graphql()` | Sanitized SQL execution and dynamic GraphQL | | `client.schemas` | `get()`, `list()`, `create()`, `update()`, `delete()`, `add_field()`, `delete_field()` | Object definition and DDL schema compiler | | `client.vfs` | `tree()`, `snapshot()`, `move()`, `batch_move()`, `get_vault()`, `resolve_path()`, `delete()` | Virtual File Service hierarchical vault operations | | `client.files` | `get()`, `register()`, `save_content()`, `presigned_upload()`, `direct_upload()`, `rollback()` | Binary file storage, attachments, and versioning | | `client.apps` | `list_installed()`, `list_marketplace()`, `get()`, `install()`, `bulk_install()`, `deploy()` | Marketplace app bundles and fleet tenant deployments | | `client.sandboxes` | `create()`, `delete()` | Dedicated tenant PostgreSQL database sandboxes | --- ## Error Handling All HTTP errors are mapped to typed Python exceptions inheriting from `ValstormError`: ```python from valstorm import ValstormClient from valstorm.exceptions import ( AuthenticationError, PermissionDeniedError, NotFoundError, ValidationError, RateLimitError, ServerError, ) client = ValstormClient.from_env() try: lead = client.records.get("lead", "non_existent_id") except NotFoundError: print("Record not found") except RateLimitError as e: print(f"Rate limited. Retry after {e.retry_after} seconds.") except ValidationError as e: print(f"Validation failure: {e.details}") except AuthenticationError: print("Session expired or invalid token") ``` --- ## License This software is distributed under a **Dual License** model: - **Noncommercial Use**: Governed by the **PolyForm Noncommercial License 1.0.0**. - **Commercial & Enterprise Use**: Governed by the **Valstorm Commercial License Agreement**. See `LICENSE.md` and `CONTRIBUTING.md` for full details. --- # [Guide: Valstorm CLI (valstorm)] (/cli) # Valstorm CLI A local command-line interface for Valstorm developers to authenticate via OAuth 2.1 + PKCE, pull and push object schemas as code, and manage local workspaces. - **Official Tool Page & Quickstart:** [https://www.valstorm.com/free-tools/valstorm-cli](https://www.valstorm.com/free-tools/valstorm-cli?utm_source=github&utm_medium=readme&utm_campaign=valstorm_cli) - **All Valstorm Free & Open-Source Tools:** [https://www.valstorm.com/free-tools](https://www.valstorm.com/free-tools?utm_source=github&utm_medium=readme&utm_campaign=valstorm_cli) - **Valstorm BOS Platform Overview:** [https://www.valstorm.com/bos](https://www.valstorm.com/bos?utm_source=github&utm_medium=readme&utm_campaign=valstorm_cli) - **Valstorm Pricing & Self-Serve Workspace:** [https://www.valstorm.com/pricing](https://www.valstorm.com/pricing?utm_source=github&utm_medium=readme&utm_campaign=valstorm_cli) ## Prerequisites - [uv](https://github.com/astral-sh/uv) installed on your machine (`curl -LsSf https://astral.sh/uv/install.sh | sh`). - Ensure `$HOME/.local/bin` is added to your `PATH` (executables installed via `uv tool` reside in `~/.local/bin`): ```bash # For zsh (default on macOS): echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc # For bash: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc ``` ## Usage ### Run from the Monorepo Root The recommended way to run the CLI while developing is using `uv run` from the root: ```bash uv run --project cli valstorm --help ``` To check the API status: ```bash uv run --project cli valstorm status ``` ### Run from the CLI Directory You can also run it directly from this folder: ```bash cd cli uv run valstorm status ``` ## Installation To install the `valstorm` command globally, use `uv tool install` directly from GitHub: ```bash uv tool install git+https://github.com/Valstorm-Corp/valstorm-cli ``` Now you can just run: ```bash valstorm status ``` ## Commands - `status`: Checks if the Valstorm API is live. --- # [Guide: Data Model Rules, SQL Macros & VFS Hybrid Search] (/data-model-and-sql) # Data Model Rules, SQL Engine & VFS Hybrid Search Every developer and AI agent building on Valstorm (Cloud or COSS) **must** follow these core data model invariants. --- ## 1. Critical Data Model Rules (Zero-Exception Invariants) ### Rule 1: Relationship Lookups Store Plain String IDs Only Never write dictionary lookups (e.g. `{"id": "user_123", "name": "Jared"}`) when creating or updating records. - **Single Lookup (`format: "lookup"`):** Store the plain Base62 string ID (e.g. `"owner": "user_qBulInDu18OcylWP"`, `"account": "acc_9x8y7z"`). - **Lookup List (`format: "lookup_list"`):** Store a JSON array of plain string IDs (e.g. `"contacts": ["con_123", "con_456"]`, `"vaults": ["vaul_abc"]`). - Display name hydration happens dynamically at read/query time (`hydrate=True`), never in persistent storage. ### Rule 2: Picklists Store Human-Readable Tag Labels (Not Tag IDs) Fields with `format: "picklist"` (such as `status`, `priority`, `type`, `lead_source`, `utm_source`) must be populated with the **string label/value** (e.g. `"status": "Active"`, `"priority": "High"`), **never** a `tag_...` record ID. ### Rule 3: Native UTC Timestamps & Base62 Prefixes - Every object has a deterministic 3–4 character Base62 ID prefix (e.g. `con_` for `contact`, `tick_` for `ticket`, `file_` for `file`, `vaul_` for `vault`, `aich_` for `ai_chat`). - Custom objects and fields created by non-system orgs automatically receive the `__c` suffix. --- ## 2. Valstorm ANSI SQL Engine & Dynamic Macros (`POST /v1/query/sql`) Open Valstorm compiles Valstorm SQL directly to parameterized PostgreSQL AST via `sqlglot`, supporting native `JOIN`s, aggregations, and dynamic macros: ```sql SELECT d.id, d.name, d.amount, c.name AS contact_name FROM deal d JOIN contact c ON d.primary_contact = c.id WHERE d.owner = ME AND d.created_date = last_n_days:30 ORDER BY d.amount DESC LIMIT 50 ``` ### Supported SQL Macros | Macro | Description | Example | | :--- | :--- | :--- | | `ME` | Expands to the authenticated user's ID (`user_...`) | `WHERE owner = ME` | | `PHONE:` | Searches across all phone-formatted columns on the table | `WHERE PHONE:8605551234` | | `today` / `yesterday` | UTC day boundary range | `WHERE created_date = today` | | `this_week` / `last_week` | ISO week boundary range | `WHERE created_date = this_week` | | `this_month` / `last_month` | Calendar month boundary range | `WHERE created_date = this_month` | | `this_year` / `last_year` | Calendar year boundary range | `WHERE created_date = this_year` | | `last_n_days:` / `next_n_days:` | Rolling N-day window | `WHERE created_date = last_n_days:7` | | `last_n_months:` / `next_n_months:` | Rolling N-month window | `WHERE close_date = next_n_months:3` | --- ## 3. Virtual File Service (VFS) & `pgvector` Hybrid RRF Search Open Valstorm stores hierarchical Knowledge Vaults (`vault`) and versioned files (`file`, `file_version`) backed by S3/Spaces and indexes document chunks into PostgreSQL `file_chunk` using: 1. **Dense Vector Search (`pgvector`):** 768-dimension HNSW cosine distance (`embedding <=> $2::vector(768)`). 2. **Lexical Full-Text Search (`tsvector`):** PostgreSQL GIN index (`websearch_to_tsquery('english', $1)`). 3. **Reciprocal Rank Fusion (RRF):** Blends lexical rank and semantic vector rank (`1 / (60 + rank_lex) + 1 / (60 + rank_vec)`) in a single SQL CTE (`GET /v1/vfs/search?query=...`). --- # [Guide: Web Intelligence Scraper (:8661) & Video Worker (:8089)] (/web-scraper-and-video-worker) # Valstorm Web Intelligence & Scraping Service (`apps/web-scraper`) High-performance, multi-tenant web scraping, crawler, RSS feed monitoring, and visual diff microservice powered by native Python 3.14 Zstandard (zstd) compression, Valkey single-flight locks, and direct Virtual File Service (VFS) Knowledge Vault ingestion via `valstorm-client`. - **Official Tool Page & Architecture Guide:** [https://www.valstorm.com/free-tools/valstorm-web-scraper](https://www.valstorm.com/free-tools/valstorm-web-scraper?utm_source=github&utm_medium=readme&utm_campaign=valstorm_web_scraper) - **All Valstorm Free & Open-Source Tools:** [https://www.valstorm.com/free-tools](https://www.valstorm.com/free-tools?utm_source=github&utm_medium=readme&utm_campaign=valstorm_web_scraper) - **Valstorm BOS & Knowledge Vaults:** [https://www.valstorm.com/bos](https://www.valstorm.com/bos?utm_source=github&utm_medium=readme&utm_campaign=valstorm_web_scraper) --- ## Key Features 1. **3-Tier Waterfall Pipeline**: - **Tier 1 (Fast HTTP)**: Async HTTP via `httpx` with HTTP/2 and Brotli/Gzip decoding. - **Tier 2 (Stealth Playwright)**: Headless Chromium with stealth evasion scripts, canvas spoofing, and JavaScript rendering. - **Tier 3 (Firecrawl Cloud Fallback)**: Automated cloud fallback for complex Cloudflare Turnstile or Akamai challenges. 2. **Native Python 3.14 Zstandard Compression (PEP 784)**: - High-ratio `zstd` binary storage in the database with Valkey L1 cache. - 70-85% payload token reduction compared to raw HTML. 3. **SSRF Guard**: - Strict IP resolution checks blocking access to private, loopback, link-local, and cloud metadata addresses (`169.254.169.254`, `10.0.0.0/8`, `192.168.0.0/16`, `127.0.0.0/8`). 4. **Virtual File Service (VFS) Ingestion Sink**: - Seamlessly ingests scraped markdown snapshots into Valstorm Knowledge Vaults via `valstorm-client` (`client.files.*` and `client.vfs.*`). - Authenticated with machine-to-machine `ServiceKeyAuth`. 5. **Domain Crawler & RSS Feeds**: - Concurrent link discovery and domain crawling with bounded parallelism. - Real-time RSS 2.0 / Atom feed polling and web content visual diffing. --- ## API Routes - `POST /v1/scrape` — Scrapes a single URL with 3-tier waterfall and optional `ingest_to_vfs=true`. - `POST /v1/scrape/batch` — Scrapes an array of URLs with bounded concurrency. - `POST /v1/crawl` — Crawls internal pages across a domain with optional VFS vault ingestion. - `POST /v1/search` — Performs live web search queries and returns cleaned snippets. - `POST /v1/feed/poll` — Polls RSS/Atom news feeds for recent articles. - `POST /v1/diff` — Compares live web content against archived snapshots to detect changes. - `GET /v1/stats` — Metrics on compression ratios, cache hit rates, and tier utilization. --- ## Running Locally ```bash # Install dependencies with uv cd apps/web-scraper uv sync # Run test suite uv run pytest tests/ # Start FastAPI server uv run uvicorn app.main:app --host 0.0.0.0 --port 8661 ``` --- ## License & Commercial Terms Valstorm Web Intelligence & Scraping Service is distributed under a **Dual License** model: - **Noncommercial Use (Community & Academic)**: Licensed under the **[PolyForm Noncommercial License 1.0.0](LICENSE.md)**. You are free to run, inspect, and evaluate the scraper for personal, hobby, or educational purposes without fees. - **Commercial & Enterprise Use**: Any commercial use—including running internal business operations, powering SaaS backends, managed hosting, or client consulting deliverables—requires a commercial agreement. For commercial licensing, enterprise BYOC terms, or official partner programs: - **Email:** team@valstorm.com - **Website:** [Valstorm Pricing](https://valstorm.com/pricing) - **Enterprise Portal:** [Valstorm Enterprise](https://valstorm.com/enterprise) See [CONTRIBUTING.md](CONTRIBUTING.md) for community guidelines and development policies. ``` Copyright (c) 2026 Valstorm LLC. All rights reserved. ``` ---

Built by Valstorm — The everything engine for business operations.

--- # Valstorm Dedicated Video Worker (`apps/video-worker`) Dedicated, asynchronous microservice handling video transcoding, FFmpeg transformations, speech-to-text generation, AI metadata extraction, and platform synchronization powered by the `valstorm-client` SDK. - **Official Tool Page & Architecture Guide:** [https://www.valstorm.com/free-tools/valstorm-video-worker](https://www.valstorm.com/free-tools/valstorm-video-worker?utm_source=github&utm_medium=readme&utm_campaign=valstorm_video_worker) - **All Valstorm Free & Open-Source Tools:** [https://www.valstorm.com/free-tools](https://www.valstorm.com/free-tools?utm_source=github&utm_medium=readme&utm_campaign=valstorm_video_worker) - **Full-Stack GTM & RevOps Playbook (90-Sec VSL Factory):** [https://www.valstorm.com/playbooks/full-stack-gtm-revops-machine](https://www.valstorm.com/playbooks/full-stack-gtm-revops-machine?utm_source=github&utm_medium=readme&utm_campaign=valstorm_video_worker) ## Features - **Queue Consumer:** Consumes video processing tasks from `valstorm:queue:video`. - **Transcoding Engine:** Multi-preset FFmpeg pipeline (`fast_copy`, `balanced`, `compressed`) with smart container fallback. - **Audio & Captions:** Extracts audio tracks and triggers speech-to-text with Deepgram Nova-3 / Whisper. - **AI Multimodal Metadata:** Generates SEO-ready titles, descriptions, YouTube chapters, and summaries. - **Platform Synchronization:** Interacts with Valstorm Core APIs via `valstorm-client` (`client.records.*` and `client.query.*`) authenticated via `ServiceKeyAuth`. - **Healthchecks:** Integrated HTTP server on port `8080` (`/health`) and Redis worker heartbeat. ## Local Development ```bash cd apps/video-worker uv sync python -m main ``` --- ## License & Commercial Terms Valstorm Dedicated Video Worker is distributed under a **Dual License** model: - **Noncommercial Use (Community & Academic)**: Licensed under the **[PolyForm Noncommercial License 1.0.0](LICENSE.md)**. You are free to run, inspect, and evaluate the worker for personal, hobby, or educational purposes without fees. - **Commercial & Enterprise Use**: Any commercial use—including running internal business operations, powering SaaS backends, managed hosting, or client consulting deliverables—requires a commercial agreement. For commercial licensing, enterprise BYOC terms, or official partner programs: - **Email:** team@valstorm.com - **Website:** [Valstorm Pricing](https://valstorm.com/pricing) - **Enterprise Portal:** [Valstorm Enterprise](https://valstorm.com/enterprise) See [CONTRIBUTING.md](CONTRIBUTING.md) for community guidelines and development policies. ``` Copyright (c) 2026 Valstorm LLC. All rights reserved. ``` ---

Built by Valstorm — The everything engine for business operations.

--- # [Guide: Plugin Ecosystem & Building Custom Plugins (/plugins)] (/plugins-overview) # Open Valstorm Plugins (`/plugins`) This workspace directory houses modular integration plugins for Open Valstorm. ## Controlling Active Plugins (`VALSTORM_PLUGINS`) Both `apps/open-api` (Python) and `apps/open-worker` (Go) read the `VALSTORM_PLUGINS` environment variable on startup: - `VALSTORM_PLUGINS=*` (Default): Activates all discovered plugins. - `VALSTORM_PLUGINS=none` (or `""`): Runs streamlined core only (no optional integration plugins mounted). - `VALSTORM_PLUGINS=slack,gcp,google-workspace,google-marketing`: Activates only the listed plugins. ## Available Plugins & Setup Guides | Plugin Directory | Runtime | `PlatformContext` Mount | Description & Setup Guide | | :--- | :--- | :--- | :--- | | [`valstorm-plugin-gcp`](./valstorm-plugin-gcp/README.md) | Python | `platform.gcp` | Google Cloud Platform Service Account auth, BigQuery data warehouse (`.bigquery`), and Cloud Pub/Sub (`.pubsub`). | | [`valstorm-plugin-google-workspace`](./valstorm-plugin-google-workspace/README.md) | Hybrid (Python + Go) | `platform.google_workspace` | Per-user OAuth 2.0 for Gmail (`.gmail`), Calendar (`.calendar`), Meet (`.meet`), Drive/Docs (`.docs`), and Go history/calendar delta sync. | | [`valstorm-plugin-google-marketing`](./valstorm-plugin-google-marketing/README.md) | Python | `platform.google_marketing` | Unified Google Ads (`.ads`), Search Console (`.gsc`), Google Analytics 4 (`.ga4`), and Google Tag Manager (`.gtm`). | | [`valstorm-plugin-meta`](./valstorm-plugin-meta/README.md) | Python | `platform.meta` | Meta Ads (`.ads`), Business Suite assets/pixels (`.business`), and Facebook/Instagram organic publishing (`.publishing`). | | [`valstorm-plugin-linkedin`](./valstorm-plugin-linkedin/README.md) | Python | `platform.linkedin` | LinkedIn Campaign Manager Ads (`.ads`), B2B audience sizing, Company Page & Personal Profile publishing, PDF Carousels, and post/profile analytics (`.publishing`). | | [`valstorm-plugin-telnyx`](./valstorm-plugin-telnyx/README.md) | Hybrid (Python + Go) | `platform.telnyx` | Telnyx Call Control v2, 1-on-1 SMS & Group MMS, US Local/Toll-Free Porting, Voice AI Assistants, and Go webhook/Deepgram transcription (`telnyx:webhook_event`). | | [`valstorm-plugin-twilio`](./valstorm-plugin-twilio/README.md) | Hybrid (Python + Go) | `platform.twilio` | Twilio Programmable Voice (`.twiml`), Conversations v1, SMS/MMS, Lookup v2, and Go webhook handlers (`twilio:webhook_*`). | | [`valstorm-plugin-sendgrid`](./valstorm-plugin-sendgrid/README.md) | Hybrid (Python + Go) | `platform.sendgrid` | SendGrid `/v3/mail/send`, template merge rendering, Email Activity search, and Go `email:sendgrid` / Event Webhooks (`sgem`). | | [`valstorm-plugin-booking`](./valstorm-plugin-booking/README.md) | Hybrid (Python + Go) | `platform.booking` | Public Calendar Booking & Availability Engine (`/v1/booking/{slug}/availability` & `/reserve`), FreeBusy conflict filtering, and Google Meet provisioning (`bksl`). | | [`valstorm-plugin-deepgram`](./valstorm-plugin-deepgram/README.md) | Python | `platform.deepgram` | Deepgram Nova-3 Speech-to-Text, speaker diarization (`[MM:SS] Speaker N:`), VFS recording transcription, and 10-minute ephemeral token issuance. | | [`valstorm-plugin-ai`](./valstorm-plugin-ai/README.md) | Hybrid (Python + Go) | `platform.ai` | LLM Gateway (`/v1/ai/chat/completions`, Gemini wire pass-through, `/v1/ai/models`), Agent Chat, Cross-Plugin Tool Bridge, Working Memory (`uaim`), and Go sub-10ms `desktop-sync`. | | [`valstorm-plugin-billing`](./valstorm-plugin-billing/README.md) | Python | `platform.billing` | Valstorm Cloud SaaS Pay-As-You-Go Billing, Valkey Hot Ledger (`HTTP 402`), GEAP/DO/Deepgram/Telnyx/Storage pricing, PostgreSQL daily rollups, and self-contained SaaS Stripe fulfillment (`cre`). | | [`valstorm-plugin-stripe`](./valstorm-plugin-stripe/README.md) | Python | `platform.stripe` | Customer CRM Stripe Integration (Customers `account`, Products `product`, Prices `price`, Subscriptions `subscription`, Invoices `invoice`, Billing Meters `usage_meter`, Credit Grants `credit_grant`, and Connect OAuth). | | [`valstorm-plugin-microsoft`](./valstorm-plugin-microsoft/README.md) | Python | `platform.microsoft` (`.outlook`, `.calendar`, `.subscriptions`) | Microsoft 365 / Graph API v1.0 (Outlook Mail `outm`, Outlook Calendar `miev`, Teams Online Meetings, and Graph Webhook Subscriptions). | | [`valstorm-plugin-github`](./valstorm-plugin-github/README.md) | Python | `platform.github` & `platform.ci` | GitHub App OAuth/JWT, Repositories, Pull Requests, Issues, and GitHub Actions CI/CD Live Pipeline Matrix Webhooks (`cicd` -> `cicd_deployment`). | | [`valstorm-plugin-salesforce`](./valstorm-plugin-salesforce/README.md) | Python | `platform.salesforce` & `platform.integrations.salesforce` | Salesforce CRM SOQL, Composite sObject CRUD, `ContentVersion` + `ContentDocumentLink` PDF/file upload, and ValPhone/ValRM for Salesforce bundles (`sal`–`sal5`). | | [`valstorm-plugin-support`](./valstorm-plugin-support/README.md) | Python | `platform.support` | Valstorm AI Documentation Support Specialist (`/v1/support/ask`), Deflection Telemetry (`/v1/support/telemetry`), and Ticket Escalation (`/v1/support/tickets`). | | `valstorm-plugin-slack` | Python | `platform.slack` | Slack OAuth, Events API webhooks, slash commands, Block Kit messaging, and AI Agent tools. | | `valstorm-plugin-firebase` | Hybrid (Python + Go) | `platform.firebase` | Firebase Cloud Messaging (FCM) push notifications (`notification:firebase_push`). | | `valstorm-plugin-inbound` | Hybrid (Python + Go) | `platform.inbound` | High-throughput public form & webhook lead ingestion (`/v1/inbound/submit`, `/v1/inbound/webhook`). | | `valstorm-plugin-twilio` | Hybrid (Python + Go) | `platform.twilio` | Twilio Voice TwiML & Programmable Messaging helpers. | ## Plugin Package Structure A plugin can be **Python-only** (e.g., `valstorm-plugin-gcp`, `valstorm-plugin-google-marketing`, `valstorm-plugin-slack`), **Go-only**, or **Hybrid Python + Go** (e.g., `valstorm-plugin-google-workspace`, `valstorm-plugin-firebase`, `valstorm-plugin-inbound`): ```text /plugins/valstorm-plugin-/ ├── README.md # Step-by-step setup guide, credentials, endpoints & AI tools ├── python/ │ ├── pyproject.toml │ └── src/valstorm_plugin_/ │ ├── __init__.py # Exports `plugin = ValstormPlugin(...)` │ ├── *_context.py # PlatformContext facade (`platform.`) │ ├── *_routes.py # FastAPI routers │ └── *_tools.py # AI Agent tool declarations & executors └── go/ ├── go.mod # module valstorm/plugins/ ├── plugin.go # Calls plugin.Register(&MyPlugin{}) in init() └── *_processor.go # Uses native Go ctx.Platform.ForOrg(orgID) ``` --- # [Plugin: valstorm-plugin-ai | Hybrid (Python + Go) | platform.ai] (/plugins/ai) # `valstorm-plugin-ai` — Hybrid Valstorm AI Gateway, Agent Chat, Tool Bridge & Working Memory Plugin (`FI-473`) Hybrid (**Python + Go**) AI plugin for **Open Valstorm**, mounted at `platform.ai` (`VALSTORM_PLUGINS=ai` or `*`). Provides: 1. **LLM Gateway & Native Gemini Pass-Through (`gateway_service.py`)**: - OpenAI-compatible `POST /v1/ai/chat/completions` & `POST /v1/ai/prompt` (including SSE streaming). - Native Gemini pass-through `POST /v1/ai/gemini/{api_version}/models/{model_method:path}` (preserves thought signatures, function calls, and streaming for `apps/agent-runtime`). - Model Registry (`GET /v1/ai/models` — resolves `gemini-flash-latest` -> `gemini-3.8-flash` and maps `reasoning_effort` to Gemini thinking levels). - Audio transcription (`POST /v1/ai/audio/transcribe`) and meeting transcript synthesis (`POST /v1/ai/recording/summarize`). 2. **Agent Chat, Dynamic Cross-Plugin Tool Bridge & Runtime Proxy (`agent_chat_service.py`)**: - `POST /v1/ai/agent/chat`, `POST /v1/ai/agent/confirm`, `POST /v1/ai/agent/cancel`. - `GET /v1/ai/tools` & `GET /v1/ai/agent/{agent_id}/tools` — dynamically aggregates core `PlatformContext` tools + **every enabled plugin's `ai_tools`** (`plugin_registry.get_ai_tools()`) + tenant custom Python `function` tools. - Cloud & Desktop Agent Runtime health and SSE run proxy (`/v1/ai/agent/runtime/status`, `/v1/ai/agent/runtime/run`, `/v1/ai/agent/runtime/run/{run_id}/events`). 3. **Sub-10ms Go Desktop Sync (`plugins/valstorm-plugin-ai/go/`)**: - `POST /v1/ai/chat/{chat_id}/desktop-sync` backed by Native Go `PlatformContext` (`ai_chat` `aich_`, `ai_message` `aim_`) with atomic Redis `SetNX` deduplication and real-time WebSocket broadcast. 4. **Chief of Staff Working Memory (`working_memory_service.py`)**: - `GET /v1/ai/memory/working-context`, `POST /v1/ai/memory/pin-asset`, `POST /v1/ai/memory/fact`, `DELETE /v1/ai/memory/fact` (`user_ai_memory` `uaim_`). --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) You only need a **Google Gemini API Key** (`GEMINI_API_KEY` from [aistudio.google.com](https://aistudio.google.com/)) or Vertex AI Service Account credentials. Your **Valstorm AI Agent** can save your encrypted AI credentials, verify the model registry (`gemini-3.8-flash`), and confirm cross-plugin tool discovery across all installed plugins. ### Copy-Paste Prompt for Your Valstorm Agent Drop this prompt into Valstorm Chat: > *"Set up `valstorm-plugin-ai` using my Gemini API Key ``. Save the encrypted credentials via `platform.ai.save_credentials(...)`, verify connection via `ai_verify_connection`, and list the discovered cross-plugin AI tools."* --- ## 🛠️ End-to-End DIY Setup Guide (Manual) ```python await platform.ai.save_credentials( gemini_api_key="AIzaSy...", default_model="gemini-flash-latest", default_thinking_level="high", ) # Verify active models and cross-plugin tool discovery status = await platform.ai.verify_connection() tools = platform.ai.get_all_tools() ``` --- ## Running Tests (Python & Go) ```bash # Run Python unit & route tests (including cross-plugin tool discovery) cd apps/open-api .venv/bin/pytest tests/test_plugin_ai.py -v # Run Go sub-10ms desktop-sync race tests cd ../../plugins/valstorm-plugin-ai/go go test -race -v ./... ``` --- # [Plugin: valstorm-plugin-billing | Python | platform.billing] (/plugins/billing) # Valstorm Cloud SaaS Pay-As-You-Go Billing Plugin (`valstorm-plugin-billing`) Opt-in Pay-As-You-Go (PAYG) SaaS billing engine for **Valstorm Cloud** (`platform.billing`). Self-hosted and enterprise-licensed Open Valstorm deployments can disable this plugin (`VALSTORM_PLUGINS` without `billing`) to run with zero metering or billing checks. --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) ### 1. Minimal Human Prerequisite Provide your Valstorm Cloud SaaS Stripe credentials (`STRIPE_API_KEY`, `STRIPE_ENDPOINT_SECRET_KEY`, and your credit/subscription `price_*` IDs). ### 2. Copy-Paste Prompt for Your Valstorm Agent ```text Set up the Valstorm Cloud SaaS Billing plugin (`valstorm-plugin-billing`) using `plugins/valstorm-plugin-billing/README.md`: 1. Save the SaaS Stripe configuration via `billing_configure_saas_settings`. 2. Initialize the PostgreSQL `billing_usage_event` and `billing_daily_rollup` tables and verify the Valkey Hot Ledger via `billing_get_overview`. 3. Verify route tier pricing, AI token pricing, Deepgram +25% markup, Telnyx Option B rate card, and storage rates ($0.05/GB/mo S3 VFS + $1.00/GB/mo structured DB). ``` --- ## 🛠️ End-to-End DIY Setup Guide ### Step 1: Configure Environment Variables Add to `apps/open-api/.env`: ```env BILLING_SYSTEM_ENABLED=true BILLING_METERING_ENABLED=true BILLING_BLOCKING_ENABLED=true BILLING_AUTO_CHARGE_ENABLED=true STRIPE_API_KEY=sk_live_... STRIPE_ENDPOINT_SECRET_KEY=whsec_... STRIPE_CREDIT_PRODUCT_ID=prod_V3qMljJiNcZgRq STRIPE_CREDIT_PRICE_ID=price_1U3igEAE0XXF93AeibV3Dbwc VALSTORM_SUBSCRIPTION_PRICE_ID=price_1UBMBMAE0XXF93AeL5SdeJGb BILLING_S3_RATE_PER_GB=0.05 BILLING_DB_RATE_PER_GB=1.00 ``` ### Step 2: Published Pricing Tiers - **Data Queries & VFS Internal Reads (`TIER_LOW`):** `$0.0002 / call` - **Standard API Mutations (`TIER_STANDARD`):** `$0.0010 / call` - **Telephony Relay (`TIER_TELEPHONY`):** `$0.0030 / call` - **Heavy Compute / Automations / VFS Hybrid Search (`TIER_HEAVY_COMPUTE`):** `$0.0100 / call` - **Cloud Object / VFS Storage (S3 documents, call recordings, voicemails, MMS media):** `$0.05 / GB / month` - **Structured Database Storage:** `$1.00 / GB / month` ### Step 3: Run Tests ```bash uv run --project apps/open-api pytest apps/open-api/tests/test_plugin_billing.py -v ``` --- # [Plugin: valstorm-plugin-booking | Hybrid (Python + Go) | platform.booking] (/plugins/booking) # `valstorm-plugin-booking` — Hybrid Calendar Booking & Availability Engine Plugin (`FI-473`) Hybrid (**Python + Go**) public and authenticated calendar scheduling plugin for **Open Valstorm**, mounted at `platform.booking` (`VALSTORM_PLUGINS=booking` or `*`). Provides sub-second availability slot calculation (`GET /v1/booking/{slug}/availability`) and instant meeting reservation (`POST /v1/booking/{slug}/reserve`) with: - **Live Google Calendar FreeBusy Integration**: Automatically subtracts busy slots when `valstorm-plugin-google-workspace` is connected. - **Instant Google Meet Provisioning**: Generates a Google Meet link and one-click Google/Outlook calendar deep links on reservation. - **Automatic CRM Contact & Attribution Capture**: Upserts the `contact` record and captures full UTM / ad click-ID attribution (`gclid`, `fbclid`, `li_fat_id`, `utm_source`, `utm_medium`, `utm_campaign`). - **Custom Booking Links (`booking_link` / `bksl_`)**: Configure multiple booking slugs (`audit`, `demo`, `discovery`, `support`) with custom durations, business hours, and host timezones. --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) Your **Valstorm AI Agent** can create and configure your public booking slugs (`booking_link` `bksl_` records), connect your host Google Calendar for live FreeBusy conflict detection, and test slot availability and reservation end-to-end. ### 1. Copy-Paste Prompt for Your Valstorm Agent Drop this prompt into Valstorm Chat: > *"Set up `valstorm-plugin-booking` and create a booking link with slug `demo` ('30-Minute Product Demo', duration `30` minutes, host ``, email ``, timezone `America/New_York`). Verify availability via `booking_get_availability`."* ### 2. Agent Execution Runbook (Instructions for the AI Agent) 1. **Create or Update Booking Link (`booking_upsert_link`)**: - Call `await platform.booking.upsert_booking_link(slug=..., title=..., duration_minutes=..., host_name=..., host_email=..., host_timezone=...)`. 2. **Verify Availability & Calendar Integration (`booking_verify_connection`)**: - Call `booking_verify_connection` and `booking_get_availability(slug=...)` to confirm open business-day slots are returned in the visitor's timezone. --- ## 🛠️ End-to-End DIY Setup Guide (Manual) ### Step 1: Create a Booking Link (`booking_link` / `bksl_`) ```python link = await platform.booking.upsert_booking_link( slug="audit", title="15-Minute Architecture & Speed Review", description="Direct walkthrough of your infrastructure and migration plan.", duration_minutes=15, host_name="Jared Simpson", host_email="jared@valstorm.com", host_timezone="America/New_York", ) ``` ### Step 2: Embed or Call the Public Booking Endpoints - **Fetch Open Slots:** `GET /v1/booking/{slug}/availability?tz=America/New_York&days=7&duration=15` - **Reserve a Slot:** `POST /v1/booking/{slug}/reserve` ```json { "start_time": "2026-11-03T14:30:00Z", "end_time": "2026-11-03T14:45:00Z", "timezone": "America/New_York", "name": "Alex Mercer", "email": "alex@acme.io", "phone": "+18605551234", "notes": "Interested in Open Valstorm enterprise deployment", "attribution": { "utm_source": "linkedin", "utm_medium": "cpc", "utm_campaign": "q4_enterprise" } } ``` --- ## Running Tests (Python & Go) ```bash # Run Python unit & route tests cd apps/open-api .venv/bin/pytest tests/test_plugin_booking.py -v # Run Go sub-millisecond availability & reservation race tests cd ../../plugins/valstorm-plugin-booking/go go test -race -v ./... ``` --- # [Plugin: valstorm-plugin-deepgram | Python | platform.deepgram] (/plugins/deepgram) # `valstorm-plugin-deepgram` — Deepgram Nova-3 Speech-to-Text & Diarization Plugin (`FI-473`) Python plugin for **Open Valstorm**, mounted at `platform.deepgram` (`VALSTORM_PLUGINS=deepgram` or `*`). Provides: - **Ephemeral 10-Minute STT Token Minting**: Issues scoped temporary keys (`GET /v1/deepgram/token` & `/v1/ai/speech/deepgram/token`) so browser/desktop clients can open live Deepgram WebSockets without exposing the master API key. - **Speaker-Diarized Nova-3 Transcription**: Transcribes audio uploads, URLs, or Valstorm VFS `file_id` recordings (`POST /v1/deepgram/transcribe` & `/v1/ai/recording/transcribe`) into structured utterances and `[MM:SS] Speaker N:` transcripts. --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) You only need a **Deepgram API Key** from [console.deepgram.com](https://console.deepgram.com/). Your **Valstorm AI Agent** can auto-discover your Deepgram `project_id`, save your encrypted credentials in `platform.credentials`, and verify live Nova-3 transcription and token minting. ### 1. Quick Human Prerequisite (60 Seconds in Deepgram Console) 1. Log in to [console.deepgram.com](https://console.deepgram.com/). 2. Create an API Key with **Member** or **Admin** scope (so it can mint 10-minute ephemeral keys) and copy it. ### 2. Copy-Paste Prompt for Your Valstorm Agent Drop this prompt into Valstorm Chat: > *"Set up `valstorm-plugin-deepgram` using my Deepgram API Key ``. Follow `plugins/valstorm-plugin-deepgram/README.md` to auto-discover my Deepgram `project_id`, save the encrypted credentials via `platform.deepgram.save_credentials(...)`, and run `deepgram_verify_connection`."* ### 3. Agent Execution Runbook (Instructions for the AI Agent) 1. **Save Credentials & Auto-Discover `project_id`**: - Call `await platform.deepgram.save_credentials(api_key=..., model="nova-3", discover_project=True)` (or `POST /v1/deepgram/credentials`). 2. **Verify Live Connection**: - Call `deepgram_verify_connection` and report the discovered `project_id` and active STT model (`nova-3`). --- ## 🛠️ End-to-End DIY Setup Guide (Manual) ```python await platform.deepgram.save_credentials( api_key="dg_xxxxxxxxxxxxxxxxxxxxxxxx", model="nova-3", ) # Mint a 10-minute scoped browser/desktop WebSocket token token_info = await platform.deepgram.mint_ephemeral_token() # Transcribe a recording stored in Valstorm VFS result = await platform.deepgram.transcribe_vfs_file(file_id="file_01HXYZ", diarize=True) ``` --- ## Running Tests ```bash cd apps/open-api .venv/bin/pytest tests/test_plugin_deepgram.py -v ``` --- # [Plugin: valstorm-plugin-firebase | Hybrid (Python + Go) | platform.firebase] (/plugins/firebase) # valstorm-plugin-firebase Open Valstorm Hybrid (Python + Go) plugin mounted at `platform.firebase`. --- # [Plugin: valstorm-plugin-gcp | Python | platform.gcp] (/plugins/gcp) # `valstorm-plugin-gcp` — Google Cloud Platform & BigQuery Plugin (`NF-486`) Foundational Google Cloud Platform (GCP) infrastructure and data warehouse plugin for **Open Valstorm**, mounted at `platform.gcp` (`VALSTORM_PLUGINS=gcp` or `*`). Provides multi-tenant, encrypted Service Account authentication for: - **Google BigQuery (`platform.gcp.bigquery`)**: Dataset/table discovery, schema inspection, parameterized SQL query execution, and streaming row insertion. - **Google Cloud Pub/Sub (`platform.gcp.pubsub`)**: Topic creation, push/pull subscription provisioning (including Gmail push watch topics), and message publishing. - **Extensible GCP Service Hooks**: `.storage`, `.compute`, `.iam`, and `.billing`. --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) Instead of clicking through the Google Cloud Console manually, you can authenticate the `gcloud` CLI once on your machine and let your **Valstorm AI Agent** provision the APIs, Service Account, IAM bindings, Pub/Sub topic, encrypted Valstorm credentials, and live connection verification automatically. ### 1. One-Time Human Prerequisite (60 Seconds) Install the Google Cloud CLI and sign in with your Google Cloud admin account: ```bash # macOS (Homebrew) brew install --cask google-cloud-sdk # Authenticate and select your target GCP project gcloud auth login gcloud config set project YOUR_GCP_PROJECT_ID ``` ### 2. Copy-Paste Prompt for Your Valstorm Agent Drop this prompt into Valstorm Chat (or your local agent): > *"Set up `valstorm-plugin-gcp` for my GCP project `` (default BigQuery dataset: ``). Use the steps in `plugins/valstorm-plugin-gcp/README.md` to enable the APIs via `gcloud`, create the `valstorm-gcp-integration` service account and IAM bindings, save the encrypted credentials into `platform.credentials` under `'gcp'`, delete any temporary key file, and run `gcp_verify_connection`."* ### 3. Agent Execution Runbook (Instructions for the AI Agent) When a user asks you to set up `valstorm-plugin-gcp`, execute this sequence autonomously: 1. **Verify `gcloud` Auth & Project**: - Run `gcloud config get-value project` and `gcloud auth list --filter=status:ACTIVE --format="value(account)"` to confirm an active authenticated session. 2. **Enable Required GCP APIs**: - Run `gcloud services enable bigquery.googleapis.com pubsub.googleapis.com iamcredentials.googleapis.com --project=`. 3. **Idempotently Create Service Account & Bind IAM Roles**: - Create `valstorm-gcp-integration@.iam.gserviceaccount.com` (ignore `ALREADY_EXISTS`). - Bind `roles/bigquery.dataEditor`, `roles/bigquery.jobUser`, and `roles/pubsub.editor`. - If the user also uses Gmail push sync, create topic `gmail-watch-events` and bind `serviceAccount:gmail-api-push@system.gserviceaccount.com` with `roles/pubsub.publisher`. 4. **Provision Key, Save Encrypted Credential, & Shred Temp File**: - Create a temporary key at `/tmp/vst_gcp_sa.json`, read and parse the JSON in Python, call `await platform.credentials.save("gcp", {**sa_json, "default_dataset": dataset})`, and **immediately delete `/tmp/vst_gcp_sa.json`** (`os.remove`). 5. **Verify Live Connection**: - Call `gcp_verify_connection` (or `await platform.gcp.verify_connection()`) and `gcp_bigquery_list_datasets` to confirm end-to-end access. --- ## 🛠️ End-to-End DIY Setup Guide (Manual / CLI) ### Step 1: Enable Required Google Cloud APIs In the [Google Cloud Console](https://console.cloud.google.com/), select or create your GCP project and enable: 1. **BigQuery API** (`bigquery.googleapis.com`) 2. **Cloud Pub/Sub API** (`pubsub.googleapis.com`) 3. **IAM Service Account Credentials API** (`iamcredentials.googleapis.com`) ```bash gcloud services enable \ bigquery.googleapis.com \ pubsub.googleapis.com \ iamcredentials.googleapis.com \ --project=YOUR_GCP_PROJECT_ID ``` ### Step 2: Create a Service Account & Grant IAM Roles Create a dedicated service account for Open Valstorm and grant least-privilege roles for BigQuery and Pub/Sub: ```bash # 1. Create the service account gcloud iam service-accounts create valstorm-gcp-integration \ --display-name="Valstorm GCP Integration" \ --project=YOUR_GCP_PROJECT_ID # 2. Grant BigQuery Data Editor & Job User roles gcloud projects add-iam-policy-binding YOUR_GCP_PROJECT_ID \ --member="serviceAccount:valstorm-gcp-integration@YOUR_GCP_PROJECT_ID.iam.gserviceaccount.com" \ --role="roles/bigquery.dataEditor" gcloud projects add-iam-policy-binding YOUR_GCP_PROJECT_ID \ --member="serviceAccount:valstorm-gcp-integration@YOUR_GCP_PROJECT_ID.iam.gserviceaccount.com" \ --role="roles/bigquery.jobUser" # 3. Grant Cloud Pub/Sub Editor role (for topic/subscription management & publishing) gcloud projects add-iam-policy-binding YOUR_GCP_PROJECT_ID \ --member="serviceAccount:valstorm-gcp-integration@YOUR_GCP_PROJECT_ID.iam.gserviceaccount.com" \ --role="roles/pubsub.editor" ``` ### Step 3: (Optional) Grant Gmail Push Publisher Access to Your Pub/Sub Topic If you are using `valstorm-plugin-gcp` together with `valstorm-plugin-google-workspace` for real-time Gmail push notifications, grant Google's official Gmail push service account (`gmail-api-push@system.gserviceaccount.com`) permission to publish to your Pub/Sub topic: ```bash gcloud pubsub topics add-iam-policy-binding gmail-watch-events \ --member="serviceAccount:gmail-api-push@system.gserviceaccount.com" \ --role="roles/pubsub.publisher" \ --project=YOUR_GCP_PROJECT_ID ``` ### Step 4: Generate & Download the Service Account JSON Key ```bash gcloud iam service-accounts keys create ./valstorm-gcp-sa.json \ --iam-account="valstorm-gcp-integration@YOUR_GCP_PROJECT_ID.iam.gserviceaccount.com" ``` *(Delete the local `./valstorm-gcp-sa.json` file immediately after saving it into Open Valstorm's encrypted credential store below.)* --- ## 2. Configuring Credentials in Open Valstorm Open Valstorm never reads local JSON key files from disk in production. Credentials are encrypted at rest per tenant in PostgreSQL (`auth_credential`) using `AES-256-CBC` / tenant BYOK envelope encryption via `platform.credentials`. ### Option A: Save via Python `PlatformContext` ```python await platform.credentials.save( "gcp", { "type": "service_account", "project_id": "your-gcp-project-id", "private_key_id": "key-id-from-json", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n", "client_email": "valstorm-gcp-integration@your-gcp-project-id.iam.gserviceaccount.com", "client_id": "1234567890", "token_uri": "https://oauth2.googleapis.com/token", "default_dataset": "analytics_warehouse", }, ) ``` ### Option B: Verify Connection via REST API or AI Tool Once saved, verify connectivity and IAM permissions: ```bash curl -X POST http://localhost:8000/v1/gcp/verify \ -H "Authorization: Bearer " ``` Or ask the Valstorm AI Agent to run `gcp_verify_connection` or `gcp_get_setup_guide`. --- ## 3. Activating the Plugin Set `VALSTORM_PLUGINS` in your environment or `.env`: ```env # Enable all plugins (default) VALSTORM_PLUGINS=* # Or enable explicitly alongside related plugins VALSTORM_PLUGINS=gcp,google-workspace,google-marketing ``` --- ## 4. Usage Examples (`platform.gcp`) ```python # 1. List BigQuery datasets & tables datasets = await platform.gcp.bigquery.list_datasets() tables = await platform.gcp.bigquery.list_tables("analytics_warehouse") # 2. Inspect a BigQuery table schema schema = await platform.gcp.bigquery.get_table_schema("analytics_warehouse", "events") # 3. Execute a parameterized SQL query in BigQuery rows = await platform.gcp.bigquery.query( "SELECT event_name, COUNT(*) AS total FROM `analytics_warehouse.events` WHERE org_id = @org_id GROUP BY 1", params={"org_id": platform.org_id}, ) # 4. Stream rows into BigQuery await platform.gcp.bigquery.insert_rows( dataset="analytics_warehouse", table="events", rows=[{"event_name": "lead_created", "org_id": platform.org_id}], ) # 5. Publish a message to Google Cloud Pub/Sub msg_id = await platform.gcp.pubsub.publish( topic="crm-events", data=b'{"event": "deal_closed_won"}', attributes={"org_id": platform.org_id}, ) ``` --- ## 5. REST API Endpoints (`/v1/gcp/*`) | Method | Endpoint | Description | | :--- | :--- | :--- | | `GET` | `/v1/gcp/setup-guide` | Interactive step-by-step GCP setup instructions | | `POST` | `/v1/gcp/verify` | Validates GCP Service Account credentials & BigQuery reachability | | `GET` | `/v1/gcp/bigquery/datasets` | Lists all BigQuery datasets in the project | | `GET` | `/v1/gcp/bigquery/datasets/{dataset}/tables` | Lists tables inside a BigQuery dataset | | `GET` | `/v1/gcp/bigquery/datasets/{dataset}/tables/{table}` | Returns column schema for a BigQuery table | | `POST` | `/v1/gcp/bigquery/query` | Executes a SQL query against BigQuery | | `POST` | `/v1/gcp/bigquery/insert` | Streams JSON rows into a BigQuery table | | `POST` | `/v1/gcp/pubsub/publish` | Publishes a message to a Cloud Pub/Sub topic | --- ## 6. AI Agent Tools (`get_gcp_tools()`) - `gcp_get_setup_guide` - `gcp_verify_connection` - `gcp_bigquery_list_datasets` - `gcp_bigquery_list_tables` - `gcp_bigquery_get_table_schema` - `gcp_bigquery_query` - `gcp_bigquery_insert_rows` - `gcp_pubsub_publish` --- ## 7. Running Tests ```bash cd apps/open-api .venv/bin/pytest tests/test_plugin_gcp.py -v ``` --- # [Plugin: valstorm-plugin-github | Python | platform.github] (/plugins/github) # Open Valstorm GitHub App & CI/CD Pipeline Matrix Plugin (`valstorm-plugin-github`) Connects **GitHub Repositories, Pull Requests, Issues, and GitHub Actions CI/CD Live Pipeline Matrix Notifications** to Open Valstorm (`platform.github` & `platform.ci`). --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) ### 1. Minimal Human Prerequisite Install the GitHub CLI and authenticate: ```bash brew install gh gh auth login ``` ### 2. Copy-Paste Prompt for Your Valstorm Agent ```text Set up the GitHub & CI/CD plugin (`valstorm-plugin-github`) for my workspace using `plugins/valstorm-plugin-github/README.md`: 1. Save my GitHub token or GitHub App installation credentials via `github_save_credentials`. 2. Configure the GitHub Actions CI/CD webhook secret and Slack notification channel via `github_configure_ci_settings`. 3. Verify repository access via `github_list_repositories`. ``` --- ## 🛠️ End-to-End DIY Setup Guide ### Step 1: Configure GitHub App or Fine-Grained Token 1. In **GitHub -> Settings -> Developer settings -> GitHub Apps**, create or open your GitHub App (or create a Fine-Grained Personal Access Token with `Contents`, `Pull requests`, `Issues`, and `Actions` read/write permissions). 2. Set the **Callback URL** to `https:///v1/github/auth/callback`. 3. Set the **Webhook URL** to `https:///v1/ci/webhook` with a **Webhook Secret** (`GITHUB_WEBHOOK_SECRET`), and subscribe to `push`, `workflow_run`, and `deployment_status` events. ### Step 2: Save Credentials in Valstorm ```python await platform.github.save_credentials( access_token="github_pat_...", installation_id=12345678, account_login="valstorm", webhook_secret="your_webhook_secret", git_slack_channel="C0BQH94DN5U", ) ``` ### Step 3: Run Tests ```bash uv run --project apps/open-api pytest apps/open-api/tests/test_plugin_github.py -v ``` --- # [Plugin: valstorm-plugin-google-marketing | Python | platform.google_marketing] (/plugins/google-marketing) # `valstorm-plugin-google-marketing` — Google Marketing & Analytics Plugin (`NF-485`) Unified multi-tenant **Google Ads**, **Google Search Console (GSC)**, **Google Analytics 4 (GA4)**, and **Google Tag Manager (GTM)** plugin for **Open Valstorm**, mounted at `platform.google_marketing` (`VALSTORM_PLUGINS=google-marketing` or `*`). Replaces standalone local CLI scripts and YAML/JSON credential files (`google-ads.yaml`, `gcp_sa_key.json`) with tenant-isolated encrypted credentials (`platform.credentials.get("google_marketing")`), FastAPI routes, and 14 AI Agent tools: - **Google Ads (`platform.google_marketing.ads`)**: Campaign listing, search term waste audits, negative keyword injection, BOFU search campaign creation, and SHA-256 normalized Customer Match audience uploads. - **Google Search Console (`platform.google_marketing.gsc`)**: Verified site listing, sitemap submission, search analytics query/CTR performance, and URL index coverage inspection. - **Google Analytics 4 (`platform.google_marketing.ga4`)**: Daily engagement metrics, conversion event verification, and realtime active-user smoke tests. - **Google Tag Manager (`platform.google_marketing.gtm`)**: Container inspection, tag/trigger/variable listing, and tag creation. --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) Setting up 4 separate Google marketing APIs (Ads, Search Console, GA4, and Tag Manager) manually can be tedious. If you authenticate `gcloud` locally (and optionally provide your Google Ads Developer Token), your **Valstorm AI Agent** can enable all 5 APIs, create/reuse a marketing Service Account or OAuth refresh token, discover your accessible GA4 properties, GSC sites, and GTM containers automatically, save the unified encrypted credential, and run live smoke tests across all 4 services. ### 1. One-Time Human Prerequisite ```bash # 1. Install gcloud CLI (if not already installed) and authenticate brew install --cask google-cloud-sdk gcloud auth login gcloud config set project YOUR_GCP_PROJECT_ID # 2. (Optional) Authenticate Application Default Credentials with Marketing scopes gcloud auth application-default login \ --scopes="https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/adwords,https://www.googleapis.com/auth/webmasters,https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/tagmanager.edit.containers" ``` ### 2. Copy-Paste Prompt for Your Valstorm Agent Drop this prompt into Valstorm Chat: > *"Set up `valstorm-plugin-google-marketing` for my GCP project ``. Follow `plugins/valstorm-plugin-google-marketing/README.md` to enable the Ads, GSC, GA4, and GTM APIs via `gcloud`, discover my GSC site URL, GA4 property ID, and GTM account/container IDs (or use ``), save the unified credential into `platform.credentials.save('google_marketing', ...)`, and run `google_marketing_verify_connection`."* ### 3. Agent Execution Runbook (Instructions for the AI Agent) When a user asks you to set up `valstorm-plugin-google-marketing`, execute this sequence autonomously: 1. **Enable All 5 Google Marketing APIs via `gcloud`**: - Run: `gcloud services enable googleads.googleapis.com searchconsole.googleapis.com analyticsdata.googleapis.com analyticsadmin.googleapis.com tagmanager.googleapis.com --project=` 2. **Collect or Provision Credentials**: - Check if the user has Application Default Credentials (`~/.config/gcloud/application_default_credentials.json`) or a Service Account key, or create a `valstorm-marketing-bot@.iam.gserviceaccount.com` service account. - If using a Service Account, output the `client_email` clearly so the user can add it to GSC (**Settings -> Users and permissions**), GA4 (**Admin -> Property Access Management**), and GTM (**Admin -> User Management**). 3. **Auto-Discover Property & Container IDs**: - Call `gsc_list_sites` (`GET https://www.googleapis.com/webmasters/v3/sites`) to auto-detect `gsc_site_url`. - Call the GA4 Admin API (`GET https://analyticsadmin.googleapis.com/v1beta/accountSummaries`) to auto-detect the numeric `ga4_property_id`. - Call the GTM API (`GET https://tagmanager.googleapis.com/tagmanager/v2/accounts`) to auto-detect `gtm_account_id` and `gtm_container_id`. 4. **Save Unified Encrypted Credential & Verify**: - Save the complete dictionary via `await platform.credentials.save("google_marketing", {...})`. - Run `google_marketing_verify_connection` (and `ga4_verify_conversion_events` / `gsc_list_sites`) to confirm all configured services return `"ok"`. --- ## 🛠️ End-to-End DIY Setup Guide (Manual / CLI) ### Step 1: Enable Required Google Cloud APIs In the [Google Cloud Console](https://console.cloud.google.com/), enable: 1. **Google Ads API** (`googleads.googleapis.com`) 2. **Google Search Console API** (`searchconsole.googleapis.com`) 3. **Google Analytics Data API** (`analyticsdata.googleapis.com`) 4. **Google Analytics Admin API** (`analyticsadmin.googleapis.com`) 5. **Tag Manager API** (`tagmanager.googleapis.com`) ```bash gcloud services enable \ googleads.googleapis.com \ searchconsole.googleapis.com \ analyticsdata.googleapis.com \ analyticsadmin.googleapis.com \ tagmanager.googleapis.com \ --project=YOUR_GCP_PROJECT_ID ``` ### Step 2: Configure Service Permissions Across the 4 Platforms #### A. Google Ads 1. In your **Google Ads Manager Account (MCC)**, go to **Tools and Settings -> Setup -> API Center** and copy your **Developer Token** (`developer_token`). 2. Note your 10-digit **Manager Account ID** (`login_customer_id`, without hyphens) and **Client Account ID** (`customer_id`, without hyphens). 3. Generate an OAuth 2.0 Client (`client_id`, `client_secret`) and `refresh_token` with the `https://www.googleapis.com/auth/adwords` scope (or grant your Service Account access via Domain-Wide Delegation). #### B. Google Search Console (GSC) 1. Open [Google Search Console](https://search.google.com/search-console). 2. Select your property (e.g. `sc-domain:valstorm.com` or `https://www.valstorm.com/`). 3. Go to **Settings -> Users and permissions -> Add user** and add your Service Account `client_email` (or OAuth user) with **Full** or **Owner** permissions. #### C. Google Analytics 4 (GA4) 1. Open [Google Analytics](https://analytics.google.com/) -> **Admin -> Property Details** and copy your numeric **Property ID** (`ga4_property_id`, e.g. `123456789`). 2. Go to **Property Access Management** and add your Service Account `client_email` (or OAuth user) with the **Viewer** or **Analyst** role. #### D. Google Tag Manager (GTM) 1. Open [Google Tag Manager](https://tagmanager.google.com/) -> **Admin**. 2. Copy your numeric **Account ID** (`gtm_account_id`) and **Container ID** (`gtm_container_id`). 3. Under **User Management**, grant your Service Account `client_email` (or OAuth user) **Read** / **Edit** container permissions. --- ## 2. Saving Unified Encrypted Credentials in Open Valstorm Store the unified `google_marketing` credential dictionary in Open Valstorm's encrypted `CredentialContext`: ```python await platform.credentials.save( "google_marketing", { # Authentication (OAuth 2.0 Refresh Token and/or GCP Service Account JSON) "auth_type": "oauth2", # or "service_account" "client_id": "1234567890-abc.apps.googleusercontent.com", "client_secret": "GOCSPX-your-client-secret", "refresh_token": "1//0g-your-oauth-refresh-token", "service_account_json": { "type": "service_account", "project_id": "your-gcp-project-id", "client_email": "marketing-bot@your-gcp-project-id.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n", }, # 1. Google Ads "developer_token": "YOUR_ADS_DEVELOPER_TOKEN", "login_customer_id": "1234567890", "customer_id": "0987654321", # 2. Google Search Console "gsc_site_url": "sc-domain:valstorm.com", # 3. Google Analytics 4 "ga4_property_id": "345678901", # 4. Google Tag Manager "gtm_account_id": "600123456", "gtm_container_id": "12345678", "gtm_workspace_id": "1", }, ) ``` ### Verify Connection & Smoke Test All 4 Services ```bash curl -X POST http://localhost:8000/v1/google-marketing/verify \ -H "Authorization: Bearer " ``` Or ask the Valstorm AI Agent to run `google_marketing_verify_connection` or `google_marketing_get_setup_guide`. --- ## 3. Activating the Plugin Set `VALSTORM_PLUGINS` in your `.env`: ```env VALSTORM_PLUGINS=* # or explicitly: VALSTORM_PLUGINS=google-marketing,gcp ``` --- ## 4. Python Usage Examples (`platform.google_marketing`) ```python # 1. Google Ads: Audit wasted ad spend & add negative keywords campaigns = await platform.google_marketing.ads.list_campaigns() waste = await platform.google_marketing.ads.audit_search_terms(min_cost_micros=5_000_000) await platform.google_marketing.ads.add_negative_keywords( campaign_id="1122334455", keywords=["free", "jobs", "open source tutorial"], ) # 2. Google Ads: Upload Customer Match audience (SHA-256 normalized automatically) await platform.google_marketing.ads.upload_customer_match( user_list_name="High-Intent Enterprise Leads", contacts=[{"email": "ceo@acme.com", "phone": "+15552345678", "first_name": "Jane", "last_name": "Doe"}], ) # 3. Google Search Console: Query organic search CTR & inspect URL indexing gsc_rows = await platform.google_marketing.gsc.query_search_analytics( start_date="2026-10-01", end_date="2026-10-31", dimensions=["query", "page"], ) index_status = await platform.google_marketing.gsc.inspect_url("https://valstorm.com/pricing") # 4. Google Analytics 4: Run realtime smoke test & verify conversion events realtime = await platform.google_marketing.ga4.run_realtime_smoketest() conversions = await platform.google_marketing.ga4.verify_conversion_events( event_names=["generate_lead", "sign_up", "purchase"], ) # 5. Google Tag Manager: Inspect container & list tags container = await platform.google_marketing.gtm.get_container() tags = await platform.google_marketing.gtm.list_tags() ``` --- ## 5. REST API Endpoints (`/v1/google-marketing/*`) | Method | Endpoint | Description | | :--- | :--- | :--- | | `GET` | `/v1/google-marketing/setup-guide` | Interactive setup playbook for Ads, GSC, GA4, and GTM | | `POST` | `/v1/google-marketing/verify` | Verifies credentials and connectivity across Ads, GSC, GA4, and GTM | | `GET` | `/v1/google-marketing/ads/campaigns` | Lists Google Ads campaigns and performance metrics | | `GET` | `/v1/google-marketing/gsc/sites` | Lists verified Google Search Console properties | | `GET` | `/v1/google-marketing/ga4/realtime` | Runs a GA4 Realtime active-users smoke test | | `GET` | `/v1/google-marketing/gtm/container` | Inspects the configured Google Tag Manager container | --- ## 6. AI Agent Tools (`get_google_marketing_tools()`) - `google_marketing_get_setup_guide` - `google_marketing_verify_connection` - `google_ads_list_campaigns` - `google_ads_audit_waste` - `google_ads_add_negative_keywords` - `google_ads_create_search_campaign` - `google_ads_upload_customer_match` - `gsc_list_sites` - `gsc_query_search_analytics` - `gsc_inspect_url` - `gsc_submit_sitemap` - `ga4_get_engagement_metrics` - `ga4_verify_conversion_events` - `gtm_list_tags` --- ## 7. Running Tests ```bash cd apps/open-api .venv/bin/pytest tests/test_plugin_google_marketing.py -v ``` --- # [Plugin: valstorm-plugin-google-workspace | Hybrid (Python + Go) | platform.google_workspace] (/plugins/google-workspace) # `valstorm-plugin-google-workspace` — Hybrid Google Workspace Plugin (`NF-489`) Hybrid (**Python + Go**) Google Workspace productivity integration for **Open Valstorm**, mounted at `platform.google_workspace` (`VALSTORM_PLUGINS=google-workspace` or `*`). Provides 100% per-user OAuth 2.0 authentication (zero Domain-Wide Delegation required), tenant Bring-Your-Own-App (BYO-App) OAuth client support, $O(1)$ Pub/Sub webhook routing, and high-throughput Go worker delta synchronization for: - **Gmail (`platform.google_workspace.gmail` & Go `GmailProcessor`)**: Send emails, create drafts, list/fetch threads, register `users.watch` push notifications, and run high-speed Go MIME parsing & history delta sync (`email:google_pubsub_webhook`). - **Google Calendar (`platform.google_workspace.calendar` & Go `CalendarProcessor`)**: List calendars/events, create events, query `freeBusy` availability (used by `valstorm-plugin-booking`), and run incremental `syncToken` delta sync (`calendar:google_sync`). - **Google Meet (`platform.google_workspace.meet`)**: Auto-provision Google Meet video conference links (`hangoutsMeet`) and calendar invites. - **Google Drive & Docs (`platform.google_workspace.docs`)**: Search Drive files, create Google Docs, and convert Google Docs JSON AST into clean styled HTML/CSS and plaintext. --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) Because Google OAuth 2.0 Web Clients require a Client ID & Secret from the Google Cloud Console, the fastest way to set up `valstorm-plugin-google-workspace` is to grab the downloaded `client_secret_*.json` file (or paste the Client ID & Secret) and let your **Valstorm AI Agent** handle enabling the APIs, encrypting the tenant BYO-App configuration, generating your one-click OAuth link, and wiring up Cloud Pub/Sub push notifications. ### 1. Quick Human Prerequisite 1. Ensure `gcloud` is authenticated (`brew install --cask google-cloud-sdk && gcloud auth login`). 2. In [Google Cloud Console -> Credentials](https://console.cloud.google.com/apis/credentials), click **Create Credentials -> OAuth client ID -> Web application**, add your callback URI (`http://localhost:8000/v1/google-workspace/auth/callback` or `https://api.yourdomain.com/v1/google-workspace/auth/callback`), and download the JSON file (or copy `client_id` and `client_secret`). ### 2. Copy-Paste Prompt for Your Valstorm Agent Drop this prompt into Valstorm Chat: > *"Set up `valstorm-plugin-google-workspace` using my GCP project `` and OAuth Client credentials ``. Follow `plugins/valstorm-plugin-google-workspace/README.md` to enable the Gmail/Calendar/Drive/Docs APIs via `gcloud`, store the encrypted BYO-App config via `platform.credentials.save_env_config('google_workspace', ...)`, provision the `gmail-watch-events` Pub/Sub topic, and give me the OAuth login URL to connect my account."* ### 3. Agent Execution Runbook (Instructions for the AI Agent) When a user asks you to set up `valstorm-plugin-google-workspace`, execute this sequence autonomously: 1. **Enable Workspace & Pub/Sub APIs via `gcloud`**: - Run `gcloud services enable gmail.googleapis.com calendar-json.googleapis.com drive.googleapis.com docs.googleapis.com pubsub.googleapis.com --project=`. 2. **Parse & Save Tenant OAuth Client Credentials**: - Accept either a raw GCP `{"web": {"client_id": "...", "client_secret": "..."}}` JSON file or flat `client_id` / `client_secret` values. - Persist encrypted in `environment_configuration` via `await platform.credentials.save_env_config("google_workspace", {"client_id": ..., "client_secret": ..., "project_id": ...})`. - If a local JSON file path was provided, remind or offer to remove the plaintext download once saved. 3. **Provision Gmail Push Pub/Sub Topic & Permissions**: - Run `gcloud pubsub topics create gmail-watch-events --project=` (ignore if already exists). - Grant Gmail push publisher permission: `gcloud pubsub topics add-iam-policy-binding gmail-watch-events --member="serviceAccount:gmail-api-push@system.gserviceaccount.com" --role="roles/pubsub.publisher" --project=`. 4. **Generate User OAuth Consent URL & Verify**: - Call `await platform.google_workspace.get_authorization_url(...)` (or `GET /v1/google-workspace/auth/login`) and present the clickable link to the user. - Once the user completes consent, call `google_workspace_verify_connection` to confirm live Gmail/Calendar/Drive access and $O(1)$ webhook routing registration. --- ## 🛠️ End-to-End DIY Setup Guide (Manual / CLI) ### Step 1: Enable Google Workspace APIs in GCP Console In the [Google Cloud Console](https://console.cloud.google.com/), enable the four Workspace APIs on your project: 1. **Gmail API** (`gmail.googleapis.com`) 2. **Google Calendar API** (`calendar-json.googleapis.com`) 3. **Google Drive API** (`drive.googleapis.com`) 4. **Google Docs API** (`docs.googleapis.com`) ```bash gcloud services enable \ gmail.googleapis.com \ calendar-json.googleapis.com \ drive.googleapis.com \ docs.googleapis.com \ --project=YOUR_GCP_PROJECT_ID ``` ### Step 2: Configure the OAuth Consent Screen 1. Go to **APIs & Services -> OAuth consent screen**. 2. Configure **User Type** (`Internal` for your Workspace organization, or `External` for multi-tenant production). 3. Add the required OAuth scopes (or use Open Valstorm's progressive consent presets): - `openid`, `https://www.googleapis.com/auth/userinfo.email`, `https://www.googleapis.com/auth/userinfo.profile` - `https://www.googleapis.com/auth/gmail.modify`, `https://www.googleapis.com/auth/gmail.compose`, `https://www.googleapis.com/auth/gmail.labels` - `https://www.googleapis.com/auth/calendar.events` - `https://www.googleapis.com/auth/drive`, `https://www.googleapis.com/auth/documents` ### Step 3: Create an OAuth 2.0 Web Application Client ID 1. Navigate to **APIs & Services -> Credentials -> Create Credentials -> OAuth client ID**. 2. Select **Application type: Web application**. 3. Under **Authorized redirect URIs**, add your Open Valstorm callback URLs: - Local development: - `http://localhost:8000/v1/google-workspace/auth/callback` - `http://localhost:8000/v1/google/auth/callback` - Production: - `https://api.yourdomain.com/v1/google-workspace/auth/callback` - `https://api.yourdomain.com/v1/google/auth/callback` 4. Copy the generated **Client ID** and **Client Secret**. --- ## 2. Configuring OAuth Client Credentials in Open Valstorm You can configure Google OAuth Client credentials either globally via environment variables or per-tenant (BYO-App) in `environment_configuration`. ### Option A: Environment Variables (Platform Default / Local Dev) Add to `apps/open-api/.env` and `apps/open-worker/.env`: ```env VALSTORM_PLUGINS=* GOOGLE_WORKSPACE_CLIENT_ID=1234567890-abcdefg.apps.googleusercontent.com GOOGLE_WORKSPACE_CLIENT_SECRET=GOCSPX-your-client-secret GOOGLE_PROJECT_ID=your-gcp-project-id ``` ### Option B: Tenant BYO-App (`environment_configuration`) Each tenant organization can bring its own Google OAuth Web Client: ```python await platform.credentials.save_env_config( "google_workspace", { "client_id": "1234567890-tenant.apps.googleusercontent.com", "client_secret": "GOCSPX-tenant-secret", "project_id": "tenant-gcp-project", }, ) ``` --- ## 3. Connecting a User Account & Setting Up Push Sync ### Step 1: Initiate OAuth 2.0 Login Call `GET /v1/google-workspace/auth/login` (optionally passing `scope_preset=standard|calendar|email_full|drive|draft_only`): ```bash curl -X GET "http://localhost:8000/v1/google-workspace/auth/login?scope_preset=standard" \ -H "Authorization: Bearer " ``` Open the returned `authorization_url` in a browser and grant consent. When Google redirects to `/v1/google-workspace/auth/callback`: 1. Open Valstorm exchanges the authorization `code` for an `access_token` and `refresh_token`. 2. Tokens are encrypted at rest in `auth_credential` scoped to `user_id`. 3. The user's connected `email` is automatically registered in `valstorm_directory.external_account_routing` (`provider="google_workspace"`) for **$O(1)$ webhook routing**. ### Step 2: Enable Real-Time Gmail Push Notifications (Cloud Pub/Sub) 1. In Google Cloud Pub/Sub, create a push subscription on your topic pointing to: ```text https://api.yourdomain.com/v1/google-workspace/webhooks/pubsub ``` 2. Start watching the user's mailbox: ```bash curl -X POST http://localhost:8000/v1/google-workspace/gmail/watch \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"topic_name": "projects/your-gcp-project-id/topics/gmail-watch-events"}' ``` 3. Whenever a new email arrives, Google Pub/Sub posts to `/v1/google-workspace/webhooks/pubsub`, Open Valstorm resolves the tenant in $O(1)$ time, and dispatches `email:google_pubsub_webhook` to the Go worker (`plugins/valstorm-plugin-google-workspace/go`). --- ## 4. Registered Object Prefixes & Marketplace App Bundle When active, `valstorm-plugin-google-workspace` dynamically injects: - **Object ID Prefixes (`NF-490`)**: - `drfi` -> `drive_file` - `gmms` -> `gmail_message` - `gmth` -> `gmail_thread` - `gcev` -> `google_calendar_event` - **Marketplace App Bundle (`NF-499`)**: - `app_google_workspace` (**"Google Workspace"**) --- ## 5. Python & Go Usage Examples ### Python (`platform.google_workspace`) ```python # 1. Send an email via Gmail & automatically log the `email` record in CRM await platform.google_workspace.gmail.send_email( to="prospect@acme.com", subject="Valstorm Architecture Follow-Up", body_html="

Here is the proposal we discussed.

", ) # 2. Provision a Google Meet link & Calendar invite meeting = await platform.google_workspace.meet.create_meeting( summary="Technical Deep Dive", start_time="2026-11-05T15:00:00Z", end_time="2026-11-05T15:30:00Z", attendees=["prospect@acme.com"], ) print(meeting["meet_link"]) # https://meet.google.com/... # 3. Check Free/Busy availability (used by `valstorm-plugin-booking`) free_busy = await platform.google_workspace.calendar.get_free_busy( time_min="2026-11-05T00:00:00Z", time_max="2026-11-05T23:59:59Z", ) # 4. Read a Google Doc as clean HTML & plaintext doc = await platform.google_workspace.docs.get_document("1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms") print(doc["title"], doc["html"]) ``` --- ## 6. REST API Endpoints (`/v1/google-workspace/*` & `/v1/google/*`) | Method | Endpoint | Description | | :--- | :--- | :--- | | `GET` | `/v1/google-workspace/setup-guide` | Step-by-step OAuth 2.0 & Pub/Sub setup guide | | `GET` | `/v1/google-workspace/auth/status` | Check user's OAuth connection status & granted scopes | | `GET` | `/v1/google-workspace/auth/login` | Generate Google OAuth 2.0 authorization URL | | `GET` | `/v1/google-workspace/auth/callback` | OAuth 2.0 callback — saves encrypted tokens & registers $O(1)$ routing | | `POST` | `/v1/google-workspace/verify` | Verify live OAuth token against Gmail API | | `POST` | `/v1/google-workspace/gmail/send` | Send email via Gmail API & persist CRM `email` record | | `POST` | `/v1/google-workspace/gmail/watch` | Register Gmail push notification watch on a Pub/Sub topic | | `POST` | `/v1/google-workspace/gmail/sync` | Enqueue Go worker `email:google_pubsub_webhook` delta sync | | `POST` | `/v1/google-workspace/webhooks/pubsub` | Unauthenticated Google Cloud Pub/Sub push webhook | | `GET` | `/v1/google-workspace/calendar/events` | List events from Google Calendar | | `POST` | `/v1/google-workspace/calendar/events` | Create Google Calendar event (optional Google Meet link) | | `POST` | `/v1/google-workspace/calendar/free-busy` | Query calendar free/busy intervals | | `POST` | `/v1/google-workspace/meet/create` | Create a Google Meet conference & calendar invite | | `GET` | `/v1/google-workspace/drive/files` | Search/list files in Google Drive | | `GET` | `/v1/google-workspace/docs/{document_id}` | Fetch Google Doc & render clean HTML and text | --- ## 7. Running Tests (Python & Go) ```bash # Run Python unit & webhook integration tests cd apps/open-api .venv/bin/pytest tests/test_plugin_google_workspace.py -v # Run Go worker processor & parser race tests cd ../../plugins/valstorm-plugin-google-workspace/go go test -race -v ./... ``` --- # [Plugin: valstorm-plugin-inbound | Hybrid (Python + Go) | platform.inbound] (/plugins/inbound) # valstorm-plugin-inbound Open Valstorm Hybrid (Python + Go) plugin mounted at `platform.inbound`. --- # [Plugin: valstorm-plugin-linkedin | Python | platform.linkedin] (/plugins/linkedin) # `valstorm-plugin-linkedin` — LinkedIn Ads, Company & Personal Publishing Plugin (`NF-488` + `NF-440`) Unified multi-tenant **LinkedIn Campaign Manager (Ads)**, **Company Page Publishing**, **Personal Profile Publishing & Analytics**, and **PDF Carousel Upload** plugin for **Open Valstorm**, mounted at `platform.linkedin` (`VALSTORM_PLUGINS=linkedin` or `*`). Combines **NF-488** (*LinkedIn Ads & Publishing*) and **NF-440** (*LinkedIn Personal Posting & Analytics Integration*) into one first-class plugin: - **LinkedIn Ads (`platform.linkedin.ads`)**: Campaign Manager ad account discovery, campaign groups, campaigns, B2B firmographic audience size estimation (`/rest/audienceCounts`), Ad Library competitor intelligence (`/rest/adLibrary`), and campaign analytics (`/rest/adAnalytics`). - **Company & Personal Publishing (`platform.linkedin.publishing`)**: - Publish organic posts to either a **Company Page** (`urn:li:organization:...`) or a **Personal Profile** (`urn:li:person:...`). - Upload multi-page **PDF Carousels / Documents** (`/rest/documents?action=initializeUpload` + binary `PUT` + `/rest/posts`) directly from **Valstorm VFS** (`file_id`) or raw PDF bytes. - Query **Post-Level Engagement Analytics** (`impressions`, `uniqueImpressions`, `clicks`, `reactions`, `comments`, `reposts`), **Personal/Org Profile Metrics** (`followers`, `profile_views`, `search_appearances`), and **1st-Degree Network Connections**. --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) Because LinkedIn provides a built-in OAuth 2.0 Token Generator in the Developer Portal, you can grab a single access token (or Client ID + Secret) in 60 seconds and let your **Valstorm AI Agent** automatically discover your `person_urn` (`/v2/userinfo`), accessible Campaign Manager `ad_account_id` (`/rest/adAccounts`), and `organization_urn`, save the encrypted credentials, register $O(1)$ webhook routing, and verify live API connectivity. ### 1. Quick Human Prerequisite (60 Seconds in LinkedIn Developer Portal) 1. Open [linkedin.com/developers/apps](https://www.linkedin.com/developers/apps), select your app, and under **Products**, request access to **Advertising API**, **Share on LinkedIn**, **Sign In with LinkedIn using OpenID Connect**, and (optional) **LinkedIn Ad Library**. 2. Open the [LinkedIn OAuth 2.0 Token Generator](https://www.linkedin.com/developers/tools/oauth), select your app, check `openid`, `profile`, `email`, `w_member_social`, `r_ads`, `rw_ads`, `r_ads_reporting`, and (if using Company Page posting) `w_organization_social` / `r_organization_social`, and generate your **Access Token** (plus copy your **Client ID** and **Client Secret** from the **Auth** tab). ### 2. Copy-Paste Prompt for Your Valstorm Agent Drop this prompt into Valstorm Chat: > *"Set up `valstorm-plugin-linkedin` using my LinkedIn Access Token `` (Client ID: ``, Client Secret: ``, optional Company Organization ID: ``). Follow `plugins/valstorm-plugin-linkedin/README.md` to query `/v2/userinfo` and `/rest/adAccounts` to auto-discover my `person_urn` and `ad_account_id`, save the encrypted credentials via `platform.credentials.save('linkedin', ...)`, and run `linkedin_verify_connection`."* ### 3. Agent Execution Runbook (Instructions for the AI Agent) When a user asks you to set up `valstorm-plugin-linkedin`, execute this sequence autonomously: 1. **Save Initial Token & Auto-Discover Identity + Ad Accounts**: - Save the initial token via `await platform.credentials.save("linkedin", {"access_token": token, "client_id": ..., "client_secret": ...})`. - Call `await platform.linkedin.verify_connection()` (`linkedin_verify_connection`), which queries: - `GET https://api.linkedin.com/v2/userinfo` -> extracts `sub` and formats `person_urn = f"urn:li:person:{sub}"`. - `GET https://api.linkedin.com/rest/adAccounts?q=search` -> discovers accessible Campaign Manager `ad_account_id`s. 2. **Persist Complete Encrypted Credential & $O(1)$ Webhook Routing**: - Update `await platform.credentials.save("linkedin", {..., "person_urn": ..., "ad_account_id": ..., "organization_urn": ...})`. - Register `person_urn`, `organization_urn`, and `ad_account_id` in `external_account_routing` (`provider="linkedin"`). 3. **Confirm Setup**: - Report the authenticated member name/email, `person_urn`, discovered Ad Account(s), and `organization_urn` back to the user. --- ## 🛠️ End-to-End DIY Setup Guide (Manual) ### Step 1: Enable Products on Your LinkedIn Developer App 1. Go to [linkedin.com/developers/apps](https://www.linkedin.com/developers/apps) and open or create your app. 2. In the **Products** tab, request access to: - **Sign In with LinkedIn using OpenID Connect** (`openid`, `profile`, `email`) - **Share on LinkedIn** (`w_member_social` — for personal profile posting) - **Advertising API** (`r_ads`, `rw_ads`, `r_ads_reporting` — for Campaign Manager & B2B audience sizing) - **Community Management API** (`w_organization_social`, `r_organization_social`, `r_organization_admin` — for Company Page posting & analytics) - **LinkedIn Ad Library** (for competitor ad intelligence) ### Step 2: Configure Redirect URLs & Copy Client Credentials 1. Open the **Auth** tab of your LinkedIn Developer App. 2. Copy your **Client ID** and **Client Secret**. 3. Under **OAuth 2.0 settings -> Authorized redirect URLs for your app**, add: - Local: `http://localhost:8000/v1/linkedin/auth/callback` - Production: `https://api.yourdomain.com/v1/linkedin/auth/callback` ### Step 3: Save Encrypted Credentials in Open Valstorm ```python await platform.credentials.save( "linkedin", { "client_id": "YOUR_LINKEDIN_CLIENT_ID", "client_secret": "YOUR_LINKEDIN_CLIENT_SECRET", "access_token": "YOUR_LINKEDIN_OAUTH_ACCESS_TOKEN", "refresh_token": "YOUR_LINKEDIN_REFRESH_TOKEN", "ad_account_id": "509123456", "organization_urn": "urn:li:organization:98765432", "person_urn": "urn:li:person:AbCdEf123", "api_version": "202502", }, ) ``` --- ## Registered Object Prefixes & Marketplace App Bundle - **Object ID Prefix (`NF-490`)**: - `lnpo` -> `linkedin_post` - **Marketplace App Bundle (`NF-499`)**: - `app_linkedin` (**"LinkedIn Ads & Publishing"**) --- ## Python Usage Examples (`platform.linkedin`) ```python # 1. Verify connection, member identity (`person_urn`), and accessible Ad Accounts status = await platform.linkedin.verify_connection() # 2. Publish a Personal Profile or Company Page post (`NF-440` & `NF-488`) personal_post = await platform.linkedin.publishing.create_post( commentary="Excited to share our latest Open Valstorm plugin architecture benchmarks!", author_type="person", # or "organization" ) # 3. Upload & publish a multi-page PDF Carousel directly from Valstorm VFS (`file_id`) carousel_post = await platform.linkedin.publishing.upload_document_carousel( title="2026 Enterprise RevOps Benchmark Report", commentary="Swipe through our 8-slide breakdown of B2B response times 👇", file_id="file_987654321", author_type="organization", ) # 4. Fetch Post Engagement Analytics & Personal Profile Metrics (`NF-440`) post_stats = await platform.linkedin.publishing.get_post_analytics(personal_post["post_urn"]) profile_stats = await platform.linkedin.publishing.get_profile_metrics() # 5. Forecast B2B Audience Size & Create a PAUSED LinkedIn Ad Campaign (`NF-488`) reach = await platform.linkedin.ads.get_audience_size_estimate( targeting_criteria={ "include": { "and": [ {"or": {"urn:li:adTargetingFacet:locations": ["urn:li:geo:103644278"]}}, {"or": {"urn:li:adTargetingFacet:seniorities": ["urn:li:seniority:8", "urn:li:seniority:9"]}}, ] } } ) ``` --- ## REST API Endpoints (`/v1/linkedin/*`) | Method | Endpoint | Description | | :--- | :--- | :--- | | `GET` | `/v1/linkedin/setup-guide` | Step-by-step LinkedIn Developer & OAuth setup guide | | `GET` | `/v1/linkedin/auth/login` | Generate LinkedIn OAuth 2.0 authorization URL | | `GET` | `/v1/linkedin/auth/callback` | Exchange OAuth code for tokens & auto-discover `person_urn` | | `POST` | `/v1/linkedin/verify` | Verify token against `/v2/userinfo` and `/rest/adAccounts` | | `GET` | `/v1/linkedin/ads/accounts` | List accessible LinkedIn Campaign Manager ad accounts | | `GET` | `/v1/linkedin/ads/campaigns` | List LinkedIn ad campaigns | | `POST` | `/v1/linkedin/ads/campaigns` | Create a LinkedIn ad campaign (defaults to `PAUSED`) | | `POST` | `/v1/linkedin/ads/audience-estimate` | Estimate B2B targetable audience reach | | `GET` | `/v1/linkedin/ads/analytics` | Query campaign spend, impressions, clicks, and leads | | `GET` | `/v1/linkedin/ads/library` | Search competitor ads in the LinkedIn Ad Library | | `POST` | `/v1/linkedin/publishing/post` | Publish a Company Page or Personal Profile post (`lnpo_`) | | `POST` | `/v1/linkedin/publishing/carousel` | Upload a PDF Carousel from VFS (`file_id`) & publish post | | `GET` | `/v1/linkedin/publishing/analytics` | Fetch post-level engagement & profile performance metrics | | `GET` | `/v1/linkedin/network/connections` | List/track 1st-degree network connections & follower summary | | `POST` | `/v1/linkedin/webhooks` | Unauthenticated LinkedIn webhook receiver ($O(1)$ routing) | --- ## Running Tests ```bash cd apps/open-api .venv/bin/pytest tests/test_plugin_linkedin.py -v ``` --- # [Plugin: valstorm-plugin-meta | Python | platform.meta] (/plugins/meta) # `valstorm-plugin-meta` — Meta Ads, Business Suite & Organic Publishing Plugin (`NF-487`) Unified multi-tenant **Meta Ads**, **Meta Business Suite (Assets & Pixels)**, and **Meta Organic Publishing (Facebook Pages & Instagram Reels/Carousels)** plugin for **Open Valstorm**, mounted at `platform.meta` (`VALSTORM_PLUGINS=meta` or `*`). Replaces local configuration files (`meta_ads_config.json`) and standalone scripts (`provision_meta_ads.py`, `provision_us_micro_demo_video_ads.py`) with tenant-isolated encrypted credentials (`platform.credentials.get("meta")`), direct **Valstorm VFS** creative uploads (`platform.files`), $O(1)$ webhook routing, FastAPI routes, and 11 AI Agent tools: - **Meta Ads (`platform.meta.ads`)**: Campaign, AdSet, Ad Creative, and Ad CRUD, SHA-256 normalized Value-Based Custom Audience & Lookalike uploads, VFS image (`/adimages`) & video (`/advideos`) uploads, audience interest sizing, Ad Library competitor search, and daily ROAS/spend insights. - **Meta Business Suite (`platform.meta.business`)**: Discover assigned Ad Accounts (`act_...`), Facebook Pages, Instagram Business Accounts, and Datasets/Pixels. - **Meta Organic Publishing (`platform.meta.publishing`)**: Publish organic Facebook Page feed/photo posts (`fbpo_...`) and Instagram single images, Reels, or Carousels (`ins_...`) directly from Valstorm VFS `file_id`s, and query post engagement metrics. --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) Because Meta does not offer a CLI to create a System User token, the fastest way to set up `valstorm-plugin-meta` is to generate one permanent System User token in Meta Business Settings and let your **Valstorm AI Agent** automatically discover your Ad Account ID (`act_...`), Facebook Page ID, Instagram Business Account ID, and Pixel/Dataset ID via the Meta Graph API, encrypt and store the full configuration, register $O(1)$ webhook routing, and run live connection verification. ### 1. Quick Human Prerequisite (2 Minutes in Meta Business Settings) 1. Go to [Meta Business Settings -> System Users](https://business.facebook.com/settings/system-users). 2. Create an **Admin System User** named `valstorm-marketing-agent` and click **Assign Assets** to grant Full Control over your **Ad Account**, **Facebook Page**, **Instagram Account**, and **Dataset/Pixel**. 3. Click **Generate New Token**, select your Meta Developer App, set Token Expiration to **Never**, check `ads_read`, `ads_management`, `read_insights`, `business_management`, `pages_read_engagement`, `pages_manage_ads`, `pages_manage_posts`, and `instagram_content_publish`, and copy the token. ### 2. Copy-Paste Prompt for Your Valstorm Agent Drop this prompt into Valstorm Chat: > *"Set up `valstorm-plugin-meta` using my permanent Meta System User token `` (optional App ID: ``, App Secret: ``). Follow `plugins/valstorm-plugin-meta/README.md` to query the Meta Graph API and auto-discover my Ad Account ID (`act_...`), Facebook Page ID, Instagram Business Account ID, and Pixel ID, save the encrypted credentials via `platform.credentials.save('meta', ...)`, and run `meta_verify_connection`."* ### 3. Agent Execution Runbook (Instructions for the AI Agent) When a user asks you to set up `valstorm-plugin-meta` with a System User token, execute this sequence autonomously: 1. **Save Initial Token & Auto-Discover Assigned Business Assets**: - Temporarily initialize `MetaContext` (or call `await platform.credentials.save("meta", {"access_token": token, ...})`). - Call `await platform.meta.business.get_assigned_assets()` (`meta_list_business_assets`), which queries: - `/me/adaccounts?fields=id,name,account_status,currency` -> selects primary active `act_...` Ad Account ID. - `/me/accounts?fields=id,name,instagram_business_account{id,username}` -> selects primary `page_id` and linked `instagram_account_id`. - `/{ad_account_id}/adspixels?fields=id,name` -> selects primary `pixel_id`. 2. **Persist Complete Encrypted Credential & $O(1)$ Webhook Routing**: - Call `await platform.credentials.save("meta", { "access_token": ..., "ad_account_id": ..., "page_id": ..., "instagram_account_id": ..., "pixel_id": ... })`. - Call `await platform.meta.register_routing()` to register `page_id`, `instagram_account_id`, and `ad_account_id` in `external_account_routing` (`provider="meta"`). 3. **Run Live Verification Smoke Test**: - Call `meta_verify_connection` (or `await platform.meta.verify_connection()`) and report the connected System User, Ad Account status, Page, Instagram handle, and Pixel back to the user. --- ## 🛠️ End-to-End DIY Setup Guide (Manual) ### Step 1: Add the Marketing API to Your Meta Developer App 1. Go to [developers.facebook.com/apps](https://developers.facebook.com/apps). 2. Open your app (or click **Create App -> Other -> Business**). 3. In the App Dashboard sidebar, click **Add Product** and click **Set Up** on **Marketing API** (and **Webhooks** if using Lead Ads / Instagram webhooks). 4. Under **App Settings -> Basic**, copy your **App ID** and **App Secret**. ### Step 2: Create a Permanent Admin System User *Standard Meta user tokens expire after 60 days. A System User token never expires.* 1. Open [business.facebook.com/settings](https://business.facebook.com/settings) -> **Users -> System Users**. 2. Click **Add**: - **System User Name**: `valstorm-marketing-agent` - **System User Role**: **Admin System User** 3. Click **Create System User**. ### Step 3: Assign Assets to the System User 1. Select `valstorm-marketing-agent` and click **Assign Assets**. 2. Grant **Full Control** on: - **Ad Accounts**: Select your target Ad Account -> Toggle ON **Manage Ad Account**. - **Pages**: Select your Facebook Page -> Toggle ON **Full Control**. - **Instagram Accounts**: Select your connected Instagram Business profile -> Toggle ON **Content & Insights**. - **Datasets / Pixels**: Select your tracking Pixel -> Toggle ON **Full Control**. 3. Click **Save Changes**. ### Step 4: Generate the Permanent Access Token 1. Click **Generate New Token** on the System User page. 2. Select your Developer App and set **Token Expiration** to **Never**. 3. Grant the required scopes: - `ads_read`, `ads_management`, `read_insights`, `business_management` - `pages_read_engagement`, `pages_manage_ads`, `pages_manage_posts` - `instagram_basic`, `instagram_content_publish`, `instagram_manage_insights` 4. Copy the generated token string. ### Step 5: Save Encrypted Credentials in Open Valstorm ```python await platform.credentials.save( "meta", { "app_id": "YOUR_META_APP_ID", "app_secret": "YOUR_META_APP_SECRET", "access_token": "YOUR_PERMANENT_SYSTEM_USER_TOKEN", "ad_account_id": "act_1234567890", "page_id": "107438288683733", "instagram_account_id": "17841405620088372", "pixel_id": "1365568045373394", "webhook_verify_token": "your-webhook-verify-token", }, ) ``` --- ## Registered Object Prefixes & Marketplace App Bundle - **Object ID Prefixes (`NF-490`)**: - `ins` -> `instagram_post` - `insw` -> `instagram_webhook` - `fbpo` -> `facebook_post` - **Marketplace App Bundle (`NF-499`)**: - `app_meta_business` (**"Meta Business & Ads"**) --- ## Python Usage Examples (`platform.meta`) ```python # 1. Inspect all assigned Business Suite assets (Ad Accounts, Pages, IG, Pixels) assets = await platform.meta.business.get_assigned_assets() # 2. Upload a Value-Weighted Custom Audience (SHA-256 hashed automatically) + 1% US Lookalike audience = await platform.meta.ads.upload_custom_audience( name="VS - Enterprise Prospects", contacts=[ {"email": "founder@acme.com", "phone": "+15552345678", "first_name": "Alex", "last_name": "Rivera", "state": "CT"} ], create_lookalike_us_1pct=True, ) # 3. Create a PAUSED Meta Ad Campaign & pull insights campaign = await platform.meta.ads.create_campaign( name="[BOFU] US Phone System Conversion Engine", objective="OUTCOME_LEADS", status="PAUSED", daily_budget_cents=4000, ) insights = await platform.meta.ads.get_insights(level="campaign", date_preset="last_30d") # 4. Publish an organic Facebook Page post & Instagram Reel from Valstorm VFS fb_post = await platform.meta.publishing.publish_facebook_post( message="See how Open Valstorm unifies CRM, telephony, and AI in one platform.", link="https://www.valstorm.com", ) ig_reel = await platform.meta.publishing.publish_instagram_media( caption="0.78s mobile load speed vs 26.1s industry bounce wall ⚡", media_type="REELS", video_url="https://cdn.valstorm.com/demos/speed-race.mp4", ) ``` --- ## REST API Endpoints (`/v1/meta/*`) | Method | Endpoint | Description | | :--- | :--- | :--- | | `GET` | `/v1/meta/setup-guide` | Interactive System User & Business Suite setup guide | | `POST` | `/v1/meta/verify` | Verifies System User token, scopes, and Ad Account status | | `GET` | `/v1/meta/business/assets` | Lists assigned Ad Accounts, Pages, Instagram Accounts & Pixels | | `GET` | `/v1/meta/ads/campaigns` | Lists Meta Ad campaigns | | `POST` | `/v1/meta/ads/campaigns` | Creates a Meta Ad campaign (defaults to `PAUSED` safety guardrail) | | `POST` | `/v1/meta/ads/audiences/custom` | Uploads SHA-256 normalized Custom Audience (+ optional 1% Lookalike) | | `GET` | `/v1/meta/ads/insights` | Queries campaign/adset/ad performance insights | | `GET` | `/v1/meta/ads/interests` | Searches Meta ad interest targeting & audience sizes | | `POST` | `/v1/meta/publishing/facebook` | Publishes an organic Facebook Page post & logs `fbpo_` record | | `POST` | `/v1/meta/publishing/instagram` | Publishes an Instagram Image/Reel/Carousel & logs `ins_` record | | `GET/POST` | `/v1/meta/webhooks` | Meta Graph API challenge verification & $O(1)$ LeadGen/IG webhook receiver | --- ## Running Tests ```bash cd apps/open-api .venv/bin/pytest tests/test_plugin_meta.py -v ``` --- # [Plugin: valstorm-plugin-microsoft | Python | platform.microsoft] (/plugins/microsoft) # Open Valstorm Microsoft 365 / Graph API Plugin (`valstorm-plugin-microsoft`) Connects **Microsoft 365 (Outlook Mail, Outlook Calendar, and Microsoft Teams Meetings)** to Open Valstorm (`platform.microsoft` / `platform.m365`) via Microsoft Entra ID OAuth 2.0 and Microsoft Graph REST API v1.0. --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) ### 1. Minimal Human Prerequisite Install the Azure CLI and sign in with an administrator account: ```bash brew install azure-cli az login ``` ### 2. Copy-Paste Prompt for Your Valstorm Agent ```text Set up the Microsoft 365 plugin (`valstorm-plugin-microsoft`) for my workspace using `plugins/valstorm-plugin-microsoft/README.md`: 1. Use `az ad app create` to register a Microsoft Entra ID Web App with redirect URI `/v1/microsoft/auth/callback` and delegated Microsoft Graph scopes (`User.Read`, `Mail.ReadWrite`, `Mail.Send`, `Calendars.ReadWrite`, `OnlineMeetings.ReadWrite`, `offline_access`). 2. Generate a client secret via `az ad app credential reset` and save the credentials into Valstorm via `microsoft_save_credentials`. 3. Verify the OAuth login URL and Graph API connectivity via `microsoft_verify_connection`. ``` --- ## 🛠️ End-to-End DIY Setup Guide ### Step 1: Register an App in Microsoft Entra ID (Azure Portal) 1. Go to **Azure Portal -> Microsoft Entra ID -> App registrations -> New registration**. 2. Set **Supported account types** to *Accounts in any organizational directory (Multi-tenant) and personal Microsoft accounts*. 3. Add **Web Redirect URI**: `https:///v1/microsoft/auth/callback`. 4. Under **Certificates & secrets**, create a **New client secret** and copy its `Value`. 5. Under **API permissions -> Add a permission -> Microsoft Graph -> Delegated permissions**, add: - `User.Read`, `Mail.Read`, `Mail.ReadWrite`, `Mail.Send`, `Calendars.Read`, `Calendars.ReadWrite`, `OnlineMeetings.ReadWrite`, `offline_access` ### Step 2: Save Credentials in Valstorm ```python await platform.microsoft.save_credentials( client_id="00000000-0000-0000-0000-000000000000", client_secret="your-entra-client-secret", tenant_id="common", ) ``` ### Step 3: Run Tests ```bash uv run --project apps/open-api pytest apps/open-api/tests/test_plugin_microsoft.py -v ``` --- # [Plugin: valstorm-plugin-salesforce | Python | platform.salesforce] (/plugins/salesforce) # Open Valstorm Salesforce CRM & OpenCTI Plugin (`valstorm-plugin-salesforce`) Connects **Salesforce CRM (SOQL, Composite sObject CRUD, Bulk API 2.0, `ContentVersion` File Uploads, and ValPhone/ValRM for Salesforce OpenCTI)** to Open Valstorm (`platform.salesforce` & `platform.integrations.salesforce`). --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) ### 1. Minimal Human Prerequisite Install the Salesforce CLI and authenticate to your org: ```bash brew install sf sf org login web --alias my-sfdc ``` ### 2. Copy-Paste Prompt for Your Valstorm Agent ```text Set up the Salesforce plugin (`valstorm-plugin-salesforce`) for my workspace using `plugins/valstorm-plugin-salesforce/README.md`: 1. Retrieve the active `instanceUrl` and `accessToken` via `sf org display --target-org my-sfdc --json`. 2. Save the credentials via `salesforce_save_credentials`. 3. Verify SOQL connectivity via `salesforce_verify_connection`. ``` --- ## 🛠️ End-to-End DIY Setup Guide ### Step 1: Create a Salesforce Connected App 1. In **Salesforce Setup -> App Manager -> New Connected App**, enable **OAuth Settings**. 2. Set the **Callback URL** to `https:///v1/salesforce/auth/callback`. 3. Add OAuth Scopes: `Manage user data via APIs (api)` and `Perform requests at any time (refresh_token, offline_access)`. 4. Copy the **Consumer Key** (`client_id`) and **Consumer Secret** (`client_secret`). ### Step 2: Save Credentials in Valstorm ```python await platform.salesforce.save_credentials( instance_url="https://yourdomain.my.salesforce.com", client_id="YOUR_CONNECTED_APP_KEY", client_secret="YOUR_CONNECTED_APP_SECRET", access_token="00D...", refresh_token="5Aep...", ) ``` ### Step 3: Run Tests ```bash uv run --project apps/open-api pytest apps/open-api/tests/test_plugin_salesforce_and_pdf.py -v ``` --- # [Plugin: valstorm-plugin-sendgrid | Hybrid (Python + Go) | platform.sendgrid] (/plugins/sendgrid) # `valstorm-plugin-sendgrid` — Hybrid SendGrid Transactional Email & Event Webhook Plugin (`FI-473`) Hybrid (**Python + Go**) SendGrid integration for **Open Valstorm**, mounted at `platform.sendgrid` (`VALSTORM_PLUGINS=sendgrid` or `*`). Provides transactional and bulk email delivery, `{{variable}}` template rendering, VFS file attachments, Email Activity Log search, and high-throughput Go worker processing for `/v3/mail/send` (`email:sendgrid`) and SendGrid Event Webhooks (`sendgrid:webhook_event` -> `sendgrid_email` `sgem_`). --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) You only need your **SendGrid API Key** (`SG....`) and verified sender email address. Your **Valstorm AI Agent** can validate your API key against SendGrid, save the encrypted credentials in `platform.credentials`, configure your SendGrid Event Webhook URL (`/v1/email-services/sendgrid/webhook/`) for open/click/delivery tracking, and verify live connectivity. ### 1. Quick Human Prerequisite (60 Seconds in SendGrid) 1. Log in to [app.sendgrid.com](https://app.sendgrid.com/). 2. Go to **Settings -> API Keys -> Create API Key** (grant *Mail Send* and *Email Activity* access) and copy the `SG....` key. 3. Ensure your sender domain or Single Sender Address is verified under **Settings -> Sender Authentication**. ### 2. Copy-Paste Prompt for Your Valstorm Agent Drop this prompt into Valstorm Chat: > *"Set up `valstorm-plugin-sendgrid` using my SendGrid API Key `` and default sender `` (Sender Name: ``). Follow `plugins/valstorm-plugin-sendgrid/README.md` to save the encrypted credentials via `platform.sendgrid.save_credentials(...)`, configure the SendGrid Event Webhook, and run `sendgrid_verify_connection`."* ### 3. Agent Execution Runbook (Instructions for the AI Agent) When a user asks you to set up `valstorm-plugin-sendgrid`, execute this sequence autonomously: 1. **Validate & Save Encrypted Credentials**: - Call `await platform.sendgrid.save_credentials(api_key=..., from_email=..., from_name=..., validate_live=True)` (or `POST /v1/email-services/sendgrid/credentials`). 2. **Configure Event Webhook (`processed`, `delivered`, `open`, `click`, `bounce`, `dropped`)**: - Call `await platform.sendgrid.configure_event_webhook(base_url="https://")` so SendGrid posts delivery and engagement events to `/v1/email-services/sendgrid/webhook/`. 3. **Verify Live Connection**: - Call `sendgrid_verify_connection` and report the verified sender identity and webhook status back to the user. --- ## 🛠️ End-to-End DIY Setup Guide (Manual) ### Step 1: Verify Your Domain or Single Sender in SendGrid 1. In [app.sendgrid.com](https://app.sendgrid.com/), navigate to **Settings -> Sender Authentication**. 2. Authenticate your sending domain (SPF/DKIM DNS records) or verify a Single Sender email address. ### Step 2: Create a SendGrid API Key 1. Go to **Settings -> API Keys -> Create API Key**. 2. Copy the `SG....` key (shown once). ### Step 3: Configure the SendGrid Event Webhook 1. Navigate to **Settings -> Mail Settings -> Event Settings -> Event Webhook**. 2. Set the **HTTP Post URL** to: `https://api.yourdomain.com/v1/email-services/sendgrid/webhook/` 3. Check **Processed**, **Delivered**, **Opened**, **Clicked**, **Bounced**, **Dropped**, **Spam Report**, and **Unsubscribed**, then click **Save**. ### Step 4: Save Encrypted Credentials in Open Valstorm ```python await platform.sendgrid.save_credentials( api_key="SG.xxxxxxxxxxxxxxxxxxxx.yyyyyyyyyyyyyyyyyyyy", from_email="notifications@yourdomain.com", from_name="Valstorm Notifications", ) ``` --- ## Running Tests (Python & Go) ```bash # Run Python unit & route tests cd apps/open-api .venv/bin/pytest tests/test_plugin_sendgrid.py -v # Run Go worker `/v3/mail/send` & Event Webhook race tests cd ../../plugins/valstorm-plugin-sendgrid/go go test -race -v ./... ``` --- # [Plugin: valstorm-plugin-slack | Python | platform.slack] (/plugins/slack) # valstorm-plugin-slack Open Valstorm Python plugin mounted at `platform.slack`. --- # [Plugin: valstorm-plugin-stripe | Python | platform.stripe] (/plugins/stripe) # Valstorm Customer CRM Stripe Integration Plugin (`valstorm-plugin-stripe`) Connects a tenant's own **Stripe** account to Open Valstorm (`platform.stripe`) to synchronize Customers (`account`), Products (`product`), Prices (`price`), Subscriptions (`subscription`), Invoices (`invoice` & `invoice_item`), Billing Meters (`usage_meter`), and Credit Grants (`credit_grant`). > **Note:** This plugin is completely separate from `valstorm-plugin-billing` (Valstorm Cloud's internal Pay-As-You-Go SaaS billing engine). --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) ### 1. Minimal Human Prerequisite Install the Stripe CLI (`brew install stripe/stripe-cli/stripe && stripe login`) or grab a Stripe Secret/Restricted Key (`sk_live_...` / `rk_live_...`) from **Stripe Dashboard -> Developers -> API keys**. ### 2. Copy-Paste Prompt for Your Valstorm Agent ```text Set up the Stripe CRM plugin (`valstorm-plugin-stripe`) for my workspace using `plugins/valstorm-plugin-stripe/README.md`: 1. Save my Stripe API key and account ID via `stripe_save_credentials`. 2. Verify connectivity via `stripe_verify_connection`. 3. Run an initial historical sync of my Products, Prices, Customers, Subscriptions, and Invoices into Valstorm CRM via `stripe_sync_historical`. ``` --- ## 🛠️ End-to-End DIY Setup Guide ### Option A: Direct API Key (BYO Key — Fastest) 1. In the **Stripe Dashboard**, navigate to **Developers -> API keys** and create a Restricted Key or copy your Secret Key (`sk_live_...` or `sk_test_...`). 2. Save your credentials via REST (`POST /v1/stripe/credentials`) or Python: ```python await platform.stripe.save_credentials( api_key="sk_live_...", stripe_account_id="acct_123456789", webhook_secret="whsec_...", ) ``` ### Option B: Stripe Connect / Marketplace App OAuth 1. Configure platform Connect credentials in `.env` (`STRIPE_CLIENT_ID`, `STRIPE_SECRET_KEY`, `STRIPE_SIGNING_SECRET`, `STRIPE_WEBHOOK_SECRET`). 2. Direct users to `GET /v1/stripe/auth/login` -> callback `GET /v1/stripe/public/auth/callback`. 3. Register webhook endpoint `https:///v1/stripe/public/webhook` in Stripe Dashboard for `customer.*`, `product.*`, `price.*`, `invoice.*`, and `customer.subscription.*` events. ### Running Tests ```bash uv run --project apps/open-api pytest apps/open-api/tests/test_plugin_stripe.py -v ``` --- # [Plugin: valstorm-plugin-support | Python | platform.support] (/plugins/support) # Open Valstorm AI Support & Ticket Escalation Plugin (`valstorm-plugin-support`) Powers Valstorm's **AI Documentation Support Specialist (`/v1/support/ask`)**, **Deflection/Escalation Telemetry (`/v1/support/telemetry`)**, and **Support Ticket Creation & Slack Escalation (`/v1/support/tickets`)** (`platform.support`). --- ## 🤖 Agent-Assisted Quick Setup ### Copy-Paste Prompt for Your Valstorm Agent ```text Configure `valstorm-plugin-support` for my workspace: 1. Verify `PUBLIC_DOCS_VAULT_ID` (`vaul_hRJgOqOCAzYBBMK8`) and `SUPPORT_SLACK_CHANNEL` (`C0BSZG9F0F3`). 2. Seed or refresh the documentation manifest and test `support_ask_question` and `support_create_ticket`. ``` --- ## 🛠️ End-to-End DIY Setup Guide ### Environment Variables | Variable | Default | Description | | :--- | :--- | :--- | | `ADMIN_CLIENT_ORG` | `org_dSnPMRjS1ZkkdYQ2` | Organization ID where support `ticket` records and public VFS docs live. | | `PUBLIC_DOCS_VAULT_ID` | `vaul_hRJgOqOCAzYBBMK8` | Root VFS Vault ID for `docs.valstorm.com` markdown guides. | | `SUPPORT_SLACK_CHANNEL` | `C0BSZG9F0F3` | Slack channel ID for live support ticket escalations. | ### Run Tests ```bash uv run --project apps/open-api pytest apps/open-api/tests/test_plugin_support.py -v ``` --- # [Plugin: valstorm-plugin-telnyx | Hybrid (Python + Go) | platform.telnyx] (/plugins/telnyx) # `valstorm-plugin-telnyx` — Hybrid Telnyx Telephony, Messaging & Voice AI Plugin (`NF-476`) Hybrid (**Python + Go**) Telnyx carrier integration for **Open Valstorm**, mounted at `platform.telnyx` (`VALSTORM_PLUGINS=telnyx` or `*`). Provides full-stack enterprise telephony on Open Valstorm's provider-agnostic schemas (`phone_number`, `sms_thread`, `sms_message`, `sms_participant`, `phone_application`, `call`, `call_recording`): - **Programmable Messaging (1-on-1 SMS & Group MMS)**: Deterministic `tconv_` thread fingerprinting, automatic CRM contact matching, VFS MMS media attachments, and 10DLC campaign assignment. - **Call Control v2 & Custom Python Function IVR**: Outbound & inbound calling, `answer`, `bridge`, `transfer`, `speak`, `gather_using_speak`, `playback_start`, `record_start`, and `hangup`. - **High-Throughput Go Webhook Engine (`plugins/valstorm-plugin-telnyx/go`)**: Processes `telnyx:webhook_event` tasks for call state transitions, inbound/outbound SMS/MMS, S3 call recording & voicemail persistence, and **Deepgram Nova-2** speaker-diarized transcription. - **US Local & Toll-Free Number Porting Wizard**: Portability checks, draft porting orders, LOA PDF generation, bill/CSR uploads, FOC windows, and FastPort activation. - **Telnyx Voice AI Assistants**: Assistant provisioning, phone number binding, outbound AI test calls, and turn-by-turn transcript extraction. --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) You only need your **Telnyx API v2 Key** (`KEY019...`) from the Telnyx Mission Control Portal. Your **Valstorm AI Agent** can use that single key to automatically discover your Call Control Application, Messaging Profile, and active Phone Numbers, configure your tenant webhook URLs, save the encrypted credentials in `platform.credentials`, sync your `phone_number` (`phnu_`) records, register $O(1)$ webhook routing, and verify live connectivity. ### 1. Quick Human Prerequisite (60 Seconds in Telnyx Mission Control) 1. Sign in to [portal.telnyx.com](https://portal.telnyx.com/). 2. Go to **Account Settings -> Keys & Credentials -> API Keys** and click **Create API Key** (copy the `KEY...` string). 3. *(Optional)* Switch to the **Public Key** tab and copy your Base64 **Ed25519 Public Key** for webhook signature verification. ### 2. Copy-Paste Prompt for Your Valstorm Agent Drop this prompt into Valstorm Chat: > *"Set up `valstorm-plugin-telnyx` using my Telnyx API Key `` (optional Public Key: ``). Follow `plugins/valstorm-plugin-telnyx/README.md` to save the encrypted credentials via `platform.credentials.save('telnyx', ...)`, auto-discover my Messaging Profile, Call Control App, and Phone Numbers, sync them into `phone_number` records with $O(1)$ webhook routing, and run `telnyx_verify_connection`."* ### 3. Agent Execution Runbook (Instructions for the AI Agent) When a user asks you to set up `valstorm-plugin-telnyx`, execute this sequence autonomously: 1. **Validate & Save Encrypted Telnyx Credentials**: - Call `await platform.telnyx.save_credentials(api_key=..., public_key=..., validate_live=True)` (or `POST /v1/telnyx/admin/credentials`). 2. **Discover & Sync Account Inventory (Dry-Run -> Execute)**: - Call `await platform.telnyx.get_account_overview()` (`telnyx_get_account_overview`) to inspect existing Messaging Profiles, Call Control Applications, and Phone Numbers on the Telnyx account. - Call `await platform.telnyx.sync_phone_numbers()` to upsert `phone_number` (`phnu_`) records and register every E.164 phone number and `connection_id` in `external_account_routing` (`provider="telnyx"`). 3. **Configure Tenant Webhook URL**: - Configure the Call Control Application and Messaging Profile `webhook_url` to point to `https:///v1/webhooks/telnyx/`. 4. **Verify Live Connection**: - Call `telnyx_verify_connection` and report the account balance, active phone numbers, messaging profile, and webhook routing status back to the user. --- ## 🛠️ End-to-End DIY Setup Guide (Manual) ### Step 1: Create a Telnyx API v2 Key & Ed25519 Public Key 1. Log in to [portal.telnyx.com](https://portal.telnyx.com/). 2. Navigate to **Account Settings -> Keys & Credentials**: - Copy your **API v2 Key** (`KEY...`). - Copy your **Public Key** (Base64 Ed25519 key used to verify `telnyx-signature-ed25519` headers). ### Step 2: Configure a Messaging Profile & Call Control Application 1. **Messaging -> Programmable Messaging -> Messaging Profiles**: - Create or select a Messaging Profile and set the **Webhook URL** to: `https://api.yourdomain.com/v1/webhooks/telnyx/` 2. **Voice -> Programmable Voice -> Call Control Applications**: - Create or select a Call Control Application and set the **Webhook URL** to: `https://api.yourdomain.com/v1/webhooks/telnyx/` ### Step 3: Save Encrypted Credentials in Open Valstorm ```python await platform.credentials.save( "telnyx", { "api_key": "KEY0192837465...", "public_key": "YOUR_ED25519_PUBLIC_KEY", "connection_id": "YOUR_CALL_CONTROL_APP_ID", "messaging_profile_id": "YOUR_MESSAGING_PROFILE_ID", "default_from_number": "+18335832008", }, ) ``` --- ## Python & Go Usage Examples ### Python (`platform.telnyx`) ```python # 1. Send 1-on-1 SMS or Multi-Party Group MMS (auto-creates `sms_thread` & `sms_message`) msg = await platform.telnyx.send_sms( to_phone="+18605551234", from_number="+18335832008", message="Hi from Open Valstorm!", ) # 2. Initiate an Outbound Call (auto-creates `call` record) call = await platform.telnyx.initiate_call( to_phone="+18605551234", from_phone="+18335832008", ) # 3. Search & Order a New Phone Number available = await platform.telnyx.search_available_numbers(area_code="860", limit=5) ordered = await platform.telnyx.order_phone_number(phone_number=available[0]["phone_number"]) # 4. Check US Local & Toll-Free Portability portability = await platform.telnyx.check_portability(["+18605551234", "+18335832008"]) ``` --- ## REST API Endpoints (`/v1/telnyx/*` & `/v1/webhooks/telnyx/{org_id}`) | Method | Endpoint | Description | | :--- | :--- | :--- | | `GET` | `/v1/telnyx/setup-guide` | Interactive Telnyx Mission Control setup guide | | `POST` | `/v1/telnyx/verify` | Verifies Telnyx API Key, balance, and active phone inventory | | `POST` | `/v1/telnyx/message` | Sends 1-on-1 SMS or Group MMS & logs `sms_message` (`sms_`) | | `POST` | `/v1/telnyx/conversation` | Creates or resolves deterministic `sms_thread` (`smst_`) | | `POST` | `/v1/telnyx/call` | Initiates outbound Call Control v2 call & logs `call` (`call_`) | | `POST` | `/v1/telnyx/calls/{call_control_id}/{action}` | Executes Call Control action (`answer`, `hangup`, `bridge`, `transfer`, `speak`, `gather`, `record_start`) | | `GET` | `/v1/telnyx/admin/overview` | Returns Telnyx account balance, numbers, profiles, and apps | | `POST` | `/v1/telnyx/admin/credentials` | Validates and saves encrypted Telnyx API & Public keys | | `GET` | `/v1/telnyx/admin/numbers/search` | Searches available US/Toll-Free phone numbers | | `POST` | `/v1/telnyx/admin/numbers/order` | Orders a phone number and creates `phone_number` (`phnu_`) | | `POST` | `/v1/telnyx/admin/porting/portability-check` | Checks US Local & Toll-Free number portability | | `GET/POST` | `/v1/telnyx/admin/porting/orders` | Lists or creates Telnyx number porting orders | | `GET/POST` | `/v1/telnyx/admin/ai-assistants` | Lists or upserts Telnyx Voice AI Assistants | | `POST` | `/v1/webhooks/telnyx/{org_id}` | High-throughput webhook ingress -> enqueues `telnyx:webhook_event` to Go worker | --- ## Running Tests (Python & Go) ```bash # Run Python unit & route integration tests cd apps/open-api .venv/bin/pytest tests/test_plugin_telnyx.py -v # Run Go worker Call Control, SMS/MMS, & Deepgram transcription race tests cd ../../plugins/valstorm-plugin-telnyx/go go test -race -v ./... ``` --- # [Plugin: valstorm-plugin-twilio | Hybrid (Python + Go) | platform.twilio] (/plugins/twilio) # `valstorm-plugin-twilio` — Hybrid Twilio Voice (TwiML), Conversations & Messaging Plugin (`NF-475`) Hybrid (**Python + Go**) Twilio integration for **Open Valstorm**, mounted at `platform.twilio` (`VALSTORM_PLUGINS=twilio` or `*`). Combines programmable **TwiML Voice Call Flows** (`platform.twilio.twiml`), **Twilio Conversations v1 (1-on-1 SMS & Group MMS)**, **Programmable Voice Outbound Dialing**, **Lookup v2**, and **High-Throughput Go Webhook Processing** on Open Valstorm's provider-agnostic telephony schemas (`phone_number`, `sms_thread`, `sms_message`, `sms_participant`, `phone_application`, `call`, `call_recording`): - **Composable TwiML Engine (`platform.twilio.twiml`)**: Build serverless Python `function` IVRs returning `text/xml` (`say_and_gather`, `forward_or_voicemail`, `business_hours_router`, `voice_ai_conversation_relay`, `dial`, `conference`, `enqueue`). - **Twilio Conversations & SMS/MMS (`platform.twilio.send_sms`)**: Automatic 1-on-1 and Group MMS thread resolution (`CH...` / `smst_`), participant self-healing, and VFS media attachments. - **High-Throughput Go Worker (`plugins/valstorm-plugin-twilio/go`)**: Processes `twilio:webhook_conversation_added`, `twilio:webhook_participant_added`, `twilio:webhook_message_added`, `twilio:webhook_delivery_updated`, and `twilio:webhook_voice_status` with HMAC-SHA1 `X-Twilio-Signature` verification. --- ## 🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up) If you have the Twilio CLI installed (`brew tap twilio/brew && brew install twilio`) or copy your **Account SID** (`AC...`) and **Auth Token** from the Twilio Console, your **Valstorm AI Agent** can automatically discover your Conversations Service SID (`IS...`), sync your active Twilio phone numbers into `phone_number` (`phnu_`) records, configure your Conversations post-webhook URL, register $O(1)$ webhook routing, and verify live connectivity. ### 1. Quick Human Prerequisite (60 Seconds) Copy your **Account SID** (`AC...`) and **Auth Token** from [console.twilio.com](https://console.twilio.com/) (or authenticate the Twilio CLI via `twilio login`). ### 2. Copy-Paste Prompt for Your Valstorm Agent Drop this prompt into Valstorm Chat: > *"Set up `valstorm-plugin-twilio` using my Twilio Account SID `` and Auth Token `` (optional Conversations Service SID: ``). Follow `plugins/valstorm-plugin-twilio/README.md` to save the encrypted credentials via `platform.twilio.save_credentials(...)`, sync my Twilio phone numbers into `phone_number` records with $O(1)$ webhook routing, configure my Conversations webhook URL, and run `twilio_verify_connection`."* ### 3. Agent Execution Runbook (Instructions for the AI Agent) When a user asks you to set up `valstorm-plugin-twilio`, execute this sequence autonomously: 1. **Validate & Save Encrypted Credentials**: - Call `await platform.twilio.save_credentials(account_sid=..., auth_token=..., chat_service_sid=..., validate_live=True)` (or `POST /v1/twilio/admin/credentials`). 2. **Sync Active Twilio Phone Numbers & $O(1)$ Routing**: - Call `await platform.twilio.sync_phone_numbers()` (`twilio_sync_phone_numbers`) to upsert `phone_number` (`phnu_`) records and register `account_sid`, `chat_service_sid`, and every E.164 phone number in `external_account_routing` (`provider="twilio"`). 3. **Configure Conversations Post-Webhook**: - Call `await platform.twilio.configure_conversation_webhooks(base_url="https://")` so `onConversationAdded`, `onParticipantAdded`, `onMessageAdded`, and `onDeliveryUpdated` post to `/v1/twilio/conversation//post-webhook`. 4. **Verify Live Connection**: - Call `twilio_verify_connection` and report the account status, friendly name, active phone numbers, and Conversations Service SID back to the user. --- ## 🛠️ End-to-End DIY Setup Guide (Manual) ### Step 1: Retrieve Your Twilio Account SID, Auth Token & Conversations Service SID 1. Log in to [console.twilio.com](https://console.twilio.com/). 2. On the main dashboard under **Account Info**, copy your **Account SID** (`AC...`) and **Auth Token**. 3. Navigate to **Messaging -> Services** (or **Conversations -> Manage -> Services**) and copy your default **Conversations Service SID** (`IS...`). ### Step 2: Configure Webhook URLs in Twilio Console 1. **Conversations Webhooks**: - Go to **Conversations -> Manage -> Global Webhooks**. - Set **Post-Event URL** to: `https://api.yourdomain.com/v1/twilio/conversation//post-webhook` - Enable `onConversationAdded`, `onParticipantAdded`, `onMessageAdded`, and `onDeliveryUpdated`. 2. **Voice Call Flow (TwiML) Webhooks**: - Point your Twilio phone number's **A call comes in** webhook to your Open Valstorm custom HTTP function endpoint (`/v1/functions/custom/`). ### Step 3: Save Encrypted Credentials in Open Valstorm ```python await platform.credentials.save( "twilio", { "account_sid": "AC0123456789abcdef0123456789abcdef", "auth_token": "YOUR_TWILIO_AUTH_TOKEN", "chat_service_sid": "IS0123456789abcdef0123456789abcdef", "default_from_number": "+18605551234", }, ) ``` --- ## Python Usage Examples (`platform.twilio`) ```python # 1. Build a TwiML IVR response inside a serverless Valstorm Function def handler(request, platform): return platform.twilio.twiml.say_and_gather( prompt="Thanks for calling Valstorm. Press 1 for Sales, or 2 for Support.", action_url="/v1/functions/custom/ivr-menu-choice", num_digits=1, ) # 2. Send an SMS or Group MMS via Twilio Conversations / Programmable Messaging msg = await platform.twilio.send_sms( to_phone="+18605559876", from_number="+18605551234", message="Your appointment is confirmed for tomorrow at 10:00 AM.", ) # 3. Perform a Twilio Lookup v2 (Line Type & Carrier Intelligence) lookup = await platform.twilio.lookup_phone_number("+18605559876") ``` --- ## REST API Endpoints (`/v1/twilio/*`) | Method | Endpoint | Description | | :--- | :--- | :--- | | `GET` | `/v1/twilio/setup-guide` | Step-by-step Twilio Console & Conversations webhook setup guide | | `POST` | `/v1/twilio/verify` | Verifies Twilio Account SID, Auth Token, and phone inventory | | `POST` | `/v1/twilio/admin/credentials` | Validates and saves encrypted Twilio credentials | | `POST` | `/v1/twilio/admin/numbers/sync` | Syncs Twilio IncomingPhoneNumbers into `phone_number` (`phnu_`) | | `GET` | `/v1/twilio/admin/numbers/search` | Searches available Twilio phone numbers by area code | | `POST` | `/v1/twilio/admin/numbers/order` | Orders a Twilio phone number & creates `phone_number` (`phnu_`) | | `POST` | `/v1/twilio/message` | Sends 1-on-1 SMS or Group MMS & logs `sms_message` (`sms_`) | | `POST` | `/v1/twilio/conversation` | Creates a Twilio Conversation with participants (`smst_`) | | `POST` | `/v1/twilio/call` | Initiates an outbound Twilio Voice call & logs `call` (`call_`) | | `GET` | `/v1/twilio/lookup/{phone_number}` | Runs Twilio Lookup v2 line type intelligence | | `POST` | `/v1/twilio/conversation/{org_id}/post-webhook` | Validates `X-Twilio-Signature` & dispatches `twilio:webhook_*` to Go worker | | `POST` | `/v1/webhooks/twilio/{org_id}` | General Twilio Voice/Messaging webhook relay to Go worker | --- ## Running Tests (Python & Go) ```bash # Run Python TwiML, Context, & Webhook route tests cd apps/open-api .venv/bin/pytest tests/test_plugin_twilio.py tests/test_twilio_twiml_context.py -v # Run Go worker Conversations & Voice webhook race tests cd ../../plugins/valstorm-plugin-twilio/go go test -race -v ./... ``` --- # Foundational Base App Schemas Summary ## Api Trigger (`api_trigger`, prefix `aptr_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), method (string), path (string), file_name (string), method_name (string), code (string:text-area), app (string:lookup), shared_with (list:sharing) ## App (`app`, prefix `app_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), version (string), schemas (list), records (json:json), settings (json:json), owner (string), app_admins (list), active (boolean), installed (boolean), marketplace (boolean), onboarded (boolean), shared_with (list:sharing), tagline (string), category (string:enum), icon_url (string), banner_url (string), pricing_model (string:enum), featured (boolean), publisher (string), documentation_url (string), highlights (json:json), screenshots (json:json), prerequisites (list), agent_setup_prompts (json:json) ## App Metadata (`app_metadata`, prefix `apme_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), app (string:lookup), data (json:json), description (string:rich-text), shared_with (list:sharing) ## App Page (`app_page`, prefix `appa_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), type (string:enum), description (string:text-area), object (string:lookup), data (list), slug (string), tag (string:picklist), remove_record_page_save_button (boolean), base_route (string), icon (string:icon), seo_title (string), seo_description (string:text-area), seo_image (object:image), author_override (string), canonical_url (string), seo_keywords (string), shared_with (list:sharing) ## Auth Credential (`auth_credential`, prefix `aucr_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), user (string:lookup), data (json:json), integrated_app (string:lookup), headers (json:json), api_key (string), owner (string:lookup), shared_with (list:sharing) ## Chat Message (`chat_message`, prefix `ctme_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), chat (string:lookup), body (string:markdown), direction (string:enum), participant_name (string), contact (string:lookup), user (string:lookup), read (json:json), shared_with (list:sharing) ## Dashboard (`dashboard`, prefix `dash_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), layout (list), layout_items (list), owner (string:lookup), shared_with (list:sharing) ## Device (`device`, prefix `dev_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), owner (string:lookup), shared_with (list:sharing), device_type (string:enum), operating_system (string), connection_status (string:enum), last_active (string:date-time), app_version (string), push_token (string), capabilities (list), hardware_specification (json:json) ## Environment Configuration (`environment_configuration`, prefix `enco_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), config (string:text-area), type (string), organization_id (string), shared_with (list:sharing) ## File (`file`, prefix `file_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), location (string), extension (string), content_type (string), owner (string:lookup), is_public (boolean), link (string:link), shared_with (list:sharing), vault_paths (list), vaults (list:lookup_list), current_version (number), version_count (number), latest_version (string:lookup), active_version (string:lookup), file_size (number), tag (list:multi-select), content (string), is_deleted (boolean) ## File Version (`file_version`, prefix `five_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), owner (string:lookup), file (string:lookup), version_number (number), location (string), link (string), extension (string), content_type (string), file_size (number), checksum (string), change_summary (string), is_active (boolean) ## Function (`function`, prefix `fun_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), file_name (string), code (string:code), app (string:lookup), shared_with (list:sharing) ## Guide (`guide`, prefix `gui_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), data (list), start_url (string), active (boolean), start_description (string:text-area), end_description (string:text-area), shared_with (list:sharing) ## Integrated App (`integrated_app`, prefix `inap_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), authentication_url (string), authentication_protocol (string), token_url (string), git_tracking (boolean), config (json:json), use_config (boolean), scopes (list), internal (boolean), client_id (string), client_secret (string:text-area), redirect_uri (string), access_token_minutes (number), refresh_token_days (number), organization (string), shared_with (list:sharing) ## List Filter (`list_filter`, prefix `lifi_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), query (string:text-area), object (string:lookup), settings (json:json), table_columns (list), kanban_column (json:json), kanban_swim_lane (json:json), kanban_card_fields (list), list_fields (list), default_view (string:enum), query_mode (string:enum), ui_configuration (json:json), shared_with (list:sharing), start_date_time (json:json), end_date_time (json:json), calendar_view (string:enum), calendar_card_fields (list) ## Log (`log`, prefix `log_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), header (json:json), log (string:text-area), status_code (string), path (string), query_parameter (json:json), start_time (string:date-time), process_time (number), end_time (string:date-time), request_data (string:text-area), ip_address (string), user_agent (string), status (string:enum), method (string), shared_with (list:sharing), type (string:enum), target_id (string:compound_lookup), target_name (string), duration_ms (number), invoked_by (string), error_message (string), data_compressed (string:text-area) ## Notification (`notification`, prefix `noti_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), type (string), data (json:json), channel (string), read (boolean), user (string:lookup), object (string:lookup), record_id (string), notification_setting (string:lookup), shared_with (list:sharing) ## Notification Setting (`notification_setting`, prefix `nose_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), channel (string), type (string), data (json:json), users (list:lookup_list), create_subscribers (boolean), save (boolean), notify (boolean), record_alerts (boolean), object (string:lookup), push_to_mobile (boolean), groups (list:lookup_list), all_users (boolean), add_record_owner (boolean), add_owner_manager (boolean), display_template (string), title_template (string), action_url (string), parent_schema_api_name (string), child_collection_key (string), icon (string), notify_sender (boolean), subscriber_creation_function (string:lookup), push_to_web (boolean), shared_with (list:sharing) ## Notification Subscriber (`notification_subscriber`, prefix `nosu_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), user (string:lookup), active (boolean), notification_setting (string:lookup), record_id (string), object (string:lookup), shared_with (list:sharing) ## OAuth App (`oauth_app`, prefix `oapp_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), owner (string:lookup), description (string), client_id (string), client_secret_hash (string), redirect_uris (list), redirect_uri (string), scopes (list), is_active (boolean), pkce_required (boolean), access_token_minutes (number), refresh_token_days (number), organization_id (string), shared_with (list:sharing) ## Onboarding (`onboarding`, prefix `onb_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), shared_with (list:sharing), description (string:text-area), active (boolean), required (boolean), onboarding_items (list:lookup_list), data (list), organization (string:lookup) ## Onboarding Item (`onboarding_item`, prefix `onbi_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), description (string:text-area), guide (string:lookup) ## Onboarding Progress (`onboarding_progress`, prefix `onbp_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), user (string:lookup), items_in_progress (list:lookup_list), items_completed (list:lookup_list) ## Organization (`organization`, prefix `org_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), is_active (boolean), website (string), description (string), admin (boolean), key (string), apps (list), stripe_customer_id (string), address (json:json), shipping_address (json:json), company_hours (json:availability), settings (json:json), company_holidays (list:date_list), shared_with (list:sharing), is_sandbox (boolean), parent_organization_id (string), sandbox_name (string), credits (number:currency), credits_spent (number:currency), credits_currency (string), subscription (json:json) ## Permission (`permission`, prefix `per_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), object_field_permissions (json:json), object_permissions (json:json), app (string:lookup), shared_with (list:sharing), scopes (list) ## Phase (`phase`, prefix `phas_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), owner (string:lookup), description (string:text-area), tasks (list:lookup_list), status (string:picklist), project (string:lookup) ## Portal (`portal`, prefix `port_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), domain (string), api_name (string), description (string:rich-text) ## Project (`project`, prefix `proj_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), tasks (list:lookup_list), phase (list:lookup_list), description (string:text-area), status (string:picklist), start_date_time (string:date-time), due_date_time (string:date-time), priority (string:picklist), stage_order (list), current_stage (number), ai_chat (string:lookup) ## Record Trigger (`record_trigger`, prefix `retr_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (json:lookup), modified_by (json:lookup), object (string:lookup), order (number), file_name (string), context (list), code (string:text-area), app (string:lookup), shared_with (list:sharing) ## Related File (`related_file`, prefix `refi_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), related_record (string:compound_lookup), file (string:lookup), link (string:link), shared_with (list:sharing) ## Report (`report`, prefix `rep_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), standard (boolean), chart_settings (json:json), object (string:lookup), query (json:json), owner (string:lookup), shared_with (list:sharing) ## Role (`role`, prefix `role_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), parent_role (string:lookup), view_access (string:enum), edit_access (string:enum), delete_access (string:enum), shared_with (list:sharing) ## Sandbox (`sandbox`, prefix `sand_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), is_active (boolean), parent_organization_id (string), description (string:rich-text), api_name (string) ## Schedule Trigger Setting (`schedule_trigger_setting`, prefix `sts_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), running_user (string:lookup), cron_schedule (string), active (boolean), data (json:json), function (string:lookup), shared_with (list:sharing) ## Scheduled Item (`scheduled_item`, prefix `scit_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), run_date_time (string:date-time), status (string:enum), data (json:json), task_id (string), function (string:lookup), process (string:text-area), system_function (string), automation (string:lookup), shared_with (list:sharing) ## Tag (`tag`, prefix `tag_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), object (string:lookup), field_api_name (string), value (string), label (string), global (boolean), global_list_name (string), color (string:color), order (number), dependent_field_api_name (string), dependent_values (list), active (boolean), shared_with (list:sharing) ## Template (`template`, prefix `temp_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), body (string:text-area), type (string:enum), subject (string), query (string:text-area), function (string:lookup), code (json:json), shared_with (list:sharing) ## User (`user`, prefix `user_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), email (string:email), first_name (string), last_name (string), phone (phone:json), is_active (boolean), is_superuser (boolean), is_account_owner (boolean), is_account_admin (boolean), organization_id (string), activation_code (string), permissions (list), notification_token (string), notification_token_active (boolean), notification_token_datetime (string:date-time), notifications (json:json), settings (json:json), organization_name (string), salesforce_id (string), organizations (list), do_not_disturb (boolean), manager (string:lookup), role (string:lookup), availability (json:user_availability), integration_user (boolean), ui_access (boolean), profile_picture (object:image), vacation (list:date_list), email_addresses (list), mfa_required (boolean), shared_with (list:sharing), owner (string:lookup), is_portal_user (boolean), portal_id (string) ## User Group (`user_group`, prefix `usgr_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), users (list:lookup_list), purpose (string), shared_with (list:sharing) ## Vault (`vault`, prefix `vaul_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), owner (string:lookup), shared_with (list:sharing), parent_vault (string:lookup), computed_paths (list), description (string:rich-text), icon (string:icon), color (string:color), vault_paths (list), is_public (boolean), tag (list:multi-select) ## Workspace (`workspace`, prefix `work_`) - Fields: id (string), name (string), created_date (string:date-time), modified_date (string:date-time), created_by (string:lookup), modified_by (string:lookup), api_name (string), pages (list), utilities (list), icon (string:icon), object_record_pages (list:lookup_list), object_new_record_pages (list:lookup_list), objects (list:lookup_list), web_pages (list:lookup_list), shared_with (list:sharing) --- # Unified API Endpoints Summary (Python open-api + Go open-worker) - `GET /v1/health` [open-api (Python :8010)] (#health): Health Check - `GET /v1/status` [open-api (Python :8010)] (#health): Status Check - `GET /v1/status/users` [open-api (Python :8010)] (#health): Get All Users - `GET /v1/status/user/{user_id}` [open-api (Python :8010)] (#health): Get Single User Status - `GET /v1/status/me` [open-api (Python :8010)] (#health): Get My Status - `POST /v1/status/available` [open-api (Python :8010)] (#health): Update User Availability - `POST /v1/status/availability` [open-api (Python :8010)] (#health): Update User Availability - `GET /v1/oauth2/authorize` [open-api (Python :8010)] (#oauth2): Oauth2 Authorize Get - `POST /v1/oauth2/authorize` [open-api (Python :8010)] (#oauth2): Oauth2 Authorize Post - `POST /v1/oauth2/code` [open-api (Python :8010)] (#oauth2): Oauth2 Generate Code - `POST /v1/oauth2/token` [open-api (Python :8010)] (#oauth2): Oauth2 Token - `POST /v1/oauth2/login` [open-api (Python :8010)] (#oauth2): Oauth2 Login - `POST /v1/oauth2/refresh` [open-api (Python :8010)] (#oauth2): Oauth2 Refresh - `POST /v1/auth/register` [open-api (Python :8010)] (#auth): Register - `POST /v1/auth/login` [open-api (Python :8010)] (#auth): Login - `GET /v1/auth/me` [open-api (Python :8010)] (#auth): Get Me - `GET /v1/auth/load` [open-api (Python :8010)] (#auth): Auth Load - `POST /v1/auth/logout` [open-api (Python :8010)] (#auth): Logout - `POST /v1/auth/switch-org` [open-api (Python :8010)] (#auth): Switch Organization - `POST /v1/auth/switch` [open-api (Python :8010)] (#auth): Switch Organization - `GET /v1/auth/sessions` [open-api (Python :8010)] (#auth): List Active Sessions - `POST /v1/auth/sessions/revoke-all` [open-api (Python :8010)] (#auth): Revoke All Sessions - `POST /v1/auth/sessions/{session_id}/revoke` [open-api (Python :8010)] (#auth): Revoke Single Session - `POST /v1/auth/cli-browser-token` [open-api (Python :8010)] (#auth): Generate Cli Browser Token - `POST /v1/auth/consume-cli-token` [open-api (Python :8010)] (#auth): Consume Cli Browser Token - `POST /v1/auth/pats` [open-api (Python :8010)] (#pat): Create Pat - `GET /v1/auth/pats` [open-api (Python :8010)] (#pat): List Pats - `DELETE /v1/auth/pats/{pat_id}` [open-api (Python :8010)] (#pat): Revoke Pat - `POST /v1/register` [open-api (Python :8010)] (#registration): Register User Route - `POST /v1/register/google` [open-api (Python :8010)] (#registration): Register Or Login With Google Route - `POST /v1/register/verify-otp` [open-api (Python :8010)] (#registration): Verify Otp Route - `POST /v1/register/resend-otp` [open-api (Python :8010)] (#registration): Resend Otp Route - `POST /v1/register/activate` [open-api (Python :8010)] (#registration): Activate User Route - `POST /v1/register/user` [open-api (Python :8010)] (#registration): Register User To Org Route - `POST /v1/register/activate-invite` [open-api (Python :8010)] (#registration): Activate Invite Route - `GET /v1/schema` [open-api (Python :8010)] (#schema): Get Schemas Api - `POST /v1/schema` [open-api (Python :8010)] (#schema): Create Schema Api - `PATCH /v1/schema` [open-api (Python :8010)] (#schema): Update Schema Api - `GET /v1/schema/sync/status` [open-api (Python :8010)] (#schema): Get Schema Sync Status Api - `POST /v1/schema/sync` [open-api (Python :8010)] (#schema): Sync Schema From Postgres Api - `GET /v1/schema/{object_name}` [open-api (Python :8010)] (#schema): Get Schema By Name Api - `GET /v1/schema/{object_name}/field/{field_name}` [open-api (Python :8010)] (#schema): Get Schema Field Api - `POST /v1/schema/field` [open-api (Python :8010)] (#schema): Create Schema Field Api - `PATCH /v1/schema/field` [open-api (Python :8010)] (#schema): Update Schema Field Api - `DELETE /v1/schema/{schema_id}` [open-api (Python :8010)] (#schema): Delete Schema Api - `DELETE /v1/schema/{object_id}/{field_name}` [open-api (Python :8010)] (#schema): Delete Schema Field Api - `POST /v1/schema/{object_id}/validation-rule` [open-api (Python :8010)] (#schema): Create Validation Rule Api - `PATCH /v1/schema/{object_id}/validation-rule/{rule_api_name}` [open-api (Python :8010)] (#schema): Update Validation Rule Api - `DELETE /v1/schema/{object_id}/validation-rule/{rule_api_name}` [open-api (Python :8010)] (#schema): Delete Validation Rule Api - `POST /v1/records/{api_name}` [open-api (Python :8010)] (#records): Create Records Api - `PATCH /v1/records/{api_name}` [open-api (Python :8010)] (#records): Update Records Api - `DELETE /v1/records/{api_name}` [open-api (Python :8010)] (#records): Delete Records Api - `GET /v1/records/{api_name}` [open-api (Python :8010)] (#records): Get Records Api - `POST /v1/object/{api_name}` [open-api (Python :8010)] (#records): Create Records Api - `PATCH /v1/object/{api_name}` [open-api (Python :8010)] (#records): Update Records Api - `DELETE /v1/object/{api_name}` [open-api (Python :8010)] (#records): Delete Records Api - `GET /v1/object/{api_name}` [open-api (Python :8010)] (#records): Get Records Api - `DELETE /v1/records/{api_name}/{record_id}` [open-api (Python :8010)] (#records): Delete Single Record Api - `GET /v1/records/{api_name}/{record_id}` [open-api (Python :8010)] (#records): Get Single Record Api - `DELETE /v1/object/{api_name}/{record_id}` [open-api (Python :8010)] (#records): Delete Single Record Api - `GET /v1/object/{api_name}/{record_id}` [open-api (Python :8010)] (#records): Get Single Record Api - `POST /v1/records/{api_name}/{record_id}/undelete` [open-api (Python :8010)] (#records): Undelete Single Record Api - `POST /v1/object/{api_name}/{record_id}/undelete` [open-api (Python :8010)] (#records): Undelete Single Record Api - `POST /v1/records/{api_name}/undelete` [open-api (Python :8010)] (#records): Undelete Records Api - `POST /v1/object/{api_name}/undelete` [open-api (Python :8010)] (#records): Undelete Records Api - `GET /v1/records/{api_name}/deleted` [open-api (Python :8010)] (#records): Get Deleted Records Api - `GET /v1/object/{api_name}/deleted` [open-api (Python :8010)] (#records): Get Deleted Records Api - `GET /v1/device` [open-api (Python :8010)] (#records): Get Devices Api - `POST /v1/device` [open-api (Python :8010)] (#records): Create Device Api - `PATCH /v1/device` [open-api (Python :8010)] (#records): Update Device Api - `DELETE /v1/device/{device_id}` [open-api (Python :8010)] (#records): Delete Device Api - `GET /v1/query` [open-api (Python :8010)] (#query): Sql Query Get Route - `POST /v1/query` [open-api (Python :8010)] (#query): Sql Query Post Route - `POST /v1/search/stream` [open-api (Python :8010)] (#query): Search Stream Post Route - `GET /v1/search/stream` [open-api (Python :8010)] (#query): Search Stream Get Route - `POST /v1/search/omni` [open-api (Python :8010)] (#query): Search Rest Post Route - `POST /v1/search` [open-api (Python :8010)] (#query): Search Rest Post Route - `GET /v1/search` [open-api (Python :8010)] (#query): Search Rest Get Route - `POST /v1/analytics/report` [open-api (Python :8010)] (#analytics): Report Frontend - `GET /v1/sandbox/` [open-api (Python :8010)] (#sandbox): List Sandboxes Api - `POST /v1/sandbox/` [open-api (Python :8010)] (#sandbox): Create Sandbox Api - `GET /v1/sandbox` [open-api (Python :8010)] (#sandbox): List Sandboxes Api - `POST /v1/sandbox` [open-api (Python :8010)] (#sandbox): Create Sandbox Api - `PATCH /v1/sandbox/{sandbox_id}` [open-api (Python :8010)] (#sandbox): Update Sandbox Api - `DELETE /v1/sandbox/{sandbox_id}` [open-api (Python :8010)] (#sandbox): Delete Sandbox Api - `POST /v1/sandbox/{sandbox_id}/refresh` [open-api (Python :8010)] (#sandbox): Refresh Sandbox Api - `GET /v1/apps/environments` [open-api (Python :8010)] (#apps): List App Environments Api - `GET /v1/apps/metadata/pull` [open-api (Python :8010)] (#apps): Pull Metadata Get Api - `POST /v1/apps/metadata/pull` [open-api (Python :8010)] (#apps): Pull Metadata Post Api - `POST /v1/apps/metadata/push` [open-api (Python :8010)] (#apps): Push Metadata Api - `GET /v1/apps` [open-api (Python :8010)] (#apps): List Installed Apps Api - `GET /v1/apps/marketplace` [open-api (Python :8010)] (#apps): List Marketplace Apps Api - `GET /v1/apps/{app_id}` [open-api (Python :8010)] (#apps): Get App Bundle Api - `DELETE /v1/apps/{app_id}` [open-api (Python :8010)] (#apps): Uninstall App Delete Api - `POST /v1/apps/apply-apps` [open-api (Python :8010)] (#apps): Apply Apps Api - `POST /v1/apps/install/{app_id}` [open-api (Python :8010)] (#apps): Install Single App Api - `POST /v1/apps/uninstall/{app_id}` [open-api (Python :8010)] (#apps): Uninstall App Post Api - `POST /v1/apps/onboard-app` [open-api (Python :8010)] (#apps): Onboard App Api - `GET /v1/apps/deploy/{app_id}` [open-api (Python :8010)] (#apps): Promote App Get Api - `POST /v1/apps/{app_id}/package` [open-api (Python :8010)] (#apps): Package App Api - `GET /v1/apps/{app_id}/bundle` [open-api (Python :8010)] (#apps): Get Tenant App Bundle Api - `POST /v1/apps/{app_id}/promote` [open-api (Python :8010)] (#apps): Promote App Post Api - `POST /v1/apps/marketplace-deployment` [open-api (Python :8010)] (#apps): Deploy To Marketplace Api - `PUT /v1/apps/deploy` [open-api (Python :8010)] (#apps): Receive App Deploy Api - `POST /v1/apps/app-update-subscribers` [open-api (Python :8010)] (#apps): Update Subscribers Legacy Api - `POST /v1/apps/{app_id}/update-subscribers` [open-api (Python :8010)] (#apps): Update Subscribers Api - `POST /v1/function/execute` [open-api (Python :8010)] (#function): Execute Function Api - `GET /v1/function` [open-api (Python :8010)] (#function): List Functions Api - `POST /v1/function` [open-api (Python :8010)] (#function): Create Function Api - `POST /v1/public/automation/{org_id}/{function_id}` [open-api (Python :8010)] (#public-function): Execute Public Function Api - `POST /v1/public/automation/function/{org_id}/{function_id}` [open-api (Python :8010)] (#public-function): Execute Public Function Api - `POST /v1/public/automation/{org_id}/function/{function_id}` [open-api (Python :8010)] (#public-function): Execute Public Function Api - `GET /v1/log/` [open-api (Python :8010)] (#logging-observability): List Logs Api - `GET /v1/log` [open-api (Python :8010)] (#logging-observability): List Logs Api - `GET /v1/log/{log_id}/details` [open-api (Python :8010)] (#logging-observability): Get Log Details Api - `GET /v1/log/{log_id}` [open-api (Python :8010)] (#logging-observability): Get Log Details Api - `DELETE /v1/log/purge` [open-api (Python :8010)] (#logging-observability): Purge Logs Api - `GET /v1/object/log/{log_id}/details` [open-api (Python :8010)] (#logging-observability-legacy-alias-): Get Log Details Api - `DELETE /v1/object/log/purge` [open-api (Python :8010)] (#logging-observability-legacy-alias-): Purge Logs Api - `GET /v1/auth/v2/session` [open-api (Python :8010)] (#auth-v2): Get Session V2 - `GET /v1/auth/v2/telephony` [open-api (Python :8010)] (#auth-v2): Get Telephony Meta V2 - `GET /v1/auth/v2/navigation` [open-api (Python :8010)] (#auth-v2): Get Navigation Meta V2 - `GET /v1/auth/v2/schemas` [open-api (Python :8010)] (#auth-v2): Get Schemas V2 - `GET /v1/auth/v2/bootstrap` [open-api (Python :8010)] (#auth-v2): Get Bootstrap V2 - `GET /v1/auth/v2/stream` [open-api (Python :8010)] (#auth-v2): Stream Bootstrap V2 - `GET /v1/ws/create` [open-worker (Go :8080) + open-api (Python :8010)] (#websocket): Create WebSocket Session ID - `POST /v1/files/presigned-upload` [open-api (Python :8010)] (#files): Presigned Upload Api - `POST /v1/files/register` [open-api (Python :8010)] (#files): Register File Api - `POST /v1/files/` [open-api (Python :8010)] (#files): Direct Upload Api - `POST /v1/files` [open-api (Python :8010)] (#files): Direct Upload Api - `POST /v1/files/public` [open-api (Python :8010)] (#files): Create Public File Api - `GET /v1/files/download-direct` [open-api (Python :8010)] (#files): Download Direct Api - `POST /v1/files/upload-direct` [open-api (Python :8010)] (#files): Upload Direct Api - `PUT /v1/files/upload-direct` [open-api (Python :8010)] (#files): Upload Direct Api - `POST /v1/files/location` [open-api (Python :8010)] (#files): Get File By Location Api - `GET /v1/files/stream/{file_id}` [open-api (Python :8010)] (#files): Stream File Api - `GET /v1/files/stream` [open-api (Python :8010)] (#files): Stream By Location Api - `GET /v1/files/{file_id}` [open-api (Python :8010)] (#files): Get File Api - `DELETE /v1/files/{file_id}` [open-api (Python :8010)] (#files): Delete File Api - `GET /v1/files/presigned-url/{file_id}` [open-api (Python :8010)] (#files): Get Presigned Download Url Api - `POST /v1/files/{file_id}/content` [open-api (Python :8010)] (#files): Update File Content Api - `POST /v1/files/batch-content` [open-api (Python :8010)] (#files): Batch Update Content Api - `GET /v1/files/{file_id}/versions` [open-api (Python :8010)] (#files): Get File Versions Api - `POST /v1/files/{file_id}/rollback` [open-api (Python :8010)] (#files): Rollback File Version Api - `GET /v1/vfs/tree` [open-api (Python :8010)] (#vfs): Get Vfs Tree Api - `GET /v1/vfs/snapshot` [open-api (Python :8010)] (#vfs): Get Vfs Snapshot Api - `POST /v1/vfs/cache/rebuild` [open-api (Python :8010)] (#vfs): Rebuild Vfs Cache Api - `POST /v1/vfs/query` [open-api (Python :8010)] (#vfs): Vfs Query Api - `GET /v1/vfs/vault/{vault_id}` [open-api (Python :8010)] (#vfs): Get Vault Api - `POST /v1/vfs/vaults/batch` [open-api (Python :8010)] (#vfs): Get Batch Vault Contents Api - `GET /v1/vfs/path/{string_path}` [open-api (Python :8010)] (#vfs): Resolve Vfs Path Api - `GET /v1/vfs/file/{file_id}` [open-api (Python :8010)] (#vfs): Get Vfs File Details Api - `GET /v1/vfs/download/{file_id}` [open-api (Python :8010)] (#vfs): Download Vfs File Api - `POST /v1/vfs/move` [open-api (Python :8010)] (#vfs): Move Vfs Item Api - `POST /v1/vfs/batch-move` [open-api (Python :8010)] (#vfs): Batch Move Vfs Items Api - `POST /v1/vfs/upload` [open-api (Python :8010)] (#vfs): Upload Vfs File Api - `DELETE /v1/vfs/{item_id}` [open-api (Python :8010)] (#vfs): Delete Vfs Item Api - `POST /v1/vfs/batch-delete` [open-api (Python :8010)] (#vfs): Batch Delete Vfs Items Api - `POST /v1/vfs/index` [open-api (Python :8010)] (#vfs): Index Vfs File Chunks Api - `POST /v1/vfs/search` [open-api (Python :8010)] (#vfs): Search Vfs Hybrid Post Api - `GET /v1/vfs/search` [open-api (Python :8010)] (#vfs): Search Vfs Hybrid Get Api - `POST /v1/document/preview` [open-api (Python :8010)] (#document): Preview Document Route - `POST /v1/document/generate` [open-api (Python :8010)] (#document): Generate Document Route - `POST /v1/graphql/` [open-api (Python :8010)] (#graphql): Graphql Endpoint - `GET /v1/graphql/` [open-api (Python :8010)] (#graphql): Graphql Gui - `POST /v1/graphql` [open-api (Python :8010)] (#graphql): Graphql Endpoint - `GET /v1/graphql` [open-api (Python :8010)] (#graphql): Graphql Gui - `GET /v2/auth/session` [open-api (Python :8010)] (#auth-v2): Get Session V2 - `GET /v2/auth/telephony` [open-api (Python :8010)] (#auth-v2): Get Telephony Meta V2 - `GET /v2/auth/navigation` [open-api (Python :8010)] (#auth-v2): Get Navigation Meta V2 - `GET /v2/auth/schemas` [open-api (Python :8010)] (#auth-v2): Get Schemas V2 - `GET /v2/auth/bootstrap` [open-api (Python :8010)] (#auth-v2): Get Bootstrap V2 - `GET /v2/auth/stream` [open-api (Python :8010)] (#auth-v2): Stream Bootstrap V2 - `GET /v1/ai/setup-guide` [open-api (Python :8010)] (#ai): Get Ai Setup Guide - `POST /v1/ai/verify` [open-api (Python :8010)] (#ai): Verify Ai Connection - `POST /v1/ai/credentials` [open-api (Python :8010)] (#ai): Save Ai Credentials - `GET /v1/ai/models` [open-api (Python :8010)] (#ai): List Ai Models Route - `GET /v1/ai/tools` [open-api (Python :8010)] (#ai): List All Ai Tools Route - `POST /v1/ai/tools/execute` [open-api (Python :8010)] (#ai): Execute Ai Tool Route - `GET /v1/ai/agent/{agent_id}/tools` [open-api (Python :8010)] (#ai): Get Agent Tools Route - `POST /v1/ai/agent/chat` [open-api (Python :8010)] (#ai): Agent Chat Route - `POST /v1/ai/agent/confirm` [open-api (Python :8010)] (#ai): Confirm Agent Tool Route - `POST /v1/ai/agent/cancel` [open-api (Python :8010)] (#ai): Cancel Agent Run Route - `GET /v1/ai/agent/runtime/status` [open-api (Python :8010)] (#ai): Get Agent Runtime Status Route - `POST /v1/ai/chat/{chat_id}/desktop-sync` [open-worker (Go :8080) + open-api (Python :8010)] (#ai): Sub-10ms AI Chat Streaming Chunk & Terminal Message Sync (Go) - `POST /v1/ai/prompt` [open-api (Python :8010)] (#ai): Openai Chat Completions Route - `POST /v1/ai/chat/completions` [open-api (Python :8010)] (#ai): Openai Chat Completions Route - `POST /v1/ai/gemini/{api_version}/models/{model_method}` [open-api (Python :8010)] (#ai): Gemini Passthrough Route - `POST /v1/ai/gemini/{api_version}/publishers/google/models/{model_method}` [open-api (Python :8010)] (#ai): Gemini Passthrough Route - `POST /v1/ai/audio/transcribe` [open-api (Python :8010)] (#ai): Transcribe Audio Route - `POST /v1/ai/recording/summarize` [open-api (Python :8010)] (#ai): Summarize Meeting Route - `GET /v1/ai/memory/working-context` [open-api (Python :8010)] (#ai): Get Working Context Route - `POST /v1/ai/memory/pin-asset` [open-api (Python :8010)] (#ai): Pin Asset Route - `POST /v1/ai/memory/fact` [open-api (Python :8010)] (#ai): Add Fact Route - `DELETE /v1/ai/memory/fact` [open-api (Python :8010)] (#ai): Remove Fact Route - `GET /v1/billing/overview` [open-api (Python :8010)] (#billing): Get Billing Overview Route - `GET /v1/billing/usage-breakdown` [open-api (Python :8010)] (#billing): Get Usage Breakdown Route - `GET /v1/billing/routes-breakdown` [open-api (Python :8010)] (#billing): Get Routes Breakdown Route - `GET /v1/billing/usage-history` [open-api (Python :8010)] (#billing): Get Usage History Route - `GET /v1/billing/ai-breakdown` [open-api (Python :8010)] (#billing): Get Ai Breakdown Route - `GET /v1/billing/telephony-breakdown` [open-api (Python :8010)] (#billing): Get Telephony Breakdown Route - `GET /v1/billing/storage-breakdown` [open-api (Python :8010)] (#billing): Get Storage Breakdown Route - `GET /v1/billing/storage-usage` [open-api (Python :8010)] (#billing): Get Storage Usage Route - `POST /v1/billing/storage/rollup` [open-api (Python :8010)] (#billing): Trigger Storage Rollup Route - `POST /v1/billing/auto-replenish` [open-api (Python :8010)] (#billing): Update Auto Replenish Route - `PUT /v1/billing/auto-replenish` [open-api (Python :8010)] (#billing): Update Auto Replenish Route - `GET /v1/billing/transactions` [open-api (Python :8010)] (#billing): List Credit Transactions Route - `GET /v1/billing/export/summary` [open-api (Python :8010)] (#billing): Get Billing Export Summary Route - `POST /v1/billing/create-credit-checkout-session` [open-api (Python :8010)] (#billing): Create Credit Checkout Session Route - `POST /v1/billing/webhook` [open-api (Python :8010)] (#billing-webhooks): Stripe Saas Billing Webhook Route - `GET /v1/booking/setup-guide` [open-api (Python :8010)] (#booking): Get Booking Setup Guide - `POST /v1/booking/verify` [open-api (Python :8010)] (#booking): Verify Booking Connection - `POST /v1/booking/links` [open-api (Python :8010)] (#booking): Upsert Booking Link Route - `GET /v1/booking/{slug}/availability` [open-worker (Go :8080) + open-api (Python :8010)] (#booking): Compute Public Booking Slot Availability (Go) - `POST /v1/booking/{slug}/reserve` [open-worker (Go :8080) + open-api (Python :8010)] (#booking): Reserve Public Calendar Booking Slot (Go) - `GET /v1/deepgram/setup-guide` [open-api (Python :8010)] (#deepgram): Get Deepgram Setup Guide - `POST /v1/deepgram/verify` [open-api (Python :8010)] (#deepgram): Verify Deepgram Connection - `POST /v1/deepgram/credentials` [open-api (Python :8010)] (#deepgram): Save Deepgram Credentials - `GET /v1/deepgram/token` [open-api (Python :8010)] (#deepgram): Get Deepgram Speech Token - `POST /v1/deepgram/transcribe` [open-api (Python :8010)] (#deepgram): Transcribe Deepgram Route - `GET /v1/ai/speech/deepgram/token` [open-api (Python :8010)] (#deepgram-compat): Get Deepgram Speech Token - `GET /v1/ai/speech/credentials` [open-api (Python :8010)] (#deepgram-compat): Get Speech Credentials Compat - `POST /v1/ai/recording/transcribe` [open-api (Python :8010)] (#deepgram-compat): Transcribe Recording Compat - `POST /v1/notifications/send` [open-api (Python :8010)] (#notifications): Send Notification - `POST /v1/notifications/set-token` [open-api (Python :8010)] (#notifications): Set Notification Token - `GET /v1/gcp/setup-guide` [open-api (Python :8010)] (#gcp): Get Setup Guide - `POST /v1/gcp/verify` [open-api (Python :8010)] (#gcp): Verify Connection - `GET /v1/gcp/bigquery/datasets` [open-api (Python :8010)] (#gcp): List Datasets - `GET /v1/gcp/bigquery/datasets/{dataset}/tables` [open-api (Python :8010)] (#gcp): List Tables - `GET /v1/gcp/bigquery/datasets/{dataset}/tables/{table}` [open-api (Python :8010)] (#gcp): Get Table Schema - `POST /v1/gcp/bigquery/query` [open-api (Python :8010)] (#gcp): Query - `POST /v1/gcp/bigquery/insert` [open-api (Python :8010)] (#gcp): Insert Rows - `POST /v1/gcp/pubsub/publish` [open-api (Python :8010)] (#gcp): Publish - `GET /v1/github/setup-guide` [open-api (Python :8010)] (#github): Get Github Setup Guide Route - `POST /v1/github/credentials` [open-api (Python :8010)] (#github): Save Github Credentials Route - `GET /v1/github/auth/login` [open-api (Python :8010)] (#github): Login Github Route - `GET /v1/github/auth/status` [open-api (Python :8010)] (#github): Get Github Status Route - `POST /v1/github/auth/disconnect` [open-api (Python :8010)] (#github): Disconnect Github Route - `GET /v1/github/repositories` [open-api (Python :8010)] (#github): List Github Repositories Route - `POST /v1/github/pulls` [open-api (Python :8010)] (#github): Create Github Pull Request Route - `POST /v1/github/issues` [open-api (Python :8010)] (#github): Create Github Issue Route - `GET /v1/ci/deployments` [open-api (Python :8010)] (#ci): List Ci Deployments Route - `GET /v1/github/auth/callback` [open-api (Python :8010)] (#github-public): Callback Github Route - `POST /v1/github/webhook` [open-api (Python :8010)] (#github-public): Handle Github Ci Webhook Route - `POST /v1/ci/webhooks/github` [open-api (Python :8010)] (#ci-webhooks): Handle Github Ci Webhook Route - `POST /v1/ci/webhook` [open-api (Python :8010)] (#ci-webhooks): Handle Github Ci Webhook Route - `GET /v1/google-marketing/setup-guide` [open-api (Python :8010)] (#google-marketing): Get Setup Guide - `GET /v1/google-marketing/verify-connection` [open-api (Python :8010)] (#google-marketing): Verify Connection - `GET /v1/google-marketing/ads/campaigns` [open-api (Python :8010)] (#google-marketing): List Ads Campaigns - `GET /v1/google-marketing/gsc/sites` [open-api (Python :8010)] (#google-marketing): List Gsc Sites - `GET /v1/google-marketing/ga4/realtime-report` [open-api (Python :8010)] (#google-marketing): Get Ga4 Realtime - `GET /v1/google-marketing/gtm/container` [open-api (Python :8010)] (#google-marketing): Get Gtm Container - `GET /v1/google/setup-guide` [open-api (Python :8010)] (#google-workspace): Get Google Workspace Setup Guide - `GET /v1/google-workspace/setup-guide` [open-api (Python :8010)] (#google-workspace): Get Google Workspace Setup Guide - `GET /v1/google/auth/status` [open-api (Python :8010)] (#google-workspace): Get Google Workspace Auth Status - `GET /v1/google-workspace/auth/status` [open-api (Python :8010)] (#google-workspace): Get Google Workspace Auth Status - `GET /v1/google/auth/login` [open-api (Python :8010)] (#google-workspace): Login Google Workspace - `GET /v1/google-workspace/auth/login` [open-api (Python :8010)] (#google-workspace): Login Google Workspace - `GET /v1/google/auth/callback` [open-api (Python :8010)] (#google-workspace): Callback Google Workspace - `GET /v1/google-workspace/auth/callback` [open-api (Python :8010)] (#google-workspace): Callback Google Workspace - `POST /v1/google-workspace/verify` [open-api (Python :8010)] (#google-workspace): Verify Google Workspace - `POST /v1/google/gmail/send` [open-api (Python :8010)] (#google-workspace): Send Gmail Route - `POST /v1/google-workspace/gmail/send` [open-api (Python :8010)] (#google-workspace): Send Gmail Route - `POST /v1/google-workspace/gmail/watch` [open-api (Python :8010)] (#google-workspace): Watch Gmail Route - `POST /v1/google-workspace/gmail/sync` [open-api (Python :8010)] (#google-workspace): Sync Gmail Route - `POST /v1/google/webhooks/pubsub` [open-api (Python :8010)] (#google-workspace): Google Pubsub Webhook Ingress - `POST /v1/google-workspace/webhooks/pubsub` [open-api (Python :8010)] (#google-workspace): Google Pubsub Webhook Ingress - `GET /v1/google-workspace/calendar/events` [open-api (Python :8010)] (#google-workspace): List Calendar Events Route - `POST /v1/google-workspace/calendar/events` [open-api (Python :8010)] (#google-workspace): Create Calendar Event Route - `POST /v1/google-workspace/calendar/free-busy` [open-api (Python :8010)] (#google-workspace): Query Free Busy Route - `POST /v1/google-workspace/meet/create` [open-api (Python :8010)] (#google-workspace): Create Meet Route - `GET /v1/google-workspace/drive/files` [open-api (Python :8010)] (#google-workspace): List Drive Files Route - `GET /v1/google-workspace/docs/{document_id}` [open-api (Python :8010)] (#google-workspace): Get Google Doc Route - `GET /v1/inbound/settings` [open-api (Python :8010)] (#inbound): Get Inbound Settings - `PUT /v1/inbound/settings` [open-api (Python :8010)] (#inbound): Update Inbound Settings - `POST /v1/inbound/publishable-key/rotate` [open-api (Python :8010)] (#inbound): Rotate Publishable Key - `GET /v1/linkedin/setup-guide` [open-api (Python :8010)] (#linkedin): Get Linkedin Setup Guide - `GET /v1/linkedin/auth/login` [open-api (Python :8010)] (#linkedin): Login Linkedin - `POST /v1/linkedin/verify` [open-api (Python :8010)] (#linkedin): Verify Linkedin Connection - `GET /v1/linkedin/ads/accounts` [open-api (Python :8010)] (#linkedin): List Linkedin Ad Accounts - `GET /v1/linkedin/ads/campaigns` [open-api (Python :8010)] (#linkedin): List Linkedin Campaigns - `POST /v1/linkedin/ads/campaigns` [open-api (Python :8010)] (#linkedin): Create Linkedin Campaign - `POST /v1/linkedin/ads/audience-estimate` [open-api (Python :8010)] (#linkedin): Estimate Linkedin Audience - `GET /v1/linkedin/ads/analytics` [open-api (Python :8010)] (#linkedin): Get Linkedin Ad Analytics - `GET /v1/linkedin/ads/library` [open-api (Python :8010)] (#linkedin): Search Linkedin Ad Library - `POST /v1/linkedin/publishing/post` [open-api (Python :8010)] (#linkedin): Publish Linkedin Post Route - `POST /v1/linkedin/publishing/carousel` [open-api (Python :8010)] (#linkedin): Publish Linkedin Carousel Route - `GET /v1/linkedin/publishing/analytics` [open-api (Python :8010)] (#linkedin): Get Linkedin Post Analytics Route - `GET /v1/linkedin/network/connections` [open-api (Python :8010)] (#linkedin): List Linkedin Connections Route - `POST /v1/linkedin/webhooks` [open-api (Python :8010)] (#linkedin-webhooks): Receive Linkedin Webhook - `GET /v1/meta/setup-guide` [open-api (Python :8010)] (#meta): Get Meta Setup Guide - `POST /v1/meta/verify` [open-api (Python :8010)] (#meta): Verify Meta Connection - `GET /v1/meta/business/assets` [open-api (Python :8010)] (#meta): Get Meta Business Assets - `GET /v1/meta/ads/campaigns` [open-api (Python :8010)] (#meta): List Meta Campaigns - `POST /v1/meta/ads/campaigns` [open-api (Python :8010)] (#meta): Create Meta Campaign - `POST /v1/meta/ads/audiences/custom` [open-api (Python :8010)] (#meta): Upload Meta Custom Audience - `GET /v1/meta/ads/insights` [open-api (Python :8010)] (#meta): Get Meta Ad Insights - `GET /v1/meta/ads/interests` [open-api (Python :8010)] (#meta): Search Meta Ad Interests - `POST /v1/meta/publishing/facebook` [open-api (Python :8010)] (#meta): Publish Facebook Post Route - `POST /v1/meta/publishing/instagram` [open-api (Python :8010)] (#meta): Publish Instagram Media Route - `GET /v1/meta/webhooks` [open-api (Python :8010)] (#meta-webhooks): Verify Meta Webhook Challenge - `POST /v1/meta/webhooks` [open-api (Python :8010)] (#meta-webhooks): Receive Meta Webhook - `GET /v1/microsoft/setup-guide` [open-api (Python :8010)] (#microsoft): Get Microsoft Setup Guide Route - `POST /v1/microsoft/credentials` [open-api (Python :8010)] (#microsoft): Save Microsoft Credentials Route - `POST /v1/microsoft/verify` [open-api (Python :8010)] (#microsoft): Verify Microsoft Connection Route - `GET /v1/microsoft/auth/login` [open-api (Python :8010)] (#microsoft): Login Microsoft Route - `GET /v1/microsoft/me` [open-api (Python :8010)] (#microsoft): Get Microsoft Profile Route - `GET /v1/microsoft/list-inbox` [open-api (Python :8010)] (#microsoft): List Microsoft Inbox Route - `POST /v1/microsoft/email/sync` [open-api (Python :8010)] (#microsoft): Sync Microsoft Inbox Route - `POST /v1/microsoft/email/send` [open-api (Python :8010)] (#microsoft): Send Microsoft Email Route - `POST /v1/microsoft/email/{message_id}/reply` [open-api (Python :8010)] (#microsoft): Reply Microsoft Email Route - `GET /v1/microsoft/calendar` [open-api (Python :8010)] (#microsoft): Get Microsoft Calendar Route - `GET /v1/microsoft/calendars` [open-api (Python :8010)] (#microsoft): List Microsoft Calendars Route - `GET /v1/microsoft/calendar/events` [open-api (Python :8010)] (#microsoft): List Microsoft Events Route - `POST /v1/microsoft/calendar/{calendar_id}/sync` [open-api (Python :8010)] (#microsoft): Sync Microsoft Calendar Route - `POST /v1/microsoft/subscriptions` [open-api (Python :8010)] (#microsoft): Create Microsoft Subscription Route - `GET /v1/microsoft/subscriptions` [open-api (Python :8010)] (#microsoft): List Microsoft Subscriptions Route - `DELETE /v1/microsoft/subscriptions/{subscription_id}` [open-api (Python :8010)] (#microsoft): Delete Microsoft Subscription Route - `GET /v1/microsoft/auth/callback` [open-api (Python :8010)] (#microsoft-webhooks): Callback Microsoft Route - `POST /v1/microsoft/webhook/notifications/{org_id}/{user_id}` [open-api (Python :8010)] (#microsoft-webhooks): Microsoft Email Webhook Route - `POST /v1/microsoft/webhook/calendar/notifications/{org_id}/{user_id}/{calendar_id}` [open-api (Python :8010)] (#microsoft-webhooks): Microsoft Calendar Webhook Route - `GET /v1/salesforce/setup-guide` [open-api (Python :8010)] (#salesforce): Get Salesforce Setup Guide Route - `POST /v1/salesforce/credentials` [open-api (Python :8010)] (#salesforce): Save Salesforce Credentials Route - `GET /v1/salesforce/auth/login` [open-api (Python :8010)] (#salesforce): Login Salesforce Route - `POST /v1/salesforce/query` [open-api (Python :8010)] (#salesforce): Query Salesforce Route - `POST /v1/salesforce/records` [open-api (Python :8010)] (#salesforce): Create Salesforce Records Route - `PATCH /v1/salesforce/records` [open-api (Python :8010)] (#salesforce): Update Salesforce Records Route - `POST /v1/salesforce/files/upload` [open-api (Python :8010)] (#salesforce): Upload Salesforce File Route - `GET /v1/salesforce/auth/callback` [open-api (Python :8010)] (#salesforce-public): Callback Salesforce Route - `GET /v1/email-services/sendgrid/setup-guide` [open-api (Python :8010)] (#sendgrid): Get Sendgrid Setup Guide - `POST /v1/email-services/sendgrid/verify` [open-api (Python :8010)] (#sendgrid): Verify Sendgrid Connection - `POST /v1/email-services/sendgrid/credentials` [open-api (Python :8010)] (#sendgrid): Save Sendgrid Credentials - `POST /v1/email-services/sendgrid/send` [open-api (Python :8010)] (#sendgrid): Send Sendgrid Email - `POST /v1/email-services/sendgrid/messages/search` [open-api (Python :8010)] (#sendgrid): Search Sendgrid Messages - `GET /v1/email-services/sendgrid/messages/{message_id}` [open-api (Python :8010)] (#sendgrid): Get Sendgrid Message Details - `POST /v1/email-services/sendgrid/messages/{message_id}` [open-api (Python :8010)] (#sendgrid): Get Sendgrid Message Details - `POST /v1/email-services/sendgrid/webhook/{organization_id}` [open-api (Python :8010)] (#sendgrid-webhooks): Receive Sendgrid Webhook - `GET /v1/slack/auth/login` [open-api (Python :8010)] (#slack): Login Slack - `GET /v1/slack/auth/status` [open-api (Python :8010)] (#slack): Get Slack Status - `POST /v1/slack/auth/disconnect` [open-api (Python :8010)] (#slack): Disconnect Slack - `GET /v1/slack/channels` [open-api (Python :8010)] (#slack): List Slack Channels - `POST /v1/slack/chat/post` [open-api (Python :8010)] (#slack): Post Slack Message - `GET /v1/slack/users` [open-api (Python :8010)] (#slack): List Slack Users - `GET /v1/slack/users/{user_id}/profile` [open-api (Python :8010)] (#slack): Get Slack User Profile - `GET /v1/slack/chat/history` [open-api (Python :8010)] (#slack): Get Slack Channel History - `GET /v1/slack/chat/replies` [open-api (Python :8010)] (#slack): Get Slack Thread Replies - `POST /v1/slack/chat/update` [open-api (Python :8010)] (#slack): Update Slack Message Route - `POST /v1/slack/chat/delete` [open-api (Python :8010)] (#slack): Delete Slack Message Route - `POST /v1/slack/reactions/add` [open-api (Python :8010)] (#slack): Add Slack Reaction Route - `GET /v1/slack/auth/callback` [open-api (Python :8010)] (#slack): Callback Slack - `GET /v1/slack/oidc/login` [open-api (Python :8010)] (#slack): Oidc Login Slack - `GET /v1/slack/oidc/callback` [open-api (Python :8010)] (#slack): Oidc Callback Slack - `POST /v1/slack/events` [open-api (Python :8010)] (#slack): Handle Slack Events - `POST /v1/slack/commands` [open-api (Python :8010)] (#slack): Handle Slack Commands - `GET /v1/stripe/setup-guide` [open-api (Python :8010)] (#stripe): Get Stripe Setup Guide Route - `POST /v1/stripe/credentials` [open-api (Python :8010)] (#stripe): Save Stripe Credentials Route - `POST /v1/stripe/verify` [open-api (Python :8010)] (#stripe): Verify Stripe Connection Route - `POST /v1/stripe/fetch` [open-api (Python :8010)] (#stripe): Stripe Fetch Proxy Route - `POST /v1/stripe/sync/historical` [open-api (Python :8010)] (#stripe): Trigger Historical Stripe Sync Route - `GET /v1/stripe/auth/login` [open-api (Python :8010)] (#stripe): Login Stripe Route - `POST /v1/stripe/auth/claim` [open-api (Python :8010)] (#stripe): Claim Stripe Credentials Route - `GET /v1/stripe/public/auth/callback` [open-api (Python :8010)] (#stripe-webhooks): Stripe Auth Callback Route - `POST /v1/stripe/public/webhook` [open-api (Python :8010)] (#stripe-webhooks): Stripe Customer Crm Webhook Route - `POST /v1/support/ask` [open-api (Python :8010)] (#support): Ask Valstorm Support Route - `POST /v1/support/telemetry` [open-api (Python :8010)] (#support): Log Support Telemetry Route - `POST /v1/support/tickets` [open-api (Python :8010)] (#support): Create Support Ticket Route - `GET /v1/telnyx/setup-guide` [open-api (Python :8010)] (#telnyx): Get Telnyx Setup Guide - `POST /v1/telnyx/verify` [open-api (Python :8010)] (#telnyx): Verify Telnyx Connection - `GET /v1/telnyx/admin/overview` [open-api (Python :8010)] (#telnyx): Get Telnyx Admin Overview - `POST /v1/telnyx/admin/credentials` [open-api (Python :8010)] (#telnyx): Save Telnyx Admin Credentials - `POST /v1/telnyx/admin/numbers/sync` [open-api (Python :8010)] (#telnyx): Sync Telnyx Numbers - `GET /v1/telnyx/admin/numbers/search` [open-api (Python :8010)] (#telnyx): Search Telnyx Numbers - `POST /v1/telnyx/admin/numbers/order` [open-api (Python :8010)] (#telnyx): Order Telnyx Number - `POST /v1/telnyx/message` [open-api (Python :8010)] (#telnyx): Send Telnyx Message - `POST /v1/telnyx/call` [open-api (Python :8010)] (#telnyx): Initiate Telnyx Call - `POST /v1/telnyx/calls/{call_control_id}/{action}` [open-api (Python :8010)] (#telnyx): Execute Telnyx Call Action - `POST /v1/telnyx/admin/porting/portability-check` [open-api (Python :8010)] (#telnyx): Check Telnyx Portability - `GET /v1/telnyx/admin/porting/orders` [open-api (Python :8010)] (#telnyx): List Telnyx Porting Orders - `POST /v1/telnyx/admin/porting/orders` [open-api (Python :8010)] (#telnyx): Create Telnyx Porting Order - `GET /v1/telnyx/admin/ai-assistants` [open-api (Python :8010)] (#telnyx): List Telnyx Ai Assistants - `POST /v1/telnyx/webhooks/{org_id}` [open-api (Python :8010)] (#telnyx-webhooks): Telnyx Webhook Passthrough - `POST /v1/webhooks/telnyx/{org_id}` [open-worker (Go :8080) + open-api (Python :8010)] (#telnyx): Telnyx Call Control v2 & SMS/MMS Webhook Handler (Go) - `GET /v1/twilio/setup-guide` [open-api (Python :8010)] (#twilio): Get Twilio Setup Guide - `POST /v1/twilio/verify` [open-api (Python :8010)] (#twilio): Verify Twilio Connection - `POST /v1/twilio/admin/credentials` [open-api (Python :8010)] (#twilio): Save Twilio Credentials - `POST /v1/twilio/admin/numbers/sync` [open-api (Python :8010)] (#twilio): Sync Twilio Numbers - `GET /v1/twilio/admin/numbers/search` [open-api (Python :8010)] (#twilio): Search Twilio Numbers - `POST /v1/twilio/admin/numbers/order` [open-api (Python :8010)] (#twilio): Order Twilio Number - `POST /v1/twilio/message` [open-api (Python :8010)] (#twilio): Send Twilio Message - `POST /v1/twilio/conversation` [open-api (Python :8010)] (#twilio): Create Twilio Conversation - `POST /v1/twilio/call` [open-api (Python :8010)] (#twilio): Initiate Twilio Call - `GET /v1/twilio/lookup/{phone_number}` [open-api (Python :8010)] (#twilio): Lookup Twilio Phone Number - `POST /v1/twilio/call/available` [open-api (Python :8010)] (#twilio): Update Twilio Call Availability - `GET /v1/twilio/media/recording/{sid}` [open-api (Python :8010)] (#twilio): Get Twilio Call Recording - `POST /v1/webhooks/twilio/{org_id}` [open-worker (Go :8080) + open-api (Python :8010)] (#twilio): Twilio Voice & Programmable Messaging Webhook Handler (Go) - `POST /v1/twilio/call/recording/{org_id}` [open-api (Python :8010)] (#twilio-webhooks): Receive Twilio Webhook - `POST /v1/twilio/call/recording/callback/{org_id}` [open-api (Python :8010)] (#twilio-webhooks): Receive Twilio Webhook - `POST /v1/twilio/call/callback/{org_id}` [open-api (Python :8010)] (#twilio-webhooks): Receive Twilio Webhook - `POST /v1/twilio/conversation/{org_id}/post-webhook` [open-api (Python :8010)] (#twilio-webhooks): Receive Twilio Webhook - `GET /v1/routes` [open-api (Python :8010)] (#system): List Available Routes - `GET /health` [open-worker (Go :8080)] (#system): Open Worker Health Check - `POST /v1/deployment/install` [open-worker (Go :8080)] (#deployment): Install App Bundle into Single Tenant Database - `POST /v1/deployment/rollout` [open-worker (Go :8080)] (#deployment): Execute Concurrent Fleet-Wide App Bundle & DDL Rollout - `GET /v1/deployment/status/{job_id}` [open-worker (Go :8080)] (#deployment): Get Fleet App Deployment Job Status - `POST /v1/email-services/sendgrid/webhook/{org_id}` [open-worker (Go :8080)] (#sendgrid): SendGrid Email Delivery & Engagement Event Webhook (Go) - `POST /v1/inbound/submit` [open-worker (Go :8080)] (#inbound): High-Throughput Public Form & Lead Ingestion (Go) - `POST /v1/inbound/webhook` [open-worker (Go :8080)] (#inbound): High-Throughput Inbound Webhook Ingestion (Go) - `POST /v1/ws/desktop/execute` [open-worker (Go :8080)] (#websocket): Dispatch Remote Command to Connected Desktop Client - `POST /v1/ws/send_message` [open-worker (Go :8080)] (#websocket): Publish Real-Time Message to WebSocket Channel - `GET /v1/ws/{org_id}/{user_id}` [open-worker (Go :8080)] (#websocket): Upgrade HTTP Connection to Real-Time WebSocket Stream - `POST /v1/runs` [open-agent-runtime (Python :8660)] (#agent-runtime): Start Autonomous Cloud ReAct Agent Run - `GET /v1/runs/{run_id}/events` [open-agent-runtime (Python :8660)] (#agent-runtime): Stream Live ReAct Agent Run SSE Events - `POST /v1/scrape` [open-web-scraper (Python :8661)] (#web-scraper): 3-Tier Waterfall Web Scrape to Clean Markdown - `POST /v1/crawl` [open-web-scraper (Python :8661)] (#web-scraper): Multi-Page Domain Crawler with VFS Vault Ingestion - `POST /v1/feed/poll` [open-web-scraper (Python :8661)] (#web-scraper): Poll RSS 2.0 / Atom Feed to Clean Markdown - `POST /v1/diff` [open-web-scraper (Python :8661)] (#web-scraper): Compare Live Webpage Against Zstd PostgreSQL Archive