@aria_asi/harness-http-client
v0.1.3
Published
HTTP client for Aria's canonical harness — injects live cognitive state + plan context into LLM calls. Full control plane with output validation, pre-action gates, 8-lens cognition, and garden memory.
Readme
Aria Harness HTTP Client
What This Is
@aria_asi/harness-http-client is the small SDK and runtime discipline pack that binds an LLM, agent, CLI, worker, or app to Aria's harness control plane.
It is not a prompt template. It gives the model the right context at the start of work, checks risky actions before they run, validates output before completion claims, and writes outcomes back so the next context window learns from what happened.
Customer Mental Model
The harness works as a control plane around your model:
- The model stays the renderer and executor for the current turn.
- Aria provides continuity, doctrine, memory, decision rules, and quality gates.
- The SDK fetches the live harness packet and injects it into the model's working context.
- The SDK checks actions before they mutate state.
- The SDK validates outputs before the model claims work is complete.
- The SDK writes governance outcomes back to Garden memory so future turns start smarter.
This lets a short-context model behave like it has persistent memory and operational discipline without pretending the model weights remembered anything.
LLM Session Learning Contract
Every harness-bound session should learn this file before the first non-trivial action and after any context reset, compaction, gate block, or repeated drift.
Required session-start order:
- Read the surface-specific
ARIA_MUST_READ.mdfile if present. - Read this README or the installed copy at
~/.aria/HARNESS_README.md. - Fetch a live harness packet with
getHarnessPacket()orgetBoundHarnessAndPrompt(). - Hydrate Garden continuity with
hydrateGardenContinuity()orrunWithGovernance(). - Proceed only after the model can state the current goal, constraints, evidence already known, and next measurable predicate.
Required context-refresh triggers:
- A new context window starts.
- The assistant is compacted or summarized.
- A governance, skill, action, or output gate blocks.
- The task crosses from planning into mutation, deploy, publish, or customer-facing reporting.
- The assistant discovers a defect, missing evidence, or package/runtime drift.
- More than one substantial tool sequence has happened since the last harness packet.
During a long turn, refresh learning at phase boundaries instead of relying on stale memory. The safe loop is: read current obligation state, fetch or reuse a fresh-enough harness packet, run the next action, validate the result, then write the outcome.
Core APIs
import {
HTTPHarnessClient,
getBoundHarnessAndPrompt,
runWithGovernance,
} from '@aria_asi/harness-http-client';Use HTTPHarnessClient when you need direct control over packet fetches, action checks, output validation, Garden continuity, or governance outcome writes.
Use runWithGovernance() when you want one wrapper to hydrate continuity, run a cognition-bound action, validate output, and persist the result.
Minimum Correct Integration
A consumer is harness-bound only when all of these are true:
- It fetches and injects a live harness packet before non-trivial model work.
- It checks risky actions before executing them.
- It validates output before completion claims.
- It records discovered obligations until fixed and verified.
- It writes outcomes back to Garden or an equivalent durable governance ledger.
Packet injection alone is not enough. A package that only prepends context but never gates actions or validates output is not fully harness-bound.
Installed Runtime Files
When installed, the package writes universal runtime guidance and CLIs under ~/.aria:
~/.aria/ARIA_MUST_READ.mdgives the shortest mandatory startup contract.~/.aria/HARNESS_README.mdis the customer and LLM learning guide copied from this README.~/.aria/bin/aria-governance-gateblocks unresolved obligations and missing doctrine-triggered skills.~/.aria/bin/aria-write-deploy-justificationand~/.aria/bin/aria-verify-deploy-justificationprovide runtime-agnostic deploy justification.~/.aria/bin/aria-first-class-compliancechecks first-class runtime surface contracts.
Surfaces such as Codex and OpenCode also receive their own ARIA_MUST_READ.md copy when their config directories exist.
Customer Setup
npm install @aria_asi/harness-http-clientSet these environment variables for a private control plane:
ARIA_RUNTIME_URL=https://harness.yourcompany.com
ARIA_HARNESS_TOKEN=<tenant-or-owner-token>Then wire the SDK into your agent loop or use the packaged governance CLIs from hooks.
Operational Rule
Truth beats smoothness. If the harness blocks, the correct response is to load the missing learning, fix the source issue, or record and resolve the obligation. Do not weaken the gate, remove the field, strip the output, or claim readiness without evidence.
