npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@eddacraft/kindling-adapter-opencode

v0.1.2

Published

OpenCode session adapter for Kindling - capture tool calls, commands, and file changes from AI coding sessions

Readme

@eddacraft/kindling-adapter-opencode

OpenCode session adapter for Kindling - capture tool calls, commands, and file changes from AI coding sessions.

npm version License

Installation

npm install @eddacraft/kindling-adapter-opencode

Overview

Captures observations from OpenCode development sessions for local memory and continuity.

What is Captured

The OpenCode adapter automatically captures the following types of events from your development sessions:

Tool Calls

  • Tool name and arguments
  • Results or errors
  • Duration (execution time)
  • Timestamp

Command Execution

  • Command text (e.g., git status, npm test)
  • Exit code
  • stdout and stderr output
  • Working directory

File Changes

  • File paths modified
  • Diff content (additions/deletions)
  • Change summary (lines added/deleted)

Errors

  • Error message
  • Stack trace preview
  • Error source (runtime, validation, etc.)

Messages

  • User messages (prompts, questions)
  • Assistant messages (responses, explanations)
  • Message length and model used

What is NOT Captured

Session lifecycle events (session_start, session_end) are skipped - they are used to manage capsules but not stored as observations.

Safety & Privacy

Automatic Redaction

The adapter automatically detects and redacts sensitive information:

  • API keys, tokens, passwords: Patterns like api_key=, token:, password= are detected and values replaced with [REDACTED]
  • AWS credentials: AWS secret access keys are masked
  • Bearer/Basic auth: Authorization headers are sanitized
  • Long secret-like strings: 32+ character alphanumeric strings with mixed letters/numbers are flagged as potential tokens

Excluded Files

The following file paths are automatically excluded from capture:

  • node_modules/ directories
  • .git/ directories
  • .env files
  • .pem, .key certificate files
  • Files containing credentials or secrets in the path

Content Truncation

Large outputs are automatically truncated to 50,000 characters to prevent excessive storage usage. A truncation notice is appended when content is shortened.

Usage

Starting a Session

import { SessionManager } from '@eddacraft/kindling-adapter-opencode';
import { SqliteKindlingStore, initializeDatabase } from '@eddacraft/kindling-store-sqlite';

// Initialize store
const db = initializeDatabase(':memory:');
const store = new SqliteKindlingStore(db);

// Create session manager
const manager = new SessionManager(store);

// Start session
const context = manager.onSessionStart({
  sessionId: 'session-123',
  intent: 'Fix authentication bug',
  repoId: '/home/user/my-project',
});

Processing Events

// Process tool call event
manager.onEvent({
  type: 'tool_call',
  timestamp: Date.now(),
  sessionId: 'session-123',
  toolName: 'read_file',
  args: { path: 'src/auth.ts' },
  result: 'file contents...',
});

// Process command event
manager.onEvent({
  type: 'command',
  timestamp: Date.now(),
  sessionId: 'session-123',
  command: 'npm test',
  exitCode: 0,
  stdout: 'All tests passed',
});

Ending a Session

// End session with optional summary
manager.onSessionEnd('session-123', {
  reason: 'completed',
  summaryContent: 'Fixed JWT validation in auth middleware',
  summaryConfidence: 0.9,
});

Content Filtering

import { filterContent, truncateContent, maskSecrets } from '@eddacraft/kindling-adapter-opencode';

// Apply all safety filters
const filtered = filterContent(content, {
  maxLength: 10000,
  maskSecrets: true,
  showTruncationNotice: true,
});

// Just truncate
const truncated = truncateContent(longContent, { maxLength: 5000 });

// Just mask secrets
const masked = maskSecrets(contentWithSecrets);

Configuration

Currently, safety filters are applied by default and cannot be disabled. Future versions may add opt-in/opt-out configuration.

Data Storage

All captured observations are stored locally in SQLite via @eddacraft/kindling-store-sqlite. No data is sent to external services.

Observations are:

  • Deterministically ordered by timestamp and sequence number
  • Scoped to session, repository, agent, and user
  • Queryable via full-text search and filters
  • Redactable after capture if needed

Privacy Considerations

What you should know:

  1. Local only: All data stays on your machine in a local SQLite database
  2. Automatic sanitization: Sensitive data is detected and redacted automatically
  3. Manual review: You can inspect and redact observations after capture
  4. Export/forget: Observations can be exported or permanently deleted

What you should check:

  • Review captured observations periodically for accidentally captured secrets
  • Use /memory forget <id> to redact specific observations
  • Consider excluding sensitive repositories from capture

License

Apache-2.0