DeepSeek Harness: Webpack and Koa Were the Agent Framework All Along
Front-end developers can transfer most of their existing knowledge to building agent frameworks—hooks, middleware, DI, and cleanup are all there. The real cost of entry is the new domain material: streaming protocols, context engineering, and tool-calling semantics, which the article identifies as the only genuinely new knowledge. That lowers the barrier for a large pool of developers and suggests that agent frameworks are more about combining proven architecture than inventing new paradigms.
DeepSeek Harness, an open-source agent framework, builds its plugin system on Cordis, and that system turns out to be a rehash of patterns any React or Node developer knows. Its `cordis.yml` mirrors `webpack.config.js`, its event system implements Koa's onion model, its `inject` declaration behaves like React Context with dependency resolution, and its `ctx.effect` enforces cleanup the way `useEffect` should. The article, from a front-end engineer who read the source, walks through each mapping and the surprising details: plugins start concurrently so file order doesn't matter, the entire waterfall middleware fits in 15 lines, and a missing `next()` call silently kills the rest of the pipeline. The one piece with no web equivalent is the agent loop itself: a `while` loop that assembles context, calls the model, executes tool calls, and repeats until the model requests no more tools. Everything else—permissions, sandboxes, context compression, sub-agents—sits as plugins on that loop. The article also highlights an epoch fingerprint mechanism: Cordis computes a dependency fingerprint for each plugin and reloads it whenever any injected service changes, which lets you swap a local Bash provider for a sandboxed one by editing a single line in the config.
Mapping Cordis to Webpack, Koa, and React is a strong onboarding aid, but it obscures the genuinely hard parts of agent development: streaming chunk assembly, KV cache byte consistency, and context-window constraints have no web equivalents.
The epoch fingerprint design turns dependency resolution into string equality, making hot reload trivial, but it also means any change to a service reloads every dependent plugin, which could become a performance hazard in larger systems.
The silent failure when `next()` is omitted in an observational listener suggests Cordis's contract should be explicit: observers must always pass control to the next listener, or the semantics become 'veto' rather than 'observe'.