Skip to content

Getting Started

kadubon edited this page Jun 21, 2026 · 6 revisions

Getting Started

percolation-inversion-compiler-ts is a Node.js package. It is intended for JavaScript and TypeScript projects that need local, deterministic JSON reports from AI agent output.

Requirements

  • Node.js 20 or newer.
  • npm, pnpm, yarn, or another package manager that can install npm packages.
  • Python is not required for normal npm use.

Install In A Project

npm install percolation-inversion-compiler-ts

Then run:

npx pic-ts demo installed-smoke

If this returns JSON with accepted=true and settled=false, the package is installed and the safety boundary is working as expected.

Use In npm Scripts

Add commands to package.json:

{
  "scripts": {
    "agent:check": "pic-ts agent check --compact --profile development",
    "phase:plan": "pic-ts phase plan --compact --profile development"
  }
}

Then run:

npm run agent:check -- --text "Candidate packet: preserve residuals."
npm run phase:plan -- --text "Candidate packet: preserve residuals."

Use In CI

The CLI prints JSON by default. That makes it easy for CI jobs to save reports as artifacts.

npx pic-ts agent check --compact --text "Candidate packet: preserve residuals." --output agent-check.json
npx pic-ts schema --type PhaseAccelerationPlan --output phase-plan.schema.json

Use As A Library

import { runAgentCheck, schemaByType } from "percolation-inversion-compiler-ts";

const report = runAgentCheck(
  { agent_output: "Candidate packet: preserve residuals." },
  true,
);

const schema = schemaByType("PhaseAccelerationPlan");

See JavaScript SDK for more examples.

Canonical Reference

The Python package remains canonical for the project as a whole:

This npm package follows the public JSON, CLI, schema, conformance, and safety semantics of Python v0.4.4 where they are part of the TypeScript compatibility target.

Clone this wiki locally