Skip to content
Pre-alpha / current reality

Pre-alpha. Detection is off until you configure it. SDKs are unpublished. The hosted service is not available yet. Nothing has run against production traffic.

End-to-end flow

guides / v1

1. Wrap a labelled local fixture

Build and install the local package from Quickstart, then run the validated TypeScript example below. This synthetic example asserts result identity and a deliberate bypass. It never contacts a vendor or executes a live write.

2. First evidence

The healthy default engine reports no drift because no detector was selected. The explicit loading-fault fixture produces one bypass event. Read recent metadata without treating either result as proof that an API is safe.

3. Audit artifact

The second validated snippet explicitly configures an audit tenant and capacity, runs a synthetic read, and drains the actual WASM artifact into a labelled in-memory sink. It checks the ok decision and prints the actual ID and receipt. Production hosts must persist before acknowledging delivery. This fixture has no hosted retrieval URL; a full or lost queue cannot establish durable delivery.

4. Optional review

A review case requires admitted strict-policy evidence and an explicitly configured host review port. This example does not create one. A reviewer receipt describes a human decision; it does not execute a write or release a terminal idempotency key. Production review delivery remains unavailable.

Continue

Keep configuration, call decisions and evidence separate.

import { createAgindow } from '@agindow/node';
const sdk = createAgindow({ mode: 'observe' });
await sdk.ready;
const payload = { id: 'synthetic-customer' };
let calls = 0;
const read = sdk.guard(() => { calls++; return payload; }, { tool: 'vendor.read', operation: 'read' });
const result = read();
if (result !== payload || calls !== 1) throw Error('Fixture identity changed');
// A labelled unavailable-engine fixture produces one bypass without a hosted key.
const unavailable = createAgindow({ mode: 'observe' }, async () => { throw Error('Synthetic loading fault'); });
await unavailable.ready;
const fallback = unavailable.wrap(() => payload);
if (fallback() !== payload || unavailable.recent().filter(e => e.type === 'bypass').length !== 1) throw Error('Missing bypass');
sdk.configure({ mode: 'observe' });
console.log('Synthetic fixture: original result retained; unavailable engine bypassed once.');
import { createAgindow } from '@agindow/node';
import type { AuditRecord } from '@agindow/node';
const sdk = createAgindow({ mode: 'observe', audit: { tenant: 'synthetic', capacity: 4 } });
await sdk.ready;
const payload = { id: 'synthetic-customer' };
const result = sdk.guard(() => payload, { tool: 'vendor.read', operation: 'read' })();
if (result !== payload) throw Error('Observe changed the payload');
// Synthetic, in-memory sink only. A real host must persist before acknowledging.
const artifacts: AuditRecord[] = [];
const receipt = await sdk.drainAudit(artifact => { artifacts.push(artifact); });
if (!receipt.available || receipt.delivered !== 1 || artifacts[0]?.['decision'] !== 'ok') throw Error('Missing audit evidence');
console.log('Synthetic audit receipt', receipt, artifacts[0]?.id);