1 stable release

new 2.4.1 Apr 7, 2026

#827 in Database interfaces

GPL-3.0 license

58KB
1.5K SLoC

briefcase-node

Rust crate that provides Node.js native bindings for Briefcase AI via N-API.

This package currently exports a focused compatibility surface:

  • init
  • getVersion
  • getAuthor
  • parseValidationResponse
  • hasPermission
  • SimpleInput
  • SimpleOutput
  • SimpleDecisionSnapshot
  • SimpleDriftCalculator
  • SimpleCostCalculator
  • SimpleSanitizer

Build

npm ci
npm run build-release

Quick Usage

const briefcase = require("./index.js");

const decision = new briefcase.SimpleDecisionSnapshot("classify");
const input = new briefcase.SimpleInput("prompt", "hello", "string");
const output = new briefcase.SimpleOutput("response", "hi", "string");

decision.addInput(input);
decision.addOutput(output);
decision.addTag("env", "test");

console.log(briefcase.getVersion());
console.log(decision.toJson());

Notes

The higher-level JavaScript package distributed to npm is briefcase-wasm. This crate is the Rust/N-API bindings package used in the monorepo release flow.

Dependencies

~9–13MB
~230K SLoC