# Conflicts: # docs/AGENTS.md # docs/config-catalog.md # packages/bash/bash-sandbox/src/index.ts # packages/bash/bash/src/session-mode.ts # packages/bash/tool-bash/README.md # packages/code-runtime/code-runtime-worker/README.md # packages/compact/compact/src/index.ts # packages/core/agent-core/README.md # packages/hooks/hooks-claude/src/config.ts # packages/hooks/hooks-claude/src/index.ts # packages/hooks/hooks-codex/src/config.ts # packages/hooks/hooks-codex/src/index.ts # packages/llm/llm/README.md # packages/session-persistence/session-persistence-jsonl/README.md # packages/session-persistence/session-persistence/README.md # packages/skill/skill-local/README.md # packages/support/acp-snapshot/README.md # packages/support/invariants/src/index.ts # packages/ui/acp/README.md # packages/ui/jsonrpc-agent/README.md # packages/ui/jsonrpc/README.md # packages/ui/permission/README.md # packages/ui/user-approval/README.md # packages/ui/user-interaction/README.md # packages/web/web-search-deepseek/README.md
2.5 KiB
2.5 KiB
AGENTS.md — Harness Packages
These package-specific rules supplement the repo-wide conventions.
- 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; apply dsh-prose-standard for complete, concise prose and verify accuracy against code. - Package READMEs document model/token effects using the canonical Model Experience format.
- Package READMEs put durable consumer gaps and non-obvious maintainer constraints under
## Known Limitations and Deferred Work; ordinary cleanup stays in its TODO or RFC. Packages with none use a justified allowlist entry (rationale).