Phaseline by VERIFYGet the checker
Tutorial Install & CLI

Install the Phaseline CLI

Install a pinned release, create a contract and check it locally or in CI.

Install in a project

Use Node.js 22 or newer. Start in a directory with a package.json, or run npm init -y in an empty directory. The scoped package is public on npm. No sign-in is needed. For a new JavaScript or TypeScript application, use the Apache-2.0 library below.

npm install --save-dev --save-exact @verifyrun/phaseline@0.4.1
npx --no-install phaseline --version
npx --no-install phaseline init inquiry

Version 0.4.1 creates two editions, an observer program, an observed case and a set of possible histories in a new directory. It refuses to overwrite an existing directory. Edit these files to change the subject, or choose a named template. The sensor example below uses a second directory.

Use Phaseline in an application

Stable 0.4.1 ships the command line. For the JavaScript import, TypeScript definitions and dated approvals, install the public Apache-2.0 prerelease 0.5.0-rc.54 in a new project. Save it as a runtime dependency so production installs include it.

npm init -y
npm install --save-exact @verifyrun/phaseline@0.5.0-rc.54
npx --no-install phaseline init inquiry
node --input-type=module -e "import {gate} from '@verifyrun/phaseline'; import {readFileSync as read} from 'node:fs'; console.log(gate(read('inquiry/proposed.phase','utf8'), JSON.parse(read('inquiry/records.json','utf8')), 'rely'))"

The example prints false because the reviewer’s evidence is missing. Checking retain_record on the same case returns true. Use original effective and recorded times when deciding whether an approval was in force. Commit the lockfile and use npm ci --omit=dev to restore the runtime.

Release, license and downloads · Run a source-backed discovery example in Python.

Can an average establish a peak?

npx --no-install phaseline init sensors plant
npx --no-install phaseline analyze sensors/proposed.phase sensors/observer.phase sensors/histories.json

Both runs report a mean of 20. One stayed at 20. The other reached 30. The checker returns those two histories and identifies trace.peak as the observation that resolves the question. An evidence cost of 3 uses the units declared in this model. Run the same example in the browser.

The original 0.1.0 starter created a paid-seat example. Existing files keep their rules after a package upgrade. Check npx --no-install phaseline --version and choose a fresh directory to try one of the current examples.

Start with a question

npx --no-install phaseline analyze inquiry/proposed.phase inquiry/observer.phase inquiry/histories.json

Can you rely on a record once you know its identity? The proposed edition also requires review. A reviewed record and an unreviewed record look identical to someone who sees only the identity. The result gives both histories and the first observation that separates them. In observer.phase, lower the budget to 1 to see the same observation become unaffordable. Remove all offers to see which histories remain indistinguishable.

Change the rule, then check an actual record

npx --no-install phaseline compare inquiry/issued.phase inquiry/proposed.phase
npx --no-install phaseline decide inquiry/proposed.phase inquiry/records.json

The proposed edition changes rely when identity is established and review is outstanding. On the supplied record, review is unknown. Reliance waits. The independent rule for retaining the record still applies. Inspect the distinction in the browser.

Check a release in CI

npm ci
npx --no-install phaseline check inquiry/issued.phase inquiry/proposed.phase

Commit your lockfile. Protect the issued edition and have your release system enforce the exit code. 0 means declared outcomes and bindings agree within the supported domain. 2 means review. 1 means the check could not complete. The sample returns 2.

Check the memory a rule needs

npx --no-install phaseline init records retention
npx --no-install phaseline retain records/issued.phase records/regime.json records/proposed.phase

The results include the state table, its fixed-width bit count, the first future action that exposes a lost distinction in this example, and the cost of recovering it. Read the result and vary the inputs.

Run the checks shipped with the package

node node_modules/@verifyrun/phaseline/contract-check.mjs
node node_modules/@verifyrun/phaseline/inquiry-check.mjs
node node_modules/@verifyrun/phaseline/retention-check.mjs
node node_modules/@verifyrun/phaseline/carry-check.mjs

Use standalone files

Download the checker ZIP, extract it and run node phase.mjs --help or node inquiry-check.mjs in the extracted directory. The CLI and browser share the evaluator.

Carry an issued record into a new regime

npx --no-install phaseline init handoff carry
cd handoff
npx --no-install phaseline book old.phase old.json > old-book.json
npx --no-install phaseline book new.phase new.json > new-book.json
npx --no-install phaseline capture old-book.json at-issue.json > receipt.json
npx --no-install phaseline carry old-book.json new-book.json receipt.json bridge.json trust.json at-review.json

The signed example covers one reservation. The revised receipt identifies its predecessor, the authorization, the evidence used and the total observation spend. The book’s class table gives the answers and their permitted continuations. Exit 0 means a code was obtained, 2 means hold and 1 means invalid input. A hold can include a named source and the owner who can supply it.

In your own project, provision the authority’s Ed25519 public key independently and supply its current correspondence. A bridge names both codebooks, the approved predecessor receipt, the time interval and all admissible successors of each relevant old history. Its signature covers the canonical JSON returned as bytes by bridgeBytes in carry.mjs. The issuer is responsible for completeness. The CLI evaluates supplied records offline. Authentication of source records, current revocation, durable accounting across retries and delivery belong to the integrating system.

JSON numbers used as integers must be exact safe integers. Equivalent spellings such as 1.0 and 1e0 are accepted. A fraction that rounds to an integer stops the check.