New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@kweaver-ai/bkn

Package Overview
Dependencies
Maintainers
6
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kweaver-ai/bkn

BKN SDK - Parse, validate, and transform Business Knowledge Network files

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
0
Maintainers
6
Weekly downloads
 
Created
Source

BKN TypeScript SDK

Parse, validate, and transform BKN (Business Knowledge Network) files.

Installation

From npm (after publish):

npm install @kweaver-ai/bkn

From this monorepo (development):

cd sdk/typescript
npm install
npm run build

Usage

import {
  loadNetwork,
  parseBkn,
  validateNetwork,
  generateChecksum,
  verifyChecksum,
} from "@kweaver-ai/bkn";

// Load a network directory (auto-discovers network.bkn)
const network = await loadNetwork("examples/k8s-network");

// Parse a single file
const doc = parseBkn(text, { sourcePath: "path/to/file.bkn" });

// Validate network data tables
const result = validateNetwork(network);
if (!result.ok) {
  console.error(result.errors);
}

// Generate and verify checksum
await generateChecksum("examples/k8s-network");
const { ok, errors } = await verifyChecksum("examples/k8s-network");

API

  • parseBkn(text, options?) — Parse .bkn/.bknd text into BknDocument
  • loadBknFile(path, options?) — Load and parse a single file
  • loadNetwork(pathOrDir, options?) — Load network with includes
  • discoverRootFile(directory) — Find network root file
  • validateDocument(doc, options?) — Validate document structure
  • validateNetwork(network, options?) — Validate all data tables
  • validateDataTable(table, schema?, network?) — Validate a data table
  • generateChecksum(path, options?) — Generate CHECKSUM file
  • verifyChecksum(path, options?) — Verify CHECKSUM file
  • packToTar(sourceDir, outputPath, options?) — Pack BKN directory to tar (macOS: COPYFILE_DISABLE=1)

Compatibility

  • strict: Follow spec canonical forms
  • compat: Accept example drift (type: knowledge_network, Affect Object → Scope of Impact, etc.)

Tests

npm test

Keywords

bkn

FAQs

Package last updated on 30 Mar 2026

Related posts