/** * `/plugins`: the running agent's Harness preset composition, from a terminal. * * The same division of labour every other domain here keeps: Harness owns * the preset roster, a preset's composition, session composition and its * lifecycle, the `agent-preset-registry` entry's `selectedDefault` field, and * persistence of a composition edit. This module owns the rows, the keyboard, * and the one prompt a keystroke here can raise — the offer a locked session * redirects to. There is no plugin registry here, no YAML dialect invented, and * no per-provider branch: a row reaches this browser because * `ctx.agentPresets` composed it, a composition row is edited through the same * `ctx.configEditor` Harness's own settings pages write through, and a preset is * switched or defaulted through the same `agentPresets.select()`/`ctx.settings` * seams Harness's own Web client uses. * * What used to be here and is not: a `space` handler that spliced one * `disabled` field into a preset's file, and the copy-to-customize flow behind * it. Both belonged to a roster that owned its files. The adopted generation * owns no files — a declaration is a row, the registry "writes no * declarations" and "accepts no preset paths", and its own preset tree refuses * `write()` because "only the profile configuration editor persists * definitions". Composition changes are Harness's profile-patch operation now, * and this browser reads what it composes. * @module dshline/plugins */ import type { Context } from '@deepseek-ai/cordis'; import type { PluginsAgent } from './harness.ts'; export type { AgentPresetDocument, AgentPresetRow, AgentPresetsSeam, ConfigEditorSeam, PluginsAgent, PluginsSeams, PluginsSessionFacts, PluginsSettings, } from './harness.ts'; export { pluginsSeams, sessionFacts } from './harness.ts'; export type { CompositionRow, CompositionTree, DisabledState, RowLocator, RowLocatorStep, ToggleFailureReason, ToggleResult } from './composition.ts'; export { parseComposition, togglePresetRow } from './composition.ts'; export type { PresetRow, PresetSwitchEligibility, ToggleEligibility } from './model.ts'; export { filterCompositionRows, filterPresetRows, presetRows, rowMark, toggleEligibility, } from './model.ts'; export type { BrowsedComposition, PluginsCapabilities, PluginsCatalogSpec, PluginsState } from './catalog.ts'; export type { CapabilityRegistry, HostCapabilities, RowHealth, SubagentRegistrySeam } from './health.ts'; export { CAPABILITY_LINKS, healthFacts, hostCapabilities, rowHealth, unbackedWhileEnabled } from './health.ts'; export { PluginsCatalog } from './catalog.ts'; export type { PluginsActionOutcome } from './actions.ts'; export { setDefaultPreset, switchPreset, toggleRow } from './actions.ts'; export type { PluginsOverlay, PluginsOverlaySpec } from './overlay.ts'; export { createPluginsOverlay } from './overlay.ts'; /** What opening the browser needs from the window it opens over. */ export interface PluginsSpec { /** Context carrying the harness seams and the slot registry. */ readonly ctx: Context; /** The attached agent, for its composition and its session's projected facts. */ readonly agent: PluginsAgent; /** Write finished rows into the terminal's own scrollback. */ readonly commit: (lines: readonly string[]) => void; /** Current time; injected so notice expiry is assertable. */ readonly now?: () => number; /** * Called after this agent's scope was re-parented onto another composition. * * A recompose changes which layers a scope-aware Harness registry merges for * this agent, and it does so WITHOUT a registry mutation — so nothing the * registries emit announces it. The one consumer that needs telling today is * the skill catalog, and it is told the only thing this module knows: * the composition changed, so re-read the authoritative view. Nothing here * inspects a preset definition to guess which capability moved. */ readonly recomposed?: () => void; } /** * Show the Plugins browser and stay until the reader closes it. * @param spec - the context, the agent, and where transcript rows go. * @returns when the browser is closed. */ export declare function openPlugins(spec: PluginsSpec): Promise; //# sourceMappingURL=index.d.ts.map