Dashboard › opencode › Distillation
76662273-bb9f-4759-ae74-f28b9f50bd62["lore_tm_v1_4WEZ9SjlfPqFG7qHd6sQe720JBmaGH4CLF3Ds5b08nw"]
/home/byk/Code/opencode-v2-pilot/packages/core/src/plugin.ts: user finalizers may await readiness, so never join them under the activation lock or readiness hold.pendingFailures worker in /home/byk/Code/opencode-v2-pilot/packages/core/src/plugin.ts lines 182–236: it logs transform failures, updates inventory and refreshes state under lock.withPermit, publishes Plugin.Event.Updated, schedules Scope.close(item.scope, Exit.void) via Effect.forkScoped({ startImmediately: true }), logs cleanup/reporting failures, and always runs item.release./home/byk/Code/opencode-v2-pilot/packages/core/src/plugin.ts lines 125–175: registrations are setup-ordered; only the unchanged prefix remains alive; prior changed registrations are traversed in reverse and healthy activation scopes are closed; a failed activation is not retried when its revision is unchanged; failed new loads may restore a healthy prior activation as fallback while retaining the new setup error./home/byk/Code/opencode-v2-pilot/packages/core/src/plugin.ts lines 238–248: close(exit) runs under lock.withPermit, sets closed = true, clears pending, calls ready.openUnsafe(), clears active, and executes State.shutdown(Scope.close(scope, exit)); close is registered with Effect.addFinalizer(close)./home/byk/Code/opencode-v2-pilot/packages/core/src/plugin.ts: Slot holds requested plugin: Generation, optional last activation?: Activation, and optional error?: string; Activation holds plugin, closeable scope, and mutable optional failure?: { readonly error: string; readonly ref: string }; PendingFailure holds plugin, scope, failure: State.Failure, refresh: Effect.Effect<void>, ref, and release./home/byk/Code/opencode-v2-pilot/packages/core/src/plugin.ts lines 268–274: activation objects are shared across slot snapshots so teardown synchronously sees failures, including failures discovered after activate() captures previous slots.slotInfo(slot) behavior in /home/byk/Code/opencode-v2-pilot/packages/core/src/plugin.ts lines 285–292: failure comes from slot.activation?.failure or falls back to { error: slot.error }; state is "active" when no failure and "failed" otherwise; source defaults to { type: "builtin" }; features default server support with { server: true, ...slot.plugin.features }.node provider in /home/byk/Code/opencode-v2-pilot/packages/core/src/plugin.ts lines 295–300: LayerNode.Provider<Service, PersistentPty.UnavailableError, typeof Node.tags.values.location> is created by Node.makeLocationNode({ service: Service, layer, deps: [PluginHost.requirements] }).