@hilbras/omninode 2.0.0-alpha.16 → 2.0.0-alpha.18

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![npm downloads](https://img.shields.io/npm/dm/@hilbras/omninode)](https://www.npmjs.com/package/@hilbras/omninode)
6
6
  [![Node.js support](https://img.shields.io/node/v/@hilbras/omninode)](https://www.npmjs.com/package/@hilbras/omninode)
7
7
  [![License: MIT](https://img.shields.io/github/license/Hilbras/OmniNode)](LICENSE)
8
- [![Roadmap phase](https://img.shields.io/badge/phase-0_%2F_11-Foundation-8A2BE2)](docs/DEVELOPMENT_PLAN.md)
8
+ [![v2 progress](https://img.shields.io/badge/v2-19%20%2F%2024%20phases-8A2BE2)](docs/ROADMAP_V2.md)
9
9
 
10
10
  **OmniNode** is a provider-agnostic multi-AI orchestration platform. It coordinates
11
11
  CLI-based AI agents, AI providers, persistent memory, roles, reports and planning
@@ -18,395 +18,170 @@ existing intelligence; it does not try to become another model.
18
18
 
19
19
  ## Status
20
20
 
21
- **v2.0.0-alpha.16 — v2 Phase 16: Configuration v2**
22
- (the reliability & interoperability line: architecture → execution →
23
- protocol → adapters → pipelines → providers → OmniHilbras → memory → reports) (the v2
24
- roadmap is [docs/ROADMAP_V2.md](docs/ROADMAP_V2.md); the v1 plan is complete:
25
- the
26
- full loop from §28 runs in one command —
27
- `User → project context → memory → research agents → reports → aggregation →
28
- planner → plan → execution → result` — with audit logging, error recovery and
29
- production hardening (see [docs/DEVELOPMENT_PLAN.md](docs/DEVELOPMENT_PLAN.md)
30
- for the plan and [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the design).
31
-
32
- ### What's new in v2 (so far)
33
-
34
- - **Phase 16 — Configuration v2**: explicit precedence (CLI → env →
35
- project file → user file → profile overlay → defaults), named
36
- **profiles** (`development`/`production`/`testing`), `OMNINODE_*`
37
- environment overrides, and actionable validation diagnostics
38
- ("Provider 'deepseek': API key reference is missing"). `config
39
- validate` now reports which sources and defaults produced the
40
- effective configuration. Details: [CONFIGURATION.md](docs/CONFIGURATION.md).
41
- - **Phase 15 — CLI v2**: documented **exit codes** (0 success, 2 invalid
42
- input, 3 config, 4 provider, 5 agent, 6 timeout, 7 cancelled, 8 not
43
- found, 9 not implemented), a `config` group (`show` / `path` /
44
- `validate`, never printing secret values), `pipeline create`, a real
45
- `provider remove`, `agent run`, the `model` alias for `models`, and
46
- `--json` output across the list and inspect commands. Guide:
47
- [CLI.md](docs/CLI.md).
48
- - **Phase 14 — Audit & Observability**: every audit event now carries
49
- correlation ids (`taskId`, `pipelineId`, `executionId`, `agentId`,
50
- `providerId`), new event types cover agent start/complete and provider
51
- errors, logs can be emitted as machine-readable JSON
52
- (`logging.format: json`), and `omninode task|pipeline|agent|provider
53
- inspect <id>` answers "what happened?" after a failed run — with
54
- `--json` for tooling.
55
- - **Phase 13 — Security Hardening**: configuration containing literal
56
- credentials is **rejected before parsing** (with a redacted, actionable
57
- error); reports over 256 KiB are rejected rather than persisted; static
58
- guards keep shell execution out of the codebase; and `omninode security
59
- audit` reviews a project's posture (environment exposure, external working
60
- directories, credential references) and states the agent trust model
61
- plainly — agents run with your OS user's permissions, and OmniNode is not
62
- a sandbox.
63
- - **Phase 12 — Persistence Layer v2**: writes are now **fsynced and atomic**
64
- (temp → fsync → rename → directory fsync), corrupt store files are
65
- **quarantined instead of lost**, documents carry a **schema version** with
66
- v1 data migrated in place (`omninode migrate [--check]`), and files from a
67
- newer OmniNode are refused rather than misread. Details:
68
- [PERSISTENCE.md](docs/PERSISTENCE.md).
69
- - **Phase 11 — Planner v2**: the planner now receives the full §15 input —
70
- task, project context, agent reports, **aggregated findings (consensus and
71
- conflicts included)**, memory and **constraints** (settable per pipeline
72
- step). Plans carry an explicit goal, every generated plan is **schema
73
- validated**, invalid output produces a **structured error** or falls back to
74
- heuristic planning, and a guard test proves the planner module depends on no
75
- specific provider.
76
- - **Phase 10 — Aggregation Improvements**: when agents disagree,
77
- OmniNode now says so instead of flattening the answer — **conflict
78
- detection** preserves every position (severity spread, divergent
79
- recommended fixes), multi-agent **agreements** are recorded as
80
- consensus, confidence is preserved per source, and the combined
81
- report carries provenance-rich metadata. Still fully deterministic.
82
- - **Phase 9 — Report System v2**: reports are validated machine-readable
83
- objects — `validateReport()` runs on everything entering the system and
84
- malformed reports are rejected with diagnostics instead of poisoning
85
- aggregation. Findings gain description/confidence/source/recommendation,
86
- evidence is typed (`file`, `line`, `url`, `command`, `observation`,
87
- `artifact`), and reports carry artifacts and run provenance.
88
- Details: [REPORTS.md](docs/REPORTS.md).
89
- - **Phase 8 — Remembera / Memory v2**: the memory contract is formalized
90
- (`retrieve` / `store` / `search` / `metadata` with v1 `query` / `write`
91
- aliases kept working), memory gains structured **categories** (decisions,
92
- problems, conventions, tasks…), retrieval is **task-oriented and budgeted**
93
- (never "load all memory"), and `memory.required: true` makes backend
94
- failures fatal instead of tolerated. Details: [MEMORY.md](docs/MEMORY.md).
95
- - **Phase 7 — OmniHilbras Integration v2**: the dedicated adapter now
96
- captures gateway-level metadata (version, tier, region) and attaches it
97
- to discovered models, honors provider-level `timeout_ms`, and supports
98
- streaming completions (`stream()` over SSE) — while a guard test proves
99
- the core references OmniHilbras *only* through the provider layer, and a
100
- full pipeline runs with no OmniHilbras configured at all.
101
- - **Phase 6 — Provider Infrastructure v2**: standardized provider contract
102
- (`providerId`, secret-free `authentication`, declared `capabilities`,
103
- `connect()` / `getModel()` discovery), richer model metadata (context
104
- window, input/output modalities, tool/vision/structured-output/streaming
105
- support), and **unified error normalization** — every provider failure now
106
- carries a stable `kind` (auth, rate limit, invalid request, model not
107
- found, timeout, network, server, unknown) plus `retryable` and
108
- `retryAfterMs`. Details: [PROVIDERS.md](docs/PROVIDERS.md).
109
- - **Phase 5 — Pipeline Lifecycle**: first-class pipeline cancellation
110
- (`omninode pipeline cancel <run-id>`: stop scheduling → cancel running
111
- tasks → terminate agent processes → persist a `cancelled` run), `pipeline
112
- validate` for pre-run checks (deps, cycles, agents, model references),
113
- explicit run/step **attempts** in the run record, the
114
- `IPipelineExecutor` contract, and recovery awareness — runs left `running`
115
- without a `finishedAt` are flagged as interrupted in `pipeline runs`.
116
- - **Phase 4 — Agent Adapter Hardening**: process-tree cleanup (agents run in
117
- their own process group; timeout, cancel and Ctrl-C reap the whole tree, so
118
- no orphaned children), explicit environment policies
119
- (`inherit` / `allowlist` / `denylist` / `explicit`), working-directory
120
- validation against project boundaries, per-stream output limits that kill
121
- runaway agents, binary-safe output decoding, human-readable exit/signal
122
- reporting, and a native `IAgentAdapter` registry so new integration styles
123
- plug in without touching core.
124
- - **Phase 3 — Agent Protocol v2**: versioned protocol
125
- (`omninode-agent-protocol/2`), fully correlated envelopes, the complete
126
- message-type set, HELLO handshake, QUESTION/RESPONSE round-trips, and
127
- malformed input that can never crash OmniNode. Spec:
128
- [PROTOCOL.md](docs/PROTOCOL.md).
129
- - **Phase 2 — Execution Reliability**: a task killed after dispatch is
130
- `unknown`, **not** `failed` — retries never duplicate side effects blindly;
131
- bounded retries with backoff, execution identity and history.
132
- - **Phase 1 — Architecture & API Stabilization**: one shared `JsonFileStore`
133
- behind every local store, corrected dependency direction, and a guarded
134
- public API ([API_STABILITY.md](docs/API_STABILITY.md), [API.md](docs/API.md),
135
- [DEPRECATIONS.md](docs/DEPRECATIONS.md)).
136
-
137
- ### What's in v1.0
21
+ **v1.0.0 is feature complete. v2.0.0 — the reliability and interoperability
22
+ release — is in progress**, shipping as tagged prereleases (`v2.0.0-alpha.N`).
23
+
24
+ ### v1.0.0 delivered
138
25
 
139
26
  | Capability | Where |
140
27
  | --- | --- |
141
- | Provider abstraction, custom providers, model discovery | `src/providers/`, `src/registry/` |
142
- | OmniHilbras integration (optional) | `src/providers/omnihilbras/` |
143
- | CLI agents (stdin/arg/protocol), agent registry | `src/agents/` |
144
- | Roles, projects, tasks (lifecycle + retry) | `src/roles/`, `src/tasks/` |
145
- | Pipelines (DAG, parallel, retries, conditions) | `src/pipelines/` |
146
- | Multi-AI research + report aggregation | `src/reports/` |
147
- | Planner layer (model + heuristic) | `src/planner/` |
148
- | Remembera / local memory | `src/memory/` |
149
- | CLI, configuration, security foundations, docs | `src/cli/`, `src/config/`, `docs/` |
150
-
151
- What exists today:
152
-
153
- - Core type contracts: provider, model, agent, role, task, report, pipeline,
154
- protocol, memory (`src/types/`)
155
- - **Provider system** (`src/providers/`, `src/registry/`):
156
- - OpenAI-compatible adapter — works with OpenAI, OpenRouter, local runtimes
157
- (Ollama, LM Studio, vLLM) and custom gateways exposing `/models` and `/chat/completions`
158
- - Model discovery with normalization into the model registry (`provider:model` keys)
159
- - Health checks: connectivity, authentication and server-error classification
160
- - Authentication from environment variables only — keys never touch config files
161
- - Chat completions (`IChatProvider`) — the foundation for the planner phases
162
- - Provider factory mapping config to adapters; `omnihilbras` gets a
163
- dedicated adapter implementing the plan's connect flow —
164
- Connect → Authenticate → Fetch Models → Validate Models → Register
165
- - **Agent system** (`src/agents/`):
166
- - Process adapter: spawns CLI agents as child processes with lifecycle
167
- management — environment, working directory, exit codes, stderr logs,
168
- per-task timeouts (SIGTERM → SIGKILL) and cancellation
169
- - Three input modes: `stdin` (composed task text on stdin), `arg` (prompt as
170
- last argument) and `protocol` (the §21 JSON-lines task protocol —
171
- `TASK`/`ROLE`/`CONTEXT`/`INSTRUCTION` envelopes in, `REPORT`/`COMPLETION`/
172
- `ERROR` messages out, parsed into structured reports)
173
- - Agent factory and registry (`createAgent`, `AgentRegistry`)
174
- - **Roles & tasks** (`src/roles/`, `src/tasks/`):
175
- - `RoleRegistry` with assignment validation — a task can only reference roles
176
- and agents that actually exist
177
- - Task lifecycle (created → queued → running → completed/failed/cancelled)
178
- with transition enforcement
179
- - `TaskEngine` runs tasks through their assigned agent, records structured
180
- results (summary, reports, errors, timestamps)
181
- - `TaskStore` interface with a local-first JSON implementation in
182
- `.omninode/tasks.json` (atomic writes; swap in any backend)
183
- - **Pipeline engine** (`src/pipelines/`):
184
- - Pipelines defined in `omninode.yaml` under `project.pipelines`, validated
185
- before every run (duplicate ids, unknown dependencies, cycles, missing
186
- agents)
187
- - Sequential execution by definition order; explicit `depends_on` unlocks
188
- parallel branches, and research steps fan out to several agents in
189
- parallel (§15)
190
- - Step kinds: `research` (multi-agent fan-out), `collect`, `analyze`,
191
- `plan` (calls a model as `provider:model-id` via the chat layer),
192
- `execute`/`custom` (hand-off to an execution agent)
193
- - Failure handling: retries per step, `on-success`/`on-failure`/`always`
194
- conditions, combined context threaded downstream; every task runs through
195
- the TaskEngine and every run is persisted to `.omninode/pipelines.json`
196
- - **Multi-AI report system** (`src/reports/`):
197
- - Report collection from finished tasks — structured protocol reports pass
198
- through; plain text output is normalized via deterministic extraction
199
- (findings/recommendations/evidence sections, severity guessing)
200
- - Persistence in `.omninode/reports.json` with full source attribution
201
- - Aggregation (§17): duplicate/similar findings merged via deterministic
202
- token-set similarity, sources preserved, highest severity kept
203
- - Combined reports generated automatically at the end of every pipeline run
204
- - **Memory** (`src/memory/`): the §20 loop — before a task runs, relevant
205
- memory is gathered and injected into the agent's context; after it finishes,
206
- the outcome is recorded back. High/critical findings are promoted to
207
- project-level "known problems". Opt in via a `memory:` config section:
208
- - `provider: local` (default) — JSON file at `.omninode/memory.json` with
209
- deterministic keyword/tag relevance scoring, zero dependencies
210
- - `provider: remembera` — the preferred Hilbras memory integration over
211
- HTTP (base URL + `api_key_env_var`); strictly optional, like every
212
- Hilbras component
213
- - Memory failures are best-effort: logged, never fatal to a task
214
- - **Planner layer** (`src/planner/`):
215
- - Typed plan schema (`Plan` with ordered steps, targets, acceptance
216
- criteria, risks, and finding traceability via `sourceFindings`)
217
- - Planner context builder: objective + role + combined findings with
218
- sources + relevant memory + research context
219
- - `ModelPlanner` — asks a chat model (`provider:model-id`) for JSON matching
220
- the plan contract; unparseable output degrades gracefully to the heuristic
221
- fallback
222
- - `HeuristicPlanner` — deterministic, offline plan from recommendations and
223
- significant findings (also the fallback)
224
- - Plans persist to `.omninode/plans.json`; pipeline runs record `planId`
225
- - Configure with `planner: { kind: model | heuristic, model, instruction }`
226
- — never hardcoded to any provider
227
- - **End-to-end workflow** (§28, §27 Phase 9):
228
- - One-command execution via the top-level `run` alias (`omninode run <pipeline> "<objective>"`)
229
- - `omninode status` — full project state overview: providers, agents,
230
- roles, pipelines, task/run/report/plan counts, memory provider + entries
231
- - Pipeline runs persist their objective and a final `resultSummary` (§28 "Result")
232
- - Error recovery: `task retry [--run]` (reset a failed/cancelled task) and
233
- `pipeline retry <run-id>` (re-run a recorded failed run as a new run)
234
- - Full integration test (`tests/e2e.test.ts`) drives the entire §28 workflow
235
- through the real CLI against a local gateway
236
- - Typed error hierarchy (`src/errors/`)
237
- - Leveled logger with pluggable sink (`src/logger/`)
238
- - Configuration system: `omninode.yaml` with `${ENV_VAR}` expansion and strict
239
- validation (`src/config/`)
240
- - CLI: `init`, `provider add/list/test`, `models`, `agent list`, `role list`,
241
- and honest stubs for the phase-dependent commands (`src/cli/`)
242
- - Test infrastructure (Vitest) and CI (GitHub Actions)
243
-
244
- ## Requirements
245
-
246
- - Node.js >= 20
247
-
248
- ## Quick start (from source)
28
+ | Provider abstraction, custom providers, model discovery | [`src/providers/`](src/providers) |
29
+ | OmniHilbras integration (optional) | `src/providers/omnihilbras` |
30
+ | CLI agents (stdin / arg / protocol modes), agent registry | [`src/agents/`](src/agents) |
31
+ | Roles, tasks with lifecycle and retry | `src/roles`, [`src/tasks/`](src/tasks) |
32
+ | Pipelines: DAG scheduling, fan-out research, conditions, retries | [`src/pipelines/`](src/pipelines) |
33
+ | Multi-AI reports with aggregation and conflict detection | [`src/reports/`](src/reports) |
34
+ | Planner (model-backed with heuristic fallback) | [`src/planner/`](src/planner) |
35
+ | Memory (local + Remembera) wired into the task loop | [`src/memory/`](src/memory) |
36
+ | End-to-end workflow in one command | `omninode run <pipeline> "<objective>"` |
37
+ | Audit log, security model, examples, Docker runtime | [`src/audit/`](src/audit), [docs/SECURITY.md](docs/SECURITY.md) |
38
+
39
+ ### v2.0.0 progress (19 of 24 phases)
40
+
41
+ | # | Phase | Outcome |
42
+ | --- | --- | --- |
43
+ | 1 | Architecture & API stabilization | shared persistence base, guarded public API, deprecation policy |
44
+ | 2 | Execution reliability | `unknown` ≠ `failed`, attempts, execution identity, timeouts |
45
+ | 3 | Agent Protocol v2 | versioned, correlated envelopes, malformed input never crashes |
46
+ | 4 | Agent adapter hardening | process-tree cleanup, env policies, output limits, cwd confinement |
47
+ | 5 | Pipeline lifecycle | cancellation, partial/unknown propagation, interrupted-run detection |
48
+ | 6 | Provider infrastructure | model metadata, `connect`/`getModel`, normalized error kinds |
49
+ | 7 | OmniHilbras v2 | gateway metadata, streaming, enforced separation |
50
+ | 8 | Memory v2 | formal contract, categories, budgeted retrieval, `required` policy |
51
+ | 9 | Report system v2 | validated reports, typed evidence, provenance |
52
+ | 10 | Aggregation | agreements, conflicts (both positions preserved), confidence |
53
+ | 11 | Planner v2 | full input, plan validation, structured errors, provider-agnostic |
54
+ | 12 | Persistence | atomic writes, corruption quarantine, schema v2 + migration |
55
+ | 13 | Security hardening | inline-secret refusal, static guards, `security audit` |
56
+ | 14 | Audit & observability | correlated events, JSON logs, `inspect` diagnostics |
57
+ | 15 | CLI v2 | exit codes, `config` group, `pipeline create`, `--json` |
58
+ | 16 | Configuration v2 | precedence, profiles, `OMNINODE_*`, diagnostics |
59
+ | 17 | Testing expansion | explicit failure matrix + regression tests |
60
+ | 18 | Documentation overhaul | complete document set, rewritten README |
61
+ | 19 | Package quality | public exports, runtime validation, npm contents (next) |
62
+ | 20–24 | Performance · developer experience · CI/CD · migration tooling · final hardening | planned |
63
+
64
+ The roadmap is [docs/ROADMAP_V2.md](docs/ROADMAP_V2.md); the completed v1 plan is
65
+ [docs/DEVELOPMENT_PLAN.md](docs/DEVELOPMENT_PLAN.md).
249
66
 
250
- ```bash
251
- npm install
252
- npm run build
253
- node dist/cli/index.js --help
67
+ ## Documentation
254
68
 
255
- # Or run from source:
256
- npm run omninode -- --help
257
- ```
69
+ | Document | What it covers |
70
+ | --- | --- |
71
+ | [Configuration](docs/CONFIGURATION.md) | source precedence, profiles, secrets, diagnostics |
72
+ | [CLI](docs/CLI.md) | command groups, output modes, exit codes, recipes |
73
+ | [Agents](docs/AGENTS.md) | registering agents, input modes, process handling, native adapters |
74
+ | [Pipelines](docs/PIPELINES.md) | pipeline definitions, step kinds, scheduling, results |
75
+ | [Agent Protocol v2](docs/PROTOCOL.md) | the interoperability spec external agents implement |
76
+ | [Providers](docs/PROVIDERS.md) | the provider contract, metadata, error normalization |
77
+ | [Memory](docs/MEMORY.md) | the memory contract, categories, retrieval, migration |
78
+ | [Reports](docs/REPORTS.md) | report schema, validation, aggregation, conflicts |
79
+ | [Persistence](docs/PERSISTENCE.md) | storage interfaces, durability, corruption, migration |
80
+ | [Security](docs/SECURITY.md) | secrets, process execution, trust model, sandbox boundary |
81
+ | [Testing](docs/TESTING.md) | the failure matrix and regression-test discipline |
82
+ | [Troubleshooting](docs/TROUBLESHOOTING.md) | symptom → cause → fix |
83
+ | [Migration](docs/MIGRATION.md) | v1 → v2 (compat, storage, config, protocol) |
84
+ | [Contributing](docs/CONTRIBUTING.md) | setup, workflow, release process |
85
+ | [Architecture](docs/ARCHITECTURE.md) | module map, workflow, execution states, audit |
86
+ | [API](docs/API.md) · [API stability](docs/API_STABILITY.md) · [Deprecations](docs/DEPRECATIONS.md) | the public surface and its guarantees |
87
+ | [CHANGELOG](CHANGELOG.md) · [v1 plan](docs/DEVELOPMENT_PLAN.md) · [v2 roadmap](docs/ROADMAP_V2.md) | history and plans |
258
88
 
259
- Start a project:
89
+ ## Roadmap
260
90
 
261
- ```bash
262
- omninode init # writes omninode.yaml in the current directory
91
+ The v1 plan (phases 0–11) is complete and shipped as **v1.0.0** — see
92
+ [docs/DEVELOPMENT_PLAN.md](docs/DEVELOPMENT_PLAN.md). The v2 roadmap
93
+ (24 phases) is in progress — see [docs/ROADMAP_V2.md](docs/ROADMAP_V2.md):
263
94
 
264
- # Register a provider and verify it end to end
265
- omninode provider add --name my-gateway --type openai-compatible \
266
- --base-url https://example.com/v1 --api-key-env-var MY_API_KEY
267
- omninode provider test my-gateway
95
+ | Version | Milestone |
96
+ | --- | --- |
97
+ | v0.1.0 – v0.10.0 | Foundation → end-to-end workflow |
98
+ | **v1.0.0** | Production Release (v1 plan complete) |
99
+ | **v2.0.0-alpha.N** | Reliability & interoperability line (phases 1–18 shipped) |
100
+ | v2.0.0 | Phases 19–24: package quality, performance, DX, CI/CD, migration tooling, final hardening |
268
101
 
269
- # Discover models into the registry
270
- omninode models
271
- omninode models my-gateway --capability chat
102
+ Install prereleases with:
272
103
 
273
- omninode agent list
274
- omninode role list
104
+ ```bash
105
+ npm install -g @hilbras/omninode@next
275
106
  ```
276
107
 
277
- Register and verify a CLI agent (anything executable works — `opencode`,
278
- `kimi`, a custom script):
108
+ Core architectural rule: OmniNode must run successfully with **zero Hilbras
109
+ dependencies**. OmniHilbras and Remembera make it more powerful, but neither is
110
+ required for the core engine.
111
+
112
+ ## Install
279
113
 
280
114
  ```bash
281
- omninode agent add --name opencode --command opencode --input-mode arg
282
- omninode agent test opencode # sends a trivial task over the real adapter
115
+ npm install -g @hilbras/omninode # stable (v1.0.0)
116
+ npm install -g @hilbras/omninode@next # v2 prereleases
283
117
  ```
284
118
 
285
- Create, run and track tasks (the `Project → Task → Role → Agent` chain):
119
+ Or as a library: `npm install @hilbras/omninode`. Node.js 20+.
120
+
121
+ Prefer a container? `docker build -t omninode .` then
122
+ `docker run --rm -v "$PWD:/work" -w /work omninode run my-pipeline "audit the repo"`.
123
+
124
+ ## Quick start
286
125
 
287
126
  ```bash
288
- omninode task create "audit the auth module" --role security-reviewer --agent opencode
289
- omninode task run task-xxxxxx
290
- omninode task status task-xxxxxx
291
- omninode task list
127
+ omninode init # writes omninode.yaml
128
+ omninode provider add --name my-gateway \
129
+ --base-url https://api.example.com/v1 --api-key-env-var MY_API_KEY
130
+ omninode agent add --name researcher --command some-agent --input-mode stdin
292
131
  ```
293
132
 
294
- Orchestrate several AI systems with a pipeline (§14):
133
+ Describe the work as a pipeline — in `omninode.yaml`:
295
134
 
296
135
  ```yaml
297
136
  project:
137
+ memory:
138
+ provider: local # or: remembera
139
+ planner:
140
+ kind: model
141
+ model: my-gateway:chatgpt
298
142
  pipelines:
299
143
  - id: repo-audit
300
144
  steps:
301
- - id: research
145
+ - id: research # independent analyses, run in parallel
302
146
  kind: research
303
- agents: [kimi, gemini, qwen]
304
- - id: plan
147
+ agents: [researcher, second-opinion]
148
+ - id: plan # findings + memory → typed implementation plan
305
149
  kind: plan
306
- model: my-gateway:chatgpt
307
- - id: execute
150
+ - id: execute # hand the plan to an execution agent
308
151
  kind: execute
309
- agent: opencode
152
+ agent: researcher
310
153
  ```
311
154
 
312
- ```bash
313
- omninode pipeline run repo-audit "Audit the authentication module"
314
- omninode report combined # the aggregated intelligence of that run
315
- omninode report show combined-xxx # grouped findings with per-source attribution
316
- omninode plan show plan-xxx # the implementation plan the planner produced
317
- ```
318
-
319
- The planner layer (§18) turns combined intelligence into an ordered,
320
- actionable implementation plan. Configure it once:
321
-
322
- ```yaml
323
- project:
324
- planner:
325
- kind: model # or heuristic for offline planning
326
- model: my-gateway:chatgpt
327
- ```
155
+ …then run the whole loop in one command:
328
156
 
329
157
  ```bash
330
- omninode init
331
- omninode status
332
- omninode run repo-audit "Audit the authentication module" # the whole workflow
333
- omninode pipeline retry run-xxxx # recover a failed run
334
- omninode task retry task-yyyy --run # recover a failed task
158
+ omninode run repo-audit "Audit the authentication module"
335
159
  ```
336
160
 
337
- Persistent memory (§19–§20) — opt in with `memory: { provider: local }` or
338
- `provider: remembera` in `omninode.yaml`:
339
-
340
- ```bash
341
- omninode memory status # provider + entry counts
342
- omninode memory query "authentication jwt" # what the agents will see
343
- omninode memory write "Decision: use rotating JWT secrets" --scope project --tags architecture
344
161
  ```
345
-
346
- See [omninode.yaml.example](omninode.yaml.example) for a full configuration.
347
-
348
- ### Configuration
349
-
350
- OmniNode reads `omninode.yaml` (or `.yml` / `.json`) from the working directory.
351
- Two rules matter:
352
-
353
- 1. **Credentials never live in the file.** Reference environment variables with
354
- `api_key_env_var: MY_API_KEY`; `${VAR}` / `${VAR:-fallback}` references anywhere
355
- in the file are expanded at load time and unset variables abort loading.
356
- 2. **Unknown keys are rejected.** Typos fail loudly instead of being ignored.
357
-
358
- ## Development
359
-
360
- ```bash
361
- npm run build # bundle with tsup (library + CLI)
362
- npm test # run tests once
363
- npm run test:watch # watch mode
364
- npm run lint # eslint
365
- npm run typecheck # tsc --noEmit
366
- npm run format # prettier
162
+ [research] completed
163
+ [plan] completed
164
+ [execute] completed
165
+ reports: 2 structured report(s)
166
+ combined report: combined-m4f2
167
+ plan: plan-a91
168
+ result: Fixed JWT verification and added regression tests.
169
+ Pipeline completed. Run id: run-a91
367
170
  ```
368
171
 
369
- ## Roadmap
370
-
371
- Phases 0–11 are laid out in [docs/DEVELOPMENT_PLAN.md](docs/DEVELOPMENT_PLAN.md):
372
-
373
- | Version | Milestone |
374
- | --- | --- |
375
- | v0.1.0 | Foundation |
376
- | v0.2.0 | Provider System |
377
- | v0.3.0 | OmniHilbras Integration (optional, like every provider) |
378
- | v0.4.0 | Agent System |
379
- | v0.5.0 | Roles & Tasks |
380
- | v0.6.0 | Pipeline Engine |
381
- | v0.7.0 | Multi-AI Reports |
382
- | v0.8.0 | Remembera / Memory |
383
- | v0.9.0 | Planner |
384
- | v0.10.0 | End-to-End Workflow (current) |
385
- | **v1.0.0** | **Production Release — Phases 10 + 11 (current, final)** |
386
-
387
- Core architectural rule: OmniNode must run successfully with **zero Hilbras
388
- dependencies**. OmniHilbras and Remembera make it more powerful, but neither is
389
- required for the core engine.
390
-
391
- ## Documentation
392
-
393
- - [Development plan](docs/DEVELOPMENT_PLAN.md) — the full 12-phase roadmap
394
- - [Architecture](docs/ARCHITECTURE.md) — module map, workflow, local state
395
- - [Security model](docs/SECURITY.md) — secrets, process execution, env isolation, audit log
396
- - [API stability policy](docs/API_STABILITY.md) and [public API inventory](docs/API.md)
397
- - [Configuration](docs/CONFIGURATION.md) · [CLI guide](docs/CLI.md) · [Agent Protocol v2 spec](docs/PROTOCOL.md) · [Providers](docs/PROVIDERS.md) · [Memory](docs/MEMORY.md) · [Reports](docs/REPORTS.md) · [Persistence](docs/PERSISTENCE.md) · [Deprecations](docs/DEPRECATIONS.md) · [Changelog](CHANGELOG.md) · [v2 roadmap](docs/ROADMAP_V2.md)
398
- - [Example project](examples/demo/) — a runnable end-to-end demo (`./demo.sh`)
399
-
400
- Prefer a container? `docker build -t omninode .` then
401
- `docker run --rm -v "$PWD:/work" -w /work omninode run my-pipeline "audit the repo"`.
402
-
403
- ## Install
172
+ Inspect what happened, in text or JSON:
404
173
 
405
174
  ```bash
406
- npm install -g @hilbras/omninode
175
+ omninode pipeline inspect run-a91
176
+ omninode report combined
177
+ omninode plan show plan-a91
178
+ omninode task inspect task-… --json | jq .
179
+ omninode audit -n 50
407
180
  ```
408
181
 
409
- Or use it as a library: `npm install @hilbras/omninode`.
182
+ Prefer to start from something runnable? [`examples/demo/`](examples/demo/)
183
+ contains a complete project and `./demo.sh` that exercises the full loop with
184
+ agents that need no external tools.
410
185
 
411
186
  ## Connecting OmniHilbras
412
187
 
package/dist/cli/index.js CHANGED
@@ -23,7 +23,7 @@ import { realpathSync } from "fs";
23
23
  import { Command } from "commander";
24
24
 
25
25
  // src/version.ts
26
- var OMNINODE_VERSION = "2.0.0-alpha.16";
26
+ var OMNINODE_VERSION = "2.0.0-alpha.18";
27
27
 
28
28
  // src/cli/exit-codes.ts
29
29
  var EXIT = {
@@ -346,6 +346,7 @@ function loadConfigDetailed(options = {}) {
346
346
  { details: { issues } }
347
347
  );
348
348
  }
349
+ assertUniqueNames(parsed.data);
349
350
  return {
350
351
  config: toAppConfig(parsed.data),
351
352
  sources: {
@@ -357,6 +358,26 @@ function loadConfigDetailed(options = {}) {
357
358
  }
358
359
  };
359
360
  }
361
+ function assertUniqueNames(data) {
362
+ const groups = [
363
+ ["provider", data.project.providers.map((p) => p.name)],
364
+ ["agent", data.project.agents.map((a) => a.name)],
365
+ ["role", data.project.roles.map((r) => r.id)],
366
+ ["pipeline", data.project.pipelines.map((p) => p.id)]
367
+ ];
368
+ for (const [kind, names] of groups) {
369
+ const seen = /* @__PURE__ */ new Set();
370
+ for (const name of names) {
371
+ if (seen.has(name)) {
372
+ throw new ConfigError(
373
+ "CONFIG_INVALID",
374
+ `Duplicate ${kind} name "${name}" \u2014 every ${kind} must have a unique name.`
375
+ );
376
+ }
377
+ seen.add(name);
378
+ }
379
+ }
380
+ }
360
381
  function readConfigDocument(path2, optionsEnv) {
361
382
  const raw = readFileSync(path2, "utf8");
362
383
  const secretFindings = scanForInlineSecrets(raw);
@@ -2479,6 +2500,7 @@ var TaskEngine = class {
2479
2500
  const result = {
2480
2501
  ...output.summary !== void 0 ? { summary: output.summary } : {},
2481
2502
  ...output.reports !== void 0 && output.reports.length > 0 ? { reports: output.reports } : {},
2503
+ ...output.protocol !== void 0 ? { protocol: output.protocol } : {},
2482
2504
  // Keep the verbatim output (bounded) for report extraction and audit.
2483
2505
  ...output.rawOutput !== void 0 && output.rawOutput.length > 0 ? { rawOutput: output.rawOutput.slice(0, 1e4) } : {},
2484
2506
  ...output.error !== void 0 ? { error: output.error } : {},