Skip to content

Feat/effect consumer protocol and sdk 0.7 - #5

Merged
ObsisMc merged 2 commits into
mainfrom
feat/effect-consumer-protocol-and-sdk-0.7
Aug 31, 2026
Merged

Feat/effect consumer protocol and sdk 0.7#5
ObsisMc merged 2 commits into
mainfrom
feat/effect-consumer-protocol-and-sdk-0.7

Conversation

@ObsisMc

@ObsisMc ObsisMc commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

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.
@ObsisMc
ObsisMc merged commit 59d0606 into main Aug 31, 2026
1 check passed
@ObsisMc
ObsisMc deleted the feat/effect-consumer-protocol-and-sdk-0.7 branch August 31, 2026 03:17
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