Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt

Use this file to discover all available pages before exploring further.

After the first-pass parity update the following operator-facing surfaces shipped in commits 2490269 + 964228e. Composite Pega-parity composite mean lifted 9.05 → ~9.55 strict / ~9.65 fair across both passes. Only #29 (multi-region 2-region deploy verification) remains open.

#36 polish — four small dim lifts

3.4 Stage skip-reasons tally

Backend route exposing per-tenant top-N “why did the gate skip this offer?” leaderboard, aggregating DecisionTrace.qualificationResults over a configurable window.
GET /api/v1/decisioning-gates/skip-reasons?windowHours=24&topN=10
Bounded scan (5000 most-recent traces). Pure aggregator at lib/qualification/skip-reasons-tally.ts. Auth: tenant + admin. Each tally entry: { reason, count, share, exampleOfferIds (≤5), ruleTypes (≤3), stages (≤3) }. Operator-pending UI: the inline tab on /studio/qualification-rules is roadmap; the route is callable today via the SDK / CLI / Postman.

3.5 ContactPolicy.appliesAcross

The cross_channel_cap rule type now honours an optional config.appliesAcross channel-id list:
{
  "ruleType": "cross_channel_cap",
  "config": {
    "periodType": "daily",
    "maxTotal": 3,
    "appliesAcross": ["email", "sms"]
  }
}
Empty / omitted = legacy behaviour (all channels). See Contact policies — cross_channel_cap.

3.11 explainCascade aggregate route

Backend route returning the qualification-rule cascade trace for every active offer in the tenant — the aggregate operators needed for “which tenant rule rolls down to which offer?” without iterating per offer.
GET /api/v1/qualification-rules/cascades?limit=100
Reuses lib/effective-rules.ts getEffectiveRules(..., { explainCascade: true, inheritanceMode: "deduped" }) per offer. Operator-pending UI: inline tab on /studio/qualification-rules calling this route is roadmap.

3.13 Variant uplift micro-card

Per-creative observational uplift via the existing two-proportion z-test (lib/experimentation/uplift.ts).
GET /api/v1/treatments/uplift?offerId=<id>&windowDays=30&minSamples=50
Treatment = customers who saw THIS creative; holdout = customers who saw the offer but a DIFFERENT creative. Each card carries samplesBelowMinimum: true when the cohort is too small for a trustworthy read. Honest scope: observational, not a randomized controlled trial — operators wanting RCT semantics use the existing Experiment model.

#32 — transform runtime adapter stubs

Four W16 transforms now have HTTP-pointed runtime adapters under lib/flow/runtime/transforms/external-model-call.ts:
TransformEndpoint envBearer env
vector_embedVECTOR_EMBED_ENDPOINTVECTOR_EMBED_BEARER
geo_resolveGEO_RESOLVE_ENDPOINTGEO_RESOLVE_BEARER
sentiment_scoreSENTIMENT_SCORE_ENDPOINTSENTIMENT_SCORE_BEARER
language_detectLANGUAGE_DETECT_ENDPOINTLANGUAGE_DETECT_BEARER
Discipline:
  • SSRF-validated outbound via lib/security/url-validator.ts.
  • 5-second per-call timeout.
  • Five structured failure codes: MissingExternalModelEndpointError (env unset), ExternalModelAdapterError (non-2xx / non-JSON / SSRF reject / timeout). Each pipeline run surfaces the failure code instead of silently emitting null.
  • Per-kind convenience wrappers (vectorEmbed(text), geoResolve(address), sentimentScore(text), languageDetect(text)) that probe common vendor response shapes.
Operator-pending wiring: configure the endpoint env vars on the runtime container. Until then every adapter throws MissingExternalModelEndpointError with the env-var hint baked into the message.

#31 — Unified coming-soon connector stub

Every entry in COMING_SOON_CONNECTORS (26 connectors) now has a registered stub executor. getConnectorExecutor(type) NEVER returns undefined for a registered connector — pipelines fail loudly with a canonical error instead of silently degrading:
coming_soon:<type>: vendor account required. Configure
<TYPE>_API_KEY (or vendor-specific equivalent) and replace the
coming-soon stub with a real executor under
platform/src/lib/connector-executors/.
HTTP status 503. The error prefix coming_soon: is exported as COMING_SOON_ERROR_MESSAGE_PREFIX for downstream callers that want to detect it. Operator-pending wiring: swap the stubs out for real executors as vendor accounts come online (each takes 1-3 hours per vendor based on the existing executor patterns in lib/connector-executors/{messaging,cdp,commerce,reverse-etl,analytics,mktauto,workflow-billing}.ts).

#34 + #35 — In-repo SDK / CLI / Postman / MCP scaffolds

New top-level sdks/ directory with five packages:
PathPackageStatus
sdks/typescript/@kaireonai/sdkdependency-free TS / Node SDK; type-clean
sdks/python/kaireonaistdlib-only (urllib.request); pip install -e . works in-repo
sdks/cli/@kaireonai/clinpx kaireon CLI; JSON stdout, jq-pipe friendly
sdks/postman/Postman v2.1 collection10 highest-value endpoints; auth via collection variables
sdks/mcp-marketplace/MCP marketplace manifestproposed Anthropic MCP marketplace listing
All five share auth (X-API-Key + X-Tenant-Id, env-var defaults) and cover the same 5 endpoints: recommend, respond, negotiate, provenance, skip-reasons. Operator-pending publish steps:
  1. Split sdks/ into the dedicated kaireonai/sdks GitHub repo (operator-authorised new repo).
  2. npm publish @kaireonai/sdk, @kaireonai/cli.
  3. pip publish kaireonai.
  4. Upload sdks/postman/KaireonAI.postman_collection.json to the public KaireonAI Postman workspace.
  5. Submit sdks/mcp-marketplace/manifest.json via the Anthropic MCP marketplace intake flow.
See sdks/README.md for the index, then each package’s individual README for usage examples.

#33 — 30-day negotiation eval clearance (time-bound)

Cannot ship from code alone. The gate is the aiAnalyzerSettings.negotiation.regulatorReviewCleared tenant flag, read by lib/negotiation/realtime-apply.ts (already wired in #26). Operator flips the flag once the negotiation eval harness shows zeroViolationClearance >= 95% for 30 consecutive nights. See Negotiation apply-mode for the rollout playbook.

Final composite

Across both passes today: 9.05 → ~9.55 strict / ~9.65 fair mean across 19 in-scope dims. The remaining ascent to 10/10 is operator- driven (publish steps, vendor wiring, 30-night clearance, first 100 RPS perf baseline, multi-region #29) — no code path remains in this scope. See also: