xiaoju
a1dda1d731
feat(daemon,cli): RFC-003 Phase 5 — Integration (hot-reload + validate)
...
- Kernel: rebuild AgentRegistry on config hot-reload, log agent_registry_reload
- Running threads unaffected, new threads use rebuilt registry
- nerve validate: check agent name refs in WorkflowSpec source files
- nerve validate: verify adapter type is known (KNOWN_AGENT_ADAPTER_IDS)
- nerve validate: require extract config when WorkflowSpec agent refs exist
- Tests: kernel reload (mock), validate (missing/valid/extract/adapter)
Closes #239
Ref: #234
2026-04-29 05:23:59 +00:00
xiaoju
1218b5ddbd
feat(core,daemon): RFC-003 Phase 4 — WorkflowSpec Compiler
...
- WorkflowSpec + RoleSpec types in packages/core
- compileWorkflowSpec: WorkflowSpec → WorkflowDefinition (daemon)
- resolveRoleTimeoutMs: two-level timeout (role override > agent default)
- parseDurationStringToMs extracted to shared duration.ts
- AgentRegistry.getAgentConfig for timeout lookup
- Tests: 10 new cases (compile shape, agent→extract flow, timeout resolution)
- Backward compat: hand-written Role<Meta> unchanged
Closes #238
Ref: #234
2026-04-29 05:11:29 +00:00
xiaoju
136aafa209
feat(workflow-utils): RFC-003 Phase 3 — Extract Layer
...
- llmExtractWithRetry: retry-once on parse failure with error context
- mergeExtractConfig: three-level merge (global → agent → role)
- extractMetaOrThrow + createLlmExtractFn: ExtractFn factory
- ZodMetaSchema bridges core Schema<T> with runtime Zod validation
- Tests: 8 new cases (success/retry/throw/merge/factory)
- core tsconfig: add DOM lib for AbortSignal declaration emit
Closes #237
Ref: #234
2026-04-29 04:59:47 +00:00
xiaoju
88bd30a1e4
feat(daemon): RFC-003 Phase 2 — AgentRegistry + echo adapter
...
- createAgentRegistry(agents) returns { get(name): AgentFn }
- get() throws with agent name in message if not found
- Echo adapter (type: 'echo') returns prompt as-is for testing
- Tests: 5 cases covering get/throw/echo/multi-agent/AbortSignal
Closes #236
Ref: #234
2026-04-29 04:49:22 +00:00
xiaoju
36e5aed1b1
feat(core): RFC-003 Phase 1 — agent config types + nerve.yaml schema
...
- Add AgentFn, WorkflowContext (workdir + AbortSignal), ExtractFn, ExtractError
- Add AgentConfig, ExtractConfig types to NerveConfig
- Extend parseNerveConfig: agents (kebab-case keys) + extract sections
- Export all new types from @nerve/core
- Add config parse tests (7 new tests)
- Update all existing test fixtures with agents/extract fields
Closes #235
Ref: #234
2026-04-29 04:43:08 +00:00
xiaoju
7a4e16381c
docs(rfc): address review — resolve open questions, add error handling/hot-reload/context/validation
...
- model: auto = delegate to adapter's default strategy
- ExtractFn: retry once + throw ExtractError, three-level merge (global → agent → role)
- Agent hot-reload: AgentRegistry rebuilds on config change, running threads unaffected
- WorkflowContext: add workdir + AbortSignal
- Configuration validation: nerve validate checks agent name refs
- WorkflowSpec compile: runtime lazy compile at daemon startup/hot-reload
- Compatibility: existing hand-written Role functions continue to work (not breaking)
- Resolved 3 of 5 open questions, 2 remaining (long-term memory, embedding service)
Refs #233
2026-04-29 04:26:48 +00:00
xiaoju
aecced587c
docs(rfc): knowledge layer — built-in, local-first, repo-scoped
...
Replaces the Alysaril delegation with a built-in knowledge feature:
- knowledge.yaml at repo root with include/exclude
- knowledge.db (SQLite) stores chunks + embeddings locally
- Remote service only for embedding computation + content-hash cache
- In-memory cosine search (sufficient for project scale)
- CLI: nerve knowledge sync/query with -r and -g flags
Refs #233
2026-04-29 04:12:09 +00:00