Skip to content

feat(acp): Implement ACP thread goal support#491

Merged
CSRessel merged 29 commits into
mainfrom
feat/goal
Jun 1, 2026
Merged

feat(acp): Implement ACP thread goal support#491
CSRessel merged 29 commits into
mainfrom
feat/goal

Conversation

@CSRessel
Copy link
Copy Markdown
Collaborator

Summary

🤖 Generated with Nori

  • Adds ACP-owned /goal state, resume rehydration, usage accounting, hidden continuations, and TUI command behavior for active thread goals.
  • Exposes backend-owned nori-goal MCP tools to HTTP-MCP-capable ACP agents and chains hidden goal continuations only for agents that can stop the loop with goal tools.
  • Updates ACP noridocs and CURRENT-PROGRESS with architecture decisions, gaps addressed, and close-loop artifacts.

Test Plan

  • cargo test -p nori-acp
  • cargo build --bin nori && cargo test -p tui-pty-e2e
  • just fmt
  • just fix -p nori-acp
  • Live TUI smoke with ElizACP via tmux puppeteering; capture in nori-rs/closing-loop/goal-006/

Share Nori with your team: https://www.npmjs.com/package/nori-skillsets

@CSRessel CSRessel changed the title Implement ACP thread goal support feat(acp): Implement ACP thread goal support May 28, 2026
@CSRessel CSRessel merged commit 5e3df47 into main Jun 1, 2026
2 checks passed
@CSRessel CSRessel deleted the feat/goal branch June 1, 2026 17:00
CSRessel added a commit that referenced this pull request Jun 1, 2026
## Summary
🤖 Generated with [Nori](https://noriagentic.com/)

Rebased onto `main` after #491 merged. Implements review item **R1**:
replace the goal feature's hand-rolled networking with the workspace's
rmcp SDK, and rename the loopback MCP server `nori-goal` ->
`nori-client`.

- **Delete the bespoke stack**: removes `thread_goal_http_mcp.rs` and
the hand-dispatched JSON-RPC in `thread_goal_mcp.rs`.
- **rmcp server**: new `nori_client_mcp.rs` hosts
`get_goal`/`create_goal`/`update_goal` as typed `#[tool]` handlers on an
rmcp `StreamableHttpService` (stateless), served over a loopback `axum`
listener. Behavior preserved: same tool semantics, same
`ThreadGoalUpdated` events, same connected-gate flip on `initialize` for
hidden-continuation chaining.
- **Rename `nori-goal` -> `nori-client`**: the advertised server is
Nori's general harness-side channel to the agent; the goal tools are its
first tenants. Renamed across code, tests, and docs.
- **Deps**: `acp/Cargo.toml` gains `axum` and enables rmcp
server/macros/schemars/streamable HTTP server features; tests enable the
rmcp streamable HTTP client feature.

## Test Plan
- [x] `cargo test -p nori-acp` (passed: lib tests, integration tests,
and doc tests; includes `real_mcp_client_round_trips_over_http` and
over-the-wire continuation-gate coverage)
- [x] `cargo build --bin nori`
- [x] `cargo test -p tui-pty-e2e`
- [x] `just fmt`
- [x] `env RUSTC_WRAPPER= just fix -p nori-acp` (sccache was blocked in
this environment; clearing `RUSTC_WRAPPER` let clippy run cleanly)
- [x] Close-the-loop: drove the TUI with `elizacp` in isolated tmux;
verified `agent: elizacp`, prompt render, input submission, and prompt
return.

Share Nori with your team: https://www.npmjs.com/package/nori-skillsets
CSRessel added a commit that referenced this pull request Jun 2, 2026
## Summary

The release build on `main` is failing to compile while branch checks
and the main check pass. Run that surfaced it:
https://github.com/tilework-tech/nori-cli/actions/runs/26769466753

Root cause:

- PR #491 (ACP thread goal support) added `thread_goal.rs`, which calls
`self.send_error(&message)` at `thread_goal.rs:392` in a **non-debug**
code path (a real user-facing validation error: "goal update must
include an objective or status").
- `send_error` (`submit_and_ops.rs:298`) was gated behind
`#[cfg(debug_assertions)]` — it was originally only called from a
debug-gated branch, so the method itself was debug-only.
- CI never caught it: every check (`rust-ci.yml`, branch checks, main
check) builds and tests with `--profile ci-test`, which `inherits =
"test"` → debug-assertions **on** → the method exists.
- The release job runs `cargo build --release` (`nori-release.yml:365`).
`[profile.release]` leaves debug-assertions at its default of **off** →
the method is compiled out → `E0599: no method named send_error`.

Fix: remove the `#[cfg(debug_assertions)]` gate so `send_error` exists
in all builds. The error event it emits is a legitimate user-facing path
in release, so it should not be compiled out. The remaining debug-only
caller (`submit_and_ops.rs:257`, unknown-op diagnostic) stays
debug-gated and is unaffected; the method is still used in release via
the thread goal handler, so there is no dead-code warning.

## Test plan

- [x] Reproduced the exact failure locally: `cargo check --release -p
nori-acp` → `E0599` at `thread_goal.rs:392`.
- [x] Confirmed fix: `cargo check --release -p nori-acp` compiles
cleanly.
- [ ] CI green (release build + branch checks).

Co-authored-by: Cliff <clifford@tilework.tech>
Co-authored-by: Nori <contact@tilework.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant