@adhd/agent-engine-compiler 2.1.9 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +72 -0
- package/package.json +6 -6
- package/src/cli/compile.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 2.1.10 (2026-07-26)
|
|
2
|
+
|
|
3
|
+
Re-publish fixing 2.1.9's own defects: an unsatisfiable `@adhd/agent-store-tools: ^2.1.9` dependency range (captured during a transient phantom-version-bump window on agent-store-tools that was later reverted — the real max published is 2.1.8) and a missing `README.md` in the published tarball (BUG-BUILD-ASSETS-CACHE-STALE-AFTER-CLEAN-001) — no code changes to this package itself.
|
|
4
|
+
|
|
1
5
|
## 2.1.9 (2026-07-26)
|
|
2
6
|
|
|
3
7
|
Re-publish fixing an empty (1-file) tarball at 2.1.8, caused by BUG-BUILD-PUBLISH-DISTMANIFEST-CLOBBERED-001 in the shared `@adhd/nx-build:publish`/`:version` executors (see tools/nx-plugins/build/executors/publish/impl.js and .../version/impl.js) — no code changes to this package itself.
|
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# @adhd/agent-engine-compiler
|
|
2
|
+
|
|
3
|
+
Compiles agent configurations from the registry into runtime-ready manifests. Resolves component compositions, tool bindings, policy constraints, and model specifications. Part of the agent registry family.
|
|
4
|
+
|
|
5
|
+
**Status:** Shipped v2.1.2
|
|
6
|
+
**Platform:** `platform:node` (runs in Node/CLI, not browser)
|
|
7
|
+
**Consumers:** `@adhd/agent-mcp`, `@adhd/dispatch-cli`
|
|
8
|
+
|
|
9
|
+
## What it does
|
|
10
|
+
|
|
11
|
+
- **Body Resolution** — Assembles agent components from the registry composition store into a complete prompt body
|
|
12
|
+
- **Tool Resolution** — Resolves tool aliases and platform-specific bindings (HTTP, MCP, CLI, etc.)
|
|
13
|
+
- **Model Resolution** — Looks up model capabilities and configurations
|
|
14
|
+
- **Policy Constraint Resolution** — Evaluates effective authorization policies
|
|
15
|
+
- **Output Emission** — Compiles agent definitions into YAML frontmatter, JSON objects, or Markdown documents
|
|
16
|
+
- **Database Migrations** — Runs schema setup via `runMigrationsOn(db)`
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
First, resolve the shared registry database path:
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { resolveRegistryDbPath } from '@adhd/agent-core-env';
|
|
24
|
+
import Database from 'better-sqlite3';
|
|
25
|
+
import { runMigrationsOn, compileAgent } from '@adhd/agent-engine-compiler';
|
|
26
|
+
|
|
27
|
+
const dbPath = resolveRegistryDbPath(); // e.g., ~/.adhd/agent-registry/production/data/registry.db
|
|
28
|
+
const db = new Database(dbPath);
|
|
29
|
+
|
|
30
|
+
// Run migrations
|
|
31
|
+
await runMigrationsOn(db);
|
|
32
|
+
|
|
33
|
+
// Compile an agent from the registry
|
|
34
|
+
const compiled = await compileAgent(db, {
|
|
35
|
+
agentId: 'my-agent',
|
|
36
|
+
platform: 'mcp', // or 'http', 'cli', 'json'
|
|
37
|
+
models: modelStore,
|
|
38
|
+
tools: toolStore,
|
|
39
|
+
policies: policyStore,
|
|
40
|
+
composition: compositionStore,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Emit as YAML or JSON
|
|
44
|
+
const yaml = emitYamlFrontmatter({
|
|
45
|
+
agentId: compiled.agentId,
|
|
46
|
+
tools: compiled.tools,
|
|
47
|
+
modelAlias: compiled.modelAlias,
|
|
48
|
+
policyConstraints: compiled.policyConstraints,
|
|
49
|
+
});
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Key exports
|
|
53
|
+
|
|
54
|
+
| Export | Purpose |
|
|
55
|
+
|--------|---------|
|
|
56
|
+
| `resolveBody(db, ...)` | Assemble component composition into prompt body |
|
|
57
|
+
| `resolveTools(db, ...)` | Resolve tools and platform bindings |
|
|
58
|
+
| `resolveModel(db, ...)` | Look up model and capabilities |
|
|
59
|
+
| `resolvePolicyConstraints(db, ...)` | Resolve effective policies |
|
|
60
|
+
| `compileAgent(db, input)` | Complete compilation orchestrator |
|
|
61
|
+
| `emitYamlFrontmatter(input)` | Emit as YAML frontmatter + body |
|
|
62
|
+
| `emitJsonObject(input)` | Emit as JSON (e.g., for REST API) |
|
|
63
|
+
| `runMigrationsOn(db)` | Initialize database schema |
|
|
64
|
+
|
|
65
|
+
## Architecture
|
|
66
|
+
|
|
67
|
+
- **Tier**: `engine` (depends on base + core + stores)
|
|
68
|
+
- **Consumption**: Reads from all registry family stores (prompts, tools, policy, provider)
|
|
69
|
+
- **No import-time side effects** — DB path and connection are external (via `agent-core-env`)
|
|
70
|
+
- **Part of agent registry family**: `agent-store-prompts` + `agent-store-tools` + `agent-core-policy` + `agent-core-provider` + `agent-engine-compiler`
|
|
71
|
+
|
|
72
|
+
See `/entrypoint/agent-mcp/` for the agent MCP server (primary consumer).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhd/agent-engine-compiler",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Registry-family store for agent-compiler: drizzle-backed SQLite tables sharing the one registry database.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"better-sqlite3": "12.10.0",
|
|
20
20
|
"drizzle-orm": "0.45.2",
|
|
21
|
-
"@adhd/agent-store-prompts": "^2.
|
|
22
|
-
"@adhd/agent-store-tools": "^2.
|
|
23
|
-
"@adhd/agent-core-provider": "^2.
|
|
24
|
-
"@adhd/agent-core-policy": "^2.
|
|
25
|
-
"@adhd/agent-core-env": "^0.0
|
|
21
|
+
"@adhd/agent-store-prompts": "^2.2.0",
|
|
22
|
+
"@adhd/agent-store-tools": "^2.2.0",
|
|
23
|
+
"@adhd/agent-core-provider": "^2.2.0",
|
|
24
|
+
"@adhd/agent-core-policy": "^2.2.0",
|
|
25
|
+
"@adhd/agent-core-env": "^0.1.0"
|
|
26
26
|
},
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"repository": {
|
package/src/cli/compile.js
CHANGED
|
File without changes
|