cloudaxe-opencode/packages/opencode
Aiden Cline bd51cdba12 refactor(llm): redesign error model as flat tagged union
- Replace LLMError { module, method, reason } wrapper with a flat tagged
  union: BadRequest, Authentication, PermissionDenied, NotFound, RateLimit,
  QuotaExceeded, ContentPolicy, ContextOverflow, ServerError, APIError,
  ConnectionError, TimeoutError, MalformedResponse, NoRoute.
- Delete the provider-error LLMEvent: streams carry output only and every
  failure exits through the typed error channel.
- Add one shared classifyApiFailure classifier used by the HTTP executor,
  protocol stream errors, and the AI SDK adapter so all routes classify
  identically (including OpenAI in-stream rate_limit_exceeded and
  internal_error codes).
- Enforce a terminal contract in LLMClient.stream for every route: EOF
  without finish and output after finish fail as MalformedResponse.
- Classify AI SDK failures properly in core/aisdk.ts instead of collapsing
  to UnknownProvider; preserve status, headers, body, and retry-after.
- Simplify the session runner: drop held-back overflow events, key overflow
  recovery off LLM.ContextOverflow, retry RateLimit | ServerError |
  ConnectionError | TimeoutError.
- Map new tags in toSessionError (provider.context-overflow,
  provider.timeout, provider.not-found).
2026-07-13 00:47:32 -05:00
..
bin fix(cli): forward signals from npm shim (#26259) 2026-05-08 14:00:51 -05:00
migration/20260511173437_session-metadata refactor(core): move database schema ownership (#29068) 2026-05-30 21:08:38 -04:00
script fix(core): revert form service and mcp elicitation (#35080) 2026-07-03 00:32:10 -05:00
specs refactor: remove todo tool (#35989) 2026-07-09 00:13:48 -05:00
src refactor(llm): redesign error model as flat tagged union 2026-07-13 00:47:32 -05:00
test refactor(llm): redesign error model as flat tagged union 2026-07-13 00:47:32 -05:00
.gitignore Load models.dev snapshot from build global (#28077) 2026-05-17 21:59:44 -04:00
AGENTS.md docs(opencode): mark package as v1 2026-06-27 01:16:30 -04:00
bunfig.toml tui plugins (#19347) 2026-03-27 15:00:26 +01:00
Dockerfile add ARM64 Docker image support (#5483) 2025-12-13 13:01:59 -06:00
git feat: interactive update flow for non-patch releases (#18662) 2026-03-22 23:12:40 +00:00
package.json chore: merge dev into v2 (#36144) 2026-07-09 16:32:44 -05:00
parsers-config.ts refactor(server): canonicalize service API (#31049) 2026-06-07 03:27:28 +00:00
README.md
sst-env.d.ts
tsconfig.json refactor(server): canonicalize service API (#31049) 2026-06-07 03:27:28 +00:00

js

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.2.12. Bun is a fast all-in-one JavaScript runtime.