-
Notifications
You must be signed in to change notification settings - Fork 0
JavaScript SDK
kadubon edited this page Jun 21, 2026
·
4 revisions
The package can be used from JavaScript and TypeScript without running the CLI.
import {
buildPhaseAccelerationPlan,
buildRuntimeStep,
compileTrc,
phaseAccelerationCompactPayload,
runAgentCheck,
runAgentIntake,
schemaBundle,
schemaByType,
validateData,
verifyPortabilityManifest,
} from "percolation-inversion-compiler-ts";import { runAgentCheck } from "percolation-inversion-compiler-ts";
const report = runAgentCheck(
{ agent_output: "Candidate packet: preserve residuals." },
true,
);
console.log(report.accepted);
console.log(report.workflow_usable);
console.log(report.settled);Do not treat accepted=true or workflow_usable=true as settlement. Read settled, missing_obligations, and residual fields.
import { buildRuntimeStep } from "percolation-inversion-compiler-ts";
const report = buildRuntimeStep({
state: { state_id: "local-runtime" },
input: { step_id: "step-1" },
agentOutput: "Candidate packet: preserve residuals.",
});
console.log(report.agent_output_digest);
console.log(report.settled);In v0.4.5, the SDK runtime digest uses sha256:<64 hex characters>.
import { schemaByType } from "percolation-inversion-compiler-ts/schema";
const schema = schemaByType("PhaseAccelerationPlan");import { createAgentMessage } from "percolation-inversion-compiler-ts/agent/messages";
const message = createAgentMessage({
sender: "agent-a",
text: "Candidate packet: preserve residuals.",
});Agent messages are local JSON envelopes. They are not external message sending authority.
import { packetEnvelopeFromRuntimeReport } from "percolation-inversion-compiler-ts/packet";
const packet = packetEnvelopeFromRuntimeReport({
accepted: true,
report_id: "runtime-step:local",
residual_ledger: { coordinates: {} },
settled: false,
});Packet APIs preserve candidate status. They do not promote packet content to settled truth.
- Home
- Quickstart
- Getting Started
- Acceleration Measurement
- Operation Guide
- AFST Satisfaction Flux
- Python TypeScript Compatibility
- Security
- Node Only Agent Loop
- ASI Proxy Loop v0.9
- Token Reports and Agent Loop
- ASI Proxy Acceleration
- CCR Interop
- MCP And A2A Safety
- Operation Gate
- Phase Ecology Lab
- CLI Recipes
- JavaScript SDK
- Diagnostic Commands
- How To Read The JSON
- Agent Guide
- Agent Messages and Packets
- Schemas and Conformance
- Safety and Limits
- Compatibility With Python
- npm Package and Release Checks
- Use Cases
- Core Concepts
- Concepts in Plain Language
- What PIC Does Not Do
- Theory Map
- Glossary
- FAQ
- v1.1 Release Notes
- v0.9.0 Release Notes
- v0.8.0 Release Notes
- v0.7.0 Release Notes
- v0.6.0 Release Notes
- v0.5.0 Release Notes