@some-useful-agents/core
v0.18.0
Published
Core types, schemas, and utilities for some-useful-agents
Downloads
3,292
Readme
@some-useful-agents/core
Core library for some-useful-agents. Types, schemas, stores, DAG executor, tool registry, secrets management, and template resolution.
What's inside
- Agent types + Zod schemas —
Agent,AgentNode,AgentSignal,SignalTemplate,NodeType(shell, claude-code, conditional, switch, loop, agent-invoke, branch, end, break) - DAG executor — topological walk with flow control, onlyIf conditional edges, nested agent-invoke, loop iteration, AbortSignal cancellation, MCP server enable/disable gate
- LlmSpawner — multi-provider abstraction for Claude and Codex CLIs with stream-json progress tracking
- Tool system — 10 built-in tools +
ToolStorefor user-defined tools +type: mcpimplementation for MCP-imported tools - MCP integration —
McpServerConfig,parseMcpServersBlob(Claude-Desktop / Cursor / bare-map shapes), pooled MCP client (stdio + streamable-HTTP) - Output widgets —
OutputWidgetSchemawith 5 types (raw, key-value, diff-apply, dashboard, ai-template) - Template generators —
TemplateGeneratorinterface +claudeTemplateGenerator+registerTemplateGenerator()for codex/gemini/etc. - HTML sanitizer —
sanitizeHtml(tag/attr allowlist, zero deps) +substitutePlaceholdersfor safe rendering of AI-generated templates - Stores —
AgentStore(versioned DAGs),RunStore(paginated queries),ToolStore(tools +mcp_serverstable vianode:sqlite) - Secrets —
EncryptedFileStorewith AES-256-GCM, scrypt KDF (OWASP 2024 params), passphrase + legacy-fallback modes - Template resolution —
{{upstream.X.result}},{{inputs.NAME}},{{vars.NAME}},$UPSTREAM_X_RESULT - Signal system —
AgentSignalwith 10 display templates includingwidget(mirrors the agent's own outputWidget) - Input security — sensitive env-var deny-list prevents LD_PRELOAD/PATH/NODE_OPTIONS injection via agent inputs
- SSRF protection —
assertSafeUrlvalidates DNS-resolved IPs against private/loopback/metadata ranges
Install
npm install @some-useful-agents/coreUsage
import { AgentStore, RunStore, executeAgentDag, listBuiltinTools } from '@some-useful-agents/core';
import type { Agent, AgentSignal, SignalTemplate } from '@some-useful-agents/core';See the main repo README for full documentation.
License
MIT
