/** * `/profiles`: Harness's own profiles and bundle layers, from a terminal. * * The layer above `/plugins`. A PROFILE is what `dsh --profile ` boots: * a directory whose `dsh.profile.bundles` list names the npm packages whose * patch layers compose the Host. A PRESET (`/plugins`) chooses which of the * capabilities that Host provides one agent may see. Profiles provide; * presets expose. * * Ownership, as everywhere else in this frontend: Harness owns profile * discovery (`$DSH_HOME/profiles`, read through its own `dshHomePath` * service), the manifest format, bundle module resolution, and — through * `dsh plugin` — the entire package lifecycle including pnpm invocation and * `dsh.profile.bundles` reconciliation. This module owns rows, keys, prompts, * and one honest sentence about restarting. It writes no manifest, resolves no * package, and installs nothing itself. * * The restart boundary is what this browser exists to make visible. Harness may * change a mounted composition at runtime (the adopted generation's HMR service * and plugin manager), so a process's startup state is not proof that the files * on disk still match it; and replacing an installed package's module * generation still needs a fresh process. dshline drives `dsh plugin` in a * subprocess and observes none of that, so it states the scope of the operation * it ran: a landed operation on the CURRENT profile says restart required, one * on any other profile says which command picks it up, and switching profiles * is not offered at all — this browser re-links no layers itself, and building * that would be the competing lifecycle it refuses to own. * @module dshline/profiles */ import type { Context } from '@deepseek-ai/cordis'; import type { ProfilesCatalogSpec } from './catalog.ts'; import { runProfileOperation } from './actions.ts'; export type { BundleRow, PlainDependencyRow, ProfileRow, ProfilesReading } from './harness.ts'; export { currentProfileName, readProfiles } from './harness.ts'; export type { ProfilesState, ProfilesCatalogSpec } from './catalog.ts'; export { ProfilesCatalog } from './catalog.ts'; export type { ProfileOperation, ResolvedOperation, OperationRefusal } from './model.ts'; export { bootCommand, bundleFacts, bundleMark, filterProfileRows, plainDependencyFacts, plausiblePackageSpec, profileMark, profileTags, removeEligibility, resolveOperation, restartNote, updateEligibility, validProfileName, } from './model.ts'; export type { ProfileActionOutcome, ProfileOperationSpec, ChildResult, ChildTimings } from './actions.ts'; export { failureReason, pendingDecision, pluginCommand, redactOutputLine, runProfileOperation, spawnCaptured, } from './actions.ts'; export type { ProfilesActivityView, RunningOperation } from './runtime.ts'; export { operationInFlight, profilesActivity, queueRestart, resetProfilesRuntime, runExclusively, watchProfilesActivity, } from './runtime.ts'; export type { ProfilesOverlay, ProfilesOverlaySpec, ProfilesSelection } from './overlay.ts'; export { createProfilesOverlay, selectableRows } from './overlay.ts'; /** What opening the browser needs from the window it opens over. */ export interface ProfilesSpec { /** Context carrying `dshHomePath`, the Loader base URL, and the slot registry. */ readonly ctx: Context; /** 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; /** * Run one `dsh plugin` invocation; injected so tests drive the whole * orchestration without a launcher on PATH or a real pnpm. */ readonly run?: typeof runProfileOperation; /** * Read the roster; injected for the same reason, so orchestration can be * driven against a fixed roster rather than a real Harness home. */ readonly read?: ProfilesCatalogSpec['read']; } /** * Show the Profiles browser and stay until the reader closes it. * @param spec - the context and where transcript rows go. * @returns when the browser is closed. */ export declare function openProfiles(spec: ProfilesSpec): Promise; //# sourceMappingURL=index.d.ts.map