@moehaj/aru-sdk
v0.1.1
Published
Official SDK for the A.R.U (Automated Runtime Unit) API
Downloads
212
Readme
@moehaj/aru-sdk
Official SDK for the A.R.U (Automated Runtime Unit) API.
Submit natural language missions that are compiled, executed, and certified against constraints before delivery.
Install
npm install @moehaj/aru-sdkUsage
JavaScript
const { ARU } = require("@moehaj/aru-sdk");
const aru = new ARU("aru_live_your_key_here");
async function main() {
const result = await aru.certify("analyze BTC price action");
console.log(result.certification.status); // "CERTIFIED"
console.log(result.output);
console.log(`Done in ${result.totalTimeMs}ms`);
}
main();TypeScript
import { ARU, type Constraint, type CertifyResponse } from "@moehaj/aru-sdk";
const aru = new ARU("aru_live_your_key_here");
const constraints: Constraint[] = [
{ rule: "must include a buy or sell recommendation", severity: "hard" },
{ rule: "must mention support and resistance levels", severity: "soft" },
];
const result: CertifyResponse = await aru.certify(
"analyze BTC price action",
constraints
);
console.log(result.certification.status); // "CERTIFIED"
console.log(result.output);
// Constraint report
const report = result.certification.constraintReport;
console.log(`${report.passed.length}/${report.total} constraints passed`);API
new ARU(apiKey, options?)
| Parameter | Type | Description |
|-----------|------|-------------|
| apiKey | string | Your API key (aru_live_... or aru_sandbox_...) |
| options.baseUrl | string | Override the base URL (default: https://aru-runtime.com) |
aru.certify(intent, constraints?)
| Parameter | Type | Description |
|-----------|------|-------------|
| intent | string | Natural language description of the mission |
| constraints | Constraint[] | Optional custom constraints with rule and severity ("hard" or "soft") |
Returns a Promise<CertifyResponse> with the certified output, constraint report, and execution metadata.
License
MIT
