anomalyco / anomalyco/opencode-drive

check: explain how to validate one-shot Effect programs

Open
#86 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
TypeScript
Stars
32
Forks
3
Avg merge
12m
Merged PRs (30d)
17

Description

With Drive 2.1.0, opencode-drive check drive.ts on a default-exported OpenCodeDriver.use(...) program reports TS2322: Type Effect<...> is not assignable to type ScriptDefinition from the generated script-contract file. The program shape is supported by opencode-drive run but the error does not explain the distinction.

Reproduction: save the README's one-shot Effect example and run opencode-drive check against it. Expected: validate the supported one-shot shape, or explain that check accepts defineScript and direct the caller to run. Actual: an internal TypeScript contract error.

This came up while preparing a matched TUI recording against OpenCode V2 revision 7a4ad68af6. Recovery is to use run, which performs its own typecheck.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README's one-shot Effect example and reproduce the failure using opencode-drive check drive.ts. Compare the check path with opencode-drive run, which successfully typechecks this program shape. Done means the supported shape validates or the command gives clear guidance to use run or defineScript instead of exposing an internal TypeScript contract error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.