Skip to content

[codex] Wire packaged WASM assets#34719

Closed
AlHeloween wants to merge 473 commits into
anomalyco:devfrom
AlHeloween:Local_Development
Closed

[codex] Wire packaged WASM assets#34719
AlHeloween wants to merge 473 commits into
anomalyco:devfrom
AlHeloween:Local_Development

Conversation

@AlHeloween

Copy link
Copy Markdown

Summary

  • Load packaged WASM assets through runtime path helpers so compiled executables can find tokenizer, TreeSitter, diff, and JSON repair modules.
  • Add WASM health diagnostics and focused coverage for tokenizer, diff, JSON repair, and bash permission/path behavior.
  • Fix Windows path containment and PowerShell/drive-relative bash permission parsing edge cases.
  • Clear ADID syntax warnings and move completed WASM plans to plans_completed/.

Root Cause

The compiled executable could not reliably resolve bundled WASM assets at runtime, so modules could silently fall back or fail instead of loading from the packaged binary layout.

Validation

  • bun run test test\tool\bash.test.ts from packages/opencode: 94 pass, 1 skip, 0 fail
  • bun typecheck from packages/opencode via cmd_runner: exit code 0
  • tools\adm.exe --verify-all packages\core\src packages\opencode\src\tool packages\opencode\src\util packages\opencode\test\tool updates: 118 OK, 0 WARN

Notes

This PR is draft because the branch includes several local commits ahead of the fork remote, not only the final WASM commit.

…ues (all items resolved/deferred), preexisting_provider_git_init (both deferred)
…+ plan cleanup

- Replace bus.subscribeAll() with eventsBus.all() via EventV2Bridge in plugin layer
- Add media rendering smoke tests (chafa symbols, mpv tct/gpu, ffmpeg keyframe)
- Create agent pipeline & media capability plan (3-module: capability tool, chained agents, TUI media)
- Move resolved plan 20260601 to plans_completed, create 20260623 remaining items plan
- Update DOCINDEX.md and index.md to reflect plan changes
- Add .gitignore patterns for backup/baseline/log files and artifacts
Add a capability subsystem and supporting plans/docs. Changes include:

- packages/opencode/package.json: add "yaml" dependency.
- packages/opencode/src/capability/index.ts: new Capability service (Schema, read/write models_capabilities.yaml, lookup API combining provider/model metadata and auth keys, Effect/Layer service and defaultLayer).
- packages/opencode/src/tool/capability.ts: new capability Tool that reads models, auth and YAML to produce a formatted capability lookup table.
- packages/opencode/src/tool/registry.ts: register and init the new capability tool in the tool registry.
- plans/: add/expand planning docs for the capability TUI renderer (A5), agent pipeline (B), media TUI rendering (C), and multimodal messages/capability injection (D); update the main plan to include test results and revised implementation order.

Purpose: provide a discoverable way to lookup model capabilities (including provenance, API key availability, modalities and estimated cost), expose that functionality as a user-invokable tool, and document UI/agent changes to render and handle multimodal outputs.
…x prompt_cache_key naming

- Add chat_template_kwargs: {thinking: true} for NVIDIA + DeepSeek V4 models
 to prevent API hangs (NVIDIA NIM requires this parameter).
 Closes anomalyco#24264

- Fix prompt_cache_key camelCase -> snake_case for openai-compatible,
 azure, deepseek, and openai providers to match OpenAI API spec.
 Venice and opencode providers intentionally kept camelCase
 (their SDKs expect it).

- Add 6 new tests: chat_template_kwargs injection (3 tests) +
 provider-specific prompt_cache_key (3 tests).

- Update 6 existing setCacheKey tests to use prompt_cache_key.

- Experiments confirm: DeepSeek DIRECT caches at 82% via content-
 addressable caching. NVIDIA NIM does NOT support prompt caching
 (no prompt_cache_hit_tokens in response, prompt_tokens_details: null).
 158/158 transform tests pass.
…ents, output modalities, assistant media context)
…mplemented), move completed plans to plans_completed/, update index.md
Updates provider/system prompt templates and removes obsolete prompt files while tightening instruction consistency across Claude/Codex/GPT/Gemini flows. Fixes AGI mode duplicate dispatches by sharing session/state machine signals across hook call sites, and fixes JSON repair handling of apostrophes in single-quoted values (with new regression tests). Also adds project-agnostic docs fixtures and updates skill docs/binaries to reference the new asset-path conventions and cmd_runner integration.
Load packaged WASM assets through runtime path helpers, surface WASM health diagnostics, and cover tokenizer/diff/json repair behavior.

Fix Windows bash permission parsing and path containment edge cases, extend Windows shell test timeouts, and clear ADID syntax warnings.
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Hey! Your PR title [codex] Wire packaged WASM assets doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

Refresh provider model metadata across Groq, LLM Gateway, NovitaAI, OpenRouter, and StepFun (pricing, cache fields, timestamps, and model entries), and add a new `subconscious` provider catalog. Also add the WASI migration planning doc, move completed planning docs into `plans_completed/`, and include a small wasm test experiment file.
…lyco#10;jj snapshot plan: jj.exe binary, snapshot/index.ts jj-only plumbing,&anomalyco#10;smoke tests all confirmed.&anomalyco#10;&anomalyco#10;Deferred architectural master: all 16 tracked items [x] Done,&anomalyco#10;sub-plans confirmed in plans_completed/.&anomalyco#10;&anomalyco#10;CPU hotspots: A6 findUp/globUp cache found implemented at&anomalyco#10;filesystem.ts:9-269 (plan was stale, code reality confirmed).
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 1, 2026
@github-actions github-actions Bot closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant