mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
2.2 KiB
2.2 KiB
AGENTS.md — Harness Packages
This directory contains all @deepseek-ai/dsh-* harness packages. Repo-wide conventions (effects, declaration merging, waterfall semantics, ESM, testing policy) are in the root AGENTS.md § Conventions; the points below are packages-specific.
- Plugin export shape: service packages default-export their service class; function plugins named-export
name/inject/Config/applyand have no default export. Mixing the forms makes the Loader discard the function plugin's namespace (postmortem). - Optional services use
ctx.get(name). Reservectx.<name>for declared injections; the property proxy is topology-sensitive, while strictctx.getreads the global service store (postmortem). - A plugin shipped via
cordis.ymlneeds at least one test through the REAL Loader/export path — hand-builtctx.plugin({...})mounts bypassunwrapExportsand cannot catch a broken export shape. Full testing policy (tiers, with-key generosity, real-entry-path guards): docs/testing.md. - Typed same-process service and plugin calls are contracts, not serialization boundaries. Prefer readonly borrowed values; materialize or defensively validate only at parser/config, queued, model/tool JSON, durable/file, worker, process, or wire boundaries.
- Represent one asynchronous operation with one lifecycle controller or transaction. Separate readiness, cancellation, disposal, reservation, or sentinel state requires an independent owner or settlement boundary; otherwise fold it while preserving rollback, callback containment, and quiescence.
Naming notes:
src/types.tscontains only types — no runtime code.- Tests live at package level under
tests/, notsrc/__tests__/. - A package's README and JSDoc are part of the change: altered behavior (config keys, defaults, error codes, wire fields) updates them in the same commit.
doc-syncgates what it can; prose accuracy stays on the author (the documentation standard).
Read the per-package README.md for package-specific details: service API, events, extension points, TODOs.