v0.94.0
Added
diagnosticsis now a default-active tool for new sessions (LLM-callable alongsideread/bash/edit/write). It stays registered-but-inactive for sessions that pin their own tool list; opt out per session viaactiveToolNamesorexcludedToolNames.- Persistent skill-catalog cache (
src/core/skills-catalog-cache.ts): per-dir fingerprint walk (readdir/stat only) gates a JSON catalog at<agentDir>/cache/skill-catalog-v1.json. Repeat session starts skip all SKILL.md reads on unchanged trees (measured on this host: 105 ms cold → 41 ms warm for the full scan). Any add/edit/delete under a scanned tree invalidates exactly that dir; corrupt cache degrades to a clean miss. Atomic tmp+rename writes. - Hermetic test environment (
test/setup-env.ts): machine-levelOMK_*and provider credential variables are scrubbed before every worker, so test results no longer depend on the developer shell (safety-gate suites saw env-disabled gates; live e2e suites ran against expired credentials instead of skipping).LIVE_E2E=1keeps provider keys when running the live suites on purpose. diagnosticstool (src/core/tools/diagnostics.ts): compiler-backed diagnostics via the project's own checkers —tsc --noEmit,pyright/ruff,go vet,cargo check— normalized toSEVERITY path:line:col message, per-language fail-soft (skippedinstead of tool errors), 5 s TTL cache, 50-item cap, path/language auto-detect. Registered increateAllToolDefinitionsand exported from the SDK (createDiagnosticsTool,createDiagnosticsToolDefinition).- Interactive sandbox promotion:
session.setBashSandboxMode("audit" | "enforce" | "off")switches the session sandbox at runtime (next spawn), with asandbox_auditmode-change ledger entry;session.bashSandboxModereads the effective mode.SessionBashRuntime.setSandboxModebacks it. - Default-on bash sandbox (opt-out). Session bash now carries a default
audit-mode sandbox preflight (workspace-write rooted at the session cwd, OS temp dir as extra write target). Spawns stay unwrapped but every decision lands in the replay ledger as asandbox_auditevent — a tamper-evident trail no other harness ships.OMK_BASH_SANDBOX=enforceactivates the real OS backend (macOSsandbox-exec/ Linuxbwrap, auto-detected) and fails closed when unavailable;=0disables. NewonSpawnDecisionobserver onBashSandboxPreflight, pluscreateWorkspaceSandboxPolicy()/resolveBashSandboxMode()SDK exports. - Git-aware verified-bash scope. Session bash receipts now bind the git toplevel plus the sorted dirty set (staged/modified/untracked, capped at 32 paths, 1 s TTL cache) instead of an empty artifact set, so
captureWorkspaceFingerprintrecords HEAD and a scope-limited dirty digest. Exported asresolveSessionWorkspaceScope().
Fixed
- API provider registry is now a process-wide singleton (
globalThis-anchored inomk-ai/api-registry). Symlinked workspace dist copies consumed natively and the same files inlined by vite-node used to keep separate registries, soregisterFauxProvider(and any runtime registration) was invisible to streamers resolving through the other copy — surfacing as "No API provider registered for api: ..." in agent loops. Also removed a stale nestedpackages/agent/node_modules/omk-aicopy (0.92.0) that shadowed the workspace build.
Changed
-
Extracted
SessionCompactionService(src/core/session-compaction-service.ts): the compaction state machine — capture/lock, barrier evaluation, emergency tail repair, provenance capture, transaction begin, envelope commit — moved out ofAgentSession(5,271 → 4,911 lines), which now delegates through thin one-line wrappers. Transaction symbols import fromcompaction/transaction.tsdirectly so thecompaction/index.jsvi.mock pattern in suites keeps working. -
Extracted
SessionBashService(src/core/session-bash-service.ts): the full bash surface —executeBash(prefix/loadout/safety-floor/headless gate),recordBashResultwith the streaming-deferral queue,abortBash,flushPending— moved out ofAgentSession, which now delegates one line each. Ordering contract (queue while streaming, flush on turn end) is pinned by the bash-persistence suite. -
Extracted
SessionBashRuntime(src/core/session-bash-runtime.ts) fromAgentSession: verified-evidence executor, default sandbox preflight (audit/enforce), git-aware workspace scope, and the receipt-bound bash orchestration (executeVerified) now live in one lazily-initialized unit; the session delegates. No behavior change. -
Verified bash is default-on (opt-out). When an AgentSession has a replay ledger, LLM-callable
bashand interactive/RPCexecuteBashbind throughexecuteVerifiedBash(executor: "bash-tool", receipts under<sessionFile>.evidence). SetOMK_VERIFIED_BASH=0for the legacy unverified path. Adapter gainsenv/onDatafan-out andcreateVerifiedBashOperations()so session PI_* env and live streaming stay intact without import cycles. See SDK — Evidence and Environment Variables.