GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE]: export Tool from @opencode/plugin/effect · Issue #62367 · anomalyco/opencode

[FEATURE]: export Tool from @opencode/plugin/effect #62367

New issue
Copy link
New issue
Copy link
Closed
#63698
Closed
[FEATURE]: export Tool from @opencode/plugin/effect#62367
#63698
Copy link

Description

@cevr
cevr
opened on Nov 6, 2026
Issue body actions

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

An Effect plugin's tool.hook("execute.before") refuses a call by failing with Tool.Error, but @opencode/plugin/effect re-exports every other schema (Provider, Rpc, Skill, Vcs, …) except Tool. A plugin has to import from @opencode/schema/tool, which isn't a declared dependency of a plugin, or define its own copy of the class, which the host may not recognise.

Proposal: one line in packages/plugin/src/effect/index.ts:

export { Tool } from "@opencode/schema/tool"
import { Tool } from "@opencode/plugin/effect"

ctx.tool.hook("execute.before", (event) =>
  event.tool === "shell" && blocked(event.input) ? Effect.fail(new Tool.Error({ message: "blocked" })) : Effect.void)

With an export test on my fork: cevr@f613c36. Happy to open the PR.

Activity

  1. opencodejr commented on Nov 6, 2026

    @opencodejr
    opencodejrBot
    on Nov 6, 2026
    Contributor
    More actions

    Thanks for the clear proposal, @cevr!

    You're asking for Tool to be re-exported from @opencode/plugin/effect, like the other schema namespaces. That way an Effect plugin can fail tool.hook("execute.before") with Tool.Error without depending on @opencode/schema directly. I checked packages/plugin/src/effect/index.ts, and Tool is indeed the one missing even though the execute.before hook's error type is Tool.Error.

    Maintainers will consider it, including your offer to open the PR. In the meantime, import { Tool } from "@opencode/schema/tool" works wherever that package resolves.

    Related plugin API requests, for context:

    • [FEATURE]: Expose resolved tool identity to tool.execute.before hooks #56820: expose resolved tool identity to tool.execute.before hooks
    • [FEATURE]: Plugin API: let a plugin run its tool transform last #57217: let a plugin run its tool transform last
    • [FEATURE]: plugin shell domain: list, get, output, wait, kill #62361: plugin shell domain
  2. rekram1-node
    closed this as completedin #63698on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.