Feat/effect consumer protocol and sdk 0.7 - #5
Merged
Conversation
Ora's Effect system was rebuilt around Targets and Resources, which replaces this plugin's whole Consumer surface. The old `effect/waitForIdle` + `effect/restart` pair is gone; a Consumer now serves `effect/coordinate`, `effect/reactivate`, and `effect/verifyReady`, declares `effectResources` rather than `effectSurfaces`, and names the materialization format `ora/skill-directory.v1`. **The coordination model inverted.** `waitForIdle` was a poll: it returned `waiting_for_idle` until it happened to observe an idle moment, and only then latched the barrier. `coordinate` is called once and must establish the barrier itself, so the order is reversed — the barrier goes up first, then the in-flight turns are awaited. That is not a translation detail: a workspace whose prompts keep arriving never presents an idle moment to observe, while holding first makes the set of turns to wait for finite, so the wait always terminates. The wait is bounded at 10s because Ora allows a plugin control call 30 seconds and coordination holds that call open. Past the bound the honest answer is to fail the attempt and let Ora's reconcile schedule bring the mutation back, rather than hold a host call for the length of a prompt that may legitimately run for minutes: the retry loop moved from this plugin's return value into the host's scheduling. Failing releases the barrier first, because Ora only reactivates Targets whose coordination succeeded — an abandoned barrier would hold its queued prompts for the life of the process. `verifyReady` reports "not ready" by throwing, since Ora records readiness only from a call that returned. The generation-based restart dedupe moved there, because `generation` now travels with readiness rather than with reactivation; `reactivate` dedupes on the barrier itself, which is the actual episode marker. **Reaching the CLI.** `spawnAgentProcess` replaces this plugin's own bundled-vs-PATH branch. It asks for the bundled binary first and falls back to a PATH lookup on exactly one answer — the host reporting that this package carries no such file — so a bundled package never silently runs some other OpenCode, and a bundled binary that is present but unrunnable raises `AGENT_UNUSABLE` instead of being retried forever as a missing CLI. Windows tries three PATH spellings because installers disagree about what they leave there. **Packaging.** `scripts/package.ts` no longer imports the plugin's own `bundled-binary.ts`; the in-package staging path comes from `bundle.config.ts` instead. The script is meant to be copied to another agent plugin unchanged, and reaching into `src/` required every plugin to carry that module even when it bundles no CLI at all. Verified by installing the built .orax into Ora: the agent starts, models list, and a Skill install drives the full chain — Ora leaves a managed `.opencode/skills/<name>` tree with its `.ora-managed.json` ledger marker. Note: `deno.json` pins @ora-space/plugin-sdk@0.7.0, which is not published yet. CI's type-check step will fail until it is, which ci.yml documents as the intended, visible behavior; lint resolves nothing and stays green.
The previous commit's lockfile recorded @ora-space/plugin-sdk under `links` with no integrity hash — residue from building against a local checkout while 0.7.0 was unpublished. deno.json named the jsr specifier correctly, so the mismatch was invisible there: the lockfile was the only place still describing the SDK as a local override. Now that 0.7.0 is published it resolves normally, as a `jsr` entry carrying the integrity hash every other dependency has.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.