GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — fix(cli): await plugin activation before caching ACP catalog by kitlangton · Pull Request #46682 · anomalyco/opencode Conversation
|
| Surface | Before | After |
|---|---|---|
POST /api/plugin/await-activation?directory=… |
— | Waits for configured activation at that Location to settle; returns 204 |
client.plugin.awaitActivation({ location }) |
— | Generated Effect and Promise clients |
ACP loadCatalog |
Polls model/agent lists for up to 5 s | Awaits activation once, then keeps the existing background-discovery poll |
| ACP catalog cache | Caches a partial catalog forever | Caches only after activation; a failed load is evicted so the next request retries |
sequenceDiagram
participant Editor as ACP client
participant ACP as acp/service.ts
participant Server
participant Supervisor as PluginSupervisor
Editor->>ACP: first request for cwd
ACP->>Server: POST /api/plugin/await-activation
Server->>Supervisor: awaitActivation
Supervisor-->>Server: configured plugins settled
Server-->>ACP: 204
ACP->>Server: model.list / model.default / agent.list / …
ACP-->>Editor: catalog with configured defaults
Completion means configured activation and missing-package installs have settled at that Location. It does not mean every plugin succeeded or that background resource discovery has finished, which is why ACP retains its short discovery poll after the barrier. Cancelling the wait does not cancel activation; the handler delegates to the existing PluginSupervisor.awaitActivation and both plugin contexts still expose only Pick<PluginApi, "list">, so plugin setup cannot acquire a self-wait.
The provider endpoint tests now hold activation explicitly, assert that list/get stay responsive while it is pending, and check configured results after release. Request guards and test deadlines are unchanged.
Public protocol addition plus generated client surfaces, one ACP call site, and server tests. Model and plugin list endpoints remain nonblocking. Stacked on #46610; the State materialization change in #46725 is stacked on this PR because its fresh reads made the ACP partial-catalog window observable in CI.
# packages/protocol, server, cli, client bun typecheck # packages/client — generated surfaces are in sync bun run generate # packages/server bun run test test/plugin-activation.test.ts test/provider.test.ts # packages/cli bun run test test/acp
bun run generate produces no diff.does not cache an available model before plugin activation settles fails before the change: the first request was /api/skill rather than /api/plugin/await-activation.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
f61dc5c to
3560d7d
Compare
3560d7d to
3f68aa4
Compare
Gate configured-provider activation instead of requiring cold startup to finish inside a read timeout. Assert that list and get return while activation is held, then verify the configured provider after activation settles.
3f68aa4 to
fa66cb8
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.