🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@peac/capture-node

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peac/capture-node

Node.js durable storage for PEAC capture pipeline (filesystem spool store and dedupe index)

next
latest
Source
npmnpm
Version
0.16.4
Version published
Weekly downloads
58
-78.68%
Maintainers
1
Weekly downloads
 
Created
Source

@peac/capture-node

Node.js durable storage for the PEAC capture pipeline. Filesystem-backed spool store and dedupe index.

Installation

pnpm add @peac/capture-node

What It Does

@peac/capture-node provides filesystem-backed implementations of the SpoolStore and DedupeIndex interfaces from @peac/capture-core. It handles durable JSONL spool files with fsync-based commit semantics, lockfile-based single-writer guards, corruption detection with read-only fallback, and hard-cap size limits.

How Do I Use It?

Create durable storage for a capture session

import { createFsSpoolStore, createFsDedupeIndex } from '@peac/capture-node';
import { createCaptureSession, createHasher } from '@peac/capture-core';

const store = await createFsSpoolStore({
  filePath: '/var/peac/spool.jsonl',
  autoCommitIntervalMs: 5000,
});

const dedupe = await createFsDedupeIndex({
  filePath: '/var/peac/dedupe.idx',
});

const session = createCaptureSession({
  store,
  dedupe,
  hasher: createHasher(),
});

Check spool diagnostics

import { getFsSpoolDiagnostics } from '@peac/capture-node';

const diag = getFsSpoolDiagnostics(store);
console.log(diag.mode); // 'active' or 'read_only'
console.log(diag.entryCount, diag.fileBytes);

Acquire an explicit lockfile

import { acquireLock } from '@peac/capture-node';

const lock = await acquireLock('/var/peac/spool.jsonl.lock', {
  allowStaleLockBreak: true,
});
// ... perform exclusive work ...
await lock.release();

Integrates With

  • @peac/capture-core: Core capture pipeline types and session orchestration
  • @peac/schema (Layer 1): Interaction evidence schemas
  • @peac/mcp-server (Layer 5): MCP tool server that uses capture for evidence recording

For Agent Developers

If you are building an AI agent or MCP server that needs evidence receipts:

  • Start with @peac/mcp-server for a ready-to-use MCP tool server
  • Use @peac/protocol for programmatic receipt issuance and verification
  • See the llms.txt for a concise overview

License

Apache-2.0

PEAC Protocol is an open source project stewarded by Originary and community contributors.

Docs | GitHub | Originary

Keywords

peac

FAQs

Package last updated on 09 Aug 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts