New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@cellar-door/langchain

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cellar-door/langchain

LangChain integration for cellar-door EXIT and ENTRY — verifiable agent departure and arrival markers

Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
7
75%
Maintainers
1
Weekly downloads
 
Created
Source

@cellar-door/langchain

LangChain integration for cellar-door-exit and cellar-door-entry — cryptographically signed, verifiable agent departure and arrival markers.

Part of the EXIT Protocol.

Installation

npm install @cellar-door/langchain @langchain/core cellar-door-exit cellar-door-entry

EXIT Tools

Exit Tool

import { createExitTool } from "@cellar-door/langchain";

const tool = createExitTool();
// Use with any LangChain agent — creates signed EXIT markers

Exit Callback Handler

import { ExitCallbackHandler } from "@cellar-door/langchain";

const handler = new ExitCallbackHandler({
  origin: "my-app",
  onMarker: (marker) => console.log("Departed:", marker.id),
});

const result = await chain.invoke(input, { callbacks: [handler] });

ENTRY Tools

Entry Tool — Verify and Create Arrival

import { createEntryTool } from "@cellar-door/langchain";

const entryTool = createEntryTool();
// Agent calls with { exitMarkerJson, destination }
// Returns signed arrival marker with continuity verification

Admission Policy Tool

import { createAdmissionPolicyTool } from "@cellar-door/langchain";

const admissionTool = createAdmissionPolicyTool();
// Agent calls with { exitMarkerJson, policy: "OPEN_DOOR" | "STRICT" | "EMERGENCY_ONLY" }

Transfer Verification Tool

import { createTransferVerificationTool } from "@cellar-door/langchain";

const transferTool = createTransferVerificationTool();
// Agent calls with { exitMarkerJson, arrivalMarkerJson }
// Returns { verified, transferTime, errors, continuity }

Callback Handler with Arrival

import { ExitCallbackHandler } from "@cellar-door/langchain";

const handler = new ExitCallbackHandler({
  origin: "platform-a",
  arrivalDestination: "platform-b", // Automatically create arrivals too
  onMarker: (marker) => console.log("EXIT:", marker.id),
  onArrival: (arrival) => console.log("ARRIVAL:", arrival.id),
});

// handler.markers — all EXIT markers
// handler.arrivals — all ARRIVAL markers
// handler.recordArrival(exitJson, dest?) — manually trigger entry

API

EXIT

  • createExitTool(opts?)DynamicStructuredTool for creating EXIT markers
  • ExitCallbackHandler — Callback handler for automatic EXIT (and optionally ENTRY) markers

ENTRY

  • createEntryTool() — Tool to verify EXIT + create arrival
  • createAdmissionPolicyTool() — Tool to evaluate admission policies
  • createTransferVerificationTool() — Tool to verify EXIT→ENTRY transfers

⚠️ Disclaimer

WARNING: Automated admission decisions should be reviewed by platform operators. This integration does not constitute legal advice. Platforms are responsible for their own admission policies and the consequences of admitting agents.

License

Apache-2.0

Keywords

exit-protocol

FAQs

Package last updated on 23 Feb 2026

Related posts