Visitar URL original
feat(acp): project plugin plans live and during replay by danyel117 · Pull Request #53929 · anomalyco/opencode · GitHub
Skip to content

feat(acp): project plugin plans live and during replay - #53929

Open
danyel117 wants to merge 2 commits into
anomalyco:devfrom
danyel117:goal-acp-plan
Open

danyel117 wants to merge 2 commits into
anomalyco:devfrom
danyel117:goal-acp-plan

Conversation

@danyel117

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #53928

Related user report: prevalentWare/opencode-goal-plugin#59

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Project successful plugin tool metadata.acp.plan into ACP's standard plan notification, live and during saved-message replay. Validate ACP entry content, priority and status; ignore absent or malformed metadata. Preserve ordinary tool updates and prevent child plans from replacing the root plan when child updates are disabled. Optional _meta survives projection.

The generic convention has no goal-plugin dependency. Command lifetime and explicit Cancel are independent changes in #53913.

How did you verify your code works?

Required Bun 1.4.2: full lint and all 36 package typechecks pass. This independent slice's full ACP suite: 108 pass, 0 fail. Regressions cover live/replayed plans, child isolation, and absent/malformed metadata.

The combined implementation with #53913 and an isolated packed goal plugin was tested through native ACP against a local SSE provider: a two-phase plan retains the overall objective after parser completion, then verifies execution before completing; five live plans and five replayed plans. This PR's own unit tests require no goal plugin or provider credentials.

Screenshots / recordings

ACP notification transcripts; no client UI changes. Native Zed rendering is not asserted by the transport fixture.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Chain Context

Independent host slice: 139 changed lines, starts at v2 434f7b2 and ends with live/replayed plan projection. Goal persistence and planning semantics remain in the plugin. #53913 fixes command lifetime independently; neither host slice depends on the other. Rollback removes the metadata decoder and plan projection only.

v2
 ├── #53913 command lifetime and Cancel
 └── 📍 plan projection

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked this at the translation level. On the base, the new live/replay test fails: no plan update is emitted for a tool whose metadata carries acp.plan. With this PR, the ACP suite passes (108/108), and the cli typecheck and oxlint are clean. I didn't run it end to end with a real plugin.

The change looks sound to me:

  • The decoder is shared and strict, and malformed metadata is ignored without throwing.
  • Normal tool updates are unchanged.
  • Child plans don't reach the root unless the client opted into child updates.
  • Replay only covers the root session's own messages, so child plans can't leak in that way either.

The tests are small and focused.

Two points for maintainers rather than code issues:

  • metadata.acp.plan becomes a new public convention for plugins, and the PR doesn't document it anywhere.
  • #31834 proposes building ACP plans from todowrite. If both land, plans from the two sources would replace each other in the client.

@thdxr
thdxr changed the base branch from v2 to dev October 10, 2026 19:37

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACP does not project plugin plan metadata live or during replay

1 participant