sunholo Packages
21 packages published by sunholo.
Pure API key validation (SHA-256 hash comparison, constant-time) and bearer token extraction
Load and validate config from environment variables with required/optional/default patterns
Exchange GCP ADC refresh tokens for access tokens, detect default project from gcloud config
Build HTTP requests with auth headers, parse JSON responses, standard error handling
Structured JSON logging (info/warn/err/trace/withFields) via Debug ghost effect. No IO cascade, no effect declarations needed. Zero-cost in release mode. Host filters by --log-level. Cloud Run and log aggregator friendly.
Validate AILANG packages: parse manifest, check exports, compute hashes, generate metadata. Written in AILANG.
Pure assertion helpers for testing: assertEqual, assertContains, assertOk, assertErr
Pure billing policy: plan catalog lookup, entitlement resolution from subscription state, quota checks, usage delta computation. No side effects.
Firestore REST API client for AILANG. CRUD operations (get, set, delete), structured queries, field value encoding/decoding. Uses GCP ADC auth. Designed for Cloud Run services.
Stripe API adapter: create checkout sessions, customer portal sessions, verify webhooks, map events to internal subscription state. Uses Stripe REST API.
Create and manage payment proposals — AI agents propose plan changes, humans approve. Pure state machine for proposal lifecycle.
Firestore CRUD for billing records: customers, subscriptions, entitlements, usage, proposals, events. Built on sunholo/firestore package.
HTTP handlers for billing Cloud Run service. Deploy with 'ailang serve-api'. Checkout, portal, proposals, webhooks, entitlements endpoints.
Minimal test package — used by coordinator integration tests to verify the autonomous publish pipeline
Build A2UI component trees and serialize to flat adjacency-list JSON. Apps define domain-specific mappings; this package provides the primitives and JSON renderer.
WebSocket protocol helpers for Gemini Live API — build setup/text/audio messages, parse responses, configure proactive audio/affective dialog/thinking/VAD. Supports both Vertex AI (2.5) and Google AI Studio (3.1) protocols.
Firebase ID token verification via REST API or local JWT/RSA signature validation
Universal document parsing for Office, PDF, and image formats
Upload large files (PDF, images) for Gemini AI calls. Auto-detects backend: GCS for Vertex AI (ADC), or AI Studio Files API (API key). Returns file URI for use in multimodal AI requests.
Generic GCS operations for AILANG services. Download objects to temp files, initiate resumable uploads (returns pre-authenticated URL for direct client upload), validate and parse gs:// URIs.
Smoke-test dependent of sunholo/test_pkg — exists solely to be bumped by the autonomous cascade in M-PKG-AUTONOMOUS-CASCADE-SAFE smoke tests. Not for production use.