ĀML exposes a public JavaScript API for compiling meaning-bearing interfaces, evaluating policy, producing accountability evidence, negotiating across runtimes, and verifying trust artifacts.
The repository remains the reference implementation. Import directly from index.js after cloning the repository.
import {
createInterfaceFirewall,
executeAccountableIntent,
verifyExecutionReceipt,
viewMeaning
} from "./index.js";Pure in-memory AML compilation.
Returns tokens, AST, Abstract Meaning Tree, render decisions, HTML, and related compiler structures without writing files.
Filesystem compiler. Writes browser output and accountability artifacts.
Deterministically translates constrained machine-readable intent into AML source.
Compares Abstract Meaning Trees rather than raw text lines.
Classifies meaning changes by accountability significance.
Runs identical meaning/context through two policy or profile targets and reports outcome/rationale differences.
Evaluates one AML source against multiple policy targets and surfaces agreement/disagreement per meaning-bearing node.
Builds and verifies hash-bound execution provenance.
Semantic diagnostics and compact explanation output.
Runs the accountable pipeline:
machine intent
→ generated AML
→ AST / AMT
→ policy simulations
→ selected policy/profile
→ cumulative attention enforcement
→ audit stream
→ final render
→ execution receipt
Typical usage:
const receipt = executeAccountableIntent(intent, {
profile: "human_first",
context: {
consent_granted: true,
attention_budget_remaining: 8
}
});Recomputes receipt integrity and verifies bound runtime artifacts.
Adds an Ed25519 attestation to a valid receipt.
Verifies receipt integrity, Ed25519 signature, and signer fingerprint.
Creates a reusable policy-aware interface firewall.
const firewall = createInterfaceFirewall({ profile: "human_first" });
const result = firewall.enforce(intent);
if (result.allowed) {
render(result.html);
}One-shot equivalent for applications that do not need a persistent firewall instance.
BUILTIN_POLICIESresolvePolicy(idOrPolicy)listPolicies()BUILTIN_POLICY_PROFILESresolvePolicyProfile(idOrProfile)listPolicyProfiles()composePolicies(policies, options?)policyFromProfile(profile, options?)simulatePolicies(source, targets, options?)createPolicyConsensus(results, options?)
Policy consensus supports explicit disagreement rather than flattening every policy result into one opaque Boolean.
normalizePolicyPack(pack)hashPolicyPack(pack)signPolicyPack(pack, privateKeyPem, options?)verifySignedPolicyPack(pack)
Signed policy packs are data-only references to installed policy IDs. A signature does not make a policy morally correct or universally trustworthy.
createAuditStream(options?)appendAuditEvent(stream, event)verifyAuditStream(stream)signAuditCheckpoint(stream, privateKeyPem, options?)verifyAuditCheckpoint(checkpoint, stream)
Audit streams are hash-chained and tamper-evident. They are not described as globally immutable unless an external append-only storage system provides that property.
createAttentionLedger(options?)consumeAttention(ledger, request)accountRenderDecisions(decisions, budget)enforceCumulativeAttentionBudget(decisions, budget)attentionContext(ledger)verifyAttentionLedger(ledger)attentionLedgerSummary(ledger)
Attention values are model inputs. They are not claimed to be validated objective measurements of human cognition.
createConsentLedger(options?)grantConsent(ledger, grant)revokeConsent(ledger, revocation)verifyConsentLedger(ledger)resolveConsent(ledger, scope, options?)consentContext(ledger, scopes, options?)
Consent grants can expire and be explicitly revoked.
auditAccessibilityNode(node, context?)auditAccessibilityTree(amt, context?)
Current checks include reduced-motion declarations, contrast safety, keyboard accessibility, text alternatives, and cognitive-load constraints. These APIs do not replace WCAG conformance or assistive-technology testing.
buildReceiptMerkleTree(receiptHashes)createReceiptInclusionProof(tree, index)verifyReceiptInclusionProof(proof)
These prove inclusion in a committed batch; they do not prove the truthfulness of the underlying receipt content.
negotiateCapabilities(local, remote, requirements?)
Determines whether two runtimes can exchange the required AML artifacts without silent capability downgrade.
createPolicyPassport(input)verifyPolicyPassport(passport)passportContext(passport)
Portable user/organization policy preferences can be integrity-bound and time-scoped.
hashContent(value)createContentAddressedBundle(artifacts)verifyContentAddressedBundle(bundle)
createDisclosureCommitment(claims)discloseClaims(commitment, names)verifyDisclosureProof(proof)
This is a selective-disclosure commitment mechanism, not a claim of general zero-knowledge proof capability.
createFederatedExchange(options)
Negotiates capabilities, verifies the supplied policy passport, content-addresses artifacts, and creates a wire-ready exchange object.
createCausalEvent(input)createCausalExecutionGraph(events)verifyCausalExecutionGraph(graph)
Supports multi-parent lineage across prior agents, policies, receipts, or systems.
createTrustDelegation(input)verifyTrustDelegation(delegation)verifyDelegationChain(chain)
createTransparencyLog(options?)appendTransparencyEntry(log, entry)verifyTransparencyLog(log)
createThresholdAuthorization(input, signers, options?)verifyThresholdAuthorization(authorization)
Supports M-of-N authorization by distinct Ed25519 signers.
signCapabilityToken(input, privateKeyPem, options?)verifyCapabilityToken(token, options?)
Capability tokens can bind issuer, subject, audience, scope, expiration, and nonce.
createRevocationRegistry(options?)revokeArtifact(registry, artifactHash, options?)verifyRevocationRegistry(registry)isRevoked(registry, artifactHash)
createProofCarryingInterface(input)verifyProofCarryingInterface(manifest, options?)
The manifest can bind rendered output to receipts, policy passports, provenance, conformance claims, or causal evidence.
Open-source software rights and official brand rights are separate.
signBrandAuthorization(request, privateKeyPem, options?)verifyBrandAuthorization(credential, options?)
These verify credential integrity/signature/expiry and optional revocation.
verifyBrandTrustRegistry(registry)verifyOfficialBrandAuthorization(credential, trustRegistry, options?)
verifyOfficialBrandAuthorization adds the critical second step: the signer fingerprint must be present in the canonical active ĀRU trust-root registry and must not be revoked.
A self-signed credential can be cryptographically valid while still not being an official ĀRU authorization.
The public trust registry is BRAND_TRUST_ROOTS.json. Production private key material is intentionally not stored in GitHub.
canonicalize(value)canonicalJSONStringify(value)createWireEnvelope(input)validateWireEnvelope(envelope)negotiateWireSession(local, remote, options?)createReplayGuard(options?)acceptWireEnvelope(guard, envelope, options?)
Canonical serialization and protocol vectors help independent implementations converge on the same hashes and signatures.
Creates the dependency-free reference HTTP service.
Reference endpoints include:
GET /healthGET /v1/capabilitiesPOST /v1/evaluatePOST /v1/verify-receipt- official authorization/trust verification endpoints documented in
protocol/aml-http.openapi.yaml
Production deployments still require normal authentication, authorization, transport security, rate limiting, logging, and secure key management.
evaluateAccountableProps(props)createAccountableUI(React)
These adapt ordinary React component metadata into the same accountable AML pipeline without requiring a complete application rewrite.
viewMeaning(receipt)formatMeaningReport(report)
evaluatePullRequestChange(input)formatPullRequestGate(result)
AML_CONFORMANCE_LEVELSevaluateConformanceLevel(capabilities)createConformanceClaim(input)verifyConformanceClaim(claim)
getCompletionItems(context?)getHoverInfo(symbol)getLanguageCatalog()
verifyBuildManifest(path)signBuildManifest(path, privateKeyPem, options?)verifyBuildAttestation(attestation, manifestPath?)
ethicalRenderGate(element) remains available as the inspectable baseline policy model.
The baseline equation is:
render_allowed = restoration_value >= attention_cost
This is a declared research model, not a universal ethics standard or a validated cognitive measurement.
- CLI:
bin/aml.js - Quickstart:
QUICKSTART.md - Out-of-the-box adoption:
docs/OUT_OF_THE_BOX.md - Enterprise pilot:
pilots/enterprise-30min/ - Protocol discovery:
protocol/discovery.json - Conformance:
CONFORMANCE.json - Independent replication:
REPLICATION.md - Playground: https://aruintelligence.github.io/aml-core/playground.html
- View Meaning™: https://aruintelligence.github.io/aml-core/view-meaning.html
- Official AML verification: https://aruintelligence.github.io/aml-core/official-verify.html