Dashboard › opencode › Distillation
2b473c86-a0fa-4ce3-b36f-9d705ca582af["lore_tm_v1_-kQh53VNxqSASs_OTK8EjQsQKUM1WvklZ7yoVfyybWA","lore_tm_v1_Hc6WRHxMFV0T9PFiDfnQ8QbigruaTJbP6gaduDukWPA","lore_tm_v1_F5FB_E8CYgGQT5lLcUfcRgI3Yv7tqrcH-G9muhXpo_c","lore_tm_v1_Bz77tALoBApiiCjYomjt1khhZYSdRFVjJE4ny_3ssnk","lore_tm_v1_fkGARpXhIN6WOHdcS1R4DeZyK63tNtGhjuxtg3Gz4aA"]
packages/core/test/plugin.test.ts contains 581 lines and defines plugin lifecycle/integration tests using testEffect(PluginTestLayer); imports include Clock, Deferred, Effect, TestClock, Command, Bus, Credential, Integration, Plugin, PluginModule, Watcher, fromPromise, and Session.packages/core/test/plugin.test.ts:19-68 tests ordered activation reconciliation with 4 scenarios: 1. appending c to ["a","b"] starts only start:c:1; 2. inserting x into ["a","b","c"] produces ["stop:c:1","stop:b:1","start:x:1","start:b:1","start:c:1"]; 3. changing b to revision "2" produces ["stop:c:1","stop:b:1","start:b:2","start:c:1"]; 4. removing trailing c produces only ["stop:c:1"]. Final inventory order must equal the requested after list with IDs branded through Plugin.ID.make.packages/core/test/plugin.test.ts:70-87 verifies that changing only inventory metadata does not restart an unchanged generation: plugin metadata revision "1" loads once, while its package source changes from { type: "package", target: "fixture" } to include outdated: true.packages/core/test/plugin.test.ts:89-105 live-tests loading local plugin plugin/fixtures/greeting.ts through PluginModule.make() with Watcher.testLayer; configured options { description: "Configured greeting" } must appear on command greet, and a returned pending definition dies with "Local plugin was not loaded".packages/core/test/plugin.test.ts:107-135 verifies unloading plugin greeting removes command greet and executes its scope finalizer, changing cleaned from false to true.packages/core/test/plugin.test.ts:137-159 verifies a plugin broken dying with Error("Setup failed") is inventoried with state.status: "failed" and the setup error, without blocking healthy plugin greeting from registering command greet.packages/core/test/plugin.test.ts:161-210 verifies a transform failure disables plugin broken, runs its cleanup, and publishes none of its partial edits: its integration update to ID "broken" is absent, command shared retains description "original" rather than "partial", and later plugin after still registers command healthy. The failed state must contain "command.transform failed" and a reference matching /^err_/.packages/core/test/plugin.test.ts:212-252 verifies failed plugin generations are not retried on identical activation and do not kill their suffix: after activating good1, failing broken revision "1", and good2, setup counts remain { good1: 1, broken: 1, good2: 1 } after an identical activation and statuses remain ["good1:active","broken:failed","good2:active"]; activating failed plugin revision "2" retries it once and restarts only its suffix, producing { good1: 1, broken: 2, good2: 2 }.packages/core/test/plugin.test.ts:254-286 verifies replay failure is attributed to broken-plugin, whose command transform throws Error("plugin failed"), rather than later plugin reader that reads the command registry; final statuses are ["broken-plugin:failed","reader:active"], and command reader exists.packages/core/test/plugin.test.ts:288-347 verifies runtime reload failures disable plugin runtime, remove its command, publish Plugin.Event.Updated with failed inventory state, preserve a separate discovery entry { source: { type: "local", path: "/missing" }, state: { status: "failed", error: "Import failed" }, features: { server: true } }, and expose only an /^err_/ reference rather than "private failure detail". Reactivating unchanged revision "1" does not retry (loads remains 1); revision "2" retries (loads becomes 2), restores active state, and restores command runtime.packages/core/test/plugin.test.ts:349-386 verifies replacing plugin replacement revision "1" with revision "2" that throws Error("replay failure") during command.transform disables the new generation without restoring the old one; load order is exactly ["1","2"], failed state mentions "command.transform", cleanup completes through a Deferred, and command replacement is absent.packages/core/test/plugin.test.ts:388-421 verifies asynchronous cleanup of failed plugin async-cleanup can await plugins.awaitActivation without blocking recovered registry readiness; later plugin healthy remains active and command healthy exists.packages/core/test/plugin.test.ts:423-450 live-tests retained Promise plugin groups: fromPromise() plugin promise-plugin captures a later registration callback; a late ctx.command.transform that adds command late and then throws Error("late Promise failure") marks the plugin failed with a "command.transform" error and publishes no late command. Repeating the captured registration after disablement is ignored and still does not create late.packages/core/test/plugin.test.ts:452-477 verifies Promise plugins receive canonical permission assertions: plugin promise-permission calls ctx.permission.assert() with sessionID: Session.ID.make("ses_plugin_permission"), action: "shell", resources: ["'true'"], and tool source { type: "tool", messageID: "msg_plugin_permission", id: "call_plugin_permission" }; after activation, its inventory state is "active".packages/core/test/plugin.test.ts:479-516 verifies reloading plugin greeting replaces command implementation: revision "1" executes greet and appends "before"; revision "2" executes the same command and appends "after", yielding output ["before","after"]. Invocation uses sessionID: Session.ID.make("ses_plugin"), empty prompt text, and delivery "steer".packages/core/test/plugin.test.ts:518-581 tests OAuth refresh during activation for integration "refresh-fixture" and method "oauth": an OAuth credential expiring in 60_000 ms is stored, TestClock advances "2 minutes", and plugin oauth-refresh registers a refresh callback that returns a credential expiring in 3_600_000 ms. The method must be readable before the activation batch ends; resolved, stored, and integration-resolved credentials all equal the refreshed value; the refresh callback receives exactly the expired credential once; plugin state is active. Plugin activation explicitly receives the captured Clock.Clock because activation isolates ambient services including the test clock.packages/cli/dist-v2-pilot/cli-node-linux-x64/package.json defines package @opencode-ai/cli-node-linux-x64, version 0.0.0-v2-pilot-202608250932, MIT license, repository git+https://github.com/anomalyco/opencode.git, OS linux, and CPU x64.packages/cli/dist-v2-pilot-next/cli-node-linux-x64/package.json defines package @opencode/cli-node-linux-x64, version 0.0.0-v2-pilot-202609080105, MIT license, repository git+https://github.com/anomalyco/opencode.git, OS linux, and CPU x64.packages/cli/dist-v2-pilot-final/cli-node-linux-x64/package.json defines package @opencode/cli-node-linux-x64, version 0.0.0-v2-pilot-202609080301, MIT license, repository git+https://github.com/anomalyco/opencode.git, OS linux, and CPU x64.packages/cli/AGENTS.md requires using @opencode/client and location-scoped data from packages/tui/src/context/data.tsx rather than adding dependencies on legacy sync state, and preserving established TUI behavior unless a task intentionally changes it./home/byk/.local/share/opencode-v2-pilot/config/opencode contains exactly 8 entries: bun.lock, node_modules/, opencode.json, package.json, plugins/, service-v2-pilot.json, test/, and tsconfig.json.