Repository navigation
ADR 0009 Angular style components with constructor injection
pavelravvich edited this page Sep 25, 2026
·
1 revision
-
Status: Accepted (replaces config-based wiring:
agents.config.ts, tool catalog,defineBundle) - Issue: #87
Adding a tool, an agent or an MCP server touched several places (catalog, config entry, a type list); the structure of a bundle was not visible from its files.
- Components are annotated classes, one per file, in folders by kind:
@Tool,@Agent,@McpServer/@McpTool,@Injectable; a@Bundlemodule lists agents and servers by class reference — no scanning, no string names, links checked by the compiler. - Settings in decorators; behaviour through interfaces (
ToolHandler); prompts in*.prompt.mdnext to the agent. - Dependencies through the constructor, declared in
depsand checked by the compiler against the constructor's parameters; the graph and creation order are resolved once at assembly. Chosen overinject()(hidden dependencies, injection context, harder tests) and a single context object. -
@Bundleassembles into the existing bundle config, so the core, profiles,describeand Studio are unchanged. One style everywhere: the previous way was removed.
- Tools and agents are classes; tests construct tools with
newand fakes. - Standard decorators give no parameter-type metadata, so
depsrepeats the constructor's types once — the compiler keeps them in sync. -
Symbol.metadatais not available at runtime on Node 26: metadata lives in the components' own registry.
AGBoss
- Home
- Delivery Pipeline
- Architecture
- Configuration
- Workflow — the graph
- Advanced Routing (DSL)
- Routers
- Guards
- CLI — agboss
- App — createApp
- Context and Authorization
- Testing
- Suites and Comparisons
- Components
- Standard DTOs
- Example: job-scout
- Agents — the loop
- Model providers
- Tools
- Knowledge bases (RAG)
- FinOps
- Tracing
- Observability
- Terns and evaluation
- Profiles and comparisons
- Pause seam
- Decisions (ADR)