Skip to content

kadubon/percolation-inversion-compiler-ts

Repository files navigation

percolation-inversion-compiler-ts

PIC-TS is the Node.js and TypeScript runtime for Percolation Inversion Compiler checks. It reads bounded JSON, emits deterministic protocol-relative reports, measures resource-matched capability formation, and provides an explicit approval-bound operation path. It does not prove real ASI, grant legal authority, or prove an unobserved physical result.

pic-ts: recommended for npm and Node.js projects. The package also exposes a pic alias, but use pic-ts to avoid command-name ambiguity when the Python package is installed on the same host.

Five-Minute Check-Only Quickstart

npm install percolation-inversion-compiler-ts@1.1.0
npx pic-ts agent check --compact
npx pic-ts demo bootstrap --output-dir .pic-demo --overwrite
npx pic-ts runtime step --state .pic-demo/runtime_state.json --input .pic-demo/runtime_step_input.json
npx pic-ts afst check --case .pic-demo/afst/minimal_accepted.json --compact

These commands inspect inert data. They do not execute packet text, dispatch a provider, grant shell authority, or mark physical outcomes as proven. Installed CLI and SDK examples do not depend on a cloned repository.

Source-checkout examples use examples/...; generated installed examples use .pic-demo/....

Verified Capability Formation

PIC-TS uses the same two decisions as Python PIC:

  1. accepted=true records a finite positive structural lower bound under a matching resource and observation contract.
  2. acceleration_metrics_certified=true additionally requires paired baseline and candidate measurements, a fixed horizon, one stopping rule, evidence, no metric regression beyond tolerance, and at least one strict improvement.

Both fields must be true before a result is used as evidence of an ASI-proxy acceleration mechanism. This remains a finite workflow claim, not real ASI.

npx pic-ts runtime compare \
  --baseline examples/runtime_acceleration/baseline.json \
  --candidate examples/runtime_acceleration/candidate.json

npx pic-ts runtime certify-acceleration \
  --baseline examples/runtime_acceleration/baseline.json \
  --candidate examples/runtime_acceleration/candidate.json

The measured directions are explicit: higher verification yield, receiver reuse, and certified capital gain; lower time-to-verified, residual half-life, resource cost, and absolute error correlation.

Six Theory Systems

System Runtime role Fail-closed boundary
ECPT capability packet and path formation candidate count and agent count are not positive progress
BIT bottleneck inversion positive gain requires a unit-typed evidence witness
TRC finite typed traces readiness, dispatch, and observed outcome stay separate
SQOT attention and verification queues unknown costs remain unknown
ALT reusable abstraction capital self-reported lift is rechecked
AFST satisfaction-flux diagnostics no dispatch, consent bypass, or phase promotion

Real-World Operation Dry Run

Normal check, AFST, phase, and runtime commands never dispatch operations. Operation handling is isolated in adapter-check -> plan -> preflight -> approve -> dispatch -> verify -> reconcile.

npx pic-ts operation adapter-check --manifest examples/operation/https_readonly.adapter.json
npx pic-ts operation plan --manifest examples/operation/https_readonly.adapter.json --request examples/operation/https_readonly.request.json --output operation-plan.json

Planning is non-executing. Dispatch requires a digest-bound plan, fresh scoped Ed25519 approvals, an unused nonce, adapter restrictions, and exact body or process digests. A dispatch receipt is not physical outcome evidence. physical_outcome_proven remains false. Read Operation security before enabling dispatch.

JavaScript And TypeScript SDK

import {
  certifyRuntimeAcceleration,
  type RuntimeRunReport,
} from "percolation-inversion-compiler-ts/runtime";

const certificate = certifyRuntimeAcceleration(
  baseline as RuntimeRunReport,
  candidate as RuntimeRunReport,
);

const usable =
  certificate.accepted && certificate.acceleration_metrics_certified;

Public subpaths include ./schema, ./agent/messages, ./packet, ./phase-lab, ./bit-engine, ./sqot-controller, ./alt-lift, ./trc-adapter, ./operation, ./runtime, ./afst, and ./interop/ccr.

Common Workflows

npx pic-ts alt ecpt-lift --packets examples/alt_lift/alt_ecpt_lift.example.json
npx pic-ts trc trace-normalize --input examples/asi_proxy_benchmark_bundle/trc_agent_trace.json
npx pic-ts phase plan --request .pic-demo/asi_proxy_phase_request.json --compact
npx pic-ts afst emit-ccr-tasks --report afst-report.json

Python package remains the canonical semantic implementation. PIC-TS mirrors its public decision contract, residual kinds, non-claim flags, schema records, operation digests, and acceleration normal form. The contract pack is contracts/v1.1/pic-cross-language-contract.json.

How To Read Reports

Field Meaning
accepted finite checks for the declared protocol passed
finite_checks_passed bounded checker execution completed successfully
operationally_usable stricter routing conditions passed; not settlement
acceleration_metrics_certified paired direction-aware measurements passed
settled complete scoped settlement; normally false
residuals / residual_ledger unresolved work that must not be erased

Unknown required values cause abstention. Numeric strings, string booleans, NaN, Infinity, negative zero, oversized files, deep structures, and excessive JSONL input are rejected at public boundaries.

Safety Limits

PIC-TS does not:

  • prove real ASI, consciousness, model-weight change, legal identity, or physical/oracle truth;
  • convert missing values to zero or self-reported lift to certified capital;
  • execute trace content, packet content, or safe-command hints;
  • treat operation readiness, provider dispatch readiness, a receipt, or raw candidate volume as an observed outcome;
  • override consent, refusal, contracts, provider policy, or host controls.

Documentation

Development And Publishing Checks

npm ci
npm run typecheck
npm run lint
npm run format:check
npm run test
npm run conformance
npm run pack:check
npm run publint
npm run attw
npm run installed:smoke
npm audit --audit-level=high

Search terms: percolation inversion compiler, PIC-TS, TypeScript AI agent runtime, Node agent checker, collective intelligence, multi-agent systems, ECPT, BIT, TRC, SQOT, ALT, AFST, capability packets, residual ledger, resource-matched acceleration, verifier routing, typed trace, operation approval, Ed25519, SSRF protection, ASI-proxy phase-control.

License

Apache-2.0. See LICENSE and NOTICE.