@dudko.dev/agent — tool-using planning agent over MCP servers, built on the Vercel AI SDK. TypeScript, ESM, Node ≥22.6.
src/— library + CLI source (.ts, imported with explicit.tsextensions)tests/—node:testsuites, run vianode --experimental-strip-typesdist/—tsupbuild output (do not edit)
tests/*.test.ts— units plusintegration.test.ts, which runs the whole loop over real sockets against a scripted OpenAI-compatible endpoint, a real MCP server and a real authorization server (tests/helpers/). No key, ~5s.tests/live-model.test.ts— the same loop against a REAL model. Skipped unlessAGENT_LIVE_MODEL_URLpoints at an OpenAI-compatible endpoint; CI starts one vialive-model.yml. Asserts mechanics only (the loop finished, a tool was driven, arguments parsed) — never wording or plan shape, or the suite becomes a coin flip nobody trusts.
After any change to .ts files in src/ or tests/, run:
npm run typecheck
npm run format:check
npm run build
npm testDo not consider a task done until all four exit cleanly. Run them with the Bash tool, do not infer success from "the change looks right".
If npm install is needed (e.g. lockfile changed), run it with --no-audit --no-fund and ensure it returned 0 before running checks.
- Use
.tsextensions in relative imports (project relies on--experimental-strip-types). - Zod v4 is used; when passing heterogeneous schemas through a shared array/iterable, type the collection as
z.ZodTypeto avoid union-narrowing errors. - Anthropic's native structured output rejects
maxItemson arrays — never add.max()to Zod arrays that flow into structured output. The guard test intests/anthropic-schema-compat.test.tsenforces this.
- Do not bump the package
versionmanually. Versioning is handled by the autoupdate flow / maintainer on release. - Do not edit
.github/workflows/release.ymlunless explicitly asked — it is the npm-trusted-publisher release pipeline. - Do not push to
maindirectly. Always work on the existing branch you were summoned to.
- Branch will be
chore/autoupdate-<run_id>. - Goal: bring
npm run typecheck && npm run format:check && npm run build && npm testto green. - Push compatibility fixes onto this branch. Each push re-runs the
CIworkflow automatically once the PR is open. - If a fix is impossible without changing product behavior, stop and leave a comment explaining what's blocked rather than guessing.
This repo follows the unified autoupdate-with-claude baseline (same template across siblings). Several workarounds are intentional:
autoupdate.ymlusesGITHUB_TOKENand explicitly dispatchestest.yml(theCIworkflow) after PR creation, because events created viaGITHUB_TOKENdon't triggerpull_requestworkflows.autoupdate.ymldispatchesclaude.ymldirectly viaworkflow_dispatchinstead of relying on an@claudePR comment.- Releases stay wired through
release.yml(npm Trusted Publisher), which fires viaworkflow_runafter a successful CI onmain. There is norelease-on-version-bump.ymlhere — it would conflict with the existing tag/publish chain. release.ymlnowneeds:thelive-model.ymlworkflow: a smoke test against a real model (llama.cpp on the runner, no key) gates the publish. It also runs on PRs that touchpackage.json/package-lock.json, which is where dependency drift arrives. Deliberately NOT nightly — a 3am failure on yesterday's commit gets ignored, and the question it answers matters at publish time.LLAMA_IMAGE/MODEL_*are pinned so a rerun downloads nothing and behaves the same; bump them on purpose.LLAMA_IMAGEis pinned by digest, not by tag: theserver-bNNNNtags stop at b5350 because the project renamed its tags, so the newest-looking tag was a year-old build that rejects streamed tool calls (Cannot use tools with stream) and blocked a release. Resolveghcr.io/ggml-org/llama.cpp:serverand paste the digest. A preflight step asserts the server can stream a tool call, so that failure names itself instead of dying inside the agent. 3B is the measured floor — a 1.5B answers from imagination instead of calling the tool (0/3 runs touched it).- All actions pinned to the
@v4line because the runner image currently lacksexternals/node24, breaking post-cleanup of@v5/@v6actions.
Do not "fix" any of the above by replacing dispatch calls with comment-based mentions, or by bumping action versions back to @v5/@v6.