@polymerix-labs/agents-core
v0.4.0
Published
Protocol-agnostic core for dont-break agent surfaces: typed query API client + 11 tool definitions
Maintainers
Readme
@polymerix-labs/agents-core
Protocol-agnostic core for the dont-break agent surfaces: a typed client for the query API plus the 11 tool definitions shared by every adapter (MCP, CLI, OpenAPI).
Most users never install this package directly — install @polymerix-labs/dont-break-mcp (for Cursor / Claude / any MCP host) or @polymerix-labs/dont-break-query (for CI and shells) instead. Use agents-core when building a custom integration (LangChain tools, a bot, an internal service).
What it provides
QueryApiClient— typed HTTP client for the query endpoints of the dont-break gateway (JWT auth, tenant-scoped URLs, actionable error messages) and the three agent rule-write routes.TOOLS— the 11 tool definitions (name, agent-orienteddescription, JSON SchemainputSchema,execute) that adapters render into their own protocol:
| Tool | Purpose |
|------|---------|
| find_symbol | Resolve names/paths into node ids (always call first) |
| get_dependencies | What a node depends on |
| get_dependents | Who depends on a node |
| get_impact | Blast radius of a change (files and/or nodes) |
| find_path | Cheapest dependency routes between two nodes |
| get_do_not_touch | Danger list: high fan-in + low stability |
| get_arch_status | Practicability report + verdict |
| check_change | Team rules vs a planned change (per file) |
| propose_rule | Propose a rule (warn active now, block pending a human) |
| pause_own_rule | Pause a rule this agent token authored |
| append_rule_reason | Append one reason to any rule (add-only) |
configFromEnv— resolvesDONT_BREAK_API_URL,DONT_BREAK_TOKEN,DONT_BREAK_WORKSPACE,DONT_BREAK_PROJECT.
All business logic (weights, caps, thresholds, verdicts) lives server-side; this package is a pure transport and receives result DTOs only. Rule-write tools cannot activate a block, pause someone else's rule, or rewrite reasons.
Usage
import { configFromEnv, QueryApiClient, TOOLS, getTool } from "@polymerix-labs/agents-core";
const client = new QueryApiClient(configFromEnv());
// Direct client usage
const matches = await client.find("PokemonAdapter", { kind: "class" });
const impact = await client.impact({ files: [matches[0].relative_path!] });
// Tool-definition usage (what MCP/CLI adapters do)
const result = await getTool("get_arch_status")!.execute(client, {});Configuration
| Variable | Meaning |
|----------|---------|
| DONT_BREAK_API_URL | Gateway base URL |
| DONT_BREAK_TOKEN | JWT bearer token |
| DONT_BREAK_WORKSPACE | Workspace id |
| DONT_BREAK_PROJECT | Project slug |
The dont-break extension's Connect your agent panel generates these values for you.
License
MIT
