決定的なロジック
fetches、transforms、branches、loops、parallel work、waits、nested pipeline calls のための純粋な TypeScript steps。通常の code と同じように型チェック、refactor、test、version 管理できます。
型付き TypeScript pipelines で、決定的な code、単発 inference、完全な agent loops を default-deny 権限と自分で所有する gateway の背後にまとめます。同じモジュール形状で、短い自動化、cron jobs、webhooks、durable approvals、persistent chat workflows を実行できます。
$ npm install -g skelm
$ skelm init my-bot && cd my-bot && npm install
$ skelm run workflows/hello.workflow.mts --input '{"name":"world"}'
workflow は型付き TypeScript モジュールです。決定的な code、model inference、agent loops を直接使い、schedules、webhooks、queues、durable state が必要になったら同じ workflow を gateway 経由で host します。
fetches、transforms、branches、loops、parallel work、waits、nested pipeline calls のための純粋な TypeScript steps。通常の code と同じように型チェック、refactor、test、version 管理できます。
型付き input と structured output を持つ 1 回の model call。`infer()` は tool loop なしで LLM の判断を使うためのもので、OpenAI-compatible endpoints、Anthropic、Pi、Vercel AI、custom backends などに対応します。
tools、MCP servers、skills、workspaces、default-deny permissions を持つ完全な agent steps。Backends には @skelm/agent、Opencode、Pi、Codex、Vercel AI、ACP agents、custom providers が含まれます。
すべての privileged action は code で宣言された permissions の下で gateway を通ります。宣言された permission を強制できない backend は、それを黙って bypass せず step start で失敗します。
現在の examples からの incident response: 並列の deterministic triage の後、tools、MCP、filesystem、network の明示的 permissions を持つ agent step を実行します。
import { agent, code, parallel, pipeline } from 'skelm'
import { z } from 'zod'
export default pipeline({
id: 'incident-response',
input: z.object({
incidentId: z.string(),
service: z.string(),
description: z.string(),
}),
output: z.object({
rootCause: z.string(),
immediateActions: z.array(z.string()),
}),
triggers: [{ kind: 'webhook', path: '/webhooks/incident' }],
steps: [
parallel({
id: 'triage',
steps: [
code({ id: 'search-issues', run: () => ({ issues: [] }) }),
code({ id: 'open-channel', run: () => ({ channel: 'inc-001' }) }),
],
}),
agent({
id: 'root-cause',
backend: 'opencode',
prompt: (ctx) => `Analyze this incident:\n${ctx.input.description}`,
permissions: {
allowedTools: ['gh.search_issues', 'slack.post_message'],
allowedMcpServers: ['github'],
allowedExecutables: [],
fsRead: [],
fsWrite: [],
networkEgress: { allowHosts: ['api.github.com', 'slack.com'] },
},
output: z.object({
rootCause: z.string(),
immediateActions: z.array(z.string()),
}),
maxTurns: 4,
}),
],
})
skelm は focused packages として配布されます。runtime と CLI には meta-package `skelm` を install し、必要に応じて backend、integration、memory、metrics、tracing packages を追加します。
skelmMeta-package — これを install します。@skelm/core を再 export し、skelm CLI binary を含み、local execution に必要な CLI、scheduler、integration SDK に依存します。
@skelm/coreRuntime、types、builders、schemas、events、permissions、registries、backend interface、system prompt composition、pipeline execution primitives。
@skelm/cliCommand-line interface と programmatic primitives。非 exempt commands は local gateway に dispatch します。`init`、`validate`、`gateway *` は live gateway なしで実行できます。
@skelm/gatewayconfig、registries、permissions、audit、agent lifecycle、triggers、HTTP/SSE、dashboard API、execution trust boundary を所有する long-running orchestrator。
@skelm/schedulerdeduplication と overlap policies を備えた cron、interval、webhook schedules の trigger management。scheduled work のために gateway が使用します。
@skelm/integrationsGitHub、Slack、Jira、Telegram、Matrix、chat UI trigger sources など third-party services 向けの typed integration package。
@skelm/integration-sdkcustom skelm integrations と trigger sources を作る authoring SDK。gateway に plug in する connectors を構築できます。
@skelm/agentFirst-party native agent backend。OpenAI-compatible chat endpoints に対して infer() と agent() を実行し、in-process TrustEnforcer permission checks を行います。
@skelm/agentmemorycross-session recall のための typed REST client と gateway-wired AgentmemoryHandle。operations は default-deny で gateway enforcement 経由です。
@skelm/opencodenative permission mapping、granular enforcement、gateway-supervised lifecycle support を備えた Opencode.ai coding-agent backend。
@skelm/pinative tool allowlist enforcement、infer() support、sandbox defaults、queue controls を備えた Pi coding-agent SDK backend。
@skelm/codex@openai/codex-sdk 経由の OpenAI Codex backend。boundary permission mapping、MCP injection、skill loading、session lifecycle、streaming を備えます。
@skelm/vercel-aiskelm policy の下で tool filtering と call-time permission checks により infer() と agent() を動かす Vercel AI SDK backend。
@skelm/metricsskelm event streams 向け Prometheus-format metrics: run counters、step timings、permission denials、approvals、trigger fires。
@skelm/otelexporters を自分で設定せずに run と step spans を emit する、skelm event streams 向け OpenTelemetry tracing。
CLI を install し、project を scaffold するか、`skelm builder` を使って natural-language spec から workflow を draft できます。