New @deepseek-ai/dsh-invariants plugin (pure listeners, off in prod) asserts the event taxonomy at runtime — seq monotonicity, turn/step nesting, a tool/result needs a prior tool/call (NOT the converse), legal agent/status transitions — and deep-freezes logged event data so mutating history throws. Seeded sessions are checked + frozen on session/created. The real RFC 008 fix is always-on: deriveMessages now structured-clones the content it emits, so the loop's sanctioned request/adapter mutation can no longer reach back and rewrite the append-only log. The pervasive DeepReadonly<T> type flip is rejected (compile-only, high-noise, castable) — recorded in ADR 0012, which folds in RFC 008. Wired into both demos.
25 lines
682 B
TypeScript
25 lines
682 B
TypeScript
import { execFileSync } from 'node:child_process'
|
|
import { resolve } from 'node:path'
|
|
|
|
// publint every publishable package (vendor/ is private upstream code and
|
|
// examples/ are not packages; both are out of scope).
|
|
const packages = [
|
|
'packages/llm',
|
|
'packages/session',
|
|
'packages/system-prompt',
|
|
'packages/tools',
|
|
'packages/agent',
|
|
'packages/agent-loop',
|
|
'packages/bash',
|
|
'packages/llm-deepseek',
|
|
'packages/llm-pi-ai',
|
|
'packages/bash-local',
|
|
'packages/tool-bash',
|
|
'packages/invariants',
|
|
]
|
|
|
|
const root = resolve(import.meta.dirname, '..')
|
|
for (const path of packages) {
|
|
execFileSync('node_modules/.bin/publint', [path], { cwd: root, stdio: 'inherit' })
|
|
}
|