opencode/packages/core/test/plugin
Ryan Vogel e86ed5d0e0 fix(core): limit provider packages from remote sources to known names
A provider's `package` from the Console config (new and legacy formats) and
from the models.dev catalog was used as written. Picking such a model made
OpenCode npm-install and import that package, so whoever controlled the
Console response or the catalog could run any code (npm, git, file or URL
spec) on every connected machine, contradicting the rule that a remote
config can never run commands.

Add Provider.remotePackage: a remote source may only name builtin
@opencode/ai/* packages, official @ai-sdk/* packages, or the third-party AI
SDK providers the catalog already routes through, by bare name (no version,
git, file, URL or path spec). ConfigIntegration.make and the legacy Console
transform drop any other provider or model package, so the provider falls
back to the package it would use without one. models-dev route() skips a
model whose package is not allowed. Local config files still name any
package.

Removed: a Console or catalog entry can no longer name an arbitrary npm
package; such models now use the provider's default package (Console) or are
left out (catalog).

Verified: bun typecheck (core), bun run check (root), models, provider-opencode,
config/provider, config/config, models-dev, provider, aisdk-native and gitlab
test files pass; new cases fail with the predicate disabled and the local
case fails when the predicate is applied to local config.
2026-10-26 14:42:48 -04:00
..
fixtures feat(core): read the models.dev catalog from the experimental v2 API (#59296) 2026-10-26 12:17:31 -05:00
command.test.ts refactor(protocol): normalize session resources 2026-09-14 17:51:48 -04:00
fixture.ts chore: merge dev into beta 2026-10-26 08:34:06 +10:00
host.ts feat(plugin): filter event subscriptions by type (#58864) 2026-10-26 10:47:48 -05:00
identity.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
mcp-codemode-defaults.test.ts feat(core): MCP Code Mode defaults, turn off PostHog's server-side Code Mode (#51029) 2026-09-23 23:30:12 -05:00
models-dev.test.ts feat(core): read the models.dev catalog from the experimental v2 API (#59296) 2026-10-26 12:17:31 -05:00
module.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
optimize.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
permission-assert.test.ts feat(plugin): let plugins assert permissions (#54930) 2026-10-13 20:28:24 -05:00
plan.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
promise-tool.test.ts fix(plugin): return Promise tool throws as tool failures (#54913) 2026-10-12 15:37:34 -05:00
provider-amazon-bedrock.test.ts feat(core): add AWS profile setup for Bedrock (#53626) 2026-10-07 14:05:08 -05:00
provider-azure.test.ts fix(core): skip no-op Azure model transform updates (#58600) 2026-10-23 21:01:41 -07:00
provider-cerebras.test.ts refactor(core): refactor model resolving logic, fix missing variant logic (#48943) 2026-09-14 18:29:34 -05:00
provider-chatgpt.test.ts refactor(ai): replace wildcard exports with an explicit public API (#59183) 2026-10-26 09:37:24 -05:00
provider-cloudflare-ai-gateway.test.ts fix(core): fall back to Cloudflare environment IDs when not configured (#51963) 2026-09-28 19:28:03 -05:00
provider-cloudflare-workers-ai.test.ts fix(core): fall back to Cloudflare environment IDs when not configured (#51963) 2026-09-28 19:28:03 -05:00
provider-databricks.test.ts fix(core): accept a Databricks host that includes the scheme (#59334) 2026-10-26 12:37:57 -05:00
provider-digitalocean.test.ts fix(core): stop polling DigitalOcean routers (#57175) 2026-10-19 14:44:49 -05:00
provider-dynamic.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
provider-factory.test.ts feat(core): wire native Vercel AI Gateway provider (#53432) 2026-10-05 18:07:39 -05:00
provider-github-copilot.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
provider-gitlab-oauth.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
provider-gitlab.test.ts feat(core): restore GitLab workflow discovery and add OAuth login (#50422) 2026-09-23 23:00:52 -05:00
provider-google-vertex.test.ts fix(core): use Vertex multi-region hosts for eu and us (#59335) 2026-10-26 12:38:13 -05:00
provider-kilo.test.ts refactor(core): refactor model resolving logic, fix missing variant logic (#48943) 2026-09-14 18:29:34 -05:00
provider-llmgateway.test.ts refactor(core): refactor model resolving logic, fix missing variant logic (#48943) 2026-09-14 18:29:34 -05:00
provider-lmstudio.test.ts refactor(core): share local provider discovery plugin across vllm, lmstudio, and ollama (#53438) 2026-10-05 15:00:04 -07:00
provider-nvidia.test.ts refactor(core): refactor model resolving logic, fix missing variant logic (#48943) 2026-09-14 18:29:34 -05:00
provider-ollama.test.ts feat(sdk): seed host plugins before recovery and harden workerd defaults (#54219) 2026-10-09 17:07:51 -07:00
provider-openai-context-caps.test.ts feat(core): move ChatGPT context caps into a separate plugin (#58194) 2026-10-22 22:16:18 -05:00
provider-openai.test.ts feat(core): move ChatGPT context caps into a separate plugin (#58194) 2026-10-22 22:16:18 -05:00
provider-opencode.test.ts fix(core): limit provider packages from remote sources to known names 2026-10-26 14:42:48 -04:00
provider-openrouter.test.ts refactor(core): refactor model resolving logic, fix missing variant logic (#48943) 2026-09-14 18:29:34 -05:00
provider-poe.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
provider-sap-ai-core.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
provider-snowflake-cortex.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
provider-vercel.test.ts refactor(core): split provider and model registries (#48901) 2026-09-14 10:34:11 -04:00
provider-vllm.test.ts refactor(core): refactor model resolving logic, fix missing variant logic (#48943) 2026-09-14 18:29:34 -05:00
provider-xai.test.ts refactor(schema): separate provider and model settings (#49850) 2026-09-18 21:20:08 -05:00
provider-zenmux.test.ts refactor(core): refactor model resolving logic, fix missing variant logic (#48943) 2026-09-14 18:29:34 -05:00
session-compact.test.ts feat(plugin): expose session compaction (#52385) 2026-09-30 22:26:10 -05:00
session-instructions.test.ts chore: merge beta into dev 2026-10-26 13:56:31 +10:00
session-list.test.ts feat(plugin): expose session list (#56264) 2026-10-17 00:07:26 -05:00
session-remove.test.ts feat(plugin): expose session removal (#52387) 2026-09-30 17:51:36 -05:00
skill.test.ts refactor(protocol): simplify skill and reference contracts 2026-09-13 18:52:55 -04:00
supervisor-reload.test.ts chore(ci): speed up and stabilize the test workflow (#55866) 2026-10-16 00:35:49 +02:00
supervisor.test.ts fix(core): publish sdk.plugin.updated globally across locations (#57181) 2026-10-19 13:02:06 -07:00
tool-input-repair-integration.test.ts feat(core): repair malformed tool arguments before validation (#45002) 2026-09-18 10:26:02 -05:00
tool-input-repair.test.ts feat(plugin): add list to the tool domain (#49838) 2026-09-18 18:51:37 -05:00
vcs-init.test.ts fix(app): restore Git initialization for non-Git projects (#51455) 2026-10-02 06:13:19 +00:00
verbosity.test.ts feat(core): wire native Vercel AI Gateway provider (#53432) 2026-10-05 18:07:39 -05:00
websearch-fixture.ts fix(core): initialize MCP session for TinyFish web search (#54730) 2026-10-15 17:06:05 +00:00
websearch.test.ts fix(core): initialize MCP session for TinyFish web search (#54730) 2026-10-15 17:06:05 +00:00
worktree.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00